Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

+234
View File
@@ -0,0 +1,234 @@
/* Metro module 7137; source: lib/SystemResources.tsx; dependencies: [5, 6, 7, 7131, 5256, 7138, 2] */
function _fun57111(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:6, offset: 0x013dcbb5, size: 152 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const value = _fun57112();
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/SystemResources.tsx');
exports.default = value;
}
function _fun57112() { // fn#57112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:128, offset: 0x013dcc4d, size: 197 bytes, params: 1, frame: 17
const binding = env0_5;
const closure = SystemResources;
const items2 = [{key: 'getStats', value: value_57114}];
items2[1] = {key: 'takeSample', value: value_57115};
const binding2 = env0_3;
const env0_2 = binding2(_fun57117);
items2[2] = {key: 'getCurrentBattery', value: value_57118};
const env0_1 = binding2(_fun57120);
items2[3] = {key: 'setLastBattery', value: value_57121};
const env0_0 = binding2(_fun57123);
items2[4] = {key: 'getBatteryLevelStats', value: value_57124};
return binding(closure, items2);
}
function SystemResources() { // fn#57113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:149, offset: 0x013dcd12, size: 172 bytes, params: 1, frame: 17
let value = environment.__proto__;
env1_4(this, SystemResources);
const Histogram = (require(7131) /* metro dependency 7131: Histogram */).Histogram;
const value3 = Object.create(Histogram.prototype, {constructor: {value: Histogram}});
let histogram = new Histogram();
this.cpuHistogram = histogram instanceof Object ? histogram : value3;
const value5 = Object.create(Histogram.prototype, {constructor: {value: Histogram}});
histogram = new Histogram();
this.memoryHistogram = histogram instanceof Object ? histogram : value5;
value = importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */;
const getCumulativeCPUUsage = value.getCumulativeCPUUsage;
this.startCPU = Reflect.apply(getCumulativeCPUUsage, value, []);
this.lastCPU = this.startCPU;
this.lastBattery = null;
}
function value_57114() { // fn#57114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:405, offset: 0x013dcdbe, size: 404 bytes, params: 1, frame: 19
var r2;
var usage;
var value6;
var sampleTime;
const report = this.cpuHistogram.getReport();
const report2 = this.memoryHistogram.getReport();
const value4 = undefined;
const cumulativeCPUUsage = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCumulativeCPUUsage();
let startCPU = this.startCPU;
if (startCPU == null) {
r2 = value4;
} else if (cumulativeCPUUsage == null) {
r2 = value4;
} else {
usage = cumulativeCPUUsage.usage;
startCPU = this.startCPU;
value6 = 100 * (usage - startCPU.usage);
sampleTime = cumulativeCPUUsage.sampleTime;
startCPU = this.startCPU;
r2 = value6 / ((sampleTime - startCPU.sampleTime) / 1000);
}
r2 = r2 ?? report.mean;
return {client_performance_cpu_percentile25: report.percentiles[25],
client_performance_cpu_percentile50: report.percentiles[50],
client_performance_cpu_percentile75: report.percentiles[75],
client_performance_cpu_percentile90: report.percentiles[90],
client_performance_cpu_percentile95: report.percentiles[95], client_performance_cpu_mean: r2,
client_performance_memory_percentile25: report2.percentiles[25],
client_performance_memory_percentile50: report2.percentiles[50],
client_performance_memory_percentile75: report2.percentiles[75],
client_performance_memory_percentile90: report2.percentiles[90],
client_performance_memory_percentile95: report2.percentiles[95], client_performance_memory_min: report2.min,
client_performance_memory_max: report2.max, client_performance_memory_mean: report2.mean};
}
function value_57115() { // fn#57115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:1383, offset: 0x013dcf52, size: 257 bytes, params: 1, frame: 21
var r5;
var lastCPU;
var value4;
let value = environment.__proto__;
const cumulativeCPUUsage = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCumulativeCPUUsage();
const currentMemoryUsageKB = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCurrentMemoryUsageKB();
if (cumulativeCPUUsage != null) {
lastCPU = this.lastCPU;
value = true;
if (lastCPU != null) {
value4 = cumulativeCPUUsage.sampleTime - this.lastCPU.sampleTime;
if (value4 >= 1) {
this.cpuHistogram.addSample((cumulativeCPUUsage.usage - this.lastCPU.usage) / (value4 / 1000) * 100,
value4);
r5 = value;
} else {
r5 = false;
}
} else {
r5 = value;
}
if (r5) {
this.lastCPU = cumulativeCPUUsage;
}
} else {
value = importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */;
value = value.getCurrentCPUUsagePercent();
if (value != null) {
this.cpuHistogram.addSample(value);
}
}
if (currentMemoryUsageKB != null) {
this.memoryHistogram.addSample(currentMemoryUsageKB);
}
}
function* _fun57117() { // fn#57117, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:1841, offset: 0x013dd05c, size: 84 bytes, params: 1, frame: 13
var binding;
var binding2;
var property;
var getDeviceState;
var object2;
var value3;
var batteryLevel;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
return null;
}
try {
binding2 = env2_2;
} catch (error) {
return null;
}
try {
property = binding2[5];
} catch (error) {
return null;
}
try {
value = binding(property);
} catch (error) {
return null;
}
try {
getDeviceState = value.getDeviceState;
} catch (error) {
return null;
}
try {
object2 = {};
} catch (error) {
return null;
}
try {
object2.fallback = false;
} catch (error) {
return null;
}
try {
value = Reflect.apply(getDeviceState, value, [object2]);
} catch (error) {
return null;
}
yield value;
try {
value = undefined;
value3 = false;
} catch (error) {
return null;
}
if (value3) {
return value;
}
try {
batteryLevel = value.batteryLevel;
} catch (error) {
return null;
}
return batteryLevel;
}
function* _fun57120() { // fn#57120, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:2044, offset: 0x013dd0b9, size: 47 bytes, params: 1, frame: 11
if (true) {
var getCurrentBattery = this.getCurrentBattery;
yield Reflect.apply(getCurrentBattery, this, []);
value = undefined;
if (false) {
return value;
}
this.lastBattery = value;
}
}
function* _fun57123() { // fn#57123, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7315:2207, offset: 0x013dd0f1, size: 151 bytes, params: 1, frame: 17
var r2;
var object2;
var Math;
var round;
if (false) {
return undefined;
}
const getCurrentBattery = this.getCurrentBattery;
yield Reflect.apply(getCurrentBattery, this, []);
value = undefined;
if (false) {
return value;
}
let lastBattery = this.lastBattery;
if (lastBattery == null) {
r2 = {startBattery: this.lastBattery, currentBattery: value, batteryUsageRounded: null};
} else if (value == null) {
r2 = {startBattery: this.lastBattery, currentBattery: value, batteryUsageRounded: null};
} else {
object2 = {};
lastBattery = this.lastBattery;
object2.startBattery = lastBattery;
object2.currentBattery = value;
Math = global.Math;
round = Math.round;
lastBattery = this.lastBattery;
object2.batteryUsageRounded = Reflect.apply(round, Math, [1000 * (value - lastBattery)]) / 1000;
r2 = object2;
}
return r2;
}