diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 3b7bf1f..3fdd343 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,IACzBH,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,+B,aCGxDC,IAAIC,aAAaC,IAAI,gCAAgC,WACnDF,IAAIG,cAAa,IACV,yBACJC,iBAAgB,kBAAMC,EAAA,UAAQC,MAAM,qBAAqBN,IAAIO,WAAWC,MAAM,4CAAqD,GAAE,IACrIJ,gBACC,CACEK,QAAS,sCACTC,MAAOV,IAAIO,WAAWC,MAAM,oDAC5BG,KAAM,UAER,GAEDP,iBAAgB,kBAAMC,EAAA,UAAQC,MAAM,qBAAqBN,IAAIO,WAAWC,MAAM,+CAAwD,IACtIJ,gBAAgB,CACfK,QAAS,0CACTC,MAAOV,IAAIO,WAAWC,MAAM,wDAC5BI,KAAMZ,IAAIO,WAAWC,MAAM,sDAC3BG,KAAM,WAEPP,gBAAgB,CACfK,QAAS,uCACTC,MAAOV,IAAIO,WAAWC,MAAM,0DAC5BG,KAAM,WAEPP,iBAAgB,kBAAMC,EAAA,UAAQC,MAAM,qBAAqBN,IAAIO,WAAWC,MAAM,uDAAgE,IAC9IJ,gBAAgB,CACfK,QAAS,2CACTC,MAAOV,IAAIO,WAAWC,MAAM,yDAC5BG,KAAM,WAEPP,gBAAgB,CACfK,QAAS,kDACTC,MAAOV,IAAIO,WAAWC,MAAM,gEAC5BG,KAAM,WAEPP,gBAAgB,CACfK,QAAS,4CACTC,MAAOV,IAAIO,WAAWC,MAAM,0DAC5BG,KAAM,WAEPP,gBAAgB,CACfK,QAAS,sDACTC,MAAOV,IAAIO,WAAWC,MAAM,oEAC5BG,KAAM,WAEPP,iBAAgB,kBAAMC,EAAA,UAAQC,MAAM,qBAAqBN,IAAIO,WAAWC,MAAM,sDAA+D,IAC7IJ,gBAAgB,CACfK,QAAS,wCACTC,MAAOV,IAAIO,WAAWC,MAAM,sDAC5BI,KAAMZ,IAAIO,WAAWC,MAAM,oDAC3BG,KAAM,WAEPP,iBAAgB,kBAAMC,EAAA,UAAQC,MAAM,qBAAqBN,IAAIO,WAAWC,MAAM,oDAA6D,IAC3IJ,gBAAgB,CACfK,QAAS,8CACTC,MAAOV,IAAIO,WAAWC,MAAM,4DAC5BI,KAAMZ,IAAIO,WAAWC,MAAM,0DAC3BG,KAAM,YAGVE,EAAAA,EAAAA,QAAOC,IAAAA,UAAsB,iBAAiB,SAACC,GAC7CA,EAAMb,IAAI,aAAc,CACtBc,KAAM,cACNN,MAAOV,IAAIO,WAAWC,MAAM,wDAEhC,GACF,G","sources":["webpack://@askvortsov/flarum-categories/webpack/bootstrap","webpack://@askvortsov/flarum-categories/webpack/runtime/compat get default export","webpack://@askvortsov/flarum-categories/webpack/runtime/define property getters","webpack://@askvortsov/flarum-categories/webpack/runtime/hasOwnProperty shorthand","webpack://@askvortsov/flarum-categories/webpack/runtime/make namespace object","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/extend']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['admin/components/BasicsPage']\"","webpack://@askvortsov/flarum-categories/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/BasicsPage'];","import { extend } from 'flarum/common/extend';\r\nimport BasicsPage from 'flarum/admin/components/BasicsPage';\r\n\r\napp.initializers.add('askvortsov/flarum-categories', () => {\r\n app.extensionData\r\n .for('askvortsov-categories')\r\n .registerSetting(() => {app.translator.trans('askvortsov-categories.admin.headings.nav')}, 10)\r\n .registerSetting(\r\n {\r\n setting: 'askvortsov-categories.keep-tags-nav',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.keep_tags_nav'),\r\n type: 'switch',\r\n },\r\n 9\r\n )\r\n .registerSetting(() => {app.translator.trans('askvortsov-categories.admin.headings.layout')})\r\n .registerSetting({\r\n setting: 'askvortsov-categories.full-page-desktop',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.full_page_desktop'),\r\n help: app.translator.trans('askvortsov-categories.admin.help.full_page_desktop'),\r\n type: 'switch',\r\n })\r\n .registerSetting({\r\n setting: 'askvortsov-categories.compact-mobile',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.compact_mobile_mode'),\r\n type: 'switch',\r\n })\r\n .registerSetting(() => {app.translator.trans('askvortsov-categories.admin.headings.parent_display')})\r\n .registerSetting({\r\n setting: 'askvortsov-categories.parent-remove-icon',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_icon'),\r\n type: 'switch',\r\n })\r\n .registerSetting({\r\n setting: 'askvortsov-categories.parent-remove-description',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_description'),\r\n type: 'switch',\r\n })\r\n .registerSetting({\r\n setting: 'askvortsov-categories.parent-remove-stats',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_stats'),\r\n type: 'switch',\r\n })\r\n .registerSetting({\r\n setting: 'askvortsov-categories.parent-remove-last-discussion',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_last_discussion'),\r\n type: 'switch',\r\n })\r\n .registerSetting(() => {app.translator.trans('askvortsov-categories.admin.headings.child_display')})\r\n .registerSetting({\r\n setting: 'askvortsov-categories.child-bare-icon',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.child_bare_icon'),\r\n help: app.translator.trans('askvortsov-categories.admin.help.child_bare_icon'),\r\n type: 'switch',\r\n })\r\n .registerSetting(() => {app.translator.trans('askvortsov-categories.admin.headings.performance')})\r\n .registerSetting({\r\n setting: 'askvortsov-categories.small-forum-optimized',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.small_forum_optimized'),\r\n help: app.translator.trans('askvortsov-categories.admin.help.small_forum_optimized'),\r\n type: 'switch',\r\n });\r\n\r\n extend(BasicsPage.prototype, 'homePageItems', (items) => {\r\n items.add('categories', {\r\n path: '/categories',\r\n label: app.translator.trans('askvortsov-categories.admin.basics.categories_label'),\r\n });\r\n });\r\n});\r\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","initializers","add","extensionData","registerSetting","m","class","translator","trans","setting","label","type","help","extend","BasicsPage","items","path"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,IACzBH,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,+B,aCGxDC,IAAIC,aAAaC,IAAI,gCAAgC,WACnDF,IAAIG,cAAa,IACV,yBACJC,iBAAgB,kBAAMC,EAAA,UAAQC,MAAM,qBAAqBN,IAAIO,WAAWC,MAAM,4CAAqD,GAAE,IACrIJ,gBACC,CACEK,QAAS,sCACTC,MAAOV,IAAIO,WAAWC,MAAM,oDAC5BG,KAAM,UAER,GAEDP,iBAAgB,kBAAMC,EAAA,UAAQC,MAAM,qBAAqBN,IAAIO,WAAWC,MAAM,+CAAwD,IACtIJ,gBAAgB,CACfK,QAAS,0CACTC,MAAOV,IAAIO,WAAWC,MAAM,wDAC5BI,KAAMZ,IAAIO,WAAWC,MAAM,sDAC3BG,KAAM,WAEPP,gBAAgB,CACfK,QAAS,uCACTC,MAAOV,IAAIO,WAAWC,MAAM,0DAC5BG,KAAM,WAEPP,iBAAgB,kBAAMC,EAAA,UAAQC,MAAM,qBAAqBN,IAAIO,WAAWC,MAAM,uDAAgE,IAC9IJ,gBAAgB,CACfK,QAAS,2CACTC,MAAOV,IAAIO,WAAWC,MAAM,yDAC5BG,KAAM,WAEPP,gBAAgB,CACfK,QAAS,kDACTC,MAAOV,IAAIO,WAAWC,MAAM,gEAC5BG,KAAM,WAEPP,gBAAgB,CACfK,QAAS,4CACTC,MAAOV,IAAIO,WAAWC,MAAM,0DAC5BG,KAAM,WAEPP,gBAAgB,CACfK,QAAS,sDACTC,MAAOV,IAAIO,WAAWC,MAAM,oEAC5BG,KAAM,WAEPP,iBAAgB,kBAAMC,EAAA,UAAQC,MAAM,qBAAqBN,IAAIO,WAAWC,MAAM,sDAA+D,IAC7IJ,gBAAgB,CACfK,QAAS,wCACTC,MAAOV,IAAIO,WAAWC,MAAM,sDAC5BI,KAAMZ,IAAIO,WAAWC,MAAM,oDAC3BG,KAAM,WAEPP,iBAAgB,kBAAMC,EAAA,UAAQC,MAAM,qBAAqBN,IAAIO,WAAWC,MAAM,oDAA6D,IAC3IJ,gBAAgB,CACfK,QAAS,8CACTC,MAAOV,IAAIO,WAAWC,MAAM,4DAC5BI,KAAMZ,IAAIO,WAAWC,MAAM,0DAC3BG,KAAM,YAGVE,EAAAA,EAAAA,QAAOC,IAAAA,UAAsB,iBAAiB,SAACC,GAC7CA,EAAMb,IAAI,aAAc,CACtBc,KAAM,cACNN,MAAOV,IAAIO,WAAWC,MAAM,wDAEhC,GACF,G","sources":["webpack://@askvortsov/flarum-categories/webpack/bootstrap","webpack://@askvortsov/flarum-categories/webpack/runtime/compat get default export","webpack://@askvortsov/flarum-categories/webpack/runtime/define property getters","webpack://@askvortsov/flarum-categories/webpack/runtime/hasOwnProperty shorthand","webpack://@askvortsov/flarum-categories/webpack/runtime/make namespace object","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/extend']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['admin/components/BasicsPage']\"","webpack://@askvortsov/flarum-categories/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/BasicsPage'];","import { extend } from 'flarum/common/extend';\nimport BasicsPage from 'flarum/admin/components/BasicsPage';\n\napp.initializers.add('askvortsov/flarum-categories', () => {\n app.extensionData\n .for('askvortsov-categories')\n .registerSetting(() => {app.translator.trans('askvortsov-categories.admin.headings.nav')}, 10)\n .registerSetting(\n {\n setting: 'askvortsov-categories.keep-tags-nav',\n label: app.translator.trans('askvortsov-categories.admin.labels.keep_tags_nav'),\n type: 'switch',\n },\n 9\n )\n .registerSetting(() => {app.translator.trans('askvortsov-categories.admin.headings.layout')})\n .registerSetting({\n setting: 'askvortsov-categories.full-page-desktop',\n label: app.translator.trans('askvortsov-categories.admin.labels.full_page_desktop'),\n help: app.translator.trans('askvortsov-categories.admin.help.full_page_desktop'),\n type: 'switch',\n })\n .registerSetting({\n setting: 'askvortsov-categories.compact-mobile',\n label: app.translator.trans('askvortsov-categories.admin.labels.compact_mobile_mode'),\n type: 'switch',\n })\n .registerSetting(() => {app.translator.trans('askvortsov-categories.admin.headings.parent_display')})\n .registerSetting({\n setting: 'askvortsov-categories.parent-remove-icon',\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_icon'),\n type: 'switch',\n })\n .registerSetting({\n setting: 'askvortsov-categories.parent-remove-description',\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_description'),\n type: 'switch',\n })\n .registerSetting({\n setting: 'askvortsov-categories.parent-remove-stats',\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_stats'),\n type: 'switch',\n })\n .registerSetting({\n setting: 'askvortsov-categories.parent-remove-last-discussion',\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_last_discussion'),\n type: 'switch',\n })\n .registerSetting(() => {app.translator.trans('askvortsov-categories.admin.headings.child_display')})\n .registerSetting({\n setting: 'askvortsov-categories.child-bare-icon',\n label: app.translator.trans('askvortsov-categories.admin.labels.child_bare_icon'),\n help: app.translator.trans('askvortsov-categories.admin.help.child_bare_icon'),\n type: 'switch',\n })\n .registerSetting(() => {app.translator.trans('askvortsov-categories.admin.headings.performance')})\n .registerSetting({\n setting: 'askvortsov-categories.small-forum-optimized',\n label: app.translator.trans('askvortsov-categories.admin.labels.small_forum_optimized'),\n help: app.translator.trans('askvortsov-categories.admin.help.small_forum_optimized'),\n type: 'switch',\n });\n\n extend(BasicsPage.prototype, 'homePageItems', (items) => {\n items.add('categories', {\n path: '/categories',\n label: app.translator.trans('askvortsov-categories.admin.basics.categories_label'),\n });\n });\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","initializers","add","extensionData","registerSetting","m","class","translator","trans","setting","label","type","help","extend","BasicsPage","items","path"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index ebef0cc..43ba34b 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,uDCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,8B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,gC,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,gB,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,mB,aCAzC,SAASC,EAAgBhB,EAAGiB,GAKzC,OAJAD,EAAkBf,OAAOiB,eAAiBjB,OAAOiB,eAAeC,OAAS,SAAyBnB,EAAGiB,GAEnG,OADAjB,EAAEoB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ources":["webpack://@askvortsov/flarum-categories/webpack/bootstrap","webpack://@askvortsov/flarum-categories/webpack/runtime/compat get default export","webpack://@askvortsov/flarum-categories/webpack/runtime/define property getters","webpack://@askvortsov/flarum-categories/webpack/runtime/hasOwnProperty shorthand","webpack://@askvortsov/flarum-categories/webpack/runtime/make namespace object","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/extend']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/Model']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['tags/models/Tag']\"","webpack://@askvortsov/flarum-categories/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@askvortsov/flarum-categories/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['forum/app']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/components/Page']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['tags/utils/sortTags']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['tags/helpers/tagLabel']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/Component']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/components/Link']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@askvortsov/flarum-categories/./src/forum/components/StatWidget.tsx","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/utils/string']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['forum/components/UserCard']\"","webpack://@askvortsov/flarum-categories/./src/forum/components/LastDiscussionWidget.tsx","webpack://@askvortsov/flarum-categories/./src/forum/components/Category.tsx","webpack://@askvortsov/flarum-categories/./src/forum/components/CategoriesPage.tsx","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['tags/forum/components/TagsPage']\"","webpack://@askvortsov/flarum-categories/./src/forum/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/models/Tag'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/utils/sortTags'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/helpers/tagLabel'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","import Component from 'flarum/common/Component';\r\nimport icon from 'flarum/common/helpers/icon';\r\nimport ItemList from 'flarum/common/utils/ItemList';\r\nimport classList from 'flarum/common/utils/classList';\r\nimport app from 'flarum/forum/app';\r\n\r\nimport type Mithril from 'mithril';\r\n\r\ninterface Attrs {\r\n count: number;\r\n icon: string;\r\n label: Mithril.Children;\r\n}\r\n\r\nexport default class StatWidget extends Component {\r\n view() {\r\n return (\r\n
\r\n {this.content().toArray()}\r\n
\r\n );\r\n }\r\n\r\n content() {\r\n const items = new ItemList();\r\n\r\n items.add('count',
{this.attrs.count}
, 100);\r\n items.add(\r\n 'label',\r\n
\r\n {icon(this.attrs.icon)}\r\n {this.attrs.label}\r\n
,\r\n 80\r\n );\r\n\r\n return items;\r\n }\r\n}\r\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/string'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserCard'];","import app from 'flarum/forum/app';\r\nimport Component from 'flarum/common/Component';\r\nimport avatar from 'flarum/common/helpers/avatar';\r\nimport username from 'flarum/common/helpers/username';\r\nimport humanTime from 'flarum/common/helpers/humanTime';\r\nimport { truncate } from 'flarum/common/utils/string';\r\nimport Link from 'flarum/common/components/Link';\r\nimport UserCard from 'flarum/forum/components/UserCard';\r\nimport type Discussion from 'flarum/common/models/Discussion';\r\nimport ItemList from 'flarum/common/utils/ItemList';\r\nimport extractText from 'flarum/common/utils/extractText';\r\nimport type Mithril from 'mithril';\r\n\r\ninterface Attrs {\r\n discussion: Discussion;\r\n}\r\n\r\nexport default class LastDiscussionWidget extends Component {\r\n /**\r\n * Whether or not the user hover card is visible.\r\n */\r\n cardVisible!: boolean;\r\n\r\n oninit(vnode) {\r\n super.oninit(vnode);\r\n\r\n this.cardVisible = false;\r\n }\r\n\r\n view() {\r\n const discussion = this.attrs.discussion;\r\n\r\n if (!discussion) {\r\n return
{app.translator.trans('askvortsov-categories.forum.last_discussion_widget.no_discussions')}
;\r\n }\r\n\r\n const user = discussion.lastPostedUser();\r\n\r\n return (\r\n \r\n {this.content().toArray()}\r\n \r\n );\r\n }\r\n\r\n content() {\r\n const items = new ItemList();\r\n\r\n const discussion = this.attrs.discussion;\r\n const user = discussion.lastPostedUser();\r\n\r\n items.add(\r\n 'avatar',\r\n \r\n {!!user && avatar(user)}\r\n ,\r\n 100\r\n );\r\n\r\n items.add(\r\n 'mainContent',\r\n
\r\n
\r\n {humanTime(discussion.lastPostedAt()!)}{' '}\r\n \r\n \r\n |\r\n \r\n {username(user)}\r\n \r\n
\r\n
{truncate(discussion.title(), 26)}
\r\n
,\r\n 50\r\n );\r\n\r\n let card: Mithril.Children = null;\r\n\r\n if (user && this.cardVisible) {\r\n card = UserCard.component({\r\n user,\r\n className: 'UserCard--popover',\r\n controlsButtonClassName: 'Button Button--icon Button--flat',\r\n });\r\n }\r\n\r\n items.add('card',
{card}
, 10);\r\n\r\n return items;\r\n }\r\n\r\n oncreate(vnode) {\r\n super.oncreate(vnode);\r\n\r\n let timeout: number;\r\n\r\n this.$()\r\n .on('mouseover', '.LastDiscussion-avatar, .LastDiscussion-usernameLinkUserCard, .username, .UserCard', () => {\r\n clearTimeout(timeout);\r\n timeout = window.setTimeout(this.showCard.bind(this), 300);\r\n })\r\n .on('mouseout', '.LastDiscussion-avatar, .LastDiscussion-usernameLinkUserCard, .username, .UserCard', () => {\r\n clearTimeout(timeout);\r\n timeout = window.setTimeout(this.hideCard.bind(this), 150);\r\n });\r\n }\r\n\r\n onremove(vnode): void {\r\n super.onremove(vnode);\r\n\r\n this.$().off('mouseover mouseout');\r\n }\r\n\r\n /**\r\n * Show the user card.\r\n */\r\n showCard() {\r\n this.cardVisible = true;\r\n\r\n m.redraw();\r\n\r\n setTimeout(() => this.$('.UserCard').addClass('in'));\r\n }\r\n\r\n /**\r\n * Hide the user card.\r\n */\r\n hideCard() {\r\n $('.UserCard').removeClass('in');\r\n this.cardVisible = false;\r\n m.redraw();\r\n }\r\n}\r\n","import Component from 'flarum/common/Component';\r\nimport Link from 'flarum/common/components/Link';\r\n\r\nimport icon from 'flarum/common/helpers/icon';\r\nimport ItemList from 'flarum/common/utils/ItemList';\r\nimport sortTags from 'flarum/tags/utils/sortTags';\r\n\r\nimport StatWidget from './StatWidget';\r\nimport LastDiscussionWidget from './LastDiscussionWidget';\r\nimport app from 'flarum/forum/app';\r\nimport classList from 'flarum/common/utils/classList';\r\n\r\nimport type Mithril from 'mithril';\r\n\r\ninterface Attrs {\r\n model: any;\r\n parent: any;\r\n}\r\n\r\n/*\r\n * Provide compatibility for Flarum Tag Passwords extension, this is to ensure that locked tag with Password or Group permission has view restriction on latest discussion.\r\n * To know if a tag is protected, there is an isUnlocked variable that is specific for this extension.\r\n * https://github.com/datlechin/flarum-tag-passwords\r\n * \r\n */\r\ninterface TagLocked {\r\n icon: icon;\r\n text: string;\r\n isVisible: boolean;\r\n}\r\n\r\nexport default class Category extends Component {\r\n tag!: any;\r\n isChild!: boolean;\r\n collapsed!: boolean;\r\n compactMobileMode!: boolean;\r\n tagLocked!: TagLocked;\r\n\r\n oninit(vnode) {\r\n super.oninit(vnode);\r\n\r\n this.tag = this.attrs.model;\r\n\r\n this.isChild = this.attrs.parent != null && this.attrs.parent != undefined;\r\n\r\n this.collapsed = false;\r\n\r\n // Identify if the tag has been Goup or Password protected with flarum-tag-passwords extension.\r\n if (typeof this.tag.isUnlocked == 'function') {\r\n if ((this.tag.isGroupProtected() || this.tag.isPasswordProtected()) && !this.tag.isUnlocked()) {\r\n this.tagLocked = {\r\n icon: this.tag.isPasswordProtected() ? icon('fas fa-lock') : icon('fas fa-user-lock'),\r\n text: this.tag.isPasswordProtected() ? app.translator.trans('datlechin-tag-passwords.forum.tags_page.password_protected') : app.translator.trans('datlechin-tag-passwords.forum.tags_page.group_protected'),\r\n isVisible: this.tag.isProtectedTagDisplayedForTagsPage() == true\r\n };\r\n }\r\n }\r\n\r\n window.addEventListener('resize', function () {\r\n m.redraw();\r\n });\r\n }\r\n\r\n view() {\r\n const tag = this.tag;\r\n\r\n if (!tag) {\r\n return null;\r\n } else if (this.tagLocked && !this.tagLocked.isVisible) {\r\n // Hide the navigation when protected Tag in 'Tag Passwords > Display protected Tag in Tags page navigation' is disabled\r\n return null;\r\n }\r\n\r\n this.compactMobileMode = !!app.forum.attribute('categories.compactMobile');\r\n\r\n return (\r\n \r\n {this.categoryItems().toArray()}\r\n \r\n );\r\n }\r\n\r\n categoryItems() {\r\n const items = new ItemList();\r\n const tag = this.tag;\r\n\r\n const children = this.isChild ? [] : sortTags(tag.children() || []);\r\n\r\n items.add(\r\n 'link',\r\n \r\n {this.contentItems().toArray()}\r\n ,\r\n 100\r\n );\r\n\r\n if (!this.compactMobileMode && !this.isChild) {\r\n items.add(\r\n 'children',\r\n
    {children.map((child) => [Category.component({ model: child, parent: this })])}
,\r\n 10\r\n );\r\n }\r\n\r\n return items;\r\n }\r\n\r\n contentItems() {\r\n const items = new ItemList();\r\n\r\n const tag = this.tag;\r\n const children = this.isChild ? [] : sortTags(tag.children() || []);\r\n\r\n items.add('alignStart',
{this.alignStartItems().toArray()}
, 100);\r\n\r\n items.add('alignEnd',
{this.alignEndItems().toArray()}
, 50);\r\n\r\n const childrenInContent = !this.isChild && this.compactMobileMode;\r\n\r\n if (childrenInContent && !this.collapsed) {\r\n items.add(\r\n 'children',\r\n
    {children.map((child) => [Category.component({ model: child, parent: this })])}
,\r\n 10\r\n );\r\n }\r\n\r\n return items;\r\n }\r\n\r\n alignStartItems() {\r\n const items = new ItemList();\r\n\r\n const tag = this.tag;\r\n const children = this.isChild ? [] : sortTags(tag.children() || []);\r\n\r\n items.add('icon', {this.iconItems().toArray()}, 100);\r\n\r\n items.add('main',
{this.mainItems().toArray()}
, 50);\r\n\r\n if (!!children.length) {\r\n items.add(\r\n 'toggleArrow',\r\n {\r\n this.toggleArrow(e);\r\n }}\r\n >\r\n {icon(this.collapsed ? 'fas fa-caret-down' : 'fas fa-caret-up')}\r\n ,\r\n 10\r\n );\r\n }\r\n\r\n return items;\r\n }\r\n\r\n alignEndItems() {\r\n const items = new ItemList();\r\n\r\n if (this.tagLocked) {\r\n items.add('locked',
{this.lockedItems().toArray()}
, 100);\r\n return items;\r\n }\r\n\r\n const tag = this.tag;\r\n\r\n items.add('stats',
{this.statItems().toArray()}
, 100);\r\n\r\n items.add(\r\n 'lastDiscussion',\r\n
{this.lastDiscussionItems().toArray()}
,\r\n 50\r\n );\r\n\r\n return items;\r\n }\r\n\r\n lockedItems() {\r\n const items = new ItemList();\r\n const classes = this.compactMobileMode ? 'fa-stack fa-1x' : 'fa-stack fa-2x';\r\n items.add(\r\n 'icon',\r\n \r\n {\r\n \r\n }\r\n {this.tagLocked.icon}\r\n ,\r\n 10\r\n );\r\n items.add(\r\n 'LockedText',\r\n
{this.tagLocked.text}
,\r\n 50\r\n );\r\n return items;\r\n }\r\n\r\n iconItems() {\r\n const items = new ItemList();\r\n\r\n if (this.tag.icon() && this.isChild) {\r\n const style: Record = {};\r\n\r\n let iconClasses = 'fa-stack-1x CategoryIcon';\r\n\r\n if (app.forum.attribute('categories.childBareIcon')) {\r\n iconClasses += ' NoBackgroundCategoryIcon';\r\n style.color = '#fafafa';\r\n } else {\r\n style.color = this.tag.color();\r\n }\r\n\r\n const classes = this.compactMobileMode ? 'fa-stack fa-1x' : 'fa-stack fa-2x';\r\n\r\n items.add(\r\n 'icon',\r\n \r\n {!!app.forum.attribute('categories.childBareIcon') && (\r\n \r\n )}\r\n {icon(this.tag.icon(), { className: iconClasses, style: style })}\r\n ,\r\n 10\r\n );\r\n } else if (this.tag.icon() && !app.forum.attribute('categories.parentRemoveIcon')) {\r\n const classes = this.compactMobileMode ? 'fa-stack fa-2x' : 'fa-stack fa-3x';\r\n\r\n items.add('icon', {icon(this.tag.icon(), { className: 'fa-stack-1x CategoryIcon' })}, 10);\r\n }\r\n\r\n return items;\r\n }\r\n\r\n mainItems() {\r\n const items = new ItemList();\r\n\r\n items.add('name',

{this.tag.name()}

, 15);\r\n\r\n if (this.tag.description() && (this.isChild || !app.forum.attribute('categories.parentRemoveDescription'))) {\r\n items.add('description',
{this.tag.description()}
, 10);\r\n }\r\n\r\n return items;\r\n }\r\n\r\n statItems() {\r\n const items = new ItemList();\r\n\r\n if (this.isChild || !app.forum.attribute('categories.parentRemoveStats')) {\r\n items.add(\r\n 'discussionCount',\r\n StatWidget.component({\r\n count: Intl.NumberFormat().format(this.tag.discussionCount()),\r\n label: app.translator.trans('askvortsov-categories.forum.stat-widgets.discussion_label'),\r\n icon: 'fas fa-file-alt',\r\n }),\r\n 15\r\n );\r\n\r\n items.add(\r\n 'postCount',\r\n StatWidget.component({\r\n count: Intl.NumberFormat().format(this.tag.postCount()),\r\n label: app.translator.trans('askvortsov-categories.forum.stat-widgets.post_label'),\r\n icon: 'fas fa-comment',\r\n }),\r\n 10\r\n );\r\n }\r\n\r\n return items;\r\n }\r\n\r\n lastDiscussionItems() {\r\n const items = new ItemList();\r\n\r\n if (this.isChild || !app.forum.attribute('categories.parentRemoveLastDiscussion')) {\r\n items.add(\r\n 'lastDiscussion',\r\n LastDiscussionWidget.component({\r\n discussion: this.tag.lastPostedDiscussion(),\r\n }),\r\n 10\r\n );\r\n }\r\n\r\n return items;\r\n }\r\n\r\n oncreate(vnode) {\r\n super.oncreate(vnode);\r\n\r\n this.$('.TagCategory-content,.TagCategory-toggleArrow').on('mouseenter', function (e) {\r\n $(this).addClass('hover');\r\n if ($(this).parent().hasClass('SubCategory') || $(this).hasClass('TagCategory-toggleArrow')) {\r\n $(this).closest('.ParentCategory').children('.TagCategory-content').removeClass('hover');\r\n }\r\n });\r\n\r\n this.$('.TagCategory-content,.TagCategory-toggleArrow').on('mouseleave', function (e) {\r\n $(this).removeClass('hover');\r\n if ($(this).parent().hasClass('SubCategory') || $(this).hasClass('TagCategory-toggleArrow')) {\r\n $(this).closest('.ParentCategory').children('.TagCategory-content').addClass('hover');\r\n }\r\n });\r\n }\r\n\r\n onremove(vnode: Mithril.VnodeDOM): void {\r\n super.onremove(vnode);\r\n\r\n this.$('.TagCategory-content,.TagCategory-toggleArrow').off('mouseenter');\r\n this.$('.TagCategory-content,.TagCategory-toggleArrow').off('mouseleave');\r\n }\r\n\r\n toggleArrow(e: MouseEvent) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.collapsed = !this.collapsed;\r\n m.redraw();\r\n }\r\n}\r\n","import app from 'flarum/forum/app';\r\nimport Page from 'flarum/common/components/Page';\r\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\r\nimport IndexPage from 'flarum/forum/components/IndexPage';\r\nimport listItems from 'flarum/common/helpers/listItems';\r\nimport ItemList from 'flarum/common/utils/ItemList';\r\nimport extractText from 'flarum/common/utils/extractText';\r\nimport classList from 'flarum/common/utils/classList';\r\n\r\nimport sortTags from 'flarum/tags/utils/sortTags';\r\nimport tagLabel from 'flarum/tags/helpers/tagLabel';\r\n\r\nimport Category from './Category';\r\n\r\nexport default class CategoriesPage extends Page {\r\n tags!: any[];\r\n loading!: boolean;\r\n\r\n oninit(vnode) {\r\n super.oninit(vnode);\r\n\r\n app.history.push('categories', extractText(app.translator.trans('askvortsov-category.forum.header.back_to_categories_tooltip')));\r\n\r\n this.tags = [];\r\n\r\n const preloaded = app.preloadedApiDocument();\r\n\r\n if (preloaded) {\r\n this.tags = sortTags(preloaded.filter((tag: any) => !tag.isChild()));\r\n return;\r\n }\r\n\r\n this.loading = true;\r\n\r\n app.tagList.load(['parent', 'children', 'lastPostedDiscussion', 'lastPostedDiscussion.lastPostedUser']).then(() => {\r\n this.tags = sortTags(app.store.all('tags').filter((tag) => !tag.isChild()));\r\n\r\n this.loading = false;\r\n\r\n m.redraw();\r\n });\r\n }\r\n\r\n view() {\r\n if (this.loading) {\r\n return ;\r\n }\r\n\r\n const classes = ['CategoriesPage'];\r\n\r\n return
{this.pageItems().toArray()}
;\r\n }\r\n\r\n pageItems() {\r\n const items = new ItemList();\r\n\r\n items.add('hero', IndexPage.prototype.hero(), 100);\r\n\r\n items.add(\r\n 'container',\r\n
\r\n {this.containerItems().toArray()}\r\n
,\r\n 50\r\n );\r\n\r\n return items;\r\n }\r\n\r\n containerItems() {\r\n const items = new ItemList();\r\n\r\n const pinned = this.tags.filter((tag) => tag.position() !== null);\r\n const cloud = this.tags.filter((tag) => tag.position() === null);\r\n\r\n items.add(\r\n 'sideNav',\r\n ,\r\n 100\r\n );\r\n\r\n items.add(\r\n 'categoriesList',\r\n
\r\n
    \r\n {pinned.map((tag) => {\r\n return Category.component({ model: tag });\r\n })}\r\n
\r\n\r\n {cloud.length ?
{cloud.map((tag) => [tagLabel(tag, { link: true }), ' '])}
: ''}\r\n
,\r\n 50\r\n );\r\n\r\n return items;\r\n }\r\n\r\n oncreate(vnode) {\r\n super.oncreate(vnode);\r\n\r\n app.setTitle(extractText(app.translator.trans('askvortsov-categories.forum.all_categories.meta_title_text')));\r\n }\r\n}\r\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/forum/components/TagsPage'];","import { extend } from 'flarum/common/extend';\r\nimport IndexPage from 'flarum/forum/components/IndexPage';\r\nimport LinkButton from 'flarum/common/components/LinkButton';\r\nimport Model from 'flarum/common/Model';\r\nimport Tag from 'flarum/tags/models/Tag';\r\nimport CategoriesPage from './components/CategoriesPage';\r\nimport TagsPage from 'flarum/tags/forum/components/TagsPage';\r\nimport Category from './components/Category';\r\nimport LastDiscussionWidget from './components/LastDiscussionWidget';\r\nimport StatWidget from './components/StatWidget';\r\n\r\nfunction pruneIndexNav(items, func) {\r\n const isTagsPageVisible = app.forum.attribute('categories.keepTagsNav');\r\n\r\n const isCustomTagsHidden = (app.current.matches(CategoriesPage) || app.current.matches(TagsPage));\r\n for (const item in items.items) {\r\n if (func(item)) {\r\n if(item == 'tags') {\r\n /*\r\n * Tags must be visible on the navibation bar, when the User has selected to keep Tags within the Extension Settings.\r\n * Finding all items that begins with 'tag' will also load 'tags', due to custom tag are labelled 'tag1', 'tag2' and so-on\r\n */\r\n if (!isTagsPageVisible) {\r\n items.remove(item);\r\n }\r\n } else {\r\n /*\r\n * This is for custom tags, where they should not be visible within CategoriesPage and TagsPage\r\n */\r\n if (isCustomTagsHidden) {\r\n items.remove(item);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\napp.initializers.add('askvortsov/flarum-categories', () => {\r\n app.routes.categories = {\r\n path: '/categories',\r\n component: CategoriesPage,\r\n };\r\n\r\n Tag.prototype.postCount = Model.attribute('postCount');\r\n\r\n extend(IndexPage.prototype, 'navItems', function (items) {\r\n items.add(\r\n 'categories',\r\n \r\n {app.translator.trans('askvortsov-categories.forum.index.categories_link')}\r\n ,\r\n -9.5\r\n );\r\n\r\n if (items.has('moreTags')) {\r\n items.replace('moreTags', {app.translator.trans('flarum-tags.forum.index.more_link')});\r\n }\r\n\r\n pruneIndexNav(items, (item) => item.startsWith('tag'));\r\n\r\n return items;\r\n });\r\n\r\n extend(IndexPage.prototype, 'sidebarItems', function (items) {\r\n pruneIndexNav(items, (item) => item !== 'newDiscussion' && item !== 'nav');\r\n return items;\r\n });\r\n});\r\n\r\nexport default {\r\n 'components/CategoriesPage': CategoriesPage,\r\n 'components/Category': Category,\r\n 'components/LastDiscussionWidget': LastDiscussionWidget,\r\n 'components/StatWidget': StatWidget,\r\n};\r\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","StatWidget","_Component","apply","arguments","_proto","view","m","class","classList","app","this","content","toArray","items","ItemList","add","attrs","count","className","icon","label","Component","LastDiscussionWidget","_this","_len","length","args","Array","_key","concat","cardVisible","oninit","vnode","_discussion$lastPostN","discussion","lastPostedUser","Link","href","lastPostNumber","user","extractText","username","avatar","humanTime","lastPostedAt","style","display","margin","role","truncate","title","card","UserCard","controlsButtonClassName","oncreate","timeout","_this2","$","on","clearTimeout","window","setTimeout","showCard","hideCard","onremove","off","_this3","redraw","addClass","removeClass","Category","tag","isChild","collapsed","compactMobileMode","tagLocked","model","parent","undefined","isUnlocked","isGroupProtected","isPasswordProtected","text","isVisible","isProtectedTagDisplayedForTagsPage","addEventListener","slug","SubCategory","ParentCategory","compactMobile","categoryItems","children","sortTags","backgroundColor","color","contentItems","map","child","component","alignStartItems","alignEndItems","_this4","iconItems","mainItems","onclick","e","toggleArrow","lockedItems","statItems","empty","lastPostedDiscussion","lastDiscussionItems","classes","iconClasses","name","description","Intl","NumberFormat","format","discussionCount","postCount","hasClass","closest","preventDefault","stopPropagation","CategoriesPage","_Page","tags","loading","preloaded","filter","then","LoadingIndicator","pageItems","IndexPage","containerItems","pinned","position","cloud","listItems","tagLabel","link","Page","pruneIndexNav","func","isTagsPageVisible","forum","attribute","isCustomTagsHidden","current","matches","TagsPage","item","remove","initializers","routes","categories","path","Tag","Model","extend","LinkButton","route","translator","trans","has","replace","startsWith"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,uDCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iB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AG7FrB,GAAclI,GAAO,SAAC2I,GAAI,OAAKA,EAAKe,WAAW,MAAM,IAE9C1J,CACT,KAEAmJ,EAAAA,EAAAA,QAAO1B,IAAAA,UAAqB,gBAAgB,SAAUzH,GAEpD,OADAkI,GAAclI,GAAO,SAAC2I,GAAI,MAAc,kBAATA,GAAqC,QAATA,CAAc,IAClE3I,CACT,GACF,IAEA,UACE,4BAA6BgH,EAC7B,sBAAuBvD,EACvB,kCAAmChD,EACnC,wBAAyBtB,E","sources":["webpack://@askvortsov/flarum-categories/webpack/bootstrap","webpack://@askvortsov/flarum-categories/webpack/runtime/compat get default export","webpack://@askvortsov/flarum-categories/webpack/runtime/define property getters","webpack://@askvortsov/flarum-categories/webpack/runtime/hasOwnProperty shorthand","webpack://@askvortsov/flarum-categories/webpack/runtime/make namespace object","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/extend']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/Model']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['tags/models/Tag']\"","webpack://@askvortsov/flarum-categories/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@askvortsov/flarum-categories/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['forum/app']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/components/Page']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['tags/utils/sortTags']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['tags/helpers/tagLabel']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/Component']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/components/Link']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@askvortsov/flarum-categories/./src/forum/components/StatWidget.tsx","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['common/utils/string']\"","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['forum/components/UserCard']\"","webpack://@askvortsov/flarum-categories/./src/forum/components/LastDiscussionWidget.tsx","webpack://@askvortsov/flarum-categories/./src/forum/components/Category.tsx","webpack://@askvortsov/flarum-categories/./src/forum/components/CategoriesPage.tsx","webpack://@askvortsov/flarum-categories/external root \"flarum.core.compat['tags/forum/components/TagsPage']\"","webpack://@askvortsov/flarum-categories/./src/forum/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/models/Tag'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/utils/sortTags'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/helpers/tagLabel'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport classList from 'flarum/common/utils/classList';\nimport app from 'flarum/forum/app';\n\nimport type Mithril from 'mithril';\n\ninterface Attrs {\n count: number;\n icon: string;\n label: Mithril.Children;\n}\n\nexport default class StatWidget extends Component {\n view() {\n return (\n
\n {this.content().toArray()}\n
\n );\n }\n\n content() {\n const items = new ItemList();\n\n items.add('count',
{this.attrs.count}
, 100);\n items.add(\n 'label',\n
\n {icon(this.attrs.icon)}\n {this.attrs.label}\n
,\n 80\n );\n\n return items;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/string'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserCard'];","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport { truncate } from 'flarum/common/utils/string';\nimport Link from 'flarum/common/components/Link';\nimport UserCard from 'flarum/forum/components/UserCard';\nimport type Discussion from 'flarum/common/models/Discussion';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport extractText from 'flarum/common/utils/extractText';\nimport type Mithril from 'mithril';\n\ninterface Attrs {\n discussion: Discussion;\n}\n\nexport default class LastDiscussionWidget extends Component {\n /**\n * Whether or not the user hover card is visible.\n */\n cardVisible!: boolean;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n this.cardVisible = false;\n }\n\n view() {\n const discussion = this.attrs.discussion;\n\n if (!discussion) {\n return
{app.translator.trans('askvortsov-categories.forum.last_discussion_widget.no_discussions')}
;\n }\n\n const user = discussion.lastPostedUser();\n\n return (\n \n {this.content().toArray()}\n \n );\n }\n\n content() {\n const items = new ItemList();\n\n const discussion = this.attrs.discussion;\n const user = discussion.lastPostedUser();\n\n items.add(\n 'avatar',\n \n {!!user && avatar(user)}\n ,\n 100\n );\n\n items.add(\n 'mainContent',\n
\n
\n {humanTime(discussion.lastPostedAt()!)}{' '}\n \n \n |\n \n {username(user)}\n \n
\n
{truncate(discussion.title(), 26)}
\n
,\n 50\n );\n\n let card: Mithril.Children = null;\n\n if (user && this.cardVisible) {\n card = UserCard.component({\n user,\n className: 'UserCard--popover',\n controlsButtonClassName: 'Button Button--icon Button--flat',\n });\n }\n\n items.add('card',
{card}
, 10);\n\n return items;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n let timeout: number;\n\n this.$()\n .on('mouseover', '.LastDiscussion-avatar, .LastDiscussion-usernameLinkUserCard, .username, .UserCard', () => {\n clearTimeout(timeout);\n timeout = window.setTimeout(this.showCard.bind(this), 300);\n })\n .on('mouseout', '.LastDiscussion-avatar, .LastDiscussion-usernameLinkUserCard, .username, .UserCard', () => {\n clearTimeout(timeout);\n timeout = window.setTimeout(this.hideCard.bind(this), 150);\n });\n }\n\n onremove(vnode): void {\n super.onremove(vnode);\n\n this.$().off('mouseover mouseout');\n }\n\n /**\n * Show the user card.\n */\n showCard() {\n this.cardVisible = true;\n\n m.redraw();\n\n setTimeout(() => this.$('.UserCard').addClass('in'));\n }\n\n /**\n * Hide the user card.\n */\n hideCard() {\n $('.UserCard').removeClass('in');\n this.cardVisible = false;\n m.redraw();\n }\n}\n","import Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\n\nimport icon from 'flarum/common/helpers/icon';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport sortTags from 'flarum/tags/utils/sortTags';\n\nimport StatWidget from './StatWidget';\nimport LastDiscussionWidget from './LastDiscussionWidget';\nimport app from 'flarum/forum/app';\nimport classList from 'flarum/common/utils/classList';\n\nimport type Mithril from 'mithril';\n\ninterface Attrs {\n model: any;\n parent: any;\n}\n\n/*\n * Provide compatibility for Flarum Tag Passwords extension, this is to ensure that locked tag with Password or Group permission has view restriction on latest discussion.\n * To know if a tag is protected, there is an isUnlocked variable that is specific for this extension.\n * https://github.com/datlechin/flarum-tag-passwords\n * \n */\ninterface TagLocked {\n icon: icon;\n text: string;\n isVisible: boolean;\n}\n\nexport default class Category extends Component {\n tag!: any;\n isChild!: boolean;\n collapsed!: boolean;\n compactMobileMode!: boolean;\n tagLocked!: TagLocked;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n this.tag = this.attrs.model;\n\n this.isChild = this.attrs.parent != null && this.attrs.parent != undefined;\n\n this.collapsed = false;\n\n // Identify if the tag has been Goup or Password protected with flarum-tag-passwords extension.\n if (typeof this.tag.isUnlocked == 'function') {\n if ((this.tag.isGroupProtected() || this.tag.isPasswordProtected()) && !this.tag.isUnlocked()) {\n this.tagLocked = {\n icon: this.tag.isPasswordProtected() ? icon('fas fa-lock') : icon('fas fa-user-lock'),\n text: this.tag.isPasswordProtected() ? app.translator.trans('datlechin-tag-passwords.forum.tags_page.password_protected') : app.translator.trans('datlechin-tag-passwords.forum.tags_page.group_protected'),\n isVisible: this.tag.isProtectedTagDisplayedForTagsPage() == true\n };\n }\n }\n\n window.addEventListener('resize', function () {\n m.redraw();\n });\n }\n\n view() {\n const tag = this.tag;\n\n if (!tag) {\n return null;\n } else if (this.tagLocked && !this.tagLocked.isVisible) {\n // Hide the navigation when protected Tag in 'Tag Passwords > Display protected Tag in Tags page navigation' is disabled\n return null;\n }\n\n this.compactMobileMode = !!app.forum.attribute('categories.compactMobile');\n\n return (\n \n {this.categoryItems().toArray()}\n \n );\n }\n\n categoryItems() {\n const items = new ItemList();\n const tag = this.tag;\n\n const children = this.isChild ? [] : sortTags(tag.children() || []);\n\n items.add(\n 'link',\n \n {this.contentItems().toArray()}\n ,\n 100\n );\n\n if (!this.compactMobileMode && !this.isChild) {\n items.add(\n 'children',\n
    {children.map((child) => [Category.component({ model: child, parent: this })])}
,\n 10\n );\n }\n\n return items;\n }\n\n contentItems() {\n const items = new ItemList();\n\n const tag = this.tag;\n const children = this.isChild ? [] : sortTags(tag.children() || []);\n\n items.add('alignStart',
{this.alignStartItems().toArray()}
, 100);\n\n items.add('alignEnd',
{this.alignEndItems().toArray()}
, 50);\n\n const childrenInContent = !this.isChild && this.compactMobileMode;\n\n if (childrenInContent && !this.collapsed) {\n items.add(\n 'children',\n
    {children.map((child) => [Category.component({ model: child, parent: this })])}
,\n 10\n );\n }\n\n return items;\n }\n\n alignStartItems() {\n const items = new ItemList();\n\n const tag = this.tag;\n const children = this.isChild ? [] : sortTags(tag.children() || []);\n\n items.add('icon', {this.iconItems().toArray()}, 100);\n\n items.add('main',
{this.mainItems().toArray()}
, 50);\n\n if (!!children.length) {\n items.add(\n 'toggleArrow',\n {\n this.toggleArrow(e);\n }}\n >\n {icon(this.collapsed ? 'fas fa-caret-down' : 'fas fa-caret-up')}\n ,\n 10\n );\n }\n\n return items;\n }\n\n alignEndItems() {\n const items = new ItemList();\n\n if (this.tagLocked) {\n items.add('locked',
{this.lockedItems().toArray()}
, 100);\n return items;\n }\n\n const tag = this.tag;\n\n items.add('stats',
{this.statItems().toArray()}
, 100);\n\n items.add(\n 'lastDiscussion',\n
{this.lastDiscussionItems().toArray()}
,\n 50\n );\n\n return items;\n }\n\n lockedItems() {\n const items = new ItemList();\n const classes = this.compactMobileMode ? 'fa-stack fa-1x' : 'fa-stack fa-2x';\n items.add(\n 'icon',\n \n {\n \n }\n {this.tagLocked.icon}\n ,\n 10\n );\n items.add(\n 'LockedText',\n
{this.tagLocked.text}
,\n 50\n );\n return items;\n }\n\n iconItems() {\n const items = new ItemList();\n\n if (this.tag.icon() && this.isChild) {\n const style: Record = {};\n\n let iconClasses = 'fa-stack-1x CategoryIcon';\n\n if (app.forum.attribute('categories.childBareIcon')) {\n iconClasses += ' NoBackgroundCategoryIcon';\n style.color = '#fafafa';\n } else {\n style.color = this.tag.color();\n }\n\n const classes = this.compactMobileMode ? 'fa-stack fa-1x' : 'fa-stack fa-2x';\n\n items.add(\n 'icon',\n \n {!!app.forum.attribute('categories.childBareIcon') && (\n \n )}\n {icon(this.tag.icon(), { className: iconClasses, style: style })}\n ,\n 10\n );\n } else if (this.tag.icon() && !app.forum.attribute('categories.parentRemoveIcon')) {\n const classes = this.compactMobileMode ? 'fa-stack fa-2x' : 'fa-stack fa-3x';\n\n items.add('icon', {icon(this.tag.icon(), { className: 'fa-stack-1x CategoryIcon' })}, 10);\n }\n\n return items;\n }\n\n mainItems() {\n const items = new ItemList();\n\n items.add('name',

{this.tag.name()}

, 15);\n\n if (this.tag.description() && (this.isChild || !app.forum.attribute('categories.parentRemoveDescription'))) {\n items.add('description',
{this.tag.description()}
, 10);\n }\n\n return items;\n }\n\n statItems() {\n const items = new ItemList();\n\n if (this.isChild || !app.forum.attribute('categories.parentRemoveStats')) {\n items.add(\n 'discussionCount',\n StatWidget.component({\n count: Intl.NumberFormat().format(this.tag.discussionCount()),\n label: app.translator.trans('askvortsov-categories.forum.stat-widgets.discussion_label'),\n icon: 'fas fa-file-alt',\n }),\n 15\n );\n\n items.add(\n 'postCount',\n StatWidget.component({\n count: Intl.NumberFormat().format(this.tag.postCount()),\n label: app.translator.trans('askvortsov-categories.forum.stat-widgets.post_label'),\n icon: 'fas fa-comment',\n }),\n 10\n );\n }\n\n return items;\n }\n\n lastDiscussionItems() {\n const items = new ItemList();\n\n if (this.isChild || !app.forum.attribute('categories.parentRemoveLastDiscussion')) {\n items.add(\n 'lastDiscussion',\n LastDiscussionWidget.component({\n discussion: this.tag.lastPostedDiscussion(),\n }),\n 10\n );\n }\n\n return items;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n this.$('.TagCategory-content,.TagCategory-toggleArrow').on('mouseenter', function (e) {\n $(this).addClass('hover');\n if ($(this).parent().hasClass('SubCategory') || $(this).hasClass('TagCategory-toggleArrow')) {\n $(this).closest('.ParentCategory').children('.TagCategory-content').removeClass('hover');\n }\n });\n\n this.$('.TagCategory-content,.TagCategory-toggleArrow').on('mouseleave', function (e) {\n $(this).removeClass('hover');\n if ($(this).parent().hasClass('SubCategory') || $(this).hasClass('TagCategory-toggleArrow')) {\n $(this).closest('.ParentCategory').children('.TagCategory-content').addClass('hover');\n }\n });\n }\n\n onremove(vnode: Mithril.VnodeDOM): void {\n super.onremove(vnode);\n\n this.$('.TagCategory-content,.TagCategory-toggleArrow').off('mouseenter');\n this.$('.TagCategory-content,.TagCategory-toggleArrow').off('mouseleave');\n }\n\n toggleArrow(e: MouseEvent) {\n e.preventDefault();\n e.stopPropagation();\n this.collapsed = !this.collapsed;\n m.redraw();\n }\n}\n","import app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport listItems from 'flarum/common/helpers/listItems';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport extractText from 'flarum/common/utils/extractText';\nimport classList from 'flarum/common/utils/classList';\n\nimport sortTags from 'flarum/tags/utils/sortTags';\nimport tagLabel from 'flarum/tags/helpers/tagLabel';\n\nimport Category from './Category';\n\nexport default class CategoriesPage extends Page {\n tags!: any[];\n loading!: boolean;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n app.history.push('categories', extractText(app.translator.trans('askvortsov-category.forum.header.back_to_categories_tooltip')));\n\n this.tags = [];\n\n const preloaded = app.preloadedApiDocument();\n\n if (preloaded) {\n this.tags = sortTags(preloaded.filter((tag: any) => !tag.isChild()));\n return;\n }\n\n this.loading = true;\n\n app.tagList.load(['parent', 'children', 'lastPostedDiscussion', 'lastPostedDiscussion.lastPostedUser']).then(() => {\n this.tags = sortTags(app.store.all('tags').filter((tag) => !tag.isChild()));\n\n this.loading = false;\n\n m.redraw();\n });\n }\n\n view() {\n if (this.loading) {\n return ;\n }\n\n const classes = ['CategoriesPage'];\n\n return
{this.pageItems().toArray()}
;\n }\n\n pageItems() {\n const items = new ItemList();\n\n items.add('hero', IndexPage.prototype.hero(), 100);\n\n items.add(\n 'container',\n
\n {this.containerItems().toArray()}\n
,\n 50\n );\n\n return items;\n }\n\n containerItems() {\n const items = new ItemList();\n\n const pinned = this.tags.filter((tag) => tag.position() !== null);\n const cloud = this.tags.filter((tag) => tag.position() === null);\n\n items.add(\n 'sideNav',\n ,\n 100\n );\n\n items.add(\n 'categoriesList',\n
\n
    \n {pinned.map((tag) => {\n return Category.component({ model: tag });\n })}\n
\n\n {cloud.length ?
{cloud.map((tag) => [tagLabel(tag, { link: true }), ' '])}
: ''}\n
,\n 50\n );\n\n return items;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n app.setTitle(extractText(app.translator.trans('askvortsov-categories.forum.all_categories.meta_title_text')));\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/forum/components/TagsPage'];","import { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport Model from 'flarum/common/Model';\nimport Tag from 'flarum/tags/models/Tag';\nimport CategoriesPage from './components/CategoriesPage';\nimport TagsPage from 'flarum/tags/forum/components/TagsPage';\nimport Category from './components/Category';\nimport LastDiscussionWidget from './components/LastDiscussionWidget';\nimport StatWidget from './components/StatWidget';\n\nfunction pruneIndexNav(items, func) {\n const isTagsPageVisible = app.forum.attribute('categories.keepTagsNav');\n\n const isCustomTagsHidden = (app.current.matches(CategoriesPage) || app.current.matches(TagsPage));\n for (const item in items.items) {\n if (func(item)) {\n if(item == 'tags') {\n /*\n * Tags must be visible on the navibation bar, when the User has selected to keep Tags within the Extension Settings.\n * Finding all items that begins with 'tag' will also load 'tags', due to custom tag are labelled 'tag1', 'tag2' and so-on\n */\n if (!isTagsPageVisible) {\n items.remove(item);\n }\n } else {\n /*\n * This is for custom tags, where they should not be visible within CategoriesPage and TagsPage\n */\n if (isCustomTagsHidden) {\n items.remove(item);\n }\n }\n }\n }\n}\n\napp.initializers.add('askvortsov/flarum-categories', () => {\n app.routes.categories = {\n path: '/categories',\n component: CategoriesPage,\n };\n\n Tag.prototype.postCount = Model.attribute('postCount');\n\n extend(IndexPage.prototype, 'navItems', function (items) {\n items.add(\n 'categories',\n \n {app.translator.trans('askvortsov-categories.forum.index.categories_link')}\n ,\n -9.5\n );\n\n if (items.has('moreTags')) {\n items.replace('moreTags', {app.translator.trans('flarum-tags.forum.index.more_link')});\n }\n\n pruneIndexNav(items, (item) => item.startsWith('tag'));\n\n return items;\n });\n\n extend(IndexPage.prototype, 'sidebarItems', function (items) {\n pruneIndexNav(items, (item) => item !== 'newDiscussion' && item !== 'nav');\n return items;\n });\n});\n\nexport default {\n 'components/CategoriesPage': CategoriesPage,\n 'components/Category': Category,\n 'components/LastDiscussionWidget': LastDiscussionWidget,\n 'components/StatWidget': StatWidget,\n};\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","StatWidget","_Component","apply","arguments","_proto","view","m","class","classList","app","this","content","toArray","items","ItemList","add","attrs","count","className","icon","label","Component","LastDiscussionWidget","_this","_len","length","args","Array","_key","concat","cardVisible","oninit","vnode","_discussion$lastPostN","discussion","lastPostedUser","Link","href","lastPostNumber","user","extractText","username","avatar","humanTime","lastPostedAt","style","display","margin","role","truncate","title","card","UserCard","controlsButtonClassName","oncreate","timeout","_this2","$","on","clearTimeout","window","setTimeout","showCard","hideCard","onremove","off","_this3","redraw","addClass","removeClass","Category","tag","isChild","collapsed","compactMobileMode","tagLocked","model","parent","undefined","isUnlocked","isGroupProtected","isPasswordProtected","text","isVisible","isProtectedTagDisplayedForTagsPage","addEventListener","slug","SubCategory","ParentCategory","compactMobile","categoryItems","children","sortTags","backgroundColor","color","contentItems","map","child","component","alignStartItems","alignEndItems","_this4","iconItems","mainItems","onclick","e","toggleArrow","lockedItems","statItems","empty","lastPostedDiscussion","lastDiscussionItems","classes","iconClasses","name","description","Intl","NumberFormat","format","discussionCount","postCount","hasClass","closest","preventDefault","stopPropagation","CategoriesPage","_Page","tags","loading","preloaded","filter","then","LoadingIndicator","pageItems","IndexPage","containerItems","pinned","position","cloud","listItems","tagLabel","link","Page","pruneIndexNav","func","isTagsPageVisible","forum","attribute","isCustomTagsHidden","current","matches","TagsPage","item","remove","initializers","routes","categories","path","Tag","Model","extend","LinkButton","route","translator","trans","has","replace","startsWith"],"sourceRoot":""} \ No newline at end of file