Files
discord-decomp/sources/by-id/module-00841.jsx
T
2026-07-27 16:20:00 +03:00

103 lines
3.9 KiB
React

/* Metro module 841; source: unknown; dependencies: [836, 842] */
function _fun9105(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:968:6, offset: 0x00d5d31a, size: 126 bytes, params: 8, frame: 18
let env0_0 = require;
const closure = isMatchingPattern;
const Object = global.Object;
const defineProperty = Object.defineProperty;
const Symbol = global.Symbol;
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
exports.isMatchingPattern = closure;
exports.safeJoin = safeJoin;
exports.snipLine = snipLine;
exports.stringMatchesSomePattern = function(a0) {
var env0_0 = a0;
var env0_1 = arguments.length > 2 && arguments[2] !== undefined && arguments[2];
return (arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []).some(_fun9110);
};
exports.truncate = function(a0) {
var r2;
var r0;
var value = a0;
var value2 = 0;
r2 = arguments.length > 1 ? arguments[1] === undefined ? value2 : arguments[1] : value2;
if (typeof value !== 'string') {
r0 = value;
} else if (value2 === r2) {
r0 = value;
} else if (value.length <= r2) {
r0 = value;
} else {
value = value.slice(value2, r2);
value = '' + value + '...';
r0 = value;
}
return r0;
};
}
function safeJoin(a0, a1) { // fn#9107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:968:343, offset: 0x00d5d453, size: 244 bytes, params: 3, frame: 23
var r10;
var items2;
var value;
var length;
var property;
var property2;
var moduleValue;
var isVueViewModel2;
var push;
var String;
var value3;
var property3;
var moduleValue2;
var vueInternalName;
var error;
var value5;
const Array = global.Array;
if (Array.isArray(a0)) {
items2 = [];
value = 0;
length = a0.length;
if (value < length) {
r10 = value;
while (true) {
property = a0[r10];
try {
property2 = dependencyMap[value];
moduleValue = require(property2);
isVueViewModel2 = moduleValue.isVueViewModel(property);
push = items2.push;
if (isVueViewModel2) {
property3 = dependencyMap[1];
moduleValue2 = require(property3);
vueInternalName = moduleValue2.getVueInternalName(property);
Reflect.apply(push, items2, [vueInternalName]);
break;
}
String = global.String;
value3 = String(property);
Reflect.apply(push, items2, [value3]);
break;
} catch (error) {
items2.push('[value cannot be serialized]');
}
value5 = typeof r10 === 'bigint' ? r10 + 1n : +r10 + 1;
length = a0.length;
if (value5 < length) {
r10 = value5;
continue;
}
break;
}
}
return items2.join(a1);
}
return '';
}
function stringMatchesSomePattern(a0) { // fn#9109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:968:872, offset: 0x00d5d604, size: 91 bytes, params: 2, frame: 14
const env0_0 = a0;
const r1 = arguments.length > 2 && arguments[2] !== undefined && arguments[2];
return (arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []).some(_fun9110);
}