diff --git a/extensions/tags/js/dist/admin.js.map b/extensions/tags/js/dist/admin.js.map
index efd2db3ce..b24707522 100644
--- a/extensions/tags/js/dist/admin.js.map
+++ b/extensions/tags/js/dist/admin.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/external \"flarum.core.compat['Model']\"","webpack://@flarum/tags/external \"flarum.core.compat['extend']\"","webpack://@flarum/tags/./src/common/utils/sortTags.js","webpack://@flarum/tags/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['components/Button']\"","webpack://@flarum/tags/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/tags/./src/common/models/Tag.js","webpack://@flarum/tags/external \"flarum.core.compat['utils/extract']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/PermissionGrid']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/mixin']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/computed']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Page']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Modal']\"","webpack://@flarum/tags/./src/common/compat.js","webpack://@flarum/tags/external \"flarum.core\"","webpack://@flarum/tags/./src/admin/addTagsPermissionScope.js","webpack://@flarum/tags/./src/admin/addTagPermission.js","webpack://@flarum/tags/./src/admin/components/EditTagModal.js","webpack://@flarum/tags/./src/admin/components/TagSettingsModal.js","webpack://@flarum/tags/./src/admin/components/TagsPage.js","webpack://@flarum/tags/./src/admin/addTagsPane.js","webpack://@flarum/tags/./src/admin/addTagsHomePageOption.js","webpack://@flarum/tags/./src/admin/addTagChangePermission.js","webpack://@flarum/tags/./src/admin/compat.js","webpack://@flarum/tags/./src/admin/index.js","webpack://@flarum/tags/external \"flarum.core.compat['components/PermissionDropdown']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Dropdown']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/AdminNav']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/AdminLinkButton']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/ItemList']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/string']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/SettingsModal']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/BasicsPage']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/SettingDropdown']\"","webpack://@flarum/tags/./admin.js","webpack://@flarum/tags/./node_modules/html5sortable/dist/html.sortable.js","webpack://@flarum/tags/external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","sortTags","tags","slice","sort","a","b","aPos","position","bPos","discussionCount","aParent","parent","bParent","__webpack_exports__","_inheritsLoose","subClass","superClass","constructor","__proto__","tagLabel","flarum_utils_extract__WEBPACK_IMPORTED_MODULE_0__","flarum_utils_extract__WEBPACK_IMPORTED_MODULE_0___default","tag","attrs","style","className","link","extract","color","backgroundColor","title","description","href","app","route","slug","config","translator","trans","tagIcon","tagsLabel","_tagLabel__WEBPACK_IMPORTED_MODULE_1__","_utils_sortTags__WEBPACK_IMPORTED_MODULE_2__","children","forEach","length","push","_extends","assign","target","arguments","source","apply","this","Tag","mixin","Model","attribute","backgroundUrl","backgroundMode","hasOne","defaultSort","isChild","isHidden","lastPostedAt","transformDate","lastPostedDiscussion","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","computed","_utils_sortTags__WEBPACK_IMPORTED_MODULE_0__","_models_Tag__WEBPACK_IMPORTED_MODULE_1__","_helpers_tagsLabel__WEBPACK_IMPORTED_MODULE_2__","_helpers_tagIcon__WEBPACK_IMPORTED_MODULE_3__","_helpers_tagLabel__WEBPACK_IMPORTED_MODULE_4__","tags/utils/sortTags","tags/models/Tag","tags/helpers/tagsLabel","tags/helpers/tagIcon","tags/helpers/tagLabel","addTagsPermissionScope","override","original","permission","tagPrefix","match","substr","map","required","extend","PermissionGrid","items","store","all","filter","add","id","label","onremove","save","render","item","indexOf","PermissionDropdown","component","allowGuest","Dropdown","buttonClassName","icon","caretIcon","Button","onclick","addTagPermission","EditTagModal","init","_Modal","props","createRecord","prop","content","fields","toArray","_this","ItemList","placeholder","oninput","e","withAttr","type","checked","onchange","loading","exists","delete","submitData","onsubmit","_this2","preventDefault","then","hide","response","handleErrors","_this3","confirm","pushData","attributes","relationships","redraw","Modal","TagSettingsModal","setMinTags","minTags","maxTags","Math","max","form","minPrimaryTags","setting","maxPrimaryTags","minSecondaryTags","maxSecondaryTags","min","bidi","SettingsModal","tagItem","data-id","modal","show","child","TagsPage","view","localeCompare","$","sortable","connectWith","on","ui","startparent","is","endparent","getById","data","order","find","j","request","url","forum","method","strategy","Page","addTagsPane","routes","path","extensionSettings","AdminNav","AdminLinkButton","addTagsHomePageOption","BasicsPage","addTagChangePermission","minutes","parseInt","settings","allow_tag_change","SettingDropdown","defaultLabel","transChoice","count","options","admin_compat","esm_extends","tags/addTagsHomePageOption","tags/addTagChangePermission","tags/addTagsPane","tags/components/TagSettingsModal","tags/components/TagsPage","tags/components/EditTagModal","tags/addTagPermission","tags/addTagsPermissionScope","initializers","models","tagsCompat","_src_common__WEBPACK_IMPORTED_MODULE_0__","__WEBPACK_IMPORT_KEY__","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","undefined","dragging","draggingHeight","placeholders","sortables","_removeItemEvents","off","_removeSortableEvents","_attachGhost","event","ghost","dataTransfer","effectAllowed","setData","setDragImage","x","y","_getGhost","$draggedItem","draggedItem","_makeGhost","pageX","offset","left","pageY","top","_addGhostPos","_listsConnected","curList","destList","_enableSortable","opts","handles","handle","attr","document","createElement","dragDrop","disableIEFix","index","parents","selector","$sortables","String","dragImage","placeholderClass","draggingClass","each","$sortable","test","soptions","_getOptions","_reloadSortable","startParent","newParent","tagName","addClass","stopImmediatePropagation","originalEvent","console","log","height","triggerHandler","removeClass","detach","oldindex","elementIndex","oldElementIndex","stopPropagation","after","trigger","dropEffect","thisHeight","forcePlaceholderSize","deadZone","offsetTop","before","not","append","destroy","removeData","removeAttr","_removeSortableData","_removeItemData","_destroySortable","enable","disable","_disableSortable","fn","jQuery"],"mappings":"2BACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QA0DA,OArDAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,aAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAA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AAAzH,MAAA8P,OAAArL,IAGA,gBAqBA,OAhBAiD,EAAAqI,QAAA,SAAArI,IApPA,SAAAA,GACA,IAAAqF,EAAArF,EAAAQ,KAAA,YACA1F,EAAAkF,EAAApI,SAAAyN,EAAAvK,OACAwK,EAAAD,EAAAE,OAAAzK,EAAA4F,KAAA2E,EAAAE,QAAAzK,EAEA+I,EAAA7D,GArCA,SAAAA,GACAA,EAAAsI,WAAA,QACAtI,EAAAsI,WAAA,eACAtI,EAAAsI,WAAA,SACAtI,EAAAuI,WAAA,mBAkCAC,CAAAxI,GAEAsF,EAAA1B,IAAA,iBACAD,EAAA7I,GA/BA,SAAAA,GACAA,EAAAyN,WAAA,gBACAzN,EAAAyN,WAAA,aACAzN,EAAAyN,WAAA,QA6BAE,CAAA3N,GA2OA4N,CAAA1I,IAGAA,EAAA2I,OAAA,SAAA3I,GACAoF,EAAApF,IAGAA,EAAA4I,QAAA,SAAA5I,IArNA,SAAAA,GACA,IAAAqF,EAAArF,EAAAQ,KAAA,QACA1F,EAAAkF,EAAApI,SAAAyN,EAAAvK,OACAwK,EAAAD,EAAAE,OAAAzK,EAAA4F,KAAA2E,EAAAE,QAAAzK,EACAkF,EAAAwF,KAAA,0BACAF,EAAAE,KAAA,gBACAF,EAAA1B,IAAA,iBAgNAiF,CAAA7I,IAGAD,EAAA+I,GAAA9I,SAAA,SAAAmC,GACA,OAAAnC,EAAA1H,KAAA6J,IAGAnC,IAzZ8BmD,EAAA9K,MAAAzF,EAAAwQ,GAAAD,KAAAtQ,EAAAD,QAAAyQ,kBCF9BxQ,EAAAD,QAAAmW","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 49);\n","module.exports = flarum.core.compat['Model'];","module.exports = flarum.core.compat['extend'];","export default function sortTags(tags) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null)\n return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent)\n return aParent.position() - bParent.position();\n\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent)\n return aParent === b ? 1 : aParent.position() - bPos;\n\n else if (bParent)\n return bParent === a ? -1 : aPos - bParent.position();\n\n return 0;\n });\n}\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import extract from 'flarum/utils/extract';\n\nexport default function tagLabel(tag, attrs = {}) {\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n\n const link = extract(attrs, 'link');\n\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style.backgroundColor = attrs.style.color = color;\n attrs.className += ' colored';\n }\n\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {tags: tag.slug()});\n attrs.config = m.route;\n }\n } else {\n attrs.className += ' untagged';\n }\n\n return (\n m((link ? 'a' : 'span'), attrs,\n \n {tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text')}\n \n )\n );\n}\n","export default function tagIcon(tag, attrs = {}) {\n attrs.className = 'icon TagIcon ' + (attrs.className || '');\n\n if (tag) {\n attrs.style = attrs.style || {};\n attrs.style.backgroundColor = tag.color();\n } else {\n attrs.className += ' untagged';\n }\n\n return ;\n}\n","import extract from 'flarum/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\n\nexport default function tagsLabel(tags, attrs = {}) {\n const children = [];\n const link = extract(attrs, 'link');\n\n attrs.className = 'TagsLabel ' + (attrs.className || '');\n\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {link}));\n }\n });\n } else {\n children.push(tagLabel());\n }\n\n return {children} ;\n}\n","module.exports = flarum.core.compat['components/Button'];","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","import Model from 'flarum/Model';\nimport mixin from 'flarum/utils/mixin';\nimport computed from 'flarum/utils/computed';\n\nexport default class Tag extends mixin(Model, {\n name: Model.attribute('name'),\n slug: Model.attribute('slug'),\n description: Model.attribute('description'),\n\n color: Model.attribute('color'),\n backgroundUrl: Model.attribute('backgroundUrl'),\n backgroundMode: Model.attribute('backgroundMode'),\n\n position: Model.attribute('position'),\n parent: Model.hasOne('parent'),\n defaultSort: Model.attribute('defaultSort'),\n isChild: Model.attribute('isChild'),\n isHidden: Model.attribute('isHidden'),\n\n discussionCount: Model.attribute('discussionCount'),\n lastPostedAt: Model.attribute('lastPostedAt', Model.transformDate),\n lastPostedDiscussion: Model.hasOne('lastPostedDiscussion'),\n\n isRestricted: Model.attribute('isRestricted'),\n canStartDiscussion: Model.attribute('canStartDiscussion'),\n canAddToDiscussion: Model.attribute('canAddToDiscussion'),\n\n isPrimary: computed('position', 'parent', (position, parent) => position !== null && parent === false)\n}) {}\n","module.exports = flarum.core.compat['utils/extract'];","module.exports = flarum.core.compat['components/PermissionGrid'];","module.exports = flarum.core.compat['utils/mixin'];","module.exports = flarum.core.compat['utils/computed'];","module.exports = flarum.core.compat['components/Page'];","module.exports = flarum.core.compat['components/Modal'];","import sortTags from './utils/sortTags';\nimport Tag from './models/Tag';\nimport tagsLabel from './helpers/tagsLabel';\nimport tagIcon from './helpers/tagIcon';\nimport tagLabel from './helpers/tagLabel';\n\nexport default {\n 'tags/utils/sortTags': sortTags,\n 'tags/models/Tag': Tag,\n 'tags/helpers/tagsLabel': tagsLabel,\n 'tags/helpers/tagIcon': tagIcon,\n 'tags/helpers/tagLabel': tagLabel\n};\n","module.exports = flarum.core;","import { extend, override } from 'flarum/extend';\nimport PermissionGrid from 'flarum/components/PermissionGrid';\nimport PermissionDropdown from 'flarum/components/PermissionDropdown';\nimport Dropdown from 'flarum/components/Dropdown';\nimport Button from 'flarum/components/Button';\n\nimport tagLabel from '../common/helpers/tagLabel';\nimport tagIcon from '../common/helpers/tagIcon';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function() {\n override(app, 'getRequiredPermissions', (original, permission) => {\n const tagPrefix = permission.match(/^tag\\d+\\./);\n\n if (tagPrefix) {\n const globalPermission = permission.substr(tagPrefix[0].length);\n\n const required = original(globalPermission);\n\n return required.map(required => tagPrefix[0] + required);\n }\n\n return original(permission);\n });\n\n extend(PermissionGrid.prototype, 'scopeItems', items => {\n sortTags(app.store.all('tags'))\n .filter(tag => tag.isRestricted())\n .forEach(tag => items.add('tag' + tag.id(), {\n label: tagLabel(tag),\n onremove: () => tag.save({isRestricted: false}),\n render: item => {\n if (item.permission === 'viewDiscussions'\n || item.permission === 'startDiscussion'\n || (item.permission && item.permission.indexOf('discussion.') === 0)) {\n return PermissionDropdown.component({\n permission: 'tag' + tag.id() + '.' + item.permission,\n allowGuest: item.allowGuest\n });\n }\n\n return '';\n }\n }));\n });\n\n extend(PermissionGrid.prototype, 'scopeControlItems', items => {\n const tags = sortTags(app.store.all('tags').filter(tag => !tag.isRestricted()));\n\n if (tags.length) {\n items.add('tag', Dropdown.component({\n className: 'Dropdown--restrictByTag',\n buttonClassName: 'Button Button--text',\n label: app.translator.trans('flarum-tags.admin.permissions.restrict_by_tag_heading'),\n icon: 'fas fa-plus',\n caretIcon: null,\n children: tags.map(tag => Button.component({\n icon: true,\n children: [tagIcon(tag, {className: 'Button-icon'}), ' ', tag.name()],\n onclick: () => tag.save({isRestricted: true})\n }))\n }));\n }\n });\n}\n","import { extend } from 'flarum/extend';\nimport PermissionGrid from 'flarum/components/PermissionGrid';\n\nexport default function() {\n extend(PermissionGrid.prototype, 'moderateItems', items => {\n items.add('tag', {\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.tag_discussions_label'),\n permission: 'discussion.tag'\n }, 95);\n });\n}\n","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\nimport ItemList from 'flarum/utils/ItemList';\nimport { slug } from 'flarum/utils/string';\n\nimport tagLabel from '../../common/helpers/tagLabel';\n\n/**\n * The `EditTagModal` component shows a modal dialog which allows the user\n * to create or edit a tag.\n */\nexport default class EditTagModal extends Modal {\n init() {\n super.init();\n\n this.tag = this.props.tag || app.store.createRecord('tags');\n\n this.name = m.prop(this.tag.name() || '');\n this.slug = m.prop(this.tag.slug() || '');\n this.description = m.prop(this.tag.description() || '');\n this.color = m.prop(this.tag.color() || '');\n this.isHidden = m.prop(this.tag.isHidden() || false);\n }\n\n className() {\n return 'EditTagModal Modal--small';\n }\n\n title() {\n return this.name()\n ? tagLabel({\n name: this.name,\n color: this.color\n })\n : app.translator.trans('flarum-tags.admin.edit_tag.title');\n }\n\n content() {\n return (\n
\n
\n {this.fields().toArray()}\n
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add('name', \n {app.translator.trans('flarum-tags.admin.edit_tag.name_label')} \n {\n this.name(e.target.value);\n this.slug(slug(e.target.value));\n }}/>\n
, 50);\n\n items.add('slug', \n {app.translator.trans('flarum-tags.admin.edit_tag.slug_label')} \n \n
, 40);\n\n items.add('description', \n {app.translator.trans('flarum-tags.admin.edit_tag.description_label')} \n \n
, 30);\n\n items.add('color', \n {app.translator.trans('flarum-tags.admin.edit_tag.color_label')} \n \n
, 20);\n\n items.add('hidden', \n
\n \n \n {app.translator.trans('flarum-tags.admin.edit_tag.hide_label')}\n \n
\n
, 10);\n\n items.add('submit', \n {Button.component({\n type: 'submit',\n className: 'Button Button--primary EditTagModal-save',\n loading: this.loading,\n children: app.translator.trans('flarum-tags.admin.edit_tag.submit_button')\n })}\n {this.tag.exists ? (\n \n {app.translator.trans('flarum-tags.admin.edit_tag.delete_tag_button')}\n \n ) : ''}\n
, -10);\n\n return items;\n }\n\n submitData() {\n return {\n name: this.name(),\n slug: this.slug(),\n description: this.description(),\n color: this.color(),\n isHidden: this.isHidden()\n };\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n this.tag.save(this.submitData()).then(\n () => this.hide(),\n response => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n }\n\n delete() {\n if (confirm(app.translator.trans('flarum-tags.admin.edit_tag.delete_tag_confirmation'))) {\n const children = app.store.all('tags').filter(tag => tag.parent() === this.tag);\n\n this.tag.delete().then(() => {\n children.forEach(tag => tag.pushData({\n attributes: {isChild: false},\n relationships: {parent: null}\n }));\n m.redraw();\n });\n\n this.hide();\n }\n }\n}\n","import SettingsModal from 'flarum/components/SettingsModal';\n\nexport default class TagSettingsModal extends SettingsModal {\n setMinTags(minTags, maxTags, value) {\n minTags(value);\n maxTags(Math.max(value, maxTags()));\n }\n\n className() {\n return 'TagSettingsModal Modal--small';\n }\n\n title() {\n return app.translator.trans('flarum-tags.admin.tag_settings.title');\n }\n\n form() {\n const minPrimaryTags = this.setting('flarum-tags.min_primary_tags', 0);\n const maxPrimaryTags = this.setting('flarum-tags.max_primary_tags', 0);\n\n const minSecondaryTags = this.setting('flarum-tags.min_secondary_tags', 0);\n const maxSecondaryTags = this.setting('flarum-tags.max_secondary_tags', 0);\n\n return [\n \n
{app.translator.trans('flarum-tags.admin.tag_settings.required_primary_heading')} \n
\n {app.translator.trans('flarum-tags.admin.tag_settings.required_primary_text')}\n
\n
\n \n {app.translator.trans('flarum-tags.admin.tag_settings.range_separator_text')}\n \n
\n
,\n\n \n
{app.translator.trans('flarum-tags.admin.tag_settings.required_secondary_heading')} \n
\n {app.translator.trans('flarum-tags.admin.tag_settings.required_secondary_text')}\n
\n
\n \n {app.translator.trans('flarum-tags.admin.tag_settings.range_separator_text')}\n \n
\n
\n ];\n }\n}\n","import 'html5sortable';\n\nimport Page from 'flarum/components/Page';\nimport Button from 'flarum/components/Button';\n\nimport EditTagModal from './EditTagModal';\nimport TagSettingsModal from './TagSettingsModal';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport sortTags from '../../common/utils/sortTags';\n\nfunction tagItem(tag) {\n return (\n \n \n {tagIcon(tag)}\n {tag.name()} \n {Button.component({\n className: 'Button Button--link',\n icon: 'fas fa-pencil-alt',\n onclick: () => app.modal.show(new EditTagModal({tag}))\n })}\n
\n {!tag.isChild() && tag.position() !== null ? (\n \n {sortTags(app.store.all('tags'))\n .filter(child => child.parent() === tag)\n .map(tagItem)}\n \n ) : ''}\n \n );\n}\n\nexport default class TagsPage extends Page {\n view() {\n return (\n \n
\n
\n
\n {app.translator.trans('flarum-tags.admin.tags.about_tags_text')}\n
\n {Button.component({\n className: 'Button Button--primary',\n icon: 'fas fa-plus',\n children: app.translator.trans('flarum-tags.admin.tags.create_tag_button'),\n onclick: () => app.modal.show(new EditTagModal())\n })}\n {Button.component({\n className: 'Button',\n children: app.translator.trans('flarum-tags.admin.tags.settings_button'),\n onclick: () => app.modal.show(new TagSettingsModal())\n })}\n
\n
\n
\n
\n
\n
{app.translator.trans('flarum-tags.admin.tags.primary_heading')} \n
\n {sortTags(app.store.all('tags'))\n .filter(tag => tag.position() !== null && !tag.isChild())\n .map(tagItem)}\n \n
\n\n
\n
{app.translator.trans('flarum-tags.admin.tags.secondary_heading')} \n
\n {app.store.all('tags')\n .filter(tag => tag.position() === null)\n .sort((a, b) => a.name().localeCompare(b.name()))\n .map(tagItem)}\n \n
\n
\n
\n
\n );\n }\n\n config() {\n this.$('ol, ul')\n .sortable({connectWith: 'primary'})\n .on('sortupdate', (e, ui) => {\n // If we've moved a tag from 'primary' to 'secondary', then we'll update\n // its attributes in our local store so that when we redraw the change\n // will be made.\n if (ui.startparent.is('ol') && ui.endparent.is('ul')) {\n app.store.getById('tags', ui.item.data('id')).pushData({\n attributes: {\n position: null,\n isChild: false\n },\n relationships: {parent: null}\n });\n }\n\n // Construct an array of primary tag IDs and their children, in the same\n // order that they have been arranged in.\n const order = this.$('.TagList--primary > li')\n .map(function() {\n return {\n id: $(this).data('id'),\n children: $(this).find('li')\n .map(function() {\n return $(this).data('id');\n }).get()\n };\n }).get();\n\n // Now that we have an accurate representation of the order which the\n // primary tags are in, we will update the tag attributes in our local\n // store to reflect this order.\n order.forEach((tag, i) => {\n const parent = app.store.getById('tags', tag.id);\n parent.pushData({\n attributes: {\n position: i,\n isChild: false\n },\n relationships: {parent: null}\n });\n\n tag.children.forEach((child, j) => {\n app.store.getById('tags', child).pushData({\n attributes: {\n position: j,\n isChild: true\n },\n relationships: {parent}\n });\n });\n });\n\n app.request({\n url: app.forum.attribute('apiUrl') + '/tags/order',\n method: 'POST',\n data: {order}\n });\n\n // A diff redraw won't work here, because sortable has mucked around\n // with the DOM which will confuse Mithril's diffing algorithm. Instead\n // we force a full reconstruction of the DOM.\n m.redraw.strategy('all');\n m.redraw();\n });\n }\n}\n","import { extend } from 'flarum/extend';\nimport AdminNav from 'flarum/components/AdminNav';\nimport AdminLinkButton from 'flarum/components/AdminLinkButton';\n\nimport TagsPage from './components/TagsPage';\n\nexport default function() {\n app.routes.tags = {path: '/tags', component: TagsPage.component()};\n\n app.extensionSettings['flarum-tags'] = () => m.route(app.route('tags'));\n\n extend(AdminNav.prototype, 'items', items => {\n items.add('tags', AdminLinkButton.component({\n href: app.route('tags'),\n icon: 'fas fa-tags',\n children: app.translator.trans('flarum-tags.admin.nav.tags_button'),\n description: app.translator.trans('flarum-tags.admin.nav.tags_text')\n }));\n });\n}\n","import { extend } from 'flarum/extend';\nimport BasicsPage from 'flarum/components/BasicsPage';\n\nexport default function() {\n extend(BasicsPage.prototype, 'homePageItems', items => {\n items.add('tags', {\n path: '/tags',\n label: app.translator.trans('flarum-tags.admin.basics.tags_label')\n });\n });\n}\n","import { extend } from 'flarum/extend';\nimport PermissionGrid from 'flarum/components/PermissionGrid';\nimport SettingDropdown from 'flarum/components/SettingDropdown';\n\nexport default function() {\n extend(PermissionGrid.prototype, 'startItems', items => {\n items.add('allowTagChange', {\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.allow_edit_tags_label'),\n setting: () => {\n const minutes = parseInt(app.data.settings.allow_tag_change, 10);\n\n return SettingDropdown.component({\n defaultLabel: minutes\n ? app.translator.transChoice('core.admin.permissions_controls.allow_some_minutes_button', minutes, {count: minutes})\n : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),\n key: 'allow_tag_change',\n options: [\n {value: '-1', label: app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button')},\n {value: '10', label: app.translator.trans('core.admin.permissions_controls.allow_ten_minutes_button')},\n {value: 'reply', label: app.translator.trans('core.admin.permissions_controls.allow_until_reply_button')}\n ]\n });\n }\n }, 90);\n });\n}\n","import compat from '../common/compat';\n\nimport addTagsHomePageOption from './addTagsHomePageOption';\nimport addTagChangePermission from './addTagChangePermission';\nimport addTagsPane from './addTagsPane';\nimport TagSettingsModal from './components/TagSettingsModal';\nimport TagsPage from './components/TagsPage';\nimport EditTagModal from './components/EditTagModal';\nimport addTagPermission from './addTagPermission';\nimport addTagsPermissionScope from './addTagsPermissionScope';\n\nexport default Object.assign(compat, {\n 'tags/addTagsHomePageOption': addTagsHomePageOption,\n 'tags/addTagChangePermission': addTagChangePermission,\n 'tags/addTagsPane': addTagsPane,\n 'tags/components/TagSettingsModal': TagSettingsModal,\n 'tags/components/TagsPage': TagsPage,\n 'tags/components/EditTagModal': EditTagModal,\n 'tags/addTagPermission': addTagPermission,\n 'tags/addTagsPermissionScope': addTagsPermissionScope,\n});\n","import Tag from '../common/models/Tag';\nimport addTagsPermissionScope from './addTagsPermissionScope';\nimport addTagPermission from './addTagPermission';\nimport addTagsPane from './addTagsPane';\nimport addTagsHomePageOption from './addTagsHomePageOption';\nimport addTagChangePermission from './addTagChangePermission';\n\napp.initializers.add('flarum-tags', app => {\n app.store.models.tags = Tag;\n\n addTagsPermissionScope();\n addTagPermission();\n addTagsPane();\n addTagsHomePageOption();\n addTagChangePermission();\n});\n\n\n// Expose compat API\nimport tagsCompat from './compat';\nimport { compat } from '@flarum/core/admin';\n\nObject.assign(compat, tagsCompat);\n","module.exports = flarum.core.compat['components/PermissionDropdown'];","module.exports = flarum.core.compat['components/Dropdown'];","module.exports = flarum.core.compat['components/AdminNav'];","module.exports = flarum.core.compat['components/AdminLinkButton'];","module.exports = flarum.core.compat['utils/ItemList'];","module.exports = flarum.core.compat['utils/string'];","module.exports = flarum.core.compat['components/SettingsModal'];","module.exports = flarum.core.compat['components/BasicsPage'];","module.exports = flarum.core.compat['components/SettingDropdown'];","/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner \n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nexport * from './src/common';\nexport * from './src/admin';\n",";(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define(['jquery'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('jquery'));\n } else {\n root.sortable = factory(root.jQuery);\n }\n}(this, function($) {\n/*\n * HTML5 Sortable jQuery Plugin\n * https://github.com/voidberg/html5sortable\n *\n * Original code copyright 2012 Ali Farhadi.\n * This version is mantained by Alexandru Badiu & Lukas Oppermann \n *\n *\n * Released under the MIT license.\n */\n'use strict';\n/*\n * variables global to the plugin\n */\nvar dragging;\nvar draggingHeight;\nvar placeholders = $();\nvar sortables = [];\n/*\n * remove event handlers from items\n * @param [jquery Collection] items\n * @info event.h5s (jquery way of namespacing events, to bind multiple handlers to the event)\n */\nvar _removeItemEvents = function(items) {\n items.off('dragstart.h5s');\n items.off('dragend.h5s');\n items.off('selectstart.h5s');\n items.off('dragover.h5s');\n items.off('dragenter.h5s');\n items.off('drop.h5s');\n};\n/*\n * remove event handlers from sortable\n * @param [jquery Collection] sortable\n * @info event.h5s (jquery way of namespacing events, to bind multiple handlers to the event)\n */\nvar _removeSortableEvents = function(sortable) {\n sortable.off('dragover.h5s');\n sortable.off('dragenter.h5s');\n sortable.off('drop.h5s');\n};\n/*\n * attache ghost to dataTransfer object\n * @param [event] original event\n * @param [object] ghost-object with item, x and y coordinates\n */\nvar _attachGhost = function(event, ghost) {\n // this needs to be set for HTML5 drag & drop to work\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData('text', '');\n\n // check if setDragImage method is available\n if (event.dataTransfer.setDragImage) {\n event.dataTransfer.setDragImage(ghost.item, ghost.x, ghost.y);\n }\n};\n/**\n * _addGhostPos clones the dragged item and adds it as a Ghost item\n * @param [object] event - the event fired when dragstart is triggered\n * @param [object] ghost - .item = node, draggedItem = jQuery collection\n */\nvar _addGhostPos = function(e, ghost) {\n if (!ghost.x) {\n ghost.x = parseInt(e.pageX - ghost.draggedItem.offset().left);\n }\n if (!ghost.y) {\n ghost.y = parseInt(e.pageY - ghost.draggedItem.offset().top);\n }\n return ghost;\n};\n/**\n * _makeGhost decides which way to make a ghost and passes it to attachGhost\n * @param [jQuery selection] $draggedItem - the item that the user drags\n */\nvar _makeGhost = function($draggedItem) {\n return {\n item: $draggedItem[0],\n draggedItem: $draggedItem\n };\n};\n/**\n * _getGhost constructs ghost and attaches it to dataTransfer\n * @param [event] event - the original drag event object\n * @param [jQuery selection] $draggedItem - the item that the user drags\n * @param [object] ghostOpt - the ghost options\n */\n// TODO: could $draggedItem be replaced by event.target in all instances\nvar _getGhost = function(event, $draggedItem) {\n // add ghost item & draggedItem to ghost object\n var ghost = _makeGhost($draggedItem);\n // attach ghost position\n ghost = _addGhostPos(event, ghost);\n // attach ghost to dataTransfer\n _attachGhost(event, ghost);\n};\n/*\n * return options if not set on sortable already\n * @param [object] soptions\n * @param [object] options\n */\nvar _getOptions = function(soptions, options) {\n if (typeof soptions === 'undefined') {\n return options;\n }\n return soptions;\n};\n/*\n * remove data from sortable\n * @param [jquery Collection] a single sortable\n */\nvar _removeSortableData = function(sortable) {\n sortable.removeData('opts');\n sortable.removeData('connectWith');\n sortable.removeData('items');\n sortable.removeAttr('aria-dropeffect');\n};\n/*\n * remove data from items\n * @param [jquery Collection] items\n */\nvar _removeItemData = function(items) {\n items.removeAttr('aria-grabbed');\n items.removeAttr('draggable');\n items.removeAttr('role');\n};\n/*\n * check if two lists are connected\n * @param [jquery Collection] items\n */\nvar _listsConnected = function(curList, destList) {\n if (curList[0] === destList[0]) {\n return true;\n }\n if (curList.data('connectWith') !== undefined) {\n return curList.data('connectWith') === destList.data('connectWith');\n }\n return false;\n};\n/*\n * destroy the sortable\n * @param [jquery Collection] a single sortable\n */\nvar _destroySortable = function(sortable) {\n var opts = sortable.data('opts') || {};\n var items = sortable.children(opts.items);\n var handles = opts.handle ? items.find(opts.handle) : items;\n // remove event handlers & data from sortable\n _removeSortableEvents(sortable);\n _removeSortableData(sortable);\n // remove event handlers & data from items\n handles.off('mousedown.h5s');\n _removeItemEvents(items);\n _removeItemData(items);\n};\n/*\n * enable the sortable\n * @param [jquery Collection] a single sortable\n */\nvar _enableSortable = function(sortable) {\n var opts = sortable.data('opts');\n var items = sortable.children(opts.items);\n var handles = opts.handle ? items.find(opts.handle) : items;\n sortable.attr('aria-dropeffect', 'move');\n handles.attr('draggable', 'true');\n // IE FIX for ghost\n // can be disabled as it has the side effect that other events\n // (e.g. click) will be ignored\n if (typeof document.createElement('span').dragDrop === 'function' && !opts.disableIEFix) {\n handles.on('mousedown.h5s', function() {\n if (items.index(this) !== -1) {\n this.dragDrop();\n } else {\n $(this).parents(opts.items)[0].dragDrop();\n }\n });\n }\n};\n/*\n * disable the sortable\n * @param [jquery Collection] a single sortable\n */\nvar _disableSortable = function(sortable) {\n var opts = sortable.data('opts');\n var items = sortable.children(opts.items);\n var handles = opts.handle ? items.find(opts.handle) : items;\n sortable.attr('aria-dropeffect', 'none');\n handles.attr('draggable', false);\n handles.off('mousedown.h5s');\n};\n/*\n * reload the sortable\n * @param [jquery Collection] a single sortable\n * @description events need to be removed to not be double bound\n */\nvar _reloadSortable = function(sortable) {\n var opts = sortable.data('opts');\n var items = sortable.children(opts.items);\n var handles = opts.handle ? items.find(opts.handle) : items;\n // remove event handlers from items\n _removeItemEvents(items);\n handles.off('mousedown.h5s');\n // remove event handlers from sortable\n _removeSortableEvents(sortable);\n};\n/*\n * public sortable object\n * @param [object|string] options|method\n */\nvar sortable = function(selector, options) {\n\n var $sortables = $(selector);\n var method = String(options);\n\n options = $.extend({\n connectWith: false,\n placeholder: null,\n // dragImage can be null or a jQuery element\n dragImage: null,\n disableIEFix: false,\n placeholderClass: 'sortable-placeholder',\n draggingClass: 'sortable-dragging'\n }, options);\n\n /* TODO: maxstatements should be 25, fix and remove line below */\n /*jshint maxstatements:false */\n return $sortables.each(function() {\n\n var $sortable = $(this);\n\n if (/enable|disable|destroy/.test(method)) {\n sortable[method]($sortable);\n return;\n }\n\n // get options & set options on sortable\n options = _getOptions($sortable.data('opts'), options);\n $sortable.data('opts', options);\n // reset sortable\n _reloadSortable($sortable);\n // initialize\n var items = $sortable.children(options.items);\n var index;\n var startParent;\n var newParent;\n var placeholder = (options.placeholder === null) ? $('<' + (/^ul|ol$/i.test(this.tagName) ? 'li' : 'div') + ' class=\"' + options.placeholderClass + '\"/>') : $(options.placeholder).addClass(options.placeholderClass);\n\n // setup sortable ids\n if (!$sortable.attr('data-sortable-id')) {\n var id = sortables.length;\n sortables[id] = $sortable;\n $sortable.attr('data-sortable-id', id);\n items.attr('data-item-sortable-id', id);\n }\n\n $sortable.data('items', options.items);\n placeholders = placeholders.add(placeholder);\n if (options.connectWith) {\n $sortable.data('connectWith', options.connectWith);\n }\n\n _enableSortable($sortable);\n items.attr('role', 'option');\n items.attr('aria-grabbed', 'false');\n\n // Handle drag events on draggable items\n items.on('dragstart.h5s', function(e) {\n e.stopImmediatePropagation();\n\n if (options.dragImage) {\n _attachGhost(e.originalEvent, {\n item: options.dragImage,\n x: 0,\n y: 0\n });\n console.log('WARNING: dragImage option is deprecated' +\n ' and will be removed in the future!');\n } else {\n // add transparent clone or other ghost to cursor\n _getGhost(e.originalEvent, $(this), options.dragImage);\n }\n // cache selsection & add attr for dragging\n dragging = $(this);\n dragging.addClass(options.draggingClass);\n dragging.attr('aria-grabbed', 'true');\n // grab values\n index = dragging.index();\n draggingHeight = dragging.height();\n startParent = $(this).parent();\n // trigger sortstar update\n dragging.parent().triggerHandler('sortstart', {\n item: dragging,\n startparent: startParent\n });\n });\n // Handle drag events on draggable items\n items.on('dragend.h5s', function() {\n if (!dragging) {\n return;\n }\n // remove dragging attributes and show item\n dragging.removeClass(options.draggingClass);\n dragging.attr('aria-grabbed', 'false');\n dragging.show();\n\n placeholders.detach();\n newParent = $(this).parent();\n dragging.parent().triggerHandler('sortstop', {\n item: dragging,\n startparent: startParent,\n });\n if (index !== dragging.index() ||\n startParent.get(0) !== newParent.get(0)) {\n dragging.parent().triggerHandler('sortupdate', {\n item: dragging,\n index: newParent.children(newParent.data('items')).index(dragging),\n oldindex: items.index(dragging),\n elementIndex: dragging.index(),\n oldElementIndex: index,\n startparent: startParent,\n endparent: newParent\n });\n }\n dragging = null;\n draggingHeight = null;\n });\n // Handle drop event on sortable & placeholder\n // TODO: REMOVE placeholder?????\n $(this).add([placeholder]).on('drop.h5s', function(e) {\n if (!_listsConnected($sortable, $(dragging).parent())) {\n return;\n }\n\n e.stopPropagation();\n placeholders.filter(':visible').after(dragging);\n dragging.trigger('dragend.h5s');\n return false;\n });\n\n // Handle dragover and dragenter events on draggable items\n // TODO: REMOVE placeholder?????\n items.add([this, placeholder]).on('dragover.h5s dragenter.h5s', function(e) {\n if (!_listsConnected($sortable, $(dragging).parent())) {\n return;\n }\n\n e.preventDefault();\n e.originalEvent.dataTransfer.dropEffect = 'move';\n if (items.is(this)) {\n var thisHeight = $(this).height();\n if (options.forcePlaceholderSize) {\n placeholder.height(draggingHeight);\n }\n\n // Check if $(this) is bigger than the draggable. If it is, we have to define a dead zone to prevent flickering\n if (thisHeight > draggingHeight) {\n // Dead zone?\n var deadZone = thisHeight - draggingHeight;\n var offsetTop = $(this).offset().top;\n if (placeholder.index() < $(this).index() &&\n e.originalEvent.pageY < offsetTop + deadZone) {\n return false;\n }\n if (placeholder.index() > $(this).index() &&\n e.originalEvent.pageY > offsetTop + thisHeight - deadZone) {\n return false;\n }\n }\n\n dragging.hide();\n if (placeholder.index() < $(this).index()) {\n $(this).after(placeholder);\n } else {\n $(this).before(placeholder);\n }\n placeholders.not(placeholder).detach();\n } else {\n if (!placeholders.is(this) && !$(this).children(options.items).length) {\n placeholders.detach();\n $(this).append(placeholder);\n }\n }\n return false;\n });\n });\n};\n\nsortable.destroy = function(sortable) {\n _destroySortable(sortable);\n};\n\nsortable.enable = function(sortable) {\n _enableSortable(sortable);\n};\n\nsortable.disable = function(sortable) {\n _disableSortable(sortable);\n};\n\n$.fn.sortable = function(options) {\n return sortable(this, options);\n};\n\nreturn sortable;\n}));\n","module.exports = jQuery;"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/external \"flarum.core.compat['Model']\"","webpack://@flarum/tags/external \"flarum.core.compat['extend']\"","webpack://@flarum/tags/./src/common/utils/sortTags.js","webpack://@flarum/tags/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['components/Button']\"","webpack://@flarum/tags/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/tags/./src/common/models/Tag.js","webpack://@flarum/tags/external \"flarum.core.compat['utils/extract']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/PermissionGrid']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/mixin']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/computed']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Page']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Modal']\"","webpack://@flarum/tags/./src/common/compat.js","webpack://@flarum/tags/external \"flarum.core\"","webpack://@flarum/tags/./src/admin/addTagsPermissionScope.js","webpack://@flarum/tags/./src/admin/addTagPermission.js","webpack://@flarum/tags/./src/admin/components/EditTagModal.js","webpack://@flarum/tags/./src/admin/components/TagSettingsModal.js","webpack://@flarum/tags/./src/admin/components/TagsPage.js","webpack://@flarum/tags/./src/admin/addTagsPane.js","webpack://@flarum/tags/./src/admin/addTagsHomePageOption.js","webpack://@flarum/tags/./src/admin/addTagChangePermission.js","webpack://@flarum/tags/./src/admin/compat.js","webpack://@flarum/tags/./src/admin/index.js","webpack://@flarum/tags/external \"flarum.core.compat['components/PermissionDropdown']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Dropdown']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/AdminNav']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/AdminLinkButton']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/ItemList']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/string']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/SettingsModal']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/BasicsPage']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/SettingDropdown']\"","webpack://@flarum/tags/./admin.js","webpack://@flarum/tags/./node_modules/html5sortable/dist/html.sortable.js","webpack://@flarum/tags/external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","sortTags","tags","slice","sort","a","b","aPos","position","bPos","discussionCount","aParent","parent","bParent","__webpack_exports__","_inheritsLoose","subClass","superClass","constructor","__proto__","tagLabel","flarum_utils_extract__WEBPACK_IMPORTED_MODULE_0__","flarum_utils_extract__WEBPACK_IMPORTED_MODULE_0___default","tag","attrs","style","className","link","extract","color","backgroundColor","title","description","href","app","route","slug","config","translator","trans","tagIcon","tagsLabel","_tagLabel__WEBPACK_IMPORTED_MODULE_1__","_utils_sortTags__WEBPACK_IMPORTED_MODULE_2__","children","forEach","length","push","_extends","assign","target","arguments","source","apply","this","Tag","mixin","Model","attribute","backgroundUrl","backgroundMode","hasOne","defaultSort","isChild","isHidden","lastPostedAt","transformDate","lastPostedDiscussion","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","computed","_utils_sortTags__WEBPACK_IMPORTED_MODULE_0__","_models_Tag__WEBPACK_IMPORTED_MODULE_1__","_helpers_tagsLabel__WEBPACK_IMPORTED_MODULE_2__","_helpers_tagIcon__WEBPACK_IMPORTED_MODULE_3__","_helpers_tagLabel__WEBPACK_IMPORTED_MODULE_4__","tags/utils/sortTags","tags/models/Tag","tags/helpers/tagsLabel","tags/helpers/tagIcon","tags/helpers/tagLabel","addTagsPermissionScope","override","original","permission","tagPrefix","match","substr","map","required","extend","PermissionGrid","items","store","all","filter","add","id","label","onremove","save","render","item","indexOf","PermissionDropdown","component","allowGuest","Dropdown","buttonClassName","icon","caretIcon","Button","onclick","addTagPermission","EditTagModal","init","_Modal","props","createRecord","prop","content","fields","toArray","_this","ItemList","placeholder","oninput","e","withAttr","type","checked","onchange","loading","exists","delete","submitData","onsubmit","_this2","preventDefault","then","hide","response","handleErrors","_this3","confirm","pushData","attributes","relationships","redraw","Modal","TagSettingsModal","setMinTags","minTags","maxTags","Math","max","form","minPrimaryTags","setting","maxPrimaryTags","minSecondaryTags","maxSecondaryTags","min","bidi","SettingsModal","tagItem","data-id","modal","show","child","TagsPage","view","localeCompare","$","sortable","connectWith","on","ui","startparent","is","endparent","getById","data","order","find","j","request","url","forum","method","strategy","Page","addTagsPane","routes","path","extensionSettings","AdminNav","AdminLinkButton","addTagsHomePageOption","BasicsPage","addTagChangePermission","minutes","parseInt","settings","allow_tag_change","SettingDropdown","defaultLabel","transChoice","count","options","admin_compat","esm_extends","tags/addTagsHomePageOption","tags/addTagChangePermission","tags/addTagsPane","tags/components/TagSettingsModal","tags/components/TagsPage","tags/components/EditTagModal","tags/addTagPermission","tags/addTagsPermissionScope","initializers","models","tagsCompat","_src_common__WEBPACK_IMPORTED_MODULE_0__","__WEBPACK_IMPORT_KEY__","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","undefined","dragging","draggingHeight","placeholders","sortables","_removeItemEvents","off","_removeSortableEvents","_attachGhost","event","ghost","dataTransfer","effectAllowed","setData","setDragImage","x","y","_getGhost","$draggedItem","draggedItem","_makeGhost","pageX","offset","left","pageY","top","_addGhostPos","_listsConnected","curList","destList","_enableSortable","opts","handles","handle","attr","document","createElement","dragDrop","disableIEFix","index","parents","selector","$sortables","String","dragImage","placeholderClass","draggingClass","each","$sortable","test","soptions","_getOptions","_reloadSortable","startParent","newParent","tagName","addClass","stopImmediatePropagation","originalEvent","console","log","height","triggerHandler","removeClass","detach","oldindex","elementIndex","oldElementIndex","stopPropagation","after","trigger","dropEffect","thisHeight","forcePlaceholderSize","deadZone","offsetTop","before","not","append","destroy","removeData","removeAttr","_removeSortableData","_removeItemData","_destroySortable","enable","disable","_disableSortable","fn","jQuery"],"mappings":"2BACA,IAAAA,EAAA,GAGA,S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6D,SACAvH,EAAAzH,MAAA8P,OAAArL,IAGA,gBAqBA,OAhBAiD,EAAAqI,QAAA,SAAArI,IApPA,SAAAA,GACA,IAAAqF,EAAArF,EAAAQ,KAAA,YACA1F,EAAAkF,EAAApI,SAAAyN,EAAAvK,OACAwK,EAAAD,EAAAE,OAAAzK,EAAA4F,KAAA2E,EAAAE,QAAAzK,EAEA+I,EAAA7D,GArCA,SAAAA,GACAA,EAAAsI,WAAA,QACAtI,EAAAsI,WAAA,eACAtI,EAAAsI,WAAA,SACAtI,EAAAuI,WAAA,mBAkCAC,CAAAxI,GAEAsF,EAAA1B,IAAA,iBACAD,EAAA7I,GA/BA,SAAAA,GACAA,EAAAyN,WAAA,gBACAzN,EAAAyN,WAAA,aACAzN,EAAAyN,WAAA,QA6BAE,CAAA3N,GA2OA4N,CAAA1I,IAGAA,EAAA2I,OAAA,SAAA3I,GACAoF,EAAApF,IAGAA,EAAA4I,QAAA,SAAA5I,IArNA,SAAAA,GACA,IAAAqF,EAAArF,EAAAQ,KAAA,QACA1F,EAAAkF,EAAApI,SAAAyN,EAAAvK,OACAwK,EAAAD,EAAAE,OAAAzK,EAAA4F,KAAA2E,EAAAE,QAAAzK,EACAkF,EAAAwF,KAAA,0BACAF,EAAAE,KAAA,gBACAF,EAAA1B,IAAA,iBAgNAiF,CAAA7I,IAGAD,EAAA+I,GAAA9I,SAAA,SAAAmC,GACA,OAAAnC,EAAA1H,KAAA6J,IAGAnC,IAzZ8BmD,EAAA9K,MAAAzF,EAAAwQ,GAAAD,KAAAtQ,EAAAD,QAAAyQ,kBCF9BxQ,EAAAD,QAAAmW","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 49);\n","module.exports = flarum.core.compat['Model'];","module.exports = flarum.core.compat['extend'];","export default function sortTags(tags) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null)\n return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent)\n return aParent.position() - bParent.position();\n\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent)\n return aParent === b ? 1 : aParent.position() - bPos;\n\n else if (bParent)\n return bParent === a ? -1 : aPos - bParent.position();\n\n return 0;\n });\n}\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import extract from 'flarum/utils/extract';\n\nexport default function tagLabel(tag, attrs = {}) {\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n\n const link = extract(attrs, 'link');\n\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style.backgroundColor = attrs.style.color = color;\n attrs.className += ' colored';\n }\n\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {tags: tag.slug()});\n attrs.config = m.route;\n }\n } else {\n attrs.className += ' untagged';\n }\n\n return (\n m((link ? 'a' : 'span'), attrs,\n \n {tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text')}\n \n )\n );\n}\n","export default function tagIcon(tag, attrs = {}) {\n attrs.className = 'icon TagIcon ' + (attrs.className || '');\n\n if (tag) {\n attrs.style = attrs.style || {};\n attrs.style.backgroundColor = tag.color();\n } else {\n attrs.className += ' untagged';\n }\n\n return ;\n}\n","import extract from 'flarum/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\n\nexport default function tagsLabel(tags, attrs = {}) {\n const children = [];\n const link = extract(attrs, 'link');\n\n attrs.className = 'TagsLabel ' + (attrs.className || '');\n\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {link}));\n }\n });\n } else {\n children.push(tagLabel());\n }\n\n return {children} ;\n}\n","module.exports = flarum.core.compat['components/Button'];","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","import Model from 'flarum/Model';\nimport mixin from 'flarum/utils/mixin';\nimport computed from 'flarum/utils/computed';\n\nexport default class Tag extends mixin(Model, {\n name: Model.attribute('name'),\n slug: Model.attribute('slug'),\n description: Model.attribute('description'),\n\n color: Model.attribute('color'),\n backgroundUrl: Model.attribute('backgroundUrl'),\n backgroundMode: Model.attribute('backgroundMode'),\n\n position: Model.attribute('position'),\n parent: Model.hasOne('parent'),\n defaultSort: Model.attribute('defaultSort'),\n isChild: Model.attribute('isChild'),\n isHidden: Model.attribute('isHidden'),\n\n discussionCount: Model.attribute('discussionCount'),\n lastPostedAt: Model.attribute('lastPostedAt', Model.transformDate),\n lastPostedDiscussion: Model.hasOne('lastPostedDiscussion'),\n\n isRestricted: Model.attribute('isRestricted'),\n canStartDiscussion: Model.attribute('canStartDiscussion'),\n canAddToDiscussion: Model.attribute('canAddToDiscussion'),\n\n isPrimary: computed('position', 'parent', (position, parent) => position !== null && parent === false)\n}) {}\n","module.exports = flarum.core.compat['utils/extract'];","module.exports = flarum.core.compat['components/PermissionGrid'];","module.exports = flarum.core.compat['utils/mixin'];","module.exports = flarum.core.compat['utils/computed'];","module.exports = flarum.core.compat['components/Page'];","module.exports = flarum.core.compat['components/Modal'];","import sortTags from './utils/sortTags';\nimport Tag from './models/Tag';\nimport tagsLabel from './helpers/tagsLabel';\nimport tagIcon from './helpers/tagIcon';\nimport tagLabel from './helpers/tagLabel';\n\nexport default {\n 'tags/utils/sortTags': sortTags,\n 'tags/models/Tag': Tag,\n 'tags/helpers/tagsLabel': tagsLabel,\n 'tags/helpers/tagIcon': tagIcon,\n 'tags/helpers/tagLabel': tagLabel\n};\n","module.exports = flarum.core;","import { extend, override } from 'flarum/extend';\nimport PermissionGrid from 'flarum/components/PermissionGrid';\nimport PermissionDropdown from 'flarum/components/PermissionDropdown';\nimport Dropdown from 'flarum/components/Dropdown';\nimport Button from 'flarum/components/Button';\n\nimport tagLabel from '../common/helpers/tagLabel';\nimport tagIcon from '../common/helpers/tagIcon';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function() {\n override(app, 'getRequiredPermissions', (original, permission) => {\n const tagPrefix = permission.match(/^tag\\d+\\./);\n\n if (tagPrefix) {\n const globalPermission = permission.substr(tagPrefix[0].length);\n\n const required = original(globalPermission);\n\n return required.map(required => tagPrefix[0] + required);\n }\n\n return original(permission);\n });\n\n extend(PermissionGrid.prototype, 'scopeItems', items => {\n sortTags(app.store.all('tags'))\n .filter(tag => tag.isRestricted())\n .forEach(tag => items.add('tag' + tag.id(), {\n label: tagLabel(tag),\n onremove: () => tag.save({isRestricted: false}),\n render: item => {\n if (item.permission === 'viewDiscussions'\n || item.permission === 'startDiscussion'\n || (item.permission && item.permission.indexOf('discussion.') === 0)) {\n return PermissionDropdown.component({\n permission: 'tag' + tag.id() + '.' + item.permission,\n allowGuest: item.allowGuest\n });\n }\n\n return '';\n }\n }));\n });\n\n extend(PermissionGrid.prototype, 'scopeControlItems', items => {\n const tags = sortTags(app.store.all('tags').filter(tag => !tag.isRestricted()));\n\n if (tags.length) {\n items.add('tag', Dropdown.component({\n className: 'Dropdown--restrictByTag',\n buttonClassName: 'Button Button--text',\n label: app.translator.trans('flarum-tags.admin.permissions.restrict_by_tag_heading'),\n icon: 'fas fa-plus',\n caretIcon: null,\n children: tags.map(tag => Button.component({\n icon: true,\n children: [tagIcon(tag, {className: 'Button-icon'}), ' ', tag.name()],\n onclick: () => tag.save({isRestricted: true})\n }))\n }));\n }\n });\n}\n","import { extend } from 'flarum/extend';\nimport PermissionGrid from 'flarum/components/PermissionGrid';\n\nexport default function() {\n extend(PermissionGrid.prototype, 'moderateItems', items => {\n items.add('tag', {\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.tag_discussions_label'),\n permission: 'discussion.tag'\n }, 95);\n });\n}\n","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\nimport ItemList from 'flarum/utils/ItemList';\nimport { slug } from 'flarum/utils/string';\n\nimport tagLabel from '../../common/helpers/tagLabel';\n\n/**\n * The `EditTagModal` component shows a modal dialog which allows the user\n * to create or edit a tag.\n */\nexport default class EditTagModal extends Modal {\n init() {\n super.init();\n\n this.tag = this.props.tag || app.store.createRecord('tags');\n\n this.name = m.prop(this.tag.name() || '');\n this.slug = m.prop(this.tag.slug() || '');\n this.description = m.prop(this.tag.description() || '');\n this.color = m.prop(this.tag.color() || '');\n this.isHidden = m.prop(this.tag.isHidden() || false);\n }\n\n className() {\n return 'EditTagModal Modal--small';\n }\n\n title() {\n return this.name()\n ? tagLabel({\n name: this.name,\n color: this.color\n })\n : app.translator.trans('flarum-tags.admin.edit_tag.title');\n }\n\n content() {\n return (\n \n
\n {this.fields().toArray()}\n
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add('name', \n {app.translator.trans('flarum-tags.admin.edit_tag.name_label')} \n {\n this.name(e.target.value);\n this.slug(slug(e.target.value));\n }}/>\n
, 50);\n\n items.add('slug', \n {app.translator.trans('flarum-tags.admin.edit_tag.slug_label')} \n \n
, 40);\n\n items.add('description', \n {app.translator.trans('flarum-tags.admin.edit_tag.description_label')} \n \n
, 30);\n\n items.add('color', \n {app.translator.trans('flarum-tags.admin.edit_tag.color_label')} \n \n
, 20);\n\n items.add('hidden', \n
\n \n \n {app.translator.trans('flarum-tags.admin.edit_tag.hide_label')}\n \n
\n
, 10);\n\n items.add('submit', \n {Button.component({\n type: 'submit',\n className: 'Button Button--primary EditTagModal-save',\n loading: this.loading,\n children: app.translator.trans('flarum-tags.admin.edit_tag.submit_button')\n })}\n {this.tag.exists ? (\n \n {app.translator.trans('flarum-tags.admin.edit_tag.delete_tag_button')}\n \n ) : ''}\n
, -10);\n\n return items;\n }\n\n submitData() {\n return {\n name: this.name(),\n slug: this.slug(),\n description: this.description(),\n color: this.color(),\n isHidden: this.isHidden()\n };\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n this.tag.save(this.submitData()).then(\n () => this.hide(),\n response => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n }\n\n delete() {\n if (confirm(app.translator.trans('flarum-tags.admin.edit_tag.delete_tag_confirmation'))) {\n const children = app.store.all('tags').filter(tag => tag.parent() === this.tag);\n\n this.tag.delete().then(() => {\n children.forEach(tag => tag.pushData({\n attributes: {isChild: false},\n relationships: {parent: null}\n }));\n m.redraw();\n });\n\n this.hide();\n }\n }\n}\n","import SettingsModal from 'flarum/components/SettingsModal';\n\nexport default class TagSettingsModal extends SettingsModal {\n setMinTags(minTags, maxTags, value) {\n minTags(value);\n maxTags(Math.max(value, maxTags()));\n }\n\n className() {\n return 'TagSettingsModal Modal--small';\n }\n\n title() {\n return app.translator.trans('flarum-tags.admin.tag_settings.title');\n }\n\n form() {\n const minPrimaryTags = this.setting('flarum-tags.min_primary_tags', 0);\n const maxPrimaryTags = this.setting('flarum-tags.max_primary_tags', 0);\n\n const minSecondaryTags = this.setting('flarum-tags.min_secondary_tags', 0);\n const maxSecondaryTags = this.setting('flarum-tags.max_secondary_tags', 0);\n\n return [\n \n
{app.translator.trans('flarum-tags.admin.tag_settings.required_primary_heading')} \n
\n {app.translator.trans('flarum-tags.admin.tag_settings.required_primary_text')}\n
\n
\n \n {app.translator.trans('flarum-tags.admin.tag_settings.range_separator_text')}\n \n
\n
,\n\n \n
{app.translator.trans('flarum-tags.admin.tag_settings.required_secondary_heading')} \n
\n {app.translator.trans('flarum-tags.admin.tag_settings.required_secondary_text')}\n
\n
\n \n {app.translator.trans('flarum-tags.admin.tag_settings.range_separator_text')}\n \n
\n
\n ];\n }\n}\n","import 'html5sortable';\n\nimport Page from 'flarum/components/Page';\nimport Button from 'flarum/components/Button';\n\nimport EditTagModal from './EditTagModal';\nimport TagSettingsModal from './TagSettingsModal';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport sortTags from '../../common/utils/sortTags';\n\nfunction tagItem(tag) {\n return (\n \n \n {tagIcon(tag)}\n {tag.name()} \n {Button.component({\n className: 'Button Button--link',\n icon: 'fas fa-pencil-alt',\n onclick: () => app.modal.show(new EditTagModal({tag}))\n })}\n
\n {!tag.isChild() && tag.position() !== null ? (\n \n {sortTags(app.store.all('tags'))\n .filter(child => child.parent() === tag)\n .map(tagItem)}\n \n ) : ''}\n \n );\n}\n\nexport default class TagsPage extends Page {\n view() {\n return (\n \n
\n
\n
\n {app.translator.trans('flarum-tags.admin.tags.about_tags_text')}\n
\n {Button.component({\n className: 'Button Button--primary',\n icon: 'fas fa-plus',\n children: app.translator.trans('flarum-tags.admin.tags.create_tag_button'),\n onclick: () => app.modal.show(new EditTagModal())\n })}\n {Button.component({\n className: 'Button',\n children: app.translator.trans('flarum-tags.admin.tags.settings_button'),\n onclick: () => app.modal.show(new TagSettingsModal())\n })}\n
\n
\n
\n
\n
\n
{app.translator.trans('flarum-tags.admin.tags.primary_heading')} \n
\n {sortTags(app.store.all('tags'))\n .filter(tag => tag.position() !== null && !tag.isChild())\n .map(tagItem)}\n \n
\n\n
\n
{app.translator.trans('flarum-tags.admin.tags.secondary_heading')} \n
\n {app.store.all('tags')\n .filter(tag => tag.position() === null)\n .sort((a, b) => a.name().localeCompare(b.name()))\n .map(tagItem)}\n \n
\n
\n
\n
\n );\n }\n\n config() {\n this.$('ol, ul')\n .sortable({connectWith: 'primary'})\n .on('sortupdate', (e, ui) => {\n // If we've moved a tag from 'primary' to 'secondary', then we'll update\n // its attributes in our local store so that when we redraw the change\n // will be made.\n if (ui.startparent.is('ol') && ui.endparent.is('ul')) {\n app.store.getById('tags', ui.item.data('id')).pushData({\n attributes: {\n position: null,\n isChild: false\n },\n relationships: {parent: null}\n });\n }\n\n // Construct an array of primary tag IDs and their children, in the same\n // order that they have been arranged in.\n const order = this.$('.TagList--primary > li')\n .map(function() {\n return {\n id: $(this).data('id'),\n children: $(this).find('li')\n .map(function() {\n return $(this).data('id');\n }).get()\n };\n }).get();\n\n // Now that we have an accurate representation of the order which the\n // primary tags are in, we will update the tag attributes in our local\n // store to reflect this order.\n order.forEach((tag, i) => {\n const parent = app.store.getById('tags', tag.id);\n parent.pushData({\n attributes: {\n position: i,\n isChild: false\n },\n relationships: {parent: null}\n });\n\n tag.children.forEach((child, j) => {\n app.store.getById('tags', child).pushData({\n attributes: {\n position: j,\n isChild: true\n },\n relationships: {parent}\n });\n });\n });\n\n app.request({\n url: app.forum.attribute('apiUrl') + '/tags/order',\n method: 'POST',\n data: {order}\n });\n\n // A diff redraw won't work here, because sortable has mucked around\n // with the DOM which will confuse Mithril's diffing algorithm. Instead\n // we force a full reconstruction of the DOM.\n m.redraw.strategy('all');\n m.redraw();\n });\n }\n}\n","import { extend } from 'flarum/extend';\nimport AdminNav from 'flarum/components/AdminNav';\nimport AdminLinkButton from 'flarum/components/AdminLinkButton';\n\nimport TagsPage from './components/TagsPage';\n\nexport default function() {\n app.routes.tags = {path: '/tags', component: TagsPage.component()};\n\n app.extensionSettings['flarum-tags'] = () => m.route(app.route('tags'));\n\n extend(AdminNav.prototype, 'items', items => {\n items.add('tags', AdminLinkButton.component({\n href: app.route('tags'),\n icon: 'fas fa-tags',\n children: app.translator.trans('flarum-tags.admin.nav.tags_button'),\n description: app.translator.trans('flarum-tags.admin.nav.tags_text')\n }));\n });\n}\n","import { extend } from 'flarum/extend';\nimport BasicsPage from 'flarum/components/BasicsPage';\n\nexport default function() {\n extend(BasicsPage.prototype, 'homePageItems', items => {\n items.add('tags', {\n path: '/tags',\n label: app.translator.trans('flarum-tags.admin.basics.tags_label')\n });\n });\n}\n","import { extend } from 'flarum/extend';\nimport PermissionGrid from 'flarum/components/PermissionGrid';\nimport SettingDropdown from 'flarum/components/SettingDropdown';\n\nexport default function() {\n extend(PermissionGrid.prototype, 'startItems', items => {\n items.add('allowTagChange', {\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.allow_edit_tags_label'),\n setting: () => {\n const minutes = parseInt(app.data.settings.allow_tag_change, 10);\n\n return SettingDropdown.component({\n defaultLabel: minutes\n ? app.translator.transChoice('core.admin.permissions_controls.allow_some_minutes_button', minutes, {count: minutes})\n : app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button'),\n key: 'allow_tag_change',\n options: [\n {value: '-1', label: app.translator.trans('core.admin.permissions_controls.allow_indefinitely_button')},\n {value: '10', label: app.translator.trans('core.admin.permissions_controls.allow_ten_minutes_button')},\n {value: 'reply', label: app.translator.trans('core.admin.permissions_controls.allow_until_reply_button')}\n ]\n });\n }\n }, 90);\n });\n}\n","import compat from '../common/compat';\n\nimport addTagsHomePageOption from './addTagsHomePageOption';\nimport addTagChangePermission from './addTagChangePermission';\nimport addTagsPane from './addTagsPane';\nimport TagSettingsModal from './components/TagSettingsModal';\nimport TagsPage from './components/TagsPage';\nimport EditTagModal from './components/EditTagModal';\nimport addTagPermission from './addTagPermission';\nimport addTagsPermissionScope from './addTagsPermissionScope';\n\nexport default Object.assign(compat, {\n 'tags/addTagsHomePageOption': addTagsHomePageOption,\n 'tags/addTagChangePermission': addTagChangePermission,\n 'tags/addTagsPane': addTagsPane,\n 'tags/components/TagSettingsModal': TagSettingsModal,\n 'tags/components/TagsPage': TagsPage,\n 'tags/components/EditTagModal': EditTagModal,\n 'tags/addTagPermission': addTagPermission,\n 'tags/addTagsPermissionScope': addTagsPermissionScope,\n});\n","import Tag from '../common/models/Tag';\nimport addTagsPermissionScope from './addTagsPermissionScope';\nimport addTagPermission from './addTagPermission';\nimport addTagsPane from './addTagsPane';\nimport addTagsHomePageOption from './addTagsHomePageOption';\nimport addTagChangePermission from './addTagChangePermission';\n\napp.initializers.add('flarum-tags', app => {\n app.store.models.tags = Tag;\n\n addTagsPermissionScope();\n addTagPermission();\n addTagsPane();\n addTagsHomePageOption();\n addTagChangePermission();\n});\n\n\n// Expose compat API\nimport tagsCompat from './compat';\nimport { compat } from '@flarum/core/admin';\n\nObject.assign(compat, tagsCompat);\n","module.exports = flarum.core.compat['components/PermissionDropdown'];","module.exports = flarum.core.compat['components/Dropdown'];","module.exports = flarum.core.compat['components/AdminNav'];","module.exports = flarum.core.compat['components/AdminLinkButton'];","module.exports = flarum.core.compat['utils/ItemList'];","module.exports = flarum.core.compat['utils/string'];","module.exports = flarum.core.compat['components/SettingsModal'];","module.exports = flarum.core.compat['components/BasicsPage'];","module.exports = flarum.core.compat['components/SettingDropdown'];","/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner \n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nexport * from './src/common';\nexport * from './src/admin';\n",";(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define(['jquery'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('jquery'));\n } else {\n root.sortable = factory(root.jQuery);\n }\n}(this, function($) {\n/*\n * HTML5 Sortable jQuery Plugin\n * https://github.com/voidberg/html5sortable\n *\n * Original code copyright 2012 Ali Farhadi.\n * This version is mantained by Alexandru Badiu & Lukas Oppermann \n *\n *\n * Released under the MIT license.\n */\n'use strict';\n/*\n * variables global to the plugin\n */\nvar dragging;\nvar draggingHeight;\nvar placeholders = $();\nvar sortables = [];\n/*\n * remove event handlers from items\n * @param [jquery Collection] items\n * @info event.h5s (jquery way of namespacing events, to bind multiple handlers to the event)\n */\nvar _removeItemEvents = function(items) {\n items.off('dragstart.h5s');\n items.off('dragend.h5s');\n items.off('selectstart.h5s');\n items.off('dragover.h5s');\n items.off('dragenter.h5s');\n items.off('drop.h5s');\n};\n/*\n * remove event handlers from sortable\n * @param [jquery Collection] sortable\n * @info event.h5s (jquery way of namespacing events, to bind multiple handlers to the event)\n */\nvar _removeSortableEvents = function(sortable) {\n sortable.off('dragover.h5s');\n sortable.off('dragenter.h5s');\n sortable.off('drop.h5s');\n};\n/*\n * attache ghost to dataTransfer object\n * @param [event] original event\n * @param [object] ghost-object with item, x and y coordinates\n */\nvar _attachGhost = function(event, ghost) {\n // this needs to be set for HTML5 drag & drop to work\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData('text', '');\n\n // check if setDragImage method is available\n if (event.dataTransfer.setDragImage) {\n event.dataTransfer.setDragImage(ghost.item, ghost.x, ghost.y);\n }\n};\n/**\n * _addGhostPos clones the dragged item and adds it as a Ghost item\n * @param [object] event - the event fired when dragstart is triggered\n * @param [object] ghost - .item = node, draggedItem = jQuery collection\n */\nvar _addGhostPos = function(e, ghost) {\n if (!ghost.x) {\n ghost.x = parseInt(e.pageX - ghost.draggedItem.offset().left);\n }\n if (!ghost.y) {\n ghost.y = parseInt(e.pageY - ghost.draggedItem.offset().top);\n }\n return ghost;\n};\n/**\n * _makeGhost decides which way to make a ghost and passes it to attachGhost\n * @param [jQuery selection] $draggedItem - the item that the user drags\n */\nvar _makeGhost = function($draggedItem) {\n return {\n item: $draggedItem[0],\n draggedItem: $draggedItem\n };\n};\n/**\n * _getGhost constructs ghost and attaches it to dataTransfer\n * @param [event] event - the original drag event object\n * @param [jQuery selection] $draggedItem - the item that the user drags\n * @param [object] ghostOpt - the ghost options\n */\n// TODO: could $draggedItem be replaced by event.target in all instances\nvar _getGhost = function(event, $draggedItem) {\n // add ghost item & draggedItem to ghost object\n var ghost = _makeGhost($draggedItem);\n // attach ghost position\n ghost = _addGhostPos(event, ghost);\n // attach ghost to dataTransfer\n _attachGhost(event, ghost);\n};\n/*\n * return options if not set on sortable already\n * @param [object] soptions\n * @param [object] options\n */\nvar _getOptions = function(soptions, options) {\n if (typeof soptions === 'undefined') {\n return options;\n }\n return soptions;\n};\n/*\n * remove data from sortable\n * @param [jquery Collection] a single sortable\n */\nvar _removeSortableData = function(sortable) {\n sortable.removeData('opts');\n sortable.removeData('connectWith');\n sortable.removeData('items');\n sortable.removeAttr('aria-dropeffect');\n};\n/*\n * remove data from items\n * @param [jquery Collection] items\n */\nvar _removeItemData = function(items) {\n items.removeAttr('aria-grabbed');\n items.removeAttr('draggable');\n items.removeAttr('role');\n};\n/*\n * check if two lists are connected\n * @param [jquery Collection] items\n */\nvar _listsConnected = function(curList, destList) {\n if (curList[0] === destList[0]) {\n return true;\n }\n if (curList.data('connectWith') !== undefined) {\n return curList.data('connectWith') === destList.data('connectWith');\n }\n return false;\n};\n/*\n * destroy the sortable\n * @param [jquery Collection] a single sortable\n */\nvar _destroySortable = function(sortable) {\n var opts = sortable.data('opts') || {};\n var items = sortable.children(opts.items);\n var handles = opts.handle ? items.find(opts.handle) : items;\n // remove event handlers & data from sortable\n _removeSortableEvents(sortable);\n _removeSortableData(sortable);\n // remove event handlers & data from items\n handles.off('mousedown.h5s');\n _removeItemEvents(items);\n _removeItemData(items);\n};\n/*\n * enable the sortable\n * @param [jquery Collection] a single sortable\n */\nvar _enableSortable = function(sortable) {\n var opts = sortable.data('opts');\n var items = sortable.children(opts.items);\n var handles = opts.handle ? items.find(opts.handle) : items;\n sortable.attr('aria-dropeffect', 'move');\n handles.attr('draggable', 'true');\n // IE FIX for ghost\n // can be disabled as it has the side effect that other events\n // (e.g. click) will be ignored\n if (typeof document.createElement('span').dragDrop === 'function' && !opts.disableIEFix) {\n handles.on('mousedown.h5s', function() {\n if (items.index(this) !== -1) {\n this.dragDrop();\n } else {\n $(this).parents(opts.items)[0].dragDrop();\n }\n });\n }\n};\n/*\n * disable the sortable\n * @param [jquery Collection] a single sortable\n */\nvar _disableSortable = function(sortable) {\n var opts = sortable.data('opts');\n var items = sortable.children(opts.items);\n var handles = opts.handle ? items.find(opts.handle) : items;\n sortable.attr('aria-dropeffect', 'none');\n handles.attr('draggable', false);\n handles.off('mousedown.h5s');\n};\n/*\n * reload the sortable\n * @param [jquery Collection] a single sortable\n * @description events need to be removed to not be double bound\n */\nvar _reloadSortable = function(sortable) {\n var opts = sortable.data('opts');\n var items = sortable.children(opts.items);\n var handles = opts.handle ? items.find(opts.handle) : items;\n // remove event handlers from items\n _removeItemEvents(items);\n handles.off('mousedown.h5s');\n // remove event handlers from sortable\n _removeSortableEvents(sortable);\n};\n/*\n * public sortable object\n * @param [object|string] options|method\n */\nvar sortable = function(selector, options) {\n\n var $sortables = $(selector);\n var method = String(options);\n\n options = $.extend({\n connectWith: false,\n placeholder: null,\n // dragImage can be null or a jQuery element\n dragImage: null,\n disableIEFix: false,\n placeholderClass: 'sortable-placeholder',\n draggingClass: 'sortable-dragging'\n }, options);\n\n /* TODO: maxstatements should be 25, fix and remove line below */\n /*jshint maxstatements:false */\n return $sortables.each(function() {\n\n var $sortable = $(this);\n\n if (/enable|disable|destroy/.test(method)) {\n sortable[method]($sortable);\n return;\n }\n\n // get options & set options on sortable\n options = _getOptions($sortable.data('opts'), options);\n $sortable.data('opts', options);\n // reset sortable\n _reloadSortable($sortable);\n // initialize\n var items = $sortable.children(options.items);\n var index;\n var startParent;\n var newParent;\n var placeholder = (options.placeholder === null) ? $('<' + (/^ul|ol$/i.test(this.tagName) ? 'li' : 'div') + ' class=\"' + options.placeholderClass + '\"/>') : $(options.placeholder).addClass(options.placeholderClass);\n\n // setup sortable ids\n if (!$sortable.attr('data-sortable-id')) {\n var id = sortables.length;\n sortables[id] = $sortable;\n $sortable.attr('data-sortable-id', id);\n items.attr('data-item-sortable-id', id);\n }\n\n $sortable.data('items', options.items);\n placeholders = placeholders.add(placeholder);\n if (options.connectWith) {\n $sortable.data('connectWith', options.connectWith);\n }\n\n _enableSortable($sortable);\n items.attr('role', 'option');\n items.attr('aria-grabbed', 'false');\n\n // Handle drag events on draggable items\n items.on('dragstart.h5s', function(e) {\n e.stopImmediatePropagation();\n\n if (options.dragImage) {\n _attachGhost(e.originalEvent, {\n item: options.dragImage,\n x: 0,\n y: 0\n });\n console.log('WARNING: dragImage option is deprecated' +\n ' and will be removed in the future!');\n } else {\n // add transparent clone or other ghost to cursor\n _getGhost(e.originalEvent, $(this), options.dragImage);\n }\n // cache selsection & add attr for dragging\n dragging = $(this);\n dragging.addClass(options.draggingClass);\n dragging.attr('aria-grabbed', 'true');\n // grab values\n index = dragging.index();\n draggingHeight = dragging.height();\n startParent = $(this).parent();\n // trigger sortstar update\n dragging.parent().triggerHandler('sortstart', {\n item: dragging,\n startparent: startParent\n });\n });\n // Handle drag events on draggable items\n items.on('dragend.h5s', function() {\n if (!dragging) {\n return;\n }\n // remove dragging attributes and show item\n dragging.removeClass(options.draggingClass);\n dragging.attr('aria-grabbed', 'false');\n dragging.show();\n\n placeholders.detach();\n newParent = $(this).parent();\n dragging.parent().triggerHandler('sortstop', {\n item: dragging,\n startparent: startParent,\n });\n if (index !== dragging.index() ||\n startParent.get(0) !== newParent.get(0)) {\n dragging.parent().triggerHandler('sortupdate', {\n item: dragging,\n index: newParent.children(newParent.data('items')).index(dragging),\n oldindex: items.index(dragging),\n elementIndex: dragging.index(),\n oldElementIndex: index,\n startparent: startParent,\n endparent: newParent\n });\n }\n dragging = null;\n draggingHeight = null;\n });\n // Handle drop event on sortable & placeholder\n // TODO: REMOVE placeholder?????\n $(this).add([placeholder]).on('drop.h5s', function(e) {\n if (!_listsConnected($sortable, $(dragging).parent())) {\n return;\n }\n\n e.stopPropagation();\n placeholders.filter(':visible').after(dragging);\n dragging.trigger('dragend.h5s');\n return false;\n });\n\n // Handle dragover and dragenter events on draggable items\n // TODO: REMOVE placeholder?????\n items.add([this, placeholder]).on('dragover.h5s dragenter.h5s', function(e) {\n if (!_listsConnected($sortable, $(dragging).parent())) {\n return;\n }\n\n e.preventDefault();\n e.originalEvent.dataTransfer.dropEffect = 'move';\n if (items.is(this)) {\n var thisHeight = $(this).height();\n if (options.forcePlaceholderSize) {\n placeholder.height(draggingHeight);\n }\n\n // Check if $(this) is bigger than the draggable. If it is, we have to define a dead zone to prevent flickering\n if (thisHeight > draggingHeight) {\n // Dead zone?\n var deadZone = thisHeight - draggingHeight;\n var offsetTop = $(this).offset().top;\n if (placeholder.index() < $(this).index() &&\n e.originalEvent.pageY < offsetTop + deadZone) {\n return false;\n }\n if (placeholder.index() > $(this).index() &&\n e.originalEvent.pageY > offsetTop + thisHeight - deadZone) {\n return false;\n }\n }\n\n dragging.hide();\n if (placeholder.index() < $(this).index()) {\n $(this).after(placeholder);\n } else {\n $(this).before(placeholder);\n }\n placeholders.not(placeholder).detach();\n } else {\n if (!placeholders.is(this) && !$(this).children(options.items).length) {\n placeholders.detach();\n $(this).append(placeholder);\n }\n }\n return false;\n });\n });\n};\n\nsortable.destroy = function(sortable) {\n _destroySortable(sortable);\n};\n\nsortable.enable = function(sortable) {\n _enableSortable(sortable);\n};\n\nsortable.disable = function(sortable) {\n _disableSortable(sortable);\n};\n\n$.fn.sortable = function(options) {\n return sortable(this, options);\n};\n\nreturn sortable;\n}));\n","module.exports = jQuery;"],"sourceRoot":""}
\ No newline at end of file
diff --git a/extensions/tags/js/dist/forum.js.map b/extensions/tags/js/dist/forum.js.map
index 64dcd24a6..a04e50cb3 100644
--- a/extensions/tags/js/dist/forum.js.map
+++ b/extensions/tags/js/dist/forum.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/external \"flarum.core.compat['Model']\"","webpack://@flarum/tags/external \"flarum.core.compat['extend']\"","webpack://@flarum/tags/./src/common/utils/sortTags.js","webpack://@flarum/tags/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['components/IndexPage']\"","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['components/Button']\"","webpack://@flarum/tags/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/tags/./src/common/models/Tag.js","webpack://@flarum/tags/external \"flarum.core.compat['utils/extract']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionComposer']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/mixin']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/computed']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Page']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Modal']\"","webpack://@flarum/tags/./src/common/compat.js","webpack://@flarum/tags/external \"flarum.core\"","webpack://@flarum/tags/external \"flarum.core.compat['components/LinkButton']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionPage']\"","webpack://@flarum/tags/external \"flarum.core.compat['models/Discussion']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionHero']\"","webpack://@flarum/tags/./src/forum/components/TagsPage.js","webpack://@flarum/tags/./src/forum/components/DiscussionTaggedPost.js","webpack://@flarum/tags/./src/forum/components/TagLinkButton.js","webpack://@flarum/tags/./src/forum/addTagList.js","webpack://@flarum/tags/./src/forum/components/TagHero.js","webpack://@flarum/tags/./src/forum/addTagFilter.js","webpack://@flarum/tags/./src/forum/addTagLabels.js","webpack://@flarum/tags/./src/forum/components/TagDiscussionModal.js","webpack://@flarum/tags/./src/forum/addTagControl.js","webpack://@flarum/tags/./src/forum/addTagComposer.js","webpack://@flarum/tags/./src/forum/compat.js","webpack://@flarum/tags/./src/forum/index.js","webpack://@flarum/tags/external \"flarum.core.compat['helpers/listItems']\"","webpack://@flarum/tags/external \"flarum.core.compat['helpers/humanTime']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/EventPost']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Separator']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionList']\"","webpack://@flarum/tags/external \"flarum.core.compat['Component']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionListItem']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/DiscussionControls']\"","webpack://@flarum/tags/external \"flarum.core.compat['helpers/highlight']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/classList']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/extractText']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/KeyboardNavigatable']\"","webpack://@flarum/tags/./forum.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","sortTags","tags","slice","sort","a","b","aPos","position","bPos","discussionCount","aParent","parent","bParent","__webpack_exports__","_inheritsLoose","subClass","superClass","constructor","__proto__","tagLabel","flarum_utils_extract__WEBPACK_IMPORTED_MODULE_0__","flarum_utils_extract__WEBPACK_IMPORTED_MODULE_0___default","tag","attrs","style","className","link","extract","color","backgroundColor","title","description","href","app","route","slug","config","translator","trans","tagIcon","tagsLabel","_tagLabel__WEBPACK_IMPORTED_MODULE_1__","_utils_sortTags__WEBPACK_IMPORTED_MODULE_2__","children","forEach","length","push","_extends","assign","target","arguments","source","apply","this","Tag","mixin","Model","attribute","backgroundUrl","backgroundMode","hasOne","defaultSort","isChild","isHidden","lastPostedAt","transformDate","lastPostedDiscussion","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","computed","_utils_sortTags__WEBPACK_IMPORTED_MODULE_0__","_models_Tag__WEBPACK_IMPORTED_MODULE_1__","_helpers_tagsLabel__WEBPACK_IMPORTED_MODULE_2__","_helpers_tagIcon__WEBPACK_IMPORTED_MODULE_3__","_helpers_tagLabel__WEBPACK_IMPORTED_MODULE_4__","tags/utils/sortTags","tags/models/Tag","tags/helpers/tagsLabel","tags/helpers/tagIcon","tags/helpers/tagLabel","TagsPage","init","_Page","store","all","filter","history","view","pinned","cloud","IndexPage","hero","affixSidebar","listItems","sidebarItems","toArray","map","child","element","isInitialized","$","on","e","stopPropagation","discussion","lastPostNumber","humanTime","Page","DiscussionTaggedPost","initProps","props","_EventPost","oldTags","post","content","newTags","diffTags","tags1","tags2","indexOf","id","getById","tagsAdded","tagsRemoved","icon","descriptionKey","descriptionData","data","transChoice","count","EventPost","TagLinkButton","active","isActive","params","LinkButton","addTagList","extend","items","add","component","current","Separator","stickyParams","currentTag","addTag","more","splice","TagHero","Component","addTagFilter","getBy","override","original","vdom","param","DiscussionList","include","q","addTagLabels","DiscussionListItem","DiscussionPage","DiscussionHero","TagDiscussionModal","_this","_Modal","selected","prop","index","focused","selectedTags","minPrimary","forum","maxPrimary","minSecondary","maxSecondary","navigator","KeyboardNavigatable","onUp","setIndex","getCurrentNumericIndex","onDown","onSelect","select","onRemove","primaryCount","secondaryCount","removeTag","getInstruction","remaining","_this2","toLowerCase","substr","onclick","onready","placeholder","extractText","oninput","withAttr","onkeydown","navigate","onfocus","onblur","Button","type","disabled","data-index","classList","colored","onmouseover","toggleTag","highlight","metaKey","ctrlKey","submit","getItem","dispatchEvent","Event","selectableItems","scrollToItem","$items","$dropdown","$item","eq","attr","redraw","scrollTop","dropdownScroll","dropdownTop","offset","top","dropdownBottom","outerHeight","itemTop","itemBottom","parseInt","css","stop","animate","onsubmit","preventDefault","save","relationships","then","stream","update","modal","close","strategy","Modal","addTagControl","DiscussionControls","canTag","show","addTagComposer","promise","DiscussionComposer","chooseTags","focus","chosenTags","chosenPrimaryTags","chosenSecondaryTags","forum_compat","esm_extends","tags/addTagFilter","tags/addTagControl","tags/components/TagHero","tags/components/TagDiscussionModal","tags/components/TagsPage","tags/components/DiscussionTaggedPost","tags/components/TagLinkButton","tags/addTagList","tags/addTagLabels","tags/addTagComposer","initializers","routes","path","postComponents","discussionTagged","models","Discussion","hasMany","tagsCompat","_src_common__WEBPACK_IMPORTED_MODULE_0__","__WEBPACK_IMPORT_KEY__"],"mappings":"2BACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QA0DA,OArDAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,aAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAArB,EAAAU,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAA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,GAAArU,EAAA","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 48);\n","module.exports = flarum.core.compat['Model'];","module.exports = flarum.core.compat['extend'];","export default function sortTags(tags) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null)\n return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent)\n return aParent.position() - bParent.position();\n\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent)\n return aParent === b ? 1 : aParent.position() - bPos;\n\n else if (bParent)\n return bParent === a ? -1 : aPos - bParent.position();\n\n return 0;\n });\n}\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import extract from 'flarum/utils/extract';\n\nexport default function tagLabel(tag, attrs = {}) {\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n\n const link = extract(attrs, 'link');\n\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style.backgroundColor = attrs.style.color = color;\n attrs.className += ' colored';\n }\n\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {tags: tag.slug()});\n attrs.config = m.route;\n }\n } else {\n attrs.className += ' untagged';\n }\n\n return (\n m((link ? 'a' : 'span'), attrs,\n \n {tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text')}\n \n )\n );\n}\n","module.exports = flarum.core.compat['components/IndexPage'];","export default function tagIcon(tag, attrs = {}) {\n attrs.className = 'icon TagIcon ' + (attrs.className || '');\n\n if (tag) {\n attrs.style = attrs.style || {};\n attrs.style.backgroundColor = tag.color();\n } else {\n attrs.className += ' untagged';\n }\n\n return ;\n}\n","import extract from 'flarum/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\n\nexport default function tagsLabel(tags, attrs = {}) {\n const children = [];\n const link = extract(attrs, 'link');\n\n attrs.className = 'TagsLabel ' + (attrs.className || '');\n\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {link}));\n }\n });\n } else {\n children.push(tagLabel());\n }\n\n return {children} ;\n}\n","module.exports = flarum.core.compat['components/Button'];","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","import Model from 'flarum/Model';\nimport mixin from 'flarum/utils/mixin';\nimport computed from 'flarum/utils/computed';\n\nexport default class Tag extends mixin(Model, {\n name: Model.attribute('name'),\n slug: Model.attribute('slug'),\n description: Model.attribute('description'),\n\n color: Model.attribute('color'),\n backgroundUrl: Model.attribute('backgroundUrl'),\n backgroundMode: Model.attribute('backgroundMode'),\n\n position: Model.attribute('position'),\n parent: Model.hasOne('parent'),\n defaultSort: Model.attribute('defaultSort'),\n isChild: Model.attribute('isChild'),\n isHidden: Model.attribute('isHidden'),\n\n discussionCount: Model.attribute('discussionCount'),\n lastPostedAt: Model.attribute('lastPostedAt', Model.transformDate),\n lastPostedDiscussion: Model.hasOne('lastPostedDiscussion'),\n\n isRestricted: Model.attribute('isRestricted'),\n canStartDiscussion: Model.attribute('canStartDiscussion'),\n canAddToDiscussion: Model.attribute('canAddToDiscussion'),\n\n isPrimary: computed('position', 'parent', (position, parent) => position !== null && parent === false)\n}) {}\n","module.exports = flarum.core.compat['utils/extract'];","module.exports = flarum.core.compat['components/DiscussionComposer'];","module.exports = flarum.core.compat['utils/mixin'];","module.exports = flarum.core.compat['utils/computed'];","module.exports = flarum.core.compat['components/Page'];","module.exports = flarum.core.compat['components/Modal'];","import sortTags from './utils/sortTags';\nimport Tag from './models/Tag';\nimport tagsLabel from './helpers/tagsLabel';\nimport tagIcon from './helpers/tagIcon';\nimport tagLabel from './helpers/tagLabel';\n\nexport default {\n 'tags/utils/sortTags': sortTags,\n 'tags/models/Tag': Tag,\n 'tags/helpers/tagsLabel': tagsLabel,\n 'tags/helpers/tagIcon': tagIcon,\n 'tags/helpers/tagLabel': tagLabel\n};\n","module.exports = flarum.core;","module.exports = flarum.core.compat['components/LinkButton'];","module.exports = flarum.core.compat['components/DiscussionPage'];","module.exports = flarum.core.compat['models/Discussion'];","module.exports = flarum.core.compat['components/DiscussionHero'];","import Page from 'flarum/components/Page';\nimport IndexPage from 'flarum/components/IndexPage';\nimport listItems from 'flarum/helpers/listItems';\nimport humanTime from 'flarum/helpers/humanTime';\n\nimport tagLabel from '../../common/helpers/tagLabel';\nimport sortTags from '../../common/utils/sortTags';\n\nexport default class TagsPage extends Page {\n init() {\n super.init();\n\n this.tags = sortTags(app.store.all('tags').filter(tag => !tag.parent()));\n\n app.history.push('tags', app.translator.trans('flarum-tags.forum.header.back_to_tags_tooltip'));\n }\n\n view() {\n const pinned = this.tags.filter(tag => tag.position() !== null);\n const cloud = this.tags.filter(tag => tag.position() === null);\n\n return (\n \n {IndexPage.prototype.hero()}\n
\n
\n {listItems(IndexPage.prototype.sidebarItems().toArray())} \n \n\n
\n
\n\n {cloud.length ? (\n
\n {cloud.map(tag => [\n tagLabel(tag, {link: true}),\n ' ',\n ])}\n
\n ) : ''}\n
\n
\n
\n );\n }\n}\n","import EventPost from 'flarum/components/EventPost';\nimport tagsLabel from '../../common/helpers/tagsLabel';\n\nexport default class DiscussionTaggedPost extends EventPost {\n static initProps(props) {\n super.initProps(props);\n\n const oldTags = props.post.content()[0];\n const newTags = props.post.content()[1];\n\n function diffTags(tags1, tags2) {\n return tags1\n .filter(tag => tags2.indexOf(tag) === -1)\n .map(id => app.store.getById('tags', id));\n }\n\n props.tagsAdded = diffTags(newTags, oldTags);\n props.tagsRemoved = diffTags(oldTags, newTags);\n }\n\n icon() {\n return 'fas fa-tag';\n }\n\n descriptionKey() {\n if (this.props.tagsAdded.length) {\n if (this.props.tagsRemoved.length) {\n return 'flarum-tags.forum.post_stream.added_and_removed_tags_text';\n }\n\n return 'flarum-tags.forum.post_stream.added_tags_text';\n }\n\n return 'flarum-tags.forum.post_stream.removed_tags_text';\n }\n\n descriptionData() {\n const data = {};\n\n if (this.props.tagsAdded.length) {\n data.tagsAdded = app.translator.transChoice('flarum-tags.forum.post_stream.tags_text', this.props.tagsAdded.length, {\n tags: tagsLabel(this.props.tagsAdded, {link: true}),\n count: this.props.tagsAdded.length\n });\n }\n\n if (this.props.tagsRemoved.length) {\n data.tagsRemoved = app.translator.transChoice('flarum-tags.forum.post_stream.tags_text', this.props.tagsRemoved.length, {\n tags: tagsLabel(this.props.tagsRemoved, {link: true}),\n count: this.props.tagsRemoved.length\n });\n }\n\n return data;\n }\n}\n","import LinkButton from 'flarum/components/LinkButton';\nimport tagIcon from '../../common/helpers/tagIcon';\n\nexport default class TagLinkButton extends LinkButton {\n view() {\n const tag = this.props.tag;\n const active = this.constructor.isActive(this.props);\n const description = tag && tag.description();\n\n return (\n \n {tagIcon(tag, {className: 'Button-icon'})}\n {this.props.children}\n \n );\n }\n\n static initProps(props) {\n const tag = props.tag;\n\n props.params.tags = tag ? tag.slug() : 'untagged';\n props.href = app.route('tag', props.params);\n props.children = tag ? tag.name() : app.translator.trans('flarum-tags.forum.index.untagged_link');\n }\n}\n","import { extend } from 'flarum/extend';\nimport IndexPage from 'flarum/components/IndexPage';\nimport Separator from 'flarum/components/Separator';\nimport LinkButton from 'flarum/components/LinkButton';\n\nimport TagLinkButton from './components/TagLinkButton';\nimport TagsPage from './components/TagsPage';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function() {\n // Add a link to the tags page, as well as a list of all the tags,\n // to the index page's sidebar.\n extend(IndexPage.prototype, 'navItems', function(items) {\n items.add('tags', LinkButton.component({\n icon: 'fas fa-th-large',\n children: app.translator.trans('flarum-tags.forum.index.tags_link'),\n href: app.route('tags')\n }), -10);\n\n if (app.current instanceof TagsPage) return;\n\n items.add('separator', Separator.component(), -10);\n\n const params = this.stickyParams();\n const tags = app.store.all('tags');\n const currentTag = this.currentTag();\n\n const addTag = tag => {\n let active = currentTag === tag;\n\n if (!active && currentTag) {\n active = currentTag.parent() === tag;\n }\n\n items.add('tag' + tag.id(), TagLinkButton.component({tag, params, active}), -10);\n };\n\n sortTags(tags)\n .filter(tag => tag.position() !== null && (!tag.isChild() || (currentTag && (tag.parent() === currentTag || tag.parent() === currentTag.parent()))))\n .forEach(addTag);\n\n const more = tags\n .filter(tag => tag.position() === null)\n .sort((a, b) => b.discussionCount() - a.discussionCount());\n\n more.splice(0, 3).forEach(addTag);\n\n if (more.length) {\n items.add('moreTags', LinkButton.component({\n children: app.translator.trans('flarum-tags.forum.index.more_link'),\n href: app.route('tags')\n }), -10);\n }\n });\n}\n","import Component from 'flarum/Component';\n\nexport default class TagHero extends Component {\n view() {\n const tag = this.props.tag;\n const color = tag.color();\n\n return (\n \n \n
\n
{tag.name()} \n
{tag.description()}
\n
\n
\n \n );\n }\n}\n","import { extend, override } from 'flarum/extend';\nimport IndexPage from 'flarum/components/IndexPage';\nimport DiscussionList from 'flarum/components/DiscussionList';\n\nimport TagHero from './components/TagHero';\n\nexport default function() {\n IndexPage.prototype.currentTag = function() {\n const slug = this.params().tags;\n\n if (slug) return app.store.getBy('tags', 'slug', slug);\n };\n\n // If currently viewing a tag, insert a tag hero at the top of the view.\n override(IndexPage.prototype, 'hero', function(original) {\n const tag = this.currentTag();\n\n if (tag) return TagHero.component({tag});\n\n return original();\n });\n\n extend(IndexPage.prototype, 'view', function(vdom) {\n const tag = this.currentTag();\n\n if (tag) {\n vdom.attrs.className += ' IndexPage--tag'+tag.id();\n }\n });\n\n // If currently viewing a tag, restyle the 'new discussion' button to use\n // the tag's color.\n extend(IndexPage.prototype, 'sidebarItems', function(items) {\n const tag = this.currentTag();\n\n if (tag) {\n const color = tag.color();\n\n if (color) {\n items.get('newDiscussion').props.style = {backgroundColor: color};\n }\n }\n });\n\n // Add a parameter for the IndexPage to pass on to the DiscussionList that\n // will let us filter discussions by tag.\n extend(IndexPage.prototype, 'params', function(params) {\n params.tags = m.route.param('tags');\n });\n\n // Translate that parameter into a gambit appended to the search query.\n extend(DiscussionList.prototype, 'requestParams', function(params) {\n params.include.push('tags');\n\n if (this.props.params.tags) {\n params.filter.q = (params.filter.q || '') + ' tag:' + this.props.params.tags;\n }\n });\n}\n","import { extend } from 'flarum/extend';\nimport DiscussionListItem from 'flarum/components/DiscussionListItem';\nimport DiscussionPage from 'flarum/components/DiscussionPage';\nimport DiscussionHero from 'flarum/components/DiscussionHero';\n\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function() {\n // Add tag labels to each discussion in the discussion list.\n extend(DiscussionListItem.prototype, 'infoItems', function(items) {\n const tags = this.props.discussion.tags();\n\n if (tags && tags.length) {\n items.add('tags', tagsLabel(tags), 10);\n }\n });\n\n // Include a discussion's tags when fetching it.\n extend(DiscussionPage.prototype, 'params', function(params) {\n params.include.push('tags');\n });\n\n // Restyle a discussion's hero to use its first tag's color.\n extend(DiscussionHero.prototype, 'view', function(view) {\n const tags = sortTags(this.props.discussion.tags());\n\n if (tags && tags.length) {\n const color = tags[0].color();\n if (color) {\n view.attrs.style = {backgroundColor: color};\n view.attrs.className += ' DiscussionHero--colored';\n }\n }\n });\n\n // Add a list of a discussion's tags to the discussion hero, displayed\n // before the title. Put the title on its own line.\n extend(DiscussionHero.prototype, 'items', function(items) {\n const tags = this.props.discussion.tags();\n\n if (tags && tags.length) {\n items.add('tags', tagsLabel(tags, {link: true}), 5);\n }\n });\n}\n","import Modal from 'flarum/components/Modal';\nimport DiscussionPage from 'flarum/components/DiscussionPage';\nimport Button from 'flarum/components/Button';\nimport highlight from 'flarum/helpers/highlight';\nimport classList from 'flarum/utils/classList';\nimport extractText from 'flarum/utils/extractText';\nimport KeyboardNavigatable from 'flarum/utils/KeyboardNavigatable';\n\nimport tagLabel from '../../common/helpers/tagLabel';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport sortTags from '../../common/utils/sortTags';\n\nexport default class TagDiscussionModal extends Modal {\n init() {\n super.init();\n\n this.tags = app.store.all('tags');\n\n if (this.props.discussion) {\n this.tags = this.tags.filter(tag => tag.canAddToDiscussion() || this.props.discussion.tags().indexOf(tag) !== -1);\n } else {\n this.tags = this.tags.filter(tag => tag.canStartDiscussion());\n }\n\n this.tags = sortTags(this.tags);\n\n this.selected = [];\n this.filter = m.prop('');\n this.index = this.tags[0].id();\n this.focused = false;\n\n if (this.props.selectedTags) {\n this.props.selectedTags.map(this.addTag.bind(this));\n } else if (this.props.discussion) {\n this.props.discussion.tags().map(this.addTag.bind(this));\n }\n\n this.minPrimary = app.forum.attribute('minPrimaryTags');\n this.maxPrimary = app.forum.attribute('maxPrimaryTags');\n this.minSecondary = app.forum.attribute('minSecondaryTags');\n this.maxSecondary = app.forum.attribute('maxSecondaryTags');\n\n this.navigator = new KeyboardNavigatable();\n this.navigator\n .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\n .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\n .onSelect(this.select.bind(this))\n .onRemove(() => this.selected.splice(this.selected.length - 1, 1));\n }\n\n primaryCount() {\n return this.selected.filter(tag => tag.isPrimary()).length;\n }\n\n secondaryCount() {\n return this.selected.filter(tag => !tag.isPrimary()).length;\n }\n\n /**\n * Add the given tag to the list of selected tags.\n *\n * @param {Tag} tag\n */\n addTag(tag) {\n if (!tag.canStartDiscussion()) return;\n\n // If this tag has a parent, we'll also need to add the parent tag to the\n // selected list if it's not already in there.\n const parent = tag.parent();\n if (parent) {\n const index = this.selected.indexOf(parent);\n if (index === -1) {\n this.selected.push(parent);\n }\n }\n\n this.selected.push(tag);\n }\n\n /**\n * Remove the given tag from the list of selected tags.\n *\n * @param {Tag} tag\n */\n removeTag(tag) {\n const index = this.selected.indexOf(tag);\n if (index !== -1) {\n this.selected.splice(index, 1);\n\n // Look through the list of selected tags for any tags which have the tag\n // we just removed as their parent. We'll need to remove them too.\n this.selected\n .filter(selected => selected.parent() === tag)\n .forEach(this.removeTag.bind(this));\n }\n }\n\n className() {\n return 'TagDiscussionModal';\n }\n\n title() {\n return this.props.discussion\n ? app.translator.trans('flarum-tags.forum.choose_tags.edit_title', {title: {this.props.discussion.title()} })\n : app.translator.trans('flarum-tags.forum.choose_tags.title');\n }\n\n getInstruction(primaryCount, secondaryCount) {\n if (primaryCount < this.minPrimary) {\n const remaining = this.minPrimary - primaryCount;\n return app.translator.transChoice('flarum-tags.forum.choose_tags.choose_primary_placeholder', remaining, {count: remaining});\n } else if (secondaryCount < this.minSecondary) {\n const remaining = this.minSecondary - secondaryCount;\n return app.translator.transChoice('flarum-tags.forum.choose_tags.choose_secondary_placeholder', remaining, {count: remaining});\n }\n\n return '';\n }\n\n content() {\n let tags = this.tags;\n const filter = this.filter().toLowerCase();\n const primaryCount = this.primaryCount();\n const secondaryCount = this.secondaryCount();\n\n // Filter out all child tags whose parents have not been selected. This\n // makes it impossible to select a child if its parent hasn't been selected.\n tags = tags.filter(tag => {\n const parent = tag.parent();\n return parent === false || this.selected.indexOf(parent) !== -1;\n });\n\n // If the number of selected primary/secondary tags is at the maximum, then\n // we'll filter out all other tags of that type.\n if (primaryCount >= this.maxPrimary) {\n tags = tags.filter(tag => !tag.isPrimary() || this.selected.indexOf(tag) !== -1);\n }\n\n if (secondaryCount >= this.maxSecondary) {\n tags = tags.filter(tag => tag.isPrimary() || this.selected.indexOf(tag) !== -1);\n }\n\n // If the user has entered text in the filter input, then filter by tags\n // whose name matches what they've entered.\n if (filter) {\n tags = tags.filter(tag => tag.name().substr(0, filter.length).toLowerCase() === filter);\n }\n\n if (tags.indexOf(this.index) === -1) this.index = tags[0];\n\n return [\n \n
\n
\n
\n \n {this.selected.map(tag =>\n {\n this.removeTag(tag);\n this.onready();\n }}>\n {tagLabel(tag)}\n \n )}\n \n this.focused = true}\n onblur={() => this.focused = false}/>\n
\n
\n
\n {Button.component({\n type: 'submit',\n className: 'Button Button--primary',\n disabled: primaryCount < this.minPrimary || secondaryCount < this.minSecondary,\n icon: 'fas fa-check',\n children: app.translator.trans('flarum-tags.forum.choose_tags.submit_button')\n })}\n
\n
\n
,\n\n \n
\n {tags\n .filter(tag => filter || !tag.parent() || this.selected.indexOf(tag.parent()) !== -1)\n .map(tag => (\n this.index = tag}\n onclick={this.toggleTag.bind(this, tag)}\n >\n {tagIcon(tag)}\n \n {highlight(tag.name(), filter)}\n \n {tag.description()\n ? (\n \n {tag.description()}\n \n ) : ''}\n \n ))}\n \n
\n ];\n }\n\n toggleTag(tag) {\n const index = this.selected.indexOf(tag);\n\n if (index !== -1) {\n this.removeTag(tag);\n } else {\n this.addTag(tag);\n }\n\n if (this.filter()) {\n this.filter('');\n this.index = this.tags[0];\n }\n\n this.onready();\n }\n\n select(e) {\n // Ctrl + Enter submits the selection, just Enter completes the current entry\n if (e.metaKey || e.ctrlKey || this.selected.indexOf(this.index) !== -1) {\n if (this.selected.length) {\n this.$('form').submit();\n }\n } else {\n this.getItem(this.index)[0].dispatchEvent(new Event('click'));\n }\n }\n\n selectableItems() {\n return this.$('.TagDiscussionModal-list > li');\n }\n\n getCurrentNumericIndex() {\n return this.selectableItems().index(\n this.getItem(this.index)\n );\n }\n\n getItem(index) {\n return this.selectableItems().filter(`[data-index=\"${index.id()}\"]`);\n }\n\n setIndex(index, scrollToItem) {\n const $items = this.selectableItems();\n const $dropdown = $items.parent();\n\n if (index < 0) {\n index = $items.length - 1;\n } else if (index >= $items.length) {\n index = 0;\n }\n\n const $item = $items.eq(index);\n\n this.index = app.store.getById('tags', $item.attr('data-index'));\n\n m.redraw();\n\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\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\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({scrollTop}, 100);\n }\n }\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n const discussion = this.props.discussion;\n const tags = this.selected;\n\n if (discussion) {\n discussion.save({relationships: {tags}})\n .then(() => {\n if (app.current instanceof DiscussionPage) {\n app.current.stream.update();\n }\n m.redraw();\n });\n }\n\n if (this.props.onsubmit) this.props.onsubmit(tags);\n\n app.modal.close();\n\n m.redraw.strategy('none');\n }\n}\n","import { extend } from 'flarum/extend';\nimport DiscussionControls from 'flarum/utils/DiscussionControls';\nimport Button from 'flarum/components/Button';\n\nimport TagDiscussionModal from './components/TagDiscussionModal';\n\nexport default function() {\n // Add a control allowing the discussion to be moved to another category.\n extend(DiscussionControls, 'moderationControls', function(items, discussion) {\n if (discussion.canTag()) {\n items.add('tags', Button.component({\n children: app.translator.trans('flarum-tags.forum.discussion_controls.edit_tags_button'),\n icon: 'fas fa-tag',\n onclick: () => app.modal.show(new TagDiscussionModal({discussion}))\n }));\n }\n });\n}\n","import { extend, override } from 'flarum/extend';\nimport IndexPage from 'flarum/components/IndexPage';\nimport DiscussionComposer from 'flarum/components/DiscussionComposer';\n\nimport TagDiscussionModal from './components/TagDiscussionModal';\nimport tagsLabel from '../common/helpers/tagsLabel';\n\nexport default function() {\n extend(IndexPage.prototype, 'newDiscussionAction', function(promise) {\n const tag = app.store.getBy('tags', 'slug', this.params().tags);\n\n if (tag) {\n const parent = tag.parent();\n const tags = parent ? [parent, tag] : [tag];\n promise.then(component => component.tags = tags);\n }\n });\n\n // Add tag-selection abilities to the discussion composer.\n DiscussionComposer.prototype.tags = [];\n DiscussionComposer.prototype.chooseTags = function() {\n app.modal.show(\n new TagDiscussionModal({\n selectedTags: this.tags.slice(0),\n onsubmit: tags => {\n this.tags = tags;\n this.$('textarea').focus();\n }\n })\n );\n };\n\n // Add a tag-selection menu to the discussion composer's header, after the\n // title.\n extend(DiscussionComposer.prototype, 'headerItems', function(items) {\n items.add('tags', (\n \n {this.tags.length\n ? tagsLabel(this.tags)\n : {app.translator.trans('flarum-tags.forum.composer_discussion.choose_tags_link')} }\n \n ), 10);\n });\n\n override(DiscussionComposer.prototype, 'onsubmit', function(original) {\n const chosenTags = this.tags;\n const chosenPrimaryTags = chosenTags.filter(tag => tag.position() !== null && !tag.isChild());\n const chosenSecondaryTags = chosenTags.filter(tag => tag.position() === null);\n if (!chosenTags.length\n || (chosenPrimaryTags.length < app.forum.attribute('minPrimaryTags'))\n || (chosenSecondaryTags.length < app.forum.attribute('minSecondaryTags'))) {\n app.modal.show(\n new TagDiscussionModal({\n selectedTags: chosenTags,\n onsubmit: tags => {\n this.tags = tags;\n original();\n }\n })\n );\n } else {\n original();\n }\n });\n\n // Add the selected tags as data to submit to the server.\n extend(DiscussionComposer.prototype, 'data', function(data) {\n data.relationships = data.relationships || {};\n data.relationships.tags = this.tags;\n });\n}\n","import compat from '../common/compat';\n\nimport addTagFilter from './addTagFilter';\nimport addTagControl from './addTagControl';\nimport TagHero from './components/TagHero';\nimport TagDiscussionModal from './components/TagDiscussionModal';\nimport TagsPage from './components/TagsPage';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\nimport TagLinkButton from './components/TagLinkButton';\nimport addTagList from './addTagList';\nimport addTagLabels from './addTagLabels';\nimport addTagComposer from './addTagComposer';\n\nexport default Object.assign(compat, {\n 'tags/addTagFilter': addTagFilter,\n 'tags/addTagControl': addTagControl,\n 'tags/components/TagHero': TagHero,\n 'tags/components/TagDiscussionModal': TagDiscussionModal,\n 'tags/components/TagsPage': TagsPage,\n 'tags/components/DiscussionTaggedPost': DiscussionTaggedPost,\n 'tags/components/TagLinkButton': TagLinkButton,\n 'tags/addTagList': addTagList,\n 'tags/addTagLabels': addTagLabels,\n 'tags/addTagComposer': addTagComposer,\n});\n","import Model from 'flarum/Model';\nimport Discussion from 'flarum/models/Discussion';\nimport IndexPage from 'flarum/components/IndexPage';\n\nimport Tag from '../common/models/Tag';\nimport TagsPage from './components/TagsPage';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\n\nimport addTagList from './addTagList';\nimport addTagFilter from './addTagFilter';\nimport addTagLabels from './addTagLabels';\nimport addTagControl from './addTagControl';\nimport addTagComposer from './addTagComposer';\n\napp.initializers.add('flarum-tags', function(app) {\n app.routes.tags = {path: '/tags', component: TagsPage.component()};\n app.routes.tag = {path: '/t/:tags', component: IndexPage.component()};\n\n app.route.tag = tag => app.route('tag', {tags: tag.slug()});\n\n app.postComponents.discussionTagged = DiscussionTaggedPost;\n\n app.store.models.tags = Tag;\n\n Discussion.prototype.tags = Model.hasMany('tags');\n Discussion.prototype.canTag = Model.attribute('canTag');\n\n addTagList();\n addTagFilter();\n addTagLabels();\n addTagControl();\n addTagComposer();\n});\n\n\n// Expose compat API\nimport tagsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, tagsCompat);","module.exports = flarum.core.compat['helpers/listItems'];","module.exports = flarum.core.compat['helpers/humanTime'];","module.exports = flarum.core.compat['components/EventPost'];","module.exports = flarum.core.compat['components/Separator'];","module.exports = flarum.core.compat['components/DiscussionList'];","module.exports = flarum.core.compat['Component'];","module.exports = flarum.core.compat['components/DiscussionListItem'];","module.exports = flarum.core.compat['utils/DiscussionControls'];","module.exports = flarum.core.compat['helpers/highlight'];","module.exports = flarum.core.compat['utils/classList'];","module.exports = flarum.core.compat['utils/extractText'];","module.exports = flarum.core.compat['utils/KeyboardNavigatable'];","/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner \n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nexport * from './src/common';\nexport * from './src/forum';\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/external \"flarum.core.compat['Model']\"","webpack://@flarum/tags/external \"flarum.core.compat['extend']\"","webpack://@flarum/tags/./src/common/utils/sortTags.js","webpack://@flarum/tags/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['components/IndexPage']\"","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['components/Button']\"","webpack://@flarum/tags/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/tags/./src/common/models/Tag.js","webpack://@flarum/tags/external \"flarum.core.compat['utils/extract']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionComposer']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/mixin']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/computed']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Page']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Modal']\"","webpack://@flarum/tags/./src/common/compat.js","webpack://@flarum/tags/external \"flarum.core\"","webpack://@flarum/tags/external \"flarum.core.compat['components/LinkButton']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionPage']\"","webpack://@flarum/tags/external \"flarum.core.compat['models/Discussion']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionHero']\"","webpack://@flarum/tags/./src/forum/components/TagsPage.js","webpack://@flarum/tags/./src/forum/components/DiscussionTaggedPost.js","webpack://@flarum/tags/./src/forum/components/TagLinkButton.js","webpack://@flarum/tags/./src/forum/addTagList.js","webpack://@flarum/tags/./src/forum/components/TagHero.js","webpack://@flarum/tags/./src/forum/addTagFilter.js","webpack://@flarum/tags/./src/forum/addTagLabels.js","webpack://@flarum/tags/./src/forum/components/TagDiscussionModal.js","webpack://@flarum/tags/./src/forum/addTagControl.js","webpack://@flarum/tags/./src/forum/addTagComposer.js","webpack://@flarum/tags/./src/forum/compat.js","webpack://@flarum/tags/./src/forum/index.js","webpack://@flarum/tags/external \"flarum.core.compat['helpers/listItems']\"","webpack://@flarum/tags/external \"flarum.core.compat['helpers/humanTime']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/EventPost']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Separator']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionList']\"","webpack://@flarum/tags/external \"flarum.core.compat['Component']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionListItem']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/DiscussionControls']\"","webpack://@flarum/tags/external \"flarum.core.compat['helpers/highlight']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/classList']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/extractText']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/KeyboardNavigatable']\"","webpack://@flarum/tags/./forum.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","sortTags","tags","slice","sort","a","b","aPos","position","bPos","discussionCount","aParent","parent","bParent","__webpack_exports__","_inheritsLoose","subClass","superClass","constructor","__proto__","tagLabel","flarum_utils_extract__WEBPACK_IMPORTED_MODULE_0__","flarum_utils_extract__WEBPACK_IMPORTED_MODULE_0___default","tag","attrs","style","className","link","extract","color","backgroundColor","title","description","href","app","route","slug","config","translator","trans","tagIcon","tagsLabel","_tagLabel__WEBPACK_IMPORTED_MODULE_1__","_utils_sortTags__WEBPACK_IMPORTED_MODULE_2__","children","forEach","length","push","_extends","assign","target","arguments","source","apply","this","Tag","mixin","Model","attribute","backgroundUrl","backgroundMode","hasOne","defaultSort","isChild","isHidden","lastPostedAt","transformDate","lastPostedDiscussion","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","computed","_utils_sortTags__WEBPACK_IMPORTED_MODULE_0__","_models_Tag__WEBPACK_IMPORTED_MODULE_1__","_helpers_tagsLabel__WEBPACK_IMPORTED_MODULE_2__","_helpers_tagIcon__WEBPACK_IMPORTED_MODULE_3__","_helpers_tagLabel__WEBPACK_IMPORTED_MODULE_4__","tags/utils/sortTags","tags/models/Tag","tags/helpers/tagsLabel","tags/helpers/tagIcon","tags/helpers/tagLabel","TagsPage","init","_Page","store","all","filter","history","view","pinned","cloud","IndexPage","hero","affixSidebar","listItems","sidebarItems","toArray","map","child","element","isInitialized","$","on","e","stopPropagation","discussion","lastPostNumber","humanTime","Page","DiscussionTaggedPost","initProps","props","_EventPost","oldTags","post","content","newTags","diffTags","tags1","tags2","indexOf","id","getById","tagsAdded","tagsRemoved","icon","descriptionKey","descriptionData","data","transChoice","count","EventPost","TagLinkButton","active","isActive","params","LinkButton","addTagList","extend","items","add","component","current","Separator","stickyParams","currentTag","addTag","more","splice","TagHero","Component","addTagFilter","getBy","override","original","vdom","param","DiscussionList","include","q","addTagLabels","DiscussionListItem","DiscussionPage","DiscussionHero","TagDiscussionModal","_this","_Modal","selected","prop","index","focused","selectedTags","minPrimary","forum","maxPrimary","minSecondary","maxSecondary","navigator","KeyboardNavigatable","onUp","setIndex","getCurrentNumericIndex","onDown","onSelect","select","onRemove","primaryCount","secondaryCount","removeTag","getInstruction","remaining","_this2","toLowerCase","substr","onclick","onready","placeholder","extractText","oninput","withAttr","onkeydown","navigate","onfocus","onblur","Button","type","disabled","data-index","classList","colored","onmouseover","toggleTag","highlight","metaKey","ctrlKey","submit","getItem","dispatchEvent","Event","selectableItems","scrollToItem","$items","$dropdown","$item","eq","attr","redraw","scrollTop","dropdownScroll","dropdownTop","offset","top","dropdownBottom","outerHeight","itemTop","itemBottom","parseInt","css","stop","animate","onsubmit","preventDefault","save","relationships","then","stream","update","modal","close","strategy","Modal","addTagControl","DiscussionControls","canTag","show","addTagComposer","promise","DiscussionComposer","chooseTags","focus","chosenTags","chosenPrimaryTags","chosenSecondaryTags","forum_compat","esm_extends","tags/addTagFilter","tags/addTagControl","tags/components/TagHero","tags/components/TagDiscussionModal","tags/components/TagsPage","tags/components/DiscussionTaggedPost","tags/components/TagLinkButton","tags/addTagList","tags/addTagLabels","tags/addTagComposer","initializers","routes","path","postComponents","discussionTagged","models","Discussion","hasMany","tagsCompat","_src_common__WEBPACK_IMPORTED_MODULE_0__","__WEBPACK_IMPORT_KEY__"],"mappings":"2BACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QA0DA,OArDAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGA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AMqB,EAAIa,UAEnDF,EAAIsP,eAAeC,iBAAmB1K,EAEtC7E,EAAIoD,MAAMoM,OAAOxR,KAAOqD,IAExBoO,IAAWjS,UAAUQ,KAAOuD,IAAMmO,QAAQ,QAC1CD,IAAWjS,UAAUqQ,OAAStM,IAAMC,UAAU,UAE9CiF,IACAc,IACAS,IACA2F,KACAI,OAQFzR,OAAAkS,EAAA,EAAAlS,CAAcwB,UAAQ6R,oBCvCtBhU,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,oCCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,oCCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,uCCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,uCCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,4CCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,yBCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,gDCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,2CCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,oCCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,kCCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,oCCAAnC,EAAAD,QAAAkC,OAAAC,KAAAC,OAAA,oECAAtC,EAAAkB,EAAAkC,GAAA,IAAAgR,EAAApU,EAAA,YAAAqU,KAAAD,EAAA,YAAAC,GAAA,SAAA1S,GAAA3B,EAAAU,EAAA0C,EAAAzB,EAAA,kBAAAyS,EAAAzS,KAAA,CAAA0S,GAAArU,EAAA","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 48);\n","module.exports = flarum.core.compat['Model'];","module.exports = flarum.core.compat['extend'];","export default function sortTags(tags) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null)\n return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent)\n return aParent.position() - bParent.position();\n\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent)\n return aParent === b ? 1 : aParent.position() - bPos;\n\n else if (bParent)\n return bParent === a ? -1 : aPos - bParent.position();\n\n return 0;\n });\n}\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import extract from 'flarum/utils/extract';\n\nexport default function tagLabel(tag, attrs = {}) {\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n\n const link = extract(attrs, 'link');\n\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style.backgroundColor = attrs.style.color = color;\n attrs.className += ' colored';\n }\n\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {tags: tag.slug()});\n attrs.config = m.route;\n }\n } else {\n attrs.className += ' untagged';\n }\n\n return (\n m((link ? 'a' : 'span'), attrs,\n \n {tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text')}\n \n )\n );\n}\n","module.exports = flarum.core.compat['components/IndexPage'];","export default function tagIcon(tag, attrs = {}) {\n attrs.className = 'icon TagIcon ' + (attrs.className || '');\n\n if (tag) {\n attrs.style = attrs.style || {};\n attrs.style.backgroundColor = tag.color();\n } else {\n attrs.className += ' untagged';\n }\n\n return ;\n}\n","import extract from 'flarum/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\n\nexport default function tagsLabel(tags, attrs = {}) {\n const children = [];\n const link = extract(attrs, 'link');\n\n attrs.className = 'TagsLabel ' + (attrs.className || '');\n\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {link}));\n }\n });\n } else {\n children.push(tagLabel());\n }\n\n return {children} ;\n}\n","module.exports = flarum.core.compat['components/Button'];","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","import Model from 'flarum/Model';\nimport mixin from 'flarum/utils/mixin';\nimport computed from 'flarum/utils/computed';\n\nexport default class Tag extends mixin(Model, {\n name: Model.attribute('name'),\n slug: Model.attribute('slug'),\n description: Model.attribute('description'),\n\n color: Model.attribute('color'),\n backgroundUrl: Model.attribute('backgroundUrl'),\n backgroundMode: Model.attribute('backgroundMode'),\n\n position: Model.attribute('position'),\n parent: Model.hasOne('parent'),\n defaultSort: Model.attribute('defaultSort'),\n isChild: Model.attribute('isChild'),\n isHidden: Model.attribute('isHidden'),\n\n discussionCount: Model.attribute('discussionCount'),\n lastPostedAt: Model.attribute('lastPostedAt', Model.transformDate),\n lastPostedDiscussion: Model.hasOne('lastPostedDiscussion'),\n\n isRestricted: Model.attribute('isRestricted'),\n canStartDiscussion: Model.attribute('canStartDiscussion'),\n canAddToDiscussion: Model.attribute('canAddToDiscussion'),\n\n isPrimary: computed('position', 'parent', (position, parent) => position !== null && parent === false)\n}) {}\n","module.exports = flarum.core.compat['utils/extract'];","module.exports = flarum.core.compat['components/DiscussionComposer'];","module.exports = flarum.core.compat['utils/mixin'];","module.exports = flarum.core.compat['utils/computed'];","module.exports = flarum.core.compat['components/Page'];","module.exports = flarum.core.compat['components/Modal'];","import sortTags from './utils/sortTags';\nimport Tag from './models/Tag';\nimport tagsLabel from './helpers/tagsLabel';\nimport tagIcon from './helpers/tagIcon';\nimport tagLabel from './helpers/tagLabel';\n\nexport default {\n 'tags/utils/sortTags': sortTags,\n 'tags/models/Tag': Tag,\n 'tags/helpers/tagsLabel': tagsLabel,\n 'tags/helpers/tagIcon': tagIcon,\n 'tags/helpers/tagLabel': tagLabel\n};\n","module.exports = flarum.core;","module.exports = flarum.core.compat['components/LinkButton'];","module.exports = flarum.core.compat['components/DiscussionPage'];","module.exports = flarum.core.compat['models/Discussion'];","module.exports = flarum.core.compat['components/DiscussionHero'];","import Page from 'flarum/components/Page';\nimport IndexPage from 'flarum/components/IndexPage';\nimport listItems from 'flarum/helpers/listItems';\nimport humanTime from 'flarum/helpers/humanTime';\n\nimport tagLabel from '../../common/helpers/tagLabel';\nimport sortTags from '../../common/utils/sortTags';\n\nexport default class TagsPage extends Page {\n init() {\n super.init();\n\n this.tags = sortTags(app.store.all('tags').filter(tag => !tag.parent()));\n\n app.history.push('tags', app.translator.trans('flarum-tags.forum.header.back_to_tags_tooltip'));\n }\n\n view() {\n const pinned = this.tags.filter(tag => tag.position() !== null);\n const cloud = this.tags.filter(tag => tag.position() === null);\n\n return (\n \n {IndexPage.prototype.hero()}\n
\n
\n {listItems(IndexPage.prototype.sidebarItems().toArray())} \n \n\n
\n
\n\n {cloud.length ? (\n
\n {cloud.map(tag => [\n tagLabel(tag, {link: true}),\n ' ',\n ])}\n
\n ) : ''}\n
\n
\n
\n );\n }\n}\n","import EventPost from 'flarum/components/EventPost';\nimport tagsLabel from '../../common/helpers/tagsLabel';\n\nexport default class DiscussionTaggedPost extends EventPost {\n static initProps(props) {\n super.initProps(props);\n\n const oldTags = props.post.content()[0];\n const newTags = props.post.content()[1];\n\n function diffTags(tags1, tags2) {\n return tags1\n .filter(tag => tags2.indexOf(tag) === -1)\n .map(id => app.store.getById('tags', id));\n }\n\n props.tagsAdded = diffTags(newTags, oldTags);\n props.tagsRemoved = diffTags(oldTags, newTags);\n }\n\n icon() {\n return 'fas fa-tag';\n }\n\n descriptionKey() {\n if (this.props.tagsAdded.length) {\n if (this.props.tagsRemoved.length) {\n return 'flarum-tags.forum.post_stream.added_and_removed_tags_text';\n }\n\n return 'flarum-tags.forum.post_stream.added_tags_text';\n }\n\n return 'flarum-tags.forum.post_stream.removed_tags_text';\n }\n\n descriptionData() {\n const data = {};\n\n if (this.props.tagsAdded.length) {\n data.tagsAdded = app.translator.transChoice('flarum-tags.forum.post_stream.tags_text', this.props.tagsAdded.length, {\n tags: tagsLabel(this.props.tagsAdded, {link: true}),\n count: this.props.tagsAdded.length\n });\n }\n\n if (this.props.tagsRemoved.length) {\n data.tagsRemoved = app.translator.transChoice('flarum-tags.forum.post_stream.tags_text', this.props.tagsRemoved.length, {\n tags: tagsLabel(this.props.tagsRemoved, {link: true}),\n count: this.props.tagsRemoved.length\n });\n }\n\n return data;\n }\n}\n","import LinkButton from 'flarum/components/LinkButton';\nimport tagIcon from '../../common/helpers/tagIcon';\n\nexport default class TagLinkButton extends LinkButton {\n view() {\n const tag = this.props.tag;\n const active = this.constructor.isActive(this.props);\n const description = tag && tag.description();\n\n return (\n \n {tagIcon(tag, {className: 'Button-icon'})}\n {this.props.children}\n \n );\n }\n\n static initProps(props) {\n const tag = props.tag;\n\n props.params.tags = tag ? tag.slug() : 'untagged';\n props.href = app.route('tag', props.params);\n props.children = tag ? tag.name() : app.translator.trans('flarum-tags.forum.index.untagged_link');\n }\n}\n","import { extend } from 'flarum/extend';\nimport IndexPage from 'flarum/components/IndexPage';\nimport Separator from 'flarum/components/Separator';\nimport LinkButton from 'flarum/components/LinkButton';\n\nimport TagLinkButton from './components/TagLinkButton';\nimport TagsPage from './components/TagsPage';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function() {\n // Add a link to the tags page, as well as a list of all the tags,\n // to the index page's sidebar.\n extend(IndexPage.prototype, 'navItems', function(items) {\n items.add('tags', LinkButton.component({\n icon: 'fas fa-th-large',\n children: app.translator.trans('flarum-tags.forum.index.tags_link'),\n href: app.route('tags')\n }), -10);\n\n if (app.current instanceof TagsPage) return;\n\n items.add('separator', Separator.component(), -10);\n\n const params = this.stickyParams();\n const tags = app.store.all('tags');\n const currentTag = this.currentTag();\n\n const addTag = tag => {\n let active = currentTag === tag;\n\n if (!active && currentTag) {\n active = currentTag.parent() === tag;\n }\n\n items.add('tag' + tag.id(), TagLinkButton.component({tag, params, active}), -10);\n };\n\n sortTags(tags)\n .filter(tag => tag.position() !== null && (!tag.isChild() || (currentTag && (tag.parent() === currentTag || tag.parent() === currentTag.parent()))))\n .forEach(addTag);\n\n const more = tags\n .filter(tag => tag.position() === null)\n .sort((a, b) => b.discussionCount() - a.discussionCount());\n\n more.splice(0, 3).forEach(addTag);\n\n if (more.length) {\n items.add('moreTags', LinkButton.component({\n children: app.translator.trans('flarum-tags.forum.index.more_link'),\n href: app.route('tags')\n }), -10);\n }\n });\n}\n","import Component from 'flarum/Component';\n\nexport default class TagHero extends Component {\n view() {\n const tag = this.props.tag;\n const color = tag.color();\n\n return (\n \n \n
\n
{tag.name()} \n
{tag.description()}
\n
\n
\n \n );\n }\n}\n","import { extend, override } from 'flarum/extend';\nimport IndexPage from 'flarum/components/IndexPage';\nimport DiscussionList from 'flarum/components/DiscussionList';\n\nimport TagHero from './components/TagHero';\n\nexport default function() {\n IndexPage.prototype.currentTag = function() {\n const slug = this.params().tags;\n\n if (slug) return app.store.getBy('tags', 'slug', slug);\n };\n\n // If currently viewing a tag, insert a tag hero at the top of the view.\n override(IndexPage.prototype, 'hero', function(original) {\n const tag = this.currentTag();\n\n if (tag) return TagHero.component({tag});\n\n return original();\n });\n\n extend(IndexPage.prototype, 'view', function(vdom) {\n const tag = this.currentTag();\n\n if (tag) {\n vdom.attrs.className += ' IndexPage--tag'+tag.id();\n }\n });\n\n // If currently viewing a tag, restyle the 'new discussion' button to use\n // the tag's color.\n extend(IndexPage.prototype, 'sidebarItems', function(items) {\n const tag = this.currentTag();\n\n if (tag) {\n const color = tag.color();\n\n if (color) {\n items.get('newDiscussion').props.style = {backgroundColor: color};\n }\n }\n });\n\n // Add a parameter for the IndexPage to pass on to the DiscussionList that\n // will let us filter discussions by tag.\n extend(IndexPage.prototype, 'params', function(params) {\n params.tags = m.route.param('tags');\n });\n\n // Translate that parameter into a gambit appended to the search query.\n extend(DiscussionList.prototype, 'requestParams', function(params) {\n params.include.push('tags');\n\n if (this.props.params.tags) {\n params.filter.q = (params.filter.q || '') + ' tag:' + this.props.params.tags;\n }\n });\n}\n","import { extend } from 'flarum/extend';\nimport DiscussionListItem from 'flarum/components/DiscussionListItem';\nimport DiscussionPage from 'flarum/components/DiscussionPage';\nimport DiscussionHero from 'flarum/components/DiscussionHero';\n\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function() {\n // Add tag labels to each discussion in the discussion list.\n extend(DiscussionListItem.prototype, 'infoItems', function(items) {\n const tags = this.props.discussion.tags();\n\n if (tags && tags.length) {\n items.add('tags', tagsLabel(tags), 10);\n }\n });\n\n // Include a discussion's tags when fetching it.\n extend(DiscussionPage.prototype, 'params', function(params) {\n params.include.push('tags');\n });\n\n // Restyle a discussion's hero to use its first tag's color.\n extend(DiscussionHero.prototype, 'view', function(view) {\n const tags = sortTags(this.props.discussion.tags());\n\n if (tags && tags.length) {\n const color = tags[0].color();\n if (color) {\n view.attrs.style = {backgroundColor: color};\n view.attrs.className += ' DiscussionHero--colored';\n }\n }\n });\n\n // Add a list of a discussion's tags to the discussion hero, displayed\n // before the title. Put the title on its own line.\n extend(DiscussionHero.prototype, 'items', function(items) {\n const tags = this.props.discussion.tags();\n\n if (tags && tags.length) {\n items.add('tags', tagsLabel(tags, {link: true}), 5);\n }\n });\n}\n","import Modal from 'flarum/components/Modal';\nimport DiscussionPage from 'flarum/components/DiscussionPage';\nimport Button from 'flarum/components/Button';\nimport highlight from 'flarum/helpers/highlight';\nimport classList from 'flarum/utils/classList';\nimport extractText from 'flarum/utils/extractText';\nimport KeyboardNavigatable from 'flarum/utils/KeyboardNavigatable';\n\nimport tagLabel from '../../common/helpers/tagLabel';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport sortTags from '../../common/utils/sortTags';\n\nexport default class TagDiscussionModal extends Modal {\n init() {\n super.init();\n\n this.tags = app.store.all('tags');\n\n if (this.props.discussion) {\n this.tags = this.tags.filter(tag => tag.canAddToDiscussion() || this.props.discussion.tags().indexOf(tag) !== -1);\n } else {\n this.tags = this.tags.filter(tag => tag.canStartDiscussion());\n }\n\n this.tags = sortTags(this.tags);\n\n this.selected = [];\n this.filter = m.prop('');\n this.index = this.tags[0].id();\n this.focused = false;\n\n if (this.props.selectedTags) {\n this.props.selectedTags.map(this.addTag.bind(this));\n } else if (this.props.discussion) {\n this.props.discussion.tags().map(this.addTag.bind(this));\n }\n\n this.minPrimary = app.forum.attribute('minPrimaryTags');\n this.maxPrimary = app.forum.attribute('maxPrimaryTags');\n this.minSecondary = app.forum.attribute('minSecondaryTags');\n this.maxSecondary = app.forum.attribute('maxSecondaryTags');\n\n this.navigator = new KeyboardNavigatable();\n this.navigator\n .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\n .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\n .onSelect(this.select.bind(this))\n .onRemove(() => this.selected.splice(this.selected.length - 1, 1));\n }\n\n primaryCount() {\n return this.selected.filter(tag => tag.isPrimary()).length;\n }\n\n secondaryCount() {\n return this.selected.filter(tag => !tag.isPrimary()).length;\n }\n\n /**\n * Add the given tag to the list of selected tags.\n *\n * @param {Tag} tag\n */\n addTag(tag) {\n if (!tag.canStartDiscussion()) return;\n\n // If this tag has a parent, we'll also need to add the parent tag to the\n // selected list if it's not already in there.\n const parent = tag.parent();\n if (parent) {\n const index = this.selected.indexOf(parent);\n if (index === -1) {\n this.selected.push(parent);\n }\n }\n\n this.selected.push(tag);\n }\n\n /**\n * Remove the given tag from the list of selected tags.\n *\n * @param {Tag} tag\n */\n removeTag(tag) {\n const index = this.selected.indexOf(tag);\n if (index !== -1) {\n this.selected.splice(index, 1);\n\n // Look through the list of selected tags for any tags which have the tag\n // we just removed as their parent. We'll need to remove them too.\n this.selected\n .filter(selected => selected.parent() === tag)\n .forEach(this.removeTag.bind(this));\n }\n }\n\n className() {\n return 'TagDiscussionModal';\n }\n\n title() {\n return this.props.discussion\n ? app.translator.trans('flarum-tags.forum.choose_tags.edit_title', {title: {this.props.discussion.title()} })\n : app.translator.trans('flarum-tags.forum.choose_tags.title');\n }\n\n getInstruction(primaryCount, secondaryCount) {\n if (primaryCount < this.minPrimary) {\n const remaining = this.minPrimary - primaryCount;\n return app.translator.transChoice('flarum-tags.forum.choose_tags.choose_primary_placeholder', remaining, {count: remaining});\n } else if (secondaryCount < this.minSecondary) {\n const remaining = this.minSecondary - secondaryCount;\n return app.translator.transChoice('flarum-tags.forum.choose_tags.choose_secondary_placeholder', remaining, {count: remaining});\n }\n\n return '';\n }\n\n content() {\n let tags = this.tags;\n const filter = this.filter().toLowerCase();\n const primaryCount = this.primaryCount();\n const secondaryCount = this.secondaryCount();\n\n // Filter out all child tags whose parents have not been selected. This\n // makes it impossible to select a child if its parent hasn't been selected.\n tags = tags.filter(tag => {\n const parent = tag.parent();\n return parent === false || this.selected.indexOf(parent) !== -1;\n });\n\n // If the number of selected primary/secondary tags is at the maximum, then\n // we'll filter out all other tags of that type.\n if (primaryCount >= this.maxPrimary) {\n tags = tags.filter(tag => !tag.isPrimary() || this.selected.indexOf(tag) !== -1);\n }\n\n if (secondaryCount >= this.maxSecondary) {\n tags = tags.filter(tag => tag.isPrimary() || this.selected.indexOf(tag) !== -1);\n }\n\n // If the user has entered text in the filter input, then filter by tags\n // whose name matches what they've entered.\n if (filter) {\n tags = tags.filter(tag => tag.name().substr(0, filter.length).toLowerCase() === filter);\n }\n\n if (tags.indexOf(this.index) === -1) this.index = tags[0];\n\n return [\n \n
\n
\n
\n \n {this.selected.map(tag =>\n {\n this.removeTag(tag);\n this.onready();\n }}>\n {tagLabel(tag)}\n \n )}\n \n this.focused = true}\n onblur={() => this.focused = false}/>\n
\n
\n
\n {Button.component({\n type: 'submit',\n className: 'Button Button--primary',\n disabled: primaryCount < this.minPrimary || secondaryCount < this.minSecondary,\n icon: 'fas fa-check',\n children: app.translator.trans('flarum-tags.forum.choose_tags.submit_button')\n })}\n
\n
\n
,\n\n \n
\n {tags\n .filter(tag => filter || !tag.parent() || this.selected.indexOf(tag.parent()) !== -1)\n .map(tag => (\n this.index = tag}\n onclick={this.toggleTag.bind(this, tag)}\n >\n {tagIcon(tag)}\n \n {highlight(tag.name(), filter)}\n \n {tag.description()\n ? (\n \n {tag.description()}\n \n ) : ''}\n \n ))}\n \n
\n ];\n }\n\n toggleTag(tag) {\n const index = this.selected.indexOf(tag);\n\n if (index !== -1) {\n this.removeTag(tag);\n } else {\n this.addTag(tag);\n }\n\n if (this.filter()) {\n this.filter('');\n this.index = this.tags[0];\n }\n\n this.onready();\n }\n\n select(e) {\n // Ctrl + Enter submits the selection, just Enter completes the current entry\n if (e.metaKey || e.ctrlKey || this.selected.indexOf(this.index) !== -1) {\n if (this.selected.length) {\n this.$('form').submit();\n }\n } else {\n this.getItem(this.index)[0].dispatchEvent(new Event('click'));\n }\n }\n\n selectableItems() {\n return this.$('.TagDiscussionModal-list > li');\n }\n\n getCurrentNumericIndex() {\n return this.selectableItems().index(\n this.getItem(this.index)\n );\n }\n\n getItem(index) {\n return this.selectableItems().filter(`[data-index=\"${index.id()}\"]`);\n }\n\n setIndex(index, scrollToItem) {\n const $items = this.selectableItems();\n const $dropdown = $items.parent();\n\n if (index < 0) {\n index = $items.length - 1;\n } else if (index >= $items.length) {\n index = 0;\n }\n\n const $item = $items.eq(index);\n\n this.index = app.store.getById('tags', $item.attr('data-index'));\n\n m.redraw();\n\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\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\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({scrollTop}, 100);\n }\n }\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n const discussion = this.props.discussion;\n const tags = this.selected;\n\n if (discussion) {\n discussion.save({relationships: {tags}})\n .then(() => {\n if (app.current instanceof DiscussionPage) {\n app.current.stream.update();\n }\n m.redraw();\n });\n }\n\n if (this.props.onsubmit) this.props.onsubmit(tags);\n\n app.modal.close();\n\n m.redraw.strategy('none');\n }\n}\n","import { extend } from 'flarum/extend';\nimport DiscussionControls from 'flarum/utils/DiscussionControls';\nimport Button from 'flarum/components/Button';\n\nimport TagDiscussionModal from './components/TagDiscussionModal';\n\nexport default function() {\n // Add a control allowing the discussion to be moved to another category.\n extend(DiscussionControls, 'moderationControls', function(items, discussion) {\n if (discussion.canTag()) {\n items.add('tags', Button.component({\n children: app.translator.trans('flarum-tags.forum.discussion_controls.edit_tags_button'),\n icon: 'fas fa-tag',\n onclick: () => app.modal.show(new TagDiscussionModal({discussion}))\n }));\n }\n });\n}\n","import { extend, override } from 'flarum/extend';\nimport IndexPage from 'flarum/components/IndexPage';\nimport DiscussionComposer from 'flarum/components/DiscussionComposer';\n\nimport TagDiscussionModal from './components/TagDiscussionModal';\nimport tagsLabel from '../common/helpers/tagsLabel';\n\nexport default function() {\n extend(IndexPage.prototype, 'newDiscussionAction', function(promise) {\n const tag = app.store.getBy('tags', 'slug', this.params().tags);\n\n if (tag) {\n const parent = tag.parent();\n const tags = parent ? [parent, tag] : [tag];\n promise.then(component => component.tags = tags);\n }\n });\n\n // Add tag-selection abilities to the discussion composer.\n DiscussionComposer.prototype.tags = [];\n DiscussionComposer.prototype.chooseTags = function() {\n app.modal.show(\n new TagDiscussionModal({\n selectedTags: this.tags.slice(0),\n onsubmit: tags => {\n this.tags = tags;\n this.$('textarea').focus();\n }\n })\n );\n };\n\n // Add a tag-selection menu to the discussion composer's header, after the\n // title.\n extend(DiscussionComposer.prototype, 'headerItems', function(items) {\n items.add('tags', (\n \n {this.tags.length\n ? tagsLabel(this.tags)\n : {app.translator.trans('flarum-tags.forum.composer_discussion.choose_tags_link')} }\n \n ), 10);\n });\n\n override(DiscussionComposer.prototype, 'onsubmit', function(original) {\n const chosenTags = this.tags;\n const chosenPrimaryTags = chosenTags.filter(tag => tag.position() !== null && !tag.isChild());\n const chosenSecondaryTags = chosenTags.filter(tag => tag.position() === null);\n if (!chosenTags.length\n || (chosenPrimaryTags.length < app.forum.attribute('minPrimaryTags'))\n || (chosenSecondaryTags.length < app.forum.attribute('minSecondaryTags'))) {\n app.modal.show(\n new TagDiscussionModal({\n selectedTags: chosenTags,\n onsubmit: tags => {\n this.tags = tags;\n original();\n }\n })\n );\n } else {\n original();\n }\n });\n\n // Add the selected tags as data to submit to the server.\n extend(DiscussionComposer.prototype, 'data', function(data) {\n data.relationships = data.relationships || {};\n data.relationships.tags = this.tags;\n });\n}\n","import compat from '../common/compat';\n\nimport addTagFilter from './addTagFilter';\nimport addTagControl from './addTagControl';\nimport TagHero from './components/TagHero';\nimport TagDiscussionModal from './components/TagDiscussionModal';\nimport TagsPage from './components/TagsPage';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\nimport TagLinkButton from './components/TagLinkButton';\nimport addTagList from './addTagList';\nimport addTagLabels from './addTagLabels';\nimport addTagComposer from './addTagComposer';\n\nexport default Object.assign(compat, {\n 'tags/addTagFilter': addTagFilter,\n 'tags/addTagControl': addTagControl,\n 'tags/components/TagHero': TagHero,\n 'tags/components/TagDiscussionModal': TagDiscussionModal,\n 'tags/components/TagsPage': TagsPage,\n 'tags/components/DiscussionTaggedPost': DiscussionTaggedPost,\n 'tags/components/TagLinkButton': TagLinkButton,\n 'tags/addTagList': addTagList,\n 'tags/addTagLabels': addTagLabels,\n 'tags/addTagComposer': addTagComposer,\n});\n","import Model from 'flarum/Model';\nimport Discussion from 'flarum/models/Discussion';\nimport IndexPage from 'flarum/components/IndexPage';\n\nimport Tag from '../common/models/Tag';\nimport TagsPage from './components/TagsPage';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\n\nimport addTagList from './addTagList';\nimport addTagFilter from './addTagFilter';\nimport addTagLabels from './addTagLabels';\nimport addTagControl from './addTagControl';\nimport addTagComposer from './addTagComposer';\n\napp.initializers.add('flarum-tags', function(app) {\n app.routes.tags = {path: '/tags', component: TagsPage.component()};\n app.routes.tag = {path: '/t/:tags', component: IndexPage.component()};\n\n app.route.tag = tag => app.route('tag', {tags: tag.slug()});\n\n app.postComponents.discussionTagged = DiscussionTaggedPost;\n\n app.store.models.tags = Tag;\n\n Discussion.prototype.tags = Model.hasMany('tags');\n Discussion.prototype.canTag = Model.attribute('canTag');\n\n addTagList();\n addTagFilter();\n addTagLabels();\n addTagControl();\n addTagComposer();\n});\n\n\n// Expose compat API\nimport tagsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, tagsCompat);","module.exports = flarum.core.compat['helpers/listItems'];","module.exports = flarum.core.compat['helpers/humanTime'];","module.exports = flarum.core.compat['components/EventPost'];","module.exports = flarum.core.compat['components/Separator'];","module.exports = flarum.core.compat['components/DiscussionList'];","module.exports = flarum.core.compat['Component'];","module.exports = flarum.core.compat['components/DiscussionListItem'];","module.exports = flarum.core.compat['utils/DiscussionControls'];","module.exports = flarum.core.compat['helpers/highlight'];","module.exports = flarum.core.compat['utils/classList'];","module.exports = flarum.core.compat['utils/extractText'];","module.exports = flarum.core.compat['utils/KeyboardNavigatable'];","/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner \n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nexport * from './src/common';\nexport * from './src/forum';\n"],"sourceRoot":""}
\ No newline at end of file