2026-07-20 16:05:17 +00:00
// Module ID: 1751
2026-07-25 08:10:48 +00:00
// Function ID: 19595
2026-07-20 16:05:17 +00:00
// Name: getVal
2026-07-23 10:11:24 +00:00
// Dependencies: [1593]
2026-07-20 16:05:17 +00:00
// Module 1751 (getVal)
2026-07-23 10:11:24 +00:00
const require = arg1 ;
const dependencyMap = arg6 ;
let obj = { IDENTITY : "identity" , CLAMP : "clamp" , EXTEND : "extend" } ;
2026-07-20 16:05:17 +00:00
let closure _3 = { code : "function getVal_Pnpm_interpolationTs1(type,coef,val,leftEdgeOutput,rightEdgeOutput,x){const{Extrapolation}=this.__closure;switch(type){case Extrapolation.IDENTITY:return x;case Extrapolation.CLAMP:if(coef*val<coef*leftEdgeOutput){return leftEdgeOutput;}return rightEdgeOutput;case Extrapolation.EXTEND:default:return val;}}" } ;
2026-07-23 10:11:24 +00:00
let closure _4 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function getVal ( arg0 , arg1 , arg2 , arg3 , arg4 , arg5 ) {
let tmp = arg4 ;
2026-07-23 10:11:24 +00:00
if ( outer1 _2 . IDENTITY === arg0 ) {
2026-07-20 16:05:17 +00:00
return arg5 ;
2026-07-23 10:11:24 +00:00
} else if ( outer1 _2 . CLAMP === arg0 ) {
2026-07-20 16:05:17 +00:00
if ( arg1 * arg2 < arg1 * arg3 ) {
tmp = arg3 ;
}
return tmp ;
} else {
2026-07-23 10:11:24 +00:00
const EXTEND = outer1 _2 . EXTEND ;
2026-07-20 16:05:17 +00:00
return arg2 ;
}
}
2026-07-23 10:11:24 +00:00
obj = { Extrapolation : obj } ;
2026-07-20 16:05:17 +00:00
getVal . _ _closure = obj ;
getVal . _ _workletHash = 15103214376416 ;
getVal . _ _initData = closure _3 ;
return getVal ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _5 = { code : "function isExtrapolate_Pnpm_interpolationTs2(value){const{Extrapolation}=this.__closure;return value===Extrapolation.EXTEND||value===Extrapolation.CLAMP||value===Extrapolation.IDENTITY;}" } ;
2026-07-23 10:11:24 +00:00
let closure _6 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function isExtrapolate ( arg0 ) {
2026-07-23 10:11:24 +00:00
let tmp = arg0 === outer1 _2 . EXTEND ;
2026-07-20 16:05:17 +00:00
if ( ! tmp ) {
2026-07-23 10:11:24 +00:00
tmp = arg0 === outer1 _2 . CLAMP ;
2026-07-20 16:05:17 +00:00
}
if ( ! tmp ) {
2026-07-23 10:11:24 +00:00
tmp = arg0 === outer1 _2 . IDENTITY ;
2026-07-20 16:05:17 +00:00
}
return tmp ;
}
2026-07-23 10:11:24 +00:00
obj = { Extrapolation : obj } ;
2026-07-20 16:05:17 +00:00
isExtrapolate . _ _closure = obj ;
isExtrapolate . _ _workletHash = 1560831703072 ;
isExtrapolate . _ _initData = closure _5 ;
return isExtrapolate ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _7 = { code : "function validateType_Pnpm_interpolationTs3(type){const{Extrapolation,isExtrapolate}=this.__closure;const extrapolationConfig={extrapolateLeft:Extrapolation.EXTEND,extrapolateRight:Extrapolation.EXTEND};if(!type){return extrapolationConfig;}if(typeof type==='string'){if(!isExtrapolate(type)){throw new ReanimatedError(\"Unsupported value for \\\"interpolate\\\" \\nSupported values: [\\\"extend\\\", \\\"clamp\\\", \\\"identity\\\", Extrapolatation.CLAMP, Extrapolatation.EXTEND, Extrapolatation.IDENTITY]\\n Valid example:\\n interpolate(value, [inputRange], [outputRange], \\\"clamp\\\")\");}extrapolationConfig.extrapolateLeft=type;extrapolationConfig.extrapolateRight=type;return extrapolationConfig;}if(type.extrapolateLeft&&!isExtrapolate(type.extrapolateLeft)||type.extrapolateRight&&!isExtrapolate(type.extrapolateRight)){throw new ReanimatedError(\"Unsupported value for \\\"interpolate\\\" \\nSupported values: [\\\"extend\\\", \\\"clamp\\\", \\\"identity\\\", Extrapolatation.CLAMP, Extrapolatation.EXTEND, Extrapolatation.IDENTITY]\\n Valid example:\\n interpolate(value, [inputRange], [outputRange], {\\n extrapolateLeft: Extrapolation.CLAMP,\\n extrapolateRight: Extrapolation.IDENTITY\\n }})\");}Object.assign(extrapolationConfig,type);return extrapolationConfig;}" } ;
2026-07-23 10:11:24 +00:00
let closure _8 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function validateType ( extrapolateLeft ) {
2026-07-23 10:11:24 +00:00
const obj = { extrapolateLeft : outer1 _2 . EXTEND , extrapolateRight : outer1 _2 . EXTEND } ;
2026-07-20 16:05:17 +00:00
if ( extrapolateLeft ) {
if ( "string" === typeof extrapolateLeft ) {
2026-07-23 10:11:24 +00:00
if ( outer1 _6 ( extrapolateLeft ) ) {
2026-07-20 16:05:17 +00:00
obj . extrapolateLeft = extrapolateLeft ;
obj . extrapolateRight = extrapolateLeft ;
return obj ;
} else {
2026-07-23 10:11:24 +00:00
const ReanimatedError2 = outer1 _0 ( outer1 _1 [ 0 ] ) . ReanimatedError ;
2026-07-20 16:05:17 +00:00
const prototype2 = ReanimatedError2 . prototype ;
const reanimatedError2 = new ReanimatedError2 ( "Unsupported value for \"interpolate\" \nSupported values: [\"extend\", \"clamp\", \"identity\", Extrapolatation.CLAMP, Extrapolatation.EXTEND, Extrapolatation.IDENTITY]\n Valid example:\n interpolate(value, [inputRange], [outputRange], \"clamp\")" ) ;
throw reanimatedError2 ;
}
} else {
if ( ! extrapolateLeft . extrapolateLeft ) {
const _Object = Object ;
const merged = Object . assign ( obj , extrapolateLeft ) ;
return obj ;
}
2026-07-23 10:11:24 +00:00
const ReanimatedError = outer1 _0 ( outer1 _1 [ 0 ] ) . ReanimatedError ;
2026-07-20 16:05:17 +00:00
const prototype = ReanimatedError . prototype ;
const reanimatedError = new ReanimatedError ( "Unsupported value for \"interpolate\" \nSupported values: [\"extend\", \"clamp\", \"identity\", Extrapolatation.CLAMP, Extrapolatation.EXTEND, Extrapolatation.IDENTITY]\n Valid example:\n interpolate(value, [inputRange], [outputRange], {\n extrapolateLeft: Extrapolation.CLAMP,\n extrapolateRight: Extrapolation.IDENTITY\n }})" ) ;
throw reanimatedError ;
}
} else {
return obj ;
}
}
2026-07-23 10:11:24 +00:00
obj = { Extrapolation : obj , isExtrapolate : closure _6 } ;
2026-07-20 16:05:17 +00:00
validateType . _ _closure = obj ;
validateType . _ _workletHash = 9722315466599 ;
validateType . _ _initData = closure _7 ;
return validateType ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _9 = { code : "function internalInterpolate_Pnpm_interpolationTs4(x,narrowedInput,extrapolationConfig){const{getVal}=this.__closure;const{leftEdgeInput:leftEdgeInput,rightEdgeInput:rightEdgeInput,leftEdgeOutput:leftEdgeOutput,rightEdgeOutput:rightEdgeOutput}=narrowedInput;if(rightEdgeInput-leftEdgeInput===0){return leftEdgeOutput;}const progress=(x-leftEdgeInput)/(rightEdgeInput-leftEdgeInput);const val=leftEdgeOutput+progress*(rightEdgeOutput-leftEdgeOutput);const coef=rightEdgeOutput>=leftEdgeOutput?1:-1;if(coef*val<coef*leftEdgeOutput){return getVal(extrapolationConfig.extrapolateLeft,coef,val,leftEdgeOutput,rightEdgeOutput,x);}else if(coef*val>coef*rightEdgeOutput){return getVal(extrapolationConfig.extrapolateRight,coef,val,leftEdgeOutput,rightEdgeOutput,x);}return val;}" } ;
2026-07-23 10:11:24 +00:00
let closure _10 = ( ( ) => {
2026-07-20 16:05:17 +00:00
function internalInterpolate ( arg0 , arg1 , extrapolateLeft ) {
let leftEdgeInput ;
let leftEdgeOutput ;
let rightEdgeInput ;
let rightEdgeOutput ;
( { leftEdgeInput , rightEdgeInput , leftEdgeOutput , rightEdgeOutput } = arg1 ) ;
if ( rightEdgeInput - leftEdgeInput == 0 ) {
return leftEdgeOutput ;
} else {
const sum = leftEdgeOutput + ( arg0 - leftEdgeInput ) / ( rightEdgeInput - leftEdgeInput ) * ( rightEdgeOutput - leftEdgeOutput ) ;
let num = - 1 ;
if ( rightEdgeOutput >= leftEdgeOutput ) {
num = 1 ;
}
if ( num * sum < num * leftEdgeOutput ) {
2026-07-23 10:11:24 +00:00
let tmp = outer1 _4 ( extrapolateLeft . extrapolateLeft , num , sum , leftEdgeOutput , rightEdgeOutput , arg0 ) ;
2026-07-20 16:05:17 +00:00
} else {
tmp = sum ;
if ( num * sum > num * rightEdgeOutput ) {
2026-07-23 10:11:24 +00:00
tmp = outer1 _4 ( extrapolateLeft . extrapolateRight , num , sum , leftEdgeOutput , rightEdgeOutput , arg0 ) ;
2026-07-20 16:05:17 +00:00
}
}
return tmp ;
}
}
internalInterpolate . _ _closure = { getVal : closure _4 } ;
internalInterpolate . _ _workletHash = 16257995045856 ;
internalInterpolate . _ _initData = closure _9 ;
return internalInterpolate ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
let closure _11 = { code : "function interpolate_Pnpm_interpolationTs5(x,inputRange,outputRange,type){const{validateType,internalInterpolate}=this.__closure;if(inputRange.length<2||outputRange.length<2){throw new ReanimatedError('Interpolation input and output ranges should contain at least two values.');}const extrapolationConfig=validateType(type);const length=inputRange.length;const narrowedInput={leftEdgeInput:inputRange[0],rightEdgeInput:inputRange[1],leftEdgeOutput:outputRange[0],rightEdgeOutput:outputRange[1]};if(length>2){if(x>inputRange[length-1]){narrowedInput.leftEdgeInput=inputRange[length-2];narrowedInput.rightEdgeInput=inputRange[length-1];narrowedInput.leftEdgeOutput=outputRange[length-2];narrowedInput.rightEdgeOutput=outputRange[length-1];}else{for(let i=1;i<length;++i){if(x<=inputRange[i]){narrowedInput.leftEdgeInput=inputRange[i-1];narrowedInput.rightEdgeInput=inputRange[i];narrowedInput.leftEdgeOutput=outputRange[i-1];narrowedInput.rightEdgeOutput=outputRange[i];break;}}}}return internalInterpolate(x,narrowedInput,extrapolationConfig);}" } ;
let closure _12 = { code : "function clamp_Pnpm_interpolationTs6(value,min,max){return Math.min(Math.max(value,min),max);}" } ;
arg5 . Extrapolation = obj ;
2026-07-23 10:11:24 +00:00
arg5 . interpolate = ( ( ) => {
2026-07-20 16:05:17 +00:00
function interpolate ( arg0 , arg1 , arg2 , arg3 ) {
if ( arg1 . length >= 2 ) {
if ( arg2 . length >= 2 ) {
const obj = { leftEdgeInput : arg1 [ 0 ] , rightEdgeInput : arg1 [ 1 ] } ;
[ obj . leftEdgeOutput , obj . rightEdgeOutput ] = arg2 ;
if ( arg1 . length > 2 ) {
if ( arg0 > arg1 [ length - 1 ] ) {
obj . leftEdgeInput = arg1 [ length - 2 ] ;
obj . rightEdgeInput = arg1 [ length - 1 ] ;
obj . leftEdgeOutput = arg2 [ length - 2 ] ;
obj . rightEdgeOutput = arg2 [ length - 1 ] ;
} else {
let num = 1 ;
if ( 1 < length ) {
while ( arg0 > arg1 [ num ] ) {
num = num + 1 ;
}
obj . leftEdgeInput = arg1 [ num - 1 ] ;
obj . rightEdgeInput = arg1 [ num ] ;
obj . leftEdgeOutput = arg2 [ num - 1 ] ;
obj . rightEdgeOutput = arg2 [ num ] ;
}
}
}
2026-07-23 10:11:24 +00:00
return outer1 _10 ( arg0 , obj , outer1 _8 ( arg3 ) ) ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
const reanimatedError = new outer1 _0 ( outer1 _1 [ 0 ] ) . ReanimatedError ( "Interpolation input and output ranges should contain at least two values." ) ;
2026-07-20 16:05:17 +00:00
throw reanimatedError ;
}
interpolate . _ _closure = { validateType : closure _8 , internalInterpolate : closure _10 } ;
interpolate . _ _workletHash = 16263308339935 ;
interpolate . _ _initData = closure _11 ;
return interpolate ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
arg5 . clamp = ( ( ) => {
2026-07-20 16:05:17 +00:00
function clamp ( arg0 , arg1 , arg2 ) {
return Math . min ( Math . max ( arg0 , arg1 ) , arg2 ) ;
}
clamp . _ _closure = { } ;
clamp . _ _workletHash = 13846341562950 ;
clamp . _ _initData = closure _12 ;
return clamp ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;