Files
2026-07-28 01:06:53 +03:00

93 lines
4.9 KiB
JavaScript

/* Metro module 437; source: unknown; dependencies: [6, 7, 438, 209, 440] */
import ClassCallCheck from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from './module-00007-CreateClass.js'; /* Metro dependency 7 */
function _fun5996(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:478:6, offset: 0x00cec31a, size: 121 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = _fun5997();
value = new value();
exports.default = value;
function _fun5997() { // fn#5997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:478:122, offset: 0x00cec393, size: 55 bytes, params: 1, frame: 14
return CreateClass(AppStateImpl, [{key: 'addEventListener', value: value_6001}]);
function AppStateImpl() { // fn#5998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:478:143, offset: 0x00cec3ca, size: 236 bytes, params: 1, frame: 19
var environment;
var defaultImport;
let value = environment.__proto__;
env1_2(this, AppStateImpl);
this.currentState = null;
if ((importDefault(438) /* metro dependency 438 */) == null) {
this.isAvailable = false;
} else {
this.isAvailable = true;
value = importDefault(209) /* metro dependency 209 */;
value = new value(null);
this._emitter = value;
defaultImport = importDefault(438) /* metro dependency 438 */;
this.currentState = defaultImport.getConstants().initialAppState;
value.addListener('appStateDidChange', _fun5999);
value = importDefault(438) /* metro dependency 438 */;
value.getCurrentAppState(_fun6000, importDefault(440) /* metro dependency 440 */);
}
function _fun5999({app_state}) { // fn#5999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:478:426, offset: 0x00cec4b6, size: 32 bytes, params: 2, frame: 2
env0_0.currentState = app_state;
}
function _fun6000(a0) { // fn#6000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:478:501, offset: 0x00cec4d6, size: 78 bytes, params: 2, frame: 14
let binding = ClassCallCheck;
if (!(binding || env0_0.currentState === a0.app_state)) {
binding = env0_0;
binding.currentState = a0.app_state;
binding = env0_1;
binding.emit('appStateDidChange', a0);
}
}
}
function value_6001(a0, a1) { // fn#6001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:478:650, offset: 0x00cec524, size: 212 bytes, params: 3, frame: 16
const env0_0 = a0;
const _emitter = this._emitter;
if (_emitter == null) {
throw new global.Error('Cannot use AppState when `isAvailable` is false.');
}
if (a0 === 'change') {
var env0_1 = a1;
return _emitter.addListener('appStateDidChange', function(a0) {
require(a0.app_state);
});
}
if (a0 === 'memoryWarning') {
return _emitter.addListener('memoryWarning', a1);
}
if (a0 === 'blur') {
var env0_2 = a1;
return _emitter.addListener('appStateFocusChange', _fun6003);
}
if (a0 === 'focus') {
var env0_2 = a1;
return _emitter.addListener('appStateFocusChange', _fun6003);
}
const Error = global.Error;
const value = 'Trying to subscribe to unknown event: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
function _fun6003(a0) { // fn#6003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:478:1026, offset: 0x00cec611, size: 72 bytes, params: 2, frame: 11
const value = a0;
if (!(env0_0 !== 'blur' || value)) {
require();
}
if (env0_0 === 'focus' && value) {
require();
}
}
}
}
}
global.__d(_fun5996, 437, [6, 7, 438, 209, 440]) /* metro module 437, dependencies: [6, 7, 438, 209, 440] */;