diff --git a/js/dist/forum.js b/js/dist/forum.js index 0e23c6f..3c4e8d5 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 a=o(814).default;function r(){"use strict";t.exports=r=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,a){var r=e&&e.prototype instanceof g?e:g,n=Object.create(r.prototype),i=new x(a||[]);return n._invoke=function(t,e,o){var a="suspendedStart";return function(r,n){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===r)throw n;return{value:void 0,done:!0}}for(o.method=r,o.arg=n;;){var i=o.delegate;if(i){var s=_(i,o);if(s){if(s===p)continue;return s}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===a)throw a="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a="executing";var l=d(t,e,o);if("normal"===l.type){if(a=o.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:o.done}}"throw"===l.type&&(a="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 p={};function g(){}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=g.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(r,i,s,l){var u=d(t[r],t,i);if("throw"!==u.type){var m=u.arg,c=m.value;return c&&"object"==a(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 r;this._invoke=function(t,a){function n(){return new e((function(e,r){o(t,a,e,r)}))}return r=r?r.then(n,n):n()}}function _(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,_(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var a=d(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,p;var r=a.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function A(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(A,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,a=function e(){for(;++o=0;--a){var r=this.tryEntries[a],i=r.completion;if("root"===r.tryLoc)return o("end");if(r.tryLoc<=this.prev){var s=n.call(r,"catchLoc"),l=n.call(r,"finallyLoc");if(s&&l){if(this.prev=0;--o){var a=this.tryEntries[o];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),F(o),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var a=o.completion;if("throw"===a.type){var r=a.arg;F(o)}return r}}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),p}},e}t.exports=r,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 a=o(648)();t.exports=a;try{regeneratorRuntime=a}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=a:Function("r","regeneratorRuntime = r")(a)}},482:t=>{"use strict";t.exports=flarum.extensions["fof-upload"]}},e={};function o(a){var r=e[a];if(void 0!==r)return r.exports;var n=e[a]={exports:{}};return t[a](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 a in e)o.o(e,a)&&!o.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},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 a={};(()=>{"use strict";o.r(a);const t=flarum.core.compat["forum/app"];var e=o.n(t);const r=flarum.core.compat["common/Model"];var n=o.n(r);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 p=flarum.core.compat["components/IndexPage"];var g=o.n(p);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),_=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 a=[],r=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")&&(r=!0),a.push(t.categoryItem(e)))})),r?[t.categoryItem(o)].concat(a):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 A=flarum.core.compat["common/components/Dropdown"];var F=o.n(A),x=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.languages=app.store.all("discussion-languages"),this.options=this.languages.reduce((function(t,e){return t[e.code()]=m("span",null,m("i",{className:"fas fa-globe"})," ",e.name()),t}),this.attrs.extra||{})},o.view=function(){var t=this.attrs,e=t.language,o=t.uppercase,a=e.name()||"";return m("span",null,m("i",{className:"fas fa-globe"})," ",o?a.toUpperCase():a)},e}(w()),I=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.languages=app.store.all("discussion-languages"),this.options=this.languages.reduce((function(t,e){return t[e.code()]=m(x,{language:e}),t}),this.attrs.extra||{})},o.view=function(){var t=this,e=this.attrs.selected;return F().component({buttonClassName:"Button",label:this.options[e]||this.options[this.attrs.default]},Object.keys(this.options).map((function(o){var a;a=app.forum.attribute("fof-discussion-language.composerLocaleDefault")?"any":app.translator.formatter.locale;var r=o===(e||a);return b().component({active:r,icon:!r||"fas fa-check",onclick:function(){return t.attrs.onclick(o)}},t.options[o])})))},e}(w());const L=flarum.core.compat["forum/components/IndexPage"];var k=o.n(L);const C=flarum.core.compat["common/components/SelectDropdown"];var M=o.n(C),S=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(M(),{buttonClassName:"Button",className:"App-titleControl"},this.navItems().toArray())))},o.navItems=function(){return k().prototype.navItems()},e}(w());const P=flarum.core.compat["common/components/Tooltip"];var T=o.n(P);const E=flarum.core.compat["common/helpers/humanTime"];var D=o.n(E);const R=flarum.core.compat["common/helpers/icon"];var O=o.n(R);const j=flarum.core.compat["common/utils/classList"];var G=o.n(j);const H=flarum.core.compat["common/utils/ItemList"];var z=o.n(H),W=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.titleItems=function(){var t,o,a=this.attrs.article,r=new(z());return r.add("title",m("[",null,a.title()),100),(null!=(t=a.blogMeta())&&null!=t.isPendingReview&&t.isPendingReview()||a.isHidden())&&r.add("hidden",O()("fas fa-eye-slash",{class:"BlogList-item-hidden"}),80),null!=(o=a.blogMeta())&&null!=o.isPendingReview&&o.isPendingReview()&&r.add("pendingReview",m(T(),{text:e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")},O()("far fa-clock",{class:"BlogList-item-pendingReview"})),40),r},a.dataItems=function(){var t,o=this.attrs.article,a=new(z());return a.add("createdAt",m("span",{class:"BlogList-item-details-createdAt"},O()("far fa-clock")," ",D()(o.createdAt())),100),a.add("author",m("span",{class:"BlogList-item-details-author"},O()("far fa-user")," ",(null==(t=o.user())||null==t.displayName?void 0:t.displayName())||e().translator.trans("core.lib.username.deleted_text")),80),a.add("replies",m("span",{class:"BlogList-item-details-replies"},O()("far fa-comment")," ",(o.commentCount()||1)-1),60),a},a.contentItems=function(){var t,e=(null==(t=this.attrs.article.blogMeta())||null==t.summary?void 0:t.summary())||"",o=new(z());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},a.getImage=function(){var t,e=this.attrs,o=e.article,a=e.defaultImage;return null!=(t=o.blogMeta())&&null!=t.featuredImage&&t.featuredImage()?"url("+o.blogMeta().featuredImage()+")":a},a.view=function(t){var o,a=this.attrs,r=a.article,n=a.defaultImage,i=this.getImage(),s=null==(o=r.blogMeta())||null==o.isSized?void 0:o.isSized();return m(N(),{href:e().route("blogArticle",{id:""+r.slug()}),className:G()("BlogList-item",{"BlogList-item-sized":s,"BlogList-item-default":!s},r.tags().map((function(t){return"BlogList-item-category-"+t.id()})))},m("div",{class:G()("BlogList-item-photo",{"FlarumBlog-default-image":i===n}),style:{backgroundImage:i}}),m("div",{class:"BlogList-item-content"},this.contentItems().toArray()))},o}(w()),U=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.topItems=function(){var t,o,a,r=this.attrs.article,n=new(z());return n.add("tags",m("span",{class:"BlogFeatured-list-item-tags"},null==(t=r.tags())?void 0:t.map((function(t){return m("span",{class:"dataItem"},t.name())}))),100),r.isSticky()&&n.add("sticky",m("span",{class:"BlogFeatured-list-item-isSticky dataItem"},O()("fas fa-thumbtack")),80),(null!=(o=r.blogMeta())&&null!=o.isPendingReview&&o.isPendingReview()||r.isHidden())&&n.add("hidden",m("span",{class:"BlogFeatured-list-item-isHidden dataItem"},O()("fas fa-eye-slash")),60),null!=(a=r.blogMeta())&&null!=a.isPendingReview&&a.isPendingReview()&&n.add("pendingReview",m(T(),{text:e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review"),position:"bottom"},m("span",{class:"BlogFeatured-list-item-pendingReview dataItem"},O()("far fa-clock")," ",e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review_title"))),40),n},a.dataItems=function(){var t,o=this.attrs.article,a=new(z());return a.add("createdAt",m("span",{class:"BlogFeatured-list-item-details-createdAt"},O()("far fa-clock")," ",D()(o.createdAt())),100),a.add("author",m("span",{class:"BlogFeatured-list-item-details-author"},O()("far fa-user")," ",(null==(t=o.user())?void 0:t.displayName())||e().translator.trans("core.lib.username.deleted_text")),80),a.add("replies",m("span",{class:"BlogFeatured-list-item-details-replies"},O()("far fa-comment")," ",o.commentCount()-1),60),a},a.view=function(t){var o,a=this.attrs,r=a.article,n=a.defaultImage,i=null!=(o=r.blogMeta())&&null!=o.featuredImage&&o.featuredImage()?"url("+r.blogMeta().featuredImage()+")":n;return m(N(),{href:e().route("blogArticle",{id:""+r.slug()}),className:G()("BlogFeatured-list-item",r.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,r.title()),m("div",{className:"data"},this.dataItems().toArray())))},o}(w()),q=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.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},a.loadBlogOverview=function(){var t=e().preloadedApiDocument();t?setTimeout(this.show.bind(this,t),0):this.reloadData(),m.redraw()},a.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()}))},a.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()},a.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()}))},a.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"))))},a.view=function(){var t=this,o=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null;return[1==e().forum.attribute("blogAddHero")&&g().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 t.newArticle()},icon:"fas fa-pencil-alt"},e().translator.trans("v17development-flarum-blog.forum.compose.write_article")),null!==this.languages&&this.languages.length>=1&&m(I,{selected:this.currentSelectedLanguage,onclick:function(e){t.currentSelectedLanguage=e,m.route.set(document.location.pathname,{lang:e}),t.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(U,{article:t,defaultImage:o})})))),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(W,{article:t,defaultImage:o})})),!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 t.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(_,null),this.showForumNav&&m(S,null)))))]},a.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 Y=flarum.core.compat["forum/components/DiscussionPage"];var V=o.n(Y);const J=flarum.core.compat["common/extend"],K=flarum.core.compat["common/utils/mixin"];var Q=function(t){function e(){return t.apply(this,arguments)||this}return d(e,t),e}(o.n(K)()(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 X=flarum.core.compat["tags/components/TagsPage"];var Z=o.n(X);function tt(){(0,J.extend)(Z().prototype,"view",(function(t){var e=this;if(this.loading)return t;if(0==app.forum.attribute("blogHideTags"))return t;var o=app.forum.attribute("blogTags")||[],a=t.children[1].children[1].children[0].children;return t.children[1].children[1].children[0].children=a.map((function(t,a){return o.indexOf(e.tags[a].id())>=0?null:t})),t})),(0,J.extend)(k().prototype,"navItems",(function(t){return 0==app.forum.attribute("blogHideTags")||(app.forum.attribute("blogTags")||[]).forEach((function(e){t.remove("tag"+e)})),t}))}function et(){var t=app.route.discussion;app.route.discussion=function(e,o){var a=!1;if(("both"===app.forum.attribute("blogRedirectsEnabled")||"discussions_only"===app.forum.attribute("blogRedirectsEnabled"))&&e.tags().length>0){var r=app.forum.attribute("blogTags");e.tags().filter((function(t){return r.indexOf(t.id())>=0||t.parent()&&r.indexOf(t.parent().id())>=0})).length>0&&(a=!0)}return a?e.lastReadPostNumber()>1?app.route("blogArticle.near",{id:e.slug(),near:e.lastReadPostNumber()}):app.route("blogArticle",{id:e.slug()}):t(e,o)}}const ot=flarum.core.compat["common/helpers/listItems"];var at=o.n(ot);const rt=flarum.core.compat["common/helpers/avatar"];var nt=o.n(rt),it=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()})},nt()(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"},at()(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(z())},e}(w());const st=flarum.core.compat["common/components/Modal"];var lt=o.n(st);const ut=flarum.core.compat["common/utils/Stream"];var mt=o.n(ut),ct=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=mt()(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(z());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}(lt());const dt=flarum.core.compat["tags/components/TagDiscussionModal"];var pt=o.n(dt);function gt(t,e,o,a,r,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(a,r)}function ft(t){return function(){var e=this,o=arguments;return new Promise((function(a,r){var n=t.apply(e,o);function i(t){gt(n,a,r,i,s,"next",t)}function s(t){gt(n,a,r,i,s,"throw",t)}i(void 0)}))}}var ht=o(195),vt=o.n(ht);const bt=flarum.core.compat["common/components/Switch"];var yt=o.n(bt),wt=function(t){function a(){return t.apply(this,arguments)||this}d(a,t);var r=a.prototype;return r.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=mt()(this.meta.summary()||""),this.featuredImage=mt()(this.meta.featuredImage()||""),this.isFeatured=mt()(this.meta.isFeatured()||!1),this.isSized=mt()(this.meta.isSized()||!1),this.isPendingReview=mt()(this.meta.isPendingReview()||!1)},r.className=function(){return"Modal--small Support-Modal"},r.title=function(){return e().translator.trans("v17development-flarum-blog.forum.article_settings.title")},r.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},r.fields=function(){var t=this,a=new(z());a.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 r=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;r=m(b(),{class:"Button Button--icon",onclick:ft(vt().mark((function o(){return vt().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:e().modal.show(s,{uploader:l,onSelect:function(o){var a=e().store.getById("files",o[0]);t.featuredImage(a.url())}},!0);case 1:case"end":return o.stop()}}),o)}))),icon:"fas fa-cloud-upload-alt"})}return a.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":!!r},m("input",{type:"text",className:"FormControl",bidi:this.featuredImage,placeholder:"https://"}),r),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),a.add("sized",m("div",{className:"Form-group"},yt().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),a.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),a},r.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}},r.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)}))},a}(lt());const Bt=flarum.core.compat["forum/components/ComposerBody"];var Nt=o.n(Bt);const _t=flarum.core.compat["common/components/TextEditor"];var At=o.n(_t),Ft=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()),xt=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.previewContent=!1},a.view=function(){var t=this,o=this.composer.fields.content()&&""!==this.composer.fields.content(),a=this.loading||this.attrs.disabled;return m("div",{className:"Flarum-Blog-Composer "+(a?"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(Ft,{content:this.composer.fields.content()})),At().component({submitLabel:this.attrs.submitLabel||e().translator.trans("core.forum.composer_edit.submit_button"),placeholder:this.attrs.placeholder,disabled:a,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()})))},a.onsubmit=function(){this.attrs.onsubmit&&this.attrs.onsubmit()},o}(Nt()),It=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.oninit=function(o){var a=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=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 r=Array.isArray(m.route.param().tags)?m.route.param().tags:m.route.param().tags.split(",");m.route.param().tags.length>0&&r.forEach((function(t){var o=e().store.getById("tags",t);o&&a.tags.push(o)}))}this.isSaving=!1}else m.route.set(e().route("blog"))},a.openTagsModal=function(t){var o=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||e().modal.show(pt(),{selectedTags:this.tags,onsubmit:function(t){o.tags=t}})},a.openNameArticleModal=function(t){var o=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||e().modal.show(ct,{article:this.article,onChange:function(t){o.article.pushData({attributes:{title:t}})}})},a.openBlogSettings=function(t){var o=this;t.preventDefault(),this.isSaving||e().modal.show(wt,{meta:this.blogMeta,onsubmit:function(t){return o.blogMeta=t}})},a.view=function(){return m("div",{className:"FlarumBlogItem"},m("div",{className:"container"},this.pageItems().toArray()))},a.pageItems=function(){var t=new(z());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},a.articleWrapperItems=function(){var t=new(z());return t.add("container",m("div",{className:"FlarumBlog-Article-Container"},this.articleItems().toArray()),100),t.add("sidebar",m("div",{className:"FlarumBlog-Article-Sidebar"},m(it,{user:e().session.user})),90),t},a.articleItems=function(){var t=this,o=new(z()),a=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null,r=this.blogMeta&&this.blogMeta.featuredImage()?"url("+this.blogMeta.featuredImage()+")":a;return o.add("content",m("div",{className:"FlarumBlog-Article-Content"},m("div",{className:"FlarumBlog-Article-Image FlarumBlog-default-image",style:{backgroundImage:r,cursor:"pointer"},onclick:function(e){return t.openBlogSettings(e)}}),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(I,{selected:this.articleLanguage,onclick:function(e){return t.articleLanguage=e}}),m(b(),{className:"Button",onclick:function(e){return t.openBlogSettings(e)},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(e){return m("button",{class:"Button Button--text",onclick:function(e){return t.openTagsModal(e)}},e.name())})),m("button",{class:"Button Button--text",onclick:function(e){return t.openTagsModal(e)}},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("h3",{onclick:function(){return t.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(xt,{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 t.create()},disabled:this.isSaving})))),100),o.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),o},a.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 a={tags:this.tags};this.languages.length>0&&(a.language=e().store.getBy("discussion-languages","code",this.articleLanguage));var r={title:this.article.title(),content:e().composer.fields.content(),relationships:a,blogMeta:null!==this.blogMeta?{featuredImage:this.blogMeta.featuredImage(),summary:this.blogMeta.summary(),isSized:this.blogMeta.isSized()}:null};this.isSaving=!0,this.article.save(r).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 Lt=flarum.core,kt=flarum.core.compat["common/utils/extractText"];var Ct=o.n(kt),Mt=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")),a=app.translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),r="far fa-star";return"follow"===t&&(a=app.translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),r="fas fa-star"),m(T(),{text:o,position:"bottom"},m(b(),{className:"Button BlogArticleSubscription SubscriptionMenu-button--"+t,icon:r,onclick:this.saveSubscription.bind(this,this.attrs.discussion,-1!==["follow","ignore"].indexOf(t)?null:"follow")},a))},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,at()(this.items().toArray())))},o.items=function(){var t=new(z());return t.add("author",it.component(this.attrs),0),t.add("categories",_.component(this.attrs),0),t.add("nav",S.component(this.attrs),0),t},e}(w());const Pt=flarum.core.compat["forum/utils/DiscussionControls"];var Tt=o.n(Pt);const Et=flarum.core.compat["common/components/Alert"];var Dt=o.n(Et);const Rt=flarum.core.compat["forum/components/EditPostComposer"];var Ot=o.n(Rt),jt=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.init=function(){this.loadedPost=!1},a.manageArticleButtons=function(){var t=this,o=this.attrs.article,a=new(z()),r=flarum.extensions["fof-discussion-language"]&&void 0!==flarum.extensions["fof-discussion-language"].components?flarum.extensions["fof-discussion-language"].components.LanguageDiscussionModal:null;o.canRename()&&a.add("rename",b().component({className:"Button",onclick:function(){return e().modal.show(ct,{article:o})},icon:"fas fa-pencil-alt"},e().translator.trans("v17development-flarum-blog.forum.tools.rename_article")),100);var n=o.firstPost();return a.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),a.add("articleSettings",b().component({className:"Button",onclick:function(){return e().modal.show(wt,{article:o})},icon:"fas fa-cogs"},e().translator.trans("v17development-flarum-blog.forum.tools.article_settings")),80),o.canTag()&&a.add("tag",b().component({className:"Button",onclick:function(){return e().modal.show(pt(),{discussion:o})},icon:"fas fa-tag"},e().translator.trans("v17development-flarum-blog.forum.tools.update_category")),70),o.blogMeta()&&o.blogMeta().isPendingReview()&&(a.add("separator1",m("li",{className:"Dropdown-separator"}),65),a.add("approve",b().component({className:"Button",disabled:!e().forum.attribute("canApproveBlogPosts"),onclick:function(){o.blogMeta().save({isPendingReview:!1}).then((function(){e().alerts.show(Dt(),{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()&&r&&a.add("lang",b().component({icon:"fas fa-globe",onclick:function(){return e().modal.show(r,{discussion:o})}},e().translator.trans("fof-discussion-language.forum.discussion_controls.change_language_button")),50),a.add("separator2",m("li",{className:"Dropdown-separator"}),40),o.canLock()&&a.add("lock",b().component({className:"Button",onclick:Tt().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()?(a.add("recover",b().component({className:"Button",onclick:Tt().restoreAction.bind(o),icon:"fas fa-eye"},e().translator.trans("v17development-flarum-blog.forum.tools.recover_article")),20),o.canDelete()&&a.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)):a.add("hide",b().component({className:"Button",onclick:Tt().hideAction.bind(o),icon:"fas fa-eye-slash"},e().translator.trans("v17development-flarum-blog.forum.tools.hide_article")),0)),a},a.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"},F().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 Ht=o.n(Gt);const zt=flarum.core.compat["forum/components/PostStream"];var Wt=o.n(zt);const Ut=flarum.core.compat["forum/states/PostStreamState"];var $t=o.n(Ut);const qt=flarum.core.compat["common/helpers/fullTime"];var Yt=o.n(qt),Vt=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.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()},a.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()},a.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 a=[];if(t.payload&&t.payload.included){var r=t.id();a=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===r})).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($t())(t,a),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()},a.postItems=function(){var t,o,a,r=null;!this.loading&&this.article&&(r=null==(a=this.article)||null==a.firstPost?void 0:a.firstPost());var n,i,s,l=new(z());return l.add("title",m("h3",{className:G()("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:G()("FlarumBlog-Article-PublishDate",{"FlarumBlog-Article-GhostPublishDate":this.loading})},this.article?Yt()(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,O()("far fa-clock",{style:{marginRight:"5px"}})," ",e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")))),60),r&&l.add("post",m(Ht(),{post:r}),40)),l},a.contentItems=function(){var t,o,a,r,n,i,s,l,u,c,d=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null,p=null!=(t=this.article)&&null!=(o=t.blogMeta())&&null!=o.featuredImage&&o.featuredImage()?"url("+this.article.blogMeta().featuredImage()+")":d,g=new(z());return g.add("image",m("div",{className:G()("FlarumBlog-Article-Image FlarumBlog-default-image",{"FlarumBlog-Article-GhostImage":this.loading}),style:{backgroundImage:p,opacity:null!=(a=this.article)&&null!=a.isHidden&&a.isHidden()?.4:null}}),100),this.article&&(null!=(r=e().session.user)&&null!=r.canEdit&&r.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())&&g.add("editArticle",m(jt,{article:this.article}),80),g.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),g.add("post",m("div",{className:"FlarumBlog-Article-Post"},this.postItems().toArray()),40),g},a.articleItems=function(){var t,o,a,r=new(z());return r.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())||r.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(Mt,{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==(a=this.article)||null==a.isLocked?void 0:a.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),r},a.view=function(){return[1==e().forum.attribute("blogAddHero")&&g().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(q)&&(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}))))]},a.positionChanged=function(t,o){var a=this.article;e().session.user&&o>(a.lastReadPostNumber()||0)&&(a.save({lastReadPostNumber:o}),m.redraw())},o}(h());const Jt=flarum.core.compat["common/components/LinkButton"];var Kt=o.n(Jt);function Qt(){(0,J.extend)(k().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}))}const Xt=flarum.core.compat["forum/components/ModalManager"];var Zt=o.n(Xt),te=function(){function t(){this.modal=null,this.modalList=[],this.key=0,this.closeTimeout=void 0}var e=t.prototype;return e.show=function(t,e,o){if(void 0===e&&(e={}),void 0===o&&(o=!1),!(t.prototype instanceof lt())){var a="The ModalManager can only show Modals.";throw console.error(a),new Error(a)}this.closeTimeout&&clearTimeout(this.closeTimeout),this.modal={componentClass:t,attrs:e,key:this.key++},o?this.modalList.push(this.modal):this.modalList=[this.modal],m.redraw.sync()},e.close=function(){var t=this;if(this.modal){var e;if(this.modalList.length>=2)return $(".modal[modal-key="+(null==(e=this.modal)?void 0:e.key)+"]").one("hide.bs.modal",(function(){var e=t.modalList.indexOf(t.modal);t.modalList.splice(e,1),t.modal=t.modalList[t.modalList.length-1],setTimeout((function(){$(document.body).addClass("modal-open")}),1e3),m.redraw()})).modal("hide"),void m.redraw();this.closeTimeout=window.setTimeout((function(){var e;$(".modal[modal-key="+(null==(e=t.modal)?void 0:e.key)+"]").modal("hide").one("hide.bs.modal",(function(){t.modal=null,m.redraw()}))}))}},e.isModalOpen=function(){return!!this.modal},t}();function ee(){$.fn.modal&&(app.modal=new te,(0,J.override)(Zt().prototype,"view",(function(){var t=this;return this.attrs.state.modalList.map((function(e){var o=null==e?void 0:e.componentClass;return m("div",{className:"ModalManager modal fade","modal-key":e.key},!!o&&m(o,Object.assign({key:null==e?void 0:e.key},e.attrs,{animateShow:t.animateShow.bind(t),animateHide:t.animateHide.bind(t),state:t.attrs.state})))}))})),(0,J.override)(Zt().prototype,"animateHide",(function(){1===this.attrs.state.modalList.length&&(this.modalShown=!1)})),(0,J.override)(Zt().prototype,"animateShow",(function(t){var e=this;if(void 0===t&&(t=function(){}),this.attrs.state.modal){var o=!!this.attrs.state.modal.componentClass.isDismissible;this.modalShown=!0,$(".modal[modal-key="+this.attrs.state.modal.key+"]").hasClass("in")?t():setTimeout((function(){$(".modal[modal-key="+e.attrs.state.modal.key+"]").one("shown.bs.modal",t).modal({backdrop:o||"static",keyboard:o,show:!0})}),1)}})))}e().initializers.add("v17development-flarum-blog",(function(t){t.routes.blog={path:"/blog",component:q},t.routes.blogCategory={path:"/blog/category/:slug",component:q},t.routes.blogComposer={path:"/blog/compose",component:It},t.routes.blogArticle={path:"/blog/:id",component:Vt},t.routes["blogArticle.near"]={path:"/blog/:id/:near",component:Vt},t.store.models.blogMeta=Q,u().prototype.blogMeta=n().hasOne("blogMeta"),s().prototype.isBlog=n().attribute("isBlog"),(0,J.extend)(k().prototype,"oncreate",(function(){var t=this.currentTag(),o="both"===e().forum.attribute("blogRedirectsEnabled")||"tags_only"===e().forum.attribute("blogRedirectsEnabled");if(t&&o){var a=e().forum.attribute("blogTags");(a.indexOf(t.id())>=0||t.parent()&&a.indexOf(t.parent().id())>=0)&&m.route.set(e().route("blog"))}})),(0,J.override)(V().prototype,"show",(function(t,o){if(("both"===e().forum.attribute("blogRedirectsEnabled")||"discussions_only"===e().forum.attribute("blogRedirectsEnabled"))&&o&&o&&o.tags().length>0){var a=e().forum.attribute("blogTags");if(o.tags().filter((function(t){return a.indexOf(t.id())>=0||t.parent()&&a.indexOf(t.parent().id())>=0})).length>0){var r=e().route("blogArticle",{id:o.slug()});return m.route.set(r,null,{replace:!0}),null}}return t(o)})),tt(),et(),Qt(),ee()}),-1e5),Object.assign(Lt.compat,{"v17development/blog/components/BlogItemSidebar":St,"v17development/blog/components/BlogAuthor":it,"v17development/blog/components/Composer/Composer":xt,"v17development/blog/components/Composer/ComposerPreview":Ft,"v17development/blog/components/LanguageDropdown/Language":x,"v17development/blog/components/LanguageDropdown/LanguageDropdown":I,"v17development/blog/components/Modals/BlogPostSettingsModal":wt,"v17development/blog/components/Modals/RenameArticleModal":ct,"v17development/blog/components/ArticleSubscription":Mt,"v17development/blog/components/BlogCategories":_,"v17development/blog/components/BlogOverviewItem":W,"v17development/blog/components/BlogPostController":jt,"v17development/blog/components/FeaturedBlogItem":U,"v17development/blog/components/ForumNav":S,"v17development/blog/pages/BlogItem":Vt,"v17development/blog/pages/BlogOverview":q,"v17development/blog/models/BlogMeta":Q})})(),module.exports=a})(); +(()=>{var t={648:(t,e,o)=>{var a=o(814).default;function r(){"use strict";t.exports=r=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,a){var r=e&&e.prototype instanceof g?e:g,n=Object.create(r.prototype),i=new x(a||[]);return n._invoke=function(t,e,o){var a="suspendedStart";return function(r,n){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===r)throw n;return{value:void 0,done:!0}}for(o.method=r,o.arg=n;;){var i=o.delegate;if(i){var s=_(i,o);if(s){if(s===p)continue;return s}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===a)throw a="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a="executing";var l=d(t,e,o);if("normal"===l.type){if(a=o.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:o.done}}"throw"===l.type&&(a="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 p={};function g(){}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=g.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(r,i,s,l){var u=d(t[r],t,i);if("throw"!==u.type){var m=u.arg,c=m.value;return c&&"object"==a(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 r;this._invoke=function(t,a){function n(){return new e((function(e,r){o(t,a,e,r)}))}return r=r?r.then(n,n):n()}}function _(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,_(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var a=d(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,p;var r=a.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function A(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(A,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,a=function e(){for(;++o=0;--a){var r=this.tryEntries[a],i=r.completion;if("root"===r.tryLoc)return o("end");if(r.tryLoc<=this.prev){var s=n.call(r,"catchLoc"),l=n.call(r,"finallyLoc");if(s&&l){if(this.prev=0;--o){var a=this.tryEntries[o];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),F(o),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var a=o.completion;if("throw"===a.type){var r=a.arg;F(o)}return r}}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),p}},e}t.exports=r,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 a=o(648)();t.exports=a;try{regeneratorRuntime=a}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=a:Function("r","regeneratorRuntime = r")(a)}},482:t=>{"use strict";t.exports=flarum.extensions["fof-upload"]}},e={};function o(a){var r=e[a];if(void 0!==r)return r.exports;var n=e[a]={exports:{}};return t[a](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 a in e)o.o(e,a)&&!o.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},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 a={};(()=>{"use strict";o.r(a);const t=flarum.core.compat["forum/app"];var e=o.n(t);const r=flarum.core.compat["common/Model"];var n=o.n(r);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 p=flarum.core.compat["components/IndexPage"];var g=o.n(p);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),_=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 a=[],r=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")&&(r=!0),a.push(t.categoryItem(e)))})),r?[t.categoryItem(o)].concat(a):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 A=flarum.core.compat["common/components/Dropdown"];var F=o.n(A),x=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.languages=app.store.all("discussion-languages"),this.options=this.languages.reduce((function(t,e){return t[e.code()]=m("span",null,m("i",{className:"fas fa-globe"})," ",e.name()),t}),this.attrs.extra||{})},o.view=function(){var t=this.attrs,e=t.language,o=t.uppercase,a=e.name()||"";return m("span",null,m("i",{className:"fas fa-globe"})," ",o?a.toUpperCase():a)},e}(w()),I=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.languages=app.store.all("discussion-languages"),this.options=this.languages.reduce((function(t,e){return t[e.code()]=m(x,{language:e}),t}),this.attrs.extra||{})},o.view=function(){var t=this,e=this.attrs.selected;return F().component({buttonClassName:"Button",label:this.options[e]||this.options[this.attrs.default]},Object.keys(this.options).map((function(o){var a;a=app.forum.attribute("fof-discussion-language.composerLocaleDefault")?"any":app.translator.formatter.locale;var r=o===(e||a);return b().component({active:r,icon:!r||"fas fa-check",onclick:function(){return t.attrs.onclick(o)}},t.options[o])})))},e}(w());const L=flarum.core.compat["forum/components/IndexPage"];var k=o.n(L);const C=flarum.core.compat["common/components/SelectDropdown"];var M=o.n(C),S=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(M(),{buttonClassName:"Button",className:"App-titleControl"},this.navItems().toArray())))},o.navItems=function(){return k().prototype.navItems()},e}(w());const P=flarum.core.compat["common/components/Tooltip"];var T=o.n(P);const E=flarum.core.compat["common/helpers/humanTime"];var D=o.n(E);const R=flarum.core.compat["common/helpers/icon"];var O=o.n(R);const j=flarum.core.compat["common/utils/classList"];var G=o.n(j);const H=flarum.core.compat["common/utils/ItemList"];var z=o.n(H),W=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.titleItems=function(){var t,o,a=this.attrs.article,r=new(z());return r.add("title",m("[",null,a.title()),100),(null!=(t=a.blogMeta())&&null!=t.isPendingReview&&t.isPendingReview()||a.isHidden())&&r.add("hidden",O()("fas fa-eye-slash",{class:"BlogList-item-hidden"}),80),null!=(o=a.blogMeta())&&null!=o.isPendingReview&&o.isPendingReview()&&r.add("pendingReview",m(T(),{text:e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")},O()("far fa-clock",{class:"BlogList-item-pendingReview"})),40),r},a.dataItems=function(){var t,o=this.attrs.article,a=new(z());return a.add("createdAt",m("span",{class:"BlogList-item-details-createdAt"},O()("far fa-clock")," ",D()(o.createdAt())),100),a.add("author",m("span",{class:"BlogList-item-details-author"},O()("far fa-user")," ",(null==(t=o.user())||null==t.displayName?void 0:t.displayName())||e().translator.trans("core.lib.username.deleted_text")),80),a.add("replies",m("span",{class:"BlogList-item-details-replies"},O()("far fa-comment")," ",(o.commentCount()||1)-1),60),a},a.contentItems=function(){var t,e=(null==(t=this.attrs.article.blogMeta())||null==t.summary?void 0:t.summary())||"",o=new(z());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},a.getImage=function(){var t,e=this.attrs,o=e.article,a=e.defaultImage;return null!=(t=o.blogMeta())&&null!=t.featuredImage&&t.featuredImage()?"url("+o.blogMeta().featuredImage()+")":a},a.view=function(t){var o,a=this.attrs,r=a.article,n=a.defaultImage,i=this.getImage(),s=null==(o=r.blogMeta())||null==o.isSized?void 0:o.isSized();return m(N(),{href:e().route("blogArticle",{id:""+r.slug()}),className:G()("BlogList-item",{"BlogList-item-sized":s,"BlogList-item-default":!s},r.tags().map((function(t){return"BlogList-item-category-"+t.id()})))},m("div",{class:G()("BlogList-item-photo",{"FlarumBlog-default-image":i===n}),style:{backgroundImage:i}}),m("div",{class:"BlogList-item-content"},this.contentItems().toArray()))},o}(w()),U=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.topItems=function(){var t,o,a,r=this.attrs.article,n=new(z());return n.add("tags",m("span",{class:"BlogFeatured-list-item-tags"},null==(t=r.tags())?void 0:t.map((function(t){return m("span",{class:"dataItem"},t.name())}))),100),r.isSticky()&&n.add("sticky",m("span",{class:"BlogFeatured-list-item-isSticky dataItem"},O()("fas fa-thumbtack")),80),(null!=(o=r.blogMeta())&&null!=o.isPendingReview&&o.isPendingReview()||r.isHidden())&&n.add("hidden",m("span",{class:"BlogFeatured-list-item-isHidden dataItem"},O()("fas fa-eye-slash")),60),null!=(a=r.blogMeta())&&null!=a.isPendingReview&&a.isPendingReview()&&n.add("pendingReview",m(T(),{text:e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review"),position:"bottom"},m("span",{class:"BlogFeatured-list-item-pendingReview dataItem"},O()("far fa-clock")," ",e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review_title"))),40),n},a.dataItems=function(){var t,o=this.attrs.article,a=new(z());return a.add("createdAt",m("span",{class:"BlogFeatured-list-item-details-createdAt"},O()("far fa-clock")," ",D()(o.createdAt())),100),a.add("author",m("span",{class:"BlogFeatured-list-item-details-author"},O()("far fa-user")," ",(null==(t=o.user())?void 0:t.displayName())||e().translator.trans("core.lib.username.deleted_text")),80),a.add("replies",m("span",{class:"BlogFeatured-list-item-details-replies"},O()("far fa-comment")," ",o.commentCount()-1),60),a},a.view=function(t){var o,a=this.attrs,r=a.article,n=a.defaultImage,i=null!=(o=r.blogMeta())&&null!=o.featuredImage&&o.featuredImage()?"url("+r.blogMeta().featuredImage()+")":n;return m(N(),{href:e().route("blogArticle",{id:""+r.slug()}),className:G()("BlogFeatured-list-item",r.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,r.title()),m("div",{className:"data"},this.dataItems().toArray())))},o}(w()),q=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.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},a.loadBlogOverview=function(){var t=e().preloadedApiDocument();t?setTimeout(this.show.bind(this,t),0):this.reloadData(),m.redraw()},a.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()}))},a.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()},a.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()}))},a.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"))))},a.view=function(){var t=this,o=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null;return[1==e().forum.attribute("blogAddHero")&&g().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 t.newArticle()},icon:"fas fa-pencil-alt"},e().translator.trans("v17development-flarum-blog.forum.compose.write_article")),null!==this.languages&&this.languages.length>=1&&m(I,{selected:this.currentSelectedLanguage,onclick:function(e){t.currentSelectedLanguage=e,m.route.set(document.location.pathname,{lang:e}),t.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(U,{article:t,defaultImage:o})})))),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(W,{article:t,defaultImage:o})})),!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 t.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(_,null),this.showForumNav&&m(S,null)))))]},a.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 Y=flarum.core.compat["forum/components/DiscussionPage"];var V=o.n(Y);const J=flarum.core.compat["common/extend"],K=flarum.core.compat["common/utils/mixin"];var Q=function(t){function e(){return t.apply(this,arguments)||this}return d(e,t),e}(o.n(K)()(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 X=flarum.core.compat["tags/components/TagsPage"];var Z=o.n(X);function tt(){(0,J.extend)(Z().prototype,"view",(function(t){var e=this;if(this.loading)return t;if(0==app.forum.attribute("blogHideTags"))return t;var o=app.forum.attribute("blogTags")||[],a=t.children[1].children[1].children[0].children;return t.children[1].children[1].children[0].children=a.map((function(t,a){return o.indexOf(e.tags[a].id())>=0?null:t})),t})),(0,J.extend)(k().prototype,"navItems",(function(t){return 0==app.forum.attribute("blogHideTags")||(app.forum.attribute("blogTags")||[]).forEach((function(e){t.remove("tag"+e)})),t}))}function et(){var t=app.route.discussion;app.route.discussion=function(e,o){var a=!1;if(("both"===app.forum.attribute("blogRedirectsEnabled")||"discussions_only"===app.forum.attribute("blogRedirectsEnabled"))&&e.tags().length>0){var r=app.forum.attribute("blogTags");e.tags().filter((function(t){return r.indexOf(t.id())>=0||t.parent()&&r.indexOf(t.parent().id())>=0})).length>0&&(a=!0)}return a?e.lastReadPostNumber()>1?app.route("blogArticle.near",{id:e.slug(),near:e.lastReadPostNumber()}):app.route("blogArticle",{id:e.slug()}):t(e,o)}}const ot=flarum.core.compat["common/helpers/listItems"];var at=o.n(ot);const rt=flarum.core.compat["common/helpers/avatar"];var nt=o.n(rt),it=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()})},nt()(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"},at()(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(z())},e}(w());const st=flarum.core.compat["common/components/Modal"];var lt=o.n(st);const ut=flarum.core.compat["common/utils/Stream"];var mt=o.n(ut),ct=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=mt()(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(z());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}(lt());const dt=flarum.core.compat["tags/components/TagDiscussionModal"];var pt=o.n(dt);function gt(t,e,o,a,r,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(a,r)}function ft(t){return function(){var e=this,o=arguments;return new Promise((function(a,r){var n=t.apply(e,o);function i(t){gt(n,a,r,i,s,"next",t)}function s(t){gt(n,a,r,i,s,"throw",t)}i(void 0)}))}}var ht=o(195),vt=o.n(ht);const bt=flarum.core.compat["common/components/Switch"];var yt=o.n(bt),wt=function(t){function a(){return t.apply(this,arguments)||this}d(a,t);var r=a.prototype;return r.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=mt()(this.meta.summary()||""),this.featuredImage=mt()(this.meta.featuredImage()||""),this.isFeatured=mt()(this.meta.isFeatured()||!1),this.isSized=mt()(this.meta.isSized()||!1),this.isPendingReview=mt()(this.meta.isPendingReview()||!1)},r.className=function(){return"Modal--small Support-Modal"},r.title=function(){return e().translator.trans("v17development-flarum-blog.forum.article_settings.title")},r.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},r.fields=function(){var t=this,a=new(z());a.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 r=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;r=m(b(),{class:"Button Button--icon",onclick:ft(vt().mark((function o(){return vt().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:e().modal.show(s,{uploader:l,onSelect:function(o){var a=e().store.getById("files",o[0]);t.featuredImage(a.url())}},!0);case 1:case"end":return o.stop()}}),o)}))),icon:"fas fa-cloud-upload-alt"})}return a.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":!!r},m("input",{type:"text",className:"FormControl",bidi:this.featuredImage,placeholder:"https://"}),r),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),a.add("sized",m("div",{className:"Form-group"},yt().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),a.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),a},r.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}},r.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)}))},a}(lt());const Bt=flarum.core.compat["forum/components/ComposerBody"];var Nt=o.n(Bt);const _t=flarum.core.compat["common/components/TextEditor"];var At=o.n(_t),Ft=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()),xt=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.previewContent=!1},a.view=function(){var t=this,o=this.composer.fields.content()&&""!==this.composer.fields.content(),a=this.loading||this.attrs.disabled;return m("div",{className:"Flarum-Blog-Composer "+(a?"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(Ft,{content:this.composer.fields.content()})),At().component({submitLabel:this.attrs.submitLabel||e().translator.trans("core.forum.composer_edit.submit_button"),placeholder:this.attrs.placeholder,disabled:a,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()})))},a.onsubmit=function(){this.attrs.onsubmit&&this.attrs.onsubmit()},o}(Nt()),It=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.oninit=function(o){var a=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=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 r=Array.isArray(m.route.param().tags)?m.route.param().tags:m.route.param().tags.split(",");m.route.param().tags.length>0&&r.forEach((function(t){var o=e().store.getById("tags",t);o&&a.tags.push(o)}))}this.isSaving=!1}else m.route.set(e().route("blog"))},a.openTagsModal=function(t){var o=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||e().modal.show(pt(),{selectedTags:this.tags,onsubmit:function(t){o.tags=t}})},a.openNameArticleModal=function(t){var o=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||e().modal.show(ct,{article:this.article,onChange:function(t){o.article.pushData({attributes:{title:t}})}})},a.openBlogSettings=function(t){var o=this;t.preventDefault(),this.isSaving||e().modal.show(wt,{meta:this.blogMeta,onsubmit:function(t){return o.blogMeta=t}})},a.view=function(){return m("div",{className:"FlarumBlogItem"},m("div",{className:"container"},this.pageItems().toArray()))},a.pageItems=function(){var t=new(z());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},a.articleWrapperItems=function(){var t=new(z());return t.add("container",m("div",{className:"FlarumBlog-Article-Container"},this.articleItems().toArray()),100),t.add("sidebar",m("div",{className:"FlarumBlog-Article-Sidebar"},m(it,{user:e().session.user})),90),t},a.articleItems=function(){var t=this,o=new(z()),a=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null,r=this.blogMeta&&this.blogMeta.featuredImage()?"url("+this.blogMeta.featuredImage()+")":a;return o.add("content",m("div",{className:"FlarumBlog-Article-Content"},m("div",{className:"FlarumBlog-Article-Image FlarumBlog-default-image",style:{backgroundImage:r,cursor:"pointer"},onclick:function(e){return t.openBlogSettings(e)}}),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(I,{selected:this.articleLanguage,onclick:function(e){return t.articleLanguage=e}}),m(b(),{className:"Button",onclick:function(e){return t.openBlogSettings(e)},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(e){return m("button",{class:"Button Button--text",onclick:function(e){return t.openTagsModal(e)}},e.name())})),m("button",{class:"Button Button--text",onclick:function(e){return t.openTagsModal(e)}},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("h3",{onclick:function(){return t.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(xt,{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 t.create()},disabled:this.isSaving})))),100),o.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),o},a.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 a={tags:this.tags};this.languages.length>0&&(a.language=e().store.getBy("discussion-languages","code",this.articleLanguage));var r={title:this.article.title(),content:e().composer.fields.content(),relationships:a,blogMeta:null!==this.blogMeta?{featuredImage:this.blogMeta.featuredImage(),summary:this.blogMeta.summary(),isSized:this.blogMeta.isSized()}:null};this.isSaving=!0,this.article.save(r).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 Lt=flarum.core,kt=flarum.core.compat["common/utils/extractText"];var Ct=o.n(kt),Mt=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")),a=app.translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),r="far fa-star";return"follow"===t&&(a=app.translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),r="fas fa-star"),m(T(),{text:o,position:"bottom"},m(b(),{className:"Button BlogArticleSubscription SubscriptionMenu-button--"+t,icon:r,onclick:this.saveSubscription.bind(this,this.attrs.discussion,-1!==["follow","ignore"].indexOf(t)?null:"follow")},a))},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,at()(this.items().toArray())))},o.items=function(){var t=new(z());return t.add("author",it.component(this.attrs),0),t.add("categories",_.component(this.attrs),0),t.add("nav",S.component(this.attrs),0),t},e}(w());const Pt=flarum.core.compat["forum/utils/DiscussionControls"];var Tt=o.n(Pt);const Et=flarum.core.compat["common/components/Alert"];var Dt=o.n(Et);const Rt=flarum.core.compat["forum/components/EditPostComposer"];var Ot=o.n(Rt),jt=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.init=function(){this.loadedPost=!1},a.manageArticleButtons=function(){var t=this,o=this.attrs.article,a=new(z()),r=flarum.extensions["fof-discussion-language"]&&void 0!==flarum.extensions["fof-discussion-language"].components?flarum.extensions["fof-discussion-language"].components.LanguageDiscussionModal:null;o.canRename()&&a.add("rename",b().component({className:"Button",onclick:function(){return e().modal.show(ct,{article:o})},icon:"fas fa-pencil-alt"},e().translator.trans("v17development-flarum-blog.forum.tools.rename_article")),100);var n=o.firstPost();return a.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),a.add("articleSettings",b().component({className:"Button",onclick:function(){return e().modal.show(wt,{article:o})},icon:"fas fa-cogs"},e().translator.trans("v17development-flarum-blog.forum.tools.article_settings")),80),o.canTag()&&a.add("tag",b().component({className:"Button",onclick:function(){return e().modal.show(pt(),{discussion:o})},icon:"fas fa-tag"},e().translator.trans("v17development-flarum-blog.forum.tools.update_category")),70),o.blogMeta()&&o.blogMeta().isPendingReview()&&(a.add("separator1",m("li",{className:"Dropdown-separator"}),65),a.add("approve",b().component({className:"Button",disabled:!e().forum.attribute("canApproveBlogPosts"),onclick:function(){o.blogMeta().save({isPendingReview:!1}).then((function(){e().alerts.show(Dt(),{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()&&r&&a.add("lang",b().component({icon:"fas fa-globe",onclick:function(){return e().modal.show(r,{discussion:o})}},e().translator.trans("fof-discussion-language.forum.discussion_controls.change_language_button")),50),a.add("separator2",m("li",{className:"Dropdown-separator"}),40),o.canLock()&&a.add("lock",b().component({className:"Button",onclick:Tt().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()?(a.add("recover",b().component({className:"Button",onclick:Tt().restoreAction.bind(o),icon:"fas fa-eye"},e().translator.trans("v17development-flarum-blog.forum.tools.recover_article")),20),o.canDelete()&&a.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)):a.add("hide",b().component({className:"Button",onclick:Tt().hideAction.bind(o),icon:"fas fa-eye-slash"},e().translator.trans("v17development-flarum-blog.forum.tools.hide_article")),0)),a},a.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"},F().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 Ht=o.n(Gt);const zt=flarum.core.compat["forum/components/PostStream"];var Wt=o.n(zt);const Ut=flarum.core.compat["forum/states/PostStreamState"];var $t=o.n(Ut);const qt=flarum.core.compat["common/helpers/fullTime"];var Yt=o.n(qt),Vt=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var a=o.prototype;return a.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()},a.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()},a.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 a=[];if(t.payload&&t.payload.included){var r=t.id();a=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===r})).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($t())(t,a),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()},a.postItems=function(){var t,o,a,r=null;!this.loading&&this.article&&(r=null==(a=this.article)||null==a.firstPost?void 0:a.firstPost());var n,i,s,l=new(z());return l.add("title",m("h3",{className:G()("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:G()("FlarumBlog-Article-PublishDate",{"FlarumBlog-Article-GhostPublishDate":this.loading})},this.article?Yt()(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,O()("far fa-clock",{style:{marginRight:"5px"}})," ",e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")))),60),r&&l.add("post",m(Ht(),{post:r}),40)),l},a.contentItems=function(){var t,o,a,r,n,i,s,l,u,c,d=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null,p=null!=(t=this.article)&&null!=(o=t.blogMeta())&&null!=o.featuredImage&&o.featuredImage()?"url("+this.article.blogMeta().featuredImage()+")":d,g=new(z());return g.add("image",m("div",{className:G()("FlarumBlog-Article-Image FlarumBlog-default-image",{"FlarumBlog-Article-GhostImage":this.loading}),style:{backgroundImage:p,opacity:null!=(a=this.article)&&null!=a.isHidden&&a.isHidden()?.4:null}}),100),this.article&&(null!=(r=e().session.user)&&null!=r.canEdit&&r.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())&&g.add("editArticle",m(jt,{article:this.article}),80),g.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),g.add("post",m("div",{className:"FlarumBlog-Article-Post"},this.postItems().toArray()),40),g},a.articleItems=function(){var t,o,a,r=new(z());return r.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())||r.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(Mt,{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==(a=this.article)||null==a.isLocked?void 0:a.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),r},a.view=function(){return[1==e().forum.attribute("blogAddHero")&&g().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(q)&&(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}))))]},a.positionChanged=function(t,o){var a=this.article;e().session.user&&o>(a.lastReadPostNumber()||0)&&(a.save({lastReadPostNumber:o}),m.redraw())},o}(h());const Jt=flarum.core.compat["common/components/LinkButton"];var Kt=o.n(Jt);function Qt(){(0,J.extend)(k().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}))}const Xt=flarum.core.compat["forum/components/ModalManager"];var Zt=o.n(Xt),te=function(){function t(){this.modal=null,this.modalList=[],this.key=0,this.closeTimeout=void 0}var e=t.prototype;return e.show=function(t,e,o){if(void 0===e&&(e={}),void 0===o&&(o=!1),!(t.prototype instanceof lt())){var a="The ModalManager can only show Modals.";throw console.error(a),new Error(a)}this.closeTimeout&&clearTimeout(this.closeTimeout),this.modal={componentClass:t,attrs:e,key:this.key++},o?this.modalList.push(this.modal):this.modalList=[this.modal],m.redraw.sync()},e.close=function(){var t=this;if(this.modal){var e;if(this.modalList.length>=2)return $(".modal[modal-key="+(null==(e=this.modal)?void 0:e.key)+"]").one("hide.bs.modal",(function(){var e=t.modalList.indexOf(t.modal);t.modalList.splice(e,1),t.modal=t.modalList[t.modalList.length-1],setTimeout((function(){$(document.body).addClass("modal-open")}),1e3),m.redraw()})).modal("hide"),void m.redraw();this.closeTimeout=window.setTimeout((function(){var e;$(".modal[modal-key="+(null==(e=t.modal)?void 0:e.key)+"]").modal("hide").one("hide.bs.modal",(function(){t.modal=null,m.redraw()}))}))}},e.isModalOpen=function(){return!!this.modal},t}();e().initializers.add("v17development-flarum-blog",(function(t){t.routes.blog={path:"/blog",component:q},t.routes.blogCategory={path:"/blog/category/:slug",component:q},t.routes.blogComposer={path:"/blog/compose",component:It},t.routes.blogArticle={path:"/blog/:id",component:Vt},t.routes["blogArticle.near"]={path:"/blog/:id/:near",component:Vt},t.store.models.blogMeta=Q,u().prototype.blogMeta=n().hasOne("blogMeta"),s().prototype.isBlog=n().attribute("isBlog"),(0,J.extend)(k().prototype,"oncreate",(function(){var t=this.currentTag(),o="both"===e().forum.attribute("blogRedirectsEnabled")||"tags_only"===e().forum.attribute("blogRedirectsEnabled");if(t&&o){var a=e().forum.attribute("blogTags");(a.indexOf(t.id())>=0||t.parent()&&a.indexOf(t.parent().id())>=0)&&m.route.set(e().route("blog"))}})),(0,J.override)(V().prototype,"show",(function(t,o){if(("both"===e().forum.attribute("blogRedirectsEnabled")||"discussions_only"===e().forum.attribute("blogRedirectsEnabled"))&&o&&o&&o.tags().length>0){var a=e().forum.attribute("blogTags");if(o.tags().filter((function(t){return a.indexOf(t.id())>=0||t.parent()&&a.indexOf(t.parent().id())>=0})).length>0){var r=e().route("blogArticle",{id:o.slug()});return m.route.set(r,null,{replace:!0}),null}}return t(o)})),tt(),et(),Qt(),function(){if($.fn.modal){var t=document.createElement("style");t.innerHTML="\n#modal .ModalManager:not(:last-child),\n.modal-backdrop.in:not(:last-child) {\n opacity: 0;\n}",document.head.appendChild(t),e().modal=new te,(0,J.override)(Zt().prototype,"view",(function(){var t=this;return this.attrs.state.modalList.map((function(e){var o=null==e?void 0:e.componentClass;return m("div",{className:"ModalManager modal fade","modal-key":e.key},!!o&&m(o,Object.assign({key:null==e?void 0:e.key},e.attrs,{animateShow:t.animateShow.bind(t),animateHide:t.animateHide.bind(t),state:t.attrs.state})))}))})),(0,J.override)(Zt().prototype,"animateHide",(function(){1===this.attrs.state.modalList.length&&(this.modalShown=!1)})),(0,J.override)(Zt().prototype,"animateShow",(function(t){var e=this;if(void 0===t&&(t=function(){}),this.attrs.state.modal){var o=!!this.attrs.state.modal.componentClass.isDismissible;this.modalShown=!0,$(".modal[modal-key="+this.attrs.state.modal.key+"]").hasClass("in")?t():setTimeout((function(){$(".modal[modal-key="+e.attrs.state.modal.key+"]").one("shown.bs.modal",t).modal({backdrop:o||"static",keyboard:o,show:!0})}),1)}}))}}()}),-1e5),Object.assign(Lt.compat,{"v17development/blog/components/BlogItemSidebar":St,"v17development/blog/components/BlogAuthor":it,"v17development/blog/components/Composer/Composer":xt,"v17development/blog/components/Composer/ComposerPreview":Ft,"v17development/blog/components/LanguageDropdown/Language":x,"v17development/blog/components/LanguageDropdown/LanguageDropdown":I,"v17development/blog/components/Modals/BlogPostSettingsModal":wt,"v17development/blog/components/Modals/RenameArticleModal":ct,"v17development/blog/components/ArticleSubscription":Mt,"v17development/blog/components/BlogCategories":_,"v17development/blog/components/BlogOverviewItem":W,"v17development/blog/components/BlogPostController":jt,"v17development/blog/components/FeaturedBlogItem":U,"v17development/blog/components/ForumNav":S,"v17development/blog/pages/BlogItem":Vt,"v17development/blog/pages/BlogOverview":q,"v17development/blog/models/BlogMeta":Q})})(),module.exports=a})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index 98dd754..2462eb1 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":";2BAAA,IAAIA,EAAUC,EAAAA,KAAAA,QAEd,SAASC,IACP,aAGAC,EAAOC,Q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,IAAMsN,EAAW/I,IAAAA,MAAAA,UAAoB,YAOrC,GALkBgI,EAAWpH,OAAO6F,QAAO,SAAChG,GAC1C,OAAOsI,EAASL,QAAQjI,EAAIe,OAAS,GAAMf,EAAIY,UAAY0H,EAASL,QAAQjI,EAAIY,SAASG,OAAS,KAItF/F,OAAS,EAAG,CAExB,IAAM4O,EAAMrK,IAAAA,MAAU,cAAe,CACnCwB,GAAIwG,EAAWlH,SAKjB,OAFAC,EAAEC,MAAMkG,IAAImD,EAAK,KAAM,CAAEtD,SAAS,IAE3B,MAIX,OAAOmO,EAASlN,MDKhBE,KAGAiN,KAGA5C,KAOAmB,QAED,KN/CDhe,OAAO0f,OAAO/V,GAAAA,OAAQ,CACpB,iDAAkDsQ,GAClD,4CAA6C1G,GAE7C,mDAAoDoE,GACpD,0DAA2DN,GAE3D,2DAA4DjL,EAC5D,mEAAoEW,EAEpE,8DAA+D2I,GAC/D,2DAA4D7B,GAE5D,qDAAsD2F,GACtD,gDAAiDtP,EACjD,kDAAmD4D,EACnD,oDAAqDsM,GACrD,kDAAmD5K,EACnD,0CAA2C9B,EAE3C,qCAAsC+N,GACtC,yCAA0C7L,EAE1C,sCAAuCuC","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 root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@v17development/flarum-blog/./src/forum/components/LanguageDropdown/Language.js","webpack://@v17development/flarum-blog/./src/forum/components/LanguageDropdown/LanguageDropdown.js","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['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/external root \"flarum.core.compat['forum/components/ModalManager']\"","webpack://@v17development/flarum-blog/./src/forum/states/OverrideModalState.ts","webpack://@v17development/flarum-blog/./src/forum/utils/overrideModalManager.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.core.compat['common/components/Dropdown'];","import Component from 'flarum/common/Component';\n\nexport default class Language extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.languages = app.store.all('discussion-languages');\n this.options = this.languages.reduce((o, lang) => {\n o[lang.code()] = (\n \n {lang.name()}\n \n );\n\n return o;\n }, this.attrs.extra || {});\n }\n\n view() {\n const { language, uppercase } = this.attrs;\n const name = language.name() || '';\n\n return (\n \n \n  \n {uppercase ? name.toUpperCase() : name}\n \n );\n }\n}\n","import Component from 'flarum/common/Component';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Button from 'flarum/common/components/Button';\nimport Language from './Language';\n\nexport default class LanguageDropdown extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n this.languages = app.store.all('discussion-languages');\n this.options = this.languages.reduce((o, lang) => {\n o[lang.code()] = ;\n\n return o;\n }, this.attrs.extra || {});\n }\n\n view() {\n const selected = this.attrs.selected;\n\n return Dropdown.component(\n {\n buttonClassName: 'Button',\n label: this.options[selected] || this.options[this.attrs.default],\n },\n Object.keys(this.options).map((key) => {\n let defaultSelected;\n if (app.forum.attribute('fof-discussion-language.composerLocaleDefault')) {\n defaultSelected = 'any';\n } else {\n defaultSelected = app.translator.formatter.locale;\n }\n const isSelected = selected || defaultSelected;\n const active = key === isSelected;\n\n return Button.component(\n {\n active,\n icon: active ? 'fas fa-check' : true,\n onclick: () => this.attrs.onclick(key),\n },\n this.options[key]\n );\n })\n );\n }\n}\n","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 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 LanguageDropdown from '../components/LanguageDropdown/LanguageDropdown';\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 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 knowledge base tag ID's\n const knowledgeBaseTags = app.forum.attribute('blogTags') || [];\n\n // Get tiles\n let tag_tiles = markup.children[1].children[1].children[0].children;\n\n // Map through the tiles and remove tiles that are part of the knowledge base\n markup.children[1].children[1].children[0].children = tag_tiles.map((tile, i) => {\n return knowledgeBaseTags.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","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 LanguageDropdown from '../components/LanguageDropdown/LanguageDropdown';\nimport ItemList from 'flarum/common/utils/ItemList';\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 = 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 items.add(\n 'content',\n
\n this.openBlogSettings(e)}\n />\n\n
\n
\n {this.languages !== null && this.languages.length >= 1 && (\n (this.articleLanguage = language)} />\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 knowledge base tags\n const findblogTags = this.tags.filter((tag) => {\n return blogTags.indexOf(tag.id()) >= 0;\n });\n\n // No knowledge base 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['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 Language from './components/LanguageDropdown/Language';\nimport LanguageDropdown from './components/LanguageDropdown/LanguageDropdown';\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/LanguageDropdown/Language': Language,\n 'v17development/blog/components/LanguageDropdown/LanguageDropdown': LanguageDropdown,\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","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ModalManager'];","import type Component from 'flarum/common/Component';\nimport Modal from 'flarum/common/components/Modal';\n\n/**\n * Notice from V17: Temporary override due to lack of multi-dialogs!\n *\n * We'll open a PR to support multi-dialog to the Flarum main repo\n */\n\n/**\n * Ideally, `show` would take a higher-kinded generic, ala:\n * `show(componentClass: C, attrs: Attrs): void`\n * Unfortunately, TypeScript does not support this:\n * https://github.com/Microsoft/TypeScript/issues/1213\n * Therefore, we have to use this ugly, messy workaround.\n */\ntype UnsafeModalClass = ComponentClass & {\n isDismissible: boolean;\n component: typeof Component.component;\n};\n\n/**\n * Class used to manage modal state.\n *\n * Accessible on the `app` object via `app.modal` property.\n */\nexport default class OverrideModalState {\n /**\n * @internal\n */\n modal: null | {\n componentClass: UnsafeModalClass;\n attrs?: Record;\n key: number;\n } = null;\n\n modalList: OverrideModalState['modal'][] = [];\n\n /**\n * Used to force re-initialization of modals if a modal\n * is replaced by another of the same type.\n */\n private key = 0;\n\n private closeTimeout?: number;\n\n /**\n * Shows a modal dialog.\n *\n * If a modal is already open, the existing one will close and the new modal will replace it.\n *\n * @example Show a modal\n * app.modal.show(MyCoolModal, { attr: 'value' });\n *\n * @example Show a modal from a lifecycle method (`oncreate`, `view`, etc.)\n * // This \"hack\" is needed due to quirks with nested redraws in Mithril.\n * setTimeout(() => app.modal.show(MyCoolModal, { attr: 'value' }), 0);\n */\n show(componentClass: UnsafeModalClass, attrs: Record = {}, keepLast: Boolean = false): void {\n if (!(componentClass.prototype instanceof Modal)) {\n // This is duplicated so that if the error is caught, an error message still shows up in the debug console.\n const invalidModalWarning = 'The ModalManager can only show Modals.';\n console.error(invalidModalWarning);\n throw new Error(invalidModalWarning);\n }\n\n if (this.closeTimeout) clearTimeout(this.closeTimeout);\n\n // Open new modal\n this.modal = { componentClass, attrs, key: this.key++ };\n\n // Remember previously opened modal\n if (keepLast) {\n this.modalList.push(this.modal);\n } else {\n // Override last modals\n this.modalList = [this.modal];\n }\n\n m.redraw.sync();\n }\n\n /**\n * Closes the currently open dialog, if one is open.\n */\n close(): void {\n if (!this.modal) return;\n\n // There are more modals currently opened\n // Close current and open last in list\n if (this.modalList.length >= 2) {\n $(`.modal[modal-key=${this.modal?.key}]`)\n .one('hide.bs.modal', () => {\n const currentModalPosition = this.modalList.indexOf(this.modal);\n\n // Remove last modal from list\n this.modalList.splice(currentModalPosition, 1);\n\n // Open last modal from list\n this.modal = this.modalList[this.modalList.length - 1];\n\n setTimeout(() => {\n $(document.body).addClass('modal-open');\n }, 1000);\n\n m.redraw();\n })\n // @ts-expect-error no typings for bootstrap modals\n .modal('hide');\n\n m.redraw();\n return;\n }\n\n // Don't hide the modal immediately, because if the consumer happens to call\n // the `show` method straight after to show another modal dialog, it will\n // cause Bootstrap's modal JS to misbehave. Instead we will wait for a tiny\n // bit to give the `show` method the opportunity to prevent this from going\n // ahead.\n\n this.closeTimeout = window.setTimeout(() => {\n $(`.modal[modal-key=${this.modal?.key}]`)\n // @ts-expect-error no typings for bootstrap modals\n .modal('hide')\n .one('hide.bs.modal', () => {\n this.modal = null;\n\n m.redraw();\n });\n });\n }\n\n /**\n * Checks if a modal is currently open.\n *\n * @return `true` if a modal dialog is currently open, otherwise `false`.\n */\n isModalOpen(): boolean {\n return !!this.modal;\n }\n}\n","import ModalManager from 'flarum/forum/components/ModalManager';\nimport { override } from 'flarum/common/extend';\nimport OverrideModalState from '../states/OverrideModalState';\n\n/**\n * Notice from V17: Temporary override due to lack of multi-dialogs!\n *\n * We'll open a PR to support multi-dialog to the Flarum main repo\n */\n\nexport default function overrideModalManager() {\n if (!$.fn.modal) {\n // Bootstrap modals not defined, so we can assume this is Flarum 1.5 or later,\n // where modal stacking is available natively.\n //\n // In this case, we do not need to override any modal code for the extension.\n\n return;\n }\n\n app.modal = new OverrideModalState();\n\n override(ModalManager.prototype, 'view', function () {\n return this.attrs.state.modalList.map((modal) => {\n const Tag = modal?.componentClass;\n\n return (\n
    \n {!!Tag && (\n \n )}\n
    \n );\n });\n });\n\n override(ModalManager.prototype, 'animateHide', function () {\n if (this.attrs.state.modalList.length === 1) {\n this.modalShown = false;\n }\n });\n\n override(ModalManager.prototype, 'animateShow', function (readyCallback = () => {}) {\n if (!this.attrs.state.modal) return;\n\n const dismissible = !!this.attrs.state.modal.componentClass.isDismissible;\n\n this.modalShown = true;\n\n // If we are opening this modal while another modal is already open,\n // the shown event will not run, because the modal is already open.\n // So, we need to manually trigger the readyCallback.\n if ($(`.modal[modal-key=${this.attrs.state.modal.key}]`).hasClass('in')) {\n readyCallback();\n return;\n }\n\n setTimeout(() => {\n $(`.modal[modal-key=${this.attrs.state.modal.key}]`)\n .one('shown.bs.modal', readyCallback)\n // @ts-expect-error: No typings available for Bootstrap modals.\n .modal({\n backdrop: dismissible || 'static',\n keyboard: dismissible,\n show: true,\n });\n }, 1);\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// Create our own modal manager\nimport OverrideModalState from './states/OverrideModalState';\nimport overrideModalManager from './utils/overrideModalManager';\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 /**\n * Notice from V17: Temporary override due to lack of multi-dialogs!\n *\n * We'll open a PR to support multi-dialog to the Flarum main repo\n */\n overrideModalManager();\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","Language","languages","options","reduce","lang","code","attrs","extra","language","uppercase","toUpperCase","LanguageDropdown","selected","Dropdown","buttonClassName","label","defaultSelected","formatter","locale","active","Button","onclick","ForumNav","navItems","toArray","IndexPage","BlogOverviewItem","titleItems","article","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","currentSelectedLanguage","loadBlogOverview","featuredCount","parseInt","showCategories","showForumNav","preloadBlogOverview","setTimeout","show","reloadData","redraw","q","filter","sort","articles","payload","links","loadMore","replace","data","newArticle","set","document","location","pathname","clear","Array","fill","loading","currentCategory","join","Page","BlogMeta","mixin","Model","discussion","isFeatured","extendTagOverview","extend","TagsPage","markup","knowledgeBaseTags","tag_tiles","children","tile","indexOf","remove","original_discussion_route","near","shouldRedirect","blogTags","lastReadPostNumber","BlogAuthor","author","username","avatar","bio","listItems","RenameArticleModal","Stream","redirect","content","fields","placeholder","bidi","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","components","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","isArray","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","menuClassName","onshow","BlogItem","found","loadBlogItem","includedPosts","included","articleId","b","stream","PostStreamState","goToNumber","postItems","fullTime","fontSize","opacity","PostStream","onPositionChange","positionChanged","back","startNumber","endNumber","addSidebarNav","OverrideModalState","modal","modalList","closeTimeout","componentClass","keepLast","invalidModalWarning","console","clearTimeout","sync","close","$","one","currentModalPosition","splice","body","addClass","isModalOpen","overrideModalManager","override","ModalManager","Tag","animateShow","animateHide","modalShown","readyCallback","dismissible","isDismissible","hasClass","backdrop","keyboard","routes","blog","path","blogCategory","blogComposer","blogArticle","models","Discussion","currentTag","tagRedirectEnabled","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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AAQ,CACpB,iDAAkDsQ,GAClD,4CAA6C1G,GAE7C,mDAAoDoE,GACpD,0DAA2DN,GAE3D,2DAA4DjL,EAC5D,mEAAoEW,EAEpE,8DAA+D2I,GAC/D,2DAA4D7B,GAE5D,qDAAsD2F,GACtD,gDAAiDtP,EACjD,kDAAmD4D,EACnD,oDAAqDsM,GACrD,kDAAmD5K,EACnD,0CAA2C9B,EAE3C,qCAAsC+N,GACtC,yCAA0C7L,EAE1C,sCAAuCuC","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 root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@v17development/flarum-blog/./src/forum/components/LanguageDropdown/Language.js","webpack://@v17development/flarum-blog/./src/forum/components/LanguageDropdown/LanguageDropdown.js","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['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/external root \"flarum.core.compat['forum/components/ModalManager']\"","webpack://@v17development/flarum-blog/./src/forum/states/OverrideModalState.ts","webpack://@v17development/flarum-blog/./src/forum/index.ts","webpack://@v17development/flarum-blog/./src/forum/utils/redirector.js","webpack://@v17development/flarum-blog/./src/forum/utils/overrideModalManager.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.core.compat['common/components/Dropdown'];","import Component from 'flarum/common/Component';\n\nexport default class Language extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.languages = app.store.all('discussion-languages');\n this.options = this.languages.reduce((o, lang) => {\n o[lang.code()] = (\n \n {lang.name()}\n \n );\n\n return o;\n }, this.attrs.extra || {});\n }\n\n view() {\n const { language, uppercase } = this.attrs;\n const name = language.name() || '';\n\n return (\n \n \n  \n {uppercase ? name.toUpperCase() : name}\n \n );\n }\n}\n","import Component from 'flarum/common/Component';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Button from 'flarum/common/components/Button';\nimport Language from './Language';\n\nexport default class LanguageDropdown extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n this.languages = app.store.all('discussion-languages');\n this.options = this.languages.reduce((o, lang) => {\n o[lang.code()] = ;\n\n return o;\n }, this.attrs.extra || {});\n }\n\n view() {\n const selected = this.attrs.selected;\n\n return Dropdown.component(\n {\n buttonClassName: 'Button',\n label: this.options[selected] || this.options[this.attrs.default],\n },\n Object.keys(this.options).map((key) => {\n let defaultSelected;\n if (app.forum.attribute('fof-discussion-language.composerLocaleDefault')) {\n defaultSelected = 'any';\n } else {\n defaultSelected = app.translator.formatter.locale;\n }\n const isSelected = selected || defaultSelected;\n const active = key === isSelected;\n\n return Button.component(\n {\n active,\n icon: active ? 'fas fa-check' : true,\n onclick: () => this.attrs.onclick(key),\n },\n this.options[key]\n );\n })\n );\n }\n}\n","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 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 LanguageDropdown from '../components/LanguageDropdown/LanguageDropdown';\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 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 knowledge base tag ID's\n const knowledgeBaseTags = app.forum.attribute('blogTags') || [];\n\n // Get tiles\n let tag_tiles = markup.children[1].children[1].children[0].children;\n\n // Map through the tiles and remove tiles that are part of the knowledge base\n markup.children[1].children[1].children[0].children = tag_tiles.map((tile, i) => {\n return knowledgeBaseTags.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","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 LanguageDropdown from '../components/LanguageDropdown/LanguageDropdown';\nimport ItemList from 'flarum/common/utils/ItemList';\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 = 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 items.add(\n 'content',\n
    \n this.openBlogSettings(e)}\n />\n\n
    \n
    \n {this.languages !== null && this.languages.length >= 1 && (\n (this.articleLanguage = language)} />\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 knowledge base tags\n const findblogTags = this.tags.filter((tag) => {\n return blogTags.indexOf(tag.id()) >= 0;\n });\n\n // No knowledge base 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['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 Language from './components/LanguageDropdown/Language';\nimport LanguageDropdown from './components/LanguageDropdown/LanguageDropdown';\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/LanguageDropdown/Language': Language,\n 'v17development/blog/components/LanguageDropdown/LanguageDropdown': LanguageDropdown,\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","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ModalManager'];","import type Component from 'flarum/common/Component';\nimport Modal from 'flarum/common/components/Modal';\n\n/**\n * Notice from V17: Temporary override due to lack of multi-dialogs!\n *\n * We'll open a PR to support multi-dialog to the Flarum main repo\n */\n\n/**\n * Ideally, `show` would take a higher-kinded generic, ala:\n * `show(componentClass: C, attrs: Attrs): void`\n * Unfortunately, TypeScript does not support this:\n * https://github.com/Microsoft/TypeScript/issues/1213\n * Therefore, we have to use this ugly, messy workaround.\n */\ntype UnsafeModalClass = ComponentClass & {\n isDismissible: boolean;\n component: typeof Component.component;\n};\n\n/**\n * Class used to manage modal state.\n *\n * Accessible on the `app` object via `app.modal` property.\n */\nexport default class OverrideModalState {\n /**\n * @internal\n */\n modal: null | {\n componentClass: UnsafeModalClass;\n attrs?: Record;\n key: number;\n } = null;\n\n modalList: OverrideModalState['modal'][] = [];\n\n /**\n * Used to force re-initialization of modals if a modal\n * is replaced by another of the same type.\n */\n private key = 0;\n\n private closeTimeout?: number;\n\n /**\n * Shows a modal dialog.\n *\n * If a modal is already open, the existing one will close and the new modal will replace it.\n *\n * @example Show a modal\n * app.modal.show(MyCoolModal, { attr: 'value' });\n *\n * @example Show a modal from a lifecycle method (`oncreate`, `view`, etc.)\n * // This \"hack\" is needed due to quirks with nested redraws in Mithril.\n * setTimeout(() => app.modal.show(MyCoolModal, { attr: 'value' }), 0);\n */\n show(componentClass: UnsafeModalClass, attrs: Record = {}, keepLast: Boolean = false): void {\n if (!(componentClass.prototype instanceof Modal)) {\n // This is duplicated so that if the error is caught, an error message still shows up in the debug console.\n const invalidModalWarning = 'The ModalManager can only show Modals.';\n console.error(invalidModalWarning);\n throw new Error(invalidModalWarning);\n }\n\n if (this.closeTimeout) clearTimeout(this.closeTimeout);\n\n // Open new modal\n this.modal = { componentClass, attrs, key: this.key++ };\n\n // Remember previously opened modal\n if (keepLast) {\n this.modalList.push(this.modal);\n } else {\n // Override last modals\n this.modalList = [this.modal];\n }\n\n m.redraw.sync();\n }\n\n /**\n * Closes the currently open dialog, if one is open.\n */\n close(): void {\n if (!this.modal) return;\n\n // There are more modals currently opened\n // Close current and open last in list\n if (this.modalList.length >= 2) {\n $(`.modal[modal-key=${this.modal?.key}]`)\n .one('hide.bs.modal', () => {\n const currentModalPosition = this.modalList.indexOf(this.modal);\n\n // Remove last modal from list\n this.modalList.splice(currentModalPosition, 1);\n\n // Open last modal from list\n this.modal = this.modalList[this.modalList.length - 1];\n\n setTimeout(() => {\n $(document.body).addClass('modal-open');\n }, 1000);\n\n m.redraw();\n })\n // @ts-expect-error no typings for bootstrap modals\n .modal('hide');\n\n m.redraw();\n return;\n }\n\n // Don't hide the modal immediately, because if the consumer happens to call\n // the `show` method straight after to show another modal dialog, it will\n // cause Bootstrap's modal JS to misbehave. Instead we will wait for a tiny\n // bit to give the `show` method the opportunity to prevent this from going\n // ahead.\n\n this.closeTimeout = window.setTimeout(() => {\n $(`.modal[modal-key=${this.modal?.key}]`)\n // @ts-expect-error no typings for bootstrap modals\n .modal('hide')\n .one('hide.bs.modal', () => {\n this.modal = null;\n\n m.redraw();\n });\n });\n }\n\n /**\n * Checks if a modal is currently open.\n *\n * @return `true` if a modal dialog is currently open, otherwise `false`.\n */\n isModalOpen(): boolean {\n return !!this.modal;\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// Create our own modal manager\nimport OverrideModalState from './states/OverrideModalState';\nimport overrideModalManager from './utils/overrideModalManager';\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 /**\n * Notice from V17: Temporary override due to lack of multi-dialogs!\n *\n * We'll open a PR to support multi-dialog to the Flarum main repo\n */\n overrideModalManager();\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","import ModalManager from 'flarum/forum/components/ModalManager';\nimport { override } from 'flarum/common/extend';\nimport OverrideModalState from '../states/OverrideModalState';\nimport app from 'flarum/forum/app';\n\n/**\n * Notice from V17: Temporary override due to lack of multi-dialogs!\n *\n * We'll open a PR to support multi-dialog to the Flarum main repo\n */\n\nexport default function overrideModalManager() {\n if (!$.fn.modal) {\n // Bootstrap modals not defined, so we can assume this is Flarum 1.5 or later,\n // where modal stacking is available natively.\n //\n // In this case, we do not need to override any modal code for the extension.\n\n return;\n }\n\n const style = document.createElement('style');\n style.innerHTML = `\n#modal .ModalManager:not(:last-child),\n.modal-backdrop.in:not(:last-child) {\n opacity: 0;\n}`;\n document.head.appendChild(style);\n\n app.modal = new OverrideModalState();\n\n override(ModalManager.prototype, 'view', function () {\n return this.attrs.state.modalList.map((modal) => {\n const Tag = modal?.componentClass;\n\n return (\n
    \n {!!Tag && (\n \n )}\n
    \n );\n });\n });\n\n override(ModalManager.prototype, 'animateHide', function () {\n if (this.attrs.state.modalList.length === 1) {\n this.modalShown = false;\n }\n });\n\n override(ModalManager.prototype, 'animateShow', function (readyCallback = () => {}) {\n if (!this.attrs.state.modal) return;\n\n const dismissible = !!this.attrs.state.modal.componentClass.isDismissible;\n\n this.modalShown = true;\n\n // If we are opening this modal while another modal is already open,\n // the shown event will not run, because the modal is already open.\n // So, we need to manually trigger the readyCallback.\n if ($(`.modal[modal-key=${this.attrs.state.modal.key}]`).hasClass('in')) {\n readyCallback();\n return;\n }\n\n setTimeout(() => {\n $(`.modal[modal-key=${this.attrs.state.modal.key}]`)\n .one('shown.bs.modal', readyCallback)\n // @ts-expect-error: No typings available for Bootstrap modals.\n .modal({\n backdrop: dismissible || 'static',\n keyboard: dismissible,\n show: true,\n });\n }, 1);\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","Language","languages","options","reduce","lang","code","attrs","extra","language","uppercase","toUpperCase","LanguageDropdown","selected","Dropdown","buttonClassName","label","defaultSelected","formatter","locale","active","Button","onclick","ForumNav","navItems","toArray","IndexPage","BlogOverviewItem","titleItems","article","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","currentSelectedLanguage","loadBlogOverview","featuredCount","parseInt","showCategories","showForumNav","preloadBlogOverview","setTimeout","show","reloadData","redraw","q","filter","sort","articles","payload","links","loadMore","replace","data","newArticle","set","document","location","pathname","clear","Array","fill","loading","currentCategory","join","Page","BlogMeta","mixin","Model","discussion","isFeatured","extendTagOverview","extend","TagsPage","markup","knowledgeBaseTags","tag_tiles","children","tile","indexOf","remove","original_discussion_route","near","shouldRedirect","blogTags","lastReadPostNumber","BlogAuthor","author","username","avatar","bio","listItems","RenameArticleModal","Stream","redirect","content","fields","placeholder","bidi","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","components","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","isArray","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","menuClassName","onshow","BlogItem","found","loadBlogItem","includedPosts","included","articleId","b","stream","PostStreamState","goToNumber","postItems","fullTime","fontSize","opacity","PostStream","onPositionChange","positionChanged","back","startNumber","endNumber","addSidebarNav","OverrideModalState","modal","modalList","closeTimeout","componentClass","keepLast","invalidModalWarning","console","clearTimeout","sync","close","$","one","currentModalPosition","splice","body","addClass","isModalOpen","routes","blog","path","blogCategory","blogComposer","blogArticle","models","Discussion","Tag","currentTag","tagRedirectEnabled","override","DiscussionPage","original","discussionRouting","createElement","innerHTML","head","appendChild","ModalManager","animateShow","animateHide","modalShown","readyCallback","dismissible","isDismissible","hasClass","backdrop","keyboard","overrideModalManager","assign"],"sourceRoot":""} \ No newline at end of file