From 63a1beef9827368e4861addae796acce62203dd3 Mon Sep 17 00:00:00 2001 From: Simon Hiller Date: Mon, 19 Feb 2024 22:59:46 +0100 Subject: [PATCH] Add check for undefined voteCount and update localization strings in PollListItem component --- js/dist/forum.js | 46 ++++++++++--------- js/dist/forum.js.map | 2 +- js/src/forum/components/Poll/PollListItem.tsx | 32 +++++++------ resources/locale/en.yml | 3 ++ 4 files changed, 46 insertions(+), 37 deletions(-) diff --git a/js/dist/forum.js b/js/dist/forum.js index b3c6b994..fc53c01f 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -393,12 +393,12 @@ var ComposePollHero = /*#__PURE__*/function (_Component) { className: "IndexPageHero-controls" }, m((flarum_common_components_LinkButton__WEBPACK_IMPORTED_MODULE_4___default()), { icon: "far fa-edit", - className: "Button Button--primary IndexPage-newDiscussion GoodiesManagerLink", + className: "Button Button--secondary IndexPage-newDiscussion GoodiesManagerLink", itemClassName: "App-primaryControl", href: flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().route('fof_polls_list') }, t(prfx + ".polls_manager")), poll.exists && m((flarum_common_components_LinkButton__WEBPACK_IMPORTED_MODULE_4___default()), { icon: "far fa-arrow-up-right-from-square", - className: "Button Button--primary IndexPage-newDiscussion GoodiePreviewLink", + className: "Button Button--secondary IndexPage-newDiscussion GoodiePreviewLink", itemClassName: "App-primaryControl", href: flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().route('fof_polls_list', { id: poll.id() @@ -785,7 +785,7 @@ var Poll = /*#__PURE__*/function (_Component) { _proto.controlsView = function controlsView(controls) { return !!controls.length && m((flarum_common_components_Dropdown__WEBPACK_IMPORTED_MODULE_12___default()), { icon: "fas fa-ellipsis-v", - className: "UserCard-controls App-primaryControl PollListItem-controls", + className: "PollListItem-controls", menuClassName: "Dropdown-menu--right", buttonClassName: "Button Button--icon Button--flat", accessibleToggleLabel: t('fof-polls.forum.poll_controls.toggle_dropdown_accessible_label') @@ -945,7 +945,7 @@ var PollForm = /*#__PURE__*/function (_Component) { }, m("label", { className: "label PollModal--answers-title" }, m("span", null, flarum_forum_app__WEBPACK_IMPORTED_MODULE_5___default().translator.trans('fof-polls.forum.modal.options_label')), flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_6___default().component({ - className: 'Button PollModal--button small', + className: 'Button PollModal--button Button--icon small', icon: 'fas fa-plus', onclick: this.addOption.bind(this) })), this.displayOptions()), 80); @@ -963,7 +963,7 @@ var PollForm = /*#__PURE__*/function (_Component) { min: this.datepickerMinDate, max: this.formatDate('2038') }), flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_6___default().component({ - className: 'Button PollModal--button', + className: 'Button PollModal--button Button--icon', icon: 'fas fa-times', onclick: this.endDate.bind(this, null) })), this.endDate() && m("p", { @@ -1050,7 +1050,7 @@ var PollForm = /*#__PURE__*/function (_Component) { placeholder: flarum_forum_app__WEBPACK_IMPORTED_MODULE_5___default().translator.trans('fof-polls.forum.modal.image_option_placeholder') + ' #' + (i + 1) }) : null), i >= 2 ? flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_6___default().component({ type: 'button', - className: 'Button Button--warning PollModal--button', + className: 'Button PollModal--button Button--icon', icon: 'fas fa-minus', onclick: i >= 2 ? _this.removeOption.bind(_this, i) : '' }) : ''); @@ -1363,12 +1363,12 @@ var PollList = /*#__PURE__*/function (_Component) { } var pageSize = state.pageSize; return m("div", { - className: flarum_common_utils_classList__WEBPACK_IMPORTED_MODULE_7___default()('PollList UserDirectoryList', { + className: flarum_common_utils_classList__WEBPACK_IMPORTED_MODULE_7___default()('PollList', { 'PollList--searchResults': state.isSearchResults() }) }, m("ul", { "aria-busy": isLoading, - className: "PollList-polls UserDirectoryList-users" + className: "PollList-polls" }, state.getPages().map(function (pg) { return pg.items.map(function (poll) { return m("li", { @@ -1483,7 +1483,7 @@ var PollListItem = /*#__PURE__*/function (_Component) { }; _proto.elementAttrs = function elementAttrs() { return { - className: flarum_common_utils_classList__WEBPACK_IMPORTED_MODULE_4___default()('PollListItem User', { + className: flarum_common_utils_classList__WEBPACK_IMPORTED_MODULE_4___default()('PollListItem', { active: this.active(), 'PollListItem--hidden': this.attrs.poll.isHidden(), Slidable: 'ontouchstart' in window @@ -1499,7 +1499,7 @@ var PollListItem = /*#__PURE__*/function (_Component) { _proto.controlsView = function controlsView(controls) { return !!controls.length && m((flarum_common_components_Dropdown__WEBPACK_IMPORTED_MODULE_5___default()), { icon: "fas fa-ellipsis-v", - className: "UserCard-controls App-primaryControl PollListItem-controls", + className: "UserCard-controls PollListItem-controls", menuClassName: "Dropdown-menu--right", buttonClassName: "Button Button--icon Button--flat", accessibleToggleLabel: t('fof-polls.forum.poll_controls.toggle_dropdown_accessible_label') @@ -1588,17 +1588,20 @@ var PollListItem = /*#__PURE__*/function (_Component) { var active = !poll.hasEnded(); var activeView = poll.endDate() ? [flarum_common_helpers_icon__WEBPACK_IMPORTED_MODULE_9___default()('fas fa-clock'), ' ', active ? t('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() - }) : t('fof-polls.forum.poll_ended')] : flarum_common_helpers_icon__WEBPACK_IMPORTED_MODULE_9___default()('fas fa-om'); + }) : t('fof-polls.forum.poll_ended')] : [flarum_common_helpers_icon__WEBPACK_IMPORTED_MODULE_9___default()('fas fa-om'), ' ', t('fof-polls.forum.poll_never_ends')]; items.add('active', m("span", { className: flarum_common_utils_classList__WEBPACK_IMPORTED_MODULE_4___default()('UserCard-lastSeen', { active: active }) }, activeView)); - items.add('discussion-count', m("div", { - className: "userStat" - }, flarum_common_helpers_icon__WEBPACK_IMPORTED_MODULE_9___default()('fas fa-poll fa-fw'), [' ', t('fof-user-directory.forum.page.usercard.discussion-count', { - count: flarum_common_utils_abbreviateNumber__WEBPACK_IMPORTED_MODULE_11___default()(poll.voteCount()) - })]), 70); + var voteCount = poll.voteCount(); + if (voteCount !== undefined) { + items.add('discussion-count', m("div", { + className: "userStat" + }, flarum_common_helpers_icon__WEBPACK_IMPORTED_MODULE_9___default()('fas fa-poll fa-fw'), [' ', t('fof-polls.forum.polls_count', { + count: flarum_common_utils_abbreviateNumber__WEBPACK_IMPORTED_MODULE_11___default()(voteCount) + })]), 70); + } return items; }; return PollListItem; @@ -1864,18 +1867,17 @@ var PollResults = /*#__PURE__*/function (_Component) { }), m("span", { className: "PollResult-information" }, m("div", { - className: "PollResults-row" + className: "PollResult-row" }, m(_PollOptionLabel__WEBPACK_IMPORTED_MODULE_2__["default"], { text: "Poll Option Label" }), m(_PollResultNumber__WEBPACK_IMPORTED_MODULE_3__["default"], { number: 64 - })), m("input", { + })), m("progress", { type: "range", min: "0", max: "100", value: "64", - step: "1", - className: "PollResult-input" + className: "PollResult-bar" }))); }; return PollResults; @@ -2083,7 +2085,7 @@ var PollsPage = /*#__PURE__*/function (_Page) { var canStartPoll = _common_Acl__WEBPACK_IMPORTED_MODULE_12__["default"].canStartPoll(); items.add('newGlobalPoll', m((flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_10___default()), { icon: "fas fa-edit", - className: "Button Button--primary IndexPage-newDiscussion", + className: "Button Button--primary App-primaryControl PollsPage-newPoll", itemClassName: "App-primaryControl", onclick: function onclick() { _this3.newPollAction(); @@ -3239,7 +3241,7 @@ var prfx = _common__WEBPACK_IMPORTED_MODULE_1__.slug + ".forum.poll_controls"; return items; }, /** - * Get controls for direkt modifcation actions on polls (e.g. vote, view voters). + * Get controls for direct modifcation actions on polls (e.g. vote, view voters). */ pollControls: function pollControls(poll, context) { var items = new (flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_4___default())(); diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index 63841408..9ea0be74 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":";;;;;;;;;;;;;;IAAqBA,GAAG;EAAA,SAAAA,IAAA;EAAAA,GAAA,CACfC,cAAc,GAArB,SAAAA,eAAA,EAAiC;IAC/B,OAAO,IAAI;EACb,CAAC;EAAAD,G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OzB,yDAAS,CAACsB,KAAK,EAAEpe,SAAS,EAAEoZ,8DAAc,CAAC,IAAI,CAAC,CAAC2B,WAAW,CAAC;IACtE;IACAwD,OAAO,CAAC/kB,SAAS,GAAG4N,MAAM,CAACkR,MAAM,CAAC8F,KAAK,CAAC5kB,SAAS,EAAE;MACjDuhB,WAAW,EAAE;QACXle,KAAK,EAAE0hB,OAAO;QACdrG,UAAU,EAAE,KAAK;QACjBE,QAAQ,EAAE,IAAI;QACdD,YAAY,EAAE;MAChB;IACF,CAAC,CAAC;IACF,OAAO6C,8DAAc,CAACuD,OAAO,EAAEH,KAAK,CAAC;EACvC,CAAC;EACD,OAAO9L,gBAAgB,CAAC8L,KAAK,CAAC;AAChC;;;;;;UC7BA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D","sources":["webpack://@fof/polls/./src/common/Acl.tsx","webpack://@fof/polls/./src/common/index.js","webpack://@fof/polls/./src/forum/addComposerItems.js","webpack://@fof/polls/./src/forum/addDiscussionBadge.js","webpack://@fof/polls/./src/forum/addNavItem.ts","webpack://@fof/polls/./src/forum/addPollsToPost.js","webpack://@fof/polls/./src/forum/addPostControls.js","webpack://@fof/polls/./src/forum/components/ComposePollHero.tsx","webpack://@fof/polls/./src/forum/components/ComposePollPage.tsx","webpack://@fof/polls/./src/forum/components/CreatePollModal.js","webpack://@fof/polls/./src/forum/components/EditPollModal.js","webpack://@fof/polls/./src/forum/components/ListVotersModal.js","webpack://@fof/polls/./src/forum/components/Poll.tsx","webpack://@fof/polls/./src/forum/components/PollForm.js","webpack://@fof/polls/./src/forum/components/Poll/PollDescription.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollImage.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollList.js","webpack://@fof/polls/./src/forum/components/Poll/PollListItem.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOption.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptionInput.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptionLabel.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptions.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollPage.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollResult.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollResultNumber.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollTitle.tsx","webpack://@fof/polls/./src/forum/components/PollsPage.tsx","webpack://@fof/polls/./src/forum/components/PostPoll.js","webpack://@fof/polls/./src/forum/components/form/FormError.js","webpack://@fof/polls/./src/forum/components/index.ts","webpack://@fof/polls/./src/forum/extend.ts","webpack://@fof/polls/./src/forum/index.ts","webpack://@fof/polls/./src/forum/models/Poll.ts","webpack://@fof/polls/./src/forum/models/PollOption.ts","webpack://@fof/polls/./src/forum/models/PollVote.ts","webpack://@fof/polls/./src/forum/models/index.ts","webpack://@fof/polls/./src/forum/states/PollFormState.js","webpack://@fof/polls/./src/forum/states/PollListState.ts","webpack://@fof/polls/./src/forum/states/PollState.ts","webpack://@fof/polls/./src/forum/utils/PollControls.tsx","webpack://@fof/polls/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Link']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Page']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Placeholder']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/SelectDropdown']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Separator']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/highlight']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Forum']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Post']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/states/PaginatedListState']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/EventEmitter']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/SubtreeRetainer']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/abbreviateNumber']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/computed']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionList']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/LogInModal']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/ReplyComposer']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/utils/slidable']\"","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@fof/polls/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://@fof/polls/webpack/bootstrap","webpack://@fof/polls/webpack/runtime/compat get default export","webpack://@fof/polls/webpack/runtime/define property getters","webpack://@fof/polls/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/polls/webpack/runtime/make namespace object"],"sourcesContent":["export default class Acl {\n static canManagePools(): boolean {\n return true;\n }\n\n static canStartPoll(): boolean {\n return true;\n //app.forum.attribute('canStartPoll') || !app.session.user;\n }\n}\n","export const slug = 'fof-polls';\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport classList from 'flarum/common/utils/classList';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport ReplyComposer from 'flarum/forum/components/ReplyComposer';\n\nimport CreatePollModal from './components/CreatePollModal';\n\nexport const addToComposer = (composer) => {\n composer.prototype.addPoll = function () {\n app.modal.show(CreatePollModal, {\n poll: this.composer.fields.poll,\n onsubmit: (poll) => (this.composer.fields.poll = poll),\n });\n };\n\n // Add button to DiscussionComposer header\n extend(composer.prototype, 'headerItems', function (items) {\n const discussion = this.composer.body?.attrs?.discussion;\n const canStartPoll = discussion?.canStartPoll() ?? app.forum.canStartPolls();\n\n if (canStartPoll) {\n items.add(\n 'polls',\n \n \n {app.translator.trans(`fof-polls.forum.composer_discussion.${this.composer.fields.poll ? 'edit' : 'add'}_poll`)}\n \n ,\n 1\n );\n }\n });\n\n extend(composer.prototype, 'data', function (data) {\n if (this.composer.fields.poll) {\n data.poll = this.composer.fields.poll;\n }\n });\n};\n\nexport default () => {\n addToComposer(DiscussionComposer);\n addToComposer(ReplyComposer);\n};\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport Badge from 'flarum/common/components/Badge';\nimport DiscussionList from 'flarum/forum/components/DiscussionList';\nimport Discussion from 'flarum/common/models/Discussion';\n\nexport default () => {\n extend(DiscussionList.prototype, 'requestParams', (params) => {\n params.include.push('poll');\n });\n\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.hasPoll()) {\n badges.add(\n 'poll',\n Badge.component({\n type: 'poll',\n label: app.translator.trans('fof-polls.forum.tooltip.badge'),\n icon: 'fas fa-signal',\n }),\n 5\n );\n }\n });\n};\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nexport default function addNavItem() {\n extend(IndexPage.prototype, 'navItems', (items) => {\n items.add(\n 'fof-polls-directory',\n LinkButton.component(\n {\n href: app.route('fof_polls_list'),\n icon: 'fas fa-poll',\n },\n app.translator.trans('fof-polls.forum.page.nav')\n ),\n 35\n );\n });\n}\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostPoll from './components/PostPoll';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\n\nexport default () => {\n extend(CommentPost.prototype, 'content', function (content) {\n const post = this.attrs.post;\n\n if ((!post.isHidden() || this.revealContent) && post.polls()) {\n for (const poll of post.polls()) {\n if (poll) {\n content.push();\n }\n }\n }\n });\n\n extend(CommentPost.prototype, 'oninit', function () {\n this.subtree.check(() => {\n const polls = this.attrs.post.polls();\n\n const checks = polls?.map?.(\n (poll) =>\n poll && [\n poll.data?.attributes,\n poll.options().map?.((option) => option?.data?.attributes),\n poll.myVotes().map?.((vote) => vote.option()?.id()),\n ]\n );\n\n return JSON.stringify(checks);\n });\n });\n\n extend(DiscussionPage.prototype, 'oncreate', function () {\n if (app.pusher) {\n app.pusher.then((binding) => {\n // We will listen for updates to all polls and options\n // Even if that model is not in the current discussion, it doesn't really matter\n binding.channels.main.bind('updatedPollOptions', (data) => {\n const poll = app.store.getById('polls', data['pollId']);\n\n if (poll) {\n poll.pushAttributes({\n voteCount: data['pollVoteCount'],\n });\n\n // Not redrawing here, as the option below should trigger the redraw already\n }\n\n const changedOptions = data['options'];\n\n for (const optionId in changedOptions) {\n const option = app.store.getById('poll_options', optionId);\n\n if (option && option.voteCount() !== undefined) {\n option.pushAttributes({\n voteCount: changedOptions[optionId],\n });\n }\n }\n\n m.redraw();\n });\n });\n }\n });\n\n extend(DiscussionPage.prototype, 'onremove', function () {\n if (app.pusher) {\n app.pusher.then((binding) => {\n binding.channels.main.unbind('updatedPollOptions');\n });\n }\n });\n};\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport CreatePollModal from './components/CreatePollModal';\nimport Button from 'flarum/common/components/Button';\n\nexport default () => {\n const createPoll = (post) =>\n app.modal.show(CreatePollModal, {\n onsubmit: (data) =>\n app.store\n .createRecord('polls')\n .save(\n {\n ...data,\n relationships: {\n post,\n },\n },\n {\n data: {\n include: 'options,myVotes,myVotes.option',\n },\n }\n )\n .then((poll) => {\n post.rawRelationship('polls')?.push?.({ type: 'polls', id: poll.id() });\n\n return poll;\n }),\n });\n\n extend(PostControls, 'moderationControls', function (items, post) {\n if (!post.isHidden() && post.canStartPoll()) {\n items.add(\n 'addPoll',\n \n );\n }\n });\n};\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport { slug } from '../../common';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.compose`;\n\nexport default class ComposePollHero extends Component {\n view(): Mithril.Children {\n const { poll } = this.attrs;\n\n return (\n
\n
\n
\n

{t(`${prfx}.${!!poll.id() ? 'edit' : 'add'}_title`)}

\n
\n \n {t(`${prfx}.polls_manager`)}\n \n {poll.exists && (\n \n {t(`${prfx}.polls_preview`)}\n \n )}\n
\n
\n
\n
\n );\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport Poll from './Poll';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollForm from './PollForm';\nimport Acl from '../../common/Acl';\nimport PollFormState from '../states/PollFormState';\nimport { slug } from '../../common';\nimport ComposePollHero from './ComposePollHero';\n\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.compose`;\n\nexport default class ComposePollPage extends Page {\n poll: Poll | null = null;\n\n loading: boolean = false;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n // If user not allowed to manage goodie collections, redirect to home\n if (!Acl.canManagePools()) {\n m.route.set(app.route('home'));\n }\n\n // Get the `edit` parameter from the URL\n const editId = m.route.param('id');\n if (editId) {\n this.poll = app.store.getById('poll', editId);\n\n if (!this.poll) {\n this.loading = true;\n\n app.store.find('fof/polls', editId).then((item) => {\n this.poll = item;\n this.loading = false;\n app.setTitle(t(`${prfx}.${!!this.poll?.id() ? 'edit' : 'add'}_title`));\n m.redraw();\n });\n }\n } else {\n this.poll = PollFormState.createNewPoll();\n }\n\n app.history.push('compose-goodie-collection');\n this.bodyClass = 'App--compose-goodie-collection';\n app.setTitle(t(`${prfx}.${!!this.poll?.id() ? 'edit' : 'add'}_title`));\n }\n\n view(): Mithril.Children {\n if (this.loading) {\n return ;\n }\n\n return (\n
\n \n
\n \n
\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport PollForm from './PollForm';\n\nexport default class CreatePollModal extends Modal {\n title() {\n return app.translator.trans('fof-polls.forum.modal.add_title');\n }\n\n className() {\n return 'PollDiscussionModal Modal--medium';\n }\n\n content() {\n //@todo check if bind is needed for onsubmit\n return [\n
\n \n
,\n ];\n }\n\n onsubmit(poll) {\n this.hide();\n this.attrs.onsubmit(poll);\n }\n}\n","import app from 'flarum/forum/app';\nimport CreatePollModal from './CreatePollModal';\n\nexport default class EditPollModal extends CreatePollModal {\n title() {\n return app.translator.trans('fof-polls.forum.modal.edit_title');\n }\n}\n","import app from 'flarum/forum/app';\n\nimport Modal from 'flarum/common/components/Modal';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport Link from 'flarum/common/components/Link';\nimport Stream from 'flarum/common/utils/Stream';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nexport default class ListVotersModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loading = Stream(true);\n\n app.store\n .find('fof/polls', this.attrs.poll.id(), {\n include: 'votes,votes.user,votes.option',\n })\n .then(() => this.loading(false))\n .finally(() => m.redraw());\n }\n\n className() {\n return 'Modal--medium VotesModal';\n }\n\n title() {\n return app.translator.trans('fof-polls.forum.votes_modal.title');\n }\n\n content() {\n return
{this.loading() ? : this.attrs.poll.options().map(this.optionContent.bind(this))}
;\n }\n\n optionContent(opt) {\n const votes = (this.attrs.poll.votes() || []).filter((v) => opt.id() === v.option().id());\n\n return (\n
\n

{opt.answer() + ':'}

\n\n {votes.length ? (\n
{votes.map(this.voteContent.bind(this))}
\n ) : (\n

{app.translator.trans('fof-polls.forum.modal.no_voters')}

\n )}\n
\n );\n }\n\n voteContent(vote) {\n const user = vote.user();\n const attrs = user && { href: app.route.user(user) };\n\n return (\n \n {avatar(user)} {username(user)}\n \n );\n }\n}\n","import Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport app from 'flarum/forum/app';\nimport PollTitle from './Poll/PollTitle';\nimport PollOptions from './Poll/PollOptions';\nimport PollImage from './Poll/PollImage';\nimport PollDescription from './Poll/PollDescription';\nimport PollModel from '../models/Poll';\nimport PollState from '../states/PollState';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport { slug } from '../../common';\nimport PollControls from '../utils/PollControls';\nimport Dropdown from 'flarum/common/components/Dropdown';\n\n// Make translation calls shorter\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.poll`;\n\ninterface PollAttrs extends ComponentAttrs {\n poll: PollModel;\n}\n\nexport default class Poll extends Component {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n this.state = new PollState(this.attrs.poll);\n }\n\n view(): Mithril.Children {\n const poll = this.attrs.poll;\n const infoItems = this.infoItems(poll.maxVotes());\n const state = this.state;\n const controls = PollControls.controls(poll, this);\n\n controls.add(\n 'view',\n \n );\n\n return (\n
\n {this.controlsView(controls.toArray())}\n
\n \n
\n
\n \n \n
\n
\n Antworten\n \n
\n
\n {!infoItems.isEmpty() &&
{infoItems.toArray()}
}\n\n {state.showButton() && (\n \n )}\n
\n
\n
\n
\n );\n }\n\n deletePoll(): void {\n PollControls.deleteAction(this.attrs.poll);\n }\n\n editPoll(): void {\n PollControls.editAction(this.attrs.poll);\n }\n\n controlsView(controls: Mithril.ChildArray): Mithril.Children {\n return (\n !!controls.length && (\n \n {controls}\n \n )\n );\n }\n\n infoItems(maxVotes: number) {\n const items = new ItemList();\n const poll = this.attrs.poll;\n\n if (app.session.user && !poll.canVote() && !poll.hasEnded()) {\n items.add(\n 'no-permission',\n \n \n {t('fof-polls.forum.no_permission')}\n \n );\n }\n\n if (poll.endDate()) {\n items.add(\n 'end-date',\n \n \n {poll.hasEnded() ? t('fof-polls.forum.poll_ended') : t('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() })}\n \n );\n }\n\n if (poll.canVote()) {\n items.add(\n 'max-votes',\n \n \n {t('fof-polls.forum.max_votes_allowed', { max: maxVotes })}\n \n );\n\n if (!poll.canChangeVote()) {\n items.add(\n 'cannot-change-vote',\n \n \n {t('fof-polls.forum.poll.cannot_change_vote')}\n \n );\n }\n }\n\n return items;\n }\n}\n","import { slug } from '../../common';\nimport Component from 'flarum/common/Component';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport Switch from 'flarum/common/components/Switch';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport extractText from 'flarum/common/utils/extractText';\nimport FormError from './form/FormError';\nimport PollFormState from '../states/PollFormState';\n\n// Make translation calls shorter\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.poll_form`;\n\nexport default class PollForm extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n this.state = new PollFormState(this.attrs.poll);\n\n // state handles poll initialization\n const poll = this.state.poll;\n\n //@todo way the options are destructured into options (answers) and optionImageUrls\n this.options = poll.options();\n this.optionAnswers = this.options.map((o) => Stream(o.answer()));\n this.optionImageUrls = this.options.map((o) => Stream(o.imageUrl()));\n\n this.question = Stream(poll.question());\n this.subtitle = Stream(poll.subtitle());\n this.endDate = Stream(this.formatDate(poll.endDate()));\n this.publicPoll = Stream(poll.publicPoll());\n this.allowMultipleVotes = Stream(poll.allowMultipleVotes());\n this.hideVotes = Stream(poll.hideVotes());\n this.allowChangeVote = Stream(poll.allowChangeVote());\n this.maxVotes = Stream(poll.maxVotes() || 0);\n\n this.datepickerMinDate = this.formatDate(undefined);\n\n // Replace minimum of 'today' for poll end date only if the poll is not already closed\n if (this.endDate() && dayjs(poll.endDate).isAfter(dayjs())) {\n this.datepickerMinDate = this.formatDate(poll.endDate);\n }\n }\n\n view() {\n return (\n
\n
{this.fields().toArray()}
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n 'question',\n
\n \n\n \n
,\n 100\n );\n\n items.add(\n 'subtitle',\n
\n \n\n \n
,\n 95\n );\n\n items.add(\n 'answers',\n
\n \n\n {this.displayOptions()}\n
,\n 80\n );\n\n items.add(\n 'date',\n
\n \n\n
\n \n {Button.component({\n className: 'Button PollModal--button',\n icon: 'fas fa-times',\n onclick: this.endDate.bind(this, null),\n })}\n
\n\n {this.endDate() && (\n

\n \n  \n {dayjs(this.endDate()).isBefore(dayjs())\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(this.endDate()).fromNow() })}\n

\n )}\n
,\n 40\n );\n\n items.add(\n 'public',\n
\n {Switch.component(\n {\n state: this.publicPoll() || false,\n onchange: this.publicPoll,\n },\n app.translator.trans('fof-polls.forum.modal.public_poll_label')\n )}\n
,\n 20\n );\n\n items.add(\n 'hide-votes',\n
\n \n {app.translator.trans('fof-polls.forum.modal.hide_votes_label')}\n \n
,\n 20\n );\n\n items.add(\n 'allow-change-vote',\n
\n \n {app.translator.trans('fof-polls.forum.modal.allow_change_vote_label')}\n \n
,\n 20\n );\n\n items.add(\n 'allow-multiple-votes',\n
\n {Switch.component(\n {\n state: this.allowMultipleVotes() || false,\n onchange: this.allowMultipleVotes,\n },\n app.translator.trans('fof-polls.forum.modal.allow_multiple_votes_label')\n )}\n
,\n 15\n );\n\n if (this.allowMultipleVotes()) {\n items.add(\n 'max-votes',\n
\n \n\n \n\n

{app.translator.trans('fof-polls.forum.modal.max_votes_help')}

\n
,\n 15\n );\n }\n\n items.add(\n 'submit',\n
\n \n {this.state.poll.exists && (\n \n )}\n
,\n -10\n );\n\n return items;\n }\n\n displayOptions() {\n return Object.keys(this.options).map((option, i) => (\n
\n
\n \n {app.forum.attribute('allowPollOptionImage') ? (\n \n ) : null}\n
\n {i >= 2\n ? Button.component({\n type: 'button',\n className: 'Button Button--warning PollModal--button',\n icon: 'fas fa-minus',\n onclick: i >= 2 ? this.removeOption.bind(this, i) : '',\n })\n : ''}\n
\n ));\n }\n\n addOption() {\n const max = Math.max(app.forum.attribute('pollMaxOptions'), 2);\n\n if (this.options.length < max) {\n this.options.push(app.store.createRecord('poll_options'));\n this.optionAnswers.push(Stream(''));\n this.optionImageUrls.push(Stream(''));\n } else {\n alert(extractText(app.translator.trans('fof-polls.forum.modal.max', { max })));\n }\n }\n\n removeOption(i) {\n this.options.splice(i, 1);\n this.optionAnswers.splice(i, 1);\n this.optionImageUrls.splice(i, 1);\n }\n\n data() {\n const options = this.options.map((o, i) => {\n if (!o.data.attributes) o.data.attributes = {};\n\n o.data.attributes.answer = this.optionAnswers[i]();\n o.data.attributes.imageUrl = this.optionImageUrls[i]();\n\n return o.data;\n });\n\n if (this.question() === '') {\n throw new FormError(app.translator.trans('fof-polls.forum.modal.include_question'));\n }\n\n if (options.length < 2) {\n throw new FormError(app.translator.trans('fof-polls.forum.modal.min'));\n }\n\n return {\n question: this.question(),\n subtitle: this.subtitle(),\n endDate: this.dateToTimestamp(this.endDate()),\n publicPoll: this.publicPoll(),\n hideVotes: this.hideVotes(),\n allowChangeVote: this.allowChangeVote(),\n allowMultipleVotes: this.allowMultipleVotes(),\n maxVotes: this.maxVotes(),\n options,\n };\n }\n\n async onsubmit(e) {\n e.preventDefault();\n\n try {\n await this.state.save(this.data());\n\n // Show success alert\n const alertId = app.alerts.show(\n {\n type: 'success',\n controls: [\n \n m.route.set(\n app.route('compose-poll', {\n edit: this.state.collection.id(),\n })\n )\n }\n >\n {t(`${prfx}.continue_editing`)}\n ,\n ],\n },\n t(`${prfx}.success`)\n );\n\n // Hide alert after 10 seconds\n setTimeout(() => app.alerts.dismiss(alertId), 10000);\n\n // Check if we need to call a custom onsubmit callback\n if (this.attrs.onsubmit) {\n this.attrs.onsubmit(this.state.poll);\n } else {\n // Otherwise redirect to pools list\n m.route.set(app.route('polls-manager'));\n }\n } catch (e) {\n if (e instanceof FormError) {\n app.alerts.show({ type: 'error' }, e.message);\n } else {\n // Show error alert\n app.alerts.show({ type: 'error' }, t(`${prfx}.error`));\n }\n } finally {\n this.state.loading = false;\n m.redraw();\n }\n }\n\n async delete() {\n if (!confirm(t(`${prfx}.delete_confirm`))) {\n return;\n }\n\n try {\n await this.state.delete();\n // Show success alert\n const alertId = app.alerts.show({ type: 'success' }, t(`${prfx}.delete_success`));\n\n // Hide alert after 10 seconds\n setTimeout(() => app.alerts.dismiss(alertId), 10000);\n\n // Redirect to polls list\n m.route.set(app.route('polls-manager'));\n } catch (e) {\n // Show error alert\n app.alerts.show({ type: 'error' }, t(`${prfx}.delete_error`));\n }\n }\n\n formatDate(date, def = false) {\n const dayjsDate = dayjs(date);\n\n if (date === false || !dayjsDate.isValid()) return def !== false ? this.formatDate(def) : null;\n\n return dayjsDate.format('YYYY-MM-DDTHH:mm');\n }\n\n dateToTimestamp(date) {\n const dayjsDate = dayjs(date);\n\n if (!date || !dayjsDate.isValid()) return false;\n\n return dayjsDate.format();\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollDescriptionAttrs extends ComponentAttrs {\n text: String;\n}\n\nexport default class PollDescription extends Component {\n view(): Mithril.Children {\n return

{this.attrs.text}

;\n }\n}\n","import * as Mithril from 'mithril';\nimport Component from 'flarum/common/Component';\n\nexport default class PollImage extends Component {\n view(): Mithril.Children {\n return;\n }\n}\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport PollListItem from './PollListItem';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport classList from 'flarum/common/utils/classList';\n\n/**\n * The `PollList` component displays a list of polls.\n */\nexport default class PollList extends Component {\n view() {\n /**\n * @type {import('../../states/PollListState').default}\n */\n const state = this.attrs.state;\n const params = state.getParams();\n const isLoading = state.isInitialLoading() || state.isLoadingNext();\n\n let loading;\n\n if (isLoading) {\n loading = ;\n } else if (state.hasNext()) {\n loading = (\n \n );\n }\n\n if (state.isEmpty()) {\n const text = app.translator.trans('fof-polls.forum.polls_list.empty_text');\n return (\n
\n \n
\n );\n }\n\n const pageSize = state.pageSize;\n\n return (\n
\n
    \n {state.getPages().map((pg) => {\n return pg.items.map((poll) => (\n
  • \n \n
  • \n ));\n })}\n
\n
{loading}
\n
\n );\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport type { PollListParams } from '../../states/PollListState';\nimport SubtreeRetainer from 'flarum/common/utils/SubtreeRetainer';\nimport classList from 'flarum/common/utils/classList';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Link from 'flarum/common/components/Link';\nimport highlight from 'flarum/common/helpers/highlight';\nimport slidable from 'flarum/forum/utils/slidable';\nimport icon from 'flarum/common/helpers/icon';\nimport PollPage from './PollPage';\nimport abbreviateNumber from 'flarum/common/utils/abbreviateNumber';\nimport Poll from '../../models/Poll';\nimport PollControls from '../../utils/PollControls';\nimport { slug } from '../../../common';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\n\n// Make translation calls shorter\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.list`;\n\nexport interface IPollListItemAttrs extends ComponentAttrs {\n poll: Poll;\n params: PollListParams;\n}\n\n/**\n * The `PollListItem` component shows a single poll in the\n * poll list.\n */\nexport default class PollListItem extends Component {\n /**\n * Ensures that the poll will not be redrawn\n * unless new data comes in.\n */\n subtree!: SubtreeRetainer;\n\n highlightRegExp?: RegExp;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.subtree = new SubtreeRetainer(\n () => this.attrs.poll.freshness,\n () => {\n const time = app.session.user && app.session.user.markedAllAsReadAt();\n return time && time.getTime();\n },\n () => this.active()\n );\n }\n\n elementAttrs() {\n return {\n className: classList('PollListItem User', {\n active: this.active(),\n 'PollListItem--hidden': this.attrs.poll.isHidden(),\n Slidable: 'ontouchstart' in window,\n }),\n };\n }\n\n view() {\n const poll = this.attrs.poll;\n\n const controls = PollControls.controls(poll, this).toArray();\n const attrs = this.elementAttrs();\n\n return (\n
\n {this.controlsView(controls)}\n {this.contentView()}\n {this.slidableUnderneathView()}\n
\n );\n }\n\n controlsView(controls: Mithril.ChildArray): Mithril.Children {\n return (\n !!controls.length && (\n \n {controls}\n \n )\n );\n }\n\n slidableUnderneathView(): Mithril.Children {\n const poll = this.attrs.poll;\n const isUnread = poll.isUnread();\n\n return (\n \n {icon('fas fa-check')}\n \n );\n }\n\n contentView(): Mithril.Children {\n const poll = this.attrs.poll;\n // const isUnread = poll.isUnread();\n // const isRead = poll.isRead();\n\n return (\n //
\n
\n {this.mainView()}\n {this.infoView()}\n
\n );\n }\n\n mainView(): Mithril.Children {\n const poll = this.attrs.poll;\n\n return (\n \n

{highlight(poll.question(), this.highlightRegExp)}

\n \n );\n }\n\n infoView() {\n return
    {listItems(this.infoItems().toArray())}
;\n }\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n // If we're on a touch device, set up the discussion row to be slidable.\n // This allows the user to drag the row to either side of the screen to\n // reveal controls.\n if ('ontouchstart' in window) {\n const slidableInstance = slidable(this.element);\n\n this.$('.PollListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());\n }\n }\n\n onbeforeupdate(vnode: Mithril.VnodeDOM) {\n super.onbeforeupdate(vnode);\n\n return this.subtree.needsRebuild();\n }\n\n /**\n * Determine whether or not the discussion is currently being viewed.\n */\n active() {\n return app.current.matches(PollPage, { poll: this.attrs.poll });\n }\n\n /**\n * Mark the poll as read.\n */\n markAsRead() {\n const poll = this.attrs.poll;\n\n if (poll.isUnread()) {\n poll.save({ lastVotedNumber: poll.voteCount() });\n m.redraw();\n }\n }\n\n infoItems(): ItemList {\n const poll = this.attrs.poll;\n const items = new ItemList();\n const active = !poll.hasEnded();\n const activeView = poll.endDate()\n ? [\n icon('fas fa-clock'),\n ' ',\n active ? t('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() }) : t('fof-polls.forum.poll_ended'),\n ]\n : icon('fas fa-om');\n\n items.add('active', {activeView});\n\n items.add(\n 'discussion-count',\n
\n {icon('fas fa-poll fa-fw')}\n {[\n ' ',\n t('fof-user-directory.forum.page.usercard.discussion-count', {\n count: abbreviateNumber(poll.voteCount()),\n }),\n ]}\n
,\n 70\n );\n\n return items;\n }\n}\n","import Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollOptionLabel from './PollOptionLabel';\nimport PollOptionInput from './PollOptionInput';\nimport PollOptionModel from '../../models/PollOption';\n\ninterface PollOptionAttrs extends ComponentAttrs {\n option: PollOptionModel;\n onchange: (e: Event) => void;\n}\n\nexport default class PollOption extends Component {\n view(): Mithril.Children {\n const option = this.attrs.option;\n return (\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollOptionInputAttrs extends ComponentAttrs {\n id: Number; // for example 1\n name: String; // for example privacy-setting\n value: String; // for example Private to Project Members\n isResult?: Boolean;\n onchange: (e: Event) => void;\n}\n\nexport default class PollOptionInput extends Component {\n view(): Mithril.Children {\n const { isResult } = this.attrs;\n return (\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollOptionLabelAttrs extends ComponentAttrs {\n text: String;\n id: Number;\n}\n\nexport default class PollOptionLabel extends Component {\n view(): Mithril.Children {\n return (\n \n {this.attrs.text}\n \n );\n }\n}\n","import Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollOption from './PollOption';\nimport PollOptionModel from '../../models/PollOption';\nimport PollResult from './PollResult';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PollState from '../../states/PollState';\n\ninterface PollOptionsAttrs extends ComponentAttrs {\n options: PollOptionModel[];\n state: PollState;\n}\n\nexport default class PollOptions extends Component {\n view(): Mithril.Children {\n return
{this.pollOptions().toArray()}
;\n }\n\n pollOptions(): ItemList {\n const items = new ItemList();\n const state = this.attrs.state;\n\n if (state.showCheckMarks) {\n this.attrs.options.forEach((option: PollOptionModel): void => {\n items.add('option' + option.id(), );\n });\n } else {\n this.attrs.options.forEach((option: PollOptionModel): void => {\n items.add('result' + option.id(), );\n });\n }\n\n return items;\n }\n}\n","import * as Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\n\nexport default class PollPage extends Page {\n view(): Mithril.Children {\n return

PollPage

;\n }\n}\n","import * as Mithril from 'mithril';\nimport Component from 'flarum/common/Component';\nimport PollOptionLabel from './PollOptionLabel';\nimport PollResultsNumber from './PollResultNumber';\nimport PollOptionInput from './PollOptionInput';\n\nexport default class PollResults extends Component {\n view(): Mithril.Children {\n return (\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollResultsNumberAttrs extends ComponentAttrs {\n number: Number;\n}\n\nexport default class PollResultsNumber extends Component {\n view(): Mithril.Children {\n return {this.attrs.number} %;\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollTitleAttrs extends ComponentAttrs {\n text: String;\n}\n\nexport default class PollTitle extends Component {\n view(): Mithril.Children {\n return

{this.attrs.text}

;\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport listItems from 'flarum/common/helpers/listItems';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Page, { IPageAttrs } from 'flarum/common/components/Page';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport PollList from './Poll/PollList';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport extractText from 'flarum/common/utils/extractText';\nimport PollListState from '../states/PollListState';\nimport Button from 'flarum/common/components/Button';\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\nimport Acl from '../../common/Acl';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollModel from '../models/Poll';\nimport Poll from './Poll';\n\nexport default class PollsPage extends Page {\n loading: boolean = false;\n poll: PollModel | null = null;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n const editId = m.route.param('id');\n if (editId) {\n this.poll = app.store.getById('poll', editId) as PollModel;\n\n if (!this.poll) {\n this.loading = true;\n\n app.store.find('fof/polls', editId).then((item) => {\n this.poll = item;\n this.loading = false;\n app.setTitle(extractText(app.translator.trans('fof-polls.forum.page.poll_detail')));\n m.redraw();\n });\n }\n } else {\n this.initListView();\n }\n }\n\n initListView() {\n this.state = new PollListState({\n sort: m.route.param('sort'),\n filter: m.route.param('filter'),\n });\n\n this.state.refresh();\n\n app.setTitle(extractText(app.translator.trans('fof-polls.forum.page.nav')));\n }\n\n oncreate(vnode: Mithril.Vnode) {\n super.oncreate(vnode);\n }\n\n view(): Mithril.Children {\n if (this.loading) {\n return ;\n }\n\n if (this.poll) {\n return (\n
\n
\n \n
\n
\n );\n }\n\n return (\n
\n {IndexPage.prototype.hero()}\n
\n
\n \n
\n
\n
    {listItems(this.viewItems().toArray())}
\n
    {listItems(this.actionItems().toArray())}
\n
\n \n
\n
\n
\n
\n );\n }\n\n sidebarItems() {\n const items = new ItemList();\n const canStartPoll = Acl.canStartPoll();\n\n items.add(\n 'newGlobalPoll',\n {\n this.newPollAction();\n }}\n disabled={!canStartPoll}\n >\n {app.translator.trans(`fof-polls.forum.poll.${canStartPoll ? 'start_poll_button' : 'cannot_start_poll_button'}`)}\n \n );\n\n items.add(\n 'nav',\n \n {this.navItems().toArray()}\n \n );\n\n return items;\n }\n\n actionItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'refresh',\n Button.component({\n title: app.translator.trans('fof-polls.forum.page.refresh_tooltip'),\n icon: 'fas fa-sync',\n className: 'Button Button--icon',\n onclick: () => {\n this.state.refresh();\n },\n })\n );\n\n return items;\n }\n\n viewItems() {\n return IndexPage.prototype.viewItems();\n }\n navItems() {\n return IndexPage.prototype.navItems();\n }\n\n /**\n * Change to create new poll page\n */\n newPollAction(): void {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n return;\n }\n\n m.route.set(app.route('fof_polls_compose'));\n }\n}\n","import app from 'flarum/forum/app';\n\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport ListVotersModal from './ListVotersModal';\nimport classList from 'flarum/common/utils/classList';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\nimport EditPollModal from './EditPollModal';\n\nexport default class PostPoll extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loadingOptions = false;\n\n this.useSubmitUI = !this.attrs.poll?.canChangeVote() && this.attrs.poll?.allowMultipleVotes();\n this.pendingSubmit = false;\n this.pendingOptions = null;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n this.preventClose = this.preventClose.bind(this);\n window.addEventListener('beforeunload', this.preventClose);\n }\n\n onremove(vnode) {\n super.onremove(vnode);\n\n window.removeEventListener('beforeunload', this.preventClose);\n }\n\n view() {\n const poll = this.attrs.poll;\n const options = poll.options() || [];\n let maxVotes = poll.allowMultipleVotes() ? poll.maxVotes() : 1;\n\n if (maxVotes === 0) maxVotes = options.length;\n\n const infoItems = this.infoItems(maxVotes);\n\n return (\n
\n
\n
\n

{poll.question()}

\n {poll.subtitle() &&

{poll.subtitle()}

}\n
\n\n
\n {poll.canSeeVoters() && (\n \n
\n
\n\n
\n
{options.map(this.viewOption.bind(this))}
\n\n
\n {!infoItems.isEmpty() &&
{infoItems.toArray()}
}\n\n {this.useSubmitUI && this.pendingSubmit && (\n \n )}\n
\n
\n
\n );\n }\n\n infoItems(maxVotes) {\n const items = new ItemList();\n const poll = this.attrs.poll;\n const hasVoted = poll.myVotes()?.length > 0;\n\n if (app.session.user && !poll.canVote() && !poll.hasEnded()) {\n items.add(\n 'no-permission',\n \n \n {app.translator.trans('fof-polls.forum.no_permission')}\n \n );\n }\n\n if (poll.endDate()) {\n items.add(\n 'end-date',\n \n \n {poll.hasEnded()\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() })}\n \n );\n }\n\n if (poll.canVote()) {\n items.add(\n 'max-votes',\n \n \n {app.translator.trans('fof-polls.forum.max_votes_allowed', { max: maxVotes })}\n \n );\n\n if (!poll.canChangeVote()) {\n items.add(\n 'cannot-change-vote',\n \n \n {app.translator.trans('fof-polls.forum.poll.cannot_change_vote')}\n \n );\n }\n }\n\n return items;\n }\n\n viewOption(opt) {\n const poll = this.attrs.poll;\n const hasVoted = poll.myVotes()?.length > 0;\n const totalVotes = poll.voteCount();\n\n const voted = this.pendingOptions ? this.pendingOptions.has(opt.id()) : poll.myVotes()?.some?.((vote) => vote.option() === opt);\n const votes = opt.voteCount();\n const percent = totalVotes > 0 ? Math.round((votes / totalVotes) * 100) : 0;\n\n // isNaN(null) is false, so we have to check type directly now that API always returns the field\n const canSeeVoteCount = typeof votes === 'number';\n const isDisabled = this.loadingOptions || (hasVoted && !poll.canChangeVote());\n const width = canSeeVoteCount ? percent : (Number(voted) / (poll.myVotes()?.length || 1)) * 100;\n\n const showCheckmark = !app.session.user || (!poll.hasEnded() && poll.canVote() && (!hasVoted || poll.canChangeVote()));\n\n const bar = (\n
\n {showCheckmark && (\n \n )}\n\n
\n {opt.answer()}\n {voted && !showCheckmark && icon('fas fa-check-circle', { className: 'PollAnswer-check' })}\n {canSeeVoteCount && {percent}%}\n
\n\n {opt.imageUrl() ? {opt.answer()} : null}\n
\n );\n\n return (\n \n {canSeeVoteCount ? (\n \n {bar}\n \n ) : (\n bar\n )}\n
\n );\n }\n\n changeVote(option, evt) {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n evt.target.checked = false;\n return;\n }\n\n const optionIds = this.pendingOptions || new Set(this.attrs.poll.myVotes().map?.((v) => v.option().id()));\n const isUnvoting = optionIds.delete(option.id());\n const allowsMultiple = this.attrs.poll.allowMultipleVotes();\n\n if (!allowsMultiple) {\n optionIds.clear();\n }\n\n if (!isUnvoting) {\n optionIds.add(option.id());\n }\n\n if (this.useSubmitUI) {\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n return;\n }\n\n return this.submit(optionIds, null, () => (evt.target.checked = isUnvoting));\n }\n\n onsubmit() {\n return this.submit(this.pendingOptions, () => {\n this.pendingOptions = null;\n this.pendingSubmit = false;\n });\n }\n\n submit(optionIds, cb, onerror) {\n this.loadingOptions = true;\n m.redraw();\n\n return app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/fof/polls/${this.attrs.poll.id()}/votes`,\n body: {\n data: {\n optionIds: Array.from(optionIds),\n },\n },\n })\n .then((res) => {\n app.store.pushPayload(res);\n cb?.();\n })\n .catch((err) => {\n onerror?.(err);\n })\n .finally(() => {\n this.loadingOptions = false;\n\n m.redraw();\n });\n }\n\n showVoters() {\n // Load all the votes only when opening the votes list\n app.modal.show(ListVotersModal, {\n poll: this.attrs.poll,\n post: this.attrs.post,\n });\n }\n\n deletePoll() {\n if (confirm(app.translator.trans('fof-polls.forum.moderation.delete_confirm'))) {\n this.attrs.poll.delete().then(() => {\n m.redraw.sync();\n });\n }\n }\n\n /**\n * Attempting to use the `tooltipVisible` attr on the Tooltip component set to 'false' when no vote count\n * caused the tooltip to break on click. This is a workaround to hide the tooltip when no vote count is available,\n * called on 'onremove' of the Tooltip component. It doesn't always work as intended either, but it does the job.\n */\n hideOptionTooltip(vnode) {\n vnode.attrs.tooltipVisible = false;\n vnode.state.updateVisibility();\n }\n\n /**\n * Alert before navigating away using browser's 'beforeunload' event\n */\n preventClose(e) {\n if (this.pendingOptions) {\n e.preventDefault();\n return true;\n }\n }\n}\n","export default class FormError extends Error {}\n","import CreatePollModal from './CreatePollModal';\nimport PostPoll from './PostPoll';\nimport EditPollModal from './EditPollModal';\nimport ListVotersModal from './ListVotersModal';\nimport PollForm from './PollForm';\n\nexport const components = {\n CreatePollModal,\n PostPoll,\n EditPollModal,\n ListVotersModal,\n PollForm,\n};\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport Forum from 'flarum/common/models/Forum';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Poll from './models/Poll';\nimport PollOption from './models/PollOption';\nimport PollVote from './models/PollVote';\nimport PollsPage from './components/PollsPage';\nimport ComposePollPage from './components/ComposePollPage';\n\nexport default [\n new Extend.Routes()\n .add('fof_polls_list', '/polls', PollsPage)\n .add('fof_polls_compose', '/polls/composer', ComposePollPage),\n\n new Extend.Store() //\n .add('polls', Poll)\n .add('poll_options', PollOption)\n .add('poll_votes', PollVote),\n\n new Extend.Model(Post) //\n .hasMany('polls')\n .attribute('canStartPoll'),\n\n new Extend.Model(Forum) //\n .attribute('canStartPolls'),\n\n new Extend.Model(Discussion) //\n .attribute('hasPoll')\n .attribute('canStartPoll'),\n];\n","import app from 'flarum/forum/app';\n\nimport addDiscussionBadge from './addDiscussionBadge';\nimport addComposerItems from './addComposerItems';\nimport addPollsToPost from './addPollsToPost';\nimport addPostControls from './addPostControls';\nimport addNavItem from './addNavItem';\n\nexport * from './components';\nexport * from './models';\n\nimport PollsPage from './components/PollsPage';\n\napp.initializers.add('fof/polls', () => {\n addDiscussionBadge();\n addComposerItems();\n addPollsToPost();\n addPostControls();\n addNavItem();\n});\n\nexport { default as extend } from './extend';\n","import Model from 'flarum/common/Model';\nimport PollOption from './PollOption';\nimport PollVote from './PollVote';\nimport computed from 'flarum/common/utils/computed';\n\nexport default class Poll extends Model {\n question() {\n return Model.attribute('question').call(this);\n }\n\n subtitle() {\n return Model.attribute('subtitle').call(this);\n }\n\n hasEnded() {\n return Model.attribute('hasEnded').call(this);\n }\n\n endDate() {\n return Model.attribute('endDate', Model.transformDate).call(this);\n }\n\n publicPoll() {\n return Model.attribute('publicPoll').call(this);\n }\n\n hideVotes() {\n return Model.attribute('hideVotes').call(this);\n }\n\n allowChangeVote() {\n return Model.attribute('allowChangeVote').call(this);\n }\n\n allowMultipleVotes() {\n return Model.attribute('allowMultipleVotes').call(this);\n }\n\n maxVotes() {\n return Model.attribute('maxVotes').call(this);\n }\n\n voteCount() {\n return Model.attribute('voteCount').call(this);\n }\n\n canVote() {\n return Model.attribute('canVote').call(this);\n }\n\n canEdit() {\n return Model.attribute('canEdit').call(this);\n }\n\n canDelete() {\n return Model.attribute('canDelete').call(this);\n }\n\n canSeeVoters() {\n return Model.attribute('canSeeVoters').call(this);\n }\n\n canChangeVote() {\n return Model.attribute('canChangeVote').call(this);\n }\n\n options() {\n return Model.hasMany('options').call(this);\n }\n\n votes() {\n return Model.hasMany('votes').call(this);\n }\n\n myVotes(): PollVote[] {\n const myVotes = Model.hasMany('myVotes').call(this);\n return myVotes ? (myVotes as PollVote[]) : [];\n }\n\n isGlobal() {\n return Model.attribute('isGlobal').call(this);\n }\n\n isHidden() {\n return computed('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n }\n\n // TODO: These two don't make sense as of now\n isUnread() {\n return false;\n }\n\n apiEndpoint() {\n /** @ts-ignore */\n return `/fof/polls${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Model from 'flarum/common/Model';\nimport Poll from './Poll';\nimport PollVote from './PollVote';\n\nexport default class PollOption extends Model {\n answer() {\n return Model.attribute('answer').call(this);\n }\n\n imageUrl() {\n return Model.attribute('imageUrl').call(this);\n }\n\n voteCount() {\n return Model.attribute('voteCount').call(this);\n }\n\n poll() {\n return Model.hasOne('polls').call(this);\n }\n\n votes() {\n return Model.hasMany('votes').call(this);\n }\n\n apiEndpoint() {\n /** @ts-ignore */\n return `/fof/polls/answers${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Model from 'flarum/common/Model';\nimport Poll from './Poll';\nimport PollOption from './PollOption';\nimport User from 'flarum/common/models/User';\n\nexport default class PollVote extends Model {\n poll() {\n return Model.hasOne('poll').call(this);\n }\n\n option() {\n return Model.hasOne('option').call(this);\n }\n\n user() {\n return Model.hasOne('user').call(this);\n }\n\n pollId() {\n return Model.attribute('pollId').call(this);\n }\n\n optionId() {\n return Model.attribute('optionId').call(this);\n }\n\n apiEndpoint() {\n return `/fof/polls/${this.pollId()}/vote`;\n }\n}\n","import Poll from './Poll';\nimport PollOption from './PollOption';\nimport PollVote from './PollVote';\n\nexport const models = {\n Poll,\n PollOption,\n PollVote,\n};\n","import app from 'flarum/forum/app';\n\nexport default class PollFormState {\n static createNewPoll() {\n const poll = app.store.createRecord('polls');\n poll.pushAttributes({\n question: '',\n endDate: '',\n publicPoll: false,\n allowMultipleVotes: false,\n hideVotes: false,\n allowChangeVote: false,\n maxVotes: 0,\n });\n poll.pushData({ relationships: { options: [] } });\n return poll;\n }\n\n constructor(poll) {\n if (!poll) {\n poll = PollFormState.createNewPoll();\n }\n\n this.loading = false;\n this.deleting = false;\n this.poll = poll;\n this.expandedGroup = 'setup';\n }\n\n isExpanded(groupKey) {\n return this.expandedGroup === groupKey;\n }\n\n expand(groupKey) {\n this.expandedGroup = groupKey;\n m.redraw();\n }\n\n async save(data) {\n this.loading = true;\n m.redraw();\n\n try {\n this.poll = await this.poll.save(data);\n } finally {\n this.loading = false;\n m.redraw();\n }\n }\n\n async delete() {\n this.loading = true;\n m.redraw();\n\n try {\n await this.poll.delete();\n this.deleting = true;\n } finally {\n this.loading = false;\n m.redraw();\n }\n }\n}\n","import app from 'flarum/forum/app';\nimport PaginatedListState, { Page, PaginatedListParams, PaginatedListRequestParams } from 'flarum/common/states/PaginatedListState';\nimport Poll from '../models/Poll';\nimport { ApiResponsePlural } from 'flarum/common/Store';\nimport EventEmitter from 'flarum/common/utils/EventEmitter';\n\nexport interface PollListParams extends PaginatedListParams {\n sort?: string;\n}\n\nconst globalEventEmitter = new EventEmitter();\n\nexport default class PollListState

extends PaginatedListState {\n protected extraPolls: Poll[] = [];\n protected eventEmitter: EventEmitter;\n\n constructor(params: P, page: number = 1) {\n super(params, page, 20);\n\n this.eventEmitter = globalEventEmitter.on('poll.deleted', this.deletePoll.bind(this));\n }\n\n get type(): string {\n return 'fof/polls';\n }\n\n requestParams(): PaginatedListRequestParams {\n const params = {\n include: ['options', 'votes'],\n filter: this.params.filter || {},\n sort: this.sortMap()[this.params.sort ?? ''],\n };\n\n if (this.params.q) {\n params.filter.q = this.params.q;\n }\n\n return params;\n }\n\n protected loadPage(page: number = 1): Promise> {\n const preloadedPolls = app.preloadedApiDocument();\n\n if (preloadedPolls) {\n this.initialLoading = false;\n\n return Promise.resolve(preloadedPolls);\n }\n\n return super.loadPage(page);\n }\n\n clear(): void {\n super.clear();\n\n this.extraPolls = [];\n }\n\n /**\n * Get a map of sort keys (which appear in the URL, and are used for\n * translation) to the API sort value that they represent.\n */\n sortMap() {\n const map: any = {};\n\n if (this.params.q) {\n map.relevance = '';\n }\n map.newest = '-createdAt';\n map.oldest = 'createdAt';\n\n return map;\n }\n\n /**\n * In the last request, has the user searched for a poll?\n */\n isSearchResults(): boolean {\n return !!this.params.q;\n }\n\n removePoll(poll: Poll): void {\n this.eventEmitter.emit('poll.deleted', poll);\n }\n\n deletePoll(poll: Poll): void {\n for (const page of this.pages) {\n const index = page.items.indexOf(poll);\n\n if (index !== -1) {\n page.items.splice(index, 1);\n break;\n }\n }\n\n const index = this.extraPolls.indexOf(poll);\n\n if (index !== -1) {\n this.extraPolls.splice(index);\n }\n\n m.redraw();\n }\n\n /**\n * Add a poll to the top of the list.\n */\n addPoll(poll: Poll): void {\n this.removePoll(poll);\n this.extraPolls.unshift(poll);\n\n m.redraw();\n }\n\n protected getAllItems(): Poll[] {\n return this.extraPolls.concat(super.getAllItems());\n }\n\n public getPages(): Page[] {\n const pages = super.getPages();\n\n if (this.extraPolls.length) {\n return [\n {\n number: -1,\n items: this.extraPolls,\n },\n ...pages,\n ];\n }\n\n return pages;\n }\n}\n","import app from 'flarum/forum/app';\nimport Poll from '../models/Poll';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport PollOption from '../models/PollOption';\nimport PollVote from '../models/PollVote';\nimport ListVotersModal from '../components/ListVotersModal';\n\nexport default class PollState {\n protected poll: Poll;\n protected pendingSubmit: boolean;\n protected pendingOptions: Set | null;\n public loadingOptions: boolean;\n public useSubmitUI: boolean;\n public showCheckMarks: boolean;\n\n constructor(poll: Poll) {\n this.poll = poll;\n this.pendingSubmit = false;\n this.pendingOptions = null;\n this.loadingOptions = false;\n this.useSubmitUI = !poll?.canChangeVote() && poll?.allowMultipleVotes();\n this.showCheckMarks = !app.session.user || (!poll.hasEnded() && poll.canVote() && (!this.hasVoted() || poll.canChangeVote()));\n }\n\n hasVoted() {\n return this.poll.myVotes().length > 0;\n }\n\n showButton() {\n return this.useSubmitUI && this.pendingSubmit;\n }\n\n changeVote(option: PollOption, evt: Event) {\n const target = evt.target as HTMLInputElement;\n\n if (!app.session.user) {\n app.modal.show(LogInModal);\n target.checked = false;\n return;\n }\n\n const optionIds = this.pendingOptions || new Set(this.poll.myVotes().map((v: PollVote) => v.option().id()));\n const isUnvoting = optionIds.delete(option.id()!);\n const allowsMultiple = this.poll.allowMultipleVotes();\n\n if (!allowsMultiple) {\n optionIds.clear();\n }\n\n if (!isUnvoting) {\n optionIds.add(option.id()!);\n }\n\n if (this.useSubmitUI) {\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n return;\n }\n\n return this.submit(optionIds, null, () => (target.checked = isUnvoting));\n }\n\n onsubmit() {\n return this.submit(this.pendingOptions!, () => {\n this.pendingOptions = null;\n this.pendingSubmit = false;\n });\n }\n\n submit(optionIds: Set, cb: Function | null, onerror: Function | null = null) {\n this.loadingOptions = true;\n m.redraw();\n\n return app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/fof/polls/${this.poll.id()}/votes`,\n body: {\n data: {\n optionIds: Array.from(optionIds),\n },\n },\n })\n .then((res) => {\n app.store.pushPayload(res);\n cb?.();\n })\n .catch((err) => {\n onerror?.(err);\n })\n .finally(() => {\n this.loadingOptions = false;\n\n m.redraw();\n });\n }\n\n showVoters = () => {\n // Load all the votes only when opening the votes list\n app.modal.show(ListVotersModal, {\n poll: this.poll,\n });\n };\n\n /**\n * Attempting to use the `tooltipVisible` attr on the Tooltip component set to 'false' when no vote count\n * caused the tooltip to break on click. This is a workaround to hide the tooltip when no vote count is available,\n * called on 'onremove' of the Tooltip component. It doesn't always work as intended either, but it does the job.\n */\n hideOptionTooltip(vnode) {\n vnode.attrs.tooltipVisible = false;\n vnode.state.updateVisibility();\n }\n\n /**\n * Alert before navigating away using browser's 'beforeunload' event\n */\n preventClose = (e: Event): boolean | void => {\n if (this.pendingOptions) {\n e.preventDefault();\n return true;\n }\n };\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Poll from '../models/Poll';\nimport Component from 'flarum/common/Component';\nimport { slug } from '../../common';\nimport ComposePollPage from '../components/ComposePollPage';\nimport PollsPage from '../components/PollsPage';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Separator from 'flarum/common/components/Separator';\nimport Button from 'flarum/common/components/Button';\nimport Link from 'flarum/common/components/Link';\n\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.poll_controls`;\n\n/**\n * The `UserControls` utility constructs a list of buttons for a user which\n * perform actions on it.\n */\nexport default {\n /**\n * Get a list of controls for a user.\n */\n controls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n ['poll', 'moderation', 'destructive'].forEach((section) => {\n const controls: Mithril.Children[] = this[section + 'Controls'](poll, context).toArray();\n if (controls.length) {\n controls.forEach((item) => items.add(item.itemName, item));\n items.add(section + 'Separator', );\n }\n });\n\n return items;\n },\n\n /**\n * Get controls for direkt modifcation actions on polls (e.g. vote, view voters).\n */\n pollControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n items.add('view', {t(`${prfx}.view_label`)});\n\n return items;\n },\n\n /**\n * Get controls for a user pertaining to moderation (e.g. suspend, edit).\n */\n moderationControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n if (poll.canEdit()) {\n items.add(\n 'edit',\n \n );\n }\n\n return items;\n },\n\n /**\n * Get controls for a user which are destructive (e.g. delete).\n * @protected\n */\n destructiveControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n if (poll.canDelete()) {\n items.add(\n 'delete',\n \n );\n }\n\n return items;\n },\n\n /**\n * Delete the user.\n */\n deleteAction(poll: Poll): void {\n if (!confirm(t(`${prfx}.delete_confirmation`))) {\n return;\n }\n\n poll\n .delete()\n .then(() => {\n this.showDeletionAlert(poll, 'success');\n if (app.current.matches(ComposePollPage, { id: poll.id() }) || app.current.matches(PollsPage, { id: poll.id() })) {\n app.history.back();\n } else {\n window.location.reload();\n }\n })\n .catch(() => this.showDeletionAlert(poll, 'error'));\n },\n\n /**\n * Show deletion alert of poll\n */\n showDeletionAlert(poll: Poll, type: string): void {\n const message = {\n success: `${prfx}.delete_success_message`,\n error: `${prfx}.delete_error_message`,\n }[type]!;\n\n app.alerts.show({ type }, t(message, { poll: poll }));\n },\n\n /**\n * Edit the poll.\n */\n editAction(poll: Poll): void {\n m.route.set(app.route('fof_polls_compose', { id: poll.id() }));\n },\n};\n","module.exports = flarum.core.compat['common/Component'];","module.exports = flarum.core.compat['common/Model'];","module.exports = flarum.core.compat['common/components/Badge'];","module.exports = flarum.core.compat['common/components/Button'];","module.exports = flarum.core.compat['common/components/Dropdown'];","module.exports = flarum.core.compat['common/components/Link'];","module.exports = flarum.core.compat['common/components/LinkButton'];","module.exports = flarum.core.compat['common/components/LoadingIndicator'];","module.exports = flarum.core.compat['common/components/Modal'];","module.exports = flarum.core.compat['common/components/Page'];","module.exports = flarum.core.compat['common/components/Placeholder'];","module.exports = flarum.core.compat['common/components/SelectDropdown'];","module.exports = flarum.core.compat['common/components/Separator'];","module.exports = flarum.core.compat['common/components/Switch'];","module.exports = flarum.core.compat['common/components/Tooltip'];","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['common/extenders'];","module.exports = flarum.core.compat['common/helpers/avatar'];","module.exports = flarum.core.compat['common/helpers/highlight'];","module.exports = flarum.core.compat['common/helpers/icon'];","module.exports = flarum.core.compat['common/helpers/listItems'];","module.exports = flarum.core.compat['common/helpers/username'];","module.exports = flarum.core.compat['common/models/Discussion'];","module.exports = flarum.core.compat['common/models/Forum'];","module.exports = flarum.core.compat['common/models/Post'];","module.exports = flarum.core.compat['common/states/PaginatedListState'];","module.exports = flarum.core.compat['common/utils/EventEmitter'];","module.exports = flarum.core.compat['common/utils/ItemList'];","module.exports = flarum.core.compat['common/utils/Stream'];","module.exports = flarum.core.compat['common/utils/SubtreeRetainer'];","module.exports = flarum.core.compat['common/utils/abbreviateNumber'];","module.exports = flarum.core.compat['common/utils/classList'];","module.exports = flarum.core.compat['common/utils/computed'];","module.exports = flarum.core.compat['common/utils/extractText'];","module.exports = flarum.core.compat['forum/app'];","module.exports = flarum.core.compat['forum/components/CommentPost'];","module.exports = flarum.core.compat['forum/components/DiscussionComposer'];","module.exports = flarum.core.compat['forum/components/DiscussionList'];","module.exports = flarum.core.compat['forum/components/DiscussionPage'];","module.exports = flarum.core.compat['forum/components/IndexPage'];","module.exports = flarum.core.compat['forum/components/LogInModal'];","module.exports = flarum.core.compat['forum/components/ReplyComposer'];","module.exports = flarum.core.compat['forum/utils/PostControls'];","module.exports = flarum.core.compat['forum/utils/slidable'];","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","export default function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : String(i);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["Acl","canManagePools","canStartPoll","default","slug","app","extend","classList","DiscussionComposer","ReplyComposer","CreatePollModal","addToComposer","composer","prototype","addPoll","_this","modal","show","poll","fields","onsubmit","items","_this$composer$body","_discussion$canStartP","discussion","body","attrs","forum","canStartPolls","add","m","className","onclick","bind","translator","trans","data","Badge","DiscussionList","Discussion","params","include","push","badges","hasPoll","component","type","label","icon","IndexPage","LinkButton","addNavItem","href","route","CommentPost","PostPoll","DiscussionPage","content","post","isHidden","revealContent","polls","_iterator","_createForOfIteratorHelperLoose","_step","done","value","subtree","check","checks","map","_poll$data","_poll$options$map","_poll$options","_poll$myVotes$map","_poll$myVotes","attributes","options","call","option","_option$data","myVotes","vote","_vote$option","id","JSON","stringify","pusher","then","binding","channels","main","store","getById","pushAttributes","voteCount","changedOptions","optionId","undefined","redraw","unbind","PostControls","Button","createPoll","createRecord","save","_extends","relationships","_post$rawRelationship","rawRelationship","Component","t","prfx","ComposePollHero","_Component","_inheritsLoose","apply","arguments","_proto","view","itemClassName","exists","external","target","Page","LoadingIndicator","PollForm","PollFormState","ComposePollPage","_Page","_len","length","args","Array","_key","concat","loading","oninit","vnode","_this2","_this$poll","set","editId","param","find","item","_this2$poll","setTitle","createNewPoll","history","bodyClass","Modal","_Modal","title","hide","EditPollModal","_CreatePollModal","avatar","username","Link","Stream","ListVotersModal","optionContent","opt","votes","filter","v","answer","voteContent","user","PollTitle","PollOptions","PollImage","PollDescription","PollState","ItemList","PollControls","Dropdown","Poll","state","infoItems","maxVotes","controls","showVoters","controlsView","toArray","image","text","question","isEmpty","showButton","loadingOptions","deletePoll","deleteAction","editPoll","editAction","menuClassName","buttonClassName","accessibleToggleLabel","session","canVote","hasEnded","endDate","time","dayjs","fromNow","max","canChangeVote","hasVoted","Switch","extractText","FormError","optionAnswers","o","optionImageUrls","imageUrl","subtitle","formatDate","publicPoll","allowMultipleVotes","hideVotes","allowChangeVote","datepickerMinDate","isAfter","name","bidi","addOption","displayOptions","min","isBefore","onchange","disabled","deleting","Object","keys","i","placeholder","attribute","removeOption","Math","alert","splice","dateToTimestamp","_onsubmit","_asyncToGenerator","_regeneratorRuntime","mark","_callee","e","_this3","alertId","wrap","_callee$","_context","prev","next","preventDefault","alerts","edit","collection","setTimeout","dismiss","t0","message","finish","stop","_x","_delete2","_callee2","_callee2$","_context2","confirm","abrupt","_delete","date","def","dayjsDate","isValid","format","PollListItem","Placeholder","PollList","getParams","isLoading","isInitialLoading","isLoadingNext","hasNext","loadNext","pageSize","isSearchResults","getPages","pg","key","SubtreeRetainer","highlight","slidable","PollPage","abbreviateNumber","listItems","highlightRegExp","freshness","markedAllAsReadAt","getTime","active","elementAttrs","Slidable","window","contentView","slidableUnderneathView","isUnread","markAsRead","mainView","infoView","oncreate","slidableInstance","element","$","on","reset","onbeforeupdate","needsRebuild","current","matches","lastVotedNumber","activeView","count","PollOptionLabel","PollOptionInput","PollOption","isResult","style","opacity","PollResult","pollOptions","showCheckMarks","forEach","changeVote","PollResultsNumber","PollResults","number","step","LogInModal","PollListState","SelectDropdown","PollsPage","initListView","sort","refresh","hero","sidebarItems","viewItems","actionItems","newPollAction","navItems","_this4","Tooltip","_this$attrs$poll","_this$attrs$poll2","useSubmitUI","pendingSubmit","pendingOptions","preventClose","addEventListener","onremove","removeEventListener","canSeeVoters","canEdit","canDelete","viewOption","_poll$myVotes2","_poll$myVotes3","_poll$myVotes4","totalVotes","voted","has","some","percent","round","canSeeVoteCount","isDisabled","width","Number","showCheckmark","bar","checked","src","alt","hideOptionTooltip","evt","_this$attrs$poll$myVo","_this$attrs$poll$myVo2","optionIds","Set","isUnvoting","allowsMultiple","clear","size","submit","cb","onerror","request","method","url","from","res","pushPayload","err","sync","tooltipVisible","updateVisibility","_Error","_wrapNativeSuper","Error","components","Extend","Post","Forum","PollVote","Routes","Store","Model","hasMany","addDiscussionBadge","addComposerItems","addPollsToPost","addPostControls","initializers","computed","_Model","transformDate","isGlobal","hiddenAt","apiEndpoint","hasOne","pollId","models","pushData","expandedGroup","isExpanded","groupKey","expand","_save","sent","PaginatedListState","EventEmitter","globalEventEmitter","_PaginatedListState","page","extraPolls","eventEmitter","_assertThisInitialized","requestParams","_this$params$sort","sortMap","q","loadPage","preloadedPolls","preloadedApiDocument","initialLoading","Promise","resolve","relevance","newest","oldest","removePoll","emit","pages","index","indexOf","unshift","getAllItems","_createClass","get","Separator","context","section","itemName","pollControls","moderationControls","destructiveControls","showDeletionAlert","back","location","reload","success","error","_typeof","require","module","exports","__esModule","r","n","hasOwnProperty","defineProperty","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","Generator","create","Context","makeInvokeMethod","tryCatch","arg","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","values","g","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","TypeError","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","isNaN","displayName","isGeneratorFunction","constructor","setPrototypeOf","__proto__","awrap","async","reverse","pop","charAt","slice","rval","handle","complete","_catch","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","self","ReferenceError","asyncGeneratorStep","gen","reject","_next","_throw","info","fn","isNativeReflectConstruct","_construct","Reflect","construct","toPropertyKey","_defineProperties","props","descriptor","Constructor","protoProps","staticProps","assign","source","_getPrototypeOf","subClass","superClass","_isNativeFunction","toString","_isNativeReflectConstruct","Boolean","valueOf","_setPrototypeOf","toPrimitive","String","isNativeFunction","Class","_cache","Map","Wrapper"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":";;;;;;;;;;;;;;IAAqBA,GAAG;EAAA,SAAAA,IAAA;EAAAA,GAAA,CACfC,cAAc,GAArB,SAAAA,eAAA,EAAiC;IAC/B,OAAO,IAAI;EACb,CAAC;EAAAD,GAAA,CAEME,YAAY,GAAnB,SAAAA,aAAA,EAA+B;IAC7B,OAAO,IAAI;IACX;EACF,CAAC;EAAA,OAAAF,GAAA;AAAA;;;;;;;;;;;;;;;;ACRI,IAAMI,IAAI,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAI;AAEW;AACQ;AACsB;AACV;AAEP;AAEpD,IAAMO,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,QAAQ,EAAK;EACzCA,QAAQ,CAACC,SAAS,CAACC,OAAO,GAAG,YAAY;IAAA,IAAAC,KAAA;IACvCV,6DA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;QACXje,KAAK,EAAEyhB,OAAO;QACdrG,UAAU,EAAE,KAAK;QACjBE,QAAQ,EAAE,IAAI;QACdD,YAAY,EAAE;MAChB;IACF,CAAC,CAAC;IACF,OAAO6C,8DAAc,CAACuD,OAAO,EAAEH,KAAK,CAAC;EACvC,CAAC;EACD,OAAO9L,gBAAgB,CAAC8L,KAAK,CAAC;AAChC;;;;;;UC7BA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D","sources":["webpack://@fof/polls/./src/common/Acl.tsx","webpack://@fof/polls/./src/common/index.js","webpack://@fof/polls/./src/forum/addComposerItems.js","webpack://@fof/polls/./src/forum/addDiscussionBadge.js","webpack://@fof/polls/./src/forum/addNavItem.ts","webpack://@fof/polls/./src/forum/addPollsToPost.js","webpack://@fof/polls/./src/forum/addPostControls.js","webpack://@fof/polls/./src/forum/components/ComposePollHero.tsx","webpack://@fof/polls/./src/forum/components/ComposePollPage.tsx","webpack://@fof/polls/./src/forum/components/CreatePollModal.js","webpack://@fof/polls/./src/forum/components/EditPollModal.js","webpack://@fof/polls/./src/forum/components/ListVotersModal.js","webpack://@fof/polls/./src/forum/components/Poll.tsx","webpack://@fof/polls/./src/forum/components/PollForm.js","webpack://@fof/polls/./src/forum/components/Poll/PollDescription.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollImage.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollList.js","webpack://@fof/polls/./src/forum/components/Poll/PollListItem.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOption.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptionInput.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptionLabel.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptions.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollPage.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollResult.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollResultNumber.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollTitle.tsx","webpack://@fof/polls/./src/forum/components/PollsPage.tsx","webpack://@fof/polls/./src/forum/components/PostPoll.js","webpack://@fof/polls/./src/forum/components/form/FormError.js","webpack://@fof/polls/./src/forum/components/index.ts","webpack://@fof/polls/./src/forum/extend.ts","webpack://@fof/polls/./src/forum/index.ts","webpack://@fof/polls/./src/forum/models/Poll.ts","webpack://@fof/polls/./src/forum/models/PollOption.ts","webpack://@fof/polls/./src/forum/models/PollVote.ts","webpack://@fof/polls/./src/forum/models/index.ts","webpack://@fof/polls/./src/forum/states/PollFormState.js","webpack://@fof/polls/./src/forum/states/PollListState.ts","webpack://@fof/polls/./src/forum/states/PollState.ts","webpack://@fof/polls/./src/forum/utils/PollControls.tsx","webpack://@fof/polls/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Link']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Page']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Placeholder']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/SelectDropdown']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Separator']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/highlight']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Forum']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Post']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/states/PaginatedListState']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/EventEmitter']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/SubtreeRetainer']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/abbreviateNumber']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/computed']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionList']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/LogInModal']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/ReplyComposer']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/utils/slidable']\"","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@fof/polls/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://@fof/polls/webpack/bootstrap","webpack://@fof/polls/webpack/runtime/compat get default export","webpack://@fof/polls/webpack/runtime/define property getters","webpack://@fof/polls/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/polls/webpack/runtime/make namespace object"],"sourcesContent":["export default class Acl {\n static canManagePools(): boolean {\n return true;\n }\n\n static canStartPoll(): boolean {\n return true;\n //app.forum.attribute('canStartPoll') || !app.session.user;\n }\n}\n","export const slug = 'fof-polls';\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport classList from 'flarum/common/utils/classList';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport ReplyComposer from 'flarum/forum/components/ReplyComposer';\n\nimport CreatePollModal from './components/CreatePollModal';\n\nexport const addToComposer = (composer) => {\n composer.prototype.addPoll = function () {\n app.modal.show(CreatePollModal, {\n poll: this.composer.fields.poll,\n onsubmit: (poll) => (this.composer.fields.poll = poll),\n });\n };\n\n // Add button to DiscussionComposer header\n extend(composer.prototype, 'headerItems', function (items) {\n const discussion = this.composer.body?.attrs?.discussion;\n const canStartPoll = discussion?.canStartPoll() ?? app.forum.canStartPolls();\n\n if (canStartPoll) {\n items.add(\n 'polls',\n \n \n {app.translator.trans(`fof-polls.forum.composer_discussion.${this.composer.fields.poll ? 'edit' : 'add'}_poll`)}\n \n ,\n 1\n );\n }\n });\n\n extend(composer.prototype, 'data', function (data) {\n if (this.composer.fields.poll) {\n data.poll = this.composer.fields.poll;\n }\n });\n};\n\nexport default () => {\n addToComposer(DiscussionComposer);\n addToComposer(ReplyComposer);\n};\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport Badge from 'flarum/common/components/Badge';\nimport DiscussionList from 'flarum/forum/components/DiscussionList';\nimport Discussion from 'flarum/common/models/Discussion';\n\nexport default () => {\n extend(DiscussionList.prototype, 'requestParams', (params) => {\n params.include.push('poll');\n });\n\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.hasPoll()) {\n badges.add(\n 'poll',\n Badge.component({\n type: 'poll',\n label: app.translator.trans('fof-polls.forum.tooltip.badge'),\n icon: 'fas fa-signal',\n }),\n 5\n );\n }\n });\n};\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nexport default function addNavItem() {\n extend(IndexPage.prototype, 'navItems', (items) => {\n items.add(\n 'fof-polls-directory',\n LinkButton.component(\n {\n href: app.route('fof_polls_list'),\n icon: 'fas fa-poll',\n },\n app.translator.trans('fof-polls.forum.page.nav')\n ),\n 35\n );\n });\n}\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostPoll from './components/PostPoll';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\n\nexport default () => {\n extend(CommentPost.prototype, 'content', function (content) {\n const post = this.attrs.post;\n\n if ((!post.isHidden() || this.revealContent) && post.polls()) {\n for (const poll of post.polls()) {\n if (poll) {\n content.push();\n }\n }\n }\n });\n\n extend(CommentPost.prototype, 'oninit', function () {\n this.subtree.check(() => {\n const polls = this.attrs.post.polls();\n\n const checks = polls?.map?.(\n (poll) =>\n poll && [\n poll.data?.attributes,\n poll.options().map?.((option) => option?.data?.attributes),\n poll.myVotes().map?.((vote) => vote.option()?.id()),\n ]\n );\n\n return JSON.stringify(checks);\n });\n });\n\n extend(DiscussionPage.prototype, 'oncreate', function () {\n if (app.pusher) {\n app.pusher.then((binding) => {\n // We will listen for updates to all polls and options\n // Even if that model is not in the current discussion, it doesn't really matter\n binding.channels.main.bind('updatedPollOptions', (data) => {\n const poll = app.store.getById('polls', data['pollId']);\n\n if (poll) {\n poll.pushAttributes({\n voteCount: data['pollVoteCount'],\n });\n\n // Not redrawing here, as the option below should trigger the redraw already\n }\n\n const changedOptions = data['options'];\n\n for (const optionId in changedOptions) {\n const option = app.store.getById('poll_options', optionId);\n\n if (option && option.voteCount() !== undefined) {\n option.pushAttributes({\n voteCount: changedOptions[optionId],\n });\n }\n }\n\n m.redraw();\n });\n });\n }\n });\n\n extend(DiscussionPage.prototype, 'onremove', function () {\n if (app.pusher) {\n app.pusher.then((binding) => {\n binding.channels.main.unbind('updatedPollOptions');\n });\n }\n });\n};\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport CreatePollModal from './components/CreatePollModal';\nimport Button from 'flarum/common/components/Button';\n\nexport default () => {\n const createPoll = (post) =>\n app.modal.show(CreatePollModal, {\n onsubmit: (data) =>\n app.store\n .createRecord('polls')\n .save(\n {\n ...data,\n relationships: {\n post,\n },\n },\n {\n data: {\n include: 'options,myVotes,myVotes.option',\n },\n }\n )\n .then((poll) => {\n post.rawRelationship('polls')?.push?.({ type: 'polls', id: poll.id() });\n\n return poll;\n }),\n });\n\n extend(PostControls, 'moderationControls', function (items, post) {\n if (!post.isHidden() && post.canStartPoll()) {\n items.add(\n 'addPoll',\n \n );\n }\n });\n};\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport { slug } from '../../common';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.compose`;\n\nexport default class ComposePollHero extends Component {\n view(): Mithril.Children {\n const { poll } = this.attrs;\n\n return (\n

\n
\n
\n

{t(`${prfx}.${!!poll.id() ? 'edit' : 'add'}_title`)}

\n
\n \n {t(`${prfx}.polls_manager`)}\n \n {poll.exists && (\n \n {t(`${prfx}.polls_preview`)}\n \n )}\n
\n
\n
\n
\n );\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport Poll from './Poll';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollForm from './PollForm';\nimport Acl from '../../common/Acl';\nimport PollFormState from '../states/PollFormState';\nimport { slug } from '../../common';\nimport ComposePollHero from './ComposePollHero';\n\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.compose`;\n\nexport default class ComposePollPage extends Page {\n poll: Poll | null = null;\n\n loading: boolean = false;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n // If user not allowed to manage goodie collections, redirect to home\n if (!Acl.canManagePools()) {\n m.route.set(app.route('home'));\n }\n\n // Get the `edit` parameter from the URL\n const editId = m.route.param('id');\n if (editId) {\n this.poll = app.store.getById('poll', editId);\n\n if (!this.poll) {\n this.loading = true;\n\n app.store.find('fof/polls', editId).then((item) => {\n this.poll = item;\n this.loading = false;\n app.setTitle(t(`${prfx}.${!!this.poll?.id() ? 'edit' : 'add'}_title`));\n m.redraw();\n });\n }\n } else {\n this.poll = PollFormState.createNewPoll();\n }\n\n app.history.push('compose-goodie-collection');\n this.bodyClass = 'App--compose-goodie-collection';\n app.setTitle(t(`${prfx}.${!!this.poll?.id() ? 'edit' : 'add'}_title`));\n }\n\n view(): Mithril.Children {\n if (this.loading) {\n return ;\n }\n\n return (\n
\n \n
\n \n
\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport PollForm from './PollForm';\n\nexport default class CreatePollModal extends Modal {\n title() {\n return app.translator.trans('fof-polls.forum.modal.add_title');\n }\n\n className() {\n return 'PollDiscussionModal Modal--medium';\n }\n\n content() {\n //@todo check if bind is needed for onsubmit\n return [\n
\n \n
,\n ];\n }\n\n onsubmit(poll) {\n this.hide();\n this.attrs.onsubmit(poll);\n }\n}\n","import app from 'flarum/forum/app';\nimport CreatePollModal from './CreatePollModal';\n\nexport default class EditPollModal extends CreatePollModal {\n title() {\n return app.translator.trans('fof-polls.forum.modal.edit_title');\n }\n}\n","import app from 'flarum/forum/app';\n\nimport Modal from 'flarum/common/components/Modal';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport Link from 'flarum/common/components/Link';\nimport Stream from 'flarum/common/utils/Stream';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nexport default class ListVotersModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loading = Stream(true);\n\n app.store\n .find('fof/polls', this.attrs.poll.id(), {\n include: 'votes,votes.user,votes.option',\n })\n .then(() => this.loading(false))\n .finally(() => m.redraw());\n }\n\n className() {\n return 'Modal--medium VotesModal';\n }\n\n title() {\n return app.translator.trans('fof-polls.forum.votes_modal.title');\n }\n\n content() {\n return
{this.loading() ? : this.attrs.poll.options().map(this.optionContent.bind(this))}
;\n }\n\n optionContent(opt) {\n const votes = (this.attrs.poll.votes() || []).filter((v) => opt.id() === v.option().id());\n\n return (\n
\n

{opt.answer() + ':'}

\n\n {votes.length ? (\n
{votes.map(this.voteContent.bind(this))}
\n ) : (\n

{app.translator.trans('fof-polls.forum.modal.no_voters')}

\n )}\n
\n );\n }\n\n voteContent(vote) {\n const user = vote.user();\n const attrs = user && { href: app.route.user(user) };\n\n return (\n \n {avatar(user)} {username(user)}\n \n );\n }\n}\n","import Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport app from 'flarum/forum/app';\nimport PollTitle from './Poll/PollTitle';\nimport PollOptions from './Poll/PollOptions';\nimport PollImage from './Poll/PollImage';\nimport PollDescription from './Poll/PollDescription';\nimport PollModel from '../models/Poll';\nimport PollState from '../states/PollState';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport { slug } from '../../common';\nimport PollControls from '../utils/PollControls';\nimport Dropdown from 'flarum/common/components/Dropdown';\n\n// Make translation calls shorter\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.poll`;\n\ninterface PollAttrs extends ComponentAttrs {\n poll: PollModel;\n}\n\nexport default class Poll extends Component {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n this.state = new PollState(this.attrs.poll);\n }\n\n view(): Mithril.Children {\n const poll = this.attrs.poll;\n const infoItems = this.infoItems(poll.maxVotes());\n const state = this.state;\n const controls = PollControls.controls(poll, this);\n\n controls.add(\n 'view',\n \n );\n\n return (\n
\n {this.controlsView(controls.toArray())}\n
\n \n
\n
\n \n \n
\n
\n Antworten\n \n
\n
\n {!infoItems.isEmpty() &&
{infoItems.toArray()}
}\n\n {state.showButton() && (\n \n )}\n
\n
\n
\n
\n );\n }\n\n deletePoll(): void {\n PollControls.deleteAction(this.attrs.poll);\n }\n\n editPoll(): void {\n PollControls.editAction(this.attrs.poll);\n }\n\n controlsView(controls: Mithril.ChildArray): Mithril.Children {\n return (\n !!controls.length && (\n \n {controls}\n \n )\n );\n }\n\n infoItems(maxVotes: number) {\n const items = new ItemList();\n const poll = this.attrs.poll;\n\n if (app.session.user && !poll.canVote() && !poll.hasEnded()) {\n items.add(\n 'no-permission',\n \n \n {t('fof-polls.forum.no_permission')}\n \n );\n }\n\n if (poll.endDate()) {\n items.add(\n 'end-date',\n \n \n {poll.hasEnded() ? t('fof-polls.forum.poll_ended') : t('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() })}\n \n );\n }\n\n if (poll.canVote()) {\n items.add(\n 'max-votes',\n \n \n {t('fof-polls.forum.max_votes_allowed', { max: maxVotes })}\n \n );\n\n if (!poll.canChangeVote()) {\n items.add(\n 'cannot-change-vote',\n \n \n {t('fof-polls.forum.poll.cannot_change_vote')}\n \n );\n }\n }\n\n return items;\n }\n}\n","import { slug } from '../../common';\nimport Component from 'flarum/common/Component';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport Switch from 'flarum/common/components/Switch';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport extractText from 'flarum/common/utils/extractText';\nimport FormError from './form/FormError';\nimport PollFormState from '../states/PollFormState';\n\n// Make translation calls shorter\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.poll_form`;\n\nexport default class PollForm extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n this.state = new PollFormState(this.attrs.poll);\n\n // state handles poll initialization\n const poll = this.state.poll;\n\n //@todo way the options are destructured into options (answers) and optionImageUrls\n this.options = poll.options();\n this.optionAnswers = this.options.map((o) => Stream(o.answer()));\n this.optionImageUrls = this.options.map((o) => Stream(o.imageUrl()));\n\n this.question = Stream(poll.question());\n this.subtitle = Stream(poll.subtitle());\n this.endDate = Stream(this.formatDate(poll.endDate()));\n this.publicPoll = Stream(poll.publicPoll());\n this.allowMultipleVotes = Stream(poll.allowMultipleVotes());\n this.hideVotes = Stream(poll.hideVotes());\n this.allowChangeVote = Stream(poll.allowChangeVote());\n this.maxVotes = Stream(poll.maxVotes() || 0);\n\n this.datepickerMinDate = this.formatDate(undefined);\n\n // Replace minimum of 'today' for poll end date only if the poll is not already closed\n if (this.endDate() && dayjs(poll.endDate).isAfter(dayjs())) {\n this.datepickerMinDate = this.formatDate(poll.endDate);\n }\n }\n\n view() {\n return (\n
\n
{this.fields().toArray()}
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n 'question',\n
\n \n\n \n
,\n 100\n );\n\n items.add(\n 'subtitle',\n
\n \n\n \n
,\n 95\n );\n\n items.add(\n 'answers',\n
\n \n\n {this.displayOptions()}\n
,\n 80\n );\n\n items.add(\n 'date',\n
\n \n\n
\n \n {Button.component({\n className: 'Button PollModal--button Button--icon',\n icon: 'fas fa-times',\n onclick: this.endDate.bind(this, null),\n })}\n
\n\n {this.endDate() && (\n

\n \n  \n {dayjs(this.endDate()).isBefore(dayjs())\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(this.endDate()).fromNow() })}\n

\n )}\n
,\n 40\n );\n\n items.add(\n 'public',\n
\n {Switch.component(\n {\n state: this.publicPoll() || false,\n onchange: this.publicPoll,\n },\n app.translator.trans('fof-polls.forum.modal.public_poll_label')\n )}\n
,\n 20\n );\n\n items.add(\n 'hide-votes',\n
\n \n {app.translator.trans('fof-polls.forum.modal.hide_votes_label')}\n \n
,\n 20\n );\n\n items.add(\n 'allow-change-vote',\n
\n \n {app.translator.trans('fof-polls.forum.modal.allow_change_vote_label')}\n \n
,\n 20\n );\n\n items.add(\n 'allow-multiple-votes',\n
\n {Switch.component(\n {\n state: this.allowMultipleVotes() || false,\n onchange: this.allowMultipleVotes,\n },\n app.translator.trans('fof-polls.forum.modal.allow_multiple_votes_label')\n )}\n
,\n 15\n );\n\n if (this.allowMultipleVotes()) {\n items.add(\n 'max-votes',\n
\n \n\n \n\n

{app.translator.trans('fof-polls.forum.modal.max_votes_help')}

\n
,\n 15\n );\n }\n\n items.add(\n 'submit',\n
\n \n {this.state.poll.exists && (\n \n )}\n
,\n -10\n );\n\n return items;\n }\n\n displayOptions() {\n return Object.keys(this.options).map((option, i) => (\n
\n
\n \n {app.forum.attribute('allowPollOptionImage') ? (\n \n ) : null}\n
\n {i >= 2\n ? Button.component({\n type: 'button',\n className: 'Button PollModal--button Button--icon',\n icon: 'fas fa-minus',\n onclick: i >= 2 ? this.removeOption.bind(this, i) : '',\n })\n : ''}\n
\n ));\n }\n\n addOption() {\n const max = Math.max(app.forum.attribute('pollMaxOptions'), 2);\n\n if (this.options.length < max) {\n this.options.push(app.store.createRecord('poll_options'));\n this.optionAnswers.push(Stream(''));\n this.optionImageUrls.push(Stream(''));\n } else {\n alert(extractText(app.translator.trans('fof-polls.forum.modal.max', { max })));\n }\n }\n\n removeOption(i) {\n this.options.splice(i, 1);\n this.optionAnswers.splice(i, 1);\n this.optionImageUrls.splice(i, 1);\n }\n\n data() {\n const options = this.options.map((o, i) => {\n if (!o.data.attributes) o.data.attributes = {};\n\n o.data.attributes.answer = this.optionAnswers[i]();\n o.data.attributes.imageUrl = this.optionImageUrls[i]();\n\n return o.data;\n });\n\n if (this.question() === '') {\n throw new FormError(app.translator.trans('fof-polls.forum.modal.include_question'));\n }\n\n if (options.length < 2) {\n throw new FormError(app.translator.trans('fof-polls.forum.modal.min'));\n }\n\n return {\n question: this.question(),\n subtitle: this.subtitle(),\n endDate: this.dateToTimestamp(this.endDate()),\n publicPoll: this.publicPoll(),\n hideVotes: this.hideVotes(),\n allowChangeVote: this.allowChangeVote(),\n allowMultipleVotes: this.allowMultipleVotes(),\n maxVotes: this.maxVotes(),\n options,\n };\n }\n\n async onsubmit(e) {\n e.preventDefault();\n\n try {\n await this.state.save(this.data());\n\n // Show success alert\n const alertId = app.alerts.show(\n {\n type: 'success',\n controls: [\n \n m.route.set(\n app.route('compose-poll', {\n edit: this.state.collection.id(),\n })\n )\n }\n >\n {t(`${prfx}.continue_editing`)}\n ,\n ],\n },\n t(`${prfx}.success`)\n );\n\n // Hide alert after 10 seconds\n setTimeout(() => app.alerts.dismiss(alertId), 10000);\n\n // Check if we need to call a custom onsubmit callback\n if (this.attrs.onsubmit) {\n this.attrs.onsubmit(this.state.poll);\n } else {\n // Otherwise redirect to pools list\n m.route.set(app.route('polls-manager'));\n }\n } catch (e) {\n if (e instanceof FormError) {\n app.alerts.show({ type: 'error' }, e.message);\n } else {\n // Show error alert\n app.alerts.show({ type: 'error' }, t(`${prfx}.error`));\n }\n } finally {\n this.state.loading = false;\n m.redraw();\n }\n }\n\n async delete() {\n if (!confirm(t(`${prfx}.delete_confirm`))) {\n return;\n }\n\n try {\n await this.state.delete();\n // Show success alert\n const alertId = app.alerts.show({ type: 'success' }, t(`${prfx}.delete_success`));\n\n // Hide alert after 10 seconds\n setTimeout(() => app.alerts.dismiss(alertId), 10000);\n\n // Redirect to polls list\n m.route.set(app.route('polls-manager'));\n } catch (e) {\n // Show error alert\n app.alerts.show({ type: 'error' }, t(`${prfx}.delete_error`));\n }\n }\n\n formatDate(date, def = false) {\n const dayjsDate = dayjs(date);\n\n if (date === false || !dayjsDate.isValid()) return def !== false ? this.formatDate(def) : null;\n\n return dayjsDate.format('YYYY-MM-DDTHH:mm');\n }\n\n dateToTimestamp(date) {\n const dayjsDate = dayjs(date);\n\n if (!date || !dayjsDate.isValid()) return false;\n\n return dayjsDate.format();\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollDescriptionAttrs extends ComponentAttrs {\n text: String;\n}\n\nexport default class PollDescription extends Component {\n view(): Mithril.Children {\n return

{this.attrs.text}

;\n }\n}\n","import * as Mithril from 'mithril';\nimport Component from 'flarum/common/Component';\n\nexport default class PollImage extends Component {\n view(): Mithril.Children {\n return;\n }\n}\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport PollListItem from './PollListItem';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport classList from 'flarum/common/utils/classList';\n\n/**\n * The `PollList` component displays a list of polls.\n */\nexport default class PollList extends Component {\n view() {\n /**\n * @type {import('../../states/PollListState').default}\n */\n const state = this.attrs.state;\n const params = state.getParams();\n const isLoading = state.isInitialLoading() || state.isLoadingNext();\n\n let loading;\n\n if (isLoading) {\n loading = ;\n } else if (state.hasNext()) {\n loading = (\n \n );\n }\n\n if (state.isEmpty()) {\n const text = app.translator.trans('fof-polls.forum.polls_list.empty_text');\n return (\n
\n \n
\n );\n }\n\n const pageSize = state.pageSize;\n\n return (\n
\n
    \n {state.getPages().map((pg) => {\n return pg.items.map((poll) => (\n
  • \n \n
  • \n ));\n })}\n
\n
{loading}
\n
\n );\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport type { PollListParams } from '../../states/PollListState';\nimport SubtreeRetainer from 'flarum/common/utils/SubtreeRetainer';\nimport classList from 'flarum/common/utils/classList';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Link from 'flarum/common/components/Link';\nimport highlight from 'flarum/common/helpers/highlight';\nimport slidable from 'flarum/forum/utils/slidable';\nimport icon from 'flarum/common/helpers/icon';\nimport PollPage from './PollPage';\nimport abbreviateNumber from 'flarum/common/utils/abbreviateNumber';\nimport Poll from '../../models/Poll';\nimport PollControls from '../../utils/PollControls';\nimport { slug } from '../../../common';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\n\n// Make translation calls shorter\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.list`;\n\nexport interface IPollListItemAttrs extends ComponentAttrs {\n poll: Poll;\n params: PollListParams;\n}\n\n/**\n * The `PollListItem` component shows a single poll in the\n * poll list.\n */\nexport default class PollListItem extends Component {\n /**\n * Ensures that the poll will not be redrawn\n * unless new data comes in.\n */\n subtree!: SubtreeRetainer;\n\n highlightRegExp?: RegExp;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.subtree = new SubtreeRetainer(\n () => this.attrs.poll.freshness,\n () => {\n const time = app.session.user && app.session.user.markedAllAsReadAt();\n return time && time.getTime();\n },\n () => this.active()\n );\n }\n\n elementAttrs() {\n return {\n className: classList('PollListItem', {\n active: this.active(),\n 'PollListItem--hidden': this.attrs.poll.isHidden(),\n Slidable: 'ontouchstart' in window,\n }),\n };\n }\n\n view() {\n const poll = this.attrs.poll;\n\n const controls = PollControls.controls(poll, this).toArray();\n const attrs = this.elementAttrs();\n\n return (\n
\n {this.controlsView(controls)}\n {this.contentView()}\n {this.slidableUnderneathView()}\n
\n );\n }\n\n controlsView(controls: Mithril.ChildArray): Mithril.Children {\n return (\n !!controls.length && (\n \n {controls}\n \n )\n );\n }\n\n slidableUnderneathView(): Mithril.Children {\n const poll = this.attrs.poll;\n const isUnread = poll.isUnread();\n\n return (\n \n {icon('fas fa-check')}\n \n );\n }\n\n contentView(): Mithril.Children {\n const poll = this.attrs.poll;\n // const isUnread = poll.isUnread();\n // const isRead = poll.isRead();\n\n return (\n //
\n
\n {this.mainView()}\n {this.infoView()}\n
\n );\n }\n\n mainView(): Mithril.Children {\n const poll = this.attrs.poll;\n\n return (\n \n

{highlight(poll.question(), this.highlightRegExp)}

\n \n );\n }\n\n infoView() {\n return
    {listItems(this.infoItems().toArray())}
;\n }\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n // If we're on a touch device, set up the discussion row to be slidable.\n // This allows the user to drag the row to either side of the screen to\n // reveal controls.\n if ('ontouchstart' in window) {\n const slidableInstance = slidable(this.element);\n\n this.$('.PollListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());\n }\n }\n\n onbeforeupdate(vnode: Mithril.VnodeDOM) {\n super.onbeforeupdate(vnode);\n\n return this.subtree.needsRebuild();\n }\n\n /**\n * Determine whether or not the discussion is currently being viewed.\n */\n active() {\n return app.current.matches(PollPage, { poll: this.attrs.poll });\n }\n\n /**\n * Mark the poll as read.\n */\n markAsRead() {\n const poll = this.attrs.poll;\n\n if (poll.isUnread()) {\n poll.save({ lastVotedNumber: poll.voteCount() });\n m.redraw();\n }\n }\n\n infoItems(): ItemList {\n const poll = this.attrs.poll;\n const items = new ItemList();\n const active = !poll.hasEnded();\n const activeView = poll.endDate()\n ? [\n icon('fas fa-clock'),\n ' ',\n active ? t('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() }) : t('fof-polls.forum.poll_ended'),\n ]\n : [icon('fas fa-om'), ' ', t('fof-polls.forum.poll_never_ends')]\n\n items.add('active', {activeView});\n\n const voteCount = poll.voteCount();\n if(voteCount !== undefined){\n items.add(\n 'discussion-count',\n
\n {icon('fas fa-poll fa-fw')}\n {[\n ' ',\n t('fof-polls.forum.polls_count', {\n count: abbreviateNumber(voteCount),\n }),\n ]}\n
,\n 70\n );\n }\n\n\n return items;\n }\n}\n","import Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollOptionLabel from './PollOptionLabel';\nimport PollOptionInput from './PollOptionInput';\nimport PollOptionModel from '../../models/PollOption';\n\ninterface PollOptionAttrs extends ComponentAttrs {\n option: PollOptionModel;\n onchange: (e: Event) => void;\n}\n\nexport default class PollOption extends Component {\n view(): Mithril.Children {\n const option = this.attrs.option;\n return (\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollOptionInputAttrs extends ComponentAttrs {\n id: Number; // for example 1\n name: String; // for example privacy-setting\n value: String; // for example Private to Project Members\n isResult?: Boolean;\n onchange: (e: Event) => void;\n}\n\nexport default class PollOptionInput extends Component {\n view(): Mithril.Children {\n const { isResult } = this.attrs;\n return (\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollOptionLabelAttrs extends ComponentAttrs {\n text: String;\n id: Number;\n}\n\nexport default class PollOptionLabel extends Component {\n view(): Mithril.Children {\n return (\n \n {this.attrs.text}\n \n );\n }\n}\n","import Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollOption from './PollOption';\nimport PollOptionModel from '../../models/PollOption';\nimport PollResult from './PollResult';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PollState from '../../states/PollState';\n\ninterface PollOptionsAttrs extends ComponentAttrs {\n options: PollOptionModel[];\n state: PollState;\n}\n\nexport default class PollOptions extends Component {\n view(): Mithril.Children {\n return
{this.pollOptions().toArray()}
;\n }\n\n pollOptions(): ItemList {\n const items = new ItemList();\n const state = this.attrs.state;\n\n if (state.showCheckMarks) {\n this.attrs.options.forEach((option: PollOptionModel): void => {\n items.add('option' + option.id(), );\n });\n } else {\n this.attrs.options.forEach((option: PollOptionModel): void => {\n items.add('result' + option.id(), );\n });\n }\n\n return items;\n }\n}\n","import * as Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\n\nexport default class PollPage extends Page {\n view(): Mithril.Children {\n return

PollPage

;\n }\n}\n","import * as Mithril from 'mithril';\nimport Component from 'flarum/common/Component';\nimport PollOptionLabel from './PollOptionLabel';\nimport PollResultsNumber from './PollResultNumber';\nimport PollOptionInput from './PollOptionInput';\n\nexport default class PollResults extends Component {\n view(): Mithril.Children {\n return (\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollResultsNumberAttrs extends ComponentAttrs {\n number: Number;\n}\n\nexport default class PollResultsNumber extends Component {\n view(): Mithril.Children {\n return {this.attrs.number} %;\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollTitleAttrs extends ComponentAttrs {\n text: String;\n}\n\nexport default class PollTitle extends Component {\n view(): Mithril.Children {\n return

{this.attrs.text}

;\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport listItems from 'flarum/common/helpers/listItems';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Page, { IPageAttrs } from 'flarum/common/components/Page';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport PollList from './Poll/PollList';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport extractText from 'flarum/common/utils/extractText';\nimport PollListState from '../states/PollListState';\nimport Button from 'flarum/common/components/Button';\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\nimport Acl from '../../common/Acl';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollModel from '../models/Poll';\nimport Poll from './Poll';\n\nexport default class PollsPage extends Page {\n loading: boolean = false;\n poll: PollModel | null = null;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n const editId = m.route.param('id');\n if (editId) {\n this.poll = app.store.getById('poll', editId) as PollModel;\n\n if (!this.poll) {\n this.loading = true;\n\n app.store.find('fof/polls', editId).then((item) => {\n this.poll = item;\n this.loading = false;\n app.setTitle(extractText(app.translator.trans('fof-polls.forum.page.poll_detail')));\n m.redraw();\n });\n }\n } else {\n this.initListView();\n }\n }\n\n initListView() {\n this.state = new PollListState({\n sort: m.route.param('sort'),\n filter: m.route.param('filter'),\n });\n\n this.state.refresh();\n\n app.setTitle(extractText(app.translator.trans('fof-polls.forum.page.nav')));\n }\n\n oncreate(vnode: Mithril.Vnode) {\n super.oncreate(vnode);\n }\n\n view(): Mithril.Children {\n if (this.loading) {\n return ;\n }\n\n if (this.poll) {\n return (\n
\n
\n \n
\n
\n );\n }\n\n return (\n
\n {IndexPage.prototype.hero()}\n
\n
\n \n
\n
\n
    {listItems(this.viewItems().toArray())}
\n
    {listItems(this.actionItems().toArray())}
\n
\n \n
\n
\n
\n
\n );\n }\n\n sidebarItems() {\n const items = new ItemList();\n const canStartPoll = Acl.canStartPoll();\n\n items.add(\n 'newGlobalPoll',\n {\n this.newPollAction();\n }}\n disabled={!canStartPoll}\n >\n {app.translator.trans(`fof-polls.forum.poll.${canStartPoll ? 'start_poll_button' : 'cannot_start_poll_button'}`)}\n \n );\n\n items.add(\n 'nav',\n \n {this.navItems().toArray()}\n \n );\n\n return items;\n }\n\n actionItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'refresh',\n Button.component({\n title: app.translator.trans('fof-polls.forum.page.refresh_tooltip'),\n icon: 'fas fa-sync',\n className: 'Button Button--icon',\n onclick: () => {\n this.state.refresh();\n },\n })\n );\n\n return items;\n }\n\n viewItems() {\n return IndexPage.prototype.viewItems();\n }\n navItems() {\n return IndexPage.prototype.navItems();\n }\n\n /**\n * Change to create new poll page\n */\n newPollAction(): void {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n return;\n }\n\n m.route.set(app.route('fof_polls_compose'));\n }\n}\n","import app from 'flarum/forum/app';\n\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport ListVotersModal from './ListVotersModal';\nimport classList from 'flarum/common/utils/classList';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\nimport EditPollModal from './EditPollModal';\n\nexport default class PostPoll extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loadingOptions = false;\n\n this.useSubmitUI = !this.attrs.poll?.canChangeVote() && this.attrs.poll?.allowMultipleVotes();\n this.pendingSubmit = false;\n this.pendingOptions = null;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n this.preventClose = this.preventClose.bind(this);\n window.addEventListener('beforeunload', this.preventClose);\n }\n\n onremove(vnode) {\n super.onremove(vnode);\n\n window.removeEventListener('beforeunload', this.preventClose);\n }\n\n view() {\n const poll = this.attrs.poll;\n const options = poll.options() || [];\n let maxVotes = poll.allowMultipleVotes() ? poll.maxVotes() : 1;\n\n if (maxVotes === 0) maxVotes = options.length;\n\n const infoItems = this.infoItems(maxVotes);\n\n return (\n
\n
\n
\n

{poll.question()}

\n {poll.subtitle() &&

{poll.subtitle()}

}\n
\n\n
\n {poll.canSeeVoters() && (\n \n
\n
\n\n
\n
{options.map(this.viewOption.bind(this))}
\n\n
\n {!infoItems.isEmpty() &&
{infoItems.toArray()}
}\n\n {this.useSubmitUI && this.pendingSubmit && (\n \n )}\n
\n
\n
\n );\n }\n\n infoItems(maxVotes) {\n const items = new ItemList();\n const poll = this.attrs.poll;\n const hasVoted = poll.myVotes()?.length > 0;\n\n if (app.session.user && !poll.canVote() && !poll.hasEnded()) {\n items.add(\n 'no-permission',\n \n \n {app.translator.trans('fof-polls.forum.no_permission')}\n \n );\n }\n\n if (poll.endDate()) {\n items.add(\n 'end-date',\n \n \n {poll.hasEnded()\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() })}\n \n );\n }\n\n if (poll.canVote()) {\n items.add(\n 'max-votes',\n \n \n {app.translator.trans('fof-polls.forum.max_votes_allowed', { max: maxVotes })}\n \n );\n\n if (!poll.canChangeVote()) {\n items.add(\n 'cannot-change-vote',\n \n \n {app.translator.trans('fof-polls.forum.poll.cannot_change_vote')}\n \n );\n }\n }\n\n return items;\n }\n\n viewOption(opt) {\n const poll = this.attrs.poll;\n const hasVoted = poll.myVotes()?.length > 0;\n const totalVotes = poll.voteCount();\n\n const voted = this.pendingOptions ? this.pendingOptions.has(opt.id()) : poll.myVotes()?.some?.((vote) => vote.option() === opt);\n const votes = opt.voteCount();\n const percent = totalVotes > 0 ? Math.round((votes / totalVotes) * 100) : 0;\n\n // isNaN(null) is false, so we have to check type directly now that API always returns the field\n const canSeeVoteCount = typeof votes === 'number';\n const isDisabled = this.loadingOptions || (hasVoted && !poll.canChangeVote());\n const width = canSeeVoteCount ? percent : (Number(voted) / (poll.myVotes()?.length || 1)) * 100;\n\n const showCheckmark = !app.session.user || (!poll.hasEnded() && poll.canVote() && (!hasVoted || poll.canChangeVote()));\n\n const bar = (\n
\n {showCheckmark && (\n \n )}\n\n
\n {opt.answer()}\n {voted && !showCheckmark && icon('fas fa-check-circle', { className: 'PollAnswer-check' })}\n {canSeeVoteCount && {percent}%}\n
\n\n {opt.imageUrl() ? {opt.answer()} : null}\n
\n );\n\n return (\n \n {canSeeVoteCount ? (\n \n {bar}\n \n ) : (\n bar\n )}\n
\n );\n }\n\n changeVote(option, evt) {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n evt.target.checked = false;\n return;\n }\n\n const optionIds = this.pendingOptions || new Set(this.attrs.poll.myVotes().map?.((v) => v.option().id()));\n const isUnvoting = optionIds.delete(option.id());\n const allowsMultiple = this.attrs.poll.allowMultipleVotes();\n\n if (!allowsMultiple) {\n optionIds.clear();\n }\n\n if (!isUnvoting) {\n optionIds.add(option.id());\n }\n\n if (this.useSubmitUI) {\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n return;\n }\n\n return this.submit(optionIds, null, () => (evt.target.checked = isUnvoting));\n }\n\n onsubmit() {\n return this.submit(this.pendingOptions, () => {\n this.pendingOptions = null;\n this.pendingSubmit = false;\n });\n }\n\n submit(optionIds, cb, onerror) {\n this.loadingOptions = true;\n m.redraw();\n\n return app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/fof/polls/${this.attrs.poll.id()}/votes`,\n body: {\n data: {\n optionIds: Array.from(optionIds),\n },\n },\n })\n .then((res) => {\n app.store.pushPayload(res);\n cb?.();\n })\n .catch((err) => {\n onerror?.(err);\n })\n .finally(() => {\n this.loadingOptions = false;\n\n m.redraw();\n });\n }\n\n showVoters() {\n // Load all the votes only when opening the votes list\n app.modal.show(ListVotersModal, {\n poll: this.attrs.poll,\n post: this.attrs.post,\n });\n }\n\n deletePoll() {\n if (confirm(app.translator.trans('fof-polls.forum.moderation.delete_confirm'))) {\n this.attrs.poll.delete().then(() => {\n m.redraw.sync();\n });\n }\n }\n\n /**\n * Attempting to use the `tooltipVisible` attr on the Tooltip component set to 'false' when no vote count\n * caused the tooltip to break on click. This is a workaround to hide the tooltip when no vote count is available,\n * called on 'onremove' of the Tooltip component. It doesn't always work as intended either, but it does the job.\n */\n hideOptionTooltip(vnode) {\n vnode.attrs.tooltipVisible = false;\n vnode.state.updateVisibility();\n }\n\n /**\n * Alert before navigating away using browser's 'beforeunload' event\n */\n preventClose(e) {\n if (this.pendingOptions) {\n e.preventDefault();\n return true;\n }\n }\n}\n","export default class FormError extends Error {}\n","import CreatePollModal from './CreatePollModal';\nimport PostPoll from './PostPoll';\nimport EditPollModal from './EditPollModal';\nimport ListVotersModal from './ListVotersModal';\nimport PollForm from './PollForm';\n\nexport const components = {\n CreatePollModal,\n PostPoll,\n EditPollModal,\n ListVotersModal,\n PollForm,\n};\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport Forum from 'flarum/common/models/Forum';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Poll from './models/Poll';\nimport PollOption from './models/PollOption';\nimport PollVote from './models/PollVote';\nimport PollsPage from './components/PollsPage';\nimport ComposePollPage from './components/ComposePollPage';\n\nexport default [\n new Extend.Routes()\n .add('fof_polls_list', '/polls', PollsPage)\n .add('fof_polls_compose', '/polls/composer', ComposePollPage),\n\n new Extend.Store() //\n .add('polls', Poll)\n .add('poll_options', PollOption)\n .add('poll_votes', PollVote),\n\n new Extend.Model(Post) //\n .hasMany('polls')\n .attribute('canStartPoll'),\n\n new Extend.Model(Forum) //\n .attribute('canStartPolls'),\n\n new Extend.Model(Discussion) //\n .attribute('hasPoll')\n .attribute('canStartPoll'),\n];\n","import app from 'flarum/forum/app';\n\nimport addDiscussionBadge from './addDiscussionBadge';\nimport addComposerItems from './addComposerItems';\nimport addPollsToPost from './addPollsToPost';\nimport addPostControls from './addPostControls';\nimport addNavItem from './addNavItem';\n\nexport * from './components';\nexport * from './models';\n\napp.initializers.add('fof/polls', () => {\n addDiscussionBadge();\n addComposerItems();\n addPollsToPost();\n addPostControls();\n addNavItem();\n});\n\nexport { default as extend } from './extend';\n","import Model from 'flarum/common/Model';\nimport PollOption from './PollOption';\nimport PollVote from './PollVote';\nimport computed from 'flarum/common/utils/computed';\n\nexport default class Poll extends Model {\n question() {\n return Model.attribute('question').call(this);\n }\n\n subtitle() {\n return Model.attribute('subtitle').call(this);\n }\n\n hasEnded() {\n return Model.attribute('hasEnded').call(this);\n }\n\n endDate() {\n return Model.attribute('endDate', Model.transformDate).call(this);\n }\n\n publicPoll() {\n return Model.attribute('publicPoll').call(this);\n }\n\n hideVotes() {\n return Model.attribute('hideVotes').call(this);\n }\n\n allowChangeVote() {\n return Model.attribute('allowChangeVote').call(this);\n }\n\n allowMultipleVotes() {\n return Model.attribute('allowMultipleVotes').call(this);\n }\n\n maxVotes() {\n return Model.attribute('maxVotes').call(this);\n }\n\n voteCount() {\n return Model.attribute('voteCount').call(this);\n }\n\n canVote() {\n return Model.attribute('canVote').call(this);\n }\n\n canEdit() {\n return Model.attribute('canEdit').call(this);\n }\n\n canDelete() {\n return Model.attribute('canDelete').call(this);\n }\n\n canSeeVoters() {\n return Model.attribute('canSeeVoters').call(this);\n }\n\n canChangeVote() {\n return Model.attribute('canChangeVote').call(this);\n }\n\n options() {\n return Model.hasMany('options').call(this);\n }\n\n votes() {\n return Model.hasMany('votes').call(this);\n }\n\n myVotes(): PollVote[] {\n const myVotes = Model.hasMany('myVotes').call(this);\n return myVotes ? (myVotes as PollVote[]) : [];\n }\n\n isGlobal() {\n return Model.attribute('isGlobal').call(this);\n }\n\n isHidden() {\n return computed('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n }\n\n // TODO: These two don't make sense as of now\n isUnread() {\n return false;\n }\n\n apiEndpoint() {\n /** @ts-ignore */\n return `/fof/polls${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Model from 'flarum/common/Model';\nimport Poll from './Poll';\nimport PollVote from './PollVote';\n\nexport default class PollOption extends Model {\n answer() {\n return Model.attribute('answer').call(this);\n }\n\n imageUrl() {\n return Model.attribute('imageUrl').call(this);\n }\n\n voteCount() {\n return Model.attribute('voteCount').call(this);\n }\n\n poll() {\n return Model.hasOne('polls').call(this);\n }\n\n votes() {\n return Model.hasMany('votes').call(this);\n }\n\n apiEndpoint() {\n /** @ts-ignore */\n return `/fof/polls/answers${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Model from 'flarum/common/Model';\nimport Poll from './Poll';\nimport PollOption from './PollOption';\nimport User from 'flarum/common/models/User';\n\nexport default class PollVote extends Model {\n poll() {\n return Model.hasOne('poll').call(this);\n }\n\n option() {\n return Model.hasOne('option').call(this);\n }\n\n user() {\n return Model.hasOne('user').call(this);\n }\n\n pollId() {\n return Model.attribute('pollId').call(this);\n }\n\n optionId() {\n return Model.attribute('optionId').call(this);\n }\n\n apiEndpoint() {\n return `/fof/polls/${this.pollId()}/vote`;\n }\n}\n","import Poll from './Poll';\nimport PollOption from './PollOption';\nimport PollVote from './PollVote';\n\nexport const models = {\n Poll,\n PollOption,\n PollVote,\n};\n","import app from 'flarum/forum/app';\n\nexport default class PollFormState {\n static createNewPoll() {\n const poll = app.store.createRecord('polls');\n poll.pushAttributes({\n question: '',\n endDate: '',\n publicPoll: false,\n allowMultipleVotes: false,\n hideVotes: false,\n allowChangeVote: false,\n maxVotes: 0,\n });\n poll.pushData({ relationships: { options: [] } });\n return poll;\n }\n\n constructor(poll) {\n if (!poll) {\n poll = PollFormState.createNewPoll();\n }\n\n this.loading = false;\n this.deleting = false;\n this.poll = poll;\n this.expandedGroup = 'setup';\n }\n\n isExpanded(groupKey) {\n return this.expandedGroup === groupKey;\n }\n\n expand(groupKey) {\n this.expandedGroup = groupKey;\n m.redraw();\n }\n\n async save(data) {\n this.loading = true;\n m.redraw();\n\n try {\n this.poll = await this.poll.save(data);\n } finally {\n this.loading = false;\n m.redraw();\n }\n }\n\n async delete() {\n this.loading = true;\n m.redraw();\n\n try {\n await this.poll.delete();\n this.deleting = true;\n } finally {\n this.loading = false;\n m.redraw();\n }\n }\n}\n","import app from 'flarum/forum/app';\nimport PaginatedListState, { Page, PaginatedListParams, PaginatedListRequestParams } from 'flarum/common/states/PaginatedListState';\nimport Poll from '../models/Poll';\nimport { ApiResponsePlural } from 'flarum/common/Store';\nimport EventEmitter from 'flarum/common/utils/EventEmitter';\n\nexport interface PollListParams extends PaginatedListParams {\n sort?: string;\n}\n\nconst globalEventEmitter = new EventEmitter();\n\nexport default class PollListState

extends PaginatedListState {\n protected extraPolls: Poll[] = [];\n protected eventEmitter: EventEmitter;\n\n constructor(params: P, page: number = 1) {\n super(params, page, 20);\n\n this.eventEmitter = globalEventEmitter.on('poll.deleted', this.deletePoll.bind(this));\n }\n\n get type(): string {\n return 'fof/polls';\n }\n\n requestParams(): PaginatedListRequestParams {\n const params = {\n include: ['options', 'votes'],\n filter: this.params.filter || {},\n sort: this.sortMap()[this.params.sort ?? ''],\n };\n\n if (this.params.q) {\n params.filter.q = this.params.q;\n }\n\n return params;\n }\n\n protected loadPage(page: number = 1): Promise> {\n const preloadedPolls = app.preloadedApiDocument();\n\n if (preloadedPolls) {\n this.initialLoading = false;\n\n return Promise.resolve(preloadedPolls);\n }\n\n return super.loadPage(page);\n }\n\n clear(): void {\n super.clear();\n\n this.extraPolls = [];\n }\n\n /**\n * Get a map of sort keys (which appear in the URL, and are used for\n * translation) to the API sort value that they represent.\n */\n sortMap() {\n const map: any = {};\n\n if (this.params.q) {\n map.relevance = '';\n }\n map.newest = '-createdAt';\n map.oldest = 'createdAt';\n\n return map;\n }\n\n /**\n * In the last request, has the user searched for a poll?\n */\n isSearchResults(): boolean {\n return !!this.params.q;\n }\n\n removePoll(poll: Poll): void {\n this.eventEmitter.emit('poll.deleted', poll);\n }\n\n deletePoll(poll: Poll): void {\n for (const page of this.pages) {\n const index = page.items.indexOf(poll);\n\n if (index !== -1) {\n page.items.splice(index, 1);\n break;\n }\n }\n\n const index = this.extraPolls.indexOf(poll);\n\n if (index !== -1) {\n this.extraPolls.splice(index);\n }\n\n m.redraw();\n }\n\n /**\n * Add a poll to the top of the list.\n */\n addPoll(poll: Poll): void {\n this.removePoll(poll);\n this.extraPolls.unshift(poll);\n\n m.redraw();\n }\n\n protected getAllItems(): Poll[] {\n return this.extraPolls.concat(super.getAllItems());\n }\n\n public getPages(): Page[] {\n const pages = super.getPages();\n\n if (this.extraPolls.length) {\n return [\n {\n number: -1,\n items: this.extraPolls,\n },\n ...pages,\n ];\n }\n\n return pages;\n }\n}\n","import app from 'flarum/forum/app';\nimport Poll from '../models/Poll';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport PollOption from '../models/PollOption';\nimport PollVote from '../models/PollVote';\nimport ListVotersModal from '../components/ListVotersModal';\n\nexport default class PollState {\n protected poll: Poll;\n protected pendingSubmit: boolean;\n protected pendingOptions: Set | null;\n public loadingOptions: boolean;\n public useSubmitUI: boolean;\n public showCheckMarks: boolean;\n\n constructor(poll: Poll) {\n this.poll = poll;\n this.pendingSubmit = false;\n this.pendingOptions = null;\n this.loadingOptions = false;\n this.useSubmitUI = !poll?.canChangeVote() && poll?.allowMultipleVotes();\n this.showCheckMarks = !app.session.user || (!poll.hasEnded() && poll.canVote() && (!this.hasVoted() || poll.canChangeVote()));\n }\n\n hasVoted() {\n return this.poll.myVotes().length > 0;\n }\n\n showButton() {\n return this.useSubmitUI && this.pendingSubmit;\n }\n\n changeVote(option: PollOption, evt: Event) {\n const target = evt.target as HTMLInputElement;\n\n if (!app.session.user) {\n app.modal.show(LogInModal);\n target.checked = false;\n return;\n }\n\n const optionIds = this.pendingOptions || new Set(this.poll.myVotes().map((v: PollVote) => v.option().id()));\n const isUnvoting = optionIds.delete(option.id()!);\n const allowsMultiple = this.poll.allowMultipleVotes();\n\n if (!allowsMultiple) {\n optionIds.clear();\n }\n\n if (!isUnvoting) {\n optionIds.add(option.id()!);\n }\n\n if (this.useSubmitUI) {\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n return;\n }\n\n return this.submit(optionIds, null, () => (target.checked = isUnvoting));\n }\n\n onsubmit() {\n return this.submit(this.pendingOptions!, () => {\n this.pendingOptions = null;\n this.pendingSubmit = false;\n });\n }\n\n submit(optionIds: Set, cb: Function | null, onerror: Function | null = null) {\n this.loadingOptions = true;\n m.redraw();\n\n return app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/fof/polls/${this.poll.id()}/votes`,\n body: {\n data: {\n optionIds: Array.from(optionIds),\n },\n },\n })\n .then((res) => {\n app.store.pushPayload(res);\n cb?.();\n })\n .catch((err) => {\n onerror?.(err);\n })\n .finally(() => {\n this.loadingOptions = false;\n\n m.redraw();\n });\n }\n\n showVoters = () => {\n // Load all the votes only when opening the votes list\n app.modal.show(ListVotersModal, {\n poll: this.poll,\n });\n };\n\n /**\n * Attempting to use the `tooltipVisible` attr on the Tooltip component set to 'false' when no vote count\n * caused the tooltip to break on click. This is a workaround to hide the tooltip when no vote count is available,\n * called on 'onremove' of the Tooltip component. It doesn't always work as intended either, but it does the job.\n */\n hideOptionTooltip(vnode) {\n vnode.attrs.tooltipVisible = false;\n vnode.state.updateVisibility();\n }\n\n /**\n * Alert before navigating away using browser's 'beforeunload' event\n */\n preventClose = (e: Event): boolean | void => {\n if (this.pendingOptions) {\n e.preventDefault();\n return true;\n }\n };\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Poll from '../models/Poll';\nimport Component from 'flarum/common/Component';\nimport { slug } from '../../common';\nimport ComposePollPage from '../components/ComposePollPage';\nimport PollsPage from '../components/PollsPage';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Separator from 'flarum/common/components/Separator';\nimport Button from 'flarum/common/components/Button';\nimport Link from 'flarum/common/components/Link';\n\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.poll_controls`;\n\n/**\n * The `UserControls` utility constructs a list of buttons for a user which\n * perform actions on it.\n */\nexport default {\n /**\n * Get a list of controls for a user.\n */\n controls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n ['poll', 'moderation', 'destructive'].forEach((section) => {\n const controls: Mithril.Children[] = this[section + 'Controls'](poll, context).toArray();\n if (controls.length) {\n controls.forEach((item) => items.add(item.itemName, item));\n items.add(section + 'Separator', );\n }\n });\n\n return items;\n },\n\n /**\n * Get controls for direct modifcation actions on polls (e.g. vote, view voters).\n */\n pollControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n items.add('view', {t(`${prfx}.view_label`)});\n\n return items;\n },\n\n /**\n * Get controls for a user pertaining to moderation (e.g. suspend, edit).\n */\n moderationControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n if (poll.canEdit()) {\n items.add(\n 'edit',\n \n );\n }\n\n return items;\n },\n\n /**\n * Get controls for a user which are destructive (e.g. delete).\n * @protected\n */\n destructiveControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n if (poll.canDelete()) {\n items.add(\n 'delete',\n \n );\n }\n\n return items;\n },\n\n /**\n * Delete the user.\n */\n deleteAction(poll: Poll): void {\n if (!confirm(t(`${prfx}.delete_confirmation`))) {\n return;\n }\n\n poll\n .delete()\n .then(() => {\n this.showDeletionAlert(poll, 'success');\n if (app.current.matches(ComposePollPage, { id: poll.id() }) || app.current.matches(PollsPage, { id: poll.id() })) {\n app.history.back();\n } else {\n window.location.reload();\n }\n })\n .catch(() => this.showDeletionAlert(poll, 'error'));\n },\n\n /**\n * Show deletion alert of poll\n */\n showDeletionAlert(poll: Poll, type: string): void {\n const message = {\n success: `${prfx}.delete_success_message`,\n error: `${prfx}.delete_error_message`,\n }[type]!;\n\n app.alerts.show({ type }, t(message, { poll: poll }));\n },\n\n /**\n * Edit the poll.\n */\n editAction(poll: Poll): void {\n m.route.set(app.route('fof_polls_compose', { id: poll.id() }));\n },\n};\n","module.exports = flarum.core.compat['common/Component'];","module.exports = flarum.core.compat['common/Model'];","module.exports = flarum.core.compat['common/components/Badge'];","module.exports = flarum.core.compat['common/components/Button'];","module.exports = flarum.core.compat['common/components/Dropdown'];","module.exports = flarum.core.compat['common/components/Link'];","module.exports = flarum.core.compat['common/components/LinkButton'];","module.exports = flarum.core.compat['common/components/LoadingIndicator'];","module.exports = flarum.core.compat['common/components/Modal'];","module.exports = flarum.core.compat['common/components/Page'];","module.exports = flarum.core.compat['common/components/Placeholder'];","module.exports = flarum.core.compat['common/components/SelectDropdown'];","module.exports = flarum.core.compat['common/components/Separator'];","module.exports = flarum.core.compat['common/components/Switch'];","module.exports = flarum.core.compat['common/components/Tooltip'];","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['common/extenders'];","module.exports = flarum.core.compat['common/helpers/avatar'];","module.exports = flarum.core.compat['common/helpers/highlight'];","module.exports = flarum.core.compat['common/helpers/icon'];","module.exports = flarum.core.compat['common/helpers/listItems'];","module.exports = flarum.core.compat['common/helpers/username'];","module.exports = flarum.core.compat['common/models/Discussion'];","module.exports = flarum.core.compat['common/models/Forum'];","module.exports = flarum.core.compat['common/models/Post'];","module.exports = flarum.core.compat['common/states/PaginatedListState'];","module.exports = flarum.core.compat['common/utils/EventEmitter'];","module.exports = flarum.core.compat['common/utils/ItemList'];","module.exports = flarum.core.compat['common/utils/Stream'];","module.exports = flarum.core.compat['common/utils/SubtreeRetainer'];","module.exports = flarum.core.compat['common/utils/abbreviateNumber'];","module.exports = flarum.core.compat['common/utils/classList'];","module.exports = flarum.core.compat['common/utils/computed'];","module.exports = flarum.core.compat['common/utils/extractText'];","module.exports = flarum.core.compat['forum/app'];","module.exports = flarum.core.compat['forum/components/CommentPost'];","module.exports = flarum.core.compat['forum/components/DiscussionComposer'];","module.exports = flarum.core.compat['forum/components/DiscussionList'];","module.exports = flarum.core.compat['forum/components/DiscussionPage'];","module.exports = flarum.core.compat['forum/components/IndexPage'];","module.exports = flarum.core.compat['forum/components/LogInModal'];","module.exports = flarum.core.compat['forum/components/ReplyComposer'];","module.exports = flarum.core.compat['forum/utils/PostControls'];","module.exports = flarum.core.compat['forum/utils/slidable'];","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","export default function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : String(i);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["Acl","canManagePools","canStartPoll","default","slug","app","extend","classList","DiscussionComposer","ReplyComposer","CreatePollModal","addToComposer","composer","prototype","addPoll","_this","modal","show","poll","fields","onsubmit","items","_this$composer$body","_discussion$canStartP","discussion","body","attrs","forum","canStartPolls","add","m","className","onclick","bind","translator","trans","data","Badge","DiscussionList","Discussion","params","include","push","badges","hasPoll","component","type","label","icon","IndexPage","LinkButton","addNavItem","href","route","CommentPost","PostPoll","DiscussionPage","content","post","isHidden","revealContent","polls","_iterator","_createForOfIteratorHelperLoose","_step","done","value","subtree","check","checks","map","_poll$data","_poll$options$map","_poll$options","_poll$myVotes$map","_poll$myVotes","attributes","options","call","option","_option$data","myVotes","vote","_vote$option","id","JSON","stringify","pusher","then","binding","channels","main","store","getById","pushAttributes","voteCount","changedOptions","optionId","undefined","redraw","unbind","PostControls","Button","createPoll","createRecord","save","_extends","relationships","_post$rawRelationship","rawRelationship","Component","t","prfx","ComposePollHero","_Component","_inheritsLoose","apply","arguments","_proto","view","itemClassName","exists","external","target","Page","LoadingIndicator","PollForm","PollFormState","ComposePollPage","_Page","_len","length","args","Array","_key","concat","loading","oninit","vnode","_this2","_this$poll","set","editId","param","find","item","_this2$poll","setTitle","createNewPoll","history","bodyClass","Modal","_Modal","title","hide","EditPollModal","_CreatePollModal","avatar","username","Link","Stream","ListVotersModal","optionContent","opt","votes","filter","v","answer","voteContent","user","PollTitle","PollOptions","PollImage","PollDescription","PollState","ItemList","PollControls","Dropdown","Poll","state","infoItems","maxVotes","controls","showVoters","controlsView","toArray","image","text","question","isEmpty","showButton","loadingOptions","deletePoll","deleteAction","editPoll","editAction","menuClassName","buttonClassName","accessibleToggleLabel","session","canVote","hasEnded","endDate","time","dayjs","fromNow","max","canChangeVote","hasVoted","Switch","extractText","FormError","optionAnswers","o","optionImageUrls","imageUrl","subtitle","formatDate","publicPoll","allowMultipleVotes","hideVotes","allowChangeVote","datepickerMinDate","isAfter","name","bidi","addOption","displayOptions","min","isBefore","onchange","disabled","deleting","Object","keys","i","placeholder","attribute","removeOption","Math","alert","splice","dateToTimestamp","_onsubmit","_asyncToGenerator","_regeneratorRuntime","mark","_callee","e","_this3","alertId","wrap","_callee$","_context","prev","next","preventDefault","alerts","edit","collection","setTimeout","dismiss","t0","message","finish","stop","_x","_delete2","_callee2","_callee2$","_context2","confirm","abrupt","_delete","date","def","dayjsDate","isValid","format","PollListItem","Placeholder","PollList","getParams","isLoading","isInitialLoading","isLoadingNext","hasNext","loadNext","pageSize","isSearchResults","getPages","pg","key","SubtreeRetainer","highlight","slidable","PollPage","abbreviateNumber","listItems","highlightRegExp","freshness","markedAllAsReadAt","getTime","active","elementAttrs","Slidable","window","contentView","slidableUnderneathView","isUnread","markAsRead","mainView","infoView","oncreate","slidableInstance","element","$","on","reset","onbeforeupdate","needsRebuild","current","matches","lastVotedNumber","activeView","count","PollOptionLabel","PollOptionInput","PollOption","isResult","style","opacity","PollResult","pollOptions","showCheckMarks","forEach","changeVote","PollResultsNumber","PollResults","number","LogInModal","PollListState","SelectDropdown","PollsPage","initListView","sort","refresh","hero","sidebarItems","viewItems","actionItems","newPollAction","navItems","_this4","Tooltip","_this$attrs$poll","_this$attrs$poll2","useSubmitUI","pendingSubmit","pendingOptions","preventClose","addEventListener","onremove","removeEventListener","canSeeVoters","canEdit","canDelete","viewOption","_poll$myVotes2","_poll$myVotes3","_poll$myVotes4","totalVotes","voted","has","some","percent","round","canSeeVoteCount","isDisabled","width","Number","showCheckmark","bar","checked","src","alt","hideOptionTooltip","evt","_this$attrs$poll$myVo","_this$attrs$poll$myVo2","optionIds","Set","isUnvoting","allowsMultiple","clear","size","submit","cb","onerror","request","method","url","from","res","pushPayload","err","sync","tooltipVisible","updateVisibility","_Error","_wrapNativeSuper","Error","components","Extend","Post","Forum","PollVote","Routes","Store","Model","hasMany","addDiscussionBadge","addComposerItems","addPollsToPost","addPostControls","initializers","computed","_Model","transformDate","isGlobal","hiddenAt","apiEndpoint","hasOne","pollId","models","pushData","expandedGroup","isExpanded","groupKey","expand","_save","sent","PaginatedListState","EventEmitter","globalEventEmitter","_PaginatedListState","page","extraPolls","eventEmitter","_assertThisInitialized","requestParams","_this$params$sort","sortMap","q","loadPage","preloadedPolls","preloadedApiDocument","initialLoading","Promise","resolve","relevance","newest","oldest","removePoll","emit","pages","index","indexOf","unshift","getAllItems","_createClass","get","Separator","context","section","itemName","pollControls","moderationControls","destructiveControls","showDeletionAlert","back","location","reload","success","error","_typeof","require","module","exports","__esModule","r","n","hasOwnProperty","defineProperty","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","Generator","create","Context","makeInvokeMethod","tryCatch","arg","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","values","g","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","TypeError","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","isNaN","displayName","isGeneratorFunction","constructor","setPrototypeOf","__proto__","awrap","async","reverse","pop","charAt","slice","rval","handle","complete","_catch","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","self","ReferenceError","asyncGeneratorStep","gen","reject","_next","_throw","info","fn","isNativeReflectConstruct","_construct","Reflect","construct","toPropertyKey","_defineProperties","props","descriptor","Constructor","protoProps","staticProps","assign","source","_getPrototypeOf","subClass","superClass","_isNativeFunction","toString","_isNativeReflectConstruct","Boolean","valueOf","_setPrototypeOf","toPrimitive","String","isNativeFunction","Class","_cache","Map","Wrapper"],"sourceRoot":""} \ No newline at end of file diff --git a/js/src/forum/components/Poll/PollListItem.tsx b/js/src/forum/components/Poll/PollListItem.tsx index 510aa659..3ddce696 100644 --- a/js/src/forum/components/Poll/PollListItem.tsx +++ b/js/src/forum/components/Poll/PollListItem.tsx @@ -183,23 +183,27 @@ export default class PollListItem{activeView}); - items.add( - 'discussion-count', -

- {icon('fas fa-poll fa-fw')} - {[ - ' ', - t('fof-user-directory.forum.page.usercard.discussion-count', { - count: abbreviateNumber(poll.voteCount()), - }), - ]} -
, - 70 - ); + const voteCount = poll.voteCount(); + if(voteCount !== undefined){ + items.add( + 'discussion-count', +
+ {icon('fas fa-poll fa-fw')} + {[ + ' ', + t('fof-polls.forum.polls_count', { + count: abbreviateNumber(voteCount), + }), + ]} +
, + 70 + ); + } + return items; } diff --git a/resources/locale/en.yml b/resources/locale/en.yml index 9f90d442..f3a991ca 100755 --- a/resources/locale/en.yml +++ b/resources/locale/en.yml @@ -21,6 +21,8 @@ fof-polls: poll_ended: This poll has ended. public_poll: View voters max_votes_allowed: "Poll allows voting for {max, plural, one {# option} other {# options}}." + polls_count: "{count, plural, one { {count} vote} other {{count} votes}}" + poll_never_ends: Poll never ends poll: cannot_change_vote: You cannot change your vote after voting. @@ -31,6 +33,7 @@ fof-polls: poll_controls: edit_label: Edit delete_label: Delete + view_label: View poll_form: delete: Delete Poll