648 lines
27 KiB
React
648 lines
27 KiB
React
// Metro module 1816 (f1817).
|
|
import Module19, { forwardRef, useCallback, useMemo, useImperativeHandle, useEffect } from "react";
|
|
import { jsx } from "react/jsx-runtime";
|
|
import * as _Module1606 from "./Module1606";
|
|
import Module1606, { useAnimatedRef, useSharedValue, runOnUI, useAnimatedReaction, useDerivedValue, useAnimatedStyle } from "./Module1606";
|
|
import _default from "./_default_1814";
|
|
import _default2 from "./_default_1817";
|
|
import { useReanimatedFocusedInput, useWindowDimensions, useFocusedInputHandler } from "./useResizeMode";
|
|
import { findNodeHandle } from "./Module1796";
|
|
import { KeyboardControllerNative } from "./Module1596";
|
|
import * as _Module1818 from "./Module1818";
|
|
import { debounce } from "./Module1818";
|
|
import { useSmoothKeyboardHandler } from "./Module1819";
|
|
import Module1820 from "./Module1820";
|
|
function $mk113982($env) {
|
|
return function e() {
|
|
(0, $env[34])();
|
|
};
|
|
}
|
|
let env1534 = {};
|
|
const c1534_11 = {
|
|
code: "function pnpm_indexTsx1(e,animated=false){const{enabled,layout,scrollViewTarget,height,keyboardHeight,bottomOffset,interpolate,initialKeyboardSize,scrollDistanceWithRespectToSnapPoints,scrollPosition,snapToOffsets,scrollTo,scrollViewAnimatedRef,scrollViewPageY}=this.__closure;var _layout$value,_layout$value2,_layout$value3;if(!enabled){return 0;}if(((_layout$value=layout.value)===null||_layout$value===void 0?void 0:_layout$value.parentScrollViewTarget)!==scrollViewTarget.value){return 0;}const visibleRect=height-keyboardHeight.value;const absoluteY=((_layout$value2=layout.value)===null||_layout$value2===void 0?void 0:_layout$value2.layout.absoluteY)||0;const inputHeight=((_layout$value3=layout.value)===null||_layout$value3===void 0?void 0:_layout$value3.layout.height)||0;const point=absoluteY+inputHeight;if(visibleRect-point<=bottomOffset){const relativeScrollTo=keyboardHeight.value-(height-point)+bottomOffset;const interpolatedScrollTo=interpolate(e,[initialKeyboardSize.value,keyboardHeight.value],[0,scrollDistanceWithRespectToSnapPoints(relativeScrollTo+scrollPosition.value,snapToOffsets)-scrollPosition.value]);const targetScrollY=Math.max(interpolatedScrollTo,0)+scrollPosition.value;scrollTo(scrollViewAnimatedRef,0,targetScrollY,animated);return interpolatedScrollTo;}if(point<scrollViewPageY.value){const positionOnScreen=visibleRect-bottomOffset;const topOfScreen=scrollPosition.value+point;scrollTo(scrollViewAnimatedRef,0,topOfScreen-positionOnScreen,animated);}return 0;}"
|
|
};
|
|
const c1534_12 = {
|
|
code: "function pnpm_indexTsx2(e){const{mode,keyboardWillAppear,ghostViewSpace,scrollTo,scrollViewAnimatedRef,scrollPosition,interpolate,initialKeyboardSize,keyboardHeight}=this.__closure;if(mode===\"layout\"){return false;}if(!keyboardWillAppear.value&&ghostViewSpace.value>0){scrollTo(scrollViewAnimatedRef,0,scrollPosition.value-interpolate(e,[initialKeyboardSize.value,keyboardHeight.value],[ghostViewSpace.value,0]),false);return true;}return false;}"
|
|
};
|
|
const c1534_13 = {
|
|
code: "function pnpm_indexTsx3(newPosition){const{scrollPosition,maybeScroll,keyboardHeight}=this.__closure;const prevScroll=scrollPosition.value;scrollPosition.value=newPosition;maybeScroll(keyboardHeight.value,true);scrollPosition.value=prevScroll;}"
|
|
};
|
|
const c1534_14 = {
|
|
code: "function pnpm_indexTsx4(e){const{interpolate,keyboardHeight,extraKeyboardSpace,currentKeyboardFrameHeight}=this.__closure;const keyboardFrame=interpolate(e.height,[0,keyboardHeight.value],[0,keyboardHeight.value+extraKeyboardSpace]);currentKeyboardFrameHeight.value=keyboardFrame;}"
|
|
};
|
|
const c1534_15 = {
|
|
code: "function pnpm_indexTsx5(){const{lastSelection,input,layout,clamp}=this.__closure;var _lastSelection$value,_input$value;const customHeight=(_lastSelection$value=lastSelection.value)===null||_lastSelection$value===void 0?void 0:_lastSelection$value.selection.end.y;if(!((_input$value=input.value)!==null&&_input$value!==void 0&&_input$value.layout)||!customHeight){return false;}layout.value={...input.value,layout:{...input.value.layout,height:clamp(customHeight,0,input.value.layout.height)}};return true;}"
|
|
};
|
|
const c1534_16 = {
|
|
code: "function pnpm_indexTsx6(){const{layout,updateLayoutFromSelection,performScrollWithPositionRestoration,position}=this.__closure;const prevLayout=layout.value;if(!updateLayoutFromSelection()){return;}performScrollWithPositionRestoration(position.value);layout.value=prevLayout;}"
|
|
};
|
|
const c1534_17 = {
|
|
code: "function pnpm_indexTsx7(){const{scrollFromCurrentPosition}=this.__closure;scrollFromCurrentPosition();}"
|
|
};
|
|
const c1534_18 = {
|
|
code: "function pnpm_indexTsx8(e){const{lastSelection,selectionUpdatedSinceHide,pendingSelectionForFocus,updateLayoutFromSelection,keyboardWillAppear,keyboardHeight,position,maybeScroll,scrollFromCurrentPosition,onChangeTextHandler}=this.__closure;var _lastSelection$value,_lastSelection$value2;const lastTarget=(_lastSelection$value=lastSelection.value)===null||_lastSelection$value===void 0?void 0:_lastSelection$value.target;const latestSelection=(_lastSelection$value2=lastSelection.value)===null||_lastSelection$value2===void 0?void 0:_lastSelection$value2.selection;lastSelection.value=e;selectionUpdatedSinceHide.value=true;if(e.target!==lastTarget||pendingSelectionForFocus.value){if(pendingSelectionForFocus.value){pendingSelectionForFocus.value=false;updateLayoutFromSelection();if(!keyboardWillAppear.value&&keyboardHeight.value>0){position.value+=maybeScroll(keyboardHeight.value,true);}}return;}if(e.selection.end.position===e.selection.start.position&&(latestSelection===null||latestSelection===void 0?void 0:latestSelection.end.y)!==e.selection.end.y){return scrollFromCurrentPosition();}if(e.selection.start.position!==e.selection.end.position){return scrollFromCurrentPosition();}onChangeTextHandler();}"
|
|
};
|
|
const c1534_19 = {
|
|
code: "function pnpm_indexTsx9(e){const{keyboardHeight,keyboardWillAppear,tag,initialKeyboardSize,scrollPosition,scrollBeforeKeyboardMovement,pendingSelectionForFocus,position,mode,syncKeyboardFrame,lastSelection,selectionUpdatedSinceHide,updateLayoutFromSelection,input,layout,maybeScroll,ghostViewSpace,scrollViewLayout,scrollViewContentSize}=this.__closure;const keyboardWillChangeSize=keyboardHeight.value!==e.height&&e.height>0;keyboardWillAppear.value=e.height>0&&keyboardHeight.value===0;const keyboardWillHide=e.height===0;const focusWasChanged=tag.value!==e.target&&e.target!==-1||keyboardWillChangeSize;if(keyboardWillChangeSize){initialKeyboardSize.value=keyboardHeight.value;}if(keyboardWillHide){initialKeyboardSize.value=0;scrollPosition.value=scrollBeforeKeyboardMovement.value;pendingSelectionForFocus.value=false;}if(keyboardWillAppear.value||keyboardWillChangeSize||focusWasChanged){scrollPosition.value=position.value;keyboardHeight.value=e.height;if(mode===\"insets\"){syncKeyboardFrame(e);}}if(focusWasChanged){var _lastSelection$value;tag.value=e.target;if(((_lastSelection$value=lastSelection.value)===null||_lastSelection$value===void 0?void 0:_lastSelection$value.target)===e.target&&selectionUpdatedSinceHide.value){updateLayoutFromSelection();pendingSelectionForFocus.value=false;}else{var _lastSelection$value2;if(((_lastSelection$value2=lastSelection.value)===null||_lastSelection$value2===void 0?void 0:_lastSelection$value2.target)===e.target){updateLayoutFromSelection();}else if(input.value){layout.value=input.value;}pendingSelectionForFocus.value=true;}scrollBeforeKeyboardMovement.value=position.value;}if(focusWasChanged&&!keyboardWillAppear.value){if(!pendingSelectionForFocus.value){position.value+=maybeScroll(e.height,true);}}if(mode===\"insets\"){ghostViewSpace.value=position.value+scrollViewLayout.value.height-scrollViewContentSize.value.height;if(ghostViewSpace.value>0){scrollPosition.value=position.value;}}}"
|
|
};
|
|
const c1534_20 = {
|
|
code: "function pnpm_indexTsx10(e){const{removeGhostPadding,mode,syncKeyboardFrame,disableScrollOnKeyboardHide,keyboardWillAppear,maybeScroll}=this.__closure;if(removeGhostPadding(e.height)){return;}if(mode===\"layout\"){syncKeyboardFrame(e);}if(!disableScrollOnKeyboardHide||keyboardWillAppear.value){maybeScroll(e.height);}}"
|
|
};
|
|
const c1534_21 = {
|
|
code: "function pnpm_indexTsx11(e){const{removeGhostPadding,keyboardHeight,scrollPosition,position,selectionUpdatedSinceHide,keyboardWillAppear,pendingSelectionForFocus,syncKeyboardFrame}=this.__closure;removeGhostPadding(e.height);keyboardHeight.value=e.height;scrollPosition.value=position.value;if(e.height===0){selectionUpdatedSinceHide.value=false;}else if(keyboardWillAppear.value){pendingSelectionForFocus.value=false;}syncKeyboardFrame(e);}"
|
|
};
|
|
const c1534_22 = {
|
|
code: "function pnpm_indexTsx12(){const{scrollFromCurrentPosition}=this.__closure;scrollFromCurrentPosition();}"
|
|
};
|
|
const c1534_23 = {
|
|
code: "function pnpm_indexTsx13(){const{input}=this.__closure;return input.value;}"
|
|
};
|
|
const c1534_24 = {
|
|
code: "function pnpm_indexTsx14(current,previous){const{scrollFromCurrentPosition}=this.__closure;if((current===null||current===void 0?void 0:current.target)===(previous===null||previous===void 0?void 0:previous.target)&&(current===null||current===void 0?void 0:current.layout.height)!==(previous===null||previous===void 0?void 0:previous.layout.height)){scrollFromCurrentPosition();}}"
|
|
};
|
|
const c1534_25 = {
|
|
code: "function pnpm_indexTsx15(){const{enabled,currentKeyboardFrameHeight}=this.__closure;return enabled?currentKeyboardFrameHeight.value:0;}"
|
|
};
|
|
const c1534_26 = {
|
|
code: "function pnpm_indexTsx16(){const{enabled,mode,currentKeyboardFrameHeight}=this.__closure;return enabled&&mode===\"layout\"?{paddingBottom:currentKeyboardFrameHeight.value+1}:{};}"
|
|
};
|
|
export default forwardRef((a0, a1) => {
|
|
let r269;
|
|
let env13241 = {
|
|
$parent: env1534
|
|
};
|
|
const { children, onLayout, bottomOffset: _bottomOffset, disableScrollOnKeyboardHide: _disableScrollOnKeyboardHide, enabled: _enabled, extraKeyboardSpace: _extraKeyboardSpace, mode: _mode, ScrollViewComponent: _ScrollViewComponent, snapToOffsets, ...props } = a0;
|
|
env13241[0] = onLayout;
|
|
let bottomOffset = a0.bottomOffset;
|
|
if (bottomOffset === void 0) {
|
|
bottomOffset = 0;
|
|
}
|
|
env13241[1] = bottomOffset;
|
|
let disableScrollOnKeyboardHide = a0.disableScrollOnKeyboardHide;
|
|
if (disableScrollOnKeyboardHide === void 0) {
|
|
disableScrollOnKeyboardHide = false;
|
|
}
|
|
env13241[2] = disableScrollOnKeyboardHide;
|
|
let enabled = a0.enabled;
|
|
if (enabled === void 0) {
|
|
enabled = true;
|
|
}
|
|
env13241[3] = enabled;
|
|
let extraKeyboardSpace = a0.extraKeyboardSpace;
|
|
if (extraKeyboardSpace === void 0) {
|
|
extraKeyboardSpace = 0;
|
|
}
|
|
env13241[4] = extraKeyboardSpace;
|
|
let mode = a0.mode;
|
|
if (mode === void 0) {
|
|
mode = "insets";
|
|
}
|
|
env13241[5] = mode;
|
|
let ScrollViewComponent = a0.ScrollViewComponent;
|
|
if (ScrollViewComponent === void 0) {
|
|
ScrollViewComponent = Module1606.ScrollView;
|
|
}
|
|
env13241[6] = snapToOffsets;
|
|
env13241[7] = void 0;
|
|
env13241[8] = void 0;
|
|
env13241[9] = void 0;
|
|
env13241[10] = void 0;
|
|
env13241[11] = void 0;
|
|
env13241[12] = void 0;
|
|
env13241[13] = void 0;
|
|
env13241[14] = void 0;
|
|
env13241[15] = void 0;
|
|
env13241[16] = void 0;
|
|
env13241[17] = void 0;
|
|
env13241[18] = void 0;
|
|
env13241[19] = void 0;
|
|
env13241[20] = void 0;
|
|
env13241[21] = void 0;
|
|
env13241[22] = void 0;
|
|
env13241[23] = void 0;
|
|
env13241[24] = void 0;
|
|
env13241[25] = void 0;
|
|
env13241[26] = void 0;
|
|
env13241[27] = void 0;
|
|
env13241[28] = void 0;
|
|
env13241[29] = void 0;
|
|
env13241[30] = void 0;
|
|
env13241[31] = void 0;
|
|
env13241[32] = void 0;
|
|
env13241[33] = void 0;
|
|
env13241[34] = void 0;
|
|
env13241[35] = void 0;
|
|
env13241[36] = void 0;
|
|
env13241[37] = void 0;
|
|
const animatedRef = useAnimatedRef();
|
|
env13241[7] = animatedRef;
|
|
const ref = Module19.useRef(null);
|
|
env13241[8] = ref;
|
|
const ref2 = _default(animatedRef, ref);
|
|
const sharedValue3 = useSharedValue(null);
|
|
env13241[9] = sharedValue3;
|
|
const sharedValue7 = useSharedValue(0);
|
|
env13241[10] = sharedValue7;
|
|
const r70 = _default2(animatedRef);
|
|
const offset = r70.offset;
|
|
env13241[11] = offset;
|
|
const layout = r70.layout;
|
|
env13241[12] = layout;
|
|
const size = r70.size;
|
|
env13241[13] = size;
|
|
const sharedValue = useSharedValue(0);
|
|
env13241[14] = sharedValue;
|
|
const sharedValue8 = useSharedValue(0);
|
|
env13241[15] = sharedValue8;
|
|
const sharedValue5 = useSharedValue(false);
|
|
env13241[16] = sharedValue5;
|
|
const sharedValue14 = useSharedValue(-1);
|
|
env13241[17] = sharedValue14;
|
|
const sharedValue13 = useSharedValue(0);
|
|
env13241[18] = sharedValue13;
|
|
const sharedValue12 = useSharedValue(0);
|
|
env13241[19] = sharedValue12;
|
|
const reanimatedFocusedInput = useReanimatedFocusedInput();
|
|
const input = reanimatedFocusedInput.input;
|
|
env13241[20] = input;
|
|
const update = reanimatedFocusedInput.update;
|
|
env13241[21] = update;
|
|
const sharedValue10 = useSharedValue(null);
|
|
env13241[22] = sharedValue10;
|
|
const sharedValue11 = useSharedValue(null);
|
|
env13241[23] = sharedValue11;
|
|
const sharedValue9 = useSharedValue(-1);
|
|
env13241[24] = sharedValue9;
|
|
const sharedValue4 = useSharedValue(false);
|
|
env13241[25] = sharedValue4;
|
|
const sharedValue6 = useSharedValue(false);
|
|
env13241[26] = sharedValue6;
|
|
const sharedValue2 = useSharedValue(0);
|
|
env13241[27] = sharedValue2;
|
|
const height = useWindowDimensions().height;
|
|
env13241[28] = height;
|
|
let c13242_0 = async (c29037_0) => {
|
|
let c29037_3 = 0;
|
|
let c31251_0;
|
|
L15: {
|
|
try {
|
|
c31251_0 = void 0;
|
|
const value = findNodeHandle(env13241[7].current);
|
|
env13241[9].value = value;
|
|
const r34 = env13241[0];
|
|
if (r34 != null) {
|
|
r34(c29037_0);
|
|
}
|
|
if (value !== null) {
|
|
c29037_3 = 1;
|
|
c31251_0 = (await KeyboardControllerNative.viewPositionInWindow(value)).y;
|
|
env13241[27].value = c31251_0;
|
|
c29037_3 = 0;
|
|
break L15;
|
|
}
|
|
} catch ($e) {
|
|
let r26 = $e;
|
|
if (c29037_3 !== 0) {
|
|
while (true) {
|
|
try {
|
|
c29037_3 = 0;
|
|
break L15;
|
|
} catch ($e) {
|
|
r26 = $e;
|
|
if (c29037_3 === 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
throw r26;
|
|
}
|
|
return void 0;
|
|
}
|
|
};
|
|
const callback3 = useCallback(function(a0) {
|
|
return c13242_0.apply(this, arguments);
|
|
}, [onLayout]);
|
|
const M = function M(a0, r9 = false) {
|
|
if (env13241[3]) {
|
|
const r6 = env13241[22];
|
|
if (r6.value?.parentScrollViewTarget !== env13241[9].value) {
|
|
return 0;
|
|
}
|
|
const r10 = env13241[28];
|
|
const r24 = env13241[15];
|
|
const r8 = r10 - r24.value;
|
|
const value = r6.value;
|
|
const r27 = (value == null ? void 0 : value.layout.absoluteY) || 0;
|
|
const value2 = r6.value;
|
|
const r33 = r27 + ((value2 == null ? void 0 : value2.layout.height) || 0);
|
|
const r34 = r8 - r33;
|
|
const r35 = env13241[1];
|
|
if (r34 <= r35) {
|
|
const r51 = r24.value - (r10 - r33) + r35;
|
|
const r61 = [env13241[18].value, r24.value];
|
|
const r66 = env13241[10];
|
|
const r74 = _Module1606.interpolate(a0, r61, [0, _Module1818.scrollDistanceWithRespectToSnapPoints(r51 + r66.value, env13241[6]) - r66.value]);
|
|
_Module1606.scrollTo(env13241[7], 0, Math.max(r74, 0) + r66.value, r9);
|
|
return r74;
|
|
}
|
|
if (r33 < env13241[27].value) {
|
|
_Module1606.scrollTo(env13241[7], 0, env13241[10].value + r33 - (r8 - r35), r9);
|
|
}
|
|
return 0;
|
|
}
|
|
return 0;
|
|
};
|
|
M.__closure = {
|
|
enabled,
|
|
layout: sharedValue10,
|
|
scrollViewTarget: sharedValue3,
|
|
height,
|
|
keyboardHeight: sharedValue8,
|
|
bottomOffset,
|
|
interpolate: _Module1606.interpolate,
|
|
initialKeyboardSize: sharedValue13,
|
|
scrollDistanceWithRespectToSnapPoints: _Module1818.scrollDistanceWithRespectToSnapPoints,
|
|
scrollPosition: sharedValue7,
|
|
snapToOffsets,
|
|
scrollTo: _Module1606.scrollTo,
|
|
scrollViewAnimatedRef: animatedRef,
|
|
scrollViewPageY: sharedValue2
|
|
};
|
|
M.__workletHash = 1454504363777;
|
|
M.__initData = c1534_11;
|
|
const callback4 = useCallback(M, [bottomOffset, enabled, height, snapToOffsets]);
|
|
env13241[29] = callback4;
|
|
const Y = function Y(a0) {
|
|
let r1 = env13241[5] !== "layout" && !env13241[16].value && env13241[24].value > 0;
|
|
if (r1) {
|
|
_Module1606.scrollTo(env13241[7], 0, env13241[10].value - _Module1606.interpolate(a0, [env13241[18].value, env13241[15].value], [env13241[24].value, 0]), false);
|
|
r1 = true;
|
|
}
|
|
return r1;
|
|
};
|
|
Y.__closure = {
|
|
mode,
|
|
keyboardWillAppear: sharedValue5,
|
|
ghostViewSpace: sharedValue9,
|
|
scrollTo: _Module1606.scrollTo,
|
|
scrollViewAnimatedRef: animatedRef,
|
|
scrollPosition: sharedValue7,
|
|
interpolate: _Module1606.interpolate,
|
|
initialKeyboardSize: sharedValue13,
|
|
keyboardHeight: sharedValue8
|
|
};
|
|
Y.__workletHash = 17351526068375;
|
|
Y.__initData = c1534_12;
|
|
const callback5 = useCallback(Y, [mode]);
|
|
env13241[30] = callback5;
|
|
const I = function I(a0) {
|
|
const r3 = env13241[10];
|
|
const value = r3.value;
|
|
r3.value = a0;
|
|
(0, env13241[29])(env13241[15].value, true);
|
|
r3.value = value;
|
|
};
|
|
I.__closure = {
|
|
scrollPosition: sharedValue7,
|
|
maybeScroll: callback4,
|
|
keyboardHeight: sharedValue8
|
|
};
|
|
I.__workletHash = 1481901193395;
|
|
I.__initData = c1534_13;
|
|
const callback6 = useCallback(I, [sharedValue7, sharedValue8, callback4]);
|
|
env13241[31] = callback6;
|
|
const B = function B({ height }) {
|
|
const r11 = env13241[15];
|
|
env13241[14].value = _Module1606.interpolate(height, [0, r11.value], [0, r11.value + env13241[4]]);
|
|
};
|
|
B.__closure = {
|
|
interpolate: _Module1606.interpolate,
|
|
keyboardHeight: sharedValue8,
|
|
extraKeyboardSpace,
|
|
currentKeyboardFrameHeight: sharedValue
|
|
};
|
|
B.__workletHash = 6643520179794;
|
|
B.__initData = c1534_14;
|
|
const callback7 = useCallback(B, [extraKeyboardSpace]);
|
|
env13241[32] = callback7;
|
|
const G = function G() {
|
|
const value = env13241[23].value;
|
|
const r10 = value == null ? void 0 : value.selection.end.y;
|
|
const r7 = env13241[20];
|
|
const layout = r7.value?.layout;
|
|
let r19 = layout ? !r10 : !layout;
|
|
if (!r19) {
|
|
env13241[22].value = {
|
|
...r7.value,
|
|
layout: {
|
|
...r7.value.layout,
|
|
height: _Module1606.clamp(r10, 0, r7.value.layout.height)
|
|
}
|
|
};
|
|
r19 = 0;
|
|
}
|
|
return !r19;
|
|
};
|
|
G.__closure = {
|
|
lastSelection: sharedValue11,
|
|
input,
|
|
layout: sharedValue10,
|
|
clamp: _Module1606.clamp
|
|
};
|
|
G.__workletHash = 619310634941;
|
|
G.__initData = c1534_15;
|
|
const callback2 = useCallback(G, [input, sharedValue11, sharedValue10]);
|
|
env13241[33] = callback2;
|
|
const E = function E() {
|
|
const r2 = env13241[22];
|
|
const value = r2.value;
|
|
if ((0, env13241[33])()) {
|
|
(0, env13241[31])(env13241[11].value);
|
|
r2.value = value;
|
|
}
|
|
};
|
|
E.__closure = {
|
|
layout: sharedValue10,
|
|
updateLayoutFromSelection: callback2,
|
|
performScrollWithPositionRestoration: callback6,
|
|
position: offset
|
|
};
|
|
E.__workletHash = 11406147562112;
|
|
E.__initData = c1534_16;
|
|
const callback8 = useCallback(E, [callback6]);
|
|
env13241[34] = callback8;
|
|
const j = function j() {
|
|
(0, env13241[34])();
|
|
};
|
|
j.__closure = {
|
|
scrollFromCurrentPosition: callback8
|
|
};
|
|
j.__workletHash = 1300972162638;
|
|
j.__initData = c1534_17;
|
|
const callback9 = useCallback(j, [callback8]);
|
|
env13241[35] = callback9;
|
|
const onChangeTextHandler = (0, useMemo)(() => debounce(env13241[35], 200), [callback9]);
|
|
env13241[36] = onChangeTextHandler;
|
|
const N = function N(a0) {
|
|
let r38;
|
|
const r8 = env13241[23];
|
|
const target = r8.value?.target;
|
|
const selection = r8.value?.selection;
|
|
r8.value = a0;
|
|
env13241[26].value = true;
|
|
if (a0.target === target && !env13241[25].value) {
|
|
if (!(a0.selection.end.position === a0.selection.start.position && (selection == null ? void 0 : selection.end.y) !== a0.selection.end.y) && a0.selection.start.position === a0.selection.end.position) {
|
|
(0, env13241[36])();
|
|
r38 = void 0;
|
|
} else {
|
|
r38 = (0, env13241[34])();
|
|
}
|
|
return r38;
|
|
}
|
|
const r40 = env13241[25];
|
|
if (r40.value) {
|
|
r40.value = false;
|
|
(0, env13241[33])();
|
|
const value = env13241[16].value;
|
|
if (value ? !value : env13241[15].value > 0) {
|
|
const r50 = env13241[11];
|
|
r50.value = r50.value + (0, env13241[29])(env13241[15].value, true);
|
|
}
|
|
}
|
|
};
|
|
N.__closure = {
|
|
lastSelection: sharedValue11,
|
|
selectionUpdatedSinceHide: sharedValue6,
|
|
pendingSelectionForFocus: sharedValue4,
|
|
updateLayoutFromSelection: callback2,
|
|
keyboardWillAppear: sharedValue5,
|
|
keyboardHeight: sharedValue8,
|
|
position: offset,
|
|
maybeScroll: callback4,
|
|
scrollFromCurrentPosition: callback8,
|
|
onChangeTextHandler
|
|
};
|
|
N.__workletHash = 7363285427351;
|
|
N.__initData = c1534_18;
|
|
const callback = useCallback(N, [callback8, onChangeTextHandler, callback2, callback4]);
|
|
useFocusedInputHandler({
|
|
onSelectionChange: callback
|
|
}, [callback]);
|
|
const Q = function Q(a0) {
|
|
const r11 = env13241[15];
|
|
const r3 = r11.value !== a0.height && a0.height > 0;
|
|
const r15 = env13241[16];
|
|
r15.value = a0.height > 0 && r11.value === 0;
|
|
const height = a0.height;
|
|
const r10 = env13241[17];
|
|
let r20 = r10.value !== a0.target && a0.target !== -1 || r3;
|
|
if (r3) {
|
|
env13241[18].value = r11.value;
|
|
}
|
|
if (height === 0) {
|
|
env13241[18].value = 0;
|
|
env13241[10].value = env13241[19].value;
|
|
env13241[25].value = false;
|
|
}
|
|
if (r15.value || r3 || r20) {
|
|
env13241[10].value = env13241[11].value;
|
|
r11.value = a0.height;
|
|
if (env13241[5] === "insets") {
|
|
(0, env13241[32])(a0);
|
|
}
|
|
}
|
|
if (r20) {
|
|
r10.value = a0.target;
|
|
const r40 = env13241[23];
|
|
if (r40.value?.target === a0.target && env13241[26].value) {
|
|
(0, env13241[33])();
|
|
env13241[25].value = false;
|
|
} else {
|
|
if (r40.value?.target === a0.target) {
|
|
(0, env13241[33])();
|
|
} else {
|
|
const r52 = env13241[20];
|
|
if (r52.value) {
|
|
env13241[22].value = r52.value;
|
|
}
|
|
}
|
|
env13241[25].value = true;
|
|
}
|
|
env13241[19].value = env13241[11].value;
|
|
}
|
|
if (r20) {
|
|
r20 = !r15.value;
|
|
}
|
|
if (r20 && !env13241[25].value) {
|
|
const r70 = env13241[11];
|
|
r70.value = r70.value + (0, env13241[29])(a0.height, true);
|
|
}
|
|
if (env13241[5] === "insets") {
|
|
const r80 = env13241[24];
|
|
const r81 = env13241[11];
|
|
r80.value = r81.value + env13241[12].value.height - env13241[13].value.height;
|
|
if (r80.value > 0) {
|
|
env13241[10].value = r81.value;
|
|
}
|
|
}
|
|
};
|
|
Q.__closure = {
|
|
keyboardHeight: sharedValue8,
|
|
keyboardWillAppear: sharedValue5,
|
|
tag: sharedValue14,
|
|
initialKeyboardSize: sharedValue13,
|
|
scrollPosition: sharedValue7,
|
|
scrollBeforeKeyboardMovement: sharedValue12,
|
|
pendingSelectionForFocus: sharedValue4,
|
|
position: offset,
|
|
mode,
|
|
syncKeyboardFrame: callback7,
|
|
lastSelection: sharedValue11,
|
|
selectionUpdatedSinceHide: sharedValue6,
|
|
updateLayoutFromSelection: callback2,
|
|
input,
|
|
layout: sharedValue10,
|
|
maybeScroll: callback4,
|
|
ghostViewSpace: sharedValue9,
|
|
scrollViewLayout: layout,
|
|
scrollViewContentSize: size
|
|
};
|
|
Q.__workletHash = 4279285643383;
|
|
Q.__initData = c1534_19;
|
|
const J = function J(a0) {
|
|
if (!(0, env13241[30])(a0.height)) {
|
|
if (env13241[5] === "layout") {
|
|
(0, env13241[32])(a0);
|
|
}
|
|
if (!(env13241[2] && !env13241[16].value)) {
|
|
(0, env13241[29])(a0.height);
|
|
}
|
|
}
|
|
};
|
|
J.__closure = {
|
|
removeGhostPadding: callback5,
|
|
mode,
|
|
syncKeyboardFrame: callback7,
|
|
disableScrollOnKeyboardHide,
|
|
keyboardWillAppear: sharedValue5,
|
|
maybeScroll: callback4
|
|
};
|
|
J.__workletHash = 15263617220981;
|
|
J.__initData = c1534_20;
|
|
const q = function q(a0) {
|
|
(0, env13241[30])(a0.height);
|
|
env13241[15].value = a0.height;
|
|
env13241[10].value = env13241[11].value;
|
|
if (a0.height === 0) {
|
|
env13241[26].value = false;
|
|
} else if (env13241[16].value) {
|
|
env13241[25].value = false;
|
|
}
|
|
(0, env13241[32])(a0);
|
|
};
|
|
q.__closure = {
|
|
removeGhostPadding: callback5,
|
|
keyboardHeight: sharedValue8,
|
|
scrollPosition: sharedValue7,
|
|
position: offset,
|
|
selectionUpdatedSinceHide: sharedValue6,
|
|
keyboardWillAppear: sharedValue5,
|
|
pendingSelectionForFocus: sharedValue4,
|
|
syncKeyboardFrame: callback7
|
|
};
|
|
q.__workletHash = 15672596601321;
|
|
q.__initData = c1534_21;
|
|
useSmoothKeyboardHandler({
|
|
onStart: Q,
|
|
onMove: J,
|
|
onEnd: q
|
|
}, [mode, callback4, callback5, disableScrollOnKeyboardHide, callback7]);
|
|
const callback10 = useCallback(async () => {
|
|
let env29038;
|
|
const r24 = env13241;
|
|
let c24686_1 = r24;
|
|
const r10 = env29038 = {
|
|
$parent: r24
|
|
};
|
|
let c24686_0 = r10;
|
|
env29038[0] = void 0;
|
|
await (0, env13241[21])();
|
|
const r13 = $mk113982(env13241);
|
|
env29038[0] = r13;
|
|
r13.__closure = {
|
|
scrollFromCurrentPosition: env13241[34]
|
|
};
|
|
env29038[0].__workletHash = 15498084251450;
|
|
env29038[0].__initData = c1534_22;
|
|
runOnUI(env29038[0])();
|
|
}, [update, callback8]);
|
|
env13241[37] = callback10;
|
|
(0, useImperativeHandle)(a1, () => {
|
|
const current = env13241[8].current;
|
|
if (current) {
|
|
current.assureFocusedInputVisible = () => {
|
|
(0, env13241[37])();
|
|
};
|
|
return current;
|
|
}
|
|
return {
|
|
assureFocusedInputVisible: () => {
|
|
(0, env13241[37])();
|
|
}
|
|
};
|
|
}, [callback10]);
|
|
(0, useEffect)(() => {
|
|
(0, env13241[37])();
|
|
}, [bottomOffset]);
|
|
const De = () => env13241[20].value;
|
|
De.__closure = {
|
|
input
|
|
};
|
|
De.__workletHash = 11096167186933;
|
|
De.__initData = c1534_23;
|
|
const Ae = function Ae(a0, a1) {
|
|
if (a0?.target === a1?.target && (a0 == null ? void 0 : a0.layout.height) !== (a1 == null ? void 0 : a1.layout.height)) {
|
|
(0, env13241[34])();
|
|
}
|
|
};
|
|
Ae.__closure = {
|
|
scrollFromCurrentPosition: callback8
|
|
};
|
|
Ae.__workletHash = 5468543936636;
|
|
Ae.__initData = c1534_24;
|
|
useAnimatedReaction(De, Ae, []);
|
|
const Oe = () => env13241[3] ? env13241[14].value : 0;
|
|
Oe.__closure = {
|
|
enabled,
|
|
currentKeyboardFrameHeight: sharedValue
|
|
};
|
|
Oe.__workletHash = 7351587309738;
|
|
Oe.__initData = c1534_25;
|
|
const derivedValue = useDerivedValue(Oe, [enabled]);
|
|
const ze = () => env13241[3] && env13241[5] === "layout" ? {
|
|
paddingBottom: env13241[14].value + 1
|
|
} : {};
|
|
ze.__closure = {
|
|
enabled,
|
|
mode,
|
|
currentKeyboardFrameHeight: sharedValue
|
|
};
|
|
ze.__workletHash = 9098994865676;
|
|
ze.__initData = c1534_26;
|
|
const animatedStyle = useAnimatedStyle(ze, [enabled, mode]);
|
|
if (mode === "layout") {
|
|
const children2 = [children, ,];
|
|
if (enabled) {
|
|
enabled = (0, jsx)(Module1606.View, {
|
|
style: animatedStyle
|
|
});
|
|
}
|
|
children2[1] = enabled;
|
|
r269 = <ScrollViewComponent ref={ref2} {...props} scrollEventThrottle={16} onLayout={callback3}>{children2}</ScrollViewComponent>;
|
|
} else {
|
|
r269 = <Module1820 ref={ref2} {...props} bottomPadding={derivedValue} scrollEventThrottle={16} ScrollViewComponent={ScrollViewComponent} onLayout={callback3}>{children}</Module1820>;
|
|
}
|
|
return r269;
|
|
});
|