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gBACNqK,KAAM,eACNyI,MAAO,eAAe5V,MAAM,gEAE9BM,EAAMrB,IAAI,gBAAiB,CACzB6D,KAAM,gBACNqK,KAAM,YACNyI,MAAO,eAAe5V,MAAM,gEAE9BM,EAAMrB,IAAI,iBAAkB,CAC1B6D,KAAM,iBACNqK,KAAM,YACNyI,MAAO,eAAe5V,MAAM,gEAEhC,KAGA,IAAA8K,QAAO,eAAoB,YAAY,SAAUxK,GAC/C,MAAM+K,EAAOhM,KAAKgM,KAClB/K,EAAMrB,IAAI,WAAYiB,EAAE,KAAY,CAClCsF,KAAM,UAAU,gBAAiB,CAC/BgG,SAAUH,EAAK4C,SAEjBnL,KAAM,WACNqK,KAAM,aACL,eAAenN,MAAM,6CAA8C,GACxE,IAGA,EAAA6V,gBAAgBC,gBAAgBzM,KAAK,kBAGrC,IAAAyB,QAAO,cAAgB,YAAY,WACjCzL,KAAK8D,EAAE,gDAAgDiO,MAAK,WAC1D/R,KAAK0W,UAAU9W,IAAI,IAAkB+W,iBAAiB3W,MAAM4W,iBAAiB,YAC/E,GACF,KAGA,IAAAC,UAAS,sCAAuC,uBAAuB,SAAUC,GAC/E,MAAMC,EAAOD,IACb,OAAKC,GAAQ,YAAY/E,KAAKgF,WAAa,YAAYhF,KAAKgF,UAAUvN,SAAS,kBAAoB,YAAYuI,KAAKhG,KAC3G,QAEF+K,CACT,KACA,IAAAtL,QAAO,sCAAuC,kBAAkB,SAAUwL,GACpE,YAAYjF,KAAKgF,WAAa,YAAYhF,KAAKgF,UAAUvN,SAAS,kBAAoB,YAAYuI,KAAKhG,OACzGiL,EAAQlK,MAAMuC,UAAY,YAAY0C,KAAKhG,KAAKG,WAEpD,GAAE,G","sources":["webpack://@flarum/mentions/webpack/bootstrap","webpack://@flarum/mentions/webpack/runtime/compat get default export","webpack://@flarum/mentions/webpack/runtime/define property getters","webpack://@flarum/mentions/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/mentions/webpack/runtime/make namespace object","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/string')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/textContrastClass')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/Post')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/CommentPost')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/PostPreview')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/punctuateSeries')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/username')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Icon')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Modal')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/states/PaginatedListState')\"","webpack://@flarum/mentions/./src/forum/state/MentionedByModalState.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Form')\"","webpack://@flarum/mentions/./src/forum/components/MentionedByModal.tsx","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/mentions/./src/forum/utils/reply.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/Fragment')\"","webpack://@flarum/mentions/./src/forum/fragments/PostQuoteButton.js","webpack://@flarum/mentions/./src/forum/utils/selectedText.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/TextEditorButton')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/KeyboardNavigatable')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/AutocompleteReader')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/throttleDebounce')\"","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/mentions/./src/forum/fragments/AutocompleteDropdown.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/mentions/./src/forum/components/MentionsDropdownItem.tsx","webpack://@flarum/mentions/./src/forum/mentionables/MentionableModels.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/MentionFormat.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Avatar')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/highlight')\"","webpack://@flarum/mentions/./src/forum/mentionables/MentionableModel.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/mentions/./src/forum/utils/getCleanDisplayName.js","webpack://@flarum/mentions/./src/forum/mentionables/UserMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/PostMention.tsx","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/models/Group')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/mentions/./src/forum/mentionables/GroupMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/AtMentionFormat.ts","webpack://@flarum/mentions/./src/forum/mentionables/TagMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/HashMentionFormat.ts","webpack://@flarum/mentions/./src/forum/mentionables/formats/MentionFormats.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/UserPage')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/models/Post')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/models/User')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/PostsUserPage')\"","webpack://@flarum/mentions/./src/forum/components/MentionsUserPage.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/mentions/./src/forum/components/PostMentionedNotification.js","webpack://@flarum/mentions/./src/forum/components/UserMentionedNotification.js","webpack://@flarum/mentions/./src/forum/components/GroupMentionedNotification.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/query/IGambit')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/mentions/./src/common/query/posts/MentionedGambit.ts","webpack://@flarum/mentions/./src/common/extend.ts","webpack://@flarum/mentions/./src/forum/extend.ts","webpack://@flarum/mentions/./src/forum/utils/textFormatter.js","webpack://@flarum/mentions/./src/forum/extenders/Mentionables.ts","webpack://@flarum/mentions/./src/forum/index.js","webpack://@flarum/mentions/./src/forum/addPostMentionPreviews.js","webpack://@flarum/mentions/./src/forum/addMentionedByList.js","webpack://@flarum/mentions/./src/forum/addPostReplyAction.js","webpack://@flarum/mentions/./src/forum/addPostQuoteButton.js","webpack://@flarum/mentions/./src/forum/addComposerAutocomplete.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\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};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/string');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/textContrastClass');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Post');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/CommentPost');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/PostPreview');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LoadingIndicator');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Link');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/punctuateSeries');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/username');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Icon');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Modal');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/states/PaginatedListState');","import PaginatedListState from 'flarum/common/states/PaginatedListState';\nexport default class MentionedByModalState extends PaginatedListState {\n constructor(params, page) {\n if (page === void 0) {\n page = 1;\n }\n const limit = 10;\n params.page = {\n ...(params.page || {}),\n limit\n };\n super(params, page, limit);\n }\n get type() {\n return 'posts';\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/state/MentionedByModalState', MentionedByModalState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Form');","import app from 'flarum/forum/app';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport Modal from 'flarum/common/components/Modal';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Button from 'flarum/common/components/Button';\nimport MentionedByModalState from '../state/MentionedByModalState';\nimport Form from 'flarum/common/components/Form';\nexport default class MentionedByModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n this.state = new MentionedByModalState({\n filter: {\n mentionedPost: this.attrs.post.id()\n },\n sort: 'number'\n });\n this.state.refresh();\n }\n className() {\n return 'MentionedByModal';\n }\n title() {\n return app.translator.trans('flarum-mentions.forum.mentioned_by.title');\n }\n content() {\n return m('[', null, m(\"div\", {\n className: \"Modal-body\"\n }, this.state.isInitialLoading() ? m(LoadingIndicator, null) : m('[', null, m(\"ul\", {\n className: \"MentionedByModal-list Dropdown-menu Dropdown-menu--inline Post-mentionedBy-preview\"\n }, this.state.getPages().map(page => page.items.map(reply => m(\"li\", {\n \"data-number\": reply.number()\n }, m(PostPreview, {\n post: reply,\n onclick: () => app.modal.close()\n }))))))), this.state.hasNext() && m(\"div\", {\n className: \"Modal-footer\"\n }, m(Form, {\n className: \"Form--centered\"\n }, m(\"div\", {\n className: \"Form-group\"\n }, m(Button, {\n className: \"Button Button--block\",\n onclick: () => this.state.loadNext(),\n loading: this.state.isLoadingNext()\n }, app.translator.trans('flarum-mentions.forum.mentioned_by.load_more_button'))))));\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/MentionedByModal', MentionedByModal);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","import app from 'flarum/forum/app';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nexport function insertMention(post, composer, quote) {\n return new Promise(resolve => {\n const mention = app.mentionFormats.mentionable('post').replacement(post) + ' ';\n\n // If the composer is empty, then assume we're starting a new reply.\n // In which case we don't want the user to have to confirm if they\n // close the composer straight away.\n if (!composer.fields.content()) {\n composer.body.attrs.originalContent = mention;\n }\n const cursorPosition = composer.editor.getSelectionRange()[0];\n const preceding = composer.fields.content().slice(0, cursorPosition);\n const precedingNewlines = preceding.length == 0 ? 0 : 3 - preceding.match(/(\\n{0,2})$/)[0].length;\n composer.editor.insertAtCursor(Array(precedingNewlines).join('\\n') + (\n // Insert up to two newlines, depending on preceding whitespace\n quote ? '> ' + mention + quote.trim().replace(/\\n/g, '\\n> ') + '\\n\\n' : mention), false);\n return resolve(composer);\n });\n}\nexport default function reply(post, quote) {\n const EditPostComposer = flarum.reg.checkModule('core', 'forum/components/EditPostComposer');\n if (EditPostComposer && app.composer.bodyMatches(EditPostComposer) && app.composer.body.attrs.post.discussion() === post.discussion()) {\n // If we're already editing a post in the discussion of post we're quoting,\n // insert the mention directly.\n return insertMention(post, app.composer, quote);\n } else {\n // The default \"Reply\" action behavior will only open a new composer if\n // necessary, but it will always be a ReplyComposer, hence the exceptional\n // case above.\n return DiscussionControls.replyAction.call(post.discussion()).then(composer => insertMention(post, composer, quote));\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/reply', reply);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Fragment');","import app from 'flarum/forum/app';\nimport Fragment from 'flarum/common/Fragment';\nimport Icon from 'flarum/common/components/Icon';\nimport reply from '../utils/reply';\nexport default class PostQuoteButton extends Fragment {\n constructor(post) {\n super();\n this.post = post;\n }\n view() {\n return m(\"button\", {\n className: \"Button PostQuoteButton\",\n onclick: () => {\n reply(this.post, this.content);\n }\n }, m(Icon, {\n name: \"fas fa-quote-left\",\n className: \"Button-icon\"\n }), app.translator.trans('flarum-mentions.forum.post.quote_button'));\n }\n show(left, top) {\n const $this = this.$().show();\n const parentOffset = $this.offsetParent().offset();\n $this.css('left', left - parentOffset.left).css('top', top - parentOffset.top);\n this.hideHandler = this.hide.bind(this);\n $(document).on('mouseup', this.hideHandler);\n }\n showStart(left, top) {\n const $this = this.$();\n this.show(left, $(window).scrollTop() + top - $this.outerHeight() - 5);\n }\n showEnd(right, bottom) {\n const $this = this.$();\n this.show(right - $this.outerWidth(), $(window).scrollTop() + bottom + 5);\n }\n hide() {\n this.$().hide();\n $(document).off('mouseup', this.hideHandler);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/fragments/PostQuoteButton', PostQuoteButton);","/**\n * Finds the selected text in the provided composer body.\n */\nexport default function selectedText(body) {\n const selection = window.getSelection();\n if (!selection.isCollapsed) {\n const range = selection.getRangeAt(0);\n const parent = range.commonAncestorContainer;\n if (body[0] === parent || $.contains(body[0], parent)) {\n const clone = $('<div>').append(range.cloneContents());\n\n // Replace emoji images with their shortcode (found in alt attribute)\n clone.find('img.emoji').replaceWith(function () {\n return this.alt;\n });\n\n // Replace all other images with a Markdown image\n clone.find('img').replaceWith(function () {\n return \"\");\n });\n\n // Replace all links with a Markdown link\n clone.find('a').replaceWith(function () {\n return \"[\".concat(this.innerText, \"](\").concat(this.href, \")\");\n });\n return clone.text();\n }\n }\n return '';\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/selectedText', selectedText);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/TextEditorButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/KeyboardNavigatable');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/AutocompleteReader');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/throttleDebounce');","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 toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\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 : i + \"\";\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 _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Fragment from 'flarum/common/Fragment';\nexport default class AutocompleteDropdown extends Fragment {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"items\", []);\n _defineProperty(this, \"active\", false);\n _defineProperty(this, \"index\", 0);\n _defineProperty(this, \"keyWasJustPressed\", false);\n }\n view() {\n return m(\"ul\", {\n className: \"Dropdown-menu MentionsDropdown\"\n }, this.items.map(item => m(\"li\", null, item)));\n }\n show(left, top) {\n this.$().show().css({\n left: left + 'px',\n top: top + 'px'\n });\n this.active = true;\n }\n hide() {\n this.$().hide();\n this.active = false;\n }\n navigate(delta) {\n this.keyWasJustPressed = true;\n this.setIndex(this.index + delta, true);\n clearTimeout(this.keyWasJustPressedTimeout);\n this.keyWasJustPressedTimeout = setTimeout(() => this.keyWasJustPressed = false, 500);\n }\n complete() {\n this.$('li').eq(this.index).find('button').click();\n }\n setIndex(index, scrollToItem) {\n if (this.keyWasJustPressed && !scrollToItem) return;\n const $dropdown = this.$();\n const $items = $dropdown.find('li');\n let rangedIndex = index;\n if (rangedIndex < 0) {\n rangedIndex = $items.length - 1;\n } else if (rangedIndex >= $items.length) {\n rangedIndex = 0;\n }\n this.index = rangedIndex;\n const $item = $items.removeClass('active').eq(rangedIndex).addClass('active');\n if (scrollToItem) {\n const dropdownScroll = $dropdown.scrollTop();\n const dropdownTop = $dropdown.offset().top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight();\n const itemTop = $item.offset().top;\n const itemBottom = itemTop + $item.outerHeight();\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({\n scrollTop\n }, 100);\n }\n }\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/fragments/AutocompleteDropdown', AutocompleteDropdown);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Component');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/classList');","import Component from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\nexport default class MentionsDropdownItem extends Component {\n view(vnode) {\n const {\n mentionable,\n ...attrs\n } = this.attrs;\n const className = classList('MentionsDropdownItem', 'PostPreview', \"MentionsDropdown-\".concat(mentionable.type()));\n return m(\"button\", Object.assign({\n className: className\n }, attrs), m(\"span\", {\n className: \"PostPreview-content\"\n }, vnode.children));\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/MentionsDropdownItem', MentionsDropdownItem);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport MentionsDropdownItem from '../components/MentionsDropdownItem';\nexport default class MentionableModels {\n constructor(dropdownItemAttrs) {\n _defineProperty(this, \"mentionables\", void 0);\n /**\n * We store models returned from an API here to preserve order in which they are returned\n * This prevents the list jumping around while models are returned.\n * We also use a hashmap for model IDs to provide O(1) lookup for the users already in the list.\n */\n _defineProperty(this, \"results\", {});\n _defineProperty(this, \"typed\", null);\n _defineProperty(this, \"searched\", []);\n _defineProperty(this, \"dropdownItemAttrs\", {});\n /**\n * Don't send API calls searching for models until at least 2 characters have been typed.\n * This focuses the mention results on models already loaded.\n */\n _defineProperty(this, \"search\", async () => {\n if (!this.typed || this.typed.length <= 1) return;\n const typedLower = this.typed.toLowerCase();\n if (this.searched.includes(typedLower)) return;\n for (const mentionable of this.mentionables) {\n for (const model of await mentionable.search(typedLower)) {\n if (!this.results[mentionable.type()].has(model.id())) {\n this.results[mentionable.type()].set(model.id(), model);\n }\n }\n }\n this.searched.push(typedLower);\n return Promise.resolve();\n });\n this.dropdownItemAttrs = dropdownItemAttrs;\n }\n init(mentionables) {\n this.typed = null;\n this.mentionables = mentionables;\n for (const mentionable of this.mentionables) {\n this.results[mentionable.type()] = new Map(mentionable.initialResults().map(result => [result.id(), result]));\n }\n }\n matches(mentionable, model) {\n var _this$typed;\n return mentionable.matches(model, ((_this$typed = this.typed) == null ? void 0 : _this$typed.toLowerCase()) || '');\n }\n makeSuggestion(mentionable, model) {\n const content = mentionable.suggestion(model, this.typed);\n const replacement = mentionable.replacement(model);\n const {\n onclick,\n ...attrs\n } = this.dropdownItemAttrs;\n return m(MentionsDropdownItem, Object.assign({\n mentionable: mentionable,\n onclick: () => onclick(replacement)\n }, attrs), content);\n }\n buildSuggestions() {\n const suggestions = [];\n for (const mentionable of this.mentionables) {\n if (!mentionable.enabled()) continue;\n let matches = Array.from(this.results[mentionable.type()].values()).filter(model => this.matches(mentionable, model));\n const max = mentionable.maxStoreMatchedResults();\n if (max) matches = matches.splice(0, max);\n for (const model of matches) {\n const dropdownItem = this.makeSuggestion(mentionable, model);\n suggestions.push(dropdownItem);\n }\n }\n return suggestions;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/MentionableModels', MentionableModels);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport default class MentionFormat {\n constructor() {\n _defineProperty(this, \"instances\", void 0);\n _defineProperty(this, \"mentionables\", void 0);\n _defineProperty(this, \"extendable\", void 0);\n }\n makeMentionables() {\n var _this$instances;\n return (_this$instances = this.instances) != null ? _this$instances : this.instances = this.mentionables.map(Mentionable => new Mentionable(this));\n }\n getMentionable(type) {\n var _this$makeMentionable;\n return (_this$makeMentionable = this.makeMentionables().find(mentionable => mentionable.type() === type)) != null ? _this$makeMentionable : null;\n }\n extend(mentionable) {\n if (!this.extendable) throw new Error('This mention format does not allow extending.');\n this.mentionables.push(mentionable);\n }\n\n /**\n * Picks the term to search in the API from the typed text.\n * @example:\n * * Full text = `Hello @\"John D`\n * * Typed text = `\"John D`\n * * Query = `John D`\n */\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/MentionFormat', MentionFormat);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Avatar');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/highlight');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport default class MentionableModel {\n constructor(format) {\n _defineProperty(this, \"format\", void 0);\n this.format = format;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/MentionableModel', MentionableModel);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/extractText');","import app from 'flarum/forum/app';\nimport extractText from 'flarum/common/utils/extractText';\n\n/**\n * Whether to use the old mentions format.\n *\n * `'@username'` or `'@\"Display name\"'`\n */\nexport const shouldUseOldFormat = () => app.forum.attribute('allowUsernameMentionFormat') || false;\nconst getDeletedUserText = () => extractText(app.translator.trans('core.lib.username.deleted_text'));\n\n/**\n * Fetches a user's username or display name.\n *\n * Chooses based on the format option set in the admin settings page.\n *\n * @param user An instance of the User model to fetch the username for\n * @param useDisplayName If `true`, uses `user.displayName()`, otherwise, uses `user.username()`\n */\nexport default function getCleanDisplayName(user, useDisplayName) {\n if (useDisplayName === void 0) {\n useDisplayName = true;\n }\n if (!user) return getDeletedUserText().replace(/\"#[a-z]{0,3}[0-9]+/, '_');\n const text = (useDisplayName ? user.displayName() : user.username()) || getDeletedUserText();\n return text.replace(/\"#[a-z]{0,3}[0-9]+/, '_');\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/getCleanDisplayName', getCleanDisplayName);","import app from 'flarum/forum/app';\nimport usernameHelper from 'flarum/common/helpers/username';\nimport Avatar from 'flarum/common/components/Avatar';\nimport highlight from 'flarum/common/helpers/highlight';\nimport MentionableModel from './MentionableModel';\nimport getCleanDisplayName, { shouldUseOldFormat } from '../utils/getCleanDisplayName';\nexport default class UserMention extends MentionableModel {\n type() {\n return 'user';\n }\n initialResults() {\n return Array.from(app.store.all('users'));\n }\n\n /**\n * Automatically determines which mention syntax to be used based on the option in the\n * admin dashboard. Also performs display name clean-up automatically.\n *\n * @\"Display name\"#UserID or `@username`\n *\n * @example <caption>New display name syntax</caption>\n * // '@\"user\"#1'\n * forUser(User) // User is ID 1, display name is 'User'\n *\n * @example <caption>Using old syntax</caption>\n * // '@username'\n * forUser(user) // User's username is 'username'\n */\n replacement(user) {\n if (shouldUseOldFormat()) {\n const cleanText = getCleanDisplayName(user, false);\n return this.format.format(cleanText);\n }\n const cleanText = getCleanDisplayName(user);\n return this.format.format(cleanText, '', user.id());\n }\n suggestion(model, typed) {\n const username = usernameHelper(model, name => highlight(name, typed));\n return m('[', null, m(Avatar, {\n user: model\n }), username);\n }\n matches(model, typed) {\n if (!typed) return false;\n const names = [model.username(), model.displayName()];\n return names.some(name => name.toLowerCase().substr(0, typed.length) === typed);\n }\n maxStoreMatchedResults() {\n return null;\n }\n async search(typed) {\n return await app.store.find('users', {\n filter: {\n q: typed\n },\n page: {\n limit: 5\n }\n });\n }\n enabled() {\n return true;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/UserMention', UserMention);","import app from 'flarum/forum/app';\nimport MentionableModel from './MentionableModel';\nimport usernameHelper from 'flarum/common/helpers/username';\nimport Avatar from 'flarum/common/components/Avatar';\nimport highlight from 'flarum/common/helpers/highlight';\nimport { truncate } from 'flarum/common/utils/string';\nimport getCleanDisplayName from '../utils/getCleanDisplayName';\nexport default class PostMention extends MentionableModel {\n type() {\n return 'post';\n }\n\n /**\n * If the user is replying to a discussion, or if they are editing a\n * post, then we can suggest other posts in the discussion to mention.\n * We will add the 5 most recent comments in the discussion which\n * match any username characters that have been typed.\n */\n initialResults() {\n const EditPostComposer = flarum.reg.checkModule('core', 'forum/components/EditPostComposer');\n const ReplyComposer = flarum.reg.checkModule('core', 'forum/components/ReplyComposer');\n if ((!ReplyComposer || !app.composer.bodyMatches(ReplyComposer)) && (!EditPostComposer || !app.composer.bodyMatches(EditPostComposer))) {\n return [];\n }\n\n // @ts-ignore\n const composerAttrs = app.composer.body.attrs;\n const composerPost = composerAttrs.post;\n const discussion = composerPost && composerPost.discussion() || composerAttrs.discussion;\n return discussion.posts()\n // Filter to only comment posts, and replies before this message\n .filter(post => post && post.contentType() === 'comment' && (!composerPost || post.number() < composerPost.number()))\n // Sort by new to old\n .sort((a, b) => b.createdAt().getTime() - a.createdAt().getTime());\n }\n\n /**\n * Generates the syntax for mentioning of a post. Also cleans up the display name.\n *\n * @example <caption>Post mention</caption>\n * // '@\"User\"#p13'\n * // @\"Display name\"#pPostID\n * forPostMention(user, 13) // User display name is 'User', post ID is 13\n */\n replacement(post) {\n const user = post.user();\n const cleanText = getCleanDisplayName(user);\n return this.format.format(cleanText, 'p', post.id());\n }\n suggestion(model, typed) {\n var _model$contentPlain;\n const user = model.user() || null;\n const username = usernameHelper(user, name => highlight(name, typed));\n return m('[', null, m(Avatar, {\n user: user\n }), username, [app.translator.trans('flarum-mentions.forum.composer.reply_to_post_text', {\n number: model.number()\n }), ' — ', truncate((_model$contentPlain = model.contentPlain()) != null ? _model$contentPlain : '', 200)]);\n }\n matches(model, typed) {\n const user = model.user();\n const userMentionable = app.mentionFormats.mentionable('user');\n return !typed || user && userMentionable.matches(user, typed);\n }\n maxStoreMatchedResults() {\n return 5;\n }\n\n /**\n * Post mention suggestions are only offered from current discussion posts.\n */\n search(typed) {\n return Promise.resolve([]);\n }\n enabled() {\n return true;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/PostMention', PostMention);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Group');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","import app from 'flarum/forum/app';\nimport Group from 'flarum/common/models/Group';\nimport MentionableModel from './MentionableModel';\nimport Badge from 'flarum/common/components/Badge';\nimport highlight from 'flarum/common/helpers/highlight';\nexport default class GroupMention extends MentionableModel {\n type() {\n return 'group';\n }\n initialResults() {\n return Array.from(app.store.all('groups').filter(g => {\n return g.id() !== Group.GUEST_ID && g.id() !== Group.MEMBER_ID;\n }));\n }\n\n /**\n * Generates the mention syntax for a group mention.\n *\n * @\"Name Plural\"#gGroupID\n *\n * @example <caption>Group mention</caption>\n * // '@\"Mods\"#g4'\n * forGroup(group) // Group display name is 'Mods', group ID is 4\n */\n replacement(group) {\n return this.format.format(group.namePlural(), 'g', group.id());\n }\n suggestion(model, typed) {\n let groupName = model.namePlural();\n if (typed) {\n groupName = highlight(groupName, typed);\n }\n return m('[', null, m(Badge, {\n className: \"Avatar Badge Badge--group--\".concat(model.id(), \" Badge-icon\"),\n color: model.color(),\n type: \"group\",\n icon: model.icon()\n }), m(\"span\", {\n className: \"username\"\n }, groupName));\n }\n matches(model, typed) {\n if (!typed) return false;\n const names = [model.namePlural().toLowerCase(), model.nameSingular().toLowerCase()];\n return names.some(name => name.toLowerCase().substr(0, typed.length) === typed);\n }\n maxStoreMatchedResults() {\n return null;\n }\n\n /**\n * All groups are already loaded, so we don't need to search for them.\n */\n search(typed) {\n return Promise.resolve([]);\n }\n enabled() {\n var _app$session$user$can, _app$session;\n return (_app$session$user$can = (_app$session = app.session) == null || (_app$session = _app$session.user) == null ? void 0 : _app$session.canMentionGroups()) != null ? _app$session$user$can : false;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/GroupMention', GroupMention);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport MentionFormat from './MentionFormat';\nimport UserMention from '../UserMention';\nimport PostMention from '../PostMention';\nimport GroupMention from '../GroupMention';\nexport default class AtMentionFormat extends MentionFormat {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"mentionables\", [UserMention, PostMention, GroupMention]);\n _defineProperty(this, \"extendable\", true);\n }\n trigger() {\n return '@';\n }\n queryFromTyped(typed) {\n const matchTyped = typed.match(/^[\"“]?((?:(?!\"#).)+)$/);\n return matchTyped ? matchTyped[1] : null;\n }\n format(name, char, id) {\n if (char === void 0) {\n char = '';\n }\n if (id === void 0) {\n id = null;\n }\n return {\n simple: \"@\".concat(name),\n safe: \"@\\\"\".concat(name, \"\\\"#\").concat(char).concat(id)\n }[id ? 'safe' : 'simple'];\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/AtMentionFormat', AtMentionFormat);","import app from 'flarum/forum/app';\nimport Badge from 'flarum/common/components/Badge';\nimport highlight from 'flarum/common/helpers/highlight';\nimport MentionableModel from './MentionableModel';\nexport default class TagMention extends MentionableModel {\n type() {\n return 'tag';\n }\n initialResults() {\n return Array.from(app.store.all('tags'));\n }\n\n /**\n * Generates the mention syntax for a tag mention.\n *\n * ~tagSlug\n *\n * @example <caption>Tag mention</caption>\n * // ~general\n * forTag(tag) // Tag display name is 'Tag', tag ID is 5\n */\n replacement(tag) {\n return this.format.format(tag.slug());\n }\n matches(model, typed) {\n if (!typed) return false;\n const names = [model.name().toLowerCase()];\n return names.some(name => name.toLowerCase().substr(0, typed.length) === typed);\n }\n maxStoreMatchedResults() {\n return null;\n }\n async search(typed) {\n return await app.store.find('tags', {\n filter: {\n q: typed\n },\n page: {\n limit: 5\n }\n });\n }\n suggestion(model, typed) {\n let tagName = model.name();\n if (typed) {\n tagName = highlight(tagName, typed);\n }\n return m('[', null, m(Badge, {\n className: \"Avatar\",\n icon: model.icon(),\n color: model.color(),\n type: \"tag\"\n }), m(\"span\", {\n className: \"username\"\n }, tagName));\n }\n enabled() {\n return 'flarum-tags' in flarum.extensions;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/TagMention', TagMention);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport MentionFormat from './MentionFormat';\nimport TagMention from '../TagMention';\nexport default class HashMentionFormat extends MentionFormat {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"mentionables\", [TagMention]);\n _defineProperty(this, \"extendable\", true);\n }\n trigger() {\n return '#';\n }\n queryFromTyped(typed) {\n const matchTyped = typed.match(/^[-_\\p{L}\\p{N}\\p{M}]+$/giu);\n return matchTyped ? matchTyped[0] : null;\n }\n format(slug) {\n return \"#\".concat(slug);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/HashMentionFormat', HashMentionFormat);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport AtMentionFormat from './AtMentionFormat';\nimport HashMentionFormat from './HashMentionFormat';\nexport default class MentionFormats {\n constructor() {\n _defineProperty(this, \"formats\", [new AtMentionFormat(), new HashMentionFormat()]);\n }\n get(symbol) {\n var _this$formats$find;\n return (_this$formats$find = this.formats.find(f => f.trigger() === symbol)) != null ? _this$formats$find : null;\n }\n mentionable(type) {\n for (const format of this.formats) {\n const mentionable = format.getMentionable(type);\n if (mentionable) return mentionable;\n }\n return null;\n }\n extend(format) {\n this.formats.push(new format());\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/MentionFormats', MentionFormats);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/UserPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LinkButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Post');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/User');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/PostsUserPage');","import PostsUserPage from 'flarum/forum/components/PostsUserPage';\n/**\n * The `MentionsUserPage` component shows post which user Mentioned at\n */\nexport default class MentionsUserPage extends PostsUserPage {\n params(user) {\n return {\n filter: {\n type: 'comment',\n mentioned: user.id()\n }\n };\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/MentionsUserPage', MentionsUserPage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\nexport default class PostMentionedNotification extends Notification {\n icon() {\n return 'fas fa-reply';\n }\n href() {\n const notification = this.attrs.notification;\n const post = notification.subject();\n const content = notification.content();\n return app.route.discussion(post.discussion(), content && content.replyNumber);\n }\n content() {\n const notification = this.attrs.notification;\n const user = notification.fromUser();\n return app.translator.trans('flarum-mentions.forum.notifications.post_mentioned_text', {\n user,\n count: 1\n });\n }\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain() || '', 200);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/PostMentionedNotification', PostMentionedNotification);","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\nexport default class UserMentionedNotification extends Notification {\n icon() {\n return 'fas fa-at';\n }\n href() {\n const post = this.attrs.notification.subject();\n return app.route.discussion(post.discussion(), post.number());\n }\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('flarum-mentions.forum.notifications.user_mentioned_text', {\n user\n });\n }\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/UserMentionedNotification', UserMentionedNotification);","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\nexport default class GroupMentionedNotification extends Notification {\n icon() {\n return 'fas fa-at';\n }\n href() {\n const post = this.attrs.notification.subject();\n return app.route.discussion(post.discussion(), post.number());\n }\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('flarum-mentions.forum.notifications.group_mentioned_text', {\n user\n });\n }\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/GroupMentionedNotification', GroupMentionedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/query/IGambit');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/app');","import { KeyValueGambit } from 'flarum/common/query/IGambit';\nimport app from 'flarum/common/app';\nexport default class MentionedGambit extends KeyValueGambit {\n key() {\n return app.translator.trans('flarum-mentions.lib.gambits.posts.mentioned.key', {}, true);\n }\n hint() {\n return app.translator.trans('flarum-mentions.lib.gambits.posts.mentioned.hint', {}, true);\n }\n filterKey() {\n return 'mentioned';\n }\n}\nflarum.reg.add('flarum-mentions', 'common/query/posts/MentionedGambit', MentionedGambit);","import Extend from 'flarum/common/extenders';\nimport MentionedGambit from './query/posts/MentionedGambit';\nexport default [new Extend.Search() //\n.gambit('posts', MentionedGambit)];","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport User from 'flarum/common/models/User';\nimport MentionsUserPage from './components/MentionsUserPage';\nimport PostMentionedNotification from './components/PostMentionedNotification';\nimport UserMentionedNotification from './components/UserMentionedNotification';\nimport GroupMentionedNotification from './components/GroupMentionedNotification';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.Routes() //\n.add('user.mentions', '/u/:username/mentions', MentionsUserPage), new Extend.Model(Post) //\n.hasMany('mentionedBy').attribute('mentionedByCount'), new Extend.Notification() //\n.add('postMentioned', PostMentionedNotification).add('userMentioned', UserMentionedNotification).add('groupMentioned', GroupMentionedNotification), new Extend.Model(User) //\n.attribute('canMentionGroups')];","import app from 'flarum/forum/app';\nimport username from 'flarum/common/helpers/username';\nimport extractText from 'flarum/common/utils/extractText';\nexport function filterUserMentions(tag) {\n let user;\n if (app.forum.attribute('allowUsernameMentionFormat') && tag.hasAttribute('username')) user = app.store.getBy('users', 'username', tag.getAttribute('username'));else if (tag.hasAttribute('id')) user = app.store.getById('users', tag.getAttribute('id'));\n if (user) {\n tag.setAttribute('id', user.id());\n tag.setAttribute('slug', user.slug());\n tag.setAttribute('displayname', extractText(username(user)));\n return true;\n }\n tag.invalidate();\n}\nexport function postFilterUserMentions(tag) {\n tag.setAttribute('deleted', false);\n}\nexport function filterPostMentions(tag) {\n const post = app.store.getById('posts', tag.getAttribute('id'));\n if (post) {\n tag.setAttribute('discussionid', post.discussion().id());\n tag.setAttribute('number', post.number());\n tag.setAttribute('displayname', extractText(username(post.user())));\n return true;\n }\n}\nexport function postFilterPostMentions(tag) {\n tag.setAttribute('deleted', false);\n}\nexport function filterGroupMentions(tag) {\n var _app$session;\n if ((_app$session = app.session) != null && (_app$session = _app$session.user) != null && _app$session.canMentionGroups()) {\n const group = app.store.getById('groups', tag.getAttribute('id'));\n if (group) {\n tag.setAttribute('groupname', extractText(group.namePlural()));\n return true;\n }\n }\n tag.invalidate();\n}\nexport function postFilterGroupMentions(tag) {\n var _app$session2;\n if ((_app$session2 = app.session) != null && (_app$session2 = _app$session2.user) != null && _app$session2.canMentionGroups()) {\n const group = app.store.getById('groups', tag.getAttribute('id'));\n tag.setAttribute('color', group.color());\n tag.setAttribute('icon', group.icon());\n tag.setAttribute('deleted', false);\n }\n}\nexport function filterTagMentions(tag) {\n if ('flarum-tags' in flarum.extensions) {\n const model = app.store.getBy('tags', 'slug', tag.getAttribute('slug'));\n if (model) {\n tag.setAttribute('id', model.id());\n tag.setAttribute('tagname', model.name());\n return true;\n }\n }\n tag.invalidate();\n}\nexport function postFilterTagMentions(tag) {\n if ('flarum-tags' in flarum.extensions) {\n const model = app.store.getBy('tags', 'slug', tag.getAttribute('slug'));\n tag.setAttribute('icon', model.icon());\n tag.setAttribute('color', model.color());\n tag.setAttribute('deleted', false);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/textFormatter', { filterUserMentions: filterUserMentions,postFilterUserMentions: postFilterUserMentions,filterPostMentions: filterPostMentions,postFilterPostMentions: postFilterPostMentions,filterGroupMentions: filterGroupMentions,postFilterGroupMentions: postFilterGroupMentions,filterTagMentions: filterTagMentions,postFilterTagMentions: postFilterTagMentions, });","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport default class Mentionables {\n constructor() {\n _defineProperty(this, \"formats\", []);\n _defineProperty(this, \"mentionables\", {});\n }\n /**\n * Register a new mention format.\n * Must extend MentionFormat and have a unique unused trigger symbol.\n */\n format(format) {\n this.formats.push(format);\n return this;\n }\n\n /**\n * Register a new mentionable model to a mention format.\n * Only works if the format has already been registered,\n * and the format allows using multiple mentionables.\n *\n * @param symbol The trigger symbol of the format to extend (ex: @).\n * @param mentionable The mentionable instance to register.\n * Must extend MentionableModel.\n */\n mentionable(symbol, mentionable) {\n if (!this.mentionables[symbol]) {\n this.mentionables[symbol] = [];\n }\n this.mentionables[symbol].push(mentionable);\n return this;\n }\n extend(app) {\n for (const format of this.formats) {\n app.mentionFormats.extend(format);\n }\n for (const symbol in this.mentionables) {\n const format = app.mentionFormats.get(symbol);\n if (!format) continue;\n for (const mentionable of this.mentionables[symbol]) {\n format.extend(mentionable);\n }\n }\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/extenders/Mentionables', Mentionables);","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport { getPlainContent } from 'flarum/common/utils/string';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport Post from 'flarum/forum/components/Post';\nimport addPostMentionPreviews from './addPostMentionPreviews';\nimport addMentionedByList from './addMentionedByList';\nimport addPostReplyAction from './addPostReplyAction';\nimport addPostQuoteButton from './addPostQuoteButton';\nimport addComposerAutocomplete from './addComposerAutocomplete';\nimport MentionFormats from './mentionables/formats/MentionFormats';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\napp.mentionFormats = new MentionFormats();\nexport { default as extend } from './extend';\napp.initializers.add('flarum-mentions', () => {\n // For every mention of a post inside a post's content, set up a hover handler\n // that shows a preview of the mentioned post.\n addPostMentionPreviews();\n\n // In the footer of each post, show information about who has replied (i.e.\n // who the post has been mentioned by).\n addMentionedByList();\n\n // Add a 'reply' control to the footer of each post. When clicked, it will\n // open up the composer and add a post mention to its contents.\n addPostReplyAction();\n\n // Show a Quote button when Post text is selected\n addPostQuoteButton();\n\n // After typing '@' in the composer, show a dropdown suggesting a bunch of\n // posts or users that the user could mention.\n addComposerAutocomplete();\n\n // Add notification preferences.\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('postMentioned', {\n name: 'postMentioned',\n icon: 'fas fa-reply',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_post_mentioned_label')\n });\n items.add('userMentioned', {\n name: 'userMentioned',\n icon: 'fas fa-at',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_user_mentioned_label')\n });\n items.add('groupMentioned', {\n name: 'groupMentioned',\n icon: 'fas fa-at',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_group_mentioned_label')\n });\n });\n\n // Add mentions tab in user profile\n extend(UserPage.prototype, 'navItems', function (items) {\n const user = this.user;\n items.add('mentions', m(LinkButton, {\n href: app.route('user.mentions', {\n username: user.slug()\n }),\n name: \"mentions\",\n icon: \"fas fa-at\"\n }, app.translator.trans('flarum-mentions.forum.user.mentions_link')), 80);\n });\n\n // Remove post mentions when rendering post previews.\n getPlainContent.removeSelectors.push('a.PostMention');\n\n // Apply color contrast fix on group mentions.\n extend(Post.prototype, 'oncreate', function () {\n this.$('.GroupMention--colored, .TagMention--colored').each(function () {\n this.classList.add(textContrastClass(getComputedStyle(this).getPropertyValue('--color')));\n });\n });\n\n // Auto scope the search to the current user mentioned posts.\n override('flarum/forum/components/SearchModal', 'defaultActiveSource', function (original) {\n const orig = original();\n if (!orig && app.current.data.routeName && app.current.data.routeName.includes('user.mentions') && app.current.data.user) {\n return 'posts';\n }\n return orig;\n });\n extend('flarum/forum/components/SearchModal', 'defaultFilters', function (filters) {\n if (app.current.data.routeName && app.current.data.routeName.includes('user.mentions') && app.current.data.user) {\n filters.posts.mentioned = app.current.data.user.username();\n }\n });\n});\nexport * from './utils/textFormatter';\nimport './forum';","import { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nexport default function addPostMentionPreviews() {\n function addPreviews() {\n const contentHtml = this.attrs.post.contentHtml();\n if (contentHtml === this.oldPostContentHtml || this.isEditing()) return;\n this.oldPostContentHtml = contentHtml;\n const parentPost = this.attrs.post;\n const $parentPost = this.$();\n this.$().on('click', '.UserMention:not(.UserMention--deleted), .PostMention:not(.PostMention--deleted), .TagMention:not(.TagMention--deleted)', function (e) {\n m.route.set(this.getAttribute('href'));\n e.preventDefault();\n });\n this.$('.PostMention:not(.PostMention--deleted)').each(function () {\n const $this = $(this);\n const id = $this.data('id');\n let timeout;\n\n // Wrap the mention link in a wrapper element so that we can insert a\n // preview popup as its sibling and relatively position it.\n const $preview = $('<ul class=\"Dropdown-menu PostMention-preview fade\"/>');\n $parentPost.append($preview);\n const getPostElement = () => {\n return $(\".PostStream-item[data-id=\\\"\".concat(id, \"\\\"]\"));\n };\n const showPreview = () => {\n // When the user hovers their mouse over the mention, look for the\n // post that it's referring to in the stream, and determine if it's\n // in the viewport. If it is, we will \"pulsate\" it.\n const $post = getPostElement();\n let visible = false;\n if ($post.length) {\n const top = $post.offset().top;\n const scrollTop = window.pageYOffset;\n if (top > scrollTop && top + $post.height() < scrollTop + $(window).height()) {\n $post.addClass('pulsate');\n visible = true;\n }\n }\n\n // Otherwise, we will show a popup preview of the post. If the post\n // hasn't yet been loaded, we will need to do that.\n if (!visible) {\n // Position the preview so that it appears above the mention.\n // (The offsetParent should be .Post-body.)\n const positionPreview = () => {\n const previewHeight = $preview.outerHeight(true);\n let offset = 0;\n\n // If the preview goes off the top of the viewport, reposition it to\n // be below the mention.\n if ($this.offset().top - previewHeight < $(window).scrollTop() + $('#header').outerHeight()) {\n offset += $this.outerHeight(true);\n } else {\n offset -= previewHeight;\n }\n $preview.show().css('top', $this.offset().top - $parentPost.offset().top + offset).css('left', $this.offsetParent().offset().left - $parentPost.offset().left).css('max-width', $this.offsetParent().width());\n };\n const showPost = post => {\n const discussion = post.discussion();\n m.render($preview[0], [discussion !== parentPost.discussion() && m(\"li\", null, m(\"span\", {\n className: \"PostMention-preview-discussion\"\n }, discussion.title())), m(\"li\", null, m(PostPreview, {\n post: post\n }))]);\n positionPreview();\n };\n const post = app.store.getById('posts', id);\n if (post && post.discussion()) {\n showPost(post);\n } else {\n m.render($preview[0], m(LoadingIndicator, null));\n app.store.find('posts', id).then(showPost);\n positionPreview();\n }\n setTimeout(() => $preview.off('transitionend').addClass('in'));\n }\n };\n const hidePreview = () => {\n getPostElement().removeClass('pulsate');\n if ($preview.hasClass('in')) {\n $preview.removeClass('in').one('transitionend', () => $preview.hide());\n }\n };\n\n // On a touch (mobile) device we cannot hover the link to reveal the preview.\n // Instead we cancel the navigation so that a click reveals the preview.\n // Users can then click on the preview to go to the post if desired.\n $this.on('touchend', e => {\n if (e.cancelable) {\n e.preventDefault();\n }\n });\n $this.add($preview).hover(() => {\n clearTimeout(timeout);\n timeout = setTimeout(showPreview, 250);\n }, () => {\n clearTimeout(timeout);\n getPostElement().removeClass('pulsate');\n timeout = setTimeout(hidePreview, 250);\n }).on('touchend', e => {\n showPreview();\n e.stopPropagation();\n });\n $(document).on('touchend', hidePreview);\n });\n }\n extend(CommentPost.prototype, 'oncreate', addPreviews);\n extend(CommentPost.prototype, 'onupdate', addPreviews);\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport Link from 'flarum/common/components/Link';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport punctuateSeries from 'flarum/common/helpers/punctuateSeries';\nimport username from 'flarum/common/helpers/username';\nimport Icon from 'flarum/common/components/Icon';\nimport Button from 'flarum/common/components/Button';\nimport MentionedByModal from './components/MentionedByModal';\nexport default function addMentionedByList() {\n function hidePreview() {\n this.$('.Post-mentionedBy-preview').removeClass('in').one('transitionend', function () {\n $(this).hide();\n });\n }\n extend(CommentPost.prototype, 'oncreate', function () {\n let timeout;\n const post = this.attrs.post;\n const replies = post.mentionedBy();\n if (replies && replies.length) {\n const $preview = $('<ul class=\"Dropdown-menu Post-mentionedBy-preview fade\"/>');\n this.$().append($preview);\n const $parentPost = this.$();\n const $this = this.$('.Post-mentionedBy');\n const showPreview = () => {\n if (!$preview.hasClass('in') && $preview.is(':visible')) return;\n\n // When the user hovers their mouse over the list of people who have\n // replied to the post, render a list of reply previews into a\n // popup.\n m.render($preview[0], m('[', null, replies.map(reply => m(\"li\", {\n \"data-number\": reply.number()\n }, m(PostPreview, {\n post: reply,\n onclick: hidePreview.bind(this)\n }))), replies.length < post.mentionedByCount() && m(\"li\", {\n className: \"Post-mentionedBy-preview-more\"\n }, m(Button, {\n className: \"PostPreview Button\",\n onclick: () => {\n hidePreview.call(this);\n app.modal.show(MentionedByModal, {\n post\n });\n }\n }, m(\"span\", {\n className: \"PostPreview-content\"\n }, m(\"span\", {\n className: \"PostPreview-badge Avatar\"\n }, m(Icon, {\n name: 'fas fa-reply-all'\n })), m(\"span\", null, app.translator.trans('flarum-mentions.forum.post.mentioned_by_more_text', {\n count: post.mentionedByCount() - replies.length\n })))))));\n $preview.show().css('top', $this.offset().top - $parentPost.offset().top + $this.outerHeight(true)).css('left', $this.offsetParent().offset().left - $parentPost.offset().left).css('max-width', $parentPost.width());\n setTimeout(() => $preview.off('transitionend').addClass('in'));\n };\n $this.add($preview).hover(() => {\n clearTimeout(timeout);\n timeout = setTimeout(showPreview, 250);\n }, () => {\n clearTimeout(timeout);\n timeout = setTimeout(hidePreview, 250);\n });\n\n // Whenever the user hovers their mouse over a particular name in the\n // list of repliers, highlight the corresponding post in the preview\n // popup.\n this.$().find('.Post-mentionedBy-summary a').hover(function () {\n $preview.find('[data-number=\"' + $(this).data('number') + '\"]').addClass('active');\n }, function () {\n $preview.find('[data-number]').removeClass('active');\n });\n }\n });\n extend(CommentPost.prototype, 'footerItems', function (items) {\n const post = this.attrs.post;\n const replies = post.mentionedBy();\n if (replies && replies.length) {\n const users = [];\n const repliers = replies.sort(reply => reply.user() === app.session.user ? -1 : 0).filter(reply => {\n const user = reply.user();\n if (users.indexOf(user) === -1) {\n users.push(user);\n return true;\n }\n });\n const limit = 4;\n const overLimit = post.mentionedByCount() > limit;\n\n // Create a list of unique users who have replied. So even if a user has\n // replied twice, they will only be in this array once.\n const names = repliers.slice(0, overLimit ? limit - 1 : limit).map(reply => {\n const user = reply.user();\n return m(Link, {\n href: app.route.post(reply),\n onclick: hidePreview.bind(this),\n \"data-number\": reply.number()\n }, app.session.user === user ? app.translator.trans('flarum-mentions.forum.post.you_text') : username(user));\n });\n\n // If there are more users that we've run out of room to display, add a \"x\n // others\" name to the end of the list. Clicking on it will display a modal\n // with a full list of names.\n if (overLimit) {\n const count = post.mentionedByCount() - names.length;\n names.push(app.translator.trans('flarum-mentions.forum.post.others_text', {\n count\n }));\n }\n items.add('replies', m(\"div\", {\n className: \"Post-mentionedBy\"\n }, m(\"span\", {\n className: \"Post-mentionedBy-summary\"\n }, m(Icon, {\n name: 'fas fa-reply'\n }), app.translator.trans(\"flarum-mentions.forum.post.mentioned_by\".concat(repliers[0].user() === app.session.user ? '_self' : '', \"_text\"), {\n count: names.length,\n users: punctuateSeries(names)\n }))));\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Button from 'flarum/common/components/Button';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport reply from './utils/reply';\nexport default function addPostReplyAction() {\n extend(CommentPost.prototype, 'actionItems', function (items) {\n const post = this.attrs.post;\n if (post.isHidden() || app.session.user && !post.discussion().canReply()) return;\n items.add('reply', m(Button, {\n className: \"Button Button--link\",\n onclick: () => reply(post)\n }, app.translator.trans('flarum-mentions.forum.post.reply_link')));\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostQuoteButton from './fragments/PostQuoteButton';\nimport selectedText from './utils/selectedText';\nexport default function addPostQuoteButton() {\n extend(CommentPost.prototype, 'oncreate', function () {\n const post = this.attrs.post;\n if (post.isHidden() || app.session.user && !post.discussion().canReply()) return;\n const $postBody = this.$('.Post-body');\n\n // Wrap the quote button in a wrapper element so that we can render\n // button into it.\n const $container = $('<div class=\"Post-quoteButtonContainer\"></div>');\n const button = new PostQuoteButton(post);\n const handler = function (e) {\n setTimeout(() => {\n const content = selectedText($postBody);\n if (content) {\n button.content = content;\n m.render($container[0], button.render());\n const rects = window.getSelection().getRangeAt(0).getClientRects();\n const firstRect = rects[0];\n if (e.clientY < firstRect.bottom && e.clientX - firstRect.right < firstRect.left - e.clientX) {\n button.showStart(firstRect.left, firstRect.top);\n } else {\n const lastRect = rects[rects.length - 1];\n button.showEnd(lastRect.right, lastRect.bottom);\n }\n }\n }, 1);\n };\n this.$().after($container).on('mouseup', handler);\n if ('ontouchstart' in window) {\n document.addEventListener('selectionchange', handler, false);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport TextEditorButton from 'flarum/common/components/TextEditorButton';\nimport KeyboardNavigatable from 'flarum/common/utils/KeyboardNavigatable';\nimport AutocompleteReader from 'flarum/common/utils/AutocompleteReader';\nimport { throttle } from 'flarum/common/utils/throttleDebounce';\nimport AutocompleteDropdown from './fragments/AutocompleteDropdown';\nimport MentionableModels from './mentionables/MentionableModels';\nexport default function addComposerAutocomplete() {\n extend('flarum/common/components/TextEditor', 'onbuild', function () {\n this.mentionsDropdown = new AutocompleteDropdown();\n this.searchMentions = throttle(250, (mentionables, buildSuggestions) => mentionables.search().then(buildSuggestions));\n const $editor = this.$('.TextEditor-editor').wrap('<div class=\"ComposerBody-mentionsWrapper\"></div>');\n this.navigator = new KeyboardNavigatable();\n this.navigator.when(() => this.mentionsDropdown.active).onUp(() => this.mentionsDropdown.navigate(-1)).onDown(() => this.mentionsDropdown.navigate(1)).onSelect(this.mentionsDropdown.complete.bind(this.mentionsDropdown)).onCancel(this.mentionsDropdown.hide.bind(this.mentionsDropdown)).bindTo($editor);\n $editor.after($('<div class=\"ComposerBody-mentionsDropdownContainer\"></div>'));\n });\n extend('flarum/common/components/TextEditor', 'buildEditorParams', function (params) {\n let matchTyped;\n const suggestionsInputListener = () => {\n const selection = this.attrs.composer.editor.getSelectionRange();\n const cursor = selection[0];\n if (selection[1] - cursor > 0) return;\n let activeFormat = null;\n const autocompleteReader = new AutocompleteReader(character => !!(activeFormat = app.mentionFormats.get(character)));\n const autocompleting = autocompleteReader.check(this.attrs.composer.editor.getLastNChars(30), cursor, /\\S+/);\n const mentionsDropdown = this.mentionsDropdown;\n let mentionables = new MentionableModels({\n onmouseenter: function () {\n mentionsDropdown.setIndex($(this).parent().index());\n },\n onclick: replacement => {\n this.attrs.composer.editor.replaceBeforeCursor(autocompleting.absoluteStart - 1, replacement + ' ');\n this.mentionsDropdown.hide();\n }\n });\n this.mentionsDropdown.hide();\n this.mentionsDropdown.active = false;\n if (autocompleting) {\n mentionables.init(activeFormat.makeMentionables());\n matchTyped = activeFormat.queryFromTyped(autocompleting.typed);\n if (!matchTyped) return;\n mentionables.typed = matchTyped;\n const buildSuggestions = () => {\n // If the user has started to type a mention,\n // then suggest models matching.\n const suggestions = mentionables.buildSuggestions();\n if (suggestions.length) {\n this.mentionsDropdown.items = suggestions;\n m.render(this.$('.ComposerBody-mentionsDropdownContainer')[0], this.mentionsDropdown.render());\n this.mentionsDropdown.show();\n const coordinates = this.attrs.composer.editor.getCaretCoordinates(autocompleting.absoluteStart);\n const width = this.mentionsDropdown.$().outerWidth();\n const height = this.mentionsDropdown.$().outerHeight();\n const parent = this.mentionsDropdown.$().offsetParent();\n let left = coordinates.left;\n let top = coordinates.top + 15;\n\n // Keep the dropdown inside the editor.\n if (top + height > parent.height()) {\n top = coordinates.top - height - 15;\n }\n if (left + width > parent.width()) {\n left = parent.width() - width;\n }\n\n // Prevent the dropdown from going off screen on mobile\n top = Math.max(-(parent.offset().top - $(document).scrollTop()), top);\n left = Math.max(-parent.offset().left, left);\n this.mentionsDropdown.show(left, top);\n } else {\n this.mentionsDropdown.active = false;\n this.mentionsDropdown.hide();\n }\n };\n this.mentionsDropdown.active = true;\n buildSuggestions();\n this.mentionsDropdown.setIndex(0);\n this.mentionsDropdown.$().scrollTop(0);\n this.searchMentions(mentionables, buildSuggestions);\n }\n };\n params.inputListeners.push(suggestionsInputListener);\n });\n extend('flarum/common/components/TextEditor', 'toolbarItems', function (items) {\n items.add('mention', m(TextEditorButton, {\n onclick: () => this.attrs.composer.editor.insertAtCursor(' @'),\n icon: \"fas fa-at\"\n }, app.translator.trans('flarum-mentions.forum.composer.mention_tooltip')));\n });\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","MentionedByModalState","constructor","params","page","limit","super","type","add","MentionedByModal","oninit","vnode","this","state","filter","mentionedPost","attrs","post","id","sort","refresh","className","title","trans","content","m","isInitialLoading","getPages","map","items","reply","number","onclick","close","hasNext","loadNext","loading","isLoadingNext","insertMention","composer","quote","Promise","resolve","mention","mentionable","replacement","fields","body","originalContent","cursorPosition","editor","getSelectionRange","preceding","slice","precedingNewlines","length","match","insertAtCursor","Array","join","trim","replace","EditPostComposer","checkModule","bodyMatches","discussion","then","PostQuoteButton","view","name","show","left","top","$this","$","parentOffset","offsetParent","offset","css","hideHandler","hide","bind","document","on","showStart","window","scrollTop","outerHeight","showEnd","right","bottom","outerWidth","off","selectedText","selection","getSelection","isCollapsed","range","getRangeAt","parent","commonAncestorContainer","contains","clone","append","cloneContents","find","replaceWith","alt","concat","src","innerText","href","text","_typeof","iterator","_defineProperty","i","t","r","e","toPrimitive","TypeError","String","configurable","writable","AutocompleteDropdown","arguments","item","active","navigate","delta","keyWasJustPressed","setIndex","index","clearTimeout","keyWasJustPressedTimeout","setTimeout","complete","eq","click","scrollToItem","$dropdown","$items","rangedIndex","$item","removeClass","addClass","dropdownScroll","dropdownTop","dropdownBottom","itemTop","itemBottom","parseInt","stop","animate","MentionsDropdownItem","assign","children","MentionableModels","dropdownItemAttrs","async","typed","typedLower","toLowerCase","searched","includes","mentionables","model","search","results","has","set","push","init","Map","initialResults","result","matches","_this$typed","makeSuggestion","suggestion","buildSuggestions","suggestions","enabled","from","values","max","maxStoreMatchedResults","splice","dropdownItem","MentionFormat","makeMentionables","_this$instances","instances","Mentionable","getMentionable","_this$makeMentionable","extend","extendable","Error","MentionableModel","format","getDeletedUserText","getCleanDisplayName","user","useDisplayName","displayName","username","UserMention","all","attribute","cleanText","some","substr","q","PostMention","ReplyComposer","composerAttrs","composerPost","posts","contentType","b","createdAt","getTime","_model$contentPlain","truncate","contentPlain","userMentionable","GroupMention","g","group","namePlural","groupName","color","icon","nameSingular","_app$session$user$can","_app$session","canMentionGroups","AtMentionFormat","trigger","queryFromTyped","matchTyped","char","simple","safe","TagMention","tag","slug","tagName","extensions","HashMentionFormat","MentionFormats","symbol","_this$formats$find","formats","f","MentionsUserPage","mentioned","PostMentionedNotification","notification","subject","replyNumber","fromUser","count","excerpt","UserMentionedNotification","GroupMentionedNotification","MentionedGambit","KeyValueGambit","hint","filterKey","gambit","hasMany","filterUserMentions","hasAttribute","getBy","getAttribute","getById","setAttribute","invalidate","postFilterUserMentions","filterPostMentions","postFilterPostMentions","filterGroupMentions","postFilterGroupMentions","_app$session2","filterTagMentions","postFilterTagMentions","app","mentionFormats","addPreviews","contentHtml","oldPostContentHtml","isEditing","parentPost","$parentPost","route","preventDefault","each","data","timeout","$preview","getPostElement","showPreview","$post","visible","pageYOffset","height","positionPreview","previewHeight","width","showPost","render","store","hidePreview","hasClass","one","cancelable","hover","stopPropagation","addPostMentionPreviews","replies","mentionedBy","is","mentionedByCount","users","repliers","indexOf","overLimit","names","addMentionedByList","isHidden","canReply","$postBody","$container","button","handler","rects","getClientRects","firstRect","clientY","clientX","lastRect","after","addEventListener","mentionsDropdown","searchMentions","throttle","$editor","wrap","navigator","when","onUp","onDown","onSelect","onCancel","bindTo","inputListeners","cursor","activeFormat","autocompleting","character","check","getLastNChars","onmouseenter","replaceBeforeCursor","absoluteStart","coordinates","getCaretCoordinates","Math","label","getPlainContent","removeSelectors","classList","getComputedStyle","getPropertyValue","override","original","orig","routeName","filters"],"sourceRoot":""} |