decord/source/221__isNativeReflectConstruct.js

98 lines
2.3 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 221
2026-07-29 08:29:29 +00:00
// Function ID: 222
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-29 08:29:29 +00:00
// Dependencies: [41, 42, 93, 95, 98, 133]
2026-07-20 16:05:17 +00:00
// Module 221 (_isNativeReflectConstruct)
2026-08-24 06:08:38 +00:00
import _inheritsDefault from "_inherits" /* 98 */;
import EventDefault from "Event" /* 133 */;
import CloseEvent from "_classCallCheck" /* 41 */;
import closure_1 from "_possibleConstructorReturn" /* 93 */;
import closure_2 from "_getPrototypeOf" /* 95 */;
import importDefaultResult from "_createClass" /* 42 */;
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
2026-07-29 08:29:29 +00:00
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-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
class CloseEvent {
constructor(arg0, arg1) {
self = this;
tmp = CloseEvent(this, CloseEvent);
items = [, ];
items[0] = global;
items[1] = arg1;
2026-08-24 06:08:38 +00:00
tmp2 = closure_2;
obj = closure_2(CloseEvent);
tmp3 = closure_1;
2026-07-29 08:29:29 +00:00
if (_isNativeReflectConstruct()) {
tmp5 = globalThis;
_Reflect = Reflect;
constructResult = Reflect.construct(obj, items, tmp2(self).constructor);
} else {
constructResult = obj.apply(self, items);
}
tmp3Result = tmp3(self, constructResult);
wasClean = undefined;
if (arg1 != null) {
wasClean = arg1.wasClean;
}
tmp3Result._wasClean = Boolean(wasClean);
code = undefined;
if (arg1 != null) {
code = arg1.code;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp9 = Number(code) || 0;
tmp3Result._code = tmp9;
reason = undefined;
if (arg1 != null) {
reason = arg1.reason;
}
str = "";
if (null != reason) {
_String = String;
str = String(arg1.reason);
}
tmp3Result._reason = str;
return tmp3Result;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
2026-08-24 06:08:38 +00:00
_inheritsDefault(CloseEvent, EventDefault);
2026-07-29 08:29:29 +00:00
let items = [
{
2026-07-20 16:05:17 +00:00
key: "wasClean",
get() {
return this._wasClean;
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "code",
get() {
return this._code;
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "reason",
get() {
return this._reason;
}
2026-07-29 08:29:29 +00:00
}
];
export default importDefaultResult(CloseEvent, items);