@byteplus/react-native-live-push 1.1.3-rc.3 → 1.1.3-rc.4

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.
@@ -2,6 +2,7 @@
2
2
 
3
3
  var reactNative = require('react-native');
4
4
  var React = require('react');
5
+ var jsxRuntime = require('react/jsx-runtime');
5
6
 
6
7
  /**
7
8
  * base64.ts
@@ -24046,1374 +24047,6 @@ function startScreenCapture(pusher, options) {
24046
24047
  });
24047
24048
  }
24048
24049
 
24049
- var jsxRuntime = {exports: {}};
24050
-
24051
- var reactJsxRuntime_production_min = {};
24052
-
24053
- /**
24054
- * @license React
24055
- * react-jsx-runtime.production.min.js
24056
- *
24057
- * Copyright (c) Facebook, Inc. and its affiliates.
24058
- *
24059
- * This source code is licensed under the MIT license found in the
24060
- * LICENSE file in the root directory of this source tree.
24061
- */
24062
-
24063
- var hasRequiredReactJsxRuntime_production_min;
24064
-
24065
- function requireReactJsxRuntime_production_min () {
24066
- if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
24067
- hasRequiredReactJsxRuntime_production_min = 1;
24068
- var f=React,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
24069
- function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
24070
- return reactJsxRuntime_production_min;
24071
- }
24072
-
24073
- var reactJsxRuntime_development = {};
24074
-
24075
- /**
24076
- * @license React
24077
- * react-jsx-runtime.development.js
24078
- *
24079
- * Copyright (c) Facebook, Inc. and its affiliates.
24080
- *
24081
- * This source code is licensed under the MIT license found in the
24082
- * LICENSE file in the root directory of this source tree.
24083
- */
24084
-
24085
- var hasRequiredReactJsxRuntime_development;
24086
-
24087
- function requireReactJsxRuntime_development () {
24088
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
24089
- hasRequiredReactJsxRuntime_development = 1;
24090
-
24091
- if (process.env.NODE_ENV !== "production") {
24092
- (function() {
24093
-
24094
- var React$1 = React;
24095
-
24096
- // ATTENTION
24097
- // When adding new symbols to this file,
24098
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
24099
- // The Symbol used to tag the ReactElement-like types.
24100
- var REACT_ELEMENT_TYPE = Symbol.for('react.element');
24101
- var REACT_PORTAL_TYPE = Symbol.for('react.portal');
24102
- var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
24103
- var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
24104
- var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
24105
- var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
24106
- var REACT_CONTEXT_TYPE = Symbol.for('react.context');
24107
- var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
24108
- var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
24109
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
24110
- var REACT_MEMO_TYPE = Symbol.for('react.memo');
24111
- var REACT_LAZY_TYPE = Symbol.for('react.lazy');
24112
- var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
24113
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
24114
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
24115
- function getIteratorFn(maybeIterable) {
24116
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
24117
- return null;
24118
- }
24119
-
24120
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
24121
-
24122
- if (typeof maybeIterator === 'function') {
24123
- return maybeIterator;
24124
- }
24125
-
24126
- return null;
24127
- }
24128
-
24129
- var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
24130
-
24131
- function error(format) {
24132
- {
24133
- {
24134
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
24135
- args[_key2 - 1] = arguments[_key2];
24136
- }
24137
-
24138
- printWarning('error', format, args);
24139
- }
24140
- }
24141
- }
24142
-
24143
- function printWarning(level, format, args) {
24144
- // When changing this logic, you might want to also
24145
- // update consoleWithStackDev.www.js as well.
24146
- {
24147
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
24148
- var stack = ReactDebugCurrentFrame.getStackAddendum();
24149
-
24150
- if (stack !== '') {
24151
- format += '%s';
24152
- args = args.concat([stack]);
24153
- } // eslint-disable-next-line react-internal/safe-string-coercion
24154
-
24155
-
24156
- var argsWithFormat = args.map(function (item) {
24157
- return String(item);
24158
- }); // Careful: RN currently depends on this prefix
24159
-
24160
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
24161
- // breaks IE9: https://github.com/facebook/react/issues/13610
24162
- // eslint-disable-next-line react-internal/no-production-logging
24163
-
24164
- Function.prototype.apply.call(console[level], console, argsWithFormat);
24165
- }
24166
- }
24167
-
24168
- // -----------------------------------------------------------------------------
24169
-
24170
- var enableScopeAPI = false; // Experimental Create Event Handle API.
24171
- var enableCacheElement = false;
24172
- var enableTransitionTracing = false; // No known bugs, but needs performance testing
24173
-
24174
- var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
24175
- // stuff. Intended to enable React core members to more easily debug scheduling
24176
- // issues in DEV builds.
24177
-
24178
- var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
24179
-
24180
- var REACT_MODULE_REFERENCE;
24181
-
24182
- {
24183
- REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
24184
- }
24185
-
24186
- function isValidElementType(type) {
24187
- if (typeof type === 'string' || typeof type === 'function') {
24188
- return true;
24189
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
24190
-
24191
-
24192
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
24193
- return true;
24194
- }
24195
-
24196
- if (typeof type === 'object' && type !== null) {
24197
- if (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 || // This needs to include all possible module reference object
24198
- // types supported by any Flight configuration anywhere since
24199
- // we don't know which Flight build this will end up being used
24200
- // with.
24201
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
24202
- return true;
24203
- }
24204
- }
24205
-
24206
- return false;
24207
- }
24208
-
24209
- function getWrappedName(outerType, innerType, wrapperName) {
24210
- var displayName = outerType.displayName;
24211
-
24212
- if (displayName) {
24213
- return displayName;
24214
- }
24215
-
24216
- var functionName = innerType.displayName || innerType.name || '';
24217
- return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
24218
- } // Keep in sync with react-reconciler/getComponentNameFromFiber
24219
-
24220
-
24221
- function getContextName(type) {
24222
- return type.displayName || 'Context';
24223
- } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
24224
-
24225
-
24226
- function getComponentNameFromType(type) {
24227
- if (type == null) {
24228
- // Host root, text node or just invalid type.
24229
- return null;
24230
- }
24231
-
24232
- {
24233
- if (typeof type.tag === 'number') {
24234
- error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
24235
- }
24236
- }
24237
-
24238
- if (typeof type === 'function') {
24239
- return type.displayName || type.name || null;
24240
- }
24241
-
24242
- if (typeof type === 'string') {
24243
- return type;
24244
- }
24245
-
24246
- switch (type) {
24247
- case REACT_FRAGMENT_TYPE:
24248
- return 'Fragment';
24249
-
24250
- case REACT_PORTAL_TYPE:
24251
- return 'Portal';
24252
-
24253
- case REACT_PROFILER_TYPE:
24254
- return 'Profiler';
24255
-
24256
- case REACT_STRICT_MODE_TYPE:
24257
- return 'StrictMode';
24258
-
24259
- case REACT_SUSPENSE_TYPE:
24260
- return 'Suspense';
24261
-
24262
- case REACT_SUSPENSE_LIST_TYPE:
24263
- return 'SuspenseList';
24264
-
24265
- }
24266
-
24267
- if (typeof type === 'object') {
24268
- switch (type.$$typeof) {
24269
- case REACT_CONTEXT_TYPE:
24270
- var context = type;
24271
- return getContextName(context) + '.Consumer';
24272
-
24273
- case REACT_PROVIDER_TYPE:
24274
- var provider = type;
24275
- return getContextName(provider._context) + '.Provider';
24276
-
24277
- case REACT_FORWARD_REF_TYPE:
24278
- return getWrappedName(type, type.render, 'ForwardRef');
24279
-
24280
- case REACT_MEMO_TYPE:
24281
- var outerName = type.displayName || null;
24282
-
24283
- if (outerName !== null) {
24284
- return outerName;
24285
- }
24286
-
24287
- return getComponentNameFromType(type.type) || 'Memo';
24288
-
24289
- case REACT_LAZY_TYPE:
24290
- {
24291
- var lazyComponent = type;
24292
- var payload = lazyComponent._payload;
24293
- var init = lazyComponent._init;
24294
-
24295
- try {
24296
- return getComponentNameFromType(init(payload));
24297
- } catch (x) {
24298
- return null;
24299
- }
24300
- }
24301
-
24302
- // eslint-disable-next-line no-fallthrough
24303
- }
24304
- }
24305
-
24306
- return null;
24307
- }
24308
-
24309
- var assign = Object.assign;
24310
-
24311
- // Helpers to patch console.logs to avoid logging during side-effect free
24312
- // replaying on render function. This currently only patches the object
24313
- // lazily which won't cover if the log function was extracted eagerly.
24314
- // We could also eagerly patch the method.
24315
- var disabledDepth = 0;
24316
- var prevLog;
24317
- var prevInfo;
24318
- var prevWarn;
24319
- var prevError;
24320
- var prevGroup;
24321
- var prevGroupCollapsed;
24322
- var prevGroupEnd;
24323
-
24324
- function disabledLog() {}
24325
-
24326
- disabledLog.__reactDisabledLog = true;
24327
- function disableLogs() {
24328
- {
24329
- if (disabledDepth === 0) {
24330
- /* eslint-disable react-internal/no-production-logging */
24331
- prevLog = console.log;
24332
- prevInfo = console.info;
24333
- prevWarn = console.warn;
24334
- prevError = console.error;
24335
- prevGroup = console.group;
24336
- prevGroupCollapsed = console.groupCollapsed;
24337
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
24338
-
24339
- var props = {
24340
- configurable: true,
24341
- enumerable: true,
24342
- value: disabledLog,
24343
- writable: true
24344
- }; // $FlowFixMe Flow thinks console is immutable.
24345
-
24346
- Object.defineProperties(console, {
24347
- info: props,
24348
- log: props,
24349
- warn: props,
24350
- error: props,
24351
- group: props,
24352
- groupCollapsed: props,
24353
- groupEnd: props
24354
- });
24355
- /* eslint-enable react-internal/no-production-logging */
24356
- }
24357
-
24358
- disabledDepth++;
24359
- }
24360
- }
24361
- function reenableLogs() {
24362
- {
24363
- disabledDepth--;
24364
-
24365
- if (disabledDepth === 0) {
24366
- /* eslint-disable react-internal/no-production-logging */
24367
- var props = {
24368
- configurable: true,
24369
- enumerable: true,
24370
- writable: true
24371
- }; // $FlowFixMe Flow thinks console is immutable.
24372
-
24373
- Object.defineProperties(console, {
24374
- log: assign({}, props, {
24375
- value: prevLog
24376
- }),
24377
- info: assign({}, props, {
24378
- value: prevInfo
24379
- }),
24380
- warn: assign({}, props, {
24381
- value: prevWarn
24382
- }),
24383
- error: assign({}, props, {
24384
- value: prevError
24385
- }),
24386
- group: assign({}, props, {
24387
- value: prevGroup
24388
- }),
24389
- groupCollapsed: assign({}, props, {
24390
- value: prevGroupCollapsed
24391
- }),
24392
- groupEnd: assign({}, props, {
24393
- value: prevGroupEnd
24394
- })
24395
- });
24396
- /* eslint-enable react-internal/no-production-logging */
24397
- }
24398
-
24399
- if (disabledDepth < 0) {
24400
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
24401
- }
24402
- }
24403
- }
24404
-
24405
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
24406
- var prefix;
24407
- function describeBuiltInComponentFrame(name, source, ownerFn) {
24408
- {
24409
- if (prefix === undefined) {
24410
- // Extract the VM specific prefix used by each line.
24411
- try {
24412
- throw Error();
24413
- } catch (x) {
24414
- var match = x.stack.trim().match(/\n( *(at )?)/);
24415
- prefix = match && match[1] || '';
24416
- }
24417
- } // We use the prefix to ensure our stacks line up with native stack frames.
24418
-
24419
-
24420
- return '\n' + prefix + name;
24421
- }
24422
- }
24423
- var reentry = false;
24424
- var componentFrameCache;
24425
-
24426
- {
24427
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
24428
- componentFrameCache = new PossiblyWeakMap();
24429
- }
24430
-
24431
- function describeNativeComponentFrame(fn, construct) {
24432
- // If something asked for a stack inside a fake render, it should get ignored.
24433
- if ( !fn || reentry) {
24434
- return '';
24435
- }
24436
-
24437
- {
24438
- var frame = componentFrameCache.get(fn);
24439
-
24440
- if (frame !== undefined) {
24441
- return frame;
24442
- }
24443
- }
24444
-
24445
- var control;
24446
- reentry = true;
24447
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
24448
-
24449
- Error.prepareStackTrace = undefined;
24450
- var previousDispatcher;
24451
-
24452
- {
24453
- previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
24454
- // for warnings.
24455
-
24456
- ReactCurrentDispatcher.current = null;
24457
- disableLogs();
24458
- }
24459
-
24460
- try {
24461
- // This should throw.
24462
- if (construct) {
24463
- // Something should be setting the props in the constructor.
24464
- var Fake = function () {
24465
- throw Error();
24466
- }; // $FlowFixMe
24467
-
24468
-
24469
- Object.defineProperty(Fake.prototype, 'props', {
24470
- set: function () {
24471
- // We use a throwing setter instead of frozen or non-writable props
24472
- // because that won't throw in a non-strict mode function.
24473
- throw Error();
24474
- }
24475
- });
24476
-
24477
- if (typeof Reflect === 'object' && Reflect.construct) {
24478
- // We construct a different control for this case to include any extra
24479
- // frames added by the construct call.
24480
- try {
24481
- Reflect.construct(Fake, []);
24482
- } catch (x) {
24483
- control = x;
24484
- }
24485
-
24486
- Reflect.construct(fn, [], Fake);
24487
- } else {
24488
- try {
24489
- Fake.call();
24490
- } catch (x) {
24491
- control = x;
24492
- }
24493
-
24494
- fn.call(Fake.prototype);
24495
- }
24496
- } else {
24497
- try {
24498
- throw Error();
24499
- } catch (x) {
24500
- control = x;
24501
- }
24502
-
24503
- fn();
24504
- }
24505
- } catch (sample) {
24506
- // This is inlined manually because closure doesn't do it for us.
24507
- if (sample && control && typeof sample.stack === 'string') {
24508
- // This extracts the first frame from the sample that isn't also in the control.
24509
- // Skipping one frame that we assume is the frame that calls the two.
24510
- var sampleLines = sample.stack.split('\n');
24511
- var controlLines = control.stack.split('\n');
24512
- var s = sampleLines.length - 1;
24513
- var c = controlLines.length - 1;
24514
-
24515
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
24516
- // We expect at least one stack frame to be shared.
24517
- // Typically this will be the root most one. However, stack frames may be
24518
- // cut off due to maximum stack limits. In this case, one maybe cut off
24519
- // earlier than the other. We assume that the sample is longer or the same
24520
- // and there for cut off earlier. So we should find the root most frame in
24521
- // the sample somewhere in the control.
24522
- c--;
24523
- }
24524
-
24525
- for (; s >= 1 && c >= 0; s--, c--) {
24526
- // Next we find the first one that isn't the same which should be the
24527
- // frame that called our sample function and the control.
24528
- if (sampleLines[s] !== controlLines[c]) {
24529
- // In V8, the first line is describing the message but other VMs don't.
24530
- // If we're about to return the first line, and the control is also on the same
24531
- // line, that's a pretty good indicator that our sample threw at same line as
24532
- // the control. I.e. before we entered the sample frame. So we ignore this result.
24533
- // This can happen if you passed a class to function component, or non-function.
24534
- if (s !== 1 || c !== 1) {
24535
- do {
24536
- s--;
24537
- c--; // We may still have similar intermediate frames from the construct call.
24538
- // The next one that isn't the same should be our match though.
24539
-
24540
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
24541
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
24542
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
24543
- // but we have a user-provided "displayName"
24544
- // splice it in to make the stack more readable.
24545
-
24546
-
24547
- if (fn.displayName && _frame.includes('<anonymous>')) {
24548
- _frame = _frame.replace('<anonymous>', fn.displayName);
24549
- }
24550
-
24551
- {
24552
- if (typeof fn === 'function') {
24553
- componentFrameCache.set(fn, _frame);
24554
- }
24555
- } // Return the line we found.
24556
-
24557
-
24558
- return _frame;
24559
- }
24560
- } while (s >= 1 && c >= 0);
24561
- }
24562
-
24563
- break;
24564
- }
24565
- }
24566
- }
24567
- } finally {
24568
- reentry = false;
24569
-
24570
- {
24571
- ReactCurrentDispatcher.current = previousDispatcher;
24572
- reenableLogs();
24573
- }
24574
-
24575
- Error.prepareStackTrace = previousPrepareStackTrace;
24576
- } // Fallback to just using the name if we couldn't make it throw.
24577
-
24578
-
24579
- var name = fn ? fn.displayName || fn.name : '';
24580
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
24581
-
24582
- {
24583
- if (typeof fn === 'function') {
24584
- componentFrameCache.set(fn, syntheticFrame);
24585
- }
24586
- }
24587
-
24588
- return syntheticFrame;
24589
- }
24590
- function describeFunctionComponentFrame(fn, source, ownerFn) {
24591
- {
24592
- return describeNativeComponentFrame(fn, false);
24593
- }
24594
- }
24595
-
24596
- function shouldConstruct(Component) {
24597
- var prototype = Component.prototype;
24598
- return !!(prototype && prototype.isReactComponent);
24599
- }
24600
-
24601
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
24602
-
24603
- if (type == null) {
24604
- return '';
24605
- }
24606
-
24607
- if (typeof type === 'function') {
24608
- {
24609
- return describeNativeComponentFrame(type, shouldConstruct(type));
24610
- }
24611
- }
24612
-
24613
- if (typeof type === 'string') {
24614
- return describeBuiltInComponentFrame(type);
24615
- }
24616
-
24617
- switch (type) {
24618
- case REACT_SUSPENSE_TYPE:
24619
- return describeBuiltInComponentFrame('Suspense');
24620
-
24621
- case REACT_SUSPENSE_LIST_TYPE:
24622
- return describeBuiltInComponentFrame('SuspenseList');
24623
- }
24624
-
24625
- if (typeof type === 'object') {
24626
- switch (type.$$typeof) {
24627
- case REACT_FORWARD_REF_TYPE:
24628
- return describeFunctionComponentFrame(type.render);
24629
-
24630
- case REACT_MEMO_TYPE:
24631
- // Memo may contain any component type so we recursively resolve it.
24632
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
24633
-
24634
- case REACT_LAZY_TYPE:
24635
- {
24636
- var lazyComponent = type;
24637
- var payload = lazyComponent._payload;
24638
- var init = lazyComponent._init;
24639
-
24640
- try {
24641
- // Lazy may contain any component type so we recursively resolve it.
24642
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
24643
- } catch (x) {}
24644
- }
24645
- }
24646
- }
24647
-
24648
- return '';
24649
- }
24650
-
24651
- var hasOwnProperty = Object.prototype.hasOwnProperty;
24652
-
24653
- var loggedTypeFailures = {};
24654
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
24655
-
24656
- function setCurrentlyValidatingElement(element) {
24657
- {
24658
- if (element) {
24659
- var owner = element._owner;
24660
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
24661
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
24662
- } else {
24663
- ReactDebugCurrentFrame.setExtraStackFrame(null);
24664
- }
24665
- }
24666
- }
24667
-
24668
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
24669
- {
24670
- // $FlowFixMe This is okay but Flow doesn't know it.
24671
- var has = Function.call.bind(hasOwnProperty);
24672
-
24673
- for (var typeSpecName in typeSpecs) {
24674
- if (has(typeSpecs, typeSpecName)) {
24675
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
24676
- // fail the render phase where it didn't fail before. So we log it.
24677
- // After these have been cleaned up, we'll let them throw.
24678
-
24679
- try {
24680
- // This is intentionally an invariant that gets caught. It's the same
24681
- // behavior as without this statement except with a better message.
24682
- if (typeof typeSpecs[typeSpecName] !== 'function') {
24683
- // eslint-disable-next-line react-internal/prod-error-codes
24684
- var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
24685
- err.name = 'Invariant Violation';
24686
- throw err;
24687
- }
24688
-
24689
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
24690
- } catch (ex) {
24691
- error$1 = ex;
24692
- }
24693
-
24694
- if (error$1 && !(error$1 instanceof Error)) {
24695
- setCurrentlyValidatingElement(element);
24696
-
24697
- error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
24698
-
24699
- setCurrentlyValidatingElement(null);
24700
- }
24701
-
24702
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
24703
- // Only monitor this failure once because there tends to be a lot of the
24704
- // same error.
24705
- loggedTypeFailures[error$1.message] = true;
24706
- setCurrentlyValidatingElement(element);
24707
-
24708
- error('Failed %s type: %s', location, error$1.message);
24709
-
24710
- setCurrentlyValidatingElement(null);
24711
- }
24712
- }
24713
- }
24714
- }
24715
- }
24716
-
24717
- var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
24718
-
24719
- function isArray(a) {
24720
- return isArrayImpl(a);
24721
- }
24722
-
24723
- /*
24724
- * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
24725
- * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
24726
- *
24727
- * The functions in this module will throw an easier-to-understand,
24728
- * easier-to-debug exception with a clear errors message message explaining the
24729
- * problem. (Instead of a confusing exception thrown inside the implementation
24730
- * of the `value` object).
24731
- */
24732
- // $FlowFixMe only called in DEV, so void return is not possible.
24733
- function typeName(value) {
24734
- {
24735
- // toStringTag is needed for namespaced types like Temporal.Instant
24736
- var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
24737
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
24738
- return type;
24739
- }
24740
- } // $FlowFixMe only called in DEV, so void return is not possible.
24741
-
24742
-
24743
- function willCoercionThrow(value) {
24744
- {
24745
- try {
24746
- testStringCoercion(value);
24747
- return false;
24748
- } catch (e) {
24749
- return true;
24750
- }
24751
- }
24752
- }
24753
-
24754
- function testStringCoercion(value) {
24755
- // If you ended up here by following an exception call stack, here's what's
24756
- // happened: you supplied an object or symbol value to React (as a prop, key,
24757
- // DOM attribute, CSS property, string ref, etc.) and when React tried to
24758
- // coerce it to a string using `'' + value`, an exception was thrown.
24759
- //
24760
- // The most common types that will cause this exception are `Symbol` instances
24761
- // and Temporal objects like `Temporal.Instant`. But any object that has a
24762
- // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
24763
- // exception. (Library authors do this to prevent users from using built-in
24764
- // numeric operators like `+` or comparison operators like `>=` because custom
24765
- // methods are needed to perform accurate arithmetic or comparison.)
24766
- //
24767
- // To fix the problem, coerce this object or symbol value to a string before
24768
- // passing it to React. The most reliable way is usually `String(value)`.
24769
- //
24770
- // To find which value is throwing, check the browser or debugger console.
24771
- // Before this exception was thrown, there should be `console.error` output
24772
- // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
24773
- // problem and how that type was used: key, atrribute, input value prop, etc.
24774
- // In most cases, this console output also shows the component and its
24775
- // ancestor components where the exception happened.
24776
- //
24777
- // eslint-disable-next-line react-internal/safe-string-coercion
24778
- return '' + value;
24779
- }
24780
- function checkKeyStringCoercion(value) {
24781
- {
24782
- if (willCoercionThrow(value)) {
24783
- error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
24784
-
24785
- return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
24786
- }
24787
- }
24788
- }
24789
-
24790
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
24791
- var RESERVED_PROPS = {
24792
- key: true,
24793
- ref: true,
24794
- __self: true,
24795
- __source: true
24796
- };
24797
- var specialPropKeyWarningShown;
24798
- var specialPropRefWarningShown;
24799
- var didWarnAboutStringRefs;
24800
-
24801
- {
24802
- didWarnAboutStringRefs = {};
24803
- }
24804
-
24805
- function hasValidRef(config) {
24806
- {
24807
- if (hasOwnProperty.call(config, 'ref')) {
24808
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
24809
-
24810
- if (getter && getter.isReactWarning) {
24811
- return false;
24812
- }
24813
- }
24814
- }
24815
-
24816
- return config.ref !== undefined;
24817
- }
24818
-
24819
- function hasValidKey(config) {
24820
- {
24821
- if (hasOwnProperty.call(config, 'key')) {
24822
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
24823
-
24824
- if (getter && getter.isReactWarning) {
24825
- return false;
24826
- }
24827
- }
24828
- }
24829
-
24830
- return config.key !== undefined;
24831
- }
24832
-
24833
- function warnIfStringRefCannotBeAutoConverted(config, self) {
24834
- {
24835
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
24836
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
24837
-
24838
- if (!didWarnAboutStringRefs[componentName]) {
24839
- 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://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
24840
-
24841
- didWarnAboutStringRefs[componentName] = true;
24842
- }
24843
- }
24844
- }
24845
- }
24846
-
24847
- function defineKeyPropWarningGetter(props, displayName) {
24848
- {
24849
- var warnAboutAccessingKey = function () {
24850
- if (!specialPropKeyWarningShown) {
24851
- specialPropKeyWarningShown = true;
24852
-
24853
- 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://reactjs.org/link/special-props)', displayName);
24854
- }
24855
- };
24856
-
24857
- warnAboutAccessingKey.isReactWarning = true;
24858
- Object.defineProperty(props, 'key', {
24859
- get: warnAboutAccessingKey,
24860
- configurable: true
24861
- });
24862
- }
24863
- }
24864
-
24865
- function defineRefPropWarningGetter(props, displayName) {
24866
- {
24867
- var warnAboutAccessingRef = function () {
24868
- if (!specialPropRefWarningShown) {
24869
- specialPropRefWarningShown = true;
24870
-
24871
- 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://reactjs.org/link/special-props)', displayName);
24872
- }
24873
- };
24874
-
24875
- warnAboutAccessingRef.isReactWarning = true;
24876
- Object.defineProperty(props, 'ref', {
24877
- get: warnAboutAccessingRef,
24878
- configurable: true
24879
- });
24880
- }
24881
- }
24882
- /**
24883
- * Factory method to create a new React element. This no longer adheres to
24884
- * the class pattern, so do not use new to call it. Also, instanceof check
24885
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
24886
- * if something is a React Element.
24887
- *
24888
- * @param {*} type
24889
- * @param {*} props
24890
- * @param {*} key
24891
- * @param {string|object} ref
24892
- * @param {*} owner
24893
- * @param {*} self A *temporary* helper to detect places where `this` is
24894
- * different from the `owner` when React.createElement is called, so that we
24895
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
24896
- * functions, and as long as `this` and owner are the same, there will be no
24897
- * change in behavior.
24898
- * @param {*} source An annotation object (added by a transpiler or otherwise)
24899
- * indicating filename, line number, and/or other information.
24900
- * @internal
24901
- */
24902
-
24903
-
24904
- var ReactElement = function (type, key, ref, self, source, owner, props) {
24905
- var element = {
24906
- // This tag allows us to uniquely identify this as a React Element
24907
- $$typeof: REACT_ELEMENT_TYPE,
24908
- // Built-in properties that belong on the element
24909
- type: type,
24910
- key: key,
24911
- ref: ref,
24912
- props: props,
24913
- // Record the component responsible for creating this element.
24914
- _owner: owner
24915
- };
24916
-
24917
- {
24918
- // The validation flag is currently mutative. We put it on
24919
- // an external backing store so that we can freeze the whole object.
24920
- // This can be replaced with a WeakMap once they are implemented in
24921
- // commonly used development environments.
24922
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
24923
- // the validation flag non-enumerable (where possible, which should
24924
- // include every environment we run tests in), so the test framework
24925
- // ignores it.
24926
-
24927
- Object.defineProperty(element._store, 'validated', {
24928
- configurable: false,
24929
- enumerable: false,
24930
- writable: true,
24931
- value: false
24932
- }); // self and source are DEV only properties.
24933
-
24934
- Object.defineProperty(element, '_self', {
24935
- configurable: false,
24936
- enumerable: false,
24937
- writable: false,
24938
- value: self
24939
- }); // Two elements created in two different places should be considered
24940
- // equal for testing purposes and therefore we hide it from enumeration.
24941
-
24942
- Object.defineProperty(element, '_source', {
24943
- configurable: false,
24944
- enumerable: false,
24945
- writable: false,
24946
- value: source
24947
- });
24948
-
24949
- if (Object.freeze) {
24950
- Object.freeze(element.props);
24951
- Object.freeze(element);
24952
- }
24953
- }
24954
-
24955
- return element;
24956
- };
24957
- /**
24958
- * https://github.com/reactjs/rfcs/pull/107
24959
- * @param {*} type
24960
- * @param {object} props
24961
- * @param {string} key
24962
- */
24963
-
24964
- function jsxDEV(type, config, maybeKey, source, self) {
24965
- {
24966
- var propName; // Reserved names are extracted
24967
-
24968
- var props = {};
24969
- var key = null;
24970
- var ref = null; // Currently, key can be spread in as a prop. This causes a potential
24971
- // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
24972
- // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
24973
- // but as an intermediary step, we will use jsxDEV for everything except
24974
- // <div {...props} key="Hi" />, because we aren't currently able to tell if
24975
- // key is explicitly declared to be undefined or not.
24976
-
24977
- if (maybeKey !== undefined) {
24978
- {
24979
- checkKeyStringCoercion(maybeKey);
24980
- }
24981
-
24982
- key = '' + maybeKey;
24983
- }
24984
-
24985
- if (hasValidKey(config)) {
24986
- {
24987
- checkKeyStringCoercion(config.key);
24988
- }
24989
-
24990
- key = '' + config.key;
24991
- }
24992
-
24993
- if (hasValidRef(config)) {
24994
- ref = config.ref;
24995
- warnIfStringRefCannotBeAutoConverted(config, self);
24996
- } // Remaining properties are added to a new props object
24997
-
24998
-
24999
- for (propName in config) {
25000
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
25001
- props[propName] = config[propName];
25002
- }
25003
- } // Resolve default props
25004
-
25005
-
25006
- if (type && type.defaultProps) {
25007
- var defaultProps = type.defaultProps;
25008
-
25009
- for (propName in defaultProps) {
25010
- if (props[propName] === undefined) {
25011
- props[propName] = defaultProps[propName];
25012
- }
25013
- }
25014
- }
25015
-
25016
- if (key || ref) {
25017
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
25018
-
25019
- if (key) {
25020
- defineKeyPropWarningGetter(props, displayName);
25021
- }
25022
-
25023
- if (ref) {
25024
- defineRefPropWarningGetter(props, displayName);
25025
- }
25026
- }
25027
-
25028
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
25029
- }
25030
- }
25031
-
25032
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
25033
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
25034
-
25035
- function setCurrentlyValidatingElement$1(element) {
25036
- {
25037
- if (element) {
25038
- var owner = element._owner;
25039
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
25040
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
25041
- } else {
25042
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
25043
- }
25044
- }
25045
- }
25046
-
25047
- var propTypesMisspellWarningShown;
25048
-
25049
- {
25050
- propTypesMisspellWarningShown = false;
25051
- }
25052
- /**
25053
- * Verifies the object is a ReactElement.
25054
- * See https://reactjs.org/docs/react-api.html#isvalidelement
25055
- * @param {?object} object
25056
- * @return {boolean} True if `object` is a ReactElement.
25057
- * @final
25058
- */
25059
-
25060
-
25061
- function isValidElement(object) {
25062
- {
25063
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
25064
- }
25065
- }
25066
-
25067
- function getDeclarationErrorAddendum() {
25068
- {
25069
- if (ReactCurrentOwner$1.current) {
25070
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
25071
-
25072
- if (name) {
25073
- return '\n\nCheck the render method of `' + name + '`.';
25074
- }
25075
- }
25076
-
25077
- return '';
25078
- }
25079
- }
25080
-
25081
- function getSourceInfoErrorAddendum(source) {
25082
- {
25083
-
25084
- return '';
25085
- }
25086
- }
25087
- /**
25088
- * Warn if there's no key explicitly set on dynamic arrays of children or
25089
- * object keys are not valid. This allows us to keep track of children between
25090
- * updates.
25091
- */
25092
-
25093
-
25094
- var ownerHasKeyUseWarning = {};
25095
-
25096
- function getCurrentComponentErrorInfo(parentType) {
25097
- {
25098
- var info = getDeclarationErrorAddendum();
25099
-
25100
- if (!info) {
25101
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
25102
-
25103
- if (parentName) {
25104
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
25105
- }
25106
- }
25107
-
25108
- return info;
25109
- }
25110
- }
25111
- /**
25112
- * Warn if the element doesn't have an explicit key assigned to it.
25113
- * This element is in an array. The array could grow and shrink or be
25114
- * reordered. All children that haven't already been validated are required to
25115
- * have a "key" property assigned to it. Error statuses are cached so a warning
25116
- * will only be shown once.
25117
- *
25118
- * @internal
25119
- * @param {ReactElement} element Element that requires a key.
25120
- * @param {*} parentType element's parent's type.
25121
- */
25122
-
25123
-
25124
- function validateExplicitKey(element, parentType) {
25125
- {
25126
- if (!element._store || element._store.validated || element.key != null) {
25127
- return;
25128
- }
25129
-
25130
- element._store.validated = true;
25131
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
25132
-
25133
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
25134
- return;
25135
- }
25136
-
25137
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
25138
- // property, it may be the creator of the child that's responsible for
25139
- // assigning it a key.
25140
-
25141
- var childOwner = '';
25142
-
25143
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
25144
- // Give the component that originally created this child.
25145
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
25146
- }
25147
-
25148
- setCurrentlyValidatingElement$1(element);
25149
-
25150
- error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
25151
-
25152
- setCurrentlyValidatingElement$1(null);
25153
- }
25154
- }
25155
- /**
25156
- * Ensure that every element either is passed in a static location, in an
25157
- * array with an explicit keys property defined, or in an object literal
25158
- * with valid key property.
25159
- *
25160
- * @internal
25161
- * @param {ReactNode} node Statically passed child of any type.
25162
- * @param {*} parentType node's parent's type.
25163
- */
25164
-
25165
-
25166
- function validateChildKeys(node, parentType) {
25167
- {
25168
- if (typeof node !== 'object') {
25169
- return;
25170
- }
25171
-
25172
- if (isArray(node)) {
25173
- for (var i = 0; i < node.length; i++) {
25174
- var child = node[i];
25175
-
25176
- if (isValidElement(child)) {
25177
- validateExplicitKey(child, parentType);
25178
- }
25179
- }
25180
- } else if (isValidElement(node)) {
25181
- // This element was passed in a valid location.
25182
- if (node._store) {
25183
- node._store.validated = true;
25184
- }
25185
- } else if (node) {
25186
- var iteratorFn = getIteratorFn(node);
25187
-
25188
- if (typeof iteratorFn === 'function') {
25189
- // Entry iterators used to provide implicit keys,
25190
- // but now we print a separate warning for them later.
25191
- if (iteratorFn !== node.entries) {
25192
- var iterator = iteratorFn.call(node);
25193
- var step;
25194
-
25195
- while (!(step = iterator.next()).done) {
25196
- if (isValidElement(step.value)) {
25197
- validateExplicitKey(step.value, parentType);
25198
- }
25199
- }
25200
- }
25201
- }
25202
- }
25203
- }
25204
- }
25205
- /**
25206
- * Given an element, validate that its props follow the propTypes definition,
25207
- * provided by the type.
25208
- *
25209
- * @param {ReactElement} element
25210
- */
25211
-
25212
-
25213
- function validatePropTypes(element) {
25214
- {
25215
- var type = element.type;
25216
-
25217
- if (type === null || type === undefined || typeof type === 'string') {
25218
- return;
25219
- }
25220
-
25221
- var propTypes;
25222
-
25223
- if (typeof type === 'function') {
25224
- propTypes = type.propTypes;
25225
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
25226
- // Inner props are checked in the reconciler.
25227
- type.$$typeof === REACT_MEMO_TYPE)) {
25228
- propTypes = type.propTypes;
25229
- } else {
25230
- return;
25231
- }
25232
-
25233
- if (propTypes) {
25234
- // Intentionally inside to avoid triggering lazy initializers:
25235
- var name = getComponentNameFromType(type);
25236
- checkPropTypes(propTypes, element.props, 'prop', name, element);
25237
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
25238
- propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
25239
-
25240
- var _name = getComponentNameFromType(type);
25241
-
25242
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
25243
- }
25244
-
25245
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
25246
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
25247
- }
25248
- }
25249
- }
25250
- /**
25251
- * Given a fragment, validate that it can only be provided with fragment props
25252
- * @param {ReactElement} fragment
25253
- */
25254
-
25255
-
25256
- function validateFragmentProps(fragment) {
25257
- {
25258
- var keys = Object.keys(fragment.props);
25259
-
25260
- for (var i = 0; i < keys.length; i++) {
25261
- var key = keys[i];
25262
-
25263
- if (key !== 'children' && key !== 'key') {
25264
- setCurrentlyValidatingElement$1(fragment);
25265
-
25266
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
25267
-
25268
- setCurrentlyValidatingElement$1(null);
25269
- break;
25270
- }
25271
- }
25272
-
25273
- if (fragment.ref !== null) {
25274
- setCurrentlyValidatingElement$1(fragment);
25275
-
25276
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
25277
-
25278
- setCurrentlyValidatingElement$1(null);
25279
- }
25280
- }
25281
- }
25282
-
25283
- var didWarnAboutKeySpread = {};
25284
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
25285
- {
25286
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
25287
- // succeed and there will likely be errors in render.
25288
-
25289
- if (!validType) {
25290
- var info = '';
25291
-
25292
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
25293
- 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.";
25294
- }
25295
-
25296
- var sourceInfo = getSourceInfoErrorAddendum();
25297
-
25298
- if (sourceInfo) {
25299
- info += sourceInfo;
25300
- } else {
25301
- info += getDeclarationErrorAddendum();
25302
- }
25303
-
25304
- var typeString;
25305
-
25306
- if (type === null) {
25307
- typeString = 'null';
25308
- } else if (isArray(type)) {
25309
- typeString = 'array';
25310
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
25311
- typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
25312
- info = ' Did you accidentally export a JSX literal instead of a component?';
25313
- } else {
25314
- typeString = typeof type;
25315
- }
25316
-
25317
- error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
25318
- }
25319
-
25320
- var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
25321
- // TODO: Drop this when these are no longer allowed as the type argument.
25322
-
25323
- if (element == null) {
25324
- return element;
25325
- } // Skip key warning if the type isn't valid since our key validation logic
25326
- // doesn't expect a non-string/function type and can throw confusing errors.
25327
- // We don't want exception behavior to differ between dev and prod.
25328
- // (Rendering will throw with a helpful message and as soon as the type is
25329
- // fixed, the key warnings will appear.)
25330
-
25331
-
25332
- if (validType) {
25333
- var children = props.children;
25334
-
25335
- if (children !== undefined) {
25336
- if (isStaticChildren) {
25337
- if (isArray(children)) {
25338
- for (var i = 0; i < children.length; i++) {
25339
- validateChildKeys(children[i], type);
25340
- }
25341
-
25342
- if (Object.freeze) {
25343
- Object.freeze(children);
25344
- }
25345
- } else {
25346
- error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
25347
- }
25348
- } else {
25349
- validateChildKeys(children, type);
25350
- }
25351
- }
25352
- }
25353
-
25354
- {
25355
- if (hasOwnProperty.call(props, 'key')) {
25356
- var componentName = getComponentNameFromType(type);
25357
- var keys = Object.keys(props).filter(function (k) {
25358
- return k !== 'key';
25359
- });
25360
- var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
25361
-
25362
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
25363
- var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
25364
-
25365
- error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
25366
-
25367
- didWarnAboutKeySpread[componentName + beforeExample] = true;
25368
- }
25369
- }
25370
- }
25371
-
25372
- if (type === REACT_FRAGMENT_TYPE) {
25373
- validateFragmentProps(element);
25374
- } else {
25375
- validatePropTypes(element);
25376
- }
25377
-
25378
- return element;
25379
- }
25380
- } // These two functions exist to still get child warnings in dev
25381
- // even with the prod transform. This means that jsxDEV is purely
25382
- // opt-in behavior for better messages but that we won't stop
25383
- // giving you warnings if you use production apis.
25384
-
25385
- function jsxWithValidationStatic(type, props, key) {
25386
- {
25387
- return jsxWithValidation(type, props, key, true);
25388
- }
25389
- }
25390
- function jsxWithValidationDynamic(type, props, key) {
25391
- {
25392
- return jsxWithValidation(type, props, key, false);
25393
- }
25394
- }
25395
-
25396
- var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
25397
- // for now we can ship identical prod functions
25398
-
25399
- var jsxs = jsxWithValidationStatic ;
25400
-
25401
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
25402
- reactJsxRuntime_development.jsx = jsx;
25403
- reactJsxRuntime_development.jsxs = jsxs;
25404
- })();
25405
- }
25406
- return reactJsxRuntime_development;
25407
- }
25408
-
25409
- if (process.env.NODE_ENV === 'production') {
25410
- jsxRuntime.exports = requireReactJsxRuntime_production_min();
25411
- } else {
25412
- jsxRuntime.exports = requireReactJsxRuntime_development();
25413
- }
25414
-
25415
- var jsxRuntimeExports = jsxRuntime.exports;
25416
-
25417
24050
  var NativeMixView = reactNative.requireNativeComponent('VeLiveMixView');
25418
24051
  var index = 0;
25419
24052
  var getId = function () {
@@ -25437,21 +24070,21 @@ var MixView = React.forwardRef(function (props, ref) {
25437
24070
  };
25438
24071
  // eslint-disable-next-line react-hooks/exhaustive-deps
25439
24072
  }, [viewId]);
25440
- return (jsxRuntimeExports.jsx(NativeMixView, __assign({}, restProps, { viewId: viewId, captureMode: captureMode, captureFramerate: captureFramerate, autoSensitivity: autoSensitivity, ref: ref })));
24073
+ return (jsxRuntime.jsx(NativeMixView, __assign({}, restProps, { viewId: viewId, captureMode: captureMode, captureFramerate: captureFramerate, autoSensitivity: autoSensitivity, ref: ref })));
25441
24074
  });
25442
24075
 
25443
24076
  var VeView = React.forwardRef(function (props, ref) {
25444
24077
  var children = props.children, renderMode = props.renderMode, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, viewProps = __rest(props, ["children", "renderMode", "onViewMount", "onViewUnmount", "viewId"]);
25445
- return (jsxRuntimeExports.jsx(MixView, { renderMode: renderMode, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsxRuntimeExports.jsx(reactNative.View, __assign({}, viewProps, { ref: ref, children: children })) }));
24078
+ return (jsxRuntime.jsx(MixView, { renderMode: renderMode, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsxRuntime.jsx(reactNative.View, __assign({}, viewProps, { ref: ref, children: children })) }));
25446
24079
  });
25447
24080
 
25448
24081
  var VeTextView = React.forwardRef(function (props, ref) {
25449
24082
  var renderMode = props.renderMode, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, textProps = __rest(props, ["renderMode", "onViewMount", "onViewUnmount", "viewId"]);
25450
- return (jsxRuntimeExports.jsx(MixView, { renderMode: renderMode, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsxRuntimeExports.jsx(reactNative.Text, __assign({}, textProps, { ref: ref, children: textProps.children })) }));
24083
+ return (jsxRuntime.jsx(MixView, { renderMode: renderMode, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsxRuntime.jsx(reactNative.Text, __assign({}, textProps, { ref: ref, children: textProps.children })) }));
25451
24084
  });
25452
24085
 
25453
24086
  var VeImageView = React.forwardRef(function (props, ref) {
25454
- var children = props.children, renderMode = props.renderMode, _a = props.animated, animated = _a === void 0 ? false : _a, captureMode = props.captureMode, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, imageProps = __rest(props, ["children", "renderMode", "animated", "captureMode", "onViewMount", "onViewUnmount", "viewId"]);
24087
+ var children = props.children, renderMode = props.renderMode, _a = props.animated, animated = _a === void 0 ? false : _a, captureMode = props.captureMode, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, style = props.style, imageProps = __rest(props, ["children", "renderMode", "animated", "captureMode", "onViewMount", "onViewUnmount", "viewId", "style"]);
25455
24088
  var captureViewId = React.useRef(viewId || '');
25456
24089
  // Auto-detect capture mode based on animation
25457
24090
  var finalCaptureMode = captureMode || (animated ? 'realtime' : 'onchange');
@@ -25461,12 +24094,19 @@ var VeImageView = React.forwardRef(function (props, ref) {
25461
24094
  var onWrapperViewMount = function (calcViewId) {
25462
24095
  captureViewId.current = calcViewId;
25463
24096
  };
25464
- return (jsxRuntimeExports.jsx(MixView, { renderMode: renderMode, captureMode: finalCaptureMode, viewId: viewId, onViewMount: onWrapperViewMount, onViewUnmount: onViewUnmount, children: children ? (children) : (jsxRuntimeExports.jsx(reactNative.Image, __assign({}, imageProps, { onLoad: handleImageLoad, style: { width: '100%', height: '100%' }, ref: ref }))) }));
24097
+ var mergedStyle = React.useMemo(function () {
24098
+ var defaultStyle = {
24099
+ width: '100%',
24100
+ height: '100%',
24101
+ };
24102
+ return reactNative.StyleSheet.flatten([defaultStyle, style]);
24103
+ }, [style]);
24104
+ return (jsxRuntime.jsx(MixView, { renderMode: renderMode, captureMode: finalCaptureMode, viewId: viewId, onViewMount: onWrapperViewMount, onViewUnmount: onViewUnmount, children: children ? (children) : (jsxRuntime.jsx(reactNative.Image, __assign({}, imageProps, { onLoad: handleImageLoad, style: mergedStyle, ref: ref }))) }));
25465
24105
  });
25466
24106
 
25467
24107
  var VeWebView = React.forwardRef(function (props, ref) {
25468
24108
  var renderMode = props.renderMode, _a = props.captureMode, captureMode = _a === void 0 ? 'auto' : _a, onViewMount = props.onViewMount, onViewUnmount = props.onViewUnmount, viewId = props.viewId, viewProps = __rest(props, ["renderMode", "captureMode", "onViewMount", "onViewUnmount", "viewId"]);
25469
- return (jsxRuntimeExports.jsx(MixView, { renderMode: renderMode, captureMode: captureMode, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsxRuntimeExports.jsx(reactNative.View, __assign({}, viewProps, { ref: ref })) }));
24109
+ return (jsxRuntime.jsx(MixView, { renderMode: renderMode, captureMode: captureMode, viewId: viewId, onViewMount: onViewMount, onViewUnmount: onViewUnmount, children: jsxRuntime.jsx(reactNative.View, __assign({}, viewProps, { ref: ref })) }));
25470
24110
  });
25471
24111
 
25472
24112
  setupJSBridge(new ReactNativeBridge(reactNative.NativeModules.VeLivePushModule, 'VeLivePush:onEvent'));