framework/js/dist/forum.js
David Sevilla Martin dcb3cc1701
forum: make Discussion Page properly redraw PostStream - don't store vnode
Issue is that the code now looks like an ugly mess. :/
2020-04-18 09:07:18 -04:00

72 lines
254 KiB
JavaScript

flarum.core=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},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="/dist/",n(n.s=144)}([function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1),i=function(){function t(t){void 0===t&&(t={}),this.element=void 0,this.props=void 0,this.props=t.tag?{}:t}var e=t.prototype;return e.view=function(t){throw new Error("Component#view must be implemented by subclass")},e.oninit=function(t){this.setProps(t.attrs)},e.oncreate=function(t){this.setProps(t.attrs),this.element=t.dom},e.onbeforeupdate=function(t){this.setProps(t.attrs)},e.onupdate=function(t){this.setProps(t.attrs)},e.onbeforeremove=function(t){this.setProps(t.attrs)},e.onremove=function(t){this.setProps(t.attrs)},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;return m.fragment(Object(r.a)({},this.props,{oninit:function(){return t.oninit.apply(t,arguments)},oncreate:function(){return t.oncreate.apply(t,arguments)},onbeforeupdate:function(){return t.onbeforeupdate.apply(t,arguments)},onupdate:function(){var e;return(e=t.onupdate).bind.apply(e,arguments)},onbeforeremove:function(){var e;return(e=t.onbeforeremove).bind.apply(e,arguments)},onremove:function(){var e;return(e=t.onremove).bind.apply(e,arguments)}}),this.view())},t.component=function(t,e){void 0===t&&(t={});var n=Object(r.a)({},t);return e&&(n.children=e),m(this,n)},t.initProps=function(t){void 0===t&&(t={})},e.setProps=function(t){this.constructor.initProps(t),this.props=t},t}()},function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}n.d(e,"a",(function(){return r}))},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 r(t,e,n,r,i,o){return{tag:t,key:e,attrs:n,children:r,text:i,dom:o,domSize:void 0,state:void 0,events:void 0,instance:void 0}}r.normalize=function(t){return Array.isArray(t)?r("[",void 0,void 0,r.normalizeChildren(t),void 0,void 0):null==t||"boolean"==typeof t?null:"object"==typeof t?t:r("#",void 0,void 0,String(t),void 0,void 0)},r.normalizeChildren=function(t){var e=[];if(t.length){for(var n=null!=t[0]&&null!=t[0].key,i=1;i<t.length;i++)if((null!=t[i]&&null!=t[i].key)!==n)throw new TypeError("Vnodes must either always have keys or never have keys!");for(i=0;i<t.length;i++)e[i]=r.normalize(t[i])}return e},t.exports=r},function(t,e){t.exports=m},function(t,e,n){"use strict";var r=n(13);t.exports=n(43)(r,requestAnimationFrame,console)},function(t,e,n){"use strict";var r=n(14),i=n(15);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={};i(u,e);var l=c.replace(/:([^\/\.-]+)(\.{3})?/g,(function(t,n,r){return delete u[n],null==e[n]?t:r?e[n]:encodeURIComponent(String(e[n]))})),f=l.indexOf("?"),d=l.indexOf("#"),p=d<0?l.length:d,h=f<0?p:f,m=l.slice(0,h);n>=0&&(m+=t.slice(n,s)),f>=0&&(m+=(n<0?"?":"&")+l.slice(f,p));var v=r(u);return v&&(m+=(n<0&&f<0?"?":"&")+v),o>=0&&(m+=t.slice(o)),d>=0&&(m+=(o<0?"":"&")+l.slice(d)),m}},function(t,e,n){"use strict";var r=n(16);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),i=n<0?t.length:n,o=e<0?i: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?{}:r(t.slice(e+1,i))}}},function(t,e,n){"use strict";var r=n(3),i=n(9),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",r=[],i={};e=o.exec(t);){var a=e[1],c=e[2];if(""===a&&""!==c)n=c;else if("#"===a)i.id=c;else if("."===a)r.push(c);else if("["===e[3][0]){var u=e[6];u&&(u=u.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?r.push(u):i[e[4]]=""===u?u:u||!0}}return r.length>0&&(i.className=r.join(" ")),s[t]={tag:n,attrs:i}}function l(t,e){var n=e.attrs,i=r.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(i)&&1===i.length&&null!=i[0]&&"#"===i[0].tag?e.text=i[0].children:e.children=i,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=i.apply(1,arguments);return"string"==typeof t&&(e.children=r.normalizeChildren(e.children),"["!==t)?l(s[t]||u(t),e):(e.tag=t,e)}},function(t,e,n){"use strict";var r=n(3);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 r("",e.key,e,t)}},function(t,e,n){"use strict";(function(e){var r=n(11);"undefined"!=typeof window?(void 0===window.Promise?window.Promise=r:window.Promise.prototype.finally||(window.Promise.prototype.finally=r.prototype.finally),t.exports=window.Promise):void 0!==e?(void 0===e.Promise?e.Promise=r:e.Promise.prototype.finally||(e.Promise.prototype.finally=r.prototype.finally),t.exports=e.Promise):t.exports=r}).call(this,n(2))},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 r=this,i=[],o=[],s=l(i,!0),a=l(o,!1),c=r._instance={resolvers:i,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 r=0;r<t.length;r++)t[r](s);i.length=0,o.length=0,c.state=e,c.retry=function(){n(s)}}));else{if(s===r)throw new TypeError("Promise can't be resolved w/ itself");f(l.bind(s))}}catch(t){a(t)}}}function f(t){var e=0;function n(t){return function(n){e++>0||t(n)}}var r=n(a);try{t(n(s),r)}catch(t){r(t)}}f(n)};n.prototype.then=function(t,e){var r,i,o=this._instance;function s(t,e,n,s){e.push((function(e){if("function"!=typeof t)n(e);else try{r(t(e))}catch(t){i&&i(t)}})),"function"==typeof o.retry&&s===o.state&&o.retry()}var a=new n((function(t,e){r=t,i=e}));return s(t,o.resolvers,r,!0),s(e,o.rejectors,i,!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 r=t.length,i=0,o=[];if(0===t.length)e([]);else for(var s=0;s<t.length;s++)!function(s){function a(t){i++,o[s]=t,i===r&&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 r=0;r<t.length;r++)t[r].then(e,n)}))},t.exports=n}).call(this,n(12).setImmediate)},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,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(r,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(40),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(2))},function(t,e,n){"use strict";t.exports=n(42)(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)r(n,t[n]);return e.join("&");function r(t,n){if(Array.isArray(n))for(var i=0;i<n.length;i++)r(t+"["+i+"]",n[i]);else if("[object Object]"===Object.prototype.toString.call(n))for(var i in n)r(t+"["+i+"]",n[i]);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={},r={},i=0;i<e.length;i++){var o=e[i].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=r;s.indexOf("[")>-1&&c.pop();for(var l=0;l<c.length;l++){var f=c[l],d=c[l+1],p=""==d||!isNaN(parseInt(d,10));if(""===f)null==n[s=c.slice(0,l).join()]&&(n[s]=Array.isArray(u)?u.length:0),f=n[s]++;else if("__proto__"===f)break;if(l===c.length-1)u[f]=a;else{var h=Object.getOwnPropertyDescriptor(u,f);null!=h&&(h=h.value),null==h&&(u[f]=h=p?[]:{}),u=h}}}return r}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){"use strict";n(29),n(31),n(34),n(48),n(50),n(52),n(54),n(55),n(56),n(57);var r=function(t,e,n,r){return(t/=r/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){var t=void 0,e=void 0,n=void 0,o=void 0,s=void 0,a=void 0,c=void 0,u=void 0,l=void 0,f=void 0,d=void 0,p=void 0;function h(){return window.scrollY||window.pageYOffset}function m(t){return t.getBoundingClientRect().top+e}function v(n){l||(l=n),d=s(f=n-l,e,c,u),window.scrollTo(0,d),f<u?window.requestAnimationFrame(v):function(){window.scrollTo(0,e+c),t&&a&&(t.setAttribute("tabindex","-1"),t.focus());"function"==typeof p&&p();l=!1}()}return function(l){var f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(u=f.duration||1e3,o=f.offset||0,p=f.callback,s=f.easing||r,a=f.a11y||!1,e=h(),void 0===l?"undefined":i(l)){case"number":t=void 0,a=!1,n=e+l;break;case"object":n=m(t=l);break;case"string":t=document.querySelector(l),n=m(t)}switch(c=n-e+o,i(f.duration)){case"number":u=f.duration;break;case"function":u=f.duration(c)}window.requestAnimationFrame(v)}}(),s=n(19);var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u={container:!1,delay:0,html:!1,placement:"top",title:"",template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",offset:0,arrowSelector:".tooltip-arrow, .tooltip__arrow",innerSelector:".tooltip-inner, .tooltip__inner"},l=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),f.call(this),n=c({},u,n),e.jquery&&(e=e[0]),this.reference=e,this.options=n;var r="string"==typeof n.trigger?n.trigger.split(" ").filter((function(t){return-1!==["click","hover","focus"].indexOf(t)})):[];this._isOpen=!1,this._popperOptions={},this._setEventListeners(e,r,n)}return a(t,[{key:"_create",value:function(t,e,n,r){var i=window.document.createElement("div");i.innerHTML=e.trim();var o=i.childNodes[0];o.id="tooltip_"+Math.random().toString(36).substr(2,10),o.setAttribute("aria-hidden","false");var s=i.querySelector(this.options.innerSelector);return this._addTitleContent(t,n,r,s),o}},{key:"_addTitleContent",value:function(t,e,n,r){
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.3.3
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
var i;1===e.nodeType||11===e.nodeType?n&&r.appendChild(e):(i=e)&&"[object Function]"==={}.toString.call(i)?this._addTitleContent(t,e.call(t),n,r):n?r.innerHTML=e:r.textContent=e}},{key:"_show",value:function(t,e){if(this._isOpen&&!this._isOpening)return this;if(this._isOpen=!0,this._tooltipNode)return this._tooltipNode.style.visibility="visible",this._tooltipNode.setAttribute("aria-hidden","false"),this.popperInstance.update(),this;var n=t.getAttribute("title")||e.title;if(!n)return this;var r=this._create(t,e.template,n,e.html);t.setAttribute("aria-describedby",r.id);var i=this._findContainer(e.container,t);return this._append(r,i),this._popperOptions=c({},e.popperOptions,{placement:e.placement}),this._popperOptions.modifiers=c({},this._popperOptions.modifiers,{arrow:c({},this._popperOptions.modifiers&&this._popperOptions.modifiers.arrow,{element:e.arrowSelector}),offset:c({},this._popperOptions.modifiers&&this._popperOptions.modifiers.offset,{offset:e.offset||this._popperOptions.modifiers&&this._popperOptions.modifiers.offset&&this._popperOptions.modifiers.offset.offset||e.offset})}),e.boundariesElement&&(this._popperOptions.modifiers.preventOverflow={boundariesElement:e.boundariesElement}),this.popperInstance=new s.a(t,r,this._popperOptions),this._tooltipNode=r,this}},{key:"_hide",value:function(){return this._isOpen?(this._isOpen=!1,this._tooltipNode.style.visibility="hidden",this._tooltipNode.setAttribute("aria-hidden","true"),this):this}},{key:"_dispose",value:function(){var t=this;return this._events.forEach((function(e){var n=e.func,r=e.event;t.reference.removeEventListener(r,n)})),this._events=[],this._tooltipNode&&(this._hide(),this.popperInstance.destroy(),this.popperInstance.options.removeOnDestroy||(this._tooltipNode.parentNode.removeChild(this._tooltipNode),this._tooltipNode=null)),this}},{key:"_findContainer",value:function(t,e){return"string"==typeof t?t=window.document.querySelector(t):!1===t&&(t=e.parentNode),t}},{key:"_append",value:function(t,e){e.appendChild(t)}},{key:"_setEventListeners",value:function(t,e,n){var r=this,i=[],o=[];e.forEach((function(t){switch(t){case"hover":i.push("mouseenter"),o.push("mouseleave");break;case"focus":i.push("focus"),o.push("blur");break;case"click":i.push("click"),o.push("click")}})),i.forEach((function(e){var i=function(e){!0!==r._isOpening&&(e.usedByTooltip=!0,r._scheduleShow(t,n.delay,n,e))};r._events.push({event:e,func:i}),t.addEventListener(e,i)})),o.forEach((function(e){var i=function(e){!0!==e.usedByTooltip&&r._scheduleHide(t,n.delay,n,e)};r._events.push({event:e,func:i}),t.addEventListener(e,i),"click"===e&&n.closeOnClickOutside&&document.addEventListener("mousedown",(function(e){if(r._isOpening){var n=r.popperInstance.popper;t.contains(e.target)||n.contains(e.target)||i(e)}}),!0)}))}},{key:"_scheduleShow",value:function(t,e,n){var r=this;this._isOpening=!0;var i=e&&e.show||e||0;this._showTimeout=window.setTimeout((function(){return r._show(t,n)}),i)}},{key:"_scheduleHide",value:function(t,e,n,r){var i=this;this._isOpening=!1;var o=e&&e.hide||e||0;window.clearTimeout(this._showTimeout),window.setTimeout((function(){if(!1!==i._isOpen&&document.body.contains(i._tooltipNode)){if("mouseleave"===r.type)if(i._setTooltipNodeEvent(r,t,e,n))return;i._hide(t,n)}}),o)}},{key:"_updateTitleContent",value:function(t){if(void 0!==this._tooltipNode){var e=this._tooltipNode.querySelector(this.options.innerSelector);this._clearTitleContent(e,this.options.html,this.reference.getAttribute("title")||this.options.title),this._addTitleContent(this.reference,t,this.options.html,e),this.options.title=t,this.popperInstance.update()}else void 0!==this.options.title&&(this.options.title=t)}},{key:"_clearTitleContent",value:function(t,e,n){1===n.nodeType||11===n.nodeType?e&&t.removeChild(n):e?t.innerHTML="":t.textContent=""}}]),t}(),f=function(){var t=this;this.show=function(){return t._show(t.reference,t.options)},this.hide=function(){return t._hide()},this.dispose=function(){return t._dispose()},this.toggle=function(){return t._isOpen?t.hide():t.show()},this.updateTitleContent=function(e){return t._updateTitleContent(e)},this._events=[],this._setTooltipNodeEvent=function(e,n,r,i){var o=e.relatedreference||e.toElement||e.relatedTarget;return!!t._tooltipNode.contains(o)&&(t._tooltipNode.addEventListener(e.type,(function r(o){var s=o.relatedreference||o.toElement||o.relatedTarget;t._tooltipNode.removeEventListener(e.type,r),n.contains(s)||t._scheduleHide(n,i.delay,i,o)})),!0)}},d=l;$.fn.tooltip=function(t){return this.each((function(){var e=$(this),n=e.data("bs.tooltip"),r="object"==typeof t&&t||{};e.attr("title")&&(r.title=e.attr("title"),e.removeAttr("title"),e.attr("data-original-title",r.title)),"destroy"===t&&(t="dispose"),!n&&["dispose","hide"].includes(t)||(n||e.data("bs.tooltip",n=new d(this,r)),"string"==typeof t&&n[t]&&n[t]())}))},["width","height"].forEach((function(t){var e=t.replace(/./,(function(t){return t[0].toUpperCase()}));$.fn["outer"+e]=function(e){var n=this;if(n){var r=n[t]();return{width:["left","right"],height:["top","bottom"]}[t].forEach((function(t){e&&(r+=parseInt(n.css("margin-"+t),10))})),r}return null}})),$.expr[":"].input=function(){if("disabled"in this||["INPUT","SELECT","TEXTAREA","BUTTON"].includes(this.tagName))return this},$.fn.hover=function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)},$.fn.animatedScrollTop=function(t,e,n){return void 0===e&&(e=$.fx.speeds._default),"number"==typeof t&&(t-=window.scrollY||window.pageYOffset),o(t,{duration:$.fx.speeds[e]||e,callback:n}),this},$.fn.extend=$.extend.bind($),
/**
* Enable special events on Zepto
* @license Original Copyright 2013 Enideo. Released under dual MIT and GPL licenses.
*/
$.event.special=$.event.special||{};var p=$.fn.bind;$.fn.bind=function(t,e,n){var r=this;return n||(n=e,e=null),$.each(t.split(/\s/),(function(t,n){if((n=n.split(/\./)[0])in $.event.special){var i=$.event.special[n];i._init||(i._init=!0,i.originalHandler=i.handler,i.handler=function(){var t=Array.prototype.slice.call(arguments);t[0]=$.extend({},t[0]),$.event.handle=function(){var t=Array.prototype.slice.call(arguments),e=t[0],n=$(e.target);n.trigger.apply(n,arguments)},i.originalHandler.apply(this,t)}),i.setup.apply(r,[e])}return!0})),p.apply(this,[t,n])};n(58),n(61),n(62);var h,m,v=n(20),g=n.n(v),y=n(21),b=n.n(y),w=n(4),x=n.n(w),N=n(22),k=n.n(N),T=n(0);dayjs.extend(g.a),dayjs.extend(b.a),h=window.m,m=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(arguments[1]||(arguments[1]={}),t.prototype&&t.prototype instanceof T.a){var i=n.slice(1);1===i.length&&Array.isArray(i[0])&&(i=i[0]),i&&(Object.defineProperty(arguments[1],"children",{writable:!0}),arguments[1].children=(arguments[1].children||[]).concat(i))}var o=h.apply(this,arguments);return o.attrs||(o.attrs={}),o.attrs.bidi&&x.a.bidi(o,o.attrs.bidi),o.attrs.route&&(o.attrs.href=o.attrs.route,o.attrs.tag=x.a.route.Link,delete o.attrs.route),o},Object.keys(h).forEach((function(t){return m[t]=h[t]})),m.withAttr=function(t,e){return function(){e(this.getAttribute(t)||this[t])}},m.prop=k.a,window.m=m},function(t,e,n){"use strict";(function(t){
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.1
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,r=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(n&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}();var i=n&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),r))}};function o(t){return t&&"[object Function]"==={}.toString.call(t)}function s(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function a(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function c(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=s(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?t:c(a(t))}function u(t){return t&&t.referenceNode?t.referenceNode:t}var l=n&&!(!window.MSInputMethodContext||!document.documentMode),f=n&&/MSIE 10/.test(navigator.userAgent);function d(t){return 11===t?l:10===t?f:l||f}function p(t){if(!t)return document.documentElement;for(var e=d(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===s(n,"position")?p(n):n:t?t.ownerDocument.documentElement:document.documentElement}function h(t){return null!==t.parentNode?h(t.parentNode):t}function m(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,i=n?e:t,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var s,a,c=o.commonAncestorContainer;if(t!==c&&e!==c||r.contains(i))return"BODY"===(a=(s=c).nodeName)||"HTML"!==a&&p(s.firstElementChild)!==s?p(c):c;var u=h(t);return u.host?m(u.host,e):m(t,h(e).host)}function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",r=t.nodeName;if("BODY"===r||"HTML"===r){var i=t.ownerDocument.documentElement,o=t.ownerDocument.scrollingElement||i;return o[n]}return t[n]}function g(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=v(e,"top"),i=v(e,"left"),o=n?-1:1;return t.top+=r*o,t.bottom+=r*o,t.left+=i*o,t.right+=i*o,t}function y(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+r+"Width"])}function b(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],d(10)?parseInt(n["offset"+t])+parseInt(r["margin"+("Height"===t?"Top":"Left")])+parseInt(r["margin"+("Height"===t?"Bottom":"Right")]):0)}function w(t){var e=t.body,n=t.documentElement,r=d(10)&&getComputedStyle(n);return{height:b("Height",e,n,r),width:b("Width",e,n,r)}}var x=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},N=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),k=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=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function E(t){return T({},t,{right:t.left+t.width,bottom:t.top+t.height})}function _(t){var e={};try{if(d(10)){e=t.getBoundingClientRect();var n=v(t,"top"),r=v(t,"left");e.top+=n,e.left+=r,e.bottom+=n,e.right+=r}else e=t.getBoundingClientRect()}catch(t){}var i={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},o="HTML"===t.nodeName?w(t.ownerDocument):{},a=o.width||t.clientWidth||i.width,c=o.height||t.clientHeight||i.height,u=t.offsetWidth-a,l=t.offsetHeight-c;if(u||l){var f=s(t);u-=y(f,"x"),l-=y(f,"y"),i.width-=u,i.height-=l}return E(i)}function C(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=d(10),i="HTML"===e.nodeName,o=_(t),a=_(e),u=c(t),l=s(e),f=parseFloat(l.borderTopWidth),p=parseFloat(l.borderLeftWidth);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var h=E({top:o.top-a.top-f,left:o.left-a.left-p,width:o.width,height:o.height});if(h.marginTop=0,h.marginLeft=0,!r&&i){var m=parseFloat(l.marginTop),v=parseFloat(l.marginLeft);h.top-=f-m,h.bottom-=f-m,h.left-=p-v,h.right-=p-v,h.marginTop=m,h.marginLeft=v}return(r&&!n?e.contains(u):e===u&&"BODY"!==u.nodeName)&&(h=g(h,e)),h}function S(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,r=C(t,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),s=e?0:v(n),a=e?0:v(n,"left"),c={top:s-r.top+r.marginTop,left:a-r.left+r.marginLeft,width:i,height:o};return E(c)}function O(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===s(t,"position"))return!0;var n=a(t);return!!n&&O(n)}function P(t){if(!t||!t.parentElement||d())return document.documentElement;for(var e=t.parentElement;e&&"none"===s(e,"transform");)e=e.parentElement;return e||document.documentElement}function A(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},s=i?P(t):m(t,u(e));if("viewport"===r)o=S(s,i);else{var l=void 0;"scrollParent"===r?"BODY"===(l=c(a(e))).nodeName&&(l=t.ownerDocument.documentElement):l="window"===r?t.ownerDocument.documentElement:r;var f=C(l,s,i);if("HTML"!==l.nodeName||O(s))o=f;else{var d=w(t.ownerDocument),p=d.height,h=d.width;o.top+=f.top-f.marginTop,o.bottom=p+f.top,o.left+=f.left-f.marginLeft,o.right=h+f.left}}var v="number"==typeof(n=n||0);return o.left+=v?n:n.left||0,o.top+=v?n:n.top||0,o.right-=v?n:n.right||0,o.bottom-=v?n:n.bottom||0,o}function j(t){return t.width*t.height}function M(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var s=A(n,r,o,i),a={top:{width:s.width,height:e.top-s.top},right:{width:s.right-e.right,height:s.height},bottom:{width:s.width,height:s.bottom-e.bottom},left:{width:e.left-s.left,height:s.height}},c=Object.keys(a).map((function(t){return T({key:t},a[t],{area:j(a[t])})})).sort((function(t,e){return e.area-t.area})),u=c.filter((function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight})),l=u.length>0?u[0].key:c[0].key,f=t.split("-")[1];return l+(f?"-"+f:"")}function D(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?P(e):m(e,u(n));return C(n,i,r)}function $(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),r=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+r,height:t.offsetHeight+n}}function I(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function L(t,e,n){n=n.split("-")[0];var r=$(t),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),s=o?"top":"left",a=o?"left":"top",c=o?"height":"width",u=o?"width":"height";return i[s]=e[s]+e[c]/2-r[c]/2,i[a]=n===a?e[a]-r[u]:e[I(a)],i}function R(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function B(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var r=R(t,(function(t){return t[e]===n}));return t.indexOf(r)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&o(n)&&(e.offsets.popper=E(e.offsets.popper),e.offsets.reference=E(e.offsets.reference),e=n(e,t))})),e}function H(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=D(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=M(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=L(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=B(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function U(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function F(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r<e.length;r++){var i=e[r],o=i?""+i+n:t;if(void 0!==document.body.style[o])return o}return null}function z(){return this.state.isDestroyed=!0,U(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[F("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function q(t){var e=t.ownerDocument;return e?e.defaultView:window}function Y(t,e,n,r){n.updateBound=r,q(t).addEventListener("resize",n.updateBound,{passive:!0});var i=c(t);return function t(e,n,r,i){var o="BODY"===e.nodeName,s=o?e.ownerDocument.defaultView:e;s.addEventListener(n,r,{passive:!0}),o||t(c(s.parentNode),n,r,i),i.push(s)}(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function W(){this.state.eventsEnabled||(this.state=Y(this.reference,this.options,this.state,this.scheduleUpdate))}function V(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,q(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach((function(t){t.removeEventListener("scroll",e.updateBound)})),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function K(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function Z(t,e){Object.keys(e).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&K(e[n])&&(r="px"),t.style[n]=e[n]+r}))}var G=n&&/Firefox/i.test(navigator.userAgent);function J(t,e,n){var r=R(t,(function(t){return t.name===e})),i=!!r&&t.some((function(t){return t.name===n&&t.enabled&&t.order<r.order}));if(!i){var o="`"+e+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var X=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Q=X.slice(3);function tt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Q.indexOf(t),r=Q.slice(n+1).concat(Q.slice(0,n));return e?r.reverse():r}var et="flip",nt="clockwise",rt="counterclockwise";function it(t,e,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),s=t.split(/(\+|\-)/).map((function(t){return t.trim()})),a=s.indexOf(R(s,(function(t){return-1!==t.search(/,|\s/)})));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,u=-1!==a?[s.slice(0,a).concat([s[a].split(c)[0]]),[s[a].split(c)[1]].concat(s.slice(a+1))]:[s];return(u=u.map((function(t,r){var i=(1===r?!o:o)?"height":"width",s=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,s=!0,t):s?(t[t.length-1]+=e,s=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,r){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],s=i[2];if(!o)return t;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=r}return E(a)[e]/100*o}if("vh"===s||"vw"===s){return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}(t,i,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,r){K(n)&&(i[e]+=n*("-"===t[r-1]?-1:1))}))})),i}var ot={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var i=t.offsets,o=i.reference,s=i.popper,a=-1!==["bottom","top"].indexOf(n),c=a?"left":"top",u=a?"width":"height",l={start:k({},c,o[c]),end:k({},c,o[c]+o[u]-s[u])};t.offsets.popper=T({},s,l[r])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,r=t.placement,i=t.offsets,o=i.popper,s=i.reference,a=r.split("-")[0],c=void 0;return c=K(+n)?[+n,0]:it(n,o,s,a),"left"===a?(o.top+=c[0],o.left-=c[1]):"right"===a?(o.top+=c[0],o.left+=c[1]):"top"===a?(o.left+=c[0],o.top-=c[1]):"bottom"===a&&(o.left+=c[0],o.top+=c[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||p(t.instance.popper);t.instance.reference===n&&(n=p(n));var r=F("transform"),i=t.instance.popper.style,o=i.top,s=i.left,a=i[r];i.top="",i.left="",i[r]="";var c=A(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);i.top=o,i.left=s,i[r]=a,e.boundaries=c;var u=e.priority,l=t.offsets.popper,f={primary:function(t){var n=l[t];return l[t]<c[t]&&!e.escapeWithReference&&(n=Math.max(l[t],c[t])),k({},t,n)},secondary:function(t){var n="right"===t?"left":"top",r=l[n];return l[t]>c[t]&&!e.escapeWithReference&&(r=Math.min(l[n],c[t]-("right"===t?l.width:l.height))),k({},n,r)}};return u.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";l=T({},l,f[e](t))})),t.offsets.popper=l,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,r=e.reference,i=t.placement.split("-")[0],o=Math.floor,s=-1!==["top","bottom"].indexOf(i),a=s?"right":"bottom",c=s?"left":"top",u=s?"width":"height";return n[a]<o(r[c])&&(t.offsets.popper[c]=o(r[c])-n[u]),n[c]>o(r[a])&&(t.offsets.popper[c]=o(r[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!J(t.instance.modifiers,"arrow","keepTogether"))return t;var r=e.element;if("string"==typeof r){if(!(r=t.instance.popper.querySelector(r)))return t}else if(!t.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],o=t.offsets,a=o.popper,c=o.reference,u=-1!==["left","right"].indexOf(i),l=u?"height":"width",f=u?"Top":"Left",d=f.toLowerCase(),p=u?"left":"top",h=u?"bottom":"right",m=$(r)[l];c[h]-m<a[d]&&(t.offsets.popper[d]-=a[d]-(c[h]-m)),c[d]+m>a[h]&&(t.offsets.popper[d]+=c[d]+m-a[h]),t.offsets.popper=E(t.offsets.popper);var v=c[d]+c[l]/2-m/2,g=s(t.instance.popper),y=parseFloat(g["margin"+f]),b=parseFloat(g["border"+f+"Width"]),w=v-t.offsets.popper[d]-y-b;return w=Math.max(Math.min(a[l]-m,w),0),t.arrowElement=r,t.offsets.arrow=(k(n={},d,Math.round(w)),k(n,p,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(U(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=A(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],i=I(r),o=t.placement.split("-")[1]||"",s=[];switch(e.behavior){case et:s=[r,i];break;case nt:s=tt(r);break;case rt:s=tt(r,!0);break;default:s=e.behavior}return s.forEach((function(a,c){if(r!==a||s.length===c+1)return t;r=t.placement.split("-")[0],i=I(r);var u=t.offsets.popper,l=t.offsets.reference,f=Math.floor,d="left"===r&&f(u.right)>f(l.left)||"right"===r&&f(u.left)<f(l.right)||"top"===r&&f(u.bottom)>f(l.top)||"bottom"===r&&f(u.top)<f(l.bottom),p=f(u.left)<f(n.left),h=f(u.right)>f(n.right),m=f(u.top)<f(n.top),v=f(u.bottom)>f(n.bottom),g="left"===r&&p||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,y=-1!==["top","bottom"].indexOf(r),b=!!e.flipVariations&&(y&&"start"===o&&p||y&&"end"===o&&h||!y&&"start"===o&&m||!y&&"end"===o&&v),w=!!e.flipVariationsByContent&&(y&&"start"===o&&h||y&&"end"===o&&p||!y&&"start"===o&&v||!y&&"end"===o&&m),x=b||w;(d||g||x)&&(t.flipped=!0,(d||g)&&(r=s[c+1]),x&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=r+(o?"-"+o:""),t.offsets.popper=T({},t.offsets.popper,L(t.instance.popper,t.offsets.reference,t.placement)),t=B(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],r=t.offsets,i=r.popper,o=r.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return i[s?"left":"top"]=o[n]-(a?i[s?"width":"height"]:0),t.placement=I(e),t.offsets.popper=E(i),t}},hide:{order:800,enabled:!0,fn:function(t){if(!J(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=R(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var n=e.x,r=e.y,i=t.offsets.popper,o=R(t.instance.modifiers,(function(t){return"applyStyle"===t.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==o?o:e.gpuAcceleration,a=p(t.instance.popper),c=_(a),u={position:i.position},l=function(t,e){var n=t.offsets,r=n.popper,i=n.reference,o=Math.round,s=Math.floor,a=function(t){return t},c=o(i.width),u=o(r.width),l=-1!==["left","right"].indexOf(t.placement),f=-1!==t.placement.indexOf("-"),d=e?l||f||c%2==u%2?o:s:a,p=e?o:a;return{left:d(c%2==1&&u%2==1&&!f&&e?r.left-1:r.left),top:p(r.top),bottom:p(r.bottom),right:d(r.right)}}(t,window.devicePixelRatio<2||!G),f="bottom"===n?"top":"bottom",d="right"===r?"left":"right",h=F("transform"),m=void 0,v=void 0;if(v="bottom"===f?"HTML"===a.nodeName?-a.clientHeight+l.bottom:-c.height+l.bottom:l.top,m="right"===d?"HTML"===a.nodeName?-a.clientWidth+l.right:-c.width+l.right:l.left,s&&h)u[h]="translate3d("+m+"px, "+v+"px, 0)",u[f]=0,u[d]=0,u.willChange="transform";else{var g="bottom"===f?-1:1,y="right"===d?-1:1;u[f]=v*g,u[d]=m*y,u.willChange=f+", "+d}var b={"x-placement":t.placement};return t.attributes=T({},b,t.attributes),t.styles=T({},u,t.styles),t.arrowStyles=T({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,n;return Z(t.instance.popper,t.styles),e=t.instance.popper,n=t.attributes,Object.keys(n).forEach((function(t){!1!==n[t]?e.setAttribute(t,n[t]):e.removeAttribute(t)})),t.arrowElement&&Object.keys(t.arrowStyles).length&&Z(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,n,r,i){var o=D(i,e,t,n.positionFixed),s=M(n.placement,o,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",s),Z(e,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},st=function(){function t(e,n){var r=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};x(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=i(this.update.bind(this)),this.options=T({},t.Defaults,s),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(T({},t.Defaults.modifiers,s.modifiers)).forEach((function(e){r.options.modifiers[e]=T({},t.Defaults.modifiers[e]||{},s.modifiers?s.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return T({name:t},r.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&o(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)})),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return N(t,[{key:"update",value:function(){return H.call(this)}},{key:"destroy",value:function(){return z.call(this)}},{key:"enableEventListeners",value:function(){return W.call(this)}},{key:"disableEventListeners",value:function(){return V.call(this)}}]),t}();st.Utils=("undefined"!=typeof window?window:t).PopperUtils,st.placements=X,st.Defaults=ot,e.a=st}).call(this,n(2))},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var r=e.prototype;n.en.relativeTime={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"};var i=function(t,e,r,i){for(var o,s,a,c=r.$locale().relativeTime,u=[{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"}],l=u.length,f=0;f<l;f+=1){var d=u[f];d.d&&(o=i?n(t).diff(r,d.d,!0):r.diff(t,d.d,!0));var p=Math.round(Math.abs(o));if(a=o>0,p<=d.r||!d.r){1===p&&f>0&&(d=u[f-1]);var h=c[d.l];s="string"==typeof h?h.replace("%d",p):h(p,e,d.l,a);break}}return e?s:(a?c.future:c.past).replace("%s",s)};r.to=function(t,e){return i(t,e,this,!0)},r.from=function(t,e){return i(t,e,this)};var o=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(o(this),t)},r.fromNow=function(t){return this.from(o(this),t)}}}()},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var r=e.prototype,i=r.format,o={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"};n.en.formats=o,r.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var e=this.$locale().formats,n=void 0===e?{}:e,r=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,e,r){var i=r&&r.toUpperCase();return e||n[r]||o[r]||n[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}));return i.call(this,r)}}}()},function(t,e,n){"use strict";t.exports=n(63)},function(t,e,n){var r=n(64),i=n(91),o=n(92),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},function(t,e,n){var r=n(68),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(67)(Object,"create");t.exports=r},function(t,e,n){var r=n(75);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(132);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){(function(e){t.exports=e.jQuery=n(30)}).call(this,n(2))},function(t,e,n){var r;(function(){var i;i=this,void 0===(r=function(){return function(t){var e=function(){var e,n,r,i,o,s=[],a=s.concat,c=s.filter,u=s.slice,l=t.document,f={},d={},p={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},h=/^\s*<(\w+|!)[^>]*>/,m=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,g=/^(?:body|html)$/i,y=/([A-Z])/g,b=["val","css","html","text","data","width","height","offset"],w=l.createElement("table"),x=l.createElement("tr"),N={tr:l.createElement("tbody"),tbody:w,thead:w,tfoot:w,td:x,th:x,"*":l.createElement("div")},k=/complete|loaded|interactive/,T=/^[\w-]*$/,E={},_=E.toString,C={},S=l.createElement("div"),O={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},P=Array.isArray||function(t){return t instanceof Array};function A(t){return null==t?String(t):E[_.call(t)]||"object"}function j(t){return"function"==A(t)}function M(t){return null!=t&&t==t.window}function D(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function $(t){return"object"==A(t)}function I(t){return $(t)&&!M(t)&&Object.getPrototypeOf(t)==Object.prototype}function L(t){var e=!!t&&"length"in t&&t.length,r=n.type(t);return"function"!=r&&!M(t)&&("array"==r||0===e||"number"==typeof e&&e>0&&e-1 in t)}function R(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function B(t){return t in d?d[t]:d[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function H(t,e){return"number"!=typeof e||p[R(t)]?e:e+"px"}function U(t){return"children"in t?u.call(t.children):n.map(t.childNodes,(function(t){if(1==t.nodeType)return t}))}function F(t,e){var n,r=t?t.length:0;for(n=0;n<r;n++)this[n]=t[n];this.length=r,this.selector=e||""}function z(t,n,r){for(e in n)r&&(I(n[e])||P(n[e]))?(I(n[e])&&!I(t[e])&&(t[e]={}),P(n[e])&&!P(t[e])&&(t[e]=[]),z(t[e],n[e],r)):void 0!==n[e]&&(t[e]=n[e])}function q(t,e){return null==e?n(t):n(t).filter(e)}function Y(t,e,n,r){return j(e)?e.call(t,n,r):e}function W(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function V(t,e){var n=t.className||"",r=n&&void 0!==n.baseVal;if(void 0===e)return r?n.baseVal:n;r?n.baseVal=e:t.className=e}function K(t){try{return t?"true"==t||"false"!=t&&("null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?n.parseJSON(t):t):t}catch(e){return t}}function Z(t,e){e(t);for(var n=0,r=t.childNodes.length;n<r;n++)Z(t.childNodes[n],e)}return C.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=S).appendChild(t),r=~C.qsa(i,e).indexOf(t),o&&S.removeChild(t),r},i=function(t){return t.replace(/-+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))},o=function(t){return c.call(t,(function(e,n){return t.indexOf(e)==n}))},C.fragment=function(t,e,r){var i,o,s;return m.test(t)&&(i=n(l.createElement(RegExp.$1))),i||(t.replace&&(t=t.replace(v,"<$1></$2>")),void 0===e&&(e=h.test(t)&&RegExp.$1),e in N||(e="*"),(s=N[e]).innerHTML=""+t,i=n.each(u.call(s.childNodes),(function(){s.removeChild(this)}))),I(r)&&(o=n(i),n.each(r,(function(t,e){b.indexOf(t)>-1?o[t](e):o.attr(t,e)}))),i},C.Z=function(t,e){return new F(t,e)},C.isZ=function(t){return t instanceof C.Z},C.init=function(t,e){var r,i;if(!t)return C.Z();if("string"==typeof t)if("<"==(t=t.trim())[0]&&h.test(t))r=C.fragment(t,RegExp.$1,e),t=null;else{if(void 0!==e)return n(e).find(t);r=C.qsa(l,t)}else{if(j(t))return n(l).ready(t);if(C.isZ(t))return t;if(P(t))i=t,r=c.call(i,(function(t){return null!=t}));else if($(t))r=[t],t=null;else if(h.test(t))r=C.fragment(t.trim(),RegExp.$1,e),t=null;else{if(void 0!==e)return n(e).find(t);r=C.qsa(l,t)}}return C.Z(r,t)},(n=function(t,e){return C.init(t,e)}).extend=function(t){var e,n=u.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach((function(n){z(t,n,e)})),t},C.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,s=T.test(o);return t.getElementById&&s&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:u.call(s&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},n.contains=l.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},n.type=A,n.isFunction=j,n.isWindow=M,n.isArray=P,n.isPlainObject=I,n.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},n.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},n.inArray=function(t,e,n){return s.indexOf.call(e,t,n)},n.camelCase=i,n.trim=function(t){return null==t?"":String.prototype.trim.call(t)},n.uuid=0,n.support={},n.expr={},n.noop=function(){},n.map=function(t,e){var r,i,o,s,a=[];if(L(t))for(i=0;i<t.length;i++)null!=(r=e(t[i],i))&&a.push(r);else for(o in t)null!=(r=e(t[o],o))&&a.push(r);return(s=a).length>0?n.fn.concat.apply([],s):s},n.each=function(t,e){var n,r;if(L(t)){for(n=0;n<t.length;n++)if(!1===e.call(t[n],n,t[n]))return t}else for(r in t)if(!1===e.call(t[r],r,t[r]))return t;return t},n.grep=function(t,e){return c.call(t,e)},t.JSON&&(n.parseJSON=JSON.parse),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(t,e){E["[object "+e+"]"]=e.toLowerCase()})),n.fn={constructor:C.Z,length:0,forEach:s.forEach,reduce:s.reduce,push:s.push,sort:s.sort,splice:s.splice,indexOf:s.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=C.isZ(e)?e.toArray():e;return a.apply(C.isZ(this)?this.toArray():this,n)},map:function(t){return n(n.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return n(u.apply(this,arguments))},ready:function(t){return k.test(l.readyState)&&l.body?t(n):l.addEventListener("DOMContentLoaded",(function(){t(n)}),!1),this},get:function(t){return void 0===t?u.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(t){return s.every.call(this,(function(e,n){return!1!==t.call(e,n,e)})),this},filter:function(t){return j(t)?this.not(this.not(t)):n(c.call(this,(function(e){return C.matches(e,t)})))},add:function(t,e){return n(o(this.concat(n(t,e))))},is:function(t){return this.length>0&&C.matches(this[0],t)},not:function(t){var e=[];if(j(t)&&void 0!==t.call)this.each((function(n){t.call(this,n)||e.push(this)}));else{var r="string"==typeof t?this.filter(t):L(t)&&j(t.item)?u.call(t):n(t);this.forEach((function(t){r.indexOf(t)<0&&e.push(t)}))}return n(e)},has:function(t){return this.filter((function(){return $(t)?n.contains(this,t):n(this).find(t).size()}))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!$(t)?t:n(t)},last:function(){var t=this[this.length-1];return t&&!$(t)?t:n(t)},find:function(t){var e=this;return t?"object"==typeof t?n(t).filter((function(){var t=this;return s.some.call(e,(function(e){return n.contains(e,t)}))})):1==this.length?n(C.qsa(this[0],t)):this.map((function(){return C.qsa(this,t)})):n()},closest:function(t,e){var r=[],i="object"==typeof t&&n(t);return this.each((function(n,o){for(;o&&!(i?i.indexOf(o)>=0:C.matches(o,t));)o=o!==e&&!D(o)&&o.parentNode;o&&r.indexOf(o)<0&&r.push(o)})),n(r)},parents:function(t){for(var e=[],r=this;r.length>0;)r=n.map(r,(function(t){if((t=t.parentNode)&&!D(t)&&e.indexOf(t)<0)return e.push(t),t}));return q(e,t)},parent:function(t){return q(o(this.pluck("parentNode")),t)},children:function(t){return q(this.map((function(){return U(this)})),t)},contents:function(){return this.map((function(){return this.contentDocument||u.call(this.childNodes)}))},siblings:function(t){return q(this.map((function(t,e){return c.call(U(e.parentNode),(function(t){return t!==e}))})),t)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(t){return n.map(this,(function(e){return e[t]}))},show:function(){return this.each((function(){var t,e,n;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(t=this.nodeName,f[t]||(e=l.createElement(t),l.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),f[t]=n),f[t]))}))},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=j(t);if(this[0]&&!e)var r=n(t).get(0),i=r.parentNode||this.length>1;return this.each((function(o){n(this).wrapAll(e?t.call(this,o):i?r.cloneNode(!0):r)}))},wrapAll:function(t){if(this[0]){var e;for(n(this[0]).before(t=n(t));(e=t.children()).length;)t=e.first();n(t).append(this)}return this},wrapInner:function(t){var e=j(t);return this.each((function(r){var i=n(this),o=i.contents(),s=e?t.call(this,r):t;o.length?o.wrapAll(s):i.append(s)}))},unwrap:function(){return this.parent().each((function(){n(this).replaceWith(n(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(t){return this.each((function(){var e=n(this);(void 0===t?"none"==e.css("display"):t)?e.show():e.hide()}))},prev:function(t){return n(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return n(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each((function(e){var r=this.innerHTML;n(this).empty().append(Y(this,t,e,r))})):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each((function(e){var n=Y(this,t,e,this.textContent);this.textContent=null==n?"":""+n})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,n){var r;return"string"!=typeof t||1 in arguments?this.each((function(r){if(1===this.nodeType)if($(t))for(e in t)W(this,e,t[e]);else W(this,t,Y(this,n,r,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(r=this[0].getAttribute(t))?r:void 0},removeAttr:function(t){return this.each((function(){1===this.nodeType&&t.split(" ").forEach((function(t){W(this,t)}),this)}))},prop:function(t,e){return t=O[t]||t,1 in arguments?this.each((function(n){this[t]=Y(this,e,n,this[t])})):this[0]&&this[0][t]},removeProp:function(t){return t=O[t]||t,this.each((function(){delete this[t]}))},data:function(t,e){var n="data-"+t.replace(y,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?K(r):void 0},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each((function(e){this.value=Y(this,t,e,this.value)}))):this[0]&&(this[0].multiple?n(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(t){var r=n(this),i=Y(this,e,t,r.offset()),o=r.offsetParent().offset(),s={top:i.top-o.top,left:i.left-o.left};"static"==r.css("position")&&(s.position="relative"),r.css(s)}));if(!this.length)return null;if(l.documentElement!==this[0]&&!n.contains(l.documentElement,this[0]))return{top:0,left:0};var r=this[0].getBoundingClientRect();return{left:r.left+t.pageXOffset,top:r.top+t.pageYOffset,width:Math.round(r.width),height:Math.round(r.height)}},css:function(t,r){if(arguments.length<2){var o=this[0];if("string"==typeof t){if(!o)return;return o.style[i(t)]||getComputedStyle(o,"").getPropertyValue(t)}if(P(t)){if(!o)return;var s={},a=getComputedStyle(o,"");return n.each(t,(function(t,e){s[e]=o.style[i(e)]||a.getPropertyValue(e)})),s}}var c="";if("string"==A(t))r||0===r?c=R(t)+":"+H(t,r):this.each((function(){this.style.removeProperty(R(t))}));else for(e in t)t[e]||0===t[e]?c+=R(e)+":"+H(e,t[e])+";":this.each((function(){this.style.removeProperty(R(e))}));return this.each((function(){this.style.cssText+=";"+c}))},index:function(t){return t?this.indexOf(n(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&s.some.call(this,(function(t){return this.test(V(t))}),B(t))},addClass:function(t){return t?this.each((function(e){if("className"in this){r=[];var i=V(this);Y(this,t,e,i).split(/\s+/g).forEach((function(t){n(this).hasClass(t)||r.push(t)}),this),r.length&&V(this,i+(i?" ":"")+r.join(" "))}})):this},removeClass:function(t){return this.each((function(e){if("className"in this){if(void 0===t)return V(this,"");r=V(this),Y(this,t,e,r).split(/\s+/g).forEach((function(t){r=r.replace(B(t)," ")})),V(this,r.trim())}}))},toggleClass:function(t,e){return t?this.each((function(r){var i=n(this);Y(this,t,r,V(this)).split(/\s+/g).forEach((function(t){(void 0===e?!i.hasClass(t):e)?i.addClass(t):i.removeClass(t)}))})):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return void 0===t?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return void 0===t?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),r=this.offset(),i=g.test(e[0].nodeName)?{top:0,left:0}:e.offset();return r.top-=parseFloat(n(t).css("margin-top"))||0,r.left-=parseFloat(n(t).css("margin-left"))||0,i.top+=parseFloat(n(e[0]).css("border-top-width"))||0,i.left+=parseFloat(n(e[0]).css("border-left-width"))||0,{top:r.top-i.top,left:r.left-i.left}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||l.body;t&&!g.test(t.nodeName)&&"static"==n(t).css("position");)t=t.offsetParent;return t}))}},n.fn.detach=n.fn.remove,["width","height"].forEach((function(t){var e=t.replace(/./,(function(t){return t[0].toUpperCase()}));n.fn[t]=function(r){var i,o=this[0];return void 0===r?M(o)?o["inner"+e]:D(o)?o.documentElement["scroll"+e]:(i=this.offset())&&i[t]:this.each((function(e){(o=n(this)).css(t,Y(this,r,e,o[t]()))}))}})),["after","prepend","before","append"].forEach((function(e,r){var i=r%2;n.fn[e]=function(){var e,o,s=n.map(arguments,(function(t){var r=[];return"array"==(e=A(t))?(t.forEach((function(t){return void 0!==t.nodeType?r.push(t):n.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(C.fragment(t)))})),r):"object"==e||null==t?t:C.fragment(t)})),a=this.length>1;return s.length<1?this:this.each((function(e,c){o=i?c:c.parentNode,c=0==r?c.nextSibling:1==r?c.firstChild:2==r?c:null;var u=n.contains(l.documentElement,o);s.forEach((function(e){if(a)e=e.cloneNode(!0);else if(!o)return n(e).remove();o.insertBefore(e,c),u&&Z(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}}))}))}))},n.fn[i?e+"To":"insert"+(r?"Before":"After")]=function(t){return n(t)[e](this),this}})),C.Z.prototype=F.prototype=n.fn,C.uniq=o,C.deserializeValue=K,n.zepto=C,n}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){var n=1,r=Array.prototype.slice,i=e.isFunction,o=function(t){return"string"==typeof t},s={},a={},c="onfocusin"in t,u={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};function f(t){return t._zid||(t._zid=n++)}function d(t,e,n,r){if((e=p(e)).ns)var i=(o=e.ns,new RegExp("(?:^| )"+o.replace(" "," .* ?")+"(?: |$)"));var o;return(s[f(t)]||[]).filter((function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||i.test(t.ns))&&(!n||f(t.fn)===f(n))&&(!r||t.sel==r)}))}function p(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function h(t,e){return t.del&&!c&&t.e in u||!!e}function m(t){return l[t]||c&&u[t]||t}function v(t,n,r,i,o,a,c){var u=f(t),d=s[u]||(s[u]=[]);n.split(/\s/).forEach((function(n){if("ready"==n)return e(document).ready(r);var s=p(n);s.fn=r,s.sel=o,s.e in l&&(r=function(t){var n=t.relatedTarget;if(!n||n!==this&&!e.contains(this,n))return s.fn.apply(this,arguments)}),s.del=a;var u=a||r;s.proxy=function(e){if(!(e=N(e)).isImmediatePropagationStopped()){e.data=i;var n=u.apply(t,null==e._args?[e]:[e].concat(e._args));return!1===n&&(e.preventDefault(),e.stopPropagation()),n}},s.i=d.length,d.push(s),"addEventListener"in t&&t.addEventListener(m(s.e),s.proxy,h(s,c))}))}function g(t,e,n,r,i){var o=f(t);(e||"").split(/\s/).forEach((function(e){d(t,e,n,r).forEach((function(e){delete s[o][e.i],"removeEventListener"in t&&t.removeEventListener(m(e.e),e.proxy,h(e,i))}))}))}a.click=a.mousedown=a.mouseup=a.mousemove="MouseEvents",e.event={add:v,remove:g},e.proxy=function(t,n){var s=2 in arguments&&r.call(arguments,2);if(i(t)){var a=function(){return t.apply(n,s?s.concat(r.call(arguments)):arguments)};return a._zid=f(t),a}if(o(n))return s?(s.unshift(t[n],t),e.proxy.apply(null,s)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var y=function(){return!0},b=function(){return!1},w=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,x={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function N(t,n){return!n&&t.isDefaultPrevented||(n||(n=t),e.each(x,(function(e,r){var i=n[e];t[e]=function(){return this[r]=y,i&&i.apply(n,arguments)},t[r]=b})),t.timeStamp||(t.timeStamp=Date.now()),(void 0!==n.defaultPrevented?n.defaultPrevented:"returnValue"in n?!1===n.returnValue:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=y)),t}function k(t){var e,n={originalEvent:t};for(e in t)w.test(e)||void 0===t[e]||(n[e]=t[e]);return N(n,t)}e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,s,a,c){var u,l,f=this;return t&&!o(t)?(e.each(t,(function(t,e){f.on(t,n,s,e,c)})),f):(o(n)||i(a)||!1===a||(a=s,s=n,n=void 0),void 0!==a&&!1!==s||(a=s,s=void 0),!1===a&&(a=b),f.each((function(i,o){c&&(u=function(t){return g(o,t.type,a),a.apply(this,arguments)}),n&&(l=function(t){var i,s=e(t.target).closest(n,o).get(0);if(s&&s!==o)return i=e.extend(k(t),{currentTarget:s,liveFired:o}),(u||a).apply(s,[i].concat(r.call(arguments,1)))}),v(o,t,a,s,n,l||u)})))},e.fn.off=function(t,n,r){var s=this;return t&&!o(t)?(e.each(t,(function(t,e){s.off(t,n,e)})),s):(o(n)||i(r)||!1===r||(r=n,n=void 0),!1===r&&(r=b),s.each((function(){g(this,t,r,n)})))},e.fn.trigger=function(t,n){return(t=o(t)||e.isPlainObject(t)?e.Event(t):N(t))._args=n,this.each((function(){t.type in u&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)}))},e.fn.triggerHandler=function(t,n){var r,i;return this.each((function(s,a){(r=k(o(t)?e.Event(t):t))._args=n,r.target=a,e.each(d(a,t.type||t),(function(t,e){if(i=e.proxy(r),r.isImmediatePropagationStopped())return!1}))})),i},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(t,e){o(t)||(t=(e=t).type);var n=document.createEvent(a[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),N(n)}}(e),function(e){var n,r,i=+new Date,o=t.document,s=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,a=/^(?:text|application)\/javascript/i,c=/^(?:text|application)\/xml/i,u=/^\s*$/,l=o.createElement("a");function f(t,n,r,i){if(t.global)return function(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}(n||o,r,i)}function d(t,e){var n=e.context;if(!1===e.beforeSend.call(n,t,e)||!1===f(e,n,"ajaxBeforeSend",[t,e]))return!1;f(e,n,"ajaxSend",[t,e])}function p(t,e,n,r){var i=n.context;n.success.call(i,t,"success",e),r&&r.resolveWith(i,[t,"success",e]),f(n,i,"ajaxSuccess",[e,n,t]),m("success",e,n)}function h(t,e,n,r,i){var o=r.context;r.error.call(o,n,e,t),i&&i.rejectWith(o,[n,e,t]),f(r,o,"ajaxError",[n,r,t||e]),m(e,n,r)}function m(t,n,r){var i=r.context;r.complete.call(i,n,t),f(r,i,"ajaxComplete",[n,r]),function(t){t.global&&!--e.active&&f(t,null,"ajaxStop")}(r)}function v(){}function g(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function y(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}l.href=t.location.href,e.active=0,e.ajaxJSONP=function(n,r){if(!("type"in n))return e.ajax(n);var s,a,c=n.jsonpCallback,u=(e.isFunction(c)?c():c)||"Zepto"+i++,l=o.createElement("script"),f=t[u],m=function(t){e(l).triggerHandler("error",t||"abort")},v={abort:m};return r&&r.promise(v),e(l).on("load error",(function(i,o){clearTimeout(a),e(l).off().remove(),"error"!=i.type&&s?p(s[0],v,n,r):h(null,o||"error",v,n,r),t[u]=f,s&&e.isFunction(f)&&f(s[0]),f=s=void 0})),!1===d(v,n)?(m("abort"),v):(t[u]=function(){s=arguments},l.src=n.url.replace(/\?(.+)=\?/,"?$1="+u),o.head.appendChild(l),n.timeout>0&&(a=setTimeout((function(){m("timeout")}),n.timeout)),v)},e.ajaxSettings={type:"GET",beforeSend:v,success:v,error:v,complete:v,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:"application/json",xml:"application/xml, text/xml",html:"text/html",text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:v},e.ajax=function(i){var s,m,y=e.extend({},i||{}),b=e.Deferred&&e.Deferred();for(n in e.ajaxSettings)void 0===y[n]&&(y[n]=e.ajaxSettings[n]);!function(t){t.global&&0==e.active++&&f(t,null,"ajaxStart")}(y),y.crossDomain||((s=o.createElement("a")).href=y.url,s.href=s.href,y.crossDomain=l.protocol+"//"+l.host!=s.protocol+"//"+s.host),y.url||(y.url=t.location.toString()),(m=y.url.indexOf("#"))>-1&&(y.url=y.url.slice(0,m)),function(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=g(t.url,t.data),t.data=void 0)}(y);var w=y.dataType,x=/\?.+=\?/.test(y.url);if(x&&(w="jsonp"),!1!==y.cache&&(i&&!0===i.cache||"script"!=w&&"jsonp"!=w)||(y.url=g(y.url,"_="+Date.now())),"jsonp"==w)return x||(y.url=g(y.url,y.jsonp?y.jsonp+"=?":!1===y.jsonp?"":"callback=?")),e.ajaxJSONP(y,b);var N,k=y.accepts[w],T={},E=function(t,e){T[t.toLowerCase()]=[t,e]},_=/^([\w-]+:)\/\//.test(y.url)?RegExp.$1:t.location.protocol,C=y.xhr(),S=C.setRequestHeader;if(b&&b.promise(C),y.crossDomain||E("X-Requested-With","XMLHttpRequest"),E("Accept",k||"*/*"),(k=y.mimeType||k)&&(k.indexOf(",")>-1&&(k=k.split(",",2)[0]),C.overrideMimeType&&C.overrideMimeType(k)),(y.contentType||!1!==y.contentType&&y.data&&"GET"!=y.type.toUpperCase())&&E("Content-Type",y.contentType||"application/x-www-form-urlencoded"),y.headers)for(r in y.headers)E(r,y.headers[r]);if(C.setRequestHeader=E,C.onreadystatechange=function(){if(4==C.readyState){C.onreadystatechange=v,clearTimeout(N);var t,n=!1;if(C.status>=200&&C.status<300||304==C.status||0==C.status&&"file:"==_){if(w=w||function(t){return t&&(t=t.split(";",2)[0]),t&&("text/html"==t?"html":"application/json"==t?"json":a.test(t)?"script":c.test(t)&&"xml")||"text"}(y.mimeType||C.getResponseHeader("content-type")),"arraybuffer"==C.responseType||"blob"==C.responseType)t=C.response;else{t=C.responseText;try{t=function(t,e,n){if(n.dataFilter==v)return t;var r=n.context;return n.dataFilter.call(r,t,e)}(t,w,y),"script"==w?(0,eval)(t):"xml"==w?t=C.responseXML:"json"==w&&(t=u.test(t)?null:e.parseJSON(t))}catch(t){n=t}if(n)return h(n,"parsererror",C,y,b)}p(t,C,y,b)}else h(C.statusText||null,C.status?"error":"abort",C,y,b)}},!1===d(C,y))return C.abort(),h(null,"abort",C,y,b),C;var O=!("async"in y)||y.async;if(C.open(y.type,y.url,O,y.username,y.password),y.xhrFields)for(r in y.xhrFields)C[r]=y.xhrFields[r];for(r in T)S.apply(C,T[r]);return y.timeout>0&&(N=setTimeout((function(){C.onreadystatechange=v,C.abort(),h(null,"timeout",C,y,b)}),y.timeout)),C.send(y.data?y.data:null),C},e.get=function(){return e.ajax(y.apply(null,arguments))},e.post=function(){var t=y.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=y.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var i,o=this,a=t.split(/\s/),c=y(t,n,r),u=c.success;return a.length>1&&(c.url=a[0],i=a[1]),c.success=function(t){o.html(i?e("<div>").html(t.replace(s,"")).find(i):t),u&&u.apply(o,arguments)},e.ajax(c),this};var b=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(b(t)+"="+b(n))},function t(n,r,i,o){var s,a=e.isArray(r),c=e.isPlainObject(r);e.each(r,(function(r,u){s=e.type(u),o&&(r=i?o:o+"["+(c||"object"==s||"array"==s?r:"")+"]"),!o&&a?n.add(u.name,u.value):"array"==s||!i&&"object"==s?t(n,u,i,r):n.add(r,u)}))}(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[];return this[0]&&t.each(this[0].elements,(function(i,o){n=o.type,(e=o.name)&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&function t(n){if(n.forEach)return n.forEach(t);r.push({name:e,value:n})}(t(o).val())})),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach((function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))})),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(n){var e=getComputedStyle;t.getComputedStyle=function(t,n){try{return e(t,n)}catch(t){return null}}}}(),e}(i)}.call(e,n,e,t))||(t.exports=r)}).call(window)},function(t,e,n){(function(e){t.exports=e.moment=n(32)}).call(this,n(2))},function(t,e,n){(function(e){t.exports=e.dayjs=n(33)}).call(this,n(2))},function(t,e,n){t.exports=function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",i="day",o="week",s="month",a="quarter",c="year",u=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,l=/\[([^\]]+)]|Y{2,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,f=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},d={s:f,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+f(r,2,"0")+":"+f(i,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,s),i=e-r<0,o=t.clone().add(n+(i?-1:1),s);return Number(-(n+(e-r)/(i?r-o:o-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(u){return{M:s,y:c,w:o,d:i,h:r,m:n,s:e,ms:t,Q:a}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},p={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("_")},h="en",m={};m[h]=p;var v=function(t){return t instanceof w},g=function(t,e,n){var r;if(!t)return h;if("string"==typeof t)m[t]&&(r=t),e&&(m[t]=e,r=t);else{var i=t.name;m[i]=t,r=i}return n||(h=r),r},y=function(t,e,n){if(v(t))return t.clone();var r=e?"string"==typeof e?{format:e,pl:n}:e:{};return r.date=t,new w(r)},b=d;b.l=g,b.i=v,b.w=function(t,e){return y(t,{locale:e.$L,utc:e.$u,$offset:e.$offset})};var w=function(){function f(t){this.$L=this.$L||g(t.locale,null,!0),this.parse(t)}var d=f.prototype;return d.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(u);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},d.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()},d.$utils=function(){return b},d.isValid=function(){return!("Invalid Date"===this.$d.toString())},d.isSame=function(t,e){var n=y(t);return this.startOf(e)<=n&&n<=this.endOf(e)},d.isAfter=function(t,e){return y(t)<this.startOf(e)},d.isBefore=function(t,e){return this.endOf(e)<y(t)},d.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},d.year=function(t){return this.$g(t,"$y",c)},d.month=function(t){return this.$g(t,"$M",s)},d.day=function(t){return this.$g(t,"$W",i)},d.date=function(t){return this.$g(t,"$D","date")},d.hour=function(t){return this.$g(t,"$H",r)},d.minute=function(t){return this.$g(t,"$m",n)},d.second=function(t){return this.$g(t,"$s",e)},d.millisecond=function(e){return this.$g(e,"$ms",t)},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(t,a){var u=this,l=!!b.u(a)||a,f=b.p(t),d=function(t,e){var n=b.w(u.$u?Date.UTC(u.$y,e,t):new Date(u.$y,e,t),u);return l?n:n.endOf(i)},p=function(t,e){return b.w(u.toDate()[t].apply(u.toDate(),(l?[0,0,0,0]:[23,59,59,999]).slice(e)),u)},h=this.$W,m=this.$M,v=this.$D,g="set"+(this.$u?"UTC":"");switch(f){case c:return l?d(1,0):d(31,11);case s:return l?d(1,m):d(0,m+1);case o:var y=this.$locale().weekStart||0,w=(h<y?h+7:h)-y;return d(l?v-w:v+(6-w),m);case i:case"date":return p(g+"Hours",0);case r:return p(g+"Minutes",1);case n:return p(g+"Seconds",2);case e:return p(g+"Milliseconds",3);default:return this.clone()}},d.endOf=function(t){return this.startOf(t,!1)},d.$set=function(o,a){var u,l=b.p(o),f="set"+(this.$u?"UTC":""),d=(u={},u[i]=f+"Date",u.date=f+"Date",u[s]=f+"Month",u[c]=f+"FullYear",u[r]=f+"Hours",u[n]=f+"Minutes",u[e]=f+"Seconds",u[t]=f+"Milliseconds",u)[l],p=l===i?this.$D+(a-this.$W):a;if(l===s||l===c){var h=this.clone().set("date",1);h.$d[d](p),h.init(),this.$d=h.set("date",Math.min(this.$D,h.daysInMonth())).toDate()}else d&&this.$d[d](p);return this.init(),this},d.set=function(t,e){return this.clone().$set(t,e)},d.get=function(t){return this[b.p(t)]()},d.add=function(t,a){var u,l=this;t=Number(t);var f=b.p(a),d=function(e){var n=y(l);return b.w(n.date(n.date()+Math.round(e*t)),l)};if(f===s)return this.set(s,this.$M+t);if(f===c)return this.set(c,this.$y+t);if(f===i)return d(1);if(f===o)return d(7);var p=(u={},u[n]=6e4,u[r]=36e5,u[e]=1e3,u)[f]||1,h=this.$d.getTime()+t*p;return b.w(h,this)},d.subtract=function(t,e){return this.add(-1*t,e)},d.format=function(t){var e=this;if(!this.isValid())return"Invalid Date";var n=t||"YYYY-MM-DDTHH:mm:ssZ",r=b.z(this),i=this.$locale(),o=this.$H,s=this.$m,a=this.$M,c=i.weekdays,u=i.months,f=function(t,r,i,o){return t&&(t[r]||t(e,n))||i[r].substr(0,o)},d=function(t){return b.s(o%12||12,t,"0")},p=i.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:b.s(a+1,2,"0"),MMM:f(i.monthsShort,a,u,3),MMMM:u[a]||u(this,n),D:this.$D,DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:f(i.weekdaysMin,this.$W,c,2),ddd:f(i.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(o),HH:b.s(o,2,"0"),h:d(1),hh:d(2),a:p(o,s,!0),A:p(o,s,!1),m:String(s),mm:b.s(s,2,"0"),s:String(this.$s),ss:b.s(this.$s,2,"0"),SSS:b.s(this.$ms,3,"0"),Z:r};return n.replace(l,(function(t,e){return e||h[t]||r.replace(":","")}))},d.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},d.diff=function(t,u,l){var f,d=b.p(u),p=y(t),h=6e4*(p.utcOffset()-this.utcOffset()),m=this-p,v=b.m(this,p);return v=(f={},f[c]=v/12,f[s]=v,f[a]=v/3,f[o]=(m-h)/6048e5,f[i]=(m-h)/864e5,f[r]=m/36e5,f[n]=m/6e4,f[e]=m/1e3,f)[d]||m,l?v:b.a(v)},d.daysInMonth=function(){return this.endOf(s).$D},d.$locale=function(){return m[this.$L]},d.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=g(t,e,!0);return r&&(n.$L=r),n},d.clone=function(){return b.w(this.$d,this)},d.toDate=function(){return new Date(this.valueOf())},d.toJSON=function(){return this.isValid()?this.toISOString():null},d.toISOString=function(){return this.$d.toISOString()},d.toString=function(){return this.$d.toUTCString()},f}();return y.prototype=w.prototype,y.extend=function(t,e){return t(e,w,y),y},y.locale=g,y.isDayjs=v,y.unix=function(t){return y(1e3*t)},y.en=m[h],y.Ls=m,y}()},function(t,e,n){(function(e){t.exports=e.m=n(35)}).call(this,n(2))},function(t,e,n){"use strict";var r=n(36),i=n(39),o=n(5),s=function(){return r.apply(this,arguments)};s.m=r,s.trust=r.trust,s.fragment=r.fragment,s.mount=o.mount,s.route=n(45),s.render=n(13),s.redraw=o.redraw,s.request=i.request,s.jsonp=i.jsonp,s.parseQueryString=n(16),s.buildQueryString=n(14),s.parsePathname=n(7),s.buildPathname=n(6),s.vnode=n(3),s.PromisePolyfill=n(11),t.exports=s},function(t,e,n){"use strict";var r=n(8);r.trust=n(37),r.fragment=n(38),t.exports=r},function(t,e,n){"use strict";var r=n(3);t.exports=function(t){return null==t&&(t=""),r("<",void 0,void 0,t,void 0,void 0)}},function(t,e,n){"use strict";var r=n(3),i=n(9);t.exports=function(){var t=i.apply(0,arguments);return t.tag="[",t.children=r.normalizeChildren(t.children),t}},function(t,e,n){"use strict";var r=n(10),i=n(5);t.exports=n(44)(window,r,i.redraw)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,s,a,c=1,u={},l=!1,f=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){h(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){h(t.data)},r=function(t){o.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){h(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(h,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&h(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),r=function(e){t.postMessage(s+e,"*")}),d.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 i={callback:t,args:e};return u[c]=i,r(c),c++},d.clearImmediate=p}function p(t){delete u[t]}function h(t){if(l)setTimeout(h,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{p(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(2),n(41))},function(t,e){var n,r,i=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{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var c,u=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!l){var t=a(d);l=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function m(){}i.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 h(t,e)),1!==u.length||l||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(3);t.exports=function(t){var e,n=t&&t.document,i={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function o(t){return t.attrs&&t.attrs.xmlns||i[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,r,i,o,s){for(var a=n;a<r;a++){var c=e[a];null!=c&&l(t,c,i,s,o)}}function l(t,e,i,s,c){var f=e.tag;if("string"==typeof f)switch(e.state={},null!=e.attrs&&I(e.attrs,e,i),f){case"#":!function(t,e,r){e.dom=n.createTextNode(e.children),b(t,e.dom,r)}(t,e,c);break;case"<":d(t,e,s,c);break;case"[":!function(t,e,r,i,o){var s=n.createDocumentFragment();if(null!=e.children){var a=e.children;u(s,a,0,a.length,r,null,i)}e.dom=s.firstChild,e.domSize=s.childNodes.length,b(t,s,o)}(t,e,i,s,c);break;default:!function(t,e,i,s,a){var c=e.tag,l=e.attrs,f=l&&l.is,d=(s=o(e)||s)?f?n.createElementNS(s,c,{is:f}):n.createElementNS(s,c):f?n.createElement(c,{is:f}):n.createElement(c);e.dom=d,null!=l&&function(t,e,n){for(var r in e)_(t,r,null,e[r],n)}(e,l,s);if(b(t,d,a),!w(e)&&(null!=e.text&&(""!==e.text?d.textContent=e.text:e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var p=e.children;u(d,p,0,p.length,i,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&&_(t,"selectedIndex",null,e.selectedIndex,void 0)}(e,l)}}(t,e,i,s,c)}else!function(t,e,n,i,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)}I(t.state,t,e),null!=t.attrs&&I(t.attrs,t,e);if(t.instance=r.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,i,o),e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0):e.domSize=0}(t,e,i,s,c)}var f={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function d(t,e,r,i){var o=e.children.match(/^\s*?<(\w+)/im)||[],s=n.createElement(f[o[1]]||"div");"http://www.w3.org/2000/svg"===r?(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);b(t,c,i)}function p(t,e,n,r,i,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)u(t,n,0,n.length,r,i,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,f=0;if(!s)for(;f<e.length&&null==e[f];)f++;if(!a)for(;c<n.length&&null==n[c];)c++;if(null===a&&null==s)return;if(s!==a)x(t,e,f,e.length),u(t,n,c,n.length,r,i,o);else if(a){for(var d,p,b,w,k,T=e.length-1,E=n.length-1;T>=f&&E>=c&&(b=e[T],w=n[E],b.key===w.key);)b!==w&&h(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),T--,E--;for(;T>=f&&E>=c&&(d=e[f],p=n[c],d.key===p.key);)f++,c++,d!==p&&h(t,d,p,r,g(e,f,i),o);for(;T>=f&&E>=c&&c!==E&&d.key===w.key&&b.key===p.key;)y(t,b,k=g(e,f,i)),b!==p&&h(t,b,p,r,k,o),++c<=--E&&y(t,d,i),d!==w&&h(t,d,w,r,i,o),null!=w.dom&&(i=w.dom),f++,b=e[--T],w=n[E],d=e[f],p=n[c];for(;T>=f&&E>=c&&b.key===w.key;)b!==w&&h(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),E--,b=e[--T],w=n[E];if(c>E)x(t,e,f,T+1);else if(f>T)u(t,n,c,E+1,r,i,o);else{var _,C,S=i,O=E-c+1,P=new Array(O),A=0,j=0,M=2147483647,D=0;for(j=0;j<O;j++)P[j]=-1;for(j=E;j>=c;j--){null==_&&(_=m(e,f,T+1));var $=_[(w=n[j]).key];null!=$&&(M=$<M?$:-1,P[j-c]=$,b=e[$],e[$]=null,b!==w&&h(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),D++)}if(i=S,D!==T-f+1&&x(t,e,f,T+1),0===D)u(t,n,c,E+1,r,i,o);else if(-1===M)for(A=(C=function(t){var e=[0],n=0,r=0,i=0,o=v.length=t.length;for(i=0;i<o;i++)v[i]=t[i];for(i=0;i<o;++i)if(-1!==t[i]){var s=e[e.length-1];if(t[s]<t[i])v[i]=s,e.push(i);else{for(n=0,r=e.length-1;n<r;){var a=(n>>>1)+(r>>>1)+(n&r&1);t[e[a]]<t[i]?n=a+1:r=a}t[i]<t[e[n]]&&(n>0&&(v[i]=e[n-1]),e[n]=i)}}n=e.length,r=e[n-1];for(;n-- >0;)e[n]=r,r=v[r];return v.length=0,e}(P)).length-1,j=E;j>=c;j--)p=n[j],-1===P[j-c]?l(t,p,r,o,i):C[A]===j-c?A--:y(t,p,i),null!=p.dom&&(i=n[j].dom);else for(j=E;j>=c;j--)p=n[j],-1===P[j-c]&&l(t,p,r,o,i),null!=p.dom&&(i=n[j].dom)}}else{var I=e.length<n.length?e.length:n.length;for(c=c<f?c:f;c<I;c++)(d=e[c])===(p=n[c])||null==d&&null==p||(null==d?l(t,p,r,o,g(e,c+1,i)):null==p?N(t,d):h(t,d,p,r,g(e,c+1,i),o));e.length>I&&x(t,e,c,e.length),n.length>I&&u(t,n,c,n.length,r,i,o)}}}function h(t,e,n,i,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,i),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,r,i){e.children!==n.children?(k(t,e),d(t,n,r,i)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,c,s);break;case"[":!function(t,e,n,r,i,o){p(t,e.children,n.children,r,i,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,i,s,c);break;default:!function(t,e,n,i){var s=e.dom=t.dom;i=o(e)||i,"textarea"===e.tag&&(null==e.attrs&&(e.attrs={}),null!=e.text&&(e.attrs.value=e.text,e.text=void 0));(function(t,e,n,r){if(null!=n)for(var i in n)_(t,i,e&&e[i],n[i],r);var o;if(null!=e)for(var i in e)null==(o=e[i])||null!=n&&null!=n[i]||C(t,i,o,r)})(e,t.attrs,e.attrs,i),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=[r("#",void 0,void 0,t.text,void 0,t.dom.firstChild)]),null!=e.text&&(e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),p(s,t.children,e.children,n,null,i)))}(e,n,i,c)}else!function(t,e,n,i,o,s){if(n.instance=r.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,i),null!=n.attrs&&L(n.attrs,n,i);null!=n.instance?(null==e.instance?l(t,n.instance,i,s,o):h(t,e.instance,n.instance,i,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,i,s,c)}else N(t,e),l(t,n,i,c,s)}function m(t,e,n){for(var r=Object.create(null);e<n;e++){var i=t[e];if(null!=i){var o=i.key;null!=o&&(r[o]=e)}}return r}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 y(t,e,r){var i=n.createDocumentFragment();!function t(e,n,r){for(;null!=r.dom&&r.dom.parentNode===e;){if("string"!=typeof r.tag){if(null!=(r=r.instance))continue}else if("<"===r.tag)for(var i=0;i<r.instance.length;i++)n.appendChild(r.instance[i]);else if("["!==r.tag)n.appendChild(r.dom);else if(1===r.children.length){if(null!=(r=r.children[0]))continue}else for(i=0;i<r.children.length;i++){var o=r.children[i];null!=o&&t(e,n,o)}break}}(t,i,e),b(t,i,r)}function b(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,r){for(var i=n;i<r;i++){var o=e[i];null!=o&&N(t,o)}}function N(t,e){var n,r,i,o=0,c=e.state;"string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&(null!=(i=a.call(e.state.onbeforeremove,e))&&"function"==typeof i.then&&(o=1,n=i));e.attrs&&"function"==typeof e.attrs.onbeforeremove&&(null!=(i=a.call(e.attrs.onbeforeremove,e))&&"function"==typeof i.then&&(o|=2,r=i));if(s(e,c),o){if(null!=n){var u=function(){1&o&&((o&=2)||l())};n.then(u,u)}if(null!=r){u=function(){2&o&&((o&=1)||l())};r.then(u,u)}}else E(e),T(t,e);function l(){s(e,c),E(e),T(t,e)}}function k(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)k(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 r=e.children[n];null!=r&&T(t,r)}}break}}function E(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&&E(t.instance);else{var e=t.children;if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];null!=r&&E(r)}}}function _(t,e,r,i,o){if("key"!==e&&"is"!==e&&null!=i&&!S(e)&&(r!==i||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 i)){if("o"===e[0]&&"n"===e[1])return $(t,e,i);if("xlink:"===e.slice(0,6))t.dom.setAttributeNS("http://www.w3.org/1999/xlink",e.slice(6),i);else if("style"===e)M(t.dom,r,i);else if(O(t,e,o)){if("value"===e){if(("input"===t.tag||"textarea"===t.tag)&&t.dom.value===""+i&&t.dom===c())return;if("select"===t.tag&&null!==r&&t.dom.value===""+i)return;if("option"===t.tag&&null!==r&&t.dom.value===""+i)return}"input"===t.tag&&"type"===e?t.dom.setAttribute(e,i):t.dom[e]=i}else"boolean"==typeof i?i?t.dom.setAttribute(e,""):t.dom.removeAttribute(e):t.dom.setAttribute("className"===e?"class":e,i)}}function C(t,e,n,r){if("key"!==e&&"is"!==e&&null!=n&&!S(e))if("o"!==e[0]||"n"!==e[1]||S(e))if("style"===e)M(t.dom,n,null);else if(!O(t,e,r)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===c())||"input"===t.tag&&"type"===e){var i=e.indexOf(":");-1!==i&&(e=e.slice(i+1)),!1!==n&&t.dom.removeAttribute("className"===e?"class":e)}else t.dom[e]=null;else $(t,e,void 0)}function S(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function O(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 P=/[A-Z]/g;function A(t){return"-"+t.toLowerCase()}function j(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(P,A)}function M(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 r in t.style.cssText="",n){null!=(i=n[r])&&t.style.setProperty(j(r),String(i))}else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(e[r])&&t.style.setProperty(j(r),i)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(j(r))}}function D(){this._=e}function $(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 D,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function I(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 D.prototype=Object.create(null),D.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,i){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=r.normalizeChildren(Array.isArray(n)?n:[n]);var u=e;try{e="function"==typeof i?i:void 0,p(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 r=n(3);t.exports=function(t,e,n){var i=[],o=!1,s=!1;function a(){if(o)throw new Error("Nested m.redraw.sync() call");o=!0;for(var e=0;e<i.length;e+=2)try{t(i[e],r(i[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=i.indexOf(e);o>=0&&(i.splice(o,2),t(e,[],c)),null!=n&&(i.push(e,n),t(e,r(n),c))},redraw:c}}},function(t,e,n){"use strict";var r=n(6);t.exports=function(t,e,n){var i=0;function o(t){return new e(t)}function s(t){return function(i,s){"string"!=typeof i?(s=i,i=i.url):null==s&&(s={});var a=new e((function(e,n){t(r(i,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 r=n.apply(e,arguments);return r.then(u,(function(t){if(u(),0===c)throw t})),t(r)},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,r,i){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"),f=new t.XMLHttpRequest,d=!1,p=f,h=f.abort;for(var m in f.abort=function(){d=!0,h.call(this)},f.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)&&f.setRequestHeader("Content-Type","application/json; charset=utf-8"),"function"==typeof n.deserialize||a(n,/^accept$/i)||f.setRequestHeader("Accept","application/json, text/*"),n.withCredentials&&(f.withCredentials=n.withCredentials),n.timeout&&(f.timeout=n.timeout),f.responseType=l,n.headers)({}).hasOwnProperty.call(n.headers,m)&&f.setRequestHeader(m,n.headers[m]);f.onreadystatechange=function(t){if(!d&&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)r(a);else{try{o=t.target.responseText}catch(t){o=a}var c=new Error(o);c.code=t.target.status,c.response=a,i(c)}}catch(t){i(t)}},"function"==typeof n.config&&(f=n.config(f,n,e)||f)!==p&&(o=f.abort,f.abort=function(){d=!0,o.call(this)}),null==c?f.send():"function"==typeof n.serialize?f.send(n.serialize(c)):c instanceof t.FormData?f.send(c):f.send(JSON.stringify(c))})),jsonp:s((function(e,n,r,o){var s=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+i++,a=t.document.createElement("script");t[s]=function(e){delete t[s],a.parentNode.removeChild(a),r(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 r=n(5);t.exports=n(46)(window,r)},function(t,e,n){"use strict";(function(e){var r=n(3),i=n(8),o=n(10),s=n(6),a=n(7),c=n(47),u=n(15),l={};t.exports=function(t,n){var f;function d(e,n,r){if(e=s(e,n),null!=f){f();var i=r?r.state:null,o=r?r.title:null;r&&r.replace?t.history.replaceState(i,o,b.prefix+e):t.history.pushState(i,o,b.prefix+e)}else t.location.href=b.prefix+e}var p,h,m,v,g=l,y=b.SKIP={};function b(i,s,w){if(null==i)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var x,N=0,k=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,E=o.resolve(),_=!1;if(f=null,null!=s){var C=a(s);if(!k.some((function(t){return t.check(C)})))throw new ReferenceError("Default route doesn't match any known routes")}function S(){_=!1;var e=t.location.hash;"#"!==b.prefix[0]&&(e=t.location.search+e,"?"!==b.prefix[0]&&"/"!==(e=t.location.pathname+e)[0]&&(e="/"+e));var r=e.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(b.prefix.length),i=a(r);function o(){if(r===s)throw new Error("Could not resolve default route "+s);d(s,null,{replace:!0})}u(i.params,t.history.state),function t(e){for(;e<k.length;e++)if(k[e].check(i)){var s=k[e].component,a=k[e].route,c=s,u=v=function(o){if(u===v){if(o===y)return t(e+1);p=null==o||"function"!=typeof o.view&&"function"!=typeof o?"div":o,h=i.params,m=r,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?E.then((function(){return s.onmatch(i.params,r,a)})).then(u,o):u("div"))}o()}(0)}return f=function(){_||(_=!0,T(S))},"function"==typeof t.history.pushState?(x=function(){t.removeEventListener("popstate",f,!1)},t.addEventListener("popstate",f,!1)):"#"===b.prefix[0]&&(f=null,x=function(){t.removeEventListener("hashchange",S,!1)},t.addEventListener("hashchange",S,!1)),n.mount(i,{onbeforeupdate:function(){return!(!(N=N?2:1)||l===g)},oncreate:S,onremove:x,view:function(){if(N&&l!==g){var t=[r(p,h.key,h)];return g&&(t=g.render(t[0])),t}}})}return b.set=function(t,e,n){null!=v&&((n=n||{}).replace=!0),v=null,d(t,e,n)},b.get=function(){return m},b.prefix="#!",b.Link={view:function(t){var e,n,r=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=i(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=b.prefix+n,s.attrs.onclick=function(t){var i;"function"==typeof e?i=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===i||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,b.set(n,null,r))}),s}},b.param=function(t){return h&&null!=t?h[t]:h},b}}).call(this,n(12).setImmediate)},function(t,e,n){"use strict";var r=n(7);t.exports=function(t){var e=r(t),n=Object.keys(e.params),i=[],o=new RegExp("^"+e.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,(function(t,e,n){return null==e?"\\"+t:(i.push({k:e,r:"..."===n}),"..."===n?"(.*)":"."===n?"([^/]+)\\.":"([^/]+)"+(n||""))}))+"$");return function(t){for(var r=0;r<n.length;r++)if(e.params[n[r]]!==t.params[n[r]])return!1;if(!i.length)return o.test(t.path);var s=o.exec(t.path);if(null==s)return!1;for(r=0;r<i.length;r++)t.params[i[r].k]=i[r].r?s[r+1]:decodeURIComponent(s[r+1]);return!0}}},function(t,e,n){(function(e){e.m||(e.m={}),t.exports=e.m.bidi=n(49)}).call(this,n(2))},function(t,e,n){var r,i,o,s;s=function(t){function e(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}return e.view=function(t,n,r){return e(n,n.attrs.bidi)},t.attrs&&(t.attrs.bidi=e),t.bidi=e,e},i=[n(4)],void 0===(o="function"==typeof(r=s)?r.apply(e,i):r)||(t.exports=o)},function(t,e,n){(function(e){t.exports=e.Mousetrap=n(51)}).call(this,n(2))},function(t,e,n){var r;!function(i,o,s){if(i){for(var a,c={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},u={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},l={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},d=1;d<20;++d)c[111+d]="f"+d;for(d=0;d<=9;++d)c[d+96]=d.toString();y.prototype.bind=function(t,e,n){return t=t instanceof Array?t:[t],this._bindMultiple.call(this,t,e,n),this},y.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},y.prototype.trigger=function(t,e){return this._directMap[t+":"+e]&&this._directMap[t+":"+e]({},t),this},y.prototype.reset=function(){return this._callbacks={},this._directMap={},this},y.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function t(e,n){return null!==e&&e!==o&&(e===n||t(e.parentNode,n))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var n=t.composedPath()[0];n!==t.target&&(e=n)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},y.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},y.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);a=null},y.init=function(){var t=y(o);for(var e in t)"_"!==e.charAt(0)&&(y[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},y.init(),i.Mousetrap=y,t.exports&&(t.exports=y),void 0===(r=function(){return y}.call(e,n,e,t))||(t.exports=r)}function p(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)}function h(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return c[t.which]?c[t.which]:u[t.which]?u[t.which]:String.fromCharCode(t.which).toLowerCase()}function m(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,n){return n||(n=function(){if(!a)for(var t in a={},c)t>95&&t<112||c.hasOwnProperty(t)&&(a[c[t]]=t);return a}()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function g(t,e){var n,r,i,o=[];for(n=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),i=0;i<n.length;++i)r=n[i],f[r]&&(r=f[r]),e&&"keypress"!=e&&l[r]&&(r=l[r],o.push("shift")),m(r)&&o.push(r);return{key:r,modifiers:o,action:e=v(r,o,e)}}function y(t){var e=this;if(t=t||o,!(e instanceof y))return new y(t);e.target=t,e._callbacks={},e._directMap={};var n,r={},i=!1,s=!1,a=!1;function c(t){t=t||{};var e,n=!1;for(e in r)t[e]?n=!0:r[e]=0;n||(a=!1)}function u(t,n,i,o,s,a){var c,u,l,f,d=[],p=i.type;if(!e._callbacks[t])return[];for("keyup"==p&&m(t)&&(n=[t]),c=0;c<e._callbacks[t].length;++c)if(u=e._callbacks[t][c],(o||!u.seq||r[u.seq]==u.level)&&p==u.action&&("keypress"==p&&!i.metaKey&&!i.ctrlKey||(l=n,f=u.modifiers,l.sort().join(",")===f.sort().join(",")))){var h=!o&&u.combo==s,v=o&&u.seq==o&&u.level==a;(h||v)&&e._callbacks[t].splice(c,1),d.push(u)}return d}function l(t,n,r,i){e.stopCallback(n,n.target||n.srcElement,r,i)||!1===t(n,r)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(n),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(n))}function f(t){"number"!=typeof t.which&&(t.which=t.keyCode);var n=h(t);n&&("keyup"!=t.type||i!==n?e.handleKey(n,function(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}(t),t):i=!1)}function d(t,e,o,s){function u(e){return function(){a=e,++r[t],clearTimeout(n),n=setTimeout(c,1e3)}}function f(e){l(o,e,t),"keyup"!==s&&(i=h(e)),setTimeout(c,10)}r[t]=0;for(var d=0;d<e.length;++d){var p=d+1===e.length?f:u(s||g(e[d+1]).action);v(e[d],p,s,t,d)}}function v(t,n,r,i,o){e._directMap[t+":"+r]=n;var s,a=(t=t.replace(/\s+/g," ")).split(" ");a.length>1?d(t,a,n,r):(s=g(t,r),e._callbacks[s.key]=e._callbacks[s.key]||[],u(s.key,s.modifiers,{type:s.action},i,t,o),e._callbacks[s.key][i?"unshift":"push"]({callback:n,modifiers:s.modifiers,action:s.action,seq:i,level:o,combo:t}))}e._handleKey=function(t,e,n){var r,i=u(t,e,n),o={},f=0,d=!1;for(r=0;r<i.length;++r)i[r].seq&&(f=Math.max(f,i[r].level));for(r=0;r<i.length;++r)if(i[r].seq){if(i[r].level!=f)continue;d=!0,o[i[r].seq]=1,l(i[r].callback,n,i[r].combo,i[r].seq)}else d||l(i[r].callback,n,i[r].combo);var p="keypress"==n.type&&s;n.type!=a||m(t)||p||c(o),s=d&&"keydown"==n.type},e._bindMultiple=function(t,e,n){for(var r=0;r<t.length;++r)v(t[r],e,n)},p(t,"keypress",f),p(t,"keydown",f),p(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},function(t,e,n){(function(e){t.exports=e.classNames=n(53)}).call(this,n(2))},function(t,e,n){var r;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r)&&r.length){var s=i.apply(null,r);s&&t.push(s)}else if("object"===o)for(var a in r)n.call(r,a)&&r[a]&&t.push(a)}}return t.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(r=function(){return i}.apply(e,[]))||(t.exports=r)}()},function(t,e){!function(t){var e=t.zepto,n=e.qsa,r=e.matches;function i(e){return!(!(e=t(e)).width()&&!e.height())&&"none"!==e.css("display")}var o=t.expr[":"]={visible:function(){if(i(this))return this},hidden:function(){if(!i(this))return this},selected:function(){if(this.selected)return this},checked:function(){if(this.checked)return this},parent:function(){return this.parentNode},first:function(t){if(0===t)return this},last:function(t,e){if(t===e.length-1)return this},eq:function(t,e,n){if(t===n)return this},contains:function(e,n,r){if(t(this).text().indexOf(r)>-1)return this},has:function(t,n,r){if(e.qsa(this,r).length)return this}},s=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),a=/^\s*>/,c="Zepto"+ +new Date;function u(t,e){t=t.replace(/=#\]/g,'="#"]');var n,r,i=s.exec(t);if(i&&i[2]in o&&(n=o[i[2]],r=i[3],t=i[1],r)){var a=Number(r);r=isNaN(a)?r.replace(/^["']|["']$/g,""):a}return e(t,n,r)}e.qsa=function(r,i){return u(i,(function(o,s,u){try{var l;!o&&s?o="*":a.test(o)&&(l=t(r).addClass(c),o="."+c+" "+o);var f=n(r,o)}catch(t){throw console.error("error performing selector: %o",i),t}finally{l&&l.removeClass(c)}return s?e.uniq(t.map(f,(function(t,e){return s.call(t,e,f,u)}))):f}))},e.matches=function(t,e){return u(e,(function(e,n,i){return(!e||r(t,e))&&(!n||n.call(t,null,i)===t)}))}}(Zepto)},function(t,e){!function(t){var e={},n=t.fn.data,r=t.camelCase,i=t.expando="Zepto"+ +new Date,o=[];function s(n,s,a){var c=n[i]||(n[i]=++t.uuid),u=e[c]||(e[c]=function(e){var n={};return t.each(e.attributes||o,(function(e,i){0==i.name.indexOf("data-")&&(n[r(i.name.replace("data-",""))]=t.zepto.deserializeValue(i.value))})),n}(n));return void 0!==s&&(u[r(s)]=a),u}t.fn.data=function(o,a){return void 0===a?t.isPlainObject(o)?this.each((function(e,n){t.each(o,(function(t,e){s(n,t,e)}))})):0 in this?function(o,a){var c=o[i],u=c&&e[c];if(void 0===a)return u||s(o);if(u){if(a in u)return u[a];var l=r(a);if(l in u)return u[l]}return n.call(t(o),a)}(this[0],o):void 0:this.each((function(){s(this,o,a)}))},t.data=function(e,n,r){return t(e).data(n,r)},t.hasData=function(n){var r=n[i],o=r&&e[r];return!!o&&!t.isEmptyObject(o)},t.fn.removeData=function(n){return"string"==typeof n&&(n=n.split(/\s+/)),this.each((function(){var o=this[i],s=o&&e[o];s&&t.each(n||s,(function(t){delete s[n?r(this):t]}))}))},["remove","empty"].forEach((function(e){var n=t.fn[e];t.fn[e]=function(){var t=this.find("*");return"remove"===e&&(t=t.add(this)),t.removeData(),n.call(this)}}))}(Zepto)},function(t,e){!function(t,e){var n,r,i,o,s,a,c,u,l,f,d="",p=document.createElement("div"),h=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,m={};function v(t){return n?n+t:t.toLowerCase()}void 0===p.style.transform&&t.each({Webkit:"webkit",Moz:"",O:"o"},(function(t,e){if(void 0!==p.style[t+"TransitionProperty"])return d="-"+t.toLowerCase()+"-",n=e,!1})),r=d+"transform",m[i=d+"transition-property"]=m[o=d+"transition-duration"]=m[a=d+"transition-delay"]=m[s=d+"transition-timing-function"]=m[c=d+"animation-name"]=m[u=d+"animation-duration"]=m[f=d+"animation-delay"]=m[l=d+"animation-timing-function"]="",t.fx={off:void 0===n&&void 0===p.style.transitionProperty,speeds:{_default:400,fast:200,slow:600},cssPrefix:d,transitionEnd:v("TransitionEnd"),animationEnd:v("AnimationEnd")},t.fn.animate=function(e,n,r,i,o){return t.isFunction(n)&&(i=n,r=void 0,n=void 0),t.isFunction(r)&&(i=r,r=void 0),t.isPlainObject(n)&&(r=n.easing,i=n.complete,o=n.delay,n=n.duration),n&&(n=("number"==typeof n?n:t.fx.speeds[n]||t.fx.speeds._default)/1e3),o&&(o=parseFloat(o)/1e3),this.anim(e,n,r,i,o)},t.fn.anim=function(e,n,d,p,v){var g,y,b,w={},x="",N=this,k=t.fx.transitionEnd,T=!1;if(void 0===n&&(n=t.fx.speeds._default/1e3),void 0===v&&(v=0),t.fx.off&&(n=0),"string"==typeof e)w[c]=e,w[u]=n+"s",w[f]=v+"s",w[l]=d||"linear",k=t.fx.animationEnd;else{for(g in y=[],e)h.test(g)?x+=g+"("+e[g]+") ":(w[g]=e[g],y.push(g.replace(/([A-Z])/g,"-$1").toLowerCase()));x&&(w[r]=x,y.push(r)),n>0&&"object"==typeof e&&(w[i]=y.join(", "),w[o]=n+"s",w[a]=v+"s",w[s]=d||"linear")}return b=function(e){if(void 0!==e){if(e.target!==e.currentTarget)return;t(e.target).unbind(k,b)}else t(this).unbind(k,b);T=!0,t(this).css(m),p&&p.call(this)},n>0&&(this.bind(k,b),setTimeout((function(){T||b.call(N)}),1e3*(n+v)+25)),this.size()&&this.get(0).clientLeft,this.css(w),n<=0&&setTimeout((function(){N.each((function(){b.call(this)}))}),0),this},p=null}(Zepto)},function(t,e){!function(t,e){window.document.documentElement;var n=t.fn.show,r=t.fn.hide,i=t.fn.toggle;function o(e,n,r,i,o){"function"!=typeof n||o||(o=n,n=void 0);var s={opacity:r};return i&&(s.scale=i,e.css(t.fx.cssPrefix+"transform-origin","0 0")),e.animate(s,n,null,o)}function s(e,n,i,s){return o(e,n,0,i,(function(){r.call(t(this)),s&&s.call(this)}))}t.fn.show=function(t,e){return n.call(this),void 0===t?t=0:this.css("opacity",0),o(this,t,1,"1,1",e)},t.fn.hide=function(t,e){return void 0===t?r.call(this):s(this,t,"0,0",e)},t.fn.toggle=function(e,n){return void 0===e||"boolean"==typeof e?i.call(this,e):this.each((function(){var r=t(this);r["none"==r.css("display")?"show":"hide"](e,n)}))},t.fn.fadeTo=function(t,e,n){return o(this,t,e,null,n)},t.fn.fadeIn=function(t,e){var r=this.css("opacity");return r>0?this.css("opacity",0):r=1,n.call(this).fadeTo(t,r,e)},t.fn.fadeOut=function(t,e){return s(this,t,null,e)},t.fn.fadeToggle=function(e,n){return this.each((function(){var r=t(this);r[0==r.css("opacity")||"none"==r.css("display")?"fadeIn":"fadeOut"](e,n)}))}}(Zepto)},function(t,e,n){"use strict";(function(t){var e=n(1);
/*!
* HC-Sticky
* =========
* Version: 2.2.3
* Author: Some Web Media
* Author URL: http://somewebmedia.com
* Plugin URL: https://github.com/somewebmedia/hc-sticky
* Description: Cross-browser plugin that makes any element on your page visible while you scroll
* License: MIT
*/!function(e,r){if("object"==typeof t.exports){if(!e.document)throw new Error("HC-Sticky requires a browser to run.");t.exports=r(e)}else"function"==typeof define&&n(60)?define("hcSticky",[],r(e)):r(e)}("undefined"!=typeof window?window:void 0,(function(t){var n={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:"sticky",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:"down"},r=function(t,e,n){console.log("%c! HC Sticky:%c "+t+"%c "+n+" is now deprecated and will be removed. Use%c "+e+"%c instead.","color: red","color: darkviolet","color: black","color: darkviolet","color: black")},i=t.document,o=function o(s,a){var c=this;if("string"==typeof s&&(s=i.querySelector(s)),!s)return!1;a.queries&&r("queries","responsive","option"),a.queryFlow&&r("queryFlow","mobileFirst","option");var u={},l=o.Helpers,f=s.parentNode;"static"===l.getStyle(f,"position")&&(f.style.position="relative");var d=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};l.isEmptyObject(t)&&!l.isEmptyObject(u)||(u=Object(e.a)({},n,u,t))},p=function(){return u.disable},h=function(){var r,i=u.responsive||u.queries;if(i){var o=t.innerWidth;if(r=a,(u=Object(e.a)({},n,r||{})).mobileFirst)for(var s in i)s<=o&&!l.isEmptyObject(i[s])&&d(i[s]);else{var c=[];for(var f in i){var p={};p[f]=i[f],c.push(p)}for(var h=c.length-1;0<=h;h--){var m=c[h],v=Object.keys(m)[0];o<=v&&!l.isEmptyObject(m[v])&&d(m[v])}}}},m={css:{},position:null,stick:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};l.hasClass(s,u.stickyClass)||(!1===v.isAttached&&v.attach(),m.position="fixed",s.style.position="fixed",s.style.left=v.offsetLeft+"px",s.style.width=v.width,void 0===t.bottom?s.style.bottom="auto":s.style.bottom=t.bottom+"px",void 0===t.top?s.style.top="auto":s.style.top=t.top+"px",s.classList?s.classList.add(u.stickyClass):s.className+=" "+u.stickyClass,u.onStart&&u.onStart.call(s,Object(e.a)({},u)))},release:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(t.stop=t.stop||!1,!0===t.stop||"fixed"===m.position||null===m.position||!(void 0===t.top&&void 0===t.bottom||void 0!==t.top&&(parseInt(l.getStyle(s,"top"))||0)===t.top||void 0!==t.bottom&&(parseInt(l.getStyle(s,"bottom"))||0)===t.bottom)){!0===t.stop?!0===v.isAttached&&v.detach():!1===v.isAttached&&v.attach();var n=t.position||m.css.position;m.position=n,s.style.position=n,s.style.left=!0===t.stop?m.css.left:v.positionLeft+"px",s.style.width="absolute"!==n?m.css.width:v.width,void 0===t.bottom?s.style.bottom=!0===t.stop?"":"auto":s.style.bottom=t.bottom+"px",void 0===t.top?s.style.top=!0===t.stop?"":"auto":s.style.top=t.top+"px",s.classList?s.classList.remove(u.stickyClass):s.className=s.className.replace(new RegExp("(^|\\b)"+u.stickyClass.split(" ").join("|")+"(\\b|$)","gi")," "),u.onStop&&u.onStop.call(s,Object(e.a)({},u))}}},v={el:i.createElement("div"),offsetLeft:null,positionLeft:null,width:null,isAttached:!1,init:function(){for(var t in v.el.className="sticky-spacer",m.css)v.el.style[t]=m.css[t];v.el.style["z-index"]="-1";var e=l.getStyle(s);v.offsetLeft=l.offset(s).left-(parseInt(e.marginLeft)||0),v.positionLeft=l.position(s).left,v.width=l.getStyle(s,"width")},attach:function(){f.insertBefore(v.el,s),v.isAttached=!0},detach:function(){v.el=f.removeChild(v.el),v.isAttached=!1}},g=void 0,y=void 0,b=void 0,w=void 0,x=void 0,N=void 0,k=void 0,T=void 0,E=void 0,_=void 0,C=void 0,S=void 0,O=void 0,P=void 0,A=void 0,j=void 0,M=void 0,D=void 0,$=t.pageYOffset||i.documentElement.scrollTop,I=0,L=void 0,R=function(){A=D(),w=M(),O=x+w-T-C,P=k<A;var e=t.pageYOffset||i.documentElement.scrollTop,n=l.offset(s).top,r=n-e,o=void 0;L=e<$?"up":"down",I=e-$,S<($=e)?O+T+(P?E:0)-(u.followScroll&&P?0:T)<=e+A-_-(k-(S-_)<A-_&&u.followScroll&&0<(o=A-k-_)?o:0)?m.release({position:"absolute",bottom:N+f.offsetHeight-O-T}):P&&u.followScroll?"down"===L?r+A+E<=k+.9?m.stick({bottom:E}):"fixed"===m.position&&m.release({position:"absolute",top:n-T-S-I+_}):Math.ceil(r+_)<0&&"fixed"===m.position?m.release({position:"absolute",top:n-T-S+_-I}):e+T-_<=n&&m.stick({top:T-_}):m.stick({top:T-_}):m.release({stop:!0})},B=!1,H=!1,U=function(){B&&(l.event.unbind(t,"scroll",R),B=!1)},F=function(){null!==s.offsetParent&&"none"!==l.getStyle(s,"display")?(function(){var e,n,r,o;m.css=(e=s,n=l.getCascadedStyle(e),r=l.getStyle(e),o={height:e.offsetHeight+"px",left:n.left,right:n.right,top:n.top,bottom:n.bottom,position:r.position,display:r.display,verticalAlign:r.verticalAlign,boxSizing:r.boxSizing,marginLeft:n.marginLeft,marginRight:n.marginRight,marginTop:n.marginTop,marginBottom:n.marginBottom,paddingLeft:n.paddingLeft,paddingRight:n.paddingRight},n.float&&(o.float=n.float||"none"),n.cssFloat&&(o.cssFloat=n.cssFloat||"none"),r.MozBoxSizing&&(o.MozBoxSizing=r.MozBoxSizing),o.width="auto"!==n.width?n.width:"border-box"===o.boxSizing||"border-box"===o.MozBoxSizing?e.offsetWidth+"px":r.width,o),v.init(),g=!(!u.stickTo||!("document"===u.stickTo||u.stickTo.nodeType&&9===u.stickTo.nodeType||"object"==typeof u.stickTo&&u.stickTo instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document))),y=u.stickTo?g?i:"string"==typeof u.stickTo?i.querySelector(u.stickTo):u.stickTo:f,A=(D=function(){var t=s.offsetHeight+(parseInt(m.css.marginTop)||0)+(parseInt(m.css.marginBottom)||0),e=(A||0)-t;return-1<=e&&e<=1?A:t})(),w=(M=function(){return g?Math.max(i.documentElement.clientHeight,i.body.scrollHeight,i.documentElement.scrollHeight,i.body.offsetHeight,i.documentElement.offsetHeight):y.offsetHeight})(),x=g?0:l.offset(y).top,N=u.stickTo?g?0:l.offset(f).top:x,k=t.innerHeight,j=s.offsetTop-(parseInt(m.css.marginTop)||0),b=u.innerSticker?"string"==typeof u.innerSticker?i.querySelector(u.innerSticker):u.innerSticker:null,T=isNaN(u.top)&&-1<u.top.indexOf("%")?parseFloat(u.top)/100*k:u.top,E=isNaN(u.bottom)&&-1<u.bottom.indexOf("%")?parseFloat(u.bottom)/100*k:u.bottom,_=b?b.offsetTop:u.innerTop?u.innerTop:0,C=isNaN(u.bottomEnd)&&-1<u.bottomEnd.indexOf("%")?parseFloat(u.bottomEnd)/100*k:u.bottomEnd,S=x-T+_+j}(),w<=A?U():(R(),B||(l.event.bind(t,"scroll",R),B=!0))):U()},z=function(){s.style.position="",s.style.left="",s.style.top="",s.style.bottom="",s.style.width="",s.classList?s.classList.remove(u.stickyClass):s.className=s.className.replace(new RegExp("(^|\\b)"+u.stickyClass.split(" ").join("|")+"(\\b|$)","gi")," "),m.css={},!(m.position=null)===v.isAttached&&v.detach()},q=function(){z(),h(),p()?U():F()},Y=function(){u.onBeforeResize&&u.onBeforeResize.call(s,Object(e.a)({},u)),q(),u.onResize&&u.onResize.call(s,Object(e.a)({},u))},W=u.resizeDebounce?l.debounce(Y,u.resizeDebounce):Y,V=function(){H&&(l.event.unbind(t,"resize",W),H=!1),U()},K=function(){H||(l.event.bind(t,"resize",W),H=!0),h(),p()?U():F()};this.options=function(t){return t?u[t]:Object(e.a)({},u)},this.refresh=q,this.update=function(t){d(t),a=Object(e.a)({},a,t||{}),q()},this.attach=K,this.detach=V,this.destroy=function(){V(),z()},this.triggerMethod=function(t,e){"function"==typeof c[t]&&c[t](e)},this.reinit=function(){r("reinit","refresh","method"),q()},d(a),K(),l.event.bind(t,"load",q)};if(void 0!==t.jQuery){var s=t.jQuery,a="hcSticky";s.fn.extend({hcSticky:function(t,e){return this.length?"options"===t?s.data(this.get(0),a).options():this.each((function(){var n=s.data(this,a);n?n.triggerMethod(t,e):(n=new o(this,t),s.data(this,a,n))})):this}})}return t.hcSticky=t.hcSticky||o,o})),function(t){var e=t.hcSticky,n=t.document;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i)for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},writable:!0,configurable:!0}),Array.prototype.forEach||(Array.prototype.forEach=function(t){var e,n;if(null==this)throw new TypeError("this is null or not defined");var r=Object(this),i=r.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(1<arguments.length&&(e=arguments[1]),n=0;n<i;){var o;n in r&&(o=r[n],t.call(e,o,n,r)),n++}});var r=function(){var e=n.documentElement,r=function(){};function i(e){var n=t.event;return n.target=n.target||n.srcElement||e,n}e.addEventListener?r=function(t,e,n){t.addEventListener(e,n,!1)}:e.attachEvent&&(r=function(t,e,n){t[e+n]=n.handleEvent?function(){var e=i(t);n.handleEvent.call(n,e)}:function(){var e=i(t);n.call(t,e)},t.attachEvent("on"+e,t[e+n])});var o=function(){};return e.removeEventListener?o=function(t,e,n){t.removeEventListener(e,n,!1)}:e.detachEvent&&(o=function(t,e,n){t.detachEvent("on"+e,t[e+n]);try{delete t[e+n]}catch(r){t[e+n]=void 0}}),{bind:r,unbind:o}}(),i=function(e,r){return t.getComputedStyle?r?n.defaultView.getComputedStyle(e,null).getPropertyValue(r):n.defaultView.getComputedStyle(e,null):e.currentStyle?r?e.currentStyle[r.replace(/-\w/g,(function(t){return t.toUpperCase().replace("-","")}))]:e.currentStyle:void 0},o=function(e){var r=e.getBoundingClientRect(),i=t.pageYOffset||n.documentElement.scrollTop,o=t.pageXOffset||n.documentElement.scrollLeft;return{top:r.top+i,left:r.left+o}};e.Helpers={isEmptyObject:function(t){for(var e in t)return!1;return!0},debounce:function(t,e,n){var r=void 0;return function(){var i=this,o=arguments,s=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(i,o)}),e),s&&t.apply(i,o)}},hasClass:function(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)},offset:o,position:function(t){var e=t.offsetParent,n=o(e),r=o(t),s=i(e),a=i(t);return n.top+=parseInt(s.borderTopWidth)||0,n.left+=parseInt(s.borderLeftWidth)||0,{top:r.top-n.top-(parseInt(a.marginTop)||0),left:r.left-n.left-(parseInt(a.marginLeft)||0)}},getStyle:i,getCascadedStyle:function(e){var r=e.cloneNode(!0);r.style.display="none",Array.prototype.slice.call(r.querySelectorAll('input[type="radio"]')).forEach((function(t){t.removeAttribute("name")})),e.parentNode.insertBefore(r,e.nextSibling);var i=void 0;r.currentStyle?i=r.currentStyle:t.getComputedStyle&&(i=n.defaultView.getComputedStyle(r,null));var o={};for(var s in i)!isNaN(s)||"string"!=typeof i[s]&&"number"!=typeof i[s]||(o[s]=i[s]);if(Object.keys(o).length<3)for(var a in o={},i)isNaN(a)||(o[i[a].replace(/-\w/g,(function(t){return t.toUpperCase().replace("-","")}))]=i.getPropertyValue(i[a]));if(o.margin||"auto"!==o.marginLeft?o.margin||o.marginLeft!==o.marginRight||o.marginLeft!==o.marginTop||o.marginLeft!==o.marginBottom||(o.margin=o.marginLeft):o.margin="auto",!o.margin&&"0px"===o.marginLeft&&"0px"===o.marginRight){var c=e.offsetLeft-e.parentNode.offsetLeft,u=c-(parseInt(o.left)||0)-(parseInt(o.right)||0),l=e.parentNode.offsetWidth-e.offsetWidth-c-(parseInt(o.right)||0)+(parseInt(o.left)||0)-u;0!==l&&1!==l||(o.margin="auto")}return r.parentNode.removeChild(r),r=null,o},event:r}}(window)}).call(this,n(59)(t))},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e){!function(t){"use strict";var e='[data-toggle="dropdown"]',n=function(e){t(e).on("click.bs.dropdown",this.toggle)};function r(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?t(document).find(n):null;return r&&r.length?r:e.parent()}function i(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),i=r(e),o={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(i[0],n.target)||(i.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(e.attr("aria-expanded","false"),i.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=r(n),s=o.hasClass("open");if(i(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);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 i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var o=r(i),s=o.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&o.find(e).trigger("focus"),i.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 r=t(this),i=r.data("bs.dropdown");i||r.data("bs.dropdown",i=new n(this)),"string"==typeof e&&i[e].call(r)}))},t.fn.dropdown.Constructor=n,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=o,this},t(document).on("click.bs.dropdown.data-api",i).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";t.fn.emulateTransitionEnd=function(e){var n=!1,r=this;t(this).one("bsTransitionEnd",(function(){n=!0}));return setTimeout((function(){n||t(r).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,n){!function(){"use strict";n.SKIP={},n.lift=function(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1);return i(e).map((function(e){return t.apply(void 0,e)}))},n.scan=function(t,e,r){var i=r.map((function(r){var i=t(e,r);return i!==n.SKIP&&(e=i),i}));return i(e),i},n.merge=i,n.combine=r,n.scanMerge=function(t,e){var n=t.map((function(t){return t[0]})),i=r((function(){var r=arguments[arguments.length-1];return n.forEach((function(n,i){r.indexOf(n)>-1&&(e=t[i][1](e,n()))})),e}),n);return i(e),i},n["fantasy-land/of"]=n;var e=!1;function n(t){var e,i=[],s=[];function a(e){return arguments.length&&e!==n.SKIP&&(t=e,o(a)&&(a._changing(),a._state="active",i.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=i.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"),i.forEach((function(t){t._changing()}))},a._map=function(e,r){var o=r?n():n(e(t));return o._parents.push(a),i.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 r((function(t,e){return t()(e())}),[t,a])},a._unregisterChild=function(t){var e=i.indexOf(t);-1!==e&&(i.splice(e,1),s.splice(e,1))},Object.defineProperty(a,"end",{get:function(){return e||c()}}),a}function r(t,e){var r=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})),i=r?n(t.apply(null,e.concat([e]))):n(),o=[],s=e.map((function(n){return n._map((function(s){return o.push(n),(r||e.every((function(t){return"pending"!==t._state})))&&(r=!0,i(t.apply(null,e.concat([o]))),o=[]),s}),!0)})),a=i.end.map((function(t){!0===t&&(s.forEach((function(t){t.end(!0)})),a.end(!0))}));return i}function i(t){return r((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,n){var r=n(24).Symbol;t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(23),i=n(25);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r=n(115),i=n(119);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(2))},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){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(73),i=n(71);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(23),i=n(65);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(17),i=n(107),o=n(108),s=n(136);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(s(t))}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(66);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},,function(t,e,n){var r=n(81),i=n(82),o=n(104),s=n(17);t.exports=function(t,e){return(s(t)?r:i)(t,o(e))}},function(t,e,n){var r=n(106);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e,n){var r=n(139);t.exports=function(t,e,n){return null==t?t:r(t,e,n)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e,n){var r=n(83),i=n(103)(r);t.exports=i},function(t,e,n){var r=n(84),i=n(86);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(85)();t.exports=r},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var c=s[t?a:++i];if(!1===n(o[c],c,o))break}return e}}},function(t,e,n){var r=n(87),i=n(99),o=n(72);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){var r=n(88),i=n(89),o=n(17),s=n(93),a=n(70),c=n(95),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),f=!n&&!l&&s(t),d=!n&&!l&&!f&&c(t),p=n||l||f||d,h=p?r(t.length,String):[],m=h.length;for(var v in t)!e&&!u.call(t,v)||p&&("length"==v||f&&("offset"==v||"parent"==v)||d&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||a(v,m))||h.push(v);return h}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(90),i=n(25),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},function(t,e,n){var r=n(23),i=n(25);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,e,n){var r=n(64),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(e?t[a]=n:delete t[a]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){(function(t){var r=n(24),i=n(94),o=e&&!e.nodeType&&e,s=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===o?r.Buffer:void 0,c=(a?a.isBuffer:void 0)||i;t.exports=c}).call(this,n(69)(t))},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(96),i=n(97),o=n(98),s=o&&o.isTypedArray,a=s?i(s):r;t.exports=a},function(t,e,n){var r=n(23),i=n(71),o=n(25),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!s[r(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(68),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===i&&r.process,a=function(){try{var t=o&&o.require&&o.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a}).call(this,n(69)(t))},function(t,e,n){var r=n(100),i=n(101),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(102)(Object.keys,Object);t.exports=r},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(72);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var o=n.length,s=e?o:-1,a=Object(n);(e?s--:++s<o)&&!1!==i(a[s],s,a););return n}}},function(t,e,n){var r=n(105);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(74),i=n(76);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n<o;)t=t[i(e[n++])];return n&&n==o?t:void 0}},function(t,e,n){var r=n(17),i=n(66),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(s.test(t)||!o.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(109),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)})),e}));t.exports=s},function(t,e,n){var r=n(110);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(111);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(112),i=n(131),o=n(133),s=n(134),a=n(135);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,t.exports=c},function(t,e,n){var r=n(113),i=n(124),o=n(130);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,e,n){var r=n(114),i=n(120),o=n(121),s=n(122),a=n(123);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,t.exports=c},function(t,e,n){var r=n(26);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e,n){var r=n(73),i=n(116),o=n(65),s=n(118),a=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,f=u.hasOwnProperty,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?d:a).test(s(t))}},function(t,e,n){var r,i=n(117),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},function(t,e,n){var r=n(24)["__core-js_shared__"];t.exports=r},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(26),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(26),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(26);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(125),i=n(126),o=n(127),s=n(128),a=n(129);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(27),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(27);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(27);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(27);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(67)(n(24),"Map");t.exports=r},function(t,e,n){var r=n(28);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(28);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(28);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(28);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(137);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(64),i=n(138),o=n(17),s=n(66),a=r?r.prototype:void 0,c=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(s(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(140),i=n(74),o=n(70),s=n(65),a=n(76);t.exports=function(t,e,n,c){if(!s(t))return t;for(var u=-1,l=(e=i(e,t)).length,f=l-1,d=t;null!=d&&++u<l;){var p=a(e[u]),h=n;if(u!=f){var m=d[p];void 0===(h=c?c(m,p,d):void 0)&&(h=s(m)?m:o(e[u+1])?[]:{})}r(d,p,h),d=d[p]}return t}},function(t,e,n){var r=n(141),i=n(75),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var s=t[e];o.call(t,e)&&i(s,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(142);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(67),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},,function(t,e,n){"use strict";n.r(e),n.d(e,"app",(function(){return ge})),n.d(e,"compat",(function(){return ve}));var r={};n.r(r),n.d(r,"extend",(function(){return w})),n.d(r,"override",(function(){return x}));n(18);function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var o=n(1),s=n(78),a=n.n(s),c=n(79),u=n.n(c),l=n(80),f=n.n(l),d=function(){function t(){this.subscribers={}}var e=t.prototype;return e.subscribe=function(t,e){f()(this.subscribers,t+"[]",e)},e.dispatch=function(t,e){void 0===e&&(e=null),a()(u()(this.subscribers,t),(function(n){n(t,e)}))},t}();function p(t,e){var n=t[e];return delete t[e],n}function h(t){return t instanceof Array?t.map((function(t){return h(t)})).join(""):"object"==typeof t&&null!==t?t.text||h(t.children):t}function v(t){var e=t&&t.displayName()||app.translator.trans("core.lib.username.deleted_text");return m("span",{className:"username"},e)}var g=function(){function t(){this.translations={},this.locale=void 0}var e=t.prototype;return e.addTranslations=function(t){Object(o.a)(this.translations,t)},e.trans=function(t,e){void 0===e&&(e=null);var n=this.translations[t];return n?this.apply(n,e||{}):t},e.transText=function(t,e){return void 0===e&&(e=null),h(this.trans(t,e))},e.transChoice=function(t,e,n){var r=this.translations[t];return r?(e=parseInt(e,10),r=this.pluralize(r,e),this.apply(r,n||{})):t},e.apply=function(t,e){if("user"in e){var n=p(e,"user");e.username||(e.username=v(n))}var r=t.split(new RegExp("({[a-z0-9_]+}|</?[a-z0-9_]+>)","gi")),i=[],o=[i];return r.forEach((function(t){var n=t.match(new RegExp("{([a-z0-9_]+)}|<(/?)([a-z0-9_]+)>","i"));if(n){if(n[1])o[0].push(e[n[1]]);else if(n[3])if(n[2])o.shift();else{var r=e[n[3]]||{tag:n[3],children:[]};o[0].push(r),o.unshift(r.children||r)}}else o[0].push({tag:"span",text:t})})),i.filter((function(t){return t}))},e.pluralize=function(t,e){var n=this,r=new RegExp(/^\w+\: +(.+)$/),i=new RegExp(/^\s*((\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]]))\s?(.+?)$/),o=new RegExp(/^\s*(\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]])/),s=[],a=[];return t.split("|").forEach((function(t){if(i.test(t)){var e=t.match(i);a[e[0]]=e[e.length-1]}else if(r.test(t)){var n=t.match(r);s.push(n[1])}else s.push(t)})),a.forEach((function(t,r){if(o.test(r)){var i=r.match(o);if(i[1]){var s=i[2].split(",");for(var c in s)if(e==s[c])return a[r]}else{var u=n.convertNumber(i[4]),l=n.convertNumber(i[5]);if(("["===i[3]?e>=u:e>u)&&("]"===i[6]?e<=l:e<l))return a[r]}}})),s[this.pluralPosition(e,this.locale)]||s[0]||void 0},e.convertNumber=function(t){return"-Inf"===t?Number.NEGATIVE_INFINITY:"+Inf"===t||"Inf"===t?Number.POSITIVE_INFINITY:parseInt(t,10)},e.pluralPosition=function(t,e){switch("pt_BR"===e&&(e="xbr"),e.length>3&&(e=e.split("_")[0]),e){case"bo":case"dz":case"id":case"ja":case"jv":case"ka":case"km":case"kn":case"ko":case"ms":case"th":case"vi":case"zh":return 0;case"af":case"az":case"bn":case"bg":case"ca":case"da":case"de":case"el":case"en":case"eo":case"es":case"et":case"eu":case"fa":case"fi":case"fo":case"fur":case"fy":case"gl":case"gu":case"ha":case"he":case"hu":case"is":case"it":case"ku":case"lb":case"ml":case"mn":case"mr":case"nah":case"nb":case"ne":case"nl":case"nn":case"no":case"om":case"or":case"pa":case"pap":case"ps":case"pt":case"so":case"sq":case"sv":case"sw":case"ta":case"te":case"tk":case"tr":case"ur":case"zu":return 1==t?0:1;case"am":case"bh":case"fil":case"fr":case"gun":case"hi":case"ln":case"mg":case"nso":case"xbr":case"ti":case"wa":return 0===t||1==t?0:1;case"be":case"bs":case"hr":case"ru":case"sr":case"uk":return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2;case"cs":case"sk":return 1==t?0:t>=2&&t<=4?1:2;case"ga":return 1==t?0:2==t?1:2;case"lt":return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2;case"sl":return t%100==1?0:t%100==2?1:t%100==3||t%100==4?2:3;case"mk":return t%10==1?0:1;case"mt":return 1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3;case"lv":return 0===t?0:t%10==1&&t%100!=11?1:2;case"pl":return 1==t?0:t%10>=2&&t%10<=4&&(t%100<12||t%100>14)?1:2;case"cy":return 1==t?0:2==t?1:8==t||11==t?2:3;case"ro":return 1==t?0:0===t||t%100>0&&t%100<20?1:2;case"ar":return 0===t?0:1==t?1:2==t?2:t>=3&&t<=10?3:t>=11&&t<=99?4:5;default:return 0}},t}(),y=function(){function t(t,e){this.user=void 0,this.csrfToken=void 0,this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),app.request(Object(o.a)({method:"POST",url:app.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location.href=app.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}(),b=function(){function t(t){this.data={},this.models=void 0,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 i=n,s=app.forum.attribute("apiUrl")+"/"+t;return e instanceof Array?s+="?filter[id]="+e.join(","):"object"==typeof e?i=e:e&&(s+="/"+e),app.request(Object(o.a)({method:"GET",url:s,params:i},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 w(t,e,n){var r=t[e];t[e]=function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];var s=r?r.apply(t,i):void 0;return n.apply(t,[s].concat(i)),s},Object(o.a)(t[e],r)}function x(t,e,n){var r=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n.apply(this,[r.bind(this)].concat(e))},Object(o.a)(t[e],r)}var N=function(){function t(){var t=this;this.$backdrop=void 0,$("#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(){$("#app").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}(),k=function(t,e,n,r){this.status=void 0,this.responseText=void 0,this.options=void 0,this.xhr=void 0,this.response=void 0,this.alert=void 0,this.status=t,this.responseText=e,this.options=n,this.xhr=r;try{this.response=JSON.parse(e)}catch(t){this.response=null}this.alert=null},T=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=null),this.data=void 0,this.payload=void 0,this.freshness=void 0,this.exists=void 0,this.store=void 0,this.data=t,this.store=e,this.freshness=new Date,this.exists=!1}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 r in this.data[n]=this.data[n]||{},e[n])e[n][r]instanceof t&&(e[n][r]={data:t.getIdentifier(e[n][r])}),this.data[n][r]=e[n][r];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 i={type:this.data.type,id:this.data.id,attributes:e,relationships:void 0};if(e.relationships){for(var s in i.relationships={},e.relationships){var a=e.relationships[s];i.relationships[s]={data:a instanceof Array?a.map(t.getIdentifier):t.getIdentifier(a)}}delete e.relationships}var c=this.copyData();this.pushData(i);var u={data:i};return n.meta&&(u.meta=n.meta),app.request(Object(o.a)({method:this.exists?"PATCH":"POST",url:app.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===t&&(t={}),void 0===e&&(e={}),this.exists?app.request(Object(o.a)({method:"DELETE",url:app.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 app.store.getById(e.data.type,e.data.id)}return!1}},t.hasMany=function(t){return function(){if(this.data.relationships){var e=this.data.relationships[t];if(e)return e.data.map((function(t){return app.store.getById(t.type,t.id)}))}return!1}},t.transformDate=function(t){return t?new Date(t):null},t.getIdentifier=function(t){return{type:t.data.type,id:t.data.id}},t}(),E=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(T);function _(t,e){var n,r=[].concat(t),i={};return function(){var t=this,o=!1;return r.forEach((function(e){var n="function"==typeof t[e]?t[e]():t[e];i[e]!==n&&(o=!0,i[e]=n)})),o&&(n=e.apply(this,r.map((function(t){return i[t]})))),n}}var C=function(t,e){this.content=void 0,this.priority=void 0,this.key=0,this.content=t,this.priority=e},S=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){var e;return null===(e=this.items[t])||void 0===e?void 0:e.content},e.add=function(t,e,n){return void 0===n&&(n=0),this.items[t]=new C(e,n),this},e.toArray=function(){var t=[];for(var e in this.items)this.items.hasOwnProperty(e)&&null!==this.items[e]&&this.items[e]instanceof C&&(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}(),O=n(0);function P(t,e){return void 0===e&&(e={}),e.className="icon "+t+" "+(e.className||""),m("i",e)}var A=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n.view=function(t){var e=t.attrs,n=p(e,"type"),r=p(e,"icon");return e.className="Badge "+(n?"Badge--"+n:"")+" "+(e.className||""),e.title=p(e,"label")||"",m("span",e,r?P(r,{className:"Badge-icon"}):m.trust("&nbsp;"))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.props.label&&this.$().tooltip({container:"body"})},e}(O.a),j=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).title=T.attribute("title"),e.slug=T.attribute("slug"),e.createdAt=T.attribute("createdAt",T.transformDate),e.user=T.hasOne("user"),e.firstPost=T.hasOne("firstPost"),e.lastPostedAt=T.attribute("lastPostedAt",T.transformDate),e.lastPostedUser=T.hasOne("lastPostedUser"),e.lastPost=T.hasOne("lastPost"),e.lastPostNumber=T.attribute("lastPostNumber"),e.commentCount=T.attribute("commentCount"),e.replyCount=_("commentCount",(function(t){return Math.max(0,t-1)})),e.posts=T.hasMany("posts"),e.mostRelevantPost=T.hasOne("mostRelevantPost"),e.lastReadAt=T.attribute("lastReadAt",T.transformDate),e.lastReadPostNumber=T.attribute("lastReadPostNumber"),e.isUnread=_("unreadCount",(function(t){return!!t})),e.isRead=_("unreadCount",(function(t){return app.session.user&&!t})),e.hiddenAt=T.attribute("hiddenAt",T.transformDate),e.hiddenUser=T.hasOne("hiddenUser"),e.isHidden=_("hiddenAt",(function(t){return!!t})),e.canReply=T.attribute("canReply"),e.canRename=T.attribute("canRename"),e.canHide=T.attribute("canHide"),e.canDelete=T.attribute("canDelete"),e}i(e,t);var n=e.prototype;return n.removePost=function(t){var e=this.data.relationships,n=e&&e.posts;n&&n.data.some((function(e,r){if(t===e.id)return n.data.splice(r,1),!0}))},n.unreadCount=function(){var t=app.session.user;return t&&t.markedAllAsReadAt()<this.lastPostedAt()?Math.max(0,this.lastPostNumber()-(this.lastReadPostNumber()||0)):0},n.badges=function(){var t=new S;return this.isHidden()&&t.add("hidden",m(A,{type:"hidden",icon:"fas fa-trash",label:app.translator.transText("core.lib.badge.hidden_tooltip")})),t},n.postIds=function(){var t=this.data.relationships.posts;return t?t.data.map((function(t){return t.id})):[]},e}(T);function M(t){for(var e=0,n=0;n<t.length;n++)e+=t.charCodeAt(n);var r=function(t,e,n){var r,i,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:r=n,i=l,o=c;break;case 1:r=u,i=n,o=c;break;case 2:r=c,i=n,o=l;break;case 3:r=c,i=u,o=n;break;case 4:r=l,i=c,o=n;break;case 5:r=n,i=c,o=u}return{r:Math.floor(255*r),g:Math.floor(255*i),b:Math.floor(255*o)}}(e%360/360,.3,.9);return""+r.r.toString(16)+r.g.toString(16)+r.b.toString(16)}var D=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.initProps=function(e){t.initProps.call(this,e),e.group&&(e.icon=e.group.icon(),e.style={backgroundColor:e.group.color()},e.label=void 0===e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.id(),delete e.group)},e}(A),I=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).username=T.attribute("username"),e.displayName=T.attribute("displayName"),e.email=T.attribute("email"),e.isEmailConfirmed=T.attribute("isEmailConfirmed"),e.password=T.attribute("password"),e.avatarUrl=T.attribute("avatarUrl"),e.preferences=T.attribute("preferences"),e.groups=T.hasMany("groups"),e.joinTime=T.attribute("joinTime",T.transformDate),e.lastSeenAt=T.attribute("lastSeenAt",T.transformDate),e.markedAllAsReadAt=T.attribute("markedAllAsReadAt",T.transformDate),e.unreadNotificationCount=T.attribute("unreadNotificationCount"),e.newNotificationCount=T.attribute("newNotificationCount"),e.discussionCount=T.attribute("discussionCount"),e.commentCount=T.attribute("commentCount"),e.canEdit=T.attribute("canEdit"),e.canDelete=T.attribute("canDelete"),e.avatarColor=null,e.color=_(["username","avatarUrl","avatarColor"],(function(t,e,n){return n?"rgb("+n.join(", ")+")":e?(this.calculateAvatarColor(),""):"#"+M(t)})),e}i(e,t);var n=e.prototype;return n.isOnline=function(){return this.lastSeenAt()>dayjs().subtract(5,"minutes").toDate()},n.badges=function(){var t=new S,e=this.groups();return e&&e.forEach((function(e){t.add("group"+e.id(),D.component({group:e}))})),t},n.calculateAvatarColor=function(){var t=new Image,e=this;t.onload=function(){var t=new ColorThief;e.avatarColor=t.getColor(this),e.freshness=new Date,m.redraw()},t.crossOrigin="anonymous",t.src=this.avatarUrl()},n.savePreferences=function(t){var e=this.preferences();return Object(o.a)(e,t),this.save({preferences:e})},e}(T);function L(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 &nbsp;").replace(/<img\b[^>]*>/gi," "),n=$("<div/>").html(e);return n.find(L.removeSelectors.join(",")).remove(),n.text().replace(/\s+/g," ").trim()}L.removeSelectors=["blockquote","script"];var R=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).number=T.attribute("number"),e.discussion=T.hasOne("discussion"),e.createdAt=T.attribute("createdAt",T.transformDate),e.user=T.hasOne("user"),e.contentType=T.attribute("contentType"),e.content=T.attribute("content"),e.contentHtml=T.attribute("contentHtml"),e.contentPlain=_("contentHtml",L),e.editedAt=T.attribute("editedAt",T.transformDate),e.editedUser=T.hasOne("editedUser"),e.isEdited=_("editedAt",(function(t){return!!t})),e.hiddenAt=T.attribute("hiddenAt",T.transformDate),e.hiddenUser=T.hasOne("hiddenUser"),e.isHidden=_("hiddenAt",(function(t){return!!t})),e.canEdit=T.attribute("canEdit"),e.canHide=T.attribute("canHide"),e.canDelete=T.attribute("canDelete"),e}return i(e,t),e}(T),B=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).nameSingular=T.attribute("nameSingular"),e.namePlural=T.attribute("namePlural"),e.color=T.attribute("color"),e.icon=T.attribute("icon"),e}return i(e,t),e}(T);B.ADMINISTRATOR_ID="1",B.GUEST_ID="2",B.MEMBER_ID="3";var H=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).contentType=T.attribute("contentType"),e.content=T.attribute("content"),e.createdAt=T.attribute("createdAt",T.transformDate),e.isRead=T.attribute("isRead"),e.user=T.hasOne("user"),e.fromUser=T.hasOne("fromUser"),e.subject=T.hasOne("subhect"),e}return i(e,t),e}(T);H.ADMINISTRATOR_ID="1",H.GUEST_ID="2",H.MEMBER_ID="3";var U=function(){return(U=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},F={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",fadeColor:"transparent",animation:"spinner-line-fade-default",rotate:0,direction:1,speed:1,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:"0 0 1px transparent",position:"absolute"},z=function(){function t(t){void 0===t&&(t={}),this.opts=U(U({},F),t)}return t.prototype.spin=function(t){return this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),q(this.el,{position:this.opts.position,width:0,zIndex:this.opts.zIndex,left:this.opts.left,top:this.opts.top,transform:"scale("+this.opts.scale+")"}),t&&t.insertBefore(this.el,t.firstChild||null),function(t,e){var n=Math.round(e.corners*e.width*500)/1e3+"px",r="none";!0===e.shadow?r="0 2px 4px #000":"string"==typeof e.shadow&&(r=e.shadow);for(var i=function(t){for(var e=/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/,n=[],r=0,i=t.split(",");r<i.length;r++){var o=i[r].match(e);if(null!==o){var s=+o[2],a=+o[5],c=o[4],u=o[7];0!==s||c||(c=u),0!==a||u||(u=c),c===u&&n.push({prefix:o[1]||"",x:s,y:a,xUnits:c,yUnits:u,end:o[8]})}}return n}(r),o=0;o<e.lines;o++){var s=~~(360/e.lines*o+e.rotate),a=q(document.createElement("div"),{position:"absolute",top:-e.width/2+"px",width:e.length+e.width+"px",height:e.width+"px",background:Y(e.fadeColor,o),borderRadius:n,transformOrigin:"left",transform:"rotate("+s+"deg) translateX("+e.radius+"px)"}),c=o*e.direction/e.lines/e.speed;c-=1/e.speed;var u=q(document.createElement("div"),{width:"100%",height:"100%",background:Y(e.color,o),borderRadius:n,boxShadow:W(i,s),animation:1/e.speed+"s linear "+c+"s infinite "+e.animation});a.appendChild(u),t.appendChild(a)}}(this.el,this.opts),this},t.prototype.stop=function(){return this.el&&("undefined"!=typeof requestAnimationFrame?cancelAnimationFrame(this.animateId):clearTimeout(this.animateId),this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=void 0),this},t}();function q(t,e){for(var n in e)t.style[n]=e[n];return t}function Y(t,e){return"string"==typeof t?t:t[e%t.length]}function W(t,e){for(var n=[],r=0,i=t;r<i.length;r++){var o=i[r],s=V(o.x,o.y,e);n.push(o.prefix+s[0]+o.xUnits+" "+s[1]+o.yUnits+o.end)}return n.join(", ")}function V(t,e,n){var r=n*Math.PI/180,i=Math.sin(r),o=Math.cos(r);return[Math.round(1e3*(t*o+e*i))/1e3,Math.round(1e3*(-t*i+e*o))/1e3]}var K=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n.view=function(t){var e=t.attrs;return e.className="LoadingIndicator "+(e.className||""),delete e.size,m("div",e,m.trust("&nbsp;"))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n={zIndex:"auto",color:this.$().css("color")},r={};switch(e.attrs.size){case"large":r={lines:10,length:8,width:4,radius:8};break;case"tiny":r={lines:8,length:2,width:2,radius:3};break;default:r={lines:8,length:4,width:3,radius:5}}new z(Object(o.a)({},n,{},r)).spin(this.element)},e}(O.a),Z=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n.view=function(){var t=this.props,e=t.children,n=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["children"]);n.className=n.className||"",n.type=n.type||"button",n.title&&!this.props.children&&(n["aria-label"]=n.title),!n.title&&this.props.children&&(n.title=h(this.props.children));var r=p(n,"icon");r&&(n.className+=" hasIcon");var i=p(n,"loading");return(n.disabled||i)&&(n.className=classNames(n.className,"disabled",i&&"loading"),delete n.onclick),m("button",n,this.getButtonContent(r,n.loading,e))},n.getButtonContent=function(t,e,n){return[t&&!0!==t?P(t,{className:"Button-icon"}):"",n?m("span",{className:"Button-label"},n):"",e?K.component({size:"tiny",className:"LoadingIndicator--inline"}):""]},e}(O.a),G=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(O.a);function J(t){return(null==t?void 0:t.tag)===G}function X(t){return t instanceof Array||(t=[t]),function(t){var e,n=[];return t.forEach((function(r,i){(!J(r)||e&&!J(e)&&i!==t.length-1)&&(e=r,n.push(r))})),n}(t).map((function(t){var e,n,r,i,o=null===(e=t.tag)||void 0===e?void 0:e.isListItem,s=(null===(n=t.tag)||void 0===n?void 0:n.isActive)&&t.tag.isActive(t.attrs),a=(null===(r=t.attrs)||void 0===r?void 0:r.itemClassName)||t.itemClassName;o&&(t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key);var c=o?t:m("li",{className:classNames(a,t.itemName&&"item-"+t.itemName,s&&"active"),key:(null===(i=t.attrs)||void 0===i?void 0:i.key)||t.itemName},t);return c.state=c.state||{},c}))}G.isListItem=!0;var Q,tt,et,nt,rt,it=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.prototype.view=function(){var t=Object(o.a)({},this.props),e=p(t,"type");t.className="Alert Alert--"+e+" "+(t.className||"");var n=p(t,"children"),r=p(t,"controls")||[],i=p(t,"dismissible"),s=p(t,"ondismiss"),a=[];return(i||void 0===i)&&a.push(m(Z,{icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:s})),m("div",t,m("span",{className:"Alert-body"},n),m("ul",{className:"Alert-controls"},X(r.concat(a))))},e}(O.a),ot=(Q=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'],tt=function(){function t(t){var e=t.targetModal,n=t.triggers,r=void 0===n?[]:n,i=t.onShow,o=void 0===i?function(){}:i,s=t.onClose,a=void 0===s?function(){}:s,c=t.openTrigger,u=void 0===c?"data-micromodal-trigger":c,l=t.closeTrigger,f=void 0===l?"data-micromodal-close":l,d=t.disableScroll,p=void 0!==d&&d,h=t.disableFocus,m=void 0!==h&&h,v=t.awaitCloseAnimation,g=void 0!==v&&v,y=t.awaitOpenAnimation,b=void 0!==y&&y,w=t.debugMode,x=void 0!==w&&w;this.modal=document.getElementById(e),this.config={debugMode:x,disableScroll:p,openTrigger:u,closeTrigger:f,onShow:o,onClose:a,awaitCloseAnimation:g,awaitOpenAnimation:b,disableFocus:m},r.length>0&&this.registerTriggers.apply(this,r),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var e=t.prototype;return e.registerTriggers=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.filter(Boolean).forEach((function(e){e.addEventListener("click",(function(e){return t.showModal(e)}))}))},e.showModal=function(){var t=this;this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add("is-open"),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation?this.modal.addEventListener("animationend",(function e(){t.modal.removeEventListener("animationend",e,!1),t.setFocusToFirstNode()}),!1):this.setFocusToFirstNode(),this.config.onShow(this.modal,this.activeElement)},e.closeModal=function(){var t=this.modal;this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus(),this.config.onClose(this.modal),this.config.awaitCloseAnimation?this.modal.addEventListener("animationend",(function e(){t.classList.remove("is-open"),t.removeEventListener("animationend",e,!1)}),!1):t.classList.remove("is-open")},e.closeModalById=function(t){this.modal=document.getElementById(t),this.modal&&this.closeModal()},e.scrollBehaviour=function(t){if(this.config.disableScroll){var e=document.querySelector("body");switch(t){case"enable":Object(o.a)(e.style,{overflow:"",height:""});break;case"disable":Object(o.a)(e.style,{overflow:"hidden",height:"100vh"})}}},e.addEventListeners=function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)},e.removeEventListeners=function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)},e.onClick=function(t){t.target.hasAttribute(this.config.closeTrigger)&&(this.closeModal(),t.preventDefault())},e.onKeydown=function(t){27===t.keyCode&&this.closeModal(t),9===t.keyCode&&this.maintainFocus(t)},e.getFocusableNodes=function(){var t=this.modal.querySelectorAll(Q);return Array.apply(void 0,t)},e.setFocusToFirstNode=function(){if(!this.config.disableFocus){var t=this.getFocusableNodes();t.length&&t[0].focus()}},e.maintainFocus=function(t){var e=this.getFocusableNodes();if(this.modal.contains(document.activeElement)){var n=e.indexOf(document.activeElement);t.shiftKey&&0===n&&(e[e.length-1].focus(),t.preventDefault()),t.shiftKey||n!==e.length-1||(e[0].focus(),t.preventDefault())}else e[0].focus()},t}(),et=null,nt=function(t){if(!document.getElementById(t))return console.warn("MicroModal: ❗Seems like you have missed %c'"+t+"'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<div class="modal" id="'+t+'"></div>'),!1},rt=function(t,e){if(function(t){t.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<a href="#" data-micromodal-trigger="my-modal"></a>'))}(t),!e)return!0;for(var n in e)nt(n);return!0},{init:function(t){var e=Object(o.a)({},{openTrigger:"data-micromodal-trigger"},t),n=[].concat(document.querySelectorAll("["+e.openTrigger+"]")),r=function(t,e){var n=[];return t.forEach((function(t){var r=t.attributes[e].value;void 0===n[r]&&(n[r]=[]),n[r].push(t)})),n}(n,e.openTrigger);if(!0!==e.debugMode||!1!==rt(n,r))for(var i in r){var s=r[i];e.targetModal=i,e.triggers=[].concat(s),et=new tt(e)}},show:function(t,e){var n=e||{};n.targetModal=t,!0===n.debugMode&&!1===nt(t)||(et=new tt(n)).showModal()},close:function(t){t?et.closeModalById(t):et.closeModal()}}),st=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).alert=void 0,e.loading=void 0,e}i(e,t);var n=e.prototype;return n.view=function(){return this.alert&&(this.alert.attrs.dismissible=!1),m("div",{className:"Modal modal-dialog "+this.className()},m("div",{className:"Modal-content"},this.isDismissible()?m("div",{className:"Modal-close App-backControl"},Z.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.alert&&m("div",{className:"Modal-alert"},this.alert),this.content())))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),app.modal.component=this},n.isDismissible=function(){return!0},n.onsubmit=function(t){},n.onready=function(){this.$("form").find("input, select, textarea").first().focus().select()},n.onhide=function(){},n.hide=function(){app.modal.close()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){this.alert=t.alert,m.redraw(),422===t.status&&t.response.errors?this.$('form [name="'+t.response.errors[0].source.pointer.replace("/data/attributes/","")+'"]').select():this.onready()},e}(O.a),at=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).node=void 0,e.showing=void 0,e.hideTimeout=void 0,e.component=void 0,e}i(e,t);var n=e.prototype;return n.oncreate=function(e){t.prototype.oncreate.call(this,e),app.modal=this},n.view=function(){return m("div",{className:"ModalManager modal",id:"Modal",onclick:this.onclick.bind(this),key:"modal"},this.node)},n.show=function(t){var e,n=this;if(!(t instanceof st||(null===(e=t.tag)||void 0===e?void 0:e.prototype)instanceof st))throw new Error("The ModalManager component can only show Modal components");clearTimeout(this.hideTimeout),this.showing=!0,this.node=t.tag?t:t.render(),m.redraw(),$(".modal-backdrop").length||$("<div />").addClass("modal-backdrop").appendTo("body"),ot.show("Modal",{awaitCloseAnimation:!0,onClose:function(){$(".modal-backdrop").fadeOut(200,(function(){this.remove()})),n.showing=!1}}),this.onready()},n.onclick=function(t){t.target===this.element&&this.close()},n.close=function(){this.showing&&(this.hideTimeout=setTimeout((function(){return ot.close("Modal")})))},n.clear=function(){this.component&&this.component.onhide(),this.component=null,m.redraw()},n.onready=function(){this.component&&this.component.onready()},e}(O.a),ct=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return this.props.error.xhr?this.props.error.xhr.status+" "+this.props.error.xhr.statusText:""},n.content=function(){var t;try{t=JSON.stringify(JSON.parse(this.props.error.responseText),null,2)}catch(e){t=this.props.error.responseText}return m("div",{className:"Modal-body"},m("pre",null,this.props.error.options.method," ",this.props.error.options.url,m("br",null),m("br",null),t))},e}(st),ut=function(){function t(){this.forum=void 0,this.data=void 0,this.translator=new g,this.bus=new d,this.session=void 0,this.store=new b({forums:E,users:I,discussions:j,posts:R,groups:B,notifications:H}),this.drawer=new N,this.modal=void 0,this.cache={},this.routes={},this.title="",this.titleCount=0,this.requestError=null}var e=t.prototype;return e.mount=function(t){void 0===t&&(t=""),m.mount(document.getElementById("modal"),new at),m.route(document.getElementById("content"),t+"/",function(t,e){void 0===e&&(e="");var n={};for(var r in t){var i=t[r];i.component&&(i.component.attrs||(i.component.attrs={}),i.component.attrs.routeName=r),n[e+i.path]=i.component}return n}(this.routes,t))},e.boot=function(t){this.data=t,this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums",1),this.session=new y(this.store.getById("users",this.data.session.userId),this.data.session.csrfToken),this.locale(),this.plugins(),this.setupRoutes(),this.mount(),this.bus.dispatch("app.booting")},e.locale=function(){this.translator.locale=this.data.locale,this.bus.dispatch("app.locale")},e.plugins=function(){this.bus.dispatch("app.plugins")},e.setupRoutes=function(){this.bus.dispatch("app.routes")},e.preloadedApiDocument=function(){if(this.data.apiDocument){var t=this.store.pushPayload(this.data.apiDocument);return this.data.apiDocument=null,t}return null},e.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){document.title=(this.titleCount?"("+this.titleCount+") ":"")+(this.title?this.title+" - ":"")+this.forum.attribute("title")},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var r=n.path.replace(/:([^\/]+)/g,(function(t,n){return p(e,n)})),i=m.buildQueryString(e);return(""===m.route.prefix?this.forum.attribute("basePath"):"")+r+(i?"?"+i:"")},e.request=function(t){var e=this,n=Object(o.a)({},t);if(n.background=n.background||!0,w(n,"config",(function(t,n){return n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),"GET"!==n.method&&"POST"!==n.method){var r=n.method;w(n,"config",(function(t,e){return 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 i=n.extract;return n.extract=function(t){var e;e=i?i(t.responseText):t.responseText||null;var r=t.status;if(r<200||r>299)throw new k(r,e,n,t);if(t.getResponseHeader){var o=t.getResponseHeader("X-CSRF-Token");o&&(app.session.csrfToken=o)}try{return JSON.parse(e)}catch(r){throw new k(500,e,n,t)}},m.request(n).then((function(t){return t}),(function(t){var r;switch(e.requestError=t,t.status){case 422:r=t.response.errors.map((function(t){return[t.detail,m("br")]})).reduce((function(t,e){return t.concat(e)}),[]).slice(0,-1);break;case 401:case 403:r=e.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:r=e.translator.trans("core.lib.error.not_found_message");break;case 429:r=e.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:r=e.translator.trans("core.lib.error.generic_message")}var i=app.forum.attribute("debug");t.alert=it.component({type:"error",children:r,controls:i&&[Z.component({className:"Button Button--link",onclick:e.showDebug.bind(e,t),children:"DEBUG"})]});try{n.errorHandler(t)}catch(t){console.error(t)}return Promise.reject(t)}))},e.showDebug=function(t){this.modal.show(ct.component({error:t}))},t}(),lt=function(){function 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 r=this.stack[this.stack.length-2];r&&r.name===t&&this.stack.pop();var i=this.getCurrent();i&&i.name===t?Object(o.a)(i,{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),m.route.set("/")},t}(),ft=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},X(this.items().toArray()))},n.items=function(){return new S},e}(O.a),dt=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new S},e}(O.a),pt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).identification=void 0,e.password=void 0,e.remember=void 0,e}i(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.identification=m.prop(this.props.identification||""),this.password=m.prop(this.props.password||""),this.remember=m.prop(!!this.props.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return app.translator.transText("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(dt,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new S;return t.add("identification",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"identification",type:"text",placeholder:app.translator.transText("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",placeholder:app.translator.transText("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}),app.translator.trans("core.forum.log_in.remember_me_label")))),10),t.add("submit",m("div",{className:"Form-group"},Z.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children:app.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)},app.translator.trans("core.forum.log_in.forgot_password_link"))),app.forum.attribute("allowSignUp")&&m("p",{className:"LogInModal-signUp"},app.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;app.modal.show(new ForgotPasswordModal(e))},n.signUp=function(){var t={password:this.password()},e=this.identification();t[-1!==e.indexOf("@")?"email":"username"]=e},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$('[name="'+(this.identification()?"password":"identification")+'"]').select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.identification(),n=this.password(),r=this.remember();app.session.login({identification:e,password:n,remember:r},{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.onerror=function(e){401===e.status&&(e.alert.attrs.children=app.translator.trans("core.forum.log_in.invalid_login_message")),t.prototype.onerror.call(this,e)},e}(st);function ht(t,e){void 0===e&&(e={}),e.className="Avatar "+(e.className||"");var n="",r="undefined"===e.title||e.title;if(r||delete e.title,t){var i=t.displayName()||"?",s=t.avatarUrl();if(r&&(e.title=e.title||i),s)return m("img",Object(o.a)({},e,{src:s}));n=i.charAt(0).toUpperCase(),e.style={background:t.color()}}return m("span",e,n)}var mt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).showing=!1,e}i(e,t),e.initProps=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"};var n=e.prototype;return n.view=function(){var t=this.props.children?X(this.props.children):[];return m("div",{className:"ButtonGroup Dropdown dropdown "+this.props.className+" itemCount"+t.length+(this.showing?" open":"")},this.getButton(),this.getMenu(t))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.$("> .Dropdown-toggle").dropdown(),this.element.addEventListener("shown.bs.dropdown",(function(){n.showing=!0,n.props.onshow&&n.props.onshow(),m.redraw();var t=n.$(".Dropdown-menu"),e=t.hasClass("Dropdown-menu--right");t.removeClass("Dropdown-menu--top Dropdown-menu--right"),t.toggleClass("Dropdown-menu--top",t.offset().top+t.height()>$(window).scrollTop()+$(window).height()),t.offset().top<0&&t.removeClass("Dropdown-menu--top"),t.toggleClass("Dropdown-menu--right",e||t.offset().left+t.width()>$(window).scrollLeft()+$(window).width())})),this.element.addEventListener("hidden.bs.dropdown",(function(){n.showing=!1,n.props.onhide&&n.props.onhide(),m.redraw()}))},n.getButton=function(){return m("button",{className:"Dropdown-toggle "+this.props.buttonClassName,"data-toggle":"dropdown",onclick:this.props.onclick},this.getButtonContent())},n.getButtonContent=function(){var t=this.props;return[t.icon?P(t.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},t.label),t.caretIcon?P(t.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.props.menuClassName},t)},e}(O.a),vt=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.initProps=function(t){t.active=this.isActive(t)},e.prototype.view=function(){var e=t.prototype.view.call(this);return e.tag=m.route.Link,e.attrs.active=String(e.attrs.active),e},e.isActive=function(t){return void 0!==t.active?t.active:m.route.get()===t.href},e}(Z),gt=function(t){function e(){return t.apply(this,arguments)||this}i(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right"};var n=e.prototype;return n.view=function(){return this.props.children=this.items().toArray(),t.prototype.view.call(this)},n.getButtonContent=function(){var t=app.session.user;return[ht(t)," ",m("span",{className:"Button-label"},v(t))]},n.items=function(){var t=new S,e=app.session.user;return t.add("profile",vt.component({icon:"fas fa-user",children:app.translator.trans("core.forum.header.profile_button"),href:app.route.user(e)}),100),t.add("settings",vt.component({icon:"fas fa-cog",children:app.translator.trans("core.forum.header.settings_button"),href:app.route("settings")}),50),app.forum.attribute("adminUrl")&&t.add("administration",vt.component({icon:"fas fa-wrench",children:app.translator.trans("core.forum.header.admin_button"),href:app.forum.attribute("adminUrl"),target:"_blank"}),0),t.add("separator",G.component(),-90),t.add("logOut",Z.component({icon:"fas fa-sign-out-alt",children:app.translator.trans("core.forum.header.log_out_button"),onclick:app.session.logout.bind(app.session)}),-100),t},e}(mt),yt=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.initProps=function(e){e.caretIcon=void 0!==e.caretIcon?e.caretIcon:"fas fa-sort",t.initProps.call(this,e),e.className+=" Dropdown--select"},e.prototype.getButtonContent=function(){var t=this.props.children.filter((function(t){return t.attrs.active}))[0],e=t&&t.attrs.children||this.props.defaultLabel;return e instanceof Array&&(e=e[0]),[m("span",{className:"Button-label"},e),P(this.props.caretIcon,{className:"Button-caret"})]},e}(mt),bt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e.moreResults=!1,e.$scrollParent=void 0,e.scrollHandler=void 0,e}i(e,t);var n=e.prototype;return n.view=function(){var t=app.cache.notifications||[];return m("div",{className:"NotificationList"},m("div",{className:"NotificationList-header"},m("div",{className:"App-primaryControl"},Z.component({className:"Button Button--icon Button--link",icon:"fas fa-check",title:app.translator.transText("core.forum.notifications.mark_all_as_read_tooltip"),onclick:this.markAllAsRead.bind(this)})),m("h4",{className:"App-titleControl App-titleControl--text"},app.translator.trans("core.forum.notifications.title"))),m("div",{className:"NotificationList-content"},t.length?t.map((function(t){var e=[],n={};return t.forEach((function(t){var r=t.subject();if(void 0!==r){var i=!1;r instanceof j?i=r:r&&r.discussion&&(i=r.discussion());var o=i?i.id():0;n[o]=n[o]||{discussion:i,notifications:[]},n[o].notifications.push(t),-1===e.indexOf(n[o])&&e.push(n[o])}})),e.map((function(t){var e,n=null===(e=t.discussion)||void 0===e?void 0:e.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m(m.route.Link,{className:"NotificationGroup-header",href:app.route.discussion(t.discussion)},n&&n.length?m("ul",{className:"NotificationGroup-badges badges"},X(n)):"",t.discussion.title()):m("div",{className:"NotificationGroup-header"},app.forum.attribute("title")),m("ul",{className:"NotificationGroup-content"},t.notifications.map((function(t){var e=app.notificationComponents[t.contentType()];return e?m("li",null,e.component({notification:t})):""}))))}))})):"",this.loading?m(K,{className:"LoadingIndicator--block"}):t.length?"":m("div",{className:"NotificationList-empty"},app.translator.trans("core.forum.notifications.empty_text"))))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e);var r=this.$(".NotificationList-content"),i=this.$scrollParent="auto"===r.css("overflow")?r:$(window);this.scrollHandler=function(){var t=i.scrollTop(),e=i.height(),o=i===r?0:r.offset().top,s=r[0].scrollHeight;n.moreResults&&!n.loading&&t+e>=o+s&&n.loadMore()},i.on("scroll",this.scrollHandler),this.load()},n.onremove=function(e){t.prototype.onremove.call(this,e),this.$scrollParent.off("scroll",this.scrollHandler)},n.load=function(){app.session.user.newNotificationCount()&&delete app.cache.notifications,app.cache.notifications||(app.session.user.pushAttributes({newNotificationCount:0}),this.loadMore())},n.loadMore=function(){var t=this;this.loading=!0,m.redraw();var e=app.cache.notifications?{page:{offset:10*app.cache.notifications.length}}:null;return app.store.find("notifications",e).then(this.parseResults.bind(this)).catch((function(){})).then((function(){t.loading=!1,m.redraw()}))},n.parseResults=function(t){return app.cache.notifications=app.cache.notifications||[],t.length&&app.cache.notifications.push(t),this.moreResults=!!t.payload.links.next,t},n.markAllAsRead=function(){app.cache.notifications&&(app.session.user.pushAttributes({unreadNotificationCount:0}),app.cache.notifications.forEach((function(t){t.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),app.request({url:app.forum.attribute("apiUrl")+"/notifications/read",method:"POST"}))},e}(O.a),wt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).list=m(bt,null),e}i(e,t),e.initProps=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||app.translator.transText("core.forum.notifications.tooltip"),e.icon=e.icon||"fas fa-bell",t.initProps.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.props.label,n.attrs.className+=e?" new":"",n.attrs.onclick=this.onclick.bind(this),n},n.getButtonContent=function(){var t=this.getUnreadCount();return[P(this.props.icon,{className:"Button-icon"}),t?m("span",{className:"NotificationsDropdown-unread"},t):"",m("span",{className:"Button-label"},this.props.label)]},n.getMenu=function(){return m("div",{className:"Dropdown-menu "+this.props.menuClassName,onclick:this.menuClick.bind(this)},this.showing&&this.list)},n.onclick=function(){app.drawer.isOpen()&&this.goToRoute()},n.goToRoute=function(){m.route.set(app.route("notifications"))},n.getUnreadCount=function(){return app.session.user.unreadNotificationCount()},n.getNewCount=function(){return app.session.user.newNotificationCount()},n.menuClick=function(t){(t.shiftKey||t.metaKey||t.ctrlKey||2===t.which)&&t.stopPropagation()},e}(mt),xt=function(){function t(){this.callbacks={},this.whenCallback=function(){return!0}}var e=t.prototype;return e.onUp=function(t){return this.callbacks[38]=function(e){e.preventDefault(),t(e)},this},e.onDown=function(t){return this.callbacks[40]=function(e){e.preventDefault(),t(e)},this},e.onSelect=function(t){return this.callbacks[9]=this.callbacks[13]=function(e){e.preventDefault(),t(e)},this},e.onCancel=function(t){return this.callbacks[27]=function(e){e.stopPropagation(),e.preventDefault(),t(e)},this},e.onRemove=function(t){return this.callbacks[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[t.which];e&&e(t)}},t}();function Nt(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(e,"gi"),i=t,o=0;return n&&(e&&(o=Math.max(0,t.search(r)-n/2)),i=function(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}(i,n,o)),i=$("<div/>").text(i).html(),e&&(i=i.replace(r,"<mark>$&</mark>")),m.trust(i)}var kt=function(){},Tt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).results={},e}i(e,t);var n=e.prototype;return n.search=function(t){var e=this;t=t.toLowerCase(),this.results[t]=[];var n={filter:{q:t},page:{limit:3},include:"mostRelevantPost"};return app.store.find("discussions",n).then((function(n){return e.results[t]=n}))},n.view=function(t){t=t.toLowerCase();var e=this.results[t]||[];return[m("li",{className:"Dropdown-header"},app.translator.trans("core.forum.search.discussions_heading")),m("li",null,vt.component({icon:"fas fa-search",children:app.translator.trans("core.forum.search.all_discussions_button",{query:t}),href:app.route("index",{q:t})})),e.map((function(e){var n=e.mostRelevantPost();return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+e.id()},m(m.route.Link,{href:app.route.discussion(e,n&&n.number())},m("div",{className:"DiscussionSearchResult-title"},Nt(e.title(),t)),n?m("div",{className:"DiscussionSearchResult-excerpt"},Nt(n.contentPlain(),t,100)):""))}))]},e}(kt),Et=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).results={},e}i(e,t);var n=e.prototype;return n.search=function(t){var e=this;return app.store.find("users",{filter:{q:t},page:{limit:5}}).then((function(n){e.results[t]=n,m.redraw()}))},n.view=function(t){t=t.toLowerCase();var e=(this.results[t]||[]).concat(app.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"},app.translator.trans("core.forum.search.users_heading")),e.map((function(e){var n=v(e);return n.children||(n.children=[n.text],delete n.text),n.children[0]=Nt(n.children[0],t),m("li",{className:"UserSearchResult","data-index":"users"+e.id()},m(m.route.Link,{href:app.route.user(e)},ht(e),n))}))]:""},e}(kt),_t=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).value=m.prop(""),e.hasFocus=!1,e.sources=null,e.loadingSources=0,e.searched=[],e.index=0,e.navigator=void 0,e.searchTimeout=void 0,e}i(e,t);var n=e.prototype;return n.view=function(){var t=this,e=this.getCurrentSearch();return void 0===this.value()&&this.value(e||""),this.sources||(this.sources=this.sourceItems().toArray()),this.sources.length?m("div",{className:classNames("Search",this.value()&&this.hasFocus&&"open",this.hasFocus&&"focused",!!e&&"active",!!this.loadingSources&&"loading")},m("div",{className:"Search-input"},m("input",{className:"FormControl",type:"search",placeholder:app.translator.transText("core.forum.header.search_placeholder"),value:this.value(),oninput:m.withAttr("value",this.value),onfocus:function(){return t.hasFocus=!0},onblur:function(){return t.hasFocus=!1}}),this.loadingSources?K.component({size:"tiny",className:"Button Button--icon Button--link"}):e?m("button",{className:"Search-clear Button Button--icon Button--link",onclick:this.clear.bind(this)},P("fas fa-times-circle")):""),m("ul",{className:"Dropdown-menu Search-results"},this.value()&&this.hasFocus?this.sources.map((function(e){return e.view(t.value())})):"")):m("div",null)},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.setIndex(this.getCurrentNumericIndex());var r=this;this.$(".Search-results").on("mousedown",(function(t){return t.preventDefault()})).on("click",(function(){return n.$("input").blur()})).on("mouseenter","> li:not(.Dropdown-header)",(function(){r.setIndex(r.selectableItems().index(this))}));var i=this.$("input");this.navigator=new xt,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(i),i.on("input focus",(function(){var t=this.value.toLowerCase();t&&(clearTimeout(r.searchTimeout),r.searchTimeout=setTimeout((function(){-1===r.searched.indexOf(t)&&(t.length>=3&&r.sources.map((function(e){e.search&&(r.loadingSources++,e.search(t).then((function(){r.loadingSources=Math.max(0,r.loadingSources-1),m.redraw()})))})),r.searched.push(t),m.redraw())}),250))})).on("focus",(function(){$(this).one("mouseup",(function(t){return t.preventDefault()})).select()}))},n.getCurrentSearch=function(){return app.current&&"function"==typeof app.current.searching&&app.current.searching()},n.selectResult=function(){clearTimeout(this.searchTimeout),this.loadingSources=0,this.value()?m.route.set(this.getItem(this.index).find("a").attr("href")):this.clear(),this.$("input").blur()},n.clear=function(){this.value(""),this.getCurrentSearch()?app.current.clearSearch():m.redraw()},n.sourceItems=function(){var t=new S;return app.forum.attribute("canViewDiscussions")&&t.add("discussions",new Tt),app.forum.attribute("canViewUserList")&&t.add("users",new Et),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){var n=this.selectableItems(),r=n.parent(),i=t;t<0?i=n.length-1:t>=n.length&&(i=0);var o=n.removeClass("active").eq(i).addClass("active");if(this.index=o.attr("data-index")||i,e){var s,a=r.scrollTop(),c=r.offset().top,u=c+r.outerHeight(),l=o.offset().top,f=l+o.outerHeight();l<c?s=a-c+l-parseInt(r.css("padding-top"),10):f>u&&(s=a-u+f+parseInt(r.css("padding-bottom"),10)),void 0!==s&&r.animate({scrollTop:s},100)}},e}(O.a),Ct=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},X(this.items().toArray()))},n.items=function(){var t=new S;if(t.add("search",_t.component(),30),app.forum.attribute("showLanguageSelector")&&Object.keys(app.data.locales).length>1){var e=[],n=function(t){if(!app.data.locales.hasOwnProperty(t))return"continue";e.push(Z.component({active:app.data.locale===t,children:app.data.locales[t],icon:app.data.locale!==t||"fas fa-check",onclick:function(){app.session.user?app.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())}}))};for(var r in app.data.locales)n(r);t.add("locale",yt.component({children:e,buttonClassName:"Button Button--link"}),20)}return app.session.user?(t.add("notifications",m(wt,null),10),t.add("session",m(gt,null),0)):(app.forum.attribute("allowSignUp")&&t.add("signUp",Z.component({children:app.translator.trans("core.forum.header.sign_up_link"),className:"Button Button--link",onclick:function(){return app.modal.show(new SignUpModal)}}),10),t.add("logIn",Z.component({children:app.translator.trans("core.forum.header.log_in_link"),className:"Button Button--link",onclick:function(){return app.modal.show(new pt)}}),0)),t},e}(O.a),St=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n.oninit=function(){console.log("IndexPage#oninit")},n.view=function(){return m("div",{class:"container"},m("h1",null,"hi"))},e}(O.a),Ot=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).bodyClass="",e}i(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.bodyClass&&$("#app").addClass(this.bodyClass)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),app.previous=app.current,app.current=this,app.drawer.hide(),app.modal.close()},n.onremove=function(e){t.prototype.onremove.call(this,e),$("#app").removeClass(this.bodyClass)},e}(O.a),Pt=function(t){function e(){return t.apply(this,arguments)||this}i(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"},X(this.items().toArray()))))},n.items=function(){var t=new S,e=this.props.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},X(n)),10),t.add("title",m("h2",{className:"DiscussionHero-title"},e.title())),t},e}(O.a);function At(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var jt=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},Mt=function(){function t(t){this.ticking=!1,this.callback=void 0,this.active=void 0,this.callback=t}var e=t.prototype;return e.loop=function(){var t=this;this.ticking||(jt((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))},e.stop=function(){window.removeEventListener("scroll",this.active),this.active=null},t}(),Dt=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},ht(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}(O.a);function $t(t,e){var n=$(window),r=$(t);if(!t||!r.length)return e();var i=r.offset().top-n.scrollTop();e(),n.scrollTop(r.offset().top-i)}var It={controls:function(t,e){var n=this,r=new S;return["user","moderation","destructive"].forEach((function(i){var o=n[i](t,e).toArray();o.length&&(o.forEach((function(t){return r.add(t.itemName,t)})),r.add(i+"Separator",G.component()))})),r},user:function(t,e){var n=new S;return e instanceof Yt&&n.add("reply",!app.session.user||t.canReply()?Z.component({icon:"fas fa-reply",children:app.translator.trans(app.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button"),onclick:this.replyAction.bind(t,!0,!1)}):Z.component({icon:"fas fa-reply",children:app.translator.trans("core.forum.discussion_controls.cannot_reply_button"),className:"disabled",title:app.translator.trans("core.forum.discussion_controls.cannot_reply_text")})),n},moderation:function(t){var e=new S;return t.canRename()&&e.add("rename",Z.component({icon:"fas fa-pencil-alt",children:app.translator.trans("core.forum.discussion_controls.rename_button"),onclick:this.renameAction.bind(t)})),e},destructive:function(t){var e=new S;return t.isHidden()?(t.canHide()&&e.add("restore",Z.component({icon:"fas fa-reply",children:app.translator.trans("core.forum.discussion_controls.restore_button"),onclick:this.restoreAction.bind(t)})),t.canDelete()&&e.add("delete",Z.component({icon:"fas fa-times",children:app.translator.trans("core.forum.discussion_controls.delete_forever_button"),onclick:this.deleteAction.bind(t)}))):t.canHide()&&e.add("hide",Z.component({icon:"far fa-trash-alt",children:app.translator.trans("core.forum.discussion_controls.delete_button"),onclick:this.hideAction.bind(t)})),e},replyAction:function(t,e){var n=this;return new Promise((function(r,i){if(app.session.user){if(n.canReply()){var o=app.composer.component;return app.composingReplyTo(n)&&!e||(o=new ReplyComposer({user:app.session.user,discussion:n}),app.composer.load(o)),app.composer.show(),t&&app.viewingDiscussion(n)&&!app.composer.isFullScreen()&&app.current.stream.goToNumber("reply"),r(o)}return i()}app.modal.show(new pt),i()}))},hideAction:function(){return this.pushAttributes({hiddenAt:new Date,hiddenUser:app.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(h(app.translator.trans("core.forum.discussion_controls.delete_confirmation"))))return app.viewingDiscussion(this)&&app.history.back(),this.delete().then((function(){app.cache.discussionList&&(app.cache.discussionList.removeDiscussion(t),m.redraw())}))},renameAction:function(){return app.modal.show(new RenameDiscussionModal({currentTitle:this.title(),discussion:this}))}},Lt=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n.view=function(){var t=this;return m("article",{className:"Post ReplyPlaceholder",onclick:function(){return It.replyAction.call(t.props.discussion,!0)}},m("header",{className:"Post-header"},ht(app.session.user,{className:"PostUser-avatar"})," ",app.translator.trans("core.forum.post_stream.reply_placeholder")))},n.oncreatePreview=function(t){var e,n=setInterval((function(){if(app.composer.component){var n=app.composer.component.content();if(e!==n){e=n;var r=$(window).scrollTop()+$(window).height()>=$(document).height();s9e.TextFormatter.preview(e||"",t.dom),r&&$(window).scrollTop($(document).height())}}}),50);t.attrs.onunload=function(){return clearInterval(n)}},e}(O.a),Rt=function(){function t(){this.handlers={}}var e=t.prototype;return e.getHandlers=function(t){return this.handlers=this.handlers||{},this.handlers[t]=this.handlers[t]||[],this.handlers[t]},e.trigger=function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return this.getHandlers(t).forEach((function(t){return t.apply(e,r)})),this},e.on=function(t,e){return this.getHandlers(t).push(e),this},e.one=function(t,e){return this.getHandlers(t).push((function n(){e.apply(this,Array.from(arguments)),this.off(t,n)})),this},e.off=function(t,e){var n=this.getHandlers(t),r=n.indexOf(e);return-1!==r&&n.splice(r,1),this},t}(),Bt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).discussion=void 0,e.paused=!1,e.scrollListener=new Mt(e.onscroll.bind(At(e))),e.loadPageTimeouts={},e.pagesLoading=0,e.calculatePositionTimeout=0,e.visibleStart=0,e.visibleEnd=0,e.viewingEnd=!0,e.discussion=e.props.discussion,e}i(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.props.discussion,this.show(this.props.includedPosts)},n.goToNumber=function(t,e){var n=this;if("reply"===t)return this.goToLast().then((function(){$("html,body").animate({scrollTop:$(document).height()-$(window).height()},"fast",(function(){n.flashItem(n.$(".PostStream-item:last-child"))}))}));this.paused=!0;var r=this.loadNearNumber(t);return m.redraw(),r.then((function(){m.redraw(),n.scrollToNumber(t,e).then(n.unpause.bind(n))}))},n.goToIndex=function(t,e,n){var r=this;return this.paused=!0,this.loadNearIndex(t).then((function(){return m.redraw.sync(),$t(r.$(".PostStream-item:"+(e?"last":"first")),(function(){return m.redraw()})),r.scrollToIndex(t,n,e).then(r.unpause.bind(r))}))},n.goToFirst=function(){return this.goToIndex(0)},n.goToLast=function(){return this.goToIndex(this.count()-1,!0)},n.update=function(){return this.viewingEnd?(this.visibleEnd=this.count(),this.loadRange(this.visibleStart,this.visibleEnd).then((function(){return m.redraw()}))):Promise.resolve()},n.count=function(){return this.discussion.postIds().length},n.sanitizeIndex=function(t){return Math.max(0,Math.min(this.count(),t))},n.show=function(t){this.visibleStart=t.length?this.discussion.postIds().indexOf(t[0].id()):0,this.visibleEnd=this.visibleStart+t.length},n.reset=function(t,e){this.visibleStart=t||0,this.visibleEnd=this.sanitizeIndex(e||this.constructor.loadCount)},n.posts=function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map((function(t){var e=app.store.getById("posts",t);return e&&e.discussion()&&void 0!==e.canEdit()?e:null}))},n.view=function(){var t,e=this;function n(t){t.state.fadedIn||$(t.dom).hide().fadeIn(),t.state.fadedIn=!0}this.visibleEnd=this.sanitizeIndex(this.visibleEnd),this.viewingEnd=this.visibleEnd===this.count();var r=this.posts(),i=this.discussion.postIds(),s=r.map((function(r,s){var a,c={"data-index":e.visibleStart+s};if(r){var u=r.createdAt(),l=app.postComponents[r.contentType()];a=l?m(l,{post:r}):"",c.key="post"+r.id(),c.oncreate=n,c["data-time"]=u.toISOString(),c["data-number"]=r.number(),c["data-id"]=r.id(),c["data-type"]=r.contentType(),u.valueOf()-t>3456e5&&(a=[m("div",{className:"PostStream-timeGap"},m("span",null,app.translator.trans("core.forum.post_stream.time_lapsed_text",{period:dayjs(u).from(dayjs(t,!0))}))),a]),t=u}else c.key="post"+i[e.visibleStart+s],a=m(Dt,null);return m("div",Object(o.a)({className:"PostStream-item"},c),a)}));return!this.viewingEnd&&r[this.visibleEnd-this.visibleStart-1]&&s.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(Z,{className:"Button",onclick:this.loadNext.bind(this)},app.translator.trans("core.forum.post_stream.load_more_button")))),!this.viewingEnd||app.session.user&&!this.discussion.canReply()||s.push(m("div",{className:"PostStream-item",key:"reply"},Lt.component({discussion:this.discussion}))),m("div",{className:"PostStream"},s)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.scrollListener.start()},n.onremove=function(e){t.prototype.onremove.call(this,e),this.scrollListener.stop(),clearTimeout(this.calculatePositionTimeout)},n.onscroll=function(t){if(!this.paused){var e=this.getMarginTop(),n=$(window).height()-e,r=t+e;if(this.visibleStart>0){var i=this.$('.PostStream-item[data-index="'+this.visibleStart+'"]');i.length&&i.offset().top>r-300&&this.loadPrevious()}if(this.visibleEnd<this.count()){var o=this.$(".PostStream-item[data-index="+(this.visibleEnd-1)+"]");o.length&&o.offset().top+o.outerHeight(!0)<r+n+300&&this.loadNext()}clearTimeout(this.calculatePositionTimeout),this.calculatePositionTimeout=setTimeout(this.calculatePosition.bind(this),100)}},n.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)},n.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)},n.loadPage=function(t,e,n){var r=this,i=function(){t<r.visibleStart||e>r.visibleEnd||($t('.PostStream-item[data-index="'+(n?r.visibleEnd-1:r.visibleStart)+'"]',(function(){return m.redraw(!0)})),r.unpause())};i(),this.loadPageTimeouts[t]=setTimeout((function(){r.loadRange(t,e).then((function(){i(),r.pagesLoading--})),r.loadPageTimeouts[t]=null}),this.pagesLoading?1e3:0),this.pagesLoading++},n.loadRange=function(t,e){var n=[],r=[];return this.discussion.postIds().slice(t,e).forEach((function(t){var e=app.store.getById("posts",t);e&&e.discussion()&&void 0!==e.canEdit()?r.push(e):n.push(t)})),n.length?app.store.find("posts",n):Promise.resolve(r)},n.loadNearNumber=function(t){return this.posts().some((function(e){return e&&Number(e.number())===Number(t)}))?Promise.resolve():(this.reset(),app.store.find("posts",{filter:{discussion:this.discussion.id()},page:{near:t}}).then(this.show.bind(this)))},n.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))},n.calculatePosition=function(){var t,e,n=this.getMarginTop(),r=$(window),i=r.height()-n,o=r.scrollTop()+n;this.$(".PostStream-item").each((function(n,r){var s=$(r),a=s.offset().top,c=s.outerHeight(!0);if(a+c>o){if(t||(t=e=s.data("number")),!(a+c<o+i))return!1;s.data("number")&&(e=s.data("number"))}return!0})),t&&this.trigger("positionChanged",t||1,e)},n.getMarginTop=function(){return this.$()&&$("#header").outerHeight()+parseInt(this.$().css("margin-top"),10)},n.scrollToNumber=function(t,e){var n=this,r=this.$('.PostStream-item[data-number="'+t+'"]');return this.scrollToItem(r,e).then((function(){return n.flashItem(r)}))},n.scrollToIndex=function(t,e,n){var r=this.$('.PostStream-item[data-index="'+t+'"]');return this.scrollToItem(r,e,!0,n)},n.scrollToItem=function(t,e,n,r){var i=$("html, body");if(t.length){var o=t.offset().top-this.getMarginTop(),s=t.offset().top+t.height(),a=i.scrollTop(),c=a+$(window).height();if(n||o<a||s>c){var u=r?s-$(window).height():t.is(":first-child")?0:o;return new Promise((function(t){e?(i.scrollTop(u),t()):u!==a?i.animatedScrollTop(u,"fast",t):t()}))}}return Promise.resolve()},n.flashItem=function(t){t.addClass("flash").one("animationend webkitAnimationEnd",(function(){return t.removeClass("flash")}))},n.unpause=function(){this.paused=!1,this.scrollListener.update(),this.trigger("unpaused")},e}(O.a);Bt.loadCount=20,Object(o.a)(Bt.prototype,Rt.prototype);var Ht=Bt,Ut=function(){function t(){this.callbacks=void 0,this.data={};for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=e}var e=t.prototype;return e.check=function(){var t;(t=this.callbacks).push.apply(t,arguments)},e.update=function(){var t=this,e=!1;return this.callbacks.forEach((function(n,r){var i=n();i!==t.data[r]&&(t.data[r]=i,e=!0)})),e},t}();function Ft(t,e){void 0===e&&(e={});var n="number"==typeof e?{maximumSignificantDigits:e}:e;return t.toLocaleString(app.translator.locale,n)}var zt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).handlers={},e.index=0,e.visible=1,e.description="",e.scrollListener=new Mt(e.onscroll.bind(At(e))),e.subtree=new Ut((function(){return!0})),e.dragging=!1,e.mouseStart=0,e.indexStart=0,e.stream=void 0,e}i(e,t);var n=e.prototype;return n.view=function(){var t,e=this,n=this.count(),r=(null===(t=this.stream)||void 0===t?void 0:t.discussion.unreadCount())||0,i=n?Math.min(n-this.index,r)/n:0,o=app.translator.transChoice("core.forum.post_scrubber.viewing_text",n,{index:m("span",{className:"Scrubber-index",onbeforeupdate:function(){return e.subtree.update()}},Ft(Math.min(Math.ceil(this.index+this.visible),n))),count:m("span",{className:"Scrubber-count"},Ft(n))});return m("div",{className:"PostStreamScrubber Dropdown "+(this.disabled()?"disabled ":"")+(this.props.className||"")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},o," ",P("fas fa-sort")),m("div",{className:"Dropdown-menu dropdown-menu"},m("div",{className:"Scrubber"},m("a",{className:"Scrubber-first",onclick:this.goToFirst.bind(this)},P("fas fa-angle-double-up")," ",app.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,o),m("span",{className:"Scrubber-description",onbeforeupdate:function(){return e.subtree.update()}},this.description))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",oncreate:function(t){var e=$(t.dom),n={top:100-100*i+"%",height:100*i+"%",display:0==r&&"none"};t.state.oldStyle?e.css(t.state.oldStyle).animate(n):e.css(n),t.state.oldStyle=n}},app.translator.trans("core.forum.post_scrubber.unread_text",{count:r}))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},P("fas fa-angle-double-down")," ",app.translator.trans("core.forum.post_scrubber.now_link")))))},n.goToFirst=function(){this.stream.goToFirst(),this.index=0,this.renderScrollbar(!0)},n.goToLast=function(){this.stream.goToLast(),this.index=this.count(),this.renderScrollbar(!0)},n.count=function(){var t;return(null===(t=this.stream)||void 0===t?void 0:t.count())||0},n.streamWasUnpaused=function(){this.update(window.pageYOffset),this.renderScrollbar(!0)},n.disabled=function(){return this.visible>=this.count()},n.onscroll=function(t){var e=this.stream;e&&!e.paused&&e.$()&&(this.update(t),this.renderScrollbar())},n.update=function(t){var e=this.stream,n=e.getMarginTop(),r=t+n,i=$(window).height()-n,o=e.$(".PostStream-item[data-index]"),s=o.first().data("index")||0,a=0,c="";o.each((function(){var t=$(this),e=t.offset().top,n=t.outerHeight(!0);if(e+n<r)return!0;if(e>r+i)return!1;var o=Math.max(0,r-e),u=Math.min(n,r+i-e)-o;e<=r&&(s=parseFloat(t.data("index"))+o/n),u>0&&(a+=u/n);var l=t.data("time");l&&(c=l)})),this.index=s,this.visible=a,this.description=c?dayjs(c).format("MMMM YYYY"):""},n.onremove=function(e){t.prototype.onremove.call(this,e),this.ondestroy()},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.stream.on("unpaused",this.handlers.streamWasUnpaused=this.streamWasUnpaused.bind(this)),this.stream.on("update",(function(){return n.update()})),this.scrollListener.start(),$(window).on("resize",this.handlers.onresize=this.onresize.bind(this)).resize(),this.$(".Scrubber-scrollbar").on("click",this.onclick.bind(this)).css({cursor:"pointer","user-select":"none"}).on("dragstart mousedown touchstart",(function(t){return t.preventDefault()})),this.$(".Scrubber-handle").css("cursor","move").on("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))},n.ondestroy=function(){this.scrollListener.stop(),this.stream.off("unpaused",this.handlers.streamWasUnpaused),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove touchmove",this.handlers.onmousemove).off("mouseup touchend",this.handlers.onmouseup)},n.renderScrollbar=function(t){var e=this.percentPerPost(),n=this.index,r=this.count(),i=this.visible||1,o=this.$();o.find(".Scrubber-index").text(Ft(Math.min(Math.ceil(n+i),r))),o.find(".Scrubber-description").text(this.description),o.toggleClass("disabled",this.disabled());var s={};s.before=Math.max(0,e.index*Math.min(n,r-i)),s.handle=Math.min(100-s.before,e.visible*i),s.after=100-s.before-s.handle;var a=t?"animate":"css";for(var c in s){var u=o.find(".Scrubber-"+c);u[a]({height:s[c]+"%"},"fast"),"animate"===a&&u.css("overflow","visible")}},n.percentPerPost=function(){var t=this.count()||1,e=this.visible||1,n=50/this.$(".Scrubber-scrollbar").outerHeight()*100,r=Math.max(100/t,n/e),i=t===e?0:(100-r*e)/(t-e);return{index:i,visible:r}},n.onresize=function(){this.scrollListener.update();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){this.mouseStart=t.clientY||t.originalEvent.touches[0].clientY,this.indexStart=this.index,this.dragging=!0,this.stream.paused=!0,$("body").css("cursor","move")},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.count()-1);this.index=Math.max(0,n),this.renderScrollbar()}},n.onmouseup=function(){if(this.dragging){this.mouseStart=0,this.indexStart=0,this.dragging=!1,$("body").css("cursor",""),this.$().removeClass("open");var t=Math.floor(this.index);this.stream.goToIndex(t),this.renderScrollbar(!0)}},n.onclick=function(t){var e=this.$(".Scrubber-scrollbar"),n=((t.clientY||t.originalEvent.touches[0].clientY)-e.offset().top+$("body").scrollTop())/e.outerHeight()*100,r=(n-=parseFloat(e.find(".Scrubber-handle")[0].style.height)/2)/this.percentPerPost().index;r=Math.max(0,Math.min(this.count()-1,r)),this.stream.goToIndex(Math.floor(r)),this.index=r,this.renderScrollbar(!0),this.$().removeClass("open")},e}(O.a),qt=function(t){function e(){return t.apply(this,arguments)||this}i(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className+=" Dropdown--split",e.menuClassName+=" Dropdown-menu--right"};var n=e.prototype;return n.getButton=function(){var t=this.getFirstChild(),e=Object(o.a)({},t.attrs);return e.className=classNames(e.className,"SplitDropdown-button","Button",this.props.buttonClassName),[Z.component(e),m("button",{className:"Dropdown-toggle Button Button--icon "+this.props.buttonClassName,"data-toggle":"dropdown"},P(this.props.icon,{className:"Button-icon"}),P("fas fa-caret-down",{className:"Button-caret"}))]},n.getFirstChild=function(){for(var t=this.props.children;t instanceof Array;)t=t[0];return t},e}(mt),Yt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).discussion=void 0,e.near=void 0,e.stream=void 0,e.scrubber=void 0,e.includedPosts=[],e}i(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.refresh(),app.cache.discussionList,app.history.push("discussion"),this.bodyClass="App--discussion"},n.onbeforeremove=function(e){if(t.prototype.onbeforeremove.call(this,e),this.discussion){var n=m.route.param("id");if(n&&n.split("-")[0]===this.discussion.id()){var r=m.route.param("near")||"1";return r!==String(this.near)&&this.stream.goToNumber(r),this.near=null,!1}}},n.view=function(){var t=this,e=this.discussion,n=m(Ht,{discussion:e,includedPosts:this.includedPosts,oninit:function(e){t.stream=e.state,t.scrubber.stream=e.state,t.stream.on("positionChanged",t.positionChanged.bind(t)),t.stream.goToNumber(m.route.param("near")||t.includedPosts[0]&&t.includedPosts[0].number(),!0)}});return m("div",{className:"DiscussionPage"},app.cache.discussionList?m("div",{className:"DiscussionPage-list",oncreate:this.oncreatePane.bind(this),onbeforeupdate:function(){return!1}},$(".App-navigation").is(":visible")?"":app.cache.discussionList.render()):"",m("div",{className:"DiscussionPage-discussion"},e?[Pt.component({discussion:e}),m("div",{className:"container"},m("nav",{className:"DiscussionPage-nav"},m("ul",null,X(this.sidebarItems().toArray()))),m("div",{className:"DiscussionPage-stream"},n))]:K.component({className:"LoadingIndicator--block"})))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.discussion&&app.setTitle(this.discussion.title())},n.refresh=function(){this.near=Number(m.route.param("near")||0),this.discussion=null;var t=app.preloadedApiDocument();if(t)setTimeout(this.show.bind(this,t),0);else{var e=this.requestParams();app.store.find("discussions",m.route.param("id").split("-")[0],e).then(this.show.bind(this))}m.redraw()},n.requestParams=function(){return{page:{near:this.near}}},n.show=function(t){if(this.discussion=t,app.history.push("discussion",t.title()),app.setTitleCount(0),t.payload&&t.payload.included){var e=t.id();this.includedPosts=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===e})).map((function(t){return app.store.getById("posts",t.id)})).sort((function(t,e){return t.id()-e.id()})).slice(0,20)}m.redraw()},n.oncreatePane=function(t){var e=$(t.dom),n=app.pane;e.hover(n.show.bind(n),n.onmouseleave.bind(n));var r=function(t){t.pageX<10&&n.show()};$(document).on("mousemove",r),t.dom.onunload=function(){return $(document).off("mousemove",r)};var i=e.find(".DiscussionListItem.active");if(i.length){var o=e.offset().top,s=o+e.outerHeight(),a=i.offset().top,c=a+i.outerHeight();(a<o||c>s)&&e.scrollTop(e.scrollTop()-o+a)}},n.sidebarItems=function(){var t=this,e=new S;return e.add("controls",qt.component({children:It.controls(this.discussion,this).toArray(),icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary"})),e.add("scrubber",m(zt,{oninit:function(e){return t.scrubber=e.state},className:"App-titleControl"}),-100),e},n.positionChanged=function(t,e){var n=this.discussion,r=app.route.discussion(n,this.near=t);m.route.set(r,!0),window.history.replaceState(null,document.title,r),app.history.push("discussion",n.title()),app.session.user&&e>(n.lastReadPostNumber()||0)&&(n.save({lastReadPostNumber:e}),m.redraw())},e}(Ot);function Wt(t){var e=t.dom,n=$(e),r=$("#header"),i=n.find("> ul")[0];$(window).off(".affix"),new hcSticky(i,{stickTo:e,top:r.outerHeight(!0)+parseInt(n.css("margin-top"),10)})}function Vt(t){var e=dayjs(t),n=dayjs();e.isAfter(n)&&(e=n);return e.diff(dayjs())<-2592e6?e.year()===dayjs().year()?e.format("D MMM"):e.format("MMM 'YY"):e.fromNow()}var Kt={controls:function(t,e){var n=this,r=new S;return["user","moderation","destructive"].forEach((function(i){var o=n[i+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return r.add(t.itemName,t)})),r.add(i+"Separator",G.component()))})),r},userControls:function(){return new S},moderationControls:function(t){var e=new S;return t.canEdit()&&e.add("edit",Z.component({icon:"fas fa-pencil-alt",children:app.translator.trans("core.forum.user_controls.edit_button"),onclick:this.editAction.bind(this,t)})),e},destructiveControls:function(t){var e=new S;return"1"!==t.id()&&t.canDelete()&&e.add("delete",Z.component({icon:"fas fa-times",children:app.translator.trans("core.forum.user_controls.delete_button"),onclick:this.deleteAction.bind(this,t)})),e},deleteAction:function(t){var e=this;confirm(app.translator.transText("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),app.current instanceof Jt&&app.current.user===t?app.history.back():window.location.reload()})).catch((function(){return e.showDeletionAlert(t,"error")}))},showDeletionAlert:function(t,e){var n=t.data.attributes,r=n.username,i=n.email,o="core.forum.user_controls.delete_"+e+"_message";app.alerts.show(it.component({type:e,children:app.translator.trans(o,{username:r,email:i})}))},editAction:function(t){app.modal.show(new EditUserModal({user:t}))}},Zt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e.isDraggedOver=!1,e}i(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className=e.className||""};var n=e.prototype;return n.view=function(){var t=this.props.user;return m("div",{className:"AvatarEditor Dropdown "+this.props.className+(this.loading?" loading":"")+(this.isDraggedOver?" dragover":"")},ht(t),m("a",{className:t.avatarUrl()?"Dropdown-toggle":"Dropdown-toggle AvatarEditor--noAvatar",title:app.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?K.component():t.avatarUrl()?P("fas fa-pencil-alt"):P("fas fa-plus-circle")),m("ul",{className:"Dropdown-menu Menu"},X(this.controlItems().toArray())))},n.controlItems=function(){var t=new S;return t.add("upload",Z.component({icon:"fas fa-upload",children:app.translator.trans("core.forum.user.avatar_upload_button"),onclick:this.openPicker.bind(this)})),t.add("remove",Z.component({icon:"fas fa-times",children:app.translator.trans("core.forum.user.avatar_remove_button"),onclick:this.remove.bind(this)})),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.props.user.avatarUrl()||(t.preventDefault(),t.stopPropagation(),this.openPicker())},n.openPicker=function(){var t=this;if(!this.loading){this.props.user;$('<input type="file">').appendTo("body").hide().click().on("change",(function(e){t.upload($(e.target)[0].files[0])}))}},n.upload=function(t){if(!this.loading){var e=this.props.user,n=new FormData;data.append("avatar",t),this.loading=!0,m.redraw(),app.request({method:"POST",url:app.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.props.user;this.loading=!0,m.redraw(),app.request({method:"DELETE",url:app.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){app.store.pushPayload(t),delete this.props.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(O.a),Gt=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n.view=function(){var t=this.props.user,e=Kt.controls(t,this).toArray(),n=t.color(),r=t.badges().toArray();return m("div",{className:"UserCard "+(this.props.className||""),style:n?{backgroundColor:n}:""},m("div",{className:"darkenBackground"},m("div",{className:"container"},e.length?mt.component({children:e,className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.props.controlsButtonClassName,label:app.translator.trans("core.forum.user_controls.button"),icon:"fas fa-ellipsis-v"}):"",m("div",{className:"UserCard-profile"},m("h2",{className:"UserCard-identity"},this.props.editable?[Zt.component({user:t,className:"UserCard-avatar"}),v(t)]:m(m.route.Link,{href:app.route.user(t)},m("div",{className:"UserCard-avatar"},ht(t)),v(t))),r.length?m("ul",{className:"UserCard-badges badges"},X(r)):"",m("ul",{className:"UserCard-info"},X(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new S,e=this.props.user,n=e.lastSeenAt();if(n){var r=e.isOnline();t.add("lastSeen",m("span",{className:"UserCard-lastSeen"+(r?" online":"")},r?[P("fas fa-circle")," ",app.translator.trans("core.forum.user.online_text")]:[P("far fa-clock")," ",Vt(n)]))}return t.add("joined",app.translator.trans("core.forum.user.joined_date_text",{ago:Vt(e.joinTime())})),t},e}(O.a),Jt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).user=void 0,e.bodyClass="App--user",e.username=void 0,e}i(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"UserPage"},this.user?[Gt.component({user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===app.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m("nav",{className:"sideNav UserPage-nav",config:Wt},m("ul",null,X(this.sidebarItems().toArray()))),m("div",{className:"sideNavOffset UserPage-content"},this.content())))]:[K.component({lassName:"LoadingIndicator--block"})])},n.show=function(t){this.user=t,app.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();app.preloadedApiDocument(),n!=this.username&&(this.username=n,app.store.all("users").some((function(r){if((r.username().toLowerCase()===n||r.id()===t)&&r.joinTime())return e.show(r),!0})),this.user||app.store.find("users",t).then(this.show.bind(this)))},n.sidebarItems=function(){var t=new S;return t.add("nav",yt.component({children:this.navItems().toArray(),className:"App-titleControl",buttonClassName:"Button"})),t},n.navItems=function(){var t=new S,e=this.user;return t.add("posts",vt.component({href:app.route("user.posts",{username:e.username()}),children:[app.translator.trans("core.forum.user.posts_link"),m("span",{className:"Button-badge"},e.commentCount())],icon:"far fa-comment"}),100),t.add("discussions",vt.component({href:app.route("user.discussions",{username:e.username()}),children:[app.translator.trans("core.forum.user.discussions_link"),m("span",{className:"Button-badge"},e.discussionCount())],icon:"fas fa-bars"}),90),app.session.user===e&&(t.add("separator",G.component(),-90),t.add("settings",vt.component({href:app.route("settings"),children:app.translator.trans("core.forum.user.settings_link"),icon:"fas fa-cog"}),-100)),t},e}(Ot),Xt=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.props.text))},e}(O.a),Qt={controls:function(t,e){var n=this,r=new S;return["user","moderation","destructive"].forEach((function(i){var o=n[i+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return r.add(t.itemName,t)})),r.add(i+"Separator",G.component()))})),r},userControls:function(t,e){return new S},moderationControls:function(t,e){var n=new S;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",Z.component({icon:"fas fa-pencil-alt",onclick:this.editAction.bind(t)},app.translator.trans("core.forum.post_controls.edit_button")))),n},destructiveControls:function(t,e){var n=new S;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",Z.component({icon:"fas fa-reply",children:app.translator.trans("core.forum.post_controls.restore_button"),onclick:this.restoreAction.bind(t)})),t.canDelete()&&n.add("delete",Z.component({icon:"fas fa-times",children:app.translator.trans("core.forum.post_controls.delete_forever_button"),onclick:this.deleteAction.bind(t,e)}))):t.canHide()&&n.add("hide",Z.component({icon:"far fa-trash-alt",children:app.translator.trans("core.forum.post_controls.delete_button"),onclick:this.hideAction.bind(t)})),n},editAction:function(){var t=this;return new Promise((function(e){var n=new EditPostComposer({post:t});app.composer.load(n),app.composer.show(),e(n)}))},hideAction:function(){return this.pushAttributes({hiddenAt:new Date,hiddenUser:app.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;return t&&(t.loading=!0),this.delete().then((function(){var t=e.discussion();t.removePost(e.id()),t.postIds().length||(app.cache.discussionList&&app.cache.discussionList.removeDiscussion(t),app.viewingDiscussion(t)&&app.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}},te=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e.controlsOpen=!1,e.subtree=new Ut((function(){return e.props.post.freshness}),(function(){var t=e.props.post.user();return null==t?void 0:t.freshness}),(function(){return e.controlsOpen})),e}i(e,t);var n=e.prototype;return n.view=function(){var t=this,e=Qt.controls(this.props.post,this).toArray(),n=this.attrs();return n.className=classNames(this.classes(n.className)),m("article",n,m("div",null,this.content(),m("aside",{className:"Post-actions"},m("ul",null,X(this.actionItems().toArray()),e.length?m("li",null,m(mt,{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")}},e)):"")),m("footer",{className:"Post-footer"},m("ul",null,X(this.footerItems().toArray())))))},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.update()},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n=this.$(".Post-actions"),r=this.$(".Post-controls");n.toggleClass("open",r.hasClass("open"))},n.attrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]);return this.loading&&e.push("Post--loading"),this.props.post.user()===app.session.user&&e.push("Post--by-actor"),e},n.actionItems=function(){return new S},n.footerItems=function(){return new S},e}(O.a);var ee=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).cardVisible=!1,e}i(e,t);var n=e.prototype;return n.view=function(){var t=this.props.post,e=t.user();if(!e)return m("div",{className:"PostUser"},m("h3",null,ht(e,{className:"PostUser-avatar"})," ",v(e)));var n="";return!t.isHidden()&&this.cardVisible&&(n=Gt.component({user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})),m("div",{className:"PostUser"},m("h3",null,m(m.route.Link,{href:app.route.user(e)},ht(e,{className:"PostUser-avatar"}),function(t){if(t.lastSeenAt()&&t.isOnline())return m("span",{className:"UserOnline"},P("fas fa-circle"))}(e),v(e))),m("ul",{className:"PostUser-badges badges"},X(e.badges().toArray())),n)},n.oncreate=function(e){var n,r=this;t.prototype.oncreate.call(this,e),this.$().on("mouseover","h3 a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.showCard.bind(r),500)})).on("mouseout","h3 a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.hideCard.bind(r),250)}))},n.showCard=function(){var t=this;this.cardVisible=!0,m.redraw(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.cardVisible=!1,m.redraw()}))},e}(O.a),ne=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).revealContent=!1,e.postUser=void 0,e}i(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.postUser=m(ee,{post:this.props.post}),this.subtree.check((function(){var t;return null===(t=n.postUser.state)||void 0===t?void 0:t.cardVisible}),(function(){return n.revealContent}),(function(){return n.isEditing()}))},n.content=function(){return t.prototype.content.call(this).concat([m("header",{className:"Post-header"},m("ul",null,X(this.headerItems().toArray()))),m("div",{className:"Post-body"},this.isEditing()?m("div",{className:"Post-preview",config:this.configPreview.bind(this)}):m.trust(this.props.post.contentHtml()))])},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=this.isEditing()?"":this.props.post.contentHtml();e.contentHtml!==n&&this.$(".Post-body script").each((function(){eval.call(window,$(this).text())})),e.contentHtml=n},n.isEditing=function(){return!1},n.attrs=function(){var e=this.props.post,n=t.prototype.attrs.call(this);return n.className=classNames(n.className,"CommentPost",e.isHidden()&&"Post--hidden",e.isEdited()&&"Post--edited",this.revealContent&&"revealContent",this.isEditing()&&"editing"),n},n.configPreview=function(t,e,n){if(!e){var r,i=function(){var e=app.composer.component.content();r!==e&&(r=e,s9e.TextFormatter.preview(r||"",t))};i();var o=setInterval(i,50);n.onunload=function(){return clearInterval(o)}}},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=new S,e=this.props.post,n={post:e};return t.add("user",m(ee,{post:this.props.post}),100),e.isEdited()&&!e.isHidden()&&t.add("edited",PostEdited.component(n)),e.isHidden()&&t.add("toggle",Z.component({className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),t},e}(te),re=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!0,e.moreResults=!1,e.posts=[],e.loadLimit=20,e}i(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(e.attrs.username)},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.loadUser(e.attrs.username)},n.content=function(){return 0!==this.posts.length||this.loading?(this.loading?t=K.component():this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},Z.component({children:app.translator.trans("core.forum.user.posts_load_more_button"),className:"Button",onclick:this.loadMore.bind(this)}))),m("div",{className:"PostsUserPage"},m("ul",{className:"PostsUserPage-list"},this.posts.map((function(t){return m("li",null,m("div",{className:"PostsUserPage-discussion"},app.translator.trans("core.forum.user.in_discussion_text",{discussion:m(m.route.Link,{href:app.route.post(t)},t.discussion().title())})),ne.component({post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(Xt,{text:app.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 app.store.find("posts",{filter:{user:this.user.id(),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}(Jt);function ie(t){var e=dayjs(t),n=e.format(),r=e.format("LLLL"),i=Vt(t);return m("time",{pubdate:!0,datetime:n,title:r,"data-humantime":!0},i)}var oe=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.prototype.view=function(){var t=this.props.discussion,e=this.props.lastPost&&t.replyCount(),n=t[e?"lastPostedUser":"user"](),r=t[e?"lastPostedAt":"createdAt"]();return m("span",null,e?P("fas fa-reply"):""," ",app.translator.trans("core.forum.discussion_list."+(e?"replied":"started")+"_text",{user:n,ago:ie(r)}))},e}(O.a),se=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).subtree=void 0,e.highlightRegExp=void 0,e}i(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.subtree=new Ut((function(){return n.props.discussion.freshness}),(function(){var t=app.session.user&&app.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return n.active()}))},n.attrs=function(){return{className:classNames("DiscussionListItem",this.active()&&"active",this.props.discussion.isHidden()&&"DiscussionListItem--hidden")}},n.view=function(){var t,e=this.props.discussion,n=e.user(),r=e.isUnread(),i=e.isRead(),o=!this.showRepliesCount()&&r,s=0,a=It.controls(e,this).toArray(),c=this.attrs();if(this.props.params.q){var u=e.mostRelevantPost();u&&(s=u.number());var l=this.props.params.q;this.highlightRegExp=new RegExp(l+"|"+l.trim().replace(/\s+/g,"|"),"gi")}else s=Math.min(e.lastPostNumber(),(e.lastReadPostNumber()||0)+1);return m("div",c,a.length?mt.component({icon:"fas fa-ellipsis-v",children:a,className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right"}):"",m("a",{className:"Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic"+(r?"":" disabled"),onclick:this.markAsRead.bind(this)},P("fas fa-check")),m("div",{className:classNames("DiscussionListItem-content","Slidable-content",r&&"unread",i&&"read")},m(vt,{href:n?app.route.user(n):"#",className:"DiscussionListItem-author",title:app.translator.transText("core.forum.discussion_list.started_text",{user:n,ago:Vt(e.createdAt())}),oncreate:function(t){return $(t.dom).tooltip({placement:"right"})}},ht(n,{title:""})),m("ul",{className:"DiscussionListItem-badges badges"},X(e.badges().toArray())),m(vt,{href:app.route.discussion(e,s),className:"DiscussionListItem-main"},m("h3",{className:"DiscussionListItem-title"},Nt(e.title(),this.highlightRegExp)),m("ul",{className:"DiscussionListItem-info"},X(this.infoItems().toArray()))),m("span",{className:"DiscussionListItem-count",onclick:this.markAsRead.bind(this),title:o?app.translator.trans("core.forum.discussion_list.mark_as_read_tooltip"):""},(t=e[o?"unreadCount":"replyCount"]())>=1e6?Math.floor(t/1e6)+app.translator.transText("core.lib.number_suffix.mega_text"):t>=1e3?Math.floor(t/1e3)+app.translator.transText("core.lib.number_suffix.kilo_text"):t.toString())))},n.oncreate=function(e){if(t.prototype.oncreate.call(this,e),"ontouchstart"in window){var n=slidable(this.$().addClass("Slidable"));this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return n.reset()}))}},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.update()},n.active=function(){var t=m.route.param("id");return t&&t.split("-")[0]===this.props.discussion.id()},n.showFirstPost=function(){return-1!==["newest","oldest"].indexOf(this.props.params.sort)},n.showRepliesCount=function(){return"replies"===this.props.params.sort},n.markAsRead=function(){var t=this.props.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new S;if(this.props.params.q){var e=this.props.discussion.mostRelevantPost()||this.props.discussion.firstPost();if(e&&"comment"===e.contentType()){var n=Nt(e.contentPlain(),this.highlightRegExp,175);t.add("excerpt",n,-100)}}else t.add("terminalPost",oe.component({discussion:this.props.discussion,lastPost:!this.showFirstPost()}));return t},e}(O.a),ae=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!0,e.moreResults=!1,e.discussions=[],e}i(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.refresh()},n.view=function(){var t,e=this.props.params;if(this.loading?t=K.component():this.moreResults&&(t=Z.component({children:app.translator.trans("core.forum.discussion_list.load_more_button"),className:"Button",onclick:this.loadMore.bind(this)})),0===this.discussions.length&&!this.loading){var n=app.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},Xt.component({text:n}))}return m("div",{className:"DiscussionList"+(this.props.params.q?" DiscussionList--searchResults":"")},m("ul",{className:"DiscussionList-discussions"},this.discussions.map((function(t){return m("li",{key:t.id(),"data-id":t.id()},se.component({discussion:t,params:e}))}))),m("div",{className:"DiscussionList-loadMore"},t))},n.requestParams=function(){var t={include:["user","lastPostedUser"],filter:{}};return t.sort=this.sortMap()[this.props.params.sort],this.props.params.q&&(t.filter.q=this.props.params.q,t.include.push("mostRelevantPost","mostRelevantPost.user")),t},n.sortMap=function(){var t={};return this.props.params.q&&(t.relevance=""),t.latest="-lastPostedAt",t.top="-commentCount",t.newest="-createdAt",t.oldest="createdAt",t},n.refresh=function(t){var e=this;return void 0===t&&(t=!0),t&&(this.loading=!0,this.discussions=[]),this.loadResults().then((function(t){e.discussions=[],e.parseResults(t)}),(function(){e.loading=!1,m.redraw()}))},n.loadResults=function(t){var e=app.preloadedApiDocument();if(e)return Promise.resolve(e);var n=this.requestParams();return n.page={offset:t},n.include=n.include.join(","),app.store.find("discussions",n)},n.loadMore=function(){this.loading=!0,this.loadResults(this.discussions.length).then(this.parseResults.bind(this))},n.parseResults=function(t){return[].push.apply(this.discussions,t),this.loading=!1,this.moreResults=!!t.payload.links.next,m.redraw(),t},n.removeDiscussion=function(t){var e=this.discussions.indexOf(t);-1!==e&&this.discussions.splice(e,1)},n.addDiscussion=function(t){this.discussions.unshift(t)},e}(O.a),ce=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.content=function(){return m("div",{className:"DiscussionsUserPage"},ae.component({params:{q:"author:"+this.user.username(),sort:"newest"}}))},e}(Jt),ue=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.prototype.view=function(){return m("fieldset",{className:this.props.className},m("legend",null,this.props.label),m("ul",null,X(this.props.children)))},e}(O.a),le=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e}i(e,t);var n=e.prototype;return n.view=function(){var t=classNames("Checkbox",this.props.className,this.props.state?"on":"off",this.loading&&"loading",this.props.disabled&&"disabled");return m("label",{className:t},m("input",{type:"checkbox",checked:this.props.state,disabled:this.props.disabled,onchange:m.withAttr("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display"},this.getDisplay()),this.props.children)},n.getDisplay=function(){return this.loading?K.component({size:"tiny"}):P(this.props.state?"fas fa-check":"fas fa-times")},n.onchange=function(t){this.props.onchange&&this.props.onchange(t,this)},e}(O.a),fe=function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className=(e.className||"")+" Checkbox--switch"},e.prototype.getDisplay=function(){return this.loading?t.prototype.getDisplay.call(this):""},e}(le),de=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).methods=e.notificationMethods().toArray(),e.inputs={},e.types=e.notificationTypes().toArray(),e}i(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.types.forEach((function(t){return n.methods.forEach((function(e){var r=n.preferenceKey(t.name,e.name),i=n.props.user.preferences()[r];n.inputs[r]=new le({state:!!i,disabled:void 0===i,onchange:function(){return n.toggle([r])}})}))}))},n.view=function(){var t=this;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)},P(e.icon)," ",e.label)})))),m("tbody",null,this.types.map((function(e){return m("tr",null,m("td",{className:"NotificationGrid-groupToggle",onclick:t.toggleType.bind(t,e.name)},P(e.icon)," ",e.label),t.methods.map((function(n){return m("td",{className:"NotificationGrid-checkbox"},t.inputs[t.preferenceKey(e.name,n.name)].render())})))}))))},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.props.user,r=n.preferences(),i=!r[t[0]];t.forEach((function(t){var n=e.inputs[t];n.loading=!0,n.props.state=i,r[t]=n.props.state=i})),m.redraw(),n.save({preferences:r}).then((function(){t.forEach((function(t){return e.inputs[t].loading=!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!e.inputs[t].props.disabled}));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!e.inputs[t].props.disabled}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new S;return t.add("alert",{name:"alert",icon:"fas fa-bell",label:app.translator.trans("core.forum.settings.notify_by_web_heading")}),t.add("email",{name:"email",icon:"far fa-envelope",label:app.translator.trans("core.forum.settings.notify_by_email_heading")}),t},n.notificationTypes=function(){var t=new S;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:app.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(O.a),pe=function(t){function e(){return t.apply(this,arguments)||this}i(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.show(app.session.user),app.setTitle(app.translator.transText("core.forum.settings.title"))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,X(this.settingsItems().toArray())))},n.settingsItems=function(){var t=new S;return t.add("account",ue.component({label:app.translator.trans("core.forum.settings.account_heading"),className:"Settings-account",children:this.accountItems().toArray()})),t.add("notifications",ue.component({label:app.translator.trans("core.forum.settings.notifications_heading"),className:"Settings-notifications",children:this.notificationsItems().toArray()})),t.add("privacy",ue.component({label:app.translator.trans("core.forum.settings.privacy_heading"),className:"Settings-privacy",children:this.privacyItems().toArray()})),t},n.accountItems=function(){var t=new S;return t.add("changePassword",Z.component({children:app.translator.trans("core.forum.settings.change_password_button"),className:"Button",onclick:function(){return app.modal.show(new ChangePasswordModal)}})),t.add("changeEmail",Z.component({children:app.translator.trans("core.forum.settings.change_email_button"),className:"Button",onclick:function(){return app.modal.show(new ChangeEmailModal)}})),t},n.notificationsItems=function(){var t=new S;return t.add("notificationGrid",de.component({user:this.user})),t},n.preferenceSaver=function(t){var e=this;return function(n,r){var i;r&&(r.loading=!0),m.redraw(),e.user.savePreferences((i={},i[t]=n,i)).then((function(){r&&(r.loading=!1),m.redraw()}))}},n.privacyItems=function(){var t=this,e=new S;return e.add("discloseOnline",fe.component({children:app.translator.trans("core.forum.settings.privacy_disclose_online_label"),state:this.user.preferences().discloseOnline,onchange:function(e,n){return t.preferenceSaver("discloseOnline")(e,n)}})),e},e}(Jt),he=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).routes={index:{path:"/all",component:St},discussion:{path:"/d/:id",component:Yt},"discussion.near":{path:"/d/:id/:near",component:Yt},user:{path:"/u/:username",component:re},"user.posts":{path:"/u/:username",component:re},"user.discussions":{path:"/u/:username/discussions",component:ce},settings:{path:"/settings",component:pe},"index.filter":{path:"/:filter",component:St}},e.history=new lt,e.cache={},e.postComponents={comment:ne},e.previous=void 0,e.current=void 0,e}i(e,t);var n=e.prototype;return n.mount=function(){var e=this.forum.attribute("defaultRoute"),n="index";for(var r in this.routes)this.routes[r].path===e&&(n=r);this.routes[n].path="/",this.history.push(n,this.translator.transText("core.forum.header.back_to_index_tooltip"),"/"),m.mount(document.getElementById("header-primary"),new ft),m.mount(document.getElementById("header-secondary"),new Ct),m.route.prefix="",t.prototype.mount.call(this,this.forum.attribute("basePath")),$("#home-link").click((function(t){t.ctrlKey||t.metaKey||2===t.which||(t.preventDefault(),app.history.home(),app.session.user&&(app.store.find("users",app.session.user.id()),m.redraw()))}))},n.setupRoutes=function(){var e=this;t.prototype.setupRoutes.call(this),this.route.discussion=function(t,n){var r=null==t?void 0:t.slug(),i=n&&1!==n,o={id:t.id()+(r.trim()?"-"+r:"")};return i&&(o.near=n),e.route(n&&1!==n?"discussion.near":"discussion",o)},this.route.post=function(t){return e.route.discussion(t.discussion(),t.number())},this.route.user=function(t){return e.route("user",{username:t.username()})}},e}(ut),me={extend:r,"components/Modal":st},ve=Object(o.a)(me,{"components/IndexPage":St,Forum:he}),ge=new he;window.app=ge,ge.bus.subscribe("app.plugins",(function(){var t=flarum.extensions;Object.keys(t).forEach((function(e){t[e]}))})),ve.app=ge}]);
//# sourceMappingURL=forum.js.map