This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,25 @@
// Metro module 1583 (f1584).
import * as _Module1584 from "../../_bundle/Module1584";
let initialWindowMetrics = _Module1584.initialWindowMetrics;
if (initialWindowMetrics == null) {
initialWindowMetrics = void 0;
}
let r15 = initialWindowMetrics?.insets;
const r16 = {
top: 0,
bottom: 0,
left: 0,
right: 0
};
if (r15 == null) {
r15 = r16;
}
export { r16 as EMPTY_SAFE_AREA_INSETS };
export const META_QUEST_SAFE_AREA_INSETS = {
top: 4,
bottom: 4,
left: 0,
right: 0
};
export { initialWindowMetrics as INITIAL_SAFE_AREA_METRICS };
export { r15 as INITIAL_SAFE_AREA_INSETS };
@@ -0,0 +1,106 @@
// Metro module 13630 (f13631).
import { useLayoutEffect, useRef, useCallback } from "react";
import { View } from "react-native";
import { jsx } from "react/jsx-runtime";
import { INITIAL_SAFE_AREA_METRICS } from "./SafeAreaConstants.native";
import { batchUpdates } from "../../_bundle/Module705";
import * as _Module1584 from "../../_bundle/Module1584";
import { useSafeAreaInsets } from "../../_bundle/Module1584";
import { useAppEntryKey } from "../window/native/AppEntryKeyContext";
function $mk91695($env) {
return () => {
let META_QUEST_SAFE_AREA_INSETS;
const r2 = $env;
const r9 = r2[0];
const r10 = r2[1];
const r4 = $env.$parent;
const r6 = r4[0];
const r3 = r4[2];
if (r6(r3[3]).isMetaQuest()) {
META_QUEST_SAFE_AREA_INSETS = r6(r3[4]).META_QUEST_SAFE_AREA_INSETS;
} else {
const isAndroid = r6(r3[5]).isAndroid();
META_QUEST_SAFE_AREA_INSETS = r9;
if (isAndroid) {
const r8 = r4[1];
let safeAreaInsets2 = r8(r3[6]).getState().byAppEntry[r10].safeAreaInsets;
const stableSafeAreaInsets = r8(r3[7]).getStableSafeAreaInsets(r10);
let r30 = r9;
if (stableSafeAreaInsets != null) {
if (!(stableSafeAreaInsets.bottom === safeAreaInsets2.bottom && (stableSafeAreaInsets.top === safeAreaInsets2.top && (stableSafeAreaInsets.left === safeAreaInsets2.left && stableSafeAreaInsets.right === safeAreaInsets2.right)))) {
safeAreaInsets2 = {
bottom: stableSafeAreaInsets.bottom,
top: stableSafeAreaInsets.top,
left: r9.left,
right: r9.right
};
}
r30 = safeAreaInsets2;
}
META_QUEST_SAFE_AREA_INSETS = r30;
}
}
let env27546 = {
$parent: $env
};
env27546[0] = META_QUEST_SAFE_AREA_INSETS;
(0, r4[1])(r3[6]).setState((state) => {
const byAppEntry = state.byAppEntry;
const r4 = env27546.$parent[1];
const safeAreaInsets2 = byAppEntry[r4].safeAreaInsets;
const safeAreaInsets3 = env27546[0];
let r11 = state;
if (safeAreaInsets2 !== safeAreaInsets3) {
const byAppEntry2 = {
...state.byAppEntry
};
byAppEntry2[r4] = {
safeAreaInsets: safeAreaInsets3
};
r11 = {
byAppEntry: byAppEntry2
};
}
return r11;
});
};
}
let env9469 = {};
const c9469_6 = {
position: "absolute",
width: 0,
height: 0
};
export function SafeAreaReporter() {
let ref;
const safeAreaInsets = useSafeAreaInsets();
const appEntryKey = useAppEntryKey();
useLayoutEffect(() => {
let env27547;
const r5 = env27547 = {
$parent: env9469
};
env27547[0] = safeAreaInsets;
env27547[1] = appEntryKey;
batchUpdates($mk91695(r5));
}, [safeAreaInsets, appEntryKey]);
ref = useRef(false);
return (0, jsx)(View, {
style: c9469_6,
onLayout: useCallback(() => {
if (!ref.current) {
let env27548;
ref.current = true;
const r7 = env27548 = {
$parent: env9469
};
env27548[0] = safeAreaInsets;
env27548[1] = appEntryKey;
batchUpdates($mk91695(r7));
}
}, [safeAreaInsets, appEntryKey])
});
}
export function SafeAreaProvider(props) {
return <_Module1584.SafeAreaProvider initialMetrics={INITIAL_SAFE_AREA_METRICS} style={props.style}>{props.children}</_Module1584.SafeAreaProvider>;
}
@@ -0,0 +1,13 @@
// Metro module 1582 (f1583).
import { INITIAL_SAFE_AREA_INSETS } from "./SafeAreaConstants.native";
import { create } from "../../_bundle/Module644";
const main = {
safeAreaInsets: INITIAL_SAFE_AREA_INSETS
};
const r19 = create(() => ({
byAppEntry: {
main,
share: main
}
}));
export default r19;
@@ -0,0 +1,8 @@
// Metro module 15699 (f15700).
import { MEDIA_MODAL_KEY } from "../../Constants";
import { OAUTH2_AUTHORIZE_MODAL_KEY, OAUTH2_SUCCESS_RESULT_MODAL_KEY, OAUTH2_ERROR_RESULT_MODAL_KEY } from "../oauth2/native/Constants";
import { isVoiceChannelModalKey } from "../../utils/native/PrivateChannelCallUtils";
let c11212_2 = new Set([MEDIA_MODAL_KEY, OAUTH2_AUTHORIZE_MODAL_KEY, OAUTH2_SUCCESS_RESULT_MODAL_KEY, OAUTH2_ERROR_RESULT_MODAL_KEY]);
export function shouldExcludeSafeAreaForModalKey(a0) {
return a0 != null && (!!isVoiceChannelModalKey(a0) || c11212_2.has(a0));
}
@@ -0,0 +1,12 @@
// Metro module 10423 (f10424).
import * as _AppEntryKeyContext from "../window/native/AppEntryKeyContext";
import SafeAreaStore_native from "./SafeAreaStore.native";
export default function subscribeToSafeAreaInsets(c17945_0, r6 = _AppEntryKeyContext.DEFAULT_APP_ENTRY_KEY) {
const DEFAULT_APP_ENTRY_KEY = r6;
return SafeAreaStore_native.subscribe((a0, a1) => {
const safeAreaInsets = a0.byAppEntry[DEFAULT_APP_ENTRY_KEY].safeAreaInsets;
if (safeAreaInsets !== a1.byAppEntry[DEFAULT_APP_ENTRY_KEY].safeAreaInsets) {
c17945_0(safeAreaInsets);
}
});
};
@@ -0,0 +1,189 @@
// Metro module 9848 (f9849).
import { useRef, useEffect, useCallback } from "react";
import { getWindowDimensions } from "../screen/useWindowDimensions.native";
import Module712 from "../../_bundle/Module712";
import { measureViewRefInWindow, measureViewRefInView, measureViewInWindow } from "../view_measure/ViewMeasureUtils.native";
import { getKeyboardDuration } from "../keyboard/native/useKeyboardDuration";
function $mk115560($env) {
return function calculateScrollOffset() {
return $env[5].apply(this, arguments);
};
}
function $mk115561($env) {
return function calculateTargetScrollY(a0) {
const r6 = a0.scrollView.y + a0.scrollView.height;
const r19 = getWindowDimensions({
ignoreKeyboard: true
}).height - a0.insets.bottom;
if (!(a0.inputInWindow.y + a0.inputInWindow.height + a0.scrollOffset <= r19)) {
const r34 = a0.scrollView.height - Math.max(0, r6 - r19);
const r41 = a0.inputInScrollView.y + a0.inputInScrollView.height + a0.scrollOffset;
if (!(r41 <= r34)) {
return r41 - r34;
}
}
};
}
let env6540 = {};
env6540[5] = function _calculateScrollOffset() {
const r8 = async (c26549_0, c26549_1) => {
let r79, MAX_SAFE_INTEGER, PX_16, value;
let extraOffset;
let c30150_0, c30150_1, c30150_2, c30150_3;
L26: {
L25: {
L17: {
L16: {
c30150_0 = c26549_0;
c30150_1 = c26549_1;
c30150_2 = void 0;
c30150_3 = void 0;
if (c26549_0 == null) {
PX_16 = Module712.space.PX_16;
break L26;
}
const type = c26549_0.type;
if (type === "toRef") {
c30150_2 = await measureViewRefInWindow(c26549_0.ref);
const extraOffset2 = c30150_0.extraOffset;
extraOffset = extraOffset2;
if (extraOffset2 == null) {
extraOffset = 0;
}
c30150_3 = extraOffset;
if (c30150_2 == null) {
r79 = Module712.space.PX_16 + c30150_3;
break L25;
}
r79 = c30150_2.y - (c30150_1.y + c30150_1.height) + c30150_2.height + c30150_3;
break L25;
}
if (type === "toValue") {
value = c26549_0.value;
break L17;
}
if (type === "toBottom") {
MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
break L16;
}
return void 0;
}
return MAX_SAFE_INTEGER;
}
return value;
}
return r79;
}
return PX_16;
};
env6540[5] = r8;
return r8.apply(this, arguments);
};
export default function useSafeAreaAvoidingInputs({ insets, inputs, scrollViewRef }) {
let callback;
callback = void 0;
const ref = useRef(inputs);
useEffect(() => {
ref.current = inputs;
}, [inputs]);
callback = useCallback(async () => {
let c26550_0, c26550_1;
L26: {
L25: {
let env30151;
c26550_1 = void 0;
const r10 = env30151 = {
$parent: env6540
};
c26550_0 = r10;
env30151[0] = void 0;
env30151[1] = void 0;
env30151[2] = void 0;
env30151[3] = void 0;
env30151[4] = void 0;
env30151[5] = void 0;
env30151[6] = void 0;
const current = scrollViewRef.current;
env30151[0] = current;
const r35 = ref.current.find((item) => {
const current = item.ref.current;
return current == null ? void 0 : current.isFocused();
});
env30151[1] = r35;
if (r35 == null) {
break L26;
}
if (current != null) {
env30151[2] = await measureViewRefInWindow(r35.ref);
env30151[3] = await measureViewRefInView(env30151[1].ref, env30151[0]);
if (env30151[2] == null) {
break L25;
}
if (env30151[3] == null) {
break L25;
}
env30151[4] = await measureViewInWindow(env30151[0]);
const offset = env30151[1].offset;
const r117 = env30151[2];
env30151[5] = await $mk115560(env6540)(offset, r117);
if (env30151[5] !== Number.MAX_SAFE_INTEGER) {
const r144 = {
insets,
inputInScrollView: env30151[3],
inputInWindow: env30151[2],
scrollOffset: env30151[5],
scrollView: env30151[4]
};
env30151[6] = $mk115561(env6540)(r144);
if (env30151[6] == null) {
break L25;
}
(function scrollToTargetY(a0, a1) {
const current = a0.current;
const r2 = current == null;
let r4 = void 0;
if (!r2) {
const scrollTo = current.scrollTo;
r4 = scrollTo == null ? void 0 : scrollTo.call(current, {
x: 0,
y: a1,
animated: true
});
}
if (r4 == null) {
const current2 = a0.current;
if (current2 != null) {
const scrollToOffset = current2.scrollToOffset;
if (scrollToOffset != null) {
scrollToOffset.call(current2, {
offset: a1,
animated: true
});
}
}
}
})(scrollViewRef, env30151[6]);
break L25;
}
const current2 = scrollViewRef.current;
if (current2 == null) {
break L25;
}
current2.scrollToEnd({
animated: true
});
break L25;
}
break L26;
}
return void 0;
}
}, [insets, scrollViewRef]);
useEffect(() => {
let c26551_0 = setTimeout(callback, getKeyboardDuration());
return () => clearTimeout(c26551_0);
}, [callback]);
return {
onFocus: callback
};
};
@@ -0,0 +1,10 @@
// Metro module 1581 (f1582).
import { useAppEntryKey, DEFAULT_APP_ENTRY_KEY } from "../window/native/AppEntryKeyContext";
import SafeAreaStore_native from "./SafeAreaStore.native";
export default function useSafeAreaInsets() {
const appEntryKey = useAppEntryKey();
return SafeAreaStore_native((a0) => a0.byAppEntry[appEntryKey].safeAreaInsets);
};
export function getSafeAreaInsets(r2 = DEFAULT_APP_ENTRY_KEY) {
return SafeAreaStore_native.getState().byAppEntry[r2].safeAreaInsets;
}
@@ -0,0 +1,81 @@
// Metro module 5215 (f5216).
import { useCallback, useRef, useState, useEffect } from "react";
import subscribeToKeyboardUIStore from "../keyboard/native/subscribeToKeyboardUIStore";
import { getKeyboardDuration } from "../keyboard/native/useKeyboardDuration";
import { DeprecatedLayoutAnimationKeyboard } from "../animations/native/DeprecatedLayoutAnimation";
import useSafeAreaInsets_native from "./useSafeAreaInsets.native";
import { useAppEntryKey } from "../window/native/AppEntryKeyContext";
import * as _PlatformUtils from "../../utils/PlatformUtils";
import { isIOS } from "../../utils/PlatformUtils";
import { getSystemKeyboardHeight } from "../keyboard/native/useSystemKeyboardHeight.native";
import { getKeyboardType } from "../keyboard/native/useKeyboardType";
import { KeyboardTypes } from "../keyboard/native/KeyboardTypes";
import { getCustomKeyboardHeight } from "../keyboard/native/useCustomKeyboardHeight";
export default function useSafeAreaInsetsKeyboardAware(r3 = {}) {
let isKeyboardAwareOnIOS = r3.isKeyboardAwareOnIOS;
if (isKeyboardAwareOnIOS === void 0) {
isKeyboardAwareOnIOS = true;
}
let ref, setState;
let c14762_0 = isKeyboardAwareOnIOS;
let isKeyboardAwareOnAndroid = r3.isKeyboardAwareOnAndroid;
if (isKeyboardAwareOnAndroid === void 0) {
isKeyboardAwareOnAndroid = true;
}
let c14762_1 = isKeyboardAwareOnAndroid;
let includeCustomKeyboardHeight = r3.includeCustomKeyboardHeight;
if (includeCustomKeyboardHeight === void 0) {
includeCustomKeyboardHeight = true;
}
let c14762_2 = includeCustomKeyboardHeight;
let includeKeyboardHeight = r3.includeKeyboardHeight;
if (includeKeyboardHeight === void 0) {
includeKeyboardHeight = false;
}
ref = void 0;
setState = void 0;
const safeAreaInsets_native = useSafeAreaInsets_native();
const appEntryKey = useAppEntryKey();
const callback = useCallback(() => {
if (isIOS() && !c14762_0) {
return 0;
}
if (_PlatformUtils.isAndroid() && !c14762_1) {
return 0;
}
let r23 = getSystemKeyboardHeight({
appEntryKey
});
if (r23 === 0) {
r23 = getKeyboardType(appEntryKey) !== KeyboardTypes.SYSTEM ? c14762_2 ? getCustomKeyboardHeight(appEntryKey) : 0 : 0;
}
return r23;
}, [appEntryKey, includeCustomKeyboardHeight, isKeyboardAwareOnIOS, isKeyboardAwareOnAndroid]);
ref = useRef(callback());
let state;
[state, setState] = useState(ref.current);
useEffect(() => subscribeToKeyboardUIStore(function() {
const current = callback();
if (ref.current !== current) {
ref.current = current;
setState(current);
}
}), [callback, isKeyboardAwareOnIOS, isKeyboardAwareOnAndroid]);
const isAndroid = (isKeyboardAwareOnIOS ? !includeKeyboardHeight : !isKeyboardAwareOnIOS) || _PlatformUtils.isAndroid();
const ref2 = useRef(false);
useEffect(() => {
const keyboardDuration = getKeyboardDuration();
if (ref2.current && (keyboardDuration !== 0 && !isAndroid)) {
DeprecatedLayoutAnimationKeyboard(keyboardDuration);
} else {
ref2.current = true;
}
}, [state, isAndroid]);
const bottom = includeKeyboardHeight ? state : 0;
return {
insets: state > 0 ? {
...safeAreaInsets_native,
bottom
} : safeAreaInsets_native
};
};
@@ -0,0 +1,43 @@
// Metro module 10422 (f10423).
import { makeMutable } from "../reanimated/ReanimatedRexport";
import { getSafeAreaInsets } from "./useSafeAreaInsets.native";
import subscribeToSafeAreaInsets_native from "./subscribeToSafeAreaInsets.native";
import updateSharedValueIfChanged_native from "../reanimated/utils/updateSharedValueIfChanged.native";
import { APP_ENTRY_KEYS } from "../window/native/AppEntryKey";
import { useAppEntryKey } from "../window/native/AppEntryKeyContext";
let __initData;
const safeAreaInsetsSharedValues = {
main: makeMutable({
...getSafeAreaInsets("main")
}),
share: makeMutable({
...getSafeAreaInsets("share")
})
};
const _loop = function _loop(a0) {
let c17944_0 = a0;
subscribeToSafeAreaInsets_native((a0) => {
updateSharedValueIfChanged_native(safeAreaInsetsSharedValues[c17944_0], a0);
}, a0);
};
for (const item of APP_ENTRY_KEYS) {
_loop(item);
}
__initData = {
code: "function getSafeAreaInsetsWorklet_useSafeAreaInsetsSharedValueNativeTsx1(appEntryKey='main'){const{safeAreaInsetsSharedValues}=this.__closure;return safeAreaInsetsSharedValues[appEntryKey].get();}"
};
const r63 = (function() {
const getSafeAreaInsetsWorklet = function getSafeAreaInsetsWorklet(r2 = "main") {
return safeAreaInsetsSharedValues[r2].get();
};
getSafeAreaInsetsWorklet.__closure = {
safeAreaInsetsSharedValues
};
getSafeAreaInsetsWorklet.__workletHash = 5220247127549;
getSafeAreaInsetsWorklet.__initData = __initData;
return getSafeAreaInsetsWorklet;
})();
export default function useSafeAreaInsetsSharedValue() {
return safeAreaInsetsSharedValues[useAppEntryKey()];
};
export { r63 as getSafeAreaInsetsWorklet };
@@ -0,0 +1,28 @@
// Metro module 10664 (f10665).
import { useState, useEffect } from "react";
import { useAppEntryKey, DEFAULT_APP_ENTRY_KEY } from "../window/native/AppEntryKeyContext";
import { isAndroid } from "../../utils/PlatformUtils";
import Module1593 from "../../_bundle/Module1593";
import { getSafeAreaInsets } from "./useSafeAreaInsets.native";
import subscribeToSafeAreaInsets_native from "./subscribeToSafeAreaInsets.native";
export default function useStableSafeAreaInsets() {
const appEntryKey = useAppEntryKey();
const [state, setState] = useState(() => {
let r4 = appEntryKey;
if (appEntryKey === void 0) {
r4 = DEFAULT_APP_ENTRY_KEY;
}
return isAndroid() ? Module1593.getStableSafeAreaInsets(r4) : getSafeAreaInsets(r4);
});
useEffect(() => subscribeToSafeAreaInsets_native(() => {
let r5 = appEntryKey;
if (appEntryKey === void 0) {
r5 = DEFAULT_APP_ENTRY_KEY;
}
setState(isAndroid() ? Module1593.getStableSafeAreaInsets(r5) : getSafeAreaInsets(r5));
}, appEntryKey), [appEntryKey]);
return state;
};
export function getStableSafeAreaInsets(r4 = DEFAULT_APP_ENTRY_KEY) {
return isAndroid() ? Module1593.getStableSafeAreaInsets(r4) : getSafeAreaInsets(r4);
}