/* Metro module 6328; source: unknown; dependencies: [31, 33, 6282, 1610, 6281, 6278, 6294, 6329] */ function _fun49788(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6506:6, offset: 0x0120841c, size: 191 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = require(31) /* metro dependency 31 */; const memo = value.memo; const env0_3 = value.useMemo; importDefault(31) /* metro dependency 31 */; const env0_4 = (require(33) /* metro dependency 33 */).jsx; object = {code: 'function pnpm_BottomSheetContentTsx1(){const{animatedContainerHeight,INITIAL_CONTAINER_HEIGHT,animatedKeyboardState,animatedKeyboardHeightInContainer,animatedHandleHeight,animatedSheetHeight,keyboardBehavior,KEYBOARD_BEHAVIOR,KEYBOARD_STATE,isInTemporaryPosition}=this.__closure;if(animatedContainerHeight.get()===INITIAL_CONTAINER_HEIGHT){return 0;}const keyboardState=animatedKeyboardState.get();const keyboardHeightInContainer=animatedKeyboardHeightInContainer.get();const handleHeight=Math.max(0,animatedHandleHeight.get());const containerHeight=animatedContainerHeight.get();let contentHeight=animatedSheetHeight.get()-handleHeight;switch(keyboardBehavior){case KEYBOARD_BEHAVIOR.extend:if(keyboardState===KEYBOARD_STATE.SHOWN){contentHeight=contentHeight-keyboardHeightInContainer;}break;case KEYBOARD_BEHAVIOR.fillParent:if(!isInTemporaryPosition.get()){break;}if(keyboardState===KEYBOARD_STATE.SHOWN){contentHeight=containerHeight-handleHeight-keyboardHeightInContainer;}else{contentHeight=containerHeight-handleHeight;}break;case KEYBOARD_BEHAVIOR.interactive:{if(!isInTemporaryPosition.get()){break;}const contentWithKeyboardHeight=contentHeight+keyboardHeightInContainer;if(keyboardState===KEYBOARD_STATE.SHOWN){if(keyboardHeightInContainer+animatedSheetHeight.get()>containerHeight){contentHeight=containerHeight-keyboardHeightInContainer-handleHeight;}}else if(contentWithKeyboardHeight+handleHeight>containerHeight){contentHeight=containerHeight-handleHeight;}else{contentHeight=contentWithKeyboardHeight;}break;}}return Math.max(contentHeight,0);}'}; object = {code: 'function pnpm_BottomSheetContentTsx2(){const{animatedContainerHeight,INITIAL_CONTAINER_HEIGHT,animatedHighestSnapPoint,animatedPosition,overDragResistanceFactor,animatedKeyboardState,KEYBOARD_STATE,animatedKeyboardHeightInContainer}=this.__closure;const containerHeight=animatedContainerHeight.get();if(containerHeight===INITIAL_CONTAINER_HEIGHT){return 0;}const highestSnapPoint=Math.max(animatedHighestSnapPoint.get(),animatedPosition.get());const overDragSafePaddingBottom=Math.sqrt(highestSnapPoint-containerHeight*-1)*overDragResistanceFactor;let paddingBottom=overDragSafePaddingBottom;if(animatedKeyboardState.get()===KEYBOARD_STATE.SHOWN){paddingBottom=overDragSafePaddingBottom+animatedKeyboardHeightInContainer.get();}return paddingBottom;}'}; object = {code: 'function pnpm_BottomSheetContentTsx3(){const{animatedContainerHeight,INITIAL_CONTAINER_HEIGHT,enableDynamicSizing,animatedContentHeight,detached,animatedPaddingBottom,animate,animationConfigs,overrideReduceMotion,animatedContentHeightMax}=this.__closure;if(animatedContainerHeight.get()===INITIAL_CONTAINER_HEIGHT){return{};}if(enableDynamicSizing&&animatedContentHeight.get()===INITIAL_CONTAINER_HEIGHT){return{};}const paddingBottom=detached?0:animatedPaddingBottom.get();return{paddingBottom:animate({point:paddingBottom,configs:animationConfigs,overrideReduceMotion:overrideReduceMotion}),height:animate({point:animatedContentHeightMax.get()+paddingBottom,configs:animationConfigs,overrideReduceMotion:overrideReduceMotion})};}'}; value = memo(BottomSheetContentComponent); value.displayName = 'BottomSheetContent'; exports.BottomSheetContent = value; } function BottomSheetContentComponent({detached, animationConfigs, overrideReduceMotion, keyboardBehavior, accessible, accessibilityLabel, accessibilityHint, accessibilityRole, children}) { // fn#49789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6506:3239, offset: 0x012084db, size: 876 bytes, params: 2, frame: 43 const value2 = (require(6282) /* metro dependency 6282 */).useBottomSheetInternal(); const enableDynamicSizing = value2.enableDynamicSizing; const overDragResistanceFactor = value2.overDragResistanceFactor; const env0_5 = overDragResistanceFactor; const enableContentPanningGesture = value2.enableContentPanningGesture; const animatedPosition = value2.animatedPosition; const env0_6 = animatedPosition; const animatedHandleHeight = value2.animatedHandleHeight; const env0_7 = animatedHandleHeight; const animatedHighestSnapPoint = value2.animatedHighestSnapPoint; const animatedContainerHeight = value2.animatedContainerHeight; const animatedContentHeight = value2.animatedContentHeight; const animatedSheetHeight = value2.animatedSheetHeight; const animatedKeyboardState = value2.animatedKeyboardState; const animatedKeyboardHeightInContainer = value2.animatedKeyboardHeightInContainer; const isInTemporaryPosition = value2.isInTemporaryPosition; const moduleValue2 = require(1610) /* metro dependency 1610 */; let useDerivedValue = moduleValue2.useDerivedValue; let closure = pnpm_BottomSheetContentTsx1; let object2 = {animatedContainerHeight: animatedContainerHeight}; const INITIAL_CONTAINER_HEIGHT = (require(6281) /* metro dependency 6281 */).INITIAL_CONTAINER_HEIGHT; object2.INITIAL_CONTAINER_HEIGHT = INITIAL_CONTAINER_HEIGHT; object2.animatedKeyboardState = animatedKeyboardState; object2.animatedKeyboardHeightInContainer = animatedKeyboardHeightInContainer; object2.animatedHandleHeight = animatedHandleHeight; object2.animatedSheetHeight = animatedSheetHeight; object2.keyboardBehavior = keyboardBehavior; const KEYBOARD_BEHAVIOR = (require(6278) /* metro dependency 6278 */).KEYBOARD_BEHAVIOR; object2.KEYBOARD_BEHAVIOR = KEYBOARD_BEHAVIOR; const KEYBOARD_STATE = (require(6278) /* metro dependency 6278 */).KEYBOARD_STATE; object2.KEYBOARD_STATE = KEYBOARD_STATE; object2.isInTemporaryPosition = isInTemporaryPosition; closure.__closure = object2; closure.__workletHash = 2170474579366; closure.__initData = env0_5; const value3 = Reflect.apply(useDerivedValue, moduleValue2, [closure, [animatedContainerHeight, animatedHandleHeight, animatedKeyboardHeightInContainer, animatedKeyboardState, animatedSheetHeight, isInTemporaryPosition, keyboardBehavior]]); const moduleValue3 = moduleValue2; useDerivedValue = moduleValue3.useDerivedValue; closure = pnpm_BottomSheetContentTsx2; closure.__closure = {animatedContainerHeight: animatedContainerHeight, INITIAL_CONTAINER_HEIGHT: INITIAL_CONTAINER_HEIGHT, animatedHighestSnapPoint: animatedHighestSnapPoint, animatedPosition: animatedPosition, overDragResistanceFactor: overDragResistanceFactor, animatedKeyboardState: animatedKeyboardState, KEYBOARD_STATE: KEYBOARD_STATE, animatedKeyboardHeightInContainer: animatedKeyboardHeightInContainer}; closure.__workletHash = 3484699588399; closure.__initData = env0_6; const value4 = Reflect.apply(useDerivedValue, moduleValue3, [closure, [overDragResistanceFactor, animatedPosition, animatedContainerHeight, animatedHighestSnapPoint, animatedKeyboardState, animatedKeyboardHeightInContainer]]); const moduleValue4 = moduleValue2; const useAnimatedStyle = moduleValue4.useAnimatedStyle; closure = pnpm_BottomSheetContentTsx3; object2 = {animatedContainerHeight: animatedContainerHeight}; object2.INITIAL_CONTAINER_HEIGHT = INITIAL_CONTAINER_HEIGHT; object2.enableDynamicSizing = enableDynamicSizing; object2.animatedContentHeight = animatedContentHeight; object2.detached = detached; object2.animatedPaddingBottom = value4; object2.animate = (require(6294) /* metro dependency 6294 */).animate; object2.animationConfigs = animationConfigs; object2.overrideReduceMotion = overrideReduceMotion; object2.animatedContentHeightMax = value3; closure.__closure = object2; closure.__workletHash = 8203943631786; closure.__initData = env0_7; return ((Component) => {children})(enableContentPanningGesture ? importDefault(6329) /* metro dependency 6329 */ : (importDefault(1610) /* metro dependency 1610 */).View); } function pnpm_BottomSheetContentTsx1() { // fn#49790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6506:3857, owner: BottomSheetContentComponent.pnpm_BottomSheetContentTsx1, offset: 0x01208847, size: 512 bytes, params: 1, frame: 24 const KEYBOARD_STATE = (require(6278) /* metro dependency 6278 */).KEYBOARD_STATE; const animatedContainerHeightBinding = animatedContainerHeight; let get = animatedContainerHeightBinding.get; const value2 = Reflect.apply(get, animatedContainerHeightBinding, []); const INITIAL_CONTAINER_HEIGHT = (require(6281) /* metro dependency 6281 */).INITIAL_CONTAINER_HEIGHT; if (value2 === INITIAL_CONTAINER_HEIGHT) { return 0; } const value4 = animatedKeyboardState.get(); const value5 = animatedKeyboardHeightInContainer.get(); let Math = global.Math; const value7 = Math.max(0, animatedHandleHeight.get()); const value8 = animatedContainerHeight.get(); const animatedSheetHeightBinding = animatedSheetHeight; get = animatedSheetHeightBinding.get; const value9 = Reflect.apply(get, animatedSheetHeightBinding, []) - value7; const keyboardBehaviorBinding = keyboardBehavior; const KEYBOARD_BEHAVIOR = (require(6278) /* metro dependency 6278 */).KEYBOARD_BEHAVIOR; const r2 = KEYBOARD_BEHAVIOR.extend === keyboardBehaviorBinding ? value4 !== KEYBOARD_STATE.SHOWN ? value9 : value9 - value5 : KEYBOARD_BEHAVIOR.fillParent === keyboardBehaviorBinding ? isInTemporaryPosition.get() ? value4 === KEYBOARD_STATE.SHOWN ? value8 - value7 - value5 : value8 - value7 : value9 : KEYBOARD_BEHAVIOR.interactive !== keyboardBehaviorBinding ? value9 : isInTemporaryPosition.get() ? value4 === KEYBOARD_STATE.SHOWN ? value5 + animatedSheetHeight.get() > value8 ? value8 - value5 - value7 : value9 : value9 + value5 + value7 > value8 ? value8 - value7 : value9 + value5 : value9; Math = global.Math; return Math.max(r2, 0); } function pnpm_BottomSheetContentTsx2() { // fn#49791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6506:4810, owner: BottomSheetContentComponent.pnpm_BottomSheetContentTsx2, offset: 0x01208a47, size: 213 bytes, params: 1, frame: 19 const animatedContainerHeightBinding = animatedContainerHeight; let get = animatedContainerHeightBinding.get; const value2 = Reflect.apply(get, animatedContainerHeightBinding, []); const INITIAL_CONTAINER_HEIGHT = (require(6281) /* metro dependency 6281 */).INITIAL_CONTAINER_HEIGHT; if (value2 === INITIAL_CONTAINER_HEIGHT) { return 0; } let Math = global.Math; const max = Math.max; const value4 = animatedHighestSnapPoint.get(); const animatedPositionBinding = animatedPosition; get = animatedPositionBinding.get; const value5 = Reflect.apply(max, Math, [value4, Reflect.apply(get, animatedPositionBinding, [])]); Math = global.Math; const value7 = Math.sqrt(value5 - -1 * value2) * overDragResistanceFactor; const value8 = animatedKeyboardState.get(); const KEYBOARD_STATE = (require(6278) /* metro dependency 6278 */).KEYBOARD_STATE; const SHOWN = KEYBOARD_STATE.SHOWN; return value8 !== SHOWN ? value7 : value7 + animatedKeyboardHeightInContainer.get(); } function pnpm_BottomSheetContentTsx3() { // fn#49792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6506:5397, owner: BottomSheetContentComponent.pnpm_BottomSheetContentTsx3, offset: 0x01208b1c, size: 257 bytes, params: 1, frame: 21 const animatedContainerHeightBinding = animatedContainerHeight; let get = animatedContainerHeightBinding.get; const value2 = Reflect.apply(get, animatedContainerHeightBinding, []); const INITIAL_CONTAINER_HEIGHT = (require(6281) /* metro dependency 6281 */).INITIAL_CONTAINER_HEIGHT; if (value2 === INITIAL_CONTAINER_HEIGHT) { return {}; } if (enableDynamicSizing) { if (animatedContentHeight.get() === INITIAL_CONTAINER_HEIGHT) { return {}; } } const r7 = detached ? 0 : env0_16.get(); const object2 = {}; const moduleValue = require(6294) /* metro dependency 6294 */; let animate = moduleValue.animate; const animationConfigsBinding = animationConfigs; const overrideReduceMotionBinding = overrideReduceMotion; object2.paddingBottom = Reflect.apply(animate, moduleValue, [{point: r7, configs: animationConfigsBinding, overrideReduceMotion: overrideReduceMotionBinding}]); const moduleValue2 = moduleValue; animate = moduleValue2.animate; const binding = env0_15; get = binding.get; object2.height = Reflect.apply(animate, moduleValue2, [{point: Reflect.apply(get, binding, []) + r7, configs: animationConfigsBinding, overrideReduceMotion: overrideReduceMotionBinding}]); return object2; } function _fun49793() { // fn#49793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6506:6068, offset: 0x01208c1d, size: 56 bytes, params: 1, frame: 4 const detachedBinding = detached; const object2 = {}; if (detachedBinding) { object2.overflow = 'visible'; } else { object2.overflow = 'hidden'; } return [object2, env0_17]; }