react-test-renderer 16.4.2 → 16.5.0

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 v16.4.2
1
+ /** @license React v16.5.0
2
2
  * react-test-renderer-shallow.development.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -16,20 +16,127 @@ if (process.env.NODE_ENV !== "production") {
16
16
  'use strict';
17
17
 
18
18
  var _assign = require('object-assign');
19
- var invariant = require('fbjs/lib/invariant');
20
19
  var React = require('react');
21
20
  var reactIs = require('react-is');
22
- var emptyObject = require('fbjs/lib/emptyObject');
23
- var shallowEqual = require('fbjs/lib/shallowEqual');
24
21
  var checkPropTypes = require('prop-types/checkPropTypes');
25
22
 
23
+ /**
24
+ * Use invariant() to assert state which your program assumes to be true.
25
+ *
26
+ * Provide sprintf-style format (only %s is supported) and arguments
27
+ * to provide information about what broke and what you were
28
+ * expecting.
29
+ *
30
+ * The invariant message will be stripped in production, but the invariant
31
+ * will remain to ensure logic does not differ in production.
32
+ */
33
+
34
+ var validateFormat = function () {};
35
+
36
+ {
37
+ validateFormat = function (format) {
38
+ if (format === undefined) {
39
+ throw new Error('invariant requires an error message argument');
40
+ }
41
+ };
42
+ }
43
+
44
+ function invariant(condition, format, a, b, c, d, e, f) {
45
+ validateFormat(format);
46
+
47
+ if (!condition) {
48
+ var error = void 0;
49
+ if (format === undefined) {
50
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
51
+ } else {
52
+ var args = [a, b, c, d, e, f];
53
+ var argIndex = 0;
54
+ error = new Error(format.replace(/%s/g, function () {
55
+ return args[argIndex++];
56
+ }));
57
+ error.name = 'Invariant Violation';
58
+ }
59
+
60
+ error.framesToPop = 1; // we don't care about invariant's own frame
61
+ throw error;
62
+ }
63
+ }
64
+
26
65
  // Relying on the `invariant()` implementation lets us
27
- // have preserve the format and params in the www builds.
66
+ // preserve the format and params in the www builds.
67
+
68
+ var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
28
69
 
29
70
  var describeComponentFrame = function (name, source, ownerName) {
30
- return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
71
+ var sourceInfo = '';
72
+ if (source) {
73
+ var path = source.fileName;
74
+ var fileName = path.replace(BEFORE_SLASH_RE, '');
75
+ {
76
+ // In DEV, include code for a common special case:
77
+ // prefer "folder/index.js" instead of just "index.js".
78
+ if (/^index\./.test(fileName)) {
79
+ var match = path.match(BEFORE_SLASH_RE);
80
+ if (match) {
81
+ var pathBeforeSlash = match[1];
82
+ if (pathBeforeSlash) {
83
+ var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
84
+ fileName = folderName + '/' + fileName;
85
+ }
86
+ }
87
+ }
88
+ }
89
+ sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
90
+ } else if (ownerName) {
91
+ sourceInfo = ' (created by ' + ownerName + ')';
92
+ }
93
+ return '\n in ' + (name || 'Unknown') + sourceInfo;
31
94
  };
32
95
 
96
+ /**
97
+ * Similar to invariant but only logs a warning if the condition is not met.
98
+ * This can be used to log issues in development environments in critical
99
+ * paths. Removing the logging code for production environments will keep the
100
+ * same logic and follow the same code paths.
101
+ */
102
+
103
+ var warningWithoutStack = function () {};
104
+
105
+ {
106
+ warningWithoutStack = function (condition, format) {
107
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
108
+ args[_key - 2] = arguments[_key];
109
+ }
110
+
111
+ if (format === undefined) {
112
+ throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
113
+ }
114
+ if (condition) {
115
+ return;
116
+ }
117
+ if (typeof console !== 'undefined') {
118
+ var _console;
119
+
120
+ var stringArgs = args.map(function (item) {
121
+ return '' + item;
122
+ });
123
+ (_console = console).error.apply(_console, ['Warning: ' + format].concat(stringArgs));
124
+ }
125
+ try {
126
+ // --- Welcome to debugging React ---
127
+ // This error was thrown as a convenience so that you can use this stack
128
+ // to find the callsite that caused this warning to fire.
129
+ var argIndex = 0;
130
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
131
+ return args[argIndex++];
132
+ });
133
+ throw new Error(message);
134
+ } catch (x) {}
135
+ };
136
+ }
137
+
138
+ var warningWithoutStack$1 = warningWithoutStack;
139
+
33
140
  // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
34
141
  // nor polyfill, then a plain number is used for performance.
35
142
  var hasSymbol = typeof Symbol === 'function' && Symbol.for;
@@ -43,13 +150,29 @@ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
43
150
  var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
44
151
  var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
45
152
  var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
46
- var REACT_TIMEOUT_TYPE = hasSymbol ? Symbol.for('react.timeout') : 0xead1;
153
+ var REACT_PLACEHOLDER_TYPE = hasSymbol ? Symbol.for('react.placeholder') : 0xead1;
154
+
155
+ var Resolved = 1;
156
+
157
+
47
158
 
48
- function getComponentName(fiber) {
49
- var type = fiber.type;
50
159
 
160
+ function refineResolvedThenable(thenable) {
161
+ return thenable._reactStatus === Resolved ? thenable._reactResult : null;
162
+ }
163
+
164
+ function getComponentName(type) {
165
+ if (type == null) {
166
+ // Host root, text node or just invalid type.
167
+ return null;
168
+ }
169
+ {
170
+ if (typeof type.tag === 'number') {
171
+ warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
172
+ }
173
+ }
51
174
  if (typeof type === 'function') {
52
- return type.displayName || type.name;
175
+ return type.displayName || type.name || null;
53
176
  }
54
177
  if (typeof type === 'string') {
55
178
  return type;
@@ -57,33 +180,98 @@ function getComponentName(fiber) {
57
180
  switch (type) {
58
181
  case REACT_ASYNC_MODE_TYPE:
59
182
  return 'AsyncMode';
60
- case REACT_CONTEXT_TYPE:
61
- return 'Context.Consumer';
62
183
  case REACT_FRAGMENT_TYPE:
63
- return 'ReactFragment';
184
+ return 'Fragment';
64
185
  case REACT_PORTAL_TYPE:
65
- return 'ReactPortal';
186
+ return 'Portal';
66
187
  case REACT_PROFILER_TYPE:
67
- return 'Profiler(' + fiber.pendingProps.id + ')';
68
- case REACT_PROVIDER_TYPE:
69
- return 'Context.Provider';
188
+ return 'Profiler';
70
189
  case REACT_STRICT_MODE_TYPE:
71
190
  return 'StrictMode';
72
- case REACT_TIMEOUT_TYPE:
73
- return 'Timeout';
191
+ case REACT_PLACEHOLDER_TYPE:
192
+ return 'Placeholder';
74
193
  }
75
- if (typeof type === 'object' && type !== null) {
194
+ if (typeof type === 'object') {
76
195
  switch (type.$$typeof) {
196
+ case REACT_CONTEXT_TYPE:
197
+ return 'Context.Consumer';
198
+ case REACT_PROVIDER_TYPE:
199
+ return 'Context.Provider';
77
200
  case REACT_FORWARD_REF_TYPE:
78
- var functionName = type.render.displayName || type.render.name || '';
201
+ var renderFn = type.render;
202
+ var functionName = renderFn.displayName || renderFn.name || '';
79
203
  return functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef';
80
204
  }
205
+ if (typeof type.then === 'function') {
206
+ var thenable = type;
207
+ var resolvedThenable = refineResolvedThenable(thenable);
208
+ if (resolvedThenable) {
209
+ return getComponentName(resolvedThenable);
210
+ }
211
+ }
81
212
  }
82
213
  return null;
83
214
  }
84
215
 
216
+ /*eslint-disable no-self-compare */
217
+
218
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
219
+
220
+ /**
221
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
222
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
223
+ */
224
+ function is(x, y) {
225
+ // SameValue algorithm
226
+ if (x === y) {
227
+ // Steps 1-5, 7-10
228
+ // Steps 6.b-6.e: +0 != -0
229
+ // Added the nonzero y check to make Flow happy, but it is redundant
230
+ return x !== 0 || y !== 0 || 1 / x === 1 / y;
231
+ } else {
232
+ // Step 6.a: NaN == NaN
233
+ return x !== x && y !== y;
234
+ }
235
+ }
236
+
237
+ /**
238
+ * Performs equality by iterating through keys on an object and returning false
239
+ * when any key has values which are not strictly equal between the arguments.
240
+ * Returns true when the values of all keys are strictly equal.
241
+ */
242
+ function shallowEqual(objA, objB) {
243
+ if (is(objA, objB)) {
244
+ return true;
245
+ }
246
+
247
+ if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
248
+ return false;
249
+ }
250
+
251
+ var keysA = Object.keys(objA);
252
+ var keysB = Object.keys(objB);
253
+
254
+ if (keysA.length !== keysB.length) {
255
+ return false;
256
+ }
257
+
258
+ // Test for A's keys different from B.
259
+ for (var i = 0; i < keysA.length; i++) {
260
+ if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
261
+ return false;
262
+ }
263
+ }
264
+
265
+ return true;
266
+ }
267
+
85
268
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
86
269
 
270
+ var emptyObject = {};
271
+ {
272
+ Object.freeze(emptyObject);
273
+ }
274
+
87
275
  var ReactShallowRenderer = function () {
88
276
  function ReactShallowRenderer() {
89
277
  _classCallCheck(this, ReactShallowRenderer);
@@ -142,7 +330,7 @@ var ReactShallowRenderer = function () {
142
330
 
143
331
  this._mountClassComponent(element, this._context);
144
332
  } else {
145
- this._rendered = element.type(element.props, this._context);
333
+ this._rendered = element.type.call(undefined, element.props, this._context);
146
334
  }
147
335
  }
148
336
 
@@ -363,7 +551,7 @@ function getStackAddendum() {
363
551
  if (currentlyValidatingElement) {
364
552
  var name = getDisplayName(currentlyValidatingElement);
365
553
  var owner = currentlyValidatingElement._owner;
366
- stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner));
554
+ stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
367
555
  }
368
556
  return stack;
369
557
  }
@@ -398,7 +586,7 @@ var ReactShallowRenderer$3 = ( ReactShallowRenderer$2 && ReactShallowRenderer )
398
586
 
399
587
  // TODO: decide on the top-level export form.
400
588
  // This is hacky but makes it work with both Rollup and Jest.
401
- var shallow = ReactShallowRenderer$3.default ? ReactShallowRenderer$3.default : ReactShallowRenderer$3;
589
+ var shallow = ReactShallowRenderer$3.default || ReactShallowRenderer$3;
402
590
 
403
591
  module.exports = shallow;
404
592
  })();
@@ -1,4 +1,4 @@
1
- /** @license React v16.4.2
1
+ /** @license React v16.5.0
2
2
  * react-test-renderer-shallow.production.min.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -7,19 +7,20 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
- 'use strict';var e=require("object-assign"),f=require("fbjs/lib/invariant"),l=require("react"),m=require("react-is"),n=require("fbjs/lib/emptyObject"),p=require("fbjs/lib/shallowEqual"),q=require("prop-types/checkPropTypes");
11
- function r(d){for(var a=arguments.length-1,b="https://reactjs.org/docs/error-decoder.html?invariant="+d,c=0;c<a;c++)b+="&args[]="+encodeURIComponent(arguments[c+1]);f(!1,"Minified React error #"+d+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",b)}
12
- var t="function"===typeof Symbol&&Symbol.for,u=t?Symbol.for("react.portal"):60106,w=t?Symbol.for("react.fragment"):60107,x=t?Symbol.for("react.strict_mode"):60108,y=t?Symbol.for("react.profiler"):60114,z=t?Symbol.for("react.provider"):60109,A=t?Symbol.for("react.context"):60110,B=t?Symbol.for("react.async_mode"):60111,C=t?Symbol.for("react.forward_ref"):60112,D=t?Symbol.for("react.timeout"):60113;
13
- function E(d){var a=d.type;if("function"===typeof a)return a.displayName||a.name;if("string"===typeof a)return a;switch(a){case B:return"AsyncMode";case A:return"Context.Consumer";case w:return"ReactFragment";case u:return"ReactPortal";case y:return"Profiler("+d.pendingProps.id+")";case z:return"Context.Provider";case x:return"StrictMode";case D:return"Timeout"}if("object"===typeof a&&null!==a)switch(a.$$typeof){case C:return d=a.render.displayName||a.render.name||"",""!==d?"ForwardRef("+d+")":"ForwardRef"}return null}
14
- function F(d,a){if(!(d instanceof a))throw new TypeError("Cannot call a class as a function");}
15
- var J=function(){function d(){F(this,d);this._rendered=this._newState=this._instance=this._element=this._context=null;this._forcedUpdate=this._rendering=!1;this._updater=new G(this)}d.prototype.getMountedInstance=function(){return this._instance};d.prototype.getRenderOutput=function(){return this._rendered};d.prototype.render=function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:n;l.isValidElement(a)?void 0:r("12","function"===typeof a?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":
16
- "");"string"===typeof a.type?r("13",a.type):void 0;m.isForwardRef(a)||"function"===typeof a.type?void 0:r("249",Array.isArray(a.type)?"array":null===a.type?"null":typeof a.type);if(!this._rendering){this._rendering=!0;this._element=a;var c=a.type.contextTypes;if(c){var d={},g;for(g in c)d[g]=b[g];b=d}else b=n;this._context=b;this._instance?this._updateClassComponent(a,this._context):m.isForwardRef(a)?this._rendered=a.type.render(a.props,a.ref):(b=a.type,b.prototype&&b.prototype.isReactComponent?(this._instance=
17
- new a.type(a.props,this._context,this._updater),this._updateStateFromStaticLifecycle(a.props),a.type.hasOwnProperty("contextTypes")&&(H=a,b=a.type,c=(c=this._instance)&&c.constructor,q(a.type.contextTypes,this._context,"context",b.displayName||c&&c.displayName||b.name||c&&c.name||null,I),H=null),this._mountClassComponent(a,this._context)):this._rendered=a.type(a.props,this._context));this._rendering=!1;this._updater._invokeCallbacks();return this.getRenderOutput()}};d.prototype.unmount=function(){this._instance&&
18
- "function"===typeof this._instance.componentWillUnmount&&this._instance.componentWillUnmount();this._instance=this._rendered=this._newState=this._element=this._context=null};d.prototype._mountClassComponent=function(a,b){this._instance.context=b;this._instance.props=a.props;this._instance.state=this._instance.state||null;this._instance.updater=this._updater;if("function"===typeof this._instance.UNSAFE_componentWillMount||"function"===typeof this._instance.componentWillMount)b=this._newState,"function"!==
19
- typeof a.type.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillMount&&this._instance.componentWillMount(),"function"===typeof this._instance.UNSAFE_componentWillMount&&this._instance.UNSAFE_componentWillMount()),b!==this._newState&&(this._instance.state=this._newState||n);this._rendered=this._instance.render()};d.prototype._updateClassComponent=function(a,b){var c=a.props,d=a.type,g=this._instance.state||n,v=this._instance.props;
20
- v!==c&&"function"!==typeof a.type.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillReceiveProps&&this._instance.componentWillReceiveProps(c,b),"function"===typeof this._instance.UNSAFE_componentWillReceiveProps&&this._instance.UNSAFE_componentWillReceiveProps(c,b));this._updateStateFromStaticLifecycle(c);var h=this._newState||g,k=!0;this._forcedUpdate?(k=!0,this._forcedUpdate=!1):"function"===typeof this._instance.shouldComponentUpdate?
21
- k=!!this._instance.shouldComponentUpdate(c,h,b):d.prototype&&d.prototype.isPureReactComponent&&(k=!p(v,c)||!p(g,h));k&&"function"!==typeof a.type.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillUpdate&&this._instance.componentWillUpdate(c,h,b),"function"===typeof this._instance.UNSAFE_componentWillUpdate&&this._instance.UNSAFE_componentWillUpdate(c,h,b));this._instance.context=b;this._instance.props=c;this._instance.state=
22
- h;k&&(this._rendered=this._instance.render())};d.prototype._updateStateFromStaticLifecycle=function(a){var b=this._element.type;if("function"===typeof b.getDerivedStateFromProps){var c=this._newState||this._instance.state;a=b.getDerivedStateFromProps.call(null,a,c);null!=a&&(c=e({},c,a),this._instance.state=this._newState=c)}};return d}();J.createRenderer=function(){return new J};
23
- var G=function(){function d(a){F(this,d);this._renderer=a;this._callbacks=[]}d.prototype._enqueueCallback=function(a,b){"function"===typeof a&&b&&this._callbacks.push({callback:a,publicInstance:b})};d.prototype._invokeCallbacks=function(){var a=this._callbacks;this._callbacks=[];a.forEach(function(a){a.callback.call(a.publicInstance)})};d.prototype.isMounted=function(){return!!this._renderer._element};d.prototype.enqueueForceUpdate=function(a,b){this._enqueueCallback(b,a);this._renderer._forcedUpdate=
24
- !0;this._renderer.render(this._renderer._element,this._renderer._context)};d.prototype.enqueueReplaceState=function(a,b,c){this._enqueueCallback(c,a);this._renderer._newState=b;this._renderer.render(this._renderer._element,this._renderer._context)};d.prototype.enqueueSetState=function(a,b,c){this._enqueueCallback(c,a);c=this._renderer._newState||a.state;"function"===typeof b&&(b=b.call(a,c,a.props));null!==b&&void 0!==b&&(this._renderer._newState=e({},c,b),this._renderer.render(this._renderer._element,
25
- this._renderer._context))};return d}(),H=null;function I(){var d="";if(H){var a=null==H?"#empty":"string"===typeof H||"number"===typeof H?"#text":"string"===typeof H.type?H.type:H.type.displayName||H.type.name||"Unknown",b=H._owner,c=H._source;b=b&&E(b);a="\n in "+(a||"Unknown")+(c?" (at "+c.fileName.replace(/^.*[\\\/]/,"")+":"+c.lineNumber+")":b?" (created by "+b+")":"");d+=a}return d}var K={default:J},L=K&&J||K;module.exports=L.default?L.default:L;
10
+ 'use strict';var e=require("object-assign"),g=require("react"),n=require("react-is"),p=require("prop-types/checkPropTypes");function q(a,b,c,d,f,h,m,k){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[c,d,f,h,m,k],D=0;a=Error(b.replace(/%s/g,function(){return l[D++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}
11
+ function r(a){for(var b=arguments.length-1,c="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=0;d<b;d++)c+="&args[]="+encodeURIComponent(arguments[d+1]);q(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",c)}
12
+ var t=/^(.*)[\\\/]/,u="function"===typeof Symbol&&Symbol.for,v=u?Symbol.for("react.portal"):60106,w=u?Symbol.for("react.fragment"):60107,x=u?Symbol.for("react.strict_mode"):60108,y=u?Symbol.for("react.profiler"):60114,z=u?Symbol.for("react.provider"):60109,A=u?Symbol.for("react.context"):60110,B=u?Symbol.for("react.async_mode"):60111,C=u?Symbol.for("react.forward_ref"):60112,E=u?Symbol.for("react.placeholder"):60113;
13
+ function F(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case B:return"AsyncMode";case w:return"Fragment";case v:return"Portal";case y:return"Profiler";case x:return"StrictMode";case E:return"Placeholder"}if("object"===typeof a){switch(a.$$typeof){case A:return"Context.Consumer";case z:return"Context.Provider";case C:return a=a.render,a=a.displayName||a.name||"",""!==a?"ForwardRef("+a+")":"ForwardRef"}if("function"===
14
+ typeof a.then&&(a=1===a._reactStatus?a._reactResult:null))return F(a)}return null}var G=Object.prototype.hasOwnProperty;function H(a,b){return a===b?0!==a||0!==b||1/a===1/b:a!==a&&b!==b}function I(a,b){if(H(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!G.call(b,c[d])||!H(a[c[d]],b[c[d]]))return!1;return!0}
15
+ function J(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");}
16
+ var K={},O=function(){function a(){J(this,a);this._rendered=this._newState=this._instance=this._element=this._context=null;this._forcedUpdate=this._rendering=!1;this._updater=new L(this)}a.prototype.getMountedInstance=function(){return this._instance};a.prototype.getRenderOutput=function(){return this._rendered};a.prototype.render=function(b){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:K;g.isValidElement(b)?void 0:r("12","function"===typeof b?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":
17
+ "");"string"===typeof b.type?r("13",b.type):void 0;n.isForwardRef(b)||"function"===typeof b.type?void 0:r("249",Array.isArray(b.type)?"array":null===b.type?"null":typeof b.type);if(!this._rendering){this._rendering=!0;this._element=b;var d=b.type.contextTypes;if(d){var f={},h;for(h in d)f[h]=a[h];a=f}else a=K;this._context=a;this._instance?this._updateClassComponent(b,this._context):n.isForwardRef(b)?this._rendered=b.type.render(b.props,b.ref):(a=b.type,a.prototype&&a.prototype.isReactComponent?(this._instance=
18
+ new b.type(b.props,this._context,this._updater),this._updateStateFromStaticLifecycle(b.props),b.type.hasOwnProperty("contextTypes")&&(M=b,a=b.type,d=(d=this._instance)&&d.constructor,p(b.type.contextTypes,this._context,"context",a.displayName||d&&d.displayName||a.name||d&&d.name||null,N),M=null),this._mountClassComponent(b,this._context)):this._rendered=b.type.call(void 0,b.props,this._context));this._rendering=!1;this._updater._invokeCallbacks();return this.getRenderOutput()}};a.prototype.unmount=
19
+ function(){this._instance&&"function"===typeof this._instance.componentWillUnmount&&this._instance.componentWillUnmount();this._instance=this._rendered=this._newState=this._element=this._context=null};a.prototype._mountClassComponent=function(a,c){this._instance.context=c;this._instance.props=a.props;this._instance.state=this._instance.state||null;this._instance.updater=this._updater;if("function"===typeof this._instance.UNSAFE_componentWillMount||"function"===typeof this._instance.componentWillMount)c=
20
+ this._newState,"function"!==typeof a.type.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillMount&&this._instance.componentWillMount(),"function"===typeof this._instance.UNSAFE_componentWillMount&&this._instance.UNSAFE_componentWillMount()),c!==this._newState&&(this._instance.state=this._newState||K);this._rendered=this._instance.render()};a.prototype._updateClassComponent=function(a,c){var b=a.props,f=a.type,h=this._instance.state||
21
+ K,m=this._instance.props;m!==b&&"function"!==typeof a.type.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillReceiveProps&&this._instance.componentWillReceiveProps(b,c),"function"===typeof this._instance.UNSAFE_componentWillReceiveProps&&this._instance.UNSAFE_componentWillReceiveProps(b,c));this._updateStateFromStaticLifecycle(b);var k=this._newState||h,l=!0;this._forcedUpdate?(l=!0,this._forcedUpdate=!1):"function"===
22
+ typeof this._instance.shouldComponentUpdate?l=!!this._instance.shouldComponentUpdate(b,k,c):f.prototype&&f.prototype.isPureReactComponent&&(l=!I(m,b)||!I(h,k));l&&"function"!==typeof a.type.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillUpdate&&this._instance.componentWillUpdate(b,k,c),"function"===typeof this._instance.UNSAFE_componentWillUpdate&&this._instance.UNSAFE_componentWillUpdate(b,k,c));this._instance.context=
23
+ c;this._instance.props=b;this._instance.state=k;l&&(this._rendered=this._instance.render())};a.prototype._updateStateFromStaticLifecycle=function(a){var b=this._element.type;if("function"===typeof b.getDerivedStateFromProps){var d=this._newState||this._instance.state;a=b.getDerivedStateFromProps.call(null,a,d);null!=a&&(d=e({},d,a),this._instance.state=this._newState=d)}};return a}();O.createRenderer=function(){return new O};
24
+ var L=function(){function a(b){J(this,a);this._renderer=b;this._callbacks=[]}a.prototype._enqueueCallback=function(a,c){"function"===typeof a&&c&&this._callbacks.push({callback:a,publicInstance:c})};a.prototype._invokeCallbacks=function(){var a=this._callbacks;this._callbacks=[];a.forEach(function(a){a.callback.call(a.publicInstance)})};a.prototype.isMounted=function(){return!!this._renderer._element};a.prototype.enqueueForceUpdate=function(a,c){this._enqueueCallback(c,a);this._renderer._forcedUpdate=
25
+ !0;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueReplaceState=function(a,c,d){this._enqueueCallback(d,a);this._renderer._newState=c;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueSetState=function(a,c,d){this._enqueueCallback(d,a);d=this._renderer._newState||a.state;"function"===typeof c&&(c=c.call(a,d,a.props));null!==c&&void 0!==c&&(this._renderer._newState=e({},d,c),this._renderer.render(this._renderer._element,
26
+ this._renderer._context))};return a}(),M=null;function N(){var a="";if(M){var b=null==M?"#empty":"string"===typeof M||"number"===typeof M?"#text":"string"===typeof M.type?M.type:M.type.displayName||M.type.name||"Unknown",c=M._owner,d=M._source;c=c&&F(c.type);var f="";d?f=" (at "+d.fileName.replace(t,"")+":"+d.lineNumber+")":c&&(f=" (created by "+c+")");a+="\n in "+(b||"Unknown")+f}return a}var P={default:O},Q=P&&O||P;module.exports=Q.default||Q;