mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-11 23:28:18 +02:00
Gutenberg 6.5 works with react and react-dom set to v16.9.0. This change aligns both. Props youknowriad. Fixes #48121. Built from https://develop.svn.wordpress.org/trunk@46289 git-svn-id: http://core.svn.wordpress.org/trunk@46101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
35 lines
13 KiB
JavaScript
35 lines
13 KiB
JavaScript
/** @license React v16.9.0
|
|
* 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.
|
|
*/
|
|
'use strict';(function(t,q){"object"===typeof exports&&"undefined"!==typeof module?module.exports=q():"function"===typeof define&&define.amd?define(q):t.React=q()})(this,function(){function t(a){for(var b=a.message,c="https://reactjs.org/docs/error-decoder.html?invariant="+b,d=1;d<arguments.length;d++)c+="&args[]="+encodeURIComponent(arguments[d]);a.message="Minified React error #"+b+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ";
|
|
return a}function q(a,b,c){this.props=a;this.context=b;this.refs=fa;this.updater=c||ha}function ia(){}function O(a,b,c){this.props=a;this.context=b;this.refs=fa;this.updater=c||ha}function ja(a,b,c){var d=void 0,g={},k=null,e=null;if(null!=b)for(d in void 0!==b.ref&&(e=b.ref),void 0!==b.key&&(k=""+b.key),b)ka.call(b,d)&&!la.hasOwnProperty(d)&&(g[d]=b[d]);var l=arguments.length-2;if(1===l)g.children=c;else if(1<l){for(var h=Array(l),f=0;f<l;f++)h[f]=arguments[f+2];g.children=h}if(a&&a.defaultProps)for(d in l=
|
|
a.defaultProps,l)void 0===g[d]&&(g[d]=l[d]);return{$$typeof:y,type:a,key:k,ref:e,props:g,_owner:P.current}}function Ba(a,b){return{$$typeof:y,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function Q(a){return"object"===typeof a&&null!==a&&a.$$typeof===y}function Ca(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}function ma(a,b,c,d){if(H.length){var g=H.pop();g.result=a;g.keyPrefix=b;g.func=c;g.context=d;g.count=0;return g}return{result:a,keyPrefix:b,
|
|
func:c,context:d,count:0}}function na(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>H.length&&H.push(a)}function R(a,b,c,d){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 y:case Da:k=!0}}if(k)return c(d,a,""===b?"."+S(a,0):b),1;k=0;b=""===b?".":b+":";if(Array.isArray(a))for(var e=0;e<a.length;e++){g=a[e];var l=b+S(g,e);k+=R(g,l,c,d)}else if(null===
|
|
a||"object"!==typeof a?l=null:(l=oa&&a[oa]||a["@@iterator"],l="function"===typeof l?l:null),"function"===typeof l)for(a=l.call(a),e=0;!(g=a.next()).done;)g=g.value,l=b+S(g,e++),k+=R(g,l,c,d);else if("object"===g)throw c=""+a,t(Error(31),"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,"");return k}function T(a,b,c){return null==a?0:R(a,"",b,c)}function S(a,b){return"object"===typeof a&&null!==a&&null!=a.key?Ca(a.key):b.toString(36)}function Ea(a,b,c){a.func.call(a.context,
|
|
b,a.count++)}function Fa(a,b,c){var d=a.result,g=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?U(a,d,c,function(a){return a}):null!=a&&(Q(a)&&(a=Ba(a,g+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(pa,"$&/")+"/")+c)),d.push(a))}function U(a,b,c,d,g){var e="";null!=c&&(e=(""+c).replace(pa,"$&/")+"/");b=ma(b,e,d,g);T(a,Fa,b);na(b)}function r(){var a=qa.current;if(null===a)throw t(Error(321));return a}function ra(a,b){var c=a.next;if(c===a)e=null;else{a===e&&(e=c);var d=a.previous;
|
|
d.next=c;c.previous=d}a.next=a.previous=null;c=a.callback;d=m;var g=z;m=a.priorityLevel;z=a;try{var k=a.expirationTime<=b;switch(m){case 1:var f=c(k);break;case 2:f=c(k);break;case 3:f=c(k);break;case 4:f=c(k);break;case 5:f=c(k)}}catch(l){throw l;}finally{m=d,z=g}if("function"===typeof f)if(b=a.expirationTime,a.callback=f,null===e)e=a.next=a.previous=a;else{f=null;k=e;do{if(b<=k.expirationTime){f=k;break}k=k.next}while(k!==e);null===f?f=e:f===e&&(e=a);b=f.previous;b.next=f.previous=a;a.next=f;a.previous=
|
|
b}}function A(a){if(null!==f&&f.startTime<=a){do{var b=f,c=b.next;if(b===c)f=null;else{f=c;var d=b.previous;d.next=c;c.previous=d}b.next=b.previous=null;sa(b,b.expirationTime)}while(null!==f&&f.startTime<=a)}}function V(a){B=!1;A(a);u||(null!==e?(u=!0,w(W)):null!==f&&C(V,f.startTime-a))}function W(a,b){u=!1;B&&(B=!1,I());A(b);J=!0;try{if(!a)for(;null!==e&&e.expirationTime<=b;)ra(e,b),b=n(),A(b);else if(null!==e){do ra(e,b),b=n(),A(b);while(null!==e&&!K())}if(null!==e)return!0;null!==f&&C(V,f.startTime-
|
|
b);return!1}finally{J=!1}}function ta(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}function sa(a,b){if(null===e)e=a.next=a.previous=a;else{var c=null,d=e;do{if(b<d.expirationTime){c=d;break}d=d.next}while(d!==e);null===c?c=e:c===e&&(e=a);b=c.previous;b.next=c.previous=a;a.next=c;a.previous=b}}var h="function"===typeof Symbol&&Symbol.for,y=h?Symbol.for("react.element"):60103,Da=h?Symbol.for("react.portal"):60106,v=h?Symbol.for("react.fragment"):
|
|
60107,X=h?Symbol.for("react.strict_mode"):60108,Ga=h?Symbol.for("react.profiler"):60114,Ha=h?Symbol.for("react.provider"):60109,Ia=h?Symbol.for("react.context"):60110,Ja=h?Symbol.for("react.forward_ref"):60112,Ka=h?Symbol.for("react.suspense"):60113,La=h?Symbol.for("react.suspense_list"):60120,Ma=h?Symbol.for("react.memo"):60115,Na=h?Symbol.for("react.lazy"):60116;h&&Symbol.for("react.fundamental");h&&Symbol.for("react.responder");var oa="function"===typeof Symbol&&Symbol.iterator,ua=Object.getOwnPropertySymbols,
|
|
Oa=Object.prototype.hasOwnProperty,Pa=Object.prototype.propertyIsEnumerable,L=function(){try{if(!Object.assign)return!1;var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;var b={};for(a=0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var c={};"abcdefghijklmnopqrst".split("").forEach(function(a){c[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},c)).join("")?
|
|
!1:!0}catch(d){return!1}}()?Object.assign:function(a,b){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");var c=Object(a);for(var d,g=1;g<arguments.length;g++){var e=Object(arguments[g]);for(var f in e)Oa.call(e,f)&&(c[f]=e[f]);if(ua){d=ua(e);for(var l=0;l<d.length;l++)Pa.call(e,d[l])&&(c[d[l]]=e[d[l]])}}return c},ha={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,
|
|
b,c,d){}},fa={};q.prototype.isReactComponent={};q.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw t(Error(85));this.updater.enqueueSetState(this,a,b,"setState")};q.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};ia.prototype=q.prototype;h=O.prototype=new ia;h.constructor=O;L(h,q.prototype);h.isPureReactComponent=!0;var qa={current:null},P={current:null},ka=Object.prototype.hasOwnProperty,la={key:!0,ref:!0,__self:!0,
|
|
__source:!0},pa=/\/+/g,H=[],w=void 0,C=void 0,I=void 0,K=void 0,n=h=void 0,Y=void 0;if("undefined"===typeof window||"function"!==typeof MessageChannel){var D=null,va=null,wa=function(){if(null!==D)try{var a=n();D(!0,a);D=null}catch(b){throw setTimeout(wa,0),b;}};n=function(){return Date.now()};w=function(a){null!==D?setTimeout(w,0,a):(D=a,setTimeout(wa,0))};C=function(a,b){va=setTimeout(a,b)};I=function(){clearTimeout(va)};K=function(){return!1};h=Y=function(){}}else{var Z=window.performance,Qa=window.Date,
|
|
aa=window.setTimeout,xa=window.clearTimeout,ba=window.requestAnimationFrame;h=window.cancelAnimationFrame;"undefined"!==typeof console&&("function"!==typeof ba&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));n="object"===
|
|
typeof Z&&"function"===typeof Z.now?function(){return Z.now()}:function(){return Qa.now()};var M=!1,E=null,ca=-1,da=-1,p=33.33,F=-1,x=-1,N=0,ea=!1;K=function(){return n()>=N};h=function(){};Y=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):0<a?(p=Math.floor(1E3/a),ea=!0):(p=33.33,ea=!1)};var za=function(){if(null!==E){var a=n(),b=0<N-a;try{E(b,a)||(E=null)}catch(c){throw ya.postMessage(null),c;
|
|
}}},G=new MessageChannel,ya=G.port2;G.port1.onmessage=za;var Aa=function(a){if(null===E)x=F=-1,M=!1;else{M=!0;ba(function(a){xa(ca);Aa(a)});var b=function(){N=n()+p/2;za();ca=aa(b,3*p)};ca=aa(b,3*p);if(-1!==F&&.1<a-F){var c=a-F;!ea&&-1!==x&&c<p&&x<p&&(p=c<x?x:c,8.33>p&&(p=8.33));x=c}F=a;N=a+p;ya.postMessage(null)}};w=function(a){E=a;M||(M=!0,ba(function(a){Aa(a)}))};C=function(a,b){da=aa(function(){a(n())},b)};I=function(){xa(da);da=-1}}var e=null,f=null,z=null,m=3,J=!1,u=!1,B=!1,Ra=0;G={ReactCurrentDispatcher:qa,
|
|
ReactCurrentOwner:P,IsSomeRendererActing:{current:!1},assign:L};L(G,{Scheduler:{unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=m;m=a;try{return b()}finally{m=c}},unstable_next:function(a){switch(m){case 1:case 2:case 3:var b=3;break;default:b=m}var c=m;m=b;try{return a()}finally{m=c}},unstable_scheduleCallback:function(a,
|
|
b,c){var d=n();if("object"===typeof c&&null!==c){var g=c.delay;g="number"===typeof g&&0<g?d+g:d;c="number"===typeof c.timeout?c.timeout:ta(a)}else c=ta(a),g=d;c=g+c;a={callback:b,priorityLevel:a,startTime:g,expirationTime:c,next:null,previous:null};if(g>d){c=g;if(null===f)f=a.next=a.previous=a;else{b=null;var k=f;do{if(c<k.startTime){b=k;break}k=k.next}while(k!==f);null===b?b=f:b===f&&(f=a);c=b.previous;c.next=b.previous=a;a.next=b;a.previous=c}null===e&&f===a&&(B?I():B=!0,C(V,g-d))}else sa(a,c),
|
|
u||J||(u=!0,w(W));return a},unstable_cancelCallback:function(a){var b=a.next;if(null!==b){if(a===b)a===e?e=null:a===f&&(f=null);else{a===e?e=b:a===f&&(f=b);var c=a.previous;c.next=b;b.previous=c}a.next=a.previous=null}},unstable_wrapCallback:function(a){var b=m;return function(){var c=m;m=b;try{return a.apply(this,arguments)}finally{m=c}}},unstable_getCurrentPriorityLevel:function(){return m},unstable_shouldYield:function(){var a=n();A(a);return null!==z&&null!==e&&e.startTime<=a&&e.expirationTime<
|
|
z.expirationTime||K()},unstable_requestPaint:h,unstable_continueExecution:function(){u||J||(u=!0,w(W))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return e},get unstable_now(){return n},get unstable_forceFrameRate(){return Y}},SchedulerTracing:{get __interactionsRef(){return null},get __subscriberRef(){return null},unstable_clear:function(a){return a()},unstable_getCurrent:function(){return null},unstable_getThreadID:function(){return++Ra},unstable_trace:function(a,
|
|
b,c){return c()},unstable_wrap:function(a){return a},unstable_subscribe:function(a){},unstable_unsubscribe:function(a){}}});v={Children:{map:function(a,b,c){if(null==a)return a;var d=[];U(a,d,null,b,c);return d},forEach:function(a,b,c){if(null==a)return a;b=ma(null,null,b,c);T(a,Ea,b);na(b)},count:function(a){return T(a,function(){return null},null)},toArray:function(a){var b=[];U(a,b,null,function(a){return a});return b},only:function(a){if(!Q(a))throw t(Error(143));return a}},createRef:function(){return{current:null}},
|
|
Component:q,PureComponent:O,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:Ia,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:Ha,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:Ja,render:a}},lazy:function(a){return{$$typeof:Na,_ctor:a,_status:-1,_result:null}},memo:function(a,b){return{$$typeof:Ma,type:a,compare:void 0===b?null:b}},useCallback:function(a,b){return r().useCallback(a,b)},
|
|
useContext:function(a,b){return r().useContext(a,b)},useEffect:function(a,b){return r().useEffect(a,b)},useImperativeHandle:function(a,b,c){return r().useImperativeHandle(a,b,c)},useDebugValue:function(a,b){},useLayoutEffect:function(a,b){return r().useLayoutEffect(a,b)},useMemo:function(a,b){return r().useMemo(a,b)},useReducer:function(a,b,c){return r().useReducer(a,b,c)},useRef:function(a){return r().useRef(a)},useState:function(a){return r().useState(a)},Fragment:v,Profiler:Ga,StrictMode:X,Suspense:Ka,
|
|
unstable_SuspenseList:La,createElement:ja,cloneElement:function(a,b,c){if(null===a||void 0===a)throw t(Error(267),a);var d=void 0,e=L({},a.props),f=a.key,h=a.ref,l=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,l=P.current);void 0!==b.key&&(f=""+b.key);var m=void 0;a.type&&a.type.defaultProps&&(m=a.type.defaultProps);for(d in b)ka.call(b,d)&&!la.hasOwnProperty(d)&&(e[d]=void 0===b[d]&&void 0!==m?m[d]:b[d])}d=arguments.length-2;if(1===d)e.children=c;else if(1<d){m=Array(d);for(var n=0;n<d;n++)m[n]=
|
|
arguments[n+2];e.children=m}return{$$typeof:y,type:a.type,key:f,ref:h,props:e,_owner:l}},createFactory:function(a){var b=ja.bind(null,a);b.type=a;return b},isValidElement:Q,version:"16.9.0",unstable_withSuspenseConfig:function(a,b){a()},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:G};v=(X={default:v},v)||X;return v.default||v});
|