Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,26 @@
|
||||
/* Metro module 3815; source: modules/device/BillingPlatformUtils.tsx; dependencies: [1581, 477, 2] */
|
||||
function _fun29511(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3942:6, offset: 0x00fc3dea, size: 127 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/BillingPlatformUtils.tsx');
|
||||
exports.isPremiumGiftingSupported = isPremiumGiftingSupported;
|
||||
exports.isGooglePlayBillingSupported = isGooglePlayBillingSupported;
|
||||
exports.isCollectibleGiftingSupported = isCollectibleGiftingSupported;
|
||||
exports.isSocialLayerStorefrontGiftingSupported = isSocialLayerStorefrontGiftingSupported;
|
||||
}
|
||||
|
||||
function isGooglePlayBillingSupported() { // fn#29513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3942:291, offset: 0x00fc3e90, size: 72 bytes, params: 1, frame: 13
|
||||
var r0;
|
||||
var value;
|
||||
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
if (isAndroid2) {
|
||||
value = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
|
||||
value = !value.isMetaQuest();
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = isAndroid2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Metro module 7138; source: modules/device/DeviceState.tsx; dependencies: [7139, 2, 7140] */
|
||||
function _fun57125(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7316:6, offset: 0x013dd188, size: 164 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/DeviceState.tsx');
|
||||
const DeviceState = (require(7140) /* metro dependency 7140: DeviceState */).DeviceState;
|
||||
exports.DeviceState = DeviceState;
|
||||
const ThermalState = (require(7140) /* metro dependency 7140: DeviceState */).ThermalState;
|
||||
exports.ThermalState = ThermalState;
|
||||
const getDeviceState = (require(7139) /* metro dependency 7139: DeviceState */).getDeviceState;
|
||||
exports.getDeviceState = getDeviceState;
|
||||
exports.logDeviceState = logDeviceState;
|
||||
}
|
||||
|
||||
function logDeviceState(a0) { // fn#57126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7316:283, offset: 0x013dd22c, size: 287 bytes, params: 2, frame: 20
|
||||
var value;
|
||||
const logger = (require(7139) /* metro dependency 7139: DeviceState */).logger;
|
||||
var info;
|
||||
var isLowPowerMode;
|
||||
if (a0 !== null) {
|
||||
logger.info('Device State Information:');
|
||||
logger.info('- Thermal State: ' + a0.thermalState);
|
||||
info = logger.info;
|
||||
value = 100 * a0.batteryLevel;
|
||||
Reflect.apply(info, logger, ['- Battery Level: ' + value + '%']);
|
||||
info = logger.info;
|
||||
isLowPowerMode = a0.isLowPowerMode;
|
||||
value = 'Disabled';
|
||||
Reflect.apply(info, logger, ['- Low Power Mode: ' + (isLowPowerMode ? 'Enabled' : value)]);
|
||||
} else {
|
||||
logger.info('Device state not available');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/* Metro module 1581; source: modules/device/MetaQuestUtils.android.tsx; dependencies: [655, 1582, 2] */
|
||||
function _fun17595(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1708:6, offset: 0x00e70d37, size: 125 bytes, params: 8, frame: 18
|
||||
const closure = isMetaQuest;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = closure();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/MetaQuestUtils.android.tsx');
|
||||
exports.isMetaQuest = closure;
|
||||
exports.isQuestRelease = isQuestRelease;
|
||||
exports.isThumbstickScrollDevice = value;
|
||||
}
|
||||
|
||||
function isMetaQuest() { // fn#17596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1708:43, offset: 0x00e70db4, size: 36 bytes, params: 1, frame: 11
|
||||
return (importDefault(655) /* metro dependency 655: NativeMetaQuestModule */).isMetaQuest();
|
||||
}
|
||||
|
||||
function isQuestRelease() { // fn#17597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1708:282, offset: 0x00e70dd8, size: 88 bytes, params: 1, frame: 13
|
||||
const value = undefined;
|
||||
const constants = (importAll(1582) /* metro dependency 1582: ClientInfoUtils */).getConstants();
|
||||
const r1 = constants == null || constants.ReleaseChannel == null ? value : constants.ReleaseChannel.startsWith('quest');
|
||||
return r1 != null && r1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/* Metro module 8093; source: modules/device/ThermalUtils.native.tsx; dependencies: [27, 477, 8094, 4092, 629, 690, 2] */
|
||||
function _fun64872(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:6, offset: 0x01bb7aa4, size: 258 bytes, params: 8, frame: 20
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const NativeEventEmitter = value.NativeEventEmitter;
|
||||
const NativeModules = value.NativeModules;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
const r1 = value.isAndroid() ? importDefault(8094) /* metro dependency 8094: NativeDeviceThermalStateModule */ : NativeModules.DCDDeviceThermalStateManager;
|
||||
const nativeEventEmitter = new NativeEventEmitter();
|
||||
const env0_5 = (require(629) /* metro dependency 629 */).create(_fun64873);
|
||||
object2 = {getRawThermalState: getRawThermalState, useRawThermalState: useRawThermalState,
|
||||
addListener: addListener_64881};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/ThermalUtils.native.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function _fun64873(a0) { // fn#64873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:237, offset: 0x01bb7ba6, size: 232 bytes, params: 2, frame: 20
|
||||
var r3;
|
||||
var r4;
|
||||
var Promise;
|
||||
var resolve;
|
||||
var defaultImport;
|
||||
const env0_0 = a0;
|
||||
const closure = updateThermalState;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
if ((require(4092) /* metro dependency 4092: DeviceUtils */).getSystemVersionMajor() >= 29) {
|
||||
Promise = global.Promise;
|
||||
resolve = Promise.resolve;
|
||||
defaultImport = importDefault(8094) /* metro dependency 8094: NativeDeviceThermalStateModule */;
|
||||
r3 = Reflect.apply(resolve, Promise, [defaultImport.getThermalState()]);
|
||||
} else {
|
||||
r3 = global.Promise.resolve(undefined);
|
||||
}
|
||||
r4 = r3;
|
||||
} else {
|
||||
r4 = NativeModules.DCDDeviceThermalStateManager.getThermalState();
|
||||
}
|
||||
r4.then(closure);
|
||||
env0_4.addListener('DeviceThermalStateDidChange', function({state}) {
|
||||
updateThermalState(state);
|
||||
});
|
||||
return {rawThermalState: undefined};
|
||||
}
|
||||
|
||||
function getRawThermalState() { // fn#64878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:727, offset: 0x01bb7d15, size: 25 bytes, params: 1, frame: 9
|
||||
const binding = env0_5;
|
||||
const getState = binding.getState;
|
||||
return Reflect.apply(getState, binding, []).rawThermalState;
|
||||
}
|
||||
|
||||
function useRawThermalState() { // fn#64879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:779, offset: 0x01bb7d2e, size: 23 bytes, params: 1, frame: 11
|
||||
return env0_5(function(a0) {
|
||||
return a0.rawThermalState;
|
||||
});
|
||||
}
|
||||
|
||||
function addListener_64881(a0) { // fn#64881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:821, offset: 0x01bb7d50, size: 30 bytes, params: 2, frame: 12
|
||||
const object2 = {};
|
||||
object2.remove = env0_5.subscribe(a0);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function updateThermalState(a0) { // fn#64874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:264, offset: 0x01bb7c8e, size: 52 bytes, params: 2, frame: 12
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun64875);
|
||||
}
|
||||
|
||||
function _fun64875() { // fn#64875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:290, offset: 0x01bb7cc2, size: 23 bytes, params: 1, frame: 11
|
||||
return env1_0(_fun64876);
|
||||
}
|
||||
|
||||
function _fun64876(a0) { // fn#64876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:297, offset: 0x01bb7cd9, size: 36 bytes, params: 2, frame: 4
|
||||
const value = a0;
|
||||
return value.rawThermalState === env1_0 ? value : {rawThermalState: env1_0};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* Metro module 7140; source: modules/device/constants/DeviceState.tsx; dependencies: [2] */
|
||||
function _fun57132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7318:6, offset: 0x013dd4e9, size: 162 bytes, params: 8, frame: 17
|
||||
var object3;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object3 = {NOMINAL: 'NOMINAL', FAIR: 'FAIR', SERIOUS: 'SERIOUS', CRITICAL: 'CRITICAL', UNKNOWN: 'UNKNOWN'};
|
||||
const object4 = {'thermalState': null, 'batteryLevel': 1, 'isLowPowerMode': false};
|
||||
const UNKNOWN = object3.UNKNOWN;
|
||||
object4.thermalState = UNKNOWN;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/constants/DeviceState.tsx');
|
||||
exports.ThermalState = object3;
|
||||
exports.DEFAULT_DEVICE_STATE = object4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 7071; source: modules/device/getDeviceMetadata.native.tsx; dependencies: [4884, 2] */
|
||||
function _fun56348(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7249:6, offset: 0x013c59eb, size: 94 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/getDeviceMetadata.native.tsx');
|
||||
exports.default = getDeviceMetadata_56349;
|
||||
}
|
||||
|
||||
function getDeviceMetadata_56349() { // fn#56349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7249:179, offset: 0x013c5a49, size: 36 bytes, params: 1, frame: 11
|
||||
return (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).getDeviceMetadata();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 5252; source: modules/device/getMediaPerformanceClass.android.tsx; dependencies: [4092, 2] */
|
||||
function _fun46709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5430:6, offset: 0x011ad7d1, size: 94 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/getMediaPerformanceClass.android.tsx');
|
||||
exports.default = getMediaPerformanceClass;
|
||||
}
|
||||
|
||||
function getMediaPerformanceClass() { // fn#46710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5430:187, offset: 0x011ad82f, size: 36 bytes, params: 1, frame: 11
|
||||
return (require(4092) /* metro dependency 4092: DeviceUtils */).getDeviceMediaPerformanceClass();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 12477; source: modules/device/hasPerformanceForKrispFullband.tsx; dependencies: [5252, 2] */
|
||||
function _fun94904(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12663:6, offset: 0x0212b971, size: 99 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/hasPerformanceForKrispFullband.tsx');
|
||||
exports.default = hasPerformanceForKrispFullband;
|
||||
}
|
||||
|
||||
function hasPerformanceForKrispFullband() { // fn#94905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12663:185, offset: 0x0212b9d4, size: 46 bytes, params: 1, frame: 11
|
||||
const value = (importDefault(5252) /* metro dependency 5252: getMediaPerformanceClassAndroid */)();
|
||||
return value === null || value >= 31;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 11106; source: modules/device/native/DCDPhotos.tsx; dependencies: [27, 2] */
|
||||
function _fun85074(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11292:6, offset: 0x01f62aa7, size: 102 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
|
||||
const DCDPhotos = NativeModules.DCDPhotos;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/DCDPhotos.tsx');
|
||||
exports.default = DCDPhotos;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 11109; source: modules/device/native/DeviceConstants.tsx; dependencies: [2] */
|
||||
function _fun85099(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11295:6, offset: 0x01f6402a, size: 146 bytes, params: 8, frame: 17
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
Object = global.Object;
|
||||
const value = Object.freeze({'VIDEO': 'ALAssetTypeVideo', 'PHOTO': 'ALAssetTypePhoto'});
|
||||
Object = global.Object;
|
||||
const value2 = Object.freeze({'VIDEO': 'video', 'IMAGE': 'image'});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/DeviceConstants.tsx');
|
||||
exports.ALAssetsType = value;
|
||||
exports.DeviceMediaType = value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
/* Metro module 11104; source: modules/device/native/DeviceMedia.tsx; dependencies: [661, 629, 683, 690, 11105, 477, 2] */
|
||||
function _fun85055(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:6, offset: 0x01f62228, size: 200 bytes, params: 8, frame: 18
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_4 = (require(629) /* metro dependency 629 */).create(function() {
|
||||
return {'assets': null, 'page': 0, 'hasReachedEnd': false, 'lastAssetIndex': 0};
|
||||
});
|
||||
object2 = {getNextAssetPage: getNextAssetPage, refreshAssets: refreshAssets, useAssets: useAssets,
|
||||
useHasReachedEnd: useHasReachedEnd};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/DeviceMedia.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function getNextAssetPage({batchSize, extensions}) { // fn#85057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:226, offset: 0x01f62300, size: 276 bytes, params: 2, frame: 22
|
||||
var image;
|
||||
var property;
|
||||
var moduleValue;
|
||||
var env0_2;
|
||||
const {assets, page, lastAssetIndex, hasReachedEnd, endCursor} = env0_4.getState();
|
||||
if (assets != null) {
|
||||
if (!hasReachedEnd) {
|
||||
property = assets.edges[assets.edges.length - 1];
|
||||
image = property == null || property.node == null ? undefined : property.node.image;
|
||||
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue.isIOS()) {
|
||||
if (image != null) {
|
||||
if (image.uri != null) {
|
||||
env0_2 = page + 1;
|
||||
(importDefault(11105) /* metro dependency 11105: getDeviceMediaPhotos */)({batchSize: batchSize,
|
||||
endCursor: endCursor, lastAssetIndex: lastAssetIndex, lastNodeImageUri: image.uri,
|
||||
extensions: extensions,
|
||||
onFetched: function(a0) {
|
||||
_fun85059(a0);
|
||||
}});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
env0_2 = page + 1;
|
||||
(importDefault(11105) /* metro dependency 11105: getDeviceMediaPhotos */)({batchSize: batchSize,
|
||||
endCursor: endCursor, lastAssetIndex: lastAssetIndex, lastNodeImageUri: image.uri,
|
||||
extensions: extensions,
|
||||
onFetched: onFetched});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function refreshAssets({batchSize, extensions}) { // fn#85062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1174, offset: 0x01f62603, size: 77 bytes, params: 2, frame: 14
|
||||
(importDefault(11105) /* metro dependency 11105: getDeviceMediaPhotos */)({batchSize: batchSize,
|
||||
extensions: extensions, onFetched: function(a0) {
|
||||
_fun85064(a0);
|
||||
}});
|
||||
}
|
||||
|
||||
function useAssets() { // fn#85067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1930, offset: 0x01f6283d, size: 25 bytes, params: 1, frame: 11
|
||||
return env0_4(function(a0) {
|
||||
return a0.assets;
|
||||
});
|
||||
}
|
||||
|
||||
function useHasReachedEnd() { // fn#85069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1968, offset: 0x01f62861, size: 25 bytes, params: 1, frame: 11
|
||||
return env0_4(function(a0) {
|
||||
return a0.hasReachedEnd;
|
||||
});
|
||||
}
|
||||
|
||||
function getNextAssetPageOnFetched(a0) { // fn#85058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:612, owner: getNextAssetPage.onFetched, offset: 0x01f62414, size: 21 bytes, params: 2, frame: 11
|
||||
onFetchedApplyStateUpdate(a0);
|
||||
}
|
||||
|
||||
function refreshAssetsOnFetched(a0) { // fn#85063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1269, owner: refreshAssets.onFetched, offset: 0x01f62650, size: 21 bytes, params: 2, frame: 11
|
||||
onFetchedApplyStateUpdate_85064(a0);
|
||||
}
|
||||
|
||||
function onFetchedApplyStateUpdate(a0) { // fn#85059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:615, owner: getNextAssetPage.onFetched.applyStateUpdate, offset: 0x01f62429, size: 342 bytes, params: 2, frame: 21
|
||||
var length;
|
||||
var r7;
|
||||
var edges;
|
||||
var value4;
|
||||
var unshift;
|
||||
var items;
|
||||
const env0_0 = a0;
|
||||
const lastAssetIndexBinding = lastAssetIndex;
|
||||
const value2 = undefined;
|
||||
if (a0 == null) {
|
||||
length = value2;
|
||||
} else {
|
||||
edges = a0.edges;
|
||||
length = edges == null ? value2 : edges.length;
|
||||
}
|
||||
const value3 = 0;
|
||||
let r1 = length ?? value3;
|
||||
const env0_1 = lastAssetIndexBinding + r1;
|
||||
if (assets != null) {
|
||||
value4 = a0 == null;
|
||||
if (value4) {
|
||||
r1 = value4;
|
||||
r7 = value2;
|
||||
} else {
|
||||
edges = a0.edges;
|
||||
r1 = edges == null;
|
||||
r7 = edges;
|
||||
}
|
||||
if (!r1) {
|
||||
unshift = r7.unshift;
|
||||
edges = assets.edges;
|
||||
items = [];
|
||||
arraySpread(items, edges, value3, undefined);
|
||||
apply(unshift, items, r7, undefined);
|
||||
}
|
||||
}
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun85060);
|
||||
let r5 = a0 == null || value3 === a0.edges.length;
|
||||
r5 = !r5 ? (a0.page_info == null ? value2 : a0.page_info.has_next_page) === false : r5;
|
||||
if (r5) {
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun85061);
|
||||
}
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const MEDIA_PICKER_INFINITE_SCROLL_PAGED = AnalyticEvents.MEDIA_PICKER_INFINITE_SCROLL_PAGED;
|
||||
Reflect.apply(track, defaultImport, [MEDIA_PICKER_INFINITE_SCROLL_PAGED, {page: env1_2, has_reached_end: r5}]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function onFetchedApplyStateUpdate_85064(a0) { // fn#85064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1272, owner: refreshAssets.onFetched.applyStateUpdate, offset: 0x01f62665, size: 210 bytes, params: 2, frame: 19
|
||||
var environment;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
const env0_0 = a0;
|
||||
let value = undefined;
|
||||
const length = a0 == null ? value : a0.edges.filter(function(a0) {
|
||||
var value = undefined;
|
||||
return (a0 == null || a0.node == null || a0.node.image == null ? value : a0.node.image.uri) == null || (a0 == null || a0.node == null || a0.node.image == null ? value : a0.node.image.uri) === '';
|
||||
}).length;
|
||||
const value2 = 0;
|
||||
const r6 = length ?? value2;
|
||||
if (r6 > value2) {
|
||||
value3 = environment.__proto__.__proto__;
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
defaultImport.track(AnalyticEvents.MEDIA_PICKER_ASSETS_DEBUG, {num_broken_assets: r6,
|
||||
num_assets: a0 == null || a0.edges == null ? value : a0.edges.length,
|
||||
location: 'DeviceMedia.applyStateUpdate'});
|
||||
}
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun85066);
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun85060() { // fn#85060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:802, offset: 0x01f6257f, size: 98 bytes, params: 1, frame: 16
|
||||
const binding = env3_4;
|
||||
const setState = binding.setState;
|
||||
const binding2 = env0_0;
|
||||
const value3 = undefined;
|
||||
Reflect.apply(setState, binding, [{assets: binding2, page: env2_2, lastAssetIndex: env0_1,
|
||||
endCursor: binding2 == null || env0_0.page_info == null ? value3 : env0_0.page_info.end_cursor}]);
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun85061() { // fn#85061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1036, offset: 0x01f625e1, size: 34 bytes, params: 1, frame: 12
|
||||
return env3_4.setState({hasReachedEnd: env0_2});
|
||||
}
|
||||
|
||||
function _fun85066() { // fn#85066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1703, offset: 0x01f627a5, size: 152 bytes, params: 1, frame: 17
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
const binding = env3_4;
|
||||
const setState = binding.setState;
|
||||
const binding2 = env0_0;
|
||||
const value3 = undefined;
|
||||
const has_next_page = env0_0 == null || env0_0.page_info == null ? value3 : env0_0.page_info.has_next_page;
|
||||
Reflect.apply(setState, binding, [{assets: binding2, page: 0, lastAssetIndex: batchSize,
|
||||
endCursor: binding2 == null || env0_0.page_info == null ? value3 : env0_0.page_info.end_cursor,
|
||||
hasReachedEnd: !(has_next_page == null || has_next_page)}]);
|
||||
return value3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,282 @@
|
||||
/* Metro module 7717; source: modules/device/native/DeviceOrientation.tsx; dependencies: [31, 27, 629, 477, 690, 4092, 7718, 2] */
|
||||
function _fun61716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:6, offset: 0x01b49394, size: 470 bytes, params: 8, frame: 27
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = handleOrientationChange;
|
||||
const consumeUnlockAfterRotationToLockRequest = function() {
|
||||
unlockOrientation({unlockAfterRotatingToPreviousLock: false});
|
||||
env0_8 = false;
|
||||
};
|
||||
const closure2 = unlockOrientation;
|
||||
const closure3 = lockOrientation;
|
||||
const closure4 = function(a0) {
|
||||
if (!(require(dependencyMap[3]).isAndroid() || require(dependencyMap[5]).isIpadOS() && a0 == null)) {
|
||||
lockOrientation(a0);
|
||||
}
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const AppState = (require(27) /* metro dependency 27 */).AppState;
|
||||
object2 = {PORTRAIT: 0};
|
||||
object2[0] = 'PORTRAIT';
|
||||
object2.LANDSCAPE = 1;
|
||||
object2[1] = 'LANDSCAPE';
|
||||
const env0_5 = ['PORTRAIT', 'PORTRAITUPSIDEDOWN'];
|
||||
let value = require(629) /* metro dependency 629 */;
|
||||
value = value.create(_fun61728);
|
||||
(importDefault(7718) /* metro dependency 7718 */).addOrientationDegreesChangeListener(handleOrientationDegreesChange);
|
||||
(importDefault(7718) /* metro dependency 7718 */).addOrientationListener(closure);
|
||||
const value4 = importDefault(7718) /* metro dependency 7718 */;
|
||||
const getInitialOrientation = value4.getInitialOrientation;
|
||||
closure(Reflect.apply(getInitialOrientation, value4, []));
|
||||
AppState.addEventListener('change', applyLockStateOnAppActive);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/DeviceOrientation.tsx');
|
||||
exports.OrientationType = object2;
|
||||
exports.useStore = value;
|
||||
exports.handleOrientationChange = closure;
|
||||
exports.unlockOrientation = closure2;
|
||||
exports.lockOrientation = closure3;
|
||||
exports.lockOrientationForiOS = closure4;
|
||||
exports.toggleOrientation = toggleOrientation;
|
||||
exports.getOrientation = getOrientation;
|
||||
exports.getOrientationLock = getOrientationLock;
|
||||
exports.useOrientation = useOrientation;
|
||||
exports.useOrientationListener = useOrientationListener;
|
||||
exports.restoreDefaultOrientation = restoreDefaultOrientation;
|
||||
}
|
||||
|
||||
function handleOrientationChange(a0) { // fn#61717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:329, offset: 0x01b4956a, size: 276 bytes, params: 2, frame: 17
|
||||
var r3;
|
||||
var binding;
|
||||
var orientationLock;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
handleDeviceOrientationChange(a0);
|
||||
}
|
||||
if (env0_7 !== a0) {
|
||||
env0_7 = a0;
|
||||
binding = env0_6;
|
||||
orientationLock = binding.getState().orientationLock;
|
||||
r3 = orientationLock != null && env0_5.includes(orientationLock);
|
||||
if (env0_7 !== 'LANDSCAPE') {
|
||||
r3 = env0_7 === 'PORTRAIT' || (require(4092) /* metro dependency 4092: DeviceUtils */).isIpadOS() && env0_7 === 'PORTRAITUPSIDEDOWN';
|
||||
r3 = r3 && orientationLock !== 'LANDSCAPE';
|
||||
if (r3) {
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61718);
|
||||
}
|
||||
} else if (r3) {
|
||||
r3 = env0_7 === 'PORTRAIT' || (require(4092) /* metro dependency 4092: DeviceUtils */).isIpadOS() && env0_7 === 'PORTRAITUPSIDEDOWN';
|
||||
r3 = r3 && orientationLock !== 'LANDSCAPE';
|
||||
if (r3) {
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61718);
|
||||
}
|
||||
} else {
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61719);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleDeviceOrientationChange(a0) { // fn#61720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:721, offset: 0x01b496c8, size: 83 bytes, params: 2, frame: 12
|
||||
const binding = env0_6;
|
||||
const getState = binding.getState;
|
||||
const orientationLock = Reflect.apply(getState, binding, []).orientationLock;
|
||||
if (env0_8) {
|
||||
if (a0 === 'LANDSCAPE') {
|
||||
if (orientationLock === 'LANDSCAPE') {
|
||||
consumeUnlockAfterRotationToLockRequest();
|
||||
}
|
||||
} else if (a0 === 'PORTRAIT') {
|
||||
if (orientationLock === 'PORTRAIT') {
|
||||
consumeUnlockAfterRotationToLockRequest();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function unlockOrientation({unlockAfterRotatingToPreviousLock}) { // fn#61722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1082, offset: 0x01b49738, size: 239 bytes, params: 2, frame: 16
|
||||
var moduleValue2;
|
||||
const binding = env0_6;
|
||||
const getState = binding.getState;
|
||||
const orientationLock = Reflect.apply(getState, binding, []).orientationLock;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
if (unlockAfterRotatingToPreviousLock) {
|
||||
if (orientationLock == null) {
|
||||
(importDefault(7718) /* metro dependency 7718 */).ignoreAutoRotate(false);
|
||||
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
|
||||
}
|
||||
} else {
|
||||
(importDefault(7718) /* metro dependency 7718 */).ignoreAutoRotate(false);
|
||||
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
|
||||
}
|
||||
} else {
|
||||
moduleValue2 = platformUtilsModule;
|
||||
if (moduleValue2.isIOS()) {
|
||||
if ((require(4092) /* metro dependency 4092: DeviceUtils */).getSystemVersionMajor() >= 16) {
|
||||
if (unlockAfterRotatingToPreviousLock) {
|
||||
if (orientationLock == null) {
|
||||
(importDefault(7718) /* metro dependency 7718 */).ignoreAutoRotate(false);
|
||||
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
|
||||
}
|
||||
} else {
|
||||
(importDefault(7718) /* metro dependency 7718 */).ignoreAutoRotate(false);
|
||||
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
|
||||
}
|
||||
} else {
|
||||
(importDefault(7718) /* metro dependency 7718 */).ignoreAutoRotate(false);
|
||||
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
|
||||
}
|
||||
} else {
|
||||
(importDefault(7718) /* metro dependency 7718 */).ignoreAutoRotate(false);
|
||||
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function lockOrientation(a0, a1) { // fn#61724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1404, offset: 0x01b49846, size: 192 bytes, params: 3, frame: 17
|
||||
let value = a1;
|
||||
const defaultImport = importDefault(7718) /* metro dependency 7718 */;
|
||||
defaultImport.ignoreAutoRotate(value != null && value);
|
||||
if (a0 === 'LANDSCAPE') {
|
||||
value = defaultImport;
|
||||
value.lockToLandscapeLeft();
|
||||
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
|
||||
value.batchUpdates(_fun61725);
|
||||
} else {
|
||||
value = importDefault(7718) /* metro dependency 7718 */;
|
||||
value.lockToPortrait();
|
||||
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
|
||||
value.batchUpdates(_fun61726);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun61728() { // fn#61728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:263, offset: 0x01b499a9, size: 29 bytes, params: 1, frame: 2
|
||||
const PORTRAIT = env0_4.PORTRAIT;
|
||||
return {orientation: PORTRAIT, orientationLock: null};
|
||||
}
|
||||
|
||||
function handleOrientationDegreesChange(a0) { // fn#61729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1846, offset: 0x01b499c6, size: 198 bytes, params: 2, frame: 14
|
||||
let r1 = a0 >= 0 && a0 <= 5;
|
||||
r1 = !r1 ? a0 >= 355 : r1;
|
||||
value = 'PORTRAIT';
|
||||
const r0 = r1 === true ? value : (a0 >= 85 && a0 <= 95) === true ? 'LANDSCAPE-RIGHT' : (a0 >= 175 && a0 <= 185) === true ? 'PORTRAITUPSIDEDOWN' : (a0 >= 265 && a0 <= 275) === true ? 'LANDSCAPE-LEFT' : 'UNKNOWN';
|
||||
if (r0 === 'LANDSCAPE-LEFT') {
|
||||
handleDeviceOrientationChange('LANDSCAPE');
|
||||
} else if (r0 === 'LANDSCAPE-RIGHT') {
|
||||
handleDeviceOrientationChange('LANDSCAPE');
|
||||
} else if (value === r0) {
|
||||
handleDeviceOrientationChange(value);
|
||||
}
|
||||
}
|
||||
|
||||
function applyLockStateOnAppActive(a0) { // fn#61730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:2422, offset: 0x01b49a8c, size: 64 bytes, params: 2, frame: 13
|
||||
const binding = env0_6;
|
||||
const getState = binding.getState;
|
||||
const orientationLock = Reflect.apply(getState, binding, []).orientationLock;
|
||||
if (a0 === 'active' && orientationLock != null) {
|
||||
lockOrientation(orientationLock, true);
|
||||
}
|
||||
}
|
||||
|
||||
function toggleOrientation() { // fn#61731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:2841, offset: 0x01b49acc, size: 274 bytes, params: 1, frame: 16
|
||||
const {orientation, orientationLock} = env0_6.getState();
|
||||
const r3 = orientationLock != null && env0_5.includes(orientationLock);
|
||||
const LANDSCAPE = env0_4.LANDSCAPE;
|
||||
if (orientation !== LANDSCAPE) {
|
||||
if (!(orientation !== env0_4.PORTRAIT || r3)) {
|
||||
(importDefault(7718) /* metro dependency 7718 */).lockToLandscapeLeft();
|
||||
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61733);
|
||||
}
|
||||
} else if (orientationLock !== 'LANDSCAPE') {
|
||||
(importDefault(7718) /* metro dependency 7718 */).lockToPortrait();
|
||||
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61732);
|
||||
} else if (!(orientation !== env0_4.PORTRAIT || r3)) {
|
||||
(importDefault(7718) /* metro dependency 7718 */).lockToLandscapeLeft();
|
||||
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61733);
|
||||
}
|
||||
}
|
||||
|
||||
function getOrientation() { // fn#61734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3250, offset: 0x01b49bde, size: 25 bytes, params: 1, frame: 9
|
||||
const binding = env0_6;
|
||||
const getState = binding.getState;
|
||||
return Reflect.apply(getState, binding, []).orientation;
|
||||
}
|
||||
|
||||
function getOrientationLock() { // fn#61735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3330, offset: 0x01b49bf7, size: 25 bytes, params: 1, frame: 9
|
||||
const binding = env0_6;
|
||||
const getState = binding.getState;
|
||||
return Reflect.apply(getState, binding, []).orientationLock;
|
||||
}
|
||||
|
||||
function useOrientation() { // fn#61736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3414, offset: 0x01b49c10, size: 21 bytes, params: 1, frame: 9
|
||||
return env0_6().orientation;
|
||||
}
|
||||
|
||||
function useOrientationListener(a0) { // fn#61737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3489, offset: 0x01b49c25, size: 44 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
env0_3.useEffect(_fun61738, [a0]);
|
||||
}
|
||||
|
||||
function restoreDefaultOrientation() { // fn#61739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3591, offset: 0x01b49c6c, size: 129 bytes, params: 1, frame: 13
|
||||
var moduleValue2;
|
||||
var binding;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
moduleValue2 = require(4092) /* metro dependency 4092: DeviceUtils */;
|
||||
if (moduleValue2.isIpadOS()) {
|
||||
unlockOrientation({unlockAfterRotatingToPreviousLock: false});
|
||||
lockOrientationForiOS();
|
||||
return undefined;
|
||||
}
|
||||
binding = env0_6;
|
||||
if (binding.getState().orientationLock !== 'PORTRAIT') {
|
||||
unlockOrientation({unlockAfterRotatingToPreviousLock: false});
|
||||
lockOrientationForiOS();
|
||||
return undefined;
|
||||
}
|
||||
} else {
|
||||
unlockOrientation({unlockAfterRotatingToPreviousLock: false});
|
||||
lockOrientationForiOS();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun61718() { // fn#61718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:611, offset: 0x01b4967e, size: 37 bytes, params: 1, frame: 12
|
||||
const binding = env1_6;
|
||||
const setState = binding.setState;
|
||||
const PORTRAIT = env1_4.PORTRAIT;
|
||||
return Reflect.apply(setState, binding, [{orientation: PORTRAIT}]);
|
||||
}
|
||||
|
||||
function _fun61719() { // fn#61719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:676, offset: 0x01b496a3, size: 37 bytes, params: 1, frame: 12
|
||||
const binding = env1_6;
|
||||
const setState = binding.setState;
|
||||
const LANDSCAPE = env1_4.LANDSCAPE;
|
||||
return Reflect.apply(setState, binding, [{orientation: LANDSCAPE}]);
|
||||
}
|
||||
|
||||
function _fun61723() { // fn#61723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1360, offset: 0x01b49827, size: 31 bytes, params: 1, frame: 12
|
||||
env1_6.setState({orientationLock: null});
|
||||
}
|
||||
|
||||
function _fun61725() { // fn#61725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1547, offset: 0x01b49906, size: 33 bytes, params: 1, frame: 12
|
||||
env1_6.setState({orientationLock: 'LANDSCAPE'});
|
||||
}
|
||||
|
||||
function _fun61726() { // fn#61726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1649, offset: 0x01b49927, size: 33 bytes, params: 1, frame: 12
|
||||
env1_6.setState({orientationLock: 'PORTRAIT'});
|
||||
}
|
||||
|
||||
function _fun61738() { // fn#61738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3537, offset: 0x01b49c51, size: 27 bytes, params: 1, frame: 11
|
||||
return env1_6.subscribe(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
/* Metro module 7139; source: modules/device/native/DeviceState.tsx; dependencies: [5, 27, 3, 7140, 2] */
|
||||
function _fun57127(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7317:6, offset: 0x013dd34b, size: 191 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).NativeModules;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('native/DeviceState.tsx');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/DeviceState.tsx');
|
||||
exports.logger = value;
|
||||
exports.getDeviceState = function() {
|
||||
return _getDeviceState.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _getDeviceState() { // fn#57128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7317:171, offset: 0x013dd40a, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_2(_fun57130).apply(this, arguments);
|
||||
}
|
||||
|
||||
async function _fun57130() { // fn#57130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7317:224, offset: 0x013dd44c, size: 157 bytes, params: 1, frame: 19
|
||||
var r2;
|
||||
var binding;
|
||||
var MediaManager;
|
||||
var getDeviceStateInfo;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var error;
|
||||
var DEFAULT_DEVICE_STATE;
|
||||
let value = a0;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const fallback = (value !== undefined ? value : {fallback: true}).fallback;
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
try {
|
||||
binding = env2_3;
|
||||
} catch (error) {
|
||||
binding = env2_4;
|
||||
binding.warn('Failed to get device state:', error);
|
||||
if (fallback) {
|
||||
binding = env2_0;
|
||||
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
|
||||
r2 = DEFAULT_DEVICE_STATE;
|
||||
} else {
|
||||
r2 = error;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
try {
|
||||
MediaManager = binding.MediaManager;
|
||||
} catch (error) {
|
||||
binding = env2_4;
|
||||
binding.warn('Failed to get device state:', error);
|
||||
if (fallback) {
|
||||
binding = env2_0;
|
||||
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
|
||||
r2 = DEFAULT_DEVICE_STATE;
|
||||
} else {
|
||||
r2 = error;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
try {
|
||||
getDeviceStateInfo = MediaManager.getDeviceStateInfo;
|
||||
} catch (error) {
|
||||
binding = env2_4;
|
||||
binding.warn('Failed to get device state:', error);
|
||||
if (fallback) {
|
||||
binding = env2_0;
|
||||
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
|
||||
r2 = DEFAULT_DEVICE_STATE;
|
||||
} else {
|
||||
r2 = error;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
try {
|
||||
value5 = Reflect.apply(getDeviceStateInfo, MediaManager, []);
|
||||
} catch (error) {
|
||||
binding = env2_4;
|
||||
binding.warn('Failed to get device state:', error);
|
||||
if (fallback) {
|
||||
binding = env2_0;
|
||||
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
|
||||
r2 = DEFAULT_DEVICE_STATE;
|
||||
} else {
|
||||
r2 = error;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
await value5;
|
||||
try {
|
||||
value6 = undefined;
|
||||
value7 = false;
|
||||
} catch (error) {
|
||||
binding = env2_4;
|
||||
binding.warn('Failed to get device state:', error);
|
||||
if (fallback) {
|
||||
binding = env2_0;
|
||||
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
|
||||
r2 = DEFAULT_DEVICE_STATE;
|
||||
} else {
|
||||
r2 = error;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
return value7 ? value6 : value6;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/* Metro module 10706; source: modules/device/native/WakeLock.tsx; dependencies: [31, 27, 477, 10707, 2] */
|
||||
function _fun82266(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10892:6, offset: 0x01ef14a9, size: 160 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const closure = useWakeLock;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).NativeModules;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/WakeLock.tsx');
|
||||
exports.default = function({wakeLockKey}) {
|
||||
useWakeLock(wakeLockKey);
|
||||
return null;
|
||||
};
|
||||
exports.useWakeLock = closure;
|
||||
}
|
||||
|
||||
function useWakeLock(a0) { // fn#82267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10892:130, offset: 0x01ef1549, size: 46 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
env0_3.useEffect(_fun82268, [a0]);
|
||||
}
|
||||
|
||||
function _fun82268() { // fn#82268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10892:167, offset: 0x01ef1577, size: 117 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
(importDefault(10707) /* metro dependency 10707: NativeScreenWakeLockModule */).requestLock(env0_0);
|
||||
} else {
|
||||
NativeModules.ScreenWakeLockManager.requestLock(env0_0);
|
||||
}
|
||||
return _fun82269;
|
||||
}
|
||||
|
||||
function _fun82269() { // fn#82269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10892:254, offset: 0x01ef15ec, size: 108 bytes, params: 1, frame: 13
|
||||
var ScreenWakeLockManager;
|
||||
var releaseLock;
|
||||
var value2;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
value = importDefault(10707) /* metro dependency 10707: NativeScreenWakeLockModule */;
|
||||
releaseLock = value.releaseLock;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(releaseLock, value, [env1_0]);
|
||||
} else {
|
||||
ScreenWakeLockManager = NativeModules.ScreenWakeLockManager;
|
||||
releaseLock = ScreenWakeLockManager.releaseLock;
|
||||
value = environment.__proto__;
|
||||
Reflect.apply(releaseLock, ScreenWakeLockManager, [env1_0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/* Metro module 11105; source: modules/device/native/getDeviceMediaPhotos.tsx; dependencies: [27, 3, 1216, 477, 11106, 2] */
|
||||
function _fun85071(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11291:6, offset: 0x01f62885, size: 166 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).NativeModules;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('DeviceMedia.tsx');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/getDeviceMediaPhotos.tsx');
|
||||
exports.default = getDeviceMediaPhotos;
|
||||
}
|
||||
|
||||
function getDeviceMediaPhotos({batchSize, endCursor, lastAssetIndex, lastNodeImageUri, extensions, onFetched, onError = getDeviceMediaPhotosU}) { // fn#85072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11291:247, offset: 0x01f6292b, size: 280 bytes, params: 2, frame: 21
|
||||
var CameraRollUtils;
|
||||
var value;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
if ((importDefault(11106) /* metro dependency 11106: DCDPhotos */) != null) {
|
||||
value = importDefault(11106) /* metro dependency 11106: DCDPhotos */;
|
||||
value = value.getPhotos({'first': null, 'groupTypes': 'Recents', 'assetType': 'All', first: batchSize,
|
||||
after: endCursor, extensions: extensions});
|
||||
value = value.then(onFetched);
|
||||
value.catch(onError);
|
||||
}
|
||||
} else {
|
||||
CameraRollUtils = NativeModules.CameraRollUtils;
|
||||
value = CameraRollUtils.getPhotos({first: batchSize, assetType: 'All', after: lastNodeImageUri,
|
||||
offset: lastAssetIndex, extensions: extensions});
|
||||
value = value.then(onFetched);
|
||||
value.catch(onError);
|
||||
}
|
||||
}
|
||||
|
||||
function getDeviceMediaPhotosU(a0) { // fn#85073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11291:373, owner: getDeviceMediaPhotos.u, offset: 0x01f62a43, size: 100 bytes, params: 2, frame: 16
|
||||
const value = environment.__proto__;
|
||||
env1_4.log('CameraRollUtils -- Failed to get photos with error ' + a0);
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureException(a0,
|
||||
{tags: {source: 'DEVICE_MEDIA'}});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
/* Metro module 8095; source: modules/device/useThermalState.tsx; dependencies: [477, 8093, 2] */
|
||||
function _fun64883(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8280:6, offset: 0x01bb7ddf, size: 334 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object3 = {UNHANDLED: -1};
|
||||
object3[-1] = 'UNHANDLED';
|
||||
object3.NOMINAL = 0;
|
||||
object3[0] = 'NOMINAL';
|
||||
object3.FAIR = 1;
|
||||
object3[1] = 'FAIR';
|
||||
object3.SERIOUS = 2;
|
||||
object3[2] = 'SERIOUS';
|
||||
object3.CRITICAL = 3;
|
||||
object3[3] = 'CRITICAL';
|
||||
const object4 = {NONE: 0};
|
||||
object4[0] = 'NONE';
|
||||
object4.LIGHT = 1;
|
||||
object4[1] = 'LIGHT';
|
||||
object4.MODERATE = 2;
|
||||
object4[2] = 'MODERATE';
|
||||
object4.SEVERE = 3;
|
||||
object4[3] = 'SEVERE';
|
||||
object4.CRITICAL = 4;
|
||||
object4[4] = 'CRITICAL';
|
||||
object4.EMERGENCY = 5;
|
||||
object4[5] = 'EMERGENCY';
|
||||
object4.SHUTDOWN = 6;
|
||||
object4[6] = 'SHUTDOWN';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/useThermalState.tsx');
|
||||
exports.default = useThermalState;
|
||||
exports.ThermalStates = object3;
|
||||
exports.AndroidThermalStates = object4;
|
||||
exports.getThermalState = getThermalState;
|
||||
}
|
||||
|
||||
function _getThermalState(a0) { // fn#64884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8280:451, offset: 0x01bb7f2d, size: 271 bytes, params: 2, frame: 14
|
||||
if (a0 != null) {
|
||||
var moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue.isIOS()) {
|
||||
return a0;
|
||||
}
|
||||
var moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue2.isAndroid()) {
|
||||
if (env0_4.NONE === a0) {
|
||||
return env0_3.NOMINAL;
|
||||
}
|
||||
if (env0_4.LIGHT === a0) {
|
||||
return env0_3.FAIR;
|
||||
}
|
||||
if (env0_4.MODERATE === a0) {
|
||||
return env0_3.FAIR;
|
||||
}
|
||||
if (env0_4.SEVERE === a0) {
|
||||
return env0_3.SERIOUS;
|
||||
}
|
||||
if (env0_4.CRITICAL === a0) {
|
||||
return env0_3.CRITICAL;
|
||||
}
|
||||
if (env0_4.EMERGENCY === a0) {
|
||||
return env0_3.CRITICAL;
|
||||
}
|
||||
if (env0_4.SHUTDOWN === a0) {
|
||||
return env0_3.CRITICAL;
|
||||
}
|
||||
return env0_3.UNHANDLED;
|
||||
}
|
||||
}
|
||||
return env0_3.UNHANDLED;
|
||||
}
|
||||
|
||||
function useThermalState() { // fn#64885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8280:867, offset: 0x01bb803c, size: 46 bytes, params: 1, frame: 12
|
||||
const _getThermalStateBinding = _getThermalState;
|
||||
const value = importDefault(8093) /* metro dependency 8093: ThermalUtilsNative */;
|
||||
const useRawThermalState = value.useRawThermalState;
|
||||
return _getThermalStateBinding(Reflect.apply(useRawThermalState, value, []));
|
||||
}
|
||||
|
||||
function getThermalState() { // fn#64886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8280:1010, offset: 0x01bb806a, size: 46 bytes, params: 1, frame: 12
|
||||
const _getThermalStateBinding = _getThermalState;
|
||||
const value = importDefault(8093) /* metro dependency 8093: ThermalUtilsNative */;
|
||||
const getRawThermalState = value.getRawThermalState;
|
||||
return _getThermalStateBinding(Reflect.apply(getRawThermalState, value, []));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user