Files
discord-decomp/sources/modules/icymi/native/ICYMIShareModal.tsx
T
2026-07-27 16:20:00 +03:00

895 lines
38 KiB
TypeScript

/* Metro module 14865; source: modules/icymi/native/ICYMIShareModal.tsx; dependencies: [57, 5, 31, 27, 1379, 4645, 4644, 661, 7690, 4503, 33, 4501, 697, 9051, 1244, 14866, 3857, 1478, 4003, 7701, 14867, 7704, 3963, 3868, 5463, 9770, 9788, 4578, 5080, 7232, 1360, 7076, 7879, 491, 4650, 7067, 7880, 1585, 477, 5287, 9603, 5282, 9761, 2] */
function _fun112421(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:6, offset: 0x023cae8f, size: 724 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const closure = ICYMIShareModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_8 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).AbortCodes;
const env0_11 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
const env0_12 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
let value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.paddingTop = PX_8;
object4.headerContainer = object5;
const object7 = {'borderRadius': null, 'overflow': 'hidden', 'borderWidth': 1};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object7.borderColor = BORDER_STRONG;
object4.preview = object7;
object4.base = {position: 'relative'};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.contentContainer = {backgroundColor: BACKGROUND_BASE_LOW};
const object8 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'flex-end'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingHorizontal = PX_16;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object8.paddingVertical = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object8.gap = PX_12;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object8.backgroundColor = BACKGROUND_BASE_LOW;
object8.borderTopWidth = 1;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object8.borderTopColor = BORDER_SUBTLE;
object4.footer = object8;
const env0_15 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMIShareModal.tsx');
exports.default = closure;
exports.GuildEventShareModal = GuildEventShareModal;
exports.GameShareModal = GameShareModal;
}
function Screenshot({render, setUri}) { // fn#112422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:892, offset: 0x023cb163, size: 518 bytes, params: 2, frame: 35
const styles = useStyles();
const value2 = env0_5.useRef(null);
env0_5.useEffect(function() {
global.setTimeout(_fun112424, 500);
}, [setUri]);
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const value3 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
const value4 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useClientThemesOverride();
const items2 = [styles.preview];
items2[1] = {width: width};
const defaultImport = importDefault(14867) /* metro dependency 14867 */;
const ThemedGradient = importDefault(7704) /* metro dependency 7704: ThemedGradient */;
const {LEVEL_7, LEVEL_8} = (require(3963) /* metro dependency 3963: ClientThemesUtils */).OverlayOpacity;
const themedGradient = <ThemedGradient absolute wide tall mix mixAmount={{dark: LEVEL_7, light: LEVEL_8}} />;
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
return (
<View style={{'position': 'absolute', 'top': -1000, 'overflow': 'hidden'}}>
<View style={items2}>
{((Component) => <Component ref={value2} options={{'fileName': 'icymi_content', 'format': 'png',
'quality': 1}}><View style={styles.base}>{themedGradient}<ThemeContextProvider gradient={value3}><View style={[styles.contentContainer,
value4]}>{render()}</View></ThemeContextProvider></View></Component>)(defaultImport)}
</View>
</View>
);
}
function GravityShareFooter({count, isSending, onSend}) { // fn#112426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:1649, offset: 0x023cb3e2, size: 589 bytes, params: 2, frame: 31
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const [property, property2] = env0_3(env0_5.useState(''), 2);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const {textInputRef, handleSelectionChange, handleMessageFocus, handleMessageBlur,
handlePressEmoji} = (require(9770) /* metro dependency 9770: useShareChatInputActions */).useShareChatInputActions(property2);
const value6 = env0_5.useCallback(_fun112427, [property, onSend]);
const r12 = count <= 1 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TXNS7S) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.jWtYUm,
{count: count});
const value9 = env0_5.useMemo(function() {
var stylesBinding = styles;
return [stylesBinding.footer, {paddingBottom: stylesBinding.footer.paddingVertical + insets.bottom}];
}, [styles.footer, insets.bottom]);
const value10 = count === 0;
return value10 ? null : <View style={value9}>{((Component) => <Component inputRef={textInputRef} text={property} onChange={property2} onSelectionChange={handleSelectionChange} onFocus={handleMessageFocus} onBlur={handleMessageBlur} onPressEmoji={handlePressEmoji} onSend={value6} disabled={isSending} />)(importDefault(9788) /* metro dependency 9788: ShareChatInput */)}{((Button) => <Button variant="primary" size="md" text={r12} disabled={value10} onPress={isSending ? undefined : value6} loading={isSending} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
}
function ICYMIShareModal({title, originDestinationId, linkText, render, forwardToChannel, onShare}) { // fn#112429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2460, offset: 0x023cb67e, size: 728 bytes, params: 2, frame: 35
let binding = env0_5;
const value4 = forwardToChannel(binding.useState([]), 2);
var property = value4[0];
var env0_5 = property;
const property2 = value4[1];
const length = property.length;
var [property, env0_6] = forwardToChannel(env0_5.useState(false), 2);
const [env0_7, property3] = forwardToChannel(env0_5.useState(null), 2);
const value10 = env0_5.useCallback(_fun112430, []);
const value11 = _fun112431();
const styles = useStyles();
const value12 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
binding = env0_5;
const useMemo = binding.useMemo;
let bottom = value12.bottom;
const value13 = Reflect.apply(useMemo, binding, [_fun112441, [bottom, height]]);
const Header = (require(5287) /* metro dependency 5287 */).Header;
const object = {title: title, headerTitle: headerTitle_112442, headerTitleAlign: 'center'};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object.headerStatusBarHeight = platformUtilsModule.isIOS() ? 0 : undefined;
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(value10);
const view = <View style={styles.headerContainer}><Header {...object} /></View>;
const r6 = render != null && <Screenshot render={render} setUri={property3} />;
const SearchableDestinationList = importDefault(9761) /* metro dependency 9761: SearchableDestinationList */;
const TOGGLE = UserRowModes.TOGGLE;
bottom = value12.bottom;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const value17 = bottom + PX_8;
const PX_96 = (importDefault(697) /* metro dependency 697: native */).space.PX_96;
return (
<View style={value13}>
{view}
{r6}
<SearchableDestinationList
rowMode={TOGGLE}
onSelectedDestinationChange={property2}
originDestination={originDestinationId}
insetEnd={value17 + PX_96}
disableGradient
disableStickySections
/>
<GravityShareFooter
count={length}
isSending={property}
onSend={value11}
/>
</View>
);
}
function GuildEventShareModal({event}) { // fn#112443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:4497, offset: 0x023cbdc0, size: 185 bytes, params: 2, frame: 20
const value3 = (require(9051) /* metro dependency 9051: ShareEventUtils */).SHARE_EVENT_DETAILS_LINK({guildId: event.guild_id,
guildEventId: event.id});
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ICYMIShareModal
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7TVSLK'])}
originDestinationId={event.channel_id != null ? {type: 'channel', id: event.channel_id} : undefined}
linkText={value3}
/>
);
}
function GameShareModal({content}) { // fn#112444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:4803, offset: 0x023cbe79, size: 123 bytes, params: 2, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ICYMIShareModal
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['59CWHK'])}
linkText=""
forwardToChannel={_fun112445()}
/>
);
}
function _fun112423() { // fn#112423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:973, offset: 0x023cb369, size: 33 bytes, params: 1, frame: 13
global.setTimeout(_fun112424, 500);
}
function _fun112430() { // fn#112430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2721, offset: 0x023cb956, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function _fun112431() { // fn#112431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2749, offset: 0x023cb97b, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun112433);
return _fun112440;
}
function _fun112441() { // fn#112441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:3747, offset: 0x023cbd40, size: 72 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
return {height: value ? height + env0_8.bottom : '100%'};
}
function ICYMIShareModalHeaderTitle() { // fn#112442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:3923, owner: ICYMIShareModal.headerTitle, offset: 0x023cbd88, size: 56 bytes, params: 1, frame: 14
const GenericHeaderTitle = (require(9603) /* metro dependency 9603: HeaderShared */).GenericHeaderTitle;
return <GenericHeaderTitle title={title} />;
}
function _fun112445() { // fn#112445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:4944, offset: 0x023cbef4, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun112447);
return _fun112448;
}
function _fun112424() { // fn#112424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:990, offset: 0x023cb38a, size: 69 bytes, params: 1, frame: 13
var environment;
var r0;
let value = environment.__proto__;
const current = env1_1.current;
value = undefined;
if (current == null) {
r0 = value;
} else if (current.capture == null) {
r0 = value;
} else {
value = current.capture();
value = value.then(function(a0) {
setUri(a0);
});
r0 = value;
}
return r0;
}
function* _fun112433(a0) { // fn#112433, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2769, offset: 0x023cb9aa, size: 259 bytes, params: 2, frame: 21
var environment;
var Promise;
var all;
var binding;
var map;
var value5;
var value6;
var value8;
var filter;
var binding3;
if (true) {
var env0_0 = a0;
value = environment.__proto__.__proto__;
View(true);
if (dependencyMap == null || ChannelStore != null) {
Promise = global.Promise;
all = Promise.all;
binding = env2_5;
map = binding.map;
value5 = environment.__proto__.__proto__.__proto__;
yield Reflect.apply(all, Promise, [Reflect.apply(map, binding,
[env3_0(env3_2[29]).getOrResolveChannelIdFromDestinationId])]);
value6 = undefined;
if (false) {
return value6;
}
value8 = value6.map(_fun112434);
filter = value8.filter;
binding = env3_0;
binding3 = env3_2;
Reflect.apply(filter, value8, [binding(binding3[30]).isNotNullish]).forEach(_fun112435());
binding = env3_1;
binding(binding3[28]).pop();
if (env2_4 != null) {
env2_4();
}
}
}
}
function* _fun112447(a0) { // fn#112447, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:4964, offset: 0x023cbf23, size: 299 bytes, params: 2, frame: 19
var r1;
var r4;
var binding;
var binding2;
var property;
var value3;
var sendMessageWithEmbed;
var object2;
var ICYMI;
var value5;
var value6;
var value7;
var error;
var body;
var value8;
var code;
var CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
var value9;
var value10;
var open;
var binding3;
var intl;
var string;
var t;
var F8FvUy;
var BC5vfD;
if (true) {
value = environment.__proto__.__proto__.__proto__;
try {
binding = env3_0;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
binding2 = env3_2;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
property = binding2[15];
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
sendMessageWithEmbed = value3.sendMessageWithEmbed;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
object2 = {'channel': null, 'content': '', 'entry': null, 'whenReady': false, 'doNotNotifyOnError': true};
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
object2.channel = a0;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
object2.entry = require;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
binding = env3_12;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
ICYMI = binding.ICYMI;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
object2.location = ICYMI;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
try {
value5 = Reflect.apply(sendMessageWithEmbed, value3, [object2]);
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
body = error.body;
value8 = body != null;
if (value8) {
body = error.body;
code = body.code;
CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION = env3_10.CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
value9 = code === CONTENT_INVENTORY_ENTRY_INVALID_PERMISSION;
r1 = value9;
} else {
r1 = value8;
}
binding = env3_1;
value10 = binding(env3_2[16]);
open = value10.open;
binding = env3_0;
binding3 = env3_2;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
if (r1) {
BC5vfD = t.BC5vfD;
value = Reflect.apply(string, intl, [BC5vfD]);
r4 = value;
} else {
F8FvUy = t.F8FvUy;
value = Reflect.apply(string, intl, [F8FvUy]);
r4 = value;
}
Reflect.apply(open, value10, [{key: 'FORWARD_CONTENT_INVENTORY_ENTRY_ERROR', content: r4}]);
return undefined;
}
if (value7) {
return value6;
}
}
}
function _fun112434(a0) { // fn#112434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2890, offset: 0x023cbaad, size: 22 bytes, params: 2, frame: 11
return env4_7.getChannel(a0);
}
function _fun112435() { // fn#112435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2949, offset: 0x023cbac3, size: 36 bytes, params: 1, frame: 12
const env0_0 = env4_4(_fun112437);
return _fun112439;
}
function* _fun112437(a0) { // fn#112437, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:2969, offset: 0x023cbaf2, size: 497 bytes, params: 2, frame: 28
var environment;
var r7;
var r8;
var binding;
var binding3;
var value9;
var addFile;
var object3;
var id;
var object4;
var binding4;
var binding5;
var ChannelMessage;
var binding6;
var getUploads;
var value11;
var value12;
var clearAll;
var value13;
var sendMessage;
if (false) {
return undefined;
}
const env0_0 = a0;
value = environment.__proto__.__proto__;
if (env2_0 == null) {
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
r7 = env5_1;
} else {
binding = env2_0;
if (binding.trim().length > 0) {
binding = env2_0;
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
value = '' + binding + '\n\n' + env5_1;
r7 = value;
} else {
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
r7 = env5_1;
}
}
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__;
binding = env6_1;
const value3 = undefined;
if (env5_3 == null) {
if (env5_2 != null && env5_7 != null) {
binding = env6_1;
binding3 = env6_2;
value9 = binding(binding3[32]);
addFile = value9.addFile;
object3 = {};
id = a0.id;
object3.channelId = id;
object4 = {};
binding4 = env5_7;
object4.uri = binding4;
object4.originalUri = binding4;
binding5 = env6_0;
object4.id = binding5(binding3[33]).v4();
object4.platform = binding5(binding3[34]).UploadPlatform.REACT_NATIVE;
object3.file = object4;
ChannelMessage = env6_8.ChannelMessage;
object3.draftType = ChannelMessage;
Reflect.apply(addFile, value9, [object3]);
binding6 = env6_9;
getUploads = binding6.getUploads;
id = a0.id;
ChannelMessage = env6_8.ChannelMessage;
value11 = Reflect.apply(getUploads, binding6, [id, ChannelMessage]);
value12 = binding(binding3[32]);
clearAll = value12.clearAll;
id = a0.id;
ChannelMessage = env6_8.ChannelMessage;
Reflect.apply(clearAll, value12, [id, ChannelMessage]);
r8 = value11;
} else {
r8 = value3;
}
binding = env6_1;
value13 = binding(env6_2[35]);
sendMessage = value13.sendMessage;
id = a0.id;
yield Reflect.apply(sendMessage, value13, [id, binding(env6_2[31]).parse(a0, r7), false,
{location: env6_12.ICYMI,
attachmentsToUpload: r8, onAttachmentUploadError: onAttachmentUploadError_112438}]);
} else {
env5_3(a0);
}
return value3;
}
function onAttachmentUploadError_112438(a0, a1, a2) { // fn#112438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15062:3417, offset: 0x023cbce3, size: 93 bytes, params: 4, frame: 14
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__;
value = env7_0(env7_2[36]);
const handleUploadMessageAttachmentsErrors = value.handleUploadMessageAttachmentsErrors;
const object2 = {file: a0};
object2.guildId = env0_0.getGuildId();
object2.analyticsLocations = [];
object2.code = a1;
object2.reason = a2;
Reflect.apply(handleUploadMessageAttachmentsErrors, value, [object2]);
}