1031 lines
64 KiB
React
1031 lines
64 KiB
React
// Metro module 5248 (f5249).
|
|
import * as _Module19 from "react";
|
|
import { useCallback, useEffect, useImperativeHandle, useMemo } from "react";
|
|
import { Platform, StyleSheet } from "react-native";
|
|
import * as _Module1606 from "./Module1606";
|
|
import Module1606, { useDerivedValue, useSharedValue, useReducedMotion, ReduceMotion, useWorkletCallback } from "./Module1606";
|
|
import * as _Module5249 from "./Module5249";
|
|
import { INITIAL_POSITION, DEFAULT_KEYBOARD_INCLUDE_BOTTOM_OFFSET, DEFAULT_ACCESSIBLE, DEFAULT_ACCESSIBILITY_LABEL, DEFAULT_ACCESSIBILITY_ROLE, INITIAL_CONTAINER_OFFSET } from "./Module5249";
|
|
import { useReactiveSharedValue, useAnimatedSnapPoints, useScrollable, useKeyboard, useStableCallback } from "./Module5250";
|
|
import * as _Module5273 from "./Module5273";
|
|
import * as _Module5246 from "./Module5246";
|
|
import { SNAP_POINT_TYPE } from "./Module5246";
|
|
import * as _Module5262 from "./Module5262";
|
|
import Module38 from "./Module38";
|
|
import { BottomSheetProvider, BottomSheetInternalProvider } from "./Module5256";
|
|
import Module5367 from "./Module5367";
|
|
import { BottomSheetHostingContainer } from "./Module5369";
|
|
import { BottomSheetBody } from "./Module5372";
|
|
import * as _Module5374 from "./Module5374";
|
|
import { BottomSheetContent } from "./Module5378";
|
|
import { BottomSheetFooterContainer } from "./Module5381";
|
|
import * as _Module5385 from "./Module5385";
|
|
const { forwardRef, memo: memo2 } = _Module19;
|
|
Module1606.addWhitelistedUIProps({
|
|
decelerationRate: true
|
|
});
|
|
const __initData = {
|
|
code: "function pnpm_BottomSheetTsx1(){const{topInset,bottomInset,$modal,_animatedContainerHeight}=this.__closure;const verticalInset=topInset+bottomInset;return $modal?_animatedContainerHeight.value-verticalInset:_animatedContainerHeight.value;}"
|
|
};
|
|
const __initData2 = {
|
|
code: "function pnpm_BottomSheetTsx2(){const{animatedSnapPoints}=this.__closure;return animatedSnapPoints.value[animatedSnapPoints.value.length-1];}"
|
|
};
|
|
const __initData3 = {
|
|
code: "function pnpm_BottomSheetTsx3(){const{animatedContainerHeight,$modal,detached,bottomInset}=this.__closure;let closedPosition=animatedContainerHeight.value;if($modal||detached){closedPosition=animatedContainerHeight.value+bottomInset;}return closedPosition;}"
|
|
};
|
|
const __initData4 = {
|
|
code: "function pnpm_BottomSheetTsx4(){const{animatedContainerHeight,animatedHighestSnapPoint}=this.__closure;return animatedContainerHeight.value-animatedHighestSnapPoint.value;}"
|
|
};
|
|
const __initData5 = {
|
|
code: "function pnpm_BottomSheetTsx5(){const{_providedContainerHeight,animatedContainerHeight,INITIAL_CONTAINER_HEIGHT,handleComponent,animatedHandleHeight,INITIAL_HANDLE_HEIGHT,animatedSnapPoints,INITIAL_SNAP_POINT}=this.__closure;let isContainerHeightCalculated=false;if(_providedContainerHeight!==null||_providedContainerHeight!==undefined){isContainerHeightCalculated=true;}if(animatedContainerHeight.value!==INITIAL_CONTAINER_HEIGHT){isContainerHeightCalculated=true;}let isHandleHeightCalculated=false;if(handleComponent===null){animatedHandleHeight.value=0;isHandleHeightCalculated=true;}if(animatedHandleHeight.value!==INITIAL_HANDLE_HEIGHT){isHandleHeightCalculated=true;}let isSnapPointsNormalized=false;if(animatedSnapPoints.value[0]!==INITIAL_SNAP_POINT){isSnapPointsNormalized=true;}return isContainerHeightCalculated&&isHandleHeightCalculated&&isSnapPointsNormalized;}"
|
|
};
|
|
const __initData6 = {
|
|
code: "function pnpm_BottomSheetTsx6(){const{AnimatedPosition,animatedClosedPosition,SHEET_STATE,animatedContainerHeight,animatedSheetHeight,animatedKeyboardHeightInContainer,keyboardBehavior,KEYBOARD_BEHAVIOR,isInTemporaryPosition}=this.__closure;if(AnimatedPosition.value>=animatedClosedPosition.value){return SHEET_STATE.CLOSED;}const extendedPosition=animatedContainerHeight.value-animatedSheetHeight.value;if(AnimatedPosition.value===extendedPosition){return SHEET_STATE.EXTENDED;}const keyboardHeightInContainer=animatedKeyboardHeightInContainer.value;const extendedPositionWithKeyboard=Math.max(0,animatedContainerHeight.value-(animatedSheetHeight.value+keyboardHeightInContainer));if(keyboardBehavior===KEYBOARD_BEHAVIOR.interactive&&isInTemporaryPosition.value&&AnimatedPosition.value===extendedPositionWithKeyboard){return SHEET_STATE.EXTENDED;}if(AnimatedPosition.value===0){return SHEET_STATE.FILL_PARENT;}if(AnimatedPosition.value<extendedPosition){return SHEET_STATE.OVER_EXTENDED;}return SHEET_STATE.OPENED;}"
|
|
};
|
|
const __initData7 = {
|
|
code: "function pnpm_BottomSheetTsx7(){const{enableContentPanningGesture,SCROLLABLE_STATE,animatedScrollableOverrideState,animatedSheetState,SHEET_STATE,animatedKeyboardState,KEYBOARD_STATE,animatedAnimationState,ANIMATION_STATE}=this.__closure;if(!enableContentPanningGesture){return SCROLLABLE_STATE.UNLOCKED;}if(animatedScrollableOverrideState.value!==SCROLLABLE_STATE.UNDETERMINED){return animatedScrollableOverrideState.value;}if(animatedSheetState.value===SHEET_STATE.FILL_PARENT){return SCROLLABLE_STATE.UNLOCKED;}if(animatedSheetState.value===SHEET_STATE.EXTENDED){return SCROLLABLE_STATE.UNLOCKED;}if(animatedKeyboardState.value===KEYBOARD_STATE.SHOWN&&animatedAnimationState.value===ANIMATION_STATE.RUNNING){return SCROLLABLE_STATE.UNLOCKED;}return SCROLLABLE_STATE.LOCKED;}"
|
|
};
|
|
const __initData8 = {
|
|
code: "function pnpm_BottomSheetTsx8(){const{animatedSnapPoints,animatedContainerHeight,isLayoutCalculated,interpolate,AnimatedPosition,Extrapolation,android_keyboardInputMode,KEYBOARD_INPUT_MODE,animatedAnimationSource,ANIMATION_SOURCE,animatedAnimationState,ANIMATION_STATE,isInTemporaryPosition,animatedCurrentIndex,animatedNextPositionIndex}=this.__closure;const adjustedSnapPoints=animatedSnapPoints.value.slice().reverse();const adjustedSnapPointsIndexes=animatedSnapPoints.value.slice().map(function(_,index){return index;}).reverse();adjustedSnapPoints.push(animatedContainerHeight.value);adjustedSnapPointsIndexes.push(-1);const currentIndex=isLayoutCalculated.value?interpolate(AnimatedPosition.value,adjustedSnapPoints,adjustedSnapPointsIndexes,Extrapolation.CLAMP):-1;if(android_keyboardInputMode===KEYBOARD_INPUT_MODE.adjustResize&&animatedAnimationSource.value===ANIMATION_SOURCE.KEYBOARD&&animatedAnimationState.value===ANIMATION_STATE.RUNNING&&isInTemporaryPosition.value){return Math.max(animatedCurrentIndex.value,currentIndex);}if(animatedAnimationSource.value===ANIMATION_SOURCE.SNAP_POINT_CHANGE&&animatedAnimationState.value===ANIMATION_STATE.RUNNING){return animatedNextPositionIndex.value;}return currentIndex;}"
|
|
};
|
|
const __initData9 = {
|
|
code: "function pnpm_BottomSheetTsx9(){const{cancelAnimation,AnimatedPosition,animatedAnimationSource,ANIMATION_SOURCE,animatedAnimationState,ANIMATION_STATE}=this.__closure;cancelAnimation(AnimatedPosition);animatedAnimationSource.value=ANIMATION_SOURCE.NONE;animatedAnimationState.value=ANIMATION_STATE.STOPPED;}"
|
|
};
|
|
const __initData10 = {
|
|
code: "function animateToPositionCompleted_Pnpm_BottomSheetTsx10(isFinished){const{__DEV__,runOnJS,print,animatedCurrentIndex,animatedNextPosition,animatedNextPositionIndex,animatedAnimationSource,ANIMATION_SOURCE,isAnimatedOnMount,isForcedClosing,animatedAnimationState,ANIMATION_STATE,INITIAL_VALUE,animatedContainerHeightDidChange}=this.__closure;if(!isFinished){return;}if(__DEV__){runOnJS(print)({component:'BottomSheet',method:'animateToPositionCompleted',params:{animatedCurrentIndex:animatedCurrentIndex.value,animatedNextPosition:animatedNextPosition.value,animatedNextPositionIndex:animatedNextPositionIndex.value}});}if(animatedAnimationSource.value===ANIMATION_SOURCE.MOUNT){isAnimatedOnMount.value=true;}isForcedClosing.value=false;animatedAnimationSource.value=ANIMATION_SOURCE.NONE;animatedAnimationState.value=ANIMATION_STATE.STOPPED;animatedNextPosition.value=INITIAL_VALUE;animatedNextPositionIndex.value=INITIAL_VALUE;animatedContainerHeightDidChange.value=false;}"
|
|
};
|
|
const __initData11 = {
|
|
code: "function animateToPosition_Pnpm_BottomSheetTsx11(position,source,velocity=0,configs){const{__DEV__,runOnJS,print,AnimatedPosition,animatedAnimationState,ANIMATION_STATE,animatedNextPosition,stopAnimation,animatedAnimationSource,animatedKeyboardState,KEYBOARD_STATE,keyboardBehavior,KEYBOARD_BEHAVIOR,animatedKeyboardHeightInContainer,animatedNextPositionIndex,animatedSnapPoints,handleOnAnimate,animate,_providedAnimationConfigs,_providedOverrideReduceMotion,animateToPositionCompleted}=this.__closure;if(__DEV__){runOnJS(print)({component:'BottomSheet',method:'animateToPosition',params:{currentPosition:AnimatedPosition.value,nextPosition:position,source:source}});}if(position===AnimatedPosition.value||position===undefined||animatedAnimationState.value===ANIMATION_STATE.RUNNING&&position===animatedNextPosition.value){return;}if(animatedAnimationState.value===ANIMATION_STATE.RUNNING){stopAnimation();}animatedAnimationState.value=ANIMATION_STATE.RUNNING;animatedAnimationSource.value=source;animatedNextPosition.value=position;let offset=0;if(animatedKeyboardState.value===KEYBOARD_STATE.SHOWN&&keyboardBehavior!==KEYBOARD_BEHAVIOR.extend&&position<AnimatedPosition.value){offset=animatedKeyboardHeightInContainer.value;}animatedNextPositionIndex.value=animatedSnapPoints.value.indexOf(position+offset);runOnJS(handleOnAnimate)(animatedNextPositionIndex.value,position,source);AnimatedPosition.value=animate({point:position,configs:configs||_providedAnimationConfigs,velocity:velocity,overrideReduceMotion:_providedOverrideReduceMotion,onComplete:animateToPositionCompleted});}"
|
|
};
|
|
const __initData12 = {
|
|
code: "function setToPosition_Pnpm_BottomSheetTsx12(targetPosition){const setToPosition_Pnpm_BottomSheetTsx12=this._recur;const{AnimatedPosition,animatedAnimationState,ANIMATION_STATE,animatedNextPosition,__DEV__,runOnJS,print,BottomSheet,animatedNextPositionIndex,animatedSnapPoints,stopAnimation,animatedContainerHeightDidChange}=this.__closure;if(targetPosition===AnimatedPosition.value||targetPosition===undefined||animatedAnimationState.value===ANIMATION_STATE.RUNNING&&targetPosition===animatedNextPosition.value){return;}if(__DEV__){runOnJS(print)({component:BottomSheet.name,method:setToPosition_Pnpm_BottomSheetTsx12.name,params:{currentPosition:AnimatedPosition.value,targetPosition:targetPosition}});}animatedNextPosition.value=targetPosition;animatedNextPositionIndex.value=animatedSnapPoints.value.indexOf(targetPosition);stopAnimation();AnimatedPosition.value=targetPosition;animatedContainerHeightDidChange.value=false;}"
|
|
};
|
|
const __initData13 = {
|
|
code: "function getEvaluatedPosition_Pnpm_BottomSheetTsx13(source){const{animatedCurrentIndex,animatedSnapPoints,animatedKeyboardState,animatedHighestSnapPoint,ANIMATION_SOURCE,keyboardBlurBehavior,KEYBOARD_BLUR_BEHAVIOR,KEYBOARD_STATE,animatedContentGestureState,State,animatedHandleGestureState,isInTemporaryPosition,keyboardBehavior,KEYBOARD_BEHAVIOR,Platform,android_keyboardInputMode,animatedKeyboardHeightInContainer,AnimatedPosition,isAnimatedOnMount,_providedIndex,animatedClosedPosition}=this.__closure;const currentIndex=animatedCurrentIndex.value;const snapPoints=animatedSnapPoints.value;const keyboardState=animatedKeyboardState.value;const highestSnapPoint=animatedHighestSnapPoint.value;if(source===ANIMATION_SOURCE.KEYBOARD&&keyboardBlurBehavior===KEYBOARD_BLUR_BEHAVIOR.restore&&keyboardState===KEYBOARD_STATE.HIDDEN&&animatedContentGestureState.value!==State.ACTIVE&&animatedHandleGestureState.value!==State.ACTIVE){isInTemporaryPosition.value=false;const nextPosition=snapPoints[currentIndex];return nextPosition;}if(keyboardBehavior===KEYBOARD_BEHAVIOR.extend&&keyboardState===KEYBOARD_STATE.SHOWN){return highestSnapPoint;}if(keyboardBehavior===KEYBOARD_BEHAVIOR.fillParent&&keyboardState===KEYBOARD_STATE.SHOWN){isInTemporaryPosition.value=true;return 0;}if(keyboardBehavior===KEYBOARD_BEHAVIOR.interactive&&keyboardState===KEYBOARD_STATE.SHOWN&&!(Platform.OS==='android'&&android_keyboardInputMode==='adjustResize')){isInTemporaryPosition.value=true;const keyboardHeightInContainer=animatedKeyboardHeightInContainer.value;return Math.max(0,highestSnapPoint-keyboardHeightInContainer);}if(isInTemporaryPosition.value){return AnimatedPosition.value;}if(!isAnimatedOnMount.value){return _providedIndex===-1?animatedClosedPosition.value:snapPoints[_providedIndex];}return snapPoints[currentIndex];}"
|
|
};
|
|
const __initData14 = {
|
|
code: "function evaluatePosition_Pnpm_BottomSheetTsx14(source,animationConfigs){const{isForcedClosing,ANIMATION_SOURCE,isLayoutCalculated,getEvaluatedPosition,isAnimatedOnMount,animateOnMount,animateToPosition,setToPosition,animatedAnimationState,ANIMATION_STATE,animatedNextPositionIndex,isInTemporaryPosition,animatedClosedPosition,animatedCurrentIndex,animatedSnapPoints,animatedIndex,reduceMotion,AnimatedPosition,animatedContainerHeightDidChange}=this.__closure;if(isForcedClosing.value&&source!==ANIMATION_SOURCE.USER){return;}if(!isLayoutCalculated.value){return;}const proposedPosition=getEvaluatedPosition(source);if(!isAnimatedOnMount.value){if(animateOnMount){animateToPosition(proposedPosition,ANIMATION_SOURCE.MOUNT,undefined,animationConfigs);}else{setToPosition(proposedPosition);isAnimatedOnMount.value=true;}return;}if(animatedAnimationState.value===ANIMATION_STATE.RUNNING){if(animatedNextPositionIndex.value===-1&&!isInTemporaryPosition.value){setToPosition(animatedClosedPosition.value);return;}if(animatedNextPositionIndex.value!==animatedCurrentIndex.value){animateToPosition(animatedSnapPoints.value[animatedNextPositionIndex.value],source,undefined,animationConfigs);return;}}if(animatedAnimationState.value!==ANIMATION_STATE.RUNNING&&animatedIndex.value===-1){if(reduceMotion&&animatedSnapPoints.value[animatedIndex.value]!==AnimatedPosition.value){return;}setToPosition(animatedClosedPosition.value);return;}if(animatedContainerHeightDidChange.value){setToPosition(proposedPosition);return;}animateToPosition(proposedPosition,source,undefined,animationConfigs);}"
|
|
};
|
|
const __initData15 = {
|
|
code: "function handleSnapToPosition_Pnpm_BottomSheetTsx15(position,animationConfigs){const handleSnapToPosition_Pnpm_BottomSheetTsx15=this._recur;const{__DEV__,print,BottomSheet,normalizeSnapPoint,animatedContainerHeight,isLayoutCalculated,animatedNextPosition,isForcedClosing,isInTemporaryPosition,runOnUI,animateToPosition,ANIMATION_SOURCE}=this.__closure;if(__DEV__){print({component:BottomSheet.name,method:handleSnapToPosition_Pnpm_BottomSheetTsx15.name,params:{position:position}});}const nextPosition=normalizeSnapPoint(position,animatedContainerHeight.value);if(!isLayoutCalculated||nextPosition===animatedNextPosition.value||isForcedClosing.value){return;}isInTemporaryPosition.value=true;runOnUI(animateToPosition)(nextPosition,ANIMATION_SOURCE.USER,0,animationConfigs);}"
|
|
};
|
|
const __initData16 = {
|
|
code: "function pnpm_BottomSheetTsx16(){const{animatedContainerHeight}=this.__closure;return animatedContainerHeight.value;}"
|
|
};
|
|
const __initData17 = {
|
|
code: "function pnpm_BottomSheetTsx17(result,previous){const{INITIAL_CONTAINER_HEIGHT,animatedContainerHeightDidChange,animatedAnimationState,ANIMATION_STATE,animatedAnimationSource,ANIMATION_SOURCE,animatedNextPositionIndex,animateToPosition,animatedClosedPosition}=this.__closure;if(result===INITIAL_CONTAINER_HEIGHT){return;}animatedContainerHeightDidChange.value=result!==previous;if(animatedAnimationState.value===ANIMATION_STATE.RUNNING&&animatedAnimationSource.value===ANIMATION_SOURCE.GESTURE&&animatedNextPositionIndex.value===-1){animateToPosition(animatedClosedPosition.value,ANIMATION_SOURCE.GESTURE);}}"
|
|
};
|
|
const __initData18 = {
|
|
code: "function pnpm_BottomSheetTsx18(){const{animatedSnapPoints}=this.__closure;return animatedSnapPoints.value;}"
|
|
};
|
|
const __initData19 = {
|
|
code: "function pnpm_BottomSheetTsx19(result,previous){const{isAnimatedOnMount,isLayoutCalculated,__DEV__,runOnJS,print,evaluatePosition,ANIMATION_SOURCE}=this.__closure;if(JSON.stringify(result)===JSON.stringify(previous)&&isAnimatedOnMount.value){return;}if(!isLayoutCalculated.value){return;}if(__DEV__){runOnJS(print)({component:'BottomSheet',method:'useAnimatedReaction::OnSnapPointChange',category:'effect',params:{result:result}});}evaluatePosition(ANIMATION_SOURCE.SNAP_POINT_CHANGE);}"
|
|
};
|
|
const __initData20 = {
|
|
code: "function pnpm_BottomSheetTsx20(){const{animatedKeyboardState,animatedKeyboardHeight}=this.__closure;return{_keyboardState:animatedKeyboardState.value,_keyboardHeight:animatedKeyboardHeight.value};}"
|
|
};
|
|
const __initData21 = {
|
|
code: "function pnpm_BottomSheetTsx21(result,_previousResult){const{KEYBOARD_STATE,animatedAnimationState,ANIMATION_STATE,animatedAnimationSource,ANIMATION_SOURCE,__DEV__,runOnJS,print,BottomSheet,animatedKeyboardHeightInContainer,$modal,bottomInset,animatedContainerOffset,Platform,android_keyboardInputMode,KEYBOARD_INPUT_MODE,keyboardBehavior,KEYBOARD_BEHAVIOR,animatedContentGestureState,State,animatedHandleGestureState,keyboardBlurBehavior,KEYBOARD_BLUR_BEHAVIOR,getKeyboardAnimationConfigs,keyboardAnimationEasing,keyboardAnimationDuration,evaluatePosition}=this.__closure;const{_keyboardState:_keyboardState,_keyboardHeight:_keyboardHeight}=result;const _previousKeyboardState=_previousResult===null||_previousResult===void 0?void 0:_previousResult._keyboardState;const _previousKeyboardHeight=_previousResult===null||_previousResult===void 0?void 0:_previousResult._keyboardHeight;if(_keyboardState===_previousKeyboardState&&_keyboardHeight===_previousKeyboardHeight){return;}if(_keyboardState===KEYBOARD_STATE.UNDETERMINED){return;}if(_keyboardState===KEYBOARD_STATE.HIDDEN&&animatedAnimationState.value===ANIMATION_STATE.RUNNING&&animatedAnimationSource.value===ANIMATION_SOURCE.GESTURE){return;}if(__DEV__){runOnJS(print)({component:BottomSheet.name,method:'useAnimatedReaction::OnKeyboardStateChange',category:'effect',params:{keyboardState:_keyboardState,keyboardHeight:_keyboardHeight}});}animatedKeyboardHeightInContainer.value=_keyboardHeight===0?0:$modal?Math.abs(_keyboardHeight-Math.abs(bottomInset-animatedContainerOffset.value.bottom)):Math.abs(_keyboardHeight-animatedContainerOffset.value.bottom);if(Platform.OS==='android'&&android_keyboardInputMode===KEYBOARD_INPUT_MODE.adjustResize){animatedKeyboardHeightInContainer.value=0;if(keyboardBehavior===KEYBOARD_BEHAVIOR.interactive){return;}}const hasActiveGesture=animatedContentGestureState.value===State.ACTIVE||animatedContentGestureState.value===State.BEGAN||animatedHandleGestureState.value===State.ACTIVE||animatedHandleGestureState.value===State.BEGAN;if(hasActiveGesture){return;}if(_keyboardState===KEYBOARD_STATE.HIDDEN&&keyboardBlurBehavior===KEYBOARD_BLUR_BEHAVIOR.none){return;}const animationConfigs=getKeyboardAnimationConfigs(keyboardAnimationEasing.value,keyboardAnimationDuration.value);evaluatePosition(ANIMATION_SOURCE.KEYBOARD,animationConfigs);}"
|
|
};
|
|
const __initData22 = {
|
|
code: "function pnpm_BottomSheetTsx22(){const{AnimatedPosition}=this.__closure;return AnimatedPosition.value;}"
|
|
};
|
|
const __initData23 = {
|
|
code: "function pnpm_BottomSheetTsx23(_animatedPosition){const{_providedAnimatedPosition,topInset}=this.__closure;if(_providedAnimatedPosition){_providedAnimatedPosition.value=_animatedPosition+topInset;}}"
|
|
};
|
|
const __initData24 = {
|
|
code: "function pnpm_BottomSheetTsx24(){const{animatedIndex}=this.__closure;return animatedIndex.value;}"
|
|
};
|
|
const __initData25 = {
|
|
code: "function pnpm_BottomSheetTsx25(_animatedIndex){const{_providedAnimatedIndex}=this.__closure;if(_providedAnimatedIndex){_providedAnimatedIndex.value=_animatedIndex;}}"
|
|
};
|
|
const __initData26 = {
|
|
code: "function pnpm_BottomSheetTsx26(){const{animatedIndex,AnimatedPosition,animatedAnimationState,animatedContentGestureState,animatedHandleGestureState}=this.__closure;return{_animatedIndex:animatedIndex.value,_animatedPosition:AnimatedPosition.value,_animationState:animatedAnimationState.value,_contentGestureState:animatedContentGestureState.value,_handleGestureState:animatedHandleGestureState.value};}"
|
|
};
|
|
const __initData27 = {
|
|
code: "function pnpm_BottomSheetTsx27({_animatedIndex:_animatedIndex,_animatedPosition:_animatedPosition,_animationState:_animationState,_contentGestureState:_contentGestureState,_handleGestureState:_handleGestureState}){const{ANIMATION_STATE,animatedNextPosition,INITIAL_VALUE,animatedNextPositionIndex,State,reduceMotion,animatedCurrentIndex,animatedSnapPoints,__DEV__,runOnJS,print,BottomSheet,handleOnChange,_providedOnClose}=this.__closure;if(_animationState!==ANIMATION_STATE.STOPPED){return;}if(animatedNextPosition.value!==INITIAL_VALUE&&animatedNextPositionIndex.value!==INITIAL_VALUE&&(_animatedPosition!==animatedNextPosition.value||_animatedIndex!==animatedNextPositionIndex.value)){return;}if(_animatedIndex%1!==0){return;}const hasNoActiveGesture=(_contentGestureState===State.END||_contentGestureState===State.UNDETERMINED||_contentGestureState===State.CANCELLED)&&(_handleGestureState===State.END||_handleGestureState===State.UNDETERMINED||_handleGestureState===State.CANCELLED);if(!hasNoActiveGesture){return;}if(reduceMotion&&_animatedIndex===animatedCurrentIndex.value&&animatedSnapPoints.value[_animatedIndex]!==_animatedPosition){return;}if(_animatedIndex!==animatedCurrentIndex.value){if(__DEV__){runOnJS(print)({component:BottomSheet.name,method:'useAnimatedReaction::OnChange',category:'effect',params:{animatedCurrentIndex:animatedCurrentIndex.value,animatedIndex:_animatedIndex}});}animatedCurrentIndex.value=_animatedIndex;runOnJS(handleOnChange)(_animatedIndex,_animatedPosition);}if(_animatedIndex===-1&&_providedOnClose){if(__DEV__){runOnJS(print)({component:BottomSheet.name,method:'useAnimatedReaction::onClose',category:'effect',params:{animatedCurrentIndex:animatedCurrentIndex.value,animatedIndex:_animatedIndex}});}runOnJS(_providedOnClose)();}}"
|
|
};
|
|
const BottomSheet = function BottomSheet(props, a1) {
|
|
let derivedValue, reactiveSharedValue2, reactiveSharedValue3, sharedValue, sharedValue2, c14776_37, derivedValue2, derivedValue3, derivedValue4, reactiveSharedValue4, sharedValue3, sharedValue4, sharedValue5, sharedValue6, sharedValue7, derivedValue5, sharedValue8, sharedValue9, sharedValue10, sharedValue11, sharedValue12, animatedScrollableType, animatedScrollableContentOffsetY, animatedScrollableOverrideState, isScrollableRefreshable, setScrollableRef, removeScrollableRef, state, height, animationDuration, animationEasing, shouldHandleKeyboardEvents, sharedValue13, reducedMotion, memo, sharedValue14, sharedValue15, derivedValue6, derivedValue7, derivedValue8, callback, callback2, workletCallback, workletCallback2, workletCallback3, workletCallback4, workletCallback5, workletCallback6, stableCallback, workletCallback7, callback3, callback4, callback5, callback6;
|
|
const { animationConfigs, index = 0, snapPoints, initialPosition = INITIAL_POSITION, animateOnMount = _Module5249.DEFAULT_ANIMATE_ON_MOUNT } = props;
|
|
const DEFAULT_ANIMATE_ON_MOUNT = animateOnMount;
|
|
let enableContentPanningGesture = props.enableContentPanningGesture;
|
|
if (enableContentPanningGesture === void 0) {
|
|
enableContentPanningGesture = _Module5249.DEFAULT_ENABLE_CONTENT_PANNING_GESTURE;
|
|
}
|
|
const DEFAULT_ENABLE_CONTENT_PANNING_GESTURE = enableContentPanningGesture;
|
|
const { enableHandlePanningGesture, enableOverDrag = _Module5249.DEFAULT_ENABLE_OVER_DRAG } = props;
|
|
const DEFAULT_ENABLE_OVER_DRAG = enableOverDrag;
|
|
let enablePanDownToClose = props.enablePanDownToClose;
|
|
if (enablePanDownToClose === void 0) {
|
|
enablePanDownToClose = _Module5249.DEFAULT_ENABLE_PAN_DOWN_TO_CLOSE;
|
|
}
|
|
const DEFAULT_ENABLE_PAN_DOWN_TO_CLOSE = enablePanDownToClose;
|
|
let enableDynamicSizing = props.enableDynamicSizing;
|
|
if (enableDynamicSizing === void 0) {
|
|
enableDynamicSizing = _Module5249.DEFAULT_DYNAMIC_SIZING;
|
|
}
|
|
const DEFAULT_DYNAMIC_SIZING = enableDynamicSizing;
|
|
let overDragResistanceFactor = props.overDragResistanceFactor;
|
|
if (overDragResistanceFactor === void 0) {
|
|
overDragResistanceFactor = _Module5249.DEFAULT_OVER_DRAG_RESISTANCE_FACTOR;
|
|
}
|
|
const DEFAULT_OVER_DRAG_RESISTANCE_FACTOR = overDragResistanceFactor;
|
|
const { overrideReduceMotion, style, containerStyle, backgroundStyle, handleStyle, handleIndicatorStyle, gestureEventsHandlersHook, keyboardBehavior = _Module5249.DEFAULT_KEYBOARD_BEHAVIOR } = props;
|
|
const DEFAULT_KEYBOARD_BEHAVIOR = keyboardBehavior;
|
|
let keyboardBlurBehavior = props.keyboardBlurBehavior;
|
|
if (keyboardBlurBehavior === void 0) {
|
|
keyboardBlurBehavior = _Module5249.DEFAULT_KEYBOARD_BLUR_BEHAVIOR;
|
|
}
|
|
const DEFAULT_KEYBOARD_BLUR_BEHAVIOR = keyboardBlurBehavior;
|
|
let android_keyboardInputMode = props.android_keyboardInputMode;
|
|
if (android_keyboardInputMode === void 0) {
|
|
android_keyboardInputMode = _Module5249.DEFAULT_KEYBOARD_INPUT_MODE;
|
|
}
|
|
const DEFAULT_KEYBOARD_INPUT_MODE = android_keyboardInputMode;
|
|
let enableBlurKeyboardOnGesture = props.enableBlurKeyboardOnGesture;
|
|
if (enableBlurKeyboardOnGesture === void 0) {
|
|
enableBlurKeyboardOnGesture = _Module5249.DEFAULT_ENABLE_BLUR_KEYBOARD_ON_GESTURE;
|
|
}
|
|
const DEFAULT_ENABLE_BLUR_KEYBOARD_ON_GESTURE = enableBlurKeyboardOnGesture;
|
|
const { keyboardIncludeBottomOffset = DEFAULT_KEYBOARD_INCLUDE_BOTTOM_OFFSET, containerHeight } = props;
|
|
let containerOffset = props.containerOffset;
|
|
const { topInset = 0, bottomInset = 0, maxDynamicContentSize } = props;
|
|
let contentHeight = props.contentHeight;
|
|
let handleHeight = props.handleHeight;
|
|
const { AnimatedPosition, animatedIndex, simultaneousHandlers, waitFor, activeOffsetX, activeOffsetY, failOffsetX, failOffsetY, onChange, onClose, onAnimate, $modal: _modal = false, detached = false, handleComponent, backdropComponent: BackdropComponent, backgroundComponent, renderFooter, children, BodyComponent } = props;
|
|
let accessible = props.accessible;
|
|
if (accessible === void 0) {
|
|
accessible = DEFAULT_ACCESSIBLE;
|
|
}
|
|
let accessibilityLabel = props.accessibilityLabel;
|
|
if (accessibilityLabel === void 0) {
|
|
accessibilityLabel = DEFAULT_ACCESSIBILITY_LABEL;
|
|
}
|
|
let accessibilityRole = props.accessibilityRole;
|
|
if (accessibilityRole === void 0) {
|
|
accessibilityRole = DEFAULT_ACCESSIBILITY_ROLE;
|
|
}
|
|
const reactiveSharedValue = useReactiveSharedValue(containerHeight == null ? _Module5249.INITIAL_CONTAINER_HEIGHT : containerHeight);
|
|
const _ = function _() {
|
|
const r3 = topInset + bottomInset;
|
|
const value = reactiveSharedValue.value;
|
|
return _modal ? value - r3 : value;
|
|
};
|
|
_.__closure = {
|
|
topInset,
|
|
bottomInset,
|
|
$modal: _modal,
|
|
_animatedContainerHeight: reactiveSharedValue
|
|
};
|
|
_.__workletHash = 4416945277961;
|
|
_.__initData = __initData;
|
|
derivedValue = useDerivedValue(_, [topInset, bottomInset, _modal, reactiveSharedValue]);
|
|
if (containerOffset == null) {
|
|
containerOffset = INITIAL_CONTAINER_OFFSET;
|
|
}
|
|
reactiveSharedValue2 = useReactiveSharedValue(containerOffset);
|
|
if (handleHeight == null) {
|
|
handleHeight = _Module5249.INITIAL_HANDLE_HEIGHT;
|
|
}
|
|
reactiveSharedValue3 = useReactiveSharedValue(handleHeight);
|
|
sharedValue = useSharedValue(0);
|
|
if (contentHeight == null) {
|
|
contentHeight = _Module5249.INITIAL_CONTAINER_HEIGHT;
|
|
}
|
|
sharedValue2 = useSharedValue(contentHeight);
|
|
let [animatedSnapPoints, r216] = useAnimatedSnapPoints(snapPoints, derivedValue, sharedValue2, reactiveSharedValue3, sharedValue, DEFAULT_DYNAMIC_SIZING, maxDynamicContentSize);
|
|
c14776_37 = r216;
|
|
const I = () => animatedSnapPoints.value[animatedSnapPoints.value.length - 1];
|
|
I.__closure = {
|
|
animatedSnapPoints
|
|
};
|
|
I.__workletHash = 2910694947130;
|
|
I.__initData = __initData2;
|
|
derivedValue2 = useDerivedValue(I, [animatedSnapPoints]);
|
|
const T = function T() {
|
|
let value = derivedValue.value;
|
|
let r3 = _modal;
|
|
if (!_modal) {
|
|
r3 = detached;
|
|
}
|
|
if (r3) {
|
|
value = derivedValue.value + bottomInset;
|
|
}
|
|
return value;
|
|
};
|
|
T.__closure = {
|
|
animatedContainerHeight: derivedValue,
|
|
$modal: _modal,
|
|
detached,
|
|
bottomInset
|
|
};
|
|
T.__workletHash = 1052527833249;
|
|
T.__initData = __initData3;
|
|
derivedValue3 = useDerivedValue(T, [derivedValue, _modal, detached, bottomInset]);
|
|
const j = () => derivedValue.value - derivedValue2.value;
|
|
j.__closure = {
|
|
animatedContainerHeight: derivedValue,
|
|
animatedHighestSnapPoint: derivedValue2
|
|
};
|
|
j.__workletHash = 12626261619737;
|
|
j.__initData = __initData4;
|
|
derivedValue4 = useDerivedValue(j, [derivedValue, derivedValue2]);
|
|
reactiveSharedValue4 = useReactiveSharedValue(DEFAULT_ANIMATE_ON_MOUNT ? -1 : index);
|
|
sharedValue3 = useSharedValue(initialPosition);
|
|
sharedValue4 = useSharedValue(_Module5249.INITIAL_VALUE);
|
|
sharedValue5 = useSharedValue(_Module5249.INITIAL_VALUE);
|
|
sharedValue6 = useSharedValue(DEFAULT_ANIMATE_ON_MOUNT ? index === -1 : !DEFAULT_ANIMATE_ON_MOUNT);
|
|
sharedValue7 = useSharedValue(false);
|
|
const X = function X() {
|
|
let r11 = containerHeight === null && containerHeight === void 0 ? false : true;
|
|
if (derivedValue.value !== _Module5249.INITIAL_CONTAINER_HEIGHT) {
|
|
r11 = true;
|
|
}
|
|
let r18 = false;
|
|
if (handleComponent === null) {
|
|
reactiveSharedValue3.value = 0;
|
|
r18 = true;
|
|
}
|
|
if (reactiveSharedValue3.value !== _Module5249.INITIAL_HANDLE_HEIGHT) {
|
|
r18 = true;
|
|
}
|
|
const r3 = animatedSnapPoints.value[0] !== _Module5249.INITIAL_SNAP_POINT ? true : false;
|
|
if (r11) {
|
|
r11 = r18;
|
|
}
|
|
if (r11) {
|
|
r11 = r3;
|
|
}
|
|
return r11;
|
|
};
|
|
X.__closure = {
|
|
_providedContainerHeight: containerHeight,
|
|
animatedContainerHeight: derivedValue,
|
|
INITIAL_CONTAINER_HEIGHT: _Module5249.INITIAL_CONTAINER_HEIGHT,
|
|
handleComponent,
|
|
animatedHandleHeight: reactiveSharedValue3,
|
|
INITIAL_HANDLE_HEIGHT: _Module5249.INITIAL_HANDLE_HEIGHT,
|
|
animatedSnapPoints,
|
|
INITIAL_SNAP_POINT: _Module5249.INITIAL_SNAP_POINT
|
|
};
|
|
X.__workletHash = 16854996685215;
|
|
X.__initData = __initData5;
|
|
derivedValue5 = useDerivedValue(X, [containerHeight, derivedValue, reactiveSharedValue3, animatedSnapPoints, handleComponent]);
|
|
sharedValue8 = useSharedValue(false);
|
|
sharedValue9 = useSharedValue(false);
|
|
sharedValue10 = useSharedValue(false);
|
|
sharedValue11 = useSharedValue(_Module5273.State.UNDETERMINED);
|
|
sharedValue12 = useSharedValue(_Module5273.State.UNDETERMINED);
|
|
const scrollable = useScrollable();
|
|
animatedScrollableType = scrollable.animatedScrollableType;
|
|
animatedScrollableContentOffsetY = scrollable.animatedScrollableContentOffsetY;
|
|
animatedScrollableOverrideState = scrollable.animatedScrollableOverrideState;
|
|
isScrollableRefreshable = scrollable.isScrollableRefreshable;
|
|
setScrollableRef = scrollable.setScrollableRef;
|
|
removeScrollableRef = scrollable.removeScrollableRef;
|
|
const keyboard = useKeyboard({
|
|
includeBottomOffset: keyboardIncludeBottomOffset
|
|
});
|
|
state = keyboard.state;
|
|
height = keyboard.height;
|
|
animationDuration = keyboard.animationDuration;
|
|
animationEasing = keyboard.animationEasing;
|
|
shouldHandleKeyboardEvents = keyboard.shouldHandleKeyboardEvents;
|
|
sharedValue13 = useSharedValue(0);
|
|
reducedMotion = useReducedMotion();
|
|
memo = useMemo(() => overrideReduceMotion && overrideReduceMotion !== ReduceMotion.System ? overrideReduceMotion === ReduceMotion.Always : reducedMotion, [reducedMotion, overrideReduceMotion]);
|
|
sharedValue14 = useSharedValue(_Module5246.ANIMATION_STATE.UNDETERMINED);
|
|
sharedValue15 = useSharedValue(_Module5246.ANIMATION_SOURCE.MOUNT);
|
|
const r348 = function() {
|
|
if (sharedValue3.value >= derivedValue3.value) {
|
|
return _Module5246.SHEET_STATE.CLOSED;
|
|
}
|
|
const r13 = derivedValue.value - derivedValue4.value;
|
|
if (sharedValue3.value === r13) {
|
|
return _Module5246.SHEET_STATE.EXTENDED;
|
|
}
|
|
const r22 = Math.max(0, derivedValue.value - (derivedValue4.value + sharedValue13.value));
|
|
return DEFAULT_KEYBOARD_BEHAVIOR === _Module5246.KEYBOARD_BEHAVIOR.interactive && (sharedValue8.value && sharedValue3.value === r22) ? _Module5246.SHEET_STATE.EXTENDED : sharedValue3.value === 0 ? _Module5246.SHEET_STATE.FILL_PARENT : sharedValue3.value < r13 ? _Module5246.SHEET_STATE.OVER_EXTENDED : _Module5246.SHEET_STATE.OPENED;
|
|
};
|
|
r348.__closure = {
|
|
AnimatedPosition: sharedValue3,
|
|
animatedClosedPosition: derivedValue3,
|
|
SHEET_STATE: _Module5246.SHEET_STATE,
|
|
animatedContainerHeight: derivedValue,
|
|
animatedSheetHeight: derivedValue4,
|
|
animatedKeyboardHeightInContainer: sharedValue13,
|
|
keyboardBehavior: DEFAULT_KEYBOARD_BEHAVIOR,
|
|
KEYBOARD_BEHAVIOR: _Module5246.KEYBOARD_BEHAVIOR,
|
|
isInTemporaryPosition: sharedValue8
|
|
};
|
|
r348.__workletHash = 5310633624984;
|
|
r348.__initData = __initData6;
|
|
derivedValue6 = useDerivedValue(r348, [derivedValue3, derivedValue, sharedValue13, sharedValue3, derivedValue4, sharedValue8, DEFAULT_KEYBOARD_BEHAVIOR]);
|
|
const Z = function Z() {
|
|
let r13, value;
|
|
if (DEFAULT_ENABLE_CONTENT_PANNING_GESTURE) {
|
|
L11: {
|
|
if (animatedScrollableOverrideState.value !== _Module5246.SCROLLABLE_STATE.UNDETERMINED) {
|
|
value = animatedScrollableOverrideState.value;
|
|
} else {
|
|
L8: {
|
|
if (derivedValue6.value !== _Module5246.SHEET_STATE.FILL_PARENT && derivedValue6.value !== _Module5246.SHEET_STATE.EXTENDED) {
|
|
if (state.value === _Module5246.KEYBOARD_STATE.SHOWN && sharedValue14.value === _Module5246.ANIMATION_STATE.RUNNING) {
|
|
break L8;
|
|
}
|
|
value = _Module5246.SCROLLABLE_STATE.LOCKED;
|
|
break L11;
|
|
}
|
|
}
|
|
value = _Module5246.SCROLLABLE_STATE.UNLOCKED;
|
|
}
|
|
}
|
|
r13 = value;
|
|
} else {
|
|
r13 = _Module5246.SCROLLABLE_STATE.UNLOCKED;
|
|
}
|
|
return r13;
|
|
};
|
|
Z.__closure = {
|
|
enableContentPanningGesture: DEFAULT_ENABLE_CONTENT_PANNING_GESTURE,
|
|
SCROLLABLE_STATE: _Module5246.SCROLLABLE_STATE,
|
|
animatedScrollableOverrideState,
|
|
animatedSheetState: derivedValue6,
|
|
SHEET_STATE: _Module5246.SHEET_STATE,
|
|
animatedKeyboardState: state,
|
|
KEYBOARD_STATE: _Module5246.KEYBOARD_STATE,
|
|
animatedAnimationState: sharedValue14,
|
|
ANIMATION_STATE: _Module5246.ANIMATION_STATE
|
|
};
|
|
Z.__workletHash = 1522258685135;
|
|
Z.__initData = __initData7;
|
|
derivedValue7 = useDerivedValue(Z, [DEFAULT_ENABLE_CONTENT_PANNING_GESTURE, sharedValue14, state, animatedScrollableOverrideState, derivedValue6]);
|
|
const q = function q() {
|
|
const r9 = animatedSnapPoints.value.slice().reverse();
|
|
const r8 = animatedSnapPoints.value.slice().map((item, index) => index).reverse();
|
|
r9.push(derivedValue.value);
|
|
r8.push(-1);
|
|
const r6 = derivedValue5.value ? _Module1606.interpolate(sharedValue3.value, r9, r8, _Module1606.Extrapolation.CLAMP) : -1;
|
|
return DEFAULT_KEYBOARD_INPUT_MODE === _Module5246.KEYBOARD_INPUT_MODE.adjustResize && (sharedValue15.value === _Module5246.ANIMATION_SOURCE.KEYBOARD && (sharedValue14.value === _Module5246.ANIMATION_STATE.RUNNING && sharedValue8.value)) ? Math.max(reactiveSharedValue4.value, r6) : sharedValue15.value === _Module5246.ANIMATION_SOURCE.SNAP_POINT_CHANGE ? sharedValue14.value === _Module5246.ANIMATION_STATE.RUNNING ? sharedValue5.value : r6 : r6;
|
|
};
|
|
q.__closure = {
|
|
animatedSnapPoints,
|
|
animatedContainerHeight: derivedValue,
|
|
isLayoutCalculated: derivedValue5,
|
|
interpolate: _Module1606.interpolate,
|
|
AnimatedPosition: sharedValue3,
|
|
Extrapolation: _Module1606.Extrapolation,
|
|
android_keyboardInputMode: DEFAULT_KEYBOARD_INPUT_MODE,
|
|
KEYBOARD_INPUT_MODE: _Module5246.KEYBOARD_INPUT_MODE,
|
|
animatedAnimationSource: sharedValue15,
|
|
ANIMATION_SOURCE: _Module5246.ANIMATION_SOURCE,
|
|
animatedAnimationState: sharedValue14,
|
|
ANIMATION_STATE: _Module5246.ANIMATION_STATE,
|
|
isInTemporaryPosition: sharedValue8,
|
|
animatedCurrentIndex: reactiveSharedValue4,
|
|
animatedNextPositionIndex: sharedValue5
|
|
};
|
|
q.__workletHash = 1383862303157;
|
|
q.__initData = __initData8;
|
|
derivedValue8 = useDerivedValue(q, [DEFAULT_KEYBOARD_INPUT_MODE, sharedValue15, sharedValue14, derivedValue, reactiveSharedValue4, sharedValue5, sharedValue3, animatedSnapPoints, sharedValue8, derivedValue5]);
|
|
callback = useCallback(function handleOnChange(a0, a1) {
|
|
if (onChange) {
|
|
onChange(a0, a1, a0 === c14776_37.value ? SNAP_POINT_TYPE.DYNAMIC : SNAP_POINT_TYPE.PROVIDED);
|
|
}
|
|
}, [onChange, reactiveSharedValue4, r216]);
|
|
callback2 = useCallback(function handleOnAnimate(a0, a1, a2) {
|
|
if (onAnimate && !(a0 === reactiveSharedValue4.value && a0 !== -1)) {
|
|
onAnimate(reactiveSharedValue4.value, a0, sharedValue3.value, a1, a2);
|
|
}
|
|
}, [onAnimate, reactiveSharedValue4, sharedValue3]);
|
|
const Q = function Q() {
|
|
_Module1606.cancelAnimation(sharedValue3);
|
|
sharedValue15.value = _Module5246.ANIMATION_SOURCE.NONE;
|
|
sharedValue14.value = _Module5246.ANIMATION_STATE.STOPPED;
|
|
};
|
|
Q.__closure = {
|
|
cancelAnimation: _Module1606.cancelAnimation,
|
|
AnimatedPosition: sharedValue3,
|
|
animatedAnimationSource: sharedValue15,
|
|
ANIMATION_SOURCE: _Module5246.ANIMATION_SOURCE,
|
|
animatedAnimationState: sharedValue14,
|
|
ANIMATION_STATE: _Module5246.ANIMATION_STATE
|
|
};
|
|
Q.__workletHash = 17031011772977;
|
|
Q.__initData = __initData9;
|
|
workletCallback = useWorkletCallback(Q, [sharedValue3, sharedValue14, sharedValue15]);
|
|
const animateToPositionCompleted = function animateToPositionCompleted(a0) {
|
|
if (a0) {
|
|
if (sharedValue15.value === _Module5246.ANIMATION_SOURCE.MOUNT) {
|
|
sharedValue6.value = true;
|
|
}
|
|
sharedValue9.value = false;
|
|
sharedValue15.value = _Module5246.ANIMATION_SOURCE.NONE;
|
|
sharedValue14.value = _Module5246.ANIMATION_STATE.STOPPED;
|
|
sharedValue4.value = _Module5249.INITIAL_VALUE;
|
|
sharedValue5.value = _Module5249.INITIAL_VALUE;
|
|
sharedValue10.value = false;
|
|
}
|
|
};
|
|
animateToPositionCompleted.__closure = {
|
|
__DEV__: false,
|
|
runOnJS: _Module1606.runOnJS,
|
|
print: _Module5262.print,
|
|
animatedCurrentIndex: reactiveSharedValue4,
|
|
animatedNextPosition: sharedValue4,
|
|
animatedNextPositionIndex: sharedValue5,
|
|
animatedAnimationSource: sharedValue15,
|
|
ANIMATION_SOURCE: _Module5246.ANIMATION_SOURCE,
|
|
isAnimatedOnMount: sharedValue6,
|
|
isForcedClosing: sharedValue9,
|
|
animatedAnimationState: sharedValue14,
|
|
ANIMATION_STATE: _Module5246.ANIMATION_STATE,
|
|
INITIAL_VALUE: _Module5249.INITIAL_VALUE,
|
|
animatedContainerHeightDidChange: sharedValue10
|
|
};
|
|
animateToPositionCompleted.__workletHash = 16634512058026;
|
|
animateToPositionCompleted.__initData = __initData10;
|
|
workletCallback2 = useWorkletCallback(animateToPositionCompleted);
|
|
const animateToPosition = function animateToPosition(a0, a1, velocity = 0) {
|
|
L17: {
|
|
if (a0 !== sharedValue3.value && a0 !== void 0) {
|
|
if (sharedValue14.value === _Module5246.ANIMATION_STATE.RUNNING && a0 === sharedValue4.value) {
|
|
break L17;
|
|
}
|
|
if (sharedValue14.value === _Module5246.ANIMATION_STATE.RUNNING) {
|
|
workletCallback();
|
|
}
|
|
sharedValue14.value = _Module5246.ANIMATION_STATE.RUNNING;
|
|
sharedValue15.value = a1;
|
|
sharedValue4.value = a0;
|
|
const r48 = state.value === _Module5246.KEYBOARD_STATE.SHOWN && DEFAULT_KEYBOARD_BEHAVIOR !== _Module5246.KEYBOARD_BEHAVIOR.extend && a0 < sharedValue3.value ? sharedValue13.value : 0;
|
|
let configs = arguments[3];
|
|
sharedValue5.value = animatedSnapPoints.value.indexOf(a0 + r48);
|
|
_Module1606.runOnJS(callback2)(sharedValue5.value, a0, a1);
|
|
if (!configs) {
|
|
configs = animationConfigs;
|
|
}
|
|
sharedValue3.value = _Module5262.animate({
|
|
point: a0,
|
|
configs,
|
|
velocity,
|
|
overrideReduceMotion,
|
|
onComplete: workletCallback2
|
|
});
|
|
}
|
|
}
|
|
};
|
|
animateToPosition.__closure = {
|
|
__DEV__: false,
|
|
runOnJS: _Module1606.runOnJS,
|
|
print: _Module5262.print,
|
|
AnimatedPosition: sharedValue3,
|
|
animatedAnimationState: sharedValue14,
|
|
ANIMATION_STATE: _Module5246.ANIMATION_STATE,
|
|
animatedNextPosition: sharedValue4,
|
|
stopAnimation: workletCallback,
|
|
animatedAnimationSource: sharedValue15,
|
|
animatedKeyboardState: state,
|
|
KEYBOARD_STATE: _Module5246.KEYBOARD_STATE,
|
|
keyboardBehavior: DEFAULT_KEYBOARD_BEHAVIOR,
|
|
KEYBOARD_BEHAVIOR: _Module5246.KEYBOARD_BEHAVIOR,
|
|
animatedKeyboardHeightInContainer: sharedValue13,
|
|
animatedNextPositionIndex: sharedValue5,
|
|
animatedSnapPoints,
|
|
handleOnAnimate: callback2,
|
|
animate: _Module5262.animate,
|
|
_providedAnimationConfigs: animationConfigs,
|
|
_providedOverrideReduceMotion: overrideReduceMotion,
|
|
animateToPositionCompleted: workletCallback2
|
|
};
|
|
animateToPosition.__workletHash = 11829586443894;
|
|
animateToPosition.__initData = __initData11;
|
|
workletCallback3 = useWorkletCallback(animateToPosition, [callback2, DEFAULT_KEYBOARD_BEHAVIOR, animationConfigs, overrideReduceMotion]);
|
|
const setToPosition = function setToPosition(a0) {
|
|
if (!(a0 === sharedValue3.value || a0 === void 0 || sharedValue14.value === _Module5246.ANIMATION_STATE.RUNNING && a0 === sharedValue4.value)) {
|
|
sharedValue4.value = a0;
|
|
sharedValue5.value = animatedSnapPoints.value.indexOf(a0);
|
|
workletCallback();
|
|
sharedValue3.value = a0;
|
|
sharedValue10.value = false;
|
|
}
|
|
};
|
|
setToPosition.__closure = {
|
|
AnimatedPosition: sharedValue3,
|
|
animatedAnimationState: sharedValue14,
|
|
ANIMATION_STATE: _Module5246.ANIMATION_STATE,
|
|
animatedNextPosition: sharedValue4,
|
|
__DEV__: false,
|
|
runOnJS: _Module1606.runOnJS,
|
|
print: _Module5262.print,
|
|
BottomSheet,
|
|
animatedNextPositionIndex: sharedValue5,
|
|
animatedSnapPoints,
|
|
stopAnimation: workletCallback,
|
|
animatedContainerHeightDidChange: sharedValue10
|
|
};
|
|
setToPosition.__workletHash = 1470510512522;
|
|
setToPosition.__initData = __initData12;
|
|
workletCallback4 = useWorkletCallback(setToPosition, []);
|
|
const getEvaluatedPosition = function getEvaluatedPosition(a0) {
|
|
const value = reactiveSharedValue4.value;
|
|
const value3 = animatedSnapPoints.value;
|
|
const value2 = state.value;
|
|
const value4 = derivedValue2.value;
|
|
if (a0 === _Module5246.ANIMATION_SOURCE.KEYBOARD && DEFAULT_KEYBOARD_BLUR_BEHAVIOR === _Module5246.KEYBOARD_BLUR_BEHAVIOR.restore && value2 === _Module5246.KEYBOARD_STATE.HIDDEN && sharedValue11.value !== _Module5273.State.ACTIVE && sharedValue12.value !== _Module5273.State.ACTIVE) {
|
|
sharedValue8.value = false;
|
|
return value3[value];
|
|
}
|
|
if (DEFAULT_KEYBOARD_BEHAVIOR === _Module5246.KEYBOARD_BEHAVIOR.extend && value2 === _Module5246.KEYBOARD_STATE.SHOWN) {
|
|
return value4;
|
|
}
|
|
if (DEFAULT_KEYBOARD_BEHAVIOR === _Module5246.KEYBOARD_BEHAVIOR.fillParent && value2 === _Module5246.KEYBOARD_STATE.SHOWN) {
|
|
sharedValue8.value = true;
|
|
return 0;
|
|
}
|
|
if (DEFAULT_KEYBOARD_BEHAVIOR === _Module5246.KEYBOARD_BEHAVIOR.interactive && value2 === _Module5246.KEYBOARD_STATE.SHOWN && DEFAULT_KEYBOARD_INPUT_MODE !== "adjustResize") {
|
|
sharedValue8.value = true;
|
|
return Math.max(0, value4 - sharedValue13.value);
|
|
}
|
|
return sharedValue8.value ? sharedValue3.value : sharedValue6.value ? value3[value] : index === -1 ? derivedValue3.value : value3[index];
|
|
};
|
|
getEvaluatedPosition.__closure = {
|
|
animatedCurrentIndex: reactiveSharedValue4,
|
|
animatedSnapPoints,
|
|
animatedKeyboardState: state,
|
|
animatedHighestSnapPoint: derivedValue2,
|
|
ANIMATION_SOURCE: _Module5246.ANIMATION_SOURCE,
|
|
keyboardBlurBehavior: DEFAULT_KEYBOARD_BLUR_BEHAVIOR,
|
|
KEYBOARD_BLUR_BEHAVIOR: _Module5246.KEYBOARD_BLUR_BEHAVIOR,
|
|
KEYBOARD_STATE: _Module5246.KEYBOARD_STATE,
|
|
animatedContentGestureState: sharedValue11,
|
|
State: _Module5273.State,
|
|
animatedHandleGestureState: sharedValue12,
|
|
isInTemporaryPosition: sharedValue8,
|
|
keyboardBehavior: DEFAULT_KEYBOARD_BEHAVIOR,
|
|
KEYBOARD_BEHAVIOR: _Module5246.KEYBOARD_BEHAVIOR,
|
|
Platform,
|
|
android_keyboardInputMode: DEFAULT_KEYBOARD_INPUT_MODE,
|
|
animatedKeyboardHeightInContainer: sharedValue13,
|
|
AnimatedPosition: sharedValue3,
|
|
isAnimatedOnMount: sharedValue6,
|
|
_providedIndex: index,
|
|
animatedClosedPosition: derivedValue3
|
|
};
|
|
getEvaluatedPosition.__workletHash = 10275779842691;
|
|
getEvaluatedPosition.__initData = __initData13;
|
|
workletCallback5 = useWorkletCallback(getEvaluatedPosition, [sharedValue11, reactiveSharedValue4, sharedValue12, derivedValue2, sharedValue13, state, sharedValue3, animatedSnapPoints, sharedValue8, sharedValue6, DEFAULT_KEYBOARD_BEHAVIOR, DEFAULT_KEYBOARD_BLUR_BEHAVIOR, index]);
|
|
const evaluatePosition = function evaluatePosition(a0, a1) {
|
|
L21: {
|
|
if (!(sharedValue9.value && a0 !== _Module5246.ANIMATION_SOURCE.USER) && derivedValue5.value) {
|
|
const r8 = workletCallback5(a0);
|
|
if (sharedValue6.value) {
|
|
if (sharedValue14.value === _Module5246.ANIMATION_STATE.RUNNING) {
|
|
if (sharedValue5.value === -1 && !sharedValue8.value) {
|
|
workletCallback4(derivedValue3.value);
|
|
return void 0;
|
|
}
|
|
if (sharedValue5.value !== reactiveSharedValue4.value) {
|
|
workletCallback3(animatedSnapPoints.value[sharedValue5.value], a0, void 0, a1);
|
|
return void 0;
|
|
}
|
|
}
|
|
if (sharedValue14.value !== _Module5246.ANIMATION_STATE.RUNNING && derivedValue8.value === -1) {
|
|
if (memo && animatedSnapPoints.value[derivedValue8.value] !== sharedValue3.value) {
|
|
return void 0;
|
|
}
|
|
workletCallback4(derivedValue3.value);
|
|
break L21;
|
|
}
|
|
if (sharedValue10.value) {
|
|
workletCallback4(r8);
|
|
} else {
|
|
workletCallback3(r8, a0, void 0, a1);
|
|
}
|
|
} else if (DEFAULT_ANIMATE_ON_MOUNT) {
|
|
workletCallback3(r8, _Module5246.ANIMATION_SOURCE.MOUNT, void 0, a1);
|
|
} else {
|
|
workletCallback4(r8);
|
|
sharedValue6.value = true;
|
|
}
|
|
}
|
|
}
|
|
};
|
|
evaluatePosition.__closure = {
|
|
isForcedClosing: sharedValue9,
|
|
ANIMATION_SOURCE: _Module5246.ANIMATION_SOURCE,
|
|
isLayoutCalculated: derivedValue5,
|
|
getEvaluatedPosition: workletCallback5,
|
|
isAnimatedOnMount: sharedValue6,
|
|
animateOnMount: DEFAULT_ANIMATE_ON_MOUNT,
|
|
animateToPosition: workletCallback3,
|
|
setToPosition: workletCallback4,
|
|
animatedAnimationState: sharedValue14,
|
|
ANIMATION_STATE: _Module5246.ANIMATION_STATE,
|
|
animatedNextPositionIndex: sharedValue5,
|
|
isInTemporaryPosition: sharedValue8,
|
|
animatedClosedPosition: derivedValue3,
|
|
animatedCurrentIndex: reactiveSharedValue4,
|
|
animatedSnapPoints,
|
|
animatedIndex: derivedValue8,
|
|
reduceMotion: memo,
|
|
AnimatedPosition: sharedValue3,
|
|
animatedContainerHeightDidChange: sharedValue10
|
|
};
|
|
evaluatePosition.__workletHash = 15100134260939;
|
|
evaluatePosition.__initData = __initData14;
|
|
workletCallback6 = useWorkletCallback(evaluatePosition, [workletCallback5, workletCallback3, workletCallback4, memo]);
|
|
stableCallback = useStableCallback(function handleSnapToIndex(a0, a1) {
|
|
const r7 = animatedSnapPoints.get();
|
|
if (derivedValue5.get()) {
|
|
Module38(a0 >= -1 && a0 <= r7.length - 1, "'index' was provided but out of the provided snap points range! expected value to be between -1, " + (r7.length - 1));
|
|
const r31 = r7[a0];
|
|
if (derivedValue5.value && a0 !== sharedValue5.value && r31 !== sharedValue4.value && !sharedValue9.value) {
|
|
sharedValue8.value = false;
|
|
_Module1606.runOnUI(workletCallback3)(r31, _Module5246.ANIMATION_SOURCE.USER, 0, a1);
|
|
}
|
|
}
|
|
});
|
|
const handleSnapToPosition = function handleSnapToPosition(a0, a1) {
|
|
const r18 = _Module5262.normalizeSnapPoint(a0, derivedValue.value);
|
|
let r19 = derivedValue5;
|
|
if (derivedValue5) {
|
|
r19 = r18 !== sharedValue4.value;
|
|
}
|
|
if (r19) {
|
|
r19 = !sharedValue9.value;
|
|
}
|
|
if (r19) {
|
|
sharedValue8.value = true;
|
|
_Module1606.runOnUI(workletCallback3)(r18, _Module5246.ANIMATION_SOURCE.USER, 0, a1);
|
|
}
|
|
};
|
|
handleSnapToPosition.__closure = {
|
|
__DEV__: false,
|
|
print: _Module5262.print,
|
|
BottomSheet,
|
|
normalizeSnapPoint: _Module5262.normalizeSnapPoint,
|
|
animatedContainerHeight: derivedValue,
|
|
isLayoutCalculated: derivedValue5,
|
|
animatedNextPosition: sharedValue4,
|
|
isForcedClosing: sharedValue9,
|
|
isInTemporaryPosition: sharedValue8,
|
|
runOnUI: _Module1606.runOnUI,
|
|
animateToPosition: workletCallback3,
|
|
ANIMATION_SOURCE: _Module5246.ANIMATION_SOURCE
|
|
};
|
|
handleSnapToPosition.__workletHash = 15646490046918;
|
|
handleSnapToPosition.__initData = __initData15;
|
|
workletCallback7 = useWorkletCallback(handleSnapToPosition, [workletCallback3, bottomInset, topInset, derivedValue5, sharedValue9, derivedValue, sharedValue3]);
|
|
callback3 = useCallback(function handleClose(a0) {
|
|
const value = derivedValue3.value;
|
|
if (derivedValue5.value && value !== sharedValue4.value && !sharedValue9.value) {
|
|
sharedValue8.value = false;
|
|
_Module1606.runOnUI(workletCallback3)(value, _Module5246.ANIMATION_SOURCE.USER, 0, a0);
|
|
}
|
|
}, [workletCallback3, sharedValue9, derivedValue5, sharedValue8, sharedValue4, derivedValue3]);
|
|
callback4 = useCallback(function handleForceClose(a0) {
|
|
const value = derivedValue3.value;
|
|
if (!(value === sharedValue4.value || sharedValue9.value)) {
|
|
sharedValue8.value = false;
|
|
sharedValue9.value = true;
|
|
_Module1606.runOnUI(workletCallback3)(value, _Module5246.ANIMATION_SOURCE.USER, 0, a0);
|
|
}
|
|
}, [workletCallback3, sharedValue9, sharedValue8, sharedValue4, derivedValue3]);
|
|
callback5 = useCallback(function handleExpand(a0) {
|
|
const value = animatedSnapPoints.value;
|
|
const r6 = value[value.length - 1];
|
|
if (derivedValue5.value && value.length - 1 !== sharedValue5.value && r6 !== sharedValue4.value && !sharedValue9.value) {
|
|
sharedValue8.value = false;
|
|
_Module1606.runOnUI(workletCallback3)(r6, _Module5246.ANIMATION_SOURCE.USER, 0, a0);
|
|
}
|
|
}, [workletCallback3, sharedValue8, derivedValue5, sharedValue9, animatedSnapPoints, sharedValue4, sharedValue5]);
|
|
callback6 = useCallback(function handleCollapse(a0) {
|
|
const r5 = animatedSnapPoints.value[0];
|
|
let r15 = derivedValue5;
|
|
if (derivedValue5) {
|
|
r15 = sharedValue5.value !== 0;
|
|
}
|
|
if (r15) {
|
|
r15 = r5 !== sharedValue4.value;
|
|
}
|
|
if (r15) {
|
|
r15 = !sharedValue9.value;
|
|
}
|
|
if (r15) {
|
|
sharedValue8.value = false;
|
|
_Module1606.runOnUI(workletCallback3)(r5, _Module5246.ANIMATION_SOURCE.USER, 0, a0);
|
|
}
|
|
}, [workletCallback3, sharedValue9, derivedValue5, sharedValue8, animatedSnapPoints, sharedValue4, sharedValue5]);
|
|
useImperativeHandle(a1, () => ({
|
|
snapToIndex: stableCallback,
|
|
snapToPosition: workletCallback7,
|
|
expand: callback5,
|
|
collapse: callback6,
|
|
close: callback3,
|
|
forceClose: callback4
|
|
}));
|
|
const memo2 = useMemo(() => ({
|
|
enableContentPanningGesture: DEFAULT_ENABLE_CONTENT_PANNING_GESTURE,
|
|
enableDynamicSizing: DEFAULT_DYNAMIC_SIZING,
|
|
overDragResistanceFactor: DEFAULT_OVER_DRAG_RESISTANCE_FACTOR,
|
|
enableOverDrag: DEFAULT_ENABLE_OVER_DRAG,
|
|
enablePanDownToClose: DEFAULT_ENABLE_PAN_DOWN_TO_CLOSE,
|
|
animatedAnimationState: sharedValue14,
|
|
animatedSheetState: derivedValue6,
|
|
animatedScrollableState: derivedValue7,
|
|
animatedScrollableOverrideState,
|
|
animatedContentGestureState: sharedValue11,
|
|
animatedHandleGestureState: sharedValue12,
|
|
animatedKeyboardState: state,
|
|
animatedScrollableType,
|
|
animatedIndex: derivedValue8,
|
|
AnimatedPosition: sharedValue3,
|
|
animatedSheetHeight: derivedValue4,
|
|
animatedContentHeight: sharedValue2,
|
|
animatedClosedPosition: derivedValue3,
|
|
animatedHandleHeight: reactiveSharedValue3,
|
|
animatedFooterHeight: sharedValue,
|
|
animatedKeyboardHeight: height,
|
|
animatedKeyboardHeightInContainer: sharedValue13,
|
|
animatedContainerHeight: derivedValue,
|
|
animatedSnapPoints,
|
|
animatedHighestSnapPoint: derivedValue2,
|
|
animatedScrollableContentOffsetY,
|
|
isInTemporaryPosition: sharedValue8,
|
|
isContentHeightFixed: sharedValue7,
|
|
isScrollableRefreshable,
|
|
shouldHandleKeyboardEvents,
|
|
simultaneousHandlers,
|
|
waitFor,
|
|
activeOffsetX,
|
|
activeOffsetY,
|
|
failOffsetX,
|
|
failOffsetY,
|
|
enableBlurKeyboardOnGesture: DEFAULT_ENABLE_BLUR_KEYBOARD_ON_GESTURE,
|
|
animateToPosition: workletCallback3,
|
|
stopAnimation: workletCallback,
|
|
setScrollableRef,
|
|
removeScrollableRef
|
|
}), [derivedValue8, sharedValue3, sharedValue2, derivedValue4, animatedScrollableType, sharedValue11, sharedValue12, derivedValue3, sharedValue, derivedValue, reactiveSharedValue3, sharedValue14, state, height, sharedValue13, derivedValue6, derivedValue2, derivedValue7, animatedScrollableOverrideState, animatedSnapPoints, shouldHandleKeyboardEvents, animatedScrollableContentOffsetY, isScrollableRefreshable, sharedValue7, sharedValue8, DEFAULT_ENABLE_CONTENT_PANNING_GESTURE, DEFAULT_OVER_DRAG_RESISTANCE_FACTOR, DEFAULT_ENABLE_OVER_DRAG, DEFAULT_ENABLE_PAN_DOWN_TO_CLOSE, DEFAULT_DYNAMIC_SIZING, DEFAULT_ENABLE_BLUR_KEYBOARD_ON_GESTURE, simultaneousHandlers, waitFor, activeOffsetX, activeOffsetY, failOffsetX, failOffsetY, setScrollableRef, removeScrollableRef, workletCallback3, workletCallback]);
|
|
const memo3 = useMemo(() => ({
|
|
animatedIndex: derivedValue8,
|
|
AnimatedPosition: sharedValue3,
|
|
snapToIndex: stableCallback,
|
|
snapToPosition: workletCallback7,
|
|
expand: callback5,
|
|
collapse: callback6,
|
|
close: callback3,
|
|
forceClose: callback4
|
|
}), [derivedValue8, sharedValue3, stableCallback, workletCallback7, callback5, callback6, callback3, callback4]);
|
|
const Ra = () => derivedValue.value;
|
|
Ra.__closure = {
|
|
animatedContainerHeight: derivedValue
|
|
};
|
|
Ra.__workletHash = 12308480249646;
|
|
Ra.__initData = __initData16;
|
|
const Pa = function Pa(a0, a1) {
|
|
if (a0 !== _Module5249.INITIAL_CONTAINER_HEIGHT) {
|
|
sharedValue10.value = a0 !== a1;
|
|
if (sharedValue14.value === _Module5246.ANIMATION_STATE.RUNNING && sharedValue15.value === _Module5246.ANIMATION_SOURCE.GESTURE && sharedValue5.value === -1) {
|
|
workletCallback3(derivedValue3.value, _Module5246.ANIMATION_SOURCE.GESTURE);
|
|
}
|
|
}
|
|
};
|
|
Pa.__closure = {
|
|
INITIAL_CONTAINER_HEIGHT: _Module5249.INITIAL_CONTAINER_HEIGHT,
|
|
animatedContainerHeightDidChange: sharedValue10,
|
|
animatedAnimationState: sharedValue14,
|
|
ANIMATION_STATE: _Module5246.ANIMATION_STATE,
|
|
animatedAnimationSource: sharedValue15,
|
|
ANIMATION_SOURCE: _Module5246.ANIMATION_SOURCE,
|
|
animatedNextPositionIndex: sharedValue5,
|
|
animateToPosition: workletCallback3,
|
|
animatedClosedPosition: derivedValue3
|
|
};
|
|
Pa.__workletHash = 14620022635386;
|
|
Pa.__initData = __initData17;
|
|
_Module1606.useAnimatedReaction(Ra, Pa);
|
|
const Ha = () => animatedSnapPoints.value;
|
|
Ha.__closure = {
|
|
animatedSnapPoints
|
|
};
|
|
Ha.__workletHash = 16103751497216;
|
|
Ha.__initData = __initData18;
|
|
const pa = function pa(a0, a1) {
|
|
if (!(JSON.stringify(a0) === JSON.stringify(a1) && sharedValue6.value) && derivedValue5.value) {
|
|
workletCallback6(_Module5246.ANIMATION_SOURCE.SNAP_POINT_CHANGE);
|
|
}
|
|
};
|
|
pa.__closure = {
|
|
isAnimatedOnMount: sharedValue6,
|
|
isLayoutCalculated: derivedValue5,
|
|
__DEV__: false,
|
|
runOnJS: _Module1606.runOnJS,
|
|
print: _Module5262.print,
|
|
evaluatePosition: workletCallback6,
|
|
ANIMATION_SOURCE: _Module5246.ANIMATION_SOURCE
|
|
};
|
|
pa.__workletHash = 1047659532107;
|
|
pa.__initData = __initData19;
|
|
_Module1606.useAnimatedReaction(Ha, pa, [derivedValue5, animatedSnapPoints]);
|
|
const fa = () => ({
|
|
_keyboardState: state.value,
|
|
_keyboardHeight: height.value
|
|
});
|
|
fa.__closure = {
|
|
animatedKeyboardState: state,
|
|
animatedKeyboardHeight: height
|
|
};
|
|
fa.__workletHash = 14903064847424;
|
|
fa.__initData = __initData20;
|
|
const Da = function Da({ _keyboardState: _keyboardState2, _keyboardHeight }, a1) {
|
|
const _keyboardState = a1?._keyboardState;
|
|
const _keyboardHeight2 = a1?._keyboardHeight;
|
|
L24: {
|
|
if (!(_keyboardState2 === _keyboardState && _keyboardHeight === _keyboardHeight2) && _keyboardState2 !== _Module5246.KEYBOARD_STATE.UNDETERMINED) {
|
|
if (_keyboardState2 === _Module5246.KEYBOARD_STATE.HIDDEN && sharedValue14.value === _Module5246.ANIMATION_STATE.RUNNING && sharedValue15.value === _Module5246.ANIMATION_SOURCE.GESTURE) {
|
|
break L24;
|
|
}
|
|
let value = 0;
|
|
if (_keyboardHeight !== 0) {
|
|
const r13 = Math;
|
|
value = _modal ? r13.abs(_keyboardHeight - Math.abs(bottomInset - reactiveSharedValue2.value.bottom)) : r13.abs(_keyboardHeight - reactiveSharedValue2.value.bottom);
|
|
}
|
|
sharedValue13.value = value;
|
|
if (DEFAULT_KEYBOARD_INPUT_MODE === _Module5246.KEYBOARD_INPUT_MODE.adjustResize) {
|
|
sharedValue13.value = 0;
|
|
if (DEFAULT_KEYBOARD_BEHAVIOR === _Module5246.KEYBOARD_BEHAVIOR.interactive) {
|
|
break L24;
|
|
}
|
|
}
|
|
if (sharedValue11.value !== _Module5273.State.ACTIVE && sharedValue11.value !== _Module5273.State.BEGAN && sharedValue12.value !== _Module5273.State.ACTIVE && sharedValue12.value !== _Module5273.State.BEGAN) {
|
|
if (_keyboardState2 === _Module5246.KEYBOARD_STATE.HIDDEN && DEFAULT_KEYBOARD_BLUR_BEHAVIOR === _Module5246.KEYBOARD_BLUR_BEHAVIOR.none) {
|
|
break L24;
|
|
}
|
|
workletCallback6(_Module5246.ANIMATION_SOURCE.KEYBOARD, _Module5262.getKeyboardAnimationConfigs(animationEasing.value, animationDuration.value));
|
|
}
|
|
}
|
|
}
|
|
};
|
|
Da.__closure = {
|
|
KEYBOARD_STATE: _Module5246.KEYBOARD_STATE,
|
|
animatedAnimationState: sharedValue14,
|
|
ANIMATION_STATE: _Module5246.ANIMATION_STATE,
|
|
animatedAnimationSource: sharedValue15,
|
|
ANIMATION_SOURCE: _Module5246.ANIMATION_SOURCE,
|
|
__DEV__: false,
|
|
runOnJS: _Module1606.runOnJS,
|
|
print: _Module5262.print,
|
|
BottomSheet,
|
|
animatedKeyboardHeightInContainer: sharedValue13,
|
|
$modal: _modal,
|
|
bottomInset,
|
|
animatedContainerOffset: reactiveSharedValue2,
|
|
Platform,
|
|
android_keyboardInputMode: DEFAULT_KEYBOARD_INPUT_MODE,
|
|
KEYBOARD_INPUT_MODE: _Module5246.KEYBOARD_INPUT_MODE,
|
|
keyboardBehavior: DEFAULT_KEYBOARD_BEHAVIOR,
|
|
KEYBOARD_BEHAVIOR: _Module5246.KEYBOARD_BEHAVIOR,
|
|
animatedContentGestureState: sharedValue11,
|
|
State: _Module5273.State,
|
|
animatedHandleGestureState: sharedValue12,
|
|
keyboardBlurBehavior: DEFAULT_KEYBOARD_BLUR_BEHAVIOR,
|
|
KEYBOARD_BLUR_BEHAVIOR: _Module5246.KEYBOARD_BLUR_BEHAVIOR,
|
|
getKeyboardAnimationConfigs: _Module5262.getKeyboardAnimationConfigs,
|
|
keyboardAnimationEasing: animationEasing,
|
|
keyboardAnimationDuration: animationDuration,
|
|
evaluatePosition: workletCallback6
|
|
};
|
|
Da.__workletHash = 3826286975425;
|
|
Da.__initData = __initData21;
|
|
_Module1606.useAnimatedReaction(fa, Da, [_modal, bottomInset, DEFAULT_KEYBOARD_BEHAVIOR, DEFAULT_KEYBOARD_BLUR_BEHAVIOR, DEFAULT_KEYBOARD_INPUT_MODE, reactiveSharedValue2, workletCallback5]);
|
|
const xa = () => sharedValue3.value;
|
|
xa.__closure = {
|
|
AnimatedPosition: sharedValue3
|
|
};
|
|
xa.__workletHash = 14107338560521;
|
|
xa.__initData = __initData22;
|
|
const Ba = function Ba(a0) {
|
|
if (AnimatedPosition) {
|
|
AnimatedPosition.value = a0 + topInset;
|
|
}
|
|
};
|
|
Ba.__closure = {
|
|
_providedAnimatedPosition: AnimatedPosition,
|
|
topInset
|
|
};
|
|
Ba.__workletHash = 11716938993854;
|
|
Ba.__initData = __initData23;
|
|
_Module1606.useAnimatedReaction(xa, Ba, []);
|
|
const ba = () => derivedValue8.value;
|
|
ba.__closure = {
|
|
animatedIndex: derivedValue8
|
|
};
|
|
ba.__workletHash = 4322474325743;
|
|
ba.__initData = __initData24;
|
|
const ga = function ga(a0) {
|
|
if (animatedIndex) {
|
|
animatedIndex.value = a0;
|
|
}
|
|
};
|
|
ga.__closure = {
|
|
_providedAnimatedIndex: animatedIndex
|
|
};
|
|
ga.__workletHash = 14207021927928;
|
|
ga.__initData = __initData25;
|
|
_Module1606.useAnimatedReaction(ba, ga, []);
|
|
const ya = () => ({
|
|
_animatedIndex: derivedValue8.value,
|
|
_animatedPosition: sharedValue3.value,
|
|
_animationState: sharedValue14.value,
|
|
_contentGestureState: sharedValue11.value,
|
|
_handleGestureState: sharedValue12.value
|
|
});
|
|
ya.__closure = {
|
|
animatedIndex: derivedValue8,
|
|
AnimatedPosition: sharedValue3,
|
|
animatedAnimationState: sharedValue14,
|
|
animatedContentGestureState: sharedValue11,
|
|
animatedHandleGestureState: sharedValue12
|
|
};
|
|
ya.__workletHash = 4984898715723;
|
|
ya.__initData = __initData26;
|
|
const Ma = function Ma({ _animatedIndex, _animatedPosition, _animationState, _contentGestureState, _handleGestureState }) {
|
|
if (_animationState === _Module5246.ANIMATION_STATE.STOPPED && (sharedValue4.value === _Module5249.INITIAL_VALUE || sharedValue5.value === _Module5249.INITIAL_VALUE || _animatedPosition === sharedValue4.value && _animatedIndex === sharedValue5.value) && _animatedIndex % 1 === 0 && !(_contentGestureState !== _Module5273.State.END && _contentGestureState !== _Module5273.State.UNDETERMINED && _contentGestureState !== _Module5273.State.CANCELLED || _handleGestureState !== _Module5273.State.END && _handleGestureState !== _Module5273.State.UNDETERMINED && _handleGestureState !== _Module5273.State.CANCELLED)) {
|
|
let r61 = memo;
|
|
if (memo) {
|
|
r61 = _animatedIndex === reactiveSharedValue4.value;
|
|
}
|
|
if (r61) {
|
|
r61 = animatedSnapPoints.value[_animatedIndex] !== _animatedPosition;
|
|
}
|
|
if (!r61) {
|
|
if (_animatedIndex !== reactiveSharedValue4.value) {
|
|
reactiveSharedValue4.value = _animatedIndex;
|
|
_Module1606.runOnJS(callback)(_animatedIndex, _animatedPosition);
|
|
}
|
|
if (_animatedIndex === -1 && onClose) {
|
|
_Module1606.runOnJS(onClose)();
|
|
}
|
|
}
|
|
}
|
|
};
|
|
Ma.__closure = {
|
|
ANIMATION_STATE: _Module5246.ANIMATION_STATE,
|
|
animatedNextPosition: sharedValue4,
|
|
INITIAL_VALUE: _Module5249.INITIAL_VALUE,
|
|
animatedNextPositionIndex: sharedValue5,
|
|
State: _Module5273.State,
|
|
reduceMotion: memo,
|
|
animatedCurrentIndex: reactiveSharedValue4,
|
|
animatedSnapPoints,
|
|
__DEV__: false,
|
|
runOnJS: _Module1606.runOnJS,
|
|
print: _Module5262.print,
|
|
BottomSheet,
|
|
handleOnChange: callback,
|
|
_providedOnClose: onClose
|
|
};
|
|
Ma.__workletHash = 11608666988638;
|
|
Ma.__initData = __initData27;
|
|
_Module1606.useAnimatedReaction(ya, Ma, [memo, callback, onClose]);
|
|
useEffect(() => {
|
|
let r2 = DEFAULT_ANIMATE_ON_MOUNT;
|
|
if (DEFAULT_ANIMATE_ON_MOUNT) {
|
|
r2 = !sharedValue6.value;
|
|
}
|
|
if (!r2) {
|
|
stableCallback(index);
|
|
}
|
|
}, [DEFAULT_ANIMATE_ON_MOUNT, index, sharedValue6, stableCallback]);
|
|
const r740 = [BackdropComponent ? <BackdropComponent animatedIndex={derivedValue8} AnimatedPosition={sharedValue3} style={StyleSheet.absoluteFillObject} /> : null, ,];
|
|
const r756 = [backgroundComponent !== null ? <_Module5374.BottomSheetBackgroundContainer key="BottomSheetBackgroundContainer" animatedIndex={derivedValue8} AnimatedPosition={sharedValue3} backgroundComponent={backgroundComponent} backgroundStyle={backgroundStyle} /> : null, , ,];
|
|
if (accessible == null) {
|
|
accessible = void 0;
|
|
}
|
|
if (accessibilityRole == null) {
|
|
accessibilityRole = void 0;
|
|
}
|
|
if (accessibilityLabel == null) {
|
|
accessibilityLabel = void 0;
|
|
}
|
|
r756[1] = <BottomSheetContent pointerEvents="box-none" accessible={accessible} accessibilityRole={accessibilityRole} accessibilityLabel={accessibilityLabel} keyboardBehavior={DEFAULT_KEYBOARD_BEHAVIOR} detached={detached}>
|
|
{children}
|
|
{renderFooter ? <BottomSheetFooterContainer renderFooter={renderFooter} /> : null}
|
|
</BottomSheetContent>;
|
|
r756[2] = handleComponent !== null ? <_Module5385.BottomSheetHandleContainer key="BottomSheetHandleContainer" animatedIndex={derivedValue8} AnimatedPosition={sharedValue3} handleHeight={reactiveSharedValue3} enableHandlePanningGesture={enableHandlePanningGesture} enableOverDrag={DEFAULT_ENABLE_OVER_DRAG} enablePanDownToClose={DEFAULT_ENABLE_PAN_DOWN_TO_CLOSE} overDragResistanceFactor={DEFAULT_OVER_DRAG_RESISTANCE_FACTOR} keyboardBehavior={DEFAULT_KEYBOARD_BEHAVIOR} handleComponent={handleComponent} handleStyle={handleStyle} handleIndicatorStyle={handleIndicatorStyle} /> : null;
|
|
r740[1] = <BottomSheetHostingContainer key="BottomSheetContainer" shouldCalculateHeight={!_modal} containerHeight={reactiveSharedValue} containerOffset={reactiveSharedValue2} topInset={topInset} bottomInset={bottomInset} detached={detached} style={containerStyle}>
|
|
<BottomSheetBody style={style} BodyComponent={BodyComponent}>{r756}</BottomSheetBody>
|
|
</BottomSheetHostingContainer>;
|
|
return <BottomSheetProvider value={memo3}>
|
|
<BottomSheetInternalProvider value={memo2}>
|
|
<Module5367 gestureEventsHandlersHook={gestureEventsHandlersHook}>{r740}</Module5367>
|
|
</BottomSheetInternalProvider>
|
|
</BottomSheetProvider>;
|
|
};
|
|
const r66 = memo2(forwardRef(BottomSheet));
|
|
r66.displayName = "BottomSheet";
|
|
export default r66;
|