146 lines
7.2 KiB
TypeScript
146 lines
7.2 KiB
TypeScript
/* Metro module 9521; source: modules/quests/native/AppStoreOverlayTelemetryManager.tsx; dependencies: [6, 7, 15, 17, 18, 661, 477, 676, 4860, 2] */
|
|
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import AutomaticLifecycleManager from '../../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as ConstantsIOSModule from '../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
|
|
|
|
function _fun74283(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:6, offset: 0x01d88cc3, size: 284 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = AutomaticLifecycleManager;
|
|
value = _fun74287(value);
|
|
value = new value();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/AppStoreOverlayTelemetryManager.tsx');
|
|
exports.default = value;
|
|
exports.setAppStoreOverlayOpen = function(a0) {
|
|
env0_8 = a0;
|
|
};
|
|
exports.clearAppStoreOverlayOpen = function() {
|
|
env0_8 = null;
|
|
env0_9 = null;
|
|
};
|
|
function _isNativeReflectConstruct_74284() { // fn#74284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:173, offset: 0x01d88ddf, size: 98 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_74284_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun74287(a0) { // fn#74287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:394, offset: 0x01d88e41, size: 72 bytes, params: 2, frame: 15
|
|
const AppStoreOverlayTelemetryManager2 = AppStoreOverlayTelemetryManager;
|
|
Inherits(AppStoreOverlayTelemetryManager2, a0);
|
|
return CreateClass(AppStoreOverlayTelemetryManager2, [{key: 'handleAppStateUpdate', value: value_74290}]);
|
|
function AppStoreOverlayTelemetryManager(a0) { // fn#74288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:406, offset: 0x01d88e89, size: 152 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_2;
|
|
binding(this, AppStoreOverlayTelemetryManager);
|
|
const items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_5(AppStoreOverlayTelemetryManager);
|
|
binding = env1_4;
|
|
if (_isNativeReflectConstruct_74284()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_5(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value.actions = {APP_STATE_UPDATE: APP_STATE_UPDATE_74289};
|
|
return value;
|
|
function AppStoreOverlayTelemetryManagerAPP_STATE_UPDATE(a0) { // fn#74289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:713, owner: AppStoreOverlayTelemetryManager.APP_STATE_UPDATE, offset: 0x0114875f, size: 23 bytes, params: 2, frame: 11
|
|
return env0_0.handleAppStateUpdate(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function value_74290({state}) { // fn#74290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:858, offset: 0x01d88f21, size: 259 bytes, params: 2, frame: 18
|
|
var r1;
|
|
var r0;
|
|
var value3;
|
|
const AppStates = (ConstantsIOSModule).AppStates;
|
|
var BACKGROUND;
|
|
var value4;
|
|
var binding;
|
|
const value = environment.__proto__;
|
|
const isAndroid2 = (PlatformUtilsModule).isAndroid();
|
|
if (isAndroid2) {
|
|
r0 = !isAndroid2;
|
|
} else {
|
|
value3 = env1_8 != null;
|
|
if (value3) {
|
|
if (state !== AppStates.ACTIVE) {
|
|
BACKGROUND = AppStates.BACKGROUND;
|
|
value4 = false;
|
|
if (state !== BACKGROUND) {
|
|
r1 = value4;
|
|
} else {
|
|
binding = env1_8;
|
|
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_BACKGROUNDED);
|
|
env1_9 = global.Date.now();
|
|
r1 = value4;
|
|
}
|
|
} else if (env1_9 != null) {
|
|
binding = env1_8;
|
|
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_RETURNED, global.Date.now() - env1_9);
|
|
r1 = false;
|
|
} else {
|
|
BACKGROUND = AppStates.BACKGROUND;
|
|
value4 = false;
|
|
if (state !== BACKGROUND) {
|
|
r1 = value4;
|
|
} else {
|
|
binding = env1_8;
|
|
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_BACKGROUNDED);
|
|
env1_9 = global.Date.now();
|
|
r1 = value4;
|
|
}
|
|
}
|
|
} else {
|
|
r1 = value3;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun74283, 9521, [6, 7, 15, 17, 18, 661, 477, 676, 4860,
|
|
2]) /* metro module 9521, dependencies: [6, 7, 15, 17, 18, 661, 477, 676, 4860, 2] */;
|