Comparing version 19.1.0-canary-42687267-20250108 to 19.1.0-canary-4632e36a-20250216
@@ -17,3 +17,3 @@ /** | ||
if ("function" === typeof type) | ||
return type.$$typeof === REACT_CLIENT_REFERENCE$2 | ||
return type.$$typeof === REACT_CLIENT_REFERENCE | ||
? null | ||
@@ -98,252 +98,17 @@ : type.displayName || type.name || null; | ||
} | ||
function disabledLog() {} | ||
function disableLogs() { | ||
if (0 === disabledDepth) { | ||
prevLog = console.log; | ||
prevInfo = console.info; | ||
prevWarn = console.warn; | ||
prevError = console.error; | ||
prevGroup = console.group; | ||
prevGroupCollapsed = console.groupCollapsed; | ||
prevGroupEnd = console.groupEnd; | ||
var props = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: disabledLog, | ||
writable: !0 | ||
}; | ||
Object.defineProperties(console, { | ||
info: props, | ||
log: props, | ||
warn: props, | ||
error: props, | ||
group: props, | ||
groupCollapsed: props, | ||
groupEnd: props | ||
}); | ||
} | ||
disabledDepth++; | ||
} | ||
function reenableLogs() { | ||
disabledDepth--; | ||
if (0 === disabledDepth) { | ||
var props = { configurable: !0, enumerable: !0, writable: !0 }; | ||
Object.defineProperties(console, { | ||
log: assign({}, props, { value: prevLog }), | ||
info: assign({}, props, { value: prevInfo }), | ||
warn: assign({}, props, { value: prevWarn }), | ||
error: assign({}, props, { value: prevError }), | ||
group: assign({}, props, { value: prevGroup }), | ||
groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), | ||
groupEnd: assign({}, props, { value: prevGroupEnd }) | ||
}); | ||
} | ||
0 > disabledDepth && | ||
console.error( | ||
"disabledDepth fell below zero. This is a bug in React. Please file an issue." | ||
); | ||
} | ||
function describeBuiltInComponentFrame(name) { | ||
if (void 0 === prefix) | ||
try { | ||
throw Error(); | ||
} catch (x) { | ||
var match = x.stack.trim().match(/\n( *(at )?)/); | ||
prefix = (match && match[1]) || ""; | ||
suffix = | ||
-1 < x.stack.indexOf("\n at") | ||
? " (<anonymous>)" | ||
: -1 < x.stack.indexOf("@") | ||
? "@unknown:0:0" | ||
: ""; | ||
} | ||
return "\n" + prefix + name + suffix; | ||
} | ||
function describeNativeComponentFrame(fn, construct) { | ||
if (!fn || reentry) return ""; | ||
var frame = componentFrameCache.get(fn); | ||
if (void 0 !== frame) return frame; | ||
reentry = !0; | ||
frame = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var previousDispatcher = null; | ||
previousDispatcher = ReactSharedInternals.H; | ||
ReactSharedInternals.H = null; | ||
disableLogs(); | ||
function getTaskName(type) { | ||
if (type === REACT_FRAGMENT_TYPE) return "<>"; | ||
if ( | ||
"object" === typeof type && | ||
null !== type && | ||
type.$$typeof === REACT_LAZY_TYPE | ||
) | ||
return "<...>"; | ||
try { | ||
var RunInRootFrame = { | ||
DetermineComponentFrameRoot: function () { | ||
try { | ||
if (construct) { | ||
var Fake = function () { | ||
throw Error(); | ||
}; | ||
Object.defineProperty(Fake.prototype, "props", { | ||
set: function () { | ||
throw Error(); | ||
} | ||
}); | ||
if ("object" === typeof Reflect && Reflect.construct) { | ||
try { | ||
Reflect.construct(Fake, []); | ||
} catch (x) { | ||
var control = x; | ||
} | ||
Reflect.construct(fn, [], Fake); | ||
} else { | ||
try { | ||
Fake.call(); | ||
} catch (x$0) { | ||
control = x$0; | ||
} | ||
fn.call(Fake.prototype); | ||
} | ||
} else { | ||
try { | ||
throw Error(); | ||
} catch (x$1) { | ||
control = x$1; | ||
} | ||
(Fake = fn()) && | ||
"function" === typeof Fake.catch && | ||
Fake.catch(function () {}); | ||
} | ||
} catch (sample) { | ||
if (sample && control && "string" === typeof sample.stack) | ||
return [sample.stack, control.stack]; | ||
} | ||
return [null, null]; | ||
} | ||
}; | ||
RunInRootFrame.DetermineComponentFrameRoot.displayName = | ||
"DetermineComponentFrameRoot"; | ||
var namePropDescriptor = Object.getOwnPropertyDescriptor( | ||
RunInRootFrame.DetermineComponentFrameRoot, | ||
"name" | ||
); | ||
namePropDescriptor && | ||
namePropDescriptor.configurable && | ||
Object.defineProperty( | ||
RunInRootFrame.DetermineComponentFrameRoot, | ||
"name", | ||
{ value: "DetermineComponentFrameRoot" } | ||
); | ||
var _RunInRootFrame$Deter = | ||
RunInRootFrame.DetermineComponentFrameRoot(), | ||
sampleStack = _RunInRootFrame$Deter[0], | ||
controlStack = _RunInRootFrame$Deter[1]; | ||
if (sampleStack && controlStack) { | ||
var sampleLines = sampleStack.split("\n"), | ||
controlLines = controlStack.split("\n"); | ||
for ( | ||
_RunInRootFrame$Deter = namePropDescriptor = 0; | ||
namePropDescriptor < sampleLines.length && | ||
!sampleLines[namePropDescriptor].includes( | ||
"DetermineComponentFrameRoot" | ||
); | ||
) | ||
namePropDescriptor++; | ||
for ( | ||
; | ||
_RunInRootFrame$Deter < controlLines.length && | ||
!controlLines[_RunInRootFrame$Deter].includes( | ||
"DetermineComponentFrameRoot" | ||
); | ||
) | ||
_RunInRootFrame$Deter++; | ||
if ( | ||
namePropDescriptor === sampleLines.length || | ||
_RunInRootFrame$Deter === controlLines.length | ||
) | ||
for ( | ||
namePropDescriptor = sampleLines.length - 1, | ||
_RunInRootFrame$Deter = controlLines.length - 1; | ||
1 <= namePropDescriptor && | ||
0 <= _RunInRootFrame$Deter && | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter]; | ||
) | ||
_RunInRootFrame$Deter--; | ||
for ( | ||
; | ||
1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; | ||
namePropDescriptor--, _RunInRootFrame$Deter-- | ||
) | ||
if ( | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter] | ||
) { | ||
if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { | ||
do | ||
if ( | ||
(namePropDescriptor--, | ||
_RunInRootFrame$Deter--, | ||
0 > _RunInRootFrame$Deter || | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter]) | ||
) { | ||
var _frame = | ||
"\n" + | ||
sampleLines[namePropDescriptor].replace( | ||
" at new ", | ||
" at " | ||
); | ||
fn.displayName && | ||
_frame.includes("<anonymous>") && | ||
(_frame = _frame.replace("<anonymous>", fn.displayName)); | ||
"function" === typeof fn && | ||
componentFrameCache.set(fn, _frame); | ||
return _frame; | ||
} | ||
while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); | ||
} | ||
break; | ||
} | ||
} | ||
} finally { | ||
(reentry = !1), | ||
(ReactSharedInternals.H = previousDispatcher), | ||
reenableLogs(), | ||
(Error.prepareStackTrace = frame); | ||
var name = getComponentNameFromType(type); | ||
return name ? "<" + name + ">" : "<...>"; | ||
} catch (x) { | ||
return "<...>"; | ||
} | ||
sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") | ||
? describeBuiltInComponentFrame(sampleLines) | ||
: ""; | ||
"function" === typeof fn && componentFrameCache.set(fn, sampleLines); | ||
return sampleLines; | ||
} | ||
function describeUnknownElementTypeFrameInDEV(type) { | ||
if (null == type) return ""; | ||
if ("function" === typeof type) { | ||
var prototype = type.prototype; | ||
return describeNativeComponentFrame( | ||
type, | ||
!(!prototype || !prototype.isReactComponent) | ||
); | ||
} | ||
if ("string" === typeof type) return describeBuiltInComponentFrame(type); | ||
switch (type) { | ||
case REACT_SUSPENSE_TYPE: | ||
return describeBuiltInComponentFrame("Suspense"); | ||
case REACT_SUSPENSE_LIST_TYPE: | ||
return describeBuiltInComponentFrame("SuspenseList"); | ||
} | ||
if ("object" === typeof type) | ||
switch (type.$$typeof) { | ||
case REACT_FORWARD_REF_TYPE: | ||
return describeNativeComponentFrame(type.render, !1); | ||
case REACT_MEMO_TYPE: | ||
return describeUnknownElementTypeFrameInDEV(type.type); | ||
case REACT_LAZY_TYPE: | ||
prototype = type._payload; | ||
type = type._init; | ||
try { | ||
return describeUnknownElementTypeFrameInDEV(type(prototype)); | ||
} catch (x) {} | ||
} | ||
return ""; | ||
} | ||
function getOwner() { | ||
@@ -385,3 +150,12 @@ var dispatcher = ReactSharedInternals.A; | ||
} | ||
function ReactElement(type, key, self, source, owner, props) { | ||
function ReactElement( | ||
type, | ||
key, | ||
self, | ||
source, | ||
owner, | ||
props, | ||
debugStack, | ||
debugTask | ||
) { | ||
self = props.ref; | ||
@@ -414,2 +188,14 @@ type = { | ||
}); | ||
Object.defineProperty(type, "_debugStack", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !0, | ||
value: debugStack | ||
}); | ||
Object.defineProperty(type, "_debugTask", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !0, | ||
value: debugTask | ||
}); | ||
Object.freeze && (Object.freeze(type.props), Object.freeze(type)); | ||
@@ -424,67 +210,22 @@ return type; | ||
source, | ||
self | ||
self, | ||
debugStack, | ||
debugTask | ||
) { | ||
if ( | ||
"string" === typeof type || | ||
"function" === typeof type || | ||
type === REACT_FRAGMENT_TYPE || | ||
type === REACT_PROFILER_TYPE || | ||
type === REACT_STRICT_MODE_TYPE || | ||
type === REACT_SUSPENSE_TYPE || | ||
type === REACT_SUSPENSE_LIST_TYPE || | ||
type === REACT_OFFSCREEN_TYPE || | ||
("object" === typeof type && | ||
null !== type && | ||
(type.$$typeof === REACT_LAZY_TYPE || | ||
type.$$typeof === REACT_MEMO_TYPE || | ||
type.$$typeof === REACT_CONTEXT_TYPE || | ||
type.$$typeof === REACT_CONSUMER_TYPE || | ||
type.$$typeof === REACT_FORWARD_REF_TYPE || | ||
type.$$typeof === REACT_CLIENT_REFERENCE$1 || | ||
void 0 !== type.getModuleId)) | ||
) { | ||
var children = config.children; | ||
if (void 0 !== children) | ||
if (isStaticChildren) | ||
if (isArrayImpl(children)) { | ||
for ( | ||
isStaticChildren = 0; | ||
isStaticChildren < children.length; | ||
isStaticChildren++ | ||
) | ||
validateChildKeys(children[isStaticChildren], type); | ||
Object.freeze && Object.freeze(children); | ||
} else | ||
console.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." | ||
); | ||
else validateChildKeys(children, type); | ||
} else { | ||
children = ""; | ||
if ( | ||
void 0 === type || | ||
("object" === typeof type && | ||
null !== type && | ||
0 === Object.keys(type).length) | ||
) | ||
children += | ||
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; | ||
null === type | ||
? (isStaticChildren = "null") | ||
: isArrayImpl(type) | ||
? (isStaticChildren = "array") | ||
: void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE | ||
? ((isStaticChildren = | ||
"<" + | ||
(getComponentNameFromType(type.type) || "Unknown") + | ||
" />"), | ||
(children = | ||
" Did you accidentally export a JSX literal instead of a component?")) | ||
: (isStaticChildren = typeof type); | ||
console.error( | ||
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", | ||
isStaticChildren, | ||
children | ||
); | ||
} | ||
var children = config.children; | ||
if (void 0 !== children) | ||
if (isStaticChildren) | ||
if (isArrayImpl(children)) { | ||
for ( | ||
isStaticChildren = 0; | ||
isStaticChildren < children.length; | ||
isStaticChildren++ | ||
) | ||
validateChildKeys(children[isStaticChildren]); | ||
Object.freeze && Object.freeze(children); | ||
} else | ||
console.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." | ||
); | ||
else validateChildKeys(children); | ||
if (hasOwnProperty.call(config, "key")) { | ||
@@ -528,85 +269,20 @@ children = getComponentNameFromType(type); | ||
); | ||
return ReactElement(type, children, self, source, getOwner(), maybeKey); | ||
} | ||
function validateChildKeys(node, parentType) { | ||
if ( | ||
"object" === typeof node && | ||
node && | ||
node.$$typeof !== REACT_CLIENT_REFERENCE | ||
) | ||
if (isArrayImpl(node)) | ||
for (var i = 0; i < node.length; i++) { | ||
var child = node[i]; | ||
isValidElement(child) && validateExplicitKey(child, parentType); | ||
} | ||
else if (isValidElement(node)) | ||
node._store && (node._store.validated = 1); | ||
else if ( | ||
(null === node || "object" !== typeof node | ||
? (i = null) | ||
: ((i = | ||
(MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) || | ||
node["@@iterator"]), | ||
(i = "function" === typeof i ? i : null)), | ||
"function" === typeof i && | ||
i !== node.entries && | ||
((i = i.call(node)), i !== node)) | ||
) | ||
for (; !(node = i.next()).done; ) | ||
isValidElement(node.value) && | ||
validateExplicitKey(node.value, parentType); | ||
} | ||
function isValidElement(object) { | ||
return ( | ||
"object" === typeof object && | ||
null !== object && | ||
object.$$typeof === REACT_ELEMENT_TYPE | ||
return ReactElement( | ||
type, | ||
children, | ||
self, | ||
source, | ||
getOwner(), | ||
maybeKey, | ||
debugStack, | ||
debugTask | ||
); | ||
} | ||
function validateExplicitKey(element, parentType) { | ||
if ( | ||
element._store && | ||
!element._store.validated && | ||
null == element.key && | ||
((element._store.validated = 1), | ||
(parentType = getCurrentComponentErrorInfo(parentType)), | ||
!ownerHasKeyUseWarning[parentType]) | ||
) { | ||
ownerHasKeyUseWarning[parentType] = !0; | ||
var childOwner = ""; | ||
element && | ||
null != element._owner && | ||
element._owner !== getOwner() && | ||
((childOwner = null), | ||
"number" === typeof element._owner.tag | ||
? (childOwner = getComponentNameFromType(element._owner.type)) | ||
: "string" === typeof element._owner.name && | ||
(childOwner = element._owner.name), | ||
(childOwner = " It was passed a child from " + childOwner + ".")); | ||
var prevGetCurrentStack = ReactSharedInternals.getCurrentStack; | ||
ReactSharedInternals.getCurrentStack = function () { | ||
var stack = describeUnknownElementTypeFrameInDEV(element.type); | ||
prevGetCurrentStack && (stack += prevGetCurrentStack() || ""); | ||
return stack; | ||
}; | ||
console.error( | ||
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', | ||
parentType, | ||
childOwner | ||
); | ||
ReactSharedInternals.getCurrentStack = prevGetCurrentStack; | ||
} | ||
function validateChildKeys(node) { | ||
"object" === typeof node && | ||
null !== node && | ||
node.$$typeof === REACT_ELEMENT_TYPE && | ||
node._store && | ||
(node._store.validated = 1); | ||
} | ||
function getCurrentComponentErrorInfo(parentType) { | ||
var info = "", | ||
owner = getOwner(); | ||
owner && | ||
(owner = getComponentNameFromType(owner.type)) && | ||
(info = "\n\nCheck the render method of `" + owner + "`."); | ||
info || | ||
((parentType = getComponentNameFromType(parentType)) && | ||
(info = | ||
"\n\nCheck the top-level render call using <" + parentType + ">.")); | ||
return info; | ||
} | ||
var React = require("react"), | ||
@@ -626,31 +302,16 @@ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), | ||
REACT_LAZY_TYPE = Symbol.for("react.lazy"), | ||
REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), | ||
MAYBE_ITERATOR_SYMBOL = Symbol.iterator, | ||
REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"), | ||
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), | ||
ReactSharedInternals = | ||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, | ||
hasOwnProperty = Object.prototype.hasOwnProperty, | ||
assign = Object.assign, | ||
REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"), | ||
isArrayImpl = Array.isArray, | ||
disabledDepth = 0, | ||
prevLog, | ||
prevInfo, | ||
prevWarn, | ||
prevError, | ||
prevGroup, | ||
prevGroupCollapsed, | ||
prevGroupEnd; | ||
disabledLog.__reactDisabledLog = !0; | ||
var prefix, | ||
suffix, | ||
reentry = !1; | ||
var componentFrameCache = new ( | ||
"function" === typeof WeakMap ? WeakMap : Map | ||
)(); | ||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), | ||
isArrayImpl = Array.isArray; | ||
new ("function" === typeof WeakMap ? WeakMap : Map)(); | ||
var createTask = console.createTask | ||
? console.createTask | ||
: function () { | ||
return null; | ||
}, | ||
specialPropKeyWarningShown; | ||
var didWarnAboutElementRef = {}; | ||
var didWarnAboutKeySpread = {}, | ||
ownerHasKeyUseWarning = {}; | ||
var didWarnAboutKeySpread = {}; | ||
exports.Fragment = REACT_FRAGMENT_TYPE; | ||
@@ -665,4 +326,13 @@ exports.jsxDEV = function ( | ||
) { | ||
return jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self); | ||
return jsxDEVImpl( | ||
type, | ||
config, | ||
maybeKey, | ||
isStaticChildren, | ||
source, | ||
self, | ||
Error("react-stack-top-frame"), | ||
createTask(getTaskName(type)) | ||
); | ||
}; | ||
})(); |
@@ -17,3 +17,3 @@ /** | ||
if ("function" === typeof type) | ||
return type.$$typeof === REACT_CLIENT_REFERENCE$2 | ||
return type.$$typeof === REACT_CLIENT_REFERENCE | ||
? null | ||
@@ -98,252 +98,17 @@ : type.displayName || type.name || null; | ||
} | ||
function disabledLog() {} | ||
function disableLogs() { | ||
if (0 === disabledDepth) { | ||
prevLog = console.log; | ||
prevInfo = console.info; | ||
prevWarn = console.warn; | ||
prevError = console.error; | ||
prevGroup = console.group; | ||
prevGroupCollapsed = console.groupCollapsed; | ||
prevGroupEnd = console.groupEnd; | ||
var props = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: disabledLog, | ||
writable: !0 | ||
}; | ||
Object.defineProperties(console, { | ||
info: props, | ||
log: props, | ||
warn: props, | ||
error: props, | ||
group: props, | ||
groupCollapsed: props, | ||
groupEnd: props | ||
}); | ||
} | ||
disabledDepth++; | ||
} | ||
function reenableLogs() { | ||
disabledDepth--; | ||
if (0 === disabledDepth) { | ||
var props = { configurable: !0, enumerable: !0, writable: !0 }; | ||
Object.defineProperties(console, { | ||
log: assign({}, props, { value: prevLog }), | ||
info: assign({}, props, { value: prevInfo }), | ||
warn: assign({}, props, { value: prevWarn }), | ||
error: assign({}, props, { value: prevError }), | ||
group: assign({}, props, { value: prevGroup }), | ||
groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), | ||
groupEnd: assign({}, props, { value: prevGroupEnd }) | ||
}); | ||
} | ||
0 > disabledDepth && | ||
console.error( | ||
"disabledDepth fell below zero. This is a bug in React. Please file an issue." | ||
); | ||
} | ||
function describeBuiltInComponentFrame(name) { | ||
if (void 0 === prefix) | ||
try { | ||
throw Error(); | ||
} catch (x) { | ||
var match = x.stack.trim().match(/\n( *(at )?)/); | ||
prefix = (match && match[1]) || ""; | ||
suffix = | ||
-1 < x.stack.indexOf("\n at") | ||
? " (<anonymous>)" | ||
: -1 < x.stack.indexOf("@") | ||
? "@unknown:0:0" | ||
: ""; | ||
} | ||
return "\n" + prefix + name + suffix; | ||
} | ||
function describeNativeComponentFrame(fn, construct) { | ||
if (!fn || reentry) return ""; | ||
var frame = componentFrameCache.get(fn); | ||
if (void 0 !== frame) return frame; | ||
reentry = !0; | ||
frame = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var previousDispatcher = null; | ||
previousDispatcher = ReactSharedInternalsServer.H; | ||
ReactSharedInternalsServer.H = null; | ||
disableLogs(); | ||
function getTaskName(type) { | ||
if (type === REACT_FRAGMENT_TYPE) return "<>"; | ||
if ( | ||
"object" === typeof type && | ||
null !== type && | ||
type.$$typeof === REACT_LAZY_TYPE | ||
) | ||
return "<...>"; | ||
try { | ||
var RunInRootFrame = { | ||
DetermineComponentFrameRoot: function () { | ||
try { | ||
if (construct) { | ||
var Fake = function () { | ||
throw Error(); | ||
}; | ||
Object.defineProperty(Fake.prototype, "props", { | ||
set: function () { | ||
throw Error(); | ||
} | ||
}); | ||
if ("object" === typeof Reflect && Reflect.construct) { | ||
try { | ||
Reflect.construct(Fake, []); | ||
} catch (x) { | ||
var control = x; | ||
} | ||
Reflect.construct(fn, [], Fake); | ||
} else { | ||
try { | ||
Fake.call(); | ||
} catch (x$0) { | ||
control = x$0; | ||
} | ||
fn.call(Fake.prototype); | ||
} | ||
} else { | ||
try { | ||
throw Error(); | ||
} catch (x$1) { | ||
control = x$1; | ||
} | ||
(Fake = fn()) && | ||
"function" === typeof Fake.catch && | ||
Fake.catch(function () {}); | ||
} | ||
} catch (sample) { | ||
if (sample && control && "string" === typeof sample.stack) | ||
return [sample.stack, control.stack]; | ||
} | ||
return [null, null]; | ||
} | ||
}; | ||
RunInRootFrame.DetermineComponentFrameRoot.displayName = | ||
"DetermineComponentFrameRoot"; | ||
var namePropDescriptor = Object.getOwnPropertyDescriptor( | ||
RunInRootFrame.DetermineComponentFrameRoot, | ||
"name" | ||
); | ||
namePropDescriptor && | ||
namePropDescriptor.configurable && | ||
Object.defineProperty( | ||
RunInRootFrame.DetermineComponentFrameRoot, | ||
"name", | ||
{ value: "DetermineComponentFrameRoot" } | ||
); | ||
var _RunInRootFrame$Deter = | ||
RunInRootFrame.DetermineComponentFrameRoot(), | ||
sampleStack = _RunInRootFrame$Deter[0], | ||
controlStack = _RunInRootFrame$Deter[1]; | ||
if (sampleStack && controlStack) { | ||
var sampleLines = sampleStack.split("\n"), | ||
controlLines = controlStack.split("\n"); | ||
for ( | ||
_RunInRootFrame$Deter = namePropDescriptor = 0; | ||
namePropDescriptor < sampleLines.length && | ||
!sampleLines[namePropDescriptor].includes( | ||
"DetermineComponentFrameRoot" | ||
); | ||
) | ||
namePropDescriptor++; | ||
for ( | ||
; | ||
_RunInRootFrame$Deter < controlLines.length && | ||
!controlLines[_RunInRootFrame$Deter].includes( | ||
"DetermineComponentFrameRoot" | ||
); | ||
) | ||
_RunInRootFrame$Deter++; | ||
if ( | ||
namePropDescriptor === sampleLines.length || | ||
_RunInRootFrame$Deter === controlLines.length | ||
) | ||
for ( | ||
namePropDescriptor = sampleLines.length - 1, | ||
_RunInRootFrame$Deter = controlLines.length - 1; | ||
1 <= namePropDescriptor && | ||
0 <= _RunInRootFrame$Deter && | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter]; | ||
) | ||
_RunInRootFrame$Deter--; | ||
for ( | ||
; | ||
1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; | ||
namePropDescriptor--, _RunInRootFrame$Deter-- | ||
) | ||
if ( | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter] | ||
) { | ||
if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { | ||
do | ||
if ( | ||
(namePropDescriptor--, | ||
_RunInRootFrame$Deter--, | ||
0 > _RunInRootFrame$Deter || | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter]) | ||
) { | ||
var _frame = | ||
"\n" + | ||
sampleLines[namePropDescriptor].replace( | ||
" at new ", | ||
" at " | ||
); | ||
fn.displayName && | ||
_frame.includes("<anonymous>") && | ||
(_frame = _frame.replace("<anonymous>", fn.displayName)); | ||
"function" === typeof fn && | ||
componentFrameCache.set(fn, _frame); | ||
return _frame; | ||
} | ||
while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); | ||
} | ||
break; | ||
} | ||
} | ||
} finally { | ||
(reentry = !1), | ||
(ReactSharedInternalsServer.H = previousDispatcher), | ||
reenableLogs(), | ||
(Error.prepareStackTrace = frame); | ||
var name = getComponentNameFromType(type); | ||
return name ? "<" + name + ">" : "<...>"; | ||
} catch (x) { | ||
return "<...>"; | ||
} | ||
sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") | ||
? describeBuiltInComponentFrame(sampleLines) | ||
: ""; | ||
"function" === typeof fn && componentFrameCache.set(fn, sampleLines); | ||
return sampleLines; | ||
} | ||
function describeUnknownElementTypeFrameInDEV(type) { | ||
if (null == type) return ""; | ||
if ("function" === typeof type) { | ||
var prototype = type.prototype; | ||
return describeNativeComponentFrame( | ||
type, | ||
!(!prototype || !prototype.isReactComponent) | ||
); | ||
} | ||
if ("string" === typeof type) return describeBuiltInComponentFrame(type); | ||
switch (type) { | ||
case REACT_SUSPENSE_TYPE: | ||
return describeBuiltInComponentFrame("Suspense"); | ||
case REACT_SUSPENSE_LIST_TYPE: | ||
return describeBuiltInComponentFrame("SuspenseList"); | ||
} | ||
if ("object" === typeof type) | ||
switch (type.$$typeof) { | ||
case REACT_FORWARD_REF_TYPE: | ||
return describeNativeComponentFrame(type.render, !1); | ||
case REACT_MEMO_TYPE: | ||
return describeUnknownElementTypeFrameInDEV(type.type); | ||
case REACT_LAZY_TYPE: | ||
prototype = type._payload; | ||
type = type._init; | ||
try { | ||
return describeUnknownElementTypeFrameInDEV(type(prototype)); | ||
} catch (x) {} | ||
} | ||
return ""; | ||
} | ||
function getOwner() { | ||
@@ -385,3 +150,12 @@ var dispatcher = ReactSharedInternalsServer.A; | ||
} | ||
function ReactElement(type, key, self, source, owner, props) { | ||
function ReactElement( | ||
type, | ||
key, | ||
self, | ||
source, | ||
owner, | ||
props, | ||
debugStack, | ||
debugTask | ||
) { | ||
self = props.ref; | ||
@@ -414,2 +188,14 @@ type = { | ||
}); | ||
Object.defineProperty(type, "_debugStack", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !0, | ||
value: debugStack | ||
}); | ||
Object.defineProperty(type, "_debugTask", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !0, | ||
value: debugTask | ||
}); | ||
Object.freeze && (Object.freeze(type.props), Object.freeze(type)); | ||
@@ -424,67 +210,22 @@ return type; | ||
source, | ||
self | ||
self, | ||
debugStack, | ||
debugTask | ||
) { | ||
if ( | ||
"string" === typeof type || | ||
"function" === typeof type || | ||
type === REACT_FRAGMENT_TYPE || | ||
type === REACT_PROFILER_TYPE || | ||
type === REACT_STRICT_MODE_TYPE || | ||
type === REACT_SUSPENSE_TYPE || | ||
type === REACT_SUSPENSE_LIST_TYPE || | ||
type === REACT_OFFSCREEN_TYPE || | ||
("object" === typeof type && | ||
null !== type && | ||
(type.$$typeof === REACT_LAZY_TYPE || | ||
type.$$typeof === REACT_MEMO_TYPE || | ||
type.$$typeof === REACT_CONTEXT_TYPE || | ||
type.$$typeof === REACT_CONSUMER_TYPE || | ||
type.$$typeof === REACT_FORWARD_REF_TYPE || | ||
type.$$typeof === REACT_CLIENT_REFERENCE$1 || | ||
void 0 !== type.getModuleId)) | ||
) { | ||
var children = config.children; | ||
if (void 0 !== children) | ||
if (isStaticChildren) | ||
if (isArrayImpl(children)) { | ||
for ( | ||
isStaticChildren = 0; | ||
isStaticChildren < children.length; | ||
isStaticChildren++ | ||
) | ||
validateChildKeys(children[isStaticChildren], type); | ||
Object.freeze && Object.freeze(children); | ||
} else | ||
console.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." | ||
); | ||
else validateChildKeys(children, type); | ||
} else { | ||
children = ""; | ||
if ( | ||
void 0 === type || | ||
("object" === typeof type && | ||
null !== type && | ||
0 === Object.keys(type).length) | ||
) | ||
children += | ||
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; | ||
null === type | ||
? (isStaticChildren = "null") | ||
: isArrayImpl(type) | ||
? (isStaticChildren = "array") | ||
: void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE | ||
? ((isStaticChildren = | ||
"<" + | ||
(getComponentNameFromType(type.type) || "Unknown") + | ||
" />"), | ||
(children = | ||
" Did you accidentally export a JSX literal instead of a component?")) | ||
: (isStaticChildren = typeof type); | ||
console.error( | ||
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", | ||
isStaticChildren, | ||
children | ||
); | ||
} | ||
var children = config.children; | ||
if (void 0 !== children) | ||
if (isStaticChildren) | ||
if (isArrayImpl(children)) { | ||
for ( | ||
isStaticChildren = 0; | ||
isStaticChildren < children.length; | ||
isStaticChildren++ | ||
) | ||
validateChildKeys(children[isStaticChildren]); | ||
Object.freeze && Object.freeze(children); | ||
} else | ||
console.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." | ||
); | ||
else validateChildKeys(children); | ||
if (hasOwnProperty.call(config, "key")) { | ||
@@ -528,85 +269,20 @@ children = getComponentNameFromType(type); | ||
); | ||
return ReactElement(type, children, self, source, getOwner(), maybeKey); | ||
} | ||
function validateChildKeys(node, parentType) { | ||
if ( | ||
"object" === typeof node && | ||
node && | ||
node.$$typeof !== REACT_CLIENT_REFERENCE | ||
) | ||
if (isArrayImpl(node)) | ||
for (var i = 0; i < node.length; i++) { | ||
var child = node[i]; | ||
isValidElement(child) && validateExplicitKey(child, parentType); | ||
} | ||
else if (isValidElement(node)) | ||
node._store && (node._store.validated = 1); | ||
else if ( | ||
(null === node || "object" !== typeof node | ||
? (i = null) | ||
: ((i = | ||
(MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) || | ||
node["@@iterator"]), | ||
(i = "function" === typeof i ? i : null)), | ||
"function" === typeof i && | ||
i !== node.entries && | ||
((i = i.call(node)), i !== node)) | ||
) | ||
for (; !(node = i.next()).done; ) | ||
isValidElement(node.value) && | ||
validateExplicitKey(node.value, parentType); | ||
} | ||
function isValidElement(object) { | ||
return ( | ||
"object" === typeof object && | ||
null !== object && | ||
object.$$typeof === REACT_ELEMENT_TYPE | ||
return ReactElement( | ||
type, | ||
children, | ||
self, | ||
source, | ||
getOwner(), | ||
maybeKey, | ||
debugStack, | ||
debugTask | ||
); | ||
} | ||
function validateExplicitKey(element, parentType) { | ||
if ( | ||
element._store && | ||
!element._store.validated && | ||
null == element.key && | ||
((element._store.validated = 1), | ||
(parentType = getCurrentComponentErrorInfo(parentType)), | ||
!ownerHasKeyUseWarning[parentType]) | ||
) { | ||
ownerHasKeyUseWarning[parentType] = !0; | ||
var childOwner = ""; | ||
element && | ||
null != element._owner && | ||
element._owner !== getOwner() && | ||
((childOwner = null), | ||
"number" === typeof element._owner.tag | ||
? (childOwner = getComponentNameFromType(element._owner.type)) | ||
: "string" === typeof element._owner.name && | ||
(childOwner = element._owner.name), | ||
(childOwner = " It was passed a child from " + childOwner + ".")); | ||
var prevGetCurrentStack = ReactSharedInternalsServer.getCurrentStack; | ||
ReactSharedInternalsServer.getCurrentStack = function () { | ||
var stack = describeUnknownElementTypeFrameInDEV(element.type); | ||
prevGetCurrentStack && (stack += prevGetCurrentStack() || ""); | ||
return stack; | ||
}; | ||
console.error( | ||
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', | ||
parentType, | ||
childOwner | ||
); | ||
ReactSharedInternalsServer.getCurrentStack = prevGetCurrentStack; | ||
} | ||
function validateChildKeys(node) { | ||
"object" === typeof node && | ||
null !== node && | ||
node.$$typeof === REACT_ELEMENT_TYPE && | ||
node._store && | ||
(node._store.validated = 1); | ||
} | ||
function getCurrentComponentErrorInfo(parentType) { | ||
var info = "", | ||
owner = getOwner(); | ||
owner && | ||
(owner = getComponentNameFromType(owner.type)) && | ||
(info = "\n\nCheck the render method of `" + owner + "`."); | ||
info || | ||
((parentType = getComponentNameFromType(parentType)) && | ||
(info = | ||
"\n\nCheck the top-level render call using <" + parentType + ">.")); | ||
return info; | ||
} | ||
var React = require("react"), | ||
@@ -626,5 +302,3 @@ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), | ||
REACT_LAZY_TYPE = Symbol.for("react.lazy"), | ||
REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), | ||
MAYBE_ITERATOR_SYMBOL = Symbol.iterator, | ||
REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"), | ||
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), | ||
ReactSharedInternalsServer = | ||
@@ -637,28 +311,24 @@ React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; | ||
var hasOwnProperty = Object.prototype.hasOwnProperty, | ||
assign = Object.assign, | ||
REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"), | ||
isArrayImpl = Array.isArray, | ||
disabledDepth = 0, | ||
prevLog, | ||
prevInfo, | ||
prevWarn, | ||
prevError, | ||
prevGroup, | ||
prevGroupCollapsed, | ||
prevGroupEnd; | ||
disabledLog.__reactDisabledLog = !0; | ||
var prefix, | ||
suffix, | ||
reentry = !1; | ||
var componentFrameCache = new ( | ||
"function" === typeof WeakMap ? WeakMap : Map | ||
)(); | ||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), | ||
isArrayImpl = Array.isArray; | ||
new ("function" === typeof WeakMap ? WeakMap : Map)(); | ||
var createTask = console.createTask | ||
? console.createTask | ||
: function () { | ||
return null; | ||
}, | ||
specialPropKeyWarningShown; | ||
var didWarnAboutElementRef = {}; | ||
var didWarnAboutKeySpread = {}, | ||
ownerHasKeyUseWarning = {}; | ||
var didWarnAboutKeySpread = {}; | ||
exports.Fragment = REACT_FRAGMENT_TYPE; | ||
exports.jsx = function (type, config, maybeKey, source, self) { | ||
return jsxDEVImpl(type, config, maybeKey, !1, source, self); | ||
return jsxDEVImpl( | ||
type, | ||
config, | ||
maybeKey, | ||
!1, | ||
source, | ||
self, | ||
Error("react-stack-top-frame"), | ||
createTask(getTaskName(type)) | ||
); | ||
}; | ||
@@ -673,7 +343,25 @@ exports.jsxDEV = function ( | ||
) { | ||
return jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self); | ||
return jsxDEVImpl( | ||
type, | ||
config, | ||
maybeKey, | ||
isStaticChildren, | ||
source, | ||
self, | ||
Error("react-stack-top-frame"), | ||
createTask(getTaskName(type)) | ||
); | ||
}; | ||
exports.jsxs = function (type, config, maybeKey, source, self) { | ||
return jsxDEVImpl(type, config, maybeKey, !0, source, self); | ||
return jsxDEVImpl( | ||
type, | ||
config, | ||
maybeKey, | ||
!0, | ||
source, | ||
self, | ||
Error("react-stack-top-frame"), | ||
createTask(getTaskName(type)) | ||
); | ||
}; | ||
})(); |
@@ -17,3 +17,3 @@ /** | ||
if ("function" === typeof type) | ||
return type.$$typeof === REACT_CLIENT_REFERENCE$2 | ||
return type.$$typeof === REACT_CLIENT_REFERENCE | ||
? null | ||
@@ -98,252 +98,17 @@ : type.displayName || type.name || null; | ||
} | ||
function disabledLog() {} | ||
function disableLogs() { | ||
if (0 === disabledDepth) { | ||
prevLog = console.log; | ||
prevInfo = console.info; | ||
prevWarn = console.warn; | ||
prevError = console.error; | ||
prevGroup = console.group; | ||
prevGroupCollapsed = console.groupCollapsed; | ||
prevGroupEnd = console.groupEnd; | ||
var props = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: disabledLog, | ||
writable: !0 | ||
}; | ||
Object.defineProperties(console, { | ||
info: props, | ||
log: props, | ||
warn: props, | ||
error: props, | ||
group: props, | ||
groupCollapsed: props, | ||
groupEnd: props | ||
}); | ||
} | ||
disabledDepth++; | ||
} | ||
function reenableLogs() { | ||
disabledDepth--; | ||
if (0 === disabledDepth) { | ||
var props = { configurable: !0, enumerable: !0, writable: !0 }; | ||
Object.defineProperties(console, { | ||
log: assign({}, props, { value: prevLog }), | ||
info: assign({}, props, { value: prevInfo }), | ||
warn: assign({}, props, { value: prevWarn }), | ||
error: assign({}, props, { value: prevError }), | ||
group: assign({}, props, { value: prevGroup }), | ||
groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), | ||
groupEnd: assign({}, props, { value: prevGroupEnd }) | ||
}); | ||
} | ||
0 > disabledDepth && | ||
console.error( | ||
"disabledDepth fell below zero. This is a bug in React. Please file an issue." | ||
); | ||
} | ||
function describeBuiltInComponentFrame(name) { | ||
if (void 0 === prefix) | ||
try { | ||
throw Error(); | ||
} catch (x) { | ||
var match = x.stack.trim().match(/\n( *(at )?)/); | ||
prefix = (match && match[1]) || ""; | ||
suffix = | ||
-1 < x.stack.indexOf("\n at") | ||
? " (<anonymous>)" | ||
: -1 < x.stack.indexOf("@") | ||
? "@unknown:0:0" | ||
: ""; | ||
} | ||
return "\n" + prefix + name + suffix; | ||
} | ||
function describeNativeComponentFrame(fn, construct) { | ||
if (!fn || reentry) return ""; | ||
var frame = componentFrameCache.get(fn); | ||
if (void 0 !== frame) return frame; | ||
reentry = !0; | ||
frame = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var previousDispatcher = null; | ||
previousDispatcher = ReactSharedInternals.H; | ||
ReactSharedInternals.H = null; | ||
disableLogs(); | ||
function getTaskName(type) { | ||
if (type === REACT_FRAGMENT_TYPE) return "<>"; | ||
if ( | ||
"object" === typeof type && | ||
null !== type && | ||
type.$$typeof === REACT_LAZY_TYPE | ||
) | ||
return "<...>"; | ||
try { | ||
var RunInRootFrame = { | ||
DetermineComponentFrameRoot: function () { | ||
try { | ||
if (construct) { | ||
var Fake = function () { | ||
throw Error(); | ||
}; | ||
Object.defineProperty(Fake.prototype, "props", { | ||
set: function () { | ||
throw Error(); | ||
} | ||
}); | ||
if ("object" === typeof Reflect && Reflect.construct) { | ||
try { | ||
Reflect.construct(Fake, []); | ||
} catch (x) { | ||
var control = x; | ||
} | ||
Reflect.construct(fn, [], Fake); | ||
} else { | ||
try { | ||
Fake.call(); | ||
} catch (x$0) { | ||
control = x$0; | ||
} | ||
fn.call(Fake.prototype); | ||
} | ||
} else { | ||
try { | ||
throw Error(); | ||
} catch (x$1) { | ||
control = x$1; | ||
} | ||
(Fake = fn()) && | ||
"function" === typeof Fake.catch && | ||
Fake.catch(function () {}); | ||
} | ||
} catch (sample) { | ||
if (sample && control && "string" === typeof sample.stack) | ||
return [sample.stack, control.stack]; | ||
} | ||
return [null, null]; | ||
} | ||
}; | ||
RunInRootFrame.DetermineComponentFrameRoot.displayName = | ||
"DetermineComponentFrameRoot"; | ||
var namePropDescriptor = Object.getOwnPropertyDescriptor( | ||
RunInRootFrame.DetermineComponentFrameRoot, | ||
"name" | ||
); | ||
namePropDescriptor && | ||
namePropDescriptor.configurable && | ||
Object.defineProperty( | ||
RunInRootFrame.DetermineComponentFrameRoot, | ||
"name", | ||
{ value: "DetermineComponentFrameRoot" } | ||
); | ||
var _RunInRootFrame$Deter = | ||
RunInRootFrame.DetermineComponentFrameRoot(), | ||
sampleStack = _RunInRootFrame$Deter[0], | ||
controlStack = _RunInRootFrame$Deter[1]; | ||
if (sampleStack && controlStack) { | ||
var sampleLines = sampleStack.split("\n"), | ||
controlLines = controlStack.split("\n"); | ||
for ( | ||
_RunInRootFrame$Deter = namePropDescriptor = 0; | ||
namePropDescriptor < sampleLines.length && | ||
!sampleLines[namePropDescriptor].includes( | ||
"DetermineComponentFrameRoot" | ||
); | ||
) | ||
namePropDescriptor++; | ||
for ( | ||
; | ||
_RunInRootFrame$Deter < controlLines.length && | ||
!controlLines[_RunInRootFrame$Deter].includes( | ||
"DetermineComponentFrameRoot" | ||
); | ||
) | ||
_RunInRootFrame$Deter++; | ||
if ( | ||
namePropDescriptor === sampleLines.length || | ||
_RunInRootFrame$Deter === controlLines.length | ||
) | ||
for ( | ||
namePropDescriptor = sampleLines.length - 1, | ||
_RunInRootFrame$Deter = controlLines.length - 1; | ||
1 <= namePropDescriptor && | ||
0 <= _RunInRootFrame$Deter && | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter]; | ||
) | ||
_RunInRootFrame$Deter--; | ||
for ( | ||
; | ||
1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; | ||
namePropDescriptor--, _RunInRootFrame$Deter-- | ||
) | ||
if ( | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter] | ||
) { | ||
if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { | ||
do | ||
if ( | ||
(namePropDescriptor--, | ||
_RunInRootFrame$Deter--, | ||
0 > _RunInRootFrame$Deter || | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter]) | ||
) { | ||
var _frame = | ||
"\n" + | ||
sampleLines[namePropDescriptor].replace( | ||
" at new ", | ||
" at " | ||
); | ||
fn.displayName && | ||
_frame.includes("<anonymous>") && | ||
(_frame = _frame.replace("<anonymous>", fn.displayName)); | ||
"function" === typeof fn && | ||
componentFrameCache.set(fn, _frame); | ||
return _frame; | ||
} | ||
while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); | ||
} | ||
break; | ||
} | ||
} | ||
} finally { | ||
(reentry = !1), | ||
(ReactSharedInternals.H = previousDispatcher), | ||
reenableLogs(), | ||
(Error.prepareStackTrace = frame); | ||
var name = getComponentNameFromType(type); | ||
return name ? "<" + name + ">" : "<...>"; | ||
} catch (x) { | ||
return "<...>"; | ||
} | ||
sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") | ||
? describeBuiltInComponentFrame(sampleLines) | ||
: ""; | ||
"function" === typeof fn && componentFrameCache.set(fn, sampleLines); | ||
return sampleLines; | ||
} | ||
function describeUnknownElementTypeFrameInDEV(type) { | ||
if (null == type) return ""; | ||
if ("function" === typeof type) { | ||
var prototype = type.prototype; | ||
return describeNativeComponentFrame( | ||
type, | ||
!(!prototype || !prototype.isReactComponent) | ||
); | ||
} | ||
if ("string" === typeof type) return describeBuiltInComponentFrame(type); | ||
switch (type) { | ||
case REACT_SUSPENSE_TYPE: | ||
return describeBuiltInComponentFrame("Suspense"); | ||
case REACT_SUSPENSE_LIST_TYPE: | ||
return describeBuiltInComponentFrame("SuspenseList"); | ||
} | ||
if ("object" === typeof type) | ||
switch (type.$$typeof) { | ||
case REACT_FORWARD_REF_TYPE: | ||
return describeNativeComponentFrame(type.render, !1); | ||
case REACT_MEMO_TYPE: | ||
return describeUnknownElementTypeFrameInDEV(type.type); | ||
case REACT_LAZY_TYPE: | ||
prototype = type._payload; | ||
type = type._init; | ||
try { | ||
return describeUnknownElementTypeFrameInDEV(type(prototype)); | ||
} catch (x) {} | ||
} | ||
return ""; | ||
} | ||
function getOwner() { | ||
@@ -385,3 +150,12 @@ var dispatcher = ReactSharedInternals.A; | ||
} | ||
function ReactElement(type, key, self, source, owner, props) { | ||
function ReactElement( | ||
type, | ||
key, | ||
self, | ||
source, | ||
owner, | ||
props, | ||
debugStack, | ||
debugTask | ||
) { | ||
self = props.ref; | ||
@@ -414,2 +188,14 @@ type = { | ||
}); | ||
Object.defineProperty(type, "_debugStack", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !0, | ||
value: debugStack | ||
}); | ||
Object.defineProperty(type, "_debugTask", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !0, | ||
value: debugTask | ||
}); | ||
Object.freeze && (Object.freeze(type.props), Object.freeze(type)); | ||
@@ -424,67 +210,22 @@ return type; | ||
source, | ||
self | ||
self, | ||
debugStack, | ||
debugTask | ||
) { | ||
if ( | ||
"string" === typeof type || | ||
"function" === typeof type || | ||
type === REACT_FRAGMENT_TYPE || | ||
type === REACT_PROFILER_TYPE || | ||
type === REACT_STRICT_MODE_TYPE || | ||
type === REACT_SUSPENSE_TYPE || | ||
type === REACT_SUSPENSE_LIST_TYPE || | ||
type === REACT_OFFSCREEN_TYPE || | ||
("object" === typeof type && | ||
null !== type && | ||
(type.$$typeof === REACT_LAZY_TYPE || | ||
type.$$typeof === REACT_MEMO_TYPE || | ||
type.$$typeof === REACT_CONTEXT_TYPE || | ||
type.$$typeof === REACT_CONSUMER_TYPE || | ||
type.$$typeof === REACT_FORWARD_REF_TYPE || | ||
type.$$typeof === REACT_CLIENT_REFERENCE$1 || | ||
void 0 !== type.getModuleId)) | ||
) { | ||
var children = config.children; | ||
if (void 0 !== children) | ||
if (isStaticChildren) | ||
if (isArrayImpl(children)) { | ||
for ( | ||
isStaticChildren = 0; | ||
isStaticChildren < children.length; | ||
isStaticChildren++ | ||
) | ||
validateChildKeys(children[isStaticChildren], type); | ||
Object.freeze && Object.freeze(children); | ||
} else | ||
console.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." | ||
); | ||
else validateChildKeys(children, type); | ||
} else { | ||
children = ""; | ||
if ( | ||
void 0 === type || | ||
("object" === typeof type && | ||
null !== type && | ||
0 === Object.keys(type).length) | ||
) | ||
children += | ||
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; | ||
null === type | ||
? (isStaticChildren = "null") | ||
: isArrayImpl(type) | ||
? (isStaticChildren = "array") | ||
: void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE | ||
? ((isStaticChildren = | ||
"<" + | ||
(getComponentNameFromType(type.type) || "Unknown") + | ||
" />"), | ||
(children = | ||
" Did you accidentally export a JSX literal instead of a component?")) | ||
: (isStaticChildren = typeof type); | ||
console.error( | ||
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", | ||
isStaticChildren, | ||
children | ||
); | ||
} | ||
var children = config.children; | ||
if (void 0 !== children) | ||
if (isStaticChildren) | ||
if (isArrayImpl(children)) { | ||
for ( | ||
isStaticChildren = 0; | ||
isStaticChildren < children.length; | ||
isStaticChildren++ | ||
) | ||
validateChildKeys(children[isStaticChildren]); | ||
Object.freeze && Object.freeze(children); | ||
} else | ||
console.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." | ||
); | ||
else validateChildKeys(children); | ||
if (hasOwnProperty.call(config, "key")) { | ||
@@ -528,85 +269,20 @@ children = getComponentNameFromType(type); | ||
); | ||
return ReactElement(type, children, self, source, getOwner(), maybeKey); | ||
} | ||
function validateChildKeys(node, parentType) { | ||
if ( | ||
"object" === typeof node && | ||
node && | ||
node.$$typeof !== REACT_CLIENT_REFERENCE | ||
) | ||
if (isArrayImpl(node)) | ||
for (var i = 0; i < node.length; i++) { | ||
var child = node[i]; | ||
isValidElement(child) && validateExplicitKey(child, parentType); | ||
} | ||
else if (isValidElement(node)) | ||
node._store && (node._store.validated = 1); | ||
else if ( | ||
(null === node || "object" !== typeof node | ||
? (i = null) | ||
: ((i = | ||
(MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) || | ||
node["@@iterator"]), | ||
(i = "function" === typeof i ? i : null)), | ||
"function" === typeof i && | ||
i !== node.entries && | ||
((i = i.call(node)), i !== node)) | ||
) | ||
for (; !(node = i.next()).done; ) | ||
isValidElement(node.value) && | ||
validateExplicitKey(node.value, parentType); | ||
} | ||
function isValidElement(object) { | ||
return ( | ||
"object" === typeof object && | ||
null !== object && | ||
object.$$typeof === REACT_ELEMENT_TYPE | ||
return ReactElement( | ||
type, | ||
children, | ||
self, | ||
source, | ||
getOwner(), | ||
maybeKey, | ||
debugStack, | ||
debugTask | ||
); | ||
} | ||
function validateExplicitKey(element, parentType) { | ||
if ( | ||
element._store && | ||
!element._store.validated && | ||
null == element.key && | ||
((element._store.validated = 1), | ||
(parentType = getCurrentComponentErrorInfo(parentType)), | ||
!ownerHasKeyUseWarning[parentType]) | ||
) { | ||
ownerHasKeyUseWarning[parentType] = !0; | ||
var childOwner = ""; | ||
element && | ||
null != element._owner && | ||
element._owner !== getOwner() && | ||
((childOwner = null), | ||
"number" === typeof element._owner.tag | ||
? (childOwner = getComponentNameFromType(element._owner.type)) | ||
: "string" === typeof element._owner.name && | ||
(childOwner = element._owner.name), | ||
(childOwner = " It was passed a child from " + childOwner + ".")); | ||
var prevGetCurrentStack = ReactSharedInternals.getCurrentStack; | ||
ReactSharedInternals.getCurrentStack = function () { | ||
var stack = describeUnknownElementTypeFrameInDEV(element.type); | ||
prevGetCurrentStack && (stack += prevGetCurrentStack() || ""); | ||
return stack; | ||
}; | ||
console.error( | ||
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', | ||
parentType, | ||
childOwner | ||
); | ||
ReactSharedInternals.getCurrentStack = prevGetCurrentStack; | ||
} | ||
function validateChildKeys(node) { | ||
"object" === typeof node && | ||
null !== node && | ||
node.$$typeof === REACT_ELEMENT_TYPE && | ||
node._store && | ||
(node._store.validated = 1); | ||
} | ||
function getCurrentComponentErrorInfo(parentType) { | ||
var info = "", | ||
owner = getOwner(); | ||
owner && | ||
(owner = getComponentNameFromType(owner.type)) && | ||
(info = "\n\nCheck the render method of `" + owner + "`."); | ||
info || | ||
((parentType = getComponentNameFromType(parentType)) && | ||
(info = | ||
"\n\nCheck the top-level render call using <" + parentType + ">.")); | ||
return info; | ||
} | ||
var React = require("react"), | ||
@@ -626,38 +302,41 @@ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), | ||
REACT_LAZY_TYPE = Symbol.for("react.lazy"), | ||
REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), | ||
MAYBE_ITERATOR_SYMBOL = Symbol.iterator, | ||
REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"), | ||
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), | ||
ReactSharedInternals = | ||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, | ||
hasOwnProperty = Object.prototype.hasOwnProperty, | ||
assign = Object.assign, | ||
REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"), | ||
isArrayImpl = Array.isArray, | ||
disabledDepth = 0, | ||
prevLog, | ||
prevInfo, | ||
prevWarn, | ||
prevError, | ||
prevGroup, | ||
prevGroupCollapsed, | ||
prevGroupEnd; | ||
disabledLog.__reactDisabledLog = !0; | ||
var prefix, | ||
suffix, | ||
reentry = !1; | ||
var componentFrameCache = new ( | ||
"function" === typeof WeakMap ? WeakMap : Map | ||
)(); | ||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), | ||
isArrayImpl = Array.isArray; | ||
new ("function" === typeof WeakMap ? WeakMap : Map)(); | ||
var createTask = console.createTask | ||
? console.createTask | ||
: function () { | ||
return null; | ||
}, | ||
specialPropKeyWarningShown; | ||
var didWarnAboutElementRef = {}; | ||
var didWarnAboutKeySpread = {}, | ||
ownerHasKeyUseWarning = {}; | ||
var didWarnAboutKeySpread = {}; | ||
exports.Fragment = REACT_FRAGMENT_TYPE; | ||
exports.jsx = function (type, config, maybeKey, source, self) { | ||
return jsxDEVImpl(type, config, maybeKey, !1, source, self); | ||
return jsxDEVImpl( | ||
type, | ||
config, | ||
maybeKey, | ||
!1, | ||
source, | ||
self, | ||
Error("react-stack-top-frame"), | ||
createTask(getTaskName(type)) | ||
); | ||
}; | ||
exports.jsxs = function (type, config, maybeKey, source, self) { | ||
return jsxDEVImpl(type, config, maybeKey, !0, source, self); | ||
return jsxDEVImpl( | ||
type, | ||
config, | ||
maybeKey, | ||
!0, | ||
source, | ||
self, | ||
Error("react-stack-top-frame"), | ||
createTask(getTaskName(type)) | ||
); | ||
}; | ||
})(); |
@@ -17,3 +17,3 @@ /** | ||
if ("function" === typeof type) | ||
return type.$$typeof === REACT_CLIENT_REFERENCE$2 | ||
return type.$$typeof === REACT_CLIENT_REFERENCE | ||
? null | ||
@@ -98,252 +98,17 @@ : type.displayName || type.name || null; | ||
} | ||
function disabledLog() {} | ||
function disableLogs() { | ||
if (0 === disabledDepth) { | ||
prevLog = console.log; | ||
prevInfo = console.info; | ||
prevWarn = console.warn; | ||
prevError = console.error; | ||
prevGroup = console.group; | ||
prevGroupCollapsed = console.groupCollapsed; | ||
prevGroupEnd = console.groupEnd; | ||
var props = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: disabledLog, | ||
writable: !0 | ||
}; | ||
Object.defineProperties(console, { | ||
info: props, | ||
log: props, | ||
warn: props, | ||
error: props, | ||
group: props, | ||
groupCollapsed: props, | ||
groupEnd: props | ||
}); | ||
} | ||
disabledDepth++; | ||
} | ||
function reenableLogs() { | ||
disabledDepth--; | ||
if (0 === disabledDepth) { | ||
var props = { configurable: !0, enumerable: !0, writable: !0 }; | ||
Object.defineProperties(console, { | ||
log: assign({}, props, { value: prevLog }), | ||
info: assign({}, props, { value: prevInfo }), | ||
warn: assign({}, props, { value: prevWarn }), | ||
error: assign({}, props, { value: prevError }), | ||
group: assign({}, props, { value: prevGroup }), | ||
groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), | ||
groupEnd: assign({}, props, { value: prevGroupEnd }) | ||
}); | ||
} | ||
0 > disabledDepth && | ||
console.error( | ||
"disabledDepth fell below zero. This is a bug in React. Please file an issue." | ||
); | ||
} | ||
function describeBuiltInComponentFrame(name) { | ||
if (void 0 === prefix) | ||
try { | ||
throw Error(); | ||
} catch (x) { | ||
var match = x.stack.trim().match(/\n( *(at )?)/); | ||
prefix = (match && match[1]) || ""; | ||
suffix = | ||
-1 < x.stack.indexOf("\n at") | ||
? " (<anonymous>)" | ||
: -1 < x.stack.indexOf("@") | ||
? "@unknown:0:0" | ||
: ""; | ||
} | ||
return "\n" + prefix + name + suffix; | ||
} | ||
function describeNativeComponentFrame(fn, construct) { | ||
if (!fn || reentry) return ""; | ||
var frame = componentFrameCache.get(fn); | ||
if (void 0 !== frame) return frame; | ||
reentry = !0; | ||
frame = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var previousDispatcher = null; | ||
previousDispatcher = ReactSharedInternalsServer.H; | ||
ReactSharedInternalsServer.H = null; | ||
disableLogs(); | ||
function getTaskName(type) { | ||
if (type === REACT_FRAGMENT_TYPE) return "<>"; | ||
if ( | ||
"object" === typeof type && | ||
null !== type && | ||
type.$$typeof === REACT_LAZY_TYPE | ||
) | ||
return "<...>"; | ||
try { | ||
var RunInRootFrame = { | ||
DetermineComponentFrameRoot: function () { | ||
try { | ||
if (construct) { | ||
var Fake = function () { | ||
throw Error(); | ||
}; | ||
Object.defineProperty(Fake.prototype, "props", { | ||
set: function () { | ||
throw Error(); | ||
} | ||
}); | ||
if ("object" === typeof Reflect && Reflect.construct) { | ||
try { | ||
Reflect.construct(Fake, []); | ||
} catch (x) { | ||
var control = x; | ||
} | ||
Reflect.construct(fn, [], Fake); | ||
} else { | ||
try { | ||
Fake.call(); | ||
} catch (x$0) { | ||
control = x$0; | ||
} | ||
fn.call(Fake.prototype); | ||
} | ||
} else { | ||
try { | ||
throw Error(); | ||
} catch (x$1) { | ||
control = x$1; | ||
} | ||
(Fake = fn()) && | ||
"function" === typeof Fake.catch && | ||
Fake.catch(function () {}); | ||
} | ||
} catch (sample) { | ||
if (sample && control && "string" === typeof sample.stack) | ||
return [sample.stack, control.stack]; | ||
} | ||
return [null, null]; | ||
} | ||
}; | ||
RunInRootFrame.DetermineComponentFrameRoot.displayName = | ||
"DetermineComponentFrameRoot"; | ||
var namePropDescriptor = Object.getOwnPropertyDescriptor( | ||
RunInRootFrame.DetermineComponentFrameRoot, | ||
"name" | ||
); | ||
namePropDescriptor && | ||
namePropDescriptor.configurable && | ||
Object.defineProperty( | ||
RunInRootFrame.DetermineComponentFrameRoot, | ||
"name", | ||
{ value: "DetermineComponentFrameRoot" } | ||
); | ||
var _RunInRootFrame$Deter = | ||
RunInRootFrame.DetermineComponentFrameRoot(), | ||
sampleStack = _RunInRootFrame$Deter[0], | ||
controlStack = _RunInRootFrame$Deter[1]; | ||
if (sampleStack && controlStack) { | ||
var sampleLines = sampleStack.split("\n"), | ||
controlLines = controlStack.split("\n"); | ||
for ( | ||
_RunInRootFrame$Deter = namePropDescriptor = 0; | ||
namePropDescriptor < sampleLines.length && | ||
!sampleLines[namePropDescriptor].includes( | ||
"DetermineComponentFrameRoot" | ||
); | ||
) | ||
namePropDescriptor++; | ||
for ( | ||
; | ||
_RunInRootFrame$Deter < controlLines.length && | ||
!controlLines[_RunInRootFrame$Deter].includes( | ||
"DetermineComponentFrameRoot" | ||
); | ||
) | ||
_RunInRootFrame$Deter++; | ||
if ( | ||
namePropDescriptor === sampleLines.length || | ||
_RunInRootFrame$Deter === controlLines.length | ||
) | ||
for ( | ||
namePropDescriptor = sampleLines.length - 1, | ||
_RunInRootFrame$Deter = controlLines.length - 1; | ||
1 <= namePropDescriptor && | ||
0 <= _RunInRootFrame$Deter && | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter]; | ||
) | ||
_RunInRootFrame$Deter--; | ||
for ( | ||
; | ||
1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; | ||
namePropDescriptor--, _RunInRootFrame$Deter-- | ||
) | ||
if ( | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter] | ||
) { | ||
if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { | ||
do | ||
if ( | ||
(namePropDescriptor--, | ||
_RunInRootFrame$Deter--, | ||
0 > _RunInRootFrame$Deter || | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter]) | ||
) { | ||
var _frame = | ||
"\n" + | ||
sampleLines[namePropDescriptor].replace( | ||
" at new ", | ||
" at " | ||
); | ||
fn.displayName && | ||
_frame.includes("<anonymous>") && | ||
(_frame = _frame.replace("<anonymous>", fn.displayName)); | ||
"function" === typeof fn && | ||
componentFrameCache.set(fn, _frame); | ||
return _frame; | ||
} | ||
while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); | ||
} | ||
break; | ||
} | ||
} | ||
} finally { | ||
(reentry = !1), | ||
(ReactSharedInternalsServer.H = previousDispatcher), | ||
reenableLogs(), | ||
(Error.prepareStackTrace = frame); | ||
var name = getComponentNameFromType(type); | ||
return name ? "<" + name + ">" : "<...>"; | ||
} catch (x) { | ||
return "<...>"; | ||
} | ||
sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") | ||
? describeBuiltInComponentFrame(sampleLines) | ||
: ""; | ||
"function" === typeof fn && componentFrameCache.set(fn, sampleLines); | ||
return sampleLines; | ||
} | ||
function describeUnknownElementTypeFrameInDEV(type) { | ||
if (null == type) return ""; | ||
if ("function" === typeof type) { | ||
var prototype = type.prototype; | ||
return describeNativeComponentFrame( | ||
type, | ||
!(!prototype || !prototype.isReactComponent) | ||
); | ||
} | ||
if ("string" === typeof type) return describeBuiltInComponentFrame(type); | ||
switch (type) { | ||
case REACT_SUSPENSE_TYPE: | ||
return describeBuiltInComponentFrame("Suspense"); | ||
case REACT_SUSPENSE_LIST_TYPE: | ||
return describeBuiltInComponentFrame("SuspenseList"); | ||
} | ||
if ("object" === typeof type) | ||
switch (type.$$typeof) { | ||
case REACT_FORWARD_REF_TYPE: | ||
return describeNativeComponentFrame(type.render, !1); | ||
case REACT_MEMO_TYPE: | ||
return describeUnknownElementTypeFrameInDEV(type.type); | ||
case REACT_LAZY_TYPE: | ||
prototype = type._payload; | ||
type = type._init; | ||
try { | ||
return describeUnknownElementTypeFrameInDEV(type(prototype)); | ||
} catch (x) {} | ||
} | ||
return ""; | ||
} | ||
function getOwner() { | ||
@@ -385,3 +150,12 @@ var dispatcher = ReactSharedInternalsServer.A; | ||
} | ||
function ReactElement(type, key, self, source, owner, props) { | ||
function ReactElement( | ||
type, | ||
key, | ||
self, | ||
source, | ||
owner, | ||
props, | ||
debugStack, | ||
debugTask | ||
) { | ||
self = props.ref; | ||
@@ -414,2 +188,14 @@ type = { | ||
}); | ||
Object.defineProperty(type, "_debugStack", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !0, | ||
value: debugStack | ||
}); | ||
Object.defineProperty(type, "_debugTask", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !0, | ||
value: debugTask | ||
}); | ||
Object.freeze && (Object.freeze(type.props), Object.freeze(type)); | ||
@@ -424,67 +210,22 @@ return type; | ||
source, | ||
self | ||
self, | ||
debugStack, | ||
debugTask | ||
) { | ||
if ( | ||
"string" === typeof type || | ||
"function" === typeof type || | ||
type === REACT_FRAGMENT_TYPE || | ||
type === REACT_PROFILER_TYPE || | ||
type === REACT_STRICT_MODE_TYPE || | ||
type === REACT_SUSPENSE_TYPE || | ||
type === REACT_SUSPENSE_LIST_TYPE || | ||
type === REACT_OFFSCREEN_TYPE || | ||
("object" === typeof type && | ||
null !== type && | ||
(type.$$typeof === REACT_LAZY_TYPE || | ||
type.$$typeof === REACT_MEMO_TYPE || | ||
type.$$typeof === REACT_CONTEXT_TYPE || | ||
type.$$typeof === REACT_CONSUMER_TYPE || | ||
type.$$typeof === REACT_FORWARD_REF_TYPE || | ||
type.$$typeof === REACT_CLIENT_REFERENCE$1 || | ||
void 0 !== type.getModuleId)) | ||
) { | ||
var children = config.children; | ||
if (void 0 !== children) | ||
if (isStaticChildren) | ||
if (isArrayImpl(children)) { | ||
for ( | ||
isStaticChildren = 0; | ||
isStaticChildren < children.length; | ||
isStaticChildren++ | ||
) | ||
validateChildKeys(children[isStaticChildren], type); | ||
Object.freeze && Object.freeze(children); | ||
} else | ||
console.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." | ||
); | ||
else validateChildKeys(children, type); | ||
} else { | ||
children = ""; | ||
if ( | ||
void 0 === type || | ||
("object" === typeof type && | ||
null !== type && | ||
0 === Object.keys(type).length) | ||
) | ||
children += | ||
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; | ||
null === type | ||
? (isStaticChildren = "null") | ||
: isArrayImpl(type) | ||
? (isStaticChildren = "array") | ||
: void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE | ||
? ((isStaticChildren = | ||
"<" + | ||
(getComponentNameFromType(type.type) || "Unknown") + | ||
" />"), | ||
(children = | ||
" Did you accidentally export a JSX literal instead of a component?")) | ||
: (isStaticChildren = typeof type); | ||
console.error( | ||
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", | ||
isStaticChildren, | ||
children | ||
); | ||
} | ||
var children = config.children; | ||
if (void 0 !== children) | ||
if (isStaticChildren) | ||
if (isArrayImpl(children)) { | ||
for ( | ||
isStaticChildren = 0; | ||
isStaticChildren < children.length; | ||
isStaticChildren++ | ||
) | ||
validateChildKeys(children[isStaticChildren]); | ||
Object.freeze && Object.freeze(children); | ||
} else | ||
console.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." | ||
); | ||
else validateChildKeys(children); | ||
if (hasOwnProperty.call(config, "key")) { | ||
@@ -528,85 +269,20 @@ children = getComponentNameFromType(type); | ||
); | ||
return ReactElement(type, children, self, source, getOwner(), maybeKey); | ||
} | ||
function validateChildKeys(node, parentType) { | ||
if ( | ||
"object" === typeof node && | ||
node && | ||
node.$$typeof !== REACT_CLIENT_REFERENCE | ||
) | ||
if (isArrayImpl(node)) | ||
for (var i = 0; i < node.length; i++) { | ||
var child = node[i]; | ||
isValidElement(child) && validateExplicitKey(child, parentType); | ||
} | ||
else if (isValidElement(node)) | ||
node._store && (node._store.validated = 1); | ||
else if ( | ||
(null === node || "object" !== typeof node | ||
? (i = null) | ||
: ((i = | ||
(MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) || | ||
node["@@iterator"]), | ||
(i = "function" === typeof i ? i : null)), | ||
"function" === typeof i && | ||
i !== node.entries && | ||
((i = i.call(node)), i !== node)) | ||
) | ||
for (; !(node = i.next()).done; ) | ||
isValidElement(node.value) && | ||
validateExplicitKey(node.value, parentType); | ||
} | ||
function isValidElement(object) { | ||
return ( | ||
"object" === typeof object && | ||
null !== object && | ||
object.$$typeof === REACT_ELEMENT_TYPE | ||
return ReactElement( | ||
type, | ||
children, | ||
self, | ||
source, | ||
getOwner(), | ||
maybeKey, | ||
debugStack, | ||
debugTask | ||
); | ||
} | ||
function validateExplicitKey(element, parentType) { | ||
if ( | ||
element._store && | ||
!element._store.validated && | ||
null == element.key && | ||
((element._store.validated = 1), | ||
(parentType = getCurrentComponentErrorInfo(parentType)), | ||
!ownerHasKeyUseWarning[parentType]) | ||
) { | ||
ownerHasKeyUseWarning[parentType] = !0; | ||
var childOwner = ""; | ||
element && | ||
null != element._owner && | ||
element._owner !== getOwner() && | ||
((childOwner = null), | ||
"number" === typeof element._owner.tag | ||
? (childOwner = getComponentNameFromType(element._owner.type)) | ||
: "string" === typeof element._owner.name && | ||
(childOwner = element._owner.name), | ||
(childOwner = " It was passed a child from " + childOwner + ".")); | ||
var prevGetCurrentStack = ReactSharedInternalsServer.getCurrentStack; | ||
ReactSharedInternalsServer.getCurrentStack = function () { | ||
var stack = describeUnknownElementTypeFrameInDEV(element.type); | ||
prevGetCurrentStack && (stack += prevGetCurrentStack() || ""); | ||
return stack; | ||
}; | ||
console.error( | ||
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', | ||
parentType, | ||
childOwner | ||
); | ||
ReactSharedInternalsServer.getCurrentStack = prevGetCurrentStack; | ||
} | ||
function validateChildKeys(node) { | ||
"object" === typeof node && | ||
null !== node && | ||
node.$$typeof === REACT_ELEMENT_TYPE && | ||
node._store && | ||
(node._store.validated = 1); | ||
} | ||
function getCurrentComponentErrorInfo(parentType) { | ||
var info = "", | ||
owner = getOwner(); | ||
owner && | ||
(owner = getComponentNameFromType(owner.type)) && | ||
(info = "\n\nCheck the render method of `" + owner + "`."); | ||
info || | ||
((parentType = getComponentNameFromType(parentType)) && | ||
(info = | ||
"\n\nCheck the top-level render call using <" + parentType + ">.")); | ||
return info; | ||
} | ||
var React = require("react"), | ||
@@ -626,5 +302,3 @@ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), | ||
REACT_LAZY_TYPE = Symbol.for("react.lazy"), | ||
REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), | ||
MAYBE_ITERATOR_SYMBOL = Symbol.iterator, | ||
REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"), | ||
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), | ||
ReactSharedInternalsServer = | ||
@@ -637,28 +311,24 @@ React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; | ||
var hasOwnProperty = Object.prototype.hasOwnProperty, | ||
assign = Object.assign, | ||
REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"), | ||
isArrayImpl = Array.isArray, | ||
disabledDepth = 0, | ||
prevLog, | ||
prevInfo, | ||
prevWarn, | ||
prevError, | ||
prevGroup, | ||
prevGroupCollapsed, | ||
prevGroupEnd; | ||
disabledLog.__reactDisabledLog = !0; | ||
var prefix, | ||
suffix, | ||
reentry = !1; | ||
var componentFrameCache = new ( | ||
"function" === typeof WeakMap ? WeakMap : Map | ||
)(); | ||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), | ||
isArrayImpl = Array.isArray; | ||
new ("function" === typeof WeakMap ? WeakMap : Map)(); | ||
var createTask = console.createTask | ||
? console.createTask | ||
: function () { | ||
return null; | ||
}, | ||
specialPropKeyWarningShown; | ||
var didWarnAboutElementRef = {}; | ||
var didWarnAboutKeySpread = {}, | ||
ownerHasKeyUseWarning = {}; | ||
var didWarnAboutKeySpread = {}; | ||
exports.Fragment = REACT_FRAGMENT_TYPE; | ||
exports.jsx = function (type, config, maybeKey, source, self) { | ||
return jsxDEVImpl(type, config, maybeKey, !1, source, self); | ||
return jsxDEVImpl( | ||
type, | ||
config, | ||
maybeKey, | ||
!1, | ||
source, | ||
self, | ||
Error("react-stack-top-frame"), | ||
createTask(getTaskName(type)) | ||
); | ||
}; | ||
@@ -673,7 +343,25 @@ exports.jsxDEV = function ( | ||
) { | ||
return jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self); | ||
return jsxDEVImpl( | ||
type, | ||
config, | ||
maybeKey, | ||
isStaticChildren, | ||
source, | ||
self, | ||
Error("react-stack-top-frame"), | ||
createTask(getTaskName(type)) | ||
); | ||
}; | ||
exports.jsxs = function (type, config, maybeKey, source, self) { | ||
return jsxDEVImpl(type, config, maybeKey, !0, source, self); | ||
return jsxDEVImpl( | ||
type, | ||
config, | ||
maybeKey, | ||
!0, | ||
source, | ||
self, | ||
Error("react-stack-top-frame"), | ||
createTask(getTaskName(type)) | ||
); | ||
}; | ||
})(); |
@@ -90,3 +90,3 @@ /** | ||
if ("function" === typeof type) | ||
return type.$$typeof === REACT_CLIENT_REFERENCE$2 | ||
return type.$$typeof === REACT_CLIENT_REFERENCE$1 | ||
? null | ||
@@ -144,273 +144,17 @@ : type.displayName || type.name || null; | ||
} | ||
function isValidElementType(type) { | ||
return "string" === typeof type || | ||
"function" === typeof type || | ||
type === REACT_FRAGMENT_TYPE || | ||
type === REACT_PROFILER_TYPE || | ||
type === REACT_STRICT_MODE_TYPE || | ||
type === REACT_SUSPENSE_TYPE || | ||
type === REACT_SUSPENSE_LIST_TYPE || | ||
type === REACT_OFFSCREEN_TYPE || | ||
("object" === typeof type && | ||
null !== type && | ||
(type.$$typeof === REACT_LAZY_TYPE || | ||
type.$$typeof === REACT_MEMO_TYPE || | ||
type.$$typeof === REACT_CONTEXT_TYPE || | ||
type.$$typeof === REACT_CONSUMER_TYPE || | ||
type.$$typeof === REACT_FORWARD_REF_TYPE || | ||
type.$$typeof === REACT_CLIENT_REFERENCE$1 || | ||
void 0 !== type.getModuleId)) | ||
? !0 | ||
: !1; | ||
} | ||
function disabledLog() {} | ||
function disableLogs() { | ||
if (0 === disabledDepth) { | ||
prevLog = console.log; | ||
prevInfo = console.info; | ||
prevWarn = console.warn; | ||
prevError = console.error; | ||
prevGroup = console.group; | ||
prevGroupCollapsed = console.groupCollapsed; | ||
prevGroupEnd = console.groupEnd; | ||
var props = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: disabledLog, | ||
writable: !0 | ||
}; | ||
Object.defineProperties(console, { | ||
info: props, | ||
log: props, | ||
warn: props, | ||
error: props, | ||
group: props, | ||
groupCollapsed: props, | ||
groupEnd: props | ||
}); | ||
} | ||
disabledDepth++; | ||
} | ||
function reenableLogs() { | ||
disabledDepth--; | ||
if (0 === disabledDepth) { | ||
var props = { configurable: !0, enumerable: !0, writable: !0 }; | ||
Object.defineProperties(console, { | ||
log: assign({}, props, { value: prevLog }), | ||
info: assign({}, props, { value: prevInfo }), | ||
warn: assign({}, props, { value: prevWarn }), | ||
error: assign({}, props, { value: prevError }), | ||
group: assign({}, props, { value: prevGroup }), | ||
groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), | ||
groupEnd: assign({}, props, { value: prevGroupEnd }) | ||
}); | ||
} | ||
0 > disabledDepth && | ||
console.error( | ||
"disabledDepth fell below zero. This is a bug in React. Please file an issue." | ||
); | ||
} | ||
function describeBuiltInComponentFrame(name) { | ||
if (void 0 === prefix) | ||
try { | ||
throw Error(); | ||
} catch (x) { | ||
var match = x.stack.trim().match(/\n( *(at )?)/); | ||
prefix = (match && match[1]) || ""; | ||
suffix = | ||
-1 < x.stack.indexOf("\n at") | ||
? " (<anonymous>)" | ||
: -1 < x.stack.indexOf("@") | ||
? "@unknown:0:0" | ||
: ""; | ||
} | ||
return "\n" + prefix + name + suffix; | ||
} | ||
function describeNativeComponentFrame(fn, construct) { | ||
if (!fn || reentry) return ""; | ||
var frame = componentFrameCache.get(fn); | ||
if (void 0 !== frame) return frame; | ||
reentry = !0; | ||
frame = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var previousDispatcher = null; | ||
previousDispatcher = ReactSharedInternals.H; | ||
ReactSharedInternals.H = null; | ||
disableLogs(); | ||
function getTaskName(type) { | ||
if (type === REACT_FRAGMENT_TYPE) return "<>"; | ||
if ( | ||
"object" === typeof type && | ||
null !== type && | ||
type.$$typeof === REACT_LAZY_TYPE | ||
) | ||
return "<...>"; | ||
try { | ||
var RunInRootFrame = { | ||
DetermineComponentFrameRoot: function () { | ||
try { | ||
if (construct) { | ||
var Fake = function () { | ||
throw Error(); | ||
}; | ||
Object.defineProperty(Fake.prototype, "props", { | ||
set: function () { | ||
throw Error(); | ||
} | ||
}); | ||
if ("object" === typeof Reflect && Reflect.construct) { | ||
try { | ||
Reflect.construct(Fake, []); | ||
} catch (x) { | ||
var control = x; | ||
} | ||
Reflect.construct(fn, [], Fake); | ||
} else { | ||
try { | ||
Fake.call(); | ||
} catch (x$0) { | ||
control = x$0; | ||
} | ||
fn.call(Fake.prototype); | ||
} | ||
} else { | ||
try { | ||
throw Error(); | ||
} catch (x$1) { | ||
control = x$1; | ||
} | ||
(Fake = fn()) && | ||
"function" === typeof Fake.catch && | ||
Fake.catch(function () {}); | ||
} | ||
} catch (sample) { | ||
if (sample && control && "string" === typeof sample.stack) | ||
return [sample.stack, control.stack]; | ||
} | ||
return [null, null]; | ||
} | ||
}; | ||
RunInRootFrame.DetermineComponentFrameRoot.displayName = | ||
"DetermineComponentFrameRoot"; | ||
var namePropDescriptor = Object.getOwnPropertyDescriptor( | ||
RunInRootFrame.DetermineComponentFrameRoot, | ||
"name" | ||
); | ||
namePropDescriptor && | ||
namePropDescriptor.configurable && | ||
Object.defineProperty( | ||
RunInRootFrame.DetermineComponentFrameRoot, | ||
"name", | ||
{ value: "DetermineComponentFrameRoot" } | ||
); | ||
var _RunInRootFrame$Deter = | ||
RunInRootFrame.DetermineComponentFrameRoot(), | ||
sampleStack = _RunInRootFrame$Deter[0], | ||
controlStack = _RunInRootFrame$Deter[1]; | ||
if (sampleStack && controlStack) { | ||
var sampleLines = sampleStack.split("\n"), | ||
controlLines = controlStack.split("\n"); | ||
for ( | ||
_RunInRootFrame$Deter = namePropDescriptor = 0; | ||
namePropDescriptor < sampleLines.length && | ||
!sampleLines[namePropDescriptor].includes( | ||
"DetermineComponentFrameRoot" | ||
); | ||
) | ||
namePropDescriptor++; | ||
for ( | ||
; | ||
_RunInRootFrame$Deter < controlLines.length && | ||
!controlLines[_RunInRootFrame$Deter].includes( | ||
"DetermineComponentFrameRoot" | ||
); | ||
) | ||
_RunInRootFrame$Deter++; | ||
if ( | ||
namePropDescriptor === sampleLines.length || | ||
_RunInRootFrame$Deter === controlLines.length | ||
) | ||
for ( | ||
namePropDescriptor = sampleLines.length - 1, | ||
_RunInRootFrame$Deter = controlLines.length - 1; | ||
1 <= namePropDescriptor && | ||
0 <= _RunInRootFrame$Deter && | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter]; | ||
) | ||
_RunInRootFrame$Deter--; | ||
for ( | ||
; | ||
1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; | ||
namePropDescriptor--, _RunInRootFrame$Deter-- | ||
) | ||
if ( | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter] | ||
) { | ||
if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { | ||
do | ||
if ( | ||
(namePropDescriptor--, | ||
_RunInRootFrame$Deter--, | ||
0 > _RunInRootFrame$Deter || | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter]) | ||
) { | ||
var _frame = | ||
"\n" + | ||
sampleLines[namePropDescriptor].replace( | ||
" at new ", | ||
" at " | ||
); | ||
fn.displayName && | ||
_frame.includes("<anonymous>") && | ||
(_frame = _frame.replace("<anonymous>", fn.displayName)); | ||
"function" === typeof fn && | ||
componentFrameCache.set(fn, _frame); | ||
return _frame; | ||
} | ||
while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); | ||
} | ||
break; | ||
} | ||
} | ||
} finally { | ||
(reentry = !1), | ||
(ReactSharedInternals.H = previousDispatcher), | ||
reenableLogs(), | ||
(Error.prepareStackTrace = frame); | ||
var name = getComponentNameFromType(type); | ||
return name ? "<" + name + ">" : "<...>"; | ||
} catch (x) { | ||
return "<...>"; | ||
} | ||
sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") | ||
? describeBuiltInComponentFrame(sampleLines) | ||
: ""; | ||
"function" === typeof fn && componentFrameCache.set(fn, sampleLines); | ||
return sampleLines; | ||
} | ||
function describeUnknownElementTypeFrameInDEV(type) { | ||
if (null == type) return ""; | ||
if ("function" === typeof type) { | ||
var prototype = type.prototype; | ||
return describeNativeComponentFrame( | ||
type, | ||
!(!prototype || !prototype.isReactComponent) | ||
); | ||
} | ||
if ("string" === typeof type) return describeBuiltInComponentFrame(type); | ||
switch (type) { | ||
case REACT_SUSPENSE_TYPE: | ||
return describeBuiltInComponentFrame("Suspense"); | ||
case REACT_SUSPENSE_LIST_TYPE: | ||
return describeBuiltInComponentFrame("SuspenseList"); | ||
} | ||
if ("object" === typeof type) | ||
switch (type.$$typeof) { | ||
case REACT_FORWARD_REF_TYPE: | ||
return describeNativeComponentFrame(type.render, !1); | ||
case REACT_MEMO_TYPE: | ||
return describeUnknownElementTypeFrameInDEV(type.type); | ||
case REACT_LAZY_TYPE: | ||
prototype = type._payload; | ||
type = type._init; | ||
try { | ||
return describeUnknownElementTypeFrameInDEV(type(prototype)); | ||
} catch (x) {} | ||
} | ||
return ""; | ||
} | ||
function getOwner() { | ||
@@ -452,3 +196,12 @@ var dispatcher = ReactSharedInternals.A; | ||
} | ||
function ReactElement(type, key, self, source, owner, props) { | ||
function ReactElement( | ||
type, | ||
key, | ||
self, | ||
source, | ||
owner, | ||
props, | ||
debugStack, | ||
debugTask | ||
) { | ||
self = props.ref; | ||
@@ -481,2 +234,14 @@ type = { | ||
}); | ||
Object.defineProperty(type, "_debugStack", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !0, | ||
value: debugStack | ||
}); | ||
Object.defineProperty(type, "_debugTask", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !0, | ||
value: debugTask | ||
}); | ||
Object.freeze && (Object.freeze(type.props), Object.freeze(type)); | ||
@@ -492,30 +257,10 @@ return type; | ||
oldElement._owner, | ||
oldElement.props | ||
oldElement.props, | ||
oldElement._debugStack, | ||
oldElement._debugTask | ||
); | ||
newKey._store.validated = oldElement._store.validated; | ||
oldElement._store && | ||
(newKey._store.validated = oldElement._store.validated); | ||
return newKey; | ||
} | ||
function validateChildKeys(node, parentType) { | ||
if ( | ||
"object" === typeof node && | ||
node && | ||
node.$$typeof !== REACT_CLIENT_REFERENCE | ||
) | ||
if (isArrayImpl(node)) | ||
for (var i = 0; i < node.length; i++) { | ||
var child = node[i]; | ||
isValidElement(child) && validateExplicitKey(child, parentType); | ||
} | ||
else if (isValidElement(node)) | ||
node._store && (node._store.validated = 1); | ||
else if ( | ||
((i = getIteratorFn(node)), | ||
"function" === typeof i && | ||
i !== node.entries && | ||
((i = i.call(node)), i !== node)) | ||
) | ||
for (; !(node = i.next()).done; ) | ||
isValidElement(node.value) && | ||
validateExplicitKey(node.value, parentType); | ||
} | ||
function isValidElement(object) { | ||
@@ -528,48 +273,2 @@ return ( | ||
} | ||
function validateExplicitKey(element, parentType) { | ||
if ( | ||
element._store && | ||
!element._store.validated && | ||
null == element.key && | ||
((element._store.validated = 1), | ||
(parentType = getCurrentComponentErrorInfo(parentType)), | ||
!ownerHasKeyUseWarning[parentType]) | ||
) { | ||
ownerHasKeyUseWarning[parentType] = !0; | ||
var childOwner = ""; | ||
element && | ||
null != element._owner && | ||
element._owner !== getOwner() && | ||
((childOwner = null), | ||
"number" === typeof element._owner.tag | ||
? (childOwner = getComponentNameFromType(element._owner.type)) | ||
: "string" === typeof element._owner.name && | ||
(childOwner = element._owner.name), | ||
(childOwner = " It was passed a child from " + childOwner + ".")); | ||
var prevGetCurrentStack = ReactSharedInternals.getCurrentStack; | ||
ReactSharedInternals.getCurrentStack = function () { | ||
var stack = describeUnknownElementTypeFrameInDEV(element.type); | ||
prevGetCurrentStack && (stack += prevGetCurrentStack() || ""); | ||
return stack; | ||
}; | ||
console.error( | ||
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', | ||
parentType, | ||
childOwner | ||
); | ||
ReactSharedInternals.getCurrentStack = prevGetCurrentStack; | ||
} | ||
} | ||
function getCurrentComponentErrorInfo(parentType) { | ||
var info = "", | ||
owner = getOwner(); | ||
owner && | ||
(owner = getComponentNameFromType(owner.type)) && | ||
(info = "\n\nCheck the render method of `" + owner + "`."); | ||
info || | ||
((parentType = getComponentNameFromType(parentType)) && | ||
(info = | ||
"\n\nCheck the top-level render call using <" + parentType + ">.")); | ||
return info; | ||
} | ||
function escape(key) { | ||
@@ -959,3 +658,3 @@ var escaperLookup = { "=": "=0", ":": "=2" }; | ||
var isArrayImpl = Array.isArray, | ||
REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"), | ||
REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"), | ||
ReactSharedInternals = { | ||
@@ -966,2 +665,3 @@ H: null, | ||
S: null, | ||
V: null, | ||
actQueue: null, | ||
@@ -975,24 +675,13 @@ isBatchingLegacy: !1, | ||
hasOwnProperty = Object.prototype.hasOwnProperty, | ||
REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"), | ||
disabledDepth = 0, | ||
prevLog, | ||
prevInfo, | ||
prevWarn, | ||
prevError, | ||
prevGroup, | ||
prevGroupCollapsed, | ||
prevGroupEnd; | ||
disabledLog.__reactDisabledLog = !0; | ||
var prefix, | ||
suffix, | ||
reentry = !1; | ||
var componentFrameCache = new ( | ||
"function" === typeof WeakMap ? WeakMap : Map | ||
)(); | ||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), | ||
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); | ||
new ("function" === typeof WeakMap ? WeakMap : Map)(); | ||
var createTask = console.createTask | ||
? console.createTask | ||
: function () { | ||
return null; | ||
}, | ||
specialPropKeyWarningShown, | ||
didWarnAboutOldJSXRuntime; | ||
var didWarnAboutElementRef = {}; | ||
var ownerHasKeyUseWarning = {}, | ||
didWarnAboutMaps = !1, | ||
var didWarnAboutMaps = !1, | ||
userProvidedKeyEscapeRegex = /\/+/g, | ||
@@ -1041,2 +730,8 @@ reportGlobalError = | ||
: enqueueTask; | ||
deprecatedAPIs = Object.freeze({ | ||
__proto__: null, | ||
c: function (size) { | ||
return resolveDispatcher().useMemoCache(size); | ||
} | ||
}); | ||
exports.Children = { | ||
@@ -1083,7 +778,3 @@ map: mapChildren, | ||
ReactSharedInternals; | ||
exports.__COMPILER_RUNTIME = { | ||
c: function (size) { | ||
return resolveDispatcher().useMemoCache(size); | ||
} | ||
}; | ||
exports.__COMPILER_RUNTIME = deprecatedAPIs; | ||
exports.act = function (callback) { | ||
@@ -1138,4 +829,4 @@ var prevActQueue = ReactSharedInternals.actQueue, | ||
}); | ||
} catch (error$2) { | ||
ReactSharedInternals.thrownErrors.push(error$2); | ||
} catch (error$0) { | ||
ReactSharedInternals.thrownErrors.push(error$0); | ||
} | ||
@@ -1206,2 +897,6 @@ if (0 < ReactSharedInternals.thrownErrors.length) { | ||
}; | ||
exports.captureOwnerStack = function () { | ||
var getCurrentStack = ReactSharedInternals.getCurrentStack; | ||
return null === getCurrentStack ? null : getCurrentStack(); | ||
}; | ||
exports.cloneElement = function (element, config, children) { | ||
@@ -1252,5 +947,15 @@ if (null === element || void 0 === element) | ||
} | ||
props = ReactElement(element.type, key, void 0, void 0, owner, props); | ||
props = ReactElement( | ||
element.type, | ||
key, | ||
void 0, | ||
void 0, | ||
owner, | ||
props, | ||
element._debugStack, | ||
element._debugTask | ||
); | ||
for (key = 2; key < arguments.length; key++) | ||
validateChildKeys(arguments[key], props.type); | ||
(owner = arguments[key]), | ||
isValidElement(owner) && owner._store && (owner._store.validated = 1); | ||
return props; | ||
@@ -1277,36 +982,9 @@ }; | ||
exports.createElement = function (type, config, children) { | ||
if (isValidElementType(type)) | ||
for (var i = 2; i < arguments.length; i++) | ||
validateChildKeys(arguments[i], type); | ||
else { | ||
i = ""; | ||
if ( | ||
void 0 === type || | ||
("object" === typeof type && | ||
null !== type && | ||
0 === Object.keys(type).length) | ||
) | ||
i += | ||
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; | ||
if (null === type) var typeString = "null"; | ||
else | ||
isArrayImpl(type) | ||
? (typeString = "array") | ||
: void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE | ||
? ((typeString = | ||
"<" + | ||
(getComponentNameFromType(type.type) || "Unknown") + | ||
" />"), | ||
(i = | ||
" Did you accidentally export a JSX literal instead of a component?")) | ||
: (typeString = typeof type); | ||
console.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, | ||
i | ||
); | ||
for (var i = 2; i < arguments.length; i++) { | ||
var node = arguments[i]; | ||
isValidElement(node) && node._store && (node._store.validated = 1); | ||
} | ||
var propName; | ||
i = {}; | ||
typeString = null; | ||
node = null; | ||
if (null != config) | ||
@@ -1321,3 +999,3 @@ for (propName in (didWarnAboutOldJSXRuntime || | ||
hasValidKey(config) && | ||
(checkKeyStringCoercion(config.key), (typeString = "" + config.key)), | ||
(checkKeyStringCoercion(config.key), (node = "" + config.key)), | ||
config)) | ||
@@ -1344,3 +1022,3 @@ hasOwnProperty.call(config, propName) && | ||
void 0 === i[propName] && (i[propName] = childrenLength[propName]); | ||
typeString && | ||
node && | ||
defineKeyPropWarningGetter( | ||
@@ -1352,3 +1030,12 @@ i, | ||
); | ||
return ReactElement(type, typeString, void 0, void 0, getOwner(), i); | ||
return ReactElement( | ||
type, | ||
node, | ||
void 0, | ||
void 0, | ||
getOwner(), | ||
i, | ||
Error("react-stack-top-frame"), | ||
createTask(getTaskName(type)) | ||
); | ||
}; | ||
@@ -1410,3 +1097,19 @@ exports.createRef = function () { | ||
exports.memo = function (type, compare) { | ||
isValidElementType(type) || | ||
"string" === typeof type || | ||
"function" === typeof type || | ||
type === REACT_FRAGMENT_TYPE || | ||
type === REACT_PROFILER_TYPE || | ||
type === REACT_STRICT_MODE_TYPE || | ||
type === REACT_SUSPENSE_TYPE || | ||
type === REACT_SUSPENSE_LIST_TYPE || | ||
type === REACT_OFFSCREEN_TYPE || | ||
("object" === typeof type && | ||
null !== type && | ||
(type.$$typeof === REACT_LAZY_TYPE || | ||
type.$$typeof === REACT_MEMO_TYPE || | ||
type.$$typeof === REACT_CONTEXT_TYPE || | ||
type.$$typeof === REACT_CONSUMER_TYPE || | ||
type.$$typeof === REACT_FORWARD_REF_TYPE || | ||
type.$$typeof === REACT_CLIENT_REFERENCE || | ||
void 0 !== type.getModuleId)) || | ||
console.error( | ||
@@ -1496,4 +1199,13 @@ "memo: The first argument must be a component. Instead received: %s", | ||
}; | ||
exports.useEffect = function (create, deps) { | ||
return resolveDispatcher().useEffect(create, deps); | ||
exports.useEffect = function (create, createDeps, update) { | ||
null == create && | ||
console.warn( | ||
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?" | ||
); | ||
var dispatcher = resolveDispatcher(); | ||
if ("function" === typeof update) | ||
throw Error( | ||
"useEffect CRUD overload is not enabled in this build of React." | ||
); | ||
return dispatcher.useEffect(create, createDeps); | ||
}; | ||
@@ -1507,5 +1219,13 @@ exports.useId = function () { | ||
exports.useInsertionEffect = function (create, deps) { | ||
null == create && | ||
console.warn( | ||
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?" | ||
); | ||
return resolveDispatcher().useInsertionEffect(create, deps); | ||
}; | ||
exports.useLayoutEffect = function (create, deps) { | ||
null == create && | ||
console.warn( | ||
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?" | ||
); | ||
return resolveDispatcher().useLayoutEffect(create, deps); | ||
@@ -1542,3 +1262,3 @@ }; | ||
}; | ||
exports.version = "19.1.0-canary-42687267-20250108"; | ||
exports.version = "19.1.0-canary-4632e36a-20250216"; | ||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && | ||
@@ -1545,0 +1265,0 @@ "function" === |
@@ -75,3 +75,3 @@ /** | ||
var isArrayImpl = Array.isArray, | ||
ReactSharedInternals = { H: null, A: null, T: null, S: null }, | ||
ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null }, | ||
hasOwnProperty = Object.prototype.hasOwnProperty; | ||
@@ -362,2 +362,3 @@ function ReactElement(type, key, self, source, owner, props) { | ||
exports.__COMPILER_RUNTIME = { | ||
__proto__: null, | ||
c: function (size) { | ||
@@ -367,5 +368,2 @@ return ReactSharedInternals.H.useMemoCache(size); | ||
}; | ||
exports.act = function () { | ||
throw Error("act(...) is not supported in production builds of React."); | ||
}; | ||
exports.cache = function (fn) { | ||
@@ -502,4 +500,9 @@ return function () { | ||
}; | ||
exports.useEffect = function (create, deps) { | ||
return ReactSharedInternals.H.useEffect(create, deps); | ||
exports.useEffect = function (create, createDeps, update) { | ||
var dispatcher = ReactSharedInternals.H; | ||
if ("function" === typeof update) | ||
throw Error( | ||
"useEffect CRUD overload is not enabled in this build of React." | ||
); | ||
return dispatcher.useEffect(create, createDeps); | ||
}; | ||
@@ -547,2 +550,2 @@ exports.useId = function () { | ||
}; | ||
exports.version = "19.1.0-canary-42687267-20250108"; | ||
exports.version = "19.1.0-canary-4632e36a-20250216"; |
@@ -52,3 +52,3 @@ /** | ||
if ("function" === typeof type) | ||
return type.$$typeof === REACT_CLIENT_REFERENCE$2 | ||
return type.$$typeof === REACT_CLIENT_REFERENCE$1 | ||
? null | ||
@@ -106,273 +106,17 @@ : type.displayName || type.name || null; | ||
} | ||
function isValidElementType(type) { | ||
return "string" === typeof type || | ||
"function" === typeof type || | ||
type === REACT_FRAGMENT_TYPE || | ||
type === REACT_PROFILER_TYPE || | ||
type === REACT_STRICT_MODE_TYPE || | ||
type === REACT_SUSPENSE_TYPE || | ||
type === REACT_SUSPENSE_LIST_TYPE || | ||
type === REACT_OFFSCREEN_TYPE || | ||
("object" === typeof type && | ||
null !== type && | ||
(type.$$typeof === REACT_LAZY_TYPE || | ||
type.$$typeof === REACT_MEMO_TYPE || | ||
type.$$typeof === REACT_CONTEXT_TYPE || | ||
type.$$typeof === REACT_CONSUMER_TYPE || | ||
type.$$typeof === REACT_FORWARD_REF_TYPE || | ||
type.$$typeof === REACT_CLIENT_REFERENCE$1 || | ||
void 0 !== type.getModuleId)) | ||
? !0 | ||
: !1; | ||
} | ||
function disabledLog() {} | ||
function disableLogs() { | ||
if (0 === disabledDepth) { | ||
prevLog = console.log; | ||
prevInfo = console.info; | ||
prevWarn = console.warn; | ||
prevError = console.error; | ||
prevGroup = console.group; | ||
prevGroupCollapsed = console.groupCollapsed; | ||
prevGroupEnd = console.groupEnd; | ||
var props = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: disabledLog, | ||
writable: !0 | ||
}; | ||
Object.defineProperties(console, { | ||
info: props, | ||
log: props, | ||
warn: props, | ||
error: props, | ||
group: props, | ||
groupCollapsed: props, | ||
groupEnd: props | ||
}); | ||
} | ||
disabledDepth++; | ||
} | ||
function reenableLogs() { | ||
disabledDepth--; | ||
if (0 === disabledDepth) { | ||
var props = { configurable: !0, enumerable: !0, writable: !0 }; | ||
Object.defineProperties(console, { | ||
log: assign({}, props, { value: prevLog }), | ||
info: assign({}, props, { value: prevInfo }), | ||
warn: assign({}, props, { value: prevWarn }), | ||
error: assign({}, props, { value: prevError }), | ||
group: assign({}, props, { value: prevGroup }), | ||
groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), | ||
groupEnd: assign({}, props, { value: prevGroupEnd }) | ||
}); | ||
} | ||
0 > disabledDepth && | ||
console.error( | ||
"disabledDepth fell below zero. This is a bug in React. Please file an issue." | ||
); | ||
} | ||
function describeBuiltInComponentFrame(name) { | ||
if (void 0 === prefix) | ||
try { | ||
throw Error(); | ||
} catch (x) { | ||
var match = x.stack.trim().match(/\n( *(at )?)/); | ||
prefix = (match && match[1]) || ""; | ||
suffix = | ||
-1 < x.stack.indexOf("\n at") | ||
? " (<anonymous>)" | ||
: -1 < x.stack.indexOf("@") | ||
? "@unknown:0:0" | ||
: ""; | ||
} | ||
return "\n" + prefix + name + suffix; | ||
} | ||
function describeNativeComponentFrame(fn, construct) { | ||
if (!fn || reentry) return ""; | ||
var frame = componentFrameCache.get(fn); | ||
if (void 0 !== frame) return frame; | ||
reentry = !0; | ||
frame = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var previousDispatcher = null; | ||
previousDispatcher = ReactSharedInternals.H; | ||
ReactSharedInternals.H = null; | ||
disableLogs(); | ||
function getTaskName(type) { | ||
if (type === REACT_FRAGMENT_TYPE) return "<>"; | ||
if ( | ||
"object" === typeof type && | ||
null !== type && | ||
type.$$typeof === REACT_LAZY_TYPE | ||
) | ||
return "<...>"; | ||
try { | ||
var RunInRootFrame = { | ||
DetermineComponentFrameRoot: function () { | ||
try { | ||
if (construct) { | ||
var Fake = function () { | ||
throw Error(); | ||
}; | ||
Object.defineProperty(Fake.prototype, "props", { | ||
set: function () { | ||
throw Error(); | ||
} | ||
}); | ||
if ("object" === typeof Reflect && Reflect.construct) { | ||
try { | ||
Reflect.construct(Fake, []); | ||
} catch (x) { | ||
var control = x; | ||
} | ||
Reflect.construct(fn, [], Fake); | ||
} else { | ||
try { | ||
Fake.call(); | ||
} catch (x$0) { | ||
control = x$0; | ||
} | ||
fn.call(Fake.prototype); | ||
} | ||
} else { | ||
try { | ||
throw Error(); | ||
} catch (x$1) { | ||
control = x$1; | ||
} | ||
(Fake = fn()) && | ||
"function" === typeof Fake.catch && | ||
Fake.catch(function () {}); | ||
} | ||
} catch (sample) { | ||
if (sample && control && "string" === typeof sample.stack) | ||
return [sample.stack, control.stack]; | ||
} | ||
return [null, null]; | ||
} | ||
}; | ||
RunInRootFrame.DetermineComponentFrameRoot.displayName = | ||
"DetermineComponentFrameRoot"; | ||
var namePropDescriptor = Object.getOwnPropertyDescriptor( | ||
RunInRootFrame.DetermineComponentFrameRoot, | ||
"name" | ||
); | ||
namePropDescriptor && | ||
namePropDescriptor.configurable && | ||
Object.defineProperty( | ||
RunInRootFrame.DetermineComponentFrameRoot, | ||
"name", | ||
{ value: "DetermineComponentFrameRoot" } | ||
); | ||
var _RunInRootFrame$Deter = | ||
RunInRootFrame.DetermineComponentFrameRoot(), | ||
sampleStack = _RunInRootFrame$Deter[0], | ||
controlStack = _RunInRootFrame$Deter[1]; | ||
if (sampleStack && controlStack) { | ||
var sampleLines = sampleStack.split("\n"), | ||
controlLines = controlStack.split("\n"); | ||
for ( | ||
_RunInRootFrame$Deter = namePropDescriptor = 0; | ||
namePropDescriptor < sampleLines.length && | ||
!sampleLines[namePropDescriptor].includes( | ||
"DetermineComponentFrameRoot" | ||
); | ||
) | ||
namePropDescriptor++; | ||
for ( | ||
; | ||
_RunInRootFrame$Deter < controlLines.length && | ||
!controlLines[_RunInRootFrame$Deter].includes( | ||
"DetermineComponentFrameRoot" | ||
); | ||
) | ||
_RunInRootFrame$Deter++; | ||
if ( | ||
namePropDescriptor === sampleLines.length || | ||
_RunInRootFrame$Deter === controlLines.length | ||
) | ||
for ( | ||
namePropDescriptor = sampleLines.length - 1, | ||
_RunInRootFrame$Deter = controlLines.length - 1; | ||
1 <= namePropDescriptor && | ||
0 <= _RunInRootFrame$Deter && | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter]; | ||
) | ||
_RunInRootFrame$Deter--; | ||
for ( | ||
; | ||
1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; | ||
namePropDescriptor--, _RunInRootFrame$Deter-- | ||
) | ||
if ( | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter] | ||
) { | ||
if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) { | ||
do | ||
if ( | ||
(namePropDescriptor--, | ||
_RunInRootFrame$Deter--, | ||
0 > _RunInRootFrame$Deter || | ||
sampleLines[namePropDescriptor] !== | ||
controlLines[_RunInRootFrame$Deter]) | ||
) { | ||
var _frame = | ||
"\n" + | ||
sampleLines[namePropDescriptor].replace( | ||
" at new ", | ||
" at " | ||
); | ||
fn.displayName && | ||
_frame.includes("<anonymous>") && | ||
(_frame = _frame.replace("<anonymous>", fn.displayName)); | ||
"function" === typeof fn && | ||
componentFrameCache.set(fn, _frame); | ||
return _frame; | ||
} | ||
while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); | ||
} | ||
break; | ||
} | ||
} | ||
} finally { | ||
(reentry = !1), | ||
(ReactSharedInternals.H = previousDispatcher), | ||
reenableLogs(), | ||
(Error.prepareStackTrace = frame); | ||
var name = getComponentNameFromType(type); | ||
return name ? "<" + name + ">" : "<...>"; | ||
} catch (x) { | ||
return "<...>"; | ||
} | ||
sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") | ||
? describeBuiltInComponentFrame(sampleLines) | ||
: ""; | ||
"function" === typeof fn && componentFrameCache.set(fn, sampleLines); | ||
return sampleLines; | ||
} | ||
function describeUnknownElementTypeFrameInDEV(type) { | ||
if (null == type) return ""; | ||
if ("function" === typeof type) { | ||
var prototype = type.prototype; | ||
return describeNativeComponentFrame( | ||
type, | ||
!(!prototype || !prototype.isReactComponent) | ||
); | ||
} | ||
if ("string" === typeof type) return describeBuiltInComponentFrame(type); | ||
switch (type) { | ||
case REACT_SUSPENSE_TYPE: | ||
return describeBuiltInComponentFrame("Suspense"); | ||
case REACT_SUSPENSE_LIST_TYPE: | ||
return describeBuiltInComponentFrame("SuspenseList"); | ||
} | ||
if ("object" === typeof type) | ||
switch (type.$$typeof) { | ||
case REACT_FORWARD_REF_TYPE: | ||
return describeNativeComponentFrame(type.render, !1); | ||
case REACT_MEMO_TYPE: | ||
return describeUnknownElementTypeFrameInDEV(type.type); | ||
case REACT_LAZY_TYPE: | ||
prototype = type._payload; | ||
type = type._init; | ||
try { | ||
return describeUnknownElementTypeFrameInDEV(type(prototype)); | ||
} catch (x) {} | ||
} | ||
return ""; | ||
} | ||
function getOwner() { | ||
@@ -414,3 +158,12 @@ var dispatcher = ReactSharedInternals.A; | ||
} | ||
function ReactElement(type, key, self, source, owner, props) { | ||
function ReactElement( | ||
type, | ||
key, | ||
self, | ||
source, | ||
owner, | ||
props, | ||
debugStack, | ||
debugTask | ||
) { | ||
self = props.ref; | ||
@@ -443,2 +196,14 @@ type = { | ||
}); | ||
Object.defineProperty(type, "_debugStack", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !0, | ||
value: debugStack | ||
}); | ||
Object.defineProperty(type, "_debugTask", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !0, | ||
value: debugTask | ||
}); | ||
Object.freeze && (Object.freeze(type.props), Object.freeze(type)); | ||
@@ -454,30 +219,10 @@ return type; | ||
oldElement._owner, | ||
oldElement.props | ||
oldElement.props, | ||
oldElement._debugStack, | ||
oldElement._debugTask | ||
); | ||
newKey._store.validated = oldElement._store.validated; | ||
oldElement._store && | ||
(newKey._store.validated = oldElement._store.validated); | ||
return newKey; | ||
} | ||
function validateChildKeys(node, parentType) { | ||
if ( | ||
"object" === typeof node && | ||
node && | ||
node.$$typeof !== REACT_CLIENT_REFERENCE | ||
) | ||
if (isArrayImpl(node)) | ||
for (var i = 0; i < node.length; i++) { | ||
var child = node[i]; | ||
isValidElement(child) && validateExplicitKey(child, parentType); | ||
} | ||
else if (isValidElement(node)) | ||
node._store && (node._store.validated = 1); | ||
else if ( | ||
((i = getIteratorFn(node)), | ||
"function" === typeof i && | ||
i !== node.entries && | ||
((i = i.call(node)), i !== node)) | ||
) | ||
for (; !(node = i.next()).done; ) | ||
isValidElement(node.value) && | ||
validateExplicitKey(node.value, parentType); | ||
} | ||
function isValidElement(object) { | ||
@@ -490,48 +235,2 @@ return ( | ||
} | ||
function validateExplicitKey(element, parentType) { | ||
if ( | ||
element._store && | ||
!element._store.validated && | ||
null == element.key && | ||
((element._store.validated = 1), | ||
(parentType = getCurrentComponentErrorInfo(parentType)), | ||
!ownerHasKeyUseWarning[parentType]) | ||
) { | ||
ownerHasKeyUseWarning[parentType] = !0; | ||
var childOwner = ""; | ||
element && | ||
null != element._owner && | ||
element._owner !== getOwner() && | ||
((childOwner = null), | ||
"number" === typeof element._owner.tag | ||
? (childOwner = getComponentNameFromType(element._owner.type)) | ||
: "string" === typeof element._owner.name && | ||
(childOwner = element._owner.name), | ||
(childOwner = " It was passed a child from " + childOwner + ".")); | ||
var prevGetCurrentStack = ReactSharedInternals.getCurrentStack; | ||
ReactSharedInternals.getCurrentStack = function () { | ||
var stack = describeUnknownElementTypeFrameInDEV(element.type); | ||
prevGetCurrentStack && (stack += prevGetCurrentStack() || ""); | ||
return stack; | ||
}; | ||
console.error( | ||
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.', | ||
parentType, | ||
childOwner | ||
); | ||
ReactSharedInternals.getCurrentStack = prevGetCurrentStack; | ||
} | ||
} | ||
function getCurrentComponentErrorInfo(parentType) { | ||
var info = "", | ||
owner = getOwner(); | ||
owner && | ||
(owner = getComponentNameFromType(owner.type)) && | ||
(info = "\n\nCheck the render method of `" + owner + "`."); | ||
info || | ||
((parentType = getComponentNameFromType(parentType)) && | ||
(info = | ||
"\n\nCheck the top-level render call using <" + parentType + ">.")); | ||
return info; | ||
} | ||
function escape(key) { | ||
@@ -788,27 +487,16 @@ var escaperLookup = { "=": "=0", ":": "=2" }; | ||
MAYBE_ITERATOR_SYMBOL = Symbol.iterator, | ||
REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"), | ||
REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"), | ||
hasOwnProperty = Object.prototype.hasOwnProperty, | ||
assign = Object.assign, | ||
REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"), | ||
disabledDepth = 0, | ||
prevLog, | ||
prevInfo, | ||
prevWarn, | ||
prevError, | ||
prevGroup, | ||
prevGroupCollapsed, | ||
prevGroupEnd; | ||
disabledLog.__reactDisabledLog = !0; | ||
var prefix, | ||
suffix, | ||
reentry = !1; | ||
var componentFrameCache = new ( | ||
"function" === typeof WeakMap ? WeakMap : Map | ||
)(); | ||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), | ||
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); | ||
new ("function" === typeof WeakMap ? WeakMap : Map)(); | ||
var createTask = console.createTask | ||
? console.createTask | ||
: function () { | ||
return null; | ||
}, | ||
specialPropKeyWarningShown, | ||
didWarnAboutOldJSXRuntime; | ||
var didWarnAboutElementRef = {}; | ||
var ownerHasKeyUseWarning = {}, | ||
didWarnAboutMaps = !1, | ||
var didWarnAboutMaps = !1, | ||
userProvidedKeyEscapeRegex = /\/+/g; | ||
@@ -898,2 +586,6 @@ exports.Children = { | ||
}; | ||
exports.captureOwnerStack = function () { | ||
var getCurrentStack = ReactSharedInternals.getCurrentStack; | ||
return null === getCurrentStack ? null : getCurrentStack(); | ||
}; | ||
exports.cloneElement = function (element, config, children) { | ||
@@ -944,42 +636,25 @@ if (null === element || void 0 === element) | ||
} | ||
props = ReactElement(element.type, key, void 0, void 0, owner, props); | ||
props = ReactElement( | ||
element.type, | ||
key, | ||
void 0, | ||
void 0, | ||
owner, | ||
props, | ||
element._debugStack, | ||
element._debugTask | ||
); | ||
for (key = 2; key < arguments.length; key++) | ||
validateChildKeys(arguments[key], props.type); | ||
(owner = arguments[key]), | ||
isValidElement(owner) && owner._store && (owner._store.validated = 1); | ||
return props; | ||
}; | ||
exports.createElement = function (type, config, children) { | ||
if (isValidElementType(type)) | ||
for (var i = 2; i < arguments.length; i++) | ||
validateChildKeys(arguments[i], type); | ||
else { | ||
i = ""; | ||
if ( | ||
void 0 === type || | ||
("object" === typeof type && | ||
null !== type && | ||
0 === Object.keys(type).length) | ||
) | ||
i += | ||
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; | ||
if (null === type) var typeString = "null"; | ||
else | ||
isArrayImpl(type) | ||
? (typeString = "array") | ||
: void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE | ||
? ((typeString = | ||
"<" + | ||
(getComponentNameFromType(type.type) || "Unknown") + | ||
" />"), | ||
(i = | ||
" Did you accidentally export a JSX literal instead of a component?")) | ||
: (typeString = typeof type); | ||
console.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, | ||
i | ||
); | ||
for (var i = 2; i < arguments.length; i++) { | ||
var node = arguments[i]; | ||
isValidElement(node) && node._store && (node._store.validated = 1); | ||
} | ||
var propName; | ||
i = {}; | ||
typeString = null; | ||
node = null; | ||
if (null != config) | ||
@@ -994,3 +669,3 @@ for (propName in (didWarnAboutOldJSXRuntime || | ||
hasValidKey(config) && | ||
(checkKeyStringCoercion(config.key), (typeString = "" + config.key)), | ||
(checkKeyStringCoercion(config.key), (node = "" + config.key)), | ||
config)) | ||
@@ -1017,3 +692,3 @@ hasOwnProperty.call(config, propName) && | ||
void 0 === i[propName] && (i[propName] = childrenLength[propName]); | ||
typeString && | ||
node && | ||
defineKeyPropWarningGetter( | ||
@@ -1025,3 +700,12 @@ i, | ||
); | ||
return ReactElement(type, typeString, void 0, void 0, getOwner(), i); | ||
return ReactElement( | ||
type, | ||
node, | ||
void 0, | ||
void 0, | ||
getOwner(), | ||
i, | ||
Error("react-stack-top-frame"), | ||
createTask(getTaskName(type)) | ||
); | ||
}; | ||
@@ -1083,3 +767,19 @@ exports.createRef = function () { | ||
exports.memo = function (type, compare) { | ||
isValidElementType(type) || | ||
"string" === typeof type || | ||
"function" === typeof type || | ||
type === REACT_FRAGMENT_TYPE || | ||
type === REACT_PROFILER_TYPE || | ||
type === REACT_STRICT_MODE_TYPE || | ||
type === REACT_SUSPENSE_TYPE || | ||
type === REACT_SUSPENSE_LIST_TYPE || | ||
type === REACT_OFFSCREEN_TYPE || | ||
("object" === typeof type && | ||
null !== type && | ||
(type.$$typeof === REACT_LAZY_TYPE || | ||
type.$$typeof === REACT_MEMO_TYPE || | ||
type.$$typeof === REACT_CONTEXT_TYPE || | ||
type.$$typeof === REACT_CONSUMER_TYPE || | ||
type.$$typeof === REACT_FORWARD_REF_TYPE || | ||
type.$$typeof === REACT_CLIENT_REFERENCE || | ||
void 0 !== type.getModuleId)) || | ||
console.error( | ||
@@ -1126,3 +826,3 @@ "memo: The first argument must be a component. Instead received: %s", | ||
}; | ||
exports.version = "19.1.0-canary-42687267-20250108"; | ||
exports.version = "19.1.0-canary-4632e36a-20250216"; | ||
})(); |
@@ -343,2 +343,5 @@ /** | ||
}; | ||
exports.captureOwnerStack = function () { | ||
return null; | ||
}; | ||
exports.cloneElement = function (element, config, children) { | ||
@@ -427,2 +430,2 @@ if (null === element || void 0 === element) | ||
}; | ||
exports.version = "19.1.0-canary-42687267-20250108"; | ||
exports.version = "19.1.0-canary-4632e36a-20250216"; |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "19.1.0-canary-42687267-20250108", | ||
"version": "19.1.0-canary-4632e36a-20250216", | ||
"homepage": "https://react.dev/", | ||
@@ -10,0 +10,0 @@ "bugs": "https://github.com/facebook/react/issues", |
163793
4678