/* Metro module 1691; source: unknown; dependencies: [1614, 1650] */ function _fun18438(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#18438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1818:6, offset: 0x00e8c449, size: 118 bytes, params: 8, frame: 16 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); object = {code: "function withSequence_Pnpm_sequenceTs1(_reduceMotionOrFirstAnimation,..._animations){const{logger,defineAnimation,getReduceMotionForAnimation}=this.__closure;let reduceMotion;if(_reduceMotionOrFirstAnimation){if(typeof _reduceMotionOrFirstAnimation==='string'){reduceMotion=_reduceMotionOrFirstAnimation;}else{_animations.unshift(_reduceMotionOrFirstAnimation);}}if(_animations.length===0){logger.warn('No animation was provided for the sequence');return defineAnimation(0,function(){'worklet';return{onStart:function(animation,value){return animation.current=value;},onFrame:function(){return true;},current:0,animationIndex:0,reduceMotion:getReduceMotionForAnimation(reduceMotion)};});}return defineAnimation(_animations[0],function(){'worklet';const animations=_animations.map(function(a){const result=typeof a==='function'?a():a;result.finished=false;return result;});function findNextNonReducedMotionAnimationIndex(index){while(index value4) { value6 = length - value4; r0 = value6; break reducibleJoin2; } r0 = value5; break reducibleJoin2; } const array = new Array(); if (value4 < length) { r0 = value4; reducibleLoop3: while (true) { value9 = r0 - value4; array[value9] = arguments[r0]; value10 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1; if (value10 < length) { r0 = value10; continue reducibleLoop3; } break reducibleLoop3; } } reducibleJoin9: while (true) { if (value) { if (typeof value === 'string') { var env0_1 = value; r0 = value; } else { unshift = array.unshift; Reflect.apply(unshift, array, [value]); r0 = value2; } r7 = r0; break reducibleJoin9; } r7 = value2; break reducibleJoin9; } if (value5 === array.length) { value = environment.__proto__; require(dependencyMap[value5]).logger.warn('No animation was provided for the sequence'); moduleValue2 = require(dependencyMap[value4]); defineAnimation = moduleValue2.defineAnimation; closure = pnpm_sequenceTs2; object = {}; object.getReduceMotionForAnimation = require(dependencyMap[value4]).getReduceMotionForAnimation; object.reduceMotion = r7; closure.__closure = object; closure.__workletHash = 3306563388298; closure.__initData = env1_3; value = Reflect.apply(defineAnimation, moduleValue2, [value5, closure]); r0 = value; } else { value = environment.__proto__; moduleValue = require(dependencyMap[value4]); defineAnimation = moduleValue.defineAnimation; property = array[value5]; closure = pnpm_sequenceTs3; object = {_animations: array}; object.getReduceMotionForAnimation = require(dependencyMap[value4]).getReduceMotionForAnimation; object.reduceMotion = r7; closure.__closure = object; closure.__workletHash = 13427604040510; closure.__initData = env1_4; value = Reflect.apply(defineAnimation, moduleValue, [property, closure]); r0 = value; } return r0; function pnpm_sequenceTs2() { // fn#18441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1818:4882, owner: withSequence.pnpm_sequenceTs2, offset: 0x00e8c6b9, size: 85 bytes, params: 1, frame: 12 var environment; const object = {onStart: function(a0, a1) { a0.current = a1; return a1; }, onFrame: function() { return true; }, current: 0, animationIndex: 0}; const value = environment.__proto__.__proto__; object.reduceMotion = (require(1650) /* metro dependency 1650 */).getReduceMotionForAnimation(env0_1); return object; } function pnpm_sequenceTs3() { // fn#18444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1818:5260, owner: withSequence.pnpm_sequenceTs3, offset: 0x00e8c71c, size: 143 bytes, params: 1, frame: 14 const value2 = env0_0.map(function(a0) { var r0; var value = a0; if (typeof value !== 'function') { r0 = value; } else { value = value(); r0 = value; } r0.finished = false; return r0; }); const object = {isHigherOrder: true, onFrame: onFrame_18447, onStart: onStart_18448, animationIndex: 0}; object.current = value2[0].current; object.callback = callback_18450; object.reduceMotion = (require(1650) /* metro dependency 1650 */).getReduceMotionForAnimation(env0_1); return object; function findNextNonReducedMotionAnimationIndex(a0) { // fn#18445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1818:5372, owner: withSequence.pnpm_sequenceTs3.findNextNonReducedMotionAnimationIndex, offset: 0x00e8c7ab, size: 100 bytes, params: 2, frame: 6 var r2; var r0; var reduceMotion; let value = a0; let length = env0_0.length; if (value < length - 1) { reduceMotion = env0_0[value].reduceMotion; if (reduceMotion) { r2 = value; while (true) { value = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; length = env0_0.length; if (!(value < length - 1)) { r0 = value; break; } reduceMotion = env0_0[value].reduceMotion; if (reduceMotion) { r2 = value; continue; } r0 = value; break; } } else { r0 = value; } } else { r0 = value; } return r0; } function pnpm_sequenceTs3OnFrame(a0, a1) { // fn#18447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1818:5506, owner: withSequence.pnpm_sequenceTs3.onFrame, offset: 0x00e8c830, size: 179 bytes, params: 3, frame: 19 var findNextNonReducedMotionAnimationIndexBinding; var property2; const binding = env0_0; let animationIndex = a0.animationIndex; const property = binding[animationIndex]; const value2 = property.onFrame(property, a1); a0.current = property.current; if (value2) { if (property.callback) { property.callback(true); } property.finished = true; findNextNonReducedMotionAnimationIndexBinding = findNextNonReducedMotionAnimationIndex; animationIndex = a0.animationIndex; a0.animationIndex = findNextNonReducedMotionAnimationIndexBinding(animationIndex + 1); animationIndex = a0.animationIndex; if (animationIndex < env0_0.length) { property2 = env0_0[a0.animationIndex]; property2.onStart(property2, property.current, a1, property); return false; } return true; } return false; } function pnpm_sequenceTs3OnStart(a0, a1, a2, a3) { // fn#18448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1818:5835, owner: withSequence.pnpm_sequenceTs3.onStart, offset: 0x00e8c8e3, size: 118 bytes, params: 5, frame: 18 const value = a3; const env0_0 = a0; env0_0.forEach(_fun18449); a0.animationIndex = findNextNonReducedMotionAnimationIndex(0); const r5 = value !== undefined ? value : env0_0[env0_0.length - 1]; const property = env0_0[a0.animationIndex]; property.onStart(property, a1, a2, r5); function _fun18449(a0) { // fn#18449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1818:5872, offset: 0x00e8c959, size: 36 bytes, params: 2, frame: 3 if (a0.reduceMotion === undefined) { a0.reduceMotion = env0_0.reduceMotion; } } } function pnpm_sequenceTs3Callback(a0) { // fn#18450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1818:6126, owner: withSequence.pnpm_sequenceTs3.callback, offset: 0x00e8c97d, size: 38 bytes, params: 2, frame: 11 if (!a0) { a0.forEach(_fun18451); } function _fun18451(a0) { // fn#18451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1818:6161, offset: 0x00e8c9a3, size: 54 bytes, params: 2, frame: 11 if (!(typeof a0.callback !== 'function' || a0.finished)) { a0.callback(env0_0); } } } } } } } global.__d(_fun18438, 1691, [1614, 1650]) /* metro module 1691, dependencies: [1614, 1650] */;