// Module ID: 10206 // Function ID: 10207 // Name: _submitPollVote // Dependencies: [5, 676, 530, 4184, 2] // Exports: endPollEarly, submitPollVote // Module 10206 (_submitPollVote) import asyncGeneratorStep from "asyncGeneratorStep"; import { Endpoints } from "ME"; const require = arg1; function _submitPollVote() { const self = this; const tmp = callback((arg0) => { let closure_0 = arg0; let c5 = 0; let c6 = 0; let c4 = 0; const iter = (function*(arg0) { let c0; let c1; let c2; if (c6 === 2) { c6 = 3; HermesBuiltin.throwTypeError(); } else if (tmp7 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "T", done: null }; } } else { try { c6 = 2; if (0 === c5) { if (arg0 === 1) { c6 = 3; throw arg1; } else if (arg0 === 2) { c6 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { c2 = tmp3; let dependencyMap = tmp5; let callback; dependencyMap = undefined; c2 = undefined; ({ channelId: c0, messageId: c1, answerIds: c2 } = callback); c5 = 1; c6 = 1; return { value: "PX_8", done: "Array" }; } } else if (1 === tmp8) { if (arg0 === 1) { c6 = 3; throw arg1; } else if (arg0 === 2) { c6 = 3; const obj1 = { value: null, done: true }; obj1[0] = arg1; return obj1; } else { let c4 = 1; const HTTP = callback(530).HTTP; const obj2 = { url: null, body: null, rejectWithError: false }; obj2[0] = closure_3.POLL_ANSWERS(callback, dependencyMap); const obj3 = { answer_ids: null }; obj3[0] = c2; obj2[1] = obj3; c5 = 3; c6 = 1; const obj4 = { value: null, done: false }; obj4[0] = HTTP.put(obj2); return obj4; } } else if (2 === tmp8) { c4 = 0; const aPIError = new callback(4184).APIError(closure_3); throw aPIError; } else if (arg0 === 1) { c6 = 3; throw arg1; } else if (arg0 === 2) { c4 = 0; c6 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { c4 = 0; c6 = 3; return { value: "T", done: null }; } } catch (tmp21) { closure_3 = tmp21; if (tmp4 === c4) { c6 = tmp2; throw tmp21; } else { c5 = tmp; } } } })(); iter.next(); return iter; }); const _submitPollVote = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } function _endPollEarly() { const self = this; const tmp = callback((arg0) => { let closure_0 = arg0; let c5 = 0; let c6 = 0; let c4 = 0; const iter = (function*(arg0) { let c0; let c1; if (c6 === 2) { c6 = 3; HermesBuiltin.throwTypeError(); } else if (tmp7 === 3) { if (arg0 === 1) { throw arg1; } else if (arg0 === 2) { let obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { return { value: "T", done: null }; } } else { try { c6 = 2; if (0 === c5) { if (arg0 === 1) { c6 = 3; throw arg1; } else if (arg0 === 2) { c6 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { let asyncGeneratorStep = tmp3; let dependencyMap = tmp5; let callback; dependencyMap = undefined; ({ channelId: c0, messageId: c1 } = callback); c5 = 1; c6 = 1; return { value: "PX_8", done: "Array" }; } } else if (1 === tmp8) { if (arg0 === 1) { c6 = 3; throw arg1; } else if (arg0 === 2) { c6 = 3; const obj1 = { value: null, done: true }; obj1[0] = arg1; return obj1; } else { let c4 = 1; const HTTP = callback(530).HTTP; const obj2 = { url: null, rejectWithError: false }; obj2[0] = closure_3.POLL_EXPIRE(callback, dependencyMap); c5 = 3; c6 = 1; const obj3 = { value: null, done: false }; obj3[0] = HTTP.post(obj2); return obj3; } } else if (2 === tmp8) { c4 = 0; asyncGeneratorStep = closure_3; const aPIError = new callback(4184).APIError(asyncGeneratorStep); throw aPIError; } else if (arg0 === 1) { c6 = 3; throw arg1; } else if (arg0 === 2) { c4 = 0; c6 = 3; obj = { value: null, done: true }; obj[0] = arg1; return obj; } else { c4 = 0; c6 = 3; return { value: "T", done: null }; } } catch (tmp28) { closure_3 = tmp28; if (tmp4 === c4) { c6 = tmp2; throw tmp28; } else { c5 = tmp; } } } })(); iter.next(); return iter; }); const _endPollEarly = tmp; const apply = tmp.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } const result = require("sendRequest").fileFinishedImporting("modules/polls/PollsHttpApi.tsx"); export const submitPollVote = function submitPollVote(arg0) { const self = this; const apply = _submitPollVote.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; }; export const endPollEarly = function endPollEarly() { const self = this; const apply = _endPollEarly.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; };