Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,194 @@
|
||||
/* Metro module 9837; source: modules/reactions/native/ReactionUtils.tsx; dependencies: [1379, 4814, 3969, 1878, 661, 1881, 33, 3795, 4081, 4082, 7151, 3802, 4080, 8565, 1962, 4015, 8529, 7152, 4863, 9838, 9846, 9847, 9848, 7950, 7952, 4647, 1244, 4573, 2] */
|
||||
function _fun77068(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10023:6, offset: 0x01def736, size: 492 bytes, params: 8, frame: 21
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const closure = handleOutOfSuperReactions;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = constantsModule.AnalyticEvents;
|
||||
const env0_8 = constantsModule.AnalyticsPages;
|
||||
const env0_9 = constantsModule.AnalyticsSections;
|
||||
const env0_10 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention;
|
||||
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object3 = {};
|
||||
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
|
||||
let NORMAL = ReactionTypes.NORMAL;
|
||||
object3[NORMAL] = importDefault(9847) /* metro dependency 9847 */;
|
||||
let BURST = ReactionTypes.BURST;
|
||||
object3[BURST] = importDefault(9848) /* metro dependency 9848 */;
|
||||
const object4 = {};
|
||||
NORMAL = ReactionTypes.NORMAL;
|
||||
const ReactionIcon = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
|
||||
object4[NORMAL] = ReactionIcon;
|
||||
BURST = ReactionTypes.BURST;
|
||||
const SuperReactionIcon = (require(7952) /* metro dependency 7952: SuperReactionIcon */).SuperReactionIcon;
|
||||
object4[BURST] = SuperReactionIcon;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/reactions/native/ReactionUtils.tsx');
|
||||
exports.handleOutOfSuperReactions = closure;
|
||||
exports.handleAddNewReactions = handleAddNewReactions;
|
||||
exports.handleViewReactions = handleViewReactions;
|
||||
exports.handleViewPreviewReactions = handleViewPreviewReactions;
|
||||
exports.ADD_REACTION_ICONS = object3;
|
||||
exports.ADD_REACTION_ICON_COMPONENTS = object4;
|
||||
exports.handleRemoveAllReactions = handleRemoveAllReactions;
|
||||
}
|
||||
|
||||
function handleOutOfSuperReactions(a0) { // fn#77069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10023:245, offset: 0x01def922, size: 149 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var defaultImport;
|
||||
var openLazy;
|
||||
var value;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
if (currentUser != null) {
|
||||
value3 = undefined;
|
||||
moduleValue = require(dependencyMap[11]);
|
||||
if (moduleValue.isPremium(currentUser)) {
|
||||
r0 = value3;
|
||||
} else {
|
||||
defaultImport = importDefault(dependencyMap[12]);
|
||||
openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[14]);
|
||||
value = value(dependencyMap[13], dependencyMap.paths);
|
||||
value = Reflect.apply(openLazy, defaultImport, [value, 'SuperReactionUpsellActionSheet', {onDismiss: a0}]);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
}
|
||||
|
||||
function handleAddNewReactions(a0, a1) { // fn#77070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10023:805, offset: 0x01def9b7, size: 366 bytes, params: 3, frame: 20
|
||||
var isPremium2;
|
||||
var moduleValue2;
|
||||
var value6;
|
||||
var moduleValue3;
|
||||
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
|
||||
let value = a2;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value2 = undefined;
|
||||
const r5 = value !== value2 ? value : (require(7151) /* metro dependency 7151: ReactionActionCreators */).ReactionLocations.MESSAGE;
|
||||
value = (a3 == null ? value2 : a3.burst) === true;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
if (currentUser != null) {
|
||||
isPremium2 = (require(3802) /* metro dependency 3802: PremiumUtils */).isPremium(currentUser);
|
||||
if (value && !isPremium2) {
|
||||
handleOutOfSuperReactions();
|
||||
}
|
||||
moduleValue2 = require(4015) /* metro dependency 4015: ChatInputUtils */;
|
||||
value6 = moduleValue2.getBestActiveInputForChannelId(a0.id);
|
||||
if (value6 != null) {
|
||||
value6.closeCustomKeyboard();
|
||||
}
|
||||
moduleValue3 = require(8529) /* metro dependency 8529: openEmojiPickerActionSheet */;
|
||||
moduleValue3.openEmojiPickerActionSheet({onPressEmoji: onPressEmoji_77071, channel: a0,
|
||||
pickerIntention: EmojiIntention.REACTION,
|
||||
reactionType: value && isPremium2 ? ReactionTypes.BURST : ReactionTypes.NORMAL, analyticsObject: r5,
|
||||
messageId: a1});
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function handleViewReactions(a0) { // fn#77072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10023:1531, offset: 0x01defbec, size: 430 bytes, params: 2, frame: 28
|
||||
var r12;
|
||||
var message;
|
||||
const messageId = a0.messageId;
|
||||
const channelId = a0.channelId;
|
||||
const location = a0.location;
|
||||
const value = undefined;
|
||||
const r13 = location !== value ? location : {};
|
||||
const isPoll = a0.isPoll;
|
||||
const emoji = a0.emoji;
|
||||
const object5 = {'messageId': 0, 'channelId': 0, 'location': 0, 'isPoll': 0, 'emoji': 0};
|
||||
silentSetPrototypeOf(object5, null, undefined);
|
||||
const value2 = copyDataProperties({}, a0, object5, undefined);
|
||||
const channel = ChannelStore.getChannel(channelId);
|
||||
const r15 = channel == null ? AnalyticsPages.GUILD_CHANNEL : channel.isPrivate() ? AnalyticsPages.DM_CHANNEL : AnalyticsPages.GUILD_CHANNEL;
|
||||
const r14 = channel == null ? channel == null ? AnalyticsSections.CHANNEL : channel.isForumPost() ? AnalyticsSections.FORUM_CHANNEL_POST : AnalyticsSections.CHANNEL : channel.isForumLikeChannel() ? AnalyticsSections.FORUM_CHANNEL_POST : channel == null ? AnalyticsSections.CHANNEL : channel.isForumPost() ? AnalyticsSections.FORUM_CHANNEL_POST : AnalyticsSections.CHANNEL;
|
||||
if (isPoll != null) {
|
||||
r12 = isPoll;
|
||||
} else {
|
||||
message = MessageStore.getMessage(channelId, messageId);
|
||||
r12 = (message == null ? value : message.isPoll()) === true;
|
||||
}
|
||||
const defaultImport = importDefault(dependencyMap[18]);
|
||||
const trackWithMetadata = defaultImport.trackWithMetadata;
|
||||
const REACTION_ACTION_SHEET_OPENED = AnalyticEvents.REACTION_ACTION_SHEET_OPENED;
|
||||
const object6 = {};
|
||||
object6.guild_id = SelectedGuildStore.getGuildId();
|
||||
object6.channel_id = channelId;
|
||||
object6.location_message_id = messageId;
|
||||
object6.location_message_is_poll = r12;
|
||||
const object7 = {page: r15, section: r14};
|
||||
copyDataProperties(object7, r13, object5);
|
||||
object6.location = object7;
|
||||
Reflect.apply(trackWithMetadata, defaultImport, [REACTION_ACTION_SHEET_OPENED, object6]);
|
||||
const defaultImport2 = importDefault(dependencyMap[12]);
|
||||
const openLazy = defaultImport2.openLazy;
|
||||
const value7 = require(dependencyMap[14])(dependencyMap[19], dependencyMap.paths);
|
||||
const object8 = {messageId: messageId, channelId: channelId, emoji: emoji};
|
||||
copyDataProperties(object8, value2, object5);
|
||||
Reflect.apply(openLazy, defaultImport2, [value7, 'MessageReactions', object8]);
|
||||
return value;
|
||||
}
|
||||
|
||||
function handleViewPreviewReactions(a0, a1, a2) { // fn#77073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10023:2168, offset: 0x01defd9a, size: 104 bytes, params: 4, frame: 16
|
||||
const defaultImport = importDefault(dependencyMap[12]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
let value = require(dependencyMap[14]);
|
||||
value = value(dependencyMap[20], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'MessagePreviewReactions', {messageId: a0, channelId: a1,
|
||||
emoji: a2}]);
|
||||
}
|
||||
|
||||
function handleRemoveAllReactions(a0, a1) { // fn#77074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10023:2398, offset: 0x01defe02, size: 314 bytes, params: 3, frame: 23
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
const show = defaultImport.show;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const ZbtGBm = (require(1244) /* metro dependency 1244: indexNative */).t.ZbtGBm;
|
||||
object2.title = Reflect.apply(string, intl, [ZbtGBm]);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
const VpjOCo = (require(1244) /* metro dependency 1244: indexNative */).t.VpjOCo;
|
||||
object2.children = <Text variant="text-md/normal">{Reflect.apply(string, intl, [VpjOCo])}</Text>;
|
||||
object2.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
|
||||
object2.confirmText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oyYWHE);
|
||||
object2.onConfirm = onConfirm;
|
||||
Reflect.apply(show, defaultImport, [object2]);
|
||||
}
|
||||
|
||||
function handleAddNewReactionsOnPressEmoji(a0, a1) { // fn#77071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10023:1145, owner: handleAddNewReactions.onPressEmoji, offset: 0x01defb25, size: 199 bytes, params: 3, frame: 24
|
||||
var value2;
|
||||
var moduleValue2;
|
||||
var value;
|
||||
const id = env0_0.id;
|
||||
const binding = env0_2;
|
||||
const object2 = {burst: a1};
|
||||
if (a0 != null) {
|
||||
value = environment.__proto__;
|
||||
value2 = (require(3795) /* metro dependency 3795: ReactionUtils */).toReactionEmoji(a0);
|
||||
if (!(object2 != null && object2.burst)) {
|
||||
moduleValue2 = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
moduleValue2.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
|
||||
}
|
||||
value = require(7151) /* metro dependency 7151: ReactionActionCreators */;
|
||||
value.addReaction(id, require, value2, binding, object2);
|
||||
}
|
||||
}
|
||||
|
||||
function handleRemoveAllReactionsOnConfirm() { // fn#77075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10023:2716, owner: handleRemoveAllReactions.onConfirm, offset: 0x01deff3c, size: 50 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = require(7151) /* metro dependency 7151: ReactionActionCreators */;
|
||||
return value.removeAllReactions(env0_0, require);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user