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

202 lines
5.2 KiB
JavaScript

// Metro module 125 (f126).
import _classCallCheck from "./_classCallCheck";
import _createClass from "./_createClass";
import _classPrivateFieldBase from "./_classPrivateFieldBase";
import _classPrivateFieldKey from "./_classPrivateFieldKey";
import { setPlatformObject } from "./Module126";
let c117_6;
let env117 = {};
const c117_2 = _classPrivateFieldKey("x");
const c117_3 = _classPrivateFieldKey("y");
const c117_4 = _classPrivateFieldKey("width");
const c117_5 = _classPrivateFieldKey("height");
const DOMRectReadOnly = function DOMRectReadOnly(a0, a1, a2, a3) {
_classCallCheck(this, DOMRectReadOnly);
Object.defineProperty(this, c117_2, {
writable: true,
value: void 0
});
Object.defineProperty(this, c117_3, {
writable: true,
value: void 0
});
Object.defineProperty(this, c117_4, {
writable: true,
value: void 0
});
Object.defineProperty(this, c117_5, {
writable: true,
value: void 0
});
this.__setInternalX(a0);
this.__setInternalY(a1);
this.__setInternalWidth(a2);
this.__setInternalHeight(a3);
};
c117_6 = _createClass(DOMRectReadOnly, [{
key: "x",
get: function get() {
return _classPrivateFieldBase(this, c117_2)[c117_2];
}
}, {
key: "y",
get: function get() {
return _classPrivateFieldBase(this, c117_3)[c117_3];
}
}, {
key: "width",
get: function get() {
return _classPrivateFieldBase(this, c117_4)[c117_4];
}
}, {
key: "height",
get: function get() {
return _classPrivateFieldBase(this, c117_5)[c117_5];
}
}, {
key: "top",
get: function get() {
const r7 = _classPrivateFieldBase(this, c117_5)[c117_5];
const r10 = _classPrivateFieldBase(this, c117_3)[c117_3];
return r7 < 0 ? r10 + r7 : r10;
}
}, {
key: "right",
get: function get() {
const r7 = _classPrivateFieldBase(this, c117_4)[c117_4];
const r10 = _classPrivateFieldBase(this, c117_2)[c117_2];
return r7 < 0 ? r10 : r10 + r7;
}
}, {
key: "bottom",
get: function get() {
const r7 = _classPrivateFieldBase(this, c117_5)[c117_5];
const r10 = _classPrivateFieldBase(this, c117_3)[c117_3];
return r7 < 0 ? r10 : r10 + r7;
}
}, {
key: "left",
get: function get() {
const r7 = _classPrivateFieldBase(this, c117_4)[c117_4];
const r10 = _classPrivateFieldBase(this, c117_2)[c117_2];
return r7 < 0 ? r10 + r7 : r10;
}
}, {
key: "toJSON",
value: function toJSON() {
return {
x: this.x,
y: this.y,
width: this.width,
height: this.height,
top: this.top,
left: this.left,
bottom: this.bottom,
right: this.right
};
}
}, {
key: "__getInternalX",
value: function __getInternalX() {
return _classPrivateFieldBase(this, c117_2)[c117_2];
}
}, {
key: "__getInternalY",
value: function __getInternalY() {
return _classPrivateFieldBase(this, c117_3)[c117_3];
}
}, {
key: "__getInternalWidth",
value: function __getInternalWidth() {
return _classPrivateFieldBase(this, c117_4)[c117_4];
}
}, {
key: "__getInternalHeight",
value: function __getInternalHeight() {
return _classPrivateFieldBase(this, c117_5)[c117_5];
}
}, {
key: "__setInternalX",
value: function __setInternalX(a0) {
_classPrivateFieldBase(this, c117_2)[c117_2] = a0 ? Number(a0) : 0;
}
}, {
key: "__setInternalY",
value: function __setInternalY(a0) {
_classPrivateFieldBase(this, c117_3)[c117_3] = a0 ? Number(a0) : 0;
}
}, {
key: "__setInternalWidth",
value: function __setInternalWidth(a0) {
_classPrivateFieldBase(this, c117_4)[c117_4] = a0 ? Number(a0) : 0;
}
}, {
key: "__setInternalHeight",
value: function __setInternalHeight(a0) {
_classPrivateFieldBase(this, c117_5)[c117_5] = a0 ? Number(a0) : 0;
}
}], [{
key: "fromRect",
value: function fromRect(a0) {
let r14;
if (a0) {
const { x: r41, y: r42, width, height } = a0;
const r46 = {
__proto__: DOMRectReadOnly.prototype
};
_classCallCheck(r46, DOMRectReadOnly);
Object.defineProperty(r46, c117_2, {
writable: true,
value: void 0
});
Object.defineProperty(r46, c117_3, {
writable: true,
value: void 0
});
Object.defineProperty(r46, c117_4, {
writable: true,
value: void 0
});
Object.defineProperty(r46, c117_5, {
writable: true,
value: void 0
});
r46.__setInternalX(r41);
r46.__setInternalY(r42);
r46.__setInternalWidth(width);
r46.__setInternalHeight(height);
r14 = r46;
} else {
r14 = {
__proto__: DOMRectReadOnly.prototype
};
_classCallCheck(r14, DOMRectReadOnly);
Object.defineProperty(r14, c117_2, {
writable: true,
value: void 0
});
Object.defineProperty(r14, c117_3, {
writable: true,
value: void 0
});
Object.defineProperty(r14, c117_4, {
writable: true,
value: void 0
});
Object.defineProperty(r14, c117_5, {
writable: true,
value: void 0
});
r14.__setInternalX(void 0);
r14.__setInternalY(void 0);
r14.__setInternalWidth(void 0);
r14.__setInternalHeight(void 0);
}
return r14;
}
}]);
setPlatformObject(c117_6, {
clone: (a0) => new c117_6(a0.x, a0.y, a0.width, a0.height)
});
export default c117_6;