framework/js/dist/forum.js
flarum-bot a6f660236f Bundled output for commit f260bd7efead0287add4d363114c7abcb0c4b2ab
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-10-30 23:15:48 +00:00

53 lines
372 KiB
JavaScript
Generated

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=154)}([function(t,e,n){"use strict";function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2),r=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 r=this;void 0===n&&(n={});var o={type:this.data.type,id:this.data.id,attributes:e};if(e.relationships){for(var s in o.relationships={},e.relationships){var a=e.relationships[s];o.relationships[s]={data:a instanceof Array?a.map(t.getIdentifier):t.getIdentifier(a)}}delete e.relationships}var c=this.copyData();this.pushData(o);var u={data:o};return n.meta&&(u.meta=n.meta),i.a.request(Object.assign({method:this.exists?"PATCH":"POST",url:i.a.forum.attribute("apiUrl")+this.apiEndpoint(),body:u},n)).then((function(t){return r.store.data[t.data.type]=r.store.data[t.data.type]||{},r.store.data[t.data.type][t.data.id]=r,r.store.pushPayload(t)}),(function(t){throw r.pushData(c),m.redraw(),t}))},e.delete=function(t,e){var n=this;return void 0===e&&(e={}),this.exists?i.a.request(Object.assign({method:"DELETE",url:i.a.forum.attribute("apiUrl")+this.apiEndpoint(),body:t},e)).then((function(){n.exists=!1,n.store.remove(n)})):Promise.resolve()},e.apiEndpoint=function(){return"/"+this.data.type+(this.exists?"/"+this.data.id:"")},e.copyData=function(){return JSON.parse(JSON.stringify(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 i.a.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 i.a.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";var i=window,r=new Proxy({},{get:function(t,e){return Reflect.get(i.app,e,i.app)},set:function(t,e,n){return Reflect.set(i.app,e,n,i.app)}});e.a=r},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var i=n(10),r=n(17),o=n(0),s=n(4),a=n(57),c=n(6),u=n(8),l=n(9),d=n(14),h=["type","title","aria-label","icon","disabled","loading","className","class"],f=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(t){var e=this.attrs,n=e.type,o=e.title,s=e["aria-label"],a=e.icon,c=e.disabled,d=e.loading,f=e.className,p=e.class,v=Object(r.a)(e,h);n||(n="button"),s||(s=o),"object"==typeof s&&(s=Object(l.a)(s)),(c||d)&&delete v.onclick,f=Object(u.a)(p,f,{hasIcon:a,disabled:c||d,loading:d});var g=Object(i.a)({disabled:c,className:f,type:n,"aria-label":s},v);return m("button",g,this.getButtonContent(t.children))},n.oncreate=function(e){var n;t.prototype.oncreate.call(this,e),this.attrs["aria-label"]||Object(l.a)(e.children)||null!=(n=this.element)&&null!=n.getAttribute&&n.getAttribute("aria-label")||Object(a.a)('[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read "Button". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name',this.element)},n.getButtonContent=function(t){var e=this.attrs.icon;return[e&&Object(c.a)(e,{className:"Button-icon"}),t&&m("span",{className:"Button-label"},t),this.attrs.loading&&m(d.a,{size:"small",display:"inline"})]},e}(s.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){this.element=void 0,this.attrs=void 0,this.state=void 0}var e=t.prototype;return e.oninit=function(t){this.setAttrs(t.attrs)},e.oncreate=function(t){this.element=t.dom},e.onbeforeupdate=function(t){this.setAttrs(t.attrs)},e.onupdate=function(t){},e.onbeforeremove=function(t){},e.onremove=function(t){},e.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),t.component=function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var n=Object.assign({},t);return m(this,n,e)},e.setAttrs=function(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error("["+this.constructor.name+'] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute');if("tag"in t)throw new Error("["+this.constructor.name+'] You cannot use the "tag" attribute name with Mithril 2.')}this.attrs=t},t.initAttrs=function(t){},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=function(t,e){this.content=void 0,this.priority=void 0,this.key=void 0,this.content=t,this.priority=e},r=function(){function t(){this.items={}}var e=t.prototype;return e.isEmpty=function(){for(var t in this.items)if(this.items.hasOwnProperty(t))return!1;return!0},e.has=function(t){return!!this.items[t]},e.get=function(t){return this.items[t].content},e.add=function(t,e,n){return void 0===n&&(n=0),this.items[t]=new i(e,n),this},e.replace=function(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),this.items[t]&&(null!==e&&(this.items[t].content=e),null!==n&&(this.items[t].priority=n)),this},e.remove=function(t){return delete this.items[t],this},e.merge=function(t){for(var e in t.items)t.items.hasOwnProperty(e)&&t.items[e]instanceof i&&(this.items[e]=t.items[e]);return this},e.toArray=function(){var t=[];for(var e in this.items)this.items.hasOwnProperty(e)&&this.items[e]instanceof i&&(this.items[e].content=Object(this.items[e].content),this.items[e].content.itemName=e,t.push(this.items[e]),this.items[e].key=t.length);return t.sort((function(t,e){return t.priority===e.priority?t.key-e.key:t.priority>e.priority?-1:1})).map((function(t){return t.content}))},t}()},function(t,e,n){"use strict";function i(t,e){return void 0===e&&(e={}),e.className="icon "+t+" "+(e.className||""),m("i",Object.assign({"aria-hidden":"true"},e))}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(23),r=n(8);function o(t){return t.tag===i.a}function s(t){return t instanceof Array||(t=[t]),function(t){var e,n=[];return t.filter(Boolean).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.tag&&t.tag.isListItem,n=t.tag&&t.tag.isActive&&t.tag.isActive(t.attrs),i=t.attrs&&t.attrs.itemClassName||t.itemClassName;return e&&(t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key),e?t:m("li",{className:Object(r.a)([i,t.itemName&&"item-"+t.itemName,n&&"active"]),key:t.attrs&&t.attrs.key||t.itemName},t)}))}},function(t,e,n){"use strict";function i(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=i(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}var r=function(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=i(t))&&(r&&(r+=" "),r+=e);return r};e.a=r},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?t.children?i(t.children):t.text:t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(109),r=n.n(i);e.a=r.a},function(t,e,n){"use strict";var i=n(0),r=n(1),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e}(r.a);Object.assign(o.prototype,{nameSingular:r.a.attribute("nameSingular"),namePlural:r.a.attribute("namePlural"),color:r.a.attribute("color"),icon:r.a.attribute("icon"),isHidden:r.a.attribute("isHidden")}),o.ADMINISTRATOR_ID="1",o.GUEST_ID="2",o.MEMBER_ID="3",e.a=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(17),r=n(0),o=n(4),s=n(20),a=["options"],c=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(t){var e=t.attrs,n=e.options,r=void 0===n?{}:n,o=Object(i.a)(e,a);o.href=o.href||"";var c=t.children||{tag:"#",children:t.text};return o.external?m("a",o,c):(o.href===m.route.get()&&("replace"in r||(r.replace=!0)),Object(s.a)(o,"force")&&("state"in r||(r.state={}),"key"in r.state||(r.state.key=Date.now())),o.options=r,m(m.route.Link,o,c))},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(17),r=n(0),o=n(2),s=n(4),a=n(8),c=["display","size","containerClassName","className"],u=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(){var t=this.attrs,e=t.display,n=void 0===e?"block":e,r=t.size,s=void 0===r?"medium":r,u=t.containerClassName,l=t.className,d=Object(i.a)(t,c),h=Object(a.a)("LoadingIndicator",l),f=Object(a.a)("LoadingIndicator-container","unset"!==n&&"LoadingIndicator-container--"+n,s&&"LoadingIndicator-container--"+s,u);return m("div",Object.assign({"aria-label":o.a.translator.trans("core.lib.loading_indicator.accessible_label"),role:"status"},d.containerAttrs,{"data-size":s,className:f}),m("div",Object.assign({"aria-hidden":"true",className:h},d)))},e}(s.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(0),r=n(4),o=n(28),s=n(3),a=n(57),c=function(t){function e(){for(var e,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=t.call.apply(t,[this].concat(i))||this).loading=!1,e.alertAttrs=void 0,e}Object(i.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e);var i=[];["className","title","content","onsubmit"].forEach((function(t){n[t]||(n[t]=function(){},i.push(t))})),i.length>0&&Object(a.a)("Modal `"+this.constructor.name+"` does not implement all abstract methods of the Modal super class. Missing methods: "+i.join(", ")+".")},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.attrs.animateShow((function(){return n.onready()}))},n.onbeforeremove=function(e){if(t.prototype.onbeforeremove.call(this,e),!this.attrs.state.modal)return this.attrs.animateHide(),new Promise((function(t){return setTimeout(t,300)}))},n.view=function(){return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:"Modal modal-dialog "+this.className()},m("div",{className:"Modal-content"},this.constructor.isDismissible&&m("div",{className:"Modal-close App-backControl"},s.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())),this.alertAttrs?m("div",{className:"Modal-alert"},o.a.component(this.alertAttrs)):"",this.content())))},n.onready=function(){this.$().find("input, select, textarea").first().trigger("focus").trigger("select")},n.hide=function(){this.attrs.state.close()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){var e;this.alertAttrs=t.alert,m.redraw(),422===t.status&&null!=(e=t.response)&&e.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").trigger("select"):this.onready()},e}(r.a);c.isDismissible=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),r=n(3),o=n(13),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.active=this.isActive(e),void 0===e.force&&(e.force=!0)},e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return n.tag=o.a,n.attrs.active=String(n.attrs.active),delete n.attrs.type,n},e.isActive=function(t){return void 0!==t.active?t.active:m.route.get()===t.href},e}(r.a)},function(t,e,n){"use strict";function i(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(0),r=n(2),o=n(4),s=n(6),a=n(7),c=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t),e.initAttrs=function(t){t.className=t.className||"",t.buttonClassName=t.buttonClassName||"",t.menuClassName=t.menuClassName||"",t.label=t.label||"",t.caretIcon=void 0!==t.caretIcon?t.caretIcon:"fas fa-caret-down",t.accessibleToggleLabel=t.accessibleToggleLabel||r.a.translator.trans("core.lib.dropdown.toggle_dropdown_accessible_label")};var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.showing=!1},n.view=function(t){var e=t.children?Object(a.a)(t.children):[],n=!this.attrs.lazyDraw||this.showing;return m("div",{className:"ButtonGroup Dropdown dropdown "+this.attrs.className+" itemCount"+e.length+(this.showing?" open":"")},this.getButton(t.children),n&&this.getMenu(e))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.$().on("shown.bs.dropdown",(function(){var t=n.attrs,e=t.lazyDraw,i=t.onshow;n.showing=!0,e&&m.redraw.sync(),"function"==typeof i&&i(),e||m.redraw();var r=n.$(".Dropdown-menu"),o=r.hasClass("Dropdown-menu--right");r.removeClass("Dropdown-menu--top Dropdown-menu--right"),r.toggleClass("Dropdown-menu--top",r.offset().top+r.height()>$(window).scrollTop()+$(window).height()),r.offset().top<0&&r.removeClass("Dropdown-menu--top"),r.toggleClass("Dropdown-menu--right",o||r.offset().left+r.width()>$(window).scrollLeft()+$(window).width())})),this.$().on("hidden.bs.dropdown",(function(){n.showing=!1,n.attrs.onhide&&n.attrs.onhide(),m.redraw()}))},n.getButton=function(t){return m("button",{className:"Dropdown-toggle "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown",onclick:this.attrs.onclick},this.getButtonContent(t))},n.getButtonContent=function(t){return[this.attrs.icon?Object(s.a)(this.attrs.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},this.attrs.label),this.attrs.caretIcon?Object(s.a)(this.attrs.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.attrs.menuClassName},t)},e}(o.a)},function(t,e,n){"use strict";function i(t,e){void 0===e&&(e={}),e.className="Avatar "+(e.className||"");var n="",i="undefined"===e.title||e.title;if(i||delete e.title,t){var r=t.displayName()||"?",o=t.avatarUrl();if(i&&(e.title=e.title||r),o)return m("img",Object.assign({},e,{src:o,alt:""}));n=r.charAt(0).toUpperCase(),e.style={"--avatar-bg":t.color()}}return m("span",e,n)}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";n.d(e,"a",(function(){return r}));var i=n(2);function r(t){var e=t&&t.displayName()||i.a.translator.trans("core.lib.username.deleted_text");return m("span",{className:"username"},e)}},function(t,e,n){"use strict";function i(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i,r=e.slice(0,-1),o=e.slice(-1)[0],s={};return function(){var t=this,e=!1;return r.forEach((function(n){var i="function"==typeof t[n]?t[n]():t[n];s[n]!==i&&(e=!0,s[n]=i)})),e&&(i=o.apply(this,r.map((function(t){return s[t]})))),i}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";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("li",{className:"Dropdown-separator"})},e}(n(4).a);r.isListItem=!0,e.a=r},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(17),r=n(0),o=n(4),s=n(8),a=n(9),c=["text","tooltipVisible","showOnFocus","position","ignoreTitleWarning","html","delay"],u=function(t){function e(){for(var e,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=t.call.apply(t,[this].concat(i))||this).firstChild=null,e.childDomNode=null,e.oldText="",e.oldVisibility=void 0,e.shouldRecreateTooltip=!1,e.shouldChangeTooltipVisibility=!1,e}Object(r.a)(e,t);var n=e.prototype;return n.view=function(t){var e=t.children,n=this.attrs,r=(n.text,n.tooltipVisible),o=(n.showOnFocus,n.position,n.ignoreTitleWarning),s=void 0!==o&&o;n.html,n.delay,Object(i.a)(n,c);this.attrs.title&&!s&&console.warn("`title` attribute was passed to Tooltip component. Was this intentional? Tooltip content should be passed to the `text` attr instead.");var a=this.getRealText();if(a!==this.oldText&&(this.oldText=a,this.shouldRecreateTooltip=!0),r!==this.oldVisibility&&(this.oldVisibility=this.attrs.tooltipVisible,this.shouldChangeTooltipVisibility=!0),void 0===e)throw new Error("Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.");if(1!==e.length)throw new Error("Tooltip component was either passed more than one or no child node.\n\nPlease wrap multiple children in another element, such as a <div> or <span>.");var u=e[0];if("object"!=typeof u||Array.isArray(u)||null===u)throw new Error("Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.");if("string"==typeof u.tag&&["#","[","<"].includes(u.tag))throw new Error('Tooltip component with provided with a vnode with tag "'+u.tag+'". This is not a DOM element, so is not a valid child element. Please wrap this vnode in another element, such as a <div> or <span>.');return this.firstChild=u,e},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.checkDomNodeChanged(),this.recreateTooltip()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.checkDomNodeChanged(),this.recreateTooltip()},n.recreateTooltip=function(){this.shouldRecreateTooltip&&null!==this.childDomNode&&($(this.childDomNode).tooltip("destroy","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"),this.createTooltip(),this.shouldRecreateTooltip=!1),this.shouldChangeTooltipVisibility&&(this.shouldChangeTooltipVisibility=!1,this.updateVisibility())},n.updateVisibility=function(){null!==this.childDomNode&&(!0===this.attrs.tooltipVisible?$(this.childDomNode).tooltip("show","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"):!1===this.attrs.tooltipVisible&&$(this.childDomNode).tooltip("hide","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"))},n.createTooltip=function(){if(null!==this.childDomNode){var t=this.attrs,e=t.showOnFocus,n=void 0===e||e,i=t.position,r=void 0===i?"top":i,o=t.delay,a=t.html,c=void 0!==a&&a,u=t.tooltipVisible,l=(t.text,"boolean"==typeof u?"manual":Object(s.a)("hover",[n&&"focus"])),d=this.getRealText();this.childDomNode.setAttribute("title",d),this.childDomNode.setAttribute("aria-label",d),$(this.childDomNode).tooltip({html:c,delay:o,placement:r,trigger:l},"DANGEROUS_tooltip_jquery_fn_deprecation_exempt")}},n.getRealText=function(){var t=this.attrs.text;return Array.isArray(t)?Object(a.a)(t):t},n.checkDomNodeChanged=function(){var t=this.firstChild.dom;t&&!t.isSameNode(this.childDomNode)&&(this.childDomNode=t,this.shouldRecreateTooltip=!0)},e}(o.a)},function(t,e,n){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",i="second",r="minute",o="hour",s="day",a="week",c="month",u="quarter",l="year",d="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},v=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},g={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+v(i,2,"0")+":"+v(r,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var i=12*(n.year()-e.year())+(n.month()-e.month()),r=e.clone().add(i,c),o=n-r<0,s=e.clone().add(i+(o?-1:1),c);return+(-(i+(n-r)/(o?r-s:s-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:l,w:a,d:s,D:d,h:o,m:r,s:i,ms:n,Q:u}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",y={};y[b]=m;var w=function(t){return t instanceof T},x=function(t,e,n){var i;if(!t)return b;if("string"==typeof t)y[t]&&(i=t),e&&(y[t]=e,i=t);else{var r=t.name;y[r]=t,i=r}return!n&&i&&(b=i),i||!n&&b},N=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new T(n)},C=g;C.l=x,C.i=w,C.w=function(t,e){return N(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var T=function(){function m(t){this.$L=x(t.locale,null,!0),this.parse(t)}var v=m.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(C.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(f);if(i){var r=i[2]-1||0,o=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return C},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(t,e){var n=N(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return N(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<N(t)},v.$g=function(t,e,n){return C.u(t)?this[e]:this.set(n,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var n=this,u=!!C.u(e)||e,h=C.p(t),f=function(t,e){var i=C.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return u?i:i.endOf(s)},p=function(t,e){return C.w(n.toDate()[t].apply(n.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,v=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(h){case l:return u?f(1,0):f(31,11);case c:return u?f(1,v):f(0,v+1);case a:var y=this.$locale().weekStart||0,w=(m<y?m+7:m)-y;return f(u?g-w:g+(6-w),v);case s:case d:return p(b+"Hours",0);case o:return p(b+"Minutes",1);case r:return p(b+"Seconds",2);case i:return p(b+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var a,u=C.p(t),h="set"+(this.$u?"UTC":""),f=(a={},a[s]=h+"Date",a[d]=h+"Date",a[c]=h+"Month",a[l]=h+"FullYear",a[o]=h+"Hours",a[r]=h+"Minutes",a[i]=h+"Seconds",a[n]=h+"Milliseconds",a)[u],p=u===s?this.$D+(e-this.$W):e;if(u===c||u===l){var m=this.clone().set(d,1);m.$d[f](p),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[C.p(t)]()},v.add=function(n,u){var d,h=this;n=Number(n);var f=C.p(u),p=function(t){var e=N(h);return C.w(e.date(e.date()+Math.round(t*n)),h)};if(f===c)return this.set(c,this.$M+n);if(f===l)return this.set(l,this.$y+n);if(f===s)return p(1);if(f===a)return p(7);var m=(d={},d[r]=t,d[o]=e,d[i]=1e3,d)[f]||1,v=this.$d.getTime()+n*m;return C.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var i=t||"YYYY-MM-DDTHH:mm:ssZ",r=C.z(this),o=this.$H,s=this.$m,a=this.$M,c=n.weekdays,u=n.months,l=function(t,n,r,o){return t&&(t[n]||t(e,i))||r[n].substr(0,o)},d=function(t){return C.s(o%12||12,t,"0")},f=n.meridiem||function(t,e,n){var i=t<12?"AM":"PM";return n?i.toLowerCase():i},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:C.s(a+1,2,"0"),MMM:l(n.monthsShort,a,u,3),MMMM:l(u,a),D:this.$D,DD:C.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,c,2),ddd:l(n.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(o),HH:C.s(o,2,"0"),h:d(1),hh:d(2),a:f(o,s,!0),A:f(o,s,!1),m:String(s),mm:C.s(s,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.s(this.$ms,3,"0"),Z:r};return i.replace(p,(function(t,e){return e||m[t]||r.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,d,h){var f,p=C.p(d),m=N(n),v=(m.utcOffset()-this.utcOffset())*t,g=this-m,b=C.m(this,m);return b=(f={},f[l]=b/12,f[c]=b,f[u]=b/3,f[a]=(g-v)/6048e5,f[s]=(g-v)/864e5,f[o]=g/e,f[r]=g/t,f[i]=g/1e3,f)[p]||g,h?b:C.a(b)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return y[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),i=x(t,e,!0);return i&&(n.$L=i),n},v.clone=function(){return C.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),O=T.prototype;return N.prototype=O,[["$ms",n],["$s",i],["$m",r],["$H",o],["$W",s],["$M",c],["$y",l],["$D",d]].forEach((function(t){O[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),N.extend=function(t,e){return t.$i||(t(e,T,N),t.$i=!0),N},N.locale=x,N.isDayjs=w,N.unix=function(t){return N(1e3*t)},N.en=y[b],N.Ls=y,N.p={},N}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(25),r=n.n(i);function o(t){var e=r()(t),n=r()();e.isAfter(n)&&(e=n);return e.diff(r()())<-2592e6?e.year()===r()().year()?e.format("D MMM"):e.format("ll"):e.fromNow()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n(10),r=n(17),o=n(0),s=n(24),a=n(4),c=n(6),u=n(8),l=["type","icon","label","color","style"],d=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t=this.attrs,e=t.type,n=t.icon,o=t.label,a=t.color,d=t.style,h=void 0===d?{}:d,f=Object(r.a)(t,l),p=Object(u.a)("Badge",[e&&"Badge--"+e],f.className),v=n?Object(c.a)(n,{className:"Badge-icon"}):m.trust("&nbsp;"),g=Object(i.a)({},h,{"--badge-bg":a}),b=Object(i.a)({},f,{className:p,style:g}),y=m("div",b,v);return o?m(s.a,{text:o},y):y},e}(a.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(0),r=n(4),o=n(3),s=n(7),a=n(20),c=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(t){var e=Object.assign({},this.attrs),n=Object(a.a)(e,"type");e.className="Alert Alert--"+n+" "+(e.className||"");var i=Object(a.a)(e,"content")||t.children,r=Object(a.a)(e,"controls")||[],c=Object(a.a)(e,"dismissible"),u=Object(a.a)(e,"ondismiss"),l=[];return(c||void 0===c)&&l.push(m(o.a,{icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:u})),m("div",e,m("span",{className:"Alert-body"},i),m("ul",{className:"Alert-controls"},Object(s.a)(r.concat(l))))},e}(r.a)},function(t,e,n){"use strict";function i(t,e,n,i,r,o){return{tag:t,key:e,attrs:n,children:i,text:r,dom:o,domSize:void 0,state:void 0,events:void 0,instance:void 0}}i.normalize=function(t){return Array.isArray(t)?i("[",void 0,void 0,i.normalizeChildren(t),void 0,void 0):null==t||"boolean"==typeof t?null:"object"==typeof t?t:i("#",void 0,void 0,String(t),void 0,void 0)},i.normalizeChildren=function(t){var e=[];if(t.length){for(var n=null!=t[0]&&null!=t[0].key,r=1;r<t.length;r++)if((null!=t[r]&&null!=t[r].key)!==n)throw new TypeError("Vnodes must either always have keys or never have keys!");for(r=0;r<t.length;r++)e[r]=i.normalize(t[r])}return e},t.exports=i},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.initAttrs=function(e){t.initAttrs.call(this,e),e.group&&(e.icon=e.group.icon(),e.color=e.group.color(),e.label=void 0===e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.id(),delete e.group)},e}(n(27).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),r=n(2),o=n(4),s=n(47),a=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),r.a.previous=r.a.current,r.a.current=new s.a(this.constructor,{routeName:this.attrs.routeName}),r.a.drawer.hide(),r.a.modal.close(),this.bodyClass="",this.scrollTopOnCreate=!0,this.useBrowserScrollRestoration=!0},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.bodyClass&&$("#app").addClass(this.bodyClass),this.scrollTopOnCreate&&$(window).scrollTop(0),"scrollRestoration"in history&&(history.scrollRestoration=this.useBrowserScrollRestoration?"auto":"manual")},n.onremove=function(e){t.prototype.onremove.call(this,e),this.bodyClass&&$("#app").removeClass(this.bodyClass)},e}(o.a)},function(t,e,n){"use strict";function i(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+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>|<br>)/g,"$1 &nbsp;").replace(/<img\b[^>]*>/gi," "),n=$("<div/>").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 a}));var i=n(0),r=n(18),o=n(6);function s(t){var e=t.tag;return("string"!=typeof e||"a"===e||"button"===e)&&("initAttrs"in e&&e.initAttrs(t.attrs),"isActive"in e?e.isActive(t.attrs):t.attrs.active)}var a=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initAttrs=function(e){e.caretIcon=void 0!==e.caretIcon?e.caretIcon:"fas fa-sort",t.initAttrs.call(this,e),e.className+=" Dropdown--select"},e.prototype.getButtonContent=function(t){var e=t.find(s),n=e&&e.children||this.attrs.defaultLabel;return n instanceof Array&&(n=n[0]),[m("span",{className:"Button-label"},n),Object(o.a)(this.attrs.caretIcon,{className:"Button-caret"})]},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(32);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=$("<div/>").text(o).html(),e&&(o=o.replace(r,"<mark>$&</mark>")),m.trust(o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=null;function r(t,e){var n=e.text,r=e.selectionStart,o=e.selectionEnd,s=t.selectionStart,a=t.value.slice(0,s),c=t.value.slice(t.selectionEnd);if(null===i||!0===i){t.contentEditable="true";try{i=document.execCommand("insertText",!1,n)}catch(t){i=!1}t.contentEditable="false"}i&&!t.value.slice(0,t.selectionStart).endsWith(n)&&(i=!1),i||(t.value=a+n+c,t.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))),null!=r&&null!=o?t.setSelectionRange(r,o):t.setSelectionRange(s,t.selectionEnd)}},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.ticking=!1}var e=t.prototype;return e.loop=function(){var t=this;this.ticking||(i((function(){t.update(),t.ticking=!1})),this.ticking=!0)},e.update=function(){this.callback(window.pageYOffset)},e.start=function(){this.active||window.addEventListener("scroll",this.active=this.loop.bind(this),{passive:!0})},e.stop=function(){window.removeEventListener("scroll",this.active),this.active=null},t}()},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.initAttrs=function(e){t.initAttrs.call(this,e),e.className=(e.className||"")+" Checkbox--switch"},e.prototype.getDisplay=function(){return this.attrs.loading?t.prototype.getDisplay.call(this):""},e}(n(46).a)},function(t,e,n){"use strict";e.a=function(t,e){return function(){e(this.getAttribute(t)||this[t])}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(10),r=function(){function t(t,e){this.component=void 0,this.routeName=void 0,this.component=t,this.routeName=e}var e=t.prototype;return e.makeKey=function(){return this.routeName+JSON.stringify(m.route.param())},e.makeAttrs=function(t){return Object(i.a)({},t.attrs,{routeName:this.routeName})},e.onmatch=function(t,e,n){return this.component},e.render=function(t){return[Object(i.a)({},t,{attrs:this.makeAttrs(t),key:this.makeKey()})]},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),r=n(4),o=n(7),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(t){return m("fieldset",{className:this.attrs.className},m("legend",null,this.attrs.label),m("ul",null,Object(o.a)(t.children)))},e}(r.a)},function(t,e,n){"use strict";function i(t,e){return t&&(t===e||t.prototype instanceof e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(25),r=n.n(i),o=n(26);function s(t){var e=r()(t),n=e.format(),i=e.format("LLLL"),s=Object(o.a)(t);return m("time",{pubdate:!0,datetime:n,title:i,"data-humantime":!0},s)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(108),r=n.n(i),o=n(35),s=n(5),a=function(){function t(t,e){this.el=void 0,this.el=document.createElement("textarea"),this.build(t,e)}var e=t.prototype;return e.build=function(t,e){var n=this;this.el.className=e.classNames.join(" "),this.el.disabled=e.disabled,this.el.placeholder=e.placeholder,this.el.value=e.value;var i=function(t){e.inputListeners.forEach((function(t){t()})),t.redraw=!1};this.el.oninput=function(t){e.oninput(n.el.value),i(t)},this.el.onclick=i,this.el.onkeyup=i,this.el.addEventListener("keydown",(function(t){n.keyHandlers(e).toArray().forEach((function(e){return e(t)}))})),t.append(this.el)},e.keyHandlers=function(t){var e=new s.a;return e.add("submit",(function(e){(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&t.onsubmit()})),e},e.moveCursorTo=function(t){this.setSelectionRange(t,t)},e.getSelectionRange=function(){return[this.el.selectionStart,this.el.selectionEnd]},e.getLastNChars=function(t){return this.el.value.slice(Math.max(0,this.el.selectionStart-t),this.el.selectionStart)},e.insertAtCursor=function(t){this.insertAt(this.el.selectionStart,t)},e.insertAt=function(t,e){this.insertBetween(t,t,e)},e.insertBetween=function(t,e,n){this.setSelectionRange(t,e);var i=t+n.length;Object(o.a)(this.el,{text:n,selectionStart:i,selectionEnd:i})},e.replaceBeforeCursor=function(t,e){this.insertBetween(t,this.el.selectionStart,e)},e.setSelectionRange=function(t,e){this.el.setSelectionRange(t,e),this.focus()},e.getCaretCoordinates=function(t){var e=r()(this.el,t);return{top:e.top-this.el.scrollTop,left:e.left}},e.disabled=function(t){this.el.disabled=t},e.focus=function(){this.el.focus()},e.destroy=function(){this.el.remove()},t}()},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.attrs.text))},e}(n(4).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(0),r=n(2),o=n(1),s=n(22),a=n(5),c=n(27),u=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e}(o.a);Object.assign(u.prototype,{title:o.a.attribute("title"),slug:o.a.attribute("slug"),createdAt:o.a.attribute("createdAt",o.a.transformDate),user:o.a.hasOne("user"),firstPost:o.a.hasOne("firstPost"),lastPostedAt:o.a.attribute("lastPostedAt",o.a.transformDate),lastPostedUser:o.a.hasOne("lastPostedUser"),lastPost:o.a.hasOne("lastPost"),lastPostNumber:o.a.attribute("lastPostNumber"),commentCount:o.a.attribute("commentCount"),replyCount:Object(s.a)("commentCount",(function(t){return Math.max(0,t-1)})),posts:o.a.hasMany("posts"),mostRelevantPost:o.a.hasOne("mostRelevantPost"),lastReadAt:o.a.attribute("lastReadAt",o.a.transformDate),lastReadPostNumber:o.a.attribute("lastReadPostNumber"),isUnread:Object(s.a)("unreadCount",(function(t){return!!t})),isRead:Object(s.a)("unreadCount",(function(t){return r.a.session.user&&!t})),hiddenAt:o.a.attribute("hiddenAt",o.a.transformDate),hiddenUser:o.a.hasOne("hiddenUser"),isHidden:Object(s.a)("hiddenAt",(function(t){return!!t})),canReply:o.a.attribute("canReply"),canRename:o.a.attribute("canRename"),canHide:o.a.attribute("canHide"),canDelete:o.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=r.a.session.user;if(t&&t.markedAllAsReadAt()<this.lastPostedAt()){var e=Math.max(0,this.lastPostNumber()-(this.lastReadPostNumber()||0));return Math.min(e,this.commentCount())}return 0},badges:function(){var t=new a.a;return this.isHidden()&&t.add("hidden",m(c.a,{type:"hidden",icon:"fas fa-trash",label:r.a.translator.trans("core.lib.badge.hidden_tooltip")})),t},postIds:function(){var t=this.data.relationships.posts;return t?t.data.map((function(t){return t.id})):[]}})},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(0),r=n(4),o=n(14),s=n(6),a=n(8),c=n(38),u=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.view=function(t){"0"===this.attrs.state&&(this.attrs.state=!1);var e=Object(a.a)(["Checkbox",this.attrs.state?"on":"off",this.attrs.className,this.attrs.loading&&"loading",this.attrs.disabled&&"disabled"]);return m("label",{className:e},m("input",{type:"checkbox",checked:this.attrs.state,disabled:this.attrs.disabled,onchange:Object(c.a)("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display","aria-hidden":"true"},this.getDisplay()),t.children)},n.getDisplay=function(){return this.attrs.loading?m(o.a,{display:"unset",size:"small"}):Object(s.a)(this.attrs.state?"fas fa-check":"fas fa-times")},n.onchange=function(t){this.attrs.onchange&&this.attrs.onchange(t,this)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(41),r=function(){function t(t,e){void 0===e&&(e={}),this.type=t,this.data=e}var e=t.prototype;return e.matches=function(t,e){var n=this;return void 0===e&&(e={}),!!Object(i.a)(this.type,t)&&Object.keys(e).every((function(t){return n.data[t]===e[t]}))},e.get=function(t){return this.data[t]},e.set=function(t,e){this.data[t]=e},t}()},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t,e,n,i){this.status=void 0,this.options=void 0,this.xhr=void 0,this.responseText=void 0,this.response=void 0,this.alert=void 0,this.status=t,this.responseText=e,this.options=n,this.xhr=i;try{this.response=JSON.parse(null!=e?e:"null")}catch(t){this.response=null}this.alert=null}},function(t,e,n){"use strict";function i(t,e,n){(Array.isArray(e)?e:[e]).forEach((function(e){var i=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var o=i?i.apply(this,e):void 0;return n.apply(this,[o].concat(e)),o},Object.assign(t[e],i)}))}function r(t,e,n){(Array.isArray(e)?e:[e]).forEach((function(e){var i=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return n.apply(this,[i.bind(this)].concat(e))},Object.assign(t[e],i)}))}n.r(e),n.d(e,"extend",(function(){return i})),n.d(e,"override",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(0),r=n(2),o=n(4),s=n(3),a=n(16),c=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.view=function(){var t=r.a.history,e=r.a.pane;return m("div",{className:"Navigation ButtonGroup "+(this.attrs.className||""),onmouseenter:e&&e.show.bind(e),onmouseleave:e&&e.onmouseleave.bind(e)},t.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.getBackButton=function(){var t=r.a.history,e=t.getPrevious()||{};return a.a.component({className:"Button Navigation-back Button--icon",href:t.backUrl(),icon:"fas fa-chevron-left",title:e.title,onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),t.back())}})},n.getPaneButton=function(){var t=r.a.pane;return t&&t.active?s.a.component({className:"Button Button--icon Navigation-pin"+(t.pinned?" active":""),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):""},n.getDrawerButton=function(){if(!this.attrs.drawer)return"";var t=r.a.drawer,e=r.a.session.user;return s.a.component({className:"Button Button--icon Navigation-drawer"+(e&&e.newNotificationCount()?" new":""),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars"})},e}(o.a)},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function i(t,e,n,i){var r,o=!1,s=0;function a(){r&&clearTimeout(r)}function c(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var d=this,h=Date.now()-s;function f(){s=Date.now(),n.apply(d,u)}function p(){r=void 0}o||(i&&!r&&f(),a(),void 0===i&&h>t?f():!0!==e&&(r=setTimeout(i?p:f,void 0===i?t-h:t)))}return"boolean"!=typeof e&&(i=n,n=e,e=void 0),c.cancel=function(){a(),o=!0},c}function r(t,e,n){return void 0===n?i(t,e,!1):i(t,n,!1!==e)}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(10);function r(t,e,n){void 0===e&&(e=null),void 0===n&&(n={});var r=Object(i.a)({},n);r.state=r.state||{},r.state.key=Date.now(),m.route.set(t,e,r)}},function(t,e,n){"use strict";(function(e){t.exports=function(){if("object"==typeof globalThis)return globalThis;var t;try{t=this||new Function("return this")()}catch(t){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==e)return e}return t}()}).call(this,n(52))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){this.callbacks=void 0,this.data=void 0;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=e,this.data={},this.needsRebuild()}var e=t.prototype;return e.needsRebuild=function(){var t=this,e=!1;return this.callbacks.forEach((function(n,i){var r=n();r!==t.data[i]&&(t.data[i]=r,e=!0)})),e},e.check=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=this.callbacks.concat(e),this.needsRebuild()},e.invalidate=function(){this.data={}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2);function r(){var t;i.a.forum.attribute("debug")&&(t=console).warn.apply(t,arguments)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n(0),r=n(2),o=n(15),s=n(3),a=n(30),c=n(12),u=n(9),l=n(5),d=n(11),h=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e);var i=this.attrs.user;this.username=Object(d.a)(i.username()||""),this.email=Object(d.a)(i.email()||""),this.isEmailConfirmed=Object(d.a)(i.isEmailConfirmed()||!1),this.setPassword=Object(d.a)(!1),this.password=Object(d.a)(i.password()||""),this.groups={},r.a.store.all("groups").filter((function(t){return-1===[c.a.GUEST_ID,c.a.MEMBER_ID].indexOf(t.id())})).forEach((function(t){return n.groups[t.id()]=Object(d.a)(-1!==i.groups().indexOf(t))}))},n.className=function(){return"EditUserModal Modal--small"},n.title=function(){return r.a.translator.trans("core.lib.edit_user.title")},n.content=function(){var t=this.fields().toArray();return m("div",{className:"Modal-body"},t.length>1?m("div",{className:"Form"},this.fields().toArray()):r.a.translator.trans("core.lib.edit_user.nothing_available"))},n.fields=function(){var t=this,e=new l.a;return r.a.session.user.canEditCredentials()&&(e.add("username",m("div",{className:"Form-group"},m("label",null,r.a.translator.trans("core.lib.edit_user.username_heading")),m("input",{className:"FormControl",placeholder:Object(u.a)(r.a.translator.trans("core.lib.edit_user.username_label")),bidi:this.username,disabled:this.nonAdminEditingAdmin()})),40),r.a.session.user!==this.attrs.user&&(e.add("email",m("div",{className:"Form-group"},m("label",null,r.a.translator.trans("core.lib.edit_user.email_heading")),m("div",null,m("input",{className:"FormControl",placeholder:Object(u.a)(r.a.translator.trans("core.lib.edit_user.email_label")),bidi:this.email,disabled:this.nonAdminEditingAdmin()})),!this.isEmailConfirmed()&&this.userIsAdmin(r.a.session.user)?m("div",null,s.a.component({className:"Button Button--block",loading:this.loading,onclick:this.activate.bind(this)},r.a.translator.trans("core.lib.edit_user.activate_button"))):""),30),e.add("password",m("div",{className:"Form-group"},m("label",null,r.a.translator.trans("core.lib.edit_user.password_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",onchange:function(e){t.setPassword(e.target.checked),m.redraw.sync(),e.target.checked&&t.$("[name=password]").select(),e.redraw=!1},disabled:this.nonAdminEditingAdmin()}),r.a.translator.trans("core.lib.edit_user.set_password_label")),this.setPassword()?m("input",{className:"FormControl",type:"password",name:"password",placeholder:Object(u.a)(r.a.translator.trans("core.lib.edit_user.password_label")),bidi:this.password,disabled:this.nonAdminEditingAdmin()}):"")),20))),r.a.session.user.canEditGroups()&&e.add("groups",m("div",{className:"Form-group EditUserModal-groups"},m("label",null,r.a.translator.trans("core.lib.edit_user.groups_heading")),m("div",null,Object.keys(this.groups).map((function(t){return r.a.store.getById("groups",t)})).map((function(e){return m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:t.groups[e.id()],disabled:e.id()===c.a.ADMINISTRATOR_ID&&(t.attrs.user===r.a.session.user||!t.userIsAdmin(r.a.session.user))}),a.a.component({group:e,label:""})," ",e.nameSingular())})))),10),e.add("submit",m("div",{className:"Form-group"},s.a.component({className:"Button Button--primary",type:"submit",loading:this.loading},r.a.translator.trans("core.lib.edit_user.submit_button"))),-10),e},n.activate=function(){var t=this;this.loading=!0;var e={username:this.username(),isEmailConfirmed:!0};this.attrs.user.save(e,{errorHandler:this.onerror.bind(this)}).then((function(){t.isEmailConfirmed(!0),t.loading=!1,m.redraw()})).catch((function(){t.loading=!1,m.redraw()}))},n.data=function(){var t=this,e={relationships:{}};return this.attrs.user.canEditCredentials()&&!this.nonAdminEditingAdmin()&&(e.username=this.username(),r.a.session.user!==this.attrs.user&&(e.email=this.email()),this.setPassword()&&(e.password=this.password())),this.attrs.user.canEditGroups()&&(e.relationships.groups=Object.keys(this.groups).filter((function(e){return t.groups[e]()})).map((function(t){return r.a.store.getById("groups",t)}))),e},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.attrs.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},n.nonAdminEditingAdmin=function(){return this.userIsAdmin(this.attrs.user)&&!this.userIsAdmin(r.a.session.user)},n.userIsAdmin=function(t){return t.groups().some((function(t){return t.id()===c.a.ADMINISTRATOR_ID}))},e}(o.a)},function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function r(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(10),r=n(2),o=function(){function t(t,e,n){void 0===t&&(t={}),void 0===e&&(e=1),void 0===n&&(n=20),this.location=void 0,this.pageSize=void 0,this.pages=[],this.params={},this.initialLoading=!1,this.loadingPrev=!1,this.loadingNext=!1,this.params=t,this.location={page:e},this.pageSize=n}var e=t.prototype;return e.clear=function(){this.pages=[],m.redraw()},e.loadPrev=function(){var t=this;if(this.loadingPrev||1===this.getLocation().page)return Promise.resolve();this.loadingPrev=!0;var e=this.getPrevPageNumber();return this.loadPage(e).then(this.parseResults.bind(this,e)).finally((function(){return t.loadingPrev=!1}))},e.loadNext=function(){var t=this;if(this.loadingNext)return Promise.resolve();this.loadingNext=!0;var e=this.getNextPageNumber();return this.loadPage(e).then(this.parseResults.bind(this,e)).finally((function(){return t.loadingNext=!1}))},e.parseResults=function(t,e){var n,i=Number(t),r=(null==(n=e.payload)?void 0:n.links)||{},o={number:i,items:e,hasNext:!!r.next,hasPrev:!!r.prev};this.isEmpty()||i>this.getNextPageNumber()-1?this.pages.push(o):this.pages.unshift(o),this.location={page:i},m.redraw()},e.loadPage=function(t){void 0===t&&(t=1);var e=this.requestParams();return e.page=Object(i.a)({offset:this.pageSize*(t-1)},e.page),Array.isArray(e.include)&&(e.include=e.include.join(",")),r.a.store.find(this.type,e)},e.requestParams=function(){return this.params},e.refreshParams=function(t,e){if(this.isEmpty()||this.paramsChanged(t))return this.params=t,this.refresh(e)},e.refresh=function(t){var e=this;return void 0===t&&(t=1),this.initialLoading=!0,this.loadingPrev=!1,this.loadingNext=!1,this.clear(),this.location={page:t},this.loadPage().then((function(t){e.pages=[],e.parseResults(e.location.page,t)})).finally((function(){return e.initialLoading=!1}))},e.getPages=function(){return this.pages},e.getLocation=function(){return this.location},e.isLoading=function(){return this.initialLoading||this.loadingNext||this.loadingPrev},e.isInitialLoading=function(){return this.initialLoading},e.isLoadingPrev=function(){return this.loadingPrev},e.isLoadingNext=function(){return this.loadingNext},e.hasItems=function(){return!!this.getAllItems().length},e.isEmpty=function(){return!this.isInitialLoading()&&!this.hasItems()},e.hasPrev=function(){var t;return!(null==(t=this.pages[0])||!t.hasPrev)},e.hasNext=function(){var t;return!(null==(t=this.pages[this.pages.length-1])||!t.hasNext)},e.getParams=function(){return this.params},e.getNextPageNumber=function(){var t,e=null==(t=this.pages[this.pages.length-1])?void 0:t.number;return e&&!isNaN(e)?e+1:this.location.page},e.getPrevPageNumber=function(){var t,e=null==(t=this.pages[0])?void 0:t.number;return e&&!isNaN(e)?Math.max(e-1,1):this.location.page},e.paramsChanged=function(t){var e=this;return Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))},e.getAllItems=function(){return this.getPages().map((function(t){return t.items})).flat()},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(10),r=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.state.modal;return m("div",{className:"ModalManager modal fade"},!!t&&t.componentClass.component(Object(i.a)({},t.attrs,{animateShow:this.animateShow.bind(this),animateHide:this.animateHide.bind(this),state:this.attrs.state})))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$().on("hidden.bs.modal",this.attrs.state.close.bind(this.attrs.state))},n.animateShow=function(t){if(this.attrs.state.modal){var e=!!this.attrs.state.modal.componentClass.isDismissible;this.$().hasClass("in")?t():this.$().one("shown.bs.modal",t).modal({backdrop:e||"static",keyboard:e}).modal("show")}},n.animateHide=function(){this.$().modal("hide")},e}(n(4).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),r=n(4),o=(n(28),function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.view=function(){var t=this;return m("div",{className:"AlertManager"},Object.entries(this.state.getActiveAlerts()).map((function(e){var n=e[0],i=e[1];return m("div",{className:"AlertManager-alert"},m(i.componentClass,Object.assign({},i.attrs,{ondismiss:t.state.dismiss.bind(t.state,n)}),i.children))})))},e}(r.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}Object(i.a)(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return this.attrs.error.xhr?this.attrs.error.xhr.status+" "+this.attrs.error.xhr.statusText:""},n.content=function(){var t,e=this.attrs,n=e.error,i=e.formattedError;if(i)t=i.join("\n\n");else try{var r=n.response||JSON.parse(n.responseText);t=JSON.stringify(r,null,2)}catch(e){t=n.responseText}return m("div",{className:"Modal-body"},m("pre",null,this.attrs.error.options.method," ",this.attrs.error.options.url,m("br",null),m("br",null),t))},e}(n(15).a)},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}t.exports=function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2),r=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,r){void 0===n&&(n={}),void 0===r&&(r={});var o=n,s=i.a.forum.attribute("apiUrl")+"/"+t;return e instanceof Array?s+="?filter[id]="+e.join(","):"object"==typeof e?o=e:e&&(s+="/"+e),i.a.request(Object.assign({method:"GET",url:s,params:o},r)).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?Object.keys(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";n.d(e,"a",(function(){return r}));var i=n(2),r=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={}),i.a.request(Object.assign({method:"POST",url:i.a.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location=i.a.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){var t=this;$("#content").click((function(e){t.isOpen()&&(e.preventDefault(),t.hide())}))}var e=t.prototype;return e.isOpen=function(){return $("#app").hasClass("drawerOpen")},e.hide=function(){var t=$("#app");if(t.hasClass("drawerOpen")){var e=$("#drawer");e.css("visibility","visible").one("transitionend",(function(){return e.css("visibility","")})),t.removeClass("drawerOpen"),this.$backdrop&&this.$backdrop.remove()}},e.show=function(){var t=this;$("#app").addClass("drawerOpen"),this.$backdrop=$("<div/>").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 r}));var i=n(39);function r(t,e){void 0===e&&(e="");var n={};for(var r in t){var o=t[r];if("resolver"in o)n[e+o.path]=o.resolver;else{if(!("component"in o))throw new Error("Either a resolver or a component must be provided for the route ["+r+"]");var s="resolverClass"in o?o.resolverClass:i.a;n[e+o.path]=new s(o.component,r)}}return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(26);function r(){$("[data-humantime]").each((function(){var t=$(this),e=Object(i.a)(t.attr("datetime"));t.html(e)}))}function o(){setInterval(r,1e4)}},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.apiEndpoint=function(){return"/"},e}(n(1).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(0),r=n(1),o=n(73),s=n(5),a=n(22),c=n(30),u=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e}(r.a);Object.assign(u.prototype,{username:r.a.attribute("username"),slug:r.a.attribute("slug"),displayName:r.a.attribute("displayName"),email:r.a.attribute("email"),isEmailConfirmed:r.a.attribute("isEmailConfirmed"),password:r.a.attribute("password"),avatarUrl:r.a.attribute("avatarUrl"),preferences:r.a.attribute("preferences"),groups:r.a.hasMany("groups"),joinTime:r.a.attribute("joinTime",r.a.transformDate),lastSeenAt:r.a.attribute("lastSeenAt",r.a.transformDate),markedAllAsReadAt:r.a.attribute("markedAllAsReadAt",r.a.transformDate),unreadNotificationCount:r.a.attribute("unreadNotificationCount"),newNotificationCount:r.a.attribute("newNotificationCount"),discussionCount:r.a.attribute("discussionCount"),commentCount:r.a.attribute("commentCount"),canEdit:r.a.attribute("canEdit"),canEditCredentials:r.a.attribute("canEditCredentials"),canEditGroups:r.a.attribute("canEditGroups"),canDelete:r.a.attribute("canDelete"),avatarColor:null,color:Object(a.a)("displayName","avatarUrl","avatarColor",(function(t,e,n){return n?"rgb("+n.join(", ")+")":e?(this.calculateAvatarColor(),""):"#"+Object(o.a)(t)})),isOnline:function(){return dayjs().subtract(5,"minutes").isBefore(this.lastSeenAt())},badges:function(){var t=new s.a,e=this.groups();return e&&e.forEach((function(e){t.add("group"+e.id(),c.a.component({group:e}))})),t},calculateAvatarColor:function(){var t=new Image,e=this;t.onload=function(){try{var t=new ColorThief;e.avatarColor=t.getColor(this)}catch(t){if(!(t instanceof TypeError))throw t;e.avatarColor=[255,255,255]}e.freshness=new Date,m.redraw()},t.crossOrigin="anonymous",t.src=this.avatarUrl()},savePreferences:function(t){var e=this.preferences();return Object.assign(e,t),this.save({preferences:e})}})},function(t,e,n){"use strict";function i(t){for(var e=0,n=0;n<t.length;n++)e+=t.charCodeAt(n);var i=function(t,e,n){var i,r,o,s=Math.floor(6*t),a=6*t-s,c=n*(1-e),u=n*(1-a*e),l=n*(1-(1-a)*e);switch(s%6){case 0:i=n,r=l,o=c;break;case 1:i=u,r=n,o=c;break;case 2:i=c,r=n,o=l;break;case 3:i=c,r=u,o=n;break;case 4:i=l,r=c,o=n;break;case 5:i=n,r=c,o=u}return{r:Math.floor(255*i),g:Math.floor(255*r),b:Math.floor(255*o)}}(e%360/360,.3,.9);return""+i.r.toString(16)+i.g.toString(16)+i.b.toString(16)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),r=n(1),o=n(22),s=n(32),a=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e}(r.a);Object.assign(a.prototype,{number:r.a.attribute("number"),discussion:r.a.hasOne("discussion"),createdAt:r.a.attribute("createdAt",r.a.transformDate),user:r.a.hasOne("user"),contentType:r.a.attribute("contentType"),content:r.a.attribute("content"),contentHtml:r.a.attribute("contentHtml"),renderFailed:r.a.attribute("renderFailed"),contentPlain:Object(o.a)("contentHtml",s.getPlainContent),editedAt:r.a.attribute("editedAt",r.a.transformDate),editedUser:r.a.hasOne("editedUser"),isEdited:Object(o.a)("editedAt",(function(t){return!!t})),hiddenAt:r.a.attribute("hiddenAt",r.a.transformDate),hiddenUser:r.a.hasOne("hiddenUser"),isHidden:Object(o.a)("hiddenAt",(function(t){return!!t})),canEdit:r.a.attribute("canEdit"),canHide:r.a.attribute("canHide"),canDelete:r.a.attribute("canDelete")})},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),r=n(1),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e}(r.a);Object.assign(o.prototype,{contentType:r.a.attribute("contentType"),content:r.a.attribute("content"),createdAt:r.a.attribute("createdAt",r.a.transformDate),isRead:r.a.attribute("isRead"),user:r.a.hasOne("user"),fromUser:r.a.hasOne("fromUser"),subject:r.a.hasOne("subject")})},function(t,e,n){"use strict";e.a=function(t,e){var n=new RegExp("(\\w+\\/)?("+e+"|common)\\/");return new Proxy(t,{get:function(t,e){return t[e]||t[e.replace(n,"$1")]}})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return U}));var i,r=n(64),o=n.n(r),s=n(65),a=n.n(s),c=n(110),u=n.n(c),l=n(111),d=n.n(l),h=n(93),f=n.n(h),p=n(112),v=n.n(p),g=n(48),b=n.n(g);function y(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?y(e):e)}),[])}function w(t){var e={};return function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=i.length?i.map((function(t){return null===t?"null":void 0===t?"undefined":"function"==typeof t?t.toString():t instanceof Date?t.toISOString():JSON.stringify(t)})).join("|"):"_(no-args)_";if(Object.prototype.hasOwnProperty.call(e,o))return e[o];var s=t.apply(void 0,i);return e[o]=s,s}}function x(t){for(var e=function(t){return/\s/.test(t)},n=[],i={},r=0,o=null,s=!1,a=0;a<t.length;){if(s&&(e(t[a])||"{"===t[a]))s=!1,o=t.slice(r,a),"{"===t[a]&&a--;else if(!s&&!e(t[a])){var c="{"===t[a];if(o&&c){var u=N(t,a);if(-1===u)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));i[o]=t.slice(a+1,u),a=u,o=null}else o&&(n.push(o),o=null),s=!0,r=a}a++}return s&&(o=t.slice(r)),o&&n.push(o),{args:n,cases:i}}function N(t,e){for(var n=0,i=e+1;i<t.length;i++){var r=t.charAt(i);if("}"===r){if(0===n)return i;n--}else"{"===r&&n++}return-1}function C(t){return function t(e,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!e)return r;if(1===i)return r.push(e),r;var o=e.indexOf(n);if(-1===o)return r.push(e),r;var s=e.substring(0,o).trim(),a=e.substring(o+n.length+1).trim();return r.push(s),t(a,n,i-1,r)}(t.slice(1,-1),",",3)}function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach((function(e){b()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var S=0;function k(t,e){for(var n=0,i="",r=0,o={};n<t.length;){if("#"!==t[n]||r)i+=t[n];else{var s="__hashToken".concat(S++);i+="{".concat(s,", number}"),o[s]=e}"{"===t[n]?r++:"}"===t[n]&&r--,n++}return{caseBody:i,numberValues:o}}function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=x(e),a=s.args,c=s.cases,u=parseInt(t);a.forEach((function(t){t.startsWith("offset:")&&(u-=parseInt(t.slice("offset:".length)))}));var l=[];if("PluralRules"in Intl){void 0!==i&&i.resolvedOptions().locale===n||(i=new Intl.PluralRules(n));var d=i.select(u);"other"!==d&&l.push(d)}1===u&&l.push("one"),l.push("=".concat(u),"other");for(var h=0;h<l.length;h++){var f=l[h];if(f in c){var p=k(c[f],u),m=p.caseBody,v=p.numberValues;return o(m,O(O({},r),v))}}return t}function A(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=x(e),o=r.cases;return t in o?i(o[t],n):"other"in o?i(o.other,n):t}function E(t,e,n){return"<".concat(t,">").concat(n,"</").concat(t,">")}function P(t,e,n){var i=[];return _(t,0,0,i,(function(r,o,s,a,c,u){if(o)return{break:!0};var l=function(t,e,n,i){var r,o=1;return _(t,n,i,[],(function(t,n,i,s,a,c){if(i===e&&(n?o--:o++,0===o))return r={segmentIndex:s,segmentStart:c,segmentEnd:a},{exit:!0};return{exit:!1}})),r}(t,s,a,c);if(!l)throw new Error("Unbalanced tags: no closing tag found for <".concat(s,">"));var d=l.segmentIndex===a,h=t[l.segmentIndex],f=[];if(d)f.push(r.slice(c+1,l.segmentStart));else{f.push(r.slice(c+1));for(var p=a+1;p<l.segmentIndex;p++)f.push(t[p]);f.push(h.slice(0,l.segmentStart))}return i.push(r.slice(0,u)),i.push(n(s,e,P(f.filter((function(t){return""!==t})),e,n))),t.splice(l.segmentIndex+1,0,h.slice(l.segmentEnd+1)),{processedSegment:!0,newSegmentIndex:l.segmentIndex,break:!0}})),i.filter((function(t){return""!==t}))}function _(t,e,n,i,r){for(var o,s=e;s<t.length;s++){var a=t[s];if("string"==typeof a){for(var c=!1,u=null,l=!1,d=!1,h=s===e?n:0;h<a.length;h++)if(l||"<"!==a[h])if(l&&">"===a[h]){var f=a.slice(u+1+c,h),p=r(a,c,f,s,h,u);if(p.exit)return;if(p.newSegmentIndex&&(s=p.newSegmentIndex),p.processedSegment&&(d=!0),p.break)break;c=!1,u=null,l=!1}else l&&(o=a[h],!/[a-zA-Z-_]/.test(o))&&(c=!1,u=null,l=!1);else u=h,l=!0,"/"===a[h+1]&&(c=!0,h++);d||i.push(a)}else i.push(a)}}function D(t){return Object.keys(t).reduce((function(e,n){return e[n]=$(t[n]),e}),{})}function $(t){return"string"==typeof t||t instanceof String?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):Array.isArray(t)?t.map($):t}function I(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=f()(t);if(e){var r=f()(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return d()(this,n)}}var M=function(t){u()(n,t);var e=I(n);function n(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return o()(this,n),(i=e.call(this,t,r)).richHandler=s||E,i}return a()(n,[{key:"rich",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=D(e),i=y(this.process(t,n));return P(i,n,this.richHandler)}}]),n}(function(){function t(e){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o()(this,t),b()(this,"format",w((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return y(n.process(t,e)).join("")}))),this.locale=e,this.typeHandlers=i}return a()(t,[{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return[];var n=t.indexOf("{");if(-1!==n){var i=N(t,n);if(-1===i)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));var r=t.substring(n,i+1);if(r){var o=[],s=t.substring(0,n);s&&o.push(s);var a=C(r),c=v()(a,3),u=c[0],l=c[1],d=c[2],h=e[u];null==h&&(h="");var f=l&&this.typeHandlers[l];o.push(f?f(h,d,this.locale,e,this.process.bind(this)):h);var p=t.substring(i+1);return p&&o.push(this.process(p,e)),o}}return[t]}}]),t}());function L(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function R(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?L(Object(n),!0).forEach((function(e){b()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function H(t,e,n){var i=e[t]||m(t),r=m.fragment(n).children;return R(R({},i),{},{children:r})}var B=n(21),F=n(20),U=function(){function t(){this.translations={},this.formatter=new M(null,this.formatterTypeHandlers(),H)}var e=t.prototype;return e.setLocale=function(t){this.formatter.locale=t},e.addTranslations=function(t){Object.assign(this.translations,t)},e.formatterTypeHandlers=function(){return{plural:j,select:A}},e.preprocessParameters=function(t){if("user"in t){var e=Object(F.a)(t,"user");t.username||(t.username=Object(B.a)(e))}return t},e.trans=function(t,e){void 0===e&&(e={});var n=this.translations[t];return n?(e=this.preprocessParameters(e),this.formatter.rich(n,e)):t},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return I}));var i=n(10),r=n(59),o=n(2),s=n(5),a=n(3),c=n(61),u=n(62),l=n(63),d=n(77),h=n(66),f=n(67),p=n(20),v=n(68),g=n(69),b=n(49),y=n(36),w=n(70),x=n(50),N=n(71),C=n(72),T=n(45),O=n(74),S=n(12),k=n(75),j=n(47),A=n(15),E=function(){function t(){this.modal=null,this.closeTimeout=void 0}var e=t.prototype;return e.show=function(t,e){if(void 0===e&&(e={}),!(t.prototype instanceof A.a)){throw console.error("The ModalManager can only show Modals."),new Error("The ModalManager can only show Modals.")}clearTimeout(this.closeTimeout),this.modal={componentClass:t,attrs:e},m.redraw.sync()},e.close=function(){var t=this;this.modal&&(this.closeTimeout=setTimeout((function(){t.modal=null,m.redraw()})))},e.isModalOpen=function(){return!!this.modal},t}(),P=n(28),_=function(){function t(){this.activeAlerts={},this.alertId=0}var e=t.prototype;return e.getActiveAlerts=function(){return this.activeAlerts},e.show=function(t,e,n){var i,r=P.a,o={};return 1==arguments.length?i=t:2==arguments.length?(o=t,i=e):3==arguments.length&&(r=t,o=e,i=n),this.activeAlerts[++this.alertId]={children:i,attrs:o,componentClass:r},m.redraw(),this.alertId},e.dismiss=function(t){t&&t in this.activeAlerts&&(delete this.activeAlerts[t],m.redraw())},e.clear=function(){this.activeAlerts={},m.redraw()},t}();function D(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return $(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var I=function(){function t(){this.forum=void 0,this.routes={},this.initializers=new s.a,this.session=void 0,this.translator=new d.a,this.store=new h.a({forums:N.a,users:C.a,discussions:T.a,posts:O.a,groups:S.a,notifications:k.a}),this.cache={},this.booted=!1,this.current=new j.a(null),this.previous=new j.a(null),this.modal=new E,this.alerts=new _,this.drawer=void 0,this.data=void 0,this._title="",this._titleCount=0,this.requestErrorAlert=null,this.initialRoute=void 0}var e=t.prototype;return e.load=function(t){this.data=t,this.translator.setLocale(t.locale)},e.boot=function(){var t=this;this.initializers.toArray().forEach((function(e){return e(t)})),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(),this.initialRoute=window.location.href},e.bootExtensions=function(t){var e=this;Object.keys(t).forEach((function(n){var i=t[n];if(i.extend)for(var r,o=D(i.extend.flat(1/0));!(r=o()).done;){r.value.extend(e,{name:n,exports:i})}}))},e.mount=function(t){var e=this;void 0===t&&(t=""),m.mount(document.getElementById("modal"),{view:function(){return c.a.component({state:e.modal})}}),m.mount(document.getElementById("alerts"),{view:function(){return u.a.component({state:e.alerts})}}),this.drawer=new v.a,m.route(document.getElementById("content"),t+"/",Object(g.a)(this.routes,t));var n=document.getElementById("app"),i=document.querySelector(".App-header"),r=new y.a((function(t){var e=n.getBoundingClientRect().top+document.body.scrollTop;n.classList.toggle("affix",t>=e),n.classList.toggle("scrolled",t>e),i.classList.toggle("navbar-fixed-top",t>=e)}));r.start(),r.update(),document.body.classList.add("ontouchstart"in window?"touch":"no-touch"),Object(w.a)()},e.preloadedApiDocument=function(){if(this.data.apiDocument&&window.location.href===this.initialRoute){var t=this.store.pushPayload(this.data.apiDocument);return this.data.apiDocument=null,t}return null},e.screen=function(){return getComputedStyle(document.documentElement).getPropertyValue("--flarum-screen")},e.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){var t=this.titleCount?"("+this.titleCount+") ":"",e=this.title&&m.route.get()!==this.forum.attribute("basePath")+"/"?this.title+" - ":"",n=this.forum.attribute("title");document.title=t+e+n},e.request=function(t){var e=this,n=Object(i.a)({},t);if(n.background||(n.background=!0),Object(x.extend)(n,"config",(function(t,n){n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),n.method&&!["GET","POST"].includes(n.method)){var r=n.method;Object(x.extend)(n,"config",(function(t,e){e.setRequestHeader("X-HTTP-Method-Override",r)})),n.method="POST"}n.deserialize||(n.deserialize=function(t){return t}),n.errorHandler||(n.errorHandler=function(t){throw t});var s=n.modifyText||n.extract;return n.extract=function(t){var e;e=s?s(t.responseText):t.responseText||null;var i=t.status;if(i<200||i>299)throw new b.a(""+i,""+e,n,t);if(t.getResponseHeader){var r=t.getResponseHeader("X-CSRF-Token");r&&(o.a.session.csrfToken=r)}try{return JSON.parse(e)}catch(i){throw new b.a("500",""+e,n,t)}},this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),m.request(n).then((function(t){return t}),(function(t){var i;switch(t.status){case 422:i=t.response.errors.map((function(t){return[t.detail,m("br",null)]})).flat().slice(0,-1);break;case 401:case 403:i=o.a.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:i=o.a.translator.trans("core.lib.error.not_found_message");break;case 413:i=o.a.translator.trans("core.lib.error.payload_too_large_message");break;case 429:i=o.a.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:i=o.a.translator.trans("core.lib.error.generic_message")}var r=o.a.forum.attribute("debug"),s=t.response&&t.response.errors,c=Array.isArray(s)&&s[0]&&s[0].detail&&s.map((function(t){return decodeURI(t.detail)}));t.alert={type:"error",content:i,controls:r&&[m(a.a,{className:"Button Button--link",onclick:e.showDebug.bind(e,t,c)},o.a.translator.trans("core.lib.debug_button"))]};try{n.errorHandler(t)}catch(t){if(r&&t.xhr){var u,l=t.options,d=l.method,h=l.url,f=t.xhr.status,p=void 0===f?"":f;console.group(d+" "+h+" "+p),(u=console).error.apply(u,c||[t]),console.groupEnd()}e.requestErrorAlert=e.alerts.show(t.alert,t.alert.content)}return Promise.reject(t)}))},e.showDebug=function(t,e){null!==this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),this.modal.show(l.a,{error:t,formattedError:e})},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var i=n.path.replace(/:([^\/]+)/g,(function(t,n){return""+Object(p.a)(e,n)}));for(var r in e)e.hasOwnProperty(r)&&!e[r]&&delete e[r];var o=m.buildQueryString(e);return(""===m.route.prefix?this.forum.attribute("basePath"):"")+i+(o?"?"+o:"")},Object(r.a)(t,[{key:"title",get:function(){return this._title},set:function(t){this._title=t}},{key:"titleCount",get:function(){return this._titleCount},set:function(t){this._titleCount=t}}]),t}()},function(t,e,n){"use strict";function i(t,e){var n="select"===t.tag?t.attrs.multi?"multi":"select":t.attrs.type;return t.attrs.onchange="multi"===n?function(){e([].slice.call(this.selectedOptions,(function(t){return t.value})))}:"select"===n?function(t){e(this.selectedOptions[0].value)}:"checkbox"===n?function(t){e(this.checked)}:t.attrs.oninput=function(t){e(this.value)},"select"===t.tag?t.children.forEach((function(t){t.attrs.value!==e()&&t.children[0]!==e()||(t.attrs.selected=!0)})):"checkbox"===n?t.attrs.checked=e():"radio"===n?t.attrs.checked=e()===t.attrs.value:t.attrs.value=e(),t.attrs.bidi=null,t}n.d(e,"a",(function(){return o})),i.view=function(t,e,n){return i(e,e.attrs.bidi)};var r=i;function o(t){var e=t.m,n=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var s=e.apply(this,arguments);return s.attrs||(s.attrs={}),s.attrs.bidi&&r(s,s.attrs.bidi),s};Object.keys(e).forEach((function(t){return n[t]=e[t]})),t.m=n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2);function r(t){return t>=1e6?Math.floor(t/1e6)+i.a.translator.trans("core.lib.number_suffix.mega_text"):t>=1e3?(t/1e3).toFixed(1)+i.a.translator.trans("core.lib.number_suffix.kilo_text"):t.toString()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2);function r(t,e){return void 0===e&&(e=i.a.data.locale),new Intl.NumberFormat(e).format(t)}},function(t,e,n){"use strict";var i=n(100);t.exports=n(125)(i,requestAnimationFrame,console)},function(t,e,n){"use strict";var i=n(101),r=n(102);t.exports=function(t,e){if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Template parameter names *must* be separated");if(null==e)return t;var n=t.indexOf("?"),o=t.indexOf("#"),s=o<0?t.length:o,a=n<0?s:n,c=t.slice(0,a),u={};r(u,e);var l=c.replace(/:([^\/\.-]+)(\.{3})?/g,(function(t,n,i){return delete u[n],null==e[n]?t:i?e[n]:encodeURIComponent(String(e[n]))})),d=l.indexOf("?"),h=l.indexOf("#"),f=h<0?l.length:h,p=d<0?f:d,m=l.slice(0,p);n>=0&&(m+=t.slice(n,s)),d>=0&&(m+=(n<0?"?":"&")+l.slice(d,f));var v=i(u);return v&&(m+=(n<0&&d<0?"?":"&")+v),o>=0&&(m+=t.slice(o)),h>=0&&(m+=(o<0?"":"&")+l.slice(h)),m}},function(t,e,n){"use strict";var i=n(103);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),r=n<0?t.length:n,o=e<0?r:e,s=t.slice(0,o).replace(/\/{2,}/g,"/");return s?("/"!==s[0]&&(s="/"+s),s.length>1&&"/"===s[s.length-1]&&(s=s.slice(0,-1))):s="/",{path:s,params:e<0?{}:i(t.slice(e+1,r))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n(0),r=n(2),o=n(4),s=n(5),a=n(7),c=n(3),u=n(43),l=n(24),d=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.value=this.attrs.value||"",this.disabled=!!this.attrs.disabled},n.view=function(){return m("div",{className:"TextEditor"},m("div",{className:"TextEditor-editorContainer"}),m("ul",{className:"TextEditor-controls Composer-footer"},Object(a.a)(this.controlItems().toArray()),m("li",{className:"TextEditor-toolbar"},this.toolbarItems().toArray())))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.attrs.composer.editor=this.buildEditor(this.$(".TextEditor-editorContainer")[0])},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=!!this.attrs.disabled;this.disabled!==n&&(this.disabled=n,this.attrs.composer.editor.disabled(n))},n.buildEditorParams=function(){var t=this;return{classNames:["FormControl","Composer-flexible","TextEditor-editor"],disabled:this.disabled,placeholder:this.attrs.placeholder||"",value:this.value,oninput:this.oninput.bind(this),inputListeners:[],onsubmit:function(){t.onsubmit(),m.redraw()}}},n.buildEditor=function(t){return new u.a(t,this.buildEditorParams())},n.controlItems=function(){var t=new s.a;return t.add("submit",c.a.component({icon:"fas fa-paper-plane",className:"Button Button--primary",itemClassName:"App-primaryControl",onclick:this.onsubmit.bind(this)},this.attrs.submitLabel)),this.attrs.preview&&t.add("preview",m(l.a,{text:r.a.translator.trans("core.forum.composer.preview_tooltip")},m(c.a,{icon:"far fa-eye",className:"Button Button--icon",onclick:this.attrs.preview}))),t},n.toolbarItems=function(){return new s.a},n.oninput=function(t){this.value=t,this.attrs.onchange(this.value)},n.onsubmit=function(){this.attrs.onsubmit(this.value)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=/[.*+?^${}()|[\]\\]/g;function r(t){return t.replace(i,"\\$&")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),r=n(18),o=n(3),s=n(6),a=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className+=" Dropdown--split",e.menuClassName+=" Dropdown-menu--right"};var n=e.prototype;return n.getButton=function(t){var e=this.getFirstChild(t),n=Object.assign({},e.attrs);return n.className=(n.className||"")+" SplitDropdown-button Button "+this.attrs.buttonClassName,[o.a.component(n,e.children),m("button",{className:"Dropdown-toggle Button Button--icon "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown"},Object(s.a)(this.attrs.icon,{className:"Button-icon"}),Object(s.a)("fas fa-caret-down",{className:"Button-caret"}))]},n.getFirstChild=function(t){for(var e=t;e instanceof Array;)e=e[0];return e},e}(r.a)},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){"use strict";n.d(e,"a",(function(){return r}));var i=n(6);function r(t){if(t.lastSeenAt()&&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 o}));var i=n(25),r=n.n(i);function o(t){var e=r()(t),n=e.format(),i=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},i)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n(17),r=n(0),o=n(4),s=n(6),a=n(38),c=n(8),u=["className","class"],l=["options","onchange","value","disabled","className","class","wrapperAttrs"],d=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(){var t=this.attrs,e=t.options,n=t.onchange,r=t.value,o=t.disabled,d=t.className,h=t.class,f=t.wrapperAttrs,p=(f=void 0===f?{}:f).className,v=f.class,g=Object(i.a)(f,u),b=Object(i.a)(t,l);return m("span",Object.assign({className:Object(c.a)("Select",p,v)},g),m("select",Object.assign({className:Object(c.a)("Select-input FormControl",d,h),onchange:n?Object(a.a)("value",n.bind(this)):void 0,value:r,disabled:o},b),Object.keys(e).map((function(t){return m("option",{value:t},e[t])}))),Object(s.a)("fas fa-sort",{className:"Select-caret"}))},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2);function r(t){if(2===t.length)return i.a.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,i.a.translator.trans("core.lib.series.glue_text")])}),[]).slice(0,-1);return i.a.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t}},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},,function(t,e,n){"use strict";var i=n(29),r=n(96),o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,s={},a={}.hasOwnProperty;function c(t){for(var e in t)if(a.call(t,e))return!1;return!0}function u(t){for(var e,n="div",i=[],r={};e=o.exec(t);){var a=e[1],c=e[2];if(""===a&&""!==c)n=c;else if("#"===a)r.id=c;else if("."===a)i.push(c);else if("["===e[3][0]){var u=e[6];u&&(u=u.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?i.push(u):r[e[4]]=""===u?u:u||!0}}return i.length>0&&(r.className=i.join(" ")),s[t]={tag:n,attrs:r}}function l(t,e){var n=e.attrs,r=i.normalizeChildren(e.children),o=a.call(n,"class"),s=o?n.class:n.className;if(e.tag=t.tag,e.attrs=null,e.children=void 0,!c(t.attrs)&&!c(n)){var u={};for(var l in n)a.call(n,l)&&(u[l]=n[l]);n=u}for(var l in t.attrs)a.call(t.attrs,l)&&"className"!==l&&!a.call(n,l)&&(n[l]=t.attrs[l]);for(var l in null==s&&null==t.attrs.className||(n.className=null!=s?null!=t.attrs.className?String(t.attrs.className)+" "+String(s):s:null!=t.attrs.className?t.attrs.className:null),o&&(n.class=null),n)if(a.call(n,l)&&"key"!==l){e.attrs=n;break}return Array.isArray(r)&&1===r.length&&null!=r[0]&&"#"===r[0].tag?e.text=r[0].children:e.children=r,e}t.exports=function(t){if(null==t||"string"!=typeof t&&"function"!=typeof t&&"function"!=typeof t.view)throw Error("The selector must be either a string or a component.");var e=r.apply(1,arguments);return"string"==typeof t&&(e.children=i.normalizeChildren(e.children),"["!==t)?l(s[t]||u(t),e):(e.tag=t,e)}},function(t,e,n){"use strict";var i=n(29);t.exports=function(){var t,e=arguments[this],n=this+1;if(null==e?e={}:("object"!=typeof e||null!=e.tag||Array.isArray(e))&&(e={},n=this),arguments.length===n+1)t=arguments[n],Array.isArray(t)||(t=[t]);else for(t=[];n<arguments.length;)t.push(arguments[n++]);return i("",e.key,e,t)}},function(t,e,n){"use strict";(function(e){var i=n(98);"undefined"!=typeof window?(void 0===window.Promise?window.Promise=i:window.Promise.prototype.finally||(window.Promise.prototype.finally=i.prototype.finally),t.exports=window.Promise):void 0!==e?(void 0===e.Promise?e.Promise=i:e.Promise.prototype.finally||(e.Promise.prototype.finally=i.prototype.finally),t.exports=e.Promise):t.exports=i}).call(this,n(52))},function(t,e,n){"use strict";(function(e){var n=function t(n){if(!(this instanceof t))throw new Error("Promise must be called with `new`");if("function"!=typeof n)throw new TypeError("executor must be a function");var i=this,r=[],o=[],s=l(r,!0),a=l(o,!1),c=i._instance={resolvers:r,rejectors:o},u="function"==typeof e?e:setTimeout;function l(t,e){return function n(s){var l;try{if(!e||null==s||"object"!=typeof s&&"function"!=typeof s||"function"!=typeof(l=s.then))u((function(){e||0!==t.length||console.error("Possible unhandled promise rejection:",s);for(var i=0;i<t.length;i++)t[i](s);r.length=0,o.length=0,c.state=e,c.retry=function(){n(s)}}));else{if(s===i)throw new TypeError("Promise can't be resolved w/ itself");d(l.bind(s))}}catch(t){a(t)}}}function d(t){var e=0;function n(t){return function(n){e++>0||t(n)}}var i=n(a);try{t(n(s),i)}catch(t){i(t)}}d(n)};n.prototype.then=function(t,e){var i,r,o=this._instance;function s(t,e,n,s){e.push((function(e){if("function"!=typeof t)n(e);else try{i(t(e))}catch(t){r&&r(t)}})),"function"==typeof o.retry&&s===o.state&&o.retry()}var a=new n((function(t,e){i=t,r=e}));return s(t,o.resolvers,i,!0),s(e,o.rejectors,r,!1),a},n.prototype.catch=function(t){return this.then(null,t)},n.prototype.finally=function(t){return this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){return n.reject(e)}))}))},n.resolve=function(t){return t instanceof n?t:new n((function(e){e(t)}))},n.reject=function(t){return new n((function(e,n){n(t)}))},n.all=function(t){return new n((function(e,n){var i=t.length,r=0,o=[];if(0===t.length)e([]);else for(var s=0;s<t.length;s++)!function(s){function a(t){r++,o[s]=t,r===i&&e(o)}null==t[s]||"object"!=typeof t[s]&&"function"!=typeof t[s]||"function"!=typeof t[s].then?a(t[s]):t[s].then(a,n)}(s)}))},n.race=function(t){return new n((function(e,n){for(var i=0;i<t.length;i++)t[i].then(e,n)}))},t.exports=n}).call(this,n(99).setImmediate)},function(t,e,n){(function(t){var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(122),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(52))},function(t,e,n){"use strict";t.exports=n(124)(window)},function(t,e,n){"use strict";t.exports=function(t){if("[object Object]"!==Object.prototype.toString.call(t))return"";var e=[];for(var n in t)i(n,t[n]);return e.join("&");function i(t,n){if(Array.isArray(n))for(var r=0;r<n.length;r++)i(t+"["+r+"]",n[r]);else if("[object Object]"===Object.prototype.toString.call(n))for(var r in n)i(t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+(null!=n&&""!==n?"="+encodeURIComponent(n):""))}}},function(t,e,n){"use strict";t.exports=Object.assign||function(t,e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))}},function(t,e,n){"use strict";t.exports=function(t){if(""===t||null==t)return{};"?"===t.charAt(0)&&(t=t.slice(1));for(var e=t.split("&"),n={},i={},r=0;r<e.length;r++){var o=e[r].split("="),s=decodeURIComponent(o[0]),a=2===o.length?decodeURIComponent(o[1]):"";"true"===a?a=!0:"false"===a&&(a=!1);var c=s.split(/\]\[?|\[/),u=i;s.indexOf("[")>-1&&c.pop();for(var l=0;l<c.length;l++){var d=c[l],h=c[l+1],f=""==h||!isNaN(parseInt(h,10));if(""===d)null==n[s=c.slice(0,l).join()]&&(n[s]=Array.isArray(u)?u.length:0),d=n[s]++;else if("__proto__"===d)break;if(l===c.length-1)u[d]=a;else{var p=Object.getOwnPropertyDescriptor(u,d);null!=p&&(p=p.value),null==p&&(u[d]=p=f?[]:{}),u=p}}}return i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return h.a}));var i={};n.r(i),n.d(i,"Model",(function(){return u})),n.d(i,"PostTypes",(function(){return l})),n.d(i,"Routes",(function(){return d}));n(114),n(116),n(130),n(131),n(132),n(133),n(134),n(135),n(136);var r=n(105),o=n.n(r),s=n(106),a=n.n(s),c=n(79),u=function(){function t(t,e){void 0===e&&(e=null),this.type=void 0,this.attributes=[],this.hasOnes=[],this.hasManys=[],this.type=t,this.model=e}var e=t.prototype;return e.attribute=function(t){return this.attributes.push(t),this},e.hasOne=function(t){return this.hasOnes.push(t),this},e.hasMany=function(t){return this.hasManys.push(t),this},e.extend=function(t,e){this.model&&(t.store.models[this.type]=this.model);var n=t.store.models[this.type];this.attributes.forEach((function(t){return n.prototype[t]=n.attribute(t)})),this.hasOnes.forEach((function(t){return n.prototype[t]=n.hasOne(t)})),this.hasManys.forEach((function(t){return n.prototype[t]=n.hasMany(t)}))},t}(),l=function(){function t(){this.postComponents={}}var e=t.prototype;return e.add=function(t,e){return this.postComponents[t]=e,this},e.extend=function(t,e){Object.assign(t.postComponents,this.postComponents)},t}(),d=function(){function t(){this.routes={}}var e=t.prototype;return e.add=function(t,e,n){return this.routes[t]={path:e,component:n},this},e.extend=function(t,e){Object.assign(t.routes,this.routes)},t}(),h=n(2);n(137);dayjs.extend(o.a),dayjs.extend(a.a),Object(c.a)(window);var f=$.fn.tooltip;$.fn.tooltip=function(t,e){["DANGEROUS_tooltip_jquery_fn_deprecation_exempt"].includes(e)||console.warn("Calling `$.tooltip` is now deprecated. Please use the `<Tooltip>` component exposed by flarum/core instead. `$.tooltip` may be removed in a future version of Flarum.\n\nIf this component doesn't meet your requirements, please open an issue: https://github.com/flarum/core/issues/new?assignees=davwheat&labels=type/bug,needs-verification&template=bug-report.md&title=Tooltip%20component%20unsuitable%20for%20use%20case"),f.bind(this)(t)}},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){t=t||{};var i=e.prototype,r={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o(t,e,n,r){return i.fromToBase(t,e,n,r)}n.en.relativeTime=r,i.fromToBase=function(e,i,o,s,a){for(var c,u,l,d=o.$locale().relativeTime||r,h=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],f=h.length,p=0;p<f;p+=1){var m=h[p];m.d&&(c=s?n(e).diff(o,m.d,!0):o.diff(e,m.d,!0));var v=(t.rounding||Math.round)(Math.abs(c));if(l=c>0,v<=m.r||!m.r){v<=1&&p>0&&(m=h[p-1]);var g=d[m.l];a&&(v=a(""+v)),u="string"==typeof g?g.replace("%d",v):g(v,i,m.l,l);break}}if(i)return u;var b=l?d.future:d.past;return"function"==typeof b?b(u):b.replace("%s",u)},i.to=function(t,e){return o(t,e,this,!0)},i.from=function(t,e){return o(t,e,this)};var s=function(t){return t.$u?n.utc():n()};i.toNow=function(t){return this.to(s(this),t)},i.fromNow=function(t){return this.from(s(this),t)}}}()},function(t,e,n){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(e,n,i){var r=n.prototype,o=r.format;i.en.formats=t,r.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,i=function(e,n){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,i,r){var o=r&&r.toUpperCase();return i||n[r]||t[r]||n[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))}(e,void 0===n?{}:n);return o.call(this,i)}}}()},function(t,e,n){"use strict";function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return i}))},function(t,e,n){!function(){var e=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n="undefined"!=typeof window,i=n&&null!=window.mozInnerScreenX;function r(t,r,o){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var s=o&&o.debug||!1;if(s){var a=document.querySelector("#input-textarea-caret-position-mirror-div");a&&a.parentNode.removeChild(a)}var c=document.createElement("div");c.id="input-textarea-caret-position-mirror-div",document.body.appendChild(c);var u=c.style,l=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,d="INPUT"===t.nodeName;u.whiteSpace="pre-wrap",d||(u.wordWrap="break-word"),u.position="absolute",s||(u.visibility="hidden"),e.forEach((function(t){d&&"lineHeight"===t?u.lineHeight=l.height:u[t]=l[t]})),i?t.scrollHeight>parseInt(l.height)&&(u.overflowY="scroll"):u.overflow="hidden",c.textContent=t.value.substring(0,r),d&&(c.textContent=c.textContent.replace(/\s/g," "));var h=document.createElement("span");h.textContent=t.value.substring(r)||".",c.appendChild(h);var f={top:h.offsetTop+parseInt(l.borderTopWidth),left:h.offsetLeft+parseInt(l.borderLeftWidth),height:parseInt(l.lineHeight)};return s?h.style.backgroundColor="#aaa":document.body.removeChild(c),f}void 0!==t.exports?t.exports=r:n&&(window.getCaretCoordinates=r)}()},function(t,e,n){"use strict";t.exports=n(138)},function(t,e,n){var i=n(139);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var i=n(140).default,r=n(141);t.exports=function(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return r(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var i=n(142),r=n(143),o=n(144),s=n(146);t.exports=function(t,e){return i(t)||r(t,e)||o(t,e)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){"use strict";var i={};n.r(i),n.d(i,"throttle",(function(){return k.b})),n.d(i,"debounce",(function(){return k.a}));var r=n(50),o=n(67),s=n(66),a=n(43),c={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;r<n;r++)i[r-1]=arguments[r];this.getHandlers(t).forEach((function(t){return t.apply(e,i)}))},on:function(t,e){this.getHandlers(t).push(e)},one:function(t,e){this.getHandlers(t).push((function n(){e.apply(this,arguments),this.off(t,n)}))},off:function(t,e){var n=this.getHandlers(t),i=n.indexOf(e);-1!==i&&n.splice(i,1)}},u=n(70),l=n(5),d=n(0);var h=n(26),f=n(22),p=n(35),v={prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,trimFirst:!1};function g(t){return t.trim().split("\n").length>1}function b(t,e){return Array(e+1).join(t)}function y(t,e,n){for(var i=e,r=n?/\n/:/\s/;t[i]&&!t[i].match(r);)i++;return i}function w(t){var e,n,i=t.value.slice(0,t.selectionStart),r=t.value.slice(t.selectionEnd),o=i.match(/\n*$/),s=r.match(/^\n*/),a=o?o[0].length:0,c=s?s[0].length:0;return i.match(/\S/)&&a<2&&(e=b("\n",2-a)),r.match(/\S/)&&c<2&&(n=b("\n",2-c)),null==e&&(e=""),null==n&&(n=""),{newlinesToAppend:e,newlinesToPrepend:n}}var x=n(68),N=n(88),C=n(49),T=n(80),O=n(86),S=n(32),k=n(53),j=n(11),A=n(56),E=n(54),P=n(20),_=n(36),D=n(73),I=n(41),M=n(79),L=n(76),R=n(8),H=n(9),B=n(81),F=n(69),U=n(38),q=n(75),z=n(72),W=n(74),V=n(45),Y=n(12),G=n(71),K=n(4),X=n(77),J=n(62),Q=n(31),Z=n(37),tt=n(27),et=n(14),nt=n(44),it=n(23),rt=n(18),ot=n(87),st=n(63),at=n(40),ct=n(91),ut=n(51),lt=n(28),dt=n(13),ht=n(16),ft=n(46),pt=n(33),mt=n(61),vt=n(3),gt=n(15),bt=n(30),yt=n(85),wt=n(24),xt=function(t){function e(){return t.apply(this,arguments)||this}return Object(d.a)(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return m(wt.a,{text:this.attrs.tooltipText||Object(H.a)(e.children)},n)},e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=e.className||"Button Button--icon Button--link",e.tooltipText=e.title},e}(vt.a),Nt=n(58),Ct=n(1),Tt=n(78),Ot=n(90),St=n(19),kt=n(6),jt=n(42),At=n(92),Et=n(34),Pt=n(21),_t=n(89),Dt=n(7),$t=function(){function t(){this.element=void 0}var e=t.prototype;return e.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),e.render=function(){var t=this,e=this.view();e.attrs=e.attrs||{};var n=e.attrs.oncreate;return e.attrs.oncreate=function(e){t.element=e.dom,n&&n.apply(t,[e])},e},t}(),It=n(39),Mt=n(60);e.a={extend:r,Session:o.a,Store:s.a,"utils/BasicEditorDriver":a.a,"utils/evented":c,"utils/liveHumanTimes":u.a,"utils/ItemList":l.a,"utils/mixin":function(t){for(var e=function(t){function e(){return t.apply(this,arguments)||this}return Object(d.a)(e,t),e}(t),n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.forEach((function(t){Object.assign(e.prototype,t)})),e},"utils/humanTime":h.a,"utils/computed":f.a,"utils/insertText":p.a,"utils/styleSelectedText":function(t,e){t.focus(),e=Object.assign({},v,e);var n,i=t.value.slice(t.selectionStart,t.selectionEnd);n=e.orderedList?function(t){var e,n,i,r,o=/^\d+\.\s+/,s=t.selectionStart===t.selectionEnd,a=t.value.slice(t.selectionStart,t.selectionEnd),c=a,u=a.split("\n");if(s){var l=t.value.slice(0,t.selectionStart).split(/\n/);i=t.selectionStart-l[l.length-1].length,r=y(t.value,t.selectionStart,!0),c=t.value.slice(i,r)}var d=c.split("\n");if(d.every((function(t){return o.test(t)}))){if(u=d.map((function(t){return t.replace(o,"")})),a=u.join("\n"),s&&i&&r){var h=d[0].length-u[0].length;n=e=t.selectionStart-h,t.selectionStart=i,t.selectionEnd=r}}else{u=function(t){var e,n,i,r=[];for(i=e=0,n=t.length;e<n;i=++e){var o=t[i];r.push(i+1+". "+o)}return r}(u),a=u.join("\n");var f=w(t),p=f.newlinesToAppend,m=f.newlinesToPrepend;n=t.selectionStart+p.length,e=n+a.length,s&&(n=e),a=p+a+m}return{text:a,selectionStart:n,selectionEnd:e}}(t):e.multiline&&g(i)?function(t,e){var n=e.prefix,i=e.suffix,r=e.surroundWithNewlines,o=t.value.slice(t.selectionStart,t.selectionEnd),s=t.selectionStart,a=t.selectionEnd,c=o.split("\n");if(c.every((function(t){return t.startsWith(n)&&t.endsWith(i)})))o=c.map((function(t){return t.slice(n.length,t.length-i.length)})).join("\n"),a=s+o.length;else if(o=c.map((function(t){return n+t+i})).join("\n"),r){var u=w(t),l=u.newlinesToAppend,d=u.newlinesToPrepend;s+=l.length,a=s+o.length,o=l+o+d}return{text:o,selectionStart:s,selectionEnd:a}}(t,e):function(t,e){var n,i,r=e.prefix,o=e.suffix,s=e.blockPrefix,a=e.blockSuffix,c=e.replaceNext,u=e.prefixSpace,l=e.scanFor,d=e.surroundWithNewlines,h=t.selectionStart,f=t.selectionEnd,p=t.value.slice(t.selectionStart,t.selectionEnd),m=g(p)&&s.length>0?s+"\n":r,v=g(p)&&a.length>0?"\n"+a:o;if(u){var b=t.value[t.selectionStart-1];0===t.selectionStart||null==b||b.match(/\s/)||(m=" "+m)}p=function(t,e,n,i){void 0===i&&(i=!1);if(t.selectionStart===t.selectionEnd)t.selectionStart=function(t,e){var n=e;for(;t[n]&&null!=t[n-1]&&!t[n-1].match(/\s/);)n--;return n}(t.value,t.selectionStart),t.selectionEnd=y(t.value,t.selectionEnd,i);else{var r=t.selectionStart-e.length,o=t.selectionEnd+n.length,s=t.value.slice(r,t.selectionStart)===e,a=t.value.slice(t.selectionEnd,o)===n;s&&a&&(t.selectionStart=r,t.selectionEnd=o)}return t.value.slice(t.selectionStart,t.selectionEnd)}(t,m,v,e.multiline);var x=t.selectionStart,N=t.selectionEnd,C=c.length>0&&v.indexOf(c)>-1&&p.length>0;if(d){var T=w(t);n=T.newlinesToAppend,i=T.newlinesToPrepend,m=n+r,v+=i}if(p.startsWith(m)&&p.endsWith(v)){var O=p.slice(m.length,p.length-v.length);if(h===f){var S=h-m.length;S=Math.max(S,x),S=Math.min(S,x+O.length),x=N=S}else N=x+O.length;return{text:O,selectionStart:x,selectionEnd:N}}if(C){if(l.length>0&&p.match(l)){v=v.replace(c,p);var k=m+v;return x=N=x+m.length,{text:k,selectionStart:x,selectionEnd:N}}var j=m+p+v;return x=x+m.length+p.length+v.indexOf(c),N=x+c.length,{text:j,selectionStart:x,selectionEnd:N}}var A=m+p+v;x=h+m.length,N=f+m.length;var E=p.match(/^\s*|\s*$/g);if(e.trimFirst&&E){var P=E[0]||"",_=E[1]||"";A=P+m+p.trim()+v+_,x+=P.length,N-=_.length}return{text:A,selectionStart:x,selectionEnd:N}}(t,e),Object(p.a)(t,n)},"utils/Drawer":x.a,"utils/anchorScroll":N.a,"utils/RequestError":C.a,"utils/abbreviateNumber":T.a,"utils/string":S,"utils/SubtreeRetainer":A.a,"utils/escapeRegExp":O.a,"utils/extract":P.a,"utils/ScrollListener":_.a,"utils/stringToColor":D.a,"utils/Stream":j.a,"utils/subclassOf":I.a,"utils/setRouteWithForcedRefresh":E.a,"utils/patchMithril":M.a,"utils/proxifyCompat":L.a,"utils/classList":R.a,"utils/extractText":H.a,"utils/formatNumber":B.a,"utils/mapRoutes":F.a,"utils/withAttr":U.a,"utils/throttleDebounce":i,"models/Notification":q.a,"models/User":z.a,"models/Post":W.a,"models/Discussion":V.a,"models/Group":Y.a,"models/Forum":G.a,Component:K.a,Fragment:$t,Translator:X.a,"components/AlertManager":J.a,"components/Page":Q.a,"components/Switch":Z.a,"components/Badge":tt.a,"components/LoadingIndicator":et.a,"components/Placeholder":nt.a,"components/Separator":it.a,"components/Dropdown":rt.a,"components/SplitDropdown":ot.a,"components/RequestErrorModal":st.a,"components/FieldSet":at.a,"components/Select":ct.a,"components/Navigation":ut.a,"components/Alert":lt.a,"components/Link":dt.a,"components/LinkButton":ht.a,"components/Checkbox":ft.a,"components/SelectDropdown":pt.a,"components/ModalManager":mt.a,"components/Button":vt.a,"components/Modal":gt.a,"components/GroupBadge":bt.a,"components/TextEditor":yt.a,"components/TextEditorButton":xt,"components/Tooltip":wt.a,"components/EditUserModal":Nt.a,Model:Ct.a,Application:Tt.a,"helpers/fullTime":Ot.a,"helpers/avatar":St.a,"helpers/icon":kt.a,"helpers/humanTime":jt.a,"helpers/punctuateSeries":At.a,"helpers/highlight":Et.a,"helpers/username":Pt.a,"helpers/userOnline":_t.a,"helpers/listItems":Dt.a,"resolvers/DefaultResolver":It.a,"states/PaginatedListState":Mt.a}},function(t,e,n){var i=n(115),r=n(55);void 0===r.$&&(r.$=i),void 0===r.jQuery&&(r.jQuery=i),t.exports=i},function(t,e,n){var i;
/*!
* jQuery JavaScript Library v3.6.0
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2021-03-02T17:08Z
*/!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(n,r){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,c=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},u=o.push,l=o.indexOf,d={},h=d.toString,f=d.hasOwnProperty,p=f.toString,m=p.call(Object),v={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},b=function(t){return null!=t&&t===t.window},y=n.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var i,r,o=(n=n||y).createElement("script");if(o.text=t,e)for(i in w)(r=e[i]||e.getAttribute&&e.getAttribute(i))&&o.setAttribute(i,r);n.head.appendChild(o).parentNode.removeChild(o)}function N(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[h.call(t)]||"object":typeof t}var C=function t(e,n){return new t.fn.init(e,n)};function T(t){var e=!!t&&"length"in t&&t.length,n=N(t);return!g(t)&&!b(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}C.fn=C.prototype={jquery:"3.6.0",constructor:C,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=C.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return C.each(this,t)},map:function(t){return this.pushStack(C.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(C.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:o.sort,splice:o.splice},C.extend=C.fn.extend=function(){var t,e,n,i,r,o,s=arguments[0]||{},a=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||g(s)||(s={}),a===c&&(s=this,a--);a<c;a++)if(null!=(t=arguments[a]))for(e in t)i=t[e],"__proto__"!==e&&s!==i&&(u&&i&&(C.isPlainObject(i)||(r=Array.isArray(i)))?(n=s[e],o=r&&!Array.isArray(n)?[]:r||C.isPlainObject(n)?n:{},r=!1,s[e]=C.extend(u,o,i)):void 0!==i&&(s[e]=i));return s},C.extend({expando:"jQuery"+("3.6.0"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==h.call(t))&&(!(e=s(t))||"function"==typeof(n=f.call(e,"constructor")&&e.constructor)&&p.call(n)===m)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){x(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,i=0;if(T(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},makeArray:function(t,e){var n=e||[];return null!=t&&(T(Object(t))?C.merge(n,"string"==typeof t?[t]:t):u.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:l.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,r=t.length;i<n;i++)t[r++]=e[i];return t.length=r,t},grep:function(t,e,n){for(var i=[],r=0,o=t.length,s=!n;r<o;r++)!e(t[r],r)!==s&&i.push(t[r]);return i},map:function(t,e,n){var i,r,o=0,s=[];if(T(t))for(i=t.length;o<i;o++)null!=(r=e(t[o],o,n))&&s.push(r);else for(o in t)null!=(r=e(t[o],o,n))&&s.push(r);return c(s)},guid:1,support:v}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=o[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){d["[object "+e+"]"]=e.toLowerCase()}));var O=
/*!
* Sizzle CSS Selector Engine v2.3.6
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://js.foundation/
*
* Date: 2021-02-16
*/
function(t){var e,n,i,r,o,s,a,c,u,l,d,h,f,p,m,v,g,b,y,w="sizzle"+1*new Date,x=t.document,N=0,C=0,T=ct(),O=ct(),S=ct(),k=ct(),j=function(t,e){return t===e&&(d=!0),0},A={}.hasOwnProperty,E=[],P=E.pop,_=E.push,D=E.push,$=E.slice,I=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",R="(?:\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",H="\\["+L+"*("+R+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+L+"*\\]",B=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",F=new RegExp(L+"+","g"),U=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),q=new RegExp("^"+L+"*,"+L+"*"),z=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),W=new RegExp(L+"|>"),V=new RegExp(B),Y=new RegExp("^"+R+"$"),G={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,rt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){h()},st=wt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{D.apply(E=$.call(x.childNodes),x.childNodes),E[x.childNodes.length].nodeType}catch(t){D={apply:E.length?function(t,e){_.apply(t,$.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function at(t,e,i,r){var o,a,u,l,d,p,g,b=e&&e.ownerDocument,x=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return i;if(!r&&(h(e),e=e||f,m)){if(11!==x&&(d=Z.exec(t)))if(o=d[1]){if(9===x){if(!(u=e.getElementById(o)))return i;if(u.id===o)return i.push(u),i}else if(b&&(u=b.getElementById(o))&&y(e,u)&&u.id===o)return i.push(u),i}else{if(d[2])return D.apply(i,e.getElementsByTagName(t)),i;if((o=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return D.apply(i,e.getElementsByClassName(o)),i}if(n.qsa&&!k[t+" "]&&(!v||!v.test(t))&&(1!==x||"object"!==e.nodeName.toLowerCase())){if(g=t,b=e,1===x&&(W.test(t)||z.test(t))){for((b=tt.test(t)&&gt(e.parentNode)||e)===e&&n.scope||((l=e.getAttribute("id"))?l=l.replace(it,rt):e.setAttribute("id",l=w)),a=(p=s(t)).length;a--;)p[a]=(l?"#"+l:":scope")+" "+yt(p[a]);g=p.join(",")}try{return D.apply(i,b.querySelectorAll(g)),i}catch(e){k(t,!0)}finally{l===w&&e.removeAttribute("id")}}}return c(t.replace(U,"$1"),e,i,r)}function ct(){var t=[];return function e(n,r){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function ut(t){return t[w]=!0,t}function lt(t){var e=f.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function dt(t,e){for(var n=t.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=e}function ht(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ft(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&st(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function vt(t){return ut((function(e){return e=+e,ut((function(n,i){for(var r,o=t([],n.length,e),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))}))}))}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=at.support={},o=at.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!K.test(e||n&&n.nodeName||"HTML")},h=at.setDocument=function(t){var e,r,s=t?t.ownerDocument||t:x;return s!=f&&9===s.nodeType&&s.documentElement?(p=(f=s).documentElement,m=!o(f),x!=f&&(r=f.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",ot,!1):r.attachEvent&&r.attachEvent("onunload",ot)),n.scope=lt((function(t){return p.appendChild(t).appendChild(f.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=lt((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=lt((function(t){return t.appendChild(f.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(f.getElementsByClassName),n.getById=lt((function(t){return p.appendChild(t).id=w,!f.getElementsByName||!f.getElementsByName(w).length})),n.getById?(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n,i,r,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(r=e.getElementsByName(t),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),i.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},g=[],v=[],(n.qsa=Q.test(f.querySelectorAll))&&(lt((function(t){var e;p.appendChild(t).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+L+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\["+L+"*(?:value|"+M+")"),t.querySelectorAll("[id~="+w+"-]").length||v.push("~="),(e=f.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||v.push("\\["+L+"*name"+L+"*="+L+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]"),t.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),lt((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=f.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name"+L+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=Q.test(b=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&lt((function(t){n.disconnectedMatch=b.call(t,"*"),b.call(t,"[s!='']:x"),g.push("!=",B)})),v=v.length&&new RegExp(v.join("|")),g=g.length&&new RegExp(g.join("|")),e=Q.test(p.compareDocumentPosition),y=e||Q.test(p.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},j=e?function(t,e){if(t===e)return d=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t==f||t.ownerDocument==x&&y(x,t)?-1:e==f||e.ownerDocument==x&&y(x,e)?1:l?I(l,t)-I(l,e):0:4&i?-1:1)}:function(t,e){if(t===e)return d=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,s=[t],a=[e];if(!r||!o)return t==f?-1:e==f?1:r?-1:o?1:l?I(l,t)-I(l,e):0;if(r===o)return ht(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?ht(s[i],a[i]):s[i]==x?-1:a[i]==x?1:0},f):f},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(h(t),n.matchesSelector&&m&&!k[e+" "]&&(!g||!g.test(e))&&(!v||!v.test(e)))try{var i=b.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){k(e,!0)}return at(e,f,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!=f&&h(t),y(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!=f&&h(t);var r=i.attrHandle[e.toLowerCase()],o=r&&A.call(i.attrHandle,e.toLowerCase())?r(t,e,!m):void 0;return void 0!==o?o:n.attributes||!m?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},at.escape=function(t){return(t+"").replace(it,rt)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,i=[],r=0,o=0;if(d=!n.detectDuplicates,l=!n.sortStable&&t.slice(0),t.sort(j),d){for(;e=t[o++];)e===t[o]&&(r=i.push(o));for(;r--;)t.splice(i[r],1)}return l=null,t},r=at.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=r(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=r(e);return n},(i=at.selectors={cacheLength:50,createPseudo:ut,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return G.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&V.test(n)&&(e=s(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=T[t+" "];return e||(e=new RegExp("(^|"+L+")"+t+"("+L+"|$)"))&&T(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(i){var r=at.attr(i,t);return null==r?"!="===e:!e||(r+="","="===e?r===n:"!="===e?r!==n:"^="===e?n&&0===r.indexOf(n):"*="===e?n&&r.indexOf(n)>-1:"$="===e?n&&r.slice(-n.length)===n:"~="===e?(" "+r.replace(F," ")+" ").indexOf(n)>-1:"|="===e&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,c){var u,l,d,h,f,p,m=o!==s?"nextSibling":"previousSibling",v=e.parentNode,g=a&&e.nodeName.toLowerCase(),b=!c&&!a,y=!1;if(v){if(o){for(;m;){for(h=e;h=h[m];)if(a?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;p=m="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?v.firstChild:v.lastChild],s&&b){for(y=(f=(u=(l=(d=(h=v)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===N&&u[1])&&u[2],h=f&&v.childNodes[f];h=++f&&h&&h[m]||(y=f=0)||p.pop();)if(1===h.nodeType&&++y&&h===e){l[t]=[N,f,y];break}}else if(b&&(y=f=(u=(l=(d=(h=e)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===N&&u[1]),!1===y)for(;(h=++f&&h&&h[m]||(y=f=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++y||(b&&((l=(d=h[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]=[N,y]),h!==e)););return(y-=r)===i||y%i==0&&y/i>=0}}},PSEUDO:function(t,e){var n,r=i.pseudos[t]||i.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return r[w]?r(e):r.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?ut((function(t,n){for(var i,o=r(t,e),s=o.length;s--;)t[i=I(t,o[s])]=!(n[i]=o[s])})):function(t){return r(t,0,n)}):r}},pseudos:{not:ut((function(t){var e=[],n=[],i=a(t.replace(U,"$1"));return i[w]?ut((function(t,e,n,r){for(var o,s=i(t,null,r,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))})):function(t,r,o){return e[0]=t,i(e,null,o,n),e[0]=null,!n.pop()}})),has:ut((function(t){return function(e){return at(t,e).length>0}})),contains:ut((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||r(e)).indexOf(t)>-1}})),lang:ut((function(t){return Y.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===p},focus:function(t){return t===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},header:function(t){return J.test(t.nodeName)},input:function(t){return X.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:vt((function(){return[0]})),last:vt((function(t,e){return[e-1]})),eq:vt((function(t,e,n){return[n<0?n+e:n]})),even:vt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:vt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:vt((function(t,e,n){for(var i=n<0?n+e:n>e?e:n;--i>=0;)t.push(i);return t})),gt:vt((function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t}))}}).pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=ft(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=pt(e);function bt(){}function yt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function wt(t,e,n){var i=e.dir,r=e.next,o=r||i,s=n&&"parentNode"===o,a=C++;return e.first?function(e,n,r){for(;e=e[i];)if(1===e.nodeType||s)return t(e,n,r);return!1}:function(e,n,c){var u,l,d,h=[N,a];if(c){for(;e=e[i];)if((1===e.nodeType||s)&&t(e,n,c))return!0}else for(;e=e[i];)if(1===e.nodeType||s)if(l=(d=e[w]||(e[w]={}))[e.uniqueID]||(d[e.uniqueID]={}),r&&r===e.nodeName.toLowerCase())e=e[i]||e;else{if((u=l[o])&&u[0]===N&&u[1]===a)return h[2]=u[2];if(l[o]=h,h[2]=t(e,n,c))return!0}return!1}}function xt(t){return t.length>1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function Nt(t,e,n,i,r){for(var o,s=[],a=0,c=t.length,u=null!=e;a<c;a++)(o=t[a])&&(n&&!n(o,i,r)||(s.push(o),u&&e.push(a)));return s}function Ct(t,e,n,i,r,o){return i&&!i[w]&&(i=Ct(i)),r&&!r[w]&&(r=Ct(r,o)),ut((function(o,s,a,c){var u,l,d,h=[],f=[],p=s.length,m=o||function(t,e,n){for(var i=0,r=e.length;i<r;i++)at(t,e[i],n);return n}(e||"*",a.nodeType?[a]:a,[]),v=!t||!o&&e?m:Nt(m,h,t,a,c),g=n?r||(o?t:p||i)?[]:s:v;if(n&&n(v,g,a,c),i)for(u=Nt(g,f),i(u,[],a,c),l=u.length;l--;)(d=u[l])&&(g[f[l]]=!(v[f[l]]=d));if(o){if(r||t){if(r){for(u=[],l=g.length;l--;)(d=g[l])&&u.push(v[l]=d);r(null,g=[],u,c)}for(l=g.length;l--;)(d=g[l])&&(u=r?I(o,d):h[l])>-1&&(o[u]=!(s[u]=d))}}else g=Nt(g===s?g.splice(p,g.length):g),r?r(null,s,g,c):D.apply(s,g)}))}function Tt(t){for(var e,n,r,o=t.length,s=i.relative[t[0].type],a=s||i.relative[" "],c=s?1:0,l=wt((function(t){return t===e}),a,!0),d=wt((function(t){return I(e,t)>-1}),a,!0),h=[function(t,n,i){var r=!s&&(i||n!==u)||((e=n).nodeType?l(t,n,i):d(t,n,i));return e=null,r}];c<o;c++)if(n=i.relative[t[c].type])h=[wt(xt(h),n)];else{if((n=i.filter[t[c].type].apply(null,t[c].matches))[w]){for(r=++c;r<o&&!i.relative[t[r].type];r++);return Ct(c>1&&xt(h),c>1&&yt(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(U,"$1"),n,c<r&&Tt(t.slice(c,r)),r<o&&Tt(t=t.slice(r)),r<o&&yt(t))}h.push(n)}return xt(h)}return bt.prototype=i.filters=i.pseudos,i.setFilters=new bt,s=at.tokenize=function(t,e){var n,r,o,s,a,c,u,l=O[t+" "];if(l)return e?0:l.slice(0);for(a=t,c=[],u=i.preFilter;a;){for(s in n&&!(r=q.exec(a))||(r&&(a=a.slice(r[0].length)||a),c.push(o=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(U," ")}),a=a.slice(n.length)),i.filter)!(r=G[s].exec(a))||u[s]&&!(r=u[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return e?a.length:a?at.error(t):O(t,c).slice(0)},a=at.compile=function(t,e){var n,r=[],o=[],a=S[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=Tt(e[n]))[w]?r.push(a):o.push(a);(a=S(t,function(t,e){var n=e.length>0,r=t.length>0,o=function(o,s,a,c,l){var d,p,v,g=0,b="0",y=o&&[],w=[],x=u,C=o||r&&i.find.TAG("*",l),T=N+=null==x?1:Math.random()||.1,O=C.length;for(l&&(u=s==f||s||l);b!==O&&null!=(d=C[b]);b++){if(r&&d){for(p=0,s||d.ownerDocument==f||(h(d),a=!m);v=t[p++];)if(v(d,s||f,a)){c.push(d);break}l&&(N=T)}n&&((d=!v&&d)&&g--,o&&y.push(d))}if(g+=b,n&&b!==g){for(p=0;v=e[p++];)v(y,w,s,a);if(o){if(g>0)for(;b--;)y[b]||w[b]||(w[b]=P.call(c));w=Nt(w)}D.apply(c,w),l&&!o&&w.length>0&&g+e.length>1&&at.uniqueSort(c)}return l&&(N=T,u=x),y};return n?ut(o):o}(o,r))).selector=t}return a},c=at.select=function(t,e,n,r){var o,c,u,l,d,h="function"==typeof t&&t,f=!r&&s(t=h.selector||t);if(n=n||[],1===f.length){if((c=f[0]=f[0].slice(0)).length>2&&"ID"===(u=c[0]).type&&9===e.nodeType&&m&&i.relative[c[1].type]){if(!(e=(i.find.ID(u.matches[0].replace(et,nt),e)||[])[0]))return n;h&&(e=e.parentNode),t=t.slice(c.shift().value.length)}for(o=G.needsContext.test(t)?0:c.length;o--&&(u=c[o],!i.relative[l=u.type]);)if((d=i.find[l])&&(r=d(u.matches[0].replace(et,nt),tt.test(c[0].type)&&gt(e.parentNode)||e))){if(c.splice(o,1),!(t=r.length&&yt(c)))return D.apply(n,r),n;break}}return(h||a(t,f))(r,e,!m,n,!e||tt.test(t)&&gt(e.parentNode)||e),n},n.sortStable=w.split("").sort(j).join("")===w,n.detectDuplicates=!!d,h(),n.sortDetached=lt((function(t){return 1&t.compareDocumentPosition(f.createElement("fieldset"))})),lt((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||dt("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&lt((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||dt("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),lt((function(t){return null==t.getAttribute("disabled")}))||dt(M,(function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null})),at}(n);C.find=O,(C.expr=O.selectors)[":"]=C.expr.pseudos,C.uniqueSort=C.unique=O.uniqueSort,C.text=O.getText,C.isXMLDoc=O.isXML,C.contains=O.contains,C.escapeSelector=O.escape;var S=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&C(t).is(n))break;i.push(t)}return i},k=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},j=C.expr.match.needsContext;function A(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var E=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(t,e,n){return g(e)?C.grep(t,(function(t,i){return!!e.call(t,i,t)!==n})):e.nodeType?C.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?C.grep(t,(function(t){return l.call(e,t)>-1!==n})):C.filter(e,t,n)}C.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?C.find.matchesSelector(i,t)?[i]:[]:C.find.matches(t,C.grep(e,(function(t){return 1===t.nodeType})))},C.fn.extend({find:function(t){var e,n,i=this.length,r=this;if("string"!=typeof t)return this.pushStack(C(t).filter((function(){for(e=0;e<i;e++)if(C.contains(r[e],this))return!0})));for(n=this.pushStack([]),e=0;e<i;e++)C.find(t,r[e],n);return i>1?C.uniqueSort(n):n},filter:function(t){return this.pushStack(P(this,t||[],!1))},not:function(t){return this.pushStack(P(this,t||[],!0))},is:function(t){return!!P(this,"string"==typeof t&&j.test(t)?C(t):t||[],!1).length}});var _,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||_,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:D.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof C?e[0]:e,C.merge(this,C.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:y,!0)),E.test(i[1])&&C.isPlainObject(e))for(i in e)g(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=y.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):g(t)?void 0!==n.ready?n.ready(t):t(C):C.makeArray(t,this)}).prototype=C.fn,_=C(y);var $=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function M(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}C.fn.extend({has:function(t){var e=C(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(C.contains(this,e[t]))return!0}))},closest:function(t,e){var n,i=0,r=this.length,o=[],s="string"!=typeof t&&C(t);if(!j.test(t))for(;i<r;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&C.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?C.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?l.call(C(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),C.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return S(t,"parentNode")},parentsUntil:function(t,e,n){return S(t,"parentNode",n)},next:function(t){return M(t,"nextSibling")},prev:function(t){return M(t,"previousSibling")},nextAll:function(t){return S(t,"nextSibling")},prevAll:function(t){return S(t,"previousSibling")},nextUntil:function(t,e,n){return S(t,"nextSibling",n)},prevUntil:function(t,e,n){return S(t,"previousSibling",n)},siblings:function(t){return k((t.parentNode||{}).firstChild,t)},children:function(t){return k(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(A(t,"template")&&(t=t.content||t),C.merge([],t.childNodes))}},(function(t,e){C.fn[t]=function(n,i){var r=C.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=C.filter(i,r)),this.length>1&&(I[t]||C.uniqueSort(r),$.test(t)&&r.reverse()),this.pushStack(r)}}));var L=/[^\x20\t\r\n\f]+/g;function R(t){return t}function H(t){throw t}function B(t,e,n,i){var r;try{t&&g(r=t.promise)?r.call(t).done(e).fail(n):t&&g(r=t.then)?r.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}C.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return C.each(t.match(L)||[],(function(t,n){e[n]=!0})),e}(t):C.extend({},t);var e,n,i,r,o=[],s=[],a=-1,c=function(){for(r=r||t.once,i=e=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=o.length,n=!1);t.memory||(n=!1),e=!1,r&&(o=n?[]:"")},u={add:function(){return o&&(n&&!e&&(a=o.length-1,s.push(n)),function e(n){C.each(n,(function(n,i){g(i)?t.unique&&u.has(i)||o.push(i):i&&i.length&&"string"!==N(i)&&e(i)}))}(arguments),n&&!e&&c()),this},remove:function(){return C.each(arguments,(function(t,e){for(var n;(n=C.inArray(e,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(t){return t?C.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||e||(o=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},C.extend({Deferred:function(t){var e=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return C.Deferred((function(n){C.each(e,(function(e,i){var r=g(t[i[4]])&&t[i[4]];o[i[1]]((function(){var t=r&&r.apply(this,arguments);t&&g(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[t]:arguments)}))})),t=null})).promise()},then:function(t,i,r){var o=0;function s(t,e,i,r){return function(){var a=this,c=arguments,u=function(){var n,u;if(!(t<o)){if((n=i.apply(a,c))===e.promise())throw new TypeError("Thenable self-resolution");u=n&&("object"==typeof n||"function"==typeof n)&&n.then,g(u)?r?u.call(n,s(o,e,R,r),s(o,e,H,r)):(o++,u.call(n,s(o,e,R,r),s(o,e,H,r),s(o,e,R,e.notifyWith))):(i!==R&&(a=void 0,c=[n]),(r||e.resolveWith)(a,c))}},l=r?u:function(){try{u()}catch(n){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(n,l.stackTrace),t+1>=o&&(i!==H&&(a=void 0,c=[n]),e.rejectWith(a,c))}};t?l():(C.Deferred.getStackHook&&(l.stackTrace=C.Deferred.getStackHook()),n.setTimeout(l))}}return C.Deferred((function(n){e[0][3].add(s(0,n,g(r)?r:R,n.notifyWith)),e[1][3].add(s(0,n,g(t)?t:R)),e[2][3].add(s(0,n,g(i)?i:H))})).promise()},promise:function(t){return null!=t?C.extend(t,r):r}},o={};return C.each(e,(function(t,n){var s=n[2],a=n[5];r[n[1]]=s.add,a&&s.add((function(){i=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith})),r.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,i=Array(n),r=a.call(arguments),o=C.Deferred(),s=function(t){return function(n){i[t]=this,r[t]=arguments.length>1?a.call(arguments):n,--e||o.resolveWith(i,r)}};if(e<=1&&(B(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||g(r[n]&&r[n].then)))return o.then();for(;n--;)B(r[n],s(n),o.reject);return o.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&F.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},C.readyException=function(t){n.setTimeout((function(){throw t}))};var U=C.Deferred();function q(){y.removeEventListener("DOMContentLoaded",q),n.removeEventListener("load",q),C.ready()}C.fn.ready=function(t){return U.then(t).catch((function(t){C.readyException(t)})),this},C.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--C.readyWait:C.isReady)||(C.isReady=!0,!0!==t&&--C.readyWait>0||U.resolveWith(y,[C]))}}),C.ready.then=U.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?n.setTimeout(C.ready):(y.addEventListener("DOMContentLoaded",q),n.addEventListener("load",q));var z=function t(e,n,i,r,o,s,a){var c=0,u=e.length,l=null==i;if("object"===N(i))for(c in o=!0,i)t(e,n,c,i[c],!0,s,a);else if(void 0!==r&&(o=!0,g(r)||(a=!0),l&&(a?(n.call(e,r),n=null):(l=n,n=function(t,e,n){return l.call(C(t),n)})),n))for(;c<u;c++)n(e[c],i,a?r:r.call(e[c],c,n(e[c],i)));return o?e:l?n.call(e):u?n(e[0],i):s},W=/^-ms-/,V=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function G(t){return t.replace(W,"ms-").replace(V,Y)}var K=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function X(){this.expando=C.expando+X.uid++}X.uid=1,X.prototype={cache:function(t){var e=t[this.expando];return e||(e={},K(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,r=this.cache(t);if("string"==typeof e)r[G(e)]=n;else for(i in e)r[G(i)]=e[i];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][G(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i=t[this.expando];if(void 0!==i){if(void 0!==e){n=(e=Array.isArray(e)?e.map(G):(e=G(e))in i?[e]:e.match(L)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||C.isEmptyObject(i))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!C.isEmptyObject(e)}};var J=new X,Q=new X,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,tt=/[A-Z]/g;function et(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(tt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Z.test(t)?JSON.parse(t):t)}(n)}catch(t){}Q.set(t,e,n)}else n=void 0;return n}C.extend({hasData:function(t){return Q.hasData(t)||J.hasData(t)},data:function(t,e,n){return Q.access(t,e,n)},removeData:function(t,e){Q.remove(t,e)},_data:function(t,e,n){return J.access(t,e,n)},_removeData:function(t,e){J.remove(t,e)}}),C.fn.extend({data:function(t,e){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(r=Q.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=G(i.slice(5)),et(o,i,r[i]));J.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each((function(){Q.set(this,t)})):z(this,(function(e){var n;if(o&&void 0===e)return void 0!==(n=Q.get(o,t))||void 0!==(n=et(o,t))?n:void 0;this.each((function(){Q.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){Q.remove(this,t)}))}}),C.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=J.get(t,e),n&&(!i||Array.isArray(n)?i=J.access(t,e,C.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){var n=C.queue(t,e=e||"fx"),i=n.length,r=n.shift(),o=C._queueHooks(t,e);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,(function(){C.dequeue(t,e)}),o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return J.get(t,n)||J.access(t,n,{empty:C.Callbacks("once memory").add((function(){J.remove(t,[e+"queue",n])}))})}}),C.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?C.queue(this[0],t):void 0===e?this:this.each((function(){var n=C.queue(this,t,e);C._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&C.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){C.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=C.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=J.get(o[s],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(e)}});var nt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,it=new RegExp("^(?:([+-])=|)("+nt+")([a-z%]*)$","i"),rt=["Top","Right","Bottom","Left"],ot=y.documentElement,st=function(t){return C.contains(t.ownerDocument,t)},at={composed:!0};ot.getRootNode&&(st=function(t){return C.contains(t.ownerDocument,t)||t.getRootNode(at)===t.ownerDocument});var ct=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&st(t)&&"none"===C.css(t,"display")};function ut(t,e,n,i){var r,o,s=20,a=i?function(){return i.cur()}:function(){return C.css(t,e,"")},c=a(),u=n&&n[3]||(C.cssNumber[e]?"":"px"),l=t.nodeType&&(C.cssNumber[e]||"px"!==u&&+c)&&it.exec(C.css(t,e));if(l&&l[3]!==u){for(c/=2,u=u||l[3],l=+c||1;s--;)C.style(t,e,l+u),(1-o)*(1-(o=a()/c||.5))<=0&&(s=0),l/=o;C.style(t,e,(l*=2)+u),n=n||[]}return n&&(l=+l||+c||0,r=n[1]?l+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=l,i.end=r)),r}var lt={};function dt(t){var e,n=t.ownerDocument,i=t.nodeName,r=lt[i];return r||(e=n.body.appendChild(n.createElement(i)),r=C.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),lt[i]=r,r)}function ht(t,e){for(var n,i,r=[],o=0,s=t.length;o<s;o++)(i=t[o]).style&&(n=i.style.display,e?("none"===n&&(r[o]=J.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&ct(i)&&(r[o]=dt(i))):"none"!==n&&(r[o]="none",J.set(i,"display",n)));for(o=0;o<s;o++)null!=r[o]&&(t[o].style.display=r[o]);return t}C.fn.extend({show:function(){return ht(this,!0)},hide:function(){return ht(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ct(this)?C(this).show():C(this).hide()}))}});var ft,pt,mt=/^(?:checkbox|radio)$/i,vt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,gt=/^$|^module$|\/(?:java|ecma)script/i;ft=y.createDocumentFragment().appendChild(y.createElement("div")),(pt=y.createElement("input")).setAttribute("type","radio"),pt.setAttribute("checked","checked"),pt.setAttribute("name","t"),ft.appendChild(pt),v.checkClone=ft.cloneNode(!0).cloneNode(!0).lastChild.checked,ft.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ft.cloneNode(!0).lastChild.defaultValue,ft.innerHTML="<option></option>",v.option=!!ft.lastChild;var bt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function yt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&A(t,e)?C.merge([t],n):n}function wt(t,e){for(var n=0,i=t.length;n<i;n++)J.set(t[n],"globalEval",!e||J.get(e[n],"globalEval"))}bt.tbody=bt.tfoot=bt.colgroup=bt.caption=bt.thead,bt.th=bt.td,v.option||(bt.optgroup=bt.option=[1,"<select multiple='multiple'>","</select>"]);var xt=/<|&#?\w+;/;function Nt(t,e,n,i,r){for(var o,s,a,c,u,l,d=e.createDocumentFragment(),h=[],f=0,p=t.length;f<p;f++)if((o=t[f])||0===o)if("object"===N(o))C.merge(h,o.nodeType?[o]:o);else if(xt.test(o)){for(s=s||d.appendChild(e.createElement("div")),a=(vt.exec(o)||["",""])[1].toLowerCase(),c=bt[a]||bt._default,s.innerHTML=c[1]+C.htmlPrefilter(o)+c[2],l=c[0];l--;)s=s.lastChild;C.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(e.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(i&&C.inArray(o,i)>-1)r&&r.push(o);else if(u=st(o),s=yt(d.appendChild(o),"script"),u&&wt(s),n)for(l=0;o=s[l++];)gt.test(o.type||"")&&n.push(o);return d}var Ct=/^([^.]*)(?:\.(.+)|)/;function Tt(){return!0}function Ot(){return!1}function St(t,e){return t===function(){try{return y.activeElement}catch(t){}}()==("focus"===e)}function kt(t,e,n,i,r,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=void 0),e)kt(t,a,n,i,e[a],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Ot;else if(!r)return t;return 1===o&&(s=r,(r=function(t){return C().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=C.guid++)),t.each((function(){C.event.add(this,e,r,i,n)}))}function jt(t,e,n){n?(J.set(t,e,!1),C.event.add(t,e,{namespace:!1,handler:function(t){var i,r,o=J.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(C.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=a.call(arguments),J.set(this,e,o),i=n(this,e),this[e](),o!==(r=J.get(this,e))||i?J.set(this,e,!1):r={},o!==r)return t.stopImmediatePropagation(),t.preventDefault(),r&&r.value}else o.length&&(J.set(this,e,{value:C.event.trigger(C.extend(o[0],C.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===J.get(t,e)&&C.event.add(t,e,Tt)}C.event={global:{},add:function(t,e,n,i,r){var o,s,a,c,u,l,d,h,f,p,m,v=J.get(t);if(K(t))for(n.handler&&(n=(o=n).handler,r=o.selector),r&&C.find.matchesSelector(ot,r),n.guid||(n.guid=C.guid++),(c=v.events)||(c=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(e){return void 0!==C&&C.event.triggered!==e.type?C.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(L)||[""]).length;u--;)f=m=(a=Ct.exec(e[u])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=C.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=C.event.special[f]||{},l=C.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&C.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=c[f])||((h=c[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,i,p,s)||t.addEventListener&&t.addEventListener(f,s)),d.add&&(d.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,l):h.push(l),C.event.global[f]=!0)},remove:function(t,e,n,i,r){var o,s,a,c,u,l,d,h,f,p,m,v=J.hasData(t)&&J.get(t);if(v&&(c=v.events)){for(u=(e=(e||"").match(L)||[""]).length;u--;)if(f=m=(a=Ct.exec(e[u])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=C.event.special[f]||{},h=c[f=(i?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)l=h[o],!r&&m!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||i&&i!==l.selector&&("**"!==i||!l.selector)||(h.splice(o,1),l.selector&&h.delegateCount--,d.remove&&d.remove.call(t,l));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,p,v.handle)||C.removeEvent(t,f,v.handle),delete c[f])}else for(f in c)C.event.remove(t,f+e[u],n,i,!0);C.isEmptyObject(c)&&J.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,o,s,a=new Array(arguments.length),c=C.event.fix(t),u=(J.get(this,"events")||Object.create(null))[c.type]||[],l=C.event.special[c.type]||{};for(a[0]=c,e=1;e<arguments.length;e++)a[e]=arguments[e];if(c.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,c)){for(s=C.event.handlers.call(this,c,u),e=0;(r=s[e++])&&!c.isPropagationStopped();)for(c.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!c.isImmediatePropagationStopped();)c.rnamespace&&!1!==o.namespace&&!c.rnamespace.test(o.namespace)||(c.handleObj=o,c.data=o.data,void 0!==(i=((C.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a))&&!1===(c.result=i)&&(c.preventDefault(),c.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,c),c.result}},handlers:function(t,e){var n,i,r,o,s,a=[],c=e.delegateCount,u=t.target;if(c&&u.nodeType&&!("click"===t.type&&t.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],s={},n=0;n<c;n++)void 0===s[r=(i=e[n]).selector+" "]&&(s[r]=i.needsContext?C(r,this).index(u)>-1:C.find(r,this,null,[u]).length),s[r]&&o.push(i);o.length&&a.push({elem:u,handlers:o})}return u=this,c<e.length&&a.push({elem:u,handlers:e.slice(c)}),a},addProp:function(t,e){Object.defineProperty(C.Event.prototype,t,{enumerable:!0,configurable:!0,get:g(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[C.expando]?t:new C.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return mt.test(e.type)&&e.click&&A(e,"input")&&jt(e,"click",Tt),!1},trigger:function(t){var e=this||t;return mt.test(e.type)&&e.click&&A(e,"input")&&jt(e,"click"),!0},_default:function(t){var e=t.target;return mt.test(e.type)&&e.click&&A(e,"input")&&J.get(e,"click")||A(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},C.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},(C.Event=function(t,e){if(!(this instanceof C.Event))return new C.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Tt:Ot,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&C.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[C.expando]=!0}).prototype={constructor:C.Event,isDefaultPrevented:Ot,isPropagationStopped:Ot,isImmediatePropagationStopped:Ot,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Tt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Tt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Tt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},C.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},C.event.addProp),C.each({focus:"focusin",blur:"focusout"},(function(t,e){C.event.special[t]={setup:function(){return jt(this,t,St),!1},trigger:function(){return jt(this,t),!0},_default:function(){return!0},delegateType:e}})),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){C.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,r=t.relatedTarget,o=t.handleObj;return r&&(r===i||C.contains(i,r))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),C.fn.extend({on:function(t,e,n,i){return kt(this,t,e,n,i)},one:function(t,e,n,i){return kt(this,t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,C(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Ot),this.each((function(){C.event.remove(this,t,n,e)}))}});var At=/<script|<style|<link/i,Et=/checked\s*(?:[^=]|=\s*.checked.)/i,Pt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function _t(t,e){return A(t,"table")&&A(11!==e.nodeType?e:e.firstChild,"tr")&&C(t).children("tbody")[0]||t}function Dt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function $t(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function It(t,e){var n,i,r,o,s,a;if(1===e.nodeType){if(J.hasData(t)&&(a=J.get(t).events))for(r in J.remove(e,"handle events"),a)for(n=0,i=a[r].length;n<i;n++)C.event.add(e,r,a[r][n]);Q.hasData(t)&&(o=Q.access(t),s=C.extend({},o),Q.set(e,s))}}function Mt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&mt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Lt(t,e,n,i){e=c(e);var r,o,s,a,u,l,d=0,h=t.length,f=h-1,p=e[0],m=g(p);if(m||h>1&&"string"==typeof p&&!v.checkClone&&Et.test(p))return t.each((function(r){var o=t.eq(r);m&&(e[0]=p.call(this,r,o.html())),Lt(o,e,n,i)}));if(h&&(o=(r=Nt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===r.childNodes.length&&(r=o),o||i)){for(a=(s=C.map(yt(r,"script"),Dt)).length;d<h;d++)u=r,d!==f&&(u=C.clone(u,!0,!0),a&&C.merge(s,yt(u,"script"))),n.call(t[d],u,d);if(a)for(l=s[s.length-1].ownerDocument,C.map(s,$t),d=0;d<a;d++)u=s[d],gt.test(u.type||"")&&!J.access(u,"globalEval")&&C.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?C._evalUrl&&!u.noModule&&C._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):x(u.textContent.replace(Pt,""),u,l))}return t}function Rt(t,e,n){for(var i,r=e?C.filter(e,t):t,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||C.cleanData(yt(i)),i.parentNode&&(n&&st(i)&&wt(yt(i,"script")),i.parentNode.removeChild(i));return t}C.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var i,r,o,s,a=t.cloneNode(!0),c=st(t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||C.isXMLDoc(t)))for(s=yt(a),i=0,r=(o=yt(t)).length;i<r;i++)Mt(o[i],s[i]);if(e)if(n)for(o=o||yt(t),s=s||yt(a),i=0,r=o.length;i<r;i++)It(o[i],s[i]);else It(t,a);return(s=yt(a,"script")).length>0&&wt(s,!c&&yt(t,"script")),a},cleanData:function(t){for(var e,n,i,r=C.event.special,o=0;void 0!==(n=t[o]);o++)if(K(n)){if(e=n[J.expando]){if(e.events)for(i in e.events)r[i]?C.event.remove(n,i):C.removeEvent(n,i,e.handle);n[J.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),C.fn.extend({detach:function(t){return Rt(this,t,!0)},remove:function(t){return Rt(this,t)},text:function(t){return z(this,(function(t){return void 0===t?C.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Lt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||_t(this,t).appendChild(t)}))},prepend:function(){return Lt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=_t(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Lt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Lt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(C.cleanData(yt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return C.clone(this,t,e)}))},html:function(t){return z(this,(function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!At.test(t)&&!bt[(vt.exec(t)||["",""])[1].toLowerCase()]){t=C.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(C.cleanData(yt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Lt(this,arguments,(function(e){var n=this.parentNode;C.inArray(this,t)<0&&(C.cleanData(yt(this)),n&&n.replaceChild(e,this))}),t)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){C.fn[t]=function(t){for(var n,i=[],r=C(t),o=r.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),C(r[s])[e](n),u.apply(i,n.get());return this.pushStack(i)}}));var Ht=new RegExp("^("+nt+")(?!px)[a-z%]+$","i"),Bt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},Ft=function(t,e,n){var i,r,o={};for(r in e)o[r]=t.style[r],t.style[r]=e[r];for(r in i=n.call(t),e)t.style[r]=o[r];return i},Ut=new RegExp(rt.join("|"),"i");function qt(t,e,n){var i,r,o,s,a=t.style;return(n=n||Bt(t))&&(""!==(s=n.getPropertyValue(e)||n[e])||st(t)||(s=C.style(t,e)),!v.pixelBoxStyles()&&Ht.test(s)&&Ut.test(e)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function zt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ot.appendChild(u).appendChild(l);var t=n.getComputedStyle(l);i="1%"!==t.top,c=12===e(t.marginLeft),l.style.right="60%",s=36===e(t.right),r=36===e(t.width),l.style.position="absolute",o=12===e(l.offsetWidth/3),ot.removeChild(u),l=null}}function e(t){return Math.round(parseFloat(t))}var i,r,o,s,a,c,u=y.createElement("div"),l=y.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,C.extend(v,{boxSizingReliable:function(){return t(),r},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),c},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,i,r;return null==a&&(t=y.createElement("table"),e=y.createElement("tr"),i=y.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="border:1px solid",e.style.height="1px",i.style.height="9px",i.style.display="block",ot.appendChild(t).appendChild(e).appendChild(i),r=n.getComputedStyle(e),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===e.offsetHeight,ot.removeChild(t)),a}}))}();var Wt=["Webkit","Moz","ms"],Vt=y.createElement("div").style,Yt={};function Gt(t){var e=C.cssProps[t]||Yt[t];return e||(t in Vt?t:Yt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Wt.length;n--;)if((t=Wt[n]+e)in Vt)return t}(t)||t)}var Kt=/^(none|table(?!-c[ea]).+)/,Xt=/^--/,Jt={position:"absolute",visibility:"hidden",display:"block"},Qt={letterSpacing:"0",fontWeight:"400"};function Zt(t,e,n){var i=it.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function te(t,e,n,i,r,o){var s="width"===e?1:0,a=0,c=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(c+=C.css(t,n+rt[s],!0,r)),i?("content"===n&&(c-=C.css(t,"padding"+rt[s],!0,r)),"margin"!==n&&(c-=C.css(t,"border"+rt[s]+"Width",!0,r))):(c+=C.css(t,"padding"+rt[s],!0,r),"padding"!==n?c+=C.css(t,"border"+rt[s]+"Width",!0,r):a+=C.css(t,"border"+rt[s]+"Width",!0,r));return!i&&o>=0&&(c+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-c-a-.5))||0),c}function ee(t,e,n){var i=Bt(t),r=(!v.boxSizingReliable()||n)&&"border-box"===C.css(t,"boxSizing",!1,i),o=r,s=qt(t,e,i),a="offset"+e[0].toUpperCase()+e.slice(1);if(Ht.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&r||!v.reliableTrDimensions()&&A(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===C.css(t,"display",!1,i))&&t.getClientRects().length&&(r="border-box"===C.css(t,"boxSizing",!1,i),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+te(t,e,n||(r?"border":"content"),o,i,s)+"px"}function ne(t,e,n,i,r){return new ne.prototype.init(t,e,n,i,r)}C.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=qt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=G(e),c=Xt.test(e),u=t.style;if(c||(e=Gt(a)),s=C.cssHooks[e]||C.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(t,!1,i))?r:u[e];"string"===(o=typeof n)&&(r=it.exec(n))&&r[1]&&(n=ut(t,e,r),o="number"),null!=n&&n==n&&("number"!==o||c||(n+=r&&r[3]||(C.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,i))||(c?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,i){var r,o,s,a=G(e);return Xt.test(e)||(e=Gt(a)),(s=C.cssHooks[e]||C.cssHooks[a])&&"get"in s&&(r=s.get(t,!0,n)),void 0===r&&(r=qt(t,e,i)),"normal"===r&&e in Qt&&(r=Qt[e]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),C.each(["height","width"],(function(t,e){C.cssHooks[e]={get:function(t,n,i){if(n)return!Kt.test(C.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ee(t,e,i):Ft(t,Jt,(function(){return ee(t,e,i)}))},set:function(t,n,i){var r,o=Bt(t),s=!v.scrollboxSize()&&"absolute"===o.position,a=(s||i)&&"border-box"===C.css(t,"boxSizing",!1,o),c=i?te(t,e,i,a,o):0;return a&&s&&(c-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-te(t,e,"border",!1,o)-.5)),c&&(r=it.exec(n))&&"px"!==(r[3]||"px")&&(t.style[e]=n,n=C.css(t,e)),Zt(0,n,c)}}})),C.cssHooks.marginLeft=zt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(qt(t,"marginLeft"))||t.getBoundingClientRect().left-Ft(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),C.each({margin:"",padding:"",border:"Width"},(function(t,e){C.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[t+rt[i]+e]=o[i]||o[i-2]||o[0];return r}},"margin"!==t&&(C.cssHooks[t+e].set=Zt)})),C.fn.extend({css:function(t,e){return z(this,(function(t,e,n){var i,r,o={},s=0;if(Array.isArray(e)){for(i=Bt(t),r=e.length;s<r;s++)o[e[s]]=C.css(t,e[s],!1,i);return o}return void 0!==n?C.style(t,e,n):C.css(t,e)}),t,e,arguments.length>1)}}),C.Tween=ne,ne.prototype={constructor:ne,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||C.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(C.cssNumber[n]?"":"px")},cur:function(){var t=ne.propHooks[this.prop];return t&&t.get?t.get(this):ne.propHooks._default.get(this)},run:function(t){var e,n=ne.propHooks[this.prop];return this.options.duration?this.pos=e=C.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ne.propHooks._default.set(this),this}},ne.prototype.init.prototype=ne.prototype,ne.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=C.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){C.fx.step[t.prop]?C.fx.step[t.prop](t):1!==t.elem.nodeType||!C.cssHooks[t.prop]&&null==t.elem.style[Gt(t.prop)]?t.elem[t.prop]=t.now:C.style(t.elem,t.prop,t.now+t.unit)}}},ne.propHooks.scrollTop=ne.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},C.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},(C.fx=ne.prototype.init).step={};var ie,re,oe=/^(?:toggle|show|hide)$/,se=/queueHooks$/;function ae(){re&&(!1===y.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ae):n.setTimeout(ae,C.fx.interval),C.fx.tick())}function ce(){return n.setTimeout((function(){ie=void 0})),ie=Date.now()}function ue(t,e){var n,i=0,r={height:t};for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=rt[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function le(t,e,n){for(var i,r=(de.tweeners[e]||[]).concat(de.tweeners["*"]),o=0,s=r.length;o<s;o++)if(i=r[o].call(n,e,t))return i}function de(t,e,n){var i,r,o=0,s=de.prefilters.length,a=C.Deferred().always((function(){delete c.elem})),c=function(){if(r)return!1;for(var e=ie||ce(),n=Math.max(0,u.startTime+u.duration-e),i=1-(n/u.duration||0),o=0,s=u.tweens.length;o<s;o++)u.tweens[o].run(i);return a.notifyWith(t,[u,i,n]),i<1&&s?n:(s||a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u]),!1)},u=a.promise({elem:t,props:C.extend({},e),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},n),originalProperties:e,originalOptions:n,startTime:ie||ce(),duration:n.duration,tweens:[],createTween:function(e,n){var i=C.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var n=0,i=e?u.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)u.tweens[n].run(1);return e?(a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u,e])):a.rejectWith(t,[u,e]),this}}),l=u.props;for(!function(t,e){var n,i,r,o,s;for(n in t)if(r=e[i=G(n)],o=t[n],Array.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),(s=C.cssHooks[i])&&"expand"in s)for(n in o=s.expand(o),delete t[i],o)n in t||(t[n]=o[n],e[n]=r);else e[i]=r}(l,u.opts.specialEasing);o<s;o++)if(i=de.prefilters[o].call(u,t,l,u.opts))return g(i.stop)&&(C._queueHooks(u.elem,u.opts.queue).stop=i.stop.bind(i)),i;return C.map(l,le,u),g(u.opts.start)&&u.opts.start.call(t,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),C.fx.timer(C.extend(c,{elem:t,anim:u,queue:u.opts.queue})),u}C.Animation=C.extend(de,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ut(n.elem,t,it.exec(e),n),n}]},tweener:function(t,e){g(t)?(e=t,t=["*"]):t=t.match(L);for(var n,i=0,r=t.length;i<r;i++)n=t[i],de.tweeners[n]=de.tweeners[n]||[],de.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,r,o,s,a,c,u,l,d="width"in e||"height"in e,h=this,f={},p=t.style,m=t.nodeType&&ct(t),v=J.get(t,"fxshow");for(i in n.queue||(null==(s=C._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,h.always((function(){h.always((function(){s.unqueued--,C.queue(t,"fx").length||s.empty.fire()}))}))),e)if(r=e[i],oe.test(r)){if(delete e[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!v||void 0===v[i])continue;m=!0}f[i]=v&&v[i]||C.style(t,i)}if((c=!C.isEmptyObject(e))||!C.isEmptyObject(f))for(i in d&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(u=v&&v.display)&&(u=J.get(t,"display")),"none"===(l=C.css(t,"display"))&&(u?l=u:(ht([t],!0),u=t.style.display||u,l=C.css(t,"display"),ht([t]))),("inline"===l||"inline-block"===l&&null!=u)&&"none"===C.css(t,"float")&&(c||(h.done((function(){p.display=u})),null==u&&(l=p.display,u="none"===l?"":l)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),c=!1,f)c||(v?"hidden"in v&&(m=v.hidden):v=J.access(t,"fxshow",{display:u}),o&&(v.hidden=!m),m&&ht([t],!0),h.done((function(){for(i in m||ht([t]),J.remove(t,"fxshow"),f)C.style(t,i,f[i])}))),c=le(m?v[i]:0,i,h),i in v||(v[i]=c.start,m&&(c.end=c.start,c.start=0))}],prefilter:function(t,e){e?de.prefilters.unshift(t):de.prefilters.push(t)}}),C.speed=function(t,e,n){var i=t&&"object"==typeof t?C.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return C.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in C.fx.speeds?i.duration=C.fx.speeds[i.duration]:i.duration=C.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){g(i.old)&&i.old.call(this),i.queue&&C.dequeue(this,i.queue)},i},C.fn.extend({fadeTo:function(t,e,n,i){return this.filter(ct).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var r=C.isEmptyObject(t),o=C.speed(e,n,i),s=function(){var e=de(this,C.extend({},t),o);(r||J.get(this,"finish"))&&e.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,r=null!=t&&t+"queueHooks",o=C.timers,s=J.get(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&se.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(n),e=!1,o.splice(r,1));!e&&n||C.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=J.get(this),i=n[t+"queue"],r=n[t+"queueHooks"],o=C.timers,s=i?i.length:0;for(n.finish=!0,C.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish}))}}),C.each(["toggle","show","hide"],(function(t,e){var n=C.fn[e];C.fn[e]=function(t,i,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(ue(e,!0),t,i,r)}})),C.each({slideDown:ue("show"),slideUp:ue("hide"),slideToggle:ue("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){C.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}})),C.timers=[],C.fx.tick=function(){var t,e=0,n=C.timers;for(ie=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||C.fx.stop(),ie=void 0},C.fx.timer=function(t){C.timers.push(t),C.fx.start()},C.fx.interval=13,C.fx.start=function(){re||(re=!0,ae())},C.fx.stop=function(){re=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(t,e){return t=C.fx&&C.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,i){var r=n.setTimeout(e,t);i.stop=function(){n.clearTimeout(r)}}))},function(){var t=y.createElement("input"),e=y.createElement("select").appendChild(y.createElement("option"));t.type="checkbox",v.checkOn=""!==t.value,v.optSelected=e.selected,(t=y.createElement("input")).value="t",t.type="radio",v.radioValue="t"===t.value}();var he,fe=C.expr.attrHandle;C.fn.extend({attr:function(t,e){return z(this,C.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){C.removeAttr(this,t)}))}}),C.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?C.prop(t,e,n):(1===o&&C.isXMLDoc(t)||(r=C.attrHooks[e.toLowerCase()]||(C.expr.match.bool.test(e)?he:void 0)),void 0!==n?null===n?void C.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=C.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&A(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,r=e&&e.match(L);if(r&&1===t.nodeType)for(;n=r[i++];)t.removeAttribute(n)}}),he={set:function(t,e,n){return!1===e?C.removeAttr(t,n):t.setAttribute(n,n),n}},C.each(C.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=fe[e]||C.find.attr;fe[e]=function(t,e,i){var r,o,s=e.toLowerCase();return i||(o=fe[s],fe[s]=r,r=null!=n(t,e,i)?s:null,fe[s]=o),r}}));var pe=/^(?:input|select|textarea|button)$/i,me=/^(?:a|area)$/i;function ve(t){return(t.match(L)||[]).join(" ")}function ge(t){return t.getAttribute&&t.getAttribute("class")||""}function be(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(L)||[]}C.fn.extend({prop:function(t,e){return z(this,C.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[C.propFix[t]||t]}))}}),C.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&C.isXMLDoc(t)||(e=C.propFix[e]||e,r=C.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=C.find.attr(t,"tabindex");return e?parseInt(e,10):pe.test(t.nodeName)||me.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(C.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){C.propFix[this.toLowerCase()]=this})),C.fn.extend({addClass:function(t){var e,n,i,r,o,s,a,c=0;if(g(t))return this.each((function(e){C(this).addClass(t.call(this,e,ge(this)))}));if((e=be(t)).length)for(;n=this[c++];)if(r=ge(n),i=1===n.nodeType&&" "+ve(r)+" "){for(s=0;o=e[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(a=ve(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,r,o,s,a,c=0;if(g(t))return this.each((function(e){C(this).removeClass(t.call(this,e,ge(this)))}));if(!arguments.length)return this.attr("class","");if((e=be(t)).length)for(;n=this[c++];)if(r=ge(n),i=1===n.nodeType&&" "+ve(r)+" "){for(s=0;o=e[s++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");r!==(a=ve(i))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t,i="string"===n||Array.isArray(t);return"boolean"==typeof e&&i?e?this.addClass(t):this.removeClass(t):g(t)?this.each((function(n){C(this).toggleClass(t.call(this,n,ge(this),e),e)})):this.each((function(){var e,r,o,s;if(i)for(r=0,o=C(this),s=be(t);e=s[r++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=ge(this))&&J.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":J.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+ve(ge(n))+" ").indexOf(e)>-1)return!0;return!1}});var ye=/\r/g;C.fn.extend({val:function(t){var e,n,i,r=this[0];return arguments.length?(i=g(t),this.each((function(n){var r;1===this.nodeType&&(null==(r=i?t.call(this,n,C(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=C.map(r,(function(t){return null==t?"":t+""}))),(e=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))}))):r?(e=C.valHooks[r.type]||C.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(ye,""):null==n?"":n:void 0}}),C.extend({valHooks:{option:{get:function(t){var e=C.find.attr(t,"value");return null!=e?e:ve(C.text(t))}},select:{get:function(t){var e,n,i,r=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],c=s?o+1:r.length;for(i=o<0?c:s?o:0;i<c;i++)if(((n=r[i]).selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(e=C(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,i,r=t.options,o=C.makeArray(e),s=r.length;s--;)((i=r[s]).selected=C.inArray(C.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),C.each(["radio","checkbox"],(function(){C.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=C.inArray(C(t).val(),e)>-1}},v.checkOn||(C.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in n;var we=/^(?:focusinfocus|focusoutblur)$/,xe=function(t){t.stopPropagation()};C.extend(C.event,{trigger:function(t,e,i,r){var o,s,a,c,u,l,d,h,p=[i||y],m=f.call(t,"type")?t.type:t,v=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=a=i=i||y,3!==i.nodeType&&8!==i.nodeType&&!we.test(m+C.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),u=m.indexOf(":")<0&&"on"+m,(t=t[C.expando]?t:new C.Event(m,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:C.makeArray(e,[t]),d=C.event.special[m]||{},r||!d.trigger||!1!==d.trigger.apply(i,e))){if(!r&&!d.noBubble&&!b(i)){for(c=d.delegateType||m,we.test(c+m)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(i.ownerDocument||y)&&p.push(a.defaultView||a.parentWindow||n)}for(o=0;(s=p[o++])&&!t.isPropagationStopped();)h=s,t.type=o>1?c:d.bindType||m,(l=(J.get(s,"events")||Object.create(null))[t.type]&&J.get(s,"handle"))&&l.apply(s,e),(l=u&&s[u])&&l.apply&&K(s)&&(t.result=l.apply(s,e),!1===t.result&&t.preventDefault());return t.type=m,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),e)||!K(i)||u&&g(i[m])&&!b(i)&&((a=i[u])&&(i[u]=null),C.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,xe),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,xe),C.event.triggered=void 0,a&&(i[u]=a)),t.result}},simulate:function(t,e,n){var i=C.extend(new C.Event,n,{type:t,isSimulated:!0});C.event.trigger(i,null,e)}}),C.fn.extend({trigger:function(t,e){return this.each((function(){C.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return C.event.trigger(t,e,n,!0)}}),v.focusin||C.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){C.event.simulate(e,t.target,C.event.fix(t))};C.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,r=J.access(i,e);r||i.addEventListener(t,n,!0),J.access(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,r=J.access(i,e)-1;r?J.access(i,e,r):(i.removeEventListener(t,n,!0),J.remove(i,e))}}}));var Ne=n.location,Ce={guid:Date.now()},Te=/\?/;C.parseXML=function(t){var e,i;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){}return i=e&&e.getElementsByTagName("parsererror")[0],e&&!i||C.error("Invalid XML: "+(i?C.map(i.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Oe=/\[\]$/,Se=/\r?\n/g,ke=/^(?:submit|button|image|reset|file)$/i,je=/^(?:input|select|textarea|keygen)/i;function Ae(t,e,n,i){var r;if(Array.isArray(e))C.each(e,(function(e,r){n||Oe.test(t)?i(t,r):Ae(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,i)}));else if(n||"object"!==N(e))i(t,e);else for(r in e)Ae(t+"["+r+"]",e[r],n,i)}C.param=function(t,e){var n,i=[],r=function(t,e){var n=g(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!C.isPlainObject(t))C.each(t,(function(){r(this.name,this.value)}));else for(n in t)Ae(n,t[n],e,r);return i.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=C.prop(this,"elements");return t?C.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!C(this).is(":disabled")&&je.test(this.nodeName)&&!ke.test(t)&&(this.checked||!mt.test(t))})).map((function(t,e){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,(function(t){return{name:e.name,value:t.replace(Se,"\r\n")}})):{name:e.name,value:n.replace(Se,"\r\n")}})).get()}});var Ee=/%20/g,Pe=/#.*$/,_e=/([?&])_=[^&]*/,De=/^(.*?):[ \t]*([^\r\n]*)$/gm,$e=/^(?:GET|HEAD)$/,Ie=/^\/\//,Me={},Le={},Re="*/".concat("*"),He=y.createElement("a");function Be(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(L)||[];if(g(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Fe(t,e,n,i){var r={},o=t===Le;function s(a){var c;return r[a]=!0,C.each(t[a]||[],(function(t,a){var u=a(e,n,i);return"string"!=typeof u||o||r[u]?o?!(c=u):void 0:(e.dataTypes.unshift(u),s(u),!1)})),c}return s(e.dataTypes[0])||!r["*"]&&s("*")}function Ue(t,e){var n,i,r=C.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&C.extend(!0,t,i),t}He.href=Ne.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ne.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ne.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ue(Ue(t,C.ajaxSettings),e):Ue(C.ajaxSettings,t)},ajaxPrefilter:Be(Me),ajaxTransport:Be(Le),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0);var i,r,o,s,a,c,u,l,d,h,f=C.ajaxSetup({},e=e||{}),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?C(p):C.event,v=C.Deferred(),g=C.Callbacks("once memory"),b=f.statusCode||{},w={},x={},N="canceled",T={readyState:0,getResponseHeader:function(t){var e;if(u){if(!s)for(s={};e=De.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(t,e){return null==u&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==u&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)T.always(t[T.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||N;return i&&i.abort(e),O(0,e),this}};if(v.promise(T),f.url=((t||f.url||Ne.href)+"").replace(Ie,Ne.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(L)||[""],null==f.crossDomain){c=y.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=He.protocol+"//"+He.host!=c.protocol+"//"+c.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=C.param(f.data,f.traditional)),Fe(Me,f,e,T),u)return T;for(d in(l=C.event&&f.global)&&0==C.active++&&C.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!$e.test(f.type),r=f.url.replace(Pe,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Ee,"+")):(h=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(Te.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(_e,"$1"),h=(Te.test(r)?"&":"?")+"_="+Ce.guid+++h),f.url=r+h),f.ifModified&&(C.lastModified[r]&&T.setRequestHeader("If-Modified-Since",C.lastModified[r]),C.etag[r]&&T.setRequestHeader("If-None-Match",C.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Re+"; q=0.01":""):f.accepts["*"]),f.headers)T.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,T,f)||u))return T.abort();if(N="abort",g.add(f.complete),T.done(f.success),T.fail(f.error),i=Fe(Le,f,e,T)){if(T.readyState=1,l&&m.trigger("ajaxSend",[T,f]),u)return T;f.async&&f.timeout>0&&(a=n.setTimeout((function(){T.abort("timeout")}),f.timeout));try{u=!1,i.send(w,O)}catch(t){if(u)throw t;O(-1,t)}}else O(-1,"No Transport");function O(t,e,s,c){var d,h,y,w,x,N=e;u||(u=!0,a&&n.clearTimeout(a),i=void 0,o=c||"",T.readyState=t>0?4:0,d=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var i,r,o,s,a=t.contents,c=t.dataTypes;"*"===c[0];)c.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){c.unshift(r);break}if(c[0]in n)o=c[0];else{for(r in n){if(!c[0]||t.converters[r+" "+c[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==c[0]&&c.unshift(o),n[o]}(f,T,s)),!d&&C.inArray("script",f.dataTypes)>-1&&C.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,i){var r,o,s,a,c,u={},l=t.dataTypes.slice();if(l[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!c&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),c=o,o=l.shift())if("*"===o)o=c;else if("*"!==c&&c!==o){if(!(s=u[c+" "+o]||u["* "+o]))for(r in u)if((a=r.split(" "))[1]===o&&(s=u[c+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[r]:!0!==u[r]&&(o=a[0],l.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+c+" to "+o}}}return{state:"success",data:e}}(f,w,T,d),d?(f.ifModified&&((x=T.getResponseHeader("Last-Modified"))&&(C.lastModified[r]=x),(x=T.getResponseHeader("etag"))&&(C.etag[r]=x)),204===t||"HEAD"===f.type?N="nocontent":304===t?N="notmodified":(N=w.state,h=w.data,d=!(y=w.error))):(y=N,!t&&N||(N="error",t<0&&(t=0))),T.status=t,T.statusText=(e||N)+"",d?v.resolveWith(p,[h,N,T]):v.rejectWith(p,[T,N,y]),T.statusCode(b),b=void 0,l&&m.trigger(d?"ajaxSuccess":"ajaxError",[T,f,d?h:y]),g.fireWith(p,[T,N]),l&&(m.trigger("ajaxComplete",[T,f]),--C.active||C.event.trigger("ajaxStop")))}return T},getJSON:function(t,e,n){return C.get(t,e,n,"json")},getScript:function(t,e){return C.get(t,void 0,e,"script")}}),C.each(["get","post"],(function(t,e){C[e]=function(t,n,i,r){return g(n)&&(r=r||i,i=n,n=void 0),C.ajax(C.extend({url:t,type:e,dataType:r,data:n,success:i},C.isPlainObject(t)&&t))}})),C.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),C._evalUrl=function(t,e,n){return C.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){C.globalEval(t,e,n)}})},C.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=C(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return g(t)?this.each((function(e){C(this).wrapInner(t.call(this,e))})):this.each((function(){var e=C(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){C(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){C(this).replaceWith(this.childNodes)})),this}}),C.expr.pseudos.hidden=function(t){return!C.expr.pseudos.visible(t)},C.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var qe={0:200,1223:204},ze=C.ajaxSettings.xhr();v.cors=!!ze&&"withCredentials"in ze,v.ajax=ze=!!ze,C.ajaxTransport((function(t){var e,i;if(v.cors||ze&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);e=function(t){return function(){e&&(e=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(qe[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),i=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){e&&i()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),C.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return C.globalEval(t),t}}}),C.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),C.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,r){e=C("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&r("error"===t.type?404:200,t.type)}),y.head.appendChild(e[0])},abort:function(){n&&n()}}}));var We,Ve=[],Ye=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ve.pop()||C.expando+"_"+Ce.guid++;return this[t]=!0,t}}),C.ajaxPrefilter("json jsonp",(function(t,e,i){var r,o,s,a=!1!==t.jsonp&&(Ye.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ye.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ye,"$1"+r):!1!==t.jsonp&&(t.url+=(Te.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return s||C.error(r+" was not called"),s[0]},t.dataTypes[0]="json",o=n[r],n[r]=function(){s=arguments},i.always((function(){void 0===o?C(n).removeProp(r):n[r]=o,t[r]&&(t.jsonpCallback=e.jsonpCallback,Ve.push(r)),s&&g(o)&&o(s[0]),s=o=void 0})),"script"})),v.createHTMLDocument=((We=y.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===We.childNodes.length),C.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(v.createHTMLDocument?((i=(e=y.implementation.createHTMLDocument("")).createElement("base")).href=y.location.href,e.head.appendChild(i)):e=y),o=!n&&[],(r=E.exec(t))?[e.createElement(r[1])]:(r=Nt([t],e,o),o&&o.length&&C(o).remove(),C.merge([],r.childNodes)));var i,r,o},C.fn.load=function(t,e,n){var i,r,o,s=this,a=t.indexOf(" ");return a>-1&&(i=ve(t.slice(a)),t=t.slice(0,a)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(r="POST"),s.length>0&&C.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done((function(t){o=arguments,s.html(i?C("<div>").append(C.parseHTML(t)).find(i):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},C.expr.pseudos.animated=function(t){return C.grep(C.timers,(function(e){return t===e.elem})).length},C.offset={setOffset:function(t,e,n){var i,r,o,s,a,c,u=C.css(t,"position"),l=C(t),d={};"static"===u&&(t.style.position="relative"),a=l.offset(),o=C.css(t,"top"),c=C.css(t,"left"),("absolute"===u||"fixed"===u)&&(o+c).indexOf("auto")>-1?(s=(i=l.position()).top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(c)||0),g(e)&&(e=e.call(t,n,C.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+r),"using"in e?e.using.call(t,d):l.css(d)}},C.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){C.offset.setOffset(this,t,e)}));var e,n,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,i=this[0],r={top:0,left:0};if("fixed"===C.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),n=i.ownerDocument,t=i.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===C.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((r=C(t).offset()).top+=C.css(t,"borderTopWidth",!0),r.left+=C.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-C.css(i,"marginTop",!0),left:e.left-r.left-C.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===C.css(t,"position");)t=t.offsetParent;return t||ot}))}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;C.fn[t]=function(i){return z(this,(function(t,i,r){var o;if(b(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===r)return o?o[e]:t[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):t[i]=r}),t,i,arguments.length)}})),C.each(["top","left"],(function(t,e){C.cssHooks[e]=zt(v.pixelPosition,(function(t,n){if(n)return n=qt(t,e),Ht.test(n)?C(t).position()[e]+"px":n}))})),C.each({Height:"height",Width:"width"},(function(t,e){C.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,i){C.fn[i]=function(r,o){var s=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===o?"margin":"border");return z(this,(function(e,n,r){var o;return b(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===r?C.css(e,n,a):C.style(e,n,r,a)}),e,s?r:void 0,s)}}))})),C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){C.fn[e]=function(t){return this.on(e,t)}})),C.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),C.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){C.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Ge=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;C.proxy=function(t,e){var n,i,r;if("string"==typeof e&&(n=t[e],e=t,t=n),g(t))return i=a.call(arguments,2),(r=function(){return t.apply(e||this,i.concat(a.call(arguments)))}).guid=t.guid=t.guid||C.guid++,r},C.holdReady=function(t){t?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=A,C.isFunction=g,C.isWindow=b,C.camelCase=G,C.type=N,C.now=Date.now,C.isNumeric=function(t){var e=C.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},C.trim=function(t){return null==t?"":(t+"").replace(Ge,"")},void 0===(i=function(){return C}.apply(e,[]))||(t.exports=i);var Ke=n.jQuery,Xe=n.$;return C.noConflict=function(t){return n.$===C&&(n.$=Xe),t&&n.jQuery===C&&(n.jQuery=Ke),C},void 0===r&&(n.jQuery=n.$=C),C}))},function(t,e,n){var i=n(117),r=n(55);void 0===r.m&&(r.m=i),t.exports=i},function(t,e,n){"use strict";var i=n(118),r=n(121),o=n(82),s=function(){return i.apply(this,arguments)};s.m=i,s.trust=i.trust,s.fragment=i.fragment,s.mount=o.mount,s.route=n(127),s.render=n(100),s.redraw=o.redraw,s.request=r.request,s.jsonp=r.jsonp,s.parseQueryString=n(103),s.buildQueryString=n(101),s.parsePathname=n(84),s.buildPathname=n(83),s.vnode=n(29),s.PromisePolyfill=n(98),t.exports=s},function(t,e,n){"use strict";var i=n(95);i.trust=n(119),i.fragment=n(120),t.exports=i},function(t,e,n){"use strict";var i=n(29);t.exports=function(t){return null==t&&(t=""),i("<",void 0,void 0,t,void 0,void 0)}},function(t,e,n){"use strict";var i=n(29),r=n(96);t.exports=function(){var t=r.apply(0,arguments);return t.tag="[",t.children=i.normalizeChildren(t.children),t}},function(t,e,n){"use strict";var i=n(97),r=n(82);t.exports=n(126)(window,i,r.redraw)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var i,r,o,s,a,c=1,u={},l=!1,d=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},i=function(t){o.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(t){var e=d.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):i=function(t){setTimeout(p,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&p(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),i=function(e){t.postMessage(s+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return u[c]=r,i(c),c++},h.clearImmediate=f}function f(t){delete u[t]}function p(t){if(l)setTimeout(p,0,t);else{var e=u[t];if(e){l=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{f(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(52),n(123))},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var c,u=[],l=!1,d=-1;function h(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&f())}function f(){if(!l){var t=a(h);l=!0;for(var e=u.length;e;){for(c=u,u=[];++d<e;)c&&c[d].run();d=-1,e=u.length}c=null,l=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||l||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e,n){"use strict";var i=n(29);t.exports=function(t){var e,n=t&&t.document,r={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function o(t){return t.attrs&&t.attrs.xmlns||r[t.tag]}function s(t,e){if(t.state!==e)throw new Error("`vnode.state` must not be modified")}function a(t){var e=t.state;try{return this.apply(e,arguments)}finally{s(t,e)}}function c(){try{return n.activeElement}catch(t){return null}}function u(t,e,n,i,r,o,s){for(var a=n;a<i;a++){var c=e[a];null!=c&&l(t,c,r,s,o)}}function l(t,e,r,s,c){var d=e.tag;if("string"==typeof d)switch(e.state={},null!=e.attrs&&M(e.attrs,e,r),d){case"#":!function(t,e,i){e.dom=n.createTextNode(e.children),y(t,e.dom,i)}(t,e,c);break;case"<":h(t,e,s,c);break;case"[":!function(t,e,i,r,o){var s=n.createDocumentFragment();if(null!=e.children){var a=e.children;u(s,a,0,a.length,i,null,r)}e.dom=s.firstChild,e.domSize=s.childNodes.length,y(t,s,o)}(t,e,r,s,c);break;default:!function(t,e,r,s,a){var c=e.tag,l=e.attrs,d=l&&l.is,h=(s=o(e)||s)?d?n.createElementNS(s,c,{is:d}):n.createElementNS(s,c):d?n.createElement(c,{is:d}):n.createElement(c);e.dom=h,null!=l&&function(t,e,n){for(var i in e)S(t,i,null,e[i],n)}(e,l,s);if(y(t,h,a),!w(e)&&(null!=e.text&&(""!==e.text?h.textContent=e.text:e.children=[i("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var f=e.children;u(h,f,0,f.length,r,null,s),"select"===e.tag&&null!=l&&function(t,e){if("value"in e)if(null===e.value)-1!==t.dom.selectedIndex&&(t.dom.value=null);else{var n=""+e.value;t.dom.value===n&&-1!==t.dom.selectedIndex||(t.dom.value=n)}"selectedIndex"in e&&S(t,"selectedIndex",null,e.selectedIndex,void 0)}(e,l)}}(t,e,r,s,c)}else!function(t,e,n,r,o){(function(t,e){var n;if("function"==typeof t.tag.view){if(t.state=Object.create(t.tag),null!=(n=t.state.view).$$reentrantLock$$)return;n.$$reentrantLock$$=!0}else{if(t.state=void 0,null!=(n=t.tag).$$reentrantLock$$)return;n.$$reentrantLock$$=!0,t.state=null!=t.tag.prototype&&"function"==typeof t.tag.prototype.view?new t.tag(t):t.tag(t)}M(t.state,t,e),null!=t.attrs&&M(t.attrs,t,e);if(t.instance=i.normalize(a.call(t.state.view,t)),t.instance===t)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(e,n),null!=e.instance?(l(t,e.instance,n,r,o),e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0):e.domSize=0}(t,e,r,s,c)}var d={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function h(t,e,i,r){var o=e.children.match(/^\s*?<(\w+)/im)||[],s=n.createElement(d[o[1]]||"div");"http://www.w3.org/2000/svg"===i?(s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e.children+"</svg>",s=s.firstChild):s.innerHTML=e.children,e.dom=s.firstChild,e.domSize=s.childNodes.length,e.instance=[];for(var a,c=n.createDocumentFragment();a=s.firstChild;)e.instance.push(a),c.appendChild(a);y(t,c,r)}function f(t,e,n,i,r,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)u(t,n,0,n.length,i,r,o);else if(null==n||0===n.length)x(t,e,0,e.length);else{var s=null!=e[0]&&null!=e[0].key,a=null!=n[0]&&null!=n[0].key,c=0,d=0;if(!s)for(;d<e.length&&null==e[d];)d++;if(!a)for(;c<n.length&&null==n[c];)c++;if(null===a&&null==s)return;if(s!==a)x(t,e,d,e.length),u(t,n,c,n.length,i,r,o);else if(a){for(var h,f,y,w,C,T=e.length-1,O=n.length-1;T>=d&&O>=c&&(y=e[T],w=n[O],y.key===w.key);)y!==w&&p(t,y,w,i,r,o),null!=w.dom&&(r=w.dom),T--,O--;for(;T>=d&&O>=c&&(h=e[d],f=n[c],h.key===f.key);)d++,c++,h!==f&&p(t,h,f,i,g(e,d,r),o);for(;T>=d&&O>=c&&c!==O&&h.key===w.key&&y.key===f.key;)b(t,y,C=g(e,d,r)),y!==f&&p(t,y,f,i,C,o),++c<=--O&&b(t,h,r),h!==w&&p(t,h,w,i,r,o),null!=w.dom&&(r=w.dom),d++,y=e[--T],w=n[O],h=e[d],f=n[c];for(;T>=d&&O>=c&&y.key===w.key;)y!==w&&p(t,y,w,i,r,o),null!=w.dom&&(r=w.dom),O--,y=e[--T],w=n[O];if(c>O)x(t,e,d,T+1);else if(d>T)u(t,n,c,O+1,i,r,o);else{var S,k,j=r,A=O-c+1,E=new Array(A),P=0,_=0,D=2147483647,$=0;for(_=0;_<A;_++)E[_]=-1;for(_=O;_>=c;_--){null==S&&(S=m(e,d,T+1));var I=S[(w=n[_]).key];null!=I&&(D=I<D?I:-1,E[_-c]=I,y=e[I],e[I]=null,y!==w&&p(t,y,w,i,r,o),null!=w.dom&&(r=w.dom),$++)}if(r=j,$!==T-d+1&&x(t,e,d,T+1),0===$)u(t,n,c,O+1,i,r,o);else if(-1===D)for(P=(k=function(t){var e=[0],n=0,i=0,r=0,o=v.length=t.length;for(r=0;r<o;r++)v[r]=t[r];for(r=0;r<o;++r)if(-1!==t[r]){var s=e[e.length-1];if(t[s]<t[r])v[r]=s,e.push(r);else{for(n=0,i=e.length-1;n<i;){var a=(n>>>1)+(i>>>1)+(n&i&1);t[e[a]]<t[r]?n=a+1:i=a}t[r]<t[e[n]]&&(n>0&&(v[r]=e[n-1]),e[n]=r)}}n=e.length,i=e[n-1];for(;n-- >0;)e[n]=i,i=v[i];return v.length=0,e}(E)).length-1,_=O;_>=c;_--)f=n[_],-1===E[_-c]?l(t,f,i,o,r):k[P]===_-c?P--:b(t,f,r),null!=f.dom&&(r=n[_].dom);else for(_=O;_>=c;_--)f=n[_],-1===E[_-c]&&l(t,f,i,o,r),null!=f.dom&&(r=n[_].dom)}}else{var M=e.length<n.length?e.length:n.length;for(c=c<d?c:d;c<M;c++)(h=e[c])===(f=n[c])||null==h&&null==f||(null==h?l(t,f,i,o,g(e,c+1,r)):null==f?N(t,h):p(t,h,f,i,g(e,c+1,r),o));e.length>M&&x(t,e,c,e.length),n.length>M&&u(t,n,c,n.length,i,r,o)}}}function p(t,e,n,r,s,c){var u=e.tag;if(u===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate)if(void 0!==(n=a.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate)if(void 0!==(n=a.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof u)switch(null!=n.attrs&&L(n.attrs,n,r),u){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children);e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,i,r){e.children!==n.children?(C(t,e),h(t,n,i,r)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,c,s);break;case"[":!function(t,e,n,i,r,o){f(t,e.children,n.children,i,r,o);var s=0,a=n.children;if(n.dom=null,null!=a){for(var c=0;c<a.length;c++){var u=a[c];null!=u&&null!=u.dom&&(null==n.dom&&(n.dom=u.dom),s+=u.domSize||1)}1!==s&&(n.domSize=s)}}(t,e,n,r,s,c);break;default:!function(t,e,n,r){var s=e.dom=t.dom;r=o(e)||r,"textarea"===e.tag&&(null==e.attrs&&(e.attrs={}),null!=e.text&&(e.attrs.value=e.text,e.text=void 0));(function(t,e,n,i){if(null!=n)for(var r in n)S(t,r,e&&e[r],n[r],i);var o;if(null!=e)for(var r in e)null==(o=e[r])||null!=n&&null!=n[r]||k(t,r,o,i)})(e,t.attrs,e.attrs,r),w(e)||(null!=t.text&&null!=e.text&&""!==e.text?t.text.toString()!==e.text.toString()&&(t.dom.firstChild.nodeValue=e.text):(null!=t.text&&(t.children=[i("#",void 0,void 0,t.text,void 0,t.dom.firstChild)]),null!=e.text&&(e.children=[i("#",void 0,void 0,e.text,void 0,void 0)]),f(s,t.children,e.children,n,null,r)))}(e,n,r,c)}else!function(t,e,n,r,o,s){if(n.instance=i.normalize(a.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");L(n.state,n,r),null!=n.attrs&&L(n.attrs,n,r);null!=n.instance?(null==e.instance?l(t,n.instance,r,s,o):p(t,e.instance,n.instance,r,o,s),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=e.instance?(N(t,e.instance),n.dom=void 0,n.domSize=0):(n.dom=e.dom,n.domSize=e.domSize)}(t,e,n,r,s,c)}else N(t,e),l(t,n,r,c,s)}function m(t,e,n){for(var i=Object.create(null);e<n;e++){var r=t[e];if(null!=r){var o=r.key;null!=o&&(i[o]=e)}}return i}var v=[];function g(t,e,n){for(;e<t.length;e++)if(null!=t[e]&&null!=t[e].dom)return t[e].dom;return n}function b(t,e,i){var r=n.createDocumentFragment();!function t(e,n,i){for(;null!=i.dom&&i.dom.parentNode===e;){if("string"!=typeof i.tag){if(null!=(i=i.instance))continue}else if("<"===i.tag)for(var r=0;r<i.instance.length;r++)n.appendChild(i.instance[r]);else if("["!==i.tag)n.appendChild(i.dom);else if(1===i.children.length){if(null!=(i=i.children[0]))continue}else for(r=0;r<i.children.length;r++){var o=i.children[r];null!=o&&t(e,n,o)}break}}(t,r,e),y(t,r,i)}function y(t,e,n){null!=n?t.insertBefore(e,n):t.appendChild(e)}function w(t){if(null==t.attrs||null==t.attrs.contenteditable&&null==t.attrs.contentEditable)return!1;var e=t.children;if(null!=e&&1===e.length&&"<"===e[0].tag){var n=e[0].children;t.dom.innerHTML!==n&&(t.dom.innerHTML=n)}else if(null!=t.text||null!=e&&0!==e.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function x(t,e,n,i){for(var r=n;r<i;r++){var o=e[r];null!=o&&N(t,o)}}function N(t,e){var n,i,r,o=0,c=e.state;"string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&(null!=(r=a.call(e.state.onbeforeremove,e))&&"function"==typeof r.then&&(o=1,n=r));e.attrs&&"function"==typeof e.attrs.onbeforeremove&&(null!=(r=a.call(e.attrs.onbeforeremove,e))&&"function"==typeof r.then&&(o|=2,i=r));if(s(e,c),o){if(null!=n){var u=function(){1&o&&((o&=2)||l())};n.then(u,u)}if(null!=i){u=function(){2&o&&((o&=1)||l())};i.then(u,u)}}else O(e),T(t,e);function l(){s(e,c),O(e),T(t,e)}}function C(t,e){for(var n=0;n<e.instance.length;n++)t.removeChild(e.instance[n])}function T(t,e){for(;null!=e.dom&&e.dom.parentNode===t;){if("string"!=typeof e.tag){if(null!=(e=e.instance))continue}else if("<"===e.tag)C(t,e);else{if("["!==e.tag&&(t.removeChild(e.dom),!Array.isArray(e.children)))break;if(1===e.children.length){if(null!=(e=e.children[0]))continue}else for(var n=0;n<e.children.length;n++){var i=e.children[n];null!=i&&T(t,i)}}break}}function O(t){if("string"!=typeof t.tag&&"function"==typeof t.state.onremove&&a.call(t.state.onremove,t),t.attrs&&"function"==typeof t.attrs.onremove&&a.call(t.attrs.onremove,t),"string"!=typeof t.tag)null!=t.instance&&O(t.instance);else{var e=t.children;if(Array.isArray(e))for(var n=0;n<e.length;n++){var i=e[n];null!=i&&O(i)}}}function S(t,e,i,r,o){if("key"!==e&&"is"!==e&&null!=r&&!j(e)&&(i!==r||function(t,e){return"value"===e||"checked"===e||"selectedIndex"===e||"selected"===e&&t.dom===c()||"option"===t.tag&&t.dom.parentNode===n.activeElement}(t,e)||"object"==typeof r)){if("o"===e[0]&&"n"===e[1])return I(t,e,r);if("xlink:"===e.slice(0,6))t.dom.setAttributeNS("http://www.w3.org/1999/xlink",e.slice(6),r);else if("style"===e)D(t.dom,i,r);else if(A(t,e,o)){if("value"===e){if(("input"===t.tag||"textarea"===t.tag)&&t.dom.value===""+r&&t.dom===c())return;if("select"===t.tag&&null!==i&&t.dom.value===""+r)return;if("option"===t.tag&&null!==i&&t.dom.value===""+r)return}"input"===t.tag&&"type"===e?t.dom.setAttribute(e,r):t.dom[e]=r}else"boolean"==typeof r?r?t.dom.setAttribute(e,""):t.dom.removeAttribute(e):t.dom.setAttribute("className"===e?"class":e,r)}}function k(t,e,n,i){if("key"!==e&&"is"!==e&&null!=n&&!j(e))if("o"!==e[0]||"n"!==e[1]||j(e))if("style"===e)D(t.dom,n,null);else if(!A(t,e,i)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===c())||"input"===t.tag&&"type"===e){var r=e.indexOf(":");-1!==r&&(e=e.slice(r+1)),!1!==n&&t.dom.removeAttribute("className"===e?"class":e)}else t.dom[e]=null;else I(t,e,void 0)}function j(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function A(t,e,n){return void 0===n&&(t.tag.indexOf("-")>-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var E=/[A-Z]/g;function P(t){return"-"+t.toLowerCase()}function _(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(E,P)}function D(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var i in t.style.cssText="",n){null!=(r=n[i])&&t.style.setProperty(_(i),String(r))}else{for(var i in n){var r;null!=(r=n[i])&&(r=String(r))!==String(e[i])&&t.style.setProperty(_(i),r)}for(var i in e)null!=e[i]&&null==n[i]&&t.style.removeProperty(_(i))}}function $(){this._=e}function I(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new $,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function M(t,e,n){"function"==typeof t.oninit&&a.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(a.bind(t.oncreate,e))}function L(t,e,n){"function"==typeof t.onupdate&&n.push(a.bind(t.onupdate,e))}return $.prototype=Object.create(null),$.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,r){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],s=c(),a=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=i.normalizeChildren(Array.isArray(n)?n:[n]);var u=e;try{e="function"==typeof r?r:void 0,f(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===a?void 0:a)}finally{e=u}t.vnodes=n,null!=s&&c()!==s&&"function"==typeof s.focus&&s.focus();for(var l=0;l<o.length;l++)o[l]()}}},function(t,e,n){"use strict";var i=n(29);t.exports=function(t,e,n){var r=[],o=!1,s=!1;function a(){if(o)throw new Error("Nested m.redraw.sync() call");o=!0;for(var e=0;e<r.length;e+=2)try{t(r[e],i(r[e+1]),c)}catch(t){n.error(t)}o=!1}function c(){s||(s=!0,e((function(){s=!1,a()})))}return c.sync=a,{mount:function(e,n){if(null!=n&&null==n.view&&"function"!=typeof n)throw new TypeError("m.mount(element, component) expects a component, not a vnode");var o=r.indexOf(e);o>=0&&(r.splice(o,2),t(e,[],c)),null!=n&&(r.push(e,n),t(e,i(n),c))},redraw:c}}},function(t,e,n){"use strict";var i=n(83);t.exports=function(t,e,n){var r=0;function o(t){return new e(t)}function s(t){return function(r,s){"string"!=typeof r?(s=r,r=r.url):null==s&&(s={});var a=new e((function(e,n){t(i(r,s.params),s,(function(t){if("function"==typeof s.type)if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=new s.type(t[n]);else t=new s.type(t);e(t)}),n)}));if(!0===s.background)return a;var c=0;function u(){0==--c&&"function"==typeof n&&n()}return function t(e){var n=e.then;return e.constructor=o,e.then=function(){c++;var i=n.apply(e,arguments);return i.then(u,(function(t){if(u(),0===c)throw t})),t(i)},e}(a)}}function a(t,e){for(var n in t.headers)if({}.hasOwnProperty.call(t.headers,n)&&e.test(n))return!0;return!1}return o.prototype=e.prototype,o.__proto__=e,{request:s((function(e,n,i,r){var o,s=null!=n.method?n.method.toUpperCase():"GET",c=n.body,u=!(null!=n.serialize&&n.serialize!==JSON.serialize||c instanceof t.FormData),l=n.responseType||("function"==typeof n.extract?"":"json"),d=new t.XMLHttpRequest,h=!1,f=d,p=d.abort;for(var m in d.abort=function(){h=!0,p.call(this)},d.open(s,e,!1!==n.async,"string"==typeof n.user?n.user:void 0,"string"==typeof n.password?n.password:void 0),u&&null!=c&&!a(n,/^content-type$/i)&&d.setRequestHeader("Content-Type","application/json; charset=utf-8"),"function"==typeof n.deserialize||a(n,/^accept$/i)||d.setRequestHeader("Accept","application/json, text/*"),n.withCredentials&&(d.withCredentials=n.withCredentials),n.timeout&&(d.timeout=n.timeout),d.responseType=l,n.headers)({}).hasOwnProperty.call(n.headers,m)&&d.setRequestHeader(m,n.headers[m]);d.onreadystatechange=function(t){if(!h&&4===t.target.readyState)try{var o,s=t.target.status>=200&&t.target.status<300||304===t.target.status||/^file:\/\//i.test(e),a=t.target.response;if("json"===l?t.target.responseType||"function"==typeof n.extract||(a=JSON.parse(t.target.responseText)):l&&"text"!==l||null==a&&(a=t.target.responseText),"function"==typeof n.extract?(a=n.extract(t.target,n),s=!0):"function"==typeof n.deserialize&&(a=n.deserialize(a)),s)i(a);else{try{o=t.target.responseText}catch(t){o=a}var c=new Error(o);c.code=t.target.status,c.response=a,r(c)}}catch(t){r(t)}},"function"==typeof n.config&&(d=n.config(d,n,e)||d)!==f&&(o=d.abort,d.abort=function(){h=!0,o.call(this)}),null==c?d.send():"function"==typeof n.serialize?d.send(n.serialize(c)):c instanceof t.FormData?d.send(c):d.send(JSON.stringify(c))})),jsonp:s((function(e,n,i,o){var s=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+r++,a=t.document.createElement("script");t[s]=function(e){delete t[s],a.parentNode.removeChild(a),i(e)},a.onerror=function(){delete t[s],a.parentNode.removeChild(a),o(new Error("JSONP request failed"))},a.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(s),t.document.documentElement.appendChild(a)}))}}},function(t,e,n){"use strict";var i=n(82);t.exports=n(128)(window,i)},function(t,e,n){"use strict";(function(e){var i=n(29),r=n(95),o=n(97),s=n(83),a=n(84),c=n(129),u=n(102),l={};t.exports=function(t,n){var d;function h(e,n,i){if(e=s(e,n),null!=d){d();var r=i?i.state:null,o=i?i.title:null;i&&i.replace?t.history.replaceState(r,o,y.prefix+e):t.history.pushState(r,o,y.prefix+e)}else t.location.href=y.prefix+e}var f,p,m,v,g=l,b=y.SKIP={};function y(r,s,w){if(null==r)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var x,N=0,C=Object.keys(w).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:w[t],check:c(t)}})),T="function"==typeof e?e:setTimeout,O=o.resolve(),S=!1;if(d=null,null!=s){var k=a(s);if(!C.some((function(t){return t.check(k)})))throw new ReferenceError("Default route doesn't match any known routes")}function j(){S=!1;var e=t.location.hash;"#"!==y.prefix[0]&&(e=t.location.search+e,"?"!==y.prefix[0]&&"/"!==(e=t.location.pathname+e)[0]&&(e="/"+e));var i=e.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(y.prefix.length),r=a(i);function o(){if(i===s)throw new Error("Could not resolve default route "+s);h(s,null,{replace:!0})}u(r.params,t.history.state),function t(e){for(;e<C.length;e++)if(C[e].check(r)){var s=C[e].component,a=C[e].route,c=s,u=v=function(o){if(u===v){if(o===b)return t(e+1);f=null==o||"function"!=typeof o.view&&"function"!=typeof o?"div":o,p=r.params,m=i,v=null,g=s.render?s:null,2===N?n.redraw():(N=2,n.redraw.sync())}};return void(s.view||"function"==typeof s?(s={},u(c)):s.onmatch?O.then((function(){return s.onmatch(r.params,i,a)})).then(u,o):u("div"))}o()}(0)}return d=function(){S||(S=!0,T(j))},"function"==typeof t.history.pushState?(x=function(){t.removeEventListener("popstate",d,!1)},t.addEventListener("popstate",d,!1)):"#"===y.prefix[0]&&(d=null,x=function(){t.removeEventListener("hashchange",j,!1)},t.addEventListener("hashchange",j,!1)),n.mount(r,{onbeforeupdate:function(){return!(!(N=N?2:1)||l===g)},oncreate:j,onremove:x,view:function(){if(N&&l!==g){var t=[i(f,p.key,p)];return g&&(t=g.render(t[0])),t}}})}return y.set=function(t,e,n){null!=v&&((n=n||{}).replace=!0),v=null,h(t,e,n)},y.get=function(){return m},y.prefix="#!",y.Link={view:function(t){var e,n,i=t.attrs.options,o={};u(o,t.attrs),o.selector=o.options=o.key=o.oninit=o.oncreate=o.onbeforeupdate=o.onupdate=o.onbeforeremove=o.onremove=null;var s=r(t.attrs.selector||"a",o,t.children);return(s.attrs.disabled=Boolean(s.attrs.disabled))?(s.attrs.href=null,s.attrs["aria-disabled"]="true",s.attrs.onclick=null):(e=s.attrs.onclick,n=s.attrs.href,s.attrs.href=y.prefix+n,s.attrs.onclick=function(t){var r;"function"==typeof e?r=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===r||t.defaultPrevented||0!==t.button&&0!==t.which&&1!==t.which||t.currentTarget.target&&"_self"!==t.currentTarget.target||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||(t.preventDefault(),t.redraw=!1,y.set(n,null,i))}),s}},y.param=function(t){return p&&null!=t?p[t]:p},y}}).call(this,n(99).setImmediate)},function(t,e,n){"use strict";var i=n(84);t.exports=function(t){var e=i(t),n=Object.keys(e.params),r=[],o=new RegExp("^"+e.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,(function(t,e,n){return null==e?"\\"+t:(r.push({k:e,r:"..."===n}),"..."===n?"(.*)":"."===n?"([^/]+)\\.":"([^/]+)"+(n||""))}))+"$");return function(t){for(var i=0;i<n.length;i++)if(e.params[n[i]]!==t.params[n[i]])return!1;if(!r.length)return o.test(t.path);var s=o.exec(t.path);if(null==s)return!1;for(i=0;i<r.length;i++)t.params[r[i].k]=r[i].r?s[i+1]:decodeURIComponent(s[i+1]);return!0}}},function(t,e,n){var i=n(25),r=n(55);void 0===r.dayjs&&(r.dayjs=i),t.exports=i},function(t,e){!function(t){"use strict";var e=function e(n,i){this.options=t.extend({},e.DEFAULTS,i);var r=this.options.target===e.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=r.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var i=t(this),r=i.data("bs.affix"),o="object"==typeof n&&n;r||i.data("bs.affix",r=new e(this,o)),"string"==typeof n&&r[n]()}))}e.VERSION="3.4.1",e.RESET="affix affix-top affix-bottom",e.DEFAULTS={offset:0,target:window},e.prototype.getState=function(t,e,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return r<n&&"top";if("bottom"==this.affixed)return null!=n?!(r+this.unpin<=o.top)&&"bottom":!(r+s<=t-i)&&"bottom";var a=null==this.affixed,c=a?r:o.top;return null!=n&&r<=n?"top":null!=i&&c+(a?s:e)>=t-i&&"bottom"},e.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(e.RESET).addClass("affix");var t=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-t},e.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var a=this.getState(s,n,r,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var c="affix"+(a?"-"+a:""),u=t.Event(c+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(c).trigger(c.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var i=t.fn.affix;t.fn.affix=n,t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var e=t(this),i=e.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),n.call(e,i)}))}))}(jQuery)},function(t,e){!function(t){"use strict";var e='[data-toggle="dropdown"]',n=function(e){t(e).on("click.bs.dropdown",this.toggle)};function i(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==n?t(document).find(n):null;return i&&i.length?i:e.parent()}function r(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),r=i(e),o={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(r[0],n.target)||(r.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(e.attr("aria-expanded","false"),r.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var o=i(n),s=o.hasClass("open");if(r(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",r);var a={relatedTarget:this};if(o.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},n.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var r=t(this);if(n.preventDefault(),n.stopPropagation(),!r.is(".disabled, :disabled")){var o=i(r),s=o.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&o.find(e).trigger("focus"),r.trigger("click");var a=o.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var c=a.index(n.target);38==n.which&&c>0&&c--,40==n.which&&c<a.length-1&&c++,~c||(c=0),a.eq(c).trigger("focus")}}}};var o=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var i=t(this),r=i.data("bs.dropdown");r||i.data("bs.dropdown",r=new n(this)),"string"==typeof e&&r[e].call(i)}))},t.fn.dropdown.Constructor=n,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=o,this},t(document).on("click.bs.dropdown.data-api",r).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",e,n.prototype.toggle).on("keydown.bs.dropdown.data-api",e,n.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",n.prototype.keydown)}(jQuery)},function(t,e){!function(t){"use strict";var e=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};function n(n,i){return this.each((function(){var r=t(this),o=r.data("bs.modal"),s=t.extend({},e.DEFAULTS,r.data(),"object"==typeof n&&n);o||r.data("bs.modal",o=new e(this,s)),"string"==typeof n?o[n](i):s.show&&o.show(i)}))}e.VERSION="3.4.1",e.TRANSITION_DURATION=300,e.BACKDROP_TRANSITION_DURATION=150,e.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},e.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},e.prototype.show=function(n){var i=this,r=t.Event("show.bs.modal",{relatedTarget:n});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",(function(){i.$element.one("mouseup.dismiss.bs.modal",(function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var r=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),r&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:n});r?i.$dialog.one("bsTransitionEnd",(function(){i.$element.trigger("focus").trigger(o)})).emulateTransitionEnd(e.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)})))},e.prototype.hide=function(n){n&&n.preventDefault(),n=t.Event("hide.bs.modal"),this.$element.trigger(n),this.isShown&&!n.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(e.TRANSITION_DURATION):this.hideModal())},e.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy((function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}),this))},e.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy((function(t){27==t.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},e.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},e.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop((function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")}))},e.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},e.prototype.backdrop=function(n){var i=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&r;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy((function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())}),this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!n)return;o?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):n()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){i.removeBackdrop(),n&&n()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):s()}else n&&n()},e.prototype.handleUpdate=function(){this.adjustDialog()},e.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},e.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},e.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},e.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",e+n),t(this.fixedContent).each((function(e,i){var r=i.style.paddingRight,o=t(i).css("padding-right");t(i).data("padding-right",r).css("padding-right",parseFloat(o)+n+"px")})))},e.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),t(this.fixedContent).each((function(e,n){var i=t(n).data("padding-right");t(n).removeData("padding-right"),n.style.paddingRight=i||""}))},e.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=n,t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(e){var i=t(this),r=i.attr("href"),o=i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,""),s=t(document).find(o),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},s.data(),i.data());i.is("a")&&e.preventDefault(),s.one("show.bs.modal",(function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",(function(){i.is(":visible")&&i.trigger("focus")}))})),n.call(s,a,this)}))}(jQuery)},function(t,e){!function(t){"use strict";var e=["sanitize","whiteList","sanitizeFn"],n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],i={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,o=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function s(e,i){var s=e.nodeName.toLowerCase();if(-1!==t.inArray(s,i))return-1===t.inArray(s,n)||Boolean(e.nodeValue.match(r)||e.nodeValue.match(o));for(var a=t(i).filter((function(t,e){return e instanceof RegExp})),c=0,u=a.length;c<u;c++)if(s.match(a[c]))return!0;return!1}function a(e,n,i){if(0===e.length)return e;if(i&&"function"==typeof i)return i(e);if(!document.implementation||!document.implementation.createHTMLDocument)return e;var r=document.implementation.createHTMLDocument("sanitization");r.body.innerHTML=e;for(var o=t.map(n,(function(t,e){return e})),a=t(r.body).find("*"),c=0,u=a.length;c<u;c++){var l=a[c],d=l.nodeName.toLowerCase();if(-1!==t.inArray(d,o))for(var h=t.map(l.attributes,(function(t){return t})),f=[].concat(n["*"]||[],n[d]||[]),p=0,m=h.length;p<m;p++)s(h[p],f)||l.removeAttribute(h[p].nodeName);else l.parentNode.removeChild(l)}return r.body.innerHTML}var c=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};c.VERSION="3.4.1",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},c.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var s=r[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",c="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(c+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(n){var i=this.$element.data();for(var r in i)i.hasOwnProperty(r)&&-1!==t.inArray(r,e)&&delete i[r];return(n=t.extend({},this.getDefaults(),i,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=a(n.template,n.whiteList,n.sanitizeFn)),n},c.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,(function(t,i){n[t]!=i&&(e[t]=i)})),e},c.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},c.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},c.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},c.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var i=this,r=this.tip(),o=this.getUID(this.type);this.setContent(),r.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&r.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,u=a.test(s);u&&(s=s.replace(a,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?r.appendTo(t(document).find(this.options.container)):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),d=r[0].offsetWidth,h=r[0].offsetHeight;if(u){var f=s,p=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+h>p.bottom?"top":"top"==s&&l.top-h<p.top?"bottom":"right"==s&&l.right+d>p.width?"left":"left"==s&&l.left-d<p.left?"right":s,r.removeClass(f).addClass(s)}var m=this.getCalculatedOffset(s,l,d,h);this.applyPlacement(m,s);var v=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};t.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",v).emulateTransitionEnd(c.TRANSITION_DURATION):v()}},c.prototype.applyPlacement=function(e,n){var i=this.tip(),r=i[0].offsetWidth,o=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var c=i[0].offsetWidth,u=i[0].offsetHeight;"top"==n&&u!=o&&(e.top=e.top+o-u);var l=this.getViewportAdjustedDelta(n,e,c,u);l.left?e.left+=l.left:e.top+=l.top;var d=/top|bottom/.test(n),h=d?2*l.left-r+c:2*l.top-o+u,f=d?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(h,i[0][f],d)},c.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},c.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=a(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},c.prototype.hide=function(e){var n=this,i=t(this.$tip),r=t.Event("hide.bs."+this.type);function o(){"in"!=n.hoverState&&i.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}if(this.$element.trigger(r),!r.isDefaultPrevented())return i.removeClass("in"),t.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",o).emulateTransitionEnd(c.TRANSITION_DURATION):o(),this.hoverState=null,this},c.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(e){var n=(e=e||this.$element)[0],i="BODY"==n.tagName,r=n.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=window.SVGElement&&n instanceof window.SVGElement,s=i?{top:0,left:0}:o?null:e.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},c=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,a,c,s)},c.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},c.prototype.getViewportAdjustedDelta=function(t,e,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-s.scroll,c=e.top+o-s.scroll+i;a<s.top?r.top=s.top-a:c>s.top+s.height&&(r.top=s.top+s.height-c)}else{var u=e.left-o,l=e.left+o+n;u<s.left?r.left=s.left-u:l>s.right&&(r.left=s.left+s.width-l)}return r},c.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},c.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},c.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null}))},c.prototype.sanitizeHtml=function(t){return a(t,this.options.whiteList,this.options.sanitizeFn)};var u=t.fn.tooltip;t.fn.tooltip=function(e){return this.each((function(){var n=t(this),i=n.data("bs.tooltip"),r="object"==typeof e&&e;!i&&/destroy|hide/.test(e)||(i||n.data("bs.tooltip",i=new c(this,r)),"string"==typeof e&&i[e]())}))},t.fn.tooltip.Constructor=c,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=u,this}}(jQuery)},function(t,e){!function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",(function(){n=!0}));return setTimeout((function(){n||t(i).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})}))}(jQuery)},function(t,e){!function(t){function e(e){if("string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys){var n=e.handler,i=e.data.keys.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!(t.hotkeys.options.filterInputAcceptingElements&&t.hotkeys.textInputTypes.test(e.target.nodeName)||t.hotkeys.options.filterContentEditable&&t(e.target).attr("contenteditable")||t.hotkeys.options.filterTextInputs&&t.inArray(e.target.type,t.hotkeys.textAcceptingInputTypes)>-1)){var r="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],o=String.fromCharCode(e.which).toLowerCase(),s="",a={};t.each(["alt","ctrl","shift"],(function(t,n){e[n+"Key"]&&r!==n&&(s+=n+"+")})),e.metaKey&&!e.ctrlKey&&"meta"!==r&&(s+="meta+"),e.metaKey&&"meta"!==r&&s.indexOf("alt+ctrl+shift+")>-1&&(s=s.replace("alt+ctrl+shift+","hyper+")),r?a[s+r]=!0:(a[s+o]=!0,a[s+t.hotkeys.shiftNums[o]]=!0,"shift+"===s&&(a[t.hotkeys.shiftNums[o]]=!0));for(var c=0,u=i.length;c<u;c++)if(a[i[c]])return n.apply(this,arguments)}}}}t.hotkeys={version:"0.2.0",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},t.each(["keydown","keyup","keypress"],(function(){t.event.special[this]={add:e}}))}(jQuery||this.jQuery||window.jQuery)},function(t,e){Array.prototype.flat||(Array.prototype.flat=function t(e){return void 0===e&&(e=1),e>0?Array.prototype.reduce.call(this,(function(n,i){return n.concat(Array.isArray(i)?t.call(i,e-1):i)}),[]):[].concat(this)})},function(t,e,n){!function(){"use strict";n.SKIP={},n.lift=function(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1);return r(e).map((function(e){return t.apply(void 0,e)}))},n.scan=function(t,e,i){var r=i.map((function(i){var r=t(e,i);return r!==n.SKIP&&(e=r),r}));return r(e),r},n.merge=r,n.combine=i,n.scanMerge=function(t,e){var n=t.map((function(t){return t[0]})),r=i((function(){var i=arguments[arguments.length-1];return n.forEach((function(n,r){i.indexOf(n)>-1&&(e=t[r][1](e,n()))})),e}),n);return r(e),r},n["fantasy-land/of"]=n;var e=!1;function n(t){var e,r=[],s=[];function a(e){return arguments.length&&e!==n.SKIP&&(t=e,o(a)&&(a._changing(),a._state="active",r.forEach((function(e,n){e(s[n](t))})))),t}function c(){return(e=n()).map((function(t){return!0===t&&(a._parents.forEach((function(t){t._unregisterChild(a)})),a._state="ended",a._parents.length=r.length=s.length=0),t})),e}return a.constructor=n,a._state=arguments.length&&t!==n.SKIP?"active":"pending",a._parents=[],a._changing=function(){o(a)&&(a._state="changing"),r.forEach((function(t){t._changing()}))},a._map=function(e,i){var o=i?n():n(e(t));return o._parents.push(a),r.push(o),s.push(e),o},a.map=function(t){return a._map(t,"active"!==a._state)},a.toJSON=function(){return null!=t&&"function"==typeof t.toJSON?t.toJSON():t},a["fantasy-land/map"]=a.map,a["fantasy-land/ap"]=function(t){return i((function(t,e){return t()(e())}),[t,a])},a._unregisterChild=function(t){var e=r.indexOf(t);-1!==e&&(r.splice(e,1),s.splice(e,1))},Object.defineProperty(a,"end",{get:function(){return e||c()}}),a}function i(t,e){var i=e.every((function(t){if(t.constructor!==n)throw new Error("Ensure that each item passed to stream.combine/stream.merge/lift is a stream");return"active"===t._state})),r=i?n(t.apply(null,e.concat([e]))):n(),o=[],s=e.map((function(n){return n._map((function(s){return o.push(n),(i||e.every((function(t){return"pending"!==t._state})))&&(i=!0,r(t.apply(null,e.concat([o]))),o=[]),s}),!0)})),a=r.end.map((function(t){!0===t&&(s.forEach((function(t){t.end(!0)})),a.end(!0))}));return r}function r(t){return i((function(){return t.map((function(t){return t()}))}),t)}function o(t){return"pending"===t._state||"active"===t._state||"changing"===t._state}Object.defineProperty(n,"HALT",{get:function(){return e||console.log("HALT is deprecated and has been renamed to SKIP"),e=!0,n.SKIP}}),t.exports=n}()},function(t,e){function n(e,i){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,n(e,i)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);s=!0);}catch(t){a=!0,r=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var i=n(145);t.exports=function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,n){var i=n(148),r=n(55);void 0===r.punycode&&(r.punycode=i),t.exports=i},function(t,e,n){(function(t,i){var r;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof i&&i;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,u=/^xn--/,l=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,p=String.fromCharCode;function m(t){throw new RangeError(h[t])}function v(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function g(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+v((t=t.replace(d,".")).split("."),e).join(".")}function b(t){for(var e,n,i=[],r=0,o=t.length;r<o;)(e=t.charCodeAt(r++))>=55296&&e<=56319&&r<o?56320==(64512&(n=t.charCodeAt(r++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),r--):i.push(e);return i}function y(t){return v(t,(function(t){var e="";return t>65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=p(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function x(t,e,n){var i=0;for(t=n?f(t/700):t>>1,t+=f(t/e);t>455;i+=36)t=f(t/35);return f(i+36*t/(t+38))}function N(t){var e,n,i,r,o,s,a,u,l,d,h,p=[],v=t.length,g=0,b=128,w=72;for((n=t.lastIndexOf("-"))<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&m("not-basic"),p.push(t.charCodeAt(i));for(r=n>0?n+1:0;r<v;){for(o=g,s=1,a=36;r>=v&&m("invalid-input"),((u=(h=t.charCodeAt(r++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||u>f((c-g)/s))&&m("overflow"),g+=u*s,!(u<(l=a<=w?1:a>=w+26?26:a-w));a+=36)s>f(c/(d=36-l))&&m("overflow"),s*=d;w=x(g-o,e=p.length+1,0==o),f(g/e)>c-b&&m("overflow"),b+=f(g/e),g%=e,p.splice(g++,0,b)}return y(p)}function C(t){var e,n,i,r,o,s,a,u,l,d,h,v,g,y,N,C=[];for(v=(t=b(t)).length,e=128,n=0,o=72,s=0;s<v;++s)(h=t[s])<128&&C.push(p(h));for(i=r=C.length,r&&C.push("-");i<v;){for(a=c,s=0;s<v;++s)(h=t[s])>=e&&h<a&&(a=h);for(a-e>f((c-n)/(g=i+1))&&m("overflow"),n+=(a-e)*g,e=a,s=0;s<v;++s)if((h=t[s])<e&&++n>c&&m("overflow"),h==e){for(u=n,l=36;!(u<(d=l<=o?1:l>=o+26?26:l-o));l+=36)N=u-d,y=36-d,C.push(p(w(d+N%y,0))),u=f(N/y);C.push(p(w(u,0))),o=x(n,g,i==r),n=0,++i}++n,++e}return C.join("")}a={version:"1.4.1",ucs2:{decode:b,encode:y},decode:N,encode:C,toASCII:function(t){return g(t,(function(t){return l.test(t)?"xn--"+C(t):t}))},toUnicode:function(t){return g(t,(function(t){return u.test(t)?N(t.slice(4).toLowerCase()):t}))}},void 0===(r=function(){return a}.call(e,n,e,t))||(t.exports=r)}()}).call(this,n(149)(t),n(52))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var i=n(151),r=n(55);void 0===r.ColorThief&&(r.ColorThief=i),t.exports=i},function(t,e){
/*!
* Color Thief v2.0
* by Lokesh Dhakar - http://www.lokeshdhakar.com
*
* Thanks
* ------
* Nick Rabinowitz - For creating quantize.js.
* John Schulz - For clean up and optimization. @JFSIII
* Nathan Spady - For adding drag and drop support to the demo page.
*
* License
* -------
* Copyright 2011, 2015 Lokesh Dhakar
* Released under the MIT license
* https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE
*
*/
var n=function(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),document.body.appendChild(this.canvas),this.width=this.canvas.width=t.width,this.height=this.canvas.height=t.height,this.context.drawImage(t,0,0,this.width,this.height)};n.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},n.prototype.update=function(t){this.context.putImageData(t,0,0)},n.prototype.getPixelCount=function(){return this.width*this.height},n.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},n.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var i=function(){};
/*!
* quantize.js Copyright 2008 Nick Rabinowitz.
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
/*!
* Block below copied from Protovis: http://mbostock.github.com/protovis/
* Copyright 2010 Stanford Visualization Group
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php
*/if(i.prototype.getColor=function(t,e){return this.getPalette(t,5,e)[0]},i.prototype.getPalette=function(t,e,i){void 0===e&&(e=10),(void 0===i||1>i)&&(i=10);for(var r,s,a,c,u=new n(t),l=u.getImageData().data,d=u.getPixelCount(),h=[],f=0;d>f;f+=i)s=l[(r=4*f)+0],a=l[r+1],c=l[r+2],l[r+3]>=125&&(s>250&&a>250&&c>250||h.push([s,a,c]));var p=o.quantize(h,e),m=p?p.palette():null;return u.removeCanvas(),m},!r)var r={map:function(t,e){var n={};return e?t.map((function(t,i){return n.index=i,e.call(n,t)})):t.slice()},naturalOrder:function(t,e){return e>t?-1:t>e?1:0},sum:function(t,e){var n={};return t.reduce(e?function(t,i,r){return n.index=r,t+e.call(n,i)}:function(t,e){return t+e},0)},max:function(t,e){return Math.max.apply(null,e?r.map(t,e):t)}};var o=function(){function t(t,e,n){return(t<<2*c)+(e<<c)+n}function e(t){function e(){n.sort(t),i=!0}var n=[],i=!1;return{push:function(t){n.push(t),i=!1},peek:function(t){return i||e(),void 0===t&&(t=n.length-1),n[t]},pop:function(){return i||e(),n.pop()},size:function(){return n.length},map:function(t){return n.map(t)},debug:function(){return i||e(),n}}}function n(t,e,n,i,r,o,s){var a=this;a.r1=t,a.r2=e,a.g1=n,a.g2=i,a.b1=r,a.b2=o,a.histo=s}function i(){this.vboxes=new e((function(t,e){return r.naturalOrder(t.vbox.count()*t.vbox.volume(),e.vbox.count()*e.vbox.volume())}))}function o(e){var n,i,r,o,s=new Array(1<<3*c);return e.forEach((function(e){i=e[0]>>u,r=e[1]>>u,o=e[2]>>u,n=t(i,r,o),s[n]=(s[n]||0)+1})),s}function s(t,e){var i,r,o,s=1e6,a=0,c=1e6,l=0,d=1e6,h=0;return t.forEach((function(t){i=t[0]>>u,r=t[1]>>u,o=t[2]>>u,s>i?s=i:i>a&&(a=i),c>r?c=r:r>l&&(l=r),d>o?d=o:o>h&&(h=o)})),new n(s,a,c,l,d,h,e)}function a(e,n){if(n.count()){var i=n.r2-n.r1+1,o=n.g2-n.g1+1,s=n.b2-n.b1+1,a=r.max([i,o,s]);if(1==n.count())return[n.copy()];var c,u,l,d,h=0,f=[],p=[];if(a==i)for(c=n.r1;c<=n.r2;c++){for(d=0,u=n.g1;u<=n.g2;u++)for(l=n.b1;l<=n.b2;l++)d+=e[t(c,u,l)]||0;h+=d,f[c]=h}else if(a==o)for(c=n.g1;c<=n.g2;c++){for(d=0,u=n.r1;u<=n.r2;u++)for(l=n.b1;l<=n.b2;l++)d+=e[t(u,c,l)]||0;h+=d,f[c]=h}else for(c=n.b1;c<=n.b2;c++){for(d=0,u=n.r1;u<=n.r2;u++)for(l=n.g1;l<=n.g2;l++)d+=e[t(u,l,c)]||0;h+=d,f[c]=h}return f.forEach((function(t,e){p[e]=h-t})),function(t){var e,i,r,o,s,a=t+"1",u=t+"2",l=0;for(c=n[a];c<=n[u];c++)if(f[c]>h/2){for(r=n.copy(),o=n.copy(),e=c-n[a],s=(i=n[u]-c)>=e?Math.min(n[u]-1,~~(c+i/2)):Math.max(n[a],~~(c-1-e/2));!f[s];)s++;for(l=p[s];!l&&f[s-1];)l=p[--s];return r[u]=s,o[a]=r[u]+1,[r,o]}}(a==i?"r":a==o?"g":"b")}}var c=5,u=8-c,l=1e3,d=.75;return n.prototype={volume:function(t){var e=this;return(!e._volume||t)&&(e._volume=(e.r2-e.r1+1)*(e.g2-e.g1+1)*(e.b2-e.b1+1)),e._volume},count:function(e){var n=this,i=n.histo;if(!n._count_set||e){var r,o,s,a=0;for(r=n.r1;r<=n.r2;r++)for(o=n.g1;o<=n.g2;o++)for(s=n.b1;s<=n.b2;s++)index=t(r,o,s),a+=i[index]||0;n._count=a,n._count_set=!0}return n._count},copy:function(){var t=this;return new n(t.r1,t.r2,t.g1,t.g2,t.b1,t.b2,t.histo)},avg:function(e){var n=this,i=n.histo;if(!n._avg||e){var r,o,s,a,u=0,l=1<<8-c,d=0,h=0,f=0;for(o=n.r1;o<=n.r2;o++)for(s=n.g1;s<=n.g2;s++)for(a=n.b1;a<=n.b2;a++)u+=r=i[t(o,s,a)]||0,d+=r*(o+.5)*l,h+=r*(s+.5)*l,f+=r*(a+.5)*l;n._avg=u?[~~(d/u),~~(h/u),~~(f/u)]:[~~(l*(n.r1+n.r2+1)/2),~~(l*(n.g1+n.g2+1)/2),~~(l*(n.b1+n.b2+1)/2)]}return n._avg},contains:function(t){var e=this,n=t[0]>>u;return gval=t[1]>>u,bval=t[2]>>u,n>=e.r1&&n<=e.r2&&gval>=e.g1&&gval<=e.g2&&bval>=e.b1&&bval<=e.b2}},i.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map((function(t){return t.color}))},size:function(){return this.vboxes.size()},map:function(t){for(var e=this.vboxes,n=0;n<e.size();n++)if(e.peek(n).vbox.contains(t))return e.peek(n).color;return this.nearest(t)},nearest:function(t){for(var e,n,i,r=this.vboxes,o=0;o<r.size();o++)(e>(n=Math.sqrt(Math.pow(t[0]-r.peek(o).color[0],2)+Math.pow(t[1]-r.peek(o).color[1],2)+Math.pow(t[2]-r.peek(o).color[2],2)))||void 0===e)&&(e=n,i=r.peek(o).color);return i},forcebw:function(){var t=this.vboxes;t.sort((function(t,e){return r.naturalOrder(r.sum(t.color),r.sum(e.color))}));var e=t[0].color;e[0]<5&&e[1]<5&&e[2]<5&&(t[0].color=[0,0,0]);var n=t.length-1,i=t[n].color;i[0]>251&&i[1]>251&&i[2]>251&&(t[n].color=[255,255,255])}},{quantize:function(t,n){function c(t,e){for(var n,i=1,r=0;l>r;)if((n=t.pop()).count()){var o=a(u,n),s=o[0],c=o[1];if(!s)return;if(t.push(s),c&&(t.push(c),i++),i>=e)return;if(r++>l)return}else t.push(n),r++}if(!t.length||2>n||n>256)return!1;var u=o(t);u.forEach((function(){0}));var h=s(t,u),f=new e((function(t,e){return r.naturalOrder(t.count(),e.count())}));f.push(h),c(f,d*n);for(var p=new e((function(t,e){return r.naturalOrder(t.count()*t.volume(),e.count()*e.volume())}));f.size();)p.push(f.pop());c(p,n-p.size());for(var m=new i;p.size();)m.push(p.pop());return m}}}();t.exports=i},function(t,e){},,function(t,e,n){"use strict";n.r(e),n.d(e,"Extend",(function(){return i.a})),n.d(e,"app",(function(){return i.b})),n.d(e,"compat",(function(){return Ie}));var i=n(104),r=(n(147),n(150),n(107)),o=n(0),s=n(54),a=function(){function t(t){this.stack=[]}var e=t.prototype;return e.getCurrent=function(){return this.stack[this.stack.length-1]},e.getPrevious=function(){return this.stack[this.stack.length-2]},e.push=function(t,e,n){void 0===n&&(n=m.route.get());var i=this.stack[this.stack.length-2];i&&i.name===t&&this.stack.pop();var r=this.getCurrent();r&&r.name===t?Object.assign(r,{url:n,title:e}):this.stack.push({name:t,url:n,title:e})},e.canGoBack=function(){return this.stack.length>1},e.back=function(){if(!this.canGoBack())return this.home();this.stack.pop(),m.route.set(this.getCurrent().url)},e.backUrl=function(){return this.stack[this.stack.length-2].url},e.home=function(){this.stack.splice(0),Object(s.a)("/")},t}(),c=function(){function t(t){this.pinnedKey="panePinned",this.$element=$(t),this.pinned="true"===localStorage.getItem(this.pinnedKey),this.active=!1,this.showing=!1,this.render()}var e=t.prototype;return e.enable=function(){this.active=!0,this.render()},e.disable=function(){this.active=!1,this.showing=!1,this.render()},e.show=function(){clearTimeout(this.hideTimeout),this.showing=!0,this.render()},e.hide=function(){this.showing=!1,this.render()},e.onmouseleave=function(){this.hideTimeout=setTimeout(this.hide.bind(this),250)},e.togglePinned=function(){this.pinned=!this.pinned,localStorage.setItem(this.pinnedKey,this.pinned?"true":"false"),this.render()},e.render=function(){this.$element.toggleClass("panePinned",this.pinned).toggleClass("hasPane",this.active).toggleClass("paneShowing",this.showing)},t}(),u=n(31),l=n(5),d=n(4),h=n(7),f=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){return m("header",{className:"Hero DiscussionHero"},m("div",{className:"container"},m("ul",{className:"DiscussionHero-items"},Object(h.a)(this.items().toArray()))))},n.items=function(){var t=new l.a,e=this.attrs.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},Object(h.a)(n)),10),t.add("title",m("h2",{className:"DiscussionHero-title"},e.title())),t},e}(d.a),p=n(13),v=n(19),g=n(34),b=n(6),y=n(26),w=n(80),x=n(18),N=n(42),C=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t=this.attrs.discussion,e=this.attrs.lastPost&&t.replyCount(),n=t[e?"lastPostedUser":"user"](),i=t[e?"lastPostedAt":"createdAt"]();return m("span",null,e?Object(b.a)("fas fa-reply"):""," ",je.translator.trans("core.forum.discussion_list."+(e?"replied":"started")+"_text",{user:n,ago:Object(N.a)(i)}))},e}(d.a),T=n(56),O=n(14),S=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.handler=function(){return this.attrs.when()||void 0},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("beforeunload",this.boundHandler)},n.view=function(t){return t.children[0]},e}(d.a),k=n(85),j=n(8),A=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.composer=this.attrs.composer,this.loading=!1,this.attrs.confirmExit&&this.composer.preventClosingWhen((function(){return n.hasChanges()}),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")},n.view=function(){return m(S,{when:this.hasChanges.bind(this)},m("div",{className:"ComposerBody "+(this.attrs.className||"")},Object(v.a)(this.attrs.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},Object(h.a)(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},k.a.component({submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,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()}))),m(O.a,{display:"unset",containerClassName:Object(j.a)("ComposerBody-loading",this.loading&&"active"),size:"large"})))},n.hasChanges=function(){var t=this.composer.fields.content();return t&&t!==this.attrs.originalContent},n.headerItems=function(){return new l.a},n.onsubmit=function(){},n.loaded=function(){this.loading=!1,m.redraw()},e}(d.a),E=n(3),P=n(9);function _(t){je.composer.isFullScreen()&&(je.composer.minimize(),t.stopPropagation())}var D=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||Object(P.a)(je.translator.trans("core.forum.composer_reply.body_placeholder")),e.submitLabel=e.submitLabel||je.translator.trans("core.forum.composer_reply.submit_button"),e.confirmExit=e.confirmExit||Object(P.a)(je.translator.trans("core.forum.composer_reply.discard_confirmation"))};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.attrs.discussion;return e.add("title",m("h3",null,Object(b.a)("fas fa-reply")," ",m(p.a,{href:je.route.discussion(n),onclick:_},n.title()))),e},n.jumpToPreview=function(t){_(t),m.route.set(je.route.discussion(this.attrs.discussion,"reply"))},n.data=function(){return{content:this.composer.fields.content(),relationships:{discussion:this.attrs.discussion}}},n.onsubmit=function(){var t=this,e=this.attrs.discussion;this.loading=!0,m.redraw();var n=this.data();je.store.createRecord("posts").save(n).then((function(n){if(je.viewingDiscussion(e)){var i=je.current.get("stream");i.update().then((function(){return i.goToNumber(n.number())}))}else{var r,o=E.a.component({className:"Button Button--link",onclick:function(){m.route.set(je.route.post(n)),je.alerts.dismiss(r)}},je.translator.trans("core.forum.composer_reply.view_button"));r=je.alerts.show({type:"success",controls:[o]},je.translator.trans("core.forum.composer_reply.posted_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(A),I=n(15),M=n(11),L=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Object(M.a)(this.attrs.email||""),this.success=!1},n.className=function(){return"ForgotPasswordModal Modal--small"},n.title=function(){return je.translator.trans("core.forum.forgot_password.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},je.translator.trans("core.forum.forgot_password.email_sent_message")),m("div",{className:"Form-group"},m(E.a,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},je.translator.trans("core.forum.forgot_password.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},je.translator.trans("core.forum.forgot_password.text")),m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:Object(P.a)(je.translator.trans("core.forum.forgot_password.email_placeholder")),bidi:this.email,disabled:this.loading})),m("div",{className:"Form-group"},E.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},je.translator.trans("core.forum.forgot_password.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,je.request({method:"POST",url:je.forum.attribute("apiUrl")+"/forgot",body:{email:this.email()},errorHandler:this.onerror.bind(this)}).then((function(){e.success=!0,e.alert=null})).catch((function(){})).then(this.loaded.bind(this))},n.onerror=function(e){404===e.status&&(e.alert.content=je.translator.trans("core.forum.forgot_password.not_found_message")),t.prototype.onerror.call(this,e)},e}(I.a),R=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new l.a},e}(d.a),H=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.username=Object(M.a)(this.attrs.username||""),this.email=Object(M.a)(this.attrs.email||""),this.password=Object(M.a)(this.attrs.password||"")},n.className=function(){return"Modal--small SignUpModal"},n.title=function(){return je.translator.trans("core.forum.sign_up.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.isProvided=function(t){return this.attrs.provided&&-1!==this.attrs.provided.indexOf(t)},n.body=function(){return[this.attrs.token?"":m(R,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new l.a;return t.add("username",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"username",type:"text",placeholder:Object(P.a)(je.translator.trans("core.forum.sign_up.username_placeholder")),bidi:this.username,disabled:this.loading||this.isProvided("username")})),30),t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:Object(P.a)(je.translator.trans("core.forum.sign_up.email_placeholder")),bidi:this.email,disabled:this.loading||this.isProvided("email")})),20),this.attrs.token||t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",autocomplete:"new-password",placeholder:Object(P.a)(je.translator.trans("core.forum.sign_up.password_placeholder")),bidi:this.password,disabled:this.loading})),10),t.add("submit",m("div",{className:"Form-group"},m(E.a,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},je.translator.trans("core.forum.sign_up.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"SignUpModal-logIn"},je.translator.trans("core.forum.sign_up.log_in_text",{a:m("a",{onclick:this.logIn.bind(this)})}))]},n.logIn=function(){var t={identification:this.email()||this.username(),password:this.password()};je.modal.show(B,t)},n.onready=function(){this.attrs.username&&!this.attrs.email?this.$("[name=email]").select():this.$("[name=username]").select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.submitData();je.request({url:je.forum.attribute("baseUrl")+"/register",method:"POST",body:e,errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.submitData=function(){var t={username:this.username(),email:this.email()};return this.attrs.token?t.token=this.attrs.token:t.password=this.password(),t},e}(I.a),B=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.identification=Object(M.a)(this.attrs.identification||""),this.password=Object(M.a)(this.attrs.password||""),this.remember=Object(M.a)(!!this.attrs.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return je.translator.trans("core.forum.log_in.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.body=function(){return[m(R,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new l.a;return t.add("identification",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"identification",type:"text",placeholder:Object(P.a)(je.translator.trans("core.forum.log_in.username_or_email_placeholder")),bidi:this.identification,disabled:this.loading})),30),t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",autocomplete:"current-password",placeholder:Object(P.a)(je.translator.trans("core.forum.log_in.password_placeholder")),bidi:this.password,disabled:this.loading})),20),t.add("remember",m("div",{className:"Form-group"},m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:this.remember,disabled:this.loading}),je.translator.trans("core.forum.log_in.remember_me_label")))),10),t.add("submit",m("div",{className:"Form-group"},E.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},je.translator.trans("core.forum.log_in.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"LogInModal-forgotPassword"},m("a",{onclick:this.forgotPassword.bind(this)},je.translator.trans("core.forum.log_in.forgot_password_link"))),je.forum.attribute("allowSignUp")?m("p",{className:"LogInModal-signUp"},je.translator.trans("core.forum.log_in.sign_up_text",{a:m("a",{onclick:this.signUp.bind(this)})})):""]},n.forgotPassword=function(){var t=this.identification(),e=-1!==t.indexOf("@")?{email:t}:void 0;je.modal.show(L,e)},n.signUp=function(){var t={password:this.password()},e=this.identification();t[-1!==e.indexOf("@")?"email":"username"]=e,je.modal.show(H,t)},n.onready=function(){this.$("[name="+(this.identification()?"password":"identification")+"]").select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.identification(),n=this.password(),i=this.remember();je.session.login({identification:e,password:n,remember:i},{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.onerror=function(e){401===e.status&&(e.alert.content=je.translator.trans("core.forum.log_in.invalid_login_message")),t.prototype.onerror.call(this,e)},e}(I.a),F=n(23),U=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.currentTitle=this.attrs.currentTitle,this.newTitle=Object(M.a)(this.currentTitle)},n.className=function(){return"RenameDiscussionModal Modal--small"},n.title=function(){return je.translator.trans("core.forum.rename_discussion.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{className:"FormControl",bidi:this.newTitle,type:"text"})),m("div",{className:"Form-group"},E.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},je.translator.trans("core.forum.rename_discussion.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=this.newTitle(),i=this.currentTitle;if(n&&n!==i)return this.discussion.save({title:n}).then((function(){je.viewingDiscussion(e.discussion)&&je.current.get("stream").update(),m.redraw(),e.hide()})).catch((function(){e.loading=!1,m.redraw()}));this.hide()},e}(I.a),q={controls:function(t,e){var n=this,i=new l.a;return["user","moderation","destructive"].forEach((function(r){var o=n[r+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return i.add(t.itemName,t)})),i.add(r+"Separator",F.a.component()))})),i},userControls:function(t,e){var n=this,i=new l.a;return e instanceof dt&&i.add("reply",!je.session.user||t.canReply()?E.a.component({icon:"fas fa-reply",onclick:function(){return n.replyAction.bind(t)(!0,!1).catch((function(){}))}},je.translator.trans(je.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button")):E.a.component({icon:"fas fa-reply",className:"disabled",title:je.translator.trans("core.forum.discussion_controls.cannot_reply_text")},je.translator.trans("core.forum.discussion_controls.cannot_reply_button"))),i},moderationControls:function(t){var e=new l.a;return t.canRename()&&e.add("rename",E.a.component({icon:"fas fa-pencil-alt",onclick:this.renameAction.bind(t)},je.translator.trans("core.forum.discussion_controls.rename_button"))),e},destructiveControls:function(t){var e=new l.a;return t.isHidden()?(t.canHide()&&e.add("restore",E.a.component({icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},je.translator.trans("core.forum.discussion_controls.restore_button"))),t.canDelete()&&e.add("delete",E.a.component({icon:"fas fa-times",onclick:this.deleteAction.bind(t)},je.translator.trans("core.forum.discussion_controls.delete_forever_button")))):t.canHide()&&e.add("hide",E.a.component({icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},je.translator.trans("core.forum.discussion_controls.delete_button"))),e},replyAction:function(t,e){var n=this;return new Promise((function(i,r){return je.session.user?n.canReply()?(je.composer.composingReplyTo(n)&&!e||je.composer.load(D,{user:je.session.user,discussion:n}),je.composer.show(),t&&je.viewingDiscussion(n)&&!je.composer.isFullScreen()&&je.current.get("stream").goToNumber("reply"),i(je.composer)):r():(je.modal.show(B),r())}))},hideAction:function(){return this.pushAttributes({hiddenAt:new Date,hiddenUser:je.session.user}),this.save({isHidden:!0})},restoreAction:function(){return this.pushAttributes({hiddenAt:null,hiddenUser:null}),this.save({isHidden:!1})},deleteAction:function(){var t=this;if(confirm(Object(P.a)(je.translator.trans("core.forum.discussion_controls.delete_confirmation"))))return je.viewingDiscussion(this)&&je.history.back(),this.delete().then((function(){return je.discussions.removeDiscussion(t)}))},renameAction:function(){return je.modal.show(U,{currentTitle:this.title(),discussion:this})}};function z(t){var e,n,i,r,o=$(t),s=!1,a=!1,c=0,u=function(t,e){void 0===e&&(e={}),e.duration=e.duration||"fast",e.step=function(t){$(this).css("transform","translate("+t+"px, 0)")},o.find(".Slidable-content").animate({"background-position-x":t},e)},l=function(){u(0,{complete:function(){o.removeClass("sliding"),e.hide(),n.hide(),a=!1}})};return o.find(".Slidable-content").on("touchstart",(function(t){e=o.find(".Slidable-underneath--left:not(.disabled)"),n=o.find(".Slidable-underneath--right:not(.disabled)"),i=t.originalEvent.targetTouches[0].clientX,r=t.originalEvent.targetTouches[0].clientY,s=!0,c=0})).on("touchmove",(function(t){var u=t.originalEvent.targetTouches[0].clientX,l=t.originalEvent.targetTouches[0].clientY;if(s&&Math.abs(u-i)>Math.abs(l-r)&&(a=!0),s=!1,a){c=u-i;var d=function(t,e){if(t.length){var n="left"===e?c>0:c<0;n&&t.hasClass("Slidable-underneath--elastic")&&(c-=.5*c),t.toggle(n);var i=Math.max(0,Math.min(1,(Math.abs(c)-25)/50));t.find(".icon").css("transform","scale("+i+")")}else c=Math["left"===e?"min":"max"](0,c)};d(e,"left"),d(n,"right"),$(this).css("transform","translate("+c+"px, 0)"),$(this).css("background-position-x",c+"px"),o.toggleClass("sliding",!!c),t.preventDefault()}})).on("touchend",(function(){var t=function(t){t.click(),t.hasClass("Slidable-underneath--elastic")?l():u((c>0?1:-1)*o.width())};n.length&&c<-50?t(n):e.length&&c>50?t(e):l(),s=!1,a=!1})),{reset:l}}var W=n(86),V=n(24),Y=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.subtree=new T.a((function(){return n.attrs.discussion.freshness}),(function(){var t=je.session.user&&je.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return n.active()}))},n.elementAttrs=function(){return{className:Object(j.a)("DiscussionListItem",{active:this.active(),"DiscussionListItem--hidden":this.attrs.discussion.isHidden(),Slidable:"ontouchstart"in window})}},n.view=function(){var t=this.attrs.discussion,e=t.user(),n=t.isUnread(),i=t.isRead(),r=0,o=q.controls(t,this).toArray(),s=this.elementAttrs();if(this.attrs.params.q){var a=t.mostRelevantPost();a&&(r=a.number());var c=Object(W.a)(this.attrs.params.q);this.highlightRegExp=new RegExp(c+"|"+c.trim().replace(/\s+/g,"|"),"gi")}else r=Math.min(t.lastPostNumber(),(t.lastReadPostNumber()||0)+1);return m("div",s,o.length>0&&x.a.component({icon:"fas fa-ellipsis-v",className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right",accessibleToggleLabel:je.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},o),m("span",{className:"Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic"+(n?"":" disabled"),onclick:this.markAsRead.bind(this)},Object(b.a)("fas fa-check")),m("div",{className:Object(j.a)("DiscussionListItem-content","Slidable-content",{unread:n,read:i})},m(V.a,{text:je.translator.trans("core.forum.discussion_list.started_text",{user:e,ago:Object(y.a)(t.createdAt())}),position:"right"},m(p.a,{className:"DiscussionListItem-author",href:e?je.route.user(e):"#"},Object(v.a)(e,{title:""}))),m("ul",{className:"DiscussionListItem-badges badges"},Object(h.a)(t.badges().toArray())),m(p.a,{href:je.route.discussion(t,r),className:"DiscussionListItem-main"},m("h3",{className:"DiscussionListItem-title"},Object(g.a)(t.title(),this.highlightRegExp)),m("ul",{className:"DiscussionListItem-info"},Object(h.a)(this.infoItems().toArray()))),this.replyCountItem()))},n.oncreate=function(e){if(t.prototype.oncreate.call(this,e),"ontouchstart"in window){var n=z(this.$());this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return n.reset()}))}},n.onbeforeupdate=function(e,n){return t.prototype.onbeforeupdate.call(this,e,n),this.subtree.needsRebuild()},n.active=function(){return je.current.matches(dt,{discussion:this.attrs.discussion})},n.showFirstPost=function(){return-1!==["newest","oldest"].indexOf(this.attrs.params.sort)},n.showRepliesCount=function(){return"replies"===this.attrs.params.sort},n.markAsRead=function(){var t=this.attrs.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new l.a;if(this.attrs.params.q){var e=this.attrs.discussion.mostRelevantPost()||this.attrs.discussion.firstPost();if(e&&"comment"===e.contentType()){var n=Object(g.a)(e.contentPlain(),this.highlightRegExp,175);t.add("excerpt",n,-100)}}else t.add("terminalPost",C.component({discussion:this.attrs.discussion,lastPost:!this.showFirstPost()}));return t},n.replyCountItem=function(){var t=this.attrs.discussion;return!this.showRepliesCount()&&t.isUnread()?m("button",{className:"Button--ua-reset DiscussionListItem-count",onclick:this.markAsRead.bind(this)},m("span",{"aria-hidden":"true"},Object(w.a)(t.unreadCount())),m("span",{class:"visually-hidden"},je.translator.trans("core.forum.discussion_list.unread_replies_a11y_label",{count:t.replyCount()}))):m("span",{className:"DiscussionListItem-count"},m("span",{"aria-hidden":"true"},Object(w.a)(t.replyCount())),m("span",{class:"visually-hidden"},je.translator.trans("core.forum.discussion_list.total_replies_a11y_label",{count:t.replyCount()})))},e}(d.a),G=n(44),K=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t,e=this.attrs.state,n=e.getParams();if(e.isInitialLoading()||e.isLoadingNext()?t=m(O.a,null):e.hasNext()&&(t=E.a.component({className:"Button",onclick:e.loadNext.bind(e)},je.translator.trans("core.forum.discussion_list.load_more_button"))),e.isEmpty()){var i=je.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},G.a.component({text:i}))}return m("div",{className:"DiscussionList"+(e.isSearchResults()?" DiscussionList--searchResults":"")},m("ul",{className:"DiscussionList-discussions"},e.getPages().map((function(t){return t.items.map((function(t){return m("li",{key:t.id(),"data-id":t.id()},Y.component({discussion:t,params:n}))}))}))),m("div",{className:"DiscussionList-loadMore"},t))},e}(d.a),X=function(t){t.pageX<10&&je.pane.show()},J=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){if(this.attrs.state.hasItems())return m("div",{className:"DiscussionPage-list"},this.enoughSpace()&&m(K,{state:this.attrs.state}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n=$(e.dom),i=je.pane;if(n.hover(i.show.bind(i),i.onmouseleave.bind(i)),$(document).on("mousemove",X),je.previous.matches(dt)){var r=je.cache.discussionListPaneScrollTop||0;n.scrollTop(r)}else{var o=n.find(".DiscussionListItem.active");if(o.length){var s=n.offset().top,a=s+n.outerHeight(),c=o.offset().top,u=c+o.outerHeight();(c<s||u>a)&&n.scrollTop(n.scrollTop()-s+c)}}},n.onremove=function(t){je.cache.discussionListPaneScrollTop=$(t.dom).scrollTop(),$(document).off("mousemove",X)},n.enoughSpace=function(){return!$(".App-navigation").is(":visible")},e}(d.a),Q=n(36),Z=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},Object(v.a)(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))},e}(d.a),tt=n(21),et=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(t){t.className=t.className||"",t.surround=t.surround||function(t){return t()}};var n=e.prototype;return n.view=function(){return m("div",{className:this.attrs.className})},n.oncreate=function(e){var n,i=this;t.prototype.oncreate.call(this,e);var r=function(){if(i.attrs.composer.isVisible()){var t=i.attrs.composer.fields.content();n!==t&&(n=t,i.attrs.surround((function(){return s9e.TextFormatter.preview(n||"",e.dom)})))}};r(),this.updateInterval=setInterval(r,50)},n.onremove=function(e){t.prototype.onremove.call(this,e),clearInterval(this.updateInterval)},e}(d.a),nt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this;if(je.composer.composingReplyTo(this.attrs.discussion))return m("article",{className:"Post CommentPost editing"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",null,Object(v.a)(je.session.user,{className:"PostUser-avatar"}),Object(tt.a)(je.session.user)),m("ul",{className:"PostUser-badges badges"},Object(h.a)(je.session.user.badges().toArray())))),m(et,{className:"Post-body",composer:je.composer,surround:this.anchorPreview.bind(this)}));return m("article",{className:"Post ReplyPlaceholder",onclick:function(){q.replyAction.call(t.attrs.discussion,!0).catch((function(){}))}},m("header",{className:"Post-header"},Object(v.a)(je.session.user,{className:"PostUser-avatar"})," ",je.translator.trans("core.forum.post_stream.reply_placeholder")))},n.anchorPreview=function(t){var e=$(window).scrollTop()+$(window).height()>=$(document).height();t(),e&&$(window).scrollTop($(document).height())},e}(d.a),it=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.stream=this.attrs.stream,this.scrollListener=new Q.a(this.onscroll.bind(this))},n.view=function(){var t,e=this,n=this.stream.viewingEnd(),i=this.stream.posts(),r=this.discussion.postIds(),o=function(t){$(t.dom).addClass("fadeIn"),setTimeout((function(){return $(t.dom).removeClass("fadeIn")}),500)},s=i.map((function(n,i){var s,a={"data-index":e.stream.visibleStart+i};if(n){var c=n.createdAt(),u=je.postComponents[n.contentType()];s=u?u.component({post:n}):"",a.key="post"+n.id(),a.oncreate=o,a["data-time"]=c.toISOString(),a["data-number"]=n.number(),a["data-id"]=n.id(),a["data-type"]=n.contentType();var l=c-t;l>3456e5&&(s=[m("div",{className:"PostStream-timeGap"},m("span",null,je.translator.trans("core.forum.post_stream.time_lapsed_text",{period:dayjs().add(l,"ms").fromNow(!0)}))),s]),t=c}else a.key="post"+r[e.stream.visibleStart+i],s=Z.component();return m("div",Object.assign({className:"PostStream-item"},a),s)}));return!n&&i[this.stream.visibleEnd-this.stream.visibleStart-1]&&s.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(E.a,{className:"Button",onclick:this.stream.loadNext.bind(this.stream)},je.translator.trans("core.forum.post_stream.load_more_button")))),!n||je.session.user&&!this.discussion.canReply()||s.push(m("div",{className:"PostStream-item",key:"reply","data-index":this.stream.count(),oncreate:o},nt.component({discussion:this.discussion}))),m("div",{className:"PostStream"},s)},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.triggerScroll()},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.triggerScroll(),setTimeout((function(){return n.scrollListener.start()}))},n.onremove=function(e){t.prototype.onremove.call(this,e),this.scrollListener.stop(),clearTimeout(this.calculatePositionTimeout)},n.triggerScroll=function(){if(this.stream.needsScroll){var t=this.stream.targetPost;this.stream.needsScroll=!1,"number"in t?this.scrollToNumber(t.number,this.stream.animateScroll):"index"in t&&this.scrollToIndex(t.index,this.stream.animateScroll,t.reply)}},n.onscroll=function(t){void 0===t&&(t=window.pageYOffset),this.stream.paused||this.stream.pagesLoading||(this.updateScrubber(t),this.loadPostsIfNeeded(t),clearTimeout(this.calculatePositionTimeout),this.calculatePositionTimeout=setTimeout(this.calculatePosition.bind(this,t),100))},n.loadPostsIfNeeded=function(t){void 0===t&&(t=window.pageYOffset);var e=this.getMarginTop(),n=$(window).height()-e,i=t+e;if(this.stream.visibleStart>0){var r=this.$(".PostStream-item[data-index="+this.stream.visibleStart+"]");r.length&&r.offset().top>i-300&&this.stream.loadPrevious()}if(this.stream.visibleEnd<this.stream.count()){var o=this.$(".PostStream-item[data-index="+(this.stream.visibleEnd-1)+"]");o.length&&o.offset().top+o.outerHeight(!0)<i+n+300&&this.stream.loadNext()}},n.updateScrubber=function(t){void 0===t&&(t=window.pageYOffset);var e=this.getMarginTop(),n=$(window).height()-e,i=t+e,r=this.$(".PostStream-item[data-index]"),o=0,s="",a=null;r.each((function(){var t=$(this),e=t.offset().top,r=t.outerHeight(!0);if(e+r<i)return!0;if(e>i+n)return!1;var c=Math.max(0,i-e),u=Math.min(r,i+n-e)-c;null===a&&(a=parseFloat(t.data("index"))+c/r),u>0&&(o+=u/r);var l=t.data("time");l&&(s=l)})),this.stream.index=null!==a?a+1:this.stream.count(),this.stream.visible=o,s&&(this.stream.description=dayjs(s).format("MMMM YYYY"))},n.calculatePosition=function(t){void 0===t&&(t=window.pageYOffset);var e,n,i=this.getMarginTop(),r=$(window),o=r.height()-i,s=r.scrollTop()+i,a=t+i;this.$(".PostStream-item").each((function(){var t=$(this),i=t.offset().top,r=t.outerHeight(!0),c=Math.max(0,a-i);if(void 0===e&&(c/r<.75||(r-c)/o>.25)&&(e=t.data("number")),i+r>s){if(!(i+r<s+o))return!1;t.data("number")&&(n=t.data("number"))}})),e&&this.attrs.onPositionChange(e||1,n,e)},n.getMarginTop=function(){var t="phone"===je.screen()?"#app-navigation":"#header";return this.$()&&$(t).outerHeight()+parseInt(this.$().css("margin-top"),10)},n.scrollToNumber=function(t,e){var n=this.$(".PostStream-item[data-number="+t+"]");return this.scrollToItem(n,e).then(this.flashItem.bind(this,n))},n.scrollToIndex=function(t,e,n){var i=n?$(".PostStream-item:last-child"):this.$(".PostStream-item[data-index="+t+"]");this.scrollToItem(i,e,!0,n),n&&this.flashItem(i)},n.scrollToItem=function(t,e,n,i){var r=this,o=$("html, body").stop(!0),s=t.data("index");if(t.length){var a=t.offset().top-this.getMarginTop(),c=t.offset().top+t.height(),u=$(document).scrollTop(),l=u+$(window).height();if(n||a<u||c>l){var d=i?c-$(window).height()+je.composer.computedHeight():t.is(":first-child")?0:a;e?d!==u&&o.animate({scrollTop:d},"fast"):o.scrollTop(d)}}var h=function(){r.updateScrubber(),void 0!==s&&(r.stream.index=s+1)};return h(),this.stream.forceUpdateScrubber=!0,Promise.all([o.promise(),this.stream.loadPromise]).then((function(){var t;if(m.redraw.sync(),i){var e=$(".PostStream-item:last-child");$(window).scrollTop(e.offset().top+e.height()-$(window).height()+je.composer.computedHeight())}else 0===s?$(window).scrollTop(0):(t=$(".PostStream-item[data-index="+s+"]").offset())&&$(window).scrollTop(t.top-r.getMarginTop());h(),r.calculatePosition(),r.stream.paused=!1,r.loadPostsIfNeeded()}))},n.flashItem=function(t){t.removeClass("fadeIn"),t.addClass("flash").on("animationend webkitAnimationEnd",(function(e){t.removeClass("flash")}))},e}(d.a),rt=n(81),ot=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.stream=this.attrs.stream,this.handlers={},this.scrollListener=new Q.a(this.updateScrubberValues.bind(this,{fromScroll:!0,forceHeightChange:!0}))},n.view=function(){var t=this.stream.count(),e=je.translator.trans("core.forum.post_scrubber.viewing_text",{count:t,index:m("span",{className:"Scrubber-index"}),formattedCount:m("span",{className:"Scrubber-count"},Object(rt.a)(t))}),n=this.stream.discussion.unreadCount(),i=t?Math.min(t-this.stream.index,n)/t:0;function r(t){var e=$(t.dom),n={top:100-100*i+"%",height:100*i+"%"};t.state.oldStyle?e.stop(!0).css(t.state.oldStyle).animate(n):e.css(n),t.state.oldStyle=n}var o=["PostStreamScrubber","Dropdown"];return this.attrs.className&&o.push(this.attrs.className),m("div",{className:o.join(" ")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},e," ",Object(b.a)("fas fa-sort")),m("div",{className:"Dropdown-menu dropdown-menu"},m("div",{className:"Scrubber"},m("a",{className:"Scrubber-first",onclick:this.goToFirst.bind(this)},Object(b.a)("fas fa-angle-double-up")," ",je.translator.trans("core.forum.post_scrubber.original_post_link")),m("div",{className:"Scrubber-scrollbar"},m("div",{className:"Scrubber-before"}),m("div",{className:"Scrubber-handle"},m("div",{className:"Scrubber-bar"}),m("div",{className:"Scrubber-info"},m("strong",null,e),m("span",{className:"Scrubber-description"}))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",oncreate:r,onupdate:r},je.translator.trans("core.forum.post_scrubber.unread_text",{count:n}))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},Object(b.a)("fas fa-angle-double-down")," ",je.translator.trans("core.forum.post_scrubber.now_link")))))},n.onupdate=function(e){var n=this;t.prototype.onupdate.call(this,e),this.stream.forceUpdateScrubber&&(this.stream.forceUpdateScrubber=!1,this.stream.loadPromise.then((function(){return n.updateScrubberValues({animate:!0,forceHeightChange:!0})})))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),$(window).on("resize",this.handlers.onresize=this.onresize.bind(this)).resize(),this.$(".Scrubber-scrollbar").bind("click",this.onclick.bind(this)).bind("dragstart mousedown touchstart",(function(t){return t.preventDefault()})),this.dragging=!1,this.mouseStart=0,this.indexStart=0,this.$(".Scrubber-handle").bind("mousedown touchstart",this.onmousedown.bind(this)).click((function(t){return t.stopPropagation()})),$(document).on("mousemove touchmove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup touchend",this.handlers.onmouseup=this.onmouseup.bind(this)),setTimeout((function(){return n.scrollListener.start()})),this.stream.loadPromise.then((function(){return n.updateScrubberValues({animate:!1,forceHeightChange:!0})}))},n.onremove=function(e){t.prototype.onremove.call(this,e),this.scrollListener.stop(),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove touchmove",this.handlers.onmousemove).off("mouseup touchend",this.handlers.onmouseup)},n.updateScrubberValues=function(t){var e=this;void 0===t&&(t={});var n=this.stream.index,i=this.stream.count(),r=this.stream.visible||1,o=this.percentPerPost(),s=this.$();s.find(".Scrubber-index").text(Object(rt.a)(this.stream.sanitizeIndex(Math.max(1,n)))),s.find(".Scrubber-description").text(this.stream.description),s.toggleClass("disabled",this.stream.disabled());var a={};if(a.before=Math.max(0,o.index*Math.min(n-1,i-r)),a.handle=Math.min(100-a.before,o.visible*r),a.after=100-a.before-a.handle,!(t.fromScroll&&this.stream.paused||this.adjustingHeight&&!t.forceHeightChange)){var c=t.animate?"animate":"css";this.adjustingHeight=!0;var u=[];for(var l in a){var d=s.find(".Scrubber-"+l);u.push(d.stop(!0,!0)[c]({height:a[l]+"%"},"fast").promise()),"animate"===c&&d.css("overflow","visible")}Promise.all(u).then((function(){return e.adjustingHeight=!1}))}},n.goToFirst=function(){this.stream.goToFirst(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.goToLast=function(){this.stream.goToLast(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.onresize=function(){var t=this.$(),e=this.$(".Scrubber-scrollbar");e.css("max-height",$(window).height()-t.offset().top+$(window).scrollTop()-parseInt($("#app").css("padding-bottom"),10)-(t.outerHeight()-e.outerHeight()))},n.onmousedown=function(t){t.redraw=!1,this.mouseStart=t.clientY||t.originalEvent.touches[0].clientY,this.indexStart=this.stream.index,this.dragging=!0,$("body").css("cursor","move"),this.$().toggleClass("dragging",this.dragging)},n.onmousemove=function(t){if(this.dragging){var e=((t.clientY||t.originalEvent.touches[0].clientY)-this.mouseStart)/this.$(".Scrubber-scrollbar").outerHeight()*100/this.percentPerPost().index||0,n=Math.min(this.indexStart+e,this.stream.count()-1);this.stream.index=Math.max(0,n),this.updateScrubberValues()}},n.onmouseup=function(){if(this.$().toggleClass("dragging",this.dragging),this.dragging){this.mouseStart=0,this.indexStart=0,this.dragging=!1,$("body").css("cursor",""),this.$().removeClass("open");var t=Math.floor(this.stream.index);this.stream.goToIndex(t)}},n.onclick=function(t){var e=this.$(".Scrubber-scrollbar"),n=((t.pageY||t.originalEvent.touches[0].pageY)-e.offset().top+$("body").scrollTop())/e.outerHeight()*100,i=(n-=parseFloat(e.find(".Scrubber-handle")[0].style.height)/2)/this.percentPerPost().index;i=Math.max(0,Math.min(this.stream.count()-1,i)),this.stream.goToIndex(Math.floor(i)),this.updateScrubberValues({animate:!0,forceHeightChange:!0}),this.$().removeClass("open")},n.percentPerPost=function(){var t=this.stream.count()||1,e=this.stream.visible||1,n=50/this.$(".Scrubber-scrollbar").outerHeight()*100,i=Math.max(100/t,n/e),r=t===e?0:(100-i*e)/(t-e);return{index:r,visible:i}},e}(d.a),st=n(87),at=n(53),ct=n(88),ut=function(){function t(t,e){void 0===e&&(e=[]),this.discussion=t,this.paused=!1,this.loadPageTimeouts={},this.pagesLoading=0,this.index=0,this.number=1,this.visible=1,this.description="",this.forceUpdateScrubber=!1,this.loadNext=Object(at.b)(300,this._loadNext),this.loadPrevious=Object(at.b)(300,this._loadPrevious),this.show(e)}var e=t.prototype;return e.update=function(){return this.viewingEnd()?(this.visibleEnd=this.count(),this.loadRange(this.visibleStart,this.visibleEnd)):Promise.resolve()},e.goToFirst=function(){return this.goToIndex(0)},e.goToLast=function(){return this.goToIndex(this.count()-1,!0)},e.goToNumber=function(t,e){if(void 0===e&&(e=!1),"reply"===t){var n=this.goToLast();return this.targetPost.reply=!0,n}return this.paused=!0,this.loadPromise=this.loadNearNumber(t),this.needsScroll=!0,this.targetPost={number:t},this.animateScroll=!e,this.number=t,this.loadPromise.then((function(){return m.redraw()}))},e.goToIndex=function(t,e){return void 0===e&&(e=!1),this.paused=!0,this.loadPromise=this.loadNearIndex(t),this.needsScroll=!0,this.targetPost={index:t},this.animateScroll=!e,this.index=t,m.redraw(),this.loadPromise},e.loadNearNumber=function(t){return this.posts().some((function(e){return e&&Number(e.number())===Number(t)}))?Promise.resolve():(this.reset(),je.store.find("posts",{filter:{discussion:this.discussion.id()},page:{near:t}}).then(this.show.bind(this)))},e.loadNearIndex=function(t){if(t>=this.visibleStart&&t<this.visibleEnd)return Promise.resolve();var e=this.sanitizeIndex(t-this.constructor.loadCount/2),n=e+this.constructor.loadCount;return this.reset(e,n),this.loadRange(e,n).then(this.show.bind(this))},e._loadNext=function(){var t=this.visibleEnd,e=this.visibleEnd=this.sanitizeIndex(this.visibleEnd+this.constructor.loadCount),n=t-2*this.constructor.loadCount;n>this.visibleStart&&n>=0&&(this.visibleStart=n+this.constructor.loadCount+1,this.loadPageTimeouts[n]&&(clearTimeout(this.loadPageTimeouts[n]),this.loadPageTimeouts[n]=null,this.pagesLoading--)),this.loadPage(t,e)},e._loadPrevious=function(){var t=this.visibleStart,e=this.visibleStart=this.sanitizeIndex(this.visibleStart-this.constructor.loadCount),n=e+2*this.constructor.loadCount;n<this.visibleEnd&&n<=this.count()&&(this.visibleEnd=n,this.loadPageTimeouts[n]&&(clearTimeout(this.loadPageTimeouts[n]),this.loadPageTimeouts[n]=null,this.pagesLoading--)),this.loadPage(e,t,!0)},e.loadPage=function(t,e,n){var i=this;void 0===n&&(n=!1),this.pagesLoading++;var r=function(){if(!(t<i.visibleStart||e>i.visibleEnd)){var r=n?i.visibleEnd-1:i.visibleStart;Object(ct.a)('.PostStream-item[data-index="'+r+'"]',m.redraw.sync)}};r(),this.loadPageTimeouts[t]=setTimeout((function(){i.loadRange(t,e).then((function(){r(),i.pagesLoading--})),i.loadPageTimeouts[t]=null}),this.pagesLoading-1?1e3:0)},e.loadRange=function(t,e){var n=[],i=[];return this.discussion.postIds().slice(t,e).forEach((function(t){var e=je.store.getById("posts",t);e&&e.discussion()&&void 0!==e.canEdit()?i.push(e):n.push(t)})),n.length?je.store.find("posts",n).then((function(t){return i.concat(t).sort((function(t,e){return t.createdAt()-e.createdAt()}))})):Promise.resolve(i)},e.show=function(t){this.visibleStart=t.length?this.discussion.postIds().indexOf(t[0].id()):0,this.visibleEnd=this.sanitizeIndex(this.visibleStart+t.length)},e.reset=function(t,e){this.visibleStart=t||0,this.visibleEnd=this.sanitizeIndex(e||this.constructor.loadCount)},e.posts=function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map((function(t){var e=je.store.getById("posts",t);return e&&e.discussion()&&void 0!==e.canEdit()?e:null}))},e.count=function(){return this.discussion.postIds().length},e.disabled=function(){return this.visible>=this.count()},e.viewingEnd=function(){return Math.abs(this.count()-this.visibleEnd)<=1},e.sanitizeIndex=function(t){return Math.max(0,Math.min(this.count(),Math.floor(t)))},t}();ut.loadCount=20;var lt=ut,dt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.useBrowserScrollRestoration=!1,this.discussion=null,this.near=m.route.param("near")||0,this.load(),je.discussions.hasItems()&&(je.pane.enable(),je.pane.hide()),je.history.push("discussion"),this.bodyClass="App--discussion"},n.onremove=function(e){t.prototype.onremove.call(this,e),je.pane.disable(),je.composer.composingReplyTo(this.discussion)&&!je.composer.fields.content()?je.composer.hide():je.composer.minimize()},n.view=function(){return m("div",{className:"DiscussionPage"},m(J,{state:je.discussions}),m("div",{className:"DiscussionPage-discussion"},this.discussion?this.pageContent().toArray():this.loadingItems().toArray()))},n.loadingItems=function(){var t=new l.a;return t.add("spinner",m(O.a,null),100),t},n.sidebar=function(){return m("nav",{className:"DiscussionPage-nav"},m("ul",null,Object(h.a)(this.sidebarItems().toArray())))},n.hero=function(){return m(f,{discussion:this.discussion})},n.pageContent=function(){var t=new l.a;return t.add("hero",this.hero(),100),t.add("main",m("div",{className:"container"},this.mainContent().toArray()),10),t},n.mainContent=function(){var t=new l.a;return t.add("sidebar",this.sidebar(),100),t.add("poststream",m("div",{className:"DiscussionPage-stream"},it.component({discussion:this.discussion,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),10),t},n.load=function(){var t=je.preloadedApiDocument();if(t)setTimeout(this.show.bind(this,t),0);else{var e=this.requestParams();je.store.find("discussions",m.route.param("id"),e).then(this.show.bind(this))}m.redraw()},n.requestParams=function(){return{bySlug:!0,page:{near:this.near}}},n.show=function(t){var e=this;je.history.push("discussion",t.title()),je.setTitle(t.title()),je.setTitleCount(0);var n=[];if(t.payload&&t.payload.included){var i=t.id();n=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===i})).map((function(t){return je.store.getById("posts",t.id)})).sort((function(t,e){return t.createdAt()-e.createdAt()})).slice(0,20)}this.stream=new lt(t,n),this.stream.goToNumber(m.route.param("near")||n[0]&&n[0].number(),!0).then((function(){e.discussion=t,je.current.set("discussion",t),je.current.set("stream",e.stream)}))},n.sidebarItems=function(){var t=new l.a;return t.add("controls",st.a.component({icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary",accessibleToggleLabel:je.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},q.controls(this.discussion,this).toArray())),t.add("scrubber",ot.component({stream:this.stream,className:"App-titleControl"}),-100),t},n.positionChanged=function(t,e){var n=this.discussion,i=je.route.discussion(n,this.near=t);window.history.replaceState(null,document.title,i),je.history.push("discussion",n.title()),je.session.user&&e>(n.lastReadPostNumber()||0)&&(n.save({lastReadPostNumber:e}),m.redraw())},e}(u.a),ht=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},Object(h.a)(this.items().toArray()))},n.items=function(){return new l.a},e}(d.a),ft=n(10),pt=n(16),mt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right",e.accessibleToggleLabel=je.translator.trans("core.forum.header.session_dropdown_accessible_label")};var n=e.prototype;return n.view=function(e){return t.prototype.view.call(this,Object(ft.a)({},e,{children:this.items().toArray()}))},n.getButtonContent=function(){var t=je.session.user;return[Object(v.a)(t)," ",m("span",{className:"Button-label"},Object(tt.a)(t))]},n.items=function(){var t=new l.a,e=je.session.user;return t.add("profile",pt.a.component({icon:"fas fa-user",href:je.route.user(e)},je.translator.trans("core.forum.header.profile_button")),100),t.add("settings",pt.a.component({icon:"fas fa-cog",href:je.route("settings")},je.translator.trans("core.forum.header.settings_button")),50),je.forum.attribute("adminUrl")&&t.add("administration",pt.a.component({icon:"fas fa-wrench",href:je.forum.attribute("adminUrl"),target:"_blank"},je.translator.trans("core.forum.header.admin_button")),0),t.add("separator",F.a.component(),-90),t.add("logOut",E.a.component({icon:"fas fa-sign-out-alt",onclick:je.session.logout.bind(je.session)},je.translator.trans("core.forum.header.log_out_button")),-100),t},e}(x.a),vt=n(33),gt=n(45),bt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.state;return m("div",{className:"NotificationList"},m("div",{className:"NotificationList-header"},m("h4",{className:"App-titleControl App-titleControl--text"},je.translator.trans("core.forum.notifications.title")),m("div",{className:"App-primaryControl"},m(E.a,{className:"Button Button--link",icon:"fas fa-check",title:je.translator.trans("core.forum.notifications.mark_all_as_read_tooltip"),onclick:t.markAllAsRead.bind(t)}))),m("div",{className:"NotificationList-content"},this.content(t)))},n.content=function(t){return t.isLoading()?m(O.a,{className:"LoadingIndicator--block"}):t.hasItems()?t.getPages().map((function(t){var e=[],n={};return t.items.forEach((function(t){var i=t.subject();if(void 0!==i){var r=null;i instanceof gt.a?r=i:i&&i.discussion&&(r=i.discussion());var o=r?r.id():0;n[o]=n[o]||{discussion:r,notifications:[]},n[o].notifications.push(t),-1===e.indexOf(n[o])&&e.push(n[o])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m(p.a,{className:"NotificationGroup-header",href:je.route.discussion(t.discussion)},e&&!!e.length&&m("ul",{className:"NotificationGroup-badges badges"},Object(h.a)(e)),m("span",null,t.discussion.title())):m("div",{className:"NotificationGroup-header"},je.forum.attribute("title")),m("ul",{className:"NotificationGroup-content"},t.notifications.map((function(t){var e=je.notificationComponents[t.contentType()];return e?m("li",null,e.component({notification:t})):""}))))}))})):m("div",{className:"NotificationList-empty"},je.translator.trans("core.forum.notifications.empty_text"))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$notifications=this.$(".NotificationList-content"),this.$scrollParent=this.inPanel()?this.$notifications:$(window),this.boundScrollHandler=this.scrollHandler.bind(this),this.$scrollParent.on("scroll",this.boundScrollHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),this.$scrollParent.off("scroll",this.boundScrollHandler)},n.scrollHandler=function(){var t=this.attrs.state,e=this.inPanel()?this.$scrollParent[0]:document.documentElement,n=Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<=1;t.hasNext()&&!t.isLoadingNext()&&n&&t.loadNext()},n.inPanel=function(){return"auto"===this.$notifications.css("overflow")},e}(d.a),yt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){e.className=e.className||"NotificationsDropdown",e.buttonClassName=e.buttonClassName||"Button Button--flat",e.menuClassName=e.menuClassName||"Dropdown-menu--right",e.label=e.label||je.translator.trans("core.forum.notifications.tooltip"),e.icon=e.icon||"fas fa-bell",e.accessibleToggleLabel=e.accessibleToggleLabel||je.translator.trans("core.forum.notifications.toggle_dropdown_accessible_label"),t.initAttrs.call(this,e)};var n=e.prototype;return n.getButton=function(){var e=this.getNewCount(),n=t.prototype.getButton.call(this);return n.attrs.title=this.attrs.label,n.attrs.className=Object(j.a)(n.attrs.className,[e&&"new"]),n.attrs.onclick=this.onclick.bind(this),n},n.getButtonContent=function(){var t=this.getUnreadCount();return[Object(b.a)(this.attrs.icon,{className:"Button-icon"}),0!==t&&m("span",{className:"NotificationsDropdown-unread"},t),m("span",{className:"Button-label"},this.attrs.label)]},n.getMenu=function(){return m("div",{className:Object(j.a)("Dropdown-menu",this.attrs.menuClassName),onclick:this.menuClick.bind(this)},this.showing&&bt.component({state:this.attrs.state}))},n.onclick=function(){je.drawer.isOpen()?this.goToRoute():this.attrs.state.load()},n.goToRoute=function(){m.route.set(je.route("notifications"))},n.getUnreadCount=function(){return je.session.user.unreadNotificationCount()},n.getNewCount=function(){return je.session.user.newNotificationCount()},n.menuClick=function(t){(t.shiftKey||t.metaKey||t.ctrlKey||2===t.which)&&t.stopPropagation()},e}(x.a),wt=function(){function t(){this.callbacks=new Map,this.whenCallback=function(t){return!0}}var e=t.prototype;return e.onUp=function(t){return this.callbacks.set(38,(function(e){e.preventDefault(),t(e)})),this},e.onDown=function(t){return this.callbacks.set(40,(function(e){e.preventDefault(),t(e)})),this},e.onSelect=function(t){var e=function(e){e.preventDefault(),t(e)};return this.callbacks.set(9,e),this.callbacks.set(13,e),this},e.onCancel=function(t){return this.callbacks.set(27,(function(e){e.stopPropagation(),e.preventDefault(),t(e)})),this},e.onRemove=function(t){return this.callbacks.set(8,(function(e){0===e.target.selectionStart&&0===e.target.selectionEnd&&(t(e),e.preventDefault())})),this},e.when=function(t){return this.whenCallback=t,this},e.bindTo=function(t){t.on("keydown",this.navigate.bind(this))},e.navigate=function(t){if(this.whenCallback(t)){var e=this.callbacks.get(t.which);e&&e(t)}},t}(),xt=function(){function t(){this.results=new Map}var e=t.prototype;return e.search=function(t){var e=this;t=t.toLowerCase(),this.results.set(t,[]);var n={filter:{q:t},page:{limit:3},include:"mostRelevantPost"};return je.store.find("discussions",n).then((function(n){return e.results.set(t,n)}))},e.view=function(t){t=t.toLowerCase();var e=(this.results.get(t)||[]).map((function(e){var n=e.mostRelevantPost();return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+e.id()},m(p.a,{href:je.route.discussion(e,n&&n.number())},m("div",{className:"DiscussionSearchResult-title"},Object(g.a)(e.title(),t)),n?m("div",{className:"DiscussionSearchResult-excerpt"},Object(g.a)(n.contentPlain(),t,100)):""))}));return[m("li",{className:"Dropdown-header"},je.translator.trans("core.forum.search.discussions_heading")),m("li",null,m(pt.a,{icon:"fas fa-search",href:je.route("index",{q:t})},je.translator.trans("core.forum.search.all_discussions_button",{query:t})))].concat(e)},t}(),Nt=function(){function t(){this.results=new Map}var e=t.prototype;return e.search=function(t){var e=this;return je.store.find("users",{filter:{q:t},page:{limit:5}}).then((function(n){e.results.set(t,n),m.redraw()}))},e.view=function(t){t=t.toLowerCase();var e=(this.results.get(t)||[]).concat(je.store.all("users").filter((function(e){return[e.username(),e.displayName()].some((function(e){return e.toLowerCase().substr(0,t.length)===t}))}))).filter((function(t,e,n){return n.lastIndexOf(t)===e})).sort((function(t,e){return t.displayName().localeCompare(e.displayName())}));return e.length?[m("li",{className:"Dropdown-header"},je.translator.trans("core.forum.search.users_heading"))].concat(e.map((function(e){var n=Object(tt.a)(e),i=[Object(g.a)(n.text,t)];return m("li",{className:"UserSearchResult","data-index":"users"+e.id()},m(p.a,{href:je.route.user(e)},Object(v.a)(e),Object(ft.a)({},n,{text:void 0,children:i})))}))):[]},t}(),Ct=function(t){function e(){for(var e,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=t.call.apply(t,[this].concat(i))||this).state=void 0,e.hasFocus=!1,e.sources=void 0,e.loadingSources=0,e.index=0,e.navigator=void 0,e.searchTimeout=void 0,e.updateMaxHeightHandler=void 0,e}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.view=function(){var t=this,e=this.state.getInitialSearch();if(this.sources||(this.sources=this.sourceItems().toArray()),!this.sources.length)return m("div",null);var n=Object(P.a)(je.translator.trans("core.forum.header.search_placeholder")),i=!!e,r=!(this.loadingSources||!this.state.getValue()||!this.hasFocus),o=!(this.loadingSources||!this.state.getValue());return m("div",{role:"search","aria-label":je.translator.trans("core.forum.header.search_role_label"),className:Object(j.a)("Search",{open:this.state.getValue()&&this.hasFocus,focused:this.hasFocus,active:i,loading:!!this.loadingSources})},m("div",{className:"Search-input"},m("input",{"aria-label":n,className:"FormControl",type:"search",placeholder:n,value:this.state.getValue(),oninput:function(e){return t.state.setValue(e.target.value)},onfocus:function(){return t.hasFocus=!0},onblur:function(){return t.hasFocus=!1}}),!!this.loadingSources&&m(O.a,{size:"small",display:"inline",containerClassName:"Button Button--icon Button--link"}),o&&m("button",{className:"Search-clear Button Button--icon Button--link",onclick:this.clear.bind(this),"aria-label":je.translator.trans("core.forum.header.search_clear_button_accessible_label")},Object(b.a)("fas fa-times-circle"))),m("ul",{className:"Dropdown-menu Search-results","aria-hidden":!r||void 0,"aria-live":r?"polite":void 0},r&&this.sources.map((function(e){return e.view(t.state.getValue())}))))},n.updateMaxHeight=function(){var t=window.innerHeight-this.element.querySelector(".Search-input>.FormControl").getBoundingClientRect().bottom-14;this.element.querySelector(".Search-results").style["max-height"]=t+"px"},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.setIndex(this.getCurrentNumericIndex()),this.sources.length&&this.updateMaxHeight()},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e);var i=this,r=this.state;this.setIndex(this.getCurrentNumericIndex()),this.$(".Search-results").on("mousedown",(function(t){return t.preventDefault()})).on("click",(function(){return n.$("input").trigger("blur")})).on("mouseenter","> li:not(.Dropdown-header)",(function(){i.setIndex(i.selectableItems().index(this))}));var o=this.$("input");this.navigator=new wt,this.navigator.onUp((function(){return n.setIndex(n.getCurrentNumericIndex()-1,!0)})).onDown((function(){return n.setIndex(n.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this)).onCancel(this.clear.bind(this)).bindTo(o),o.on("input focus",(function(){var t=this.value.toLowerCase();t&&(clearTimeout(i.searchTimeout),i.searchTimeout=setTimeout((function(){r.isCached(t)||(t.length>=i.constructor.MIN_SEARCH_LEN&&i.sources.map((function(e){e.search&&(i.loadingSources++,e.search(t).then((function(){i.loadingSources=Math.max(0,i.loadingSources-1),m.redraw()})))})),r.cache(t),m.redraw())}),250))})).on("focus",(function(){$(this).one("mouseup",(function(t){return t.preventDefault()})).trigger("select")})),this.updateMaxHeightHandler=this.updateMaxHeight.bind(this),window.addEventListener("resize",this.updateMaxHeightHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),window.removeEventListener("resize",this.updateMaxHeightHandler)},n.selectResult=function(){clearTimeout(this.searchTimeout),this.loadingSources=0,this.state.getValue()?m.route.set(this.getItem(this.index).find("a").attr("href")):this.clear(),this.$("input").blur()},n.clear=function(){this.state.clear()},n.sourceItems=function(){var t=new l.a;return je.forum.attribute("canViewForum")&&t.add("discussions",new xt),je.forum.attribute("canSearchUsers")&&t.add("users",new Nt),t},n.selectableItems=function(){return this.$(".Search-results > li:not(.Dropdown-header)")},n.getCurrentNumericIndex=function(){return this.selectableItems().index(this.getItem(this.index))},n.getItem=function(t){var e=this.selectableItems(),n=e.filter('[data-index="'+t+'"]');return n.length||(n=e.eq(t)),n},n.setIndex=function(t,e){void 0===e&&(e=!1);var n=this.selectableItems(),i=n.parent(),r=t;t<0?r=n.length-1:t>=n.length&&(r=0);var o=n.removeClass("active").eq(r).addClass("active");if(this.index=parseInt(o.attr("data-index"))||r,e){var s,a=i.scrollTop(),c=i.offset().top,u=c+i.outerHeight(),l=o.offset().top,d=l+o.outerHeight();l<c?s=a-c+l-parseInt(i.css("padding-top"),10):d>u&&(s=a-u+d+parseInt(i.css("padding-bottom"),10)),void 0!==s&&i.stop(!0).animate({scrollTop:s},100)}},e}(d.a);Ct.MIN_SEARCH_LEN=3;var Tt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},Object(h.a)(this.items().toArray()))},n.items=function(){var t=new l.a;if(t.add("search",Ct.component({state:je.search}),30),je.forum.attribute("showLanguageSelector")&&Object.keys(je.data.locales).length>1){var e=[],n=function(t){e.push(E.a.component({active:je.data.locale===t,icon:je.data.locale!==t||"fas fa-check",onclick:function(){je.session.user?je.session.user.savePreferences({locale:t}).then((function(){return window.location.reload()})):(document.cookie="locale="+t+"; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT",window.location.reload())}},je.data.locales[t]))};for(var i in je.data.locales)n(i);t.add("locale",vt.a.component({buttonClassName:"Button Button--link",accessibleToggleLabel:je.translator.trans("core.forum.header.locale_dropdown_accessible_label")},e),20)}return je.session.user?(t.add("notifications",yt.component({state:je.notifications}),10),t.add("session",mt.component(),0)):(je.forum.attribute("allowSignUp")&&t.add("signUp",E.a.component({className:"Button Button--link",onclick:function(){return je.modal.show(H)}},je.translator.trans("core.forum.header.sign_up_link")),10),t.add("logIn",E.a.component({className:"Button Button--link",onclick:function(){return je.modal.show(B)}},je.translator.trans("core.forum.header.log_in_link")),0)),t},e}(d.a),Ot=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=e.className||"Button Button--icon Button--link"},e}(E.a),St=n(41),kt=(n(152),function(){function t(){this.position=t.Position.HIDDEN,this.height=null,this.body={attrs:{}},this.editor=null,this.clear()}var e=t.prototype;return e.load=function(t,e){var n={componentClass:t,attrs:e};this.preventExit()||(this.isVisible()&&(this.clear(),m.redraw.sync()),this.body=n)},e.clear=function(){this.position=t.Position.HIDDEN,this.body={attrs:{}},this.onExit=null,this.fields={content:Object(M.a)("")},this.editor&&this.editor.destroy(),this.editor=null},e.show=function(){this.position!==t.Position.NORMAL&&this.position!==t.Position.FULLSCREEN&&(this.position=t.Position.NORMAL,m.redraw.sync())},e.hide=function(){this.clear(),m.redraw()},e.close=function(){this.preventExit()||this.hide()},e.minimize=function(){this.isVisible()&&(this.position=t.Position.MINIMIZED,m.redraw())},e.fullScreen=function(){this.isVisible()&&(this.position=t.Position.FULLSCREEN,m.redraw())},e.exitFullScreen=function(){this.position===t.Position.FULLSCREEN&&(this.position=t.Position.NORMAL,m.redraw())},e.bodyMatches=function(t,e){var n=this;return void 0===e&&(e={}),!!Object(St.a)(this.body.componentClass,t)&&Object.keys(e).every((function(t){return n.body.attrs[t]===e[t]}))},e.isVisible=function(){return this.position!==t.Position.HIDDEN},e.isFullScreen=function(){return this.position===t.Position.FULLSCREEN||"phone"===je.screen()},e.composingReplyTo=function(t){return this.isVisible()&&this.bodyMatches(D,{discussion:t})},e.preventExit=function(){if(this.isVisible()&&this.onExit)return this.onExit.callback()?!confirm(this.onExit.message):void 0},e.preventClosingWhen=function(t,e){this.onExit={callback:t,message:e}},e.minimumHeight=function(){return 200},e.maximumHeight=function(){return $(window).height()-$("#header").outerHeight()},e.computedHeight=function(){return this.position===t.Position.MINIMIZED?"":this.position===t.Position.FULLSCREEN?$(window).height():Math.max(this.minimumHeight(),Math.min(this.height,this.maximumHeight()))},t}());kt.Position={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"};var jt=kt,At=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state,this.active=!1,this.prevPosition=this.state.position},n.view=function(){var t=this.state.body,e={normal:this.state.position===jt.Position.NORMAL,minimized:this.state.position===jt.Position.MINIMIZED,fullScreen:this.state.position===jt.Position.FULLSCREEN,active:this.active,visible:this.state.isVisible()},n=this.state.position===jt.Position.MINIMIZED?this.state.show.bind(this.state):void 0;return m("div",{className:"Composer "+Object(j.a)(e)},m("div",{className:"Composer-handle",oncreate:this.configHandle.bind(this)}),m("ul",{className:"Composer-controls"},Object(h.a)(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:n},t.componentClass?t.componentClass.component(Object(ft.a)({},t.attrs,{composer:this.state,disabled:e.minimized})):""))},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.state.position===this.prevPosition?this.updateHeight():(this.animatePositionChange(),this.prevPosition=this.state.position)},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.initializeHeight(),this.$().hide().css("bottom",-this.state.computedHeight()),this.$().on("focus blur",":input,.TextEditor-editorContainer",(function(t){n.active="focusin"===t.type,m.redraw()})),this.$().on("keydown",":input,.TextEditor-editorContainer","esc",(function(){return n.state.close()})),this.handlers={},$(window).on("resize",this.handlers.onresize=this.updateHeight.bind(this)).resize(),$(document).on("mousemove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup",this.handlers.onmouseup=this.onmouseup.bind(this))},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove",this.handlers.onmousemove).off("mouseup",this.handlers.onmouseup)},n.configHandle=function(t){var e=this;$(t.dom).css("cursor","row-resize").bind("dragstart mousedown",(function(t){return t.preventDefault()})).mousedown((function(t){e.mouseStart=t.clientY,e.heightStart=e.$().height(),e.handle=$(this),$("body").css("cursor","row-resize")}))},n.onmousemove=function(t){if(this.handle){var e=this.mouseStart-t.clientY;this.changeHeight(this.heightStart+e);var n=$(window).scrollTop(),i=n>0&&n+$(window).height()>=$(document).height();this.updateBodyPadding(i)}},n.onmouseup=function(){this.handle&&(this.handle=null,$("body").css("cursor",""))},n.focus=function(){this.$(".Composer-content :input:enabled:visible, .TextEditor-editor").first().focus()},n.updateHeight=function(){var t=this.state.computedHeight(),e=this.$(".Composer-flexible");if(this.$().height(t),e.length){var n=e.offset().top-this.$().offset().top,i=parseInt(e.css("padding-bottom"),10),r=this.$(".Composer-footer").outerHeight(!0);e.height(this.$().outerHeight()-n-i-r)}},n.updateBodyPadding=function(){var t=this.state.position!==jt.Position.HIDDEN&&this.state.position!==jt.Position.MINIMIZED&&"phone"!==je.screen()?this.state.computedHeight()-parseInt($("#app").css("padding-bottom"),10):0;$("#content").css({paddingBottom:t})},n.animatePositionChange=function(){if(this.prevPosition!==jt.Position.FULLSCREEN||this.state.position!==jt.Position.NORMAL)switch(this.state.position){case jt.Position.HIDDEN:return this.hide();case jt.Position.MINIMIZED:return this.minimize();case jt.Position.FULLSCREEN:return this.focus();case jt.Position.NORMAL:return this.show()}else this.focus()},n.animateHeightChange=function(){var t=this.$().stop(!0),e=t.outerHeight(),n=$(window).scrollTop();t.show(),this.updateHeight();var i=t.outerHeight();this.prevPosition===jt.Position.HIDDEN?t.css({bottom:-i,height:i}):t.css({height:e});var r=t.animate({bottom:0,height:i},"fast").promise();return this.updateBodyPadding(),$(window).scrollTop(n),r},n.showBackdrop=function(){this.$backdrop=$("<div/>").addClass("composer-backdrop").appendTo("body")},n.hideBackdrop=function(){this.$backdrop&&this.$backdrop.remove()},n.show=function(){var t=this;if(this.animateHeightChange().then((function(){return t.focus()})),"phone"===je.screen()){var e=document.documentElement,n=Math.min(e.scrollTop,e.scrollHeight-e.clientHeight);this.$().css("top",$(".App").is(".mobile-safari")?n:0),this.showBackdrop()}},n.hide=function(){var t=this,e=this.$();e.stop(!0).animate({bottom:-e.height()},"fast",(function(){e.hide(),t.hideBackdrop(),t.updateBodyPadding()}))},n.minimize=function(){this.animateHeightChange(),this.$().css("top","auto"),this.hideBackdrop()},n.controlItems=function(){var t=new l.a;return this.state.position===jt.Position.FULLSCREEN?t.add("exitFullScreen",Ot.component({icon:"fas fa-compress",title:je.translator.trans("core.forum.composer.exit_full_screen_tooltip"),onclick:this.state.exitFullScreen.bind(this.state)})):(this.state.position!==jt.Position.MINIMIZED&&(t.add("minimize",Ot.component({icon:"fas fa-minus minimize",title:je.translator.trans("core.forum.composer.minimize_tooltip"),onclick:this.state.minimize.bind(this.state),itemClassName:"App-backControl"})),t.add("fullScreen",Ot.component({icon:"fas fa-expand",title:je.translator.trans("core.forum.composer.full_screen_tooltip"),onclick:this.state.fullScreen.bind(this.state)}))),t.add("close",Ot.component({icon:"fas fa-times",title:je.translator.trans("core.forum.composer.close_tooltip"),onclick:this.state.close.bind(this.state)}))),t},n.initializeHeight=function(){this.state.height=localStorage.getItem("composerHeight"),this.state.height||(this.state.height=this.defaultHeight())},n.defaultHeight=function(){return this.$().height()},n.changeHeight=function(t){this.state.height=t,this.updateHeight(),localStorage.setItem("composerHeight",this.state.height)},e}(d.a),Et=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this,e=this.attrs.notification,n=this.href();return m(p.a,{className:Object(j.a)("Notification","Notification--"+e.contentType(),[!e.isRead()&&"unread"]),href:n,external:n.includes("://"),onclick:this.markAsRead.bind(this)},Object(v.a)(e.fromUser()),Object(b.a)(this.icon(),{className:"Notification-icon"}),m("span",{className:"Notification-title"},m("span",{className:"Notification-content"},this.content()),m("span",{className:"Notification-title-spring"}),Object(N.a)(e.createdAt())),!e.isRead()&&m(E.a,{className:"Notification-action Button Button--link",icon:"fas fa-check",title:je.translator.trans("core.forum.notifications.mark_as_read_tooltip"),onclick:function(e){e.preventDefault(),e.stopPropagation(),t.markAsRead()}}),m("div",{className:"Notification-excerpt"},this.excerpt()))},n.icon=function(){},n.href=function(){},n.content=function(){},n.excerpt=function(){},n.markAsRead=function(){this.attrs.notification.isRead()||(je.session.user.pushAttributes({unreadNotificationCount:je.session.user.unreadNotificationCount()-1}),this.attrs.notification.save({isRead:!0}))},e}(d.a),Pt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.href=function(){var t=this.attrs.notification;return je.route.discussion(t.subject(),t.content().postNumber)},n.content=function(){return je.translator.trans("core.forum.notifications.discussion_renamed_text",{user:this.attrs.notification.fromUser()})},e}(Et);function _t(t){je.composer.isFullScreen()&&(je.composer.minimize(),t.stopPropagation())}var Dt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.submitLabel=e.submitLabel||je.translator.trans("core.forum.composer_edit.submit_button"),e.confirmExit=e.confirmExit||je.translator.trans("core.forum.composer_edit.discard_confirmation"),e.originalContent=e.originalContent||e.post.content(),e.user=e.user||e.post.user(),e.post.editedContent=e.originalContent};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.attrs.post;return e.add("title",m("h3",null,Object(b.a)("fas fa-pencil-alt")," ",m(p.a,{href:je.route.discussion(n.discussion(),n.number()),onclick:_t},je.translator.trans("core.forum.composer_edit.post_link",{number:n.number(),discussion:n.discussion().title()})))),e},n.jumpToPreview=function(t){_t(t),m.route.set(je.route.post(this.attrs.post))},n.data=function(){return{content:this.composer.fields.content()}},n.onsubmit=function(){var t=this,e=this.attrs.post.discussion();this.loading=!0;var n=this.data();this.attrs.post.save(n).then((function(n){if(je.viewingDiscussion(e))je.current.get("stream").goToNumber(n.number());else{var i,r=E.a.component({className:"Button Button--link",onclick:function(){m.route.set(je.route.post(n)),je.alerts.dismiss(i)}},je.translator.trans("core.forum.composer_edit.view_button"));i=je.alerts.show({type:"success",controls:[r]},je.translator.trans("core.forum.composer_edit.edited_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(A),$t={controls:function(t,e){var n=this,i=new l.a;return["user","moderation","destructive"].forEach((function(r){var o=n[r+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return i.add(t.itemName,t)})),i.add(r+"Separator",F.a.component()))})),i},userControls:function(t,e){return new l.a},moderationControls:function(t,e){var n=new l.a;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",E.a.component({icon:"fas fa-pencil-alt",onclick:this.editAction.bind(t)},je.translator.trans("core.forum.post_controls.edit_button")))),n},destructiveControls:function(t,e){var n=new l.a;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",E.a.component({icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},je.translator.trans("core.forum.post_controls.restore_button"))),t.canDelete()&&n.add("delete",E.a.component({icon:"fas fa-times",onclick:this.deleteAction.bind(t,e)},je.translator.trans("core.forum.post_controls.delete_forever_button")))):t.canHide()&&n.add("hide",E.a.component({icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},je.translator.trans("core.forum.post_controls.delete_button"))),n},editAction:function(){var t=this;return new Promise((function(e){return je.composer.load(Dt,{post:t}),je.composer.show(),e()}))},hideAction:function(){if(confirm(Object(P.a)(je.translator.trans("core.forum.post_controls.hide_confirmation"))))return this.pushAttributes({hiddenAt:new Date,hiddenUser:je.session.user}),this.save({isHidden:!0}).then((function(){return m.redraw()}))},restoreAction:function(){return this.pushAttributes({hiddenAt:null,hiddenUser:null}),this.save({isHidden:!1}).then((function(){return m.redraw()}))},deleteAction:function(t){var e=this;if(confirm(Object(P.a)(je.translator.trans("core.forum.post_controls.delete_confirmation"))))return t&&(t.loading=!0),this.delete().then((function(){var t=e.discussion();t.removePost(e.id()),t.postIds().length||(je.discussions.removeDiscussion(t),je.viewingDiscussion(t)&&je.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}},It=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.loading=!1,this.subtree=new T.a((function(){return n.loading}),(function(){return n.attrs.post.freshness}),(function(){var t=n.attrs.post.user();return t&&t.freshness}),(function(){return n.controlsOpen}))},n.view=function(){var t=this,e=this.elementAttrs();e.className=this.classes(e.className).join(" ");var n=$t.controls(this.attrs.post,this).toArray(),i=this.footerItems().toArray();return m("article",e,m("div",null,this.loading?m(O.a,null):this.content(),m("aside",{className:"Post-actions"},m("ul",null,Object(h.a)(this.actionItems().toArray()),n.length?m("li",null,m(x.a,{className:"Post-controls",buttonClassName:"Button Button--icon Button--flat",menuClassName:"Dropdown-menu--right",icon:"fas fa-ellipsis-h",onshow:function(){return t.$(".Post-actions").addClass("open")},onhide:function(){return t.$(".Post-actions").removeClass("open")},accessibleToggleLabel:je.translator.trans("core.forum.post_controls.toggle_dropdown_accessible_label")},n)):"")),m("footer",{className:"Post-footer"},i.length?m("ul",null,Object(h.a)(i)):null)))},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=this.$(".Post-actions"),i=this.$(".Post-controls");n.toggleClass("open",i.hasClass("open"))},n.elementAttrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]),n=this.attrs.post.user(),i=this.attrs.post.discussion();return this.loading&&e.push("Post--loading"),n&&n===je.session.user&&e.push("Post--by-actor"),n&&n===i.user()&&e.push("Post--by-start-user"),e},n.actionItems=function(){return new l.a},n.footerItems=function(){return new l.a},e}(d.a),Mt=n(58),Lt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(t){return t.children[0]},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundOnresize=this.onresize.bind(this),$(window).on("resize",this.boundOnresize).resize()},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("resize",this.boundOnresize)},n.onresize=function(){var t=this,e=this.$(),n=$("#header"),i=$("#footer"),r=e.find("> ul");$(window).off(".affix"),r.removeClass("affix affix-top affix-bottom").removeData("bs.affix"),e.outerHeight(!0)>$(window).height()-n.outerHeight(!0)||r.affix({offset:{top:function(){return e.offset().top-n.outerHeight(!0)-parseInt(e.css("margin-top"),10)},bottom:function(){return t.bottom=i.outerHeight(!0)}}})},e}(d.a),Rt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.user=null,this.bodyClass="App--user"},n.view=function(){return m("div",{className:"UserPage"},this.user?[m(Ft,{user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===je.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m(Lt,null,m("nav",{className:"sideNav UserPage-nav"},m("ul",null,Object(h.a)(this.sidebarItems().toArray())))),m("div",{className:"sideNavOffset UserPage-content"},this.content())))]:[m(O.a,{display:"block"})])},n.content=function(){},n.show=function(t){this.user=t,je.current.set("user",t),je.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();je.preloadedApiDocument(),je.store.all("users").some((function(i){if((i.username().toLowerCase()===n||i.id()===t)&&i.joinTime())return e.show(i),!0})),this.user||je.store.find("users",t,{bySlug:!0}).then(this.show.bind(this))},n.sidebarItems=function(){var t=new l.a;return t.add("nav",m(vt.a,{className:"App-titleControl",buttonClassName:"Button"},this.navItems().toArray())),t},n.navItems=function(){var t=new l.a,e=this.user;return t.add("posts",m(pt.a,{href:je.route("user.posts",{username:e.slug()}),icon:"far fa-comment"},je.translator.trans("core.forum.user.posts_link")," ",m("span",{className:"Button-badge"},e.commentCount())),100),t.add("discussions",m(pt.a,{href:je.route("user.discussions",{username:e.slug()}),icon:"fas fa-bars"},je.translator.trans("core.forum.user.discussions_link")," ",m("span",{className:"Button-badge"},e.discussionCount())),90),je.session.user===e&&(t.add("separator",m(F.a,null),-90),t.add("settings",m(pt.a,{href:je.route("settings"),icon:"fas fa-cog"},je.translator.trans("core.forum.user.settings_link")),-100)),t},e}(u.a),Ht={controls:function(t,e){var n=this,i=new l.a;return["user","moderation","destructive"].forEach((function(r){var o=n[r+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return i.add(t.itemName,t)})),i.add(r+"Separator",m(F.a,null)))})),i},userControls:function(){return new l.a},moderationControls:function(t){var e=new l.a;return(t.canEdit()||t.canEditCredentials()||t.canEditGroups())&&e.add("edit",m(E.a,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(this,t)},je.translator.trans("core.forum.user_controls.edit_button"))),e},destructiveControls:function(t){var e=new l.a;return"1"!==t.id()&&t.canDelete()&&e.add("delete",m(E.a,{icon:"fas fa-times",onclick:this.deleteAction.bind(this,t)},je.translator.trans("core.forum.user_controls.delete_button"))),e},deleteAction:function(t){var e=this;confirm(je.translator.trans("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),je.current.matches(Rt,{user:t})?je.history.back():window.location.reload()})).catch((function(){return e.showDeletionAlert(t,"error")}))},showDeletionAlert:function(t,e){var n={success:"core.forum.user_controls.delete_success_message",error:"core.forum.user_controls.delete_error_message"}[e];je.alerts.show({type:e},je.translator.trans(n,{user:t,email:t.email()}))},editAction:function(t){je.modal.show(Mt.a,{user:t})}},Bt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loading=!1,this.isDraggedOver=!1},n.view=function(){var t=this.attrs.user;return m("div",{className:Object(j.a)(["AvatarEditor","Dropdown",this.attrs.className,this.loading&&"loading",this.isDraggedOver&&"dragover"])},Object(v.a)(t),m("a",{className:t.avatarUrl()?"Dropdown-toggle":"Dropdown-toggle AvatarEditor--noAvatar",title:je.translator.trans("core.forum.user.avatar_upload_tooltip"),"data-toggle":"dropdown",onclick:this.quickUpload.bind(this),ondragover:this.enableDragover.bind(this),ondragenter:this.enableDragover.bind(this),ondragleave:this.disableDragover.bind(this),ondragend:this.disableDragover.bind(this),ondrop:this.dropUpload.bind(this)},this.loading?m(O.a,{display:"unset",size:"large"}):t.avatarUrl()?Object(b.a)("fas fa-pencil-alt"):Object(b.a)("fas fa-plus-circle")),m("ul",{className:"Dropdown-menu Menu"},Object(h.a)(this.controlItems().toArray())))},n.controlItems=function(){var t=new l.a;return t.add("upload",m(E.a,{icon:"fas fa-upload",onclick:this.openPicker.bind(this)},je.translator.trans("core.forum.user.avatar_upload_button"))),t.add("remove",m(E.a,{icon:"fas fa-times",onclick:this.remove.bind(this)},je.translator.trans("core.forum.user.avatar_remove_button"))),t},n.enableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!0},n.disableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1},n.dropUpload=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1,this.upload(t.dataTransfer.files[0])},n.quickUpload=function(t){this.attrs.user.avatarUrl()||(t.preventDefault(),t.stopPropagation(),this.openPicker())},n.openPicker=function(){var t=this;this.loading||$('<input type="file">').appendTo("body").hide().click().on("input",(function(e){t.upload($(e.target)[0].files[0])}))},n.upload=function(t){if(!this.loading){var e=this.attrs.user,n=new FormData;n.append("avatar",t),this.loading=!0,m.redraw(),je.request({method:"POST",url:je.forum.attribute("apiUrl")+"/users/"+e.id()+"/avatar",serialize:function(t){return t},body:n}).then(this.success.bind(this),this.failure.bind(this))}},n.remove=function(){var t=this.attrs.user;this.loading=!0,m.redraw(),je.request({method:"DELETE",url:je.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){je.store.pushPayload(t),delete this.attrs.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(d.a),Ft=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.user,e=Ht.controls(t,this).toArray(),n=t.color(),i=t.badges().toArray();return m("div",{className:"UserCard "+(this.attrs.className||""),style:n&&{"--usercard-bg":n}},m("div",{className:"darkenBackground"},m("div",{className:"container"},e.length?x.a.component({className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.attrs.controlsButtonClassName,label:je.translator.trans("core.forum.user_controls.button"),accessibleToggleLabel:je.translator.trans("core.forum.user_controls.toggle_dropdown_accessible_label"),icon:"fas fa-ellipsis-v"},e):"",m("div",{className:"UserCard-profile"},m("h2",{className:"UserCard-identity"},this.attrs.editable?[Bt.component({user:t,className:"UserCard-avatar"}),Object(tt.a)(t)]:m(p.a,{href:je.route.user(t)},m("div",{className:"UserCard-avatar"},Object(v.a)(t)),Object(tt.a)(t))),i.length?m("ul",{className:"UserCard-badges badges"},Object(h.a)(i)):"",m("ul",{className:"UserCard-info"},Object(h.a)(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new l.a,e=this.attrs.user,n=e.lastSeenAt();if(n){var i=e.isOnline();t.add("lastSeen",m("span",{className:"UserCard-lastSeen"+(i?" online":"")},i?[Object(b.a)("fas fa-circle")," ",je.translator.trans("core.forum.user.online_text")]:[Object(b.a)("far fa-clock")," ",Object(y.a)(n)]))}return t.add("joined",je.translator.trans("core.forum.user.joined_date_text",{ago:Object(y.a)(e.joinTime())})),t},e}(d.a),Ut=n(89),qt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();if(!e)return m("div",{className:"PostUser"},m("h3",null,Object(v.a)(e,{className:"PostUser-avatar"})," ",Object(tt.a)(e)));var n="";return!t.isHidden()&&this.attrs.cardVisible&&(n=Ft.component({user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})),m("div",{className:"PostUser"},m("h3",null,m(p.a,{href:je.route.user(e)},Object(v.a)(e,{className:"PostUser-avatar"}),Object(Ut.a)(e),Object(tt.a)(e))),m("ul",{className:"PostUser-badges badges"},Object(h.a)(e.badges().toArray())),n)},n.oncreate=function(e){var n,i=this;t.prototype.oncreate.call(this,e),this.$().on("mouseover","h3 a, .UserCard",(function(){clearTimeout(n),n=setTimeout(i.showCard.bind(i),500)})).on("mouseout","h3 a, .UserCard",(function(){clearTimeout(n),n=setTimeout(i.hideCard.bind(i),250)}))},n.showCard=function(){var t=this;this.attrs.oncardshow(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.attrs.oncardhide()}))},e}(d.a),zt=n(90),Wt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.createdAt(),n=this.getPermalink(t),i="ontouchstart"in document.documentElement;return m("div",{className:"Dropdown PostMeta"},m("a",{className:"Dropdown-toggle",onclick:function(t){var e=this;setTimeout((function(){return $(e).parent().find(".PostMeta-permalink").select()})),t.redraw=!1},"data-toggle":"dropdown"},Object(N.a)(e)),m("div",{className:"Dropdown-menu dropdown-menu"},m("span",{className:"PostMeta-number"},je.translator.trans("core.forum.post.number_tooltip",{number:t.number()}))," ",m("span",{className:"PostMeta-time"},Object(zt.a)(e))," ",m("span",{className:"PostMeta-ip"},t.data.attributes.ipAddress),i?m("a",{className:"Button PostMeta-permalink",href:n},n):m("input",{className:"FormControl PostMeta-permalink",value:n,onclick:function(t){return t.stopPropagation()}})))},n.getPermalink=function(t){return window.location.origin+je.route.post(t)},e}(d.a),Vt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e)},n.view=function(){var t=this.attrs.post,e=t.editedUser(),n=je.translator.trans("core.forum.post.edited_tooltip",{user:e,ago:Object(y.a)(t.editedAt())});return m(V.a,{text:n},m("span",{class:"PostEdited"},je.translator.trans("core.forum.post.edited_text")))},n.oncreate=function(e){t.prototype.oncreate.call(this,e)},e}(d.a),Yt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.revealContent=!1,this.cardVisible=!1,this.subtree.check((function(){return n.cardVisible}),(function(){return n.isEditing()}),(function(){return n.revealContent}))},n.content=function(){return t.prototype.content.call(this).concat([m("header",{className:"Post-header"},m("ul",null,Object(h.a)(this.headerItems().toArray()))),m("div",{className:"Post-body"},this.isEditing()?m(et,{className:"Post-preview",composer:je.composer}):m.trust(this.attrs.post.contentHtml()))])},n.refreshContent=function(){var t=this.isEditing()?"":this.attrs.post.contentHtml();this.contentHtml!==t&&this.$(".Post-body script").each((function(){var t=document.createElement("script");t.textContent=this.textContent,Array.from(this.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),this.parentNode.replaceChild(t,this)})),this.contentHtml=t},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.refreshContent()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.refreshContent()},n.isEditing=function(){return je.composer.bodyMatches(Dt,{post:this.attrs.post})},n.elementAttrs=function(){var e=this.attrs.post,n=t.prototype.elementAttrs.call(this);return n.className=(n.className||"")+" "+Object(j.a)({CommentPost:!0,"Post--renderFailed":e.renderFailed(),"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()}),n},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=this,e=new l.a,n=this.attrs.post;return e.add("user",qt.component({post:n,cardVisible:this.cardVisible,oncardshow:function(){t.cardVisible=!0,m.redraw()},oncardhide:function(){t.cardVisible=!1,m.redraw()}}),100),e.add("meta",Wt.component({post:n})),n.isEdited()&&!n.isHidden()&&e.add("edited",Vt.component({post:n})),n.isHidden()&&e.add("toggle",E.a.component({className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),e},e}(It),Gt=n(32),Kt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.elementAttrs=function(){var e=t.prototype.elementAttrs.call(this);return e.className=(e.className||"")+" EventPost "+Object(Gt.ucfirst)(this.attrs.post.contentType())+"Post",e},n.content=function(){var e=this.attrs.post.user(),n=Object(tt.a)(e),i=Object.assign(this.descriptionData(),{user:e,username:e?m(p.a,{className:"EventPost-user",href:je.route.user(e)},n):n});return t.prototype.content.call(this).concat([Object(b.a)(this.icon(),{className:"EventPost-icon"}),m("div",{class:"EventPost-info"},this.description(i))])},n.icon=function(){return""},n.description=function(t){return je.translator.trans(this.descriptionKey(),t)},n.descriptionKey=function(){return""},n.descriptionData=function(){return{}},e}(It),Xt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.description=function(t){var e=je.translator.trans("core.forum.post_stream.discussion_renamed_text",t),n=je.translator.trans("core.forum.post_stream.discussion_renamed_old_tooltip",t);return m("span",{title:Object(P.a)(n)},e)},n.descriptionData=function(){var t=this.attrs.post,e=t.content()[0],n=t.content()[1];return{old:e,new:m("strong",{className:"DiscussionRenamedPost-new"},n)}},e}(Kt),Jt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.hidden=localStorage.getItem("welcomeHidden")},n.view=function(){var t=this;if(this.hidden)return m("div",null);return m("header",{className:"Hero WelcomeHero"},m("div",{class:"container"},E.a.component({icon:"fas fa-times",onclick:function(){t.$().slideUp(t.hide.bind(t))},className:"Hero-close Button Button--icon Button--link"}),m("div",{className:"containerNarrow"},m("h2",{className:"Hero-title"},je.forum.attribute("welcomeTitle")),m("div",{className:"Hero-subtitle"},m.trust(je.forum.attribute("welcomeMessage"))))))},n.hide=function(){localStorage.setItem("welcomeHidden","true"),this.hidden=!0},e}(d.a),Qt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||Object(P.a)(je.translator.trans("core.forum.composer_discussion.body_placeholder")),e.submitLabel=e.submitLabel||je.translator.trans("core.forum.composer_discussion.submit_button"),e.confirmExit=e.confirmExit||Object(P.a)(je.translator.trans("core.forum.composer_discussion.discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||Object(P.a)(je.translator.trans("core.forum.composer_discussion.title_placeholder")),e.className="ComposerBody--discussion"};var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.composer.fields.title=this.composer.fields.title||Object(M.a)(""),this.title=this.composer.fields.title},n.headerItems=function(){var e=t.prototype.headerItems.call(this);return e.add("title",m("h3",null,je.translator.trans("core.forum.composer_discussion.title")),100),e.add("discussionTitle",m("h3",null,m("input",{className:"FormControl",bidi:this.title,placeholder:this.attrs.titlePlaceholder,disabled:!!this.attrs.disabled,onkeydown:this.onkeydown.bind(this)}))),e},n.onkeydown=function(t){13===t.which&&(t.preventDefault(),this.composer.editor.moveCursorTo(0)),t.redraw=!1},n.hasChanges=function(){return this.title()||this.composer.fields.content()},n.data=function(){return{title:this.title(),content:this.composer.fields.content()}},n.onsubmit=function(){var t=this;this.loading=!0;var e=this.data();je.store.createRecord("discussions").save(e).then((function(e){t.composer.hide(),je.discussions.refresh({deferClear:!0}),m.route.set(je.route.discussion(e))}),this.loaded.bind(this))},e}(A),Zt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(n){t.prototype.oninit.call(this,n),je.previous.matches(dt)&&(this.lastDiscussion=je.previous.get("discussion")),je.previous.matches(e)&&je.discussions.clear(),je.discussions.refreshParams(je.search.params(),m.route.param("page")),je.history.push("index",je.translator.trans("core.forum.header.back_to_index_tooltip")),this.bodyClass="App--index",this.scrollTopOnCreate=!1},n.view=function(){return m("div",{className:"IndexPage"},this.hero(),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m("nav",{className:"IndexPage-nav sideNav"},m("ul",null,Object(h.a)(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},m("div",{className:"IndexPage-toolbar"},m("ul",{className:"IndexPage-toolbar-view"},Object(h.a)(this.viewItems().toArray())),m("ul",{className:"IndexPage-toolbar-action"},Object(h.a)(this.actionItems().toArray()))),m(K,{state:je.discussions})))))},n.setTitle=function(){je.setTitle(je.translator.trans("core.forum.index.meta_title_text")),je.setTitleCount(0)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.setTitle();var n=je.cache.heroHeight,i=je.cache.heroHeight=this.$(".Hero").outerHeight()||0,r=je.cache.scrollTop;if($("#app").css("min-height",$(window).height()+i),null!=je.previous.type&&("desktop"==je.screen()||"desktop-hd"==je.screen()||this.lastDiscussion?$(window).scrollTop(r-n+i):$(window).scrollTop(0),this.lastDiscussion)){var o=this.$('li[data-id="'+this.lastDiscussion.id()+'"] .DiscussionListItem');if(o.length){var s=$("#header").outerHeight(),a=$(window).height(),c=o.offset().top,u=c+o.outerHeight();(c<r+s||u>r+a)&&$(window).scrollTop(c-s)}}},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),je.cache.scrollTop=$(window).scrollTop()},n.onremove=function(e){t.prototype.onremove.call(this,e),$("#app").css("min-height","")},n.hero=function(){return Jt.component()},n.sidebarItems=function(){var t=this,e=new l.a,n=je.forum.attribute("canStartDiscussion")||!je.session.user;return e.add("newDiscussion",E.a.component({icon:"fas fa-edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:function(){return t.newDiscussionAction().catch((function(){}))},disabled:!n},je.translator.trans(n?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button"))),e.add("nav",vt.a.component({buttonClassName:"Button",className:"App-titleControl",accessibleToggleLabel:je.translator.trans("core.forum.index.toggle_sidenav_dropdown_accessible_label")},this.navItems(this).toArray())),e},n.navItems=function(){var t=new l.a,e=je.search.stickyParams();return t.add("allDiscussions",pt.a.component({href:je.route("index",e),icon:"far fa-comments"},je.translator.trans("core.forum.index.all_discussions_link")),100),t},n.viewItems=function(){var t=new l.a,e=je.discussions.sortMap(),n={};for(var i in e)n[i]=je.translator.trans("core.forum.index_sort."+i+"_button");return t.add("sort",x.a.component({buttonClassName:"Button",label:n[je.search.params().sort]||Object.keys(e).map((function(t){return n[t]}))[0],accessibleToggleLabel:je.translator.trans("core.forum.index_sort.toggle_dropdown_accessible_label")},Object.keys(n).map((function(t){var i=n[t],r=(je.search.params().sort||Object.keys(e)[0])===t;return E.a.component({icon:!r||"fas fa-check",onclick:je.search.changeSort.bind(je.search,t),active:r},i)})))),t},n.actionItems=function(){var t=new l.a;return t.add("refresh",E.a.component({title:je.translator.trans("core.forum.index.refresh_tooltip"),icon:"fas fa-sync",className:"Button Button--icon",onclick:function(){je.discussions.refresh(),je.session.user&&(je.store.find("users",je.session.user.id()),m.redraw())}})),je.session.user&&t.add("markAllAsRead",E.a.component({title:je.translator.trans("core.forum.index.mark_all_as_read_tooltip"),icon:"fas fa-check",className:"Button Button--icon",onclick:this.markAllAsRead.bind(this)})),t},n.newDiscussionAction=function(){return new Promise((function(t,e){return je.session.user?(je.composer.load(Qt,{user:je.session.user}),je.composer.show(),t(je.composer)):(je.modal.show(B),e())}))},n.markAllAsRead=function(){confirm(je.translator.trans("core.forum.index.mark_all_as_read_confirmation"))&&je.session.user.save({markedAllAsReadAt:new Date})},e}(u.a);Zt.providesInitialSearch=!0;var te=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loading=!0,this.moreResults=!1,this.posts=[],this.loadLimit=20,this.loadUser(m.route.param("username"))},n.content=function(){return 0!==this.posts.length||this.loading?(this.loading?t=m(O.a,null):this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},m(E.a,{className:"Button",onclick:this.loadMore.bind(this)},je.translator.trans("core.forum.user.posts_load_more_button")))),m("div",{className:"PostsUserPage"},m("ul",{className:"PostsUserPage-list"},this.posts.map((function(t){return m("li",null,m("div",{className:"PostsUserPage-discussion"},je.translator.trans("core.forum.user.in_discussion_text",{discussion:m(p.a,{href:je.route.post(t)},t.discussion().title())})),m(Yt,{post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(G.a,{text:je.translator.trans("core.forum.user.posts_empty_text")}));var t},n.show=function(e){t.prototype.show.call(this,e),this.refresh()},n.refresh=function(){this.loading=!0,this.posts=[],m.redraw(),this.loadResults().then(this.parseResults.bind(this))},n.loadResults=function(t){return je.store.find("posts",{filter:{author:this.user.username(),type:"comment"},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},n.loadMore=function(){this.loading=!0,this.loadResults(this.posts.length).then(this.parseResults.bind(this))},n.parseResults=function(t){return this.loading=!1,[].push.apply(this.posts,t),this.moreResults=t.length>=this.loadLimit,m.redraw(),t},e}(Rt),ee=n(59),ne=n(60);function ie(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return re(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return re(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function re(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var oe=function(t){function e(e,n){var i;return void 0===n&&(n=1),(i=t.call(this,e,n,20)||this).extraDiscussions=[],i}Object(o.a)(e,t);var n=e.prototype;return n.requestParams=function(){var t={include:["user","lastPostedUser"],filter:this.params.filter||{}};return t.sort=this.sortMap()[this.params.sort],this.params.q&&(t.filter.q=this.params.q,t.include.push("mostRelevantPost","mostRelevantPost.user")),t},n.loadPage=function(e){void 0===e&&(e=1);var n=je.preloadedApiDocument();return n?(this.initialLoading=!1,Promise.resolve(n)):t.prototype.loadPage.call(this,e)},n.clear=function(){t.prototype.clear.call(this),this.extraDiscussions=[]},n.sortMap=function(){var t={};return this.params.q&&(t.relevance=""),t.latest="-lastPostedAt",t.top="-commentCount",t.newest="-createdAt",t.oldest="createdAt",t},n.isSearchResults=function(){return!!this.params.q},n.removeDiscussion=function(t){for(var e,n=ie(this.pages);!(e=n()).done;){var i=e.value,r=i.items.indexOf(t);if(-1!==r){i.items.splice(r,1);break}}var o=this.extraDiscussions.indexOf(t);-1!==o&&this.extraDiscussions.splice(o),m.redraw()},n.addDiscussion=function(t){this.removeDiscussion(t),this.extraDiscussions.unshift(t),m.redraw()},n.getAllItems=function(){return this.extraDiscussions.concat(t.prototype.getAllItems.call(this))},n.getPages=function(){var e=t.prototype.getPages.call(this);return this.extraDiscussions.length?[{number:-1,items:this.extraDiscussions}].concat(e):e},Object(ee.a)(e,[{key:"type",get:function(){return"discussions"}}]),e}(ne.a),se=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.show=function(e){t.prototype.show.call(this,e),this.state=new oe({filter:{author:e.username()},sort:"newest"}),this.state.refresh()},n.content=function(){return m("div",{className:"DiscussionsUserPage"},K.component({state:this.state}))},e}(Rt),ae=n(37),ce=n(40),ue=n(46),le=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.methods=this.notificationMethods().toArray(),this.loading={},this.types=this.notificationTypes().toArray()},n.view=function(){var t=this,e=this.attrs.user.preferences();return m("table",{className:"NotificationGrid"},m("thead",null,m("tr",null,m("td",null),this.methods.map((function(e){return m("th",{className:"NotificationGrid-groupToggle",onclick:t.toggleMethod.bind(t,e.name)},Object(b.a)(e.icon)," ",e.label)})))),m("tbody",null,this.types.map((function(n){return m("tr",null,m("td",{className:"NotificationGrid-groupToggle",onclick:t.toggleType.bind(t,n.name)},Object(b.a)(n.icon)," ",n.label),t.methods.map((function(i){var r=t.preferenceKey(n.name,i.name);return m("td",{className:"NotificationGrid-checkbox"},m(ue.a,{state:!!e[r],loading:t.loading[r],disabled:!(r in e),onchange:t.toggle.bind(t,[r])}))})))}))))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$("thead .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){var e=parseInt($(this).index(),10)+1;$(this).parents("table").find("td:nth-child("+e+")").toggleClass("highlighted","mouseenter"===t.type)})),this.$("tbody .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){$(this).parent().find("td").toggleClass("highlighted","mouseenter"===t.type)}))},n.toggle=function(t){var e=this,n=this.attrs.user,i=n.preferences(),r=!i[t[0]];t.forEach((function(t){e.loading[t]=!0,i[t]=r})),m.redraw(),n.save({preferences:i}).then((function(){t.forEach((function(t){return e.loading[t]=!1})),m.redraw()}))},n.toggleMethod=function(t){var e=this,n=this.types.map((function(n){return e.preferenceKey(n.name,t)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.toggleType=function(t){var e=this,n=this.methods.map((function(n){return e.preferenceKey(t,n.name)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new l.a;return t.add("alert",{name:"alert",icon:"fas fa-bell",label:je.translator.trans("core.forum.settings.notify_by_web_heading")}),t.add("email",{name:"email",icon:"far fa-envelope",label:je.translator.trans("core.forum.settings.notify_by_email_heading")}),t},n.notificationTypes=function(){var t=new l.a;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:je.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(d.a),de=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.className=function(){return"ChangePasswordModal Modal--small"},n.title=function(){return je.translator.trans("core.forum.change_password.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},je.translator.trans("core.forum.change_password.text")),m("div",{className:"Form-group"},E.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},je.translator.trans("core.forum.change_password.send_button")))))},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,je.request({method:"POST",url:je.forum.attribute("apiUrl")+"/forgot",body:{email:je.session.user.email()}}).then(this.hide.bind(this),this.loaded.bind(this))},e}(I.a),he=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.success=!1,this.email=Object(M.a)(je.session.user.email()),this.password=Object(M.a)("")},n.className=function(){return"ChangeEmailModal Modal--small"},n.title=function(){return je.translator.trans("core.forum.change_email.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},je.translator.trans("core.forum.change_email.confirmation_message",{email:m("strong",null,this.email())})),m("div",{className:"Form-group"},m(E.a,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},je.translator.trans("core.forum.change_email.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{type:"email",name:"email",className:"FormControl",placeholder:je.session.user.email(),bidi:this.email,disabled:this.loading})),m("div",{className:"Form-group"},m("input",{type:"password",name:"password",className:"FormControl",autocomplete:"current-password",placeholder:je.translator.trans("core.forum.change_email.confirm_password_placeholder"),bidi:this.password,disabled:this.loading})),m("div",{className:"Form-group"},E.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},je.translator.trans("core.forum.change_email.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.email()!==je.session.user.email()?(this.loading=!0,this.alertAttrs=null,je.session.user.save({email:this.email()},{errorHandler:this.onerror.bind(this),meta:{password:this.password()}}).then((function(){e.success=!0})).catch((function(){})).then(this.loaded.bind(this))):this.hide()},n.onerror=function(e){401===e.status&&(e.alert.content=je.translator.trans("core.forum.change_email.incorrect_password_message")),t.prototype.onerror.call(this,e)},e}(I.a),fe=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.show(je.session.user),je.setTitle(je.translator.trans("core.forum.settings.title"))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,Object(h.a)(this.settingsItems().toArray())))},n.settingsItems=function(){var t=this,e=new l.a;return["account","notifications","privacy"].forEach((function(n){e.add(n,m(ce.a,{className:"Settings-"+n,label:je.translator.trans("core.forum.settings."+n+"_heading")},t[n+"Items"]().toArray()))})),e},n.accountItems=function(){var t=new l.a;return t.add("changePassword",m(E.a,{className:"Button",onclick:function(){return je.modal.show(de)}},je.translator.trans("core.forum.settings.change_password_button"))),t.add("changeEmail",m(E.a,{className:"Button",onclick:function(){return je.modal.show(he)}},je.translator.trans("core.forum.settings.change_email_button"))),t},n.notificationsItems=function(){var t=new l.a;return t.add("notificationGrid",m(le,{user:this.user})),t},n.privacyItems=function(){var t=this,e=new l.a;return e.add("discloseOnline",m(ae.a,{state:this.user.preferences().discloseOnline,onchange:function(e){t.discloseOnlineLoading=!0,t.user.savePreferences({discloseOnline:e}).then((function(){t.discloseOnlineLoading=!1,m.redraw()}))},loading:this.discloseOnlineLoading},je.translator.trans("core.forum.settings.privacy_disclose_online_label"))),e},e}(Rt),pe=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),je.history.push("notifications"),je.notifications.load(),this.bodyClass="App--notifications"},n.view=function(){return m("div",{className:"NotificationsPage"},m(bt,{state:je.notifications}))},e}(u.a),me=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.canonicalizeDiscussionSlug=function(t){if(t)return t.split("-")[0]},n.makeKey=function(){var t=Object(ft.a)({},m.route.param());return"near"in t&&delete t.near,t.id=this.canonicalizeDiscussionSlug(t.id),this.routeName.replace(".near","")+JSON.stringify(t)},n.onmatch=function(n,i,r){return je.current.matches(dt)&&this.canonicalizeDiscussionSlug(n.id)===this.canonicalizeDiscussionSlug(m.route.param("id"))&&(e.scrollToPostNumber=n.near||"1"),t.prototype.onmatch.call(this,n,i,r)},n.render=function(n){if(null!==e.scrollToPostNumber){var i=e.scrollToPostNumber;setTimeout((function(){return je.current.get("stream").goToNumber(i)})),e.scrollToPostNumber=null}return t.prototype.render.call(this,n)},e}(n(39).a);me.scrollToPostNumber=null;var ve=function(t){t.routes={index:{path:"/all",component:Zt},discussion:{path:"/d/:id",component:dt,resolverClass:me},"discussion.near":{path:"/d/:id/:near",component:dt,resolverClass:me},user:{path:"/u/:username",component:te},"user.posts":{path:"/u/:username",component:te},"user.discussions":{path:"/u/:username/discussions",component:se},settings:{path:"/settings",component:fe},notifications:{path:"/notifications",component:pe}},t.route.discussion=function(e,n){return t.route(n&&1!==n?"discussion.near":"discussion",{id:e.slug(),near:n&&1!==n?n:void 0})},t.route.post=function(e){return t.route.discussion(e.discussion(),e.number())},t.route.user=function(e){return t.route("user",{username:e.slug()})}},ge=n(28);function be(t){var e=t.session.user;if(e&&!e.isEmailConfirmed()){var n=function(n){function i(){return n.apply(this,arguments)||this}Object(o.a)(i,n);var r=i.prototype;return r.oninit=function(t){n.prototype.oninit.call(this,t),this.loading=!1,this.sent=!1},r.view=function(){return m(E.a,{class:"Button Button--link",onclick:this.onclick.bind(this),loading:this.loading,disabled:this.sent},this.sent?[Object(b.a)("fas fa-check")," ",t.translator.trans("core.forum.user_email_confirmation.sent_message")]:t.translator.trans("core.forum.user_email_confirmation.resend_button"))},r.onclick=function(){var n=this;this.loading=!0,m.redraw(),t.request({method:"POST",url:t.forum.attribute("apiUrl")+"/users/"+e.id()+"/send-confirmation"}).then((function(){n.loading=!1,n.sent=!0,m.redraw()})).catch((function(){n.loading=!1,m.redraw()}))},i}(d.a),i=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return Object(ft.a)({},n,{children:[m("div",{className:"container"},n.children)]})},e}(ge.a);m.mount($("<div/>").insertBefore("#content")[0],{view:function(){return m(i,{dismissible:!1,controls:[m(n,null)]},t.translator.trans("core.forum.user_email_confirmation.alert_message",{email:m("strong",null,e.email())}))}})}}var ye=n(78),we=n(51),xe=function(t){function e(){return t.call(this,{},1,10)||this}Object(o.a)(e,t);var n=e.prototype;return n.load=function(){return je.session.user.newNotificationCount()&&(this.pages=[],this.location={page:1}),this.pages.length>0?Promise.resolve():(je.session.user.pushAttributes({newNotificationCount:0}),t.prototype.loadNext.call(this))},n.markAllAsRead=function(){if(0!==this.pages.length)return je.session.user.pushAttributes({unreadNotificationCount:0}),this.pages.forEach((function(t){t.items.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),je.request({url:je.forum.attribute("apiUrl")+"/notifications/read",method:"POST"})},Object(ee.a)(e,[{key:"type",get:function(){return"notifications"}}]),e}(ne.a),Ne=n(17),Ce=function(){function t(t){void 0===t&&(t=[]),this.cachedSearches=void 0,this.value="",this.cachedSearches=new Set(t)}var e=t.prototype;return e.getInitialSearch=function(){return""},e.getValue=function(){return this.value},e.setValue=function(t){this.value=t},e.clear=function(){this.setValue("")},e.cache=function(t){this.cachedSearches.add(t)},e.isCached=function(t){return this.cachedSearches.has(t)},t}(),Te=["q"],Oe=function(t){function e(e){var n;return void 0===e&&(e=[]),(n=t.call(this,e)||this).initialValueSet=!1,n}Object(o.a)(e,t);var n=e.prototype;return n.getValue=function(){return!this.initialValueSet&&this.currPageProvidesSearch()&&this.intializeValue(),t.prototype.getValue.call(this)},n.intializeValue=function(){this.setValue(this.getInitialSearch()),this.initialValueSet=!0},n.currPageProvidesSearch=function(){return je.current.type&&je.current.type.providesInitialSearch},n.getInitialSearch=function(){return this.currPageProvidesSearch()?this.params().q:""},n.clear=function(){t.prototype.clear.call(this),this.getInitialSearch()?this.clearInitialSearch():m.redraw()},n.clearInitialSearch=function(){var t=this.params(),e=(t.q,Object(Ne.a)(t,Te));Object(s.a)(je.route(je.current.get("routeName"),e))},n.stickyParams=function(){return{sort:m.route.param("sort"),q:m.route.param("q")}},n.params=function(){var t=this.stickyParams();return t.filter=m.route.param("filter"),t},n.changeSort=function(t){var e=this.params();t===Object.keys(je.discussions.sortMap())[0]?delete e.sort:e.sort=t,Object(s.a)(je.route(je.current.get("routeName"),e))},e}(Ce);var Se=function(t){function e(){var e;return(e=t.call(this)||this).notificationComponents={discussionRenamed:Pt},e.postComponents={comment:Yt,discussionRenamed:Xt},e.pane=null,e.history=new a,e.notifications=new xe,e.search=new Oe,e.composer=new jt,e.discussions=new oe({}),ve(Object(r.a)(e)),e}Object(o.a)(e,t);var n=e.prototype;return n.mount=function(){var e=this,n=this.forum.attribute("defaultRoute"),i="index";for(var r in this.routes)this.routes[r].path===n&&(i=r);this.routes[i].path="/",this.history.push(i,this.translator.trans("core.forum.header.back_to_index_tooltip"),"/"),this.pane=new c(document.getElementById("app")),m.route.prefix="",t.prototype.mount.call(this,this.forum.attribute("basePath")),m.mount(document.getElementById("app-navigation"),{view:function(){return we.a.component({className:"App-backControl",drawer:!0})}}),m.mount(document.getElementById("header-navigation"),we.a),m.mount(document.getElementById("header-primary"),ht),m.mount(document.getElementById("header-secondary"),Tt),m.mount(document.getElementById("composer"),{view:function(){return At.component({state:e.composer})}}),be(this),document.getElementById("home-link").addEventListener("click",(function(t){t.ctrlKey||t.metaKey||2===t.which||(t.preventDefault(),je.history.home(),je.session.user&&(je.store.find("users",je.session.user.id()),m.redraw()))})),"ontouchstart"in window&&navigator.vendor&&navigator.vendor.includes("Apple")&&navigator.userAgent&&!navigator.userAgent.includes("CriOS")&&!navigator.userAgent.includes("FxiOS")&&$((function(){$(".App").addClass("mobile-safari")}))},n.viewingDiscussion=function(t){return this.current.matches(dt,{discussion:t})},n.authenticationComplete=function(t){t.loggedIn?window.location.reload():this.modal.show(H,t)},e}(ye.a),ke=new Se;window.app=ke;var je=ke,Ae=n(113),Ee=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.initAttrs=function(e){e.className=(e.className||"")+" LogInButton",e.onclick=function(){var t=$(window);window.open(je.forum.attribute("baseUrl")+e.path,"logInPopup","width=580,height=400,top="+(t.height()/2-200)+",left="+(t.width()/2-290)+",status=no,scrollbars=yes,resizable=no")},t.initAttrs.call(this,e)},e}(E.a),Pe=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t=this.attrs.post,e=t.user(),n="comment"===t.contentType()&&t.contentPlain(),i=n?Object(g.a)(n,this.attrs.highlight,300):"";return m(p.a,{className:"PostPreview",href:je.route.post(t),onclick:this.attrs.onclick},m("span",{className:"PostPreview-content"},Object(v.a)(e),Object(tt.a)(e)," ",m("span",{className:"PostPreview-excerpt"},i)))},e}(d.a),_e=n(43),De=Object.assign(Ae.a,{"utils/PostControls":$t,"utils/KeyboardNavigatable":wt,"utils/slidable":z,"utils/History":a,"utils/DiscussionControls":q,"utils/alertEmailConfirmation":be,"utils/UserControls":Ht,"utils/Pane":c,"utils/BasicEditorDriver":_e.a,"states/ComposerState":jt,"states/DiscussionListState":oe,"states/GlobalSearchState":Oe,"states/NotificationListState":xe,"states/PostStreamState":lt,"states/SearchState":Ce,"components/AffixedSidebar":Lt,"components/DiscussionPage":dt,"components/DiscussionListPane":J,"components/LogInModal":B,"components/ComposerBody":A,"components/ForgotPasswordModal":L,"components/Notification":Et,"components/LogInButton":Ee,"components/DiscussionsUserPage":se,"components/Composer":At,"components/SessionDropdown":mt,"components/HeaderPrimary":ht,"components/PostEdited":Vt,"components/PostStream":it,"components/ChangePasswordModal":de,"components/IndexPage":Zt,"components/DiscussionRenamedNotification":Pt,"components/DiscussionsSearchSource":xt,"components/HeaderSecondary":Tt,"components/ComposerButton":Ot,"components/DiscussionList":K,"components/ReplyPlaceholder":nt,"components/AvatarEditor":Bt,"components/Post":It,"components/SettingsPage":fe,"components/TerminalPost":C,"components/ChangeEmailModal":he,"components/NotificationsDropdown":yt,"components/UserPage":Rt,"components/PostUser":qt,"components/UserCard":Ft,"components/UsersSearchSource":Nt,"components/NotificationGrid":le,"components/PostPreview":Pe,"components/EventPost":Kt,"components/DiscussionHero":f,"components/PostMeta":Wt,"components/DiscussionRenamedPost":Xt,"components/DiscussionComposer":Qt,"components/LogInButtons":R,"components/NotificationList":bt,"components/WelcomeHero":Jt,"components/SignUpModal":H,"components/CommentPost":Yt,"components/ComposerPostPreview":et,"components/ReplyComposer":D,"components/NotificationsPage":pe,"components/PostStreamScrubber":ot,"components/EditPostComposer":Dt,"components/RenameDiscussionModal":U,"components/Search":Ct,"components/DiscussionListItem":Y,"components/LoadingPost":Z,"components/PostsUserPage":te,"resolvers/DiscussionPageResolver":me,routes:ve,ForumApplication:Se}),$e=n(76);De.app=je;var Ie=Object($e.a)(De,"forum")}]);
//# sourceMappingURL=forum.js.map