Files
discord-decomp/_bundle/DOMRect.js
T
2026-11-01 12:12:55 +02:00

86 lines
2.3 KiB
JavaScript

// Metro module 124 (f125).
import _classCallCheck from "./_classCallCheck";
import _createClass from "./_createClass";
import _possibleConstructorReturn from "./_possibleConstructorReturn";
import _getPrototypeOf from "./_getPrototypeOf";
import _inherits from "./_inherits";
import DOMRectReadOnly from "./DOMRectReadOnly";
import { setPlatformObject } from "./Module126";
let c115_4;
let DOMRect2;
let env115 = {};
env115[3] = function _isNativeReflectConstruct() {
let c12166_0;
try {
c12166_0 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
} catch ($e) {}
const _isNativeReflectConstruct2 = function _isNativeReflectConstruct() {
return !!c12166_0;
};
env115[3] = _isNativeReflectConstruct2;
return _isNativeReflectConstruct2();
};
DOMRect2 = function() {
_classCallCheck(this, DOMRect2);
const r8 = _getPrototypeOf(DOMRect2);
return _possibleConstructorReturn(this, (0, env115[3])() ? Reflect.construct(r8, arguments, _getPrototypeOf(this).constructor) : r8.apply(this, arguments));
};
_inherits(DOMRect2, DOMRectReadOnly);
c115_4 = _createClass(DOMRect2, [{
key: "x",
get: function get() {
return this.__getInternalX();
},
set: function set(a0) {
this.__setInternalX(a0);
}
}, {
key: "y",
get: function get() {
return this.__getInternalY();
},
set: function set(a0) {
this.__setInternalY(a0);
}
}, {
key: "width",
get: function get() {
return this.__getInternalWidth();
},
set: function set(a0) {
this.__setInternalWidth(a0);
}
}, {
key: "height",
get: function get() {
return this.__getInternalHeight();
},
set: function set(a0) {
this.__setInternalHeight(a0);
}
}], [{
key: "fromRect",
value: function fromRect(a0) {
let r14;
if (a0) {
const { x: r10, y: r9, width, height } = a0;
const r16 = {
__proto__: DOMRect2.prototype
};
const r17 = DOMRect2.call(r16, r10, r9, width, height);
r14 = r17 instanceof Object ? r17 : r16;
} else {
const r2 = {
__proto__: DOMRect2.prototype
};
const r13 = DOMRect2.call(r2);
r14 = r13 instanceof Object ? r13 : r2;
}
return r14;
}
}]);
setPlatformObject(c115_4, {
clone: (a0) => new c115_4(a0.x, a0.y, a0.width, a0.height)
});
export default c115_4;