react-side-sheet-pro 0.1.0 → 0.1.2

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.umd.js CHANGED
@@ -97,16 +97,16 @@
97
97
  })(props);
98
98
  }
99
99
 
100
- var SideSheetHeader = React__default.memo(function (_a) {
101
- var title = _a.title,
102
- onClose = _a.onClose,
103
- actions = _a.actions;
104
- return React__default.createElement("header", {
100
+ var SideSheetHeader = /*#__PURE__*/React__default.memo(function (_ref) {
101
+ var title = _ref.title,
102
+ onClose = _ref.onClose,
103
+ actions = _ref.actions;
104
+ return /*#__PURE__*/React__default.createElement("header", {
105
105
  className: "sidesheet-header"
106
- }, onClose && React__default.createElement("button", {
106
+ }, onClose && (/*#__PURE__*/React__default.createElement("button", {
107
107
  className: "sidesheet-header-close sidesheet-header-btn",
108
108
  onClick: onClose
109
- }, React__default.createElement(HiX, null)), React__default.createElement("div", {
109
+ }, /*#__PURE__*/React__default.createElement(HiX, null))), /*#__PURE__*/React__default.createElement("div", {
110
110
  className: "sidesheet-header-title"
111
111
  }, title), actions);
112
112
  });
@@ -116,13 +116,12 @@
116
116
  }
117
117
 
118
118
  var classnames = createCommonjsModule(function (module) {
119
- /*!
120
- Copyright (c) 2018 Jed Watson.
121
- Licensed under the MIT License (MIT), see
122
- http://jedwatson.github.io/classnames
119
+ /*!
120
+ Copyright (c) 2018 Jed Watson.
121
+ Licensed under the MIT License (MIT), see
122
+ http://jedwatson.github.io/classnames
123
123
  */
124
124
  /* global define */
125
-
126
125
  (function () {
127
126
 
128
127
  var hasOwn = {}.hasOwnProperty;
@@ -175,168 +174,467 @@
175
174
  })();
176
175
  });
177
176
 
178
- var SideSheetContent = function (_a) {
179
- var children = _a.children,
180
- className = _a.className;
181
- return React__default.createElement("section", {
177
+ var SideSheetContent = function SideSheetContent(_ref) {
178
+ var children = _ref.children,
179
+ className = _ref.className;
180
+ return /*#__PURE__*/React__default.createElement("section", {
182
181
  className: classnames('sidesheet-content', className)
183
182
  }, children);
184
183
  };
185
184
 
186
- var SideSheetFooter = function (_a) {
187
- var children = _a.children,
188
- className = _a.className;
189
- return React__default.createElement("footer", {
185
+ var SideSheetFooter = function SideSheetFooter(_ref) {
186
+ var children = _ref.children,
187
+ className = _ref.className;
188
+ return /*#__PURE__*/React__default.createElement("footer", {
190
189
  className: classnames('sidesheet-footer', className)
191
190
  }, children);
192
191
  };
193
192
 
194
- /******************************************************************************
195
- Copyright (c) Microsoft Corporation.
196
-
197
- Permission to use, copy, modify, and/or distribute this software for any
198
- purpose with or without fee is hereby granted.
199
-
200
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
201
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
202
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
203
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
204
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
205
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
206
- PERFORMANCE OF THIS SOFTWARE.
207
- ***************************************************************************** */
208
- var __assign$1 = function () {
209
- __assign$1 = Object.assign || function __assign(t) {
210
- for (var s, i = 1, n = arguments.length; i < n; i++) {
211
- s = arguments[i];
212
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
213
- }
214
- return t;
215
- };
216
- return __assign$1.apply(this, arguments);
217
- };
218
- function __awaiter(thisArg, _arguments, P, generator) {
219
- function adopt(value) {
220
- return value instanceof P ? value : new P(function (resolve) {
221
- resolve(value);
193
+ function _arrayLikeToArray(r, a) {
194
+ (null == a || a > r.length) && (a = r.length);
195
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
196
+ return n;
197
+ }
198
+ function _arrayWithHoles(r) {
199
+ if (Array.isArray(r)) return r;
200
+ }
201
+ function _arrayWithoutHoles(r) {
202
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
203
+ }
204
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
205
+ try {
206
+ var i = n[a](c),
207
+ u = i.value;
208
+ } catch (n) {
209
+ return void e(n);
210
+ }
211
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
212
+ }
213
+ function _asyncToGenerator(n) {
214
+ return function () {
215
+ var t = this,
216
+ e = arguments;
217
+ return new Promise(function (r, o) {
218
+ var a = n.apply(t, e);
219
+ function _next(n) {
220
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
221
+ }
222
+ function _throw(n) {
223
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
224
+ }
225
+ _next(void 0);
222
226
  });
227
+ };
228
+ }
229
+ function _createForOfIteratorHelper(r, e) {
230
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
231
+ if (!t) {
232
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
233
+ t && (r = t);
234
+ var n = 0,
235
+ F = function () {};
236
+ return {
237
+ s: F,
238
+ n: function () {
239
+ return n >= r.length ? {
240
+ done: !0
241
+ } : {
242
+ done: !1,
243
+ value: r[n++]
244
+ };
245
+ },
246
+ e: function (r) {
247
+ throw r;
248
+ },
249
+ f: F
250
+ };
251
+ }
252
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
223
253
  }
224
- return new (P || (P = Promise))(function (resolve, reject) {
225
- function fulfilled(value) {
254
+ var o,
255
+ a = !0,
256
+ u = !1;
257
+ return {
258
+ s: function () {
259
+ t = t.call(r);
260
+ },
261
+ n: function () {
262
+ var r = t.next();
263
+ return a = r.done, r;
264
+ },
265
+ e: function (r) {
266
+ u = !0, o = r;
267
+ },
268
+ f: function () {
226
269
  try {
227
- step(generator.next(value));
228
- } catch (e) {
229
- reject(e);
270
+ a || null == t.return || t.return();
271
+ } finally {
272
+ if (u) throw o;
230
273
  }
231
274
  }
232
- function rejected(value) {
275
+ };
276
+ }
277
+ function _defineProperty(e, r, t) {
278
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
279
+ value: t,
280
+ enumerable: !0,
281
+ configurable: !0,
282
+ writable: !0
283
+ }) : e[r] = t, e;
284
+ }
285
+ function _iterableToArray(r) {
286
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
287
+ }
288
+ function _iterableToArrayLimit(r, l) {
289
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
290
+ if (null != t) {
291
+ var e,
292
+ n,
293
+ i,
294
+ u,
295
+ a = [],
296
+ f = !0,
297
+ o = !1;
298
+ try {
299
+ if (i = (t = t.call(r)).next, 0 === l) {
300
+ if (Object(t) !== t) return;
301
+ f = !1;
302
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
303
+ } catch (r) {
304
+ o = !0, n = r;
305
+ } finally {
233
306
  try {
234
- step(generator["throw"](value));
235
- } catch (e) {
236
- reject(e);
307
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
308
+ } finally {
309
+ if (o) throw n;
237
310
  }
238
311
  }
239
- function step(result) {
240
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
241
- }
242
- step((generator = generator.apply(thisArg, _arguments || [])).next());
243
- });
312
+ return a;
313
+ }
244
314
  }
245
- function __generator(thisArg, body) {
246
- var _ = {
247
- label: 0,
248
- sent: function () {
249
- if (t[0] & 1) throw t[1];
250
- return t[1];
251
- },
252
- trys: [],
253
- ops: []
254
- },
255
- f,
256
- y,
257
- t,
258
- g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
259
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function () {
260
- return this;
261
- }), g;
262
- function verb(n) {
263
- return function (v) {
264
- return step([n, v]);
315
+ function _nonIterableRest() {
316
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
317
+ }
318
+ function _nonIterableSpread() {
319
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
320
+ }
321
+ function ownKeys(e, r) {
322
+ var t = Object.keys(e);
323
+ if (Object.getOwnPropertySymbols) {
324
+ var o = Object.getOwnPropertySymbols(e);
325
+ r && (o = o.filter(function (r) {
326
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
327
+ })), t.push.apply(t, o);
328
+ }
329
+ return t;
330
+ }
331
+ function _objectSpread2(e) {
332
+ for (var r = 1; r < arguments.length; r++) {
333
+ var t = null != arguments[r] ? arguments[r] : {};
334
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
335
+ _defineProperty(e, r, t[r]);
336
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
337
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
338
+ });
339
+ }
340
+ return e;
341
+ }
342
+ function _regeneratorRuntime() {
343
+ _regeneratorRuntime = function () {
344
+ return r;
345
+ };
346
+ var t,
347
+ r = {},
348
+ e = Object.prototype,
349
+ n = e.hasOwnProperty,
350
+ o = "function" == typeof Symbol ? Symbol : {},
351
+ i = o.iterator || "@@iterator",
352
+ a = o.asyncIterator || "@@asyncIterator",
353
+ u = o.toStringTag || "@@toStringTag";
354
+ function c(t, r, e, n) {
355
+ return Object.defineProperty(t, r, {
356
+ value: e,
357
+ enumerable: !n,
358
+ configurable: !n,
359
+ writable: !n
360
+ });
361
+ }
362
+ try {
363
+ c({}, "");
364
+ } catch (t) {
365
+ c = function (t, r, e) {
366
+ return t[r] = e;
265
367
  };
266
368
  }
267
- function step(op) {
268
- if (f) throw new TypeError("Generator is already executing.");
269
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
270
- 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;
271
- if (y = 0, t) op = [op[0] & 2, t.value];
272
- switch (op[0]) {
273
- case 0:
274
- case 1:
275
- t = op;
276
- break;
277
- case 4:
278
- _.label++;
369
+ function h(r, e, n, o) {
370
+ var i = e && e.prototype instanceof Generator ? e : Generator,
371
+ a = Object.create(i.prototype);
372
+ return c(a, "_invoke", function (r, e, n) {
373
+ var o = 1;
374
+ return function (i, a) {
375
+ if (3 === o) throw Error("Generator is already running");
376
+ if (4 === o) {
377
+ if ("throw" === i) throw a;
279
378
  return {
280
- value: op[1],
281
- done: false
379
+ value: t,
380
+ done: !0
282
381
  };
283
- case 5:
284
- _.label++;
285
- y = op[1];
286
- op = [0];
287
- continue;
288
- case 7:
289
- op = _.ops.pop();
290
- _.trys.pop();
291
- continue;
292
- default:
293
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
294
- _ = 0;
295
- continue;
296
- }
297
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
298
- _.label = op[1];
299
- break;
300
- }
301
- if (op[0] === 6 && _.label < t[1]) {
302
- _.label = t[1];
303
- t = op;
304
- break;
382
+ }
383
+ for (n.method = i, n.arg = a;;) {
384
+ var u = n.delegate;
385
+ if (u) {
386
+ var c = d(u, n);
387
+ if (c) {
388
+ if (c === f) continue;
389
+ return c;
390
+ }
305
391
  }
306
- if (t && _.label < t[2]) {
307
- _.label = t[2];
308
- _.ops.push(op);
309
- break;
392
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
393
+ if (1 === o) throw o = 4, n.arg;
394
+ n.dispatchException(n.arg);
395
+ } else "return" === n.method && n.abrupt("return", n.arg);
396
+ o = 3;
397
+ var h = s(r, e, n);
398
+ if ("normal" === h.type) {
399
+ if (o = n.done ? 4 : 2, h.arg === f) continue;
400
+ return {
401
+ value: h.arg,
402
+ done: n.done
403
+ };
310
404
  }
311
- if (t[2]) _.ops.pop();
312
- _.trys.pop();
313
- continue;
405
+ "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg);
406
+ }
407
+ };
408
+ }(r, n, new Context(o || [])), !0), a;
409
+ }
410
+ function s(t, r, e) {
411
+ try {
412
+ return {
413
+ type: "normal",
414
+ arg: t.call(r, e)
415
+ };
416
+ } catch (t) {
417
+ return {
418
+ type: "throw",
419
+ arg: t
420
+ };
421
+ }
422
+ }
423
+ r.wrap = h;
424
+ var f = {};
425
+ function Generator() {}
426
+ function GeneratorFunction() {}
427
+ function GeneratorFunctionPrototype() {}
428
+ var l = {};
429
+ c(l, i, function () {
430
+ return this;
431
+ });
432
+ var p = Object.getPrototypeOf,
433
+ y = p && p(p(x([])));
434
+ y && y !== e && n.call(y, i) && (l = y);
435
+ var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l);
436
+ function g(t) {
437
+ ["next", "throw", "return"].forEach(function (r) {
438
+ c(t, r, function (t) {
439
+ return this._invoke(r, t);
440
+ });
441
+ });
442
+ }
443
+ function AsyncIterator(t, r) {
444
+ function e(o, i, a, u) {
445
+ var c = s(t[o], t, i);
446
+ if ("throw" !== c.type) {
447
+ var h = c.arg,
448
+ f = h.value;
449
+ return f && "object" == typeof f && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) {
450
+ e("next", t, a, u);
451
+ }, function (t) {
452
+ e("throw", t, a, u);
453
+ }) : r.resolve(f).then(function (t) {
454
+ h.value = t, a(h);
455
+ }, function (t) {
456
+ return e("throw", t, a, u);
457
+ });
458
+ }
459
+ u(c.arg);
460
+ }
461
+ var o;
462
+ c(this, "_invoke", function (t, n) {
463
+ function i() {
464
+ return new r(function (r, o) {
465
+ e(t, n, r, o);
466
+ });
467
+ }
468
+ return o = o ? o.then(i, i) : i();
469
+ }, !0);
470
+ }
471
+ function d(r, e) {
472
+ var n = e.method,
473
+ o = r.i[n];
474
+ 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;
475
+ var i = s(o, r.i, e.arg);
476
+ if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f;
477
+ var a = i.arg;
478
+ 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);
479
+ }
480
+ function w(t) {
481
+ this.tryEntries.push(t);
482
+ }
483
+ function m(r) {
484
+ var e = r[4] || {};
485
+ e.type = "normal", e.arg = t, r[4] = e;
486
+ }
487
+ function Context(t) {
488
+ this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0);
489
+ }
490
+ function x(r) {
491
+ if (null != r) {
492
+ var e = r[i];
493
+ if (e) return e.call(r);
494
+ if ("function" == typeof r.next) return r;
495
+ if (!isNaN(r.length)) {
496
+ var o = -1,
497
+ a = function e() {
498
+ for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e;
499
+ return e.value = t, e.done = !0, e;
500
+ };
501
+ return a.next = a;
314
502
  }
315
- op = body.call(thisArg, _);
316
- } catch (e) {
317
- op = [6, e];
318
- y = 0;
319
- } finally {
320
- f = t = 0;
321
503
  }
322
- if (op[0] & 5) throw op[1];
504
+ throw new TypeError(typeof r + " is not iterable");
505
+ }
506
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) {
507
+ var r = "function" == typeof t && t.constructor;
508
+ return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name));
509
+ }, r.mark = function (t) {
510
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t;
511
+ }, r.awrap = function (t) {
323
512
  return {
324
- value: op[0] ? op[1] : void 0,
325
- done: true
513
+ __await: t
326
514
  };
515
+ }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () {
516
+ return this;
517
+ }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) {
518
+ void 0 === i && (i = Promise);
519
+ var a = new AsyncIterator(h(t, e, n, o), i);
520
+ return r.isGeneratorFunction(e) ? a : a.next().then(function (t) {
521
+ return t.done ? t.value : a.next();
522
+ });
523
+ }, g(v), c(v, u, "Generator"), c(v, i, function () {
524
+ return this;
525
+ }), c(v, "toString", function () {
526
+ return "[object Generator]";
527
+ }), r.keys = function (t) {
528
+ var r = Object(t),
529
+ e = [];
530
+ for (var n in r) e.unshift(n);
531
+ return function t() {
532
+ for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t;
533
+ return t.done = !0, t;
534
+ };
535
+ }, r.values = x, Context.prototype = {
536
+ constructor: Context,
537
+ reset: function (r) {
538
+ 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);
539
+ },
540
+ stop: function () {
541
+ this.done = !0;
542
+ var t = this.tryEntries[0][4];
543
+ if ("throw" === t.type) throw t.arg;
544
+ return this.rval;
545
+ },
546
+ dispatchException: function (r) {
547
+ if (this.done) throw r;
548
+ var e = this;
549
+ function n(t) {
550
+ a.type = "throw", a.arg = r, e.next = t;
551
+ }
552
+ for (var o = e.tryEntries.length - 1; o >= 0; --o) {
553
+ var i = this.tryEntries[o],
554
+ a = i[4],
555
+ u = this.prev,
556
+ c = i[1],
557
+ h = i[2];
558
+ if (-1 === i[0]) return n("end"), !1;
559
+ if (!c && !h) throw Error("try statement without catch or finally");
560
+ if (null != i[0] && i[0] <= u) {
561
+ if (u < c) return this.method = "next", this.arg = t, n(c), !0;
562
+ if (u < h) return n(h), !1;
563
+ }
564
+ }
565
+ },
566
+ abrupt: function (t, r) {
567
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
568
+ var n = this.tryEntries[e];
569
+ if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) {
570
+ var o = n;
571
+ break;
572
+ }
573
+ }
574
+ o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null);
575
+ var i = o ? o[4] : {};
576
+ return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i);
577
+ },
578
+ complete: function (t, r) {
579
+ if ("throw" === t.type) throw t.arg;
580
+ 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;
581
+ },
582
+ finish: function (t) {
583
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
584
+ var e = this.tryEntries[r];
585
+ if (e[2] === t) return this.complete(e[4], e[3]), m(e), f;
586
+ }
587
+ },
588
+ catch: function (t) {
589
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
590
+ var e = this.tryEntries[r];
591
+ if (e[0] === t) {
592
+ var n = e[4];
593
+ if ("throw" === n.type) {
594
+ var o = n.arg;
595
+ m(e);
596
+ }
597
+ return o;
598
+ }
599
+ }
600
+ throw Error("illegal catch attempt");
601
+ },
602
+ delegateYield: function (r, e, n) {
603
+ return this.delegate = {
604
+ i: x(r),
605
+ r: e,
606
+ n: n
607
+ }, "next" === this.method && (this.arg = t), f;
608
+ }
609
+ }, r;
610
+ }
611
+ function _slicedToArray(r, e) {
612
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
613
+ }
614
+ function _toConsumableArray(r) {
615
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
616
+ }
617
+ function _toPrimitive(t, r) {
618
+ if ("object" != typeof t || !t) return t;
619
+ var e = t[Symbol.toPrimitive];
620
+ if (void 0 !== e) {
621
+ var i = e.call(t, r || "default");
622
+ if ("object" != typeof i) return i;
623
+ throw new TypeError("@@toPrimitive must return a primitive value.");
624
+ }
625
+ return ("string" === r ? String : Number)(t);
626
+ }
627
+ function _toPropertyKey(t) {
628
+ var i = _toPrimitive(t, "string");
629
+ return "symbol" == typeof i ? i : i + "";
630
+ }
631
+ function _unsupportedIterableToArray(r, a) {
632
+ if (r) {
633
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
634
+ var t = {}.toString.call(r).slice(8, -1);
635
+ 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;
327
636
  }
328
637
  }
329
-
330
- /** @deprecated */
331
- function __spreadArrays() {
332
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
333
- 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];
334
- return r;
335
- }
336
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
337
- var e = new Error(message);
338
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
339
- };
340
638
 
341
639
  var scheduler_production_min = createCommonjsModule(function (module, exports) {
342
640
 
@@ -663,7 +961,6 @@
663
961
  var left = heap[leftIndex];
664
962
  var rightIndex = leftIndex + 1;
665
963
  var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.
666
-
667
964
  if (compare(left, node) < 0) {
668
965
  if (rightIndex < length && compare(right, left) < 0) {
669
966
  heap[index] = right;
@@ -689,7 +986,6 @@
689
986
  var diff = a.sortIndex - b.sortIndex;
690
987
  return diff !== 0 ? diff : a.id - b.id;
691
988
  }
692
-
693
989
  // TODO: Use symbols?
694
990
  var ImmediatePriority = 1;
695
991
  var UserBlockingPriority = 2;
@@ -697,9 +993,7 @@
697
993
  var LowPriority = 4;
698
994
  var IdlePriority = 5;
699
995
  function markTaskErrored(task, ms) {}
700
-
701
996
  /* eslint-disable no-var */
702
-
703
997
  var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
704
998
  if (hasPerformanceNow) {
705
999
  var localPerformance = performance;
@@ -715,32 +1009,23 @@
715
1009
  } // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
716
1010
  // Math.pow(2, 30) - 1
717
1011
  // 0b111111111111111111111111111111
718
-
719
1012
  var maxSigned31BitInt = 1073741823; // Times out immediately
720
-
721
1013
  var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
722
-
723
1014
  var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
724
1015
  var NORMAL_PRIORITY_TIMEOUT = 5000;
725
1016
  var LOW_PRIORITY_TIMEOUT = 10000; // Never times out
726
-
727
1017
  var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap
728
-
729
1018
  var taskQueue = [];
730
1019
  var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.
731
-
732
1020
  var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
733
1021
  var currentTask = null;
734
1022
  var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrance.
735
-
736
1023
  var isPerformingWork = false;
737
1024
  var isHostCallbackScheduled = false;
738
1025
  var isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them.
739
-
740
1026
  var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null;
741
1027
  var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null;
742
1028
  var localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom
743
-
744
1029
  var isInputPending = typeof navigator !== 'undefined' && navigator.scheduling !== undefined && navigator.scheduling.isInputPending !== undefined ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null;
745
1030
  function advanceTimers(currentTime) {
746
1031
  // Check for tasks that are no longer delayed and add them to the queue.
@@ -836,7 +1121,6 @@
836
1121
  }
837
1122
  currentTask = peek(taskQueue);
838
1123
  } // Return whether there's additional work
839
-
840
1124
  if (currentTask !== null) {
841
1125
  return true;
842
1126
  } else {
@@ -954,14 +1238,12 @@
954
1238
  } else {
955
1239
  isHostTimeoutScheduled = true;
956
1240
  } // Schedule a timeout.
957
-
958
1241
  requestHostTimeout(handleTimeout, startTime - currentTime);
959
1242
  }
960
1243
  } else {
961
1244
  newTask.sortIndex = expirationTime;
962
1245
  push(taskQueue, newTask);
963
1246
  // wait until the next time we yield.
964
-
965
1247
  if (!isHostCallbackScheduled && !isPerformingWork) {
966
1248
  isHostCallbackScheduled = true;
967
1249
  requestHostCallback(flushWork);
@@ -982,7 +1264,6 @@
982
1264
  function unstable_cancelCallback(task) {
983
1265
  // remove from the queue because you can't remove arbitrary nodes from an
984
1266
  // array based heap, only the first one.)
985
-
986
1267
  task.callback = null;
987
1268
  }
988
1269
  function unstable_getCurrentPriorityLevel() {
@@ -994,7 +1275,6 @@
994
1275
  // thread, like user events. By default, it yields multiple times per frame.
995
1276
  // It does not attempt to align with frame boundaries, since most tasks don't
996
1277
  // need to be frame aligned; for those that do, use requestAnimationFrame.
997
-
998
1278
  var frameInterval = frameYieldMs;
999
1279
  var startTime = -1;
1000
1280
  function shouldYieldToHost() {
@@ -1004,7 +1284,6 @@
1004
1284
  // smaller than a single frame. Don't yield yet.
1005
1285
  return false;
1006
1286
  } // The main thread has been blocked for a non-negligible amount of time. We
1007
-
1008
1287
  return true;
1009
1288
  }
1010
1289
  function requestPaint() {}
@@ -1025,7 +1304,6 @@
1025
1304
  if (scheduledHostCallback !== null) {
1026
1305
  var currentTime = exports.unstable_now(); // Keep track of the start time so we can measure how long the main thread
1027
1306
  // has been blocked.
1028
-
1029
1307
  startTime = currentTime;
1030
1308
  var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the
1031
1309
  // error can be observed.
@@ -1033,7 +1311,6 @@
1033
1311
  // Intentionally not using a try-catch, since that makes some debugging
1034
1312
  // techniques harder. Instead, if `scheduledHostCallback` errors, then
1035
1313
  // `hasMoreWork` will remain true, and we'll continue the work loop.
1036
-
1037
1314
  var hasMoreWork = true;
1038
1315
  try {
1039
1316
  hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
@@ -8328,23 +8605,23 @@
8328
8605
  var enableSchedulingProfiler=true;// Helps identify side effects in render-phase lifecycle hooks and setState
8329
8606
  var enableProfilerTimer=true;// Record durations for commit and passive effects phases.
8330
8607
  var enableProfilerCommitHooks=true;// Phase param passed to onRender callback differentiates between an "update" and a "cascading-update".
8331
- var allNativeEvents=new Set();/**
8332
- * Mapping from registration name to event name
8333
- */var registrationNameDependencies={};/**
8334
- * Mapping from lowercase registration names to the properly cased version,
8335
- * used to warn in the case of missing event handlers. Available
8336
- * only in true.
8337
- * @type {Object}
8338
- */var possibleRegistrationNames={};// Trust the developer to only use possibleRegistrationNames in true
8339
- 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;/*
8340
- * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
8341
- * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
8342
- *
8343
- * The functions in this module will throw an easier-to-understand,
8344
- * easier-to-debug exception with a clear errors message message explaining the
8345
- * problem. (Instead of a confusing exception thrown inside the implementation
8346
- * of the `value` object).
8347
- */// $FlowFixMe only called in DEV, so void return is not possible.
8608
+ var allNativeEvents=new Set();/**
8609
+ * Mapping from registration name to event name
8610
+ */var registrationNameDependencies={};/**
8611
+ * Mapping from lowercase registration names to the properly cased version,
8612
+ * used to warn in the case of missing event handlers. Available
8613
+ * only in true.
8614
+ * @type {Object}
8615
+ */var possibleRegistrationNames={};// Trust the developer to only use possibleRegistrationNames in true
8616
+ 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;/*
8617
+ * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
8618
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
8619
+ *
8620
+ * The functions in this module will throw an easier-to-understand,
8621
+ * easier-to-debug exception with a clear errors message message explaining the
8622
+ * problem. (Instead of a confusing exception thrown inside the implementation
8623
+ * of the `value` object).
8624
+ */// $FlowFixMe only called in DEV, so void return is not possible.
8348
8625
  function typeName(value){{// toStringTag is needed for namespaced types like Temporal.Instant
8349
8626
  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.
8350
8627
  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
@@ -8401,8 +8678,7 @@
8401
8678
  // the `possibleStandardNames` module to ensure casing and incorrect
8402
8679
  // name warnings.
8403
8680
  var properties={};// These props are reserved by React. They shouldn't be written to the DOM.
8404
- var reservedProps=['children','dangerouslySetInnerHTML',// TODO: This prevents the assignment of defaultValue to regular
8405
- // elements (not just inputs). Now that ReactDOMInput assigns to the
8681
+ var reservedProps=['children','dangerouslySetInnerHTML',// elements (not just inputs). Now that ReactDOMInput assigns to the
8406
8682
  // defaultValue property -- do we need this?
8407
8683
  'defaultValue','defaultChecked','innerHTML','suppressContentEditableWarning','suppressHydrationWarning','style'];reservedProps.forEach(function(name){properties[name]=new PropertyInfoRecord(name,RESERVED,false,// mustUseProperty
8408
8684
  name,// attributeName
@@ -8430,17 +8706,14 @@
8430
8706
  null,// attributeNamespace
8431
8707
  false,// sanitizeURL
8432
8708
  false);});// These are HTML boolean attributes.
8433
- ['allowFullScreen','async',// Note: there is a special case that prevents it from being written to the DOM
8434
- // on the client side because the browsers are inconsistent. Instead we call focus().
8435
- 'autoFocus','autoPlay','controls','default','defer','disabled','disablePictureInPicture','disableRemotePlayback','formNoValidate','hidden','loop','noModule','noValidate','open','playsInline','readOnly','required','reversed','scoped','seamless',// Microdata
8436
- 'itemScope'].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEAN,false,// mustUseProperty
8709
+ ['allowFullScreen','async',// on the client side because the browsers are inconsistent. Instead we call focus().
8710
+ '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
8437
8711
  name.toLowerCase(),// attributeName
8438
8712
  null,// attributeNamespace
8439
8713
  false,// sanitizeURL
8440
8714
  false);});// These are the few React props that we set as DOM properties
8441
8715
  // rather than attributes. These are all booleans.
8442
- ['checked',// Note: `option.selected` is not updated if `select.multiple` is
8443
- // disabled with `removeAttribute`. We have special logic for handling this.
8716
+ ['checked',// disabled with `removeAttribute`. We have special logic for handling this.
8444
8717
  'multiple','muted','selected'// NOTE: if you add a camelCased prop to this list,
8445
8718
  // you'll need to set attributeName to name.toLowerCase()
8446
8719
  // instead in the assignment below.
@@ -8515,11 +8788,11 @@
8515
8788
  // A C0 control is a code point in the range \u0000 NULL to \u001F
8516
8789
  // INFORMATION SEPARATOR ONE, inclusive:
8517
8790
  // https://infra.spec.whatwg.org/#c0-control-or-space
8518
- /* 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));}}}/**
8519
- * Get the value for a property on a node. Only used in DEV for SSR validation.
8520
- * The "expected" argument is used as a hint of what the expected value is.
8521
- * Some properties have multiple equivalent values.
8522
- */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
8791
+ /* 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));}}}/**
8792
+ * Get the value for a property on a node. Only used in DEV for SSR validation.
8793
+ * The "expected" argument is used as a hint of what the expected value is.
8794
+ * Some properties have multiple equivalent values.
8795
+ */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
8523
8796
  // react-internal/safe-string-coercion rule is disabled in several spots
8524
8797
  // below.
8525
8798
  {checkAttributeStringCoercion(expected,name);}if(propertyInfo.sanitizeURL){// If we haven't fully disabled javascript: URLs, and if
@@ -8536,17 +8809,17 @@
8536
8809
  // To use getAttributeNS we need the local name which we don't have
8537
8810
  // in our config atm.
8538
8811
  stringValue=node.getAttribute(attributeName);}if(shouldRemoveAttribute(name,expected,propertyInfo,false)){return stringValue===null?expected:stringValue;// eslint-disable-next-line react-internal/safe-string-coercion
8539
- }else if(stringValue===''+expected){return expected;}else {return stringValue;}}}}/**
8540
- * Get the value for a attribute on a node. Only used in DEV for SSR validation.
8541
- * The third argument is used as a hint of what the expected value is. Some
8542
- * attributes have multiple equivalent values.
8543
- */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;}}/**
8544
- * Sets the value for a property on a node.
8545
- *
8546
- * @param {DOMElement} node
8547
- * @param {string} name
8548
- * @param {*} value
8549
- */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
8812
+ }else if(stringValue===''+expected){return expected;}else {return stringValue;}}}}/**
8813
+ * Get the value for a attribute on a node. Only used in DEV for SSR validation.
8814
+ * The third argument is used as a hint of what the expected value is. Some
8815
+ * attributes have multiple equivalent values.
8816
+ */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;}}/**
8817
+ * Sets the value for a property on a node.
8818
+ *
8819
+ * @param {DOMElement} node
8820
+ * @param {string} name
8821
+ * @param {*} value
8822
+ */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
8550
8823
  // `toString`ed by IE8/9.
8551
8824
  node[propertyName]=value;}return;}// The rest are treated as attributes with special cases.
8552
8825
  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
@@ -8631,22 +8904,22 @@
8631
8904
  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
8632
8905
  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
8633
8906
  // that trying again will succeed
8634
- 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;}/**
8635
- * Implements an <input> host component that allows setting these optional
8636
- * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
8637
- *
8638
- * If `checked` or `value` are not supplied (or null/undefined), user actions
8639
- * that affect the checked state or value will trigger updates to the element.
8640
- *
8641
- * If they are supplied (and not null/undefined), the rendered element will not
8642
- * trigger updates to the element. Instead, the props must change in order for
8643
- * the rendered element to be updated.
8644
- *
8645
- * The rendered element will be initialized as unchecked (or `defaultChecked`)
8646
- * with an empty value (or `defaultValue`).
8647
- *
8648
- * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
8649
- */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.
8907
+ 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;}/**
8908
+ * Implements an <input> host component that allows setting these optional
8909
+ * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
8910
+ *
8911
+ * If `checked` or `value` are not supplied (or null/undefined), user actions
8912
+ * that affect the checked state or value will trigger updates to the element.
8913
+ *
8914
+ * If they are supplied (and not null/undefined), the rendered element will not
8915
+ * trigger updates to the element. Instead, the props must change in order for
8916
+ * the rendered element to be updated.
8917
+ *
8918
+ * The rendered element will be initialized as unchecked (or `defaultChecked`)
8919
+ * with an empty value (or `defaultValue`).
8920
+ *
8921
+ * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
8922
+ */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.
8650
8923
  // eslint-disable-next-line
8651
8924
  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
8652
8925
  // blank-text buttons.
@@ -8708,48 +8981,48 @@
8708
8981
  //
8709
8982
  // https://github.com/facebook/react/issues/7253
8710
8983
  function setDefaultValue(node,type,value){if(// Focused number inputs synchronize on blur. See ChangeEventPlugin.js
8711
- 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;/**
8712
- * Implements an <option> host component that warns when `selected` is set.
8713
- */function validateProps(element,props){{// If a value is not provided, then the children must be simple.
8984
+ 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;/**
8985
+ * Implements an <option> host component that warns when `selected` is set.
8986
+ */function validateProps(element,props){{// If a value is not provided, then the children must be simple.
8714
8987
  if(props.value==null){if(typeof props.children==='object'&&props.children!==null){React.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>.
8715
8988
  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)
8716
8989
  if(props.value!=null){element.setAttribute('value',toString(getToStringValue(props.value)));}}var isArrayImpl=Array.isArray;// eslint-disable-next-line no-redeclare
8717
- 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'];/**
8718
- * Validation function for `value` and `defaultValue`.
8719
- */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.
8990
+ 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'];/**
8991
+ * Validation function for `value` and `defaultValue`.
8992
+ */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.
8720
8993
  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
8721
8994
  // browsers for all cases.
8722
- 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;}}}/**
8723
- * Implements a <select> host component that allows optionally setting the
8724
- * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
8725
- * stringable. If `multiple` is true, the prop must be an array of stringables.
8726
- *
8727
- * If `value` is not supplied (or null/undefined), user actions that change the
8728
- * selected option will trigger updates to the rendered options.
8729
- *
8730
- * If it is supplied (and not null/undefined), the rendered options will not
8731
- * update in response to user actions. Instead, the `value` prop must change in
8732
- * order for the rendered options to update.
8733
- *
8734
- * If `defaultValue` is provided, any options with the supplied values will be
8735
- * selected.
8736
- */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.
8995
+ 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;}}}/**
8996
+ * Implements a <select> host component that allows optionally setting the
8997
+ * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
8998
+ * stringable. If `multiple` is true, the prop must be an array of stringables.
8999
+ *
9000
+ * If `value` is not supplied (or null/undefined), user actions that change the
9001
+ * selected option will trigger updates to the rendered options.
9002
+ *
9003
+ * If it is supplied (and not null/undefined), the rendered options will not
9004
+ * update in response to user actions. Instead, the `value` prop must change in
9005
+ * order for the rendered options to update.
9006
+ *
9007
+ * If `defaultValue` is provided, any options with the supplied values will be
9008
+ * selected.
9009
+ */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.
8737
9010
  if(props.defaultValue!=null){updateOptions(node,!!props.multiple,props.defaultValue,true);}else {// Revert the select back to its default unselected state.
8738
- 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;/**
8739
- * Implements a <textarea> host component that allows setting `value`, and
8740
- * `defaultValue`. This differs from the traditional DOM API because value is
8741
- * usually set as PCDATA children.
8742
- *
8743
- * If `value` is not supplied (or null/undefined), user actions that affect the
8744
- * value will trigger updates to the element.
8745
- *
8746
- * If `value` is supplied (and not null/undefined), the rendered element will
8747
- * not trigger updates to the element. Instead, the `value` prop must change in
8748
- * order for the rendered element to be updated.
8749
- *
8750
- * The rendered element will be initialized with an empty value, the prop
8751
- * `defaultValue` if specified, or the children content (deprecated).
8752
- */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
9011
+ 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;/**
9012
+ * Implements a <textarea> host component that allows setting `value`, and
9013
+ * `defaultValue`. This differs from the traditional DOM API because value is
9014
+ * usually set as PCDATA children.
9015
+ *
9016
+ * If `value` is not supplied (or null/undefined), user actions that affect the
9017
+ * value will trigger updates to the element.
9018
+ *
9019
+ * If `value` is supplied (and not null/undefined), the rendered element will
9020
+ * not trigger updates to the element. Instead, the `value` prop must change in
9021
+ * order for the rendered element to be updated.
9022
+ *
9023
+ * The rendered element will be initialized with an empty value, the prop
9024
+ * `defaultValue` if specified, or the children content (deprecated).
9025
+ */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
8753
9026
  // get reset if `textContent` is mutated. We could add a check in setTextContent
8754
9027
  // to only set the value if/when the value differs from the node value (which would
8755
9028
  // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
@@ -8770,51 +9043,51 @@
8770
9043
  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.
8771
9044
  return getIntrinsicNamespace(type);}if(parentNamespace===SVG_NAMESPACE&&type==='foreignObject'){// We're leaving SVG.
8772
9045
  return HTML_NAMESPACE;}// By default, pass namespace below.
8773
- return parentNamespace;}/* globals MSApp *//**
8774
- * Create a function which has 'unsafe' privileges (required by windows8 apps)
8775
- */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;/**
8776
- * Set the innerHTML property of a node
8777
- *
8778
- * @param {DOMElement} node
8779
- * @param {string} html
8780
- * @internal
8781
- */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
9046
+ return parentNamespace;}/* globals MSApp *//**
9047
+ * Create a function which has 'unsafe' privileges (required by windows8 apps)
9048
+ */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;/**
9049
+ * Set the innerHTML property of a node
9050
+ *
9051
+ * @param {DOMElement} node
9052
+ * @param {string} html
9053
+ * @internal
9054
+ */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
8782
9055
  // new markup in a temp node and then move the child nodes across into
8783
9056
  // the target node
8784
- 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;});/**
8785
- * HTML nodeType values that represent the type of the node
8786
- */var ELEMENT_NODE=1;var TEXT_NODE=3;var COMMENT_NODE=8;var DOCUMENT_NODE=9;var DOCUMENT_FRAGMENT_NODE=11;/**
8787
- * Set the textContent property of a node. For text updates, it's faster
8788
- * to set the `nodeValue` of the Text node directly instead of using
8789
- * `.textContent` which will remove the existing node and create a new one.
8790
- *
8791
- * @param {DOMElement} node
8792
- * @param {string} text
8793
- * @internal
8794
- */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:
9057
+ 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;});/**
9058
+ * HTML nodeType values that represent the type of the node
9059
+ */var ELEMENT_NODE=1;var TEXT_NODE=3;var COMMENT_NODE=8;var DOCUMENT_NODE=9;var DOCUMENT_FRAGMENT_NODE=11;/**
9060
+ * Set the textContent property of a node. For text updates, it's faster
9061
+ * to set the `nodeValue` of the Text node directly instead of using
9062
+ * `.textContent` which will remove the existing node and create a new one.
9063
+ *
9064
+ * @param {DOMElement} node
9065
+ * @param {string} text
9066
+ * @internal
9067
+ */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:
8795
9068
  // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
8796
- 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']};/**
8797
- * CSS properties which accept numbers but are not in units of "px".
8798
- */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
8799
- fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeDasharray:true,strokeDashoffset:true,strokeMiterlimit:true,strokeOpacity:true,strokeWidth:true};/**
8800
- * @param {string} prefix vendor-specific prefix, eg: Webkit
8801
- * @param {string} key style name, eg: transitionDuration
8802
- * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
8803
- * WebkitTransitionDuration
8804
- */function prefixKey(prefix,key){return prefix+key.charAt(0).toUpperCase()+key.substring(1);}/**
8805
- * Support style names that may come passed in prefixed by adding permutations
8806
- * of vendor prefixes.
8807
- */var prefixes=['Webkit','ms','Moz','O'];// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
9069
+ 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']};/**
9070
+ * CSS properties which accept numbers but are not in units of "px".
9071
+ */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
9072
+ fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeDasharray:true,strokeDashoffset:true,strokeMiterlimit:true,strokeOpacity:true,strokeWidth:true};/**
9073
+ * @param {string} prefix vendor-specific prefix, eg: Webkit
9074
+ * @param {string} key style name, eg: transitionDuration
9075
+ * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
9076
+ * WebkitTransitionDuration
9077
+ */function prefixKey(prefix,key){return prefix+key.charAt(0).toUpperCase()+key.substring(1);}/**
9078
+ * Support style names that may come passed in prefixed by adding permutations
9079
+ * of vendor prefixes.
9080
+ */var prefixes=['Webkit','ms','Moz','O'];// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
8808
9081
  // infinite loop, because it iterates over the newly added props too.
8809
- Object.keys(isUnitlessNumber).forEach(function(prop){prefixes.forEach(function(prefix){isUnitlessNumber[prefixKey(prefix,prop)]=isUnitlessNumber[prop];});});/**
8810
- * Convert a value into the proper css writable value. The style name `name`
8811
- * should be logical (no hyphens), as specified
8812
- * in `CSSProperty.isUnitlessNumber`.
8813
- *
8814
- * @param {string} name CSS property name such as `topMargin`.
8815
- * @param {*} value CSS property value such as `10px`.
8816
- * @return {string} Normalized style value with dimensions applied.
8817
- */function dangerousStyleValue(name,value,isCustomProperty){// Note that we've removed escapeTextForBrowser() calls here since the
9082
+ Object.keys(isUnitlessNumber).forEach(function(prop){prefixes.forEach(function(prefix){isUnitlessNumber[prefixKey(prefix,prop)]=isUnitlessNumber[prop];});});/**
9083
+ * Convert a value into the proper css writable value. The style name `name`
9084
+ * should be logical (no hyphens), as specified
9085
+ * in `CSSProperty.isUnitlessNumber`.
9086
+ *
9087
+ * @param {string} name CSS property name such as `topMargin`.
9088
+ * @param {*} value CSS property value such as `10px`.
9089
+ * @return {string} Normalized style value with dimensions applied.
9090
+ */function dangerousStyleValue(name,value,isCustomProperty){// Note that we've removed escapeTextForBrowser() calls here since the
8818
9091
  // whole string will be escaped when the attribute is injected into
8819
9092
  // the markup. If you provide unsafe user data here they can inject
8820
9093
  // arbitrary CSS which may be problematic (I couldn't repro this):
@@ -8824,57 +9097,57 @@
8824
9097
  // which has lead to a greater discussion about how we're going to
8825
9098
  // trust URLs moving forward. See #2115901
8826
9099
  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
8827
- }{checkCSSPropertyStringCoercion(value,name);}return (''+value).trim();}var uppercasePattern=/([A-Z])/g;var msPattern=/^ms-/;/**
8828
- * Hyphenates a camelcased CSS property name, for example:
8829
- *
8830
- * > hyphenateStyleName('backgroundColor')
8831
- * < "background-color"
8832
- * > hyphenateStyleName('MozTransition')
8833
- * < "-moz-transition"
8834
- * > hyphenateStyleName('msTransition')
8835
- * < "-ms-transition"
8836
- *
8837
- * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
8838
- * is converted to `-ms-`.
8839
- */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
9100
+ }{checkCSSPropertyStringCoercion(value,name);}return (''+value).trim();}var uppercasePattern=/([A-Z])/g;var msPattern=/^ms-/;/**
9101
+ * Hyphenates a camelcased CSS property name, for example:
9102
+ *
9103
+ * > hyphenateStyleName('backgroundColor')
9104
+ * < "background-color"
9105
+ * > hyphenateStyleName('MozTransition')
9106
+ * < "-moz-transition"
9107
+ * > hyphenateStyleName('msTransition')
9108
+ * < "-ms-transition"
9109
+ *
9110
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
9111
+ * is converted to `-ms-`.
9112
+ */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
8840
9113
  var badVendoredStyleNamePattern=/^(?:webkit|moz|o)[A-Z]/;var msPattern$1=/^-ms-/;var hyphenPattern=/-(.)/g;// style values shouldn't contain a semicolon
8841
9114
  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
8842
9115
  // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
8843
9116
  // is converted to lowercase `ms`.
8844
- 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;/**
8845
- * Operations for dealing with CSS properties.
8846
- *//**
8847
- * This creates a string that is expected to be equivalent to the style
8848
- * attribute generated by server-side rendering. It by-passes warnings and
8849
- * security checks so it's not safe to use this value for anything other than
8850
- * comparison. It is only used in DEV for SSR validation.
8851
- */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;}}/**
8852
- * Sets the value for multiple styles on a node. If a value is specified as
8853
- * '' (empty string), the corresponding style property will be unset.
8854
- *
8855
- * @param {DOMElement} node
8856
- * @param {object} styles
8857
- */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==='';}/**
8858
- * Given {color: 'red', overflow: 'hidden'} returns {
8859
- * color: 'color',
8860
- * overflowX: 'overflow',
8861
- * overflowY: 'overflow',
8862
- * }. This can be read as "the overflowY property was set by the overflow
8863
- * shorthand". That is, the values are the property that each was derived from.
8864
- */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;}/**
8865
- * When mixing shorthand and longhand property names, we warn during updates if
8866
- * we expect an incorrect result to occur. In particular, we warn for:
8867
- *
8868
- * Updating a shorthand property (longhand gets overwritten):
8869
- * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
8870
- * becomes .style.font = 'baz'
8871
- * Removing a shorthand property (longhand gets lost too):
8872
- * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
8873
- * becomes .style.font = ''
8874
- * Removing a longhand property (should revert to shorthand; doesn't):
8875
- * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
8876
- * becomes .style.fontVariant = ''
8877
- */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
9117
+ 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;/**
9118
+ * Operations for dealing with CSS properties.
9119
+ *//**
9120
+ * This creates a string that is expected to be equivalent to the style
9121
+ * attribute generated by server-side rendering. It by-passes warnings and
9122
+ * security checks so it's not safe to use this value for anything other than
9123
+ * comparison. It is only used in DEV for SSR validation.
9124
+ */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;}}/**
9125
+ * Sets the value for multiple styles on a node. If a value is specified as
9126
+ * '' (empty string), the corresponding style property will be unset.
9127
+ *
9128
+ * @param {DOMElement} node
9129
+ * @param {object} styles
9130
+ */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==='';}/**
9131
+ * Given {color: 'red', overflow: 'hidden'} returns {
9132
+ * color: 'color',
9133
+ * overflowX: 'overflow',
9134
+ * overflowY: 'overflow',
9135
+ * }. This can be read as "the overflowY property was set by the overflow
9136
+ * shorthand". That is, the values are the property that each was derived from.
9137
+ */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;}/**
9138
+ * When mixing shorthand and longhand property names, we warn during updates if
9139
+ * we expect an incorrect result to occur. In particular, we warn for:
9140
+ *
9141
+ * Updating a shorthand property (longhand gets overwritten):
9142
+ * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
9143
+ * becomes .style.font = 'baz'
9144
+ * Removing a shorthand property (longhand gets lost too):
9145
+ * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
9146
+ * becomes .style.font = ''
9147
+ * Removing a longhand property (should revert to shorthand; doesn't):
9148
+ * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
9149
+ * becomes .style.fontVariant = ''
9150
+ */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
8878
9151
  // those special-case tags.
8879
9152
  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.
8880
9153
  };// `omittedCloseTags` except that `menuitem` should still have its closing tag.
@@ -8920,13 +9193,13 @@
8920
9193
  // We also don't want to defer during event replaying.
8921
9194
  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
8922
9195
  // and DOMPluginEventSystem.
8923
- 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;}/**
8924
- * Gets the target node from a native browser event by accounting for
8925
- * inconsistencies in browser DOM APIs.
8926
- *
8927
- * @param {object} nativeEvent Native browser event.
8928
- * @return {DOMEventTarget} Target node.
8929
- */function getEventTarget(nativeEvent){// Fallback to nativeEvent.srcElement for IE9
9196
+ 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;}/**
9197
+ * Gets the target node from a native browser event by accounting for
9198
+ * inconsistencies in browser DOM APIs.
9199
+ *
9200
+ * @param {object} nativeEvent Native browser event.
9201
+ * @return {DOMEventTarget} Target node.
9202
+ */function getEventTarget(nativeEvent){// Fallback to nativeEvent.srcElement for IE9
8930
9203
  // https://github.com/facebook/react/issues/12506
8931
9204
  var target=nativeEvent.target||nativeEvent.srcElement||window;// Normalize SVG <use> element events #4963
8932
9205
  if(target.correspondingUseElement){target=target.correspondingUseElement;}// Safari may fire events on text nodes (Node.TEXT_NODE is 3).
@@ -8952,11 +9225,11 @@
8952
9225
  flushSyncImpl();restoreStateIfNeeded();}}function batchedUpdates(fn,a,b){if(isInsideEventHandler){// If we are currently inside another batch, we need to wait until it
8953
9226
  // fully completes before restoring state.
8954
9227
  return fn(a,b);}isInsideEventHandler=true;try{return batchedUpdatesImpl(fn,a,b);}finally{isInsideEventHandler=false;finishEventHandler();}}// TODO: Replace with flushSync
8955
- 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;}}/**
8956
- * @param {object} inst The instance, which is the source of events.
8957
- * @param {string} registrationName Name of listener (e.g. `onClick`).
8958
- * @return {?function} The stored callback.
8959
- */function getListener(inst,registrationName){var stateNode=inst.stateNode;if(stateNode===null){// Work in progress (ex: onload events in incremental mode).
9228
+ 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;}}/**
9229
+ * @param {object} inst The instance, which is the source of events.
9230
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
9231
+ * @return {?function} The stored callback.
9232
+ */function getListener(inst,registrationName){var stateNode=inst.stateNode;if(stateNode===null){// Work in progress (ex: onload events in incremental mode).
8960
9233
  return null;}var props=getFiberCurrentPropsFromNode(stateNode);if(props===null){// Work in progress.
8961
9234
  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
8962
9235
  // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
@@ -9036,39 +9309,39 @@
9036
9309
  // https://github.com/facebook/react/issues/16585
9037
9310
  // Fall back to the production implementation.
9038
9311
  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.
9039
- var hasRethrowError=false;var rethrowError=null;var reporter={onError:function(error){hasError=true;caughtError=error;}};/**
9040
- * Call a function while guarding against errors that happens within it.
9041
- * Returns an error if it throws, otherwise null.
9042
- *
9043
- * In production, this is implemented using a try-catch. The reason we don't
9044
- * use a try-catch directly is so that we can swap out a different
9045
- * implementation in DEV mode.
9046
- *
9047
- * @param {String} name of the guard to use for logging or debugging
9048
- * @param {Function} func The function to invoke
9049
- * @param {*} context The context to use when calling the function
9050
- * @param {...*} args Arguments for function
9051
- */function invokeGuardedCallback(name,func,context,a,b,c,d,e,f){hasError=false;caughtError=null;invokeGuardedCallbackImpl$1.apply(reporter,arguments);}/**
9052
- * Same as invokeGuardedCallback, but instead of returning an error, it stores
9053
- * it in a global so it can be rethrown by `rethrowCaughtError` later.
9054
- * TODO: See if caughtError and rethrowError can be unified.
9055
- *
9056
- * @param {String} name of the guard to use for logging or debugging
9057
- * @param {Function} func The function to invoke
9058
- * @param {*} context The context to use when calling the function
9059
- * @param {...*} args Arguments for function
9060
- */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;}}}/**
9061
- * During execution of guarded functions we will capture the first error which
9062
- * we will rethrow to be handled by the top level error handler.
9063
- */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.');}}/**
9064
- * `ReactInstanceMap` maintains a mapping from a public facing stateful
9065
- * instance (key) and the internal representation (value). This allows public
9066
- * methods to accept the user facing instance as an argument and map them back
9067
- * to internal methods.
9068
- *
9069
- * Note that this module is currently shared and assumed to be stateless.
9070
- * If this becomes an actual Map, that will break.
9071
- */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.
9312
+ var hasRethrowError=false;var rethrowError=null;var reporter={onError:function(error){hasError=true;caughtError=error;}};/**
9313
+ * Call a function while guarding against errors that happens within it.
9314
+ * Returns an error if it throws, otherwise null.
9315
+ *
9316
+ * In production, this is implemented using a try-catch. The reason we don't
9317
+ * use a try-catch directly is so that we can swap out a different
9318
+ * implementation in DEV mode.
9319
+ *
9320
+ * @param {String} name of the guard to use for logging or debugging
9321
+ * @param {Function} func The function to invoke
9322
+ * @param {*} context The context to use when calling the function
9323
+ * @param {...*} args Arguments for function
9324
+ */function invokeGuardedCallback(name,func,context,a,b,c,d,e,f){hasError=false;caughtError=null;invokeGuardedCallbackImpl$1.apply(reporter,arguments);}/**
9325
+ * Same as invokeGuardedCallback, but instead of returning an error, it stores
9326
+ * it in a global so it can be rethrown by `rethrowCaughtError` later.
9327
+ * TODO: See if caughtError and rethrowError can be unified.
9328
+ *
9329
+ * @param {String} name of the guard to use for logging or debugging
9330
+ * @param {Function} func The function to invoke
9331
+ * @param {*} context The context to use when calling the function
9332
+ * @param {...*} args Arguments for function
9333
+ */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;}}}/**
9334
+ * During execution of guarded functions we will capture the first error which
9335
+ * we will rethrow to be handled by the top level error handler.
9336
+ */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.');}}/**
9337
+ * `ReactInstanceMap` maintains a mapping from a public facing stateful
9338
+ * instance (key) and the internal representation (value). This allows public
9339
+ * methods to accept the user facing instance as an argument and map them back
9340
+ * to internal methods.
9341
+ *
9342
+ * Note that this module is currently shared and assumed to be stateless.
9343
+ * If this becomes an actual Map, that will break.
9344
+ */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.
9072
9345
  var NoFlags=/* */0;var PerformedWork=/* */1;// You can change the rest (and add more).
9073
9346
  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)
9074
9347
  var HostEffectMask=/* */32767;// These are not really side effects, but we still reuse this field.
@@ -9289,8 +9562,7 @@
9289
9562
  // if the last target was dehydrated.
9290
9563
  var queuedFocus=null;var queuedDrag=null;var queuedMouse=null;// For pointer events there can be one latest event per pointerId.
9291
9564
  var queuedPointers=new Map();var queuedPointerCaptures=new Map();// We could consider replaying selectionchange and touchmoves too.
9292
- 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
9293
- '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.
9565
+ 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.
9294
9566
  attemptContinuousHydration(_fiber2);}}return queuedEvent;}// If we have already queued this exact event, then it's because
9295
9567
  // the different event systems have different DOM event listeners.
9296
9568
  // We can accumulate the flags, and the targetContainers, and
@@ -9360,26 +9632,26 @@
9360
9632
  // Eventually this mechanism will be replaced by a check
9361
9633
  // of the current priority on the native scheduler.
9362
9634
  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.
9363
- 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;}/**
9364
- * These variables store information about text content of a target node,
9365
- * allowing comparison of content before and after a given event.
9366
- *
9367
- * Identify the node where selection currently begins, then observe
9368
- * both its text content and its current position in the DOM. Since the
9369
- * browser may natively replace the target node during composition, we can
9370
- * use its position to find its replacement.
9371
- *
9372
- *
9373
- */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;}/**
9374
- * `charCode` represents the actual "character code" and is safe to use with
9375
- * `String.fromCharCode`. As such, only keys that correspond to printable
9376
- * characters produce a valid `charCode`, the only exception to this is Enter.
9377
- * The Tab-key is considered non-printable and does not have a `charCode`,
9378
- * presumably because it does not produce a tab-character in browsers.
9379
- *
9380
- * @param {object} nativeEvent Native browser event.
9381
- * @return {number} Normalized `charCode` property.
9382
- */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`.
9635
+ 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;}/**
9636
+ * These variables store information about text content of a target node,
9637
+ * allowing comparison of content before and after a given event.
9638
+ *
9639
+ * Identify the node where selection currently begins, then observe
9640
+ * both its text content and its current position in the DOM. Since the
9641
+ * browser may natively replace the target node during composition, we can
9642
+ * use its position to find its replacement.
9643
+ *
9644
+ *
9645
+ */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;}/**
9646
+ * `charCode` represents the actual "character code" and is safe to use with
9647
+ * `String.fromCharCode`. As such, only keys that correspond to printable
9648
+ * characters produce a valid `charCode`, the only exception to this is Enter.
9649
+ * The Tab-key is considered non-printable and does not have a `charCode`,
9650
+ * presumably because it does not produce a tab-character in browsers.
9651
+ *
9652
+ * @param {object} nativeEvent Native browser event.
9653
+ * @return {number} Normalized `charCode` property.
9654
+ */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`.
9383
9655
  if(charCode===0&&keyCode===13){charCode=13;}}else {// IE8 does not implement `charCode`, but `keyCode` has the correct value.
9384
9656
  charCode=keyCode;}// IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
9385
9657
  // report Enter as charCode 10 when ctrl is pressed.
@@ -9387,75 +9659,74 @@
9387
9659
  // Must not discard the (non-)printable Enter-key.
9388
9660
  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.
9389
9661
  // If we had a single constructor, it would be megamorphic and engines would deopt.
9390
- function createSyntheticEvent(Interface){/**
9391
- * Synthetic events are dispatched by event plugins, typically in response to a
9392
- * top-level event delegation handler.
9393
- *
9394
- * These systems should generally use pooling to reduce the frequency of garbage
9395
- * collection. The system should check `isPersistent` to determine whether the
9396
- * event should be released into the pool after being dispatched. Users that
9397
- * need a persisted event should invoke `persist`.
9398
- *
9399
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
9400
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
9401
- * DOM interface; custom application-specific events can also subclass this.
9402
- */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
9662
+ function createSyntheticEvent(Interface){/**
9663
+ * Synthetic events are dispatched by event plugins, typically in response to a
9664
+ * top-level event delegation handler.
9665
+ *
9666
+ * These systems should generally use pooling to reduce the frequency of garbage
9667
+ * collection. The system should check `isPersistent` to determine whether the
9668
+ * event should be released into the pool after being dispatched. Users that
9669
+ * need a persisted event should invoke `persist`.
9670
+ *
9671
+ * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
9672
+ * normalizing browser quirks. Subclasses do not necessarily have to implement a
9673
+ * DOM interface; custom application-specific events can also subclass this.
9674
+ */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
9403
9675
  }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
9404
9676
  }else if(typeof event.cancelBubble!=='unknown'){// The ChangeEventPlugin registers a "propertychange" event for
9405
9677
  // IE. This event does not support bubbling or cancelling, and
9406
9678
  // any references to cancelBubble throw "Member not found". A
9407
9679
  // typeof check of "unknown" circumvents this issue (and is also
9408
9680
  // IE specific).
9409
- event.cancelBubble=true;}this.isPropagationStopped=functionThatReturnsTrue;},/**
9410
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
9411
- * them back into the pool. This allows a way to hold onto a reference that
9412
- * won't be added back into the pool.
9413
- */persist:function(){// Modern event system doesn't use pooling.
9414
- },/**
9415
- * Checks if this event should be released back into the pool.
9416
- *
9417
- * @return {boolean} True if this should not be released, false otherwise.
9418
- */isPersistent:functionThatReturnsTrue});return SyntheticBaseEvent;}/**
9419
- * @interface Event
9420
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
9421
- */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;}}/**
9422
- * @interface MouseEvent
9423
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
9424
- */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
9681
+ event.cancelBubble=true;}this.isPropagationStopped=functionThatReturnsTrue;},/**
9682
+ * We release all dispatched `SyntheticEvent`s after each event loop, adding
9683
+ * them back into the pool. This allows a way to hold onto a reference that
9684
+ * won't be added back into the pool.
9685
+ */persist:function(){},/**
9686
+ * Checks if this event should be released back into the pool.
9687
+ *
9688
+ * @return {boolean} True if this should not be released, false otherwise.
9689
+ */isPersistent:functionThatReturnsTrue});return SyntheticBaseEvent;}/**
9690
+ * @interface Event
9691
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
9692
+ */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;}}/**
9693
+ * @interface MouseEvent
9694
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
9695
+ */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
9425
9696
  // because it's guaranteed to have already run when movementX
9426
9697
  // was copied.
9427
- return lastMovementY;}});var SyntheticMouseEvent=createSyntheticEvent(MouseEventInterface);/**
9428
- * @interface DragEvent
9429
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
9430
- */var DragEventInterface=assign({},MouseEventInterface,{dataTransfer:0});var SyntheticDragEvent=createSyntheticEvent(DragEventInterface);/**
9431
- * @interface FocusEvent
9432
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
9433
- */var FocusEventInterface=assign({},UIEventInterface,{relatedTarget:0});var SyntheticFocusEvent=createSyntheticEvent(FocusEventInterface);/**
9434
- * @interface Event
9435
- * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
9436
- * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
9437
- */var AnimationEventInterface=assign({},EventInterface,{animationName:0,elapsedTime:0,pseudoElement:0});var SyntheticAnimationEvent=createSyntheticEvent(AnimationEventInterface);/**
9438
- * @interface Event
9439
- * @see http://www.w3.org/TR/clipboard-apis/
9440
- */var ClipboardEventInterface=assign({},EventInterface,{clipboardData:function(event){return 'clipboardData'in event?event.clipboardData:window.clipboardData;}});var SyntheticClipboardEvent=createSyntheticEvent(ClipboardEventInterface);/**
9441
- * @interface Event
9442
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
9443
- */var CompositionEventInterface=assign({},EventInterface,{data:0});var SyntheticCompositionEvent=createSyntheticEvent(CompositionEventInterface);/**
9444
- * @interface Event
9445
- * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
9446
- * /#events-inputevents
9447
- */// Happens to share the same list for now.
9448
- var SyntheticInputEvent=SyntheticCompositionEvent;/**
9449
- * Normalization of deprecated HTML5 `key` values
9450
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
9451
- */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'};/**
9452
- * Translation from legacy `keyCode` to HTML5 `key`
9453
- * Only special keys supported, all others depend on keyboard layout or browser
9454
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
9455
- */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'};/**
9456
- * @param {object} nativeEvent Native browser event.
9457
- * @return {string} Normalized `key` property.
9458
- */function getEventKey(nativeEvent){if(nativeEvent.key){// Normalize inconsistent values reported by browsers due to
9698
+ return lastMovementY;}});var SyntheticMouseEvent=createSyntheticEvent(MouseEventInterface);/**
9699
+ * @interface DragEvent
9700
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
9701
+ */var DragEventInterface=assign({},MouseEventInterface,{dataTransfer:0});var SyntheticDragEvent=createSyntheticEvent(DragEventInterface);/**
9702
+ * @interface FocusEvent
9703
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
9704
+ */var FocusEventInterface=assign({},UIEventInterface,{relatedTarget:0});var SyntheticFocusEvent=createSyntheticEvent(FocusEventInterface);/**
9705
+ * @interface Event
9706
+ * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
9707
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
9708
+ */var AnimationEventInterface=assign({},EventInterface,{animationName:0,elapsedTime:0,pseudoElement:0});var SyntheticAnimationEvent=createSyntheticEvent(AnimationEventInterface);/**
9709
+ * @interface Event
9710
+ * @see http://www.w3.org/TR/clipboard-apis/
9711
+ */var ClipboardEventInterface=assign({},EventInterface,{clipboardData:function(event){return 'clipboardData'in event?event.clipboardData:window.clipboardData;}});var SyntheticClipboardEvent=createSyntheticEvent(ClipboardEventInterface);/**
9712
+ * @interface Event
9713
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
9714
+ */var CompositionEventInterface=assign({},EventInterface,{data:0});var SyntheticCompositionEvent=createSyntheticEvent(CompositionEventInterface);/**
9715
+ * @interface Event
9716
+ * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
9717
+ * /#events-inputevents
9718
+ */// Happens to share the same list for now.
9719
+ var SyntheticInputEvent=SyntheticCompositionEvent;/**
9720
+ * Normalization of deprecated HTML5 `key` values
9721
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
9722
+ */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'};/**
9723
+ * Translation from legacy `keyCode` to HTML5 `key`
9724
+ * Only special keys supported, all others depend on keyboard layout or browser
9725
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
9726
+ */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'};/**
9727
+ * @param {object} nativeEvent Native browser event.
9728
+ * @return {string} Normalized `key` property.
9729
+ */function getEventKey(nativeEvent){if(nativeEvent.key){// Normalize inconsistent values reported by browsers due to
9459
9730
  // implementations of a working draft specification.
9460
9731
  // FireFox implements `key` but returns `MozPrintableKey` for all
9461
9732
  // printable characters (normalized to `Unidentified`), ignore it.
@@ -9464,16 +9735,16 @@
9464
9735
  // thus be captured by `keypress`, no other non-printable key should.
9465
9736
  return charCode===13?'Enter':String.fromCharCode(charCode);}if(nativeEvent.type==='keydown'||nativeEvent.type==='keyup'){// While user keyboard layout determines the actual meaning of each
9466
9737
  // `keyCode` value, almost all function keys have a universal value.
9467
- return translateToKey[nativeEvent.keyCode]||'Unidentified';}return '';}/**
9468
- * Translation from modifier key to the associated property in the event.
9469
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
9470
- */var modifierKeyToProp={Alt:'altKey',Control:'ctrlKey',Meta:'metaKey',Shift:'shiftKey'};// Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
9738
+ return translateToKey[nativeEvent.keyCode]||'Unidentified';}return '';}/**
9739
+ * Translation from modifier key to the associated property in the event.
9740
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
9741
+ */var modifierKeyToProp={Alt:'altKey',Control:'ctrlKey',Meta:'metaKey',Shift:'shiftKey'};// Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
9471
9742
  // getModifierState. If getModifierState is not supported, we map it to a set of
9472
9743
  // modifier keys exposed by the event. In this case, Lock-keys are not supported.
9473
- 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;}/**
9474
- * @interface KeyboardEvent
9475
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
9476
- */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
9744
+ 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;}/**
9745
+ * @interface KeyboardEvent
9746
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
9747
+ */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
9477
9748
  charCode:function(event){// `charCode` is the result of a KeyPress event and represents the value of
9478
9749
  // the actual printable character.
9479
9750
  // KeyPress is deprecated, but its replacement is not yet final and not
@@ -9486,20 +9757,20 @@
9486
9757
  // Due to this, it is left to the user to implement at this time.
9487
9758
  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
9488
9759
  // type of the event.
9489
- if(event.type==='keypress'){return getEventCharCode(event);}if(event.type==='keydown'||event.type==='keyup'){return event.keyCode;}return 0;}});var SyntheticKeyboardEvent=createSyntheticEvent(KeyboardEventInterface);/**
9490
- * @interface PointerEvent
9491
- * @see http://www.w3.org/TR/pointerevents/
9492
- */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);/**
9493
- * @interface TouchEvent
9494
- * @see http://www.w3.org/TR/touch-events/
9495
- */var TouchEventInterface=assign({},UIEventInterface,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:getEventModifierState});var SyntheticTouchEvent=createSyntheticEvent(TouchEventInterface);/**
9496
- * @interface Event
9497
- * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
9498
- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
9499
- */var TransitionEventInterface=assign({},EventInterface,{propertyName:0,elapsedTime:0,pseudoElement:0});var SyntheticTransitionEvent=createSyntheticEvent(TransitionEventInterface);/**
9500
- * @interface WheelEvent
9501
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
9502
- */var WheelEventInterface=assign({},MouseEventInterface,{deltaX:function(event){return 'deltaX'in event?event.deltaX:// Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
9760
+ if(event.type==='keypress'){return getEventCharCode(event);}if(event.type==='keydown'||event.type==='keyup'){return event.keyCode;}return 0;}});var SyntheticKeyboardEvent=createSyntheticEvent(KeyboardEventInterface);/**
9761
+ * @interface PointerEvent
9762
+ * @see http://www.w3.org/TR/pointerevents/
9763
+ */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);/**
9764
+ * @interface TouchEvent
9765
+ * @see http://www.w3.org/TR/touch-events/
9766
+ */var TouchEventInterface=assign({},UIEventInterface,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:getEventModifierState});var SyntheticTouchEvent=createSyntheticEvent(TouchEventInterface);/**
9767
+ * @interface Event
9768
+ * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
9769
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
9770
+ */var TransitionEventInterface=assign({},EventInterface,{propertyName:0,elapsedTime:0,pseudoElement:0});var SyntheticTransitionEvent=createSyntheticEvent(TransitionEventInterface);/**
9771
+ * @interface WheelEvent
9772
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
9773
+ */var WheelEventInterface=assign({},MouseEventInterface,{deltaX:function(event){return 'deltaX'in event?event.deltaX:// Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
9503
9774
  '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).
9504
9775
  'wheelDeltaY'in event?-event.wheelDeltaY:// Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
9505
9776
  'wheelDelta'in event?-event.wheelDelta:0;},deltaZ:0,// Browsers without "deltaMode" is reporting in raw wheel delta where one
@@ -9514,138 +9785,138 @@
9514
9785
  // by the native compositionend event may be incorrect. Japanese ideographic
9515
9786
  // spaces, for instance (\u3000) are not recorded correctly.
9516
9787
  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.
9517
- var hasSpaceKeypress=false;/**
9518
- * Return whether a native keypress event is assumed to be a command.
9519
- * This is required because Firefox fires `keypress` events for key commands
9520
- * (cut, copy, select-all, etc.) even though no character is inserted.
9521
- */function isKeypressCommand(nativeEvent){return (nativeEvent.ctrlKey||nativeEvent.altKey||nativeEvent.metaKey)&&// ctrlKey && altKey is equivalent to AltGr, and is not a command.
9522
- !(nativeEvent.ctrlKey&&nativeEvent.altKey);}/**
9523
- * Translate native top level events into event types.
9524
- */function getCompositionEventType(domEventName){switch(domEventName){case'compositionstart':return 'onCompositionStart';case'compositionend':return 'onCompositionEnd';case'compositionupdate':return 'onCompositionUpdate';}}/**
9525
- * Does our fallback best-guess model think this event signifies that
9526
- * composition has begun?
9527
- */function isFallbackCompositionStart(domEventName,nativeEvent){return domEventName==='keydown'&&nativeEvent.keyCode===START_KEYCODE;}/**
9528
- * Does our fallback mode think that this event is the end of composition?
9529
- */function isFallbackCompositionEnd(domEventName,nativeEvent){switch(domEventName){case'keyup':// Command keys insert or clear IME input.
9788
+ var hasSpaceKeypress=false;/**
9789
+ * Return whether a native keypress event is assumed to be a command.
9790
+ * This is required because Firefox fires `keypress` events for key commands
9791
+ * (cut, copy, select-all, etc.) even though no character is inserted.
9792
+ */function isKeypressCommand(nativeEvent){return (nativeEvent.ctrlKey||nativeEvent.altKey||nativeEvent.metaKey)&&// ctrlKey && altKey is equivalent to AltGr, and is not a command.
9793
+ !(nativeEvent.ctrlKey&&nativeEvent.altKey);}/**
9794
+ * Translate native top level events into event types.
9795
+ */function getCompositionEventType(domEventName){switch(domEventName){case'compositionstart':return 'onCompositionStart';case'compositionend':return 'onCompositionEnd';case'compositionupdate':return 'onCompositionUpdate';}}/**
9796
+ * Does our fallback best-guess model think this event signifies that
9797
+ * composition has begun?
9798
+ */function isFallbackCompositionStart(domEventName,nativeEvent){return domEventName==='keydown'&&nativeEvent.keyCode===START_KEYCODE;}/**
9799
+ * Does our fallback mode think that this event is the end of composition?
9800
+ */function isFallbackCompositionEnd(domEventName,nativeEvent){switch(domEventName){case'keyup':// Command keys insert or clear IME input.
9530
9801
  return END_KEYCODES.indexOf(nativeEvent.keyCode)!==-1;case'keydown':// Expect IME keyCode on each keydown. If we get any other
9531
9802
  // code we must have exited earlier.
9532
9803
  return nativeEvent.keyCode!==START_KEYCODE;case'keypress':case'mousedown':case'focusout':// Events are not possible without cancelling IME.
9533
- return true;default:return false;}}/**
9534
- * Google Input Tools provides composition data via a CustomEvent,
9535
- * with the `data` property populated in the `detail` object. If this
9536
- * is available on the event object, use it. If not, this is a plain
9537
- * composition event and we have nothing special to extract.
9538
- *
9539
- * @param {object} nativeEvent
9540
- * @return {?string}
9541
- */function getDataFromCustomEvent(nativeEvent){var detail=nativeEvent.detail;if(typeof detail==='object'&&'data'in detail){return detail.data;}return null;}/**
9542
- * Check if a composition event was triggered by Korean IME.
9543
- * Our fallback mode does not work well with IE's Korean IME,
9544
- * so just use native composition events when Korean IME is used.
9545
- * Although CompositionEvent.locale property is deprecated,
9546
- * it is available in IE, where our fallback mode is enabled.
9547
- *
9548
- * @param {object} nativeEvent
9549
- * @return {boolean}
9550
- */function isUsingKoreanIME(nativeEvent){return nativeEvent.locale==='ko';}// Track the current IME composition status, if any.
9551
- var isComposing=false;/**
9552
- * @return {?object} A SyntheticCompositionEvent.
9553
- */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
9804
+ return true;default:return false;}}/**
9805
+ * Google Input Tools provides composition data via a CustomEvent,
9806
+ * with the `data` property populated in the `detail` object. If this
9807
+ * is available on the event object, use it. If not, this is a plain
9808
+ * composition event and we have nothing special to extract.
9809
+ *
9810
+ * @param {object} nativeEvent
9811
+ * @return {?string}
9812
+ */function getDataFromCustomEvent(nativeEvent){var detail=nativeEvent.detail;if(typeof detail==='object'&&'data'in detail){return detail.data;}return null;}/**
9813
+ * Check if a composition event was triggered by Korean IME.
9814
+ * Our fallback mode does not work well with IE's Korean IME,
9815
+ * so just use native composition events when Korean IME is used.
9816
+ * Although CompositionEvent.locale property is deprecated,
9817
+ * it is available in IE, where our fallback mode is enabled.
9818
+ *
9819
+ * @param {object} nativeEvent
9820
+ * @return {boolean}
9821
+ */function isUsingKoreanIME(nativeEvent){return nativeEvent.locale==='ko';}// Track the current IME composition status, if any.
9822
+ var isComposing=false;/**
9823
+ * @return {?object} A SyntheticCompositionEvent.
9824
+ */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
9554
9825
  // overwritten while composition continues.
9555
9826
  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.
9556
9827
  // This matches the property of native CompositionEventInterface.
9557
- 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':/**
9558
- * If native `textInput` events are available, our goal is to make
9559
- * use of them. However, there is a special case: the spacebar key.
9560
- * In Webkit, preventing default on a spacebar `textInput` event
9561
- * cancels character insertion, but it *also* causes the browser
9562
- * to fall back to its default spacebar behavior of scrolling the
9563
- * page.
9564
- *
9565
- * Tracking at:
9566
- * https://code.google.com/p/chromium/issues/detail?id=355103
9567
- *
9568
- * To avoid this issue, use the keypress event as if no `textInput`
9569
- * event is available.
9570
- */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.
9828
+ 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':/**
9829
+ * If native `textInput` events are available, our goal is to make
9830
+ * use of them. However, there is a special case: the spacebar key.
9831
+ * In Webkit, preventing default on a spacebar `textInput` event
9832
+ * cancels character insertion, but it *also* causes the browser
9833
+ * to fall back to its default spacebar behavior of scrolling the
9834
+ * page.
9835
+ *
9836
+ * Tracking at:
9837
+ * https://code.google.com/p/chromium/issues/detail?id=355103
9838
+ *
9839
+ * To avoid this issue, use the keypress event as if no `textInput`
9840
+ * event is available.
9841
+ */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.
9571
9842
  var chars=nativeEvent.data;// If it's a spacebar character, assume that we have already handled
9572
9843
  // it at the keypress level and bail immediately. Android Chrome
9573
9844
  // doesn't give us keycodes, so we need to ignore it.
9574
9845
  if(chars===SPACEBAR_CHAR&&hasSpaceKeypress){return null;}return chars;default:// For other native event types, do nothing.
9575
- return null;}}/**
9576
- * For browsers that do not provide the `textInput` event, extract the
9577
- * appropriate string to use for SyntheticInputEvent.
9578
- */function getFallbackBeforeInputChars(domEventName,nativeEvent){// If we are currently composing (IME) and using a fallback to do so,
9846
+ return null;}}/**
9847
+ * For browsers that do not provide the `textInput` event, extract the
9848
+ * appropriate string to use for SyntheticInputEvent.
9849
+ */function getFallbackBeforeInputChars(domEventName,nativeEvent){// If we are currently composing (IME) and using a fallback to do so,
9579
9850
  // try to extract the composed characters from the fallback object.
9580
9851
  // If composition event is available, we extract a string only at
9581
9852
  // compositionevent, otherwise extract it at fallback events.
9582
9853
  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
9583
9854
  // chars. Paste events should not lead to BeforeInput events.
9584
- return null;case'keypress':/**
9585
- * As of v27, Firefox may fire keypress events even when no character
9586
- * will be inserted. A few possibilities:
9587
- *
9588
- * - `which` is `0`. Arrow keys, Esc key, etc.
9589
- *
9590
- * - `which` is the pressed key code, but no char is available.
9591
- * Ex: 'AltGr + d` in Polish. There is no modified character for
9592
- * this key combination and no character is inserted into the
9593
- * document, but FF fires the keypress for char code `100` anyway.
9594
- * No `input` event will occur.
9595
- *
9596
- * - `which` is the pressed key code, but a command combination is
9597
- * being used. Ex: `Cmd+C`. No character is inserted, and no
9598
- * `input` event will occur.
9599
- */if(!isKeypressCommand(nativeEvent)){// IE fires the `keypress` event when a user types an emoji via
9855
+ return null;case'keypress':/**
9856
+ * As of v27, Firefox may fire keypress events even when no character
9857
+ * will be inserted. A few possibilities:
9858
+ *
9859
+ * - `which` is `0`. Arrow keys, Esc key, etc.
9860
+ *
9861
+ * - `which` is the pressed key code, but no char is available.
9862
+ * Ex: 'AltGr + d` in Polish. There is no modified character for
9863
+ * this key combination and no character is inserted into the
9864
+ * document, but FF fires the keypress for char code `100` anyway.
9865
+ * No `input` event will occur.
9866
+ *
9867
+ * - `which` is the pressed key code, but a command combination is
9868
+ * being used. Ex: `Cmd+C`. No character is inserted, and no
9869
+ * `input` event will occur.
9870
+ */if(!isKeypressCommand(nativeEvent)){// IE fires the `keypress` event when a user types an emoji via
9600
9871
  // Touch keyboard of Windows. In such a case, the `char` property
9601
9872
  // holds an emoji character like `\uD83D\uDE0A`. Because its length
9602
9873
  // is 2, the property `which` does not represent an emoji correctly.
9603
9874
  // In such a case, we directly return the `char` property instead of
9604
9875
  // using `which`.
9605
- 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;}}/**
9606
- * Extract a SyntheticInputEvent for `beforeInput`, based on either native
9607
- * `textInput` or fallback behavior.
9608
- *
9609
- * @return {?object} A SyntheticInputEvent.
9610
- */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
9876
+ 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;}}/**
9877
+ * Extract a SyntheticInputEvent for `beforeInput`, based on either native
9878
+ * `textInput` or fallback behavior.
9879
+ *
9880
+ * @return {?object} A SyntheticInputEvent.
9881
+ */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
9611
9882
  // be fired.
9612
- 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;}}/**
9613
- * Create an `onBeforeInput` event to match
9614
- * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
9615
- *
9616
- * This event plugin is based on the native `textInput` event
9617
- * available in Chrome, Safari, Opera, and IE. This event fires after
9618
- * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
9619
- *
9620
- * `beforeInput` is spec'd but not implemented in any browsers, and
9621
- * the `input` event does not provide any useful information about what has
9622
- * actually been added, contrary to the spec. Thus, `textInput` is the best
9623
- * available event to identify the characters that have actually been inserted
9624
- * into the target node.
9625
- *
9626
- * This plugin is also responsible for emitting `composition` events, thus
9627
- * allowing us to share composition fallback code for both `beforeInput` and
9628
- * `composition` event types.
9629
- */function extractEvents(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}/**
9630
- * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
9631
- */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;}/**
9632
- * Checks if an event is supported in the current execution environment.
9633
- *
9634
- * NOTE: This will not work correctly for non-generic events such as `change`,
9635
- * `reset`, `load`, `error`, and `select`.
9636
- *
9637
- * Borrows from Modernizr.
9638
- *
9639
- * @param {string} eventNameSuffix Event name, e.g. "click".
9640
- * @return {boolean} True if the event is supported.
9641
- * @internal
9642
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
9643
- */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.
9644
- 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});}}/**
9645
- * For IE shims
9646
- */var activeElement=null;var activeElementInst=null;/**
9647
- * SECTION: handle `change` event
9648
- */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
9883
+ 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;}}/**
9884
+ * Create an `onBeforeInput` event to match
9885
+ * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
9886
+ *
9887
+ * This event plugin is based on the native `textInput` event
9888
+ * available in Chrome, Safari, Opera, and IE. This event fires after
9889
+ * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
9890
+ *
9891
+ * `beforeInput` is spec'd but not implemented in any browsers, and
9892
+ * the `input` event does not provide any useful information about what has
9893
+ * actually been added, contrary to the spec. Thus, `textInput` is the best
9894
+ * available event to identify the characters that have actually been inserted
9895
+ * into the target node.
9896
+ *
9897
+ * This plugin is also responsible for emitting `composition` events, thus
9898
+ * allowing us to share composition fallback code for both `beforeInput` and
9899
+ * `composition` event types.
9900
+ */function extractEvents(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}/**
9901
+ * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
9902
+ */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;}/**
9903
+ * Checks if an event is supported in the current execution environment.
9904
+ *
9905
+ * NOTE: This will not work correctly for non-generic events such as `change`,
9906
+ * `reset`, `load`, `error`, and `select`.
9907
+ *
9908
+ * Borrows from Modernizr.
9909
+ *
9910
+ * @param {string} eventNameSuffix Event name, e.g. "click".
9911
+ * @return {boolean} True if the event is supported.
9912
+ * @internal
9913
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
9914
+ */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.
9915
+ 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});}}/**
9916
+ * For IE shims
9917
+ */var activeElement=null;var activeElementInst=null;/**
9918
+ * SECTION: handle `change` event
9919
+ */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
9649
9920
  // other events and have it go through ReactBrowserEventEmitter. Since it
9650
9921
  // doesn't, we manually listen for the events and so we have to enqueue and
9651
9922
  // process the abstract event manually.
@@ -9656,21 +9927,21 @@
9656
9927
  // components don't work properly in conjunction with event bubbling because
9657
9928
  // the component is rerendered and the value reverted before all the event
9658
9929
  // handlers can run. See https://github.com/facebook/react/issues/708.
9659
- 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;}}/**
9660
- * SECTION: handle `input` event
9661
- */var isInputEventSupported=false;if(canUseDOM){// IE9 claims to support the input event but fails to trigger it when
9930
+ 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;}}/**
9931
+ * SECTION: handle `input` event
9932
+ */var isInputEventSupported=false;if(canUseDOM){// IE9 claims to support the input event but fails to trigger it when
9662
9933
  // deleting text, so we ignore its input events.
9663
- isInputEventSupported=isEventSupported('input')&&(!document.documentMode||document.documentMode>9);}/**
9664
- * (For IE <=9) Starts tracking propertychange events on the passed-in element
9665
- * and override the value property so that we can distinguish user events from
9666
- * value changes in JS.
9667
- */function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}/**
9668
- * (For IE <=9) Removes the event listeners from the currently-tracked element,
9669
- * if any exists.
9670
- */function stopWatchingForValueChange(){if(!activeElement){return;}activeElement.detachEvent('onpropertychange',handlePropertyChange);activeElement=null;activeElementInst=null;}/**
9671
- * (For IE <=9) Handles a propertychange event, sending a `change` event if
9672
- * the value of the active element has changed.
9673
- */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
9934
+ isInputEventSupported=isEventSupported('input')&&(!document.documentMode||document.documentMode>9);}/**
9935
+ * (For IE <=9) Starts tracking propertychange events on the passed-in element
9936
+ * and override the value property so that we can distinguish user events from
9937
+ * value changes in JS.
9938
+ */function startWatchingForValueChange(target,targetInst){activeElement=target;activeElementInst=targetInst;activeElement.attachEvent('onpropertychange',handlePropertyChange);}/**
9939
+ * (For IE <=9) Removes the event listeners from the currently-tracked element,
9940
+ * if any exists.
9941
+ */function stopWatchingForValueChange(){if(!activeElement){return;}activeElement.detachEvent('onpropertychange',handlePropertyChange);activeElement=null;activeElementInst=null;}/**
9942
+ * (For IE <=9) Handles a propertychange event, sending a `change` event if
9943
+ * the value of the active element has changed.
9944
+ */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
9674
9945
  // doesn't fire when text is deleted, but conveniently, selectionchange
9675
9946
  // appears to fire in all of the remaining cases so we catch those and
9676
9947
  // forward the event if the value has changed
@@ -9691,29 +9962,29 @@
9691
9962
  // keystroke if user does a key repeat (it'll be a little delayed: right
9692
9963
  // before the second keystroke). Other input methods (e.g., paste) seem to
9693
9964
  // fire selectionchange normally.
9694
- return getInstIfValueChanged(activeElementInst);}}/**
9695
- * SECTION: handle `click` event
9696
- */function shouldUseClickEvent(elem){// Use the `click` event to detect changes to checkbox and radio inputs.
9965
+ return getInstIfValueChanged(activeElementInst);}}/**
9966
+ * SECTION: handle `click` event
9967
+ */function shouldUseClickEvent(elem){// Use the `click` event to detect changes to checkbox and radio inputs.
9697
9968
  // This approach works across all browsers, whereas `change` does not fire
9698
9969
  // until `blur` in IE8.
9699
9970
  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
9700
- setDefaultValue(node,'number',node.value);}}/**
9701
- * This plugin creates an `onChange` event that normalizes change events
9702
- * across form elements. This event fires at a time when it's possible to
9703
- * change the element's value without seeing a flicker.
9704
- *
9705
- * Supported elements are:
9706
- * - input (see `isTextInputElement`)
9707
- * - textarea
9708
- * - select
9709
- */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
9710
- if(domEventName==='focusout'){handleControlledInputBlur(targetNode);}}function registerEvents$2(){registerDirectEvent('onMouseEnter',['mouseout','mouseover']);registerDirectEvent('onMouseLeave',['mouseout','mouseover']);registerDirectEvent('onPointerEnter',['pointerout','pointerover']);registerDirectEvent('onPointerLeave',['pointerout','pointerover']);}/**
9711
- * For almost every interaction we care about, there will be both a top-level
9712
- * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
9713
- * we do not extract duplicate events. However, moving the mouse into the
9714
- * browser from outside will not fire a `mouseout` event. In this case, we use
9715
- * the `mouseover` top-level event.
9716
- */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
9971
+ setDefaultValue(node,'number',node.value);}}/**
9972
+ * This plugin creates an `onChange` event that normalizes change events
9973
+ * across form elements. This event fires at a time when it's possible to
9974
+ * change the element's value without seeing a flicker.
9975
+ *
9976
+ * Supported elements are:
9977
+ * - input (see `isTextInputElement`)
9978
+ * - textarea
9979
+ * - select
9980
+ */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
9981
+ if(domEventName==='focusout'){handleControlledInputBlur(targetNode);}}function registerEvents$2(){registerDirectEvent('onMouseEnter',['mouseout','mouseover']);registerDirectEvent('onMouseLeave',['mouseout','mouseover']);registerDirectEvent('onPointerEnter',['pointerout','pointerover']);registerDirectEvent('onPointerLeave',['pointerout','pointerover']);}/**
9982
+ * For almost every interaction we care about, there will be both a top-level
9983
+ * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
9984
+ * we do not extract duplicate events. However, moving the mouse into the
9985
+ * browser from outside will not fire a `mouseout` event. In this case, we use
9986
+ * the `mouseover` top-level event.
9987
+ */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
9717
9988
  // the event in the out event of the other target. If this is replayed,
9718
9989
  // then it's because we couldn't dispatch against this target previously
9719
9990
  // so we have to do it now instead.
@@ -9727,51 +9998,51 @@
9727
9998
  from=null;to=targetInst;}if(from===to){// Nothing pertains to our managed components.
9728
9999
  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
9729
10000
  // the first ancestor. Next time, we will ignore the event.
9730
- 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);}/**
9731
- * inlined Object.is polyfill to avoid requiring consumers ship their own
9732
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
9733
- */function is(x,y){return x===y&&(x!==0||1/x===1/y)||x!==x&&y!==y// eslint-disable-line no-self-compare
9734
- ;}var objectIs=typeof Object.is==='function'?Object.is:is;/**
9735
- * Performs equality by iterating through keys on an object and returning false
9736
- * when any key has values which are not strictly equal between the arguments.
9737
- * Returns true when the values of all keys are strictly equal.
9738
- */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.
9739
- 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;}/**
9740
- * Given any node return the first leaf node without children.
9741
- *
9742
- * @param {DOMElement|DOMTextNode} node
9743
- * @return {DOMElement|DOMTextNode}
9744
- */function getLeafNode(node){while(node&&node.firstChild){node=node.firstChild;}return node;}/**
9745
- * Get the next sibling within a container. This will walk up the
9746
- * DOM if a node's siblings have been exhausted.
9747
- *
9748
- * @param {DOMElement|DOMTextNode} node
9749
- * @return {?DOMElement|DOMTextNode}
9750
- */function getSiblingNode(node){while(node){if(node.nextSibling){return node.nextSibling;}node=node.parentNode;}}/**
9751
- * Get object describing the nodes which contain characters at offset.
9752
- *
9753
- * @param {DOMElement|DOMTextNode} root
9754
- * @param {number} offset
9755
- * @return {?object}
9756
- */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));}}/**
9757
- * @param {DOMElement} outerNode
9758
- * @return {?object}
9759
- */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
10001
+ 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);}/**
10002
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
10003
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
10004
+ */function is(x,y){return x===y&&(x!==0||1/x===1/y)||x!==x&&y!==y// eslint-disable-line no-self-compare
10005
+ ;}var objectIs=typeof Object.is==='function'?Object.is:is;/**
10006
+ * Performs equality by iterating through keys on an object and returning false
10007
+ * when any key has values which are not strictly equal between the arguments.
10008
+ * Returns true when the values of all keys are strictly equal.
10009
+ */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.
10010
+ 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;}/**
10011
+ * Given any node return the first leaf node without children.
10012
+ *
10013
+ * @param {DOMElement|DOMTextNode} node
10014
+ * @return {DOMElement|DOMTextNode}
10015
+ */function getLeafNode(node){while(node&&node.firstChild){node=node.firstChild;}return node;}/**
10016
+ * Get the next sibling within a container. This will walk up the
10017
+ * DOM if a node's siblings have been exhausted.
10018
+ *
10019
+ * @param {DOMElement|DOMTextNode} node
10020
+ * @return {?DOMElement|DOMTextNode}
10021
+ */function getSiblingNode(node){while(node){if(node.nextSibling){return node.nextSibling;}node=node.parentNode;}}/**
10022
+ * Get object describing the nodes which contain characters at offset.
10023
+ *
10024
+ * @param {DOMElement|DOMTextNode} root
10025
+ * @param {number} offset
10026
+ * @return {?object}
10027
+ */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));}}/**
10028
+ * @param {DOMElement} outerNode
10029
+ * @return {?object}
10030
+ */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
9760
10031
  // up/down buttons on an <input type="number">. Anonymous divs do not seem to
9761
10032
  // expose properties, triggering a "Permission denied error" if any of its
9762
10033
  // properties are accessed. The only seemingly possible way to avoid erroring
9763
10034
  // is to access a property that typically works for non-anonymous divs and
9764
10035
  // catch any error that may otherwise arise. See
9765
10036
  // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
9766
- 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);}/**
9767
- * Returns {start, end} where `start` is the character/codepoint index of
9768
- * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
9769
- * `end` is the index of (focusNode, focusOffset).
9770
- *
9771
- * Returns null if you pass in garbage input but we should probably just crash.
9772
- *
9773
- * Exported only for testing.
9774
- */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`.
10037
+ 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);}/**
10038
+ * Returns {start, end} where `start` is the character/codepoint index of
10039
+ * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
10040
+ * `end` is the index of (focusNode, focusOffset).
10041
+ *
10042
+ * Returns null if you pass in garbage input but we should probably just crash.
10043
+ *
10044
+ * Exported only for testing.
10045
+ */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`.
9775
10046
  parentNode=node;node=next;}while(true){if(node===outerNode){// If `outerNode` has children, this is always the second time visiting
9776
10047
  // it. If it has no children, this is still the first loop, and the only
9777
10048
  // valid selection is anchorNode and focusNode both equal to this node
@@ -9779,18 +10050,18 @@
9779
10050
  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`.
9780
10051
  node=next;}if(start===-1||end===-1){// This should never happen. (Would happen if the anchor/focus nodes aren't
9781
10052
  // actually inside the passed-in node.)
9782
- return null;}return {start:start,end:end};}/**
9783
- * In modern non-IE browsers, we can support both forward and backward
9784
- * selections.
9785
- *
9786
- * Note: IE10+ supports the Selection object, but it does not support
9787
- * the `extend` method, which means that even in modern IE, it's not possible
9788
- * to programmatically create a backward selection. Thus, for all IE
9789
- * versions, we use the old IE API to create our selections.
9790
- *
9791
- * @param {DOMElement|DOMTextNode} node
9792
- * @param {object} offsets
9793
- */function setOffsets(node,offsets){var doc=node.ownerDocument||document;var win=doc&&doc.defaultView||window;// Edge fails with "Object expected" in some scenarios.
10053
+ return null;}return {start:start,end:end};}/**
10054
+ * In modern non-IE browsers, we can support both forward and backward
10055
+ * selections.
10056
+ *
10057
+ * Note: IE10+ supports the Selection object, but it does not support
10058
+ * the `extend` method, which means that even in modern IE, it's not possible
10059
+ * to programmatically create a backward selection. Thus, for all IE
10060
+ * versions, we use the old IE API to create our selections.
10061
+ *
10062
+ * @param {DOMElement|DOMTextNode} node
10063
+ * @param {object} offsets
10064
+ */function setOffsets(node,offsets){var doc=node.ownerDocument||document;var win=doc&&doc.defaultView||window;// Edge fails with "Object expected" in some scenarios.
9794
10065
  // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
9795
10066
  // fails when pasting 100+ items)
9796
10067
  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.
@@ -9802,64 +10073,64 @@
9802
10073
  // A safety way is to access one of the cross origin properties: Window or Location
9803
10074
  // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
9804
10075
  // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
9805
- 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;}/**
9806
- * @ReactInputSelection: React input selection module. Based on Selection.js,
9807
- * but modified to be suitable for react and has a couple of bug fixes (doesn't
9808
- * assume buttons have range selections allowed).
9809
- * Input selection module for React.
9810
- *//**
9811
- * @hasSelectionCapabilities: we get the element types that support selection
9812
- * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
9813
- * and `selectionEnd` rows.
9814
- */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};}/**
9815
- * @restoreSelection: If any selection information was potentially lost,
9816
- * restore it. This is useful when performing operations that could remove dom
9817
- * nodes and place them back in, resulting in focus being lost.
9818
- */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
9819
- 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;}}}/**
9820
- * @getSelection: Gets the selection bounds of a focused textarea, input or
9821
- * contentEditable node.
9822
- * -@input: Look up selection bounds of this input
9823
- * -@return {start: selectionStart, end: selectionEnd}
9824
- */function getSelection(input){var selection;if('selectionStart'in input){// Modern browser with input or textarea.
10076
+ 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;}/**
10077
+ * @ReactInputSelection: React input selection module. Based on Selection.js,
10078
+ * but modified to be suitable for react and has a couple of bug fixes (doesn't
10079
+ * assume buttons have range selections allowed).
10080
+ * Input selection module for React.
10081
+ *//**
10082
+ * @hasSelectionCapabilities: we get the element types that support selection
10083
+ * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
10084
+ * and `selectionEnd` rows.
10085
+ */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};}/**
10086
+ * @restoreSelection: If any selection information was potentially lost,
10087
+ * restore it. This is useful when performing operations that could remove dom
10088
+ * nodes and place them back in, resulting in focus being lost.
10089
+ */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
10090
+ 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;}}}/**
10091
+ * @getSelection: Gets the selection bounds of a focused textarea, input or
10092
+ * contentEditable node.
10093
+ * -@input: Look up selection bounds of this input
10094
+ * -@return {start: selectionStart, end: selectionEnd}
10095
+ */function getSelection(input){var selection;if('selectionStart'in input){// Modern browser with input or textarea.
9825
10096
  selection={start:input.selectionStart,end:input.selectionEnd};}else {// Content editable or old IE textarea.
9826
- selection=getOffsets(input);}return selection||{start:0,end:0};}/**
9827
- * @setSelection: Sets the selection bounds of a textarea or input and focuses
9828
- * the input.
9829
- * -@input Set selection bounds of this input or textarea
9830
- * -@offsets Object of same form that is returned from get*
9831
- */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;/**
9832
- * Get an object which is a unique representation of the current selection.
9833
- *
9834
- * The return value will not be consistent across nodes or browsers, but
9835
- * two identical selections on the same node will return identical objects.
9836
- */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};}}/**
9837
- * Get document associated with the event target.
9838
- */function getEventTargetDocument(eventTarget){return eventTarget.window===eventTarget?eventTarget.document:eventTarget.nodeType===DOCUMENT_NODE?eventTarget:eventTarget.ownerDocument;}/**
9839
- * Poll selection to see whether it's changed.
9840
- *
9841
- * @param {object} nativeEvent
9842
- * @param {object} nativeEventTarget
9843
- * @return {?SyntheticEvent}
9844
- */function constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget){// Ensure we have the right element, and that the user is not dragging a
10097
+ selection=getOffsets(input);}return selection||{start:0,end:0};}/**
10098
+ * @setSelection: Sets the selection bounds of a textarea or input and focuses
10099
+ * the input.
10100
+ * -@input Set selection bounds of this input or textarea
10101
+ * -@offsets Object of same form that is returned from get*
10102
+ */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;/**
10103
+ * Get an object which is a unique representation of the current selection.
10104
+ *
10105
+ * The return value will not be consistent across nodes or browsers, but
10106
+ * two identical selections on the same node will return identical objects.
10107
+ */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};}}/**
10108
+ * Get document associated with the event target.
10109
+ */function getEventTargetDocument(eventTarget){return eventTarget.window===eventTarget?eventTarget.document:eventTarget.nodeType===DOCUMENT_NODE?eventTarget:eventTarget.ownerDocument;}/**
10110
+ * Poll selection to see whether it's changed.
10111
+ *
10112
+ * @param {object} nativeEvent
10113
+ * @param {object} nativeEventTarget
10114
+ * @return {?SyntheticEvent}
10115
+ */function constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget){// Ensure we have the right element, and that the user is not dragging a
9845
10116
  // selection (this matches native `select` event behavior). In HTML5, select
9846
10117
  // fires only on input and textarea thus if there's no focused element we
9847
10118
  // won't dispatch.
9848
10119
  var doc=getEventTargetDocument(nativeEventTarget);if(mouseDown||activeElement$1==null||activeElement$1!==getActiveElement(doc)){return;}// Only fire when selection has actually changed.
9849
- 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;}}}/**
9850
- * This plugin creates an `onSelect` event that normalizes select events
9851
- * across form elements.
9852
- *
9853
- * Supported elements are:
9854
- * - input (see `isTextInputElement`)
9855
- * - textarea
9856
- * - contentEditable
9857
- *
9858
- * This differs from native browser implementations in the following ways:
9859
- * - Fires on contentEditable fields as well as inputs.
9860
- * - Fires for collapsed selection.
9861
- * - Fires after user input.
9862
- */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.
10120
+ 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;}}}/**
10121
+ * This plugin creates an `onSelect` event that normalizes select events
10122
+ * across form elements.
10123
+ *
10124
+ * Supported elements are:
10125
+ * - input (see `isTextInputElement`)
10126
+ * - textarea
10127
+ * - contentEditable
10128
+ *
10129
+ * This differs from native browser implementations in the following ways:
10130
+ * - Fires on contentEditable fields as well as inputs.
10131
+ * - Fires for collapsed selection.
10132
+ * - Fires after user input.
10133
+ */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.
9863
10134
  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
9864
10135
  // semantics of the native select event.
9865
10136
  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
@@ -9872,31 +10143,31 @@
9872
10143
  // key, when multiple keydown events are fired but only one keyup is.
9873
10144
  // This is also our approach for IE handling, for the reason above.
9874
10145
  case'selectionchange':if(skipSelectionChangeEvent){break;}// falls through
9875
- case'keydown':case'keyup':constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);}}/**
9876
- * Generate a mapping of standard vendor prefixes using the defined style property and event name.
9877
- *
9878
- * @param {string} styleProp
9879
- * @param {string} eventName
9880
- * @returns {object}
9881
- */function makePrefixMap(styleProp,eventName){var prefixes={};prefixes[styleProp.toLowerCase()]=eventName.toLowerCase();prefixes['Webkit'+styleProp]='webkit'+eventName;prefixes['Moz'+styleProp]='moz'+eventName;return prefixes;}/**
9882
- * A list of event names to a configurable list of vendor prefixes.
9883
- */var vendorPrefixes={animationend:makePrefixMap('Animation','AnimationEnd'),animationiteration:makePrefixMap('Animation','AnimationIteration'),animationstart:makePrefixMap('Animation','AnimationStart'),transitionend:makePrefixMap('Transition','TransitionEnd')};/**
9884
- * Event names that have already been detected and prefixed (if applicable).
9885
- */var prefixedEventNames={};/**
9886
- * Element to check for prefixes on.
9887
- */var style={};/**
9888
- * Bootstrap if a DOM exists.
9889
- */if(canUseDOM){style=document.createElement('div').style;// On some platforms, in particular some releases of Android 4.x,
10146
+ case'keydown':case'keyup':constructSelectEvent(dispatchQueue,nativeEvent,nativeEventTarget);}}/**
10147
+ * Generate a mapping of standard vendor prefixes using the defined style property and event name.
10148
+ *
10149
+ * @param {string} styleProp
10150
+ * @param {string} eventName
10151
+ * @returns {object}
10152
+ */function makePrefixMap(styleProp,eventName){var prefixes={};prefixes[styleProp.toLowerCase()]=eventName.toLowerCase();prefixes['Webkit'+styleProp]='webkit'+eventName;prefixes['Moz'+styleProp]='moz'+eventName;return prefixes;}/**
10153
+ * A list of event names to a configurable list of vendor prefixes.
10154
+ */var vendorPrefixes={animationend:makePrefixMap('Animation','AnimationEnd'),animationiteration:makePrefixMap('Animation','AnimationIteration'),animationstart:makePrefixMap('Animation','AnimationStart'),transitionend:makePrefixMap('Transition','TransitionEnd')};/**
10155
+ * Event names that have already been detected and prefixed (if applicable).
10156
+ */var prefixedEventNames={};/**
10157
+ * Element to check for prefixes on.
10158
+ */var style={};/**
10159
+ * Bootstrap if a DOM exists.
10160
+ */if(canUseDOM){style=document.createElement('div').style;// On some platforms, in particular some releases of Android 4.x,
9890
10161
  // the un-prefixed "animation" and "transition" properties are defined on the
9891
10162
  // style object but the events that fire will still be prefixed, so we need
9892
10163
  // to check if the un-prefixed events are usable, and if not remove them from the map.
9893
10164
  if(!('AnimationEvent'in window)){delete vendorPrefixes.animationend.animation;delete vendorPrefixes.animationiteration.animation;delete vendorPrefixes.animationstart.animation;}// Same as above
9894
- if(!('TransitionEvent'in window)){delete vendorPrefixes.transitionend.transition;}}/**
9895
- * Attempts to determine the correct vendor prefixed event name.
9896
- *
9897
- * @param {string} eventName
9898
- * @returns {string}
9899
- */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!
10165
+ if(!('TransitionEvent'in window)){delete vendorPrefixes.transitionend.transition;}}/**
10166
+ * Attempts to determine the correct vendor prefixed event name.
10167
+ *
10168
+ * @param {string} eventName
10169
+ * @returns {string}
10170
+ */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!
9900
10171
  //
9901
10172
  // E.g. it needs "pointerDown", not "pointerdown".
9902
10173
  // This is because we derive both React name ("onPointerDown")
@@ -10010,10 +10281,10 @@
10010
10281
  // events to their parent. We could also go through parentNode on the
10011
10282
  // host node but that wouldn't work for React Native and doesn't let us
10012
10283
  // do the portal feature.
10013
- }while(inst&&inst.tag!==HostComponent);if(inst){return inst;}return null;}/**
10014
- * Return the lowest common ancestor of A and B, or null if they are in
10015
- * different trees.
10016
- */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.
10284
+ }while(inst&&inst.tag!==HostComponent);if(inst){return inst;}return null;}/**
10285
+ * Return the lowest common ancestor of A and B, or null if they are in
10286
+ * different trees.
10287
+ */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.
10017
10288
  while(depthA-depthB>0){nodeA=getParent(nodeA);depthA--;}// If B is deeper, crawl up.
10018
10289
  while(depthB-depthA>0){nodeB=getParent(nodeB);depthB--;}// Walk in lockstep until we find a match.
10019
10290
  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:
@@ -10214,16 +10485,15 @@
10214
10485
  // first, causing a confusing mess.
10215
10486
  // https://html.spec.whatwg.org/multipage/syntax.html#special
10216
10487
  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
10217
- var inScopeTags=['applet','caption','html','table','td','th','marquee','object','template',// https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
10218
- // TODO: Distinguish by namespace here -- for <title>, including it here
10488
+ var inScopeTags=['applet','caption','html','table','td','th','marquee','object','template',// TODO: Distinguish by namespace here -- for <title>, including it here
10219
10489
  // errs on the side of fewer warnings
10220
10490
  'foreignObject','desc','title'];// https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
10221
10491
  var buttonScopeTags=inScopeTags.concat(['button']);// https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
10222
10492
  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
10223
10493
  // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
10224
- 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;};/**
10225
- * Returns whether
10226
- */var isTagValidWithParent=function(tag,parentTag){// First, let's check if we're in an unusual parsing mode...
10494
+ 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;};/**
10495
+ * Returns whether
10496
+ */var isTagValidWithParent=function(tag,parentTag){// First, let's check if we're in an unusual parsing mode...
10227
10497
  switch(parentTag){// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
10228
10498
  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>
10229
10499
  // but
@@ -10244,9 +10514,9 @@
10244
10514
  // parsing rules -- if we're down here, then none of those matched and
10245
10515
  // so we allow it only if we don't know what the parent is, as all other
10246
10516
  // cases are invalid.
10247
- return parentTag==null;}return true;};/**
10248
- * Returns whether
10249
- */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
10517
+ return parentTag==null;}return true;};/**
10518
+ * Returns whether
10519
+ */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
10250
10520
  // equivalent to this check.
10251
10521
  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.
10252
10522
  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).
@@ -10372,13 +10642,13 @@
10372
10642
  suspenseInstance=getParentSuspenseInstance(suspenseInstance);// If we don't find one, then that should mean that the parent
10373
10643
  // host component also hasn't hydrated yet. We can return it
10374
10644
  // below since it will bail out on the isMounted check later.
10375
- }}return targetInst;}targetNode=parentNode;parentNode=targetNode.parentNode;}return null;}/**
10376
- * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
10377
- * instance, or null if the node was not rendered by this React.
10378
- */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;}/**
10379
- * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
10380
- * DOM node.
10381
- */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
10645
+ }}return targetInst;}targetNode=parentNode;parentNode=targetNode.parentNode;}return null;}/**
10646
+ * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
10647
+ * instance, or null if the node was not rendered by this React.
10648
+ */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;}/**
10649
+ * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
10650
+ * DOM node.
10651
+ */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
10382
10652
  // a host component or host text.
10383
10653
  return inst.stateNode;}// Without this first invariant, passing a non-DOM-component triggers the next
10384
10654
  // invariant for a missing parent, which is super confusing.
@@ -10535,11 +10805,11 @@
10535
10805
  // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'
10536
10806
  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.
10537
10807
  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.
10538
- 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={};/**
10539
- * Warn if there's no key explicitly set on dynamic arrays of children or
10540
- * object keys are not valid. This allows us to keep track of children between
10541
- * updates.
10542
- */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
10808
+ 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={};/**
10809
+ * Warn if there's no key explicitly set on dynamic arrays of children or
10810
+ * object keys are not valid. This allows us to keep track of children between
10811
+ * updates.
10812
+ */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
10543
10813
  // everyone, because the strict mode case will no longer be relevant
10544
10814
  if((returnFiber.mode&StrictLegacyMode||warnAboutStringRefs)&&// We warn in ReactElement.js if owner and self are equal for string refs
10545
10815
  // because these cannot be automatically converted to an arrow function
@@ -10591,9 +10861,9 @@
10591
10861
  // node.
10592
10862
  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
10593
10863
  // new node for the key. If both are text nodes, they match.
10594
- 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;}/**
10595
- * Warns if there is a duplicate or missing key
10596
- */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
10864
+ 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;}/**
10865
+ * Warns if there is a duplicate or missing key
10866
+ */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
10597
10867
  // don't have backpointers on fibers. I'm trying to see how far we can get
10598
10868
  // with that model. If it ends up not being worth the tradeoffs, we can
10599
10869
  // add it later.
@@ -11066,8 +11336,7 @@
11066
11336
  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
11067
11337
  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?
11068
11338
  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?
11069
- 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.
11070
- // The react-debug-hooks package injects its own implementation
11339
+ 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
11071
11340
  // so that e.g. DevTools can display custom hook values.
11072
11341
  }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.
11073
11342
  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.
@@ -11127,22 +11396,22 @@
11127
11396
  var newQueueLanes=mergeLanes(queueLanes,lane);queue.lanes=newQueueLanes;// Even if queue.lanes already include lane, we don't know for certain if
11128
11397
  // the lane finished since the last time we entangled it. So we need to
11129
11398
  // entangle it again, just to be sure.
11130
- 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;/**
11131
- * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).
11132
- *
11133
- * The overall sequence is:
11134
- * 1. render
11135
- * 2. commit (and call `onRender`, `onCommit`)
11136
- * 3. check for nested updates
11137
- * 4. flush passive effects (and call `onPostCommit`)
11138
- *
11139
- * Nested updates are identified in step 3 above,
11140
- * but step 4 still applies to the work that was just committed.
11141
- * We use two flags to track nested updates then:
11142
- * one tracks whether the upcoming update is a nested update,
11143
- * and the other tracks whether the current update was a nested update.
11144
- * The first value gets synced to the second at the start of the render phase.
11145
- */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
11399
+ 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;/**
11400
+ * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).
11401
+ *
11402
+ * The overall sequence is:
11403
+ * 1. render
11404
+ * 2. commit (and call `onRender`, `onCommit`)
11405
+ * 3. check for nested updates
11406
+ * 4. flush passive effects (and call `onPostCommit`)
11407
+ *
11408
+ * Nested updates are identified in step 3 above,
11409
+ * but step 4 still applies to the work that was just committed.
11410
+ * We use two flags to track nested updates then:
11411
+ * one tracks whether the upcoming update is a nested update,
11412
+ * and the other tracks whether the current update was a nested update.
11413
+ * The first value gets synced to the second at the start of the render phase.
11414
+ */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
11146
11415
  // Or the root (for the DevTools Profiler to read)
11147
11416
  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
11148
11417
  // Or the root (for the DevTools Profiler to read)
@@ -11924,8 +12193,7 @@
11924
12193
  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
11925
12194
  appendAllChildren=function(parent,workInProgress,needsVisibilityToggle,isHidden){// We only have the top Fiber that was created but we need recurse down its
11926
12195
  // children to find all the terminal nodes.
11927
- 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
11928
- };updateHostComponent$1=function(current,workInProgress,type,newProps,rootContainerInstance){// If we have an alternate, that means this is an update and we need to
12196
+ 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
11929
12197
  // schedule a side-effect to do the updates.
11930
12198
  var oldProps=current.memoizedProps;if(oldProps===newProps){// In mutation mode, this is sufficient for a bailout because
11931
12199
  // we won't touch this node even if children changed.
@@ -13200,8 +13468,7 @@
13200
13468
  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.
13201
13469
  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.
13202
13470
  // We only use it in places that are currently more relaxed.
13203
- 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
13204
- // legacy API.
13471
+ 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.
13205
13472
  }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
13206
13473
  false,// isStrictMode
13207
13474
  false,// concurrentUpdatesByDefaultOverride,
@@ -13294,32 +13561,42 @@
13294
13561
  className: '',
13295
13562
  confirmBeforeClose: false,
13296
13563
  confirmMessage: 'Are you sure you want to close?',
13297
- confirmCallback: function (msg) {
13298
- return __awaiter(void 0, void 0, void 0, function () {
13299
- return __generator(this, function (_a) {
13300
- return [2 /*return*/, typeof window !== 'undefined' ? Promise.resolve(window.confirm(msg)) : Promise.resolve(true)];
13301
- });
13302
- });
13303
- },
13564
+ confirmCallback: function () {
13565
+ var _confirmCallback = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(msg) {
13566
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13567
+ while (1) switch (_context.prev = _context.next) {
13568
+ case 0:
13569
+ return _context.abrupt("return", typeof window !== 'undefined' ? Promise.resolve(window.confirm(msg)) : Promise.resolve(true));
13570
+ case 1:
13571
+ case "end":
13572
+ return _context.stop();
13573
+ }
13574
+ }, _callee);
13575
+ }));
13576
+ function confirmCallback(_x) {
13577
+ return _confirmCallback.apply(this, arguments);
13578
+ }
13579
+ return confirmCallback;
13580
+ }(),
13304
13581
  closeOnOverlayClick: true,
13305
13582
  closeOnEsc: true,
13306
13583
  animationDuration: 240,
13307
- onOpen: function () {},
13308
- onClose: function () {}
13584
+ onOpen: function onOpen() {},
13585
+ onClose: function onClose() {}
13309
13586
  };
13310
13587
 
13311
- var SideSheetContainer = function (_a) {
13312
- var stack = _a.stack,
13313
- open = _a.open,
13314
- close = _a.close,
13315
- update = _a.update,
13316
- config = _a.config;
13588
+ var SideSheetContainer = function SideSheetContainer(_ref) {
13589
+ var stack = _ref.stack,
13590
+ open = _ref.open,
13591
+ close = _ref.close,
13592
+ update = _ref.update,
13593
+ config = _ref.config;
13317
13594
  React.useEffect(function () {
13318
- var onKeyDown = function (e) {
13595
+ var onKeyDown = function onKeyDown(e) {
13319
13596
  if (e.key === 'Escape') {
13320
- var top_1 = stack[stack.length - 1];
13321
- if ((top_1 === null || top_1 === void 0 ? void 0 : top_1.options.closeOnEsc) && top_1.state === 'open') {
13322
- close(top_1.id);
13597
+ var top = stack[stack.length - 1];
13598
+ if (top !== null && top !== void 0 && top.options.closeOnEsc && top.state === 'open') {
13599
+ close(top.id);
13323
13600
  }
13324
13601
  }
13325
13602
  };
@@ -13328,33 +13605,33 @@
13328
13605
  document.removeEventListener('keydown', onKeyDown);
13329
13606
  };
13330
13607
  }, [stack, close]);
13331
- return React__default.createElement(React__default.Fragment, null, stack.map(function (item, idx) {
13332
- var _a;
13608
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, stack.map(function (item, idx) {
13609
+ var _stack;
13333
13610
  var isTop = idx === stack.length - 1;
13334
- var isPrevClosing = ((_a = stack[idx - 1]) === null || _a === void 0 ? void 0 : _a.state) === 'closing';
13335
- var _b = item.options,
13336
- width = _b.width,
13337
- closeOnOverlayClick = _b.closeOnOverlayClick,
13338
- className = _b.className;
13611
+ var isPrevClosing = ((_stack = stack[idx - 1]) === null || _stack === void 0 ? void 0 : _stack.state) === 'closing';
13612
+ var _item$options = item.options,
13613
+ width = _item$options.width,
13614
+ closeOnOverlayClick = _item$options.closeOnOverlayClick,
13615
+ className = _item$options.className;
13339
13616
  if (config.mountStrategy === 'top-only' && !isTop && !isPrevClosing) return null;
13340
- return React__default.createElement(React__default.Fragment, {
13617
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
13341
13618
  key: item.id
13342
- }, React__default.createElement("div", {
13619
+ }, /*#__PURE__*/React__default.createElement("div", {
13343
13620
  className: "sidesheet-overlay",
13344
- onClick: function () {
13621
+ onClick: function onClick() {
13345
13622
  if (closeOnOverlayClick && item.state === 'open') {
13346
13623
  close(item.id);
13347
13624
  }
13348
13625
  }
13349
- }), React__default.createElement("div", {
13626
+ }), /*#__PURE__*/React__default.createElement("div", {
13350
13627
  role: "dialog",
13351
13628
  "aria-modal": "true",
13352
- className: classnames('sidesheet', "sidesheet-animation-" + item.state, {
13629
+ className: classnames('sidesheet', "sidesheet-animation-".concat(item.state), {
13353
13630
  'sidesheet-left': config.side === 'left',
13354
13631
  'sidesheet-right': config.side === 'right'
13355
13632
  }, className),
13356
13633
  style: {
13357
- width: "" + (isTop || isPrevClosing ? width + "px" : '100%')
13634
+ width: "".concat(isTop || isPrevClosing ? "".concat(width, "px") : '100%')
13358
13635
  }
13359
13636
  }, item.element({
13360
13637
  sideId: item.id,
@@ -13366,19 +13643,19 @@
13366
13643
  }));
13367
13644
  };
13368
13645
 
13369
- var SideSheetReducer = function (state, action) {
13646
+ var SideSheetReducer = function SideSheetReducer(state, action) {
13370
13647
  switch (action.type) {
13371
13648
  case 'OPEN':
13372
- return __spreadArrays(state, [action.payload]);
13649
+ return [].concat(_toConsumableArray(state), [action.payload]);
13373
13650
  case 'SET_OPEN':
13374
13651
  return state.map(function (item) {
13375
- return item.id === action.id ? __assign$1(__assign$1({}, item), {
13652
+ return item.id === action.id ? _objectSpread2(_objectSpread2({}, item), {}, {
13376
13653
  state: 'open'
13377
13654
  }) : item;
13378
13655
  });
13379
13656
  case 'CLOSE':
13380
13657
  return state.map(function (item) {
13381
- return action.id === null || item.id === action.id ? __assign$1(__assign$1({}, item), {
13658
+ return action.id === null || item.id === action.id ? _objectSpread2(_objectSpread2({}, item), {}, {
13382
13659
  state: 'closing'
13383
13660
  }) : item;
13384
13661
  });
@@ -13388,8 +13665,8 @@
13388
13665
  });
13389
13666
  case 'UPDATE':
13390
13667
  return state.map(function (item) {
13391
- return item.id === action.id ? __assign$1(__assign$1({}, item), {
13392
- options: __assign$1(__assign$1({}, item.options), action.options)
13668
+ return item.id === action.id ? _objectSpread2(_objectSpread2({}, item), {}, {
13669
+ options: _objectSpread2(_objectSpread2({}, item.options), action.options)
13393
13670
  }) : item;
13394
13671
  });
13395
13672
  default:
@@ -13397,24 +13674,23 @@
13397
13674
  }
13398
13675
  };
13399
13676
 
13400
- var SideSheetContext = React.createContext(null);
13401
- var SideSheetProvider = function (_a) {
13402
- var children = _a.children,
13403
- configuration = _a.configuration;
13404
- var _b = React.useReducer(SideSheetReducer, []),
13405
- stack = _b[0],
13406
- dispatch = _b[1];
13677
+ var SideSheetContext = /*#__PURE__*/React.createContext(null);
13678
+ var SideSheetProvider = function SideSheetProvider(_ref) {
13679
+ var children = _ref.children,
13680
+ configuration = _ref.configuration;
13681
+ var _useReducer = React.useReducer(SideSheetReducer, []),
13682
+ _useReducer2 = _slicedToArray(_useReducer, 2),
13683
+ stack = _useReducer2[0],
13684
+ dispatch = _useReducer2[1];
13407
13685
  var idRef = React.useRef(0);
13408
13686
  var stackRef = React.useRef(stack);
13409
13687
  React.useEffect(function () {
13410
13688
  stackRef.current = stack;
13411
13689
  }, [stack]);
13412
- var open = React.useCallback(function (element, opts) {
13413
- if (opts === void 0) {
13414
- opts = {};
13415
- }
13690
+ var open = React.useCallback(function (element) {
13691
+ var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13416
13692
  var id = ++idRef.current;
13417
- var options = __assign$1(__assign$1({}, DEFAULT_SHEET_OPTIONS), opts);
13693
+ var options = _objectSpread2(_objectSpread2({}, DEFAULT_SHEET_OPTIONS), opts);
13418
13694
  dispatch({
13419
13695
  type: 'OPEN',
13420
13696
  payload: {
@@ -13425,44 +13701,65 @@
13425
13701
  }
13426
13702
  });
13427
13703
  setTimeout(function () {
13428
- var _a;
13704
+ var _options$onOpen;
13429
13705
  dispatch({
13430
13706
  type: 'SET_OPEN',
13431
13707
  id: id
13432
13708
  });
13433
- (_a = options.onOpen) === null || _a === void 0 ? void 0 : _a.call(options, id);
13709
+ (_options$onOpen = options.onOpen) === null || _options$onOpen === void 0 || _options$onOpen.call(options, id);
13434
13710
  }, options.animationDuration);
13435
13711
  return id;
13436
13712
  }, []);
13437
- var close = React.useCallback(function (id) {
13438
- return __awaiter(void 0, void 0, void 0, function () {
13439
- var itemsToClose, _i, itemsToClose_1, item, confirmed, duration;
13440
- var _a, _b, _c;
13441
- return __generator(this, function (_d) {
13442
- switch (_d.label) {
13713
+ var close = React.useCallback(/*#__PURE__*/function () {
13714
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(id) {
13715
+ var _itemsToClose;
13716
+ var itemsToClose, _iterator, _step, _item$options$onClose, _item$options, item, confirmed, duration;
13717
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13718
+ while (1) switch (_context.prev = _context.next) {
13443
13719
  case 0:
13444
- itemsToClose = id === null ? __spreadArrays(stackRef.current) : stackRef.current.filter(function (i) {
13720
+ itemsToClose = id === null ? _toConsumableArray(stackRef.current) : stackRef.current.filter(function (i) {
13445
13721
  return i.id === id;
13446
13722
  });
13447
- _i = 0, itemsToClose_1 = itemsToClose;
13448
- _d.label = 1;
13449
- case 1:
13450
- if (!(_i < itemsToClose_1.length)) return [3 /*break*/, 5];
13451
- item = itemsToClose_1[_i];
13452
- if (!item.options.confirmBeforeClose) return [3 /*break*/, 3];
13453
- return [4 /*yield*/, item.options.confirmCallback(item.options.confirmMessage)];
13454
- case 2:
13455
- confirmed = _d.sent();
13456
- if (!confirmed) return [2 /*return*/];
13457
- _d.label = 3;
13458
- case 3:
13459
- (_b = (_a = item.options).onClose) === null || _b === void 0 ? void 0 : _b.call(_a, item.id);
13460
- _d.label = 4;
13723
+ _iterator = _createForOfIteratorHelper(itemsToClose);
13724
+ _context.prev = 2;
13725
+ _iterator.s();
13461
13726
  case 4:
13462
- _i++;
13463
- return [3 /*break*/, 1];
13464
- case 5:
13465
- duration = (_c = itemsToClose[itemsToClose.length - 1]) === null || _c === void 0 ? void 0 : _c.options.animationDuration;
13727
+ if ((_step = _iterator.n()).done) {
13728
+ _context.next = 15;
13729
+ break;
13730
+ }
13731
+ item = _step.value;
13732
+ if (!item.options.confirmBeforeClose) {
13733
+ _context.next = 12;
13734
+ break;
13735
+ }
13736
+ _context.next = 9;
13737
+ return item.options.confirmCallback(item.options.confirmMessage);
13738
+ case 9:
13739
+ confirmed = _context.sent;
13740
+ if (confirmed) {
13741
+ _context.next = 12;
13742
+ break;
13743
+ }
13744
+ return _context.abrupt("return");
13745
+ case 12:
13746
+ (_item$options$onClose = (_item$options = item.options).onClose) === null || _item$options$onClose === void 0 || _item$options$onClose.call(_item$options, item.id);
13747
+ case 13:
13748
+ _context.next = 4;
13749
+ break;
13750
+ case 15:
13751
+ _context.next = 20;
13752
+ break;
13753
+ case 17:
13754
+ _context.prev = 17;
13755
+ _context.t0 = _context["catch"](2);
13756
+ _iterator.e(_context.t0);
13757
+ case 20:
13758
+ _context.prev = 20;
13759
+ _iterator.f();
13760
+ return _context.finish(20);
13761
+ case 23:
13762
+ duration = (_itemsToClose = itemsToClose[itemsToClose.length - 1]) === null || _itemsToClose === void 0 ? void 0 : _itemsToClose.options.animationDuration;
13466
13763
  dispatch({
13467
13764
  type: 'CLOSE',
13468
13765
  id: id
@@ -13482,11 +13779,16 @@
13482
13779
  });
13483
13780
  }
13484
13781
  }, duration);
13485
- return [2 /*return*/];
13782
+ case 26:
13783
+ case "end":
13784
+ return _context.stop();
13486
13785
  }
13487
- });
13488
- });
13489
- }, []);
13786
+ }, _callee, null, [[2, 17, 20, 23]]);
13787
+ }));
13788
+ return function (_x) {
13789
+ return _ref2.apply(this, arguments);
13790
+ };
13791
+ }(), []);
13490
13792
  var update = React.useCallback(function (id, options) {
13491
13793
  dispatch({
13492
13794
  type: 'UPDATE',
@@ -13494,15 +13796,15 @@
13494
13796
  options: options
13495
13797
  });
13496
13798
  }, []);
13497
- var config = __assign$1(__assign$1({}, DEFAULT_OPTIONS), configuration);
13498
- return React__default.createElement(SideSheetContext.Provider, {
13799
+ var config = _objectSpread2(_objectSpread2({}, DEFAULT_OPTIONS), configuration);
13800
+ return /*#__PURE__*/React__default.createElement(SideSheetContext.Provider, {
13499
13801
  value: {
13500
13802
  open: open,
13501
13803
  close: close,
13502
13804
  update: update,
13503
13805
  config: config
13504
13806
  }
13505
- }, children, reactDom_1(React__default.createElement(SideSheetContainer, {
13807
+ }, children, /*#__PURE__*/reactDom_1(/*#__PURE__*/React__default.createElement(SideSheetContainer, {
13506
13808
  stack: stack,
13507
13809
  close: close,
13508
13810
  open: open,
@@ -13511,7 +13813,7 @@
13511
13813
  }), document.body));
13512
13814
  };
13513
13815
 
13514
- var useSideSheet = function () {
13816
+ var useSideSheet = function useSideSheet() {
13515
13817
  var context = React.useContext(SideSheetContext);
13516
13818
  if (!context) {
13517
13819
  throw new Error('useSideSheet must be used within SideSheetProvider');