WordPress/wp-includes/js/dist/vendor/react.min.js
youknowriad a41c798835 Block Editor: Updated the WordPress packages to include Gutenberg 15.1.0 changes.
In addition to all the packages being updated to the latest versions, 
this commit also includes some mandatory changes to avoid editor breakage:

 - Update React to to 18.2.0.
 - Add the right stylesheets to support iframed block editors.

Props ntsekouras, mamaduka, flixos90, desrosj, peterwilsoncc.
See #57471.

Built from https://develop.svn.wordpress.org/trunk@55246


git-svn-id: http://core.svn.wordpress.org/trunk@54779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 07:04:52 +00:00

10 lines
10 KiB
JavaScript

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
!function(){"use strict";var e,t;e=this,t=function(e){function t(e,t,n){this.props=e,this.context=t,this.refs=L,this.updater=n||T}function n(){}function r(e,t,n){this.props=e,this.context=t,this.refs=L,this.updater=n||T}function o(e,t,n){var r,o={},u=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(u=""+t.key),t)D.call(t,r)&&!V.hasOwnProperty(r)&&(o[r]=t[r]);var i=arguments.length-2;if(1===i)o.children=n;else if(1<i){for(var l=Array(i),c=0;c<i;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(r in i=e.defaultProps)void 0===o[r]&&(o[r]=i[r]);return{$$typeof:g,type:e,key:u,ref:a,props:o,_owner:U.current}}function u(e){return"object"==typeof e&&null!==e&&e.$$typeof===g}function a(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function i(e,t,n,r,o){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var c=!1;if(null===e)c=!0;else switch(l){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case g:case k:c=!0}}if(c)return o=o(c=e),e=""===r?"."+a(c,0):r,M(o)?(n="",null!=e&&(n=e.replace(q,"$&/")+"/"),i(o,t,n,"",(function(e){return e}))):null!=o&&(u(o)&&(o=function(e,t){return{$$typeof:g,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||c&&c.key===o.key?"":(""+o.key).replace(q,"$&/")+"/")+e)),t.push(o)),1;if(c=0,r=""===r?".":r+":",M(e))for(var f=0;f<e.length;f++){var s=r+a(l=e[f],f);c+=i(l,t,n,s,o)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),f=0;!(l=e.next()).done;)c+=i(l=l.value,t,n,s=r+a(l,f++),o);else if("object"===l)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function l(e,t,n){if(null==e)return e;var r=[],o=0;return i(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function c(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}function f(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<y(o,t)))break e;e[r]=t,e[n]=o,n=r}}function s(e){return 0===e.length?null:e[0]}function p(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,u=o>>>1;r<u;){var a=2*(r+1)-1,i=e[a],l=a+1,c=e[l];if(0>y(i,n))l<o&&0>y(c,i)?(e[r]=c,e[l]=n,r=l):(e[r]=i,e[a]=n,r=a);else{if(!(l<o&&0>y(c,n)))break e;e[r]=c,e[l]=n,r=l}}}return t}function y(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}function d(e){for(var t=s(G);null!==t;){if(null===t.callback)p(G);else{if(!(t.startTime<=e))break;p(G),t.sortIndex=t.expirationTime,f(Y,t)}t=s(G)}}function b(e){if(ee=!1,d(e),!Z)if(null!==s(Y))Z=!0,_(v);else{var t=s(G);null!==t&&h(b,t.startTime-e)}}function v(e,t){Z=!1,ee&&(ee=!1,ne(ae),ae=-1),X=!0;var n=Q;try{for(d(t),K=s(Y);null!==K&&(!(K.expirationTime>t)||e&&!m());){var r=K.callback;if("function"==typeof r){K.callback=null,Q=K.priorityLevel;var o=r(K.expirationTime<=t);t=z(),"function"==typeof o?K.callback=o:K===s(Y)&&p(Y),d(t)}else p(Y);K=s(Y)}if(null!==K)var u=!0;else{var a=s(G);null!==a&&h(b,a.startTime-t),u=!1}return u}finally{K=null,Q=n,X=!1}}function m(){return!(z()-le<ie)}function _(e){ue=e,oe||(oe=!0,fe())}function h(e,t){ae=te((function(){e(z())}),t)}var g=Symbol.for("react.element"),k=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),E=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),$=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),j=Symbol.iterator,T={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){},enqueueReplaceState:function(e,t,n,r){},enqueueSetState:function(e,t,n,r){}},O=Object.assign,L={};t.prototype.isReactComponent={},t.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},t.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},n.prototype=t.prototype;var F=r.prototype=new n;F.constructor=r,O(F,t.prototype),F.isPureReactComponent=!0;var M=Array.isArray,D=Object.prototype.hasOwnProperty,U={current:null},V={key:!0,ref:!0,__self:!0,__source:!0},q=/\/+/g,A={current:null},N={transition:null};if("object"==typeof performance&&"function"==typeof performance.now)var B=performance,z=function(){return B.now()};else{var H=Date,W=H.now();z=function(){return H.now()-W}}var Y=[],G=[],J=1,K=null,Q=3,X=!1,Z=!1,ee=!1,te="function"==typeof setTimeout?setTimeout:null,ne="function"==typeof clearTimeout?clearTimeout:null,re="undefined"!=typeof setImmediate?setImmediate:null;"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var oe=!1,ue=null,ae=-1,ie=5,le=-1,ce=function(){if(null!==ue){var e=z();le=e;var t=!0;try{t=ue(!0,e)}finally{t?fe():(oe=!1,ue=null)}}else oe=!1};if("function"==typeof re)var fe=function(){re(ce)};else if("undefined"!=typeof MessageChannel){var se=(F=new MessageChannel).port2;F.port1.onmessage=ce,fe=function(){se.postMessage(null)}}else fe=function(){te(ce,0)};F={ReactCurrentDispatcher:A,ReactCurrentOwner:U,ReactCurrentBatchConfig:N,Scheduler:{__proto__:null,unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Q;Q=e;try{return t()}finally{Q=n}},unstable_next:function(e){switch(Q){case 1:case 2:case 3:var t=3;break;default:t=Q}var n=Q;Q=t;try{return e()}finally{Q=n}},unstable_scheduleCallback:function(e,t,n){var r=z();switch(n="object"==typeof n&&null!==n&&"number"==typeof(n=n.delay)&&0<n?r+n:r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:J++,callback:t,priorityLevel:e,startTime:n,expirationTime:o=n+o,sortIndex:-1},n>r?(e.sortIndex=n,f(G,e),null===s(Y)&&e===s(G)&&(ee?(ne(ae),ae=-1):ee=!0,h(b,n-r))):(e.sortIndex=o,f(Y,e),Z||X||(Z=!0,_(v))),e},unstable_cancelCallback:function(e){e.callback=null},unstable_wrapCallback:function(e){var t=Q;return function(){var n=Q;Q=t;try{return e.apply(this,arguments)}finally{Q=n}}},unstable_getCurrentPriorityLevel:function(){return Q},unstable_shouldYield:m,unstable_requestPaint:function(){},unstable_continueExecution:function(){Z||X||(Z=!0,_(v))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return s(Y)},get unstable_now(){return z},unstable_forceFrameRate:function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ie=0<e?Math.floor(1e3/e):5},unstable_Profiling:null}},e.Children={map:l,forEach:function(e,t,n){l(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return l(e,(function(){t++})),t},toArray:function(e){return l(e,(function(e){return e}))||[]},only:function(e){if(!u(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},e.Component=t,e.Fragment=w,e.Profiler=x,e.PureComponent=r,e.StrictMode=S,e.Suspense=P,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,e.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=O({},e.props),o=e.key,u=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,a=U.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(l in t)D.call(t,l)&&!V.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==i?i[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){i=Array(l);for(var c=0;c<l;c++)i[c]=arguments[c+2];r.children=i}return{$$typeof:g,type:e.type,key:o,ref:u,props:r,_owner:a}},e.createContext=function(e){return(e={$$typeof:E,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:C,_context:e},e.Consumer=e},e.createElement=o,e.createFactory=function(e){var t=o.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:R,render:e}},e.isValidElement=u,e.lazy=function(e){return{$$typeof:I,_payload:{_status:-1,_result:e},_init:c}},e.memo=function(e,t){return{$$typeof:$,type:e,compare:void 0===t?null:t}},e.startTransition=function(e,t){t=N.transition,N.transition={};try{e()}finally{N.transition=t}},e.unstable_act=function(e){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(e,t){return A.current.useCallback(e,t)},e.useContext=function(e){return A.current.useContext(e)},e.useDebugValue=function(e,t){},e.useDeferredValue=function(e){return A.current.useDeferredValue(e)},e.useEffect=function(e,t){return A.current.useEffect(e,t)},e.useId=function(){return A.current.useId()},e.useImperativeHandle=function(e,t,n){return A.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return A.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return A.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return A.current.useMemo(e,t)},e.useReducer=function(e,t,n){return A.current.useReducer(e,t,n)},e.useRef=function(e){return A.current.useRef(e)},e.useState=function(e){return A.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return A.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return A.current.useTransition()},e.version="18.2.0"},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).React={})}();