flarum.core=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=143)}([function(t,e,n){"use strict";n.d(e,"a",function(){return o});var i=n(91),r=n.n(i);function o(t,e){t.prototype=r()(e.prototype),t.prototype.constructor=t,t.__proto__=e}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var i=n(41),r=n.n(i),o=n(5),s=n.n(o),a=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=null),this.data=t,this.freshness=new Date,this.exists=!1,this.store=e}var e=t.prototype;return e.id=function(){return this.data.id},e.attribute=function(t){return this.data.attributes[t]},e.pushData=function(e){for(var n in e)if("object"==typeof e[n])for(var i in this.data[n]=this.data[n]||{},e[n])e[n][i]instanceof t&&(e[n][i]={data:t.getIdentifier(e[n][i])}),this.data[n][i]=e[n][i];else this.data[n]=e[n];this.freshness=new Date},e.pushAttributes=function(t){this.pushData({attributes:t})},e.save=function(e,n){var i=this;void 0===n&&(n={});var r={type:this.data.type,id:this.data.id,attributes:e};if(e.relationships){for(var o in r.relationships={},e.relationships){var a=e.relationships[o];r.relationships[o]={data:a instanceof Array?a.map(t.getIdentifier):t.getIdentifier(a)}}delete e.relationships}var u=this.copyData();this.pushData(r);var c={data:r};return n.meta&&(c.meta=n.meta),app.request(s()({method:this.exists?"PATCH":"POST",url:app.forum.attribute("apiUrl")+this.apiEndpoint(),data:c},n)).then(function(t){return i.store.data[t.data.type]=i.store.data[t.data.type]||{},i.store.data[t.data.type][t.data.id]=i,i.store.pushPayload(t)},function(t){throw i.pushData(u),m.lazyRedraw(),t})},e.delete=function(t,e){var n=this;return void 0===e&&(e={}),this.exists?app.request(s()({method:"DELETE",url:app.forum.attribute("apiUrl")+this.apiEndpoint(),data:t},e)).then(function(){n.exists=!1,n.store.remove(n)}):m.deferred.resolve().promise},e.apiEndpoint=function(){return"/"+this.data.type+(this.exists?"/"+this.data.id:"")},e.copyData=function(){return JSON.parse(r()(this.data))},t.attribute=function(t,e){return function(){var n=this.data.attributes&&this.data.attributes[t];return e?e(n):n}},t.hasOne=function(t){return function(){if(this.data.relationships){var e=this.data.relationships[t];if(e)return app.store.getById(e.data.type,e.data.id)}return!1}},t.hasMany=function(t){return function(){if(this.data.relationships){var e=this.data.relationships[t];if(e)return e.data.map(function(t){return app.store.getById(t.type,t.id)})}return!1}},t.transformDate=function(t){return t?new Date(t):null},t.getIdentifier=function(t){return{type:t.data.type,id:t.data.id}},t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var i=n(5),r=n.n(i),o=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=null),e&&(t.children=e),this.constructor.initProps(t),this.props=t,this.element=null,this.retain=!1,this.init()}var e=t.prototype;return e.init=function(){},e.onunload=function(){},e.render=function(){var t=this,e=this.retain?{subtree:"retain"}:this.view();e.attrs=e.attrs||{};var n=e.attrs.config;return e.attrs.config=function(){for(var e=arguments.length,i=new Array(e),r=0;re.priority?-1:1}).map(function(t){return t.content})},t}()},function(t,e,n){t.exports=n(100)},function(t,e,n){"use strict";function i(t,e){return void 0===e&&(e={}),e.className="icon "+t+" "+(e.className||""),m("i",e)}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var i=n(21),r=n(27);function o(t){return t&&t.component===i.a}function s(t){return t instanceof Array||(t=[t]),function(t){var e,n=[];return t.forEach(function(i,r){(!o(i)||e&&!o(e)&&r!==t.length-1)&&(e=i,n.push(i))}),n}(t).map(function(t){var e=t.component&&t.component.isListItem,n=t.component&&t.component.isActive&&t.component.isActive(t.props),i=t.props?t.props.itemClassName:t.itemClassName;return e&&(t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName),e?t:m("li",{className:Object(r.a)([t.itemName?"item-"+t.itemName:"",i,n?"active":""]),key:t.itemName},t)})}},function(t,e,n){"use strict";function i(t){return t instanceof Array?t.map(function(t){return i(t)}).join(""):"object"==typeof t&&null!==t?i(t.children):t}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";function i(t,e){var n=t[e];return delete t[e],n}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";var i=n(5),r=n.n(i),o=n(0),s=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(s.a);r()(a.prototype,{nameSingular:s.a.attribute("nameSingular"),namePlural:s.a.attribute("namePlural"),color:s.a.attribute("color"),icon:s.a.attribute("icon")}),a.ADMINISTRATOR_ID="1",a.GUEST_ID="2",a.MEMBER_ID="3",e.a=a},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var i=n(0),r=n(2),o=(n(19),n(3)),s=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.init=function(){this.alert=null},n.view=function(){return this.alert&&(this.alert.props.dismissible=!1),m("div",{className:"Modal modal-dialog "+this.className()},m("div",{className:"Modal-content"},this.isDismissible()?m("div",{className:"Modal-close App-backControl"},o.a.component({icon:"fas fa-times",onclick:this.hide.bind(this),className:"Button Button--icon Button--link"})):"",m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),alert?m("div",{className:"Modal-alert"},this.alert):"",this.content())))},n.isDismissible=function(){return!0},n.className=function(){},n.title=function(){},n.content=function(){},n.onsubmit=function(){},n.onready=function(){this.$("form").find("input, select, textarea").first().focus().select()},n.onhide=function(){},n.hide=function(){app.modal.close()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){this.alert=t.alert,m.redraw(),422===t.status&&t.response.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").select():this.onready()},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var i=n(90),r=n.n(i);function o(t,e,n){return e in t?r()(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";function i(){for(var t=arguments.length,e=new Array(t),n=0;n$(window).scrollTop()+$(window).height()),t.offset().top<0&&t.removeClass("Dropdown-menu--top"),t.toggleClass("Dropdown-menu--right",n||t.offset().left+t.width()>$(window).scrollLeft()+$(window).width())}),this.$().on("hidden.bs.dropdown",function(){e.showing=!1,e.props.onhide&&e.props.onhide(),m.redraw()}))},n.getButton=function(){return m("button",{className:"Dropdown-toggle "+this.props.buttonClassName,"data-toggle":"dropdown",onclick:this.props.onclick},this.getButtonContent())},n.getButtonContent=function(){return[this.props.icon?Object(o.a)(this.props.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},this.props.label),this.props.caretIcon?Object(o.a)(this.props.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.props.menuClassName},t)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(75);function r(t,e){void 0===e&&(e={}),e.className="Avatar "+(e.className||"");var n="",r="undefined"===e.title||e.title;if(r||delete e.title,t){var o=t.displayName()||"?",s=t.avatarUrl();if(r&&(e.title=e.title||o),s)return m("img",Object(i.a)({},e,{src:s}));n=o.charAt(0).toUpperCase(),e.style={background:t.color()}}return m("span",e,n)}},function(t,e,n){t.exports=n(95)},function(t,e,n){"use strict";var i=n(5),r=n.n(i),o=n(0),s=n(2),a=Object.assign||function(t){for(var e,n=1,i=arguments.length;n1&&(o-=Math.floor(o)),r.el.childNodes.length===r.opts.lines)for(var c=0;c1)&&(i+=n.direction);var r=1-i/(n.trail/100);return r<0?n.opacity:r*(1-n.opacity)+n.opacity}function d(t,e){if(void 0!==t.style[e])return e;var n="ms"+e.charAt(0).toUpperCase()+e.slice(1);return void 0!==t.style[n]?n:""}function p(t,e){for(var n in e)t.style[d(t,n)||n]=e[n];return t}function h(t,e){return"string"==typeof t?t:t[e%t.length]}function f(t,e){for(var n=[],i=0,r=t;i0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function r(t){return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}function o(t){var e=t.replace(/(<\/p>|
)/g,"$1  ").replace(/]*>/gi," "),n=$("
").html(e);return n.find(o.removeSelectors.join(",")).remove(),n.text().replace(/\s+/g," ").trim()}function s(t){return t.substr(0,1).toUpperCase()+t.substr(1)}n.r(e),n.d(e,"truncate",function(){return i}),n.d(e,"slug",function(){return r}),n.d(e,"getPlainContent",function(){return o}),n.d(e,"ucfirst",function(){return s}),o.removeSelectors=["blockquote","script"]},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(30);function r(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(e,"gi"),o=t,s=0;return n&&(e&&(s=Math.max(0,t.search(r)-n/2)),o=Object(i.truncate)(o,n,s)),o=$("
").text(o).html(),e&&(o=o.replace(r,"$&")),m.trust(o)}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},r=function(){function t(t){this.callback=t,this.lastTop=-1}var e=t.prototype;return e.loop=function(){this.active&&(this.update(),i(this.loop.bind(this)))},e.update=function(t){var e=window.pageYOffset;(this.lastTop!==e||t)&&(this.callback(e),this.lastTop=e)},e.start=function(){this.active||(this.active=!0,this.loop())},e.stop=function(){this.active=!1},t}()},function(t,e,n){"use strict";n.r(e),n.d(e,"extend",function(){return o}),n.d(e,"override",function(){return s});var i=n(5),r=n.n(i);function o(t,e,n){var i=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),r=0;rmoment().subtract(5,"minutes").toDate()},badges:function(){var t=new u.a,e=this.groups();return e&&e.forEach(function(e){t.add("group"+e.id(),l.a.component({group:e}))}),t},calculateAvatarColor:function(){var t=new Image,e=this;t.onload=function(){var t=new ColorThief;e.avatarColor=t.getColor(this),e.freshness=new Date,m.redraw()},t.src=this.avatarUrl()},savePreferences:function(t){var e=this.preferences();return r()(e,t),this.save({preferences:e})}})},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var i=n(0),r=n(2),o=n(17),s=n(6),a=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.init=function(){this.loading=!1},n.view=function(){var t="Checkbox "+(this.props.state?"on":"off")+" "+(this.props.className||"");return this.loading&&(t+=" loading"),this.props.disabled&&(t+=" disabled"),m("label",{className:t},m("input",{type:"checkbox",checked:this.props.state,disabled:this.props.disabled,onchange:m.withAttr("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display"},this.getDisplay()),this.props.children)},n.getDisplay=function(){return this.loading?o.a.component({size:"tiny"}):Object(s.a)(this.props.state?"fas fa-check":"fas fa-times")},n.onchange=function(t){this.props.onchange&&this.props.onchange(t,this)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(22);function r(t){var e=moment(t),n=e.format(),r=e.format("LLLL"),o=Object(i.a)(t);return m("time",{pubdate:!0,datetime:n,title:r,"data-humantime":!0},o)}},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var i=n(5),r=n.n(i),o=n(0),s=n(1),a=n(13),u=n(4),c=n(23),l=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(s.a);r()(l.prototype,{title:s.a.attribute("title"),slug:s.a.attribute("slug"),startTime:s.a.attribute("startTime",s.a.transformDate),startUser:s.a.hasOne("startUser"),startPost:s.a.hasOne("startPost"),lastTime:s.a.attribute("lastTime",s.a.transformDate),lastUser:s.a.hasOne("lastUser"),lastPost:s.a.hasOne("lastPost"),lastPostNumber:s.a.attribute("lastPostNumber"),commentsCount:s.a.attribute("commentsCount"),repliesCount:Object(a.a)("commentsCount",function(t){return Math.max(0,t-1)}),posts:s.a.hasMany("posts"),mostRelevantPost:s.a.hasOne("mostRelevantPost"),readTime:s.a.attribute("readTime",s.a.transformDate),readNumber:s.a.attribute("readNumber"),isUnread:Object(a.a)("unreadCount",function(t){return!!t}),isRead:Object(a.a)("unreadCount",function(t){return app.session.user&&!t}),hideTime:s.a.attribute("hideTime",s.a.transformDate),hideUser:s.a.hasOne("hideUser"),isHidden:Object(a.a)("hideTime",function(t){return!!t}),canReply:s.a.attribute("canReply"),canRename:s.a.attribute("canRename"),canHide:s.a.attribute("canHide"),canDelete:s.a.attribute("canDelete"),removePost:function(t){var e=this.data.relationships,n=e&&e.posts;n&&n.data.some(function(e,i){if(t===e.id)return n.data.splice(i,1),!0})},unreadCount:function(){var t=app.session.user;return t&&t.readTime()1?i-1:0),s=1;s").addClass("drawer-backdrop fade").appendTo("body").click(function(){return t.hide()}),setTimeout(function(){return t.$backdrop.addClass("in")})},t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var i=n(5),r=n.n(i),o=function(){function t(t,e){this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),app.request(r()({method:"POST",url:app.forum.attribute("baseUrl")+"/login",data:t},e))},e.logout=function(){window.location=app.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var i=n(16),r=n.n(i),o=n(5),s=n.n(o),a=function(){function t(t){this.data={},this.models=t}var e=t.prototype;return e.pushPayload=function(t){t.included&&t.included.map(this.pushObject.bind(this));var e=t.data instanceof Array?t.data.map(this.pushObject.bind(this)):this.pushObject(t.data);return e.payload=t,e},e.pushObject=function(t){if(!this.models[t.type])return null;var e=this.data[t.type]=this.data[t.type]||{};return e[t.id]?e[t.id].pushData(t):e[t.id]=this.createRecord(t.type,t),e[t.id].exists=!0,e[t.id]},e.find=function(t,e,n,i){void 0===n&&(n={}),void 0===i&&(i={});var r=n,o=app.forum.attribute("apiUrl")+"/"+t;return e instanceof Array?o+="?filter[id]="+e.join(","):"object"==typeof e?r=e:e&&(o+="/"+e),app.request(s()({method:"GET",url:o,data:r},i)).then(this.pushPayload.bind(this))},e.getById=function(t,e){return this.data[t]&&this.data[t][e]},e.getBy=function(t,e,n){return this.all(t).filter(function(t){return t[e]()===n})[0]},e.all=function(t){var e=this.data[t];return e?r()(e).map(function(t){return e[t]}):[]},e.remove=function(t){delete this.data[t.data.type][t.id()]},e.createRecord=function(t,e){return void 0===e&&(e={}),e.type=e.type||t,new this.models[t](e,this)},t}()},function(t,e,n){"use strict";function i(t){for(var e=0,n=0;n)","gi"))).forEach(function(t){var n=t.match(new RegExp("{([a-z0-9_]+)}|<(/?)([a-z0-9_]+)>","i"));if(n){if(n[1])s[0].push(e[n[1]]);else if(n[3])if(n[2])s.shift();else{var i=e[n[3]]||{tag:n[3],children:[]};s[0].push(i),s.unshift(i.children||i)}}else s[0].push(t)}),o.filter(function(t){return t})},e.pluralize=function(t,e){var n=this,i=new RegExp(/^\w+\: +(.+)$/),r=new RegExp(/^\s*((\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]]))\s?(.+?)$/),o=new RegExp(/^\s*(\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]])/),s=[],a=[];return t.split("|").forEach(function(t){if(r.test(t)){var e=t.match(r);a[e[0]]=e[e.length-1]}else if(i.test(t)){var n=t.match(i);s.push(n[1])}else s.push(t)}),a.forEach(function(t,i){if(o.test(i)){var r=i.match(o);if(r[1]){var s=r[2].split(",");for(var u in s)if(e==s[u])return a[i]}else{var c=n.convertNumber(r[4]),l=n.convertNumber(r[5]);if(("["===r[3]?e>=c:e>c)&&("]"===r[6]?e<=l:e3&&(e=e.split("_")[0]),e){case"bo":case"dz":case"id":case"ja":case"jv":case"ka":case"km":case"kn":case"ko":case"ms":case"th":case"vi":case"zh":return 0;case"af":case"az":case"bn":case"bg":case"ca":case"da":case"de":case"el":case"en":case"eo":case"es":case"et":case"eu":case"fa":case"fi":case"fo":case"fur":case"fy":case"gl":case"gu":case"ha":case"he":case"hu":case"is":case"it":case"ku":case"lb":case"ml":case"mn":case"mr":case"nah":case"nb":case"ne":case"nl":case"nn":case"no":case"om":case"or":case"pa":case"pap":case"ps":case"pt":case"so":case"sq":case"sv":case"sw":case"ta":case"te":case"tk":case"tr":case"ur":case"zu":return 1==t?0:1;case"am":case"bh":case"fil":case"fr":case"gun":case"hi":case"ln":case"mg":case"nso":case"xbr":case"ti":case"wa":return 0===t||1==t?0:1;case"be":case"bs":case"hr":case"ru":case"sr":case"uk":return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2;case"cs":case"sk":return 1==t?0:t>=2&&t<=4?1:2;case"ga":return 1==t?0:2==t?1:2;case"lt":return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2;case"sl":return t%100==1?0:t%100==2?1:t%100==3||t%100==4?2:3;case"mk":return t%10==1?0:1;case"mt":return 1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3;case"lv":return 0===t?0:t%10==1&&t%100!=11?1:2;case"pl":return 1==t?0:t%10>=2&&t%10<=4&&(t%100<12||t%100>14)?1:2;case"cy":return 1==t?0:2==t?1:8==t||11==t?2:3;case"ro":return 1==t?0:0===t||t%100>0&&t%100<20?1:2;case"ar":return 0===t?0:1==t?1:2==t?2:t>=3&&t<=10?3:t>=11&&t<=99?4:5;default:return 0}},t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var i=n(41),r=n.n(i),o=n(0),s=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return this.props.error.xhr?this.props.error.xhr.status+" "+this.props.error.xhr.statusText:""},n.content=function(){var t;try{t=r()(JSON.parse(this.props.error.responseText),null,2)}catch(e){t=this.props.error.responseText}return m("div",{className:"Modal-body"},m("pre",null,this.props.error.options.method," ",this.props.error.options.url,m("br",null),m("br",null),t))},e}(n(11).a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var i=n(0),r=n(2),o=n(19),s=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.init=function(){this.components=[]},n.view=function(){return m("div",{className:"AlertManager"},this.components.map(function(t){return m("div",{className:"AlertManager-alert"},t)}))},n.config=function(t,e){e.retain=!0},n.show=function(t){if(!(t instanceof o.a))throw new Error("The AlertManager component can only show Alert components");t.props.ondismiss=this.dismiss.bind(this,t),this.components.push(t),m.redraw()},n.dismiss=function(t){var e=this.components.indexOf(t);-1!==e&&(this.components.splice(e,1),m.redraw())},n.clear=function(){this.components=[],m.redraw()},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var i=n(0),r=n(2),o=n(11),s=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.init=function(){this.showing=!1,this.component=null},n.view=function(){return m("div",{className:"ModalManager modal fade"},this.component&&this.component.render())},n.config=function(t,e){t||(e.retain=!0,this.$().on("hidden.bs.modal",this.clear.bind(this)).on("shown.bs.modal",this.onready.bind(this)))},n.show=function(t){if(!(t instanceof o.a))throw new Error("The ModalManager component can only show Modal components");clearTimeout(this.hideTimeout),this.showing=!0,this.component=t,app.current.retain=!0,m.redraw(!0),this.$().modal({backdrop:!!this.component.isDismissible()||"static"}).modal("show"),this.onready()},n.close=function(){var t=this;this.showing&&(this.hideTimeout=setTimeout(function(){t.$().modal("hide"),t.showing=!1}))},n.clear=function(){this.component&&this.component.onhide(),this.component=null,app.current.retain=!1,m.lazyRedraw()},n.onready=function(){this.component&&this.component.onready&&this.component.onready(this.$())},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return D});var i=n(5),r=n.n(i),o=n(12),s=n(4),a=n(19),u=n(3),c=n(60),l=n(59),d=n(58),p=n(57),h=n(55),f=n(54),v=n(9),g=n(53),y=n(52),b=n(51),w=n(44),x=n(33),_=n(34),N=n(50),k=n(37),T=n(40),S=n(49),C=n(10),O=n(48),D=function(){function t(){Object(o.a)(this,"forum",null),Object(o.a)(this,"routes",{}),Object(o.a)(this,"initializers",new s.a),Object(o.a)(this,"session",null),Object(o.a)(this,"translator",new p.a),Object(o.a)(this,"store",new h.a({forums:N.a,users:k.a,discussions:T.a,posts:S.a,groups:C.a,notifications:O.a})),Object(o.a)(this,"cache",{}),Object(o.a)(this,"booted",!1),Object(o.a)(this,"requestError",null),Object(o.a)(this,"title",""),Object(o.a)(this,"titleCount",0)}var e=t.prototype;return e.boot=function(t){var e=this;this.data=t,this.translator.locale=t.locale,Object(b.a)(window),this.initializers.toArray().forEach(function(t){return t(e)}),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums",1),this.session=new f.a(this.store.getById("users",this.data.session.userId),this.data.session.csrfToken),this.mount()},e.mount=function(){this.modal=m.mount(document.getElementById("modal"),m(c.a,null)),this.alerts=m.mount(document.getElementById("alerts"),m(l.a,null)),this.drawer=new g.a;var t=this.forum.attribute("basePath");m.route(document.getElementById("content"),t+"/",Object(y.a)(this.routes,t)),new x.a(function(t){var e=$("#app"),n=e.offset().top;e.toggleClass("affix",t>=n).toggleClass("scrolled",t>n)}).start(),$(function(){$("body").addClass("ontouchstart"in window?"touch":"no-touch")})},e.preloadedDocument=function(){if(this.data.document){var t=this.store.pushPayload(this.data.document);return this.data.document=null,t}return null},e.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){document.title=(this.titleCount?"("+this.titleCount+") ":"")+(this.title?this.title+" - ":"")+this.forum.attribute("title")},e.request=function(t){var e=this,n=r()({},t);if(n.background=n.background||!0,Object(_.extend)(n,"config",function(t,n){return n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)}),"GET"!==n.method&&"POST"!==n.method){var i=n.method;Object(_.extend)(n,"config",function(t,e){return e.setRequestHeader("X-HTTP-Method-Override",i)}),n.method="POST"}n.deserialize=n.deserialize||function(t){return t},n.errorHandler=n.errorHandler||function(t){throw t};var o=n.extract;n.extract=function(t){var e;e=o?o(t.responseText):t.responseText||null;var i=t.status;if(i<200||i>299)throw new w.a(i,e,n,t);if(t.getResponseHeader){var r=t.getResponseHeader("X-CSRF-Token");r&&(app.session.csrfToken=r)}try{return JSON.parse(e)}catch(i){throw new w.a(500,e,n,t)}},this.requestError&&this.alerts.dismiss(this.requestError.alert);var s=m.deferred();return m.request(n).then(function(t){return s.resolve(t)},function(t){var i;switch(e.requestError=t,t.status){case 422:i=t.response.errors.map(function(t){return[t.detail,m("br",null)]}).reduce(function(t,e){return t.concat(e)},[]).slice(0,-1);break;case 401:case 403:i=app.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:i=app.translator.trans("core.lib.error.not_found_message");break;case 429:i=app.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:i=app.translator.trans("core.lib.error.generic_message")}t.alert=new a.a({type:"error",children:i,controls:app.forum.attribute("debug")?[m(u.a,{className:"Button Button--link",onclick:e.showDebug.bind(e,t)},"Debug")]:void 0});try{n.errorHandler(t)}catch(t){e.alerts.show(t.alert)}s.reject(t)}),s.promise},e.showDebug=function(t){this.alerts.dismiss(this.requestErrorAlert),this.modal.show(new d.a({error:t}))},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t].path.replace(/:([^\/]+)/g,function(t,n){return Object(v.a)(e,n)}),i=m.route.buildQueryString(e);return("pathname"===m.route.mode?app.forum.attribute("basePath"):"")+n+(i?"?"+i:"")},t}()},function(t,e,n){"use strict";function i(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";function i(t,e){var n=$(window),i=$(t).offset().top-n.scrollTop();e(),n.scrollTop($(t).offset().top-i)}n.d(e,"a",function(){return i})},function(t,e,n){var i=n(111),r=n(79);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var i=n(65);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var i=n(66),r=n(116),o=n(115),s=Object.defineProperty;e.f=n(36)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var i=n(16),r=n.n(i),o=n(0),s=n(2),a=n(6),u=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t=this.props,e=t.options,n=t.onchange,i=t.value;return m("span",{className:"Select"},m("select",{className:"Select-input FormControl",onchange:n?m.withAttr("value",n.bind(this)):void 0,value:i},r()(e).map(function(t){return m("option",{value:t},e[t])})),Object(a.a)("fas fa-sort",{className:"Select-caret"}))},e}(s.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.props.text))},e}(n(2).a)},function(t,e,n){"use strict";function i(t){return t>=1e6?Math.floor(t/1e6)+app.translator.trans("core.lib.number_suffix.mega_text"):t>=1e3?Math.floor(t/1e3)+app.translator.trans("core.lib.number_suffix.kilo_text"):t.toString()}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";function i(t){var e=moment(t),n=e.format(),i=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},i)}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n(6);function r(t){if(t.lastSeenTime()&&t.isOnline())return m("span",{className:"UserOnline"},Object(i.a)("fas fa-circle"))}},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var i=n(5),r=n.n(i),o=n(0),s=n(14),a=n(3),u=n(6),c=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className+=" Dropdown--split",e.menuClassName+=" Dropdown-menu--right"};var n=e.prototype;return n.getButton=function(){var t=this.getFirstChild(),e=r()({},t.props);return e.className=(e.className||"")+" SplitDropdown-button Button "+this.props.buttonClassName,[a.a.component(e),m("button",{className:"Dropdown-toggle Button Button--icon "+this.props.buttonClassName,"data-toggle":"dropdown"},Object(u.a)(this.props.icon,{className:"Button-icon"}),Object(u.a)("fas fa-caret-down",{className:"Button-caret"}))]},n.getFirstChild=function(){for(var t=this.props.children;t instanceof Array;)t=t[0];return t},e}(s.a)},function(t,e,n){"use strict";e.a={handlers:null,getHandlers:function(t){return this.handlers=this.handlers||{},this.handlers[t]=this.handlers[t]||[],this.handlers[t]},trigger:function(t){for(var e=this,n=arguments.length,i=new Array(n>1?n-1:0),r=1;r1?n-1:0),s=1;s0?i:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(110);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(83),r=n(82);t.exports=function(t){return i(r(t))}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(65),r=n(46).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){(function(t){var i;!function(r,o){"use strict";var s=function t(e,n){m.version=function(){return"v0.2.8"};var i={}.hasOwnProperty,r={}.toString;function o(t){return"function"==typeof t}function s(t){return"[object Object]"===r.call(t)}function a(t){return"[object String]"===r.call(t)}var u=Array.isArray||function(t){return"[object Array]"===r.call(t)};function c(){}var l,d,p,h,f={AREA:1,BASE:1,BR:1,COL:1,COMMAND:1,EMBED:1,HR:1,IMG:1,INPUT:1,KEYGEN:1,LINK:1,META:1,PARAM:1,SOURCE:1,TRACK:1,WBR:1};function m(t,e){for(var n=[],r=1,c=arguments.length;r1||s[0].nodeValue.trim&&!s[0].nodeValue.trim())&&(U(e.nodes,e),s=[l.createTextNode(t)]),function(t,e,n,i){try{y(t,e,n),e.nodeValue=i}catch(t){}}(n,s[0],r,t))),(e=new t.constructor(t)).nodes=s,e.$trusted=t.$trusted,e}function S(t,e,n,i,r,o,s){return t.nodes.length?t.valueOf()!==e.valueOf()||r?T(e,t,i,o,n,s):(t.nodes.intact=!0,t):function(t,e,n){var i,r;t.$trusted?i=q(e,n,t):(i=[l.createTextNode(t)],e.nodeName in f||y(e,i[0],n));r="string"==typeof t||"number"==typeof t||"boolean"==typeof t?new t.constructor(t):t;return r.nodes=i,r}(e,i,n)}function C(t){return t.$trusted?t.nodes.length:u(t)?t.length:1}function O(t,e,i,r,o,s,a,c,l){t=function(t){for(var e=0;e1?k--:(k=0,m.redraw())};var E=[];var P=!1;function j(t,e,n,i,r,s){var a=function(t,e,n,i){var r;r="diff"===m.redraw.strategy()&&t?t.indexOf(e):-1;return r>-1?n[r]:o(i)?new i:{}}(n.views,e,i,t.controller),u=t&&t.attrs&&t.attrs.key;return"retain"===(t=0===k||P||i&&i.indexOf(a)>-1?t.view(a):{tag:"placeholder"}).subtree?t:(t.attrs=t.attrs||{},t.attrs.key=u,function(t,e,n,i){null!=i.onunload&&E.map(function(t){return t.handler}).indexOf(i.onunload)<0&&E.push({controller:i,handler:i.onunload});t.push(n),e.push(i)}(s,r,e,a),t)}function M(t,e,i,r,s,u,c,d){var p=[],h=[];if("retain"===(t=function(t,e,n,i){var r=e&&e.controllers;for(;null!=t.view;)t=j(t,t.view.$original||t.view,e,r,i,n);return t}(t,e,p,h)).subtree)return e;if(!t.tag&&h.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");t.attrs=t.attrs||{},e.attrs=e.attrs||{};var f=Object.keys(t.attrs),m=f.length>("key"in t.attrs?1:0);if(N(t,e,f),a(t.tag)){var v,g=0===e.nodes.length;if(c=function(t,e){return t.attrs.xmlns?t.attrs.xmlns:"svg"===t.tag?"http://www.w3.org/2000/svg":"math"===t.tag?"http://www.w3.org/1998/Math/MathML":e}(t,c),g){v=function(t,e){return t.attrs.is?null==e?l.createElement(t.tag,t.attrs.is):l.createElementNS(e,t.tag,t.attrs.is):null==e?l.createElement(t.tag):l.createElementNS(e,t.tag)}(t,c);var b=function(t,e,n,i){return i?B(e,t.tag,t.attrs,{},n):t.attrs}(t,v,c,m);y(r,v,s);var w=function(t,e,i,r,o,s){return null!=t.children&&t.children.length>0?A(e,t.tag,n,n,t.children,i.children,!0,0,t.attrs.contenteditable?e:r,o,s):t.children}(t,v,e,i,c,d);e=D(t,b,w,v,c,p,h)}else v=function(t,e,i,r,o,s,a,u){var c=t.nodes[0];r&&B(c,e.tag,e.attrs,t.attrs,o);t.children=A(c,e.tag,n,n,e.children,t.children,!1,0,e.attrs.contenteditable?c:i,o,a),t.nodes.intact=!0,u.length&&(t.views=s,t.controllers=u);return c}(e,t,i,m,c,p,d,h);return"select"===t.tag&&"value"in t.attrs&&B(v,t.tag,{value:t.attrs.value},{},c),g||!0!==u||null==v||y(r,v,s),function(t,e,n,i,r){if(o(e.attrs.config)){var s=r.configContext=r.configContext||{};t.push(function(){return e.attrs.config.call(e,n,!i,s,r)})}}(d,t,v,g,e),e}}function A(t,e,n,i,a,c,l,d,p,h,f){return"retain"===(a=function(t){try{if("boolean"!=typeof t&&null!=t&&null!=t.toString())return t}catch(t){}return""}(a)).subtree?c:(c=function(t,e,n,i,o){if(null!=e){if(r.call(e)===r.call(t))return e;if(o&&o.nodes){var s=n-i,a=s+(u(t)?t:e.nodes).length;U(o.nodes.slice(s,a),o.slice(s,a))}else e.nodes&&U(e.nodes,e)}(e=new t.constructor).tag&&(e={});return e.nodes=[],e}(a,c,d,i,n),u(a)?O(a,c,t,d,e,l,p,h,f):null!=a&&s(a)?M(a,c,p,t,d,l,h,f):o(a)?c:S(c,a,d,t,l,p,e))}function I(t,e){return t.action-e.action||t.index-e.index}var $,R={list:1,style:1,form:1,type:1,width:1,height:1};function L(t,e,n,r,a,u){if("config"===e||"key"===e)return!0;if(o(n)&&"on"===e.slice(0,2))t[e]=(c=n,l=t,function(t){t=t||event,m.redraw.strategy("diff"),m.startComputation();try{return c.call(l,t)}finally{ct()}});else if("style"===e&&null!=n&&s(n))!function(t,e,n){n===e&&(t.style="",n={});for(var r in e)i.call(e,r)&&(null!=n&&n[r]===e[r]||(t.style[r]=e[r]));for(r in n)i.call(n,r)&&(i.call(e,r)||(t.style[r]=""))}(t,n,r);else if(null!=u)"href"===e?t.setAttributeNS("http://www.w3.org/1999/xlink","href",n):t.setAttribute("className"===e?"class":e,n);else if(e in t&&!R[e])try{("input"!==a&&!t.isContentEditable||t[e]!=n)&&(t[e]=n)}catch(i){t.setAttribute(e,n)}else try{t.setAttribute(e,n)}catch(t){}var c,l}function H(t,e,n,i,r,o,s){if(e in r&&i===n&&"object"!=typeof n&&l.activeElement!==t)"value"===e&&"input"===o&&t.value!=n&&(t.value=n);else{r[e]=n;try{return L(t,e,n,i,o,s)}catch(t){if(t.message.indexOf("Invalid argument")<0)throw t}}}function B(t,e,n,r,o){for(var s in n)!i.call(n,s)||H(t,s,n[s],r[s],r,e,o);return r}function U(t,e){for(var n=t.length-1;n>-1;n--)if(t[n]&&t[n].parentNode){try{t[n].parentNode.removeChild(t[n])}catch(t){}(e=[].concat(e))[n]&&F(e[n])}t.length&&(t.length=0)}function F(t){t.configContext&&o(t.configContext.onunload)&&(t.configContext.onunload(),t.configContext.onunload=null),t.controllers&&v(t.controllers,function(t){o(t.onunload)&&t.onunload({preventDefault:c})}),t.children&&(u(t.children)?v(t.children,F):t.children.tag&&F(t.children))}function Y(t,e){try{t.appendChild(l.createRange().createContextualFragment(e))}catch(n){t.insertAdjacentHTML("beforeend",e),function t(e){if("SCRIPT"===e.tagName)e.parentNode.replaceChild(function(t){for(var e=document.createElement("script"),n=t.attributes,i=0;i16)&&(et>0&&h(et),et=p(ut,16)):(ut(),et=p(function(){et=null},16))}finally{at=P=!1}}},m.redraw.strategy=m.prop(),m.withAttr=function(t,e,n){return function(i){var r=(i=i||window.event).currentTarget||this,o=n||this,s=t in r?r[t]:r.getAttribute(t);e.call(o,s)}};var lt,dt={pathname:"",hash:"#",search:"?"},pt=c,ht=!1;function ft(t){return t.slice(dt[m.route.mode].length)}function mt(t){if(!((t=t||event).ctrlKey||t.metaKey||t.shiftKey||2===t.which)){t.preventDefault?t.preventDefault():t.returnValue=!1;var e,n=t.currentTarget||t.srcElement;for(e="pathname"===m.route.mode&&n.search?yt(n.search.slice(1)):{};n&&!/a/i.test(n.nodeName);)n=n.parentNode;k=0,m.route(n[m.route.mode].slice(dt[m.route.mode].length),e)}}function vt(){"hash"!==m.route.mode&&d.hash?d.hash=d.hash:e.scrollTo(0,0)}function gt(t,e){var r={},o=[];for(var a in t)if(i.call(t,a)){var c=e?e+"["+a+"]":a,l=t[a];if(null===l)o.push(encodeURIComponent(c));else if(s(l))o.push(gt(l,c));else if(u(l)){var d=[];r[c]=r[c]||{},v(l,function(t){r[c][t]||(r[c][t]=!0,d.push(encodeURIComponent(c)+"="+encodeURIComponent(t)))}),o.push(d.join("&"))}else l!==n&&o.push(encodeURIComponent(c)+"="+encodeURIComponent(l))}return o.join("&")}function yt(t){if(""===t||null==t)return{};"?"===t.charAt(0)&&(t=t.slice(1));var e=t.split("&"),n={};return v(e,function(t){var e=t.split("="),i=decodeURIComponent(e[0]),r=2===e.length?decodeURIComponent(e[1]):null;null!=n[i]?(u(n[i])||(n[i]=[n[i]]),n[i].push(r)):n[i]=r}),n}function bt(t){var e=V(t);U(t.childNodes,G[e]),G[e]=n}function wt(t,e){var n=m.prop(e);return t.then(n),n.then=function(n,i){return wt(t.then(n,i),e)},n.catch=n.then.bind(null,null),n}m.route=function(t,n,r,o){if(0===arguments.length)return K;if(3===arguments.length&&a(n)){pt=function(e){var o=K=ft(e);if(!function(t,e,n){lt={};var r=n.indexOf("?");-1!==r&&(lt=yt(n.substr(r+1,n.length)),n=n.substr(0,r));var o=Object.keys(e),s=o.indexOf(n);if(-1!==s)return m.mount(t,e[o[s]]),!0;for(var a in e)if(i.call(e,a)){if(a===n)return m.mount(t,e[a]),!0;var u=new RegExp("^"+a.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(u.test(n))return n.replace(u,function(){var n=a.match(/:[^\/]+/g)||[],i=[].slice.call(arguments,1,-2);v(n,function(t,e){lt[t.replace(/:|\./g,"")]=decodeURIComponent(i[e])}),m.mount(t,e[a])}),!0}}(t,r,o)){if(ht)throw new Error("Ensure the default route matches one of the routes defined in m.route");ht=!0,m.route(n,!0),ht=!1}};var s="hash"===m.route.mode?"onhashchange":"onpopstate";return e[s]=function(){var t=d[m.route.mode];"pathname"===m.route.mode&&(t+=d.search),K!==ft(t)&&pt(t)},it=vt,void e[s]()}if(t.addEventListener||t.attachEvent){var u="pathname"!==m.route.mode?d.pathname:"";return t.href=u+dt[m.route.mode]+o.attrs.href,void(t.addEventListener?(t.removeEventListener("click",mt),t.addEventListener("click",mt)):(t.detachEvent("onclick",mt),t.attachEvent("onclick",mt)))}if(a(t)){X=K,K=t;var c,p=n||{},h=K.indexOf("?");for(var f in c=h>-1?yt(K.slice(h+1)):{},p)i.call(p,f)&&(c[f]=p[f]);var g,y=gt(c);g=h>-1?K.slice(0,h):K,y&&(K=g+(-1===g.indexOf("?")?"?":"&")+y);var b=!0===(3===arguments.length?r:n)||X===K;if(e.history.pushState){var w=b?"replaceState":"pushState";it=vt,rt=function(){try{e.history[w](null,l.title,dt[m.route.mode]+K)}catch(t){d[m.route.mode]=K}},pt(dt[m.route.mode]+K)}else d[m.route.mode]=K,pt(dt[m.route.mode]+K);X=null}},m.route.param=function(t){if(!lt)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return t?lt[t]:lt},m.route.mode="search",m.route.buildQueryString=gt,m.route.parseQueryString=yt,m.deferred=function(){var t=new Tt;return t.promise=wt(t.promise),t};var xt=1,_t=2,Nt=3,kt=4;function Tt(t,e){var n=this,i=0,r=0,a=[];function u(t){i=t||kt,a.map(function(t){i===Nt?t.resolve(r):t.reject(r)})}function c(t,e,n,i){if((null!=r&&s(r)||o(r))&&o(t))try{var a=0;t.call(r,function(t){a++||(r=t,e())},function(t){a++||(r=t,n())})}catch(t){m.deferred.onerror(t),r=t,n()}else i()}function l(){var s;try{s=r&&r.then}catch(t){return m.deferred.onerror(t),r=t,i=_t,l()}i===_t&&m.deferred.onerror(r),c(s,function(){i=xt,l()},function(){i=_t,l()},function(){try{i===xt&&o(t)?r=t(r):i===_t&&o(e)&&(r=e(r),i=xt)}catch(t){return m.deferred.onerror(t),r=t,u()}r===n?(r=TypeError(),u()):c(s,function(){u(Nt)},u,function(){u(i===xt&&Nt)})})}n.promise={},n.resolve=function(t){return i||(r=t,i=xt,l()),n},n.reject=function(t){return i||(r=t,i=_t,l()),n},n.promise.then=function(t,e){var n=new Tt(t,e);return i===Nt?n.resolve(r):i===kt?n.reject(r):a.push(n),n.promise}}function St(t){return t}return m.deferred.onerror=function(t){if("[object Error]"===r.call(t)&&!/ Error/.test(t.constructor.toString()))throw k=0,t},m.sync=function(t){var e=m.deferred(),n=t.length,i=[],r="resolve";function o(t,o){return function(s){return i[t]=s,o||(r="reject"),0==--n&&(e.promise(i),e[r](i)),s}}return t.length>0?v(t,function(t,e){t.then(o(e,!0),o(e,!1))}):e.resolve([]),e.promise},m.request=function(t){!0!==t.background&&m.startComputation();var r,c,d,p,h,f=new Tt;return t.dataType&&"jsonp"===t.dataType.toLowerCase()?(r=t.serialize=c=t.deserialize=St,d=function(t){return t.responseText}):(r=t.serialize=t.serialize||JSON.stringify,c=t.deserialize=t.deserialize||JSON.parse,d=t.extract||function(t){return t.responseText.length||c!==JSON.parse?t.responseText:null}),t.method=(t.method||"GET").toUpperCase(),t.url=(p=t.url,(h=t.data)&&(p=p.replace(/:[a-z]\w+/gi,function(t){var e=t.slice(1),n=h[e]||t;return delete h[e],n})),p),function(t,e,n){if("GET"===t.method&&"jsonp"!==t.dataType){var i=t.url.indexOf("?")<0?"?":"&",r=gt(e);t.url+=r?i+r:""}else t.data=n(e)}(t,t.data,r),t.onload=t.onerror=function(e){try{e=e||event;var n=c(d(e.target,t));"load"===e.type?(t.unwrapSuccess&&(n=t.unwrapSuccess(n,e.target)),u(n)&&t.type?v(n,function(e,i){n[i]=new t.type(e)}):t.type&&(n=new t.type(n)),f.resolve(n)):(t.unwrapError&&(n=t.unwrapError(n,e.target)),f.reject(n))}catch(t){f.reject(t),m.deferred.onerror(t)}finally{!0!==t.background&&m.endComputation()}},function(t){t.dataType&&"jsonp"===t.dataType.toLowerCase()?function(t){var i=t.callbackName||"mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),r=l.createElement("script");e[i]=function(o){r.parentNode.removeChild(r),t.onload({type:"load",target:{responseText:o}}),e[i]=n},r.onerror=function(){return r.parentNode.removeChild(r),t.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),e[i]=n,!1},r.onload=function(){return!1},r.src=t.url+(t.url.indexOf("?")>0?"&":"?")+(t.callbackKey?t.callbackKey:"callback")+"="+i+"&"+gt(t.data||{}),l.body.appendChild(r)}(t):function(t){var n=new e.XMLHttpRequest;if(n.open(t.method,t.url,!0,t.user,t.password),n.onreadystatechange=function(){4===n.readyState&&(n.status>=200&&n.status<300?t.onload({type:"load",target:n}):t.onerror({type:"error",target:n}))},t.serialize===JSON.stringify&&t.data&&"GET"!==t.method&&n.setRequestHeader("Content-Type","application/json; charset=utf-8"),t.deserialize===JSON.parse&&n.setRequestHeader("Accept","application/json, text/*"),s(t.headers))for(var r in t.headers)i.call(t.headers,r)&&n.setRequestHeader(r,t.headers[r]);if(o(t.config)){var u=t.config(n,t);null!=u&&(n=u)}var c="GET"!==t.method&&t.data?t.data:"";if(c&&!a(c)&&c.constructor!==e.FormData)throw new Error("Request data should be either be a string or FormData. Check the `serialize` option in `m.request`");n.send(c)}(t)}(t),f.promise=wt(f.promise,t.initialValue),f.promise},m}(r);"undefined"==typeof window&&s.deps({document:"undefined"!=typeof document?document:{},location:"undefined"!=typeof location?location:{},clearTimeout:clearTimeout,setTimeout:setTimeout}),"object"==typeof t&&null!=t&&t.exports?t.exports=s:void 0===(i=function(){return s}.call(e,n,e,t))||(t.exports=i)}("undefined"!=typeof window?window:this)}).call(this,n(76)(t))},function(t,e){},function(t,e,n){"use strict";var i=n(34),r=n(54),o=n(55),s=n(74),a=n(22);function u(){$("[data-humantime]").each(function(){var t=$(this),e=Object(a.a)(t.attr("datetime"));t.html(e)})}var c=n(4),l=n(77),d=n(13),p=n(53),h=n(63),f=n(44),m=n(70),v=n(30),g=n(42),y=n(9),b=n(33),w=n(56),x=n(51),_=n(27),N=n(8),k=n(62),T=n(52),S=n(48),C=n(37),O=n(49),D=n(40),E=n(10),P=n(50),j=n(2),M=n(57),A=n(59),I=n(35),R=n(23),L=n(17),H=n(69),B=n(21),U=n(14),F=n(73),Y=n(58),q=n(24),W=n(68),z=n(43),G=n(19),V=n(20),Z=n(38),K=n(29),X=n(60),J=n(3),Q=n(11),tt=n(28),et=n(1),nt=n(61),it=n(71),rt=n(15),ot=n(6),st=n(39);var at=n(31),ut=n(18),ct=n(72),lt=n(7);e.a={extend:i,Session:r.a,Store:o.a,"utils/evented":s.a,"utils/liveHumanTimes":function(){setInterval(u,1e4)},"utils/ItemList":c.a,"utils/mixin":l.a,"utils/humanTime":a.a,"utils/computed":d.a,"utils/Drawer":p.a,"utils/anchorScroll":h.a,"utils/RequestError":f.a,"utils/abbreviateNumber":m.a,"utils/string":v,"utils/SubtreeRetainer":g.a,"utils/extract":y.a,"utils/ScrollListener":b.a,"utils/stringToColor":w.a,"utils/patchMithril":x.a,"utils/classList":_.a,"utils/extractText":N.a,"utils/formatNumber":k.a,"utils/mapRoutes":T.a,"models/Notification":S.a,"models/User":C.a,"models/Post":O.a,"models/Discussion":D.a,"models/Group":E.a,"models/Forum":P.a,Component:j.a,Translator:M.a,"components/AlertManager":A.a,"components/Switch":I.a,"components/Badge":R.a,"components/LoadingIndicator":L.a,"components/Placeholder":H.a,"components/Separator":B.a,"components/Dropdown":U.a,"components/SplitDropdown":F.a,"components/RequestErrorModal":Y.a,"components/FieldSet":q.a,"components/Select":W.a,"components/Navigation":z.a,"components/Alert":G.a,"components/LinkButton":V.a,"components/Checkbox":Z.a,"components/SelectDropdown":K.a,"components/ModalManager":X.a,"components/Button":J.a,"components/Modal":Q.a,"components/GroupBadge":tt.a,Model:et.a,Application:nt.a,"helpers/fullTime":it.a,"helpers/avatar":rt.a,"helpers/icon":ot.a,"helpers/humanTime":st.a,"helpers/punctuateSeries":function(t){if(2===t.length)return app.translator.trans("core.lib.series.two_text",{first:t[0],second:t[1]});if(t.length>=3){var e=t.slice(1,t.length-1).reduce(function(t,e){return t.concat([e,app.translator.trans("core.lib.series.glue_text")])},[]).slice(0,-1);return app.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t},"helpers/highlight":at.a,"helpers/username":ut.a,"helpers/userOnline":ct.a,"helpers/listItems":lt.a}},function(t,e,n){t.exports=n(102)},function(t,e,n){t.exports=n(121)},function(t,e,n){var i=n(26),r=i.JSON||(i.JSON={stringify:JSON.stringify});t.exports=function(t){return r.stringify.apply(r,arguments)}},function(t,e,n){var i=n(47),r=n(26),o=n(45);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],s={};s[t]=e(n),i(i.S+i.F*o(function(){n(1)}),"Object",s)}},function(t,e,n){var i=n(78),r=n(64);n(93)("keys",function(){return function(t){return r(i(t))}})},function(t,e,n){n(94),t.exports=n(26).Object.keys},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";var i=n(64),r=n(97),o=n(96),s=n(78),a=n(83),u=Object.assign;t.exports=!u||n(45)(function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=i})?function(t,e){for(var n=s(t),u=arguments.length,c=1,l=r.f,d=o.f;u>c;)for(var p,h=a(arguments[c++]),f=l?i(h).concat(l(h)):i(h),m=f.length,v=0;m>v;)d.call(h,p=f[v++])&&(n[p]=h[p]);return n}:u},function(t,e,n){var i=n(47);i(i.S+i.F,"Object",{assign:n(98)})},function(t,e,n){n(99),t.exports=n(26).Object.assign},function(t,e,n){var i=n(47);i(i.S+i.F*!n(36),"Object",{defineProperty:n(67).f})},function(t,e,n){n(101);var i=n(26).Object;t.exports=function(t,e,n){return i.defineProperty(t,e,n)}},function(t,e,n){var i=n(46).document;t.exports=i&&i.documentElement},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){t.exports=!0},function(t,e,n){var i=n(26),r=n(46),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:i.version,mode:n(105)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var i=n(81),r=Math.max,o=Math.min;t.exports=function(t,e){return(t=i(t))<0?r(t+e,0):o(t,e)}},function(t,e,n){var i=n(81),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(84),r=n(108),o=n(107);t.exports=function(t){return function(e,n,s){var a,u=i(e),c=r(u.length),l=o(s,c);if(t&&n!=n){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(85),r=n(84),o=n(109)(!1),s=n(80)("IE_PROTO");t.exports=function(t,e){var n,a=r(t),u=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);for(;e.length>u;)i(a,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var i=n(67),r=n(66),o=n(64);t.exports=n(36)?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),a=s.length,u=0;a>u;)i.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var i=n(66),r=n(112),o=n(79),s=n(80)("IE_PROTO"),a=function(){},u=function(){var t,e=n(86)("iframe"),i=o.length;for(e.style.display="none",n(103).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("