decord/source/6711__isNativeReflectConstruct.js

103 lines
3 KiB
JavaScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 6711
// Function ID: 6712
2026-07-29 08:29:29 +00:00
// Name: _isNativeReflectConstruct
2026-08-24 06:08:38 +00:00
// Dependencies: [41, 42, 93, 95, 98, 19, 21, 6623, 6712, 6622, 6631]
2026-07-29 08:29:29 +00:00
2026-08-24 06:08:38 +00:00
// Module 6711 (_isNativeReflectConstruct)
import noopAll from "noop" /* 19 */;
import _inheritsDefault from "_inherits" /* 98 */;
import _isNativeReflectConstructDefault from "_isNativeReflectConstruct" /* 6631 */;
import __INTERNAL_VIEW_CONFIGDefault from "__INTERNAL_VIEW_CONFIG" /* 6712 */;
import closure_3 from "_classCallCheck" /* 41 */;
import closure_4 from "_possibleConstructorReturn" /* 93 */;
import closure_5 from "_getPrototypeOf" /* 95 */;
import importDefaultResult from "_createClass" /* 42 */;
import { jsx } from "jsxProd" /* 21 */;
2026-07-29 08:29:29 +00:00
2026-08-12 06:57:52 +00:00
const Use = arg1;
2026-07-29 08:29:29 +00:00
function _isNativeReflectConstruct() {
try {
const _Boolean = Boolean;
const call = valueOf.call;
const _Reflect = Reflect;
const _Boolean2 = Boolean;
if (typeof call === "unknown") {
let callResult = valueOf();
} else {
callResult = call(constructResult);
}
2026-08-24 06:08:38 +00:00
closure_0 = !callResult;
_isNativeReflectConstruct = function _isNativeReflectConstruct() {
2026-07-29 08:29:29 +00:00
return closure_0;
2026-08-24 06:08:38 +00:00
};
2026-07-29 08:29:29 +00:00
return _isNativeReflectConstruct();
} catch (err) {
}
}
2026-08-24 06:08:38 +00:00
noopAll;
2026-08-12 06:57:52 +00:00
class Use {
2026-07-29 08:29:29 +00:00
constructor() {
self = this;
2026-08-24 06:08:38 +00:00
tmp = closure_3(this, Use);
tmp2 = closure_5;
obj = closure_5(Use);
tmp3 = closure_4;
2026-07-29 08:29:29 +00:00
if (_isNativeReflectConstruct()) {
2026-08-08 06:10:11 +00:00
tmp7 = globalThis;
2026-07-29 08:29:29 +00:00
_Reflect = Reflect;
2026-08-08 06:10:11 +00:00
tmp8 = arguments;
constructResult = Reflect.construct(obj, arguments, tmp2(self).constructor);
2026-07-29 08:29:29 +00:00
} else {
2026-08-08 06:10:11 +00:00
tmp4 = arguments;
tmp5 = arguments;
constructResult = obj(...arguments);
2026-07-29 08:29:29 +00:00
}
2026-08-08 06:10:11 +00:00
return tmp3(self, constructResult);
2026-07-29 08:29:29 +00:00
}
}
2026-08-24 06:08:38 +00:00
_inheritsDefault(Use, _isNativeReflectConstructDefault);
2026-08-08 06:10:11 +00:00
const items = [
2026-07-29 08:29:29 +00:00
{
key: "render",
value: function render() {
2026-08-11 06:20:06 +00:00
const self = this;
2026-07-29 08:29:29 +00:00
const props = this.props;
2026-08-12 06:57:52 +00:00
let str = props.href;
({ children, x, y, width, height } = props);
if (undefined === str) {
str = props.xlinkHref;
}
let match = str;
if (str) {
2026-08-24 06:08:38 +00:00
match = str.match(self(6623).idPattern);
2026-08-12 06:57:52 +00:00
}
let tmp4 = match;
if (match) {
tmp4 = match[1];
}
if (!tmp4) {
const _console = console;
console.warn(`Invalid \`href\` prop for \`Use\` element, expected a href like "#id", but got: "${str}"`);
}
let obj = { href: tmp4, x, y, width, height };
2026-08-11 06:20:06 +00:00
obj = {
ref(arg0) {
return self.refMethod(arg0);
}
};
2026-08-24 06:08:38 +00:00
const tmp7 = __INTERNAL_VIEW_CONFIGDefault;
const merged = Object.assign(self(6622).withoutXY(this, props));
2026-08-11 06:20:06 +00:00
const merged1 = Object.assign(obj);
2026-08-12 06:57:52 +00:00
obj.children = children;
return <tmp7 ref={function ref(arg0) {
return self.refMethod(arg0);
}} />;
2026-07-29 08:29:29 +00:00
}
}
];
2026-08-12 06:57:52 +00:00
const importDefaultResultResult = importDefaultResult(Use, items);
importDefaultResultResult.displayName = "Use";
importDefaultResultResult.defaultProps = { x: 0, y: 0, width: 0, height: 0 };
2026-07-29 08:29:29 +00:00
2026-08-07 06:50:47 +00:00
export default importDefaultResultResult;