308 lines
13 KiB
React
308 lines
13 KiB
React
/* Metro module 1042; source: unknown; dependencies: [1043, 826, 1044, 1059, 1062, 1063, 1054] */
|
|
function _fun11050(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#11050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:6, offset: 0x00d9fdb0, size: 217 bytes, params: 8, frame: 17
|
|
let env0_0 = require;
|
|
const getCleanupCallback = function(a0, a1, a2) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var env0_2 = a2;
|
|
return _fun11063;
|
|
};
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
const env0_6 = {};
|
|
const env0_7 = {};
|
|
exports.addClsInstrumentationHandler = addClsInstrumentationHandler;
|
|
exports.addInpInstrumentationHandler = addInpInstrumentationHandler;
|
|
exports.addLcpInstrumentationHandler = addLcpInstrumentationHandler;
|
|
exports.addPerformanceInstrumentationHandler = addPerformanceInstrumentationHandler;
|
|
exports.addTtfbInstrumentationHandler = addTtfbInstrumentationHandler;
|
|
exports.isPerformanceEventTiming = function(a0) {
|
|
return 'duration' in a0;
|
|
};
|
|
}
|
|
|
|
function triggerHandlers_11051(a0, a1) { // fn#11051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:115, offset: 0x00d9fe89, size: 237 bytes, params: 3, frame: 31
|
|
var r2;
|
|
var value;
|
|
var property;
|
|
var length;
|
|
var iterator;
|
|
var iterator2;
|
|
var item;
|
|
var item2;
|
|
var error;
|
|
var moduleValue;
|
|
var DEBUG_BUILD;
|
|
var moduleValue2;
|
|
var debug;
|
|
var error2;
|
|
var moduleValue3;
|
|
var getFunctionName;
|
|
var value2;
|
|
var HermesInternal;
|
|
var concat;
|
|
var value3;
|
|
exceptionLanding33: while (true) {
|
|
value = environment;
|
|
property = env0_6[a0];
|
|
reducibleJoin34: while (true) {
|
|
if (property == null) {
|
|
break reducibleJoin34;
|
|
}
|
|
length = property.length;
|
|
if (!length) {
|
|
break reducibleJoin34;
|
|
}
|
|
iterator = property[Symbol.iterator]();
|
|
iterator2 = iterator.next;
|
|
r2 = iterator;
|
|
reducibleLoop3: while (true) {
|
|
exceptionLanding8: while (true) {
|
|
item2 = Reflect.apply(iterator2, r2, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r2;
|
|
if (item2 === undefined) {
|
|
break reducibleJoin34;
|
|
}
|
|
try {
|
|
try {
|
|
item(a1);
|
|
} catch (error) {
|
|
break exceptionLanding8;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
r2 = item2;
|
|
continue reducibleLoop3;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
property = dependencyMap[0];
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
moduleValue = require(property);
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
DEBUG_BUILD = moduleValue.DEBUG_BUILD;
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
reducibleJoin3: while (true) {
|
|
if (DEBUG_BUILD) {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
property = dependencyMap[1];
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
moduleValue2 = require(property);
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
debug = moduleValue2.debug;
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
error2 = debug.error;
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
property = dependencyMap[1];
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
moduleValue3 = require(property);
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
getFunctionName = moduleValue3.getFunctionName;
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
value2 = Reflect.apply(getFunctionName, moduleValue3, [item]);
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
HermesInternal = global.HermesInternal;
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
concat = HermesInternal.concat;
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
value3 = 'Error while triggering instrumentation handler.\nType: ' + a0 + '\nName: ' + value2 + '\nError:';
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
try {
|
|
Reflect.apply(error2, debug, [value3, error]);
|
|
} catch (error) {
|
|
break exceptionLanding33;
|
|
}
|
|
r2 = item2;
|
|
break reducibleJoin3;
|
|
}
|
|
r2 = item2;
|
|
break reducibleJoin3;
|
|
}
|
|
continue reducibleLoop3;
|
|
}
|
|
}
|
|
return undefined;
|
|
}
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
|
|
function instrumentCls() { // fn#11052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:362, offset: 0x00d9ff76, size: 55 bytes, params: 1, frame: 13
|
|
return (require(1044) /* metro dependency 1044 */).onCLS(function(a0) {
|
|
triggerHandlers_11051('cls', {metric: a0});
|
|
env1_2 = a0;
|
|
}, {reportAllChanges: true});
|
|
}
|
|
|
|
function instrumentLcp() { // fn#11054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:484, offset: 0x00d9ffd0, size: 55 bytes, params: 1, frame: 13
|
|
return (require(1059) /* metro dependency 1059 */).onLCP(function(a0) {
|
|
triggerHandlers_11051('lcp', {metric: a0});
|
|
env1_3 = a0;
|
|
}, {reportAllChanges: true});
|
|
}
|
|
|
|
function instrumentTtfb() { // fn#11056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:606, offset: 0x00da002a, size: 45 bytes, params: 1, frame: 11
|
|
return (require(1062) /* metro dependency 1062 */).onTTFB(function(a0) {
|
|
triggerHandlers_11051('ttfb', {metric: a0});
|
|
env1_4 = a0;
|
|
});
|
|
}
|
|
|
|
function instrumentInp() { // fn#11058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:709, offset: 0x00da007c, size: 45 bytes, params: 1, frame: 11
|
|
return (require(1063) /* metro dependency 1063 */).onINP(function(a0) {
|
|
triggerHandlers_11051('inp', {metric: a0});
|
|
env1_5 = a0;
|
|
});
|
|
}
|
|
|
|
function addMetricObserver(a0, a1, a2, a3) { // fn#11060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:809, offset: 0x00da00ce, size: 120 bytes, params: 5, frame: 20
|
|
var r5;
|
|
var value6;
|
|
const value = undefined;
|
|
const r6 = arguments.length > 4 && value !== arguments[4] && arguments[4];
|
|
addHandler_11061(a0, a1);
|
|
if (env0_7[a0]) {
|
|
r5 = value;
|
|
} else {
|
|
value6 = a2();
|
|
env0_7[a0] = true;
|
|
r5 = value6;
|
|
}
|
|
if (a3) {
|
|
a1({metric: a3});
|
|
}
|
|
return getCleanupCallback(a0, a1, r6 ? r5 : value);
|
|
}
|
|
|
|
function addHandler_11061(a0, a1) { // fn#11061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:1006, offset: 0x00da0146, size: 50 bytes, params: 3, frame: 13
|
|
const binding = env0_6;
|
|
binding[a0] = binding[a0] || [];
|
|
env0_6[a0].push(a1);
|
|
}
|
|
|
|
function getCleanupCallback(a0, a1, a2) { // fn#11062, offset: 0x00da0178, size: 30 bytes, params: 4, frame: 2
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
return _fun11063;
|
|
}
|
|
|
|
function addClsInstrumentationHandler(a0) { // fn#11064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:1210, offset: 0x00da01e8, size: 71 bytes, params: 2, frame: 20
|
|
return addMetricObserver('cls', a0, instrumentCls, env0_2,
|
|
arguments.length > 1 && arguments[1] !== undefined && arguments[1]);
|
|
}
|
|
|
|
function addInpInstrumentationHandler(a0) { // fn#11065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:1390, offset: 0x00da022f, size: 32 bytes, params: 2, frame: 17
|
|
return addMetricObserver('inp', a0, instrumentInp, env0_5);
|
|
}
|
|
|
|
function addLcpInstrumentationHandler(a0) { // fn#11066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:1514, offset: 0x00da024f, size: 71 bytes, params: 2, frame: 20
|
|
return addMetricObserver('lcp', a0, instrumentLcp, env0_3,
|
|
arguments.length > 1 && arguments[1] !== undefined && arguments[1]);
|
|
}
|
|
|
|
function addPerformanceInstrumentationHandler(a0, a1) { // fn#11067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:1702, offset: 0x00da0296, size: 66 bytes, params: 3, frame: 15
|
|
addHandler_11061(a0, a1);
|
|
if (!env0_7[a0]) {
|
|
instrumentPerformanceObserver(a0);
|
|
env0_7[a0] = true;
|
|
}
|
|
return getCleanupCallback(a0, a1);
|
|
}
|
|
|
|
function addTtfbInstrumentationHandler(a0) { // fn#11070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:2010, offset: 0x00da0342, size: 32 bytes, params: 2, frame: 17
|
|
return addMetricObserver('ttfb', a0, instrumentTtfb, env0_4);
|
|
}
|
|
|
|
function _fun11063() { // fn#11063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:1100, offset: 0x00da0196, size: 82 bytes, params: 1, frame: 13
|
|
var value;
|
|
if (importDefault) {
|
|
importDefault();
|
|
}
|
|
const property = env1_6[env0_0];
|
|
if (property) {
|
|
value = property.indexOf(require);
|
|
if (value !== -1) {
|
|
property.splice(value, 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
function instrumentPerformanceObserver(a0) { // fn#11068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:1784, owner: addPerformanceInstrumentationHandler.instrumentPerformanceObserver, offset: 0x00da02d8, size: 72 bytes, params: 2, frame: 16
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const object2 = {};
|
|
if (a0 === 'event') {
|
|
object2.durationThreshold = 0;
|
|
}
|
|
const value = environment.__proto__;
|
|
(require(1054) /* metro dependency 1054 */).observe(a0, _fun11069, object2);
|
|
}
|
|
|
|
function _fun11069(a0) { // fn#11069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1169:1891, offset: 0x00da0320, size: 34 bytes, params: 2, frame: 13
|
|
triggerHandlers_11051(env0_0, {entries: a0});
|
|
}
|
|
|