851 lines
38 KiB
JavaScript
851 lines
38 KiB
JavaScript
/* Metro module 993; source: unknown; dependencies: [57, 5, 859, 994, 831, 830, 847, 836, 857] */
|
|
import * as Module00005Module from './module-00005.js'; /* Metro dependency 5 */
|
|
import * as Module00057Module from './module-00057.js'; /* Metro dependency 57 */
|
|
import * as GLOBAL_OBJModule from './module-00830-GLOBAL_OBJ.js'; /* Metro dependency 830 */
|
|
|
|
function _fun10425(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#10425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:6, offset: 0x00d8da69, size: 189 bytes, params: 8, frame: 19
|
|
let env0_0 = require;
|
|
const streamHandler = function(a0) {
|
|
var value;
|
|
var error;
|
|
var env0_0 = a0;
|
|
try {
|
|
value = a0.clone();
|
|
} catch (error) {
|
|
return undefined;
|
|
}
|
|
_fun10443(value, _fun10444);
|
|
};
|
|
const hasProp = function(a0, a1) {
|
|
return (a0 ? typeof a0 === 'object' : !!a0) && !!a0[a1];
|
|
};
|
|
const parseFetchArgs2 = parseFetchArgs;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
exports.addFetchEndInstrumentationHandler = addFetchEndInstrumentationHandler;
|
|
exports.addFetchInstrumentationHandler = addFetchInstrumentationHandler;
|
|
exports.parseFetchArgs = parseFetchArgs2;
|
|
function instrumentFetch(a0) { // fn#10426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:54, offset: 0x00d8db26, size: 148 bytes, params: 2, frame: 17
|
|
let env0_0 = a0;
|
|
let value = arguments.length > 1;
|
|
let r2 = value && arguments[1] !== undefined && arguments[1];
|
|
if (r2) {
|
|
value = require(994) /* metro dependency 994 */;
|
|
value = !value.supportsNativeFetch();
|
|
r2 = value;
|
|
}
|
|
if (!r2) {
|
|
value = require(831) /* metro dependency 831 */;
|
|
value.fill((require(830) /* metro dependency 830 */).GLOBAL_OBJ, 'fetch', function(a0) {
|
|
var env0_0 = a0;
|
|
return _fun10428;
|
|
});
|
|
}
|
|
function _fun10427(a0) { // fn#10427, offset: 0x00d8dbba, size: 16 bytes, params: 2, frame: 2
|
|
const env0_0 = a0;
|
|
return _fun10428;
|
|
function _fun10428() { // fn#10428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:231, offset: 0x00d8dbca, size: 344 bytes, params: 1, frame: 19
|
|
var environment;
|
|
var r1;
|
|
var value6;
|
|
var triggerHandlers;
|
|
var Object;
|
|
var assign;
|
|
var value9;
|
|
const Error = global.Error;
|
|
let error = new Error();
|
|
const error2 = error;
|
|
const length = arguments.length;
|
|
const Array = global.Array;
|
|
const array = new Array(length);
|
|
const value5 = 0;
|
|
if (value5 < length) {
|
|
r1 = value5;
|
|
reducibleLoop1: while (true) {
|
|
array[r1] = arguments[r1];
|
|
value6 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
|
if (value6 < length) {
|
|
r1 = value6;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleLoop1;
|
|
}
|
|
}
|
|
const fetchArgs = parseFetchArgs(array);
|
|
const object = {args: array};
|
|
object.fetchData = {method: fetchArgs.method, url: fetchArgs.url};
|
|
object.startTimestamp = 1000 * (require(847) /* metro dependency 847 */).timestampInSeconds();
|
|
object.virtualError = error;
|
|
object.headers = getHeadersFromFetchArgs(array);
|
|
error = environment.__proto__;
|
|
reducibleJoin4: while (true) {
|
|
if (env1_0) {
|
|
break reducibleJoin4;
|
|
}
|
|
error = require(859) /* metro dependency 859 */;
|
|
triggerHandlers = error.triggerHandlers;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
value9 = Reflect.apply(assign, Object, [{}, object]);
|
|
Reflect.apply(triggerHandlers, error, ['fetch', value9]);
|
|
break reducibleJoin4;
|
|
}
|
|
const binding = error2;
|
|
const apply = binding.apply;
|
|
const GLOBAL_OBJ = (GLOBAL_OBJModule).GLOBAL_OBJ;
|
|
error = Reflect.apply(apply, binding, [GLOBAL_OBJ, array]);
|
|
return error.then(_fun10429(), _fun10433);
|
|
function _fun10429() { // fn#10429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:595, offset: 0x00d8dd22, size: 32 bytes, params: 1, frame: 12
|
|
const env0_0 = env3_3(_fun10431);
|
|
return _fun10432;
|
|
function* _fun10431(a0) { // fn#10431, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:615, offset: 0x00d8dd4b, size: 156 bytes, params: 2, frame: 23
|
|
var binding;
|
|
var binding2;
|
|
var triggerHandlers;
|
|
var Object;
|
|
var assign;
|
|
var value3;
|
|
var binding3;
|
|
var object;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
if (require) {
|
|
require(a0);
|
|
} else {
|
|
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
binding = env5_0;
|
|
binding2 = env5_1;
|
|
value = binding(binding2[2]);
|
|
triggerHandlers = value.triggerHandlers;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
value3 = environment.__proto__.__proto__;
|
|
binding3 = env2_1;
|
|
object = {};
|
|
object.endTimestamp = 1000 * binding(binding2[6]).timestampInSeconds();
|
|
object.response = a0;
|
|
Reflect.apply(triggerHandlers, value, ['fetch', Reflect.apply(assign, Object, [{}, binding3, object])]);
|
|
}
|
|
return a0;
|
|
}
|
|
|
|
function _fun10432(a0) { // fn#10432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:766, offset: 0x00d71197, size: 29 bytes, params: 2, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun10433(a0) { // fn#10433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:814, offset: 0x00d8dde7, size: 538 bytes, params: 2, frame: 29
|
|
var r6;
|
|
var enhanceFetchErrorMessages;
|
|
var stack;
|
|
var value6;
|
|
var moduleValue4;
|
|
var addNonEnumerableProperty;
|
|
var getOptions;
|
|
var TypeError;
|
|
var message;
|
|
var URL;
|
|
var fetchData;
|
|
var url;
|
|
var prototype;
|
|
var uRL;
|
|
var value10;
|
|
var host;
|
|
var value11;
|
|
var property;
|
|
var HermesInternal;
|
|
var concat;
|
|
var error;
|
|
let value = undefined;
|
|
const moduleValue = require(dependencyMap[2]);
|
|
const triggerHandlers = moduleValue.triggerHandlers;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
let binding = env0_1;
|
|
const object = {};
|
|
object.endTimestamp = 1000 * require(dependencyMap[6]).timestampInSeconds();
|
|
object.error = a0;
|
|
Reflect.apply(triggerHandlers, moduleValue, ['fetch', Reflect.apply(assign, Object, [{}, binding, object])]);
|
|
const isError2 = require(dependencyMap[7]).isError(a0);
|
|
reducibleJoin2: while (true) {
|
|
if (isError2) {
|
|
stack = a0.stack;
|
|
value6 = value === stack;
|
|
r6 = value6;
|
|
break reducibleJoin2;
|
|
}
|
|
r6 = isError2;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r6) {
|
|
stack = env0_0.stack;
|
|
a0.stack = stack;
|
|
moduleValue4 = require(dependencyMap[4]);
|
|
addNonEnumerableProperty = moduleValue4.addNonEnumerableProperty;
|
|
Reflect.apply(addNonEnumerableProperty, moduleValue4, [a0, 'framesToPop', 1]);
|
|
break reducibleJoin4;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
const client = require(dependencyMap[8]).getClient();
|
|
reducibleJoin6: while (true) {
|
|
if (client == null) {
|
|
enhanceFetchErrorMessages = value;
|
|
break reducibleJoin6;
|
|
}
|
|
getOptions = client.getOptions;
|
|
enhanceFetchErrorMessages = Reflect.apply(getOptions, client, []).enhanceFetchErrorMessages;
|
|
break reducibleJoin6;
|
|
}
|
|
const value8 = 'always';
|
|
const r9 = enhanceFetchErrorMessages ?? value8;
|
|
reduciblePort41: while (true) {
|
|
exceptionLanding40: while (true) {
|
|
if (r9 === false) {
|
|
break reduciblePort41;
|
|
}
|
|
TypeError = global.TypeError;
|
|
if (a0 instanceof TypeError) {
|
|
message = a0.message;
|
|
if (message !== 'Failed to fetch') {
|
|
message = a0.message;
|
|
if (message !== 'Load failed') {
|
|
message = a0.message;
|
|
if (message !== 'NetworkError when attempting to fetch resource.') {
|
|
break reduciblePort41;
|
|
}
|
|
}
|
|
}
|
|
try {
|
|
URL = global.URL;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
binding = env0_1;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
fetchData = binding.fetchData;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
url = fetchData.url;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
prototype = URL.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
uRL = new URL();
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
value10 = uRL instanceof Object ? uRL : undefined;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
host = value10.host;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
value11 = value8 === r9;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
if (value11) {
|
|
try {
|
|
message = a0.message;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
HermesInternal = global.HermesInternal;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
concat = HermesInternal.concat;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
value = '' + message + ' (' + host + ')';
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
a0.message = value;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
break reduciblePort41;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
property = dependencyMap[4];
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
value = require(property);
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
addNonEnumerableProperty = value.addNonEnumerableProperty;
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
try {
|
|
Reflect.apply(addNonEnumerableProperty, value, [a0, '__sentry_fetch_url_host__', host]);
|
|
} catch (error) {
|
|
break exceptionLanding40;
|
|
}
|
|
break reduciblePort41;
|
|
}
|
|
break reduciblePort41;
|
|
}
|
|
break reduciblePort41;
|
|
}
|
|
throw a0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _resolveResponse() { // fn#10434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:1487, offset: 0x00d8e001, size: 47 bytes, params: 1, frame: 14
|
|
return Module00005Module(_fun10436).apply(this, arguments);
|
|
function* _fun10436(a0, a1) { // fn#10436, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:1542, offset: 0x00d8e039, size: 289 bytes, params: 3, frame: 26
|
|
var r13;
|
|
var r2;
|
|
var value;
|
|
var value2;
|
|
var body;
|
|
var getReader;
|
|
var value3;
|
|
var setTimeout;
|
|
var value4;
|
|
var value5;
|
|
var closure;
|
|
var value6;
|
|
var read;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var done;
|
|
var clearTimeout;
|
|
var value10;
|
|
var error;
|
|
var value11;
|
|
var releaseLock;
|
|
var cancel;
|
|
var value12;
|
|
var then;
|
|
exceptionLanding29: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
value = undefined;
|
|
var env0_0 = value;
|
|
if (a0 != null) {
|
|
body = a0.body;
|
|
reducibleJoin28: while (true) {
|
|
if (body) {
|
|
body = a0.body;
|
|
env0_0 = body;
|
|
getReader = body.getReader;
|
|
value3 = Reflect.apply(getReader, body, []);
|
|
setTimeout = global.setTimeout;
|
|
value4 = setTimeout(_fun10437, 90000);
|
|
value5 = true;
|
|
r13 = value5;
|
|
reducibleLoop4: while (true) {
|
|
reducibleJoin6: while (true) {
|
|
reduciblePort26: while (true) {
|
|
exceptionLanding24: while (true) {
|
|
try {
|
|
try {
|
|
setTimeout = global.setTimeout;
|
|
} catch (error) {
|
|
r2 = value;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value;
|
|
break exceptionLanding29;
|
|
}
|
|
break reducibleJoin6;
|
|
}
|
|
value11 = false;
|
|
r13 = value11;
|
|
break reduciblePort26;
|
|
}
|
|
clearTimeout = global.clearTimeout;
|
|
clearTimeout(r2);
|
|
if (r13) {
|
|
continue reducibleLoop4;
|
|
}
|
|
break reducibleLoop4;
|
|
}
|
|
try {
|
|
try {
|
|
closure = _fun10439;
|
|
} catch (error) {
|
|
r2 = value;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value;
|
|
break exceptionLanding29;
|
|
}
|
|
try {
|
|
try {
|
|
value6 = setTimeout(closure, 5000);
|
|
} catch (error) {
|
|
r2 = value;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value;
|
|
break exceptionLanding29;
|
|
}
|
|
try {
|
|
try {
|
|
read = value3.read;
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
try {
|
|
try {
|
|
value7 = Reflect.apply(read, value3, []);
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
yield value7;
|
|
try {
|
|
try {
|
|
value8 = undefined;
|
|
value9 = false;
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
if (value9) {
|
|
global.clearTimeout(value6);
|
|
return value8;
|
|
}
|
|
try {
|
|
try {
|
|
done = value8.done;
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
try {
|
|
try {
|
|
clearTimeout = global.clearTimeout;
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
try {
|
|
try {
|
|
clearTimeout(value6);
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
reducibleJoin22: while (true) {
|
|
if (done) {
|
|
try {
|
|
try {
|
|
a1();
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
value10 = false;
|
|
r13 = value10;
|
|
break reducibleJoin22;
|
|
}
|
|
break reducibleJoin22;
|
|
}
|
|
r2 = value6;
|
|
clearTimeout = global.clearTimeout;
|
|
clearTimeout(r2);
|
|
if (r13) {
|
|
continue reducibleLoop4;
|
|
}
|
|
break reducibleLoop4;
|
|
}
|
|
clearTimeout = global.clearTimeout;
|
|
clearTimeout(value4);
|
|
releaseLock = value3.releaseLock;
|
|
Reflect.apply(releaseLock, value3, []);
|
|
cancel = body.cancel;
|
|
value12 = Reflect.apply(cancel, body, []);
|
|
then = value12.then;
|
|
Reflect.apply(then, value12, [null, function() {
|
|
}]);
|
|
break reducibleJoin28;
|
|
}
|
|
break reducibleJoin28;
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
global.clearTimeout(r2);
|
|
throw error;
|
|
function _fun10437() { // fn#10437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:1624, offset: 0x00d8e15a, size: 41 bytes, params: 1, frame: 13
|
|
body.cancel().then(null, function() {
|
|
});
|
|
}
|
|
|
|
function _fun10439() { // fn#10439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:1719, offset: 0x00d8e183, size: 41 bytes, params: 1, frame: 13
|
|
body.cancel().then(null, function() {
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function streamHandler(a0) { // fn#10442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:1967, offset: 0x00d8e1ac, size: 57 bytes, params: 2, frame: 14
|
|
var value;
|
|
var error;
|
|
const env0_0 = a0;
|
|
try {
|
|
value = a0.clone();
|
|
} catch (error) {
|
|
return undefined;
|
|
}
|
|
(function(a0, a1) {
|
|
return _resolveResponse.apply(this, arguments);
|
|
})(value, _fun10444);
|
|
function resolveResponse(a0, a1) { // fn#10443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:2032, owner: streamHandler.resolveResponse, offset: 0x00d8e1e5, size: 29 bytes, params: 3, frame: 13
|
|
return _resolveResponse.apply(this, arguments);
|
|
}
|
|
|
|
function _fun10444() { // fn#10444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:2112, offset: 0x00d8e202, size: 96 bytes, params: 1, frame: 16
|
|
let value = environment.__proto__;
|
|
value = require(859) /* metro dependency 859 */;
|
|
const triggerHandlers = value.triggerHandlers;
|
|
const object = {};
|
|
object.endTimestamp = 1000 * (require(847) /* metro dependency 847 */).timestampInSeconds();
|
|
object.response = env0_0;
|
|
Reflect.apply(triggerHandlers, value, ['fetch-body-resolved', object]);
|
|
}
|
|
|
|
}
|
|
|
|
function getUrlFromResource(a0) { // fn#10446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:2292, offset: 0x00d8e28b, size: 81 bytes, params: 2, frame: 16
|
|
var r2;
|
|
var r1;
|
|
var r0;
|
|
var value2;
|
|
let value = a0;
|
|
if (typeof value === 'string') {
|
|
r0 = value;
|
|
} else {
|
|
value2 = '';
|
|
if (value) {
|
|
if (hasProp(value, 'url')) {
|
|
r2 = value.url;
|
|
} else if (value.toString) {
|
|
value = value.toString();
|
|
r2 = value;
|
|
} else {
|
|
r2 = value2;
|
|
}
|
|
r1 = r2;
|
|
} else {
|
|
r1 = value2;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function parseFetchArgs(a0) { // fn#10447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:2405, offset: 0x00d8e2dc, size: 312 bytes, params: 2, frame: 18
|
|
var r4;
|
|
var r1;
|
|
var property;
|
|
var object;
|
|
var value;
|
|
var value3;
|
|
var property2;
|
|
var isRequest2;
|
|
var value4;
|
|
if (a0.length === 0) {
|
|
return {'method': 'GET', 'url': ''};
|
|
}
|
|
if (a0.length === 2) {
|
|
value3 = Module00057Module(a0, 2);
|
|
property = value3[0];
|
|
property2 = value3[1];
|
|
object = {};
|
|
object.url = getUrlFromResource(property);
|
|
if (hasProp(property2, 'method')) {
|
|
value = global.String(property2.method);
|
|
value = value.toUpperCase();
|
|
r1 = value;
|
|
} else {
|
|
isRequest2 = (require(836) /* metro dependency 836 */).isRequest(property);
|
|
value4 = 'GET';
|
|
if (isRequest2) {
|
|
if (hasProp(property, 'method')) {
|
|
value = global.String(property.method);
|
|
value = value.toUpperCase();
|
|
r1 = value;
|
|
} else {
|
|
r1 = value4;
|
|
}
|
|
} else {
|
|
r1 = value4;
|
|
}
|
|
}
|
|
object.method = r1;
|
|
} else {
|
|
property = a0[0];
|
|
object = {};
|
|
object.url = getUrlFromResource(property);
|
|
value = hasProp(property, 'method');
|
|
if (value) {
|
|
value = global.String(property.method);
|
|
value = value.toUpperCase();
|
|
r4 = value;
|
|
} else {
|
|
r4 = 'GET';
|
|
}
|
|
object.method = r4;
|
|
}
|
|
return object;
|
|
}
|
|
|
|
function getHeadersFromFetchArgs(a0) { // fn#10448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:2800, offset: 0x00d8e414, size: 202 bytes, params: 2, frame: 16
|
|
var value3;
|
|
var value4;
|
|
var value5;
|
|
var headers;
|
|
var property3;
|
|
var isRequest;
|
|
var Headers;
|
|
var prototype;
|
|
var error;
|
|
let value = environment;
|
|
const value2 = Module00057Module(a0, 2);
|
|
const property = value2[0];
|
|
const property2 = value2[1];
|
|
reducibleJoin11: while (true) {
|
|
reduciblePort39: while (true) {
|
|
exceptionLanding38: while (true) {
|
|
try {
|
|
value3 = typeof property2 !== 'object';
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
if (value3) {
|
|
break reducibleJoin11;
|
|
}
|
|
try {
|
|
value4 = property2 === null;
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
if (value4) {
|
|
break reducibleJoin11;
|
|
}
|
|
try {
|
|
value5 = 'headers' in property2;
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
if (value5) {
|
|
try {
|
|
headers = property2.headers;
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
if (headers) {
|
|
try {
|
|
Headers = global.Headers;
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
headers = property2.headers;
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
prototype = Headers.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
headers = new Headers();
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
value = headers instanceof Object ? headers : value;
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
return value;
|
|
}
|
|
break reducibleJoin11;
|
|
}
|
|
break reducibleJoin11;
|
|
}
|
|
break reduciblePort39;
|
|
}
|
|
return undefined;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
property3 = dependencyMap[7];
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
value = require(property3);
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
isRequest = value.isRequest;
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
value = Reflect.apply(isRequest, value, [property]);
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
if (value) {
|
|
try {
|
|
Headers = global.Headers;
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
headers = property.headers;
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
prototype = Headers.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
headers = new Headers();
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
try {
|
|
value = headers instanceof Object ? headers : value;
|
|
} catch (error) {
|
|
break exceptionLanding38;
|
|
}
|
|
return value;
|
|
}
|
|
}
|
|
|
|
function addFetchEndInstrumentationHandler(a0) { // fn#10449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:3117, offset: 0x00d8e4de, size: 76 bytes, params: 2, frame: 17
|
|
(require(859) /* metro dependency 859 */).addHandler('fetch-body-resolved', a0);
|
|
(require(859) /* metro dependency 859 */).maybeInstrument('fetch-body-resolved', function() {
|
|
instrumentFetch(streamHandler);
|
|
});
|
|
}
|
|
|
|
function addFetchInstrumentationHandler(a0, a1) { // fn#10451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1120:3328, offset: 0x00d8e53e, size: 81 bytes, params: 3, frame: 18
|
|
const env0_0 = a1;
|
|
(require(859) /* metro dependency 859 */).addHandler('fetch', a0);
|
|
(require(859) /* metro dependency 859 */).maybeInstrument('fetch', function() {
|
|
instrumentFetch(undefined, require);
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun10425, 993, [57, 5, 859, 994, 831, 830, 847, 836,
|
|
857]) /* metro module 993, dependencies: [57, 5, 859, 994, 831, 830, 847, 836, 857] */;
|