/* Metro module 1181; source: unknown; dependencies: [826, 1009] */ function _fun13117(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1308:6, offset: 0x00de1bf7, size: 106 bytes, params: 8, frame: 17 var closure; let value = this; let env0_0 = require; const setLogAttribute_13118 = function(a0, a1, a2) { var r7; r7 = arguments.length > 3 && arguments[3] !== undefined; if (!(a2 ? a0[a1] && !(r7 ? arguments[3] : !r7) : !a2)) { a0[a1] = a2; } }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); if (!(value && value.__awaiter)) { closure = function(a0, a1, a2, a3) { var r2; var value = a2; var env0_0 = a0; var env0_1 = a1; var env0_2 = value; var env0_3 = a3; r2 = value || global.Promise; value = Object.create(r2.prototype, {constructor: {value: r2}}); var value2 = new r2(_fun13120); return value2 instanceof Object ? value2 : value; }; } exports.logEnricherIntegration = function() { return {name: 'LogEnricher', setup: _fun13127}; }; } function _fun13119(a0, a1, a2, a3) { // fn#13119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1308:124, offset: 0x00de1c61, size: 75 bytes, params: 5, frame: 12 let value = a2; const env0_0 = a0; const env0_1 = a1; const env0_3 = a3; let r2 = value || global.Promise; value = Object.create(r2.prototype, {constructor: {value: r2}}); r2 = new r2(_fun13120); return r2 instanceof Object ? r2 : value; } function logEnricherIntegration() { // fn#13126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1308:631, offset: 0x00de1d91, size: 26 bytes, params: 1, frame: 2 return {name: 'LogEnricher', setup: function(a0) { var env0_0 = a0; a0.on('afterInit', _fun13128); }}; } function _fun13120(a0, a1) { // fn#13120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1308:170, offset: 0x00de1cac, size: 98 bytes, params: 3, frame: 16 const env0_0 = a0; const env0_1 = a1; const closure = step_13123; const value2 = importAll.apply(env0_0, require || []); closure(value2.next()); } function logEnricherIntegrationSetup(a0) { // fn#13127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1308:697, owner: logEnricherIntegration.setup, offset: 0x00de1dab, size: 36 bytes, params: 2, frame: 13 const env0_0 = a0; a0.on('afterInit', function() { _fun13129().then(_fun13132, _fun13134); }); } function step_13123(a0) { // fn#13123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1308:298, offset: 0x00de1d0e, size: 77 bytes, params: 2, frame: 14 var value; if (a0.done) { env0_0(a0.value); } else { value = a0.value; value = step_13123Adopt(value); value.then(fulfilled_13121, rejected_13122); } } function _fun13128() { // fn#13128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1308:733, offset: 0x00de1dcf, size: 36 bytes, params: 1, frame: 14 cacheLogContext().then(_fun13132, function(a0) { require(dependencyMap[0]).debug.log(a0); }); } function step_13123Adopt(a0) { // fn#13124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1308:333, owner: step_13123.adopt, offset: 0x00de1d5b, size: 54 bytes, params: 2, frame: 12 const value = a0; return value instanceof env2_2 ? value : new env2_2(_fun13125); } function cacheLogContext() { // fn#13129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1308:745, offset: 0x00de1df3, size: 29 bytes, params: 1, frame: 15 return env3_2(this, undefined, undefined, _fun13131); } function _fun13132() { // fn#13132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1308:1544, offset: 0x00de2078, size: 36 bytes, params: 1, frame: 13 env1_0.on('beforeCaptureLog', _fun13133); } function* _fun13131() { // fn#13131, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1308:817, offset: 0x00de1e19, size: 607 bytes, params: 1, frame: 27 var contexts; var device; var brand; var model; var family; var r3; var os; var release; var binding; var binding2; var property; var value4; var NATIVE; var fetchNativeLogAttributes; var nativeLogAttributes; var value5; var value6; var Object; var assign; var Object2; var assign2; var Object3; var assign3; var value7; var value9; var value10; var object2; var value11; var value12; var value13; var value14; var value15; var value16; var value17; var value18; var value19; var value20; var name; var version; var value21; var value22; var value23; var value24; var Promise; var error; if (false) { return undefined; } value = undefined; try { binding = env5_0; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { binding2 = env5_1; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { property = binding2[1]; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value4 = binding(property); } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { NATIVE = value4.NATIVE; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { fetchNativeLogAttributes = NATIVE.fetchNativeLogAttributes; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { nativeLogAttributes = Reflect.apply(fetchNativeLogAttributes, NATIVE, []); } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } yield nativeLogAttributes; try { value5 = undefined; value6 = false; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value6) { return value5; } try { Object = global.Object; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { assign = Object.assign; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { Object2 = global.Object; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { assign2 = Object2.assign; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { Object3 = global.Object; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { assign3 = Object3.assign; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value7 = value5 == null; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value7) { contexts = value; } else { try { contexts = value5.contexts; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } } try { env1_0 = contexts; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value9 = contexts === null; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value9) { device = value; } else { try { binding = env1_0; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value10 = value === binding; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value10) { device = value; } else { try { binding = env1_0; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { device = binding.device; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } } } if (device) { try { object2 = {}; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { contexts = value5.contexts; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { device = contexts.device; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { env1_1 = device; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value11 = device === null; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value11) { brand = value; } else { try { binding = env1_1; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value12 = value === binding; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value12) { brand = value; } else { try { binding = env1_1; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { brand = binding.brand; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } } } try { object2.brand = brand; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { contexts = value5.contexts; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { device = contexts.device; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { env1_2 = device; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value13 = device === null; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value13) { model = value; } else { try { binding = env1_2; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value14 = value === binding; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value14) { model = value; } else { try { binding = env1_2; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { model = binding.model; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } } } try { object2.model = model; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { contexts = value5.contexts; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { device = contexts.device; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { env1_3 = device; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value15 = device === null; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value15) { family = value; } else { try { binding = env1_3; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value16 = value === binding; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value16) { family = value; } else { try { binding = env1_3; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { family = binding.family; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } } } try { object2.family = family; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } r3 = object2; } else { r3 = device; } try { object2 = {}; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value17 = Reflect.apply(assign3, Object3, [object2, r3]); } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value18 = value5 == null; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value18) { contexts = value; } else { try { contexts = value5.contexts; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } } try { env1_4 = contexts; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value19 = contexts === null; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value19) { os = value; } else { try { binding = env1_4; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value20 = value === binding; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value20) { os = value; } else { try { binding = env1_4; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { os = binding.os; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } } } if (os) { try { object2 = {}; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { contexts = value5.contexts; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { os = contexts.os; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { name = os.name; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { object2.os = name; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { contexts = value5.contexts; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { os = contexts.os; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { version = os.version; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { object2.version = version; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } r3 = object2; } else { r3 = os; } try { value21 = Reflect.apply(assign2, Object2, [value17, r3]); } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value22 = value5 == null; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value22) { contexts = value; } else { try { contexts = value5.contexts; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } } try { env1_5 = contexts; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value23 = contexts === null; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value23) { release = value; } else { try { binding = env1_5; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { value24 = value === binding; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } if (value24) { release = value; } else { try { binding = env1_5; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { release = binding.release; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } } } if (release) { try { object2 = {}; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { contexts = value5.contexts; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { release = contexts.release; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { object2.release = release; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } r3 = object2; } else { r3 = release; } try { value = Reflect.apply(assign, Object, [value21, r3]); } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } try { env5_3 = value; } catch (error) { Promise = global.Promise; return Promise.reject('[LOGS]: Failed to prepare attributes from Native Layer: ' + error); } Promise = global.Promise; return Promise.resolve(); } function _fun13133(a0) { // fn#13133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1308:1580, offset: 0x00de209c, size: 243 bytes, params: 2, frame: 19 var r1; var r4; var attributes; var setLogAttribute_13118Binding; let value = environment.__proto__.__proto__; const binding = env2_0; value = environment.__proto__.__proto__.__proto__.__proto__; const value2 = undefined; if (value2 !== env4_3) { attributes = a0.attributes; r1 = attributes === null ? {} : value2 !== attributes ? attributes : {}; setLogAttribute_13118Binding = setLogAttribute_13118; setLogAttribute_13118Binding(r1, 'device.brand', env4_3.brand); setLogAttribute_13118Binding(r1, 'device.model', env4_3.model); setLogAttribute_13118Binding(r1, 'device.family', env4_3.family); setLogAttribute_13118Binding(r1, 'os.name', env4_3.os); setLogAttribute_13118Binding(r1, 'os.version', env4_3.version); setLogAttribute_13118Binding(r1, 'sentry.release', env4_3.release); value = binding.getIntegrationByName('MobileReplay'); if (value == null) { r4 = value2; } else { value = value.getReplayId(); r4 = value; } setLogAttribute_13118Binding(r1, 'sentry.replay_id', r4); a0.attributes = r1; } return value2; }