react-famewall 1.0.8 → 1.0.9

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,6 +1,2060 @@
1
- import React from 'react';
1
+ import checkPropTypes from 'prop-types/checkPropTypes';
2
2
  import IframeResizer from 'iframe-resizer-react';
3
3
 
4
+ function createCommonjsModule(fn, module) {
5
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
6
+ }
7
+
8
+ /*
9
+ object-assign
10
+ (c) Sindre Sorhus
11
+ @license MIT
12
+ */
13
+ /* eslint-disable no-unused-vars */
14
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
15
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
16
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
17
+
18
+ function toObject(val) {
19
+ if (val === null || val === undefined) {
20
+ throw new TypeError('Object.assign cannot be called with null or undefined');
21
+ }
22
+
23
+ return Object(val);
24
+ }
25
+
26
+ function shouldUseNative() {
27
+ try {
28
+ if (!Object.assign) {
29
+ return false;
30
+ }
31
+
32
+ // Detect buggy property enumeration order in older V8 versions.
33
+
34
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
35
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
36
+ test1[5] = 'de';
37
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
38
+ return false;
39
+ }
40
+
41
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
42
+ var test2 = {};
43
+ for (var i = 0; i < 10; i++) {
44
+ test2['_' + String.fromCharCode(i)] = i;
45
+ }
46
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
47
+ return test2[n];
48
+ });
49
+ if (order2.join('') !== '0123456789') {
50
+ return false;
51
+ }
52
+
53
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
54
+ var test3 = {};
55
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
56
+ test3[letter] = letter;
57
+ });
58
+ if (Object.keys(Object.assign({}, test3)).join('') !==
59
+ 'abcdefghijklmnopqrst') {
60
+ return false;
61
+ }
62
+
63
+ return true;
64
+ } catch (err) {
65
+ // We don't expect any of the above to throw, but better to be safe.
66
+ return false;
67
+ }
68
+ }
69
+
70
+ var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
71
+ var from;
72
+ var to = toObject(target);
73
+ var symbols;
74
+
75
+ for (var s = 1; s < arguments.length; s++) {
76
+ from = Object(arguments[s]);
77
+
78
+ for (var key in from) {
79
+ if (hasOwnProperty.call(from, key)) {
80
+ to[key] = from[key];
81
+ }
82
+ }
83
+
84
+ if (getOwnPropertySymbols) {
85
+ symbols = getOwnPropertySymbols(from);
86
+ for (var i = 0; i < symbols.length; i++) {
87
+ if (propIsEnumerable.call(from, symbols[i])) {
88
+ to[symbols[i]] = from[symbols[i]];
89
+ }
90
+ }
91
+ }
92
+ }
93
+
94
+ return to;
95
+ };
96
+
97
+ var n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.forward_ref"):60112,y=n?Symbol.for("react.suspense"):60113,z=n?Symbol.for("react.memo"):60115,A=n?Symbol.for("react.lazy"):
98
+ 60116,B="function"===typeof Symbol&&Symbol.iterator;function C(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."}
99
+ var D={isMounted:function(){return !1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E={};function F(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D;}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(C(85));this.updater.enqueueSetState(this,a,b,"setState");};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate");};
100
+ function G(){}G.prototype=F.prototype;function H(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D;}var I=H.prototype=new G;I.constructor=H;objectAssign(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};
101
+ function M(a,b,c){var e,d={},g=null,k=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),b)K.call(b,e)&&!L.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),m=0;m<f;m++)h[m]=arguments[m+2];d.children=h;}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return {$$typeof:p,type:a,key:g,ref:k,props:d,_owner:J.current}}
102
+ function N(a,b){return {$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return "object"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={"=":"=0",":":"=2"};return "$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g,Q=[];function R(a,b,c,e){if(Q.length){var d=Q.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return {result:a,keyPrefix:b,func:c,context:e,count:0}}
103
+ function S(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q.length&&Q.push(a);}
104
+ function T(a,b,c,e){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0;}}if(g)return c(e,a,""===b?"."+U(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+U(d,k);g+=T(d,f,c,e);}else if(null===a||"object"!==typeof a?f=null:(f=B&&a[B]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),k=
105
+ 0;!(d=a.next()).done;)d=d.value,f=b+U(d,k++),g+=T(d,f,c,e);else if("object"===d)throw c=""+a,Error(C(31,"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,""));return g}function V(a,b,c){return null==a?0:T(a,"",b,c)}function U(a,b){return "object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function W(a,b){a.func.call(a.context,b,a.count++);}
106
+ function aa(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?X(a,e,c,function(a){return a}):null!=a&&(O(a)&&(a=N(a,d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+c)),e.push(a));}function X(a,b,c,e,d){var g="";null!=c&&(g=(""+c).replace(P,"$&/")+"/");b=R(b,g,e,d);V(a,aa,b);S(b);}var Y={current:null};function Z(){var a=Y.current;if(null===a)throw Error(C(321));return a}
107
+ var ba={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J,IsSomeRendererActing:{current:!1},assign:objectAssign};var Children={map:function(a,b,c){if(null==a)return a;var e=[];X(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=R(null,null,b,c);V(a,W,b);S(b);},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];X(a,b,null,function(a){return a});return b},only:function(a){if(!O(a))throw Error(C(143));return a}};
108
+ var Component=F;var Fragment=r;var Profiler=u;var PureComponent=H;var StrictMode=t;var Suspense=y;var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba;
109
+ var cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(C(267,a));var e=objectAssign({},a.props),d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=J.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)K.call(b,h)&&!L.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h]);}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f=Array(h);for(var m=0;m<h;m++)f[m]=arguments[m+2];e.children=f;}return {$$typeof:p,type:a.type,
110
+ key:d,ref:g,props:e,_owner:k}};var createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a};var createElement=M;var createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};var createRef=function(){return {current:null}};var forwardRef=function(a){return {$$typeof:x,render:a}};var isValidElement=O;
111
+ var lazy=function(a){return {$$typeof:A,_ctor:a,_status:-1,_result:null}};var memo=function(a,b){return {$$typeof:z,type:a,compare:void 0===b?null:b}};var useCallback=function(a,b){return Z().useCallback(a,b)};var useContext=function(a,b){return Z().useContext(a,b)};var useDebugValue=function(){};var useEffect=function(a,b){return Z().useEffect(a,b)};var useImperativeHandle=function(a,b,c){return Z().useImperativeHandle(a,b,c)};
112
+ var useLayoutEffect=function(a,b){return Z().useLayoutEffect(a,b)};var useMemo=function(a,b){return Z().useMemo(a,b)};var useReducer=function(a,b,c){return Z().useReducer(a,b,c)};var useRef=function(a){return Z().useRef(a)};var useState=function(a){return Z().useState(a)};var version="16.14.0";
113
+
114
+ var react_production_min = {
115
+ Children: Children,
116
+ Component: Component,
117
+ Fragment: Fragment,
118
+ Profiler: Profiler,
119
+ PureComponent: PureComponent,
120
+ StrictMode: StrictMode,
121
+ Suspense: Suspense,
122
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
123
+ cloneElement: cloneElement,
124
+ createContext: createContext,
125
+ createElement: createElement,
126
+ createFactory: createFactory,
127
+ createRef: createRef,
128
+ forwardRef: forwardRef,
129
+ isValidElement: isValidElement,
130
+ lazy: lazy,
131
+ memo: memo,
132
+ useCallback: useCallback,
133
+ useContext: useContext,
134
+ useDebugValue: useDebugValue,
135
+ useEffect: useEffect,
136
+ useImperativeHandle: useImperativeHandle,
137
+ useLayoutEffect: useLayoutEffect,
138
+ useMemo: useMemo,
139
+ useReducer: useReducer,
140
+ useRef: useRef,
141
+ useState: useState,
142
+ version: version
143
+ };
144
+
145
+ var react_development = createCommonjsModule(function (module, exports) {
146
+
147
+
148
+
149
+ if (process.env.NODE_ENV !== "production") {
150
+ (function() {
151
+
152
+ var _assign = objectAssign;
153
+ var checkPropTypes$1 = checkPropTypes;
154
+
155
+ var ReactVersion = '16.14.0';
156
+
157
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
158
+ // nor polyfill, then a plain number is used for performance.
159
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
160
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
161
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
162
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
163
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
164
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
165
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
166
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
167
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
168
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
169
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
170
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
171
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
172
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
173
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
174
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
175
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
176
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
177
+ var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
178
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
179
+ function getIteratorFn(maybeIterable) {
180
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
181
+ return null;
182
+ }
183
+
184
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
185
+
186
+ if (typeof maybeIterator === 'function') {
187
+ return maybeIterator;
188
+ }
189
+
190
+ return null;
191
+ }
192
+
193
+ /**
194
+ * Keeps track of the current dispatcher.
195
+ */
196
+ var ReactCurrentDispatcher = {
197
+ /**
198
+ * @internal
199
+ * @type {ReactComponent}
200
+ */
201
+ current: null
202
+ };
203
+
204
+ /**
205
+ * Keeps track of the current batch's configuration such as how long an update
206
+ * should suspend for if it needs to.
207
+ */
208
+ var ReactCurrentBatchConfig = {
209
+ suspense: null
210
+ };
211
+
212
+ /**
213
+ * Keeps track of the current owner.
214
+ *
215
+ * The current owner is the component who should own any components that are
216
+ * currently being constructed.
217
+ */
218
+ var ReactCurrentOwner = {
219
+ /**
220
+ * @internal
221
+ * @type {ReactComponent}
222
+ */
223
+ current: null
224
+ };
225
+
226
+ var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
227
+ function describeComponentFrame (name, source, ownerName) {
228
+ var sourceInfo = '';
229
+
230
+ if (source) {
231
+ var path = source.fileName;
232
+ var fileName = path.replace(BEFORE_SLASH_RE, '');
233
+
234
+ {
235
+ // In DEV, include code for a common special case:
236
+ // prefer "folder/index.js" instead of just "index.js".
237
+ if (/^index\./.test(fileName)) {
238
+ var match = path.match(BEFORE_SLASH_RE);
239
+
240
+ if (match) {
241
+ var pathBeforeSlash = match[1];
242
+
243
+ if (pathBeforeSlash) {
244
+ var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
245
+ fileName = folderName + '/' + fileName;
246
+ }
247
+ }
248
+ }
249
+ }
250
+
251
+ sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
252
+ } else if (ownerName) {
253
+ sourceInfo = ' (created by ' + ownerName + ')';
254
+ }
255
+
256
+ return '\n in ' + (name || 'Unknown') + sourceInfo;
257
+ }
258
+
259
+ var Resolved = 1;
260
+ function refineResolvedLazyComponent(lazyComponent) {
261
+ return lazyComponent._status === Resolved ? lazyComponent._result : null;
262
+ }
263
+
264
+ function getWrappedName(outerType, innerType, wrapperName) {
265
+ var functionName = innerType.displayName || innerType.name || '';
266
+ return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
267
+ }
268
+
269
+ function getComponentName(type) {
270
+ if (type == null) {
271
+ // Host root, text node or just invalid type.
272
+ return null;
273
+ }
274
+
275
+ {
276
+ if (typeof type.tag === 'number') {
277
+ error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
278
+ }
279
+ }
280
+
281
+ if (typeof type === 'function') {
282
+ return type.displayName || type.name || null;
283
+ }
284
+
285
+ if (typeof type === 'string') {
286
+ return type;
287
+ }
288
+
289
+ switch (type) {
290
+ case REACT_FRAGMENT_TYPE:
291
+ return 'Fragment';
292
+
293
+ case REACT_PORTAL_TYPE:
294
+ return 'Portal';
295
+
296
+ case REACT_PROFILER_TYPE:
297
+ return "Profiler";
298
+
299
+ case REACT_STRICT_MODE_TYPE:
300
+ return 'StrictMode';
301
+
302
+ case REACT_SUSPENSE_TYPE:
303
+ return 'Suspense';
304
+
305
+ case REACT_SUSPENSE_LIST_TYPE:
306
+ return 'SuspenseList';
307
+ }
308
+
309
+ if (typeof type === 'object') {
310
+ switch (type.$$typeof) {
311
+ case REACT_CONTEXT_TYPE:
312
+ return 'Context.Consumer';
313
+
314
+ case REACT_PROVIDER_TYPE:
315
+ return 'Context.Provider';
316
+
317
+ case REACT_FORWARD_REF_TYPE:
318
+ return getWrappedName(type, type.render, 'ForwardRef');
319
+
320
+ case REACT_MEMO_TYPE:
321
+ return getComponentName(type.type);
322
+
323
+ case REACT_BLOCK_TYPE:
324
+ return getComponentName(type.render);
325
+
326
+ case REACT_LAZY_TYPE:
327
+ {
328
+ var thenable = type;
329
+ var resolvedThenable = refineResolvedLazyComponent(thenable);
330
+
331
+ if (resolvedThenable) {
332
+ return getComponentName(resolvedThenable);
333
+ }
334
+
335
+ break;
336
+ }
337
+ }
338
+ }
339
+
340
+ return null;
341
+ }
342
+
343
+ var ReactDebugCurrentFrame = {};
344
+ var currentlyValidatingElement = null;
345
+ function setCurrentlyValidatingElement(element) {
346
+ {
347
+ currentlyValidatingElement = element;
348
+ }
349
+ }
350
+
351
+ {
352
+ // Stack implementation injected by the current renderer.
353
+ ReactDebugCurrentFrame.getCurrentStack = null;
354
+
355
+ ReactDebugCurrentFrame.getStackAddendum = function () {
356
+ var stack = ''; // Add an extra top frame while an element is being validated
357
+
358
+ if (currentlyValidatingElement) {
359
+ var name = getComponentName(currentlyValidatingElement.type);
360
+ var owner = currentlyValidatingElement._owner;
361
+ stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
362
+ } // Delegate to the injected renderer-specific implementation
363
+
364
+
365
+ var impl = ReactDebugCurrentFrame.getCurrentStack;
366
+
367
+ if (impl) {
368
+ stack += impl() || '';
369
+ }
370
+
371
+ return stack;
372
+ };
373
+ }
374
+
375
+ /**
376
+ * Used by act() to track whether you're inside an act() scope.
377
+ */
378
+ var IsSomeRendererActing = {
379
+ current: false
380
+ };
381
+
382
+ var ReactSharedInternals = {
383
+ ReactCurrentDispatcher: ReactCurrentDispatcher,
384
+ ReactCurrentBatchConfig: ReactCurrentBatchConfig,
385
+ ReactCurrentOwner: ReactCurrentOwner,
386
+ IsSomeRendererActing: IsSomeRendererActing,
387
+ // Used by renderers to avoid bundling object-assign twice in UMD bundles:
388
+ assign: _assign
389
+ };
390
+
391
+ {
392
+ _assign(ReactSharedInternals, {
393
+ // These should not be included in production.
394
+ ReactDebugCurrentFrame: ReactDebugCurrentFrame,
395
+ // Shim for React DOM 16.0.0 which still destructured (but not used) this.
396
+ // TODO: remove in React 17.0.
397
+ ReactComponentTreeHook: {}
398
+ });
399
+ }
400
+
401
+ // by calls to these methods by a Babel plugin.
402
+ //
403
+ // In PROD (or in packages without access to React internals),
404
+ // they are left as they are instead.
405
+
406
+ function warn(format) {
407
+ {
408
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
409
+ args[_key - 1] = arguments[_key];
410
+ }
411
+
412
+ printWarning('warn', format, args);
413
+ }
414
+ }
415
+ function error(format) {
416
+ {
417
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
418
+ args[_key2 - 1] = arguments[_key2];
419
+ }
420
+
421
+ printWarning('error', format, args);
422
+ }
423
+ }
424
+
425
+ function printWarning(level, format, args) {
426
+ // When changing this logic, you might want to also
427
+ // update consoleWithStackDev.www.js as well.
428
+ {
429
+ var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
430
+
431
+ if (!hasExistingStack) {
432
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
433
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
434
+
435
+ if (stack !== '') {
436
+ format += '%s';
437
+ args = args.concat([stack]);
438
+ }
439
+ }
440
+
441
+ var argsWithFormat = args.map(function (item) {
442
+ return '' + item;
443
+ }); // Careful: RN currently depends on this prefix
444
+
445
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
446
+ // breaks IE9: https://github.com/facebook/react/issues/13610
447
+ // eslint-disable-next-line react-internal/no-production-logging
448
+
449
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
450
+
451
+ try {
452
+ // --- Welcome to debugging React ---
453
+ // This error was thrown as a convenience so that you can use this stack
454
+ // to find the callsite that caused this warning to fire.
455
+ var argIndex = 0;
456
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
457
+ return args[argIndex++];
458
+ });
459
+ throw new Error(message);
460
+ } catch (x) {}
461
+ }
462
+ }
463
+
464
+ var didWarnStateUpdateForUnmountedComponent = {};
465
+
466
+ function warnNoop(publicInstance, callerName) {
467
+ {
468
+ var _constructor = publicInstance.constructor;
469
+ var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
470
+ var warningKey = componentName + "." + callerName;
471
+
472
+ if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
473
+ return;
474
+ }
475
+
476
+ error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
477
+
478
+ didWarnStateUpdateForUnmountedComponent[warningKey] = true;
479
+ }
480
+ }
481
+ /**
482
+ * This is the abstract API for an update queue.
483
+ */
484
+
485
+
486
+ var ReactNoopUpdateQueue = {
487
+ /**
488
+ * Checks whether or not this composite component is mounted.
489
+ * @param {ReactClass} publicInstance The instance we want to test.
490
+ * @return {boolean} True if mounted, false otherwise.
491
+ * @protected
492
+ * @final
493
+ */
494
+ isMounted: function (publicInstance) {
495
+ return false;
496
+ },
497
+
498
+ /**
499
+ * Forces an update. This should only be invoked when it is known with
500
+ * certainty that we are **not** in a DOM transaction.
501
+ *
502
+ * You may want to call this when you know that some deeper aspect of the
503
+ * component's state has changed but `setState` was not called.
504
+ *
505
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
506
+ * `componentWillUpdate` and `componentDidUpdate`.
507
+ *
508
+ * @param {ReactClass} publicInstance The instance that should rerender.
509
+ * @param {?function} callback Called after component is updated.
510
+ * @param {?string} callerName name of the calling function in the public API.
511
+ * @internal
512
+ */
513
+ enqueueForceUpdate: function (publicInstance, callback, callerName) {
514
+ warnNoop(publicInstance, 'forceUpdate');
515
+ },
516
+
517
+ /**
518
+ * Replaces all of the state. Always use this or `setState` to mutate state.
519
+ * You should treat `this.state` as immutable.
520
+ *
521
+ * There is no guarantee that `this.state` will be immediately updated, so
522
+ * accessing `this.state` after calling this method may return the old value.
523
+ *
524
+ * @param {ReactClass} publicInstance The instance that should rerender.
525
+ * @param {object} completeState Next state.
526
+ * @param {?function} callback Called after component is updated.
527
+ * @param {?string} callerName name of the calling function in the public API.
528
+ * @internal
529
+ */
530
+ enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
531
+ warnNoop(publicInstance, 'replaceState');
532
+ },
533
+
534
+ /**
535
+ * Sets a subset of the state. This only exists because _pendingState is
536
+ * internal. This provides a merging strategy that is not available to deep
537
+ * properties which is confusing. TODO: Expose pendingState or don't use it
538
+ * during the merge.
539
+ *
540
+ * @param {ReactClass} publicInstance The instance that should rerender.
541
+ * @param {object} partialState Next partial state to be merged with state.
542
+ * @param {?function} callback Called after component is updated.
543
+ * @param {?string} Name of the calling function in the public API.
544
+ * @internal
545
+ */
546
+ enqueueSetState: function (publicInstance, partialState, callback, callerName) {
547
+ warnNoop(publicInstance, 'setState');
548
+ }
549
+ };
550
+
551
+ var emptyObject = {};
552
+
553
+ {
554
+ Object.freeze(emptyObject);
555
+ }
556
+ /**
557
+ * Base class helpers for the updating state of a component.
558
+ */
559
+
560
+
561
+ function Component(props, context, updater) {
562
+ this.props = props;
563
+ this.context = context; // If a component has string refs, we will assign a different object later.
564
+
565
+ this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
566
+ // renderer.
567
+
568
+ this.updater = updater || ReactNoopUpdateQueue;
569
+ }
570
+
571
+ Component.prototype.isReactComponent = {};
572
+ /**
573
+ * Sets a subset of the state. Always use this to mutate
574
+ * state. You should treat `this.state` as immutable.
575
+ *
576
+ * There is no guarantee that `this.state` will be immediately updated, so
577
+ * accessing `this.state` after calling this method may return the old value.
578
+ *
579
+ * There is no guarantee that calls to `setState` will run synchronously,
580
+ * as they may eventually be batched together. You can provide an optional
581
+ * callback that will be executed when the call to setState is actually
582
+ * completed.
583
+ *
584
+ * When a function is provided to setState, it will be called at some point in
585
+ * the future (not synchronously). It will be called with the up to date
586
+ * component arguments (state, props, context). These values can be different
587
+ * from this.* because your function may be called after receiveProps but before
588
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
589
+ * assigned to this.
590
+ *
591
+ * @param {object|function} partialState Next partial state or function to
592
+ * produce next partial state to be merged with current state.
593
+ * @param {?function} callback Called after state is updated.
594
+ * @final
595
+ * @protected
596
+ */
597
+
598
+ Component.prototype.setState = function (partialState, callback) {
599
+ if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
600
+ {
601
+ throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." );
602
+ }
603
+ }
604
+
605
+ this.updater.enqueueSetState(this, partialState, callback, 'setState');
606
+ };
607
+ /**
608
+ * Forces an update. This should only be invoked when it is known with
609
+ * certainty that we are **not** in a DOM transaction.
610
+ *
611
+ * You may want to call this when you know that some deeper aspect of the
612
+ * component's state has changed but `setState` was not called.
613
+ *
614
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
615
+ * `componentWillUpdate` and `componentDidUpdate`.
616
+ *
617
+ * @param {?function} callback Called after update is complete.
618
+ * @final
619
+ * @protected
620
+ */
621
+
622
+
623
+ Component.prototype.forceUpdate = function (callback) {
624
+ this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
625
+ };
626
+ /**
627
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
628
+ * we would like to deprecate them, we're not going to move them over to this
629
+ * modern base class. Instead, we define a getter that warns if it's accessed.
630
+ */
631
+
632
+
633
+ {
634
+ var deprecatedAPIs = {
635
+ isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
636
+ replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
637
+ };
638
+
639
+ var defineDeprecationWarning = function (methodName, info) {
640
+ Object.defineProperty(Component.prototype, methodName, {
641
+ get: function () {
642
+ warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
643
+
644
+ return undefined;
645
+ }
646
+ });
647
+ };
648
+
649
+ for (var fnName in deprecatedAPIs) {
650
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
651
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
652
+ }
653
+ }
654
+ }
655
+
656
+ function ComponentDummy() {}
657
+
658
+ ComponentDummy.prototype = Component.prototype;
659
+ /**
660
+ * Convenience component with default shallow equality check for sCU.
661
+ */
662
+
663
+ function PureComponent(props, context, updater) {
664
+ this.props = props;
665
+ this.context = context; // If a component has string refs, we will assign a different object later.
666
+
667
+ this.refs = emptyObject;
668
+ this.updater = updater || ReactNoopUpdateQueue;
669
+ }
670
+
671
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
672
+ pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
673
+
674
+ _assign(pureComponentPrototype, Component.prototype);
675
+
676
+ pureComponentPrototype.isPureReactComponent = true;
677
+
678
+ // an immutable object with a single mutable value
679
+ function createRef() {
680
+ var refObject = {
681
+ current: null
682
+ };
683
+
684
+ {
685
+ Object.seal(refObject);
686
+ }
687
+
688
+ return refObject;
689
+ }
690
+
691
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
692
+ var RESERVED_PROPS = {
693
+ key: true,
694
+ ref: true,
695
+ __self: true,
696
+ __source: true
697
+ };
698
+ var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
699
+
700
+ {
701
+ didWarnAboutStringRefs = {};
702
+ }
703
+
704
+ function hasValidRef(config) {
705
+ {
706
+ if (hasOwnProperty.call(config, 'ref')) {
707
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
708
+
709
+ if (getter && getter.isReactWarning) {
710
+ return false;
711
+ }
712
+ }
713
+ }
714
+
715
+ return config.ref !== undefined;
716
+ }
717
+
718
+ function hasValidKey(config) {
719
+ {
720
+ if (hasOwnProperty.call(config, 'key')) {
721
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
722
+
723
+ if (getter && getter.isReactWarning) {
724
+ return false;
725
+ }
726
+ }
727
+ }
728
+
729
+ return config.key !== undefined;
730
+ }
731
+
732
+ function defineKeyPropWarningGetter(props, displayName) {
733
+ var warnAboutAccessingKey = function () {
734
+ {
735
+ if (!specialPropKeyWarningShown) {
736
+ specialPropKeyWarningShown = true;
737
+
738
+ error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
739
+ }
740
+ }
741
+ };
742
+
743
+ warnAboutAccessingKey.isReactWarning = true;
744
+ Object.defineProperty(props, 'key', {
745
+ get: warnAboutAccessingKey,
746
+ configurable: true
747
+ });
748
+ }
749
+
750
+ function defineRefPropWarningGetter(props, displayName) {
751
+ var warnAboutAccessingRef = function () {
752
+ {
753
+ if (!specialPropRefWarningShown) {
754
+ specialPropRefWarningShown = true;
755
+
756
+ error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
757
+ }
758
+ }
759
+ };
760
+
761
+ warnAboutAccessingRef.isReactWarning = true;
762
+ Object.defineProperty(props, 'ref', {
763
+ get: warnAboutAccessingRef,
764
+ configurable: true
765
+ });
766
+ }
767
+
768
+ function warnIfStringRefCannotBeAutoConverted(config) {
769
+ {
770
+ if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
771
+ var componentName = getComponentName(ReactCurrentOwner.current.type);
772
+
773
+ if (!didWarnAboutStringRefs[componentName]) {
774
+ 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://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
775
+
776
+ didWarnAboutStringRefs[componentName] = true;
777
+ }
778
+ }
779
+ }
780
+ }
781
+ /**
782
+ * Factory method to create a new React element. This no longer adheres to
783
+ * the class pattern, so do not use new to call it. Also, instanceof check
784
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
785
+ * if something is a React Element.
786
+ *
787
+ * @param {*} type
788
+ * @param {*} props
789
+ * @param {*} key
790
+ * @param {string|object} ref
791
+ * @param {*} owner
792
+ * @param {*} self A *temporary* helper to detect places where `this` is
793
+ * different from the `owner` when React.createElement is called, so that we
794
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
795
+ * functions, and as long as `this` and owner are the same, there will be no
796
+ * change in behavior.
797
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
798
+ * indicating filename, line number, and/or other information.
799
+ * @internal
800
+ */
801
+
802
+
803
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
804
+ var element = {
805
+ // This tag allows us to uniquely identify this as a React Element
806
+ $$typeof: REACT_ELEMENT_TYPE,
807
+ // Built-in properties that belong on the element
808
+ type: type,
809
+ key: key,
810
+ ref: ref,
811
+ props: props,
812
+ // Record the component responsible for creating this element.
813
+ _owner: owner
814
+ };
815
+
816
+ {
817
+ // The validation flag is currently mutative. We put it on
818
+ // an external backing store so that we can freeze the whole object.
819
+ // This can be replaced with a WeakMap once they are implemented in
820
+ // commonly used development environments.
821
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
822
+ // the validation flag non-enumerable (where possible, which should
823
+ // include every environment we run tests in), so the test framework
824
+ // ignores it.
825
+
826
+ Object.defineProperty(element._store, 'validated', {
827
+ configurable: false,
828
+ enumerable: false,
829
+ writable: true,
830
+ value: false
831
+ }); // self and source are DEV only properties.
832
+
833
+ Object.defineProperty(element, '_self', {
834
+ configurable: false,
835
+ enumerable: false,
836
+ writable: false,
837
+ value: self
838
+ }); // Two elements created in two different places should be considered
839
+ // equal for testing purposes and therefore we hide it from enumeration.
840
+
841
+ Object.defineProperty(element, '_source', {
842
+ configurable: false,
843
+ enumerable: false,
844
+ writable: false,
845
+ value: source
846
+ });
847
+
848
+ if (Object.freeze) {
849
+ Object.freeze(element.props);
850
+ Object.freeze(element);
851
+ }
852
+ }
853
+
854
+ return element;
855
+ };
856
+ /**
857
+ * Create and return a new ReactElement of the given type.
858
+ * See https://reactjs.org/docs/react-api.html#createelement
859
+ */
860
+
861
+ function createElement(type, config, children) {
862
+ var propName; // Reserved names are extracted
863
+
864
+ var props = {};
865
+ var key = null;
866
+ var ref = null;
867
+ var self = null;
868
+ var source = null;
869
+
870
+ if (config != null) {
871
+ if (hasValidRef(config)) {
872
+ ref = config.ref;
873
+
874
+ {
875
+ warnIfStringRefCannotBeAutoConverted(config);
876
+ }
877
+ }
878
+
879
+ if (hasValidKey(config)) {
880
+ key = '' + config.key;
881
+ }
882
+
883
+ self = config.__self === undefined ? null : config.__self;
884
+ source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
885
+
886
+ for (propName in config) {
887
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
888
+ props[propName] = config[propName];
889
+ }
890
+ }
891
+ } // Children can be more than one argument, and those are transferred onto
892
+ // the newly allocated props object.
893
+
894
+
895
+ var childrenLength = arguments.length - 2;
896
+
897
+ if (childrenLength === 1) {
898
+ props.children = children;
899
+ } else if (childrenLength > 1) {
900
+ var childArray = Array(childrenLength);
901
+
902
+ for (var i = 0; i < childrenLength; i++) {
903
+ childArray[i] = arguments[i + 2];
904
+ }
905
+
906
+ {
907
+ if (Object.freeze) {
908
+ Object.freeze(childArray);
909
+ }
910
+ }
911
+
912
+ props.children = childArray;
913
+ } // Resolve default props
914
+
915
+
916
+ if (type && type.defaultProps) {
917
+ var defaultProps = type.defaultProps;
918
+
919
+ for (propName in defaultProps) {
920
+ if (props[propName] === undefined) {
921
+ props[propName] = defaultProps[propName];
922
+ }
923
+ }
924
+ }
925
+
926
+ {
927
+ if (key || ref) {
928
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
929
+
930
+ if (key) {
931
+ defineKeyPropWarningGetter(props, displayName);
932
+ }
933
+
934
+ if (ref) {
935
+ defineRefPropWarningGetter(props, displayName);
936
+ }
937
+ }
938
+ }
939
+
940
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
941
+ }
942
+ function cloneAndReplaceKey(oldElement, newKey) {
943
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
944
+ return newElement;
945
+ }
946
+ /**
947
+ * Clone and return a new ReactElement using element as the starting point.
948
+ * See https://reactjs.org/docs/react-api.html#cloneelement
949
+ */
950
+
951
+ function cloneElement(element, config, children) {
952
+ if (!!(element === null || element === undefined)) {
953
+ {
954
+ throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
955
+ }
956
+ }
957
+
958
+ var propName; // Original props are copied
959
+
960
+ var props = _assign({}, element.props); // Reserved names are extracted
961
+
962
+
963
+ var key = element.key;
964
+ var ref = element.ref; // Self is preserved since the owner is preserved.
965
+
966
+ var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
967
+ // transpiler, and the original source is probably a better indicator of the
968
+ // true owner.
969
+
970
+ var source = element._source; // Owner will be preserved, unless ref is overridden
971
+
972
+ var owner = element._owner;
973
+
974
+ if (config != null) {
975
+ if (hasValidRef(config)) {
976
+ // Silently steal the ref from the parent.
977
+ ref = config.ref;
978
+ owner = ReactCurrentOwner.current;
979
+ }
980
+
981
+ if (hasValidKey(config)) {
982
+ key = '' + config.key;
983
+ } // Remaining properties override existing props
984
+
985
+
986
+ var defaultProps;
987
+
988
+ if (element.type && element.type.defaultProps) {
989
+ defaultProps = element.type.defaultProps;
990
+ }
991
+
992
+ for (propName in config) {
993
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
994
+ if (config[propName] === undefined && defaultProps !== undefined) {
995
+ // Resolve default props
996
+ props[propName] = defaultProps[propName];
997
+ } else {
998
+ props[propName] = config[propName];
999
+ }
1000
+ }
1001
+ }
1002
+ } // Children can be more than one argument, and those are transferred onto
1003
+ // the newly allocated props object.
1004
+
1005
+
1006
+ var childrenLength = arguments.length - 2;
1007
+
1008
+ if (childrenLength === 1) {
1009
+ props.children = children;
1010
+ } else if (childrenLength > 1) {
1011
+ var childArray = Array(childrenLength);
1012
+
1013
+ for (var i = 0; i < childrenLength; i++) {
1014
+ childArray[i] = arguments[i + 2];
1015
+ }
1016
+
1017
+ props.children = childArray;
1018
+ }
1019
+
1020
+ return ReactElement(element.type, key, ref, self, source, owner, props);
1021
+ }
1022
+ /**
1023
+ * Verifies the object is a ReactElement.
1024
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
1025
+ * @param {?object} object
1026
+ * @return {boolean} True if `object` is a ReactElement.
1027
+ * @final
1028
+ */
1029
+
1030
+ function isValidElement(object) {
1031
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1032
+ }
1033
+
1034
+ var SEPARATOR = '.';
1035
+ var SUBSEPARATOR = ':';
1036
+ /**
1037
+ * Escape and wrap key so it is safe to use as a reactid
1038
+ *
1039
+ * @param {string} key to be escaped.
1040
+ * @return {string} the escaped key.
1041
+ */
1042
+
1043
+ function escape(key) {
1044
+ var escapeRegex = /[=:]/g;
1045
+ var escaperLookup = {
1046
+ '=': '=0',
1047
+ ':': '=2'
1048
+ };
1049
+ var escapedString = ('' + key).replace(escapeRegex, function (match) {
1050
+ return escaperLookup[match];
1051
+ });
1052
+ return '$' + escapedString;
1053
+ }
1054
+ /**
1055
+ * TODO: Test that a single child and an array with one item have the same key
1056
+ * pattern.
1057
+ */
1058
+
1059
+
1060
+ var didWarnAboutMaps = false;
1061
+ var userProvidedKeyEscapeRegex = /\/+/g;
1062
+
1063
+ function escapeUserProvidedKey(text) {
1064
+ return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
1065
+ }
1066
+
1067
+ var POOL_SIZE = 10;
1068
+ var traverseContextPool = [];
1069
+
1070
+ function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
1071
+ if (traverseContextPool.length) {
1072
+ var traverseContext = traverseContextPool.pop();
1073
+ traverseContext.result = mapResult;
1074
+ traverseContext.keyPrefix = keyPrefix;
1075
+ traverseContext.func = mapFunction;
1076
+ traverseContext.context = mapContext;
1077
+ traverseContext.count = 0;
1078
+ return traverseContext;
1079
+ } else {
1080
+ return {
1081
+ result: mapResult,
1082
+ keyPrefix: keyPrefix,
1083
+ func: mapFunction,
1084
+ context: mapContext,
1085
+ count: 0
1086
+ };
1087
+ }
1088
+ }
1089
+
1090
+ function releaseTraverseContext(traverseContext) {
1091
+ traverseContext.result = null;
1092
+ traverseContext.keyPrefix = null;
1093
+ traverseContext.func = null;
1094
+ traverseContext.context = null;
1095
+ traverseContext.count = 0;
1096
+
1097
+ if (traverseContextPool.length < POOL_SIZE) {
1098
+ traverseContextPool.push(traverseContext);
1099
+ }
1100
+ }
1101
+ /**
1102
+ * @param {?*} children Children tree container.
1103
+ * @param {!string} nameSoFar Name of the key path so far.
1104
+ * @param {!function} callback Callback to invoke with each child found.
1105
+ * @param {?*} traverseContext Used to pass information throughout the traversal
1106
+ * process.
1107
+ * @return {!number} The number of children in this subtree.
1108
+ */
1109
+
1110
+
1111
+ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
1112
+ var type = typeof children;
1113
+
1114
+ if (type === 'undefined' || type === 'boolean') {
1115
+ // All of the above are perceived as null.
1116
+ children = null;
1117
+ }
1118
+
1119
+ var invokeCallback = false;
1120
+
1121
+ if (children === null) {
1122
+ invokeCallback = true;
1123
+ } else {
1124
+ switch (type) {
1125
+ case 'string':
1126
+ case 'number':
1127
+ invokeCallback = true;
1128
+ break;
1129
+
1130
+ case 'object':
1131
+ switch (children.$$typeof) {
1132
+ case REACT_ELEMENT_TYPE:
1133
+ case REACT_PORTAL_TYPE:
1134
+ invokeCallback = true;
1135
+ }
1136
+
1137
+ }
1138
+ }
1139
+
1140
+ if (invokeCallback) {
1141
+ callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array
1142
+ // so that it's consistent if the number of children grows.
1143
+ nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
1144
+ return 1;
1145
+ }
1146
+
1147
+ var child;
1148
+ var nextName;
1149
+ var subtreeCount = 0; // Count of children found in the current subtree.
1150
+
1151
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
1152
+
1153
+ if (Array.isArray(children)) {
1154
+ for (var i = 0; i < children.length; i++) {
1155
+ child = children[i];
1156
+ nextName = nextNamePrefix + getComponentKey(child, i);
1157
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
1158
+ }
1159
+ } else {
1160
+ var iteratorFn = getIteratorFn(children);
1161
+
1162
+ if (typeof iteratorFn === 'function') {
1163
+
1164
+ {
1165
+ // Warn about using Maps as children
1166
+ if (iteratorFn === children.entries) {
1167
+ if (!didWarnAboutMaps) {
1168
+ warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.');
1169
+ }
1170
+
1171
+ didWarnAboutMaps = true;
1172
+ }
1173
+ }
1174
+
1175
+ var iterator = iteratorFn.call(children);
1176
+ var step;
1177
+ var ii = 0;
1178
+
1179
+ while (!(step = iterator.next()).done) {
1180
+ child = step.value;
1181
+ nextName = nextNamePrefix + getComponentKey(child, ii++);
1182
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
1183
+ }
1184
+ } else if (type === 'object') {
1185
+ var addendum = '';
1186
+
1187
+ {
1188
+ addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
1189
+ }
1190
+
1191
+ var childrenString = '' + children;
1192
+
1193
+ {
1194
+ {
1195
+ throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum );
1196
+ }
1197
+ }
1198
+ }
1199
+ }
1200
+
1201
+ return subtreeCount;
1202
+ }
1203
+ /**
1204
+ * Traverses children that are typically specified as `props.children`, but
1205
+ * might also be specified through attributes:
1206
+ *
1207
+ * - `traverseAllChildren(this.props.children, ...)`
1208
+ * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
1209
+ *
1210
+ * The `traverseContext` is an optional argument that is passed through the
1211
+ * entire traversal. It can be used to store accumulations or anything else that
1212
+ * the callback might find relevant.
1213
+ *
1214
+ * @param {?*} children Children tree object.
1215
+ * @param {!function} callback To invoke upon traversing each child.
1216
+ * @param {?*} traverseContext Context for traversal.
1217
+ * @return {!number} The number of children in this subtree.
1218
+ */
1219
+
1220
+
1221
+ function traverseAllChildren(children, callback, traverseContext) {
1222
+ if (children == null) {
1223
+ return 0;
1224
+ }
1225
+
1226
+ return traverseAllChildrenImpl(children, '', callback, traverseContext);
1227
+ }
1228
+ /**
1229
+ * Generate a key string that identifies a component within a set.
1230
+ *
1231
+ * @param {*} component A component that could contain a manual key.
1232
+ * @param {number} index Index that is used if a manual key is not provided.
1233
+ * @return {string}
1234
+ */
1235
+
1236
+
1237
+ function getComponentKey(component, index) {
1238
+ // Do some typechecking here since we call this blindly. We want to ensure
1239
+ // that we don't block potential future ES APIs.
1240
+ if (typeof component === 'object' && component !== null && component.key != null) {
1241
+ // Explicit key
1242
+ return escape(component.key);
1243
+ } // Implicit key determined by the index in the set
1244
+
1245
+
1246
+ return index.toString(36);
1247
+ }
1248
+
1249
+ function forEachSingleChild(bookKeeping, child, name) {
1250
+ var func = bookKeeping.func,
1251
+ context = bookKeeping.context;
1252
+ func.call(context, child, bookKeeping.count++);
1253
+ }
1254
+ /**
1255
+ * Iterates through children that are typically specified as `props.children`.
1256
+ *
1257
+ * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
1258
+ *
1259
+ * The provided forEachFunc(child, index) will be called for each
1260
+ * leaf child.
1261
+ *
1262
+ * @param {?*} children Children tree container.
1263
+ * @param {function(*, int)} forEachFunc
1264
+ * @param {*} forEachContext Context for forEachContext.
1265
+ */
1266
+
1267
+
1268
+ function forEachChildren(children, forEachFunc, forEachContext) {
1269
+ if (children == null) {
1270
+ return children;
1271
+ }
1272
+
1273
+ var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
1274
+ traverseAllChildren(children, forEachSingleChild, traverseContext);
1275
+ releaseTraverseContext(traverseContext);
1276
+ }
1277
+
1278
+ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
1279
+ var result = bookKeeping.result,
1280
+ keyPrefix = bookKeeping.keyPrefix,
1281
+ func = bookKeeping.func,
1282
+ context = bookKeeping.context;
1283
+ var mappedChild = func.call(context, child, bookKeeping.count++);
1284
+
1285
+ if (Array.isArray(mappedChild)) {
1286
+ mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
1287
+ return c;
1288
+ });
1289
+ } else if (mappedChild != null) {
1290
+ if (isValidElement(mappedChild)) {
1291
+ mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
1292
+ // traverseAllChildren used to do for objects as children
1293
+ keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
1294
+ }
1295
+
1296
+ result.push(mappedChild);
1297
+ }
1298
+ }
1299
+
1300
+ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
1301
+ var escapedPrefix = '';
1302
+
1303
+ if (prefix != null) {
1304
+ escapedPrefix = escapeUserProvidedKey(prefix) + '/';
1305
+ }
1306
+
1307
+ var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
1308
+ traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
1309
+ releaseTraverseContext(traverseContext);
1310
+ }
1311
+ /**
1312
+ * Maps children that are typically specified as `props.children`.
1313
+ *
1314
+ * See https://reactjs.org/docs/react-api.html#reactchildrenmap
1315
+ *
1316
+ * The provided mapFunction(child, key, index) will be called for each
1317
+ * leaf child.
1318
+ *
1319
+ * @param {?*} children Children tree container.
1320
+ * @param {function(*, int)} func The map function.
1321
+ * @param {*} context Context for mapFunction.
1322
+ * @return {object} Object containing the ordered map of results.
1323
+ */
1324
+
1325
+
1326
+ function mapChildren(children, func, context) {
1327
+ if (children == null) {
1328
+ return children;
1329
+ }
1330
+
1331
+ var result = [];
1332
+ mapIntoWithKeyPrefixInternal(children, result, null, func, context);
1333
+ return result;
1334
+ }
1335
+ /**
1336
+ * Count the number of children that are typically specified as
1337
+ * `props.children`.
1338
+ *
1339
+ * See https://reactjs.org/docs/react-api.html#reactchildrencount
1340
+ *
1341
+ * @param {?*} children Children tree container.
1342
+ * @return {number} The number of children.
1343
+ */
1344
+
1345
+
1346
+ function countChildren(children) {
1347
+ return traverseAllChildren(children, function () {
1348
+ return null;
1349
+ }, null);
1350
+ }
1351
+ /**
1352
+ * Flatten a children object (typically specified as `props.children`) and
1353
+ * return an array with appropriately re-keyed children.
1354
+ *
1355
+ * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
1356
+ */
1357
+
1358
+
1359
+ function toArray(children) {
1360
+ var result = [];
1361
+ mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
1362
+ return child;
1363
+ });
1364
+ return result;
1365
+ }
1366
+ /**
1367
+ * Returns the first child in a collection of children and verifies that there
1368
+ * is only one child in the collection.
1369
+ *
1370
+ * See https://reactjs.org/docs/react-api.html#reactchildrenonly
1371
+ *
1372
+ * The current implementation of this function assumes that a single child gets
1373
+ * passed without a wrapper, but the purpose of this helper function is to
1374
+ * abstract away the particular structure of children.
1375
+ *
1376
+ * @param {?object} children Child collection structure.
1377
+ * @return {ReactElement} The first and only `ReactElement` contained in the
1378
+ * structure.
1379
+ */
1380
+
1381
+
1382
+ function onlyChild(children) {
1383
+ if (!isValidElement(children)) {
1384
+ {
1385
+ throw Error( "React.Children.only expected to receive a single React element child." );
1386
+ }
1387
+ }
1388
+
1389
+ return children;
1390
+ }
1391
+
1392
+ function createContext(defaultValue, calculateChangedBits) {
1393
+ if (calculateChangedBits === undefined) {
1394
+ calculateChangedBits = null;
1395
+ } else {
1396
+ {
1397
+ if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
1398
+ error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
1399
+ }
1400
+ }
1401
+ }
1402
+
1403
+ var context = {
1404
+ $$typeof: REACT_CONTEXT_TYPE,
1405
+ _calculateChangedBits: calculateChangedBits,
1406
+ // As a workaround to support multiple concurrent renderers, we categorize
1407
+ // some renderers as primary and others as secondary. We only expect
1408
+ // there to be two concurrent renderers at most: React Native (primary) and
1409
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
1410
+ // Secondary renderers store their context values on separate fields.
1411
+ _currentValue: defaultValue,
1412
+ _currentValue2: defaultValue,
1413
+ // Used to track how many concurrent renderers this context currently
1414
+ // supports within in a single renderer. Such as parallel server rendering.
1415
+ _threadCount: 0,
1416
+ // These are circular
1417
+ Provider: null,
1418
+ Consumer: null
1419
+ };
1420
+ context.Provider = {
1421
+ $$typeof: REACT_PROVIDER_TYPE,
1422
+ _context: context
1423
+ };
1424
+ var hasWarnedAboutUsingNestedContextConsumers = false;
1425
+ var hasWarnedAboutUsingConsumerProvider = false;
1426
+
1427
+ {
1428
+ // A separate object, but proxies back to the original context object for
1429
+ // backwards compatibility. It has a different $$typeof, so we can properly
1430
+ // warn for the incorrect usage of Context as a Consumer.
1431
+ var Consumer = {
1432
+ $$typeof: REACT_CONTEXT_TYPE,
1433
+ _context: context,
1434
+ _calculateChangedBits: context._calculateChangedBits
1435
+ }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
1436
+
1437
+ Object.defineProperties(Consumer, {
1438
+ Provider: {
1439
+ get: function () {
1440
+ if (!hasWarnedAboutUsingConsumerProvider) {
1441
+ hasWarnedAboutUsingConsumerProvider = true;
1442
+
1443
+ error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
1444
+ }
1445
+
1446
+ return context.Provider;
1447
+ },
1448
+ set: function (_Provider) {
1449
+ context.Provider = _Provider;
1450
+ }
1451
+ },
1452
+ _currentValue: {
1453
+ get: function () {
1454
+ return context._currentValue;
1455
+ },
1456
+ set: function (_currentValue) {
1457
+ context._currentValue = _currentValue;
1458
+ }
1459
+ },
1460
+ _currentValue2: {
1461
+ get: function () {
1462
+ return context._currentValue2;
1463
+ },
1464
+ set: function (_currentValue2) {
1465
+ context._currentValue2 = _currentValue2;
1466
+ }
1467
+ },
1468
+ _threadCount: {
1469
+ get: function () {
1470
+ return context._threadCount;
1471
+ },
1472
+ set: function (_threadCount) {
1473
+ context._threadCount = _threadCount;
1474
+ }
1475
+ },
1476
+ Consumer: {
1477
+ get: function () {
1478
+ if (!hasWarnedAboutUsingNestedContextConsumers) {
1479
+ hasWarnedAboutUsingNestedContextConsumers = true;
1480
+
1481
+ error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
1482
+ }
1483
+
1484
+ return context.Consumer;
1485
+ }
1486
+ }
1487
+ }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
1488
+
1489
+ context.Consumer = Consumer;
1490
+ }
1491
+
1492
+ {
1493
+ context._currentRenderer = null;
1494
+ context._currentRenderer2 = null;
1495
+ }
1496
+
1497
+ return context;
1498
+ }
1499
+
1500
+ function lazy(ctor) {
1501
+ var lazyType = {
1502
+ $$typeof: REACT_LAZY_TYPE,
1503
+ _ctor: ctor,
1504
+ // React uses these fields to store the result.
1505
+ _status: -1,
1506
+ _result: null
1507
+ };
1508
+
1509
+ {
1510
+ // In production, this would just set it on the object.
1511
+ var defaultProps;
1512
+ var propTypes;
1513
+ Object.defineProperties(lazyType, {
1514
+ defaultProps: {
1515
+ configurable: true,
1516
+ get: function () {
1517
+ return defaultProps;
1518
+ },
1519
+ set: function (newDefaultProps) {
1520
+ error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
1521
+
1522
+ defaultProps = newDefaultProps; // Match production behavior more closely:
1523
+
1524
+ Object.defineProperty(lazyType, 'defaultProps', {
1525
+ enumerable: true
1526
+ });
1527
+ }
1528
+ },
1529
+ propTypes: {
1530
+ configurable: true,
1531
+ get: function () {
1532
+ return propTypes;
1533
+ },
1534
+ set: function (newPropTypes) {
1535
+ error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
1536
+
1537
+ propTypes = newPropTypes; // Match production behavior more closely:
1538
+
1539
+ Object.defineProperty(lazyType, 'propTypes', {
1540
+ enumerable: true
1541
+ });
1542
+ }
1543
+ }
1544
+ });
1545
+ }
1546
+
1547
+ return lazyType;
1548
+ }
1549
+
1550
+ function forwardRef(render) {
1551
+ {
1552
+ if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
1553
+ error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
1554
+ } else if (typeof render !== 'function') {
1555
+ error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
1556
+ } else {
1557
+ if (render.length !== 0 && render.length !== 2) {
1558
+ error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
1559
+ }
1560
+ }
1561
+
1562
+ if (render != null) {
1563
+ if (render.defaultProps != null || render.propTypes != null) {
1564
+ error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
1565
+ }
1566
+ }
1567
+ }
1568
+
1569
+ return {
1570
+ $$typeof: REACT_FORWARD_REF_TYPE,
1571
+ render: render
1572
+ };
1573
+ }
1574
+
1575
+ function isValidElementType(type) {
1576
+ return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1577
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (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_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
1578
+ }
1579
+
1580
+ function memo(type, compare) {
1581
+ {
1582
+ if (!isValidElementType(type)) {
1583
+ error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
1584
+ }
1585
+ }
1586
+
1587
+ return {
1588
+ $$typeof: REACT_MEMO_TYPE,
1589
+ type: type,
1590
+ compare: compare === undefined ? null : compare
1591
+ };
1592
+ }
1593
+
1594
+ function resolveDispatcher() {
1595
+ var dispatcher = ReactCurrentDispatcher.current;
1596
+
1597
+ if (!(dispatcher !== null)) {
1598
+ {
1599
+ 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://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
1600
+ }
1601
+ }
1602
+
1603
+ return dispatcher;
1604
+ }
1605
+
1606
+ function useContext(Context, unstable_observedBits) {
1607
+ var dispatcher = resolveDispatcher();
1608
+
1609
+ {
1610
+ if (unstable_observedBits !== undefined) {
1611
+ 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://fb.me/rules-of-hooks' : '');
1612
+ } // TODO: add a more generic warning for invalid values.
1613
+
1614
+
1615
+ if (Context._context !== undefined) {
1616
+ var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
1617
+ // and nobody should be using this in existing code.
1618
+
1619
+ if (realContext.Consumer === Context) {
1620
+ error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
1621
+ } else if (realContext.Provider === Context) {
1622
+ error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
1623
+ }
1624
+ }
1625
+ }
1626
+
1627
+ return dispatcher.useContext(Context, unstable_observedBits);
1628
+ }
1629
+ function useState(initialState) {
1630
+ var dispatcher = resolveDispatcher();
1631
+ return dispatcher.useState(initialState);
1632
+ }
1633
+ function useReducer(reducer, initialArg, init) {
1634
+ var dispatcher = resolveDispatcher();
1635
+ return dispatcher.useReducer(reducer, initialArg, init);
1636
+ }
1637
+ function useRef(initialValue) {
1638
+ var dispatcher = resolveDispatcher();
1639
+ return dispatcher.useRef(initialValue);
1640
+ }
1641
+ function useEffect(create, deps) {
1642
+ var dispatcher = resolveDispatcher();
1643
+ return dispatcher.useEffect(create, deps);
1644
+ }
1645
+ function useLayoutEffect(create, deps) {
1646
+ var dispatcher = resolveDispatcher();
1647
+ return dispatcher.useLayoutEffect(create, deps);
1648
+ }
1649
+ function useCallback(callback, deps) {
1650
+ var dispatcher = resolveDispatcher();
1651
+ return dispatcher.useCallback(callback, deps);
1652
+ }
1653
+ function useMemo(create, deps) {
1654
+ var dispatcher = resolveDispatcher();
1655
+ return dispatcher.useMemo(create, deps);
1656
+ }
1657
+ function useImperativeHandle(ref, create, deps) {
1658
+ var dispatcher = resolveDispatcher();
1659
+ return dispatcher.useImperativeHandle(ref, create, deps);
1660
+ }
1661
+ function useDebugValue(value, formatterFn) {
1662
+ {
1663
+ var dispatcher = resolveDispatcher();
1664
+ return dispatcher.useDebugValue(value, formatterFn);
1665
+ }
1666
+ }
1667
+
1668
+ var propTypesMisspellWarningShown;
1669
+
1670
+ {
1671
+ propTypesMisspellWarningShown = false;
1672
+ }
1673
+
1674
+ function getDeclarationErrorAddendum() {
1675
+ if (ReactCurrentOwner.current) {
1676
+ var name = getComponentName(ReactCurrentOwner.current.type);
1677
+
1678
+ if (name) {
1679
+ return '\n\nCheck the render method of `' + name + '`.';
1680
+ }
1681
+ }
1682
+
1683
+ return '';
1684
+ }
1685
+
1686
+ function getSourceInfoErrorAddendum(source) {
1687
+ if (source !== undefined) {
1688
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
1689
+ var lineNumber = source.lineNumber;
1690
+ return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
1691
+ }
1692
+
1693
+ return '';
1694
+ }
1695
+
1696
+ function getSourceInfoErrorAddendumForProps(elementProps) {
1697
+ if (elementProps !== null && elementProps !== undefined) {
1698
+ return getSourceInfoErrorAddendum(elementProps.__source);
1699
+ }
1700
+
1701
+ return '';
1702
+ }
1703
+ /**
1704
+ * Warn if there's no key explicitly set on dynamic arrays of children or
1705
+ * object keys are not valid. This allows us to keep track of children between
1706
+ * updates.
1707
+ */
1708
+
1709
+
1710
+ var ownerHasKeyUseWarning = {};
1711
+
1712
+ function getCurrentComponentErrorInfo(parentType) {
1713
+ var info = getDeclarationErrorAddendum();
1714
+
1715
+ if (!info) {
1716
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
1717
+
1718
+ if (parentName) {
1719
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1720
+ }
1721
+ }
1722
+
1723
+ return info;
1724
+ }
1725
+ /**
1726
+ * Warn if the element doesn't have an explicit key assigned to it.
1727
+ * This element is in an array. The array could grow and shrink or be
1728
+ * reordered. All children that haven't already been validated are required to
1729
+ * have a "key" property assigned to it. Error statuses are cached so a warning
1730
+ * will only be shown once.
1731
+ *
1732
+ * @internal
1733
+ * @param {ReactElement} element Element that requires a key.
1734
+ * @param {*} parentType element's parent's type.
1735
+ */
1736
+
1737
+
1738
+ function validateExplicitKey(element, parentType) {
1739
+ if (!element._store || element._store.validated || element.key != null) {
1740
+ return;
1741
+ }
1742
+
1743
+ element._store.validated = true;
1744
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1745
+
1746
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1747
+ return;
1748
+ }
1749
+
1750
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
1751
+ // property, it may be the creator of the child that's responsible for
1752
+ // assigning it a key.
1753
+
1754
+ var childOwner = '';
1755
+
1756
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
1757
+ // Give the component that originally created this child.
1758
+ childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
1759
+ }
1760
+
1761
+ setCurrentlyValidatingElement(element);
1762
+
1763
+ {
1764
+ error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
1765
+ }
1766
+
1767
+ setCurrentlyValidatingElement(null);
1768
+ }
1769
+ /**
1770
+ * Ensure that every element either is passed in a static location, in an
1771
+ * array with an explicit keys property defined, or in an object literal
1772
+ * with valid key property.
1773
+ *
1774
+ * @internal
1775
+ * @param {ReactNode} node Statically passed child of any type.
1776
+ * @param {*} parentType node's parent's type.
1777
+ */
1778
+
1779
+
1780
+ function validateChildKeys(node, parentType) {
1781
+ if (typeof node !== 'object') {
1782
+ return;
1783
+ }
1784
+
1785
+ if (Array.isArray(node)) {
1786
+ for (var i = 0; i < node.length; i++) {
1787
+ var child = node[i];
1788
+
1789
+ if (isValidElement(child)) {
1790
+ validateExplicitKey(child, parentType);
1791
+ }
1792
+ }
1793
+ } else if (isValidElement(node)) {
1794
+ // This element was passed in a valid location.
1795
+ if (node._store) {
1796
+ node._store.validated = true;
1797
+ }
1798
+ } else if (node) {
1799
+ var iteratorFn = getIteratorFn(node);
1800
+
1801
+ if (typeof iteratorFn === 'function') {
1802
+ // Entry iterators used to provide implicit keys,
1803
+ // but now we print a separate warning for them later.
1804
+ if (iteratorFn !== node.entries) {
1805
+ var iterator = iteratorFn.call(node);
1806
+ var step;
1807
+
1808
+ while (!(step = iterator.next()).done) {
1809
+ if (isValidElement(step.value)) {
1810
+ validateExplicitKey(step.value, parentType);
1811
+ }
1812
+ }
1813
+ }
1814
+ }
1815
+ }
1816
+ }
1817
+ /**
1818
+ * Given an element, validate that its props follow the propTypes definition,
1819
+ * provided by the type.
1820
+ *
1821
+ * @param {ReactElement} element
1822
+ */
1823
+
1824
+
1825
+ function validatePropTypes(element) {
1826
+ {
1827
+ var type = element.type;
1828
+
1829
+ if (type === null || type === undefined || typeof type === 'string') {
1830
+ return;
1831
+ }
1832
+
1833
+ var name = getComponentName(type);
1834
+ var propTypes;
1835
+
1836
+ if (typeof type === 'function') {
1837
+ propTypes = type.propTypes;
1838
+ } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
1839
+ // Inner props are checked in the reconciler.
1840
+ type.$$typeof === REACT_MEMO_TYPE)) {
1841
+ propTypes = type.propTypes;
1842
+ } else {
1843
+ return;
1844
+ }
1845
+
1846
+ if (propTypes) {
1847
+ setCurrentlyValidatingElement(element);
1848
+ checkPropTypes$1(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
1849
+ setCurrentlyValidatingElement(null);
1850
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
1851
+ propTypesMisspellWarningShown = true;
1852
+
1853
+ error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
1854
+ }
1855
+
1856
+ if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
1857
+ error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
1858
+ }
1859
+ }
1860
+ }
1861
+ /**
1862
+ * Given a fragment, validate that it can only be provided with fragment props
1863
+ * @param {ReactElement} fragment
1864
+ */
1865
+
1866
+
1867
+ function validateFragmentProps(fragment) {
1868
+ {
1869
+ setCurrentlyValidatingElement(fragment);
1870
+ var keys = Object.keys(fragment.props);
1871
+
1872
+ for (var i = 0; i < keys.length; i++) {
1873
+ var key = keys[i];
1874
+
1875
+ if (key !== 'children' && key !== 'key') {
1876
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
1877
+
1878
+ break;
1879
+ }
1880
+ }
1881
+
1882
+ if (fragment.ref !== null) {
1883
+ error('Invalid attribute `ref` supplied to `React.Fragment`.');
1884
+ }
1885
+
1886
+ setCurrentlyValidatingElement(null);
1887
+ }
1888
+ }
1889
+ function createElementWithValidation(type, props, children) {
1890
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
1891
+ // succeed and there will likely be errors in render.
1892
+
1893
+ if (!validType) {
1894
+ var info = '';
1895
+
1896
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
1897
+ info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
1898
+ }
1899
+
1900
+ var sourceInfo = getSourceInfoErrorAddendumForProps(props);
1901
+
1902
+ if (sourceInfo) {
1903
+ info += sourceInfo;
1904
+ } else {
1905
+ info += getDeclarationErrorAddendum();
1906
+ }
1907
+
1908
+ var typeString;
1909
+
1910
+ if (type === null) {
1911
+ typeString = 'null';
1912
+ } else if (Array.isArray(type)) {
1913
+ typeString = 'array';
1914
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
1915
+ typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
1916
+ info = ' Did you accidentally export a JSX literal instead of a component?';
1917
+ } else {
1918
+ typeString = typeof type;
1919
+ }
1920
+
1921
+ {
1922
+ error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
1923
+ }
1924
+ }
1925
+
1926
+ var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
1927
+ // TODO: Drop this when these are no longer allowed as the type argument.
1928
+
1929
+ if (element == null) {
1930
+ return element;
1931
+ } // Skip key warning if the type isn't valid since our key validation logic
1932
+ // doesn't expect a non-string/function type and can throw confusing errors.
1933
+ // We don't want exception behavior to differ between dev and prod.
1934
+ // (Rendering will throw with a helpful message and as soon as the type is
1935
+ // fixed, the key warnings will appear.)
1936
+
1937
+
1938
+ if (validType) {
1939
+ for (var i = 2; i < arguments.length; i++) {
1940
+ validateChildKeys(arguments[i], type);
1941
+ }
1942
+ }
1943
+
1944
+ if (type === REACT_FRAGMENT_TYPE) {
1945
+ validateFragmentProps(element);
1946
+ } else {
1947
+ validatePropTypes(element);
1948
+ }
1949
+
1950
+ return element;
1951
+ }
1952
+ var didWarnAboutDeprecatedCreateFactory = false;
1953
+ function createFactoryWithValidation(type) {
1954
+ var validatedFactory = createElementWithValidation.bind(null, type);
1955
+ validatedFactory.type = type;
1956
+
1957
+ {
1958
+ if (!didWarnAboutDeprecatedCreateFactory) {
1959
+ didWarnAboutDeprecatedCreateFactory = true;
1960
+
1961
+ warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
1962
+ } // Legacy hook: remove it
1963
+
1964
+
1965
+ Object.defineProperty(validatedFactory, 'type', {
1966
+ enumerable: false,
1967
+ get: function () {
1968
+ warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
1969
+
1970
+ Object.defineProperty(this, 'type', {
1971
+ value: type
1972
+ });
1973
+ return type;
1974
+ }
1975
+ });
1976
+ }
1977
+
1978
+ return validatedFactory;
1979
+ }
1980
+ function cloneElementWithValidation(element, props, children) {
1981
+ var newElement = cloneElement.apply(this, arguments);
1982
+
1983
+ for (var i = 2; i < arguments.length; i++) {
1984
+ validateChildKeys(arguments[i], newElement.type);
1985
+ }
1986
+
1987
+ validatePropTypes(newElement);
1988
+ return newElement;
1989
+ }
1990
+
1991
+ {
1992
+
1993
+ try {
1994
+ var frozenObject = Object.freeze({});
1995
+ var testMap = new Map([[frozenObject, null]]);
1996
+ var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.
1997
+ // https://github.com/rollup/rollup/issues/1771
1998
+ // TODO: we can remove these if Rollup fixes the bug.
1999
+
2000
+ testMap.set(0, 0);
2001
+ testSet.add(0);
2002
+ } catch (e) {
2003
+ }
2004
+ }
2005
+
2006
+ var createElement$1 = createElementWithValidation ;
2007
+ var cloneElement$1 = cloneElementWithValidation ;
2008
+ var createFactory = createFactoryWithValidation ;
2009
+ var Children = {
2010
+ map: mapChildren,
2011
+ forEach: forEachChildren,
2012
+ count: countChildren,
2013
+ toArray: toArray,
2014
+ only: onlyChild
2015
+ };
2016
+
2017
+ exports.Children = Children;
2018
+ exports.Component = Component;
2019
+ exports.Fragment = REACT_FRAGMENT_TYPE;
2020
+ exports.Profiler = REACT_PROFILER_TYPE;
2021
+ exports.PureComponent = PureComponent;
2022
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
2023
+ exports.Suspense = REACT_SUSPENSE_TYPE;
2024
+ exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
2025
+ exports.cloneElement = cloneElement$1;
2026
+ exports.createContext = createContext;
2027
+ exports.createElement = createElement$1;
2028
+ exports.createFactory = createFactory;
2029
+ exports.createRef = createRef;
2030
+ exports.forwardRef = forwardRef;
2031
+ exports.isValidElement = isValidElement;
2032
+ exports.lazy = lazy;
2033
+ exports.memo = memo;
2034
+ exports.useCallback = useCallback;
2035
+ exports.useContext = useContext;
2036
+ exports.useDebugValue = useDebugValue;
2037
+ exports.useEffect = useEffect;
2038
+ exports.useImperativeHandle = useImperativeHandle;
2039
+ exports.useLayoutEffect = useLayoutEffect;
2040
+ exports.useMemo = useMemo;
2041
+ exports.useReducer = useReducer;
2042
+ exports.useRef = useRef;
2043
+ exports.useState = useState;
2044
+ exports.version = ReactVersion;
2045
+ })();
2046
+ }
2047
+ });
2048
+
2049
+ var react = createCommonjsModule(function (module) {
2050
+
2051
+ if (process.env.NODE_ENV === 'production') {
2052
+ module.exports = react_production_min;
2053
+ } else {
2054
+ module.exports = react_development;
2055
+ }
2056
+ });
2057
+
4
2058
  var FamewallEmbed = function FamewallEmbed(_ref) {
5
2059
  var wallUrl = _ref.wallUrl,
6
2060
  avatarCollectionId = _ref.avatarCollectionId,
@@ -16,7 +2070,7 @@ var FamewallEmbed = function FamewallEmbed(_ref) {
16
2070
  }
17
2071
 
18
2072
  if (avatarCollectionId) {
19
- return /*#__PURE__*/React.createElement(IframeResizer, {
2073
+ return /*#__PURE__*/react.createElement(IframeResizer, {
20
2074
  title: "Famewall Embed " + avatarCollectionId,
21
2075
  src: "https://wallembed.famewall.io/avatars/" + avatarCollectionId,
22
2076
  frameBorder: "0",
@@ -32,7 +2086,7 @@ var FamewallEmbed = function FamewallEmbed(_ref) {
32
2086
  });
33
2087
  }
34
2088
 
35
- return /*#__PURE__*/React.createElement(IframeResizer, {
2089
+ return /*#__PURE__*/react.createElement(IframeResizer, {
36
2090
  title: "Famewall Embed " + wallUrl,
37
2091
  src: cardTheme ? "https://wallembed.famewall.io/" + (!carouselMode ? !dualSliderMode ? 'wall' : 'slider' : 'carousel') + "/" + wallUrl + "?theme=" + cardTheme : "https://wallembed.famewall.io/" + (!carouselMode ? !dualSliderMode ? 'wall' : 'slider' : 'carousel') + "/" + wallUrl,
38
2092
  frameBorder: "0",