Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,95 @@
|
||||
/* Metro module 11228; source: modules/in_app_notifications/native/AlertNotification.tsx; dependencies: [31, 27, 1867, 33, 6819, 7599, 697, 4501, 632, 10923, 1244, 10973, 10994, 8129, 10992, 2] */
|
||||
function _fun85828(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11414:6, offset: 0x01f7cf2d, size: 406 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
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(27) /* metro dependency 27 */).View;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.Fragment;
|
||||
const env0_8 = value.jsxs;
|
||||
const ImageSizes = (require(6819) /* metro dependency 6819: GuildIcon */).ImageSizes;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const NORMAL = GuildIconSizes.NORMAL;
|
||||
const property = ImageSizes[NORMAL];
|
||||
object2 = {'shape': null, 'x': null, 'y': -6, 'width': 24, 'height': 24};
|
||||
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
|
||||
const RoundedRect = CutoutShape.RoundedRect;
|
||||
object2.shape = RoundedRect;
|
||||
object2.x = property - -6 - 24;
|
||||
object2.cornerRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({warningBadge: {'position': 'absolute',
|
||||
'top': -6, 'right': -6, 'width': 24, 'height': 24, 'alignItems': 'center', 'justifyContent': 'center'},
|
||||
warningIcon: {'width': 16, 'height': 16}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/AlertNotification.tsx');
|
||||
exports.default = AlertNotification;
|
||||
}
|
||||
|
||||
function AlertNotification({notification}) { // fn#85829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11414:605, offset: 0x01f7d0c3, size: 766 bytes, params: 2, frame: 30
|
||||
var r1;
|
||||
var r0;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var Notification;
|
||||
const key = notification.key;
|
||||
const styles = useStyles();
|
||||
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
|
||||
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
|
||||
let object = [GuildStore];
|
||||
const guild = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, function() {
|
||||
return GuildStore.getGuild(key);
|
||||
}]);
|
||||
const guildAntiRaidHooksModule = require(10923) /* metro dependency 10923: GuildAntiRaidHooks */;
|
||||
const useGuildIncidentsState = guildAntiRaidHooksModule.useGuildIncidentsState;
|
||||
const r9 = Reflect.apply(useGuildIncidentsState, guildAntiRaidHooksModule,
|
||||
[key]).incidentData?.raidDetectedAt != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Mn3elp) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.evRhwg);
|
||||
const inAppNotificationRedesignExperimentModule = require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */;
|
||||
const useInAppNotificationRedesign = inAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
|
||||
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, inAppNotificationRedesignExperimentModule,
|
||||
['AlertNotification']).redesignEnabled;
|
||||
const value6 = env0_3.useMemo(_fun85831, [redesignEnabled, guild]);
|
||||
if (guild == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
|
||||
if (redesignEnabled) {
|
||||
object = {};
|
||||
object.icon = <>{((Component) => <Component cutouts={[env0_9]}>{((Component) => <Component guild={guild} selected={false} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</Component>)(importDefault(7599) /* metro dependency 7599: ClipView */)}<View style={styles.warningBadge}>{((WarningIcon) => <WarningIcon style={styles.warningIcon} color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING} />)((require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon)}</View></>;
|
||||
object.header = value6;
|
||||
object.children = ((SystemMessageText) => <SystemMessageText text={r9} />)((require(10992) /* metro dependency 10992: MessagePreviewText */).SystemMessageText);
|
||||
r1 = object;
|
||||
} else {
|
||||
object = {};
|
||||
object.alertLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2IY4YN']);
|
||||
object.icon = ((Component) => <Component guild={guild} selected={false} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
|
||||
object.textChildren = r9;
|
||||
object.header = value6;
|
||||
r1 = object;
|
||||
}
|
||||
r0 = <Notification {...r1} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun85831() { // fn#85831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11414:983, offset: 0x01f7d3c1, size: 174 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
var object2;
|
||||
var value3;
|
||||
var value4;
|
||||
var intl;
|
||||
if (redesignEnabled) {
|
||||
object2 = {type: 'simple'};
|
||||
value3 = environment.__proto__;
|
||||
value4 = undefined;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2IY4YN']);
|
||||
object2.secondaryText = guild == null ? value4 : guild.name;
|
||||
r0 = object2;
|
||||
} else {
|
||||
r0 = {type: 'simple', text: guild?.name ?? ''};
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
/* Metro module 11258; source: modules/in_app_notifications/native/ConfirmationToast.tsx; dependencies: [31, 27, 1881, 33, 4501, 697, 4017, 4595, 4504, 6739, 1423, 4073, 4573, 2] */
|
||||
function _fun86031(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11444:6, offset: 0x01f84c7d, size: 530 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(1881) /* metro dependency 1881: EmojiConstants */).EMOJI_URL_BASE_SIZE;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.container = {'alignItems': 'center', 'justifyContent': 'center', marginTop: PX_12};
|
||||
const object4 = {};
|
||||
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
|
||||
copyDataProperties(object4, SHADOW_HIGH, undefined);
|
||||
object4['flexDirection'] = 'row';
|
||||
object4['alignItems'] = 'center';
|
||||
object4['justifyContent'] = 'center';
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4['gap'] = PX_8;
|
||||
const MOBILE_ALERT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ALERT_BACKGROUND_DEFAULT;
|
||||
object4['backgroundColor'] = MOBILE_ALERT_BACKGROUND_DEFAULT;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4['paddingHorizontal'] = PX_12;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4['paddingVertical'] = PX_8;
|
||||
object4['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4['overflow'] = 'hidden';
|
||||
object2.notificationRow = object4;
|
||||
object2.textEmoji = {fontSize: 20};
|
||||
object2.imageEmoji = {'width': 20, 'height': 20};
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {code: 'function ConfirmationToastTsx1(){const{animatedValue,interpolate}=this.__closure;const value=animatedValue.get();const scale=interpolate(value,[0,1],[0.8,1]);const translateY=interpolate(value,[0,1],[-20,0]);return{transform:[{translateY:translateY},{scale:scale}],opacity:value};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/ConfirmationToast.tsx');
|
||||
exports.ConfirmationToast = ConfirmationToast;
|
||||
}
|
||||
|
||||
function ConfirmationToast({message, reaction}) { // fn#86032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11444:1072, offset: 0x01f84e8f, size: 577 bytes, params: 2, frame: 28
|
||||
var r9;
|
||||
var Emoji;
|
||||
var id;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
(importDefault(4595) /* metro dependency 4595: useMountEffect */)(_fun86033);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = ConfirmationToastH;
|
||||
const object2 = {animatedValue: value2};
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 16852763369496;
|
||||
closure.__initData = env0_8;
|
||||
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.container, value3];
|
||||
if (reaction != null) {
|
||||
Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
var defaultImport2Props = {textEmojiStyle: styles.textEmoji, fastImageStyle: styles.imageEmoji};
|
||||
id = reaction.id;
|
||||
defaultImport2Props.name = id == null ? reaction.surrogates : '';
|
||||
id = reaction.id;
|
||||
defaultImport2Props.src = id != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: reaction.id,
|
||||
|
||||
animated: reaction.animated, size: EMOJI_URL_BASE_SIZE}) : reaction.url;
|
||||
r9 = <Emoji {...defaultImport2Props} />;
|
||||
} else {
|
||||
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
|
||||
r9 = <CircleCheckIcon size="md" color={(importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE} />;
|
||||
}
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View2 style={items2}>
|
||||
<View style={styles.notificationRow}>
|
||||
{r9}
|
||||
<Text variant="text-sm/semibold" color="text-default">
|
||||
{message}
|
||||
</Text>
|
||||
</View>
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86033() { // fn#86033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11444:1170, offset: 0x01f850d0, size: 67 bytes, params: 1, frame: 16
|
||||
const binding = env0_0;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
Reflect.apply(set, binding, [value.withTiming(1, {duration: 200})]);
|
||||
}
|
||||
|
||||
function ConfirmationToastH() { // fn#86034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11444:1259, owner: ConfirmationToast.h, offset: 0x01f85113, size: 164 bytes, params: 1, frame: 19
|
||||
const value = env0_0.get();
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate(value, [0, 1], [0.8, 1]);
|
||||
const object = {};
|
||||
object.translateY = (require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate(value, [0, 1], [-20,
|
||||
0]);
|
||||
return {transform: [object, {scale: value3}], opacity: value};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Metro module 11212; source: modules/in_app_notifications/native/ForumThreadCreatedNotification.tsx; dependencies: [31, 33, 4805, 1244, 10973, 4634, 10994, 1305, 2] */
|
||||
function _fun85662(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11398:6, offset: 0x01f77123, 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('modules/in_app_notifications/native/ForumThreadCreatedNotification.tsx');
|
||||
exports.default = ForumThreadCreatedNotification;
|
||||
}
|
||||
|
||||
function ForumThreadCreatedNotification({notification}) { // fn#85663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11398:126, offset: 0x01f771b1, size: 639 bytes, params: 2, frame: 25
|
||||
var r5;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var jPhTvT;
|
||||
const thread = notification.thread;
|
||||
const threadCreator = notification.threadCreator;
|
||||
const parentChannel = notification.parentChannel;
|
||||
const guild = notification.guild;
|
||||
const r15 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(parentChannel) ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/YzI63']);
|
||||
const r11 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(thread) ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/YzI63']);
|
||||
let formatToPlainString = intl.formatToPlainString;
|
||||
const property = (require(1244) /* metro dependency 1244: indexNative */).t['2IGVl5'];
|
||||
let object2 = {channelName: r15};
|
||||
object2.guildName = guild.name;
|
||||
const value6 = Reflect.apply(formatToPlainString, intl, [property, object2]);
|
||||
const inAppNotificationRedesignExperimentModule = require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */;
|
||||
const useInAppNotificationRedesign = inAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
|
||||
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, inAppNotificationRedesignExperimentModule,
|
||||
['ForumThreadCreatedNotification']).redesignEnabled;
|
||||
const env0_3 = redesignEnabled;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
if (redesignEnabled) {
|
||||
r5 = Reflect.apply(formatToPlainString, intl, [t.WUIDu9, {threadName: r11}]);
|
||||
} else {
|
||||
jPhTvT = t.jPhTvT;
|
||||
object2 = {channelName: r11};
|
||||
object2.userUsername = threadCreator.toString();
|
||||
r5 = Reflect.apply(formatToPlainString, intl, [jPhTvT, object2]);
|
||||
}
|
||||
const value10 = env0_3.useMemo(_fun85664, [redesignEnabled, parentChannel, guild,
|
||||
(require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(threadCreator, thread), value6]);
|
||||
const Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const NORMAL = AvatarSizes.NORMAL;
|
||||
return (
|
||||
<Notification
|
||||
icon={<Avatar size={NORMAL} user={threadCreator} guildId={thread.guild_id} />}
|
||||
textChildren={r5}
|
||||
header={value10}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun85664() { // fn#85664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11398:764, offset: 0x01f77430, size: 78 bytes, params: 1, frame: 4
|
||||
return redesignEnabled ? {'type': 'message', 'channel': null, 'parentChannel': null, channel: parentChannel,
|
||||
guild: guild, author: env0_4} : {type: 'simple', text: env0_2};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* Metro module 10963; source: modules/in_app_notifications/native/InAppNotificationConstants.tsx; dependencies: [2] */
|
||||
function _fun83997(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11149:6, offset: 0x01f32e01, size: 81 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/InAppNotificationConstants.tsx');
|
||||
exports.IN_APP_NOTIFICATION_MAX_HEIGHT = 96;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,11 @@
|
||||
/* Metro module 10974; source: modules/in_app_notifications/native/InAppNotificationExpandExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun84030(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11160:6, offset: 0x01f34f19, size: 190 bytes, params: 8, frame: 20
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-05-in-app-notification-expand',
|
||||
'kind': 'user', defaultConfig: {'canExpand': false, 'canReact': false}, variations: {[1]: {'canExpand': true,
|
||||
'canReact': true}, [2]: {'canExpand': true, 'canReact': false}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/InAppNotificationExpandExperiment.tsx');
|
||||
exports.useCanExpandInAppNotification = useCanExpandInAppNotification;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/* Metro module 10995; source: modules/in_app_notifications/native/InAppNotificationExpandNux.tsx; dependencies: [587, 2] */
|
||||
function _fun84153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11181:6, offset: 0x01f3bfa7, size: 216 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const closure = getExpandNUXState;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = {'lastShownAtMs': 0, 'numTimesShown': 0};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/InAppNotificationExpandNux.tsx');
|
||||
exports.MAX_TIMES_SHOWN = 7;
|
||||
exports.ONE_DAY_MS = 86400000;
|
||||
exports.NUX_REVEAL_DELAY_MS = 1000;
|
||||
exports.NUX_REVEAL_DURATION_MS = 300;
|
||||
exports.DRAG_HANDLE_BOUNCE_DISTANCE = 4;
|
||||
exports.DRAG_HANDLE_BOUNCE_DURATION_MS = 650;
|
||||
exports.getExpandNUXState = closure;
|
||||
exports.markExpandNUXStateAsShown = markExpandNUXStateAsShown;
|
||||
exports.resetExpandNUXState = resetExpandNUXState;
|
||||
}
|
||||
|
||||
function getExpandNUXState() { // fn#84154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11181:163, offset: 0x01f3c07f, size: 56 bytes, params: 1, frame: 12
|
||||
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
return Storage.get(env0_2) ?? env0_3;
|
||||
}
|
||||
|
||||
function markExpandNUXStateAsShown() { // fn#84155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11181:571, offset: 0x01f3c0b7, size: 115 bytes, params: 1, frame: 16
|
||||
const expandNUXState = getExpandNUXState();
|
||||
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
const set = Storage.set;
|
||||
const binding = env0_2;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, expandNUXState, undefined);
|
||||
object2['numTimesShown'] = expandNUXState.numTimesShown + 1;
|
||||
const Date = global.Date;
|
||||
object2['lastShownAtMs'] = Date.now();
|
||||
Reflect.apply(set, Storage, [binding, object2]);
|
||||
}
|
||||
|
||||
function resetExpandNUXState() { // fn#84156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11181:744, offset: 0x01f3c12a, size: 51 bytes, params: 1, frame: 14
|
||||
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
Storage.set(env0_2, env0_3);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/* Metro module 10973; source: modules/in_app_notifications/native/InAppNotificationRedesignExperiment.tsx; dependencies: [1854, 10974, 2] */
|
||||
function _fun84028(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11159:6, offset: 0x01f34dcb, size: 206 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1854) /* metro dependency 1854: apex */;
|
||||
value = value.createApexExperiment({'name': '2026-04-in-app-notification-redesign', 'kind': 'user',
|
||||
defaultConfig: {'moveTimerBar': false, 'redesignEnabled': false}, variations: {[1]: {'moveTimerBar': true,
|
||||
'redesignEnabled': false}, [2]: {'moveTimerBar': false, 'redesignEnabled': true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/InAppNotificationRedesignExperiment.tsx');
|
||||
exports.InAppNotificationRedesignExperiment = value;
|
||||
exports.useInAppNotificationRedesign = useInAppNotificationRedesign;
|
||||
}
|
||||
|
||||
function useInAppNotificationRedesign(a0) { // fn#84029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11159:508, offset: 0x01f34e99, size: 128 bytes, params: 2, frame: 16
|
||||
let value = a0;
|
||||
const inAppNotificationExpandExperimentModule = require(10974) /* metro dependency 10974: InAppNotificationExpandExperiment */;
|
||||
const useCanExpandInAppNotification = inAppNotificationExpandExperimentModule.useCanExpandInAppNotification;
|
||||
const canExpand = Reflect.apply(useCanExpandInAppNotification, inAppNotificationExpandExperimentModule,
|
||||
[value]).canExpand;
|
||||
value = env0_2.useConfig({location: canExpand ? 'Ineligible - ' + value : value});
|
||||
return {redesignEnabled: canExpand || value.redesignEnabled, moveTimerBar: value.moveTimerBar};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,381 @@
|
||||
/* Metro module 10964; source: modules/in_app_notifications/native/MediaPreviewRightAccessory.tsx; dependencies: [31, 27, 4502, 4503, 33, 4501, 697, 9376, 4573, 3860, 477, 4564, 6692, 8999, 632, 4821, 9796, 9564, 10965, 8367, 9546, 1477, 5475, 4838, 4841, 9543, 10970, 1305, 7599, 10973, 2] */
|
||||
function _fun83998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:6, offset: 0x01f32e52, size: 895 bytes, params: 8, frame: 26
|
||||
var object9;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.PixelRatio;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_6 = value.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_8 = (require(4503) /* metro dependency 4503: MessageConstants */).SPOILER_ATTACHMENT_PREFIX;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.Fragment;
|
||||
const env0_11 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
let createStyles = value.createStyles;
|
||||
const object10 = {'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': null, 'borderRadius': null,
|
||||
'width': 16, 'height': 16, 'position': 'absolute', 'bottom': 4, 'left': 4};
|
||||
let CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object10.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const env0_12 = Reflect.apply(createStyles, value, [{badge: object10, icon: {'width': 10, 'height': 10}}]);
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
createStyles = value.createStyles;
|
||||
const object11 = {'width': 20, 'height': 20, 'backgroundColor': null, 'borderRadius': null, 'alignItems': 'center',
|
||||
'justifyContent': 'center', 'position': 'absolute', 'right': -5, 'top': -5};
|
||||
let BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
object11.backgroundColor = BACKGROUND_MOD_SUBTLE;
|
||||
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const env0_13 = Reflect.apply(createStyles, value, [{badge: object11}]);
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
createStyles = value.createStyles;
|
||||
object9 = {};
|
||||
const object12 = {};
|
||||
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object12.overflow = 'hidden';
|
||||
object9.mediaThumbnailContainer = object12;
|
||||
object9.mediaThumbnail = {'width': '100%', 'height': '100%'};
|
||||
const object13 = {'alignItems': 'center', 'justifyContent': 'center'};
|
||||
BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
object13.backgroundColor = BACKGROUND_MOD_SUBTLE;
|
||||
object13.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object9.iconContainer = object13;
|
||||
const object14 = {};
|
||||
copyDataProperties(object14, StyleSheet.absoluteFillObject, undefined);
|
||||
const PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
|
||||
object14['backgroundColor'] = PRIMARY_500;
|
||||
object9.obscureBackground = object14;
|
||||
const object15 = {};
|
||||
copyDataProperties(object15, StyleSheet.absoluteFillObject, undefined);
|
||||
object15['justifyContent'] = 'center';
|
||||
object15['alignItems'] = 'center';
|
||||
object9.spoilerIconContainer = object15;
|
||||
const object16 = {};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object16.padding = PX_4;
|
||||
object16.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object16.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object16.justifyContent = 'center';
|
||||
object16.alignItems = 'center';
|
||||
object9.spoilerPill = object16;
|
||||
const env0_14 = Reflect.apply(createStyles, value, [object9]);
|
||||
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {overflow: 'visible'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MediaPreviewRightAccessory.tsx');
|
||||
exports.PREVIEW_SIZE = 64;
|
||||
exports.MediaPreviewRightAccessory = MediaPreviewRightAccessory;
|
||||
}
|
||||
|
||||
function VideoBadge() { // fn#83999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:1448, offset: 0x01f331d1, size: 106 bytes, params: 1, frame: 18
|
||||
const styles = useStyles();
|
||||
const PlayIcon = (require(9376) /* metro dependency 9376: PlayIcon */).PlayIcon;
|
||||
return (
|
||||
<View style={styles.badge}>
|
||||
<PlayIcon
|
||||
style={styles.icon}
|
||||
size="custom"
|
||||
color="white"
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function CountBadge({total}) { // fn#84000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:1580, offset: 0x01f3323b, size: 107 bytes, params: 2, frame: 18
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.badge}>
|
||||
<Text variant="text-xs/semibold" color="text-default">
|
||||
{total}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ObscuredMediaOverlay({isObscured, isSpoiler, children}) { // fn#84001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:1735, offset: 0x01f332a6, size: 437 bytes, params: 2, frame: 25
|
||||
var r13;
|
||||
var r5;
|
||||
var jsxRuntimeEnv0_10Binding;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const SPOILER_HIDDEN_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.SPOILER_HIDDEN_BACKGROUND;
|
||||
const value2 = Reflect.apply(useToken, useTokenModule, [SPOILER_HIDDEN_BACKGROUND]);
|
||||
if (isObscured) {
|
||||
r13 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'dark' : 'light';
|
||||
jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
|
||||
items2 = [children];
|
||||
r5 = isObscured && <View style={styles.obscureBackground} />;
|
||||
items2[1] = r5;
|
||||
r5 = !isObscured && ((Component) => <Component blurTheme={r13} android_fallbackColor={value2} style={StyleSheet.absoluteFill} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */);
|
||||
items2[2] = r5;
|
||||
items2[3] = <View style={styles.spoilerIconContainer}>{isObscured ? ((ImageWarningIcon) => <ImageWarningIcon size="sm" color="white" />)((require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon) : <View style={styles.spoilerPill}>{((EyeIcon) => <EyeIcon size="sm" color="white" />)((require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon)}</View>}</View>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
if (isSpoiler) {
|
||||
r13 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'dark' : 'light';
|
||||
jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
|
||||
items2 = [children];
|
||||
r5 = isObscured && <View style={styles.obscureBackground} />;
|
||||
items2[1] = r5;
|
||||
r5 = !isObscured && ((Component) => <Component blurTheme={r13} android_fallbackColor={value2} style={StyleSheet.absoluteFill} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */);
|
||||
items2[2] = r5;
|
||||
items2[3] = <View style={styles.spoilerIconContainer}>{isObscured ? ((ImageWarningIcon) => <ImageWarningIcon size="sm" color="white" />)((require(6692) /* metro dependency 6692: ImageWarningIcon */).ImageWarningIcon) : <View style={styles.spoilerPill}>{((EyeIcon) => <EyeIcon size="sm" color="white" />)((require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon)}</View>}</View>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
return children;
|
||||
}
|
||||
|
||||
function SinglePreviewableMedia({previewableMedia, size, message}) { // fn#84002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:2258, offset: 0x01f3345b, size: 1559 bytes, params: 2, frame: 34
|
||||
var url;
|
||||
var r5;
|
||||
var r10;
|
||||
var r22;
|
||||
var r13;
|
||||
var VIDEO;
|
||||
var thumbnail;
|
||||
var moduleValue5;
|
||||
var value6;
|
||||
var moduleValue6;
|
||||
var getMediaObscuredReasonFromBitmask;
|
||||
var value7;
|
||||
var url2;
|
||||
var value10;
|
||||
var value11;
|
||||
var object2;
|
||||
var width;
|
||||
var height;
|
||||
var value12;
|
||||
var attachmentObscurityProps;
|
||||
var attachmentUrl;
|
||||
var moduleValue9;
|
||||
var getSrcWithWidthAndHeight;
|
||||
var value16;
|
||||
var items4;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
|
||||
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
|
||||
let object = [AccessibilityStore];
|
||||
const useReducedMotion = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
}]);
|
||||
const type = previewableMedia.type;
|
||||
const media = previewableMedia.media;
|
||||
const icon = previewableMedia.icon;
|
||||
const value3 = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).useShouldAgeVerifyForExplicitMedia();
|
||||
const value4 = (require(9796) /* metro dependency 9796: useContentHarmTypes */).useEnabledHarmTypesBitmaskForMessage(message);
|
||||
const value5 = (require(9564) /* metro dependency 9564: AndroidRNVHttpEngineExperiment */).useRnvHttpEngine();
|
||||
const PreviewableMediaTypes = (require(10965) /* metro dependency 10965: usePreviewableMedia */).PreviewableMediaTypes;
|
||||
const VOICE_MESSAGE = PreviewableMediaTypes.VOICE_MESSAGE;
|
||||
if (VOICE_MESSAGE === type) {
|
||||
return (
|
||||
<View style={{width: size, height: size}}>
|
||||
{icon}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const AUDIO = PreviewableMediaTypes.AUDIO;
|
||||
if (AUDIO === type) {
|
||||
return (
|
||||
<View style={[styles.iconContainer, {width: size, height: size}]}>
|
||||
{icon}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const FILE = PreviewableMediaTypes.FILE;
|
||||
if (FILE === type) {
|
||||
return (
|
||||
<View style={[styles.iconContainer, {width: size, height: size}]}>
|
||||
{icon}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const IMAGE = PreviewableMediaTypes.IMAGE;
|
||||
if (IMAGE === type) {
|
||||
width = media.width;
|
||||
height = media.height;
|
||||
value12 = null;
|
||||
if (value12 == width) {
|
||||
return value12;
|
||||
}
|
||||
if (width <= 0) {
|
||||
return value12;
|
||||
}
|
||||
if (value12 == height) {
|
||||
return value12;
|
||||
}
|
||||
if (height <= 0) {
|
||||
return value12;
|
||||
}
|
||||
attachmentObscurityProps = (require(8367) /* metro dependency 8367: ExplicitMediaUtils */).getAttachmentObscurityProps({attachment: media,
|
||||
|
||||
shouldObscureSpoiler: true, enabledContentHarmTypeFlags: value4, shouldAgeVerify: value3});
|
||||
attachmentUrl = (require(9546) /* metro dependency 9546: MediaSourceUtil */).getAttachmentUrl(media);
|
||||
moduleValue9 = require(1477) /* metro dependency 1477: ImageUtils */;
|
||||
getSrcWithWidthAndHeight = moduleValue9.getSrcWithWidthAndHeight;
|
||||
VIDEO = PreviewableMediaTypes.VIDEO;
|
||||
value16 = Reflect.apply(getSrcWithWidthAndHeight, moduleValue9, [{src: attachmentUrl, sourceWidth: width,
|
||||
sourceHeight: height, targetWidth: 2 * size, targetHeight: 2 * size, animated: false,
|
||||
format: type !== VIDEO ? undefined : 'png'}]);
|
||||
var viewProps = {style: [styles.mediaThumbnailContainer, {width: size, height: size}]};
|
||||
var obscuredMediaOverlayBindingProps = {isObscured: attachmentObscurityProps.obscure,
|
||||
isSpoiler: attachmentObscurityProps.isSpoiler};
|
||||
items4 = [((Component) => <Component source={{uri: value16}} style={styles.mediaThumbnail} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
|
||||
VIDEO = PreviewableMediaTypes.VIDEO;
|
||||
items4[1] = type !== VIDEO ? value12 : <VideoBadge />;
|
||||
return (
|
||||
<View {...viewProps}>
|
||||
<ObscuredMediaOverlay {...obscuredMediaOverlayBindingProps}>
|
||||
{items4}
|
||||
</ObscuredMediaOverlay>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
VIDEO = PreviewableMediaTypes.VIDEO;
|
||||
if (VIDEO === type) {
|
||||
width = media.width;
|
||||
height = media.height;
|
||||
value12 = null;
|
||||
if (value12 == width) {
|
||||
return value12;
|
||||
}
|
||||
if (width <= 0) {
|
||||
return value12;
|
||||
}
|
||||
if (value12 == height) {
|
||||
return value12;
|
||||
}
|
||||
if (height <= 0) {
|
||||
return value12;
|
||||
}
|
||||
attachmentObscurityProps = (require(8367) /* metro dependency 8367: ExplicitMediaUtils */).getAttachmentObscurityProps({attachment: media,
|
||||
|
||||
shouldObscureSpoiler: true, enabledContentHarmTypeFlags: value4, shouldAgeVerify: value3});
|
||||
attachmentUrl = (require(9546) /* metro dependency 9546: MediaSourceUtil */).getAttachmentUrl(media);
|
||||
moduleValue9 = require(1477) /* metro dependency 1477: ImageUtils */;
|
||||
getSrcWithWidthAndHeight = moduleValue9.getSrcWithWidthAndHeight;
|
||||
VIDEO = PreviewableMediaTypes.VIDEO;
|
||||
value16 = Reflect.apply(getSrcWithWidthAndHeight, moduleValue9, [{src: attachmentUrl, sourceWidth: width,
|
||||
sourceHeight: height, targetWidth: 2 * size, targetHeight: 2 * size, animated: false,
|
||||
format: type !== VIDEO ? undefined : 'png'}]);
|
||||
var viewProps = {style: [styles.mediaThumbnailContainer, {width: size, height: size}]};
|
||||
var obscuredMediaOverlayBindingProps = {isObscured: attachmentObscurityProps.obscure,
|
||||
isSpoiler: attachmentObscurityProps.isSpoiler};
|
||||
items4 = [((Component) => <Component source={{uri: value16}} style={styles.mediaThumbnail} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
|
||||
VIDEO = PreviewableMediaTypes.VIDEO;
|
||||
items4[1] = type !== VIDEO ? value12 : <VideoBadge />;
|
||||
return (
|
||||
<View {...viewProps}>
|
||||
<ObscuredMediaOverlay {...obscuredMediaOverlayBindingProps}>
|
||||
{items4}
|
||||
</ObscuredMediaOverlay>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const GIF = PreviewableMediaTypes.GIF;
|
||||
if (GIF === type) {
|
||||
url = media.video?.url;
|
||||
thumbnail = media.thumbnail;
|
||||
if (thumbnail == null) {
|
||||
return null;
|
||||
}
|
||||
moduleValue5 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
||||
value6 = moduleValue5.getEnabledHarmTypesForChannelAndAuthorId(message.channel_id, message.author?.id);
|
||||
moduleValue6 = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
||||
getMediaObscuredReasonFromBitmask = moduleValue6.getMediaObscuredReasonFromBitmask;
|
||||
object = {};
|
||||
object.type = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes.Embed;
|
||||
object.media = media;
|
||||
value7 = Reflect.apply(getMediaObscuredReasonFromBitmask, moduleValue6, [object, value6]).length > 0;
|
||||
url2 = media.url;
|
||||
r5 = url2 == null ? undefined : url2.split('/').pop();
|
||||
value10 = '';
|
||||
r10 = r5 ?? value10;
|
||||
value11 = r10.startsWith(SPOILER_ATTACHMENT_PREFIX);
|
||||
r22 = thumbnail.proxyURL == null ? thumbnail.url : value10 !== thumbnail.proxyURL ? thumbnail.proxyURL : thumbnail.url;
|
||||
var viewProps = {style: [styles.mediaThumbnailContainer, {width: size, height: size}]};
|
||||
object2 = {isObscured: value7, isSpoiler: value11};
|
||||
if (url == null) {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component source={{uri: r22}} style={styles.mediaThumbnail} resizeMode="cover" />)(value);
|
||||
r13 = value;
|
||||
} else if (value10 === url) {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component source={{uri: r22}} style={styles.mediaThumbnail} resizeMode="cover" />)(value);
|
||||
r13 = value;
|
||||
} else if (useReducedMotion) {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component source={{uri: r22}} style={styles.mediaThumbnail} resizeMode="cover" />)(value);
|
||||
r13 = value;
|
||||
} else {
|
||||
value = importDefault(9543) /* metro dependency 9543: Video */;
|
||||
value = ((Component) => <Component resizeMode="cover" width={size} height={size} paused={false} src={{videoURI: url}} poster={r22} postponeRender={false} httpEngine={value5} />)(value);
|
||||
r13 = value;
|
||||
}
|
||||
return (
|
||||
<View {...viewProps}>
|
||||
<ObscuredMediaOverlay {...object2}>
|
||||
{r13}
|
||||
</ObscuredMediaOverlay>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const STICKER = PreviewableMediaTypes.STICKER;
|
||||
if (STICKER === type) {
|
||||
return (
|
||||
<View style={[styles.mediaThumbnailContainer, {width: size, height: size}]}>
|
||||
{((Component) => <Component sticker={media} size={size} animated={!useReducedMotion} />)(importDefault(10970) /* metro dependency 10970: Sticker */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function MultiplePreviewableMedia({previewableMedia, totalMediaCount, message}) { // fn#84004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:4586, offset: 0x01f33a72, size: 206 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{((Component) => <Component cutouts={[env0_3.useMemo(_fun84005,
|
||||
[])]}><SinglePreviewableMedia previewableMedia={previewableMedia} size={56} message={message} /></Component>)(importDefault(7599) /* metro dependency 7599: ClipView */)}
|
||||
<CountBadge total={totalMediaCount} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function MediaPreviewRightAccessoryContent({previewableMedia, totalMediaCount, message}) { // fn#84006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:5060, offset: 0x01f33bda, size: 139 bytes, params: 2, frame: 18
|
||||
(require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */).useInAppNotificationRedesign('MediaPreviewRightAccessory');
|
||||
const property = previewableMedia[0];
|
||||
return totalMediaCount === 1 ? <SinglePreviewableMedia previewableMedia={property} size={64} message={message} /> : <MultiplePreviewableMedia previewableMedia={property} totalMediaCount={totalMediaCount} message={message} />;
|
||||
}
|
||||
|
||||
function MediaPreviewRightAccessory({message}) { // fn#84007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:5535, offset: 0x01f33c65, size: 89 bytes, params: 2, frame: 17
|
||||
const value2 = (require(10965) /* metro dependency 10965: usePreviewableMedia */).usePreviewableMedia(message);
|
||||
const length = value2.length;
|
||||
return length === 0 ? null : <MediaPreviewRightAccessoryContent previewableMedia={value2} totalMediaCount={length} message={message} />;
|
||||
}
|
||||
|
||||
function _fun84005() { // fn#84005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11150:4693, offset: 0x01f33b40, size: 154 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
const BADGE_PADDING = (require(1305) /* metro dependency 1305: native */).BADGE_PADDING;
|
||||
const value2 = BADGE_PADDING + 5;
|
||||
const value3 = PixelRatio.roundToNearestPixel(20 + 2 * BADGE_PADDING);
|
||||
value = PixelRatio.roundToNearestPixel(value3 / 2);
|
||||
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
|
||||
const RoundedRect = CutoutShape.RoundedRect;
|
||||
return {shape: RoundedRect, x: 56 - value3 + value2, y: -value2, width: value3, height: value3, cornerRadius: value};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/* Metro module 11211; source: modules/in_app_notifications/native/MessageFailedToSendNotification.tsx; dependencies: [31, 33, 10973, 1244, 10994, 5475, 9149, 10992, 2] */
|
||||
function _fun85659(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11397:6, offset: 0x01f76eb3, size: 170 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_5 = {'width': 24, 'height': 24};
|
||||
value = value.memo(MessageFailedToSendNotification);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MessageFailedToSendNotification.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function MessageFailedToSendNotification(a0) { // fn#85660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11397:157, offset: 0x01f76f5d, size: 341 bytes, params: 2, frame: 23
|
||||
let intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
a0.notification;
|
||||
const inAppNotificationRedesignExperimentModule = require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */;
|
||||
const useInAppNotificationRedesign = inAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
|
||||
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, inAppNotificationRedesignExperimentModule,
|
||||
['MessageFailedToSendNotification']).redesignEnabled;
|
||||
const value2 = env0_3.useMemo(function() {
|
||||
var redesignEnabledBinding = redesignEnabled;
|
||||
var object = {type: 'simple'};
|
||||
var intl = require(dependencyMap[3]).intl;
|
||||
var string = intl.string;
|
||||
var t = require(dependencyMap[3]).t;
|
||||
if (redesignEnabledBinding) {
|
||||
object.text = Reflect.apply(string, intl, [t.Q0x94X]);
|
||||
} else {
|
||||
object.text = Reflect.apply(string, intl, [t.LdlH2M]);
|
||||
}
|
||||
return object;
|
||||
}, [redesignEnabled]);
|
||||
const Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
|
||||
const notificationProps = {icon: ((Component) => <Component source={require(9149) /* metro dependency 9149 */} style={env0_5} />)(importDefault(5475) /* metro dependency 5475: FastImage */)};
|
||||
if (redesignEnabled) {
|
||||
notificationProps.children = ((SystemMessageText) => <SystemMessageText text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xxRPOT)} />)((require(10992) /* metro dependency 10992: MessagePreviewText */).SystemMessageText);
|
||||
notificationProps.header = value2;
|
||||
} else {
|
||||
notificationProps.textChildren = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xxRPOT);
|
||||
notificationProps.header = value2;
|
||||
}
|
||||
return <Notification {...notificationProps} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,620 @@
|
||||
/* Metro module 10962; source: modules/in_app_notifications/native/MessageNotification.tsx; dependencies: [31, 27, 4502, 10963, 661, 33, 697, 477, 4501, 4017, 10964, 10975, 10992, 566, 10921, 1478, 4634, 1305, 1244, 10973, 4504, 4559, 10994, 2] */
|
||||
function _fun83970(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:6, offset: 0x01f316b4, size: 808 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_6 = (require(10963) /* metro dependency 10963: InAppNotificationConstants */).IN_APP_NOTIFICATION_MAX_HEIGHT;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).MessageEmbedTypes;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value2.jsx;
|
||||
const env0_9 = value2.jsxs;
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
const env0_11 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
const env0_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
const env0_13 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.rightAccessoryContainer = {marginLeft: PX_12};
|
||||
const object4 = {position: 'absolute'};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.right = PX_12;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.top = PX_12;
|
||||
object2.rightAccessoryAbsolute = object4;
|
||||
object2.newContainerRoleDot = {'paddingRight': 4, 'paddingTop': 0};
|
||||
object2.initialPreviewOverlay = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'overflow': 'hidden'};
|
||||
object2.expandedPreviewOverlay = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0};
|
||||
object2.gradientStyles = {height: 32};
|
||||
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
object2 = {code: 'function MessageNotificationTsx1(){const{notificationGestureY,accessoryExitProgressSV}=this.__closure;if(notificationGestureY==null){return{opacity:1,transform:[{scale:1}]};}const progress=accessoryExitProgressSV.get();return{opacity:1-progress,transform:[{scale:1-progress}]};}'};
|
||||
const env0_16 = value.memo(_fun83973);
|
||||
const env0_17 = value.memo(_fun83975);
|
||||
object2 = {code: 'function MessageNotificationTsx2(){const{contentHeight,EXPANDED_MAX_HEIGHT,TRUNCATED_MESSAGE_HEIGHT_OFFSET,EXPANDED_SHORT_PREVIEW_PADDING}=this.__closure;const isGradientShown=contentHeight.get()>=EXPANDED_MAX_HEIGHT-TRUNCATED_MESSAGE_HEIGHT_OFFSET;const isShortPreview=contentHeight.get()>0&&!isGradientShown;return{paddingBottom:isShortPreview?EXPANDED_SHORT_PREVIEW_PADDING:0};}'};
|
||||
object2 = {code: 'function MessageNotificationTsx3(){const{IS_ANDROID,hasPreviewableMedia,hasTextContent,hasEmbedMedia,fadeProgress,ACCESSORY_EXIT_THRESHOLD}=this.__closure;if(IS_ANDROID&&hasPreviewableMedia&&hasTextContent&&!hasEmbedMedia){return{opacity:fadeProgress.get()};}if(!hasTextContent||hasEmbedMedia){return{opacity:fadeProgress.get(),transform:[{translateY:(1-fadeProgress.get())*ACCESSORY_EXIT_THRESHOLD}]};}return{opacity:1};}'};
|
||||
const env0_20 = value.memo(_fun83976);
|
||||
object2 = {code: 'function MessageNotificationTsx4(){const{shouldHandlePreviewableMediaExpand,fadeProgress,accessoryWidthSV}=this.__closure;return shouldHandlePreviewableMediaExpand?{opacity:Math.max(0,1-fadeProgress.get()*2),right:accessoryWidthSV.get()}:{opacity:Math.max(0,1-fadeProgress.get()*2)};}'};
|
||||
const env0_22 = value.memo(_fun83983);
|
||||
object2 = {code: 'function MessageNotificationTsx5(){const{expandedPreviewHeight,EXPANDED_MAX_HEIGHT,expandedSV,notificationGestureY,initialPreviewHeight}=this.__closure;const maxExpandedHeight=Math.min(expandedPreviewHeight.get(),EXPANDED_MAX_HEIGHT);if(expandedSV.get()){return maxExpandedHeight;}const dragDistance=Math.max(0,notificationGestureY.get());const maxHeight=Math.max(maxExpandedHeight,initialPreviewHeight.get());return Math.min(initialPreviewHeight.get()+dragDistance,maxHeight);}'};
|
||||
object2 = {code: 'function MessageNotificationTsx6(){const{expandedSV,expandedPreviewHeight,EXPANDED_MAX_HEIGHT,initialPreviewHeight,notificationGestureY,ACCESSORY_EXIT_THRESHOLD,currentHeight}=this.__closure;if(expandedSV.get()){return 1;}const maxExpandedHeight=Math.min(expandedPreviewHeight.get(),EXPANDED_MAX_HEIGHT);const heightDifference=maxExpandedHeight-initialPreviewHeight.get();const dragDistance=Math.max(0,notificationGestureY.get());if(heightDifference<=0){return Math.min(1,dragDistance/ACCESSORY_EXIT_THRESHOLD);}return Math.min(1,(currentHeight.get()-initialPreviewHeight.get())/heightDifference);}'};
|
||||
object2 = {code: "function MessageNotificationTsx7(){const{shouldHandlePreviewableMediaExpand,currentHeight,accessoryWidthSV}=this.__closure;return shouldHandlePreviewableMediaExpand?{overflow:'hidden',height:currentHeight.get(),marginRight:-accessoryWidthSV.get()}:{overflow:'hidden',height:currentHeight.get()};}"};
|
||||
const env0_26 = value.memo(_fun83985);
|
||||
object2 = {code: 'function MessageNotificationTsx8(){const{notificationGestureY,expandedSV,ACCESSORY_EXIT_THRESHOLD}=this.__closure;if(notificationGestureY==null){return 0;}if(expandedSV.get()){return 1;}const dragDistance=Math.max(0,notificationGestureY.get());return Math.min(1,dragDistance/ACCESSORY_EXIT_THRESHOLD);}'};
|
||||
object2 = {code: 'function MessageNotificationTsx9(){const{PREVIEW_SIZE,ACCESSORY_LEFT_GAP,accessoryExitProgressSV}=this.__closure;return(PREVIEW_SIZE+ACCESSORY_LEFT_GAP)*(1-accessoryExitProgressSV.get());}'};
|
||||
object2 = {code: 'function MessageNotificationTsx10(){const{notificationGestureY,hasPreviewableMedia,accessoryWidthSV,PREVIEW_SIZE}=this.__closure;if(notificationGestureY==null||!hasPreviewableMedia){return{};}return{marginRight:accessoryWidthSV.get(),minHeight:PREVIEW_SIZE};}'};
|
||||
object2 = {code: 'function MessageNotificationTsx11(){const{withTiming,expandedSV,tokens,Easing}=this.__closure;return{borderRadius:withTiming(expandedSV.get()?tokens.radii.xl:tokens.radii.lg,{duration:220,easing:Easing.bezier(0.16,1,0.3,1)})};}'};
|
||||
value = value.memo(MessageNotification);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MessageNotification.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function useSetHeightOnLayout(a0) { // fn#83971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:319, offset: 0x01f319dc, size: 44 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return env0_3.useCallback(_fun83972, [a0]);
|
||||
}
|
||||
|
||||
function _fun83973({message, redesignEnabled, notificationGestureY, accessoryExitProgressSV}) { // fn#83973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:1123, offset: 0x01f31a37, size: 254 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = c_83974;
|
||||
closure.__closure = {notificationGestureY: notificationGestureY, accessoryExitProgressSV: accessoryExitProgressSV};
|
||||
closure.__workletHash = 4919466552494;
|
||||
closure.__initData = env0_15;
|
||||
if (redesignEnabled) {
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View
|
||||
style={[notificationGestureY != null ? styles.rightAccessoryAbsolute : styles.rightAccessoryContainer,
|
||||
Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure])]}
|
||||
>
|
||||
{((MediaPreviewRightAccessory) => <MediaPreviewRightAccessory message={message} />)((require(10964) /* metro dependency 10964: MediaPreviewRightAccessory */).MediaPreviewRightAccessory)}
|
||||
</View>
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun83975({message, redesignEnabled}) { // fn#83975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:1661, offset: 0x01f31b93, size: 121 bytes, params: 2, frame: 15
|
||||
return ((Component) => <Component message={message} lineClamp={2} maxHeight={IN_APP_NOTIFICATION_MAX_HEIGHT} />)(redesignEnabled ? importDefault(10992) /* metro dependency 10992: MessagePreviewText */ : (require(10975) /* metro dependency 10975: ChannelRowPreview */).NativeChannelRowPreview);
|
||||
}
|
||||
|
||||
function _fun83976({message, expandedPreviewHeight, fadeProgress}) { // fn#83976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:2644, offset: 0x01f31c0c, size: 719 bytes, params: 2, frame: 32
|
||||
const styles = useStyles();
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const value3 = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).useHasPreviewableMedia(message);
|
||||
const value4 = env0_3.useMemo(function() {
|
||||
return message.embeds.some(_fun83979);
|
||||
}, [message.embeds]);
|
||||
var env0_3 = value4;
|
||||
const value5 = env0_3.useMemo(_fun83980, [value3, message.poll, value4]);
|
||||
const value6 = message.content.length > 0;
|
||||
const value7 = 0.24 * (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)({ignoreKeyboard: true}).height;
|
||||
const value8 = useSetHeightOnLayout(expandedPreviewHeight);
|
||||
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const value10 = useSetHeightOnLayout(value9);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = E_83981;
|
||||
closure.__closure = {contentHeight: value9, EXPANDED_MAX_HEIGHT: value7, TRUNCATED_MESSAGE_HEIGHT_OFFSET: PX_8,
|
||||
EXPANDED_SHORT_PREVIEW_PADDING: PX_12};
|
||||
closure.__workletHash = 14817205317960;
|
||||
closure.__initData = env0_18;
|
||||
const value11 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue5.useAnimatedStyle;
|
||||
closure = v;
|
||||
closure.__closure = {IS_ANDROID: env0_11, hasPreviewableMedia: value3, hasTextContent: value6,
|
||||
hasEmbedMedia: value4, fadeProgress: fadeProgress, ACCESSORY_EXIT_THRESHOLD: 20};
|
||||
closure.__workletHash = 9141362335479;
|
||||
closure.__initData = env0_19;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.expandedPreviewOverlay];
|
||||
items2[1] = value5 ? value12 : null;
|
||||
items2[2] = value11;
|
||||
const NativeChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).NativeChannelRowPreview;
|
||||
const r13 = value5 ? 6 : undefined;
|
||||
const MOBILE_ALERT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ALERT_BACKGROUND_DEFAULT;
|
||||
return (
|
||||
<View2 style={items2} onLayout={value8}>
|
||||
<View onLayout={value10}>
|
||||
<NativeChannelRowPreview
|
||||
message={message}
|
||||
lineClamp={r13}
|
||||
maxHeight={value7}
|
||||
backgroundColor={MOBILE_ALERT_BACKGROUND_DEFAULT}
|
||||
gifAutoPlay={!useReducedMotion}
|
||||
gradientStyles={styles.gradientStyles}
|
||||
/>
|
||||
</View>
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun83983({initialPreviewHeight, fadeProgress, initialPreviewContent, accessoryWidthSV, shouldHandlePreviewableMediaExpand}) { // fn#83983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:4323, offset: 0x01f32039, size: 235 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const value2 = useSetHeightOnLayout(initialPreviewHeight);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = h_83984;
|
||||
closure.__closure = {shouldHandlePreviewableMediaExpand: shouldHandlePreviewableMediaExpand,
|
||||
fadeProgress: fadeProgress, accessoryWidthSV: accessoryWidthSV};
|
||||
closure.__workletHash = 11698348828915;
|
||||
closure.__initData = env0_21;
|
||||
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View2 style={[styles.initialPreviewOverlay, value3]}>
|
||||
<View onLayout={value2}>
|
||||
{initialPreviewContent}
|
||||
</View>
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun83985({message, expandedSV, notificationGestureY, initialPreviewContent, initialPreviewHeight, accessoryWidthSV}) { // fn#83985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:6261, offset: 0x01f321b2, size: 586 bytes, params: 2, frame: 29
|
||||
const value2 = 0.24 * (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)({ignoreKeyboard: true}).height;
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(value2);
|
||||
const r8 = env0_11 && (require(10921) /* metro dependency 10921: InAppNotificationUtils */).useHasPreviewableMedia(message);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
let closure = E_83986;
|
||||
closure.__closure = {expandedPreviewHeight: value3, EXPANDED_MAX_HEIGHT: value2, expandedSV: expandedSV,
|
||||
notificationGestureY: notificationGestureY, initialPreviewHeight: initialPreviewHeight};
|
||||
closure.__workletHash = 7668752374780;
|
||||
closure.__initData = env0_23;
|
||||
const value5 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
useDerivedValue = moduleValue4.useDerivedValue;
|
||||
closure = f_83987;
|
||||
closure.__closure = {expandedSV: expandedSV, expandedPreviewHeight: value3, EXPANDED_MAX_HEIGHT: value2,
|
||||
initialPreviewHeight: initialPreviewHeight, notificationGestureY: notificationGestureY,
|
||||
ACCESSORY_EXIT_THRESHOLD: 20, currentHeight: value5};
|
||||
closure.__workletHash = 14767439807279;
|
||||
closure.__initData = env0_24;
|
||||
const value6 = Reflect.apply(useDerivedValue, moduleValue4, [closure]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
const useAnimatedStyle = moduleValue5.useAnimatedStyle;
|
||||
closure = H_83988;
|
||||
closure.__closure = {shouldHandlePreviewableMediaExpand: r8, currentHeight: value5,
|
||||
accessoryWidthSV: accessoryWidthSV};
|
||||
closure.__workletHash = 6185146702702;
|
||||
closure.__initData = env0_25;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View style={value7}>
|
||||
{((Component) => <Component message={message} expandedPreviewHeight={value3} fadeProgress={value6} />)(env0_20)}
|
||||
{((Component) => <Component initialPreviewHeight={initialPreviewHeight} fadeProgress={value6} initialPreviewContent={initialPreviewContent} accessoryWidthSV={accessoryWidthSV} shouldHandlePreviewableMediaExpand={r8} />)(env0_22)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function MessageNotification({notification, canExpand, expandedContentVisible, expandedSV, notificationGestureY, onAccessibilityExpand, onDismiss}) { // fn#83989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:8758, offset: 0x01f325ba, size: 1540 bytes, params: 2, frame: 45
|
||||
var object2;
|
||||
var intl;
|
||||
var formatToPlainString;
|
||||
var property;
|
||||
var moduleValue4;
|
||||
const env0_3 = onDismiss;
|
||||
const styles = useStyles();
|
||||
const message = notification.message;
|
||||
const channel = notification.channel;
|
||||
const parentChannel = notification.parentChannel;
|
||||
const guild = notification.guild;
|
||||
const value3 = (require(4634) /* metro dependency 4634: useMessageAuthor */).useNullableMessageAuthor(message);
|
||||
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.roleStyle;
|
||||
});
|
||||
const r13 = value3?.colorString ?? undefined;
|
||||
const value5 = env0_3.useMemo(_fun83991, [roleStyle !== 'username' ? undefined : r13]);
|
||||
const r12 = roleStyle !== 'dot' || r13 === undefined ? undefined : ((RoleDot) => <RoleDot color={r13} colors={value3?.colorStrings} containerStyles={styles.newContainerRoleDot} />)((require(1305) /* metro dependency 1305: native */).RoleDot);
|
||||
const notificationTitle = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).getNotificationTitle(channel,
|
||||
value3, parentChannel, guild);
|
||||
let r2 = message.content.length === 0 && message.interaction !== null && message.interaction !== undefined;
|
||||
r2 = r2 && message.activityInstance !== null && message.activityInstance !== undefined;
|
||||
if (r2) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = (require(1244) /* metro dependency 1244: indexNative */).t['7eikg1'];
|
||||
moduleValue4 = require(4634) /* metro dependency 4634: useMessageAuthor */;
|
||||
message.content = Reflect.apply(formatToPlainString, intl, [property,
|
||||
{username: moduleValue4.getUserAuthor(message.interaction?.user, notification.channel).nick}]);
|
||||
}
|
||||
const inAppNotificationRedesignExperimentModule = require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */;
|
||||
const useInAppNotificationRedesign = inAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
|
||||
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, inAppNotificationRedesignExperimentModule,
|
||||
['MessageNotification']).redesignEnabled;
|
||||
const value13 = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).useHasPreviewableMedia(message);
|
||||
const value14 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(IN_APP_NOTIFICATION_MAX_HEIGHT);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
let closure = MessageNotificationF;
|
||||
closure.__closure = {notificationGestureY: notificationGestureY, expandedSV: expandedSV,
|
||||
ACCESSORY_EXIT_THRESHOLD: 20};
|
||||
closure.__workletHash = 14375442919988;
|
||||
closure.__initData = env0_27;
|
||||
const value15 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
|
||||
const moduleValue9 = reanimatedRexportModule;
|
||||
useDerivedValue = moduleValue9.useDerivedValue;
|
||||
closure = MessageNotificationZ;
|
||||
const PREVIEW_SIZE = (require(10964) /* metro dependency 10964: MediaPreviewRightAccessory */).PREVIEW_SIZE;
|
||||
closure.__closure = {PREVIEW_SIZE: PREVIEW_SIZE, ACCESSORY_LEFT_GAP: PX_12, accessoryExitProgressSV: value15};
|
||||
closure.__workletHash = 617547756523;
|
||||
closure.__initData = env0_28;
|
||||
const value16 = Reflect.apply(useDerivedValue, moduleValue9, [closure]);
|
||||
const moduleValue10 = reanimatedRexportModule;
|
||||
let useAnimatedStyle = moduleValue10.useAnimatedStyle;
|
||||
closure = MessageNotificationU;
|
||||
closure.__closure = {notificationGestureY: notificationGestureY, hasPreviewableMedia: value13,
|
||||
accessoryWidthSV: value16, PREVIEW_SIZE: PREVIEW_SIZE};
|
||||
closure.__workletHash = 10055156293894;
|
||||
closure.__initData = env0_29;
|
||||
const value17 = Reflect.apply(useAnimatedStyle, moduleValue10, [closure]);
|
||||
const moduleValue11 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue11.useAnimatedStyle;
|
||||
closure = MessageNotificationZ_83995;
|
||||
object2 = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, expandedSV: expandedSV,
|
||||
tokens: importDefault(697) /* metro dependency 697: native */};
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object2.Easing = Easing;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 5784976109939;
|
||||
closure.__initData = env0_30;
|
||||
const value18 = Reflect.apply(useAnimatedStyle, moduleValue11, [closure]);
|
||||
const value19 = env0_3.useMemo(_fun83996, [redesignEnabled, channel, parentChannel, guild, value3,
|
||||
notificationTitle, value5, expandedContentVisible, onDismiss]);
|
||||
const env0_172 = ((Component) => <Component message={message} redesignEnabled={redesignEnabled} />)(env0_17);
|
||||
const r9 = notificationGestureY == null ? env0_172 : ((Component) => <Component message={message} expandedSV={expandedSV} notificationGestureY={notificationGestureY} initialPreviewContent={env0_172} initialPreviewHeight={value14} accessoryWidthSV={value16} />)(env0_26);
|
||||
const value22 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
|
||||
const Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const author = message.author;
|
||||
const id = notification.guild?.id;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const NORMAL = AvatarSizes.NORMAL;
|
||||
return (
|
||||
<Notification
|
||||
icon={<Avatar user={author} guildId={id} size={NORMAL} />}
|
||||
accessoryLabelNode={r12}
|
||||
bodyStyle={[value17, value18]}
|
||||
rightAccessory={notificationGestureY == null ? ((Component) => <Component message={message} redesignEnabled={redesignEnabled} notificationGestureY={notificationGestureY} accessoryExitProgressSV={value15} />)(env0_16) : expandedContentVisible ? null : ((Component) => <Component message={message} redesignEnabled={redesignEnabled} notificationGestureY={notificationGestureY} accessoryExitProgressSV={value15} />)(env0_16)}
|
||||
children={r9}
|
||||
header={value19}
|
||||
showDragHandle={canExpand && (expandedContentVisible ? value22 : !expandedContentVisible)}
|
||||
onAccessibilityExpand={onAccessibilityExpand}
|
||||
expandedContentVisible={expandedContentVisible}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun83972({nativeEvent}) { // fn#83972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:374, offset: 0x01f31a08, size: 47 bytes, params: 2, frame: 11
|
||||
const height = nativeEvent.layout.height;
|
||||
if (height > 0) {
|
||||
env0_0.set(height);
|
||||
}
|
||||
}
|
||||
|
||||
function c_83974() { // fn#83974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:1255, offset: 0x01f31b35, size: 94 bytes, params: 1, frame: 11
|
||||
var object2;
|
||||
var value;
|
||||
if (notificationGestureY == null) {
|
||||
object2 = {opacity: 1};
|
||||
object2.transform = [{scale: 1}];
|
||||
} else {
|
||||
value = accessoryExitProgressSV.get();
|
||||
object2 = {opacity: 1 - value};
|
||||
object2.transform = [{scale: 1 - value}];
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun83978() { // fn#83978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:2829, offset: 0x01f31edb, size: 35 bytes, params: 1, frame: 11
|
||||
return message.embeds.some(_fun83979);
|
||||
}
|
||||
|
||||
function _fun83980() { // fn#83980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:2929, offset: 0x01f31f35, size: 35 bytes, params: 1, frame: 4
|
||||
let r0 = env0_2 || message.poll != null;
|
||||
r0 = !r0 ? env0_3 : r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function E_83981() { // fn#83981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:3142, offset: 0x01f31f58, size: 73 bytes, params: 1, frame: 13
|
||||
const binding = env0_6;
|
||||
const value3 = binding.get() >= env0_5 - PX_8;
|
||||
const value4 = binding.get();
|
||||
const value5 = 0;
|
||||
const PX_122 = value4 > value5 ? value3 ? value5 : PX_12 : value5;
|
||||
return {paddingBottom: PX_122};
|
||||
}
|
||||
|
||||
function v() { // fn#83982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:3411, offset: 0x01f31fa1, size: 152 bytes, params: 1, frame: 13
|
||||
var r1;
|
||||
var r0;
|
||||
var object3;
|
||||
var fadeProgressBinding;
|
||||
var object4;
|
||||
const value = environment.__proto__;
|
||||
if (env1_11) {
|
||||
if (env0_2) {
|
||||
if (result) {
|
||||
if (env0_3) {
|
||||
if (result) {
|
||||
if (env0_3) {
|
||||
object3 = {};
|
||||
fadeProgressBinding = fadeProgress;
|
||||
object3.opacity = fadeProgressBinding.get();
|
||||
object4 = {};
|
||||
object4.translateY = (1 - fadeProgressBinding.get()) * 20;
|
||||
object3.transform = [object4];
|
||||
r1 = object3;
|
||||
} else {
|
||||
r1 = {opacity: 1};
|
||||
}
|
||||
} else {
|
||||
object3 = {};
|
||||
fadeProgressBinding = fadeProgress;
|
||||
object3.opacity = fadeProgressBinding.get();
|
||||
object4 = {};
|
||||
object4.translateY = (1 - fadeProgressBinding.get()) * 20;
|
||||
object3.transform = [object4];
|
||||
r1 = object3;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
object3 = {};
|
||||
object3.opacity = fadeProgress.get();
|
||||
r0 = object3;
|
||||
}
|
||||
} else {
|
||||
if (result) {
|
||||
if (env0_3) {
|
||||
object3 = {};
|
||||
fadeProgressBinding = fadeProgress;
|
||||
object3.opacity = fadeProgressBinding.get();
|
||||
object4 = {};
|
||||
object4.translateY = (1 - fadeProgressBinding.get()) * 20;
|
||||
object3.transform = [object4];
|
||||
r1 = object3;
|
||||
} else {
|
||||
r1 = {opacity: 1};
|
||||
}
|
||||
} else {
|
||||
object3 = {};
|
||||
fadeProgressBinding = fadeProgress;
|
||||
object3.opacity = fadeProgressBinding.get();
|
||||
object4 = {};
|
||||
object4.translateY = (1 - fadeProgressBinding.get()) * 20;
|
||||
object3.transform = [object4];
|
||||
r1 = object3;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else {
|
||||
if (result) {
|
||||
if (env0_3) {
|
||||
object3 = {};
|
||||
fadeProgressBinding = fadeProgress;
|
||||
object3.opacity = fadeProgressBinding.get();
|
||||
object4 = {};
|
||||
object4.translateY = (1 - fadeProgressBinding.get()) * 20;
|
||||
object3.transform = [object4];
|
||||
r1 = object3;
|
||||
} else {
|
||||
r1 = {opacity: 1};
|
||||
}
|
||||
} else {
|
||||
object3 = {};
|
||||
fadeProgressBinding = fadeProgress;
|
||||
object3.opacity = fadeProgressBinding.get();
|
||||
object4 = {};
|
||||
object4.translateY = (1 - fadeProgressBinding.get()) * 20;
|
||||
object3.transform = [object4];
|
||||
r1 = object3;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else {
|
||||
if (result) {
|
||||
if (env0_3) {
|
||||
object3 = {};
|
||||
fadeProgressBinding = fadeProgress;
|
||||
object3.opacity = fadeProgressBinding.get();
|
||||
object4 = {};
|
||||
object4.translateY = (1 - fadeProgressBinding.get()) * 20;
|
||||
object3.transform = [object4];
|
||||
r1 = object3;
|
||||
} else {
|
||||
r1 = {opacity: 1};
|
||||
}
|
||||
} else {
|
||||
object3 = {};
|
||||
fadeProgressBinding = fadeProgress;
|
||||
object3.opacity = fadeProgressBinding.get();
|
||||
object4 = {};
|
||||
object4.translateY = (1 - fadeProgressBinding.get()) * 20;
|
||||
object3.transform = [object4];
|
||||
r1 = object3;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function h_83984() { // fn#83984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:4522, offset: 0x01f32124, size: 142 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
var object2;
|
||||
var Math;
|
||||
if (shouldHandlePreviewableMediaExpand) {
|
||||
object2 = {};
|
||||
Math = global.Math;
|
||||
object2.opacity = Math.max(0, 1 - 2 * fadeProgress.get());
|
||||
object2.right = accessoryWidthSV.get();
|
||||
r0 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
Math = global.Math;
|
||||
object2.opacity = Math.max(0, 1 - 2 * fadeProgress.get());
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function E_83986() { // fn#83986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:6540, offset: 0x01f323fc, size: 151 bytes, params: 1, frame: 16
|
||||
let Math = global.Math;
|
||||
let min = Math.min;
|
||||
const binding = env0_5;
|
||||
let get = binding.get;
|
||||
const value3 = Reflect.apply(min, Math, [Reflect.apply(get, binding, []), env0_4]);
|
||||
const expandedSVBinding = expandedSV;
|
||||
get = expandedSVBinding.get;
|
||||
if (Reflect.apply(get, expandedSVBinding, [])) {
|
||||
return value3;
|
||||
}
|
||||
Math = global.Math;
|
||||
let max = Math.max;
|
||||
const value5 = Reflect.apply(max, Math, [0, notificationGestureY.get()]);
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
const initialPreviewHeightBinding = initialPreviewHeight;
|
||||
get = initialPreviewHeightBinding.get;
|
||||
const value = Reflect.apply(max, Math, [value3, Reflect.apply(get, initialPreviewHeightBinding, [])]);
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
get = initialPreviewHeightBinding.get;
|
||||
return Reflect.apply(min, Math, [Reflect.apply(get, initialPreviewHeightBinding, []) + value5, value]);
|
||||
}
|
||||
|
||||
function f_83987() { // fn#83987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:6872, offset: 0x01f32493, size: 201 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
var value7;
|
||||
var value;
|
||||
const expandedSVBinding = expandedSV;
|
||||
let get = expandedSVBinding.get;
|
||||
if (Reflect.apply(get, expandedSVBinding, [])) {
|
||||
return 1;
|
||||
}
|
||||
let Math = global.Math;
|
||||
let min = Math.min;
|
||||
const value3 = Reflect.apply(min, Math, [env0_5.get(), env0_4]);
|
||||
let initialPreviewHeightBinding = initialPreviewHeight;
|
||||
get = initialPreviewHeightBinding.get;
|
||||
const value4 = value3 - Reflect.apply(get, initialPreviewHeightBinding, []);
|
||||
Math = global.Math;
|
||||
if (value4 <= 0) {
|
||||
r0 = global.Math.min(1, Math.max(0, notificationGestureY.get()) / 20);
|
||||
} else {
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
value7 = env0_7.get();
|
||||
initialPreviewHeightBinding = initialPreviewHeight;
|
||||
value = (value7 - initialPreviewHeightBinding.get()) / value4;
|
||||
value = Reflect.apply(min, Math, [1, value]);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function H_83988() { // fn#83988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:7261, offset: 0x01f3255c, size: 94 bytes, params: 1, frame: 12
|
||||
var r0;
|
||||
var object2;
|
||||
var accessoryWidthSVBinding;
|
||||
if (env0_6) {
|
||||
object2 = {overflow: 'hidden'};
|
||||
object2.height = env0_7.get();
|
||||
accessoryWidthSVBinding = accessoryWidthSV;
|
||||
object2.marginRight = -accessoryWidthSVBinding.get();
|
||||
r0 = object2;
|
||||
} else {
|
||||
object2 = {overflow: 'hidden'};
|
||||
object2.height = env0_7.get();
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun83991() { // fn#83991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:9163, offset: 0x01f32bbe, size: 33 bytes, params: 1, frame: 3
|
||||
return env0_8 != null ? {color: env0_8} : undefined;
|
||||
}
|
||||
|
||||
function MessageNotificationF() { // fn#83992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:9841, owner: MessageNotification.F, offset: 0x01f32bdf, size: 101 bytes, params: 1, frame: 14
|
||||
if (notificationGestureY == null) {
|
||||
return 0;
|
||||
}
|
||||
const expandedSVBinding = expandedSV;
|
||||
const get = expandedSVBinding.get;
|
||||
if (Reflect.apply(get, expandedSVBinding, [])) {
|
||||
return 1;
|
||||
}
|
||||
let Math = global.Math;
|
||||
const max = Math.max;
|
||||
let value = notificationGestureY.get();
|
||||
value = Reflect.apply(max, Math, [0, value]);
|
||||
Math = global.Math;
|
||||
return Math.min(1, value / 20);
|
||||
}
|
||||
|
||||
function MessageNotificationZ() { // fn#83993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:10097, owner: MessageNotification.Z, offset: 0x01f32c44, size: 68 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const PREVIEW_SIZE = (require(10964) /* metro dependency 10964: MediaPreviewRightAccessory */).PREVIEW_SIZE;
|
||||
return (PREVIEW_SIZE + PX_12) * (1 - env0_13.get());
|
||||
}
|
||||
|
||||
function MessageNotificationU() { // fn#83994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:10313, owner: MessageNotification.U, offset: 0x01f32c88, size: 85 bytes, params: 1, frame: 13
|
||||
var r0;
|
||||
var object2;
|
||||
if (notificationGestureY == null) {
|
||||
r0 = {};
|
||||
} else if (env0_12) {
|
||||
object2 = {};
|
||||
object2.marginRight = env0_14.get();
|
||||
value = environment.__proto__;
|
||||
object2.minHeight = (require(10964) /* metro dependency 10964: MediaPreviewRightAccessory */).PREVIEW_SIZE;
|
||||
r0 = object2;
|
||||
} else {
|
||||
r0 = {};
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function MessageNotificationZ_83995() { // fn#83995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:10592, owner: MessageNotification.z, offset: 0x01f32cdd, size: 184 bytes, params: 1, frame: 21
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const value3 = expandedSV.get();
|
||||
const radii = (importDefault(697) /* metro dependency 697: native */).radii;
|
||||
const r2 = value3 ? radii.xl : radii.lg;
|
||||
const object = {duration: 220};
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
object.easing = Easing.bezier(0.16, 1, 0.3, 1);
|
||||
return {borderRadius: Reflect.apply(withTiming, timingModule, [r2, object])};
|
||||
}
|
||||
|
||||
function _fun83996() { // fn#83996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:10901, offset: 0x01f32d95, size: 108 bytes, params: 1, frame: 4
|
||||
return redesignEnabled ? {type: 'message', channel: channel, parentChannel: parentChannel, guild: guild,
|
||||
author: env0_7, expanded: expandedContentVisible, onDismiss: onDismiss} : {type: 'simple', text: env0_10,
|
||||
labelStyle: env0_9};
|
||||
}
|
||||
|
||||
function _fun83979(a0) { // fn#83979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11148:2848, offset: 0x01f31efe, size: 55 bytes, params: 2, frame: 4
|
||||
var type;
|
||||
let value = a0.image != null;
|
||||
let r0 = value || a0.thumbnail != null;
|
||||
if (!r0) {
|
||||
type = a0.type;
|
||||
value = environment.__proto__.__proto__;
|
||||
value = type === MessageEmbedTypes.GIFV;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
/* Metro module 10996; source: modules/in_app_notifications/native/MessageNotificationHeader.tsx; dependencies: [31, 27, 4502, 3793, 1878, 33, 4501, 4573, 4805, 677, 6682, 6684, 6647, 566, 5278, 1244, 5312, 2] */
|
||||
function _fun84157(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:6, offset: 0x01f3c15d, size: 443 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
Object = global.Object;
|
||||
const env0_9 = Object.freeze({radius: 12});
|
||||
Object = global.Object;
|
||||
const env0_10 = Object.freeze({'top': 8, 'right': 8, 'bottom': 8, 'left': 8});
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flexDirection': 'row',
|
||||
'alignItems': 'center'}, headerContent: {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center'},
|
||||
primaryText: {flexShrink: 1}, secondaryTextContainer: {'flexDirection': 'row', 'alignItems': 'center',
|
||||
'marginLeft': 2, 'gap': 2, 'flex': 1, 'overflow': 'hidden'}, separator: {marginHorizontal: 2},
|
||||
icon: {'width': 16, 'height': 16}, secondaryText: {flex: 1}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MessageNotificationHeader.tsx');
|
||||
exports.default = MessageNotificationHeader;
|
||||
exports.SimpleNotificationHeader = SimpleNotificationHeader;
|
||||
}
|
||||
|
||||
function LocationText({channel, parentChannel, author, location}) { // fn#84158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:613, offset: 0x01f3c318, size: 319 bytes, params: 2, frame: 23
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const styles = useStyles();
|
||||
const env0_2 = styles;
|
||||
const r10 = author != null ? 'text-muted' : 'mobile-text-heading-primary';
|
||||
return (
|
||||
<View style={styles.secondaryTextContainer}>
|
||||
{author != null && <Text variant="text-md/bold" color={r10} maxFontSizeMultiplier={1.75} style={styles.separator}>{'·'}</Text>}
|
||||
{env0_2.useMemo(_fun84159, [channel, parentChannel, styles.icon, r10])}
|
||||
<Text
|
||||
variant="text-md/semibold"
|
||||
color={r10}
|
||||
lineClamp={1}
|
||||
style={styles.secondaryText}
|
||||
>
|
||||
{location}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function MessageNotificationHeader({channel, parentChannel, guild, author, expanded, onDismiss}) { // fn#84160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:1404, offset: 0x01f3c57f, size: 1067 bytes, params: 2, frame: 33
|
||||
var object2;
|
||||
var r12;
|
||||
var r20;
|
||||
var moduleValue3;
|
||||
var PressableOpacity;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
const r2 = Reflect.apply(useStateFromStores, fluxModule, [[AccessibilityStore], function() {
|
||||
return AccessibilityStore.roleStyle;
|
||||
}]) !== 'username' || author == null ? undefined : author.colorString;
|
||||
const r21 = r2 != null ? {color: r2} : undefined;
|
||||
object2 = {channel: channel, parentChannel: parentChannel, guild: guild};
|
||||
const channel2 = object2.channel;
|
||||
const parentChannel2 = object2.parentChannel;
|
||||
guild = object2.guild;
|
||||
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
const channelName = useChannelNameModule.computeChannelName(channel2, UserStore, RelationshipStore);
|
||||
const type = channel2.type;
|
||||
const ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
|
||||
const GROUP_DM = ChannelTypes.GROUP_DM;
|
||||
if (GROUP_DM === type) {
|
||||
r20 = channelName;
|
||||
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_FORUM === type) {
|
||||
r20 = guild != null ? '' + channelName + ', ' + guild.name : null;
|
||||
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_TEXT === type) {
|
||||
r20 = guild != null ? '' + channelName + ', ' + guild.name : null;
|
||||
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_ANNOUNCEMENT === type) {
|
||||
r20 = guild != null ? '' + channelName + ', ' + guild.name : null;
|
||||
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.ANNOUNCEMENT_THREAD === type) {
|
||||
if (parentChannel2 != null) {
|
||||
moduleValue3 = useChannelNameModule;
|
||||
r12 = moduleValue3.computeChannelName(parentChannel2, UserStore, RelationshipStore);
|
||||
} else {
|
||||
r12 = null;
|
||||
}
|
||||
r20 = r12 != null ? '' + channelName + ', ' + r12 : guild == null ? channelName : '' + channelName + ', ' + guild.name;
|
||||
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.PUBLIC_THREAD === type) {
|
||||
if (parentChannel2 != null) {
|
||||
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
r12 = moduleValue3.computeChannelName(parentChannel2, UserStore, RelationshipStore);
|
||||
} else {
|
||||
r12 = null;
|
||||
}
|
||||
r20 = r12 != null ? '' + channelName + ', ' + r12 : guild == null ? channelName : '' + channelName + ', ' + guild.name;
|
||||
} else if ((require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.PRIVATE_THREAD !== type) {
|
||||
r20 = null;
|
||||
} else {
|
||||
if (parentChannel2 != null) {
|
||||
moduleValue3 = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
r12 = moduleValue3.computeChannelName(parentChannel2, UserStore, RelationshipStore);
|
||||
} else {
|
||||
r12 = null;
|
||||
}
|
||||
r20 = r12 != null ? '' + channelName + ', ' + r12 : guild == null ? channelName : '' + channelName + ', ' + guild.name;
|
||||
}
|
||||
const items2 = [author != null && ((Text) => <Text variant="text-md/semibold" color="mobile-text-heading-primary" lineClamp={1} style={[styles.primaryText,
|
||||
r21]}>{author.nick}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
|
||||
items2[1] = r20 != null && <LocationText location={r20} channel={channel} parentChannel={parentChannel} author={author} />;
|
||||
const view = <View style={styles.headerContent}>{items2}</View>;
|
||||
let r5 = expanded && onDismiss != null;
|
||||
if (r5) {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r5 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LnEgqX)} hitSlop={env0_10} androidRippleConfig={env0_9} onPress={function() {
|
||||
return onDismiss('close_from_expanded');
|
||||
}}>{((XSmallIcon) => <XSmallIcon color="icon-subtle" style={{'height': 20,
|
||||
'width': 20}} />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}</PressableOpacity>;
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{view}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function SimpleNotificationHeader({text, secondaryText, labelStyle}) { // fn#84163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:2989, offset: 0x01f3c9c0, size: 315 bytes, params: 2, frame: 28
|
||||
var r5;
|
||||
var items3;
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text2 = <Text variant="text-md/semibold" color="mobile-text-heading-primary" lineClamp={1} style={[styles.primaryText,
|
||||
labelStyle]}>{text}</Text>;
|
||||
const value3 = secondaryText != null;
|
||||
if (value3) {
|
||||
var viewBinding2Props = {style: styles.secondaryTextContainer};
|
||||
items3 = [<Text variant="text-md/bold" color="text-muted" maxFontSizeMultiplier={1.75} style={styles.separator}>{'·'}</Text>];
|
||||
items3[1] = <Text variant="text-md/semibold" color="text-muted" lineClamp={1} style={styles.secondaryText}>{secondaryText}</Text>;
|
||||
r5 = <View {...viewBinding2Props}>{items3}</View>;
|
||||
} else {
|
||||
r5 = value3;
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{text2}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun84159() { // fn#84159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11182:760, offset: 0x01f3c457, size: 296 bytes, params: 1, frame: 19
|
||||
const ChannelTypes = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes;
|
||||
const ThreadIcon = (require(6684) /* metro dependency 6684: ThreadIcon */).ThreadIcon;
|
||||
const channelBinding = channel;
|
||||
const parentChannelBinding = parentChannel;
|
||||
const value3 = undefined;
|
||||
const ChannelTypesSets = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypesSets;
|
||||
const PRIVATE_CHANNEL = ChannelTypesSets.PRIVATE_CHANNEL;
|
||||
const r4 = PRIVATE_CHANNEL.has(channelBinding.type) ? value3 : channelBinding.type === ChannelTypes.PUBLIC_THREAD ? parentChannelBinding == null ? ThreadIcon : parentChannelBinding.type === ChannelTypes.GUILD_FORUM ? (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon : ThreadIcon : (require(6647) /* metro dependency 6647: ChannelUtils */).getSimpleChannelIconComponent(channelBinding);
|
||||
const value5 = null;
|
||||
return value5 != r4 ? env1_2.createElement(r4, {color: env0_3, style: styles.icon}) : value5;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
/* Metro module 10997; source: modules/in_app_notifications/native/MessageNotificationReactBar.tsx; dependencies: [31, 27, 8532, 1881, 33, 4501, 697, 1478, 10994, 10998, 10921, 10999, 8529, 7152, 7151, 4017, 11000, 2] */
|
||||
function _fun84164(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:6, offset: 0x01f3cafb, size: 350 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.Keyboard;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = (require(8532) /* metro dependency 8532: EmojiPickerListConstants */).EmojiPickerSource;
|
||||
const env0_7 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {container: {'alignSelf': 'center', 'flexDirection': 'row', 'gap': 8, 'alignItems': 'center',
|
||||
'justifyContent': 'space-between', 'paddingHorizontal': 12, 'paddingVertical': 10, 'width': '100%'}};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object2.divider = {'height': 1, 'backgroundColor': null, 'margin': 0, 'padding': 0, backgroundColor: BORDER_SUBTLE};
|
||||
const object4 = {};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.roundButton = object4;
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MessageNotificationReactBar.tsx');
|
||||
exports.MessageNotificationReactBar = MessageNotificationReactBar;
|
||||
}
|
||||
|
||||
function MessageNotificationReactBar({notification, onReactionPress, animationStyle}) { // fn#84165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:667, offset: 0x01f3cc59, size: 435 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
|
||||
const Math = global.Math;
|
||||
const min = Math.min;
|
||||
const NOTIFICATION_MAX_WIDTH = (require(10994) /* metro dependency 10994: Notification */).NOTIFICATION_MAX_WIDTH;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
const value3 = (require(10998) /* metro dependency 10998: useEmojisForReactionRow */).useEmojisForReactionRow(notification.channel,
|
||||
Reflect.apply(min, Math, [NOTIFICATION_MAX_WIDTH, width - 2 * PX_24]), 48);
|
||||
const binding = env0_3;
|
||||
const value4 = binding.useCallback(_fun84166, [onReactionPress, notification]);
|
||||
var env0_3 = binding.useCallback(_fun84167, [notification, onReactionPress]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [<View style={styles.divider} />];
|
||||
const value = value3.map(_fun84168);
|
||||
const EmojiPickerRowButton = (require(11000) /* metro dependency 11000: EmojiReactionRowButton */).EmojiPickerRowButton;
|
||||
items2[1] = <View style={styles.container}>{value}<EmojiPickerRowButton emojiContainerSize={40} onPress={value4} iconSize="sm" styles={styles.roundButton} /></View>;
|
||||
return (
|
||||
<View2 style={animationStyle}>
|
||||
{items2}
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun84166() { // fn#84166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:919, offset: 0x01f3ce0c, size: 221 bytes, params: 1, frame: 18
|
||||
Keyboard.dismiss();
|
||||
const inAppNotificationUtilsModule = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
|
||||
const trackInAppNotificationAccessoryClicked = inAppNotificationUtilsModule.trackInAppNotificationAccessoryClicked;
|
||||
const notificationBinding = notification;
|
||||
const InAppNotificationAccessoryTypes = (require(10999) /* metro dependency 10999: InAppNotificationTypes */).InAppNotificationAccessoryTypes;
|
||||
const REACTION_PICKER_BUTTON = InAppNotificationAccessoryTypes.REACTION_PICKER_BUTTON;
|
||||
Reflect.apply(trackInAppNotificationAccessoryClicked, inAppNotificationUtilsModule, [notificationBinding,
|
||||
REACTION_PICKER_BUTTON]);
|
||||
const openEmojiPickerActionSheetModule = require(8529) /* metro dependency 8529: openEmojiPickerActionSheet */;
|
||||
const openEmojiPickerActionSheet = openEmojiPickerActionSheetModule.openEmojiPickerActionSheet;
|
||||
const object2 = {};
|
||||
object2.onPressEmoji = onReactionPress;
|
||||
object2.channel = notificationBinding.channel;
|
||||
const REACTION = EmojiIntention.REACTION;
|
||||
object2.pickerIntention = REACTION;
|
||||
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
|
||||
const NORMAL = ReactionTypes.NORMAL;
|
||||
object2.reactionType = NORMAL;
|
||||
const ReactionLocations = (require(7151) /* metro dependency 7151: ReactionActionCreators */).ReactionLocations;
|
||||
const IN_APP_NOTIFICATION = ReactionLocations.IN_APP_NOTIFICATION;
|
||||
object2.analyticsObject = IN_APP_NOTIFICATION;
|
||||
object2.startExpanded = false;
|
||||
const NOTIFICATION = EmojiPickerSource.NOTIFICATION;
|
||||
object2.source = NOTIFICATION;
|
||||
Reflect.apply(openEmojiPickerActionSheet, openEmojiPickerActionSheetModule, [object2]);
|
||||
}
|
||||
|
||||
function _fun84167(a0) { // fn#84167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:1321, offset: 0x01f3cee9, size: 88 bytes, params: 2, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
|
||||
const trackInAppNotificationAccessoryClicked = value.trackInAppNotificationAccessoryClicked;
|
||||
const notificationBinding = notification;
|
||||
const InAppNotificationAccessoryTypes = (require(10999) /* metro dependency 10999: InAppNotificationTypes */).InAppNotificationAccessoryTypes;
|
||||
const REACTION_BUTTON = InAppNotificationAccessoryTypes.REACTION_BUTTON;
|
||||
Reflect.apply(trackInAppNotificationAccessoryClicked, value, [notificationBinding, REACTION_BUTTON]);
|
||||
if (a0 != null) {
|
||||
onReactionPress(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84168(a0, a1) { // fn#84168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11183:1561, offset: 0x01f3cf41, size: 148 bytes, params: 3, frame: 20
|
||||
const value = a0;
|
||||
const EmojiReactionRowButton = (require(11000) /* metro dependency 11000: EmojiReactionRowButton */).EmojiReactionRowButton;
|
||||
const object2 = {'emoji': null, 'onPress': null, 'emojiSize': 20, 'emojiFontSize': 16, 'emojiContainerSize': 40,
|
||||
'emojiLineHeight': 22};
|
||||
const value3 = null;
|
||||
object2.emoji = value3 != value ? value : value3;
|
||||
object2.onPress = onPress_84169;
|
||||
object2.styles = styles.roundButton;
|
||||
const emojiReactionRowButtonModule = require(11000) /* metro dependency 11000: EmojiReactionRowButton */;
|
||||
const getEmojiKey = emojiReactionRowButtonModule.getEmojiKey;
|
||||
return (
|
||||
<EmojiReactionRowButton {...object2} key={Reflect.apply(getEmojiKey, emojiReactionRowButtonModule, [value,
|
||||
a1])} />
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
/* Metro module 10992; source: modules/in_app_notifications/native/MessagePreviewText.tsx; dependencies: [31, 27, 3794, 10963, 33, 4501, 478, 697, 4845, 10975, 4573, 5475, 10965, 10993, 678, 1244, 2] */
|
||||
function _fun84116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:6, offset: 0x01f39a27, size: 760 bytes, params: 8, frame: 26
|
||||
var object7;
|
||||
const env0_0 = require;
|
||||
const closure = SystemMessageText;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const messageRecord = importDefault(3794) /* metro dependency 3794: MessageRecord */;
|
||||
const env0_6 = (require(3794) /* metro dependency 3794: MessageRecord */).MessageSnapshotRecord;
|
||||
const env0_7 = (require(10963) /* metro dependency 10963: InAppNotificationConstants */).IN_APP_NOTIFICATION_MAX_HEIGHT;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
let createStyles = value.createStyles;
|
||||
const object8 = {fontStyle: 'italic'};
|
||||
object8.fontFamily = (require(478) /* metro dependency 478: PlatformUtils */).isIOS() ? 'ggsans-NormalItalic, NotoSans-NormalItalic' : 'ggsans-MediumItalic, NotoSans-MediumItalic';
|
||||
const env0_10 = Reflect.apply(createStyles, value, [{italic: object8}]);
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
createStyles = value.createStyles;
|
||||
object7 = {};
|
||||
const object9 = {};
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object9.paddingTop = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object9.paddingBottom = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object9.paddingRight = PX_8;
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
object9.backgroundColor = BACKGROUND_MOD_SUBTLE;
|
||||
object9.flexDirection = 'row';
|
||||
object9.overflow = 'hidden';
|
||||
object7.embedContainer = object9;
|
||||
const object10 = {width: 4};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object10.marginTop = -PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object10.marginBottom = -PX_8;
|
||||
object10.alignSelf = 'stretch';
|
||||
object7.embedAccentBar = object10;
|
||||
const object11 = {flex: 1};
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object11.gap = PX_4;
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object11.paddingVertical = PX_4;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object11.paddingHorizontal = PX_8;
|
||||
object7.embedTextContainer = object11;
|
||||
const object12 = {'borderRadius': null, 'overflow': 'hidden', 'height': 60};
|
||||
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object12.width = undefined;
|
||||
object7.embedMediaContainer = object12;
|
||||
object7.embedMedia = {'width': '100%', 'height': '100%'};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object7]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MessagePreviewText.tsx');
|
||||
exports.default = MessagePreviewText;
|
||||
exports.SystemMessageText = closure;
|
||||
}
|
||||
|
||||
function NativeMessagePreviewContent({message, lineClamp, maxHeight}) { // fn#84117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:1025, offset: 0x01f39d1f, size: 95 bytes, params: 2, frame: 18
|
||||
const NativeChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).NativeChannelRowPreview;
|
||||
return (
|
||||
<View>
|
||||
<NativeChannelRowPreview
|
||||
message={message}
|
||||
lineClamp={lineClamp}
|
||||
maxHeight={maxHeight}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function SystemMessageText({text}) { // fn#84118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:1193, offset: 0x01f39d7e, size: 139 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
const r6 = (require(478) /* metro dependency 478: PlatformUtils */).isIOS() ? 'text-md/normal' : 'text-md/medium';
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant={r6}
|
||||
color="text-subtle"
|
||||
style={styles.italic}
|
||||
lineClamp={2}
|
||||
>
|
||||
{text}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function EmbedMediaThumbnail({media}) { // fn#84119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:1386, offset: 0x01f39e09, size: 204 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
const r9 = media.proxyURL ?? media.url;
|
||||
const value2 = media.width / media.height;
|
||||
const Number = global.Number;
|
||||
return (
|
||||
<View style={[styles.embedMediaContainer, {aspectRatio: Number.isFinite(value2) && value2 > 0 ? value2 : 1}]}>
|
||||
{((Component) => <Component source={{uri: r9}} style={styles.embedMedia} resizeMode="contain" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function EmbedCard({embed}) { // fn#84120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:1656, offset: 0x01f39ed5, size: 592 bytes, params: 2, frame: 31
|
||||
const styles = useStyles();
|
||||
const name = embed.provider?.name;
|
||||
const name2 = embed.author?.name;
|
||||
const rawTitle = embed.rawTitle;
|
||||
const r9 = embed.thumbnail ?? embed.image;
|
||||
let color = embed.color;
|
||||
if (color != null) {
|
||||
color = embed.color;
|
||||
color = color.toLowerCase() === '#ffffff' ? undefined : embed.color;
|
||||
} else {
|
||||
color = undefined;
|
||||
}
|
||||
const items2 = [color != null && <View style={[styles.embedAccentBar, {backgroundColor: color}]} />];
|
||||
const items3 = [name != null && ((Text) => <Text variant="text-xxs/normal" color="text-subtle" lineClamp={1}>{name}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
|
||||
items3[1] = name2 != null && ((Text) => <Text variant="text-xs/medium" color="text-default" lineClamp={1}>{name2}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
items3[2] = rawTitle != null && ((Text) => <Text variant="text-xs/medium" color="text-link" lineClamp={name == null && name2 == null ? 3 : 1}>{rawTitle}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
items3[3] = embed.rawDescription != null && ((Text) => <Text variant="text-xs/medium" color="text-default" lineClamp={3}>{embed.rawDescription}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
items2[1] = <View style={styles.embedTextContainer}>{items3}</View>;
|
||||
items2[2] = r9 != null && <EmbedMediaThumbnail media={r9} />;
|
||||
return (
|
||||
<View style={styles.embedContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function MessagePreviewText({message, lineClamp, maxHeight}) { // fn#84121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:2523, offset: 0x01f3a125, size: 990 bytes, params: 2, frame: 34
|
||||
var r6;
|
||||
var r3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items2;
|
||||
var property;
|
||||
const value2 = (require(10965) /* metro dependency 10965: usePreviewableMedia */).usePreviewableMedia(message);
|
||||
const {text,
|
||||
secondaryText} = (require(10993) /* metro dependency 10993: usePreviewableMediaText */).usePreviewableMediaText({previewableMedia: value2});
|
||||
const value4 = useGetInitialMessagePreview({message: message});
|
||||
const value5 = env0_3.useMemo(function() {
|
||||
return message.embeds.filter(_fun84127);
|
||||
}, [message.embeds]);
|
||||
let length = value5.length;
|
||||
if (length > 0) {
|
||||
property = value5[0];
|
||||
return property.type !== (require(678) /* metro dependency 678: MessageEmbedTypes */).MessageEmbedTypes.GIFV ? <View><NativeMessagePreviewContent message={value4} lineClamp={2} maxHeight={IN_APP_NOTIFICATION_MAX_HEIGHT} /><EmbedCard embed={property} /></View> : text != null ? <SystemMessageText text={text} /> : <View><NativeMessagePreviewContent message={value4} lineClamp={2} maxHeight={IN_APP_NOTIFICATION_MAX_HEIGHT} /><EmbedCard embed={property} /></View>;
|
||||
}
|
||||
if ((importDefault(4845) /* metro dependency 4845: isForwardMessage */)(message)) {
|
||||
length = message.messageSnapshots.length;
|
||||
r6 = length > 0 && message.messageSnapshots[0].message.content.length > 0;
|
||||
length = value2.length;
|
||||
r3 = length > 0 && value2[0].type === (require(10965) /* metro dependency 10965: usePreviewableMedia */).PreviewableMediaTypes.GIF;
|
||||
length = value2.length;
|
||||
r3 = length > 0 ? r6 ? r3 ? <SystemMessageText text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9ddYKt'])} /> : <NativeMessagePreviewContent message={value4} lineClamp={lineClamp} maxHeight={maxHeight} /> : <SystemMessageText text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9ddYKt'])} /> : <NativeMessagePreviewContent message={value4} lineClamp={lineClamp} maxHeight={maxHeight} />;
|
||||
return r3;
|
||||
}
|
||||
if (message.content.length > 0) {
|
||||
return (
|
||||
<NativeMessagePreviewContent
|
||||
message={value4}
|
||||
lineClamp={lineClamp}
|
||||
maxHeight={maxHeight}
|
||||
/>
|
||||
);
|
||||
}
|
||||
if (value2.length > 0) {
|
||||
if (text !== null) {
|
||||
items2 = [<SystemMessageText text={text} />];
|
||||
items2[1] = secondaryText !== null && ((Text) => <Text variant="redesign/message-preview/medium" color="text-link" lineClamp={2}>{secondaryText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
return (
|
||||
<View>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
if (message.poll != null) {
|
||||
return (
|
||||
<View>
|
||||
<SystemMessageText text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n3shVJ)} />
|
||||
{((Text) => <Text variant="redesign/message-preview/medium" color="text-default" lineClamp={2}>{message.poll.question.text}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<NativeMessagePreviewContent
|
||||
message={message}
|
||||
lineClamp={lineClamp}
|
||||
maxHeight={maxHeight}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function useGetInitialMessagePreview({message}) { // fn#84122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:2712, owner: MessagePreviewText.useGetInitialMessagePreview, offset: 0x01f3a503, size: 49 bytes, params: 2, frame: 14
|
||||
return env1_3.useMemo(_fun84123, [message]);
|
||||
}
|
||||
|
||||
function _fun84126() { // fn#84126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:3120, offset: 0x01f3a64f, size: 34 bytes, params: 1, frame: 11
|
||||
return message.embeds.filter(function(a0) {
|
||||
return a0.image != null || a0.thumbnail != null;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun84123() { // fn#84123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:2780, offset: 0x01f3a534, size: 167 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const messageRecord = new MessageRecord(message);
|
||||
messageRecord.attachments = [];
|
||||
messageRecord.stickerItems = [];
|
||||
if (messageRecord.embeds.length > 0) {
|
||||
messageRecord.embeds = messageRecord.embeds.filter(function(a0) {
|
||||
return a0.image == null && a0.thumbnail == null;
|
||||
});
|
||||
}
|
||||
if ((importDefault(4845) /* metro dependency 4845: isForwardMessage */)(message)) {
|
||||
messageRecord.messageSnapshots = messageRecord.messageSnapshots.map(_fun84125);
|
||||
}
|
||||
return messageRecord;
|
||||
}
|
||||
|
||||
function _fun84125({message}) { // fn#84125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11178:2974, offset: 0x01f3a5f9, size: 86 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
const object2 = {};
|
||||
object2.message = message.merge({attachments: [], embeds: [], stickerItems: []});
|
||||
value = Object.create(MessageSnapshotRecord.prototype, {constructor: {value: MessageSnapshotRecord}});
|
||||
const messageSnapshotRecord = new MessageSnapshotRecord(object2);
|
||||
return messageSnapshotRecord instanceof Object ? messageSnapshotRecord : value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,313 @@
|
||||
/* Metro module 11001; source: modules/in_app_notifications/native/MessageReplyInput.tsx; dependencies: [5, 57, 31, 27, 1379, 1881, 33, 4501, 697, 1357, 4017, 4504, 11002, 5463, 4634, 4805, 6992, 10921, 10999, 4081, 7076, 7067, 8529, 11208, 8341, 11209, 1244, 6995, 7950, 4058, 2] */
|
||||
function _fun84182(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:6, offset: 0x01f3d798, size: 802 bytes, params: 8, frame: 24
|
||||
var object5;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.Keyboard;
|
||||
const env0_7 = value.View;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_9 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object5 = {};
|
||||
const object8 = {'flexDirection': 'column', 'gap': 0, 'backgroundColor': null, 'padding': 0};
|
||||
const MOBILE_ALERT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ALERT_BACKGROUND_DEFAULT;
|
||||
object8.backgroundColor = MOBILE_ALERT_BACKGROUND_DEFAULT;
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object8.marginHorizontal = PX_12;
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object8.marginBottom = PX_4;
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object8.overflow = 'hidden';
|
||||
object5.inputContainer = object8;
|
||||
object5.iconsContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
|
||||
const object9 = {'flex': 1, 'borderRadius': null, 'border': 0};
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object9.color = TEXT_DEFAULT;
|
||||
object5.input = object9;
|
||||
const object10 = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 8};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object10.paddingHorizontal = PX_12;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object10.paddingVertical = PX_12;
|
||||
object5.inputRow = object10;
|
||||
const INPUT_PLACEHOLDER_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_PLACEHOLDER_TEXT_DEFAULT;
|
||||
object5.placeholderText = {color: INPUT_PLACEHOLDER_TEXT_DEFAULT};
|
||||
const object11 = {'justifyContent': 'center', 'alignContent': 'center'};
|
||||
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
||||
object11.backgroundColor = BACKGROUND_MOD_STRONG;
|
||||
object11.borderBottomWidth = StyleSheet.hairlineWidth;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object11.borderBottomColor = BORDER_MUTED;
|
||||
object11.overflow = 'hidden';
|
||||
object5.replyBarContainer = object11;
|
||||
const object12 = {};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object12.paddingLeft = PX_12;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object12.paddingRight = PX_8;
|
||||
object5.replyBarNoRedesign = object12;
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object5.replyBarRedesign = {paddingLeft: PX_4};
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object5]);
|
||||
object5 = {code: 'function MessageReplyInputTsx1(){const{interpolate,sv,REPLY_BAR_HEIGHT}=this.__closure;return{height:interpolate(sv.get(),[0,1],[0,REPLY_BAR_HEIGHT]),opacity:sv.get()};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/MessageReplyInput.tsx');
|
||||
exports.MessageReplyInput = MessageReplyInput;
|
||||
}
|
||||
|
||||
function AnimatedChatInputReplyBar({replying, pendingReply, pendingReplyAuthor, onToggleReplyMention}) { // fn#84183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:1384, offset: 0x01f3daba, size: 391 bytes, params: 2, frame: 25
|
||||
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
|
||||
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
|
||||
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
|
||||
[{location: 'MessageReplyInput'}]).chatInputFloating;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
env0_5.useEffect(_fun84184, [replying, value2]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = AnimatedChatInputReplyBarY;
|
||||
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, sv: value2, REPLY_BAR_HEIGHT: 40};
|
||||
closure.__workletHash = 878601267127;
|
||||
closure.__initData = env0_13;
|
||||
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.replyBarContainer];
|
||||
items2[1] = chatInputFloating ? styles.replyBarRedesign : styles.replyBarNoRedesign;
|
||||
items2[2] = value3;
|
||||
const ChatInputReplyBar = (require(11002) /* metro dependency 11002: ChatInputContextBar */).ChatInputReplyBar;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<ChatInputReplyBar
|
||||
pendingReply={pendingReply}
|
||||
pendingReplyAuthor={pendingReplyAuthor}
|
||||
onToggleReplyMention={onToggleReplyMention}
|
||||
chatInputFloatingOverride
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function MessageReplyInput({notification, onMessageSent}) { // fn#84186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2309, offset: 0x01f3dcf9, size: 1395 bytes, params: 2, frame: 41
|
||||
let binding = env0_5;
|
||||
const value2 = binding.useRef(null);
|
||||
binding = env0_5;
|
||||
let useState = binding.useState;
|
||||
const value3 = Reflect.apply(useState, binding, ['']);
|
||||
binding = env0_4;
|
||||
const value5 = binding(value3, 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
const binding2 = env0_5;
|
||||
useState = binding2.useState;
|
||||
const value6 = binding(Reflect.apply(useState, binding2, [false]), 2);
|
||||
const property3 = value6[0];
|
||||
var env0_5 = property3;
|
||||
const env0_6 = value6[1];
|
||||
const binding3 = env0_5;
|
||||
useState = binding3.useState;
|
||||
const value7 = binding(Reflect.apply(useState, binding3, [false]), 2);
|
||||
const property4 = value7[0];
|
||||
const env0_8 = value7[1];
|
||||
const binding4 = env0_5;
|
||||
useState = binding4.useState;
|
||||
const value8 = binding(Reflect.apply(useState, binding4, [true]), 2);
|
||||
const property5 = value8[0];
|
||||
const env0_10 = value8[1];
|
||||
const styles = useStyles();
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
|
||||
const message = notification.message;
|
||||
const channel = notification.channel;
|
||||
const value9 = (require(4634) /* metro dependency 4634: useMessageAuthor */).useNullableMessageAuthor(message);
|
||||
const value10 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true);
|
||||
const value11 = (require(6992) /* metro dependency 6992: InputFieldContainerNative */).useInputStyles({});
|
||||
const value12 = env0_5.useMemo(_fun84187, [property5, channel, message]);
|
||||
env0_5.useLayoutEffect(_fun84188, []);
|
||||
const env0_14 = env0_5.useCallback(_fun84189(), [property, onMessageSent, value12, property4, property3]);
|
||||
const value14 = env0_5.useCallback(_fun84193, [notification.channel, notification.guild?.id]);
|
||||
const object = {};
|
||||
object.paddingBottom = insets.bottom;
|
||||
const animatedChatInputReplyBar = <AnimatedChatInputReplyBar replying={property4} pendingReply={value12} pendingReplyAuthor={value9} onToggleReplyMention={onToggleReplyMention} />;
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const iconButtonProps = {variant: property4 ? 'secondary' : 'icon-only', size: 'sm'};
|
||||
const ArrowAngleLeftUpIcon = (require(11209) /* metro dependency 11209: ArrowAngleLeftUpIcon */).ArrowAngleLeftUpIcon;
|
||||
let CHAT_INPUT_ICON_DEFAULT_TINT = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_INPUT_ICON_DEFAULT_TINT;
|
||||
iconButtonProps.icon = <ArrowAngleLeftUpIcon size="sm" color={CHAT_INPUT_ICON_DEFAULT_TINT} />;
|
||||
iconButtonProps.onPress = onPress_84197;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
iconButtonProps.accessibilityLabel = Reflect.apply(string, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t['5IEsGx']]);
|
||||
const items2 = [<IconButton {...iconButtonProps} />];
|
||||
const NativeTextInput = (require(6995) /* metro dependency 6995: NativeTextInputNative */).NativeTextInput;
|
||||
items2[1] = <NativeTextInput ref={value2} style={[styles.input,
|
||||
value11.text]} placeholderTextColor={styles.placeholderText.color} placeholder={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['8lzR/R'],
|
||||
{channel: value10})} autoFocus value={property} onChangeText={property2} />;
|
||||
const ReactionIcon = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
|
||||
CHAT_INPUT_ICON_DEFAULT_TINT = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_INPUT_ICON_DEFAULT_TINT;
|
||||
const iconButton = <IconButton variant="icon-only" size="sm" icon={<ReactionIcon size="sm" color={CHAT_INPUT_ICON_DEFAULT_TINT} />} onPress={value14} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sMOuuS)} />;
|
||||
string = intl.string;
|
||||
const TXNS7S = (require(1244) /* metro dependency 1244: indexNative */).t.TXNS7S;
|
||||
const SendMessageIcon = (require(4058) /* metro dependency 4058: SendMessageIcon */).SendMessageIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
items2[2] = <View style={styles.iconsContainer}>{iconButton}<IconButton variant="primary" size="sm" accessibilityLabel={Reflect.apply(string,
|
||||
intl,
|
||||
[TXNS7S])} icon={<SendMessageIcon size="sm" color={WHITE} />} onPress={onPress_84198} loading={property3} /></View>;
|
||||
return (
|
||||
<View style={object}>
|
||||
<View style={styles.inputContainer}>
|
||||
{animatedChatInputReplyBar}
|
||||
<View style={styles.inputRow}>
|
||||
{items2}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun84184() { // fn#84184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:1633, offset: 0x01f3dc41, size: 89 bytes, params: 1, frame: 17
|
||||
const replyingBinding = replying;
|
||||
const binding = env0_1;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = value.withTiming;
|
||||
const object2 = {duration: 150};
|
||||
if (replyingBinding) {
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, object2])]);
|
||||
} else {
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [0, object2])]);
|
||||
}
|
||||
}
|
||||
|
||||
function AnimatedChatInputReplyBarY() { // fn#84185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:1777, owner: AnimatedChatInputReplyBar.y, offset: 0x01f3dc9a, size: 95 bytes, params: 1, frame: 17
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = value.interpolate;
|
||||
const binding = env0_1;
|
||||
object2.height = Reflect.apply(interpolate, value, [binding.get(), [0, 1], [0, 40]]);
|
||||
object2.opacity = binding.get();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun84187() { // fn#84187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2728, offset: 0x01f3e26c, size: 50 bytes, params: 1, frame: 11
|
||||
const channelBinding = channel;
|
||||
return {shouldMention: env0_9, showMentionToggle: !channelBinding.isPrivate(), channel: channelBinding,
|
||||
message: message};
|
||||
}
|
||||
|
||||
function _fun84188() { // fn#84188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2834, offset: 0x01f3e29e, size: 32 bytes, params: 1, frame: 9
|
||||
const current = env0_2.current;
|
||||
if (current != null) {
|
||||
current.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84189() { // fn#84189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2902, offset: 0x01f3e2be, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_3(_fun84191);
|
||||
return _fun84192;
|
||||
}
|
||||
|
||||
function _fun84193() { // fn#84193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3444, offset: 0x01f3e46e, size: 159 bytes, params: 1, frame: 17
|
||||
Keyboard.dismiss();
|
||||
const value2 = undefined;
|
||||
const openEmojiPickerActionSheetModule = require(8529) /* metro dependency 8529: openEmojiPickerActionSheet */;
|
||||
const openEmojiPickerActionSheet = openEmojiPickerActionSheetModule.openEmojiPickerActionSheet;
|
||||
const CHAT = EmojiIntention.CHAT;
|
||||
const channel = notification.channel;
|
||||
const guild = notification.guild;
|
||||
Reflect.apply(openEmojiPickerActionSheet, openEmojiPickerActionSheetModule, [{onPressEmoji: onPressEmoji_84194,
|
||||
pickerIntention: CHAT, channel: channel ?? value2, guildId: (guild == null ? value2 : guild.id) ?? value2,
|
||||
startExpanded: false}]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function onToggleReplyMention() { // fn#84196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3965, owner: MessageReplyInput.onToggleReplyMention, offset: 0x01f3e58c, size: 23 bytes, params: 1, frame: 11
|
||||
return env0_10(!env0_9);
|
||||
}
|
||||
|
||||
function MessageReplyInputOnPress() { // fn#84197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:4184, owner: MessageReplyInput.onPress, offset: 0x01f3e5a3, size: 86 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
value = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
|
||||
const trackInAppNotificationAccessoryClicked = value.trackInAppNotificationAccessoryClicked;
|
||||
const notificationBinding = notification;
|
||||
const InAppNotificationAccessoryTypes = (require(10999) /* metro dependency 10999: InAppNotificationTypes */).InAppNotificationAccessoryTypes;
|
||||
const REPLY_TOGGLE = InAppNotificationAccessoryTypes.REPLY_TOGGLE;
|
||||
Reflect.apply(trackInAppNotificationAccessoryClicked, value, [notificationBinding, REPLY_TOGGLE]);
|
||||
env0_8(!env0_7);
|
||||
}
|
||||
|
||||
function MessageReplyInputOnPress_84198() { // fn#84198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:5029, owner: MessageReplyInput.onPress, offset: 0x01f3e5f9, size: 20 bytes, params: 1, frame: 11
|
||||
return env0_14(notification);
|
||||
}
|
||||
|
||||
function* _fun84191(a0) { // fn#84191, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:2922, offset: 0x01f3e2ed, size: 385 bytes, params: 2, frame: 23
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
if (env2_5 !== true) {
|
||||
var id = a0.channel.id;
|
||||
if (env2_3.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
if (id == null) {
|
||||
return undefined;
|
||||
}
|
||||
var binding = env3_0;
|
||||
var binding2 = env3_2;
|
||||
var value4 = binding(binding2[17]);
|
||||
var trackInAppNotificationAccessoryClicked = value4.trackInAppNotificationAccessoryClicked;
|
||||
var InAppNotificationAccessoryTypes = binding(binding2[18]).InAppNotificationAccessoryTypes;
|
||||
var SEND_MESSAGE_BUTTON = InAppNotificationAccessoryTypes.SEND_MESSAGE_BUTTON;
|
||||
Reflect.apply(trackInAppNotificationAccessoryClicked, value4, [a0, SEND_MESSAGE_BUTTON]);
|
||||
Keyboard(true);
|
||||
var value5 = binding(binding2[19]);
|
||||
var triggerHapticFeedback = value5.triggerHapticFeedback;
|
||||
var HapticFeedbackTypes = binding(binding2[19]).HapticFeedbackTypes;
|
||||
var IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
|
||||
Reflect.apply(triggerHapticFeedback, value5, [IMPACT_MEDIUM]);
|
||||
binding = env3_1;
|
||||
var value6 = binding(binding2[20]);
|
||||
var value8 = value6.parse(env3_8.getChannel(id), env2_3);
|
||||
var value9 = binding(binding2[21]);
|
||||
var sendMessage = value9.sendMessage;
|
||||
var object2 = {};
|
||||
copyDataProperties(object2, View ? env3_1(env3_2[21]).getSendMessageOptionsForReply(env2_13) : {},
|
||||
undefined);
|
||||
object2['location'] = 'InAppNotification';
|
||||
yield Reflect.apply(sendMessage, value9, [id, value8, false, object2]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
importDefault();
|
||||
Keyboard(false);
|
||||
env2_4('');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onPressEmoji_84194(a0) { // fn#84194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3521, offset: 0x01f3e50d, size: 85 bytes, params: 2, frame: 12
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const env0_0 = (importDefault(11208) /* metro dependency 11208: getEmojiText */)(a0);
|
||||
value = environment.__proto__;
|
||||
env1_4(_fun84195);
|
||||
const current = env1_2.current;
|
||||
if (current != null) {
|
||||
current.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84195(a0) { // fn#84195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11187:3548, offset: 0x01f3e562, size: 42 bytes, params: 2, frame: 15
|
||||
return '' + a0 + ' ' + env0_0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,408 @@
|
||||
/* Metro module 10994; source: modules/in_app_notifications/native/Notification.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4559, 4017, 10995, 7013, 1365, 4504, 4573, 1244, 7684, 10996, 4577, 10974, 5278, 2] */
|
||||
function _fun84132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:6, offset: 0x01f3ab67, size: 1289 bytes, params: 8, frame: 28
|
||||
var object4;
|
||||
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 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.Pressable;
|
||||
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;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {};
|
||||
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
|
||||
copyDataProperties(object5, SHADOW_HIGH, undefined);
|
||||
const MOBILE_ALERT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ALERT_BACKGROUND_DEFAULT;
|
||||
object5['backgroundColor'] = MOBILE_ALERT_BACKGROUND_DEFAULT;
|
||||
object5['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object5['maxWidth'] = 480;
|
||||
object5['width'] = '100%';
|
||||
object5['alignSelf'] = 'center';
|
||||
object4.shadow = object5;
|
||||
const object7 = {};
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object7.borderWidth = 1;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object7.borderColor = BORDER_SUBTLE;
|
||||
object7.overflow = 'hidden';
|
||||
object4.container = object7;
|
||||
object4.body = {flex: 1};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.iconContainer = {marginRight: PX_12};
|
||||
const object8 = {};
|
||||
let YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
|
||||
object8.backgroundColor = YELLOW_300;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.paddingHorizontal = PX_16;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object8.paddingVertical = PX_8;
|
||||
object8.flexDirection = 'row';
|
||||
object8.alignItems = 'center';
|
||||
object4.alertContainer = object8;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.contentContainer = {padding: PX_12, flexDirection: 'row'};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.contentContainerExpanded = {'padding': null, 'paddingBottom': 0, 'flexDirection': 'row', padding: PX_12};
|
||||
object4.headerContainer = {flex: 1};
|
||||
object4.labelContainer = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object4.warningIcon = {'width': 12, 'height': 12, marginRight: PX_4};
|
||||
const object9 = {};
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
let BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object9.backgroundColor = BACKGROUND_BRAND;
|
||||
object9.height = 4;
|
||||
object4.progress = object9;
|
||||
const object10 = {};
|
||||
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object10.height = 8;
|
||||
object4.progressRedesign = object10;
|
||||
BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object4.progressBarBrand = {backgroundColor: BACKGROUND_BRAND};
|
||||
YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
|
||||
object4.progressBarWarning = {backgroundColor: YELLOW_300};
|
||||
const object13 = {'width': '100%', 'borderRadius': null, 'backgroundColor': null, 'height': 8, 'overflow': 'hidden'};
|
||||
object13.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
object13.backgroundColor = BACKGROUND_MOD_SUBTLE;
|
||||
object4.progressTrack = object13;
|
||||
object4.progressContainerTop = {'position': 'absolute', 'top': -5, 'left': 16, 'right': 16};
|
||||
object4.progressContainerBottom = {'width': '100%', 'position': 'absolute', 'bottom': -1};
|
||||
object4.dragHandleTextContainer = {overflow: 'hidden'};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object4.dragHandleText = {'position': 'absolute', 'left': 0, 'right': 0, 'textAlign': 'center', paddingBottom: PX_4};
|
||||
const object14 = {'width': 32, 'height': 4, 'alignSelf': 'center'};
|
||||
const BACKGROUND_ACCENT = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_ACCENT;
|
||||
object14.backgroundColor = BACKGROUND_ACCENT;
|
||||
object14.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object14.marginBottom = PX_8;
|
||||
object4.dragHandle = object14;
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object4]);
|
||||
object4 = {code: 'function NotificationTsx1(){const{textRevealProgress,interpolate,textHeight}=this.__closure;return{opacity:textRevealProgress.get(),height:interpolate(textRevealProgress.get(),[0,1],[0,textHeight])};}'};
|
||||
object4 = {code: 'function NotificationTsx2(){const{dragHandleBounceProgress}=this.__closure;return{transform:[{translateY:dragHandleBounceProgress.get()}]};}'};
|
||||
object4 = {code: "function NotificationTsx3(){const{percent,width}=this.__closure;const percentRemaining=(typeof percent==='number'?percent:percent.get())/100;return{transform:[{translateX:-width+width*percentRemaining}]};}"};
|
||||
const env0_14 = {'mass': 1, 'overshootClamping': true, 'damping': 27, 'stiffness': 300};
|
||||
object4 = {code: 'function NotificationTsx4(){const{withSpring,scale,ON_PRESS_SPRING_CONFIG}=this.__closure;return{transform:[{scale:withSpring(scale.get(),ON_PRESS_SPRING_CONFIG)}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/Notification.tsx');
|
||||
exports.NOTIFICATION_MAX_WIDTH = 480;
|
||||
exports.Notification = Notification;
|
||||
exports.NotificationPressable = NotificationPressable;
|
||||
}
|
||||
|
||||
function DragHandle({onAccessibilityExpand}) { // fn#84133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:2300, offset: 0x01f3b070, size: 982 bytes, params: 2, frame: 33
|
||||
var object2;
|
||||
var r0;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
let binding = env0_4;
|
||||
const [property, env0_3] = env0_3Binding(binding.useState(0), 2);
|
||||
const property2 = env0_3Binding(env0_4.useState(function() {
|
||||
var Date = global.Date;
|
||||
return Date.now();
|
||||
}), 1)[0];
|
||||
var env0_4 = property2;
|
||||
const value8 = env0_4.useMemo(_fun84135, [property2]);
|
||||
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
|
||||
const useSelectedDismissibleContent = useSelectedDismissibleContentModule.useSelectedDismissibleContent;
|
||||
const property3 = env0_3Binding(Reflect.apply(useSelectedDismissibleContent, useSelectedDismissibleContentModule,
|
||||
[value8 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.IN_APP_NOTIFICATION_EXPAND_NUX] : [],
|
||||
undefined, true]), 1)[0];
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const IN_APP_NOTIFICATION_EXPAND_NUX = DismissibleContent.IN_APP_NOTIFICATION_EXPAND_NUX;
|
||||
const value10 = property3 === IN_APP_NOTIFICATION_EXPAND_NUX;
|
||||
binding = env0_4;
|
||||
let closure = _fun84136;
|
||||
const value11 = binding.useCallback(closure, []);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
closure = DragHandleC;
|
||||
object2 = {textRevealProgress: value4};
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
object2.textHeight = property;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 10231400867129;
|
||||
closure.__initData = env0_11;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue6.useAnimatedStyle;
|
||||
closure = DragHandleN;
|
||||
closure.__closure = {dragHandleBounceProgress: value3};
|
||||
closure.__workletHash = 6749008409731;
|
||||
closure.__initData = env0_12;
|
||||
const value13 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
|
||||
env0_4.useEffect(_fun84140, [value10, value4, value3]);
|
||||
const r5 = value10 ? <>{((View) => <View style={[styles.dragHandleTextContainer,
|
||||
value12]}>{((Text) => <Text onLayout={value11} variant="text-xs/normal" color="text-subtle" style={styles.dragHandleText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['vos6/N'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}{((View) => <View style={[styles.dragHandle,
|
||||
value13]} />)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}</> : <View style={styles.dragHandle} />;
|
||||
if (value2) {
|
||||
if (onAccessibilityExpand == null) {
|
||||
r0 = r5;
|
||||
} else {
|
||||
r0 = <Pressable onPress={onAccessibilityExpand} accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['PbxI/x'])}>{r5}</Pressable>;
|
||||
}
|
||||
} else {
|
||||
r0 = r5;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useProgressAnimation(a0) { // fn#84142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:4501, offset: 0x01f3b70a, size: 183 bytes, params: 2, frame: 19
|
||||
const env0_0 = a0;
|
||||
let binding = env0_4;
|
||||
const [property, env0_2] = env0_3(binding.useState(0), 2);
|
||||
binding = env0_4;
|
||||
let closure = _fun84143;
|
||||
const value4 = binding.useCallback(closure, []);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
closure = useProgressAnimationS;
|
||||
closure.__closure = {percent: a0, width: property};
|
||||
closure.__workletHash = 11469178060403;
|
||||
closure.__initData = env0_13;
|
||||
return {animatedStyles: Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]), handleLayout: value4};
|
||||
}
|
||||
|
||||
function Progress({percent, hideProgress}) { // fn#84145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:4881, offset: 0x01f3b834, size: 171 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const {animatedStyles, handleLayout} = useProgressAnimation(percent);
|
||||
const items2 = [styles.progressContainerBottom];
|
||||
items2[1] = {opacity: hideProgress ? 0 : 1};
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View onLayout={handleLayout} style={items2}>
|
||||
<View2 style={[styles.progress, animatedStyles]} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function RedesignProgress({percent, hideProgress, type}) { // fn#84146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:5122, offset: 0x01f3b8df, size: 232 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
const {animatedStyles, handleLayout} = useProgressAnimation(percent);
|
||||
const items2 = [styles.progressContainerTop];
|
||||
items2[1] = {opacity: hideProgress ? 0 : 1};
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View onLayout={handleLayout} style={items2}>
|
||||
<View style={styles.progressTrack}>
|
||||
<View2
|
||||
style={[styles.progressRedesign,
|
||||
type === 'ALERT' ? styles.progressBarWarning : styles.progressBarBrand, animatedStyles]}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function Notification({icon, textChildren, children, alertLabel, accessoryLabelNode, rightAccessory, header, showDragHandle, onAccessibilityExpand, bodyStyle, expandedContentVisible}) { // fn#84147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:5843, offset: 0x01f3b9c7, size: 738 bytes, params: 2, frame: 41
|
||||
showDragHandle = !(showDragHandle === undefined) && showDragHandle;
|
||||
expandedContentVisible = !(expandedContentVisible === undefined) && expandedContentVisible;
|
||||
const styles = useStyles();
|
||||
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
const r8 = alertLabel != null ? <View style={styles.alertContainer}>{((CircleErrorIcon) => <CircleErrorIcon style={styles.warningIcon} color="black" />)((require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon)}{((Text) => <Text variant="text-xs/bold" color="black">{alertLabel.toUpperCase()}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View> : null;
|
||||
const r12 = expandedContentVisible ? styles.contentContainerExpanded : styles.contentContainer;
|
||||
const r14 = icon != null ? <View style={styles.iconContainer}>{icon}</View> : null;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<>
|
||||
{r8}
|
||||
<View style={r12}>
|
||||
{r14}
|
||||
<View2 style={[styles.body, bodyStyle]}>
|
||||
<View style={styles.labelContainer}>
|
||||
{accessoryLabelNode ?? null}
|
||||
<View style={styles.headerContainer}>
|
||||
{header.type === 'message' ? ((Component) => <Component {...header} />)(importDefault(10996) /* metro dependency 10996: MessageNotificationHeader */) : ((SimpleNotificationHeader) => <SimpleNotificationHeader {...header} />)((require(10996) /* metro dependency 10996: MessageNotificationHeader */).SimpleNotificationHeader)}
|
||||
</View>
|
||||
</View>
|
||||
{children ?? ((Text) => <Text variant="redesign/message-preview/medium" color="text-subtle" lineClamp={2}>{textChildren}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
|
||||
</View2>
|
||||
{rightAccessory}
|
||||
</View>
|
||||
{showDragHandle ? <DragHandle onAccessibilityExpand={onAccessibilityExpand} /> : null}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function NotificationPressable(a0) { // fn#84148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:6816, offset: 0x01f3bca9, size: 625 bytes, params: 2, frame: 34
|
||||
const onPress = a0.onPress;
|
||||
const onLongPress = a0.onLongPress;
|
||||
const children = a0.children;
|
||||
const percent = a0.percent;
|
||||
const hideProgress = a0.hideProgress;
|
||||
const type = a0.type;
|
||||
const isExpandableNotification = a0.isExpandableNotification;
|
||||
const object3 = {'onPress': 0, 'onLongPress': 0, 'children': 0, 'percent': 0, 'hideProgress': 0, 'type': 0,
|
||||
'isExpandableNotification': 0};
|
||||
const value = null;
|
||||
silentSetPrototypeOf(object3, value, undefined);
|
||||
const value2 = copyDataProperties({}, a0, object3, undefined);
|
||||
const styles = useStyles();
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(1);
|
||||
const value5 = env0_4.useCallback(_fun84149, [value4]);
|
||||
const value6 = env0_4.useCallback(_fun84150, [value4]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = NotificationPressableN;
|
||||
const object4 = {};
|
||||
object4.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object4.scale = value4;
|
||||
object4.ON_PRESS_SPRING_CONFIG = env0_14;
|
||||
closure.__closure = object4;
|
||||
closure.__workletHash = 13836553588367;
|
||||
closure.__initData = env0_15;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const inAppNotificationExpandExperimentModule = require(10974) /* metro dependency 10974: InAppNotificationExpandExperiment */;
|
||||
const useCanExpandInAppNotification = inAppNotificationExpandExperimentModule.useCanExpandInAppNotification;
|
||||
const canExpand = Reflect.apply(useCanExpandInAppNotification, inAppNotificationExpandExperimentModule,
|
||||
['NotificationPressable']).canExpand;
|
||||
const value8 = env0_4.useMemo(function() {
|
||||
return {foreground: true};
|
||||
}, []);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items3 = [styles.shadow];
|
||||
items3[1] = isExpandableNotification ? value : value7;
|
||||
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
return (
|
||||
<View style={items3}>
|
||||
<PressableHighlight
|
||||
{...value2}
|
||||
{...{['style']: styles.container}}
|
||||
{...{['androidRippleConfig']: value8}}
|
||||
{...{['onPress']: onPress}}
|
||||
{...{['onPressIn']: value5}}
|
||||
{...{['onPressOut']: value6}}
|
||||
{...{['onLongPress']: onLongPress}}
|
||||
{...{['accessibilityRole']: 'button'}}
|
||||
>
|
||||
{children}
|
||||
{value != percent ? canExpand ? <RedesignProgress percent={percent} hideProgress={hideProgress} type={type} /> : <Progress percent={percent} hideProgress={hideProgress} /> : value}
|
||||
</PressableHighlight>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun84135() { // fn#84135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:2549, offset: 0x01f3b446, size: 113 bytes, params: 1, frame: 15
|
||||
const expandNUXState = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).getExpandNUXState();
|
||||
const numTimesShown = expandNUXState.numTimesShown;
|
||||
const MAX_TIMES_SHOWN = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).MAX_TIMES_SHOWN;
|
||||
if (numTimesShown >= MAX_TIMES_SHOWN) {
|
||||
return false;
|
||||
}
|
||||
const value4 = env0_4 - expandNUXState.lastShownAtMs;
|
||||
const ONE_DAY_MS = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).ONE_DAY_MS;
|
||||
return !(value4 < ONE_DAY_MS);
|
||||
}
|
||||
|
||||
function _fun84136({nativeEvent}) { // fn#84136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:2909, offset: 0x01f3b4b7, size: 49 bytes, params: 2, frame: 11
|
||||
const env0_0 = nativeEvent.layout.height;
|
||||
env0_3(function(a0) {
|
||||
var value = a0;
|
||||
return value === height ? value : height;
|
||||
});
|
||||
}
|
||||
|
||||
function DragHandleC() { // fn#84138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:3002, owner: DragHandle.c, offset: 0x01f3b4fc, size: 103 bytes, params: 1, frame: 16
|
||||
const object2 = {};
|
||||
const binding = env0_1;
|
||||
object2.opacity = binding.get();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
object2.height = reanimatedRexportModule.interpolate(binding.get(), [0, 1], [0, env0_2]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function DragHandleN() { // fn#84139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:3233, owner: DragHandle.N, offset: 0x01f3b563, size: 39 bytes, params: 1, frame: 11
|
||||
const object = {};
|
||||
object.translateY = env0_0.get();
|
||||
return {transform: [object]};
|
||||
}
|
||||
|
||||
function _fun84140() { // fn#84140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:3376, offset: 0x01f3b58a, size: 315 bytes, params: 1, frame: 26
|
||||
var environment;
|
||||
var value2;
|
||||
var binding;
|
||||
var set;
|
||||
var moduleValue2;
|
||||
var withDelay;
|
||||
const NUX_REVEAL_DELAY_MS = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).NUX_REVEAL_DELAY_MS;
|
||||
var moduleValue3;
|
||||
var withTiming;
|
||||
var object2;
|
||||
const NUX_REVEAL_DURATION_MS = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).NUX_REVEAL_DURATION_MS;
|
||||
var value3;
|
||||
var moduleValue4;
|
||||
var withRepeat;
|
||||
var moduleValue5;
|
||||
var DRAG_HANDLE_BOUNCE_DISTANCE;
|
||||
var value;
|
||||
if (env0_5) {
|
||||
value2 = environment.__proto__;
|
||||
(require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).markExpandNUXStateAsShown();
|
||||
binding = env0_1;
|
||||
set = binding.set;
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withDelay = moduleValue2.withDelay;
|
||||
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue3.withTiming;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue2, [NUX_REVEAL_DELAY_MS,
|
||||
Reflect.apply(withTiming,
|
||||
moduleValue3, [1, {duration: NUX_REVEAL_DURATION_MS}])])]);
|
||||
binding = env0_0;
|
||||
set = binding.set;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withDelay = value.withDelay;
|
||||
value3 = NUX_REVEAL_DELAY_MS + NUX_REVEAL_DURATION_MS;
|
||||
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withRepeat = moduleValue4.withRepeat;
|
||||
moduleValue5 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue5.withTiming;
|
||||
DRAG_HANDLE_BOUNCE_DISTANCE = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).DRAG_HANDLE_BOUNCE_DISTANCE;
|
||||
object2 = {};
|
||||
object2.duration = (require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).DRAG_HANDLE_BOUNCE_DURATION_MS;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [value3, Reflect.apply(withRepeat, moduleValue4,
|
||||
[Reflect.apply(withTiming, moduleValue5, [DRAG_HANDLE_BOUNCE_DISTANCE, object2]), -1, true])])]);
|
||||
return _fun84141;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84143({nativeEvent}) { // fn#84143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:4596, offset: 0x01f3b7c1, size: 36 bytes, params: 2, frame: 11
|
||||
return env0_2(nativeEvent.layout.width);
|
||||
}
|
||||
|
||||
function useProgressAnimationS() { // fn#84144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:4693, owner: useProgressAnimation.s, offset: 0x01f3b7e5, size: 79 bytes, params: 1, frame: 11
|
||||
const value3 = (typeof env0_0 === 'number' ? env0_0 : env0_0.get()) / 100;
|
||||
const binding = env0_1;
|
||||
return {transform: [{translateX: binding * value3 - binding}]};
|
||||
}
|
||||
|
||||
function _fun84149() { // fn#84149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:7006, offset: 0x01f3bf1a, size: 29 bytes, params: 1, frame: 11
|
||||
return env0_0.set(0.95);
|
||||
}
|
||||
|
||||
function _fun84150() { // fn#84150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:7044, offset: 0x01f3bf37, size: 22 bytes, params: 1, frame: 11
|
||||
return env0_0.set(1);
|
||||
}
|
||||
|
||||
function NotificationPressableN() { // fn#84151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:7094, owner: NotificationPressable.N, offset: 0x01f3bf4d, size: 79 bytes, params: 1, frame: 16
|
||||
const object = {};
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
object.scale = springModule.withSpring(env0_0.get(), env1_14);
|
||||
return {transform: [object]};
|
||||
}
|
||||
|
||||
function _fun84141() { // fn#84141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11180:3766, offset: 0x01f3b6c5, size: 69 bytes, params: 1, frame: 16
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_1);
|
||||
(require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,286 @@
|
||||
/* Metro module 11229; source: modules/in_app_notifications/native/ReactionNotification.tsx; dependencies: [31, 27, 4502, 3793, 1878, 10963, 661, 33, 1305, 4501, 478, 697, 8765, 6819, 3829, 10921, 10973, 4573, 1423, 11230, 6739, 22, 4634, 566, 4805, 1244, 10975, 10994, 2] */
|
||||
function _fun85832(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:6, offset: 0x01f7d46f, size: 654 bytes, params: 8, frame: 29
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = 0;
|
||||
const value2 = undefined;
|
||||
const env0_3 = importAll(dependencyMap[value]);
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const value3 = 4;
|
||||
const env0_7 = importDefault(dependencyMap[value3]);
|
||||
const env0_8 = (require(10963) /* metro dependency 10963: InAppNotificationConstants */).IN_APP_NOTIFICATION_MAX_HEIGHT;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value4.jsx;
|
||||
const env0_11 = value4.Fragment;
|
||||
const env0_12 = value4.jsxs;
|
||||
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const NORMAL = AvatarSizes.NORMAL;
|
||||
const property = AVATAR_SIZE_MAP[NORMAL];
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
let createStyles = createStylesModule.createStyles;
|
||||
object2 = {newContainerRoleDot: {'paddingRight': 4, 'paddingTop': 0}};
|
||||
object2.container = {flexDirection: 'column'};
|
||||
object2.textEmoji = {fontSize: 12};
|
||||
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
object2.imageEmoji = {'height': 16, 'width': 16,
|
||||
transform: platformUtilsModule.isIOS() ? value2 : [{translateY: 2}]};
|
||||
const value7 = platformUtilsModule;
|
||||
object2.notificationBodyText = {marginBottom: value7.isIOS() ? value3 : value};
|
||||
value = platformUtilsModule;
|
||||
value = value.isIOS();
|
||||
object2.italic = {fontStyle: 'italic',
|
||||
fontFamily: value ? 'ggsans-NormalItalic, NotoSans-NormalItalic' : 'ggsans-MediumItalic, NotoSans-MediumItalic'};
|
||||
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = createStylesModule;
|
||||
createStyles = value.createStyles;
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
const env0_14 = Reflect.apply(createStyles, value, [{clydeNotificationIcon: {'backgroundColor': null,
|
||||
'justifyContent': 'center', 'alignItems': 'center', backgroundColor: BACKGROUND_BRAND, width: property,
|
||||
height: property, borderRadius: property / 2}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/ReactionNotification.tsx');
|
||||
exports.default = _default_85834;
|
||||
return value2;
|
||||
}
|
||||
|
||||
function ReactorNotificationIcon({user, guild, isMilestone}) { // fn#85833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:931, offset: 0x01f7d6fd, size: 284 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
if (isMilestone) {
|
||||
return (
|
||||
<View style={styles.clydeNotificationIcon}>
|
||||
{((ClydeIcon) => <ClydeIcon color="white" size="md" />)((require(8765) /* metro dependency 8765: ClydeIcon */).ClydeIcon)}
|
||||
</View>
|
||||
);
|
||||
} else if (user != null) {
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
return (
|
||||
<Avatar
|
||||
user={user}
|
||||
guildId={guild?.id}
|
||||
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.NORMAL}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return ((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.NORMAL} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
|
||||
}
|
||||
}
|
||||
|
||||
function _default_85834({notification}) { // fn#85834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:1242, offset: 0x01f7d819, size: 1571 bytes, params: 2, frame: 36
|
||||
var r6;
|
||||
var r7;
|
||||
var RoleDot;
|
||||
var moduleValue8;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
var t;
|
||||
const styles = useStyles();
|
||||
const AnimateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji;
|
||||
const value3 = AnimateEmoji.useSetting();
|
||||
const user = notification.user;
|
||||
const channel = notification.channel;
|
||||
const guild = notification.guild;
|
||||
const env0_3 = guild;
|
||||
const parentChannel = notification.parentChannel;
|
||||
const reaction = notification.reaction;
|
||||
let type = channel.type;
|
||||
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
|
||||
const value4 = type === GUILD_ANNOUNCEMENT;
|
||||
const message = notification.message;
|
||||
const content = message.content;
|
||||
const inAppNotificationUtilsModule = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
|
||||
const isReactionMilestoneNotification2 = inAppNotificationUtilsModule.isReactionMilestoneNotification(message.reactions,
|
||||
channel?.type);
|
||||
const inAppNotificationRedesignExperimentModule = require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */;
|
||||
const useInAppNotificationRedesign = inAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
|
||||
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, inAppNotificationRedesignExperimentModule,
|
||||
['ReactionNotification']).redesignEnabled;
|
||||
let binding = env0_3;
|
||||
const useCallback = binding.useCallback;
|
||||
let object = [value3, reaction];
|
||||
object[2] = styles.imageEmoji;
|
||||
object[3] = styles.textEmoji;
|
||||
object[4] = styles.italic;
|
||||
object[5] = redesignEnabled;
|
||||
const value6 = Reflect.apply(useCallback, binding, [_fun85835, object]);
|
||||
const value7 = binding.useMemo(_fun85836, [message.reactions]);
|
||||
const r1 = value4 && value7 !== 1;
|
||||
const r23 = r1 || isReactionMilestoneNotification2 ? null : (require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(user,
|
||||
channel);
|
||||
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.roleStyle;
|
||||
});
|
||||
let r22 = r23?.colorString ?? undefined;
|
||||
const value10 = env0_3.useMemo(_fun85839, [roleStyle !== 'username' ? undefined : r22]);
|
||||
if (roleStyle !== 'dot') {
|
||||
r6 = undefined;
|
||||
} else if (r22 === undefined) {
|
||||
r6 = undefined;
|
||||
} else {
|
||||
RoleDot = (require(1305) /* metro dependency 1305: native */).RoleDot;
|
||||
object = {color: r22};
|
||||
r22 = r23?.colorStrings ?? null;
|
||||
object.colors = r22;
|
||||
object.containerStyles = styles.newContainerRoleDot;
|
||||
r6 = <RoleDot {...object} />;
|
||||
}
|
||||
binding = env0_3;
|
||||
const value13 = binding.useMemo(_fun85841, [redesignEnabled, channel, parentChannel, guild, r23,
|
||||
binding.useMemo(_fun85840, [r23, channel, guild, parentChannel]), value10]);
|
||||
const userAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(message.author,
|
||||
channel);
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
type = channel.type;
|
||||
const GROUP_DM = ChannelTypes.GROUP_DM;
|
||||
let r14 = type === GROUP_DM && message.author?.id !== currentUser?.id;
|
||||
const r9 = (require(478) /* metro dependency 478: PlatformUtils */).isIOS() ? 'text-md/normal' : 'text-md/medium';
|
||||
if (r1) {
|
||||
r7 = <Text variant={r9} color="text-default" style={redesignEnabled ? styles.italic : undefined}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Tqk79E,
|
||||
|
||||
{count: value7})}</Text>;
|
||||
} else if (isReactionMilestoneNotification2) {
|
||||
var textProps = {variant: r9, color: 'text-default', style: redesignEnabled ? styles.italic : undefined};
|
||||
format = intl.format;
|
||||
t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
r14 = r14 ? Reflect.apply(format, intl, [t.J86pqQ, {count: value7,
|
||||
username: userAuthor.nick}]) : Reflect.apply(format, intl, [t.KTurAR, {count: value7}]);
|
||||
r7 = <Text {...textProps}>{r14}</Text>;
|
||||
} else {
|
||||
moduleValue8 = inAppNotificationUtilsModule;
|
||||
r7 = <><Text variant={r9} color="text-default" style={[styles.notificationBodyText,
|
||||
redesignEnabled ? styles.italic : undefined]}>{moduleValue8.getNotificationBodyText({notificationMessageContent: content,
|
||||
|
||||
isGdmAllReactionNotification: r14, messageAuthor: userAuthor,
|
||||
emojiHook: value6})}</Text>{((NativeChannelRowPreview) => <NativeChannelRowPreview message={message} lineClamp={2} maxHeight={IN_APP_NOTIFICATION_MAX_HEIGHT} />)((require(10975) /* metro dependency 10975: ChannelRowPreview */).NativeChannelRowPreview)}</>;
|
||||
}
|
||||
const Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
|
||||
return (
|
||||
<Notification
|
||||
icon={<ReactorNotificationIcon user={user} guild={guild} isMilestone={isReactionMilestoneNotification2} />}
|
||||
accessoryLabelNode={r6}
|
||||
children={<View style={styles.container}>{r7}</View>}
|
||||
header={value13}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun85835() { // fn#85835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:1609, offset: 0x01f7de3c, size: 454 bytes, params: 1, frame: 20
|
||||
var id;
|
||||
var r6;
|
||||
var emoji;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var getEmojiURL;
|
||||
var object2;
|
||||
var value5;
|
||||
var value6;
|
||||
var Text;
|
||||
let reactionBinding = reaction;
|
||||
const value2 = undefined;
|
||||
if ((reactionBinding == null ? value2 : reaction.emoji.name) == null) {
|
||||
return null;
|
||||
}
|
||||
let name = reaction == null ? value2 : reaction.emoji.name;
|
||||
if (name == null) {
|
||||
if ((reaction == null ? value2 : reaction.emoji.id) != null) {
|
||||
value3 = environment.__proto__;
|
||||
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
getEmojiURL = defaultImport.getEmojiURL;
|
||||
object2 = {};
|
||||
object2.id = reaction.emoji.id;
|
||||
object2.animated = env0_1 && reaction.emoji.animated;
|
||||
object2.size = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).DEFAULT_EMOJI_SIZE;
|
||||
r6 = Reflect.apply(getEmojiURL, defaultImport, [object2]);
|
||||
} else {
|
||||
r6 = value2;
|
||||
}
|
||||
value5 = environment.__proto__;
|
||||
} else {
|
||||
id = reaction == null ? value2 : reaction.emoji.id;
|
||||
if (id == null) {
|
||||
value6 = environment.__proto__;
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var textProps = {style: redesignEnabled ? styles.italic : value2, variant: 'text-sm/normal'};
|
||||
reactionBinding = reaction;
|
||||
emoji = reactionBinding.emoji;
|
||||
name = emoji.name;
|
||||
textProps.children = name;
|
||||
emoji = reactionBinding.emoji;
|
||||
name = emoji.name;
|
||||
return <Text {...textProps} key={name} />;
|
||||
}
|
||||
id = reaction == null ? value2 : reaction.emoji.id;
|
||||
if (id != null) {
|
||||
value3 = environment.__proto__;
|
||||
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
getEmojiURL = defaultImport.getEmojiURL;
|
||||
object2 = {};
|
||||
object2.id = reaction.emoji.id;
|
||||
object2.animated = env0_1 && reaction.emoji.animated;
|
||||
object2.size = (require(11230) /* metro dependency 11230: ForumPostReactionButton */).DEFAULT_EMOJI_SIZE;
|
||||
r6 = Reflect.apply(getEmojiURL, defaultImport, [object2]);
|
||||
} else {
|
||||
r6 = value2;
|
||||
}
|
||||
}
|
||||
const Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
const stylesBinding = styles;
|
||||
return (
|
||||
<Emoji
|
||||
textEmojiStyle={stylesBinding.textEmoji}
|
||||
fastImageStyle={stylesBinding.imageEmoji}
|
||||
src={r6}
|
||||
name={reaction.emoji.name}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun85836() { // fn#85836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:2154, offset: 0x01f7e002, size: 61 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = require(22) /* metro dependency 22 */;
|
||||
return value.sumBy(message.reactions, function({count_details}) {
|
||||
var r5;
|
||||
var value = undefined;
|
||||
r5 = count_details == null ? value : count_details.burst;
|
||||
var value2 = 0;
|
||||
return (r5 ?? value2) + ((count_details == null ? value : count_details.normal) ?? value2);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun85839() { // fn#85839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:2513, offset: 0x01f7e03f, size: 33 bytes, params: 1, frame: 3
|
||||
return env0_9 != null ? {color: env0_9} : undefined;
|
||||
}
|
||||
|
||||
function _fun85840() { // fn#85840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:2713, offset: 0x01f7e060, size: 195 bytes, params: 1, frame: 20
|
||||
var r0;
|
||||
var guildBinding;
|
||||
let value = environment.__proto__;
|
||||
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
if (env0_8 == null) {
|
||||
guildBinding = guild;
|
||||
value = '';
|
||||
value = value + useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore,
|
||||
true) + ' ' + (guildBinding != null ? ', ' + guild.name : value);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = require(10921) /* metro dependency 10921: InAppNotificationUtils */;
|
||||
value = value.getNotificationTitle(channel, env0_8, parentChannel, guild);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun85841() { // fn#85841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11415:2877, offset: 0x01f7e123, size: 90 bytes, params: 1, frame: 4
|
||||
return redesignEnabled ? {type: 'message', channel: channel, parentChannel: parentChannel, guild: guild,
|
||||
author: env0_8} : {type: 'simple', text: env0_11, labelStyle: env0_10};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/* Metro module 11254; source: modules/in_app_notifications/native/ReminderNotification.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 4076, 44, 1244, 10973, 10994, 10975, 3834, 2] */
|
||||
function _fun86021(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11440:6, offset: 0x01f845c5, size: 357 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value2.jsx;
|
||||
const env0_6 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object4 = {'position': 'absolute', 'width': 20, 'height': 20, 'right': 0, 'bottom': 0,
|
||||
'backgroundColor': null, 'borderRadius': null, 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object4.backgroundColor = BACKGROUND_BRAND;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const env0_7 = Reflect.apply(createStyles, createStylesModule, [{cutoutIconContainer: object4,
|
||||
avatarContainer: {position: 'relative'}}]);
|
||||
object3 = {'direction': null, 'radius': 12, 'inset': -2};
|
||||
const CutoutDirection = (require(1305) /* metro dependency 1305: native */).CutoutDirection;
|
||||
const BOTTOM_RIGHT = CutoutDirection.BOTTOM_RIGHT;
|
||||
object3.direction = BOTTOM_RIGHT;
|
||||
value = value.memo(_fun86023);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/ReminderNotification.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function NotificationAvatar({user, guildId}) { // fn#86022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11440:504, offset: 0x01f8472a, size: 237 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const LARGE_48 = AvatarSizes.LARGE_48;
|
||||
const avatar = <Avatar user={user} guildId={guildId} size={LARGE_48} cutout={env0_8} />;
|
||||
const ClockIcon = (require(4076) /* metro dependency 4076: ClockIcon */).ClockIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
return (
|
||||
<View style={styles.avatarContainer}>
|
||||
{avatar}
|
||||
<View style={styles.cutoutIconContainer}>
|
||||
<ClockIcon size="xxs" color={WHITE} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86023(a0) { // fn#86023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11440:782, offset: 0x01f84817, size: 321 bytes, params: 2, frame: 21
|
||||
const {savedMessage, author, channel} = a0.notification;
|
||||
const message = savedMessage.message;
|
||||
(importDefault(44) /* metro dependency 44 */)(message != null, 'Message in a notification should not be null.');
|
||||
const notificationAvatar = <NotificationAvatar user={author} guildId={channel.guild_id} />;
|
||||
const value3 = env0_3.useMemo(function() {
|
||||
var object = {type: 'simple'};
|
||||
object.text = require(dependencyMap[8]).intl.string(require(dependencyMap[8]).t.Whs8tE);
|
||||
return object;
|
||||
}, []);
|
||||
const inAppNotificationRedesignExperimentModule = require(10973) /* metro dependency 10973: InAppNotificationRedesignExperiment */;
|
||||
const useInAppNotificationRedesign = inAppNotificationRedesignExperimentModule.useInAppNotificationRedesign;
|
||||
const redesignEnabled = Reflect.apply(useInAppNotificationRedesign, inAppNotificationRedesignExperimentModule,
|
||||
['ReminderNotification']).redesignEnabled;
|
||||
const Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
|
||||
const ChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview;
|
||||
const r8 = redesignEnabled ? 'text-default' : 'text-subtle';
|
||||
const ChannelListLayoutTypes = (require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes;
|
||||
const COZY = ChannelListLayoutTypes.COZY;
|
||||
return (
|
||||
<Notification icon={notificationAvatar} header={value3}>
|
||||
<ChannelRowPreview
|
||||
channel={channel}
|
||||
message={message}
|
||||
color={r8}
|
||||
layout={COZY}
|
||||
muted={false}
|
||||
lineClamp={redesignEnabled ? 3 : 2}
|
||||
/>
|
||||
</Notification>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* Metro module 11255; source: modules/in_app_notifications/native/RestrictedHoursWarningNotification.tsx; dependencies: [31, 27, 33, 4501, 697, 11256, 10994, 2] */
|
||||
function _fun86025(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11441:6, offset: 0x01f849a8, size: 274 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {'width': 48, 'height': 48, 'backgroundColor': null, 'borderRadius': null, 'alignItems': 'center',
|
||||
'justifyContent': 'center'};
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object.backgroundColor = BACKGROUND_BRAND;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{iconContainer: object}]);
|
||||
value = value.memo(_fun86026);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/RestrictedHoursWarningNotification.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun86026({notification}) { // fn#86026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11441:331, offset: 0x01f84aba, size: 213 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const ThemeDarkIcon = (require(11256) /* metro dependency 11256: ThemeDarkIcon */).ThemeDarkIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
const view = <View style={styles.iconContainer}><ThemeDarkIcon size="sm" color={WHITE} /></View>;
|
||||
const value = env0_3.useMemo(function() {
|
||||
return {type: 'simple', text: notification.title};
|
||||
}, [notification.title]);
|
||||
const Notification = (require(10994) /* metro dependency 10994: Notification */).Notification;
|
||||
return (
|
||||
<Notification
|
||||
icon={view}
|
||||
header={value}
|
||||
textChildren={notification.subtitle}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,419 @@
|
||||
/* Metro module 10965; source: modules/in_app_notifications/native/hooks/usePreviewableMedia.tsx; dependencies: [31, 27, 661, 33, 4501, 3860, 697, 7744, 9783, 10966, 4631, 10968, 4845, 2] */
|
||||
function _fun84008(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:6, offset: 0x01f33cbe, size: 440 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_84011 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_4 = value.View;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = value.MessageEmbedTypes;
|
||||
const env0_6 = value.MessageFlags;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
const env0_9 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {};
|
||||
copyDataProperties(object, StyleSheet.absoluteFillObject, undefined);
|
||||
object['flexDirection'] = 'row';
|
||||
object['alignItems'] = 'center';
|
||||
object['justifyContent'] = 'center';
|
||||
object['paddingBottom'] = 13;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [{voiceMessageIconOverlay: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/in_app_notifications/native/hooks/usePreviewableMedia.tsx');
|
||||
exports.PreviewableMediaTypes = {IMAGE: 'image', VIDEO: 'video', AUDIO: 'audio', FILE: 'file', STICKER: 'sticker',
|
||||
GIF: 'gif', VOICE_MESSAGE: 'voice_message'};
|
||||
exports.usePreviewableMedia = usePreviewableMedia;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_84009(a0, a1) { // fn#84009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:237, offset: 0x01f33e76, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun84010;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_84011(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_84011(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_84011(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun84010;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function VoiceMessageIcon() { // fn#84012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:1463, offset: 0x01f33fea, size: 358 bytes, params: 1, frame: 26
|
||||
const styles = useStyles();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
||||
const value2 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_MOD_STRONG]);
|
||||
const moduleValue2 = useTokenModule;
|
||||
useToken = moduleValue2.useToken;
|
||||
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
|
||||
const value3 = Reflect.apply(useToken, moduleValue2, [BACKGROUND_MOD_SUBTLE]);
|
||||
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
|
||||
const Path = (require(7744) /* metro dependency 7744 */).Path;
|
||||
const defaultImport2 = ((Component) => <Component width="100%" height="100%" viewBox="0 0 64 61" fill="none"><Path d="M22.2188 59.8545C19.5607 61.6263 16.0003 59.7208 16 56.5264V48C7.16344 48 2.5772e-07 40.8366 0 32V16C0 7.16344 7.16344 0 16 0H48C56.8366 0 64 7.16344 64 16V32C64 40.8366 56.8366 48 48 48H40L22.2188 59.8545Z" fill={value2} stroke={value3} /></Component>)(defaultImport);
|
||||
const CirclePlayIcon = (require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon;
|
||||
const circlePlayIcon = <CirclePlayIcon size="md" color="background-brand" secondaryColor="white" />;
|
||||
const WaveformIcon = (require(10966) /* metro dependency 10966: WaveformIcon */).WaveformIcon;
|
||||
return (
|
||||
<>
|
||||
{defaultImport2}
|
||||
<View style={styles.voiceMessageIconOverlay}>
|
||||
{circlePlayIcon}
|
||||
<WaveformIcon size="md" color="background-brand" />
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function getBasePreviewableMedia({message, isForward}) { // fn#84013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:2168, offset: 0x01f34150, size: 1106 bytes, params: 2, frame: 38
|
||||
var r4;
|
||||
var r22;
|
||||
var r21;
|
||||
var r20;
|
||||
var r9;
|
||||
var r15;
|
||||
var value2;
|
||||
var value3;
|
||||
var done;
|
||||
var value4;
|
||||
var value5;
|
||||
var filename;
|
||||
var moduleValue;
|
||||
var isImageFile;
|
||||
var moduleValue2;
|
||||
var isVideoFile;
|
||||
var moduleValue3;
|
||||
var isAudioFile2;
|
||||
var push;
|
||||
var object2;
|
||||
var id;
|
||||
var binding;
|
||||
var FILE;
|
||||
var jsxRuntimeEnv0_7Binding;
|
||||
var FileIcon;
|
||||
var colors;
|
||||
var ICON_SUBTLE;
|
||||
var value6;
|
||||
var AUDIO;
|
||||
var CirclePlayIcon;
|
||||
var value7;
|
||||
var object8;
|
||||
var VIDEO;
|
||||
var value8;
|
||||
var object9;
|
||||
var IMAGE;
|
||||
var value9;
|
||||
var value10;
|
||||
var property;
|
||||
var object10;
|
||||
var VOICE_MESSAGE;
|
||||
var value14;
|
||||
var type;
|
||||
var GIFV;
|
||||
var object11;
|
||||
var GIF;
|
||||
var value15;
|
||||
var value16;
|
||||
var object12;
|
||||
var STICKER;
|
||||
const items2 = [];
|
||||
if (message.attachments.length > 0) {
|
||||
if (message.hasFlag(MessageFlags.IS_VOICE_MESSAGE)) {
|
||||
property = message.attachments[0];
|
||||
push = items2.push;
|
||||
object10 = {};
|
||||
id = property.id;
|
||||
VOICE_MESSAGE = env0_10.VOICE_MESSAGE;
|
||||
object10.id = '' + id + '-' + VOICE_MESSAGE;
|
||||
VOICE_MESSAGE = env0_10.VOICE_MESSAGE;
|
||||
object10.type = VOICE_MESSAGE;
|
||||
object10.media = property;
|
||||
object10.icon = <VoiceMessageIcon />;
|
||||
object10.parentType = isForward ? 'forward' : null;
|
||||
Reflect.apply(push, items2, [object10]);
|
||||
} else {
|
||||
value2 = _createForOfIteratorHelperLoose_84009(message.attachments);
|
||||
value3 = value2();
|
||||
done = value3.done;
|
||||
value4 = 'forward';
|
||||
if (!done) {
|
||||
r4 = value3;
|
||||
while (true) {
|
||||
value5 = r4.value;
|
||||
filename = value5.filename;
|
||||
moduleValue = require(4631) /* metro dependency 4631: MediaFormatTesters */;
|
||||
isImageFile = moduleValue.isImageFile;
|
||||
if (!Reflect.apply(isImageFile, moduleValue, [filename])) {
|
||||
moduleValue2 = require(4631) /* metro dependency 4631: MediaFormatTesters */;
|
||||
isVideoFile = moduleValue2.isVideoFile;
|
||||
if (Reflect.apply(isVideoFile, moduleValue2, [filename])) {
|
||||
push = items2.push;
|
||||
object8 = {};
|
||||
id = value5.id;
|
||||
VIDEO = env0_10.VIDEO;
|
||||
object8.id = '' + id + '-' + VIDEO;
|
||||
VIDEO = env0_10.VIDEO;
|
||||
object8.type = VIDEO;
|
||||
object8.media = value5;
|
||||
value8 = null;
|
||||
if (isForward) {
|
||||
r21 = value4;
|
||||
continue;
|
||||
}
|
||||
r21 = value8;
|
||||
continue;
|
||||
object8.parentType = r21;
|
||||
Reflect.apply(push, items2, [object8]);
|
||||
break;
|
||||
}
|
||||
moduleValue3 = require(4631) /* metro dependency 4631: MediaFormatTesters */;
|
||||
isAudioFile2 = moduleValue3.isAudioFile(filename);
|
||||
push = items2.push;
|
||||
object2 = {};
|
||||
id = value5.id;
|
||||
binding = env0_10;
|
||||
if (isAudioFile2) {
|
||||
AUDIO = binding.AUDIO;
|
||||
object2.id = '' + id + '-' + AUDIO;
|
||||
AUDIO = env0_10.AUDIO;
|
||||
object2.type = AUDIO;
|
||||
object2.media = value5;
|
||||
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
||||
CirclePlayIcon = (require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon;
|
||||
object2.icon = <CirclePlayIcon size="lg" color="background-brand" secondaryColor="white" />;
|
||||
value7 = null;
|
||||
if (isForward) {
|
||||
r21 = value4;
|
||||
continue;
|
||||
}
|
||||
r21 = value7;
|
||||
continue;
|
||||
object2.parentType = r21;
|
||||
Reflect.apply(push, items2, [object2]);
|
||||
break;
|
||||
}
|
||||
FILE = binding.FILE;
|
||||
object2.id = '' + id + '-' + FILE;
|
||||
FILE = env0_10.FILE;
|
||||
object2.type = FILE;
|
||||
object2.media = value5;
|
||||
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
||||
FileIcon = (require(10968) /* metro dependency 10968: FileIcon */).FileIcon;
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
ICON_SUBTLE = colors.ICON_SUBTLE;
|
||||
object2.icon = <FileIcon size="lg" color={ICON_SUBTLE} />;
|
||||
value6 = null;
|
||||
if (isForward) {
|
||||
r22 = value4;
|
||||
continue;
|
||||
}
|
||||
r22 = value6;
|
||||
continue;
|
||||
object2.parentType = r22;
|
||||
Reflect.apply(push, items2, [object2]);
|
||||
break;
|
||||
}
|
||||
push = items2.push;
|
||||
object9 = {};
|
||||
id = value5.id;
|
||||
IMAGE = env0_10.IMAGE;
|
||||
object9.id = '' + id + '-' + IMAGE;
|
||||
IMAGE = env0_10.IMAGE;
|
||||
object9.type = IMAGE;
|
||||
object9.media = value5;
|
||||
value9 = null;
|
||||
if (isForward) {
|
||||
r20 = value4;
|
||||
continue;
|
||||
}
|
||||
r20 = value9;
|
||||
continue;
|
||||
object9.parentType = r20;
|
||||
Reflect.apply(push, items2, [object9]);
|
||||
value10 = value2();
|
||||
done = value10.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r4 = value10;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const value11 = _createForOfIteratorHelperLoose_84009(message.embeds);
|
||||
const value12 = value11();
|
||||
done = value12.done;
|
||||
const value13 = 'forward';
|
||||
if (!done) {
|
||||
r9 = value12;
|
||||
while (true) {
|
||||
value14 = r9.value;
|
||||
type = value14.type;
|
||||
GIFV = MessageEmbedTypes.GIFV;
|
||||
if (type === GIFV) {
|
||||
push = items2.push;
|
||||
object11 = {};
|
||||
id = value14.id;
|
||||
GIF = env0_10.GIF;
|
||||
object11.id = '' + id + '-' + GIF;
|
||||
GIF = env0_10.GIF;
|
||||
object11.type = GIF;
|
||||
object11.media = value14;
|
||||
value15 = null;
|
||||
if (isForward) {
|
||||
r15 = value13;
|
||||
continue;
|
||||
}
|
||||
r15 = value15;
|
||||
continue;
|
||||
object11.parentType = r15;
|
||||
Reflect.apply(push, items2, [object11]);
|
||||
}
|
||||
value16 = value11();
|
||||
done = value16.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r9 = value16;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (message.stickerItems.length > 0) {
|
||||
property = message.stickerItems[0];
|
||||
push = items2.push;
|
||||
object12 = {};
|
||||
id = property.id;
|
||||
STICKER = env0_10.STICKER;
|
||||
object12.id = '' + id + '-' + STICKER;
|
||||
STICKER = env0_10.STICKER;
|
||||
object12.type = STICKER;
|
||||
object12.media = property;
|
||||
object12.parentType = isForward ? value13 : null;
|
||||
Reflect.apply(push, items2, [object12]);
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
|
||||
function usePreviewableMedia(a0) { // fn#84014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:3600, offset: 0x01f345a2, size: 44 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return env0_3.useMemo(_fun84015, [a0]);
|
||||
}
|
||||
|
||||
function _fun84015() { // fn#84015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11151:3650, offset: 0x01f345ce, size: 192 bytes, params: 1, frame: 19
|
||||
var items3;
|
||||
const items4 = [];
|
||||
let value = environment.__proto__;
|
||||
const getBasePreviewableMediaBinding = getBasePreviewableMedia;
|
||||
const binding = env0_0;
|
||||
const basePreviewableMediaBinding = getBasePreviewableMediaBinding({message: binding, isForward: false});
|
||||
let push = items4.push;
|
||||
const items2 = [];
|
||||
apply(push, items2, items4, arraySpread(items2, basePreviewableMediaBinding, 0, undefined));
|
||||
if (importDefault(dependencyMap[12])(binding)) {
|
||||
if (env0_0.messageSnapshots.length > 0) {
|
||||
value = getBasePreviewableMedia({message: env0_0.messageSnapshots[0].message, isForward: true});
|
||||
push = items4.push;
|
||||
items3 = [];
|
||||
arraySpread(items3, value, 0, dependencyMap);
|
||||
apply(push, items3, items4, dependencyMap);
|
||||
}
|
||||
}
|
||||
return items4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/* Metro module 10993; source: modules/in_app_notifications/native/hooks/usePreviewableMediaText.tsx; dependencies: [31, 10965, 1244, 2] */
|
||||
function _fun84128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11179:6, offset: 0x01f3a671, size: 114 bytes, params: 8, frame: 18
|
||||
const 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('modules/in_app_notifications/native/hooks/usePreviewableMediaText.tsx');
|
||||
exports.usePreviewableMediaText = usePreviewableMediaText;
|
||||
}
|
||||
|
||||
function usePreviewableMediaText({previewableMedia}) { // fn#84129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11179:235, offset: 0x01f3a6e3, size: 50 bytes, params: 2, frame: 14
|
||||
return env0_2.useMemo(_fun84130, [previewableMedia]);
|
||||
}
|
||||
|
||||
function _fun84130() { // fn#84130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11179:308, offset: 0x01f3a715, size: 1055 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var property;
|
||||
var type;
|
||||
const PreviewableMediaTypes = (require(10965) /* metro dependency 10965: usePreviewableMedia */).PreviewableMediaTypes;
|
||||
var value;
|
||||
let length = previewableMedia.length;
|
||||
if (length === 0) {
|
||||
return {'text': null, 'secondaryText': null};
|
||||
}
|
||||
if (previewableMedia.length === 1) {
|
||||
property = previewableMedia[0];
|
||||
type = property.type;
|
||||
value = environment.__proto__;
|
||||
if (PreviewableMediaTypes.IMAGE === type) {
|
||||
return {text: intl.string(t.tCcq5p), secondaryText: null};
|
||||
}
|
||||
if (PreviewableMediaTypes.VIDEO === type) {
|
||||
return {text: intl.string(t.KxO2Yl), secondaryText: null};
|
||||
}
|
||||
if (PreviewableMediaTypes.AUDIO === type) {
|
||||
return {text: intl.string(t.FWqQt5), secondaryText: property.media.filename};
|
||||
}
|
||||
if (PreviewableMediaTypes.FILE === type) {
|
||||
return {text: intl.string(t.mX8M6i), secondaryText: property.media.filename};
|
||||
}
|
||||
if (PreviewableMediaTypes.STICKER === type) {
|
||||
return {text: intl.string(t.dyquw8), secondaryText: null};
|
||||
}
|
||||
if (PreviewableMediaTypes.VOICE_MESSAGE === type) {
|
||||
return {text: intl.string(t.slFYgi), secondaryText: null};
|
||||
}
|
||||
if (PreviewableMediaTypes.GIF === type) {
|
||||
return {text: intl.string(t.p0oZmy), secondaryText: null};
|
||||
}
|
||||
return {text: intl.string(t.sDqZHL), secondaryText: null};
|
||||
}
|
||||
previewableMediaBinding = previewableMedia;
|
||||
value = previewableMediaBinding.every(function({type}) {
|
||||
return type === require(dependencyMap[1]).PreviewableMediaTypes.FILE;
|
||||
});
|
||||
length = previewableMediaBinding.length;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
return {text: value ? Reflect.apply(formatToPlainString, intl, [t.y0gZht,
|
||||
{count: length}]) : Reflect.apply(formatToPlainString, intl, [t['8/qgDd'], {count: length}]),
|
||||
secondaryText: null};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user