2026-07-20 16:05:17 +00:00
// Module ID: 1081
2026-07-28 08:39:19 +00:00
// Function ID: 12450
2026-07-20 16:05:17 +00:00
// Name: _wrappedIsEnabled
2026-07-23 10:11:24 +00:00
// Dependencies: [794, 1048]
2026-07-20 16:05:17 +00:00
// Module 1081 (_wrappedIsEnabled)
2026-07-23 10:11:24 +00:00
import registerSpanErrorInstrumentation from "registerSpanErrorInstrumentation" ;
2026-07-20 16:05:17 +00:00
function _wrappedIsEnabled ( arg0 ) {
2026-07-23 10:11:24 +00:00
let closure _0 = arg0 ;
2026-07-20 16:05:17 +00:00
return function ( ) {
const length = arguments . length ;
const array = new Array ( length ) ;
for ( let num = 0 ; num < length ; num = num + 1 ) {
array [ num ] = arguments [ num ] ;
}
const first = array [ 0 ] ;
2026-07-23 10:11:24 +00:00
const applyResult = callback . apply ( this , array ) ;
2026-07-20 16:05:17 +00:00
if ( "string" === typeof first ) {
if ( "boolean" === typeof applyResult ) {
2026-07-23 10:11:24 +00:00
const result = callback ( outer1 _1 [ 0 ] ) . _INTERNAL _insertFlagToScope ( first , applyResult ) ;
const obj = callback ( outer1 _1 [ 0 ] ) ;
const result1 = callback ( outer1 _1 [ 0 ] ) . _INTERNAL _addFeatureFlagToActiveSpan ( first , applyResult ) ;
const obj2 = callback ( outer1 _1 [ 0 ] ) ;
2026-07-20 16:05:17 +00:00
}
return applyResult ;
}
2026-07-23 10:11:24 +00:00
if ( callback ( outer1 _1 [ 1 ] ) . DEBUG _BUILD ) {
const debug = callback ( outer1 _1 [ 0 ] ) . debug ;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal ;
debug . error ( "[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: " + first + " (" + tmp4 + "), result: " + applyResult + " (" + typeof applyResult + ")" ) ;
}
} ;
}
Object . defineProperty ( exports , Symbol . toStringTag , { value : "Module" } ) ;
2026-07-23 10:11:24 +00:00
export const unleashIntegration = registerSpanErrorInstrumentation . defineIntegration ( ( featureFlagClientClass ) => {
featureFlagClientClass = featureFlagClientClass . featureFlagClientClass ;
2026-07-20 16:05:17 +00:00
return {
name : "Unleash" ,
setupOnce ( ) {
2026-07-23 10:11:24 +00:00
featureFlagClientClass ( outer1 _1 [ 0 ] ) . fill ( featureFlagClientClass . prototype , "isEnabled" , outer1 _2 ) ;
2026-07-20 16:05:17 +00:00
} ,
processEvent ( contexts ) {
2026-07-23 10:11:24 +00:00
return featureFlagClientClass ( outer1 _1 [ 0 ] ) . _INTERNAL _copyFlagsFromScopeToEvent ( contexts ) ;
2026-07-20 16:05:17 +00:00
}
} ;
} ) ;