react-side-sheet-pro 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -91,16 +91,16 @@ function HiX(props) {
91
91
  })(props);
92
92
  }
93
93
 
94
- var SideSheetHeader = React.memo(function (_a) {
95
- var title = _a.title,
96
- onClose = _a.onClose,
97
- actions = _a.actions;
98
- return React.createElement("header", {
94
+ var SideSheetHeader = /*#__PURE__*/React.memo(function (_ref) {
95
+ var title = _ref.title,
96
+ onClose = _ref.onClose,
97
+ actions = _ref.actions;
98
+ return /*#__PURE__*/React.createElement("header", {
99
99
  className: "sidesheet-header"
100
- }, onClose && React.createElement("button", {
100
+ }, onClose && (/*#__PURE__*/React.createElement("button", {
101
101
  className: "sidesheet-header-close sidesheet-header-btn",
102
102
  onClick: onClose
103
- }, React.createElement(HiX, null)), React.createElement("div", {
103
+ }, /*#__PURE__*/React.createElement(HiX, null))), /*#__PURE__*/React.createElement("div", {
104
104
  className: "sidesheet-header-title"
105
105
  }, title), actions);
106
106
  });
@@ -110,13 +110,12 @@ function createCommonjsModule(fn, module) {
110
110
  }
111
111
 
112
112
  var classnames = createCommonjsModule(function (module) {
113
- /*!
114
- Copyright (c) 2018 Jed Watson.
115
- Licensed under the MIT License (MIT), see
116
- http://jedwatson.github.io/classnames
113
+ /*!
114
+ Copyright (c) 2018 Jed Watson.
115
+ Licensed under the MIT License (MIT), see
116
+ http://jedwatson.github.io/classnames
117
117
  */
118
118
  /* global define */
119
-
120
119
  (function () {
121
120
 
122
121
  var hasOwn = {}.hasOwnProperty;
@@ -169,168 +168,467 @@ var classnames = createCommonjsModule(function (module) {
169
168
  })();
170
169
  });
171
170
 
172
- var SideSheetContent = function (_a) {
173
- var children = _a.children,
174
- className = _a.className;
175
- return React.createElement("section", {
171
+ var SideSheetContent = function SideSheetContent(_ref) {
172
+ var children = _ref.children,
173
+ className = _ref.className;
174
+ return /*#__PURE__*/React.createElement("section", {
176
175
  className: classnames('sidesheet-content', className)
177
176
  }, children);
178
177
  };
179
178
 
180
- var SideSheetFooter = function (_a) {
181
- var children = _a.children,
182
- className = _a.className;
183
- return React.createElement("footer", {
179
+ var SideSheetFooter = function SideSheetFooter(_ref) {
180
+ var children = _ref.children,
181
+ className = _ref.className;
182
+ return /*#__PURE__*/React.createElement("footer", {
184
183
  className: classnames('sidesheet-footer', className)
185
184
  }, children);
186
185
  };
187
186
 
188
- /******************************************************************************
189
- Copyright (c) Microsoft Corporation.
190
-
191
- Permission to use, copy, modify, and/or distribute this software for any
192
- purpose with or without fee is hereby granted.
193
-
194
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
195
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
196
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
197
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
198
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
199
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
200
- PERFORMANCE OF THIS SOFTWARE.
201
- ***************************************************************************** */
202
- var __assign$1 = function () {
203
- __assign$1 = Object.assign || function __assign(t) {
204
- for (var s, i = 1, n = arguments.length; i < n; i++) {
205
- s = arguments[i];
206
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
207
- }
208
- return t;
209
- };
210
- return __assign$1.apply(this, arguments);
211
- };
212
- function __awaiter(thisArg, _arguments, P, generator) {
213
- function adopt(value) {
214
- return value instanceof P ? value : new P(function (resolve) {
215
- resolve(value);
187
+ function _arrayLikeToArray(r, a) {
188
+ (null == a || a > r.length) && (a = r.length);
189
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
190
+ return n;
191
+ }
192
+ function _arrayWithHoles(r) {
193
+ if (Array.isArray(r)) return r;
194
+ }
195
+ function _arrayWithoutHoles(r) {
196
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
197
+ }
198
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
199
+ try {
200
+ var i = n[a](c),
201
+ u = i.value;
202
+ } catch (n) {
203
+ return void e(n);
204
+ }
205
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
206
+ }
207
+ function _asyncToGenerator(n) {
208
+ return function () {
209
+ var t = this,
210
+ e = arguments;
211
+ return new Promise(function (r, o) {
212
+ var a = n.apply(t, e);
213
+ function _next(n) {
214
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
215
+ }
216
+ function _throw(n) {
217
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
218
+ }
219
+ _next(void 0);
216
220
  });
221
+ };
222
+ }
223
+ function _createForOfIteratorHelper(r, e) {
224
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
225
+ if (!t) {
226
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
227
+ t && (r = t);
228
+ var n = 0,
229
+ F = function () {};
230
+ return {
231
+ s: F,
232
+ n: function () {
233
+ return n >= r.length ? {
234
+ done: !0
235
+ } : {
236
+ done: !1,
237
+ value: r[n++]
238
+ };
239
+ },
240
+ e: function (r) {
241
+ throw r;
242
+ },
243
+ f: F
244
+ };
245
+ }
246
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
217
247
  }
218
- return new (P || (P = Promise))(function (resolve, reject) {
219
- function fulfilled(value) {
248
+ var o,
249
+ a = !0,
250
+ u = !1;
251
+ return {
252
+ s: function () {
253
+ t = t.call(r);
254
+ },
255
+ n: function () {
256
+ var r = t.next();
257
+ return a = r.done, r;
258
+ },
259
+ e: function (r) {
260
+ u = !0, o = r;
261
+ },
262
+ f: function () {
220
263
  try {
221
- step(generator.next(value));
222
- } catch (e) {
223
- reject(e);
264
+ a || null == t.return || t.return();
265
+ } finally {
266
+ if (u) throw o;
224
267
  }
225
268
  }
226
- function rejected(value) {
269
+ };
270
+ }
271
+ function _defineProperty(e, r, t) {
272
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
273
+ value: t,
274
+ enumerable: !0,
275
+ configurable: !0,
276
+ writable: !0
277
+ }) : e[r] = t, e;
278
+ }
279
+ function _iterableToArray(r) {
280
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
281
+ }
282
+ function _iterableToArrayLimit(r, l) {
283
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
284
+ if (null != t) {
285
+ var e,
286
+ n,
287
+ i,
288
+ u,
289
+ a = [],
290
+ f = !0,
291
+ o = !1;
292
+ try {
293
+ if (i = (t = t.call(r)).next, 0 === l) {
294
+ if (Object(t) !== t) return;
295
+ f = !1;
296
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
297
+ } catch (r) {
298
+ o = !0, n = r;
299
+ } finally {
227
300
  try {
228
- step(generator["throw"](value));
229
- } catch (e) {
230
- reject(e);
301
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
302
+ } finally {
303
+ if (o) throw n;
231
304
  }
232
305
  }
233
- function step(result) {
234
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
235
- }
236
- step((generator = generator.apply(thisArg, _arguments || [])).next());
237
- });
306
+ return a;
307
+ }
238
308
  }
239
- function __generator(thisArg, body) {
240
- var _ = {
241
- label: 0,
242
- sent: function () {
243
- if (t[0] & 1) throw t[1];
244
- return t[1];
245
- },
246
- trys: [],
247
- ops: []
248
- },
249
- f,
250
- y,
251
- t,
252
- g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
253
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function () {
254
- return this;
255
- }), g;
256
- function verb(n) {
257
- return function (v) {
258
- return step([n, v]);
309
+ function _nonIterableRest() {
310
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
311
+ }
312
+ function _nonIterableSpread() {
313
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
314
+ }
315
+ function ownKeys(e, r) {
316
+ var t = Object.keys(e);
317
+ if (Object.getOwnPropertySymbols) {
318
+ var o = Object.getOwnPropertySymbols(e);
319
+ r && (o = o.filter(function (r) {
320
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
321
+ })), t.push.apply(t, o);
322
+ }
323
+ return t;
324
+ }
325
+ function _objectSpread2(e) {
326
+ for (var r = 1; r < arguments.length; r++) {
327
+ var t = null != arguments[r] ? arguments[r] : {};
328
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
329
+ _defineProperty(e, r, t[r]);
330
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
331
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
332
+ });
333
+ }
334
+ return e;
335
+ }
336
+ function _regeneratorRuntime() {
337
+ _regeneratorRuntime = function () {
338
+ return r;
339
+ };
340
+ var t,
341
+ r = {},
342
+ e = Object.prototype,
343
+ n = e.hasOwnProperty,
344
+ o = "function" == typeof Symbol ? Symbol : {},
345
+ i = o.iterator || "@@iterator",
346
+ a = o.asyncIterator || "@@asyncIterator",
347
+ u = o.toStringTag || "@@toStringTag";
348
+ function c(t, r, e, n) {
349
+ return Object.defineProperty(t, r, {
350
+ value: e,
351
+ enumerable: !n,
352
+ configurable: !n,
353
+ writable: !n
354
+ });
355
+ }
356
+ try {
357
+ c({}, "");
358
+ } catch (t) {
359
+ c = function (t, r, e) {
360
+ return t[r] = e;
259
361
  };
260
362
  }
261
- function step(op) {
262
- if (f) throw new TypeError("Generator is already executing.");
263
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
264
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
265
- if (y = 0, t) op = [op[0] & 2, t.value];
266
- switch (op[0]) {
267
- case 0:
268
- case 1:
269
- t = op;
270
- break;
271
- case 4:
272
- _.label++;
363
+ function h(r, e, n, o) {
364
+ var i = e && e.prototype instanceof Generator ? e : Generator,
365
+ a = Object.create(i.prototype);
366
+ return c(a, "_invoke", function (r, e, n) {
367
+ var o = 1;
368
+ return function (i, a) {
369
+ if (3 === o) throw Error("Generator is already running");
370
+ if (4 === o) {
371
+ if ("throw" === i) throw a;
273
372
  return {
274
- value: op[1],
275
- done: false
373
+ value: t,
374
+ done: !0
276
375
  };
277
- case 5:
278
- _.label++;
279
- y = op[1];
280
- op = [0];
281
- continue;
282
- case 7:
283
- op = _.ops.pop();
284
- _.trys.pop();
285
- continue;
286
- default:
287
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
288
- _ = 0;
289
- continue;
290
- }
291
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
292
- _.label = op[1];
293
- break;
294
- }
295
- if (op[0] === 6 && _.label < t[1]) {
296
- _.label = t[1];
297
- t = op;
298
- break;
376
+ }
377
+ for (n.method = i, n.arg = a;;) {
378
+ var u = n.delegate;
379
+ if (u) {
380
+ var c = d(u, n);
381
+ if (c) {
382
+ if (c === f) continue;
383
+ return c;
384
+ }
299
385
  }
300
- if (t && _.label < t[2]) {
301
- _.label = t[2];
302
- _.ops.push(op);
303
- break;
386
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
387
+ if (1 === o) throw o = 4, n.arg;
388
+ n.dispatchException(n.arg);
389
+ } else "return" === n.method && n.abrupt("return", n.arg);
390
+ o = 3;
391
+ var h = s(r, e, n);
392
+ if ("normal" === h.type) {
393
+ if (o = n.done ? 4 : 2, h.arg === f) continue;
394
+ return {
395
+ value: h.arg,
396
+ done: n.done
397
+ };
304
398
  }
305
- if (t[2]) _.ops.pop();
306
- _.trys.pop();
307
- continue;
399
+ "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg);
400
+ }
401
+ };
402
+ }(r, n, new Context(o || [])), !0), a;
403
+ }
404
+ function s(t, r, e) {
405
+ try {
406
+ return {
407
+ type: "normal",
408
+ arg: t.call(r, e)
409
+ };
410
+ } catch (t) {
411
+ return {
412
+ type: "throw",
413
+ arg: t
414
+ };
415
+ }
416
+ }
417
+ r.wrap = h;
418
+ var f = {};
419
+ function Generator() {}
420
+ function GeneratorFunction() {}
421
+ function GeneratorFunctionPrototype() {}
422
+ var l = {};
423
+ c(l, i, function () {
424
+ return this;
425
+ });
426
+ var p = Object.getPrototypeOf,
427
+ y = p && p(p(x([])));
428
+ y && y !== e && n.call(y, i) && (l = y);
429
+ var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l);
430
+ function g(t) {
431
+ ["next", "throw", "return"].forEach(function (r) {
432
+ c(t, r, function (t) {
433
+ return this._invoke(r, t);
434
+ });
435
+ });
436
+ }
437
+ function AsyncIterator(t, r) {
438
+ function e(o, i, a, u) {
439
+ var c = s(t[o], t, i);
440
+ if ("throw" !== c.type) {
441
+ var h = c.arg,
442
+ f = h.value;
443
+ return f && "object" == typeof f && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) {
444
+ e("next", t, a, u);
445
+ }, function (t) {
446
+ e("throw", t, a, u);
447
+ }) : r.resolve(f).then(function (t) {
448
+ h.value = t, a(h);
449
+ }, function (t) {
450
+ return e("throw", t, a, u);
451
+ });
452
+ }
453
+ u(c.arg);
454
+ }
455
+ var o;
456
+ c(this, "_invoke", function (t, n) {
457
+ function i() {
458
+ return new r(function (r, o) {
459
+ e(t, n, r, o);
460
+ });
461
+ }
462
+ return o = o ? o.then(i, i) : i();
463
+ }, !0);
464
+ }
465
+ function d(r, e) {
466
+ var n = e.method,
467
+ o = r.i[n];
468
+ if (o === t) return e.delegate = null, "throw" === n && r.i.return && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f;
469
+ var i = s(o, r.i, e.arg);
470
+ if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f;
471
+ var a = i.arg;
472
+ return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f);
473
+ }
474
+ function w(t) {
475
+ this.tryEntries.push(t);
476
+ }
477
+ function m(r) {
478
+ var e = r[4] || {};
479
+ e.type = "normal", e.arg = t, r[4] = e;
480
+ }
481
+ function Context(t) {
482
+ this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0);
483
+ }
484
+ function x(r) {
485
+ if (null != r) {
486
+ var e = r[i];
487
+ if (e) return e.call(r);
488
+ if ("function" == typeof r.next) return r;
489
+ if (!isNaN(r.length)) {
490
+ var o = -1,
491
+ a = function e() {
492
+ for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e;
493
+ return e.value = t, e.done = !0, e;
494
+ };
495
+ return a.next = a;
308
496
  }
309
- op = body.call(thisArg, _);
310
- } catch (e) {
311
- op = [6, e];
312
- y = 0;
313
- } finally {
314
- f = t = 0;
315
497
  }
316
- if (op[0] & 5) throw op[1];
498
+ throw new TypeError(typeof r + " is not iterable");
499
+ }
500
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) {
501
+ var r = "function" == typeof t && t.constructor;
502
+ return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name));
503
+ }, r.mark = function (t) {
504
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t;
505
+ }, r.awrap = function (t) {
317
506
  return {
318
- value: op[0] ? op[1] : void 0,
319
- done: true
507
+ __await: t
320
508
  };
509
+ }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () {
510
+ return this;
511
+ }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) {
512
+ void 0 === i && (i = Promise);
513
+ var a = new AsyncIterator(h(t, e, n, o), i);
514
+ return r.isGeneratorFunction(e) ? a : a.next().then(function (t) {
515
+ return t.done ? t.value : a.next();
516
+ });
517
+ }, g(v), c(v, u, "Generator"), c(v, i, function () {
518
+ return this;
519
+ }), c(v, "toString", function () {
520
+ return "[object Generator]";
521
+ }), r.keys = function (t) {
522
+ var r = Object(t),
523
+ e = [];
524
+ for (var n in r) e.unshift(n);
525
+ return function t() {
526
+ for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t;
527
+ return t.done = !0, t;
528
+ };
529
+ }, r.values = x, Context.prototype = {
530
+ constructor: Context,
531
+ reset: function (r) {
532
+ if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t);
533
+ },
534
+ stop: function () {
535
+ this.done = !0;
536
+ var t = this.tryEntries[0][4];
537
+ if ("throw" === t.type) throw t.arg;
538
+ return this.rval;
539
+ },
540
+ dispatchException: function (r) {
541
+ if (this.done) throw r;
542
+ var e = this;
543
+ function n(t) {
544
+ a.type = "throw", a.arg = r, e.next = t;
545
+ }
546
+ for (var o = e.tryEntries.length - 1; o >= 0; --o) {
547
+ var i = this.tryEntries[o],
548
+ a = i[4],
549
+ u = this.prev,
550
+ c = i[1],
551
+ h = i[2];
552
+ if (-1 === i[0]) return n("end"), !1;
553
+ if (!c && !h) throw Error("try statement without catch or finally");
554
+ if (null != i[0] && i[0] <= u) {
555
+ if (u < c) return this.method = "next", this.arg = t, n(c), !0;
556
+ if (u < h) return n(h), !1;
557
+ }
558
+ }
559
+ },
560
+ abrupt: function (t, r) {
561
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
562
+ var n = this.tryEntries[e];
563
+ if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) {
564
+ var o = n;
565
+ break;
566
+ }
567
+ }
568
+ o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null);
569
+ var i = o ? o[4] : {};
570
+ return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i);
571
+ },
572
+ complete: function (t, r) {
573
+ if ("throw" === t.type) throw t.arg;
574
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f;
575
+ },
576
+ finish: function (t) {
577
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
578
+ var e = this.tryEntries[r];
579
+ if (e[2] === t) return this.complete(e[4], e[3]), m(e), f;
580
+ }
581
+ },
582
+ catch: function (t) {
583
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
584
+ var e = this.tryEntries[r];
585
+ if (e[0] === t) {
586
+ var n = e[4];
587
+ if ("throw" === n.type) {
588
+ var o = n.arg;
589
+ m(e);
590
+ }
591
+ return o;
592
+ }
593
+ }
594
+ throw Error("illegal catch attempt");
595
+ },
596
+ delegateYield: function (r, e, n) {
597
+ return this.delegate = {
598
+ i: x(r),
599
+ r: e,
600
+ n: n
601
+ }, "next" === this.method && (this.arg = t), f;
602
+ }
603
+ }, r;
604
+ }
605
+ function _slicedToArray(r, e) {
606
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
607
+ }
608
+ function _toConsumableArray(r) {
609
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
610
+ }
611
+ function _toPrimitive(t, r) {
612
+ if ("object" != typeof t || !t) return t;
613
+ var e = t[Symbol.toPrimitive];
614
+ if (void 0 !== e) {
615
+ var i = e.call(t, r || "default");
616
+ if ("object" != typeof i) return i;
617
+ throw new TypeError("@@toPrimitive must return a primitive value.");
618
+ }
619
+ return ("string" === r ? String : Number)(t);
620
+ }
621
+ function _toPropertyKey(t) {
622
+ var i = _toPrimitive(t, "string");
623
+ return "symbol" == typeof i ? i : i + "";
624
+ }
625
+ function _unsupportedIterableToArray(r, a) {
626
+ if (r) {
627
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
628
+ var t = {}.toString.call(r).slice(8, -1);
629
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
321
630
  }
322
631
  }
323
-
324
- /** @deprecated */
325
- function __spreadArrays() {
326
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
327
- for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
328
- return r;
329
- }
330
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
331
- var e = new Error(message);
332
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
333
- };
334
632
 
335
633
  var scheduler_production_min = createCommonjsModule(function (module, exports) {
336
634
 
@@ -657,7 +955,6 @@ if (process.env.NODE_ENV !== "production") {
657
955
  var left = heap[leftIndex];
658
956
  var rightIndex = leftIndex + 1;
659
957
  var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.
660
-
661
958
  if (compare(left, node) < 0) {
662
959
  if (rightIndex < length && compare(right, left) < 0) {
663
960
  heap[index] = right;
@@ -683,7 +980,6 @@ if (process.env.NODE_ENV !== "production") {
683
980
  var diff = a.sortIndex - b.sortIndex;
684
981
  return diff !== 0 ? diff : a.id - b.id;
685
982
  }
686
-
687
983
  // TODO: Use symbols?
688
984
  var ImmediatePriority = 1;
689
985
  var UserBlockingPriority = 2;
@@ -691,9 +987,7 @@ if (process.env.NODE_ENV !== "production") {
691
987
  var LowPriority = 4;
692
988
  var IdlePriority = 5;
693
989
  function markTaskErrored(task, ms) {}
694
-
695
990
  /* eslint-disable no-var */
696
-
697
991
  var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
698
992
  if (hasPerformanceNow) {
699
993
  var localPerformance = performance;
@@ -709,32 +1003,23 @@ if (process.env.NODE_ENV !== "production") {
709
1003
  } // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
710
1004
  // Math.pow(2, 30) - 1
711
1005
  // 0b111111111111111111111111111111
712
-
713
1006
  var maxSigned31BitInt = 1073741823; // Times out immediately
714
-
715
1007
  var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
716
-
717
1008
  var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
718
1009
  var NORMAL_PRIORITY_TIMEOUT = 5000;
719
1010
  var LOW_PRIORITY_TIMEOUT = 10000; // Never times out
720
-
721
1011
  var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap
722
-
723
1012
  var taskQueue = [];
724
1013
  var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.
725
-
726
1014
  var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
727
1015
  var currentTask = null;
728
1016
  var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrance.
729
-
730
1017
  var isPerformingWork = false;
731
1018
  var isHostCallbackScheduled = false;
732
1019
  var isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them.
733
-
734
1020
  var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null;
735
1021
  var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null;
736
1022
  var localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom
737
-
738
1023
  var isInputPending = typeof navigator !== 'undefined' && navigator.scheduling !== undefined && navigator.scheduling.isInputPending !== undefined ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null;
739
1024
  function advanceTimers(currentTime) {
740
1025
  // Check for tasks that are no longer delayed and add them to the queue.
@@ -830,7 +1115,6 @@ if (process.env.NODE_ENV !== "production") {
830
1115
  }
831
1116
  currentTask = peek(taskQueue);
832
1117
  } // Return whether there's additional work
833
-
834
1118
  if (currentTask !== null) {
835
1119
  return true;
836
1120
  } else {
@@ -948,14 +1232,12 @@ if (process.env.NODE_ENV !== "production") {
948
1232
  } else {
949
1233
  isHostTimeoutScheduled = true;
950
1234
  } // Schedule a timeout.
951
-
952
1235
  requestHostTimeout(handleTimeout, startTime - currentTime);
953
1236
  }
954
1237
  } else {
955
1238
  newTask.sortIndex = expirationTime;
956
1239
  push(taskQueue, newTask);
957
1240
  // wait until the next time we yield.
958
-
959
1241
  if (!isHostCallbackScheduled && !isPerformingWork) {
960
1242
  isHostCallbackScheduled = true;
961
1243
  requestHostCallback(flushWork);
@@ -976,7 +1258,6 @@ if (process.env.NODE_ENV !== "production") {
976
1258
  function unstable_cancelCallback(task) {
977
1259
  // remove from the queue because you can't remove arbitrary nodes from an
978
1260
  // array based heap, only the first one.)
979
-
980
1261
  task.callback = null;
981
1262
  }
982
1263
  function unstable_getCurrentPriorityLevel() {
@@ -988,7 +1269,6 @@ if (process.env.NODE_ENV !== "production") {
988
1269
  // thread, like user events. By default, it yields multiple times per frame.
989
1270
  // It does not attempt to align with frame boundaries, since most tasks don't
990
1271
  // need to be frame aligned; for those that do, use requestAnimationFrame.
991
-
992
1272
  var frameInterval = frameYieldMs;
993
1273
  var startTime = -1;
994
1274
  function shouldYieldToHost() {
@@ -998,7 +1278,6 @@ if (process.env.NODE_ENV !== "production") {
998
1278
  // smaller than a single frame. Don't yield yet.
999
1279
  return false;
1000
1280
  } // The main thread has been blocked for a non-negligible amount of time. We
1001
-
1002
1281
  return true;
1003
1282
  }
1004
1283
  function requestPaint() {}
@@ -1019,7 +1298,6 @@ if (process.env.NODE_ENV !== "production") {
1019
1298
  if (scheduledHostCallback !== null) {
1020
1299
  var currentTime = exports.unstable_now(); // Keep track of the start time so we can measure how long the main thread
1021
1300
  // has been blocked.
1022
-
1023
1301
  startTime = currentTime;
1024
1302
  var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the
1025
1303
  // error can be observed.
@@ -1027,7 +1305,6 @@ if (process.env.NODE_ENV !== "production") {
1027
1305
  // Intentionally not using a try-catch, since that makes some debugging
1028
1306
  // techniques harder. Instead, if `scheduledHostCallback` errors, then
1029
1307
  // `hasMoreWork` will remain true, and we'll continue the work loop.
1030
-
1031
1308
  var hasMoreWork = true;
1032
1309
  try {
1033
1310
  hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
@@ -8322,23 +8599,23 @@ var warnAboutStringRefs=true;// ------------------------------------------------
8322
8599
  var enableSchedulingProfiler=true;// Helps identify side effects in render-phase lifecycle hooks and setState
8323
8600
  var enableProfilerTimer=true;// Record durations for commit and passive effects phases.
8324
8601
  var enableProfilerCommitHooks=true;// Phase param passed to onRender callback differentiates between an "update" and a "cascading-update".
8325
- var allNativeEvents=new Set();/**
8326
- * Mapping from registration name to event name
8327
- */var registrationNameDependencies={};/**
8328
- * Mapping from lowercase registration names to the properly cased version,
8329
- * used to warn in the case of missing event handlers. Available
8330
- * only in true.
8331
- * @type {Object}
8332
- */var possibleRegistrationNames={};// Trust the developer to only use possibleRegistrationNames in true
8333
- function registerTwoPhaseEvent(registrationName,dependencies){registerDirectEvent(registrationName,dependencies);registerDirectEvent(registrationName+'Capture',dependencies);}function registerDirectEvent(registrationName,dependencies){{if(registrationNameDependencies[registrationName]){error('EventRegistry: More than one plugin attempted to publish the same '+'registration name, `%s`.',registrationName);}}registrationNameDependencies[registrationName]=dependencies;{var lowerCasedName=registrationName.toLowerCase();possibleRegistrationNames[lowerCasedName]=registrationName;if(registrationName==='onDoubleClick'){possibleRegistrationNames.ondblclick=registrationName;}}for(var i=0;i<dependencies.length;i++){allNativeEvents.add(dependencies[i]);}}var canUseDOM=!!(typeof window!=='undefined'&&typeof window.document!=='undefined'&&typeof window.document.createElement!=='undefined');var hasOwnProperty=Object.prototype.hasOwnProperty;/*
8334
- * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
8335
- * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
8336
- *
8337
- * The functions in this module will throw an easier-to-understand,
8338
- * easier-to-debug exception with a clear errors message message explaining the
8339
- * problem. (Instead of a confusing exception thrown inside the implementation
8340
- * of the `value` object).
8341
- */// $FlowFixMe only called in DEV, so void return is not possible.
8602
+ var allNativeEvents=new Set();/**
8603
+ * Mapping from registration name to event name
8604
+ */var registrationNameDependencies={};/**
8605
+ * Mapping from lowercase registration names to the properly cased version,
8606
+ * used to warn in the case of missing event handlers. Available
8607
+ * only in true.
8608
+ * @type {Object}
8609
+ */var possibleRegistrationNames={};// Trust the developer to only use possibleRegistrationNames in true
8610
+ function registerTwoPhaseEvent(registrationName,dependencies){registerDirectEvent(registrationName,dependencies);registerDirectEvent(registrationName+'Capture',dependencies);}function registerDirectEvent(registrationName,dependencies){{if(registrationNameDependencies[registrationName]){error('EventRegistry: More than one plugin attempted to publish the same '+'registration name, `%s`.',registrationName);}}registrationNameDependencies[registrationName]=dependencies;{var lowerCasedName=registrationName.toLowerCase();possibleRegistrationNames[lowerCasedName]=registrationName;if(registrationName==='onDoubleClick'){possibleRegistrationNames.ondblclick=registrationName;}}for(var i=0;i<dependencies.length;i++){allNativeEvents.add(dependencies[i]);}}var canUseDOM=!!(typeof window!=='undefined'&&typeof window.document!=='undefined'&&typeof window.document.createElement!=='undefined');var hasOwnProperty=Object.prototype.hasOwnProperty;/*
8611
+ * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
8612
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
8613
+ *
8614
+ * The functions in this module will throw an easier-to-understand,
8615
+ * easier-to-debug exception with a clear errors message message explaining the
8616
+ * problem. (Instead of a confusing exception thrown inside the implementation
8617
+ * of the `value` object).
8618
+ */// $FlowFixMe only called in DEV, so void return is not possible.
8342
8619
  function typeName(value){{// toStringTag is needed for namespaced types like Temporal.Instant
8343
8620
  var hasToStringTag=typeof Symbol==='function'&&Symbol.toStringTag;var type=hasToStringTag&&value[Symbol.toStringTag]||value.constructor.name||'Object';return type;}}// $FlowFixMe only called in DEV, so void return is not possible.
8344
8621
  function willCoercionThrow(value){{try{testStringCoercion(value);return false;}catch(e){return true;}}}function testStringCoercion(value){// If you ended up here by following an exception call stack, here's what's
@@ -8395,8 +8672,7 @@ return true;case'boolean':{if(isCustomComponentTag){return false;}if(propertyInf
8395
8672
  // the `possibleStandardNames` module to ensure casing and incorrect
8396
8673
  // name warnings.
8397
8674
  var properties={};// These props are reserved by React. They shouldn't be written to the DOM.
8398
- var reservedProps=['children','dangerouslySetInnerHTML',// TODO: This prevents the assignment of defaultValue to regular
8399
- // elements (not just inputs). Now that ReactDOMInput assigns to the
8675
+ var reservedProps=['children','dangerouslySetInnerHTML',// elements (not just inputs). Now that ReactDOMInput assigns to the
8400
8676
  // defaultValue property -- do we need this?
8401
8677
  'defaultValue','defaultChecked','innerHTML','suppressContentEditableWarning','suppressHydrationWarning','style'];reservedProps.forEach(function(name){properties[name]=new PropertyInfoRecord(name,RESERVED,false,// mustUseProperty
8402
8678
  name,// attributeName
@@ -8424,17 +8700,14 @@ name,// attributeName
8424
8700
  null,// attributeNamespace
8425
8701
  false,// sanitizeURL
8426
8702
  false);});// These are HTML boolean attributes.
8427
- ['allowFullScreen','async',// Note: there is a special case that prevents it from being written to the DOM
8428
- // on the client side because the browsers are inconsistent. Instead we call focus().
8429
- 'autoFocus','autoPlay','controls','default','defer','disabled','disablePictureInPicture','disableRemotePlayback','formNoValidate','hidden','loop','noModule','noValidate','open','playsInline','readOnly','required','reversed','scoped','seamless',// Microdata
8430
- 'itemScope'].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEAN,false,// mustUseProperty
8703
+ ['allowFullScreen','async',// on the client side because the browsers are inconsistent. Instead we call focus().
8704
+ 'autoFocus','autoPlay','controls','default','defer','disabled','disablePictureInPicture','disableRemotePlayback','formNoValidate','hidden','loop','noModule','noValidate','open','playsInline','readOnly','required','reversed','scoped','seamless','itemScope'].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEAN,false,// mustUseProperty
8431
8705
  name.toLowerCase(),// attributeName
8432
8706
  null,// attributeNamespace
8433
8707
  false,// sanitizeURL
8434
8708
  false);});// These are the few React props that we set as DOM properties
8435
8709
  // rather than attributes. These are all booleans.
8436
- ['checked',// Note: `option.selected` is not updated if `select.multiple` is
8437
- // disabled with `removeAttribute`. We have special logic for handling this.
8710
+ ['checked',// disabled with `removeAttribute`. We have special logic for handling this.
8438
8711
  'multiple','muted','selected'// NOTE: if you add a camelCased prop to this list,
8439
8712
  // you'll need to set attributeName to name.toLowerCase()
8440
8713
  // instead in the assignment below.
@@ -8509,11 +8782,11 @@ true);});// and any newline or tab are filtered out as if they're not part of th
8509
8782
  // A C0 control is a code point in the range \u0000 NULL to \u001F
8510
8783
  // INFORMATION SEPARATOR ONE, inclusive:
8511
8784
  // https://infra.spec.whatwg.org/#c0-control-or-space
8512
- /* eslint-disable max-len */var 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;var didWarn=false;function sanitizeURL(url){{if(!didWarn&&isJavaScriptProtocol.test(url)){didWarn=true;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));}}}/**
8513
- * Get the value for a property on a node. Only used in DEV for SSR validation.
8514
- * The "expected" argument is used as a hint of what the expected value is.
8515
- * Some properties have multiple equivalent values.
8516
- */function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else {// This check protects multiple uses of `expected`, which is why the
8785
+ /* eslint-disable max-len */var 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;var didWarn=false;function sanitizeURL(url){{if(!didWarn&&isJavaScriptProtocol.test(url)){didWarn=true;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));}}}/**
8786
+ * Get the value for a property on a node. Only used in DEV for SSR validation.
8787
+ * The "expected" argument is used as a hint of what the expected value is.
8788
+ * Some properties have multiple equivalent values.
8789
+ */function getValueForProperty(node,name,expected,propertyInfo){{if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName];}else {// This check protects multiple uses of `expected`, which is why the
8517
8790
  // react-internal/safe-string-coercion rule is disabled in several spots
8518
8791
  // below.
8519
8792
  {checkAttributeStringCoercion(expected,name);}if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if
@@ -8530,17 +8803,17 @@ return expected;}// Even if this property uses a namespace we use getAttribute
8530
8803
  // To use getAttributeNS we need the local name which we don't have
8531
8804
  // in our config atm.
8532
8805
  stringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;// eslint-disable-next-line react-internal/safe-string-coercion
8533
- }else if(stringValue===''+expected){return expected;}else {return stringValue;}}}}/**
8534
- * Get the value for a attribute on a node. Only used in DEV for SSR validation.
8535
- * The third argument is used as a hint of what the expected value is. Some
8536
- * attributes have multiple equivalent values.
8537
- */function getValueForAttribute(node,name,expected,isCustomComponentTag){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);{checkAttributeStringCoercion(expected,name);}if(value===''+expected){return expected;}return value;}}/**
8538
- * Sets the value for a property on a node.
8539
- *
8540
- * @param {DOMElement} node
8541
- * @param {string} name
8542
- * @param {*} value
8543
- */function setValueForProperty(node,name,value,isCustomComponentTag){var propertyInfo=getPropertyInfo(name);if(shouldIgnoreAttribute(name,propertyInfo,isCustomComponentTag)){return;}if(shouldRemoveAttribute(name,value,propertyInfo,isCustomComponentTag)){value=null;}if(isCustomComponentTag||propertyInfo===null){if(isAttributeNameSafe(name)){var _attributeName=name;if(value===null){node.removeAttribute(_attributeName);}else {{checkAttributeStringCoercion(value,name);}node.setAttribute(_attributeName,''+value);}}return;}var mustUseProperty=propertyInfo.mustUseProperty;if(mustUseProperty){var propertyName=propertyInfo.propertyName;if(value===null){var type=propertyInfo.type;node[propertyName]=type===BOOLEAN?false:'';}else {// Contrary to `setAttribute`, object properties are properly
8806
+ }else if(stringValue===''+expected){return expected;}else {return stringValue;}}}}/**
8807
+ * Get the value for a attribute on a node. Only used in DEV for SSR validation.
8808
+ * The third argument is used as a hint of what the expected value is. Some
8809
+ * attributes have multiple equivalent values.
8810
+ */function getValueForAttribute(node,name,expected,isCustomComponentTag){{if(!isAttributeNameSafe(name)){return;}if(!node.hasAttribute(name)){return expected===undefined?undefined:null;}var value=node.getAttribute(name);{checkAttributeStringCoercion(expected,name);}if(value===''+expected){return expected;}return value;}}/**
8811
+ * Sets the value for a property on a node.
8812
+ *
8813
+ * @param {DOMElement} node
8814
+ * @param {string} name
8815
+ * @param {*} value
8816
+ */function setValueForProperty(node,name,value,isCustomComponentTag){var propertyInfo=getPropertyInfo(name);if(shouldIgnoreAttribute(name,propertyInfo,isCustomComponentTag)){return;}if(shouldRemoveAttribute(name,value,propertyInfo,isCustomComponentTag)){value=null;}if(isCustomComponentTag||propertyInfo===null){if(isAttributeNameSafe(name)){var _attributeName=name;if(value===null){node.removeAttribute(_attributeName);}else {{checkAttributeStringCoercion(value,name);}node.setAttribute(_attributeName,''+value);}}return;}var mustUseProperty=propertyInfo.mustUseProperty;if(mustUseProperty){var propertyName=propertyInfo.propertyName;if(value===null){var type=propertyInfo.type;node[propertyName]=type===BOOLEAN?false:'';}else {// Contrary to `setAttribute`, object properties are properly
8544
8817
  // `toString`ed by IE8/9.
8545
8818
  node[propertyName]=value;}return;}// The rest are treated as attributes with special cases.
8546
8819
  var attributeName=propertyInfo.attributeName,attributeNamespace=propertyInfo.attributeNamespace;if(value===null){node.removeAttribute(attributeName);}else {var _type=propertyInfo.type;var attributeValue;if(_type===BOOLEAN||_type===OVERLOADED_BOOLEAN&&value===true){// If attribute type is boolean, we know for sure it won't be an execution sink
@@ -8625,22 +8898,22 @@ if(node.hasOwnProperty(valueField)||typeof descriptor==='undefined'||typeof desc
8625
8898
  Object.defineProperty(node,valueField,{enumerable:descriptor.enumerable});var tracker={getValue:function(){return currentValue;},setValue:function(value){{checkFormFieldValueStringCoercion(value);}currentValue=''+value;},stopTracking:function(){detachTracker(node);delete node[valueField];}};return tracker;}function track(node){if(getTracker(node)){return;}// TODO: Once it's just Fiber we can move this to node._wrapperState
8626
8899
  node._valueTracker=trackValueOnNode(node);}function updateValueIfChanged(node){if(!node){return false;}var tracker=getTracker(node);// if there is no tracker at this point it's unlikely
8627
8900
  // that trying again will succeed
8628
- if(!tracker){return true;}var lastValue=tracker.getValue();var nextValue=getValueFromNode(node);if(nextValue!==lastValue){tracker.setValue(nextValue);return true;}return false;}function getActiveElement(doc){doc=doc||(typeof document!=='undefined'?document:undefined);if(typeof doc==='undefined'){return null;}try{return doc.activeElement||doc.body;}catch(e){return doc.body;}}var didWarnValueDefaultValue=false;var didWarnCheckedDefaultChecked=false;var didWarnControlledToUncontrolled=false;var didWarnUncontrolledToControlled=false;function isControlled(props){var usesChecked=props.type==='checkbox'||props.type==='radio';return usesChecked?props.checked!=null:props.value!=null;}/**
8629
- * Implements an <input> host component that allows setting these optional
8630
- * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
8631
- *
8632
- * If `checked` or `value` are not supplied (or null/undefined), user actions
8633
- * that affect the checked state or value will trigger updates to the element.
8634
- *
8635
- * If they are supplied (and not null/undefined), the rendered element will not
8636
- * trigger updates to the element. Instead, the props must change in order for
8637
- * the rendered element to be updated.
8638
- *
8639
- * The rendered element will be initialized as unchecked (or `defaultChecked`)
8640
- * with an empty value (or `defaultValue`).
8641
- *
8642
- * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
8643
- */function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}function initWrapperState(element,props){{checkControlledValueProps('input',props);if(props.checked!==undefined&&props.defaultChecked!==undefined&&!didWarnCheckedDefaultChecked){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);didWarnCheckedDefaultChecked=true;}if(props.value!==undefined&&props.defaultValue!==undefined&&!didWarnValueDefaultValue){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);didWarnValueDefaultValue=true;}}var node=element;var defaultValue=props.defaultValue==null?'':props.defaultValue;node._wrapperState={initialChecked:props.checked!=null?props.checked:props.defaultChecked,initialValue:getToStringValue(props.value!=null?props.value:defaultValue),controlled:isControlled(props)};}function updateChecked(element,props){var node=element;var checked=props.checked;if(checked!=null){setValueForProperty(node,'checked',checked,false);}}function updateWrapper(element,props){var node=element;{var controlled=isControlled(props);if(!node._wrapperState.controlled&&controlled&&!didWarnUncontrolledToControlled){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');didWarnUncontrolledToControlled=true;}if(node._wrapperState.controlled&&!controlled&&!didWarnControlledToUncontrolled){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');didWarnControlledToUncontrolled=true;}}updateChecked(element,props);var value=getToStringValue(props.value);var type=props.type;if(value!=null){if(type==='number'){if(value===0&&node.value===''||// We explicitly want to coerce to number here if possible.
8901
+ if(!tracker){return true;}var lastValue=tracker.getValue();var nextValue=getValueFromNode(node);if(nextValue!==lastValue){tracker.setValue(nextValue);return true;}return false;}function getActiveElement(doc){doc=doc||(typeof document!=='undefined'?document:undefined);if(typeof doc==='undefined'){return null;}try{return doc.activeElement||doc.body;}catch(e){return doc.body;}}var didWarnValueDefaultValue=false;var didWarnCheckedDefaultChecked=false;var didWarnControlledToUncontrolled=false;var didWarnUncontrolledToControlled=false;function isControlled(props){var usesChecked=props.type==='checkbox'||props.type==='radio';return usesChecked?props.checked!=null:props.value!=null;}/**
8902
+ * Implements an <input> host component that allows setting these optional
8903
+ * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
8904
+ *
8905
+ * If `checked` or `value` are not supplied (or null/undefined), user actions
8906
+ * that affect the checked state or value will trigger updates to the element.
8907
+ *
8908
+ * If they are supplied (and not null/undefined), the rendered element will not
8909
+ * trigger updates to the element. Instead, the props must change in order for
8910
+ * the rendered element to be updated.
8911
+ *
8912
+ * The rendered element will be initialized as unchecked (or `defaultChecked`)
8913
+ * with an empty value (or `defaultValue`).
8914
+ *
8915
+ * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
8916
+ */function getHostProps(element,props){var node=element;var checked=props.checked;var hostProps=assign({},props,{defaultChecked:undefined,defaultValue:undefined,value:undefined,checked:checked!=null?checked:node._wrapperState.initialChecked});return hostProps;}function initWrapperState(element,props){{checkControlledValueProps('input',props);if(props.checked!==undefined&&props.defaultChecked!==undefined&&!didWarnCheckedDefaultChecked){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);didWarnCheckedDefaultChecked=true;}if(props.value!==undefined&&props.defaultValue!==undefined&&!didWarnValueDefaultValue){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);didWarnValueDefaultValue=true;}}var node=element;var defaultValue=props.defaultValue==null?'':props.defaultValue;node._wrapperState={initialChecked:props.checked!=null?props.checked:props.defaultChecked,initialValue:getToStringValue(props.value!=null?props.value:defaultValue),controlled:isControlled(props)};}function updateChecked(element,props){var node=element;var checked=props.checked;if(checked!=null){setValueForProperty(node,'checked',checked,false);}}function updateWrapper(element,props){var node=element;{var controlled=isControlled(props);if(!node._wrapperState.controlled&&controlled&&!didWarnUncontrolledToControlled){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');didWarnUncontrolledToControlled=true;}if(node._wrapperState.controlled&&!controlled&&!didWarnControlledToUncontrolled){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');didWarnControlledToUncontrolled=true;}}updateChecked(element,props);var value=getToStringValue(props.value);var type=props.type;if(value!=null){if(type==='number'){if(value===0&&node.value===''||// We explicitly want to coerce to number here if possible.
8644
8917
  // eslint-disable-next-line
8645
8918
  node.value!=value){node.value=toString(value);}}else if(node.value!==toString(value)){node.value=toString(value);}}else if(type==='submit'||type==='reset'){// Submit/reset inputs need the attribute removed completely to avoid
8646
8919
  // blank-text buttons.
@@ -8702,48 +8975,48 @@ updateWrapper(otherNode,otherProps);}}}// In Chrome, assigning defaultValue to c
8702
8975
  //
8703
8976
  // https://github.com/facebook/react/issues/7253
8704
8977
  function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js
8705
- type!=='number'||getActiveElement(node.ownerDocument)!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}var didWarnSelectedSetOnOption=false;var didWarnInvalidChild=false;var didWarnInvalidInnerHTML=false;/**
8706
- * Implements an <option> host component that warns when `selected` is set.
8707
- */function validateProps(element,props){{// If a value is not provided, then the children must be simple.
8978
+ type!=='number'||getActiveElement(node.ownerDocument)!==node){if(value==null){node.defaultValue=toString(node._wrapperState.initialValue);}else if(node.defaultValue!==toString(value)){node.defaultValue=toString(value);}}}var didWarnSelectedSetOnOption=false;var didWarnInvalidChild=false;var didWarnInvalidInnerHTML=false;/**
8979
+ * Implements an <option> host component that warns when `selected` is set.
8980
+ */function validateProps(element,props){{// If a value is not provided, then the children must be simple.
8708
8981
  if(props.value==null){if(typeof props.children==='object'&&props.children!==null){React$1.Children.forEach(props.children,function(child){if(child==null){return;}if(typeof child==='string'||typeof child==='number'){return;}if(!didWarnInvalidChild){didWarnInvalidChild=true;error('Cannot infer the option value of complex children. '+'Pass a `value` prop or use a plain string as children to <option>.');}});}else if(props.dangerouslySetInnerHTML!=null){if(!didWarnInvalidInnerHTML){didWarnInvalidInnerHTML=true;error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows '+'which value should be selected.');}}}// TODO: Remove support for `selected` in <option>.
8709
8982
  if(props.selected!=null&&!didWarnSelectedSetOnOption){error('Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.');didWarnSelectedSetOnOption=true;}}}function postMountWrapper$1(element,props){// value="" should make a value attribute (#6219)
8710
8983
  if(props.value!=null){element.setAttribute('value',toString(getToStringValue(props.value)));}}var isArrayImpl=Array.isArray;// eslint-disable-next-line no-redeclare
8711
- function isArray(a){return isArrayImpl(a);}var didWarnValueDefaultValue$1;{didWarnValueDefaultValue$1=false;}function getDeclarationErrorAddendum(){var ownerName=getCurrentFiberOwnerNameInDevOrNull();if(ownerName){return '\n\nCheck the render method of `'+ownerName+'`.';}return '';}var valuePropNames=['value','defaultValue'];/**
8712
- * Validation function for `value` and `defaultValue`.
8713
- */function checkSelectPropTypes(props){{checkControlledValueProps('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var propNameIsArray=isArray(props[propName]);if(props.multiple&&!propNameIsArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&propNameIsArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}function updateOptions(node,multiple,propValue,setDefaultSelected){var options=node.options;if(multiple){var selectedValues=propValue;var selectedValue={};for(var i=0;i<selectedValues.length;i++){// Prefix to avoid chaos with special keys.
8984
+ function isArray(a){return isArrayImpl(a);}var didWarnValueDefaultValue$1;{didWarnValueDefaultValue$1=false;}function getDeclarationErrorAddendum(){var ownerName=getCurrentFiberOwnerNameInDevOrNull();if(ownerName){return '\n\nCheck the render method of `'+ownerName+'`.';}return '';}var valuePropNames=['value','defaultValue'];/**
8985
+ * Validation function for `value` and `defaultValue`.
8986
+ */function checkSelectPropTypes(props){{checkControlledValueProps('select',props);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}var propNameIsArray=isArray(props[propName]);if(props.multiple&&!propNameIsArray){error('The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum());}else if(!props.multiple&&propNameIsArray){error('The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum());}}}}function updateOptions(node,multiple,propValue,setDefaultSelected){var options=node.options;if(multiple){var selectedValues=propValue;var selectedValue={};for(var i=0;i<selectedValues.length;i++){// Prefix to avoid chaos with special keys.
8714
8987
  selectedValue['$'+selectedValues[i]]=true;}for(var _i=0;_i<options.length;_i++){var selected=selectedValue.hasOwnProperty('$'+options[_i].value);if(options[_i].selected!==selected){options[_i].selected=selected;}if(selected&&setDefaultSelected){options[_i].defaultSelected=true;}}}else {// Do not set `select.value` as exact behavior isn't consistent across all
8715
8988
  // browsers for all cases.
8716
- var _selectedValue=toString(getToStringValue(propValue));var defaultSelected=null;for(var _i2=0;_i2<options.length;_i2++){if(options[_i2].value===_selectedValue){options[_i2].selected=true;if(setDefaultSelected){options[_i2].defaultSelected=true;}return;}if(defaultSelected===null&&!options[_i2].disabled){defaultSelected=options[_i2];}}if(defaultSelected!==null){defaultSelected.selected=true;}}}/**
8717
- * Implements a <select> host component that allows optionally setting the
8718
- * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
8719
- * stringable. If `multiple` is true, the prop must be an array of stringables.
8720
- *
8721
- * If `value` is not supplied (or null/undefined), user actions that change the
8722
- * selected option will trigger updates to the rendered options.
8723
- *
8724
- * If it is supplied (and not null/undefined), the rendered options will not
8725
- * update in response to user actions. Instead, the `value` prop must change in
8726
- * order for the rendered options to update.
8727
- *
8728
- * If `defaultValue` is provided, any options with the supplied values will be
8729
- * selected.
8730
- */function getHostProps$1(element,props){return assign({},props,{value:undefined});}function initWrapperState$1(element,props){var node=element;{checkSelectPropTypes(props);}node._wrapperState={wasMultiple:!!props.multiple};{if(props.value!==undefined&&props.defaultValue!==undefined&&!didWarnValueDefaultValue$1){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');didWarnValueDefaultValue$1=true;}}}function postMountWrapper$2(element,props){var node=element;node.multiple=!!props.multiple;var value=props.value;if(value!=null){updateOptions(node,!!props.multiple,value,false);}else if(props.defaultValue!=null){updateOptions(node,!!props.multiple,props.defaultValue,true);}}function postUpdateWrapper(element,props){var node=element;var wasMultiple=node._wrapperState.wasMultiple;node._wrapperState.wasMultiple=!!props.multiple;var value=props.value;if(value!=null){updateOptions(node,!!props.multiple,value,false);}else if(wasMultiple!==!!props.multiple){// For simplicity, reapply `defaultValue` if `multiple` is toggled.
8989
+ var _selectedValue=toString(getToStringValue(propValue));var defaultSelected=null;for(var _i2=0;_i2<options.length;_i2++){if(options[_i2].value===_selectedValue){options[_i2].selected=true;if(setDefaultSelected){options[_i2].defaultSelected=true;}return;}if(defaultSelected===null&&!options[_i2].disabled){defaultSelected=options[_i2];}}if(defaultSelected!==null){defaultSelected.selected=true;}}}/**
8990
+ * Implements a <select> host component that allows optionally setting the
8991
+ * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
8992
+ * stringable. If `multiple` is true, the prop must be an array of stringables.
8993
+ *
8994
+ * If `value` is not supplied (or null/undefined), user actions that change the
8995
+ * selected option will trigger updates to the rendered options.
8996
+ *
8997
+ * If it is supplied (and not null/undefined), the rendered options will not
8998
+ * update in response to user actions. Instead, the `value` prop must change in
8999
+ * order for the rendered options to update.
9000
+ *
9001
+ * If `defaultValue` is provided, any options with the supplied values will be
9002
+ * selected.
9003
+ */function getHostProps$1(element,props){return assign({},props,{value:undefined});}function initWrapperState$1(element,props){var node=element;{checkSelectPropTypes(props);}node._wrapperState={wasMultiple:!!props.multiple};{if(props.value!==undefined&&props.defaultValue!==undefined&&!didWarnValueDefaultValue$1){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');didWarnValueDefaultValue$1=true;}}}function postMountWrapper$2(element,props){var node=element;node.multiple=!!props.multiple;var value=props.value;if(value!=null){updateOptions(node,!!props.multiple,value,false);}else if(props.defaultValue!=null){updateOptions(node,!!props.multiple,props.defaultValue,true);}}function postUpdateWrapper(element,props){var node=element;var wasMultiple=node._wrapperState.wasMultiple;node._wrapperState.wasMultiple=!!props.multiple;var value=props.value;if(value!=null){updateOptions(node,!!props.multiple,value,false);}else if(wasMultiple!==!!props.multiple){// For simplicity, reapply `defaultValue` if `multiple` is toggled.
8731
9004
  if(props.defaultValue!=null){updateOptions(node,!!props.multiple,props.defaultValue,true);}else {// Revert the select back to its default unselected state.
8732
- updateOptions(node,!!props.multiple,props.multiple?[]:'',false);}}}function restoreControlledState$1(element,props){var node=element;var value=props.value;if(value!=null){updateOptions(node,!!props.multiple,value,false);}}var didWarnValDefaultVal=false;/**
8733
- * Implements a <textarea> host component that allows setting `value`, and
8734
- * `defaultValue`. This differs from the traditional DOM API because value is
8735
- * usually set as PCDATA children.
8736
- *
8737
- * If `value` is not supplied (or null/undefined), user actions that affect the
8738
- * value will trigger updates to the element.
8739
- *
8740
- * If `value` is supplied (and not null/undefined), the rendered element will
8741
- * not trigger updates to the element. Instead, the `value` prop must change in
8742
- * order for the rendered element to be updated.
8743
- *
8744
- * The rendered element will be initialized with an empty value, the prop
8745
- * `defaultValue` if specified, or the children content (deprecated).
8746
- */function getHostProps$2(element,props){var node=element;if(props.dangerouslySetInnerHTML!=null){throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');}// Always set children to the same thing. In IE9, the selection range will
9005
+ updateOptions(node,!!props.multiple,props.multiple?[]:'',false);}}}function restoreControlledState$1(element,props){var node=element;var value=props.value;if(value!=null){updateOptions(node,!!props.multiple,value,false);}}var didWarnValDefaultVal=false;/**
9006
+ * Implements a <textarea> host component that allows setting `value`, and
9007
+ * `defaultValue`. This differs from the traditional DOM API because value is
9008
+ * usually set as PCDATA children.
9009
+ *
9010
+ * If `value` is not supplied (or null/undefined), user actions that affect the
9011
+ * value will trigger updates to the element.
9012
+ *
9013
+ * If `value` is supplied (and not null/undefined), the rendered element will
9014
+ * not trigger updates to the element. Instead, the `value` prop must change in
9015
+ * order for the rendered element to be updated.
9016
+ *
9017
+ * The rendered element will be initialized with an empty value, the prop
9018
+ * `defaultValue` if specified, or the children content (deprecated).
9019
+ */function getHostProps$2(element,props){var node=element;if(props.dangerouslySetInnerHTML!=null){throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');}// Always set children to the same thing. In IE9, the selection range will
8747
9020
  // get reset if `textContent` is mutated. We could add a check in setTextContent
8748
9021
  // to only set the value if/when the value differs from the node value (which would
8749
9022
  // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
@@ -8764,51 +9037,51 @@ updateWrapper$1(element,props);}var HTML_NAMESPACE='http://www.w3.org/1999/xhtml
8764
9037
  function getIntrinsicNamespace(type){switch(type){case'svg':return SVG_NAMESPACE;case'math':return MATH_NAMESPACE;default:return HTML_NAMESPACE;}}function getChildNamespace(parentNamespace,type){if(parentNamespace==null||parentNamespace===HTML_NAMESPACE){// No (or default) parent namespace: potential entry point.
8765
9038
  return getIntrinsicNamespace(type);}if(parentNamespace===SVG_NAMESPACE&&type==='foreignObject'){// We're leaving SVG.
8766
9039
  return HTML_NAMESPACE;}// By default, pass namespace below.
8767
- return parentNamespace;}/* globals MSApp *//**
8768
- * Create a function which has 'unsafe' privileges (required by windows8 apps)
8769
- */var createMicrosoftUnsafeLocalFunction=function(func){if(typeof MSApp!=='undefined'&&MSApp.execUnsafeLocalFunction){return function(arg0,arg1,arg2,arg3){MSApp.execUnsafeLocalFunction(function(){return func(arg0,arg1,arg2,arg3);});};}else {return func;}};var reusableSVGContainer;/**
8770
- * Set the innerHTML property of a node
8771
- *
8772
- * @param {DOMElement} node
8773
- * @param {string} html
8774
- * @internal
8775
- */var setInnerHTML=createMicrosoftUnsafeLocalFunction(function(node,html){if(node.namespaceURI===SVG_NAMESPACE){if(!('innerHTML'in node)){// IE does not have innerHTML for SVG nodes, so instead we inject the
9040
+ return parentNamespace;}/* globals MSApp *//**
9041
+ * Create a function which has 'unsafe' privileges (required by windows8 apps)
9042
+ */var createMicrosoftUnsafeLocalFunction=function(func){if(typeof MSApp!=='undefined'&&MSApp.execUnsafeLocalFunction){return function(arg0,arg1,arg2,arg3){MSApp.execUnsafeLocalFunction(function(){return func(arg0,arg1,arg2,arg3);});};}else {return func;}};var reusableSVGContainer;/**
9043
+ * Set the innerHTML property of a node
9044
+ *
9045
+ * @param {DOMElement} node
9046
+ * @param {string} html
9047
+ * @internal
9048
+ */var setInnerHTML=createMicrosoftUnsafeLocalFunction(function(node,html){if(node.namespaceURI===SVG_NAMESPACE){if(!('innerHTML'in node)){// IE does not have innerHTML for SVG nodes, so instead we inject the
8776
9049
  // new markup in a temp node and then move the child nodes across into
8777
9050
  // the target node
8778
- reusableSVGContainer=reusableSVGContainer||document.createElement('div');reusableSVGContainer.innerHTML='<svg>'+html.valueOf().toString()+'</svg>';var svgNode=reusableSVGContainer.firstChild;while(node.firstChild){node.removeChild(node.firstChild);}while(svgNode.firstChild){node.appendChild(svgNode.firstChild);}return;}}node.innerHTML=html;});/**
8779
- * HTML nodeType values that represent the type of the node
8780
- */var ELEMENT_NODE=1;var TEXT_NODE=3;var COMMENT_NODE=8;var DOCUMENT_NODE=9;var DOCUMENT_FRAGMENT_NODE=11;/**
8781
- * Set the textContent property of a node. For text updates, it's faster
8782
- * to set the `nodeValue` of the Text node directly instead of using
8783
- * `.textContent` which will remove the existing node and create a new one.
8784
- *
8785
- * @param {DOMElement} node
8786
- * @param {string} text
8787
- * @internal
8788
- */var setTextContent=function(node,text){if(text){var firstChild=node.firstChild;if(firstChild&&firstChild===node.lastChild&&firstChild.nodeType===TEXT_NODE){firstChild.nodeValue=text;return;}}node.textContent=text;};// List derived from Gecko source code:
9051
+ reusableSVGContainer=reusableSVGContainer||document.createElement('div');reusableSVGContainer.innerHTML='<svg>'+html.valueOf().toString()+'</svg>';var svgNode=reusableSVGContainer.firstChild;while(node.firstChild){node.removeChild(node.firstChild);}while(svgNode.firstChild){node.appendChild(svgNode.firstChild);}return;}}node.innerHTML=html;});/**
9052
+ * HTML nodeType values that represent the type of the node
9053
+ */var ELEMENT_NODE=1;var TEXT_NODE=3;var COMMENT_NODE=8;var DOCUMENT_NODE=9;var DOCUMENT_FRAGMENT_NODE=11;/**
9054
+ * Set the textContent property of a node. For text updates, it's faster
9055
+ * to set the `nodeValue` of the Text node directly instead of using
9056
+ * `.textContent` which will remove the existing node and create a new one.
9057
+ *
9058
+ * @param {DOMElement} node
9059
+ * @param {string} text
9060
+ * @internal
9061
+ */var setTextContent=function(node,text){if(text){var firstChild=node.firstChild;if(firstChild&&firstChild===node.lastChild&&firstChild.nodeType===TEXT_NODE){firstChild.nodeValue=text;return;}}node.textContent=text;};// List derived from Gecko source code:
8789
9062
  // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
8790
- var shorthandToLonghand={animation:['animationDelay','animationDirection','animationDuration','animationFillMode','animationIterationCount','animationName','animationPlayState','animationTimingFunction'],background:['backgroundAttachment','backgroundClip','backgroundColor','backgroundImage','backgroundOrigin','backgroundPositionX','backgroundPositionY','backgroundRepeat','backgroundSize'],backgroundPosition:['backgroundPositionX','backgroundPositionY'],border:['borderBottomColor','borderBottomStyle','borderBottomWidth','borderImageOutset','borderImageRepeat','borderImageSlice','borderImageSource','borderImageWidth','borderLeftColor','borderLeftStyle','borderLeftWidth','borderRightColor','borderRightStyle','borderRightWidth','borderTopColor','borderTopStyle','borderTopWidth'],borderBlockEnd:['borderBlockEndColor','borderBlockEndStyle','borderBlockEndWidth'],borderBlockStart:['borderBlockStartColor','borderBlockStartStyle','borderBlockStartWidth'],borderBottom:['borderBottomColor','borderBottomStyle','borderBottomWidth'],borderColor:['borderBottomColor','borderLeftColor','borderRightColor','borderTopColor'],borderImage:['borderImageOutset','borderImageRepeat','borderImageSlice','borderImageSource','borderImageWidth'],borderInlineEnd:['borderInlineEndColor','borderInlineEndStyle','borderInlineEndWidth'],borderInlineStart:['borderInlineStartColor','borderInlineStartStyle','borderInlineStartWidth'],borderLeft:['borderLeftColor','borderLeftStyle','borderLeftWidth'],borderRadius:['borderBottomLeftRadius','borderBottomRightRadius','borderTopLeftRadius','borderTopRightRadius'],borderRight:['borderRightColor','borderRightStyle','borderRightWidth'],borderStyle:['borderBottomStyle','borderLeftStyle','borderRightStyle','borderTopStyle'],borderTop:['borderTopColor','borderTopStyle','borderTopWidth'],borderWidth:['borderBottomWidth','borderLeftWidth','borderRightWidth','borderTopWidth'],columnRule:['columnRuleColor','columnRuleStyle','columnRuleWidth'],columns:['columnCount','columnWidth'],flex:['flexBasis','flexGrow','flexShrink'],flexFlow:['flexDirection','flexWrap'],font:['fontFamily','fontFeatureSettings','fontKerning','fontLanguageOverride','fontSize','fontSizeAdjust','fontStretch','fontStyle','fontVariant','fontVariantAlternates','fontVariantCaps','fontVariantEastAsian','fontVariantLigatures','fontVariantNumeric','fontVariantPosition','fontWeight','lineHeight'],fontVariant:['fontVariantAlternates','fontVariantCaps','fontVariantEastAsian','fontVariantLigatures','fontVariantNumeric','fontVariantPosition'],gap:['columnGap','rowGap'],grid:['gridAutoColumns','gridAutoFlow','gridAutoRows','gridTemplateAreas','gridTemplateColumns','gridTemplateRows'],gridArea:['gridColumnEnd','gridColumnStart','gridRowEnd','gridRowStart'],gridColumn:['gridColumnEnd','gridColumnStart'],gridColumnGap:['columnGap'],gridGap:['columnGap','rowGap'],gridRow:['gridRowEnd','gridRowStart'],gridRowGap:['rowGap'],gridTemplate:['gridTemplateAreas','gridTemplateColumns','gridTemplateRows'],listStyle:['listStyleImage','listStylePosition','listStyleType'],margin:['marginBottom','marginLeft','marginRight','marginTop'],marker:['markerEnd','markerMid','markerStart'],mask:['maskClip','maskComposite','maskImage','maskMode','maskOrigin','maskPositionX','maskPositionY','maskRepeat','maskSize'],maskPosition:['maskPositionX','maskPositionY'],outline:['outlineColor','outlineStyle','outlineWidth'],overflow:['overflowX','overflowY'],padding:['paddingBottom','paddingLeft','paddingRight','paddingTop'],placeContent:['alignContent','justifyContent'],placeItems:['alignItems','justifyItems'],placeSelf:['alignSelf','justifySelf'],textDecoration:['textDecorationColor','textDecorationLine','textDecorationStyle'],textEmphasis:['textEmphasisColor','textEmphasisStyle'],transition:['transitionDelay','transitionDuration','transitionProperty','transitionTimingFunction'],wordWrap:['overflowWrap']};/**
8791
- * CSS properties which accept numbers but are not in units of "px".
8792
- */var isUnitlessNumber={animationIterationCount:true,aspectRatio:true,borderImageOutset:true,borderImageSlice:true,borderImageWidth:true,boxFlex:true,boxFlexGroup:true,boxOrdinalGroup:true,columnCount:true,columns:true,flex:true,flexGrow:true,flexPositive:true,flexShrink:true,flexNegative:true,flexOrder:true,gridArea:true,gridRow:true,gridRowEnd:true,gridRowSpan:true,gridRowStart:true,gridColumn:true,gridColumnEnd:true,gridColumnSpan:true,gridColumnStart:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,tabSize:true,widows:true,zIndex:true,zoom:true,// SVG-related properties
8793
- fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeDasharray:true,strokeDashoffset:true,strokeMiterlimit:true,strokeOpacity:true,strokeWidth:true};/**
8794
- * @param {string} prefix vendor-specific prefix, eg: Webkit
8795
- * @param {string} key style name, eg: transitionDuration
8796
- * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
8797
- * WebkitTransitionDuration
8798
- */function prefixKey(prefix,key){return prefix+key.charAt(0).toUpperCase()+key.substring(1);}/**
8799
- * Support style names that may come passed in prefixed by adding permutations
8800
- * of vendor prefixes.
8801
- */var prefixes=['Webkit','ms','Moz','O'];// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
9063
+ var shorthandToLonghand={animation:['animationDelay','animationDirection','animationDuration','animationFillMode','animationIterationCount','animationName','animationPlayState','animationTimingFunction'],background:['backgroundAttachment','backgroundClip','backgroundColor','backgroundImage','backgroundOrigin','backgroundPositionX','backgroundPositionY','backgroundRepeat','backgroundSize'],backgroundPosition:['backgroundPositionX','backgroundPositionY'],border:['borderBottomColor','borderBottomStyle','borderBottomWidth','borderImageOutset','borderImageRepeat','borderImageSlice','borderImageSource','borderImageWidth','borderLeftColor','borderLeftStyle','borderLeftWidth','borderRightColor','borderRightStyle','borderRightWidth','borderTopColor','borderTopStyle','borderTopWidth'],borderBlockEnd:['borderBlockEndColor','borderBlockEndStyle','borderBlockEndWidth'],borderBlockStart:['borderBlockStartColor','borderBlockStartStyle','borderBlockStartWidth'],borderBottom:['borderBottomColor','borderBottomStyle','borderBottomWidth'],borderColor:['borderBottomColor','borderLeftColor','borderRightColor','borderTopColor'],borderImage:['borderImageOutset','borderImageRepeat','borderImageSlice','borderImageSource','borderImageWidth'],borderInlineEnd:['borderInlineEndColor','borderInlineEndStyle','borderInlineEndWidth'],borderInlineStart:['borderInlineStartColor','borderInlineStartStyle','borderInlineStartWidth'],borderLeft:['borderLeftColor','borderLeftStyle','borderLeftWidth'],borderRadius:['borderBottomLeftRadius','borderBottomRightRadius','borderTopLeftRadius','borderTopRightRadius'],borderRight:['borderRightColor','borderRightStyle','borderRightWidth'],borderStyle:['borderBottomStyle','borderLeftStyle','borderRightStyle','borderTopStyle'],borderTop:['borderTopColor','borderTopStyle','borderTopWidth'],borderWidth:['borderBottomWidth','borderLeftWidth','borderRightWidth','borderTopWidth'],columnRule:['columnRuleColor','columnRuleStyle','columnRuleWidth'],columns:['columnCount','columnWidth'],flex:['flexBasis','flexGrow','flexShrink'],flexFlow:['flexDirection','flexWrap'],font:['fontFamily','fontFeatureSettings','fontKerning','fontLanguageOverride','fontSize','fontSizeAdjust','fontStretch','fontStyle','fontVariant','fontVariantAlternates','fontVariantCaps','fontVariantEastAsian','fontVariantLigatures','fontVariantNumeric','fontVariantPosition','fontWeight','lineHeight'],fontVariant:['fontVariantAlternates','fontVariantCaps','fontVariantEastAsian','fontVariantLigatures','fontVariantNumeric','fontVariantPosition'],gap:['columnGap','rowGap'],grid:['gridAutoColumns','gridAutoFlow','gridAutoRows','gridTemplateAreas','gridTemplateColumns','gridTemplateRows'],gridArea:['gridColumnEnd','gridColumnStart','gridRowEnd','gridRowStart'],gridColumn:['gridColumnEnd','gridColumnStart'],gridColumnGap:['columnGap'],gridGap:['columnGap','rowGap'],gridRow:['gridRowEnd','gridRowStart'],gridRowGap:['rowGap'],gridTemplate:['gridTemplateAreas','gridTemplateColumns','gridTemplateRows'],listStyle:['listStyleImage','listStylePosition','listStyleType'],margin:['marginBottom','marginLeft','marginRight','marginTop'],marker:['markerEnd','markerMid','markerStart'],mask:['maskClip','maskComposite','maskImage','maskMode','maskOrigin','maskPositionX','maskPositionY','maskRepeat','maskSize'],maskPosition:['maskPositionX','maskPositionY'],outline:['outlineColor','outlineStyle','outlineWidth'],overflow:['overflowX','overflowY'],padding:['paddingBottom','paddingLeft','paddingRight','paddingTop'],placeContent:['alignContent','justifyContent'],placeItems:['alignItems','justifyItems'],placeSelf:['alignSelf','justifySelf'],textDecoration:['textDecorationColor','textDecorationLine','textDecorationStyle'],textEmphasis:['textEmphasisColor','textEmphasisStyle'],transition:['transitionDelay','transitionDuration','transitionProperty','transitionTimingFunction'],wordWrap:['overflowWrap']};/**
9064
+ * CSS properties which accept numbers but are not in units of "px".
9065
+ */var isUnitlessNumber={animationIterationCount:true,aspectRatio:true,borderImageOutset:true,borderImageSlice:true,borderImageWidth:true,boxFlex:true,boxFlexGroup:true,boxOrdinalGroup:true,columnCount:true,columns:true,flex:true,flexGrow:true,flexPositive:true,flexShrink:true,flexNegative:true,flexOrder:true,gridArea:true,gridRow:true,gridRowEnd:true,gridRowSpan:true,gridRowStart:true,gridColumn:true,gridColumnEnd:true,gridColumnSpan:true,gridColumnStart:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,tabSize:true,widows:true,zIndex:true,zoom:true,// SVG-related properties
9066
+ fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeDasharray:true,strokeDashoffset:true,strokeMiterlimit:true,strokeOpacity:true,strokeWidth:true};/**
9067
+ * @param {string} prefix vendor-specific prefix, eg: Webkit
9068
+ * @param {string} key style name, eg: transitionDuration
9069
+ * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
9070
+ * WebkitTransitionDuration
9071
+ */function prefixKey(prefix,key){return prefix+key.charAt(0).toUpperCase()+key.substring(1);}/**
9072
+ * Support style names that may come passed in prefixed by adding permutations
9073
+ * of vendor prefixes.
9074
+ */var prefixes=['Webkit','ms','Moz','O'];// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
8802
9075
  // infinite loop, because it iterates over the newly added props too.
8803
- Object.keys(isUnitlessNumber).forEach(function(prop){prefixes.forEach(function(prefix){isUnitlessNumber[prefixKey(prefix,prop)]=isUnitlessNumber[prop];});});/**
8804
- * Convert a value into the proper css writable value. The style name `name`
8805
- * should be logical (no hyphens), as specified
8806
- * in `CSSProperty.isUnitlessNumber`.
8807
- *
8808
- * @param {string} name CSS property name such as `topMargin`.
8809
- * @param {*} value CSS property value such as `10px`.
8810
- * @return {string} Normalized style value with dimensions applied.
8811
- */function dangerousStyleValue(name,value,isCustomProperty){// Note that we've removed escapeTextForBrowser() calls here since the
9076
+ Object.keys(isUnitlessNumber).forEach(function(prop){prefixes.forEach(function(prefix){isUnitlessNumber[prefixKey(prefix,prop)]=isUnitlessNumber[prop];});});/**
9077
+ * Convert a value into the proper css writable value. The style name `name`
9078
+ * should be logical (no hyphens), as specified
9079
+ * in `CSSProperty.isUnitlessNumber`.
9080
+ *
9081
+ * @param {string} name CSS property name such as `topMargin`.
9082
+ * @param {*} value CSS property value such as `10px`.
9083
+ * @return {string} Normalized style value with dimensions applied.
9084
+ */function dangerousStyleValue(name,value,isCustomProperty){// Note that we've removed escapeTextForBrowser() calls here since the
8812
9085
  // whole string will be escaped when the attribute is injected into
8813
9086
  // the markup. If you provide unsafe user data here they can inject
8814
9087
  // arbitrary CSS which may be problematic (I couldn't repro this):
@@ -8818,57 +9091,57 @@ Object.keys(isUnitlessNumber).forEach(function(prop){prefixes.forEach(function(p
8818
9091
  // which has lead to a greater discussion about how we're going to
8819
9092
  // trust URLs moving forward. See #2115901
8820
9093
  var isEmpty=value==null||typeof value==='boolean'||value==='';if(isEmpty){return '';}if(!isCustomProperty&&typeof value==='number'&&value!==0&&!(isUnitlessNumber.hasOwnProperty(name)&&isUnitlessNumber[name])){return value+'px';// Presumes implicit 'px' suffix for unitless numbers
8821
- }{checkCSSPropertyStringCoercion(value,name);}return (''+value).trim();}var uppercasePattern=/([A-Z])/g;var msPattern=/^ms-/;/**
8822
- * Hyphenates a camelcased CSS property name, for example:
8823
- *
8824
- * > hyphenateStyleName('backgroundColor')
8825
- * < "background-color"
8826
- * > hyphenateStyleName('MozTransition')
8827
- * < "-moz-transition"
8828
- * > hyphenateStyleName('msTransition')
8829
- * < "-ms-transition"
8830
- *
8831
- * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
8832
- * is converted to `-ms-`.
8833
- */function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}var warnValidStyle=function(){};{// 'msTransform' is correct, but the other prefixes should be capitalized
9094
+ }{checkCSSPropertyStringCoercion(value,name);}return (''+value).trim();}var uppercasePattern=/([A-Z])/g;var msPattern=/^ms-/;/**
9095
+ * Hyphenates a camelcased CSS property name, for example:
9096
+ *
9097
+ * > hyphenateStyleName('backgroundColor')
9098
+ * < "background-color"
9099
+ * > hyphenateStyleName('MozTransition')
9100
+ * < "-moz-transition"
9101
+ * > hyphenateStyleName('msTransition')
9102
+ * < "-ms-transition"
9103
+ *
9104
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
9105
+ * is converted to `-ms-`.
9106
+ */function hyphenateStyleName(name){return name.replace(uppercasePattern,'-$1').toLowerCase().replace(msPattern,'-ms-');}var warnValidStyle=function(){};{// 'msTransform' is correct, but the other prefixes should be capitalized
8834
9107
  var badVendoredStyleNamePattern=/^(?:webkit|moz|o)[A-Z]/;var msPattern$1=/^-ms-/;var hyphenPattern=/-(.)/g;// style values shouldn't contain a semicolon
8835
9108
  var badStyleValueWithSemicolonPattern=/;\s*$/;var warnedStyleNames={};var warnedStyleValues={};var warnedForNaNValue=false;var warnedForInfinityValue=false;var camelize=function(string){return string.replace(hyphenPattern,function(_,character){return character.toUpperCase();});};var warnHyphenatedStyleName=function(name){if(warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]){return;}warnedStyleNames[name]=true;error('Unsupported style property %s. Did you mean %s?',name,// As Andi Smith suggests
8836
9109
  // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
8837
9110
  // is converted to lowercase `ms`.
8838
- camelize(name.replace(msPattern$1,'ms-')));};var warnBadVendoredStyleName=function(name){if(warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]){return;}warnedStyleNames[name]=true;error('Unsupported vendor-prefixed style property %s. Did you mean %s?',name,name.charAt(0).toUpperCase()+name.slice(1));};var warnStyleValueWithSemicolon=function(name,value){if(warnedStyleValues.hasOwnProperty(value)&&warnedStyleValues[value]){return;}warnedStyleValues[value]=true;error("Style property values shouldn't contain a semicolon. "+'Try "%s: %s" instead.',name,value.replace(badStyleValueWithSemicolonPattern,''));};var warnStyleValueIsNaN=function(name,value){if(warnedForNaNValue){return;}warnedForNaNValue=true;error('`NaN` is an invalid value for the `%s` css style property.',name);};var warnStyleValueIsInfinity=function(name,value){if(warnedForInfinityValue){return;}warnedForInfinityValue=true;error('`Infinity` is an invalid value for the `%s` css style property.',name);};warnValidStyle=function(name,value){if(name.indexOf('-')>-1){warnHyphenatedStyleName(name);}else if(badVendoredStyleNamePattern.test(name)){warnBadVendoredStyleName(name);}else if(badStyleValueWithSemicolonPattern.test(value)){warnStyleValueWithSemicolon(name,value);}if(typeof value==='number'){if(isNaN(value)){warnStyleValueIsNaN(name,value);}else if(!isFinite(value)){warnStyleValueIsInfinity(name,value);}}};}var warnValidStyle$1=warnValidStyle;/**
8839
- * Operations for dealing with CSS properties.
8840
- *//**
8841
- * This creates a string that is expected to be equivalent to the style
8842
- * attribute generated by server-side rendering. It by-passes warnings and
8843
- * security checks so it's not safe to use this value for anything other than
8844
- * comparison. It is only used in DEV for SSR validation.
8845
- */function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+(isCustomProperty?styleName:hyphenateStyleName(styleName))+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}/**
8846
- * Sets the value for multiple styles on a node. If a value is specified as
8847
- * '' (empty string), the corresponding style property will be unset.
8848
- *
8849
- * @param {DOMElement} node
8850
- * @param {object} styles
8851
- */function setValueForStyles(node,styles){var style=node.style;for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var isCustomProperty=styleName.indexOf('--')===0;{if(!isCustomProperty){warnValidStyle$1(styleName,styles[styleName]);}}var styleValue=dangerousStyleValue(styleName,styles[styleName],isCustomProperty);if(styleName==='float'){styleName='cssFloat';}if(isCustomProperty){style.setProperty(styleName,styleValue);}else {style[styleName]=styleValue;}}}function isValueEmpty(value){return value==null||typeof value==='boolean'||value==='';}/**
8852
- * Given {color: 'red', overflow: 'hidden'} returns {
8853
- * color: 'color',
8854
- * overflowX: 'overflow',
8855
- * overflowY: 'overflow',
8856
- * }. This can be read as "the overflowY property was set by the overflow
8857
- * shorthand". That is, the values are the property that each was derived from.
8858
- */function expandShorthandMap(styles){var expanded={};for(var key in styles){var longhands=shorthandToLonghand[key]||[key];for(var i=0;i<longhands.length;i++){expanded[longhands[i]]=key;}}return expanded;}/**
8859
- * When mixing shorthand and longhand property names, we warn during updates if
8860
- * we expect an incorrect result to occur. In particular, we warn for:
8861
- *
8862
- * Updating a shorthand property (longhand gets overwritten):
8863
- * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
8864
- * becomes .style.font = 'baz'
8865
- * Removing a shorthand property (longhand gets lost too):
8866
- * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
8867
- * becomes .style.font = ''
8868
- * Removing a longhand property (should revert to shorthand; doesn't):
8869
- * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
8870
- * becomes .style.fontVariant = ''
8871
- */function validateShorthandPropertyCollisionInDev(styleUpdates,nextStyles){{if(!nextStyles){return;}var expandedUpdates=expandShorthandMap(styleUpdates);var expandedStyles=expandShorthandMap(nextStyles);var warnedAbout={};for(var key in expandedUpdates){var originalKey=expandedUpdates[key];var correctOriginalKey=expandedStyles[key];if(correctOriginalKey&&originalKey!==correctOriginalKey){var warningKey=originalKey+','+correctOriginalKey;if(warnedAbout[warningKey]){continue;}warnedAbout[warningKey]=true;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);}}}}// For HTML, certain tags should omit their close tag. We keep a list for
9111
+ camelize(name.replace(msPattern$1,'ms-')));};var warnBadVendoredStyleName=function(name){if(warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]){return;}warnedStyleNames[name]=true;error('Unsupported vendor-prefixed style property %s. Did you mean %s?',name,name.charAt(0).toUpperCase()+name.slice(1));};var warnStyleValueWithSemicolon=function(name,value){if(warnedStyleValues.hasOwnProperty(value)&&warnedStyleValues[value]){return;}warnedStyleValues[value]=true;error("Style property values shouldn't contain a semicolon. "+'Try "%s: %s" instead.',name,value.replace(badStyleValueWithSemicolonPattern,''));};var warnStyleValueIsNaN=function(name,value){if(warnedForNaNValue){return;}warnedForNaNValue=true;error('`NaN` is an invalid value for the `%s` css style property.',name);};var warnStyleValueIsInfinity=function(name,value){if(warnedForInfinityValue){return;}warnedForInfinityValue=true;error('`Infinity` is an invalid value for the `%s` css style property.',name);};warnValidStyle=function(name,value){if(name.indexOf('-')>-1){warnHyphenatedStyleName(name);}else if(badVendoredStyleNamePattern.test(name)){warnBadVendoredStyleName(name);}else if(badStyleValueWithSemicolonPattern.test(value)){warnStyleValueWithSemicolon(name,value);}if(typeof value==='number'){if(isNaN(value)){warnStyleValueIsNaN(name,value);}else if(!isFinite(value)){warnStyleValueIsInfinity(name,value);}}};}var warnValidStyle$1=warnValidStyle;/**
9112
+ * Operations for dealing with CSS properties.
9113
+ *//**
9114
+ * This creates a string that is expected to be equivalent to the style
9115
+ * attribute generated by server-side rendering. It by-passes warnings and
9116
+ * security checks so it's not safe to use this value for anything other than
9117
+ * comparison. It is only used in DEV for SSR validation.
9118
+ */function createDangerousStringForStyles(styles){{var serialized='';var delimiter='';for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var styleValue=styles[styleName];if(styleValue!=null){var isCustomProperty=styleName.indexOf('--')===0;serialized+=delimiter+(isCustomProperty?styleName:hyphenateStyleName(styleName))+':';serialized+=dangerousStyleValue(styleName,styleValue,isCustomProperty);delimiter=';';}}return serialized||null;}}/**
9119
+ * Sets the value for multiple styles on a node. If a value is specified as
9120
+ * '' (empty string), the corresponding style property will be unset.
9121
+ *
9122
+ * @param {DOMElement} node
9123
+ * @param {object} styles
9124
+ */function setValueForStyles(node,styles){var style=node.style;for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var isCustomProperty=styleName.indexOf('--')===0;{if(!isCustomProperty){warnValidStyle$1(styleName,styles[styleName]);}}var styleValue=dangerousStyleValue(styleName,styles[styleName],isCustomProperty);if(styleName==='float'){styleName='cssFloat';}if(isCustomProperty){style.setProperty(styleName,styleValue);}else {style[styleName]=styleValue;}}}function isValueEmpty(value){return value==null||typeof value==='boolean'||value==='';}/**
9125
+ * Given {color: 'red', overflow: 'hidden'} returns {
9126
+ * color: 'color',
9127
+ * overflowX: 'overflow',
9128
+ * overflowY: 'overflow',
9129
+ * }. This can be read as "the overflowY property was set by the overflow
9130
+ * shorthand". That is, the values are the property that each was derived from.
9131
+ */function expandShorthandMap(styles){var expanded={};for(var key in styles){var longhands=shorthandToLonghand[key]||[key];for(var i=0;i<longhands.length;i++){expanded[longhands[i]]=key;}}return expanded;}/**
9132
+ * When mixing shorthand and longhand property names, we warn during updates if
9133
+ * we expect an incorrect result to occur. In particular, we warn for:
9134
+ *
9135
+ * Updating a shorthand property (longhand gets overwritten):
9136
+ * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
9137
+ * becomes .style.font = 'baz'
9138
+ * Removing a shorthand property (longhand gets lost too):
9139
+ * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
9140
+ * becomes .style.font = ''
9141
+ * Removing a longhand property (should revert to shorthand; doesn't):
9142
+ * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
9143
+ * becomes .style.fontVariant = ''
9144
+ */function validateShorthandPropertyCollisionInDev(styleUpdates,nextStyles){{if(!nextStyles){return;}var expandedUpdates=expandShorthandMap(styleUpdates);var expandedStyles=expandShorthandMap(nextStyles);var warnedAbout={};for(var key in expandedUpdates){var originalKey=expandedUpdates[key];var correctOriginalKey=expandedStyles[key];if(correctOriginalKey&&originalKey!==correctOriginalKey){var warningKey=originalKey+','+correctOriginalKey;if(warnedAbout[warningKey]){continue;}warnedAbout[warningKey]=true;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);}}}}// For HTML, certain tags should omit their close tag. We keep a list for
8872
9145
  // those special-case tags.
8873
9146
  var omittedCloseTags={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true// NOTE: menuitem's close tag should be omitted, but that causes problems.
8874
9147
  };// `omittedCloseTags` except that `menuitem` should still have its closing tag.
@@ -8914,13 +9187,13 @@ if((value==='false'||value==='true')&&propertyInfo!==null&&propertyInfo.type===B
8914
9187
  // We also don't want to defer during event replaying.
8915
9188
  var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS=IS_EVENT_HANDLE_NON_MANAGED_NODE|IS_NON_DELEGATED|IS_CAPTURE_PHASE;// This exists to avoid circular dependency between ReactDOMEventReplaying
8916
9189
  // and DOMPluginEventSystem.
8917
- var currentReplayingEvent=null;function setReplayingEvent(event){{if(currentReplayingEvent!==null){error('Expected currently replaying event to be null. This error '+'is likely caused by a bug in React. Please file an issue.');}}currentReplayingEvent=event;}function resetReplayingEvent(){{if(currentReplayingEvent===null){error('Expected currently replaying event to not be null. This error '+'is likely caused by a bug in React. Please file an issue.');}}currentReplayingEvent=null;}function isReplayingEvent(event){return event===currentReplayingEvent;}/**
8918
- * Gets the target node from a native browser event by accounting for
8919
- * inconsistencies in browser DOM APIs.
8920
- *
8921
- * @param {object} nativeEvent Native browser event.
8922
- * @return {DOMEventTarget} Target node.
8923
- */function getEventTarget(nativeEvent){// Fallback to nativeEvent.srcElement for IE9
9190
+ var currentReplayingEvent=null;function setReplayingEvent(event){{if(currentReplayingEvent!==null){error('Expected currently replaying event to be null. This error '+'is likely caused by a bug in React. Please file an issue.');}}currentReplayingEvent=event;}function resetReplayingEvent(){{if(currentReplayingEvent===null){error('Expected currently replaying event to not be null. This error '+'is likely caused by a bug in React. Please file an issue.');}}currentReplayingEvent=null;}function isReplayingEvent(event){return event===currentReplayingEvent;}/**
9191
+ * Gets the target node from a native browser event by accounting for
9192
+ * inconsistencies in browser DOM APIs.
9193
+ *
9194
+ * @param {object} nativeEvent Native browser event.
9195
+ * @return {DOMEventTarget} Target node.
9196
+ */function getEventTarget(nativeEvent){// Fallback to nativeEvent.srcElement for IE9
8924
9197
  // https://github.com/facebook/react/issues/12506
8925
9198
  var target=nativeEvent.target||nativeEvent.srcElement||window;// Normalize SVG <use> element events #4963
8926
9199
  if(target.correspondingUseElement){target=target.correspondingUseElement;}// Safari may fire events on text nodes (Node.TEXT_NODE is 3).
@@ -8946,11 +9219,11 @@ var controlledComponentsHavePendingUpdates=needsStateRestore();if(controlledComp
8946
9219
  flushSyncImpl();restoreStateIfNeeded();}}function batchedUpdates(fn,a,b){if(isInsideEventHandler){// If we are currently inside another batch, we need to wait until it
8947
9220
  // fully completes before restoring state.
8948
9221
  return fn(a,b);}isInsideEventHandler=true;try{return batchedUpdatesImpl(fn,a,b);}finally{isInsideEventHandler=false;finishEventHandler();}}// TODO: Replace with flushSync
8949
- function setBatchingImplementation(_batchedUpdatesImpl,_discreteUpdatesImpl,_flushSyncImpl){batchedUpdatesImpl=_batchedUpdatesImpl;flushSyncImpl=_flushSyncImpl;}function isInteractive(tag){return tag==='button'||tag==='input'||tag==='select'||tag==='textarea';}function shouldPreventMouseEvent(name,type,props){switch(name){case'onClick':case'onClickCapture':case'onDoubleClick':case'onDoubleClickCapture':case'onMouseDown':case'onMouseDownCapture':case'onMouseMove':case'onMouseMoveCapture':case'onMouseUp':case'onMouseUpCapture':case'onMouseEnter':return !!(props.disabled&&isInteractive(type));default:return false;}}/**
8950
- * @param {object} inst The instance, which is the source of events.
8951
- * @param {string} registrationName Name of listener (e.g. `onClick`).
8952
- * @return {?function} The stored callback.
8953
- */function getListener(inst,registrationName){var stateNode=inst.stateNode;if(stateNode===null){// Work in progress (ex: onload events in incremental mode).
9222
+ function setBatchingImplementation(_batchedUpdatesImpl,_discreteUpdatesImpl,_flushSyncImpl){batchedUpdatesImpl=_batchedUpdatesImpl;flushSyncImpl=_flushSyncImpl;}function isInteractive(tag){return tag==='button'||tag==='input'||tag==='select'||tag==='textarea';}function shouldPreventMouseEvent(name,type,props){switch(name){case'onClick':case'onClickCapture':case'onDoubleClick':case'onDoubleClickCapture':case'onMouseDown':case'onMouseDownCapture':case'onMouseMove':case'onMouseMoveCapture':case'onMouseUp':case'onMouseUpCapture':case'onMouseEnter':return !!(props.disabled&&isInteractive(type));default:return false;}}/**
9223
+ * @param {object} inst The instance, which is the source of events.
9224
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
9225
+ * @return {?function} The stored callback.
9226
+ */function getListener(inst,registrationName){var stateNode=inst.stateNode;if(stateNode===null){// Work in progress (ex: onload events in incremental mode).
8954
9227
  return null;}var props=getFiberCurrentPropsFromNode(stateNode);if(props===null){// Work in progress.
8955
9228
  return null;}var listener=props[registrationName];if(shouldPreventMouseEvent(registrationName,inst.type,props)){return null;}if(listener&&typeof listener!=='function'){throw new Error("Expected `"+registrationName+"` listener to be a function, instead got a value of `"+typeof listener+"` type.");}return listener;}var passiveBrowserEventsSupported=false;// Check if browser support events with passive listeners
8956
9229
  // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
@@ -9030,39 +9303,39 @@ window.removeEventListener('error',handleWindowError);if(!didCall){// Something
9030
9303
  // https://github.com/facebook/react/issues/16585
9031
9304
  // Fall back to the production implementation.
9032
9305
  restoreAfterDispatch();return invokeGuardedCallbackProd.apply(this,arguments);}};}}var invokeGuardedCallbackImpl$1=invokeGuardedCallbackImpl;var hasError=false;var caughtError=null;// Used by event system to capture/rethrow the first error.
9033
- var hasRethrowError=false;var rethrowError=null;var reporter={onError:function(error){hasError=true;caughtError=error;}};/**
9034
- * Call a function while guarding against errors that happens within it.
9035
- * Returns an error if it throws, otherwise null.
9036
- *
9037
- * In production, this is implemented using a try-catch. The reason we don't
9038
- * use a try-catch directly is so that we can swap out a different
9039
- * implementation in DEV mode.
9040
- *
9041
- * @param {String} name of the guard to use for logging or debugging
9042
- * @param {Function} func The function to invoke
9043
- * @param {*} context The context to use when calling the function
9044
- * @param {...*} args Arguments for function
9045
- */function invokeGuardedCallback(name,func,context,a,b,c,d,e,f){hasError=false;caughtError=null;invokeGuardedCallbackImpl$1.apply(reporter,arguments);}/**
9046
- * Same as invokeGuardedCallback, but instead of returning an error, it stores
9047
- * it in a global so it can be rethrown by `rethrowCaughtError` later.
9048
- * TODO: See if caughtError and rethrowError can be unified.
9049
- *
9050
- * @param {String} name of the guard to use for logging or debugging
9051
- * @param {Function} func The function to invoke
9052
- * @param {*} context The context to use when calling the function
9053
- * @param {...*} args Arguments for function
9054
- */function invokeGuardedCallbackAndCatchFirstError(name,func,context,a,b,c,d,e,f){invokeGuardedCallback.apply(this,arguments);if(hasError){var error=clearCaughtError();if(!hasRethrowError){hasRethrowError=true;rethrowError=error;}}}/**
9055
- * During execution of guarded functions we will capture the first error which
9056
- * we will rethrow to be handled by the top level error handler.
9057
- */function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw error;}}function hasCaughtError(){return hasError;}function clearCaughtError(){if(hasError){var error=caughtError;hasError=false;caughtError=null;return error;}else {throw new Error('clearCaughtError was called but no error was captured. This error '+'is likely caused by a bug in React. Please file an issue.');}}/**
9058
- * `ReactInstanceMap` maintains a mapping from a public facing stateful
9059
- * instance (key) and the internal representation (value). This allows public
9060
- * methods to accept the user facing instance as an argument and map them back
9061
- * to internal methods.
9062
- *
9063
- * Note that this module is currently shared and assumed to be stateless.
9064
- * If this becomes an actual Map, that will break.
9065
- */function get(key){return key._reactInternals;}function has(key){return key._reactInternals!==undefined;}function set(key,value){key._reactInternals=value;}// Don't change these two values. They're used by React Dev Tools.
9306
+ var hasRethrowError=false;var rethrowError=null;var reporter={onError:function(error){hasError=true;caughtError=error;}};/**
9307
+ * Call a function while guarding against errors that happens within it.
9308
+ * Returns an error if it throws, otherwise null.
9309
+ *
9310
+ * In production, this is implemented using a try-catch. The reason we don't
9311
+ * use a try-catch directly is so that we can swap out a different
9312
+ * implementation in DEV mode.
9313
+ *
9314
+ * @param {String} name of the guard to use for logging or debugging
9315
+ * @param {Function} func The function to invoke
9316
+ * @param {*} context The context to use when calling the function
9317
+ * @param {...*} args Arguments for function
9318
+ */function invokeGuardedCallback(name,func,context,a,b,c,d,e,f){hasError=false;caughtError=null;invokeGuardedCallbackImpl$1.apply(reporter,arguments);}/**
9319
+ * Same as invokeGuardedCallback, but instead of returning an error, it stores
9320
+ * it in a global so it can be rethrown by `rethrowCaughtError` later.
9321
+ * TODO: See if caughtError and rethrowError can be unified.
9322
+ *
9323
+ * @param {String} name of the guard to use for logging or debugging
9324
+ * @param {Function} func The function to invoke
9325
+ * @param {*} context The context to use when calling the function
9326
+ * @param {...*} args Arguments for function
9327
+ */function invokeGuardedCallbackAndCatchFirstError(name,func,context,a,b,c,d,e,f){invokeGuardedCallback.apply(this,arguments);if(hasError){var error=clearCaughtError();if(!hasRethrowError){hasRethrowError=true;rethrowError=error;}}}/**
9328
+ * During execution of guarded functions we will capture the first error which
9329
+ * we will rethrow to be handled by the top level error handler.
9330
+ */function rethrowCaughtError(){if(hasRethrowError){var error=rethrowError;hasRethrowError=false;rethrowError=null;throw error;}}function hasCaughtError(){return hasError;}function clearCaughtError(){if(hasError){var error=caughtError;hasError=false;caughtError=null;return error;}else {throw new Error('clearCaughtError was called but no error was captured. This error '+'is likely caused by a bug in React. Please file an issue.');}}/**
9331
+ * `ReactInstanceMap` maintains a mapping from a public facing stateful
9332
+ * instance (key) and the internal representation (value). This allows public
9333
+ * methods to accept the user facing instance as an argument and map them back
9334
+ * to internal methods.
9335
+ *
9336
+ * Note that this module is currently shared and assumed to be stateless.
9337
+ * If this becomes an actual Map, that will break.
9338
+ */function get(key){return key._reactInternals;}function has(key){return key._reactInternals!==undefined;}function set(key,value){key._reactInternals=value;}// Don't change these two values. They're used by React Dev Tools.
9066
9339
  var NoFlags=/* */0;var PerformedWork=/* */1;// You can change the rest (and add more).
9067
9340
  var Placement=/* */2;var Update=/* */4;var ChildDeletion=/* */16;var ContentReset=/* */32;var Callback=/* */64;var DidCapture=/* */128;var ForceClientRender=/* */256;var Ref=/* */512;var Snapshot=/* */1024;var Passive=/* */2048;var Hydrating=/* */4096;var Visibility=/* */8192;var StoreConsistency=/* */16384;var LifecycleEffectMask=Passive|Update|Callback|Ref|Snapshot|StoreConsistency;// Union of all commit flags (flags with the lifetime of a particular commit)
9068
9341
  var HostEffectMask=/* */32767;// These are not really side effects, but we still reuse this field.
@@ -9283,8 +9556,7 @@ var queuedDiscreteEvents=[];// Indicates if any continuous event targets are non
9283
9556
  // if the last target was dehydrated.
9284
9557
  var queuedFocus=null;var queuedDrag=null;var queuedMouse=null;// For pointer events there can be one latest event per pointerId.
9285
9558
  var queuedPointers=new Map();var queuedPointerCaptures=new Map();// We could consider replaying selectionchange and touchmoves too.
9286
- var queuedExplicitHydrationTargets=[];var discreteReplayableEvents=['mousedown','mouseup','touchcancel','touchend','touchstart','auxclick','dblclick','pointercancel','pointerdown','pointerup','dragend','dragstart','drop','compositionend','compositionstart','keydown','keypress','keyup','input','textInput',// Intentionally camelCase
9287
- 'copy','cut','paste','click','change','contextmenu','reset','submit'];function isDiscreteEventThatRequiresHydration(eventType){return discreteReplayableEvents.indexOf(eventType)>-1;}function createQueuedReplayableEvent(blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent){return {blockedOn:blockedOn,domEventName:domEventName,eventSystemFlags:eventSystemFlags,nativeEvent:nativeEvent,targetContainers:[targetContainer]};}function clearIfContinuousEvent(domEventName,nativeEvent){switch(domEventName){case'focusin':case'focusout':queuedFocus=null;break;case'dragenter':case'dragleave':queuedDrag=null;break;case'mouseover':case'mouseout':queuedMouse=null;break;case'pointerover':case'pointerout':{var pointerId=nativeEvent.pointerId;queuedPointers.delete(pointerId);break;}case'gotpointercapture':case'lostpointercapture':{var _pointerId=nativeEvent.pointerId;queuedPointerCaptures.delete(_pointerId);break;}}}function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent,blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent){if(existingQueuedEvent===null||existingQueuedEvent.nativeEvent!==nativeEvent){var queuedEvent=createQueuedReplayableEvent(blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent);if(blockedOn!==null){var _fiber2=getInstanceFromNode(blockedOn);if(_fiber2!==null){// Attempt to increase the priority of this target.
9559
+ var queuedExplicitHydrationTargets=[];var discreteReplayableEvents=['mousedown','mouseup','touchcancel','touchend','touchstart','auxclick','dblclick','pointercancel','pointerdown','pointerup','dragend','dragstart','drop','compositionend','compositionstart','keydown','keypress','keyup','input','textInput','copy','cut','paste','click','change','contextmenu','reset','submit'];function isDiscreteEventThatRequiresHydration(eventType){return discreteReplayableEvents.indexOf(eventType)>-1;}function createQueuedReplayableEvent(blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent){return {blockedOn:blockedOn,domEventName:domEventName,eventSystemFlags:eventSystemFlags,nativeEvent:nativeEvent,targetContainers:[targetContainer]};}function clearIfContinuousEvent(domEventName,nativeEvent){switch(domEventName){case'focusin':case'focusout':queuedFocus=null;break;case'dragenter':case'dragleave':queuedDrag=null;break;case'mouseover':case'mouseout':queuedMouse=null;break;case'pointerover':case'pointerout':{var pointerId=nativeEvent.pointerId;queuedPointers.delete(pointerId);break;}case'gotpointercapture':case'lostpointercapture':{var _pointerId=nativeEvent.pointerId;queuedPointerCaptures.delete(_pointerId);break;}}}function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent,blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent){if(existingQueuedEvent===null||existingQueuedEvent.nativeEvent!==nativeEvent){var queuedEvent=createQueuedReplayableEvent(blockedOn,domEventName,eventSystemFlags,targetContainer,nativeEvent);if(blockedOn!==null){var _fiber2=getInstanceFromNode(blockedOn);if(_fiber2!==null){// Attempt to increase the priority of this target.
9288
9560
  attemptContinuousHydration(_fiber2);}}return queuedEvent;}// If we have already queued this exact event, then it's because
9289
9561
  // the different event systems have different DOM event listeners.
9290
9562
  // We can accumulate the flags, and the targetContainers, and
@@ -9354,26 +9626,26 @@ case'mouseenter':case'mouseleave':case'pointerenter':case'pointerleave':return C
9354
9626
  // Eventually this mechanism will be replaced by a check
9355
9627
  // of the current priority on the native scheduler.
9356
9628
  var schedulerPriority=getCurrentPriorityLevel();switch(schedulerPriority){case ImmediatePriority:return DiscreteEventPriority;case UserBlockingPriority:return ContinuousEventPriority;case NormalPriority:case LowPriority:// TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.
9357
- return DefaultEventPriority;case IdlePriority:return IdleEventPriority;default:return DefaultEventPriority;}}default:return DefaultEventPriority;}}function addEventBubbleListener(target,eventType,listener){target.addEventListener(eventType,listener,false);return listener;}function addEventCaptureListener(target,eventType,listener){target.addEventListener(eventType,listener,true);return listener;}function addEventCaptureListenerWithPassiveFlag(target,eventType,listener,passive){target.addEventListener(eventType,listener,{capture:true,passive:passive});return listener;}function addEventBubbleListenerWithPassiveFlag(target,eventType,listener,passive){target.addEventListener(eventType,listener,{passive:passive});return listener;}/**
9358
- * These variables store information about text content of a target node,
9359
- * allowing comparison of content before and after a given event.
9360
- *
9361
- * Identify the node where selection currently begins, then observe
9362
- * both its text content and its current position in the DOM. Since the
9363
- * browser may natively replace the target node during composition, we can
9364
- * use its position to find its replacement.
9365
- *
9366
- *
9367
- */var root=null;var startText=null;var fallbackText=null;function initialize(nativeEventTarget){root=nativeEventTarget;startText=getText();return true;}function reset(){root=null;startText=null;fallbackText=null;}function getData(){if(fallbackText){return fallbackText;}var start;var startValue=startText;var startLength=startValue.length;var end;var endValue=getText();var endLength=endValue.length;for(start=0;start<startLength;start++){if(startValue[start]!==endValue[start]){break;}}var minEnd=startLength-start;for(end=1;end<=minEnd;end++){if(startValue[startLength-end]!==endValue[endLength-end]){break;}}var sliceTail=end>1?1-end:undefined;fallbackText=endValue.slice(start,sliceTail);return fallbackText;}function getText(){if('value'in root){return root.value;}return root.textContent;}/**
9368
- * `charCode` represents the actual "character code" and is safe to use with
9369
- * `String.fromCharCode`. As such, only keys that correspond to printable
9370
- * characters produce a valid `charCode`, the only exception to this is Enter.
9371
- * The Tab-key is considered non-printable and does not have a `charCode`,
9372
- * presumably because it does not produce a tab-character in browsers.
9373
- *
9374
- * @param {object} nativeEvent Native browser event.
9375
- * @return {number} Normalized `charCode` property.
9376
- */function getEventCharCode(nativeEvent){var charCode;var keyCode=nativeEvent.keyCode;if('charCode'in nativeEvent){charCode=nativeEvent.charCode;// FF does not set `charCode` for the Enter-key, check against `keyCode`.
9629
+ return DefaultEventPriority;case IdlePriority:return IdleEventPriority;default:return DefaultEventPriority;}}default:return DefaultEventPriority;}}function addEventBubbleListener(target,eventType,listener){target.addEventListener(eventType,listener,false);return listener;}function addEventCaptureListener(target,eventType,listener){target.addEventListener(eventType,listener,true);return listener;}function addEventCaptureListenerWithPassiveFlag(target,eventType,listener,passive){target.addEventListener(eventType,listener,{capture:true,passive:passive});return listener;}function addEventBubbleListenerWithPassiveFlag(target,eventType,listener,passive){target.addEventListener(eventType,listener,{passive:passive});return listener;}/**
9630
+ * These variables store information about text content of a target node,
9631
+ * allowing comparison of content before and after a given event.
9632
+ *
9633
+ * Identify the node where selection currently begins, then observe
9634
+ * both its text content and its current position in the DOM. Since the
9635
+ * browser may natively replace the target node during composition, we can
9636
+ * use its position to find its replacement.
9637
+ *
9638
+ *
9639
+ */var root=null;var startText=null;var fallbackText=null;function initialize(nativeEventTarget){root=nativeEventTarget;startText=getText();return true;}function reset(){root=null;startText=null;fallbackText=null;}function getData(){if(fallbackText){return fallbackText;}var start;var startValue=startText;var startLength=startValue.length;var end;var endValue=getText();var endLength=endValue.length;for(start=0;start<startLength;start++){if(startValue[start]!==endValue[start]){break;}}var minEnd=startLength-start;for(end=1;end<=minEnd;end++){if(startValue[startLength-end]!==endValue[endLength-end]){break;}}var sliceTail=end>1?1-end:undefined;fallbackText=endValue.slice(start,sliceTail);return fallbackText;}function getText(){if('value'in root){return root.value;}return root.textContent;}/**
9640
+ * `charCode` represents the actual "character code" and is safe to use with
9641
+ * `String.fromCharCode`. As such, only keys that correspond to printable
9642
+ * characters produce a valid `charCode`, the only exception to this is Enter.
9643
+ * The Tab-key is considered non-printable and does not have a `charCode`,
9644
+ * presumably because it does not produce a tab-character in browsers.
9645
+ *
9646
+ * @param {object} nativeEvent Native browser event.
9647
+ * @return {number} Normalized `charCode` property.
9648
+ */function getEventCharCode(nativeEvent){var charCode;var keyCode=nativeEvent.keyCode;if('charCode'in nativeEvent){charCode=nativeEvent.charCode;// FF does not set `charCode` for the Enter-key, check against `keyCode`.
9377
9649
  if(charCode===0&&keyCode===13){charCode=13;}}else {// IE8 does not implement `charCode`, but `keyCode` has the correct value.
9378
9650
  charCode=keyCode;}// IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
9379
9651
  // report Enter as charCode 10 when ctrl is pressed.
@@ -9381,75 +9653,74 @@ if(charCode===10){charCode=13;}// Some non-printable keys are reported in `charC
9381
9653
  // Must not discard the (non-)printable Enter-key.
9382
9654
  if(charCode>=32||charCode===13){return charCode;}return 0;}function functionThatReturnsTrue(){return true;}function functionThatReturnsFalse(){return false;}// This is intentionally a factory so that we have different returned constructors.
9383
9655
  // If we had a single constructor, it would be megamorphic and engines would deopt.
9384
- function createSyntheticEvent(Interface){/**
9385
- * Synthetic events are dispatched by event plugins, typically in response to a
9386
- * top-level event delegation handler.
9387
- *
9388
- * These systems should generally use pooling to reduce the frequency of garbage
9389
- * collection. The system should check `isPersistent` to determine whether the
9390
- * event should be released into the pool after being dispatched. Users that
9391
- * need a persisted event should invoke `persist`.
9392
- *
9393
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
9394
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
9395
- * DOM interface; custom application-specific events can also subclass this.
9396
- */function SyntheticBaseEvent(reactName,reactEventType,targetInst,nativeEvent,nativeEventTarget){this._reactName=reactName;this._targetInst=targetInst;this.type=reactEventType;this.nativeEvent=nativeEvent;this.target=nativeEventTarget;this.currentTarget=null;for(var _propName in Interface){if(!Interface.hasOwnProperty(_propName)){continue;}var normalize=Interface[_propName];if(normalize){this[_propName]=normalize(nativeEvent);}else {this[_propName]=nativeEvent[_propName];}}var defaultPrevented=nativeEvent.defaultPrevented!=null?nativeEvent.defaultPrevented:nativeEvent.returnValue===false;if(defaultPrevented){this.isDefaultPrevented=functionThatReturnsTrue;}else {this.isDefaultPrevented=functionThatReturnsFalse;}this.isPropagationStopped=functionThatReturnsFalse;return this;}assign(SyntheticBaseEvent.prototype,{preventDefault:function(){this.defaultPrevented=true;var event=this.nativeEvent;if(!event){return;}if(event.preventDefault){event.preventDefault();// $FlowFixMe - flow is not aware of `unknown` in IE
9656
+ function createSyntheticEvent(Interface){/**
9657
+ * Synthetic events are dispatched by event plugins, typically in response to a
9658
+ * top-level event delegation handler.
9659
+ *
9660
+ * These systems should generally use pooling to reduce the frequency of garbage
9661
+ * collection. The system should check `isPersistent` to determine whether the
9662
+ * event should be released into the pool after being dispatched. Users that
9663
+ * need a persisted event should invoke `persist`.
9664
+ *
9665
+ * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
9666
+ * normalizing browser quirks. Subclasses do not necessarily have to implement a
9667
+ * DOM interface; custom application-specific events can also subclass this.
9668
+ */function SyntheticBaseEvent(reactName,reactEventType,targetInst,nativeEvent,nativeEventTarget){this._reactName=reactName;this._targetInst=targetInst;this.type=reactEventType;this.nativeEvent=nativeEvent;this.target=nativeEventTarget;this.currentTarget=null;for(var _propName in Interface){if(!Interface.hasOwnProperty(_propName)){continue;}var normalize=Interface[_propName];if(normalize){this[_propName]=normalize(nativeEvent);}else {this[_propName]=nativeEvent[_propName];}}var defaultPrevented=nativeEvent.defaultPrevented!=null?nativeEvent.defaultPrevented:nativeEvent.returnValue===false;if(defaultPrevented){this.isDefaultPrevented=functionThatReturnsTrue;}else {this.isDefaultPrevented=functionThatReturnsFalse;}this.isPropagationStopped=functionThatReturnsFalse;return this;}assign(SyntheticBaseEvent.prototype,{preventDefault:function(){this.defaultPrevented=true;var event=this.nativeEvent;if(!event){return;}if(event.preventDefault){event.preventDefault();// $FlowFixMe - flow is not aware of `unknown` in IE
9397
9669
  }else if(typeof event.returnValue!=='unknown'){event.returnValue=false;}this.isDefaultPrevented=functionThatReturnsTrue;},stopPropagation:function(){var event=this.nativeEvent;if(!event){return;}if(event.stopPropagation){event.stopPropagation();// $FlowFixMe - flow is not aware of `unknown` in IE
9398
9670
  }else if(typeof event.cancelBubble!=='unknown'){// The ChangeEventPlugin registers a "propertychange" event for
9399
9671
  // IE. This event does not support bubbling or cancelling, and
9400
9672
  // any references to cancelBubble throw "Member not found". A
9401
9673
  // typeof check of "unknown" circumvents this issue (and is also
9402
9674
  // IE specific).
9403
- event.cancelBubble=true;}this.isPropagationStopped=functionThatReturnsTrue;},/**
9404
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
9405
- * them back into the pool. This allows a way to hold onto a reference that
9406
- * won't be added back into the pool.
9407
- */persist:function(){// Modern event system doesn't use pooling.
9408
- },/**
9409
- * Checks if this event should be released back into the pool.
9410
- *
9411
- * @return {boolean} True if this should not be released, false otherwise.
9412
- */isPersistent:functionThatReturnsTrue});return SyntheticBaseEvent;}/**
9413
- * @interface Event
9414
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
9415
- */var EventInterface={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(event){return event.timeStamp||Date.now();},defaultPrevented:0,isTrusted:0};var SyntheticEvent=createSyntheticEvent(EventInterface);var UIEventInterface=assign({},EventInterface,{view:0,detail:0});var SyntheticUIEvent=createSyntheticEvent(UIEventInterface);var lastMovementX;var lastMovementY;var lastMouseEvent;function updateMouseMovementPolyfillState(event){if(event!==lastMouseEvent){if(lastMouseEvent&&event.type==='mousemove'){lastMovementX=event.screenX-lastMouseEvent.screenX;lastMovementY=event.screenY-lastMouseEvent.screenY;}else {lastMovementX=0;lastMovementY=0;}lastMouseEvent=event;}}/**
9416
- * @interface MouseEvent
9417
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
9418
- */var MouseEventInterface=assign({},UIEventInterface,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:getEventModifierState,button:0,buttons:0,relatedTarget:function(event){if(event.relatedTarget===undefined)return event.fromElement===event.srcElement?event.toElement:event.fromElement;return event.relatedTarget;},movementX:function(event){if('movementX'in event){return event.movementX;}updateMouseMovementPolyfillState(event);return lastMovementX;},movementY:function(event){if('movementY'in event){return event.movementY;}// Don't need to call updateMouseMovementPolyfillState() here
9675
+ event.cancelBubble=true;}this.isPropagationStopped=functionThatReturnsTrue;},/**
9676
+ * We release all dispatched `SyntheticEvent`s after each event loop, adding
9677
+ * them back into the pool. This allows a way to hold onto a reference that
9678
+ * won't be added back into the pool.
9679
+ */persist:function(){},/**
9680
+ * Checks if this event should be released back into the pool.
9681
+ *
9682
+ * @return {boolean} True if this should not be released, false otherwise.
9683
+ */isPersistent:functionThatReturnsTrue});return SyntheticBaseEvent;}/**
9684
+ * @interface Event
9685
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
9686
+ */var EventInterface={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(event){return event.timeStamp||Date.now();},defaultPrevented:0,isTrusted:0};var SyntheticEvent=createSyntheticEvent(EventInterface);var UIEventInterface=assign({},EventInterface,{view:0,detail:0});var SyntheticUIEvent=createSyntheticEvent(UIEventInterface);var lastMovementX;var lastMovementY;var lastMouseEvent;function updateMouseMovementPolyfillState(event){if(event!==lastMouseEvent){if(lastMouseEvent&&event.type==='mousemove'){lastMovementX=event.screenX-lastMouseEvent.screenX;lastMovementY=event.screenY-lastMouseEvent.screenY;}else {lastMovementX=0;lastMovementY=0;}lastMouseEvent=event;}}/**
9687
+ * @interface MouseEvent
9688
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
9689
+ */var MouseEventInterface=assign({},UIEventInterface,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:getEventModifierState,button:0,buttons:0,relatedTarget:function(event){if(event.relatedTarget===undefined)return event.fromElement===event.srcElement?event.toElement:event.fromElement;return event.relatedTarget;},movementX:function(event){if('movementX'in event){return event.movementX;}updateMouseMovementPolyfillState(event);return lastMovementX;},movementY:function(event){if('movementY'in event){return event.movementY;}// Don't need to call updateMouseMovementPolyfillState() here
9419
9690
  // because it's guaranteed to have already run when movementX
9420
9691
  // was copied.
9421
- return lastMovementY;}});var SyntheticMouseEvent=createSyntheticEvent(MouseEventInterface);/**
9422
- * @interface DragEvent
9423
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
9424
- */var DragEventInterface=assign({},MouseEventInterface,{dataTransfer:0});var SyntheticDragEvent=createSyntheticEvent(DragEventInterface);/**
9425
- * @interface FocusEvent
9426
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
9427
- */var FocusEventInterface=assign({},UIEventInterface,{relatedTarget:0});var SyntheticFocusEvent=createSyntheticEvent(FocusEventInterface);/**
9428
- * @interface Event
9429
- * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
9430
- * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
9431
- */var AnimationEventInterface=assign({},EventInterface,{animationName:0,elapsedTime:0,pseudoElement:0});var SyntheticAnimationEvent=createSyntheticEvent(AnimationEventInterface);/**
9432
- * @interface Event
9433
- * @see http://www.w3.org/TR/clipboard-apis/
9434
- */var ClipboardEventInterface=assign({},EventInterface,{clipboardData:function(event){return 'clipboardData'in event?event.clipboardData:window.clipboardData;}});var SyntheticClipboardEvent=createSyntheticEvent(ClipboardEventInterface);/**
9435
- * @interface Event
9436
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
9437
- */var CompositionEventInterface=assign({},EventInterface,{data:0});var SyntheticCompositionEvent=createSyntheticEvent(CompositionEventInterface);/**
9438
- * @interface Event
9439
- * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
9440
- * /#events-inputevents
9441
- */// Happens to share the same list for now.
9442
- var SyntheticInputEvent=SyntheticCompositionEvent;/**
9443
- * Normalization of deprecated HTML5 `key` values
9444
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
9445
- */var normalizeKey={Esc:'Escape',Spacebar:' ',Left:'ArrowLeft',Up:'ArrowUp',Right:'ArrowRight',Down:'ArrowDown',Del:'Delete',Win:'OS',Menu:'ContextMenu',Apps:'ContextMenu',Scroll:'ScrollLock',MozPrintableKey:'Unidentified'};/**
9446
- * Translation from legacy `keyCode` to HTML5 `key`
9447
- * Only special keys supported, all others depend on keyboard layout or browser
9448
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
9449
- */var translateToKey={'8':'Backspace','9':'Tab','12':'Clear','13':'Enter','16':'Shift','17':'Control','18':'Alt','19':'Pause','20':'CapsLock','27':'Escape','32':' ','33':'PageUp','34':'PageDown','35':'End','36':'Home','37':'ArrowLeft','38':'ArrowUp','39':'ArrowRight','40':'ArrowDown','45':'Insert','46':'Delete','112':'F1','113':'F2','114':'F3','115':'F4','116':'F5','117':'F6','118':'F7','119':'F8','120':'F9','121':'F10','122':'F11','123':'F12','144':'NumLock','145':'ScrollLock','224':'Meta'};/**
9450
- * @param {object} nativeEvent Native browser event.
9451
- * @return {string} Normalized `key` property.
9452
- */function getEventKey(nativeEvent){if(nativeEvent.key){// Normalize inconsistent values reported by browsers due to
9692
+ return lastMovementY;}});var SyntheticMouseEvent=createSyntheticEvent(MouseEventInterface);/**
9693
+ * @interface DragEvent
9694
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
9695
+ */var DragEventInterface=assign({},MouseEventInterface,{dataTransfer:0});var SyntheticDragEvent=createSyntheticEvent(DragEventInterface);/**
9696
+ * @interface FocusEvent
9697
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
9698
+ */var FocusEventInterface=assign({},UIEventInterface,{relatedTarget:0});var SyntheticFocusEvent=createSyntheticEvent(FocusEventInterface);/**
9699
+ * @interface Event
9700
+ * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
9701
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
9702
+ */var AnimationEventInterface=assign({},EventInterface,{animationName:0,elapsedTime:0,pseudoElement:0});var SyntheticAnimationEvent=createSyntheticEvent(AnimationEventInterface);/**
9703
+ * @interface Event
9704
+ * @see http://www.w3.org/TR/clipboard-apis/
9705
+ */var ClipboardEventInterface=assign({},EventInterface,{clipboardData:function(event){return 'clipboardData'in event?event.clipboardData:window.clipboardData;}});var SyntheticClipboardEvent=createSyntheticEvent(ClipboardEventInterface);/**
9706
+ * @interface Event
9707
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
9708
+ */var CompositionEventInterface=assign({},EventInterface,{data:0});var SyntheticCompositionEvent=createSyntheticEvent(CompositionEventInterface);/**
9709
+ * @interface Event
9710
+ * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
9711
+ * /#events-inputevents
9712
+ */// Happens to share the same list for now.
9713
+ var SyntheticInputEvent=SyntheticCompositionEvent;/**
9714
+ * Normalization of deprecated HTML5 `key` values
9715
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
9716
+ */var normalizeKey={Esc:'Escape',Spacebar:' ',Left:'ArrowLeft',Up:'ArrowUp',Right:'ArrowRight',Down:'ArrowDown',Del:'Delete',Win:'OS',Menu:'ContextMenu',Apps:'ContextMenu',Scroll:'ScrollLock',MozPrintableKey:'Unidentified'};/**
9717
+ * Translation from legacy `keyCode` to HTML5 `key`
9718
+ * Only special keys supported, all others depend on keyboard layout or browser
9719
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
9720
+ */var translateToKey={'8':'Backspace','9':'Tab','12':'Clear','13':'Enter','16':'Shift','17':'Control','18':'Alt','19':'Pause','20':'CapsLock','27':'Escape','32':' ','33':'PageUp','34':'PageDown','35':'End','36':'Home','37':'ArrowLeft','38':'ArrowUp','39':'ArrowRight','40':'ArrowDown','45':'Insert','46':'Delete','112':'F1','113':'F2','114':'F3','115':'F4','116':'F5','117':'F6','118':'F7','119':'F8','120':'F9','121':'F10','122':'F11','123':'F12','144':'NumLock','145':'ScrollLock','224':'Meta'};/**
9721
+ * @param {object} nativeEvent Native browser event.
9722
+ * @return {string} Normalized `key` property.
9723
+ */function getEventKey(nativeEvent){if(nativeEvent.key){// Normalize inconsistent values reported by browsers due to
9453
9724
  // implementations of a working draft specification.
9454
9725
  // FireFox implements `key` but returns `MozPrintableKey` for all
9455
9726
  // printable characters (normalized to `Unidentified`), ignore it.
@@ -9458,16 +9729,16 @@ if(nativeEvent.type==='keypress'){var charCode=getEventCharCode(nativeEvent);//
9458
9729
  // thus be captured by `keypress`, no other non-printable key should.
9459
9730
  return charCode===13?'Enter':String.fromCharCode(charCode);}if(nativeEvent.type==='keydown'||nativeEvent.type==='keyup'){// While user keyboard layout determines the actual meaning of each
9460
9731
  // `keyCode` value, almost all function keys have a universal value.
9461
- return translateToKey[nativeEvent.keyCode]||'Unidentified';}return '';}/**
9462
- * Translation from modifier key to the associated property in the event.
9463
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
9464
- */var modifierKeyToProp={Alt:'altKey',Control:'ctrlKey',Meta:'metaKey',Shift:'shiftKey'};// Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
9732
+ return translateToKey[nativeEvent.keyCode]||'Unidentified';}return '';}/**
9733
+ * Translation from modifier key to the associated property in the event.
9734
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
9735
+ */var modifierKeyToProp={Alt:'altKey',Control:'ctrlKey',Meta:'metaKey',Shift:'shiftKey'};// Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
9465
9736
  // getModifierState. If getModifierState is not supported, we map it to a set of
9466
9737
  // modifier keys exposed by the event. In this case, Lock-keys are not supported.
9467
- function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}function getEventModifierState(nativeEvent){return modifierStateGetter;}/**
9468
- * @interface KeyboardEvent
9469
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
9470
- */var KeyboardEventInterface=assign({},UIEventInterface,{key:getEventKey,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:getEventModifierState,// Legacy Interface
9738
+ function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg);}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false;}function getEventModifierState(nativeEvent){return modifierStateGetter;}/**
9739
+ * @interface KeyboardEvent
9740
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
9741
+ */var KeyboardEventInterface=assign({},UIEventInterface,{key:getEventKey,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:getEventModifierState,// Legacy Interface
9471
9742
  charCode:function(event){// `charCode` is the result of a KeyPress event and represents the value of
9472
9743
  // the actual printable character.
9473
9744
  // KeyPress is deprecated, but its replacement is not yet final and not
@@ -9480,20 +9751,20 @@ if(event.type==='keypress'){return getEventCharCode(event);}return 0;},keyCode:f
9480
9751
  // Due to this, it is left to the user to implement at this time.
9481
9752
  if(event.type==='keydown'||event.type==='keyup'){return event.keyCode;}return 0;},which:function(event){// `which` is an alias for either `keyCode` or `charCode` depending on the
9482
9753
  // type of the event.
9483
- if(event.type==='keypress'){return getEventCharCode(event);}if(event.type==='keydown'||event.type==='keyup'){return event.keyCode;}return 0;}});var SyntheticKeyboardEvent=createSyntheticEvent(KeyboardEventInterface);/**
9484
- * @interface PointerEvent
9485
- * @see http://www.w3.org/TR/pointerevents/
9486
- */var PointerEventInterface=assign({},MouseEventInterface,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0});var SyntheticPointerEvent=createSyntheticEvent(PointerEventInterface);/**
9487
- * @interface TouchEvent
9488
- * @see http://www.w3.org/TR/touch-events/
9489
- */var TouchEventInterface=assign({},UIEventInterface,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:getEventModifierState});var SyntheticTouchEvent=createSyntheticEvent(TouchEventInterface);/**
9490
- * @interface Event
9491
- * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
9492
- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
9493
- */var TransitionEventInterface=assign({},EventInterface,{propertyName:0,elapsedTime:0,pseudoElement:0});var SyntheticTransitionEvent=createSyntheticEvent(TransitionEventInterface);/**
9494
- * @interface WheelEvent
9495
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
9496
- */var WheelEventInterface=assign({},MouseEventInterface,{deltaX:function(event){return 'deltaX'in event?event.deltaX:// Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
9754
+ if(event.type==='keypress'){return getEventCharCode(event);}if(event.type==='keydown'||event.type==='keyup'){return event.keyCode;}return 0;}});var SyntheticKeyboardEvent=createSyntheticEvent(KeyboardEventInterface);/**
9755
+ * @interface PointerEvent
9756
+ * @see http://www.w3.org/TR/pointerevents/
9757
+ */var PointerEventInterface=assign({},MouseEventInterface,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0});var SyntheticPointerEvent=createSyntheticEvent(PointerEventInterface);/**
9758
+ * @interface TouchEvent
9759
+ * @see http://www.w3.org/TR/touch-events/
9760
+ */var TouchEventInterface=assign({},UIEventInterface,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:getEventModifierState});var SyntheticTouchEvent=createSyntheticEvent(TouchEventInterface);/**
9761
+ * @interface Event
9762
+ * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
9763
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
9764
+ */var TransitionEventInterface=assign({},EventInterface,{propertyName:0,elapsedTime:0,pseudoElement:0});var SyntheticTransitionEvent=createSyntheticEvent(TransitionEventInterface);/**
9765
+ * @interface WheelEvent
9766
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
9767
+ */var WheelEventInterface=assign({},MouseEventInterface,{deltaX:function(event){return 'deltaX'in event?event.deltaX:// Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
9497
9768
  'wheelDeltaX'in event?-event.wheelDeltaX:0;},deltaY:function(event){return 'deltaY'in event?event.deltaY:// Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
9498
9769
  'wheelDeltaY'in event?-event.wheelDeltaY:// Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
9499
9770
  'wheelDelta'in event?-event.wheelDelta:0;},deltaZ:0,// Browsers without "deltaMode" is reporting in raw wheel delta where one
@@ -9508,138 +9779,138 @@ var canUseTextInputEvent=canUseDOM&&'TextEvent'in window&&!documentMode;// In IE
9508
9779
  // by the native compositionend event may be incorrect. Japanese ideographic
9509
9780
  // spaces, for instance (\u3000) are not recorded correctly.
9510
9781
  var useFallbackCompositionData=canUseDOM&&(!canUseCompositionEvent||documentMode&&documentMode>8&&documentMode<=11);var SPACEBAR_CODE=32;var SPACEBAR_CHAR=String.fromCharCode(SPACEBAR_CODE);function registerEvents(){registerTwoPhaseEvent('onBeforeInput',['compositionend','keypress','textInput','paste']);registerTwoPhaseEvent('onCompositionEnd',['compositionend','focusout','keydown','keypress','keyup','mousedown']);registerTwoPhaseEvent('onCompositionStart',['compositionstart','focusout','keydown','keypress','keyup','mousedown']);registerTwoPhaseEvent('onCompositionUpdate',['compositionupdate','focusout','keydown','keypress','keyup','mousedown']);}// Track whether we've ever handled a keypress on the space key.
9511
- var hasSpaceKeypress=false;/**
9512
- * Return whether a native keypress event is assumed to be a command.
9513
- * This is required because Firefox fires `keypress` events for key commands
9514
- * (cut, copy, select-all, etc.) even though no character is inserted.
9515
- */function isKeypressCommand(nativeEvent){return (nativeEvent.ctrlKey||nativeEvent.altKey||nativeEvent.metaKey)&&// ctrlKey && altKey is equivalent to AltGr, and is not a command.
9516
- !(nativeEvent.ctrlKey&&nativeEvent.altKey);}/**
9517
- * Translate native top level events into event types.
9518
- */function getCompositionEventType(domEventName){switch(domEventName){case'compositionstart':return 'onCompositionStart';case'compositionend':return 'onCompositionEnd';case'compositionupdate':return 'onCompositionUpdate';}}/**
9519
- * Does our fallback best-guess model think this event signifies that
9520
- * composition has begun?
9521
- */function isFallbackCompositionStart(domEventName,nativeEvent){return domEventName==='keydown'&&nativeEvent.keyCode===START_KEYCODE;}/**
9522
- * Does our fallback mode think that this event is the end of composition?
9523
- */function isFallbackCompositionEnd(domEventName,nativeEvent){switch(domEventName){case'keyup':// Command keys insert or clear IME input.
9782
+ var hasSpaceKeypress=false;/**
9783
+ * Return whether a native keypress event is assumed to be a command.
9784
+ * This is required because Firefox fires `keypress` events for key commands
9785
+ * (cut, copy, select-all, etc.) even though no character is inserted.
9786
+ */function isKeypressCommand(nativeEvent){return (nativeEvent.ctrlKey||nativeEvent.altKey||nativeEvent.metaKey)&&// ctrlKey && altKey is equivalent to AltGr, and is not a command.
9787
+ !(nativeEvent.ctrlKey&&nativeEvent.altKey);}/**
9788
+ * Translate native top level events into event types.
9789
+ */function getCompositionEventType(domEventName){switch(domEventName){case'compositionstart':return 'onCompositionStart';case'compositionend':return 'onCompositionEnd';case'compositionupdate':return 'onCompositionUpdate';}}/**
9790
+ * Does our fallback best-guess model think this event signifies that
9791
+ * composition has begun?
9792
+ */function isFallbackCompositionStart(domEventName,nativeEvent){return domEventName==='keydown'&&nativeEvent.keyCode===START_KEYCODE;}/**
9793
+ * Does our fallback mode think that this event is the end of composition?
9794
+ */function isFallbackCompositionEnd(domEventName,nativeEvent){switch(domEventName){case'keyup':// Command keys insert or clear IME input.
9524
9795
  return END_KEYCODES.indexOf(nativeEvent.keyCode)!==-1;case'keydown':// Expect IME keyCode on each keydown. If we get any other
9525
9796
  // code we must have exited earlier.
9526
9797
  return nativeEvent.keyCode!==START_KEYCODE;case'keypress':case'mousedown':case'focusout':// Events are not possible without cancelling IME.
9527
- return true;default:return false;}}/**
9528
- * Google Input Tools provides composition data via a CustomEvent,
9529
- * with the `data` property populated in the `detail` object. If this
9530
- * is available on the event object, use it. If not, this is a plain
9531
- * composition event and we have nothing special to extract.
9532
- *
9533
- * @param {object} nativeEvent
9534
- * @return {?string}
9535
- */function getDataFromCustomEvent(nativeEvent){var detail=nativeEvent.detail;if(typeof detail==='object'&&'data'in detail){return detail.data;}return null;}/**
9536
- * Check if a composition event was triggered by Korean IME.
9537
- * Our fallback mode does not work well with IE's Korean IME,
9538
- * so just use native composition events when Korean IME is used.
9539
- * Although CompositionEvent.locale property is deprecated,
9540
- * it is available in IE, where our fallback mode is enabled.
9541
- *
9542
- * @param {object} nativeEvent
9543
- * @return {boolean}
9544
- */function isUsingKoreanIME(nativeEvent){return nativeEvent.locale==='ko';}// Track the current IME composition status, if any.
9545
- var isComposing=false;/**
9546
- * @return {?object} A SyntheticCompositionEvent.
9547
- */function extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget){var eventType;var fallbackData;if(canUseCompositionEvent){eventType=getCompositionEventType(domEventName);}else if(!isComposing){if(isFallbackCompositionStart(domEventName,nativeEvent)){eventType='onCompositionStart';}}else if(isFallbackCompositionEnd(domEventName,nativeEvent)){eventType='onCompositionEnd';}if(!eventType){return null;}if(useFallbackCompositionData&&!isUsingKoreanIME(nativeEvent)){// The current composition is stored statically and must not be
9798
+ return true;default:return false;}}/**
9799
+ * Google Input Tools provides composition data via a CustomEvent,
9800
+ * with the `data` property populated in the `detail` object. If this
9801
+ * is available on the event object, use it. If not, this is a plain
9802
+ * composition event and we have nothing special to extract.
9803
+ *
9804
+ * @param {object} nativeEvent
9805
+ * @return {?string}
9806
+ */function getDataFromCustomEvent(nativeEvent){var detail=nativeEvent.detail;if(typeof detail==='object'&&'data'in detail){return detail.data;}return null;}/**
9807
+ * Check if a composition event was triggered by Korean IME.
9808
+ * Our fallback mode does not work well with IE's Korean IME,
9809
+ * so just use native composition events when Korean IME is used.
9810
+ * Although CompositionEvent.locale property is deprecated,
9811
+ * it is available in IE, where our fallback mode is enabled.
9812
+ *
9813
+ * @param {object} nativeEvent
9814
+ * @return {boolean}
9815
+ */function isUsingKoreanIME(nativeEvent){return nativeEvent.locale==='ko';}// Track the current IME composition status, if any.
9816
+ var isComposing=false;/**
9817
+ * @return {?object} A SyntheticCompositionEvent.
9818
+ */function extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget){var eventType;var fallbackData;if(canUseCompositionEvent){eventType=getCompositionEventType(domEventName);}else if(!isComposing){if(isFallbackCompositionStart(domEventName,nativeEvent)){eventType='onCompositionStart';}}else if(isFallbackCompositionEnd(domEventName,nativeEvent)){eventType='onCompositionEnd';}if(!eventType){return null;}if(useFallbackCompositionData&&!isUsingKoreanIME(nativeEvent)){// The current composition is stored statically and must not be
9548
9819
  // overwritten while composition continues.
9549
9820
  if(!isComposing&&eventType==='onCompositionStart'){isComposing=initialize(nativeEventTarget);}else if(eventType==='onCompositionEnd'){if(isComposing){fallbackData=getData();}}}var listeners=accumulateTwoPhaseListeners(targetInst,eventType);if(listeners.length>0){var event=new SyntheticCompositionEvent(eventType,domEventName,null,nativeEvent,nativeEventTarget);dispatchQueue.push({event:event,listeners:listeners});if(fallbackData){// Inject data generated from fallback path into the synthetic event.
9550
9821
  // This matches the property of native CompositionEventInterface.
9551
- event.data=fallbackData;}else {var customData=getDataFromCustomEvent(nativeEvent);if(customData!==null){event.data=customData;}}}}function getNativeBeforeInputChars(domEventName,nativeEvent){switch(domEventName){case'compositionend':return getDataFromCustomEvent(nativeEvent);case'keypress':/**
9552
- * If native `textInput` events are available, our goal is to make
9553
- * use of them. However, there is a special case: the spacebar key.
9554
- * In Webkit, preventing default on a spacebar `textInput` event
9555
- * cancels character insertion, but it *also* causes the browser
9556
- * to fall back to its default spacebar behavior of scrolling the
9557
- * page.
9558
- *
9559
- * Tracking at:
9560
- * https://code.google.com/p/chromium/issues/detail?id=355103
9561
- *
9562
- * To avoid this issue, use the keypress event as if no `textInput`
9563
- * event is available.
9564
- */var which=nativeEvent.which;if(which!==SPACEBAR_CODE){return null;}hasSpaceKeypress=true;return SPACEBAR_CHAR;case'textInput':// Record the characters to be added to the DOM.
9822
+ event.data=fallbackData;}else {var customData=getDataFromCustomEvent(nativeEvent);if(customData!==null){event.data=customData;}}}}function getNativeBeforeInputChars(domEventName,nativeEvent){switch(domEventName){case'compositionend':return getDataFromCustomEvent(nativeEvent);case'keypress':/**
9823
+ * If native `textInput` events are available, our goal is to make
9824
+ * use of them. However, there is a special case: the spacebar key.
9825
+ * In Webkit, preventing default on a spacebar `textInput` event
9826
+ * cancels character insertion, but it *also* causes the browser
9827
+ * to fall back to its default spacebar behavior of scrolling the
9828
+ * page.
9829
+ *
9830
+ * Tracking at:
9831
+ * https://code.google.com/p/chromium/issues/detail?id=355103
9832
+ *
9833
+ * To avoid this issue, use the keypress event as if no `textInput`
9834
+ * event is available.
9835
+ */var which=nativeEvent.which;if(which!==SPACEBAR_CODE){return null;}hasSpaceKeypress=true;return SPACEBAR_CHAR;case'textInput':// Record the characters to be added to the DOM.
9565
9836
  var chars=nativeEvent.data;// If it's a spacebar character, assume that we have already handled
9566
9837
  // it at the keypress level and bail immediately. Android Chrome
9567
9838
  // doesn't give us keycodes, so we need to ignore it.
9568
9839
  if(chars===SPACEBAR_CHAR&&hasSpaceKeypress){return null;}return chars;default:// For other native event types, do nothing.
9569
- return null;}}/**
9570
- * For browsers that do not provide the `textInput` event, extract the
9571
- * appropriate string to use for SyntheticInputEvent.
9572
- */function getFallbackBeforeInputChars(domEventName,nativeEvent){// If we are currently composing (IME) and using a fallback to do so,
9840
+ return null;}}/**
9841
+ * For browsers that do not provide the `textInput` event, extract the
9842
+ * appropriate string to use for SyntheticInputEvent.
9843
+ */function getFallbackBeforeInputChars(domEventName,nativeEvent){// If we are currently composing (IME) and using a fallback to do so,
9573
9844
  // try to extract the composed characters from the fallback object.
9574
9845
  // If composition event is available, we extract a string only at
9575
9846
  // compositionevent, otherwise extract it at fallback events.
9576
9847
  if(isComposing){if(domEventName==='compositionend'||!canUseCompositionEvent&&isFallbackCompositionEnd(domEventName,nativeEvent)){var chars=getData();reset();isComposing=false;return chars;}return null;}switch(domEventName){case'paste':// If a paste event occurs after a keypress, throw out the input
9577
9848
  // chars. Paste events should not lead to BeforeInput events.
9578
- return null;case'keypress':/**
9579
- * As of v27, Firefox may fire keypress events even when no character
9580
- * will be inserted. A few possibilities:
9581
- *
9582
- * - `which` is `0`. Arrow keys, Esc key, etc.
9583
- *
9584
- * - `which` is the pressed key code, but no char is available.
9585
- * Ex: 'AltGr + d` in Polish. There is no modified character for
9586
- * this key combination and no character is inserted into the
9587
- * document, but FF fires the keypress for char code `100` anyway.
9588
- * No `input` event will occur.
9589
- *
9590
- * - `which` is the pressed key code, but a command combination is
9591
- * being used. Ex: `Cmd+C`. No character is inserted, and no
9592
- * `input` event will occur.
9593
- */if(!isKeypressCommand(nativeEvent)){// IE fires the `keypress` event when a user types an emoji via
9849
+ return null;case'keypress':/**
9850
+ * As of v27, Firefox may fire keypress events even when no character
9851
+ * will be inserted. A few possibilities:
9852
+ *
9853
+ * - `which` is `0`. Arrow keys, Esc key, etc.
9854
+ *
9855
+ * - `which` is the pressed key code, but no char is available.
9856
+ * Ex: 'AltGr + d` in Polish. There is no modified character for
9857
+ * this key combination and no character is inserted into the
9858
+ * document, but FF fires the keypress for char code `100` anyway.
9859
+ * No `input` event will occur.
9860
+ *
9861
+ * - `which` is the pressed key code, but a command combination is
9862
+ * being used. Ex: `Cmd+C`. No character is inserted, and no
9863
+ * `input` event will occur.
9864
+ */if(!isKeypressCommand(nativeEvent)){// IE fires the `keypress` event when a user types an emoji via
9594
9865
  // Touch keyboard of Windows. In such a case, the `char` property
9595
9866
  // holds an emoji character like `\uD83D\uDE0A`. Because its length
9596
9867
  // is 2, the property `which` does not represent an emoji correctly.
9597
9868
  // In such a case, we directly return the `char` property instead of
9598
9869
  // using `which`.
9599
- if(nativeEvent.char&&nativeEvent.char.length>1){return nativeEvent.char;}else if(nativeEvent.which){return String.fromCharCode(nativeEvent.which);}}return null;case'compositionend':return useFallbackCompositionData&&!isUsingKoreanIME(nativeEvent)?null:nativeEvent.data;default:return null;}}/**
9600
- * Extract a SyntheticInputEvent for `beforeInput`, based on either native
9601
- * `textInput` or fallback behavior.
9602
- *
9603
- * @return {?object} A SyntheticInputEvent.
9604
- */function extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget){var chars;if(canUseTextInputEvent){chars=getNativeBeforeInputChars(domEventName,nativeEvent);}else {chars=getFallbackBeforeInputChars(domEventName,nativeEvent);}// If no characters are being inserted, no BeforeInput event should
9870
+ if(nativeEvent.char&&nativeEvent.char.length>1){return nativeEvent.char;}else if(nativeEvent.which){return String.fromCharCode(nativeEvent.which);}}return null;case'compositionend':return useFallbackCompositionData&&!isUsingKoreanIME(nativeEvent)?null:nativeEvent.data;default:return null;}}/**
9871
+ * Extract a SyntheticInputEvent for `beforeInput`, based on either native
9872
+ * `textInput` or fallback behavior.
9873
+ *
9874
+ * @return {?object} A SyntheticInputEvent.
9875
+ */function extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget){var chars;if(canUseTextInputEvent){chars=getNativeBeforeInputChars(domEventName,nativeEvent);}else {chars=getFallbackBeforeInputChars(domEventName,nativeEvent);}// If no characters are being inserted, no BeforeInput event should
9605
9876
  // be fired.
9606
- if(!chars){return null;}var listeners=accumulateTwoPhaseListeners(targetInst,'onBeforeInput');if(listeners.length>0){var event=new SyntheticInputEvent('onBeforeInput','beforeinput',null,nativeEvent,nativeEventTarget);dispatchQueue.push({event:event,listeners:listeners});event.data=chars;}}/**
9607
- * Create an `onBeforeInput` event to match
9608
- * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
9609
- *
9610
- * This event plugin is based on the native `textInput` event
9611
- * available in Chrome, Safari, Opera, and IE. This event fires after
9612
- * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
9613
- *
9614
- * `beforeInput` is spec'd but not implemented in any browsers, and
9615
- * the `input` event does not provide any useful information about what has
9616
- * actually been added, contrary to the spec. Thus, `textInput` is the best
9617
- * available event to identify the characters that have actually been inserted
9618
- * into the target node.
9619
- *
9620
- * This plugin is also responsible for emitting `composition` events, thus
9621
- * allowing us to share composition fallback code for both `beforeInput` and
9622
- * `composition` event types.
9623
- */function extractEvents(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}/**
9624
- * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
9625
- */var supportedInputTypes={color:true,date:true,datetime:true,'datetime-local':true,email:true,month:true,number:true,password:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true};function isTextInputElement(elem){var nodeName=elem&&elem.nodeName&&elem.nodeName.toLowerCase();if(nodeName==='input'){return !!supportedInputTypes[elem.type];}if(nodeName==='textarea'){return true;}return false;}/**
9626
- * Checks if an event is supported in the current execution environment.
9627
- *
9628
- * NOTE: This will not work correctly for non-generic events such as `change`,
9629
- * `reset`, `load`, `error`, and `select`.
9630
- *
9631
- * Borrows from Modernizr.
9632
- *
9633
- * @param {string} eventNameSuffix Event name, e.g. "click".
9634
- * @return {boolean} True if the event is supported.
9635
- * @internal
9636
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
9637
- */function isEventSupported(eventNameSuffix){if(!canUseDOM){return false;}var eventName='on'+eventNameSuffix;var isSupported=eventName in document;if(!isSupported){var element=document.createElement('div');element.setAttribute(eventName,'return;');isSupported=typeof element[eventName]==='function';}return isSupported;}function registerEvents$1(){registerTwoPhaseEvent('onChange',['change','click','focusin','focusout','input','keydown','keyup','selectionchange']);}function createAndAccumulateChangeEvent(dispatchQueue,inst,nativeEvent,target){// Flag this event loop as needing state restore.
9638
- enqueueStateRestore(target);var listeners=accumulateTwoPhaseListeners(inst,'onChange');if(listeners.length>0){var event=new SyntheticEvent('onChange','change',null,nativeEvent,target);dispatchQueue.push({event:event,listeners:listeners});}}/**
9639
- * For IE shims
9640
- */var activeElement=null;var activeElementInst=null;/**
9641
- * SECTION: handle `change` event
9642
- */function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}function manualDispatchChangeEvent(nativeEvent){var dispatchQueue=[];createAndAccumulateChangeEvent(dispatchQueue,activeElementInst,nativeEvent,getEventTarget(nativeEvent));// If change and propertychange bubbled, we'd just bind to it like all the
9877
+ if(!chars){return null;}var listeners=accumulateTwoPhaseListeners(targetInst,'onBeforeInput');if(listeners.length>0){var event=new SyntheticInputEvent('onBeforeInput','beforeinput',null,nativeEvent,nativeEventTarget);dispatchQueue.push({event:event,listeners:listeners});event.data=chars;}}/**
9878
+ * Create an `onBeforeInput` event to match
9879
+ * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
9880
+ *
9881
+ * This event plugin is based on the native `textInput` event
9882
+ * available in Chrome, Safari, Opera, and IE. This event fires after
9883
+ * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
9884
+ *
9885
+ * `beforeInput` is spec'd but not implemented in any browsers, and
9886
+ * the `input` event does not provide any useful information about what has
9887
+ * actually been added, contrary to the spec. Thus, `textInput` is the best
9888
+ * available event to identify the characters that have actually been inserted
9889
+ * into the target node.
9890
+ *
9891
+ * This plugin is also responsible for emitting `composition` events, thus
9892
+ * allowing us to share composition fallback code for both `beforeInput` and
9893
+ * `composition` event types.
9894
+ */function extractEvents(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}/**
9895
+ * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
9896
+ */var supportedInputTypes={color:true,date:true,datetime:true,'datetime-local':true,email:true,month:true,number:true,password:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true};function isTextInputElement(elem){var nodeName=elem&&elem.nodeName&&elem.nodeName.toLowerCase();if(nodeName==='input'){return !!supportedInputTypes[elem.type];}if(nodeName==='textarea'){return true;}return false;}/**
9897
+ * Checks if an event is supported in the current execution environment.
9898
+ *
9899
+ * NOTE: This will not work correctly for non-generic events such as `change`,
9900
+ * `reset`, `load`, `error`, and `select`.
9901
+ *
9902
+ * Borrows from Modernizr.
9903
+ *
9904
+ * @param {string} eventNameSuffix Event name, e.g. "click".
9905
+ * @return {boolean} True if the event is supported.
9906
+ * @internal
9907
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
9908
+ */function isEventSupported(eventNameSuffix){if(!canUseDOM){return false;}var eventName='on'+eventNameSuffix;var isSupported=eventName in document;if(!isSupported){var element=document.createElement('div');element.setAttribute(eventName,'return;');isSupported=typeof element[eventName]==='function';}return isSupported;}function registerEvents$1(){registerTwoPhaseEvent('onChange',['change','click','focusin','focusout','input','keydown','keyup','selectionchange']);}function createAndAccumulateChangeEvent(dispatchQueue,inst,nativeEvent,target){// Flag this event loop as needing state restore.
9909
+ enqueueStateRestore(target);var listeners=accumulateTwoPhaseListeners(inst,'onChange');if(listeners.length>0){var event=new SyntheticEvent('onChange','change',null,nativeEvent,target);dispatchQueue.push({event:event,listeners:listeners});}}/**
9910
+ * For IE shims
9911
+ */var activeElement=null;var activeElementInst=null;/**
9912
+ * SECTION: handle `change` event
9913
+ */function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}function manualDispatchChangeEvent(nativeEvent){var dispatchQueue=[];createAndAccumulateChangeEvent(dispatchQueue,activeElementInst,nativeEvent,getEventTarget(nativeEvent));// If change and propertychange bubbled, we'd just bind to it like all the
9643
9914
  // other events and have it go through ReactBrowserEventEmitter. Since it
9644
9915
  // doesn't, we manually listen for the events and so we have to enqueue and
9645
9916
  // process the abstract event manually.
@@ -9650,21 +9921,21 @@ enqueueStateRestore(target);var listeners=accumulateTwoPhaseListeners(inst,'onCh
9650
9921
  // components don't work properly in conjunction with event bubbling because
9651
9922
  // the component is rerendered and the value reverted before all the event
9652
9923
  // handlers can run. See https://github.com/facebook/react/issues/708.
9653
- batchedUpdates(runEventInBatch,dispatchQueue);}function runEventInBatch(dispatchQueue){processDispatchQueue(dispatchQueue,0);}function getInstIfValueChanged(targetInst){var targetNode=getNodeFromInstance(targetInst);if(updateValueIfChanged(targetNode)){return targetInst;}}function getTargetInstForChangeEvent(domEventName,targetInst){if(domEventName==='change'){return targetInst;}}/**
9654
- * SECTION: handle `input` event
9655
- */var isInputEventSupported=false;if(canUseDOM){// IE9 claims to support the input event but fails to trigger it when
9924
+ batchedUpdates(runEventInBatch,dispatchQueue);}function runEventInBatch(dispatchQueue){processDispatchQueue(dispatchQueue,0);}function getInstIfValueChanged(targetInst){var targetNode=getNodeFromInstance(targetInst);if(updateValueIfChanged(targetNode)){return targetInst;}}function getTargetInstForChangeEvent(domEventName,targetInst){if(domEventName==='change'){return targetInst;}}/**
9925
+ * SECTION: handle `input` event
9926
+ */var isInputEventSupported=false;if(canUseDOM){// IE9 claims to support the input event but fails to trigger it when
9656
9927
  // deleting text, so we ignore its input events.
9657
- isInputEventSupported=isEventSupported('input')&&(!document.documentMode||document.documentMode>9);}/**
9658
- * (For IE <=9) Starts tracking propertychange events on the passed-in element
9659
- * and override the value property so that we can distinguish user events from
9660
- * value changes in JS.
9661
- */function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}/**
9662
- * (For IE <=9) Removes the event listeners from the currently-tracked element,
9663
- * if any exists.
9664
- */function stopWatchingForValueChange(){if(!activeElement){return;}activeElement.detachEvent('onpropertychange',handlePropertyChange);activeElement=null;activeElementInst=null;}/**
9665
- * (For IE <=9) Handles a propertychange event, sending a `change` event if
9666
- * the value of the active element has changed.
9667
- */function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}function handleEventsForInputEventPolyfill(domEventName,target,targetInst){if(domEventName==='focusin'){// In IE9, propertychange fires for most input events but is buggy and
9928
+ isInputEventSupported=isEventSupported('input')&&(!document.documentMode||document.documentMode>9);}/**
9929
+ * (For IE <=9) Starts tracking propertychange events on the passed-in element
9930
+ * and override the value property so that we can distinguish user events from
9931
+ * value changes in JS.
9932
+ */function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}/**
9933
+ * (For IE <=9) Removes the event listeners from the currently-tracked element,
9934
+ * if any exists.
9935
+ */function stopWatchingForValueChange(){if(!activeElement){return;}activeElement.detachEvent('onpropertychange',handlePropertyChange);activeElement=null;activeElementInst=null;}/**
9936
+ * (For IE <=9) Handles a propertychange event, sending a `change` event if
9937
+ * the value of the active element has changed.
9938
+ */function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=='value'){return;}if(getInstIfValueChanged(activeElementInst)){manualDispatchChangeEvent(nativeEvent);}}function handleEventsForInputEventPolyfill(domEventName,target,targetInst){if(domEventName==='focusin'){// In IE9, propertychange fires for most input events but is buggy and
9668
9939
  // doesn't fire when text is deleted, but conveniently, selectionchange
9669
9940
  // appears to fire in all of the remaining cases so we catch those and
9670
9941
  // forward the event if the value has changed
@@ -9685,29 +9956,29 @@ function getTargetInstForInputEventPolyfill(domEventName,targetInst){if(domEvent
9685
9956
  // keystroke if user does a key repeat (it'll be a little delayed: right
9686
9957
  // before the second keystroke). Other input methods (e.g., paste) seem to
9687
9958
  // fire selectionchange normally.
9688
- return getInstIfValueChanged(activeElementInst);}}/**
9689
- * SECTION: handle `click` event
9690
- */function shouldUseClickEvent(elem){// Use the `click` event to detect changes to checkbox and radio inputs.
9959
+ return getInstIfValueChanged(activeElementInst);}}/**
9960
+ * SECTION: handle `click` event
9961
+ */function shouldUseClickEvent(elem){// Use the `click` event to detect changes to checkbox and radio inputs.
9691
9962
  // This approach works across all browsers, whereas `change` does not fire
9692
9963
  // until `blur` in IE8.
9693
9964
  var nodeName=elem.nodeName;return nodeName&&nodeName.toLowerCase()==='input'&&(elem.type==='checkbox'||elem.type==='radio');}function getTargetInstForClickEvent(domEventName,targetInst){if(domEventName==='click'){return getInstIfValueChanged(targetInst);}}function getTargetInstForInputOrChangeEvent(domEventName,targetInst){if(domEventName==='input'||domEventName==='change'){return getInstIfValueChanged(targetInst);}}function handleControlledInputBlur(node){var state=node._wrapperState;if(!state||!state.controlled||node.type!=='number'){return;}{// If controlled, assign the value attribute to the current value on blur
9694
- setDefaultValue(node,'number',node.value);}}/**
9695
- * This plugin creates an `onChange` event that normalizes change events
9696
- * across form elements. This event fires at a time when it's possible to
9697
- * change the element's value without seeing a flicker.
9698
- *
9699
- * Supported elements are:
9700
- * - input (see `isTextInputElement`)
9701
- * - textarea
9702
- * - select
9703
- */function extractEvents$1(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var targetNode=targetInst?getNodeFromInstance(targetInst):window;var getTargetInstFunc,handleEventFunc;if(shouldUseChangeEvent(targetNode)){getTargetInstFunc=getTargetInstForChangeEvent;}else if(isTextInputElement(targetNode)){if(isInputEventSupported){getTargetInstFunc=getTargetInstForInputOrChangeEvent;}else {getTargetInstFunc=getTargetInstForInputEventPolyfill;handleEventFunc=handleEventsForInputEventPolyfill;}}else if(shouldUseClickEvent(targetNode)){getTargetInstFunc=getTargetInstForClickEvent;}if(getTargetInstFunc){var inst=getTargetInstFunc(domEventName,targetInst);if(inst){createAndAccumulateChangeEvent(dispatchQueue,inst,nativeEvent,nativeEventTarget);return;}}if(handleEventFunc){handleEventFunc(domEventName,targetNode,targetInst);}// When blurring, set the value attribute for number inputs
9704
- if(domEventName==='focusout'){handleControlledInputBlur(targetNode);}}function registerEvents$2(){registerDirectEvent('onMouseEnter',['mouseout','mouseover']);registerDirectEvent('onMouseLeave',['mouseout','mouseover']);registerDirectEvent('onPointerEnter',['pointerout','pointerover']);registerDirectEvent('onPointerLeave',['pointerout','pointerover']);}/**
9705
- * For almost every interaction we care about, there will be both a top-level
9706
- * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
9707
- * we do not extract duplicate events. However, moving the mouse into the
9708
- * browser from outside will not fire a `mouseout` event. In this case, we use
9709
- * the `mouseover` top-level event.
9710
- */function extractEvents$2(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var isOverEvent=domEventName==='mouseover'||domEventName==='pointerover';var isOutEvent=domEventName==='mouseout'||domEventName==='pointerout';if(isOverEvent&&!isReplayingEvent(nativeEvent)){// If this is an over event with a target, we might have already dispatched
9965
+ setDefaultValue(node,'number',node.value);}}/**
9966
+ * This plugin creates an `onChange` event that normalizes change events
9967
+ * across form elements. This event fires at a time when it's possible to
9968
+ * change the element's value without seeing a flicker.
9969
+ *
9970
+ * Supported elements are:
9971
+ * - input (see `isTextInputElement`)
9972
+ * - textarea
9973
+ * - select
9974
+ */function extractEvents$1(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var targetNode=targetInst?getNodeFromInstance(targetInst):window;var getTargetInstFunc,handleEventFunc;if(shouldUseChangeEvent(targetNode)){getTargetInstFunc=getTargetInstForChangeEvent;}else if(isTextInputElement(targetNode)){if(isInputEventSupported){getTargetInstFunc=getTargetInstForInputOrChangeEvent;}else {getTargetInstFunc=getTargetInstForInputEventPolyfill;handleEventFunc=handleEventsForInputEventPolyfill;}}else if(shouldUseClickEvent(targetNode)){getTargetInstFunc=getTargetInstForClickEvent;}if(getTargetInstFunc){var inst=getTargetInstFunc(domEventName,targetInst);if(inst){createAndAccumulateChangeEvent(dispatchQueue,inst,nativeEvent,nativeEventTarget);return;}}if(handleEventFunc){handleEventFunc(domEventName,targetNode,targetInst);}// When blurring, set the value attribute for number inputs
9975
+ if(domEventName==='focusout'){handleControlledInputBlur(targetNode);}}function registerEvents$2(){registerDirectEvent('onMouseEnter',['mouseout','mouseover']);registerDirectEvent('onMouseLeave',['mouseout','mouseover']);registerDirectEvent('onPointerEnter',['pointerout','pointerover']);registerDirectEvent('onPointerLeave',['pointerout','pointerover']);}/**
9976
+ * For almost every interaction we care about, there will be both a top-level
9977
+ * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
9978
+ * we do not extract duplicate events. However, moving the mouse into the
9979
+ * browser from outside will not fire a `mouseout` event. In this case, we use
9980
+ * the `mouseover` top-level event.
9981
+ */function extractEvents$2(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var isOverEvent=domEventName==='mouseover'||domEventName==='pointerover';var isOutEvent=domEventName==='mouseout'||domEventName==='pointerout';if(isOverEvent&&!isReplayingEvent(nativeEvent)){// If this is an over event with a target, we might have already dispatched
9711
9982
  // the event in the out event of the other target. If this is replayed,
9712
9983
  // then it's because we couldn't dispatch against this target previously
9713
9984
  // so we have to do it now instead.
@@ -9721,51 +9992,51 @@ var doc=nativeEventTarget.ownerDocument;if(doc){win=doc.defaultView||doc.parentW
9721
9992
  from=null;to=targetInst;}if(from===to){// Nothing pertains to our managed components.
9722
9993
  return;}var SyntheticEventCtor=SyntheticMouseEvent;var leaveEventType='onMouseLeave';var enterEventType='onMouseEnter';var eventTypePrefix='mouse';if(domEventName==='pointerout'||domEventName==='pointerover'){SyntheticEventCtor=SyntheticPointerEvent;leaveEventType='onPointerLeave';enterEventType='onPointerEnter';eventTypePrefix='pointer';}var fromNode=from==null?win:getNodeFromInstance(from);var toNode=to==null?win:getNodeFromInstance(to);var leave=new SyntheticEventCtor(leaveEventType,eventTypePrefix+'leave',from,nativeEvent,nativeEventTarget);leave.target=fromNode;leave.relatedTarget=toNode;var enter=null;// We should only process this nativeEvent if we are processing
9723
9994
  // the first ancestor. Next time, we will ignore the event.
9724
- var nativeTargetInst=getClosestInstanceFromNode(nativeEventTarget);if(nativeTargetInst===targetInst){var enterEvent=new SyntheticEventCtor(enterEventType,eventTypePrefix+'enter',to,nativeEvent,nativeEventTarget);enterEvent.target=toNode;enterEvent.relatedTarget=fromNode;enter=enterEvent;}accumulateEnterLeaveTwoPhaseListeners(dispatchQueue,leave,enter,from,to);}/**
9725
- * inlined Object.is polyfill to avoid requiring consumers ship their own
9726
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
9727
- */function is(x,y){return x===y&&(x!==0||1/x===1/y)||x!==x&&y!==y// eslint-disable-line no-self-compare
9728
- ;}var objectIs=typeof Object.is==='function'?Object.is:is;/**
9729
- * Performs equality by iterating through keys on an object and returning false
9730
- * when any key has values which are not strictly equal between the arguments.
9731
- * Returns true when the values of all keys are strictly equal.
9732
- */function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.
9733
- for(var i=0;i<keysA.length;i++){var currentKey=keysA[i];if(!hasOwnProperty.call(objB,currentKey)||!objectIs(objA[currentKey],objB[currentKey])){return false;}}return true;}/**
9734
- * Given any node return the first leaf node without children.
9735
- *
9736
- * @param {DOMElement|DOMTextNode} node
9737
- * @return {DOMElement|DOMTextNode}
9738
- */function getLeafNode(node){while(node&&node.firstChild){node=node.firstChild;}return node;}/**
9739
- * Get the next sibling within a container. This will walk up the
9740
- * DOM if a node's siblings have been exhausted.
9741
- *
9742
- * @param {DOMElement|DOMTextNode} node
9743
- * @return {?DOMElement|DOMTextNode}
9744
- */function getSiblingNode(node){while(node){if(node.nextSibling){return node.nextSibling;}node=node.parentNode;}}/**
9745
- * Get object describing the nodes which contain characters at offset.
9746
- *
9747
- * @param {DOMElement|DOMTextNode} root
9748
- * @param {number} offset
9749
- * @return {?object}
9750
- */function getNodeForCharacterOffset(root,offset){var node=getLeafNode(root);var nodeStart=0;var nodeEnd=0;while(node){if(node.nodeType===TEXT_NODE){nodeEnd=nodeStart+node.textContent.length;if(nodeStart<=offset&&nodeEnd>=offset){return {node:node,offset:offset-nodeStart};}nodeStart=nodeEnd;}node=getLeafNode(getSiblingNode(node));}}/**
9751
- * @param {DOMElement} outerNode
9752
- * @return {?object}
9753
- */function getOffsets(outerNode){var ownerDocument=outerNode.ownerDocument;var win=ownerDocument&&ownerDocument.defaultView||window;var selection=win.getSelection&&win.getSelection();if(!selection||selection.rangeCount===0){return null;}var anchorNode=selection.anchorNode,anchorOffset=selection.anchorOffset,focusNode=selection.focusNode,focusOffset=selection.focusOffset;// In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
9995
+ var nativeTargetInst=getClosestInstanceFromNode(nativeEventTarget);if(nativeTargetInst===targetInst){var enterEvent=new SyntheticEventCtor(enterEventType,eventTypePrefix+'enter',to,nativeEvent,nativeEventTarget);enterEvent.target=toNode;enterEvent.relatedTarget=fromNode;enter=enterEvent;}accumulateEnterLeaveTwoPhaseListeners(dispatchQueue,leave,enter,from,to);}/**
9996
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
9997
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
9998
+ */function is(x,y){return x===y&&(x!==0||1/x===1/y)||x!==x&&y!==y// eslint-disable-line no-self-compare
9999
+ ;}var objectIs=typeof Object.is==='function'?Object.is:is;/**
10000
+ * Performs equality by iterating through keys on an object and returning false
10001
+ * when any key has values which are not strictly equal between the arguments.
10002
+ * Returns true when the values of all keys are strictly equal.
10003
+ */function shallowEqual(objA,objB){if(objectIs(objA,objB)){return true;}if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){return false;}var keysA=Object.keys(objA);var keysB=Object.keys(objB);if(keysA.length!==keysB.length){return false;}// Test for A's keys different from B.
10004
+ for(var i=0;i<keysA.length;i++){var currentKey=keysA[i];if(!hasOwnProperty.call(objB,currentKey)||!objectIs(objA[currentKey],objB[currentKey])){return false;}}return true;}/**
10005
+ * Given any node return the first leaf node without children.
10006
+ *
10007
+ * @param {DOMElement|DOMTextNode} node
10008
+ * @return {DOMElement|DOMTextNode}
10009
+ */function getLeafNode(node){while(node&&node.firstChild){node=node.firstChild;}return node;}/**
10010
+ * Get the next sibling within a container. This will walk up the
10011
+ * DOM if a node's siblings have been exhausted.
10012
+ *
10013
+ * @param {DOMElement|DOMTextNode} node
10014
+ * @return {?DOMElement|DOMTextNode}
10015
+ */function getSiblingNode(node){while(node){if(node.nextSibling){return node.nextSibling;}node=node.parentNode;}}/**
10016
+ * Get object describing the nodes which contain characters at offset.
10017
+ *
10018
+ * @param {DOMElement|DOMTextNode} root
10019
+ * @param {number} offset
10020
+ * @return {?object}
10021
+ */function getNodeForCharacterOffset(root,offset){var node=getLeafNode(root);var nodeStart=0;var nodeEnd=0;while(node){if(node.nodeType===TEXT_NODE){nodeEnd=nodeStart+node.textContent.length;if(nodeStart<=offset&&nodeEnd>=offset){return {node:node,offset:offset-nodeStart};}nodeStart=nodeEnd;}node=getLeafNode(getSiblingNode(node));}}/**
10022
+ * @param {DOMElement} outerNode
10023
+ * @return {?object}
10024
+ */function getOffsets(outerNode){var ownerDocument=outerNode.ownerDocument;var win=ownerDocument&&ownerDocument.defaultView||window;var selection=win.getSelection&&win.getSelection();if(!selection||selection.rangeCount===0){return null;}var anchorNode=selection.anchorNode,anchorOffset=selection.anchorOffset,focusNode=selection.focusNode,focusOffset=selection.focusOffset;// In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
9754
10025
  // up/down buttons on an <input type="number">. Anonymous divs do not seem to
9755
10026
  // expose properties, triggering a "Permission denied error" if any of its
9756
10027
  // properties are accessed. The only seemingly possible way to avoid erroring
9757
10028
  // is to access a property that typically works for non-anonymous divs and
9758
10029
  // catch any error that may otherwise arise. See
9759
10030
  // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
9760
- try{/* eslint-disable no-unused-expressions */anchorNode.nodeType;focusNode.nodeType;/* eslint-enable no-unused-expressions */}catch(e){return null;}return getModernOffsetsFromPoints(outerNode,anchorNode,anchorOffset,focusNode,focusOffset);}/**
9761
- * Returns {start, end} where `start` is the character/codepoint index of
9762
- * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
9763
- * `end` is the index of (focusNode, focusOffset).
9764
- *
9765
- * Returns null if you pass in garbage input but we should probably just crash.
9766
- *
9767
- * Exported only for testing.
9768
- */function getModernOffsetsFromPoints(outerNode,anchorNode,anchorOffset,focusNode,focusOffset){var length=0;var start=-1;var end=-1;var indexWithinAnchor=0;var indexWithinFocus=0;var node=outerNode;var parentNode=null;outer:while(true){var next=null;while(true){if(node===anchorNode&&(anchorOffset===0||node.nodeType===TEXT_NODE)){start=length+anchorOffset;}if(node===focusNode&&(focusOffset===0||node.nodeType===TEXT_NODE)){end=length+focusOffset;}if(node.nodeType===TEXT_NODE){length+=node.nodeValue.length;}if((next=node.firstChild)===null){break;}// Moving from `node` to its first child `next`.
10031
+ try{/* eslint-disable no-unused-expressions */anchorNode.nodeType;focusNode.nodeType;/* eslint-enable no-unused-expressions */}catch(e){return null;}return getModernOffsetsFromPoints(outerNode,anchorNode,anchorOffset,focusNode,focusOffset);}/**
10032
+ * Returns {start, end} where `start` is the character/codepoint index of
10033
+ * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
10034
+ * `end` is the index of (focusNode, focusOffset).
10035
+ *
10036
+ * Returns null if you pass in garbage input but we should probably just crash.
10037
+ *
10038
+ * Exported only for testing.
10039
+ */function getModernOffsetsFromPoints(outerNode,anchorNode,anchorOffset,focusNode,focusOffset){var length=0;var start=-1;var end=-1;var indexWithinAnchor=0;var indexWithinFocus=0;var node=outerNode;var parentNode=null;outer:while(true){var next=null;while(true){if(node===anchorNode&&(anchorOffset===0||node.nodeType===TEXT_NODE)){start=length+anchorOffset;}if(node===focusNode&&(focusOffset===0||node.nodeType===TEXT_NODE)){end=length+focusOffset;}if(node.nodeType===TEXT_NODE){length+=node.nodeValue.length;}if((next=node.firstChild)===null){break;}// Moving from `node` to its first child `next`.
9769
10040
  parentNode=node;node=next;}while(true){if(node===outerNode){// If `outerNode` has children, this is always the second time visiting
9770
10041
  // it. If it has no children, this is still the first loop, and the only
9771
10042
  // valid selection is anchorNode and focusNode both equal to this node
@@ -9773,18 +10044,18 @@ parentNode=node;node=next;}while(true){if(node===outerNode){// If `outerNode` ha
9773
10044
  break outer;}if(parentNode===anchorNode&&++indexWithinAnchor===anchorOffset){start=length;}if(parentNode===focusNode&&++indexWithinFocus===focusOffset){end=length;}if((next=node.nextSibling)!==null){break;}node=parentNode;parentNode=node.parentNode;}// Moving from `node` to its next sibling `next`.
9774
10045
  node=next;}if(start===-1||end===-1){// This should never happen. (Would happen if the anchor/focus nodes aren't
9775
10046
  // actually inside the passed-in node.)
9776
- return null;}return {start:start,end:end};}/**
9777
- * In modern non-IE browsers, we can support both forward and backward
9778
- * selections.
9779
- *
9780
- * Note: IE10+ supports the Selection object, but it does not support
9781
- * the `extend` method, which means that even in modern IE, it's not possible
9782
- * to programmatically create a backward selection. Thus, for all IE
9783
- * versions, we use the old IE API to create our selections.
9784
- *
9785
- * @param {DOMElement|DOMTextNode} node
9786
- * @param {object} offsets
9787
- */function setOffsets(node,offsets){var doc=node.ownerDocument||document;var win=doc&&doc.defaultView||window;// Edge fails with "Object expected" in some scenarios.
10047
+ return null;}return {start:start,end:end};}/**
10048
+ * In modern non-IE browsers, we can support both forward and backward
10049
+ * selections.
10050
+ *
10051
+ * Note: IE10+ supports the Selection object, but it does not support
10052
+ * the `extend` method, which means that even in modern IE, it's not possible
10053
+ * to programmatically create a backward selection. Thus, for all IE
10054
+ * versions, we use the old IE API to create our selections.
10055
+ *
10056
+ * @param {DOMElement|DOMTextNode} node
10057
+ * @param {object} offsets
10058
+ */function setOffsets(node,offsets){var doc=node.ownerDocument||document;var win=doc&&doc.defaultView||window;// Edge fails with "Object expected" in some scenarios.
9788
10059
  // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
9789
10060
  // fails when pasting 100+ items)
9790
10061
  if(!win.getSelection){return;}var selection=win.getSelection();var length=node.textContent.length;var start=Math.min(offsets.start,length);var end=offsets.end===undefined?start:Math.min(offsets.end,length);// IE 11 uses modern selection, but doesn't support the extend method.
@@ -9796,64 +10067,64 @@ if(!selection.extend&&start>end){var temp=end;end=start;start=temp;}var startMar
9796
10067
  // A safety way is to access one of the cross origin properties: Window or Location
9797
10068
  // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
9798
10069
  // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
9799
- return typeof iframe.contentWindow.location.href==='string';}catch(err){return false;}}function getActiveElementDeep(){var win=window;var element=getActiveElement();while(element instanceof win.HTMLIFrameElement){if(isSameOriginFrame(element)){win=element.contentWindow;}else {return element;}element=getActiveElement(win.document);}return element;}/**
9800
- * @ReactInputSelection: React input selection module. Based on Selection.js,
9801
- * but modified to be suitable for react and has a couple of bug fixes (doesn't
9802
- * assume buttons have range selections allowed).
9803
- * Input selection module for React.
9804
- *//**
9805
- * @hasSelectionCapabilities: we get the element types that support selection
9806
- * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
9807
- * and `selectionEnd` rows.
9808
- */function hasSelectionCapabilities(elem){var nodeName=elem&&elem.nodeName&&elem.nodeName.toLowerCase();return nodeName&&(nodeName==='input'&&(elem.type==='text'||elem.type==='search'||elem.type==='tel'||elem.type==='url'||elem.type==='password')||nodeName==='textarea'||elem.contentEditable==='true');}function getSelectionInformation(){var focusedElem=getActiveElementDeep();return {focusedElem:focusedElem,selectionRange:hasSelectionCapabilities(focusedElem)?getSelection(focusedElem):null};}/**
9809
- * @restoreSelection: If any selection information was potentially lost,
9810
- * restore it. This is useful when performing operations that could remove dom
9811
- * nodes and place them back in, resulting in focus being lost.
9812
- */function restoreSelection(priorSelectionInformation){var curFocusedElem=getActiveElementDeep();var priorFocusedElem=priorSelectionInformation.focusedElem;var priorSelectionRange=priorSelectionInformation.selectionRange;if(curFocusedElem!==priorFocusedElem&&isInDocument(priorFocusedElem)){if(priorSelectionRange!==null&&hasSelectionCapabilities(priorFocusedElem)){setSelection(priorFocusedElem,priorSelectionRange);}// Focusing a node can change the scroll position, which is undesirable
9813
- var ancestors=[];var ancestor=priorFocusedElem;while(ancestor=ancestor.parentNode){if(ancestor.nodeType===ELEMENT_NODE){ancestors.push({element:ancestor,left:ancestor.scrollLeft,top:ancestor.scrollTop});}}if(typeof priorFocusedElem.focus==='function'){priorFocusedElem.focus();}for(var i=0;i<ancestors.length;i++){var info=ancestors[i];info.element.scrollLeft=info.left;info.element.scrollTop=info.top;}}}/**
9814
- * @getSelection: Gets the selection bounds of a focused textarea, input or
9815
- * contentEditable node.
9816
- * -@input: Look up selection bounds of this input
9817
- * -@return {start: selectionStart, end: selectionEnd}
9818
- */function getSelection(input){var selection;if('selectionStart'in input){// Modern browser with input or textarea.
10070
+ return typeof iframe.contentWindow.location.href==='string';}catch(err){return false;}}function getActiveElementDeep(){var win=window;var element=getActiveElement();while(element instanceof win.HTMLIFrameElement){if(isSameOriginFrame(element)){win=element.contentWindow;}else {return element;}element=getActiveElement(win.document);}return element;}/**
10071
+ * @ReactInputSelection: React input selection module. Based on Selection.js,
10072
+ * but modified to be suitable for react and has a couple of bug fixes (doesn't
10073
+ * assume buttons have range selections allowed).
10074
+ * Input selection module for React.
10075
+ *//**
10076
+ * @hasSelectionCapabilities: we get the element types that support selection
10077
+ * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
10078
+ * and `selectionEnd` rows.
10079
+ */function hasSelectionCapabilities(elem){var nodeName=elem&&elem.nodeName&&elem.nodeName.toLowerCase();return nodeName&&(nodeName==='input'&&(elem.type==='text'||elem.type==='search'||elem.type==='tel'||elem.type==='url'||elem.type==='password')||nodeName==='textarea'||elem.contentEditable==='true');}function getSelectionInformation(){var focusedElem=getActiveElementDeep();return {focusedElem:focusedElem,selectionRange:hasSelectionCapabilities(focusedElem)?getSelection(focusedElem):null};}/**
10080
+ * @restoreSelection: If any selection information was potentially lost,
10081
+ * restore it. This is useful when performing operations that could remove dom
10082
+ * nodes and place them back in, resulting in focus being lost.
10083
+ */function restoreSelection(priorSelectionInformation){var curFocusedElem=getActiveElementDeep();var priorFocusedElem=priorSelectionInformation.focusedElem;var priorSelectionRange=priorSelectionInformation.selectionRange;if(curFocusedElem!==priorFocusedElem&&isInDocument(priorFocusedElem)){if(priorSelectionRange!==null&&hasSelectionCapabilities(priorFocusedElem)){setSelection(priorFocusedElem,priorSelectionRange);}// Focusing a node can change the scroll position, which is undesirable
10084
+ var ancestors=[];var ancestor=priorFocusedElem;while(ancestor=ancestor.parentNode){if(ancestor.nodeType===ELEMENT_NODE){ancestors.push({element:ancestor,left:ancestor.scrollLeft,top:ancestor.scrollTop});}}if(typeof priorFocusedElem.focus==='function'){priorFocusedElem.focus();}for(var i=0;i<ancestors.length;i++){var info=ancestors[i];info.element.scrollLeft=info.left;info.element.scrollTop=info.top;}}}/**
10085
+ * @getSelection: Gets the selection bounds of a focused textarea, input or
10086
+ * contentEditable node.
10087
+ * -@input: Look up selection bounds of this input
10088
+ * -@return {start: selectionStart, end: selectionEnd}
10089
+ */function getSelection(input){var selection;if('selectionStart'in input){// Modern browser with input or textarea.
9819
10090
  selection={start:input.selectionStart,end:input.selectionEnd};}else {// Content editable or old IE textarea.
9820
- selection=getOffsets(input);}return selection||{start:0,end:0};}/**
9821
- * @setSelection: Sets the selection bounds of a textarea or input and focuses
9822
- * the input.
9823
- * -@input Set selection bounds of this input or textarea
9824
- * -@offsets Object of same form that is returned from get*
9825
- */function setSelection(input,offsets){var start=offsets.start;var end=offsets.end;if(end===undefined){end=start;}if('selectionStart'in input){input.selectionStart=start;input.selectionEnd=Math.min(end,input.value.length);}else {setOffsets(input,offsets);}}var skipSelectionChangeEvent=canUseDOM&&'documentMode'in document&&document.documentMode<=11;function registerEvents$3(){registerTwoPhaseEvent('onSelect',['focusout','contextmenu','dragend','focusin','keydown','keyup','mousedown','mouseup','selectionchange']);}var activeElement$1=null;var activeElementInst$1=null;var lastSelection=null;var mouseDown=false;/**
9826
- * Get an object which is a unique representation of the current selection.
9827
- *
9828
- * The return value will not be consistent across nodes or browsers, but
9829
- * two identical selections on the same node will return identical objects.
9830
- */function getSelection$1(node){if('selectionStart'in node&&hasSelectionCapabilities(node)){return {start:node.selectionStart,end:node.selectionEnd};}else {var win=node.ownerDocument&&node.ownerDocument.defaultView||window;var selection=win.getSelection();return {anchorNode:selection.anchorNode,anchorOffset:selection.anchorOffset,focusNode:selection.focusNode,focusOffset:selection.focusOffset};}}/**
9831
- * Get document associated with the event target.
9832
- */function getEventTargetDocument(eventTarget){return eventTarget.window===eventTarget?eventTarget.document:eventTarget.nodeType===DOCUMENT_NODE?eventTarget:eventTarget.ownerDocument;}/**
9833
- * Poll selection to see whether it's changed.
9834
- *
9835
- * @param {object} nativeEvent
9836
- * @param {object} nativeEventTarget
9837
- * @return {?SyntheticEvent}
9838
- */function constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget){// Ensure we have the right element, and that the user is not dragging a
10091
+ selection=getOffsets(input);}return selection||{start:0,end:0};}/**
10092
+ * @setSelection: Sets the selection bounds of a textarea or input and focuses
10093
+ * the input.
10094
+ * -@input Set selection bounds of this input or textarea
10095
+ * -@offsets Object of same form that is returned from get*
10096
+ */function setSelection(input,offsets){var start=offsets.start;var end=offsets.end;if(end===undefined){end=start;}if('selectionStart'in input){input.selectionStart=start;input.selectionEnd=Math.min(end,input.value.length);}else {setOffsets(input,offsets);}}var skipSelectionChangeEvent=canUseDOM&&'documentMode'in document&&document.documentMode<=11;function registerEvents$3(){registerTwoPhaseEvent('onSelect',['focusout','contextmenu','dragend','focusin','keydown','keyup','mousedown','mouseup','selectionchange']);}var activeElement$1=null;var activeElementInst$1=null;var lastSelection=null;var mouseDown=false;/**
10097
+ * Get an object which is a unique representation of the current selection.
10098
+ *
10099
+ * The return value will not be consistent across nodes or browsers, but
10100
+ * two identical selections on the same node will return identical objects.
10101
+ */function getSelection$1(node){if('selectionStart'in node&&hasSelectionCapabilities(node)){return {start:node.selectionStart,end:node.selectionEnd};}else {var win=node.ownerDocument&&node.ownerDocument.defaultView||window;var selection=win.getSelection();return {anchorNode:selection.anchorNode,anchorOffset:selection.anchorOffset,focusNode:selection.focusNode,focusOffset:selection.focusOffset};}}/**
10102
+ * Get document associated with the event target.
10103
+ */function getEventTargetDocument(eventTarget){return eventTarget.window===eventTarget?eventTarget.document:eventTarget.nodeType===DOCUMENT_NODE?eventTarget:eventTarget.ownerDocument;}/**
10104
+ * Poll selection to see whether it's changed.
10105
+ *
10106
+ * @param {object} nativeEvent
10107
+ * @param {object} nativeEventTarget
10108
+ * @return {?SyntheticEvent}
10109
+ */function constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget){// Ensure we have the right element, and that the user is not dragging a
9839
10110
  // selection (this matches native `select` event behavior). In HTML5, select
9840
10111
  // fires only on input and textarea thus if there's no focused element we
9841
10112
  // won't dispatch.
9842
10113
  var doc=getEventTargetDocument(nativeEventTarget);if(mouseDown||activeElement$1==null||activeElement$1!==getActiveElement(doc)){return;}// Only fire when selection has actually changed.
9843
- var currentSelection=getSelection$1(activeElement$1);if(!lastSelection||!shallowEqual(lastSelection,currentSelection)){lastSelection=currentSelection;var listeners=accumulateTwoPhaseListeners(activeElementInst$1,'onSelect');if(listeners.length>0){var event=new SyntheticEvent('onSelect','select',null,nativeEvent,nativeEventTarget);dispatchQueue.push({event:event,listeners:listeners});event.target=activeElement$1;}}}/**
9844
- * This plugin creates an `onSelect` event that normalizes select events
9845
- * across form elements.
9846
- *
9847
- * Supported elements are:
9848
- * - input (see `isTextInputElement`)
9849
- * - textarea
9850
- * - contentEditable
9851
- *
9852
- * This differs from native browser implementations in the following ways:
9853
- * - Fires on contentEditable fields as well as inputs.
9854
- * - Fires for collapsed selection.
9855
- * - Fires after user input.
9856
- */function extractEvents$3(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var targetNode=targetInst?getNodeFromInstance(targetInst):window;switch(domEventName){// Track the input node that has focus.
10114
+ var currentSelection=getSelection$1(activeElement$1);if(!lastSelection||!shallowEqual(lastSelection,currentSelection)){lastSelection=currentSelection;var listeners=accumulateTwoPhaseListeners(activeElementInst$1,'onSelect');if(listeners.length>0){var event=new SyntheticEvent('onSelect','select',null,nativeEvent,nativeEventTarget);dispatchQueue.push({event:event,listeners:listeners});event.target=activeElement$1;}}}/**
10115
+ * This plugin creates an `onSelect` event that normalizes select events
10116
+ * across form elements.
10117
+ *
10118
+ * Supported elements are:
10119
+ * - input (see `isTextInputElement`)
10120
+ * - textarea
10121
+ * - contentEditable
10122
+ *
10123
+ * This differs from native browser implementations in the following ways:
10124
+ * - Fires on contentEditable fields as well as inputs.
10125
+ * - Fires for collapsed selection.
10126
+ * - Fires after user input.
10127
+ */function extractEvents$3(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){var targetNode=targetInst?getNodeFromInstance(targetInst):window;switch(domEventName){// Track the input node that has focus.
9857
10128
  case'focusin':if(isTextInputElement(targetNode)||targetNode.contentEditable==='true'){activeElement$1=targetNode;activeElementInst$1=targetInst;lastSelection=null;}break;case'focusout':activeElement$1=null;activeElementInst$1=null;lastSelection=null;break;// Don't fire the event while the user is dragging. This matches the
9858
10129
  // semantics of the native select event.
9859
10130
  case'mousedown':mouseDown=true;break;case'contextmenu':case'mouseup':case'dragend':mouseDown=false;constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);break;// Chrome and IE fire non-standard event when selection is changed (and
@@ -9866,31 +10137,31 @@ case'mousedown':mouseDown=true;break;case'contextmenu':case'mouseup':case'dragen
9866
10137
  // key, when multiple keydown events are fired but only one keyup is.
9867
10138
  // This is also our approach for IE handling, for the reason above.
9868
10139
  case'selectionchange':if(skipSelectionChangeEvent){break;}// falls through
9869
- case'keydown':case'keyup':constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);}}/**
9870
- * Generate a mapping of standard vendor prefixes using the defined style property and event name.
9871
- *
9872
- * @param {string} styleProp
9873
- * @param {string} eventName
9874
- * @returns {object}
9875
- */function makePrefixMap(styleProp,eventName){var prefixes={};prefixes[styleProp.toLowerCase()]=eventName.toLowerCase();prefixes['Webkit'+styleProp]='webkit'+eventName;prefixes['Moz'+styleProp]='moz'+eventName;return prefixes;}/**
9876
- * A list of event names to a configurable list of vendor prefixes.
9877
- */var vendorPrefixes={animationend:makePrefixMap('Animation','AnimationEnd'),animationiteration:makePrefixMap('Animation','AnimationIteration'),animationstart:makePrefixMap('Animation','AnimationStart'),transitionend:makePrefixMap('Transition','TransitionEnd')};/**
9878
- * Event names that have already been detected and prefixed (if applicable).
9879
- */var prefixedEventNames={};/**
9880
- * Element to check for prefixes on.
9881
- */var style={};/**
9882
- * Bootstrap if a DOM exists.
9883
- */if(canUseDOM){style=document.createElement('div').style;// On some platforms, in particular some releases of Android 4.x,
10140
+ case'keydown':case'keyup':constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);}}/**
10141
+ * Generate a mapping of standard vendor prefixes using the defined style property and event name.
10142
+ *
10143
+ * @param {string} styleProp
10144
+ * @param {string} eventName
10145
+ * @returns {object}
10146
+ */function makePrefixMap(styleProp,eventName){var prefixes={};prefixes[styleProp.toLowerCase()]=eventName.toLowerCase();prefixes['Webkit'+styleProp]='webkit'+eventName;prefixes['Moz'+styleProp]='moz'+eventName;return prefixes;}/**
10147
+ * A list of event names to a configurable list of vendor prefixes.
10148
+ */var vendorPrefixes={animationend:makePrefixMap('Animation','AnimationEnd'),animationiteration:makePrefixMap('Animation','AnimationIteration'),animationstart:makePrefixMap('Animation','AnimationStart'),transitionend:makePrefixMap('Transition','TransitionEnd')};/**
10149
+ * Event names that have already been detected and prefixed (if applicable).
10150
+ */var prefixedEventNames={};/**
10151
+ * Element to check for prefixes on.
10152
+ */var style={};/**
10153
+ * Bootstrap if a DOM exists.
10154
+ */if(canUseDOM){style=document.createElement('div').style;// On some platforms, in particular some releases of Android 4.x,
9884
10155
  // the un-prefixed "animation" and "transition" properties are defined on the
9885
10156
  // style object but the events that fire will still be prefixed, so we need
9886
10157
  // to check if the un-prefixed events are usable, and if not remove them from the map.
9887
10158
  if(!('AnimationEvent'in window)){delete vendorPrefixes.animationend.animation;delete vendorPrefixes.animationiteration.animation;delete vendorPrefixes.animationstart.animation;}// Same as above
9888
- if(!('TransitionEvent'in window)){delete vendorPrefixes.transitionend.transition;}}/**
9889
- * Attempts to determine the correct vendor prefixed event name.
9890
- *
9891
- * @param {string} eventName
9892
- * @returns {string}
9893
- */function getVendorPrefixedEventName(eventName){if(prefixedEventNames[eventName]){return prefixedEventNames[eventName];}else if(!vendorPrefixes[eventName]){return eventName;}var prefixMap=vendorPrefixes[eventName];for(var styleProp in prefixMap){if(prefixMap.hasOwnProperty(styleProp)&&styleProp in style){return prefixedEventNames[eventName]=prefixMap[styleProp];}}return eventName;}var ANIMATION_END=getVendorPrefixedEventName('animationend');var ANIMATION_ITERATION=getVendorPrefixedEventName('animationiteration');var ANIMATION_START=getVendorPrefixedEventName('animationstart');var TRANSITION_END=getVendorPrefixedEventName('transitionend');var topLevelEventsToReactNames=new Map();// NOTE: Capitalization is important in this list!
10159
+ if(!('TransitionEvent'in window)){delete vendorPrefixes.transitionend.transition;}}/**
10160
+ * Attempts to determine the correct vendor prefixed event name.
10161
+ *
10162
+ * @param {string} eventName
10163
+ * @returns {string}
10164
+ */function getVendorPrefixedEventName(eventName){if(prefixedEventNames[eventName]){return prefixedEventNames[eventName];}else if(!vendorPrefixes[eventName]){return eventName;}var prefixMap=vendorPrefixes[eventName];for(var styleProp in prefixMap){if(prefixMap.hasOwnProperty(styleProp)&&styleProp in style){return prefixedEventNames[eventName]=prefixMap[styleProp];}}return eventName;}var ANIMATION_END=getVendorPrefixedEventName('animationend');var ANIMATION_ITERATION=getVendorPrefixedEventName('animationiteration');var ANIMATION_START=getVendorPrefixedEventName('animationstart');var TRANSITION_END=getVendorPrefixedEventName('transitionend');var topLevelEventsToReactNames=new Map();// NOTE: Capitalization is important in this list!
9894
10165
  //
9895
10166
  // E.g. it needs "pointerDown", not "pointerdown".
9896
10167
  // This is because we derive both React name ("onPointerDown")
@@ -10004,10 +10275,10 @@ if(tag===HostComponent&&stateNode!==null){var currentTarget=stateNode;var captur
10004
10275
  // events to their parent. We could also go through parentNode on the
10005
10276
  // host node but that wouldn't work for React Native and doesn't let us
10006
10277
  // do the portal feature.
10007
- }while(inst&&inst.tag!==HostComponent);if(inst){return inst;}return null;}/**
10008
- * Return the lowest common ancestor of A and B, or null if they are in
10009
- * different trees.
10010
- */function getLowestCommonAncestor(instA,instB){var nodeA=instA;var nodeB=instB;var depthA=0;for(var tempA=nodeA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=nodeB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.
10278
+ }while(inst&&inst.tag!==HostComponent);if(inst){return inst;}return null;}/**
10279
+ * Return the lowest common ancestor of A and B, or null if they are in
10280
+ * different trees.
10281
+ */function getLowestCommonAncestor(instA,instB){var nodeA=instA;var nodeB=instB;var depthA=0;for(var tempA=nodeA;tempA;tempA=getParent(tempA)){depthA++;}var depthB=0;for(var tempB=nodeB;tempB;tempB=getParent(tempB)){depthB++;}// If A is deeper, crawl up.
10011
10282
  while(depthA-depthB>0){nodeA=getParent(nodeA);depthA--;}// If B is deeper, crawl up.
10012
10283
  while(depthB-depthA>0){nodeB=getParent(nodeB);depthB--;}// Walk in lockstep until we find a match.
10013
10284
  var depth=depthA;while(depth--){if(nodeA===nodeB||nodeB!==null&&nodeA===nodeB.alternate){return nodeA;}nodeA=getParent(nodeA);nodeB=getParent(nodeB);}return null;}function accumulateEnterLeaveListenersForEvent(dispatchQueue,event,target,common,inCapturePhase){var registrationName=event._reactName;var listeners=[];var instance=target;while(instance!==null){if(instance===common){break;}var _instance4=instance,alternate=_instance4.alternate,stateNode=_instance4.stateNode,tag=_instance4.tag;if(alternate!==null&&alternate===common){break;}if(tag===HostComponent&&stateNode!==null){var currentTarget=stateNode;if(inCapturePhase){var captureListener=getListener(instance,registrationName);if(captureListener!=null){listeners.unshift(createDispatchListener(instance,captureListener,currentTarget));}}else if(!inCapturePhase){var bubbleListener=getListener(instance,registrationName);if(bubbleListener!=null){listeners.push(createDispatchListener(instance,bubbleListener,currentTarget));}}}instance=instance.return;}if(listeners.length!==0){dispatchQueue.push({event:event,listeners:listeners});}}// We should only use this function for:
@@ -10208,16 +10479,15 @@ return;}if(didWarnInvalidHydration){return;}didWarnInvalidHydration=true;error('
10208
10479
  // first, causing a confusing mess.
10209
10480
  // https://html.spec.whatwg.org/multipage/syntax.html#special
10210
10481
  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
10211
- var inScopeTags=['applet','caption','html','table','td','th','marquee','object','template',// https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
10212
- // TODO: Distinguish by namespace here -- for <title>, including it here
10482
+ var inScopeTags=['applet','caption','html','table','td','th','marquee','object','template',// TODO: Distinguish by namespace here -- for <title>, including it here
10213
10483
  // errs on the side of fewer warnings
10214
10484
  'foreignObject','desc','title'];// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
10215
10485
  var buttonScopeTags=inScopeTags.concat(['button']);// https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
10216
10486
  var impliedEndTags=['dd','dt','li','option','optgroup','p','rp','rt'];var emptyAncestorInfo={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};updatedAncestorInfo=function(oldInfo,tag){var ancestorInfo=assign({},oldInfo||emptyAncestorInfo);var info={tag:tag};if(inScopeTags.indexOf(tag)!==-1){ancestorInfo.aTagInScope=null;ancestorInfo.buttonTagInScope=null;ancestorInfo.nobrTagInScope=null;}if(buttonScopeTags.indexOf(tag)!==-1){ancestorInfo.pTagInButtonScope=null;}// See rules for 'li', 'dd', 'dt' start tags in
10217
10487
  // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
10218
- if(specialTags.indexOf(tag)!==-1&&tag!=='address'&&tag!=='div'&&tag!=='p'){ancestorInfo.listItemTagAutoclosing=null;ancestorInfo.dlItemTagAutoclosing=null;}ancestorInfo.current=info;if(tag==='form'){ancestorInfo.formTag=info;}if(tag==='a'){ancestorInfo.aTagInScope=info;}if(tag==='button'){ancestorInfo.buttonTagInScope=info;}if(tag==='nobr'){ancestorInfo.nobrTagInScope=info;}if(tag==='p'){ancestorInfo.pTagInButtonScope=info;}if(tag==='li'){ancestorInfo.listItemTagAutoclosing=info;}if(tag==='dd'||tag==='dt'){ancestorInfo.dlItemTagAutoclosing=info;}return ancestorInfo;};/**
10219
- * Returns whether
10220
- */var isTagValidWithParent=function(tag,parentTag){// First, let's check if we're in an unusual parsing mode...
10488
+ if(specialTags.indexOf(tag)!==-1&&tag!=='address'&&tag!=='div'&&tag!=='p'){ancestorInfo.listItemTagAutoclosing=null;ancestorInfo.dlItemTagAutoclosing=null;}ancestorInfo.current=info;if(tag==='form'){ancestorInfo.formTag=info;}if(tag==='a'){ancestorInfo.aTagInScope=info;}if(tag==='button'){ancestorInfo.buttonTagInScope=info;}if(tag==='nobr'){ancestorInfo.nobrTagInScope=info;}if(tag==='p'){ancestorInfo.pTagInButtonScope=info;}if(tag==='li'){ancestorInfo.listItemTagAutoclosing=info;}if(tag==='dd'||tag==='dt'){ancestorInfo.dlItemTagAutoclosing=info;}return ancestorInfo;};/**
10489
+ * Returns whether
10490
+ */var isTagValidWithParent=function(tag,parentTag){// First, let's check if we're in an unusual parsing mode...
10221
10491
  switch(parentTag){// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
10222
10492
  case'select':return tag==='option'||tag==='optgroup'||tag==='#text';case'optgroup':return tag==='option'||tag==='#text';// Strictly speaking, seeing an <option> doesn't mean we're in a <select>
10223
10493
  // but
@@ -10238,9 +10508,9 @@ switch(tag){case'h1':case'h2':case'h3':case'h4':case'h5':case'h6':return parentT
10238
10508
  // parsing rules -- if we're down here, then none of those matched and
10239
10509
  // so we allow it only if we don't know what the parent is, as all other
10240
10510
  // cases are invalid.
10241
- return parentTag==null;}return true;};/**
10242
- * Returns whether
10243
- */var findInvalidAncestorForTag=function(tag,ancestorInfo){switch(tag){case'address':case'article':case'aside':case'blockquote':case'center':case'details':case'dialog':case'dir':case'div':case'dl':case'fieldset':case'figcaption':case'figure':case'footer':case'header':case'hgroup':case'main':case'menu':case'nav':case'ol':case'p':case'section':case'summary':case'ul':case'pre':case'listing':case'table':case'hr':case'xmp':case'h1':case'h2':case'h3':case'h4':case'h5':case'h6':return ancestorInfo.pTagInButtonScope;case'form':return ancestorInfo.formTag||ancestorInfo.pTagInButtonScope;case'li':return ancestorInfo.listItemTagAutoclosing;case'dd':case'dt':return ancestorInfo.dlItemTagAutoclosing;case'button':return ancestorInfo.buttonTagInScope;case'a':// Spec says something about storing a list of markers, but it sounds
10511
+ return parentTag==null;}return true;};/**
10512
+ * Returns whether
10513
+ */var findInvalidAncestorForTag=function(tag,ancestorInfo){switch(tag){case'address':case'article':case'aside':case'blockquote':case'center':case'details':case'dialog':case'dir':case'div':case'dl':case'fieldset':case'figcaption':case'figure':case'footer':case'header':case'hgroup':case'main':case'menu':case'nav':case'ol':case'p':case'section':case'summary':case'ul':case'pre':case'listing':case'table':case'hr':case'xmp':case'h1':case'h2':case'h3':case'h4':case'h5':case'h6':return ancestorInfo.pTagInButtonScope;case'form':return ancestorInfo.formTag||ancestorInfo.pTagInButtonScope;case'li':return ancestorInfo.listItemTagAutoclosing;case'dd':case'dt':return ancestorInfo.dlItemTagAutoclosing;case'button':return ancestorInfo.buttonTagInScope;case'a':// Spec says something about storing a list of markers, but it sounds
10244
10514
  // equivalent to this check.
10245
10515
  return ancestorInfo.aTagInScope;case'nobr':return ancestorInfo.nobrTagInScope;}return null;};var didWarn$1={};validateDOMNesting=function(childTag,childText,ancestorInfo){ancestorInfo=ancestorInfo||emptyAncestorInfo;var parentInfo=ancestorInfo.current;var parentTag=parentInfo&&parentInfo.tag;if(childText!=null){if(childTag!=null){error('validateDOMNesting: when childText is passed, childTag should be null');}childTag='#text';}var invalidParent=isTagValidWithParent(childTag,parentTag)?null:parentInfo;var invalidAncestor=invalidParent?null:findInvalidAncestorForTag(childTag,ancestorInfo);var invalidParentOrAncestor=invalidParent||invalidAncestor;if(!invalidParentOrAncestor){return;}var ancestorTag=invalidParentOrAncestor.tag;var warnKey=!!invalidParent+'|'+childTag+'|'+ancestorTag;if(didWarn$1[warnKey]){return;}didWarn$1[warnKey]=true;var tagDisplayName=childTag;var whitespaceInfo='';if(childTag==='#text'){if(/\S/.test(childText)){tagDisplayName='Text nodes';}else {tagDisplayName='Whitespace text nodes';whitespaceInfo=" Make sure you don't have any extra whitespace between tags on "+'each line of your source code.';}}else {tagDisplayName='<'+childTag+'>';}if(invalidParent){var info='';if(ancestorTag==='table'&&childTag==='tr'){info+=' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by '+'the browser.';}error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s',tagDisplayName,ancestorTag,whitespaceInfo,info);}else {error('validateDOMNesting(...): %s cannot appear as a descendant of '+'<%s>.',tagDisplayName,ancestorTag);}};}var SUPPRESS_HYDRATION_WARNING$1='suppressHydrationWarning';var SUSPENSE_START_DATA='$';var SUSPENSE_END_DATA='/$';var SUSPENSE_PENDING_START_DATA='$?';var SUSPENSE_FALLBACK_START_DATA='$!';var STYLE$1='style';var eventsEnabled=null;var selectionInformation=null;function getRootHostContext(rootContainerInstance){var type;var namespace;var nodeType=rootContainerInstance.nodeType;switch(nodeType){case DOCUMENT_NODE:case DOCUMENT_FRAGMENT_NODE:{type=nodeType===DOCUMENT_NODE?'#document':'#fragment';var root=rootContainerInstance.documentElement;namespace=root?root.namespaceURI:getChildNamespace(null,'');break;}default:{var container=nodeType===COMMENT_NODE?rootContainerInstance.parentNode:rootContainerInstance;var ownNamespace=container.namespaceURI||null;type=container.tagName;namespace=getChildNamespace(ownNamespace,type);break;}}{var validatedTag=type.toLowerCase();var ancestorInfo=updatedAncestorInfo(null,validatedTag);return {namespace:namespace,ancestorInfo:ancestorInfo};}}function getChildHostContext(parentHostContext,type,rootContainerInstance){{var parentHostContextDev=parentHostContext;var namespace=getChildNamespace(parentHostContextDev.namespace,type);var ancestorInfo=updatedAncestorInfo(parentHostContextDev.ancestorInfo,type);return {namespace:namespace,ancestorInfo:ancestorInfo};}}function getPublicInstance(instance){return instance;}function prepareForCommit(containerInfo){eventsEnabled=isEnabled();selectionInformation=getSelectionInformation();var activeInstance=null;setEnabled(false);return activeInstance;}function resetAfterCommit(containerInfo){restoreSelection(selectionInformation);setEnabled(eventsEnabled);eventsEnabled=null;selectionInformation=null;}function createInstance(type,props,rootContainerInstance,hostContext,internalInstanceHandle){var parentNamespace;{// TODO: take namespace into account when validating.
10246
10516
  var hostContextDev=hostContext;validateDOMNesting(type,null,hostContextDev.ancestorInfo);if(typeof props.children==='string'||typeof props.children==='number'){var string=''+props.children;var ownAncestorInfo=updatedAncestorInfo(hostContextDev.ancestorInfo,type);validateDOMNesting(null,string,ownAncestorInfo);}parentNamespace=hostContextDev.namespace;}var domElement=createElement(type,props,rootContainerInstance,parentNamespace);precacheFiberNode(internalInstanceHandle,domElement);updateFiberProps(domElement,props);return domElement;}function appendInitialChild(parentInstance,child){parentInstance.appendChild(child);}function finalizeInitialChildren(domElement,type,props,rootContainerInstance,hostContext){setInitialProperties(domElement,type,props,rootContainerInstance);switch(type){case'button':case'input':case'select':case'textarea':return !!props.autoFocus;case'img':return true;default:return false;}}function prepareUpdate(domElement,type,oldProps,newProps,rootContainerInstance,hostContext){{var hostContextDev=hostContext;if(typeof newProps.children!==typeof oldProps.children&&(typeof newProps.children==='string'||typeof newProps.children==='number')){var string=''+newProps.children;var ownAncestorInfo=updatedAncestorInfo(hostContextDev.ancestorInfo,type);validateDOMNesting(null,string,ownAncestorInfo);}}return diffProperties(domElement,type,oldProps,newProps);}function shouldSetTextContent(type,props){return type==='textarea'||type==='noscript'||typeof props.children==='string'||typeof props.children==='number'||typeof props.dangerouslySetInnerHTML==='object'&&props.dangerouslySetInnerHTML!==null&&props.dangerouslySetInnerHTML.__html!=null;}function createTextInstance(text,rootContainerInstance,hostContext,internalInstanceHandle){{var hostContextDev=hostContext;validateDOMNesting(null,text,hostContextDev.ancestorInfo);}var textNode=createTextNode(text,rootContainerInstance);precacheFiberNode(internalInstanceHandle,textNode);return textNode;}function getCurrentEventPriority(){var currentEvent=window.event;if(currentEvent===undefined){return DefaultEventPriority;}return getEventPriority(currentEvent.type);}// if a component just imports ReactDOM (e.g. for findDOMNode).
@@ -10366,13 +10636,13 @@ var targetSuspenseInst=suspenseInstance[internalInstanceKey];if(targetSuspenseIn
10366
10636
  suspenseInstance=getParentSuspenseInstance(suspenseInstance);// If we don't find one, then that should mean that the parent
10367
10637
  // host component also hasn't hydrated yet. We can return it
10368
10638
  // below since it will bail out on the isMounted check later.
10369
- }}return targetInst;}targetNode=parentNode;parentNode=targetNode.parentNode;}return null;}/**
10370
- * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
10371
- * instance, or null if the node was not rendered by this React.
10372
- */function getInstanceFromNode(node){var inst=node[internalInstanceKey]||node[internalContainerInstanceKey];if(inst){if(inst.tag===HostComponent||inst.tag===HostText||inst.tag===SuspenseComponent||inst.tag===HostRoot){return inst;}else {return null;}}return null;}/**
10373
- * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
10374
- * DOM node.
10375
- */function getNodeFromInstance(inst){if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber this, is just the state node right now. We assume it will be
10639
+ }}return targetInst;}targetNode=parentNode;parentNode=targetNode.parentNode;}return null;}/**
10640
+ * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
10641
+ * instance, or null if the node was not rendered by this React.
10642
+ */function getInstanceFromNode(node){var inst=node[internalInstanceKey]||node[internalContainerInstanceKey];if(inst){if(inst.tag===HostComponent||inst.tag===HostText||inst.tag===SuspenseComponent||inst.tag===HostRoot){return inst;}else {return null;}}return null;}/**
10643
+ * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
10644
+ * DOM node.
10645
+ */function getNodeFromInstance(inst){if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber this, is just the state node right now. We assume it will be
10376
10646
  // a host component or host text.
10377
10647
  return inst.stateNode;}// Without this first invariant, passing a non-DOM-component triggers the next
10378
10648
  // invariant for a missing parent, which is super confusing.
@@ -10529,11 +10799,11 @@ var componentWillMountUniqueNames=new Set();if(pendingComponentWillMountWarnings
10529
10799
  // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'
10530
10800
  if(UNSAFE_componentWillMountUniqueNames.size>0){var sortedNames=setToSortedString(UNSAFE_componentWillMountUniqueNames);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);}if(UNSAFE_componentWillReceivePropsUniqueNames.size>0){var _sortedNames=setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);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);}if(UNSAFE_componentWillUpdateUniqueNames.size>0){var _sortedNames2=setToSortedString(UNSAFE_componentWillUpdateUniqueNames);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);}if(componentWillMountUniqueNames.size>0){var _sortedNames3=setToSortedString(componentWillMountUniqueNames);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);}if(componentWillReceivePropsUniqueNames.size>0){var _sortedNames4=setToSortedString(componentWillReceivePropsUniqueNames);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);}if(componentWillUpdateUniqueNames.size>0){var _sortedNames5=setToSortedString(componentWillUpdateUniqueNames);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);}};var pendingLegacyContextWarning=new Map();// Tracks components we have already warned about.
10531
10801
  var didWarnAboutLegacyContext=new Set();ReactStrictModeWarnings.recordLegacyContextWarning=function(fiber,instance){var strictRoot=findStrictRoot(fiber);if(strictRoot===null){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.');return;}// Dedup strategy: Warn once per component.
10532
- if(didWarnAboutLegacyContext.has(fiber.type)){return;}var warningsForRoot=pendingLegacyContextWarning.get(strictRoot);if(fiber.type.contextTypes!=null||fiber.type.childContextTypes!=null||instance!==null&&typeof instance.getChildContext==='function'){if(warningsForRoot===undefined){warningsForRoot=[];pendingLegacyContextWarning.set(strictRoot,warningsForRoot);}warningsForRoot.push(fiber);}};ReactStrictModeWarnings.flushLegacyContextWarning=function(){pendingLegacyContextWarning.forEach(function(fiberArray,strictRoot){if(fiberArray.length===0){return;}var firstFiber=fiberArray[0];var uniqueNames=new Set();fiberArray.forEach(function(fiber){uniqueNames.add(getComponentNameFromFiber(fiber)||'Component');didWarnAboutLegacyContext.add(fiber.type);});var sortedNames=setToSortedString(uniqueNames);try{setCurrentFiber(firstFiber);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);}finally{resetCurrentFiber();}});};ReactStrictModeWarnings.discardPendingWarnings=function(){pendingComponentWillMountWarnings=[];pendingUNSAFE_ComponentWillMountWarnings=[];pendingComponentWillReceivePropsWarnings=[];pendingUNSAFE_ComponentWillReceivePropsWarnings=[];pendingComponentWillUpdateWarnings=[];pendingUNSAFE_ComponentWillUpdateWarnings=[];pendingLegacyContextWarning=new Map();};}var didWarnAboutMaps;var didWarnAboutGenerators;var didWarnAboutStringRefs;var ownerHasKeyUseWarning;var ownerHasFunctionTypeWarning;var warnForMissingKey=function(child,returnFiber){};{didWarnAboutMaps=false;didWarnAboutGenerators=false;didWarnAboutStringRefs={};/**
10533
- * Warn if there's no key explicitly set on dynamic arrays of children or
10534
- * object keys are not valid. This allows us to keep track of children between
10535
- * updates.
10536
- */ownerHasKeyUseWarning={};ownerHasFunctionTypeWarning={};warnForMissingKey=function(child,returnFiber){if(child===null||typeof child!=='object'){return;}if(!child._store||child._store.validated||child.key!=null){return;}if(typeof child._store!=='object'){throw new Error('React Component in warnForMissingKey should have a _store. '+'This error is likely caused by a bug in React. Please file an issue.');}child._store.validated=true;var componentName=getComponentNameFromFiber(returnFiber)||'Component';if(ownerHasKeyUseWarning[componentName]){return;}ownerHasKeyUseWarning[componentName]=true;error('Each child in a list should have a unique '+'"key" prop. See https://reactjs.org/link/warning-keys for '+'more information.');};}function isReactClass(type){return type.prototype&&type.prototype.isReactComponent;}function coerceRef(returnFiber,current,element){var mixedRef=element.ref;if(mixedRef!==null&&typeof mixedRef!=='function'&&typeof mixedRef!=='object'){{// TODO: Clean this up once we turn on the string ref warning for
10802
+ if(didWarnAboutLegacyContext.has(fiber.type)){return;}var warningsForRoot=pendingLegacyContextWarning.get(strictRoot);if(fiber.type.contextTypes!=null||fiber.type.childContextTypes!=null||instance!==null&&typeof instance.getChildContext==='function'){if(warningsForRoot===undefined){warningsForRoot=[];pendingLegacyContextWarning.set(strictRoot,warningsForRoot);}warningsForRoot.push(fiber);}};ReactStrictModeWarnings.flushLegacyContextWarning=function(){pendingLegacyContextWarning.forEach(function(fiberArray,strictRoot){if(fiberArray.length===0){return;}var firstFiber=fiberArray[0];var uniqueNames=new Set();fiberArray.forEach(function(fiber){uniqueNames.add(getComponentNameFromFiber(fiber)||'Component');didWarnAboutLegacyContext.add(fiber.type);});var sortedNames=setToSortedString(uniqueNames);try{setCurrentFiber(firstFiber);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);}finally{resetCurrentFiber();}});};ReactStrictModeWarnings.discardPendingWarnings=function(){pendingComponentWillMountWarnings=[];pendingUNSAFE_ComponentWillMountWarnings=[];pendingComponentWillReceivePropsWarnings=[];pendingUNSAFE_ComponentWillReceivePropsWarnings=[];pendingComponentWillUpdateWarnings=[];pendingUNSAFE_ComponentWillUpdateWarnings=[];pendingLegacyContextWarning=new Map();};}var didWarnAboutMaps;var didWarnAboutGenerators;var didWarnAboutStringRefs;var ownerHasKeyUseWarning;var ownerHasFunctionTypeWarning;var warnForMissingKey=function(child,returnFiber){};{didWarnAboutMaps=false;didWarnAboutGenerators=false;didWarnAboutStringRefs={};/**
10803
+ * Warn if there's no key explicitly set on dynamic arrays of children or
10804
+ * object keys are not valid. This allows us to keep track of children between
10805
+ * updates.
10806
+ */ownerHasKeyUseWarning={};ownerHasFunctionTypeWarning={};warnForMissingKey=function(child,returnFiber){if(child===null||typeof child!=='object'){return;}if(!child._store||child._store.validated||child.key!=null){return;}if(typeof child._store!=='object'){throw new Error('React Component in warnForMissingKey should have a _store. '+'This error is likely caused by a bug in React. Please file an issue.');}child._store.validated=true;var componentName=getComponentNameFromFiber(returnFiber)||'Component';if(ownerHasKeyUseWarning[componentName]){return;}ownerHasKeyUseWarning[componentName]=true;error('Each child in a list should have a unique '+'"key" prop. See https://reactjs.org/link/warning-keys for '+'more information.');};}function isReactClass(type){return type.prototype&&type.prototype.isReactComponent;}function coerceRef(returnFiber,current,element){var mixedRef=element.ref;if(mixedRef!==null&&typeof mixedRef!=='function'&&typeof mixedRef!=='object'){{// TODO: Clean this up once we turn on the string ref warning for
10537
10807
  // everyone, because the strict mode case will no longer be relevant
10538
10808
  if((returnFiber.mode&StrictLegacyMode||warnAboutStringRefs)&&// We warn in ReactElement.js if owner and self are equal for string refs
10539
10809
  // because these cannot be automatically converted to an arrow function
@@ -10585,9 +10855,9 @@ var key=oldFiber!==null?oldFiber.key:null;if(typeof newChild==='string'&&newChil
10585
10855
  // node.
10586
10856
  if(key!==null){return null;}return updateTextNode(returnFiber,oldFiber,''+newChild,lanes);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{if(newChild.key===key){return updateElement(returnFiber,oldFiber,newChild,lanes);}else {return null;}}case REACT_PORTAL_TYPE:{if(newChild.key===key){return updatePortal(returnFiber,oldFiber,newChild,lanes);}else {return null;}}case REACT_LAZY_TYPE:{var payload=newChild._payload;var init=newChild._init;return updateSlot(returnFiber,oldFiber,init(payload),lanes);}}if(isArray(newChild)||getIteratorFn(newChild)){if(key!==null){return null;}return updateFragment(returnFiber,oldFiber,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}function updateFromMap(existingChildren,returnFiber,newIdx,newChild,lanes){if(typeof newChild==='string'&&newChild!==''||typeof newChild==='number'){// Text nodes don't have keys, so we neither have to check the old nor
10587
10857
  // new node for the key. If both are text nodes, they match.
10588
- var matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,lanes);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updateElement(returnFiber,_matchedFiber,newChild,lanes);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,lanes);}case REACT_LAZY_TYPE:var payload=newChild._payload;var init=newChild._init;return updateFromMap(existingChildren,returnFiber,newIdx,init(payload),lanes);}if(isArray(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}/**
10589
- * Warns if there is a duplicate or missing key
10590
- */function warnOnInvalidKey(child,knownKeys,returnFiber){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child,returnFiber);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}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);break;case REACT_LAZY_TYPE:var payload=child._payload;var init=child._init;warnOnInvalidKey(init(payload),knownKeys,returnFiber);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,lanes){// This algorithm can't optimize by searching from both ends since we
10858
+ var matchedFiber=existingChildren.get(newIdx)||null;return updateTextNode(returnFiber,matchedFiber,''+newChild,lanes);}if(typeof newChild==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _matchedFiber=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updateElement(returnFiber,_matchedFiber,newChild,lanes);}case REACT_PORTAL_TYPE:{var _matchedFiber2=existingChildren.get(newChild.key===null?newIdx:newChild.key)||null;return updatePortal(returnFiber,_matchedFiber2,newChild,lanes);}case REACT_LAZY_TYPE:var payload=newChild._payload;var init=newChild._init;return updateFromMap(existingChildren,returnFiber,newIdx,init(payload),lanes);}if(isArray(newChild)||getIteratorFn(newChild)){var _matchedFiber3=existingChildren.get(newIdx)||null;return updateFragment(returnFiber,_matchedFiber3,newChild,lanes,null);}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType(returnFiber);}}return null;}/**
10859
+ * Warns if there is a duplicate or missing key
10860
+ */function warnOnInvalidKey(child,knownKeys,returnFiber){{if(typeof child!=='object'||child===null){return knownKeys;}switch(child.$$typeof){case REACT_ELEMENT_TYPE:case REACT_PORTAL_TYPE:warnForMissingKey(child,returnFiber);var key=child.key;if(typeof key!=='string'){break;}if(knownKeys===null){knownKeys=new Set();knownKeys.add(key);break;}if(!knownKeys.has(key)){knownKeys.add(key);break;}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);break;case REACT_LAZY_TYPE:var payload=child._payload;var init=child._init;warnOnInvalidKey(init(payload),knownKeys,returnFiber);break;}}return knownKeys;}function reconcileChildrenArray(returnFiber,currentFirstChild,newChildren,lanes){// This algorithm can't optimize by searching from both ends since we
10591
10861
  // don't have backpointers on fibers. I'm trying to see how far we can get
10592
10862
  // with that model. If it ends up not being worth the tradeoffs, we can
10593
10863
  // add it later.
@@ -11060,8 +11330,7 @@ return subscribe(handleStoreChange);}function checkIfSnapshotChanged(inst){var l
11060
11330
  initialState=initialState();}hook.memoizedState=hook.baseState=initialState;var queue={pending:null,interleaved:null,lanes:NoLanes,dispatch:null,lastRenderedReducer:basicStateReducer,lastRenderedState:initialState};hook.queue=queue;var dispatch=queue.dispatch=dispatchSetState.bind(null,currentlyRenderingFiber$1,queue);return [hook.memoizedState,dispatch];}function updateState(initialState){return updateReducer(basicStateReducer);}function rerenderState(initialState){return rerenderReducer(basicStateReducer);}function pushEffect(tag,create,destroy,deps){var effect={tag:tag,create:create,destroy:destroy,deps:deps,// Circular
11061
11331
  next:null};var componentUpdateQueue=currentlyRenderingFiber$1.updateQueue;if(componentUpdateQueue===null){componentUpdateQueue=createFunctionComponentUpdateQueue();currentlyRenderingFiber$1.updateQueue=componentUpdateQueue;componentUpdateQueue.lastEffect=effect.next=effect;}else {var lastEffect=componentUpdateQueue.lastEffect;if(lastEffect===null){componentUpdateQueue.lastEffect=effect.next=effect;}else {var firstEffect=lastEffect.next;lastEffect.next=effect;effect.next=firstEffect;componentUpdateQueue.lastEffect=effect;}}return effect;}function mountRef(initialValue){var hook=mountWorkInProgressHook();{var _ref2={current:initialValue};hook.memoizedState=_ref2;return _ref2;}}function updateRef(initialValue){var hook=updateWorkInProgressHook();return hook.memoizedState;}function mountEffectImpl(fiberFlags,hookFlags,create,deps){var hook=mountWorkInProgressHook();var nextDeps=deps===undefined?null:deps;currentlyRenderingFiber$1.flags|=fiberFlags;hook.memoizedState=pushEffect(HasEffect|hookFlags,create,undefined,nextDeps);}function updateEffectImpl(fiberFlags,hookFlags,create,deps){var hook=updateWorkInProgressHook();var nextDeps=deps===undefined?null:deps;var destroy=undefined;if(currentHook!==null){var prevEffect=currentHook.memoizedState;destroy=prevEffect.destroy;if(nextDeps!==null){var prevDeps=prevEffect.deps;if(areHookInputsEqual(nextDeps,prevDeps)){hook.memoizedState=pushEffect(hookFlags,create,destroy,nextDeps);return;}}}currentlyRenderingFiber$1.flags|=fiberFlags;hook.memoizedState=pushEffect(HasEffect|hookFlags,create,destroy,nextDeps);}function mountEffect(create,deps){if((currentlyRenderingFiber$1.mode&StrictEffectsMode)!==NoMode){return mountEffectImpl(MountPassiveDev|Passive|PassiveStatic,Passive$1,create,deps);}else {return mountEffectImpl(Passive|PassiveStatic,Passive$1,create,deps);}}function updateEffect(create,deps){return updateEffectImpl(Passive,Passive$1,create,deps);}function mountInsertionEffect(create,deps){return mountEffectImpl(Update,Insertion,create,deps);}function updateInsertionEffect(create,deps){return updateEffectImpl(Update,Insertion,create,deps);}function mountLayoutEffect(create,deps){var fiberFlags=Update;{fiberFlags|=LayoutStatic;}if((currentlyRenderingFiber$1.mode&StrictEffectsMode)!==NoMode){fiberFlags|=MountLayoutDev;}return mountEffectImpl(fiberFlags,Layout,create,deps);}function updateLayoutEffect(create,deps){return updateEffectImpl(Update,Layout,create,deps);}function imperativeHandleEffect(create,ref){if(typeof ref==='function'){var refCallback=ref;var _inst=create();refCallback(_inst);return function(){refCallback(null);};}else if(ref!==null&&ref!==undefined){var refObject=ref;{if(!refObject.hasOwnProperty('current')){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(', ')+'}');}}var _inst2=create();refObject.current=_inst2;return function(){refObject.current=null;};}}function mountImperativeHandle(ref,create,deps){{if(typeof create!=='function'){error('Expected useImperativeHandle() second argument to be a function '+'that creates a handle. Instead received: %s.',create!==null?typeof create:'null');}}// TODO: If deps are provided, should we skip comparing the ref itself?
11062
11332
  var effectDeps=deps!==null&&deps!==undefined?deps.concat([ref]):null;var fiberFlags=Update;{fiberFlags|=LayoutStatic;}if((currentlyRenderingFiber$1.mode&StrictEffectsMode)!==NoMode){fiberFlags|=MountLayoutDev;}return mountEffectImpl(fiberFlags,Layout,imperativeHandleEffect.bind(null,create,ref),effectDeps);}function updateImperativeHandle(ref,create,deps){{if(typeof create!=='function'){error('Expected useImperativeHandle() second argument to be a function '+'that creates a handle. Instead received: %s.',create!==null?typeof create:'null');}}// TODO: If deps are provided, should we skip comparing the ref itself?
11063
- var effectDeps=deps!==null&&deps!==undefined?deps.concat([ref]):null;return updateEffectImpl(Update,Layout,imperativeHandleEffect.bind(null,create,ref),effectDeps);}function mountDebugValue(value,formatterFn){// This hook is normally a no-op.
11064
- // The react-debug-hooks package injects its own implementation
11333
+ var effectDeps=deps!==null&&deps!==undefined?deps.concat([ref]):null;return updateEffectImpl(Update,Layout,imperativeHandleEffect.bind(null,create,ref),effectDeps);}function mountDebugValue(value,formatterFn){// The react-debug-hooks package injects its own implementation
11065
11334
  // so that e.g. DevTools can display custom hook values.
11066
11335
  }var updateDebugValue=mountDebugValue;function mountCallback(callback,deps){var hook=mountWorkInProgressHook();var nextDeps=deps===undefined?null:deps;hook.memoizedState=[callback,nextDeps];return callback;}function updateCallback(callback,deps){var hook=updateWorkInProgressHook();var nextDeps=deps===undefined?null:deps;var prevState=hook.memoizedState;if(prevState!==null){if(nextDeps!==null){var prevDeps=prevState[1];if(areHookInputsEqual(nextDeps,prevDeps)){return prevState[0];}}}hook.memoizedState=[callback,nextDeps];return callback;}function mountMemo(nextCreate,deps){var hook=mountWorkInProgressHook();var nextDeps=deps===undefined?null:deps;var nextValue=nextCreate();hook.memoizedState=[nextValue,nextDeps];return nextValue;}function updateMemo(nextCreate,deps){var hook=updateWorkInProgressHook();var nextDeps=deps===undefined?null:deps;var prevState=hook.memoizedState;if(prevState!==null){// Assume these are defined. If they're not, areHookInputsEqual will warn.
11067
11336
  if(nextDeps!==null){var prevDeps=prevState[1];if(areHookInputsEqual(nextDeps,prevDeps)){return prevState[0];}}}var nextValue=nextCreate();hook.memoizedState=[nextValue,nextDeps];return nextValue;}function mountDeferredValue(value){var hook=mountWorkInProgressHook();hook.memoizedState=value;return value;}function updateDeferredValue(value){var hook=updateWorkInProgressHook();var resolvedCurrentHook=currentHook;var prevValue=resolvedCurrentHook.memoizedState;return updateDeferredValueImpl(hook,prevValue,value);}function rerenderDeferredValue(value){var hook=updateWorkInProgressHook();if(currentHook===null){// This is a rerender during a mount.
@@ -11121,22 +11390,22 @@ queueLanes=intersectLanes(queueLanes,root.pendingLanes);// Entangle the new tran
11121
11390
  var newQueueLanes=mergeLanes(queueLanes,lane);queue.lanes=newQueueLanes;// Even if queue.lanes already include lane, we don't know for certain if
11122
11391
  // the lane finished since the last time we entangled it. So we need to
11123
11392
  // entangle it again, just to be sure.
11124
- markRootEntangled(root,newQueueLanes);}}function markUpdateInDevTools(fiber,lane,action){{markStateUpdateScheduled(fiber,lane);}}var ContextOnlyDispatcher={readContext:readContext,useCallback:throwInvalidHookError,useContext:throwInvalidHookError,useEffect:throwInvalidHookError,useImperativeHandle:throwInvalidHookError,useInsertionEffect:throwInvalidHookError,useLayoutEffect:throwInvalidHookError,useMemo:throwInvalidHookError,useReducer:throwInvalidHookError,useRef:throwInvalidHookError,useState:throwInvalidHookError,useDebugValue:throwInvalidHookError,useDeferredValue:throwInvalidHookError,useTransition:throwInvalidHookError,useMutableSource:throwInvalidHookError,useSyncExternalStore:throwInvalidHookError,useId:throwInvalidHookError,unstable_isNewReconciler:enableNewReconciler};var HooksDispatcherOnMountInDEV=null;var HooksDispatcherOnMountWithHookTypesInDEV=null;var HooksDispatcherOnUpdateInDEV=null;var HooksDispatcherOnRerenderInDEV=null;var InvalidNestedHooksDispatcherOnMountInDEV=null;var InvalidNestedHooksDispatcherOnUpdateInDEV=null;var InvalidNestedHooksDispatcherOnRerenderInDEV=null;{var warnInvalidContextAccess=function(){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().');};var warnInvalidHookAccess=function(){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');};HooksDispatcherOnMountInDEV={readContext:function(context){return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';mountHookTypesDev();checkDepsAreArrayDev(deps);return mountCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';mountHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';mountHookTypesDev();checkDepsAreArrayDev(deps);return mountEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';mountHookTypesDev();checkDepsAreArrayDev(deps);return mountImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';mountHookTypesDev();checkDepsAreArrayDev(deps);return mountInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';mountHookTypesDev();checkDepsAreArrayDev(deps);return mountLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';mountHookTypesDev();checkDepsAreArrayDev(deps);var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';mountHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';mountHookTypesDev();return mountRef(initialValue);},useState:function(initialState){currentHookNameInDev='useState';mountHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';mountHookTypesDev();return mountDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';mountHookTypesDev();return mountDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';mountHookTypesDev();return mountTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';mountHookTypesDev();return mountMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';mountHookTypesDev();return mountSyncExternalStore(subscribe,getSnapshot,getServerSnapshot);},useId:function(){currentHookNameInDev='useId';mountHookTypesDev();return mountId();},unstable_isNewReconciler:enableNewReconciler};HooksDispatcherOnMountWithHookTypesInDEV={readContext:function(context){return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';updateHookTypesDev();return mountCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';updateHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';updateHookTypesDev();return mountEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';updateHookTypesDev();return mountImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';updateHookTypesDev();return mountInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';updateHookTypesDev();return mountLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';updateHookTypesDev();return mountRef(initialValue);},useState:function(initialState){currentHookNameInDev='useState';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';updateHookTypesDev();return mountDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';updateHookTypesDev();return mountDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';updateHookTypesDev();return mountTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';updateHookTypesDev();return mountMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';updateHookTypesDev();return mountSyncExternalStore(subscribe,getSnapshot,getServerSnapshot);},useId:function(){currentHookNameInDev='useId';updateHookTypesDev();return mountId();},unstable_isNewReconciler:enableNewReconciler};HooksDispatcherOnUpdateInDEV={readContext:function(context){return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';updateHookTypesDev();return updateCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';updateHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';updateHookTypesDev();return updateEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';updateHookTypesDev();return updateImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';updateHookTypesDev();return updateInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';updateHookTypesDev();return updateLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';updateHookTypesDev();return updateRef();},useState:function(initialState){currentHookNameInDev='useState';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';updateHookTypesDev();return updateDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';updateHookTypesDev();return updateDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';updateHookTypesDev();return updateTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';updateHookTypesDev();return updateMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';updateHookTypesDev();return updateSyncExternalStore(subscribe,getSnapshot);},useId:function(){currentHookNameInDev='useId';updateHookTypesDev();return updateId();},unstable_isNewReconciler:enableNewReconciler};HooksDispatcherOnRerenderInDEV={readContext:function(context){return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';updateHookTypesDev();return updateCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';updateHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';updateHookTypesDev();return updateEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';updateHookTypesDev();return updateImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';updateHookTypesDev();return updateInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';updateHookTypesDev();return updateLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnRerenderInDEV;try{return updateMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnRerenderInDEV;try{return rerenderReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';updateHookTypesDev();return updateRef();},useState:function(initialState){currentHookNameInDev='useState';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnRerenderInDEV;try{return rerenderState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';updateHookTypesDev();return updateDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';updateHookTypesDev();return rerenderDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';updateHookTypesDev();return rerenderTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';updateHookTypesDev();return updateMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';updateHookTypesDev();return updateSyncExternalStore(subscribe,getSnapshot);},useId:function(){currentHookNameInDev='useId';updateHookTypesDev();return updateId();},unstable_isNewReconciler:enableNewReconciler};InvalidNestedHooksDispatcherOnMountInDEV={readContext:function(context){warnInvalidContextAccess();return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';warnInvalidHookAccess();mountHookTypesDev();return mountCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';warnInvalidHookAccess();mountHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';warnInvalidHookAccess();mountHookTypesDev();return mountEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';warnInvalidHookAccess();mountHookTypesDev();return mountImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';warnInvalidHookAccess();mountHookTypesDev();return mountInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';warnInvalidHookAccess();mountHookTypesDev();return mountLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';warnInvalidHookAccess();mountHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';warnInvalidHookAccess();mountHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';warnInvalidHookAccess();mountHookTypesDev();return mountRef(initialValue);},useState:function(initialState){currentHookNameInDev='useState';warnInvalidHookAccess();mountHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';warnInvalidHookAccess();mountHookTypesDev();return mountDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';warnInvalidHookAccess();mountHookTypesDev();return mountDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';warnInvalidHookAccess();mountHookTypesDev();return mountTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';warnInvalidHookAccess();mountHookTypesDev();return mountMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';warnInvalidHookAccess();mountHookTypesDev();return mountSyncExternalStore(subscribe,getSnapshot,getServerSnapshot);},useId:function(){currentHookNameInDev='useId';warnInvalidHookAccess();mountHookTypesDev();return mountId();},unstable_isNewReconciler:enableNewReconciler};InvalidNestedHooksDispatcherOnUpdateInDEV={readContext:function(context){warnInvalidContextAccess();return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';warnInvalidHookAccess();updateHookTypesDev();return updateCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';warnInvalidHookAccess();updateHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';warnInvalidHookAccess();updateHookTypesDev();return updateEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';warnInvalidHookAccess();updateHookTypesDev();return updateImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';warnInvalidHookAccess();updateHookTypesDev();return updateInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';warnInvalidHookAccess();updateHookTypesDev();return updateLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';warnInvalidHookAccess();updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';warnInvalidHookAccess();updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';warnInvalidHookAccess();updateHookTypesDev();return updateRef();},useState:function(initialState){currentHookNameInDev='useState';warnInvalidHookAccess();updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';warnInvalidHookAccess();updateHookTypesDev();return updateDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';warnInvalidHookAccess();updateHookTypesDev();return updateDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';warnInvalidHookAccess();updateHookTypesDev();return updateTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';warnInvalidHookAccess();updateHookTypesDev();return updateMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';warnInvalidHookAccess();updateHookTypesDev();return updateSyncExternalStore(subscribe,getSnapshot);},useId:function(){currentHookNameInDev='useId';warnInvalidHookAccess();updateHookTypesDev();return updateId();},unstable_isNewReconciler:enableNewReconciler};InvalidNestedHooksDispatcherOnRerenderInDEV={readContext:function(context){warnInvalidContextAccess();return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';warnInvalidHookAccess();updateHookTypesDev();return updateCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';warnInvalidHookAccess();updateHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';warnInvalidHookAccess();updateHookTypesDev();return updateEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';warnInvalidHookAccess();updateHookTypesDev();return updateImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';warnInvalidHookAccess();updateHookTypesDev();return updateInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';warnInvalidHookAccess();updateHookTypesDev();return updateLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';warnInvalidHookAccess();updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';warnInvalidHookAccess();updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return rerenderReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';warnInvalidHookAccess();updateHookTypesDev();return updateRef();},useState:function(initialState){currentHookNameInDev='useState';warnInvalidHookAccess();updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return rerenderState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';warnInvalidHookAccess();updateHookTypesDev();return updateDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';warnInvalidHookAccess();updateHookTypesDev();return rerenderDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';warnInvalidHookAccess();updateHookTypesDev();return rerenderTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';warnInvalidHookAccess();updateHookTypesDev();return updateMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';warnInvalidHookAccess();updateHookTypesDev();return updateSyncExternalStore(subscribe,getSnapshot);},useId:function(){currentHookNameInDev='useId';warnInvalidHookAccess();updateHookTypesDev();return updateId();},unstable_isNewReconciler:enableNewReconciler};}var now$1=Scheduler.unstable_now;var commitTime=0;var layoutEffectStartTime=-1;var profilerStartTime=-1;var passiveEffectStartTime=-1;/**
11125
- * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).
11126
- *
11127
- * The overall sequence is:
11128
- * 1. render
11129
- * 2. commit (and call `onRender`, `onCommit`)
11130
- * 3. check for nested updates
11131
- * 4. flush passive effects (and call `onPostCommit`)
11132
- *
11133
- * Nested updates are identified in step 3 above,
11134
- * but step 4 still applies to the work that was just committed.
11135
- * We use two flags to track nested updates then:
11136
- * one tracks whether the upcoming update is a nested update,
11137
- * and the other tracks whether the current update was a nested update.
11138
- * The first value gets synced to the second at the start of the render phase.
11139
- */var currentUpdateIsNested=false;var nestedUpdateScheduled=false;function isCurrentUpdateNested(){return currentUpdateIsNested;}function markNestedUpdateScheduled(){{nestedUpdateScheduled=true;}}function resetNestedUpdateFlag(){{currentUpdateIsNested=false;nestedUpdateScheduled=false;}}function syncNestedUpdateFlag(){{currentUpdateIsNested=nestedUpdateScheduled;nestedUpdateScheduled=false;}}function getCommitTime(){return commitTime;}function recordCommitTime(){commitTime=now$1();}function startProfilerTimer(fiber){profilerStartTime=now$1();if(fiber.actualStartTime<0){fiber.actualStartTime=now$1();}}function stopProfilerTimerIfRunning(fiber){profilerStartTime=-1;}function stopProfilerTimerIfRunningAndRecordDelta(fiber,overrideBaseTime){if(profilerStartTime>=0){var elapsedTime=now$1()-profilerStartTime;fiber.actualDuration+=elapsedTime;if(overrideBaseTime){fiber.selfBaseDuration=elapsedTime;}profilerStartTime=-1;}}function recordLayoutEffectDuration(fiber){if(layoutEffectStartTime>=0){var elapsedTime=now$1()-layoutEffectStartTime;layoutEffectStartTime=-1;// Store duration on the next nearest Profiler ancestor
11393
+ markRootEntangled(root,newQueueLanes);}}function markUpdateInDevTools(fiber,lane,action){{markStateUpdateScheduled(fiber,lane);}}var ContextOnlyDispatcher={readContext:readContext,useCallback:throwInvalidHookError,useContext:throwInvalidHookError,useEffect:throwInvalidHookError,useImperativeHandle:throwInvalidHookError,useInsertionEffect:throwInvalidHookError,useLayoutEffect:throwInvalidHookError,useMemo:throwInvalidHookError,useReducer:throwInvalidHookError,useRef:throwInvalidHookError,useState:throwInvalidHookError,useDebugValue:throwInvalidHookError,useDeferredValue:throwInvalidHookError,useTransition:throwInvalidHookError,useMutableSource:throwInvalidHookError,useSyncExternalStore:throwInvalidHookError,useId:throwInvalidHookError,unstable_isNewReconciler:enableNewReconciler};var HooksDispatcherOnMountInDEV=null;var HooksDispatcherOnMountWithHookTypesInDEV=null;var HooksDispatcherOnUpdateInDEV=null;var HooksDispatcherOnRerenderInDEV=null;var InvalidNestedHooksDispatcherOnMountInDEV=null;var InvalidNestedHooksDispatcherOnUpdateInDEV=null;var InvalidNestedHooksDispatcherOnRerenderInDEV=null;{var warnInvalidContextAccess=function(){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().');};var warnInvalidHookAccess=function(){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');};HooksDispatcherOnMountInDEV={readContext:function(context){return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';mountHookTypesDev();checkDepsAreArrayDev(deps);return mountCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';mountHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';mountHookTypesDev();checkDepsAreArrayDev(deps);return mountEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';mountHookTypesDev();checkDepsAreArrayDev(deps);return mountImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';mountHookTypesDev();checkDepsAreArrayDev(deps);return mountInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';mountHookTypesDev();checkDepsAreArrayDev(deps);return mountLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';mountHookTypesDev();checkDepsAreArrayDev(deps);var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';mountHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';mountHookTypesDev();return mountRef(initialValue);},useState:function(initialState){currentHookNameInDev='useState';mountHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';mountHookTypesDev();return mountDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';mountHookTypesDev();return mountDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';mountHookTypesDev();return mountTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';mountHookTypesDev();return mountMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';mountHookTypesDev();return mountSyncExternalStore(subscribe,getSnapshot,getServerSnapshot);},useId:function(){currentHookNameInDev='useId';mountHookTypesDev();return mountId();},unstable_isNewReconciler:enableNewReconciler};HooksDispatcherOnMountWithHookTypesInDEV={readContext:function(context){return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';updateHookTypesDev();return mountCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';updateHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';updateHookTypesDev();return mountEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';updateHookTypesDev();return mountImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';updateHookTypesDev();return mountInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';updateHookTypesDev();return mountLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';updateHookTypesDev();return mountRef(initialValue);},useState:function(initialState){currentHookNameInDev='useState';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';updateHookTypesDev();return mountDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';updateHookTypesDev();return mountDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';updateHookTypesDev();return mountTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';updateHookTypesDev();return mountMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';updateHookTypesDev();return mountSyncExternalStore(subscribe,getSnapshot,getServerSnapshot);},useId:function(){currentHookNameInDev='useId';updateHookTypesDev();return mountId();},unstable_isNewReconciler:enableNewReconciler};HooksDispatcherOnUpdateInDEV={readContext:function(context){return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';updateHookTypesDev();return updateCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';updateHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';updateHookTypesDev();return updateEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';updateHookTypesDev();return updateImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';updateHookTypesDev();return updateInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';updateHookTypesDev();return updateLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';updateHookTypesDev();return updateRef();},useState:function(initialState){currentHookNameInDev='useState';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';updateHookTypesDev();return updateDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';updateHookTypesDev();return updateDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';updateHookTypesDev();return updateTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';updateHookTypesDev();return updateMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';updateHookTypesDev();return updateSyncExternalStore(subscribe,getSnapshot);},useId:function(){currentHookNameInDev='useId';updateHookTypesDev();return updateId();},unstable_isNewReconciler:enableNewReconciler};HooksDispatcherOnRerenderInDEV={readContext:function(context){return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';updateHookTypesDev();return updateCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';updateHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';updateHookTypesDev();return updateEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';updateHookTypesDev();return updateImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';updateHookTypesDev();return updateInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';updateHookTypesDev();return updateLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnRerenderInDEV;try{return updateMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnRerenderInDEV;try{return rerenderReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';updateHookTypesDev();return updateRef();},useState:function(initialState){currentHookNameInDev='useState';updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnRerenderInDEV;try{return rerenderState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';updateHookTypesDev();return updateDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';updateHookTypesDev();return rerenderDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';updateHookTypesDev();return rerenderTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';updateHookTypesDev();return updateMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';updateHookTypesDev();return updateSyncExternalStore(subscribe,getSnapshot);},useId:function(){currentHookNameInDev='useId';updateHookTypesDev();return updateId();},unstable_isNewReconciler:enableNewReconciler};InvalidNestedHooksDispatcherOnMountInDEV={readContext:function(context){warnInvalidContextAccess();return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';warnInvalidHookAccess();mountHookTypesDev();return mountCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';warnInvalidHookAccess();mountHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';warnInvalidHookAccess();mountHookTypesDev();return mountEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';warnInvalidHookAccess();mountHookTypesDev();return mountImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';warnInvalidHookAccess();mountHookTypesDev();return mountInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';warnInvalidHookAccess();mountHookTypesDev();return mountLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';warnInvalidHookAccess();mountHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';warnInvalidHookAccess();mountHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';warnInvalidHookAccess();mountHookTypesDev();return mountRef(initialValue);},useState:function(initialState){currentHookNameInDev='useState';warnInvalidHookAccess();mountHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnMountInDEV;try{return mountState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';warnInvalidHookAccess();mountHookTypesDev();return mountDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';warnInvalidHookAccess();mountHookTypesDev();return mountDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';warnInvalidHookAccess();mountHookTypesDev();return mountTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';warnInvalidHookAccess();mountHookTypesDev();return mountMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';warnInvalidHookAccess();mountHookTypesDev();return mountSyncExternalStore(subscribe,getSnapshot,getServerSnapshot);},useId:function(){currentHookNameInDev='useId';warnInvalidHookAccess();mountHookTypesDev();return mountId();},unstable_isNewReconciler:enableNewReconciler};InvalidNestedHooksDispatcherOnUpdateInDEV={readContext:function(context){warnInvalidContextAccess();return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';warnInvalidHookAccess();updateHookTypesDev();return updateCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';warnInvalidHookAccess();updateHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';warnInvalidHookAccess();updateHookTypesDev();return updateEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';warnInvalidHookAccess();updateHookTypesDev();return updateImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';warnInvalidHookAccess();updateHookTypesDev();return updateInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';warnInvalidHookAccess();updateHookTypesDev();return updateLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';warnInvalidHookAccess();updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';warnInvalidHookAccess();updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';warnInvalidHookAccess();updateHookTypesDev();return updateRef();},useState:function(initialState){currentHookNameInDev='useState';warnInvalidHookAccess();updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';warnInvalidHookAccess();updateHookTypesDev();return updateDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';warnInvalidHookAccess();updateHookTypesDev();return updateDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';warnInvalidHookAccess();updateHookTypesDev();return updateTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';warnInvalidHookAccess();updateHookTypesDev();return updateMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';warnInvalidHookAccess();updateHookTypesDev();return updateSyncExternalStore(subscribe,getSnapshot);},useId:function(){currentHookNameInDev='useId';warnInvalidHookAccess();updateHookTypesDev();return updateId();},unstable_isNewReconciler:enableNewReconciler};InvalidNestedHooksDispatcherOnRerenderInDEV={readContext:function(context){warnInvalidContextAccess();return readContext(context);},useCallback:function(callback,deps){currentHookNameInDev='useCallback';warnInvalidHookAccess();updateHookTypesDev();return updateCallback(callback,deps);},useContext:function(context){currentHookNameInDev='useContext';warnInvalidHookAccess();updateHookTypesDev();return readContext(context);},useEffect:function(create,deps){currentHookNameInDev='useEffect';warnInvalidHookAccess();updateHookTypesDev();return updateEffect(create,deps);},useImperativeHandle:function(ref,create,deps){currentHookNameInDev='useImperativeHandle';warnInvalidHookAccess();updateHookTypesDev();return updateImperativeHandle(ref,create,deps);},useInsertionEffect:function(create,deps){currentHookNameInDev='useInsertionEffect';warnInvalidHookAccess();updateHookTypesDev();return updateInsertionEffect(create,deps);},useLayoutEffect:function(create,deps){currentHookNameInDev='useLayoutEffect';warnInvalidHookAccess();updateHookTypesDev();return updateLayoutEffect(create,deps);},useMemo:function(create,deps){currentHookNameInDev='useMemo';warnInvalidHookAccess();updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return updateMemo(create,deps);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useReducer:function(reducer,initialArg,init){currentHookNameInDev='useReducer';warnInvalidHookAccess();updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return rerenderReducer(reducer,initialArg,init);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useRef:function(initialValue){currentHookNameInDev='useRef';warnInvalidHookAccess();updateHookTypesDev();return updateRef();},useState:function(initialState){currentHookNameInDev='useState';warnInvalidHookAccess();updateHookTypesDev();var prevDispatcher=ReactCurrentDispatcher$1.current;ReactCurrentDispatcher$1.current=InvalidNestedHooksDispatcherOnUpdateInDEV;try{return rerenderState(initialState);}finally{ReactCurrentDispatcher$1.current=prevDispatcher;}},useDebugValue:function(value,formatterFn){currentHookNameInDev='useDebugValue';warnInvalidHookAccess();updateHookTypesDev();return updateDebugValue();},useDeferredValue:function(value){currentHookNameInDev='useDeferredValue';warnInvalidHookAccess();updateHookTypesDev();return rerenderDeferredValue(value);},useTransition:function(){currentHookNameInDev='useTransition';warnInvalidHookAccess();updateHookTypesDev();return rerenderTransition();},useMutableSource:function(source,getSnapshot,subscribe){currentHookNameInDev='useMutableSource';warnInvalidHookAccess();updateHookTypesDev();return updateMutableSource();},useSyncExternalStore:function(subscribe,getSnapshot,getServerSnapshot){currentHookNameInDev='useSyncExternalStore';warnInvalidHookAccess();updateHookTypesDev();return updateSyncExternalStore(subscribe,getSnapshot);},useId:function(){currentHookNameInDev='useId';warnInvalidHookAccess();updateHookTypesDev();return updateId();},unstable_isNewReconciler:enableNewReconciler};}var now$1=Scheduler.unstable_now;var commitTime=0;var layoutEffectStartTime=-1;var profilerStartTime=-1;var passiveEffectStartTime=-1;/**
11394
+ * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).
11395
+ *
11396
+ * The overall sequence is:
11397
+ * 1. render
11398
+ * 2. commit (and call `onRender`, `onCommit`)
11399
+ * 3. check for nested updates
11400
+ * 4. flush passive effects (and call `onPostCommit`)
11401
+ *
11402
+ * Nested updates are identified in step 3 above,
11403
+ * but step 4 still applies to the work that was just committed.
11404
+ * We use two flags to track nested updates then:
11405
+ * one tracks whether the upcoming update is a nested update,
11406
+ * and the other tracks whether the current update was a nested update.
11407
+ * The first value gets synced to the second at the start of the render phase.
11408
+ */var currentUpdateIsNested=false;var nestedUpdateScheduled=false;function isCurrentUpdateNested(){return currentUpdateIsNested;}function markNestedUpdateScheduled(){{nestedUpdateScheduled=true;}}function resetNestedUpdateFlag(){{currentUpdateIsNested=false;nestedUpdateScheduled=false;}}function syncNestedUpdateFlag(){{currentUpdateIsNested=nestedUpdateScheduled;nestedUpdateScheduled=false;}}function getCommitTime(){return commitTime;}function recordCommitTime(){commitTime=now$1();}function startProfilerTimer(fiber){profilerStartTime=now$1();if(fiber.actualStartTime<0){fiber.actualStartTime=now$1();}}function stopProfilerTimerIfRunning(fiber){profilerStartTime=-1;}function stopProfilerTimerIfRunningAndRecordDelta(fiber,overrideBaseTime){if(profilerStartTime>=0){var elapsedTime=now$1()-profilerStartTime;fiber.actualDuration+=elapsedTime;if(overrideBaseTime){fiber.selfBaseDuration=elapsedTime;}profilerStartTime=-1;}}function recordLayoutEffectDuration(fiber){if(layoutEffectStartTime>=0){var elapsedTime=now$1()-layoutEffectStartTime;layoutEffectStartTime=-1;// Store duration on the next nearest Profiler ancestor
11140
11409
  // Or the root (for the DevTools Profiler to read)
11141
11410
  var parentFiber=fiber.return;while(parentFiber!==null){switch(parentFiber.tag){case HostRoot:var root=parentFiber.stateNode;root.effectDuration+=elapsedTime;return;case Profiler:var parentStateNode=parentFiber.stateNode;parentStateNode.effectDuration+=elapsedTime;return;}parentFiber=parentFiber.return;}}}function recordPassiveEffectDuration(fiber){if(passiveEffectStartTime>=0){var elapsedTime=now$1()-passiveEffectStartTime;passiveEffectStartTime=-1;// Store duration on the next nearest Profiler ancestor
11142
11411
  // Or the root (for the DevTools Profiler to read)
@@ -11918,8 +12187,7 @@ var _resolvedProps3=resolveDefaultProps(_type2,_unresolvedProps3);{if(workInProg
11918
12187
  workInProgress.flags|=Update;}function markRef$1(workInProgress){workInProgress.flags|=Ref;{workInProgress.flags|=RefStatic;}}var appendAllChildren;var updateHostContainer;var updateHostComponent$1;var updateHostText$1;{// Mutation mode
11919
12188
  appendAllChildren=function(parent,workInProgress,needsVisibilityToggle,isHidden){// We only have the top Fiber that was created but we need recurse down its
11920
12189
  // children to find all the terminal nodes.
11921
- var node=workInProgress.child;while(node!==null){if(node.tag===HostComponent||node.tag===HostText){appendInitialChild(parent,node.stateNode);}else if(node.tag===HostPortal);else if(node.child!==null){node.child.return=node;node=node.child;continue;}if(node===workInProgress){return;}while(node.sibling===null){if(node.return===null||node.return===workInProgress){return;}node=node.return;}node.sibling.return=node.return;node=node.sibling;}};updateHostContainer=function(current,workInProgress){// Noop
11922
- };updateHostComponent$1=function(current,workInProgress,type,newProps,rootContainerInstance){// If we have an alternate, that means this is an update and we need to
12190
+ var node=workInProgress.child;while(node!==null){if(node.tag===HostComponent||node.tag===HostText){appendInitialChild(parent,node.stateNode);}else if(node.tag===HostPortal);else if(node.child!==null){node.child.return=node;node=node.child;continue;}if(node===workInProgress){return;}while(node.sibling===null){if(node.return===null||node.return===workInProgress){return;}node=node.return;}node.sibling.return=node.return;node=node.sibling;}};updateHostContainer=function(current,workInProgress){};updateHostComponent$1=function(current,workInProgress,type,newProps,rootContainerInstance){// If we have an alternate, that means this is an update and we need to
11923
12191
  // schedule a side-effect to do the updates.
11924
12192
  var oldProps=current.memoizedProps;if(oldProps===newProps){// In mutation mode, this is sufficient for a bailout because
11925
12193
  // we won't touch this node even if children changed.
@@ -13194,8 +13462,7 @@ var hydrationCallbacks=options!=null?options:null;// TODO: Delete this option
13194
13462
  var mutableSources=options!=null&&options.hydratedSources||null;var isStrictMode=false;var concurrentUpdatesByDefaultOverride=false;var identifierPrefix='';var onRecoverableError=defaultOnRecoverableError;if(options!==null&&options!==undefined){if(options.unstable_strictMode===true){isStrictMode=true;}if(options.identifierPrefix!==undefined){identifierPrefix=options.identifierPrefix;}if(options.onRecoverableError!==undefined){onRecoverableError=options.onRecoverableError;}}var root=createHydrationContainer(initialChildren,null,container,ConcurrentRoot,hydrationCallbacks,isStrictMode,concurrentUpdatesByDefaultOverride,identifierPrefix,onRecoverableError);markContainerAsRoot(root.current,container);// This can't be a comment node since hydration doesn't work on comment nodes anyway.
13195
13463
  listenToAllSupportedEvents(container);if(mutableSources){for(var i=0;i<mutableSources.length;i++){var mutableSource=mutableSources[i];registerMutableSourceForHydration(root,mutableSource);}}return new ReactDOMHydrationRoot(root);}function isValidContainer(node){return !!(node&&(node.nodeType===ELEMENT_NODE||node.nodeType===DOCUMENT_NODE||node.nodeType===DOCUMENT_FRAGMENT_NODE||!disableCommentsAsDOMContainers));}// TODO: Remove this function which also includes comment nodes.
13196
13464
  // We only use it in places that are currently more relaxed.
13197
- function isValidContainerLegacy(node){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 '));}function warnIfReactDOMContainerInDEV(container){{if(container.nodeType===ELEMENT_NODE&&container.tagName&&container.tagName.toUpperCase()==='BODY'){error('createRoot(): Creating roots directly with 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 using a container element created '+'for your app.');}if(isContainerMarkedAsRoot(container)){if(container._reactRootContainer){error('You are calling ReactDOMClient.createRoot() on a container that was previously '+'passed to ReactDOM.render(). This is not supported.');}else {error('You are calling ReactDOMClient.createRoot() on a container that '+'has already been passed to createRoot() before. Instead, call '+'root.render() on the existing root instead if you want to update it.');}}}}var ReactCurrentOwner$3=ReactSharedInternals.ReactCurrentOwner;var topLevelUpdateWarnings;{topLevelUpdateWarnings=function(container){if(container._reactRootContainer&&container.nodeType!==COMMENT_NODE){var hostInstance=findHostInstanceWithNoPortals(container._reactRootContainer.current);if(hostInstance){if(hostInstance.parentNode!==container){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.');}}}var isRootRenderedBySomeReact=!!container._reactRootContainer;var rootEl=getReactRootElementInContainer(container);var hasNonRootReactChild=!!(rootEl&&getInstanceFromNode(rootEl));if(hasNonRootReactChild&&!isRootRenderedBySomeReact){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.');}if(container.nodeType===ELEMENT_NODE&&container.tagName&&container.tagName.toUpperCase()==='BODY'){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.');}};}function getReactRootElementInContainer(container){if(!container){return null;}if(container.nodeType===DOCUMENT_NODE){return container.documentElement;}else {return container.firstChild;}}function noopOnRecoverableError(){// This isn't reachable because onRecoverableError isn't called in the
13198
- // legacy API.
13465
+ function isValidContainerLegacy(node){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 '));}function warnIfReactDOMContainerInDEV(container){{if(container.nodeType===ELEMENT_NODE&&container.tagName&&container.tagName.toUpperCase()==='BODY'){error('createRoot(): Creating roots directly with 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 using a container element created '+'for your app.');}if(isContainerMarkedAsRoot(container)){if(container._reactRootContainer){error('You are calling ReactDOMClient.createRoot() on a container that was previously '+'passed to ReactDOM.render(). This is not supported.');}else {error('You are calling ReactDOMClient.createRoot() on a container that '+'has already been passed to createRoot() before. Instead, call '+'root.render() on the existing root instead if you want to update it.');}}}}var ReactCurrentOwner$3=ReactSharedInternals.ReactCurrentOwner;var topLevelUpdateWarnings;{topLevelUpdateWarnings=function(container){if(container._reactRootContainer&&container.nodeType!==COMMENT_NODE){var hostInstance=findHostInstanceWithNoPortals(container._reactRootContainer.current);if(hostInstance){if(hostInstance.parentNode!==container){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.');}}}var isRootRenderedBySomeReact=!!container._reactRootContainer;var rootEl=getReactRootElementInContainer(container);var hasNonRootReactChild=!!(rootEl&&getInstanceFromNode(rootEl));if(hasNonRootReactChild&&!isRootRenderedBySomeReact){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.');}if(container.nodeType===ELEMENT_NODE&&container.tagName&&container.tagName.toUpperCase()==='BODY'){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.');}};}function getReactRootElementInContainer(container){if(!container){return null;}if(container.nodeType===DOCUMENT_NODE){return container.documentElement;}else {return container.firstChild;}}function noopOnRecoverableError(){// legacy API.
13199
13466
  }function legacyCreateRootFromDOMContainer(container,initialChildren,parentComponent,callback,isHydrationContainer){if(isHydrationContainer){if(typeof callback==='function'){var originalCallback=callback;callback=function(){var instance=getPublicRootInstance(root);originalCallback.call(instance);};}var root=createHydrationContainer(initialChildren,callback,container,LegacyRoot,null,// hydrationCallbacks
13200
13467
  false,// isStrictMode
13201
13468
  false,// concurrentUpdatesByDefaultOverride,
@@ -13288,32 +13555,42 @@ var DEFAULT_SHEET_OPTIONS = {
13288
13555
  className: '',
13289
13556
  confirmBeforeClose: false,
13290
13557
  confirmMessage: 'Are you sure you want to close?',
13291
- confirmCallback: function (msg) {
13292
- return __awaiter(void 0, void 0, void 0, function () {
13293
- return __generator(this, function (_a) {
13294
- return [2 /*return*/, typeof window !== 'undefined' ? Promise.resolve(window.confirm(msg)) : Promise.resolve(true)];
13295
- });
13296
- });
13297
- },
13558
+ confirmCallback: function () {
13559
+ var _confirmCallback = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(msg) {
13560
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13561
+ while (1) switch (_context.prev = _context.next) {
13562
+ case 0:
13563
+ return _context.abrupt("return", typeof window !== 'undefined' ? Promise.resolve(window.confirm(msg)) : Promise.resolve(true));
13564
+ case 1:
13565
+ case "end":
13566
+ return _context.stop();
13567
+ }
13568
+ }, _callee);
13569
+ }));
13570
+ function confirmCallback(_x) {
13571
+ return _confirmCallback.apply(this, arguments);
13572
+ }
13573
+ return confirmCallback;
13574
+ }(),
13298
13575
  closeOnOverlayClick: true,
13299
13576
  closeOnEsc: true,
13300
13577
  animationDuration: 240,
13301
- onOpen: function () {},
13302
- onClose: function () {}
13578
+ onOpen: function onOpen() {},
13579
+ onClose: function onClose() {}
13303
13580
  };
13304
13581
 
13305
- var SideSheetContainer = function (_a) {
13306
- var stack = _a.stack,
13307
- open = _a.open,
13308
- close = _a.close,
13309
- update = _a.update,
13310
- config = _a.config;
13582
+ var SideSheetContainer = function SideSheetContainer(_ref) {
13583
+ var stack = _ref.stack,
13584
+ open = _ref.open,
13585
+ close = _ref.close,
13586
+ update = _ref.update,
13587
+ config = _ref.config;
13311
13588
  useEffect(function () {
13312
- var onKeyDown = function (e) {
13589
+ var onKeyDown = function onKeyDown(e) {
13313
13590
  if (e.key === 'Escape') {
13314
- var top_1 = stack[stack.length - 1];
13315
- if ((top_1 === null || top_1 === void 0 ? void 0 : top_1.options.closeOnEsc) && top_1.state === 'open') {
13316
- close(top_1.id);
13591
+ var top = stack[stack.length - 1];
13592
+ if (top !== null && top !== void 0 && top.options.closeOnEsc && top.state === 'open') {
13593
+ close(top.id);
13317
13594
  }
13318
13595
  }
13319
13596
  };
@@ -13322,33 +13599,33 @@ var SideSheetContainer = function (_a) {
13322
13599
  document.removeEventListener('keydown', onKeyDown);
13323
13600
  };
13324
13601
  }, [stack, close]);
13325
- return React.createElement(React.Fragment, null, stack.map(function (item, idx) {
13326
- var _a;
13602
+ return /*#__PURE__*/React.createElement(React.Fragment, null, stack.map(function (item, idx) {
13603
+ var _stack;
13327
13604
  var isTop = idx === stack.length - 1;
13328
- var isPrevClosing = ((_a = stack[idx - 1]) === null || _a === void 0 ? void 0 : _a.state) === 'closing';
13329
- var _b = item.options,
13330
- width = _b.width,
13331
- closeOnOverlayClick = _b.closeOnOverlayClick,
13332
- className = _b.className;
13605
+ var isPrevClosing = ((_stack = stack[idx - 1]) === null || _stack === void 0 ? void 0 : _stack.state) === 'closing';
13606
+ var _item$options = item.options,
13607
+ width = _item$options.width,
13608
+ closeOnOverlayClick = _item$options.closeOnOverlayClick,
13609
+ className = _item$options.className;
13333
13610
  if (config.mountStrategy === 'top-only' && !isTop && !isPrevClosing) return null;
13334
- return React.createElement(React.Fragment, {
13611
+ return /*#__PURE__*/React.createElement(React.Fragment, {
13335
13612
  key: item.id
13336
- }, React.createElement("div", {
13613
+ }, /*#__PURE__*/React.createElement("div", {
13337
13614
  className: "sidesheet-overlay",
13338
- onClick: function () {
13615
+ onClick: function onClick() {
13339
13616
  if (closeOnOverlayClick && item.state === 'open') {
13340
13617
  close(item.id);
13341
13618
  }
13342
13619
  }
13343
- }), React.createElement("div", {
13620
+ }), /*#__PURE__*/React.createElement("div", {
13344
13621
  role: "dialog",
13345
13622
  "aria-modal": "true",
13346
- className: classnames('sidesheet', "sidesheet-animation-" + item.state, {
13623
+ className: classnames('sidesheet', "sidesheet-animation-".concat(item.state), {
13347
13624
  'sidesheet-left': config.side === 'left',
13348
13625
  'sidesheet-right': config.side === 'right'
13349
13626
  }, className),
13350
13627
  style: {
13351
- width: "" + (isTop || isPrevClosing ? width + "px" : '100%')
13628
+ width: "".concat(isTop || isPrevClosing ? "".concat(width, "px") : '100%')
13352
13629
  }
13353
13630
  }, item.element({
13354
13631
  sideId: item.id,
@@ -13360,19 +13637,19 @@ var SideSheetContainer = function (_a) {
13360
13637
  }));
13361
13638
  };
13362
13639
 
13363
- var SideSheetReducer = function (state, action) {
13640
+ var SideSheetReducer = function SideSheetReducer(state, action) {
13364
13641
  switch (action.type) {
13365
13642
  case 'OPEN':
13366
- return __spreadArrays(state, [action.payload]);
13643
+ return [].concat(_toConsumableArray(state), [action.payload]);
13367
13644
  case 'SET_OPEN':
13368
13645
  return state.map(function (item) {
13369
- return item.id === action.id ? __assign$1(__assign$1({}, item), {
13646
+ return item.id === action.id ? _objectSpread2(_objectSpread2({}, item), {}, {
13370
13647
  state: 'open'
13371
13648
  }) : item;
13372
13649
  });
13373
13650
  case 'CLOSE':
13374
13651
  return state.map(function (item) {
13375
- return action.id === null || item.id === action.id ? __assign$1(__assign$1({}, item), {
13652
+ return action.id === null || item.id === action.id ? _objectSpread2(_objectSpread2({}, item), {}, {
13376
13653
  state: 'closing'
13377
13654
  }) : item;
13378
13655
  });
@@ -13382,8 +13659,8 @@ var SideSheetReducer = function (state, action) {
13382
13659
  });
13383
13660
  case 'UPDATE':
13384
13661
  return state.map(function (item) {
13385
- return item.id === action.id ? __assign$1(__assign$1({}, item), {
13386
- options: __assign$1(__assign$1({}, item.options), action.options)
13662
+ return item.id === action.id ? _objectSpread2(_objectSpread2({}, item), {}, {
13663
+ options: _objectSpread2(_objectSpread2({}, item.options), action.options)
13387
13664
  }) : item;
13388
13665
  });
13389
13666
  default:
@@ -13391,24 +13668,23 @@ var SideSheetReducer = function (state, action) {
13391
13668
  }
13392
13669
  };
13393
13670
 
13394
- var SideSheetContext = createContext(null);
13395
- var SideSheetProvider = function (_a) {
13396
- var children = _a.children,
13397
- configuration = _a.configuration;
13398
- var _b = useReducer(SideSheetReducer, []),
13399
- stack = _b[0],
13400
- dispatch = _b[1];
13671
+ var SideSheetContext = /*#__PURE__*/createContext(null);
13672
+ var SideSheetProvider = function SideSheetProvider(_ref) {
13673
+ var children = _ref.children,
13674
+ configuration = _ref.configuration;
13675
+ var _useReducer = useReducer(SideSheetReducer, []),
13676
+ _useReducer2 = _slicedToArray(_useReducer, 2),
13677
+ stack = _useReducer2[0],
13678
+ dispatch = _useReducer2[1];
13401
13679
  var idRef = useRef(0);
13402
13680
  var stackRef = useRef(stack);
13403
13681
  useEffect(function () {
13404
13682
  stackRef.current = stack;
13405
13683
  }, [stack]);
13406
- var open = useCallback(function (element, opts) {
13407
- if (opts === void 0) {
13408
- opts = {};
13409
- }
13684
+ var open = useCallback(function (element) {
13685
+ var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13410
13686
  var id = ++idRef.current;
13411
- var options = __assign$1(__assign$1({}, DEFAULT_SHEET_OPTIONS), opts);
13687
+ var options = _objectSpread2(_objectSpread2({}, DEFAULT_SHEET_OPTIONS), opts);
13412
13688
  dispatch({
13413
13689
  type: 'OPEN',
13414
13690
  payload: {
@@ -13419,44 +13695,65 @@ var SideSheetProvider = function (_a) {
13419
13695
  }
13420
13696
  });
13421
13697
  setTimeout(function () {
13422
- var _a;
13698
+ var _options$onOpen;
13423
13699
  dispatch({
13424
13700
  type: 'SET_OPEN',
13425
13701
  id: id
13426
13702
  });
13427
- (_a = options.onOpen) === null || _a === void 0 ? void 0 : _a.call(options, id);
13703
+ (_options$onOpen = options.onOpen) === null || _options$onOpen === void 0 || _options$onOpen.call(options, id);
13428
13704
  }, options.animationDuration);
13429
13705
  return id;
13430
13706
  }, []);
13431
- var close = useCallback(function (id) {
13432
- return __awaiter(void 0, void 0, void 0, function () {
13433
- var itemsToClose, _i, itemsToClose_1, item, confirmed, duration;
13434
- var _a, _b, _c;
13435
- return __generator(this, function (_d) {
13436
- switch (_d.label) {
13707
+ var close = useCallback(/*#__PURE__*/function () {
13708
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(id) {
13709
+ var _itemsToClose;
13710
+ var itemsToClose, _iterator, _step, _item$options$onClose, _item$options, item, confirmed, duration;
13711
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13712
+ while (1) switch (_context.prev = _context.next) {
13437
13713
  case 0:
13438
- itemsToClose = id === null ? __spreadArrays(stackRef.current) : stackRef.current.filter(function (i) {
13714
+ itemsToClose = id === null ? _toConsumableArray(stackRef.current) : stackRef.current.filter(function (i) {
13439
13715
  return i.id === id;
13440
13716
  });
13441
- _i = 0, itemsToClose_1 = itemsToClose;
13442
- _d.label = 1;
13443
- case 1:
13444
- if (!(_i < itemsToClose_1.length)) return [3 /*break*/, 5];
13445
- item = itemsToClose_1[_i];
13446
- if (!item.options.confirmBeforeClose) return [3 /*break*/, 3];
13447
- return [4 /*yield*/, item.options.confirmCallback(item.options.confirmMessage)];
13448
- case 2:
13449
- confirmed = _d.sent();
13450
- if (!confirmed) return [2 /*return*/];
13451
- _d.label = 3;
13452
- case 3:
13453
- (_b = (_a = item.options).onClose) === null || _b === void 0 ? void 0 : _b.call(_a, item.id);
13454
- _d.label = 4;
13717
+ _iterator = _createForOfIteratorHelper(itemsToClose);
13718
+ _context.prev = 2;
13719
+ _iterator.s();
13455
13720
  case 4:
13456
- _i++;
13457
- return [3 /*break*/, 1];
13458
- case 5:
13459
- duration = (_c = itemsToClose[itemsToClose.length - 1]) === null || _c === void 0 ? void 0 : _c.options.animationDuration;
13721
+ if ((_step = _iterator.n()).done) {
13722
+ _context.next = 15;
13723
+ break;
13724
+ }
13725
+ item = _step.value;
13726
+ if (!item.options.confirmBeforeClose) {
13727
+ _context.next = 12;
13728
+ break;
13729
+ }
13730
+ _context.next = 9;
13731
+ return item.options.confirmCallback(item.options.confirmMessage);
13732
+ case 9:
13733
+ confirmed = _context.sent;
13734
+ if (confirmed) {
13735
+ _context.next = 12;
13736
+ break;
13737
+ }
13738
+ return _context.abrupt("return");
13739
+ case 12:
13740
+ (_item$options$onClose = (_item$options = item.options).onClose) === null || _item$options$onClose === void 0 || _item$options$onClose.call(_item$options, item.id);
13741
+ case 13:
13742
+ _context.next = 4;
13743
+ break;
13744
+ case 15:
13745
+ _context.next = 20;
13746
+ break;
13747
+ case 17:
13748
+ _context.prev = 17;
13749
+ _context.t0 = _context["catch"](2);
13750
+ _iterator.e(_context.t0);
13751
+ case 20:
13752
+ _context.prev = 20;
13753
+ _iterator.f();
13754
+ return _context.finish(20);
13755
+ case 23:
13756
+ duration = (_itemsToClose = itemsToClose[itemsToClose.length - 1]) === null || _itemsToClose === void 0 ? void 0 : _itemsToClose.options.animationDuration;
13460
13757
  dispatch({
13461
13758
  type: 'CLOSE',
13462
13759
  id: id
@@ -13476,11 +13773,16 @@ var SideSheetProvider = function (_a) {
13476
13773
  });
13477
13774
  }
13478
13775
  }, duration);
13479
- return [2 /*return*/];
13776
+ case 26:
13777
+ case "end":
13778
+ return _context.stop();
13480
13779
  }
13481
- });
13482
- });
13483
- }, []);
13780
+ }, _callee, null, [[2, 17, 20, 23]]);
13781
+ }));
13782
+ return function (_x) {
13783
+ return _ref2.apply(this, arguments);
13784
+ };
13785
+ }(), []);
13484
13786
  var update = useCallback(function (id, options) {
13485
13787
  dispatch({
13486
13788
  type: 'UPDATE',
@@ -13488,15 +13790,15 @@ var SideSheetProvider = function (_a) {
13488
13790
  options: options
13489
13791
  });
13490
13792
  }, []);
13491
- var config = __assign$1(__assign$1({}, DEFAULT_OPTIONS), configuration);
13492
- return React.createElement(SideSheetContext.Provider, {
13793
+ var config = _objectSpread2(_objectSpread2({}, DEFAULT_OPTIONS), configuration);
13794
+ return /*#__PURE__*/React.createElement(SideSheetContext.Provider, {
13493
13795
  value: {
13494
13796
  open: open,
13495
13797
  close: close,
13496
13798
  update: update,
13497
13799
  config: config
13498
13800
  }
13499
- }, children, reactDom_1(React.createElement(SideSheetContainer, {
13801
+ }, children, /*#__PURE__*/reactDom_1(/*#__PURE__*/React.createElement(SideSheetContainer, {
13500
13802
  stack: stack,
13501
13803
  close: close,
13502
13804
  open: open,
@@ -13505,7 +13807,7 @@ var SideSheetProvider = function (_a) {
13505
13807
  }), document.body));
13506
13808
  };
13507
13809
 
13508
- var useSideSheet = function () {
13810
+ var useSideSheet = function useSideSheet() {
13509
13811
  var context = useContext(SideSheetContext);
13510
13812
  if (!context) {
13511
13813
  throw new Error('useSideSheet must be used within SideSheetProvider');