text: flarum.core=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=131)}([function(t,e,n){"use strict";function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2),r=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=null),this.data=t,this.freshness=new Date,this.exists=!1,this.store=e}var e=t.prototype;return e.id=function(){return this.data.id},e.attribute=function(t){return this.data.attributes[t]},e.pushData=function(e){for(var n in e)if("object"==typeof e[n])for(var i in this.data[n]=this.data[n]||{},e[n])e[n][i]instanceof t&&(e[n][i]={data:t.getIdentifier(e[n][i])}),this.data[n][i]=e[n][i];else this.data[n]=e[n];this.freshness=new Date},e.pushAttributes=function(t){this.pushData({attributes:t})},e.save=function(e,n){var r=this;void 0===n&&(n={});var o={type:this.data.type,id:this.data.id,attributes:e};if(e.relationships){for(var s in o.relationships={},e.relationships){var a=e.relationships[s];o.relationships[s]={data:a instanceof Array?a.map(t.getIdentifier):t.getIdentifier(a)}}delete e.relationships}var c=this.copyData();this.pushData(o);var u={data:o};return n.meta&&(u.meta=n.meta),app.request(Object(i.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===e&&(e={}),this.exists?app.request(Object(i.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}()},function(t,e,n){"use strict";function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n(2),r=n(0),o=n(4),s=n(7),a=n(18),c=n(10),u=n(11),l=n(16),d=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(t){var e=Object(i.a)({},this.attrs);e.type=e.type||"button",e.title&&!t.children&&(e["aria-label"]=e.title),!e.title&&t.children&&(e.title=Object(u.a)(t.children));var n=Object(c.a)(e,"icon"),r=Object(c.a)(e,"loading");return(e.disabled||r)&&delete e.onclick,e.className=Object(a.a)([e.className,n&&"hasIcon",(e.disabled||r)&&"disabled",r&&"loading"]),m("button",e,this.getButtonContent(t.children))},n.getButtonContent=function(t){var e=this.attrs.icon;return[e&&!0!==e?Object(s.a)(e,{className:"Button-icon"}):"",t?m("span",{className:"Button-label"},t):"",this.attrs.loading?m(l.a,{size:"tiny",className:"LoadingIndicator--inline"}):""]},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(2);function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var o=n(5),s=!1,a=!1,c=function(){function t(){Object(o.a)(this,"element",void 0),Object(o.a)(this,"attrs",void 0)}var e,n,c,u=t.prototype;return u.oninit=function(t){this.setAttrs(t.attrs)},u.oncreate=function(t){this.element=t.dom},u.onbeforeupdate=function(t){this.setAttrs(t.attrs)},u.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),t.component=function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var n=Object(i.a)({},t);return m(this,n,e)},u.setAttrs=function(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error("["+this.constructor.name+'] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute');if("tag"in t)throw new Error("["+this.constructor.name+'] You cannot use the "tag" attribute name with Mithril 2.')}this.attrs=t},t.initAttrs=function(t){"initProps"in this&&!a&&(a=!0,console.warn("initProps is deprecated, please use initAttrs instead."),this.initProps(t))},e=t,(n=[{key:"props",get:function(){return s||(s=!0,console.warn("this.props is deprecated, please use this.attrs instead.")),this.attrs},set:function(t){s||(s=!0,console.warn("this.props is deprecated, please use this.attrs instead.")),this.attrs=t}}])&&r(e.prototype,n),c&&r(e,c),t}()},function(t,e,n){"use strict";function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(5),r=function(t,e){Object(i.a)(this,"content",void 0),Object(i.a)(this,"priority",void 0),Object(i.a)(this,"key",void 0),this.content=t,this.priority=e},o=function(){function t(){Object(i.a)(this,"items",{})}var e=t.prototype;return e.isEmpty=function(){for(var t in this.items)if(this.items.hasOwnProperty(t))return!1;return!0},e.has=function(t){return!!this.items[t]},e.get=function(t){return this.items[t].content},e.add=function(t,e,n){return void 0===n&&(n=0),this.items[t]=new r(e,n),this},e.replace=function(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),this.items[t]&&(null!==e&&(this.items[t].content=e),null!==n&&(this.items[t].priority=n)),this},e.remove=function(t){return delete this.items[t],this},e.merge=function(t){for(var e in t.items)t.items.hasOwnProperty(e)&&t.items[e]instanceof r&&(this.items[e]=t.items[e]);return this},e.toArray=function(){var t=[];for(var e in this.items)this.items.hasOwnProperty(e)&&this.items[e]instanceof r&&(this.items[e].content=Object(this.items[e].content),this.items[e].content.itemName=e,t.push(this.items[e]),this.items[e].key=t.length);return t.sort((function(t,e){return t.priority===e.priority?t.key-e.key:t.priority>e.priority?-1:1})).map((function(t){return t.content}))},t}()},function(t,e,n){"use strict";function i(t,e){return void 0===e&&(e={}),e.className="icon "+t+" "+(e.className||""),m("i",e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(27),r=n(18);function o(t){return t.tag===i.a}function s(t){return t instanceof Array||(t=[t]),function(t){var e,n=[];return t.filter(Boolean).forEach((function(i,r){(!o(i)||e&&!o(e)&&r!==t.length-1)&&(e=i,n.push(i))})),n}(t).map((function(t){var e=t.tag&&t.tag.isListItem,n=t.tag&&t.tag.isActive&&t.tag.isActive(t.attrs),i=t.attrs&&t.attrs.itemClassName||t.itemClassName;return e&&(t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key),e?t:m("li",{className:Object(r.a)([i,t.itemName&&"item-"+t.itemName,n&&"active"]),key:t.attrs&&t.attrs.key||t.itemName},t)}))}},function(t,e,n){"use strict";var i=n(95),r=n.n(i);e.a=r.a},function(t,e,n){"use strict";function i(t,e){var n=t[e];return delete t[e],n}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t){return t instanceof Array?t.map((function(t){return i(t)})).join(""):"object"==typeof t&&null!==t?t.children?i(t.children):t.text:t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(2),r=n(0),o=n(1),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e}(o.a);Object(i.a)(s.prototype,{nameSingular:o.a.attribute("nameSingular"),namePlural:o.a.attribute("namePlural"),color:o.a.attribute("color"),icon:o.a.attribute("icon"),isHidden:o.a.attribute("isHidden")}),s.ADMINISTRATOR_ID="1",s.GUEST_ID="2",s.MEMBER_ID="3",e.a=s},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(25),r=n(0),o=n(5),s=n(4),a=n(23),c=n(3),u=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e=t.call.apply(t,[this].concat(r))||this,Object(o.a)(Object(i.a)(e),"alertAttrs",null),e}Object(r.a)(e,t);var n=e.prototype;return n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.attrs.animateShow((function(){return n.onready()}))},n.onbeforeremove=function(){if(!this.attrs.state.modal)return this.attrs.animateHide(),new Promise((function(t){return setTimeout(t,300)}))},n.view=function(){return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:"Modal modal-dialog "+this.className()},m("div",{className:"Modal-content"},this.constructor.isDismissible?m("div",{className:"Modal-close App-backControl"},c.a.component({icon:"fas fa-times",onclick:this.hide.bind(this),className:"Button Button--icon Button--link"})):"",m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),this.alertAttrs?m("div",{className:"Modal-alert"},a.a.component(this.alertAttrs)):"",this.content())))},n.className=function(){},n.title=function(){},n.content=function(){},n.onsubmit=function(){},n.onready=function(){this.$("form").find("input, select, textarea").first().focus().select()},n.hide=function(){this.attrs.state.close()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){this.alertAttrs=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}(s.a);Object(o.a)(u,"isDismissible",!0)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),r=n(4),o=n(10),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(t){var e=t.attrs,n=e.options,i=void 0===n?{}:n,r=function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}(e,["options"]);r.href=r.href||"";var s=t.children||{tag:"#",children:t.text};return r.external?m("a",r,s):(r.href===m.route.get()&&("replace"in i||(i.replace=!0)),Object(o.a)(r,"force")&&("state"in i||(i.state={}),"key"in i.state||(i.state.key=Date.now())),r.options=i,m(m.route.Link,r,s))},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),r=n(4),o=n(7),s=n(8),a=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t),e.initAttrs=function(t){t.className=t.className||"",t.buttonClassName=t.buttonClassName||"",t.menuClassName=t.menuClassName||"",t.label=t.label||"",t.caretIcon=void 0!==t.caretIcon?t.caretIcon:"fas fa-caret-down"};var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.showing=!1},n.view=function(t){var e=t.children?Object(s.a)(t.children):[];return m("div",{className:"ButtonGroup Dropdown dropdown "+this.attrs.className+" itemCount"+e.length+(this.showing?" open":"")},this.getButton(t.children),this.getMenu(e))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.$().on("shown.bs.dropdown",(function(){n.showing=!0,n.attrs.onshow&&n.attrs.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.$().on("hidden.bs.dropdown",(function(){n.showing=!1,n.attrs.onhide&&n.attrs.onhide(),m.redraw()}))},n.getButton=function(t){return m("button",{className:"Dropdown-toggle "+this.attrs.buttonClassName,"data-toggle":"dropdown",onclick:this.attrs.onclick},this.getButtonContent(t))},n.getButtonContent=function(t){return[this.attrs.icon?Object(o.a)(this.attrs.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},this.attrs.label),this.attrs.caretIcon?Object(o.a)(this.attrs.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.attrs.menuClassName},t)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var i=n(2),r=n(0),o=n(4),s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},a={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",fadeColor:"transparent",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:"none",position:"absolute"},c=function(){function t(t){void 0===t&&(t={}),this.opts=s({},a,t)}return t.prototype.spin=function(t){var e,n,i,r=this;this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),d(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),"undefined"!=typeof requestAnimationFrame?(e=requestAnimationFrame,n=function(){return performance.now()}):(e=function(t){return setTimeout(t,1e3/r.opts.fps)},n=function(){return Date.now()});var o=0,s=function(){var t,a,c=n();if(void 0===i&&(i=c-1),o+=(t=c-i,a=r.opts.speed,t/1e3*a),i=c,o>1&&(o-=Math.floor(o)),r.el.childNodes.length===r.opts.lines)for(var l=0;l<r.opts.lines;l++){var d=u(l,o,r.opts);r.el.childNodes[l].childNodes[0].style.opacity=d.toString()}r.animateId=r.el?e(s):void 0};return function(t,e){var n=Math.round(e.corners*e.width*500)/1e3+"px",i="none";!0===e.shadow?i="0 2px 4px #000":"string"==typeof e.shadow&&(i=e.shadow);for(var r=function(t){for(var e=/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/,n=[],i=0,r=t.split(",");i<r.length;i++){var o=r[i].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}(i),o=0;o<e.lines;o++){var s=~~(360/e.lines*o+e.rotate),a=d(document.createElement("div"),{position:"absolute",top:-e.width/2+"px",width:e.length+e.width+"px",height:e.width+"px",background:p(e.fadeColor,o),borderRadius:n,transformOrigin:"left",transform:"rotate("+s+"deg) translateX("+e.radius+"px)"}),c=d(document.createElement("div"),{width:"100%",height:"100%",background:p(e.color,o),borderRadius:n,boxShadow:h(r,s),opacity:e.opacity});a.appendChild(c),t.appendChild(a)}}(this.el,this.opts),s(),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 u(t,e,n){var i=e-(t+1)/n.lines*n.direction;(i<0||i>1)&&(i+=n.direction);var r=1-i/(n.trail/100);return r<0?n.opacity:r*(1-n.opacity)+n.opacity}function l(t,e){if(void 0!==t.style[e])return e;var n="ms"+e.charAt(0).toUpperCase()+e.slice(1);return void 0!==t.style[n]?n:""}function d(t,e){for(var n in e)t.style[l(t,n)||n]=e[n];return t}function p(t,e){return"string"==typeof t?t:t[e%t.length]}function h(t,e){for(var n=[],i=0,r=t;i<r.length;i++){var o=r[i],s=f(o.x,o.y,e);n.push(o.prefix+s[0]+o.xUnits+" "+s[1]+o.yUnits+o.end)}return n.join(", ")}function f(t,e,n){var i=n*Math.PI/180,r=Math.sin(i),o=Math.cos(i);return[Math.round(1e3*(t*o+e*r))/1e3,Math.round(1e3*(-t*r+e*o))/1e3]}var v=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){var t=Object(i.a)({},this.attrs);return t.className="LoadingIndicator "+(t.className||""),delete t.size,m("div",t,m.trust("&nbsp;"))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n={zIndex:"auto",color:this.$().css("color")};switch(this.attrs.size){case"large":Object(i.a)(n,{lines:10,length:8,width:4,radius:8});break;case"tiny":Object(i.a)(n,{lines:8,length:2,width:2,radius:3});break;default:Object(i.a)(n,{lines:8,length:4,width:3,radius:5})}new c(n).spin(this.element)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2);function r(t,e){void 0===e&&(e={}),e.className="Avatar "+(e.className||"");var n="",r="undefined"===e.title||e.title;if(r||delete e.title,t){var o=t.displayName()||"?",s=t.avatarUrl();if(r&&(e.title=e.title||o),s)return m("img",Object(i.a)({},e,{src:s,alt:""}));n=o.charAt(0).toUpperCase(),e.style={background:t.color()}}return m("span",e,n)}},function(t,e,n){"use strict";function i(t){var e;if(t instanceof Array)e=t.filter((function(t){return t}));else for(var n in e=[],t)t[n]&&e.push(n);return e.join(" ")}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t){var e=t&&t.displayName()||app.translator.trans("core.lib.username.deleted_text");return m("span",{className:"username"},e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i,r=e.slice(0,-1),o=e.slice(-1)[0],s={};return function(){var t=this,e=!1;return r.forEach((function(n){var i="function"==typeof t[n]?t[n]():t[n];s[n]!==i&&(e=!0,s[n]=i)})),e&&(i=o.apply(this,r.map((function(t){return s[t]})))),i}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),r=n(4),o=n(47),s=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),app.previous=app.current,app.current=new o.a(this.constructor,{routeName:this.attrs.routeName}),app.drawer.hide(),app.modal.close(),this.bodyClass="",this.scrollTopOnCreate=!0},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.bodyClass&&$("#app").addClass(this.bodyClass),this.scrollTopOnCreate&&$(window).scrollTop(0)},n.onremove=function(){this.bodyClass&&$("#app").removeClass(this.bodyClass)},e}(r.a)},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(2),r=n(0),o=n(4),s=n(3),a=n(8),c=n(10),u=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(t){var e=Object(i.a)({},this.attrs),n=Object(c.a)(e,"type");e.className="Alert Alert--"+n+" "+(e.className||"");var r=Object(c.a)(e,"content")||t.children,o=Object(c.a)(e,"controls")||[],u=Object(c.a)(e,"dismissible"),l=Object(c.a)(e,"ondismiss"),d=[];return(u||void 0===u)&&d.push(m(s.a,{icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:l})),m("div",e,m("span",{className:"Alert-body"},r),m("ul",{className:"Alert-controls"},Object(a.a)(o.concat(d))))},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),r=n(3),o=n(14),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.active=this.isActive(e),void 0===e.force&&(e.force=!0)},e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return n.tag=o.a,n.attrs.active=String(n.attrs.active),n},e.isActive=function(t){return void 0!==t.active?t.active:m.route.get()===t.href},e}(r.a)},function(t,e,n){"use strict";function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(96),r="object"==typeof self&&self&&self.Object===Object&&self,o=(i.a||r||Function("return this")()).Symbol;e.a=o},function(t,e,n){"use strict";var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(n(4).a);r.isListItem=!0,e.a=r},function(t,e,n){t.exports=function(){"use strict";var t="millisecond",e="second",n="minute",i="hour",r="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,d=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},p={s:d,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+d(i,2,"0")+":"+d(r,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(n,s),r=e-i<0,o=t.clone().add(n+(r?-1:1),s);return Number(-(n+(e-i)/(r?i-o:o-i))||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:r,D:"date",h:i,m:n,s:e,ms:t,Q:a}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},h={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("_")},f="en",m={};m[f]=h;var v=function(t){return t instanceof w},g=function(t,e,n){var i;if(!t)return f;if("string"==typeof t)m[t]&&(i=t),e&&(m[t]=e,i=t);else{var r=t.name;m[r]=t,i=r}return!n&&i&&(f=i),i||!n&&f},b=function(t,e){if(v(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new w(n)},y=p;y.l=g,y.i=v,y.w=function(t,e){return b(t,{locale:e.$L,utc:e.$u,$offset:e.$offset})};var w=function(){function d(t){this.$L=this.$L||g(t.locale,null,!0),this.parse(t)}var p=d.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(y.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(u);if(i)return n?new Date(Date.UTC(i[1],i[2]-1,i[3]||1,i[4]||0,i[5]||0,i[6]||0,i[7]||0)):new Date(i[1],i[2]-1,i[3]||1,i[4]||0,i[5]||0,i[6]||0,i[7]||0)}return new Date(e)}(t),this.init()},p.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()},p.$utils=function(){return y},p.isValid=function(){return!("Invalid Date"===this.$d.toString())},p.isSame=function(t,e){var n=b(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return b(t)<this.startOf(e)},p.isBefore=function(t,e){return this.endOf(e)<b(t)},p.$g=function(t,e,n){return y.u(t)?this[e]:this.set(n,t)},p.year=function(t){return this.$g(t,"$y",c)},p.month=function(t){return this.$g(t,"$M",s)},p.day=function(t){return this.$g(t,"$W",r)},p.date=function(t){return this.$g(t,"$D","date")},p.hour=function(t){return this.$g(t,"$H",i)},p.minute=function(t){return this.$g(t,"$m",n)},p.second=function(t){return this.$g(t,"$s",e)},p.millisecond=function(e){return this.$g(e,"$ms",t)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(t,a){var u=this,l=!!y.u(a)||a,d=y.p(t),p=function(t,e){var n=y.w(u.$u?Date.UTC(u.$y,e,t):new Date(u.$y,e,t),u);return l?n:n.endOf(r)},h=function(t,e){return y.w(u.toDate()[t].apply(u.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(e)),u)},f=this.$W,m=this.$M,v=this.$D,g="set"+(this.$u?"UTC":"");switch(d){case c:return l?p(1,0):p(31,11);case s:return l?p(1,m):p(0,m+1);case o:var b=this.$locale().weekStart||0,w=(f<b?f+7:f)-b;return p(l?v-w:v+(6-w),m);case r:case"date":return h(g+"Hours",0);case i:return h(g+"Minutes",1);case n:return h(g+"Seconds",2);case e:return h(g+"Milliseconds",3);default:return this.clone()}},p.endOf=function(t){return this.startOf(t,!1)},p.$set=function(o,a){var u,l=y.p(o),d="set"+(this.$u?"UTC":""),p=(u={},u.day=d+"Date",u.date=d+"Date",u[s]=d+"Month",u[c]=d+"FullYear",u[i]=d+"Hours",u[n]=d+"Minutes",u[e]=d+"Seconds",u[t]=d+"Milliseconds",u)[l],h=l===r?this.$D+(a-this.$W):a;if(l===s||l===c){var f=this.clone().set("date",1);f.$d[p](h),f.init(),this.$d=f.set("date",Math.min(this.$D,f.daysInMonth())).toDate()}else p&&this.$d[p](h);return this.init(),this},p.set=function(t,e){return this.clone().$set(t,e)},p.get=function(t){return this[y.p(t)]()},p.add=function(t,a){var u,l=this;t=Number(t);var d=y.p(a),p=function(e){var n=b(l);return y.w(n.date(n.date()+Math.round(e*t)),l)};if(d===s)return this.set(s,this.$M+t);if(d===c)return this.set(c,this.$y+t);if(d===r)return p(1);if(d===o)return p(7);var h=(u={},u[n]=6e4,u[i]=36e5,u[e]=1e3,u)[d]||1,f=this.$d.getTime()+t*h;return y.w(f,this)},p.subtract=function(t,e){return this.add(-1*t,e)},p.format=function(t){var e=this;if(!this.isValid())return"Invalid Date";var n=t||"YYYY-MM-DDTHH:mm:ssZ",i=y.z(this),r=this.$locale(),o=this.$H,s=this.$m,a=this.$M,c=r.weekdays,u=r.months,d=function(t,i,r,o){return t&&(t[i]||t(e,n))||r[i].substr(0,o)},p=function(t){return y.s(o%12||12,t,"0")},h=r.meridiem||function(t,e,n){var i=t<12?"AM":"PM";return n?i.toLowerCase():i},f={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:y.s(a+1,2,"0"),MMM:d(r.monthsShort,a,u,3),MMMM:d(u,a),D:this.$D,DD:y.s(this.$D,2,"0"),d:String(this.$W),dd:d(r.weekdaysMin,this.$W,c,2),ddd:d(r.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(o),HH:y.s(o,2,"0"),h:p(1),hh:p(2),a:h(o,s,!0),A:h(o,s,!1),m:String(s),mm:y.s(s,2,"0"),s:String(this.$s),ss:y.s(this.$s,2,"0"),SSS:y.s(this.$ms,3,"0"),Z:i};return n.replace(l,(function(t,e){return e||f[t]||i.replace(":","")}))},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(t,r,u){var l,d=y.p(r),p=b(t),h=6e4*(p.utcOffset()-this.utcOffset()),f=this-p,m=y.m(this,p);return m=(l={},l[c]=m/12,l[s]=m,l[a]=m/3,l[o]=(f-h)/6048e5,l.day=(f-h)/864e5,l[i]=f/36e5,l[n]=f/6e4,l[e]=f/1e3,l)[d]||f,u?m:y.a(m)},p.daysInMonth=function(){return this.endOf(s).$D},p.$locale=function(){return m[this.$L]},p.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),i=g(t,e,!0);return i&&(n.$L=i),n},p.clone=function(){return y.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},d}();return b.prototype=w.prototype,b.extend=function(t,e){return t(e,w,b),b},b.locale=g,b.isDayjs=v,b.unix=function(t){return b(1e3*t)},b.en=m[f],b.Ls=m,b}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(28),r=n.n(i);n(74);function o(t){var e=r()(t),n=r()();e.isAfter(n)&&(e=n);return e.diff(r()())<-2592e6?e.year()===r()().year()?e.format("D MMM"):e.format("ll"):e.fromNow()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(2),r=n(0),o=n(4),s=n(7),a=n(10),c=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){var t=Object(i.a)({},this.attrs),e=Object(a.a)(t,"type"),n=Object(a.a)(t,"icon");return t.className="Badge "+(e?"Badge--"+e:"")+" "+(t.className||""),t.title=Object(a.a)(t,"label")||"",m("span",t,n?Object(s.a)(n,{className:"Badge-icon"}):m.trust("&nbsp;"))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.attrs.label&&this.$().tooltip()},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),r=n(4),o=n(8),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(t){return m("fieldset",{className:this.attrs.className},m("legend",null,this.attrs.label),m("ul",null,Object(o.a)(t.children)))},e}(r.a)},function(t,e,n){"use strict";e.a=function(t,e){return function(){e(this.getAttribute(t)||this[t])}}},function(t,e,n){"use strict";function i(t,e,n,i,r,o){return{tag:t,key:e,attrs:n,children:i,text:r,dom:o,domSize:void 0,state:void 0,events:void 0,instance:void 0}}i.normalize=function(t){return Array.isArray(t)?i("[",void 0,void 0,i.normalizeChildren(t),void 0,void 0):null==t||"boolean"==typeof t?null:"object"==typeof t?t:i("#",void 0,void 0,String(t),void 0,void 0)},i.normalizeChildren=function(t){var e=[];if(t.length){for(var n=null!=t[0]&&null!=t[0].key,r=1;r<t.length;r++)if((null!=t[r]&&null!=t[r].key)!==n)throw new TypeError("Vnodes must either always have keys or never have keys!");for(r=0;r<t.length;r++)e[r]=i.normalize(t[r])}return e},t.exports=i},function(t,e,n){"use strict";function i(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function r(t){return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}function o(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 &nbsp;").replace(/<img\b[^>]*>/gi," "),n=$("<div/>").html(e);return n.find(o.removeSelectors.join(",")).remove(),n.text().replace(/\s+/g," ").trim()}function s(t){return t.substr(0,1).toUpperCase()+t.substr(1)}n.r(e),n.d(e,"truncate",(function(){return i})),n.d(e,"slug",(function(){return r})),n.d(e,"getPlainContent",(function(){return o})),n.d(e,"ucfirst",(function(){return s})),o.removeSelectors=["blockquote","script"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),r=n(15),o=n(7);function s(t){var e=t.tag;return"initAttrs"in e&&e.initAttrs(t.attrs),"isActive"in e?e.isActive(t.attrs):t.attrs.active}var a=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initAttrs=function(e){e.caretIcon=void 0!==e.caretIcon?e.caretIcon:"fas fa-sort",t.initAttrs.call(this,e),e.className+=" Dropdown--select"},e.prototype.getButtonContent=function(t){var e=t.find(s),n=e&&e.children||this.attrs.defaultLabel;return n instanceof Array&&(n=n[0]),[m("span",{className:"Button-label"},n),Object(o.a)(this.attrs.caretIcon,{className:"Button-caret"})]},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.group&&(e.icon=e.group.icon(),e.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}(n(30).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(34);function r(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(e,"gi"),o=t,s=0;return n&&(e&&(s=Math.max(0,t.search(r)-n/2)),o=Object(i.truncate)(o,n,s)),o=$("<div/>").text(o).html(),e&&(o=o.replace(r,"<mark>$&</mark>")),m.trust(o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=(e.className||"")+" Checkbox--switch"},e.prototype.getDisplay=function(){return this.attrs.loading?t.prototype.getDisplay.call(this):""},e}(n(45).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},r=function(){function t(t){this.callback=t,this.ticking=!1}var e=t.prototype;return e.loop=function(){var t=this;this.ticking||(i((function(){t.update(),t.ticking=!1})),this.ticking=!0)},e.update=function(){this.callback(window.pageYOffset)},e.start=function(){this.active||window.addEventListener("scroll",this.active=this.loop.bind(this),{passive:!0})},e.stop=function(){window.removeEventListener("scroll",this.active),this.active=null},t}()},function(t,e,n){"use strict";n.r(e),n.d(e,"extend",(function(){return r})),n.d(e,"override",(function(){return o}));var i=n(2);function r(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];var o=r?r.apply(this,e):void 0;return n.apply(this,[o].concat(e)),o},Object(i.a)(t[e],r)}function o(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(i.a)(t[e],r)}},function(t,e,n){"use strict";function i(t,e){return t&&(t===e||t.prototype instanceof e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(28),r=n.n(i),o=n(29);function s(t){var e=r()(t),n=e.format(),i=e.format("LLLL"),s=Object(o.a)(t);return m("time",{pubdate:!0,datetime:n,title:i,"data-humantime":!0},s)}},function(t,e,n){"use strict";e.a=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(2),r=n(0),o=n(1),s=n(20),a=n(6),c=n(30),u=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e}(o.a);Object(i.a)(u.prototype,{title:o.a.attribute("title"),slug:o.a.attribute("slug"),createdAt:o.a.attribute("createdAt",o.a.transformDate),user:o.a.hasOne("user"),firstPost:o.a.hasOne("firstPost"),lastPostedAt:o.a.attribute("lastPostedAt",o.a.transformDate),lastPostedUser:o.a.hasOne("lastPostedUser"),lastPost:o.a.hasOne("lastPost"),lastPostNumber:o.a.attribute("lastPostNumber"),commentCount:o.a.attribute("commentCount"),replyCount:Object(s.a)("commentCount",(function(t){return Math.max(0,t-1)})),posts:o.a.hasMany("posts"),mostRelevantPost:o.a.hasOne("mostRelevantPost"),lastReadAt:o.a.attribute("lastReadAt",o.a.transformDate),lastReadPostNumber:o.a.attribute("lastReadPostNumber"),isUnread:Object(s.a)("unreadCount",(function(t){return!!t})),isRead:Object(s.a)("unreadCount",(function(t){return app.session.user&&!t})),hiddenAt:o.a.attribute("hiddenAt",o.a.transformDate),hiddenUser:o.a.hasOne("hiddenUser"),isHidden:Object(s.a)("hiddenAt",(function(t){return!!t})),canReply:o.a.attribute("canReply"),canRename:o.a.attribute("canRename"),canHide:o.a.attribute("canHide"),canDelete:o.a.attribute("canDelete"),removePost:function(t){var e=this.data.relationships,n=e&&e.posts;n&&n.data.some((function(e,i){if(t===e.id)return n.data.splice(i,1),!0}))},unreadCount:function(){var t=app.session.user;if(t&&t.markedAllAsReadAt()<this.lastPostedAt()){var e=Math.max(0,this.lastPostNumber()-(this.lastReadPostNumber()||0));return Math.min(e,this.commentCount())}return 0},badges:function(){var t=new a.a;return this.isHidden()&&t.add("hidden",m(c.a,{type:"hidden",icon:"fas fa-trash",label:app.translator.trans("core.lib.badge.hidden_tooltip")})),t},postIds:function(){var t=this.data.relationships.posts;return t?t.data.map((function(t){return t.id})):[]}})},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(0),r=n(4),o=n(16),s=n(7),a=n(18),c=n(32),u=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.view=function(t){"0"===this.attrs.state&&(this.attrs.state=!1);var e=Object(a.a)(["Checkbox",this.attrs.state?"on":"off",this.attrs.className,this.attrs.loading&&"loading",this.attrs.disabled&&"disabled"]);return m("label",{className:e},m("input",{type:"checkbox",checked:this.attrs.state,disabled:this.attrs.disabled,onchange:Object(c.a)("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display"},this.getDisplay()),t.children)},n.getDisplay=function(){return this.attrs.loading?m(o.a,{size:"tiny"}):Object(s.a)(this.attrs.state?"fas fa-check":"fas fa-times")},n.onchange=function(t){this.attrs.onchange&&this.attrs.onchange(t,this)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(2),r=n(5),o=function(){function t(t,e){Object(r.a)(this,"component",void 0),Object(r.a)(this,"routeName",void 0),this.component=t,this.routeName=e}var e=t.prototype;return e.makeKey=function(){return this.routeName+JSON.stringify(m.route.param())},e.makeAttrs=function(t){return Object(i.a)({},t.attrs,{routeName:this.routeName})},e.onmatch=function(t,e,n){return this.component},e.render=function(t){return[Object(i.a)({},t,{attrs:this.makeAttrs(t),key:this.makeKey()})]},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(41),r=function(){function t(t,e){void 0===e&&(e={}),this.type=t,this.data=e}var e=t.prototype;return e.matches=function(t,e){var n=this;return void 0===e&&(e={}),!!Object(i.a)(this.type,t)&&Object.keys(e).every((function(t){return n.data[t]===e[t]}))},e.get=function(t){return this.data[t]},e.set=function(t,e){this.data[t]=e},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(5),r=function(t,e,n,r){Object(i.a)(this,"status",void 0),Object(i.a)(this,"options",void 0),Object(i.a)(this,"xhr",void 0),Object(i.a)(this,"responseText",void 0),Object(i.a)(this,"response",void 0),Object(i.a)(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}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),r=n(4),o=n(3),s=n(24),a=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.view=function(){var t=app,e=t.history,n=t.pane;return m("div",{className:"Navigation ButtonGroup "+(this.attrs.className||""),onmouseenter:n&&n.show.bind(n),onmouseleave:n&&n.onmouseleave.bind(n)},e.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.getBackButton=function(){var t=app.history,e=t.getPrevious()||{};return s.a.component({className:"Button Navigation-back Button--icon",href:t.backUrl(),icon:"fas fa-chevron-left",title:e.title,onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),t.back())}})},n.getPaneButton=function(){var t=app.pane;return t&&t.active?o.a.component({className:"Button Button--icon Navigation-pin"+(t.pinned?" active":""),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):""},n.getDrawerButton=function(){if(!this.attrs.drawer)return"";var t=app.drawer,e=app.session.user;return o.a.component({className:"Button Button--icon Navigation-drawer"+(e&&e.newNotificationCount()?" new":""),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars"})},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),r=n(4),o=n(7),s=n(32),a=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){var t=this.attrs,e=t.options,n=t.onchange,i=t.value,r=t.disabled;return m("span",{className:"Select"},m("select",{className:"Select-input FormControl",onchange:n?Object(s.a)("value",n.bind(this)):void 0,value:i,disabled:r},Object.keys(e).map((function(t){return m("option",{value:t},e[t])}))),Object(o.a)("fas fa-sort",{className:"Select-caret"}))},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2);function r(t,e,n){void 0===e&&(e=null),void 0===n&&(n={});var r=Object(i.a)({},n);r.state=r.state||{},r.state.key=Date.now(),m.route.set(t,e,r)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(32),r=n(9),o=!1,s=!1;function a(t){var e=t.m,n=function t(n){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];var s=e.apply(this,arguments);return s.attrs||(s.attrs={}),s.attrs.bidi&&t.bidi(s,s.attrs.bidi),s};Object.keys(e).forEach((function(t){return n[t]=e[t]})),n.prop=function(){return o||(o=!0,console.warn("m.prop() is deprecated, please use the Stream util (flarum/utils/Streams) instead.")),r.a.bind(this).apply(void 0,arguments)},n.withAttr=function(){return s||(s=!0,console.warn("m.withAttr() is deprecated, please use flarum's withAttr util (flarum/utils/withAttr) instead.")),i.a.bind(this).apply(void 0,arguments)},t.m=n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=e,this.data={},this.needsRebuild()}var e=t.prototype;return e.needsRebuild=function(){var t=this,e=!1;return this.callbacks.forEach((function(n,i){var r=n();r!==t.data[i]&&(t.data[i]=r,e=!0)})),e},e.check=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=this.callbacks.concat(e),this.needsRebuild()},e.invalidate=function(){this.data={}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.attrs.text))},e}(n(4).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(2),r=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.state.modal;return m("div",{className:"ModalManager modal fade"},t?t.componentClass.component(Object(i.a)({},t.attrs,{animateShow:this.animateShow.bind(this),animateHide:this.animateHide.bind(this),state:this.attrs.state})):"")},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$().on("hidden.bs.modal",this.attrs.state.close.bind(this.attrs.state))},n.animateShow=function(t){var e=!!this.attrs.state.modal.componentClass.isDismissible;this.$().hasClass("in")?t():this.$().one("shown.bs.modal",t).modal({backdrop:e||"static",keyboard:e}).modal("show")},n.animateHide=function(){this.$().modal("hide")},e}(n(4).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(2),r=n(0),o=n(4),s=(n(23),function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.view=function(){var t=this;return m("div",{className:"AlertManager"},Object.entries(this.state.getActiveAlerts()).map((function(e){var n=e[0],r=e[1];return m("div",{className:"AlertManager-alert"},m(r.componentClass,Object(i.a)({},r.attrs,{ondismiss:t.state.dismiss.bind(t.state,n)}),r.children))})))},e}(o.a))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return this.attrs.error.xhr?this.attrs.error.xhr.status+" "+this.attrs.error.xhr.statusText:""},n.content=function(){var t,e=this.attrs,n=e.error,i=e.formattedError;if(i)t=i.join("\n\n");else try{var r=n.response||JSON.parse(n.responseText);t=JSON.stringify(r,null,2)}catch(e){t=n.responseText}return m("div",{className:"Modal-body"},m("pre",null,this.attrs.error.options.method," ",this.attrs.error.options.url,m("br",null),m("br",null),t))},e}(n(13).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(2),r=n(19),o=n(10),s=function(){function t(){this.translations={},this.locale=null}var e=t.prototype;return e.addTranslations=function(t){Object(i.a)(this.translations,t)},e.trans=function(t,e){var n=this.translations[t];return n?this.apply(n,e||{}):t},e.transChoice=function(t,e,n){var i=this.translations[t];return i?(e=parseInt(e,10),i=this.pluralize(i,e),this.apply(i,n||{})):t},e.apply=function(t,e){if("user"in e){var n=Object(o.a)(e,"user");e.username||(e.username=Object(r.a)(n))}t=t.split(new RegExp("({[a-z0-9_]+}|</?[a-z0-9_]+>)","gi"));var i=[],s=[i];return t.forEach((function(t){var n=t.match(new RegExp("{([a-z0-9_]+)}|<(/?)([a-z0-9_]+)>","i"));if(n){if(n[1])s[0].push(e[n[1]]);else if(n[3])if(n[2]){var i,r=s[0].splice(0,s[0].length);(i=s[0]).push.apply(i,m.fragment(r).children),s.shift()}else{var o=e[n[3]]||{tag:n[3],children:[]};s[0].push(o),s.unshift(o.children||o)}}else s[0].push(t)})),i.filter((function(t){return t}))},e.pluralize=function(t,e){var n=this,i=new RegExp(/^\w+\: +(.+)$/),r=new RegExp(/^\s*((\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]]))\s?(.+?)$/),o=new RegExp(/^\s*(\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]])/),s=[],a=[];return t.split("|").forEach((function(t){if(r.test(t)){var e=t.match(r);a[e[0]]=e[e.length-1]}else if(i.test(t)){var n=t.match(i);s.push(n[1])}else s.push(t)})),a.forEach((function(t,i){if(o.test(i)){var r=i.match(o);if(r[1]){var s=r[2].split(",");for(var c in s)if(e==s[c])return a[i]}else{var u=n.convertNumber(r[4]),l=n.convertNumber(r[5]);if(("["===r[3]?e>=u:e>u)&&("]"===r[6]?e<=l:e<l))return a[i]}}})),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}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2),r=function(){function t(t){this.data={},this.models=t}var e=t.prototype;return e.pushPayload=function(t){t.included&&t.included.map(this.pushObject.bind(this));var e=t.data instanceof Array?t.data.map(this.pushObject.bind(this)):this.pushObject(t.data);return e.payload=t,e},e.pushObject=function(t){if(!this.models[t.type])return null;var e=this.data[t.type]=this.data[t.type]||{};return e[t.id]?e[t.id].pushData(t):e[t.id]=this.createRecord(t.type,t),e[t.id].exists=!0,e[t.id]},e.find=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={});var o=n,s=app.forum.attribute("apiUrl")+"/"+t;return e instanceof Array?s+="?filter[id]="+e.join(","):"object"==typeof e?o=e:e&&(s+="/"+e),app.request(Object(i.a)({method:"GET",url:s,params:o},r)).then(this.pushPayload.bind(this))},e.getById=function(t,e){return this.data[t]&&this.data[t][e]},e.getBy=function(t,e,n){return this.all(t).filter((function(t){return t[e]()===n}))[0]},e.all=function(t){var e=this.data[t];return e?Object.keys(e).map((function(t){return e[t]})):[]},e.remove=function(t){delete this.data[t.data.type][t.id()]},e.createRecord=function(t,e){return void 0===e&&(e={}),e.type=e.type||t,new this.models[t](e,this)},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2),r=function(){function t(t,e){this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),app.request(Object(i.a)({method:"POST",url:app.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location=app.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){var t=this;$("#content").click((function(e){t.isOpen()&&(e.preventDefault(),t.hide())}))}var e=t.prototype;return e.isOpen=function(){return $("#app").hasClass("drawerOpen")},e.hide=function(){$("#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}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(46);function r(t,e){void 0===e&&(e="");var n={};for(var r in t){var o=t[r];if("resolver"in o)n[e+o.path]=o.resolver;else{if(!("component"in o))throw new Error("Either a resolver or a component must be provided for the route ["+r+"]");var s="resolverClass"in o?o.resolverClass:i.a;n[e+o.path]=new s(o.component,r)}}return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(29);function r(){$("[data-humantime]").each((function(){var t=$(this),e=Object(i.a)(t.attr("datetime"));t.html(e)}))}function o(){setInterval(r,1e4)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(n(1).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(2),r=n(0),o=n(1),s=n(66),a=n(6),c=n(20),u=n(36),l=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e}(o.a);Object(i.a)(l.prototype,{username:o.a.attribute("username"),displayName:o.a.attribute("displayName"),email:o.a.attribute("email"),isEmailConfirmed:o.a.attribute("isEmailConfirmed"),password:o.a.attribute("password"),avatarUrl:o.a.attribute("avatarUrl"),preferences:o.a.attribute("preferences"),groups:o.a.hasMany("groups"),joinTime:o.a.attribute("joinTime",o.a.transformDate),lastSeenAt:o.a.attribute("lastSeenAt",o.a.transformDate),markedAllAsReadAt:o.a.attribute("markedAllAsReadAt",o.a.transformDate),unreadNotificationCount:o.a.attribute("unreadNotificationCount"),newNotificationCount:o.a.attribute("newNotificationCount"),discussionCount:o.a.attribute("discussionCount"),commentCount:o.a.attribute("commentCount"),canEdit:o.a.attribute("canEdit"),canDelete:o.a.attribute("canDelete"),avatarColor:null,color:Object(c.a)("username","avatarUrl","avatarColor",(function(t,e,n){return n?"rgb("+n.join(", ")+")":e?(this.calculateAvatarColor(),""):"#"+Object(s.a)(t)})),isOnline:function(){return dayjs().subtract(5,"minutes").isBefore(this.lastSeenAt())},badges:function(){var t=new a.a,e=this.groups();return e&&e.forEach((function(e){t.add("group"+e.id(),u.a.component({group:e}))})),t},calculateAvatarColor:function(){var t=new Image,e=this;t.onload=function(){var t=new ColorThief;e.avatarColor=t.getColor(this),e.freshness=new Date,m.redraw()},t.crossOrigin="anonymous",t.src=this.avatarUrl()},savePreferences:function(t){var e=this.preferences();return Object(i.a)(e,t),this.save({preferences:e})}})},function(t,e,n){"use strict";function i(t){for(var e=0,n=0;n<t.length;n++)e+=t.charCodeAt(n);var i=function(t,e,n){var i,r,o,s=Math.floor(6*t),a=6*t-s,c=n*(1-e),u=n*(1-a*e),l=n*(1-(1-a)*e);switch(s%6){case 0:i=n,r=l,o=c;break;case 1:i=u,r=n,o=c;break;case 2:i=c,r=n,o=l;break;case 3:i=c,r=u,o=n;break;case 4:i=l,r=c,o=n;break;case 5:i=n,r=c,o=u}return{r:Math.floor(255*i),g:Math.floor(255*r),b:Math.floor(255*o)}}(e%360/360,.3,.9);return""+i.r.toString(16)+i.g.toString(16)+i.b.toString(16)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(2),r=n(0),o=n(1),s=n(20),a=n(34),c=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e}(o.a);Object(i.a)(c.prototype,{number:o.a.attribute("number"),discussion:o.a.hasOne("discussion"),createdAt:o.a.attribute("createdAt",o.a.transformDate),user:o.a.hasOne("user"),contentType:o.a.attribute("contentType"),content:o.a.attribute("content"),contentHtml:o.a.attribute("contentHtml"),contentPlain:Object(s.a)("contentHtml",a.getPlainContent),editedAt:o.a.attribute("editedAt",o.a.transformDate),editedUser:o.a.hasOne("editedUser"),isEdited:Object(s.a)("editedAt",(function(t){return!!t})),hiddenAt:o.a.attribute("hiddenAt",o.a.transformDate),hiddenUser:o.a.hasOne("hiddenUser"),isHidden:Object(s.a)("hiddenAt",(function(t){return!!t})),canEdit:o.a.attribute("canEdit"),canHide:o.a.attribute("canHide"),canDelete:o.a.attribute("canDelete")})},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(2),r=n(0),o=n(1),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e}(o.a);Object(i.a)(s.prototype,{contentType:o.a.attribute("contentType"),content:o.a.attribute("content"),createdAt:o.a.attribute("createdAt",o.a.transformDate),isRead:o.a.attribute("isRead"),user:o.a.hasOne("user"),fromUser:o.a.hasOne("fromUser"),subject:o.a.hasOne("subject")})},function(t,e,n){"use strict";n.d(e,"a",(function(){return Y}));var i=n(2),r=n(5),o=n(6),s=n(3),a=n(55),c=n(56),u=n(57),l=n(58),d=n(59),p=n(60),h=n(10),f=n(61),v=n(62),g=n(48),b=n(39),y=n(63),w=n(40),x=n(64),N=n(65),C=n(44),O=n(67),k=n(12),T=n(68);var j=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t},S=n(26),A=n(82),P=n(43);var E=function(t){return Object(P.a)(t)&&"[object Arguments]"==Object(A.a)(t)},D=Object.prototype,_=D.hasOwnProperty,I=D.propertyIsEnumerable,M=E(function(){return arguments}())?E:function(t){return Object(P.a)(t)&&_.call(t,"callee")&&!I.call(t,"callee")},L=n(77),R=S.a?S.a.isConcatSpreadable:void 0;var B=function(t){return Object(L.a)(t)||M(t)||!!(R&&t&&t[R])};var H=function t(e,n,i,r,o){var s=-1,a=e.length;for(i||(i=B),o||(o=[]);++s<a;){var c=e[s];n>0&&i(c)?n>1?t(c,n-1,i,r,o):j(o,c):r||(o[o.length]=c)}return o};var U=function(t){return(null==t?0:t.length)?H(t,1/0):[]},F=n(47),q=n(13),z=function(){function t(){this.modal=null}var e=t.prototype;return e.show=function(t,e){if(!(t.prototype instanceof q.a))throw console.error("The ModalManager can only show Modals"),new Error("The ModalManager can only show Modals");if(t.init)throw console.error("The componentClass parameter must be a modal class, not a modal instance. Whichever extension triggered this modal should be updated to comply with beta 14."),new Error("The componentClass parameter must be a modal class, not a modal instance. Whichever extension triggered this modal should be updated to comply with beta 14.");clearTimeout(this.closeTimeout),this.modal={componentClass:t,attrs:e},m.redraw.sync()},e.close=function(){var t=this;this.modal&&(this.closeTimeout=setTimeout((function(){t.modal=null,m.redraw()})))},t}(),W=n(23),V=function(){function t(){Object(r.a)(this,"activeAlerts",{}),Object(r.a)(this,"alertId",0)}var e=t.prototype;return e.getActiveAlerts=function(){return this.activeAlerts},e.show=function(t,e,n){var i,r=W.a,o={};if(1==arguments.length?i=t:2==arguments.length?(o=t,i=e):3==arguments.length&&(r=t,o=e,i=n),o===W.a||o instanceof W.a)throw console.error("The AlertManager can only show Alerts. Whichever extension triggered this alert should be updated to comply with beta 14."),new Error("The AlertManager can only show Alerts. Whichever extension triggered this alert should be updated to comply with beta 14.");return this.activeAlerts[++this.alertId]={children:i,attrs:o,componentClass:r},m.redraw(),this.alertId},e.dismiss=function(t){t&&t in this.activeAlerts&&(delete this.activeAlerts[t],m.redraw())},e.clear=function(){this.activeAlerts={},m.redraw()},t}(),Y=function(){function t(){Object(r.a)(this,"forum",null),Object(r.a)(this,"routes",{}),Object(r.a)(this,"initializers",new o.a),Object(r.a)(this,"session",null),Object(r.a)(this,"translator",new l.a),Object(r.a)(this,"store",new d.a({forums:x.a,users:N.a,discussions:C.a,posts:O.a,groups:k.a,notifications:T.a})),Object(r.a)(this,"cache",{}),Object(r.a)(this,"booted",!1),Object(r.a)(this,"requestErrorAlert",null),Object(r.a)(this,"current",new F.a(null)),Object(r.a)(this,"previous",new F.a(null)),Object(r.a)(this,"modal",new z),Object(r.a)(this,"alerts",new V),Object(r.a)(this,"data",void 0),Object(r.a)(this,"title",""),Object(r.a)(this,"titleCount",0)}var e=t.prototype;return e.load=function(t){this.data=t,this.translator.locale=t.locale},e.boot=function(){var t=this;this.initializers.toArray().forEach((function(e){return e(t)})),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums",1),this.session=new p.a(this.store.getById("users",this.data.session.userId),this.data.session.csrfToken),this.mount()},e.bootExtensions=function(t){var e=this;Object.keys(t).forEach((function(n){var i=t[n],r=U(i.extend),o=Array.isArray(r),s=0;for(r=o?r:r[Symbol.iterator]();;){var a;if(o){if(s>=r.length)break;a=r[s++]}else{if((s=r.next()).done)break;a=s.value}a.extend(e,{name:n,exports:i})}}))},e.mount=function(t){var e=this;void 0===t&&(t=""),m.mount(document.getElementById("modal"),{view:function(){return a.a.component({state:e.modal})}}),m.mount(document.getElementById("alerts"),{view:function(){return c.a.component({state:e.alerts})}}),this.drawer=new f.a,m.route(document.getElementById("content"),t+"/",Object(v.a)(this.routes,t));var n=new b.a((function(t){var e=$("#app"),n=e.offset().top;e.toggleClass("affix",t>=n).toggleClass("scrolled",t>n),$(".App-header").toggleClass("navbar-fixed-top",t>=n)}));n.start(),n.update(),$((function(){$("body").addClass("ontouchstart"in window?"touch":"no-touch")})),Object(y.a)()},e.preloadedApiDocument=function(){if(this.data.apiDocument){var t=this.store.pushPayload(this.data.apiDocument);return this.data.apiDocument=null,t}return null},e.screen=function(){return getComputedStyle(document.documentElement).getPropertyValue("--flarum-screen")},e.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){var t=this.titleCount?"("+this.titleCount+") ":"",e=this.title&&"/"!==m.route.get()?this.title+" - ":"",n=this.forum.attribute("title");document.title=t+e+n},e.request=function(t){var e=this,n=Object(i.a)({},t);if(n.background=n.background||!0,Object(w.extend)(n,"config",(function(t,n){return n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),"GET"!==n.method&&"POST"!==n.method){var r=n.method;Object(w.extend)(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 o=n.extract;return n.extract=function(t){var e;e=o?o(t.responseText):t.responseText||null;var i=t.status;if(i<200||i>299)throw new g.a(i,e,n,t);if(t.getResponseHeader){var r=t.getResponseHeader("X-CSRF-Token");r&&(app.session.csrfToken=r)}try{return JSON.parse(e)}catch(i){throw new g.a(500,e,n,t)}},this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),m.request(n).then((function(t){return t}),(function(t){var i;switch(t.status){case 422:i=t.response.errors.map((function(t){return[t.detail,m("br",null)]})).reduce((function(t,e){return t.concat(e)}),[]).slice(0,-1);break;case 401:case 403:i=app.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:i=app.translator.trans("core.lib.error.not_found_message");break;case 429:i=app.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:i=app.translator.trans("core.lib.error.generic_message")}var r=app.forum.attribute("debug"),o=t.response&&t.response.errors,a=Array.isArray(o)&&o[0]&&o[0].detail&&o.map((function(t){return decodeURI(t.detail)}));t.alert={type:"error",content:i,controls:r&&[m(s.a,{className:"Button Button--link",onclick:e.showDebug.bind(e,t,a)},"Debug")]};try{n.errorHandler(t)}catch(t){if(r&&t.xhr){var c,u=t.options,l=u.method,d=u.url,p=t.xhr.status,h=void 0===p?"":p;console.group(l+" "+d+" "+h),(c=console).error.apply(c,a||[t]),console.groupEnd()}e.requestErrorAlert=e.alerts.show(t.alert,t.alert.content)}return Promise.reject(t)}))},e.showDebug=function(t,e){this.alerts.dismiss(this.requestErrorAlert),this.modal.show(u.a,{error:t,formattedError:e})},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var i=n.path.replace(/:([^\/]+)/g,(function(t,n){return Object(h.a)(e,n)}));for(var r in e)e.hasOwnProperty(r)&&!e[r]&&delete e[r];var o=m.buildQueryString(e);return(""===m.route.prefix?this.forum.attribute("basePath"):"")+i+(o?"?"+o:"")},t}()},function(t,e,n){"use strict";function i(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(89);t.exports=n(109)(i,requestAnimationFrame,console)},function(t,e,n){"use strict";var i=n(90),r=n(91);t.exports=function(t,e){if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Template parameter names *must* be separated");if(null==e)return t;var n=t.indexOf("?"),o=t.indexOf("#"),s=o<0?t.length:o,a=n<0?s:n,c=t.slice(0,a),u={};r(u,e);var l=c.replace(/:([^\/\.-]+)(\.{3})?/g,(function(t,n,i){return delete u[n],null==e[n]?t:i?e[n]:encodeURIComponent(String(e[n]))})),d=l.indexOf("?"),p=l.indexOf("#"),h=p<0?l.length:p,f=d<0?h:d,m=l.slice(0,f);n>=0&&(m+=t.slice(n,s)),d>=0&&(m+=(n<0?"?":"&")+l.slice(d,h));var v=i(u);return v&&(m+=(n<0&&d<0?"?":"&")+v),o>=0&&(m+=t.slice(o)),p>=0&&(m+=(o<0?"":"&")+l.slice(p)),m}},function(t,e,n){"use strict";var i=n(92);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),r=n<0?t.length:n,o=e<0?r:e,s=t.slice(0,o).replace(/\/{2,}/g,"/");return s?("/"!==s[0]&&(s="/"+s),s.length>1&&"/"===s[s.length-1]&&(s=s.slice(0,-1))):s="/",{path:s,params:e<0?{}:i(t.slice(e+1,r))}}},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){t=t||{};var i=e.prototype,r={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};n.en.relativeTime=r;var o=function(e,i,o,s){for(var a,c,u,l=o.$locale().relativeTime||r,d=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],p=d.length,h=0;h<p;h+=1){var f=d[h];f.d&&(a=s?n(e).diff(o,f.d,!0):o.diff(e,f.d,!0));var m=(t.rounding||Math.round)(Math.abs(a));if(u=a>0,m<=f.r||!f.r){m<=1&&h>0&&(f=d[h-1]);var v=l[f.l];c="string"==typeof v?v.replace("%d",m):v(m,i,f.l,u);break}}return i?c:(u?l.future:l.past).replace("%s",c)};i.to=function(t,e){return o(t,e,this,!0)},i.from=function(t,e){return o(t,e,this)};var s=function(t){return t.$u?n.utc():n()};i.toNow=function(t){return this.to(s(this),t)},i.fromNow=function(t){return this.from(s(this),t)}}}()},function(t,e,n){"use strict";function i(t){return t>=1e6?Math.floor(t/1e6)+app.translator.trans("core.lib.number_suffix.mega_text"):t>=1e3?(t/1e3).toFixed(1)+app.translator.trans("core.lib.number_suffix.kilo_text"):t.toString()}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(t){this.el=t,this.$=$(t)}var e=t.prototype;return e.setValue=function(t){this.$.val(t).trigger("input"),this.el.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))},e.moveCursorTo=function(t){this.setSelectionRange(t,t)},e.getSelectionRange=function(){return[this.el.selectionStart,this.el.selectionEnd]},e.insertAtCursor=function(t){this.insertAt(this.el.selectionStart,t)},e.insertAt=function(t,e){this.insertBetween(t,t,e)},e.insertBetween=function(t,e,n){var i=this.el.value,r=i.slice(0,t),o=i.slice(e);this.setValue(""+r+n+o),this.moveCursorTo(t+n.length)},e.replaceBeforeCursor=function(t,e){this.insertBetween(t,this.el.selectionStart,e)},e.setSelectionRange=function(t,e){this.el.setSelectionRange(t,e),this.$.focus()},t}()},function(t,e,n){"use strict";var i=Array.isArray;e.a=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(2),r=n(0),o=n(15),s=n(3),a=n(7),c=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className+=" Dropdown--split",e.menuClassName+=" Dropdown-menu--right"};var n=e.prototype;return n.getButton=function(t){var e=this.getFirstChild(t),n=Object(i.a)({},e.attrs);return n.className=(n.className||"")+" SplitDropdown-button Button "+this.attrs.buttonClassName,[s.a.component(n,e.children),m("button",{className:"Dropdown-toggle Button Button--icon "+this.attrs.buttonClassName,"data-toggle":"dropdown"},Object(a.a)(this.attrs.icon,{className:"Button-icon"}),Object(a.a)("fas fa-caret-down",{className:"Button-caret"}))]},n.getFirstChild=function(t){for(var e=t;e instanceof Array;)e=e[0];return e},e}(o.a)},function(t,e,n){"use strict";function i(t,e){var n=$(window),i=$(t).offset().top-n.scrollTop();e(),n.scrollTop($(t).offset().top-i)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(7);function r(t){if(t.lastSeenAt()&&t.isOnline())return m("span",{className:"UserOnline"},Object(i.a)("fas fa-circle"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(28),r=n.n(i);function o(t){var e=r()(t),n=e.format(),i=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},i)}},function(t,e,n){"use strict";var i=n(26),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=i.a?i.a.toStringTag:void 0;var c=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(t){}var r=s.call(t);return i&&(e?t[a]=n:delete t[a]),r},u=Object.prototype.toString;var l=function(t){return u.call(t)},d=i.a?i.a.toStringTag:void 0;e.a=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":d&&d in Object(t)?c(t):l(t)}},function(t,e,n){"use strict";var i=n(102),r=n(105),o=n(71),s=function(){return i.apply(this,arguments)};s.m=i,s.trust=i.trust,s.fragment=i.fragment,s.mount=o.mount,s.route=n(111),s.render=n(89),s.redraw=o.redraw,s.request=r.request,s.jsonp=r.jsonp,s.parseQueryString=n(92),s.buildQueryString=n(90),s.parsePathname=n(73),s.buildPathname=n(72),s.vnode=n(33),s.PromisePolyfill=n(87),t.exports=s},function(t,e,n){"use strict";var i=n(33),r=n(85),o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,s={},a={}.hasOwnProperty;function c(t){for(var e in t)if(a.call(t,e))return!1;return!0}function u(t){for(var e,n="div",i=[],r={};e=o.exec(t);){var a=e[1],c=e[2];if(""===a&&""!==c)n=c;else if("#"===a)r.id=c;else if("."===a)i.push(c);else if("["===e[3][0]){var u=e[6];u&&(u=u.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?i.push(u):r[e[4]]=""===u?u:u||!0}}return i.length>0&&(r.className=i.join(" ")),s[t]={tag:n,attrs:r}}function l(t,e){var n=e.attrs,r=i.normalizeChildren(e.children),o=a.call(n,"class"),s=o?n.class:n.className;if(e.tag=t.tag,e.attrs=null,e.children=void 0,!c(t.attrs)&&!c(n)){var u={};for(var l in n)a.call(n,l)&&(u[l]=n[l]);n=u}for(var l in t.attrs)a.call(t.attrs,l)&&"className"!==l&&!a.call(n,l)&&(n[l]=t.attrs[l]);for(var l in null==s&&null==t.attrs.className||(n.className=null!=s?null!=t.attrs.className?String(t.attrs.className)+" "+String(s):s:null!=t.attrs.className?t.attrs.className:null),o&&(n.class=null),n)if(a.call(n,l)&&"key"!==l){e.attrs=n;break}return Array.isArray(r)&&1===r.length&&null!=r[0]&&"#"===r[0].tag?e.text=r[0].children:e.children=r,e}t.exports=function(t){if(null==t||"string"!=typeof t&&"function"!=typeof t&&"function"!=typeof t.view)throw Error("The selector must be either a string or a component.");var e=r.apply(1,arguments);return"string"==typeof t&&(e.children=i.normalizeChildren(e.children),"["!==t)?l(s[t]||u(t),e):(e.tag=t,e)}},function(t,e,n){"use strict";var i=n(33);t.exports=function(){var t,e=arguments[this],n=this+1;if(null==e?e={}:("object"!=typeof e||null!=e.tag||Array.isArray(e))&&(e={},n=this),arguments.length===n+1)t=arguments[n],Array.isArray(t)||(t=[t]);else for(t=[];n<arguments.length;)t.push(arguments[n++]);return i("",e.key,e,t)}},function(t,e,n){"use strict";(function(e){var i=n(87);"undefined"!=typeof window?(void 0===window.Promise?window.Promise=i:window.Promise.prototype.finally||(window.Promise.prototype.finally=i.prototype.finally),t.exports=window.Promise):void 0!==e?(void 0===e.Promise?e.Promise=i:e.Promise.prototype.finally||(e.Promise.prototype.finally=i.prototype.finally),t.exports=e.Promise):t.exports=i}).call(this,n(22))},function(t,e,n){"use strict";(function(e){var n=function(t){if(!(this instanceof n))throw new Error("Promise must be called with `new`");if("function"!=typeof t)throw new TypeError("executor must be a function");var i=this,r=[],o=[],s=l(r,!0),a=l(o,!1),c=i._instance={resolvers:r,rejectors:o},u="function"==typeof e?e:setTimeout;function l(t,e){return function n(s){var l;try{if(!e||null==s||"object"!=typeof s&&"function"!=typeof s||"function"!=typeof(l=s.then))u((function(){e||0!==t.length||console.error("Possible unhandled promise rejection:",s);for(var i=0;i<t.length;i++)t[i](s);r.length=0,o.length=0,c.state=e,c.retry=function(){n(s)}}));else{if(s===i)throw new TypeError("Promise can't be resolved w/ itself");d(l.bind(s))}}catch(t){a(t)}}}function d(t){var e=0;function n(t){return function(n){e++>0||t(n)}}var i=n(a);try{t(n(s),i)}catch(t){i(t)}}d(t)};n.prototype.then=function(t,e){var i,r,o=this._instance;function s(t,e,n,s){e.push((function(e){if("function"!=typeof t)n(e);else try{i(t(e))}catch(t){r&&r(t)}})),"function"==typeof o.retry&&s===o.state&&o.retry()}var a=new n((function(t,e){i=t,r=e}));return s(t,o.resolvers,i,!0),s(e,o.rejectors,r,!1),a},n.prototype.catch=function(t){return this.then(null,t)},n.prototype.finally=function(t){return this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){return n.reject(e)}))}))},n.resolve=function(t){return t instanceof n?t:new n((function(e){e(t)}))},n.reject=function(t){return new n((function(e,n){n(t)}))},n.all=function(t){return new n((function(e,n){var i=t.length,r=0,o=[];if(0===t.length)e([]);else for(var s=0;s<t.length;s++)!function(s){function a(t){r++,o[s]=t,r===i&&e(o)}null==t[s]||"object"!=typeof t[s]&&"function"!=typeof t[s]||"function"!=typeof t[s].then?a(t[s]):t[s].then(a,n)}(s)}))},n.race=function(t){return new n((function(e,n){for(var i=0;i<t.length;i++)t[i].then(e,n)}))},t.exports=n}).call(this,n(88).setImmediate)},function(t,e,n){(function(t){var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(106),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(22))},function(t,e,n){"use strict";t.exports=n(108)(window)},function(t,e,n){"use strict";t.exports=function(t){if("[object Object]"!==Object.prototype.toString.call(t))return"";var e=[];for(var n in t)i(n,t[n]);return e.join("&");function i(t,n){if(Array.isArray(n))for(var r=0;r<n.length;r++)i(t+"["+r+"]",n[r]);else if("[object Object]"===Object.prototype.toString.call(n))for(var r in n)i(t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+(null!=n&&""!==n?"="+encodeURIComponent(n):""))}}},function(t,e,n){"use strict";t.exports=Object.assign||function(t,e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))}},function(t,e,n){"use strict";t.exports=function(t){if(""===t||null==t)return{};"?"===t.charAt(0)&&(t=t.slice(1));for(var e=t.split("&"),n={},i={},r=0;r<e.length;r++){var o=e[r].split("="),s=decodeURIComponent(o[0]),a=2===o.length?decodeURIComponent(o[1]):"";"true"===a?a=!0:"false"===a&&(a=!1);var c=s.split(/\]\[?|\[/),u=i;s.indexOf("[")>-1&&c.pop();for(var l=0;l<c.length;l++){var d=c[l],p=c[l+1],h=""==p||!isNaN(parseInt(p,10));if(""===d)null==n[s=c.slice(0,l).join()]&&(n[s]=Array.isArray(u)?u.length:0),d=n[s]++;else if("__proto__"===d)break;if(l===c.length-1)u[d]=a;else{var f=Object.getOwnPropertyDescriptor(u,d);null!=f&&(f=f.value),null==f&&(u[d]=f=h?[]:{}),u=f}}}return i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i={};n.r(i),n.d(i,"Model",(function(){return l})),n.d(i,"PostTypes",(function(){return p})),n.d(i,"Routes",(function(){return h}));n(98),n(101),n(114),n(116),n(118),n(119),n(120),n(121),n(122),n(123);var r=n(74),o=n.n(r),s=n(94),a=n.n(s),c=n(52),u=n(5),l=function(){function t(t,e){void 0===e&&(e=null),Object(u.a)(this,"type",void 0),Object(u.a)(this,"attributes",[]),Object(u.a)(this,"hasOnes",[]),Object(u.a)(this,"hasManys",[]),this.type=t,this.model=e}var e=t.prototype;return e.attribute=function(t){return this.attributes.push(t),this},e.hasOne=function(t){return this.hasOnes.push(t),this},e.hasMany=function(t){return this.hasManys.push(t),this},e.extend=function(t,e){this.model&&(t.store.models[this.type]=this.model);var n=t.store.models[this.type];this.attributes.forEach((function(t){return n.prototype[t]=n.attribute(t)})),this.hasOnes.forEach((function(t){return n.prototype[t]=n.hasOne(t)})),this.hasManys.forEach((function(t){return n.prototype[t]=n.hasMany(t)}))},t}(),d=n(2),p=function(){function t(){Object(u.a)(this,"postComponents",{})}var e=t.prototype;return e.add=function(t,e){return this.postComponents[t]=e,this},e.extend=function(t,e){Object(d.a)(t.postComponents,this.postComponents)},t}(),h=function(){function t(){Object(u.a)(this,"routes",{})}var e=t.prototype;return e.add=function(t,e,n){return this.routes[t]={path:e,component:n},this},e.extend=function(t,e){Object(d.a)(t.routes,this.routes)},t}();dayjs.extend(o.a),dayjs.extend(a.a),Object(c.a)(window)},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var i=e.prototype,r=i.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,i.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var e=this.$locale().formats,n=void 0===e?{}:e,i=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,e,i){var r=i&&i.toUpperCase();return e||n[i]||o[i]||n[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}));return r.call(this,i)}}}()},function(t,e,n){"use strict";t.exports=n(124)},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(this,n(22))},function(t,e,n){"use strict";var i=n(40),r=n(60),o=n(59),s={handlers:null,getHandlers:function(t){return this.handlers=this.handlers||{},this.handlers[t]=this.handlers[t]||[],this.handlers[t]},trigger:function(t){for(var e=this,n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];this.getHandlers(t).forEach((function(t){return t.apply(e,i)}))},on:function(t,e){this.getHandlers(t).push(e)},one:function(t,e){this.getHandlers(t).push((function n(){e.apply(this,arguments),this.off(t,n)}))},off:function(t,e){var n=this.getHandlers(t),i=n.indexOf(e);-1!==i&&n.splice(i,1)}},a=n(63),c=n(6),u=n(2),l=n(0);var d=n(29),p=n(20),h=n(61),f=n(79),m=n(48),v=n(75),g=n(34),b=n(9),y=n(53),w=n(51),x=n(10),N=n(39),C=n(66),O=n(41),k=n(76),T=n(52),j=n(18),S=n(11),A=n(70),P=n(62),E=n(32),D=n(68),_=n(65),I=n(67),M=n(44),L=n(12),R=n(64),B=n(4),H=n(58),U=n(56),F=n(21),q=n(38),z=n(30),W=n(16),V=n(54),Y=n(27),K=n(15),G=n(78),X=n(57),J=n(31),Q=n(50),Z=n(49),tt=n(23),et=n(14),nt=n(24),it=n(45),rt=n(35),ot=n(55),st=n(3),at=n(13),ct=n(36),ut=n(1),lt=n(69),dt=n(81),pt=n(17),ht=n(7),ft=n(42);var mt=n(37),vt=n(19),gt=n(80),bt=n(8),yt=n(5),wt=function(){function t(){Object(yt.a)(this,"element",void 0)}var e=t.prototype;return e.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),e.render=function(){var t=this,e=this.view();e.attrs=e.attrs||{};var n=e.attrs.oncreate;return e.attrs.oncreate=function(e){t.element=e.dom,n&&n.apply(t,[e])},e},t}(),xt=n(46);e.a={extend:i,Session:r.a,Store:o.a,"utils/evented":s,"utils/liveHumanTimes":a.a,"utils/ItemList":c.a,"utils/mixin":function(t){for(var e=function(t){function e(){return t.apply(this,arguments)||this}return Object(l.a)(e,t),e}(t),n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.forEach((function(t){Object(u.a)(e.prototype,t)})),e},"utils/humanTime":d.a,"utils/computed":p.a,"utils/Drawer":h.a,"utils/anchorScroll":f.a,"utils/RequestError":m.a,"utils/abbreviateNumber":v.a,"utils/string":g,"utils/SubtreeRetainer":y.a,"utils/extract":x.a,"utils/ScrollListener":N.a,"utils/stringToColor":C.a,"utils/Stream":b.a,"utils/subclassOf":O.a,"utils/SuperTextarea":k.a,"utils/setRouteWithForcedRefresh":w.a,"utils/patchMithril":T.a,"utils/classList":j.a,"utils/extractText":S.a,"utils/formatNumber":A.a,"utils/mapRoutes":P.a,"utils/withAttr":E.a,"models/Notification":D.a,"models/User":_.a,"models/Post":I.a,"models/Discussion":M.a,"models/Group":L.a,"models/Forum":R.a,Component:B.a,Fragment:wt,Translator:H.a,"components/AlertManager":U.a,"components/Page":F.a,"components/Switch":q.a,"components/Badge":z.a,"components/LoadingIndicator":W.a,"components/Placeholder":V.a,"components/Separator":Y.a,"components/Dropdown":K.a,"components/SplitDropdown":G.a,"components/RequestErrorModal":X.a,"components/FieldSet":J.a,"components/Select":Q.a,"components/Navigation":Z.a,"components/Alert":tt.a,"components/Link":et.a,"components/LinkButton":nt.a,"components/Checkbox":it.a,"components/SelectDropdown":rt.a,"components/ModalManager":ot.a,"components/Button":st.a,"components/Modal":at.a,"components/GroupBadge":ct.a,Model:ut.a,Application:lt.a,"helpers/fullTime":dt.a,"helpers/avatar":pt.a,"helpers/icon":ht.a,"helpers/humanTime":ft.a,"helpers/punctuateSeries":function(t){if(2===t.length)return app.translator.trans("core.lib.series.two_text",{first:t[0],second:t[1]});if(t.length>=3){var e=t.slice(1,t.length-1).reduce((function(t,e){return t.concat([e,app.translator.trans("core.lib.series.glue_text")])}),[]).slice(0,-1);return app.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t},"helpers/highlight":mt.a,"helpers/username":vt.a,"helpers/userOnline":gt.a,"helpers/listItems":bt.a,"resolvers/DefaultResolver":xt.a}},function(t,e,n){(function(e){t.exports=e.$=n(99)}).call(this,n(22))},function(t,e,n){(function(e){t.exports=e.jQuery=n(100)}).call(this,n(22))},function(t,e,n){var i;
  /*!
   * jQuery JavaScript Library v3.5.1
   * https://jquery.com/
   *
   * Includes Sizzle.js
   * https://sizzlejs.com/
   *
   * Copyright JS Foundation and other contributors
   * Released under the MIT license
   * https://jquery.org/license
   *
   * Date: 2020-05-04T22:49Z
   */!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(n,r){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,c=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},u=o.push,l=o.indexOf,d={},p=d.toString,h=d.hasOwnProperty,f=h.toString,m=f.call(Object),v={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},b=function(t){return null!=t&&t===t.window},y=n.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var i,r,o=(n=n||y).createElement("script");if(o.text=t,e)for(i in w)(r=e[i]||e.getAttribute&&e.getAttribute(i))&&o.setAttribute(i,r);n.head.appendChild(o).parentNode.removeChild(o)}function N(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[p.call(t)]||"object":typeof t}var C=function(t,e){return new C.fn.init(t,e)};function O(t){var e=!!t&&"length"in t&&t.length,n=N(t);return!g(t)&&!b(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}C.fn=C.prototype={jquery:"3.5.1",constructor:C,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=C.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return C.each(this,t)},map:function(t){return this.pushStack(C.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(C.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:o.sort,splice:o.splice},C.extend=C.fn.extend=function(){var t,e,n,i,r,o,s=arguments[0]||{},a=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||g(s)||(s={}),a===c&&(s=this,a--);a<c;a++)if(null!=(t=arguments[a]))for(e in t)i=t[e],"__proto__"!==e&&s!==i&&(u&&i&&(C.isPlainObject(i)||(r=Array.isArray(i)))?(n=s[e],o=r&&!Array.isArray(n)?[]:r||C.isPlainObject(n)?n:{},r=!1,s[e]=C.extend(u,o,i)):void 0!==i&&(s[e]=i));return s},C.extend({expando:"jQuery"+("3.5.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==p.call(t))&&(!(e=s(t))||"function"==typeof(n=h.call(e,"constructor")&&e.constructor)&&f.call(n)===m)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){x(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,i=0;if(O(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},makeArray:function(t,e){var n=e||[];return null!=t&&(O(Object(t))?C.merge(n,"string"==typeof t?[t]:t):u.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:l.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,r=t.length;i<n;i++)t[r++]=e[i];return t.length=r,t},grep:function(t,e,n){for(var i=[],r=0,o=t.length,s=!n;r<o;r++)!e(t[r],r)!==s&&i.push(t[r]);return i},map:function(t,e,n){var i,r,o=0,s=[];if(O(t))for(i=t.length;o<i;o++)null!=(r=e(t[o],o,n))&&s.push(r);else for(o in t)null!=(r=e(t[o],o,n))&&s.push(r);return c(s)},guid:1,support:v}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=o[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){d["[object "+e+"]"]=e.toLowerCase()}));var k=
  /*!
   * Sizzle CSS Selector Engine v2.3.5
   * https://sizzlejs.com/
   *
   * Copyright JS Foundation and other contributors
   * Released under the MIT license
   * https://js.foundation/
   *
   * Date: 2020-03-14
   */
  function(t){var e,n,i,r,o,s,a,c,u,l,d,p,h,f,m,v,g,b,y,w="sizzle"+1*new Date,x=t.document,N=0,C=0,O=ct(),k=ct(),T=ct(),j=ct(),S=function(t,e){return t===e&&(d=!0),0},A={}.hasOwnProperty,P=[],E=P.pop,D=P.push,$=P.push,_=P.slice,I=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",R="(?:\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",B="\\["+L+"*("+R+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+L+"*\\]",H=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",U=new RegExp(L+"+","g"),F=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),q=new RegExp("^"+L+"*,"+L+"*"),z=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),W=new RegExp(L+"|>"),V=new RegExp(H),Y=new RegExp("^"+R+"$"),K={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,rt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){p()},st=wt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{$.apply(P=_.call(x.childNodes),x.childNodes),P[x.childNodes.length].nodeType}catch(t){$={apply:P.length?function(t,e){D.apply(t,_.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function at(t,e,i,r){var o,a,u,l,d,f,g,b=e&&e.ownerDocument,x=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return i;if(!r&&(p(e),e=e||h,m)){if(11!==x&&(d=Z.exec(t)))if(o=d[1]){if(9===x){if(!(u=e.getElementById(o)))return i;if(u.id===o)return i.push(u),i}else if(b&&(u=b.getElementById(o))&&y(e,u)&&u.id===o)return i.push(u),i}else{if(d[2])return $.apply(i,e.getElementsByTagName(t)),i;if((o=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return $.apply(i,e.getElementsByClassName(o)),i}if(n.qsa&&!j[t+" "]&&(!v||!v.test(t))&&(1!==x||"object"!==e.nodeName.toLowerCase())){if(g=t,b=e,1===x&&(W.test(t)||z.test(t))){for((b=tt.test(t)&&gt(e.parentNode)||e)===e&&n.scope||((l=e.getAttribute("id"))?l=l.replace(it,rt):e.setAttribute("id",l=w)),a=(f=s(t)).length;a--;)f[a]=(l?"#"+l:":scope")+" "+yt(f[a]);g=f.join(",")}try{return $.apply(i,b.querySelectorAll(g)),i}catch(e){j(t,!0)}finally{l===w&&e.removeAttribute("id")}}}return c(t.replace(F,"$1"),e,i,r)}function ct(){var t=[];return function e(n,r){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function ut(t){return t[w]=!0,t}function lt(t){var e=h.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function dt(t,e){for(var n=t.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=e}function pt(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ht(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ft(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&st(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function vt(t){return ut((function(e){return e=+e,ut((function(n,i){for(var r,o=t([],n.length,e),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))}))}))}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=at.support={},o=at.isXML=function(t){var e=t.namespaceURI,n=(t.ownerDocument||t).documentElement;return!G.test(e||n&&n.nodeName||"HTML")},p=at.setDocument=function(t){var e,r,s=t?t.ownerDocument||t:x;return s!=h&&9===s.nodeType&&s.documentElement?(f=(h=s).documentElement,m=!o(h),x!=h&&(r=h.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",ot,!1):r.attachEvent&&r.attachEvent("onunload",ot)),n.scope=lt((function(t){return f.appendChild(t).appendChild(h.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=lt((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=lt((function(t){return t.appendChild(h.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(h.getElementsByClassName),n.getById=lt((function(t){return f.appendChild(t).id=w,!h.getElementsByName||!h.getElementsByName(w).length})),n.getById?(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n,i,r,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(r=e.getElementsByName(t),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),i.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},g=[],v=[],(n.qsa=Q.test(h.querySelectorAll))&&(lt((function(t){var e;f.appendChild(t).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+L+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\["+L+"*(?:value|"+M+")"),t.querySelectorAll("[id~="+w+"-]").length||v.push("~="),(e=h.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||v.push("\\["+L+"*name"+L+"*="+L+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]"),t.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),lt((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=h.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name"+L+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=Q.test(b=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&lt((function(t){n.disconnectedMatch=b.call(t,"*"),b.call(t,"[s!='']:x"),g.push("!=",H)})),v=v.length&&new RegExp(v.join("|")),g=g.length&&new RegExp(g.join("|")),e=Q.test(f.compareDocumentPosition),y=e||Q.test(f.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S=e?function(t,e){if(t===e)return d=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t==h||t.ownerDocument==x&&y(x,t)?-1:e==h||e.ownerDocument==x&&y(x,e)?1:l?I(l,t)-I(l,e):0:4&i?-1:1)}:function(t,e){if(t===e)return d=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,s=[t],a=[e];if(!r||!o)return t==h?-1:e==h?1:r?-1:o?1:l?I(l,t)-I(l,e):0;if(r===o)return pt(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?pt(s[i],a[i]):s[i]==x?-1:a[i]==x?1:0},h):h},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(p(t),n.matchesSelector&&m&&!j[e+" "]&&(!g||!g.test(e))&&(!v||!v.test(e)))try{var i=b.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){j(e,!0)}return at(e,h,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!=h&&p(t),y(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!=h&&p(t);var r=i.attrHandle[e.toLowerCase()],o=r&&A.call(i.attrHandle,e.toLowerCase())?r(t,e,!m):void 0;return void 0!==o?o:n.attributes||!m?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},at.escape=function(t){return(t+"").replace(it,rt)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,i=[],r=0,o=0;if(d=!n.detectDuplicates,l=!n.sortStable&&t.slice(0),t.sort(S),d){for(;e=t[o++];)e===t[o]&&(r=i.push(o));for(;r--;)t.splice(i[r],1)}return l=null,t},r=at.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=r(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=r(e);return n},(i=at.selectors={cacheLength:50,createPseudo:ut,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return K.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&V.test(n)&&(e=s(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=O[t+" "];return e||(e=new RegExp("(^|"+L+")"+t+"("+L+"|$)"))&&O(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(i){var r=at.attr(i,t);return null==r?"!="===e:!e||(r+="","="===e?r===n:"!="===e?r!==n:"^="===e?n&&0===r.indexOf(n):"*="===e?n&&r.indexOf(n)>-1:"$="===e?n&&r.slice(-n.length)===n:"~="===e?(" "+r.replace(U," ")+" ").indexOf(n)>-1:"|="===e&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,c){var u,l,d,p,h,f,m=o!==s?"nextSibling":"previousSibling",v=e.parentNode,g=a&&e.nodeName.toLowerCase(),b=!c&&!a,y=!1;if(v){if(o){for(;m;){for(p=e;p=p[m];)if(a?p.nodeName.toLowerCase()===g:1===p.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?v.firstChild:v.lastChild],s&&b){for(y=(h=(u=(l=(d=(p=v)[w]||(p[w]={}))[p.uniqueID]||(d[p.uniqueID]={}))[t]||[])[0]===N&&u[1])&&u[2],p=h&&v.childNodes[h];p=++h&&p&&p[m]||(y=h=0)||f.pop();)if(1===p.nodeType&&++y&&p===e){l[t]=[N,h,y];break}}else if(b&&(y=h=(u=(l=(d=(p=e)[w]||(p[w]={}))[p.uniqueID]||(d[p.uniqueID]={}))[t]||[])[0]===N&&u[1]),!1===y)for(;(p=++h&&p&&p[m]||(y=h=0)||f.pop())&&((a?p.nodeName.toLowerCase()!==g:1!==p.nodeType)||!++y||(b&&((l=(d=p[w]||(p[w]={}))[p.uniqueID]||(d[p.uniqueID]={}))[t]=[N,y]),p!==e)););return(y-=r)===i||y%i==0&&y/i>=0}}},PSEUDO:function(t,e){var n,r=i.pseudos[t]||i.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return r[w]?r(e):r.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?ut((function(t,n){for(var i,o=r(t,e),s=o.length;s--;)t[i=I(t,o[s])]=!(n[i]=o[s])})):function(t){return r(t,0,n)}):r}},pseudos:{not:ut((function(t){var e=[],n=[],i=a(t.replace(F,"$1"));return i[w]?ut((function(t,e,n,r){for(var o,s=i(t,null,r,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))})):function(t,r,o){return e[0]=t,i(e,null,o,n),e[0]=null,!n.pop()}})),has:ut((function(t){return function(e){return at(t,e).length>0}})),contains:ut((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||r(e)).indexOf(t)>-1}})),lang:ut((function(t){return Y.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===f},focus:function(t){return t===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},header:function(t){return J.test(t.nodeName)},input:function(t){return X.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:vt((function(){return[0]})),last:vt((function(t,e){return[e-1]})),eq:vt((function(t,e,n){return[n<0?n+e:n]})),even:vt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:vt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:vt((function(t,e,n){for(var i=n<0?n+e:n>e?e:n;--i>=0;)t.push(i);return t})),gt:vt((function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t}))}}).pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=ht(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=ft(e);function bt(){}function yt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function wt(t,e,n){var i=e.dir,r=e.next,o=r||i,s=n&&"parentNode"===o,a=C++;return e.first?function(e,n,r){for(;e=e[i];)if(1===e.nodeType||s)return t(e,n,r);return!1}:function(e,n,c){var u,l,d,p=[N,a];if(c){for(;e=e[i];)if((1===e.nodeType||s)&&t(e,n,c))return!0}else for(;e=e[i];)if(1===e.nodeType||s)if(l=(d=e[w]||(e[w]={}))[e.uniqueID]||(d[e.uniqueID]={}),r&&r===e.nodeName.toLowerCase())e=e[i]||e;else{if((u=l[o])&&u[0]===N&&u[1]===a)return p[2]=u[2];if(l[o]=p,p[2]=t(e,n,c))return!0}return!1}}function xt(t){return t.length>1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function Nt(t,e,n,i,r){for(var o,s=[],a=0,c=t.length,u=null!=e;a<c;a++)(o=t[a])&&(n&&!n(o,i,r)||(s.push(o),u&&e.push(a)));return s}function Ct(t,e,n,i,r,o){return i&&!i[w]&&(i=Ct(i)),r&&!r[w]&&(r=Ct(r,o)),ut((function(o,s,a,c){var u,l,d,p=[],h=[],f=s.length,m=o||function(t,e,n){for(var i=0,r=e.length;i<r;i++)at(t,e[i],n);return n}(e||"*",a.nodeType?[a]:a,[]),v=!t||!o&&e?m:Nt(m,p,t,a,c),g=n?r||(o?t:f||i)?[]:s:v;if(n&&n(v,g,a,c),i)for(u=Nt(g,h),i(u,[],a,c),l=u.length;l--;)(d=u[l])&&(g[h[l]]=!(v[h[l]]=d));if(o){if(r||t){if(r){for(u=[],l=g.length;l--;)(d=g[l])&&u.push(v[l]=d);r(null,g=[],u,c)}for(l=g.length;l--;)(d=g[l])&&(u=r?I(o,d):p[l])>-1&&(o[u]=!(s[u]=d))}}else g=Nt(g===s?g.splice(f,g.length):g),r?r(null,s,g,c):$.apply(s,g)}))}function Ot(t){for(var e,n,r,o=t.length,s=i.relative[t[0].type],a=s||i.relative[" "],c=s?1:0,l=wt((function(t){return t===e}),a,!0),d=wt((function(t){return I(e,t)>-1}),a,!0),p=[function(t,n,i){var r=!s&&(i||n!==u)||((e=n).nodeType?l(t,n,i):d(t,n,i));return e=null,r}];c<o;c++)if(n=i.relative[t[c].type])p=[wt(xt(p),n)];else{if((n=i.filter[t[c].type].apply(null,t[c].matches))[w]){for(r=++c;r<o&&!i.relative[t[r].type];r++);return Ct(c>1&&xt(p),c>1&&yt(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(F,"$1"),n,c<r&&Ot(t.slice(c,r)),r<o&&Ot(t=t.slice(r)),r<o&&yt(t))}p.push(n)}return xt(p)}return bt.prototype=i.filters=i.pseudos,i.setFilters=new bt,s=at.tokenize=function(t,e){var n,r,o,s,a,c,u,l=k[t+" "];if(l)return e?0:l.slice(0);for(a=t,c=[],u=i.preFilter;a;){for(s in n&&!(r=q.exec(a))||(r&&(a=a.slice(r[0].length)||a),c.push(o=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(F," ")}),a=a.slice(n.length)),i.filter)!(r=K[s].exec(a))||u[s]&&!(r=u[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return e?a.length:a?at.error(t):k(t,c).slice(0)},a=at.compile=function(t,e){var n,r=[],o=[],a=T[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=Ot(e[n]))[w]?r.push(a):o.push(a);(a=T(t,function(t,e){var n=e.length>0,r=t.length>0,o=function(o,s,a,c,l){var d,f,v,g=0,b="0",y=o&&[],w=[],x=u,C=o||r&&i.find.TAG("*",l),O=N+=null==x?1:Math.random()||.1,k=C.length;for(l&&(u=s==h||s||l);b!==k&&null!=(d=C[b]);b++){if(r&&d){for(f=0,s||d.ownerDocument==h||(p(d),a=!m);v=t[f++];)if(v(d,s||h,a)){c.push(d);break}l&&(N=O)}n&&((d=!v&&d)&&g--,o&&y.push(d))}if(g+=b,n&&b!==g){for(f=0;v=e[f++];)v(y,w,s,a);if(o){if(g>0)for(;b--;)y[b]||w[b]||(w[b]=E.call(c));w=Nt(w)}$.apply(c,w),l&&!o&&w.length>0&&g+e.length>1&&at.uniqueSort(c)}return l&&(N=O,u=x),y};return n?ut(o):o}(o,r))).selector=t}return a},c=at.select=function(t,e,n,r){var o,c,u,l,d,p="function"==typeof t&&t,h=!r&&s(t=p.selector||t);if(n=n||[],1===h.length){if((c=h[0]=h[0].slice(0)).length>2&&"ID"===(u=c[0]).type&&9===e.nodeType&&m&&i.relative[c[1].type]){if(!(e=(i.find.ID(u.matches[0].replace(et,nt),e)||[])[0]))return n;p&&(e=e.parentNode),t=t.slice(c.shift().value.length)}for(o=K.needsContext.test(t)?0:c.length;o--&&(u=c[o],!i.relative[l=u.type]);)if((d=i.find[l])&&(r=d(u.matches[0].replace(et,nt),tt.test(c[0].type)&&gt(e.parentNode)||e))){if(c.splice(o,1),!(t=r.length&&yt(c)))return $.apply(n,r),n;break}}return(p||a(t,h))(r,e,!m,n,!e||tt.test(t)&&gt(e.parentNode)||e),n},n.sortStable=w.split("").sort(S).join("")===w,n.detectDuplicates=!!d,p(),n.sortDetached=lt((function(t){return 1&t.compareDocumentPosition(h.createElement("fieldset"))})),lt((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||dt("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&lt((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||dt("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),lt((function(t){return null==t.getAttribute("disabled")}))||dt(M,(function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null})),at}(n);C.find=k,C.expr=k.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=k.uniqueSort,C.text=k.getText,C.isXMLDoc=k.isXML,C.contains=k.contains,C.escapeSelector=k.escape;var T=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&C(t).is(n))break;i.push(t)}return i},j=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},S=C.expr.match.needsContext;function A(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var P=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function E(t,e,n){return g(e)?C.grep(t,(function(t,i){return!!e.call(t,i,t)!==n})):e.nodeType?C.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?C.grep(t,(function(t){return l.call(e,t)>-1!==n})):C.filter(e,t,n)}C.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?C.find.matchesSelector(i,t)?[i]:[]:C.find.matches(t,C.grep(e,(function(t){return 1===t.nodeType})))},C.fn.extend({find:function(t){var e,n,i=this.length,r=this;if("string"!=typeof t)return this.pushStack(C(t).filter((function(){for(e=0;e<i;e++)if(C.contains(r[e],this))return!0})));for(n=this.pushStack([]),e=0;e<i;e++)C.find(t,r[e],n);return i>1?C.uniqueSort(n):n},filter:function(t){return this.pushStack(E(this,t||[],!1))},not:function(t){return this.pushStack(E(this,t||[],!0))},is:function(t){return!!E(this,"string"==typeof t&&S.test(t)?C(t):t||[],!1).length}});var D,$=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||D,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:$.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof C?e[0]:e,C.merge(this,C.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:y,!0)),P.test(i[1])&&C.isPlainObject(e))for(i in e)g(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=y.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):g(t)?void 0!==n.ready?n.ready(t):t(C):C.makeArray(t,this)}).prototype=C.fn,D=C(y);var _=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function M(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}C.fn.extend({has:function(t){var e=C(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(C.contains(this,e[t]))return!0}))},closest:function(t,e){var n,i=0,r=this.length,o=[],s="string"!=typeof t&&C(t);if(!S.test(t))for(;i<r;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&C.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?C.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?l.call(C(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),C.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return T(t,"parentNode")},parentsUntil:function(t,e,n){return T(t,"parentNode",n)},next:function(t){return M(t,"nextSibling")},prev:function(t){return M(t,"previousSibling")},nextAll:function(t){return T(t,"nextSibling")},prevAll:function(t){return T(t,"previousSibling")},nextUntil:function(t,e,n){return T(t,"nextSibling",n)},prevUntil:function(t,e,n){return T(t,"previousSibling",n)},siblings:function(t){return j((t.parentNode||{}).firstChild,t)},children:function(t){return j(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(A(t,"template")&&(t=t.content||t),C.merge([],t.childNodes))}},(function(t,e){C.fn[t]=function(n,i){var r=C.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=C.filter(i,r)),this.length>1&&(I[t]||C.uniqueSort(r),_.test(t)&&r.reverse()),this.pushStack(r)}}));var L=/[^\x20\t\r\n\f]+/g;function R(t){return t}function B(t){throw t}function H(t,e,n,i){var r;try{t&&g(r=t.promise)?r.call(t).done(e).fail(n):t&&g(r=t.then)?r.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}C.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return C.each(t.match(L)||[],(function(t,n){e[n]=!0})),e}(t):C.extend({},t);var e,n,i,r,o=[],s=[],a=-1,c=function(){for(r=r||t.once,i=e=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=o.length,n=!1);t.memory||(n=!1),e=!1,r&&(o=n?[]:"")},u={add:function(){return o&&(n&&!e&&(a=o.length-1,s.push(n)),function e(n){C.each(n,(function(n,i){g(i)?t.unique&&u.has(i)||o.push(i):i&&i.length&&"string"!==N(i)&&e(i)}))}(arguments),n&&!e&&c()),this},remove:function(){return C.each(arguments,(function(t,e){for(var n;(n=C.inArray(e,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(t){return t?C.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||e||(o=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},C.extend({Deferred:function(t){var e=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return C.Deferred((function(n){C.each(e,(function(e,i){var r=g(t[i[4]])&&t[i[4]];o[i[1]]((function(){var t=r&&r.apply(this,arguments);t&&g(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[t]:arguments)}))})),t=null})).promise()},then:function(t,i,r){var o=0;function s(t,e,i,r){return function(){var a=this,c=arguments,u=function(){var n,u;if(!(t<o)){if((n=i.apply(a,c))===e.promise())throw new TypeError("Thenable self-resolution");u=n&&("object"==typeof n||"function"==typeof n)&&n.then,g(u)?r?u.call(n,s(o,e,R,r),s(o,e,B,r)):(o++,u.call(n,s(o,e,R,r),s(o,e,B,r),s(o,e,R,e.notifyWith))):(i!==R&&(a=void 0,c=[n]),(r||e.resolveWith)(a,c))}},l=r?u:function(){try{u()}catch(n){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(n,l.stackTrace),t+1>=o&&(i!==B&&(a=void 0,c=[n]),e.rejectWith(a,c))}};t?l():(C.Deferred.getStackHook&&(l.stackTrace=C.Deferred.getStackHook()),n.setTimeout(l))}}return C.Deferred((function(n){e[0][3].add(s(0,n,g(r)?r:R,n.notifyWith)),e[1][3].add(s(0,n,g(t)?t:R)),e[2][3].add(s(0,n,g(i)?i:B))})).promise()},promise:function(t){return null!=t?C.extend(t,r):r}},o={};return C.each(e,(function(t,n){var s=n[2],a=n[5];r[n[1]]=s.add,a&&s.add((function(){i=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith})),r.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,i=Array(n),r=a.call(arguments),o=C.Deferred(),s=function(t){return function(n){i[t]=this,r[t]=arguments.length>1?a.call(arguments):n,--e||o.resolveWith(i,r)}};if(e<=1&&(H(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||g(r[n]&&r[n].then)))return o.then();for(;n--;)H(r[n],s(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&U.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},C.readyException=function(t){n.setTimeout((function(){throw t}))};var F=C.Deferred();function q(){y.removeEventListener("DOMContentLoaded",q),n.removeEventListener("load",q),C.ready()}C.fn.ready=function(t){return F.then(t).catch((function(t){C.readyException(t)})),this},C.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--C.readyWait:C.isReady)||(C.isReady=!0,!0!==t&&--C.readyWait>0||F.resolveWith(y,[C]))}}),C.ready.then=F.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?n.setTimeout(C.ready):(y.addEventListener("DOMContentLoaded",q),n.addEventListener("load",q));var z=function(t,e,n,i,r,o,s){var a=0,c=t.length,u=null==n;if("object"===N(n))for(a in r=!0,n)z(t,e,a,n[a],!0,o,s);else if(void 0!==i&&(r=!0,g(i)||(s=!0),u&&(s?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(C(t),n)})),e))for(;a<c;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return r?t:u?e.call(t):c?e(t[0],n):o},W=/^-ms-/,V=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function K(t){return t.replace(W,"ms-").replace(V,Y)}var G=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function X(){this.expando=C.expando+X.uid++}X.uid=1,X.prototype={cache:function(t){var e=t[this.expando];return e||(e={},G(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,r=this.cache(t);if("string"==typeof e)r[K(e)]=n;else for(i in e)r[K(i)]=e[i];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][K(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i=t[this.expando];if(void 0!==i){if(void 0!==e){n=(e=Array.isArray(e)?e.map(K):(e=K(e))in i?[e]:e.match(L)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||C.isEmptyObject(i))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!C.isEmptyObject(e)}};var J=new X,Q=new X,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,tt=/[A-Z]/g;function et(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(tt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Z.test(t)?JSON.parse(t):t)}(n)}catch(t){}Q.set(t,e,n)}else n=void 0;return n}C.extend({hasData:function(t){return Q.hasData(t)||J.hasData(t)},data:function(t,e,n){return Q.access(t,e,n)},removeData:function(t,e){Q.remove(t,e)},_data:function(t,e,n){return J.access(t,e,n)},_removeData:function(t,e){J.remove(t,e)}}),C.fn.extend({data:function(t,e){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(r=Q.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=K(i.slice(5)),et(o,i,r[i]));J.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each((function(){Q.set(this,t)})):z(this,(function(e){var n;if(o&&void 0===e)return void 0!==(n=Q.get(o,t))||void 0!==(n=et(o,t))?n:void 0;this.each((function(){Q.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){Q.remove(this,t)}))}}),C.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=J.get(t,e),n&&(!i||Array.isArray(n)?i=J.access(t,e,C.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=C.queue(t,e),i=n.length,r=n.shift(),o=C._queueHooks(t,e);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,(function(){C.dequeue(t,e)}),o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return J.get(t,n)||J.access(t,n,{empty:C.Callbacks("once memory").add((function(){J.remove(t,[e+"queue",n])}))})}}),C.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?C.queue(this[0],t):void 0===e?this:this.each((function(){var n=C.queue(this,t,e);C._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&C.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){C.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=C.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=J.get(o[s],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(e)}});var nt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,it=new RegExp("^(?:([+-])=|)("+nt+")([a-z%]*)$","i"),rt=["Top","Right","Bottom","Left"],ot=y.documentElement,st=function(t){return C.contains(t.ownerDocument,t)},at={composed:!0};ot.getRootNode&&(st=function(t){return C.contains(t.ownerDocument,t)||t.getRootNode(at)===t.ownerDocument});var ct=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&st(t)&&"none"===C.css(t,"display")};function ut(t,e,n,i){var r,o,s=20,a=i?function(){return i.cur()}:function(){return C.css(t,e,"")},c=a(),u=n&&n[3]||(C.cssNumber[e]?"":"px"),l=t.nodeType&&(C.cssNumber[e]||"px"!==u&&+c)&&it.exec(C.css(t,e));if(l&&l[3]!==u){for(c/=2,u=u||l[3],l=+c||1;s--;)C.style(t,e,l+u),(1-o)*(1-(o=a()/c||.5))<=0&&(s=0),l/=o;l*=2,C.style(t,e,l+u),n=n||[]}return n&&(l=+l||+c||0,r=n[1]?l+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=l,i.end=r)),r}var lt={};function dt(t){var e,n=t.ownerDocument,i=t.nodeName,r=lt[i];return r||(e=n.body.appendChild(n.createElement(i)),r=C.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),lt[i]=r,r)}function pt(t,e){for(var n,i,r=[],o=0,s=t.length;o<s;o++)(i=t[o]).style&&(n=i.style.display,e?("none"===n&&(r[o]=J.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&ct(i)&&(r[o]=dt(i))):"none"!==n&&(r[o]="none",J.set(i,"display",n)));for(o=0;o<s;o++)null!=r[o]&&(t[o].style.display=r[o]);return t}C.fn.extend({show:function(){return pt(this,!0)},hide:function(){return pt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ct(this)?C(this).show():C(this).hide()}))}});var ht,ft,mt=/^(?:checkbox|radio)$/i,vt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,gt=/^$|^module$|\/(?:java|ecma)script/i;ht=y.createDocumentFragment().appendChild(y.createElement("div")),(ft=y.createElement("input")).setAttribute("type","radio"),ft.setAttribute("checked","checked"),ft.setAttribute("name","t"),ht.appendChild(ft),v.checkClone=ht.cloneNode(!0).cloneNode(!0).lastChild.checked,ht.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ht.cloneNode(!0).lastChild.defaultValue,ht.innerHTML="<option></option>",v.option=!!ht.lastChild;var bt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function yt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&A(t,e)?C.merge([t],n):n}function wt(t,e){for(var n=0,i=t.length;n<i;n++)J.set(t[n],"globalEval",!e||J.get(e[n],"globalEval"))}bt.tbody=bt.tfoot=bt.colgroup=bt.caption=bt.thead,bt.th=bt.td,v.option||(bt.optgroup=bt.option=[1,"<select multiple='multiple'>","</select>"]);var xt=/<|&#?\w+;/;function Nt(t,e,n,i,r){for(var o,s,a,c,u,l,d=e.createDocumentFragment(),p=[],h=0,f=t.length;h<f;h++)if((o=t[h])||0===o)if("object"===N(o))C.merge(p,o.nodeType?[o]:o);else if(xt.test(o)){for(s=s||d.appendChild(e.createElement("div")),a=(vt.exec(o)||["",""])[1].toLowerCase(),c=bt[a]||bt._default,s.innerHTML=c[1]+C.htmlPrefilter(o)+c[2],l=c[0];l--;)s=s.lastChild;C.merge(p,s.childNodes),(s=d.firstChild).textContent=""}else p.push(e.createTextNode(o));for(d.textContent="",h=0;o=p[h++];)if(i&&C.inArray(o,i)>-1)r&&r.push(o);else if(u=st(o),s=yt(d.appendChild(o),"script"),u&&wt(s),n)for(l=0;o=s[l++];)gt.test(o.type||"")&&n.push(o);return d}var Ct=/^key/,Ot=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,kt=/^([^.]*)(?:\.(.+)|)/;function Tt(){return!0}function jt(){return!1}function St(t,e){return t===function(){try{return y.activeElement}catch(t){}}()==("focus"===e)}function At(t,e,n,i,r,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=void 0),e)At(t,a,n,i,e[a],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=jt;else if(!r)return t;return 1===o&&(s=r,(r=function(t){return C().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=C.guid++)),t.each((function(){C.event.add(this,e,r,i,n)}))}function Pt(t,e,n){n?(J.set(t,e,!1),C.event.add(t,e,{namespace:!1,handler:function(t){var i,r,o=J.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(C.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=a.call(arguments),J.set(this,e,o),i=n(this,e),this[e](),o!==(r=J.get(this,e))||i?J.set(this,e,!1):r={},o!==r)return t.stopImmediatePropagation(),t.preventDefault(),r.value}else o.length&&(J.set(this,e,{value:C.event.trigger(C.extend(o[0],C.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===J.get(t,e)&&C.event.add(t,e,Tt)}C.event={global:{},add:function(t,e,n,i,r){var o,s,a,c,u,l,d,p,h,f,m,v=J.get(t);if(G(t))for(n.handler&&(n=(o=n).handler,r=o.selector),r&&C.find.matchesSelector(ot,r),n.guid||(n.guid=C.guid++),(c=v.events)||(c=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(e){return void 0!==C&&C.event.triggered!==e.type?C.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(L)||[""]).length;u--;)h=m=(a=kt.exec(e[u])||[])[1],f=(a[2]||"").split(".").sort(),h&&(d=C.event.special[h]||{},h=(r?d.delegateType:d.bindType)||h,d=C.event.special[h]||{},l=C.extend({type:h,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&C.expr.match.needsContext.test(r),namespace:f.join(".")},o),(p=c[h])||((p=c[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,i,f,s)||t.addEventListener&&t.addEventListener(h,s)),d.add&&(d.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,l):p.push(l),C.event.global[h]=!0)},remove:function(t,e,n,i,r){var o,s,a,c,u,l,d,p,h,f,m,v=J.hasData(t)&&J.get(t);if(v&&(c=v.events)){for(u=(e=(e||"").match(L)||[""]).length;u--;)if(h=m=(a=kt.exec(e[u])||[])[1],f=(a[2]||"").split(".").sort(),h){for(d=C.event.special[h]||{},p=c[h=(i?d.delegateType:d.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)l=p[o],!r&&m!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||i&&i!==l.selector&&("**"!==i||!l.selector)||(p.splice(o,1),l.selector&&p.delegateCount--,d.remove&&d.remove.call(t,l));s&&!p.length&&(d.teardown&&!1!==d.teardown.call(t,f,v.handle)||C.removeEvent(t,h,v.handle),delete c[h])}else for(h in c)C.event.remove(t,h+e[u],n,i,!0);C.isEmptyObject(c)&&J.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,o,s,a=new Array(arguments.length),c=C.event.fix(t),u=(J.get(this,"events")||Object.create(null))[c.type]||[],l=C.event.special[c.type]||{};for(a[0]=c,e=1;e<arguments.length;e++)a[e]=arguments[e];if(c.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,c)){for(s=C.event.handlers.call(this,c,u),e=0;(r=s[e++])&&!c.isPropagationStopped();)for(c.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!c.isImmediatePropagationStopped();)c.rnamespace&&!1!==o.namespace&&!c.rnamespace.test(o.namespace)||(c.handleObj=o,c.data=o.data,void 0!==(i=((C.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a))&&!1===(c.result=i)&&(c.preventDefault(),c.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,c),c.result}},handlers:function(t,e){var n,i,r,o,s,a=[],c=e.delegateCount,u=t.target;if(c&&u.nodeType&&!("click"===t.type&&t.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],s={},n=0;n<c;n++)void 0===s[r=(i=e[n]).selector+" "]&&(s[r]=i.needsContext?C(r,this).index(u)>-1:C.find(r,this,null,[u]).length),s[r]&&o.push(i);o.length&&a.push({elem:u,handlers:o})}return u=this,c<e.length&&a.push({elem:u,handlers:e.slice(c)}),a},addProp:function(t,e){Object.defineProperty(C.Event.prototype,t,{enumerable:!0,configurable:!0,get:g(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[C.expando]?t:new C.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return mt.test(e.type)&&e.click&&A(e,"input")&&Pt(e,"click",Tt),!1},trigger:function(t){var e=this||t;return mt.test(e.type)&&e.click&&A(e,"input")&&Pt(e,"click"),!0},_default:function(t){var e=t.target;return mt.test(e.type)&&e.click&&A(e,"input")&&J.get(e,"click")||A(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},C.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},C.Event=function(t,e){if(!(this instanceof C.Event))return new C.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Tt:jt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&C.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[C.expando]=!0},C.Event.prototype={constructor:C.Event,isDefaultPrevented:jt,isPropagationStopped:jt,isImmediatePropagationStopped:jt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Tt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Tt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Tt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},C.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&Ct.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&Ot.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},C.event.addProp),C.each({focus:"focusin",blur:"focusout"},(function(t,e){C.event.special[t]={setup:function(){return Pt(this,t,St),!1},trigger:function(){return Pt(this,t),!0},delegateType:e}})),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){C.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,r=t.relatedTarget,o=t.handleObj;return r&&(r===i||C.contains(i,r))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),C.fn.extend({on:function(t,e,n,i){return At(this,t,e,n,i)},one:function(t,e,n,i){return At(this,t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,C(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=jt),this.each((function(){C.event.remove(this,t,n,e)}))}});var Et=/<script|<style|<link/i,Dt=/checked\s*(?:[^=]|=\s*.checked.)/i,$t=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function _t(t,e){return A(t,"table")&&A(11!==e.nodeType?e:e.firstChild,"tr")&&C(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Mt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Lt(t,e){var n,i,r,o,s,a;if(1===e.nodeType){if(J.hasData(t)&&(a=J.get(t).events))for(r in J.remove(e,"handle events"),a)for(n=0,i=a[r].length;n<i;n++)C.event.add(e,r,a[r][n]);Q.hasData(t)&&(o=Q.access(t),s=C.extend({},o),Q.set(e,s))}}function Rt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&mt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Bt(t,e,n,i){e=c(e);var r,o,s,a,u,l,d=0,p=t.length,h=p-1,f=e[0],m=g(f);if(m||p>1&&"string"==typeof f&&!v.checkClone&&Dt.test(f))return t.each((function(r){var o=t.eq(r);m&&(e[0]=f.call(this,r,o.html())),Bt(o,e,n,i)}));if(p&&(o=(r=Nt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===r.childNodes.length&&(r=o),o||i)){for(a=(s=C.map(yt(r,"script"),It)).length;d<p;d++)u=r,d!==h&&(u=C.clone(u,!0,!0),a&&C.merge(s,yt(u,"script"))),n.call(t[d],u,d);if(a)for(l=s[s.length-1].ownerDocument,C.map(s,Mt),d=0;d<a;d++)u=s[d],gt.test(u.type||"")&&!J.access(u,"globalEval")&&C.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?C._evalUrl&&!u.noModule&&C._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):x(u.textContent.replace($t,""),u,l))}return t}function Ht(t,e,n){for(var i,r=e?C.filter(e,t):t,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||C.cleanData(yt(i)),i.parentNode&&(n&&st(i)&&wt(yt(i,"script")),i.parentNode.removeChild(i));return t}C.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var i,r,o,s,a=t.cloneNode(!0),c=st(t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||C.isXMLDoc(t)))for(s=yt(a),i=0,r=(o=yt(t)).length;i<r;i++)Rt(o[i],s[i]);if(e)if(n)for(o=o||yt(t),s=s||yt(a),i=0,r=o.length;i<r;i++)Lt(o[i],s[i]);else Lt(t,a);return(s=yt(a,"script")).length>0&&wt(s,!c&&yt(t,"script")),a},cleanData:function(t){for(var e,n,i,r=C.event.special,o=0;void 0!==(n=t[o]);o++)if(G(n)){if(e=n[J.expando]){if(e.events)for(i in e.events)r[i]?C.event.remove(n,i):C.removeEvent(n,i,e.handle);n[J.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),C.fn.extend({detach:function(t){return Ht(this,t,!0)},remove:function(t){return Ht(this,t)},text:function(t){return z(this,(function(t){return void 0===t?C.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Bt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||_t(this,t).appendChild(t)}))},prepend:function(){return Bt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=_t(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Bt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Bt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(C.cleanData(yt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return C.clone(this,t,e)}))},html:function(t){return z(this,(function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Et.test(t)&&!bt[(vt.exec(t)||["",""])[1].toLowerCase()]){t=C.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(C.cleanData(yt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Bt(this,arguments,(function(e){var n=this.parentNode;C.inArray(this,t)<0&&(C.cleanData(yt(this)),n&&n.replaceChild(e,this))}),t)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){C.fn[t]=function(t){for(var n,i=[],r=C(t),o=r.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),C(r[s])[e](n),u.apply(i,n.get());return this.pushStack(i)}}));var Ut=new RegExp("^("+nt+")(?!px)[a-z%]+$","i"),Ft=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},qt=function(t,e,n){var i,r,o={};for(r in e)o[r]=t.style[r],t.style[r]=e[r];for(r in i=n.call(t),e)t.style[r]=o[r];return i},zt=new RegExp(rt.join("|"),"i");function Wt(t,e,n){var i,r,o,s,a=t.style;return(n=n||Ft(t))&&(""!==(s=n.getPropertyValue(e)||n[e])||st(t)||(s=C.style(t,e)),!v.pixelBoxStyles()&&Ut.test(s)&&zt.test(e)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function Vt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ot.appendChild(u).appendChild(l);var t=n.getComputedStyle(l);i="1%"!==t.top,c=12===e(t.marginLeft),l.style.right="60%",s=36===e(t.right),r=36===e(t.width),l.style.position="absolute",o=12===e(l.offsetWidth/3),ot.removeChild(u),l=null}}function e(t){return Math.round(parseFloat(t))}var i,r,o,s,a,c,u=y.createElement("div"),l=y.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,C.extend(v,{boxSizingReliable:function(){return t(),r},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),c},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,i,r;return null==a&&(t=y.createElement("table"),e=y.createElement("tr"),i=y.createElement("div"),t.style.cssText="position:absolute;left:-11111px",e.style.height="1px",i.style.height="9px",ot.appendChild(t).appendChild(e).appendChild(i),r=n.getComputedStyle(e),a=parseInt(r.height)>3,ot.removeChild(t)),a}}))}();var Yt=["Webkit","Moz","ms"],Kt=y.createElement("div").style,Gt={};function Xt(t){var e=C.cssProps[t]||Gt[t];return e||(t in Kt?t:Gt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Yt.length;n--;)if((t=Yt[n]+e)in Kt)return t}(t)||t)}var Jt=/^(none|table(?!-c[ea]).+)/,Qt=/^--/,Zt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,n){var i=it.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function ne(t,e,n,i,r,o){var s="width"===e?1:0,a=0,c=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(c+=C.css(t,n+rt[s],!0,r)),i?("content"===n&&(c-=C.css(t,"padding"+rt[s],!0,r)),"margin"!==n&&(c-=C.css(t,"border"+rt[s]+"Width",!0,r))):(c+=C.css(t,"padding"+rt[s],!0,r),"padding"!==n?c+=C.css(t,"border"+rt[s]+"Width",!0,r):a+=C.css(t,"border"+rt[s]+"Width",!0,r));return!i&&o>=0&&(c+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-c-a-.5))||0),c}function ie(t,e,n){var i=Ft(t),r=(!v.boxSizingReliable()||n)&&"border-box"===C.css(t,"boxSizing",!1,i),o=r,s=Wt(t,e,i),a="offset"+e[0].toUpperCase()+e.slice(1);if(Ut.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&r||!v.reliableTrDimensions()&&A(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===C.css(t,"display",!1,i))&&t.getClientRects().length&&(r="border-box"===C.css(t,"boxSizing",!1,i),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+ne(t,e,n||(r?"border":"content"),o,i,s)+"px"}function re(t,e,n,i,r){return new re.prototype.init(t,e,n,i,r)}C.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Wt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=K(e),c=Qt.test(e),u=t.style;if(c||(e=Xt(a)),s=C.cssHooks[e]||C.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(t,!1,i))?r:u[e];"string"===(o=typeof n)&&(r=it.exec(n))&&r[1]&&(n=ut(t,e,r),o="number"),null!=n&&n==n&&("number"!==o||c||(n+=r&&r[3]||(C.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,i))||(c?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,i){var r,o,s,a=K(e);return Qt.test(e)||(e=Xt(a)),(s=C.cssHooks[e]||C.cssHooks[a])&&"get"in s&&(r=s.get(t,!0,n)),void 0===r&&(r=Wt(t,e,i)),"normal"===r&&e in te&&(r=te[e]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),C.each(["height","width"],(function(t,e){C.cssHooks[e]={get:function(t,n,i){if(n)return!Jt.test(C.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ie(t,e,i):qt(t,Zt,(function(){return ie(t,e,i)}))},set:function(t,n,i){var r,o=Ft(t),s=!v.scrollboxSize()&&"absolute"===o.position,a=(s||i)&&"border-box"===C.css(t,"boxSizing",!1,o),c=i?ne(t,e,i,a,o):0;return a&&s&&(c-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ne(t,e,"border",!1,o)-.5)),c&&(r=it.exec(n))&&"px"!==(r[3]||"px")&&(t.style[e]=n,n=C.css(t,e)),ee(0,n,c)}}})),C.cssHooks.marginLeft=Vt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-qt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),C.each({margin:"",padding:"",border:"Width"},(function(t,e){C.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[t+rt[i]+e]=o[i]||o[i-2]||o[0];return r}},"margin"!==t&&(C.cssHooks[t+e].set=ee)})),C.fn.extend({css:function(t,e){return z(this,(function(t,e,n){var i,r,o={},s=0;if(Array.isArray(e)){for(i=Ft(t),r=e.length;s<r;s++)o[e[s]]=C.css(t,e[s],!1,i);return o}return void 0!==n?C.style(t,e,n):C.css(t,e)}),t,e,arguments.length>1)}}),C.Tween=re,re.prototype={constructor:re,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||C.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(C.cssNumber[n]?"":"px")},cur:function(){var t=re.propHooks[this.prop];return t&&t.get?t.get(this):re.propHooks._default.get(this)},run:function(t){var e,n=re.propHooks[this.prop];return this.options.duration?this.pos=e=C.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):re.propHooks._default.set(this),this}},re.prototype.init.prototype=re.prototype,re.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=C.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){C.fx.step[t.prop]?C.fx.step[t.prop](t):1!==t.elem.nodeType||!C.cssHooks[t.prop]&&null==t.elem.style[Xt(t.prop)]?t.elem[t.prop]=t.now:C.style(t.elem,t.prop,t.now+t.unit)}}},re.propHooks.scrollTop=re.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},C.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},C.fx=re.prototype.init,C.fx.step={};var oe,se,ae=/^(?:toggle|show|hide)$/,ce=/queueHooks$/;function ue(){se&&(!1===y.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ue):n.setTimeout(ue,C.fx.interval),C.fx.tick())}function le(){return n.setTimeout((function(){oe=void 0})),oe=Date.now()}function de(t,e){var n,i=0,r={height:t};for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=rt[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function pe(t,e,n){for(var i,r=(he.tweeners[e]||[]).concat(he.tweeners["*"]),o=0,s=r.length;o<s;o++)if(i=r[o].call(n,e,t))return i}function he(t,e,n){var i,r,o=0,s=he.prefilters.length,a=C.Deferred().always((function(){delete c.elem})),c=function(){if(r)return!1;for(var e=oe||le(),n=Math.max(0,u.startTime+u.duration-e),i=1-(n/u.duration||0),o=0,s=u.tweens.length;o<s;o++)u.tweens[o].run(i);return a.notifyWith(t,[u,i,n]),i<1&&s?n:(s||a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u]),!1)},u=a.promise({elem:t,props:C.extend({},e),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},n),originalProperties:e,originalOptions:n,startTime:oe||le(),duration:n.duration,tweens:[],createTween:function(e,n){var i=C.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var n=0,i=e?u.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)u.tweens[n].run(1);return e?(a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u,e])):a.rejectWith(t,[u,e]),this}}),l=u.props;for(!function(t,e){var n,i,r,o,s;for(n in t)if(r=e[i=K(n)],o=t[n],Array.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),(s=C.cssHooks[i])&&"expand"in s)for(n in o=s.expand(o),delete t[i],o)n in t||(t[n]=o[n],e[n]=r);else e[i]=r}(l,u.opts.specialEasing);o<s;o++)if(i=he.prefilters[o].call(u,t,l,u.opts))return g(i.stop)&&(C._queueHooks(u.elem,u.opts.queue).stop=i.stop.bind(i)),i;return C.map(l,pe,u),g(u.opts.start)&&u.opts.start.call(t,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),C.fx.timer(C.extend(c,{elem:t,anim:u,queue:u.opts.queue})),u}C.Animation=C.extend(he,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ut(n.elem,t,it.exec(e),n),n}]},tweener:function(t,e){g(t)?(e=t,t=["*"]):t=t.match(L);for(var n,i=0,r=t.length;i<r;i++)n=t[i],he.tweeners[n]=he.tweeners[n]||[],he.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,r,o,s,a,c,u,l,d="width"in e||"height"in e,p=this,h={},f=t.style,m=t.nodeType&&ct(t),v=J.get(t,"fxshow");for(i in n.queue||(null==(s=C._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,p.always((function(){p.always((function(){s.unqueued--,C.queue(t,"fx").length||s.empty.fire()}))}))),e)if(r=e[i],ae.test(r)){if(delete e[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!v||void 0===v[i])continue;m=!0}h[i]=v&&v[i]||C.style(t,i)}if((c=!C.isEmptyObject(e))||!C.isEmptyObject(h))for(i in d&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(u=v&&v.display)&&(u=J.get(t,"display")),"none"===(l=C.css(t,"display"))&&(u?l=u:(pt([t],!0),u=t.style.display||u,l=C.css(t,"display"),pt([t]))),("inline"===l||"inline-block"===l&&null!=u)&&"none"===C.css(t,"float")&&(c||(p.done((function(){f.display=u})),null==u&&(l=f.display,u="none"===l?"":l)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",p.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),c=!1,h)c||(v?"hidden"in v&&(m=v.hidden):v=J.access(t,"fxshow",{display:u}),o&&(v.hidden=!m),m&&pt([t],!0),p.done((function(){for(i in m||pt([t]),J.remove(t,"fxshow"),h)C.style(t,i,h[i])}))),c=pe(m?v[i]:0,i,p),i in v||(v[i]=c.start,m&&(c.end=c.start,c.start=0))}],prefilter:function(t,e){e?he.prefilters.unshift(t):he.prefilters.push(t)}}),C.speed=function(t,e,n){var i=t&&"object"==typeof t?C.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return C.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in C.fx.speeds?i.duration=C.fx.speeds[i.duration]:i.duration=C.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){g(i.old)&&i.old.call(this),i.queue&&C.dequeue(this,i.queue)},i},C.fn.extend({fadeTo:function(t,e,n,i){return this.filter(ct).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var r=C.isEmptyObject(t),o=C.speed(e,n,i),s=function(){var e=he(this,C.extend({},t),o);(r||J.get(this,"finish"))&&e.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,r=null!=t&&t+"queueHooks",o=C.timers,s=J.get(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&ce.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(n),e=!1,o.splice(r,1));!e&&n||C.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=J.get(this),i=n[t+"queue"],r=n[t+"queueHooks"],o=C.timers,s=i?i.length:0;for(n.finish=!0,C.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish}))}}),C.each(["toggle","show","hide"],(function(t,e){var n=C.fn[e];C.fn[e]=function(t,i,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(de(e,!0),t,i,r)}})),C.each({slideDown:de("show"),slideUp:de("hide"),slideToggle:de("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){C.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}})),C.timers=[],C.fx.tick=function(){var t,e=0,n=C.timers;for(oe=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||C.fx.stop(),oe=void 0},C.fx.timer=function(t){C.timers.push(t),C.fx.start()},C.fx.interval=13,C.fx.start=function(){se||(se=!0,ue())},C.fx.stop=function(){se=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(t,e){return t=C.fx&&C.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,i){var r=n.setTimeout(e,t);i.stop=function(){n.clearTimeout(r)}}))},function(){var t=y.createElement("input"),e=y.createElement("select").appendChild(y.createElement("option"));t.type="checkbox",v.checkOn=""!==t.value,v.optSelected=e.selected,(t=y.createElement("input")).value="t",t.type="radio",v.radioValue="t"===t.value}();var fe,me=C.expr.attrHandle;C.fn.extend({attr:function(t,e){return z(this,C.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){C.removeAttr(this,t)}))}}),C.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?C.prop(t,e,n):(1===o&&C.isXMLDoc(t)||(r=C.attrHooks[e.toLowerCase()]||(C.expr.match.bool.test(e)?fe:void 0)),void 0!==n?null===n?void C.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=C.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&A(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,r=e&&e.match(L);if(r&&1===t.nodeType)for(;n=r[i++];)t.removeAttribute(n)}}),fe={set:function(t,e,n){return!1===e?C.removeAttr(t,n):t.setAttribute(n,n),n}},C.each(C.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=me[e]||C.find.attr;me[e]=function(t,e,i){var r,o,s=e.toLowerCase();return i||(o=me[s],me[s]=r,r=null!=n(t,e,i)?s:null,me[s]=o),r}}));var ve=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function be(t){return(t.match(L)||[]).join(" ")}function ye(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(L)||[]}C.fn.extend({prop:function(t,e){return z(this,C.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[C.propFix[t]||t]}))}}),C.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&C.isXMLDoc(t)||(e=C.propFix[e]||e,r=C.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=C.find.attr(t,"tabindex");return e?parseInt(e,10):ve.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(C.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){C.propFix[this.toLowerCase()]=this})),C.fn.extend({addClass:function(t){var e,n,i,r,o,s,a,c=0;if(g(t))return this.each((function(e){C(this).addClass(t.call(this,e,ye(this)))}));if((e=we(t)).length)for(;n=this[c++];)if(r=ye(n),i=1===n.nodeType&&" "+be(r)+" "){for(s=0;o=e[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(a=be(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,r,o,s,a,c=0;if(g(t))return this.each((function(e){C(this).removeClass(t.call(this,e,ye(this)))}));if(!arguments.length)return this.attr("class","");if((e=we(t)).length)for(;n=this[c++];)if(r=ye(n),i=1===n.nodeType&&" "+be(r)+" "){for(s=0;o=e[s++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");r!==(a=be(i))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t,i="string"===n||Array.isArray(t);return"boolean"==typeof e&&i?e?this.addClass(t):this.removeClass(t):g(t)?this.each((function(n){C(this).toggleClass(t.call(this,n,ye(this),e),e)})):this.each((function(){var e,r,o,s;if(i)for(r=0,o=C(this),s=we(t);e=s[r++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=ye(this))&&J.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":J.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+be(ye(n))+" ").indexOf(e)>-1)return!0;return!1}});var xe=/\r/g;C.fn.extend({val:function(t){var e,n,i,r=this[0];return arguments.length?(i=g(t),this.each((function(n){var r;1===this.nodeType&&(null==(r=i?t.call(this,n,C(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=C.map(r,(function(t){return null==t?"":t+""}))),(e=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))}))):r?(e=C.valHooks[r.type]||C.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(xe,""):null==n?"":n:void 0}}),C.extend({valHooks:{option:{get:function(t){var e=C.find.attr(t,"value");return null!=e?e:be(C.text(t))}},select:{get:function(t){var e,n,i,r=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],c=s?o+1:r.length;for(i=o<0?c:s?o:0;i<c;i++)if(((n=r[i]).selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(e=C(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,i,r=t.options,o=C.makeArray(e),s=r.length;s--;)((i=r[s]).selected=C.inArray(C.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),C.each(["radio","checkbox"],(function(){C.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=C.inArray(C(t).val(),e)>-1}},v.checkOn||(C.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in n;var Ne=/^(?:focusinfocus|focusoutblur)$/,Ce=function(t){t.stopPropagation()};C.extend(C.event,{trigger:function(t,e,i,r){var o,s,a,c,u,l,d,p,f=[i||y],m=h.call(t,"type")?t.type:t,v=h.call(t,"namespace")?t.namespace.split("."):[];if(s=p=a=i=i||y,3!==i.nodeType&&8!==i.nodeType&&!Ne.test(m+C.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),u=m.indexOf(":")<0&&"on"+m,(t=t[C.expando]?t:new C.Event(m,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:C.makeArray(e,[t]),d=C.event.special[m]||{},r||!d.trigger||!1!==d.trigger.apply(i,e))){if(!r&&!d.noBubble&&!b(i)){for(c=d.delegateType||m,Ne.test(c+m)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(i.ownerDocument||y)&&f.push(a.defaultView||a.parentWindow||n)}for(o=0;(s=f[o++])&&!t.isPropagationStopped();)p=s,t.type=o>1?c:d.bindType||m,(l=(J.get(s,"events")||Object.create(null))[t.type]&&J.get(s,"handle"))&&l.apply(s,e),(l=u&&s[u])&&l.apply&&G(s)&&(t.result=l.apply(s,e),!1===t.result&&t.preventDefault());return t.type=m,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),e)||!G(i)||u&&g(i[m])&&!b(i)&&((a=i[u])&&(i[u]=null),C.event.triggered=m,t.isPropagationStopped()&&p.addEventListener(m,Ce),i[m](),t.isPropagationStopped()&&p.removeEventListener(m,Ce),C.event.triggered=void 0,a&&(i[u]=a)),t.result}},simulate:function(t,e,n){var i=C.extend(new C.Event,n,{type:t,isSimulated:!0});C.event.trigger(i,null,e)}}),C.fn.extend({trigger:function(t,e){return this.each((function(){C.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return C.event.trigger(t,e,n,!0)}}),v.focusin||C.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){C.event.simulate(e,t.target,C.event.fix(t))};C.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,r=J.access(i,e);r||i.addEventListener(t,n,!0),J.access(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,r=J.access(i,e)-1;r?J.access(i,e,r):(i.removeEventListener(t,n,!0),J.remove(i,e))}}}));var Oe=n.location,ke={guid:Date.now()},Te=/\?/;C.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||C.error("Invalid XML: "+t),e};var je=/\[\]$/,Se=/\r?\n/g,Ae=/^(?:submit|button|image|reset|file)$/i,Pe=/^(?:input|select|textarea|keygen)/i;function Ee(t,e,n,i){var r;if(Array.isArray(e))C.each(e,(function(e,r){n||je.test(t)?i(t,r):Ee(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,i)}));else if(n||"object"!==N(e))i(t,e);else for(r in e)Ee(t+"["+r+"]",e[r],n,i)}C.param=function(t,e){var n,i=[],r=function(t,e){var n=g(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!C.isPlainObject(t))C.each(t,(function(){r(this.name,this.value)}));else for(n in t)Ee(n,t[n],e,r);return i.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=C.prop(this,"elements");return t?C.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!C(this).is(":disabled")&&Pe.test(this.nodeName)&&!Ae.test(t)&&(this.checked||!mt.test(t))})).map((function(t,e){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,(function(t){return{name:e.name,value:t.replace(Se,"\r\n")}})):{name:e.name,value:n.replace(Se,"\r\n")}})).get()}});var De=/%20/g,$e=/#.*$/,_e=/([?&])_=[^&]*/,Ie=/^(.*?):[ \t]*([^\r\n]*)$/gm,Me=/^(?:GET|HEAD)$/,Le=/^\/\//,Re={},Be={},He="*/".concat("*"),Ue=y.createElement("a");function Fe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(L)||[];if(g(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function qe(t,e,n,i){var r={},o=t===Be;function s(a){var c;return r[a]=!0,C.each(t[a]||[],(function(t,a){var u=a(e,n,i);return"string"!=typeof u||o||r[u]?o?!(c=u):void 0:(e.dataTypes.unshift(u),s(u),!1)})),c}return s(e.dataTypes[0])||!r["*"]&&s("*")}function ze(t,e){var n,i,r=C.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&C.extend(!0,t,i),t}Ue.href=Oe.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Oe.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Oe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":He,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?ze(ze(t,C.ajaxSettings),e):ze(C.ajaxSettings,t)},ajaxPrefilter:Fe(Re),ajaxTransport:Fe(Be),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,r,o,s,a,c,u,l,d,p,h=C.ajaxSetup({},e),f=h.context||h,m=h.context&&(f.nodeType||f.jquery)?C(f):C.event,v=C.Deferred(),g=C.Callbacks("once memory"),b=h.statusCode||{},w={},x={},N="canceled",O={readyState:0,getResponseHeader:function(t){var e;if(u){if(!s)for(s={};e=Ie.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(t,e){return null==u&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==u&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)O.always(t[O.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||N;return i&&i.abort(e),k(0,e),this}};if(v.promise(O),h.url=((t||h.url||Oe.href)+"").replace(Le,Oe.protocol+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(L)||[""],null==h.crossDomain){c=y.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=Ue.protocol+"//"+Ue.host!=c.protocol+"//"+c.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=C.param(h.data,h.traditional)),qe(Re,h,e,O),u)return O;for(d in(l=C.event&&h.global)&&0==C.active++&&C.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Me.test(h.type),r=h.url.replace($e,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(De,"+")):(p=h.url.slice(r.length),h.data&&(h.processData||"string"==typeof h.data)&&(r+=(Te.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(r=r.replace(_e,"$1"),p=(Te.test(r)?"&":"?")+"_="+ke.guid+++p),h.url=r+p),h.ifModified&&(C.lastModified[r]&&O.setRequestHeader("If-Modified-Since",C.lastModified[r]),C.etag[r]&&O.setRequestHeader("If-None-Match",C.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&O.setRequestHeader("Content-Type",h.contentType),O.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+He+"; q=0.01":""):h.accepts["*"]),h.headers)O.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(f,O,h)||u))return O.abort();if(N="abort",g.add(h.complete),O.done(h.success),O.fail(h.error),i=qe(Be,h,e,O)){if(O.readyState=1,l&&m.trigger("ajaxSend",[O,h]),u)return O;h.async&&h.timeout>0&&(a=n.setTimeout((function(){O.abort("timeout")}),h.timeout));try{u=!1,i.send(w,k)}catch(t){if(u)throw t;k(-1,t)}}else k(-1,"No Transport");function k(t,e,s,c){var d,p,y,w,x,N=e;u||(u=!0,a&&n.clearTimeout(a),i=void 0,o=c||"",O.readyState=t>0?4:0,d=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var i,r,o,s,a=t.contents,c=t.dataTypes;"*"===c[0];)c.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){c.unshift(r);break}if(c[0]in n)o=c[0];else{for(r in n){if(!c[0]||t.converters[r+" "+c[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==c[0]&&c.unshift(o),n[o]}(h,O,s)),!d&&C.inArray("script",h.dataTypes)>-1&&(h.converters["text script"]=function(){}),w=function(t,e,n,i){var r,o,s,a,c,u={},l=t.dataTypes.slice();if(l[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!c&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),c=o,o=l.shift())if("*"===o)o=c;else if("*"!==c&&c!==o){if(!(s=u[c+" "+o]||u["* "+o]))for(r in u)if((a=r.split(" "))[1]===o&&(s=u[c+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[r]:!0!==u[r]&&(o=a[0],l.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+c+" to "+o}}}return{state:"success",data:e}}(h,w,O,d),d?(h.ifModified&&((x=O.getResponseHeader("Last-Modified"))&&(C.lastModified[r]=x),(x=O.getResponseHeader("etag"))&&(C.etag[r]=x)),204===t||"HEAD"===h.type?N="nocontent":304===t?N="notmodified":(N=w.state,p=w.data,d=!(y=w.error))):(y=N,!t&&N||(N="error",t<0&&(t=0))),O.status=t,O.statusText=(e||N)+"",d?v.resolveWith(f,[p,N,O]):v.rejectWith(f,[O,N,y]),O.statusCode(b),b=void 0,l&&m.trigger(d?"ajaxSuccess":"ajaxError",[O,h,d?p:y]),g.fireWith(f,[O,N]),l&&(m.trigger("ajaxComplete",[O,h]),--C.active||C.event.trigger("ajaxStop")))}return O},getJSON:function(t,e,n){return C.get(t,e,n,"json")},getScript:function(t,e){return C.get(t,void 0,e,"script")}}),C.each(["get","post"],(function(t,e){C[e]=function(t,n,i,r){return g(n)&&(r=r||i,i=n,n=void 0),C.ajax(C.extend({url:t,type:e,dataType:r,data:n,success:i},C.isPlainObject(t)&&t))}})),C.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),C._evalUrl=function(t,e,n){return C.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){C.globalEval(t,e,n)}})},C.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=C(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return g(t)?this.each((function(e){C(this).wrapInner(t.call(this,e))})):this.each((function(){var e=C(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){C(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){C(this).replaceWith(this.childNodes)})),this}}),C.expr.pseudos.hidden=function(t){return!C.expr.pseudos.visible(t)},C.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var We={0:200,1223:204},Ve=C.ajaxSettings.xhr();v.cors=!!Ve&&"withCredentials"in Ve,v.ajax=Ve=!!Ve,C.ajaxTransport((function(t){var e,i;if(v.cors||Ve&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);e=function(t){return function(){e&&(e=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(We[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),i=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){e&&i()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),C.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return C.globalEval(t),t}}}),C.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),C.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,r){e=C("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&r("error"===t.type?404:200,t.type)}),y.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Ye,Ke=[],Ge=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ke.pop()||C.expando+"_"+ke.guid++;return this[t]=!0,t}}),C.ajaxPrefilter("json jsonp",(function(t,e,i){var r,o,s,a=!1!==t.jsonp&&(Ge.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ge.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ge,"$1"+r):!1!==t.jsonp&&(t.url+=(Te.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return s||C.error(r+" was not called"),s[0]},t.dataTypes[0]="json",o=n[r],n[r]=function(){s=arguments},i.always((function(){void 0===o?C(n).removeProp(r):n[r]=o,t[r]&&(t.jsonpCallback=e.jsonpCallback,Ke.push(r)),s&&g(o)&&o(s[0]),s=o=void 0})),"script"})),v.createHTMLDocument=((Ye=y.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ye.childNodes.length),C.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(v.createHTMLDocument?((i=(e=y.implementation.createHTMLDocument("")).createElement("base")).href=y.location.href,e.head.appendChild(i)):e=y),o=!n&&[],(r=P.exec(t))?[e.createElement(r[1])]:(r=Nt([t],e,o),o&&o.length&&C(o).remove(),C.merge([],r.childNodes)));var i,r,o},C.fn.load=function(t,e,n){var i,r,o,s=this,a=t.indexOf(" ");return a>-1&&(i=be(t.slice(a)),t=t.slice(0,a)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(r="POST"),s.length>0&&C.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done((function(t){o=arguments,s.html(i?C("<div>").append(C.parseHTML(t)).find(i):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},C.expr.pseudos.animated=function(t){return C.grep(C.timers,(function(e){return t===e.elem})).length},C.offset={setOffset:function(t,e,n){var i,r,o,s,a,c,u=C.css(t,"position"),l=C(t),d={};"static"===u&&(t.style.position="relative"),a=l.offset(),o=C.css(t,"top"),c=C.css(t,"left"),("absolute"===u||"fixed"===u)&&(o+c).indexOf("auto")>-1?(s=(i=l.position()).top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(c)||0),g(e)&&(e=e.call(t,n,C.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+r),"using"in e?e.using.call(t,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),l.css(d))}},C.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){C.offset.setOffset(this,t,e)}));var e,n,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,i=this[0],r={top:0,left:0};if("fixed"===C.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),n=i.ownerDocument,t=i.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===C.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((r=C(t).offset()).top+=C.css(t,"borderTopWidth",!0),r.left+=C.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-C.css(i,"marginTop",!0),left:e.left-r.left-C.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===C.css(t,"position");)t=t.offsetParent;return t||ot}))}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;C.fn[t]=function(i){return z(this,(function(t,i,r){var o;if(b(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===r)return o?o[e]:t[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):t[i]=r}),t,i,arguments.length)}})),C.each(["top","left"],(function(t,e){C.cssHooks[e]=Vt(v.pixelPosition,(function(t,n){if(n)return n=Wt(t,e),Ut.test(n)?C(t).position()[e]+"px":n}))})),C.each({Height:"height",Width:"width"},(function(t,e){C.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,i){C.fn[i]=function(r,o){var s=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===o?"margin":"border");return z(this,(function(e,n,r){var o;return b(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===r?C.css(e,n,a):C.style(e,n,r,a)}),e,s?r:void 0,s)}}))})),C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){C.fn[e]=function(t){return this.on(e,t)}})),C.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),C.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){C.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Xe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;C.proxy=function(t,e){var n,i,r;if("string"==typeof e&&(n=t[e],e=t,t=n),g(t))return i=a.call(arguments,2),(r=function(){return t.apply(e||this,i.concat(a.call(arguments)))}).guid=t.guid=t.guid||C.guid++,r},C.holdReady=function(t){t?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=A,C.isFunction=g,C.isWindow=b,C.camelCase=K,C.type=N,C.now=Date.now,C.isNumeric=function(t){var e=C.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},C.trim=function(t){return null==t?"":(t+"").replace(Xe,"")},void 0===(i=function(){return C}.apply(e,[]))||(t.exports=i);var Je=n.jQuery,Qe=n.$;return C.noConflict=function(t){return n.$===C&&(n.$=Qe),t&&n.jQuery===C&&(n.jQuery=Je),C},void 0===r&&(n.jQuery=n.$=C),C}))},function(t,e,n){(function(e){t.exports=e.m=n(83)}).call(this,n(22))},function(t,e,n){"use strict";var i=n(84);i.trust=n(103),i.fragment=n(104),t.exports=i},function(t,e,n){"use strict";var i=n(33);t.exports=function(t){return null==t&&(t=""),i("<",void 0,void 0,t,void 0,void 0)}},function(t,e,n){"use strict";var i=n(33),r=n(85);t.exports=function(){var t=r.apply(0,arguments);return t.tag="[",t.children=i.normalizeChildren(t.children),t}},function(t,e,n){"use strict";var i=n(86),r=n(71);t.exports=n(110)(window,i,r.redraw)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var i,r,o,s,a,c=1,u={},l=!1,d=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick((function(){f(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){f(t.data)},i=function(t){o.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(t){var e=d.createElement("script");e.onreadystatechange=function(){f(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):i=function(t){setTimeout(f,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&f(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),i=function(e){t.postMessage(s+e,"*")}),p.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return u[c]=r,i(c),c++},p.clearImmediate=h}function h(t){delete u[t]}function f(t){if(l)setTimeout(f,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{h(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(22),n(107))},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var c,u=[],l=!1,d=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&h())}function h(){if(!l){var t=a(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++d<e;)c&&c[d].run();d=-1,e=u.length}c=null,l=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||a(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e,n){"use strict";var i=n(33);t.exports=function(t){var e,n=t&&t.document,r={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function o(t){return t.attrs&&t.attrs.xmlns||r[t.tag]}function s(t,e){if(t.state!==e)throw new Error("`vnode.state` must not be modified")}function a(t){var e=t.state;try{return this.apply(e,arguments)}finally{s(t,e)}}function c(){try{return n.activeElement}catch(t){return null}}function u(t,e,n,i,r,o,s){for(var a=n;a<i;a++){var c=e[a];null!=c&&l(t,c,r,s,o)}}function l(t,e,r,s,c){var d=e.tag;if("string"==typeof d)switch(e.state={},null!=e.attrs&&M(e.attrs,e,r),d){case"#":!function(t,e,i){e.dom=n.createTextNode(e.children),y(t,e.dom,i)}(t,e,c);break;case"<":p(t,e,s,c);break;case"[":!function(t,e,i,r,o){var s=n.createDocumentFragment();if(null!=e.children){var a=e.children;u(s,a,0,a.length,i,null,r)}e.dom=s.firstChild,e.domSize=s.childNodes.length,y(t,s,o)}(t,e,r,s,c);break;default:!function(t,e,r,s,a){var c=e.tag,l=e.attrs,d=l&&l.is,p=(s=o(e)||s)?d?n.createElementNS(s,c,{is:d}):n.createElementNS(s,c):d?n.createElement(c,{is:d}):n.createElement(c);e.dom=p,null!=l&&function(t,e,n){for(var i in e)T(t,i,null,e[i],n)}(e,l,s);if(y(t,p,a),!w(e)&&(null!=e.text&&(""!==e.text?p.textContent=e.text:e.children=[i("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var h=e.children;u(p,h,0,h.length,r,null,s),"select"===e.tag&&null!=l&&function(t,e){if("value"in e)if(null===e.value)-1!==t.dom.selectedIndex&&(t.dom.value=null);else{var n=""+e.value;t.dom.value===n&&-1!==t.dom.selectedIndex||(t.dom.value=n)}"selectedIndex"in e&&T(t,"selectedIndex",null,e.selectedIndex,void 0)}(e,l)}}(t,e,r,s,c)}else!function(t,e,n,r,o){(function(t,e){var n;if("function"==typeof t.tag.view){if(t.state=Object.create(t.tag),null!=(n=t.state.view).$$reentrantLock$$)return;n.$$reentrantLock$$=!0}else{if(t.state=void 0,null!=(n=t.tag).$$reentrantLock$$)return;n.$$reentrantLock$$=!0,t.state=null!=t.tag.prototype&&"function"==typeof t.tag.prototype.view?new t.tag(t):t.tag(t)}M(t.state,t,e),null!=t.attrs&&M(t.attrs,t,e);if(t.instance=i.normalize(a.call(t.state.view,t)),t.instance===t)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(e,n),null!=e.instance?(l(t,e.instance,n,r,o),e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0):e.domSize=0}(t,e,r,s,c)}var d={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function p(t,e,i,r){var o=e.children.match(/^\s*?<(\w+)/im)||[],s=n.createElement(d[o[1]]||"div");"http://www.w3.org/2000/svg"===i?(s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e.children+"</svg>",s=s.firstChild):s.innerHTML=e.children,e.dom=s.firstChild,e.domSize=s.childNodes.length,e.instance=[];for(var a,c=n.createDocumentFragment();a=s.firstChild;)e.instance.push(a),c.appendChild(a);y(t,c,r)}function h(t,e,n,i,r,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)u(t,n,0,n.length,i,r,o);else if(null==n||0===n.length)x(t,e,0,e.length);else{var s=null!=e[0]&&null!=e[0].key,a=null!=n[0]&&null!=n[0].key,c=0,d=0;if(!s)for(;d<e.length&&null==e[d];)d++;if(!a)for(;c<n.length&&null==n[c];)c++;if(null===a&&null==s)return;if(s!==a)x(t,e,d,e.length),u(t,n,c,n.length,i,r,o);else if(a){for(var p,h,y,w,C,O=e.length-1,k=n.length-1;O>=d&&k>=c&&(y=e[O],w=n[k],y.key===w.key);)y!==w&&f(t,y,w,i,r,o),null!=w.dom&&(r=w.dom),O--,k--;for(;O>=d&&k>=c&&(p=e[d],h=n[c],p.key===h.key);)d++,c++,p!==h&&f(t,p,h,i,g(e,d,r),o);for(;O>=d&&k>=c&&c!==k&&p.key===w.key&&y.key===h.key;)b(t,y,C=g(e,d,r)),y!==h&&f(t,y,h,i,C,o),++c<=--k&&b(t,p,r),p!==w&&f(t,p,w,i,r,o),null!=w.dom&&(r=w.dom),d++,y=e[--O],w=n[k],p=e[d],h=n[c];for(;O>=d&&k>=c&&y.key===w.key;)y!==w&&f(t,y,w,i,r,o),null!=w.dom&&(r=w.dom),k--,y=e[--O],w=n[k];if(c>k)x(t,e,d,O+1);else if(d>O)u(t,n,c,k+1,i,r,o);else{var T,j,S=r,A=k-c+1,P=new Array(A),E=0,D=0,$=2147483647,_=0;for(D=0;D<A;D++)P[D]=-1;for(D=k;D>=c;D--){null==T&&(T=m(e,d,O+1));var I=T[(w=n[D]).key];null!=I&&($=I<$?I:-1,P[D-c]=I,y=e[I],e[I]=null,y!==w&&f(t,y,w,i,r,o),null!=w.dom&&(r=w.dom),_++)}if(r=S,_!==O-d+1&&x(t,e,d,O+1),0===_)u(t,n,c,k+1,i,r,o);else if(-1===$)for(E=(j=function(t){var e=[0],n=0,i=0,r=0,o=v.length=t.length;for(r=0;r<o;r++)v[r]=t[r];for(r=0;r<o;++r)if(-1!==t[r]){var s=e[e.length-1];if(t[s]<t[r])v[r]=s,e.push(r);else{for(n=0,i=e.length-1;n<i;){var a=(n>>>1)+(i>>>1)+(n&i&1);t[e[a]]<t[r]?n=a+1:i=a}t[r]<t[e[n]]&&(n>0&&(v[r]=e[n-1]),e[n]=r)}}n=e.length,i=e[n-1];for(;n-- >0;)e[n]=i,i=v[i];return v.length=0,e}(P)).length-1,D=k;D>=c;D--)h=n[D],-1===P[D-c]?l(t,h,i,o,r):j[E]===D-c?E--:b(t,h,r),null!=h.dom&&(r=n[D].dom);else for(D=k;D>=c;D--)h=n[D],-1===P[D-c]&&l(t,h,i,o,r),null!=h.dom&&(r=n[D].dom)}}else{var M=e.length<n.length?e.length:n.length;for(c=c<d?c:d;c<M;c++)(p=e[c])===(h=n[c])||null==p&&null==h||(null==p?l(t,h,i,o,g(e,c+1,r)):null==h?N(t,p):f(t,p,h,i,g(e,c+1,r),o));e.length>M&&x(t,e,c,e.length),n.length>M&&u(t,n,c,n.length,i,r,o)}}}function f(t,e,n,r,s,c){var u=e.tag;if(u===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate)if(void 0!==(n=a.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate)if(void 0!==(n=a.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof u)switch(null!=n.attrs&&L(n.attrs,n,r),u){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children);e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,i,r){e.children!==n.children?(C(t,e),p(t,n,i,r)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,c,s);break;case"[":!function(t,e,n,i,r,o){h(t,e.children,n.children,i,r,o);var s=0,a=n.children;if(n.dom=null,null!=a){for(var c=0;c<a.length;c++){var u=a[c];null!=u&&null!=u.dom&&(null==n.dom&&(n.dom=u.dom),s+=u.domSize||1)}1!==s&&(n.domSize=s)}}(t,e,n,r,s,c);break;default:!function(t,e,n,r){var s=e.dom=t.dom;r=o(e)||r,"textarea"===e.tag&&(null==e.attrs&&(e.attrs={}),null!=e.text&&(e.attrs.value=e.text,e.text=void 0));(function(t,e,n,i){if(null!=n)for(var r in n)T(t,r,e&&e[r],n[r],i);var o;if(null!=e)for(var r in e)null==(o=e[r])||null!=n&&null!=n[r]||j(t,r,o,i)})(e,t.attrs,e.attrs,r),w(e)||(null!=t.text&&null!=e.text&&""!==e.text?t.text.toString()!==e.text.toString()&&(t.dom.firstChild.nodeValue=e.text):(null!=t.text&&(t.children=[i("#",void 0,void 0,t.text,void 0,t.dom.firstChild)]),null!=e.text&&(e.children=[i("#",void 0,void 0,e.text,void 0,void 0)]),h(s,t.children,e.children,n,null,r)))}(e,n,r,c)}else!function(t,e,n,r,o,s){if(n.instance=i.normalize(a.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");L(n.state,n,r),null!=n.attrs&&L(n.attrs,n,r);null!=n.instance?(null==e.instance?l(t,n.instance,r,s,o):f(t,e.instance,n.instance,r,o,s),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=e.instance?(N(t,e.instance),n.dom=void 0,n.domSize=0):(n.dom=e.dom,n.domSize=e.domSize)}(t,e,n,r,s,c)}else N(t,e),l(t,n,r,c,s)}function m(t,e,n){for(var i=Object.create(null);e<n;e++){var r=t[e];if(null!=r){var o=r.key;null!=o&&(i[o]=e)}}return i}var v=[];function g(t,e,n){for(;e<t.length;e++)if(null!=t[e]&&null!=t[e].dom)return t[e].dom;return n}function b(t,e,i){var r=n.createDocumentFragment();!function t(e,n,i){for(;null!=i.dom&&i.dom.parentNode===e;){if("string"!=typeof i.tag){if(null!=(i=i.instance))continue}else if("<"===i.tag)for(var r=0;r<i.instance.length;r++)n.appendChild(i.instance[r]);else if("["!==i.tag)n.appendChild(i.dom);else if(1===i.children.length){if(null!=(i=i.children[0]))continue}else for(r=0;r<i.children.length;r++){var o=i.children[r];null!=o&&t(e,n,o)}break}}(t,r,e),y(t,r,i)}function y(t,e,n){null!=n?t.insertBefore(e,n):t.appendChild(e)}function w(t){if(null==t.attrs||null==t.attrs.contenteditable&&null==t.attrs.contentEditable)return!1;var e=t.children;if(null!=e&&1===e.length&&"<"===e[0].tag){var n=e[0].children;t.dom.innerHTML!==n&&(t.dom.innerHTML=n)}else if(null!=t.text||null!=e&&0!==e.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function x(t,e,n,i){for(var r=n;r<i;r++){var o=e[r];null!=o&&N(t,o)}}function N(t,e){var n,i,r,o=0,c=e.state;"string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&(null!=(r=a.call(e.state.onbeforeremove,e))&&"function"==typeof r.then&&(o=1,n=r));e.attrs&&"function"==typeof e.attrs.onbeforeremove&&(null!=(r=a.call(e.attrs.onbeforeremove,e))&&"function"==typeof r.then&&(o|=2,i=r));if(s(e,c),o){if(null!=n){var u=function(){1&o&&((o&=2)||l())};n.then(u,u)}if(null!=i){u=function(){2&o&&((o&=1)||l())};i.then(u,u)}}else k(e),O(t,e);function l(){s(e,c),k(e),O(t,e)}}function C(t,e){for(var n=0;n<e.instance.length;n++)t.removeChild(e.instance[n])}function O(t,e){for(;null!=e.dom&&e.dom.parentNode===t;){if("string"!=typeof e.tag){if(null!=(e=e.instance))continue}else if("<"===e.tag)C(t,e);else{if("["!==e.tag&&(t.removeChild(e.dom),!Array.isArray(e.children)))break;if(1===e.children.length){if(null!=(e=e.children[0]))continue}else for(var n=0;n<e.children.length;n++){var i=e.children[n];null!=i&&O(t,i)}}break}}function k(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&&k(t.instance);else{var e=t.children;if(Array.isArray(e))for(var n=0;n<e.length;n++){var i=e[n];null!=i&&k(i)}}}function T(t,e,i,r,o){if("key"!==e&&"is"!==e&&null!=r&&!S(e)&&(i!==r||function(t,e){return"value"===e||"checked"===e||"selectedIndex"===e||"selected"===e&&t.dom===c()||"option"===t.tag&&t.dom.parentNode===n.activeElement}(t,e)||"object"==typeof r)){if("o"===e[0]&&"n"===e[1])return I(t,e,r);if("xlink:"===e.slice(0,6))t.dom.setAttributeNS("http://www.w3.org/1999/xlink",e.slice(6),r);else if("style"===e)$(t.dom,i,r);else if(A(t,e,o)){if("value"===e){if(("input"===t.tag||"textarea"===t.tag)&&t.dom.value===""+r&&t.dom===c())return;if("select"===t.tag&&null!==i&&t.dom.value===""+r)return;if("option"===t.tag&&null!==i&&t.dom.value===""+r)return}"input"===t.tag&&"type"===e?t.dom.setAttribute(e,r):t.dom[e]=r}else"boolean"==typeof r?r?t.dom.setAttribute(e,""):t.dom.removeAttribute(e):t.dom.setAttribute("className"===e?"class":e,r)}}function j(t,e,n,i){if("key"!==e&&"is"!==e&&null!=n&&!S(e))if("o"!==e[0]||"n"!==e[1]||S(e))if("style"===e)$(t.dom,n,null);else if(!A(t,e,i)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===c())||"input"===t.tag&&"type"===e){var r=e.indexOf(":");-1!==r&&(e=e.slice(r+1)),!1!==n&&t.dom.removeAttribute("className"===e?"class":e)}else t.dom[e]=null;else I(t,e,void 0)}function S(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function A(t,e,n){return void 0===n&&(t.tag.indexOf("-")>-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var P=/[A-Z]/g;function E(t){return"-"+t.toLowerCase()}function D(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(P,E)}function $(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var i in t.style.cssText="",n){null!=(r=n[i])&&t.style.setProperty(D(i),String(r))}else{for(var i in n){var r;null!=(r=n[i])&&(r=String(r))!==String(e[i])&&t.style.setProperty(D(i),r)}for(var i in e)null!=e[i]&&null==n[i]&&t.style.removeProperty(D(i))}}function _(){this._=e}function I(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new _,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function M(t,e,n){"function"==typeof t.oninit&&a.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(a.bind(t.oncreate,e))}function L(t,e,n){"function"==typeof t.onupdate&&n.push(a.bind(t.onupdate,e))}return _.prototype=Object.create(null),_.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,r){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],s=c(),a=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=i.normalizeChildren(Array.isArray(n)?n:[n]);var u=e;try{e="function"==typeof r?r:void 0,h(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===a?void 0:a)}finally{e=u}t.vnodes=n,null!=s&&c()!==s&&"function"==typeof s.focus&&s.focus();for(var l=0;l<o.length;l++)o[l]()}}},function(t,e,n){"use strict";var i=n(33);t.exports=function(t,e,n){var r=[],o=!1,s=!1;function a(){if(o)throw new Error("Nested m.redraw.sync() call");o=!0;for(var e=0;e<r.length;e+=2)try{t(r[e],i(r[e+1]),c)}catch(t){n.error(t)}o=!1}function c(){s||(s=!0,e((function(){s=!1,a()})))}return c.sync=a,{mount:function(e,n){if(null!=n&&null==n.view&&"function"!=typeof n)throw new TypeError("m.mount(element, component) expects a component, not a vnode");var o=r.indexOf(e);o>=0&&(r.splice(o,2),t(e,[],c)),null!=n&&(r.push(e,n),t(e,i(n),c))},redraw:c}}},function(t,e,n){"use strict";var i=n(72);t.exports=function(t,e,n){var r=0;function o(t){return new e(t)}function s(t){return function(r,s){"string"!=typeof r?(s=r,r=r.url):null==s&&(s={});var a=new e((function(e,n){t(i(r,s.params),s,(function(t){if("function"==typeof s.type)if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=new s.type(t[n]);else t=new s.type(t);e(t)}),n)}));if(!0===s.background)return a;var c=0;function u(){0==--c&&"function"==typeof n&&n()}return function t(e){var n=e.then;return e.constructor=o,e.then=function(){c++;var i=n.apply(e,arguments);return i.then(u,(function(t){if(u(),0===c)throw t})),t(i)},e}(a)}}function a(t,e){for(var n in t.headers)if({}.hasOwnProperty.call(t.headers,n)&&e.test(n))return!0;return!1}return o.prototype=e.prototype,o.__proto__=e,{request:s((function(e,n,i,r){var o,s=null!=n.method?n.method.toUpperCase():"GET",c=n.body,u=!(null!=n.serialize&&n.serialize!==JSON.serialize||c instanceof t.FormData),l=n.responseType||("function"==typeof n.extract?"":"json"),d=new t.XMLHttpRequest,p=!1,h=d,f=d.abort;for(var m in d.abort=function(){p=!0,f.call(this)},d.open(s,e,!1!==n.async,"string"==typeof n.user?n.user:void 0,"string"==typeof n.password?n.password:void 0),u&&null!=c&&!a(n,/^content-type$/i)&&d.setRequestHeader("Content-Type","application/json; charset=utf-8"),"function"==typeof n.deserialize||a(n,/^accept$/i)||d.setRequestHeader("Accept","application/json, text/*"),n.withCredentials&&(d.withCredentials=n.withCredentials),n.timeout&&(d.timeout=n.timeout),d.responseType=l,n.headers)({}).hasOwnProperty.call(n.headers,m)&&d.setRequestHeader(m,n.headers[m]);d.onreadystatechange=function(t){if(!p&&4===t.target.readyState)try{var o,s=t.target.status>=200&&t.target.status<300||304===t.target.status||/^file:\/\//i.test(e),a=t.target.response;if("json"===l?t.target.responseType||"function"==typeof n.extract||(a=JSON.parse(t.target.responseText)):l&&"text"!==l||null==a&&(a=t.target.responseText),"function"==typeof n.extract?(a=n.extract(t.target,n),s=!0):"function"==typeof n.deserialize&&(a=n.deserialize(a)),s)i(a);else{try{o=t.target.responseText}catch(t){o=a}var c=new Error(o);c.code=t.target.status,c.response=a,r(c)}}catch(t){r(t)}},"function"==typeof n.config&&(d=n.config(d,n,e)||d)!==h&&(o=d.abort,d.abort=function(){p=!0,o.call(this)}),null==c?d.send():"function"==typeof n.serialize?d.send(n.serialize(c)):c instanceof t.FormData?d.send(c):d.send(JSON.stringify(c))})),jsonp:s((function(e,n,i,o){var s=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+r++,a=t.document.createElement("script");t[s]=function(e){delete t[s],a.parentNode.removeChild(a),i(e)},a.onerror=function(){delete t[s],a.parentNode.removeChild(a),o(new Error("JSONP request failed"))},a.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(s),t.document.documentElement.appendChild(a)}))}}},function(t,e,n){"use strict";var i=n(71);t.exports=n(112)(window,i)},function(t,e,n){"use strict";(function(e){var i=n(33),r=n(84),o=n(86),s=n(72),a=n(73),c=n(113),u=n(91),l={};t.exports=function(t,n){var d;function p(e,n,i){if(e=s(e,n),null!=d){d();var r=i?i.state:null,o=i?i.title:null;i&&i.replace?t.history.replaceState(r,o,y.prefix+e):t.history.pushState(r,o,y.prefix+e)}else t.location.href=y.prefix+e}var h,f,m,v,g=l,b=y.SKIP={};function y(r,s,w){if(null==r)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var x,N=0,C=Object.keys(w).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:w[t],check:c(t)}})),O="function"==typeof e?e:setTimeout,k=o.resolve(),T=!1;if(d=null,null!=s){var j=a(s);if(!C.some((function(t){return t.check(j)})))throw new ReferenceError("Default route doesn't match any known routes")}function S(){T=!1;var e=t.location.hash;"#"!==y.prefix[0]&&(e=t.location.search+e,"?"!==y.prefix[0]&&"/"!==(e=t.location.pathname+e)[0]&&(e="/"+e));var i=e.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(y.prefix.length),r=a(i);function o(){if(i===s)throw new Error("Could not resolve default route "+s);p(s,null,{replace:!0})}u(r.params,t.history.state),function t(e){for(;e<C.length;e++)if(C[e].check(r)){var s=C[e].component,a=C[e].route,c=s,u=v=function(o){if(u===v){if(o===b)return t(e+1);h=null==o||"function"!=typeof o.view&&"function"!=typeof o?"div":o,f=r.params,m=i,v=null,g=s.render?s:null,2===N?n.redraw():(N=2,n.redraw.sync())}};return void(s.view||"function"==typeof s?(s={},u(c)):s.onmatch?k.then((function(){return s.onmatch(r.params,i,a)})).then(u,o):u("div"))}o()}(0)}return d=function(){T||(T=!0,O(S))},"function"==typeof t.history.pushState?(x=function(){t.removeEventListener("popstate",d,!1)},t.addEventListener("popstate",d,!1)):"#"===y.prefix[0]&&(d=null,x=function(){t.removeEventListener("hashchange",S,!1)},t.addEventListener("hashchange",S,!1)),n.mount(r,{onbeforeupdate:function(){return!(!(N=N?2:1)||l===g)},oncreate:S,onremove:x,view:function(){if(N&&l!==g){var t=[i(h,f.key,f)];return g&&(t=g.render(t[0])),t}}})}return y.set=function(t,e,n){null!=v&&((n=n||{}).replace=!0),v=null,p(t,e,n)},y.get=function(){return m},y.prefix="#!",y.Link={view:function(t){var e,n,i=t.attrs.options,o={};u(o,t.attrs),o.selector=o.options=o.key=o.oninit=o.oncreate=o.onbeforeupdate=o.onupdate=o.onbeforeremove=o.onremove=null;var s=r(t.attrs.selector||"a",o,t.children);return(s.attrs.disabled=Boolean(s.attrs.disabled))?(s.attrs.href=null,s.attrs["aria-disabled"]="true",s.attrs.onclick=null):(e=s.attrs.onclick,n=s.attrs.href,s.attrs.href=y.prefix+n,s.attrs.onclick=function(t){var r;"function"==typeof e?r=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===r||t.defaultPrevented||0!==t.button&&0!==t.which&&1!==t.which||t.currentTarget.target&&"_self"!==t.currentTarget.target||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||(t.preventDefault(),t.redraw=!1,y.set(n,null,i))}),s}},y.param=function(t){return f&&null!=t?f[t]:f},y}}).call(this,n(88).setImmediate)},function(t,e,n){"use strict";var i=n(73);t.exports=function(t){var e=i(t),n=Object.keys(e.params),r=[],o=new RegExp("^"+e.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,(function(t,e,n){return null==e?"\\"+t:(r.push({k:e,r:"..."===n}),"..."===n?"(.*)":"."===n?"([^/]+)\\.":"([^/]+)"+(n||""))}))+"$");return function(t){for(var i=0;i<n.length;i++)if(e.params[n[i]]!==t.params[n[i]])return!1;if(!r.length)return o.test(t.path);var s=o.exec(t.path);if(null==s)return!1;for(i=0;i<r.length;i++)t.params[r[i].k]=r[i].r?s[i+1]:decodeURIComponent(s[i+1]);return!0}}},function(t,e,n){(function(e){t.exports=e.moment=n(115)}).call(this,n(22))},function(t,e,n){(function(e){t.exports=e.dayjs=n(28)}).call(this,n(22))},function(t,e,n){(function(e){e.m||(e.m={}),t.exports=e.m.bidi=n(117)}).call(this,n(22))},function(t,e,n){var i,r,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,i){return e(n,n.attrs.bidi)},t.attrs&&(t.attrs.bidi=e),t.bidi=e,e},r=[n(83)],void 0===(o="function"==typeof(i=s)?i.apply(e,r):i)||(t.exports=o)},function(t,e){!function(t){"use strict";var e=function(n,i){this.options=t.extend({},e.DEFAULTS,i);var r=this.options.target===e.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=r.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var i=t(this),r=i.data("bs.affix"),o="object"==typeof n&&n;r||i.data("bs.affix",r=new e(this,o)),"string"==typeof n&&r[n]()}))}e.VERSION="3.4.1",e.RESET="affix affix-top affix-bottom",e.DEFAULTS={offset:0,target:window},e.prototype.getState=function(t,e,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return r<n&&"top";if("bottom"==this.affixed)return null!=n?!(r+this.unpin<=o.top)&&"bottom":!(r+s<=t-i)&&"bottom";var a=null==this.affixed,c=a?r:o.top;return null!=n&&r<=n?"top":null!=i&&c+(a?s:e)>=t-i&&"bottom"},e.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(e.RESET).addClass("affix");var t=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-t},e.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var a=this.getState(s,n,r,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var c="affix"+(a?"-"+a:""),u=t.Event(c+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(c).trigger(c.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var i=t.fn.affix;t.fn.affix=n,t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var e=t(this),i=e.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),n.call(e,i)}))}))}(jQuery)},function(t,e){!function(t){"use strict";var e='[data-toggle="dropdown"]',n=function(e){t(e).on("click.bs.dropdown",this.toggle)};function i(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==n?t(document).find(n):null;return i&&i.length?i:e.parent()}function r(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),r=i(e),o={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(r[0],n.target)||(r.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(e.attr("aria-expanded","false"),r.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var o=i(n),s=o.hasClass("open");if(r(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",r);var a={relatedTarget:this};if(o.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},n.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var r=t(this);if(n.preventDefault(),n.stopPropagation(),!r.is(".disabled, :disabled")){var o=i(r),s=o.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&o.find(e).trigger("focus"),r.trigger("click");var a=o.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var c=a.index(n.target);38==n.which&&c>0&&c--,40==n.which&&c<a.length-1&&c++,~c||(c=0),a.eq(c).trigger("focus")}}}};var o=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var i=t(this),r=i.data("bs.dropdown");r||i.data("bs.dropdown",r=new n(this)),"string"==typeof e&&r[e].call(i)}))},t.fn.dropdown.Constructor=n,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=o,this},t(document).on("click.bs.dropdown.data-api",r).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",e,n.prototype.toggle).on("keydown.bs.dropdown.data-api",e,n.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",n.prototype.keydown)}(jQuery)},function(t,e){!function(t){"use strict";var e=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};function n(n,i){return this.each((function(){var r=t(this),o=r.data("bs.modal"),s=t.extend({},e.DEFAULTS,r.data(),"object"==typeof n&&n);o||r.data("bs.modal",o=new e(this,s)),"string"==typeof n?o[n](i):s.show&&o.show(i)}))}e.VERSION="3.4.1",e.TRANSITION_DURATION=300,e.BACKDROP_TRANSITION_DURATION=150,e.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},e.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},e.prototype.show=function(n){var i=this,r=t.Event("show.bs.modal",{relatedTarget:n});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",(function(){i.$element.one("mouseup.dismiss.bs.modal",(function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var r=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),r&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:n});r?i.$dialog.one("bsTransitionEnd",(function(){i.$element.trigger("focus").trigger(o)})).emulateTransitionEnd(e.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)})))},e.prototype.hide=function(n){n&&n.preventDefault(),n=t.Event("hide.bs.modal"),this.$element.trigger(n),this.isShown&&!n.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(e.TRANSITION_DURATION):this.hideModal())},e.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy((function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}),this))},e.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy((function(t){27==t.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},e.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},e.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop((function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")}))},e.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},e.prototype.backdrop=function(n){var i=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&r;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy((function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())}),this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!n)return;o?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):n()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){i.removeBackdrop(),n&&n()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):s()}else n&&n()},e.prototype.handleUpdate=function(){this.adjustDialog()},e.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},e.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},e.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},e.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",e+n),t(this.fixedContent).each((function(e,i){var r=i.style.paddingRight,o=t(i).css("padding-right");t(i).data("padding-right",r).css("padding-right",parseFloat(o)+n+"px")})))},e.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),t(this.fixedContent).each((function(e,n){var i=t(n).data("padding-right");t(n).removeData("padding-right"),n.style.paddingRight=i||""}))},e.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=n,t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(e){var i=t(this),r=i.attr("href"),o=i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,""),s=t(document).find(o),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},s.data(),i.data());i.is("a")&&e.preventDefault(),s.one("show.bs.modal",(function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",(function(){i.is(":visible")&&i.trigger("focus")}))})),n.call(s,a,this)}))}(jQuery)},function(t,e){!function(t){"use strict";var e=["sanitize","whiteList","sanitizeFn"],n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],i={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,o=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function s(e,i){var s=e.nodeName.toLowerCase();if(-1!==t.inArray(s,i))return-1===t.inArray(s,n)||Boolean(e.nodeValue.match(r)||e.nodeValue.match(o));for(var a=t(i).filter((function(t,e){return e instanceof RegExp})),c=0,u=a.length;c<u;c++)if(s.match(a[c]))return!0;return!1}function a(e,n,i){if(0===e.length)return e;if(i&&"function"==typeof i)return i(e);if(!document.implementation||!document.implementation.createHTMLDocument)return e;var r=document.implementation.createHTMLDocument("sanitization");r.body.innerHTML=e;for(var o=t.map(n,(function(t,e){return e})),a=t(r.body).find("*"),c=0,u=a.length;c<u;c++){var l=a[c],d=l.nodeName.toLowerCase();if(-1!==t.inArray(d,o))for(var p=t.map(l.attributes,(function(t){return t})),h=[].concat(n["*"]||[],n[d]||[]),f=0,m=p.length;f<m;f++)s(p[f],h)||l.removeAttribute(p[f].nodeName);else l.parentNode.removeChild(l)}return r.body.innerHTML}var c=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};c.VERSION="3.4.1",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},c.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var s=r[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",c="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(c+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(n){var i=this.$element.data();for(var r in i)i.hasOwnProperty(r)&&-1!==t.inArray(r,e)&&delete i[r];return(n=t.extend({},this.getDefaults(),i,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=a(n.template,n.whiteList,n.sanitizeFn)),n},c.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,(function(t,i){n[t]!=i&&(e[t]=i)})),e},c.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},c.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},c.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},c.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var i=this,r=this.tip(),o=this.getUID(this.type);this.setContent(),r.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&r.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,u=a.test(s);u&&(s=s.replace(a,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?r.appendTo(t(document).find(this.options.container)):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),d=r[0].offsetWidth,p=r[0].offsetHeight;if(u){var h=s,f=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+p>f.bottom?"top":"top"==s&&l.top-p<f.top?"bottom":"right"==s&&l.right+d>f.width?"left":"left"==s&&l.left-d<f.left?"right":s,r.removeClass(h).addClass(s)}var m=this.getCalculatedOffset(s,l,d,p);this.applyPlacement(m,s);var v=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};t.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",v).emulateTransitionEnd(c.TRANSITION_DURATION):v()}},c.prototype.applyPlacement=function(e,n){var i=this.tip(),r=i[0].offsetWidth,o=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var c=i[0].offsetWidth,u=i[0].offsetHeight;"top"==n&&u!=o&&(e.top=e.top+o-u);var l=this.getViewportAdjustedDelta(n,e,c,u);l.left?e.left+=l.left:e.top+=l.top;var d=/top|bottom/.test(n),p=d?2*l.left-r+c:2*l.top-o+u,h=d?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(p,i[0][h],d)},c.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},c.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=a(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},c.prototype.hide=function(e){var n=this,i=t(this.$tip),r=t.Event("hide.bs."+this.type);function o(){"in"!=n.hoverState&&i.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}if(this.$element.trigger(r),!r.isDefaultPrevented())return i.removeClass("in"),t.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",o).emulateTransitionEnd(c.TRANSITION_DURATION):o(),this.hoverState=null,this},c.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(e){var n=(e=e||this.$element)[0],i="BODY"==n.tagName,r=n.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=window.SVGElement&&n instanceof window.SVGElement,s=i?{top:0,left:0}:o?null:e.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},c=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,a,c,s)},c.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},c.prototype.getViewportAdjustedDelta=function(t,e,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-s.scroll,c=e.top+o-s.scroll+i;a<s.top?r.top=s.top-a:c>s.top+s.height&&(r.top=s.top+s.height-c)}else{var u=e.left-o,l=e.left+o+n;u<s.left?r.left=s.left-u:l>s.right&&(r.left=s.left+s.width-l)}return r},c.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},c.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},c.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null}))},c.prototype.sanitizeHtml=function(t){return a(t,this.options.whiteList,this.options.sanitizeFn)};var u=t.fn.tooltip;t.fn.tooltip=function(e){return this.each((function(){var n=t(this),i=n.data("bs.tooltip"),r="object"==typeof e&&e;!i&&/destroy|hide/.test(e)||(i||n.data("bs.tooltip",i=new c(this,r)),"string"==typeof e&&i[e]())}))},t.fn.tooltip.Constructor=c,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=u,this}}(jQuery)},function(t,e){!function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",(function(){n=!0}));return setTimeout((function(){n||t(i).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})}))}(jQuery)},function(t,e){!function(t){function e(e){if("string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys){var n=e.handler,i=e.data.keys.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!(t.hotkeys.options.filterInputAcceptingElements&&t.hotkeys.textInputTypes.test(e.target.nodeName)||t.hotkeys.options.filterContentEditable&&t(e.target).attr("contenteditable")||t.hotkeys.options.filterTextInputs&&t.inArray(e.target.type,t.hotkeys.textAcceptingInputTypes)>-1)){var r="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],o=String.fromCharCode(e.which).toLowerCase(),s="",a={};t.each(["alt","ctrl","shift"],(function(t,n){e[n+"Key"]&&r!==n&&(s+=n+"+")})),e.metaKey&&!e.ctrlKey&&"meta"!==r&&(s+="meta+"),e.metaKey&&"meta"!==r&&s.indexOf("alt+ctrl+shift+")>-1&&(s=s.replace("alt+ctrl+shift+","hyper+")),r?a[s+r]=!0:(a[s+o]=!0,a[s+t.hotkeys.shiftNums[o]]=!0,"shift+"===s&&(a[t.hotkeys.shiftNums[o]]=!0));for(var c=0,u=i.length;c<u;c++)if(a[i[c]])return n.apply(this,arguments)}}}}t.hotkeys={version:"0.2.0",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},t.each(["keydown","keyup","keypress"],(function(){t.event.special[this]={add:e}}))}(jQuery||this.jQuery||window.jQuery)},function(t,e,n){!function(){"use strict";n.SKIP={},n.lift=function(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1);return r(e).map((function(e){return t.apply(void 0,e)}))},n.scan=function(t,e,i){var r=i.map((function(i){var r=t(e,i);return r!==n.SKIP&&(e=r),r}));return r(e),r},n.merge=r,n.combine=i,n.scanMerge=function(t,e){var n=t.map((function(t){return t[0]})),r=i((function(){var i=arguments[arguments.length-1];return n.forEach((function(n,r){i.indexOf(n)>-1&&(e=t[r][1](e,n()))})),e}),n);return r(e),r},n["fantasy-land/of"]=n;var e=!1;function n(t){var e,r=[],s=[];function a(e){return arguments.length&&e!==n.SKIP&&(t=e,o(a)&&(a._changing(),a._state="active",r.forEach((function(e,n){e(s[n](t))})))),t}function c(){return(e=n()).map((function(t){return!0===t&&(a._parents.forEach((function(t){t._unregisterChild(a)})),a._state="ended",a._parents.length=r.length=s.length=0),t})),e}return a.constructor=n,a._state=arguments.length&&t!==n.SKIP?"active":"pending",a._parents=[],a._changing=function(){o(a)&&(a._state="changing"),r.forEach((function(t){t._changing()}))},a._map=function(e,i){var o=i?n():n(e(t));return o._parents.push(a),r.push(o),s.push(e),o},a.map=function(t){return a._map(t,"active"!==a._state)},a.toJSON=function(){return null!=t&&"function"==typeof t.toJSON?t.toJSON():t},a["fantasy-land/map"]=a.map,a["fantasy-land/ap"]=function(t){return i((function(t,e){return t()(e())}),[t,a])},a._unregisterChild=function(t){var e=r.indexOf(t);-1!==e&&(r.splice(e,1),s.splice(e,1))},Object.defineProperty(a,"end",{get:function(){return e||c()}}),a}function i(t,e){var i=e.every((function(t){if(t.constructor!==n)throw new Error("Ensure that each item passed to stream.combine/stream.merge/lift is a stream");return"active"===t._state})),r=i?n(t.apply(null,e.concat([e]))):n(),o=[],s=e.map((function(n){return n._map((function(s){return o.push(n),(i||e.every((function(t){return"pending"!==t._state})))&&(i=!0,r(t.apply(null,e.concat([o]))),o=[]),s}),!0)})),a=r.end.map((function(t){!0===t&&(s.forEach((function(t){t.end(!0)})),a.end(!0))}));return r}function r(t){return i((function(){return t.map((function(t){return t()}))}),t)}function o(t){return"pending"===t._state||"active"===t._state||"changing"===t._state}Object.defineProperty(n,"HALT",{get:function(){return e||console.log("HALT is deprecated and has been renamed to SKIP"),e=!0,n.SKIP}}),t.exports=n}()},,function(t,e,n){(function(e){t.exports=e.punycode=n(127)}).call(this,n(22))},function(t,e,n){(function(t,i){var r;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof i&&i;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,u=/^xn--/,l=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function m(t){throw new RangeError(p[t])}function v(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function g(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+v((t=t.replace(d,".")).split("."),e).join(".")}function b(t){for(var e,n,i=[],r=0,o=t.length;r<o;)(e=t.charCodeAt(r++))>=55296&&e<=56319&&r<o?56320==(64512&(n=t.charCodeAt(r++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),r--):i.push(e);return i}function y(t){return v(t,(function(t){var e="";return t>65535&&(e+=f((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=f(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function x(t,e,n){var i=0;for(t=n?h(t/700):t>>1,t+=h(t/e);t>455;i+=36)t=h(t/35);return h(i+36*t/(t+38))}function N(t){var e,n,i,r,o,s,a,u,l,d,p,f=[],v=t.length,g=0,b=128,w=72;for((n=t.lastIndexOf("-"))<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&m("not-basic"),f.push(t.charCodeAt(i));for(r=n>0?n+1:0;r<v;){for(o=g,s=1,a=36;r>=v&&m("invalid-input"),((u=(p=t.charCodeAt(r++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||u>h((c-g)/s))&&m("overflow"),g+=u*s,!(u<(l=a<=w?1:a>=w+26?26:a-w));a+=36)s>h(c/(d=36-l))&&m("overflow"),s*=d;w=x(g-o,e=f.length+1,0==o),h(g/e)>c-b&&m("overflow"),b+=h(g/e),g%=e,f.splice(g++,0,b)}return y(f)}function C(t){var e,n,i,r,o,s,a,u,l,d,p,v,g,y,N,C=[];for(v=(t=b(t)).length,e=128,n=0,o=72,s=0;s<v;++s)(p=t[s])<128&&C.push(f(p));for(i=r=C.length,r&&C.push("-");i<v;){for(a=c,s=0;s<v;++s)(p=t[s])>=e&&p<a&&(a=p);for(a-e>h((c-n)/(g=i+1))&&m("overflow"),n+=(a-e)*g,e=a,s=0;s<v;++s)if((p=t[s])<e&&++n>c&&m("overflow"),p==e){for(u=n,l=36;!(u<(d=l<=o?1:l>=o+26?26:l-o));l+=36)N=u-d,y=36-d,C.push(f(w(d+N%y,0))),u=h(N/y);C.push(f(w(u,0))),o=x(n,g,i==r),n=0,++i}++n,++e}return C.join("")}a={version:"1.4.1",ucs2:{decode:b,encode:y},decode:N,encode:C,toASCII:function(t){return g(t,(function(t){return l.test(t)?"xn--"+C(t):t}))},toUnicode:function(t){return g(t,(function(t){return u.test(t)?N(t.slice(4).toLowerCase()):t}))}},void 0===(r=function(){return a}.call(e,n,e,t))||(t.exports=r)}()}).call(this,n(128)(t),n(22))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(e){t.exports=e.ColorThief=n(130)}).call(this,n(22))},function(t,e){
  /*!
   * Color Thief v2.0
   * by Lokesh Dhakar - http://www.lokeshdhakar.com
   *
   * Thanks
   * ------
   * Nick Rabinowitz - For creating quantize.js.
   * John Schulz - For clean up and optimization. @JFSIII
   * Nathan Spady - For adding drag and drop support to the demo page.
   *
   * License
   * -------
   * Copyright 2011, 2015 Lokesh Dhakar
   * Released under the MIT license
   * https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE
   *
   */
  var n=function(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),document.body.appendChild(this.canvas),this.width=this.canvas.width=t.width,this.height=this.canvas.height=t.height,this.context.drawImage(t,0,0,this.width,this.height)};n.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},n.prototype.update=function(t){this.context.putImageData(t,0,0)},n.prototype.getPixelCount=function(){return this.width*this.height},n.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},n.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var i=function(){};
  /*!
   * quantize.js Copyright 2008 Nick Rabinowitz.
   * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
   */
  /*!
   * Block below copied from Protovis: http://mbostock.github.com/protovis/
   * Copyright 2010 Stanford Visualization Group
   * Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php
   */if(i.prototype.getColor=function(t,e){return this.getPalette(t,5,e)[0]},i.prototype.getPalette=function(t,e,i){void 0===e&&(e=10),(void 0===i||1>i)&&(i=10);for(var r,s,a,c,u=new n(t),l=u.getImageData().data,d=u.getPixelCount(),p=[],h=0;d>h;h+=i)s=l[(r=4*h)+0],a=l[r+1],c=l[r+2],l[r+3]>=125&&(s>250&&a>250&&c>250||p.push([s,a,c]));var f=o.quantize(p,e),m=f?f.palette():null;return u.removeCanvas(),m},!r)var r={map:function(t,e){var n={};return e?t.map((function(t,i){return n.index=i,e.call(n,t)})):t.slice()},naturalOrder:function(t,e){return e>t?-1:t>e?1:0},sum:function(t,e){var n={};return t.reduce(e?function(t,i,r){return n.index=r,t+e.call(n,i)}:function(t,e){return t+e},0)},max:function(t,e){return Math.max.apply(null,e?r.map(t,e):t)}};var o=function(){function t(t,e,n){return(t<<2*c)+(e<<c)+n}function e(t){function e(){n.sort(t),i=!0}var n=[],i=!1;return{push:function(t){n.push(t),i=!1},peek:function(t){return i||e(),void 0===t&&(t=n.length-1),n[t]},pop:function(){return i||e(),n.pop()},size:function(){return n.length},map:function(t){return n.map(t)},debug:function(){return i||e(),n}}}function n(t,e,n,i,r,o,s){var a=this;a.r1=t,a.r2=e,a.g1=n,a.g2=i,a.b1=r,a.b2=o,a.histo=s}function i(){this.vboxes=new e((function(t,e){return r.naturalOrder(t.vbox.count()*t.vbox.volume(),e.vbox.count()*e.vbox.volume())}))}function o(e){var n,i,r,o,s=new Array(1<<3*c);return e.forEach((function(e){i=e[0]>>u,r=e[1]>>u,o=e[2]>>u,n=t(i,r,o),s[n]=(s[n]||0)+1})),s}function s(t,e){var i,r,o,s=1e6,a=0,c=1e6,l=0,d=1e6,p=0;return t.forEach((function(t){i=t[0]>>u,r=t[1]>>u,o=t[2]>>u,s>i?s=i:i>a&&(a=i),c>r?c=r:r>l&&(l=r),d>o?d=o:o>p&&(p=o)})),new n(s,a,c,l,d,p,e)}function a(e,n){if(n.count()){var i=n.r2-n.r1+1,o=n.g2-n.g1+1,s=n.b2-n.b1+1,a=r.max([i,o,s]);if(1==n.count())return[n.copy()];var c,u,l,d,p=0,h=[],f=[];if(a==i)for(c=n.r1;c<=n.r2;c++){for(d=0,u=n.g1;u<=n.g2;u++)for(l=n.b1;l<=n.b2;l++)d+=e[t(c,u,l)]||0;p+=d,h[c]=p}else if(a==o)for(c=n.g1;c<=n.g2;c++){for(d=0,u=n.r1;u<=n.r2;u++)for(l=n.b1;l<=n.b2;l++)d+=e[t(u,c,l)]||0;p+=d,h[c]=p}else for(c=n.b1;c<=n.b2;c++){for(d=0,u=n.r1;u<=n.r2;u++)for(l=n.g1;l<=n.g2;l++)d+=e[t(u,l,c)]||0;p+=d,h[c]=p}return h.forEach((function(t,e){f[e]=p-t})),function(t){var e,i,r,o,s,a=t+"1",u=t+"2",l=0;for(c=n[a];c<=n[u];c++)if(h[c]>p/2){for(r=n.copy(),o=n.copy(),e=c-n[a],s=(i=n[u]-c)>=e?Math.min(n[u]-1,~~(c+i/2)):Math.max(n[a],~~(c-1-e/2));!h[s];)s++;for(l=f[s];!l&&h[s-1];)l=f[--s];return r[u]=s,o[a]=r[u]+1,[r,o]}}(a==i?"r":a==o?"g":"b")}}var c=5,u=8-c,l=1e3,d=.75;return n.prototype={volume:function(t){var e=this;return(!e._volume||t)&&(e._volume=(e.r2-e.r1+1)*(e.g2-e.g1+1)*(e.b2-e.b1+1)),e._volume},count:function(e){var n=this,i=n.histo;if(!n._count_set||e){var r,o,s,a=0;for(r=n.r1;r<=n.r2;r++)for(o=n.g1;o<=n.g2;o++)for(s=n.b1;s<=n.b2;s++)index=t(r,o,s),a+=i[index]||0;n._count=a,n._count_set=!0}return n._count},copy:function(){var t=this;return new n(t.r1,t.r2,t.g1,t.g2,t.b1,t.b2,t.histo)},avg:function(e){var n=this,i=n.histo;if(!n._avg||e){var r,o,s,a,u=0,l=1<<8-c,d=0,p=0,h=0;for(o=n.r1;o<=n.r2;o++)for(s=n.g1;s<=n.g2;s++)for(a=n.b1;a<=n.b2;a++)u+=r=i[t(o,s,a)]||0,d+=r*(o+.5)*l,p+=r*(s+.5)*l,h+=r*(a+.5)*l;n._avg=u?[~~(d/u),~~(p/u),~~(h/u)]:[~~(l*(n.r1+n.r2+1)/2),~~(l*(n.g1+n.g2+1)/2),~~(l*(n.b1+n.b2+1)/2)]}return n._avg},contains:function(t){var e=this,n=t[0]>>u;return gval=t[1]>>u,bval=t[2]>>u,n>=e.r1&&n<=e.r2&&gval>=e.g1&&gval<=e.g2&&bval>=e.b1&&bval<=e.b2}},i.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map((function(t){return t.color}))},size:function(){return this.vboxes.size()},map:function(t){for(var e=this.vboxes,n=0;n<e.size();n++)if(e.peek(n).vbox.contains(t))return e.peek(n).color;return this.nearest(t)},nearest:function(t){for(var e,n,i,r=this.vboxes,o=0;o<r.size();o++)(e>(n=Math.sqrt(Math.pow(t[0]-r.peek(o).color[0],2)+Math.pow(t[1]-r.peek(o).color[1],2)+Math.pow(t[2]-r.peek(o).color[2],2)))||void 0===e)&&(e=n,i=r.peek(o).color);return i},forcebw:function(){var t=this.vboxes;t.sort((function(t,e){return r.naturalOrder(r.sum(t.color),r.sum(e.color))}));var e=t[0].color;e[0]<5&&e[1]<5&&e[2]<5&&(t[0].color=[0,0,0]);var n=t.length-1,i=t[n].color;i[0]>251&&i[1]>251&&i[2]>251&&(t[n].color=[255,255,255])}},{quantize:function(t,n){function c(t,e){for(var n,i=1,r=0;l>r;)if((n=t.pop()).count()){var o=a(u,n),s=o[0],c=o[1];if(!s)return;if(t.push(s),c&&(t.push(c),i++),i>=e)return;if(r++>l)return}else t.push(n),r++}if(!t.length||2>n||n>256)return!1;var u=o(t);u.forEach((function(){0}));var p=s(t,u),h=new e((function(t,e){return r.naturalOrder(t.count(),e.count())}));h.push(p),c(h,d*n);for(var f=new e((function(t,e){return r.naturalOrder(t.count()*t.volume(),e.count()*e.volume())}));h.size();)f.push(h.pop());c(f,n-f.size());for(var m=new i;f.size();)m.push(f.pop());return m}}}();t.exports=i},function(t,e,n){"use strict";n.r(e),n.d(e,"Extend",(function(){return i.a})),n.d(e,"app",(function(){return Fe})),n.d(e,"compat",(function(){return Ue}));var i=n(93),r=(n(126),n(129),n(25)),o=n(0),s=n(5),a=n(2),c=n(51),u=function(){function t(t){this.stack=[]}var e=t.prototype;return e.getCurrent=function(){return this.stack[this.stack.length-1]},e.getPrevious=function(){return this.stack[this.stack.length-2]},e.push=function(t,e,n){void 0===n&&(n=m.route.get());var i=this.stack[this.stack.length-2];i&&i.name===t&&this.stack.pop();var r=this.getCurrent();r&&r.name===t?Object(a.a)(r,{url:n,title:e}):this.stack.push({name:t,url:n,title:e})},e.canGoBack=function(){return this.stack.length>1},e.back=function(){if(!this.canGoBack())return this.home();this.stack.pop(),m.route.set(this.getCurrent().url)},e.backUrl=function(){return this.stack[this.stack.length-2].url},e.home=function(){this.stack.splice(0),Object(c.a)("/")},t}(),l=function(){function t(t){this.pinnedKey="panePinned",this.$element=$(t),this.pinned="true"===localStorage.getItem(this.pinnedKey),this.active=!1,this.showing=!1,this.render()}var e=t.prototype;return e.enable=function(){this.active=!0,this.render()},e.disable=function(){this.active=!1,this.showing=!1,this.render()},e.show=function(){clearTimeout(this.hideTimeout),this.showing=!0,this.render()},e.hide=function(){this.showing=!1,this.render()},e.onmouseleave=function(){this.hideTimeout=setTimeout(this.hide.bind(this),250)},e.togglePinned=function(){this.pinned=!this.pinned,localStorage.setItem(this.pinnedKey,this.pinned?"true":"false"),this.render()},e.render=function(){this.$element.toggleClass("panePinned",this.pinned).toggleClass("hasPane",this.active).toggleClass("paneShowing",this.showing)},t}(),d=n(21),p=n(6),h=n(4),f=n(8),v=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){return m("header",{className:"Hero DiscussionHero"},m("div",{className:"container"},m("ul",{className:"DiscussionHero-items"},Object(f.a)(this.items().toArray()))))},n.items=function(){var t=new p.a,e=this.attrs.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},Object(f.a)(n)),10),t.add("title",m("h2",{className:"DiscussionHero-title"},e.title())),t},e}(h.a),g=n(14),b=n(17),y=n(37),w=n(7),x=n(29),N=n(75),C=n(15),O=n(42),k=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t=this.attrs.discussion,e=this.attrs.lastPost&&t.replyCount(),n=t[e?"lastPostedUser":"user"](),i=t[e?"lastPostedAt":"createdAt"]();return m("span",null,e?Object(w.a)("fas fa-reply"):""," ",app.translator.trans("core.forum.discussion_list."+(e?"replied":"started")+"_text",{user:n,ago:Object(O.a)(i)}))},e}(h.a),T=n(53),j=n(16),S=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.handler=function(){return this.attrs.when()||void 0},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)},n.onremove=function(){$(window).off("beforeunload",this.boundHandler)},n.view=function(t){return t.children[0]},e}(h.a),A=n(76),P=n(3),E=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.value=this.attrs.value||""},n.view=function(){var t=this;return m("div",{className:"TextEditor"},m("textarea",{className:"FormControl Composer-flexible",oninput:function(e){t.oninput(e.target.value,e)},placeholder:this.attrs.placeholder||"",disabled:!!this.attrs.disabled,value:this.value}),m("ul",{className:"TextEditor-controls Composer-footer"},Object(f.a)(this.controlItems().toArray()),m("li",{className:"TextEditor-toolbar"},this.toolbarItems().toArray())))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e);var i=function(){n.onsubmit(),m.redraw()};this.$("textarea").bind("keydown","meta+return",i),this.$("textarea").bind("keydown","ctrl+return",i),this.attrs.composer.editor=new A.a(this.$("textarea")[0])},n.controlItems=function(){var t=new p.a;return t.add("submit",P.a.component({icon:"fas fa-paper-plane",className:"Button Button--primary",itemClassName:"App-primaryControl",onclick:this.onsubmit.bind(this)},this.attrs.submitLabel)),this.attrs.preview&&t.add("preview",P.a.component({icon:"far fa-eye",className:"Button Button--icon",onclick:this.attrs.preview,title:app.translator.trans("core.forum.composer.preview_tooltip"),oncreate:function(t){return $(t.dom).tooltip()}})),t},n.toolbarItems=function(){return new p.a},n.oninput=function(t,e){this.value=t,this.attrs.onchange(this.value),e.redraw=!1},n.onsubmit=function(){this.attrs.onsubmit(this.value)},e}(h.a),D=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.composer=this.attrs.composer,this.loading=!1,this.attrs.confirmExit&&this.composer.preventClosingWhen((function(){return n.hasChanges()}),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||""),this.content=this.composer.fields.content,this.editor=this.composer},n.view=function(){return m(S,{when:this.hasChanges.bind(this)},m("div",{className:"ComposerBody "+(this.attrs.className||"")},Object(b.a)(this.attrs.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},Object(f.a)(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},E.component({submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:this.jumpToPreview&&this.jumpToPreview.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),j.a.component({className:"ComposerBody-loading"+(this.loading?" active":"")})))},n.hasChanges=function(){var t=this.composer.fields.content();return t&&t!==this.attrs.originalContent},n.headerItems=function(){return new p.a},n.onsubmit=function(){},n.loaded=function(){this.loading=!1,m.redraw()},e}(h.a),_=n(11);function I(t){app.composer.isFullScreen()&&(app.composer.minimize(),t.stopPropagation())}var M=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||Object(_.a)(app.translator.trans("core.forum.composer_reply.body_placeholder")),e.submitLabel=e.submitLabel||app.translator.trans("core.forum.composer_reply.submit_button"),e.confirmExit=e.confirmExit||Object(_.a)(app.translator.trans("core.forum.composer_reply.discard_confirmation"))};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.attrs.discussion;return e.add("title",m("h3",null,Object(w.a)("fas fa-reply")," ",m(g.a,{href:app.route.discussion(n),onclick:I},n.title()))),e},n.jumpToPreview=function(t){I(t),m.route.set(app.route.discussion(this.attrs.discussion,"reply"))},n.data=function(){return{content:this.composer.fields.content(),relationships:{discussion:this.attrs.discussion}}},n.onsubmit=function(){var t=this,e=this.attrs.discussion;this.loading=!0,m.redraw();var n=this.data();app.store.createRecord("posts").save(n).then((function(n){if(app.viewingDiscussion(e)){var i=app.current.get("stream");i.update().then((function(){return i.goToNumber(n.number())}))}else{var r,o=P.a.component({className:"Button Button--link",onclick:function(){m.route.set(app.route.post(n)),app.alerts.dismiss(r)}},app.translator.trans("core.forum.composer_reply.view_button"));r=app.alerts.show({type:"success",controls:[o]},app.translator.trans("core.forum.composer_reply.posted_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(D),L=n(13),R=n(9),B=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Object(R.a)(this.attrs.email||""),this.success=!1},n.className=function(){return"ForgotPasswordModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.forgot_password.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("core.forum.forgot_password.email_sent_message")),m("div",{className:"Form-group"},m(P.a,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},app.translator.trans("core.forum.forgot_password.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("core.forum.forgot_password.text")),m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:Object(_.a)(app.translator.trans("core.forum.forgot_password.email_placeholder")),bidi:this.email,disabled:this.loading})),m("div",{className:"Form-group"},P.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("core.forum.forgot_password.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/forgot",body:{email:this.email()},errorHandler:this.onerror.bind(this)}).then((function(){e.success=!0,e.alert=null})).catch((function(){})).then(this.loaded.bind(this))},n.onerror=function(e){404===e.status&&(e.alert.content=app.translator.trans("core.forum.forgot_password.not_found_message")),t.prototype.onerror.call(this,e)},e}(L.a),H=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new p.a},e}(h.a),U=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.username=Object(R.a)(this.attrs.username||""),this.email=Object(R.a)(this.attrs.email||""),this.password=Object(R.a)(this.attrs.password||"")},n.className=function(){return"Modal--small SignUpModal"},n.title=function(){return app.translator.trans("core.forum.sign_up.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.isProvided=function(t){return this.attrs.provided&&-1!==this.attrs.provided.indexOf(t)},n.body=function(){return[this.attrs.token?"":m(H,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new p.a;return t.add("username",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"username",type:"text",placeholder:Object(_.a)(app.translator.trans("core.forum.sign_up.username_placeholder")),bidi:this.username,disabled:this.loading||this.isProvided("username")})),30),t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:Object(_.a)(app.translator.trans("core.forum.sign_up.email_placeholder")),bidi:this.email,disabled:this.loading||this.isProvided("email")})),20),this.attrs.token||t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",placeholder:Object(_.a)(app.translator.trans("core.forum.sign_up.password_placeholder")),bidi:this.password,disabled:this.loading})),10),t.add("submit",m("div",{className:"Form-group"},m(P.a,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("core.forum.sign_up.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"SignUpModal-logIn"},app.translator.trans("core.forum.sign_up.log_in_text",{a:m("a",{onclick:this.logIn.bind(this)})}))]},n.logIn=function(){var t={identification:this.email()||this.username(),password:this.password()};app.modal.show(F,t)},n.onready=function(){this.attrs.username&&!this.attrs.email?this.$("[name=email]").select():this.$("[name=username]").select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.submitData();app.request({url:app.forum.attribute("baseUrl")+"/register",method:"POST",body:e,errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.submitData=function(){var t={username:this.username(),email:this.email()};return this.attrs.token?t.token=this.attrs.token:t.password=this.password(),t},e}(L.a),F=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.identification=Object(R.a)(this.attrs.identification||""),this.password=Object(R.a)(this.attrs.password||""),this.remember=Object(R.a)(!!this.attrs.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.log_in.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.body=function(){return[m(H,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new p.a;return t.add("identification",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"identification",type:"text",placeholder:Object(_.a)(app.translator.trans("core.forum.log_in.username_or_email_placeholder")),bidi:this.identification,disabled:this.loading})),30),t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",placeholder:Object(_.a)(app.translator.trans("core.forum.log_in.password_placeholder")),bidi:this.password,disabled:this.loading})),20),t.add("remember",m("div",{className:"Form-group"},m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:this.remember,disabled:this.loading}),app.translator.trans("core.forum.log_in.remember_me_label")))),10),t.add("submit",m("div",{className:"Form-group"},P.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},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(B,e)},n.signUp=function(){var t={password:this.password()},e=this.identification();t[-1!==e.indexOf("@")?"email":"username"]=e,app.modal.show(U,t)},n.onready=function(){this.$("[name="+(this.identification()?"password":"identification")+"]").select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.identification(),n=this.password(),i=this.remember();app.session.login({identification:e,password:n,remember:i},{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.onerror=function(e){401===e.status&&(e.alert.content=app.translator.trans("core.forum.log_in.invalid_login_message")),t.prototype.onerror.call(this,e)},e}(L.a),q=n(27),z=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.currentTitle=this.attrs.currentTitle,this.newTitle=Object(R.a)(this.currentTitle)},n.className=function(){return"RenameDiscussionModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.rename_discussion.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{className:"FormControl",bidi:this.newTitle,type:"text"})),m("div",{className:"Form-group"},P.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("core.forum.rename_discussion.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=this.newTitle,i=this.currentTitle;if(n&&n!==i)return this.discussion.save({title:n}).then((function(){app.viewingDiscussion(e.discussion)&&app.current.get("stream").update(),m.redraw(),e.hide()})).catch((function(){e.loading=!1,m.redraw()}));this.hide()},e}(L.a),W={controls:function(t,e){var n=this,i=new p.a;return["user","moderation","destructive"].forEach((function(r){var o=n[r+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return i.add(t.itemName,t)})),i.add(r+"Separator",q.a.component()))})),i},userControls:function(t,e){var n=this,i=new p.a;return e instanceof Ot&&i.add("reply",!app.session.user||t.canReply()?P.a.component({icon:"fas fa-reply",onclick:function(){return n.replyAction.bind(t)(!0,!1).catch((function(){}))}},app.translator.trans(app.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button")):P.a.component({icon:"fas fa-reply",className:"disabled",title:app.translator.trans("core.forum.discussion_controls.cannot_reply_text")},app.translator.trans("core.forum.discussion_controls.cannot_reply_button"))),i},moderationControls:function(t){var e=new p.a;return t.canRename()&&e.add("rename",P.a.component({icon:"fas fa-pencil-alt",onclick:this.renameAction.bind(t)},app.translator.trans("core.forum.discussion_controls.rename_button"))),e},destructiveControls:function(t){var e=new p.a;return t.isHidden()?(t.canHide()&&e.add("restore",P.a.component({icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},app.translator.trans("core.forum.discussion_controls.restore_button"))),t.canDelete()&&e.add("delete",P.a.component({icon:"fas fa-times",onclick:this.deleteAction.bind(t)},app.translator.trans("core.forum.discussion_controls.delete_forever_button")))):t.canHide()&&e.add("hide",P.a.component({icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},app.translator.trans("core.forum.discussion_controls.delete_button"))),e},replyAction:function(t,e){var n=this;return new Promise((function(i,r){return app.session.user?n.canReply()?(app.composer.composingReplyTo(n)&&!e||app.composer.load(M,{user:app.session.user,discussion:n}),app.composer.show(),t&&app.viewingDiscussion(n)&&!app.composer.isFullScreen()&&app.current.get("stream").goToNumber("reply"),i(app.composer)):r():(app.modal.show(F),r())}))},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(Object(_.a)(app.translator.trans("core.forum.discussion_controls.delete_confirmation"))))return app.viewingDiscussion(this)&&app.history.back(),this.delete().then((function(){return app.discussions.removeDiscussion(t)}))},renameAction:function(){return app.modal.show(z,{currentTitle:this.title(),discussion:this})}};function V(t){var e,n,i,r,o=$(t),s=!1,a=!1,c=0,u=function(t,e){void 0===e&&(e={}),e.duration=e.duration||"fast",e.step=function(t){$(this).css("transform","translate("+t+"px, 0)")},o.find(".Slidable-content").animate({"background-position-x":t},e)},l=function(){u(0,{complete:function(){o.removeClass("sliding"),e.hide(),n.hide(),a=!1}})};return o.find(".Slidable-content").on("touchstart",(function(t){e=o.find(".Slidable-underneath--left:not(.disabled)"),n=o.find(".Slidable-underneath--right:not(.disabled)"),i=t.originalEvent.targetTouches[0].clientX,r=t.originalEvent.targetTouches[0].clientY,s=!0,c=0})).on("touchmove",(function(t){var u=t.originalEvent.targetTouches[0].clientX,l=t.originalEvent.targetTouches[0].clientY;if(s&&Math.abs(u-i)>Math.abs(l-r)&&(a=!0),s=!1,a){c=u-i;var d=function(t,e){if(t.length){var n="left"===e?c>0:c<0;n&&t.hasClass("Slidable-underneath--elastic")&&(c-=.5*c),t.toggle(n);var i=Math.max(0,Math.min(1,(Math.abs(c)-25)/50));t.find(".icon").css("transform","scale("+i+")")}else c=Math["left"===e?"min":"max"](0,c)};d(e,"left"),d(n,"right"),$(this).css("transform","translate("+c+"px, 0)"),$(this).css("background-position-x",c+"px"),o.toggleClass("sliding",!!c),t.preventDefault()}})).on("touchend",(function(){var t=function(t){t.click(),t.hasClass("Slidable-underneath--elastic")?l():u((c>0?1:-1)*o.width())};n.length&&c<-50?t(n):e.length&&c>50?t(e):l(),s=!1,a=!1})),{reset:l}}var Y=n(18),K=n(26);var G=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r},X=n(77),J=n(82),Q=n(43);var Z=function(t){return"symbol"==typeof t||Object(Q.a)(t)&&"[object Symbol]"==Object(J.a)(t)},tt=K.a?K.a.prototype:void 0,et=tt?tt.toString:void 0;var nt=function t(e){if("string"==typeof e)return e;if(Object(X.a)(e))return G(e,t)+"";if(Z(e))return et?et.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n};var it=function(t){return null==t?"":nt(t)},rt=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(rt.source);var st=function(t){return(t=it(t))&&ot.test(t)?t.replace(rt,"\\$&"):t},at=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.subtree=new T.a((function(){return n.attrs.discussion.freshness}),(function(){var t=app.session.user&&app.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return n.active()}))},n.elementAttrs=function(){return{className:Object(Y.a)(["DiscussionListItem",this.active()?"active":"",this.attrs.discussion.isHidden()?"DiscussionListItem--hidden":"","ontouchstart"in window?"Slidable":""])}},n.view=function(){var t=this.attrs.discussion,e=t.user(),n=t.isUnread(),i=t.isRead(),r=!this.showRepliesCount()&&n,o=0,s=W.controls(t,this).toArray(),a=this.elementAttrs();if(this.attrs.params.q){var c=t.mostRelevantPost();c&&(o=c.number());var u=st(this.attrs.params.q);this.highlightRegExp=new RegExp(u+"|"+u.trim().replace(/\s+/g,"|"),"gi")}else o=Math.min(t.lastPostNumber(),(t.lastReadPostNumber()||0)+1);return m("div",a,s.length?C.a.component({icon:"fas fa-ellipsis-v",className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right"},s):"",m("span",{className:"Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic"+(n?"":" disabled"),onclick:this.markAsRead.bind(this)},Object(w.a)("fas fa-check")),m("div",{className:"DiscussionListItem-content Slidable-content"+(n?" unread":"")+(i?" read":"")},m(g.a,{href:e?app.route.user(e):"#",className:"DiscussionListItem-author",title:Object(_.a)(app.translator.trans("core.forum.discussion_list.started_text",{user:e,ago:Object(x.a)(t.createdAt())})),oncreate:function(t){$(t.dom).tooltip({placement:"right"})}},Object(b.a)(e,{title:""})),m("ul",{className:"DiscussionListItem-badges badges"},Object(f.a)(t.badges().toArray())),m(g.a,{href:app.route.discussion(t,o),className:"DiscussionListItem-main"},m("h3",{className:"DiscussionListItem-title"},Object(y.a)(t.title(),this.highlightRegExp)),m("ul",{className:"DiscussionListItem-info"},Object(f.a)(this.infoItems().toArray()))),m("span",{className:"DiscussionListItem-count",onclick:this.markAsRead.bind(this),title:r?app.translator.trans("core.forum.discussion_list.mark_as_read_tooltip"):""},Object(N.a)(t[r?"unreadCount":"replyCount"]()))))},n.oncreate=function(e){if(t.prototype.oncreate.call(this,e),"ontouchstart"in window){var n=V(this.$());this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return n.reset()}))}},n.onbeforeupdate=function(e,n){return t.prototype.onbeforeupdate.call(this,e,n),this.subtree.needsRebuild()},n.active=function(){var t=m.route.param("id");return t&&t.split("-")[0]===this.attrs.discussion.id()},n.showFirstPost=function(){return-1!==["newest","oldest"].indexOf(this.attrs.params.sort)},n.showRepliesCount=function(){return"replies"===this.attrs.params.sort},n.markAsRead=function(){var t=this.attrs.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new p.a;if(this.attrs.params.q){var e=this.attrs.discussion.mostRelevantPost()||this.attrs.discussion.firstPost();if(e&&"comment"===e.contentType()){var n=Object(y.a)(e.contentPlain(),this.highlightRegExp,175);t.add("excerpt",n,-100)}}else t.add("terminalPost",k.component({discussion:this.attrs.discussion,lastPost:!this.showFirstPost()}));return t},e}(h.a),ct=n(54),ut=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t,e=this.attrs.state,n=e.getParams();if(e.isLoading()?t=j.a.component():e.moreResults&&(t=P.a.component({className:"Button",onclick:e.loadMore.bind(e)},app.translator.trans("core.forum.discussion_list.load_more_button"))),e.empty()){var i=app.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},ct.a.component({text:i}))}return m("div",{className:"DiscussionList"+(e.isSearchResults()?" DiscussionList--searchResults":"")},m("ul",{className:"DiscussionList-discussions"},e.discussions.map((function(t){return m("li",{key:t.id(),"data-id":t.id()},at.component({discussion:t,params:n}))}))),m("div",{className:"DiscussionList-loadMore"},t))},e}(h.a),lt=function(t){t.pageX<10&&app.pane.show()},dt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){if(this.attrs.state.hasDiscussions())return m("div",{className:"DiscussionPage-list"},this.enoughSpace()&&m(ut,{state:this.attrs.state}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n=$(e.dom),i=app.pane;n.hover(i.show.bind(i),i.onmouseleave.bind(i)),$(document).on("mousemove",lt);var r=n.find(".DiscussionListItem.active");if(r.length){var o=n.offset().top,s=o+n.outerHeight(),a=r.offset().top,c=a+r.outerHeight();(a<o||c>s)&&n.scrollTop(n.scrollTop()-o+a)}},n.onremove=function(){$(document).off("mousemove",lt)},n.enoughSpace=function(){return!$(".App-navigation").is(":visible")},e}(h.a),pt=n(39),ht=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},Object(b.a)(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))},e}(h.a),ft=n(19),mt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(t){t.className=t.className||"",t.surround=t.surround||function(t){return t()}};var n=e.prototype;return n.view=function(){return m("div",{className:this.attrs.className})},n.oncreate=function(e){var n,i=this;t.prototype.oncreate.call(this,e);var r=function(){if(i.attrs.composer.isVisible()){var t=i.attrs.composer.fields.content();n!==t&&(n=t,i.attrs.surround((function(){return s9e.TextFormatter.preview(n||"",e.dom)})))}};r(),this.updateInterval=setInterval(r,50)},n.onremove=function(){clearInterval(this.updateInterval)},e}(h.a),vt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this;if(app.composer.composingReplyTo(this.attrs.discussion))return m("article",{className:"Post CommentPost editing"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",null,Object(b.a)(app.session.user,{className:"PostUser-avatar"}),Object(ft.a)(app.session.user)))),m(mt,{className:"Post-body",composer:app.composer,surround:this.anchorPreview.bind(this)}));return m("article",{className:"Post ReplyPlaceholder",onclick:function(){W.replyAction.call(t.attrs.discussion,!0).catch((function(){}))}},m("header",{className:"Post-header"},Object(b.a)(app.session.user,{className:"PostUser-avatar"})," ",app.translator.trans("core.forum.post_stream.reply_placeholder")))},n.anchorPreview=function(t){var e=$(window).scrollTop()+$(window).height()>=$(document).height();t(),e&&$(window).scrollTop($(document).height())},e}(h.a),gt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.stream=this.attrs.stream,this.scrollListener=new pt.a(this.onscroll.bind(this))},n.view=function(){var t,e=this,n=this.stream.viewingEnd(),i=this.stream.posts(),r=this.discussion.postIds(),o=function(t){$(t.dom).addClass("fadeIn"),setTimeout((function(){return $(t.dom).removeClass("fadeIn")}),500)},s=i.map((function(n,i){var s,c={"data-index":e.stream.visibleStart+i};if(n){var u=n.createdAt(),l=app.postComponents[n.contentType()];s=l?l.component({post:n}):"",c.key="post"+n.id(),c.oncreate=o,c["data-time"]=u.toISOString(),c["data-number"]=n.number(),c["data-id"]=n.id(),c["data-type"]=n.contentType();var d=u-t;d>3456e5&&(s=[m("div",{className:"PostStream-timeGap"},m("span",null,app.translator.trans("core.forum.post_stream.time_lapsed_text",{period:dayjs().add(d,"ms").fromNow(!0)}))),s]),t=u}else c.key="post"+r[e.stream.visibleStart+i],s=ht.component();return m("div",Object(a.a)({className:"PostStream-item"},c),s)}));return!n&&i[this.stream.visibleEnd-this.stream.visibleStart-1]&&s.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(P.a,{className:"Button",onclick:this.stream.loadNext.bind(this.stream)},app.translator.trans("core.forum.post_stream.load_more_button")))),!n||app.session.user&&!this.discussion.canReply()||s.push(m("div",{className:"PostStream-item",key:"reply","data-index":this.stream.count(),oncreate:o},vt.component({discussion:this.discussion}))),m("div",{className:"PostStream"},s)},n.onupdate=function(){this.triggerScroll()},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.triggerScroll(),setTimeout((function(){return n.scrollListener.start()}))},n.onremove=function(){this.scrollListener.stop(),clearTimeout(this.calculatePositionTimeout)},n.triggerScroll=function(){if(this.stream.needsScroll){var t=this.stream.targetPost;this.stream.needsScroll=!1,"number"in t?this.scrollToNumber(t.number,this.stream.animateScroll):"index"in t&&this.scrollToIndex(t.index,this.stream.animateScroll,t.reply)}},n.onscroll=function(t){if(void 0===t&&(t=window.pageYOffset),!this.stream.paused){var e=this.getMarginTop(),n=$(window).height()-e,i=t+e;if(this.stream.visibleStart>0){var r=this.$(".PostStream-item[data-index="+this.stream.visibleStart+"]");r.length&&r.offset().top>i-300&&this.stream.loadPrevious()}if(this.stream.visibleEnd<this.stream.count()){var o=this.$(".PostStream-item[data-index="+(this.stream.visibleEnd-1)+"]");o.length&&o.offset().top+o.outerHeight(!0)<i+n+300&&this.stream.loadNext()}clearTimeout(this.calculatePositionTimeout),this.calculatePositionTimeout=setTimeout(this.calculatePosition.bind(this,t),100),this.updateScrubber(t)}},n.updateScrubber=function(t){void 0===t&&(t=window.pageYOffset);var e=this.getMarginTop(),n=$(window).height()-e,i=t+e,r=this.$(".PostStream-item[data-index]"),o=0,s="",a=null;r.each((function(){var t=$(this),e=t.offset().top,r=t.outerHeight(!0);if(e+r<i)return!0;if(e>i+n)return!1;var c=Math.max(0,i-e),u=Math.min(r,i+n-e)-c;null===a&&(a=parseFloat(t.data("index"))+c/r),u>0&&(o+=u/r);var l=t.data("time");l&&(s=l)})),this.stream.index=null!==a?a+1:this.stream.count(),this.stream.visible=o,s&&(this.stream.description=dayjs(s).format("MMMM YYYY"))},n.calculatePosition=function(t){void 0===t&&(t=window.pageYOffset);var e,n,i=this.getMarginTop(),r=$(window),o=r.height()-i,s=r.scrollTop()+i,a=t+i;this.$(".PostStream-item").each((function(){var t=$(this),i=t.offset().top,r=t.outerHeight(!0),c=Math.max(0,a-i);if(void 0===e&&(c/r<.75||(r-c)/o>.25)&&(e=t.data("number")),i+r>s){if(!(i+r<s+o))return!1;t.data("number")&&(n=t.data("number"))}})),e&&this.attrs.onPositionChange(e||1,n,e)},n.getMarginTop=function(){return this.$()&&$("#header").outerHeight()+parseInt(this.$().css("margin-top"),10)},n.scrollToNumber=function(t,e){var n=this.$(".PostStream-item[data-number="+t+"]");return this.scrollToItem(n,e).then(this.flashItem.bind(this,n))},n.scrollToIndex=function(t,e,n){var i=n?$(".PostStream-item:last-child"):this.$(".PostStream-item[data-index="+t+"]");this.scrollToItem(i,e,!0,n),n&&this.flashItem(i)},n.scrollToItem=function(t,e,n,i){var r=this,o=$("html, body").stop(!0),s=t.data("index");if(t.length){var a=t.offset().top-this.getMarginTop(),c=t.offset().top+t.height(),u=$(document).scrollTop(),l=u+$(window).height();if(n||a<u||c>l){var d=i?c-$(window).height()+app.composer.computedHeight():t.is(":first-child")?0:a;e?d!==u&&o.animate({scrollTop:d},"fast"):o.scrollTop(d)}}var p=function(){r.updateScrubber(),void 0!==s&&(r.stream.index=s+1)};return p(),this.stream.forceUpdateScrubber=!0,Promise.all([o.promise(),this.stream.loadPromise]).then((function(){var t;if(m.redraw.sync(),i){var e=$(".PostStream-item:last-child");$(window).scrollTop(e.offset().top+e.height()-$(window).height()+app.composer.computedHeight())}else 0===s?$(window).scrollTop(0):(t=$(".PostStream-item[data-index="+s+"]").offset())&&$(window).scrollTop(t.top-r.getMarginTop());p(),r.calculatePosition(),r.stream.paused=!1}))},n.flashItem=function(t){t.removeClass("fadeIn"),t.addClass("flash").on("animationend webkitAnimationEnd",(function(e){t.removeClass("flash")}))},e}(h.a),bt=n(70),yt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.stream=this.attrs.stream,this.handlers={},this.scrollListener=new pt.a(this.updateScrubberValues.bind(this,{fromScroll:!0,forceHeightChange:!0}))},n.view=function(){var t=this.stream.count(),e=app.translator.transChoice("core.forum.post_scrubber.viewing_text",t,{index:m("span",{className:"Scrubber-index"}),count:m("span",{className:"Scrubber-count"},Object(bt.a)(t))}),n=this.stream.discussion.unreadCount(),i=t?Math.min(t-this.stream.index,n)/t:0;function r(t){var e=$(t.dom),n={top:100-100*i+"%",height:100*i+"%"};t.state.oldStyle?e.stop(!0).css(t.state.oldStyle).animate(n):e.css(n),t.state.oldStyle=n}var o=["PostStreamScrubber","Dropdown"];return this.attrs.className&&o.push(this.attrs.className),m("div",{className:o.join(" ")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},e," ",Object(w.a)("fas fa-sort")),m("div",{className:"Dropdown-menu dropdown-menu"},m("div",{className:"Scrubber"},m("a",{className:"Scrubber-first",onclick:this.goToFirst.bind(this)},Object(w.a)("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,e),m("span",{className:"Scrubber-description"}))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",oncreate:r,onupdate:r},app.translator.trans("core.forum.post_scrubber.unread_text",{count:n}))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},Object(w.a)("fas fa-angle-double-down")," ",app.translator.trans("core.forum.post_scrubber.now_link")))))},n.onupdate=function(){var t=this;this.stream.forceUpdateScrubber&&(this.stream.forceUpdateScrubber=!1,this.stream.loadPromise.then((function(){return t.updateScrubberValues({animate:!0,forceHeightChange:!0})})))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),$(window).on("resize",this.handlers.onresize=this.onresize.bind(this)).resize(),this.$(".Scrubber-scrollbar").bind("click",this.onclick.bind(this)).css({cursor:"pointer","user-select":"none"}).bind("dragstart mousedown touchstart",(function(t){return t.preventDefault()})),this.dragging=!1,this.mouseStart=0,this.indexStart=0,this.$(".Scrubber-handle").css("cursor","move").bind("mousedown touchstart",this.onmousedown.bind(this)).click((function(t){return t.stopPropagation()})),$(document).on("mousemove touchmove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup touchend",this.handlers.onmouseup=this.onmouseup.bind(this)),setTimeout((function(){return n.scrollListener.start()})),this.stream.loadPromise.then((function(){return n.updateScrubberValues({animate:!1,forceHeightChange:!0})}))},n.onremove=function(){this.scrollListener.stop(),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove touchmove",this.handlers.onmousemove).off("mouseup touchend",this.handlers.onmouseup)},n.updateScrubberValues=function(t){var e=this;void 0===t&&(t={});var n=this.stream.index,i=this.stream.count(),r=this.stream.visible||1,o=this.percentPerPost(),s=this.$();s.find(".Scrubber-index").text(Object(bt.a)(this.stream.sanitizeIndex(Math.max(1,n)))),s.find(".Scrubber-description").text(this.stream.description),s.toggleClass("disabled",this.stream.disabled());var a={};if(a.before=Math.max(0,o.index*Math.min(n-1,i-r)),a.handle=Math.min(100-a.before,o.visible*r),a.after=100-a.before-a.handle,!(t.fromScroll&&this.stream.paused||this.adjustingHeight&&!t.forceHeightChange)){var c=t.animate?"animate":"css";this.adjustingHeight=!0;var u=[];for(var l in a){var d=s.find(".Scrubber-"+l);u.push(d.stop(!0,!0)[c]({height:a[l]+"%"},"fast").promise()),"animate"===c&&d.css("overflow","visible")}Promise.all(u).then((function(){return e.adjustingHeight=!1}))}},n.goToFirst=function(){this.stream.goToFirst(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.goToLast=function(){this.stream.goToLast(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.onresize=function(){var t=this.$(),e=this.$(".Scrubber-scrollbar");e.css("max-height",$(window).height()-t.offset().top+$(window).scrollTop()-parseInt($("#app").css("padding-bottom"),10)-(t.outerHeight()-e.outerHeight()))},n.onmousedown=function(t){t.redraw=!1,this.mouseStart=t.clientY||t.originalEvent.touches[0].clientY,this.indexStart=this.stream.index,this.dragging=!0,$("body").css("cursor","move"),this.$().toggleClass("dragging",this.dragging)},n.onmousemove=function(t){if(this.dragging){var e=((t.clientY||t.originalEvent.touches[0].clientY)-this.mouseStart)/this.$(".Scrubber-scrollbar").outerHeight()*100/this.percentPerPost().index||0,n=Math.min(this.indexStart+e,this.stream.count()-1);this.stream.index=Math.max(0,n),this.updateScrubberValues()}},n.onmouseup=function(){if(this.$().toggleClass("dragging",this.dragging),this.dragging){this.mouseStart=0,this.indexStart=0,this.dragging=!1,$("body").css("cursor",""),this.$().removeClass("open");var t=Math.floor(this.stream.index);this.stream.goToIndex(t)}},n.onclick=function(t){var e=this.$(".Scrubber-scrollbar"),n=((t.pageY||t.originalEvent.touches[0].pageY)-e.offset().top+$("body").scrollTop())/e.outerHeight()*100,i=(n-=parseFloat(e.find(".Scrubber-handle")[0].style.height)/2)/this.percentPerPost().index;i=Math.max(0,Math.min(this.stream.count()-1,i)),this.stream.goToIndex(Math.floor(i)),this.updateScrubberValues({animate:!0,forceHeightChange:!0}),this.$().removeClass("open")},n.percentPerPost=function(){var t=this.stream.count()||1,e=this.stream.visible||1,n=50/this.$(".Scrubber-scrollbar").outerHeight()*100,i=Math.max(100/t,n/e),r=t===e?0:(100-i*e)/(t-e);return{index:r,visible:i}},e}(h.a),wt=n(78),xt=n(79),Nt=function(){function t(t,e){void 0===e&&(e=[]),this.discussion=t,this.paused=!1,this.loadPageTimeouts={},this.pagesLoading=0,this.index=0,this.number=1,this.visible=1,this.description="",this.forceUpdateScrubber=!1,this.show(e)}var e=t.prototype;return e.update=function(){return this.viewingEnd()?(this.visibleEnd=this.count(),this.loadRange(this.visibleStart,this.visibleEnd)):Promise.resolve()},e.goToFirst=function(){return this.goToIndex(0)},e.goToLast=function(){return this.goToIndex(this.count()-1,!0)},e.goToNumber=function(t,e){if(void 0===e&&(e=!1),"reply"===t){var n=this.goToLast();return this.targetPost.reply=!0,n}return this.paused=!0,this.loadPromise=this.loadNearNumber(t),this.needsScroll=!0,this.targetPost={number:t},this.animateScroll=!e,this.number=t,this.loadPromise.then((function(){return m.redraw()}))},e.goToIndex=function(t,e){return void 0===e&&(e=!1),this.paused=!0,this.loadPromise=this.loadNearIndex(t),this.needsScroll=!0,this.targetPost={index:t},this.animateScroll=!e,this.index=t,m.redraw(),this.loadPromise},e.loadNearNumber=function(t){return this.posts().some((function(e){return e&&Number(e.number())===Number(t)}))?Promise.resolve():(this.reset(),app.store.find("posts",{filter:{discussion:this.discussion.id()},page:{near:t}}).then(this.show.bind(this)))},e.loadNearIndex=function(t){if(t>=this.visibleStart&&t<=this.visibleEnd)return Promise.resolve();var e=this.sanitizeIndex(t-this.constructor.loadCount/2),n=e+this.constructor.loadCount;return this.reset(e,n),this.loadRange(e,n).then(this.show.bind(this))},e.loadNext=function(){var t=this.visibleEnd,e=this.visibleEnd=this.sanitizeIndex(this.visibleEnd+this.constructor.loadCount),n=t-2*this.constructor.loadCount;n>this.visibleStart&&n>=0&&(this.visibleStart=n+this.constructor.loadCount+1,this.loadPageTimeouts[n]&&(clearTimeout(this.loadPageTimeouts[n]),this.loadPageTimeouts[n]=null,this.pagesLoading--)),this.loadPage(t,e)},e.loadPrevious=function(){var t=this.visibleStart,e=this.visibleStart=this.sanitizeIndex(this.visibleStart-this.constructor.loadCount),n=e+2*this.constructor.loadCount;n<this.visibleEnd&&n<=this.count()&&(this.visibleEnd=n,this.loadPageTimeouts[n]&&(clearTimeout(this.loadPageTimeouts[n]),this.loadPageTimeouts[n]=null,this.pagesLoading--)),this.loadPage(e,t,!0)},e.loadPage=function(t,e,n){var i=this;void 0===n&&(n=!1),m.redraw(),this.loadPageTimeouts[t]=setTimeout((function(){i.loadRange(t,e).then((function(){if(t>=i.visibleStart&&e<=i.visibleEnd){var r=n?i.visibleEnd-1:i.visibleStart;Object(xt.a)('.PostStream-item[data-index="'+r+'"]',(function(){return m.redraw.sync()}))}i.pagesLoading--})),i.loadPageTimeouts[t]=null}),this.pagesLoading?1e3:0),this.pagesLoading++},e.loadRange=function(t,e){var n=[],i=[];return this.discussion.postIds().slice(t,e).forEach((function(t){var e=app.store.getById("posts",t);e&&e.discussion()&&void 0!==e.canEdit()?i.push(e):n.push(t)})),n.length?app.store.find("posts",n).then((function(t){return i.concat(t).sort((function(t,e){return t.createdAt()-e.createdAt()}))})):Promise.resolve(i)},e.show=function(t){this.visibleStart=t.length?this.discussion.postIds().indexOf(t[0].id()):0,this.visibleEnd=this.sanitizeIndex(this.visibleStart+t.length)},e.reset=function(t,e){this.visibleStart=t||0,this.visibleEnd=this.sanitizeIndex(e||this.constructor.loadCount)},e.posts=function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map((function(t){var e=app.store.getById("posts",t);return e&&e.discussion()&&void 0!==e.canEdit()?e:null}))},e.count=function(){return this.discussion.postIds().length},e.disabled=function(){return this.visible>=this.count()},e.viewingEnd=function(){return Math.abs(this.count()-this.visibleEnd)<=1},e.sanitizeIndex=function(t){return Math.max(0,Math.min(this.count(),Math.floor(t)))},t}();Nt.loadCount=20;var Ct=Nt,Ot=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=null,this.near=m.route.param("near")||0,this.load(),app.discussions.hasDiscussions()&&(app.pane.enable(),app.pane.hide()),app.history.push("discussion"),this.bodyClass="App--discussion"},n.onremove=function(){t.prototype.onremove.call(this),app.pane.disable(),app.composer.composingReplyTo(this.discussion)&&!app.composer.fields.content()?app.composer.hide():app.composer.minimize()},n.view=function(){var t=this.discussion;return m("div",{className:"DiscussionPage"},m(dt,{state:app.discussions}),m("div",{className:"DiscussionPage-discussion"},t?[v.component({discussion:t}),m("div",{className:"container"},m("nav",{className:"DiscussionPage-nav"},m("ul",null,Object(f.a)(this.sidebarItems().toArray()))),m("div",{className:"DiscussionPage-stream"},gt.component({discussion:t,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})))]:j.a.component({className:"LoadingIndicator--block"})))},n.load=function(){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){var e=this;app.history.push("discussion",t.title()),app.setTitle(t.title()),app.setTitleCount(0);var n=[];if(t.payload&&t.payload.included){var i=t.id();n=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===i})).map((function(t){return app.store.getById("posts",t.id)})).sort((function(t,e){return t.createdAt()-e.createdAt()})).slice(0,20)}this.stream=new Ct(t,n),this.stream.goToNumber(m.route.param("near")||n[0]&&n[0].number(),!0).then((function(){e.discussion=t,app.current.set("discussion",t),app.current.set("stream",e.stream)}))},n.sidebarItems=function(){var t=new p.a;return t.add("controls",wt.a.component({icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary"},W.controls(this.discussion,this).toArray())),t.add("scrubber",yt.component({stream:this.stream,className:"App-titleControl"}),-100),t},n.positionChanged=function(t,e){var n=this.discussion,i=app.route.discussion(n,this.near=t);window.history.replaceState(null,document.title,i),app.history.push("discussion",n.title()),app.session.user&&e>(n.lastReadPostNumber()||0)&&(n.save({lastReadPostNumber:e}),m.redraw())},e}(d.a),kt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},Object(f.a)(this.items().toArray()))},n.items=function(){return new p.a},e}(h.a),Tt=n(24),jt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right"};var n=e.prototype;return n.view=function(e){return t.prototype.view.call(this,Object(a.a)({},e,{children:this.items().toArray()}))},n.getButtonContent=function(){var t=app.session.user;return[Object(b.a)(t)," ",m("span",{className:"Button-label"},Object(ft.a)(t))]},n.items=function(){var t=new p.a,e=app.session.user;return t.add("profile",Tt.a.component({icon:"fas fa-user",href:app.route.user(e)},app.translator.trans("core.forum.header.profile_button")),100),t.add("settings",Tt.a.component({icon:"fas fa-cog",href:app.route("settings")},app.translator.trans("core.forum.header.settings_button")),50),app.forum.attribute("adminUrl")&&t.add("administration",Tt.a.component({icon:"fas fa-wrench",href:app.forum.attribute("adminUrl"),target:"_blank"},app.translator.trans("core.forum.header.admin_button")),0),t.add("separator",q.a.component(),-90),t.add("logOut",P.a.component({icon:"fas fa-sign-out-alt",onclick:app.session.logout.bind(app.session)},app.translator.trans("core.forum.header.log_out_button")),-100),t},e}(C.a),St=n(35),At=n(44),Pt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.state,e=t.getNotificationPages();return m("div",{className:"NotificationList"},m("div",{className:"NotificationList-header"},m("div",{className:"App-primaryControl"},P.a.component({className:"Button Button--icon Button--link",icon:"fas fa-check",title:app.translator.trans("core.forum.notifications.mark_all_as_read_tooltip"),onclick:t.markAllAsRead.bind(t)})),m("h4",{className:"App-titleControl App-titleControl--text"},app.translator.trans("core.forum.notifications.title"))),m("div",{className:"NotificationList-content"},e.length?e.map((function(t){var e=[],n={};return t.forEach((function(t){var i=t.subject();if(void 0!==i){var r=!1;i instanceof At.a?r=i:i&&i.discussion&&(r=i.discussion());var o=r?r.id():0;n[o]=n[o]||{discussion:r,notifications:[]},n[o].notifications.push(t),-1===e.indexOf(n[o])&&e.push(n[o])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m(g.a,{className:"NotificationGroup-header",href:app.route.discussion(t.discussion)},e&&e.length?m("ul",{className:"NotificationGroup-badges badges"},Object(f.a)(e)):"",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})):""}))))}))})):"",t.isLoading()?m(j.a,{className:"LoadingIndicator--block"}):e.length?"":m("div",{className:"NotificationList-empty"},app.translator.trans("core.forum.notifications.empty_text"))))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$notifications=this.$(".NotificationList-content"),this.$scrollParent="auto"===this.$notifications.css("overflow")?this.$notifications:$(window),this.boundScrollHandler=this.scrollHandler.bind(this),this.$scrollParent.on("scroll",this.boundScrollHandler)},n.onremove=function(){this.$scrollParent.off("scroll",this.boundScrollHandler)},n.scrollHandler=function(){var t=this.attrs.state,e=this.$scrollParent.scrollTop(),n=this.$scrollParent.height(),i=this.$scrollParent===this.$notifications?0:this.$notifications.offset().top,r=this.$notifications[0].scrollHeight;t.hasMoreResults()&&!t.isLoading()&&e+n>=i+r&&t.loadMore()},e}(h.a),Et=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){e.className=e.className||"NotificationsDropdown",e.buttonClassName=e.buttonClassName||"Button Button--flat",e.menuClassName=e.menuClassName||"Dropdown-menu--right",e.label=e.label||app.translator.trans("core.forum.notifications.tooltip"),e.icon=e.icon||"fas fa-bell",t.initAttrs.call(this,e)};var n=e.prototype;return n.getButton=function(){var e=this.getNewCount(),n=t.prototype.getButton.call(this);return n.attrs.title=this.attrs.label,n.attrs.className+=e?" new":"",n.attrs.onclick=this.onclick.bind(this),n},n.getButtonContent=function(){var t=this.getUnreadCount();return[Object(w.a)(this.attrs.icon,{className:"Button-icon"}),t?m("span",{className:"NotificationsDropdown-unread"},t):"",m("span",{className:"Button-label"},this.attrs.label)]},n.getMenu=function(){return m("div",{className:"Dropdown-menu "+this.attrs.menuClassName,onclick:this.menuClick.bind(this)},this.showing?Pt.component({state:this.attrs.state}):"")},n.onclick=function(){app.drawer.isOpen()?this.goToRoute():this.attrs.state.load()},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}(C.a),Dt=function(){function t(){this.callbacks={},this.whenCallback=function(t){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}(),$t=function(){function t(){this.results={}}var e=t.prototype;return e.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}))},e.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,Tt.a.component({icon:"fas fa-search",href:app.route("index",{q:t})},app.translator.trans("core.forum.search.all_discussions_button",{query:t}))),e.map((function(e){var n=e.mostRelevantPost();return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+e.id()},m(g.a,{href:app.route.discussion(e,n&&n.number())},m("div",{className:"DiscussionSearchResult-title"},Object(y.a)(e.title(),t)),n?m("div",{className:"DiscussionSearchResult-excerpt"},Object(y.a)(n.contentPlain(),t,100)):""))}))]},t}(),_t=function(){function t(){this.results={}}var e=t.prototype;return e.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()}))},e.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=Object(ft.a)(e),i=[Object(y.a)(n.text,t)];return m("li",{className:"UserSearchResult","data-index":"users"+e.id()},m(g.a,{href:app.route.user(e)},Object(b.a)(e),Object(a.a)({},n,{text:void 0,children:i})))}))]:""},t}(),It=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state,this.hasFocus=!1,this.sources=null,this.loadingSources=0,this.index=0},n.view=function(){var t=this,e=this.state.getInitialSearch();return this.sources||(this.sources=this.sourceItems().toArray()),this.sources.length?m("div",{className:"Search "+Object(Y.a)({open:this.state.getValue()&&this.hasFocus,focused:this.hasFocus,active:!!e,loading:!!this.loadingSources})},m("div",{className:"Search-input"},m("input",{className:"FormControl",type:"search",placeholder:Object(_.a)(app.translator.trans("core.forum.header.search_placeholder")),value:this.state.getValue(),oninput:function(e){return t.state.setValue(e.target.value)},onfocus:function(){return t.hasFocus=!0},onblur:function(){return t.hasFocus=!1}}),this.loadingSources?j.a.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)},Object(w.a)("fas fa-times-circle")):""),m("ul",{className:"Dropdown-menu Search-results"},this.state.getValue()&&this.hasFocus?this.sources.map((function(e){return e.view(t.state.getValue())})):"")):m("div",null)},n.onupdate=function(){this.setIndex(this.getCurrentNumericIndex())},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e);var i=this,r=this.state;this.setIndex(this.getCurrentNumericIndex()),this.$(".Search-results").on("mousedown",(function(t){return t.preventDefault()})).on("click",(function(){return n.$("input").blur()})).on("mouseenter","> li:not(.Dropdown-header)",(function(){i.setIndex(i.selectableItems().index(this))}));var o=this.$("input");this.navigator=new Dt,this.navigator.onUp((function(){return n.setIndex(n.getCurrentNumericIndex()-1,!0)})).onDown((function(){return n.setIndex(n.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this)).onCancel(this.clear.bind(this)).bindTo(o),o.on("input focus",(function(){var t=this.value.toLowerCase();t&&(clearTimeout(i.searchTimeout),i.searchTimeout=setTimeout((function(){r.isCached(t)||(t.length>=3&&i.sources.map((function(e){e.search&&(i.loadingSources++,e.search(t).then((function(){i.loadingSources=Math.max(0,i.loadingSources-1),m.redraw()})))})),r.cache(t),m.redraw())}),250))})).on("focus",(function(){$(this).one("mouseup",(function(t){return t.preventDefault()})).select()}))},n.selectResult=function(){clearTimeout(this.searchTimeout),this.loadingSources=0,this.state.getValue()?m.route.set(this.getItem(this.index).find("a").attr("href")):this.clear(),this.$("input").blur()},n.clear=function(){this.state.clear()},n.sourceItems=function(){var t=new p.a;return app.forum.attribute("canViewDiscussions")&&t.add("discussions",new $t),app.forum.attribute("canViewUserList")&&t.add("users",new _t),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(),i=n.parent(),r=t;t<0?r=n.length-1:t>=n.length&&(r=0);var o=n.removeClass("active").eq(r).addClass("active");if(this.index=o.attr("data-index")||r,e){var s,a=i.scrollTop(),c=i.offset().top,u=c+i.outerHeight(),l=o.offset().top,d=l+o.outerHeight();l<c?s=a-c+l-parseInt(i.css("padding-top"),10):d>u&&(s=a-u+d+parseInt(i.css("padding-bottom"),10)),void 0!==s&&i.stop(!0).animate({scrollTop:s},100)}},e}(h.a),Mt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},Object(f.a)(this.items().toArray()))},n.items=function(){var t=new p.a;if(t.add("search",It.component({state:app.search}),30),app.forum.attribute("showLanguageSelector")&&Object.keys(app.data.locales).length>1){var e=[],n=function(t){e.push(P.a.component({active:app.data.locale===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())}},app.data.locales[t]))};for(var i in app.data.locales)n(i);t.add("locale",St.a.component({buttonClassName:"Button Button--link"},e),20)}return app.session.user?(t.add("notifications",Et.component({state:app.notifications}),10),t.add("session",jt.component(),0)):(app.forum.attribute("allowSignUp")&&t.add("signUp",P.a.component({className:"Button Button--link",onclick:function(){return app.modal.show(U)}},app.translator.trans("core.forum.header.sign_up_link")),10),t.add("logIn",P.a.component({className:"Button Button--link",onclick:function(){return app.modal.show(F)}},app.translator.trans("core.forum.header.log_in_link")),0)),t},e}(h.a),Lt=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=e.className||"Button Button--icon Button--link"},e}(P.a),Rt=n(41),Bt=function(){function t(){this.position=t.Position.HIDDEN,this.height=null,this.body={attrs:{}},this.editor=null,this.clear(),this.component=this}var e=t.prototype;return e.load=function(t,e){var n={componentClass:t,attrs:e};this.preventExit()||(this.isVisible()&&(this.clear(),m.redraw.sync()),this.body=n)},e.clear=function(){this.position=t.Position.HIDDEN,this.body={attrs:{}},this.editor=null,this.onExit=null,this.fields={content:Object(R.a)("")},this.content=this.fields.content,this.value=this.fields.content},e.show=function(){this.position!==t.Position.NORMAL&&this.position!==t.Position.FULLSCREEN&&(this.position=t.Position.NORMAL,m.redraw.sync())},e.hide=function(){this.clear(),m.redraw()},e.close=function(){this.preventExit()||this.hide()},e.minimize=function(){this.isVisible()&&(this.position=t.Position.MINIMIZED,m.redraw())},e.fullScreen=function(){this.isVisible()&&(this.position=t.Position.FULLSCREEN,m.redraw())},e.exitFullScreen=function(){this.position===t.Position.FULLSCREEN&&(this.position=t.Position.NORMAL,m.redraw())},e.bodyMatches=function(t,e){var n=this;return void 0===e&&(e={}),!!Object(Rt.a)(this.body.componentClass,t)&&Object.keys(e).every((function(t){return n.body.attrs[t]===e[t]}))},e.isVisible=function(){return this.position!==t.Position.HIDDEN},e.isFullScreen=function(){return this.position===t.Position.FULLSCREEN||"phone"===app.screen()},e.composingReplyTo=function(t){return this.isVisible()&&this.bodyMatches(M,{discussion:t})},e.preventExit=function(){if(this.isVisible()&&this.onExit)return this.onExit.callback()?!confirm(this.onExit.message):void 0},e.preventClosingWhen=function(t,e){this.onExit={callback:t,message:e}},e.minimumHeight=function(){return 200},e.maximumHeight=function(){return $(window).height()-$("#header").outerHeight()},e.computedHeight=function(){return this.position===t.Position.MINIMIZED?"":this.position===t.Position.FULLSCREEN?$(window).height():Math.max(this.minimumHeight(),Math.min(this.height,this.maximumHeight()))},t}();Bt.Position={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"};var Ht=Bt,Ut=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state,this.active=!1,this.prevPosition=this.state.position},n.view=function(){var t=this.state.body,e={normal:this.state.position===Ht.Position.NORMAL,minimized:this.state.position===Ht.Position.MINIMIZED,fullScreen:this.state.position===Ht.Position.FULLSCREEN,active:this.active,visible:this.state.isVisible()},n=this.state.position===Ht.Position.MINIMIZED?this.state.show.bind(this.state):void 0;return m("div",{className:"Composer "+Object(Y.a)(e)},m("div",{className:"Composer-handle",oncreate:this.configHandle.bind(this)}),m("ul",{className:"Composer-controls"},Object(f.a)(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:n},t.componentClass?t.componentClass.component(Object(a.a)({},t.attrs,{composer:this.state,disabled:e.minimized})):""))},n.onupdate=function(){this.state.position===this.prevPosition?this.updateHeight():(this.animatePositionChange(),this.prevPosition=this.state.position)},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.initializeHeight(),this.$().hide().css("bottom",-this.state.computedHeight()),this.$().on("focus blur",":input",(function(t){n.active="focusin"===t.type,m.redraw()})),this.$().on("keydown",":input","esc",(function(){return n.state.close()})),this.handlers={},$(window).on("resize",this.handlers.onresize=this.updateHeight.bind(this)).resize(),$(document).on("mousemove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup",this.handlers.onmouseup=this.onmouseup.bind(this))},n.onremove=function(){$(window).off("resize",this.handlers.onresize),$(document).off("mousemove",this.handlers.onmousemove).off("mouseup",this.handlers.onmouseup)},n.configHandle=function(t){var e=this;$(t.dom).css("cursor","row-resize").bind("dragstart mousedown",(function(t){return t.preventDefault()})).mousedown((function(t){e.mouseStart=t.clientY,e.heightStart=e.$().height(),e.handle=$(this),$("body").css("cursor","row-resize")}))},n.onmousemove=function(t){if(this.handle){var e=this.mouseStart-t.clientY;this.changeHeight(this.heightStart+e);var n=$(window).scrollTop(),i=n>0&&n+$(window).height()>=$(document).height();this.updateBodyPadding(i)}},n.onmouseup=function(){this.handle&&(this.handle=null,$("body").css("cursor",""))},n.focus=function(){this.$(".Composer-content :input:enabled:visible:first").focus()},n.updateHeight=function(){var t=this.state.computedHeight(),e=this.$(".Composer-flexible");if(this.$().height(t),e.length){var n=e.offset().top-this.$().offset().top,i=parseInt(e.css("padding-bottom"),10),r=this.$(".Composer-footer").outerHeight(!0);e.height(this.$().outerHeight()-n-i-r)}},n.updateBodyPadding=function(){var t=this.state.position!==Ht.Position.HIDDEN&&this.state.position!==Ht.Position.MINIMIZED&&"phone"!==app.screen()?this.state.computedHeight()-parseInt($("#app").css("padding-bottom"),10):0;$("#content").css({paddingBottom:t})},n.animatePositionChange=function(){if(this.prevPosition!==Ht.Position.FULLSCREEN)switch(this.state.position){case Ht.Position.HIDDEN:return this.hide();case Ht.Position.MINIMIZED:return this.minimize();case Ht.Position.FULLSCREEN:return this.focus();case Ht.Position.NORMAL:return this.show()}else this.focus()},n.animateHeightChange=function(){var t=this.$().stop(!0),e=t.outerHeight(),n=$(window).scrollTop();t.show(),this.updateHeight();var i=t.outerHeight();this.prevPosition===Ht.Position.HIDDEN?t.css({bottom:-i,height:i}):t.css({height:e});var r=t.animate({bottom:0,height:i},"fast").promise();return this.updateBodyPadding(),$(window).scrollTop(n),r},n.showBackdrop=function(){this.$backdrop=$("<div/>").addClass("composer-backdrop").appendTo("body")},n.hideBackdrop=function(){this.$backdrop&&this.$backdrop.remove()},n.show=function(){var t=this;this.animateHeightChange().then((function(){return t.focus()})),"phone"===app.screen()&&(this.$().css("top",$(window).scrollTop()),this.showBackdrop())},n.hide=function(){var t=this,e=this.$();e.stop(!0).animate({bottom:-e.height()},"fast",(function(){e.hide(),t.hideBackdrop(),t.updateBodyPadding()}))},n.minimize=function(){this.animateHeightChange(),this.$().css("top","auto"),this.hideBackdrop()},n.controlItems=function(){var t=new p.a;return this.state.position===Ht.Position.FULLSCREEN?t.add("exitFullScreen",Lt.component({icon:"fas fa-compress",title:app.translator.trans("core.forum.composer.exit_full_screen_tooltip"),onclick:this.state.exitFullScreen.bind(this.state)})):(this.state.position!==Ht.Position.MINIMIZED&&(t.add("minimize",Lt.component({icon:"fas fa-minus minimize",title:app.translator.trans("core.forum.composer.minimize_tooltip"),onclick:this.state.minimize.bind(this.state),itemClassName:"App-backControl"})),t.add("fullScreen",Lt.component({icon:"fas fa-expand",title:app.translator.trans("core.forum.composer.full_screen_tooltip"),onclick:this.state.fullScreen.bind(this.state)}))),t.add("close",Lt.component({icon:"fas fa-times",title:app.translator.trans("core.forum.composer.close_tooltip"),onclick:this.state.close.bind(this.state)}))),t},n.initializeHeight=function(){this.state.height=localStorage.getItem("composerHeight"),this.state.height||(this.state.height=this.defaultHeight())},n.defaultHeight=function(){return this.$().height()},n.changeHeight=function(t){this.state.height=t,this.updateHeight(),localStorage.setItem("composerHeight",this.state.height)},e}(h.a),Ft=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this,e=this.attrs.notification,n=this.href();return m(g.a,{className:"Notification Notification--"+e.contentType()+" "+(e.isRead()?"":"unread"),href:n,external:n.includes("://"),onclick:this.markAsRead.bind(this)},!e.isRead()&&P.a.component({className:"Notification-action Button Button--icon Button--link",icon:"fas fa-check",title:app.translator.trans("core.forum.notifications.mark_as_read_tooltip"),onclick:function(e){e.preventDefault(),e.stopPropagation(),t.markAsRead()}}),Object(b.a)(e.fromUser()),Object(w.a)(this.icon(),{className:"Notification-icon"}),m("span",{className:"Notification-content"},this.content()),Object(O.a)(e.createdAt()),m("div",{className:"Notification-excerpt"},this.excerpt()))},n.icon=function(){},n.href=function(){},n.content=function(){},n.excerpt=function(){},n.markAsRead=function(){this.attrs.notification.isRead()||(app.session.user.pushAttributes({unreadNotificationCount:app.session.user.unreadNotificationCount()-1}),this.attrs.notification.save({isRead:!0}))},e}(h.a),qt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.href=function(){var t=this.attrs.notification;return app.route.discussion(t.subject(),t.content().postNumber)},n.content=function(){return app.translator.trans("core.forum.notifications.discussion_renamed_text",{user:this.attrs.notification.fromUser()})},e}(Ft);function zt(t){app.composer.isFullScreen()&&(app.composer.minimize(),t.stopPropagation())}var Wt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.submitLabel=e.submitLabel||app.translator.trans("core.forum.composer_edit.submit_button"),e.confirmExit=e.confirmExit||app.translator.trans("core.forum.composer_edit.discard_confirmation"),e.originalContent=e.originalContent||e.post.content(),e.user=e.user||e.post.user(),e.post.editedContent=e.originalContent};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.attrs.post;return e.add("title",m("h3",null,Object(w.a)("fas fa-pencil-alt")," ",m(g.a,{href:app.route.discussion(n.discussion(),n.number()),onclick:zt},app.translator.trans("core.forum.composer_edit.post_link",{number:n.number(),discussion:n.discussion().title()})))),e},n.jumpToPreview=function(t){zt(t),m.route.set(app.route.post(this.attrs.post))},n.data=function(){return{content:this.composer.fields.content()}},n.onsubmit=function(){var t=this,e=this.attrs.post.discussion();this.loading=!0;var n=this.data();this.attrs.post.save(n).then((function(n){if(app.viewingDiscussion(e))app.current.get("stream").goToNumber(n.number());else{var i,r=P.a.component({className:"Button Button--link",onclick:function(){m.route.set(app.route.post(n)),app.alerts.dismiss(i)}},app.translator.trans("core.forum.composer_edit.view_button"));i=app.alerts.show({type:"success",controls:[r]},app.translator.trans("core.forum.composer_edit.edited_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(D),Vt={controls:function(t,e){var n=this,i=new p.a;return["user","moderation","destructive"].forEach((function(r){var o=n[r+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return i.add(t.itemName,t)})),i.add(r+"Separator",q.a.component()))})),i},userControls:function(t,e){return new p.a},moderationControls:function(t,e){var n=new p.a;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",P.a.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 p.a;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",P.a.component({icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},app.translator.trans("core.forum.post_controls.restore_button"))),t.canDelete()&&n.add("delete",P.a.component({icon:"fas fa-times",onclick:this.deleteAction.bind(t,e)},app.translator.trans("core.forum.post_controls.delete_forever_button")))):t.canHide()&&n.add("hide",P.a.component({icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},app.translator.trans("core.forum.post_controls.delete_button"))),n},editAction:function(){var t=this;return new Promise((function(e){return app.composer.load(Wt,{post:t}),app.composer.show(),e()}))},hideAction:function(){if(confirm(Object(_.a)(app.translator.trans("core.forum.post_controls.hide_confirmation"))))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;if(confirm(Object(_.a)(app.translator.trans("core.forum.post_controls.delete_confirmation"))))return t&&(t.loading=!0),this.delete().then((function(){var t=e.discussion();t.removePost(e.id()),t.postIds().length||(app.discussions.removeDiscussion(t),app.viewingDiscussion(t)&&app.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}},Yt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.loading=!1,this.subtree=new T.a((function(){return n.attrs.post.freshness}),(function(){var t=n.attrs.post.user();return t&&t.freshness}),(function(){return n.controlsOpen}))},n.view=function(){var t=this,e=this.elementAttrs();e.className=this.classes(e.className).join(" ");var n=Vt.controls(this.attrs.post,this).toArray();return m("article",e,m("div",null,this.content(),m("aside",{className:"Post-actions"},m("ul",null,Object(f.a)(this.actionItems().toArray()),n.length?m("li",null,m(C.a,{className:"Post-controls",buttonClassName:"Button Button--icon Button--flat",menuClassName:"Dropdown-menu--right",icon:"fas fa-ellipsis-h",onshow:function(){return t.$(".Post-actions").addClass("open")},onhide:function(){return t.$(".Post-actions").removeClass("open")}},n)):"")),m("footer",{className:"Post-footer"},m("ul",null,Object(f.a)(this.footerItems().toArray())))))},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.onupdate=function(){var t=this.$(".Post-actions"),e=this.$(".Post-controls");t.toggleClass("open",e.hasClass("open"))},n.elementAttrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]),n=this.attrs.post.user(),i=this.attrs.post.discussion();return this.loading&&e.push("Post--loading"),n&&n===app.session.user&&e.push("Post--by-actor"),n&&n===i.user()&&e.push("Post--by-start-user"),e},n.actionItems=function(){return new p.a},n.footerItems=function(){return new p.a},e}(h.a),Kt=n(36),Gt=n(12),Xt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e);var i=this.attrs.user;this.username=Object(R.a)(i.username()||""),this.email=Object(R.a)(i.email()||""),this.isEmailConfirmed=Object(R.a)(i.isEmailConfirmed()||!1),this.setPassword=Object(R.a)(!1),this.password=Object(R.a)(i.password()||""),this.groups={},app.store.all("groups").filter((function(t){return-1===[Gt.a.GUEST_ID,Gt.a.MEMBER_ID].indexOf(t.id())})).forEach((function(t){return n.groups[t.id()]=Object(R.a)(-1!==i.groups().indexOf(t))}))},n.className=function(){return"EditUserModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.edit_user.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},n.fields=function(){var t=this,e=new p.a;return e.add("username",m("div",{className:"Form-group"},m("label",null,app.translator.trans("core.forum.edit_user.username_heading")),m("input",{className:"FormControl",placeholder:Object(_.a)(app.translator.trans("core.forum.edit_user.username_label")),bidi:this.username})),40),app.session.user!==this.attrs.user&&(e.add("email",m("div",{className:"Form-group"},m("label",null,app.translator.trans("core.forum.edit_user.email_heading")),m("div",null,m("input",{className:"FormControl",placeholder:Object(_.a)(app.translator.trans("core.forum.edit_user.email_label")),bidi:this.email})),this.isEmailConfirmed()?"":m("div",null,P.a.component({className:"Button Button--block",loading:this.loading,onclick:this.activate.bind(this)},app.translator.trans("core.forum.edit_user.activate_button")))),30),e.add("password",m("div",{className:"Form-group"},m("label",null,app.translator.trans("core.forum.edit_user.password_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",onchange:function(e){t.setPassword(e.target.checked),m.redraw.sync(),e.target.checked&&t.$("[name=password]").select(),e.redraw=!1}}),app.translator.trans("core.forum.edit_user.set_password_label")),this.setPassword()?m("input",{className:"FormControl",type:"password",name:"password",placeholder:Object(_.a)(app.translator.trans("core.forum.edit_user.password_label")),bidi:this.password}):"")),20)),e.add("groups",m("div",{className:"Form-group EditUserModal-groups"},m("label",null,app.translator.trans("core.forum.edit_user.groups_heading")),m("div",null,Object.keys(this.groups).map((function(t){return app.store.getById("groups",t)})).map((function(e){return m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:t.groups[e.id()],disabled:"1"===t.attrs.user.id()&&e.id()===Gt.a.ADMINISTRATOR_ID}),Kt.a.component({group:e,label:""})," ",e.nameSingular())})))),10),e.add("submit",m("div",{className:"Form-group"},P.a.component({className:"Button Button--primary",type:"submit",loading:this.loading},app.translator.trans("core.forum.edit_user.submit_button"))),-10),e},n.activate=function(){var t=this;this.loading=!0;var e={username:this.username(),isEmailConfirmed:!0};this.attrs.user.save(e,{errorHandler:this.onerror.bind(this)}).then((function(){t.isEmailConfirmed(!0),t.loading=!1,m.redraw()})).catch((function(){t.loading=!1,m.redraw()}))},n.data=function(){var t=this,e=Object.keys(this.groups).filter((function(e){return t.groups[e]()})).map((function(t){return app.store.getById("groups",t)})),n={username:this.username(),relationships:{groups:e}};return app.session.user!==this.attrs.user&&(n.email=this.email()),this.setPassword()&&(n.password=this.password()),n},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.attrs.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},e}(L.a),Jt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(t){return t.children[0]},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundOnresize=this.onresize.bind(this),$(window).on("resize",this.boundOnresize).resize()},n.onremove=function(){$(window).off("resize",this.boundOnresize)},n.onresize=function(){var t=this,e=this.$(),n=$("#header"),i=$("#footer"),r=e.find("> ul");$(window).off(".affix"),r.removeClass("affix affix-top affix-bottom").removeData("bs.affix"),e.outerHeight(!0)>$(window).height()-n.outerHeight(!0)||r.affix({offset:{top:function(){return e.offset().top-n.outerHeight(!0)-parseInt(e.css("margin-top"),10)},bottom:function(){return t.bottom=i.outerHeight(!0)}}})},e}(h.a),Qt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.user=null,this.bodyClass="App--user"},n.view=function(){return m("div",{className:"UserPage"},this.user?[m(ee,{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(Jt,null,m("nav",{className:"sideNav UserPage-nav"},m("ul",null,Object(f.a)(this.sidebarItems().toArray())))),m("div",{className:"sideNavOffset UserPage-content"},this.content())))]:[m(j.a,{className:"LoadingIndicator--block"})])},n.content=function(){},n.show=function(t){this.user=t,app.current.set("user",t),app.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();app.preloadedApiDocument(),app.store.all("users").some((function(i){if((i.username().toLowerCase()===n||i.id()===t)&&i.joinTime())return e.show(i),!0})),this.user||app.store.find("users",t).then(this.show.bind(this))},n.sidebarItems=function(){var t=new p.a;return t.add("nav",m(St.a,{className:"App-titleControl",buttonClassName:"Button"},this.navItems().toArray())),t},n.navItems=function(){var t=new p.a,e=this.user;return t.add("posts",m(Tt.a,{href:app.route("user.posts",{username:e.username()}),icon:"far fa-comment"},app.translator.trans("core.forum.user.posts_link")," ",m("span",{className:"Button-badge"},e.commentCount())),100),t.add("discussions",m(Tt.a,{href:app.route("user.discussions",{username:e.username()}),icon:"fas fa-bars"},app.translator.trans("core.forum.user.discussions_link")," ",m("span",{className:"Button-badge"},e.discussionCount())),90),app.session.user===e&&(t.add("separator",m(q.a,null),-90),t.add("settings",m(Tt.a,{href:app.route("settings"),icon:"fas fa-cog"},app.translator.trans("core.forum.user.settings_link")),-100)),t},e}(d.a),Zt={controls:function(t,e){var n=this,i=new p.a;return["user","moderation","destructive"].forEach((function(r){var o=n[r+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return i.add(t.itemName,t)})),i.add(r+"Separator",m(q.a,null)))})),i},userControls:function(){return new p.a},moderationControls:function(t){var e=new p.a;return t.canEdit()&&e.add("edit",m(P.a,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(this,t)},app.translator.trans("core.forum.user_controls.edit_button"))),e},destructiveControls:function(t){var e=new p.a;return"1"!==t.id()&&t.canDelete()&&e.add("delete",m(P.a,{icon:"fas fa-times",onclick:this.deleteAction.bind(this,t)},app.translator.trans("core.forum.user_controls.delete_button"))),e},deleteAction:function(t){var e=this;confirm(app.translator.trans("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),app.current.matches(Qt,{user:t})?app.history.back():window.location.reload()})).catch((function(){return e.showDeletionAlert(t,"error")}))},showDeletionAlert:function(t,e){var n=t.data.attributes,i=n.username,r=n.email,o={success:"core.forum.user_controls.delete_success_message",error:"core.forum.user_controls.delete_error_message"}[e];app.alerts.show({type:e},app.translator.trans(o,{username:i,email:r}))},editAction:function(t){app.modal.show(Xt,{user:t})}},te=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loading=!1,this.isDraggedOver=!1},n.view=function(){var t=this.attrs.user;return m("div",{className:Object(Y.a)(["AvatarEditor","Dropdown",this.attrs.className,this.loading&&"loading",this.isDraggedOver&&"dragover"])},Object(b.a)(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?m(j.a,null):t.avatarUrl()?Object(w.a)("fas fa-pencil-alt"):Object(w.a)("fas fa-plus-circle")),m("ul",{className:"Dropdown-menu Menu"},Object(f.a)(this.controlItems().toArray())))},n.controlItems=function(){var t=new p.a;return t.add("upload",m(P.a,{icon:"fas fa-upload",onclick:this.openPicker.bind(this)},app.translator.trans("core.forum.user.avatar_upload_button"))),t.add("remove",m(P.a,{icon:"fas fa-times",onclick:this.remove.bind(this)},app.translator.trans("core.forum.user.avatar_remove_button"))),t},n.enableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!0},n.disableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1},n.dropUpload=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1,this.upload(t.dataTransfer.files[0])},n.quickUpload=function(t){this.attrs.user.avatarUrl()||(t.preventDefault(),t.stopPropagation(),this.openPicker())},n.openPicker=function(){var t=this;this.loading||$('<input type="file">').appendTo("body").hide().click().on("input",(function(e){t.upload($(e.target)[0].files[0])}))},n.upload=function(t){if(!this.loading){var e=this.attrs.user,n=new FormData;n.append("avatar",t),this.loading=!0,m.redraw(),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.attrs.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.attrs.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(h.a),ee=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.user,e=Zt.controls(t,this).toArray(),n=t.color(),i=t.badges().toArray();return m("div",{className:"UserCard "+(this.attrs.className||""),style:n?{backgroundColor:n}:""},m("div",{className:"darkenBackground"},m("div",{className:"container"},e.length?C.a.component({className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.attrs.controlsButtonClassName,label:app.translator.trans("core.forum.user_controls.button"),icon:"fas fa-ellipsis-v"},e):"",m("div",{className:"UserCard-profile"},m("h2",{className:"UserCard-identity"},this.attrs.editable?[te.component({user:t,className:"UserCard-avatar"}),Object(ft.a)(t)]:m(g.a,{href:app.route.user(t)},m("div",{className:"UserCard-avatar"},Object(b.a)(t)),Object(ft.a)(t))),i.length?m("ul",{className:"UserCard-badges badges"},Object(f.a)(i)):"",m("ul",{className:"UserCard-info"},Object(f.a)(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new p.a,e=this.attrs.user,n=e.lastSeenAt();if(n){var i=e.isOnline();t.add("lastSeen",m("span",{className:"UserCard-lastSeen"+(i?" online":"")},i?[Object(w.a)("fas fa-circle")," ",app.translator.trans("core.forum.user.online_text")]:[Object(w.a)("far fa-clock")," ",Object(x.a)(n)]))}return t.add("joined",app.translator.trans("core.forum.user.joined_date_text",{ago:Object(x.a)(e.joinTime())})),t},e}(h.a),ne=n(80),ie=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();if(!e)return m("div",{className:"PostUser"},m("h3",null,Object(b.a)(e,{className:"PostUser-avatar"})," ",Object(ft.a)(e)));var n="";return!t.isHidden()&&this.attrs.cardVisible&&(n=ee.component({user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})),m("div",{className:"PostUser"},m("h3",null,m(g.a,{href:app.route.user(e)},Object(b.a)(e,{className:"PostUser-avatar"}),Object(ne.a)(e),Object(ft.a)(e))),m("ul",{className:"PostUser-badges badges"},Object(f.a)(e.badges().toArray())),n)},n.oncreate=function(e){var n,i=this;t.prototype.oncreate.call(this,e),this.$().on("mouseover","h3 a, .UserCard",(function(){clearTimeout(n),n=setTimeout(i.showCard.bind(i),500)})).on("mouseout","h3 a, .UserCard",(function(){clearTimeout(n),n=setTimeout(i.hideCard.bind(i),250)}))},n.showCard=function(){var t=this;this.attrs.oncardshow(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.attrs.oncardhide()}))},e}(h.a),re=n(81),oe=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.createdAt(),n=this.getPermalink(t),i="ontouchstart"in document.documentElement;return m("div",{className:"Dropdown PostMeta"},m("a",{className:"Dropdown-toggle",onclick:function(t){var e=this;setTimeout((function(){return $(e).parent().find(".PostMeta-permalink").select()})),t.redraw=!1},"data-toggle":"dropdown"},Object(O.a)(e)),m("div",{className:"Dropdown-menu dropdown-menu"},m("span",{className:"PostMeta-number"},app.translator.trans("core.forum.post.number_tooltip",{number:t.number()}))," ",m("span",{className:"PostMeta-time"},Object(re.a)(e))," ",m("span",{className:"PostMeta-ip"},t.data.attributes.ipAddress),i?m("a",{className:"Button PostMeta-permalink",href:n},n):m("input",{className:"FormControl PostMeta-permalink",value:n,onclick:function(t){return t.stopPropagation()}})))},n.getPermalink=function(t){return window.location.origin+app.route.post(t)},e}(h.a),se=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.shouldUpdateTooltip=!1,this.oldEditedInfo=null},n.view=function(){var t=this.attrs.post,e=t.editedUser(),n=Object(_.a)(app.translator.trans("core.forum.post.edited_tooltip",{user:e,ago:Object(x.a)(t.editedAt())}));return n!==this.oldEditedInfo&&(this.shouldUpdateTooltip=!0,this.oldEditedInfo=n),m("span",{className:"PostEdited",title:n},app.translator.trans("core.forum.post.edited_text"))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.rebuildTooltip()},n.onupdate=function(){this.rebuildTooltip()},n.rebuildTooltip=function(){this.shouldUpdateTooltip&&(this.$().tooltip("destroy").tooltip(),this.shouldUpdateTooltip=!1)},e}(h.a),ae=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.revealContent=!1,this.cardVisible=!1,this.subtree.check((function(){return n.cardVisible}),(function(){return n.isEditing()}),(function(){return n.revealContent}))},n.content=function(){return t.prototype.content.call(this).concat([m("header",{className:"Post-header"},m("ul",null,Object(f.a)(this.headerItems().toArray()))),m("div",{className:"Post-body"},this.isEditing()?m(mt,{className:"Post-preview",composer:app.composer}):m.trust(this.attrs.post.contentHtml()))])},n.refreshContent=function(){var t=this.isEditing()?"":this.attrs.post.contentHtml();this.contentHtml!==t&&this.$(".Post-body script").each((function(){var t=document.createElement("script");t.textContent=this.textContent,Array.from(this.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),this.parentNode.replaceChild(t,this)})),this.contentHtml=t},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.refreshContent()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.refreshContent()},n.isEditing=function(){return app.composer.bodyMatches(Wt,{post:this.attrs.post})},n.elementAttrs=function(){var e=this.attrs.post,n=t.prototype.elementAttrs.call(this);return n.className=(n.className||"")+" "+Object(Y.a)({CommentPost:!0,"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()}),n},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=this,e=new p.a,n=this.attrs.post;return e.add("user",ie.component({post:n,cardVisible:this.cardVisible,oncardshow:function(){t.cardVisible=!0,m.redraw()},oncardhide:function(){t.cardVisible=!1,m.redraw()}}),100),e.add("meta",oe.component({post:n})),n.isEdited()&&!n.isHidden()&&e.add("edited",se.component({post:n})),n.isHidden()&&e.add("toggle",P.a.component({className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),e},e}(Yt),ce=n(34),ue=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.elementAttrs=function(){var e=t.prototype.elementAttrs.call(this);return e.className=(e.className||"")+" EventPost "+Object(ce.ucfirst)(this.attrs.post.contentType())+"Post",e},n.content=function(){var e=this.attrs.post.user(),n=Object(ft.a)(e),i=Object(a.a)(this.descriptionData(),{user:e,username:e?m(g.a,{className:"EventPost-user",href:app.route.user(e)},n):n});return t.prototype.content.call(this).concat([Object(w.a)(this.icon(),{className:"EventPost-icon"}),m("div",{class:"EventPost-info"},this.description(i))])},n.icon=function(){return""},n.description=function(t){return app.translator.transChoice(this.descriptionKey(),t.count,t)},n.descriptionKey=function(){return""},n.descriptionData=function(){return{}},e}(Yt),le=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.description=function(t){var e=app.translator.trans("core.forum.post_stream.discussion_renamed_text",t),n=app.translator.trans("core.forum.post_stream.discussion_renamed_old_tooltip",t);return m("span",{title:Object(_.a)(n)},e)},n.descriptionData=function(){var t=this.attrs.post,e=t.content()[0],n=t.content()[1];return{old:e,new:m("strong",{className:"DiscussionRenamedPost-new"},n)}},e}(ue),de=(n(40),function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.hidden=localStorage.getItem("welcomeHidden")},n.view=function(){var t=this;if(this.hidden)return m("div",null);return m("header",{className:"Hero WelcomeHero"},m("div",{class:"container"},P.a.component({icon:"fas fa-times",onclick:function(){t.$().slideUp(t.hide.bind(t))},className:"Hero-close Button Button--icon Button--link"}),m("div",{className:"containerNarrow"},m("h2",{className:"Hero-title"},app.forum.attribute("welcomeTitle")),m("div",{className:"Hero-subtitle"},m.trust(app.forum.attribute("welcomeMessage"))))))},n.hide=function(){localStorage.setItem("welcomeHidden","true"),this.hidden=!0},e}(h.a)),pe=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||Object(_.a)(app.translator.trans("core.forum.composer_discussion.body_placeholder")),e.submitLabel=e.submitLabel||app.translator.trans("core.forum.composer_discussion.submit_button"),e.confirmExit=e.confirmExit||Object(_.a)(app.translator.trans("core.forum.composer_discussion.discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||Object(_.a)(app.translator.trans("core.forum.composer_discussion.title_placeholder")),e.className="ComposerBody--discussion"};var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.composer.fields.title=this.composer.fields.title||Object(R.a)(""),this.title=this.composer.fields.title},n.headerItems=function(){var e=t.prototype.headerItems.call(this);return e.add("title",m("h3",null,app.translator.trans("core.forum.composer_discussion.title")),100),e.add("discussionTitle",m("h3",null,m("input",{className:"FormControl",bidi:this.title,placeholder:this.attrs.titlePlaceholder,disabled:!!this.attrs.disabled,onkeydown:this.onkeydown.bind(this)}))),e},n.onkeydown=function(t){13===t.which&&(t.preventDefault(),this.composer.editor.moveCursorTo(0)),t.redraw=!1},n.hasChanges=function(){return this.title()||this.composer.fields.content()},n.data=function(){return{title:this.title(),content:this.composer.fields.content()}},n.onsubmit=function(){var t=this;this.loading=!0;var e=this.data();app.store.createRecord("discussions").save(e).then((function(e){t.composer.hide(),app.discussions.refresh(),m.route.set(app.route.discussion(e))}),this.loaded.bind(this))},e}(D),he=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(n){t.prototype.oninit.call(this,n),app.previous.matches(Ot)&&(this.lastDiscussion=app.previous.get("discussion")),app.previous.matches(e)&&app.discussions.clear(),app.discussions.refreshParams(app.search.params()),app.history.push("index",app.translator.trans("core.forum.header.back_to_index_tooltip")),this.bodyClass="App--index",this.scrollTopOnCreate=!1},n.view=function(){return m("div",{className:"IndexPage"},this.hero(),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m("nav",{className:"IndexPage-nav sideNav"},m("ul",null,Object(f.a)(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},m("div",{className:"IndexPage-toolbar"},m("ul",{className:"IndexPage-toolbar-view"},Object(f.a)(this.viewItems().toArray())),m("ul",{className:"IndexPage-toolbar-action"},Object(f.a)(this.actionItems().toArray()))),m(ut,{state:app.discussions})))))},n.setTitle=function(){app.setTitle(app.translator.trans("core.forum.index.meta_title_text")),app.setTitleCount(0)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.setTitle();var n=app.cache.heroHeight,i=app.cache.heroHeight=this.$(".Hero").outerHeight()||0,r=app.cache.scrollTop;if($("#app").css("min-height",$(window).height()+i),null!=app.previous.type&&("desktop"==app.screen()||"desktop-hd"==app.screen()||this.lastDiscussion?$(window).scrollTop(r-n+i):$(window).scrollTop(0),this.lastDiscussion)){var o=this.$('li[data-id="'+this.lastDiscussion.id()+'"] .DiscussionListItem');if(o.length){var s=$("#header").outerHeight(),a=$(window).height(),c=o.offset().top,u=c+o.outerHeight();(c<r+s||u>r+a)&&$(window).scrollTop(c-s)}}},n.onbeforeremove=function(){app.cache.scrollTop=$(window).scrollTop()},n.onremove=function(){t.prototype.onremove.call(this),$("#app").css("min-height","")},n.hero=function(){return de.component()},n.sidebarItems=function(){var t=this,e=new p.a,n=app.forum.attribute("canStartDiscussion")||!app.session.user;return e.add("newDiscussion",P.a.component({icon:"fas fa-edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:function(){return t.newDiscussionAction().catch((function(){}))},disabled:!n},app.translator.trans(n?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button"))),e.add("nav",St.a.component({buttonClassName:"Button",className:"App-titleControl"},this.navItems(this).toArray())),e},n.navItems=function(){var t=new p.a,e=app.search.stickyParams();return t.add("allDiscussions",Tt.a.component({href:app.route("index",e),icon:"far fa-comments"},app.translator.trans("core.forum.index.all_discussions_link")),100),t},n.viewItems=function(){var t=new p.a,e=app.discussions.sortMap(),n={};for(var i in e)n[i]=app.translator.trans("core.forum.index_sort."+i+"_button");return t.add("sort",C.a.component({buttonClassName:"Button",label:n[app.search.params().sort]||Object.keys(e).map((function(t){return n[t]}))[0]},Object.keys(n).map((function(t){var i=n[t],r=(app.search.params().sort||Object.keys(e)[0])===t;return P.a.component({icon:!r||"fas fa-check",onclick:app.search.changeSort.bind(app.search,t),active:r},i)})))),t},n.actionItems=function(){var t=new p.a;return t.add("refresh",P.a.component({title:app.translator.trans("core.forum.index.refresh_tooltip"),icon:"fas fa-sync",className:"Button Button--icon",onclick:function(){app.discussions.refresh(),app.session.user&&(app.store.find("users",app.session.user.id()),m.redraw())}})),app.session.user&&t.add("markAllAsRead",P.a.component({title:app.translator.trans("core.forum.index.mark_all_as_read_tooltip"),icon:"fas fa-check",className:"Button Button--icon",onclick:this.markAllAsRead.bind(this)})),t},n.newDiscussionAction=function(){return new Promise((function(t,e){return app.session.user?(app.composer.load(pe,{user:app.session.user}),app.composer.show(),t(app.composer)):(app.modal.show(F),e())}))},n.markAllAsRead=function(){confirm(app.translator.trans("core.forum.index.mark_all_as_read_confirmation"))&&app.session.user.save({markedAllAsReadAt:new Date})},e}(d.a);Object(s.a)(he,"providesInitialSearch",!0);var fe=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loading=!0,this.moreResults=!1,this.posts=[],this.loadLimit=20,this.loadUser(m.route.param("username"))},n.content=function(){return 0!==this.posts.length||this.loading?(this.loading?t=m(j.a,null):this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},m(P.a,{className:"Button",onclick:this.loadMore.bind(this)},app.translator.trans("core.forum.user.posts_load_more_button")))),m("div",{className:"PostsUserPage"},m("ul",{className:"PostsUserPage-list"},this.posts.map((function(t){return m("li",null,m("div",{className:"PostsUserPage-discussion"},app.translator.trans("core.forum.user.in_discussion_text",{discussion:m(g.a,{href:app.route.post(t)},t.discussion().title())})),m(ae,{post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(ct.a,{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}(Qt),me=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=window.app),this.params=t,this.app=e,this.discussions=[],this.moreResults=!1,this.loading=!1}var e=t.prototype;return e.requestParams=function(){var t={include:["user","lastPostedUser"],filter:{}};return t.sort=this.sortMap()[this.params.sort],this.params.q&&(t.filter.q=this.params.q,t.include.push("mostRelevantPost","mostRelevantPost.user")),t},e.sortMap=function(){var t={};return this.params.q&&(t.relevance=""),t.latest="-lastPostedAt",t.top="-commentCount",t.newest="-createdAt",t.oldest="createdAt",t},e.getParams=function(){return this.params},e.clear=function(){this.discussions=[],m.redraw()},e.refreshParams=function(t){var e=this;this.hasDiscussions()&&!Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))||(this.params=t,this.refresh())},e.refresh=function(t){var e=this,n=(void 0===t?{}:t).deferClear,i=void 0!==n&&n;return this.loading=!0,i||this.clear(),this.loadResults().then((function(t){e.discussions=[],e.parseResults(t)}),(function(){e.loading=!1,m.redraw()}))},e.loadResults=function(t){var e=this.app.preloadedApiDocument();if(e)return Promise.resolve(e);var n=this.requestParams();return n.page={offset:t},n.include=n.include.join(","),this.app.store.find("discussions",n)},e.loadMore=function(){this.loading=!0,this.loadResults(this.discussions.length).then(this.parseResults.bind(this))},e.parseResults=function(t){var e;return(e=this.discussions).push.apply(e,t),this.loading=!1,this.moreResults=!!t.payload.links&&!!t.payload.links.next,m.redraw(),t},e.removeDiscussion=function(t){var e=this.discussions.indexOf(t);-1!==e&&this.discussions.splice(e,1),m.redraw()},e.addDiscussion=function(t){this.discussions.unshift(t),m.redraw()},e.hasDiscussions=function(){return this.discussions.length>0},e.isLoading=function(){return this.loading},e.isSearchResults=function(){return!!this.params.q},e.empty=function(){return!this.hasDiscussions()&&!this.isLoading()},t}(),ve=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.show=function(e){t.prototype.show.call(this,e),this.state=new me({q:"author:"+e.username(),sort:"newest"}),this.state.refresh()},n.content=function(){return m("div",{className:"DiscussionsUserPage"},ut.component({state:this.state}))},e}(Qt),ge=n(38),be=n(31),ye=n(45),we=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.methods=this.notificationMethods().toArray(),this.loading={},this.types=this.notificationTypes().toArray()},n.view=function(){var t=this,e=this.attrs.user.preferences();return m("table",{className:"NotificationGrid"},m("thead",null,m("tr",null,m("td",null),this.methods.map((function(e){return m("th",{className:"NotificationGrid-groupToggle",onclick:t.toggleMethod.bind(t,e.name)},Object(w.a)(e.icon)," ",e.label)})))),m("tbody",null,this.types.map((function(n){return m("tr",null,m("td",{className:"NotificationGrid-groupToggle",onclick:t.toggleType.bind(t,n.name)},Object(w.a)(n.icon)," ",n.label),t.methods.map((function(i){var r=t.preferenceKey(n.name,i.name);return m("td",{className:"NotificationGrid-checkbox"},m(ye.a,{state:!!e[r],loading:t.loading[r],disabled:!(r in e),onchange:t.toggle.bind(t,[r])}))})))}))))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$("thead .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){var e=parseInt($(this).index(),10)+1;$(this).parents("table").find("td:nth-child("+e+")").toggleClass("highlighted","mouseenter"===t.type)})),this.$("tbody .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){$(this).parent().find("td").toggleClass("highlighted","mouseenter"===t.type)}))},n.toggle=function(t){var e=this,n=this.attrs.user,i=n.preferences(),r=!i[t[0]];t.forEach((function(t){e.loading[t]=!0,i[t]=r})),m.redraw(),n.save({preferences:i}).then((function(){t.forEach((function(t){return e.loading[t]=!1})),m.redraw()}))},n.toggleMethod=function(t){var e=this,n=this.types.map((function(n){return e.preferenceKey(n.name,t)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.toggleType=function(t){var e=this,n=this.methods.map((function(n){return e.preferenceKey(t,n.name)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new p.a;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 p.a;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:app.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(h.a),xe=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.className=function(){return"ChangePasswordModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.change_password.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("core.forum.change_password.text")),m("div",{className:"Form-group"},P.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("core.forum.change_password.send_button")))))},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/forgot",body:{email:app.session.user.email()}}).then(this.hide.bind(this),this.loaded.bind(this))},e}(L.a),Ne=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.success=!1,this.email=Object(R.a)(app.session.user.email()),this.password=Object(R.a)("")},n.className=function(){return"ChangeEmailModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.change_email.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("core.forum.change_email.confirmation_message",{email:m("strong",null,this.email())})),m("div",{className:"Form-group"},m(P.a,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},app.translator.trans("core.forum.change_email.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{type:"email",name:"email",className:"FormControl",placeholder:app.session.user.email(),bidi:this.email,disabled:this.loading})),m("div",{className:"Form-group"},m("input",{type:"password",name:"password",className:"FormControl",placeholder:app.translator.trans("core.forum.change_email.confirm_password_placeholder"),bidi:this.password,disabled:this.loading})),m("div",{className:"Form-group"},P.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("core.forum.change_email.submit_button")))))},n.onsubmit=function(t){var e=this;if(t.preventDefault(),this.email()!==app.session.user.email()){app.session.user.email();this.loading=!0,app.session.user.save({email:this.email()},{errorHandler:this.onerror.bind(this),meta:{password:this.password()}}).then((function(){return e.success=!0})).catch((function(){})).then(this.loaded.bind(this))}else this.hide()},n.onerror=function(e){401===e.status&&(e.alert.content=app.translator.trans("core.forum.change_email.incorrect_password_message")),t.prototype.onerror.call(this,e)},e}(L.a),Ce=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.show(app.session.user),app.setTitle(app.translator.trans("core.forum.settings.title"))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,Object(f.a)(this.settingsItems().toArray())))},n.settingsItems=function(){var t=this,e=new p.a;return["account","notifications","privacy"].forEach((function(n){e.add(n,m(be.a,{className:"Settings-"+n,label:app.translator.trans("core.forum.settings."+n+"_heading")},t[n+"Items"]().toArray()))})),e},n.accountItems=function(){var t=new p.a;return t.add("changePassword",m(P.a,{className:"Button",onclick:function(){return app.modal.show(xe)}},app.translator.trans("core.forum.settings.change_password_button"))),t.add("changeEmail",m(P.a,{className:"Button",onclick:function(){return app.modal.show(Ne)}},app.translator.trans("core.forum.settings.change_email_button"))),t},n.notificationsItems=function(){var t=new p.a;return t.add("notificationGrid",m(we,{user:this.user})),t},n.privacyItems=function(){var t=this,e=new p.a;return e.add("discloseOnline",m(ge.a,{state:this.user.preferences().discloseOnline,onchange:function(e){t.discloseOnlineLoading=!0,t.user.savePreferences({discloseOnline:e}).then((function(){t.discloseOnlineLoading=!1,m.redraw()}))},loading:this.discloseOnlineLoading},app.translator.trans("core.forum.settings.privacy_disclose_online_label"))),e},e}(Qt),Oe=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),app.history.push("notifications"),app.notifications.load(),this.bodyClass="App--notifications"},n.view=function(){return m("div",{className:"NotificationsPage"},m(Pt,{state:app.notifications}))},e}(d.a);function ke(t){if(t)return t.split("-")[0]}var Te=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.makeKey=function(){var t=Object(a.a)({},m.route.param());return"near"in t&&delete t.near,t.id=ke(t.id),this.routeName.replace(".near","")+JSON.stringify(t)},n.onmatch=function(n,i,r){return app.current.matches(Ot)&&ke(n.id)===ke(m.route.param("id"))&&(e.scrollToPostNumber=n.near||"1"),t.prototype.onmatch.call(this,n,i,r)},n.render=function(n){if(null!==e.scrollToPostNumber){var i=e.scrollToPostNumber;setTimeout((function(){return app.current.get("stream").goToNumber(i)})),e.scrollToPostNumber=null}return t.prototype.render.call(this,n)},e}(n(46).a);Object(s.a)(Te,"scrollToPostNumber",null);var je=function(t){t.routes={index:{path:"/all",component:he},discussion:{path:"/d/:id",component:Ot,resolverClass:Te},"discussion.near":{path:"/d/:id/:near",component:Ot,resolverClass:Te},user:{path:"/u/:username",component:fe},"user.posts":{path:"/u/:username",component:fe},"user.discussions":{path:"/u/:username/discussions",component:ve},settings:{path:"/settings",component:Ce},notifications:{path:"/notifications",component:Oe}},t.route.discussion=function(e,n){var i=e.slug();return t.route(n&&1!==n?"discussion.near":"discussion",{id:e.id()+(i.trim()?"-"+i:""),near:n&&1!==n?n:void 0})},t.route.post=function(e){return t.route.discussion(e.discussion(),e.number())},t.route.user=function(e){return t.route("user",{username:e.username()})}},Se=n(23);function Ae(t){var e=t.session.user;if(e&&!e.isEmailConfirmed()){var n=function(n){function i(){return n.apply(this,arguments)||this}Object(o.a)(i,n);var r=i.prototype;return r.oninit=function(t){n.prototype.oninit.call(this,t),this.loading=!1,this.sent=!1},r.view=function(){return m(P.a,{class:"Button Button--link",onclick:this.onclick.bind(this),loading:this.loading,disabled:this.sent},this.sent?[Object(w.a)("fas fa-check")," ",t.translator.trans("core.forum.user_email_confirmation.sent_message")]:t.translator.trans("core.forum.user_email_confirmation.resend_button"))},r.onclick=function(){var n=this;this.loading=!0,m.redraw(),t.request({method:"POST",url:t.forum.attribute("apiUrl")+"/users/"+e.id()+"/send-confirmation"}).then((function(){n.loading=!1,n.sent=!0,m.redraw()})).catch((function(){n.loading=!1,m.redraw()}))},i}(h.a),i=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return Object(a.a)({},n,{children:[m("div",{className:"container"},n.children)]})},e}(Se.a);m.mount($("<div/>").insertBefore("#content")[0],{view:function(){return m(i,{dismissible:!1,controls:[m(n,null)]},t.translator.trans("core.forum.user_email_confirmation.alert_message",{email:m("strong",null,e.email())}))}})}}var Pe=n(69),Ee=n(49),De=function(){function t(t){this.app=t,this.notificationPages=[],this.loading=!1,this.moreResults=!1}var e=t.prototype;return e.clear=function(){this.notificationPages=[]},e.getNotificationPages=function(){return this.notificationPages},e.isLoading=function(){return this.loading},e.hasMoreResults=function(){return this.moreResults},e.load=function(){this.app.session.user.newNotificationCount()&&(this.notificationPages=[]),this.notificationPages.length>0||(this.app.session.user.pushAttributes({newNotificationCount:0}),this.loadMore())},e.loadMore=function(){var t=this;this.loading=!0,m.redraw();var e=this.notificationPages.length>0?{page:{offset:10*this.notificationPages.length}}:null;return this.app.store.find("notifications",e).then(this.parseResults.bind(this)).catch((function(){})).then((function(){t.loading=!1,m.redraw()}))},e.parseResults=function(t){return t.length&&this.notificationPages.push(t),this.moreResults=!!t.payload.links.next,t},e.markAllAsRead=function(){0!==this.notificationPages.length&&(this.app.session.user.pushAttributes({unreadNotificationCount:0}),this.notificationPages.forEach((function(t){t.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),this.app.request({url:this.app.forum.attribute("apiUrl")+"/notifications/read",method:"POST"}))},t}(),$e=function(){function t(t){void 0===t&&(t=[]),this.cachedSearches=t}var e=t.prototype;return e.getValue=function(){return this.value},e.setValue=function(t){this.value=t},e.clear=function(){this.setValue("")},e.cache=function(t){this.cachedSearches.push(t)},e.isCached=function(t){return-1!==this.cachedSearches.indexOf(t)},t}(),_e=function(t){function e(e){return void 0===e&&(e=[]),t.call(this,e)||this}Object(o.a)(e,t);var n=e.prototype;return n.getValue=function(){return void 0===this.value&&(this.value=this.getInitialSearch()||""),t.prototype.getValue.call(this)},n.clear=function(){t.prototype.clear.call(this),this.getInitialSearch()?this.clearInitialSearch():m.redraw()},n.stickyParams=function(){return{sort:m.route.param("sort"),q:m.route.param("q")}},n.params=function(){var t=this.stickyParams();return t.filter=m.route.param("filter"),t},n.changeSort=function(t){var e=this.params();t===Object.keys(app.discussions.sortMap())[0]?delete e.sort:e.sort=t,Object(c.a)(app.route(app.current.get("routeName"),e))},n.getInitialSearch=function(){return app.current.type&&app.current.type.providesInitialSearch&&this.params().q},n.clearInitialSearch=function(){var t=this.params();delete t.q,Object(c.a)(app.route(app.current.get("routeName"),t))},e}($e),Ie=function(t){function e(){var e;return e=t.call(this)||this,Object(s.a)(Object(r.a)(e),"notificationComponents",{discussionRenamed:qt}),Object(s.a)(Object(r.a)(e),"postComponents",{comment:ae,discussionRenamed:le}),Object(s.a)(Object(r.a)(e),"pane",null),Object(s.a)(Object(r.a)(e),"drawer",null),Object(s.a)(Object(r.a)(e),"history",new u),Object(s.a)(Object(r.a)(e),"notifications",new De(Object(r.a)(e))),Object(s.a)(Object(r.a)(e),"search",new _e),Object(s.a)(Object(r.a)(e),"composer",new Ht),je(Object(r.a)(e)),e.discussions=new me({},Object(r.a)(e)),e.cache.discussionList=e.discussions,e}Object(o.a)(e,t);var n=e.prototype;return n.mount=function(){var e=this,n=this.forum.attribute("defaultRoute"),i="index";for(var r in this.routes)this.routes[r].path===n&&(i=r);this.routes[i].path="/",this.history.push(i,this.translator.trans("core.forum.header.back_to_index_tooltip"),"/"),this.pane=new l(document.getElementById("app")),m.route.prefix="",t.prototype.mount.call(this,this.forum.attribute("basePath")),m.mount(document.getElementById("app-navigation"),{view:function(){return Ee.a.component({className:"App-backControl",drawer:!0})}}),m.mount(document.getElementById("header-navigation"),Ee.a),m.mount(document.getElementById("header-primary"),kt),m.mount(document.getElementById("header-secondary"),Mt),m.mount(document.getElementById("composer"),{view:function(){return Ut.component({state:e.composer})}}),Ae(this),$("#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.viewingDiscussion=function(t){return this.current.matches(Ot,{discussion:t})},n.authenticationComplete=function(t){t.loggedIn?window.location.reload():this.modal.show(U,t)},e}(Pe.a),Me=n(97),Le=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.initAttrs=function(e){e.className=(e.className||"")+" LogInButton",e.onclick=function(){var t=$(window);window.open(app.forum.attribute("baseUrl")+e.path,"logInPopup","width=580,height=400,top="+(t.height()/2-200)+",left="+(t.width()/2-290)+",status=no,scrollbars=yes,resizable=no")},t.initAttrs.call(this,e)},e}(P.a),Re=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=e.className||"Button Button--icon Button--link"},e.prototype.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$().tooltip()},e}(P.a),Be=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t=this.attrs.post,e=t.user(),n=Object(y.a)(t.contentPlain(),this.attrs.highlight,300);return m(g.a,{className:"PostPreview",href:app.route.post(t),onclick:this.attrs.onclick},m("span",{className:"PostPreview-content"},Object(b.a)(e),Object(ft.a)(e)," ",m("span",{className:"PostPreview-excerpt"},n)))},e}(h.a),He=function(){function t(){}var e=t.prototype;return e.search=function(){},e.view=function(){},t}(),Ue=Object(a.a)(Me.a,{"utils/PostControls":Vt,"utils/KeyboardNavigatable":Dt,"utils/slidable":V,"utils/History":u,"utils/DiscussionControls":W,"utils/alertEmailConfirmation":Ae,"utils/UserControls":Zt,"utils/Pane":l,"states/ComposerState":Ht,"states/DiscussionListState":me,"states/GlobalSearchState":_e,"states/NotificationListState":De,"states/PostStreamState":Ct,"states/SearchState":$e,"components/AffixedSidebar":Jt,"components/DiscussionPage":Ot,"components/LogInModal":F,"components/ComposerBody":D,"components/ForgotPasswordModal":B,"components/Notification":Ft,"components/LogInButton":Le,"components/DiscussionsUserPage":ve,"components/Composer":Ut,"components/SessionDropdown":jt,"components/HeaderPrimary":kt,"components/PostEdited":se,"components/PostStream":gt,"components/ChangePasswordModal":xe,"components/IndexPage":he,"components/DiscussionRenamedNotification":qt,"components/DiscussionsSearchSource":$t,"components/HeaderSecondary":Mt,"components/ComposerButton":Lt,"components/DiscussionList":ut,"components/ReplyPlaceholder":vt,"components/TextEditor":E,"components/TextEditorButton":Re,"components/AvatarEditor":te,"components/Post":Yt,"components/SettingsPage":Ce,"components/TerminalPost":k,"components/ChangeEmailModal":Ne,"components/NotificationsDropdown":Et,"components/UserPage":Qt,"components/PostUser":ie,"components/UserCard":ee,"components/UsersSearchSource":_t,"components/NotificationGrid":we,"components/PostPreview":Be,"components/EventPost":ue,"components/DiscussionHero":v,"components/PostMeta":oe,"components/EditUserModal":Xt,"components/SearchSource":He,"components/DiscussionRenamedPost":le,"components/DiscussionComposer":pe,"components/LogInButtons":H,"components/NotificationList":Pt,"components/WelcomeHero":de,"components/SignUpModal":U,"components/CommentPost":ae,"components/ComposerPostPreview":mt,"components/ReplyComposer":M,"components/NotificationsPage":Oe,"components/PostStreamScrubber":yt,"components/EditPostComposer":Wt,"components/RenameDiscussionModal":z,"components/Search":It,"components/DiscussionListItem":at,"components/LoadingPost":ht,"components/PostsUserPage":fe,"resolvers/DiscussionPageResolver":Te,routes:je,ForumApplication:Ie}),Fe=new Ie;window.app=Fe,Ue.app=Fe}]);
  //# sourceMappingURL=forum.js.map