react 17.0.2 → 18.0.0-alpha-6bbe7c344

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.
@@ -1,4 +1,4 @@
1
- /** @license React v17.0.2
1
+ /** @license React vundefined
2
2
  * react.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,18 +6,19 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- 'use strict';var l=require("object-assign"),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;
10
- if("function"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w("react.element");p=w("react.portal");exports.Fragment=w("react.fragment");exports.StrictMode=w("react.strict_mode");exports.Profiler=w("react.profiler");q=w("react.provider");r=w("react.context");t=w("react.forward_ref");exports.Suspense=w("react.suspense");u=w("react.memo");v=w("react.lazy")}var x="function"===typeof Symbol&&Symbol.iterator;
9
+ 'use strict';var l=require("object-assign"),m=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;exports.SuspenseList=60120;var u=60115,v=60116;
10
+ if("function"===typeof Symbol&&Symbol.for){var w=Symbol.for;m=w("react.element");p=w("react.portal");exports.Fragment=w("react.fragment");exports.StrictMode=w("react.strict_mode");exports.Profiler=w("react.profiler");q=w("react.provider");r=w("react.context");t=w("react.forward_ref");exports.Suspense=w("react.suspense");exports.SuspenseList=w("react.suspense_list");u=w("react.memo");v=w("react.lazy")}var x="function"===typeof Symbol&&Symbol.iterator;
11
11
  function y(a){if(null===a||"object"!==typeof a)return null;a=x&&a[x]||a["@@iterator"];return"function"===typeof a?a:null}function z(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
12
12
  var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B={};function C(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}C.prototype.isReactComponent={};C.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(z(85));this.updater.enqueueSetState(this,a,b,"setState")};C.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
13
- function D(){}D.prototype=C.prototype;function E(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}var F=E.prototype=new D;F.constructor=E;l(F,C.prototype);F.isPureReactComponent=!0;var G={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0};
14
- function J(a,b,c){var e,d={},k=null,h=null;if(null!=b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)H.call(b,e)&&!I.hasOwnProperty(e)&&(d[e]=b[e]);var g=arguments.length-2;if(1===g)d.children=c;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];d.children=f}if(a&&a.defaultProps)for(e in g=a.defaultProps,g)void 0===d[e]&&(d[e]=g[e]);return{$$typeof:n,type:a,key:k,ref:h,props:d,_owner:G.current}}
15
- function K(a,b){return{$$typeof:n,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function L(a){return"object"===typeof a&&null!==a&&a.$$typeof===n}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var M=/\/+/g;function N(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
16
- function O(a,b,c,e,d){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case n:case p:h=!0}}if(h)return h=a,d=d(h),a=""===e?"."+N(h,0):e,Array.isArray(d)?(c="",null!=a&&(c=a.replace(M,"$&/")+"/"),O(d,b,c,"",function(a){return a})):null!=d&&(L(d)&&(d=K(d,c+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(M,"$&/")+"/")+a)),b.push(d)),1;h=0;e=""===e?".":e+":";if(Array.isArray(a))for(var g=
17
- 0;g<a.length;g++){k=a[g];var f=e+N(k,g);h+=O(k,b,c,f,d)}else if(f=y(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=e+N(k,g++),h+=O(k,b,c,f,d);else if("object"===k)throw b=""+a,Error(z(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b));return h}function P(a,b,c){if(null==a)return a;var e=[],d=0;O(a,e,"","",function(a){return b.call(c,a,d++)});return e}
18
- function Q(a){if(-1===a._status){var b=a._result;b=b();a._status=0;a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}if(1===a._status)return a._result;throw a._result;}var R={current:null};function S(){var a=R.current;if(null===a)throw Error(z(321));return a}var T={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:G,IsSomeRendererActing:{current:!1},assign:l};
19
- exports.Children={map:P,forEach:function(a,b,c){P(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;P(a,function(){b++});return b},toArray:function(a){return P(a,function(a){return a})||[]},only:function(a){if(!L(a))throw Error(z(143));return a}};exports.Component=C;exports.PureComponent=E;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T;
20
- exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(z(267,a));var e=l({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=G.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)H.call(b,f)&&!I.hasOwnProperty(f)&&(e[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){g=Array(f);for(var m=0;m<f;m++)g[m]=arguments[m+2];e.children=g}return{$$typeof:n,type:a.type,
21
- key:d,ref:k,props:e,_owner:h}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:r,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:q,_context:a};return a.Consumer=a};exports.createElement=J;exports.createFactory=function(a){var b=J.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:t,render:a}};exports.isValidElement=L;
22
- exports.lazy=function(a){return{$$typeof:v,_payload:{_status:-1,_result:a},_init:Q}};exports.memo=function(a,b){return{$$typeof:u,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return S().useCallback(a,b)};exports.useContext=function(a,b){return S().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return S().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return S().useImperativeHandle(a,b,c)};
23
- exports.useLayoutEffect=function(a,b){return S().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return S().useMemo(a,b)};exports.useReducer=function(a,b,c){return S().useReducer(a,b,c)};exports.useRef=function(a){return S().useRef(a)};exports.useState=function(a){return S().useState(a)};exports.version="17.0.2";
13
+ function D(){}D.prototype=C.prototype;function E(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}var F=E.prototype=new D;F.constructor=E;l(F,C.prototype);F.isPureReactComponent=!0;var G=Array.isArray,H=Object.prototype.hasOwnProperty,I={current:null},J={key:!0,ref:!0,__self:!0,__source:!0};
14
+ function K(a,b,c){var e,d={},k=null,h=null;if(null!=b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)H.call(b,e)&&!J.hasOwnProperty(e)&&(d[e]=b[e]);var g=arguments.length-2;if(1===g)d.children=c;else if(1<g){for(var f=Array(g),n=0;n<g;n++)f[n]=arguments[n+2];d.children=f}if(a&&a.defaultProps)for(e in g=a.defaultProps,g)void 0===d[e]&&(d[e]=g[e]);return{$$typeof:m,type:a,key:k,ref:h,props:d,_owner:I.current}}
15
+ function L(a,b){return{$$typeof:m,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function M(a){return"object"===typeof a&&null!==a&&a.$$typeof===m}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var N=/\/+/g;function O(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
16
+ function P(a,b,c,e,d){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case m:case p:h=!0}}if(h)return h=a,d=d(h),a=""===e?"."+O(h,0):e,G(d)?(c="",null!=a&&(c=a.replace(N,"$&/")+"/"),P(d,b,c,"",function(a){return a})):null!=d&&(M(d)&&(d=L(d,c+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(N,"$&/")+"/")+a)),b.push(d)),1;h=0;e=""===e?".":e+":";if(G(a))for(var g=0;g<a.length;g++){k=
17
+ a[g];var f=e+O(k,g);h+=P(k,b,c,f,d)}else if(f=y(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=e+O(k,g++),h+=P(k,b,c,f,d);else if("object"===k)throw b=""+a,Error(z(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b));return h}function Q(a,b,c){if(null==a)return a;var e=[],d=0;P(a,e,"","",function(a){return b.call(c,a,d++)});return e}
18
+ function R(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}var S={current:null},T={transition:0},U={ReactCurrentDispatcher:S,ReactCurrentBatchConfig:T,ReactCurrentOwner:I,IsSomeRendererActing:{current:!1},assign:l};
19
+ exports.Children={map:Q,forEach:function(a,b,c){Q(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;Q(a,function(){b++});return b},toArray:function(a){return Q(a,function(a){return a})||[]},only:function(a){if(!M(a))throw Error(z(143));return a}};exports.Component=C;exports.PureComponent=E;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U;
20
+ exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(z(267,a));var e=l({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=I.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)H.call(b,f)&&!J.hasOwnProperty(f)&&(e[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){g=Array(f);for(var n=0;n<f;n++)g[n]=arguments[n+2];e.children=g}return{$$typeof:m,type:a.type,
21
+ key:d,ref:k,props:e,_owner:h}};exports.createContext=function(a){a={$$typeof:r,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:q,_context:a};return a.Consumer=a};exports.createElement=K;exports.createFactory=function(a){var b=K.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:t,render:a}};exports.isValidElement=M;
22
+ exports.lazy=function(a){return{$$typeof:v,_payload:{_status:-1,_result:a},_init:R}};exports.memo=function(a,b){return{$$typeof:u,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=T.transition;T.transition=1;try{a()}finally{T.transition=b}};exports.unstable_createMutableSource=function(a,b){return{_getVersion:b,_source:a,_workInProgressVersionPrimary:null,_workInProgressVersionSecondary:null}};
23
+ exports.unstable_useMutableSource=function(a,b,c){return S.current.useMutableSource(a,b,c)};exports.unstable_useOpaqueIdentifier=function(){return S.current.useOpaqueIdentifier()};exports.useCallback=function(a,b){return S.current.useCallback(a,b)};exports.useContext=function(a){return S.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return S.current.useDeferredValue(a)};exports.useEffect=function(a,b){return S.current.useEffect(a,b)};
24
+ exports.useImperativeHandle=function(a,b,c){return S.current.useImperativeHandle(a,b,c)};exports.useLayoutEffect=function(a,b){return S.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return S.current.useMemo(a,b)};exports.useReducer=function(a,b,c){return S.current.useReducer(a,b,c)};exports.useRef=function(a){return S.current.useRef(a)};exports.useState=function(a){return S.current.useState(a)};exports.useTransition=function(){return S.current.useTransition()};exports.version="18.0.0-6bbe7c344";
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "react"
6
6
  ],
7
- "version": "17.0.2",
7
+ "version": "18.0.0-alpha-6bbe7c344",
8
8
  "homepage": "https://reactjs.org/",
9
9
  "bugs": "https://github.com/facebook/react/issues",
10
10
  "license": "MIT",
@@ -16,9 +16,24 @@
16
16
  "cjs/",
17
17
  "umd/",
18
18
  "jsx-runtime.js",
19
- "jsx-dev-runtime.js"
19
+ "jsx-dev-runtime.js",
20
+ "unstable-shared-subset.js"
20
21
  ],
21
22
  "main": "index.js",
23
+ "exports": {
24
+ ".": {
25
+ "react-server": "./unstable-shared-subset.js",
26
+ "default": "./index.js"
27
+ },
28
+ "./index": {
29
+ "react-server": "./unstable-shared-subset.js",
30
+ "default": "./index.js"
31
+ },
32
+ "./build-info.json": "./build-info.json",
33
+ "./jsx-runtime": "./jsx-runtime.js",
34
+ "./jsx-dev-runtime": "./jsx-dev-runtime.js",
35
+ "./": "./"
36
+ },
22
37
  "repository": {
23
38
  "type": "git",
24
39
  "url": "https://github.com/facebook/react.git",
@@ -36,4 +51,4 @@
36
51
  "loose-envify"
37
52
  ]
38
53
  }
39
- }
54
+ }
@@ -1,4 +1,4 @@
1
- /** @license React v17.0.2
1
+ /** @license React vundefined
2
2
  * react.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -12,8 +12,7 @@
12
12
  (global = global || self, factory(global.React = {}));
13
13
  }(this, (function (exports) { 'use strict';
14
14
 
15
- // TODO: this is special because it gets imported during build.
16
- var ReactVersion = '17.0.2';
15
+ var ReactVersion = '18.0.0-6bbe7c344';
17
16
 
18
17
  // ATTENTION
19
18
  // When adding new symbols to this file,
@@ -29,17 +28,15 @@
29
28
  var REACT_CONTEXT_TYPE = 0xeace;
30
29
  var REACT_FORWARD_REF_TYPE = 0xead0;
31
30
  exports.Suspense = 0xead1;
32
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
31
+ exports.SuspenseList = 0xead8;
33
32
  var REACT_MEMO_TYPE = 0xead3;
34
33
  var REACT_LAZY_TYPE = 0xead4;
35
- var REACT_BLOCK_TYPE = 0xead9;
36
- var REACT_SERVER_BLOCK_TYPE = 0xeada;
37
- var REACT_FUNDAMENTAL_TYPE = 0xead5;
38
34
  var REACT_SCOPE_TYPE = 0xead7;
39
35
  var REACT_OPAQUE_ID_TYPE = 0xeae0;
40
36
  var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
41
37
  var REACT_OFFSCREEN_TYPE = 0xeae2;
42
38
  var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
39
+ var REACT_CACHE_TYPE = 0xeae4;
43
40
 
44
41
  if (typeof Symbol === 'function' && Symbol.for) {
45
42
  var symbolFor = Symbol.for;
@@ -52,17 +49,15 @@
52
49
  REACT_CONTEXT_TYPE = symbolFor('react.context');
53
50
  REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
54
51
  exports.Suspense = symbolFor('react.suspense');
55
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
52
+ exports.SuspenseList = symbolFor('react.suspense_list');
56
53
  REACT_MEMO_TYPE = symbolFor('react.memo');
57
54
  REACT_LAZY_TYPE = symbolFor('react.lazy');
58
- REACT_BLOCK_TYPE = symbolFor('react.block');
59
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
60
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
61
55
  REACT_SCOPE_TYPE = symbolFor('react.scope');
62
56
  REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
63
57
  REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
64
58
  REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
65
59
  REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
60
+ REACT_CACHE_TYPE = symbolFor('react.cache');
66
61
  }
67
62
 
68
63
  var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
@@ -473,16 +468,30 @@
473
468
  return refObject;
474
469
  }
475
470
 
471
+ var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
472
+
473
+ function isArray(a) {
474
+ return isArrayImpl(a);
475
+ }
476
+
476
477
  function getWrappedName(outerType, innerType, wrapperName) {
478
+ var displayName = outerType.displayName;
479
+
480
+ if (displayName) {
481
+ return displayName;
482
+ }
483
+
477
484
  var functionName = innerType.displayName || innerType.name || '';
478
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
479
- }
485
+ return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
486
+ } // Keep in sync with react-reconciler/getComponentNameFromFiber
487
+
480
488
 
481
489
  function getContextName(type) {
482
490
  return type.displayName || 'Context';
483
- }
491
+ } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
484
492
 
485
- function getComponentName(type) {
493
+
494
+ function getComponentNameFromType(type) {
486
495
  if (type == null) {
487
496
  // Host root, text node or just invalid type.
488
497
  return null;
@@ -490,7 +499,7 @@
490
499
 
491
500
  {
492
501
  if (typeof type.tag === 'number') {
493
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
502
+ error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
494
503
  }
495
504
  }
496
505
 
@@ -518,8 +527,11 @@
518
527
  case exports.Suspense:
519
528
  return 'Suspense';
520
529
 
521
- case REACT_SUSPENSE_LIST_TYPE:
530
+ case exports.SuspenseList:
522
531
  return 'SuspenseList';
532
+
533
+ case REACT_CACHE_TYPE:
534
+ return 'Cache';
523
535
  }
524
536
 
525
537
  if (typeof type === 'object') {
@@ -536,10 +548,13 @@
536
548
  return getWrappedName(type, type.render, 'ForwardRef');
537
549
 
538
550
  case REACT_MEMO_TYPE:
539
- return getComponentName(type.type);
551
+ var outerName = type.displayName || null;
540
552
 
541
- case REACT_BLOCK_TYPE:
542
- return getComponentName(type._render);
553
+ if (outerName !== null) {
554
+ return outerName;
555
+ }
556
+
557
+ return getComponentNameFromType(type.type) || 'Memo';
543
558
 
544
559
  case REACT_LAZY_TYPE:
545
560
  {
@@ -548,7 +563,7 @@
548
563
  var init = lazyComponent._init;
549
564
 
550
565
  try {
551
- return getComponentName(init(payload));
566
+ return getComponentNameFromType(init(payload));
552
567
  } catch (x) {
553
568
  return null;
554
569
  }
@@ -560,6 +575,7 @@
560
575
  }
561
576
 
562
577
  var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
578
+
563
579
  var RESERVED_PROPS = {
564
580
  key: true,
565
581
  ref: true,
@@ -639,7 +655,7 @@
639
655
  function warnIfStringRefCannotBeAutoConverted(config) {
640
656
  {
641
657
  if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
642
- var componentName = getComponentName(ReactCurrentOwner.current.type);
658
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
643
659
 
644
660
  if (!didWarnAboutStringRefs[componentName]) {
645
661
  error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
@@ -991,7 +1007,7 @@
991
1007
 
992
1008
  var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
993
1009
 
994
- if (Array.isArray(mappedChild)) {
1010
+ if (isArray(mappedChild)) {
995
1011
  var escapedChildKey = '';
996
1012
 
997
1013
  if (childKey != null) {
@@ -1022,7 +1038,7 @@
1022
1038
 
1023
1039
  var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
1024
1040
 
1025
- if (Array.isArray(children)) {
1041
+ if (isArray(children)) {
1026
1042
  for (var i = 0; i < children.length; i++) {
1027
1043
  child = children[i];
1028
1044
  nextName = nextNamePrefix + getElementKey(child, i);
@@ -1168,20 +1184,11 @@
1168
1184
  return children;
1169
1185
  }
1170
1186
 
1171
- function createContext(defaultValue, calculateChangedBits) {
1172
- if (calculateChangedBits === undefined) {
1173
- calculateChangedBits = null;
1174
- } else {
1175
- {
1176
- if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
1177
- error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
1178
- }
1179
- }
1180
- }
1181
-
1187
+ function createContext(defaultValue) {
1188
+ // TODO: Second argument used to be an optional `calculateChangedBits`
1189
+ // function. Warn to reserve for future use?
1182
1190
  var context = {
1183
1191
  $$typeof: REACT_CONTEXT_TYPE,
1184
- _calculateChangedBits: calculateChangedBits,
1185
1192
  // As a workaround to support multiple concurrent renderers, we categorize
1186
1193
  // some renderers as primary and others as secondary. We only expect
1187
1194
  // there to be two concurrent renderers at most: React Native (primary) and
@@ -1210,8 +1217,7 @@
1210
1217
  // warn for the incorrect usage of Context as a Consumer.
1211
1218
  var Consumer = {
1212
1219
  $$typeof: REACT_CONTEXT_TYPE,
1213
- _context: context,
1214
- _calculateChangedBits: context._calculateChangedBits
1220
+ _context: context
1215
1221
  }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
1216
1222
 
1217
1223
  Object.defineProperties(Consumer, {
@@ -1298,38 +1304,54 @@
1298
1304
  if (payload._status === Uninitialized) {
1299
1305
  var ctor = payload._result;
1300
1306
  var thenable = ctor(); // Transition to the next state.
1307
+ // This might throw either because it's missing or throws. If so, we treat it
1308
+ // as still uninitialized and try again next time. Which is the same as what
1309
+ // happens if the ctor or any wrappers processing the ctor throws. This might
1310
+ // end up fixing it if the resolution was a concurrency bug.
1301
1311
 
1302
- var pending = payload;
1303
- pending._status = Pending;
1304
- pending._result = thenable;
1305
1312
  thenable.then(function (moduleObject) {
1306
- if (payload._status === Pending) {
1307
- var defaultExport = moduleObject.default;
1308
-
1309
- {
1310
- if (defaultExport === undefined) {
1311
- error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
1312
- 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
1313
- }
1314
- } // Transition to the next state.
1315
-
1316
-
1313
+ if (payload._status === Pending || payload._status === Uninitialized) {
1314
+ // Transition to the next state.
1317
1315
  var resolved = payload;
1318
1316
  resolved._status = Resolved;
1319
- resolved._result = defaultExport;
1317
+ resolved._result = moduleObject;
1320
1318
  }
1321
1319
  }, function (error) {
1322
- if (payload._status === Pending) {
1320
+ if (payload._status === Pending || payload._status === Uninitialized) {
1323
1321
  // Transition to the next state.
1324
1322
  var rejected = payload;
1325
1323
  rejected._status = Rejected;
1326
1324
  rejected._result = error;
1327
1325
  }
1328
1326
  });
1327
+
1328
+ if (payload._status === Uninitialized) {
1329
+ // In case, we're still uninitialized, then we're waiting for the thenable
1330
+ // to resolve. Set it as pending in the meantime.
1331
+ var pending = payload;
1332
+ pending._status = Pending;
1333
+ pending._result = thenable;
1334
+ }
1329
1335
  }
1330
1336
 
1331
1337
  if (payload._status === Resolved) {
1332
- return payload._result;
1338
+ var moduleObject = payload._result;
1339
+
1340
+ {
1341
+ if (moduleObject === undefined) {
1342
+ error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
1343
+ 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject);
1344
+ }
1345
+ }
1346
+
1347
+ {
1348
+ if (!('default' in moduleObject)) {
1349
+ error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
1350
+ 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
1351
+ }
1352
+ }
1353
+
1354
+ return moduleObject.default;
1333
1355
  } else {
1334
1356
  throw payload._result;
1335
1357
  }
@@ -1424,9 +1446,15 @@
1424
1446
  return ownName;
1425
1447
  },
1426
1448
  set: function (name) {
1427
- ownName = name;
1428
-
1429
- if (render.displayName == null) {
1449
+ ownName = name; // The inner component shouldn't inherit this display name in most cases,
1450
+ // because the component may be used elsewhere.
1451
+ // But it's nice for anonymous functions to inherit the name,
1452
+ // so that our component-stack generation logic will display their frames.
1453
+ // An anonymous function generally suggests a pattern like:
1454
+ // React.forwardRef((props, ref) => {...});
1455
+ // This kind of inner function is not used elsewhere so the side effect is okay.
1456
+
1457
+ if (!render.name && !render.displayName) {
1430
1458
  render.displayName = name;
1431
1459
  }
1432
1460
  }
@@ -1437,21 +1465,32 @@
1437
1465
  }
1438
1466
 
1439
1467
  // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
1468
+ var enableCache = false; // Only used in www builds.
1440
1469
 
1441
1470
  var enableScopeAPI = false; // Experimental Create Event Handle API.
1442
1471
 
1472
+ var REACT_MODULE_REFERENCE = 0;
1473
+
1474
+ if (typeof Symbol === 'function') {
1475
+ REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
1476
+ }
1477
+
1443
1478
  function isValidElementType(type) {
1444
1479
  if (typeof type === 'string' || typeof type === 'function') {
1445
1480
  return true;
1446
1481
  } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
1447
1482
 
1448
1483
 
1449
- if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
1484
+ if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === exports.SuspenseList || type === REACT_LEGACY_HIDDEN_TYPE || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCache ) {
1450
1485
  return true;
1451
1486
  }
1452
1487
 
1453
1488
  if (typeof type === 'object' && type !== null) {
1454
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
1489
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
1490
+ // types supported by any Flight configuration anywhere since
1491
+ // we don't know which Flight build this will end up being used
1492
+ // with.
1493
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
1455
1494
  return true;
1456
1495
  }
1457
1496
  }
@@ -1481,9 +1520,15 @@
1481
1520
  return ownName;
1482
1521
  },
1483
1522
  set: function (name) {
1484
- ownName = name;
1485
-
1486
- if (type.displayName == null) {
1523
+ ownName = name; // The inner component shouldn't inherit this display name in most cases,
1524
+ // because the component may be used elsewhere.
1525
+ // But it's nice for anonymous functions to inherit the name,
1526
+ // so that our component-stack generation logic will display their frames.
1527
+ // An anonymous function generally suggests a pattern like:
1528
+ // React.memo((props) => {...});
1529
+ // This kind of inner function is not used elsewhere so the side effect is okay.
1530
+
1531
+ if (!type.name && !type.displayName) {
1487
1532
  type.displayName = name;
1488
1533
  }
1489
1534
  }
@@ -1496,24 +1541,22 @@
1496
1541
  function resolveDispatcher() {
1497
1542
  var dispatcher = ReactCurrentDispatcher.current;
1498
1543
 
1499
- if (!(dispatcher !== null)) {
1500
- {
1501
- throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
1544
+ {
1545
+ if (dispatcher === null) {
1546
+ error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
1502
1547
  }
1503
- }
1548
+ } // Will result in a null access error if accessed outside render phase. We
1549
+ // intentionally don't throw our own error because this is in a hot path.
1550
+ // Also helps ensure this is inlined.
1551
+
1504
1552
 
1505
1553
  return dispatcher;
1506
1554
  }
1507
-
1508
- function useContext(Context, unstable_observedBits) {
1555
+ function useContext(Context) {
1509
1556
  var dispatcher = resolveDispatcher();
1510
1557
 
1511
1558
  {
1512
- if (unstable_observedBits !== undefined) {
1513
- error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://reactjs.org/link/rules-of-hooks' : '');
1514
- } // TODO: add a more generic warning for invalid values.
1515
-
1516
-
1559
+ // TODO: add a more generic warning for invalid values.
1517
1560
  if (Context._context !== undefined) {
1518
1561
  var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
1519
1562
  // and nobody should be using this in existing code.
@@ -1526,7 +1569,7 @@
1526
1569
  }
1527
1570
  }
1528
1571
 
1529
- return dispatcher.useContext(Context, unstable_observedBits);
1572
+ return dispatcher.useContext(Context);
1530
1573
  }
1531
1574
  function useState(initialState) {
1532
1575
  var dispatcher = resolveDispatcher();
@@ -1566,6 +1609,22 @@
1566
1609
  return dispatcher.useDebugValue(value, formatterFn);
1567
1610
  }
1568
1611
  }
1612
+ function useTransition() {
1613
+ var dispatcher = resolveDispatcher();
1614
+ return dispatcher.useTransition();
1615
+ }
1616
+ function useDeferredValue(value) {
1617
+ var dispatcher = resolveDispatcher();
1618
+ return dispatcher.useDeferredValue(value);
1619
+ }
1620
+ function useOpaqueIdentifier() {
1621
+ var dispatcher = resolveDispatcher();
1622
+ return dispatcher.useOpaqueIdentifier();
1623
+ }
1624
+ function useMutableSource(source, getSnapshot, subscribe) {
1625
+ var dispatcher = resolveDispatcher();
1626
+ return dispatcher.useMutableSource(source, getSnapshot, subscribe);
1627
+ }
1569
1628
 
1570
1629
  // Helpers to patch console.logs to avoid logging during side-effect free
1571
1630
  // replaying on render function. This currently only patches the object
@@ -1689,7 +1748,7 @@
1689
1748
 
1690
1749
  function describeNativeComponentFrame(fn, construct) {
1691
1750
  // If something asked for a stack inside a fake render, it should get ignored.
1692
- if (!fn || reentry) {
1751
+ if ( !fn || reentry) {
1693
1752
  return '';
1694
1753
  }
1695
1754
 
@@ -1870,7 +1929,7 @@
1870
1929
  case exports.Suspense:
1871
1930
  return describeBuiltInComponentFrame('Suspense');
1872
1931
 
1873
- case REACT_SUSPENSE_LIST_TYPE:
1932
+ case exports.SuspenseList:
1874
1933
  return describeBuiltInComponentFrame('SuspenseList');
1875
1934
  }
1876
1935
 
@@ -1883,9 +1942,6 @@
1883
1942
  // Memo may contain any component type so we recursively resolve it.
1884
1943
  return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
1885
1944
 
1886
- case REACT_BLOCK_TYPE:
1887
- return describeFunctionComponentFrame(type._render);
1888
-
1889
1945
  case REACT_LAZY_TYPE:
1890
1946
  {
1891
1947
  var lazyComponent = type;
@@ -1921,7 +1977,7 @@
1921
1977
  function checkPropTypes(typeSpecs, values, location, componentName, element) {
1922
1978
  {
1923
1979
  // $FlowFixMe This is okay but Flow doesn't know it.
1924
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
1980
+ var has = Function.call.bind(hasOwnProperty$1);
1925
1981
 
1926
1982
  for (var typeSpecName in typeSpecs) {
1927
1983
  if (has(typeSpecs, typeSpecName)) {
@@ -1986,7 +2042,7 @@
1986
2042
 
1987
2043
  function getDeclarationErrorAddendum() {
1988
2044
  if (ReactCurrentOwner.current) {
1989
- var name = getComponentName(ReactCurrentOwner.current.type);
2045
+ var name = getComponentNameFromType(ReactCurrentOwner.current.type);
1990
2046
 
1991
2047
  if (name) {
1992
2048
  return '\n\nCheck the render method of `' + name + '`.';
@@ -2068,7 +2124,7 @@
2068
2124
 
2069
2125
  if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
2070
2126
  // Give the component that originally created this child.
2071
- childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
2127
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
2072
2128
  }
2073
2129
 
2074
2130
  {
@@ -2095,7 +2151,7 @@
2095
2151
  return;
2096
2152
  }
2097
2153
 
2098
- if (Array.isArray(node)) {
2154
+ if (isArray(node)) {
2099
2155
  for (var i = 0; i < node.length; i++) {
2100
2156
  var child = node[i];
2101
2157
 
@@ -2157,12 +2213,12 @@
2157
2213
 
2158
2214
  if (propTypes) {
2159
2215
  // Intentionally inside to avoid triggering lazy initializers:
2160
- var name = getComponentName(type);
2216
+ var name = getComponentNameFromType(type);
2161
2217
  checkPropTypes(propTypes, element.props, 'prop', name, element);
2162
2218
  } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
2163
2219
  propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
2164
2220
 
2165
- var _name = getComponentName(type);
2221
+ var _name = getComponentNameFromType(type);
2166
2222
 
2167
2223
  error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
2168
2224
  }
@@ -2227,10 +2283,10 @@
2227
2283
 
2228
2284
  if (type === null) {
2229
2285
  typeString = 'null';
2230
- } else if (Array.isArray(type)) {
2286
+ } else if (isArray(type)) {
2231
2287
  typeString = 'array';
2232
2288
  } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
2233
- typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
2289
+ typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
2234
2290
  info = ' Did you accidentally export a JSX literal instead of a component?';
2235
2291
  } else {
2236
2292
  typeString = typeof type;
@@ -2306,231 +2362,61 @@
2306
2362
  return newElement;
2307
2363
  }
2308
2364
 
2309
- var enableSchedulerDebugging = false;
2310
- var enableProfiling = false;
2311
-
2312
- var requestHostCallback;
2313
- var requestHostTimeout;
2314
- var cancelHostTimeout;
2315
- var shouldYieldToHost;
2316
- var requestPaint;
2317
- var getCurrentTime;
2318
- var forceFrameRate;
2319
- var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
2320
-
2321
- if (hasPerformanceNow) {
2322
- var localPerformance = performance;
2323
-
2324
- getCurrentTime = function () {
2325
- return localPerformance.now();
2365
+ function createMutableSource(source, getVersion) {
2366
+ var mutableSource = {
2367
+ _getVersion: getVersion,
2368
+ _source: source,
2369
+ _workInProgressVersionPrimary: null,
2370
+ _workInProgressVersionSecondary: null
2326
2371
  };
2327
- } else {
2328
- var localDate = Date;
2329
- var initialTime = localDate.now();
2330
-
2331
- getCurrentTime = function () {
2332
- return localDate.now() - initialTime;
2333
- };
2334
- }
2335
-
2336
- if ( // If Scheduler runs in a non-DOM environment, it falls back to a naive
2337
- // implementation using setTimeout.
2338
- typeof window === 'undefined' || // Check if MessageChannel is supported, too.
2339
- typeof MessageChannel !== 'function') {
2340
- // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,
2341
- // fallback to a naive implementation.
2342
- var _callback = null;
2343
- var _timeoutID = null;
2344
-
2345
- var _flushCallback = function () {
2346
- if (_callback !== null) {
2347
- try {
2348
- var currentTime = getCurrentTime();
2349
- var hasRemainingTime = true;
2350
-
2351
- _callback(hasRemainingTime, currentTime);
2352
-
2353
- _callback = null;
2354
- } catch (e) {
2355
- setTimeout(_flushCallback, 0);
2356
- throw e;
2357
- }
2358
- }
2359
- };
2360
-
2361
- requestHostCallback = function (cb) {
2362
- if (_callback !== null) {
2363
- // Protect against re-entrancy.
2364
- setTimeout(requestHostCallback, 0, cb);
2365
- } else {
2366
- _callback = cb;
2367
- setTimeout(_flushCallback, 0);
2368
- }
2369
- };
2370
-
2371
- requestHostTimeout = function (cb, ms) {
2372
- _timeoutID = setTimeout(cb, ms);
2373
- };
2374
-
2375
- cancelHostTimeout = function () {
2376
- clearTimeout(_timeoutID);
2377
- };
2378
-
2379
- shouldYieldToHost = function () {
2380
- return false;
2381
- };
2382
-
2383
- requestPaint = forceFrameRate = function () {};
2384
- } else {
2385
- // Capture local references to native APIs, in case a polyfill overrides them.
2386
- var _setTimeout = window.setTimeout;
2387
- var _clearTimeout = window.clearTimeout;
2388
-
2389
- if (typeof console !== 'undefined') {
2390
- // TODO: Scheduler no longer requires these methods to be polyfilled. But
2391
- // maybe we want to continue warning if they don't exist, to preserve the
2392
- // option to rely on it in the future?
2393
- var requestAnimationFrame = window.requestAnimationFrame;
2394
- var cancelAnimationFrame = window.cancelAnimationFrame;
2395
-
2396
- if (typeof requestAnimationFrame !== 'function') {
2397
- // Using console['error'] to evade Babel and ESLint
2398
- console['error']("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
2399
- }
2400
-
2401
- if (typeof cancelAnimationFrame !== 'function') {
2402
- // Using console['error'] to evade Babel and ESLint
2403
- console['error']("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
2404
- }
2405
- }
2406
-
2407
- var isMessageLoopRunning = false;
2408
- var scheduledHostCallback = null;
2409
- var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
2410
- // thread, like user events. By default, it yields multiple times per frame.
2411
- // It does not attempt to align with frame boundaries, since most tasks don't
2412
- // need to be frame aligned; for those that do, use requestAnimationFrame.
2413
-
2414
- var yieldInterval = 5;
2415
- var deadline = 0; // TODO: Make this configurable
2416
2372
 
2417
2373
  {
2418
- // `isInputPending` is not available. Since we have no way of knowing if
2419
- // there's pending input, always yield at the end of the frame.
2420
- shouldYieldToHost = function () {
2421
- return getCurrentTime() >= deadline;
2422
- }; // Since we yield every frame regardless, `requestPaint` has no effect.
2374
+ mutableSource._currentPrimaryRenderer = null;
2375
+ mutableSource._currentSecondaryRenderer = null; // Used to detect side effects that update a mutable source during render.
2376
+ // See https://github.com/facebook/react/issues/19948
2423
2377
 
2424
-
2425
- requestPaint = function () {};
2378
+ mutableSource._currentlyRenderingFiber = null;
2379
+ mutableSource._initialVersionAsOfFirstRender = null;
2426
2380
  }
2427
2381
 
2428
- forceFrameRate = function (fps) {
2429
- if (fps < 0 || fps > 125) {
2430
- // Using console['error'] to evade Babel and ESLint
2431
- console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');
2432
- return;
2433
- }
2434
-
2435
- if (fps > 0) {
2436
- yieldInterval = Math.floor(1000 / fps);
2437
- } else {
2438
- // reset the framerate
2439
- yieldInterval = 5;
2440
- }
2441
- };
2442
-
2443
- var performWorkUntilDeadline = function () {
2444
- if (scheduledHostCallback !== null) {
2445
- var currentTime = getCurrentTime(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync
2446
- // cycle. This means there's always time remaining at the beginning of
2447
- // the message event.
2448
-
2449
- deadline = currentTime + yieldInterval;
2450
- var hasTimeRemaining = true;
2451
-
2452
- try {
2453
- var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
2454
-
2455
- if (!hasMoreWork) {
2456
- isMessageLoopRunning = false;
2457
- scheduledHostCallback = null;
2458
- } else {
2459
- // If there's more work, schedule the next message event at the end
2460
- // of the preceding one.
2461
- port.postMessage(null);
2462
- }
2463
- } catch (error) {
2464
- // If a scheduler task throws, exit the current browser task so the
2465
- // error can be observed.
2466
- port.postMessage(null);
2467
- throw error;
2468
- }
2469
- } else {
2470
- isMessageLoopRunning = false;
2471
- } // Yielding to the browser will give it a chance to paint, so we can
2472
- };
2473
-
2474
- var channel = new MessageChannel();
2475
- var port = channel.port2;
2476
- channel.port1.onmessage = performWorkUntilDeadline;
2477
-
2478
- requestHostCallback = function (callback) {
2479
- scheduledHostCallback = callback;
2480
-
2481
- if (!isMessageLoopRunning) {
2482
- isMessageLoopRunning = true;
2483
- port.postMessage(null);
2484
- }
2485
- };
2486
-
2487
- requestHostTimeout = function (callback, ms) {
2488
- taskTimeoutID = _setTimeout(function () {
2489
- callback(getCurrentTime());
2490
- }, ms);
2491
- };
2492
-
2493
- cancelHostTimeout = function () {
2494
- _clearTimeout(taskTimeoutID);
2495
-
2496
- taskTimeoutID = -1;
2497
- };
2382
+ return mutableSource;
2498
2383
  }
2499
2384
 
2385
+ var enableSchedulerDebugging = false;
2386
+ var enableProfiling = false;
2387
+
2500
2388
  function push(heap, node) {
2501
2389
  var index = heap.length;
2502
2390
  heap.push(node);
2503
2391
  siftUp(heap, node, index);
2504
2392
  }
2505
2393
  function peek(heap) {
2506
- var first = heap[0];
2507
- return first === undefined ? null : first;
2394
+ return heap.length === 0 ? null : heap[0];
2508
2395
  }
2509
2396
  function pop(heap) {
2510
- var first = heap[0];
2511
-
2512
- if (first !== undefined) {
2513
- var last = heap.pop();
2397
+ if (heap.length === 0) {
2398
+ return null;
2399
+ }
2514
2400
 
2515
- if (last !== first) {
2516
- heap[0] = last;
2517
- siftDown(heap, last, 0);
2518
- }
2401
+ var first = heap[0];
2402
+ var last = heap.pop();
2519
2403
 
2520
- return first;
2521
- } else {
2522
- return null;
2404
+ if (last !== first) {
2405
+ heap[0] = last;
2406
+ siftDown(heap, last, 0);
2523
2407
  }
2408
+
2409
+ return first;
2524
2410
  }
2525
2411
 
2526
2412
  function siftUp(heap, node, i) {
2527
2413
  var index = i;
2528
2414
 
2529
- while (true) {
2415
+ while (index > 0) {
2530
2416
  var parentIndex = index - 1 >>> 1;
2531
2417
  var parent = heap[parentIndex];
2532
2418
 
2533
- if (parent !== undefined && compare(parent, node) > 0) {
2419
+ if (compare(parent, node) > 0) {
2534
2420
  // The parent is larger. Swap positions.
2535
2421
  heap[parentIndex] = node;
2536
2422
  heap[index] = parent;
@@ -2545,15 +2431,16 @@
2545
2431
  function siftDown(heap, node, i) {
2546
2432
  var index = i;
2547
2433
  var length = heap.length;
2434
+ var halfLength = length >>> 1;
2548
2435
 
2549
- while (index < length) {
2436
+ while (index < halfLength) {
2550
2437
  var leftIndex = (index + 1) * 2 - 1;
2551
2438
  var left = heap[leftIndex];
2552
2439
  var rightIndex = leftIndex + 1;
2553
2440
  var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.
2554
2441
 
2555
- if (left !== undefined && compare(left, node) < 0) {
2556
- if (right !== undefined && compare(right, left) < 0) {
2442
+ if (compare(left, node) < 0) {
2443
+ if (rightIndex < length && compare(right, left) < 0) {
2557
2444
  heap[index] = right;
2558
2445
  heap[rightIndex] = node;
2559
2446
  index = rightIndex;
@@ -2562,7 +2449,7 @@
2562
2449
  heap[leftIndex] = node;
2563
2450
  index = leftIndex;
2564
2451
  }
2565
- } else if (right !== undefined && compare(right, node) < 0) {
2452
+ } else if (rightIndex < length && compare(right, node) < 0) {
2566
2453
  heap[index] = right;
2567
2454
  heap[rightIndex] = node;
2568
2455
  index = rightIndex;
@@ -2590,9 +2477,27 @@
2590
2477
  }
2591
2478
 
2592
2479
  /* eslint-disable no-var */
2480
+ var getCurrentTime;
2481
+ var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
2482
+
2483
+ if (hasPerformanceNow) {
2484
+ var localPerformance = performance;
2485
+
2486
+ getCurrentTime = function () {
2487
+ return localPerformance.now();
2488
+ };
2489
+ } else {
2490
+ var localDate = Date;
2491
+ var initialTime = localDate.now();
2492
+
2493
+ getCurrentTime = function () {
2494
+ return localDate.now() - initialTime;
2495
+ };
2496
+ } // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
2593
2497
  // Math.pow(2, 30) - 1
2594
2498
  // 0b111111111111111111111111111111
2595
2499
 
2500
+
2596
2501
  var maxSigned31BitInt = 1073741823; // Times out immediately
2597
2502
 
2598
2503
  var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
@@ -2612,7 +2517,11 @@
2612
2517
 
2613
2518
  var isPerformingWork = false;
2614
2519
  var isHostCallbackScheduled = false;
2615
- var isHostTimeoutScheduled = false;
2520
+ var isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them.
2521
+
2522
+ var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null;
2523
+ var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null;
2524
+ var localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom
2616
2525
 
2617
2526
  function advanceTimers(currentTime) {
2618
2527
  // Check for tasks that are no longer delayed and add them to the queue.
@@ -2919,370 +2828,156 @@
2919
2828
  return currentPriorityLevel;
2920
2829
  }
2921
2830
 
2922
- var unstable_requestPaint = requestPaint;
2923
- var unstable_Profiling = null;
2924
-
2831
+ var isMessageLoopRunning = false;
2832
+ var scheduledHostCallback = null;
2833
+ var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
2834
+ // thread, like user events. By default, it yields multiple times per frame.
2835
+ // It does not attempt to align with frame boundaries, since most tasks don't
2836
+ // need to be frame aligned; for those that do, use requestAnimationFrame.
2925
2837
 
2838
+ var yieldInterval = 5;
2839
+ var deadline = 0; // TODO: Make this configurable
2926
2840
 
2927
- var Scheduler = /*#__PURE__*/Object.freeze({
2928
- __proto__: null,
2929
- unstable_ImmediatePriority: ImmediatePriority,
2930
- unstable_UserBlockingPriority: UserBlockingPriority,
2931
- unstable_NormalPriority: NormalPriority,
2932
- unstable_IdlePriority: IdlePriority,
2933
- unstable_LowPriority: LowPriority,
2934
- unstable_runWithPriority: unstable_runWithPriority,
2935
- unstable_next: unstable_next,
2936
- unstable_scheduleCallback: unstable_scheduleCallback,
2937
- unstable_cancelCallback: unstable_cancelCallback,
2938
- unstable_wrapCallback: unstable_wrapCallback,
2939
- unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
2940
- get unstable_shouldYield () { return shouldYieldToHost; },
2941
- unstable_requestPaint: unstable_requestPaint,
2942
- unstable_continueExecution: unstable_continueExecution,
2943
- unstable_pauseExecution: unstable_pauseExecution,
2944
- unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
2945
- get unstable_now () { return getCurrentTime; },
2946
- get unstable_forceFrameRate () { return forceFrameRate; },
2947
- unstable_Profiling: unstable_Profiling
2948
- });
2949
-
2950
- var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.
2951
-
2952
- var interactionIDCounter = 0;
2953
- var threadIDCounter = 0; // Set of currently traced interactions.
2954
- // Interactions "stack"–
2955
- // Meaning that newly traced interactions are appended to the previously active set.
2956
- // When an interaction goes out of scope, the previous set (if any) is restored.
2957
-
2958
- var interactionsRef = null; // Listener(s) to notify when interactions begin and end.
2959
-
2960
- var subscriberRef = null;
2961
-
2962
- {
2963
- interactionsRef = {
2964
- current: new Set()
2965
- };
2966
- subscriberRef = {
2967
- current: null
2968
- };
2969
- }
2970
- function unstable_clear(callback) {
2971
-
2972
- var prevInteractions = interactionsRef.current;
2973
- interactionsRef.current = new Set();
2974
-
2975
- try {
2976
- return callback();
2977
- } finally {
2978
- interactionsRef.current = prevInteractions;
2979
- }
2980
- }
2981
- function unstable_getCurrent() {
2841
+ function shouldYieldToHost() {
2982
2842
  {
2983
- return interactionsRef.current;
2843
+ // `isInputPending` is not available. Since we have no way of knowing if
2844
+ // there's pending input, always yield at the end of the frame.
2845
+ return getCurrentTime() >= deadline;
2984
2846
  }
2985
2847
  }
2986
- function unstable_getThreadID() {
2987
- return ++threadIDCounter;
2988
- }
2989
- function unstable_trace(name, timestamp, callback) {
2990
- var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;
2991
2848
 
2992
- var interaction = {
2993
- __count: 1,
2994
- id: interactionIDCounter++,
2995
- name: name,
2996
- timestamp: timestamp
2997
- };
2998
- var prevInteractions = interactionsRef.current; // Traced interactions should stack/accumulate.
2999
- // To do that, clone the current interactions.
3000
- // The previous set will be restored upon completion.
2849
+ function requestPaint() {
3001
2850
 
3002
- var interactions = new Set(prevInteractions);
3003
- interactions.add(interaction);
3004
- interactionsRef.current = interactions;
3005
- var subscriber = subscriberRef.current;
3006
- var returnValue;
3007
-
3008
- try {
3009
- if (subscriber !== null) {
3010
- subscriber.onInteractionTraced(interaction);
3011
- }
3012
- } finally {
3013
- try {
3014
- if (subscriber !== null) {
3015
- subscriber.onWorkStarted(interactions, threadID);
3016
- }
3017
- } finally {
3018
- try {
3019
- returnValue = callback();
3020
- } finally {
3021
- interactionsRef.current = prevInteractions;
3022
-
3023
- try {
3024
- if (subscriber !== null) {
3025
- subscriber.onWorkStopped(interactions, threadID);
3026
- }
3027
- } finally {
3028
- interaction.__count--; // If no async work was scheduled for this interaction,
3029
- // Notify subscribers that it's completed.
2851
+ }
3030
2852
 
3031
- if (subscriber !== null && interaction.__count === 0) {
3032
- subscriber.onInteractionScheduledWorkCompleted(interaction);
3033
- }
3034
- }
3035
- }
3036
- }
2853
+ function forceFrameRate(fps) {
2854
+ if (fps < 0 || fps > 125) {
2855
+ // Using console['error'] to evade Babel and ESLint
2856
+ console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');
2857
+ return;
3037
2858
  }
3038
2859
 
3039
- return returnValue;
2860
+ if (fps > 0) {
2861
+ yieldInterval = Math.floor(1000 / fps);
2862
+ } else {
2863
+ // reset the framerate
2864
+ yieldInterval = 5;
2865
+ }
3040
2866
  }
3041
- function unstable_wrap(callback) {
3042
- var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;
3043
-
3044
- var wrappedInteractions = interactionsRef.current;
3045
- var subscriber = subscriberRef.current;
3046
-
3047
- if (subscriber !== null) {
3048
- subscriber.onWorkScheduled(wrappedInteractions, threadID);
3049
- } // Update the pending async work count for the current interactions.
3050
- // Update after calling subscribers in case of error.
3051
2867
 
2868
+ var performWorkUntilDeadline = function () {
2869
+ if (scheduledHostCallback !== null) {
2870
+ var currentTime = getCurrentTime(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync
2871
+ // cycle. This means there's always time remaining at the beginning of
2872
+ // the message event.
3052
2873
 
3053
- wrappedInteractions.forEach(function (interaction) {
3054
- interaction.__count++;
3055
- });
3056
- var hasRun = false;
2874
+ deadline = currentTime + yieldInterval;
2875
+ var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the
2876
+ // error can be observed.
2877
+ //
2878
+ // Intentionally not using a try-catch, since that makes some debugging
2879
+ // techniques harder. Instead, if `scheduledHostCallback` errors, then
2880
+ // `hasMoreWork` will remain true, and we'll continue the work loop.
3057
2881
 
3058
- function wrapped() {
3059
- var prevInteractions = interactionsRef.current;
3060
- interactionsRef.current = wrappedInteractions;
3061
- subscriber = subscriberRef.current;
2882
+ var hasMoreWork = true;
3062
2883
 
3063
2884
  try {
3064
- var returnValue;
3065
-
3066
- try {
3067
- if (subscriber !== null) {
3068
- subscriber.onWorkStarted(wrappedInteractions, threadID);
3069
- }
3070
- } finally {
3071
- try {
3072
- returnValue = callback.apply(undefined, arguments);
3073
- } finally {
3074
- interactionsRef.current = prevInteractions;
3075
-
3076
- if (subscriber !== null) {
3077
- subscriber.onWorkStopped(wrappedInteractions, threadID);
3078
- }
3079
- }
3080
- }
3081
-
3082
- return returnValue;
2885
+ hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
3083
2886
  } finally {
3084
- if (!hasRun) {
3085
- // We only expect a wrapped function to be executed once,
3086
- // But in the event that it's executed more than once–
3087
- // Only decrement the outstanding interaction counts once.
3088
- hasRun = true; // Update pending async counts for all wrapped interactions.
3089
- // If this was the last scheduled async work for any of them,
3090
- // Mark them as completed.
3091
-
3092
- wrappedInteractions.forEach(function (interaction) {
3093
- interaction.__count--;
3094
-
3095
- if (subscriber !== null && interaction.__count === 0) {
3096
- subscriber.onInteractionScheduledWorkCompleted(interaction);
3097
- }
3098
- });
2887
+ if (hasMoreWork) {
2888
+ // If there's more work, schedule the next message event at the end
2889
+ // of the preceding one.
2890
+ schedulePerformWorkUntilDeadline();
2891
+ } else {
2892
+ isMessageLoopRunning = false;
2893
+ scheduledHostCallback = null;
3099
2894
  }
3100
2895
  }
3101
- }
3102
-
3103
- wrapped.cancel = function cancel() {
3104
- subscriber = subscriberRef.current;
2896
+ } else {
2897
+ isMessageLoopRunning = false;
2898
+ } // Yielding to the browser will give it a chance to paint, so we can
2899
+ };
3105
2900
 
3106
- try {
3107
- if (subscriber !== null) {
3108
- subscriber.onWorkCanceled(wrappedInteractions, threadID);
3109
- }
3110
- } finally {
3111
- // Update pending async counts for all wrapped interactions.
3112
- // If this was the last scheduled async work for any of them,
3113
- // Mark them as completed.
3114
- wrappedInteractions.forEach(function (interaction) {
3115
- interaction.__count--;
3116
-
3117
- if (subscriber && interaction.__count === 0) {
3118
- subscriber.onInteractionScheduledWorkCompleted(interaction);
3119
- }
3120
- });
3121
- }
2901
+ var schedulePerformWorkUntilDeadline;
2902
+
2903
+ if (typeof localSetImmediate === 'function') {
2904
+ // Node.js and old IE.
2905
+ // There's a few reasons for why we prefer setImmediate.
2906
+ //
2907
+ // Unlike MessageChannel, it doesn't prevent a Node.js process from exiting.
2908
+ // (Even though this is a DOM fork of the Scheduler, you could get here
2909
+ // with a mix of Node.js 15+, which has a MessageChannel, and jsdom.)
2910
+ // https://github.com/facebook/react/issues/20756
2911
+ //
2912
+ // But also, it runs earlier which is the semantic we want.
2913
+ // If other browsers ever implement it, it's better to use it.
2914
+ // Although both of these would be inferior to native scheduling.
2915
+ schedulePerformWorkUntilDeadline = function () {
2916
+ localSetImmediate(performWorkUntilDeadline);
3122
2917
  };
2918
+ } else if (typeof MessageChannel !== 'undefined') {
2919
+ // DOM and Worker environments.
2920
+ // We prefer MessageChannel because of the 4ms setTimeout clamping.
2921
+ var channel = new MessageChannel();
2922
+ var port = channel.port2;
2923
+ channel.port1.onmessage = performWorkUntilDeadline;
3123
2924
 
3124
- return wrapped;
3125
- }
3126
-
3127
- var subscribers = null;
3128
-
3129
- {
3130
- subscribers = new Set();
3131
- }
3132
-
3133
- function unstable_subscribe(subscriber) {
3134
- {
3135
- subscribers.add(subscriber);
3136
-
3137
- if (subscribers.size === 1) {
3138
- subscriberRef.current = {
3139
- onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
3140
- onInteractionTraced: onInteractionTraced,
3141
- onWorkCanceled: onWorkCanceled,
3142
- onWorkScheduled: onWorkScheduled,
3143
- onWorkStarted: onWorkStarted,
3144
- onWorkStopped: onWorkStopped
3145
- };
3146
- }
3147
- }
3148
- }
3149
- function unstable_unsubscribe(subscriber) {
3150
- {
3151
- subscribers.delete(subscriber);
3152
-
3153
- if (subscribers.size === 0) {
3154
- subscriberRef.current = null;
3155
- }
3156
- }
2925
+ schedulePerformWorkUntilDeadline = function () {
2926
+ port.postMessage(null);
2927
+ };
2928
+ } else {
2929
+ // We should only fallback here in non-browser environments.
2930
+ schedulePerformWorkUntilDeadline = function () {
2931
+ localSetTimeout(performWorkUntilDeadline, 0);
2932
+ };
3157
2933
  }
3158
2934
 
3159
- function onInteractionTraced(interaction) {
3160
- var didCatchError = false;
3161
- var caughtError = null;
3162
- subscribers.forEach(function (subscriber) {
3163
- try {
3164
- subscriber.onInteractionTraced(interaction);
3165
- } catch (error) {
3166
- if (!didCatchError) {
3167
- didCatchError = true;
3168
- caughtError = error;
3169
- }
3170
- }
3171
- });
2935
+ function requestHostCallback(callback) {
2936
+ scheduledHostCallback = callback;
3172
2937
 
3173
- if (didCatchError) {
3174
- throw caughtError;
2938
+ if (!isMessageLoopRunning) {
2939
+ isMessageLoopRunning = true;
2940
+ schedulePerformWorkUntilDeadline();
3175
2941
  }
3176
2942
  }
3177
2943
 
3178
- function onInteractionScheduledWorkCompleted(interaction) {
3179
- var didCatchError = false;
3180
- var caughtError = null;
3181
- subscribers.forEach(function (subscriber) {
3182
- try {
3183
- subscriber.onInteractionScheduledWorkCompleted(interaction);
3184
- } catch (error) {
3185
- if (!didCatchError) {
3186
- didCatchError = true;
3187
- caughtError = error;
3188
- }
3189
- }
3190
- });
3191
-
3192
- if (didCatchError) {
3193
- throw caughtError;
3194
- }
2944
+ function requestHostTimeout(callback, ms) {
2945
+ taskTimeoutID = localSetTimeout(function () {
2946
+ callback(getCurrentTime());
2947
+ }, ms);
3195
2948
  }
3196
2949
 
3197
- function onWorkScheduled(interactions, threadID) {
3198
- var didCatchError = false;
3199
- var caughtError = null;
3200
- subscribers.forEach(function (subscriber) {
3201
- try {
3202
- subscriber.onWorkScheduled(interactions, threadID);
3203
- } catch (error) {
3204
- if (!didCatchError) {
3205
- didCatchError = true;
3206
- caughtError = error;
3207
- }
3208
- }
3209
- });
3210
-
3211
- if (didCatchError) {
3212
- throw caughtError;
3213
- }
2950
+ function cancelHostTimeout() {
2951
+ localClearTimeout(taskTimeoutID);
2952
+ taskTimeoutID = -1;
3214
2953
  }
3215
2954
 
3216
- function onWorkStarted(interactions, threadID) {
3217
- var didCatchError = false;
3218
- var caughtError = null;
3219
- subscribers.forEach(function (subscriber) {
3220
- try {
3221
- subscriber.onWorkStarted(interactions, threadID);
3222
- } catch (error) {
3223
- if (!didCatchError) {
3224
- didCatchError = true;
3225
- caughtError = error;
3226
- }
3227
- }
3228
- });
3229
-
3230
- if (didCatchError) {
3231
- throw caughtError;
3232
- }
3233
- }
3234
-
3235
- function onWorkStopped(interactions, threadID) {
3236
- var didCatchError = false;
3237
- var caughtError = null;
3238
- subscribers.forEach(function (subscriber) {
3239
- try {
3240
- subscriber.onWorkStopped(interactions, threadID);
3241
- } catch (error) {
3242
- if (!didCatchError) {
3243
- didCatchError = true;
3244
- caughtError = error;
3245
- }
3246
- }
3247
- });
3248
-
3249
- if (didCatchError) {
3250
- throw caughtError;
3251
- }
3252
- }
3253
-
3254
- function onWorkCanceled(interactions, threadID) {
3255
- var didCatchError = false;
3256
- var caughtError = null;
3257
- subscribers.forEach(function (subscriber) {
3258
- try {
3259
- subscriber.onWorkCanceled(interactions, threadID);
3260
- } catch (error) {
3261
- if (!didCatchError) {
3262
- didCatchError = true;
3263
- caughtError = error;
3264
- }
3265
- }
3266
- });
3267
-
3268
- if (didCatchError) {
3269
- throw caughtError;
3270
- }
3271
- }
2955
+ var unstable_requestPaint = requestPaint;
2956
+ var unstable_Profiling = null;
3272
2957
 
3273
2958
 
3274
2959
 
3275
- var SchedulerTracing = /*#__PURE__*/Object.freeze({
2960
+ var Scheduler = /*#__PURE__*/Object.freeze({
3276
2961
  __proto__: null,
3277
- get __interactionsRef () { return interactionsRef; },
3278
- get __subscriberRef () { return subscriberRef; },
3279
- unstable_clear: unstable_clear,
3280
- unstable_getCurrent: unstable_getCurrent,
3281
- unstable_getThreadID: unstable_getThreadID,
3282
- unstable_trace: unstable_trace,
3283
- unstable_wrap: unstable_wrap,
3284
- unstable_subscribe: unstable_subscribe,
3285
- unstable_unsubscribe: unstable_unsubscribe
2962
+ unstable_ImmediatePriority: ImmediatePriority,
2963
+ unstable_UserBlockingPriority: UserBlockingPriority,
2964
+ unstable_NormalPriority: NormalPriority,
2965
+ unstable_IdlePriority: IdlePriority,
2966
+ unstable_LowPriority: LowPriority,
2967
+ unstable_runWithPriority: unstable_runWithPriority,
2968
+ unstable_next: unstable_next,
2969
+ unstable_scheduleCallback: unstable_scheduleCallback,
2970
+ unstable_cancelCallback: unstable_cancelCallback,
2971
+ unstable_wrapCallback: unstable_wrapCallback,
2972
+ unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
2973
+ unstable_shouldYield: shouldYieldToHost,
2974
+ unstable_requestPaint: unstable_requestPaint,
2975
+ unstable_continueExecution: unstable_continueExecution,
2976
+ unstable_pauseExecution: unstable_pauseExecution,
2977
+ unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
2978
+ get unstable_now () { return getCurrentTime; },
2979
+ unstable_forceFrameRate: forceFrameRate,
2980
+ unstable_Profiling: unstable_Profiling
3286
2981
  });
3287
2982
 
3288
2983
  var ReactSharedInternals$1 = {
@@ -3297,24 +2992,21 @@
3297
2992
  // Since that would be a breaking change (e.g. for all existing CodeSandboxes).
3298
2993
  // This re-export is only required for UMD bundles;
3299
2994
  // CJS bundles use the shared NPM package.
3300
- Scheduler: Scheduler,
3301
- SchedulerTracing: SchedulerTracing
2995
+ Scheduler: Scheduler
3302
2996
  };
3303
2997
 
3304
2998
  {
3305
2999
  ReactSharedInternals$1.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
3306
3000
  }
3307
3001
 
3308
- {
3002
+ function startTransition(scope) {
3003
+ var prevTransition = ReactCurrentBatchConfig.transition;
3004
+ ReactCurrentBatchConfig.transition = 1;
3309
3005
 
3310
3006
  try {
3311
- var frozenObject = Object.freeze({});
3312
- /* eslint-disable no-new */
3313
-
3314
- new Map([[frozenObject, null]]);
3315
- new Set([frozenObject]);
3316
- /* eslint-enable no-new */
3317
- } catch (e) {
3007
+ scope();
3008
+ } finally {
3009
+ ReactCurrentBatchConfig.transition = prevTransition;
3318
3010
  }
3319
3011
  }
3320
3012
 
@@ -3342,9 +3034,14 @@
3342
3034
  exports.isValidElement = isValidElement;
3343
3035
  exports.lazy = lazy;
3344
3036
  exports.memo = memo;
3037
+ exports.startTransition = startTransition;
3038
+ exports.unstable_createMutableSource = createMutableSource;
3039
+ exports.unstable_useMutableSource = useMutableSource;
3040
+ exports.unstable_useOpaqueIdentifier = useOpaqueIdentifier;
3345
3041
  exports.useCallback = useCallback;
3346
3042
  exports.useContext = useContext;
3347
3043
  exports.useDebugValue = useDebugValue;
3044
+ exports.useDeferredValue = useDeferredValue;
3348
3045
  exports.useEffect = useEffect;
3349
3046
  exports.useImperativeHandle = useImperativeHandle;
3350
3047
  exports.useLayoutEffect = useLayoutEffect;
@@ -3352,6 +3049,7 @@
3352
3049
  exports.useReducer = useReducer;
3353
3050
  exports.useRef = useRef;
3354
3051
  exports.useState = useState;
3052
+ exports.useTransition = useTransition;
3355
3053
  exports.version = ReactVersion;
3356
3054
 
3357
3055
  })));