Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,30 @@
/* Metro module 6805; source: design/components/Sheet/native/ActionSheet.native.tsx; dependencies: [31, 33, 4501, 697, 6275, 2] */
function _fun53550(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6983:6, offset: 0x0134e99e, size: 216 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const env0_3 = Reflect.apply(createStyles, createStylesModule, [{content: {paddingHorizontal: PX_16},
body: {gap: 24}}]);
value = value.forwardRef(_fun53551);
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/ActionSheet.native.tsx');
exports.ActionSheet = value;
}
function _fun53551(a0, a1) { // fn#53551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6983:224, offset: 0x0134ea76, size: 98 bytes, params: 3, frame: 16
const styles = useStyles();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
return (
<BottomSheet
ref={a1}
{...a0}
{...{['contentStyles']: styles.content}}
{...{['bodyStyles']: styles.body}}
/>
);
}
@@ -0,0 +1,33 @@
/* Metro module 6806; source: design/components/Sheet/native/ActionSheetCloseButton.native.tsx; dependencies: [31, 33, 5278, 1244, 5312, 697, 2] */
function _fun53552(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6984:6, offset: 0x0134ead8, size: 202 bytes, params: 8, frame: 20
const env0_0 = require;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
Object = global.Object;
const env0_4 = Object.freeze({radius: 12});
Object = global.Object;
const env0_5 = Object.freeze({'top': 8, 'right': 8, 'bottom': 8, 'left': 8});
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/ActionSheetCloseButton.native.tsx');
exports.ActionSheetCloseButton = ActionSheetCloseButton;
}
function ActionSheetCloseButton({onPress, variant}) { // fn#53553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6984:319, offset: 0x0134eba2, size: 245 bytes, params: 2, frame: 21
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object2 = {accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
object2.hitSlop = env0_5;
object2.androidRippleConfig = env0_4;
object2.onPress = onPress;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
return (
<PressableOpacity {...object2}>
<XSmallIcon
color={variant === 'overlay' ? (importDefault(697) /* metro dependency 697: native */).colors.WHITE : (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG}
/>
</PressableOpacity>
);
}
@@ -0,0 +1,105 @@
/* Metro module 6515; source: design/components/Sheet/native/ActionSheetHeaderBar.native.tsx; dependencies: [31, 27, 33, 4501, 697, 1244, 1478, 3860, 4559, 2] */
function _fun51234(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6693:6, offset: 0x0122c6d0, size: 237 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.Pressable;
const env0_4 = value.StyleSheet;
const env0_5 = value.TouchableWithoutFeedback;
const env0_6 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.Fragment;
const env0_9 = value.jsxs;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun51235);
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/ActionSheetHeaderBar.native.tsx');
exports.ActionSheetHeaderBar = ActionSheetHeaderBar;
}
function _fun51235(a0, a1, a2) { // fn#51235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6693:245, offset: 0x0122c7bd, size: 444 bytes, params: 4, frame: 21
var r11;
var r5;
var object3;
var WHITE;
var object9;
var object10;
const object11 = {};
const object12 = {marginBottom: a2};
copyDataProperties(object12, a0 === 'floating' ? {'left': 0, 'right': 0,
'position': 'absolute'} : a0 !== 'overlay' ? undefined : {'left': 0, 'right': 0, 'position': 'absolute'}, r11);
object11.header = object12;
const object13 = {alignSelf: 'center'};
const value2 = undefined;
const SHEET_HANDLE_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.SHEET_HANDLE_WIDTH;
object13.width = SHEET_HANDLE_WIDTH;
const SHEET_HANDLE_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.SHEET_HANDLE_HEIGHT;
object13.height = SHEET_HANDLE_HEIGHT;
const sm = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object13.borderRadius = sm;
const SHEET_HANDLE_MARGIN_TOP = (importDefault(697) /* metro dependency 697: native */).modules.mobile.SHEET_HANDLE_MARGIN_TOP;
object13.top = SHEET_HANDLE_MARGIN_TOP;
if (a0 === 'default') {
object10 = {};
object10.backgroundColor = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
r5 = object10;
r11 = sm;
} else if (a0 === 'floating') {
object9 = {};
object9.backgroundColor = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
r5 = object9;
r11 = sm;
} else if (a0 !== 'overlay') {
r5 = value2;
r11 = sm;
} else {
object3 = {};
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object3.backgroundColor = WHITE;
copyDataProperties(object3, (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW, WHITE);
r5 = object3;
r11 = WHITE;
}
copyDataProperties(object13, r5, r11);
object11.indicator = object13;
const object14 = {};
copyDataProperties(object14, StyleSheet.absoluteFillObject, r11);
object14['height'] = a1;
object14['marginTop'] = -a1 + a2;
object11.accessibleDismiss = object14;
return object11;
}
function ActionSheetHeaderBar({accessibilityLabel, style, tabStyle, onPress, variant}) { // fn#51236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6693:1050, offset: 0x0122c979, size: 412 bytes, params: 2, frame: 26
var r10;
var r0;
var value;
var intl;
var jsxRuntimeEnv0_8Binding;
if (accessibilityLabel !== undefined) {
r10 = accessibilityLabel;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r10 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu);
}
variant = variant === undefined ? 'default' : variant;
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const SHEET_HANDLE_MARGIN_BOTTOM = (importDefault(697) /* metro dependency 697: native */).modules.mobile.SHEET_HANDLE_MARGIN_BOTTOM;
const styles = useStyles(variant, height, Reflect.apply(useToken, useTokenModule, [SHEET_HANDLE_MARGIN_BOTTOM]));
const value3 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
const touchableWithoutFeedback = <TouchableWithoutFeedback onPress={onPress} onAccessibilityEscape={onPress} {...{['aria-hidden']: true}}><View style={[styles.header,
style]}><View style={[styles.indicator, tabStyle]} /></View></TouchableWithoutFeedback>;
if (value3) {
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
value = <Pressable style={styles.accessibleDismiss} accessible accessibilityLabel={r10} accessibilityRole="button" onPress={onPress} />;
value = <>{value}{touchableWithoutFeedback}</>;
r0 = value;
} else {
r0 = touchableWithoutFeedback;
}
return r0;
}
@@ -0,0 +1,33 @@
/* Metro module 9067; source: design/components/Sheet/native/ActionSheetHeaderPressableText.native.tsx; dependencies: [33, 4501, 1357, 5278, 4573, 2] */
function _fun70855(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9252:6, offset: 0x01d0b27f, size: 156 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
return {container: {marginTop: 3}};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/ActionSheetHeaderPressableText.native.tsx');
exports.ActionSheetHeaderPressableText = ActionSheetHeaderPressableText;
}
function ActionSheetHeaderPressableText({onPress, label, accessibilityLabel}) { // fn#70857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9252:307, offset: 0x01d0b32c, size: 207 bytes, params: 2, frame: 20
const styles = useStyles();
const r8 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ActionSheetHeaderPressableText') ? 'text-md/medium' : 'text-md/semibold';
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const r5 = accessibilityLabel ?? label;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<PressableOpacity
style={styles.container}
accessibilityRole="button"
onPress={onPress}
accessibilityLabel={r5}
>
<Text variant={r8} color="text-brand">
{label}
</Text>
</PressableOpacity>
);
}
@@ -0,0 +1,39 @@
/* Metro module 11251; source: design/components/Sheet/native/ActionSheetIconHeader.native.tsx; dependencies: [31, 27, 33, 4501, 4573, 2] */
function _fun86000(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11437:6, offset: 0x01f83886, size: 226 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'paddingVertical': 0,
'flexDirection': 'row', 'alignItems': 'center', 'gap': 12}, titles: {'justifyContent': 'center', 'flex': 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/ActionSheetIconHeader.native.tsx');
exports.ActionSheetIconHeader = ActionSheetIconHeader;
}
function ActionSheetIconHeader({title, subtitle, icon}) { // fn#86001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11437:410, offset: 0x01f83968, size: 233 bytes, params: 2, frame: 22
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const styles = useStyles();
return (
<View style={styles.container}>
<View>
{icon}
</View>
<View style={styles.titles}>
<Text
variant="redesign/heading-18/bold"
color="mobile-text-heading-primary"
accessibilityRole="header"
lineClamp={2}
>
{title}
</Text>
{subtitle != null ? <Text variant="text-xs/medium" color="text-default">{subtitle}</Text> : null}
</View>
</View>
);
}
@@ -0,0 +1,135 @@
/* Metro module 12766; source: design/components/Sheet/native/ActionSheetPresenter.native.tsx; dependencies: [57, 31, 27, 3849, 661, 33, 8742, 480, 4080, 4571, 6513, 4555, 566, 11206, 4509, 2] */
function _fun97557(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:6, offset: 0x021890a7, size: 240 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).StyleSheet;
const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).NOOP;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const env0_9 = value.forwardRef(_fun97558);
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/ActionSheetPresenter.native.tsx');
exports.ActionSheetPresenter = ActionSheetPresenter;
}
function _fun97558({sheetKey, content, impressionName, impressionProperties, zIndex}, a1) { // fn#97558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:192, offset: 0x02189197, size: 470 bytes, params: 3, frame: 28
const binding = env0_4;
const [property, env0_2] = env0_3(binding.useState('visible'), 2);
var env0_3 = binding.useRef(NOOP);
let useCallback = binding.useCallback;
const value4 = Reflect.apply(useCallback, binding, [_fun97559, []]);
const env0_5 = binding.useRef(NOOP);
const value5 = binding.useCallback(_fun97560, []);
const defaultImport = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
const HALFSHEET = ImpressionTypes.HALFSHEET;
defaultImport({type: HALFSHEET, name: impressionName, properties: impressionProperties});
binding.useImperativeHandle(a1, function() {
return {componentDidEnter: _fun97562, componentWillLeave: _fun97563, componentDidLeave: _fun97564};
}, []);
const value6 = binding.useCallback(_fun97565, [sheetKey]);
const value7 = binding.useMemo(_fun97566, [property, value6, value5, value4]);
useCallback = binding.useCallback;
(importDefault(4571) /* metro dependency 4571: useBackPressHandler */)(Reflect.apply(useCallback, binding,
[_fun97567, [value6]]));
const Provider = (importDefault(6513) /* metro dependency 6513: ActionSheetContext */).Provider;
const Dialog = (require(4555) /* metro dependency 4555: DialogNative */).Dialog;
return (
<Provider value={value7}>
<Dialog
dialogKey={sheetKey}
onDismiss={value6}
zIndex={zIndex}
>
{content}
</Dialog>
</Provider>
);
}
function ActionSheetPresenter({appEntryKey}) { // fn#97568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:1134, offset: 0x021894a0, size: 209 bytes, params: 2, frame: 21
env0_4.useEffect(function() {
return _fun97570;
}, [appEntryKey]);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value4 = ((a0, a1) => {
var env0_0 = a1;
return a0.filter(_fun97572);
})(Reflect.apply(useStateFromStoresArray, fluxModule, [[ActionSheetStore], function() {
return ActionSheetStore.getStack();
}, []]), appEntryKey).map(_fun97574);
const TransitionGroup = (require(11206) /* metro dependency 11206: TransitionGroup */).TransitionGroup;
const absoluteFill = StyleSheet.absoluteFill;
const TransitionGroupOverlayView = (require(4509) /* metro dependency 4509: OverlayView */).TransitionGroupOverlayView;
return (
<TransitionGroup style={absoluteFill} component={TransitionGroupOverlayView}>
{value4}
</TransitionGroup>
);
}
function _fun97560() { // fn#97560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:411, offset: 0x02189381, size: 20 bytes, params: 1, frame: 9
env0_5.current();
}
function _fun97561() { // fn#97561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:529, offset: 0x02189395, size: 44 bytes, params: 1, frame: 3
return {componentDidEnter: componentDidEnter_97562, componentWillLeave: componentWillLeave_97563,
componentDidLeave: componentDidLeave};
}
function _fun97565() { // fn#97565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:690, offset: 0x0218941b, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet(sheetKey);
}
function _fun97566() { // fn#97566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:742, offset: 0x02189448, size: 43 bytes, params: 1, frame: 3
return {transitionState: env0_1, close: env0_7, onLeave: env0_6, registerDismissHandler: env0_4};
}
function _fun97567() { // fn#97567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:840, offset: 0x02189473, size: 45 bytes, params: 1, frame: 10
if (env0_3.current != null) {
env0_3.current();
}
env0_7();
return true;
}
function _fun97569() { // fn#97569, offset: 0x02189571, size: 11 bytes, params: 1, frame: 1
return _fun97570;
}
function filterStackForAppEntryKey(a0, a1) { // fn#97571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:1259, owner: ActionSheetPresenter.filterStackForAppEntryKey, offset: 0x021895a9, size: 31 bytes, params: 3, frame: 11
const env0_0 = a1;
return a0.filter(function({appEntryKey}) {
return appEntryKey === require;
});
}
function _fun97574({content, key, impressionName, impressionProperties, zIndex}) { // fn#97574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:1408, offset: 0x021895f1, size: 79 bytes, params: 2, frame: 19
return ((Component) => <Component sheetKey={key} content={content} impressionName={impressionName} impressionProperties={impressionProperties} zIndex={zIndex} key={key} />)(env1_9);
}
function componentDidEnter_97562() { // fn#97562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:535, offset: 0x021893c1, size: 20 bytes, params: 1, frame: 11
env1_2('visible');
}
function componentWillLeave_97563(a0) { // fn#97563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:569, offset: 0x021893d5, size: 33 bytes, params: 2, frame: 12
env1_2('exiting');
env1_5.current = a0;
}
function componentDidLeave() { // fn#97564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:617, offset: 0x021893f6, size: 37 bytes, params: 1, frame: 12
env1_2('exited');
env1_5.current = NOOP;
}
function _fun97570() { // fn#97570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12956:1198, offset: 0x0218957c, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.resetActionSheetsForAppEntryKey(appEntryKey);
}
@@ -0,0 +1,69 @@
/* Metro module 6807; source: design/components/Sheet/native/ActionSheetRow.native.tsx; dependencies: [31, 27, 33, 6238, 6242, 6231, 6808, 2] */
function _fun53554(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6985:6, offset: 0x0134ec97, size: 206 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = ActionSheetRow;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = value.createContext('default');
closure.Icon = Icon_53556;
closure.Group = Group_53557;
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/ActionSheetRow.native.tsx');
exports.ActionSheetRow = closure;
exports.ActionSheetSwitchRow = ActionSheetSwitchRow;
}
function ActionSheetRow(a0) { // fn#53555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6985:164, offset: 0x0134ed65, size: 166 bytes, params: 2, frame: 23
const label = a0.label;
let variant = a0.variant;
variant = variant === undefined ? 'default' : variant;
const arrow = a0.arrow;
const icon = a0.icon;
const object2 = {'label': 0, 'variant': 0, 'arrow': 0, 'icon': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const Provider = env0_5.Provider;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<Provider value={variant}>
<TableRow
variant={variant}
label={label}
arrow={arrow}
icon={icon}
{...value}
/>
</Provider>
);
}
function Icon_53556({source, IconComponent}) { // fn#53556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6985:359, offset: 0x0134ee0b, size: 103 bytes, params: 2, frame: 17
const value2 = env0_2.useContext(env0_5);
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
return (
<TableRowIcon
source={source}
IconComponent={IconComponent ?? undefined}
variant={value2}
/>
);
}
function Group_53557({children, title, hasIcons}) { // fn#53557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6985:542, offset: 0x0134ee72, size: 93 bytes, params: 2, frame: 18
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<View>
<TableRowGroup hasIcons={hasIcons} title={title}>
{children}
</TableRowGroup>
</View>
);
}
function ActionSheetSwitchRow(a0) { // fn#53558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6985:830, offset: 0x0134eecf, size: 55 bytes, params: 2, frame: 14
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return <TableSwitchRow {...a0} />;
}
@@ -0,0 +1,479 @@
/* Metro module 6275; source: design/components/Sheet/native/BottomSheet.native.tsx; dependencies: [57, 31, 27, 6276, 33, 4501, 697, 4020, 1585, 4559, 5314, 6277, 4589, 676, 4017, 6513, 3875, 6514, 4594, 6515, 6516, 5462, 1478, 4003, 477, 6517, 3868, 2] */
function _fun49571(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:6, offset: 0x011fd6a7, size: 452 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.StyleSheet;
const env0_6 = value2.View;
value2.Platform;
const actionSheetConstantsModule = require(6276) /* metro dependency 6276: ActionSheetConstants */;
const env0_7 = actionSheetConstantsModule.ACTION_SHEET_START_HEIGHT_RATIO;
const env0_8 = actionSheetConstantsModule.ACTION_SHEET_MAX_WIDTH;
const env0_9 = actionSheetConstantsModule.ACTION_SHEET_SPRING_CONFIG;
const env0_10 = actionSheetConstantsModule.ACTION_SHEET_SPRING_CONFIG_REDUCED_MOTION;
const env0_11 = actionSheetConstantsModule.ACTION_SHEET_GRADIENT_BORDER_WIDTH;
const env0_12 = actionSheetConstantsModule.ACTION_SHEET_GRADIENT_BORDER_RADIUS;
const env0_13 = actionSheetConstantsModule.ACTION_SHEET_BORDER_RADIUS;
const env0_14 = actionSheetConstantsModule.ACTION_SHEET_INNER_BORDER_RADIUS;
const env0_15 = actionSheetConstantsModule.ACTION_SHEET_MINIMUM_BOTTOM_PADDING;
const value4 = require(33) /* metro dependency 33 */;
const env0_16 = value4.jsx;
const env0_17 = value4.jsxs;
const env0_18 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun49574);
const env0_19 = value.forwardRef(_fun49575);
const env0_20 = value.forwardRef(_fun49579);
object = {code: 'function BottomSheetNativeTsx1(){const{animatedIndex}=this.__closure;return animatedIndex.get()<=-1;}'};
object = {code: 'function BottomSheetNativeTsx2(){const{animatedIsVisuallyClosed}=this.__closure;return animatedIsVisuallyClosed.get();}'};
object = {code: "function BottomSheetNativeTsx3(isVisuallyClosed){const{transitionState,runOnJS,onLeave}=this.__closure;if(isVisuallyClosed&&transitionState==='exiting'){runOnJS(onLeave)();}}"};
value = value.forwardRef(_fun49582);
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/BottomSheet.native.tsx');
exports.BottomSheet = value;
}
function Background_49572(a0) { // fn#49572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:3029, offset: 0x011fd86b, size: 33 bytes, params: 2, frame: 13
return <View {...a0} />;
}
function GradientBackground(a0) { // fn#49573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:3071, offset: 0x011fd88c, size: 79 bytes, params: 2, frame: 17
const styles = useStyles(false);
return (
<View {...a0}>
<View style={styles.backgroundOverlay} />
</View>
);
}
function _fun49574(a0) { // fn#49574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:551, offset: 0x011fd8db, size: 436 bytes, params: 2, frame: 23
let value = a1;
const value2 = a2;
const value3 = undefined;
const r9 = value !== value3 ? value : 0;
const r8 = value2 !== value3 ? value2 : false;
const object4 = {};
const object5 = {};
value = 'hidden';
object5.overflow = value;
object5.borderTopLeftRadius = ACTION_SHEET_BORDER_RADIUS;
object5.borderTopRightRadius = ACTION_SHEET_BORDER_RADIUS;
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object5.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
object4.background = object5;
object4.wrapper = {'overflow': 'hidden', 'flex': 1};
const object6 = {overflow: value};
object6.marginTop = ACTION_SHEET_GRADIENT_BORDER_WIDTH;
object6.marginHorizontal = ACTION_SHEET_GRADIENT_BORDER_WIDTH;
object6.borderTopLeftRadius = ACTION_SHEET_GRADIENT_BORDER_RADIUS;
object6.borderTopRightRadius = ACTION_SHEET_GRADIENT_BORDER_RADIUS;
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object6.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
object4.wrapperWithBorder = object6;
const ACTION_SHEET_BORDER_RADIUS2 = a0 ? ACTION_SHEET_BORDER_RADIUS : value3;
const ACTION_SHEET_BORDER_RADIUS3 = a0 ? ACTION_SHEET_BORDER_RADIUS : value3;
object4.content = {borderTopLeftRadius: ACTION_SHEET_BORDER_RADIUS2,
borderTopRightRadius: ACTION_SHEET_BORDER_RADIUS3, overflow: a0 ? value : value3, marginBottom: r8 ? 0 : r9 + 4,
flex: 1};
const fabricUtilsModule = require(4020) /* metro dependency 4020: FabricUtils */;
object4.gradient = {height: '100%', overflow: fabricUtilsModule.isIosFabric() ? value : value3,
borderTopLeftRadius: ACTION_SHEET_INNER_BORDER_RADIUS, borderTopRightRadius: ACTION_SHEET_INNER_BORDER_RADIUS};
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object4.handleIndicator = {backgroundColor: BACKGROUND_MOD_STRONG};
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
const MOBILE_ACTIONSHEET_GRADIENT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_GRADIENT_BACKGROUND_DEFAULT;
object8['backgroundColor'] = MOBILE_ACTIONSHEET_GRADIENT_BACKGROUND_DEFAULT;
object4.backgroundOverlay = object8;
object4.header = {marginBottom: 16};
object4.body = {flex: 1};
return object4;
}
function _fun49575(a0, a1) { // fn#49575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:1411, offset: 0x011fda8f, size: 573 bytes, params: 3, frame: 30
const startHeight = a0.startHeight;
a0.hasEverExpanded;
const height = a0.windowDimensions.height;
const wrapperStyle = a0.wrapperStyle;
const scrollViewStyle = a0.scrollViewStyle;
const startExpanded = a0.startExpanded;
const onChange = a0.onChange;
const onExpand = a0.onExpand;
const keyboardShouldPersistTaps = a0.keyboardShouldPersistTaps;
const children = a0.children;
const maxDynamicContentSize = a0.maxDynamicContentSize;
const object2 = {'startHeight': 0, 'hasEverExpanded': 0, 'windowDimensions': 0, 'wrapperStyle': 0,
'scrollViewStyle': 0, 'startExpanded': 0, 'onChange': 0, 'onExpand': 0, 'keyboardShouldPersistTaps': 0,
'children': 0, 'maxDynamicContentSize': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const env0_4 = undefined;
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const value3 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
const r1 = startHeight ?? height * ACTION_SHEET_START_HEIGHT_RATIO;
const env0_3 = r1;
const r14 = maxDynamicContentSize ?? height - (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT_MULTILINE - top;
let binding = env0_4;
const useState = binding.useState;
const value7 = env0_3(Reflect.apply(useState, binding, [value3 || startExpanded ? [] : [r1]]), 2);
const property = value7[0];
binding = value7[1];
binding.useEffect(_fun49576, [value3]);
const value8 = binding.useCallback(_fun49577, [r1]);
const value9 = binding.useCallback(function(a0, a1, a2) {
if (onChange != null) {
onChange(a0, a1, a2);
}
if (a0 === 0) {
if (onExpand != null) {
onExpand();
}
}
}, [onChange, onExpand]);
const defaultImport = importDefault(6277) /* metro dependency 6277 */;
const defaultImportProps = {...value};
defaultImportProps['enableDynamicSizing'] = true;
defaultImportProps['snapPoints'] = property;
defaultImportProps['maxDynamicContentSize'] = r14;
defaultImportProps['ref'] = a1;
defaultImportProps['onChange'] = value9;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
return ((Component) => <Component {...defaultImportProps}><BottomSheetScrollView bounces={false} keyboardShouldPersistTaps={keyboardShouldPersistTaps} style={scrollViewStyle}><View onLayout={value8} style={wrapperStyle}>{children}</View></BottomSheetScrollView></Component>)(defaultImport);
}
function _fun49579(a0, a1) { // fn#49579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:2235, offset: 0x011fdd5a, size: 637 bytes, params: 3, frame: 33
var r6;
const VerticalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
const startHeight = a0.startHeight;
const contentHeight = a0.contentHeight;
const maxHeight = a0.maxHeight;
const hasEverExpanded = a0.hasEverExpanded;
const height = a0.windowDimensions.height;
const wrapperStyle = a0.wrapperStyle;
const onChange = a0.onChange;
const onExpand = a0.onExpand;
const children = a0.children;
const borderGradient = a0.borderGradient;
const extraContent = a0.extraContent;
const object2 = {'startHeight': 0, 'contentHeight': 0, 'maxHeight': 0, 'hasEverExpanded': 0, 'windowDimensions': 0,
'wrapperStyle': 0, 'onChange': 0, 'onExpand': 0, 'children': 0, 'borderGradient': 0, 'extraContent': 0};
silentSetPrototypeOf(object2, null, undefined);
let value = copyDataProperties({}, a0, object2, undefined);
const styles = useStyles(false);
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const value3 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
const r1 = startHeight ?? height * ACTION_SHEET_START_HEIGHT_RATIO;
const env0_4 = r1;
let r17 = maxHeight ?? contentHeight;
r17 = r17 ?? height - (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT_MULTILINE - top;
const binding = env0_4;
const value6 = binding.useMemo(_fun49580, [hasEverExpanded, value3, r17, r1]);
const value8 = binding.useCallback(_fun49581, [onChange, onExpand, value6.length - 1]);
const view = <View style={[wrapperStyle, {maxHeight: r17}]}>{children}</View>;
const defaultImport = importDefault(6277) /* metro dependency 6277 */;
const defaultImportProps = {...value};
defaultImportProps['ref'] = a1;
defaultImportProps['enableDynamicSizing'] = false;
defaultImportProps['contentHeight'] = contentHeight;
defaultImportProps['snapPoints'] = value6;
defaultImportProps['onChange'] = value8;
if (borderGradient == null) {
r6 = view;
} else {
value = importDefault(4589) /* metro dependency 4589 */;
value = ((Component) => <Component style={styles.gradient} start={VerticalGradient.START} end={VerticalGradient.END} colors={borderGradient}>{view}</Component>)(value);
r6 = value;
}
return ((Component) => <Component {...defaultImportProps}>{r6}{extraContent}</Component>)(defaultImport);
}
function _fun49582(a0, a1) { // fn#49582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:3625, offset: 0x011fe060, size: 1714 bytes, params: 3, frame: 56
let scrollable = a0.scrollable;
const value = undefined;
scrollable = !(scrollable === value) && scrollable;
const startHeight = a0.startHeight;
const maxHeight = a0.maxHeight;
const containerHeight = a0.containerHeight;
let startExpanded = a0.startExpanded;
startExpanded = !(startExpanded === value) && startExpanded;
const backdropOpacity = a0.backdropOpacity;
const backdropChildren = a0.backdropChildren;
const header = a0.header;
const handleComponent = a0.handleComponent;
let handleDisabled = a0.handleDisabled;
handleDisabled = !(handleDisabled === value) && handleDisabled;
const dismissAccessibilityLabel = a0.dismissAccessibilityLabel;
const footer = a0.footer;
const env0_3 = footer;
const onExpand = a0.onExpand;
const env0_4 = onExpand;
const onDismiss = a0.onDismiss;
const keyboardShouldPersistTaps = a0.keyboardShouldPersistTaps;
const children = a0.children;
const backgroundStyles = a0.backgroundStyles;
const contentStyles = a0.contentStyles;
const bodyStyles = a0.bodyStyles;
const borderGradient = a0.borderGradient;
const showGradient = a0.showGradient;
const extraContent = a0.extraContent;
const contentHeight = a0.contentHeight;
let object2 = {'scrollable': 0, 'startHeight': 0, 'maxHeight': 0, 'containerHeight': 0, 'startExpanded': 0,
'backdropOpacity': 0, 'backdropChildren': 0, 'header': 0, 'handleComponent': 0, 'handleDisabled': 0,
'dismissAccessibilityLabel': 0, 'footer': 0, 'onExpand': 0, 'onDismiss': 0, 'keyboardShouldPersistTaps': 0,
'children': 0, 'backgroundStyles': 0, 'contentStyles': 0, 'bodyStyles': 0, 'borderGradient': 0,
'showGradient': 0, 'extraContent': 0, 'contentHeight': 0};
const value5 = null;
silentSetPrototypeOf(object2, value5, undefined);
const value6 = copyDataProperties({}, a0, object2, undefined);
let binding = env0_4;
let useContext = binding.useContext;
const {transitionState, close, onLeave, registerDismissHandler} = Reflect.apply(useContext, binding,
[importDefault(6513) /* metro dependency 6513: ActionSheetContext */]);
const {top, bottom} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const Math = global.Math;
const styles = useStyles(handleDisabled, Math.max(bottom, ACTION_SHEET_MINIMUM_BOTTOM_PADDING), scrollable);
const value10 = binding.useRef(value5);
const [property, env0_11] = env0_3(binding.useState(startExpanded), 2);
const env0_12 = binding.useRef(false);
const env0_13 = binding.useRef(true);
useContext = binding.useContext;
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
const r17 = Reflect.apply(useContext, binding,
[AccessibilityPreferencesContext]).reducedMotion.enabled ? ACTION_SHEET_SPRING_CONFIG_REDUCED_MOTION : ACTION_SHEET_SPRING_CONFIG;
binding = env0_4;
binding.useLayoutEffect(function() {
registerDismissHandler(onDismiss);
}, [onDismiss, registerDismissHandler]);
(require(6514) /* metro dependency 6514: BottomSheetHandle */).useBottomSheetImperativeHandle(a1, value10);
binding.useEffect(_fun49584, [transitionState, close]);
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(_fun49585);
const value13 = binding.useCallback(_fun49586, [close]);
const value14 = binding.useCallback(_fun49587, [onExpand]);
const animatedIndex = value6.animatedIndex;
const r12 = value5 == animatedIndex ? (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1) : animatedIndex;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = he_49588;
closure.__closure = {animatedIndex: r12};
closure.__workletHash = 4341912681188;
closure.__initData = env0_21;
const value16 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue5 = reanimatedRexportModule;
const useAnimatedReaction = moduleValue5.useAnimatedReaction;
closure = Se_49589;
closure.__closure = {animatedIsVisuallyClosed: value16};
closure.__workletHash = 6995719052506;
closure.__initData = env0_22;
const closure2 = _e;
object2 = {transitionState: transitionState};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.onLeave = onLeave;
closure2.__closure = object2;
closure2.__workletHash = 77590951197;
closure2.__initData = env0_23;
Reflect.apply(useAnimatedReaction, moduleValue5, [closure, closure2]);
const value17 = binding.useCallback(_fun49591, [dismissAccessibilityLabel]);
const value18 = binding.useCallback(_fun49593, [backdropOpacity, backdropChildren]);
const value19 = binding.useCallback(_fun49594, [footer]);
const value20 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)({ignoreKeyboard: true});
const value21 = useConstrainedContainerStyle(value20);
const r5 = scrollable ? env0_20 : env0_19;
const value22 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
const backgroundComponent = value6.backgroundComponent;
const r14 = value5 != backgroundComponent ? backgroundComponent : showGradient ? GradientBackground : Background_49572;
const r5Props2 = {ref: value10,
accessible: !(require(477) /* metro dependency 477: PlatformUtils */).isIOS() && value,
accessibilityRole: 'none', accessibilityLabel: '', startHeight: startHeight, contentHeight: contentHeight,
maxHeight: maxHeight, containerHeight: containerHeight, startExpanded: startExpanded, hasEverExpanded: property,
windowDimensions: value20, wrapperStyle: [styles.wrapper, value5 != borderGradient && styles.wrapperWithBorder],
onExpand: value14, enablePanDownToClose: true, containerStyle: value21, backgroundStyle: [styles.background,
backgroundStyles], topInset: top, keyboardBehavior: scrollable ? 'extend' : 'interactive',
keyboardBlurBehavior: 'restore', keyboardShouldPersistTaps: keyboardShouldPersistTaps, animationConfigs: r17};
const ReduceMotion = reanimatedRexportModule.ReduceMotion;
const Never = ReduceMotion.Never;
r5Props2.overrideReduceMotion = Never;
r5Props2.handleIndicatorStyle = styles.handleIndicator;
r5Props2.handleComponent = handleDisabled ? value5 : value5 == handleComponent ? value17 : handleComponent;
r5Props2.backdropComponent = value18;
r5Props2.backgroundComponent = r14;
r5Props2.renderFooter = value19;
r5Props2.animatedIndex = r12;
r5Props2.onAnimate = value13;
r5Props2.onClose = onLeave;
r5Props2.borderGradient = borderGradient;
r5Props2.extraContent = extraContent;
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
const value29 = ((Component) => <Component {...r5Props2}><LayerScope><View style={[styles.content,
contentStyles]}>{value5 != header && <View style={styles.header}>{header}</View>}<View style={[styles.body,
bodyStyles]}>{children}</View></View></LayerScope></Component>)(r5);
if (showGradient) {
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
return (
<ThemeContextProvider gradient={value5 != value22 ? value22 : value5}>
{value29}
</ThemeContextProvider>
);
} else {
return value29;
}
}
function _fun49576() { // fn#49576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:1809, offset: 0x011fdccc, size: 29 bytes, params: 1, frame: 11
if (env0_2) {
env0_4([]);
}
}
function _fun49577({nativeEvent}) { // fn#49577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:1851, offset: 0x011fdce9, size: 50 bytes, params: 2, frame: 11
if (nativeEvent.layout.height < env0_3) {
env0_4([]);
}
}
function _fun49580() { // fn#49580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:2582, offset: 0x011fdfd7, size: 72 bytes, params: 1, frame: 13
const items2 = [];
if (!env0_3 && !hasEverExpanded && env0_4 < env0_5) {
items2.push(env0_4);
}
items2.push(env0_5);
return items2;
}
function _fun49581(a0, a1, a2) { // fn#49581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:2680, offset: 0x011fe01f, size: 65 bytes, params: 4, frame: 17
if (onChange != null) {
onChange(a0, a1, a2);
}
if (a0 === env0_6) {
if (onExpand != null) {
onExpand();
}
}
}
function _fun49584() { // fn#49584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:4455, offset: 0x011fe726, size: 108 bytes, params: 1, frame: 10
var current;
if (!(transitionState !== 'exiting' || env0_12.current)) {
env0_13.current = false;
current = env0_10.current;
if (current != null) {
current.forceClose();
}
}
if (transitionState === 'visible' && env0_12.current) {
close();
}
}
function _fun49585() { // fn#49585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:4613, offset: 0x011fe792, size: 47 bytes, params: 1, frame: 10
if (env0_13.current) {
if (onDismiss != null) {
onDismiss();
}
}
onLeave();
}
function _fun49586(a0, a1, a2, a3, a4) { // fn#49586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:4683, offset: 0x011fe7c1, size: 140 bytes, params: 6, frame: 14
var current;
const ANIMATION_SOURCE = (require(6277) /* metro dependency 6277 */).ANIMATION_SOURCE;
const KEYBOARD = ANIMATION_SOURCE.KEYBOARD;
if (a4 !== KEYBOARD) {
if (a1 !== -1) {
if (a1 > -1) {
current = env0_12.current;
if (current) {
current = env0_10.current;
if (current != null) {
current.forceClose();
}
}
}
} else {
current = env0_12.current;
if (current) {
if (a1 > -1) {
current = env0_12.current;
if (current) {
current = env0_10.current;
if (current != null) {
current.forceClose();
}
}
}
} else {
env0_12.current = true;
close();
}
}
}
}
function _fun49587() { // fn#49587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:4875, offset: 0x011fe84d, size: 36 bytes, params: 1, frame: 12
env0_11(true);
if (onExpand != null) {
onExpand();
}
}
function he_49588() { // fn#49588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:5043, offset: 0x011fe871, size: 28 bytes, params: 1, frame: 9
return env0_14.get() <= -1;
}
function Se_49589() { // fn#49589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:5176, offset: 0x011fe88d, size: 18 bytes, params: 1, frame: 9
return env0_15.get();
}
function _e(a0) { // fn#49590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:5286, offset: 0x011fe89f, size: 74 bytes, params: 2, frame: 12
let value = a0;
if (value && transitionState === 'exiting') {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(onLeave)();
}
}
function _fun49591() { // fn#49591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:5477, offset: 0x011fe8e9, size: 67 bytes, params: 1, frame: 14
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
return <ActionSheetHeaderBar accessibilityLabel={dismissAccessibilityLabel} onPress={onPress_49592} />;
}
function _fun49593({style, animatedIndex}) { // fn#49593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:5613, offset: 0x011fe94c, size: 137 bytes, params: 2, frame: 18
const items2 = [StyleSheet.absoluteFill, style];
const BottomSheetBackdrop = (require(6516) /* metro dependency 6516: BottomSheetBackdropNative */).BottomSheetBackdrop;
return (
<View style={items2}>
<BottomSheetBackdrop animatedIndex={animatedIndex} opacity={backdropOpacity} />
{backdropChildren}
</View>
);
}
function _fun49594(a0) { // fn#49594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:5773, offset: 0x011fe9d5, size: 121 bytes, params: 2, frame: 18
const value = environment.__proto__;
const BottomSheetFooter = (require(6277) /* metro dependency 6277 */).BottomSheetFooter;
return (
<BottomSheetFooter {...a0}>
{footer ?? ((NavScrim) => <NavScrim />)((require(5462) /* metro dependency 5462: NavScrimAndroid */).NavScrim)}
</BottomSheetFooter>
);
}
function useConstrainedContainerStyle({width}) { // fn#49595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:5898, offset: 0x011fea4e, size: 47 bytes, params: 2, frame: 14
return env1_4.useMemo(_fun49596, [width]);
}
function onPress_49592() { // fn#49592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:5543, offset: 0x011fe92c, size: 32 bytes, params: 1, frame: 9
const current = env1_10.current;
if (current != null) {
current.close();
}
}
function _fun49596() { // fn#49596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6453:5965, offset: 0x011fea7d, size: 55 bytes, params: 1, frame: 14
const Math = global.Math;
const max = Math.max;
const widthBinding = width;
const value = environment.__proto__.__proto__;
return {marginHorizontal: Reflect.apply(max, Math, [widthBinding - ACTION_SHEET_MAX_WIDTH, 0]) / 2};
}
@@ -0,0 +1,86 @@
/* Metro module 6516; source: design/components/Sheet/native/BottomSheetBackdrop.native.tsx; dependencies: [31, 33, 4501, 6277, 5321, 4017, 4562, 2] */
function _fun51237(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6694:6, offset: 0x0122cb15, size: 213 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}});
object = {code: 'function BottomSheetBackdropNativeTsx1(){const{runOnJS,handleOnPress}=this.__closure;runOnJS(handleOnPress)();}'};
object = {code: 'function BottomSheetBackdropNativeTsx2(){const{interpolate,animatedIndex,disappearsOnIndex,appearsOnIndex,opacity}=this.__closure;return{opacity:interpolate(animatedIndex.get(),[-1,disappearsOnIndex,appearsOnIndex],[0,0,opacity])};}'};
value = value.memo(_fun51238);
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/BottomSheetBackdrop.native.tsx');
exports.BottomSheetBackdrop = value;
}
function _fun51238({animatedIndex, opacity, appearsOnIndex, disappearsOnIndex, pressBehavior, onPress, style}) { // fn#51238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6694:542, offset: 0x0122cbea, size: 589 bytes, params: 2, frame: 30
opacity = opacity === undefined ? 1 : opacity;
appearsOnIndex = appearsOnIndex === undefined ? 0 : appearsOnIndex;
const env0_2 = appearsOnIndex;
disappearsOnIndex = disappearsOnIndex === undefined ? -1 : disappearsOnIndex;
pressBehavior = pressBehavior === undefined ? 'close' : pressBehavior;
const env0_5 = onPress;
const env0_6 = style;
const styles = useStyles();
const {snapToIndex, close} = (require(6277) /* metro dependency 6277 */).useBottomSheet();
const binding = env0_2;
const value3 = binding.useCallback(function() {
if (onPress != null) {
onPress();
}
if (pressBehavior === 'close') {
close();
} else if (pressBehavior === 'collapse') {
snapToIndex(disappearsOnIndex);
} else if (typeof pressBehavior === 'number') {
snapToIndex(pressBehavior);
}
}, [snapToIndex, close, disappearsOnIndex, pressBehavior, onPress]);
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value4 = Gesture.Tap();
const onEnd = value4.onEnd;
let closure = I_51240;
closure.__closure = {runOnJS: (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS,
handleOnPress: value3};
closure.__workletHash = 3995467602852;
closure.__initData = env0_5;
const value5 = Reflect.apply(onEnd, value4, [closure]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = S_51241;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, animatedIndex: animatedIndex,
disappearsOnIndex: disappearsOnIndex, appearsOnIndex: appearsOnIndex, opacity: opacity};
closure.__workletHash = 1140766381376;
closure.__initData = env0_6;
const value7 = binding.useMemo(_fun51242, [styles.container, style, Reflect.apply(useAnimatedStyle,
reanimatedRexportModule, [closure])]);
const Backdrop = (require(4562) /* metro dependency 4562: BackdropNative */).Backdrop;
const backdrop = <Backdrop blur="none" style={value7} onDismiss={value3} {...{['aria-hidden']: true}} />;
if (pressBehavior === 'none') {
return backdrop;
} else {
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
return (
<GestureDetector gesture={value5}>
{backdrop}
</GestureDetector>
);
}
}
function I_51240() { // fn#51240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6694:878, offset: 0x0122cea5, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_10)();
}
function S_51241() { // fn#51241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6694:1044, offset: 0x0122ced5, size: 110 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
return {opacity: value.interpolate(animatedIndex.get(), [-1, disappearsOnIndex, appearsOnIndex], [0, 0, opacity])};
}
function _fun51242() { // fn#51242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6694:1288, offset: 0x0122cf43, size: 38 bytes, params: 1, frame: 3
return [styles.container, style, env0_11];
}
@@ -0,0 +1,58 @@
/* Metro module 6514; source: design/components/Sheet/native/BottomSheetHandle.tsx; dependencies: [31, 2] */
function _fun51227(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6692:6, offset: 0x0122c54f, size: 104 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/BottomSheetHandle.tsx');
exports.useBottomSheetImperativeHandle = function(a0, a1) {
a1.useImperativeHandle(a0, _fun51229, [a1]);
};
}
function useBottomSheetImperativeHandle(a0, a1) { // fn#51228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6692:225, offset: 0x0122c5b7, size: 49 bytes, params: 3, frame: 15
a1.useImperativeHandle(a0, function() {
return {expandActionSheet: _fun51230, closeActionSheet: _fun51231, collapseActionSheet: _fun51232,
snapToIndex: _fun51233};
}, [a1]);
}
function _fun51229() { // fn#51229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6692:295, offset: 0x0122c5e8, size: 48 bytes, params: 1, frame: 3
return {expandActionSheet: function() {
var current = require.current;
if (current != null) {
current.expand();
}
}, closeActionSheet: closeActionSheet_51231, collapseActionSheet: function() {
var current = require.current;
if (current != null) {
current.collapse();
}
}, snapToIndex: function(a0) {
var current = require.current;
if (current != null) {
current.snapToIndex(a0);
}
}};
}
function closeActionSheet_51231(a0) { // fn#51231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6692:360, offset: 0x0122c638, size: 84 bytes, params: 2, frame: 12
var value2;
var current;
var value3;
const value = undefined;
if ((a0 == null ? value : a0.force) === true) {
value3 = environment.__proto__;
current = require.current;
if (current != null) {
current.forceClose();
}
} else {
value2 = environment.__proto__;
current = require.current;
if (current != null) {
current.close();
}
}
return value;
}
@@ -0,0 +1,35 @@
/* Metro module 9101; source: design/components/Sheet/native/BottomSheetTextInput.native.tsx; dependencies: [31, 33, 6997, 6995, 9102, 2] */
function _fun71211(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9286:6, offset: 0x01d190ca, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/BottomSheetTextInput.native.tsx');
exports.BottomSheetTextInput = BottomSheetTextInput;
}
function BottomSheetTextInput(a0) { // fn#71212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9286:239, offset: 0x01d19158, size: 216 bytes, params: 2, frame: 21
var onFocusBinding = a0.onFocus;
var onBlurBinding = a0.onBlur;
const env0_0 = a0.ref;
const object2 = {'onFocus': 0, 'onBlur': 0, 'ref': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const value3 = env0_3.useRef(null);
var {onFocus,
onBlur} = (importDefault(6997) /* metro dependency 6997: useBottomSheetKeyboardHandling */)({onFocus: onFocusBinding,
onBlur: onBlurBinding});
(require(6995) /* metro dependency 6995: NativeTextInputNative */).useKeyboardBlurring(value3);
return ((Component) => <Component ref={ref_71213} onFocus={onFocusBinding} onBlur={onBlurBinding} {...value} />)(importDefault(9102) /* metro dependency 9102: TextInput */);
}
function BottomSheetTextInputRef(a0) { // fn#71213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9286:431, owner: BottomSheetTextInput.ref, offset: 0x01d19230, size: 68 bytes, params: 2, frame: 12
env0_1.current = a0;
if (typeof ref === 'function') {
ref(a0);
} else if (ref != null) {
ref.current = a0;
}
}
@@ -0,0 +1,155 @@
/* Metro module 6758; source: design/components/Sheet/native/BottomSheetTitleHeader.native.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 1478, 3860, 1357, 4573, 5283, 2] */
function _fun53244(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6936:6, offset: 0x01343094, size: 318 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
var object2 = {'paddingHorizontal': null, 'flexDirection': 'row', 'gap': 4, 'position': 'relative'};
object2.paddingHorizontal = importDefault(dependencyMap[5]).modules.mobile.SHEET_HEADER_PADDING_HORIZONTAL;
return {container: object2, titles: {'flexGrow': 1, 'flexShrink': 1, 'gap': 2}, subtitle: {textAlign: 'center'},
title: {textAlign: 'center'}};
});
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
return {container: {flexDirection: 'column'}, accessories: {'flexDirection': 'row',
'justifyContent': 'space-between'}, item: {flexShrink: 0}};
});
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
var object = {accessory: {'position': 'absolute', 'top': 0, 'bottom': 0, 'flexShrink': 0,
'flexDirection': 'row',
'flexGrow': 1}};
var object2 = {};
object2.left = importDefault(dependencyMap[5]).space.PX_16;
object2.justifyContent = 'flex-start';
object.leading = object2;
object.trailing = {right: importDefault(dependencyMap[5]).space.PX_16, justifyContent: 'flex-end'};
return object;
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/BottomSheetTitleHeader.native.tsx');
exports.BottomSheetTitleHeader = BottomSheetTitleHeader;
}
function RedesignBottomSheetTitleHeaderBase({title, subtitle}) { // fn#53245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6936:419, offset: 0x013431d2, size: 157 bytes, params: 2, frame: 23
const styles = useStyles();
return (
<View style={styles.container}>
<View style={styles.titles}>
<Title lineClamp={2}>
{title}
</Title>
{subtitle != null ? <Subtitle>{subtitle}</Subtitle> : null}
</View>
</View>
);
}
function RedesignBottomSheetTitleHeaderStacked({title, subtitle, leading, trailing}) { // fn#53246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6936:799, offset: 0x0134326f, size: 298 bytes, params: 2, frame: 27
const styles = useStyles();
const styles2 = useStyles();
return (
<View style={[styles.container, styles2.container]}>
<View style={styles2.accessories}>
<View style={styles2.item}>
{leading}
</View>
<View style={styles2.item}>
{trailing}
</View>
</View>
<View style={styles.titles}>
<Title>
{title}
</Title>
{subtitle != null ? <Subtitle>{subtitle}</Subtitle> : null}
</View>
</View>
);
}
function RedesignBottomSheetTitleHeaderComplex({title, subtitle, leading, trailing, onTitleTextLayout}) { // fn#53247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6936:1410, offset: 0x01343399, size: 565 bytes, params: 2, frame: 30
const styles = useStyles();
const styles2 = useStyles();
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const SHEET_HEADER_PADDING_HORIZONTAL = (importDefault(697) /* metro dependency 697: native */).modules.mobile.SHEET_HEADER_PADDING_HORIZONTAL;
const value3 = (width - 2 * Reflect.apply(useToken, useTokenModule, [SHEET_HEADER_PADDING_HORIZONTAL])) / 4;
const [property, env0_0] = env0_3(env0_4.useState(undefined), 2);
const value6 = env0_4.useCallback(function(a0) {
a0.nativeEvent.layout.width(_fun53249);
}, []);
const items2 = [<View style={{width: property}} />];
items2[1] = <View style={styles.titles}><Title onTextLayout={onTitleTextLayout} lineClamp={3}>{title}</Title>{subtitle != null ? <Subtitle>{subtitle}</Subtitle> : null}</View>;
items2[2] = <View style={{width: property}} />;
items2[3] = <View onLayout={value6} style={[styles2.accessory, styles2.leading,
{maxWidth: value3}]}>{leading}</View>;
items2[4] = <View onLayout={value6} style={[styles2.accessory, styles2.trailing,
{maxWidth: value3}]}>{trailing}</View>;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function Title(a0) { // fn#53250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6936:2127, offset: 0x0134362a, size: 133 bytes, params: 2, frame: 16
const styles = useStyles();
const r5 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('BottomSheetTitleHeader') ? 'redesign/heading-18/semibold' : 'redesign/heading-18/bold';
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant={r5}
color="mobile-text-heading-primary"
accessibilityRole="header"
style={styles.title}
{...a0}
/>
);
}
function Subtitle({children}) { // fn#53251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6936:2366, offset: 0x013436af, size: 149 bytes, params: 2, frame: 18
const styles = useStyles();
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('BottomSheetTitleHeader');
const r6 = value2 ? 'text-muted' : 'text-default';
const r7 = value2 ? 'text-sm/medium' : 'text-xs/medium';
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant={r7}
color={r6}
lineClamp={1}
style={styles.subtitle}
>
{children}
</Text>
);
}
function BottomSheetTitleHeader(a0) { // fn#53255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6936:2721, offset: 0x01343860, size: 286 bytes, params: 2, frame: 20
const leading = a0.leading;
const trailing = a0.trailing;
const [property, env0_0] = env0_3(env0_4.useState(false), 2);
const value4 = (importDefault(5283) /* metro dependency 5283: HeaderDebugOverlayNative */)('sheet');
const r7 = leading == null || leading === false ? trailing == null || trailing === false ? <RedesignBottomSheetTitleHeaderBase {...a0} /> : trailing !== '' ? property ? <RedesignBottomSheetTitleHeaderStacked {...a0} /> : <RedesignBottomSheetTitleHeaderComplex {...a0} {...{['onTitleTextLayout']: onTitleTextLayout}} /> : <RedesignBottomSheetTitleHeaderBase {...a0} /> : leading !== '' ? property ? <RedesignBottomSheetTitleHeaderStacked {...a0} /> : <RedesignBottomSheetTitleHeaderComplex {...a0} {...{['onTitleTextLayout']: onTitleTextLayout}} /> : trailing == null || trailing === false ? <RedesignBottomSheetTitleHeaderBase {...a0} /> : trailing !== '' ? property ? <RedesignBottomSheetTitleHeaderStacked {...a0} /> : <RedesignBottomSheetTitleHeaderComplex {...a0} {...{['onTitleTextLayout']: onTitleTextLayout}} /> : <RedesignBottomSheetTitleHeaderBase {...a0} />;
return value4 == null ? r7 : <View style={{position: 'relative'}}>{r7}{value4}</View>;
}
function _fun53248({nativeEvent}) { // fn#53248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6936:1694, offset: 0x013435ce, size: 47 bytes, params: 2, frame: 11
nativeEvent.layout.width(_fun53249);
}
function onTitleTextLayout({nativeEvent}) { // fn#53256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6936:3019, owner: BottomSheetTitleHeader.onTitleTextLayout, offset: 0x0134397e, size: 43 bytes, params: 2, frame: 11
env0_0(nativeEvent.lines.length > 2);
}
function _fun53249(a0) { // fn#53249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6936:1738, offset: 0x013435fd, size: 45 bytes, params: 2, frame: 14
const value = a0;
const Math = global.Math;
return Math.max(value ?? 0, width);
}
@@ -0,0 +1,118 @@
/* Metro module 12765; source: design/components/Sheet/native/PromoSheet.native.tsx; dependencies: [29, 31, 27, 33, 4501, 697, 1357, 8564, 6275, 4572, 8553, 4573, 2] */
function _fun97553(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12955:6, offset: 0x02188c4a, size: 338 bytes, params: 8, frame: 22
const env0_0 = require;
const env0_3 = ['title', 'description', 'illustration', 'graphic', 'gradientColor', 'actions'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PROMO_SHEET_GRAPHIC_MAX_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.PROMO_SHEET_GRAPHIC_MAX_WIDTH;
const env0_9 = Reflect.apply(createStyles, value, [{content: {'paddingHorizontal': 20, 'position': 'relative'},
title: {textAlign: 'center'}, description: {textAlign: 'center'}, illustration: {'alignSelf': 'stretch',
'alignItems': 'center'}, graphic: {alignSelf: 'center', maxWidth: PROMO_SHEET_GRAPHIC_MAX_WIDTH}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/PromoSheet.native.tsx');
exports.PromoSheet = PromoSheet;
}
function PromoSheet(a0) { // fn#97554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12955:622, offset: 0x02188d9c, size: 611 bytes, params: 2, frame: 32
var r10;
var r19;
var r13;
var value5;
var Graphic;
var object;
const title = a0.title;
const description = a0.description;
const illustration = a0.illustration;
let graphic = a0.graphic;
const gradientColor = a0.gradientColor;
const actions = a0.actions;
var value;
const value2 = env0_4(a0, env0_3);
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('PromoSheet');
const styles = useStyles();
const value4 = env0_5.useMemo(_fun97555, [value3, gradientColor]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const bottomSheetProps = {...value2};
bottomSheetProps['startExpanded'] = true;
bottomSheetProps['contentStyles'] = styles.content;
bottomSheetProps['backgroundComponent'] = value4;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
if (value3) {
if (graphic != null) {
Graphic = (require(8553) /* metro dependency 8553: GraphicNative */).Graphic;
var graphicProps = {...graphic};
graphic = styles.graphic;
graphicProps['style'] = graphic;
r10 = <Graphic {...graphicProps} />;
} else {
value5 = null;
r10 = value5 != illustration ? <View style={styles.illustration}>{illustration}</View> : value5;
}
} else {
value5 = null;
r10 = value5 != illustration ? <View style={styles.illustration}>{illustration}</View> : value5;
}
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant={value3 ? 'heading-xl/semibold' : 'heading-xl/bold'} color="mobile-text-heading-primary" style={styles.title}>{title}</Text>;
const value11 = null;
if (value11 != description) {
object = {};
value = 'text-md/medium';
r19 = value3 ? 'redesign/heading-18/medium' : value;
object.variant = r19;
value = 'text-default';
r19 = value3 ? 'text-subtle' : value;
object.color = r19;
object.style = styles.description;
value = <Text {...object}>{description}</Text>;
r13 = value;
} else {
r13 = value11;
}
return (
<BottomSheet {...bottomSheetProps}>
<Stack spacing={24}>
{r10}
<Stack2>
{text}
{r13}
</Stack2>
{actions}
</Stack>
</BottomSheet>
);
}
function _fun97555() { // fn#97555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12955:790, offset: 0x02188fff, size: 35 bytes, params: 1, frame: 2
if (env0_1) {
if (gradientColor != null) {
return _fun97556;
}
}
}
function _fun97556(a0) { // fn#97556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12955:816, offset: 0x02189022, size: 133 bytes, params: 2, frame: 18
const value = environment.__proto__.__proto__;
const viewBindingProps = {...a0};
const ExpressiveGradient = (require(8564) /* metro dependency 8564: ExpressiveGradientNative */).ExpressiveGradient;
const gradientColorBinding = gradientColor;
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
return (
<View {...viewBindingProps}>
<ExpressiveGradient
offsetBottom={0.25}
color={gradientColorBinding}
backgroundColor={MOBILE_ACTIONSHEET_BACKGROUND}
/>
</View>
);
}
@@ -0,0 +1,64 @@
/* Metro module 6804; source: design/components/Sheet/native/SimpleActionSheet.native.tsx; dependencies: [31, 33, 6805, 6758, 6806, 6807, 2] */
function _fun53546(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6982:6, offset: 0x0134e705, size: 144 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = SimpleActionSheet;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_2 = value.jsx;
const env0_3 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/SimpleActionSheet.native.tsx');
exports.default = closure;
exports.SimpleActionSheet = closure;
}
function SimpleActionSheet({hideActionSheet, header, options, hasIcons}) { // fn#53547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6982:131, offset: 0x0134e795, size: 308 bytes, params: 2, frame: 27
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const r6 = header != null && ((BottomSheetTitleHeader) => <BottomSheetTitleHeader leading={header.icon} title={header.title} subtitle={header.subtitle} trailing={header.onClose != null ? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={header.onClose} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton) : null} />)((require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader);
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
const Group = ActionSheetRow.Group;
return (
<ActionSheet>
{r6}
<Group hasIcons={hasIcons}>
{options.map(_fun53548)}
</Group>
</ActionSheet>
);
}
function _fun53548({label, icon, IconComponent, isDestructive, onPress}, a1) { // fn#53548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6982:486, offset: 0x0134e8c9, size: 187 bytes, params: 3, frame: 20
var environment;
var r6;
var value;
if (icon != null) {
value = environment.__proto__;
value = ((Icon) => <Icon source={icon} IconComponent={IconComponent} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon);
r6 = value;
} else {
value = undefined;
if (IconComponent != null) {
value = environment.__proto__;
value = ((Icon) => <Icon source={icon} IconComponent={IconComponent} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon);
r6 = value;
} else {
r6 = value;
}
}
value = environment.__proto__;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
return (
<ActionSheetRow
icon={r6}
variant={isDestructive ? 'danger' : 'default'}
label={label}
onPress={function() {
hideActionSheet();
onPress();
}}
key={a1}
/>
);
}
@@ -0,0 +1,25 @@
/* Metro module 6803; source: design/components/Sheet/native/showSimpleActionSheet.native.tsx; dependencies: [4080, 6804, 1962, 2] */
function _fun53543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6981:6, offset: 0x0134e5da, size: 101 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/showSimpleActionSheet.native.tsx');
exports.showSimpleActionSheet = showSimpleActionSheet;
}
function showSimpleActionSheet(a0) { // fn#53544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6981:213, offset: 0x0134e63f, size: 154 bytes, params: 2, frame: 21
const key = a0.key;
const stackingBehavior = a0.stackingBehavior;
const value = Object.create(null);
value.key = 0;
value.stackingBehavior = 0;
const value2 = copyDataProperties({}, a0, value, stackingBehavior);
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
const value4 = require(dependencyMap[2])(dependencyMap[1], dependencyMap.paths);
const object2 = {};
copyDataProperties(object2, value2, value);
object2['hideActionSheet'] = showSimpleActionSheetHideActionSheet;
Reflect.apply(openLazy, defaultImport, [value4, key, object2, stackingBehavior]);
}
@@ -0,0 +1,40 @@
/* Metro module 6997; source: design/components/Sheet/native/useBottomSheetKeyboardHandling.tsx; dependencies: [31, 6277, 2] */
function _fun55436(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7175:6, offset: 0x013a7423, size: 112 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/useBottomSheetKeyboardHandling.tsx');
exports.default = function(a0) {
var onFocus = a0.onFocus;
var env0_0 = onFocus;
var onBlur = a0.onBlur;
var env0_1 = onBlur;
var value2 = require(dependencyMap[1]).useBottomSheetInternal(true);
return value2.useMemo(_fun55438, [value2, onBlur, onFocus]);
};
}
function useBottomSheetKeyboardHandling({onFocus, onBlur}) { // fn#55437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7175:218, offset: 0x013a7493, size: 105 bytes, params: 2, frame: 16
const value2 = (require(6277) /* metro dependency 6277 */).useBottomSheetInternal(true);
return value2.useMemo(_fun55438, [value2, onBlur, onFocus]);
}
function _fun55438() { // fn#55438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7175:339, offset: 0x013a74fc, size: 64 bytes, params: 1, frame: 4
return env0_2 == null ? {onFocus: onFocus, onBlur: onBlur} : {onFocus: onFocus_55439, onBlur: onBlur_55440};
}
function onFocus_55439(a0) { // fn#55439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7175:381, offset: 0x013a753c, size: 53 bytes, params: 2, frame: 12
env1_2.shouldHandleKeyboardEvents.set(true);
if (onFocus != null) {
onFocus(a0);
}
}
function onBlur_55440(a0) { // fn#55440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7175:444, offset: 0x013a7571, size: 53 bytes, params: 2, frame: 12
env1_2.shouldHandleKeyboardEvents.set(false);
if (onBlur != null) {
onBlur(a0);
}
}
@@ -0,0 +1,25 @@
/* Metro module 7326; source: design/components/Sheet/native/useBottomSheetRef.tsx; dependencies: [31, 2] */
function _fun59021(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7504:6, offset: 0x016de771, size: 104 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/useBottomSheetRef.tsx');
exports.useBottomSheetRef = useBottomSheetRef;
}
function useBottomSheetRef() { // fn#59022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7504:212, offset: 0x016de7d9, size: 63 bytes, params: 1, frame: 15
const binding = env0_0;
const value = binding.useRef(null);
const useCallback = binding.useCallback;
let object = [value];
object = {bottomSheetRef: value, bottomSheetClose: Reflect.apply(useCallback, binding, [_fun59023, object])};
return object;
}
function _fun59023() { // fn#59023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7504:279, offset: 0x016de818, size: 32 bytes, params: 1, frame: 9
const current = env0_0.current;
if (current != null) {
current.closeActionSheet();
}
}