/* Metro module 868; source: unknown; dependencies: [65, 77, 6, 7, 838, 847, 848, 828, 869, 870, 832, 833, 857, 871, 829, 865] */ import * as ClassCallCheckModule from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */ import * as CreateClassModule from './module-00007-CreateClass.js'; /* Metro dependency 7 */ import * as Module00065Module from './module-00065.js'; /* Metro dependency 65 */ import * as Module00077Module from './module-00077.js'; /* Metro dependency 77 */ import * as Module00828Module from './module-00828.js'; /* Metro dependency 828 */ import * as DEBUG_BUILDModule from './module-00832-DEBUG_BUILD.js'; /* Metro dependency 832 */ import * as Module00833Module from './module-00833.js'; /* Metro dependency 833 */ import * as SEMANTIC_Module from './module-00848-SEMANTIC_.js'; /* Metro dependency 848 */ import * as moduleValue22 from './module-00870.js'; /* Metro dependency 870 */ function _fun9323(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:6, offset: 0x00d633f7, size: 176 bytes, params: 8, frame: 18 const env0_0 = require; const isSpanTimeInput = function(a0) { var r0; var value = a0; r0 = value && typeof value === 'number'; r0 = !r0 ? value instanceof global.Date : r0; if (!r0) { value = global.Array.isArray(value); r0 = value; } return r0; }; const isFullFinishedSpan = function(a0) { return !!(a0.start_timestamp && a0.timestamp && a0.span_id && a0.trace_id); }; const Object = global.Object; const defineProperty = Object.defineProperty; const Symbol = global.Symbol; Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]); exports.SentrySpan = _fun9327(); function isStandaloneSpan(a0) { // fn#9326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:5940, offset: 0x00d6350d, size: 29 bytes, params: 2, frame: 10 return a0 instanceof env0_6 && a0.isStandaloneSpan(); } function _fun9327() { // fn#9327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:142, offset: 0x00d6352a, size: 406 bytes, params: 1, frame: 15 return CreateClassModule(SentrySpan, [{key: 'addLink', value: function(a0) { if (this._links) { this._links.push(a0); } else { this._links = [a0]; } return this; }}, {key: 'addLinks', value: value_9330}, {key: 'recordException', value: function(a0, a1) { }}, {key: 'spanContext', value: value_9332}, {key: 'setAttribute', value: function(a0, a1) { if (a1 === undefined) { delete this._attributes[a0]; } else { this._attributes[a0] = a1; } return this; }}, {key: 'setAttributes', value: function(a0) { var env0_0 = a0; var env0_1 = this; var Object = global.Object; Object.keys(a0).forEach(_fun9335); return this; }}, {key: 'updateStartTime', value: value_9336}, {key: 'setStatus', value: function(a0) { this._status = a0; return this; }}, {key: 'updateName', value: function(a0) { this._name = a0; var SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = require(dependencyMap[6]).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'custom'); return this; }}, {key: 'end', value: value_9339}, {key: 'getSpanJSON', value: value_9340}, {key: 'isRecording', value: function() { return !this._endTime && !!this._sampled; }}, {key: 'addEvent', value: value_9342}, {key: 'isStandaloneSpan', value: function() { return !!this._isStandaloneSpan; }}, {key: '_onSpanEnded', value: value_9344}, {key: '_convertSpanToTransaction', value: value_9345}]); function SentrySpan() { // fn#9328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:176, offset: 0x00d636c0, size: 432 bytes, params: 1, frame: 23 const r1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; let value = environment.__proto__; let binding = env1_4; binding(this, SentrySpan); this._traceId = r1.traceId || (require(838) /* metro dependency 838 */).generateTraceId(); this._spanId = r1.spanId || (require(838) /* metro dependency 838 */).generateSpanId(); this._startTime = r1.startTimestamp || (require(847) /* metro dependency 847 */).timestampInSeconds(); this._links = r1.links; this._attributes = {}; const setAttributes = this.setAttributes; const Object = global.Object; const assign = Object.assign; binding = env1_3; const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (SEMANTIC_Module).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; value = binding({}, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'manual'); const SEMANTIC_ATTRIBUTE_SENTRY_OP = (SEMANTIC_Module).SEMANTIC_ATTRIBUTE_SENTRY_OP; value = binding(value, SEMANTIC_ATTRIBUTE_SENTRY_OP, r1.op); Reflect.apply(setAttributes, this, [Reflect.apply(assign, Object, [value, r1.attributes])]); this._name = r1.name; if (r1.parentSpanId) { this._parentSpanId = r1.parentSpanId; } if ('sampled' in r1) { this._sampled = r1.sampled; } if (r1.endTimestamp) { this._endTime = r1.endTimestamp; } this._events = []; this._isStandaloneSpan = r1.isStandalone; if (this._endTime) { this._onSpanEnded(); } } function value_9330(a0) { // fn#9330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:1007, offset: 0x00d638a1, size: 61 bytes, params: 2, frame: 16 var push; var apply; var value; let _links = this._links; if (_links) { _links = this._links; push = _links.push; apply = push.apply; value = environment.__proto__; Reflect.apply(apply, push, [_links, env1_2(a0)]); } else { this._links = a0; } return this; } function value_9332() { // fn#9332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:1196, offset: 0x00d638de, size: 82 bytes, params: 1, frame: 13 const object = {}; object.spanId = this._spanId; object.traceId = this._traceId; const _sampled = this._sampled; let value = environment.__proto__; value = require(828) /* metro dependency 828 */; object.traceFlags = _sampled ? value.TRACE_FLAG_SAMPLED : value.TRACE_FLAG_NONE; return object; } function value_9334(a0) { // fn#9334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:1501, offset: 0x00d63957, size: 51 bytes, params: 2, frame: 13 const env0_0 = a0; const Object = global.Object; Object.keys(a0).forEach(_fun9335); return this; function _fun9335(a0) { // fn#9335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:1569, offset: 0x00d6398a, size: 32 bytes, params: 2, frame: 13 return env0_1.setAttribute(a0, env0_0[a0]); } } function value_9336(a0) { // fn#9336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:1650, offset: 0x00d639aa, size: 50 bytes, params: 2, frame: 12 let value = environment.__proto__; value = require(828) /* metro dependency 828 */; value = value.spanTimeInputToSeconds(a0); this._startTime = value; } function value_9339(a0) { // fn#9339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:1964, offset: 0x00d63a27, size: 94 bytes, params: 2, frame: 15 var value; if (!this._endTime) { value = environment.__proto__; value = require(828) /* metro dependency 828 */; this._endTime = value.spanTimeInputToSeconds(a0); value = require(869) /* metro dependency 869 */; value.logSpanEnd(this); this._onSpanEnded(); } } function value_9340() { // fn#9340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:2117, offset: 0x00d63a85, size: 434 bytes, params: 1, frame: 19 var r3; var spanId; var moduleValue3; var rootSpan; const object = {}; let _attributes = this._attributes; object.data = _attributes; object.description = this._name; _attributes = this._attributes; let value = environment.__proto__; const value2 = undefined; const SEMANTIC_ATTRIBUTE_SENTRY_OP = (SEMANTIC_Module).SEMANTIC_ATTRIBUTE_SENTRY_OP; object.op = _attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP]; object.parent_span_id = this._parentSpanId; object.span_id = this._spanId; object.start_timestamp = this._startTime; object.status = (require(828) /* metro dependency 828 */).getStatusMessage(this._status); object.timestamp = this._endTime; object.trace_id = this._traceId; _attributes = this._attributes; const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (SEMANTIC_Module).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; object.origin = _attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]; _attributes = this._attributes; const SEMANTIC_ATTRIBUTE_PROFILE_ID = (SEMANTIC_Module).SEMANTIC_ATTRIBUTE_PROFILE_ID; object.profile_id = _attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID]; _attributes = this._attributes; const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = (SEMANTIC_Module).SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME; object.exclusive_time = _attributes[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]; object.measurements = moduleValue22.timedEventsToMeasurements(this._events); const _isStandaloneSpan = this._isStandaloneSpan; if (_isStandaloneSpan) { moduleValue3 = require(828) /* metro dependency 828 */; r3 = moduleValue3.getRootSpan(this) === this; } else { r3 = _isStandaloneSpan; } r3 = !r3 ? value2 : r3; object.is_segment = r3; if (this._isStandaloneSpan) { rootSpan = (require(828) /* metro dependency 828 */).getRootSpan(this); spanId = rootSpan.spanContext().spanId; } else { spanId = value2; } object.segment_id = spanId; value = require(828) /* metro dependency 828 */; object.links = value.convertSpanLinksForEnvelope(this._links); return object; } function value_9342(a0, a1, a2) { // fn#9342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:3031, offset: 0x00d63c54, size: 227 bytes, params: 4, frame: 19 const value = a1; const value2 = a2; if ((require(832) /* metro dependency 832 */).DEBUG_BUILD) { (require(833) /* metro dependency 833 */).debug.log('[Tracing] Adding an event to span:', a0); } const r5 = isSpanTimeInput(value) ? value : value2 || (require(847) /* metro dependency 847 */).timestampInSeconds(); const r1 = isSpanTimeInput(value) ? {} : value || ({}); const object = {name: a0}; object.time = (require(828) /* metro dependency 828 */).spanTimeInputToSeconds(r5); object.attributes = r1; this._events.push(object); return this; } function value_9344() { // fn#9344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:3441, offset: 0x00d63d48, size: 435 bytes, params: 1, frame: 18 var r3; var moduleValue2; var value3; var moduleValue3; var scope; const DEBUG_BUILD = (DEBUG_BUILDModule).DEBUG_BUILD; const debug = (Module00833Module).debug; var client; var property; let value = environment.__proto__; const client2 = (require(857) /* metro dependency 857 */).getClient(); if (client2) { client2.emit('spanEnd', this); } if (this._isStandaloneSpan) { if (this._isStandaloneSpan) { if (this._sampled) { value = require(871) /* metro dependency 871 */; value = value.createSpanEnvelope([this], client2); client = (require(857) /* metro dependency 857 */).getClient(); if (client) { property = value[1]; if (property) { if (property.length === 0) { client.recordDroppedEvent('before_send', 'span'); } else { client.sendEnvelope(value); } } else { client.recordDroppedEvent('before_send', 'span'); } } } else { if (DEBUG_BUILD) { debug.log('[Tracing] Discarding standalone span because its trace was not chosen to be sampled.'); } if (client2) { client2.recordDroppedEvent('sample_rate', 'span'); } } } else { value3 = this._convertSpanToTransaction(); if (value3) { moduleValue3 = require(829) /* metro dependency 829 */; scope = moduleValue3.getCapturedScopesOnSpan(this).scope; if (scope) { r3 = scope; } else { value = require(857) /* metro dependency 857 */; value = value.getCurrentScope(); r3 = value; } r3.captureEvent(value3); } } } else { moduleValue2 = require(828) /* metro dependency 828 */; if (this === moduleValue2.getRootSpan(this)) { if (this._isStandaloneSpan) { if (this._sampled) { value = require(871) /* metro dependency 871 */; value = value.createSpanEnvelope([this], client2); client = (require(857) /* metro dependency 857 */).getClient(); if (client) { property = value[1]; if (property) { if (property.length === 0) { client.recordDroppedEvent('before_send', 'span'); } else { client.sendEnvelope(value); } } else { client.recordDroppedEvent('before_send', 'span'); } } } else { if (DEBUG_BUILD) { debug.log('[Tracing] Discarding standalone span because its trace was not chosen to be sampled.'); } if (client2) { client2.recordDroppedEvent('sample_rate', 'span'); } } } else { value3 = this._convertSpanToTransaction(); if (value3) { moduleValue3 = require(829) /* metro dependency 829 */; scope = moduleValue3.getCapturedScopesOnSpan(this).scope; if (scope) { r3 = scope; } else { value = require(857) /* metro dependency 857 */; value = value.getCurrentScope(); r3 = value; } r3.captureEvent(value3); } } } } } function value_9345() { // fn#9345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:4190, offset: 0x00d63efb, size: 787 bytes, params: 1, frame: 27 var environment; const DEBUG_BUILD = (DEBUG_BUILDModule).DEBUG_BUILD; const debug = (Module00833Module).debug; var capturedScopesOnSpan; var scope; var value6; var value7; var _attributes; var property; var Object; var assign; var object; var object2; var object3; var value10; var moduleValue6; var value11; const value = environment.__proto__; const isFullFinishedSpanBinding = isFullFinishedSpan; const value2 = undefined; const moduleValue = require(828) /* metro dependency 828 */; if (isFullFinishedSpanBinding(moduleValue.spanToJSON(this))) { if (!this._name) { if (DEBUG_BUILD) { debug.warn('Transaction has no name, falling back to ``.'); } this._name = ''; } capturedScopesOnSpan = (require(829) /* metro dependency 829 */).getCapturedScopesOnSpan(this); scope = capturedScopesOnSpan.scope; if (this._sampled === true) { value6 = moduleValue.getSpanDescendants(this).filter(_fun9346).map(_fun9347); value7 = value6.filter(isFullFinishedSpan); _attributes = this._attributes; property = _attributes[(require(848) /* metro dependency 848 */).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; _attributes = this._attributes; delete _attributes[(require(848) /* metro dependency 848 */).SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]; value7.forEach(function({data}) { delete data[require(dependencyMap[6]).SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]; }); Object = global.Object; assign = Object.assign; object = {}; object2 = {}; object2.trace = (require(828) /* metro dependency 828 */).spanToTransactionTraceContext(this); object.contexts = object2; object.spans = value7.length > 1000 ? value7.sort(_fun9349).slice(0, 1000) : value7; object.start_timestamp = this._startTime; object.timestamp = this._endTime; object.transaction = this._name; object.type = 'transaction'; object3 = {capturedSpanScope: scope, capturedSpanIsolationScope: capturedScopesOnSpan.isolationScope}; object3.dynamicSamplingContext = (require(865) /* metro dependency 865 */).getDynamicSamplingContextFromSpan(this); object.sdkProcessingMetadata = object3; object.request = scope == null || scope.getScopeData().sdkProcessingMetadata == null ? value2 : scope.getScopeData().sdkProcessingMetadata.normalizedRequest; value10 = Reflect.apply(assign, Object, [object, property && ({transaction_info: {source: property}})]); moduleValue6 = require(870) /* metro dependency 870 */; value11 = moduleValue6.timedEventsToMeasurements(this._events); if (value11 && global.Object.keys(value11).length) { if (DEBUG_BUILD) { debug.log('[Measurements] Adding measurements to transaction event', global.JSON.stringify(value11, value2, 2)); } value10.measurements = value11; } return value10; } } return value2; function _fun9346(a0) { // fn#9346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:4684, offset: 0x00d6420e, size: 36 bytes, params: 2, frame: 12 var r0; let value = a0 !== env0_0; if (value) { value = environment.__proto__.__proto__; value = !isStandaloneSpan(a0); r0 = value; } else { r0 = value; } return r0; } function _fun9347(a0) { // fn#9347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:4739, offset: 0x00d64232, size: 41 bytes, params: 2, frame: 11 const value = environment.__proto__.__proto__; return (Module00828Module).spanToJSON(a0); } } } } function _fun9349({start_timestamp}, {start_timestamp}) { // fn#9349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:5148, offset: 0x00d64288, size: 24 bytes, params: 3, frame: 2 return start_timestamp - start_timestamp; } global.__d(_fun9323, 868, [65, 77, 6, 7, 838, 847, 848, 828, 869, 870, 832, 833, 857, 871, 829, 865]) /* metro module 868, dependencies: [65, 77, 6, 7, 838, 847, 848, 828, 869, 870, 832, 833, 857, 871, 829, 865] */;