Files
2026-07-28 01:06:53 +03:00

227 lines
17 KiB
JavaScript

/* Metro module 1173; source: unknown; dependencies: [826, 1174, 1168, 1166, 1169] */
import * as SPAN_ORIGIN_Module from './module-01166-SPAN_ORIGIN_.js'; /* Metro dependency 1166 */
function _fun13043(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1300:6, offset: 0x00ddee84, size: 77 bytes, params: 8, frame: 16
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.userInteractionIntegration = function() {
return {name: 'UserInteraction'};
};
exports.startUserInteractionSpan = startUserInteractionSpan;
function startUserInteractionSpan(a0) { // fn#13045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1300:226, offset: 0x00ddeedf, size: 1080 bytes, params: 2, frame: 32
var r2;
var currentReactNativeTracingIntegration;
var debug;
var options2;
var elementId;
var op;
var currentRoute;
var moduleValue3;
var activeSpan;
var moduleValue4;
var value7;
var moduleValue5;
var spanToJSON;
var description;
var moduleValue6;
var warn;
var object;
var startIdleSpan;
var object2;
var options;
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
const SPAN_ORIGIN_MANUAL_INTERACTION = (SPAN_ORIGIN_Module).SPAN_ORIGIN_MANUAL_INTERACTION;
var value;
const client = (require(826) /* metro dependency 826 */).getClient();
if (client) {
currentReactNativeTracingIntegration = (require(1174) /* metro dependency 1174 */).getCurrentReactNativeTracingIntegration();
if (currentReactNativeTracingIntegration) {
options2 = client.getOptions();
elementId = a0.elementId;
op = a0.op;
if (options2.enableUserInteractionTracing) {
if (elementId) {
currentRoute = currentReactNativeTracingIntegration.state.currentRoute;
moduleValue3 = require(826) /* metro dependency 826 */;
if (currentRoute) {
activeSpan = moduleValue3.getActiveSpan();
if (activeSpan) {
moduleValue4 = require(1168) /* metro dependency 1168 */;
r2 = !moduleValue4.isSentryInteractionSpan(activeSpan);
} else {
r2 = activeSpan;
}
if (activeSpan) {
if (r2) {
debug = (require(826) /* metro dependency 826 */).debug;
warn = debug.warn;
value = require(826) /* metro dependency 826 */;
Reflect.apply(warn, debug,
['[' + 'UserInteraction' + '] Did not create ' + op + ' transaction because active transaction ' + value.spanToJSON(activeSpan).description + ' exists on the scope.']);
return undefined;
}
value7 = '' + currentReactNativeTracingIntegration.state.currentRoute + '.' + elementId;
if (activeSpan) {
moduleValue5 = require(826) /* metro dependency 826 */;
spanToJSON = moduleValue5.spanToJSON;
description = Reflect.apply(spanToJSON, moduleValue5, [activeSpan]).description;
if (description !== value7) {
value = require(826) /* metro dependency 826 */;
value = value.getCurrentScope();
object = {name: value7, op: op, scope: value};
(require(1168) /* metro dependency 1168 */).clearActiveSpanFromScope(value);
value = require(1168) /* metro dependency 1168 */;
startIdleSpan = value.startIdleSpan;
object2 = {};
options = currentReactNativeTracingIntegration.options;
object2.idleTimeout = options.idleTimeoutMs;
options = currentReactNativeTracingIntegration.options;
object2.finalTimeout = options.finalTimeoutMs;
value = Reflect.apply(startIdleSpan, value, [object, object2]);
value.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SPAN_ORIGIN_MANUAL_INTERACTION);
(require(1169) /* metro dependency 1169 */).onlySampleIfChildSpans(client, value);
(require(826) /* metro dependency 826 */).debug.log('[' + 'UserInteraction' + '] User Interaction Tracing Created ' + op + ' transaction ' + value7 + '.');
return value;
}
moduleValue6 = require(826) /* metro dependency 826 */;
spanToJSON = moduleValue6.spanToJSON;
if (Reflect.apply(spanToJSON, moduleValue6, [activeSpan]).op !== op) {
value = require(826) /* metro dependency 826 */;
value = value.getCurrentScope();
object = {name: value7, op: op, scope: value};
(require(1168) /* metro dependency 1168 */).clearActiveSpanFromScope(value);
value = require(1168) /* metro dependency 1168 */;
startIdleSpan = value.startIdleSpan;
object2 = {};
options = currentReactNativeTracingIntegration.options;
object2.idleTimeout = options.idleTimeoutMs;
options = currentReactNativeTracingIntegration.options;
object2.finalTimeout = options.finalTimeoutMs;
value = Reflect.apply(startIdleSpan, value, [object, object2]);
value.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SPAN_ORIGIN_MANUAL_INTERACTION);
(require(1169) /* metro dependency 1169 */).onlySampleIfChildSpans(client, value);
(require(826) /* metro dependency 826 */).debug.log('[' + 'UserInteraction' + '] User Interaction Tracing Created ' + op + ' transaction ' + value7 + '.');
return value;
}
debug = (require(826) /* metro dependency 826 */).debug;
warn = debug.warn;
value = require(826) /* metro dependency 826 */;
spanToJSON = value.spanToJSON;
description = Reflect.apply(spanToJSON, value, [activeSpan]).description;
Reflect.apply(warn, debug,
['[' + 'UserInteraction' + '] Did not create ' + op + ' transaction because it the same transaction ' + description + ' already exists on the scope.']);
return undefined;
}
value = require(826) /* metro dependency 826 */;
value = value.getCurrentScope();
object = {name: value7, op: op, scope: value};
(require(1168) /* metro dependency 1168 */).clearActiveSpanFromScope(value);
value = require(1168) /* metro dependency 1168 */;
startIdleSpan = value.startIdleSpan;
object2 = {};
options = currentReactNativeTracingIntegration.options;
object2.idleTimeout = options.idleTimeoutMs;
options = currentReactNativeTracingIntegration.options;
object2.finalTimeout = options.finalTimeoutMs;
value = Reflect.apply(startIdleSpan, value, [object, object2]);
value.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_MANUAL_INTERACTION);
(require(1169) /* metro dependency 1169 */).onlySampleIfChildSpans(client, value);
debug = (require(826) /* metro dependency 826 */).debug;
debug.log('[' + 'UserInteraction' + '] User Interaction Tracing Created ' + op + ' transaction ' + value7 + '.');
return value;
}
value7 = '' + currentReactNativeTracingIntegration.state.currentRoute + '.' + elementId;
if (activeSpan) {
moduleValue5 = require(826) /* metro dependency 826 */;
spanToJSON = moduleValue5.spanToJSON;
description = Reflect.apply(spanToJSON, moduleValue5, [activeSpan]).description;
if (description !== value7) {
value = require(826) /* metro dependency 826 */;
value = value.getCurrentScope();
object = {name: value7, op: op, scope: value};
(require(1168) /* metro dependency 1168 */).clearActiveSpanFromScope(value);
value = require(1168) /* metro dependency 1168 */;
startIdleSpan = value.startIdleSpan;
object2 = {};
options = currentReactNativeTracingIntegration.options;
object2.idleTimeout = options.idleTimeoutMs;
options = currentReactNativeTracingIntegration.options;
object2.finalTimeout = options.finalTimeoutMs;
value = Reflect.apply(startIdleSpan, value, [object, object2]);
value.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_MANUAL_INTERACTION);
(require(1169) /* metro dependency 1169 */).onlySampleIfChildSpans(client, value);
(require(826) /* metro dependency 826 */).debug.log('[' + 'UserInteraction' + '] User Interaction Tracing Created ' + op + ' transaction ' + value7 + '.');
return value;
}
moduleValue6 = require(826) /* metro dependency 826 */;
spanToJSON = moduleValue6.spanToJSON;
if (Reflect.apply(spanToJSON, moduleValue6, [activeSpan]).op !== op) {
value = require(826) /* metro dependency 826 */;
value = value.getCurrentScope();
object = {name: value7, op: op, scope: value};
(require(1168) /* metro dependency 1168 */).clearActiveSpanFromScope(value);
value = require(1168) /* metro dependency 1168 */;
startIdleSpan = value.startIdleSpan;
object2 = {};
options = currentReactNativeTracingIntegration.options;
object2.idleTimeout = options.idleTimeoutMs;
options = currentReactNativeTracingIntegration.options;
object2.finalTimeout = options.finalTimeoutMs;
value = Reflect.apply(startIdleSpan, value, [object, object2]);
value.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_MANUAL_INTERACTION);
(require(1169) /* metro dependency 1169 */).onlySampleIfChildSpans(client, value);
(require(826) /* metro dependency 826 */).debug.log('[' + 'UserInteraction' + '] User Interaction Tracing Created ' + op + ' transaction ' + value7 + '.');
return value;
}
debug = (require(826) /* metro dependency 826 */).debug;
warn = debug.warn;
value = require(826) /* metro dependency 826 */;
spanToJSON = value.spanToJSON;
description = Reflect.apply(spanToJSON, value, [activeSpan]).description;
Reflect.apply(warn, debug,
['[' + 'UserInteraction' + '] Did not create ' + op + ' transaction because it the same transaction ' + description + ' already exists on the scope.']);
return undefined;
}
value = require(826) /* metro dependency 826 */;
value = value.getCurrentScope();
object = {name: value7, op: op, scope: value};
(require(1168) /* metro dependency 1168 */).clearActiveSpanFromScope(value);
value = require(1168) /* metro dependency 1168 */;
startIdleSpan = value.startIdleSpan;
object2 = {};
options = currentReactNativeTracingIntegration.options;
object2.idleTimeout = options.idleTimeoutMs;
options = currentReactNativeTracingIntegration.options;
object2.finalTimeout = options.finalTimeoutMs;
value = Reflect.apply(startIdleSpan, value, [object, object2]);
value.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_ORIGIN_MANUAL_INTERACTION);
(require(1169) /* metro dependency 1169 */).onlySampleIfChildSpans(client, value);
debug = (require(826) /* metro dependency 826 */).debug;
debug.log('[' + 'UserInteraction' + '] User Interaction Tracing Created ' + op + ' transaction ' + value7 + '.');
return value;
}
debug = moduleValue3.debug;
debug.log('[' + 'UserInteraction' + '] User Interaction Tracing can not create transaction without a current route.');
return undefined;
}
debug = (require(826) /* metro dependency 826 */).debug;
debug.log('[' + 'UserInteraction' + '] User Interaction Tracing can not create transaction with undefined elementId.');
return undefined;
}
debug = (require(826) /* metro dependency 826 */).debug;
debug.log('[' + 'UserInteraction' + '] User Interaction Tracing is disabled.');
return undefined;
}
debug = (require(826) /* metro dependency 826 */).debug;
debug.log('[' + 'UserInteraction' + '] Tracing integration is not available. Can not start user interaction span.');
}
}
}
global.__d(_fun13043, 1173, [826, 1174, 1168, 1166,
1169]) /* metro module 1173, dependencies: [826, 1174, 1168, 1166, 1169] */;