2026-08-05 07:35:12 +00:00
|
|
|
// Module ID: 8103
|
|
|
|
|
// Function ID: 8104
|
2026-07-29 08:29:29 +00:00
|
|
|
// Name: reactionForId
|
2026-08-05 07:35:12 +00:00
|
|
|
// Dependencies: [4247, 5128, 1372, 1942, 4472, 1874, 8104, 676, 4454, 3896, 3900, 1416, 8105, 3889, 3872, 8106, 1236, 7114, 8108, 500, 8109, 8110, 2]
|
2026-07-29 08:29:29 +00:00
|
|
|
// Exports: default, isPollMessageDirectlyInteractive
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-08-05 07:35:12 +00:00
|
|
|
// Module 8103 (reactionForId)
|
2026-07-29 08:29:29 +00:00
|
|
|
import maybeApplyNoTextColorForLightCustomTheme from "maybeApplyNoTextColorForLightCustomTheme";
|
|
|
|
|
import getEmojiToGroupId from "getEmojiToGroupId";
|
|
|
|
|
import ensureGuildLoaded from "ensureGuildLoaded";
|
|
|
|
|
import trackCommunicationDisabled from "trackCommunicationDisabled";
|
|
|
|
|
import reinjectEphemerals from "reinjectEphemerals";
|
|
|
|
|
import mergeGuildAvatar from "mergeGuildAvatar";
|
2026-07-23 10:11:24 +00:00
|
|
|
import { getPollState } from "useMessagePollInteractions";
|
|
|
|
|
import ME from "ME";
|
2026-07-29 08:29:29 +00:00
|
|
|
import set from "ensureGuildLoaded";
|
2026-07-23 10:11:24 +00:00
|
|
|
|
|
|
|
|
const require = arg1;
|
2026-07-20 16:05:17 +00:00
|
|
|
function reactionForId(reactions, first) {
|
2026-07-29 08:29:29 +00:00
|
|
|
const iter = reactions[Symbol.iterator]();
|
|
|
|
|
const nextResult = iter.next();
|
|
|
|
|
while (iter !== undefined) {
|
|
|
|
|
let tmp2 = nextResult;
|
2026-08-04 21:03:28 +00:00
|
|
|
if (typeof nextResult.emoji.id === "number") {
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp3 = nextResult;
|
|
|
|
|
let _HermesInternal = HermesInternal;
|
|
|
|
|
let id = "" + tmp2.emoji.id;
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp5 = nextResult;
|
|
|
|
|
id = tmp2.emoji.id;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (id === first) {
|
|
|
|
|
let tmp4 = iter;
|
|
|
|
|
iter.return();
|
|
|
|
|
return nextResult;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
function computeBasicPollChatData(message) {
|
2026-07-20 16:05:17 +00:00
|
|
|
let editing;
|
|
|
|
|
let selectedAnswerIds;
|
|
|
|
|
let showResults;
|
|
|
|
|
let submitting;
|
2026-07-29 08:29:29 +00:00
|
|
|
let obj = arg2;
|
|
|
|
|
if (arg2 === undefined) {
|
2026-07-20 16:05:17 +00:00
|
|
|
obj = {};
|
|
|
|
|
}
|
|
|
|
|
let formattedExpirationLabel = obj.formattedExpirationLabel;
|
|
|
|
|
const poll = message.poll;
|
|
|
|
|
if (null != poll) {
|
|
|
|
|
let str = "";
|
|
|
|
|
if (message.state === MessageStates.SENT) {
|
2026-07-29 08:29:29 +00:00
|
|
|
if (formattedExpirationLabel == null) {
|
2026-08-05 07:35:12 +00:00
|
|
|
formattedExpirationLabel = require(8105) /* formatExpirationLabel */.formatExpirationLabel(poll.expiry);
|
|
|
|
|
const obj2 = require(8105) /* formatExpirationLabel */;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
str = formattedExpirationLabel;
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp6 = arg1;
|
|
|
|
|
if (arg1 == null) {
|
|
|
|
|
tmp6 = getPollState(message.getChannelId(), message.id);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (tmp6 == null) {
|
|
|
|
|
tmp6 = obj;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
({ selectedAnswerIds, submitting, editing, showResults } = tmp6);
|
2026-07-20 16:05:17 +00:00
|
|
|
let reactions = message.reactions;
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp8 = null == message.poll;
|
|
|
|
|
if (!tmp8) {
|
|
|
|
|
tmp8 = store.getMessage(message.channel_id, message.id) === message;
|
|
|
|
|
}
|
2026-07-20 16:05:17 +00:00
|
|
|
let flag = true;
|
2026-07-29 08:29:29 +00:00
|
|
|
let obj3 = reactions;
|
|
|
|
|
if (!tmp8) {
|
2026-07-23 10:11:24 +00:00
|
|
|
message = store.getMessage(message.channel_id, message.id);
|
2026-07-29 08:29:29 +00:00
|
|
|
const isSearchHit = message.isSearchHit;
|
|
|
|
|
let tmp12 = !isSearchHit;
|
|
|
|
|
if (!isSearchHit) {
|
|
|
|
|
tmp12 = null != message;
|
|
|
|
|
}
|
2026-07-20 16:05:17 +00:00
|
|
|
reactions = undefined;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (message != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
reactions = message.reactions;
|
|
|
|
|
}
|
|
|
|
|
obj3 = reactions;
|
2026-07-29 08:29:29 +00:00
|
|
|
flag = tmp12;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
const someResult = obj3.some((me_vote) => true === me_vote.me_vote);
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp16 = !editing;
|
|
|
|
|
if (!editing) {
|
|
|
|
|
tmp16 = someResult;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp18 = tmp16;
|
|
|
|
|
if (!tmp16) {
|
|
|
|
|
tmp18 = tmp5;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (!tmp18) {
|
|
|
|
|
tmp18 = showResults;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp19 = tmp2;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (message.state === MessageStates.SENT) {
|
2026-07-29 08:29:29 +00:00
|
|
|
tmp19 = flag;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (tmp19) {
|
|
|
|
|
let tmp20 = !someResult;
|
|
|
|
|
if (someResult) {
|
|
|
|
|
tmp20 = editing;
|
|
|
|
|
}
|
|
|
|
|
if (!tmp20) {
|
|
|
|
|
tmp20 = tmp18;
|
|
|
|
|
}
|
|
|
|
|
tmp19 = tmp20;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
channel = channel.getChannel(message.getChannelId());
|
2026-07-20 16:05:17 +00:00
|
|
|
let guildId;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (channel != null) {
|
|
|
|
|
const getGuildId = channel.getGuildId;
|
|
|
|
|
if (getGuildId != null) {
|
|
|
|
|
guildId = getGuildId();
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let selfMember = null;
|
|
|
|
|
if (null != guildId) {
|
|
|
|
|
selfMember = selfMember.getSelfMember(guildId);
|
|
|
|
|
}
|
2026-08-05 07:35:12 +00:00
|
|
|
const result = require(3889) /* GuildMemberFlags */.hasAutomodQuarantinedProfile(selfMember);
|
|
|
|
|
const obj4 = require(3889) /* GuildMemberFlags */;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj = { poll: null, canTapAnswers: null, canRemoveVote: null, canShowVoteCounts: null, canSubmitVote: null, expirationLabel: null, hasSelectedAnswer: null, hasVoted: null, hasVoteRecorded: null, isEditingVote: null, isExpired: null, isInteractive: null, isSent: null, reactions: null, selectedAnswerIds: null, submitting: null, tapShouldOpenVotersModal: null, showResults: null };
|
|
|
|
|
obj[0] = poll;
|
|
|
|
|
obj[1] = tmp19;
|
|
|
|
|
let tmp30 = tmp16;
|
2026-08-05 07:35:12 +00:00
|
|
|
const result1 = require(3872) /* isCommunicationDisabled */.isMemberCommunicationDisabled(selfMember);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (tmp16) {
|
|
|
|
|
tmp30 = tmp2;
|
|
|
|
|
}
|
|
|
|
|
if (tmp30) {
|
|
|
|
|
tmp30 = !tmp5;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[2] = tmp30;
|
|
|
|
|
obj[3] = tmp18;
|
|
|
|
|
let tmp31 = !submitting;
|
|
|
|
|
if (!submitting) {
|
|
|
|
|
tmp31 = tmp14;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (tmp31) {
|
|
|
|
|
tmp31 = !tmp16;
|
|
|
|
|
}
|
|
|
|
|
if (tmp31) {
|
|
|
|
|
tmp31 = tmp2;
|
|
|
|
|
}
|
|
|
|
|
if (tmp31) {
|
|
|
|
|
tmp31 = !result;
|
|
|
|
|
}
|
|
|
|
|
if (tmp31) {
|
|
|
|
|
tmp31 = !result1;
|
|
|
|
|
}
|
|
|
|
|
obj[4] = tmp31;
|
|
|
|
|
obj[5] = str;
|
|
|
|
|
obj[6] = selectedAnswerIds.size > 0;
|
|
|
|
|
obj[7] = tmp16;
|
|
|
|
|
obj[8] = someResult;
|
|
|
|
|
obj[9] = editing;
|
|
|
|
|
obj[10] = null == str && message.state === MessageStates.SENT;
|
|
|
|
|
obj[11] = flag;
|
|
|
|
|
obj[12] = message.state === MessageStates.SENT;
|
|
|
|
|
obj[13] = obj3;
|
|
|
|
|
obj[14] = selectedAnswerIds;
|
|
|
|
|
obj[15] = submitting;
|
|
|
|
|
obj[16] = tmp18;
|
|
|
|
|
obj[17] = showResults;
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
const MessageStates = ME.MessageStates;
|
|
|
|
|
let obj = { channelId: ME.EMPTY_STRING_SNOWFLAKE_ID, selectedAnswerIds: null, submitting: false, editing: false, showResults: false };
|
|
|
|
|
let set = new Set();
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[1] = set;
|
2026-07-23 10:11:24 +00:00
|
|
|
let result = set.fileFinishedImporting("modules/polls/chat/formatPollMessageChatData.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function formatPollMessageChatData(poll, arg1, maxSettingsForPreset) {
|
|
|
|
|
let answers;
|
2026-07-23 10:11:24 +00:00
|
|
|
let c10;
|
|
|
|
|
let c9;
|
2026-07-20 16:05:17 +00:00
|
|
|
let canRemoveVote;
|
|
|
|
|
let canShowVoteCounts;
|
|
|
|
|
let canSubmitVote;
|
|
|
|
|
let canTapAnswers;
|
|
|
|
|
let expirationLabel;
|
|
|
|
|
let isEditingVote;
|
|
|
|
|
let isExpired;
|
|
|
|
|
let isInteractive;
|
|
|
|
|
let layout_type;
|
|
|
|
|
let reactions;
|
|
|
|
|
let showResults;
|
|
|
|
|
let tapShouldOpenVotersModal;
|
|
|
|
|
let obj = maxSettingsForPreset;
|
|
|
|
|
if (maxSettingsForPreset === undefined) {
|
|
|
|
|
obj = {};
|
|
|
|
|
}
|
|
|
|
|
let flag = obj.animateEmoji;
|
|
|
|
|
if (flag === undefined) {
|
|
|
|
|
flag = false;
|
|
|
|
|
}
|
|
|
|
|
let str = obj.theme;
|
|
|
|
|
if (str === undefined) {
|
|
|
|
|
str = "dark";
|
|
|
|
|
}
|
|
|
|
|
let useReducedMotion;
|
2026-07-23 10:11:24 +00:00
|
|
|
layout_type = undefined;
|
|
|
|
|
canSubmitVote = undefined;
|
|
|
|
|
expirationLabel = undefined;
|
|
|
|
|
let hasSelectedAnswer;
|
|
|
|
|
let hasVoted;
|
|
|
|
|
isExpired = undefined;
|
|
|
|
|
reactions = undefined;
|
|
|
|
|
c9 = undefined;
|
|
|
|
|
c10 = undefined;
|
|
|
|
|
showResults = undefined;
|
|
|
|
|
let totalVotes;
|
2026-07-29 08:29:29 +00:00
|
|
|
let computeBasicPollChatData;
|
2026-07-20 16:05:17 +00:00
|
|
|
let closure_14;
|
2026-07-23 10:11:24 +00:00
|
|
|
let c15;
|
2026-07-20 16:05:17 +00:00
|
|
|
poll = poll.poll;
|
|
|
|
|
if (null != poll) {
|
2026-07-23 10:11:24 +00:00
|
|
|
const currentUser = reactions.getCurrentUser();
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != currentUser) {
|
2026-07-23 10:11:24 +00:00
|
|
|
useReducedMotion = canSubmitVote.useReducedMotion;
|
|
|
|
|
const channel = hasSelectedAnswer.getChannel(poll.getChannelId());
|
2026-07-20 16:05:17 +00:00
|
|
|
let guildId;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (channel != null) {
|
|
|
|
|
const getGuildId = channel.getGuildId;
|
|
|
|
|
if (getGuildId != null) {
|
|
|
|
|
guildId = getGuildId();
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
let obj1 = flag(layout_type[15]);
|
2026-07-20 16:05:17 +00:00
|
|
|
({ answers, layout_type } = poll);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj = { formattedExpirationLabel: null };
|
|
|
|
|
obj[0] = tmp;
|
2026-07-20 16:05:17 +00:00
|
|
|
const avatarUrl = obj1.getAvatarUrl(currentUser, guildId);
|
2026-07-29 08:29:29 +00:00
|
|
|
const tmp8 = computeBasicPollChatData(poll, arg1, obj);
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != tmp8) {
|
|
|
|
|
({ canTapAnswers, canSubmitVote } = tmp8);
|
|
|
|
|
({ expirationLabel, canRemoveVote, canShowVoteCounts } = tmp8);
|
|
|
|
|
if (undefined === expirationLabel) {
|
2026-07-29 08:29:29 +00:00
|
|
|
let intl = tmp4(tmp5[16]).intl;
|
|
|
|
|
expirationLabel = intl.string(tmp4(tmp5[16]).t["e+J3JZ"]);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
hasSelectedAnswer = tmp8.hasSelectedAnswer;
|
|
|
|
|
hasVoted = tmp8.hasVoted;
|
2026-07-20 16:05:17 +00:00
|
|
|
({ isEditingVote, isExpired } = tmp8);
|
|
|
|
|
({ isInteractive, reactions } = tmp8);
|
2026-07-23 10:11:24 +00:00
|
|
|
({ selectedAnswerIds: c9, submitting: c10, tapShouldOpenVotersModal, showResults } = tmp8);
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp4Result = tmp4(tmp5[17]);
|
|
|
|
|
totalVotes = tmp4Result.getTotalVotes(reactions);
|
|
|
|
|
const intl2 = tmp4(tmp5[16]).intl;
|
|
|
|
|
obj = { count: null };
|
|
|
|
|
obj[0] = totalVotes;
|
|
|
|
|
computeBasicPollChatData = intl2.formatToPlainString(tmp4(tmp5[16]).t.XRkuof, obj);
|
|
|
|
|
let _Math = Math;
|
2026-07-20 16:05:17 +00:00
|
|
|
const items = [];
|
|
|
|
|
HermesBuiltin.arraySpread(answers.map((answer_id) => {
|
2026-07-29 08:29:29 +00:00
|
|
|
const tmp = totalVotes(reactions, "" + answer_id.answer_id);
|
|
|
|
|
let num;
|
|
|
|
|
if (tmp != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
const count_details = tmp.count_details;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (count_details != null) {
|
|
|
|
|
num = count_details.vote;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (num == null) {
|
|
|
|
|
num = 0;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return num;
|
|
|
|
|
}), 0);
|
|
|
|
|
const _Math2 = Math;
|
|
|
|
|
closure_14 = HermesBuiltin.apply(items, Math);
|
|
|
|
|
const mapped = answers.map((answer_id) => {
|
|
|
|
|
const combined = "" + answer_id.answer_id;
|
2026-07-29 08:29:29 +00:00
|
|
|
const tmp2 = totalVotes(reactions, combined);
|
|
|
|
|
let num;
|
|
|
|
|
if (tmp2 != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
const count_details = tmp2.count_details;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (count_details != null) {
|
|
|
|
|
num = count_details.vote;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (num == null) {
|
|
|
|
|
num = 0;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
let num2 = 0;
|
|
|
|
|
if (0 !== totalVotes) {
|
|
|
|
|
num2 = num / totalVotes;
|
|
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
const hasItem = _undefined.has(combined);
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp6 = hasVoted;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (hasVoted) {
|
2026-07-29 08:29:29 +00:00
|
|
|
let flag;
|
|
|
|
|
if (tmp2 != null) {
|
|
|
|
|
flag = tmp2.me_vote;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (flag == null) {
|
|
|
|
|
flag = false;
|
|
|
|
|
}
|
|
|
|
|
tmp6 = flag;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
let obj = { didSelfVote: tmp6, hasVoted, isExpired, isSelected: hasItem, isLeader: tmp4, showResults };
|
|
|
|
|
let tmp7 = isExpired;
|
2026-07-23 10:11:24 +00:00
|
|
|
const match = flag(layout_type[8]).match(obj);
|
|
|
|
|
const str = flag(layout_type[8]);
|
2026-07-29 08:29:29 +00:00
|
|
|
const tmp5 = hasVoted;
|
2026-07-23 10:11:24 +00:00
|
|
|
const withResult = match.with({ isExpired: true, isLeader: true, didSelfVote: true }, () => "victorSelected");
|
|
|
|
|
const withResult1 = match.with({ isExpired: true, isLeader: true, didSelfVote: true }, () => "victorSelected").with({ isExpired: true, isLeader: true, didSelfVote: false }, () => "victorNotSelected");
|
|
|
|
|
const withResult2 = match.with({ isExpired: true, isLeader: true, didSelfVote: true }, () => "victorSelected").with({ isExpired: true, isLeader: true, didSelfVote: false }, () => "victorNotSelected").with({ isExpired: true, didSelfVote: true }, () => "loserSelected");
|
|
|
|
|
const withResult3 = match.with({ isExpired: true, isLeader: true, didSelfVote: true }, () => "victorSelected").with({ isExpired: true, isLeader: true, didSelfVote: false }, () => "victorNotSelected").with({ isExpired: true, didSelfVote: true }, () => "loserSelected").with({ isExpired: true }, () => "notVoted");
|
|
|
|
|
const withResult4 = match.with({ isExpired: true, isLeader: true, didSelfVote: true }, () => "victorSelected").with({ isExpired: true, isLeader: true, didSelfVote: false }, () => "victorNotSelected").with({ isExpired: true, didSelfVote: true }, () => "loserSelected").with({ isExpired: true }, () => "notVoted").with({ didSelfVote: true, isExpired: false }, () => "voted");
|
|
|
|
|
const withResult5 = match.with({ isExpired: true, isLeader: true, didSelfVote: true }, () => "victorSelected").with({ isExpired: true, isLeader: true, didSelfVote: false }, () => "victorNotSelected").with({ isExpired: true, didSelfVote: true }, () => "loserSelected").with({ isExpired: true }, () => "notVoted").with({ didSelfVote: true, isExpired: false }, () => "voted").with({ hasVoted: true, isExpired: false }, () => "notVoted");
|
|
|
|
|
const withResult6 = match.with({ isExpired: true, isLeader: true, didSelfVote: true }, () => "victorSelected").with({ isExpired: true, isLeader: true, didSelfVote: false }, () => "victorNotSelected").with({ isExpired: true, didSelfVote: true }, () => "loserSelected").with({ isExpired: true }, () => "notVoted").with({ didSelfVote: true, isExpired: false }, () => "voted").with({ hasVoted: true, isExpired: false }, () => "notVoted").with({ isSelected: true }, () => "selected");
|
2026-07-29 08:29:29 +00:00
|
|
|
obj = { answerId: combined, pollMedia: null, isSelected: null, isVictor: null, didSelfVote: null, style: null, shouldAnimateTransition: null, votesPercentage: null, votes: null };
|
|
|
|
|
obj = { text: answer_id.poll_media.text, emoji: null, stickerId: null, attachmentIds: null };
|
|
|
|
|
let name = answer_id.poll_media.emoji;
|
2026-07-20 16:05:17 +00:00
|
|
|
const obj1 = { animateEmoji: num };
|
2026-07-29 08:29:29 +00:00
|
|
|
let flag2 = obj1.animateEmoji;
|
2026-07-23 10:11:24 +00:00
|
|
|
const withResult7 = match.with({ isExpired: true, isLeader: true, didSelfVote: true }, () => "victorSelected").with({ isExpired: true, isLeader: true, didSelfVote: false }, () => "victorNotSelected").with({ isExpired: true, didSelfVote: true }, () => "loserSelected").with({ isExpired: true }, () => "notVoted").with({ didSelfVote: true, isExpired: false }, () => "voted").with({ hasVoted: true, isExpired: false }, () => "notVoted").with({ isSelected: true }, () => "selected").with({ isExpired: false, showResults: true }, () => "notVoted");
|
2026-07-29 08:29:29 +00:00
|
|
|
if (flag2 === undefined) {
|
|
|
|
|
flag2 = false;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
let num3 = obj1.size;
|
|
|
|
|
if (num3 === undefined) {
|
|
|
|
|
num3 = 48;
|
|
|
|
|
}
|
|
|
|
|
if (null == name) {
|
|
|
|
|
obj[1] = undefined;
|
|
|
|
|
obj[2] = answer_id.poll_media.sticker_id;
|
|
|
|
|
obj[3] = answer_id.poll_media.attachment_ids;
|
|
|
|
|
obj[1] = obj;
|
|
|
|
|
obj[2] = hasItem;
|
|
|
|
|
if (tmp7) {
|
|
|
|
|
tmp7 = tmp4;
|
|
|
|
|
}
|
|
|
|
|
obj[3] = tmp7;
|
|
|
|
|
obj[4] = tmp6;
|
|
|
|
|
obj[5] = otherwiseResult;
|
|
|
|
|
let tmp20 = c10;
|
|
|
|
|
if (c10) {
|
|
|
|
|
tmp20 = !useReducedMotion;
|
|
|
|
|
}
|
|
|
|
|
obj[6] = tmp20;
|
|
|
|
|
const _Math = Math;
|
|
|
|
|
obj[7] = Math.round(100 * num2);
|
|
|
|
|
const match1 = tmp8(tmp9[8]).match(layout_type);
|
|
|
|
|
const str2 = tmp8(tmp9[8]);
|
|
|
|
|
obj[8] = match1.with(tmp8(tmp9[18]).PollLayoutTypes.IMAGE_ONLY_ANSWERS, () => "(" + num.toLocaleString() + ")").otherwise(() => {
|
|
|
|
|
const intl = num(outer1_2[16]).intl;
|
|
|
|
|
return intl.formatToPlainString(num(outer1_2[16]).t.XRkuof, { count: num });
|
|
|
|
|
});
|
|
|
|
|
return obj;
|
|
|
|
|
} else {
|
|
|
|
|
let flag3 = name.animated;
|
|
|
|
|
if (tmp11) {
|
|
|
|
|
const customEmojiById = expirationLabel.getCustomEmojiById(name.id);
|
|
|
|
|
let flag4;
|
|
|
|
|
if (customEmojiById != null) {
|
|
|
|
|
flag4 = customEmojiById.animated;
|
|
|
|
|
}
|
|
|
|
|
if (flag4 == null) {
|
|
|
|
|
flag4 = false;
|
|
|
|
|
}
|
|
|
|
|
flag3 = flag4;
|
|
|
|
|
}
|
|
|
|
|
if (flag2) {
|
|
|
|
|
if (flag3 == null) {
|
|
|
|
|
flag3 = false;
|
|
|
|
|
}
|
|
|
|
|
flag2 = flag3;
|
|
|
|
|
}
|
|
|
|
|
let combined1 = null;
|
|
|
|
|
if (null != name.id) {
|
|
|
|
|
const _HermesInternal = HermesInternal;
|
|
|
|
|
combined1 = "" + name.id;
|
|
|
|
|
}
|
|
|
|
|
const obj2 = { id: null, name: null, displayName: null, src: null, animated: null };
|
|
|
|
|
obj2[0] = combined1;
|
|
|
|
|
obj2[1] = name.name;
|
|
|
|
|
if (null == name.id) {
|
|
|
|
|
let name2 = useReducedMotion(tmp9[9]).convertSurrogateToName(name.name);
|
|
|
|
|
const obj15 = useReducedMotion(tmp9[9]);
|
|
|
|
|
} else {
|
|
|
|
|
name2 = name.name;
|
|
|
|
|
}
|
|
|
|
|
obj2[2] = name2;
|
|
|
|
|
if (null == name.id) {
|
|
|
|
|
name = name.name;
|
|
|
|
|
let uRL = useReducedMotion(tmp9[10]).getURL(name);
|
|
|
|
|
const obj18 = useReducedMotion(tmp9[10]);
|
|
|
|
|
} else {
|
|
|
|
|
const obj3 = { id: null, animated: null, size: null };
|
|
|
|
|
obj3[0] = name.id;
|
|
|
|
|
obj3[1] = flag2;
|
|
|
|
|
obj3[2] = num3;
|
|
|
|
|
uRL = useReducedMotion(tmp9[11]).getEmojiURL(obj3);
|
|
|
|
|
const obj16 = useReducedMotion(tmp9[11]);
|
|
|
|
|
}
|
|
|
|
|
obj2[3] = uRL;
|
|
|
|
|
obj2[4] = flag2;
|
|
|
|
|
tmp11 = null == flag3 && null != name.id;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
});
|
2026-07-29 08:29:29 +00:00
|
|
|
obj1 = { isExpired: null, canSubmitVote: null, hasVoted: null, isEditingVote: null, canRemoveVote: null, isInteractive: null, showResults: null };
|
|
|
|
|
obj1[0] = isExpired;
|
|
|
|
|
obj1[1] = canSubmitVote;
|
|
|
|
|
obj1[2] = hasVoted;
|
|
|
|
|
obj1[3] = isEditingVote;
|
|
|
|
|
obj1[4] = canRemoveVote;
|
|
|
|
|
obj1[5] = isInteractive;
|
|
|
|
|
obj1[6] = showResults;
|
|
|
|
|
let match = tmp4(tmp5[8]).match(obj1);
|
|
|
|
|
let str2 = tmp4(tmp5[8]);
|
|
|
|
|
let withResult = match.with({ isInteractive: false }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
});
|
2026-07-29 08:29:29 +00:00
|
|
|
let withResult1 = match.with({ isInteractive: false }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isExpired: true }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
});
|
2026-07-29 08:29:29 +00:00
|
|
|
let withResult2 = match.with({ isInteractive: false }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isExpired: true }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isEditingVote: true }, () => {
|
|
|
|
|
const obj = { label: null, presentation: "button", enabled: null, type: "submit" };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.JwkNU4);
|
|
|
|
|
obj[2] = hasSelectedAnswer;
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
});
|
2026-07-29 08:29:29 +00:00
|
|
|
let withResult3 = match.with({ isInteractive: false }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isExpired: true }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isEditingVote: true }, () => {
|
|
|
|
|
const obj = { label: null, presentation: "button", enabled: null, type: "submit" };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.JwkNU4);
|
|
|
|
|
obj[2] = hasSelectedAnswer;
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ canRemoveVote: true }, () => {
|
2026-07-23 10:11:24 +00:00
|
|
|
const obj = { label: null, presentation: "secondaryButton", enabled: true, type: "remove" };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.XhQEh8);
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
});
|
2026-07-29 08:29:29 +00:00
|
|
|
let withResult4 = match.with({ isInteractive: false }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isExpired: true }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isEditingVote: true }, () => {
|
|
|
|
|
const obj = { label: null, presentation: "button", enabled: null, type: "submit" };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.JwkNU4);
|
|
|
|
|
obj[2] = hasSelectedAnswer;
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ canRemoveVote: true }, () => {
|
2026-07-23 10:11:24 +00:00
|
|
|
const obj = { label: null, presentation: "secondaryButton", enabled: true, type: "remove" };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.XhQEh8);
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
2026-07-23 10:11:24 +00:00
|
|
|
}).with({ hasVoted: false, showResults: true }, () => {
|
|
|
|
|
const obj = { label: null, presentation: "secondaryButton", enabled: true, type: "showVotes" };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.gNj6In);
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
});
|
2026-07-29 08:29:29 +00:00
|
|
|
tmp4Result = tmp4(tmp5[19]);
|
|
|
|
|
const otherwiseResult = match.with({ isInteractive: false }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isExpired: true }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isEditingVote: true }, () => {
|
|
|
|
|
const obj = { label: null, presentation: "button", enabled: null, type: "submit" };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.JwkNU4);
|
|
|
|
|
obj[2] = hasSelectedAnswer;
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ canRemoveVote: true }, () => {
|
2026-07-23 10:11:24 +00:00
|
|
|
const obj = { label: null, presentation: "secondaryButton", enabled: true, type: "remove" };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.XhQEh8);
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
2026-07-23 10:11:24 +00:00
|
|
|
}).with({ hasVoted: false, showResults: true }, () => {
|
|
|
|
|
const obj = { label: null, presentation: "secondaryButton", enabled: true, type: "showVotes" };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.gNj6In);
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
}).otherwise(() => {
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj = { label: null, presentation: "button", enabled: null, type: "submit" };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.JwkNU4);
|
|
|
|
|
obj[2] = canSubmitVote;
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
});
|
2026-07-29 08:29:29 +00:00
|
|
|
const intl3 = tmp4(tmp5[16]).intl;
|
2026-07-20 16:05:17 +00:00
|
|
|
const string = intl3.string;
|
2026-07-29 08:29:29 +00:00
|
|
|
const t = tmp4(tmp5[16]).t;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (isIOSResult) {
|
2026-07-23 10:11:24 +00:00
|
|
|
let stringResult = string(t["PVATM/"]);
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
|
|
|
|
stringResult = string(t.cHfFql);
|
|
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
c15 = stringResult;
|
2026-07-29 08:29:29 +00:00
|
|
|
isIOSResult = tmp4Result.isIOS();
|
|
|
|
|
let obj2 = { isExpired: null, isInteractive: null, isEditingVote: null };
|
|
|
|
|
obj2[0] = isExpired;
|
|
|
|
|
obj2[1] = isInteractive;
|
|
|
|
|
obj2[2] = isEditingVote;
|
|
|
|
|
let match1 = tmp4(tmp5[8]).match(obj2);
|
|
|
|
|
const str3 = tmp4(tmp5[8]);
|
2026-07-23 10:11:24 +00:00
|
|
|
let withResult5 = match1.with({ isInteractive: false, isExpired: false }, () => {
|
|
|
|
|
const obj = { label: null, presentation: "text", enabled: false };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.trrip0);
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
});
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp20;
|
2026-07-23 10:11:24 +00:00
|
|
|
let withResult6 = match1.with({ isInteractive: false, isExpired: false }, () => {
|
|
|
|
|
const obj = { label: null, presentation: "text", enabled: false };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.trrip0);
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isEditingVote: true }, () => {
|
2026-07-23 10:11:24 +00:00
|
|
|
const obj = { label: null, presentation: "textButton", enabled: true, type: "cancel" };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t["ETE/oC"]);
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
});
|
|
|
|
|
if (isInteractive) {
|
|
|
|
|
if (!isExpired) {
|
|
|
|
|
if (!hasVoted) {
|
|
|
|
|
if (!showResults) {
|
2026-07-29 08:29:29 +00:00
|
|
|
let obj3 = { label: null, presentation: "textButton", enabled: true, type: "showVotes" };
|
|
|
|
|
const intl4 = tmp4(tmp5[16]).intl;
|
|
|
|
|
obj3[0] = intl4.string(tmp4(tmp5[16]).t["/KHAUF"]);
|
|
|
|
|
tmp20 = obj3;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const allow_multiselect = poll.allow_multiselect;
|
2026-07-23 10:11:24 +00:00
|
|
|
const otherwiseResult1 = match1.with({ isInteractive: false, isExpired: false }, () => {
|
|
|
|
|
const obj = { label: null, presentation: "text", enabled: false };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t.trrip0);
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isEditingVote: true }, () => {
|
2026-07-23 10:11:24 +00:00
|
|
|
const obj = { label: null, presentation: "textButton", enabled: true, type: "cancel" };
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[0] = intl.string(flag(layout_type[16]).t["ETE/oC"]);
|
2026-07-23 10:11:24 +00:00
|
|
|
return obj;
|
2026-07-29 08:29:29 +00:00
|
|
|
}).otherwise(() => ({ label: closure_13, secondaryLabel: expirationLabel, accessibilityHint: c15, presentation: "text", enabled: true, type: "showVoterDetails" }));
|
|
|
|
|
const obj4 = { isInteractive: null, isExpired: null, canSelectMultipleAnswers: null };
|
|
|
|
|
obj4[0] = isInteractive;
|
|
|
|
|
obj4[1] = isExpired;
|
|
|
|
|
obj4[2] = allow_multiselect;
|
|
|
|
|
const match2 = tmp4(tmp5[8]).match(obj4);
|
|
|
|
|
const str4 = tmp4(tmp5[8]);
|
|
|
|
|
let withResult7 = match2.with({ isInteractive: false }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
});
|
2026-07-29 08:29:29 +00:00
|
|
|
const withResult8 = match2.with({ isInteractive: false }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isExpired: true }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
});
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj5 = { question: null, promptLabel: null, answers: null, answersInteraction: null, answerTapAccessibilityLabel: null, layoutType: null, resources: null, containerStyle: "normal", primaryAction: null, isInteractive: null, canTapAnswers: null, canSelectMultipleAnswers: null, hasSelectedAnswer: null, canShowVoteCounts: null, hasVoted: null, isExpired: null, myAvatarUrl: null, secondaryAction: null, tertiaryAction: null };
|
|
|
|
|
obj5[0] = poll.question;
|
|
|
|
|
obj5[1] = match2.with({ isInteractive: false }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isExpired: true }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ canSelectMultipleAnswers: true }, () => {
|
|
|
|
|
const intl = flag(layout_type[16]).intl;
|
|
|
|
|
return intl.string(flag(layout_type[16]).t.yCXvxa);
|
|
|
|
|
}).otherwise(() => {
|
|
|
|
|
const intl = flag(layout_type[16]).intl;
|
|
|
|
|
return intl.string(flag(layout_type[16]).t["9Y2wKO"]);
|
|
|
|
|
});
|
|
|
|
|
obj5[2] = mapped;
|
|
|
|
|
const withResult9 = match2.with({ isInteractive: false }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ isExpired: true }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
}).with({ canSelectMultipleAnswers: true }, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
const intl = flag(layout_type[16]).intl;
|
|
|
|
|
return intl.string(flag(layout_type[16]).t.yCXvxa);
|
|
|
|
|
});
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj6 = { tapShouldOpenVotersModal: null, canTapAnswers: null, canSelectMultipleAnswers: null };
|
|
|
|
|
obj6[0] = tapShouldOpenVotersModal;
|
|
|
|
|
obj6[1] = canTapAnswers;
|
|
|
|
|
obj6[2] = allow_multiselect;
|
|
|
|
|
const match3 = tmp4(tmp5[8]).match(obj6);
|
|
|
|
|
const str5 = tmp4(tmp5[8]);
|
|
|
|
|
const withResult10 = match3.with({ tapShouldOpenVotersModal: true }, () => flag(layout_type[20]).PollChatAnswerInteractionType.LIST);
|
|
|
|
|
const withResult11 = match3.with({ tapShouldOpenVotersModal: true }, () => flag(layout_type[20]).PollChatAnswerInteractionType.LIST).with({ canTapAnswers: false }, () => flag(layout_type[20]).PollChatAnswerInteractionType.LIST);
|
|
|
|
|
const withResult12 = match3.with({ tapShouldOpenVotersModal: true }, () => flag(layout_type[20]).PollChatAnswerInteractionType.LIST).with({ canTapAnswers: false }, () => flag(layout_type[20]).PollChatAnswerInteractionType.LIST).with({ canSelectMultipleAnswers: false }, () => flag(layout_type[20]).PollChatAnswerInteractionType.RADIO_BUTTONS);
|
|
|
|
|
obj5[3] = match3.with({ tapShouldOpenVotersModal: true }, () => flag(layout_type[20]).PollChatAnswerInteractionType.LIST).with({ canTapAnswers: false }, () => flag(layout_type[20]).PollChatAnswerInteractionType.LIST).with({ canSelectMultipleAnswers: false }, () => flag(layout_type[20]).PollChatAnswerInteractionType.RADIO_BUTTONS).with({ canSelectMultipleAnswers: true }, () => flag(layout_type[20]).PollChatAnswerInteractionType.CHECKBOXES).exhaustive();
|
|
|
|
|
let tmp21;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (tapShouldOpenVotersModal) {
|
2026-07-29 08:29:29 +00:00
|
|
|
tmp21 = stringResult;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
obj5[4] = tmp21;
|
|
|
|
|
obj5[5] = layout_type;
|
|
|
|
|
const obj7 = { theme: null, layoutType: null };
|
|
|
|
|
obj7[0] = str;
|
|
|
|
|
obj7[1] = layout_type;
|
|
|
|
|
obj5[6] = useReducedMotion(tmp5[21])(obj7);
|
|
|
|
|
obj5[8] = otherwiseResult;
|
|
|
|
|
obj5[9] = isInteractive;
|
|
|
|
|
obj5[10] = canTapAnswers;
|
|
|
|
|
obj5[11] = allow_multiselect;
|
|
|
|
|
obj5[12] = hasSelectedAnswer;
|
|
|
|
|
obj5[13] = canShowVoteCounts;
|
|
|
|
|
obj5[14] = hasVoted;
|
|
|
|
|
obj5[15] = isExpired;
|
|
|
|
|
obj5[16] = avatarUrl;
|
|
|
|
|
obj5[17] = otherwiseResult1;
|
|
|
|
|
obj5[18] = tmp20;
|
|
|
|
|
return obj5;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export { reactionForId };
|
2026-07-29 08:29:29 +00:00
|
|
|
export const isPollMessageDirectlyInteractive = function isPollMessageDirectlyInteractive(poll) {
|
|
|
|
|
let tmp = null == poll.poll;
|
|
|
|
|
if (!tmp) {
|
|
|
|
|
tmp = store.getMessage(poll.channel_id, poll.id) === poll;
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
};
|
2026-07-20 16:05:17 +00:00
|
|
|
export { computeBasicPollChatData };
|