2026-08-15 05:55:55 +00:00
// Module ID: 1704
// Function ID: 1705
2026-07-29 08:29:29 +00:00
// Name: runOnRuntime
2026-08-15 05:55:55 +00:00
// Dependencies: [1657, 1662, 1684, 1665, 1658, 1656, 1679]
2026-07-29 08:29:29 +00:00
// Exports: createWorkletRuntime, runOnRuntime
2026-08-15 05:55:55 +00:00
// Module 1704 (runOnRuntime)
2026-08-24 06:08:38 +00:00
import ReanimatedModule2 from "ReanimatedModule" /* 1662 */ ;
import isWorkletFunction from "isWorkletFunction" /* 1679 */ ;
import freezeObjectInDev from "freezeObjectInDev" /* 1684 */ ;
import isJest from "isJest" /* 1657 */ ;
2026-07-29 08:29:29 +00:00
let closure _3 = { code : "function pnpm_runtimesTs1(){const{registerReanimatedError,registerLoggerConfig,config,setupCallGuard,setupConsole,initializer}=this.__closure;var _initializer;registerReanimatedError();registerLoggerConfig(config);setupCallGuard();setupConsole();(_initializer=initializer)===null||_initializer===void 0||_initializer();}" } ;
let closure _4 = { code : "function pnpm_runtimesTs3(){const{worklet,args}=this.__closure;worklet(...args);}" } ;
let closure _5 = { code : "function pnpm_runtimesTs4(){const{worklet,args}=this.__closure;worklet(...args);}" } ;
function runOnRuntime ( arg0 , arg1 ) {
2026-08-24 06:08:38 +00:00
closure _0 = arg0 ;
closure _1 = arg1 ;
2026-07-29 08:29:29 +00:00
return globalThis . _WORKLET ? ( ( ) => {
const items = [ ... arguments ] ;
2026-08-24 06:08:38 +00:00
let obj = callback ( closure _1 _2 [ 2 ] ) ;
2026-07-29 08:29:29 +00:00
const fn = function u ( ) {
2026-08-24 06:08:38 +00:00
closure _1 _1 ( ... items ) ;
2026-07-29 08:29:29 +00:00
} ;
obj = { worklet : callback , args : items } ;
fn . _ _closure = obj ;
fn . _ _workletHash = 1376644884193 ;
2026-08-24 06:08:38 +00:00
fn . _ _initData = closure _1 _4 ;
2026-07-29 08:29:29 +00:00
return closure _0 . _scheduleOnRuntime ( items , obj . makeShareableCloneOnUIRecursive ( fn ) ) ;
} ) : ( ( ) => {
const items = [ ... arguments ] ;
2026-08-24 06:08:38 +00:00
const ReanimatedModule = callback ( closure _1 _2 [ 1 ] ) . ReanimatedModule ;
let obj = callback ( closure _1 _2 [ 2 ] ) ;
2026-07-29 08:29:29 +00:00
const fn = function l ( ) {
2026-08-24 06:08:38 +00:00
closure _1 _1 ( ... items ) ;
2026-07-29 08:29:29 +00:00
} ;
obj = { worklet : callback , args : items } ;
fn . _ _closure = obj ;
fn . _ _workletHash = 10918069222950 ;
2026-08-24 06:08:38 +00:00
fn . _ _initData = closure _1 _5 ;
2026-07-29 08:29:29 +00:00
return ReanimatedModule . scheduleOnRuntime ( items , obj . makeShareableCloneRecursive ( fn ) ) ;
} ) ;
}
2026-08-24 06:08:38 +00:00
runOnRuntime . _ _closure = { _ _DEV _ _ : false , SHOULD _BE _USE _WEB : isJest . shouldBeUseWeb ( ) , isWorkletFunction : isWorkletFunction . isWorkletFunction , makeShareableCloneOnUIRecursive : freezeObjectInDev . makeShareableCloneOnUIRecursive , ReanimatedModule : ReanimatedModule2 . ReanimatedModule , makeShareableCloneRecursive : freezeObjectInDev . makeShareableCloneRecursive } ;
2026-07-29 08:29:29 +00:00
runOnRuntime . _ _workletHash = 14671185280560 ;
runOnRuntime . _ _initData = { code : "function runOnRuntime_Pnpm_runtimesTs2(workletRuntime,worklet){const{__DEV__,SHOULD_BE_USE_WEB,isWorkletFunction,makeShareableCloneOnUIRecursive,ReanimatedModule,makeShareableCloneRecursive}=this.__closure;if(__DEV__&&!SHOULD_BE_USE_WEB&&!isWorkletFunction(worklet)){throw new ReanimatedError('The function passed to `runOnRuntime` is not a worklet.'+(_WORKLET?' Please make sure that `processNestedWorklets` option in Reanimated Babel plugin is enabled.':''));}if(_WORKLET){return function(...args){return global._scheduleOnRuntime(workletRuntime,makeShareableCloneOnUIRecursive(function(){'worklet';worklet(...args);}));};}return function(...args){return ReanimatedModule.scheduleOnRuntime(workletRuntime,makeShareableCloneRecursive(function(){'worklet';worklet(...args);}));};}" } ;
export const createWorkletRuntime = function createWorkletRuntime ( arg0 , initializer ) {
2026-08-24 06:08:38 +00:00
closure _0 = initializer ;
2026-08-15 05:55:55 +00:00
const ReanimatedModule = _ _reanimatedLoggerConfig ( 1662 ) . ReanimatedModule ;
let obj = _ _reanimatedLoggerConfig ( 1684 ) ;
2026-07-29 08:29:29 +00:00
const fn = function l ( ) {
2026-08-24 06:08:38 +00:00
const result = _ _reanimatedLoggerConfig ( closure _1 _2 [ 3 ] ) . registerReanimatedError ( ) ;
const obj = _ _reanimatedLoggerConfig ( closure _1 _2 [ 3 ] ) ;
_ _reanimatedLoggerConfig ( closure _1 _2 [ 4 ] ) . registerLoggerConfig ( _ _reanimatedLoggerConfig ) ;
const obj2 = _ _reanimatedLoggerConfig ( closure _1 _2 [ 4 ] ) ;
_ _reanimatedLoggerConfig ( closure _1 _2 [ 5 ] ) . setupCallGuard ( ) ;
const obj3 = _ _reanimatedLoggerConfig ( closure _1 _2 [ 5 ] ) ;
_ _reanimatedLoggerConfig ( closure _1 _2 [ 5 ] ) . setupConsole ( ) ;
2026-07-29 08:29:29 +00:00
if ( initializer != null ) {
initializer ( ) ;
}
} ;
2026-08-15 05:55:55 +00:00
obj = { registerReanimatedError : _ _reanimatedLoggerConfig ( 1665 ) . registerReanimatedError , registerLoggerConfig : _ _reanimatedLoggerConfig ( 1658 ) . registerLoggerConfig , config : globalThis . _ _reanimatedLoggerConfig , setupCallGuard : _ _reanimatedLoggerConfig ( 1656 ) . setupCallGuard , setupConsole : _ _reanimatedLoggerConfig ( 1656 ) . setupConsole , initializer } ;
2026-07-29 08:29:29 +00:00
fn . _ _closure = obj ;
fn . _ _workletHash = 8531807001072 ;
fn . _ _initData = closure _3 ;
return ReanimatedModule . createWorkletRuntime ( arg0 , obj . makeShareableCloneRecursive ( fn ) ) ;
} ;
export { runOnRuntime } ;