2026-08-24 06:08:38 +00:00
// Module ID: 7831
// Function ID: 7832
2026-07-29 08:29:29 +00:00
// Name: isErrorEvent
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 41, 42, 7823, 7804, 7776, 7830, 7787, 7783, 7799, 7800, 7832, 7819, 7820, 7803, 7825, 7812, 7833, 7816, 7834, 7781]
2026-07-29 08:29:29 +00:00
2026-08-24 06:08:38 +00:00
// Module 7831 (isErrorEvent)
import closure _2 from "_slicedToArray" /* 32 */ ;
import closure _3 from "_classCallCheck" /* 41 */ ;
import _createClass from "_createClass" /* 42 */ ;
2026-07-29 08:29:29 +00:00
let BaseClient = require ;
function isErrorEvent ( type ) {
return undefined === type . type ;
}
function isTransactionEvent ( type ) {
return "transaction" === type . type ;
}
let c4 = "Not capturing exception because it's already been captured." ;
class BaseClient {
constructor ( arg0 ) {
self = this ;
closure _0 = global ;
2026-08-24 06:08:38 +00:00
tmp = closure _3 ( this , closure _0 ) ;
2026-07-29 08:29:29 +00:00
this . _options = global ;
this . _integrations = { } ;
this . _numProcessing = 0 ;
this . _outcomes = { } ;
this . _hooks = { } ;
this . _eventProcessors = [ ] ;
tmp2 = BaseClient ;
tmp3 = closure _1 ;
if ( global . dsn ) {
tmp2Result = require ( "dsnFromString" ) ;
self . _dsn = tmp2Result . makeDsn ( global . dsn ) ;
tmp4 = tmp3 ;
tmp5 = tmp2 ;
} else {
tmp4 = tmp3 ;
tmp5 = tmp2 ;
if ( require ( "__SENTRY_DEBUG__" ) . DEBUG _BUILD ) {
logger = require ( "consoleSandbox" ) . logger ;
str = "No DSN provided, client will not send events." ;
warnResult = logger . warn ( "No DSN provided, client will not send events." ) ;
tmp4 = tmp3 ;
tmp5 = tmp2 ;
}
}
if ( self . _dsn ) {
tmp5Result = require ( "getEnvelopeEndpointWithUrlEncodedAuth" ) ;
sdk = undefined ;
if ( global . _metadata ) {
sdk = global . _metadata . sdk ;
}
obj = { tunnel : null , recordDroppedEvent : null } ;
obj [ 0 ] = self . _options . tunnel ;
recordDroppedEvent = self . recordDroppedEvent ;
envelopeEndpointWithUrlEncodedAuth = tmp5Result . getEnvelopeEndpointWithUrlEncodedAuth ( self . _dsn , global . tunnel , sdk ) ;
obj [ 1 ] = recordDroppedEvent . bind ( self ) ;
tmp9 = obj ;
merged = Object . assign ( global . transportOptions ) ;
obj . url = envelopeEndpointWithUrlEncodedAuth ;
self . _transport = global . transport ( obj ) ;
}
items = [ "enableTracing" , "tracesSampleRate" , "tracesSampler" ] ;
found = items . find ( ( arg0 ) => {
let tmp = arg0 in table ;
if ( tmp ) {
tmp = null == table [ arg0 ] ;
}
return tmp ;
} ) ;
2026-08-24 06:08:38 +00:00
closure _1 = found ;
2026-07-29 08:29:29 +00:00
if ( found ) {
tmp5Result1 = require ( "consoleSandbox" ) ;
consoleSandboxResult = tmp5Result1 . consoleSandbox ( ( ) => {
console . warn ( "[Sentry] Deprecation warning: `" + found + "` is set to undefined, which leads to tracing being enabled. In v9, a value of `undefined` will result in tracing being disabled." ) ;
} ) ;
}
return ;
}
}
let items = [
{
key : "captureException" ,
value : function captureException ( arg0 , arg1 , arg2 ) {
let self = this ;
self = this ;
2026-08-24 06:08:38 +00:00
dependencyMap = arg2 ;
obj = obj ( 7787 ) ;
2026-07-29 08:29:29 +00:00
const uuid4Result = obj . uuid4 ( ) ;
if ( obj2 . checkOrSetAlreadyCaught ( arg0 ) ) {
2026-08-24 06:08:38 +00:00
if ( tmp ( 7804 ) . DEBUG _BUILD ) {
const logger = tmp ( 7776 ) . logger ;
2026-07-29 08:29:29 +00:00
logger . log ( c4 ) ;
}
return uuid4Result ;
} else {
obj = { event _id : null } ;
obj [ 0 ] = uuid4Result ;
const merged = Object . assign ( arg1 ) ;
self . _process ( self . eventFromException ( arg0 , obj ) . then ( ( arg0 ) => self . _captureEvent ( arg0 , obj , closure _1 ) ) ) ;
return obj . event _id ;
}
2026-08-24 06:08:38 +00:00
obj2 = obj ( 7787 ) ;
2026-07-29 08:29:29 +00:00
}
} ,
{
key : "captureMessage" ,
value : function captureMessage ( arg0 , arg1 , arg2 , arg3 ) {
let self = this ;
self = this ;
2026-08-24 06:08:38 +00:00
dependencyMap = arg3 ;
obj = { event _id : obj ( 7787 ) . uuid4 ( ) } ;
2026-07-29 08:29:29 +00:00
const merged = Object . assign ( arg2 ) ;
2026-08-24 06:08:38 +00:00
const obj2 = obj ( 7787 ) ;
2026-07-29 08:29:29 +00:00
const tmp = obj ;
let StringResult = arg0 ;
if ( ! obj3 . isParameterizedString ( arg0 ) ) {
const _String = String ;
StringResult = String ( arg0 ) ;
}
2026-08-24 06:08:38 +00:00
obj3 = obj ( 7783 ) ;
2026-07-29 08:29:29 +00:00
if ( tmpResult . isPrimitive ( arg0 ) ) {
let eventFromMessageResult = self . eventFromMessage ( StringResult , arg1 , obj ) ;
} else {
eventFromMessageResult = self . eventFromException ( arg0 , obj ) ;
}
self . _process ( eventFromMessageResult . then ( ( arg0 ) => self . _captureEvent ( arg0 , obj , closure _1 ) ) ) ;
return obj . event _id ;
}
} ,
{
key : "captureEvent" ,
value : function captureEvent ( sdkProcessingMetadata , originalException ) {
2026-08-24 06:08:38 +00:00
let obj = BaseClient ( 7787 ) ;
2026-07-29 08:29:29 +00:00
const uuid4Result = obj . uuid4 ( ) ;
if ( originalException ) {
if ( originalException . originalException ) {
if ( tmpResult . checkOrSetAlreadyCaught ( originalException . originalException ) ) {
2026-08-24 06:08:38 +00:00
if ( tmp ( 7804 ) . DEBUG _BUILD ) {
const logger = tmp ( 7776 ) . logger ;
2026-07-29 08:29:29 +00:00
logger . log ( c4 ) ;
}
return uuid4Result ;
}
2026-08-24 06:08:38 +00:00
tmpResult = tmp ( 7787 ) ;
2026-07-29 08:29:29 +00:00
}
}
obj = { event _id : uuid4Result } ;
const merged = Object . assign ( originalException ) ;
const self = this ;
let capturedSpanScope = sdkProcessingMetadata . sdkProcessingMetadata || { } . capturedSpanScope ;
( { _process , _captureEvent } = this ) ;
if ( ! capturedSpanScope ) {
capturedSpanScope = arg2 ;
}
_process ( _captureEvent ( sdkProcessingMetadata , obj , capturedSpanScope ) ) ;
return obj . event _id ;
}
} ,
{
key : "captureSession" ,
value : function captureSession ( release ) {
2026-08-04 21:03:28 +00:00
if ( typeof release . release !== "string" ) {
2026-08-24 06:08:38 +00:00
if ( BaseClient ( 7804 ) . DEBUG _BUILD ) {
const logger = tmp ( 7776 ) . logger ;
2026-07-29 08:29:29 +00:00
logger . warn ( "Discarded session because of missing or non-string release" ) ;
}
tmp = BaseClient ;
} else {
const self = this ;
this . sendSession ( release ) ;
2026-08-24 06:08:38 +00:00
BaseClient ( 7799 ) . updateSession ( release , { init : false } ) ;
const obj = BaseClient ( 7799 ) ;
2026-07-29 08:29:29 +00:00
}
}
} ,
{
key : "getDsn" ,
value : function getDsn ( ) {
return this . _dsn ;
}
} ,
{
key : "getOptions" ,
value : function getOptions ( ) {
return this . _options ;
}
} ,
{
key : "getSdkMetadata" ,
value : function getSdkMetadata ( ) {
return this . _options . _metadata ;
}
} ,
{
key : "getTransport" ,
value : function getTransport ( ) {
return this . _transport ;
}
} ,
{
key : "flush" ,
value : function flush ( arg0 ) {
const self = this ;
2026-08-24 06:08:38 +00:00
BaseClient = arg0 ;
2026-07-29 08:29:29 +00:00
const _transport = this . _transport ;
if ( _transport ) {
self . emit ( "flush" ) ;
const result = self . _isClientDoneProcessing ( arg0 ) ;
let nextPromise = result . then ( ( arg0 ) => {
2026-08-24 06:08:38 +00:00
closure _0 = arg0 ;
2026-07-29 08:29:29 +00:00
return _transport . flush ( closure _0 ) . then ( ( arg0 ) => {
let tmp = closure _0 ;
if ( closure _0 ) {
tmp = arg0 ;
}
return tmp ;
} ) ;
} ) ;
} else {
nextPromise = BaseClient ( _transport [ 10 ] ) . resolvedSyncPromise ( true ) ;
const obj = BaseClient ( _transport [ 10 ] ) ;
}
return nextPromise ;
}
} ,
{
key : "close" ,
value : function close ( arg0 ) {
const self = this ;
return this . flush ( arg0 ) . then ( ( arg0 ) => {
self . getOptions ( ) . enabled = false ;
self . emit ( "close" ) ;
return arg0 ;
} ) ;
}
} ,
{
key : "getEventProcessors" ,
value : function getEventProcessors ( ) {
return this . _eventProcessors ;
}
} ,
{
key : "addEventProcessor" ,
value : function addEventProcessor ( arg0 ) {
const _eventProcessors = this . _eventProcessors ;
_eventProcessors . push ( arg0 ) ;
}
} ,
{
key : "init" ,
value : function init ( ) {
const self = this ;
let _isEnabledResult = this . _isEnabled ( ) ;
if ( ! _isEnabledResult ) {
const integrations = self . _options . integrations ;
_isEnabledResult = integrations . some ( ( name ) => {
name = name . name ;
return name . startsWith ( "Spotlight" ) ;
} ) ;
}
if ( _isEnabledResult ) {
self . _setupIntegrations ( ) ;
}
}
} ,
{
key : "getIntegrationByName" ,
value : function getIntegrationByName ( arg0 ) {
return this . _integrations [ arg0 ] ;
}
} ,
{
key : "addIntegration" ,
value : function addIntegration ( arg0 ) {
2026-08-24 06:08:38 +00:00
BaseClient ( 7832 ) . setupIntegration ( this , arg0 , this . _integrations ) ;
2026-07-29 08:29:29 +00:00
if ( ! this . _integrations [ arg0 . name ] ) {
const items = [ arg0 ] ;
2026-08-24 06:08:38 +00:00
const result = BaseClient ( 7832 ) . afterSetupIntegrations ( this , items ) ;
const tmpResult = BaseClient ( 7832 ) ;
2026-07-29 08:29:29 +00:00
}
}
} ,
{
key : "sendEvent" ,
value : function sendEvent ( arg0 ) {
let self = this ;
self = this ;
2026-08-24 06:08:38 +00:00
BaseClient = arg0 ;
2026-07-29 08:29:29 +00:00
let obj = arg1 ;
if ( arg1 === undefined ) {
obj = { } ;
}
self . emit ( "beforeSendEvent" , arg0 , obj ) ;
let eventEnvelope = BaseClient ( self [ 12 ] ) . createEventEnvelope ( arg0 , self . _dsn , self . _options . _metadata , self . _options . tunnel ) ;
for ( const item10025 of tmp3 ) {
let tmp4 = BaseClient ;
let tmp5 = self ;
let obj3 = BaseClient ( self [ 13 ] ) ;
let tmp6 = eventEnvelope ;
let obj4 = BaseClient ( self [ 13 ] ) ;
eventEnvelope = obj3 . addItemToEnvelope ( eventEnvelope , obj4 . createAttachmentEnvelopeItem ( item10025 ) ) ;
continue ;
}
const sendEnvelopeResult = self . sendEnvelope ( eventEnvelope ) ;
if ( sendEnvelopeResult ) {
sendEnvelopeResult . then ( ( arg0 ) => self . emit ( "afterSendEvent" , closure _0 , arg0 ) , null ) ;
}
}
} ,
{
key : "sendSession" ,
value : function sendSession ( arg0 ) {
2026-08-24 06:08:38 +00:00
this . sendEnvelope ( BaseClient ( 7819 ) . createSessionEnvelope ( arg0 , this . _dsn , this . _options . _metadata , this . _options . tunnel ) ) ;
2026-07-29 08:29:29 +00:00
}
} ,
{
key : "recordDroppedEvent" ,
2026-08-04 21:03:28 +00:00
value : function recordDroppedEvent ( arg0 , arg1 , num ) {
2026-07-29 08:29:29 +00:00
const self = this ;
if ( this . _options . sendClientReports ) {
let num2 = 1 ;
2026-08-04 21:03:28 +00:00
if ( typeof num === "number" ) {
num2 = num ;
2026-07-29 08:29:29 +00:00
}
const _HermesInternal = HermesInternal ;
const combined = "" + arg0 + ":" + arg1 ;
2026-08-24 06:08:38 +00:00
if ( BaseClient ( 7804 ) . DEBUG _BUILD ) {
const logger = tmp6 ( 7776 ) . logger ;
2026-07-29 08:29:29 +00:00
let str3 = "" ;
if ( num2 > 1 ) {
const _HermesInternal2 = HermesInternal ;
str3 = " (" + num2 + " times)" ;
}
const _HermesInternal3 = HermesInternal ;
logger . log ( "Recording outcome: \"" + combined + "\"" + str3 ) ;
}
let num3 = self . _outcomes [ combined ] ;
if ( ! num3 ) {
num3 = 0 ;
}
self . _outcomes [ combined ] = num3 + num2 ;
tmp6 = BaseClient ;
}
}
} ,
{
key : "on" ,
value : function on ( arg0 , arg1 ) {
2026-08-24 06:08:38 +00:00
closure _0 = arg1 ;
2026-07-29 08:29:29 +00:00
let items = this . _hooks [ arg0 ] ;
if ( ! items ) {
items = [ ] ;
}
this . _hooks [ arg0 ] = items ;
items . push ( arg1 ) ;
return ( ) => {
const index = items . indexOf ( closure _0 ) ;
if ( index > - 1 ) {
items . splice ( index , 1 ) ;
}
} ;
}
} ,
{
key : "emit" ,
value : function emit ( arg0 ) {
2026-08-24 06:08:38 +00:00
closure _0 = [ ... arguments ] . slice ( ) ;
2026-07-29 08:29:29 +00:00
if ( this . _hooks [ arg0 ] ) {
const item = arr . forEach ( ( arg0 ) => arg0 ( ... closure _0 ) ) ;
}
}
} ,
{
key : "sendEnvelope" ,
value : function sendEnvelope ( arg0 ) {
const self = this ;
this . emit ( "beforeEnvelope" , arg0 ) ;
if ( this . _isEnabled ( ) ) {
if ( self . _transport ) {
const _transport = self . _transport ;
let nextPromise = _transport . send ( arg0 ) . then ( null , ( arg0 ) => {
if ( callback ( table [ 4 ] ) . DEBUG _BUILD ) {
const logger = callback ( table [ 5 ] ) . logger ;
logger . error ( "Error while sending envelope:" , arg0 ) ;
}
return arg0 ;
} ) ;
const sendResult = _transport . send ( arg0 ) ;
}
return nextPromise ;
}
2026-08-24 06:08:38 +00:00
if ( BaseClient ( 7804 ) . DEBUG _BUILD ) {
let logger = tmp2 ( 7776 ) . logger ;
2026-07-29 08:29:29 +00:00
logger . error ( "Transport disabled" ) ;
}
2026-08-24 06:08:38 +00:00
nextPromise = BaseClient ( 7800 ) . resolvedSyncPromise ( { } ) ;
2026-07-29 08:29:29 +00:00
}
} ,
{
key : "_setupIntegrations" ,
value : function _setupIntegrations ( ) {
const integrations = this . _options . integrations ;
2026-08-24 06:08:38 +00:00
this . _integrations = BaseClient ( 7832 ) . setupIntegrations ( this , integrations ) ;
const obj = BaseClient ( 7832 ) ;
const result = BaseClient ( 7832 ) . afterSetupIntegrations ( this , integrations ) ;
2026-07-29 08:29:29 +00:00
}
} ,
{
key : "_updateSessionFromEvent" ,
value : function _updateSessionFromEvent ( status , level ) {
let flag = "fatal" === level . level ;
let flag2 = false ;
if ( level . exception && level . exception . values ) {
const iter = tmp [ Symbol . iterator ] ( ) ;
flag2 = true ;
while ( iter !== undefined ) {
let mechanism = iter . next ( ) . mechanism ;
if ( mechanism ) {
let tmp6 = mechanism ;
if ( false === tmp5 . handled ) {
flag = true ;
let tmp7 = iter ;
iter . return ( ) ;
flag2 = true ;
break ;
}
break ;
}
continue ;
}
}
let tmp8 = "ok" === status . status ;
let tmp9 = tmp8 ;
if ( tmp8 ) {
tmp9 = 0 === status . errors ;
}
if ( ! tmp9 ) {
if ( tmp8 ) {
tmp8 = flag ;
}
tmp9 = tmp8 ;
}
if ( tmp9 ) {
2026-08-24 06:08:38 +00:00
let obj = BaseClient ( 7799 ) ;
2026-07-29 08:29:29 +00:00
obj = flag ;
if ( flag ) {
obj = { status : "crashed" } ;
}
obj = { } ;
const merged = Object . assign ( obj ) ;
let errors = status . errors ;
if ( ! errors ) {
if ( ! flag2 ) {
flag2 = flag ;
}
errors = Number ( flag2 ) ;
}
const self = this ;
obj . errors = errors ;
obj . updateSession ( status , obj ) ;
this . captureSession ( status ) ;
}
}
} ,
{
key : "_isClientDoneProcessing" ,
value : function _isClientDoneProcessing ( arg0 ) {
const self = this ;
2026-08-24 06:08:38 +00:00
BaseClient = arg0 ;
2026-07-29 08:29:29 +00:00
return new BaseClient ( self [ 10 ] ) . SyncPromise ( ( arg0 ) => {
2026-08-24 06:08:38 +00:00
closure _0 = arg0 ;
c1 = 0 ;
2026-07-29 08:29:29 +00:00
const interval = setInterval ( ( ) => {
if ( 0 == _numProcessing . _numProcessing ) {
const _clearInterval2 = clearInterval ;
clearInterval ( closure _2 ) ;
callback ( true ) ;
} else {
const sum = _numProcessing + 1 ;
_numProcessing = sum ;
let tmp3 = callback ;
if ( callback ) {
tmp3 = sum >= callback ;
}
if ( tmp3 ) {
const _clearInterval = clearInterval ;
clearInterval ( closure _2 ) ;
callback ( false ) ;
}
}
} , 1 ) ;
} ) ;
}
} ,
{
key : "_isEnabled" ,
value : function _isEnabled ( ) {
let tmp = false !== this . getOptions ( ) . enabled ;
if ( tmp ) {
tmp = undefined !== this . _transport ;
}
return tmp ;
}
} ,
{
key : "_prepareEvent" ,
value : function _prepareEvent ( type , integrations ) {
let self = this ;
self = this ;
let currentScope = arg2 ;
if ( arg2 === undefined ) {
currentScope = currentScope ( self [ 14 ] ) . getCurrentScope ( ) ;
let obj = currentScope ( self [ 14 ] ) ;
}
let isolationScope = arg3 ;
if ( arg3 === undefined ) {
isolationScope = currentScope ( self [ 14 ] ) . getIsolationScope ( ) ;
const obj3 = currentScope ( self [ 14 ] ) ;
}
const options = self . getOptions ( ) ;
const keys = Object . keys ( self . _integrations ) ;
integrations = integrations . integrations ;
let tmp7 = ! integrations ;
if ( ! integrations ) {
tmp7 = keys . length > 0 ;
}
if ( tmp7 ) {
integrations . integrations = keys ;
}
self . emit ( "preprocessEvent" , type , integrations ) ;
if ( ! type . type ) {
let event _id = type . event _id ;
if ( ! event _id ) {
event _id = integrations . event _id ;
}
isolationScope . setLastEventId ( event _id ) ;
}
const obj4 = currentScope ( self [ 15 ] ) ;
return currentScope ( self [ 15 ] ) . prepareEvent ( options , type , integrations , currentScope , self , isolationScope ) . then ( ( contexts ) => {
if ( null === contexts ) {
return contexts ;
} else {
let obj = { trace : null } ;
obj [ 0 ] = currentScope ( self [ 14 ] ) . getTraceContextFromScope ( currentScope ) ;
const merged = Object . assign ( contexts . contexts ) ;
contexts . contexts = obj ;
const obj2 = currentScope ( self [ 14 ] ) ;
obj = { dynamicSamplingContext : null } ;
obj [ 0 ] = currentScope ( self [ 16 ] ) . getDynamicSamplingContextFromScope ( self , currentScope ) ;
const merged1 = Object . assign ( contexts . sdkProcessingMetadata ) ;
contexts . sdkProcessingMetadata = obj ;
return contexts ;
}
} ) ;
}
} ,
{
key : "_captureEvent" ,
value : function _captureEvent ( arg0 ) {
let obj = arg1 ;
if ( arg1 === undefined ) {
obj = { } ;
}
return this . _processEvent ( arg0 , obj , arg2 ) . then ( ( event _id ) => event _id . event _id , ( logLevel ) => {
if ( callback ( table [ 4 ] ) . DEBUG _BUILD ) {
if ( logLevel instanceof tmp ( tmp2 [ 17 ] ) . SentryError ) {
if ( "log" === logLevel . logLevel ) {
const logger2 = tmp ( tmp2 [ 5 ] ) . logger ;
logger2 . log ( logLevel . message ) ;
}
}
const logger = tmp ( tmp2 [ 5 ] ) . logger ;
logger . warn ( logLevel ) ;
}
} ) ;
}
} ,
{
key : "_processEvent" ,
value : function _processEvent ( type ) {
let self = this ;
self = this ;
2026-08-24 06:08:38 +00:00
dependencyMap = type ;
closure _2 = arg1 ;
closure _3 = arg2 ;
2026-07-29 08:29:29 +00:00
const options = this . getOptions ( ) ;
const sampleRate = options . sampleRate ;
2026-08-24 06:08:38 +00:00
closure _5 = "transaction" === type . type ;
2026-07-29 08:29:29 +00:00
( { type : type2 , type } = type ) ;
if ( ! type2 ) {
type2 = "error" ;
}
2026-08-24 06:08:38 +00:00
closure _6 = "before send for type `" + type2 + "`" ;
2026-07-29 08:29:29 +00:00
if ( undefined !== sampleRate ) {
2026-08-24 06:08:38 +00:00
const parseSampleRateResult = str ( 7816 ) . parseSampleRate ( sampleRate ) ;
let obj = str ( 7816 ) ;
2026-07-29 08:29:29 +00:00
}
if ( undefined === type ) {
2026-08-04 21:03:28 +00:00
if ( typeof parseSampleRateResult === "number" ) {
2026-07-29 08:29:29 +00:00
const _Math = Math ;
if ( Math . random ( ) > parseSampleRateResult ) {
self . recordDroppedEvent ( "sample_rate" , "error" , type ) ;
let _HermesInternal = HermesInternal ;
2026-08-24 06:08:38 +00:00
let sentryError = new str ( 7833 ) . SentryError ( "Discarding event because it's not included in the random sample (sampling rate = " + sampleRate + ")" , "log" ) ;
return str ( 7800 ) . rejectedSyncPromise ( sentryError ) ;
2026-07-29 08:29:29 +00:00
}
}
}
str = "replay" ;
if ( "replay_event" !== type2 ) {
str = type2 ;
}
const _prepareEventResult = self . _prepareEvent ( type , arg1 , arg2 , type . sdkProcessingMetadata || { } . capturedSpanIsolationScope ) ;
const tmp5 = type . sdkProcessingMetadata || { } ;
let nextPromise = self . _prepareEvent ( type , arg1 , arg2 , type . sdkProcessingMetadata || { } . capturedSpanIsolationScope ) . then ( ( spans ) => {
if ( null === spans ) {
self . recordDroppedEvent ( "event_processor" , closure _0 , combined ) ;
let sentryError = new str ( type [ 17 ] ) . SentryError ( "An event processor returned `null`, will not send event." , "log" ) ;
throw sentryError ;
} else {
if ( data . data ) {
if ( true === tmp30 . data . _ _sentry _ _ ) {
return spans ;
}
}
const promise = ( function processBeforeSend ( self , options , spans , arg3 ) {
( { beforeSend , beforeSendTransaction , beforeSendSpan } = options ) ;
if ( callback2 ( spans ) ) {
if ( beforeSend ) {
return beforeSend ( spans , arg3 ) ;
}
}
if ( callback3 ( spans ) ) {
if ( spans . spans ) {
if ( beforeSendSpan ) {
const items = [ ] ;
spans = spans . spans ;
const iter = spans [ Symbol . iterator ] ( ) ;
while ( iter !== undefined ) {
let beforeSendSpanResult = beforeSendSpan ( iter . next ( ) ) ;
if ( beforeSendSpanResult ) {
let tmp10 = beforeSendSpanResult ;
let arr = items . push ( tmp5 ) ;
} else {
let tmp6 = callback ;
let tmp7 = combined ;
let obj = callback ( combined [ 20 ] ) ;
let showSpanDropWarningResult = obj . showSpanDropWarning ( ) ;
let recordDroppedEventResult = self . recordDroppedEvent ( "before_send" , "span" ) ;
}
continue ;
}
spans . spans = items ;
}
}
if ( beforeSendTransaction ) {
if ( spans . spans ) {
obj = { } ;
const merged = Object . assign ( spans . sdkProcessingMetadata ) ;
obj . spanCountBeforeProcessing = spans . spans . length ;
spans . sdkProcessingMetadata = obj ;
}
return beforeSendTransaction ( spans , arg3 ) ;
}
}
return spans ;
} ) ( self , options , spans , data ) ;
closure _0 = closure _6 ;
combined = undefined ;
const _HermesInternal = HermesInternal ;
combined = "" + closure _6 + " must return `null` or a valid event." ;
if ( obj . isThenable ( promise ) ) {
let nextPromise = promise . then ( ( arg0 ) => {
if ( ! obj . isPlainObject ( arg0 ) ) {
if ( null !== arg0 ) {
const sentryError = new callback ( combined [ 17 ] ) . SentryError ( combined ) ;
throw sentryError ;
}
}
return arg0 ;
} , ( arg0 ) => {
const sentryError = new callback ( combined [ 17 ] ) . SentryError ( "" + callback + " rejected with " + arg0 ) ;
throw sentryError ;
} ) ;
} else {
nextPromise = promise ;
if ( ! obj2 . isPlainObject ( promise ) ) {
nextPromise = promise ;
if ( null !== promise ) {
const sentryError1 = new str ( type [ 17 ] ) . SentryError ( combined ) ;
throw sentryError1 ;
}
}
obj2 = str ( type [ 8 ] ) ;
}
return nextPromise ;
}
} ) ;
return self . _prepareEvent ( type , arg1 , arg2 , type . sdkProcessingMetadata || { } . capturedSpanIsolationScope ) . then ( ( spans ) => {
if ( null === spans ) {
self . recordDroppedEvent ( "event_processor" , closure _0 , combined ) ;
let sentryError = new str ( type [ 17 ] ) . SentryError ( "An event processor returned `null`, will not send event." , "log" ) ;
throw sentryError ;
} else {
if ( data . data ) {
if ( true === tmp30 . data . _ _sentry _ _ ) {
return spans ;
}
}
const promise = ( function processBeforeSend ( self , options , spans , arg3 ) {
( { beforeSend , beforeSendTransaction , beforeSendSpan } = options ) ;
if ( callback2 ( spans ) ) {
if ( beforeSend ) {
return beforeSend ( spans , arg3 ) ;
}
}
if ( callback3 ( spans ) ) {
if ( spans . spans ) {
if ( beforeSendSpan ) {
const items = [ ] ;
spans = spans . spans ;
const iter = spans [ Symbol . iterator ] ( ) ;
while ( iter !== undefined ) {
let beforeSendSpanResult = beforeSendSpan ( iter . next ( ) ) ;
if ( beforeSendSpanResult ) {
let tmp10 = beforeSendSpanResult ;
let arr = items . push ( tmp5 ) ;
} else {
let tmp6 = callback ;
let tmp7 = combined ;
let obj = callback ( combined [ 20 ] ) ;
let showSpanDropWarningResult = obj . showSpanDropWarning ( ) ;
let recordDroppedEventResult = self . recordDroppedEvent ( "before_send" , "span" ) ;
}
continue ;
}
spans . spans = items ;
}
}
if ( beforeSendTransaction ) {
if ( spans . spans ) {
obj = { } ;
const merged = Object . assign ( spans . sdkProcessingMetadata ) ;
obj . spanCountBeforeProcessing = spans . spans . length ;
spans . sdkProcessingMetadata = obj ;
}
return beforeSendTransaction ( spans , arg3 ) ;
}
}
return spans ;
} ) ( self , options , spans , data ) ;
closure _0 = closure _6 ;
combined = undefined ;
const _HermesInternal = HermesInternal ;
combined = "" + closure _6 + " must return `null` or a valid event." ;
if ( obj . isThenable ( promise ) ) {
let nextPromise = promise . then ( ( arg0 ) => {
if ( ! obj . isPlainObject ( arg0 ) ) {
if ( null !== arg0 ) {
const sentryError = new callback ( combined [ 17 ] ) . SentryError ( combined ) ;
throw sentryError ;
}
}
return arg0 ;
} , ( arg0 ) => {
const sentryError = new callback ( combined [ 17 ] ) . SentryError ( "" + callback + " rejected with " + arg0 ) ;
throw sentryError ;
} ) ;
} else {
nextPromise = promise ;
if ( ! obj2 . isPlainObject ( promise ) ) {
nextPromise = promise ;
if ( null !== promise ) {
const sentryError1 = new str ( type [ 17 ] ) . SentryError ( combined ) ;
throw sentryError1 ;
}
}
obj2 = str ( type [ 8 ] ) ;
}
return nextPromise ;
}
} ) . then ( ( sdkProcessingMetadata ) => {
if ( null === sdkProcessingMetadata ) {
self . recordDroppedEvent ( "before_send" , str , type ) ;
if ( closure _5 ) {
self . recordDroppedEvent ( "before_send" , "span" , 1 + type . spans || [ ] . length ) ;
const arr = type . spans || [ ] ;
}
const _HermesInternal = HermesInternal ;
const sentryError = new str ( type [ 17 ] ) . SentryError ( "" + closure _6 + " returned `null`, will not send event." , "log" ) ;
throw sentryError ;
} else {
let session = closure _3 ;
if ( closure _3 ) {
session = closure _3 . getSession ( ) ;
}
let tmp3 = ! closure _5 ;
if ( ! closure _5 ) {
tmp3 = session ;
}
if ( tmp3 ) {
const result = self . _updateSessionFromEvent ( session , sdkProcessingMetadata ) ;
}
if ( closure _5 ) {
let num2 = 0 ;
if ( sdkProcessingMetadata . spans ) {
num2 = sdkProcessingMetadata . spans . length ;
}
const diff = ( sdkProcessingMetadata . sdkProcessingMetadata && sdkProcessingMetadata . sdkProcessingMetadata . spanCountBeforeProcessing || 0 ) - num2 ;
if ( diff > 0 ) {
self . recordDroppedEvent ( "before_send" , "span" , diff ) ;
}
const tmp6 = sdkProcessingMetadata . sdkProcessingMetadata && sdkProcessingMetadata . sdkProcessingMetadata . spanCountBeforeProcessing || 0 ;
}
const transaction _info = sdkProcessingMetadata . transaction _info ;
if ( closure _5 ) {
if ( transaction _info ) {
if ( sdkProcessingMetadata . transaction !== type . transaction ) {
const obj = { } ;
const merged = Object . assign ( transaction _info ) ;
obj . source = "custom" ;
sdkProcessingMetadata . transaction _info = obj ;
}
}
}
self . sendEvent ( sdkProcessingMetadata , closure _2 ) ;
return sdkProcessingMetadata ;
}
} ) . then ( null , ( arg0 ) => {
if ( arg0 instanceof str ( type [ 17 ] ) . SentryError ) {
throw arg0 ;
} else {
const obj = { data : null , originalException : null } ;
obj [ 0 ] = { _ _sentry _ _ : true } ;
obj [ 1 ] = arg0 ;
self . captureException ( arg0 , obj ) ;
const _HermesInternal = HermesInternal ;
const sentryError = new tmp ( tmp2 [ 17 ] ) . SentryError ( "Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: " + arg0 ) ;
throw sentryError ;
}
tmp = str ;
tmp2 = type ;
} ) ;
}
} ,
{
key : "_process" ,
value : function _process ( promise ) {
const self = this ;
this . _numProcessing = this . _numProcessing + 1 ;
promise . then ( ( arg0 ) => {
self . _numProcessing = self . _numProcessing - 1 ;
return arg0 ;
} , ( arg0 ) => {
self . _numProcessing = self . _numProcessing - 1 ;
return arg0 ;
} ) ;
}
} ,
{
key : "_clearOutcomes" ,
value : function _clearOutcomes ( ) {
this . _outcomes = { } ;
const entries = Object . entries ( this . _outcomes ) ;
return entries . map ( ( arg0 ) => {
[ str , tmp ] = arg0 ;
const tmp2 = callback ( str . split ( ":" ) , 2 ) ;
return { reason : tmp2 [ 0 ] , category : tmp2 [ 1 ] , quantity : tmp } ;
} ) ;
}
} ,
{
key : "_flushOutcomes" ,
value : function _flushOutcomes ( ) {
2026-08-24 06:08:38 +00:00
if ( BaseClient ( 7804 ) . DEBUG _BUILD ) {
const logger = tmp ( 7776 ) . logger ;
2026-07-29 08:29:29 +00:00
logger . log ( "Flushing outcomes..." ) ;
}
const self = this ;
const _clearOutcomesResult = this . _clearOutcomes ( ) ;
if ( 0 !== _clearOutcomesResult . length ) {
2026-08-24 06:08:38 +00:00
const DEBUG _BUILD = tmp ( 7804 ) . DEBUG _BUILD ;
2026-07-29 08:29:29 +00:00
if ( self . _dsn ) {
if ( DEBUG _BUILD ) {
2026-08-24 06:08:38 +00:00
const logger4 = tmp ( 7776 ) . logger ;
2026-07-29 08:29:29 +00:00
logger4 . log ( "Sending outcomes:" , _clearOutcomesResult ) ;
}
2026-08-24 06:08:38 +00:00
let tmpResult = tmp ( 7834 ) ;
2026-07-29 08:29:29 +00:00
let tunnel = self . _options . tunnel ;
if ( tunnel ) {
2026-08-24 06:08:38 +00:00
tmpResult = tmp ( 7823 ) ;
2026-07-29 08:29:29 +00:00
tunnel = tmpResult . dsnToString ( self . _dsn ) ;
}
self . sendEnvelope ( tmpResult . createClientReportEnvelope ( _clearOutcomesResult , tunnel ) ) ;
} else if ( DEBUG _BUILD ) {
2026-08-24 06:08:38 +00:00
const logger3 = tmp ( 7776 ) . logger ;
2026-07-29 08:29:29 +00:00
logger3 . log ( "No dsn provided, will not send outcomes" ) ;
}
2026-08-24 06:08:38 +00:00
} else if ( tmp ( 7804 ) . DEBUG _BUILD ) {
const logger2 = tmp ( 7776 ) . logger ;
2026-07-29 08:29:29 +00:00
logger2 . log ( "No outcomes to send" ) ;
}
}
}
] ;
export const BaseClient = _createClass ( BaseClient , items ) ;