69 lines
3.0 KiB
TypeScript
69 lines
3.0 KiB
TypeScript
/* Metro module 11012; source: utils/ChatRestrictions.tsx; dependencies: [661, 11013, 1244, 2] */
|
|
function _fun84369(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11198:6, offset: 0x01f47364, size: 184 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = (require(661) /* metro dependency 661: Constants */).TOKEN_REGEX;
|
|
const items2 = [{check: check, analyticsType: '@Everyone Warning', animation: undefined}];
|
|
items2[1] = {check: function(a0) {
|
|
var r0;
|
|
var object;
|
|
var value2 = TOKEN_REGEX.test(a0);
|
|
if (value2) {
|
|
object = {};
|
|
object.body = require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.sTwS1a);
|
|
r0 = object;
|
|
} else {
|
|
r0 = !!value2;
|
|
}
|
|
return r0;
|
|
}, analyticsType: 'API Token Warning'};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ChatRestrictions.tsx');
|
|
exports.RESTRICTIONS = items2;
|
|
}
|
|
|
|
function check(a0, a1, a2) { // fn#84370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11198:122, offset: 0x01f4741c, size: 464 bytes, params: 4, frame: 22
|
|
var r8;
|
|
var value2;
|
|
var defaultImport2;
|
|
var value3;
|
|
var Math;
|
|
var pow;
|
|
var Math2;
|
|
var floor;
|
|
var Math3;
|
|
var value5;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var formatToPlainString;
|
|
var object;
|
|
if (a2) {
|
|
if (a1.getGuildId() == null) {
|
|
return false;
|
|
}
|
|
value2 = (importDefault(11013) /* metro dependency 11013: MentionGuardUtils */).extractEveryoneRole(a0, a1);
|
|
if (value2 == null) {
|
|
return false;
|
|
}
|
|
defaultImport2 = importDefault(11013) /* metro dependency 11013: MentionGuardUtils */;
|
|
if (defaultImport2.shouldShowEveryoneGuard(value2, a1)) {
|
|
value3 = (importDefault(11013) /* metro dependency 11013: MentionGuardUtils */).everyoneMemberCount(value2,
|
|
a1);
|
|
Math = global.Math;
|
|
pow = Math.pow;
|
|
Math2 = global.Math;
|
|
floor = Math2.floor;
|
|
Math3 = global.Math;
|
|
value5 = Reflect.apply(pow, Math, [10, Reflect.apply(floor, Math2, [Math3.log10(value3)])]);
|
|
r8 = a1.isForumPost() ? t.sYW2cy : a1.isThread() ? t['2YaiQ1'] : t['47E5Rz'];
|
|
formatToPlainString = intl.formatToPlainString;
|
|
object = {role: value2};
|
|
Math = global.Math;
|
|
object.count = (Math.trunc(value3 / value5) * value5).toLocaleString();
|
|
return {body: Reflect.apply(formatToPlainString, intl, [r8, object]), footer: intl.string(t.mVyrtu)};
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|