2026-07-29 08:29:29 +00:00
// Module ID: 1612
// Function ID: 1613
// Name: logToConsole
// Dependencies: [1611]
// Module 1612 (logToConsole)
const global = arg0 ;
const require = arg1 ;
const dependencyMap = arg6 ;
let c3 = "If you don't want to see this message, you can disable the `strict` mode. Refer to:\nhttps://docs.swmansion.com/react-native-reanimated/docs/debugging/logger-configuration for more details." ;
let obj = { warn : 1 , [ 1 ] : "warn" , error : 2 , [ 2 ] : "error" } ;
function logToConsole ( level ) {
level = level . level ;
if ( "warn" === level ) {
const _console2 = console ;
console . warn ( level . message . content ) ;
} else {
const _console = console ;
console . error ( level . message . content ) ;
}
}
logToConsole . _ _closure = { } ;
logToConsole . _ _workletHash = 4297880609329 ;
logToConsole . _ _initData = { code : "function logToConsole_Pnpm_loggerTs1(data){switch(data.level){case'warn':console.warn(data.message.content);break;case'error':case'fatal':case'syntax':console.error(data.message.content);break;}}" } ;
obj = { logFunction : logToConsole , level : obj . warn , strict : true } ;
function formatMessage ( arg0 ) {
return "[Reanimated] " + arg0 ;
}
formatMessage . _ _closure = { } ;
formatMessage . _ _workletHash = 4586683970876 ;
formatMessage . _ _initData = { code : "function formatMessage_Pnpm_loggerTs2(message){return\"[Reanimated] \"+message;}" } ;
function createLog ( level ) {
2026-08-04 21:03:28 +00:00
if ( typeof formatMessage !== "function" ) {
2026-07-29 08:29:29 +00:00
HermesBuiltin . throwTypeError ( ) ;
}
const combined = "[Reanimated] " + arg1 ;
const obj = { level , message : { content : combined , substitutions : [ ] } , category : combined , componentStack : [ ] , componentStackType : null , stack : null } ;
const error = new Error ( ) ;
obj [ 5 ] = error . stack ;
return obj ;
}
createLog . _ _closure = { formatMessage } ;
createLog . _ _workletHash = 5107313473751 ;
createLog . _ _initData = { code : "function createLog_Pnpm_loggerTs3(level,message){const{formatMessage}=this.__closure;const formattedMessage=formatMessage(message);return{level:level,message:{content:formattedMessage,substitutions:[]},category:formattedMessage,componentStack:[],componentStackType:null,stack:new Error().stack};}" } ;
function registerLoggerConfig ( DEFAULT _LOGGER _CONFIG ) {
global . _ _reanimatedLoggerConfig = DEFAULT _LOGGER _CONFIG ;
}
registerLoggerConfig . _ _closure = { } ;
registerLoggerConfig . _ _workletHash = 1484852907300 ;
registerLoggerConfig . _ _initData = { code : "function registerLoggerConfig_Pnpm_loggerTs4(config){global.__reanimatedLoggerConfig=config;}" } ;
function replaceLoggerImplementation ( fn ) {
const obj = { } ;
const merged = Object . assign ( global . _ _reanimatedLoggerConfig ) ;
obj . logFunction = fn ;
2026-08-04 21:03:28 +00:00
if ( typeof registerLoggerConfig !== "function" ) {
2026-07-29 08:29:29 +00:00
HermesBuiltin . throwTypeError ( ) ;
}
global . _ _reanimatedLoggerConfig = obj ;
}
replaceLoggerImplementation . _ _closure = { registerLoggerConfig } ;
replaceLoggerImplementation . _ _workletHash = 9450518662656 ;
replaceLoggerImplementation . _ _initData = { code : "function replaceLoggerImplementation_Pnpm_loggerTs5(logFunction){const{registerLoggerConfig}=this.__closure;registerLoggerConfig({...global.__reanimatedLoggerConfig,logFunction:logFunction});}" } ;
function updateLoggerConfig ( level ) {
const obj = { } ;
const merged = Object . assign ( global . _ _reanimatedLoggerConfig ) ;
level = undefined ;
if ( level != null ) {
level = level . level ;
}
if ( level == null ) {
level = obj . level ;
}
obj . level = level ;
let strict ;
if ( level != null ) {
strict = level . strict ;
}
if ( strict == null ) {
strict = obj . strict ;
}
obj . strict = strict ;
2026-08-04 21:03:28 +00:00
if ( typeof registerLoggerConfig !== "function" ) {
2026-07-29 08:29:29 +00:00
HermesBuiltin . throwTypeError ( ) ;
}
global . _ _reanimatedLoggerConfig = obj ;
}
updateLoggerConfig . _ _closure = { registerLoggerConfig , DEFAULT _LOGGER _CONFIG : obj } ;
updateLoggerConfig . _ _workletHash = 14435084623184 ;
updateLoggerConfig . _ _initData = { code : "function updateLoggerConfig_Pnpm_loggerTs6(options){const{registerLoggerConfig,DEFAULT_LOGGER_CONFIG}=this.__closure;var _options$level,_options$strict;registerLoggerConfig({...global.__reanimatedLoggerConfig,level:(_options$level=options===null||options===void 0?void 0:options.level)!==null&&_options$level!==void 0?_options$level:DEFAULT_LOGGER_CONFIG.level,strict:(_options$strict=options===null||options===void 0?void 0:options.strict)!==null&&_options$strict!==void 0?_options$strict:DEFAULT_LOGGER_CONFIG.strict});}" } ;
function handleLog ( error , arg1 , strict ) {
const _ _reanimatedLoggerConfig = global . _ _reanimatedLoggerConfig ;
let tmp = strict . strict && ! _ _reanimatedLoggerConfig . strict ;
if ( ! tmp ) {
tmp = obj [ error ] < _ _reanimatedLoggerConfig . level ;
}
if ( ! tmp ) {
let sum = arg1 ;
if ( strict . strict ) {
const _HermesInternal = HermesInternal ;
sum = arg1 + "\n\n" + c3 ;
}
2026-08-04 21:03:28 +00:00
if ( typeof createLog !== "function" ) {
2026-07-29 08:29:29 +00:00
HermesBuiltin . throwTypeError ( ) ;
}
2026-08-04 21:03:28 +00:00
if ( typeof formatMessage !== "function" ) {
2026-07-29 08:29:29 +00:00
HermesBuiltin . throwTypeError ( ) ;
}
const _HermesInternal2 = HermesInternal ;
const combined = "[Reanimated] " + sum ;
obj = { level : null , message : null , category : null , componentStack : null , componentStackType : null , stack : null } ;
obj [ 0 ] = error ;
obj = { content : null , substitutions : null } ;
obj [ 0 ] = combined ;
obj [ 1 ] = [ ] ;
obj [ 1 ] = obj ;
obj [ 2 ] = combined ;
obj [ 3 ] = [ ] ;
const _Error = Error ;
error = new Error ( ) ;
obj [ 5 ] = error . stack ;
_ _reanimatedLoggerConfig . logFunction ( obj ) ;
}
}
handleLog . _ _closure = { LogLevel : obj , DOCS _REFERENCE : "If you don't want to see this message, you can disable the `strict` mode. Refer to:\nhttps://docs.swmansion.com/react-native-reanimated/docs/debugging/logger-configuration for more details." , createLog } ;
handleLog . _ _workletHash = 5113579927044 ;
handleLog . _ _initData = { code : "function handleLog_Pnpm_loggerTs7(level,message,options){const{LogLevel,DOCS_REFERENCE,createLog}=this.__closure;const config=global.__reanimatedLoggerConfig;if(options.strict&&!config.strict||LogLevel[level]<config.level){return;}if(options.strict){message+=\"\\n\\n\"+DOCS_REFERENCE;}config.logFunction(createLog(level,message));}" } ;
obj = { warn : fn , error : null } ;
fn = function v ( arg0 , strict ) {
let obj = strict ;
if ( strict === undefined ) {
obj = { } ;
}
handleLog ( "warn" , arg0 , obj ) ;
} ;
fn . _ _closure = { handleLog } ;
fn . _ _workletHash = 13521870617115 ;
fn . _ _initData = { code : "function warn_Pnpm_loggerTs8(message,options={}){const{handleLog}=this.__closure;handleLog('warn',message,options);}" } ;
class L {
constructor ( arg0 ) {
obj = arg1 ;
if ( arg1 === undefined ) {
obj = { } ;
}
tmp = handleLog ( "error" , arg0 , obj ) ;
return ;
}
}
L . _ _closure = { handleLog } ;
L . _ _workletHash = 10275432056698 ;
L . _ _initData = { code : "function error_Pnpm_loggerTs9(message,options={}){const{handleLog}=this.__closure;handleLog('error',message,options);}" } ;
obj [ 1 ] = L ;
arg5 . LogLevel = obj ;
arg5 . DEFAULT _LOGGER _CONFIG = obj ;
arg5 . logToLogBoxAndConsole = function logToLogBoxAndConsole ( level ) {
require ( 1611 ) /* addLogBoxLog */ . addLogBoxLog ( level ) ;
2026-08-04 21:03:28 +00:00
if ( typeof logToConsole !== "function" ) {
2026-07-29 08:29:29 +00:00
HermesBuiltin . throwTypeError ( ) ;
}
level = level . level ;
if ( "warn" === level ) {
const _console2 = console ;
console . warn ( level . message . content ) ;
} else {
const _console = console ;
console . error ( level . message . content ) ;
}
} ;
arg5 . registerLoggerConfig = registerLoggerConfig ;
arg5 . replaceLoggerImplementation = replaceLoggerImplementation ;
arg5 . updateLoggerConfig = updateLoggerConfig ;
arg5 . logger = obj ;