311 lines
16 KiB
JavaScript
311 lines
16 KiB
JavaScript
/* Metro module 7417; source: unknown; dependencies: [5, 7396, 7418, 7397, 7369, 7380, 7383, 7376, 7406, 7370, 7392] */
|
|
import * as Module00005Module from './module-00005.js'; /* Metro dependency 5 */
|
|
import * as Module07369Module from './module-07369.js'; /* Metro dependency 7369 */
|
|
import * as Module07370Module from './module-07370.js'; /* Metro dependency 7370 */
|
|
import * as moduleValue2 from './module-07376.js'; /* Metro dependency 7376 */
|
|
import * as Module07380Module from './module-07380.js'; /* Metro dependency 7380 */
|
|
import * as Module07383Module from './module-07383.js'; /* Metro dependency 7383 */
|
|
import * as moduleValue4 from './module-07392.js'; /* Metro dependency 7392 */
|
|
import * as Module07396Module from './module-07396.js'; /* Metro dependency 7396 */
|
|
import * as DEBUG_BUILDModule from './module-07397-DEBUG_BUILD.js'; /* Metro dependency 7397 */
|
|
import * as Module07418Module from './module-07418.js'; /* Metro dependency 7418 */
|
|
|
|
function _fun59777(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:6, offset: 0x016f2929, size: 325 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const captureCheckIn_597782 = captureCheckIn_59778;
|
|
const endSession_597852 = endSession_59785;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.addEventProcessor = addEventProcessor_59787;
|
|
exports.captureCheckIn = captureCheckIn_597782;
|
|
exports.captureEvent = captureEvent_59788;
|
|
exports.captureException = captureException_59789;
|
|
exports.captureMessage = captureMessage_59790;
|
|
exports.captureSession = captureSession_59791;
|
|
exports.close = function(a0) {
|
|
return _close_59782.apply(this, arguments);
|
|
};
|
|
exports.endSession = endSession_597852;
|
|
exports.flush = function(a0) {
|
|
return _flush_59779.apply(this, arguments);
|
|
};
|
|
exports.isEnabled = isEnabled_59794;
|
|
exports.isInitialized = isInitialized_59795;
|
|
exports.lastEventId = lastEventId_59796;
|
|
exports.setContext = setContext_59797;
|
|
exports.setExtra = setExtra_59798;
|
|
exports.setExtras = setExtras_59799;
|
|
exports.setTag = setTag_59800;
|
|
exports.setTags = setTags_59801;
|
|
exports.setUser = setUser_59802;
|
|
exports.startSession = startSession_59803;
|
|
exports.withMonitor = withMonitor_59804;
|
|
function captureCheckIn_59778(a0, a1) { // fn#59778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:45, offset: 0x016f2a6e, size: 266 bytes, params: 3, frame: 17
|
|
const DEBUG_BUILD = (DEBUG_BUILDModule).DEBUG_BUILD;
|
|
const logger = (Module07369Module).logger;
|
|
const currentScope = (Module07396Module).getCurrentScope();
|
|
const client = (Module07396Module).getClient();
|
|
if (client) {
|
|
if (client.captureCheckIn) {
|
|
return client.captureCheckIn(a0, a1, currentScope);
|
|
}
|
|
if (DEBUG_BUILD) {
|
|
logger.warn('Cannot capture check-in. Client does not support sending check-ins.');
|
|
}
|
|
} else if (DEBUG_BUILD) {
|
|
logger.warn('Cannot capture check-in. No client defined.');
|
|
}
|
|
return (Module07380Module).uuid4();
|
|
}
|
|
|
|
function _flush_59779() { // fn#59779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:413, offset: 0x016f2b78, size: 47 bytes, params: 1, frame: 14
|
|
return Module00005Module(_fun59781).apply(this, arguments);
|
|
function* _fun59781(a0) { // fn#59781, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:448, offset: 0x016f2bb0, size: 161 bytes, params: 2, frame: 15
|
|
var r1;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const client = env2_0(env2_1[1]).getClient();
|
|
if (client) {
|
|
r1 = client.flush(a0);
|
|
} else {
|
|
if (env2_0(env2_1[3]).DEBUG_BUILD) {
|
|
env2_0(env2_1[4]).logger.warn('Cannot flush events. No client defined.');
|
|
}
|
|
r1 = global.Promise.resolve(false);
|
|
}
|
|
return r1;
|
|
}
|
|
|
|
}
|
|
|
|
function _close_59782() { // fn#59782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:639, offset: 0x016f2c51, size: 47 bytes, params: 1, frame: 14
|
|
return Module00005Module(_fun59784).apply(this, arguments);
|
|
function* _fun59784(a0) { // fn#59784, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:674, offset: 0x016f2c89, size: 161 bytes, params: 2, frame: 15
|
|
var r1;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const client = env2_0(env2_1[1]).getClient();
|
|
if (client) {
|
|
r1 = client.close(a0);
|
|
} else {
|
|
if (env2_0(env2_1[3]).DEBUG_BUILD) {
|
|
env2_0(env2_1[4]).logger.warn('Cannot flush events and disable SDK. No client defined.');
|
|
}
|
|
r1 = global.Promise.resolve(false);
|
|
}
|
|
return r1;
|
|
}
|
|
|
|
}
|
|
|
|
function endSession_59785() { // fn#59785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:881, offset: 0x016f2d2a, size: 141 bytes, params: 1, frame: 16
|
|
const isolationScope = (Module07396Module).getIsolationScope();
|
|
const currentScope = (Module07396Module).getCurrentScope();
|
|
const r6 = currentScope.getSession() || isolationScope.getSession();
|
|
if (r6) {
|
|
(require(7392) /* metro dependency 7392 */).closeSession(r6);
|
|
}
|
|
_sendSessionUpdate_59786();
|
|
isolationScope.setSession();
|
|
currentScope.setSession();
|
|
}
|
|
|
|
function _sendSessionUpdate_59786() { // fn#59786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:1077, offset: 0x016f2db7, size: 121 bytes, params: 1, frame: 15
|
|
var r2;
|
|
let value = Module07396Module;
|
|
value = value.getIsolationScope();
|
|
const currentScope = (Module07396Module).getCurrentScope();
|
|
const client = (Module07396Module).getClient();
|
|
const session = currentScope.getSession();
|
|
if (session) {
|
|
r2 = session;
|
|
} else {
|
|
value = value.getSession();
|
|
r2 = value;
|
|
}
|
|
if (r2 && client) {
|
|
client.captureSession(r2);
|
|
}
|
|
}
|
|
|
|
function addEventProcessor_59787(a0) { // fn#59787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:1321, offset: 0x00d67b02, size: 51 bytes, params: 2, frame: 12
|
|
let value = Module07396Module;
|
|
value = value.getIsolationScope();
|
|
value.addEventProcessor(a0);
|
|
}
|
|
|
|
function captureEvent_59788(a0, a1) { // fn#59788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:1450, offset: 0x00d67b35, size: 55 bytes, params: 3, frame: 13
|
|
let value = Module07396Module;
|
|
value = value.getCurrentScope();
|
|
return value.captureEvent(a0, a1);
|
|
}
|
|
|
|
function captureException_59789(a0, a1) { // fn#59789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:1549, offset: 0x00d67b6c, size: 78 bytes, params: 3, frame: 15
|
|
let value = Module07396Module;
|
|
value = value.getCurrentScope();
|
|
return value.captureException(a0, (Module07418Module).parseEventHintOrCaptureContext(a1));
|
|
}
|
|
|
|
function captureMessage_59790(a0, a1) { // fn#59790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:1694, offset: 0x00d67bba, size: 88 bytes, params: 3, frame: 16
|
|
let value = a1;
|
|
const value2 = typeof value;
|
|
const value3 = undefined;
|
|
const r4 = value2 !== 'string' ? value3 : value;
|
|
const r3 = value2 === 'string' ? value3 : {captureContext: value};
|
|
value = require(7396) /* metro dependency 7396 */;
|
|
value = value.getCurrentScope();
|
|
return value.captureMessage(a0, r4, r3);
|
|
}
|
|
|
|
function captureSession_59791() { // fn#59791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:1878, offset: 0x00d67c12, size: 54 bytes, params: 1, frame: 11
|
|
if (arguments.length > 0) {
|
|
if (arguments[0] === undefined) {
|
|
_sendSessionUpdate_59786();
|
|
} else if (arguments[0]) {
|
|
endSession_59785();
|
|
} else {
|
|
_sendSessionUpdate_59786();
|
|
}
|
|
} else {
|
|
_sendSessionUpdate_59786();
|
|
}
|
|
}
|
|
|
|
function isEnabled_59794() { // fn#59794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:2161, offset: 0x016f2e30, size: 86 bytes, params: 1, frame: 12
|
|
let value = Module07396Module;
|
|
value = value.getClient();
|
|
return (value ? value.getOptions().enabled !== false : !!value) && !!value.getTransport();
|
|
}
|
|
|
|
function isInitialized_59795() { // fn#59795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:2285, offset: 0x00d67cdf, size: 43 bytes, params: 1, frame: 11
|
|
const getClient = Module07396Module.getClient;
|
|
return !!Reflect.apply(getClient, Module07396Module, []);
|
|
}
|
|
|
|
function lastEventId_59796() { // fn#59796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:2354, offset: 0x00d67d0a, size: 47 bytes, params: 1, frame: 11
|
|
let value = Module07396Module;
|
|
value = value.getIsolationScope();
|
|
return value.lastEventId();
|
|
}
|
|
|
|
function setContext_59797(a0, a1) { // fn#59797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:2441, offset: 0x00d67d39, size: 55 bytes, params: 3, frame: 14
|
|
let value = Module07396Module;
|
|
value = value.getIsolationScope();
|
|
value.setContext(a0, a1);
|
|
}
|
|
|
|
function setExtra_59798(a0, a1) { // fn#59798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:2523, offset: 0x00d67d70, size: 55 bytes, params: 3, frame: 14
|
|
let value = Module07396Module;
|
|
value = value.getIsolationScope();
|
|
value.setExtra(a0, a1);
|
|
}
|
|
|
|
function setExtras_59799(a0) { // fn#59799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:2602, offset: 0x00d67da7, size: 51 bytes, params: 2, frame: 12
|
|
let value = Module07396Module;
|
|
value = value.getIsolationScope();
|
|
value.setExtras(a0);
|
|
}
|
|
|
|
function setTag_59800(a0, a1) { // fn#59800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:2676, offset: 0x00d67dda, size: 55 bytes, params: 3, frame: 14
|
|
let value = Module07396Module;
|
|
value = value.getIsolationScope();
|
|
value.setTag(a0, a1);
|
|
}
|
|
|
|
function setTags_59801(a0) { // fn#59801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:2749, offset: 0x00d67e11, size: 51 bytes, params: 2, frame: 12
|
|
let value = Module07396Module;
|
|
value = value.getIsolationScope();
|
|
value.setTags(a0);
|
|
}
|
|
|
|
function setUser_59802(a0) { // fn#59802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:2820, offset: 0x00d67e44, size: 51 bytes, params: 2, frame: 12
|
|
let value = Module07396Module;
|
|
value = value.getIsolationScope();
|
|
value.setUser(a0);
|
|
}
|
|
|
|
function startSession_59803(a0) { // fn#59803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:2896, offset: 0x016f2e86, size: 391 bytes, params: 2, frame: 23
|
|
const client = (Module07396Module).getClient();
|
|
const isolationScope = (Module07396Module).getIsolationScope();
|
|
const currentScope = (Module07396Module).getCurrentScope();
|
|
let r0 = client && client.getOptions();
|
|
r0 = !r0 ? {} : r0;
|
|
const release = r0.release;
|
|
const environment = r0.environment;
|
|
r0 = environment !== undefined ? environment : (require(7406) /* metro dependency 7406 */).DEFAULT_ENVIRONMENT;
|
|
const GLOBAL_OBJ = (Module07370Module).GLOBAL_OBJ;
|
|
const userAgent = (GLOBAL_OBJ.navigator || ({})).userAgent;
|
|
const makeSession = moduleValue4.makeSession;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
const object = {release: release, environment: r0};
|
|
object.user = currentScope.getUser() || isolationScope.getUser();
|
|
const session = Reflect.apply(makeSession, moduleValue4, [Reflect.apply(assign, Object, [object,
|
|
userAgent && ({userAgent: userAgent}), a0])]);
|
|
const session2 = isolationScope.getSession();
|
|
if (session2 && session2.status === 'ok') {
|
|
moduleValue4.updateSession(session2, {status: 'exited'});
|
|
}
|
|
endSession_59785();
|
|
isolationScope.setSession(session);
|
|
currentScope.setSession(session);
|
|
return session;
|
|
}
|
|
|
|
function withMonitor_59804(a0, a1, a2) { // fn#59804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:3412, offset: 0x016f300d, size: 128 bytes, params: 4, frame: 15
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = captureCheckIn_59778({monitorSlug: a0, status: 'in_progress'}, a2);
|
|
const env0_3 = (Module07383Module).timestampInSeconds();
|
|
return (Module07396Module).withIsolationScope(_fun59806);
|
|
function withMonitor_59804FinishCheckIn(a0) { // fn#59805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:3532, owner: withMonitor_59804.finishCheckIn, offset: 0x016f308d, size: 88 bytes, params: 2, frame: 14
|
|
let value = environment.__proto__;
|
|
const captureCheckIn_59778Binding = captureCheckIn_59778;
|
|
const object = {};
|
|
object.monitorSlug = env0_0;
|
|
object.status = a0;
|
|
object.checkInId = env0_2;
|
|
value = require(7383) /* metro dependency 7383 */;
|
|
value = value.timestampInSeconds();
|
|
object.duration = value - env0_3;
|
|
captureCheckIn_59778Binding(object);
|
|
}
|
|
|
|
function _fun59806() { // fn#59806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:3686, offset: 0x016f30e5, size: 136 bytes, params: 1, frame: 16
|
|
var environment;
|
|
var value;
|
|
var moduleValue;
|
|
var error;
|
|
try {
|
|
value = environment;
|
|
moduleValue = require();
|
|
} catch (error) {
|
|
withMonitor_59804FinishCheckIn('error');
|
|
throw error;
|
|
}
|
|
if (moduleValue2.isThenable(moduleValue)) {
|
|
global.Promise.resolve(moduleValue).then(function() {
|
|
withMonitor_59804FinishCheckIn('ok');
|
|
}, _fun59808);
|
|
} else {
|
|
withMonitor_59804FinishCheckIn('ok');
|
|
}
|
|
return moduleValue;
|
|
function _fun59808(a0) { // fn#59808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7595:3841, offset: 0x016f3181, size: 23 bytes, params: 2, frame: 11
|
|
withMonitor_59804FinishCheckIn('error');
|
|
throw a0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun59777, 7417, [5, 7396, 7418, 7397, 7369, 7380, 7383, 7376, 7406, 7370,
|
|
7392]) /* metro module 7417, dependencies: [5, 7396, 7418, 7397, 7369, 7380, 7383, 7376, 7406, 7370, 7392] */;
|