58 lines
2.9 KiB
TypeScript
58 lines
2.9 KiB
TypeScript
/* Metro module 7504; source: modules/applications/utils/ApplicationFlagUtils.tsx; dependencies: [4235, 483, 2] */
|
|
import ApplicationRecord from '../../../records/ApplicationRecord.tsx'; /* Metro dependency 4235 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as BigFlagUtilsModule from '../../../external/discord_common/js/shared/utils/BigFlagUtils.tsx'; /* Metro dependency 483 */
|
|
|
|
function _fun60510(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7682:6, offset: 0x01704c7a, size: 130 bytes, params: 8, frame: 18
|
|
const getApplicationFlags2 = getApplicationFlags;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/applications/utils/ApplicationFlagUtils.tsx');
|
|
exports.getApplicationFlags = getApplicationFlags2;
|
|
exports.hasApplicationFlag = hasApplicationFlag;
|
|
function getApplicationFlags(a0) { // fn#60511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7682:106, offset: 0x01704cfc, size: 242 bytes, params: 2, frame: 15
|
|
var r4;
|
|
var r3;
|
|
var r2;
|
|
var r0;
|
|
var value;
|
|
var deserialize;
|
|
if (a0 == null) {
|
|
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
value = value.deserialize(0);
|
|
r0 = value;
|
|
} else {
|
|
value = a0 != null;
|
|
if (value) {
|
|
r3 = a0 instanceof ApplicationRecord || 'flags' in a0 && typeof a0.flags === 'bigint';
|
|
if (!r3) {
|
|
r4 = 'flags' in a0 && a0.flags != null;
|
|
r4 = r4 && typeof a0.flags === 'object';
|
|
r4 = r4 && 'parts' in a0.flags;
|
|
r3 = r4;
|
|
}
|
|
r2 = r3;
|
|
} else {
|
|
r2 = value;
|
|
}
|
|
if (r2) {
|
|
r0 = a0.flags;
|
|
} else {
|
|
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
deserialize = value.deserialize;
|
|
r0 = a0.flags_new ?? a0.flags ?? 0;
|
|
value = Reflect.apply(deserialize, value, [r0]);
|
|
r0 = value;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function hasApplicationFlag(a0, a1) { // fn#60512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7682:588, offset: 0x01704dee, size: 53 bytes, params: 3, frame: 14
|
|
return BigFlagUtilsModule.has(getApplicationFlags(a0), a1);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun60510, 7504, [4235, 483, 2]) /* metro module 7504, dependencies: [4235, 483, 2] */;
|