mirror of
https://github.com/flarum/framework.git
synced 2025-02-02 12:17:29 +08:00
53 lines
361 KiB
JavaScript
53 lines
361 KiB
JavaScript
flarum.core=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.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 o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));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=91)}([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 o}));var i=n(4),o=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 o=this;void 0===n&&(n={});var r={type:this.data.type,id:this.data.id,attributes:e};if(e.relationships){for(var s in r.relationships={},e.relationships){var a=e.relationships[s];r.relationships[s]={data:a instanceof Array?a.map(t.getIdentifier):t.getIdentifier(a)}}delete e.relationships}var u=this.copyData();this.pushData(r);var c={data:r};return n.meta&&(c.meta=n.meta),app.request(Object(i.a)({method:this.exists?"PATCH":"POST",url:app.forum.attribute("apiUrl")+this.apiEndpoint(),data:c},n)).then((function(t){return o.store.data[t.data.type]=o.store.data[t.data.type]||{},o.store.data[t.data.type][t.data.id]=o,o.store.pushPayload(t)}),(function(t){throw o.pushData(u),m.lazyRedraw(),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(),data:t},e)).then((function(){n.exists=!1,n.store.remove(n)})):m.deferred().resolve().promise},e.apiEndpoint=function(){return"/"+this.data.type+(this.exists?"/"+this.data.id:"")},e.copyData=function(){return JSON.parse(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";n.d(e,"a",(function(){return l}));var i=n(4),o=n(0),r=n(3),s=n(6),a=n(10),u=n(9),c=n(14),l=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=Object(i.a)({},this.props);delete t.children,t.className=t.className||"",t.type=t.type||"button",t.title&&!this.props.children&&(t["aria-label"]=t.title),!t.title&&this.props.children&&(t.title=Object(u.a)(this.props.children)),Object(a.a)(t,"icon")&&(t.className+=" hasIcon");var e=Object(a.a)(t,"loading");return(t.disabled||e)&&(t.className+=" disabled"+(e?" loading":""),delete t.onclick),m("button",t,this.getButtonContent())},n.getButtonContent=function(){var t=this.props.icon;return[t&&!0!==t?Object(s.a)(t,{className:"Button-icon"}):"",this.props.children?m("span",{className:"Button-label"},this.props.children):"",this.props.loading?c.a.component({size:"tiny",className:"LoadingIndicator--inline"}):""]},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(4),o=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=null),e&&(t.children=e),this.constructor.initProps(t),this.props=t,this.element=null,this.retain=!1,this.init()}var e=t.prototype;return e.init=function(){},e.onunload=function(){},e.render=function(){var t=this,e=this.retain?{subtree:"retain"}:this.view();e.attrs=e.attrs||{};var n=e.attrs.config;return e.attrs.config=function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];t.element=i[0],t.config.apply(t,i.slice(1)),n&&n.apply(t,i)},e},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.config=function(){},e.view=function(){throw new Error("Component#view must be implemented by subclass")},t.component=function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var n=Object(i.a)({},t);e&&(n.children=e),this.initProps(n);var o=function(t){return t.props=n,t.render()};o.$original=this.prototype.view;var r={controller:this.bind(void 0,n),view:o,props:n,component:this};return n.key&&(r.attrs={key:n.key}),r},t.initProps=function(t){},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 o}));var i=function(t,e){this.content=t,this.priority=e},o=function(){function t(){this.items={}}var e=t.prototype;return e.isEmpty=function(){for(var t in this.items)if(this.items.hasOwnProperty(t))return!1;return!0},e.has=function(t){return!!this.items[t]},e.get=function(t){return this.items[t].content},e.add=function(t,e,n){return void 0===n&&(n=0),this.items[t]=new i(e,n),this},e.replace=function(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),this.items[t]&&(null!==e&&(this.items[t].content=e),null!==n&&(this.items[t].priority=n)),this},e.remove=function(t){return delete this.items[t],this},e.merge=function(t){for(var e in t.items)t.items.hasOwnProperty(e)&&t.items[e]instanceof i&&(this.items[e]=t.items[e]);return this},e.toArray=function(){var t=[];for(var e in this.items)this.items.hasOwnProperty(e)&&this.items[e]instanceof i&&(this.items[e].content=Object(this.items[e].content),this.items[e].content.itemName=e,t.push(this.items[e]),this.items[e].key=t.length);return t.sort((function(t,e){return t.priority===e.priority?t.key-e.key:t.priority>e.priority?-1:1})).map((function(t){return t.content}))},t}()},function(t,e,n){"use strict";function i(t,e){return void 0===e&&(e={}),e.className="icon "+t+" "+(e.className||""),m("i",e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(22),o=n(25);function r(t){return t&&t.component===i.a}function s(t){return t instanceof Array||(t=[t]),function(t){var e,n=[];return t.forEach((function(i,o){(!r(i)||e&&!r(e)&&o!==t.length-1)&&(e=i,n.push(i))})),n}(t).map((function(t){var e=t.component&&t.component.isListItem,n=t.component&&t.component.isActive&&t.component.isActive(t.props),i=t.props?t.props.itemClassName:t.itemClassName;return e&&(t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName),e?t:m("li",{className:Object(o.a)([t.itemName?"item-"+t.itemName:"",i,n?"active":""]),key:t.itemName},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";function i(t){return t instanceof Array?t.map((function(t){return i(t)})).join(""):"object"==typeof t&&null!==t?i(t.children):t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t,e){var n=t[e];return delete t[e],n}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(4),o=n(0),r=n(1),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(r.a);Object(i.a)(s.prototype,{nameSingular:r.a.attribute("nameSingular"),namePlural:r.a.attribute("namePlural"),color:r.a.attribute("color"),icon:r.a.attribute("icon"),isHidden:r.a.attribute("isHidden")}),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 s}));var i=n(0),o=n(3),r=(n(16),n(2)),s=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.init=function(){this.alert=null},n.view=function(){return this.alert&&(this.alert.props.dismissible=!1),m("div",{className:"Modal modal-dialog "+this.className()},m("div",{className:"Modal-content"},this.isDismissible()?m("div",{className:"Modal-close App-backControl"},r.a.component({icon:"fas fa-times",onclick:this.hide.bind(this),className:"Button Button--icon Button--link"})):"",m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),alert?m("div",{className:"Modal-alert"},this.alert):"",this.content())))},n.isDismissible=function(){return!0},n.className=function(){},n.title=function(){},n.content=function(){},n.onsubmit=function(){},n.onready=function(){this.$("form").find("input, select, textarea").first().focus().select()},n.onhide=function(){},n.hide=function(){app.modal.close()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){this.alert=t.alert,m.redraw(),422===t.status&&t.response.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").select():this.onready()},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),o=n(3),r=n(6),s=n(7),a=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className=e.className||"",e.buttonClassName=e.buttonClassName||"",e.menuClassName=e.menuClassName||"",e.label=e.label||"",e.caretIcon=void 0!==e.caretIcon?e.caretIcon:"fas fa-caret-down"};var n=e.prototype;return n.init=function(){this.showing=!1},n.view=function(){var t=this.props.children?Object(s.a)(this.props.children):[];return m("div",{className:"ButtonGroup Dropdown dropdown "+this.props.className+" itemCount"+t.length+(this.showing?" open":"")},this.getButton(),this.getMenu(t))},n.config=function(t){var e=this;t||(this.$().on("shown.bs.dropdown",(function(){e.showing=!0,e.props.onshow&&e.props.onshow(),m.redraw();var t=e.$(".Dropdown-menu"),n=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",n||t.offset().left+t.width()>$(window).scrollLeft()+$(window).width())})),this.$().on("hidden.bs.dropdown",(function(){e.showing=!1,e.props.onhide&&e.props.onhide(),m.redraw()})))},n.getButton=function(){return m("button",{className:"Dropdown-toggle "+this.props.buttonClassName,"data-toggle":"dropdown",onclick:this.props.onclick},this.getButtonContent())},n.getButtonContent=function(){return[this.props.icon?Object(r.a)(this.props.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},this.props.label),this.props.caretIcon?Object(r.a)(this.props.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.props.menuClassName},t)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var i=n(4),o=n(0),r=n(3),s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);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"},u=function(){function t(t){void 0===t&&(t={}),this.opts=s({},a,t)}return t.prototype.spin=function(t){var e,n,i,o=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/o.opts.fps)},n=function(){return Date.now()});var r=0,s=function(){var t,a,u=n();if(void 0===i&&(i=u-1),r+=(t=u-i,a=o.opts.speed,t/1e3*a),i=u,r>1&&(r-=Math.floor(r)),o.el.childNodes.length===o.opts.lines)for(var l=0;l<o.opts.lines;l++){var d=c(l,r,o.opts);o.el.childNodes[l].childNodes[0].style.opacity=d.toString()}o.animateId=o.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 o=function(t){for(var e=/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/,n=[],i=0,o=t.split(",");i<o.length;i++){var r=o[i].match(e);if(null!==r){var s=+r[2],a=+r[5],u=r[4],c=r[7];0!==s||u||(u=c),0!==a||c||(c=u),u===c&&n.push({prefix:r[1]||"",x:s,y:a,xUnits:u,yUnits:c,end:r[8]})}}return n}(i),r=0;r<e.lines;r++){var s=~~(360/e.lines*r+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,r),borderRadius:n,transformOrigin:"left",transform:"rotate("+s+"deg) translateX("+e.radius+"px)"}),u=d(document.createElement("div"),{width:"100%",height:"100%",background:p(e.color,r),borderRadius:n,boxShadow:h(o,s),opacity:e.opacity});a.appendChild(u),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 c(t,e,n){var i=e-(t+1)/n.lines*n.direction;(i<0||i>1)&&(i+=n.direction);var o=1-i/(n.trail/100);return o<0?n.opacity:o*(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,o=t;i<o.length;i++){var r=o[i],s=f(r.x,r.y,e);n.push(r.prefix+s[0]+r.xUnits+" "+s[1]+r.yUnits+r.end)}return n.join(", ")}function f(t,e,n){var i=n*Math.PI/180,o=Math.sin(i),r=Math.cos(i);return[Math.round(1e3*(t*r+e*o))/1e3,Math.round(1e3*(-t*o+e*r))/1e3]}var g=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=Object(i.a)({},this.props);return t.className="LoadingIndicator "+(t.className||""),delete t.size,m("div",t,m.trust(" "))},n.config=function(t){if(!t){var e={zIndex:"auto",color:this.$().css("color")};switch(this.props.size){case"large":Object(i.a)(e,{lines:10,length:8,width:4,radius:8});break;case"tiny":Object(i.a)(e,{lines:8,length:2,width:2,radius:3});break;default:Object(i.a)(e,{lines:8,length:4,width:3,radius:5})}new u(e).spin(this.element)}},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(4);function o(t,e){void 0===e&&(e={}),e.className="Avatar "+(e.className||"");var n="",o="undefined"===e.title||e.title;if(o||delete e.title,t){var r=t.displayName()||"?",s=t.avatarUrl();if(o&&(e.title=e.title||r),s)return m("img",Object(i.a)({},e,{src:s}));n=r.charAt(0).toUpperCase(),e.style={background:t.color()}}return m("span",e,n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(4),o=n(0),r=n(3),s=n(2),a=n(7),u=n(10),c=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t=Object(i.a)({},this.props),e=Object(u.a)(t,"type");t.className="Alert Alert--"+e+" "+(t.className||"");var n=Object(u.a)(t,"children"),o=Object(u.a)(t,"controls")||[],r=Object(u.a)(t,"dismissible"),c=Object(u.a)(t,"ondismiss"),l=[];return(r||void 0===r)&&l.push(m(s.a,{icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:c})),m("div",t,m("span",{className:"Alert-body"},n),m("ul",{className:"Alert-controls"},Object(a.a)(o.concat(l))))},e}(r.a)},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,o=e.slice(0,-1),r=e.slice(-1)[0],s={};return function(){var t=this,e=!1;return o.forEach((function(n){var i="function"==typeof t[n]?t[n]():t[n];s[n]!==i&&(e=!0,s[n]=i)})),e&&(i=r.apply(this,o.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),o=n(3),r=n(43),s=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.init=function(){app.previous=app.current,app.current=new r.a(this.constructor),app.drawer.hide(),app.modal.close(),this.bodyClass=""},n.config=function(t,e){var n=this;t||this.bodyClass&&($("#app").addClass(this.bodyClass),e.onunload=function(){return $("#app").removeClass(n.bodyClass)})},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initProps=function(t){t.active=this.isActive(t),t.config=t.config||m.route},e.prototype.view=function(){var e=t.prototype.view.call(this);return e.tag="a",e},e.isActive=function(t){return void 0!==t.active?t.active:m.route()===t.href},e}(n(2).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),o=n(3),r=n(7),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){return m("fieldset",{className:this.props.className},m("legend",null,this.props.label),m("ul",null,Object(r.a)(this.props.children)))},e}(o.a)},function(t,e,n){"use strict";var i=n(0),o=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(3).a);o.isListItem=!0,e.a=o},function(t,e,n){"use strict";function i(t){var e=moment(t),n=moment();e.isAfter(n)&&(e=n);return e.diff(moment())<-2592e6?e.year()===moment().year()?e.format("D MMM"):e.format("ll"):e.fromNow()}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(4),o=n(0),r=n(3),s=n(6),a=n(10),u=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=Object(i.a)({},this.props),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(" "))},n.config=function(t){t||this.props.label&&this.$().tooltip()},e}(r.a)},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){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function i(t){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";function i(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function o(t){return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}function r(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 ").replace(/<img\b[^>]*>/gi," "),n=$("<div/>").html(e);return n.find(r.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 o})),n.d(e,"getPlainContent",(function(){return r})),n.d(e,"ucfirst",(function(){return s})),r.removeSelectors=["blockquote","script"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),o=n(13),r=n(6),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initProps=function(e){e.caretIcon=void 0!==e.caretIcon?e.caretIcon:"fas fa-sort",t.initProps.call(this,e),e.className+=" Dropdown--select"},e.prototype.getButtonContent=function(){var t=this.props.children.filter((function(t){return t.props.active}))[0],e=t&&t.props.children||this.props.defaultLabel;return e instanceof Array&&(e=e[0]),[m("span",{className:"Button-label"},e),Object(r.a)(this.props.caretIcon,{className:"Button-caret"})]},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.group&&(e.icon=e.group.icon(),e.style={backgroundColor:e.group.color()},e.label=void 0===e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.id(),delete e.group)},e}(n(24).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(28);function o(t,e,n){if(!e&&!n)return t;var o=e instanceof RegExp?e:new RegExp(e,"gi"),r=t,s=0;return n&&(e&&(s=Math.max(0,t.search(o)-n/2)),r=Object(i.truncate)(r,n,s)),r=$("<div/>").text(r).html(),e&&(r=r.replace(o,"<mark>$&</mark>")),m.trust(r)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className=(e.className||"")+" Checkbox--switch"},e.prototype.getDisplay=function(){return this.props.loading?t.prototype.getDisplay.call(this):""},e}(n(39).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},o=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))},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 o})),n.d(e,"override",(function(){return r}));var i=n(4);function o(t,e,n){var o=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var r=o?o.apply(this,e):void 0;return n.apply(this,[r].concat(e)),r},Object(i.a)(t[e],o)}function r(t,e,n){var o=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,[o.bind(this)].concat(e))},Object(i.a)(t[e],o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(4),o=n(0),r=n(1),s=n(50),a=n(5),u=n(18),c=n(30),l=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(r.a);Object(i.a)(l.prototype,{username:r.a.attribute("username"),displayName:r.a.attribute("displayName"),email:r.a.attribute("email"),isEmailConfirmed:r.a.attribute("isEmailConfirmed"),password:r.a.attribute("password"),avatarUrl:r.a.attribute("avatarUrl"),preferences:r.a.attribute("preferences"),groups:r.a.hasMany("groups"),joinTime:r.a.attribute("joinTime",r.a.transformDate),lastSeenAt:r.a.attribute("lastSeenAt",r.a.transformDate),markedAllAsReadAt:r.a.attribute("markedAllAsReadAt",r.a.transformDate),unreadNotificationCount:r.a.attribute("unreadNotificationCount"),newNotificationCount:r.a.attribute("newNotificationCount"),discussionCount:r.a.attribute("discussionCount"),commentCount:r.a.attribute("commentCount"),canEdit:r.a.attribute("canEdit"),canDelete:r.a.attribute("canDelete"),avatarColor:null,color:Object(u.a)("username","avatarUrl","avatarColor",(function(t,e,n){return n?"rgb("+n.join(", ")+")":e?(this.calculateAvatarColor(),""):"#"+Object(s.a)(t)})),isOnline:function(){return this.lastSeenAt()>moment().subtract(5,"minutes").toDate()},badges:function(){var t=new a.a,e=this.groups();return e&&e.forEach((function(e){t.add("group"+e.id(),c.a.component({group:e}))})),t},calculateAvatarColor:function(){var t=new Image,e=this;t.onload=function(){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";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={}}var e=t.prototype;return e.retain=function(){var t=this,e=!1;return this.callbacks.forEach((function(n,i){var o=n();o!==t.data[i]&&(t.data[i]=o,e=!0)})),!e&&{subtree:"retain"}},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)},e.invalidate=function(){this.data={}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(23);function o(t){var e=moment(t),n=e.format(),o=e.format("LLLL"),r=Object(i.a)(t);return m("time",{pubdate:!0,datetime:n,title:o,"data-humantime":!0},r)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(4),o=n(0),r=n(1),s=n(18),a=n(5),u=n(24),c=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(r.a);Object(i.a)(c.prototype,{title:r.a.attribute("title"),slug:r.a.attribute("slug"),createdAt:r.a.attribute("createdAt",r.a.transformDate),user:r.a.hasOne("user"),firstPost:r.a.hasOne("firstPost"),lastPostedAt:r.a.attribute("lastPostedAt",r.a.transformDate),lastPostedUser:r.a.hasOne("lastPostedUser"),lastPost:r.a.hasOne("lastPost"),lastPostNumber:r.a.attribute("lastPostNumber"),commentCount:r.a.attribute("commentCount"),replyCount:Object(s.a)("commentCount",(function(t){return Math.max(0,t-1)})),posts:r.a.hasMany("posts"),mostRelevantPost:r.a.hasOne("mostRelevantPost"),lastReadAt:r.a.attribute("lastReadAt",r.a.transformDate),lastReadPostNumber:r.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:r.a.attribute("hiddenAt",r.a.transformDate),hiddenUser:r.a.hasOne("hiddenUser"),isHidden:Object(s.a)("hiddenAt",(function(t){return!!t})),canReply:r.a.attribute("canReply"),canRename:r.a.attribute("canRename"),canHide:r.a.attribute("canHide"),canDelete:r.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(u.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 a}));var i=n(0),o=n(3),r=n(14),s=n(6),a=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.view=function(){var t="Checkbox "+(this.props.state?"on":"off")+" "+(this.props.className||"");return this.props.loading&&(t+=" loading"),this.props.disabled&&(t+=" disabled"),m("label",{className:t},m("input",{type:"checkbox",checked:this.props.state,disabled:this.props.disabled,onchange:m.withAttr("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display"},this.getDisplay()),this.props.children)},n.getDisplay=function(){return this.props.loading?r.a.component({size:"tiny"}):Object(s.a)(this.props.state?"fas fa-check":"fas fa-times")},n.onchange=function(t){this.props.onchange&&this.props.onchange(t,this)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t,e,n,i){this.status=t,this.responseText=e,this.options=n,this.xhr=i;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),o=n(3),r=n(2),s=n(20),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.props.className||""),onmouseenter:n&&n.show.bind(n),onmouseleave:n&&n.onmouseleave.bind(n)},e.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.config=function(t,e){e.retain=!0},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,config:function(){},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?r.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.props.drawer)return"";var t=app.drawer,e=app.session.user;return r.a.component({className:"Button Button--icon Navigation-drawer"+(e&&e.newNotificationCount()?" new":""),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars"})},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),o=n(3),r=n(6),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){var t=this.props,e=t.options,n=t.onchange,i=t.value,o=t.disabled;return m("span",{className:"Select"},m("select",{className:"Select-input FormControl",onchange:n?m.withAttr("value",n.bind(this)):void 0,value:i,disabled:o},Object.keys(e).map((function(t){return m("option",{value:t},e[t])}))),Object(r.a)("fas fa-sort",{className:"Select-caret"}))},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=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,i,o=this;return void 0===e&&(e={}),n=this.type,i=t,!(!n||!(n===i||n.prototype instanceof i))&&Object.keys(e).every((function(t){return o.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 o}));var i=n(3);function o(t){var e=t.m,n=function t(n){for(var o=arguments.length,r=new Array(o>1?o-1:0),s=1;s<o;s++)r[s-1]=arguments[s];if(n.prototype&&n.prototype instanceof i.a){var a=r.slice(1);return 1===a.length&&Array.isArray(a[0])&&(a=a[0]),n.component(r[0],a)}var u=e.apply(this,arguments);return u.attrs.bidi&&t.bidi(u,u.attrs.bidi),u.attrs.route&&(u.attrs.href=u.attrs.route,u.attrs.config=t.route,delete u.attrs.route),u};Object.keys(e).forEach((function(t){return n[t]=e[t]})),n.lazyRedraw=function(){n.startComputation(),n.endComputation()},t.m=n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.props.text))},e}(n(3).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),o=n(3),r=n(12),s=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.init=function(){this.showing=!1,this.component=null},n.view=function(){return m("div",{className:"ModalManager modal fade"},this.component&&this.component.render())},n.config=function(t,e){t||(e.retain=!0,this.$().on("hidden.bs.modal",this.clear.bind(this)).on("shown.bs.modal",this.onready.bind(this)))},n.show=function(t){if(!(t instanceof r.a))throw new Error("The ModalManager component can only show Modal components");clearTimeout(this.hideTimeout),this.showing=!0,this.component=t,m.redraw(!0);var e=!!this.component.isDismissible();this.$().modal({backdrop:e||"static",keyboard:e}).modal("show")},n.close=function(){var t=this;this.showing&&(this.hideTimeout=setTimeout((function(){t.$().modal("hide"),t.showing=!1})))},n.clear=function(){this.component&&this.component.onhide(),this.component=null,app.current.retain=!1,m.lazyRedraw()},n.onready=function(){this.component&&this.component.onready&&this.component.onready(this.$())},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),o=n(3),r=n(16),s=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.init=function(){this.components=[]},n.view=function(){return m("div",{className:"AlertManager"},this.components.map((function(t){return m("div",{className:"AlertManager-alert"},t)})))},n.config=function(t,e){e.retain=!0},n.show=function(t){if(!(t instanceof r.a))throw new Error("The AlertManager component can only show Alert components");t.props.ondismiss=this.dismiss.bind(this,t),this.components.push(t),m.redraw()},n.dismiss=function(t){var e=this.components.indexOf(t);-1!==e&&(this.components.splice(e,1),m.redraw())},n.clear=function(){this.components=[],m.redraw()},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),o=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.props.error.xhr?this.props.error.xhr.status+" "+this.props.error.xhr.statusText:""},n.content=function(){var t,e=this.props,n=e.error,i=e.formattedError;if(i)t=i.join("\n\n");else try{var o=n.response||JSON.parse(n.responseText);t=JSON.stringify(o,null,2)}catch(e){t=n.responseText}return m("div",{className:"Modal-body"},m("pre",null,this.props.error.options.method," ",this.props.error.options.url,m("br",null),m("br",null),t))},e}(n(12).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(4),o=(n(35),n(17)),r=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(r.a)(e,"user");e.username||(e.username=Object(o.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])s.shift();else{var i=e[n[3]]||{tag:n[3],children:[]};s[0].push(i),s.unshift(i.children||i)}}else s[0].push(t)})),i.filter((function(t){return t}))},e.pluralize=function(t,e){var n=this,i=new RegExp(/^\w+\: +(.+)$/),o=new RegExp(/^\s*((\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]]))\s?(.+?)$/),r=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(o.test(t)){var e=t.match(o);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(r.test(i)){var o=i.match(r);if(o[1]){var s=o[2].split(",");for(var u in s)if(e==s[u])return a[i]}else{var c=n.convertNumber(o[4]),l=n.convertNumber(o[5]);if(("["===o[3]?e>=c:e>c)&&("]"===o[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";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,o,r,s=Math.floor(6*t),a=6*t-s,u=n*(1-e),c=n*(1-a*e),l=n*(1-(1-a)*e);switch(s%6){case 0:i=n,o=l,r=u;break;case 1:i=c,o=n,r=u;break;case 2:i=u,o=n,r=l;break;case 3:i=u,o=c,r=n;break;case 4:i=l,o=u,r=n;break;case 5:i=n,o=u,r=c}return{r:Math.floor(255*i),g:Math.floor(255*o),b:Math.floor(255*r)}}(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 o}));var i=n(4),o=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,o){void 0===n&&(n={}),void 0===o&&(o={});var r=n,s=app.forum.attribute("apiUrl")+"/"+t;return e instanceof Array?s+="?filter[id]="+e.join(","):"object"==typeof e?r=e:e&&(s+="/"+e),app.request(Object(i.a)({method:"GET",url:s,data:r},o)).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 o}));var i=n(4),o=function(){function t(t,e){this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),app.request(Object(i.a)({method:"POST",url:app.forum.attribute("baseUrl")+"/login",data:t},e))},e.logout=function(){window.location=app.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return 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";function i(t,e){void 0===e&&(e="");var n={};for(var i in t){var o=t[i];o.component&&(o.component.props.routeName=i),n[e+o.path]=o.component}return n}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(23);function o(){$("[data-humantime]").each((function(){var t=$(this),e=Object(i.a)(t.attr("datetime"));t.html(e)}))}function r(){setInterval(o,1e4)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(n(1).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(4),o=n(0),r=n(1),s=n(18),a=n(28),u=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(r.a);Object(i.a)(u.prototype,{number:r.a.attribute("number"),discussion:r.a.hasOne("discussion"),createdAt:r.a.attribute("createdAt",r.a.transformDate),user:r.a.hasOne("user"),contentType:r.a.attribute("contentType"),content:r.a.attribute("content"),contentHtml:r.a.attribute("contentHtml"),contentPlain:Object(s.a)("contentHtml",a.getPlainContent),editedAt:r.a.attribute("editedAt",r.a.transformDate),editedUser:r.a.hasOne("editedUser"),isEdited:Object(s.a)("editedAt",(function(t){return!!t})),hiddenAt:r.a.attribute("hiddenAt",r.a.transformDate),hiddenUser:r.a.hasOne("hiddenUser"),isHidden:Object(s.a)("hiddenAt",(function(t){return!!t})),canEdit:r.a.attribute("canEdit"),canHide:r.a.attribute("canHide"),canDelete:r.a.attribute("canDelete")})},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(4),o=n(0),r=n(1),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(r.a);Object(i.a)(s.prototype,{contentType:r.a.attribute("contentType"),content:r.a.attribute("content"),createdAt:r.a.attribute("createdAt",r.a.transformDate),isRead:r.a.attribute("isRead"),user:r.a.hasOne("user"),fromUser:r.a.hasOne("fromUser"),subject:r.a.hasOne("subject")})},function(t,e,n){"use strict";n.d(e,"a",(function(){return tt}));var i=n(4),o=n(8),r=n(5),s=n(16),a=n(2),u=n(46),c=n(47),l=n(48),d=n(49),p=n(51),h=n(52),f=n(10),g=n(53),v=n(54),y=n(40),b=n(33),w=n(55),x=n(34),_=n(56),N=n(35),k=n(38),T=n(57),S=n(11),C=n(58);var O=function(t,e){for(var n=-1,i=e.length,o=t.length;++n<i;)t[o+n]=e[n];return t},D=n(70),j="object"==typeof self&&self&&self.Object===Object&&self,P=(D.a||j||Function("return this")()).Symbol,E=Object.prototype,M=E.hasOwnProperty,A=E.toString,I=P?P.toStringTag:void 0;var R=function(t){var e=M.call(t,I),n=t[I];try{t[I]=void 0;var i=!0}catch(t){}var o=A.call(t);return i&&(e?t[I]=n:delete t[I]),o},L=Object.prototype.toString;var H=function(t){return L.call(t)},B=P?P.toStringTag:void 0;var U=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":B&&B in Object(t)?R(t):H(t)};var F=function(t){return null!=t&&"object"==typeof t};var Y=function(t){return F(t)&&"[object Arguments]"==U(t)},q=Object.prototype,W=q.hasOwnProperty,z=q.propertyIsEnumerable,V=Y(function(){return arguments}())?Y:function(t){return F(t)&&W.call(t,"callee")&&!z.call(t,"callee")},G=Array.isArray,Z=P?P.isConcatSpreadable:void 0;var K=function(t){return G(t)||V(t)||!!(Z&&t&&t[Z])};var X=function t(e,n,i,o,r){var s=-1,a=e.length;for(i||(i=K),r||(r=[]);++s<a;){var u=e[s];n>0&&i(u)?n>1?t(u,n-1,i,o,r):O(r,u):o||(r[r.length]=u)}return r};var J=function(t){return(null==t?0:t.length)?X(t,1/0):[]},Q=n(43),tt=function(){function t(){Object(o.a)(this,"forum",null),Object(o.a)(this,"routes",{}),Object(o.a)(this,"initializers",new r.a),Object(o.a)(this,"session",null),Object(o.a)(this,"translator",new d.a),Object(o.a)(this,"store",new p.a({forums:_.a,users:N.a,discussions:k.a,posts:T.a,groups:S.a,notifications:C.a})),Object(o.a)(this,"cache",{}),Object(o.a)(this,"booted",!1),Object(o.a)(this,"requestError",null),Object(o.a)(this,"current",new Q.a(null)),Object(o.a)(this,"previous",new Q.a(null)),Object(o.a)(this,"data",void 0),Object(o.a)(this,"title",""),Object(o.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 h.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],o=J(i.extend),r=Array.isArray(o),s=0;for(o=r?o:o[Symbol.iterator]();;){var a;if(r){if(s>=o.length)break;a=o[s++]}else{if((s=o.next()).done)break;a=s.value}a.extend(e,{name:n,exports:i})}}))},e.mount=function(t){void 0===t&&(t=""),this.modal=m.mount(document.getElementById("modal"),m(u.a,null)),this.alerts=m.mount(document.getElementById("alerts"),m(c.a,null)),this.drawer=new g.a,m.route(document.getElementById("content"),t+"/",Object(v.a)(this.routes,t)),new b.a((function(t){var e=$("#app"),n=e.offset().top;e.toggleClass("affix",t>=n).toggleClass("scrolled",t>n)})).start(),$((function(){$("body").addClass("ontouchstart"in window?"touch":"no-touch")})),Object(w.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.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){document.title=(this.titleCount?"("+this.titleCount+") ":"")+(this.title?this.title+" - ":"")+this.forum.attribute("title")},e.request=function(t){var e=this,n=Object(i.a)({},t);if(n.background=n.background||!0,Object(x.extend)(n,"config",(function(t,n){return n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),"GET"!==n.method&&"POST"!==n.method){var o=n.method;Object(x.extend)(n,"config",(function(t,e){return e.setRequestHeader("X-HTTP-Method-Override",o)})),n.method="POST"}n.deserialize=n.deserialize||function(t){return t},n.errorHandler=n.errorHandler||function(t){throw t};var r=n.extract;n.extract=function(t){var e;e=r?r(t.responseText):t.responseText||null;var i=t.status;if(i<200||i>299)throw new y.a(i,e,n,t);if(t.getResponseHeader){var o=t.getResponseHeader("X-CSRF-Token");o&&(app.session.csrfToken=o)}try{return JSON.parse(e)}catch(i){throw new y.a(500,e,n,t)}},this.requestError&&this.alerts.dismiss(this.requestError.alert);var u=m.deferred();return m.request(n).then((function(t){return u.resolve(t)}),(function(t){var i;switch(e.requestError=t,t.status){case 422:i=t.response.errors.map((function(t){return[t.detail,m("br",null)]})).reduce((function(t,e){return t.concat(e)}),[]).slice(0,-1);break;case 401:case 403:i=app.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:i=app.translator.trans("core.lib.error.not_found_message");break;case 429:i=app.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:i=app.translator.trans("core.lib.error.generic_message")}var o=app.forum.attribute("debug"),r=t.response&&Array.isArray(t.response.errors)&&t.response.errors.map((function(t){return decodeURI(t.detail)}));t.alert=new s.a({type:"error",children:i,controls:o&&[m(a.a,{className:"Button Button--link",onclick:e.showDebug.bind(e,t,r)},"Debug")]});try{n.errorHandler(t)}catch(t){if(o&&t.xhr){var c,l=t.options,d=l.method,p=l.url,h=t.xhr.status,f=void 0===h?"":h;console.group(d+" "+p+" "+f),(c=console).error.apply(c,r||[t]),console.groupEnd()}e.alerts.show(t.alert)}u.reject(t)})),u.promise},e.showDebug=function(t,e){this.alerts.dismiss(this.requestError.alert),this.modal.show(new l.a({error:t,formattedError:e}))},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t].path.replace(/:([^\/]+)/g,(function(t,n){return Object(f.a)(e,n)})),i=m.route.buildQueryString(e);return("pathname"===m.route.mode?app.forum.attribute("basePath"):"")+n+(i?"?"+i:"")},t}()},function(t,e,n){"use strict";function i(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t,e){var n=$(window),i=$(t).offset().top-n.scrollTop();e(),n.scrollTop($(t).offset().top-i)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";e.a={handlers:null,getHandlers:function(t){return this.handlers=this.handlers||{},this.handlers[t]=this.handlers[t]||[],this.handlers[t]},trigger:function(t){for(var e=this,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];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)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(4),o=n(0),r=n(13),s=n(2),a=n(6),u=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className+=" Dropdown--split",e.menuClassName+=" Dropdown-menu--right"};var n=e.prototype;return n.getButton=function(){var t=this.getFirstChild(),e=Object(i.a)({},t.props);return e.className=(e.className||"")+" SplitDropdown-button Button "+this.props.buttonClassName,[s.a.component(e),m("button",{className:"Dropdown-toggle Button Button--icon "+this.props.buttonClassName,"data-toggle":"dropdown"},Object(a.a)(this.props.icon,{className:"Button-icon"}),Object(a.a)("fas fa-caret-down",{className:"Button-caret"}))]},n.getFirstChild=function(){for(var t=this.props.children;t instanceof Array;)t=t[0];return t},e}(r.a)},function(t,e,n){"use strict";function i(t){return t>=1e6?Math.floor(t/1e6)+app.translator.trans("core.lib.number_suffix.mega_text"):t>=1e3?Math.floor(t/1e3)+app.translator.trans("core.lib.number_suffix.kilo_text"):t.toString()}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(6);function o(t){if(t.lastSeenAt()&&t.isOnline())return m("span",{className:"UserOnline"},Object(i.a)("fas fa-circle"))}},function(t,e,n){"use strict";function i(t){var e=moment(t),n=e.format(),i=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},i)}n.d(e,"a",(function(){return i}))},function(t,e){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(t){var i;!function(o,r){"use strict";var s=function t(e,n){y.version=function(){return"v0.2.8"};var i={}.hasOwnProperty,o={}.toString;function r(t){return"function"==typeof t}function s(t){return"[object Object]"===o.call(t)}function a(t){return"[object String]"===o.call(t)}var u=Array.isArray||function(t){return"[object Array]"===o.call(t)};function c(){}var l,d,p,h,f={AREA:1,BASE:1,BR:1,COL:1,COMMAND:1,EMBED:1,HR:1,IMG:1,INPUT:1,KEYGEN:1,LINK:1,META:1,PARAM:1,SOURCE:1,TRACK:1,WBR:1};function m(t,e){for(var n,i=[],o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g;n=o.exec(e);)if(""===n[1]&&n[2])t.tag=n[2];else if("#"===n[1])t.attrs.id=n[2];else if("."===n[1])i.push(n[2]);else if("["===n[3].charAt(0)){var r=n[6];r&&(r=r.replace(/\\(["'])/g,"$1")),"class"===n[4]?i.push(r):t.attrs[n[4]]=r||!0}return i}function g(t,e){var n=e?t.slice(1):t;return 1===n.length&&u(n[0])?n[0]:n}function v(t,e,n){var o="class"in e?"class":"className";for(var r in e)i.call(e,r)&&(r===o&&null!=e[r]&&""!==e[r]?(n.push(e[r]),t[r]=""):t[r]=e[r]);n.length&&(t[o]=n.join(" "))}function y(t,e){for(var n=[],i=1,o=arguments.length;i<o;i++)n[i-1]=arguments[i];if(t&&r(t.view))return rt(t,n);if(!a(t))throw new Error("selector in m(selector, attrs, children) should be a string");var u=null!=e&&s(e)&&!("tag"in e||"view"in e||"subtree"in e),c=u?e:{},l={tag:"div",attrs:{},children:g(n,u)};return v(l.attrs,c,m(l,t)),l}function b(t,e){for(var n=0;n<t.length&&!e(t[n],n++););}function w(t,e){b(t,(function(t,n){return(t=t&&t.attrs)&&null!=t.key&&e(t,n)}))}function x(t,e,n){t.insertBefore(e,t.childNodes[n]||null)}y.deps=function(t){return function(t){l=t.document,d=t.location,h=t.cancelAnimationFrame||t.clearTimeout,p=t.requestAnimationFrame||t.setTimeout}(e=t||window),e},y.deps.factory=y.factory=t,y.deps(e);function _(t,e,n,o){var r=t.length!==e.length;return r||w(t,(function(t,n){var i=e[n];return r=i&&i.attrs&&i.attrs.key!==t.key})),r?function(t,e,n,o){w(t,(function(t,i){e[t=t.key]=e[t]?{action:3,index:i,from:e[t].index,element:n.nodes[e[t].index]||l.createElement("div")}:{action:2,index:i}}));var r=[];for(var s in e)i.call(e,s)&&r.push(e[s]);var a=r.sort(I),u=new Array(n.length);return u.nodes=n.nodes.slice(),b(a,(function(e){var i=e.index;if(1===e.action&&(U(n[i].nodes,n[i]),u.splice(i,1)),2===e.action){var r=l.createElement("div");r.key=t[i].attrs.key,x(o,r,i),u.splice(i,0,{attrs:{key:t[i].attrs.key},nodes:[r]}),u.nodes[i]=r}if(3===e.action){var s=e.element,a=o.childNodes[i];a!==s&&null!==s&&o.insertBefore(s,a||null),u[i]=n[e.from],u.nodes[i]=s}})),u}(t,n,e,o):e}function N(t,e,n){(function(t,e,n){return t.tag!==e.tag||(n.sort().join()!==Object.keys(e.attrs).sort().join()||(t.attrs.id!==e.attrs.id||(t.attrs.key!==e.attrs.key||("all"===y.redraw.strategy()?!e.configContext||!0!==e.configContext.retain:"diff"===y.redraw.strategy()&&(e.configContext&&!1===e.configContext.retain)))))})(t,e,n)&&(e.nodes.length&&U(e.nodes),e.configContext&&r(e.configContext.onunload)&&e.configContext.onunload(),e.controllers&&b(e.controllers,(function(t){t.onunload&&t.onunload({preventDefault:c})})))}var k=0;function T(t,e,n,i,o,r){var s=e.nodes;return i&&i===l.activeElement&&t===e||(t.$trusted?(U(s,e),s=q(n,o,t)):"textarea"===r?n.value=t:i?(i.innerHTML=t,s=[].slice.call(i.childNodes)):((1===s[0].nodeType||s.length>1||s[0].nodeValue.trim&&!s[0].nodeValue.trim())&&(U(e.nodes,e),s=[l.createTextNode(t)]),function(t,e,n,i){try{x(t,e,n),e.nodeValue=i}catch(t){}}(n,s[0],o,t))),(e=new t.constructor(t)).nodes=s,e.$trusted=t.$trusted,e}function S(t,e,n,i,o,r,s){return t.nodes.length?t.valueOf()!==e.valueOf()||o?T(e,t,i,r,n,s):(t.nodes.intact=!0,t):function(t,e,n){var i,o;return t.$trusted?i=q(e,n,t):(i=[l.createTextNode(t)],e.nodeName in f||x(e,i[0],n)),(o="string"==typeof t||"number"==typeof t||"boolean"==typeof t?new t.constructor(t):t).nodes=i,o}(e,i,n)}function C(t){return t.$trusted?t.nodes.length:u(t)?t.length:1}function O(t,e,i,o,r,s,a,c,l){t=function(t){for(var e=0;e<t.length;e++)u(t[e])&&(t=t.concat.apply([],t),e--);return t}(t);var d=e.length===t.length,p=0,h={},f=!1;w(e,(function(t,n){f=!0,h[e[n].attrs.key]={action:1,index:n}})),function(t){var e=0;w(t,(function(){return b(t,(function(t){(t=t&&t.attrs)&&null==t.key&&(t.key="__mithril__"+e++)})),1}))}(t),f&&(e=_(t,e,h,i));for(var m=0,g=0,v=t.length;g<v;g++){var y=A(i,r,e,o,t[g],e[m],s,o+p||p,a,c,l);y!==n&&(d=d&&y.nodes.intact,p+=C(y),e[m++]=y)}return d||function(t,e,n){b(t,(function(t,i){null!=e[i]&&n.push.apply(n,e[i].nodes)})),b(e.nodes,(function(t,i){null!=t.parentNode&&n.indexOf(t)<0&&U([t],[e[i]])})),t.length<e.length&&(e.length=t.length),e.nodes=n}(t,e,[]),e}function D(t,e,n,i,o,r,s){var a={tag:t.tag,attrs:e,children:n,nodes:[i]};return function(t,e,n){n.length&&(t.views=e,t.controllers=n,b(n,(function(t){if(t.onunload&&t.onunload.$old&&(t.onunload=t.onunload.$old),k&&t.onunload){var e=t.onunload;t.onunload=function(){},t.onunload.$old=e}})))}(a,r,s),a.children&&!a.children.nodes&&(a.children.nodes=[]),a}y.startComputation=function(){k++},y.endComputation=function(){k>1?k--:(k=0,y.redraw())};var j=[];var P=!1;function E(t,e,n,i,o,s){var a=function(t,e,n,i){var o;return(o="diff"===y.redraw.strategy()&&t?t.indexOf(e):-1)>-1?n[o]:r(i)?new i:{}}(n.views,e,i,t.controller),u=t&&t.attrs&&t.attrs.key;return"retain"===(t=0===k||P||i&&i.indexOf(a)>-1?t.view(a):{tag:"placeholder"}).subtree||(t.attrs=t.attrs||{},t.attrs.key=u,function(t,e,n,i){null!=i.onunload&&j.map((function(t){return t.handler})).indexOf(i.onunload)<0&&j.push({controller:i,handler:i.onunload}),t.push(n),e.push(i)}(s,o,e,a)),t}function M(t,e,i,o,s,u,c,d){var p=[],h=[];if("retain"===(t=function(t,e,n,i){for(var o=e&&e.controllers;null!=t.view;)t=E(t,t.view.$original||t.view,e,o,i,n);return t}(t,e,p,h)).subtree)return e;if(!t.tag&&h.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");t.attrs=t.attrs||{},e.attrs=e.attrs||{};var f=Object.keys(t.attrs),m=f.length>("key"in t.attrs?1:0);if(N(t,e,f),a(t.tag)){var g,v=0===e.nodes.length;if(c=function(t,e){return t.attrs.xmlns?t.attrs.xmlns:"svg"===t.tag?"http://www.w3.org/2000/svg":"math"===t.tag?"http://www.w3.org/1998/Math/MathML":e}(t,c),v){var y=function(t,e,n,i){return i?B(e,t.tag,t.attrs,{},n):t.attrs}(t,g=function(t,e){return t.attrs.is?null==e?l.createElement(t.tag,t.attrs.is):l.createElementNS(e,t.tag,t.attrs.is):null==e?l.createElement(t.tag):l.createElementNS(e,t.tag)}(t,c),c,m);x(o,g,s),e=D(t,y,function(t,e,i,o,r,s){return null!=t.children&&t.children.length>0?A(e,t.tag,n,n,t.children,i.children,!0,0,t.attrs.contenteditable?e:o,r,s):t.children}(t,g,e,i,c,d),g,0,p,h)}else g=function(t,e,i,o,r,s,a,u){var c=t.nodes[0];return o&&B(c,e.tag,e.attrs,t.attrs,r),t.children=A(c,e.tag,n,n,e.children,t.children,!1,0,e.attrs.contenteditable?c:i,r,a),t.nodes.intact=!0,u.length&&(t.views=s,t.controllers=u),c}(e,t,i,m,c,p,d,h);return"select"===t.tag&&"value"in t.attrs&&B(g,t.tag,{value:t.attrs.value},{},c),v||!0!==u||null==g||x(o,g,s),function(t,e,n,i,o){if(r(e.attrs.config)){var s=o.configContext=o.configContext||{};t.push((function(){return e.attrs.config.call(e,n,!i,s,o)}))}}(d,t,g,v,e),e}}function A(t,e,n,i,a,c,l,d,p,h,f){return"retain"===(a=function(t){try{if("boolean"!=typeof t&&null!=t&&null!=t.toString())return t}catch(t){}return""}(a)).subtree?c:(c=function(t,e,n,i,r){if(null!=e){if(o.call(e)===o.call(t))return e;if(r&&r.nodes){var s=n-i,a=s+(u(t)?t:e.nodes).length;U(r.nodes.slice(s,a),r.slice(s,a))}else e.nodes&&U(e.nodes,e)}return(e=new t.constructor).tag&&(e={}),e.nodes=[],e}(a,c,d,i,n),u(a)?O(a,c,t,d,e,l,p,h,f):null!=a&&s(a)?M(a,c,p,t,d,l,h,f):r(a)?c:S(c,a,d,t,l,p,e))}function I(t,e){return t.action-e.action||t.index-e.index}var $,R={list:1,style:1,form:1,type:1,width:1,height:1};function L(t,e,n,o,a,u){if("config"===e||"key"===e)return!0;if(r(n)&&"on"===e.slice(0,2))t[e]=(c=n,l=t,function(t){t=t||event,y.redraw.strategy("diff"),y.startComputation();try{return c.call(l,t)}finally{ct()}});else if("style"===e&&null!=n&&s(n))!function(t,e,n){for(var o in n===e&&(t.style="",n={}),e)i.call(e,o)&&(null!=n&&n[o]===e[o]||(t.style[o]=e[o]));for(o in n)i.call(n,o)&&(i.call(e,o)||(t.style[o]=""))}(t,n,o);else if(null!=u)"href"===e?t.setAttributeNS("http://www.w3.org/1999/xlink","href",n):t.setAttribute("className"===e?"class":e,n);else if(e in t&&!R[e])try{("input"!==a&&!t.isContentEditable||t[e]!=n)&&(t[e]=n)}catch(i){t.setAttribute(e,n)}else try{t.setAttribute(e,n)}catch(t){}var c,l}function H(t,e,n,i,o,r,s){if(e in o&&i===n&&"object"!=typeof n&&l.activeElement!==t)"value"===e&&"input"===r&&t.value!=n&&(t.value=n);else{o[e]=n;try{return L(t,e,n,i,r,s)}catch(t){if(t.message.indexOf("Invalid argument")<0)throw t}}}function B(t,e,n,o,r){for(var s in n)!i.call(n,s)||H(t,s,n[s],o[s],o,e,r);return o}function U(t,e){for(var n=t.length-1;n>-1;n--)if(t[n]&&t[n].parentNode){try{t[n].parentNode.removeChild(t[n])}catch(t){}(e=[].concat(e))[n]&&F(e[n])}t.length&&(t.length=0)}function F(t){t.configContext&&r(t.configContext.onunload)&&(t.configContext.onunload(),t.configContext.onunload=null),t.controllers&&b(t.controllers,(function(t){r(t.onunload)&&t.onunload({preventDefault:c})})),t.children&&(u(t.children)?b(t.children,F):t.children.tag&&F(t.children))}function Y(t,e){try{t.appendChild(l.createRange().createContextualFragment(e))}catch(n){t.insertAdjacentHTML("beforeend",e),function t(e){if("SCRIPT"===e.tagName)e.parentNode.replaceChild(function(t){for(var e=document.createElement("script"),n=t.attributes,i=0;i<n.length;i++)e.setAttribute(n[i].name,n[i].value);return e.text=t.innerHTML,e}(e),e);else{var n=e.childNodes;if(n&&n.length)for(var i=0;i<n.length;i++)t(n[i])}return e}(t)}}function q(t,e,n){var i=t.childNodes[e];if(i){var o=1!==i.nodeType,r=l.createElement("span");o?(t.insertBefore(r,i||null),r.insertAdjacentHTML("beforebegin",n),t.removeChild(r)):i.insertAdjacentHTML("beforebegin",n)}else Y(t,n);for(var s=[];t.childNodes[e]!==i;)s.push(t.childNodes[e]),e++;return s}var W={appendChild:function(t){$===n&&($=l.createElement("html")),l.documentElement&&l.documentElement!==t?l.replaceChild(t,l.documentElement):l.appendChild(t),this.childNodes=l.childNodes},insertBefore:function(t){this.appendChild(t)},childNodes:[]},z=[],V={};function G(t){var e=z.indexOf(t);return e<0?z.push(t)-1:e}y.render=function(t,e,i){if(!t)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o,r=[],s=G(t),a=t===l;o=a||t===l.documentElement?W:t,a&&"html"!==e.tag&&(e={tag:"html",attrs:{},children:e}),V[s]===n&&U(o.childNodes),!0===i&&wt(t),V[s]=A(o,null,n,n,e,V[s],!1,0,null,n,r),b(r,(function(t){t()}))},y.trust=function(t){return(t=new String(t)).$trusted=!0,t},y.prop=function(t){return(null!=t&&(s(t)||r(t))||"undefined"!=typeof Promise&&t instanceof Promise)&&r(t.then)?xt(t):function(t){function e(){return arguments.length&&(t=arguments[0]),t}return e.toJSON=function(){return t&&r(t.toJSON)?t.toJSON():t},e}(t)};var Z,K,X,J=[],Q=[],tt=[],et=null,nt=0,it=null,ot=null;function rt(t,e){function n(){return(t.controller||c).apply(this,e)||this}function i(n){for(var i=[n].concat(e),o=1;o<arguments.length;o++)i.push(arguments[o]);return t.view.apply(t,i)}t.controller&&(n.prototype=t.controller.prototype),i.$original=t.view;var o={controller:n,view:i};return e[0]&&null!=e[0].key&&(o.attrs={key:e[0].key}),o}function st(t,e){J.splice(e,1),tt.splice(e,1),Q.splice(e,1),wt(t),z.splice(G(t),1),j=[]}y.component=function(t){for(var e=new Array(arguments.length-1),n=1;n<arguments.length;n++)e[n-1]=arguments[n];return rt(t,e)},y.mount=y.module=function(t,e){if(!t)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var n=J.indexOf(t);n<0&&(n=J.length);var i=!1,o={preventDefault:function(){i=!0,it=ot=null}};return b(j,(function(t){t.handler.call(t.controller,o),t.controller.onunload=null})),i?b(j,(function(t){t.controller.onunload=t.handler})):j=[],tt[n]&&r(tt[n].onunload)&&tt[n].onunload(o),function(t,e,n,i){if(!i){var o;y.redraw.strategy("all"),y.startComputation(),J[n]=e,o=Z=t||(t={controller:c});var r=new(t.controller||c);return o===Z&&(tt[n]=r,Q[n]=t),ct(),null===t&&st(e,n),tt[n]}null==t&&st(e,n),X&&(K=X)}(e,t,n,i)};var at=!1;function ut(){it&&(it(),it=null),b(J,(function(t,e){var n=Q[e];if(tt[e]){var i=[tt[e]];y.render(t,n.view?n.view(tt[e],i):"")}})),ot&&(ot(),ot=null),et=null,nt=new Date,y.redraw.strategy("diff")}function ct(){"none"===y.redraw.strategy()?(k--,y.redraw.strategy("diff")):y.endComputation()}y.redraw=function(t){if(!at){at=!0,t&&(P=!0);try{et&&!t?(p===e.requestAnimationFrame||new Date-nt>16)&&(et>0&&h(et),et=p(ut,16)):(ut(),et=p((function(){et=null}),16))}finally{at=P=!1}}},y.redraw.strategy=y.prop(),y.withAttr=function(t,e,n){return function(i){var o=(i=i||window.event).currentTarget||this,r=n||this,s=t in o?o[t]:o.getAttribute(t);e.call(r,s)}};var lt,dt={pathname:"",hash:"#",search:"?"},pt=c,ht=!1;function ft(t){return t.slice(dt[y.route.mode].length)}function mt(t,e,n){lt={};var o=n.indexOf("?");-1!==o&&(lt=bt(n.substr(o+1,n.length)),n=n.substr(0,o));var r=Object.keys(e),s=r.indexOf(n);if(-1!==s)return y.mount(t,e[r[s]]),!0;for(var a in e)if(i.call(e,a)){if(a===n)return y.mount(t,e[a]),!0;var u=new RegExp("^"+a.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(u.test(n))return n.replace(u,(function(){var n=a.match(/:[^\/]+/g)||[],i=[].slice.call(arguments,1,-2);b(n,(function(t,e){lt[t.replace(/:|\./g,"")]=decodeURIComponent(i[e])})),y.mount(t,e[a])})),!0}}function gt(t){if(!((t=t||event).ctrlKey||t.metaKey||t.shiftKey||2===t.which)){t.preventDefault?t.preventDefault():t.returnValue=!1;var e,n=t.currentTarget||t.srcElement;for(e="pathname"===y.route.mode&&n.search?bt(n.search.slice(1)):{};n&&!/a/i.test(n.nodeName);)n=n.parentNode;k=0,y.route(n[y.route.mode].slice(dt[y.route.mode].length),e)}}function vt(){"hash"!==y.route.mode&&d.hash?d.hash=d.hash:e.scrollTo(0,0)}function yt(t,e){var o={},r=[];for(var a in t)if(i.call(t,a)){var c=e?e+"["+a+"]":a,l=t[a];if(null===l)r.push(encodeURIComponent(c));else if(s(l))r.push(yt(l,c));else if(u(l)){var d=[];o[c]=o[c]||{},b(l,(function(t){o[c][t]||(o[c][t]=!0,d.push(encodeURIComponent(c)+"="+encodeURIComponent(t)))})),r.push(d.join("&"))}else l!==n&&r.push(encodeURIComponent(c)+"="+encodeURIComponent(l))}return r.join("&")}function bt(t){if(""===t||null==t)return{};"?"===t.charAt(0)&&(t=t.slice(1));var e=t.split("&"),n={};return b(e,(function(t){var e=t.split("="),i=decodeURIComponent(e[0]),o=2===e.length?decodeURIComponent(e[1]):null;null!=n[i]?(u(n[i])||(n[i]=[n[i]]),n[i].push(o)):n[i]=o})),n}function wt(t){var e=G(t);U(t.childNodes,V[e]),V[e]=n}function xt(t,e){var n=y.prop(e);return t.then(n),n.then=function(n,i){return xt(t.then(n,i),e)},n.catch=n.then.bind(null,null),n}y.route=function(t,n,o,r){if(0===arguments.length)return K;if(3===arguments.length&&a(n)){pt=function(e){var i=K=ft(e);if(!mt(t,o,i)){if(ht)throw new Error("Ensure the default route matches one of the routes defined in m.route");ht=!0,y.route(n,!0),ht=!1}};var s="hash"===y.route.mode?"onhashchange":"onpopstate";return e[s]=function(){var t=d[y.route.mode];"pathname"===y.route.mode&&(t+=d.search),K!==ft(t)&&pt(t)},it=vt,void e[s]()}if(t.addEventListener||t.attachEvent){var u="pathname"!==y.route.mode?d.pathname:"";return t.href=u+dt[y.route.mode]+r.attrs.href,void(t.addEventListener?(t.removeEventListener("click",gt),t.addEventListener("click",gt)):(t.detachEvent("onclick",gt),t.attachEvent("onclick",gt)))}if(a(t)){X=K;var c,p=n||{},h=(K=t).indexOf("?");for(var f in c=h>-1?bt(K.slice(h+1)):{},p)i.call(p,f)&&(c[f]=p[f]);var m,g=yt(c);m=h>-1?K.slice(0,h):K,g&&(K=m+(-1===m.indexOf("?")?"?":"&")+g);var v=!0===(3===arguments.length?o:n)||X===K;if(e.history.pushState){var b=v?"replaceState":"pushState";it=vt,ot=function(){try{e.history[b](null,l.title,dt[y.route.mode]+K)}catch(t){d[y.route.mode]=K}},pt(dt[y.route.mode]+K)}else d[y.route.mode]=K,pt(dt[y.route.mode]+K);X=null}},y.route.param=function(t){if(!lt)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return t?lt[t]:lt},y.route.mode="search",y.route.buildQueryString=yt,y.route.parseQueryString=bt,y.deferred=function(){var t=new _t;return t.promise=xt(t.promise),t};function _t(t,e){var n=this,i=0,o=0,a=[];function u(t){i=t||4,a.map((function(t){3===i?t.resolve(o):t.reject(o)}))}function c(t,e,n,i){if((null!=o&&s(o)||r(o))&&r(t))try{var a=0;t.call(o,(function(t){a++||(o=t,e())}),(function(t){a++||(o=t,n())}))}catch(t){y.deferred.onerror(t),o=t,n()}else i()}function l(){var s;try{s=o&&o.then}catch(t){return y.deferred.onerror(t),o=t,i=2,l()}2===i&&y.deferred.onerror(o),c(s,(function(){i=1,l()}),(function(){i=2,l()}),(function(){try{1===i&&r(t)?o=t(o):2===i&&r(e)&&(o=e(o),i=1)}catch(t){return y.deferred.onerror(t),o=t,u()}o===n?(o=TypeError(),u()):c(s,(function(){u(3)}),u,(function(){u(1===i&&3)}))}))}n.promise={},n.resolve=function(t){return i||(o=t,i=1,l()),n},n.reject=function(t){return i||(o=t,i=2,l()),n},n.promise.then=function(t,e){var n=new _t(t,e);return 3===i?n.resolve(o):4===i?n.reject(o):a.push(n),n.promise}}function Nt(t){return t}return y.deferred.onerror=function(t){if("[object Error]"===o.call(t)&&!/ Error/.test(t.constructor.toString()))throw k=0,t},y.sync=function(t){var e=y.deferred(),n=t.length,i=[],o="resolve";function r(t,r){return function(s){return i[t]=s,r||(o="reject"),0==--n&&(e.promise(i),e[o](i)),s}}return t.length>0?b(t,(function(t,e){t.then(r(e,!0),r(e,!1))})):e.resolve([]),e.promise},y.request=function(t){!0!==t.background&&y.startComputation();var o,c,d,p=new _t;return t.dataType&&"jsonp"===t.dataType.toLowerCase()?(o=t.serialize=c=t.deserialize=Nt,d=function(t){return t.responseText}):(o=t.serialize=t.serialize||JSON.stringify,c=t.deserialize=t.deserialize||JSON.parse,d=t.extract||function(t){return t.responseText.length||c!==JSON.parse?t.responseText:null}),t.method=(t.method||"GET").toUpperCase(),t.url=function(t,e){e&&(t=t.replace(/:[a-z]\w+/gi,(function(t){var n=t.slice(1),i=e[n]||t;return delete e[n],i})));return t}(t.url,t.data),function(t,e,n){if("GET"===t.method&&"jsonp"!==t.dataType){var i=t.url.indexOf("?")<0?"?":"&",o=yt(e);t.url+=o?i+o:""}else t.data=n(e)}(t,t.data,o),t.onload=t.onerror=function(e){try{e=e||event;var n=c(d(e.target,t));"load"===e.type?(t.unwrapSuccess&&(n=t.unwrapSuccess(n,e.target)),u(n)&&t.type?b(n,(function(e,i){n[i]=new t.type(e)})):t.type&&(n=new t.type(n)),p.resolve(n)):(t.unwrapError&&(n=t.unwrapError(n,e.target)),p.reject(n))}catch(t){p.reject(t),y.deferred.onerror(t)}finally{!0!==t.background&&y.endComputation()}},function(t){t.dataType&&"jsonp"===t.dataType.toLowerCase()?function(t){var i=t.callbackName||"mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),o=l.createElement("script");e[i]=function(r){o.parentNode.removeChild(o),t.onload({type:"load",target:{responseText:r}}),e[i]=n},o.onerror=function(){return o.parentNode.removeChild(o),t.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),e[i]=n,!1},o.onload=function(){return!1},o.src=t.url+(t.url.indexOf("?")>0?"&":"?")+(t.callbackKey?t.callbackKey:"callback")+"="+i+"&"+yt(t.data||{}),l.body.appendChild(o)}(t):function(t){var n=new e.XMLHttpRequest;n.open(t.method,t.url,!0,t.user,t.password),n.onreadystatechange=function(){4===n.readyState&&(n.status>=200&&n.status<300?t.onload({type:"load",target:n}):t.onerror({type:"error",target:n}))},t.serialize===JSON.stringify&&t.data&&"GET"!==t.method&&n.setRequestHeader("Content-Type","application/json; charset=utf-8");t.deserialize===JSON.parse&&n.setRequestHeader("Accept","application/json, text/*");if(s(t.headers))for(var o in t.headers)i.call(t.headers,o)&&n.setRequestHeader(o,t.headers[o]);if(r(t.config)){var u=t.config(n,t);null!=u&&(n=u)}var c="GET"!==t.method&&t.data?t.data:"";if(c&&!a(c)&&c.constructor!==e.FormData)throw new Error("Request data should be either be a string or FormData. Check the `serialize` option in `m.request`");n.send(c)}(t)}(t),p.promise=xt(p.promise,t.initialValue),p.promise},y}(o);"undefined"==typeof window&&s.deps({document:"undefined"!=typeof document?document:{},location:"undefined"!=typeof location?location:{},clearTimeout:clearTimeout,setTimeout:setTimeout}),null!=t&&t.exports?t.exports=s:void 0===(i=function(){return s}.call(e,n,e,t))||(t.exports=i)}("undefined"!=typeof window?window:this)}).call(this,n(67)(t))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i={};n.r(i),n.d(i,"Model",(function(){return s})),n.d(i,"PostTypes",(function(){return u})),n.d(i,"Routes",(function(){return c}));n(72),n(75),n(76),n(78),n(80),n(81),n(82),n(83),n(84),n(85);var o=n(44),r=n(8),s=function(){function t(t,e){void 0===e&&(e=null),Object(r.a)(this,"type",void 0),Object(r.a)(this,"attributes",[]),Object(r.a)(this,"hasOnes",[]),Object(r.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}(),a=n(4),u=function(){function t(){Object(r.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(a.a)(t.postComponents,this.postComponents)},t}(),c=function(){function t(){Object(r.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(a.a)(t.routes,this.routes)},t}();Object(o.a)(window)},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(this,n(26))},function(t,e,n){"use strict";var i=n(34),o=n(52),r=n(51),s=n(62),a=n(55),u=n(5),c=n(4),l=n(0);var d=n(23),p=n(18),h=n(53),f=n(61),m=n(40),g=n(64),v=n(28),y=n(36),b=n(10),w=n(33),x=n(50),_=n(44),N=n(25),k=n(9),T=n(60),S=n(54),C=n(58),O=n(35),D=n(57),j=n(38),P=n(11),E=n(56),M=n(3),A=n(49),I=n(47),$=n(19),R=n(32),L=n(24),H=n(14),B=n(45),U=n(22),F=n(13),Y=n(63),q=n(48),W=n(21),z=n(42),V=n(41),G=n(16),Z=n(20),K=n(39),X=n(29),J=n(46),Q=n(2),tt=n(12),et=n(30),nt=n(1),it=n(59),ot=n(66),rt=n(15),st=n(6),at=n(37);var ut=n(31),ct=n(17),lt=n(65),dt=n(7);e.a={extend:i,Session:o.a,Store:r.a,"utils/evented":s.a,"utils/liveHumanTimes":a.a,"utils/ItemList":u.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),o=1;o<n;o++)i[o-1]=arguments[o];return i.forEach((function(t){Object(c.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":g.a,"utils/string":v,"utils/SubtreeRetainer":y.a,"utils/extract":b.a,"utils/ScrollListener":w.a,"utils/stringToColor":x.a,"utils/patchMithril":_.a,"utils/classList":N.a,"utils/extractText":k.a,"utils/formatNumber":T.a,"utils/mapRoutes":S.a,"models/Notification":C.a,"models/User":O.a,"models/Post":D.a,"models/Discussion":j.a,"models/Group":P.a,"models/Forum":E.a,Component:M.a,Translator:A.a,"components/AlertManager":I.a,"components/Page":$.a,"components/Switch":R.a,"components/Badge":L.a,"components/LoadingIndicator":H.a,"components/Placeholder":B.a,"components/Separator":U.a,"components/Dropdown":F.a,"components/SplitDropdown":Y.a,"components/RequestErrorModal":q.a,"components/FieldSet":W.a,"components/Select":z.a,"components/Navigation":V.a,"components/Alert":G.a,"components/LinkButton":Z.a,"components/Checkbox":K.a,"components/SelectDropdown":X.a,"components/ModalManager":J.a,"components/Button":Q.a,"components/Modal":tt.a,"components/GroupBadge":et.a,Model:nt.a,Application:it.a,"helpers/fullTime":ot.a,"helpers/avatar":rt.a,"helpers/icon":st.a,"helpers/humanTime":at.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":ut.a,"helpers/username":ct.a,"helpers/userOnline":lt.a,"helpers/listItems":dt.a}},function(t,e,n){(function(e){t.exports=e.$=n(73)}).call(this,n(26))},function(t,e,n){(function(e){t.exports=e.jQuery=n(74)}).call(this,n(26))},function(t,e,n){var i;
|
||
/*!
|
||
* jQuery JavaScript Library v3.4.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: 2019-05-01T21:04Z
|
||
*/!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,o){"use strict";var r=[],s=n.document,a=Object.getPrototypeOf,u=r.slice,c=r.concat,l=r.push,d=r.indexOf,p={},h=p.toString,f=p.hasOwnProperty,m=f.toString,g=m.call(Object),v={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},b=function(t){return null!=t&&t===t.window},w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var i,o,r=(n=n||s).createElement("script");if(r.text=t,e)for(i in w)(o=e[i]||e.getAttribute&&e.getAttribute(i))&&r.setAttribute(i,o);n.head.appendChild(r).parentNode.removeChild(r)}function _(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?p[h.call(t)]||"object":typeof t}var N=function(t,e){return new N.fn.init(t,e)},k=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function T(t){var e=!!t&&"length"in t&&t.length,n=_(t);return!y(t)&&!b(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}N.fn=N.prototype={jquery:"3.4.1",constructor:N,length:0,toArray:function(){return u.call(this)},get:function(t){return null==t?u.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=N.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return N.each(this,t)},map:function(t){return this.pushStack(N.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},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:l,sort:r.sort,splice:r.splice},N.extend=N.fn.extend=function(){var t,e,n,i,o,r,s=arguments[0]||{},a=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||y(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(t=arguments[a]))for(e in t)i=t[e],"__proto__"!==e&&s!==i&&(c&&i&&(N.isPlainObject(i)||(o=Array.isArray(i)))?(n=s[e],r=o&&!Array.isArray(n)?[]:o||N.isPlainObject(n)?n:{},o=!1,s[e]=N.extend(c,r,i)):void 0!==i&&(s[e]=i));return s},N.extend({expando:"jQuery"+("3.4.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]"!==h.call(t))&&(!(e=a(t))||"function"==typeof(n=f.call(e,"constructor")&&e.constructor)&&m.call(n)===g)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e){x(t,{nonce:e&&e.nonce})},each:function(t,e){var n,i=0;if(T(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},trim:function(t){return null==t?"":(t+"").replace(k,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(T(Object(t))?N.merge(n,"string"==typeof t?[t]:t):l.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:d.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,o=t.length;i<n;i++)t[o++]=e[i];return t.length=o,t},grep:function(t,e,n){for(var i=[],o=0,r=t.length,s=!n;o<r;o++)!e(t[o],o)!==s&&i.push(t[o]);return i},map:function(t,e,n){var i,o,r=0,s=[];if(T(t))for(i=t.length;r<i;r++)null!=(o=e(t[r],r,n))&&s.push(o);else for(r in t)null!=(o=e(t[r],r,n))&&s.push(o);return c.apply([],s)},guid:1,support:v}),"function"==typeof Symbol&&(N.fn[Symbol.iterator]=r[Symbol.iterator]),N.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){p["[object "+e+"]"]=e.toLowerCase()}));var S=
|
||
/*!
|
||
* Sizzle CSS Selector Engine v2.3.4
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright JS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://js.foundation/
|
||
*
|
||
* Date: 2019-04-08
|
||
*/
|
||
function(t){var e,n,i,o,r,s,a,u,c,l,d,p,h,f,m,g,v,y,b,w="sizzle"+1*new Date,x=t.document,_=0,N=0,k=ut(),T=ut(),S=ut(),C=ut(),O=function(t,e){return t===e&&(d=!0),0},D={}.hasOwnProperty,j=[],P=j.pop,E=j.push,M=j.push,A=j.slice,I=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},$="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",H="\\["+R+"*("+L+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+R+"*\\]",B=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",U=new RegExp(R+"+","g"),F=new RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g"),Y=new RegExp("^"+R+"*,"+R+"*"),q=new RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),W=new RegExp(R+"|>"),z=new RegExp(B),V=new RegExp("^"+L+"$"),G={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+$+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},Z=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\([\\da-f]{1,6}"+R+"?|("+R+")|.)","ig"),nt=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ot=function(t,e){return e?"\0"===t?"<22>":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},rt=function(){p()},st=wt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{M.apply(j=A.call(x.childNodes),x.childNodes),j[x.childNodes.length].nodeType}catch(t){M={apply:j.length?function(t,e){E.apply(t,A.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,o){var r,a,c,l,d,f,v,y=e&&e.ownerDocument,_=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==_&&9!==_&&11!==_)return i;if(!o&&((e?e.ownerDocument||e:x)!==h&&p(e),e=e||h,m)){if(11!==_&&(d=Q.exec(t)))if(r=d[1]){if(9===_){if(!(c=e.getElementById(r)))return i;if(c.id===r)return i.push(c),i}else if(y&&(c=y.getElementById(r))&&b(e,c)&&c.id===r)return i.push(c),i}else{if(d[2])return M.apply(i,e.getElementsByTagName(t)),i;if((r=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return M.apply(i,e.getElementsByClassName(r)),i}if(n.qsa&&!C[t+" "]&&(!g||!g.test(t))&&(1!==_||"object"!==e.nodeName.toLowerCase())){if(v=t,y=e,1===_&&W.test(t)){for((l=e.getAttribute("id"))?l=l.replace(it,ot):e.setAttribute("id",l=w),a=(f=s(t)).length;a--;)f[a]="#"+l+" "+bt(f[a]);v=f.join(","),y=tt.test(t)&&vt(e.parentNode)||e}try{return M.apply(i,y.querySelectorAll(v)),i}catch(e){C(t,!0)}finally{l===w&&e.removeAttribute("id")}}}return u(t.replace(F,"$1"),e,i,o)}function ut(){var t=[];return function e(n,o){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=o}}function ct(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("|"),o=n.length;o--;)i.attrHandle[n[o]]=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 gt(t){return ct((function(e){return e=+e,ct((function(n,i){for(var o,r=t([],n.length,e),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))}))}))}function vt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=at.support={},r=at.isXML=function(t){var e=t.namespaceURI,n=(t.ownerDocument||t).documentElement;return!Z.test(e||n&&n.nodeName||"HTML")},p=at.setDocument=function(t){var e,o,s=t?t.ownerDocument||t:x;return s!==h&&9===s.nodeType&&s.documentElement?(f=(h=s).documentElement,m=!r(h),x!==h&&(o=h.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",rt,!1):o.attachEvent&&o.attachEvent("onunload",rt)),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=J.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,o,r=e.getElementById(t);if(r){if((n=r.getAttributeNode("id"))&&n.value===t)return[r];for(o=e.getElementsByName(t),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===t)return[r]}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=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},v=[],g=[],(n.qsa=J.test(h.querySelectorAll))&&(lt((function(t){f.appendChild(t).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+R+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\["+R+"*(?:value|"+$+")"),t.querySelectorAll("[id~="+w+"-]").length||g.push("~="),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||g.push(".#.+[+~]")})),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&&g.push("name"+R+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=J.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&<((function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),v.push("!=",B)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),e=J.test(f.compareDocumentPosition),b=e||J.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},O=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&&b(x,t)?-1:e===h||e.ownerDocument===x&&b(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,o=t.parentNode,r=e.parentNode,s=[t],a=[e];if(!o||!r)return t===h?-1:e===h?1:o?-1:r?1:l?I(l,t)-I(l,e):0;if(o===r)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((t.ownerDocument||t)!==h&&p(t),n.matchesSelector&&m&&!C[e+" "]&&(!v||!v.test(e))&&(!g||!g.test(e)))try{var i=y.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){C(e,!0)}return at(e,h,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!==h&&p(t),b(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!==h&&p(t);var o=i.attrHandle[e.toLowerCase()],r=o&&D.call(i.attrHandle,e.toLowerCase())?o(t,e,!m):void 0;return void 0!==r?r:n.attributes||!m?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},at.escape=function(t){return(t+"").replace(it,ot)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,i=[],o=0,r=0;if(d=!n.detectDuplicates,l=!n.sortStable&&t.slice(0),t.sort(O),d){for(;e=t[r++];)e===t[r]&&(o=i.push(r));for(;o--;)t.splice(i[o],1)}return l=null,t},o=at.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=o(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=o(e);return n},(i=at.selectors={cacheLength:50,createPseudo:ct,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return G.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&z.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=k[t+" "];return e||(e=new RegExp("(^|"+R+")"+t+"("+R+"|$)"))&&k(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 o=at.attr(i,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o.replace(U," ")+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,o){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,u){var c,l,d,p,h,f,m=r!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!u&&!a,b=!1;if(g){if(r){for(;m;){for(p=e;p=p[m];)if(a?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&y){for(b=(h=(c=(l=(d=(p=g)[w]||(p[w]={}))[p.uniqueID]||(d[p.uniqueID]={}))[t]||[])[0]===_&&c[1])&&c[2],p=h&&g.childNodes[h];p=++h&&p&&p[m]||(b=h=0)||f.pop();)if(1===p.nodeType&&++b&&p===e){l[t]=[_,h,b];break}}else if(y&&(b=h=(c=(l=(d=(p=e)[w]||(p[w]={}))[p.uniqueID]||(d[p.uniqueID]={}))[t]||[])[0]===_&&c[1]),!1===b)for(;(p=++h&&p&&p[m]||(b=h=0)||f.pop())&&((a?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++b||(y&&((l=(d=p[w]||(p[w]={}))[p.uniqueID]||(d[p.uniqueID]={}))[t]=[_,b]),p!==e)););return(b-=o)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,e){var n,o=i.pseudos[t]||i.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return o[w]?o(e):o.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?ct((function(t,n){for(var i,r=o(t,e),s=r.length;s--;)t[i=I(t,r[s])]=!(n[i]=r[s])})):function(t){return o(t,0,n)}):o}},pseudos:{not:ct((function(t){var e=[],n=[],i=a(t.replace(F,"$1"));return i[w]?ct((function(t,e,n,o){for(var r,s=i(t,null,o,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))})):function(t,o,r){return e[0]=t,i(e,null,r,n),e[0]=null,!n.pop()}})),has:ct((function(t){return function(e){return at(t,e).length>0}})),contains:ct((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||o(e)).indexOf(t)>-1}})),lang:ct((function(t){return V.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 X.test(t.nodeName)},input:function(t){return K.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:gt((function(){return[0]})),last:gt((function(t,e){return[e-1]})),eq:gt((function(t,e,n){return[n<0?n+e:n]})),even:gt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:gt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:gt((function(t,e,n){for(var i=n<0?n+e:n>e?e:n;--i>=0;)t.push(i);return t})),gt:gt((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 yt(){}function bt(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,o=e.next,r=o||i,s=n&&"parentNode"===r,a=N++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||s)return t(e,n,o);return!1}:function(e,n,u){var c,l,d,p=[_,a];if(u){for(;e=e[i];)if((1===e.nodeType||s)&&t(e,n,u))return!0}else for(;e=e[i];)if(1===e.nodeType||s)if(l=(d=e[w]||(e[w]={}))[e.uniqueID]||(d[e.uniqueID]={}),o&&o===e.nodeName.toLowerCase())e=e[i]||e;else{if((c=l[r])&&c[0]===_&&c[1]===a)return p[2]=c[2];if(l[r]=p,p[2]=t(e,n,u))return!0}return!1}}function xt(t){return t.length>1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function _t(t,e,n,i,o){for(var r,s=[],a=0,u=t.length,c=null!=e;a<u;a++)(r=t[a])&&(n&&!n(r,i,o)||(s.push(r),c&&e.push(a)));return s}function Nt(t,e,n,i,o,r){return i&&!i[w]&&(i=Nt(i)),o&&!o[w]&&(o=Nt(o,r)),ct((function(r,s,a,u){var c,l,d,p=[],h=[],f=s.length,m=r||function(t,e,n){for(var i=0,o=e.length;i<o;i++)at(t,e[i],n);return n}(e||"*",a.nodeType?[a]:a,[]),g=!t||!r&&e?m:_t(m,p,t,a,u),v=n?o||(r?t:f||i)?[]:s:g;if(n&&n(g,v,a,u),i)for(c=_t(v,h),i(c,[],a,u),l=c.length;l--;)(d=c[l])&&(v[h[l]]=!(g[h[l]]=d));if(r){if(o||t){if(o){for(c=[],l=v.length;l--;)(d=v[l])&&c.push(g[l]=d);o(null,v=[],c,u)}for(l=v.length;l--;)(d=v[l])&&(c=o?I(r,d):p[l])>-1&&(r[c]=!(s[c]=d))}}else v=_t(v===s?v.splice(f,v.length):v),o?o(null,s,v,u):M.apply(s,v)}))}function kt(t){for(var e,n,o,r=t.length,s=i.relative[t[0].type],a=s||i.relative[" "],u=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 o=!s&&(i||n!==c)||((e=n).nodeType?l(t,n,i):d(t,n,i));return e=null,o}];u<r;u++)if(n=i.relative[t[u].type])p=[wt(xt(p),n)];else{if((n=i.filter[t[u].type].apply(null,t[u].matches))[w]){for(o=++u;o<r&&!i.relative[t[o].type];o++);return Nt(u>1&&xt(p),u>1&&bt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(F,"$1"),n,u<o&&kt(t.slice(u,o)),o<r&&kt(t=t.slice(o)),o<r&&bt(t))}p.push(n)}return xt(p)}return yt.prototype=i.filters=i.pseudos,i.setFilters=new yt,s=at.tokenize=function(t,e){var n,o,r,s,a,u,c,l=T[t+" "];if(l)return e?0:l.slice(0);for(a=t,u=[],c=i.preFilter;a;){for(s in n&&!(o=Y.exec(a))||(o&&(a=a.slice(o[0].length)||a),u.push(r=[])),n=!1,(o=q.exec(a))&&(n=o.shift(),r.push({value:n,type:o[0].replace(F," ")}),a=a.slice(n.length)),i.filter)!(o=G[s].exec(a))||c[s]&&!(o=c[s](o))||(n=o.shift(),r.push({value:n,type:s,matches:o}),a=a.slice(n.length));if(!n)break}return e?a.length:a?at.error(t):T(t,u).slice(0)},a=at.compile=function(t,e){var n,o=[],r=[],a=S[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=kt(e[n]))[w]?o.push(a):r.push(a);(a=S(t,function(t,e){var n=e.length>0,o=t.length>0,r=function(r,s,a,u,l){var d,f,g,v=0,y="0",b=r&&[],w=[],x=c,N=r||o&&i.find.TAG("*",l),k=_+=null==x?1:Math.random()||.1,T=N.length;for(l&&(c=s===h||s||l);y!==T&&null!=(d=N[y]);y++){if(o&&d){for(f=0,s||d.ownerDocument===h||(p(d),a=!m);g=t[f++];)if(g(d,s||h,a)){u.push(d);break}l&&(_=k)}n&&((d=!g&&d)&&v--,r&&b.push(d))}if(v+=y,n&&y!==v){for(f=0;g=e[f++];)g(b,w,s,a);if(r){if(v>0)for(;y--;)b[y]||w[y]||(w[y]=P.call(u));w=_t(w)}M.apply(u,w),l&&!r&&w.length>0&&v+e.length>1&&at.uniqueSort(u)}return l&&(_=k,c=x),b};return n?ct(r):r}(r,o))).selector=t}return a},u=at.select=function(t,e,n,o){var r,u,c,l,d,p="function"==typeof t&&t,h=!o&&s(t=p.selector||t);if(n=n||[],1===h.length){if((u=h[0]=h[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&9===e.nodeType&&m&&i.relative[u[1].type]){if(!(e=(i.find.ID(c.matches[0].replace(et,nt),e)||[])[0]))return n;p&&(e=e.parentNode),t=t.slice(u.shift().value.length)}for(r=G.needsContext.test(t)?0:u.length;r--&&(c=u[r],!i.relative[l=c.type]);)if((d=i.find[l])&&(o=d(c.matches[0].replace(et,nt),tt.test(u[0].type)&&vt(e.parentNode)||e))){if(u.splice(r,1),!(t=o.length&&bt(u)))return M.apply(n,o),n;break}}return(p||a(t,h))(o,e,!m,n,!e||tt.test(t)&&vt(e.parentNode)||e),n},n.sortStable=w.split("").sort(O).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&<((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($,(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);N.find=S,N.expr=S.selectors,N.expr[":"]=N.expr.pseudos,N.uniqueSort=N.unique=S.uniqueSort,N.text=S.getText,N.isXMLDoc=S.isXML,N.contains=S.contains,N.escapeSelector=S.escape;var C=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&N(t).is(n))break;i.push(t)}return i},O=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},D=N.expr.match.needsContext;function j(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 y(e)?N.grep(t,(function(t,i){return!!e.call(t,i,t)!==n})):e.nodeType?N.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?N.grep(t,(function(t){return d.call(e,t)>-1!==n})):N.filter(e,t,n)}N.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?N.find.matchesSelector(i,t)?[i]:[]:N.find.matches(t,N.grep(e,(function(t){return 1===t.nodeType})))},N.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(N(t).filter((function(){for(e=0;e<i;e++)if(N.contains(o[e],this))return!0})));for(n=this.pushStack([]),e=0;e<i;e++)N.find(t,o[e],n);return i>1?N.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&&D.test(t)?N(t):t||[],!1).length}});var M,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(N.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||M,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:A.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 N?e[0]:e,N.merge(this,N.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:s,!0)),P.test(i[1])&&N.isPlainObject(e))for(i in e)y(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(o=s.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(N):N.makeArray(t,this)}).prototype=N.fn,M=N(s);var I=/^(?:parents|prev(?:Until|All))/,$={children:!0,contents:!0,next:!0,prev:!0};function R(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}N.fn.extend({has:function(t){var e=N(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(N.contains(this,e[t]))return!0}))},closest:function(t,e){var n,i=0,o=this.length,r=[],s="string"!=typeof t&&N(t);if(!D.test(t))for(;i<o;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&N.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?N.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?d.call(N(t),this[0]):d.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(N.uniqueSort(N.merge(this.get(),N(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),N.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return C(t,"parentNode")},parentsUntil:function(t,e,n){return C(t,"parentNode",n)},next:function(t){return R(t,"nextSibling")},prev:function(t){return R(t,"previousSibling")},nextAll:function(t){return C(t,"nextSibling")},prevAll:function(t){return C(t,"previousSibling")},nextUntil:function(t,e,n){return C(t,"nextSibling",n)},prevUntil:function(t,e,n){return C(t,"previousSibling",n)},siblings:function(t){return O((t.parentNode||{}).firstChild,t)},children:function(t){return O(t.firstChild)},contents:function(t){return void 0!==t.contentDocument?t.contentDocument:(j(t,"template")&&(t=t.content||t),N.merge([],t.childNodes))}},(function(t,e){N.fn[t]=function(n,i){var o=N.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=N.filter(i,o)),this.length>1&&($[t]||N.uniqueSort(o),I.test(t)&&o.reverse()),this.pushStack(o)}}));var L=/[^\x20\t\r\n\f]+/g;function H(t){return t}function B(t){throw t}function U(t,e,n,i){var o;try{t&&y(o=t.promise)?o.call(t).done(e).fail(n):t&&y(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}N.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return N.each(t.match(L)||[],(function(t,n){e[n]=!0})),e}(t):N.extend({},t);var e,n,i,o,r=[],s=[],a=-1,u=function(){for(o=o||t.once,i=e=!0;s.length;a=-1)for(n=s.shift();++a<r.length;)!1===r[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=r.length,n=!1);t.memory||(n=!1),e=!1,o&&(r=n?[]:"")},c={add:function(){return r&&(n&&!e&&(a=r.length-1,s.push(n)),function e(n){N.each(n,(function(n,i){y(i)?t.unique&&c.has(i)||r.push(i):i&&i.length&&"string"!==_(i)&&e(i)}))}(arguments),n&&!e&&u()),this},remove:function(){return N.each(arguments,(function(t,e){for(var n;(n=N.inArray(e,r,n))>-1;)r.splice(n,1),n<=a&&a--})),this},has:function(t){return t?N.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=s=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=s=[],n||e||(r=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},N.extend({Deferred:function(t){var e=[["notify","progress",N.Callbacks("memory"),N.Callbacks("memory"),2],["resolve","done",N.Callbacks("once memory"),N.Callbacks("once memory"),0,"resolved"],["reject","fail",N.Callbacks("once memory"),N.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return N.Deferred((function(n){N.each(e,(function(e,i){var o=y(t[i[4]])&&t[i[4]];r[i[1]]((function(){var t=o&&o.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,o?[t]:arguments)}))})),t=null})).promise()},then:function(t,i,o){var r=0;function s(t,e,i,o){return function(){var a=this,u=arguments,c=function(){var n,c;if(!(t<r)){if((n=i.apply(a,u))===e.promise())throw new TypeError("Thenable self-resolution");c=n&&("object"==typeof n||"function"==typeof n)&&n.then,y(c)?o?c.call(n,s(r,e,H,o),s(r,e,B,o)):(r++,c.call(n,s(r,e,H,o),s(r,e,B,o),s(r,e,H,e.notifyWith))):(i!==H&&(a=void 0,u=[n]),(o||e.resolveWith)(a,u))}},l=o?c:function(){try{c()}catch(n){N.Deferred.exceptionHook&&N.Deferred.exceptionHook(n,l.stackTrace),t+1>=r&&(i!==B&&(a=void 0,u=[n]),e.rejectWith(a,u))}};t?l():(N.Deferred.getStackHook&&(l.stackTrace=N.Deferred.getStackHook()),n.setTimeout(l))}}return N.Deferred((function(n){e[0][3].add(s(0,n,y(o)?o:H,n.notifyWith)),e[1][3].add(s(0,n,y(t)?t:H)),e[2][3].add(s(0,n,y(i)?i:B))})).promise()},promise:function(t){return null!=t?N.extend(t,o):o}},r={};return N.each(e,(function(t,n){var s=n[2],a=n[5];o[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),r[n[0]]=function(){return r[n[0]+"With"](this===r?void 0:this,arguments),this},r[n[0]+"With"]=s.fireWith})),o.promise(r),t&&t.call(r,r),r},when:function(t){var e=arguments.length,n=e,i=Array(n),o=u.call(arguments),r=N.Deferred(),s=function(t){return function(n){i[t]=this,o[t]=arguments.length>1?u.call(arguments):n,--e||r.resolveWith(i,o)}};if(e<=1&&(U(t,r.done(s(n)).resolve,r.reject,!e),"pending"===r.state()||y(o[n]&&o[n].then)))return r.then();for(;n--;)U(o[n],s(n),r.reject);return r.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;N.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&F.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},N.readyException=function(t){n.setTimeout((function(){throw t}))};var Y=N.Deferred();function q(){s.removeEventListener("DOMContentLoaded",q),n.removeEventListener("load",q),N.ready()}N.fn.ready=function(t){return Y.then(t).catch((function(t){N.readyException(t)})),this},N.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--N.readyWait:N.isReady)||(N.isReady=!0,!0!==t&&--N.readyWait>0||Y.resolveWith(s,[N]))}}),N.ready.then=Y.then,"complete"===s.readyState||"loading"!==s.readyState&&!s.documentElement.doScroll?n.setTimeout(N.ready):(s.addEventListener("DOMContentLoaded",q),n.addEventListener("load",q));var W=function(t,e,n,i,o,r,s){var a=0,u=t.length,c=null==n;if("object"===_(n))for(a in o=!0,n)W(t,e,a,n[a],!0,r,s);else if(void 0!==i&&(o=!0,y(i)||(s=!0),c&&(s?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(N(t),n)})),e))for(;a<u;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return o?t:c?e.call(t):u?e(t[0],n):r},z=/^-ms-/,V=/-([a-z])/g;function G(t,e){return e.toUpperCase()}function Z(t){return t.replace(z,"ms-").replace(V,G)}var K=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function X(){this.expando=N.expando+X.uid++}X.uid=1,X.prototype={cache:function(t){var e=t[this.expando];return e||(e={},K(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,o=this.cache(t);if("string"==typeof e)o[Z(e)]=n;else for(i in e)o[Z(i)]=e[i];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][Z(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(Z):(e=Z(e))in i?[e]:e.match(L)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||N.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&&!N.isEmptyObject(e)}};var J=new X,Q=new X,tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,et=/[A-Z]/g;function nt(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(et,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:tt.test(t)?JSON.parse(t):t)}(n)}catch(t){}Q.set(t,e,n)}else n=void 0;return n}N.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)}}),N.fn.extend({data:function(t,e){var n,i,o,r=this[0],s=r&&r.attributes;if(void 0===t){if(this.length&&(o=Q.get(r),1===r.nodeType&&!J.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=Z(i.slice(5)),nt(r,i,o[i]));J.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each((function(){Q.set(this,t)})):W(this,(function(e){var n;if(r&&void 0===e)return void 0!==(n=Q.get(r,t))||void 0!==(n=nt(r,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)}))}}),N.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,N.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=N.queue(t,e),i=n.length,o=n.shift(),r=N._queueHooks(t,e);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,(function(){N.dequeue(t,e)}),r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return J.get(t,n)||J.access(t,n,{empty:N.Callbacks("once memory").add((function(){J.remove(t,[e+"queue",n])}))})}}),N.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?N.queue(this[0],t):void 0===e?this:this.each((function(){var n=N.queue(this,t,e);N._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&N.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){N.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=N.Deferred(),r=this,s=this.length,a=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=J.get(r[s],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var it=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ot=new RegExp("^(?:([+-])=|)("+it+")([a-z%]*)$","i"),rt=["Top","Right","Bottom","Left"],st=s.documentElement,at=function(t){return N.contains(t.ownerDocument,t)},ut={composed:!0};st.getRootNode&&(at=function(t){return N.contains(t.ownerDocument,t)||t.getRootNode(ut)===t.ownerDocument});var ct=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&at(t)&&"none"===N.css(t,"display")},lt=function(t,e,n,i){var o,r,s={};for(r in e)s[r]=t.style[r],t.style[r]=e[r];for(r in o=n.apply(t,i||[]),e)t.style[r]=s[r];return o};function dt(t,e,n,i){var o,r,s=20,a=i?function(){return i.cur()}:function(){return N.css(t,e,"")},u=a(),c=n&&n[3]||(N.cssNumber[e]?"":"px"),l=t.nodeType&&(N.cssNumber[e]||"px"!==c&&+u)&&ot.exec(N.css(t,e));if(l&&l[3]!==c){for(u/=2,c=c||l[3],l=+u||1;s--;)N.style(t,e,l+c),(1-r)*(1-(r=a()/u||.5))<=0&&(s=0),l/=r;l*=2,N.style(t,e,l+c),n=n||[]}return n&&(l=+l||+u||0,o=n[1]?l+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=l,i.end=o)),o}var pt={};function ht(t){var e,n=t.ownerDocument,i=t.nodeName,o=pt[i];return o||(e=n.body.appendChild(n.createElement(i)),o=N.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),pt[i]=o,o)}function ft(t,e){for(var n,i,o=[],r=0,s=t.length;r<s;r++)(i=t[r]).style&&(n=i.style.display,e?("none"===n&&(o[r]=J.get(i,"display")||null,o[r]||(i.style.display="")),""===i.style.display&&ct(i)&&(o[r]=ht(i))):"none"!==n&&(o[r]="none",J.set(i,"display",n)));for(r=0;r<s;r++)null!=o[r]&&(t[r].style.display=o[r]);return t}N.fn.extend({show:function(){return ft(this,!0)},hide:function(){return ft(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ct(this)?N(this).show():N(this).hide()}))}});var mt=/^(?:checkbox|radio)$/i,gt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,vt=/^$|^module$|\/(?:java|ecma)script/i,yt={option:[1,"<select multiple='multiple'>","</select>"],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 bt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&j(t,e)?N.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"))}yt.optgroup=yt.option,yt.tbody=yt.tfoot=yt.colgroup=yt.caption=yt.thead,yt.th=yt.td;var xt,_t,Nt=/<|&#?\w+;/;function kt(t,e,n,i,o){for(var r,s,a,u,c,l,d=e.createDocumentFragment(),p=[],h=0,f=t.length;h<f;h++)if((r=t[h])||0===r)if("object"===_(r))N.merge(p,r.nodeType?[r]:r);else if(Nt.test(r)){for(s=s||d.appendChild(e.createElement("div")),a=(gt.exec(r)||["",""])[1].toLowerCase(),u=yt[a]||yt._default,s.innerHTML=u[1]+N.htmlPrefilter(r)+u[2],l=u[0];l--;)s=s.lastChild;N.merge(p,s.childNodes),(s=d.firstChild).textContent=""}else p.push(e.createTextNode(r));for(d.textContent="",h=0;r=p[h++];)if(i&&N.inArray(r,i)>-1)o&&o.push(r);else if(c=at(r),s=bt(d.appendChild(r),"script"),c&&wt(s),n)for(l=0;r=s[l++];)vt.test(r.type||"")&&n.push(r);return d}xt=s.createDocumentFragment().appendChild(s.createElement("div")),(_t=s.createElement("input")).setAttribute("type","radio"),_t.setAttribute("checked","checked"),_t.setAttribute("name","t"),xt.appendChild(_t),v.checkClone=xt.cloneNode(!0).cloneNode(!0).lastChild.checked,xt.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!xt.cloneNode(!0).lastChild.defaultValue;var Tt=/^key/,St=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ct=/^([^.]*)(?:\.(.+)|)/;function Ot(){return!0}function Dt(){return!1}function jt(t,e){return t===function(){try{return s.activeElement}catch(t){}}()==("focus"===e)}function Pt(t,e,n,i,o,r){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=void 0),e)Pt(t,a,n,i,e[a],r);return t}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=Dt;else if(!o)return t;return 1===r&&(s=o,(o=function(t){return N().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=N.guid++)),t.each((function(){N.event.add(this,e,o,i,n)}))}function Et(t,e,n){n?(J.set(t,e,!1),N.event.add(t,e,{namespace:!1,handler:function(t){var i,o,r=J.get(this,e);if(1&t.isTrigger&&this[e]){if(r.length)(N.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=u.call(arguments),J.set(this,e,r),i=n(this,e),this[e](),r!==(o=J.get(this,e))||i?J.set(this,e,!1):o={},r!==o)return t.stopImmediatePropagation(),t.preventDefault(),o.value}else r.length&&(J.set(this,e,{value:N.event.trigger(N.extend(r[0],N.Event.prototype),r.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===J.get(t,e)&&N.event.add(t,e,Ot)}N.event={global:{},add:function(t,e,n,i,o){var r,s,a,u,c,l,d,p,h,f,m,g=J.get(t);if(g)for(n.handler&&(n=(r=n).handler,o=r.selector),o&&N.find.matchesSelector(st,o),n.guid||(n.guid=N.guid++),(u=g.events)||(u=g.events={}),(s=g.handle)||(s=g.handle=function(e){return void 0!==N&&N.event.triggered!==e.type?N.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(L)||[""]).length;c--;)h=m=(a=Ct.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),h&&(d=N.event.special[h]||{},h=(o?d.delegateType:d.bindType)||h,d=N.event.special[h]||{},l=N.extend({type:h,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&N.expr.match.needsContext.test(o),namespace:f.join(".")},r),(p=u[h])||((p=u[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)),o?p.splice(p.delegateCount++,0,l):p.push(l),N.event.global[h]=!0)},remove:function(t,e,n,i,o){var r,s,a,u,c,l,d,p,h,f,m,g=J.hasData(t)&&J.get(t);if(g&&(u=g.events)){for(c=(e=(e||"").match(L)||[""]).length;c--;)if(h=m=(a=Ct.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),h){for(d=N.event.special[h]||{},p=u[h=(i?d.delegateType:d.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=p.length;r--;)l=p[r],!o&&m!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||i&&i!==l.selector&&("**"!==i||!l.selector)||(p.splice(r,1),l.selector&&p.delegateCount--,d.remove&&d.remove.call(t,l));s&&!p.length&&(d.teardown&&!1!==d.teardown.call(t,f,g.handle)||N.removeEvent(t,h,g.handle),delete u[h])}else for(h in u)N.event.remove(t,h+e[c],n,i,!0);N.isEmptyObject(u)&&J.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,r,s,a=N.event.fix(t),u=new Array(arguments.length),c=(J.get(this,"events")||{})[a.type]||[],l=N.event.special[a.type]||{};for(u[0]=a,e=1;e<arguments.length;e++)u[e]=arguments[e];if(a.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,a)){for(s=N.event.handlers.call(this,a,c),e=0;(o=s[e++])&&!a.isPropagationStopped();)for(a.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!1!==r.namespace&&!a.rnamespace.test(r.namespace)||(a.handleObj=r,a.data=r.data,void 0!==(i=((N.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,u))&&!1===(a.result=i)&&(a.preventDefault(),a.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,a),a.result}},handlers:function(t,e){var n,i,o,r,s,a=[],u=e.delegateCount,c=t.target;if(u&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(r=[],s={},n=0;n<u;n++)void 0===s[o=(i=e[n]).selector+" "]&&(s[o]=i.needsContext?N(o,this).index(c)>-1:N.find(o,this,null,[c]).length),s[o]&&r.push(i);r.length&&a.push({elem:c,handlers:r})}return c=this,u<e.length&&a.push({elem:c,handlers:e.slice(u)}),a},addProp:function(t,e){Object.defineProperty(N.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(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[N.expando]?t:new N.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return mt.test(e.type)&&e.click&&j(e,"input")&&Et(e,"click",Ot),!1},trigger:function(t){var e=this||t;return mt.test(e.type)&&e.click&&j(e,"input")&&Et(e,"click"),!0},_default:function(t){var e=t.target;return mt.test(e.type)&&e.click&&j(e,"input")&&J.get(e,"click")||j(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},N.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},N.Event=function(t,e){if(!(this instanceof N.Event))return new N.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Ot:Dt,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&&N.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[N.expando]=!0},N.Event.prototype={constructor:N.Event,isDefaultPrevented:Dt,isPropagationStopped:Dt,isImmediatePropagationStopped:Dt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Ot,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Ot,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Ot,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},N.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&&Tt.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&St.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},N.event.addProp),N.each({focus:"focusin",blur:"focusout"},(function(t,e){N.event.special[t]={setup:function(){return Et(this,t,jt),!1},trigger:function(){return Et(this,t),!0},delegateType:e}})),N.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){N.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,o=t.relatedTarget,r=t.handleObj;return o&&(o===i||N.contains(i,o))||(t.type=r.origType,n=r.handler.apply(this,arguments),t.type=e),n}}})),N.fn.extend({on:function(t,e,n,i){return Pt(this,t,e,n,i)},one:function(t,e,n,i){return Pt(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,N(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Dt),this.each((function(){N.event.remove(this,t,n,e)}))}});var Mt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,At=/<script|<style|<link/i,It=/checked\s*(?:[^=]|=\s*.checked.)/i,$t=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Rt(t,e){return j(t,"table")&&j(11!==e.nodeType?e:e.firstChild,"tr")&&N(t).children("tbody")[0]||t}function Lt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ht(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Bt(t,e){var n,i,o,r,s,a,u,c;if(1===e.nodeType){if(J.hasData(t)&&(r=J.access(t),s=J.set(e,r),c=r.events))for(o in delete s.handle,s.events={},c)for(n=0,i=c[o].length;n<i;n++)N.event.add(e,o,c[o][n]);Q.hasData(t)&&(a=Q.access(t),u=N.extend({},a),Q.set(e,u))}}function Ut(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 Ft(t,e,n,i){e=c.apply([],e);var o,r,s,a,u,l,d=0,p=t.length,h=p-1,f=e[0],m=y(f);if(m||p>1&&"string"==typeof f&&!v.checkClone&&It.test(f))return t.each((function(o){var r=t.eq(o);m&&(e[0]=f.call(this,o,r.html())),Ft(r,e,n,i)}));if(p&&(r=(o=kt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===o.childNodes.length&&(o=r),r||i)){for(a=(s=N.map(bt(o,"script"),Lt)).length;d<p;d++)u=o,d!==h&&(u=N.clone(u,!0,!0),a&&N.merge(s,bt(u,"script"))),n.call(t[d],u,d);if(a)for(l=s[s.length-1].ownerDocument,N.map(s,Ht),d=0;d<a;d++)u=s[d],vt.test(u.type||"")&&!J.access(u,"globalEval")&&N.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?N._evalUrl&&!u.noModule&&N._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")}):x(u.textContent.replace($t,""),u,l))}return t}function Yt(t,e,n){for(var i,o=e?N.filter(e,t):t,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||N.cleanData(bt(i)),i.parentNode&&(n&&at(i)&&wt(bt(i,"script")),i.parentNode.removeChild(i));return t}N.extend({htmlPrefilter:function(t){return t.replace(Mt,"<$1></$2>")},clone:function(t,e,n){var i,o,r,s,a=t.cloneNode(!0),u=at(t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||N.isXMLDoc(t)))for(s=bt(a),i=0,o=(r=bt(t)).length;i<o;i++)Ut(r[i],s[i]);if(e)if(n)for(r=r||bt(t),s=s||bt(a),i=0,o=r.length;i<o;i++)Bt(r[i],s[i]);else Bt(t,a);return(s=bt(a,"script")).length>0&&wt(s,!u&&bt(t,"script")),a},cleanData:function(t){for(var e,n,i,o=N.event.special,r=0;void 0!==(n=t[r]);r++)if(K(n)){if(e=n[J.expando]){if(e.events)for(i in e.events)o[i]?N.event.remove(n,i):N.removeEvent(n,i,e.handle);n[J.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),N.fn.extend({detach:function(t){return Yt(this,t,!0)},remove:function(t){return Yt(this,t)},text:function(t){return W(this,(function(t){return void 0===t?N.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 Ft(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Rt(this,t).appendChild(t)}))},prepend:function(){return Ft(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Rt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Ft(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Ft(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&&(N.cleanData(bt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return N.clone(this,t,e)}))},html:function(t){return W(this,(function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!At.test(t)&&!yt[(gt.exec(t)||["",""])[1].toLowerCase()]){t=N.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(N.cleanData(bt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Ft(this,arguments,(function(e){var n=this.parentNode;N.inArray(this,t)<0&&(N.cleanData(bt(this)),n&&n.replaceChild(e,this))}),t)}}),N.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){N.fn[t]=function(t){for(var n,i=[],o=N(t),r=o.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),N(o[s])[e](n),l.apply(i,n.get());return this.pushStack(i)}}));var qt=new RegExp("^("+it+")(?!px)[a-z%]+$","i"),Wt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},zt=new RegExp(rt.join("|"),"i");function Vt(t,e,n){var i,o,r,s,a=t.style;return(n=n||Wt(t))&&(""!==(s=n.getPropertyValue(e)||n[e])||at(t)||(s=N.style(t,e)),!v.pixelBoxStyles()&&qt.test(s)&&zt.test(e)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r)),void 0!==s?s+"":s}function Gt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(l){c.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%",st.appendChild(c).appendChild(l);var t=n.getComputedStyle(l);i="1%"!==t.top,u=12===e(t.marginLeft),l.style.right="60%",a=36===e(t.right),o=36===e(t.width),l.style.position="absolute",r=12===e(l.offsetWidth/3),st.removeChild(c),l=null}}function e(t){return Math.round(parseFloat(t))}var i,o,r,a,u,c=s.createElement("div"),l=s.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,N.extend(v,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),r}}))}();var Zt=["Webkit","Moz","ms"],Kt=s.createElement("div").style,Xt={};function Jt(t){var e=N.cssProps[t]||Xt[t];return e||(t in Kt?t:Xt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Zt.length;n--;)if((t=Zt[n]+e)in Kt)return t}(t)||t)}var Qt=/^(none|table(?!-c[ea]).+)/,te=/^--/,ee={position:"absolute",visibility:"hidden",display:"block"},ne={letterSpacing:"0",fontWeight:"400"};function ie(t,e,n){var i=ot.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function oe(t,e,n,i,o,r){var s="width"===e?1:0,a=0,u=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(u+=N.css(t,n+rt[s],!0,o)),i?("content"===n&&(u-=N.css(t,"padding"+rt[s],!0,o)),"margin"!==n&&(u-=N.css(t,"border"+rt[s]+"Width",!0,o))):(u+=N.css(t,"padding"+rt[s],!0,o),"padding"!==n?u+=N.css(t,"border"+rt[s]+"Width",!0,o):a+=N.css(t,"border"+rt[s]+"Width",!0,o));return!i&&r>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-u-a-.5))||0),u}function re(t,e,n){var i=Wt(t),o=(!v.boxSizingReliable()||n)&&"border-box"===N.css(t,"boxSizing",!1,i),r=o,s=Vt(t,e,i),a="offset"+e[0].toUpperCase()+e.slice(1);if(qt.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&o||"auto"===s||!parseFloat(s)&&"inline"===N.css(t,"display",!1,i))&&t.getClientRects().length&&(o="border-box"===N.css(t,"boxSizing",!1,i),(r=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+oe(t,e,n||(o?"border":"content"),r,i,s)+"px"}function se(t,e,n,i,o){return new se.prototype.init(t,e,n,i,o)}N.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Vt(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 o,r,s,a=Z(e),u=te.test(e),c=t.style;if(u||(e=Jt(a)),s=N.cssHooks[e]||N.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(t,!1,i))?o:c[e];"string"===(r=typeof n)&&(o=ot.exec(n))&&o[1]&&(n=dt(t,e,o),r="number"),null!=n&&n==n&&("number"!==r||u||(n+=o&&o[3]||(N.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,i))||(u?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,i){var o,r,s,a=Z(e);return te.test(e)||(e=Jt(a)),(s=N.cssHooks[e]||N.cssHooks[a])&&"get"in s&&(o=s.get(t,!0,n)),void 0===o&&(o=Vt(t,e,i)),"normal"===o&&e in ne&&(o=ne[e]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),N.each(["height","width"],(function(t,e){N.cssHooks[e]={get:function(t,n,i){if(n)return!Qt.test(N.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,i):lt(t,ee,(function(){return re(t,e,i)}))},set:function(t,n,i){var o,r=Wt(t),s=!v.scrollboxSize()&&"absolute"===r.position,a=(s||i)&&"border-box"===N.css(t,"boxSizing",!1,r),u=i?oe(t,e,i,a,r):0;return a&&s&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(r[e])-oe(t,e,"border",!1,r)-.5)),u&&(o=ot.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=N.css(t,e)),ie(0,n,u)}}})),N.cssHooks.marginLeft=Gt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Vt(t,"marginLeft"))||t.getBoundingClientRect().left-lt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),N.each({margin:"",padding:"",border:"Width"},(function(t,e){N.cssHooks[t+e]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+rt[i]+e]=r[i]||r[i-2]||r[0];return o}},"margin"!==t&&(N.cssHooks[t+e].set=ie)})),N.fn.extend({css:function(t,e){return W(this,(function(t,e,n){var i,o,r={},s=0;if(Array.isArray(e)){for(i=Wt(t),o=e.length;s<o;s++)r[e[s]]=N.css(t,e[s],!1,i);return r}return void 0!==n?N.style(t,e,n):N.css(t,e)}),t,e,arguments.length>1)}}),N.Tween=se,se.prototype={constructor:se,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||N.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(N.cssNumber[n]?"":"px")},cur:function(){var t=se.propHooks[this.prop];return t&&t.get?t.get(this):se.propHooks._default.get(this)},run:function(t){var e,n=se.propHooks[this.prop];return this.options.duration?this.pos=e=N.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):se.propHooks._default.set(this),this}},se.prototype.init.prototype=se.prototype,se.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=N.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){N.fx.step[t.prop]?N.fx.step[t.prop](t):1!==t.elem.nodeType||!N.cssHooks[t.prop]&&null==t.elem.style[Jt(t.prop)]?t.elem[t.prop]=t.now:N.style(t.elem,t.prop,t.now+t.unit)}}},se.propHooks.scrollTop=se.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},N.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},N.fx=se.prototype.init,N.fx.step={};var ae,ue,ce=/^(?:toggle|show|hide)$/,le=/queueHooks$/;function de(){ue&&(!1===s.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(de):n.setTimeout(de,N.fx.interval),N.fx.tick())}function pe(){return n.setTimeout((function(){ae=void 0})),ae=Date.now()}function he(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)o["margin"+(n=rt[i])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function fe(t,e,n){for(var i,o=(me.tweeners[e]||[]).concat(me.tweeners["*"]),r=0,s=o.length;r<s;r++)if(i=o[r].call(n,e,t))return i}function me(t,e,n){var i,o,r=0,s=me.prefilters.length,a=N.Deferred().always((function(){delete u.elem})),u=function(){if(o)return!1;for(var e=ae||pe(),n=Math.max(0,c.startTime+c.duration-e),i=1-(n/c.duration||0),r=0,s=c.tweens.length;r<s;r++)c.tweens[r].run(i);return a.notifyWith(t,[c,i,n]),i<1&&s?n:(s||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:N.extend({},e),opts:N.extend(!0,{specialEasing:{},easing:N.easing._default},n),originalProperties:e,originalOptions:n,startTime:ae||pe(),duration:n.duration,tweens:[],createTween:function(e,n){var i=N.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(i),i},stop:function(e){var n=0,i=e?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),l=c.props;for(!function(t,e){var n,i,o,r,s;for(n in t)if(o=e[i=Z(n)],r=t[n],Array.isArray(r)&&(o=r[1],r=t[n]=r[0]),n!==i&&(t[i]=r,delete t[n]),(s=N.cssHooks[i])&&"expand"in s)for(n in r=s.expand(r),delete t[i],r)n in t||(t[n]=r[n],e[n]=o);else e[i]=o}(l,c.opts.specialEasing);r<s;r++)if(i=me.prefilters[r].call(c,t,l,c.opts))return y(i.stop)&&(N._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return N.map(l,fe,c),y(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),N.fx.timer(N.extend(u,{elem:t,anim:c,queue:c.opts.queue})),c}N.Animation=N.extend(me,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return dt(n.elem,t,ot.exec(e),n),n}]},tweener:function(t,e){y(t)?(e=t,t=["*"]):t=t.match(L);for(var n,i=0,o=t.length;i<o;i++)n=t[i],me.tweeners[n]=me.tweeners[n]||[],me.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,o,r,s,a,u,c,l,d="width"in e||"height"in e,p=this,h={},f=t.style,m=t.nodeType&&ct(t),g=J.get(t,"fxshow");for(i in n.queue||(null==(s=N._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--,N.queue(t,"fx").length||s.empty.fire()}))}))),e)if(o=e[i],ce.test(o)){if(delete e[i],r=r||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||!g||void 0===g[i])continue;m=!0}h[i]=g&&g[i]||N.style(t,i)}if((u=!N.isEmptyObject(e))||!N.isEmptyObject(h))for(i in d&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=g&&g.display)&&(c=J.get(t,"display")),"none"===(l=N.css(t,"display"))&&(c?l=c:(ft([t],!0),c=t.style.display||c,l=N.css(t,"display"),ft([t]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===N.css(t,"float")&&(u||(p.done((function(){f.display=c})),null==c&&(l=f.display,c="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]}))),u=!1,h)u||(g?"hidden"in g&&(m=g.hidden):g=J.access(t,"fxshow",{display:c}),r&&(g.hidden=!m),m&&ft([t],!0),p.done((function(){for(i in m||ft([t]),J.remove(t,"fxshow"),h)N.style(t,i,h[i])}))),u=fe(m?g[i]:0,i,p),i in g||(g[i]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?me.prefilters.unshift(t):me.prefilters.push(t)}}),N.speed=function(t,e,n){var i=t&&"object"==typeof t?N.extend({},t):{complete:n||!n&&e||y(t)&&t,duration:t,easing:n&&e||e&&!y(e)&&e};return N.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in N.fx.speeds?i.duration=N.fx.speeds[i.duration]:i.duration=N.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){y(i.old)&&i.old.call(this),i.queue&&N.dequeue(this,i.queue)},i},N.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 o=N.isEmptyObject(t),r=N.speed(e,n,i),s=function(){var e=me(this,N.extend({},t),r);(o||J.get(this,"finish"))&&e.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.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&&!1!==t&&this.queue(t||"fx",[]),this.each((function(){var e=!0,o=null!=t&&t+"queueHooks",r=N.timers,s=J.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&le.test(o)&&i(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=t&&r[o].queue!==t||(r[o].anim.stop(n),e=!1,r.splice(o,1));!e&&n||N.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"],o=n[t+"queueHooks"],r=N.timers,s=i?i.length:0;for(n.finish=!0,N.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<s;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish}))}}),N.each(["toggle","show","hide"],(function(t,e){var n=N.fn[e];N.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(he(e,!0),t,i,o)}})),N.each({slideDown:he("show"),slideUp:he("hide"),slideToggle:he("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){N.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}})),N.timers=[],N.fx.tick=function(){var t,e=0,n=N.timers;for(ae=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||N.fx.stop(),ae=void 0},N.fx.timer=function(t){N.timers.push(t),N.fx.start()},N.fx.interval=13,N.fx.start=function(){ue||(ue=!0,de())},N.fx.stop=function(){ue=null},N.fx.speeds={slow:600,fast:200,_default:400},N.fn.delay=function(t,e){return t=N.fx&&N.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,i){var o=n.setTimeout(e,t);i.stop=function(){n.clearTimeout(o)}}))},function(){var t=s.createElement("input"),e=s.createElement("select").appendChild(s.createElement("option"));t.type="checkbox",v.checkOn=""!==t.value,v.optSelected=e.selected,(t=s.createElement("input")).value="t",t.type="radio",v.radioValue="t"===t.value}();var ge,ve=N.expr.attrHandle;N.fn.extend({attr:function(t,e){return W(this,N.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){N.removeAttr(this,t)}))}}),N.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?N.prop(t,e,n):(1===r&&N.isXMLDoc(t)||(o=N.attrHooks[e.toLowerCase()]||(N.expr.match.bool.test(e)?ge:void 0)),void 0!==n?null===n?void N.removeAttr(t,e):o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:null==(i=N.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&j(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,o=e&&e.match(L);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),ge={set:function(t,e,n){return!1===e?N.removeAttr(t,n):t.setAttribute(n,n),n}},N.each(N.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=ve[e]||N.find.attr;ve[e]=function(t,e,i){var o,r,s=e.toLowerCase();return i||(r=ve[s],ve[s]=o,o=null!=n(t,e,i)?s:null,ve[s]=r),o}}));var ye=/^(?:input|select|textarea|button)$/i,be=/^(?:a|area)$/i;function we(t){return(t.match(L)||[]).join(" ")}function xe(t){return t.getAttribute&&t.getAttribute("class")||""}function _e(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(L)||[]}N.fn.extend({prop:function(t,e){return W(this,N.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[N.propFix[t]||t]}))}}),N.extend({prop:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&N.isXMLDoc(t)||(e=N.propFix[e]||e,o=N.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=N.find.attr(t,"tabindex");return e?parseInt(e,10):ye.test(t.nodeName)||be.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(N.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)}}),N.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){N.propFix[this.toLowerCase()]=this})),N.fn.extend({addClass:function(t){var e,n,i,o,r,s,a,u=0;if(y(t))return this.each((function(e){N(this).addClass(t.call(this,e,xe(this)))}));if((e=_e(t)).length)for(;n=this[u++];)if(o=xe(n),i=1===n.nodeType&&" "+we(o)+" "){for(s=0;r=e[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(a=we(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,o,r,s,a,u=0;if(y(t))return this.each((function(e){N(this).removeClass(t.call(this,e,xe(this)))}));if(!arguments.length)return this.attr("class","");if((e=_e(t)).length)for(;n=this[u++];)if(o=xe(n),i=1===n.nodeType&&" "+we(o)+" "){for(s=0;r=e[s++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");o!==(a=we(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):y(t)?this.each((function(n){N(this).toggleClass(t.call(this,n,xe(this),e),e)})):this.each((function(){var e,o,r,s;if(i)for(o=0,r=N(this),s=_e(t);e=s[o++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==n||((e=xe(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&&(" "+we(xe(n))+" ").indexOf(e)>-1)return!0;return!1}});var Ne=/\r/g;N.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=y(t),this.each((function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,N(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=N.map(o,(function(t){return null==t?"":t+""}))),(e=N.valHooks[this.type]||N.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))}))):o?(e=N.valHooks[o.type]||N.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(Ne,""):null==n?"":n:void 0}}),N.extend({valHooks:{option:{get:function(t){var e=N.find.attr(t,"value");return null!=e?e:we(N.text(t))}},select:{get:function(t){var e,n,i,o=t.options,r=t.selectedIndex,s="select-one"===t.type,a=s?null:[],u=s?r+1:o.length;for(i=r<0?u:s?r:0;i<u;i++)if(((n=o[i]).selected||i===r)&&!n.disabled&&(!n.parentNode.disabled||!j(n.parentNode,"optgroup"))){if(e=N(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,i,o=t.options,r=N.makeArray(e),s=o.length;s--;)((i=o[s]).selected=N.inArray(N.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),N.each(["radio","checkbox"],(function(){N.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=N.inArray(N(t).val(),e)>-1}},v.checkOn||(N.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in n;var ke=/^(?:focusinfocus|focusoutblur)$/,Te=function(t){t.stopPropagation()};N.extend(N.event,{trigger:function(t,e,i,o){var r,a,u,c,l,d,p,h,m=[i||s],g=f.call(t,"type")?t.type:t,v=f.call(t,"namespace")?t.namespace.split("."):[];if(a=h=u=i=i||s,3!==i.nodeType&&8!==i.nodeType&&!ke.test(g+N.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),l=g.indexOf(":")<0&&"on"+g,(t=t[N.expando]?t:new N.Event(g,"object"==typeof t&&t)).isTrigger=o?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]:N.makeArray(e,[t]),p=N.event.special[g]||{},o||!p.trigger||!1!==p.trigger.apply(i,e))){if(!o&&!p.noBubble&&!b(i)){for(c=p.delegateType||g,ke.test(c+g)||(a=a.parentNode);a;a=a.parentNode)m.push(a),u=a;u===(i.ownerDocument||s)&&m.push(u.defaultView||u.parentWindow||n)}for(r=0;(a=m[r++])&&!t.isPropagationStopped();)h=a,t.type=r>1?c:p.bindType||g,(d=(J.get(a,"events")||{})[t.type]&&J.get(a,"handle"))&&d.apply(a,e),(d=l&&a[l])&&d.apply&&K(a)&&(t.result=d.apply(a,e),!1===t.result&&t.preventDefault());return t.type=g,o||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(m.pop(),e)||!K(i)||l&&y(i[g])&&!b(i)&&((u=i[l])&&(i[l]=null),N.event.triggered=g,t.isPropagationStopped()&&h.addEventListener(g,Te),i[g](),t.isPropagationStopped()&&h.removeEventListener(g,Te),N.event.triggered=void 0,u&&(i[l]=u)),t.result}},simulate:function(t,e,n){var i=N.extend(new N.Event,n,{type:t,isSimulated:!0});N.event.trigger(i,null,e)}}),N.fn.extend({trigger:function(t,e){return this.each((function(){N.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return N.event.trigger(t,e,n,!0)}}),v.focusin||N.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){N.event.simulate(e,t.target,N.event.fix(t))};N.event.special[e]={setup:function(){var i=this.ownerDocument||this,o=J.access(i,e);o||i.addEventListener(t,n,!0),J.access(i,e,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=J.access(i,e)-1;o?J.access(i,e,o):(i.removeEventListener(t,n,!0),J.remove(i,e))}}}));var Se=n.location,Ce=Date.now(),Oe=/\?/;N.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||N.error("Invalid XML: "+t),e};var De=/\[\]$/,je=/\r?\n/g,Pe=/^(?:submit|button|image|reset|file)$/i,Ee=/^(?:input|select|textarea|keygen)/i;function Me(t,e,n,i){var o;if(Array.isArray(e))N.each(e,(function(e,o){n||De.test(t)?i(t,o):Me(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)}));else if(n||"object"!==_(e))i(t,e);else for(o in e)Me(t+"["+o+"]",e[o],n,i)}N.param=function(t,e){var n,i=[],o=function(t,e){var n=y(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!N.isPlainObject(t))N.each(t,(function(){o(this.name,this.value)}));else for(n in t)Me(n,t[n],e,o);return i.join("&")},N.fn.extend({serialize:function(){return N.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=N.prop(this,"elements");return t?N.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!N(this).is(":disabled")&&Ee.test(this.nodeName)&&!Pe.test(t)&&(this.checked||!mt.test(t))})).map((function(t,e){var n=N(this).val();return null==n?null:Array.isArray(n)?N.map(n,(function(t){return{name:e.name,value:t.replace(je,"\r\n")}})):{name:e.name,value:n.replace(je,"\r\n")}})).get()}});var Ae=/%20/g,Ie=/#.*$/,$e=/([?&])_=[^&]*/,Re=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:GET|HEAD)$/,He=/^\/\//,Be={},Ue={},Fe="*/".concat("*"),Ye=s.createElement("a");function qe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,r=e.toLowerCase().match(L)||[];if(y(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function We(t,e,n,i){var o={},r=t===Ue;function s(a){var u;return o[a]=!0,N.each(t[a]||[],(function(t,a){var c=a(e,n,i);return"string"!=typeof c||r||o[c]?r?!(u=c):void 0:(e.dataTypes.unshift(c),s(c),!1)})),u}return s(e.dataTypes[0])||!o["*"]&&s("*")}function ze(t,e){var n,i,o=N.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&N.extend(!0,t,i),t}Ye.href=Se.href,N.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Se.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Se.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Fe,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":N.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?ze(ze(t,N.ajaxSettings),e):ze(N.ajaxSettings,t)},ajaxPrefilter:qe(Be),ajaxTransport:qe(Ue),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,o,r,a,u,c,l,d,p,h,f=N.ajaxSetup({},e),m=f.context||f,g=f.context&&(m.nodeType||m.jquery)?N(m):N.event,v=N.Deferred(),y=N.Callbacks("once memory"),b=f.statusCode||{},w={},x={},_="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(l){if(!a)for(a={};e=Re.exec(r);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?r:null},setRequestHeader:function(t,e){return null==l&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==l&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)k.always(t[k.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||_;return i&&i.abort(e),T(0,e),this}};if(v.promise(k),f.url=((t||f.url||Se.href)+"").replace(He,Se.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(L)||[""],null==f.crossDomain){c=s.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=Ye.protocol+"//"+Ye.host!=c.protocol+"//"+c.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=N.param(f.data,f.traditional)),We(Be,f,e,k),l)return k;for(p in(d=N.event&&f.global)&&0==N.active++&&N.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Le.test(f.type),o=f.url.replace(Ie,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Ae,"+")):(h=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(Oe.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace($e,"$1"),h=(Oe.test(o)?"&":"?")+"_="+Ce+++h),f.url=o+h),f.ifModified&&(N.lastModified[o]&&k.setRequestHeader("If-Modified-Since",N.lastModified[o]),N.etag[o]&&k.setRequestHeader("If-None-Match",N.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&k.setRequestHeader("Content-Type",f.contentType),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Fe+"; q=0.01":""):f.accepts["*"]),f.headers)k.setRequestHeader(p,f.headers[p]);if(f.beforeSend&&(!1===f.beforeSend.call(m,k,f)||l))return k.abort();if(_="abort",y.add(f.complete),k.done(f.success),k.fail(f.error),i=We(Ue,f,e,k)){if(k.readyState=1,d&&g.trigger("ajaxSend",[k,f]),l)return k;f.async&&f.timeout>0&&(u=n.setTimeout((function(){k.abort("timeout")}),f.timeout));try{l=!1,i.send(w,T)}catch(t){if(l)throw t;T(-1,t)}}else T(-1,"No Transport");function T(t,e,s,a){var c,p,h,w,x,_=e;l||(l=!0,u&&n.clearTimeout(u),i=void 0,r=a||"",k.readyState=t>0?4:0,c=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var i,o,r,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){u.unshift(o);break}if(u[0]in n)r=u[0];else{for(o in n){if(!u[0]||t.converters[o+" "+u[0]]){r=o;break}s||(s=o)}r=r||s}if(r)return r!==u[0]&&u.unshift(r),n[r]}(f,k,s)),w=function(t,e,n,i){var o,r,s,a,u,c={},l=t.dataTypes.slice();if(l[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(r=l.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!u&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=r,r=l.shift())if("*"===r)r=u;else if("*"!==u&&u!==r){if(!(s=c[u+" "+r]||c["* "+r]))for(o in c)if((a=o.split(" "))[1]===r&&(s=c[u+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[o]:!0!==c[o]&&(r=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 "+u+" to "+r}}}return{state:"success",data:e}}(f,w,k,c),c?(f.ifModified&&((x=k.getResponseHeader("Last-Modified"))&&(N.lastModified[o]=x),(x=k.getResponseHeader("etag"))&&(N.etag[o]=x)),204===t||"HEAD"===f.type?_="nocontent":304===t?_="notmodified":(_=w.state,p=w.data,c=!(h=w.error))):(h=_,!t&&_||(_="error",t<0&&(t=0))),k.status=t,k.statusText=(e||_)+"",c?v.resolveWith(m,[p,_,k]):v.rejectWith(m,[k,_,h]),k.statusCode(b),b=void 0,d&&g.trigger(c?"ajaxSuccess":"ajaxError",[k,f,c?p:h]),y.fireWith(m,[k,_]),d&&(g.trigger("ajaxComplete",[k,f]),--N.active||N.event.trigger("ajaxStop")))}return k},getJSON:function(t,e,n){return N.get(t,e,n,"json")},getScript:function(t,e){return N.get(t,void 0,e,"script")}}),N.each(["get","post"],(function(t,e){N[e]=function(t,n,i,o){return y(n)&&(o=o||i,i=n,n=void 0),N.ajax(N.extend({url:t,type:e,dataType:o,data:n,success:i},N.isPlainObject(t)&&t))}})),N._evalUrl=function(t,e){return N.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){N.globalEval(t,e)}})},N.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=N(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 y(t)?this.each((function(e){N(this).wrapInner(t.call(this,e))})):this.each((function(){var e=N(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=y(t);return this.each((function(n){N(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){N(this).replaceWith(this.childNodes)})),this}}),N.expr.pseudos.hidden=function(t){return!N.expr.pseudos.visible(t)},N.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},N.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var Ve={0:200,1223:204},Ge=N.ajaxSettings.xhr();v.cors=!!Ge&&"withCredentials"in Ge,v.ajax=Ge=!!Ge,N.ajaxTransport((function(t){var e,i;if(v.cors||Ge&&!t.crossDomain)return{send:function(o,r){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||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[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?r(0,"error"):r(a.status,a.statusText):r(Ve[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()}}})),N.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),N.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 N.globalEval(t),t}}}),N.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),N.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,o){e=N("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&o("error"===t.type?404:200,t.type)}),s.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Ze,Ke=[],Xe=/(=)\?(?=&|$)|\?\?/;N.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ke.pop()||N.expando+"_"+Ce++;return this[t]=!0,t}}),N.ajaxPrefilter("json jsonp",(function(t,e,i){var o,r,s,a=!1!==t.jsonp&&(Xe.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xe.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Xe,"$1"+o):!1!==t.jsonp&&(t.url+=(Oe.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||N.error(o+" was not called"),s[0]},t.dataTypes[0]="json",r=n[o],n[o]=function(){s=arguments},i.always((function(){void 0===r?N(n).removeProp(o):n[o]=r,t[o]&&(t.jsonpCallback=e.jsonpCallback,Ke.push(o)),s&&y(r)&&r(s[0]),s=r=void 0})),"script"})),v.createHTMLDocument=((Ze=s.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ze.childNodes.length),N.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(v.createHTMLDocument?((i=(e=s.implementation.createHTMLDocument("")).createElement("base")).href=s.location.href,e.head.appendChild(i)):e=s),r=!n&&[],(o=P.exec(t))?[e.createElement(o[1])]:(o=kt([t],e,r),r&&r.length&&N(r).remove(),N.merge([],o.childNodes)));var i,o,r},N.fn.load=function(t,e,n){var i,o,r,s=this,a=t.indexOf(" ");return a>-1&&(i=we(t.slice(a)),t=t.slice(0,a)),y(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&N.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done((function(t){r=arguments,s.html(i?N("<div>").append(N.parseHTML(t)).find(i):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,r||[t.responseText,e,t])}))}),this},N.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){N.fn[e]=function(t){return this.on(e,t)}})),N.expr.pseudos.animated=function(t){return N.grep(N.timers,(function(e){return t===e.elem})).length},N.offset={setOffset:function(t,e,n){var i,o,r,s,a,u,c=N.css(t,"position"),l=N(t),d={};"static"===c&&(t.style.position="relative"),a=l.offset(),r=N.css(t,"top"),u=N.css(t,"left"),("absolute"===c||"fixed"===c)&&(r+u).indexOf("auto")>-1?(s=(i=l.position()).top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(u)||0),y(e)&&(e=e.call(t,n,N.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+o),"using"in e?e.using.call(t,d):l.css(d)}},N.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){N.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],o={top:0,left:0};if("fixed"===N.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"===N.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((o=N(t).offset()).top+=N.css(t,"borderTopWidth",!0),o.left+=N.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-N.css(i,"marginTop",!0),left:e.left-o.left-N.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===N.css(t,"position");)t=t.offsetParent;return t||st}))}}),N.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;N.fn[t]=function(i){return W(this,(function(t,i,o){var r;if(b(t)?r=t:9===t.nodeType&&(r=t.defaultView),void 0===o)return r?r[e]:t[i];r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):t[i]=o}),t,i,arguments.length)}})),N.each(["top","left"],(function(t,e){N.cssHooks[e]=Gt(v.pixelPosition,(function(t,n){if(n)return n=Vt(t,e),qt.test(n)?N(t).position()[e]+"px":n}))})),N.each({Height:"height",Width:"width"},(function(t,e){N.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,i){N.fn[i]=function(o,r){var s=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===r?"margin":"border");return W(this,(function(e,n,o){var r;return b(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===o?N.css(e,n,a):N.style(e,n,o,a)}),e,s?o:void 0,s)}}))})),N.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){N.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}})),N.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),N.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)}}),N.proxy=function(t,e){var n,i,o;if("string"==typeof e&&(n=t[e],e=t,t=n),y(t))return i=u.call(arguments,2),(o=function(){return t.apply(e||this,i.concat(u.call(arguments)))}).guid=t.guid=t.guid||N.guid++,o},N.holdReady=function(t){t?N.readyWait++:N.ready(!0)},N.isArray=Array.isArray,N.parseJSON=JSON.parse,N.nodeName=j,N.isFunction=y,N.isWindow=b,N.camelCase=Z,N.type=_,N.now=Date.now,N.isNumeric=function(t){var e=N.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},void 0===(i=function(){return N}.apply(e,[]))||(t.exports=i);var Je=n.jQuery,Qe=n.$;return N.noConflict=function(t){return n.$===N&&(n.$=Qe),t&&n.jQuery===N&&(n.jQuery=Je),N},o||(n.jQuery=n.$=N),N}))},function(t,e,n){(function(e){t.exports=e.m=n(68)}).call(this,n(26))},function(t,e,n){(function(e){t.exports=e.moment=n(77)}).call(this,n(26))},function(t,e,n){(function(t){t.exports=function(){"use strict";var e,n;function i(){return e.apply(null,arguments)}function o(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function r(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function a(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function c(t,e){var n,i=[];for(n=0;n<t.length;++n)i.push(e(t[n],n));return i}function l(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function d(t,e){for(var n in e)l(e,n)&&(t[n]=e[n]);return l(e,"toString")&&(t.toString=e.toString),l(e,"valueOf")&&(t.valueOf=e.valueOf),t}function p(t,e,n,i){return _e(t,e,n,i,!0).utc()}function h(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function f(t){if(null==t._isValid){var e=h(t),i=n.call(e.parsedDateParts,(function(t){return null!=t})),o=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(o=o&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return o;t._isValid=o}return t._isValid}function m(t){var e=p(NaN);return null!=t?d(h(e),t):h(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,i=0;i<n;i++)if(i in e&&t.call(this,e[i],i,e))return!0;return!1};var g=i.momentProperties=[];function v(t,e){var n,i,o;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=h(e)),s(e._locale)||(t._locale=e._locale),g.length>0)for(n=0;n<g.length;n++)s(o=e[i=g[n]])||(t[i]=o);return t}var y=!1;function b(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,i.updateOffset(this),y=!1)}function w(t){return t instanceof b||null!=t&&null!=t._isAMomentObject}function x(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function _(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=x(e)),n}function N(t,e,n){var i,o=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),s=0;for(i=0;i<o;i++)(n&&t[i]!==e[i]||!n&&_(t[i])!==_(e[i]))&&s++;return s+r}function k(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function T(t,e){var n=!0;return d((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var o,r=[],s=0;s<arguments.length;s++){if(o="","object"==typeof arguments[s]){for(var a in o+="\n["+s+"] ",arguments[0])o+=a+": "+arguments[0][a]+", ";o=o.slice(0,-2)}else o=arguments[s];r.push(o)}k(t+"\nArguments: "+Array.prototype.slice.call(r).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var S,C={};function O(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),C[t]||(k(e),C[t]=!0)}function D(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function j(t,e){var n,i=d({},t);for(n in e)l(e,n)&&(r(t[n])&&r(e[n])?(i[n]={},d(i[n],t[n]),d(i[n],e[n])):null!=e[n]?i[n]=e[n]:delete i[n]);for(n in t)l(t,n)&&!l(e,n)&&r(t[n])&&(i[n]=d({},i[n]));return i}function P(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,S=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)l(t,e)&&n.push(e);return n};var E={};function M(t,e){var n=t.toLowerCase();E[n]=E[n+"s"]=E[e]=t}function A(t){return"string"==typeof t?E[t]||E[t.toLowerCase()]:void 0}function I(t){var e,n,i={};for(n in t)l(t,n)&&(e=A(n))&&(i[e]=t[n]);return i}var $={};function R(t,e){$[t]=e}function L(t,e,n){var i=""+Math.abs(t),o=e-i.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+i}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,B=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},F={};function Y(t,e,n,i){var o=i;"string"==typeof i&&(o=function(){return this[i]()}),t&&(F[t]=o),e&&(F[e[0]]=function(){return L(o.apply(this,arguments),e[1],e[2])}),n&&(F[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function q(t,e){return t.isValid()?(e=W(e,t.localeData()),U[e]=U[e]||function(t){var e,n,i,o=t.match(H);for(e=0,n=o.length;e<n;e++)F[o[e]]?o[e]=F[o[e]]:o[e]=(i=o[e]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(e){var i,r="";for(i=0;i<n;i++)r+=D(o[i])?o[i].call(e,t):o[i];return r}}(e),U[e](t)):t.localeData().invalidDate()}function W(t,e){var n=5;function i(t){return e.longDateFormat(t)||t}for(B.lastIndex=0;n>=0&&B.test(t);)t=t.replace(B,i),B.lastIndex=0,n-=1;return t}var z=/\d/,V=/\d\d/,G=/\d{3}/,Z=/\d{4}/,K=/[+-]?\d{6}/,X=/\d\d?/,J=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,tt=/\d{1,3}/,et=/\d{1,4}/,nt=/[+-]?\d{1,6}/,it=/\d+/,ot=/[+-]?\d+/,rt=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,at=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function ct(t,e,n){ut[t]=D(e)?e:function(t,i){return t&&n?n:e}}function lt(t,e){return l(ut,t)?ut[t](e._strict,e._locale):new RegExp(dt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,i,o){return e||n||i||o}))))}function dt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pt={};function ht(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),a(e)&&(i=function(t,n){n[e]=_(t)}),n=0;n<t.length;n++)pt[t[n]]=i}function ft(t,e){ht(t,(function(t,n,i,o){i._w=i._w||{},e(t,i._w,i,o)}))}function mt(t,e,n){null!=e&&l(pt,t)&&pt[t](e,n._a,n,t)}function gt(t){return vt(t)?366:365}function vt(t){return t%4==0&&t%100!=0||t%400==0}Y("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),Y(0,["YY",2],0,(function(){return this.year()%100})),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),M("year","y"),R("year",1),ct("Y",ot),ct("YY",X,V),ct("YYYY",et,Z),ct("YYYYY",nt,K),ct("YYYYYY",nt,K),ht(["YYYYY","YYYYYY"],0),ht("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):_(t)})),ht("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),ht("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return _(t)+(_(t)>68?1900:2e3)};var yt,bt=wt("FullYear",!0);function wt(t,e){return function(n){return null!=n?(_t(this,t,n),i.updateOffset(this,e),this):xt(this,t)}}function xt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function _t(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&vt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Nt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function Nt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,i=(e%(n=12)+n)%n;return t+=(e-i)/12,1===i?vt(t)?29:28:31-i%7%2}yt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},Y("M",["MM",2],"Mo",(function(){return this.month()+1})),Y("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),Y("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),M("month","M"),R("month",8),ct("M",X),ct("MM",X,V),ct("MMM",(function(t,e){return e.monthsShortRegex(t)})),ct("MMMM",(function(t,e){return e.monthsRegex(t)})),ht(["M","MM"],(function(t,e){e[1]=_(t)-1})),ht(["MMM","MMMM"],(function(t,e,n,i){var o=n._locale.monthsParse(t,i,n._strict);null!=o?e[1]=o:h(n).invalidMonth=t}));var kt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Tt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),St="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ct(t,e,n){var i,o,r,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=p([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(o=yt.call(this._shortMonthsParse,s))?o:null:-1!==(o=yt.call(this._longMonthsParse,s))?o:null:"MMM"===e?-1!==(o=yt.call(this._shortMonthsParse,s))||-1!==(o=yt.call(this._longMonthsParse,s))?o:null:-1!==(o=yt.call(this._longMonthsParse,s))||-1!==(o=yt.call(this._shortMonthsParse,s))?o:null}function Ot(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=_(e);else if(!a(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),Nt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Dt(t){return null!=t?(Ot(this,t),i.updateOffset(this,!0),this):xt(this,"Month")}var jt=at,Pt=at;function Et(){function t(t,e){return e.length-t.length}var e,n,i=[],o=[],r=[];for(e=0;e<12;e++)n=p([2e3,e]),i.push(this.monthsShort(n,"")),o.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(t),o.sort(t),r.sort(t),e=0;e<12;e++)i[e]=dt(i[e]),o[e]=dt(o[e]);for(e=0;e<24;e++)r[e]=dt(r[e]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Mt(t,e,n,i,o,r,s){var a=new Date(t,e,n,i,o,r,s);return t<100&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function At(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function It(t,e,n){var i=7+e-n;return-(7+At(t,0,i).getUTCDay()-e)%7+i-1}function $t(t,e,n,i,o){var r,s,a=1+7*(e-1)+(7+n-i)%7+It(t,i,o);return a<=0?s=gt(r=t-1)+a:a>gt(t)?(r=t+1,s=a-gt(t)):(r=t,s=a),{year:r,dayOfYear:s}}function Rt(t,e,n){var i,o,r=It(t.year(),e,n),s=Math.floor((t.dayOfYear()-r-1)/7)+1;return s<1?i=s+Lt(o=t.year()-1,e,n):s>Lt(t.year(),e,n)?(i=s-Lt(t.year(),e,n),o=t.year()+1):(o=t.year(),i=s),{week:i,year:o}}function Lt(t,e,n){var i=It(t,e,n),o=It(t+1,e,n);return(gt(t)-i+o)/7}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),M("week","w"),M("isoWeek","W"),R("week",5),R("isoWeek",5),ct("w",X),ct("ww",X,V),ct("W",X),ct("WW",X,V),ft(["w","ww","W","WW"],(function(t,e,n,i){e[i.substr(0,1)]=_(t)})),Y("d",0,"do","day"),Y("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),Y("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),Y("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),M("day","d"),M("weekday","e"),M("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),ct("d",X),ct("e",X),ct("E",X),ct("dd",(function(t,e){return e.weekdaysMinRegex(t)})),ct("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),ct("dddd",(function(t,e){return e.weekdaysRegex(t)})),ft(["dd","ddd","dddd"],(function(t,e,n,i){var o=n._locale.weekdaysParse(t,i,n._strict);null!=o?e.d=o:h(n).invalidWeekday=t})),ft(["d","e","E"],(function(t,e,n,i){e[i]=_(t)}));var Ht="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Bt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ut="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ft(t,e,n){var i,o,r,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=p([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(o=yt.call(this._weekdaysParse,s))?o:null:"ddd"===e?-1!==(o=yt.call(this._shortWeekdaysParse,s))?o:null:-1!==(o=yt.call(this._minWeekdaysParse,s))?o:null:"dddd"===e?-1!==(o=yt.call(this._weekdaysParse,s))||-1!==(o=yt.call(this._shortWeekdaysParse,s))||-1!==(o=yt.call(this._minWeekdaysParse,s))?o:null:"ddd"===e?-1!==(o=yt.call(this._shortWeekdaysParse,s))||-1!==(o=yt.call(this._weekdaysParse,s))||-1!==(o=yt.call(this._minWeekdaysParse,s))?o:null:-1!==(o=yt.call(this._minWeekdaysParse,s))||-1!==(o=yt.call(this._weekdaysParse,s))||-1!==(o=yt.call(this._shortWeekdaysParse,s))?o:null}var Yt=at,qt=at,Wt=at;function zt(){function t(t,e){return e.length-t.length}var e,n,i,o,r,s=[],a=[],u=[],c=[];for(e=0;e<7;e++)n=p([2e3,1]).day(e),i=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),r=this.weekdays(n,""),s.push(i),a.push(o),u.push(r),c.push(i),c.push(o),c.push(r);for(s.sort(t),a.sort(t),u.sort(t),c.sort(t),e=0;e<7;e++)a[e]=dt(a[e]),u[e]=dt(u[e]),c[e]=dt(c[e]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Vt(){return this.hours()%12||12}function Gt(t,e){Y(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Zt(t,e){return e._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,Vt),Y("k",["kk",2],0,(function(){return this.hours()||24})),Y("hmm",0,0,(function(){return""+Vt.apply(this)+L(this.minutes(),2)})),Y("hmmss",0,0,(function(){return""+Vt.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)})),Y("Hmm",0,0,(function(){return""+this.hours()+L(this.minutes(),2)})),Y("Hmmss",0,0,(function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)})),Gt("a",!0),Gt("A",!1),M("hour","h"),R("hour",13),ct("a",Zt),ct("A",Zt),ct("H",X),ct("h",X),ct("k",X),ct("HH",X,V),ct("hh",X,V),ct("kk",X,V),ct("hmm",J),ct("hmmss",Q),ct("Hmm",J),ct("Hmmss",Q),ht(["H","HH"],3),ht(["k","kk"],(function(t,e,n){var i=_(t);e[3]=24===i?0:i})),ht(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),ht(["h","hh"],(function(t,e,n){e[3]=_(t),h(n).bigHour=!0})),ht("hmm",(function(t,e,n){var i=t.length-2;e[3]=_(t.substr(0,i)),e[4]=_(t.substr(i)),h(n).bigHour=!0})),ht("hmmss",(function(t,e,n){var i=t.length-4,o=t.length-2;e[3]=_(t.substr(0,i)),e[4]=_(t.substr(i,2)),e[5]=_(t.substr(o)),h(n).bigHour=!0})),ht("Hmm",(function(t,e,n){var i=t.length-2;e[3]=_(t.substr(0,i)),e[4]=_(t.substr(i))})),ht("Hmmss",(function(t,e,n){var i=t.length-4,o=t.length-2;e[3]=_(t.substr(0,i)),e[4]=_(t.substr(i,2)),e[5]=_(t.substr(o))}));var Kt,Xt=wt("Hours",!0),Jt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d 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"},months:Tt,monthsShort:St,week:{dow:0,doy:6},weekdays:Ht,weekdaysMin:Ut,weekdaysShort:Bt,meridiemParse:/[ap]\.?m?\.?/i},Qt={},te={};function ee(t){return t?t.toLowerCase().replace("_","-"):t}function ne(e){var n=null;if(!Qt[e]&&void 0!==t&&t&&t.exports)try{n=Kt._abbr,!function(){var t=new Error("Cannot find module 'undefined'");throw t.code="MODULE_NOT_FOUND",t}(),ie(n)}catch(t){}return Qt[e]}function ie(t,e){var n;return t&&((n=s(e)?re(t):oe(t,e))?Kt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Kt._abbr}function oe(t,e){if(null!==e){var n,i=Jt;if(e.abbr=t,null!=Qt[t])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Qt[t]._config;else if(null!=e.parentLocale)if(null!=Qt[e.parentLocale])i=Qt[e.parentLocale]._config;else{if(null==(n=ne(e.parentLocale)))return te[e.parentLocale]||(te[e.parentLocale]=[]),te[e.parentLocale].push({name:t,config:e}),null;i=n._config}return Qt[t]=new P(j(i,e)),te[t]&&te[t].forEach((function(t){oe(t.name,t.config)})),ie(t),Qt[t]}return delete Qt[t],null}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Kt;if(!o(t)){if(e=ne(t))return e;t=[t]}return function(t){for(var e,n,i,o,r=0;r<t.length;){for(e=(o=ee(t[r]).split("-")).length,n=(n=ee(t[r+1]))?n.split("-"):null;e>0;){if(i=ne(o.slice(0,e).join("-")))return i;if(n&&n.length>=e&&N(o,n,!0)>=e-1)break;e--}r++}return Kt}(t)}function se(t){var e,n=t._a;return n&&-2===h(t).overflow&&(e=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Nt(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,h(t)._overflowDayOfYear&&(e<0||e>2)&&(e=2),h(t)._overflowWeeks&&-1===e&&(e=7),h(t)._overflowWeekday&&-1===e&&(e=8),h(t).overflow=e),t}function ae(t,e,n){return null!=t?t:null!=e?e:n}function ue(t){var e,n,o,r,s,a=[];if(!t._d){for(o=function(t){var e=new Date(i.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,i,o,r,s,a,u;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)r=1,s=4,n=ae(e.GG,t._a[0],Rt(Ne(),1,4).year),i=ae(e.W,1),((o=ae(e.E,1))<1||o>7)&&(u=!0);else{r=t._locale._week.dow,s=t._locale._week.doy;var c=Rt(Ne(),r,s);n=ae(e.gg,t._a[0],c.year),i=ae(e.w,c.week),null!=e.d?((o=e.d)<0||o>6)&&(u=!0):null!=e.e?(o=e.e+r,(e.e<0||e.e>6)&&(u=!0)):o=r}i<1||i>Lt(n,r,s)?h(t)._overflowWeeks=!0:null!=u?h(t)._overflowWeekday=!0:(a=$t(n,i,o,r,s),t._a[0]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(s=ae(t._a[0],o[0]),(t._dayOfYear>gt(s)||0===t._dayOfYear)&&(h(t)._overflowDayOfYear=!0),n=At(s,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=o[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?At:Mt).apply(null,a),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==r&&(h(t).weekdayMismatch=!0)}}var ce=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,le=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,de=/Z|[+-]\d\d(?::?\d\d)?/,pe=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],he=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],fe=/^\/?Date\((\-?\d+)/i;function me(t){var e,n,i,o,r,s,a=t._i,u=ce.exec(a)||le.exec(a);if(u){for(h(t).iso=!0,e=0,n=pe.length;e<n;e++)if(pe[e][1].exec(u[1])){o=pe[e][0],i=!1!==pe[e][2];break}if(null==o)return void(t._isValid=!1);if(u[3]){for(e=0,n=he.length;e<n;e++)if(he[e][1].exec(u[3])){r=(u[2]||" ")+he[e][0];break}if(null==r)return void(t._isValid=!1)}if(!i&&null!=r)return void(t._isValid=!1);if(u[4]){if(!de.exec(u[4]))return void(t._isValid=!1);s="Z"}t._f=o+(r||"")+(s||""),we(t)}else t._isValid=!1}var ge=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function ve(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}var ye={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function be(t){var e,n,i,o,r,s,a,u=ge.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){var c=(e=u[4],n=u[3],i=u[2],o=u[5],r=u[6],s=u[7],a=[ve(e),St.indexOf(n),parseInt(i,10),parseInt(o,10),parseInt(r,10)],s&&a.push(parseInt(s,10)),a);if(!function(t,e,n){return!t||Bt.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(h(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],c,t))return;t._a=c,t._tzm=function(t,e,n){if(t)return ye[t];if(e)return 0;var i=parseInt(n,10),o=i%100;return(i-o)/100*60+o}(u[8],u[9],u[10]),t._d=At.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),h(t).rfc2822=!0}else t._isValid=!1}function we(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],h(t).empty=!0;var e,n,o,r,s,a=""+t._i,u=a.length,c=0;for(o=W(t._f,t._locale).match(H)||[],e=0;e<o.length;e++)r=o[e],(n=(a.match(lt(r,t))||[])[0])&&((s=a.substr(0,a.indexOf(n))).length>0&&h(t).unusedInput.push(s),a=a.slice(a.indexOf(n)+n.length),c+=n.length),F[r]?(n?h(t).empty=!1:h(t).unusedTokens.push(r),mt(r,n,t)):t._strict&&!n&&h(t).unusedTokens.push(r);h(t).charsLeftOver=u-c,a.length>0&&h(t).unusedInput.push(a),t._a[3]<=12&&!0===h(t).bigHour&&t._a[3]>0&&(h(t).bigHour=void 0),h(t).parsedDateParts=t._a.slice(0),h(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((i=t.isPM(n))&&e<12&&(e+=12),i||12!==e||(e=0),e):e}(t._locale,t._a[3],t._meridiem),ue(t),se(t)}else be(t);else me(t)}function xe(t){var e=t._i,n=t._f;return t._locale=t._locale||re(t._l),null===e||void 0===n&&""===e?m({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),w(e)?new b(se(e)):(u(e)?t._d=e:o(n)?function(t){var e,n,i,o,r;if(0===t._f.length)return h(t).invalidFormat=!0,void(t._d=new Date(NaN));for(o=0;o<t._f.length;o++)r=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[o],we(e),f(e)&&(r+=h(e).charsLeftOver,r+=10*h(e).unusedTokens.length,h(e).score=r,(null==i||r<i)&&(i=r,n=e));d(t,n||e)}(t):n?we(t):function(t){var e=t._i;s(e)?t._d=new Date(i.now()):u(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=fe.exec(t._i);null===e?(me(t),!1===t._isValid&&(delete t._isValid,be(t),!1===t._isValid&&(delete t._isValid,i.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):o(e)?(t._a=c(e.slice(0),(function(t){return parseInt(t,10)})),ue(t)):r(e)?function(t){if(!t._d){var e=I(t._i);t._a=c([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),ue(t)}}(t):a(e)?t._d=new Date(e):i.createFromInputFallback(t)}(t),f(t)||(t._d=null),t))}function _e(t,e,n,i,s){var a,u={};return!0!==n&&!1!==n||(i=n,n=void 0),(r(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||o(t)&&0===t.length)&&(t=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=s,u._l=n,u._i=t,u._f=e,u._strict=i,(a=new b(se(xe(u))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function Ne(t,e,n,i){return _e(t,e,n,i,!1)}i.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var ke=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Ne.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:m()})),Te=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Ne.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:m()}));function Se(t,e){var n,i;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return Ne();for(n=e[0],i=1;i<e.length;++i)e[i].isValid()&&!e[i][t](n)||(n=e[i]);return n}var Ce=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Oe(t){var e=I(t),n=e.year||0,i=e.quarter||0,o=e.month||0,r=e.week||0,s=e.day||0,a=e.hour||0,u=e.minute||0,c=e.second||0,l=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===yt.call(Ce,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,i=0;i<Ce.length;++i)if(t[Ce[i]]){if(n)return!1;parseFloat(t[Ce[i]])!==_(t[Ce[i]])&&(n=!0)}return!0}(e),this._milliseconds=+l+1e3*c+6e4*u+1e3*a*60*60,this._days=+s+7*r,this._months=+o+3*i+12*n,this._data={},this._locale=re(),this._bubble()}function De(t){return t instanceof Oe}function je(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Pe(t,e){Y(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+L(~~(t/60),2)+e+L(~~t%60,2)}))}Pe("Z",":"),Pe("ZZ",""),ct("Z",st),ct("ZZ",st),ht(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Me(st,t)}));var Ee=/([\+\-]|\d\d)/gi;function Me(t,e){var n=(e||"").match(t);if(null===n)return null;var i=((n[n.length-1]||[])+"").match(Ee)||["-",0,0],o=60*i[1]+_(i[2]);return 0===o?0:"+"===i[0]?o:-o}function Ae(t,e){var n,o;return e._isUTC?(n=e.clone(),o=(w(t)||u(t)?t.valueOf():Ne(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),i.updateOffset(n,!1),n):Ne(t).local()}function Ie(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function $e(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Re=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Le=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function He(t,e){var n,i,o,r,s,u,c=t,d=null;return De(t)?c={ms:t._milliseconds,d:t._days,M:t._months}:a(t)?(c={},e?c[e]=t:c.milliseconds=t):(d=Re.exec(t))?(n="-"===d[1]?-1:1,c={y:0,d:_(d[2])*n,h:_(d[3])*n,m:_(d[4])*n,s:_(d[5])*n,ms:_(je(1e3*d[6]))*n}):(d=Le.exec(t))?(n="-"===d[1]?-1:(d[1],1),c={y:Be(d[2],n),M:Be(d[3],n),w:Be(d[4],n),d:Be(d[5],n),h:Be(d[6],n),m:Be(d[7],n),s:Be(d[8],n)}):null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(r=Ne(c.from),s=Ne(c.to),o=r.isValid()&&s.isValid()?(s=Ae(s,r),r.isBefore(s)?u=Ue(r,s):((u=Ue(s,r)).milliseconds=-u.milliseconds,u.months=-u.months),u):{milliseconds:0,months:0},(c={}).ms=o.milliseconds,c.M=o.months),i=new Oe(c),De(t)&&l(t,"_locale")&&(i._locale=t._locale),i}function Be(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ue(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Fe(t,e){return function(n,i){var o;return null===i||isNaN(+i)||(O(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=i,i=o),Ye(this,He(n="string"==typeof n?+n:n,i),t),this}}function Ye(t,e,n,o){var r=e._milliseconds,s=je(e._days),a=je(e._months);t.isValid()&&(o=null==o||o,a&&Ot(t,xt(t,"Month")+a*n),s&&_t(t,"Date",xt(t,"Date")+s*n),r&&t._d.setTime(t._d.valueOf()+r*n),o&&i.updateOffset(t,s||a))}He.fn=Oe.prototype,He.invalid=function(){return He(NaN)};var qe=Fe(1,"add"),We=Fe(-1,"subtract");function ze(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(n,"months");return-(n+(e-i<0?(e-i)/(i-t.clone().add(n-1,"months")):(e-i)/(t.clone().add(n+1,"months")-i)))||0}function Ve(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ge=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function Ze(){return this._locale}function Ke(t,e){Y(0,[t,t.length],0,e)}function Xe(t,e,n,i,o){var r;return null==t?Rt(this,i,o).year:(e>(r=Lt(t,i,o))&&(e=r),Je.call(this,t,e,n,i,o))}function Je(t,e,n,i,o){var r=$t(t,e,n,i,o),s=At(r.year,0,r.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}Y(0,["gg",2],0,(function(){return this.weekYear()%100})),Y(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Ke("gggg","weekYear"),Ke("ggggg","weekYear"),Ke("GGGG","isoWeekYear"),Ke("GGGGG","isoWeekYear"),M("weekYear","gg"),M("isoWeekYear","GG"),R("weekYear",1),R("isoWeekYear",1),ct("G",ot),ct("g",ot),ct("GG",X,V),ct("gg",X,V),ct("GGGG",et,Z),ct("gggg",et,Z),ct("GGGGG",nt,K),ct("ggggg",nt,K),ft(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,i){e[i.substr(0,2)]=_(t)})),ft(["gg","GG"],(function(t,e,n,o){e[o]=i.parseTwoDigitYear(t)})),Y("Q",0,"Qo","quarter"),M("quarter","Q"),R("quarter",7),ct("Q",z),ht("Q",(function(t,e){e[1]=3*(_(t)-1)})),Y("D",["DD",2],"Do","date"),M("date","D"),R("date",9),ct("D",X),ct("DD",X,V),ct("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),ht(["D","DD"],2),ht("Do",(function(t,e){e[2]=_(t.match(X)[0])}));var Qe=wt("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),M("dayOfYear","DDD"),R("dayOfYear",4),ct("DDD",tt),ct("DDDD",G),ht(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=_(t)})),Y("m",["mm",2],0,"minute"),M("minute","m"),R("minute",14),ct("m",X),ct("mm",X,V),ht(["m","mm"],4);var tn=wt("Minutes",!1);Y("s",["ss",2],0,"second"),M("second","s"),R("second",15),ct("s",X),ct("ss",X,V),ht(["s","ss"],5);var en,nn=wt("Seconds",!1);for(Y("S",0,0,(function(){return~~(this.millisecond()/100)})),Y(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),Y(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),Y(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),Y(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),Y(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),Y(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),M("millisecond","ms"),R("millisecond",16),ct("S",tt,z),ct("SS",tt,V),ct("SSS",tt,G),en="SSSS";en.length<=9;en+="S")ct(en,it);function on(t,e){e[6]=_(1e3*("0."+t))}for(en="S";en.length<=9;en+="S")ht(en,on);var rn=wt("Milliseconds",!1);Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var sn=b.prototype;function an(t){return t}sn.add=qe,sn.calendar=function(t,e){var n=t||Ne(),o=Ae(n,this).startOf("day"),r=i.calendarFormat(this,o)||"sameElse",s=e&&(D(e[r])?e[r].call(this,n):e[r]);return this.format(s||this.localeData().calendar(r,this,Ne(n)))},sn.clone=function(){return new b(this)},sn.diff=function(t,e,n){var i,o,r;if(!this.isValid())return NaN;if(!(i=Ae(t,this)).isValid())return NaN;switch(o=6e4*(i.utcOffset()-this.utcOffset()),e=A(e)){case"year":r=ze(this,i)/12;break;case"month":r=ze(this,i);break;case"quarter":r=ze(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-o)/864e5;break;case"week":r=(this-i-o)/6048e5;break;default:r=this-i}return n?r:x(r)},sn.endOf=function(t){return void 0===(t=A(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},sn.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=q(this,t);return this.localeData().postformat(e)},sn.from=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||Ne(t).isValid())?He({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},sn.fromNow=function(t){return this.from(Ne(),t)},sn.to=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||Ne(t).isValid())?He({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},sn.toNow=function(t){return this.to(Ne(),t)},sn.get=function(t){return D(this[t=A(t)])?this[t]():this},sn.invalidAt=function(){return h(this).overflow},sn.isAfter=function(t,e){var n=w(t)?t:Ne(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=A(s(e)?"millisecond":e))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},sn.isBefore=function(t,e){var n=w(t)?t:Ne(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=A(s(e)?"millisecond":e))?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},sn.isBetween=function(t,e,n,i){return("("===(i=i||"()")[0]?this.isAfter(t,n):!this.isBefore(t,n))&&(")"===i[1]?this.isBefore(e,n):!this.isAfter(e,n))},sn.isSame=function(t,e){var n,i=w(t)?t:Ne(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=A(e||"millisecond"))?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},sn.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},sn.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},sn.isValid=function(){return f(this)},sn.lang=Ge,sn.locale=Ve,sn.localeData=Ze,sn.max=Te,sn.min=ke,sn.parsingFlags=function(){return d({},h(this))},sn.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:$[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=I(t)),i=0;i<n.length;i++)this[n[i].unit](t[n[i].unit]);else if(D(this[t=A(t)]))return this[t](e);return this},sn.startOf=function(t){switch(t=A(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},sn.subtract=We,sn.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},sn.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},sn.toDate=function(){return new Date(this.valueOf())},sn.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?q(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",q(n,"Z")):q(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},sn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=e+'[")]';return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+o)},sn.toJSON=function(){return this.isValid()?this.toISOString():null},sn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},sn.unix=function(){return Math.floor(this.valueOf()/1e3)},sn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},sn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},sn.year=bt,sn.isLeapYear=function(){return vt(this.year())},sn.weekYear=function(t){return Xe.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},sn.isoWeekYear=function(t){return Xe.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},sn.quarter=sn.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},sn.month=Dt,sn.daysInMonth=function(){return Nt(this.year(),this.month())},sn.week=sn.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},sn.isoWeek=sn.isoWeeks=function(t){var e=Rt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},sn.weeksInYear=function(){var t=this.localeData()._week;return Lt(this.year(),t.dow,t.doy)},sn.isoWeeksInYear=function(){return Lt(this.year(),1,4)},sn.date=Qe,sn.day=sn.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},sn.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},sn.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},sn.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},sn.hour=sn.hours=Xt,sn.minute=sn.minutes=tn,sn.second=sn.seconds=nn,sn.millisecond=sn.milliseconds=rn,sn.utcOffset=function(t,e,n){var o,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Me(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(o=Ie(this)),this._offset=t,this._isUTC=!0,null!=o&&this.add(o,"m"),r!==t&&(!e||this._changeInProgress?Ye(this,He(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:Ie(this)},sn.utc=function(t){return this.utcOffset(0,t)},sn.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ie(this),"m")),this},sn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Me(rt,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},sn.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Ne(t).utcOffset():0,(this.utcOffset()-t)%60==0)},sn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},sn.isLocal=function(){return!!this.isValid()&&!this._isUTC},sn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},sn.isUtc=$e,sn.isUTC=$e,sn.zoneAbbr=function(){return this._isUTC?"UTC":""},sn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},sn.dates=T("dates accessor is deprecated. Use date instead.",Qe),sn.months=T("months accessor is deprecated. Use month instead",Dt),sn.years=T("years accessor is deprecated. Use year instead",bt),sn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),sn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=xe(t))._a){var e=t._isUTC?p(t._a):Ne(t._a);this._isDSTShifted=this.isValid()&&N(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var un=P.prototype;function cn(t,e,n,i){var o=re(),r=p().set(i,e);return o[n](r,t)}function ln(t,e,n){if(a(t)&&(e=t,t=void 0),t=t||"",null!=e)return cn(t,e,n,"month");var i,o=[];for(i=0;i<12;i++)o[i]=cn(t,i,n,"month");return o}function dn(t,e,n,i){"boolean"==typeof t?(a(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,a(e)&&(n=e,e=void 0),e=e||"");var o,r=re(),s=t?r._week.dow:0;if(null!=n)return cn(e,(n+s)%7,i,"day");var u=[];for(o=0;o<7;o++)u[o]=cn(e,(o+s)%7,i,"day");return u}un.calendar=function(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return D(i)?i.call(e,n):i},un.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},un.invalidDate=function(){return this._invalidDate},un.ordinal=function(t){return this._ordinal.replace("%d",t)},un.preparse=an,un.postformat=an,un.relativeTime=function(t,e,n,i){var o=this._relativeTime[n];return D(o)?o(t,e,n,i):o.replace(/%d/i,t)},un.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return D(n)?n(e):n.replace(/%s/i,e)},un.set=function(t){var e,n;for(n in t)D(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},un.months=function(t,e){return t?o(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||kt).test(e)?"format":"standalone"][t.month()]:o(this._months)?this._months:this._months.standalone},un.monthsShort=function(t,e){return t?o(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[kt.test(e)?"format":"standalone"][t.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},un.monthsParse=function(t,e,n){var i,o,r;if(this._monthsParseExact)return Ct.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(o=p([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}},un.monthsRegex=function(t){return this._monthsParseExact?(l(this,"_monthsRegex")||Et.call(this),t?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=Pt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},un.monthsShortRegex=function(t){return this._monthsParseExact?(l(this,"_monthsRegex")||Et.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=jt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},un.week=function(t){return Rt(t,this._week.dow,this._week.doy).week},un.firstDayOfYear=function(){return this._week.doy},un.firstDayOfWeek=function(){return this._week.dow},un.weekdays=function(t,e){return t?o(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},un.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},un.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},un.weekdaysParse=function(t,e,n){var i,o,r;if(this._weekdaysParseExact)return Ft.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(o=p([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}},un.weekdaysRegex=function(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||zt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Yt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},un.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||zt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},un.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||zt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Wt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},un.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},un.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},ie("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===_(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=T("moment.lang is deprecated. Use moment.locale instead.",ie),i.langData=T("moment.langData is deprecated. Use moment.localeData instead.",re);var pn=Math.abs;function hn(t,e,n,i){var o=He(e,n);return t._milliseconds+=i*o._milliseconds,t._days+=i*o._days,t._months+=i*o._months,t._bubble()}function fn(t){return t<0?Math.floor(t):Math.ceil(t)}function mn(t){return 4800*t/146097}function gn(t){return 146097*t/4800}function vn(t){return function(){return this.as(t)}}var yn=vn("ms"),bn=vn("s"),wn=vn("m"),xn=vn("h"),_n=vn("d"),Nn=vn("w"),kn=vn("M"),Tn=vn("y");function Sn(t){return function(){return this.isValid()?this._data[t]:NaN}}var Cn=Sn("milliseconds"),On=Sn("seconds"),Dn=Sn("minutes"),jn=Sn("hours"),Pn=Sn("days"),En=Sn("months"),Mn=Sn("years"),An=Math.round,In={ss:44,s:45,m:45,h:22,d:26,M:11};function $n(t,e,n,i,o){return o.relativeTime(e||1,!!n,t,i)}var Rn=Math.abs;function Ln(t){return(t>0)-(t<0)||+t}function Hn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Rn(this._milliseconds)/1e3,i=Rn(this._days),o=Rn(this._months);t=x(n/60),e=x(t/60),n%=60,t%=60;var r=x(o/12),s=o%=12,a=i,u=e,c=t,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var p=d<0?"-":"",h=Ln(this._months)!==Ln(d)?"-":"",f=Ln(this._days)!==Ln(d)?"-":"",m=Ln(this._milliseconds)!==Ln(d)?"-":"";return p+"P"+(r?h+r+"Y":"")+(s?h+s+"M":"")+(a?f+a+"D":"")+(u||c||l?"T":"")+(u?m+u+"H":"")+(c?m+c+"M":"")+(l?m+l+"S":"")}var Bn=Oe.prototype;return Bn.isValid=function(){return this._isValid},Bn.abs=function(){var t=this._data;return this._milliseconds=pn(this._milliseconds),this._days=pn(this._days),this._months=pn(this._months),t.milliseconds=pn(t.milliseconds),t.seconds=pn(t.seconds),t.minutes=pn(t.minutes),t.hours=pn(t.hours),t.months=pn(t.months),t.years=pn(t.years),this},Bn.add=function(t,e){return hn(this,t,e,1)},Bn.subtract=function(t,e){return hn(this,t,e,-1)},Bn.as=function(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=A(t))||"year"===t)return e=this._days+i/864e5,n=this._months+mn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(gn(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}},Bn.asMilliseconds=yn,Bn.asSeconds=bn,Bn.asMinutes=wn,Bn.asHours=xn,Bn.asDays=_n,Bn.asWeeks=Nn,Bn.asMonths=kn,Bn.asYears=Tn,Bn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12):NaN},Bn._bubble=function(){var t,e,n,i,o,r=this._milliseconds,s=this._days,a=this._months,u=this._data;return r>=0&&s>=0&&a>=0||r<=0&&s<=0&&a<=0||(r+=864e5*fn(gn(a)+s),s=0,a=0),u.milliseconds=r%1e3,t=x(r/1e3),u.seconds=t%60,e=x(t/60),u.minutes=e%60,n=x(e/60),u.hours=n%24,s+=x(n/24),o=x(mn(s)),a+=o,s-=fn(gn(o)),i=x(a/12),a%=12,u.days=s,u.months=a,u.years=i,this},Bn.clone=function(){return He(this)},Bn.get=function(t){return t=A(t),this.isValid()?this[t+"s"]():NaN},Bn.milliseconds=Cn,Bn.seconds=On,Bn.minutes=Dn,Bn.hours=jn,Bn.days=Pn,Bn.weeks=function(){return x(this.days()/7)},Bn.months=En,Bn.years=Mn,Bn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=function(t,e,n){var i=He(t).abs(),o=An(i.as("s")),r=An(i.as("m")),s=An(i.as("h")),a=An(i.as("d")),u=An(i.as("M")),c=An(i.as("y")),l=o<=In.ss&&["s",o]||o<In.s&&["ss",o]||r<=1&&["m"]||r<In.m&&["mm",r]||s<=1&&["h"]||s<In.h&&["hh",s]||a<=1&&["d"]||a<In.d&&["dd",a]||u<=1&&["M"]||u<In.M&&["MM",u]||c<=1&&["y"]||["yy",c];return l[2]=e,l[3]=+t>0,l[4]=n,$n.apply(null,l)}(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)},Bn.toISOString=Hn,Bn.toString=Hn,Bn.toJSON=Hn,Bn.locale=Ve,Bn.localeData=Ze,Bn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Hn),Bn.lang=Ge,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),ct("x",ot),ct("X",/[+-]?\d+(\.\d{1,3})?/),ht("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),ht("x",(function(t,e,n){n._d=new Date(_(t))})),i.version="2.22.2",e=Ne,i.fn=sn,i.min=function(){var t=[].slice.call(arguments,0);return Se("isBefore",t)},i.max=function(){var t=[].slice.call(arguments,0);return Se("isAfter",t)},i.now=function(){return Date.now?Date.now():+new Date},i.utc=p,i.unix=function(t){return Ne(1e3*t)},i.months=function(t,e){return ln(t,e,"months")},i.isDate=u,i.locale=ie,i.invalid=m,i.duration=He,i.isMoment=w,i.weekdays=function(t,e,n){return dn(t,e,n,"weekdays")},i.parseZone=function(){return Ne.apply(null,arguments).parseZone()},i.localeData=re,i.isDuration=De,i.monthsShort=function(t,e){return ln(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return dn(t,e,n,"weekdaysMin")},i.defineLocale=oe,i.updateLocale=function(t,e){if(null!=e){var n,i,o=Jt;null!=(i=ne(t))&&(o=i._config),e=j(o,e),(n=new P(e)).parentLocale=Qt[t],Qt[t]=n,ie(t)}else null!=Qt[t]&&(null!=Qt[t].parentLocale?Qt[t]=Qt[t].parentLocale:null!=Qt[t]&&delete Qt[t]);return Qt[t]},i.locales=function(){return S(Qt)},i.weekdaysShort=function(t,e,n){return dn(t,e,n,"weekdaysShort")},i.normalizeUnits=A,i.relativeTimeRounding=function(t){return void 0===t?An:"function"==typeof t&&(An=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==In[t]&&(void 0===e?In[t]:(In[t]=e,"s"===t&&(In.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=sn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(67)(t))},function(t,e,n){(function(e){e.m||(e.m={}),t.exports=e.m.bidi=n(79)}).call(this,n(26))},function(t,e,n){var i,o,r,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},o=[n(68)],void 0===(r="function"==typeof(i=s)?i.apply(e,o):i)||(t.exports=r)},function(t,e){!function(t){"use strict";var e=function(n,i){this.options=t.extend({},e.DEFAULTS,i);var o=this.options.target===e.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=o.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),o=i.data("bs.affix"),r="object"==typeof n&&n;o||i.data("bs.affix",o=new e(this,r)),"string"==typeof n&&o[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 o=this.$target.scrollTop(),r=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return o<n&&"top";if("bottom"==this.affixed)return null!=n?!(o+this.unpin<=r.top)&&"bottom":!(o+s<=t-i)&&"bottom";var a=null==this.affixed,u=a?o:r.top;return null!=n&&o<=n?"top":null!=i&&u+(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,o=i.top,r=i.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(r=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof r&&(r=i.bottom(this.$element));var a=this.getState(s,n,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),c=t.Event(u+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-r})}};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 o(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),o=i(e),r={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(e.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var r=i(n),s=r.hasClass("open");if(o(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",o);var a={relatedTarget:this};if(r.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.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 o=t(this);if(n.preventDefault(),n.stopPropagation(),!o.is(".disabled, :disabled")){var r=i(o),s=r.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&r.find(e).trigger("focus"),o.trigger("click");var a=r.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var u=a.index(n.target);38==n.which&&u>0&&u--,40==n.which&&u<a.length-1&&u++,~u||(u=0),a.eq(u).trigger("focus")}}}};var r=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var i=t(this),o=i.data("bs.dropdown");o||i.data("bs.dropdown",o=new n(this)),"string"==typeof e&&o[e].call(i)}))},t.fn.dropdown.Constructor=n,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=r,this},t(document).on("click.bs.dropdown.data-api",o).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 o=t(this),r=o.data("bs.modal"),s=t.extend({},e.DEFAULTS,o.data(),"object"==typeof n&&n);r||o.data("bs.modal",r=new e(this,s)),"string"==typeof n?r[n](i):s.show&&r.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,o=t.Event("show.bs.modal",{relatedTarget:n});this.$element.trigger(o),this.isShown||o.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 o=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),o&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var r=t.Event("shown.bs.modal",{relatedTarget:n});o?i.$dialog.one("bsTransitionEnd",(function(){i.$element.trigger("focus").trigger(r)})).emulateTransitionEnd(e.TRANSITION_DURATION):i.$element.trigger("focus").trigger(r)})))},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,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=t.support.transition&&o;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+o).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)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!n)return;r?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 o=i.style.paddingRight,r=t(i).css("padding-right");t(i).data("padding-right",o).css("padding-right",parseFloat(r)+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),o=i.attr("href"),r=i.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,""),s=t(document).find(r),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},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:[]},o=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,r=/^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(o)||e.nodeValue.match(r));for(var a=t(i).filter((function(t,e){return e instanceof RegExp})),u=0,c=a.length;u<c;u++)if(s.match(a[u]))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 o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=e;for(var r=t.map(n,(function(t,e){return e})),a=t(o.body).find("*"),u=0,c=a.length;u<c;u++){var l=a[u],d=l.nodeName.toLowerCase();if(-1!==t.inArray(d,r))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 o.body.innerHTML}var u=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)};u.VERSION="3.4.1",u.TRANSITION_DURATION=150,u.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},u.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 o=this.options.trigger.split(" "),r=o.length;r--;){var s=o[r];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",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},u.prototype.getDefaults=function(){return u.DEFAULTS},u.prototype.getOptions=function(n){var i=this.$element.data();for(var o in i)i.hasOwnProperty(o)&&-1!==t.inArray(o,e)&&delete i[o];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},u.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},u.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)}},u.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},u.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)}},u.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,o=this.tip(),r=this.getUID(this.type);this.setContent(),o.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,c=a.test(s);c&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(t(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),d=o[0].offsetWidth,p=o[0].offsetHeight;if(c){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,o.removeClass(h).addClass(s)}var m=this.getCalculatedOffset(s,l,d,p);this.applyPlacement(m,s);var g=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")?o.one("bsTransitionEnd",g).emulateTransitionEnd(u.TRANSITION_DURATION):g()}},u.prototype.applyPlacement=function(e,n){var i=this.tip(),o=i[0].offsetWidth,r=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 u=i[0].offsetWidth,c=i[0].offsetHeight;"top"==n&&c!=r&&(e.top=e.top+r-c);var l=this.getViewportAdjustedDelta(n,e,u,c);l.left?e.left+=l.left:e.top+=l.top;var d=/top|bottom/.test(n),p=d?2*l.left-o+u:2*l.top-r+c,h=d?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(p,i[0][h],d)},u.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},u.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")},u.prototype.hide=function(e){var n=this,i=t(this.$tip),o=t.Event("hide.bs."+this.type);function r(){"in"!=n.hoverState&&i.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}if(this.$element.trigger(o),!o.isDefaultPrevented())return i.removeClass("in"),t.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",r).emulateTransitionEnd(u.TRANSITION_DURATION):r(),this.hoverState=null,this},u.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","")},u.prototype.hasContent=function(){return this.getTitle()},u.prototype.getPosition=function(e){var n=(e=e||this.$element)[0],i="BODY"==n.tagName,o=n.getBoundingClientRect();null==o.width&&(o=t.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var r=window.SVGElement&&n instanceof window.SVGElement,s=i?{top:0,left:0}:r?null:e.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},u=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},o,a,u,s)},u.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}},u.prototype.getViewportAdjustedDelta=function(t,e,n,i){var o={top:0,left:0};if(!this.$viewport)return o;var r=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-r-s.scroll,u=e.top+r-s.scroll+i;a<s.top?o.top=s.top-a:u>s.top+s.height&&(o.top=s.top+s.height-u)}else{var c=e.left-r,l=e.left+r+n;c<s.left?o.left=s.left-c:l>s.right&&(o.left=s.left+s.width-l)}return o},u.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)},u.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},u.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},u.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},u.prototype.enable=function(){this.enabled=!0},u.prototype.disable=function(){this.enabled=!1},u.prototype.toggleEnabled=function(){this.enabled=!this.enabled},u.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)},u.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}))},u.prototype.sanitizeHtml=function(t){return a(t,this.options.whiteList,this.options.sanitizeFn)};var c=t.fn.tooltip;t.fn.tooltip=function(e){return this.each((function(){var n=t(this),i=n.data("bs.tooltip"),o="object"==typeof e&&e;!i&&/destroy|hide/.test(e)||(i||n.data("bs.tooltip",i=new u(this,o)),"string"==typeof e&&i[e]())}))},t.fn.tooltip.Constructor=u,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=c,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 o="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],r=String.fromCharCode(e.which).toLowerCase(),s="",a={};t.each(["alt","ctrl","shift"],(function(t,n){e[n+"Key"]&&o!==n&&(s+=n+"+")})),e.metaKey&&!e.ctrlKey&&"meta"!==o&&(s+="meta+"),e.metaKey&&"meta"!==o&&s.indexOf("alt+ctrl+shift+")>-1&&(s=s.replace("alt+ctrl+shift+","hyper+")),o?a[s+o]=!0:(a[s+r]=!0,a[s+t.hotkeys.shiftNums[r]]=!0,"shift+"===s&&(a[t.hotkeys.shiftNums[r]]=!0));for(var u=0,c=i.length;u<c;u++)if(a[i[u]])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(e){t.exports=e.punycode=n(88)}).call(this,n(26))},function(t,e,n){(function(t,i){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(r){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof i&&i;s.global!==s&&s.window!==s&&s.self;var a,u=2147483647,c=/^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 g(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function v(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+g((t=t.replace(d,".")).split("."),e).join(".")}function y(t){for(var e,n,i=[],o=0,r=t.length;o<r;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<r?56320==(64512&(n=t.charCodeAt(o++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),o--):i.push(e);return i}function b(t){return g(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 _(t){var e,n,i,o,r,s,a,c,l,d,p,f=[],g=t.length,v=0,y=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(o=n>0?n+1:0;o<g;){for(r=v,s=1,a=36;o>=g&&m("invalid-input"),((c=(p=t.charCodeAt(o++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||c>h((u-v)/s))&&m("overflow"),v+=c*s,!(c<(l=a<=w?1:a>=w+26?26:a-w));a+=36)s>h(u/(d=36-l))&&m("overflow"),s*=d;w=x(v-r,e=f.length+1,0==r),h(v/e)>u-y&&m("overflow"),y+=h(v/e),v%=e,f.splice(v++,0,y)}return b(f)}function N(t){var e,n,i,o,r,s,a,c,l,d,p,g,v,b,_,N=[];for(g=(t=y(t)).length,e=128,n=0,r=72,s=0;s<g;++s)(p=t[s])<128&&N.push(f(p));for(i=o=N.length,o&&N.push("-");i<g;){for(a=u,s=0;s<g;++s)(p=t[s])>=e&&p<a&&(a=p);for(a-e>h((u-n)/(v=i+1))&&m("overflow"),n+=(a-e)*v,e=a,s=0;s<g;++s)if((p=t[s])<e&&++n>u&&m("overflow"),p==e){for(c=n,l=36;!(c<(d=l<=r?1:l>=r+26?26:l-r));l+=36)_=c-d,b=36-d,N.push(f(w(d+_%b,0))),c=h(_/b);N.push(f(w(c,0))),r=x(n,v,i==o),n=0,++i}++n,++e}return N.join("")}a={version:"1.4.1",ucs2:{decode:y,encode:b},decode:_,encode:N,toASCII:function(t){return v(t,(function(t){return l.test(t)?"xn--"+N(t):t}))},toUnicode:function(t){return v(t,(function(t){return c.test(t)?_(t.slice(4).toLowerCase()):t}))}},void 0===(o=function(){return a}.call(e,n,e,t))||(t.exports=o)}()}).call(this,n(67)(t),n(26))},function(t,e,n){(function(e){t.exports=e.ColorThief=n(90)}).call(this,n(26))},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 o,s,a,u,c=new n(t),l=c.getImageData().data,d=c.getPixelCount(),p=[],h=0;d>h;h+=i)s=l[(o=4*h)+0],a=l[o+1],u=l[o+2],l[o+3]>=125&&(s>250&&a>250&&u>250||p.push([s,a,u]));var f=r.quantize(p,e),m=f?f.palette():null;return c.removeCanvas(),m},!o)var o={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,o){return n.index=o,t+e.call(n,i)}:function(t,e){return t+e},0)},max:function(t,e){return Math.max.apply(null,e?o.map(t,e):t)}};var r=function(){function t(t,e,n){return(t<<2*u)+(e<<u)+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,o,r,s){var a=this;a.r1=t,a.r2=e,a.g1=n,a.g2=i,a.b1=o,a.b2=r,a.histo=s}function i(){this.vboxes=new e((function(t,e){return o.naturalOrder(t.vbox.count()*t.vbox.volume(),e.vbox.count()*e.vbox.volume())}))}function r(e){var n,i,o,r,s=new Array(1<<3*u);return e.forEach((function(e){i=e[0]>>c,o=e[1]>>c,r=e[2]>>c,n=t(i,o,r),s[n]=(s[n]||0)+1})),s}function s(t,e){var i,o,r,s=1e6,a=0,u=1e6,l=0,d=1e6,p=0;return t.forEach((function(t){i=t[0]>>c,o=t[1]>>c,r=t[2]>>c,s>i?s=i:i>a&&(a=i),u>o?u=o:o>l&&(l=o),d>r?d=r:r>p&&(p=r)})),new n(s,a,u,l,d,p,e)}function a(e,n){if(n.count()){var i=n.r2-n.r1+1,r=n.g2-n.g1+1,s=n.b2-n.b1+1,a=o.max([i,r,s]);if(1==n.count())return[n.copy()];var u,c,l,d,p=0,h=[],f=[];if(a==i)for(u=n.r1;u<=n.r2;u++){for(d=0,c=n.g1;c<=n.g2;c++)for(l=n.b1;l<=n.b2;l++)d+=e[t(u,c,l)]||0;p+=d,h[u]=p}else if(a==r)for(u=n.g1;u<=n.g2;u++){for(d=0,c=n.r1;c<=n.r2;c++)for(l=n.b1;l<=n.b2;l++)d+=e[t(c,u,l)]||0;p+=d,h[u]=p}else for(u=n.b1;u<=n.b2;u++){for(d=0,c=n.r1;c<=n.r2;c++)for(l=n.g1;l<=n.g2;l++)d+=e[t(c,l,u)]||0;p+=d,h[u]=p}return h.forEach((function(t,e){f[e]=p-t})),function(t){var e,i,o,r,s,a=t+"1",c=t+"2",l=0;for(u=n[a];u<=n[c];u++)if(h[u]>p/2){for(o=n.copy(),r=n.copy(),e=u-n[a],s=(i=n[c]-u)>=e?Math.min(n[c]-1,~~(u+i/2)):Math.max(n[a],~~(u-1-e/2));!h[s];)s++;for(l=f[s];!l&&h[s-1];)l=f[--s];return o[c]=s,r[a]=o[c]+1,[o,r]}}(a==i?"r":a==r?"g":"b")}}var u=5,c=8-u,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 o,r,s,a=0;for(o=n.r1;o<=n.r2;o++)for(r=n.g1;r<=n.g2;r++)for(s=n.b1;s<=n.b2;s++)index=t(o,r,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 o,r,s,a,c=0,l=1<<8-u,d=0,p=0,h=0;for(r=n.r1;r<=n.r2;r++)for(s=n.g1;s<=n.g2;s++)for(a=n.b1;a<=n.b2;a++)c+=o=i[t(r,s,a)]||0,d+=o*(r+.5)*l,p+=o*(s+.5)*l,h+=o*(a+.5)*l;n._avg=c?[~~(d/c),~~(p/c),~~(h/c)]:[~~(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]>>c;return gval=t[1]>>c,bval=t[2]>>c,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,o=this.vboxes,r=0;r<o.size();r++)(e>(n=Math.sqrt(Math.pow(t[0]-o.peek(r).color[0],2)+Math.pow(t[1]-o.peek(r).color[1],2)+Math.pow(t[2]-o.peek(r).color[2],2)))||void 0===e)&&(e=n,i=o.peek(r).color);return i},forcebw:function(){var t=this.vboxes;t.sort((function(t,e){return o.naturalOrder(o.sum(t.color),o.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 u(t,e){for(var n,i=1,o=0;l>o;)if((n=t.pop()).count()){var r=a(c,n),s=r[0],u=r[1];if(!s)return;if(t.push(s),u&&(t.push(u),i++),i>=e)return;if(o++>l)return}else t.push(n),o++}if(!t.length||2>n||n>256)return!1;var c=r(t);c.forEach((function(){0}));var p=s(t,c),h=new e((function(t,e){return o.naturalOrder(t.count(),e.count())}));h.push(p),u(h,d*n);for(var f=new e((function(t,e){return o.naturalOrder(t.count()*t.volume(),e.count()*e.volume())}));h.size();)f.push(h.pop());u(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 ve})),n.d(e,"compat",(function(){return ge}));var i=n(69),o=(n(87),n(89),n(27)),r=n(0),s=n(8),a=n(4),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());var i=this.stack[this.stack.length-2];i&&i.name===t&&this.stack.pop();var o=this.getCurrent();o&&o.name===t?Object(a.a)(o,{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(this.getCurrent().url)},e.backUrl=function(){return this.stack[this.stack.length-2].url},e.home=function(){this.stack.splice(0),m.route("/")},t}(),c=function(){function t(t){this.pinnedKey="panePinned",this.$element=$(t),this.pinned="true"===localStorage.getItem(this.pinnedKey),this.active=!1,this.showing=!1,this.render()}var e=t.prototype;return e.enable=function(){this.active=!0,this.render()},e.disable=function(){this.active=!1,this.showing=!1,this.render()},e.show=function(){clearTimeout(this.hideTimeout),this.showing=!0,this.render()},e.hide=function(){this.showing=!1,this.render()},e.onmouseleave=function(){this.hideTimeout=setTimeout(this.hide.bind(this),250)},e.togglePinned=function(){this.pinned=!this.pinned,localStorage.setItem(this.pinnedKey,this.pinned?"true":"false"),this.render()},e.render=function(){this.$element.toggleClass("panePinned",this.pinned).toggleClass("hasPane",this.active).toggleClass("paneShowing",this.showing)},t}(),l=n(3),d=n(14),p=n(5),h=n(7),f=n(2),g=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.value=m.prop(this.props.value||"")},n.view=function(){return m("div",{className:"TextEditor"},m("textarea",{className:"FormControl Composer-flexible",config:this.configTextarea.bind(this),oninput:m.withAttr("value",this.oninput.bind(this)),placeholder:this.props.placeholder||"",disabled:!!this.props.disabled,value:this.value()}),m("ul",{className:"TextEditor-controls Composer-footer"},Object(h.a)(this.controlItems().toArray()),m("li",{className:"TextEditor-toolbar"},this.toolbarItems().toArray())))},n.configTextarea=function(t,e){var n=this;if(!e){var i=function(){n.onsubmit(),m.redraw()};$(t).bind("keydown","meta+return",i),$(t).bind("keydown","ctrl+return",i)}},n.controlItems=function(){var t=new p.a;return t.add("submit",f.a.component({children:this.props.submitLabel,icon:"fas fa-paper-plane",className:"Button Button--primary",itemClassName:"App-primaryControl",onclick:this.onsubmit.bind(this)})),this.props.preview&&t.add("preview",f.a.component({icon:"far fa-eye",className:"Button Button--icon",onclick:this.props.preview,title:app.translator.trans("core.forum.composer.preview_tooltip"),config:function(t){return $(t).tooltip()}})),t},n.toolbarItems=function(){return new p.a},n.setValue=function(t){this.$("textarea").val(t).trigger("input")},n.setSelectionRange=function(t,e){var n=this.$("textarea");n.length&&(n[0].setSelectionRange(t,e),n.focus())},n.getSelectionRange=function(){var t=this.$("textarea");return t.length?[t[0].selectionStart,t[0].selectionEnd]:[0,0]},n.insertAtCursor=function(t){var e=this.$("textarea")[0],n=this.value(),i=e?e.selectionStart:n.length;if(this.setValue(n.slice(0,i)+t+n.slice(i)),e){var o=i+t.length;this.setSelectionRange(o,o)}e.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))},n.oninput=function(t){this.value(t),this.props.onchange(this.value()),m.redraw.strategy("none")},n.onsubmit=function(){this.props.onsubmit(this.value())},e}(l.a),v=n(15),y=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.loading=!1,this.content=m.prop(this.props.originalContent),this.editor=new g({submitLabel:this.props.submitLabel,placeholder:this.props.placeholder,onchange:this.content,onsubmit:this.onsubmit.bind(this),value:this.content()})},n.view=function(){return this.editor.props.disabled=this.loading,m("div",{className:"ComposerBody "+(this.props.className||"")},Object(v.a)(this.props.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},Object(h.a)(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},this.editor.render())),d.a.component({className:"ComposerBody-loading"+(this.loading?" active":"")}))},n.focus=function(){this.$(":input:enabled:visible:first").focus()},n.preventExit=function(){var t=this.content();return t&&t!==this.props.originalContent&&this.props.confirmExit},n.headerItems=function(){return new p.a},n.onsubmit=function(){},n.loaded=function(){this.loading=!1,m.redraw()},e}(l.a),b=n(16),w=n(6),x=n(9);function _(t){app.composer.isFullScreen()&&(app.composer.minimize(),t.stopPropagation())}var N=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){var e=this;t.prototype.init.call(this),this.editor.props.preview=function(t){_(t),m.route(app.route.discussion(e.props.discussion,"reply"))}},e.initProps=function(e){t.initProps.call(this,e),e.placeholder=e.placeholder||Object(x.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(x.a)(app.translator.trans("core.forum.composer_reply.discard_confirmation"))},n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.props.discussion;return e.add("title",m("h3",null,Object(w.a)("fas fa-reply")," ",m("a",{href:app.route.discussion(n),config:function(t,e){e||($(t).on("click",_),m.route.apply(this,arguments))}},n.title()))),e},n.data=function(){return{content:this.content(),relationships:{discussion:this.props.discussion}}},n.onsubmit=function(){var t=this.props.discussion;this.loading=!0,m.redraw();var e=this.data();app.store.createRecord("posts").save(e).then((function(e){if(app.viewingDiscussion(t)){var n=app.current.get("stream");n.update().then((function(){return n.goToNumber(e.number())}))}else{var i,o=f.a.component({className:"Button Button--link",children:app.translator.trans("core.forum.composer_reply.view_button"),onclick:function(){m.route(app.route.post(e)),app.alerts.dismiss(i)}});app.alerts.show(i=new b.a({type:"success",children:app.translator.trans("core.forum.composer_reply.posted_message"),controls:[o]}))}app.composer.hide()}),this.loaded.bind(this))},e}(y),k=n(19),T=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){return m("header",{className:"Hero DiscussionHero"},m("div",{className:"container"},m("ul",{className:"DiscussionHero-items"},Object(h.a)(this.items().toArray()))))},n.items=function(){var t=new p.a,e=this.props.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},Object(h.a)(n)),10),t.add("title",m("h2",{className:"DiscussionHero-title"},e.title())),t},e}(l.a),S=n(33),C=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},Object(v.a)(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))},e}(l.a),O=n(61),D=n(62),j=n(17),P=n(12),E=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.email=m.prop(this.props.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(f.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(x.a)(app.translator.trans("core.forum.forgot_password.email_placeholder")),value:this.email(),onchange:m.withAttr("value",this.email),disabled:this.loading})),m("div",{className:"Form-group"},f.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children: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",data:{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.props.children=app.translator.trans("core.forum.forgot_password.not_found_message")),t.prototype.onerror.call(this,e)},e}(P.a),M=function(t){function e(){return t.apply(this,arguments)||this}Object(r.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}(l.a),A=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.username=m.prop(this.props.username||""),this.email=m.prop(this.props.email||""),this.password=m.prop(this.props.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.props.provided&&-1!==this.props.provided.indexOf(t)},n.body=function(){return[this.props.token?"":m(M,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(x.a)(app.translator.trans("core.forum.sign_up.username_placeholder")),value:this.username(),onchange:m.withAttr("value",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(x.a)(app.translator.trans("core.forum.sign_up.email_placeholder")),value:this.email(),onchange:m.withAttr("value",this.email),disabled:this.loading||this.isProvided("email")})),20),this.props.token||t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",placeholder:Object(x.a)(app.translator.trans("core.forum.sign_up.password_placeholder")),value:this.password(),onchange:m.withAttr("value",this.password),disabled:this.loading})),10),t.add("submit",m("div",{className:"Form-group"},m(f.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(new I(t))},n.onready=function(){this.props.username&&!this.props.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",data: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.props.token?t.token=this.props.token:t.password=this.password(),t},e}(P.a),I=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.identification=m.prop(this.props.identification||""),this.password=m.prop(this.props.password||""),this.remember=m.prop(!!this.props.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return app.translator.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(M,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(x.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(x.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"},f.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children:app.translator.trans("core.forum.log_in.submit_button")})),-10),t},n.footer=function(){return[m("p",{className:"LogInModal-forgotPassword"},m("a",{onclick:this.forgotPassword.bind(this)},app.translator.trans("core.forum.log_in.forgot_password_link"))),app.forum.attribute("allowSignUp")?m("p",{className:"LogInModal-signUp"},app.translator.trans("core.forum.log_in.sign_up_text",{a:m("a",{onclick:this.signUp.bind(this)})})):""]},n.forgotPassword=function(){var t=this.identification(),e=-1!==t.indexOf("@")?{email:t}:void 0;app.modal.show(new E(e))},n.signUp=function(){var t={password:this.password()},e=this.identification();t[-1!==e.indexOf("@")?"email":"username"]=e,app.modal.show(new A(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.props.children=app.translator.trans("core.forum.log_in.invalid_login_message")),t.prototype.onerror.call(this,e)},e}(P.a),R=n(22),L=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.discussion=this.props.discussion,this.currentTitle=this.props.currentTitle,this.newTitle=m.prop(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"},f.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children: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}(P.a),H={controls:function(t,e){var n=this,i=new p.a;return["user","moderation","destructive"].forEach((function(o){var r=n[o+"Controls"](t,e).toArray();r.length&&(r.forEach((function(t){return i.add(t.itemName,t)})),i.add(o+"Separator",R.a.component()))})),i},userControls:function(t,e){var n=new p.a;return e instanceof rt&&n.add("reply",!app.session.user||t.canReply()?f.a.component({icon:"fas fa-reply",children:app.translator.trans(app.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button"),onclick:this.replyAction.bind(t,!0,!1)}):f.a.component({icon:"fas fa-reply",children:app.translator.trans("core.forum.discussion_controls.cannot_reply_button"),className:"disabled",title:app.translator.trans("core.forum.discussion_controls.cannot_reply_text")})),n},moderationControls:function(t){var e=new p.a;return t.canRename()&&e.add("rename",f.a.component({icon:"fas fa-pencil-alt",children:app.translator.trans("core.forum.discussion_controls.rename_button"),onclick:this.renameAction.bind(t)})),e},destructiveControls:function(t){var e=new p.a;return t.isHidden()?(t.canHide()&&e.add("restore",f.a.component({icon:"fas fa-reply",children:app.translator.trans("core.forum.discussion_controls.restore_button"),onclick:this.restoreAction.bind(t)})),t.canDelete()&&e.add("delete",f.a.component({icon:"fas fa-times",children:app.translator.trans("core.forum.discussion_controls.delete_forever_button"),onclick:this.deleteAction.bind(t)}))):t.canHide()&&e.add("hide",f.a.component({icon:"far fa-trash-alt",children:app.translator.trans("core.forum.discussion_controls.delete_button"),onclick:this.hideAction.bind(t)})),e},replyAction:function(t,e){var n=m.deferred();if(app.session.user)if(this.canReply()){var i=app.composer.component;app.composingReplyTo(this)&&!e||(i=new N({user:app.session.user,discussion:this}),app.composer.load(i)),app.composer.show(),t&&app.viewingDiscussion(this)&&!app.composer.isFullScreen()&&app.current.get("stream").goToNumber("reply"),n.resolve(i)}else n.reject();else n.reject(),app.modal.show(new I);return n.promise},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(x.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(new L({currentTitle:this.title(),discussion:this}))}},B=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;if(app.composingReplyTo(this.props.discussion))return m("article",{className:"Post CommentPost editing"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",null,Object(v.a)(app.session.user,{className:"PostUser-avatar"}),Object(j.a)(app.session.user)))),m("div",{className:"Post-body",config:this.configPreview.bind(this)}));return m("article",{className:"Post ReplyPlaceholder",onclick:function(){H.replyAction.call(t.props.discussion,!0)}},m("header",{className:"Post-header"},Object(v.a)(app.session.user,{className:"PostUser-avatar"})," ",app.translator.trans("core.forum.post_stream.reply_placeholder")))},n.configPreview=function(t,e,n){if(!e){var i,o=setInterval((function(){if(app.composer.component){var e=app.composer.component.content();if(i!==e){i=e;var n=$(window).scrollTop()+$(window).height()>=$(document).height();s9e.TextFormatter.preview(i||"",t),n&&$(window).scrollTop($(document).height())}}}),50);n.onunload=function(){return clearInterval(o)}}},e}(l.a),U=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.discussion=this.props.discussion,this.paused=!1,this.scrollListener=new S.a(this.onscroll.bind(this)),this.loadPageTimeouts={},this.pagesLoading=0,this.show(this.props.includedPosts)},n.goToNumber=function(t,e){var n=this;if("reply"===t)return this.goToLast().then((function(){$("html,body").stop(!0).animate({scrollTop:$(document).height()-$(window).height()},"fast",(function(){n.flashItem(n.$(".PostStream-item:last-child"))}))}));this.paused=!0;var i=this.loadNearNumber(t);return m.redraw(!0),i.then((function(){m.redraw(!0),n.scrollToNumber(t,e).done(n.unpause.bind(n))}))},n.goToIndex=function(t,e,n){var i=this;this.paused=!0;var o=this.loadNearIndex(t);return m.redraw(!0),o.then((function(){Object(O.a)(i.$(".PostStream-item:"+(e?"last":"first")),(function(){return m.redraw(!0)})),i.scrollToIndex(t,n,e).done(i.unpause.bind(i))}))},n.goToFirst=function(){return this.goToIndex(0)},n.goToLast=function(){return this.goToIndex(this.count()-1,!0)},n.update=function(){return this.viewingEnd?(this.visibleEnd=this.count(),this.loadRange(this.visibleStart,this.visibleEnd).then((function(){return m.redraw()}))):m.deferred().resolve().promise},n.count=function(){return this.discussion.postIds().length},n.sanitizeIndex=function(t){return Math.max(0,Math.min(this.count(),t))},n.show=function(t){this.visibleStart=t.length?this.discussion.postIds().indexOf(t[0].id()):0,this.visibleEnd=this.visibleStart+t.length},n.reset=function(t,e){this.visibleStart=t||0,this.visibleEnd=this.sanitizeIndex(e||this.constructor.loadCount)},n.posts=function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map((function(t){var e=app.store.getById("posts",t);return e&&e.discussion()&&void 0!==e.canEdit()?e:null}))},n.view=function(){var t,e=this;function n(t,e,n){n.fadedIn||$(t).hide().fadeIn(),n.fadedIn=!0}this.visibleEnd=this.sanitizeIndex(this.visibleEnd),this.viewingEnd=this.visibleEnd===this.count();var i=this.posts(),o=this.discussion.postIds(),r=i.map((function(i,r){var s,u={"data-index":e.visibleStart+r};if(i){var c=i.createdAt(),l=app.postComponents[i.contentType()];s=l?l.component({post:i}):"",u.key="post"+i.id(),u.config=n,u["data-time"]=c.toISOString(),u["data-number"]=i.number(),u["data-id"]=i.id(),u["data-type"]=i.contentType();var d=c-t;d>3456e5&&(s=[m("div",{className:"PostStream-timeGap"},m("span",null,app.translator.trans("core.forum.post_stream.time_lapsed_text",{period:moment.duration(d).humanize()}))),s]),t=c}else u.key="post"+o[e.visibleStart+r],s=C.component();return m("div",Object(a.a)({className:"PostStream-item"},u),s)}));return!this.viewingEnd&&i[this.visibleEnd-this.visibleStart-1]&&r.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(f.a,{className:"Button",onclick:this.loadNext.bind(this)},app.translator.trans("core.forum.post_stream.load_more_button")))),!this.viewingEnd||app.session.user&&!this.discussion.canReply()||r.push(m("div",{className:"PostStream-item",key:"reply"},B.component({discussion:this.discussion}))),m("div",{className:"PostStream"},r)},n.config=function(t,e){var n=this;t||(setTimeout((function(){return n.scrollListener.start()})),e.onunload=function(){n.scrollListener.stop(),clearTimeout(n.calculatePositionTimeout)})},n.onscroll=function(t){if(!this.paused){var e=this.getMarginTop(),n=$(window).height()-e,i=t+e;if(this.visibleStart>0){var o=this.$(".PostStream-item[data-index="+this.visibleStart+"]");o.length&&o.offset().top>i-300&&this.loadPrevious()}if(this.visibleEnd<this.count()){var r=this.$(".PostStream-item[data-index="+(this.visibleEnd-1)+"]");r.length&&r.offset().top+r.outerHeight(!0)<i+n+300&&this.loadNext()}clearTimeout(this.calculatePositionTimeout),this.calculatePositionTimeout=setTimeout(this.calculatePosition.bind(this),100)}},n.loadNext=function(){var t=this.visibleEnd,e=this.visibleEnd=this.sanitizeIndex(this.visibleEnd+this.constructor.loadCount),n=t-2*this.constructor.loadCount;n>this.visibleStart&&n>=0&&(this.visibleStart=n+this.constructor.loadCount+1,this.loadPageTimeouts[n]&&(clearTimeout(this.loadPageTimeouts[n]),this.loadPageTimeouts[n]=null,this.pagesLoading--)),this.loadPage(t,e)},n.loadPrevious=function(){var t=this.visibleStart,e=this.visibleStart=this.sanitizeIndex(this.visibleStart-this.constructor.loadCount),n=e+2*this.constructor.loadCount;n<this.visibleEnd&&n<=this.count()&&(this.visibleEnd=n,this.loadPageTimeouts[n]&&(clearTimeout(this.loadPageTimeouts[n]),this.loadPageTimeouts[n]=null,this.pagesLoading--)),this.loadPage(e,t,!0)},n.loadPage=function(t,e,n){var i=this,o=function(){if(!(t<i.visibleStart||e>i.visibleEnd)){var o=n?i.visibleEnd-1:i.visibleStart;Object(O.a)('.PostStream-item[data-index="'+o+'"]',(function(){return m.redraw(!0)})),i.unpause()}};o(),this.loadPageTimeouts[t]=setTimeout((function(){i.loadRange(t,e).then((function(){o(),i.pagesLoading--})),i.loadPageTimeouts[t]=null}),this.pagesLoading?1e3:0),this.pagesLoading++},n.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):m.deferred().resolve(i).promise},n.loadNearNumber=function(t){return this.posts().some((function(e){return e&&Number(e.number())===Number(t)}))?m.deferred().resolve().promise:(this.reset(),app.store.find("posts",{filter:{discussion:this.discussion.id()},page:{near:t}}).then(this.show.bind(this)))},n.loadNearIndex=function(t){if(t>=this.visibleStart&&t<=this.visibleEnd)return m.deferred().resolve().promise;var e=this.sanitizeIndex(t-this.constructor.loadCount/2),n=e+this.constructor.loadCount;return this.reset(e,n),this.loadRange(e,n).then(this.show.bind(this))},n.calculatePosition=function(){var t,e,n=this.getMarginTop(),i=$(window),o=i.height()-n,r=i.scrollTop()+n;this.$(".PostStream-item").each((function(){var n=$(this),i=n.offset().top,s=n.outerHeight(!0);if(i+s>r){if(t||(t=e=n.data("number")),!(i+s<r+o))return!1;n.data("number")&&(e=n.data("number"))}})),t&&this.trigger("positionChanged",t||1,e)},n.getMarginTop=function(){return this.$()&&$("#header").outerHeight()+parseInt(this.$().css("margin-top"),10)},n.scrollToNumber=function(t,e){var n=this.$(".PostStream-item[data-number="+t+"]");return this.scrollToItem(n,e).done(this.flashItem.bind(this,n))},n.scrollToIndex=function(t,e,n){var i=this.$(".PostStream-item[data-index="+t+"]");return this.scrollToItem(i,e,!0,n)},n.scrollToItem=function(t,e,n,i){var o=$("html, body").stop(!0);if(t.length){var r=t.offset().top-this.getMarginTop(),s=t.offset().top+t.height(),a=$(document).scrollTop(),u=a+$(window).height();if(n||r<a||s>u){var c=i?s-$(window).height()+app.composer.computedHeight():t.is(":first-child")?0:r;e?o.scrollTop(c):c!==a&&o.animate({scrollTop:c},"fast")}}return o.promise()},n.flashItem=function(t){t.addClass("flash").one("animationend webkitAnimationEnd",(function(){return t.removeClass("flash")}))},n.unpause=function(){this.paused=!1,this.scrollListener.update(),this.trigger("unpaused")},e}(l.a);U.loadCount=20,Object(a.a)(U.prototype,D.a);var F=U,Y=n(36),q=n(60),W=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.handlers={},this.index=0,this.visible=1,this.description="",this.props.stream.on("unpaused",this.handlers.streamWasUnpaused=this.streamWasUnpaused.bind(this)),this.scrollListener=new S.a(this.onscroll.bind(this)),this.subtree=new Y.a((function(){return!0}))},n.view=function(){var t=this.subtree.retain(),e=this.count(),n=this.props.stream.discussion.unreadCount(),i=e?Math.min(e-this.index,n)/e:0,o=app.translator.transChoice("core.forum.post_scrubber.viewing_text",e,{index:m("span",{className:"Scrubber-index"},t||Object(q.a)(Math.min(Math.ceil(this.index+this.visible),e))),count:m("span",{className:"Scrubber-count"},Object(q.a)(e))});return m("div",{className:"PostStreamScrubber Dropdown "+(this.disabled()?"disabled ":"")+(this.props.className||"")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},o," ",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,o),m("span",{className:"Scrubber-description"},t||this.description))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",config:function(t,e,n){var o=$(t),r={top:100-100*i+"%",height:100*i+"%"};n.oldStyle?o.stop(!0).css(n.oldStyle).animate(r):o.css(r),n.oldStyle=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.goToFirst=function(){this.props.stream.goToFirst(),this.index=0,this.renderScrollbar(!0)},n.goToLast=function(){this.props.stream.goToLast(),this.index=this.count(),this.renderScrollbar(!0)},n.count=function(){return this.props.stream.count()},n.streamWasUnpaused=function(){this.update(window.pageYOffset),this.renderScrollbar(!0)},n.disabled=function(){return this.visible>=this.count()},n.onscroll=function(t){var e=this.props.stream;!e.paused&&e.$()&&(this.update(t),this.renderScrollbar())},n.update=function(t){var e=this.props.stream,n=e.getMarginTop(),i=t+n,o=$(window).height()-n,r=e.$("> .PostStream-item[data-index]"),s=r.first().data("index")||0,a=0,u="";r.each((function(){var t=$(this),e=t.offset().top,n=t.outerHeight(!0);if(e+n<i)return!0;if(e>i+o)return!1;var r=Math.max(0,i-e),c=Math.min(n,i+o-e)-r;e<=i&&(s=parseFloat(t.data("index"))+r/n),c>0&&(a+=c/n);var l=t.data("time");l&&(u=l)})),this.index=s,this.visible=a,this.description=u?moment(u).format("MMMM YYYY"):""},n.config=function(t,e){t||(e.onunload=this.ondestroy.bind(this),this.scrollListener.start(),$(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)))},n.ondestroy=function(){this.scrollListener.stop(),this.props.stream.off("unpaused",this.handlers.streamWasUnpaused),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove touchmove",this.handlers.onmousemove).off("mouseup touchend",this.handlers.onmouseup)},n.renderScrollbar=function(t){var e=this.percentPerPost(),n=this.index,i=this.count(),o=this.visible||1,r=this.$();r.find(".Scrubber-index").text(Object(q.a)(Math.min(Math.ceil(n+o),i))),r.find(".Scrubber-description").text(this.description),r.toggleClass("disabled",this.disabled());var s={};s.before=Math.max(0,e.index*Math.min(n,i-o)),s.handle=Math.min(100-s.before,e.visible*o),s.after=100-s.before-s.handle;var a=t?"animate":"css";for(var u in s){var c=r.find(".Scrubber-"+u);c.stop(!0,!0)[a]({height:s[u]+"%"},"fast"),"animate"===a&&c.css("overflow","visible")}},n.percentPerPost=function(){var t=this.count()||1,e=this.visible||1,n=50/this.$(".Scrubber-scrollbar").outerHeight()*100,i=Math.max(100/t,n/e),o=t===e?0:(100-i*e)/(t-e);return{index:o,visible:i}},n.onresize=function(){this.scrollListener.update();var t=this.$(),e=this.$(".Scrubber-scrollbar");e.css("max-height",$(window).height()-t.offset().top+$(window).scrollTop()-parseInt($("#app").css("padding-bottom"),10)-(t.outerHeight()-e.outerHeight()))},n.onmousedown=function(t){this.mouseStart=t.clientY||t.originalEvent.touches[0].clientY,this.indexStart=this.index,this.dragging=!0,this.props.stream.paused=!0,$("body").css("cursor","move")},n.onmousemove=function(t){if(this.dragging){var e=((t.clientY||t.originalEvent.touches[0].clientY)-this.mouseStart)/this.$(".Scrubber-scrollbar").outerHeight()*100/this.percentPerPost().index||0,n=Math.min(this.indexStart+e,this.count()-1);this.index=Math.max(0,n),this.renderScrollbar()}},n.onmouseup=function(){if(this.dragging){this.mouseStart=0,this.indexStart=0,this.dragging=!1,$("body").css("cursor",""),this.$().removeClass("open");var t=Math.floor(this.index);this.props.stream.goToIndex(t),this.renderScrollbar(!0)}},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.count()-1,i)),this.props.stream.goToIndex(Math.floor(i)),this.index=i,this.renderScrollbar(!0),this.$().removeClass("open")},e}(l.a),z=n(63),V=n(31),G=n(23),Z=n(64),K=n(13),X=n(37),J=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(){var t=this.props.discussion,e=this.props.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(X.a)(i)}))},e}(l.a),Q=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(){var t=this.props.post,e=t.user(),n=Object(V.a)(t.contentPlain(),this.props.highlight,300);return m("a",{className:"PostPreview",href:app.route.post(t),config:m.route,onclick:this.props.onclick},m("span",{className:"PostPreview-content"},Object(v.a)(e),Object(j.a)(e)," ",m("span",{className:"PostPreview-excerpt"},n)))},e}(l.a);function tt(t){var e,n,i,o,r=$(t),s=!1,a=!1,u=0,c=function(t,e){void 0===e&&(e={}),e.duration=e.duration||"fast",e.step=function(t){$(this).css("transform","translate("+t+"px, 0)")},r.find(".Slidable-content").animate({"background-position-x":t},e)},l=function(){c(0,{complete:function(){r.removeClass("sliding"),e.hide(),n.hide(),a=!1}})};return r.find(".Slidable-content").on("touchstart",(function(t){e=r.find(".Slidable-underneath--left:not(.disabled)"),n=r.find(".Slidable-underneath--right:not(.disabled)"),i=t.originalEvent.targetTouches[0].clientX,o=t.originalEvent.targetTouches[0].clientY,s=!0,u=0})).on("touchmove",(function(t){var c=t.originalEvent.targetTouches[0].clientX,l=t.originalEvent.targetTouches[0].clientY;if(s&&Math.abs(c-i)>Math.abs(l-o)&&(a=!0),s=!1,a){u=c-i;var d=function(t,e){if(t.length){var n="left"===e?u>0:u<0;n&&t.hasClass("Slidable-underneath--elastic")&&(u-=.5*u),t.toggle(n);var i=Math.max(0,Math.min(1,(Math.abs(u)-25)/50));t.find(".icon").css("transform","scale("+i+")")}else u=Math["left"===e?"min":"max"](0,u)};d(e,"left"),d(n,"right"),$(this).css("transform","translate("+u+"px, 0)"),$(this).css("background-position-x",u+"px"),r.toggleClass("sliding",!!u),t.preventDefault()}})).on("touchend",(function(){var t=function(t){t.click(),t.hasClass("Slidable-underneath--elastic")?l():c((u>0?1:-1)*r.width())};n.length&&u<-50?t(n):e.length&&u>50?t(e):l(),s=!1,a=!1})),{reset:l}}var et=n(25),nt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){var t=this;this.subtree=new Y.a((function(){return t.props.discussion.freshness}),(function(){var t=app.session.user&&app.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return t.active()}))},n.attrs=function(){return{className:Object(et.a)(["DiscussionListItem",this.active()?"active":"",this.props.discussion.isHidden()?"DiscussionListItem--hidden":""])}},n.view=function(){var t=this.subtree.retain();if(t)return t;var e=this.props.discussion,n=e.user(),i=e.isUnread(),o=e.isRead(),r=!this.showRepliesCount()&&i,s=0,a=H.controls(e,this).toArray(),u=this.attrs();if(this.props.params.q){var c=e.mostRelevantPost();c&&(s=c.number());var l=this.props.params.q;this.highlightRegExp=new RegExp(l+"|"+l.trim().replace(/\s+/g,"|"),"gi")}else s=Math.min(e.lastPostNumber(),(e.lastReadPostNumber()||0)+1);return m("div",u,a.length?K.a.component({icon:"fas fa-ellipsis-v",children:a,className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right"}):"",m("a",{className:"Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic"+(i?"":" disabled"),onclick:this.markAsRead.bind(this)},Object(w.a)("fas fa-check")),m("div",{className:"DiscussionListItem-content Slidable-content"+(i?" unread":"")+(o?" read":"")},m("a",{href:n?app.route.user(n):"#",className:"DiscussionListItem-author",title:Object(x.a)(app.translator.trans("core.forum.discussion_list.started_text",{user:n,ago:Object(G.a)(e.createdAt())})),config:function(t){$(t).tooltip({placement:"right"}),m.route.apply(this,arguments)}},Object(v.a)(n,{title:""})),m("ul",{className:"DiscussionListItem-badges badges"},Object(h.a)(e.badges().toArray())),m("a",{href:app.route.discussion(e,s),config:m.route,className:"DiscussionListItem-main"},m("h3",{className:"DiscussionListItem-title"},Object(V.a)(e.title(),this.highlightRegExp)),m("ul",{className:"DiscussionListItem-info"},Object(h.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(Z.a)(e[r?"unreadCount":"replyCount"]()))))},n.config=function(t){if(!t&&"ontouchstart"in window){var e=tt(this.$().addClass("Slidable"));this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return e.reset()}))}},n.active=function(){var t=m.route.param("id");return t&&t.split("-")[0]===this.props.discussion.id()},n.showFirstPost=function(){return-1!==["newest","oldest"].indexOf(this.props.params.sort)},n.showRepliesCount=function(){return"replies"===this.props.params.sort},n.markAsRead=function(){var t=this.props.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new p.a;if(this.props.params.q){var e=this.props.discussion.mostRelevantPost()||this.props.discussion.firstPost();if(e&&"comment"===e.contentType()){var n=Object(V.a)(e.contentPlain(),this.highlightRegExp,175);t.add("excerpt",n,-100)}}else t.add("terminalPost",J.component({discussion:this.props.discussion,lastPost:!this.showFirstPost()}));return t},e}(l.a),it=n(45),ot=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.state=this.props.state},n.view=function(){var t,e=this.state,n=e.getParams();if(e.isLoading()?t=d.a.component():e.moreResults&&(t=f.a.component({children:app.translator.trans("core.forum.discussion_list.load_more_button"),className:"Button",onclick:e.loadMore.bind(e)})),e.empty()){var i=app.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},it.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()},nt.component({discussion:t,params:n}))}))),m("div",{className:"DiscussionList-loadMore"},t))},e}(l.a),rt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.discussion=null,this.near=null,this.refresh(),app.discussions.hasDiscussions()&&(app.pane.enable(),app.pane.hide(),app.previous.matches(e)&&m.redraw.strategy("diff")),app.history.push("discussion"),this.bodyClass="App--discussion"},n.onunload=function(t){if(this.discussion){var e=m.route.param("id");if(e&&e.split("-")[0]===this.discussion.id()){t.preventDefault();var n=m.route.param("near")||"1";return n!==String(this.near)&&this.stream.goToNumber(n),void(this.near=null)}}app.pane.disable(),app.composingReplyTo(this.discussion)&&!app.composer.component.content()?app.composer.hide():app.composer.minimize()},n.view=function(){var t=this.discussion;return m("div",{className:"DiscussionPage"},app.discussions.hasDiscussions()?m("div",{className:"DiscussionPage-list",config:this.configPane.bind(this)},!$(".App-navigation").is(":visible")&&m(ot,{state:app.discussions})):"",m("div",{className:"DiscussionPage-discussion"},t?[T.component({discussion:t}),m("div",{className:"container"},m("nav",{className:"DiscussionPage-nav"},m("ul",null,Object(h.a)(this.sidebarItems().toArray()))),m("div",{className:"DiscussionPage-stream"},this.stream.render()))]:d.a.component({className:"LoadingIndicator--block"})))},n.config=function(){for(var e,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];(e=t.prototype.config).call.apply(e,[this].concat(i)),this.discussion&&app.setTitle(this.discussion.title())},n.refresh=function(){this.near=m.route.param("near")||0,this.discussion=null;var t=app.preloadedApiDocument();if(t)setTimeout(this.show.bind(this,t),0);else{var e=this.requestParams();app.store.find("discussions",m.route.param("id").split("-")[0],e).then(this.show.bind(this))}m.lazyRedraw()},n.requestParams=function(){return{page:{near:this.near}}},n.show=function(t){this.discussion=t,app.history.push("discussion",t.title()),app.setTitleCount(0);var e=[];if(t.payload&&t.payload.included){var n=t.id();e=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===n})).map((function(t){return app.store.getById("posts",t.id)})).sort((function(t,e){return t.id()-e.id()})).slice(0,20)}this.stream=new F({discussion:t,includedPosts:e}),this.stream.on("positionChanged",this.positionChanged.bind(this)),this.stream.goToNumber(m.route.param("near")||e[0]&&e[0].number(),!0),app.current.set("discussion",t),app.current.set("stream",this.stream)},n.configPane=function(t,e,n){if(!e){n.retain=!0;var i=$(t),o=app.pane;i.hover(o.show.bind(o),o.onmouseleave.bind(o));var r=function(t){t.pageX<10&&o.show()};$(document).on("mousemove",r),n.onunload=function(){return $(document).off("mousemove",r)};var s=i.find(".DiscussionListItem.active");if(s.length){var a=i.offset().top,u=a+i.outerHeight(),c=s.offset().top,l=c+s.outerHeight();(c<a||l>u)&&i.scrollTop(i.scrollTop()-a+c)}}},n.sidebarItems=function(){var t=new p.a;return t.add("controls",z.a.component({children:H.controls(this.discussion,this).toArray(),icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary"})),t.add("scrubber",W.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);m.route(i,!0),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}(k.a),st=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},Object(h.a)(this.items().toArray()))},n.config=function(t,e){e.retain=!0},n.items=function(){return new p.a},e}(l.a),at=n(20),ut=n(11),ct=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right"};var n=e.prototype;return n.view=function(){return this.props.children=this.items().toArray(),t.prototype.view.call(this)},n.getButtonContent=function(){var t=app.session.user;return[Object(v.a)(t)," ",m("span",{className:"Button-label"},Object(j.a)(t))]},n.items=function(){var t=new p.a,e=app.session.user;return t.add("profile",at.a.component({icon:"fas fa-user",children:app.translator.trans("core.forum.header.profile_button"),href:app.route.user(e)}),100),t.add("settings",at.a.component({icon:"fas fa-cog",children:app.translator.trans("core.forum.header.settings_button"),href:app.route("settings")}),50),app.forum.attribute("adminUrl")&&t.add("administration",at.a.component({icon:"fas fa-wrench",children:app.translator.trans("core.forum.header.admin_button"),href:app.forum.attribute("adminUrl"),target:"_blank",config:function(){}}),0),t.add("separator",R.a.component(),-90),t.add("logOut",f.a.component({icon:"fas fa-sign-out-alt",children:app.translator.trans("core.forum.header.log_out_button"),onclick:app.session.logout.bind(app.session)}),-100),t},e}(K.a),lt=n(29),dt=n(38),pt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.state=this.props.state},n.view=function(){var t=this.state.getNotificationPages();return m("div",{className:"NotificationList"},m("div",{className:"NotificationList-header"},m("div",{className:"App-primaryControl"},f.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:this.state.markAllAsRead.bind(this.state)})),m("h4",{className:"App-titleControl App-titleControl--text"},app.translator.trans("core.forum.notifications.title"))),m("div",{className:"NotificationList-content"},t.length?t.map((function(t){var e=[],n={};return t.forEach((function(t){var i=t.subject();if(void 0!==i){var o=!1;i instanceof dt.a?o=i:i&&i.discussion&&(o=i.discussion());var r=o?o.id():0;n[r]=n[r]||{discussion:o,notifications:[]},n[r].notifications.push(t),-1===e.indexOf(n[r])&&e.push(n[r])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m("a",{className:"NotificationGroup-header",href:app.route.discussion(t.discussion),config:m.route},e&&e.length?m("ul",{className:"NotificationGroup-badges badges"},Object(h.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})):""}))))}))})):"",this.state.isLoading()?m(d.a,{className:"LoadingIndicator--block"}):t.length?"":m("div",{className:"NotificationList-empty"},app.translator.trans("core.forum.notifications.empty_text"))))},n.config=function(t,e){var n=this;if(!t){var i=this.$(".NotificationList-content"),o="auto"===i.css("overflow")?i:$(window),r=function(){var t=o.scrollTop(),e=o.height(),r=o===i?0:i.offset().top,s=i[0].scrollHeight;n.state.hasMoreResults()&&!n.state.isLoading()&&t+e>=r+s&&n.state.loadMore()};o.on("scroll",r),e.onunload=function(){o.off("scroll",r)}}},e}(l.a),ht=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t),e.initProps=function(e){e.className=e.className||"NotificationsDropdown",e.buttonClassName=e.buttonClassName||"Button Button--flat",e.menuClassName=e.menuClassName||"Dropdown-menu--right",e.label=e.label||app.translator.trans("core.forum.notifications.tooltip"),e.icon=e.icon||"fas fa-bell",t.initProps.call(this,e)};var n=e.prototype;return n.init=function(){t.prototype.init.call(this)},n.getButton=function(){var e=this.getNewCount(),n=t.prototype.getButton.call(this);return n.attrs.title=this.props.label,n.attrs.className+=e?" new":"",n.attrs.onclick=this.onclick.bind(this),n},n.getButtonContent=function(){var t=this.getUnreadCount();return[Object(w.a)(this.props.icon,{className:"Button-icon"}),t?m("span",{className:"NotificationsDropdown-unread"},t):"",m("span",{className:"Button-label"},this.props.label)]},n.getMenu=function(){return m("div",{className:"Dropdown-menu "+this.props.menuClassName,onclick:this.menuClick.bind(this)},this.showing?pt.component({state:this.props.state}):"")},n.onclick=function(){app.drawer.isOpen()?this.goToRoute():this.props.state.load()},n.goToRoute=function(){m.route(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}(K.a),ft=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}(),mt=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,at.a.component({icon:"fas fa-search",children:app.translator.trans("core.forum.search.all_discussions_button",{query:t}),href:app.route("index",{q:t})})),e.map((function(e){var n=e.mostRelevantPost();return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+e.id()},m("a",{href:app.route.discussion(e,n&&n.number()),config:m.route},m("div",{className:"DiscussionSearchResult-title"},Object(V.a)(e.title(),t)),n?m("div",{className:"DiscussionSearchResult-excerpt"},Object(V.a)(n.contentPlain(),t,100)):""))}))]},t}(),gt=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(j.a)(e);return n.children[0]=Object(V.a)(n.children[0],t),m("li",{className:"UserSearchResult","data-index":"users"+e.id()},m("a",{href:app.route.user(e),config:m.route},Object(v.a)(e),n))}))]:""},t}(),vt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.state=this.props.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(et.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(x.a)(app.translator.trans("core.forum.header.search_placeholder")),value:this.state.getValue(),oninput:m.withAttr("value",this.state.setValue.bind(this.state)),onfocus:function(){return t.hasFocus=!0},onblur:function(){return t.hasFocus=!1}}),this.loadingSources?d.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.config=function(t){var e=this;if(this.setIndex(this.getCurrentNumericIndex()),!t){var n=this,i=this.state;this.$(".Search-results").on("mousedown",(function(t){return t.preventDefault()})).on("click",(function(){return e.$("input").blur()})).on("mouseenter","> li:not(.Dropdown-header)",(function(){n.setIndex(n.selectableItems().index(this))}));var o=this.$("input");this.navigator=new ft,this.navigator.onUp((function(){return e.setIndex(e.getCurrentNumericIndex()-1,!0)})).onDown((function(){return e.setIndex(e.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(n.searchTimeout),n.searchTimeout=setTimeout((function(){i.isCached(t)||(t.length>=3&&n.sources.map((function(e){e.search&&(n.loadingSources++,e.search(t).then((function(){n.loadingSources=Math.max(0,n.loadingSources-1),m.redraw()})))})),i.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(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 mt),app.forum.attribute("canViewUserList")&&t.add("users",new gt),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(),o=t;t<0?o=n.length-1:t>=n.length&&(o=0);var r=n.removeClass("active").eq(o).addClass("active");if(this.index=r.attr("data-index")||o,e){var s,a=i.scrollTop(),u=i.offset().top,c=u+i.outerHeight(),l=r.offset().top,d=l+r.outerHeight();l<u?s=a-u+l-parseInt(i.css("padding-top"),10):d>c&&(s=a-c+d+parseInt(i.css("padding-bottom"),10)),void 0!==s&&i.stop(!0).animate({scrollTop:s},100)}},e}(l.a),yt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},Object(h.a)(this.items().toArray()))},n.config=function(t,e){e.retain=!0},n.items=function(){var t=new p.a;if(t.add("search",vt.component({state:app.search}),30),app.forum.attribute("showLanguageSelector")&&Object.keys(app.data.locales).length>1){var e=[],n=function(t){e.push(f.a.component({active:app.data.locale===t,children:app.data.locales[t],icon:app.data.locale!==t||"fas fa-check",onclick:function(){app.session.user?app.session.user.savePreferences({locale:t}).then((function(){return window.location.reload()})):(document.cookie="locale="+t+"; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT",window.location.reload())}}))};for(var i in app.data.locales)n(i);t.add("locale",lt.a.component({children:e,buttonClassName:"Button Button--link"}),20)}return app.session.user?(t.add("notifications",ht.component({state:app.notifications}),10),t.add("session",ct.component(),0)):(app.forum.attribute("allowSignUp")&&t.add("signUp",f.a.component({children:app.translator.trans("core.forum.header.sign_up_link"),className:"Button Button--link",onclick:function(){return app.modal.show(new A)}}),10),t.add("logIn",f.a.component({children:app.translator.trans("core.forum.header.log_in_link"),className:"Button Button--link",onclick:function(){return app.modal.show(new I)}}),0)),t},e}(l.a),bt=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className=e.className||"Button Button--icon Button--link"},e}(f.a),wt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.position=e.PositionEnum.HIDDEN,this.height=null,this.active=!1},n.view=function(){var t={normal:this.position===e.PositionEnum.NORMAL,minimized:this.position===e.PositionEnum.MINIMIZED,fullScreen:this.position===e.PositionEnum.FULLSCREEN,active:this.active};t.visible=t.normal||t.minimized||t.fullScreen,this.component&&(this.component.props.disabled=t.minimized);var n=this.position===e.PositionEnum.MINIMIZED?this.show.bind(this):void 0;return m("div",{className:"Composer "+Object(et.a)(t)},m("div",{className:"Composer-handle",config:this.configHandle.bind(this)}),m("ul",{className:"Composer-controls"},Object(h.a)(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:n},this.component?this.component.render():""))},n.config=function(t,e){var n=this;if(this.updateHeight(),!t){e.retain=!0,this.initializeHeight(),this.$().hide().css("bottom",-this.computedHeight()),this.$().on("focus blur",":input",(function(t){n.active="focusin"===t.type,m.redraw()})),this.$().on("keydown",":input","esc",(function(){return n.close()})),window.onbeforeunload=function(){return n.component&&n.component.preventExit()||void 0};var i={};$(window).on("resize",i.onresize=this.updateHeight.bind(this)).resize(),$(document).on("mousemove",i.onmousemove=this.onmousemove.bind(this)).on("mouseup",i.onmouseup=this.onmouseup.bind(this)),e.onunload=function(){$(window).off("resize",i.onresize),$(document).off("mousemove",i.onmousemove).off("mouseup",i.onmouseup)}}},n.configHandle=function(t,e){if(!e){var n=this;$(t).css("cursor","row-resize").bind("dragstart mousedown",(function(t){return t.preventDefault()})).mousedown((function(t){n.mouseStart=t.clientY,n.heightStart=n.$().height(),n.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.updateHeight=function(){var t=this.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),o=this.$(".Composer-footer").outerHeight(!0);e.height(this.$().outerHeight()-n-i-o)}},n.updateBodyPadding=function(){var t=this.position!==e.PositionEnum.HIDDEN&&this.position!==e.PositionEnum.MINIMIZED&&"absolute"!==this.$().css("position")?this.computedHeight()-parseInt($("#app").css("padding-bottom"),10):0;$("#content").css({paddingBottom:t})},n.isFullScreen=function(){return this.position===e.PositionEnum.FULLSCREEN||"absolute"===this.$().css("position")},n.preventExit=function(){if(this.component){var t=this.component.preventExit();if(t)return!confirm(t)}},n.load=function(t){this.preventExit()||(this.component&&(this.clear(),m.redraw(!0)),this.component=t)},n.clear=function(){this.component=null},n.animateToPosition=function(t){var n=this,i=this.position,o=this.$().stop(!0),r=o.outerHeight(),s=$(window).scrollTop();this.position=t,m.redraw(!0),o.show(),this.updateHeight();var a=o.outerHeight();i===e.PositionEnum.HIDDEN?o.css({bottom:-a,height:a}):o.css({height:r}),o.animate({bottom:0,height:a},"fast",(function(){return n.component.focus()})),this.updateBodyPadding(),$(window).scrollTop(s)},n.showBackdrop=function(){this.$backdrop=$("<div/>").addClass("composer-backdrop").appendTo("body")},n.hideBackdrop=function(){this.$backdrop&&this.$backdrop.remove()},n.show=function(){this.position!==e.PositionEnum.NORMAL&&this.position!==e.PositionEnum.FULLSCREEN&&(this.animateToPosition(e.PositionEnum.NORMAL),this.isFullScreen()&&(this.$().css("top",$(window).scrollTop()),this.showBackdrop(),this.component.focus()))},n.hide=function(){var t=this,n=this.$();n.stop(!0).animate({bottom:-n.height()},"fast",(function(){t.position=e.PositionEnum.HIDDEN,t.clear(),m.redraw(),n.hide(),t.hideBackdrop(),t.updateBodyPadding()}))},n.close=function(){this.preventExit()||this.hide()},n.minimize=function(){this.position!==e.PositionEnum.HIDDEN&&(this.animateToPosition(e.PositionEnum.MINIMIZED),this.$().css("top","auto"),this.hideBackdrop())},n.fullScreen=function(){this.position!==e.PositionEnum.HIDDEN&&(this.position=e.PositionEnum.FULLSCREEN,m.redraw(),this.updateHeight(),this.component.focus())},n.exitFullScreen=function(){this.position===e.PositionEnum.FULLSCREEN&&(this.position=e.PositionEnum.NORMAL,m.redraw(),this.updateHeight(),this.component.focus())},n.controlItems=function(){var t=new p.a;return this.position===e.PositionEnum.FULLSCREEN?t.add("exitFullScreen",bt.component({icon:"fas fa-compress",title:app.translator.trans("core.forum.composer.exit_full_screen_tooltip"),onclick:this.exitFullScreen.bind(this)})):(this.position!==e.PositionEnum.MINIMIZED&&(t.add("minimize",bt.component({icon:"fas fa-minus minimize",title:app.translator.trans("core.forum.composer.minimize_tooltip"),onclick:this.minimize.bind(this),itemClassName:"App-backControl"})),t.add("fullScreen",bt.component({icon:"fas fa-expand",title:app.translator.trans("core.forum.composer.full_screen_tooltip"),onclick:this.fullScreen.bind(this)}))),t.add("close",bt.component({icon:"fas fa-times",title:app.translator.trans("core.forum.composer.close_tooltip"),onclick:this.close.bind(this)}))),t},n.initializeHeight=function(){this.height=localStorage.getItem("composerHeight"),this.height||(this.height=this.defaultHeight())},n.defaultHeight=function(){return this.$().height()},n.minimumHeight=function(){return 200},n.maximumHeight=function(){return $(window).height()-$("#header").outerHeight()},n.computedHeight=function(){return this.position===e.PositionEnum.MINIMIZED?"":this.position===e.PositionEnum.FULLSCREEN?$(window).height():Math.max(this.minimumHeight(),Math.min(this.height,this.maximumHeight()))},n.changeHeight=function(t){this.height=t,this.updateHeight(),localStorage.setItem("composerHeight",this.height)},e}(l.a);wt.PositionEnum={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"};var xt=wt,_t=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,e=this.props.notification,n=this.href();return m("a",{className:"Notification Notification--"+e.contentType()+" "+(e.isRead()?"":"unread"),href:n,config:function(t,e){-1===n.indexOf("://")&&m.route.apply(this,arguments),e||$(t).click(this.markAsRead.bind(this))}},!e.isRead()&&f.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(v.a)(e.fromUser()),Object(w.a)(this.icon(),{className:"Notification-icon"}),m("span",{className:"Notification-content"},this.content()),Object(X.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.props.notification.isRead()||(app.session.user.pushAttributes({unreadNotificationCount:app.session.user.unreadNotificationCount()-1}),this.props.notification.save({isRead:!0}))},e}(l.a),Nt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.href=function(){var t=this.props.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.props.notification.fromUser()})},e}(_t);function kt(t){app.composer.isFullScreen()&&(app.composer.minimize(),t.stopPropagation())}var Tt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){var e=this;t.prototype.init.call(this),this.editor.props.preview=function(t){kt(t),m.route(app.route.post(e.props.post))}},e.initProps=function(e){t.initProps.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},n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.props.post;return e.add("title",m("h3",null,Object(w.a)("fas fa-pencil-alt")," ",m("a",{href:app.route.discussion(n.discussion(),n.number()),config:function(t,e){e||($(t).on("click",kt),m.route.apply(this,arguments))}},app.translator.trans("core.forum.composer_edit.post_link",{number:n.number(),discussion:n.discussion().title()})))),e},n.data=function(){return{content:this.content()}},n.onsubmit=function(){var t=this.props.post.discussion();this.loading=!0;var e=this.data();this.props.post.save(e).then((function(e){if(app.viewingDiscussion(t))app.current.stream.goToNumber(e.number());else{var n,i=f.a.component({className:"Button Button--link",children:app.translator.trans("core.forum.composer_edit.view_button"),onclick:function(){m.route(app.route.post(e)),app.alerts.dismiss(n)}});app.alerts.show(n=new b.a({type:"success",children:app.translator.trans("core.forum.composer_edit.edited_message"),controls:[i]}))}app.composer.hide()}),this.loaded.bind(this))},e}(y),St={controls:function(t,e){var n=this,i=new p.a;return["user","moderation","destructive"].forEach((function(o){var r=n[o+"Controls"](t,e).toArray();r.length&&(r.forEach((function(t){return i.add(t.itemName,t)})),i.add(o+"Separator",R.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",f.a.component({icon:"fas fa-pencil-alt",children:app.translator.trans("core.forum.post_controls.edit_button"),onclick:this.editAction.bind(t)}))),n},destructiveControls:function(t,e){var n=new p.a;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",f.a.component({icon:"fas fa-reply",children:app.translator.trans("core.forum.post_controls.restore_button"),onclick:this.restoreAction.bind(t)})),t.canDelete()&&n.add("delete",f.a.component({icon:"fas fa-times",children:app.translator.trans("core.forum.post_controls.delete_forever_button"),onclick:this.deleteAction.bind(t,e)}))):t.canHide()&&n.add("hide",f.a.component({icon:"far fa-trash-alt",children:app.translator.trans("core.forum.post_controls.delete_button"),onclick:this.hideAction.bind(t)})),n},editAction:function(){var t=m.deferred(),e=new Tt({post:this});return app.composer.load(e),app.composer.show(),t.resolve(e),t.promise},hideAction:function(){if(confirm(Object(x.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(x.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()}))}},Ct=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){var t=this;this.loading=!1,this.subtree=new Y.a((function(){return t.props.post.freshness}),(function(){var e=t.props.post.user();return e&&e.freshness}),(function(){return t.controlsOpen}))},n.view=function(){var t,e=this,n=this.attrs();return n.className=this.classes(n.className).join(" "),m("article",n,this.subtree.retain()||(t=St.controls(e.props.post,e).toArray(),m("div",null,e.content(),m("aside",{className:"Post-actions"},m("ul",null,Object(h.a)(e.actionItems().toArray()),t.length?m("li",null,m(K.a,{className:"Post-controls",buttonClassName:"Button Button--icon Button--flat",menuClassName:"Dropdown-menu--right",icon:"fas fa-ellipsis-h",onshow:function(){return e.$(".Post-actions").addClass("open")},onhide:function(){return e.$(".Post-actions").removeClass("open")}},t)):"")),m("footer",{className:"Post-footer"},m("ul",null,Object(h.a)(e.footerItems().toArray()))))))},n.config=function(t){var e=this.$(".Post-actions"),n=this.$(".Post-controls");e.toggleClass("open",n.hasClass("open"))},n.attrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]),n=this.props.post.user(),i=this.props.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}(l.a),Ot=n(30),Dt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){var e=this;t.prototype.init.call(this);var n=this.props.user;this.username=m.prop(n.username()||""),this.email=m.prop(n.email()||""),this.isEmailConfirmed=m.prop(n.isEmailConfirmed()||!1),this.setPassword=m.prop(!1),this.password=m.prop(n.password()||""),this.groups={},app.store.all("groups").filter((function(t){return-1===[ut.a.GUEST_ID,ut.a.MEMBER_ID].indexOf(t.id())})).forEach((function(t){return e.groups[t.id()]=m.prop(-1!==n.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(x.a)(app.translator.trans("core.forum.edit_user.username_label")),bidi:this.username})),40),app.session.user!==this.props.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(x.a)(app.translator.trans("core.forum.edit_user.email_label")),bidi:this.email})),this.isEmailConfirmed()?"":m("div",null,f.a.component({className:"Button Button--block",children:app.translator.trans("core.forum.edit_user.activate_button"),loading:this.loading,onclick:this.activate.bind(this)}))),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(!0),e.target.checked&&t.$("[name=password]").select(),m.redraw.strategy("none")}}),app.translator.trans("core.forum.edit_user.set_password_label")),this.setPassword()?m("input",{className:"FormControl",type:"password",name:"password",placeholder:Object(x.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.props.user.id()&&e.id()===ut.a.ADMINISTRATOR_ID}),Ot.a.component({group:e,label:""})," ",e.nameSingular())})))),10),e.add("submit",m("div",{className:"Form-group"},f.a.component({className:"Button Button--primary",type:"submit",loading:this.loading,children: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.props.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.props.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.props.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},e}(P.a);function jt(t,e,n){var i=this;if(!e){var o=function(){var e=$(t),n=$("#header"),o=$("#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 i.bottom=o.outerHeight(!0)}}})};$(window).on("resize",o).resize(),n.onunload=function(){$(window).off("resize",o)}}}var Pt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.user=null,this.bodyClass="App--user"},n.view=function(){return m("div",{className:"UserPage"},this.user?[At.component({user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===app.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m("nav",{className:"sideNav UserPage-nav",config:jt},m("ul",null,Object(h.a)(this.sidebarItems().toArray()))),m("div",{className:"sideNavOffset UserPage-content"},this.content())))]:[d.a.component({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",lt.a.component({children:this.navItems().toArray(),className:"App-titleControl",buttonClassName:"Button"})),t},n.navItems=function(){var t=new p.a,e=this.user;return t.add("posts",at.a.component({href:app.route("user.posts",{username:e.username()}),children:[app.translator.trans("core.forum.user.posts_link"),m("span",{className:"Button-badge"},e.commentCount())],icon:"far fa-comment"}),100),t.add("discussions",at.a.component({href:app.route("user.discussions",{username:e.username()}),children:[app.translator.trans("core.forum.user.discussions_link"),m("span",{className:"Button-badge"},e.discussionCount())],icon:"fas fa-bars"}),90),app.session.user===e&&(t.add("separator",R.a.component(),-90),t.add("settings",at.a.component({href:app.route("settings"),children:app.translator.trans("core.forum.user.settings_link"),icon:"fas fa-cog"}),-100)),t},e}(k.a),Et={controls:function(t,e){var n=this,i=new p.a;return["user","moderation","destructive"].forEach((function(o){var r=n[o+"Controls"](t,e).toArray();r.length&&(r.forEach((function(t){return i.add(t.itemName,t)})),i.add(o+"Separator",R.a.component()))})),i},userControls:function(){return new p.a},moderationControls:function(t){var e=new p.a;return t.canEdit()&&e.add("edit",f.a.component({icon:"fas fa-pencil-alt",children:app.translator.trans("core.forum.user_controls.edit_button"),onclick:this.editAction.bind(this,t)})),e},destructiveControls:function(t){var e=new p.a;return"1"!==t.id()&&t.canDelete()&&e.add("delete",f.a.component({icon:"fas fa-times",children:app.translator.trans("core.forum.user_controls.delete_button"),onclick:this.deleteAction.bind(this,t)})),e},deleteAction:function(t){var e=this;confirm(app.translator.trans("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),app.current.matches(Pt,{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,o=n.email,r={success:"core.forum.user_controls.delete_success_message",error:"core.forum.user_controls.delete_error_message"}[e];app.alerts.show(new b.a({type:e,children:app.translator.trans(r,{username:i,email:o})}))},editAction:function(t){app.modal.show(new Dt({user:t}))}},Mt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.loading=!1,this.isDraggedOver=!1},e.initProps=function(e){t.initProps.call(this,e),e.className=e.className||""},n.view=function(){var t=this.props.user;return m("div",{className:"AvatarEditor Dropdown "+this.props.className+(this.loading?" loading":"")+(this.isDraggedOver?" dragover":"")},Object(v.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?d.a.component():t.avatarUrl()?Object(w.a)("fas fa-pencil-alt"):Object(w.a)("fas fa-plus-circle")),m("ul",{className:"Dropdown-menu Menu"},Object(h.a)(this.controlItems().toArray())))},n.controlItems=function(){var t=new p.a;return t.add("upload",f.a.component({icon:"fas fa-upload",children:app.translator.trans("core.forum.user.avatar_upload_button"),onclick:this.openPicker.bind(this)})),t.add("remove",f.a.component({icon:"fas fa-times",children:app.translator.trans("core.forum.user.avatar_remove_button"),onclick:this.remove.bind(this)})),t},n.enableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!0},n.disableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1},n.dropUpload=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1,this.upload(t.dataTransfer.files[0])},n.quickUpload=function(t){this.props.user.avatarUrl()||(t.preventDefault(),t.stopPropagation(),this.openPicker())},n.openPicker=function(){var t=this;if(!this.loading){this.props.user;$('<input type="file">').appendTo("body").hide().click().on("input",(function(e){t.upload($(e.target)[0].files[0])}))}},n.upload=function(t){if(!this.loading){var e=this.props.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},data:n}).then(this.success.bind(this),this.failure.bind(this))}},n.remove=function(){var t=this.props.user;this.loading=!0,m.redraw(),app.request({method:"DELETE",url:app.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){app.store.pushPayload(t),delete this.props.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(l.a),At=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.props.user,e=Et.controls(t,this).toArray(),n=t.color(),i=t.badges().toArray();return m("div",{className:"UserCard "+(this.props.className||""),style:n?{backgroundColor:n}:""},m("div",{className:"darkenBackground"},m("div",{className:"container"},e.length?K.a.component({children:e,className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.props.controlsButtonClassName,label:app.translator.trans("core.forum.user_controls.button"),icon:"fas fa-ellipsis-v"}):"",m("div",{className:"UserCard-profile"},m("h2",{className:"UserCard-identity"},this.props.editable?[Mt.component({user:t,className:"UserCard-avatar"}),Object(j.a)(t)]:m("a",{href:app.route.user(t),config:m.route},m("div",{className:"UserCard-avatar"},Object(v.a)(t)),Object(j.a)(t))),i.length?m("ul",{className:"UserCard-badges badges"},Object(h.a)(i)):"",m("ul",{className:"UserCard-info"},Object(h.a)(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new p.a,e=this.props.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(G.a)(n)]))}return t.add("joined",app.translator.trans("core.forum.user.joined_date_text",{ago:Object(G.a)(e.joinTime())})),t},e}(l.a),It=n(65),$t=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.props.post,e=t.user();if(!e)return m("div",{className:"PostUser"},m("h3",null,Object(v.a)(e,{className:"PostUser-avatar"})," ",Object(j.a)(e)));var n="";return t.isHidden()||(n=At.component({user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})),m("div",{className:"PostUser"},m("h3",null,m("a",{href:app.route.user(e),config:m.route},Object(v.a)(e,{className:"PostUser-avatar"}),Object(It.a)(e),Object(j.a)(e))),m("ul",{className:"PostUser-badges badges"},Object(h.a)(e.badges().toArray())),n)},n.config=function(t){var e,n=this;t||this.$().on("mouseover","h3 a, .UserCard",(function(){clearTimeout(e),e=setTimeout(n.showCard.bind(n),500)})).on("mouseout","h3 a, .UserCard",(function(){clearTimeout(e),e=setTimeout(n.hideCard.bind(n),250)}))},n.showCard=function(){var t=this;setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){this.$(".UserCard").removeClass("in")},e}(l.a),Rt=n(66),Lt=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.props.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(){var t=this;setTimeout((function(){return $(t).parent().find(".PostMeta-permalink").select()})),m.redraw.strategy("none")},"data-toggle":"dropdown"},Object(X.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(Rt.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}(l.a),Ht=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.shouldUpdateTooltip=!1,this.oldEditedInfo=null},n.view=function(){var t=this.props.post,e=t.editedUser(),n=Object(x.a)(app.translator.trans("core.forum.post.edited_tooltip",{user:e,ago:Object(G.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.config=function(t){this.shouldUpdateTooltip&&(this.$().tooltip("destroy").tooltip(),this.shouldUpdateTooltip=!1)},e}(l.a),Bt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){var e=this;t.prototype.init.call(this),this.revealContent=!1,this.subtree.check((function(){return e.isEditing()}))},n.content=function(){return t.prototype.content.call(this).concat([m("header",{className:"Post-header"},m("ul",Object(h.a)(this.headerItems().toArray()))),m("div",{className:"Post-body"},this.isEditing()?m("div",{className:"Post-preview",config:this.configPreview.bind(this)}):m.trust(this.props.post.contentHtml()))])},n.config=function(e,n){t.prototype.config.apply(this,arguments);var i=this.isEditing()?"":this.props.post.contentHtml();n.contentHtml!==i&&this.$(".Post-body script").each((function(){eval.call(window,$(this).text())})),n.contentHtml=i},n.isEditing=function(){return app.composer.component instanceof Tt&&app.composer.component.props.post===this.props.post},n.attrs=function(){var e=this.props.post,n=t.prototype.attrs.call(this);return n.className=(n.className||"")+" "+Object(et.a)({CommentPost:!0,"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()}),n},n.configPreview=function(t,e,n){if(!e){var i,o=function(){var e=app.composer.component.content();i!==e&&(i=e,s9e.TextFormatter.preview(i||"",t))};o();var r=setInterval(o,50);n.onunload=function(){return clearInterval(r)}}},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=new p.a,e=this.props.post;return t.add("user",$t.component({post:e}),100),t.add("meta",Lt.component({post:e})),e.isEdited()&&!e.isHidden()&&t.add("edited",Ht.component({post:e})),e.isHidden()&&t.add("toggle",f.a.component({className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),t},e}(Ct),Ut=n(28),Ft=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.attrs=function(){var e=t.prototype.attrs.call(this);return e.className=(e.className||"")+" EventPost "+Object(Ut.ucfirst)(this.props.post.contentType())+"Post",e},n.content=function(){var e=this.props.post.user(),n=Object(j.a)(e),i=Object(a.a)(this.descriptionData(),{user:e,username:e?m("a",{className:"EventPost-user",href:app.route.user(e),config:m.route},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}(Ct),Yt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.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(x.a)(n)},e)},n.descriptionData=function(){var t=this.props.post,e=t.content()[0],n=t.content()[1];return{old:e,new:m("strong",{className:"DiscussionRenamedPost-new"},n)}},e}(Ft),qt=n(34),Wt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){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"},f.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}(l.a),zt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.title=m.prop("")},e.initProps=function(e){t.initProps.call(this,e),e.placeholder=e.placeholder||Object(x.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(x.a)(app.translator.trans("core.forum.composer_discussion.discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||Object(x.a)(app.translator.trans("core.forum.composer_discussion.title_placeholder")),e.className="ComposerBody--discussion"},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",value:this.title(),oninput:m.withAttr("value",this.title),placeholder:this.props.titlePlaceholder,disabled:!!this.props.disabled,onkeydown:this.onkeydown.bind(this)}))),e},n.onkeydown=function(t){13===t.which&&(t.preventDefault(),this.editor.setSelectionRange(0,0)),m.redraw.strategy("none")},n.preventExit=function(){return(this.title()||this.content())&&this.props.confirmExit},n.data=function(){return{title:this.title(),content:this.content()}},n.onsubmit=function(){this.loading=!0;var t=this.data();app.store.createRecord("discussions").save(t).then((function(t){app.composer.hide(),app.discussions.refresh(),m.route(app.route.discussion(t))}),this.loaded.bind(this))},e}(y),Vt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),app.previous.matches(rt)&&(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"},n.onunload=function(){app.cache.scrollTop=$(window).scrollTop()},n.view=function(){return m("div",{className:"IndexPage"},this.hero(),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m("nav",{className:"IndexPage-nav sideNav"},m("ul",null,Object(h.a)(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},m("div",{className:"IndexPage-toolbar"},m("ul",{className:"IndexPage-toolbar-view"},Object(h.a)(this.viewItems().toArray())),m("ul",{className:"IndexPage-toolbar-action"},Object(h.a)(this.actionItems().toArray()))),m(ot,{state:app.discussions})))))},n.config=function(e,n){if(t.prototype.config.apply(this,arguments),!e){Object(qt.extend)(n,"onunload",(function(){return $("#app").css("min-height","")})),app.setTitle(""),app.setTitleCount(0);var i=app.cache.heroHeight,o=app.cache.heroHeight=this.$(".Hero").outerHeight()||0,r=app.cache.scrollTop;$("#app").css("min-height",$(window).height()+o);var s=function(){return $(window).scrollTop(r-i+o)};if(s(),setTimeout(s,1),this.lastDiscussion){var a=this.$('.DiscussionListItem[data-id="'+this.lastDiscussion.id()+'"]');if(a.length){var u=$("#header").outerHeight(),c=$(window).height(),l=a.offset().top,d=l+a.outerHeight();(l<r+u||d>r+c)&&$(window).scrollTop(l-u)}}}},n.hero=function(){return Wt.component()},n.sidebarItems=function(){var t=new p.a,e=app.forum.attribute("canStartDiscussion")||!app.session.user;return t.add("newDiscussion",f.a.component({children:app.translator.trans(e?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button"),icon:"fas fa-edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:this.newDiscussionAction.bind(this),disabled:!e})),t.add("nav",lt.a.component({children:this.navItems(this).toArray(),buttonClassName:"Button",className:"App-titleControl"})),t},n.navItems=function(){var t=new p.a,e=app.search.stickyParams();return t.add("allDiscussions",at.a.component({href:app.route("index",e),children:app.translator.trans("core.forum.index.all_discussions_link"),icon:"far fa-comments"}),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",K.a.component({buttonClassName:"Button",label:n[app.search.params().sort]||Object.keys(e).map((function(t){return n[t]}))[0],children:Object.keys(n).map((function(t){var i=n[t],o=(app.search.params().sort||Object.keys(e)[0])===t;return f.a.component({children:i,icon:!o||"fas fa-check",onclick:app.search.changeSort.bind(app.search,t),active:o})}))})),t},n.actionItems=function(){var t=new p.a;return t.add("refresh",f.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",f.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(){var t=m.deferred();if(app.session.user){var e=new zt({user:app.session.user});app.composer.load(e),app.composer.show(),t.resolve(e)}else t.reject(),app.modal.show(new I);return t.promise},n.markAllAsRead=function(){confirm(app.translator.trans("core.forum.index.mark_all_as_read_confirmation"))&&app.session.user.save({markedAllAsReadAt:new Date})},e}(k.a);Object(s.a)(Vt,"providesInitialSearch",!0);var Gt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),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=d.a.component():this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},f.a.component({children:app.translator.trans("core.forum.user.posts_load_more_button"),className:"Button",onclick:this.loadMore.bind(this)}))),m("div",{className:"PostsUserPage"},m("ul",{className:"PostsUserPage-list"},this.posts.map((function(t){return m("li",null,m("div",{className:"PostsUserPage-discussion"},app.translator.trans("core.forum.user.in_discussion_text",{discussion:m("a",{href:app.route.post(t),config:m.route},t.discussion().title())})),Bt.component({post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(it.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.lazyRedraw(),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}(Pt),Zt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.loadUser(m.route.param("username"))},n.content=function(){return m("div",{className:"DiscussionsUserPage"},ot.component({params:{q:"author:"+this.user.username(),sort:"newest"}}))},e}(Pt),Kt=n(32),Xt=n(21),Jt=n(39),Qt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.methods=this.notificationMethods().toArray(),this.loading={},this.types=this.notificationTypes().toArray()},n.view=function(){var t=this,e=this.props.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 o=t.preferenceKey(n.name,i.name);return m("td",{className:"NotificationGrid-checkbox"},Jt.a.component({state:!!e[o],loading:t.loading[o],disabled:!(o in e),onchange:function(){return t.toggle([o])}}))})))}))))},n.config=function(t){t||(this.$("thead .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){var e=parseInt($(this).index(),10)+1;$(this).parents("table").find("td:nth-child("+e+")").toggleClass("highlighted","mouseenter"===t.type)})),this.$("tbody .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){$(this).parent().find("td").toggleClass("highlighted","mouseenter"===t.type)})))},n.toggle=function(t){var e=this,n=this.props.user,i=n.preferences(),o=!i[t[0]];t.forEach((function(t){e.loading[t]=!0,i[t]=o})),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.props.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.props.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}(l.a),te=function(t){function e(){return t.apply(this,arguments)||this}Object(r.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"},f.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children: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",data:{email:app.session.user.email()}}).then(this.hide.bind(this),this.loaded.bind(this))},e}(P.a),ee=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.success=!1,this.email=m.prop(app.session.user.email()),this.password=m.prop("")},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(f.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"},f.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children: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.props.children=app.translator.trans("core.forum.change_email.incorrect_password_message")),t.prototype.onerror.call(this,e)},e}(P.a),ne=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),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(h.a)(this.settingsItems().toArray())))},n.settingsItems=function(){var t=new p.a;return t.add("account",Xt.a.component({label:app.translator.trans("core.forum.settings.account_heading"),className:"Settings-account",children:this.accountItems().toArray()})),t.add("notifications",Xt.a.component({label:app.translator.trans("core.forum.settings.notifications_heading"),className:"Settings-notifications",children:this.notificationsItems().toArray()})),t.add("privacy",Xt.a.component({label:app.translator.trans("core.forum.settings.privacy_heading"),className:"Settings-privacy",children:this.privacyItems().toArray()})),t},n.accountItems=function(){var t=new p.a;return t.add("changePassword",f.a.component({children:app.translator.trans("core.forum.settings.change_password_button"),className:"Button",onclick:function(){return app.modal.show(new te)}})),t.add("changeEmail",f.a.component({children:app.translator.trans("core.forum.settings.change_email_button"),className:"Button",onclick:function(){return app.modal.show(new ee)}})),t},n.notificationsItems=function(){var t=new p.a;return t.add("notificationGrid",Qt.component({user:this.user})),t},n.preferenceSaver=function(t){var e=this;return function(n,i){var o;i&&(i.props.loading=!0),m.redraw(),e.user.savePreferences((o={},o[t]=n,o)).then((function(){i&&(i.props.loading=!1),m.redraw()}))}},n.privacyItems=function(){var t=this,e=new p.a;return e.add("discloseOnline",Kt.a.component({children:app.translator.trans("core.forum.settings.privacy_disclose_online_label"),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})),e},e}(Pt),ie=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),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}(k.a),oe=function(t){t.routes={index:{path:"/all",component:Vt.component()},"index.filter":{path:"/:filter",component:Vt.component()},discussion:{path:"/d/:id",component:rt.component()},"discussion.near":{path:"/d/:id/:near",component:rt.component()},user:{path:"/u/:username",component:Gt.component()},"user.posts":{path:"/u/:username",component:Gt.component()},"user.discussions":{path:"/u/:username/discussions",component:Zt.component()},settings:{path:"/settings",component:ne.component()},notifications:{path:"/notifications",component:ie.component()}},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()})}};function re(t){var e=t.session.user;if(e&&!e.isEmailConfirmed()){var n=f.a.component({className:"Button Button--link",children:t.translator.trans("core.forum.user_email_confirmation.resend_button"),onclick:function(){n.props.loading=!0,m.redraw(),t.request({method:"POST",url:t.forum.attribute("apiUrl")+"/users/"+e.id()+"/send-confirmation"}).then((function(){n.props.loading=!1,n.props.children=[Object(w.a)("fas fa-check")," ",t.translator.trans("core.forum.user_email_confirmation.sent_message")],n.props.disabled=!0,m.redraw()})).catch((function(){n.props.loading=!1,m.redraw()}))}}),i=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(){var e=t.prototype.view.call(this);return e.children=[m("div",{className:"container"},e.children)],e},e}(b.a);m.mount($("<div/>").insertBefore("#content")[0],i.component({dismissible:!1,children:t.translator.trans("core.forum.user_email_confirmation.alert_message",{email:m("strong",null,e.email())}),controls:[n]}))}}var se=n(59),ae=n(41),ue=function(){function t(t){this.app=t,this.notificationPages=[],this.loading=!1,this.moreResults=!1}var e=t.prototype;return 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}(),ce=function(t){function e(e,n){var i;return void 0===e&&(e=[]),void 0===n&&(n="index"),(i=t.call(this,e)||this).searchRoute=n,i}Object(r.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,m.route(app.route(this.searchRoute,e))},n.getInitialSearch=function(){return app.current.type.providesInitialSearch&&this.params().q},n.clearInitialSearch=function(){var t=this.params();delete t.q,m.route(app.route(this.searchRoute,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}()),le=function(){function t(t){var e=void 0===t?{}:t,n=e.params,i=void 0===n?{}:n,o=e.forumApp,r=void 0===o?app:o;this.params=i,this.app=r,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).clear,i=void 0===n||n;return this.loading=!0,i&&this.clear(),this.loadResults().then((function(t){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}(),de=function(t){function e(){var e;return e=t.call(this)||this,Object(s.a)(Object(o.a)(e),"notificationComponents",{discussionRenamed:Nt}),Object(s.a)(Object(o.a)(e),"postComponents",{comment:Bt,discussionRenamed:Yt}),Object(s.a)(Object(o.a)(e),"pane",null),Object(s.a)(Object(o.a)(e),"drawer",null),Object(s.a)(Object(o.a)(e),"history",new u),Object(s.a)(Object(o.a)(e),"notifications",new ue(Object(o.a)(e))),Object(s.a)(Object(o.a)(e),"search",new ce),oe(Object(o.a)(e)),e.discussions=new le({forumApp:Object(o.a)(e)}),e.cache.discussionList=e.discussions,e}Object(r.a)(e,t);var n=e.prototype;return n.mount=function(){var e=this.forum.attribute("defaultRoute"),n="index";for(var i in this.routes)this.routes[i].path===e&&(n=i);this.routes[n].path="/",this.history.push(n,this.translator.trans("core.forum.header.back_to_index_tooltip"),"/"),m.mount(document.getElementById("app-navigation"),ae.a.component({className:"App-backControl",drawer:!0})),m.mount(document.getElementById("header-navigation"),ae.a.component()),m.mount(document.getElementById("header-primary"),st.component()),m.mount(document.getElementById("header-secondary"),yt.component()),this.pane=new c(document.getElementById("app")),this.composer=m.mount(document.getElementById("composer"),xt.component()),m.route.mode="pathname",t.prototype.mount.call(this,this.forum.attribute("basePath")),re(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.composingReplyTo=function(t){return this.composer.component instanceof N&&this.composer.component.props.discussion===t&&this.composer.position!==xt.PositionEnum.HIDDEN},n.viewingDiscussion=function(t){return this.current.matches(rt,{discussion:t})},n.authenticationComplete=function(t){if(t.loggedIn)window.location.reload();else{var e=new A(t);this.modal.show(e)}},e}(se.a),pe=n(71),he=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.initProps=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.initProps.call(this,e)},e}(f.a),fe=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className=e.className||"Button Button--icon Button--link"},e.prototype.config=function(e,n){t.prototype.config.call(this,e,n),e||this.$().tooltip()},e}(f.a),me=function(){function t(){}var e=t.prototype;return e.search=function(){},e.view=function(){},t}(),ge=Object(a.a)(pe.a,{"utils/PostControls":St,"utils/KeyboardNavigatable":ft,"utils/slidable":tt,"utils/affixSidebar":jt,"utils/History":u,"utils/DiscussionControls":H,"utils/alertEmailConfirmation":re,"utils/UserControls":Et,"utils/Pane":c,"components/DiscussionPage":rt,"components/LogInModal":I,"components/ComposerBody":y,"components/ForgotPasswordModal":E,"components/Notification":_t,"components/LogInButton":he,"components/DiscussionsUserPage":Zt,"components/Composer":xt,"components/SessionDropdown":ct,"components/HeaderPrimary":st,"components/PostEdited":Ht,"components/PostStream":F,"components/ChangePasswordModal":te,"components/IndexPage":Vt,"components/DiscussionRenamedNotification":Nt,"components/DiscussionsSearchSource":mt,"components/HeaderSecondary":yt,"components/ComposerButton":bt,"components/DiscussionList":ot,"components/ReplyPlaceholder":B,"components/TextEditor":g,"components/TextEditorButton":fe,"components/AvatarEditor":Mt,"components/Post":Ct,"components/SettingsPage":ne,"components/TerminalPost":J,"components/ChangeEmailModal":ee,"components/NotificationsDropdown":ht,"components/UserPage":Pt,"components/PostUser":$t,"components/UserCard":At,"components/UsersSearchSource":gt,"components/NotificationGrid":Qt,"components/PostPreview":Q,"components/EventPost":Ft,"components/DiscussionHero":T,"components/PostMeta":Lt,"components/EditUserModal":Dt,"components/SearchSource":me,"components/DiscussionRenamedPost":Yt,"components/DiscussionComposer":zt,"components/LogInButtons":M,"components/NotificationList":pt,"components/WelcomeHero":Wt,"components/SignUpModal":A,"components/CommentPost":Bt,"components/ReplyComposer":N,"components/NotificationsPage":ie,"components/PostStreamScrubber":W,"components/EditPostComposer":Tt,"components/RenameDiscussionModal":L,"components/Search":vt,"components/DiscussionListItem":nt,"components/LoadingPost":C,"components/PostsUserPage":Gt,routes:oe,ForumApplication:de}),ve=new de;window.app=ve,ge.app=ve}]);
|
||
//# sourceMappingURL=forum.js.map
|