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,98 @@
// Metro module 9241 (f9242).
import { forwardRef, useRef, useEffect, useImperativeHandle, useCallback, useMemo } from "react";
import ReanimatedRexport from "../reanimated/ReanimatedRexport";
import Module9242, { Commands } from "../../_bundle/Module9242";
import { createBottomSheetScrollableComponent, SCROLLABLE_TYPE } from "../../_bundle/Module5245";
import useFastestListComputedStyles_android from "./useFastestListComputedStyles.android";
import useFastestListUnexpectedItemSizeCallback_android from "./useFastestListUnexpectedItemSizeCallback.android";
import useFastestListPropsEstimatedListSize_native from "./props/useFastestListPropsEstimatedListSize.native";
import useFastestListPropsPlaceholder_android from "./props/useFastestListPropsPlaceholder.android";
import useFastestListSections_android from "./useFastestListSections.android";
import useFastestListPropsScrollReporting_native from "./props/useFastestListPropsScrollReporting.native";
import FastestListChildren_android from "./FastestListChildren.android";
import FastestList_ios from "./FastestList.ios";
const AnimatedComponent2 = ReanimatedRexport.createAnimatedComponent(Module9242);
const AnimatedComponent = ReanimatedRexport.createAnimatedComponent(Module9242);
const BottomSheetScrollableComponent = createBottomSheetScrollableComponent(SCROLLABLE_TYPE.SCROLLVIEW, AnimatedComponent2);
let c6074_9 = 0;
const r45 = forwardRef(function FastestList(props, a1) {
let Component, callback, fastestListPropsEstimatedListSize_native, fastestListPropsPlaceholder_android, fastestListSections_android, fastestListUnexpectedItemSizeCallback_android, marginEnd, marginStart, onScroll, onScrollBeginDrag, onScrollEndDrag, style2, wrapChildren;
let ref, ref2, ref3;
const current = props;
const { accessibilityLabel, enabled = true, estimatedListSize, horizontal: horizontal2 = false, keyboardDismissMode, keyExtractor, inActionSheet = false, insetStart: insetStart2 = 0, insetEnd: insetEnd2 = 0, itemSize, listId, listFooterSize, listFooterAlwaysMounted, listHeaderSize, listHeaderAlwaysMounted, onLayout, placeholderConfig, placeholdersForceEnabled, renderAhead: renderAhead2 = "nominal", renderItem, renderListFooter, renderListHeader, renderSectionHeader, renderSectionFooter, scrollEventThrottle: scrollEventThrottle2 = 32, scrollReporting, sections, sectionHeaderSize, sectionFooterSize, showsHorizontalScrollIndicator: showsHorizontalScrollIndicator2 = true, showsVerticalScrollIndicator: showsVerticalScrollIndicator2 = true } = props;
L25: {
const style = props.style;
wrapChildren = props.wrapChildren;
ref = useRef(null);
ref2 = useRef(null);
ref3 = useRef(props);
useEffect(() => {
ref3.current = current;
}, [props]);
const fastestListComputedStyles_android = useFastestListComputedStyles_android({
style
});
style2 = fastestListComputedStyles_android.style;
marginEnd = fastestListComputedStyles_android.marginEnd;
marginStart = fastestListComputedStyles_android.marginStart;
useImperativeHandle(a1, () => ({
scrollToTop: function scrollToTop(r5 = false) {
if (ref.current != null) {
Commands.scrollToTop(ref.current, r5);
}
},
scrollToLocation: ({ section, item, animated = false, paddingStart = 0 }) => {
if (ref.current != null) {
Commands.scrollToLocation(ref.current, section, item, animated, paddingStart);
}
}
}));
fastestListUnexpectedItemSizeCallback_android = useFastestListUnexpectedItemSizeCallback_android(ref3);
callback = useCallback((a0) => {
const current2 = ref2.current;
if (current2 != null) {
current2.setVisibleItems(a0.nativeEvent);
}
}, [ref2]);
fastestListPropsEstimatedListSize_native = useFastestListPropsEstimatedListSize_native({
estimatedListSize,
horizontal: horizontal2
});
fastestListPropsPlaceholder_android = useFastestListPropsPlaceholder_android(placeholderConfig);
fastestListSections_android = useFastestListSections_android({
fastestListId: useMemo(() => {
const r5 = listId != null ? listId : "fst";
const r4 = +c6074_9;
c6074_9 = r4 + 1;
return `${r5}-${r4}`;
}, [listId]),
itemSize,
keyExtractor,
listFooterSize,
listHeaderSize,
sections,
sectionHeaderSize,
sectionFooterSize
});
const fastestListPropsScrollReporting_native = useFastestListPropsScrollReporting_native(props, horizontal2);
onScroll = fastestListPropsScrollReporting_native.onScroll;
onScrollBeginDrag = fastestListPropsScrollReporting_native.onScrollBeginDrag;
onScrollEndDrag = fastestListPropsScrollReporting_native.onScrollEndDrag;
if (inActionSheet) {
Component = BottomSheetScrollableComponent;
} else {
if (scrollReporting !== "animatedScrollPosition" && scrollReporting !== "animatedCallbacks") {
Component = Module9242;
break L25;
}
Component = AnimatedComponent;
}
}
const r111 = <Component accessibilityLabel={accessibilityLabel} horizontal={horizontal2} insetStart={insetStart2} insetEnd={insetEnd2} keyboardDismissOnDrag={keyboardDismissMode === "on-drag" || keyboardDismissMode === "interactive"} onUnexpectedItemSize={fastestListUnexpectedItemSizeCallback_android} onLayout={onLayout} onScroll={onScroll} onScrollBeginDrag={onScrollBeginDrag} onScrollEndDrag={onScrollEndDrag} onVisibleItemsChanged={callback} placeholderConfig={fastestListPropsPlaceholder_android} ref={ref} renderAhead={renderAhead2} scrollEventThrottle={scrollEventThrottle2} sectionsVersioned={fastestListSections_android} showsHorizontalScrollIndicator={showsHorizontalScrollIndicator2} showsVerticalScrollIndicator={showsVerticalScrollIndicator2} style={style2} />;
const r115 = <FastestListChildren_android estimatedListSize={fastestListPropsEstimatedListSize_native} horizontal={horizontal2} listFooterAlwaysMounted={listFooterAlwaysMounted} listHeaderAlwaysMounted={listHeaderAlwaysMounted} marginEnd={marginEnd} marginStart={marginStart} placeholdersForceEnabled={placeholdersForceEnabled} ref={ref2} renderItem={renderItem} renderListFooter={renderListFooter} renderListHeader={renderListHeader} renderSectionFooter={renderSectionFooter} renderSectionHeader={renderSectionHeader} sectionsVersioned={fastestListSections_android} wrapChildren={wrapChildren} />;
return enabled && placeholderConfig != null ? <>
{r111}
{r115}
</> : <FastestList_ios {...props} />;
});
export default r45;
+67
View File
@@ -0,0 +1,67 @@
// Metro module 9256 (f9257).
import { forwardRef, useCallback, useMemo } from "react";
import { RefreshControl } from "react-native";
import useFastestListPropsScrollReporting_native from "./props/useFastestListPropsScrollReporting.native";
import useFastestListPropsEstimatedListSize_native from "./props/useFastestListPropsEstimatedListSize.native";
import FastList, { FastListItemTypes, AnimatedFastList } from "../../lib/native/FastList";
import FastestListItemType from "./FastestListItemType";
const noop = () => {};
const r24 = forwardRef(function(a0, a1) {
const { accessibilityLabel, enabled, estimatedListSize, horizontal: _horizontal, inActionSheet, insetStart, insetEnd, itemSize, keyboardDismissMode, keyboardShouldPersistTaps, keyExtractor, listFooterSize, listFooterAlwaysMounted: _listFooterAlwaysMounted, listHeaderSize, listHeaderAlwaysMounted: _listHeaderAlwaysMounted, onLayout, preventNativeModalDismiss, renderAhead: _renderAhead, renderItem, renderListFooter, renderListHeader, renderSectionHeader, renderSectionFooter, scrollEventThrottle, scrollIndicatorInsetEnd, scrollIndicatorInsetStart, sectionHeaderSize, sectionHeaderIsSticky: _sectionHeaderIsSticky, sectionFooterSize, sections, showsHorizontalScrollIndicator, showsVerticalScrollIndicator, style, ...rest } = a0;
a0.enabled;
let horizontal = a0.horizontal;
if (horizontal === void 0) {
horizontal = false;
}
let c17093_0 = horizontal;
let listFooterAlwaysMounted = a0.listFooterAlwaysMounted;
if (listFooterAlwaysMounted === void 0) {
listFooterAlwaysMounted = false;
}
let listHeaderAlwaysMounted = a0.listHeaderAlwaysMounted;
if (listHeaderAlwaysMounted === void 0) {
listHeaderAlwaysMounted = false;
}
const { renderAhead = "nominal", sectionHeaderIsSticky = true } = a0;
const fastestListPropsScrollReporting_native = useFastestListPropsScrollReporting_native(rest, horizontal);
const { onScroll, onScrollBeginDrag, onScrollEndDrag } = fastestListPropsScrollReporting_native;
const fastestListPropsEstimatedListSize_native = useFastestListPropsEstimatedListSize_native({
estimatedListSize,
horizontal
});
const callback = useCallback((a0, a1, a2) => {
if (FastListItemTypes.ITEM === a0) {
return keyExtractor == null ? void 0 : keyExtractor(FastestListItemType.ITEM, a1, a2 == null ? -1 : a2);
}
if (FastListItemTypes.SECTION === a0) {
return keyExtractor == null ? void 0 : keyExtractor(FastestListItemType.SECTION_HEADER, a1, -1);
}
if (FastListItemTypes.SECTION_FOOTER === a0) {
return keyExtractor == null ? void 0 : keyExtractor(FastestListItemType.SECTION_FOOTER, a1, -1);
}
}, [keyExtractor]);
const memo = useMemo(() => scrollIndicatorInsetStart == null ? scrollIndicatorInsetEnd == null ? void 0 : c17093_0 ? {
left: scrollIndicatorInsetStart,
right: scrollIndicatorInsetEnd
} : {
top: scrollIndicatorInsetStart,
bottom: scrollIndicatorInsetEnd
} : c17093_0 ? {
left: scrollIndicatorInsetStart,
right: scrollIndicatorInsetEnd
} : {
top: scrollIndicatorInsetStart,
bottom: scrollIndicatorInsetEnd
}, [horizontal, scrollIndicatorInsetEnd, scrollIndicatorInsetStart]);
const memo2 = useMemo(() => preventNativeModalDismiss === true ? inActionSheet === true ? <RefreshControl refreshing={false} onRefresh={noop} tintColor="transparent" /> : void 0 : void 0, [preventNativeModalDismiss, inActionSheet]);
const Component = rest.scrollReporting === "animatedCallbacks" ? AnimatedFastList : FastList;
const batchesToRender = renderAhead === "nominal" ? void 0 : renderAhead === "half" ? 14 : renderAhead !== "full" ? void 0 : 16;
const stickySectionsVariant = sectionHeaderIsSticky ? "default" : "disabled";
const onScroll2 = rest.scrollReporting !== "animatedScrollPosition" ? onScroll : void 0;
const scrollPosValue = rest.scrollReporting === "animatedScrollPosition" ? rest.scrollPosition : void 0;
if (!listHeaderAlwaysMounted) {
listHeaderAlwaysMounted = listFooterAlwaysMounted;
}
return <Component accessibilityLabel={accessibilityLabel} automaticallyAdjustsScrollIndicatorInsets={memo == null} batchesToRender={batchesToRender} refreshControl={memo2} chunkBase={fastestListPropsEstimatedListSize_native} stickySectionsVariant={stickySectionsVariant} footerSize={listFooterSize} getRecyclerKey={callback} headerSize={listHeaderSize} horizontal={horizontal} inActionSheet={inActionSheet} insetStart={insetStart} insetEnd={insetEnd} itemSize={itemSize} keyboardDismissMode={keyboardDismissMode} keyboardShouldPersistTaps={keyboardShouldPersistTaps} onLayout={onLayout} onScroll={onScroll2} onScrollBeginDrag={onScrollBeginDrag} onScrollEndDrag={onScrollEndDrag} optimizeListItemRender ref={a1} renderItem={renderItem} renderFooter={renderListFooter} renderHeader={renderListHeader} renderSection={renderSectionHeader} renderSectionFooter={renderSectionFooter} scrollEventThrottle={scrollEventThrottle} scrollIndicatorInsets={memo} scrollPosValue={scrollPosValue} sections={sections} sectionSize={sectionHeaderSize} sectionFooterSize={sectionFooterSize} showsHorizontalScrollIndicator={showsHorizontalScrollIndicator} showsVerticalScrollIndicator={showsVerticalScrollIndicator} stickyHeaderFooter={listHeaderAlwaysMounted} style={style} />;
});
export default r24;
@@ -0,0 +1,239 @@
// Metro module 9252 (f9253).
import * as Module19 from "react";
import { forwardRef, useMemo, useState, useImperativeHandle, useRef, isValidElement, useEffect } from "react";
import { View } from "react-native";
import { createStyles } from "../../design/components/Styles/native/createStyles";
import getFastestListVisibleItemsDefault from "./getFastestListVisibleItemsDefault";
import shallowEqual from "../../_bundle/shallowEqual";
import getFastestListVisibleItemsWithErrorChecking_native from "./utils/getFastestListVisibleItemsWithErrorChecking.native";
import PortalToNativeView_native from "../portals/PortalToNativeView.native";
const useStyles = createStyles({
portal: {
position: "absolute",
opacity: 0,
height: 0,
top: 0
}
});
let c6084_7 = {
items: [],
keys: new Map(),
keyIndex: 0
};
const r43 = Module19.memo(forwardRef(function(a0, a1) {
let state, setState, ref, memo;
const { estimatedListSize, horizontal = false } = a0;
let c17092_1 = horizontal;
const { listFooterAlwaysMounted, listHeaderAlwaysMounted, placeholdersForceEnabled = false } = a0;
let c17092_4 = placeholdersForceEnabled;
const { marginEnd, marginStart, sectionsVersioned, renderItem, renderListFooter, renderListHeader, renderSectionFooter, renderSectionHeader, wrapChildren = false } = a0;
let c17092_13 = wrapChildren;
state = void 0;
setState = void 0;
ref = void 0;
memo = void 0;
const styles = useStyles();
const memo2 = useMemo(() => [styles.portal, {
left: marginStart,
right: marginEnd
}], [styles.portal, marginStart, marginEnd]);
[state, setState] = useState(() => getFastestListVisibleItemsDefault({
estimatedListSize,
sectionsVersioned
}));
useImperativeHandle(a1, () => ({
setVisibleItems: (c30071_0) => {
setState((prevState) => {
let r8 = c30071_0;
if (shallowEqual(prevState, r8)) {
r8 = prevState;
}
return r8;
});
}
}), []);
ref = useRef(c6084_7);
memo = useMemo(() => {
let sectionStart, sectionEnd, itemStart, itemEnd;
const { keysAreUniform, listId, itemKeys, itemSizes, itemSizeIsUniform, listFooterKey, listFooterSize, listHeaderKey, listHeaderSize, sectionsId, sections, sectionFooterKeys, sectionFooterSizeIsUniform, sectionFooterSizes, sectionHeaderKeys, sectionHeaderSizeIsUniform, sectionHeaderSizes } = sectionsVersioned;
if (sectionsId !== state.sectionsId) {
return ref.current;
}
const fastestListChildJSX = function fastestListChildJSX(a0, a1) {
if (c17092_13) {
return <View style={{
width: c17092_1 ? a1 : void 0,
height: c17092_1 ? void 0 : a1,
overflow: "hidden"
}} collapsable={false}>
{a0}
</View>;
}
if (isValidElement(a0)) {
return a0;
}
throw new Error("Must return a single child element.");
};
let keyIndex = ref.current.keyIndex;
const map = new Map(ref.current.keys);
const map2 = new Map();
const items = [];
const r25 = [];
const fastestListVisibleItemsWithErrorChecking_native = getFastestListVisibleItemsWithErrorChecking_native(listId, state, sections);
let sectionStart2 = fastestListVisibleItemsWithErrorChecking_native.sectionStart;
sectionStart = sectionStart2;
sectionEnd = fastestListVisibleItemsWithErrorChecking_native.sectionEnd;
itemStart = fastestListVisibleItemsWithErrorChecking_native.itemStart;
itemEnd = fastestListVisibleItemsWithErrorChecking_native.itemEnd;
let r26 = sectionStart;
while (r26 <= sectionEnd) {
const r42 = r26;
if (!c17092_4) {
let r44 = r42 === sectionStart ? itemStart : 0;
const r87 = r42 !== sectionEnd ? sections[r42] - 1 : itemEnd;
while (r44 <= r87) {
const item3 = renderItem(r42, r44);
const r89 = r44;
const itemSize2 = itemSizeIsUniform ? itemSizes[0].sizes[0] : itemSizes[r42].sizes[r89];
let r48 = keysAreUniform ? itemKeys[0].keys[0] : itemKeys[r42].keys[r89];
if (r48 === "") {
r48 = `s${r42}-i${r89}`;
}
const portalId = `${listId}-${r48}`;
const r51 = map.get(portalId);
if (r51 != null) {
map2.set(portalId, r51);
map.delete(portalId);
items.push(<PortalToNativeView_native key={`${r51}`} portalId={portalId}>
{fastestListChildJSX(item3, itemSize2)}
</PortalToNativeView_native>);
} else {
r25.push({
keyId: portalId,
item: item3,
itemSize: itemSize2
});
}
r44 = r89 + 1;
}
}
r26 = r42 + 1;
}
for (const item of r25) {
const { keyId, item: item2, itemSize } = item;
if (map.size > 0) {
const value = map.keys().next().value;
const r158 = map.get(value);
map2.set(keyId, r158);
map.delete(value);
items.push(<PortalToNativeView_native key={`${r158}`} portalId={keyId}>
{fastestListChildJSX(item2, itemSize)}
</PortalToNativeView_native>);
} else {
const r132 = +keyIndex;
keyIndex = r132 + 1;
const r133 = "key-" + r132;
map2.set(keyId, r133);
items.push(<PortalToNativeView_native key={`${r133}`} portalId={keyId}>
{fastestListChildJSX(item2, itemSize)}
</PortalToNativeView_native>);
}
}
L35: {
if (renderListHeader != null && listHeaderSize > 0) {
if (!listHeaderAlwaysMounted && !(function() {
if (c17092_4) {
return false;
}
if (itemStart !== 0) {
return false;
}
let r0 = sectionStart - 1;
while (0 <= r0) {
const r11 = sections[r0];
const r1 = r0;
if (r11 > 0) {
return false;
}
r0 = r1 - 1;
}
return true;
})()) {
break L35;
}
const key = listHeaderKey !== "" ? listHeaderKey : "lh";
items.push(<PortalToNativeView_native key={key} portalId={`${listId}-${key}`}>
{fastestListChildJSX(renderListHeader(), listHeaderSize)}
</PortalToNativeView_native>);
}
}
L42: {
if (renderListFooter != null && listFooterSize > 0) {
if (!listFooterAlwaysMounted && !(function() {
if (c17092_4) {
return false;
}
if (itemEnd !== Math.max(sections[sectionEnd] - 1, 0)) {
return false;
}
let r15 = sectionEnd + 1;
while (r15 < sections.length) {
const r18 = sections[r15];
const r19 = r15;
if (r18 > 0) {
return false;
}
r15 = r19 + 1;
}
return true;
})()) {
break L42;
}
const key2 = `${listId}-${listFooterKey !== "" ? listFooterKey : "lf"}`;
items.push(<PortalToNativeView_native key={key2} portalId={key2}>
{fastestListChildJSX(renderListFooter(), listFooterSize)}
</PortalToNativeView_native>);
}
}
if (sectionStart <= sectionEnd) {
do {
const r221 = sectionStart2;
if (!c17092_4) {
const r222 = sectionFooterSizeIsUniform ? sectionFooterSizes[0] : sectionFooterSizes[r221];
if (r222 > 0 && renderSectionFooter != null) {
let r224 = keysAreUniform ? sectionFooterKeys[0] : sectionFooterKeys[r221];
if (r224 === "") {
r224 = `sf${r221}`;
}
const key3 = `${listId}-${r224}`;
items.push(<PortalToNativeView_native key={key3} portalId={key3}>
{fastestListChildJSX(renderSectionFooter(r221), r222)}
</PortalToNativeView_native>);
}
const r241 = sectionHeaderSizeIsUniform ? sectionHeaderSizes[0] : sectionHeaderSizes[r221];
if (r241 > 0 && renderSectionHeader != null) {
let r243 = keysAreUniform ? sectionHeaderKeys[0] : sectionHeaderKeys[r221];
if (r243 === "") {
r243 = `sh${r221}`;
}
const key4 = `${listId}-${r243}`;
items.push(<PortalToNativeView_native key={key4} portalId={key4}>
{fastestListChildJSX(renderSectionHeader(r221), r241)}
</PortalToNativeView_native>);
}
}
sectionStart2 = r221 + 1;
} while (sectionStart2 <= sectionEnd);
}
return {
items,
keys: map2,
keyIndex
};
}, [horizontal, listFooterAlwaysMounted, listHeaderAlwaysMounted, placeholdersForceEnabled, renderItem, renderListFooter, renderListHeader, renderSectionFooter, renderSectionHeader, sectionsVersioned, state, wrapChildren]);
useEffect(() => {
ref.current = memo;
}, [memo]);
return <View pointerEvents="none" style={memo2}>{memo.items}</View>;
}));
export default r43;
@@ -0,0 +1,14 @@
// Metro module 9249 (f9250).
const r9 = {
ITEM: 0,
0: "ITEM",
LIST_HEADER: 1,
1: "LIST_HEADER",
LIST_FOOTER: 2,
2: "LIST_FOOTER",
SECTION_HEADER: 3,
3: "SECTION_HEADER",
SECTION_FOOTER: 4,
4: "SECTION_FOOTER"
};
export default r9;
@@ -0,0 +1,60 @@
// Metro module 9253 (f9254).
export default function getFastestListVisibleItemsDefault({ estimatedListSize, sectionsVersioned }) {
let r37, length;
const { itemSizeIsUniform, itemSizes } = sectionsVersioned;
let listHeaderSize = sectionsVersioned.listHeaderSize;
const { sectionsId, sections, sectionFooterSizeIsUniform, sectionFooterSizes, sectionHeaderSizeIsUniform, sectionHeaderSizes } = sectionsVersioned;
const r24 = {
sectionsId,
sectionStart: 0,
sectionEnd: 0,
itemStart: 0,
itemEnd: -1
};
if (listHeaderSize >= estimatedListSize) {
return r24;
}
const r6 = 0 < sections.length;
let r4 = 0;
if (r6) {
do {
const r26 = sections[r4];
const sectionEnd = r4;
const r19 = listHeaderSize;
let r18 = r19;
if (r26 !== 0) {
r24.sectionEnd = sectionEnd;
r24.itemEnd = 0;
const r28 = r19 + (sectionHeaderSizeIsUniform ? sectionHeaderSizes[0] : sectionHeaderSizes[sectionEnd]);
if (r28 >= estimatedListSize) {
return r24;
}
const r30 = 0 < sections[sectionEnd];
let itemEnd = 0;
let r20 = r28;
let r31 = r20;
if (r30) {
do {
r24.itemEnd = itemEnd;
const r36 = r20 + (itemSizeIsUniform ? itemSizes[0].sizes[0] : itemSizes[sectionEnd].sizes[itemEnd]);
if (r36 >= estimatedListSize) {
return r24;
}
itemEnd = itemEnd + 1;
r37 = sections[sectionEnd];
r20 = r36;
r31 = r20;
} while (itemEnd < r37);
}
r18 = r31 + (sectionFooterSizeIsUniform ? sectionFooterSizes[0] : sectionFooterSizes[sectionEnd]);
if (r18 >= estimatedListSize) {
return r24;
}
}
r4 = sectionEnd + 1;
length = sections.length;
listHeaderSize = r18;
} while (r4 < length);
}
return r24;
};
@@ -0,0 +1,77 @@
// Metro module 8822 (f8823).
import { useMemo } from "react";
import { createStyles } from "../../../design/components/Styles/native/createStyles";
import Module712 from "../../../_bundle/Module712";
import { AVATAR_SIZE_MAP, AvatarSizes } from "../../../design/void/native";
import { DIVIDER_BACKGROUND } from "../../../design/migrations/native/LegacyTokens";
import { FastestListPropsPlaceholderType } from "../props/FastestListPropsPlaceholder";
const useStyles = createStyles({
placeholder: {
backgroundColor: Module712.colors.CARD_BACKGROUND_DEFAULT
},
placeholderAvatar: {
width: AVATAR_SIZE_MAP[AvatarSizes.REFRESH_MEDIUM_32],
height: AVATAR_SIZE_MAP[AvatarSizes.REFRESH_MEDIUM_32],
borderRadius: Module712.radii.xl,
backgroundColor: Module712.colors.BACKGROUND_MOD_MUTED
},
placeholderUsername: {
height: 20,
borderRadius: Module712.radii.md,
backgroundColor: Module712.colors.BACKGROUND_MOD_MUTED
},
placeholderDivider: {
backgroundColor: DIVIDER_BACKGROUND
}
});
export default function useFastestListTableRowPlaceholderConfig() {
const styles = useStyles();
return useMemo(() => {
const r5 = {
type: FastestListPropsPlaceholderType.FEED_ITEM,
shape: "circle",
backgroundColorHex: styles.placeholder.backgroundColor,
colorHex: styles.placeholderAvatar.backgroundColor,
labelPadding: Module712.space.PX_16,
labelPaddingInnerRatio: 0,
labelSize: styles.placeholderUsername.height,
padding: Module712.space.PX_12,
shapeSize: styles.placeholderAvatar.width
};
const r6 = {
divider: true,
dividerColorHex: styles.placeholderDivider.backgroundColor,
dividerPaddingLeft: Module712.space.PX_12 + styles.placeholderAvatar.width + Module712.space.PX_16
};
return {
sectionHeader: {
type: FastestListPropsPlaceholderType.SHAPE,
shape: "rect",
colorHex: styles.placeholder.backgroundColor,
paddingVertical: Module712.space.PX_16,
borderRadius: Module712.radii.md,
width: Module712.space.PX_96
},
sectionItem: {
...r5,
...r6
},
sectionItemAtFront: {
...r5,
...r6,
borderTopLeftRadius: Module712.radii.lg,
borderTopRightRadius: Module712.radii.lg
},
sectionItemAtRear: {
...r5,
borderBottomLeftRadius: Module712.radii.lg,
borderBottomRightRadius: Module712.radii.lg
},
sectionItemSingleton: {
...r5,
borderRadius: Module712.radii.lg
}
};
}, [styles]);
};
export { useStyles as useFastestListTableRowPlaceholderStyles };
@@ -0,0 +1,10 @@
// Metro module 8823 (f8824).
const r9 = {
NONE: 0,
0: "NONE",
SHAPE: 1,
1: "SHAPE",
FEED_ITEM: 2,
2: "FEED_ITEM"
};
export { r9 as FastestListPropsPlaceholderType };
@@ -0,0 +1,14 @@
// Metro module 9246 (f9247).
import { useState } from "react";
import { getWindowDimensions } from "../../screen/useWindowDimensions.native";
export default function useFastestListPropsEstimatedListSize({ estimatedListSize, horizontal }) {
const [state, ] = useState(() => {
let r1 = estimatedListSize;
if (estimatedListSize === "windowSize") {
const windowDimensions = getWindowDimensions();
r1 = horizontal ? windowDimensions.width : windowDimensions.height;
}
return r1;
});
return state;
};
@@ -0,0 +1,174 @@
// Metro module 9247 (f9248).
import { useMemo } from "react";
import { FastestListPropsPlaceholderType } from "./FastestListPropsPlaceholder";
import { hexToRgbaString } from "../../../utils/ColorUtils";
let c6080_3;
const createNativePlaceholderConfig = function createNativePlaceholderConfig(a0) {
const type = a0?.type;
let placeholderType = type;
if (placeholderType == null) {
placeholderType = FastestListPropsPlaceholderType.NONE;
}
const r18 = {
borderRadius: void 0,
borderTopLeftRadius: void 0,
borderTopRightRadius: void 0,
borderBottomLeftRadius: void 0,
borderBottomRightRadius: void 0,
divider: void 0,
dividerColorRgba: void 0,
dividerPaddingLeft: void 0,
dividerPaddingRight: void 0,
placeholderShape: void 0,
placeholderShapeColorRgba: void 0,
placeholderShapeCount: void 0,
placeholderShapeGap: void 0,
placeholderShapePaddingHorizontal: void 0,
placeholderShapePaddingVertical: void 0,
placeholderFeedBackgroundColorRgba: void 0,
placeholderFeedColorRgba: void 0,
placeholderFeedLabelPadding: void 0,
placeholderFeedLabelPaddingInnerRatio: void 0,
placeholderFeedLabelSize: void 0,
placeholderFeedLabelSecondarySize: void 0,
placeholderFeedPadding: void 0,
placeholderFeedShape: void 0,
placeholderFeedShapeSize: void 0,
placeholderType,
width: void 0,
height: void 0,
verticalAlignment: void 0,
horizontalAlignment: void 0
};
if (a0 == null) {
return r18;
}
if (FastestListPropsPlaceholderType.NONE !== type) {
if (FastestListPropsPlaceholderType.SHAPE === type) {
let borderRadius2 = a0.borderRadius;
if (borderRadius2 == null) {
borderRadius2 = 0;
}
r18.borderRadius = borderRadius2;
r18.placeholderShape = a0.shape;
let spaceGap = a0.spaceGap;
if (spaceGap == null) {
spaceGap = 0;
}
r18.placeholderShapeGap = spaceGap;
let paddingHorizontal = a0.paddingHorizontal;
if (paddingHorizontal == null) {
paddingHorizontal = 0;
}
r18.placeholderShapePaddingHorizontal = paddingHorizontal;
let paddingVertical = a0.paddingVertical;
if (paddingVertical == null) {
paddingVertical = 0;
}
r18.placeholderShapePaddingVertical = paddingVertical;
r18.placeholderShapeColorRgba = hexToRgbaString(a0.colorHex, a0.opacity);
let shapeCount = a0.shapeCount;
if (shapeCount == null) {
shapeCount = 1;
}
r18.placeholderShapeCount = shapeCount;
r18.width = a0.width;
r18.height = a0.height;
let verticalAlignment = a0.verticalAlignment;
if (verticalAlignment == null) {
verticalAlignment = "center";
}
r18.verticalAlignment = verticalAlignment;
let horizonalAlignment = a0.horizonalAlignment;
if (horizonalAlignment == null) {
horizonalAlignment = "center";
}
r18.horizontalAlignment = horizonalAlignment;
} else {
if (FastestListPropsPlaceholderType.FEED_ITEM !== type) {
throw new Error(`Invalid placeholder type: ${type}`);
}
let borderRadius = a0.borderRadius;
if (borderRadius == null) {
borderRadius = 0;
}
r18.borderRadius = borderRadius;
let borderTopLeftRadius = a0.borderTopLeftRadius;
if (borderTopLeftRadius == null) {
borderTopLeftRadius = 0;
}
r18.borderTopLeftRadius = borderTopLeftRadius;
let borderTopRightRadius = a0.borderTopRightRadius;
if (borderTopRightRadius == null) {
borderTopRightRadius = 0;
}
r18.borderTopRightRadius = borderTopRightRadius;
let borderBottomLeftRadius = a0.borderBottomLeftRadius;
if (borderBottomLeftRadius == null) {
borderBottomLeftRadius = 0;
}
r18.borderBottomLeftRadius = borderBottomLeftRadius;
let borderBottomRightRadius = a0.borderBottomRightRadius;
if (borderBottomRightRadius == null) {
borderBottomRightRadius = 0;
}
r18.borderBottomRightRadius = borderBottomRightRadius;
let divider = a0.divider;
if (divider == null) {
divider = false;
}
r18.divider = divider;
r18.dividerColorRgba = a0.dividerColorHex != null ? hexToRgbaString(a0.dividerColorHex) : void 0;
let dividerPaddingLeft = a0.dividerPaddingLeft;
if (dividerPaddingLeft == null) {
dividerPaddingLeft = 0;
}
r18.dividerPaddingLeft = dividerPaddingLeft;
let dividerPaddingRight = a0.dividerPaddingRight;
if (dividerPaddingRight == null) {
dividerPaddingRight = 0;
}
r18.dividerPaddingRight = dividerPaddingRight;
r18.placeholderFeedBackgroundColorRgba = a0.backgroundColorHex != null ? hexToRgbaString(a0.backgroundColorHex) : void 0;
r18.placeholderFeedColorRgba = hexToRgbaString(a0.colorHex);
r18.placeholderFeedLabelSize = a0.labelSize;
let labelSecondarySize = a0.labelSecondarySize;
if (labelSecondarySize == null) {
labelSecondarySize = 0;
}
r18.placeholderFeedLabelSecondarySize = labelSecondarySize;
r18.placeholderFeedLabelPadding = a0.labelPadding;
let labelPaddingInnerRatio = a0.labelPaddingInnerRatio;
if (labelPaddingInnerRatio == null) {
labelPaddingInnerRatio = 0.4;
}
r18.placeholderFeedLabelPaddingInnerRatio = labelPaddingInnerRatio;
let padding = a0.padding;
if (padding == null) {
padding = 0;
}
r18.placeholderFeedPadding = padding;
r18.placeholderFeedShape = a0.shape;
r18.placeholderFeedShapeSize = a0.shapeSize;
}
}
return r18;
};
c6080_3 = {
sectionItem: {
type: FastestListPropsPlaceholderType.NONE
}
};
export default function useFastestListPropsPlaceholder(r5 = c6080_3) {
let c17089_0 = r5;
return useMemo(() => ({
listFooter: createNativePlaceholderConfig(c17089_0.listFooter),
listHeader: createNativePlaceholderConfig(c17089_0.listHeader),
sectionFooter: createNativePlaceholderConfig(c17089_0.sectionFooter),
sectionHeader: createNativePlaceholderConfig(c17089_0.sectionHeader),
sectionItem: createNativePlaceholderConfig(c17089_0.sectionItem),
sectionItemAtFront: createNativePlaceholderConfig(c17089_0.sectionItemAtFront),
sectionItemAtRear: createNativePlaceholderConfig(c17089_0.sectionItemAtRear),
sectionItemSingleton: createNativePlaceholderConfig(c17089_0.sectionItemSingleton)
}), [r5]);
};
@@ -0,0 +1,39 @@
// Metro module 9251 (f9252).
import { useAnimatedScrollHandler } from "../../reanimated/ReanimatedRexport";
const __initData = {
code: "function useFastestListPropsScrollReportingNativeTsx1(event){const{scrollPosition,horizontal}=this.__closure;if(scrollPosition!=null){scrollPosition.set(horizontal?event.contentOffset.x:event.contentOffset.y);}}"
};
export default function useFastestListPropsScrollReporting(a0, a1) {
const scrollPosition = a0.scrollReporting === "animatedScrollPosition" ? a0.scrollPosition : void 0;
const n = function n(a0) {
if (scrollPosition != null) {
const contentOffset = a0.contentOffset;
scrollPosition.set(a1 ? contentOffset.x : contentOffset.y);
}
};
n.__closure = {
scrollPosition,
horizontal: a1
};
n.__workletHash = 14196294214838;
n.__initData = __initData;
const animatedScrollHandler = useAnimatedScrollHandler({
onScroll: n
});
const scrollReporting = a0.scrollReporting;
if (scrollReporting === "animatedScrollPosition") {
return {
onScroll: animatedScrollHandler
};
}
if (scrollReporting === "animatedCallbacks") {
return {
onScroll: a0.scrollHandlerAnimated
};
}
return {
onScroll: a0.onScroll,
onScrollBeginDrag: a0.onScrollBeginDrag,
onScrollEndDrag: a0.onScrollEndDrag
};
};
@@ -0,0 +1,85 @@
// Metro module 9243 (f9244).
import { useMemo } from "react";
import { StyleSheet } from "react-native";
export default function useFastestListComputedStyles({ style }) {
return useMemo(() => {
let r14;
let r7 = style;
if (style != null) {
if (style == null) {
r7 = {
flex: 1
};
}
r14 = [r7];
} else {
r14 = {
flex: 1
};
}
const style2 = StyleSheet.flatten(r14);
let r15 = style2?.marginStart;
if (r15 == null) {
r15 = style2?.marginLeft;
}
if (r15 == null) {
r15 = style2?.marginHorizontal;
}
if (r15 == null) {
r15 = style2?.margin;
}
if (r15 == null) {
r15 = 0;
}
let r23 = style2?.paddingStart;
if (r23 == null) {
r23 = style2?.paddingLeft;
}
if (r23 == null) {
r23 = style2?.paddingHorizontal;
}
if (r23 == null) {
r23 = style2?.padding;
}
if (r23 == null) {
r23 = 0;
}
if (typeof r15 === "number" && typeof r23 === "number") {
let r31 = style2?.marginEnd;
if (r31 == null) {
r31 = style2?.marginRight;
}
if (r31 == null) {
r31 = style2?.marginHorizontal;
}
if (r31 == null) {
r31 = style2?.margin;
}
if (r31 == null) {
r31 = 0;
}
let r39 = style2?.paddingEnd;
if (r39 == null) {
r39 = style2?.paddingRight;
}
if (r39 == null) {
r39 = style2?.paddingHorizontal;
}
if (r39 == null) {
r39 = style2?.padding;
}
if (r39 == null) {
r39 = 0;
}
if (typeof r31 === "number" && typeof r39 === "number") {
return {
style: style2,
marginEnd: r31 + r39,
marginStart: r15 + r23
};
}
throw new Error("FastestList: paddingStart and paddingEnd must be numbers.");
}
throw new Error("FastestList: marginStart and marginEnd must be numbers.");
}, [style]);
};
@@ -0,0 +1,161 @@
// Metro module 9248 (f9249).
import { useMemo, useEffect } from "react";
import useInitialValue from "../../hooks/useInitialValue";
import FastestListItemType from "./FastestListItemType";
import getFastestListSectionsWithErrorChecking_native from "./utils/getFastestListSectionsWithErrorChecking.native";
export default function useFastestListSections(a0) {
let c17090_8;
const { fastestListId, itemSize, keyExtractor, listFooterSize = 0 } = a0;
let c17090_3 = listFooterSize;
let listHeaderSize = a0.listHeaderSize;
if (listHeaderSize === void 0) {
listHeaderSize = 0;
}
let c17090_4 = listHeaderSize;
const { sections, sectionHeaderSize = 0 } = a0;
let c17090_6 = sectionHeaderSize;
let sectionFooterSize = a0.sectionFooterSize;
if (sectionFooterSize === void 0) {
sectionFooterSize = 0;
}
let c17090_7 = sectionFooterSize;
c17090_8 = void 0;
const initialValue = useInitialValue(() => {
let c26402_0 = 0;
return {
getId: () => `${c26402_0}`,
incrementId: () => {
const r1 = c26402_0;
c26402_0 = r1 + 1;
return r1;
}
};
});
c17090_8 = initialValue;
const memo = useMemo(() => {
let listFooterSize = c17090_3;
if (typeof listFooterSize !== "number") {
listFooterSize = c17090_3();
}
let listFooterKey = keyExtractor == null ? void 0 : keyExtractor(FastestListItemType.LIST_FOOTER, 0, 0);
if (listFooterKey == null) {
listFooterKey = "";
}
let listHeaderSize = c17090_4;
if (typeof listHeaderSize !== "number") {
listHeaderSize = c17090_4();
}
let listHeaderKey = keyExtractor == null ? void 0 : keyExtractor(FastestListItemType.LIST_HEADER, 0, 0);
if (listHeaderKey == null) {
listHeaderKey = "";
}
const itemKeys = [];
const sectionHeaderKeys = [];
const sectionFooterKeys = [];
const keysAreUniform = keyExtractor == null;
if (keysAreUniform) {
itemKeys.push({
keys: [""]
});
sectionHeaderKeys.push("");
sectionFooterKeys.push("");
}
const itemSizes = [];
if (typeof itemSize === "number") {
itemSizes.push({
sizes: [itemSize]
});
}
const sectionHeaderSizes = [];
if (typeof c17090_6 === "number") {
sectionHeaderSizes.push(c17090_6);
}
const sectionFooterSizes = [];
if (typeof c17090_7 === "number") {
sectionFooterSizes.push(c17090_7);
}
if (!(typeof c17090_7 === "number" && (typeof c17090_6 === "number" && (typeof itemSize === "number" && keysAreUniform)))) {
const r68 = 0 < sections.length;
let r69 = 0;
if (r68) {
do {
const r1 = r69;
if (typeof c17090_6 !== "number") {
sectionHeaderSizes.push(c17090_6(r1));
}
if (typeof c17090_7 !== "number") {
sectionFooterSizes.push(c17090_7(r1));
}
if (!keysAreUniform) {
let r82 = keyExtractor(FastestListItemType.SECTION_HEADER, r1, 0);
if (r82 == null) {
r82 = "";
}
sectionHeaderKeys.push(r82);
let r90 = keyExtractor(FastestListItemType.SECTION_FOOTER, r1, 0);
if (r90 == null) {
r90 = "";
}
sectionFooterKeys.push(r90);
}
if (!(typeof itemSize === "number" && keysAreUniform)) {
const r93 = sections[r1];
if (typeof itemSize !== "number") {
itemSizes.push({
sizes: []
});
}
if (!keysAreUniform) {
itemKeys.push({
keys: []
});
}
const r102 = 0 < r93;
let r0 = 0;
if (r102) {
do {
const r2 = r0;
if (typeof itemSize !== "number") {
itemSizes[r1].sizes.push(itemSize(r1, r2));
}
if (!keysAreUniform) {
const keys = itemKeys[r1].keys;
let r116 = keyExtractor(FastestListItemType.ITEM, r1, r2);
if (r116 == null) {
r116 = "";
}
keys.push(r116);
}
r0 = r2 + 1;
} while (r0 < r93);
}
}
r69 = r1 + 1;
} while (r69 < sections.length);
}
}
return {
keysAreUniform,
listId: fastestListId,
listFooterKey,
listFooterSize,
listHeaderKey,
listHeaderSize,
sections,
sectionsId: c17090_8.getId(),
sectionHeaderKeys,
sectionHeaderSizes,
sectionHeaderSizeIsUniform: typeof c17090_6 === "number",
sectionFooterKeys,
sectionFooterSizes,
sectionFooterSizeIsUniform: typeof c17090_7 === "number",
itemKeys,
itemSizeIsUniform: typeof itemSize === "number",
itemSizes
};
}, [keyExtractor, itemSize, listFooterSize, listHeaderSize, sectionHeaderSize, sectionFooterSize, fastestListId, initialValue, sections]);
useEffect(() => {
c17090_8.incrementId();
}, [initialValue, memo]);
return getFastestListSectionsWithErrorChecking_native(memo);
};
@@ -0,0 +1,54 @@
// Metro module 9244 (f9245).
import { useCallback } from "react";
import { logFastestListError } from "./utils/FastestListLogger.native";
export default function useFastestListUnexpectedItemSizeCallback(a0) {
return useCallback(({ nativeEvent }) => {
let r24, itemPosition, name;
const current = a0.current;
if (nativeEvent.isSectionHeader) {
const renderSectionHeader = current.renderSectionHeader;
let r30 = renderSectionHeader == null ? void 0 : renderSectionHeader.call(current, nativeEvent.section);
if (r30 == null) {
r30 = void 0;
}
r24 = r30;
} else if (nativeEvent.isSectionFooter) {
const renderSectionFooter = current.renderSectionFooter;
let r25 = renderSectionFooter == null ? void 0 : renderSectionFooter.call(current, nativeEvent.section);
if (r25 == null) {
r25 = void 0;
}
r24 = r25;
} else {
r24 = current.renderItem(nativeEvent.section, nativeEvent.item);
if (r24 == null) {
r24 = void 0;
}
}
const props = r24?.props;
const type = r24?.type;
if (typeof type === "function" && type.name.length > 0) {
name = type.name;
} else {
const type2 = type?.type;
name = typeof type2 === "function" ? type2.name.length > 0 ? type2.name : void 0 : void 0;
}
const itemProps = name == null ? Object.keys(props).join(",") : void 0;
if (nativeEvent.isSectionHeader) {
itemPosition = `Section header at section ${nativeEvent.section}.`;
} else {
const { isSectionFooter, section } = nativeEvent;
itemPosition = isSectionFooter ? `Section footer at section ${section}.` : `Item at section ${section} and index ${nativeEvent.item}.`;
}
if (name == null) {
name = "Unknown component.";
}
logFastestListError("Expected item size mismatch.", {
detailMessage: `Expected item size ${nativeEvent.sizeExpected}, but got ${nativeEvent.size}.`,
itemPosition,
itemName: name,
itemProps,
listId: a0.current.listId
});
}, [a0]);
};
@@ -0,0 +1,10 @@
// Metro module 9245 (f9246).
import Logger from "../../debug/Logger";
import SentryUtils_native from "../../../utils/SentryUtils.native";
let c6078_2 = new Logger("FastestList");
export function logFastestListError(a0, a1) {
c6078_2.error(a0, a1);
SentryUtils_native.captureMessage(a0, {
extra: a1
});
}
@@ -0,0 +1,13 @@
// Metro module 9250 (f9251).
import { logFastestListError } from "./FastestListLogger.native";
export default function getFastestListSectionsWithErrorChecking(a0) {
if (a0.itemSizes.length > 1000 || a0.itemKeys.length > 1000) {
logFastestListError("Non-uniform configuration with large data set detected.", {
itemSizesLength: a0.itemSizes.length,
itemKeysLength: a0.itemKeys.length,
listId: a0.listId,
detail: "Using non-uniform item sizes or list keys forces a full iteration of the list entries. This will cause performance issues on slower devices, please consider using a uniform configuration."
});
}
return a0;
};
@@ -0,0 +1,19 @@
// Metro module 9254 (f9255).
import { logFastestListError } from "./FastestListLogger.native";
export default function getFastestListVisibleItemsWithErrorChecking(a0, a1, a2) {
if (a1.sectionStart > a2.length || a1.sectionEnd > a2.length) {
logFastestListError("Visible items `sectionStart/End` is greater than the number of sections", {
listId: a0,
sections: a2,
visibleItems: a1
});
}
if (a1.itemStart > a2[a1.sectionStart] || a1.itemEnd > a2[a1.sectionEnd]) {
logFastestListError("Visible items `itemStart/End` is greater than the number of items in the first section", {
listId: a0,
sections: a2,
visibleItems: a1
});
}
return a1;
};