diff --git a/js/dist/forum.js b/js/dist/forum.js index 8ec0855..b2e2ff7 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,3 +1,3 @@ /*! For license information please see forum.js.LICENSE.txt */ -(()=>{var t={648:(t,e,o)=>{var r=o(814).default;function a(){"use strict";t.exports=a=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},o=Object.prototype,n=o.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function m(t,e,o){return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{m({},"")}catch(t){m=function(t,e,o){return t[e]=o}}function c(t,e,o,r){var a=e&&e.prototype instanceof p?e:p,n=Object.create(a.prototype),i=new x(r||[]);return n._invoke=function(t,e,o){var r="suspendedStart";return function(a,n){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw n;return{value:void 0,done:!0}}for(o.method=a,o.arg=n;;){var i=o.delegate;if(i){var s=A(i,o);if(s){if(s===g)continue;return s}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===r)throw r="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r="executing";var l=d(t,e,o);if("normal"===l.type){if(r=o.done?"completed":"suspendedYield",l.arg===g)continue;return{value:l.arg,done:o.done}}"throw"===l.type&&(r="completed",o.method="throw",o.arg=l.arg)}}}(t,o,i),n}function d(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var g={};function p(){}function f(){}function h(){}var v={};m(v,s,(function(){return this}));var b=Object.getPrototypeOf,y=b&&b(b(I([])));y&&y!==o&&n.call(y,s)&&(v=y);var w=h.prototype=p.prototype=Object.create(v);function B(t){["next","throw","return"].forEach((function(e){m(t,e,(function(t){return this._invoke(e,t)}))}))}function N(t,e){function o(a,i,s,l){var u=d(t[a],t,i);if("throw"!==u.type){var m=u.arg,c=m.value;return c&&"object"==r(c)&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){o("next",t,s,l)}),(function(t){o("throw",t,s,l)})):e.resolve(c).then((function(t){m.value=t,s(m)}),(function(t){return o("throw",t,s,l)}))}l(u.arg)}var a;this._invoke=function(t,r){function n(){return new e((function(e,a){o(t,r,e,a)}))}return a=a?a.then(n,n):n()}}function A(t,e){var o=t.iterator[e.method];if(void 0===o){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=d(o,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,g;var a=r.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function I(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,r=function e(){for(;++o=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),F(o),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var r=o.completion;if("throw"===r.type){var a=r.arg;F(o)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,o){return this.delegate={iterator:I(t),resultName:e,nextLoc:o},"next"===this.method&&(this.arg=void 0),g}},e}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},814:t=>{function e(o){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(o)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},195:(t,e,o)=>{var r=o(648)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},482:t=>{"use strict";t.exports=flarum.extensions["fof-upload"]}},e={};function o(r){var a=e[r];if(void 0!==a)return a.exports;var n=e[r]={exports:{}};return t[r](n,n.exports,o),n.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";o.r(r);const t=flarum.core.compat["forum/app"];var e=o.n(t);const a=flarum.core.compat["common/Model"];var n=o.n(a);const i=flarum.core.compat["tags/common/models/Tag"];var s=o.n(i);const l=flarum.core.compat["common/models/Discussion"];var u=o.n(l);function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function d(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,c(t,e)}const g=flarum.core.compat["components/IndexPage"];var p=o.n(g);const f=flarum.core.compat["common/components/Page"];var h=o.n(f);const v=flarum.core.compat["common/components/Button"];var b=o.n(v);const y=flarum.core.compat["common/Component"];var w=o.n(y);const B=flarum.core.compat["common/components/Link"];var N=o.n(B),A=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.oninit=function(e){t.prototype.oninit.call(this,e),this.blogCategories=app.forum.attribute("blogTags")},o.view=function(){var t=this;return m("div",{className:"BlogCategories BlogSideWidget"},m("h3",null,app.translator.trans("v17development-flarum-blog.forum.categories")),this.blogCategories&&this.blogCategories.map((function(e){var o=app.store.getById("tags",e);if(!o)return null;var r=[],a=1===t.blogCategories.length||o.slug()===m.route.param("slug");return app.store.all("tags").forEach((function(e){e.isChild()&&e.parent()===o&&(e.slug()===m.route.param("slug")&&(a=!0),r.push(t.categoryItem(e)))})),a?[t.categoryItem(o)].concat(r):t.categoryItem(o)})))},o.categoryItem=function(t){return m(N(),{href:app.route("blogCategory",{slug:t.slug()}),className:"BlogSideWidget-item BlogSideWidget-item-"+t.id()+" "+(t.isChild()&&1==app.forum.attribute("blogCategoryHierarchy")?"BlogSideWidget-item-child":"")},m("span",{className:""===t.icon()?"BlogSideWidget-item-colored":"",style:{backgroundColor:""===t.icon()?t.color():null}},m("i",{className:t.icon()})),t.name())},e}(w());const _=flarum.extensions["fof-discussion-language"],F=flarum.core.compat["forum/components/IndexPage"];var x=o.n(F);const I=flarum.core.compat["common/components/SelectDropdown"];var C=o.n(I),L=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){return m("div",{className:"BlogForumNav BlogSideWidget"},m("h3",null,app.translator.trans("v17development-flarum-blog.forum.forum_nav")),m("nav",{className:"IndexPage-nav sideNav"},m(C(),{buttonClassName:"Button",className:"App-titleControl"},this.navItems().toArray())))},o.navItems=function(){return x().prototype.navItems()},e}(w());const S=flarum.core.compat["common/components/Tooltip"];var P=o.n(S);const M=flarum.core.compat["common/helpers/humanTime"];var k=o.n(M);const T=flarum.core.compat["common/helpers/icon"];var E=o.n(T);const R=flarum.core.compat["common/utils/classList"];var D=o.n(R);const O=flarum.core.compat["common/utils/ItemList"];var j=o.n(O),G=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.titleItems=function(){var t,o,r=this.attrs.article,a=new(j());return a.add("title",m("[",null,r.title()),100),(null!=(t=r.blogMeta())&&null!=t.isPendingReview&&t.isPendingReview()||r.isHidden())&&a.add("hidden",E()("fas fa-eye-slash",{class:"BlogList-item-hidden"}),80),null!=(o=r.blogMeta())&&null!=o.isPendingReview&&o.isPendingReview()&&a.add("pendingReview",m(P(),{text:e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")},E()("far fa-clock",{class:"BlogList-item-pendingReview"})),40),a},r.dataItems=function(){var t,o=this.attrs.article,r=new(j());return r.add("createdAt",m("span",{class:"BlogList-item-details-createdAt"},E()("far fa-clock")," ",k()(o.createdAt())),100),r.add("author",m("span",{class:"BlogList-item-details-author"},E()("far fa-user")," ",(null==(t=o.user())||null==t.displayName?void 0:t.displayName())||e().translator.trans("core.lib.username.deleted_text")),80),r.add("replies",m("span",{class:"BlogList-item-details-replies"},E()("far fa-comment")," ",(o.commentCount()||1)-1),60),r},r.contentItems=function(){var t,e=(null==(t=this.attrs.article.blogMeta())||null==t.summary?void 0:t.summary())||"",o=new(j());return o.add("title",m("h4",null,this.titleItems().toArray()),100),e&&o.add("summary",m("p",null,e),80),o.add("data",m("div",{class:"data"},this.dataItems().toArray()),60),o},r.getImage=function(){var t,e=this.attrs,o=e.article,r=e.defaultImage;return null!=(t=o.blogMeta())&&null!=t.featuredImage&&t.featuredImage()?"url("+o.blogMeta().featuredImage()+")":r},r.view=function(t){var o,r=this.attrs,a=r.article,n=r.defaultImage,i=this.getImage(),s=null==(o=a.blogMeta())||null==o.isSized?void 0:o.isSized();return m(N(),{href:e().route("blogArticle",{id:""+a.slug()}),className:D()("BlogList-item",{"BlogList-item-sized":s,"BlogList-item-default":!s},a.tags().map((function(t){return"BlogList-item-category-"+t.id()})))},m("div",{class:D()("BlogList-item-photo",{"FlarumBlog-default-image":i===n}),style:{backgroundImage:i}}),m("div",{class:"BlogList-item-content"},this.contentItems().toArray()))},o}(w()),z=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.topItems=function(){var t,o,r,a=this.attrs.article,n=new(j());return n.add("tags",m("span",{class:"BlogFeatured-list-item-tags"},null==(t=a.tags())?void 0:t.map((function(t){return m("span",{class:"dataItem"},t.name())}))),100),null!=a.isSticky&&a.isSticky()&&n.add("sticky",m("span",{class:"BlogFeatured-list-item-isSticky dataItem"},E()("fas fa-thumbtack")),80),(null!=(o=a.blogMeta())&&null!=o.isPendingReview&&o.isPendingReview()||a.isHidden())&&n.add("hidden",m("span",{class:"BlogFeatured-list-item-isHidden dataItem"},E()("fas fa-eye-slash")),60),null!=(r=a.blogMeta())&&null!=r.isPendingReview&&r.isPendingReview()&&n.add("pendingReview",m(P(),{text:e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review"),position:"bottom"},m("span",{class:"BlogFeatured-list-item-pendingReview dataItem"},E()("far fa-clock")," ",e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review_title"))),40),n},r.dataItems=function(){var t,o=this.attrs.article,r=new(j());return r.add("createdAt",m("span",{class:"BlogFeatured-list-item-details-createdAt"},E()("far fa-clock")," ",k()(o.createdAt())),100),r.add("author",m("span",{class:"BlogFeatured-list-item-details-author"},E()("far fa-user")," ",(null==(t=o.user())?void 0:t.displayName())||e().translator.trans("core.lib.username.deleted_text")),80),r.add("replies",m("span",{class:"BlogFeatured-list-item-details-replies"},E()("far fa-comment")," ",o.commentCount()-1),60),r},r.view=function(t){var o,r=this.attrs,a=r.article,n=r.defaultImage,i=null!=(o=a.blogMeta())&&null!=o.featuredImage&&o.featuredImage()?"url("+a.blogMeta().featuredImage()+")":n;return m(N(),{href:e().route("blogArticle",{id:""+a.slug()}),className:D()("BlogFeatured-list-item",a.tags().map((function(t){return"BlogFeatured-list-item-category-"+t.id()})),"FlarumBlog-default-image"),style:{backgroundImage:i}},m("div",{class:"BlogFeatured-list-item-top"},this.topItems().toArray()),m("div",{className:"BlogFeatured-list-item-details"},m("h4",null,a.title()),m("div",{className:"data"},this.dataItems().toArray())))},o}(w()),H=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.oninit=function(o){t.prototype.oninit.call(this,o),e().setTitle(e().translator.trans("v17development-flarum-blog.forum.blog")),this.bodyClass="BlogOverviewPage",this.isLoading=!0,this.featuredPosts=[],this.posts=[],this.hasMore=null,this.isLoadingMore=!1,this.languages=e().store.all("discussion-languages"),this.currentSelectedLanguage=m.route.param("lang")?m.route.param("lang"):e().translator.formatter.locale,e().history.push("blog"),this.loadBlogOverview(),this.featuredCount=parseInt(e().forum.attribute("blogFeaturedCount")),this.showCategories=!0,this.showForumNav=!0},r.loadBlogOverview=function(){var t=e().preloadedApiDocument();t?setTimeout(this.show.bind(this,t),0):this.reloadData(),m.redraw()},r.reloadData=function(){var t="is:blog"+(m.route.param("slug")?" tag:"+m.route.param("slug"):"");null!==this.languages&&this.languages.length>=1&&(t+=" language:"+this.currentSelectedLanguage),e().store.find("discussions",{filter:{q:t},sort:"-createdAt"}).then(this.show.bind(this)).catch((function(){m.redraw()}))},r.show=function(t){if(0===t.length)return this.isLoading=!1,void m.redraw();this.hasMore=t.payload.links&&t.payload.links.next?t.payload.links.next:null,this.featuredPosts=t.slice(0,this.featuredCount),this.posts=t.length>this.featuredCount?t.slice(this.featuredCount,t.length):[],this.isLoading=!1,m.redraw()},r.loadMore=function(){var t=this;this.isLoadingMore=!0,e().store.find(this.hasMore.replace(e().forum.attribute("apiUrl"),"")).then((function(e){e.map((function(e){return t.posts.push(e)})),t.hasMore=e.payload.links&&e.payload.links.next?e.payload.links.next:null})).catch((function(){})).then((function(){t.isLoadingMore=!1,m.redraw()}))},r.title=function(){if(!m.route.param("slug"))return m("h2",null,e().translator.trans("v17development-flarum-blog.forum.recent_posts"));var t=e().store.all("tags").filter((function(t){return t.slug()===m.route.param("slug")}));return m("h2",null,t&&t[0]&&t[0].name(),m("small",null," ","- ",m(N(),{href:e().route("blog")},e().translator.trans("v17development-flarum-blog.forum.return_to_overview"))))},r.view=function(){var t,o=this,r=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null;return"fof-discussion-language"in flarum.extensions&&(t=_.components.LanguageDropdown),[1==e().forum.attribute("blogAddHero")&&p().prototype.hero(),m("div",{className:"FlarumBlogOverview"},m("div",{className:"container"},m("div",{className:"BlogFeatured"},m("div",{className:"BlogOverviewButtons"},e().forum.attribute("canWriteBlogPosts")&&m(b(),{className:"Button",onclick:function(){return o.newArticle()},icon:"fas fa-pencil-alt"},e().translator.trans("v17development-flarum-blog.forum.compose.write_article")),null!==this.languages&&this.languages.length>=1&&m(t,{selected:this.currentSelectedLanguage,onclick:function(t){o.currentSelectedLanguage=t,m.route.set(document.location.pathname,{lang:t}),o.reloadData()}})),this.title(),m("div",{style:{clear:"both"}}),m("div",{class:"BlogFeatured-list"},this.isLoading&&[].concat(new Array(this.featuredCount).fill(void 0)).map((function(){return m("div",{class:"BlogFeatured-list-item BlogFeatured-list-item-ghost"},m("div",{class:"BlogFeatured-list-item-details"},m("h4",null," "),m("div",{class:"data"},m("span",null,m("i",{class:"far fa-wave"})))))})),!this.isLoading&&this.featuredPosts.length>=0&&this.featuredPosts.map((function(t){return m(z,{article:t,defaultImage:r})})))),m("div",{className:"BlogScrubber"},m("div",{className:"BlogList"},this.isLoading&&[!1,!1,!0,!1].map((function(t){return m("div",{className:"BlogList-item BlogList-item-"+(!0===t?"sized":"default")+" BlogList-item-ghost"},m("div",{className:"BlogList-item-photo FlarumBlog-default-image"}),m("div",{className:"BlogList-item-content"},m("h4",null," "),m("p",null," "),m("div",{className:"data"},m("span",null,m("i",{className:"far fa-wave"})))))})),!this.isLoading&&this.posts.length>=1&&this.posts.map((function(t){return m(G,{article:t,defaultImage:r})})),!this.isLoading&&this.featuredPosts.length>0&&null===this.hasMore&&m("p",{className:"FlarumBlog-reached-end"},e().translator.trans("v17development-flarum-blog.forum.no_more_posts")),!this.isLoading&&0===this.featuredPosts.length&&0===this.posts.length&&m("p",{className:"FlarumBlog-reached-end"},e().translator.trans("v17development-flarum-blog.forum.category_empty")),!this.isLoading&&null!==this.hasMore&&m("div",{className:"FlarumBlog-reached-load-more"},m(b(),{className:"Button",onclick:function(){return o.loadMore()},icon:"fas fa-chevron-down",loading:this.isLoadingMore},e().translator.trans("core.forum.discussion_list.load_more_button")))),m("div",{className:"Sidebar"},this.showCategories&&m(A,null),this.showForumNav&&m(L,null)))))]},r.newArticle=function(){var t=[],o=e().store.getBy("tags","slug",m.route.param("slug"));o&&t.push(o),m.route.set(e().route("blogComposer",{tags:t.map((function(t){return t.id()})).join(),lang:this.languages.length>0?this.currentSelectedLanguage:void 0}))},o}(h());const W=flarum.core.compat["forum/components/DiscussionPage"];var U=o.n(W);const q=flarum.core.compat["common/extend"],Y=flarum.core.compat["common/utils/mixin"];var V=function(t){function e(){return t.apply(this,arguments)||this}return d(e,t),e}(o.n(Y)()(n(),{discussion:n().hasOne("discussion"),featuredImage:n().attribute("featuredImage"),summary:n().attribute("summary"),isFeatured:n().attribute("isFeatured"),isSized:n().attribute("isSized"),isPendingReview:n().attribute("isPendingReview")}));const $=flarum.core.compat["tags/components/TagsPage"];var J=o.n($);function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=new Array(e);o=0?null:t})),t):t})),(0,q.extend)(x().prototype,"navItems",(function(t){return 0==app.forum.attribute("blogHideTags")||(app.forum.attribute("blogTags")||[]).forEach((function(e){t.remove("tag"+e)})),t}))}function X(t,e,o,r,a){void 0===o&&(o=!1),void 0===r&&(r=50),void 0===a&&(a=0);for(var n=function(t){if(Array.isArray(t))return t;var e=(null==t?void 0:t.children)||[];return Array.isArray(e)?e:[]}(t),i=null,s=0;s=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n);!(m=c()).done;){var d=X(m.value,e,!0,r,a+1);if(d)return d}return i}function Z(){var t=app.route.discussion;app.route.discussion=function(e,o){var r=!1;if(("both"===app.forum.attribute("blogRedirectsEnabled")||"discussions_only"===app.forum.attribute("blogRedirectsEnabled"))&&e.tags().length>0){var a=app.forum.attribute("blogTags");e.tags().filter((function(t){return a.indexOf(t.id())>=0||t.parent()&&a.indexOf(t.parent().id())>=0})).length>0&&(r=!0)}return r?e.lastReadPostNumber()>1?app.route("blogArticle.near",{id:e.slug(),near:e.lastReadPostNumber()}):app.route("blogArticle",{id:e.slug()}):t(e,o)}}const tt=flarum.core.compat["common/helpers/listItems"];var et=o.n(tt);const ot=flarum.core.compat["common/helpers/avatar"];var rt=o.n(ot),at=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){var t=this.attrs.loading?null:this.attrs.article?this.attrs.article.user():this.attrs.user;return m("div",{className:"FlarumBlog-Article-Author"},m("div",{className:"FlarumBlog-Article-Author-background "+(this.attrs.loading?"FlarumBlog-Author-Ghost":""),style:{backgroundColor:t&&t.color()?t.color():null}}),m("div",{className:"FlarumBlog-Article-Author-Avatar"},t?m(N(),{href:app.route("user",{username:t.username()})},rt()(t)):m("span",{className:"Avatar FlarumBlog-Author-Ghost"})),t&&m("div",{className:"FlarumBlog-Article-Author-Info"},m(N(),{href:app.route("user",{username:t.username()}),className:"FlarumBlog-Article-Author-Name"},t.displayName()),m("p",{className:"FlarumBlog-Article-Author-Bio"},t.bio&&t.bio()),m("ul",{className:"FlarumBlog-Article-Author-Extended"},et()(this.items().toArray()))),this.attrs.loading&&m("div",null,m("span",{className:"FlarumBlog-Article-Author-Name FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," ")))},o.items=function(){return new(j())},e}(w());const nt=flarum.core.compat["common/components/Modal"];var it=o.n(nt);const st=flarum.core.compat["common/utils/Stream"];var lt=o.n(st),ut=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.oninit=function(e){t.prototype.oninit.call(this,e),this.article=this.attrs.article,this.name=lt()(this.article.title()||""),this.redirect=this.attrs.redirect},o.className=function(){return"Modal--small Support-Modal"},o.title=function(){return app.translator.trans("v17development-flarum-blog.forum.tools.rename_article")},o.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},o.fields=function(){var t=new(j());return t.add("name",m("div",{className:"Form-group"},m("label",null,app.translator.trans("v17development-flarum-blog.forum.article.title"),":"),m("input",{className:"FormControl",placeholder:app.translator.trans("v17development-flarum-blog.forum.article.title"),bidi:this.name})),50),t.add("submit",m("div",{className:"Form-group"},b().component({type:"submit",className:"Button Button--primary SupportModal-save",loading:this.loading},app.translator.trans("core.forum.composer_edit.submit_button"))),-10),t},o.submitData=function(){return{title:this.name()}},o.onsubmit=function(t){var e=this;if(t.preventDefault(),this.loading=!0,this.attrs.onChange)return this.attrs.onChange(this.name()),void this.hide();this.article.save({title:this.name()}).then((function(){if(e.hide(),e.redirect){var t="/blog/"+e.article.slug();m.route.set(t,!0),window.history.replaceState(null,document.title,t)}}),(function(t){e.loading=!1,e.handleErrors(t)}))},e}(it());const mt=flarum.core.compat["tags/components/TagDiscussionModal"];var ct=o.n(mt);function dt(t,e,o,r,a,n,i){try{var s=t[n](i),l=s.value}catch(t){return void o(t)}s.done?e(l):Promise.resolve(l).then(r,a)}function gt(t){return function(){var e=this,o=arguments;return new Promise((function(r,a){var n=t.apply(e,o);function i(t){dt(n,r,a,i,s,"next",t)}function s(t){dt(n,r,a,i,s,"throw",t)}i(void 0)}))}}var pt=o(195),ft=o.n(pt);const ht=flarum.core.compat["common/components/Switch"];var vt=o.n(ht),bt=function(t){function r(){return t.apply(this,arguments)||this}d(r,t);var a=r.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.attrs.article?this.meta=this.attrs.article&&this.attrs.article.blogMeta()?this.attrs.article.blogMeta():e().store.createRecord("blogMeta"):this.meta=this.attrs.meta?this.attrs.meta:e().store.createRecord("blogMeta"),this.isNew=!this.meta.exists,this.summary=lt()(this.meta.summary()||""),this.featuredImage=lt()(this.meta.featuredImage()||""),this.isFeatured=lt()(this.meta.isFeatured()||!1),this.isSized=lt()(this.meta.isSized()||!1),this.isPendingReview=lt()(this.meta.isPendingReview()||!1)},a.className=function(){return"Modal--small Support-Modal"},a.title=function(){return e().translator.trans("v17development-flarum-blog.forum.article_settings.title")},a.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},a.fields=function(){var t=this,r=new(j());r.add("summary",m("div",{className:"Form-group"},m("label",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.summary.title"),":"),m("textarea",{className:"FormControl",style:{maxWidth:"100%",minWidth:"100%",width:"100%",minHeight:"120px"},bidi:this.summary,placeholder:e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.summary.placeholder")}),m("small",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.summary.helper_text"))),30);var a=null;if("fof-upload"in flarum.extensions&&e().forum.attribute("fof-upload.canUpload")){var n=o(482).components,i=n.Uploader,s=n.FileManagerModal,l=new i;a=m(b(),{class:"Button Button--icon",onclick:gt(ft().mark((function o(){return ft().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:e().modal.show(s,{uploader:l,onSelect:function(o){var r=e().store.getById("files",o[0]);t.featuredImage(r.url())}},!0);case 1:case"end":return o.stop()}}),o)}))),icon:"fas fa-cloud-upload-alt"})}return r.add("image",m("div",{className:"Form-group V17Blog-ArticleImage"},m("label",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.image.title"),":"),m("div",{"data-upload-enabled":!!a},m("input",{type:"text",className:"FormControl",bidi:this.featuredImage,placeholder:"https://"}),a),m("small",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.image.helper_text")),""!==this.featuredImage()&&m("img",{src:this.featuredImage(),alt:"Article image",title:e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.image.title"),style:{width:"100%",marginTop:"15px"}})),30),r.add("sized",m("div",{className:"Form-group"},vt().component({state:1==this.isSized(),onchange:function(e){t.isSized(e)}},[m("b",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.highlight.title")),m("div",{className:"helpText",style:{fontWeight:500}},e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.highlight.helper_text"))])),-10),r.add("submit",m("div",{className:"Form-group"},b().component({type:"submit",className:"Button Button--primary SupportModal-save",loading:this.loading},e().translator.trans("core.forum.composer_edit.submit_button"))),-10),r},a.submitData=function(){return{summary:this.summary(),featuredImage:this.featuredImage(),isFeatured:this.isFeatured(),isSized:this.isSized(),isPendingReview:this.isPendingReview(),relationships:this.isNew&&!this.attrs.isComposer?{discussion:this.attrs.article}:null}},a.onsubmit=function(t){var e=this;if(t.preventDefault(),this.attrs.onsubmit)return this.meta.pushData({attributes:this.submitData()}),this.attrs.onsubmit(this.meta),void this.hide();this.loading=!0,this.meta.save(this.submitData()).then((function(){e.attrs.article&&e.attrs.article.pushData({relationships:{blogMeta:e.meta}}),e.hide(),m.redraw()}),(function(t){e.loading=!1,e.handleErrors(t)}))},r}(it());const yt=flarum.core.compat["forum/components/ComposerBody"];var wt=o.n(yt);const Bt=flarum.core.compat["common/components/TextEditor"];var Nt=o.n(Bt),At=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){return m("div",null)},o.oncreate=function(e){t.prototype.oncreate.call(this,e),s9e.TextFormatter.preview(e.attrs.content||"",e.dom)},e}(w()),_t=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.oninit=function(e){t.prototype.oninit.call(this,e),this.previewContent=!1},r.view=function(){var t=this,o=this.composer.fields.content()&&""!==this.composer.fields.content(),r=this.loading||this.attrs.disabled;return m("div",{className:"Flarum-Blog-Composer "+(r?"Flarum-Blog-Composer-Loading":"")},m("div",{className:"Flarum-Blog-Composer-tabs"},m(b(),{className:!this.previewContent&&"AricleComposerButtonSelected",onclick:function(){return t.previewContent=!1}},e().translator.trans("v17development-flarum-blog.forum.composer.write")),m(b(),{className:this.previewContent&&"AricleComposerButtonSelected",onclick:function(){return t.previewContent=!0}},e().translator.trans("v17development-flarum-blog.forum.composer.view"))),m("div",{className:"Composer Flarum-Blog-Composer-body "+(this.previewContent?"Flarum-Blog-Composer-HideEditor":"")},this.previewContent&&m("div",{className:"Flarum-Blog-Composer-preview"},!o&&e().translator.trans("v17development-flarum-blog.forum.composer.nothing_to_preview"),m(At,{content:this.composer.fields.content()})),Nt().component({submitLabel:this.attrs.submitLabel||e().translator.trans("core.forum.composer_edit.submit_button"),placeholder:this.attrs.placeholder,disabled:r,composer:this.composer,preview:this.jumpToPreview&&this.jumpToPreview.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()})))},r.onsubmit=function(){this.attrs.onsubmit&&this.attrs.onsubmit()},o}(wt()),Ft=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.oninit=function(o){var r=this;if(t.prototype.oninit.call(this,o),e().setTitle(e().translator.trans("v17development-flarum-blog.forum.blog")),e().forum.attribute("canWriteBlogPosts")){if(e().history.push("blogComposer"),this.languages=e().store.all("discussion-languages")||[],this.bodyClass="BlogItemPage BlogItemPage--composer",this.articleLanguage=new(lt())(m.route.param("lang")?m.route.param("lang"):e().translator.locale),this.article=e().store.createRecord("discussions"),this.blogMeta=null,this.tags=[],m.route.param().tags){var a=Array.isArray(m.route.param().tags)?m.route.param().tags:m.route.param().tags.split(",");m.route.param().tags.length>0&&a.forEach((function(t){var o=e().store.getById("tags",t);o&&r.tags.push(o)}))}this.isSaving=!1}else m.route.set(e().route("blog"))},r.openTagsModal=function(t){var o=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||e().modal.show(ct(),{selectedTags:this.tags,onsubmit:function(t){o.tags=t}})},r.openNameArticleModal=function(t){var o=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||e().modal.show(ut,{article:this.article,onChange:function(t){o.article.pushData({attributes:{title:t}})}})},r.openBlogSettings=function(t){var o=this;t.preventDefault(),this.isSaving||e().modal.show(bt,{meta:this.blogMeta,onsubmit:function(t){return o.blogMeta=t}})},r.view=function(){return m("div",{className:"FlarumBlogItem"},m("div",{className:"container"},this.pageItems().toArray()))},r.pageItems=function(){var t=new(j());return t.add("toolButtons",m("div",{className:"FlarumBlog-ToolButtons"},m(N(),{href:e().route("blog"),className:"Button",loading:this.isSaving,icon:"fas fa-angle-left"},m("i",{class:"icon fas fa-angle-left Button-icon"}),m("span",{class:"Button-label"},e().translator.trans("v17development-flarum-blog.forum.return_to_overview")))),100),t.add("article",m("div",{className:"FlarumBlog-Article"},this.articleWrapperItems().toArray()),90),t},r.articleWrapperItems=function(){var t=new(j());return t.add("container",m("div",{className:"FlarumBlog-Article-Container"},this.articleItems().toArray()),100),t.add("sidebar",m("div",{className:"FlarumBlog-Article-Sidebar"},m(at,{user:e().session.user})),90),t},r.articleItems=function(){var t,o=this,r=new(j()),a=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null,n=this.blogMeta&&this.blogMeta.featuredImage()?"url("+this.blogMeta.featuredImage()+")":a;return"fof-discussion-language"in flarum.extensions&&(t=_.components.LanguageDropdown),r.add("content",m("div",{className:"FlarumBlog-Article-Content"},m("div",{className:"FlarumBlog-Article-Image FlarumBlog-default-image",style:{backgroundImage:n,cursor:"pointer"},onclick:function(t){return o.openBlogSettings(t)}}),m("div",{className:"FlarumBlog-Article-Content-Edit-Button"},m("div",{className:0===this.languages.length?"FlarumBlog-Article-Content-Edit-Dropdown":"FlarumBlog-Article-Content-EditButtons"},null!==this.languages&&this.languages.length>=1&&m(t,{selected:this.articleLanguage(),onclick:function(t){o.articleLanguage(t),m.redraw()}}),m(b(),{className:"Button",onclick:function(t){return o.openBlogSettings(t)},icon:"fas fa-pencil-alt",loading:this.isSaving},e().translator.trans("v17development-flarum-blog.forum.composer.update_settings")))),m("div",{className:"FlarumBlog-Article-Categories"},this.tags.map((function(t){return m("button",{class:"Button Button--text",onclick:function(t){return o.openTagsModal(t)}},t.name())})),m("button",{class:"Button Button--text",onclick:function(t){return o.openTagsModal(t)}},0===this.tags.length?e().translator.trans("v17development-flarum-blog.forum.composer.select_category"):e().translator.trans("v17development-flarum-blog.forum.composer.edit_categories")," ",m("i",{className:"fas fa-edit"}))),m("div",{className:"FlarumBlog-Article-Post"},m("h1",{onclick:function(){return o.openNameArticleModal()},className:"FlarumBlog-Article-Title",style:{cursor:"pointer"}},this.article&&this.article.title()&&""!==this.article.title()?this.article.title():e().translator.trans("v17development-flarum-blog.forum.composer.no_title"),m("button",{class:"Button Button--text",onclick:function(t){return t.preventDefault()}},m("i",{className:"fas fa-edit"}))),m("div",{className:"Post-body"},m(_t,{composer:e().composer,originalContent:"",submitLabel:e().translator.trans("v17development-flarum-blog.forum.composer.post_article"),placeholder:e().translator.trans("v17development-flarum-blog.forum.composer.enter_message_here"),onsubmit:function(){return o.create()},disabled:this.isSaving})))),100),r.add("commentsPlaceholder",m("div",{className:"FlarumBlog-Article-Comments"},m("h4",null,e().translator.trans("v17development-flarum-blog.forum.comment_section.comments")," (0)"),m("div",{className:"Post-body"},m("blockquote",{class:"uncited"},m("div",null,m("span",{className:"fas fa-ban",style:{marginRight:"5px"}})," ",e().translator.trans("v17development-flarum-blog.forum.composer.comment_section"))))),90),r},r.create=function(){var t=this,o=e().forum.attribute("blogTags")||[];if(0!==this.tags.length)if(this.article.title()&&""!==this.article.title())if(0!==this.tags.filter((function(t){return o.indexOf(t.id())>=0})).length){if(null!==this.blogMeta&&(this.blogMeta.featuredImage()||e().forum.attribute("blogDefaultImage"))&&this.blogMeta.summary()||confirm(e().translator.trans("v17development-flarum-blog.forum.composer.post_without_blog_info"))){var r={tags:this.tags};this.languages.length>0&&(r.language=e().store.getBy("discussion-languages","code",this.articleLanguage));var a={title:this.article.title(),content:e().composer.fields.content(),relationships:r,blogMeta:null!==this.blogMeta?{featuredImage:this.blogMeta.featuredImage(),summary:this.blogMeta.summary(),isSized:this.blogMeta.isSized()}:null};this.isSaving=!0,this.article.save(a).then((function(t){setTimeout((function(){m.route.set(e().route("blogArticle",{id:""+t.slug()}))}),500)})).catch((function(){t.isSaving=!1,m.redraw()}))}}else alert(e().translator.trans("v17development-flarum-blog.forum.composer.no_blog_tags_selected"));else this.openNameArticleModal();else this.openTagsModal()},o}(h());const xt=flarum.core,It=flarum.core.compat["common/utils/extractText"];var Ct=o.n(It),Lt=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){var t=this.attrs.discussion.subscription(),e=app.session.user.preferences().notify_newPost_email,o=Ct()(app.translator.trans(e?"flarum-subscriptions.forum.sub_controls.notify_email_tooltip":"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip")),r=app.translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),a="far fa-star";return"follow"===t&&(r=app.translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),a="fas fa-star"),m(P(),{text:o,position:"bottom"},m(b(),{className:"Button BlogArticleSubscription SubscriptionMenu-button--"+t,icon:a,onclick:this.saveSubscription.bind(this,this.attrs.discussion,-1!==["follow","ignore"].indexOf(t)?null:"follow")},r))},o.saveSubscription=function(t,e){t.save({subscription:e})},e}(w()),St=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){return m("div",{className:"FlarumBlog-Article-Sidebar"},m("ul",null,et()(this.items().toArray())))},o.items=function(){var t=new(j());return t.add("author",at.component(this.attrs),0),t.add("categories",A.component(this.attrs),0),t.add("nav",L.component(this.attrs),0),t},e}(w());const Pt=flarum.core.compat["forum/utils/DiscussionControls"];var Mt=o.n(Pt);const kt=flarum.core.compat["common/components/Alert"];var Tt=o.n(kt);const Et=flarum.core.compat["common/components/Dropdown"];var Rt=o.n(Et);const Dt=flarum.core.compat["forum/components/EditPostComposer"];var Ot=o.n(Dt),jt=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.init=function(){this.loadedPost=!1},r.manageArticleButtons=function(){var t=this,o=this.attrs.article,r=new(j()),a=flarum.extensions["fof-discussion-language"]&&void 0!==flarum.extensions["fof-discussion-language"].components?flarum.extensions["fof-discussion-language"].components.LanguageDiscussionModal:null;o.canRename()&&r.add("rename",b().component({className:"Button",onclick:function(){return e().modal.show(ut,{article:o})},icon:"fas fa-pencil-alt"},e().translator.trans("v17development-flarum-blog.forum.tools.rename_article")),100);var n=o.firstPost();return r.add("edit",b().component({className:"Button",disabled:!n||!n.canEdit(),onclick:function(){e().composer.load(Ot(),{post:n}),e().composer.show()},icon:"fas fa-edit"},e().translator.trans("v17development-flarum-blog.forum.tools.edit_article")),90),r.add("articleSettings",b().component({className:"Button",onclick:function(){return e().modal.show(bt,{article:o})},icon:"fas fa-cogs"},e().translator.trans("v17development-flarum-blog.forum.tools.article_settings")),80),o.canTag()&&r.add("tag",b().component({className:"Button",onclick:function(){return e().modal.show(ct(),{discussion:o})},icon:"fas fa-tag"},e().translator.trans("v17development-flarum-blog.forum.tools.update_category")),70),o.blogMeta()&&o.blogMeta().isPendingReview()&&(r.add("separator1",m("li",{className:"Dropdown-separator"}),65),r.add("approve",b().component({className:"Button",disabled:!e().forum.attribute("canApproveBlogPosts"),onclick:function(){o.blogMeta().save({isPendingReview:!1}).then((function(){e().alerts.show(Tt(),{type:"success"},e().translator.trans("v17development-flarum-blog.forum.review_article.approve_article_approved"))}),(function(e){t.loading=!1,t.handleErrors(e)}))},icon:"fas fa-thumbs-up"},e().translator.trans("v17development-flarum-blog.forum.review_article.approve_article")),60)),o.canChangeLanguage&&o.canChangeLanguage()&&a&&r.add("lang",b().component({icon:"fas fa-globe",onclick:function(){return e().modal.show(a,{discussion:o})}},e().translator.trans("fof-discussion-language.forum.discussion_controls.change_language_button")),50),r.add("separator2",m("li",{className:"Dropdown-separator"}),40),o.canLock()&&r.add("lock",b().component({className:"Button",onclick:Mt().lockAction.bind(o),icon:"fas "+(o.isLocked()?"fa-comments":"fa-comment-slash")},o.isLocked()?e().translator.trans("v17development-flarum-blog.forum.tools.enable_comments"):e().translator.trans("v17development-flarum-blog.forum.tools.disable_comments")),30),o.canHide()&&(o.isHidden()?(r.add("recover",b().component({className:"Button",onclick:Mt().restoreAction.bind(o),icon:"fas fa-eye"},e().translator.trans("v17development-flarum-blog.forum.tools.recover_article")),20),o.canDelete()&&r.add("delete",b().component({className:"Button",onclick:function(){if(confirm(Ct()(e().translator.trans("core.forum.discussion_controls.delete_confirmation"))))return"blogArticle"===e().history.getCurrent().name&&(e().previous?e().history.back():m.route.set(e().route("blog"))),o.delete().then((function(){m.redraw()}))},icon:"far fa-trash-alt"},e().translator.trans("v17development-flarum-blog.forum.tools.delete_forever")),10)):r.add("hide",b().component({className:"Button",onclick:Mt().hideAction.bind(o),icon:"fas fa-eye-slash"},e().translator.trans("v17development-flarum-blog.forum.tools.hide_article")),0)),r},r.view=function(){var t=this,e=this.attrs.article.firstPost();return m("div",{className:"FlarumBlog-Article-Content-Edit-Button"},m("div",{className:"FlarumBlog-Article-Content-Edit-Dropdown"},Rt().component({icon:"fas fa-cog",label:"Manage",buttonClassName:"Button",menuClassName:"Dropdown-menu--right",onshow:function(){!e||e.canEdit()||t.loadedPost||(t.loadedPost=!0,m.redraw())}},this.manageArticleButtons().toArray())))},o}(w());const Gt=flarum.core.compat["forum/components/CommentPost"];var zt=o.n(Gt);const Ht=flarum.core.compat["forum/components/PostStream"];var Wt=o.n(Ht);const Ut=flarum.core.compat["forum/states/PostStreamState"];var qt=o.n(Ut);const Yt=flarum.core.compat["common/helpers/fullTime"];var Vt=o.n(Yt),$t=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.oninit=function(o){t.prototype.oninit.call(this,o),e().setTitle(e().translator.trans("v17development-flarum-blog.forum.blog")),e().history.push("blogArticle"),this.bodyClass="BlogItemPage",this.near=m.route.param("near")||0,this.loading=!0,this.found=!1,this.article=null,this.loadBlogItem()},r.loadBlogItem=function(){var t=e().preloadedApiDocument();t?setTimeout(this.show.bind(this,t),0):e().store.find("discussions",m.route.param("id").split("-")[0]).then(this.show.bind(this)).catch((function(){m.redraw()})),m.redraw()},r.show=function(t){var o=this;this.article=t,e().setTitle(t.title()+" - "+e().translator.trans("v17development-flarum-blog.forum.blog")),this.loading=!1;var r=[];if(t.payload&&t.payload.included){var a=t.id();r=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===a})).map((function(t){return e().store.getById("posts",t.id)})).sort((function(t,e){return t.id()-e.id()})).slice(0,20)}this.stream=new(qt())(t,r),this.near&&this.stream.goToNumber(this.near||0,!0).then((function(){e().current.set("discussion",t),e().current.set("stream",o.stream)})),e().session.user&&!t.lastReadPostNumber()&&t.save({lastReadPostNumber:1}),m.redraw()},r.postItems=function(){var t,o,r,a=null;!this.loading&&this.article&&(a=null==(r=this.article)||null==r.firstPost?void 0:r.firstPost());var n,i,s,l=new(j());return l.add("title",m("h1",{className:D()("FlarumBlog-Article-Title",{"FlarumBlog-Article-GhostTitle":this.loading})},(null==this||null==(t=this.article)||null==t.title?void 0:t.title())||"Ghost title",(null==(o=this.article)||null==o.isHidden?void 0:o.isHidden())&&"("+e().translator.trans("v17development-flarum-blog.forum.hidden")+")"),100),l.add("publishDate",m("div",{className:D()("FlarumBlog-Article-PublishDate",{"FlarumBlog-Article-GhostPublishDate":this.loading})},this.article?Vt()(this.article.createdAt()):m("span",null," ")),80),this.loading&&l.add("skeleton",[0,1,2].map((function(){return m("div",null,m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",null," "))})),60),this.loading||(null!=(n=(i=this.article).blogMeta)&&null!=(s=n.call(i))&&null!=s.isPendingReview&&s.isPendingReview()&&l.add("review",m("div",{className:"Post-body"},m("blockquote",{class:"uncited",style:{fontSize:"16px"}},m("div",null,E()("far fa-clock",{style:{marginRight:"5px"}})," ",e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")))),60),a&&l.add("post",m(zt(),{post:a}),40)),l},r.contentItems=function(){var t,o,r,a,n,i,s,l,u,c,d=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null,g=null!=(t=this.article)&&null!=(o=t.blogMeta())&&null!=o.featuredImage&&o.featuredImage()?"url("+this.article.blogMeta().featuredImage()+")":d,p=new(j());return p.add("image",m("div",{className:D()("FlarumBlog-Article-Image FlarumBlog-default-image",{"FlarumBlog-Article-GhostImage":this.loading}),style:{backgroundImage:g,opacity:null!=(r=this.article)&&null!=r.isHidden&&r.isHidden()?.4:null}}),100),this.article&&(null!=(a=e().session.user)&&null!=a.canEdit&&a.canEdit()||null!=(n=this.article)&&null!=n.canRename&&n.canRename()||null!=(i=this.article)&&null!=i.posts&&null!=(s=i.posts())&&null!=(l=s[0])&&null!=l.canEdit&&l.canEdit())&&p.add("editArticle",m(jt,{article:this.article}),80),p.add("categories",m("div",{className:"FlarumBlog-Article-Categories"},!this.loading&&(null==(u=this.article)||null==u.tags||null==(c=u.tags())?void 0:c.map((function(t){return m(N(),{href:e().route("blogCategory",{slug:t.slug()})},t.name())}))),this.loading&&[0,1].map((function(){return m("span",{className:"FlarumBlog-Article-GhostCategory"},"Category")}))),60),p.add("post",m("div",{className:"FlarumBlog-Article-Post"},this.postItems().toArray()),40),p},r.articleItems=function(){var t,o,r,a=new(j());return a.add("content",m("div",{className:"FlarumBlog-Article-Content"},this.contentItems().toArray()),100),null!=this&&null!=(t=this.article)&&null!=t.isLocked&&t.isLocked()&&1===(null==this||null==(o=this.article)||null==o.commentCount?void 0:o.commentCount())||a.add("comments",m("div",{className:"FlarumBlog-Article-Comments"},!this.loading&&e().session.user&&this.article.subscription&&(!this.article.isLocked||this.article.isLocked&&!this.article.isLocked())&&m(Lt,{discussion:this.article}),m("h4",null,e().translator.trans("v17development-flarum-blog.forum.comment_section.comments")," (",this.article?this.article.commentCount()-1:0,")"),!this.loading&&(null==(r=this.article)||null==r.isLocked?void 0:r.isLocked())&&m("div",{className:"Post-body"},m("blockquote",{class:"uncited"},m("div",null,m("span",{className:"far fa-lock",style:{marginRight:"5px"}})," ",e().translator.trans("v17development-flarum-blog.forum.comment_section.locked")))),!this.loading&&this.article&&Wt().component({discussion:this.article,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),75),a},r.view=function(){return[1==e().forum.attribute("blogAddHero")&&p().prototype.hero(),m("div",{className:"FlarumBlogItem"},m("div",{className:"container"},m("div",{className:"FlarumBlog-ToolButtons"},m(N(),{href:e().route("blog"),className:"Button",onclick:function(t){e().previous.matches(H)&&(t.preventDefault(),history.back())}},m("i",{class:"icon fas fa-angle-left Button-icon"}),m("span",{class:"Button-label"},e().translator.trans("v17development-flarum-blog.forum.return_to_overview")))),m("div",{className:"FlarumBlog-Article"},m("div",{className:"FlarumBlog-Article-Container"},this.articleItems().toArray()),m(St,{article:this.article,loading:this.loading}))))]},r.positionChanged=function(t,o){var r=this.article;e().session.user&&o>(r.lastReadPostNumber()||0)&&(r.save({lastReadPostNumber:o}),m.redraw())},o}(h());const Jt=flarum.core.compat["common/components/LinkButton"];var Kt=o.n(Jt);function Qt(){(0,q.extend)(x().prototype,"navItems",(function(t){return app.forum.attribute("blogAddSidebarNav")&&"0"!==app.forum.attribute("blogAddSidebarNav")&&t.add("blog",m(Kt(),{icon:"fas fa-comment",href:app.route("blog")},app.translator.trans("v17development-flarum-blog.forum.blog")),15),t}))}e().initializers.add("v17development-flarum-blog",(function(t){t.routes.blog={path:"/blog",component:H},t.routes.blogCategory={path:"/blog/category/:slug",component:H},t.routes.blogComposer={path:"/blog/compose",component:Ft},t.routes.blogArticle={path:"/blog/:id",component:$t},t.routes["blogArticle.near"]={path:"/blog/:id/:near",component:$t},t.store.models.blogMeta=V,u().prototype.blogMeta=n().hasOne("blogMeta"),s().prototype.isBlog=n().attribute("isBlog"),(0,q.extend)(x().prototype,"oncreate",(function(){var t=this.currentTag(),o="both"===e().forum.attribute("blogRedirectsEnabled")||"tags_only"===e().forum.attribute("blogRedirectsEnabled");if(t&&o){var r=e().forum.attribute("blogTags");(r.indexOf(t.id())>=0||t.parent()&&r.indexOf(t.parent().id())>=0)&&m.route.set(e().route("blog"))}})),(0,q.override)(U().prototype,"show",(function(t,o){if(("both"===e().forum.attribute("blogRedirectsEnabled")||"discussions_only"===e().forum.attribute("blogRedirectsEnabled"))&&o&&o&&o.tags().length>0){var r=e().forum.attribute("blogTags");if(o.tags().filter((function(t){return r.indexOf(t.id())>=0||t.parent()&&r.indexOf(t.parent().id())>=0})).length>0){var a=e().route("blogArticle",{id:o.slug()});return m.route.set(a,null,{replace:!0}),null}}return t(o)})),Q(),Z(),Qt()}),-1e5),Object.assign(xt.compat,{"v17development/blog/components/BlogItemSidebar":St,"v17development/blog/components/BlogAuthor":at,"v17development/blog/components/Composer/Composer":_t,"v17development/blog/components/Composer/ComposerPreview":At,"v17development/blog/components/Modals/BlogPostSettingsModal":bt,"v17development/blog/components/Modals/RenameArticleModal":ut,"v17development/blog/components/ArticleSubscription":Lt,"v17development/blog/components/BlogCategories":A,"v17development/blog/components/BlogOverviewItem":G,"v17development/blog/components/BlogPostController":jt,"v17development/blog/components/FeaturedBlogItem":z,"v17development/blog/components/ForumNav":L,"v17development/blog/pages/BlogItem":$t,"v17development/blog/pages/BlogOverview":H,"v17development/blog/models/BlogMeta":V})})(),module.exports=r})(); +(()=>{var t={648:(t,e,o)=>{var r=o(814).default;function a(){"use strict";t.exports=a=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},o=Object.prototype,n=o.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function m(t,e,o){return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{m({},"")}catch(t){m=function(t,e,o){return t[e]=o}}function c(t,e,o,r){var a=e&&e.prototype instanceof p?e:p,n=Object.create(a.prototype),i=new x(r||[]);return n._invoke=function(t,e,o){var r="suspendedStart";return function(a,n){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw n;return{value:void 0,done:!0}}for(o.method=a,o.arg=n;;){var i=o.delegate;if(i){var s=A(i,o);if(s){if(s===g)continue;return s}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===r)throw r="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r="executing";var l=d(t,e,o);if("normal"===l.type){if(r=o.done?"completed":"suspendedYield",l.arg===g)continue;return{value:l.arg,done:o.done}}"throw"===l.type&&(r="completed",o.method="throw",o.arg=l.arg)}}}(t,o,i),n}function d(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var g={};function p(){}function f(){}function h(){}var v={};m(v,s,(function(){return this}));var b=Object.getPrototypeOf,y=b&&b(b(I([])));y&&y!==o&&n.call(y,s)&&(v=y);var w=h.prototype=p.prototype=Object.create(v);function B(t){["next","throw","return"].forEach((function(e){m(t,e,(function(t){return this._invoke(e,t)}))}))}function N(t,e){function o(a,i,s,l){var u=d(t[a],t,i);if("throw"!==u.type){var m=u.arg,c=m.value;return c&&"object"==r(c)&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){o("next",t,s,l)}),(function(t){o("throw",t,s,l)})):e.resolve(c).then((function(t){m.value=t,s(m)}),(function(t){return o("throw",t,s,l)}))}l(u.arg)}var a;this._invoke=function(t,r){function n(){return new e((function(e,a){o(t,r,e,a)}))}return a=a?a.then(n,n):n()}}function A(t,e){var o=t.iterator[e.method];if(void 0===o){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=d(o,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,g;var a=r.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function I(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,r=function e(){for(;++o=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),F(o),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var r=o.completion;if("throw"===r.type){var a=r.arg;F(o)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,o){return this.delegate={iterator:I(t),resultName:e,nextLoc:o},"next"===this.method&&(this.arg=void 0),g}},e}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},814:t=>{function e(o){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(o)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},195:(t,e,o)=>{var r=o(648)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},482:t=>{"use strict";t.exports=flarum.extensions["fof-upload"]}},e={};function o(r){var a=e[r];if(void 0!==a)return a.exports;var n=e[r]={exports:{}};return t[r](n,n.exports,o),n.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";o.r(r);const t=flarum.core.compat["forum/app"];var e=o.n(t);const a=flarum.core.compat["common/Model"];var n=o.n(a);const i=flarum.core.compat["tags/common/models/Tag"];var s=o.n(i);const l=flarum.core.compat["common/models/Discussion"];var u=o.n(l);function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function d(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,c(t,e)}const g=flarum.core.compat["components/IndexPage"];var p=o.n(g);const f=flarum.core.compat["common/components/Page"];var h=o.n(f);const v=flarum.core.compat["common/components/Button"];var b=o.n(v);const y=flarum.core.compat["common/Component"];var w=o.n(y);const B=flarum.core.compat["common/components/Link"];var N=o.n(B),A=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.oninit=function(e){t.prototype.oninit.call(this,e),this.blogCategories=app.forum.attribute("blogTags")},o.view=function(){var t=this;return m("div",{className:"BlogCategories BlogSideWidget"},m("h3",null,app.translator.trans("v17development-flarum-blog.forum.categories")),this.blogCategories&&this.blogCategories.map((function(e){var o=app.store.getById("tags",e);if(!o)return null;var r=[],a=1===t.blogCategories.length||o.slug()===m.route.param("slug");return app.store.all("tags").forEach((function(e){e.isChild()&&e.parent()===o&&(e.slug()===m.route.param("slug")&&(a=!0),r.push(t.categoryItem(e)))})),a?[t.categoryItem(o)].concat(r):t.categoryItem(o)})))},o.categoryItem=function(t){return m(N(),{href:app.route("blogCategory",{slug:t.slug()}),className:"BlogSideWidget-item BlogSideWidget-item-"+t.id()+" "+(t.isChild()&&1==app.forum.attribute("blogCategoryHierarchy")?"BlogSideWidget-item-child":"")},m("span",{className:""===t.icon()?"BlogSideWidget-item-colored":"",style:{backgroundColor:""===t.icon()?t.color():null}},m("i",{className:t.icon()})),t.name())},e}(w());const _=flarum.extensions["fof-discussion-language"],F=flarum.core.compat["forum/components/IndexPage"];var x=o.n(F);const I=flarum.core.compat["common/components/SelectDropdown"];var C=o.n(I),L=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){return m("div",{className:"BlogForumNav BlogSideWidget"},m("h3",null,app.translator.trans("v17development-flarum-blog.forum.forum_nav")),m("nav",{className:"IndexPage-nav sideNav"},m(C(),{buttonClassName:"Button",className:"App-titleControl"},this.navItems().toArray())))},o.navItems=function(){return x().prototype.navItems()},e}(w());const S=flarum.core.compat["common/components/Tooltip"];var P=o.n(S);const M=flarum.core.compat["common/helpers/humanTime"];var k=o.n(M);const T=flarum.core.compat["common/helpers/icon"];var E=o.n(T);const R=flarum.core.compat["common/utils/classList"];var D=o.n(R);const O=flarum.core.compat["common/utils/ItemList"];var j=o.n(O),G=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.titleItems=function(){var t,o,r=this.attrs.article,a=new(j());return a.add("title",m("[",null,r.title()),100),(null!=(t=r.blogMeta())&&null!=t.isPendingReview&&t.isPendingReview()||r.isHidden())&&a.add("hidden",E()("fas fa-eye-slash",{class:"BlogList-item-hidden"}),80),null!=(o=r.blogMeta())&&null!=o.isPendingReview&&o.isPendingReview()&&a.add("pendingReview",m(P(),{text:e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")},E()("far fa-clock",{class:"BlogList-item-pendingReview"})),40),a},r.dataItems=function(){var t,o=this.attrs.article,r=new(j());return r.add("createdAt",m("span",{class:"BlogList-item-details-createdAt"},E()("far fa-clock")," ",k()(o.createdAt())),100),r.add("author",m("span",{class:"BlogList-item-details-author"},E()("far fa-user")," ",(null==(t=o.user())||null==t.displayName?void 0:t.displayName())||e().translator.trans("core.lib.username.deleted_text")),80),r.add("replies",m("span",{class:"BlogList-item-details-replies"},E()("far fa-comment")," ",(o.commentCount()||1)-1),60),r},r.contentItems=function(){var t,e=(null==(t=this.attrs.article.blogMeta())||null==t.summary?void 0:t.summary())||"",o=new(j());return o.add("title",m("h4",null,this.titleItems().toArray()),100),e&&o.add("summary",m("p",null,e),80),o.add("data",m("div",{class:"data"},this.dataItems().toArray()),60),o},r.getImage=function(){var t,e=this.attrs,o=e.article,r=e.defaultImage;return null!=(t=o.blogMeta())&&null!=t.featuredImage&&t.featuredImage()?"url("+o.blogMeta().featuredImage()+")":r},r.view=function(t){var o,r=this.attrs,a=r.article,n=r.defaultImage,i=this.getImage(),s=null==(o=a.blogMeta())||null==o.isSized?void 0:o.isSized();return m(N(),{href:e().route("blogArticle",{id:""+a.slug()}),className:D()("BlogList-item",{"BlogList-item-sized":s,"BlogList-item-default":!s},a.tags().map((function(t){return"BlogList-item-category-"+t.id()})))},m("div",{class:D()("BlogList-item-photo",{"FlarumBlog-default-image":i===n}),style:{backgroundImage:i}}),m("div",{class:"BlogList-item-content"},this.contentItems().toArray()))},o}(w()),z=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.topItems=function(){var t,o,r,a=this.attrs.article,n=new(j());return n.add("tags",m("span",{class:"BlogFeatured-list-item-tags"},null==(t=a.tags())?void 0:t.map((function(t){return m("span",{class:"dataItem"},t.name())}))),100),null!=a.isSticky&&a.isSticky()&&n.add("sticky",m("span",{class:"BlogFeatured-list-item-isSticky dataItem"},E()("fas fa-thumbtack")),80),(null!=(o=a.blogMeta())&&null!=o.isPendingReview&&o.isPendingReview()||a.isHidden())&&n.add("hidden",m("span",{class:"BlogFeatured-list-item-isHidden dataItem"},E()("fas fa-eye-slash")),60),null!=(r=a.blogMeta())&&null!=r.isPendingReview&&r.isPendingReview()&&n.add("pendingReview",m(P(),{text:e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review"),position:"bottom"},m("span",{class:"BlogFeatured-list-item-pendingReview dataItem"},E()("far fa-clock")," ",e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review_title"))),40),n},r.dataItems=function(){var t,o=this.attrs.article,r=new(j());return r.add("createdAt",m("span",{class:"BlogFeatured-list-item-details-createdAt"},E()("far fa-clock")," ",k()(o.createdAt())),100),r.add("author",m("span",{class:"BlogFeatured-list-item-details-author"},E()("far fa-user")," ",(null==(t=o.user())?void 0:t.displayName())||e().translator.trans("core.lib.username.deleted_text")),80),r.add("replies",m("span",{class:"BlogFeatured-list-item-details-replies"},E()("far fa-comment")," ",o.commentCount()-1),60),r},r.view=function(t){var o,r=this.attrs,a=r.article,n=r.defaultImage,i=null!=(o=a.blogMeta())&&null!=o.featuredImage&&o.featuredImage()?"url("+a.blogMeta().featuredImage()+")":n;return m(N(),{href:e().route("blogArticle",{id:""+a.slug()}),className:D()("BlogFeatured-list-item",a.tags().map((function(t){return"BlogFeatured-list-item-category-"+t.id()})),"FlarumBlog-default-image"),style:{backgroundImage:i}},m("div",{class:"BlogFeatured-list-item-top"},this.topItems().toArray()),m("div",{className:"BlogFeatured-list-item-details"},m("h4",null,a.title()),m("div",{className:"data"},this.dataItems().toArray())))},o}(w()),H=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.oninit=function(o){t.prototype.oninit.call(this,o),e().setTitle(e().translator.trans("v17development-flarum-blog.forum.blog")),this.bodyClass="BlogOverviewPage",this.isLoading=!0,this.featuredPosts=[],this.posts=[],this.hasMore=null,this.isLoadingMore=!1,this.languages=e().store.all("discussion-languages"),this.currentSelectedLanguage=m.route.param("lang")?m.route.param("lang"):e().translator.formatter.locale,e().history.push("blog"),this.loadBlogOverview(),this.featuredCount=parseInt(e().forum.attribute("blogFeaturedCount")),this.showCategories=!0,this.showForumNav=!0},r.loadBlogOverview=function(){var t=e().preloadedApiDocument();t?setTimeout(this.show.bind(this,t),0):this.reloadData(),m.redraw()},r.reloadData=function(){var t="is:blog"+(m.route.param("slug")?" tag:"+m.route.param("slug"):"");null!==this.languages&&this.languages.length>=1&&(t+=" language:"+this.currentSelectedLanguage),e().store.find("discussions",{filter:{q:t},sort:"-createdAt"}).then(this.show.bind(this)).catch((function(){m.redraw()}))},r.show=function(t){if(0===t.length)return this.isLoading=!1,void m.redraw();this.hasMore=t.payload.links&&t.payload.links.next?t.payload.links.next:null,this.featuredPosts=t.slice(0,this.featuredCount),this.posts=t.length>this.featuredCount?t.slice(this.featuredCount,t.length):[],this.isLoading=!1,m.redraw()},r.loadMore=function(){var t=this;this.isLoadingMore=!0,e().store.find(this.hasMore.replace(e().forum.attribute("apiUrl"),"")).then((function(e){e.map((function(e){return t.posts.push(e)})),t.hasMore=e.payload.links&&e.payload.links.next?e.payload.links.next:null})).catch((function(){})).then((function(){t.isLoadingMore=!1,m.redraw()}))},r.title=function(){if(!m.route.param("slug"))return m("h2",null,e().translator.trans("v17development-flarum-blog.forum.recent_posts"));var t=e().store.all("tags").filter((function(t){return t.slug()===m.route.param("slug")}));return m("h2",null,t&&t[0]&&t[0].name(),m("small",null," ","- ",m(N(),{href:e().route("blog")},e().translator.trans("v17development-flarum-blog.forum.return_to_overview"))))},r.view=function(){var t,o=this,r=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null;return"fof-discussion-language"in flarum.extensions&&(t=_.components.LanguageDropdown),[1==e().forum.attribute("blogAddHero")&&p().prototype.hero(),m("div",{className:"FlarumBlogOverview"},m("div",{className:"container"},m("div",{className:"BlogFeatured"},m("div",{className:"BlogOverviewButtons"},e().forum.attribute("canWriteBlogPosts")&&m(b(),{className:"Button",onclick:function(){return o.newArticle()},icon:"fas fa-pencil-alt"},e().translator.trans("v17development-flarum-blog.forum.compose.write_article")),null!==this.languages&&this.languages.length>=1&&m(t,{selected:this.currentSelectedLanguage,onclick:function(t){"string"==typeof t&&(o.currentSelectedLanguage=t,m.route.set(document.location.pathname,{lang:t}),o.reloadData())}})),this.title(),m("div",{style:{clear:"both"}}),m("div",{class:"BlogFeatured-list"},this.isLoading&&[].concat(new Array(this.featuredCount).fill(void 0)).map((function(){return m("div",{class:"BlogFeatured-list-item BlogFeatured-list-item-ghost"},m("div",{class:"BlogFeatured-list-item-details"},m("h4",null," "),m("div",{class:"data"},m("span",null,m("i",{class:"far fa-wave"})))))})),!this.isLoading&&this.featuredPosts.length>=0&&this.featuredPosts.map((function(t){return m(z,{article:t,defaultImage:r})})))),m("div",{className:"BlogScrubber"},m("div",{className:"BlogList"},this.isLoading&&[!1,!1,!0,!1].map((function(t){return m("div",{className:"BlogList-item BlogList-item-"+(!0===t?"sized":"default")+" BlogList-item-ghost"},m("div",{className:"BlogList-item-photo FlarumBlog-default-image"}),m("div",{className:"BlogList-item-content"},m("h4",null," "),m("p",null," "),m("div",{className:"data"},m("span",null,m("i",{className:"far fa-wave"})))))})),!this.isLoading&&this.posts.length>=1&&this.posts.map((function(t){return m(G,{article:t,defaultImage:r})})),!this.isLoading&&this.featuredPosts.length>0&&null===this.hasMore&&m("p",{className:"FlarumBlog-reached-end"},e().translator.trans("v17development-flarum-blog.forum.no_more_posts")),!this.isLoading&&0===this.featuredPosts.length&&0===this.posts.length&&m("p",{className:"FlarumBlog-reached-end"},e().translator.trans("v17development-flarum-blog.forum.category_empty")),!this.isLoading&&null!==this.hasMore&&m("div",{className:"FlarumBlog-reached-load-more"},m(b(),{className:"Button",onclick:function(){return o.loadMore()},icon:"fas fa-chevron-down",loading:this.isLoadingMore},e().translator.trans("core.forum.discussion_list.load_more_button")))),m("div",{className:"Sidebar"},this.showCategories&&m(A,null),this.showForumNav&&m(L,null)))))]},r.newArticle=function(){var t=[],o=e().store.getBy("tags","slug",m.route.param("slug"));o&&t.push(o),m.route.set(e().route("blogComposer",{tags:t.map((function(t){return t.id()})).join(),lang:this.languages.length>0?this.currentSelectedLanguage:void 0}))},o}(h());const W=flarum.core.compat["forum/components/DiscussionPage"];var U=o.n(W);const q=flarum.core.compat["common/extend"],Y=flarum.core.compat["common/utils/mixin"];var V=function(t){function e(){return t.apply(this,arguments)||this}return d(e,t),e}(o.n(Y)()(n(),{discussion:n().hasOne("discussion"),featuredImage:n().attribute("featuredImage"),summary:n().attribute("summary"),isFeatured:n().attribute("isFeatured"),isSized:n().attribute("isSized"),isPendingReview:n().attribute("isPendingReview")}));const $=flarum.core.compat["tags/components/TagsPage"];var J=o.n($);function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=new Array(e);o=0?null:t})),t):t})),(0,q.extend)(x().prototype,"navItems",(function(t){return 0==app.forum.attribute("blogHideTags")||(app.forum.attribute("blogTags")||[]).forEach((function(e){t.remove("tag"+e)})),t}))}function X(t,e,o,r,a){void 0===o&&(o=!1),void 0===r&&(r=50),void 0===a&&(a=0);for(var n=function(t){if(Array.isArray(t))return t;var e=(null==t?void 0:t.children)||[];return Array.isArray(e)?e:[]}(t),i=null,s=0;s=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n);!(m=c()).done;){var d=X(m.value,e,!0,r,a+1);if(d)return d}return i}function Z(){var t=app.route.discussion;app.route.discussion=function(e,o){var r=!1;if(("both"===app.forum.attribute("blogRedirectsEnabled")||"discussions_only"===app.forum.attribute("blogRedirectsEnabled"))&&e.tags().length>0){var a=app.forum.attribute("blogTags");e.tags().filter((function(t){return a.indexOf(t.id())>=0||t.parent()&&a.indexOf(t.parent().id())>=0})).length>0&&(r=!0)}return r?e.lastReadPostNumber()>1?app.route("blogArticle.near",{id:e.slug(),near:e.lastReadPostNumber()}):app.route("blogArticle",{id:e.slug()}):t(e,o)}}const tt=flarum.core.compat["common/helpers/listItems"];var et=o.n(tt);const ot=flarum.core.compat["common/helpers/avatar"];var rt=o.n(ot),at=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){var t=this.attrs.loading?null:this.attrs.article?this.attrs.article.user():this.attrs.user;return m("div",{className:"FlarumBlog-Article-Author"},m("div",{className:"FlarumBlog-Article-Author-background "+(this.attrs.loading?"FlarumBlog-Author-Ghost":""),style:{backgroundColor:t&&t.color()?t.color():null}}),m("div",{className:"FlarumBlog-Article-Author-Avatar"},t?m(N(),{href:app.route("user",{username:t.username()})},rt()(t)):m("span",{className:"Avatar FlarumBlog-Author-Ghost"})),t&&m("div",{className:"FlarumBlog-Article-Author-Info"},m(N(),{href:app.route("user",{username:t.username()}),className:"FlarumBlog-Article-Author-Name"},t.displayName()),m("p",{className:"FlarumBlog-Article-Author-Bio"},t.bio&&t.bio()),m("ul",{className:"FlarumBlog-Article-Author-Extended"},et()(this.items().toArray()))),this.attrs.loading&&m("div",null,m("span",{className:"FlarumBlog-Article-Author-Name FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," ")))},o.items=function(){return new(j())},e}(w());const nt=flarum.core.compat["common/components/Modal"];var it=o.n(nt);const st=flarum.core.compat["common/utils/Stream"];var lt=o.n(st),ut=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.oninit=function(e){t.prototype.oninit.call(this,e),this.article=this.attrs.article,this.name=lt()(this.article.title()||""),this.redirect=this.attrs.redirect},o.className=function(){return"Modal--small Support-Modal"},o.title=function(){return app.translator.trans("v17development-flarum-blog.forum.tools.rename_article")},o.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},o.fields=function(){var t=new(j());return t.add("name",m("div",{className:"Form-group"},m("label",null,app.translator.trans("v17development-flarum-blog.forum.article.title"),":"),m("input",{className:"FormControl",placeholder:app.translator.trans("v17development-flarum-blog.forum.article.title"),bidi:this.name})),50),t.add("submit",m("div",{className:"Form-group"},b().component({type:"submit",className:"Button Button--primary SupportModal-save",loading:this.loading},app.translator.trans("core.forum.composer_edit.submit_button"))),-10),t},o.submitData=function(){return{title:this.name()}},o.onsubmit=function(t){var e=this;if(t.preventDefault(),this.loading=!0,this.attrs.onChange)return this.attrs.onChange(this.name()),void this.hide();this.article.save({title:this.name()}).then((function(){if(e.hide(),e.redirect){var t="/blog/"+e.article.slug();m.route.set(t,!0),window.history.replaceState(null,document.title,t)}}),(function(t){e.loading=!1,e.handleErrors(t)}))},e}(it());const mt=flarum.core.compat["tags/components/TagDiscussionModal"];var ct=o.n(mt);function dt(t,e,o,r,a,n,i){try{var s=t[n](i),l=s.value}catch(t){return void o(t)}s.done?e(l):Promise.resolve(l).then(r,a)}function gt(t){return function(){var e=this,o=arguments;return new Promise((function(r,a){var n=t.apply(e,o);function i(t){dt(n,r,a,i,s,"next",t)}function s(t){dt(n,r,a,i,s,"throw",t)}i(void 0)}))}}var pt=o(195),ft=o.n(pt);const ht=flarum.core.compat["common/components/Switch"];var vt=o.n(ht),bt=function(t){function r(){return t.apply(this,arguments)||this}d(r,t);var a=r.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.attrs.article?this.meta=this.attrs.article&&this.attrs.article.blogMeta()?this.attrs.article.blogMeta():e().store.createRecord("blogMeta"):this.meta=this.attrs.meta?this.attrs.meta:e().store.createRecord("blogMeta"),this.isNew=!this.meta.exists,this.summary=lt()(this.meta.summary()||""),this.featuredImage=lt()(this.meta.featuredImage()||""),this.isFeatured=lt()(this.meta.isFeatured()||!1),this.isSized=lt()(this.meta.isSized()||!1),this.isPendingReview=lt()(this.meta.isPendingReview()||!1)},a.className=function(){return"Modal--small Support-Modal"},a.title=function(){return e().translator.trans("v17development-flarum-blog.forum.article_settings.title")},a.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},a.fields=function(){var t=this,r=new(j());r.add("summary",m("div",{className:"Form-group"},m("label",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.summary.title"),":"),m("textarea",{className:"FormControl",style:{maxWidth:"100%",minWidth:"100%",width:"100%",minHeight:"120px"},bidi:this.summary,placeholder:e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.summary.placeholder")}),m("small",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.summary.helper_text"))),30);var a=null;if("fof-upload"in flarum.extensions&&e().forum.attribute("fof-upload.canUpload")){var n=o(482).components,i=n.Uploader,s=n.FileManagerModal,l=new i;a=m(b(),{class:"Button Button--icon",onclick:gt(ft().mark((function o(){return ft().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:e().modal.show(s,{uploader:l,onSelect:function(o){var r=e().store.getById("files",o[0]);t.featuredImage(r.url())}},!0);case 1:case"end":return o.stop()}}),o)}))),icon:"fas fa-cloud-upload-alt"})}return r.add("image",m("div",{className:"Form-group V17Blog-ArticleImage"},m("label",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.image.title"),":"),m("div",{"data-upload-enabled":!!a},m("input",{type:"text",className:"FormControl",bidi:this.featuredImage,placeholder:"https://"}),a),m("small",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.image.helper_text")),""!==this.featuredImage()&&m("img",{src:this.featuredImage(),alt:"Article image",title:e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.image.title"),style:{width:"100%",marginTop:"15px"}})),30),r.add("sized",m("div",{className:"Form-group"},vt().component({state:1==this.isSized(),onchange:function(e){t.isSized(e)}},[m("b",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.highlight.title")),m("div",{className:"helpText",style:{fontWeight:500}},e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.highlight.helper_text"))])),-10),r.add("submit",m("div",{className:"Form-group"},b().component({type:"submit",className:"Button Button--primary SupportModal-save",loading:this.loading},e().translator.trans("core.forum.composer_edit.submit_button"))),-10),r},a.submitData=function(){return{summary:this.summary(),featuredImage:this.featuredImage(),isFeatured:this.isFeatured(),isSized:this.isSized(),isPendingReview:this.isPendingReview(),relationships:this.isNew&&!this.attrs.isComposer?{discussion:this.attrs.article}:null}},a.onsubmit=function(t){var e=this;if(t.preventDefault(),this.attrs.onsubmit)return this.meta.pushData({attributes:this.submitData()}),this.attrs.onsubmit(this.meta),void this.hide();this.loading=!0,this.meta.save(this.submitData()).then((function(){e.attrs.article&&e.attrs.article.pushData({relationships:{blogMeta:e.meta}}),e.hide(),m.redraw()}),(function(t){e.loading=!1,e.handleErrors(t)}))},r}(it());const yt=flarum.core.compat["forum/components/ComposerBody"];var wt=o.n(yt);const Bt=flarum.core.compat["common/components/TextEditor"];var Nt=o.n(Bt),At=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){return m("div",null)},o.oncreate=function(e){t.prototype.oncreate.call(this,e),s9e.TextFormatter.preview(e.attrs.content||"",e.dom)},e}(w()),_t=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.oninit=function(e){t.prototype.oninit.call(this,e),this.previewContent=!1},r.view=function(){var t=this,o=this.composer.fields.content()&&""!==this.composer.fields.content(),r=this.loading||this.attrs.disabled;return m("div",{className:"Flarum-Blog-Composer "+(r?"Flarum-Blog-Composer-Loading":"")},m("div",{className:"Flarum-Blog-Composer-tabs"},m(b(),{className:!this.previewContent&&"AricleComposerButtonSelected",onclick:function(){return t.previewContent=!1}},e().translator.trans("v17development-flarum-blog.forum.composer.write")),m(b(),{className:this.previewContent&&"AricleComposerButtonSelected",onclick:function(){return t.previewContent=!0}},e().translator.trans("v17development-flarum-blog.forum.composer.view"))),m("div",{className:"Composer Flarum-Blog-Composer-body "+(this.previewContent?"Flarum-Blog-Composer-HideEditor":"")},this.previewContent&&m("div",{className:"Flarum-Blog-Composer-preview"},!o&&e().translator.trans("v17development-flarum-blog.forum.composer.nothing_to_preview"),m(At,{content:this.composer.fields.content()})),Nt().component({submitLabel:this.attrs.submitLabel||e().translator.trans("core.forum.composer_edit.submit_button"),placeholder:this.attrs.placeholder,disabled:r,composer:this.composer,preview:this.jumpToPreview&&this.jumpToPreview.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()})))},r.onsubmit=function(){this.attrs.onsubmit&&this.attrs.onsubmit()},o}(wt()),Ft=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.oninit=function(o){var r=this;if(t.prototype.oninit.call(this,o),e().setTitle(e().translator.trans("v17development-flarum-blog.forum.blog")),e().forum.attribute("canWriteBlogPosts")){if(e().history.push("blogComposer"),this.languages=e().store.all("discussion-languages")||[],this.bodyClass="BlogItemPage BlogItemPage--composer",this.articleLanguage=lt()(m.route.param("lang")?m.route.param("lang"):e().translator.locale),this.article=e().store.createRecord("discussions"),this.blogMeta=null,this.tags=[],m.route.param().tags){var a=Array.isArray(m.route.param().tags)?m.route.param().tags:m.route.param().tags.split(",");m.route.param().tags.length>0&&a.forEach((function(t){var o=e().store.getById("tags",t);o&&r.tags.push(o)}))}this.isSaving=!1}else m.route.set(e().route("blog"))},r.openTagsModal=function(t){var o=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||e().modal.show(ct(),{selectedTags:this.tags,onsubmit:function(t){o.tags=t}})},r.openNameArticleModal=function(t){var o=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||e().modal.show(ut,{article:this.article,onChange:function(t){o.article.pushData({attributes:{title:t}})}})},r.openBlogSettings=function(t){var o=this;t.preventDefault(),this.isSaving||e().modal.show(bt,{meta:this.blogMeta,onsubmit:function(t){return o.blogMeta=t}})},r.view=function(){return m("div",{className:"FlarumBlogItem"},m("div",{className:"container"},this.pageItems().toArray()))},r.pageItems=function(){var t=new(j());return t.add("toolButtons",m("div",{className:"FlarumBlog-ToolButtons"},m(N(),{href:e().route("blog"),className:"Button",loading:this.isSaving,icon:"fas fa-angle-left"},m("i",{class:"icon fas fa-angle-left Button-icon"}),m("span",{class:"Button-label"},e().translator.trans("v17development-flarum-blog.forum.return_to_overview")))),100),t.add("article",m("div",{className:"FlarumBlog-Article"},this.articleWrapperItems().toArray()),90),t},r.articleWrapperItems=function(){var t=new(j());return t.add("container",m("div",{className:"FlarumBlog-Article-Container"},this.articleItems().toArray()),100),t.add("sidebar",m("div",{className:"FlarumBlog-Article-Sidebar"},m(at,{user:e().session.user})),90),t},r.articleItems=function(){var t,o=this,r=new(j()),a=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null,n=this.blogMeta&&this.blogMeta.featuredImage()?"url("+this.blogMeta.featuredImage()+")":a;return"fof-discussion-language"in flarum.extensions&&(t=_.components.LanguageDropdown),r.add("content",m("div",{className:"FlarumBlog-Article-Content"},m("div",{className:"FlarumBlog-Article-Image FlarumBlog-default-image",style:{backgroundImage:n,cursor:"pointer"},onclick:function(t){return o.openBlogSettings(t)}}),m("div",{className:"FlarumBlog-Article-Content-Edit-Button"},m("div",{className:0===this.languages.length?"FlarumBlog-Article-Content-Edit-Dropdown":"FlarumBlog-Article-Content-EditButtons"},null!==this.languages&&this.languages.length>=1&&m(t,{selected:this.articleLanguage(),onclick:function(t){"string"==typeof t&&o.articleLanguage(t)}}),m(b(),{className:"Button",onclick:function(t){return o.openBlogSettings(t)},icon:"fas fa-pencil-alt",loading:this.isSaving},e().translator.trans("v17development-flarum-blog.forum.composer.update_settings")))),m("div",{className:"FlarumBlog-Article-Categories"},this.tags.map((function(t){return m("button",{class:"Button Button--text",onclick:function(t){return o.openTagsModal(t)}},t.name())})),m("button",{class:"Button Button--text",onclick:function(t){return o.openTagsModal(t)}},0===this.tags.length?e().translator.trans("v17development-flarum-blog.forum.composer.select_category"):e().translator.trans("v17development-flarum-blog.forum.composer.edit_categories")," ",m("i",{className:"fas fa-edit"}))),m("div",{className:"FlarumBlog-Article-Post"},m("h1",{onclick:function(){return o.openNameArticleModal()},className:"FlarumBlog-Article-Title",style:{cursor:"pointer"}},this.article&&this.article.title()&&""!==this.article.title()?this.article.title():e().translator.trans("v17development-flarum-blog.forum.composer.no_title"),m("button",{class:"Button Button--text",onclick:function(t){return t.preventDefault()}},m("i",{className:"fas fa-edit"}))),m("div",{className:"Post-body"},m(_t,{composer:e().composer,originalContent:"",submitLabel:e().translator.trans("v17development-flarum-blog.forum.composer.post_article"),placeholder:e().translator.trans("v17development-flarum-blog.forum.composer.enter_message_here"),onsubmit:function(){return o.create()},disabled:this.isSaving})))),100),r.add("commentsPlaceholder",m("div",{className:"FlarumBlog-Article-Comments"},m("h4",null,e().translator.trans("v17development-flarum-blog.forum.comment_section.comments")," (0)"),m("div",{className:"Post-body"},m("blockquote",{class:"uncited"},m("div",null,m("span",{className:"fas fa-ban",style:{marginRight:"5px"}})," ",e().translator.trans("v17development-flarum-blog.forum.composer.comment_section"))))),90),r},r.create=function(){var t=this,o=e().forum.attribute("blogTags")||[];if(0!==this.tags.length)if(this.article.title()&&""!==this.article.title())if(0!==this.tags.filter((function(t){return o.indexOf(t.id())>=0})).length){if(null!==this.blogMeta&&(this.blogMeta.featuredImage()||e().forum.attribute("blogDefaultImage"))&&this.blogMeta.summary()||confirm(e().translator.trans("v17development-flarum-blog.forum.composer.post_without_blog_info"))){var r={tags:this.tags};this.languages.length>0&&(r.language=e().store.getBy("discussion-languages","code",this.articleLanguage));var a={title:this.article.title(),content:e().composer.fields.content(),relationships:r,blogMeta:null!==this.blogMeta?{featuredImage:this.blogMeta.featuredImage(),summary:this.blogMeta.summary(),isSized:this.blogMeta.isSized()}:null};this.isSaving=!0,this.article.save(a).then((function(t){setTimeout((function(){m.route.set(e().route("blogArticle",{id:""+t.slug()}))}),500)})).catch((function(){t.isSaving=!1,m.redraw()}))}}else alert(e().translator.trans("v17development-flarum-blog.forum.composer.no_blog_tags_selected"));else this.openNameArticleModal();else this.openTagsModal()},o}(h());const xt=flarum.core,It=flarum.core.compat["common/utils/extractText"];var Ct=o.n(It),Lt=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){var t=this.attrs.discussion.subscription(),e=app.session.user.preferences().notify_newPost_email,o=Ct()(app.translator.trans(e?"flarum-subscriptions.forum.sub_controls.notify_email_tooltip":"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip")),r=app.translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),a="far fa-star";return"follow"===t&&(r=app.translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),a="fas fa-star"),m(P(),{text:o,position:"bottom"},m(b(),{className:"Button BlogArticleSubscription SubscriptionMenu-button--"+t,icon:a,onclick:this.saveSubscription.bind(this,this.attrs.discussion,-1!==["follow","ignore"].indexOf(t)?null:"follow")},r))},o.saveSubscription=function(t,e){t.save({subscription:e})},e}(w()),St=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){return m("div",{className:"FlarumBlog-Article-Sidebar"},m("ul",null,et()(this.items().toArray())))},o.items=function(){var t=new(j());return t.add("author",at.component(this.attrs),0),t.add("categories",A.component(this.attrs),0),t.add("nav",L.component(this.attrs),0),t},e}(w());const Pt=flarum.core.compat["forum/utils/DiscussionControls"];var Mt=o.n(Pt);const kt=flarum.core.compat["common/components/Alert"];var Tt=o.n(kt);const Et=flarum.core.compat["common/components/Dropdown"];var Rt=o.n(Et);const Dt=flarum.core.compat["forum/components/EditPostComposer"];var Ot=o.n(Dt),jt=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.init=function(){this.loadedPost=!1},r.manageArticleButtons=function(){var t=this,o=this.attrs.article,r=new(j()),a=flarum.extensions["fof-discussion-language"]&&void 0!==flarum.extensions["fof-discussion-language"].components?flarum.extensions["fof-discussion-language"].components.LanguageDiscussionModal:null;o.canRename()&&r.add("rename",b().component({className:"Button",onclick:function(){return e().modal.show(ut,{article:o})},icon:"fas fa-pencil-alt"},e().translator.trans("v17development-flarum-blog.forum.tools.rename_article")),100);var n=o.firstPost();return r.add("edit",b().component({className:"Button",disabled:!n||!n.canEdit(),onclick:function(){e().composer.load(Ot(),{post:n}),e().composer.show()},icon:"fas fa-edit"},e().translator.trans("v17development-flarum-blog.forum.tools.edit_article")),90),r.add("articleSettings",b().component({className:"Button",onclick:function(){return e().modal.show(bt,{article:o})},icon:"fas fa-cogs"},e().translator.trans("v17development-flarum-blog.forum.tools.article_settings")),80),o.canTag()&&r.add("tag",b().component({className:"Button",onclick:function(){return e().modal.show(ct(),{discussion:o})},icon:"fas fa-tag"},e().translator.trans("v17development-flarum-blog.forum.tools.update_category")),70),o.blogMeta()&&o.blogMeta().isPendingReview()&&(r.add("separator1",m("li",{className:"Dropdown-separator"}),65),r.add("approve",b().component({className:"Button",disabled:!e().forum.attribute("canApproveBlogPosts"),onclick:function(){o.blogMeta().save({isPendingReview:!1}).then((function(){e().alerts.show(Tt(),{type:"success"},e().translator.trans("v17development-flarum-blog.forum.review_article.approve_article_approved"))}),(function(e){t.loading=!1,t.handleErrors(e)}))},icon:"fas fa-thumbs-up"},e().translator.trans("v17development-flarum-blog.forum.review_article.approve_article")),60)),o.canChangeLanguage&&o.canChangeLanguage()&&a&&r.add("lang",b().component({icon:"fas fa-globe",onclick:function(){return e().modal.show(a,{discussion:o})}},e().translator.trans("fof-discussion-language.forum.discussion_controls.change_language_button")),50),r.add("separator2",m("li",{className:"Dropdown-separator"}),40),o.canLock()&&r.add("lock",b().component({className:"Button",onclick:Mt().lockAction.bind(o),icon:"fas "+(o.isLocked()?"fa-comments":"fa-comment-slash")},o.isLocked()?e().translator.trans("v17development-flarum-blog.forum.tools.enable_comments"):e().translator.trans("v17development-flarum-blog.forum.tools.disable_comments")),30),o.canHide()&&(o.isHidden()?(r.add("recover",b().component({className:"Button",onclick:Mt().restoreAction.bind(o),icon:"fas fa-eye"},e().translator.trans("v17development-flarum-blog.forum.tools.recover_article")),20),o.canDelete()&&r.add("delete",b().component({className:"Button",onclick:function(){if(confirm(Ct()(e().translator.trans("core.forum.discussion_controls.delete_confirmation"))))return"blogArticle"===e().history.getCurrent().name&&(e().previous?e().history.back():m.route.set(e().route("blog"))),o.delete().then((function(){m.redraw()}))},icon:"far fa-trash-alt"},e().translator.trans("v17development-flarum-blog.forum.tools.delete_forever")),10)):r.add("hide",b().component({className:"Button",onclick:Mt().hideAction.bind(o),icon:"fas fa-eye-slash"},e().translator.trans("v17development-flarum-blog.forum.tools.hide_article")),0)),r},r.view=function(){var t=this,e=this.attrs.article.firstPost();return m("div",{className:"FlarumBlog-Article-Content-Edit-Button"},m("div",{className:"FlarumBlog-Article-Content-Edit-Dropdown"},Rt().component({icon:"fas fa-cog",label:"Manage",buttonClassName:"Button",menuClassName:"Dropdown-menu--right",onshow:function(){!e||e.canEdit()||t.loadedPost||(t.loadedPost=!0,m.redraw())}},this.manageArticleButtons().toArray())))},o}(w());const Gt=flarum.core.compat["forum/components/CommentPost"];var zt=o.n(Gt);const Ht=flarum.core.compat["forum/components/PostStream"];var Wt=o.n(Ht);const Ut=flarum.core.compat["forum/states/PostStreamState"];var qt=o.n(Ut);const Yt=flarum.core.compat["common/helpers/fullTime"];var Vt=o.n(Yt),$t=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.oninit=function(o){t.prototype.oninit.call(this,o),e().setTitle(e().translator.trans("v17development-flarum-blog.forum.blog")),e().history.push("blogArticle"),this.bodyClass="BlogItemPage",this.near=m.route.param("near")||0,this.loading=!0,this.found=!1,this.article=null,this.loadBlogItem()},r.loadBlogItem=function(){var t=e().preloadedApiDocument();t?setTimeout(this.show.bind(this,t),0):e().store.find("discussions",m.route.param("id").split("-")[0]).then(this.show.bind(this)).catch((function(){m.redraw()})),m.redraw()},r.show=function(t){var o=this;this.article=t,e().setTitle(t.title()+" - "+e().translator.trans("v17development-flarum-blog.forum.blog")),this.loading=!1;var r=[];if(t.payload&&t.payload.included){var a=t.id();r=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===a})).map((function(t){return e().store.getById("posts",t.id)})).sort((function(t,e){return t.id()-e.id()})).slice(0,20)}this.stream=new(qt())(t,r),this.near&&this.stream.goToNumber(this.near||0,!0).then((function(){e().current.set("discussion",t),e().current.set("stream",o.stream)})),e().session.user&&!t.lastReadPostNumber()&&t.save({lastReadPostNumber:1}),m.redraw()},r.postItems=function(){var t,o,r,a=null;!this.loading&&this.article&&(a=null==(r=this.article)||null==r.firstPost?void 0:r.firstPost());var n,i,s,l=new(j());return l.add("title",m("h1",{className:D()("FlarumBlog-Article-Title",{"FlarumBlog-Article-GhostTitle":this.loading})},(null==this||null==(t=this.article)||null==t.title?void 0:t.title())||"Ghost title",(null==(o=this.article)||null==o.isHidden?void 0:o.isHidden())&&"("+e().translator.trans("v17development-flarum-blog.forum.hidden")+")"),100),l.add("publishDate",m("div",{className:D()("FlarumBlog-Article-PublishDate",{"FlarumBlog-Article-GhostPublishDate":this.loading})},this.article?Vt()(this.article.createdAt()):m("span",null," ")),80),this.loading&&l.add("skeleton",[0,1,2].map((function(){return m("div",null,m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",null," "))})),60),this.loading||(null!=(n=(i=this.article).blogMeta)&&null!=(s=n.call(i))&&null!=s.isPendingReview&&s.isPendingReview()&&l.add("review",m("div",{className:"Post-body"},m("blockquote",{class:"uncited",style:{fontSize:"16px"}},m("div",null,E()("far fa-clock",{style:{marginRight:"5px"}})," ",e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")))),60),a&&l.add("post",m(zt(),{post:a}),40)),l},r.contentItems=function(){var t,o,r,a,n,i,s,l,u,c,d=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null,g=null!=(t=this.article)&&null!=(o=t.blogMeta())&&null!=o.featuredImage&&o.featuredImage()?"url("+this.article.blogMeta().featuredImage()+")":d,p=new(j());return p.add("image",m("div",{className:D()("FlarumBlog-Article-Image FlarumBlog-default-image",{"FlarumBlog-Article-GhostImage":this.loading}),style:{backgroundImage:g,opacity:null!=(r=this.article)&&null!=r.isHidden&&r.isHidden()?.4:null}}),100),this.article&&(null!=(a=e().session.user)&&null!=a.canEdit&&a.canEdit()||null!=(n=this.article)&&null!=n.canRename&&n.canRename()||null!=(i=this.article)&&null!=i.posts&&null!=(s=i.posts())&&null!=(l=s[0])&&null!=l.canEdit&&l.canEdit())&&p.add("editArticle",m(jt,{article:this.article}),80),p.add("categories",m("div",{className:"FlarumBlog-Article-Categories"},!this.loading&&(null==(u=this.article)||null==u.tags||null==(c=u.tags())?void 0:c.map((function(t){return m(N(),{href:e().route("blogCategory",{slug:t.slug()})},t.name())}))),this.loading&&[0,1].map((function(){return m("span",{className:"FlarumBlog-Article-GhostCategory"},"Category")}))),60),p.add("post",m("div",{className:"FlarumBlog-Article-Post"},this.postItems().toArray()),40),p},r.articleItems=function(){var t,o,r,a=new(j());return a.add("content",m("div",{className:"FlarumBlog-Article-Content"},this.contentItems().toArray()),100),null!=this&&null!=(t=this.article)&&null!=t.isLocked&&t.isLocked()&&1===(null==this||null==(o=this.article)||null==o.commentCount?void 0:o.commentCount())||a.add("comments",m("div",{className:"FlarumBlog-Article-Comments"},!this.loading&&e().session.user&&this.article.subscription&&(!this.article.isLocked||this.article.isLocked&&!this.article.isLocked())&&m(Lt,{discussion:this.article}),m("h4",null,e().translator.trans("v17development-flarum-blog.forum.comment_section.comments")," (",this.article?this.article.commentCount()-1:0,")"),!this.loading&&(null==(r=this.article)||null==r.isLocked?void 0:r.isLocked())&&m("div",{className:"Post-body"},m("blockquote",{class:"uncited"},m("div",null,m("span",{className:"far fa-lock",style:{marginRight:"5px"}})," ",e().translator.trans("v17development-flarum-blog.forum.comment_section.locked")))),!this.loading&&this.article&&Wt().component({discussion:this.article,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),75),a},r.view=function(){return[1==e().forum.attribute("blogAddHero")&&p().prototype.hero(),m("div",{className:"FlarumBlogItem"},m("div",{className:"container"},m("div",{className:"FlarumBlog-ToolButtons"},m(N(),{href:e().route("blog"),className:"Button",onclick:function(t){e().previous.matches(H)&&(t.preventDefault(),history.back())}},m("i",{class:"icon fas fa-angle-left Button-icon"}),m("span",{class:"Button-label"},e().translator.trans("v17development-flarum-blog.forum.return_to_overview")))),m("div",{className:"FlarumBlog-Article"},m("div",{className:"FlarumBlog-Article-Container"},this.articleItems().toArray()),m(St,{article:this.article,loading:this.loading}))))]},r.positionChanged=function(t,o){var r=this.article;e().session.user&&o>(r.lastReadPostNumber()||0)&&(r.save({lastReadPostNumber:o}),m.redraw())},o}(h());const Jt=flarum.core.compat["common/components/LinkButton"];var Kt=o.n(Jt);function Qt(){(0,q.extend)(x().prototype,"navItems",(function(t){return app.forum.attribute("blogAddSidebarNav")&&"0"!==app.forum.attribute("blogAddSidebarNav")&&t.add("blog",m(Kt(),{icon:"fas fa-comment",href:app.route("blog")},app.translator.trans("v17development-flarum-blog.forum.blog")),15),t}))}e().initializers.add("v17development-flarum-blog",(function(t){t.routes.blog={path:"/blog",component:H},t.routes.blogCategory={path:"/blog/category/:slug",component:H},t.routes.blogComposer={path:"/blog/compose",component:Ft},t.routes.blogArticle={path:"/blog/:id",component:$t},t.routes["blogArticle.near"]={path:"/blog/:id/:near",component:$t},t.store.models.blogMeta=V,u().prototype.blogMeta=n().hasOne("blogMeta"),s().prototype.isBlog=n().attribute("isBlog"),(0,q.extend)(x().prototype,"oncreate",(function(){var t=this.currentTag(),o="both"===e().forum.attribute("blogRedirectsEnabled")||"tags_only"===e().forum.attribute("blogRedirectsEnabled");if(t&&o){var r=e().forum.attribute("blogTags");(r.indexOf(t.id())>=0||t.parent()&&r.indexOf(t.parent().id())>=0)&&m.route.set(e().route("blog"))}})),(0,q.override)(U().prototype,"show",(function(t,o){if(("both"===e().forum.attribute("blogRedirectsEnabled")||"discussions_only"===e().forum.attribute("blogRedirectsEnabled"))&&o&&o&&o.tags().length>0){var r=e().forum.attribute("blogTags");if(o.tags().filter((function(t){return r.indexOf(t.id())>=0||t.parent()&&r.indexOf(t.parent().id())>=0})).length>0){var a=e().route("blogArticle",{id:o.slug()});return m.route.set(a,null,{replace:!0}),null}}return t(o)})),Q(),Z(),Qt()}),-1e5),Object.assign(xt.compat,{"v17development/blog/components/BlogItemSidebar":St,"v17development/blog/components/BlogAuthor":at,"v17development/blog/components/Composer/Composer":_t,"v17development/blog/components/Composer/ComposerPreview":At,"v17development/blog/components/Modals/BlogPostSettingsModal":bt,"v17development/blog/components/Modals/RenameArticleModal":ut,"v17development/blog/components/ArticleSubscription":Lt,"v17development/blog/components/BlogCategories":A,"v17development/blog/components/BlogOverviewItem":G,"v17development/blog/components/BlogPostController":jt,"v17development/blog/components/FeaturedBlogItem":z,"v17development/blog/components/ForumNav":L,"v17development/blog/pages/BlogItem":$t,"v17development/blog/pages/BlogOverview":H,"v17development/blog/models/BlogMeta":V})})(),module.exports=r})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js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MAAAA,UAAoB,YAOrC,GALkBmH,EAAWvG,OAAO0E,QAAO,SAAC7E,GAC1C,OAAOgH,EAASM,QAAQtH,EAAIe,OAAS,GAAMf,EAAIY,UAAYoG,EAASM,QAAQtH,EAAIY,SAASG,OAAS,KAItF/F,OAAS,EAAG,CAExB,IAAM0O,EAAMnK,IAAAA,MAAU,cAAe,CACnCwB,GAAI2F,EAAWrG,SAKjB,OAFAC,EAAEC,MAAMoF,IAAI+D,EAAK,KAAM,CAAEvE,SAAS,IAE3B,MAIX,OAAOuN,EAAShM,MDChBE,IAGA+L,IAGAf,QAED,KHtCD3c,OAAO2d,OAAOhU,GAAAA,OAAQ,CACpB,iDAAkDkQ,GAClD,4CAA6CzG,GAE7C,mDAAoDoE,GACpD,0DAA2DN,GAE3D,8DAA+D1B,GAC/D,2DAA4D9B,GAE5D,qDAAsD0F,GACtD,gDAAiDlP,EACjD,kDAAmDuC,EACnD,oDAAqDuN,GACrD,kDAAmD5L,EACnD,0CAA2ChC,EAE3C,qCAAsCmP,GACtC,yCAA0C/M,EAE1C,sCAAuC8C","sources":["webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/regenerator/index.js","webpack://@v17development/flarum-blog/external assign \"flarum.extensions['fof-upload']\"","webpack://@v17development/flarum-blog/webpack/bootstrap","webpack://@v17development/flarum-blog/webpack/runtime/compat get default export","webpack://@v17development/flarum-blog/webpack/runtime/define property getters","webpack://@v17development/flarum-blog/webpack/runtime/hasOwnProperty shorthand","webpack://@v17development/flarum-blog/webpack/runtime/make namespace object","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/app']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/Model']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['tags/common/models/Tag']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['components/IndexPage']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Page']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Button']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/Component']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Link']\"","webpack://@v17development/flarum-blog/./src/forum/components/BlogCategories.js","webpack://@v17development/flarum-blog/external assign \"flarum.extensions['fof-discussion-language']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/SelectDropdown']\"","webpack://@v17development/flarum-blog/./src/forum/components/ForumNav.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@v17development/flarum-blog/./src/forum/components/BlogOverviewItem.tsx","webpack://@v17development/flarum-blog/./src/forum/components/FeaturedBlogItem.tsx","webpack://@v17development/flarum-blog/./src/forum/pages/BlogOverview.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/extend']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/mixin']\"","webpack://@v17development/flarum-blog/./src/common/Models/BlogMeta.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['tags/components/TagsPage']\"","webpack://@v17development/flarum-blog/./src/forum/utils/extendTagOverview.js","webpack://@v17development/flarum-blog/./src/forum/utils/discussionRouting.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@v17development/flarum-blog/./src/forum/components/BlogItemSidebar/BlogAuthor.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@v17development/flarum-blog/./src/forum/components/Modals/RenameArticleModal.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['tags/components/TagDiscussionModal']\"","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@v17development/flarum-blog/./src/forum/components/Modals/BlogPostSettingsModal.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/ComposerBody']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@v17development/flarum-blog/./src/forum/components/Composer/ComposerPreview.js","webpack://@v17development/flarum-blog/./src/forum/components/Composer/Composer.js","webpack://@v17development/flarum-blog/./src/forum/pages/BlogComposer.js","webpack://@v17development/flarum-blog/external assign \"flarum.core\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@v17development/flarum-blog/./src/forum/components/ArticleSubscription.js","webpack://@v17development/flarum-blog/./src/forum/components/BlogItemSidebar/BlogItemSidebar.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/EditPostComposer']\"","webpack://@v17development/flarum-blog/./src/forum/components/BlogPostController.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/PostStream']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/states/PostStreamState']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/fullTime']\"","webpack://@v17development/flarum-blog/./src/forum/pages/BlogItem.js","webpack://@v17development/flarum-blog/./src/forum/compat.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@v17development/flarum-blog/./src/forum/utils/addSidebarNav.js","webpack://@v17development/flarum-blog/./src/forum/index.ts","webpack://@v17development/flarum-blog/./src/forum/utils/redirector.js"],"sourcesContent":["var _typeof = require(\"./typeof.js\")[\"default\"];\n\nfunction _regeneratorRuntime() {\n \"use strict\";\n /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return generator._invoke = function (innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }(innerFn, self, context), generator;\n }\n\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n\n exports.wrap = wrap;\n var ContinueSentinel = {};\n\n function Generator() {}\n\n function GeneratorFunction() {}\n\n function GeneratorFunctionPrototype() {}\n\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n\n reject(record.arg);\n }\n\n var previousPromise;\n\n this._invoke = function (method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n };\n }\n\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n\n if (undefined === method) {\n if (context.delegate = null, \"throw\" === context.method) {\n if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) {\n if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n }\n\n return next.value = undefined, next.done = !0, next;\n };\n\n return next.next = next;\n }\n }\n\n return {\n next: doneResult\n };\n }\n\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, \"constructor\", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (object) {\n var keys = [];\n\n for (var key in object) {\n keys.push(key);\n }\n\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n }\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n\n return thrown;\n }\n }\n\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\n\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\n\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","module.exports = flarum.extensions['fof-upload'];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/common/models/Tag'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","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['components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","import Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\n\nexport default class BlogCategories extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.blogCategories = app.forum.attribute('blogTags');\n }\n\n view() {\n return (\n
\n

{app.translator.trans('v17development-flarum-blog.forum.categories')}

\n\n {this.blogCategories &&\n this.blogCategories.map((tagId) => {\n const tag = app.store.getById('tags', tagId);\n\n if (!tag) return null;\n\n const tags = [];\n let showSubTags = this.blogCategories.length === 1 || tag.slug() === m.route.param('slug');\n\n // Add tags\n app.store.all('tags').forEach((_tag) => {\n if (_tag.isChild() && _tag.parent() === tag) {\n if (_tag.slug() === m.route.param('slug')) {\n showSubTags = true;\n }\n\n tags.push(this.categoryItem(_tag));\n }\n });\n\n return showSubTags ? [this.categoryItem(tag), ...tags] : this.categoryItem(tag);\n })}\n
\n );\n }\n\n // Category item\n categoryItem(tag) {\n return (\n \n \n \n \n {tag.name()}\n \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.extensions['fof-discussion-language'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/SelectDropdown'];","import Component from 'flarum/common/Component';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\n\nexport default class ForumNav extends Component {\n view() {\n return (\n
\n

{app.translator.trans('v17development-flarum-blog.forum.forum_nav')}

\n \n
\n );\n }\n\n navItems() {\n return IndexPage.prototype.navItems();\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","import Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport icon from 'flarum/common/helpers/icon';\nimport Discussion from 'flarum/common/models/Discussion';\nimport classList from 'flarum/common/utils/classList';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\n\ninterface Attrs {\n article: Discussion;\n defaultImage: string;\n}\n\nexport default class BlogOverviewItem extends Component {\n titleItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add('title', <>{article.title()}, 100);\n\n if (article.blogMeta()?.isPendingReview?.() || article.isHidden()) {\n items.add('hidden', icon('fas fa-eye-slash', { class: 'BlogList-item-hidden' }), 80);\n }\n\n if (article.blogMeta()?.isPendingReview?.()) {\n items.add(\n 'pendingReview',\n \n {icon('far fa-clock', { class: 'BlogList-item-pendingReview' })}\n ,\n 40\n );\n }\n\n return items;\n }\n\n dataItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\n 'createdAt',\n \n {icon('far fa-clock')} {humanTime(article.createdAt())}\n ,\n 100\n );\n\n items.add(\n 'author',\n \n {icon('far fa-user')} {article.user()?.displayName?.() || app.translator.trans('core.lib.username.deleted_text')}\n ,\n 80\n );\n\n items.add(\n 'replies',\n \n {icon('far fa-comment')} {(article.commentCount() || 1) - 1}\n ,\n 60\n );\n\n return items;\n }\n\n contentItems(): ItemList {\n const { article } = this.attrs;\n const summary = article.blogMeta()?.summary?.() || '';\n\n const items = new ItemList();\n\n items.add('title',

{this.titleItems().toArray()}

, 100);\n\n if (summary) items.add('summary',

{summary}

, 80);\n\n items.add('data',
{this.dataItems().toArray()}
, 60);\n\n return items;\n }\n\n getImage(): string {\n const { article, defaultImage } = this.attrs;\n\n return article.blogMeta()?.featuredImage?.() ? `url(${article.blogMeta().featuredImage()})` : defaultImage;\n }\n\n view(vnode: Mithril.Vnode) {\n const { article, defaultImage } = this.attrs;\n\n const blogImage = this.getImage();\n\n const isSized = article.blogMeta()?.isSized?.();\n\n return (\n `BlogList-item-category-${tag.id()}`)\n )}\n >\n \n\n
{this.contentItems().toArray()}
\n \n );\n }\n}\n","import Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport icon from 'flarum/common/helpers/icon';\nimport Discussion from 'flarum/common/models/Discussion';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport classList from 'flarum/common/utils/classList';\nimport app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\n\ninterface Attrs {\n article: Discussion;\n defaultImage: string;\n}\n\nexport default class FeaturedBlogItem extends Component {\n topItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\n 'tags',\n \n {article.tags()?.map((tag) => (\n {tag.name()}\n ))}\n ,\n 100\n );\n\n // Sticky is an optional dependency, so we can't\n // assume method existence.\n if (article.isSticky?.()) {\n items.add('sticky', {icon('fas fa-thumbtack')}, 80);\n }\n\n if (article.blogMeta()?.isPendingReview?.() || article.isHidden()) {\n items.add('hidden', {icon('fas fa-eye-slash')}, 60);\n }\n\n if (article.blogMeta()?.isPendingReview?.()) {\n items.add(\n 'pendingReview',\n \n \n {icon('far fa-clock')} {app.translator.trans('v17development-flarum-blog.forum.review_article.pending_review_title')}\n \n ,\n 40\n );\n }\n\n return items;\n }\n\n dataItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\n 'createdAt',\n \n {icon('far fa-clock')} {humanTime(article.createdAt())}\n ,\n 100\n );\n\n items.add(\n 'author',\n \n {icon('far fa-user')} {article.user()?.displayName() || app.translator.trans('core.lib.username.deleted_text')}\n ,\n 80\n );\n\n items.add(\n 'replies',\n \n {icon('far fa-comment')} {article.commentCount() - 1}\n ,\n 60\n );\n\n return items;\n }\n\n view(vnode: Mithril.Vnode) {\n const { article, defaultImage } = this.attrs;\n\n const blogImage = article.blogMeta()?.featuredImage?.() ? `url(${article.blogMeta().featuredImage()})` : defaultImage;\n\n return (\n `BlogFeatured-list-item-category-${tag.id()}`),\n 'FlarumBlog-default-image'\n )}\n style={{ backgroundImage: blogImage }}\n >\n
{this.topItems().toArray()}
\n\n
\n

{article.title()}

\n\n
{this.dataItems().toArray()}
\n
\n \n );\n }\n}\n","import app from 'flarum/forum/app';\n\nimport IndexPage from 'flarum/components/IndexPage';\nimport Page from 'flarum/common/components/Page';\nimport Button from 'flarum/common/components/Button';\nimport BlogCategories from '../components/BlogCategories';\nimport Link from 'flarum/common/components/Link';\nimport { components } from '@fof-discussion-language';\nimport ForumNav from '../components/ForumNav';\nimport BlogOverviewItem from '../components/BlogOverviewItem';\nimport FeaturedBlogItem from '../components/FeaturedBlogItem';\n\nexport default class BlogOverview extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.setTitle(app.translator.trans('v17development-flarum-blog.forum.blog'));\n\n this.bodyClass = 'BlogOverviewPage';\n\n this.isLoading = true;\n this.featuredPosts = [];\n this.posts = [];\n this.hasMore = null;\n this.isLoadingMore = false;\n\n this.languages = app.store.all('discussion-languages');\n\n this.currentSelectedLanguage = m.route.param('lang') ? m.route.param('lang') : app.translator.formatter.locale;\n\n // Send history push\n app.history.push('blog');\n\n this.loadBlogOverview();\n\n this.featuredCount = parseInt(app.forum.attribute('blogFeaturedCount'));\n\n this.showCategories = true;\n this.showForumNav = true;\n }\n\n // Load blog overview\n loadBlogOverview() {\n const preloadBlogOverview = app.preloadedApiDocument();\n\n if (preloadBlogOverview) {\n // We must wrap this in a setTimeout because if we are mounting this\n // component for the first time on page load, then any calls to m.redraw\n // will be ineffective and thus any configs (scroll code) will be run\n // before stuff is drawn to the page.\n setTimeout(this.show.bind(this, preloadBlogOverview), 0);\n } else {\n this.reloadData();\n }\n\n m.redraw();\n }\n\n reloadData() {\n let q = `is:blog${m.route.param('slug') ? ` tag:${m.route.param('slug')}` : ''}`;\n\n if (this.languages !== null && this.languages.length >= 1) {\n q += ` language:${this.currentSelectedLanguage}`;\n }\n\n app.store\n .find('discussions', {\n filter: {\n q,\n },\n sort: '-createdAt',\n })\n .then(this.show.bind(this))\n .catch(() => {\n m.redraw();\n });\n }\n\n // Show blog posts\n show(articles) {\n if (articles.length === 0) {\n this.isLoading = false;\n m.redraw();\n\n return;\n }\n\n // Set pagination\n this.hasMore = articles.payload.links && articles.payload.links.next ? articles.payload.links.next : null;\n\n this.featuredPosts = articles.slice(0, this.featuredCount);\n this.posts = articles.length > this.featuredCount ? articles.slice(this.featuredCount, articles.length) : [];\n\n this.isLoading = false;\n\n m.redraw();\n }\n\n // Load more blog posts\n loadMore() {\n this.isLoadingMore = true;\n\n app.store\n .find(this.hasMore.replace(app.forum.attribute('apiUrl'), ''))\n .then((data) => {\n data.map((article) => this.posts.push(article));\n\n // Update hasmore button\n this.hasMore = data.payload.links && data.payload.links.next ? data.payload.links.next : null;\n })\n .catch(() => {})\n .then(() => {\n this.isLoadingMore = false;\n m.redraw();\n });\n }\n\n title() {\n if (!m.route.param('slug')) {\n return

{app.translator.trans('v17development-flarum-blog.forum.recent_posts')}

;\n }\n\n const tag = app.store.all('tags').filter((tag) => tag.slug() === m.route.param('slug'));\n\n return (\n

\n {tag && tag[0] && tag[0].name()}\n \n {' '}\n - {app.translator.trans('v17development-flarum-blog.forum.return_to_overview')}\n \n

\n );\n }\n\n view() {\n const defaultImage = app.forum.attribute('blogDefaultImage')\n ? `url(${app.forum.attribute('baseUrl') + '/assets/' + app.forum.attribute('blogDefaultImage')})`\n : null;\n\n let LanguageDropdown;\n if ('fof-discussion-language' in flarum.extensions) {\n LanguageDropdown = components.LanguageDropdown;\n }\n\n return [\n app.forum.attribute('blogAddHero') == true && IndexPage.prototype.hero(),\n
\n
\n
\n
\n {app.forum.attribute('canWriteBlogPosts') && (\n \n )}\n\n {this.languages !== null && this.languages.length >= 1 && (\n {\n this.currentSelectedLanguage = language;\n\n m.route.set(document.location.pathname, {\n lang: language,\n });\n\n this.reloadData();\n }}\n />\n )}\n
\n\n {this.title()}\n\n
\n\n
\n {/* Ghost data */}\n {this.isLoading &&\n [...new Array(this.featuredCount).fill(undefined)].map(() => (\n
\n
\n

 

\n\n
\n \n \n \n
\n
\n
\n ))}\n\n {!this.isLoading &&\n this.featuredPosts.length >= 0 &&\n this.featuredPosts.map((article) => )}\n
\n
\n\n
\n
\n {this.isLoading &&\n [false, false, true, false].map((state) => {\n return (\n
\n
\n
\n

 

\n

 

\n\n
\n \n \n \n
\n
\n
\n );\n })}\n\n {!this.isLoading &&\n this.posts.length >= 1 &&\n this.posts.map((article) => )}\n\n {!this.isLoading && this.featuredPosts.length > 0 && this.hasMore === null && (\n

{app.translator.trans('v17development-flarum-blog.forum.no_more_posts')}

\n )}\n\n {!this.isLoading && this.featuredPosts.length === 0 && this.posts.length === 0 && (\n

{app.translator.trans('v17development-flarum-blog.forum.category_empty')}

\n )}\n\n {!this.isLoading && this.hasMore !== null && (\n
\n \n
\n )}\n
\n\n
\n {this.showCategories && }\n {this.showForumNav && }\n
\n
\n
\n
,\n ];\n }\n\n newArticle() {\n let tags = [];\n\n // Get current category\n const currentCategory = app.store.getBy('tags', 'slug', m.route.param('slug'));\n\n if (currentCategory) {\n tags.push(currentCategory);\n }\n\n // Redirect to the composer\n m.route.set(\n app.route('blogComposer', {\n tags: tags.map((tag) => tag.id()).join(),\n lang: this.languages.length > 0 ? this.currentSelectedLanguage : undefined,\n })\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/mixin'];","import Model from 'flarum/common/Model';\nimport mixin from 'flarum/common/utils/mixin';\n\nexport default class BlogMeta extends mixin(Model, {\n discussion: Model.hasOne('discussion'),\n featuredImage: Model.attribute('featuredImage'),\n summary: Model.attribute('summary'),\n isFeatured: Model.attribute('isFeatured'),\n isSized: Model.attribute('isSized'),\n isPendingReview: Model.attribute('isPendingReview'),\n}) {}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/components/TagsPage'];","import { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport TagsPage from 'flarum/tags/components/TagsPage';\n\nexport default function extendTagOverview() {\n extend(TagsPage.prototype, 'view', function (markup) {\n // Pending xhr to load all tags, throw back loading indicator.\n if (this.loading) {\n return markup;\n }\n\n if (app.forum.attribute('blogHideTags') == false) return markup;\n\n // Get blog tag ID's\n const blogTags = app.forum.attribute('blogTags') || [];\n\n const tag_tiles_parent = findChild(markup, 'TagsPage-content', true);\n const tag_tiles = tag_tiles_parent?.children[0];\n\n if (!tag_tiles_parent || !tag_tiles) return markup;\n\n // Map through the tiles and remove tiles that are part of the blog\n tag_tiles.children = tag_tiles.children.map((tile, i) => {\n return blogTags.indexOf(this.tags[i].id()) >= 0 ? null : tile;\n });\n\n return markup;\n });\n\n extend(IndexPage.prototype, 'navItems', function (items) {\n if (app.forum.attribute('blogHideTags') == false) return items;\n\n const blogTags = app.forum.attribute('blogTags') || [];\n\n blogTags.forEach((id) => {\n items.remove(`tag${id}`);\n });\n\n return items;\n });\n}\n\nfunction findChild(parent, childClass, recursive = false, maxDepth = 50, depth = 0) {\n const children = getChildren(parent);\n let child = null;\n\n for (let i = 0; i < children.length; i++) {\n const childClassName = children[i]?.attrs?.className || '';\n if (childClassName.includes(childClass)) {\n child = children[i];\n break;\n }\n }\n\n // Recursive search\n if (recursive && !child && depth < maxDepth) {\n for (let subParent of children) {\n const subChild = findChild(subParent, childClass, true, maxDepth, depth + 1);\n if (subChild) {\n return subChild;\n }\n }\n }\n\n return child;\n}\n\nfunction getChildren(parent) {\n if (Array.isArray(parent)) {\n return parent;\n }\n const children = parent?.children || [];\n if (!Array.isArray(children)) {\n return [];\n }\n return children;\n}\n","export default function () {\n // Save the original function before we override it\n const original_discussion_route = app.route.discussion;\n\n /**\n * Generate a URL to a discussion OR a Blog Article.\n *\n * CORE_CODE_OVERRIDE: This overrides the standard function from flarum/core.\n * The code is inspired from js/src/forum/routes.js and now handles different types of discussions.\n * It will try to keep the original function executed if the discussion being\n * processed isn't a blog article.\n *\n * @param {Discussion} discussion\n * @param {Integer} [near]\n * @return {String}\n */\n app.route.discussion = (discussion, near) => {\n const discussionRedirectEnabled =\n app.forum.attribute('blogRedirectsEnabled') === 'both' || app.forum.attribute('blogRedirectsEnabled') === 'discussions_only';\n let shouldRedirect = false;\n if (discussionRedirectEnabled && discussion.tags().length > 0) {\n const blogTags = app.forum.attribute('blogTags');\n\n const foundTags = discussion.tags().filter((tag) => {\n return blogTags.indexOf(tag.id()) >= 0 || (tag.parent() && blogTags.indexOf(tag.parent().id()) >= 0);\n });\n\n if (foundTags.length > 0) {\n shouldRedirect = true;\n }\n }\n if (shouldRedirect) {\n return discussion.lastReadPostNumber() > 1\n ? app.route('blogArticle.near', {\n id: discussion.slug(),\n near: discussion.lastReadPostNumber(),\n })\n : app.route('blogArticle', {\n id: discussion.slug(),\n });\n } else {\n return original_discussion_route(discussion, near);\n }\n };\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","import Component from 'flarum/common/Component';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\nimport avatar from 'flarum/common/helpers/avatar';\nimport Link from 'flarum/common/components/Link';\n\nexport default class BlogAuthor extends Component {\n view() {\n const author = !this.attrs.loading ? (this.attrs.article ? this.attrs.article.user() : this.attrs.user) : null;\n\n return (\n
\n \n\n
\n {author ? (\n {avatar(author)}\n ) : (\n \n )}\n
\n\n {author && (\n
\n \n {author.displayName()}\n \n

{author.bio && author.bio()}

\n\n
    {listItems(this.items().toArray())}
\n
\n )}\n\n {this.attrs.loading && (\n
\n  \n

 

\n

 

\n

 

\n
\n )}\n
\n );\n }\n\n items() {\n return new ItemList();\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","import Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\n\nexport default class RenameArticleModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.article = this.attrs.article;\n\n this.name = Stream(this.article.title() || '');\n\n this.redirect = this.attrs.redirect;\n }\n\n className() {\n return 'Modal--small Support-Modal';\n }\n\n title() {\n return app.translator.trans('v17development-flarum-blog.forum.tools.rename_article');\n }\n\n content() {\n return (\n
\n
{this.fields().toArray()}
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n 'name',\n
\n \n \n
,\n 50\n );\n\n items.add(\n 'submit',\n
\n {Button.component(\n {\n type: 'submit',\n className: 'Button Button--primary SupportModal-save',\n loading: this.loading,\n },\n app.translator.trans('core.forum.composer_edit.submit_button')\n )}\n
,\n -10\n );\n\n return items;\n }\n\n submitData() {\n return {\n title: this.name(),\n };\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n // Do not save\n if (this.attrs.onChange) {\n this.attrs.onChange(this.name());\n this.hide();\n\n return;\n }\n\n this.article\n .save({\n title: this.name(),\n })\n .then(\n () => {\n this.hide();\n\n // Redirect\n if (this.redirect) {\n const url = `/blog/${this.article.slug()}`;\n\n m.route.set(url, true);\n window.history.replaceState(null, document.title, url);\n }\n },\n (response) => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/components/TagDiscussionModal'];","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Switch'];","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport Switch from 'flarum/common/components/Switch';\nimport selectFiles from '../../utils/selectFiles';\n\nexport default class BlogPostSettingsModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n if (this.attrs.article) {\n this.meta = this.attrs.article && this.attrs.article.blogMeta() ? this.attrs.article.blogMeta() : app.store.createRecord('blogMeta');\n } else {\n this.meta = this.attrs.meta ? this.attrs.meta : app.store.createRecord('blogMeta');\n }\n\n this.isNew = !this.meta.exists;\n\n this.summary = Stream(this.meta.summary() || '');\n\n this.featuredImage = Stream(this.meta.featuredImage() || '');\n\n this.isFeatured = Stream(this.meta.isFeatured() || false);\n this.isSized = Stream(this.meta.isSized() || false);\n this.isPendingReview = Stream(this.meta.isPendingReview() || false);\n }\n\n className() {\n return 'Modal--small Support-Modal';\n }\n\n title() {\n return app.translator.trans('v17development-flarum-blog.forum.article_settings.title');\n }\n\n content() {\n return (\n
\n
{this.fields().toArray()}
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n 'summary',\n
\n \n \n\n {app.translator.trans('v17development-flarum-blog.forum.article_settings.fields.summary.helper_text')}\n
,\n 30\n );\n\n let fofUploadButton = null;\n\n if ('fof-upload' in flarum.extensions && app.forum.attribute('fof-upload.canUpload')) {\n const {\n components: { Uploader, FileManagerModal },\n } = require('@fof-upload');\n\n const uploader = new Uploader();\n\n fofUploadButton = (\n {\n app.modal.show(\n FileManagerModal,\n {\n uploader: uploader,\n onSelect: (files) => {\n const file = app.store.getById('files', files[0]);\n\n this.featuredImage(file.url());\n },\n },\n true\n );\n }}\n icon=\"fas fa-cloud-upload-alt\"\n />\n );\n }\n\n items.add(\n 'image',\n
\n \n
\n \n {fofUploadButton}\n
\n\n {app.translator.trans('v17development-flarum-blog.forum.article_settings.fields.image.helper_text')}\n\n {this.featuredImage() !== '' && (\n \n )}\n
,\n 30\n );\n\n items.add(\n 'sized',\n
\n {Switch.component(\n {\n state: this.isSized() == true,\n onchange: (val) => {\n this.isSized(val);\n },\n },\n [\n {app.translator.trans('v17development-flarum-blog.forum.article_settings.fields.highlight.title')},\n
\n {app.translator.trans('v17development-flarum-blog.forum.article_settings.fields.highlight.helper_text')}\n
,\n ]\n )}\n
,\n -10\n );\n\n items.add(\n 'submit',\n
\n {Button.component(\n {\n type: 'submit',\n className: 'Button Button--primary SupportModal-save',\n loading: this.loading,\n },\n app.translator.trans('core.forum.composer_edit.submit_button')\n )}\n
,\n -10\n );\n\n return items;\n }\n\n submitData() {\n return {\n summary: this.summary(),\n featuredImage: this.featuredImage(),\n isFeatured: this.isFeatured(),\n isSized: this.isSized(),\n isPendingReview: this.isPendingReview(),\n relationships:\n this.isNew && !this.attrs.isComposer\n ? {\n discussion: this.attrs.article,\n }\n : null,\n };\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n // Submit data\n if (this.attrs.onsubmit) {\n // Update attributes\n this.meta.pushData({\n attributes: this.submitData(),\n });\n\n // Push\n this.attrs.onsubmit(this.meta);\n\n this.hide();\n return;\n }\n\n this.loading = true;\n\n this.meta.save(this.submitData()).then(\n () => {\n if (this.attrs.article) {\n this.attrs.article.pushData({\n relationships: {\n blogMeta: this.meta,\n },\n });\n }\n\n this.hide();\n m.redraw();\n },\n (response) => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ComposerBody'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","import Component from 'flarum/common/Component';\n\nexport default class ComposerPreview extends Component {\n view() {\n return
;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n s9e.TextFormatter.preview(vnode.attrs.content || '', vnode.dom);\n }\n}\n","import ComposerBody from 'flarum/forum/components/ComposerBody';\nimport Button from 'flarum/common/components/Button';\nimport TextEditor from 'flarum/common/components/TextEditor';\nimport ComposerPreview from './ComposerPreview';\nimport app from 'flarum/forum/app';\n\nexport default class Composer extends ComposerBody {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.previewContent = false;\n }\n\n // Render\n view() {\n const hasContent = this.composer.fields.content() && this.composer.fields.content() !== '';\n const loading = this.loading || this.attrs.disabled;\n\n return (\n
\n
\n \n \n
\n\n
\n {this.previewContent && (\n
\n {!hasContent && app.translator.trans('v17development-flarum-blog.forum.composer.nothing_to_preview')}\n\n \n
\n )}\n\n {TextEditor.component({\n submitLabel: this.attrs.submitLabel || app.translator.trans('core.forum.composer_edit.submit_button'),\n placeholder: this.attrs.placeholder,\n disabled: loading,\n composer: this.composer,\n preview: this.jumpToPreview && this.jumpToPreview.bind(this),\n onchange: this.composer.fields.content,\n onsubmit: this.onsubmit.bind(this),\n value: this.composer.fields.content(),\n })}\n
\n
\n );\n }\n\n // Submit trigger\n onsubmit() {\n if (this.attrs.onsubmit) {\n this.attrs.onsubmit();\n }\n }\n}\n","import app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport Button from 'flarum/common/components/Button';\nimport Link from 'flarum/common/components/Link';\nimport BlogAuthor from '../components/BlogItemSidebar/BlogAuthor';\nimport RenameArticleModal from '../components/Modals/RenameArticleModal';\nimport TagDiscussionModal from 'flarum/tags/components/TagDiscussionModal';\nimport BlogPostSettingsModal from '../components/Modals/BlogPostSettingsModal';\nimport Composer from '../components/Composer/Composer';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport { components } from '@fof-discussion-language';\n\nexport default class BlogComposer extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.setTitle(app.translator.trans('v17development-flarum-blog.forum.blog'));\n\n // User cannot write blogs\n if (!app.forum.attribute('canWriteBlogPosts')) {\n m.route.set(app.route('blog'));\n return;\n }\n\n // Send history push\n app.history.push('blogComposer');\n\n // Get languages (if enabled)\n this.languages = app.store.all('discussion-languages') || [];\n\n // Set body class\n this.bodyClass = 'BlogItemPage BlogItemPage--composer';\n\n // Article data\n this.articleLanguage = new Stream(m.route.param('lang') ? m.route.param('lang') : app.translator.locale);\n this.article = app.store.createRecord('discussions');\n this.blogMeta = null;\n\n this.tags = [];\n\n // Pre-select tags\n if (m.route.param().tags) {\n const tagList = Array.isArray(m.route.param().tags) ? m.route.param().tags : m.route.param().tags.split(',');\n\n if (m.route.param().tags.length > 0) {\n tagList.forEach((tagId) => {\n const foundTag = app.store.getById('tags', tagId);\n\n if (foundTag) {\n this.tags.push(foundTag);\n }\n });\n }\n }\n\n this.isSaving = false;\n }\n\n openTagsModal(e = null) {\n if (e) {\n e.preventDefault();\n }\n\n if (this.isSaving) return;\n\n app.modal.show(TagDiscussionModal, {\n selectedTags: this.tags,\n onsubmit: (tags) => {\n this.tags = tags;\n },\n });\n }\n\n openNameArticleModal(e = null) {\n if (e) {\n e.preventDefault();\n }\n\n if (this.isSaving) return;\n\n app.modal.show(RenameArticleModal, {\n article: this.article,\n onChange: (title) => {\n this.article.pushData({\n attributes: {\n title,\n },\n });\n },\n });\n }\n\n openBlogSettings(e) {\n e.preventDefault();\n\n if (this.isSaving) return;\n\n app.modal.show(BlogPostSettingsModal, {\n meta: this.blogMeta,\n onsubmit: (meta) => (this.blogMeta = meta),\n });\n }\n\n view() {\n return (\n
\n
{this.pageItems().toArray()}
\n
\n );\n }\n\n pageItems() {\n const items = new ItemList();\n\n items.add(\n 'toolButtons',\n
\n \n \n {app.translator.trans('v17development-flarum-blog.forum.return_to_overview')}\n \n
,\n 100\n );\n\n items.add('article',
{this.articleWrapperItems().toArray()}
, 90);\n\n return items;\n }\n\n articleWrapperItems() {\n const items = new ItemList();\n\n items.add('container',
{this.articleItems().toArray()}
, 100);\n\n items.add(\n 'sidebar',\n
\n \n
,\n 90\n );\n\n return items;\n }\n\n articleItems() {\n const items = new ItemList();\n\n const defaultImage = app.forum.attribute('blogDefaultImage')\n ? `url(${app.forum.attribute('baseUrl') + '/assets/' + app.forum.attribute('blogDefaultImage')})`\n : null;\n\n const blogImage = this.blogMeta && this.blogMeta.featuredImage() ? `url(${this.blogMeta.featuredImage()})` : defaultImage;\n\n let LanguageDropdown;\n if ('fof-discussion-language' in flarum.extensions) {\n LanguageDropdown = components.LanguageDropdown;\n }\n\n items.add(\n 'content',\n
\n this.openBlogSettings(e)}\n />\n\n
\n
\n {this.languages !== null && this.languages.length >= 1 && (\n {\n this.articleLanguage(language);\n m.redraw();\n }}\n />\n )}\n\n \n
\n
\n\n {/* Article Categories */}\n
\n {this.tags.map((tag) => (\n \n ))}\n\n \n
\n\n
\n {/* Article name */}\n

this.openNameArticleModal()} className=\"FlarumBlog-Article-Title\" style={{ cursor: 'pointer' }}>\n {this.article && this.article.title() && this.article.title() !== ''\n ? this.article.title()\n : app.translator.trans('v17development-flarum-blog.forum.composer.no_title')}\n\n \n

\n\n
\n this.create()}\n disabled={this.isSaving}\n />\n
\n
\n
,\n 100\n );\n\n items.add(\n 'commentsPlaceholder',\n
\n

{app.translator.trans('v17development-flarum-blog.forum.comment_section.comments')} (0)

\n {/* Locked */}\n\n
\n
\n
\n {' '}\n {app.translator.trans('v17development-flarum-blog.forum.composer.comment_section')}\n
\n
\n
\n
,\n 90\n );\n\n return items;\n }\n\n create() {\n const blogTags = app.forum.attribute('blogTags') || [];\n\n // Force tags\n if (this.tags.length === 0) {\n this.openTagsModal();\n return;\n }\n\n // Force title\n if (!this.article.title() || this.article.title() === '') {\n this.openNameArticleModal();\n return;\n }\n\n // Find blog tags\n const findblogTags = this.tags.filter((tag) => {\n return blogTags.indexOf(tag.id()) >= 0;\n });\n\n // No blog tags selected\n if (findblogTags.length === 0) {\n alert(app.translator.trans('v17development-flarum-blog.forum.composer.no_blog_tags_selected'));\n return;\n }\n\n if (\n (this.blogMeta === null || (!this.blogMeta.featuredImage() && !app.forum.attribute('blogDefaultImage')) || !this.blogMeta.summary()) &&\n !confirm(app.translator.trans('v17development-flarum-blog.forum.composer.post_without_blog_info'))\n ) {\n return;\n }\n\n let relationships = {\n tags: this.tags,\n };\n\n // Add languages if possible\n if (this.languages.length > 0) {\n relationships.language = app.store.getBy('discussion-languages', 'code', this.articleLanguage);\n }\n\n const data = {\n title: this.article.title(),\n content: app.composer.fields.content(),\n relationships,\n blogMeta:\n this.blogMeta !== null\n ? {\n featuredImage: this.blogMeta.featuredImage(),\n summary: this.blogMeta.summary(),\n isSized: this.blogMeta.isSized(),\n }\n : null,\n };\n\n this.isSaving = true;\n\n this.article\n .save(data)\n .then((article) => {\n setTimeout(() => {\n // Redirect to the article\n m.route.set(app.route('blogArticle', { id: `${article.slug()}` }));\n }, 500);\n })\n .catch(() => {\n this.isSaving = false;\n m.redraw();\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","import Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\nexport default class ArticleSubscription extends Component {\n view() {\n const currentSubscriptionState = this.attrs.discussion.subscription();\n\n const preferences = app.session.user.preferences();\n const notifyEmail = preferences['notify_newPost_email'];\n const notifyTooltip = extractText(\n app.translator.trans(\n notifyEmail ? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip' : 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip'\n )\n );\n\n let title = app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_button');\n let icon = 'far fa-star';\n\n // Following\n if (currentSubscriptionState === 'follow') {\n title = app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button');\n icon = 'fas fa-star';\n }\n\n return (\n \n \n {title}\n \n \n );\n }\n\n saveSubscription(discussion, subscription) {\n discussion.save({ subscription });\n }\n}\n","import Component from 'flarum/common/Component';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\nimport BlogAuthor from './BlogAuthor';\nimport BlogCategories from '../BlogCategories';\nimport ForumNav from '../ForumNav';\n\nexport default class BlogItemSidebar extends Component {\n view() {\n return (\n
\n
    {listItems(this.items().toArray())}
\n
\n );\n }\n\n items() {\n const itemlist = new ItemList();\n\n itemlist.add('author', BlogAuthor.component(this.attrs), 0);\n\n itemlist.add('categories', BlogCategories.component(this.attrs), 0);\n\n itemlist.add('nav', ForumNav.component(this.attrs), 0);\n\n return itemlist;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EditPostComposer'];","import Component from 'flarum/common/Component';\nimport TagDiscussionModal from 'flarum/tags/components/TagDiscussionModal';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport Alert from 'flarum/common/components/Alert';\nimport Button from 'flarum/common/components/Button';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport BlogPostSettingsModal from './Modals/BlogPostSettingsModal';\nimport EditPostComposer from 'flarum/forum/components/EditPostComposer';\nimport extractText from 'flarum/common/utils/extractText';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport RenameArticleModal from './Modals/RenameArticleModal';\nimport app from 'flarum/forum/app';\n\nexport default class BlogPostController extends Component {\n init() {\n this.loadedPost = false;\n }\n\n manageArticleButtons() {\n const article = this.attrs.article;\n const items = new ItemList();\n\n // Working for GlowingBlue version\n const LanguageDiscussionModal =\n flarum.extensions['fof-discussion-language'] && typeof flarum.extensions['fof-discussion-language'].components !== 'undefined'\n ? flarum.extensions['fof-discussion-language'].components.LanguageDiscussionModal\n : null;\n\n // Rename article\n if (article.canRename()) {\n items.add(\n 'rename',\n Button.component(\n {\n className: 'Button',\n onclick: () => app.modal.show(RenameArticleModal, { article }),\n icon: 'fas fa-pencil-alt',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.rename_article')\n ),\n 100\n );\n }\n\n const articlePost = article.firstPost();\n\n // Edit article\n items.add(\n 'edit',\n Button.component(\n {\n className: 'Button',\n disabled: !articlePost || !articlePost.canEdit(),\n onclick: () => {\n app.composer.load(EditPostComposer, { post: articlePost });\n app.composer.show();\n },\n icon: 'fas fa-edit',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.edit_article')\n ),\n 90\n );\n\n // Article settings\n items.add(\n 'articleSettings',\n Button.component(\n {\n className: 'Button',\n onclick: () => app.modal.show(BlogPostSettingsModal, { article }),\n icon: 'fas fa-cogs',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.article_settings')\n ),\n 80\n );\n\n // Update categories\n if (article.canTag()) {\n items.add(\n 'tag',\n Button.component(\n {\n className: 'Button',\n onclick: () => app.modal.show(TagDiscussionModal, { discussion: article }),\n icon: 'fas fa-tag',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.update_category')\n ),\n 70\n );\n }\n\n // Approve article\n if (article.blogMeta() && article.blogMeta().isPendingReview()) {\n items.add('separator1',
  • , 65);\n\n items.add(\n 'approve',\n Button.component(\n {\n className: 'Button',\n disabled: !app.forum.attribute('canApproveBlogPosts'),\n onclick: () => {\n article\n .blogMeta()\n .save({\n isPendingReview: false,\n })\n .then(\n () => {\n app.alerts.show(\n Alert,\n { type: 'success' },\n app.translator.trans('v17development-flarum-blog.forum.review_article.approve_article_approved')\n );\n },\n (response) => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n },\n icon: 'fas fa-thumbs-up',\n },\n app.translator.trans('v17development-flarum-blog.forum.review_article.approve_article')\n ),\n 60\n );\n }\n\n // Language\n if (article.canChangeLanguage && article.canChangeLanguage() && LanguageDiscussionModal) {\n items.add(\n 'lang',\n Button.component(\n {\n icon: 'fas fa-globe',\n onclick: () => app.modal.show(LanguageDiscussionModal, { discussion: article }),\n },\n app.translator.trans('fof-discussion-language.forum.discussion_controls.change_language_button')\n ),\n 50\n );\n }\n\n items.add('separator2',
  • , 40);\n\n // Lock article\n if (article.canLock()) {\n items.add(\n 'lock',\n Button.component(\n {\n className: 'Button',\n onclick: DiscussionControls.lockAction.bind(article),\n icon: `fas ${article.isLocked() ? 'fa-comments' : 'fa-comment-slash'}`,\n },\n article.isLocked()\n ? app.translator.trans('v17development-flarum-blog.forum.tools.enable_comments')\n : app.translator.trans('v17development-flarum-blog.forum.tools.disable_comments')\n ),\n 30\n );\n }\n\n // Hide/show/delete\n if (article.canHide()) {\n // Article is hidden\n if (article.isHidden()) {\n // Recover article\n items.add(\n 'recover',\n Button.component(\n {\n className: 'Button',\n onclick: DiscussionControls.restoreAction.bind(article),\n icon: 'fas fa-eye',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.recover_article')\n ),\n 20\n );\n\n // Delete article\n if (article.canDelete()) {\n items.add(\n 'delete',\n Button.component(\n {\n className: 'Button',\n onclick: () => {\n // Confirm deletion\n if (confirm(extractText(app.translator.trans('core.forum.discussion_controls.delete_confirmation')))) {\n // Redirect if the current page is an blog article\n if (app.history.getCurrent().name === 'blogArticle') {\n if (app.previous) {\n app.history.back();\n } else {\n m.route.set(app.route('blog'));\n }\n }\n\n return article.delete().then(() => {\n m.redraw();\n });\n }\n },\n icon: 'far fa-trash-alt',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.delete_forever')\n ),\n 10\n );\n }\n } else {\n // Hide article\n items.add(\n 'hide',\n Button.component(\n {\n className: 'Button',\n onclick: DiscussionControls.hideAction.bind(article),\n icon: 'fas fa-eye-slash',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.hide_article')\n ),\n 0\n );\n }\n }\n\n return items;\n }\n\n view() {\n const article = this.attrs.article;\n\n const articlePost = article.firstPost();\n\n return (\n
    \n
    \n {Dropdown.component(\n {\n icon: 'fas fa-cog',\n label: 'Manage',\n buttonClassName: 'Button',\n menuClassName: 'Dropdown-menu--right',\n onshow: () => {\n // Get post data to make sure they can edit the post\n if (articlePost && !articlePost.canEdit() && !this.loadedPost) {\n this.loadedPost = true;\n m.redraw();\n }\n },\n },\n this.manageArticleButtons().toArray()\n )}\n
    \n
    \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/PostStream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/PostStreamState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/fullTime'];","import Page from 'flarum/common/components/Page';\nimport IndexPage from 'flarum/components/IndexPage';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostStream from 'flarum/forum/components/PostStream';\nimport PostStreamState from 'flarum/forum/states/PostStreamState';\nimport BlogPostController from '../components/BlogPostController';\nimport BlogItemSidebar from '../components/BlogItemSidebar/BlogItemSidebar';\nimport Link from 'flarum/common/components/Link';\nimport BlogOverview from './BlogOverview';\nimport fullTime from 'flarum/common/helpers/fullTime';\nimport ArticleSubscription from '../components/ArticleSubscription';\nimport classList from 'flarum/common/utils/classList';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport icon from 'flarum/common/helpers/icon';\nimport app from 'flarum/forum/app';\n\nexport default class BlogItem extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.setTitle(app.translator.trans('v17development-flarum-blog.forum.blog'));\n\n // Send history push\n app.history.push('blogArticle');\n\n this.bodyClass = 'BlogItemPage';\n\n this.near = m.route.param('near') || 0;\n\n this.loading = true;\n this.found = false;\n this.article = null;\n\n this.loadBlogItem();\n }\n\n // Load blog overview\n loadBlogItem() {\n const preloadBlogOverview = app.preloadedApiDocument();\n\n if (preloadBlogOverview) {\n // We must wrap this in a setTimeout because if we are mounting this\n // component for the first time on page load, then any calls to m.redraw\n // will be ineffective and thus any configs (scroll code) will be run\n // before stuff is drawn to the page.\n setTimeout(this.show.bind(this, preloadBlogOverview), 0);\n } else {\n app.store\n .find('discussions', m.route.param('id').split('-')[0])\n .then(this.show.bind(this))\n .catch(() => {\n m.redraw();\n });\n }\n\n m.redraw();\n }\n\n // Show blog post\n show(article) {\n // Set article data\n this.article = article;\n\n // Update title\n app.setTitle(`${article.title()} - ${app.translator.trans('v17development-flarum-blog.forum.blog')}`);\n\n this.loading = false;\n\n let includedPosts = [];\n if (article.payload && article.payload.included) {\n const articleId = article.id();\n\n includedPosts = article.payload.included\n .filter(\n (record) =>\n record.type === 'posts' &&\n record.relationships &&\n record.relationships.discussion &&\n record.relationships.discussion.data.id === articleId\n )\n .map((record) => app.store.getById('posts', record.id))\n .sort((a, b) => a.id() - b.id())\n .slice(0, 20);\n }\n\n this.stream = new PostStreamState(article, includedPosts);\n\n // Scroll to specific post\n if (this.near) {\n this.stream.goToNumber(this.near || 0, true).then(() => {\n app.current.set('discussion', article);\n app.current.set('stream', this.stream);\n });\n }\n\n // Read post on load\n if (app.session.user && !article.lastReadPostNumber()) {\n article.save({ lastReadPostNumber: 1 });\n }\n\n m.redraw();\n }\n\n postItems() {\n let articlePost = null;\n\n if (!this.loading && this.article) {\n articlePost = this.article?.firstPost?.();\n }\n\n const items = new ItemList();\n\n items.add(\n 'title',\n \n {this?.article?.title?.() || 'Ghost title'}\n {this.article?.isHidden?.() && `(${app.translator.trans('v17development-flarum-blog.forum.hidden')})`}\n ,\n 100\n );\n\n items.add(\n 'publishDate',\n \n {this.article ? fullTime(this.article.createdAt()) :  }\n
  • ,\n 80\n );\n\n if (this.loading) {\n items.add(\n 'skeleton',\n [0, 1, 2].map(() => (\n
    \n

     

    \n

     

    \n

     

    \n

     

    \n
    \n )),\n 60\n );\n }\n\n if (!this.loading) {\n if (this.article.blogMeta?.()?.isPendingReview?.()) {\n items.add(\n 'review',\n
    \n
    \n
    \n {icon('far fa-clock', { style: { marginRight: '5px' } })}{' '}\n {app.translator.trans('v17development-flarum-blog.forum.review_article.pending_review')}\n
    \n
    \n
    ,\n 60\n );\n }\n\n if (articlePost) {\n items.add('post', , 40);\n }\n }\n\n return items;\n }\n\n contentItems() {\n const defaultImage = app.forum.attribute('blogDefaultImage')\n ? `url(${app.forum.attribute('baseUrl')}/assets/${app.forum.attribute('blogDefaultImage')})`\n : null;\n\n const blogImage = this.article?.blogMeta()?.featuredImage?.() ? `url(${this.article.blogMeta().featuredImage()})` : defaultImage;\n\n const items = new ItemList();\n\n items.add(\n 'image',\n ,\n 100\n );\n\n if (this.article && (app.session.user?.canEdit?.() || this.article?.canRename?.() || this.article?.posts?.()?.[0]?.canEdit?.())) {\n items.add('editArticle', , 80);\n }\n\n // Article Categories\n items.add(\n 'categories',\n
    \n {!this.loading && this.article?.tags?.()?.map((tag) => {tag.name()})}\n\n {this.loading && [0, 1].map(() => Category)}\n
    ,\n 60\n );\n\n items.add('post',
    {this.postItems().toArray()}
    , 40);\n\n return items;\n }\n\n articleItems() {\n const items = new ItemList();\n\n items.add('content',
    {this.contentItems().toArray()}
    , 100);\n\n if (!(this?.article?.isLocked?.() && this?.article?.commentCount?.() === 1)) {\n items.add(\n 'comments',\n
    \n {/* Show subscription state */}\n {!this.loading &&\n app.session.user &&\n this.article.subscription &&\n (!this.article.isLocked || (this.article.isLocked && !this.article.isLocked())) && }\n\n

    \n {app.translator.trans('v17development-flarum-blog.forum.comment_section.comments')} ({this.article ? this.article.commentCount() - 1 : 0})\n

    \n\n {/* Locked */}\n {!this.loading && this.article?.isLocked?.() && (\n
    \n
    \n
    \n {' '}\n {app.translator.trans('v17development-flarum-blog.forum.comment_section.locked')}\n
    \n
    \n
    \n )}\n\n {!this.loading &&\n this.article &&\n PostStream.component({\n discussion: this.article,\n stream: this.stream,\n onPositionChange: this.positionChanged.bind(this),\n })}\n
    ,\n 75\n );\n }\n\n return items;\n }\n\n view() {\n return [\n app.forum.attribute('blogAddHero') == true && IndexPage.prototype.hero(),\n
    \n
    \n
    \n {\n if (app.previous.matches(BlogOverview)) {\n e.preventDefault();\n history.back();\n }\n }}\n >\n \n {app.translator.trans('v17development-flarum-blog.forum.return_to_overview')}\n \n
    \n
    \n
    {this.articleItems().toArray()}
    \n\n \n
    \n
    \n
    ,\n ];\n }\n\n positionChanged(startNumber, endNumber) {\n const article = this.article;\n\n if (app.session.user && endNumber > (article.lastReadPostNumber() || 0)) {\n article.save({ lastReadPostNumber: endNumber });\n m.redraw();\n }\n }\n}\n","import { compat } from '@flarum/core/forum';\nimport BlogMeta from '../common/Models/BlogMeta';\nimport ArticleSubscription from './components/ArticleSubscription';\nimport BlogCategories from './components/BlogCategories';\nimport BlogAuthor from './components/BlogItemSidebar/BlogAuthor';\nimport BlogItemSidebar from './components/BlogItemSidebar/BlogItemSidebar';\nimport BlogOverviewItem from './components/BlogOverviewItem';\nimport BlogPostController from './components/BlogPostController';\nimport Composer from './components/Composer/Composer';\nimport ComposerPreview from './components/Composer/ComposerPreview';\nimport FeaturedBlogItem from './components/FeaturedBlogItem';\nimport ForumNav from './components/ForumNav';\nimport BlogPostSettingsModal from './components/Modals/BlogPostSettingsModal';\nimport RenameArticleModal from './components/Modals/RenameArticleModal';\nimport BlogItem from './pages/BlogItem';\nimport BlogOverview from './pages/BlogOverview';\n\nexport default () => {\n Object.assign(compat, {\n 'v17development/blog/components/BlogItemSidebar': BlogItemSidebar,\n 'v17development/blog/components/BlogAuthor': BlogAuthor,\n\n 'v17development/blog/components/Composer/Composer': Composer,\n 'v17development/blog/components/Composer/ComposerPreview': ComposerPreview,\n\n 'v17development/blog/components/Modals/BlogPostSettingsModal': BlogPostSettingsModal,\n 'v17development/blog/components/Modals/RenameArticleModal': RenameArticleModal,\n\n 'v17development/blog/components/ArticleSubscription': ArticleSubscription,\n 'v17development/blog/components/BlogCategories': BlogCategories,\n 'v17development/blog/components/BlogOverviewItem': BlogOverviewItem,\n 'v17development/blog/components/BlogPostController': BlogPostController,\n 'v17development/blog/components/FeaturedBlogItem': FeaturedBlogItem,\n 'v17development/blog/components/ForumNav': ForumNav,\n\n 'v17development/blog/pages/BlogItem': BlogItem,\n 'v17development/blog/pages/BlogOverview': BlogOverview,\n\n 'v17development/blog/models/BlogMeta': BlogMeta,\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","import { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nexport default function addSidebarNav() {\n extend(IndexPage.prototype, 'navItems', function (items) {\n if (app.forum.attribute('blogAddSidebarNav') && app.forum.attribute('blogAddSidebarNav') !== '0') {\n items.add(\n 'blog',\n \n {app.translator.trans('v17development-flarum-blog.forum.blog')}\n ,\n 15\n );\n }\n\n return items;\n });\n}\n","import app from 'flarum/forum/app';\nimport Model from 'flarum/common/Model';\nimport Tag from 'flarum/tags/common/models/Tag';\nimport Discussion from 'flarum/common/models/Discussion';\nimport BlogOverview from './pages/BlogOverview';\nimport redirector from './utils/redirector';\nimport BlogMeta from '../common/Models/BlogMeta';\nimport extendTagOverview from './utils/extendTagOverview';\nimport discussionRouting from './utils/discussionRouting';\nimport BlogComposer from './pages/BlogComposer';\nimport compat from './compat';\nimport addSidebarNav from './utils/addSidebarNav';\n\nimport BlogItem from './pages/BlogItem';\n\n// Register Flarum Blog\napp.initializers.add(\n 'v17development-flarum-blog',\n (app) => {\n app.routes.blog = { path: '/blog', component: BlogOverview };\n\n app.routes.blogCategory = {\n path: '/blog/category/:slug',\n component: BlogOverview,\n };\n\n app.routes.blogComposer = {\n path: '/blog/compose',\n component: BlogComposer,\n };\n\n app.routes.blogArticle = { path: '/blog/:id', component: BlogItem };\n\n app.routes['blogArticle.near'] = {\n path: '/blog/:id/:near',\n component: BlogItem,\n };\n\n app.store.models.blogMeta = BlogMeta;\n\n Discussion.prototype.blogMeta = Model.hasOne('blogMeta');\n Tag.prototype.isBlog = Model.attribute('isBlog');\n\n // Redirect discussions/tags to their blog post/overview\n redirector();\n\n // Extend tag overview.\n // Hide tags which are used as blog category\n extendTagOverview();\n\n // Make that blog articles have a blog route and not a discussion route\n discussionRouting();\n\n // Add a link to the blog to the IndexPage sidebar, if enabled.\n addSidebarNav();\n },\n -100000\n);\n\ncompat();\n","import IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\n\nexport default function () {\n // Redirect tag to blog category\n extend(IndexPage.prototype, 'oncreate', function () {\n const tag = this.currentTag();\n const tagRedirectEnabled = app.forum.attribute('blogRedirectsEnabled') === 'both' || app.forum.attribute('blogRedirectsEnabled') === 'tags_only';\n\n // Only trigger when it's a tag page and the redirects are enabled\n if (tag && tagRedirectEnabled) {\n const blogTags = app.forum.attribute('blogTags');\n\n // Tag is inside list\n if (blogTags.indexOf(tag.id()) >= 0 || (tag.parent() && blogTags.indexOf(tag.parent().id()) >= 0)) {\n m.route.set(app.route('blog'));\n }\n }\n });\n\n // Redirect discussion to blog article\n override(DiscussionPage.prototype, 'show', function (original, discussion) {\n const discussionRedirectEnabled =\n app.forum.attribute('blogRedirectsEnabled') === 'both' || app.forum.attribute('blogRedirectsEnabled') === 'discussions_only';\n\n if (discussionRedirectEnabled && discussion && discussion && discussion.tags().length > 0) {\n const blogTags = app.forum.attribute('blogTags');\n\n const foundTags = discussion.tags().filter((tag) => {\n return blogTags.indexOf(tag.id()) >= 0 || (tag.parent() && blogTags.indexOf(tag.parent().id()) >= 0);\n });\n\n // Only redirect if the discussion has blog tags\n if (foundTags.length > 0) {\n // Redirect to blog article\n const url = app.route('blogArticle', {\n id: discussion.slug(),\n });\n\n m.route.set(url, null, { replace: true });\n\n return null;\n }\n }\n\n return original(discussion);\n });\n}\n"],"names":["_typeof","require","_regeneratorRuntime","module","exports","__esModule","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","method","arg","Error","undefined","done","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","flarum","extensions","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","d","a","definition","o","get","prop","r","core","compat","_setPrototypeOf","p","bind","_inheritsLoose","subClass","superClass","BlogCategories","oninit","vnode","blogCategories","app","forum","attribute","view","className","translator","trans","map","tagId","tag","store","getById","tags","showSubTags","slug","m","route","param","all","_tag","isChild","parent","categoryItem","href","id","icon","style","backgroundColor","color","Component","ForumNav","buttonClassName","navItems","toArray","IndexPage","BlogOverviewItem","titleItems","article","attrs","items","ItemList","add","title","blogMeta","isPendingReview","isHidden","class","text","dataItems","humanTime","createdAt","user","commentCount","contentItems","summary","getImage","defaultImage","featuredImage","blogImage","isSized","classList","backgroundImage","FeaturedBlogItem","topItems","isSticky","position","BlogOverview","bodyClass","isLoading","featuredPosts","posts","hasMore","isLoadingMore","languages","currentSelectedLanguage","loadBlogOverview","featuredCount","parseInt","showCategories","showForumNav","preloadBlogOverview","setTimeout","show","reloadData","redraw","q","filter","sort","articles","payload","links","loadMore","replace","data","LanguageDropdown","components","onclick","newArticle","selected","language","set","document","location","pathname","lang","clear","Array","fill","loading","currentCategory","join","Page","BlogMeta","mixin","Model","discussion","isFeatured","extendTagOverview","extend","TagsPage","markup","blogTags","tag_tiles_parent","findChild","tag_tiles","children","tile","indexOf","remove","childClass","recursive","maxDepth","depth","isArray","getChildren","child","includes","subChild","original_discussion_route","near","shouldRedirect","lastReadPostNumber","BlogAuthor","author","username","avatar","bio","listItems","RenameArticleModal","Stream","redirect","content","fields","placeholder","bidi","Button","submitData","onsubmit","e","preventDefault","onChange","hide","save","url","window","history","replaceState","response","handleErrors","Modal","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","arguments","apply","BlogPostSettingsModal","meta","isNew","exists","maxWidth","minWidth","width","minHeight","fofUploadButton","Uploader","FileManagerModal","uploader","onSelect","files","file","src","alt","marginTop","Switch","onchange","val","fontWeight","relationships","isComposer","pushData","attributes","ComposerPreview","oncreate","s9e","TextFormatter","preview","dom","Composer","previewContent","hasContent","composer","disabled","TextEditor","submitLabel","jumpToPreview","ComposerBody","BlogComposer","articleLanguage","tagList","split","foundTag","isSaving","openTagsModal","TagDiscussionModal","selectedTags","openNameArticleModal","openBlogSettings","pageItems","articleWrapperItems","articleItems","cursor","originalContent","marginRight","confirm","alert","ArticleSubscription","currentSubscriptionState","subscription","notifyEmail","session","preferences","notifyTooltip","extractText","saveSubscription","BlogItemSidebar","itemlist","component","BlogPostController","init","loadedPost","manageArticleButtons","LanguageDiscussionModal","canRename","articlePost","firstPost","canEdit","EditPostComposer","post","canTag","Alert","canChangeLanguage","canLock","DiscussionControls","isLocked","canHide","canDelete","Dropdown","label","menuClassName","onshow","BlogItem","found","loadBlogItem","includedPosts","included","articleId","b","stream","PostStreamState","goToNumber","postItems","fullTime","fontSize","opacity","PostStream","onPositionChange","positionChanged","back","startNumber","endNumber","addSidebarNav","routes","blog","path","blogCategory","blogComposer","blogArticle","models","Discussion","Tag","currentTag","tagRedirectEnabled","override","DiscussionPage","original","discussionRouting","assign"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":";2BAAA,IAAIA,EAAUC,EAAAA,KAAAA,QAEd,SAASC,IACP,aAGAC,EAAOC,QAAUF,EAAsB,WACrC,OAAOE,GACND,EAAOC,QAAQC,YAAa,EAAMF,EAAOC,QAAiB,QAAID,EAAOC,QACxE,IAAIA,EAAU,GACVE,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eACZC,EAAU,mBAAqBC,OAASA,OAAS,GACjDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAE/C,SAASC,EAAOC,EAAKC,EAAKC,GACxB,OAAOf,OAAOgB,eAAeH,EAAKC,EAAK,CACrCC,MAAOA,EACPE,YAAY,EACZC,cAAc,EACdC,UAAU,IACRN,EAAIC,GAGV,IACEF,EAAO,GAAI,IACX,MAAOQ,GACPR,EAAS,SAAgBC,EAAKC,EAAKC,GACjC,OAAOF,EAAIC,GAAOC,GAItB,SAASM,EAAKC,EAASC,EAASC,EAAMC,GACpC,IAAIC,EAAiBH,GAAWA,EAAQtB,qBAAqB0B,EAAYJ,EAAUI,EAC/EC,EAAY5B,OAAO6B,OAAOH,EAAezB,WACzC6B,EAAU,IAAIC,EAAQN,GAAe,IACzC,OAAOG,EAAUI,QAAU,SAAUV,EAASE,EAAMM,GAClD,IAAIG,EAAQ,iBACZ,OAAO,SAAUC,EAAQC,GACvB,GAAI,cAAgBF,EAAO,MAAM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G,IAAAA,MAAU,cAM5BiT,EAAAA,EAAAA,UAASC,IAAAA,UAA0B,QAAQ,SAAUC,EAAUhM,GAI7D,IAFkD,SAAhDnH,IAAAA,MAAAA,UAAoB,yBAAsF,qBAAhDA,IAAAA,MAAAA,UAAoB,0BAE/CmH,GAAcA,GAAcA,EAAWvG,OAAOnF,OAAS,EAAG,CACzF,IAAMgM,EAAWzH,IAAAA,MAAAA,UAAoB,YAOrC,GALkBmH,EAAWvG,OAAO0E,QAAO,SAAC7E,GAC1C,OAAOgH,EAASM,QAAQtH,EAAIe,OAAS,GAAMf,EAAIY,UAAYoG,EAASM,QAAQtH,EAAIY,SAASG,OAAS,KAItF/F,OAAS,EAAG,CAExB,IAAM0O,EAAMnK,IAAAA,MAAU,cAAe,CACnCwB,GAAI2F,EAAWrG,SAKjB,OAFAC,EAAEC,MAAMoF,IAAI+D,EAAK,KAAM,CAAEvE,SAAS,IAE3B,MAIX,OAAOuN,EAAShM,MDChBE,IAGA+L,IAGAf,QAED,KHtCD3c,OAAO2d,OAAOhU,GAAAA,OAAQ,CACpB,iDAAkDkQ,GAClD,4CAA6CzG,GAE7C,mDAAoDoE,GACpD,0DAA2DN,GAE3D,8DAA+D1B,GAC/D,2DAA4D9B,GAE5D,qDAAsD0F,GACtD,gDAAiDlP,EACjD,kDAAmDuC,EACnD,oDAAqDuN,GACrD,kDAAmD5L,EACnD,0CAA2ChC,EAE3C,qCAAsCmP,GACtC,yCAA0C/M,EAE1C,sCAAuC8C","sources":["webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/regenerator/index.js","webpack://@v17development/flarum-blog/external assign \"flarum.extensions['fof-upload']\"","webpack://@v17development/flarum-blog/webpack/bootstrap","webpack://@v17development/flarum-blog/webpack/runtime/compat get default export","webpack://@v17development/flarum-blog/webpack/runtime/define property getters","webpack://@v17development/flarum-blog/webpack/runtime/hasOwnProperty shorthand","webpack://@v17development/flarum-blog/webpack/runtime/make namespace object","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/app']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/Model']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['tags/common/models/Tag']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['components/IndexPage']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Page']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Button']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/Component']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Link']\"","webpack://@v17development/flarum-blog/./src/forum/components/BlogCategories.js","webpack://@v17development/flarum-blog/external assign \"flarum.extensions['fof-discussion-language']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/SelectDropdown']\"","webpack://@v17development/flarum-blog/./src/forum/components/ForumNav.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@v17development/flarum-blog/./src/forum/components/BlogOverviewItem.tsx","webpack://@v17development/flarum-blog/./src/forum/components/FeaturedBlogItem.tsx","webpack://@v17development/flarum-blog/./src/forum/pages/BlogOverview.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/extend']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/mixin']\"","webpack://@v17development/flarum-blog/./src/common/Models/BlogMeta.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['tags/components/TagsPage']\"","webpack://@v17development/flarum-blog/./src/forum/utils/extendTagOverview.js","webpack://@v17development/flarum-blog/./src/forum/utils/discussionRouting.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@v17development/flarum-blog/./src/forum/components/BlogItemSidebar/BlogAuthor.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@v17development/flarum-blog/./src/forum/components/Modals/RenameArticleModal.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['tags/components/TagDiscussionModal']\"","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@v17development/flarum-blog/./src/forum/components/Modals/BlogPostSettingsModal.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/ComposerBody']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@v17development/flarum-blog/./src/forum/components/Composer/ComposerPreview.js","webpack://@v17development/flarum-blog/./src/forum/components/Composer/Composer.js","webpack://@v17development/flarum-blog/./src/forum/pages/BlogComposer.js","webpack://@v17development/flarum-blog/external assign \"flarum.core\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@v17development/flarum-blog/./src/forum/components/ArticleSubscription.js","webpack://@v17development/flarum-blog/./src/forum/components/BlogItemSidebar/BlogItemSidebar.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/EditPostComposer']\"","webpack://@v17development/flarum-blog/./src/forum/components/BlogPostController.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/PostStream']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/states/PostStreamState']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/fullTime']\"","webpack://@v17development/flarum-blog/./src/forum/pages/BlogItem.js","webpack://@v17development/flarum-blog/./src/forum/compat.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@v17development/flarum-blog/./src/forum/utils/addSidebarNav.js","webpack://@v17development/flarum-blog/./src/forum/index.ts","webpack://@v17development/flarum-blog/./src/forum/utils/redirector.js"],"sourcesContent":["var _typeof = require(\"./typeof.js\")[\"default\"];\n\nfunction _regeneratorRuntime() {\n \"use strict\";\n /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return generator._invoke = function (innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }(innerFn, self, context), generator;\n }\n\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n\n exports.wrap = wrap;\n var ContinueSentinel = {};\n\n function Generator() {}\n\n function GeneratorFunction() {}\n\n function GeneratorFunctionPrototype() {}\n\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n\n reject(record.arg);\n }\n\n var previousPromise;\n\n this._invoke = function (method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n };\n }\n\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n\n if (undefined === method) {\n if (context.delegate = null, \"throw\" === context.method) {\n if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) {\n if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n }\n\n return next.value = undefined, next.done = !0, next;\n };\n\n return next.next = next;\n }\n }\n\n return {\n next: doneResult\n };\n }\n\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, \"constructor\", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (object) {\n var keys = [];\n\n for (var key in object) {\n keys.push(key);\n }\n\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n }\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n\n return thrown;\n }\n }\n\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\n\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\n\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","module.exports = flarum.extensions['fof-upload'];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/common/models/Tag'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","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['components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","import Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\n\nexport default class BlogCategories extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.blogCategories = app.forum.attribute('blogTags');\n }\n\n view() {\n return (\n
    \n

    {app.translator.trans('v17development-flarum-blog.forum.categories')}

    \n\n {this.blogCategories &&\n this.blogCategories.map((tagId) => {\n const tag = app.store.getById('tags', tagId);\n\n if (!tag) return null;\n\n const tags = [];\n let showSubTags = this.blogCategories.length === 1 || tag.slug() === m.route.param('slug');\n\n // Add tags\n app.store.all('tags').forEach((_tag) => {\n if (_tag.isChild() && _tag.parent() === tag) {\n if (_tag.slug() === m.route.param('slug')) {\n showSubTags = true;\n }\n\n tags.push(this.categoryItem(_tag));\n }\n });\n\n return showSubTags ? [this.categoryItem(tag), ...tags] : this.categoryItem(tag);\n })}\n
    \n );\n }\n\n // Category item\n categoryItem(tag) {\n return (\n \n \n \n \n {tag.name()}\n \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.extensions['fof-discussion-language'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/SelectDropdown'];","import Component from 'flarum/common/Component';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\n\nexport default class ForumNav extends Component {\n view() {\n return (\n
    \n

    {app.translator.trans('v17development-flarum-blog.forum.forum_nav')}

    \n \n
    \n );\n }\n\n navItems() {\n return IndexPage.prototype.navItems();\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","import Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport icon from 'flarum/common/helpers/icon';\nimport Discussion from 'flarum/common/models/Discussion';\nimport classList from 'flarum/common/utils/classList';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\n\ninterface Attrs {\n article: Discussion;\n defaultImage: string;\n}\n\nexport default class BlogOverviewItem extends Component {\n titleItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add('title', <>{article.title()}, 100);\n\n if (article.blogMeta()?.isPendingReview?.() || article.isHidden()) {\n items.add('hidden', icon('fas fa-eye-slash', { class: 'BlogList-item-hidden' }), 80);\n }\n\n if (article.blogMeta()?.isPendingReview?.()) {\n items.add(\n 'pendingReview',\n \n {icon('far fa-clock', { class: 'BlogList-item-pendingReview' })}\n ,\n 40\n );\n }\n\n return items;\n }\n\n dataItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\n 'createdAt',\n \n {icon('far fa-clock')} {humanTime(article.createdAt())}\n ,\n 100\n );\n\n items.add(\n 'author',\n \n {icon('far fa-user')} {article.user()?.displayName?.() || app.translator.trans('core.lib.username.deleted_text')}\n ,\n 80\n );\n\n items.add(\n 'replies',\n \n {icon('far fa-comment')} {(article.commentCount() || 1) - 1}\n ,\n 60\n );\n\n return items;\n }\n\n contentItems(): ItemList {\n const { article } = this.attrs;\n const summary = article.blogMeta()?.summary?.() || '';\n\n const items = new ItemList();\n\n items.add('title',

    {this.titleItems().toArray()}

    , 100);\n\n if (summary) items.add('summary',

    {summary}

    , 80);\n\n items.add('data',
    {this.dataItems().toArray()}
    , 60);\n\n return items;\n }\n\n getImage(): string {\n const { article, defaultImage } = this.attrs;\n\n return article.blogMeta()?.featuredImage?.() ? `url(${article.blogMeta().featuredImage()})` : defaultImage;\n }\n\n view(vnode: Mithril.Vnode) {\n const { article, defaultImage } = this.attrs;\n\n const blogImage = this.getImage();\n\n const isSized = article.blogMeta()?.isSized?.();\n\n return (\n `BlogList-item-category-${tag.id()}`)\n )}\n >\n \n\n
    {this.contentItems().toArray()}
    \n \n );\n }\n}\n","import Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport icon from 'flarum/common/helpers/icon';\nimport Discussion from 'flarum/common/models/Discussion';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport classList from 'flarum/common/utils/classList';\nimport app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\n\ninterface Attrs {\n article: Discussion;\n defaultImage: string;\n}\n\nexport default class FeaturedBlogItem extends Component {\n topItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\n 'tags',\n \n {article.tags()?.map((tag) => (\n {tag.name()}\n ))}\n ,\n 100\n );\n\n // Sticky is an optional dependency, so we can't\n // assume method existence.\n if (article.isSticky?.()) {\n items.add('sticky', {icon('fas fa-thumbtack')}, 80);\n }\n\n if (article.blogMeta()?.isPendingReview?.() || article.isHidden()) {\n items.add('hidden', {icon('fas fa-eye-slash')}, 60);\n }\n\n if (article.blogMeta()?.isPendingReview?.()) {\n items.add(\n 'pendingReview',\n \n \n {icon('far fa-clock')} {app.translator.trans('v17development-flarum-blog.forum.review_article.pending_review_title')}\n \n ,\n 40\n );\n }\n\n return items;\n }\n\n dataItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\n 'createdAt',\n \n {icon('far fa-clock')} {humanTime(article.createdAt())}\n ,\n 100\n );\n\n items.add(\n 'author',\n \n {icon('far fa-user')} {article.user()?.displayName() || app.translator.trans('core.lib.username.deleted_text')}\n ,\n 80\n );\n\n items.add(\n 'replies',\n \n {icon('far fa-comment')} {article.commentCount() - 1}\n ,\n 60\n );\n\n return items;\n }\n\n view(vnode: Mithril.Vnode) {\n const { article, defaultImage } = this.attrs;\n\n const blogImage = article.blogMeta()?.featuredImage?.() ? `url(${article.blogMeta().featuredImage()})` : defaultImage;\n\n return (\n `BlogFeatured-list-item-category-${tag.id()}`),\n 'FlarumBlog-default-image'\n )}\n style={{ backgroundImage: blogImage }}\n >\n
    {this.topItems().toArray()}
    \n\n
    \n

    {article.title()}

    \n\n
    {this.dataItems().toArray()}
    \n
    \n \n );\n }\n}\n","import app from 'flarum/forum/app';\n\nimport IndexPage from 'flarum/components/IndexPage';\nimport Page from 'flarum/common/components/Page';\nimport Button from 'flarum/common/components/Button';\nimport BlogCategories from '../components/BlogCategories';\nimport Link from 'flarum/common/components/Link';\nimport { components } from '@fof-discussion-language';\nimport ForumNav from '../components/ForumNav';\nimport BlogOverviewItem from '../components/BlogOverviewItem';\nimport FeaturedBlogItem from '../components/FeaturedBlogItem';\n\nexport default class BlogOverview extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.setTitle(app.translator.trans('v17development-flarum-blog.forum.blog'));\n\n this.bodyClass = 'BlogOverviewPage';\n\n this.isLoading = true;\n this.featuredPosts = [];\n this.posts = [];\n this.hasMore = null;\n this.isLoadingMore = false;\n\n this.languages = app.store.all('discussion-languages');\n\n this.currentSelectedLanguage = m.route.param('lang') ? m.route.param('lang') : app.translator.formatter.locale;\n\n // Send history push\n app.history.push('blog');\n\n this.loadBlogOverview();\n\n this.featuredCount = parseInt(app.forum.attribute('blogFeaturedCount'));\n\n this.showCategories = true;\n this.showForumNav = true;\n }\n\n // Load blog overview\n loadBlogOverview() {\n const preloadBlogOverview = app.preloadedApiDocument();\n\n if (preloadBlogOverview) {\n // We must wrap this in a setTimeout because if we are mounting this\n // component for the first time on page load, then any calls to m.redraw\n // will be ineffective and thus any configs (scroll code) will be run\n // before stuff is drawn to the page.\n setTimeout(this.show.bind(this, preloadBlogOverview), 0);\n } else {\n this.reloadData();\n }\n\n m.redraw();\n }\n\n reloadData() {\n let q = `is:blog${m.route.param('slug') ? ` tag:${m.route.param('slug')}` : ''}`;\n\n if (this.languages !== null && this.languages.length >= 1) {\n q += ` language:${this.currentSelectedLanguage}`;\n }\n\n app.store\n .find('discussions', {\n filter: {\n q,\n },\n sort: '-createdAt',\n })\n .then(this.show.bind(this))\n .catch(() => {\n m.redraw();\n });\n }\n\n // Show blog posts\n show(articles) {\n if (articles.length === 0) {\n this.isLoading = false;\n m.redraw();\n\n return;\n }\n\n // Set pagination\n this.hasMore = articles.payload.links && articles.payload.links.next ? articles.payload.links.next : null;\n\n this.featuredPosts = articles.slice(0, this.featuredCount);\n this.posts = articles.length > this.featuredCount ? articles.slice(this.featuredCount, articles.length) : [];\n\n this.isLoading = false;\n\n m.redraw();\n }\n\n // Load more blog posts\n loadMore() {\n this.isLoadingMore = true;\n\n app.store\n .find(this.hasMore.replace(app.forum.attribute('apiUrl'), ''))\n .then((data) => {\n data.map((article) => this.posts.push(article));\n\n // Update hasmore button\n this.hasMore = data.payload.links && data.payload.links.next ? data.payload.links.next : null;\n })\n .catch(() => {})\n .then(() => {\n this.isLoadingMore = false;\n m.redraw();\n });\n }\n\n title() {\n if (!m.route.param('slug')) {\n return

    {app.translator.trans('v17development-flarum-blog.forum.recent_posts')}

    ;\n }\n\n const tag = app.store.all('tags').filter((tag) => tag.slug() === m.route.param('slug'));\n\n return (\n

    \n {tag && tag[0] && tag[0].name()}\n \n {' '}\n - {app.translator.trans('v17development-flarum-blog.forum.return_to_overview')}\n \n

    \n );\n }\n\n view() {\n const defaultImage = app.forum.attribute('blogDefaultImage')\n ? `url(${app.forum.attribute('baseUrl') + '/assets/' + app.forum.attribute('blogDefaultImage')})`\n : null;\n\n let LanguageDropdown;\n if ('fof-discussion-language' in flarum.extensions) {\n LanguageDropdown = components.LanguageDropdown;\n }\n\n return [\n app.forum.attribute('blogAddHero') == true && IndexPage.prototype.hero(),\n
    \n
    \n
    \n
    \n {app.forum.attribute('canWriteBlogPosts') && (\n \n )}\n\n {this.languages !== null && this.languages.length >= 1 && (\n {\n if (typeof language !== 'string') return;\n\n this.currentSelectedLanguage = language;\n\n m.route.set(document.location.pathname, {\n lang: language,\n });\n\n this.reloadData();\n }}\n />\n )}\n
    \n\n {this.title()}\n\n
    \n\n
    \n {/* Ghost data */}\n {this.isLoading &&\n [...new Array(this.featuredCount).fill(undefined)].map(() => (\n
    \n
    \n

     

    \n\n
    \n \n \n \n
    \n
    \n
    \n ))}\n\n {!this.isLoading &&\n this.featuredPosts.length >= 0 &&\n this.featuredPosts.map((article) => )}\n
    \n
    \n\n
    \n
    \n {this.isLoading &&\n [false, false, true, false].map((state) => {\n return (\n
    \n
    \n
    \n

     

    \n

     

    \n\n
    \n \n \n \n
    \n
    \n
    \n );\n })}\n\n {!this.isLoading &&\n this.posts.length >= 1 &&\n this.posts.map((article) => )}\n\n {!this.isLoading && this.featuredPosts.length > 0 && this.hasMore === null && (\n

    {app.translator.trans('v17development-flarum-blog.forum.no_more_posts')}

    \n )}\n\n {!this.isLoading && this.featuredPosts.length === 0 && this.posts.length === 0 && (\n

    {app.translator.trans('v17development-flarum-blog.forum.category_empty')}

    \n )}\n\n {!this.isLoading && this.hasMore !== null && (\n
    \n \n
    \n )}\n
    \n\n
    \n {this.showCategories && }\n {this.showForumNav && }\n
    \n
    \n
    \n
    ,\n ];\n }\n\n newArticle() {\n let tags = [];\n\n // Get current category\n const currentCategory = app.store.getBy('tags', 'slug', m.route.param('slug'));\n\n if (currentCategory) {\n tags.push(currentCategory);\n }\n\n // Redirect to the composer\n m.route.set(\n app.route('blogComposer', {\n tags: tags.map((tag) => tag.id()).join(),\n lang: this.languages.length > 0 ? this.currentSelectedLanguage : undefined,\n })\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/mixin'];","import Model from 'flarum/common/Model';\nimport mixin from 'flarum/common/utils/mixin';\n\nexport default class BlogMeta extends mixin(Model, {\n discussion: Model.hasOne('discussion'),\n featuredImage: Model.attribute('featuredImage'),\n summary: Model.attribute('summary'),\n isFeatured: Model.attribute('isFeatured'),\n isSized: Model.attribute('isSized'),\n isPendingReview: Model.attribute('isPendingReview'),\n}) {}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/components/TagsPage'];","import { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport TagsPage from 'flarum/tags/components/TagsPage';\n\nexport default function extendTagOverview() {\n extend(TagsPage.prototype, 'view', function (markup) {\n // Pending xhr to load all tags, throw back loading indicator.\n if (this.loading) {\n return markup;\n }\n\n if (app.forum.attribute('blogHideTags') == false) return markup;\n\n // Get blog tag ID's\n const blogTags = app.forum.attribute('blogTags') || [];\n\n const tag_tiles_parent = findChild(markup, 'TagsPage-content', true);\n const tag_tiles = tag_tiles_parent?.children[0];\n\n if (!tag_tiles_parent || !tag_tiles) return markup;\n\n // Map through the tiles and remove tiles that are part of the blog\n tag_tiles.children = tag_tiles.children.map((tile, i) => {\n return blogTags.indexOf(this.tags[i].id()) >= 0 ? null : tile;\n });\n\n return markup;\n });\n\n extend(IndexPage.prototype, 'navItems', function (items) {\n if (app.forum.attribute('blogHideTags') == false) return items;\n\n const blogTags = app.forum.attribute('blogTags') || [];\n\n blogTags.forEach((id) => {\n items.remove(`tag${id}`);\n });\n\n return items;\n });\n}\n\nfunction findChild(parent, childClass, recursive = false, maxDepth = 50, depth = 0) {\n const children = getChildren(parent);\n let child = null;\n\n for (let i = 0; i < children.length; i++) {\n const childClassName = children[i]?.attrs?.className || '';\n if (childClassName.includes(childClass)) {\n child = children[i];\n break;\n }\n }\n\n // Recursive search\n if (recursive && !child && depth < maxDepth) {\n for (let subParent of children) {\n const subChild = findChild(subParent, childClass, true, maxDepth, depth + 1);\n if (subChild) {\n return subChild;\n }\n }\n }\n\n return child;\n}\n\nfunction getChildren(parent) {\n if (Array.isArray(parent)) {\n return parent;\n }\n const children = parent?.children || [];\n if (!Array.isArray(children)) {\n return [];\n }\n return children;\n}\n","export default function () {\n // Save the original function before we override it\n const original_discussion_route = app.route.discussion;\n\n /**\n * Generate a URL to a discussion OR a Blog Article.\n *\n * CORE_CODE_OVERRIDE: This overrides the standard function from flarum/core.\n * The code is inspired from js/src/forum/routes.js and now handles different types of discussions.\n * It will try to keep the original function executed if the discussion being\n * processed isn't a blog article.\n *\n * @param {Discussion} discussion\n * @param {Integer} [near]\n * @return {String}\n */\n app.route.discussion = (discussion, near) => {\n const discussionRedirectEnabled =\n app.forum.attribute('blogRedirectsEnabled') === 'both' || app.forum.attribute('blogRedirectsEnabled') === 'discussions_only';\n let shouldRedirect = false;\n if (discussionRedirectEnabled && discussion.tags().length > 0) {\n const blogTags = app.forum.attribute('blogTags');\n\n const foundTags = discussion.tags().filter((tag) => {\n return blogTags.indexOf(tag.id()) >= 0 || (tag.parent() && blogTags.indexOf(tag.parent().id()) >= 0);\n });\n\n if (foundTags.length > 0) {\n shouldRedirect = true;\n }\n }\n if (shouldRedirect) {\n return discussion.lastReadPostNumber() > 1\n ? app.route('blogArticle.near', {\n id: discussion.slug(),\n near: discussion.lastReadPostNumber(),\n })\n : app.route('blogArticle', {\n id: discussion.slug(),\n });\n } else {\n return original_discussion_route(discussion, near);\n }\n };\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","import Component from 'flarum/common/Component';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\nimport avatar from 'flarum/common/helpers/avatar';\nimport Link from 'flarum/common/components/Link';\n\nexport default class BlogAuthor extends Component {\n view() {\n const author = !this.attrs.loading ? (this.attrs.article ? this.attrs.article.user() : this.attrs.user) : null;\n\n return (\n
    \n \n\n
    \n {author ? (\n {avatar(author)}\n ) : (\n \n )}\n
    \n\n {author && (\n
    \n \n {author.displayName()}\n \n

    {author.bio && author.bio()}

    \n\n
      {listItems(this.items().toArray())}
    \n
    \n )}\n\n {this.attrs.loading && (\n
    \n  \n

     

    \n

     

    \n

     

    \n
    \n )}\n
    \n );\n }\n\n items() {\n return new ItemList();\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","import Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\n\nexport default class RenameArticleModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.article = this.attrs.article;\n\n this.name = Stream(this.article.title() || '');\n\n this.redirect = this.attrs.redirect;\n }\n\n className() {\n return 'Modal--small Support-Modal';\n }\n\n title() {\n return app.translator.trans('v17development-flarum-blog.forum.tools.rename_article');\n }\n\n content() {\n return (\n
    \n
    {this.fields().toArray()}
    \n
    \n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n 'name',\n
    \n \n \n
    ,\n 50\n );\n\n items.add(\n 'submit',\n
    \n {Button.component(\n {\n type: 'submit',\n className: 'Button Button--primary SupportModal-save',\n loading: this.loading,\n },\n app.translator.trans('core.forum.composer_edit.submit_button')\n )}\n
    ,\n -10\n );\n\n return items;\n }\n\n submitData() {\n return {\n title: this.name(),\n };\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n // Do not save\n if (this.attrs.onChange) {\n this.attrs.onChange(this.name());\n this.hide();\n\n return;\n }\n\n this.article\n .save({\n title: this.name(),\n })\n .then(\n () => {\n this.hide();\n\n // Redirect\n if (this.redirect) {\n const url = `/blog/${this.article.slug()}`;\n\n m.route.set(url, true);\n window.history.replaceState(null, document.title, url);\n }\n },\n (response) => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/components/TagDiscussionModal'];","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Switch'];","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport Switch from 'flarum/common/components/Switch';\nimport selectFiles from '../../utils/selectFiles';\n\nexport default class BlogPostSettingsModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n if (this.attrs.article) {\n this.meta = this.attrs.article && this.attrs.article.blogMeta() ? this.attrs.article.blogMeta() : app.store.createRecord('blogMeta');\n } else {\n this.meta = this.attrs.meta ? this.attrs.meta : app.store.createRecord('blogMeta');\n }\n\n this.isNew = !this.meta.exists;\n\n this.summary = Stream(this.meta.summary() || '');\n\n this.featuredImage = Stream(this.meta.featuredImage() || '');\n\n this.isFeatured = Stream(this.meta.isFeatured() || false);\n this.isSized = Stream(this.meta.isSized() || false);\n this.isPendingReview = Stream(this.meta.isPendingReview() || false);\n }\n\n className() {\n return 'Modal--small Support-Modal';\n }\n\n title() {\n return app.translator.trans('v17development-flarum-blog.forum.article_settings.title');\n }\n\n content() {\n return (\n
    \n
    {this.fields().toArray()}
    \n
    \n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n 'summary',\n
    \n \n \n\n {app.translator.trans('v17development-flarum-blog.forum.article_settings.fields.summary.helper_text')}\n
    ,\n 30\n );\n\n let fofUploadButton = null;\n\n if ('fof-upload' in flarum.extensions && app.forum.attribute('fof-upload.canUpload')) {\n const {\n components: { Uploader, FileManagerModal },\n } = require('@fof-upload');\n\n const uploader = new Uploader();\n\n fofUploadButton = (\n {\n app.modal.show(\n FileManagerModal,\n {\n uploader: uploader,\n onSelect: (files) => {\n const file = app.store.getById('files', files[0]);\n\n this.featuredImage(file.url());\n },\n },\n true\n );\n }}\n icon=\"fas fa-cloud-upload-alt\"\n />\n );\n }\n\n items.add(\n 'image',\n
    \n \n
    \n \n {fofUploadButton}\n
    \n\n {app.translator.trans('v17development-flarum-blog.forum.article_settings.fields.image.helper_text')}\n\n {this.featuredImage() !== '' && (\n \n )}\n
    ,\n 30\n );\n\n items.add(\n 'sized',\n
    \n {Switch.component(\n {\n state: this.isSized() == true,\n onchange: (val) => {\n this.isSized(val);\n },\n },\n [\n {app.translator.trans('v17development-flarum-blog.forum.article_settings.fields.highlight.title')},\n
    \n {app.translator.trans('v17development-flarum-blog.forum.article_settings.fields.highlight.helper_text')}\n
    ,\n ]\n )}\n
    ,\n -10\n );\n\n items.add(\n 'submit',\n
    \n {Button.component(\n {\n type: 'submit',\n className: 'Button Button--primary SupportModal-save',\n loading: this.loading,\n },\n app.translator.trans('core.forum.composer_edit.submit_button')\n )}\n
    ,\n -10\n );\n\n return items;\n }\n\n submitData() {\n return {\n summary: this.summary(),\n featuredImage: this.featuredImage(),\n isFeatured: this.isFeatured(),\n isSized: this.isSized(),\n isPendingReview: this.isPendingReview(),\n relationships:\n this.isNew && !this.attrs.isComposer\n ? {\n discussion: this.attrs.article,\n }\n : null,\n };\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n // Submit data\n if (this.attrs.onsubmit) {\n // Update attributes\n this.meta.pushData({\n attributes: this.submitData(),\n });\n\n // Push\n this.attrs.onsubmit(this.meta);\n\n this.hide();\n return;\n }\n\n this.loading = true;\n\n this.meta.save(this.submitData()).then(\n () => {\n if (this.attrs.article) {\n this.attrs.article.pushData({\n relationships: {\n blogMeta: this.meta,\n },\n });\n }\n\n this.hide();\n m.redraw();\n },\n (response) => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ComposerBody'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","import Component from 'flarum/common/Component';\n\nexport default class ComposerPreview extends Component {\n view() {\n return
    ;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n s9e.TextFormatter.preview(vnode.attrs.content || '', vnode.dom);\n }\n}\n","import ComposerBody from 'flarum/forum/components/ComposerBody';\nimport Button from 'flarum/common/components/Button';\nimport TextEditor from 'flarum/common/components/TextEditor';\nimport ComposerPreview from './ComposerPreview';\nimport app from 'flarum/forum/app';\n\nexport default class Composer extends ComposerBody {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.previewContent = false;\n }\n\n // Render\n view() {\n const hasContent = this.composer.fields.content() && this.composer.fields.content() !== '';\n const loading = this.loading || this.attrs.disabled;\n\n return (\n
    \n
    \n \n \n
    \n\n
    \n {this.previewContent && (\n
    \n {!hasContent && app.translator.trans('v17development-flarum-blog.forum.composer.nothing_to_preview')}\n\n \n
    \n )}\n\n {TextEditor.component({\n submitLabel: this.attrs.submitLabel || app.translator.trans('core.forum.composer_edit.submit_button'),\n placeholder: this.attrs.placeholder,\n disabled: loading,\n composer: this.composer,\n preview: this.jumpToPreview && this.jumpToPreview.bind(this),\n onchange: this.composer.fields.content,\n onsubmit: this.onsubmit.bind(this),\n value: this.composer.fields.content(),\n })}\n
    \n
    \n );\n }\n\n // Submit trigger\n onsubmit() {\n if (this.attrs.onsubmit) {\n this.attrs.onsubmit();\n }\n }\n}\n","import app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport Button from 'flarum/common/components/Button';\nimport Link from 'flarum/common/components/Link';\nimport BlogAuthor from '../components/BlogItemSidebar/BlogAuthor';\nimport RenameArticleModal from '../components/Modals/RenameArticleModal';\nimport TagDiscussionModal from 'flarum/tags/components/TagDiscussionModal';\nimport BlogPostSettingsModal from '../components/Modals/BlogPostSettingsModal';\nimport Composer from '../components/Composer/Composer';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport { components } from '@fof-discussion-language';\n\nexport default class BlogComposer extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.setTitle(app.translator.trans('v17development-flarum-blog.forum.blog'));\n\n // User cannot write blogs\n if (!app.forum.attribute('canWriteBlogPosts')) {\n m.route.set(app.route('blog'));\n return;\n }\n\n // Send history push\n app.history.push('blogComposer');\n\n // Get languages (if enabled)\n this.languages = app.store.all('discussion-languages') || [];\n\n // Set body class\n this.bodyClass = 'BlogItemPage BlogItemPage--composer';\n\n // Article data\n this.articleLanguage = Stream(m.route.param('lang') ? m.route.param('lang') : app.translator.locale);\n this.article = app.store.createRecord('discussions');\n this.blogMeta = null;\n\n this.tags = [];\n\n // Pre-select tags\n if (m.route.param().tags) {\n const tagList = Array.isArray(m.route.param().tags) ? m.route.param().tags : m.route.param().tags.split(',');\n\n if (m.route.param().tags.length > 0) {\n tagList.forEach((tagId) => {\n const foundTag = app.store.getById('tags', tagId);\n\n if (foundTag) {\n this.tags.push(foundTag);\n }\n });\n }\n }\n\n this.isSaving = false;\n }\n\n openTagsModal(e = null) {\n if (e) {\n e.preventDefault();\n }\n\n if (this.isSaving) return;\n\n app.modal.show(TagDiscussionModal, {\n selectedTags: this.tags,\n onsubmit: (tags) => {\n this.tags = tags;\n },\n });\n }\n\n openNameArticleModal(e = null) {\n if (e) {\n e.preventDefault();\n }\n\n if (this.isSaving) return;\n\n app.modal.show(RenameArticleModal, {\n article: this.article,\n onChange: (title) => {\n this.article.pushData({\n attributes: {\n title,\n },\n });\n },\n });\n }\n\n openBlogSettings(e) {\n e.preventDefault();\n\n if (this.isSaving) return;\n\n app.modal.show(BlogPostSettingsModal, {\n meta: this.blogMeta,\n onsubmit: (meta) => (this.blogMeta = meta),\n });\n }\n\n view() {\n return (\n
    \n
    {this.pageItems().toArray()}
    \n
    \n );\n }\n\n pageItems() {\n const items = new ItemList();\n\n items.add(\n 'toolButtons',\n
    \n \n \n {app.translator.trans('v17development-flarum-blog.forum.return_to_overview')}\n \n
    ,\n 100\n );\n\n items.add('article',
    {this.articleWrapperItems().toArray()}
    , 90);\n\n return items;\n }\n\n articleWrapperItems() {\n const items = new ItemList();\n\n items.add('container',
    {this.articleItems().toArray()}
    , 100);\n\n items.add(\n 'sidebar',\n
    \n \n
    ,\n 90\n );\n\n return items;\n }\n\n articleItems() {\n const items = new ItemList();\n\n const defaultImage = app.forum.attribute('blogDefaultImage')\n ? `url(${app.forum.attribute('baseUrl') + '/assets/' + app.forum.attribute('blogDefaultImage')})`\n : null;\n\n const blogImage = this.blogMeta && this.blogMeta.featuredImage() ? `url(${this.blogMeta.featuredImage()})` : defaultImage;\n\n let LanguageDropdown;\n if ('fof-discussion-language' in flarum.extensions) {\n LanguageDropdown = components.LanguageDropdown;\n }\n\n items.add(\n 'content',\n
    \n this.openBlogSettings(e)}\n />\n\n
    \n
    \n {this.languages !== null && this.languages.length >= 1 && (\n {\n if (typeof language !== 'string') return;\n\n this.articleLanguage(language);\n }}\n />\n )}\n\n \n
    \n
    \n\n {/* Article Categories */}\n
    \n {this.tags.map((tag) => (\n \n ))}\n\n \n
    \n\n
    \n {/* Article name */}\n

    this.openNameArticleModal()} className=\"FlarumBlog-Article-Title\" style={{ cursor: 'pointer' }}>\n {this.article && this.article.title() && this.article.title() !== ''\n ? this.article.title()\n : app.translator.trans('v17development-flarum-blog.forum.composer.no_title')}\n\n \n

    \n\n
    \n this.create()}\n disabled={this.isSaving}\n />\n
    \n
    \n
    ,\n 100\n );\n\n items.add(\n 'commentsPlaceholder',\n
    \n

    {app.translator.trans('v17development-flarum-blog.forum.comment_section.comments')} (0)

    \n {/* Locked */}\n\n
    \n
    \n
    \n {' '}\n {app.translator.trans('v17development-flarum-blog.forum.composer.comment_section')}\n
    \n
    \n
    \n
    ,\n 90\n );\n\n return items;\n }\n\n create() {\n const blogTags = app.forum.attribute('blogTags') || [];\n\n // Force tags\n if (this.tags.length === 0) {\n this.openTagsModal();\n return;\n }\n\n // Force title\n if (!this.article.title() || this.article.title() === '') {\n this.openNameArticleModal();\n return;\n }\n\n // Find blog tags\n const findblogTags = this.tags.filter((tag) => {\n return blogTags.indexOf(tag.id()) >= 0;\n });\n\n // No blog tags selected\n if (findblogTags.length === 0) {\n alert(app.translator.trans('v17development-flarum-blog.forum.composer.no_blog_tags_selected'));\n return;\n }\n\n if (\n (this.blogMeta === null || (!this.blogMeta.featuredImage() && !app.forum.attribute('blogDefaultImage')) || !this.blogMeta.summary()) &&\n !confirm(app.translator.trans('v17development-flarum-blog.forum.composer.post_without_blog_info'))\n ) {\n return;\n }\n\n let relationships = {\n tags: this.tags,\n };\n\n // Add languages if possible\n if (this.languages.length > 0) {\n relationships.language = app.store.getBy('discussion-languages', 'code', this.articleLanguage);\n }\n\n const data = {\n title: this.article.title(),\n content: app.composer.fields.content(),\n relationships,\n blogMeta:\n this.blogMeta !== null\n ? {\n featuredImage: this.blogMeta.featuredImage(),\n summary: this.blogMeta.summary(),\n isSized: this.blogMeta.isSized(),\n }\n : null,\n };\n\n this.isSaving = true;\n\n this.article\n .save(data)\n .then((article) => {\n setTimeout(() => {\n // Redirect to the article\n m.route.set(app.route('blogArticle', { id: `${article.slug()}` }));\n }, 500);\n })\n .catch(() => {\n this.isSaving = false;\n m.redraw();\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","import Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\nexport default class ArticleSubscription extends Component {\n view() {\n const currentSubscriptionState = this.attrs.discussion.subscription();\n\n const preferences = app.session.user.preferences();\n const notifyEmail = preferences['notify_newPost_email'];\n const notifyTooltip = extractText(\n app.translator.trans(\n notifyEmail ? 'flarum-subscriptions.forum.sub_controls.notify_email_tooltip' : 'flarum-subscriptions.forum.sub_controls.notify_alert_tooltip'\n )\n );\n\n let title = app.translator.trans('flarum-subscriptions.forum.sub_controls.not_following_button');\n let icon = 'far fa-star';\n\n // Following\n if (currentSubscriptionState === 'follow') {\n title = app.translator.trans('flarum-subscriptions.forum.sub_controls.following_button');\n icon = 'fas fa-star';\n }\n\n return (\n \n \n {title}\n \n \n );\n }\n\n saveSubscription(discussion, subscription) {\n discussion.save({ subscription });\n }\n}\n","import Component from 'flarum/common/Component';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\nimport BlogAuthor from './BlogAuthor';\nimport BlogCategories from '../BlogCategories';\nimport ForumNav from '../ForumNav';\n\nexport default class BlogItemSidebar extends Component {\n view() {\n return (\n
    \n
      {listItems(this.items().toArray())}
    \n
    \n );\n }\n\n items() {\n const itemlist = new ItemList();\n\n itemlist.add('author', BlogAuthor.component(this.attrs), 0);\n\n itemlist.add('categories', BlogCategories.component(this.attrs), 0);\n\n itemlist.add('nav', ForumNav.component(this.attrs), 0);\n\n return itemlist;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EditPostComposer'];","import Component from 'flarum/common/Component';\nimport TagDiscussionModal from 'flarum/tags/components/TagDiscussionModal';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport Alert from 'flarum/common/components/Alert';\nimport Button from 'flarum/common/components/Button';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport BlogPostSettingsModal from './Modals/BlogPostSettingsModal';\nimport EditPostComposer from 'flarum/forum/components/EditPostComposer';\nimport extractText from 'flarum/common/utils/extractText';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport RenameArticleModal from './Modals/RenameArticleModal';\nimport app from 'flarum/forum/app';\n\nexport default class BlogPostController extends Component {\n init() {\n this.loadedPost = false;\n }\n\n manageArticleButtons() {\n const article = this.attrs.article;\n const items = new ItemList();\n\n // Working for GlowingBlue version\n const LanguageDiscussionModal =\n flarum.extensions['fof-discussion-language'] && typeof flarum.extensions['fof-discussion-language'].components !== 'undefined'\n ? flarum.extensions['fof-discussion-language'].components.LanguageDiscussionModal\n : null;\n\n // Rename article\n if (article.canRename()) {\n items.add(\n 'rename',\n Button.component(\n {\n className: 'Button',\n onclick: () => app.modal.show(RenameArticleModal, { article }),\n icon: 'fas fa-pencil-alt',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.rename_article')\n ),\n 100\n );\n }\n\n const articlePost = article.firstPost();\n\n // Edit article\n items.add(\n 'edit',\n Button.component(\n {\n className: 'Button',\n disabled: !articlePost || !articlePost.canEdit(),\n onclick: () => {\n app.composer.load(EditPostComposer, { post: articlePost });\n app.composer.show();\n },\n icon: 'fas fa-edit',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.edit_article')\n ),\n 90\n );\n\n // Article settings\n items.add(\n 'articleSettings',\n Button.component(\n {\n className: 'Button',\n onclick: () => app.modal.show(BlogPostSettingsModal, { article }),\n icon: 'fas fa-cogs',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.article_settings')\n ),\n 80\n );\n\n // Update categories\n if (article.canTag()) {\n items.add(\n 'tag',\n Button.component(\n {\n className: 'Button',\n onclick: () => app.modal.show(TagDiscussionModal, { discussion: article }),\n icon: 'fas fa-tag',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.update_category')\n ),\n 70\n );\n }\n\n // Approve article\n if (article.blogMeta() && article.blogMeta().isPendingReview()) {\n items.add('separator1',
  • , 65);\n\n items.add(\n 'approve',\n Button.component(\n {\n className: 'Button',\n disabled: !app.forum.attribute('canApproveBlogPosts'),\n onclick: () => {\n article\n .blogMeta()\n .save({\n isPendingReview: false,\n })\n .then(\n () => {\n app.alerts.show(\n Alert,\n { type: 'success' },\n app.translator.trans('v17development-flarum-blog.forum.review_article.approve_article_approved')\n );\n },\n (response) => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n },\n icon: 'fas fa-thumbs-up',\n },\n app.translator.trans('v17development-flarum-blog.forum.review_article.approve_article')\n ),\n 60\n );\n }\n\n // Language\n if (article.canChangeLanguage && article.canChangeLanguage() && LanguageDiscussionModal) {\n items.add(\n 'lang',\n Button.component(\n {\n icon: 'fas fa-globe',\n onclick: () => app.modal.show(LanguageDiscussionModal, { discussion: article }),\n },\n app.translator.trans('fof-discussion-language.forum.discussion_controls.change_language_button')\n ),\n 50\n );\n }\n\n items.add('separator2',
  • , 40);\n\n // Lock article\n if (article.canLock()) {\n items.add(\n 'lock',\n Button.component(\n {\n className: 'Button',\n onclick: DiscussionControls.lockAction.bind(article),\n icon: `fas ${article.isLocked() ? 'fa-comments' : 'fa-comment-slash'}`,\n },\n article.isLocked()\n ? app.translator.trans('v17development-flarum-blog.forum.tools.enable_comments')\n : app.translator.trans('v17development-flarum-blog.forum.tools.disable_comments')\n ),\n 30\n );\n }\n\n // Hide/show/delete\n if (article.canHide()) {\n // Article is hidden\n if (article.isHidden()) {\n // Recover article\n items.add(\n 'recover',\n Button.component(\n {\n className: 'Button',\n onclick: DiscussionControls.restoreAction.bind(article),\n icon: 'fas fa-eye',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.recover_article')\n ),\n 20\n );\n\n // Delete article\n if (article.canDelete()) {\n items.add(\n 'delete',\n Button.component(\n {\n className: 'Button',\n onclick: () => {\n // Confirm deletion\n if (confirm(extractText(app.translator.trans('core.forum.discussion_controls.delete_confirmation')))) {\n // Redirect if the current page is an blog article\n if (app.history.getCurrent().name === 'blogArticle') {\n if (app.previous) {\n app.history.back();\n } else {\n m.route.set(app.route('blog'));\n }\n }\n\n return article.delete().then(() => {\n m.redraw();\n });\n }\n },\n icon: 'far fa-trash-alt',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.delete_forever')\n ),\n 10\n );\n }\n } else {\n // Hide article\n items.add(\n 'hide',\n Button.component(\n {\n className: 'Button',\n onclick: DiscussionControls.hideAction.bind(article),\n icon: 'fas fa-eye-slash',\n },\n app.translator.trans('v17development-flarum-blog.forum.tools.hide_article')\n ),\n 0\n );\n }\n }\n\n return items;\n }\n\n view() {\n const article = this.attrs.article;\n\n const articlePost = article.firstPost();\n\n return (\n
    \n
    \n {Dropdown.component(\n {\n icon: 'fas fa-cog',\n label: 'Manage',\n buttonClassName: 'Button',\n menuClassName: 'Dropdown-menu--right',\n onshow: () => {\n // Get post data to make sure they can edit the post\n if (articlePost && !articlePost.canEdit() && !this.loadedPost) {\n this.loadedPost = true;\n m.redraw();\n }\n },\n },\n this.manageArticleButtons().toArray()\n )}\n
    \n
    \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/PostStream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/PostStreamState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/fullTime'];","import Page from 'flarum/common/components/Page';\nimport IndexPage from 'flarum/components/IndexPage';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostStream from 'flarum/forum/components/PostStream';\nimport PostStreamState from 'flarum/forum/states/PostStreamState';\nimport BlogPostController from '../components/BlogPostController';\nimport BlogItemSidebar from '../components/BlogItemSidebar/BlogItemSidebar';\nimport Link from 'flarum/common/components/Link';\nimport BlogOverview from './BlogOverview';\nimport fullTime from 'flarum/common/helpers/fullTime';\nimport ArticleSubscription from '../components/ArticleSubscription';\nimport classList from 'flarum/common/utils/classList';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport icon from 'flarum/common/helpers/icon';\nimport app from 'flarum/forum/app';\n\nexport default class BlogItem extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.setTitle(app.translator.trans('v17development-flarum-blog.forum.blog'));\n\n // Send history push\n app.history.push('blogArticle');\n\n this.bodyClass = 'BlogItemPage';\n\n this.near = m.route.param('near') || 0;\n\n this.loading = true;\n this.found = false;\n this.article = null;\n\n this.loadBlogItem();\n }\n\n // Load blog overview\n loadBlogItem() {\n const preloadBlogOverview = app.preloadedApiDocument();\n\n if (preloadBlogOverview) {\n // We must wrap this in a setTimeout because if we are mounting this\n // component for the first time on page load, then any calls to m.redraw\n // will be ineffective and thus any configs (scroll code) will be run\n // before stuff is drawn to the page.\n setTimeout(this.show.bind(this, preloadBlogOverview), 0);\n } else {\n app.store\n .find('discussions', m.route.param('id').split('-')[0])\n .then(this.show.bind(this))\n .catch(() => {\n m.redraw();\n });\n }\n\n m.redraw();\n }\n\n // Show blog post\n show(article) {\n // Set article data\n this.article = article;\n\n // Update title\n app.setTitle(`${article.title()} - ${app.translator.trans('v17development-flarum-blog.forum.blog')}`);\n\n this.loading = false;\n\n let includedPosts = [];\n if (article.payload && article.payload.included) {\n const articleId = article.id();\n\n includedPosts = article.payload.included\n .filter(\n (record) =>\n record.type === 'posts' &&\n record.relationships &&\n record.relationships.discussion &&\n record.relationships.discussion.data.id === articleId\n )\n .map((record) => app.store.getById('posts', record.id))\n .sort((a, b) => a.id() - b.id())\n .slice(0, 20);\n }\n\n this.stream = new PostStreamState(article, includedPosts);\n\n // Scroll to specific post\n if (this.near) {\n this.stream.goToNumber(this.near || 0, true).then(() => {\n app.current.set('discussion', article);\n app.current.set('stream', this.stream);\n });\n }\n\n // Read post on load\n if (app.session.user && !article.lastReadPostNumber()) {\n article.save({ lastReadPostNumber: 1 });\n }\n\n m.redraw();\n }\n\n postItems() {\n let articlePost = null;\n\n if (!this.loading && this.article) {\n articlePost = this.article?.firstPost?.();\n }\n\n const items = new ItemList();\n\n items.add(\n 'title',\n \n {this?.article?.title?.() || 'Ghost title'}\n {this.article?.isHidden?.() && `(${app.translator.trans('v17development-flarum-blog.forum.hidden')})`}\n ,\n 100\n );\n\n items.add(\n 'publishDate',\n \n {this.article ? fullTime(this.article.createdAt()) :  }\n
  • ,\n 80\n );\n\n if (this.loading) {\n items.add(\n 'skeleton',\n [0, 1, 2].map(() => (\n
    \n

     

    \n

     

    \n

     

    \n

     

    \n
    \n )),\n 60\n );\n }\n\n if (!this.loading) {\n if (this.article.blogMeta?.()?.isPendingReview?.()) {\n items.add(\n 'review',\n
    \n
    \n
    \n {icon('far fa-clock', { style: { marginRight: '5px' } })}{' '}\n {app.translator.trans('v17development-flarum-blog.forum.review_article.pending_review')}\n
    \n
    \n
    ,\n 60\n );\n }\n\n if (articlePost) {\n items.add('post', , 40);\n }\n }\n\n return items;\n }\n\n contentItems() {\n const defaultImage = app.forum.attribute('blogDefaultImage')\n ? `url(${app.forum.attribute('baseUrl')}/assets/${app.forum.attribute('blogDefaultImage')})`\n : null;\n\n const blogImage = this.article?.blogMeta()?.featuredImage?.() ? `url(${this.article.blogMeta().featuredImage()})` : defaultImage;\n\n const items = new ItemList();\n\n items.add(\n 'image',\n ,\n 100\n );\n\n if (this.article && (app.session.user?.canEdit?.() || this.article?.canRename?.() || this.article?.posts?.()?.[0]?.canEdit?.())) {\n items.add('editArticle', , 80);\n }\n\n // Article Categories\n items.add(\n 'categories',\n
    \n {!this.loading && this.article?.tags?.()?.map((tag) => {tag.name()})}\n\n {this.loading && [0, 1].map(() => Category)}\n
    ,\n 60\n );\n\n items.add('post',
    {this.postItems().toArray()}
    , 40);\n\n return items;\n }\n\n articleItems() {\n const items = new ItemList();\n\n items.add('content',
    {this.contentItems().toArray()}
    , 100);\n\n if (!(this?.article?.isLocked?.() && this?.article?.commentCount?.() === 1)) {\n items.add(\n 'comments',\n
    \n {/* Show subscription state */}\n {!this.loading &&\n app.session.user &&\n this.article.subscription &&\n (!this.article.isLocked || (this.article.isLocked && !this.article.isLocked())) && }\n\n

    \n {app.translator.trans('v17development-flarum-blog.forum.comment_section.comments')} ({this.article ? this.article.commentCount() - 1 : 0})\n

    \n\n {/* Locked */}\n {!this.loading && this.article?.isLocked?.() && (\n
    \n
    \n
    \n {' '}\n {app.translator.trans('v17development-flarum-blog.forum.comment_section.locked')}\n
    \n
    \n
    \n )}\n\n {!this.loading &&\n this.article &&\n PostStream.component({\n discussion: this.article,\n stream: this.stream,\n onPositionChange: this.positionChanged.bind(this),\n })}\n
    ,\n 75\n );\n }\n\n return items;\n }\n\n view() {\n return [\n app.forum.attribute('blogAddHero') == true && IndexPage.prototype.hero(),\n
    \n
    \n
    \n {\n if (app.previous.matches(BlogOverview)) {\n e.preventDefault();\n history.back();\n }\n }}\n >\n \n {app.translator.trans('v17development-flarum-blog.forum.return_to_overview')}\n \n
    \n
    \n
    {this.articleItems().toArray()}
    \n\n \n
    \n
    \n
    ,\n ];\n }\n\n positionChanged(startNumber, endNumber) {\n const article = this.article;\n\n if (app.session.user && endNumber > (article.lastReadPostNumber() || 0)) {\n article.save({ lastReadPostNumber: endNumber });\n m.redraw();\n }\n }\n}\n","import { compat } from '@flarum/core/forum';\nimport BlogMeta from '../common/Models/BlogMeta';\nimport ArticleSubscription from './components/ArticleSubscription';\nimport BlogCategories from './components/BlogCategories';\nimport BlogAuthor from './components/BlogItemSidebar/BlogAuthor';\nimport BlogItemSidebar from './components/BlogItemSidebar/BlogItemSidebar';\nimport BlogOverviewItem from './components/BlogOverviewItem';\nimport BlogPostController from './components/BlogPostController';\nimport Composer from './components/Composer/Composer';\nimport ComposerPreview from './components/Composer/ComposerPreview';\nimport FeaturedBlogItem from './components/FeaturedBlogItem';\nimport ForumNav from './components/ForumNav';\nimport BlogPostSettingsModal from './components/Modals/BlogPostSettingsModal';\nimport RenameArticleModal from './components/Modals/RenameArticleModal';\nimport BlogItem from './pages/BlogItem';\nimport BlogOverview from './pages/BlogOverview';\n\nexport default () => {\n Object.assign(compat, {\n 'v17development/blog/components/BlogItemSidebar': BlogItemSidebar,\n 'v17development/blog/components/BlogAuthor': BlogAuthor,\n\n 'v17development/blog/components/Composer/Composer': Composer,\n 'v17development/blog/components/Composer/ComposerPreview': ComposerPreview,\n\n 'v17development/blog/components/Modals/BlogPostSettingsModal': BlogPostSettingsModal,\n 'v17development/blog/components/Modals/RenameArticleModal': RenameArticleModal,\n\n 'v17development/blog/components/ArticleSubscription': ArticleSubscription,\n 'v17development/blog/components/BlogCategories': BlogCategories,\n 'v17development/blog/components/BlogOverviewItem': BlogOverviewItem,\n 'v17development/blog/components/BlogPostController': BlogPostController,\n 'v17development/blog/components/FeaturedBlogItem': FeaturedBlogItem,\n 'v17development/blog/components/ForumNav': ForumNav,\n\n 'v17development/blog/pages/BlogItem': BlogItem,\n 'v17development/blog/pages/BlogOverview': BlogOverview,\n\n 'v17development/blog/models/BlogMeta': BlogMeta,\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","import { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nexport default function addSidebarNav() {\n extend(IndexPage.prototype, 'navItems', function (items) {\n if (app.forum.attribute('blogAddSidebarNav') && app.forum.attribute('blogAddSidebarNav') !== '0') {\n items.add(\n 'blog',\n \n {app.translator.trans('v17development-flarum-blog.forum.blog')}\n ,\n 15\n );\n }\n\n return items;\n });\n}\n","import app from 'flarum/forum/app';\nimport Model from 'flarum/common/Model';\nimport Tag from 'flarum/tags/common/models/Tag';\nimport Discussion from 'flarum/common/models/Discussion';\nimport BlogOverview from './pages/BlogOverview';\nimport redirector from './utils/redirector';\nimport BlogMeta from '../common/Models/BlogMeta';\nimport extendTagOverview from './utils/extendTagOverview';\nimport discussionRouting from './utils/discussionRouting';\nimport BlogComposer from './pages/BlogComposer';\nimport compat from './compat';\nimport addSidebarNav from './utils/addSidebarNav';\n\nimport BlogItem from './pages/BlogItem';\n\n// Register Flarum Blog\napp.initializers.add(\n 'v17development-flarum-blog',\n (app) => {\n app.routes.blog = { path: '/blog', component: BlogOverview };\n\n app.routes.blogCategory = {\n path: '/blog/category/:slug',\n component: BlogOverview,\n };\n\n app.routes.blogComposer = {\n path: '/blog/compose',\n component: BlogComposer,\n };\n\n app.routes.blogArticle = { path: '/blog/:id', component: BlogItem };\n\n app.routes['blogArticle.near'] = {\n path: '/blog/:id/:near',\n component: BlogItem,\n };\n\n app.store.models.blogMeta = BlogMeta;\n\n Discussion.prototype.blogMeta = Model.hasOne('blogMeta');\n Tag.prototype.isBlog = Model.attribute('isBlog');\n\n // Redirect discussions/tags to their blog post/overview\n redirector();\n\n // Extend tag overview.\n // Hide tags which are used as blog category\n extendTagOverview();\n\n // Make that blog articles have a blog route and not a discussion route\n discussionRouting();\n\n // Add a link to the blog to the IndexPage sidebar, if enabled.\n addSidebarNav();\n },\n -100000\n);\n\ncompat();\n","import IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\n\nexport default function () {\n // Redirect tag to blog category\n extend(IndexPage.prototype, 'oncreate', function () {\n const tag = this.currentTag();\n const tagRedirectEnabled = app.forum.attribute('blogRedirectsEnabled') === 'both' || app.forum.attribute('blogRedirectsEnabled') === 'tags_only';\n\n // Only trigger when it's a tag page and the redirects are enabled\n if (tag && tagRedirectEnabled) {\n const blogTags = app.forum.attribute('blogTags');\n\n // Tag is inside list\n if (blogTags.indexOf(tag.id()) >= 0 || (tag.parent() && blogTags.indexOf(tag.parent().id()) >= 0)) {\n m.route.set(app.route('blog'));\n }\n }\n });\n\n // Redirect discussion to blog article\n override(DiscussionPage.prototype, 'show', function (original, discussion) {\n const discussionRedirectEnabled =\n app.forum.attribute('blogRedirectsEnabled') === 'both' || app.forum.attribute('blogRedirectsEnabled') === 'discussions_only';\n\n if (discussionRedirectEnabled && discussion && discussion && discussion.tags().length > 0) {\n const blogTags = app.forum.attribute('blogTags');\n\n const foundTags = discussion.tags().filter((tag) => {\n return blogTags.indexOf(tag.id()) >= 0 || (tag.parent() && blogTags.indexOf(tag.parent().id()) >= 0);\n });\n\n // Only redirect if the discussion has blog tags\n if (foundTags.length > 0) {\n // Redirect to blog article\n const url = app.route('blogArticle', {\n id: discussion.slug(),\n });\n\n m.route.set(url, null, { replace: true });\n\n return null;\n }\n }\n\n return original(discussion);\n });\n}\n"],"names":["_typeof","require","_regeneratorRuntime","module","exports","__esModule","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","method","arg","Error","undefined","done","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","flarum","extensions","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","d","a","definition","o","get","prop","r","core","compat","_setPrototypeOf","p","bind","_inheritsLoose","subClass","superClass","BlogCategories","oninit","vnode","blogCategories","app","forum","attribute","view","className","translator","trans","map","tagId","tag","store","getById","tags","showSubTags","slug","m","route","param","all","_tag","isChild","parent","categoryItem","href","id","icon","style","backgroundColor","color","Component","ForumNav","buttonClassName","navItems","toArray","IndexPage","BlogOverviewItem","titleItems","article","attrs","items","ItemList","add","title","blogMeta","isPendingReview","isHidden","class","text","dataItems","humanTime","createdAt","user","commentCount","contentItems","summary","getImage","defaultImage","featuredImage","blogImage","isSized","classList","backgroundImage","FeaturedBlogItem","topItems","isSticky","position","BlogOverview","bodyClass","isLoading","featuredPosts","posts","hasMore","isLoadingMore","languages","currentSelectedLanguage","loadBlogOverview","featuredCount","parseInt","showCategories","showForumNav","preloadBlogOverview","setTimeout","show","reloadData","redraw","q","filter","sort","articles","payload","links","loadMore","replace","data","LanguageDropdown","components","onclick","newArticle","selected","language","set","document","location","pathname","lang","clear","Array","fill","loading","currentCategory","join","Page","BlogMeta","mixin","Model","discussion","isFeatured","extendTagOverview","extend","TagsPage","markup","blogTags","tag_tiles_parent","findChild","tag_tiles","children","tile","indexOf","remove","childClass","recursive","maxDepth","depth","isArray","getChildren","child","includes","subChild","original_discussion_route","near","shouldRedirect","lastReadPostNumber","BlogAuthor","author","username","avatar","bio","listItems","RenameArticleModal","Stream","redirect","content","fields","placeholder","bidi","Button","submitData","onsubmit","e","preventDefault","onChange","hide","save","url","window","history","replaceState","response","handleErrors","Modal","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","arguments","apply","BlogPostSettingsModal","meta","isNew","exists","maxWidth","minWidth","width","minHeight","fofUploadButton","Uploader","FileManagerModal","uploader","onSelect","files","file","src","alt","marginTop","Switch","onchange","val","fontWeight","relationships","isComposer","pushData","attributes","ComposerPreview","oncreate","s9e","TextFormatter","preview","dom","Composer","previewContent","hasContent","composer","disabled","TextEditor","submitLabel","jumpToPreview","ComposerBody","BlogComposer","articleLanguage","tagList","split","foundTag","isSaving","openTagsModal","TagDiscussionModal","selectedTags","openNameArticleModal","openBlogSettings","pageItems","articleWrapperItems","articleItems","cursor","originalContent","marginRight","confirm","alert","ArticleSubscription","currentSubscriptionState","subscription","notifyEmail","session","preferences","notifyTooltip","extractText","saveSubscription","BlogItemSidebar","itemlist","component","BlogPostController","init","loadedPost","manageArticleButtons","LanguageDiscussionModal","canRename","articlePost","firstPost","canEdit","EditPostComposer","post","canTag","Alert","canChangeLanguage","canLock","DiscussionControls","isLocked","canHide","canDelete","Dropdown","label","menuClassName","onshow","BlogItem","found","loadBlogItem","includedPosts","included","articleId","b","stream","PostStreamState","goToNumber","postItems","fullTime","fontSize","opacity","PostStream","onPositionChange","positionChanged","back","startNumber","endNumber","addSidebarNav","routes","blog","path","blogCategory","blogComposer","blogArticle","models","Discussion","Tag","currentTag","tagRedirectEnabled","override","DiscussionPage","original","discussionRouting","assign"],"sourceRoot":""} \ No newline at end of file