react
Version:
React is a JavaScript library for building user interfaces.
36 lines (34 loc) • 12.6 kB
JavaScript
/**
* @license React
* react.profiling.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
;(function(){(function(f,A){"object"===typeof exports&&"undefined"!==typeof module?A(exports):"function"===typeof define&&define.amd?define(["exports"],A):(f="undefined"!==typeof globalThis?globalThis:f||self,A(f.React={}))})(this,function(f){function A(a){if(null===a||"object"!==typeof a)return null;a=W&&a[W]||a["@@iterator"];return"function"===typeof a?a:null}function y(a,b,c){this.props=a;this.context=b;this.refs=X;this.updater=c||Y}function Z(){}function M(a,b,c){this.props=a;this.context=
b;this.refs=X;this.updater=c||Y}function qa(a,b){return{$$typeof:B,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function N(a){return"object"===typeof a&&null!==a&&a.$$typeof===B}function ra(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(c){return b[c]})}function O(a,b){return"object"===typeof a&&null!==a&&null!=a.key?ra(""+a.key):b.toString(36)}function aa(){}function sa(a){switch(a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;default:switch("string"===
typeof a.status?a.then(aa,aa):(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)})),a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;}}throw a;}function z(a,b,c,d,e){var g=typeof a;if("undefined"===g||"boolean"===g)a=null;var k=!1;if(null===a)k=!0;else switch(g){case "string":case "number":k=!0;break;case "object":switch(a.$$typeof){case B:case ta:k=!0;break;case ba:return k=
a._init,z(k(a._payload),b,c,d,e)}}if(k)return e=e(a),k=""===d?"."+O(a,0):d,ca(e)?(c="",null!=k&&(c=k.replace(da,"$&/")+"/"),z(e,b,c,"",function(n){return n})):null!=e&&(N(e)&&(e=qa(e,c+(!e.key||a&&a.key===e.key?"":(""+e.key).replace(da,"$&/")+"/")+k)),b.push(e)),1;k=0;var l=""===d?".":d+":";if(ca(a))for(var h=0;h<a.length;h++)d=a[h],g=l+O(d,h),k+=z(d,b,c,g,e);else if(h=A(a),"function"===typeof h)for(a=h.call(a),h=0;!(d=a.next()).done;)d=d.value,g=l+O(d,h++),k+=z(d,b,c,g,e);else if("object"===g){if("function"===
typeof a.then)return z(sa(a),b,c,d,e);b=String(a);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");}return k}function F(a,b,c){if(null==a)return a;var d=[],e=0;z(a,d,"","",function(g){return b.call(c,g,e++)});return d}function ua(a){if(-1===a._status){var b=a._result;b=b();b.then(function(c){if(0===a._status||-1===a._status)a._status=
1,a._result=c},function(c){if(0===a._status||-1===a._status)a._status=2,a._result=c});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}function va(){return new WeakMap}function P(){return{s:0,v:void 0,o:null,p:null}}function Q(a,b){var c=a.length;a.push(b);a:for(;0<c;){var d=c-1>>>1,e=a[d];if(0<G(e,b))a[d]=b,a[c]=e,c=d;else break a}}function r(a){return 0===a.length?null:a[0]}function H(a){if(0===a.length)return null;var b=a[0],c=a.pop();if(c!==
b){a[0]=c;a:for(var d=0,e=a.length,g=e>>>1;d<g;){var k=2*(d+1)-1,l=a[k],h=k+1,n=a[h];if(0>G(l,c))h<e&&0>G(n,l)?(a[d]=n,a[h]=c,d=h):(a[d]=l,a[k]=c,d=k);else if(h<e&&0>G(n,c))a[d]=n,a[h]=c,d=h;else break a}}return b}function G(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function I(a){for(var b=r(u);null!==b;){if(null===b.callback)H(u);else if(b.startTime<=a)H(u),b.sortIndex=b.expirationTime,Q(t,b);else break;b=r(u)}}function R(a){C=!1;I(a);if(!w)if(null!==r(t))w=!0,S();else{var b=r(u);
null!==b&&T(R,b.startTime-a)}}function ea(){return x()-fa<ha?!1:!0}function S(){J||(J=!0,K())}function T(a,b){D=ia(function(){a(x())},b)}function wa(){}var B=Symbol.for("react.element"),ta=Symbol.for("react.portal"),xa=Symbol.for("react.fragment"),ya=Symbol.for("react.strict_mode"),za=Symbol.for("react.profiler"),Aa=Symbol.for("react.provider"),Ba=Symbol.for("react.context"),Ca=Symbol.for("react.forward_ref"),Da=Symbol.for("react.suspense"),Ea=Symbol.for("react.memo"),ba=Symbol.for("react.lazy"),
W=Symbol.iterator,Y={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,b,c,d){}},ja=Object.assign,X={};y.prototype.isReactComponent={};y.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};y.prototype.forceUpdate=
function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};Z.prototype=y.prototype;var v=M.prototype=new Z;v.constructor=M;ja(v,y.prototype);v.isPureReactComponent=!0;var ca=Array.isArray,m={current:null},ka={current:null},E={transition:null},U={current:null},la=Object.prototype.hasOwnProperty,da=/\/+/g;if("object"===typeof performance&&"function"===typeof performance.now){var Fa=performance;var x=function(){return Fa.now()}}else{var ma=Date,Ga=ma.now();x=function(){return ma.now()-Ga}}var t=
[],u=[],Ha=1,q=null,p=3,L=!1,w=!1,C=!1,ia="function"===typeof setTimeout?setTimeout:null,na="function"===typeof clearTimeout?clearTimeout:null,oa="undefined"!==typeof setImmediate?setImmediate:null,J=!1,D=-1,ha=5,fa=-1,V=function(){if(J){var a=x();fa=a;var b=!0;try{a:{w=!1;C&&(C=!1,na(D),D=-1);L=!0;var c=p;try{b:{I(a);for(q=r(t);null!==q&&!(q.expirationTime>a&&ea());){var d=q.callback;if("function"===typeof d){q.callback=null;p=q.priorityLevel;var e=d(q.expirationTime<=a);a=x();if("function"===typeof e){q.callback=
e;I(a);b=!0;break b}q===r(t)&&H(t);I(a)}else H(t);q=r(t)}if(null!==q)b=!0;else{var g=r(u);null!==g&&T(R,g.startTime-a);b=!1}}break a}finally{q=null,p=c,L=!1}b=void 0}}finally{b?K():J=!1}}};if("function"===typeof oa)var K=function(){oa(V)};else if("undefined"!==typeof MessageChannel){v=new MessageChannel;var Ia=v.port2;v.port1.onmessage=V;K=function(){Ia.postMessage(null)}}else K=function(){ia(V,0)};v={ReactCurrentDispatcher:m,ReactCurrentCache:ka,ReactCurrentOwner:U,ReactCurrentBatchConfig:E,Scheduler:{__proto__:null,
unstable_IdlePriority:5,unstable_ImmediatePriority:1,unstable_LowPriority:4,unstable_NormalPriority:3,unstable_Profiling:null,unstable_UserBlockingPriority:2,unstable_cancelCallback:function(a){a.callback=null},unstable_continueExecution:function(){w||L||(w=!0,S())},unstable_forceFrameRate:function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ha=0<a?Math.floor(1E3/a):5},unstable_getCurrentPriorityLevel:function(){return p},
unstable_getFirstCallbackNode:function(){return r(t)},unstable_next:function(a){switch(p){case 1:case 2:case 3:var b=3;break;default:b=p}var c=p;p=b;try{return a()}finally{p=c}},get unstable_now(){return x},unstable_pauseExecution:function(){},unstable_requestPaint:function(){},unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=p;p=a;try{return b()}finally{p=c}},unstable_scheduleCallback:function(a,b,c){var d=x();"object"===typeof c&&null!==
c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:Ha++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,Q(u,a),null===r(t)&&a===r(u)&&(C?(na(D),D=-1):C=!0,T(R,c-d))):(a.sortIndex=e,Q(t,a),w||L||(w=!0,S()));return a},unstable_shouldYield:ea,unstable_wrapCallback:function(a){var b=p;return function(){var c=p;p=b;try{return a.apply(this,arguments)}finally{p=
c}}}}};var pa="function"===typeof reportError?reportError:function(a){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var b=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof a&&null!==a&&"string"===typeof a.message?String(a.message):String(a),error:a});if(!window.dispatchEvent(b))return}else if("object"===typeof process&&"function"===typeof process.emit){process.emit("uncaughtException",a);return}console.error(a)};f.Children={map:F,forEach:function(a,
b,c){F(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;F(a,function(){b++});return b},toArray:function(a){return F(a,function(b){return b})||[]},only:function(a){if(!N(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};f.Component=y;f.Fragment=xa;f.Profiler=za;f.PureComponent=M;f.StrictMode=ya;f.Suspense=Da;f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=v;f.act=function(a){throw Error("act(...) is not supported in production builds of React.");
};f.cache=function(a){return function(){var b=ka.current;if(!b)return a.apply(null,arguments);var c=b.getCacheForType(va);b=c.get(a);void 0===b&&(b=P(),c.set(a,b));c=0;for(var d=arguments.length;c<d;c++){var e=arguments[c];if("function"===typeof e||"object"===typeof e&&null!==e){var g=b.o;null===g&&(b.o=g=new WeakMap);b=g.get(e);void 0===b&&(b=P(),g.set(e,b))}else g=b.p,null===g&&(b.p=g=new Map),b=g.get(e),void 0===b&&(b=P(),g.set(e,b))}if(1===b.s)return b.v;if(2===b.s)throw b.v;try{var k=a.apply(null,
arguments);c=b;c.s=1;return c.v=k}catch(l){throw k=b,k.s=2,k.v=l,l;}}};f.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error("The argument must be a React element, but you passed "+a+".");var d=ja({},a.props),e=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=U.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var l=a.type.defaultProps;for(h in b)la.call(b,h)&&"key"!==h&&"ref"!==h&&"__self"!==h&&"__source"!==h&&(d[h]=void 0===b[h]&&void 0!==l?l[h]:b[h])}var h=
arguments.length-2;if(1===h)d.children=c;else if(1<h){l=Array(h);for(var n=0;n<h;n++)l[n]=arguments[n+2];d.children=l}return{$$typeof:B,type:a.type,key:e,ref:g,props:d,_owner:k}};f.createContext=function(a){a={$$typeof:Ba,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:Aa,_context:a};return a.Consumer=a};f.createElement=function(a,b,c){var d,e={},g=null,k=null;if(null!=b)for(d in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),b)la.call(b,d)&&
"key"!==d&&"ref"!==d&&"__self"!==d&&"__source"!==d&&(e[d]=b[d]);var l=arguments.length-2;if(1===l)e.children=c;else if(1<l){for(var h=Array(l),n=0;n<l;n++)h[n]=arguments[n+2];e.children=h}if(a&&a.defaultProps)for(d in l=a.defaultProps,l)void 0===e[d]&&(e[d]=l[d]);return{$$typeof:B,type:a,key:g,ref:k,props:e,_owner:U.current}};f.createRef=function(){return{current:null}};f.forwardRef=function(a){return{$$typeof:Ca,render:a}};f.isValidElement=N;f.lazy=function(a){return{$$typeof:ba,_payload:{_status:-1,
_result:a},_init:ua}};f.memo=function(a,b){return{$$typeof:Ea,type:a,compare:void 0===b?null:b}};f.startTransition=function(a,b){b=E.transition;var c=new Set;E.transition={_callbacks:c};var d=E.transition;try{var e=a();"object"===typeof e&&null!==e&&"function"===typeof e.then&&(c.forEach(function(g){return g(d,e)}),e.then(wa,pa))}catch(g){pa(g)}finally{E.transition=b}};f.unstable_useCacheRefresh=function(){return m.current.useCacheRefresh()};f.use=function(a){return m.current.use(a)};f.useActionState=
function(a,b,c){return m.current.useActionState(a,b,c)};f.useCallback=function(a,b){return m.current.useCallback(a,b)};f.useContext=function(a){return m.current.useContext(a)};f.useDebugValue=function(a,b){};f.useDeferredValue=function(a,b){return m.current.useDeferredValue(a,b)};f.useEffect=function(a,b){return m.current.useEffect(a,b)};f.useId=function(){return m.current.useId()};f.useImperativeHandle=function(a,b,c){return m.current.useImperativeHandle(a,b,c)};f.useInsertionEffect=function(a,b){return m.current.useInsertionEffect(a,
b)};f.useLayoutEffect=function(a,b){return m.current.useLayoutEffect(a,b)};f.useMemo=function(a,b){return m.current.useMemo(a,b)};f.useOptimistic=function(a,b){return m.current.useOptimistic(a,b)};f.useReducer=function(a,b,c){return m.current.useReducer(a,b,c)};f.useRef=function(a){return m.current.useRef(a)};f.useState=function(a){return m.current.useState(a)};f.useSyncExternalStore=function(a,b,c){return m.current.useSyncExternalStore(a,b,c)};f.useTransition=function(){return m.current.useTransition()};
f.version="19.0.0-canary-95e6f032c-20240401"})})();