framework/js/dist/admin.js
flarum-bot c2ec848744 Bundled output for commit 187b5c6f0b
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-12-13 01:41:29 +00:00

3 lines
315 KiB
JavaScript
Generated
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! For license information please see admin.js.LICENSE.txt */
(()=>{var t={195:(t,e,n)=>{t.exports=n(236)},423:()=>{!function(t){"use strict";var e=function e(n,r){this.options=t.extend({},e.DEFAULTS,r);var i=this.options.target===e.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=i.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 r=t(this),i=r.data("bs.affix"),o="object"==typeof n&&n;i||r.data("bs.affix",i=new e(this,o)),"string"==typeof n&&i[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,r){var i=this.$target.scrollTop(),o=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return i<n&&"top";if("bottom"==this.affixed)return null!=n?!(i+this.unpin<=o.top)&&"bottom":!(i+a<=t-r)&&"bottom";var s=null==this.affixed,l=s?i:o.top;return null!=n&&i<=n?"top":null!=r&&l+(s?a:e)>=t-r&&"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(),r=this.options.offset,i=r.top,o=r.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof r&&(o=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof o&&(o=r.bottom(this.$element));var s=this.getState(a,n,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),u=t.Event(l+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-n-o})}};var r=t.fn.affix;t.fn.affix=n,t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=r,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var e=t(this),r=e.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),n.call(e,r)}))}))}(jQuery)},298:()=>{!function(t){"use strict";var e='[data-toggle="dropdown"]',n=function(e){t(e).on("click.bs.dropdown",this.toggle)};function r(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?t(document).find(n):null;return r&&r.length?r:e.parent()}function i(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),i=r(e),o={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(i[0],n.target)||(i.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(e.attr("aria-expanded","false"),i.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var o=r(n),a=o.hasClass("open");if(i(),!a){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var s={relatedTarget:this};if(o.trigger(e=t.Event("show.bs.dropdown",s)),e.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",s))}return!1}},n.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var o=r(i),a=o.hasClass("open");if(!a&&27!=n.which||a&&27==n.which)return 27==n.which&&o.find(e).trigger("focus"),i.trigger("click");var s=o.find(".dropdown-menu li:not(.disabled):visible a");if(s.length){var l=s.index(n.target);38==n.which&&l>0&&l--,40==n.which&&l<s.length-1&&l++,~l||(l=0),s.eq(l).trigger("focus")}}}};var o=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var r=t(this),i=r.data("bs.dropdown");i||r.data("bs.dropdown",i=new n(this)),"string"==typeof e&&i[e].call(r)}))},t.fn.dropdown.Constructor=n,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=o,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",e,n.prototype.toggle).on("keydown.bs.dropdown.data-api",e,n.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",n.prototype.keydown)}(jQuery)},892:()=>{!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,r){return this.each((function(){var i=t(this),o=i.data("bs.modal"),a=t.extend({},e.DEFAULTS,i.data(),"object"==typeof n&&n);o||i.data("bs.modal",o=new e(this,a)),"string"==typeof n?o[n](r):a.show&&o.show(r)}))}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 r=this,i=t.Event("show.bs.modal",{relatedTarget:n});this.$element.trigger(i),this.isShown||i.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(){r.$element.one("mouseup.dismiss.bs.modal",(function(e){t(e.target).is(r.$element)&&(r.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var i=t.support.transition&&r.$element.hasClass("fade");r.$element.parent().length||r.$element.appendTo(r.$body),r.$element.show().scrollTop(0),r.adjustDialog(),i&&r.$element[0].offsetWidth,r.$element.addClass("in"),r.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:n});i?r.$dialog.one("bsTransitionEnd",(function(){r.$element.trigger("focus").trigger(o)})).emulateTransitionEnd(e.TRANSITION_DURATION):r.$element.trigger("focus").trigger(o)})))},e.prototype.hide=function(n){n&&n.preventDefault(),n=t.Event("hide.bs.modal"),this.$element.trigger(n),this.isShown&&!n.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(e.TRANSITION_DURATION):this.hideModal())},e.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy((function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}),this))},e.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy((function(t){27==t.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},e.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},e.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop((function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")}))},e.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},e.prototype.backdrop=function(n){var r=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&i;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy((function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())}),this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!n)return;o?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):n()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){r.removeBackdrop(),n&&n()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):a()}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,r){var i=r.style.paddingRight,o=t(r).css("padding-right");t(r).data("padding-right",i).css("padding-right",parseFloat(o)+n+"px")})))},e.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),t(this.fixedContent).each((function(e,n){var r=t(n).data("padding-right");t(n).removeData("padding-right"),n.style.paddingRight=r||""}))},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 r=t.fn.modal;t.fn.modal=n,t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=r,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(e){var r=t(this),i=r.attr("href"),o=r.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,""),a=t(document).find(o),s=a.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(i)&&i},a.data(),r.data());r.is("a")&&e.preventDefault(),a.one("show.bs.modal",(function(t){t.isDefaultPrevented()||a.one("hidden.bs.modal",(function(){r.is(":visible")&&r.trigger("focus")}))})),n.call(a,s,this)}))}(jQuery)},478:()=>{!function(t){"use strict";var e=["sanitize","whiteList","sanitizeFn"],n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,i=/^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 o(e,o){var a=e.nodeName.toLowerCase();if(-1!==t.inArray(a,o))return-1===t.inArray(a,n)||Boolean(e.nodeValue.match(r)||e.nodeValue.match(i));for(var s=t(o).filter((function(t,e){return e instanceof RegExp})),l=0,u=s.length;l<u;l++)if(a.match(s[l]))return!0;return!1}function a(e,n,r){if(0===e.length)return e;if(r&&"function"==typeof r)return r(e);if(!document.implementation||!document.implementation.createHTMLDocument)return e;var i=document.implementation.createHTMLDocument("sanitization");i.body.innerHTML=e;for(var a=t.map(n,(function(t,e){return e})),s=t(i.body).find("*"),l=0,u=s.length;l<u;l++){var c=s[l],d=c.nodeName.toLowerCase();if(-1!==t.inArray(d,a))for(var f=t.map(c.attributes,(function(t){return t})),h=[].concat(n["*"]||[],n[d]||[]),p=0,m=f.length;p<m;p++)o(f[p],h)||c.removeAttribute(f[p].nodeName);else c.parentNode.removeChild(c)}return i.body.innerHTML}var s=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)};s.VERSION="3.4.1",s.TRANSITION_DURATION=150,s.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:{"*":["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:[]}},s.prototype.init=function(e,n,r){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(r),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 i=this.options.trigger.split(" "),o=i.length;o--;){var a=i[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},s.prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.getOptions=function(n){var r=this.$element.data();for(var i in r)r.hasOwnProperty(i)&&-1!==t.inArray(i,e)&&delete r[i];return(n=t.extend({},this.getDefaults(),r,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},s.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,(function(t,r){n[t]!=r&&(e[t]=r)})),e},s.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)}},s.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},s.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)}},s.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 r=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,u=l.test(a);u&&(a=a.replace(l,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?i.appendTo(t(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),d=i[0].offsetWidth,f=i[0].offsetHeight;if(u){var h=a,p=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+f>p.bottom?"top":"top"==a&&c.top-f<p.top?"bottom":"right"==a&&c.right+d>p.width?"left":"left"==a&&c.left-d<p.left?"right":a,i.removeClass(h).addClass(a)}var m=this.getCalculatedOffset(a,c,d,f);this.applyPlacement(m,a);var v=function(){var t=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==t&&r.leave(r)};t.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",v).emulateTransitionEnd(s.TRANSITION_DURATION):v()}},s.prototype.applyPlacement=function(e,n){var r=this.tip(),i=r[0].offsetWidth,o=r[0].offsetHeight,a=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(s)&&(s=0),e.top+=a,e.left+=s,t.offset.setOffset(r[0],t.extend({using:function(t){r.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),r.addClass("in");var l=r[0].offsetWidth,u=r[0].offsetHeight;"top"==n&&u!=o&&(e.top=e.top+o-u);var c=this.getViewportAdjustedDelta(n,e,l,u);c.left?e.left+=c.left:e.top+=c.top;var d=/top|bottom/.test(n),f=d?2*c.left-i+l:2*c.top-o+u,h=d?"offsetWidth":"offsetHeight";r.offset(e),this.replaceArrow(f,r[0][h],d)},s.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},s.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")},s.prototype.hide=function(e){var n=this,r=t(this.$tip),i=t.Event("hide.bs."+this.type);function o(){"in"!=n.hoverState&&r.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}if(this.$element.trigger(i),!i.isDefaultPrevented())return r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",o).emulateTransitionEnd(s.TRANSITION_DURATION):o(),this.hoverState=null,this},s.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","")},s.prototype.hasContent=function(){return this.getTitle()},s.prototype.getPosition=function(e){var n=(e=e||this.$element)[0],r="BODY"==n.tagName,i=n.getBoundingClientRect();null==i.width&&(i=t.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var o=window.SVGElement&&n instanceof window.SVGElement,a=r?{top:0,left:0}:o?null:e.offset(),s={scroll:r?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=r?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},i,s,l,a)},s.prototype.getCalculatedOffset=function(t,e,n,r){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-r,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-r/2,left:e.left-n}:{top:e.top+e.height/2-r/2,left:e.left+e.width}},s.prototype.getViewportAdjustedDelta=function(t,e,n,r){var i={top:0,left:0};if(!this.$viewport)return i;var o=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var s=e.top-o-a.scroll,l=e.top+o-a.scroll+r;s<a.top?i.top=a.top-s:l>a.top+a.height&&(i.top=a.top+a.height-l)}else{var u=e.left-o,c=e.left+o+n;u<a.left?i.left=a.left-u:c>a.right&&(i.left=a.left+a.width-c)}return i},s.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)},s.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},s.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},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},s.prototype.enable=function(){this.enabled=!0},s.prototype.disable=function(){this.enabled=!1},s.prototype.toggleEnabled=function(){this.enabled=!this.enabled},s.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)},s.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}))},s.prototype.sanitizeHtml=function(t){return a(t,this.options.whiteList,this.options.sanitizeFn)};var l=t.fn.tooltip;t.fn.tooltip=function(e){return this.each((function(){var n=t(this),r=n.data("bs.tooltip"),i="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||n.data("bs.tooltip",r=new s(this,i)),"string"==typeof e&&r[e]())}))},t.fn.tooltip.Constructor=s,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=l,this}}(jQuery)},646:()=>{!function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,r=this;return t(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||t(r).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})}))}(jQuery)},28:t=>{var e=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)};e.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},e.prototype.update=function(t){this.context.putImageData(t,0,0)},e.prototype.getPixelCount=function(){return this.width*this.height},e.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},e.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var n=function(){};if(n.prototype.getColor=function(t,e){return this.getPalette(t,5,e)[0]},n.prototype.getPalette=function(t,n,r){void 0===n&&(n=10),(void 0===r||1>r)&&(r=10);for(var o,a,s,l,u=new e(t),c=u.getImageData().data,d=u.getPixelCount(),f=[],h=0;d>h;h+=r)a=c[0+(o=4*h)],s=c[o+1],l=c[o+2],c[o+3]>=125&&(a>250&&s>250&&l>250||f.push([a,s,l]));var p=i.quantize(f,n),m=p?p.palette():null;return u.removeCanvas(),m},!r)var r={map:function(t,e){var n={};return e?t.map((function(t,r){return n.index=r,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,r,i){return n.index=i,t+e.call(n,r)}:function(t,e){return t+e},0)},max:function(t,e){return Math.max.apply(null,e?r.map(t,e):t)}};var i=function(){function t(t,e,n){return(t<<2*l)+(e<<l)+n}function e(t){function e(){n.sort(t),r=!0}var n=[],r=!1;return{push:function(t){n.push(t),r=!1},peek:function(t){return r||e(),void 0===t&&(t=n.length-1),n[t]},pop:function(){return r||e(),n.pop()},size:function(){return n.length},map:function(t){return n.map(t)},debug:function(){return r||e(),n}}}function n(t,e,n,r,i,o,a){var s=this;s.r1=t,s.r2=e,s.g1=n,s.g2=r,s.b1=i,s.b2=o,s.histo=a}function i(){this.vboxes=new e((function(t,e){return r.naturalOrder(t.vbox.count()*t.vbox.volume(),e.vbox.count()*e.vbox.volume())}))}function o(e){var n,r,i,o,a=new Array(1<<3*l);return e.forEach((function(e){r=e[0]>>u,i=e[1]>>u,o=e[2]>>u,n=t(r,i,o),a[n]=(a[n]||0)+1})),a}function a(t,e){var r,i,o,a=1e6,s=0,l=1e6,c=0,d=1e6,f=0;return t.forEach((function(t){r=t[0]>>u,i=t[1]>>u,o=t[2]>>u,a>r?a=r:r>s&&(s=r),l>i?l=i:i>c&&(c=i),d>o?d=o:o>f&&(f=o)})),new n(a,s,l,c,d,f,e)}function s(e,n){if(n.count()){var i=n.r2-n.r1+1,o=n.g2-n.g1+1,a=n.b2-n.b1+1,s=r.max([i,o,a]);if(1==n.count())return[n.copy()];var l,u,c,d,f=0,h=[],p=[];if(s==i)for(l=n.r1;l<=n.r2;l++){for(d=0,u=n.g1;u<=n.g2;u++)for(c=n.b1;c<=n.b2;c++)d+=e[t(l,u,c)]||0;f+=d,h[l]=f}else if(s==o)for(l=n.g1;l<=n.g2;l++){for(d=0,u=n.r1;u<=n.r2;u++)for(c=n.b1;c<=n.b2;c++)d+=e[t(u,l,c)]||0;f+=d,h[l]=f}else for(l=n.b1;l<=n.b2;l++){for(d=0,u=n.r1;u<=n.r2;u++)for(c=n.g1;c<=n.g2;c++)d+=e[t(u,c,l)]||0;f+=d,h[l]=f}return h.forEach((function(t,e){p[e]=f-t})),function(t){var e,r,i,o,a,s=t+"1",u=t+"2",c=0;for(l=n[s];l<=n[u];l++)if(h[l]>f/2){for(i=n.copy(),o=n.copy(),e=l-n[s],a=(r=n[u]-l)>=e?Math.min(n[u]-1,~~(l+r/2)):Math.max(n[s],~~(l-1-e/2));!h[a];)a++;for(c=p[a];!c&&h[a-1];)c=p[--a];return i[u]=a,o[s]=i[u]+1,[i,o]}}(s==i?"r":s==o?"g":"b")}}var l=5,u=8-l;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,r=n.histo;if(!n._count_set||e){var i,o,a,s=0;for(i=n.r1;i<=n.r2;i++)for(o=n.g1;o<=n.g2;o++)for(a=n.b1;a<=n.b2;a++)index=t(i,o,a),s+=r[index]||0;n._count=s,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,r=n.histo;if(!n._avg||e){var i,o,a,s,u=0,c=1<<8-l,d=0,f=0,h=0;for(o=n.r1;o<=n.r2;o++)for(a=n.g1;a<=n.g2;a++)for(s=n.b1;s<=n.b2;s++)u+=i=r[t(o,a,s)]||0,d+=i*(o+.5)*c,f+=i*(a+.5)*c,h+=i*(s+.5)*c;n._avg=u?[~~(d/u),~~(f/u),~~(h/u)]:[~~(c*(n.r1+n.r2+1)/2),~~(c*(n.g1+n.g2+1)/2),~~(c*(n.b1+n.b2+1)/2)]}return n._avg},contains:function(t){var e=this,n=t[0]>>u;return gval=t[1]>>u,bval=t[2]>>u,n>=e.r1&&n<=e.r2&&gval>=e.g1&&gval<=e.g2&&bval>=e.b1&&bval<=e.b2}},i.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map((function(t){return t.color}))},size:function(){return this.vboxes.size()},map:function(t){for(var e=this.vboxes,n=0;n<e.size();n++)if(e.peek(n).vbox.contains(t))return e.peek(n).color;return this.nearest(t)},nearest:function(t){for(var e,n,r,i=this.vboxes,o=0;o<i.size();o++)(e>(n=Math.sqrt(Math.pow(t[0]-i.peek(o).color[0],2)+Math.pow(t[1]-i.peek(o).color[1],2)+Math.pow(t[2]-i.peek(o).color[2],2)))||void 0===e)&&(e=n,r=i.peek(o).color);return r},forcebw:function(){var t=this.vboxes;t.sort((function(t,e){return r.naturalOrder(r.sum(t.color),r.sum(e.color))}));var e=t[0].color;e[0]<5&&e[1]<5&&e[2]<5&&(t[0].color=[0,0,0]);var n=t.length-1,i=t[n].color;i[0]>251&&i[1]>251&&i[2]>251&&(t[n].color=[255,255,255])}},{quantize:function(t,n){function l(t,e){for(var n,r=1,i=0;1e3>i;)if((n=t.pop()).count()){var o=s(u,n),a=o[0],l=o[1];if(!a)return;if(t.push(a),l&&(t.push(l),r++),r>=e)return;if(i++>1e3)return}else t.push(n),i++}if(!t.length||2>n||n>256)return!1;var u=o(t);u.forEach((function(){}));var c=a(t,u),d=new e((function(t,e){return r.naturalOrder(t.count(),e.count())}));d.push(c),l(d,.75*n);for(var f=new e((function(t,e){return r.naturalOrder(t.count()*t.volume(),e.count()*e.volume())}));d.size();)f.push(d.pop());l(f,n-f.size());for(var h=new i;f.size();)h.push(f.pop());return h}}}();t.exports=n},555:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",r="second",i="minute",o="hour",a="day",s="week",l="month",u="quarter",c="year",d="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},v=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,l),o=n-i<0,a=e.clone().add(r+(o?-1:1),l);return+(-(r+(n-i)/(o?i-a:a-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:c,w:s,d:a,D:d,h:o,m:i,s:r,ms:n,Q:u}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",b={};b[y]=m;var w=function(t){return t instanceof T},x=function(t,e,n){var r;if(!t)return y;if("string"==typeof t)b[t]&&(r=t),e&&(b[t]=e,r=t);else{var i=t.name;b[i]=t,r=i}return!n&&r&&(y=r),r||!n&&y},E=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new T(n)},N=g;N.l=x,N.i=w,N.w=function(t,e){return E(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var T=function(){function m(t){this.$L=x(t.locale,null,!0),this.parse(t)}var v=m.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(N.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(h);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return N},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(t,e){var n=E(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return E(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<E(t)},v.$g=function(t,e,n){return N.u(t)?this[e]:this.set(n,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var n=this,u=!!N.u(e)||e,f=N.p(t),h=function(t,e){var r=N.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return u?r:r.endOf(a)},p=function(t,e){return N.w(n.toDate()[t].apply(n.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,v=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(f){case c:return u?h(1,0):h(31,11);case l:return u?h(1,v):h(0,v+1);case s:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return h(u?g-w:g+(6-w),v);case a:case d:return p(y+"Hours",0);case o:return p(y+"Minutes",1);case i:return p(y+"Seconds",2);case r:return p(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var s,u=N.p(t),f="set"+(this.$u?"UTC":""),h=(s={},s[a]=f+"Date",s[d]=f+"Date",s[l]=f+"Month",s[c]=f+"FullYear",s[o]=f+"Hours",s[i]=f+"Minutes",s[r]=f+"Seconds",s[n]=f+"Milliseconds",s)[u],p=u===a?this.$D+(e-this.$W):e;if(u===l||u===c){var m=this.clone().set(d,1);m.$d[h](p),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[N.p(t)]()},v.add=function(n,u){var d,f=this;n=Number(n);var h=N.p(u),p=function(t){var e=E(f);return N.w(e.date(e.date()+Math.round(t*n)),f)};if(h===l)return this.set(l,this.$M+n);if(h===c)return this.set(c,this.$y+n);if(h===a)return p(1);if(h===s)return p(7);var m=(d={},d[i]=t,d[o]=e,d[r]=1e3,d)[h]||1,v=this.$d.getTime()+n*m;return N.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=N.z(this),o=this.$H,a=this.$m,s=this.$M,l=n.weekdays,u=n.months,c=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].substr(0,o)},d=function(t){return N.s(o%12||12,t,"0")},h=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:N.s(s+1,2,"0"),MMM:c(n.monthsShort,s,u,3),MMMM:c(u,s),D:this.$D,DD:N.s(this.$D,2,"0"),d:String(this.$W),dd:c(n.weekdaysMin,this.$W,l,2),ddd:c(n.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(o),HH:N.s(o,2,"0"),h:d(1),hh:d(2),a:h(o,a,!0),A:h(o,a,!1),m:String(a),mm:N.s(a,2,"0"),s:String(this.$s),ss:N.s(this.$s,2,"0"),SSS:N.s(this.$ms,3,"0"),Z:i};return r.replace(p,(function(t,e){return e||m[t]||i.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,d,f){var h,p=N.p(d),m=E(n),v=(m.utcOffset()-this.utcOffset())*t,g=this-m,y=N.m(this,m);return y=(h={},h[c]=y/12,h[l]=y,h[u]=y/3,h[s]=(g-v)/6048e5,h[a]=(g-v)/864e5,h[o]=g/e,h[i]=g/t,h[r]=g/1e3,h)[p]||g,f?y:N.a(y)},v.daysInMonth=function(){return this.endOf(l).$D},v.$locale=function(){return b[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=x(t,e,!0);return r&&(n.$L=r),n},v.clone=function(){return N.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),S=T.prototype;return E.prototype=S,[["$ms",n],["$s",r],["$m",i],["$H",o],["$W",a],["$M",l],["$y",c],["$D",d]].forEach((function(t){S[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),E.extend=function(t,e){return t.$i||(t(e,T,E),t.$i=!0),E},E.locale=x,E.isDayjs=w,E.unix=function(t){return E(1e3*t)},E.en=b[y],E.Ls=b,E.p={},E}()},428:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(e,n,r){var i=n.prototype,o=i.format;r.en.formats=t,i.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(e,n){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,r,i){var o=i&&i.toUpperCase();return r||n[i]||t[i]||n[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))}(e,void 0===n?{}:n);return o.call(this,r)}}}()},23:function(t){t.exports=function(){"use strict";return function(t,e,n){t=t||{};var r=e.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o(t,e,n,i){return r.fromToBase(t,e,n,i)}n.en.relativeTime=i,r.fromToBase=function(e,r,o,a,s){for(var l,u,c,d=o.$locale().relativeTime||i,f=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],h=f.length,p=0;p<h;p+=1){var m=f[p];m.d&&(l=a?n(e).diff(o,m.d,!0):o.diff(e,m.d,!0));var v=(t.rounding||Math.round)(Math.abs(l));if(c=l>0,v<=m.r||!m.r){v<=1&&p>0&&(m=f[p-1]);var g=d[m.l];s&&(v=s(""+v)),u="string"==typeof g?g.replace("%d",v):g(v,r,m.l,c);break}}if(r)return u;var y=c?d.future:d.past;return"function"==typeof y?y(u):y.replace("%s",u)},r.to=function(t,e){return o(t,e,this,!0)},r.from=function(t,e){return o(t,e,this)};var a=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(a(this),t)},r.fromNow=function(t){return this.from(a(this),t)}}}()},648:(t,e,n)=>{"use strict";t.exports=function(){if("object"==typeof globalThis)return globalThis;var t;try{t=this||new Function("return this")()}catch(t){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return t}()},426:function(){!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,r=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 i="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],o=String.fromCharCode(e.which).toLowerCase(),a="",s={};t.each(["alt","ctrl","shift"],(function(t,n){e[n+"Key"]&&i!==n&&(a+=n+"+")})),e.metaKey&&!e.ctrlKey&&"meta"!==i&&(a+="meta+"),e.metaKey&&"meta"!==i&&a.indexOf("alt+ctrl+shift+")>-1&&(a=a.replace("alt+ctrl+shift+","hyper+")),i?s[a+i]=!0:(s[a+o]=!0,s[a+t.hotkeys.shiftNums[o]]=!0,"shift+"===a&&(s[t.hotkeys.shiftNums[o]]=!0));for(var l=0,u=r.length;l<u;l++)if(s[r[l]])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)},663:function(t,e){var n;!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(r,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,l=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},u=o.push,c=o.indexOf,d={},f=d.toString,h=d.hasOwnProperty,p=h.toString,m=p.call(Object),v={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},y=function(t){return null!=t&&t===t.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var r,i,o=(n=n||b).createElement("script");if(o.text=t,e)for(r in w)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function E(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[f.call(t)]||"object":typeof t}var N="3.6.0",T=function t(e,n){return new t.fn.init(e,n)};function S(t){var e=!!t&&"length"in t&&t.length,n=E(t);return!g(t)&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}T.fn=T.prototype={jquery:N,constructor:T,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=T.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return T.each(this,t)},map:function(t){return this.pushStack(T.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(T.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(T.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:o.sort,splice:o.splice},T.extend=T.fn.extend=function(){var t,e,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(t=arguments[s]))for(e in t)r=t[e],"__proto__"!==e&&a!==r&&(u&&r&&(T.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[e],o=i&&!Array.isArray(n)?[]:i||T.isPlainObject(n)?n:{},i=!1,a[e]=T.extend(u,o,r)):void 0!==r&&(a[e]=r));return a},T.extend({expando:"jQuery"+(N+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]"!==f.call(t)||(e=a(t))&&("function"!=typeof(n=h.call(e,"constructor")&&e.constructor)||p.call(n)!==m))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){x(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(S(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},makeArray:function(t,e){var n=e||[];return null!=t&&(S(Object(t))?T.merge(n,"string"==typeof t?[t]:t):u.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:c.call(e,t,n)},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,o=t.length,a=!n;i<o;i++)!e(t[i],i)!==a&&r.push(t[i]);return r},map:function(t,e,n){var r,i,o=0,a=[];if(S(t))for(r=t.length;o<r;o++)null!=(i=e(t[o],o,n))&&a.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&a.push(i);return l(a)},guid:1,support:v}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=o[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){d["[object "+e+"]"]=e.toLowerCase()}));var C=function(t){var e,n,r,i,o,a,s,l,u,c,d,f,h,p,m,v,g,y,b,w="sizzle"+1*new Date,x=t.document,E=0,N=0,T=lt(),S=lt(),C=lt(),k=lt(),A=function(t,e){return t===e&&(d=!0),0},_={}.hasOwnProperty,D=[],O=D.pop,P=D.push,I=D.push,j=D.slice,L=function(t,e){for(var n=0,r=t.length;n<r;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",M="[\\x20\\t\\r\\n\\f]",R="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",B="\\[[\\x20\\t\\r\\n\\f]*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",H=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",F=new RegExp(M+"+","g"),q=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),U=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),z=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),W=new RegExp(M+"|>"),G=new RegExp(H),V=new RegExp("^"+R+"$"),Y={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+$+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"<22>":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){f()},at=wt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{I.apply(D=j.call(x.childNodes),x.childNodes),D[x.childNodes.length].nodeType}catch(t){I={apply:D.length?function(t,e){P.apply(t,j.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function st(t,e,r,i){var o,s,u,c,d,p,g,y=e&&e.ownerDocument,x=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return r;if(!i&&(f(e),e=e||h,m)){if(11!==x&&(d=Z.exec(t)))if(o=d[1]){if(9===x){if(!(u=e.getElementById(o)))return r;if(u.id===o)return r.push(u),r}else if(y&&(u=y.getElementById(o))&&b(e,u)&&u.id===o)return r.push(u),r}else{if(d[2])return I.apply(r,e.getElementsByTagName(t)),r;if((o=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return I.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!k[t+" "]&&(!v||!v.test(t))&&(1!==x||"object"!==e.nodeName.toLowerCase())){if(g=t,y=e,1===x&&(W.test(t)||z.test(t))){for((y=tt.test(t)&&gt(e.parentNode)||e)===e&&n.scope||((c=e.getAttribute("id"))?c=c.replace(rt,it):e.setAttribute("id",c=w)),s=(p=a(t)).length;s--;)p[s]=(c?"#"+c:":scope")+" "+bt(p[s]);g=p.join(",")}try{return I.apply(r,y.querySelectorAll(g)),r}catch(e){k(t,!0)}finally{c===w&&e.removeAttribute("id")}}}return l(t.replace(q,"$1"),e,r,i)}function lt(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function ut(t){return t[w]=!0,t}function ct(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("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function ft(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;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 pt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&at(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function vt(t){return ut((function(e){return e=+e,ut((function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=st.support={},o=st.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!K.test(e||n&&n.nodeName||"HTML")},f=st.setDocument=function(t){var e,i,a=t?t.ownerDocument||t:x;return a!=h&&9===a.nodeType&&a.documentElement?(p=(h=a).documentElement,m=!o(h),x!=h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ot,!1):i.attachEvent&&i.attachEvent("onunload",ot)),n.scope=ct((function(t){return p.appendChild(t).appendChild(h.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=ct((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=ct((function(t){return t.appendChild(h.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(h.getElementsByClassName),n.getById=ct((function(t){return p.appendChild(t).id=w,!h.getElementsByName||!h.getElementsByName(w).length})),n.getById?(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n=e.getElementById(t);return n?[n]:[]}}):(r.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}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),r.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,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},g=[],v=[],(n.qsa=Q.test(h.querySelectorAll))&&(ct((function(t){var e;p.appendChild(t).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+$+")"),t.querySelectorAll("[id~="+w+"-]").length||v.push("~="),(e=h.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||v.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]"),t.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),ct((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=h.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=Q.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ct((function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),g.push("!=",H)})),v=v.length&&new RegExp(v.join("|")),g=g.length&&new RegExp(g.join("|")),e=Q.test(p.compareDocumentPosition),b=e||Q.test(p.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},A=e?function(t,e){if(t===e)return d=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t==h||t.ownerDocument==x&&b(x,t)?-1:e==h||e.ownerDocument==x&&b(x,e)?1:c?L(c,t)-L(c,e):0:4&r?-1:1)}:function(t,e){if(t===e)return d=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!i||!o)return t==h?-1:e==h?1:i?-1:o?1:c?L(c,t)-L(c,e):0;if(i===o)return ft(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ft(a[r],s[r]):a[r]==x?-1:s[r]==x?1:0},h):h},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if(f(t),n.matchesSelector&&m&&!k[e+" "]&&(!g||!g.test(e))&&(!v||!v.test(e)))try{var r=y.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){k(e,!0)}return st(e,h,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!=h&&f(t),b(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!=h&&f(t);var i=r.attrHandle[e.toLowerCase()],o=i&&_.call(r.attrHandle,e.toLowerCase())?i(t,e,!m):void 0;return void 0!==o?o:n.attributes||!m?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},st.escape=function(t){return(t+"").replace(rt,it)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,r=[],i=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&t.slice(0),t.sort(A),d){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return c=null,t},i=st.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},r=st.selectors={cacheLength:50,createPseudo:ut,match:Y,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]||st.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]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&G.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=T[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+M+"|$)"))&&T(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=st.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(F," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,l){var u,c,d,f,h,p,m=o!==a?"nextSibling":"previousSibling",v=e.parentNode,g=s&&e.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(v){if(o){for(;m;){for(f=e;f=f[m];)if(s?f.nodeName.toLowerCase()===g:1===f.nodeType)return!1;p=m="only"===t&&!p&&"nextSibling"}return!0}if(p=[a?v.firstChild:v.lastChild],a&&y){for(b=(h=(u=(c=(d=(f=v)[w]||(f[w]={}))[f.uniqueID]||(d[f.uniqueID]={}))[t]||[])[0]===E&&u[1])&&u[2],f=h&&v.childNodes[h];f=++h&&f&&f[m]||(b=h=0)||p.pop();)if(1===f.nodeType&&++b&&f===e){c[t]=[E,h,b];break}}else if(y&&(b=h=(u=(c=(d=(f=e)[w]||(f[w]={}))[f.uniqueID]||(d[f.uniqueID]={}))[t]||[])[0]===E&&u[1]),!1===b)for(;(f=++h&&f&&f[m]||(b=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==g:1!==f.nodeType)||!++b||(y&&((c=(d=f[w]||(f[w]={}))[f.uniqueID]||(d[f.uniqueID]={}))[t]=[E,b]),f!==e)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return i[w]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?ut((function(t,n){for(var r,o=i(t,e),a=o.length;a--;)t[r=L(t,o[a])]=!(n[r]=o[a])})):function(t){return i(t,0,n)}):i}},pseudos:{not:ut((function(t){var e=[],n=[],r=s(t.replace(q,"$1"));return r[w]?ut((function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))})):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}})),has:ut((function(t){return function(e){return st(t,e).length>0}})),contains:ut((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||i(e)).indexOf(t)>-1}})),lang:ut((function(t){return V.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===p},focus:function(t){return t===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!r.pseudos.empty(t)},header:function(t){return J.test(t.nodeName)},input:function(t){return X.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:vt((function(){return[0]})),last:vt((function(t,e){return[e-1]})),eq:vt((function(t,e,n){return[n<0?n+e:n]})),even:vt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:vt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:vt((function(t,e,n){for(var r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:vt((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[e]=ht(e);for(e in{submit:!0,reset:!0})r.pseudos[e]=pt(e);function yt(){}function bt(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function wt(t,e,n){var r=e.dir,i=e.next,o=i||r,a=n&&"parentNode"===o,s=N++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||a)return t(e,n,i);return!1}:function(e,n,l){var u,c,d,f=[E,s];if(l){for(;e=e[r];)if((1===e.nodeType||a)&&t(e,n,l))return!0}else for(;e=e[r];)if(1===e.nodeType||a)if(c=(d=e[w]||(e[w]={}))[e.uniqueID]||(d[e.uniqueID]={}),i&&i===e.nodeName.toLowerCase())e=e[r]||e;else{if((u=c[o])&&u[0]===E&&u[1]===s)return f[2]=u[2];if(c[o]=f,f[2]=t(e,n,l))return!0}return!1}}function xt(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function Et(t,e,n,r,i){for(var o,a=[],s=0,l=t.length,u=null!=e;s<l;s++)(o=t[s])&&(n&&!n(o,r,i)||(a.push(o),u&&e.push(s)));return a}function Nt(t,e,n,r,i,o){return r&&!r[w]&&(r=Nt(r)),i&&!i[w]&&(i=Nt(i,o)),ut((function(o,a,s,l){var u,c,d,f=[],h=[],p=a.length,m=o||function(t,e,n){for(var r=0,i=e.length;r<i;r++)st(t,e[r],n);return n}(e||"*",s.nodeType?[s]:s,[]),v=!t||!o&&e?m:Et(m,f,t,s,l),g=n?i||(o?t:p||r)?[]:a:v;if(n&&n(v,g,s,l),r)for(u=Et(g,h),r(u,[],s,l),c=u.length;c--;)(d=u[c])&&(g[h[c]]=!(v[h[c]]=d));if(o){if(i||t){if(i){for(u=[],c=g.length;c--;)(d=g[c])&&u.push(v[c]=d);i(null,g=[],u,l)}for(c=g.length;c--;)(d=g[c])&&(u=i?L(o,d):f[c])>-1&&(o[u]=!(a[u]=d))}}else g=Et(g===a?g.splice(p,g.length):g),i?i(null,a,g,l):I.apply(a,g)}))}function Tt(t){for(var e,n,i,o=t.length,a=r.relative[t[0].type],s=a||r.relative[" "],l=a?1:0,c=wt((function(t){return t===e}),s,!0),d=wt((function(t){return L(e,t)>-1}),s,!0),f=[function(t,n,r){var i=!a&&(r||n!==u)||((e=n).nodeType?c(t,n,r):d(t,n,r));return e=null,i}];l<o;l++)if(n=r.relative[t[l].type])f=[wt(xt(f),n)];else{if((n=r.filter[t[l].type].apply(null,t[l].matches))[w]){for(i=++l;i<o&&!r.relative[t[i].type];i++);return Nt(l>1&&xt(f),l>1&&bt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(q,"$1"),n,l<i&&Tt(t.slice(l,i)),i<o&&Tt(t=t.slice(i)),i<o&&bt(t))}f.push(n)}return xt(f)}return yt.prototype=r.filters=r.pseudos,r.setFilters=new yt,a=st.tokenize=function(t,e){var n,i,o,a,s,l,u,c=S[t+" "];if(c)return e?0:c.slice(0);for(s=t,l=[],u=r.preFilter;s;){for(a in n&&!(i=U.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),n=!1,(i=z.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(q," ")}),s=s.slice(n.length)),r.filter)!(i=Y[a].exec(s))||u[a]&&!(i=u[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return e?s.length:s?st.error(t):S(t,l).slice(0)},s=st.compile=function(t,e){var n,i=[],o=[],s=C[t+" "];if(!s){for(e||(e=a(t)),n=e.length;n--;)(s=Tt(e[n]))[w]?i.push(s):o.push(s);s=C(t,function(t,e){var n=e.length>0,i=t.length>0,o=function(o,a,s,l,c){var d,p,v,g=0,y="0",b=o&&[],w=[],x=u,N=o||i&&r.find.TAG("*",c),T=E+=null==x?1:Math.random()||.1,S=N.length;for(c&&(u=a==h||a||c);y!==S&&null!=(d=N[y]);y++){if(i&&d){for(p=0,a||d.ownerDocument==h||(f(d),s=!m);v=t[p++];)if(v(d,a||h,s)){l.push(d);break}c&&(E=T)}n&&((d=!v&&d)&&g--,o&&b.push(d))}if(g+=y,n&&y!==g){for(p=0;v=e[p++];)v(b,w,a,s);if(o){if(g>0)for(;y--;)b[y]||w[y]||(w[y]=O.call(l));w=Et(w)}I.apply(l,w),c&&!o&&w.length>0&&g+e.length>1&&st.uniqueSort(l)}return c&&(E=T,u=x),b};return n?ut(o):o}(o,i)),s.selector=t}return s},l=st.select=function(t,e,n,i){var o,l,u,c,d,f="function"==typeof t&&t,h=!i&&a(t=f.selector||t);if(n=n||[],1===h.length){if((l=h[0]=h[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===e.nodeType&&m&&r.relative[l[1].type]){if(!(e=(r.find.ID(u.matches[0].replace(et,nt),e)||[])[0]))return n;f&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(o=Y.needsContext.test(t)?0:l.length;o--&&(u=l[o],!r.relative[c=u.type]);)if((d=r.find[c])&&(i=d(u.matches[0].replace(et,nt),tt.test(l[0].type)&&gt(e.parentNode)||e))){if(l.splice(o,1),!(t=i.length&&bt(l)))return I.apply(n,i),n;break}}return(f||s(t,h))(i,e,!m,n,!e||tt.test(t)&&gt(e.parentNode)||e),n},n.sortStable=w.split("").sort(A).join("")===w,n.detectDuplicates=!!d,f(),n.sortDetached=ct((function(t){return 1&t.compareDocumentPosition(h.createElement("fieldset"))})),ct((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&&ct((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})),ct((function(t){return null==t.getAttribute("disabled")}))||dt($,(function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null})),st}(r);T.find=C,(T.expr=C.selectors)[":"]=T.expr.pseudos,T.uniqueSort=T.unique=C.uniqueSort,T.text=C.getText,T.isXMLDoc=C.isXML,T.contains=C.contains,T.escapeSelector=C.escape;var k=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&T(t).is(n))break;r.push(t)}return r},A=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},_=T.expr.match.needsContext;function D(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(t,e,n){return g(e)?T.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?T.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?T.grep(t,(function(t){return c.call(e,t)>-1!==n})):T.filter(e,t,n)}T.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?T.find.matchesSelector(r,t)?[r]:[]:T.find.matches(t,T.grep(e,(function(t){return 1===t.nodeType})))},T.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(T(t).filter((function(){for(e=0;e<r;e++)if(T.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)T.find(t,i[e],n);return r>1?T.uniqueSort(n):n},filter:function(t){return this.pushStack(P(this,t||[],!1))},not:function(t){return this.pushStack(P(this,t||[],!0))},is:function(t){return!!P(this,"string"==typeof t&&_.test(t)?T(t):t||[],!1).length}});var I,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||I,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:j.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof T?e[0]:e,T.merge(this,T.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),O.test(r[1])&&T.isPlainObject(e))for(r in e)g(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):g(t)?void 0!==n.ready?n.ready(t):t(T):T.makeArray(t,this)}).prototype=T.fn,I=T(b);var L=/^(?:parents|prev(?:Until|All))/,$={children:!0,contents:!0,next:!0,prev:!0};function M(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}T.fn.extend({has:function(t){var e=T(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(T.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],a="string"!=typeof t&&T(t);if(!_.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&T.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(T(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),T.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return k(t,"parentNode")},parentsUntil:function(t,e,n){return k(t,"parentNode",n)},next:function(t){return M(t,"nextSibling")},prev:function(t){return M(t,"previousSibling")},nextAll:function(t){return k(t,"nextSibling")},prevAll:function(t){return k(t,"previousSibling")},nextUntil:function(t,e,n){return k(t,"nextSibling",n)},prevUntil:function(t,e,n){return k(t,"previousSibling",n)},siblings:function(t){return A((t.parentNode||{}).firstChild,t)},children:function(t){return A(t.firstChild)},contents:function(t){return null!=t.contentDocument&&a(t.contentDocument)?t.contentDocument:(D(t,"template")&&(t=t.content||t),T.merge([],t.childNodes))}},(function(t,e){T.fn[t]=function(n,r){var i=T.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=T.filter(r,i)),this.length>1&&($[t]||T.uniqueSort(i),L.test(t)&&i.reverse()),this.pushStack(i)}}));var R=/[^\x20\t\r\n\f]+/g;function B(t){return t}function H(t){throw t}function F(t,e,n,r){var i;try{t&&g(i=t.promise)?i.call(t).done(e).fail(n):t&&g(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}T.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return T.each(t.match(R)||[],(function(t,n){e[n]=!0})),e}(t):T.extend({},t);var e,n,r,i,o=[],a=[],s=-1,l=function(){for(i=i||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&t.stopOnFalse&&(s=o.length,n=!1);t.memory||(n=!1),e=!1,i&&(o=n?[]:"")},u={add:function(){return o&&(n&&!e&&(s=o.length-1,a.push(n)),function e(n){T.each(n,(function(n,r){g(r)?t.unique&&u.has(r)||o.push(r):r&&r.length&&"string"!==E(r)&&e(r)}))}(arguments),n&&!e&&l()),this},remove:function(){return T.each(arguments,(function(t,e){for(var n;(n=T.inArray(e,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(t){return t?T.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},T.extend({Deferred:function(t){var e=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return T.Deferred((function(n){T.each(e,(function(e,r){var i=g(t[r[4]])&&t[r[4]];o[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&g(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,i){var o=0;function a(t,e,n,i){return function(){var s=this,l=arguments,u=function(){var r,u;if(!(t<o)){if((r=n.apply(s,l))===e.promise())throw new TypeError("Thenable self-resolution");u=r&&("object"==typeof r||"function"==typeof r)&&r.then,g(u)?i?u.call(r,a(o,e,B,i),a(o,e,H,i)):(o++,u.call(r,a(o,e,B,i),a(o,e,H,i),a(o,e,B,e.notifyWith))):(n!==B&&(s=void 0,l=[r]),(i||e.resolveWith)(s,l))}},c=i?u:function(){try{u()}catch(r){T.Deferred.exceptionHook&&T.Deferred.exceptionHook(r,c.stackTrace),t+1>=o&&(n!==H&&(s=void 0,l=[r]),e.rejectWith(s,l))}};t?c():(T.Deferred.getStackHook&&(c.stackTrace=T.Deferred.getStackHook()),r.setTimeout(c))}}return T.Deferred((function(r){e[0][3].add(a(0,r,g(i)?i:B,r.notifyWith)),e[1][3].add(a(0,r,g(t)?t:B)),e[2][3].add(a(0,r,g(n)?n:H))})).promise()},promise:function(t){return null!=t?T.extend(t,i):i}},o={};return T.each(e,(function(t,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add((function(){n=s}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=s.call(arguments),o=T.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?s.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(F(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)F(i[n],a(n),o.reject);return o.promise()}});var q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(t,e){r.console&&r.console.warn&&t&&q.test(t.name)&&r.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},T.readyException=function(t){r.setTimeout((function(){throw t}))};var U=T.Deferred();function z(){b.removeEventListener("DOMContentLoaded",z),r.removeEventListener("load",z),T.ready()}T.fn.ready=function(t){return U.then(t).catch((function(t){T.readyException(t)})),this},T.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==t&&--T.readyWait>0||U.resolveWith(b,[T]))}}),T.ready.then=U.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(T.ready):(b.addEventListener("DOMContentLoaded",z),r.addEventListener("load",z));var W=function t(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===E(r))for(l in o=!0,r)t(e,n,l,r[l],!0,a,s);else if(void 0!==i&&(o=!0,g(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(t,e,n){return c.call(T(t),n)})),n))for(;l<u;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},G=/^-ms-/,V=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function K(t){return t.replace(G,"ms-").replace(V,Y)}var X=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function J(){this.expando=T.expando+J.uid++}J.uid=1,J.prototype={cache:function(t){var e=t[this.expando];return e||(e={},X(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[K(e)]=n;else for(r in e)i[K(r)]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][K(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(K):(e=K(e))in r?[e]:e.match(R)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||T.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!T.isEmptyObject(e)}};var Q=new J,Z=new J,tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,et=/[A-Z]/g;function nt(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(et,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){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){}Z.set(t,e,n)}else n=void 0;return n}T.extend({hasData:function(t){return Z.hasData(t)||Q.hasData(t)},data:function(t,e,n){return Z.access(t,e,n)},removeData:function(t,e){Z.remove(t,e)},_data:function(t,e,n){return Q.access(t,e,n)},_removeData:function(t,e){Q.remove(t,e)}}),T.fn.extend({data:function(t,e){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(i=Z.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=K(r.slice(5)),nt(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each((function(){Z.set(this,t)})):W(this,(function(e){var n;if(o&&void 0===e)return void 0!==(n=Z.get(o,t))||void 0!==(n=nt(o,t))?n:void 0;this.each((function(){Z.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){Z.remove(this,t)}))}}),T.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=Q.get(t,e),n&&(!r||Array.isArray(n)?r=Q.access(t,e,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){var n=T.queue(t,e=e||"fx"),r=n.length,i=n.shift(),o=T._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){T.dequeue(t,e)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Q.get(t,n)||Q.access(t,n,{empty:T.Callbacks("once memory").add((function(){Q.remove(t,[e+"queue",n])}))})}}),T.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?T.queue(this[0],t):void 0===e?this:this.each((function(){var n=T.queue(this,t,e);T._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&T.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){T.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=T.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=Q.get(o[a],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(e)}});var rt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,it=new RegExp("^(?:([+-])=|)("+rt+")([a-z%]*)$","i"),ot=["Top","Right","Bottom","Left"],at=b.documentElement,st=function(t){return T.contains(t.ownerDocument,t)},lt={composed:!0};at.getRootNode&&(st=function(t){return T.contains(t.ownerDocument,t)||t.getRootNode(lt)===t.ownerDocument});var ut=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&st(t)&&"none"===T.css(t,"display")};function ct(t,e,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return T.css(t,e,"")},l=s(),u=n&&n[3]||(T.cssNumber[e]?"":"px"),c=t.nodeType&&(T.cssNumber[e]||"px"!==u&&+l)&&it.exec(T.css(t,e));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)T.style(t,e,c+u),(1-o)*(1-(o=s()/l||.5))<=0&&(a=0),c/=o;T.style(t,e,(c*=2)+u),n=n||[]}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}var dt={};function ft(t){var e,n=t.ownerDocument,r=t.nodeName,i=dt[r];return i||(e=n.body.appendChild(n.createElement(r)),i=T.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),dt[r]=i,i)}function ht(t,e){for(var n,r,i=[],o=0,a=t.length;o<a;o++)(r=t[o]).style&&(n=r.style.display,e?("none"===n&&(i[o]=Q.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ut(r)&&(i[o]=ft(r))):"none"!==n&&(i[o]="none",Q.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(t[o].style.display=i[o]);return t}T.fn.extend({show:function(){return ht(this,!0)},hide:function(){return ht(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ut(this)?T(this).show():T(this).hide()}))}});var pt,mt,vt=/^(?:checkbox|radio)$/i,gt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,yt=/^$|^module$|\/(?:java|ecma)script/i;pt=b.createDocumentFragment().appendChild(b.createElement("div")),(mt=b.createElement("input")).setAttribute("type","radio"),mt.setAttribute("checked","checked"),mt.setAttribute("name","t"),pt.appendChild(mt),v.checkClone=pt.cloneNode(!0).cloneNode(!0).lastChild.checked,pt.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!pt.cloneNode(!0).lastChild.defaultValue,pt.innerHTML="<option></option>",v.option=!!pt.lastChild;var bt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function wt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&D(t,e)?T.merge([t],n):n}function xt(t,e){for(var n=0,r=t.length;n<r;n++)Q.set(t[n],"globalEval",!e||Q.get(e[n],"globalEval"))}bt.tbody=bt.tfoot=bt.colgroup=bt.caption=bt.thead,bt.th=bt.td,v.option||(bt.optgroup=bt.option=[1,"<select multiple='multiple'>","</select>"]);var Et=/<|&#?\w+;/;function Nt(t,e,n,r,i){for(var o,a,s,l,u,c,d=e.createDocumentFragment(),f=[],h=0,p=t.length;h<p;h++)if((o=t[h])||0===o)if("object"===E(o))T.merge(f,o.nodeType?[o]:o);else if(Et.test(o)){for(a=a||d.appendChild(e.createElement("div")),s=(gt.exec(o)||["",""])[1].toLowerCase(),l=bt[s]||bt._default,a.innerHTML=l[1]+T.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;T.merge(f,a.childNodes),(a=d.firstChild).textContent=""}else f.push(e.createTextNode(o));for(d.textContent="",h=0;o=f[h++];)if(r&&T.inArray(o,r)>-1)i&&i.push(o);else if(u=st(o),a=wt(d.appendChild(o),"script"),u&&xt(a),n)for(c=0;o=a[c++];)yt.test(o.type||"")&&n.push(o);return d}var Tt=/^([^.]*)(?:\.(.+)|)/;function St(){return!0}function Ct(){return!1}function kt(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function At(t,e,n,r,i,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(r=r||n,n=void 0),e)At(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ct;else if(!i)return t;return 1===o&&(a=i,i=function(t){return T().off(t),a.apply(this,arguments)},i.guid=a.guid||(a.guid=T.guid++)),t.each((function(){T.event.add(this,e,i,r,n)}))}function _t(t,e,n){n?(Q.set(t,e,!1),T.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=Q.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(T.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=s.call(arguments),Q.set(this,e,o),r=n(this,e),this[e](),o!==(i=Q.get(this,e))||r?Q.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i&&i.value}else o.length&&(Q.set(this,e,{value:T.event.trigger(T.extend(o[0],T.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&T.event.add(t,e,St)}T.event={global:{},add:function(t,e,n,r,i){var o,a,s,l,u,c,d,f,h,p,m,v=Q.get(t);if(X(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&T.find.matchesSelector(at,i),n.guid||(n.guid=T.guid++),(l=v.events)||(l=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(R)||[""]).length;u--;)h=m=(s=Tt.exec(e[u])||[])[1],p=(s[2]||"").split(".").sort(),h&&(d=T.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,d=T.event.special[h]||{},c=T.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:p.join(".")},o),(f=l[h])||((f=l[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,r,p,a)||t.addEventListener&&t.addEventListener(h,a)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),T.event.global[h]=!0)},remove:function(t,e,n,r,i){var o,a,s,l,u,c,d,f,h,p,m,v=Q.hasData(t)&&Q.get(t);if(v&&(l=v.events)){for(u=(e=(e||"").match(R)||[""]).length;u--;)if(h=m=(s=Tt.exec(e[u])||[])[1],p=(s[2]||"").split(".").sort(),h){for(d=T.event.special[h]||{},f=l[h=(r?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)c=f[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(t,c));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(t,p,v.handle)||T.removeEvent(t,h,v.handle),delete l[h])}else for(h in l)T.event.remove(t,h+e[u],n,r,!0);T.isEmptyObject(l)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=new Array(arguments.length),l=T.event.fix(t),u=(Q.get(this,"events")||Object.create(null))[l.type]||[],c=T.event.special[l.type]||{};for(s[0]=l,e=1;e<arguments.length;e++)s[e]=arguments[e];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(a=T.event.handlers.call(this,l,u),e=0;(i=a[e++])&&!l.isPropagationStopped();)for(l.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(r=((T.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(l.result=r)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(t,e){var n,r,i,o,a,s=[],l=e.delegateCount,u=t.target;if(l&&u.nodeType&&!("click"===t.type&&t.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],a={},n=0;n<l;n++)void 0===a[i=(r=e[n]).selector+" "]&&(a[i]=r.needsContext?T(i,this).index(u)>-1:T.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l<e.length&&s.push({elem:u,handlers:e.slice(l)}),s},addProp:function(t,e){Object.defineProperty(T.Event.prototype,t,{enumerable:!0,configurable:!0,get:g(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[T.expando]?t:new T.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return vt.test(e.type)&&e.click&&D(e,"input")&&_t(e,"click",St),!1},trigger:function(t){var e=this||t;return vt.test(e.type)&&e.click&&D(e,"input")&&_t(e,"click"),!0},_default:function(t){var e=t.target;return vt.test(e.type)&&e.click&&D(e,"input")&&Q.get(e,"click")||D(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},T.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},(T.Event=function(t,e){if(!(this instanceof T.Event))return new T.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?St:Ct,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&&T.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[T.expando]=!0}).prototype={constructor:T.Event,isDefaultPrevented:Ct,isPropagationStopped:Ct,isImmediatePropagationStopped:Ct,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=St,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=St,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=St,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},T.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},T.event.addProp),T.each({focus:"focusin",blur:"focusout"},(function(t,e){T.event.special[t]={setup:function(){return _t(this,t,kt),!1},trigger:function(){return _t(this,t),!0},_default:function(){return!0},delegateType:e}})),T.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){T.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||T.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),T.fn.extend({on:function(t,e,n,r){return At(this,t,e,n,r)},one:function(t,e,n,r){return At(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,T(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Ct),this.each((function(){T.event.remove(this,t,n,e)}))}});var Dt=/<script|<style|<link/i,Ot=/checked\s*(?:[^=]|=\s*.checked.)/i,Pt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function It(t,e){return D(t,"table")&&D(11!==e.nodeType?e:e.firstChild,"tr")&&T(t).children("tbody")[0]||t}function jt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Lt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function $t(t,e){var n,r,i,o,a,s;if(1===e.nodeType){if(Q.hasData(t)&&(s=Q.get(t).events))for(i in Q.remove(e,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)T.event.add(e,i,s[i][n]);Z.hasData(t)&&(o=Z.access(t),a=T.extend({},o),Z.set(e,a))}}function Mt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&vt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Rt(t,e,n,r){e=l(e);var i,o,a,s,u,c,d=0,f=t.length,h=f-1,p=e[0],m=g(p);if(m||f>1&&"string"==typeof p&&!v.checkClone&&Ot.test(p))return t.each((function(i){var o=t.eq(i);m&&(e[0]=p.call(this,i,o.html())),Rt(o,e,n,r)}));if(f&&(o=(i=Nt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=T.map(wt(i,"script"),jt)).length;d<f;d++)u=i,d!==h&&(u=T.clone(u,!0,!0),s&&T.merge(a,wt(u,"script"))),n.call(t[d],u,d);if(s)for(c=a[a.length-1].ownerDocument,T.map(a,Lt),d=0;d<s;d++)u=a[d],yt.test(u.type||"")&&!Q.access(u,"globalEval")&&T.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?T._evalUrl&&!u.noModule&&T._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},c):x(u.textContent.replace(Pt,""),u,c))}return t}function Bt(t,e,n){for(var r,i=e?T.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||T.cleanData(wt(r)),r.parentNode&&(n&&st(r)&&xt(wt(r,"script")),r.parentNode.removeChild(r));return t}T.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),l=st(t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||T.isXMLDoc(t)))for(a=wt(s),r=0,i=(o=wt(t)).length;r<i;r++)Mt(o[r],a[r]);if(e)if(n)for(o=o||wt(t),a=a||wt(s),r=0,i=o.length;r<i;r++)$t(o[r],a[r]);else $t(t,s);return(a=wt(s,"script")).length>0&&xt(a,!l&&wt(t,"script")),s},cleanData:function(t){for(var e,n,r,i=T.event.special,o=0;void 0!==(n=t[o]);o++)if(X(n)){if(e=n[Q.expando]){if(e.events)for(r in e.events)i[r]?T.event.remove(n,r):T.removeEvent(n,r,e.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),T.fn.extend({detach:function(t){return Bt(this,t,!0)},remove:function(t){return Bt(this,t)},text:function(t){return W(this,(function(t){return void 0===t?T.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 Rt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||It(this,t).appendChild(t)}))},prepend:function(){return Rt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=It(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Rt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Rt(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&&(T.cleanData(wt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return T.clone(this,t,e)}))},html:function(t){return W(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Dt.test(t)&&!bt[(gt.exec(t)||["",""])[1].toLowerCase()]){t=T.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(T.cleanData(wt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Rt(this,arguments,(function(e){var n=this.parentNode;T.inArray(this,t)<0&&(T.cleanData(wt(this)),n&&n.replaceChild(e,this))}),t)}}),T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){T.fn[t]=function(t){for(var n,r=[],i=T(t),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),T(i[a])[e](n),u.apply(r,n.get());return this.pushStack(r)}}));var Ht=new RegExp("^("+rt+")(?!px)[a-z%]+$","i"),Ft=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},qt=function(t,e,n){var r,i,o={};for(i in e)o[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=o[i];return r},Ut=new RegExp(ot.join("|"),"i");function zt(t,e,n){var r,i,o,a,s=t.style;return(n=n||Ft(t))&&(""!==(a=n.getPropertyValue(e)||n[e])||st(t)||(a=T.style(t,e)),!v.pixelBoxStyles()&&Ht.test(a)&&Ut.test(e)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Wt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",at.appendChild(u).appendChild(c);var t=r.getComputedStyle(c);n="1%"!==t.top,l=12===e(t.marginLeft),c.style.right="60%",a=36===e(t.right),i=36===e(t.width),c.style.position="absolute",o=12===e(c.offsetWidth/3),at.removeChild(u),c=null}}function e(t){return Math.round(parseFloat(t))}var n,i,o,a,s,l,u=b.createElement("div"),c=b.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===c.style.backgroundClip,T.extend(v,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,n,i;return null==s&&(t=b.createElement("table"),e=b.createElement("tr"),n=b.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",at.appendChild(t).appendChild(e).appendChild(n),i=r.getComputedStyle(e),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,at.removeChild(t)),s}}))}();var Gt=["Webkit","Moz","ms"],Vt=b.createElement("div").style,Yt={};function Kt(t){return T.cssProps[t]||Yt[t]||(t in Vt?t:Yt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Gt.length;n--;)if((t=Gt[n]+e)in Vt)return t}(t)||t)}var Xt=/^(none|table(?!-c[ea]).+)/,Jt=/^--/,Qt={position:"absolute",visibility:"hidden",display:"block"},Zt={letterSpacing:"0",fontWeight:"400"};function te(t,e,n){var r=it.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ee(t,e,n,r,i,o){var a="width"===e?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=T.css(t,n+ot[a],!0,i)),r?("content"===n&&(l-=T.css(t,"padding"+ot[a],!0,i)),"margin"!==n&&(l-=T.css(t,"border"+ot[a]+"Width",!0,i))):(l+=T.css(t,"padding"+ot[a],!0,i),"padding"!==n?l+=T.css(t,"border"+ot[a]+"Width",!0,i):s+=T.css(t,"border"+ot[a]+"Width",!0,i));return!r&&o>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-l-s-.5))||0),l}function ne(t,e,n){var r=Ft(t),i=(!v.boxSizingReliable()||n)&&"border-box"===T.css(t,"boxSizing",!1,r),o=i,a=zt(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Ht.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&D(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===T.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===T.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+ee(t,e,n||(i?"border":"content"),o,r,a)+"px"}function re(t,e,n,r,i){return new re.prototype.init(t,e,n,r,i)}T.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=zt(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,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=K(e),l=Jt.test(e),u=t.style;if(l||(e=Kt(s)),a=T.cssHooks[e]||T.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:u[e];"string"==(o=typeof n)&&(i=it.exec(n))&&i[1]&&(n=ct(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=i&&i[3]||(T.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(l?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,r){var i,o,a,s=K(e);return Jt.test(e)||(e=Kt(s)),(a=T.cssHooks[e]||T.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=zt(t,e,r)),"normal"===i&&e in Zt&&(i=Zt[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),T.each(["height","width"],(function(t,e){T.cssHooks[e]={get:function(t,n,r){if(n)return!Xt.test(T.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ne(t,e,r):qt(t,Qt,(function(){return ne(t,e,r)}))},set:function(t,n,r){var i,o=Ft(t),a=!v.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===T.css(t,"boxSizing",!1,o),l=r?ee(t,e,r,s,o):0;return s&&a&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ee(t,e,"border",!1,o)-.5)),l&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=T.css(t,e)),te(0,n,l)}}})),T.cssHooks.marginLeft=Wt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(zt(t,"marginLeft"))||t.getBoundingClientRect().left-qt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),T.each({margin:"",padding:"",border:"Width"},(function(t,e){T.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+ot[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(T.cssHooks[t+e].set=te)})),T.fn.extend({css:function(t,e){return W(this,(function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=Ft(t),i=e.length;a<i;a++)o[e[a]]=T.css(t,e[a],!1,r);return o}return void 0!==n?T.style(t,e,n):T.css(t,e)}),t,e,arguments.length>1)}}),T.Tween=re,re.prototype={constructor:re,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||T.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(T.cssNumber[n]?"":"px")},cur:function(){var t=re.propHooks[this.prop];return t&&t.get?t.get(this):re.propHooks._default.get(this)},run:function(t){var e,n=re.propHooks[this.prop];return this.options.duration?this.pos=e=T.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):re.propHooks._default.set(this),this}},re.prototype.init.prototype=re.prototype,re.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=T.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){T.fx.step[t.prop]?T.fx.step[t.prop](t):1!==t.elem.nodeType||!T.cssHooks[t.prop]&&null==t.elem.style[Kt(t.prop)]?t.elem[t.prop]=t.now:T.style(t.elem,t.prop,t.now+t.unit)}}},re.propHooks.scrollTop=re.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},T.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},(T.fx=re.prototype.init).step={};var ie,oe,ae=/^(?:toggle|show|hide)$/,se=/queueHooks$/;function le(){oe&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(le):r.setTimeout(le,T.fx.interval),T.fx.tick())}function ue(){return r.setTimeout((function(){ie=void 0})),ie=Date.now()}function ce(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=ot[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function de(t,e,n){for(var r,i=(fe.tweeners[e]||[]).concat(fe.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,e,t))return r}function fe(t,e,n){var r,i,o=0,a=fe.prefilters.length,s=T.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var e=ie||ue(),n=Math.max(0,u.startTime+u.duration-e),r=1-(n/u.duration||0),o=0,a=u.tweens.length;o<a;o++)u.tweens[o].run(r);return s.notifyWith(t,[u,r,n]),r<1&&a?n:(a||s.notifyWith(t,[u,1,0]),s.resolveWith(t,[u]),!1)},u=s.promise({elem:t,props:T.extend({},e),opts:T.extend(!0,{specialEasing:{},easing:T.easing._default},n),originalProperties:e,originalOptions:n,startTime:ie||ue(),duration:n.duration,tweens:[],createTween:function(e,n){var r=T.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(r),r},stop:function(e){var n=0,r=e?u.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)u.tweens[n].run(1);return e?(s.notifyWith(t,[u,1,0]),s.resolveWith(t,[u,e])):s.rejectWith(t,[u,e]),this}}),c=u.props;for(function(t,e){var n,r,i,o,a;for(n in t)if(i=e[r=K(n)],o=t[n],Array.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),(a=T.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete t[r],o)n in t||(t[n]=o[n],e[n]=i);else e[r]=i}(c,u.opts.specialEasing);o<a;o++)if(r=fe.prefilters[o].call(u,t,c,u.opts))return g(r.stop)&&(T._queueHooks(u.elem,u.opts.queue).stop=r.stop.bind(r)),r;return T.map(c,de,u),g(u.opts.start)&&u.opts.start.call(t,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),T.fx.timer(T.extend(l,{elem:t,anim:u,queue:u.opts.queue})),u}T.Animation=T.extend(fe,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ct(n.elem,t,it.exec(e),n),n}]},tweener:function(t,e){g(t)?(e=t,t=["*"]):t=t.match(R);for(var n,r=0,i=t.length;r<i;r++)n=t[r],fe.tweeners[n]=fe.tweeners[n]||[],fe.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,o,a,s,l,u,c,d="width"in e||"height"in e,f=this,h={},p=t.style,m=t.nodeType&&ut(t),v=Q.get(t,"fxshow");for(r in n.queue||(null==(a=T._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,f.always((function(){f.always((function(){a.unqueued--,T.queue(t,"fx").length||a.empty.fire()}))}))),e)if(i=e[r],ae.test(i)){if(delete e[r],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;m=!0}h[r]=v&&v[r]||T.style(t,r)}if((l=!T.isEmptyObject(e))||!T.isEmptyObject(h))for(r in d&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(u=v&&v.display)&&(u=Q.get(t,"display")),"none"===(c=T.css(t,"display"))&&(u?c=u:(ht([t],!0),u=t.style.display||u,c=T.css(t,"display"),ht([t]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===T.css(t,"float")&&(l||(f.done((function(){p.display=u})),null==u&&(c=p.display,u="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",f.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),l=!1,h)l||(v?"hidden"in v&&(m=v.hidden):v=Q.access(t,"fxshow",{display:u}),o&&(v.hidden=!m),m&&ht([t],!0),f.done((function(){for(r in m||ht([t]),Q.remove(t,"fxshow"),h)T.style(t,r,h[r])}))),l=de(m?v[r]:0,r,f),r in v||(v[r]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?fe.prefilters.unshift(t):fe.prefilters.push(t)}}),T.speed=function(t,e,n){var r=t&&"object"==typeof t?T.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return T.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in T.fx.speeds?r.duration=T.fx.speeds[r.duration]:r.duration=T.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&T.dequeue(this,r.queue)},r},T.fn.extend({fadeTo:function(t,e,n,r){return this.filter(ut).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=T.isEmptyObject(t),o=T.speed(e,n,r),a=function(){var e=fe(this,T.extend({},t),o);(i||Q.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",o=T.timers,a=Q.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&se.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||T.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=Q.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=T.timers,a=r?r.length:0;for(n.finish=!0,T.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),T.each(["toggle","show","hide"],(function(t,e){var n=T.fn[e];T.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(ce(e,!0),t,r,i)}})),T.each({slideDown:ce("show"),slideUp:ce("hide"),slideToggle:ce("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){T.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),T.timers=[],T.fx.tick=function(){var t,e=0,n=T.timers;for(ie=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||T.fx.stop(),ie=void 0},T.fx.timer=function(t){T.timers.push(t),T.fx.start()},T.fx.interval=13,T.fx.start=function(){oe||(oe=!0,le())},T.fx.stop=function(){oe=null},T.fx.speeds={slow:600,fast:200,_default:400},T.fn.delay=function(t,e){return t=T.fx&&T.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,n){var i=r.setTimeout(e,t);n.stop=function(){r.clearTimeout(i)}}))},function(){var t=b.createElement("input"),e=b.createElement("select").appendChild(b.createElement("option"));t.type="checkbox",v.checkOn=""!==t.value,v.optSelected=e.selected,(t=b.createElement("input")).value="t",t.type="radio",v.radioValue="t"===t.value}();var he,pe=T.expr.attrHandle;T.fn.extend({attr:function(t,e){return W(this,T.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){T.removeAttr(this,t)}))}}),T.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?T.prop(t,e,n):(1===o&&T.isXMLDoc(t)||(i=T.attrHooks[e.toLowerCase()]||(T.expr.match.bool.test(e)?he:void 0)),void 0!==n?null===n?void T.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=T.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&D(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(R);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),he={set:function(t,e,n){return!1===e?T.removeAttr(t,n):t.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=pe[e]||T.find.attr;pe[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=pe[a],pe[a]=i,i=null!=n(t,e,r)?a:null,pe[a]=o),i}}));var me=/^(?:input|select|textarea|button)$/i,ve=/^(?:a|area)$/i;function ge(t){return(t.match(R)||[]).join(" ")}function ye(t){return t.getAttribute&&t.getAttribute("class")||""}function be(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(R)||[]}T.fn.extend({prop:function(t,e){return W(this,T.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[T.propFix[t]||t]}))}}),T.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&T.isXMLDoc(t)||(e=T.propFix[e]||e,i=T.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=T.find.attr(t,"tabindex");return e?parseInt(e,10):me.test(t.nodeName)||ve.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(T.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)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){T.propFix[this.toLowerCase()]=this})),T.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,l=0;if(g(t))return this.each((function(e){T(this).addClass(t.call(this,e,ye(this)))}));if((e=be(t)).length)for(;n=this[l++];)if(i=ye(n),r=1===n.nodeType&&" "+ge(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ge(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,l=0;if(g(t))return this.each((function(e){T(this).removeClass(t.call(this,e,ye(this)))}));if(!arguments.length)return this.attr("class","");if((e=be(t)).length)for(;n=this[l++];)if(i=ye(n),r=1===n.nodeType&&" "+ge(i)+" "){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=ge(r))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t,r="string"===n||Array.isArray(t);return"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):g(t)?this.each((function(n){T(this).toggleClass(t.call(this,n,ye(this),e),e)})):this.each((function(){var e,i,o,a;if(r)for(i=0,o=T(this),a=be(t);e=a[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=ye(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Q.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+ge(ye(n))+" ").indexOf(e)>-1)return!0;return!1}});var we=/\r/g;T.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=g(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,T(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=T.map(i,(function(t){return null==t?"":t+""}))),(e=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=T.valHooks[i.type]||T.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(we,""):null==n?"":n:void 0}}),T.extend({valHooks:{option:{get:function(t){var e=T.find.attr(t,"value");return null!=e?e:ge(T.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],l=a?o+1:i.length;for(r=o<0?l:a?o:0;r<l;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!D(n.parentNode,"optgroup"))){if(e=T(n).val(),a)return e;s.push(e)}return s},set:function(t,e){for(var n,r,i=t.options,o=T.makeArray(e),a=i.length;a--;)((r=i[a]).selected=T.inArray(T.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),T.each(["radio","checkbox"],(function(){T.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=T.inArray(T(t).val(),e)>-1}},v.checkOn||(T.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in r;var xe=/^(?:focusinfocus|focusoutblur)$/,Ee=function(t){t.stopPropagation()};T.extend(T.event,{trigger:function(t,e,n,i){var o,a,s,l,u,c,d,f,p=[n||b],m=h.call(t,"type")?t.type:t,v=h.call(t,"namespace")?t.namespace.split("."):[];if(a=f=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!xe.test(m+T.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),u=m.indexOf(":")<0&&"on"+m,(t=t[T.expando]?t:new T.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:T.makeArray(e,[t]),d=T.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(n,e))){if(!i&&!d.noBubble&&!y(n)){for(l=d.delegateType||m,xe.test(l+m)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(n.ownerDocument||b)&&p.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=p[o++])&&!t.isPropagationStopped();)f=a,t.type=o>1?l:d.bindType||m,(c=(Q.get(a,"events")||Object.create(null))[t.type]&&Q.get(a,"handle"))&&c.apply(a,e),(c=u&&a[u])&&c.apply&&X(a)&&(t.result=c.apply(a,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),e)||!X(n)||u&&g(n[m])&&!y(n)&&((s=n[u])&&(n[u]=null),T.event.triggered=m,t.isPropagationStopped()&&f.addEventListener(m,Ee),n[m](),t.isPropagationStopped()&&f.removeEventListener(m,Ee),T.event.triggered=void 0,s&&(n[u]=s)),t.result}},simulate:function(t,e,n){var r=T.extend(new T.Event,n,{type:t,isSimulated:!0});T.event.trigger(r,null,e)}}),T.fn.extend({trigger:function(t,e){return this.each((function(){T.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return T.event.trigger(t,e,n,!0)}}),v.focusin||T.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){T.event.simulate(e,t.target,T.event.fix(t))};T.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,e);i||r.addEventListener(t,n,!0),Q.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,e)-1;i?Q.access(r,e,i):(r.removeEventListener(t,n,!0),Q.remove(r,e))}}}));var Ne=r.location,Te={guid:Date.now()},Se=/\?/;T.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||T.error("Invalid XML: "+(n?T.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Ce=/\[\]$/,ke=/\r?\n/g,Ae=/^(?:submit|button|image|reset|file)$/i,_e=/^(?:input|select|textarea|keygen)/i;function De(t,e,n,r){var i;if(Array.isArray(e))T.each(e,(function(e,i){n||Ce.test(t)?r(t,i):De(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==E(e))r(t,e);else for(i in e)De(t+"["+i+"]",e[i],n,r)}T.param=function(t,e){var n,r=[],i=function(t,e){var n=g(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!T.isPlainObject(t))T.each(t,(function(){i(this.name,this.value)}));else for(n in t)De(n,t[n],e,i);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=T.prop(this,"elements");return t?T.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!T(this).is(":disabled")&&_e.test(this.nodeName)&&!Ae.test(t)&&(this.checked||!vt.test(t))})).map((function(t,e){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,(function(t){return{name:e.name,value:t.replace(ke,"\r\n")}})):{name:e.name,value:n.replace(ke,"\r\n")}})).get()}});var Oe=/%20/g,Pe=/#.*$/,Ie=/([?&])_=[^&]*/,je=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:GET|HEAD)$/,$e=/^\/\//,Me={},Re={},Be="*/".concat("*"),He=b.createElement("a");function Fe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(R)||[];if(g(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function qe(t,e,n,r){var i={},o=t===Re;function a(s){var l;return i[s]=!0,T.each(t[s]||[],(function(t,s){var u=s(e,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(e.dataTypes.unshift(u),a(u),!1)})),l}return a(e.dataTypes[0])||!i["*"]&&a("*")}function Ue(t,e){var n,r,i=T.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&T.extend(!0,t,r),t}He.href=Ne.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ne.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ne.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Be,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":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ue(Ue(t,T.ajaxSettings),e):Ue(T.ajaxSettings,t)},ajaxPrefilter:Fe(Me),ajaxTransport:Fe(Re),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0);var n,i,o,a,s,l,u,c,d,f,h=T.ajaxSetup({},e=e||{}),p=h.context||h,m=h.context&&(p.nodeType||p.jquery)?T(p):T.event,v=T.Deferred(),g=T.Callbacks("once memory"),y=h.statusCode||{},w={},x={},E="canceled",N={readyState:0,getResponseHeader:function(t){var e;if(u){if(!a)for(a={};e=je.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(t,e){return null==u&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==u&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)N.always(t[N.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||E;return n&&n.abort(e),S(0,e),this}};if(v.promise(N),h.url=((t||h.url||Ne.href)+"").replace($e,Ne.protocol+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(R)||[""],null==h.crossDomain){l=b.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=He.protocol+"//"+He.host!=l.protocol+"//"+l.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=T.param(h.data,h.traditional)),qe(Me,h,e,N),u)return N;for(d in(c=T.event&&h.global)&&0==T.active++&&T.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Le.test(h.type),i=h.url.replace(Pe,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Oe,"+")):(f=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(Se.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Ie,"$1"),f=(Se.test(i)?"&":"?")+"_="+Te.guid+++f),h.url=i+f),h.ifModified&&(T.lastModified[i]&&N.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&N.setRequestHeader("If-None-Match",T.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&N.setRequestHeader("Content-Type",h.contentType),N.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Be+"; q=0.01":""):h.accepts["*"]),h.headers)N.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(p,N,h)||u))return N.abort();if(E="abort",g.add(h.complete),N.done(h.success),N.fail(h.error),n=qe(Re,h,e,N)){if(N.readyState=1,c&&m.trigger("ajaxSend",[N,h]),u)return N;h.async&&h.timeout>0&&(s=r.setTimeout((function(){N.abort("timeout")}),h.timeout));try{u=!1,n.send(w,S)}catch(t){if(u)throw t;S(-1,t)}}else S(-1,"No Transport");function S(t,e,a,l){var d,f,b,w,x,E=e;u||(u=!0,s&&r.clearTimeout(s),n=void 0,o=l||"",N.readyState=t>0?4:0,d=t>=200&&t<300||304===t,a&&(w=function(t,e,n){for(var r,i,o,a,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||t.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}(h,N,a)),!d&&T.inArray("script",h.dataTypes)>-1&&T.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){}),w=function(t,e,n,r){var i,o,a,s,l,u={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)u[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}(h,w,N,d),d?(h.ifModified&&((x=N.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=x),(x=N.getResponseHeader("etag"))&&(T.etag[i]=x)),204===t||"HEAD"===h.type?E="nocontent":304===t?E="notmodified":(E=w.state,f=w.data,d=!(b=w.error))):(b=E,!t&&E||(E="error",t<0&&(t=0))),N.status=t,N.statusText=(e||E)+"",d?v.resolveWith(p,[f,E,N]):v.rejectWith(p,[N,E,b]),N.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[N,h,d?f:b]),g.fireWith(p,[N,E]),c&&(m.trigger("ajaxComplete",[N,h]),--T.active||T.event.trigger("ajaxStop")))}return N},getJSON:function(t,e,n){return T.get(t,e,n,"json")},getScript:function(t,e){return T.get(t,void 0,e,"script")}}),T.each(["get","post"],(function(t,e){T[e]=function(t,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),T.ajax(T.extend({url:t,type:e,dataType:i,data:n,success:r},T.isPlainObject(t)&&t))}})),T.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),T._evalUrl=function(t,e,n){return T.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){T.globalEval(t,e,n)}})},T.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=T(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return g(t)?this.each((function(e){T(this).wrapInner(t.call(this,e))})):this.each((function(){var e=T(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){T(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){T(this).replaceWith(this.childNodes)})),this}}),T.expr.pseudos.hidden=function(t){return!T.expr.pseudos.visible(t)},T.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var ze={0:200,1223:204},We=T.ajaxSettings.xhr();v.cors=!!We&&"withCredentials"in We,v.ajax=We=!!We,T.ajaxTransport((function(t){var e,n;if(v.cors||We&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(ze[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),n=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){e&&n()}))},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),T.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),T.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 T.globalEval(t),t}}}),T.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),T.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=T("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),b.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Ge,Ve=[],Ye=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ve.pop()||T.expando+"_"+Te.guid++;return this[t]=!0,t}}),T.ajaxPrefilter("json jsonp",(function(t,e,n){var i,o,a,s=!1!==t.jsonp&&(Ye.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ye.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Ye,"$1"+i):!1!==t.jsonp&&(t.url+=(Se.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||T.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=r[i],r[i]=function(){a=arguments},n.always((function(){void 0===o?T(r).removeProp(i):r[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ve.push(i)),a&&g(o)&&o(a[0]),a=o=void 0})),"script"})),v.createHTMLDocument=((Ge=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),T.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(v.createHTMLDocument?((r=(e=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,e.head.appendChild(r)):e=b),o=!n&&[],(i=O.exec(t))?[e.createElement(i[1])]:(i=Nt([t],e,o),o&&o.length&&T(o).remove(),T.merge([],i.childNodes)));var r,i,o},T.fn.load=function(t,e,n){var r,i,o,a=this,s=t.indexOf(" ");return s>-1&&(r=ge(t.slice(s)),t=t.slice(0,s)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),a.length>0&&T.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){o=arguments,a.html(r?T("<div>").append(T.parseHTML(t)).find(r):t)})).always(n&&function(t,e){a.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},T.expr.pseudos.animated=function(t){return T.grep(T.timers,(function(e){return t===e.elem})).length},T.offset={setOffset:function(t,e,n){var r,i,o,a,s,l,u=T.css(t,"position"),c=T(t),d={};"static"===u&&(t.style.position="relative"),s=c.offset(),o=T.css(t,"top"),l=T.css(t,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),g(e)&&(e=e.call(t,n,T.extend({},s))),null!=e.top&&(d.top=e.top-s.top+a),null!=e.left&&(d.left=e.left-s.left+i),"using"in e?e.using.call(t,d):c.css(d)}},T.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){T.offset.setOffset(this,t,e)}));var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.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,r=this[0],i={top:0,left:0};if("fixed"===T.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===T.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=T(t).offset()).top+=T.css(t,"borderTopWidth",!0),i.left+=T.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-T.css(r,"marginTop",!0),left:e.left-i.left-T.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===T.css(t,"position");)t=t.offsetParent;return t||at}))}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;T.fn[t]=function(r){return W(this,(function(t,r,i){var o;if(y(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===i)return o?o[e]:t[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i}),t,r,arguments.length)}})),T.each(["top","left"],(function(t,e){T.cssHooks[e]=Wt(v.pixelPosition,(function(t,n){if(n)return n=zt(t,e),Ht.test(n)?T(t).position()[e]+"px":n}))})),T.each({Height:"height",Width:"width"},(function(t,e){T.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){T.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return W(this,(function(e,n,i){var o;return y(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?T.css(e,n,s):T.style(e,n,i,s)}),e,a?i:void 0,a)}}))})),T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){T.fn[e]=function(t){return this.on(e,t)}})),T.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,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),T.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){T.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Ke=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;T.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),g(t))return r=s.call(arguments,2),i=function(){return t.apply(e||this,r.concat(s.call(arguments)))},i.guid=t.guid=t.guid||T.guid++,i},T.holdReady=function(t){t?T.readyWait++:T.ready(!0)},T.isArray=Array.isArray,T.parseJSON=JSON.parse,T.nodeName=D,T.isFunction=g,T.isWindow=y,T.camelCase=K,T.type=E,T.now=Date.now,T.isNumeric=function(t){var e=T.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},T.trim=function(t){return null==t?"":(t+"").replace(Ke,"")},void 0===(n=function(){return T}.apply(e,[]))||(t.exports=n);var Xe=r.jQuery,Je=r.$;return T.noConflict=function(t){return r.$===T&&(r.$=Je),t&&r.jQuery===T&&(r.jQuery=Xe),T},void 0===i&&(r.jQuery=r.$=T),T}))},92:(t,e,n)=>{"use strict";var r=n(640);t.exports=function(t,e,n){var i=[],o=!1,a=!1;function s(){if(o)throw new Error("Nested m.redraw.sync() call");o=!0;for(var e=0;e<i.length;e+=2)try{t(i[e],r(i[e+1]),l)}catch(t){n.error(t)}o=!1}function l(){a||(a=!0,e((function(){a=!1,s()})))}return l.sync=s,{mount:function(e,n){if(null!=n&&null==n.view&&"function"!=typeof n)throw new TypeError("m.mount(element, component) expects a component, not a vnode");var o=i.indexOf(e);o>=0&&(i.splice(o,2),t(e,[],l)),null!=n&&(i.push(e,n),t(e,r(n),l))},redraw:l}}},4:(t,e,n)=>{"use strict";var r=n(640),i=n(922),o=n(363),a=n(822),s=n(56),l=n(757),u=n(202),c={};t.exports=function(t,e){var n;function d(e,r,i){if(e=a(e,r),null!=n){n();var o=i?i.state:null,s=i?i.title:null;i&&i.replace?t.history.replaceState(o,s,y.prefix+e):t.history.pushState(o,s,y.prefix+e)}else t.location.href=y.prefix+e}var f,h,p,m,v=c,g=y.SKIP={};function y(i,a,b){if(null==i)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var w,x=0,E=Object.keys(b).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:b[t],check:l(t)}})),N="function"==typeof setImmediate?setImmediate:setTimeout,T=o.resolve(),S=!1;if(n=null,null!=a){var C=s(a);if(!E.some((function(t){return t.check(C)})))throw new ReferenceError("Default route doesn't match any known routes")}function k(){S=!1;var n=t.location.hash;"#"!==y.prefix[0]&&(n=t.location.search+n,"?"!==y.prefix[0]&&"/"!==(n=t.location.pathname+n)[0]&&(n="/"+n));var r=n.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(y.prefix.length),i=s(r);function o(){if(r===a)throw new Error("Could not resolve default route "+a);d(a,null,{replace:!0})}u(i.params,t.history.state),function t(n){for(;n<E.length;n++)if(E[n].check(i)){var a=E[n].component,s=E[n].route,l=a,u=m=function(o){if(u===m){if(o===g)return t(n+1);f=null==o||"function"!=typeof o.view&&"function"!=typeof o?"div":o,h=i.params,p=r,m=null,v=a.render?a:null,2===x?e.redraw():(x=2,e.redraw.sync())}};return void(a.view||"function"==typeof a?(a={},u(l)):a.onmatch?T.then((function(){return a.onmatch(i.params,r,s)})).then(u,o):u("div"))}o()}(0)}return n=function(){S||(S=!0,N(k))},"function"==typeof t.history.pushState?(w=function(){t.removeEventListener("popstate",n,!1)},t.addEventListener("popstate",n,!1)):"#"===y.prefix[0]&&(n=null,w=function(){t.removeEventListener("hashchange",k,!1)},t.addEventListener("hashchange",k,!1)),e.mount(i,{onbeforeupdate:function(){return!(!(x=x?2:1)||c===v)},oncreate:k,onremove:w,view:function(){if(x&&c!==v){var t=[r(f,h.key,h)];return v&&(t=v.render(t[0])),t}}})}return y.set=function(t,e,n){null!=m&&((n=n||{}).replace=!0),m=null,d(t,e,n)},y.get=function(){return p},y.prefix="#!",y.Link={view:function(t){var e,n,r=t.attrs.options,o={};u(o,t.attrs),o.selector=o.options=o.key=o.oninit=o.oncreate=o.onbeforeupdate=o.onupdate=o.onbeforeremove=o.onremove=null;var a=i(t.attrs.selector||"a",o,t.children);return(a.attrs.disabled=Boolean(a.attrs.disabled))?(a.attrs.href=null,a.attrs["aria-disabled"]="true",a.attrs.onclick=null):(e=a.attrs.onclick,n=a.attrs.href,a.attrs.href=y.prefix+n,a.attrs.onclick=function(t){var i;"function"==typeof e?i=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===i||t.defaultPrevented||0!==t.button&&0!==t.which&&1!==t.which||t.currentTarget.target&&"_self"!==t.currentTarget.target||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||(t.preventDefault(),t.redraw=!1,y.set(n,null,r))}),a}},y.param=function(t){return h&&null!=t?h[t]:h},y}},479:(t,e,n)=>{"use strict";var r=n(922);r.trust=n(396),r.fragment=n(209),t.exports=r},872:(t,e,n)=>{"use strict";var r=n(479),i=n(105),o=n(49),a=function(){return r.apply(this,arguments)};a.m=r,a.trust=r.trust,a.fragment=r.fragment,a.mount=o.mount,a.route=n(438),a.render=n(534),a.redraw=o.redraw,a.request=i.request,a.jsonp=i.jsonp,a.parseQueryString=n(402),a.buildQueryString=n(266),a.parsePathname=n(56),a.buildPathname=n(822),a.vnode=n(640),a.PromisePolyfill=n(529),t.exports=a},49:(t,e,n)=>{"use strict";var r=n(534);t.exports=n(92)(r,requestAnimationFrame,console)},202:t=>{"use strict";t.exports=Object.assign||function(t,e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))}},822:(t,e,n)=>{"use strict";var r=n(266),i=n(202);t.exports=function(t,e){if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Template parameter names *must* be separated");if(null==e)return t;var n=t.indexOf("?"),o=t.indexOf("#"),a=o<0?t.length:o,s=n<0?a:n,l=t.slice(0,s),u={};i(u,e);var c=l.replace(/:([^\/\.-]+)(\.{3})?/g,(function(t,n,r){return delete u[n],null==e[n]?t:r?e[n]:encodeURIComponent(String(e[n]))})),d=c.indexOf("?"),f=c.indexOf("#"),h=f<0?c.length:f,p=d<0?h:d,m=c.slice(0,p);n>=0&&(m+=t.slice(n,a)),d>=0&&(m+=(n<0?"?":"&")+c.slice(d,h));var v=r(u);return v&&(m+=(n<0&&d<0?"?":"&")+v),o>=0&&(m+=t.slice(o)),f>=0&&(m+=(o<0?"":"&")+c.slice(f)),m}},757:(t,e,n)=>{"use strict";var r=n(56);t.exports=function(t){var e=r(t),n=Object.keys(e.params),i=[],o=new RegExp("^"+e.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,(function(t,e,n){return null==e?"\\"+t:(i.push({k:e,r:"..."===n}),"..."===n?"(.*)":"."===n?"([^/]+)\\.":"([^/]+)"+(n||""))}))+"$");return function(t){for(var r=0;r<n.length;r++)if(e.params[n[r]]!==t.params[n[r]])return!1;if(!i.length)return o.test(t.path);var a=o.exec(t.path);if(null==a)return!1;for(r=0;r<i.length;r++)t.params[i[r].k]=i[r].r?a[r+1]:decodeURIComponent(a[r+1]);return!0}}},56:(t,e,n)=>{"use strict";var r=n(402);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),i=n<0?t.length:n,o=e<0?i:e,a=t.slice(0,o).replace(/\/{2,}/g,"/");return a?("/"!==a[0]&&(a="/"+a),a.length>1&&"/"===a[a.length-1]&&(a=a.slice(0,-1))):a="/",{path:a,params:e<0?{}:r(t.slice(e+1,i))}}},529:t=>{"use strict";var e=function t(e){if(!(this instanceof t))throw new Error("Promise must be called with `new`");if("function"!=typeof e)throw new TypeError("executor must be a function");var n=this,r=[],i=[],o=u(r,!0),a=u(i,!1),s=n._instance={resolvers:r,rejectors:i},l="function"==typeof setImmediate?setImmediate:setTimeout;function u(t,e){return function o(u){var d;try{if(!e||null==u||"object"!=typeof u&&"function"!=typeof u||"function"!=typeof(d=u.then))l((function(){e||0!==t.length||console.error("Possible unhandled promise rejection:",u);for(var n=0;n<t.length;n++)t[n](u);r.length=0,i.length=0,s.state=e,s.retry=function(){o(u)}}));else{if(u===n)throw new TypeError("Promise can't be resolved w/ itself");c(d.bind(u))}}catch(t){a(t)}}}function c(t){var e=0;function n(t){return function(n){e++>0||t(n)}}var r=n(a);try{t(n(o),r)}catch(t){r(t)}}c(e)};e.prototype.then=function(t,n){var r,i,o=this._instance;function a(t,e,n,a){e.push((function(e){if("function"!=typeof t)n(e);else try{r(t(e))}catch(t){i&&i(t)}})),"function"==typeof o.retry&&a===o.state&&o.retry()}var s=new e((function(t,e){r=t,i=e}));return a(t,o.resolvers,r,!0),a(n,o.rejectors,i,!1),s},e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(t){return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))},e.resolve=function(t){return t instanceof e?t:new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){return new e((function(e,n){var r=t.length,i=0,o=[];if(0===t.length)e([]);else for(var a=0;a<t.length;a++)!function(a){function s(t){i++,o[a]=t,i===r&&e(o)}null==t[a]||"object"!=typeof t[a]&&"function"!=typeof t[a]||"function"!=typeof t[a].then?s(t[a]):t[a].then(s,n)}(a)}))},e.race=function(t){return new e((function(e,n){for(var r=0;r<t.length;r++)t[r].then(e,n)}))},t.exports=e},363:(t,e,n)=>{"use strict";var r=n(529);"undefined"!=typeof window?(void 0===window.Promise?window.Promise=r:window.Promise.prototype.finally||(window.Promise.prototype.finally=r.prototype.finally),t.exports=window.Promise):void 0!==n.g?(void 0===n.g.Promise?n.g.Promise=r:n.g.Promise.prototype.finally||(n.g.Promise.prototype.finally=r.prototype.finally),t.exports=n.g.Promise):t.exports=r},266:t=>{"use strict";t.exports=function(t){if("[object Object]"!==Object.prototype.toString.call(t))return"";var e=[];for(var n in t)r(n,t[n]);return e.join("&");function r(t,n){if(Array.isArray(n))for(var i=0;i<n.length;i++)r(t+"["+i+"]",n[i]);else if("[object Object]"===Object.prototype.toString.call(n))for(var i in n)r(t+"["+i+"]",n[i]);else e.push(encodeURIComponent(t)+(null!=n&&""!==n?"="+encodeURIComponent(n):""))}}},402:t=>{"use strict";t.exports=function(t){if(""===t||null==t)return{};"?"===t.charAt(0)&&(t=t.slice(1));for(var e=t.split("&"),n={},r={},i=0;i<e.length;i++){var o=e[i].split("="),a=decodeURIComponent(o[0]),s=2===o.length?decodeURIComponent(o[1]):"";"true"===s?s=!0:"false"===s&&(s=!1);var l=a.split(/\]\[?|\[/),u=r;a.indexOf("[")>-1&&l.pop();for(var c=0;c<l.length;c++){var d=l[c],f=l[c+1],h=""==f||!isNaN(parseInt(f,10));if(""===d)null==n[a=l.slice(0,c).join()]&&(n[a]=Array.isArray(u)?u.length:0),d=n[a]++;else if("__proto__"===d)break;if(c===l.length-1)u[d]=s;else{var p=Object.getOwnPropertyDescriptor(u,d);null!=p&&(p=p.value),null==p&&(u[d]=p=h?[]:{}),u=p}}}return r}},534:(t,e,n)=>{"use strict";t.exports=n(324)(window)},209:(t,e,n)=>{"use strict";var r=n(640),i=n(69);t.exports=function(){var t=i.apply(0,arguments);return t.tag="[",t.children=r.normalizeChildren(t.children),t}},922:(t,e,n)=>{"use strict";var r=n(640),i=n(69),o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,a={},s={}.hasOwnProperty;function l(t){for(var e in t)if(s.call(t,e))return!1;return!0}function u(t){for(var e,n="div",r=[],i={};e=o.exec(t);){var s=e[1],l=e[2];if(""===s&&""!==l)n=l;else if("#"===s)i.id=l;else if("."===s)r.push(l);else if("["===e[3][0]){var u=e[6];u&&(u=u.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?r.push(u):i[e[4]]=""===u?u:u||!0}}return r.length>0&&(i.className=r.join(" ")),a[t]={tag:n,attrs:i}}function c(t,e){var n=e.attrs,i=r.normalizeChildren(e.children),o=s.call(n,"class"),a=o?n.class:n.className;if(e.tag=t.tag,e.attrs=null,e.children=void 0,!l(t.attrs)&&!l(n)){var u={};for(var c in n)s.call(n,c)&&(u[c]=n[c]);n=u}for(var c in t.attrs)s.call(t.attrs,c)&&"className"!==c&&!s.call(n,c)&&(n[c]=t.attrs[c]);for(var c in null==a&&null==t.attrs.className||(n.className=null!=a?null!=t.attrs.className?String(t.attrs.className)+" "+String(a):a:null!=t.attrs.className?t.attrs.className:null),o&&(n.class=null),n)if(s.call(n,c)&&"key"!==c){e.attrs=n;break}return Array.isArray(i)&&1===i.length&&null!=i[0]&&"#"===i[0].tag?e.text=i[0].children:e.children=i,e}t.exports=function(t){if(null==t||"string"!=typeof t&&"function"!=typeof t&&"function"!=typeof t.view)throw Error("The selector must be either a string or a component.");var e=i.apply(1,arguments);return"string"==typeof t&&(e.children=r.normalizeChildren(e.children),"["!==t)?c(a[t]||u(t),e):(e.tag=t,e)}},69:(t,e,n)=>{"use strict";var r=n(640);t.exports=function(){var t,e=arguments[this],n=this+1;if(null==e?e={}:("object"!=typeof e||null!=e.tag||Array.isArray(e))&&(e={},n=this),arguments.length===n+1)t=arguments[n],Array.isArray(t)||(t=[t]);else for(t=[];n<arguments.length;)t.push(arguments[n++]);return r("",e.key,e,t)}},324:(t,e,n)=>{"use strict";var r=n(640);t.exports=function(t){var e,n=t&&t.document,i={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function o(t){return t.attrs&&t.attrs.xmlns||i[t.tag]}function a(t,e){if(t.state!==e)throw new Error("`vnode.state` must not be modified")}function s(t){var e=t.state;try{return this.apply(e,arguments)}finally{a(t,e)}}function l(){try{return n.activeElement}catch(t){return null}}function u(t,e,n,r,i,o,a){for(var s=n;s<r;s++){var l=e[s];null!=l&&c(t,l,i,a,o)}}function c(t,e,i,a,l){var d=e.tag;if("string"==typeof d)switch(e.state={},null!=e.attrs&&M(e.attrs,e,i),d){case"#":!function(t,e,r){e.dom=n.createTextNode(e.children),w(t,e.dom,r)}(t,e,l);break;case"<":f(t,e,a,l);break;case"[":!function(t,e,r,i,o){var a=n.createDocumentFragment();if(null!=e.children){var s=e.children;u(a,s,0,s.length,r,null,i)}e.dom=a.firstChild,e.domSize=a.childNodes.length,w(t,a,o)}(t,e,i,a,l);break;default:!function(t,e,i,a,s){var l=e.tag,c=e.attrs,d=c&&c.is,f=(a=o(e)||a)?d?n.createElementNS(a,l,{is:d}):n.createElementNS(a,l):d?n.createElement(l,{is:d}):n.createElement(l);if(e.dom=f,null!=c&&function(t,e,n){for(var r in e)k(t,r,null,e[r],n)}(e,c,a),w(t,f,s),!x(e)&&(null!=e.text&&(""!==e.text?f.textContent=e.text:e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var h=e.children;u(f,h,0,h.length,i,null,a),"select"===e.tag&&null!=c&&function(t,e){if("value"in e)if(null===e.value)-1!==t.dom.selectedIndex&&(t.dom.value=null);else{var n=""+e.value;t.dom.value===n&&-1!==t.dom.selectedIndex||(t.dom.value=n)}"selectedIndex"in e&&k(t,"selectedIndex",null,e.selectedIndex,void 0)}(e,c)}}(t,e,i,a,l)}else!function(t,e,n,i,o){(function(t,e){var n;if("function"==typeof t.tag.view){if(t.state=Object.create(t.tag),null!=(n=t.state.view).$$reentrantLock$$)return;n.$$reentrantLock$$=!0}else{if(t.state=void 0,null!=(n=t.tag).$$reentrantLock$$)return;n.$$reentrantLock$$=!0,t.state=null!=t.tag.prototype&&"function"==typeof t.tag.prototype.view?new t.tag(t):t.tag(t)}if(M(t.state,t,e),null!=t.attrs&&M(t.attrs,t,e),t.instance=r.normalize(s.call(t.state.view,t)),t.instance===t)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(e,n),null!=e.instance?(c(t,e.instance,n,i,o),e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0):e.domSize=0}(t,e,i,a,l)}var d={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function f(t,e,r,i){var o=e.children.match(/^\s*?<(\w+)/im)||[],a=n.createElement(d[o[1]]||"div");"http://www.w3.org/2000/svg"===r?(a.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e.children+"</svg>",a=a.firstChild):a.innerHTML=e.children,e.dom=a.firstChild,e.domSize=a.childNodes.length,e.instance=[];for(var s,l=n.createDocumentFragment();s=a.firstChild;)e.instance.push(s),l.appendChild(s);w(t,l,i)}function h(t,e,n,r,i,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)u(t,n,0,n.length,r,i,o);else if(null==n||0===n.length)E(t,e,0,e.length);else{var a=null!=e[0]&&null!=e[0].key,s=null!=n[0]&&null!=n[0].key,l=0,d=0;if(!a)for(;d<e.length&&null==e[d];)d++;if(!s)for(;l<n.length&&null==n[l];)l++;if(null===s&&null==a)return;if(a!==s)E(t,e,d,e.length),u(t,n,l,n.length,r,i,o);else if(s){for(var f,h,b,w,x,T=e.length-1,S=n.length-1;T>=d&&S>=l&&(b=e[T],w=n[S],b.key===w.key);)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),T--,S--;for(;T>=d&&S>=l&&(f=e[d],h=n[l],f.key===h.key);)d++,l++,f!==h&&p(t,f,h,r,g(e,d,i),o);for(;T>=d&&S>=l&&l!==S&&f.key===w.key&&b.key===h.key;)y(t,b,x=g(e,d,i)),b!==h&&p(t,b,h,r,x,o),++l<=--S&&y(t,f,i),f!==w&&p(t,f,w,r,i,o),null!=w.dom&&(i=w.dom),d++,b=e[--T],w=n[S],f=e[d],h=n[l];for(;T>=d&&S>=l&&b.key===w.key;)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),S--,b=e[--T],w=n[S];if(l>S)E(t,e,d,T+1);else if(d>T)u(t,n,l,S+1,r,i,o);else{var C,k,A=i,_=S-l+1,D=new Array(_),O=0,P=0,I=2147483647,j=0;for(P=0;P<_;P++)D[P]=-1;for(P=S;P>=l;P--){null==C&&(C=m(e,d,T+1));var L=C[(w=n[P]).key];null!=L&&(I=L<I?L:-1,D[P-l]=L,b=e[L],e[L]=null,b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),j++)}if(i=A,j!==T-d+1&&E(t,e,d,T+1),0===j)u(t,n,l,S+1,r,i,o);else if(-1===I)for(k=function(t){var e=[0],n=0,r=0,i=0,o=v.length=t.length;for(i=0;i<o;i++)v[i]=t[i];for(i=0;i<o;++i)if(-1!==t[i]){var a=e[e.length-1];if(t[a]<t[i])v[i]=a,e.push(i);else{for(n=0,r=e.length-1;n<r;){var s=(n>>>1)+(r>>>1)+(n&r&1);t[e[s]]<t[i]?n=s+1:r=s}t[i]<t[e[n]]&&(n>0&&(v[i]=e[n-1]),e[n]=i)}}for(r=e[(n=e.length)-1];n-- >0;)e[n]=r,r=v[r];return v.length=0,e}(D),O=k.length-1,P=S;P>=l;P--)h=n[P],-1===D[P-l]?c(t,h,r,o,i):k[O]===P-l?O--:y(t,h,i),null!=h.dom&&(i=n[P].dom);else for(P=S;P>=l;P--)h=n[P],-1===D[P-l]&&c(t,h,r,o,i),null!=h.dom&&(i=n[P].dom)}}else{var $=e.length<n.length?e.length:n.length;for(l=l<d?l:d;l<$;l++)(f=e[l])===(h=n[l])||null==f&&null==h||(null==f?c(t,h,r,o,g(e,l+1,i)):null==h?N(t,f):p(t,f,h,r,g(e,l+1,i),o));e.length>$&&E(t,e,l,e.length),n.length>$&&u(t,n,l,n.length,r,i,o)}}}function p(t,e,n,i,a,l){var u=e.tag;if(u===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate&&void 0!==(n=s.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate&&void 0!==(n=s.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof u)switch(null!=n.attrs&&R(n.attrs,n,i),u){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children),e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,r,i){e.children!==n.children?(T(t,e),f(t,n,r,i)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,l,a);break;case"[":!function(t,e,n,r,i,o){h(t,e.children,n.children,r,i,o);var a=0,s=n.children;if(n.dom=null,null!=s){for(var l=0;l<s.length;l++){var u=s[l];null!=u&&null!=u.dom&&(null==n.dom&&(n.dom=u.dom),a+=u.domSize||1)}1!==a&&(n.domSize=a)}}(t,e,n,i,a,l);break;default:!function(t,e,n,i){var a=e.dom=t.dom;i=o(e)||i,"textarea"===e.tag&&(null==e.attrs&&(e.attrs={}),null!=e.text&&(e.attrs.value=e.text,e.text=void 0)),function(t,e,n,r){if(null!=n)for(var i in n)k(t,i,e&&e[i],n[i],r);var o;if(null!=e)for(var i in e)null==(o=e[i])||null!=n&&null!=n[i]||A(t,i,o,r)}(e,t.attrs,e.attrs,i),x(e)||(null!=t.text&&null!=e.text&&""!==e.text?t.text.toString()!==e.text.toString()&&(t.dom.firstChild.nodeValue=e.text):(null!=t.text&&(t.children=[r("#",void 0,void 0,t.text,void 0,t.dom.firstChild)]),null!=e.text&&(e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),h(a,t.children,e.children,n,null,i)))}(e,n,i,l)}else!function(t,e,n,i,o,a){if(n.instance=r.normalize(s.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");R(n.state,n,i),null!=n.attrs&&R(n.attrs,n,i),null!=n.instance?(null==e.instance?c(t,n.instance,i,a,o):p(t,e.instance,n.instance,i,o,a),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=e.instance?(N(t,e.instance),n.dom=void 0,n.domSize=0):(n.dom=e.dom,n.domSize=e.domSize)}(t,e,n,i,a,l)}else N(t,e),c(t,n,i,l,a)}function m(t,e,n){for(var r=Object.create(null);e<n;e++){var i=t[e];if(null!=i){var o=i.key;null!=o&&(r[o]=e)}}return r}var v=[];function g(t,e,n){for(;e<t.length;e++)if(null!=t[e]&&null!=t[e].dom)return t[e].dom;return n}function y(t,e,r){var i=n.createDocumentFragment();b(t,i,e),w(t,i,r)}function b(t,e,n){for(;null!=n.dom&&n.dom.parentNode===t;){if("string"!=typeof n.tag){if(null!=(n=n.instance))continue}else if("<"===n.tag)for(var r=0;r<n.instance.length;r++)e.appendChild(n.instance[r]);else if("["!==n.tag)e.appendChild(n.dom);else if(1===n.children.length){if(null!=(n=n.children[0]))continue}else for(r=0;r<n.children.length;r++){var i=n.children[r];null!=i&&b(t,e,i)}break}}function w(t,e,n){null!=n?t.insertBefore(e,n):t.appendChild(e)}function x(t){if(null==t.attrs||null==t.attrs.contenteditable&&null==t.attrs.contentEditable)return!1;var e=t.children;if(null!=e&&1===e.length&&"<"===e[0].tag){var n=e[0].children;t.dom.innerHTML!==n&&(t.dom.innerHTML=n)}else if(null!=t.text||null!=e&&0!==e.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function E(t,e,n,r){for(var i=n;i<r;i++){var o=e[i];null!=o&&N(t,o)}}function N(t,e){var n,r,i,o=0,l=e.state;if("string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&null!=(i=s.call(e.state.onbeforeremove,e))&&"function"==typeof i.then&&(o=1,n=i),e.attrs&&"function"==typeof e.attrs.onbeforeremove&&null!=(i=s.call(e.attrs.onbeforeremove,e))&&"function"==typeof i.then&&(o|=2,r=i),a(e,l),o){if(null!=n){var u=function(){1&o&&((o&=2)||c())};n.then(u,u)}null!=r&&(u=function(){2&o&&((o&=1)||c())},r.then(u,u))}else C(e),S(t,e);function c(){a(e,l),C(e),S(t,e)}}function T(t,e){for(var n=0;n<e.instance.length;n++)t.removeChild(e.instance[n])}function S(t,e){for(;null!=e.dom&&e.dom.parentNode===t;){if("string"!=typeof e.tag){if(null!=(e=e.instance))continue}else if("<"===e.tag)T(t,e);else{if("["!==e.tag&&(t.removeChild(e.dom),!Array.isArray(e.children)))break;if(1===e.children.length){if(null!=(e=e.children[0]))continue}else for(var n=0;n<e.children.length;n++){var r=e.children[n];null!=r&&S(t,r)}}break}}function C(t){if("string"!=typeof t.tag&&"function"==typeof t.state.onremove&&s.call(t.state.onremove,t),t.attrs&&"function"==typeof t.attrs.onremove&&s.call(t.attrs.onremove,t),"string"!=typeof t.tag)null!=t.instance&&C(t.instance);else{var e=t.children;if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];null!=r&&C(r)}}}function k(t,e,r,i,o){if("key"!==e&&"is"!==e&&null!=i&&!_(e)&&(r!==i||function(t,e){return"value"===e||"checked"===e||"selectedIndex"===e||"selected"===e&&t.dom===l()||"option"===t.tag&&t.dom.parentNode===n.activeElement}(t,e)||"object"==typeof i)){if("o"===e[0]&&"n"===e[1])return $(t,e,i);if("xlink:"===e.slice(0,6))t.dom.setAttributeNS("http://www.w3.org/1999/xlink",e.slice(6),i);else if("style"===e)j(t.dom,r,i);else if(D(t,e,o)){if("value"===e){if(("input"===t.tag||"textarea"===t.tag)&&t.dom.value===""+i&&t.dom===l())return;if("select"===t.tag&&null!==r&&t.dom.value===""+i)return;if("option"===t.tag&&null!==r&&t.dom.value===""+i)return}"input"===t.tag&&"type"===e?t.dom.setAttribute(e,i):t.dom[e]=i}else"boolean"==typeof i?i?t.dom.setAttribute(e,""):t.dom.removeAttribute(e):t.dom.setAttribute("className"===e?"class":e,i)}}function A(t,e,n,r){if("key"!==e&&"is"!==e&&null!=n&&!_(e))if("o"!==e[0]||"n"!==e[1]||_(e))if("style"===e)j(t.dom,n,null);else if(!D(t,e,r)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===l())||"input"===t.tag&&"type"===e){var i=e.indexOf(":");-1!==i&&(e=e.slice(i+1)),!1!==n&&t.dom.removeAttribute("className"===e?"class":e)}else t.dom[e]=null;else $(t,e,void 0)}function _(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function D(t,e,n){return void 0===n&&(t.tag.indexOf("-")>-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var O=/[A-Z]/g;function P(t){return"-"+t.toLowerCase()}function I(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(O,P)}function j(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var r in t.style.cssText="",n)null!=(i=n[r])&&t.style.setProperty(I(r),String(i));else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(e[r])&&t.style.setProperty(I(r),i)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(I(r))}}function L(){this._=e}function $(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new L,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function M(t,e,n){"function"==typeof t.oninit&&s.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(s.bind(t.oncreate,e))}function R(t,e,n){"function"==typeof t.onupdate&&n.push(s.bind(t.onupdate,e))}return L.prototype=Object.create(null),L.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,i){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],a=l(),s=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var u=e;try{e="function"==typeof i?i:void 0,h(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===s?void 0:s)}finally{e=u}t.vnodes=n,null!=a&&l()!==a&&"function"==typeof a.focus&&a.focus();for(var c=0;c<o.length;c++)o[c]()}}},396:(t,e,n)=>{"use strict";var r=n(640);t.exports=function(t){return null==t&&(t=""),r("<",void 0,void 0,t,void 0,void 0)}},640:t=>{"use strict";function e(t,e,n,r,i,o){return{tag:t,key:e,attrs:n,children:r,text:i,dom:o,domSize:void 0,state:void 0,events:void 0,instance:void 0}}e.normalize=function(t){return Array.isArray(t)?e("[",void 0,void 0,e.normalizeChildren(t),void 0,void 0):null==t||"boolean"==typeof t?null:"object"==typeof t?t:e("#",void 0,void 0,String(t),void 0,void 0)},e.normalizeChildren=function(t){var n=[];if(t.length){for(var r=null!=t[0]&&null!=t[0].key,i=1;i<t.length;i++)if((null!=t[i]&&null!=t[i].key)!==r)throw new TypeError("Vnodes must either always have keys or never have keys!");for(i=0;i<t.length;i++)n[i]=e.normalize(t[i])}return n},t.exports=e},105:(t,e,n)=>{"use strict";var r=n(363),i=n(49);t.exports=n(858)(window,r,i.redraw)},858:(t,e,n)=>{"use strict";var r=n(822);t.exports=function(t,e,n){var i=0;function o(t){return new e(t)}function a(t){return function(i,a){"string"!=typeof i?(a=i,i=i.url):null==a&&(a={});var s=new e((function(e,n){t(r(i,a.params),a,(function(t){if("function"==typeof a.type)if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=new a.type(t[n]);else t=new a.type(t);e(t)}),n)}));if(!0===a.background)return s;var l=0;function u(){0==--l&&"function"==typeof n&&n()}return function t(e){var n=e.then;return e.constructor=o,e.then=function(){l++;var r=n.apply(e,arguments);return r.then(u,(function(t){if(u(),0===l)throw t})),t(r)},e}(s)}}function s(t,e){for(var n in t.headers)if({}.hasOwnProperty.call(t.headers,n)&&e.test(n))return!0;return!1}return o.prototype=e.prototype,o.__proto__=e,{request:a((function(e,n,r,i){var o,a=null!=n.method?n.method.toUpperCase():"GET",l=n.body,u=!(null!=n.serialize&&n.serialize!==JSON.serialize||l instanceof t.FormData),c=n.responseType||("function"==typeof n.extract?"":"json"),d=new t.XMLHttpRequest,f=!1,h=d,p=d.abort;for(var m in d.abort=function(){f=!0,p.call(this)},d.open(a,e,!1!==n.async,"string"==typeof n.user?n.user:void 0,"string"==typeof n.password?n.password:void 0),u&&null!=l&&!s(n,/^content-type$/i)&&d.setRequestHeader("Content-Type","application/json; charset=utf-8"),"function"==typeof n.deserialize||s(n,/^accept$/i)||d.setRequestHeader("Accept","application/json, text/*"),n.withCredentials&&(d.withCredentials=n.withCredentials),n.timeout&&(d.timeout=n.timeout),d.responseType=c,n.headers)({}).hasOwnProperty.call(n.headers,m)&&d.setRequestHeader(m,n.headers[m]);d.onreadystatechange=function(t){if(!f&&4===t.target.readyState)try{var o,a=t.target.status>=200&&t.target.status<300||304===t.target.status||/^file:\/\//i.test(e),s=t.target.response;if("json"===c?t.target.responseType||"function"==typeof n.extract||(s=JSON.parse(t.target.responseText)):c&&"text"!==c||null==s&&(s=t.target.responseText),"function"==typeof n.extract?(s=n.extract(t.target,n),a=!0):"function"==typeof n.deserialize&&(s=n.deserialize(s)),a)r(s);else{try{o=t.target.responseText}catch(t){o=s}var l=new Error(o);l.code=t.target.status,l.response=s,i(l)}}catch(t){i(t)}},"function"==typeof n.config&&(d=n.config(d,n,e)||d)!==h&&(o=d.abort,d.abort=function(){f=!0,o.call(this)}),null==l?d.send():"function"==typeof n.serialize?d.send(n.serialize(l)):l instanceof t.FormData?d.send(l):d.send(JSON.stringify(l))})),jsonp:a((function(e,n,r,o){var a=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+i++,s=t.document.createElement("script");t[a]=function(e){delete t[a],s.parentNode.removeChild(s),r(e)},s.onerror=function(){delete t[a],s.parentNode.removeChild(s),o(new Error("JSONP request failed"))},s.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(a),t.document.documentElement.appendChild(s)}))}}},438:(t,e,n)=>{"use strict";var r=n(49);t.exports=n(4)(window,r)},362:(t,e,n)=>{"use strict";t.exports=n(131)},131:t=>{!function(){"use strict";n.SKIP={},n.lift=function(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1);return i(e).map((function(e){return t.apply(void 0,e)}))},n.scan=function(t,e,r){var i=r.map((function(r){var i=t(e,r);return i!==n.SKIP&&(e=i),i}));return i(e),i},n.merge=i,n.combine=r,n.scanMerge=function(t,e){var n=t.map((function(t){return t[0]})),i=r((function(){var r=arguments[arguments.length-1];return n.forEach((function(n,i){r.indexOf(n)>-1&&(e=t[i][1](e,n()))})),e}),n);return i(e),i},n["fantasy-land/of"]=n;var e=!1;function n(t){var e,i=[],a=[];function s(e){return arguments.length&&e!==n.SKIP&&(t=e,o(s)&&(s._changing(),s._state="active",i.forEach((function(e,n){e(a[n](t))})))),t}function l(){return(e=n()).map((function(t){return!0===t&&(s._parents.forEach((function(t){t._unregisterChild(s)})),s._state="ended",s._parents.length=i.length=a.length=0),t})),e}return s.constructor=n,s._state=arguments.length&&t!==n.SKIP?"active":"pending",s._parents=[],s._changing=function(){o(s)&&(s._state="changing"),i.forEach((function(t){t._changing()}))},s._map=function(e,r){var o=r?n():n(e(t));return o._parents.push(s),i.push(o),a.push(e),o},s.map=function(t){return s._map(t,"active"!==s._state)},s.toJSON=function(){return null!=t&&"function"==typeof t.toJSON?t.toJSON():t},s["fantasy-land/map"]=s.map,s["fantasy-land/ap"]=function(t){return r((function(t,e){return t()(e())}),[t,s])},s._unregisterChild=function(t){var e=i.indexOf(t);-1!==e&&(i.splice(e,1),a.splice(e,1))},Object.defineProperty(s,"end",{get:function(){return e||l()}}),s}function r(t,e){var r=e.every((function(t){if(t.constructor!==n)throw new Error("Ensure that each item passed to stream.combine/stream.merge/lift is a stream");return"active"===t._state})),i=r?n(t.apply(null,e.concat([e]))):n(),o=[],a=e.map((function(n){return n._map((function(a){return o.push(n),(r||e.every((function(t){return"pending"!==t._state})))&&(r=!0,i(t.apply(null,e.concat([o]))),o=[]),a}),!0)})),s=i.end.map((function(t){!0===t&&(a.forEach((function(t){t.end(!0)})),s.end(!0))}));return i}function i(t){return r((function(){return t.map((function(t){return t()}))}),t)}function o(t){return"pending"===t._state||"active"===t._state||"changing"===t._state}Object.defineProperty(n,"HALT",{get:function(){return e||console.log("HALT is deprecated and has been renamed to SKIP"),e=!0,n.SKIP}}),t.exports=n}()},236:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),a=new A(r||[]);return o._invoke=function(t,e,n){var r=d;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return D()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var l=c(t,e,n);if("normal"===l.type){if(r=n.done?p:f,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=p,n.method="throw",n.arg=l.arg)}}}(t,n,a),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",m={};function v(){}function g(){}function y(){}var b={};l(b,o,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(_([])));x&&x!==n&&r.call(x,o)&&(b=x);var E=y.prototype=v.prototype=Object.create(b);function N(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(i,o,a,s){var l=c(t[i],t,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,s)}))}s(l.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function S(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=c(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function _(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:D}}function D(){return{value:e,done:!0}}return g.prototype=y,l(E,"constructor",y),l(y,"constructor",g),g.displayName=l(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},N(T.prototype),l(T.prototype,a,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new T(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},N(E),l(E,s,"Generator"),l(E,o,(function(){return this})),l(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(k),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},887:t=>{!function(){var e=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n="undefined"!=typeof window,r=n&&null!=window.mozInnerScreenX;function i(t,i,o){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var a=o&&o.debug||!1;if(a){var s=document.querySelector("#input-textarea-caret-position-mirror-div");s&&s.parentNode.removeChild(s)}var l=document.createElement("div");l.id="input-textarea-caret-position-mirror-div",document.body.appendChild(l);var u=l.style,c=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,d="INPUT"===t.nodeName;u.whiteSpace="pre-wrap",d||(u.wordWrap="break-word"),u.position="absolute",a||(u.visibility="hidden"),e.forEach((function(t){d&&"lineHeight"===t?u.lineHeight=c.height:u[t]=c[t]})),r?t.scrollHeight>parseInt(c.height)&&(u.overflowY="scroll"):u.overflow="hidden",l.textContent=t.value.substring(0,i),d&&(l.textContent=l.textContent.replace(/\s/g," "));var f=document.createElement("span");f.textContent=t.value.substring(i)||".",l.appendChild(f);var h={top:f.offsetTop+parseInt(c.borderTopWidth),left:f.offsetLeft+parseInt(c.borderLeftWidth),height:parseInt(c.lineHeight)};return a?f.style.backgroundColor="#aaa":document.body.removeChild(l),h}void 0!==t.exports?t.exports=i:n&&(window.getCaretCoordinates=i)}()},420:()=>{Array.prototype.flat||(Array.prototype.flat=function t(e){return(null!=e?e:1)>0?Array.prototype.reduce.call(this,(function(n,r){return n.concat(Array.isArray(r)?t.call(r,e-1):r)}),[]):[].concat(this)})},183:(t,e,n)=>{var r=n(663),i=n(648);void 0===i.$&&(i.$=r),void 0===i.jQuery&&(i.jQuery=r),t.exports=r},471:(t,e,n)=>{var r=n(555),i=n(648);void 0===i.dayjs&&(i.dayjs=r),t.exports=r},928:(t,e,n)=>{var r=n(872),i=n(648);void 0===i.m&&(i.m=r),t.exports=r}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{Extend:()=>t,app:()=>b,compat:()=>Ir});var t={};n.r(t),n.d(t,{Model:()=>p,PostTypes:()=>v,Routes:()=>g});var e={};n.r(e),n.d(e,{createFocusTrap:()=>He});var i={};n.r(i),n.d(i,{extend:()=>$n,override:()=>Mn});var o={};n.r(o),n.d(o,{getPlainContent:()=>Vn,slug:()=>Gn,truncate:()=>Wn,ucfirst:()=>Yn});var a={};n.r(a),n.d(a,{debounce:()=>Tr,throttle:()=>Nr}),n(183),n(928),n(471),n(423),n(298),n(892),n(478),n(646),n(426);var s=n(23),l=n.n(s),u=n(428),c=n.n(u);function d(t,e){var n="select"===t.tag?t.attrs.multi?"multi":"select":t.attrs.type;return t.attrs.onchange="multi"===n?function(){e([].slice.call(this.selectedOptions,(function(t){return t.value})))}:"select"===n?function(t){e(this.selectedOptions[0].value)}:"checkbox"===n?function(t){e(this.checked)}:t.attrs.oninput=function(t){e(this.value)},"select"===t.tag?t.children.forEach((function(t){t.attrs.value!==e()&&t.children[0]!==e()||(t.attrs.selected=!0)})):"checkbox"===n?t.attrs.checked=e():"radio"===n?t.attrs.checked=e()===t.attrs.value:t.attrs.value=e(),t.attrs.bidi=null,t}d.view=function(t,e,n){return d(e,e.attrs.bidi)};const f=d;function h(t){var e=t.m,n=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=e.apply(this,arguments);return o.attrs||(o.attrs={}),o.attrs.bidi&&f(o,o.attrs.bidi),o};Object.keys(e).forEach((function(t){return n[t]=e[t]})),t.m=n}var p=function(){function t(t,e){void 0===e&&(e=null),this.type=void 0,this.attributes=[],this.hasOnes=[],this.hasManys=[],this.type=t,this.model=e}var e=t.prototype;return e.attribute=function(t){return this.attributes.push(t),this},e.hasOne=function(t){return this.hasOnes.push(t),this},e.hasMany=function(t){return this.hasManys.push(t),this},e.extend=function(t,e){this.model&&(t.store.models[this.type]=this.model);var n=t.store.models[this.type];this.attributes.forEach((function(t){return n.prototype[t]=n.attribute(t)})),this.hasOnes.forEach((function(t){return n.prototype[t]=n.hasOne(t)})),this.hasManys.forEach((function(t){return n.prototype[t]=n.hasMany(t)}))},t}(),v=function(){function t(){this.postComponents={}}var e=t.prototype;return e.add=function(t,e){return this.postComponents[t]=e,this},e.extend=function(t,e){Object.assign(t.postComponents,this.postComponents)},t}(),g=function(){function t(){this.routes={}}var e=t.prototype;return e.add=function(t,e,n){return this.routes[t]={path:e,component:n},this},e.extend=function(t,e){Object.assign(t.routes,this.routes)},t}(),y=window;const b=new Proxy({},{get:function(t,e){return Reflect.get(y.app,e,y.app)},set:function(t,e,n){return Reflect.set(y.app,e,n,y.app)}});n(420),dayjs.extend(l()),dayjs.extend(c()),h(window);var w=$.fn.tooltip;function x(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function E(t,e){return E=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},E(t,e)}function N(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,E(t,e)}function T(){return T=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},T.apply(this,arguments)}$.fn.tooltip=function(t,e){["DANGEROUS_tooltip_jquery_fn_deprecation_exempt"].includes(e)||console.warn("Calling `$.tooltip` is now deprecated. Please use the `<Tooltip>` component exposed by flarum/core instead. `$.tooltip` may be removed in a future version of Flarum.\n\nIf this component doesn't meet your requirements, please open an issue: https://github.com/flarum/core/issues/new?assignees=davwheat&labels=type/bug,needs-verification&template=bug-report.md&title=Tooltip%20component%20unsuitable%20for%20use%20case"),w.bind(this)(t)};var S=function(){function t(){this.element=void 0,this.attrs=void 0,this.state=void 0}var e=t.prototype;return e.oninit=function(t){this.setAttrs(t.attrs)},e.oncreate=function(t){this.element=t.dom},e.onbeforeupdate=function(t){this.setAttrs(t.attrs)},e.onupdate=function(t){},e.onbeforeremove=function(t){},e.onremove=function(t){},e.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),t.component=function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var n=T({},t);return m(this,n,e)},e.setAttrs=function(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error("["+this.constructor.name+'] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute');if("tag"in t)throw new Error("["+this.constructor.name+'] You cannot use the "tag" attribute name with Mithril 2.')}this.attrs=t},t.initAttrs=function(t){},t}();function C(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function k(t,e,n){return e&&C(t.prototype,e),n&&C(t,n),t}function A(t){var e=typeof t;return"function"===e||"object"===e&&!!t}var _=function(t,e){this.content=void 0,this.priority=void 0,this.content=t,this.priority=e},D=function(){function t(){this._items={}}var e=t.prototype;return e.isEmpty=function(){return 0===Object.keys(this._items).length},e.has=function(t){return Object.keys(this._items).includes(t)},e.get=function(t){return this._items[t].content},e.getPriority=function(t){return this._items[t].priority},e.add=function(t,e,n){return void 0===n&&(n=0),this._items[t]=new _(e,n),this},e.replace=function(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),this.has(t)?(null!==e&&(this._items[t].content=e),null!==n&&(this._items[t].priority=n),this):this},e.setContent=function(t,e){if(!this.has(t))throw new Error("[ItemList] Cannot set content of Item. Key `"+t+"` is not present.");return this.replace(t,e)},e.setPriority=function(t,e){if(!this.has(t))throw new Error("[ItemList] Cannot set priority of Item. Key `"+t+"` is not present.");return this._items[t].priority=e,this},e.remove=function(t){return delete this._items[t],this},e.merge=function(t){var e=this;return Object.keys(t._items).forEach((function(n){var r=t._items[n];r instanceof _&&(e._items[n]=r)})),this},e.toArray=function(t){var e=this;return void 0===t&&(t=!1),Object.keys(this._items).map((function(n,r){var i=e._items[n];return!t||A(i.content)?T({},i,{content:e.createItemContentProxy(A(i.content)?i.content:Object(i.content),n)}):T({},i)})).sort((function(t,e){return e.priority-t.priority})).map((function(t){return t.content}))},e.toObject=function(){var t=this;return Object.keys(this._items).reduce((function(e,n){var r={content:t.get(n),itemName:n,priority:t.getPriority(n)};return e[n]=r,e}),{})},e.createItemContentProxy=function(t,e){return new Proxy(t,{get:function(t,n,r){return"itemName"===n?e:Reflect.get(t,n,r)},set:function(t,n,r,i){if(null!==e&&"itemName"===n)throw new Error("`itemName` property is read-only");return Reflect.set(t,n,r,i)}})},k(t,[{key:"items",get:function(){return new Proxy(this._items,{set:function(){return console.warn("Modifying `ItemList.items` is not allowed."),!1}})}}]),t}(),O=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(S);O.isListItem=!0;const P=O;function I(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=I(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}const j=function(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=I(t))&&(r&&(r+=" "),r+=e);return r};function L(t){return"object"==typeof t&&null!==t&&"tag"in t}function M(t){return L(t)&&t.tag===P}function R(t,e,n){void 0===e&&(e="li"),void 0===n&&(n={});var r,i,o,a=e;return(r=t instanceof Array?t:[t],o=[],r.filter(Boolean).forEach((function(t,e){(!M(t)||i&&!M(i)&&e!==r.length-1)&&(i=t,o.push(t))})),o).map((function(t){var e,r,i=[t.itemName&&"item-"+t.itemName];return L(t)?t.tag.isListItem?(t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key,t):(i.push((null==(e=t.attrs)?void 0:e.itemClassName)||t.itemClassName),null!=t.tag.isActive&&t.tag.isActive(t.attrs)&&i.push("active"),m(a,Object.assign({className:j(i),key:(null==t||null==(r=t.attrs)?void 0:r.key)||t.itemName},n),t)):m(a,Object.assign({className:j(i)},n),t)}))}var B=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},R(this.items().toArray()))},n.config=function(t,e){e.retain=!0},n.items=function(){return new D},e}(S);function H(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function F(){var t;b.forum.attribute("debug")&&(t=console).warn.apply(t,arguments)}function q(t,e){return void 0===e&&(e={}),e.className="icon "+t+" "+(e.className||""),m("i",Object.assign({"aria-hidden":"true"},e))}function U(t){return t instanceof Array?t.map((function(t){return U(t)})).join(""):"object"==typeof t&&null!==t?t.children?U(t.children):String(t.text):String(t)}var z=["display","size","containerClassName","className"],W=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.view=function(){var t=this.attrs,e=t.display,n=void 0===e?"block":e,r=t.size,i=void 0===r?"medium":r,o=t.containerClassName,a=t.className,s=H(t,z),l=j("LoadingIndicator",a),u=j("LoadingIndicator-container","unset"!==n&&"LoadingIndicator-container--"+n,i&&"LoadingIndicator-container--"+i,o);return m("div",Object.assign({"aria-label":b.translator.trans("core.lib.loading_indicator.accessible_label"),role:"status"},s.containerAttrs,{"data-size":i,className:u}),m("div",Object.assign({"aria-hidden":"true",className:l},s)))},e}(S),G=["type","title","aria-label","icon","disabled","loading","className","class"],V=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.view=function(t){var e=this.attrs,n=e.type,r=e.title,i=e["aria-label"],o=e.icon,a=e.disabled,s=e.loading,l=e.className,u=e.class,c=H(e,G);n||(n="button"),i||(i=r),"object"==typeof i&&(i=U(i)),(a||s)&&delete c.onclick;var d=T({disabled:a,className:l=j(u,l,{hasIcon:o,disabled:a||s,loading:s}),type:n,"aria-label":i},c);return m("button",d,this.getButtonContent(t.children))},n.oncreate=function(e){var n;t.prototype.oncreate.call(this,e),this.attrs["aria-label"]||U(e.children)||null!=(n=this.element)&&null!=n.getAttribute&&n.getAttribute("aria-label")||F('[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read "Button". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name',this.element)},n.getButtonContent=function(t){var e=this.attrs.icon;return[e&&q(e,{className:"Button-icon"}),t&&m("span",{className:"Button-label"},t),this.attrs.loading&&m(W,{size:"small",display:"inline"})]},e}(S);function Y(t,e){var n=t[e];return delete t[e],n}var K=["options"],X=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.view=function(t){var e=t.attrs,n=e.options,r=void 0===n?{}:n,i=H(e,K);i.href=i.href||"";var o=t.children||{tag:"#",children:t.text};return i.external?m("a",i,o):(i.href===m.route.get()&&("replace"in r||(r.replace=!0)),Y(i,"force")&&("state"in r||(r.state={}),"key"in r.state||(r.state.key=Date.now())),i.options=r,m(m.route.Link,i,o))},e}(S),J=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.active=this.isActive(e),void 0===e.force&&(e.force=!0)},e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return n.tag=X,n.attrs.active=String(n.attrs.active),delete n.attrs.type,n},e.isActive=function(t){return void 0!==t.active?t.active:m.route.get()===t.href},e}(V);function Q(t,e){void 0===e&&(e={}),e.className="Avatar "+(e.className||"");var n="",r="undefined"===e.title||e.title;if(r||delete e.title,t){var i=t.displayName()||"?",o=t.avatarUrl();if(r&&(e.title=e.title||i),o)return m("img",Object.assign({},e,{src:o,alt:""}));n=i.charAt(0).toUpperCase(),e.style={"--avatar-bg":t.color()}}return m("span",e,n)}function Z(t){var e=t&&t.displayName()||b.translator.trans("core.lib.username.deleted_text");return m("span",{className:"username"},e)}var tt=function(t){function e(){return t.apply(this,arguments)||this}N(e,t),e.initAttrs=function(t){t.className=t.className||"",t.buttonClassName=t.buttonClassName||"",t.menuClassName=t.menuClassName||"",t.label=t.label||"",t.caretIcon=void 0!==t.caretIcon?t.caretIcon:"fas fa-caret-down",t.accessibleToggleLabel=t.accessibleToggleLabel||b.translator.trans("core.lib.dropdown.toggle_dropdown_accessible_label")};var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.showing=!1},n.view=function(t){var e=t.children?R(t.children):[],n=!this.attrs.lazyDraw||this.showing;return m("div",{className:"ButtonGroup Dropdown dropdown "+this.attrs.className+" itemCount"+e.length+(this.showing?" open":"")},this.getButton(t.children),n&&this.getMenu(e))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.$().on("shown.bs.dropdown",(function(){var t=n.attrs,e=t.lazyDraw,r=t.onshow;n.showing=!0,e&&m.redraw.sync(),"function"==typeof r&&r(),e||m.redraw();var i=n.$(".Dropdown-menu"),o=i.hasClass("Dropdown-menu--right");i.removeClass("Dropdown-menu--top Dropdown-menu--right"),i.toggleClass("Dropdown-menu--top",i.offset().top+i.height()>$(window).scrollTop()+$(window).height()),i.offset().top<0&&i.removeClass("Dropdown-menu--top"),i.toggleClass("Dropdown-menu--right",o||i.offset().left+i.width()>$(window).scrollLeft()+$(window).width())})),this.$().on("hidden.bs.dropdown",(function(){n.showing=!1,n.attrs.onhide&&n.attrs.onhide(),m.redraw()}))},n.getButton=function(t){return m("button",{className:"Dropdown-toggle "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown",onclick:this.attrs.onclick},this.getButtonContent(t))},n.getButtonContent=function(t){return[this.attrs.icon?q(this.attrs.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},this.attrs.label),this.attrs.caretIcon?q(this.attrs.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.attrs.menuClassName},t)},e}(S),et=function(t){function e(){return t.apply(this,arguments)||this}N(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right"};var n=e.prototype;return n.view=function(e){return t.prototype.view.call(this,T({},e,{children:this.items().toArray()}))},n.getButtonContent=function(){var t=ur.session.user;return[Q(t)," ",m("span",{className:"Button-label"},Z(t))]},n.items=function(){var t=new D;return t.add("logOut",V.component({icon:"fas fa-sign-out-alt",onclick:ur.session.logout.bind(ur.session)},ur.translator.trans("core.admin.header.log_out_button")),-100),t},e}(tt),nt=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},R(this.items().toArray()))},n.items=function(){var t=new D;return t.add("help",m(J,{href:"https://docs.flarum.org/troubleshoot/",icon:"fas fa-question-circle",external:!0,target:"_blank"},ur.translator.trans("core.admin.header.get_help"))),t.add("session",et.component()),t},e}(S),rt=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"DashboardWidget Widget "+this.className()},this.content())},n.className=function(){return""},n.content=function(){return[]},e}(S),it=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.view=function(t){var e=Object.assign({},this.attrs),n=Y(e,"type");e.className="Alert Alert--"+n+" "+(e.className||"");var r=Y(e,"content")||t.children,i=Y(e,"controls")||[],o=Y(e,"dismissible"),a=Y(e,"ondismiss"),s=[];return(o||void 0===o)&&s.push(m(V,{icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:a})),m("div",e,m("span",{className:"Alert-body"},r),m("ul",{className:"Alert-controls"},R(i.concat(s))))},e}(S),ot=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e.alertAttrs=void 0,e}N(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e);var r=[];["className","title","content","onsubmit"].forEach((function(t){n[t]||(n[t]=function(){},r.push(t))})),r.length>0&&F("Modal `"+this.constructor.name+"` does not implement all abstract methods of the Modal super class. Missing methods: "+r.join(", ")+".")},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.attrs.animateShow((function(){return n.onready()}))},n.onbeforeremove=function(e){if(t.prototype.onbeforeremove.call(this,e),!this.attrs.state.modal)return this.attrs.animateHide(),new Promise((function(t){return setTimeout(t,300)}))},n.view=function(){var t=this;return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:"Modal modal-dialog "+this.className()},m("div",{className:"Modal-content"},this.constructor.isDismissible&&m("div",{className:"Modal-close App-backControl"},V.component({icon:"fas fa-times",onclick:function(){return t.hide()},className:"Button Button--icon Button--link","aria-label":b.translator.trans("core.lib.modal.close")})),m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),this.alertAttrs?m("div",{className:"Modal-alert"},it.component(this.alertAttrs)):"",this.content())))},n.onsubmit=function(t){},n.onready=function(){this.$().find("input, select, textarea").first().trigger("focus").trigger("select")},n.hide=function(){this.attrs.state.close()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){var e;this.alertAttrs=t.alert,m.redraw(),422===t.status&&null!=(e=t.response)&&e.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").trigger("select"):this.onready()},e}(S);ot.isDismissible=!0;var at=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.className=function(){return"LoadingModal Modal--small"},n.title=function(){return ur.translator.trans("core.admin.loading.title")},n.content=function(){return""},n.onsubmit=function(t){throw new Error("LoadingModal should not throw errors.")},e}(ot);at.isDismissible=!1;var st=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.className=function(){return"StatusWidget"},n.content=function(){return m("ul",null,R(this.items().toArray()))},n.items=function(){var t=new D;return t.add("tools",m(tt,{label:ur.translator.trans("core.admin.dashboard.tools_button"),icon:"fas fa-cog",buttonClassName:"Button",menuClassName:"Dropdown-menu--right"},this.toolsItems().toArray())),t.add("version-flarum",[m("strong",null,"Flarum"),m("br",null),ur.forum.attribute("version")]),t.add("version-php",[m("strong",null,"PHP"),m("br",null),ur.data.phpVersion]),t.add("version-mysql",[m("strong",null,"MySQL"),m("br",null),ur.data.mysqlVersion]),t},n.toolsItems=function(){var t=new D;return t.add("clearCache",m(V,{onclick:this.handleClearCache.bind(this)},ur.translator.trans("core.admin.dashboard.clear_cache_button"))),t},n.handleClearCache=function(t){ur.modal.show(at),ur.request({method:"DELETE",url:ur.forum.attribute("apiUrl")+"/cache"}).then((function(){return window.location.reload()}))},e}(rt);function lt(t){return JSON.parse(ur.data.settings.extensions_enabled).includes(t)}function ut(){var t={};return Object.keys(ur.data.extensions).map((function(e){var n=ur.data.extensions[e],r=n.extra["flarum-extension"].category;n.extra["flarum-locale"]&&(r="language"),r in ur.extensionCategories?(t[r]=t[r]||[],t[r].push(n)):(t.feature=t.feature||[],t.feature.push(n))})),t}var ct=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.categorizedExtensions=ut()},n.className=function(){return"ExtensionsWidget"},n.content=function(){var t=this,e=ur.extensionCategories;return m("div",{className:"ExtensionsWidget-list"},Object.keys(e).map((function(e){return t.categorizedExtensions[e]?t.extensionCategory(e):""})))},n.extensionCategory=function(t){var e=this;return m("div",{className:"ExtensionList-Category"},m("h4",{className:"ExtensionList-Label"},ur.translator.trans("core.admin.nav.categories."+t)),m("ul",{className:"ExtensionList"},this.categorizedExtensions[t].map((function(t){return e.extensionWidget(t)}))))},n.extensionWidget=function(t){return m("li",{className:"ExtensionListItem "+(lt(t.id)?"":"disabled")},m(X,{href:ur.route("extension",{id:t.id})},m("div",{className:"ExtensionListItem-content"},m("span",{className:"ExtensionListItem-icon ExtensionIcon",style:t.icon},t.icon?q(t.icon.name):""),m("span",{className:"ExtensionListItem-title"},t.extra["flarum-extension"].title))))},e}(rt);function dt(t,e){return t&&(t===e||t.prototype instanceof e)}var ft=function(){function t(t,e){void 0===e&&(e={}),this.type=t,this.data=e}var e=t.prototype;return e.matches=function(t,e){var n=this;return void 0===e&&(e={}),!!dt(this.type,t)&&Object.keys(e).every((function(t){return n.data[t]===e[t]}))},e.get=function(t){return this.data[t]},e.set=function(t,e){this.data[t]=e},t}(),ht=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).bodyClass="",e.scrollTopOnCreate=!0,e.useBrowserScrollRestoration=!0,e}N(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),b.previous=b.current,b.current=new ft(this.constructor,{routeName:this.attrs.routeName}),b.drawer.hide(),b.modal.close()},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.bodyClass&&$("#app").addClass(this.bodyClass),this.scrollTopOnCreate&&$(window).scrollTop(0),"scrollRestoration"in history&&(history.scrollRestoration=this.useBrowserScrollRestoration?"auto":"manual")},n.onremove=function(e){t.prototype.onremove.call(this,e),this.bodyClass&&$("#app").removeClass(this.bodyClass)},e}(S);const pt=function(t,e){return function(){e(this.getAttribute(t)||this[t])}};var mt=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.view=function(t){"0"===this.attrs.state&&(this.attrs.state=!1);var e=j(["Checkbox",this.attrs.state?"on":"off",this.attrs.className,this.attrs.loading&&"loading",this.attrs.disabled&&"disabled"]);return m("label",{className:e},m("input",{type:"checkbox",checked:this.attrs.state,disabled:this.attrs.disabled,onchange:pt("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display","aria-hidden":"true"},this.getDisplay()),t.children)},n.getDisplay=function(){return this.attrs.loading?m(W,{display:"unset",size:"small"}):q(this.attrs.state?"fas fa-check":"fas fa-times")},n.onchange=function(t){this.attrs.onchange&&this.attrs.onchange(t,this)},e}(S),vt=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=(e.className||"")+" Checkbox--switch"},e.prototype.getDisplay=function(){return this.attrs.loading?t.prototype.getDisplay.call(this):""},e}(mt),gt=["className","class"],yt=["options","onchange","value","disabled","className","class","wrapperAttrs"],bt=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.view=function(){var t=this.attrs,e=t.options,n=t.onchange,r=t.value,i=t.disabled,o=t.className,a=t.class,s=t.wrapperAttrs,l=(s=void 0===s?{}:s).className,u=s.class,c=H(s,gt),d=H(t,yt);return m("span",Object.assign({className:j("Select",l,u)},c),m("select",Object.assign({className:j("Select-input FormControl",o,a),onchange:n?pt("value",n.bind(this)):void 0,value:r,disabled:i},d),Object.keys(e).map((function(t){return m("option",{value:t},e[t])}))),q("fas fa-sort",{className:"Select-caret"}))},e}(S),wt=n(362);const xt=n.n(wt)();function Et(t){var e=JSON.parse(JSON.stringify(ur.data.settings));return Object.assign(ur.data.settings,t),ur.request({method:"POST",url:ur.forum.attribute("apiUrl")+"/settings",body:t}).catch((function(t){throw ur.data.settings=e,t}))}var Nt=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.view=function(t){return[m("div",{className:j(["AdminHeader",this.attrs.className])},m("div",{className:"container"},m("h2",null,q(this.attrs.icon),t.children),m("div",{className:"AdminHeader-description"},this.attrs.description)))]},e}(S),Tt=function(t){void 0===t&&(t=21);for(var e="",n=crypto.getRandomValues(new Uint8Array(t));t--;){var r=63&n[t];e+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return e},St=["className"],Ct=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).value=void 0,e}return N(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=H(e,St),i=(null==r.bidi?void 0:r.bidi())||r.value;return r.type||(r.type="text"),m("div",{className:"ColorInput"},m("input",Object.assign({className:j("FormControl",n)},r)),m("span",{className:"ColorInput-icon",role:"presentation"},q("fas fa-exclamation-circle")),m("div",{className:"ColorInput-preview",style:{"--input-value":i},role:"presentation"}))},e}(S),kt=["title","className"],At=["setting","help","type","label"],_t=["default","options"],Dt=["bool","checkbox","switch","boolean"],Ot=["select","dropdown","selectdropdown"],Pt=["textarea"],It=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).settings={},e.loading=!1,e}N(e,t);var n=e.prototype;return n.view=function(t){var e=j("AdminPage",this.headerInfo().className);return m("div",{className:e},this.header(t),m("div",{className:"container"},this.content(t)))},n.submitButton=function(t){return m(V,{onclick:this.saveSettings.bind(this),className:"Button Button--primary",loading:this.loading,disabled:!this.isChanged()},ur.translator.trans("core.admin.settings.submit_button"))},n.header=function(t){var e=this.headerInfo(),n=e.title,r=e.className,i=H(e,kt);return m(Nt,Object.assign({className:r?r+"-header":void 0},i),n)},n.headerInfo=function(){return{className:"",icon:"",title:"",description:""}},n.buildSettingComponent=function(t){if("function"==typeof t)return t.call(this);var e,n=t.setting,r=t.help,i=t.type,o=t.label,a=H(t,At),s=this.setting(n)(),l=[Tt(),Tt()],u=l[0],c=l[1];if(Dt.includes(i))return m("div",{className:"Form-group"},m(vt,Object.assign({state:!!s&&"0"!==s,onchange:this.settings[n]},a),o),m("div",{className:"helpText"},r));if(Ot.includes(i)){var d=a.default,f=a.options,h=H(a,_t);e=m(bt,Object.assign({id:u,"aria-describedby":c,value:s||d,options:f,onchange:this.settings[n]},h))}else if(a.className=j(["FormControl",a.className]),Pt.includes(i))e=m("textarea",Object.assign({id:u,"aria-describedby":c,bidi:this.setting(n)},a));else{var p="input";"color-preview"===i?p=Ct:a.type=i,e=m(p,Object.assign({id:u,"aria-describedby":c,bidi:this.setting(n)},a))}return m("div",{className:"Form-group"},o&&m("label",{for:u},o),m("div",{id:c,className:"helpText"},r),e)},n.onsaved=function(){this.loading=!1,ur.alerts.show({type:"success"},ur.translator.trans("core.admin.settings.saved_message"))},n.setting=function(t,e){return void 0===e&&(e=""),this.settings[t]=this.settings[t]||xt(ur.data.settings[t]||e),this.settings[t]},n.dirty=function(){var t=this,e={};return Object.keys(this.settings).forEach((function(n){var r=t.settings[n]();r!==ur.data.settings[n]&&(e[n]=r)})),e},n.isChanged=function(){return Object.keys(this.dirty()).length},n.saveSettings=function(t){return t.preventDefault(),ur.alerts.clear(),this.loading=!0,Et(this.dirty()).then(this.onsaved.bind(this))},e}(ht),jt=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.headerInfo=function(){return{className:"DashboardPage",icon:"fas fa-chart-bar",title:ur.translator.trans("core.admin.dashboard.title"),description:ur.translator.trans("core.admin.dashboard.description")}},n.content=function(){return this.availableWidgets().toArray()},n.availableWidgets=function(){var t=new D;return t.add("status",m(st,null),30),t.add("extensions",m(ct,null),10),t},e}(It),Lt=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.view=function(t){return m("fieldset",{className:this.attrs.className},m("legend",null,this.attrs.label),m("ul",null,R(t.children)))},e}(S),$t=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.localeOptions={};var r=ur.data.locales;for(var i in r)this.localeOptions[i]=r[i]+" ("+i+")";this.displayNameOptions={},ur.data.displayNameDrivers.forEach((function(t){this.displayNameOptions[t]=t}),this),this.slugDriverOptions={},Object.keys(ur.data.slugDrivers).forEach((function(t){n.slugDriverOptions[t]={},ur.data.slugDrivers[t].forEach((function(e){n.slugDriverOptions[t][e]=e}))}))},n.headerInfo=function(){return{className:"BasicsPage",icon:"fas fa-pencil-alt",title:ur.translator.trans("core.admin.basics.title"),description:ur.translator.trans("core.admin.basics.description")}},n.content=function(){var t=this;return[m("div",{className:"Form"},this.buildSettingComponent({type:"text",setting:"forum_title",label:ur.translator.trans("core.admin.basics.forum_title_heading")}),this.buildSettingComponent({type:"text",setting:"forum_description",label:ur.translator.trans("core.admin.basics.forum_description_heading"),help:ur.translator.trans("core.admin.basics.forum_description_text")}),Object.keys(this.localeOptions).length>1?[this.buildSettingComponent({type:"select",setting:"default_locale",options:this.localeOptions,label:ur.translator.trans("core.admin.basics.default_language_heading")}),this.buildSettingComponent({type:"switch",setting:"show_language_selector",label:ur.translator.trans("core.admin.basics.show_language_selector_label")})]:"",m(Lt,{className:"BasicsPage-homePage Form-group",label:ur.translator.trans("core.admin.basics.home_page_heading")},m("div",{className:"helpText"},ur.translator.trans("core.admin.basics.home_page_text")),this.homePageItems().toArray().map((function(e){var n=e.path,r=e.label;return m("label",{className:"checkbox"},m("input",{type:"radio",name:"homePage",value:n,bidi:t.setting("default_route")}),r)}))),m("div",{className:"Form-group BasicsPage-welcomeBanner-input"},m("label",null,ur.translator.trans("core.admin.basics.welcome_banner_heading")),m("div",{className:"helpText"},ur.translator.trans("core.admin.basics.welcome_banner_text")),m("input",{type:"text",className:"FormControl",bidi:this.setting("welcome_title")}),m("textarea",{className:"FormControl",bidi:this.setting("welcome_message")})),Object.keys(this.displayNameOptions).length>1?this.buildSettingComponent({type:"select",setting:"display_name_driver",options:this.displayNameOptions,label:ur.translator.trans("core.admin.basics.display_name_heading"),help:ur.translator.trans("core.admin.basics.display_name_text")}):"",Object.keys(this.slugDriverOptions).map((function(e){var n=t.slugDriverOptions[e];if(Object.keys(n).length>1)return t.buildSettingComponent({type:"select",setting:"slug_driver_"+e,options:n,label:ur.translator.trans("core.admin.basics.slug_driver_heading",{model:e}),help:ur.translator.trans("core.admin.basics.slug_driver_text",{model:e})})})),this.submitButton())]},n.homePageItems=function(){var t=new D;return t.add("allDiscussions",{path:"/all",label:ur.translator.trans("core.admin.basics.all_discussions_label")}),t},e}(It),Mt=["text","tooltipVisible","showOnFocus","position","ignoreTitleWarning","html","delay"],Rt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).firstChild=null,e.childDomNode=null,e.oldText="",e.oldVisibility=void 0,e.shouldRecreateTooltip=!1,e.shouldChangeTooltipVisibility=!1,e}N(e,t);var n=e.prototype;return n.view=function(t){var e=t.children,n=this.attrs,r=(n.text,n.tooltipVisible),i=(n.showOnFocus,n.position,n.ignoreTitleWarning),o=void 0!==i&&i;n.html,n.delay,H(n,Mt),this.attrs.title&&!o&&console.warn("`title` attribute was passed to Tooltip component. Was this intentional? Tooltip content should be passed to the `text` attr instead.");var a=this.getRealText();if(a!==this.oldText&&(this.oldText=a,this.shouldRecreateTooltip=!0),r!==this.oldVisibility&&(this.oldVisibility=this.attrs.tooltipVisible,this.shouldChangeTooltipVisibility=!0),void 0===e)throw new Error("Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.");if(1!==e.length)throw new Error("Tooltip component was either passed more than one or no child node.\n\nPlease wrap multiple children in another element, such as a <div> or <span>.");var s=e[0];if("object"!=typeof s||Array.isArray(s)||null===s)throw new Error("Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.");if("string"==typeof s.tag&&["#","[","<"].includes(s.tag))throw new Error('Tooltip component with provided with a vnode with tag "'+s.tag+'". This is not a DOM element, so is not a valid child element. Please wrap this vnode in another element, such as a <div> or <span>.');return this.firstChild=s,e},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.checkDomNodeChanged(),this.recreateTooltip()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.checkDomNodeChanged(),this.recreateTooltip()},n.recreateTooltip=function(){this.shouldRecreateTooltip&&null!==this.childDomNode&&($(this.childDomNode).tooltip("destroy","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"),this.createTooltip(),this.shouldRecreateTooltip=!1),this.shouldChangeTooltipVisibility&&(this.shouldChangeTooltipVisibility=!1,this.updateVisibility())},n.updateVisibility=function(){null!==this.childDomNode&&(!0===this.attrs.tooltipVisible?$(this.childDomNode).tooltip("show","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"):!1===this.attrs.tooltipVisible&&$(this.childDomNode).tooltip("hide","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"))},n.createTooltip=function(){if(null!==this.childDomNode){var t=this.attrs,e=t.showOnFocus,n=void 0===e||e,r=t.position,i=void 0===r?"top":r,o=t.delay,a=t.html,s=void 0!==a&&a,l=t.tooltipVisible,u=(t.text,"boolean"==typeof l?"manual":j("hover",[n&&"focus"])),c=this.getRealText();this.childDomNode.setAttribute("title",c),this.childDomNode.setAttribute("aria-label",c),$(this.childDomNode).tooltip({html:s,delay:o,placement:i,trigger:u},"DANGEROUS_tooltip_jquery_fn_deprecation_exempt")}},n.getRealText=function(){var t=this.attrs.text;return Array.isArray(t)?U(t):t},n.checkDomNodeChanged=function(){var t=this.firstChild.dom;t&&!t.isSameNode(this.childDomNode)&&(this.childDomNode=t,this.shouldRecreateTooltip=!0)},e}(S),Bt=["type","icon","label","color","style"],Ht=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.view=function(){var t=this.attrs,e=t.type,n=t.icon,r=t.label,i=t.color,o=t.style,a=void 0===o?{}:o,s=H(t,Bt),l=j("Badge",[e&&"Badge--"+e],s.className),u=n?q(n,{className:"Badge-icon"}):m.trust("&nbsp;"),c=T({},a,{"--badge-bg":i}),d=T({},s,{className:l,style:c}),f=m("div",d,u);return r?m(Rt,{text:r},f):f},e}(S),Ft=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.group&&(e.icon=e.group.icon(),e.color=e.group.color(),e.label=void 0===e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.id(),delete e.group)},e}(Ht),qt=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=b.store),this.data={},this.freshness=new Date,this.exists=!1,this.store=void 0,this.data=t,this.store=e}var e=t.prototype;return e.id=function(){return"id"in this.data?this.data.id:void 0},e.attribute=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e,n;return null==(e=this.data)||null==(n=e.attributes)?void 0:n[t]})),e.pushData=function(e){if("id"in e&&(this.data.id=e.id),"type"in e&&(this.data.type=e.type),"attributes"in e&&Object.assign(this.data.attributes,e.attributes),"relationships"in e){var n,r=null!=(n=this.data.relationships)?n:{};for(var i in e.relationships){var o,a=e.relationships[i];o=a instanceof t?{data:t.getIdentifier(a)}:a instanceof Array?{data:a.map(t.getIdentifier)}:a,e.relationships[i]=o,r[i]=o}this.data.relationships=r}return this.freshness=new Date,this},e.pushAttributes=function(t){this.pushData({attributes:t})},e.save=function(e,n){var r=this;void 0===n&&(n={});var i={type:this.data.type,attributes:e};if("id"in this.data&&(i.id=this.data.id),e.relationships){for(var o in i.relationships={},e.relationships){var a=e.relationships[o];i.relationships[o]={data:a instanceof Array?a.map(t.getIdentifier):t.getIdentifier(a)}}delete e.relationships}var s=this.copyData();this.pushData(i);var l={data:i,meta:n.meta||void 0};return b.request(T({method:this.exists?"PATCH":"POST",url:b.forum.attribute("apiUrl")+this.apiEndpoint(),body:l},n)).then((function(t){return r.store.pushPayload(t)}),(function(t){throw r.pushData(s),m.redraw(),t}))},e.delete=function(t,e){var n=this;return void 0===t&&(t={}),void 0===e&&(e={}),this.exists?b.request(T({method:"DELETE",url:b.forum.attribute("apiUrl")+this.apiEndpoint(),body:t},e)).then((function(){n.exists=!1,n.store.remove(n)})):Promise.resolve()},e.apiEndpoint=function(){return"/"+this.data.type+("id"in this.data?"/"+this.data.id:"")},e.copyData=function(){return JSON.parse(JSON.stringify(this.data))},e.rawRelationship=function(t){var e,n;return null==(e=this.data.relationships)||null==(n=e[t])?void 0:n.data},t.attribute=function(t,e){return function(){return e?e(this.attribute(t)):this.attribute(t)}},t.hasOne=function(t){return function(){if(this.data.relationships){var e,n=null==(e=this.data.relationships[t])?void 0:e.data;if(n instanceof Array)throw new Error("Relationship "+t+" on model "+this.data.type+" is plural, so the hasOne method cannot be used to access it.");if(n)return this.store.getById(n.type,n.id)}return!1}},t.hasMany=function(t){return function(){var e=this;if(this.data.relationships){var n,r=null==(n=this.data.relationships[t])?void 0:n.data;if(!(r instanceof Array))throw new Error("Relationship "+t+" on model "+this.data.type+" is singular, so the hasMany method cannot be used to access it.");if(r)return r.map((function(t){return e.store.getById(t.type,t.id)}))}return!1}},t.transformDate=function(t){return null!=t?new Date(t):t},t.getIdentifier=function(t){return t&&"id"in t.data?{type:t.data.type,id:t.data.id}:null},t}(),Ut=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.nameSingular=function(){return qt.attribute("nameSingular").call(this)},n.namePlural=function(){return qt.attribute("namePlural").call(this)},n.color=function(){return qt.attribute("color").call(this)},n.icon=function(){return qt.attribute("icon").call(this)},n.isHidden=function(){return qt.attribute("isHidden").call(this)},e}(qt);Ut.ADMINISTRATOR_ID="1",Ut.GUEST_ID="2",Ut.MEMBER_ID="3";var zt=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.group=this.attrs.group||ur.store.createRecord("groups"),this.nameSingular=xt(this.group.nameSingular()||""),this.namePlural=xt(this.group.namePlural()||""),this.icon=xt(this.group.icon()||""),this.color=xt(this.group.color()||""),this.isHidden=xt(this.group.isHidden()||!1)},n.className=function(){return"EditGroupModal Modal--small"},n.title=function(){return[this.color()||this.icon()?Ht.component({icon:this.icon(),color:this.color()}):""," ",this.namePlural()||ur.translator.trans("core.admin.edit_group.title")]},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},n.fields=function(){var t=new D;return t.add("name",m("div",{className:"Form-group"},m("label",null,ur.translator.trans("core.admin.edit_group.name_label")),m("div",{className:"EditGroupModal-name-input"},m("input",{className:"FormControl",placeholder:ur.translator.trans("core.admin.edit_group.singular_placeholder"),bidi:this.nameSingular}),m("input",{className:"FormControl",placeholder:ur.translator.trans("core.admin.edit_group.plural_placeholder"),bidi:this.namePlural}))),30),t.add("color",m("div",{className:"Form-group"},m("label",null,ur.translator.trans("core.admin.edit_group.color_label")),m("input",{className:"FormControl",placeholder:"#aaaaaa",bidi:this.color})),20),t.add("icon",m("div",{className:"Form-group"},m("label",null,ur.translator.trans("core.admin.edit_group.icon_label")),m("div",{className:"helpText"},ur.translator.trans("core.admin.edit_group.icon_text",{a:m("a",{href:"https://fontawesome.com/icons?m=free",tabindex:"-1"})})),m("input",{className:"FormControl",placeholder:"fas fa-bolt",bidi:this.icon})),10),t.add("hidden",m("div",{className:"Form-group"},vt.component({state:!!Number(this.isHidden()),onchange:this.isHidden},ur.translator.trans("core.admin.edit_group.hide_label"))),10),t.add("submit",m("div",{className:"Form-group"},V.component({type:"submit",className:"Button Button--primary EditGroupModal-save",loading:this.loading},ur.translator.trans("core.admin.edit_group.submit_button")),this.group.exists&&this.group.id()!==Ut.ADMINISTRATOR_ID?m("button",{type:"button",className:"Button EditGroupModal-delete",onclick:this.deleteGroup.bind(this)},ur.translator.trans("core.admin.edit_group.delete_button")):""),-10),t},n.submitData=function(){return{nameSingular:this.nameSingular(),namePlural:this.namePlural(),color:this.color(),icon:this.icon(),isHidden:this.isHidden()}},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.group.save(this.submitData(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},n.deleteGroup=function(){confirm(ur.translator.trans("core.admin.edit_group.delete_confirmation"))&&(this.group.delete().then((function(){return m.redraw()})),this.hide())},e}(ot);function Wt(t){var e=ur.store.getById("groups",t);return e?Ft.component({group:e,label:null}):""}function Gt(t,e){return ur.getRequiredPermissions(e).forEach((function(e){var n=ur.data.permissions[e]||[];-1!==n.indexOf(Ut.GUEST_ID)||(t=-1!==n.indexOf(Ut.MEMBER_ID)?t.filter((function(t){return t!==Ut.GUEST_ID})):-1!==t.indexOf(Ut.MEMBER_ID)?n:n.filter((function(e){return-1!==t.indexOf(e)}))),t=Gt(t,e)})),t}var Vt=function(t){function e(){return t.apply(this,arguments)||this}N(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className="PermissionDropdown",e.buttonClassName="Button Button--text",e.lazyDraw=!0};var n=e.prototype;return n.view=function(e){var n=this,r=[],i=ur.data.permissions[this.attrs.permission]||[],o=-1!==(i=Gt(i,this.attrs.permission)).indexOf(Ut.GUEST_ID),a=-1!==i.indexOf(Ut.MEMBER_ID),s=ur.store.getById("groups",Ut.ADMINISTRATOR_ID);return this.attrs.label=o?Ht.component({icon:"fas fa-globe"}):a?Ht.component({icon:"fas fa-user"}):[Wt(Ut.ADMINISTRATOR_ID),i.map(Wt)],this.showing&&(this.attrs.allowGuest&&r.push(V.component({icon:!o||"fas fa-check",onclick:function(){return n.save([Ut.GUEST_ID])},disabled:this.isGroupDisabled(Ut.GUEST_ID)},[Ht.component({icon:"fas fa-globe"})," ",ur.translator.trans("core.admin.permissions_controls.everyone_button")])),r.push(V.component({icon:!a||"fas fa-check",onclick:function(){return n.save([Ut.MEMBER_ID])},disabled:this.isGroupDisabled(Ut.MEMBER_ID)},[Ht.component({icon:"fas fa-user"})," ",ur.translator.trans("core.admin.permissions_controls.members_button")]),P.component(),V.component({icon:!(!o&&!a)||"fas fa-check",disabled:!o&&!a,onclick:function(t){t.shiftKey&&t.stopPropagation(),n.save([])}},[Wt(s.id())," ",s.namePlural()])),[].push.apply(r,ur.store.all("groups").filter((function(t){return-1===[Ut.ADMINISTRATOR_ID,Ut.GUEST_ID,Ut.MEMBER_ID].indexOf(t.id())})).map((function(t){return V.component({icon:-1===i.indexOf(t.id())||"fas fa-check",onclick:function(e){e.shiftKey&&e.stopPropagation(),n.toggle(t.id())},disabled:n.isGroupDisabled(t.id())&&n.isGroupDisabled(Ut.MEMBER_ID)&&n.isGroupDisabled(Ut.GUEST_ID)},[Wt(t.id())," ",t.namePlural()])})))),t.prototype.view.call(this,T({},e,{children:r}))},n.save=function(t){var e=this.attrs.permission;ur.data.permissions[e]=t,ur.request({method:"POST",url:ur.forum.attribute("apiUrl")+"/permission",body:{permission:e,groupIds:t}})},n.toggle=function(t){var e=this.attrs.permission,n=ur.data.permissions[e]||[],r=n.indexOf(t);-1!==r?n.splice(r,1):(n.push(t),n=n.filter((function(t){return-1===[Ut.GUEST_ID,Ut.MEMBER_ID].indexOf(t)}))),this.save(n)},n.isGroupDisabled=function(t){return-1===Gt([t],this.attrs.permission).indexOf(t)},e}(tt);function Yt(t){var e=t.tag;return("string"!=typeof e||"a"===e||"button"===e)&&("initAttrs"in e&&e.initAttrs(t.attrs),"isActive"in e?e.isActive(t.attrs):t.attrs.active)}var Kt=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.initAttrs=function(e){e.caretIcon=void 0!==e.caretIcon?e.caretIcon:"fas fa-sort",t.initAttrs.call(this,e),e.className+=" Dropdown--select"},e.prototype.getButtonContent=function(t){var e=t.find(Yt),n=e&&e.children||this.attrs.defaultLabel;return n instanceof Array&&(n=n[0]),[m("span",{className:"Button-label"},n),q(this.attrs.caretIcon,{className:"Button-caret"})]},e}(tt),Xt=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className="SettingDropdown",e.buttonClassName="Button Button--text",e.caretIcon="fas fa-caret-down",e.defaultLabel="Custom"},e.prototype.view=function(e){var n=this;return t.prototype.view.call(this,T({},e,{children:this.attrs.options.map((function(t){var e,r=t.value,i=t.label,o=ur.data.settings[n.attrs.key]===r;return V.component({icon:!o||"fas fa-check",onclick:Et.bind(n,(e={},e[n.attrs.key]=r,e)),active:o},i)}))}))},e}(Kt),Jt=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.view=function(t){var e=this.scopeItems().toArray(),n=function(t){return e.map((function(e){return"children"in t?m("td",null):e.render(t)}))};return m("table",{className:"PermissionGrid"},m("thead",null,m("tr",null,m("th",null),e.map((function(t){return m("th",null,t.label," ",t.onremove?V.component({icon:"fas fa-times",className:"Button Button--text PermissionGrid-removeScope",onclick:t.onremove}):"")})),m("th",null,this.scopeControlItems().toArray()))),this.permissionItems().toArray().map((function(t){return m("tbody",null,m("tr",{className:"PermissionGrid-section"},m("th",null,t.label),n(t),m("td",null)),t.children.map((function(t){return m("tr",{className:"PermissionGrid-child"},m("th",null,q(t.icon),t.label),n(t),m("td",null))})))})))},n.permissionItems=function(){var t=new D;return t.add("view",{label:ur.translator.trans("core.admin.permissions.read_heading"),children:this.viewItems().toArray()},100),t.add("start",{label:ur.translator.trans("core.admin.permissions.create_heading"),children:this.startItems().toArray()},90),t.add("reply",{label:ur.translator.trans("core.admin.permissions.participate_heading"),children:this.replyItems().toArray()},80),t.add("moderate",{label:ur.translator.trans("core.admin.permissions.moderate_heading"),children:this.moderateItems().toArray()},70),t},n.viewItems=function(){var t=new D;return t.add("viewForum",{icon:"fas fa-eye",label:ur.translator.trans("core.admin.permissions.view_forum_label"),permission:"viewForum",allowGuest:!0},100),t.add("viewHiddenGroups",{icon:"fas fa-users",label:ur.translator.trans("core.admin.permissions.view_hidden_groups_label"),permission:"viewHiddenGroups"},100),t.add("searchUsers",{icon:"fas fa-users",label:ur.translator.trans("core.admin.permissions.search_users_label"),permission:"searchUsers",allowGuest:!0},100),t.add("signUp",{icon:"fas fa-user-plus",label:ur.translator.trans("core.admin.permissions.sign_up_label"),setting:function(){return Xt.component({key:"allow_sign_up",options:[{value:"1",label:ur.translator.trans("core.admin.permissions_controls.signup_open_button")},{value:"0",label:ur.translator.trans("core.admin.permissions_controls.signup_closed_button")}],lazyDraw:!0})}},90),t.add("viewLastSeenAt",{icon:"far fa-clock",label:ur.translator.trans("core.admin.permissions.view_last_seen_at_label"),permission:"user.viewLastSeenAt"}),t.merge(ur.extensionData.getAllExtensionPermissions("view")),t},n.startItems=function(){var t=new D;return t.add("start",{icon:"fas fa-edit",label:ur.translator.trans("core.admin.permissions.start_discussions_label"),permission:"startDiscussion"},100),t.add("allowRenaming",{icon:"fas fa-i-cursor",label:ur.translator.trans("core.admin.permissions.allow_renaming_label"),setting:function(){var t=parseInt(ur.data.settings.allow_renaming,10);return Xt.component({defaultLabel:t?ur.translator.trans("core.admin.permissions_controls.allow_some_minutes_button",{count:t}):ur.translator.trans("core.admin.permissions_controls.allow_indefinitely_button"),key:"allow_renaming",options:[{value:"-1",label:ur.translator.trans("core.admin.permissions_controls.allow_indefinitely_button")},{value:"10",label:ur.translator.trans("core.admin.permissions_controls.allow_ten_minutes_button")},{value:"reply",label:ur.translator.trans("core.admin.permissions_controls.allow_until_reply_button")}],lazyDraw:!0})}},90),t.merge(ur.extensionData.getAllExtensionPermissions("start")),t},n.replyItems=function(){var t=new D;return t.add("reply",{icon:"fas fa-reply",label:ur.translator.trans("core.admin.permissions.reply_to_discussions_label"),permission:"discussion.reply"},100),t.add("allowPostEditing",{icon:"fas fa-pencil-alt",label:ur.translator.trans("core.admin.permissions.allow_post_editing_label"),setting:function(){var t=parseInt(ur.data.settings.allow_post_editing,10);return Xt.component({defaultLabel:t?ur.translator.trans("core.admin.permissions_controls.allow_some_minutes_button",{count:t}):ur.translator.trans("core.admin.permissions_controls.allow_indefinitely_button"),key:"allow_post_editing",options:[{value:"-1",label:ur.translator.trans("core.admin.permissions_controls.allow_indefinitely_button")},{value:"10",label:ur.translator.trans("core.admin.permissions_controls.allow_ten_minutes_button")},{value:"reply",label:ur.translator.trans("core.admin.permissions_controls.allow_until_reply_button")}]})}},90),t.merge(ur.extensionData.getAllExtensionPermissions("reply")),t},n.moderateItems=function(){var t=new D;return t.add("viewIpsPosts",{icon:"fas fa-bullseye",label:ur.translator.trans("core.admin.permissions.view_post_ips_label"),permission:"discussion.viewIpsPosts"},110),t.add("renameDiscussions",{icon:"fas fa-i-cursor",label:ur.translator.trans("core.admin.permissions.rename_discussions_label"),permission:"discussion.rename"},100),t.add("hideDiscussions",{icon:"far fa-trash-alt",label:ur.translator.trans("core.admin.permissions.delete_discussions_label"),permission:"discussion.hide"},90),t.add("deleteDiscussions",{icon:"fas fa-times",label:ur.translator.trans("core.admin.permissions.delete_discussions_forever_label"),permission:"discussion.delete"},80),t.add("postWithoutThrottle",{icon:"fas fa-swimmer",label:ur.translator.trans("core.admin.permissions.post_without_throttle_label"),permission:"postWithoutThrottle"},70),t.add("editPosts",{icon:"fas fa-pencil-alt",label:ur.translator.trans("core.admin.permissions.edit_posts_label"),permission:"discussion.editPosts"},70),t.add("hidePosts",{icon:"far fa-trash-alt",label:ur.translator.trans("core.admin.permissions.delete_posts_label"),permission:"discussion.hidePosts"},60),t.add("deletePosts",{icon:"fas fa-times",label:ur.translator.trans("core.admin.permissions.delete_posts_forever_label"),permission:"discussion.deletePosts"},60),t.add("userEditCredentials",{icon:"fas fa-user-cog",label:ur.translator.trans("core.admin.permissions.edit_users_credentials_label"),permission:"user.editCredentials"},60),t.add("userEditGroups",{icon:"fas fa-users-cog",label:ur.translator.trans("core.admin.permissions.edit_users_groups_label"),permission:"user.editGroups"},60),t.add("userEdit",{icon:"fas fa-address-card",label:ur.translator.trans("core.admin.permissions.edit_users_label"),permission:"user.edit"},60),t.merge(ur.extensionData.getAllExtensionPermissions("moderate")),t},n.scopeItems=function(){var t=new D;return t.add("global",{label:ur.translator.trans("core.admin.permissions.global_heading"),render:function(t){return"setting"in t?t.setting():"permission"in t?Vt.component({permission:t.permission,allowGuest:t.allowGuest}):""}},100),t},n.scopeControlItems=function(){return new D},e}(S),Qt=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.headerInfo=function(){return{className:"PermissionsPage",icon:"fas fa-key",title:ur.translator.trans("core.admin.permissions.title"),description:ur.translator.trans("core.admin.permissions.description")}},n.content=function(){return[m("div",{className:"PermissionsPage-groups"},ur.store.all("groups").filter((function(t){return-1===[Ut.GUEST_ID,Ut.MEMBER_ID].indexOf(t.id())})).map((function(t){return m("button",{className:"Button Group",onclick:function(){return ur.modal.show(zt,{group:t})}},Ft.component({group:t,className:"Group-icon",label:null}),m("span",{className:"Group-name"},t.namePlural()))})),m("button",{className:"Button Group Group--add",onclick:function(){return ur.modal.show(zt)}},q("fas fa-plus",{className:"Group-icon"}),m("span",{className:"Group-name"},ur.translator.trans("core.admin.permissions.new_group_button")))),m("div",{className:"PermissionsPage-permissions"},Jt.component())]},e}(It),Zt=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.settings={},this.loading=!1},n.form=function(){return""},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.form(),m("div",{className:"Form-group"},this.submitButton())))},n.submitButton=function(){return m(V,{type:"submit",className:"Button Button--primary",loading:this.loading,disabled:!this.changed()},ur.translator.trans("core.admin.settings.submit_button"))},n.setting=function(t,e){return void 0===e&&(e=""),this.settings[t]=this.settings[t]||xt(ur.data.settings[t]||e),this.settings[t]},n.dirty=function(){var t=this,e={};return Object.keys(this.settings).forEach((function(n){var r=t.settings[n]();r!==ur.data.settings[n]&&(e[n]=r)})),e},n.changed=function(){return Object.keys(this.dirty()).length},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,Et(this.dirty()).then(this.onsaved.bind(this),this.loaded.bind(this))},n.onsaved=function(){this.hide()},e}(ot),te=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.className=function(){return"EditCustomCssModal TextareaCodeModal Modal--large"},n.title=function(){return ur.translator.trans("core.admin.edit_css.title")},n.form=function(){return[m("p",null,ur.translator.trans("core.admin.edit_css.customize_text",{a:m("a",{href:"https://github.com/flarum/core/tree/master/less",target:"_blank"})})),m("div",{className:"Form-group"},m("textarea",{className:"FormControl",rows:"30",bidi:this.setting("custom_less")}))]},n.onsaved=function(){window.location.reload()},e}(Zt),ee=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.className=function(){return"EditCustomHeaderModal TextareaCodeModal Modal--large"},n.title=function(){return ur.translator.trans("core.admin.edit_header.title")},n.form=function(){return[m("p",null,ur.translator.trans("core.admin.edit_header.customize_text")),m("div",{className:"Form-group"},m("textarea",{className:"FormControl",rows:"30",bidi:this.setting("custom_header")}))]},n.onsaved=function(){window.location.reload()},e}(Zt),ne=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.className=function(){return"EditCustomFooterModal TextareaCodeModal Modal--large"},n.title=function(){return ur.translator.trans("core.admin.edit_footer.title")},n.form=function(){return[m("p",null,ur.translator.trans("core.admin.edit_footer.customize_text")),m("div",{className:"Form-group"},m("textarea",{className:"FormControl",rows:"30",bidi:this.setting("custom_footer")}))]},n.onsaved=function(){window.location.reload()},e}(Zt),re=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e}N(e,t);var n=e.prototype;return n.view=function(e){return this.attrs.loading=this.loading,this.attrs.className=(this.attrs.className||"")+" Button",ur.data.settings[this.attrs.name+"_path"]?(this.attrs.onclick=this.remove.bind(this),m("div",null,m("p",null,m("img",{src:ur.forum.attribute(this.attrs.name+"Url"),alt:""})),m("p",null,t.prototype.view.call(this,T({},e,{children:ur.translator.trans("core.admin.upload_image.remove_button")}))))):(this.attrs.onclick=this.upload.bind(this),t.prototype.view.call(this,T({},e,{children:ur.translator.trans("core.admin.upload_image.upload_button")})))},n.upload=function(){var t=this;this.loading||$('<input type="file">').appendTo("body").hide().click().on("change",(function(e){var n=new FormData;n.append(t.attrs.name,$(e.target)[0].files[0]),t.loading=!0,m.redraw(),ur.request({method:"POST",url:t.resourceUrl(),serialize:function(t){return t},body:n}).then(t.success.bind(t),t.failure.bind(t))}))},n.remove=function(){this.loading=!0,m.redraw(),ur.request({method:"DELETE",url:this.resourceUrl()}).then(this.success.bind(this),this.failure.bind(this))},n.resourceUrl=function(){return ur.forum.attribute("apiUrl")+"/"+this.attrs.name},n.success=function(t){window.location.reload()},n.failure=function(t){this.loading=!1,m.redraw()},e}(V),ie=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.headerInfo=function(){return{className:"AppearancePage",icon:"fas fa-paint-brush",title:ur.translator.trans("core.admin.appearance.title"),description:ur.translator.trans("core.admin.appearance.description")}},n.content=function(){return[m("div",{className:"Form"},m("fieldset",{className:"AppearancePage-colors"},m("legend",null,ur.translator.trans("core.admin.appearance.colors_heading")),this.colorItems().toArray())),m("fieldset",null,m("legend",null,ur.translator.trans("core.admin.appearance.logo_heading")),m("div",{className:"helpText"},ur.translator.trans("core.admin.appearance.logo_text")),m(re,{name:"logo"})),m("fieldset",null,m("legend",null,ur.translator.trans("core.admin.appearance.favicon_heading")),m("div",{className:"helpText"},ur.translator.trans("core.admin.appearance.favicon_text")),m(re,{name:"favicon"})),m("fieldset",null,m("legend",null,ur.translator.trans("core.admin.appearance.custom_header_heading")),m("div",{className:"helpText"},ur.translator.trans("core.admin.appearance.custom_header_text")),V.component({className:"Button",onclick:function(){return ur.modal.show(ee)}},ur.translator.trans("core.admin.appearance.edit_header_button"))),m("fieldset",null,m("legend",null,ur.translator.trans("core.admin.appearance.custom_footer_heading")),m("div",{className:"helpText"},ur.translator.trans("core.admin.appearance.custom_footer_text")),V.component({className:"Button",onclick:function(){return ur.modal.show(ne)}},ur.translator.trans("core.admin.appearance.edit_footer_button"))),m("fieldset",null,m("legend",null,ur.translator.trans("core.admin.appearance.custom_styles_heading")),m("div",{className:"helpText"},ur.translator.trans("core.admin.appearance.custom_styles_text")),V.component({className:"Button",onclick:function(){return ur.modal.show(te)}},ur.translator.trans("core.admin.appearance.edit_css_button")))]},n.colorItems=function(){var t=new D;return t.add("helpText",m("div",{className:"helpText"},ur.translator.trans("core.admin.appearance.colors_text")),80),t.add("theme-colors",m("div",{className:"AppearancePage-colors-input"},this.buildSettingComponent({type:"color-preview",setting:"theme_primary_color",placeholder:"#aaaaaa"}),this.buildSettingComponent({type:"color-preview",setting:"theme_secondary_color",placeholder:"#aaaaaa"})),70),t.add("dark-mode",this.buildSettingComponent({type:"switch",setting:"theme_dark_mode",label:ur.translator.trans("core.admin.appearance.dark_mode_label")}),60),t.add("colored-header",this.buildSettingComponent({type:"switch",setting:"theme_colored_header",label:ur.translator.trans("core.admin.appearance.colored_header_label")}),50),t.add("submit",this.submitButton(),0),t},n.onsaved=function(){window.location.reload()},e}(It),oe=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.sendingTest=!1,this.refresh()},n.headerInfo=function(){return{className:"MailPage",icon:"fas fa-envelope",title:ur.translator.trans("core.admin.email.title"),description:ur.translator.trans("core.admin.email.description")}},n.refresh=function(){var t=this;this.loading=!0,this.status={sending:!1,errors:{}},ur.request({method:"GET",url:ur.forum.attribute("apiUrl")+"/mail/settings"}).then((function(e){t.driverFields=e.data.attributes.fields,t.status.sending=e.data.attributes.sending,t.status.errors=e.data.attributes.errors,t.loading=!1,m.redraw()}))},n.content=function(){var t=this;if(this.loading)return m(W,null);var e=this.driverFields[this.setting("mail_driver")()],n=Object.keys(e);return m("div",{className:"Form"},this.buildSettingComponent({type:"text",setting:"mail_from",label:ur.translator.trans("core.admin.email.addresses_heading")}),this.buildSettingComponent({type:"select",setting:"mail_driver",options:Object.keys(this.driverFields).reduce((function(t,e){var n;return T({},t,((n={})[e]=e,n))}),{}),label:ur.translator.trans("core.admin.email.driver_heading")}),this.status.sending||it.component({dismissible:!1},ur.translator.trans("core.admin.email.not_sending_message")),n.length>0&&m(Lt,{label:ur.translator.trans("core.admin.email."+this.setting("mail_driver")()+"_heading"),className:"MailPage-MailSettings"},m("div",{className:"MailPage-MailSettings-input"},n.map((function(n){var r=e[n];return[t.buildSettingComponent({type:"string"==typeof r?"text":"select",label:ur.translator.trans("core.admin.email."+n+"_label"),setting:n,options:r}),t.status.errors[n]&&m("p",{className:"ValidationError"},t.status.errors[n])]})))),this.submitButton(),m(Lt,{label:ur.translator.trans("core.admin.email.send_test_mail_heading"),className:"MailPage-MailSettings"},m("div",{className:"helpText"},ur.translator.trans("core.admin.email.send_test_mail_text",{email:ur.session.user.email()})),V.component({className:"Button Button--primary",disabled:this.sendingTest||this.isChanged(),onclick:function(){return t.sendTestEmail()}},ur.translator.trans("core.admin.email.send_test_mail_button"))))},n.sendTestEmail=function(){var t=this;this.saving||this.sendingTest||(this.sendingTest=!0,ur.alerts.dismiss(this.testEmailSuccessAlert),ur.request({method:"POST",url:ur.forum.attribute("apiUrl")+"/mail/test"}).then((function(e){t.sendingTest=!1,t.testEmailSuccessAlert=ur.alerts.show({type:"success"},ur.translator.trans("core.admin.email.send_test_mail_success"))})).catch((function(e){throw t.sendingTest=!1,m.redraw(),e})))},n.saveSettings=function(e){t.prototype.saveSettings.call(this,e).then(this.refresh())},e}(It);function ae(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function se(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ae(o,r,i,a,s,"next",t)}function s(t){ae(o,r,i,a,s,"throw",t)}a(void 0)}))}}var le=n(195),ue=n.n(le),ce=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e);var r=this.attrs.user;this.username=xt(r.username()||""),this.email=xt(r.email()||""),this.isEmailConfirmed=xt(r.isEmailConfirmed()||!1),this.setPassword=xt(!1),this.password=xt(r.password()||""),this.groups={},b.store.all("groups").filter((function(t){return-1===[Ut.GUEST_ID,Ut.MEMBER_ID].indexOf(t.id())})).forEach((function(t){return n.groups[t.id()]=xt(-1!==r.groups().indexOf(t))}))},n.className=function(){return"EditUserModal Modal--small"},n.title=function(){return b.translator.trans("core.lib.edit_user.title")},n.content=function(){var t=this.fields().toArray();return m("div",{className:"Modal-body"},t.length>1?m("div",{className:"Form"},this.fields().toArray()):b.translator.trans("core.lib.edit_user.nothing_available"))},n.fields=function(){var t=this,e=new D;return b.session.user.canEditCredentials()&&(e.add("username",m("div",{className:"Form-group"},m("label",null,b.translator.trans("core.lib.edit_user.username_heading")),m("input",{className:"FormControl",placeholder:U(b.translator.trans("core.lib.edit_user.username_label")),bidi:this.username,disabled:this.nonAdminEditingAdmin()})),40),b.session.user!==this.attrs.user&&(e.add("email",m("div",{className:"Form-group"},m("label",null,b.translator.trans("core.lib.edit_user.email_heading")),m("div",null,m("input",{className:"FormControl",placeholder:U(b.translator.trans("core.lib.edit_user.email_label")),bidi:this.email,disabled:this.nonAdminEditingAdmin()})),!this.isEmailConfirmed()&&this.userIsAdmin(b.session.user)?m("div",null,V.component({className:"Button Button--block",loading:this.loading,onclick:this.activate.bind(this)},b.translator.trans("core.lib.edit_user.activate_button"))):""),30),e.add("password",m("div",{className:"Form-group"},m("label",null,b.translator.trans("core.lib.edit_user.password_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",onchange:function(e){t.setPassword(e.target.checked),m.redraw.sync(),e.target.checked&&t.$("[name=password]").select(),e.redraw=!1},disabled:this.nonAdminEditingAdmin()}),b.translator.trans("core.lib.edit_user.set_password_label")),this.setPassword()?m("input",{className:"FormControl",type:"password",name:"password",placeholder:U(b.translator.trans("core.lib.edit_user.password_label")),bidi:this.password,disabled:this.nonAdminEditingAdmin()}):"")),20))),b.session.user.canEditGroups()&&e.add("groups",m("div",{className:"Form-group EditUserModal-groups"},m("label",null,b.translator.trans("core.lib.edit_user.groups_heading")),m("div",null,Object.keys(this.groups).map((function(t){return b.store.getById("groups",t)})).map((function(e){return m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:t.groups[e.id()],disabled:e.id()===Ut.ADMINISTRATOR_ID&&(t.attrs.user===b.session.user||!t.userIsAdmin(b.session.user))}),Ft.component({group:e,label:""})," ",e.nameSingular())})))),10),e.add("submit",m("div",{className:"Form-group"},V.component({className:"Button Button--primary",type:"submit",loading:this.loading},b.translator.trans("core.lib.edit_user.submit_button"))),-10),e},n.activate=function(){var t=this;this.loading=!0;var e={username:this.username(),isEmailConfirmed:!0};this.attrs.user.save(e,{errorHandler:this.onerror.bind(this)}).then((function(){t.isEmailConfirmed(!0),t.loading=!1,m.redraw()})).catch((function(){t.loading=!1,m.redraw()}))},n.data=function(){var t=this,e={relationships:{}};return this.attrs.user.canEditCredentials()&&!this.nonAdminEditingAdmin()&&(e.username=this.username(),b.session.user!==this.attrs.user&&(e.email=this.email()),this.setPassword()&&(e.password=this.password())),this.attrs.user.canEditGroups()&&(e.relationships.groups=Object.keys(this.groups).filter((function(e){return t.groups[e]()})).map((function(t){return b.store.getById("groups",t)}))),e},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.attrs.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},n.nonAdminEditingAdmin=function(){return this.userIsAdmin(this.attrs.user)&&!this.userIsAdmin(b.session.user)},n.userIsAdmin=function(t){return t.groups().some((function(t){return t.id()===Ut.ADMINISTRATOR_ID}))},e}(ot),de=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).numPerPage=50,e.pageNumber=0,e.userCount=ur.data.modelStatistics.users.total,e.pageData=void 0,e.moreData=!1,e.isLoadingPage=!1,e}N(e,t);var n=e.prototype;return n.getTotalPageCount=function(){return-1===this.userCount?0:Math.ceil(this.userCount/this.numPerPage)},n.content=function(){if(void 0===this.pageData)return this.loadPage(0),[m("section",{class:"UserListPage-grid UserListPage-grid--loading"},m(W,{containerClassName:"LoadingIndicator--block",size:"large"}))];var t=this.columns().toArray();return[m("p",{class:"UserListPage-totalUsers"},ur.translator.trans("core.admin.users.total_users",{count:this.userCount})),m("section",{class:j(["UserListPage-grid",this.isLoadingPage?"UserListPage-grid--loadingPage":"UserListPage-grid--loaded"]),style:{"--columns":t.length},role:"table","aria-rowcount":this.pageData.length+1,"aria-colcount":t.length,"aria-live":"polite","aria-busy":this.isLoadingPage?"true":"false"},t.map((function(t,e){return m("div",{class:"UserListPage-grid-header",role:"columnheader","aria-colindex":e+1,"aria-rowindex":1},t.name)})),this.pageData.map((function(e,n){return t.map((function(t,r){var i=t.content&&t.content(e);return m("div",{class:j(["UserListPage-grid-rowItem",n%2>0&&"UserListPage-grid-rowItem--shaded"]),"data-user-id":e.id(),"data-column-name":t.itemName,"aria-colindex":r+1,"aria-rowindex":n+2,role:"cell"},i||ur.translator.trans("core.admin.users.grid.invalid_column_content"))}))})),this.isLoadingPage&&m(W,{size:"large"})),m("nav",{class:"UserListPage-gridPagination"},m(V,{disabled:0===this.pageNumber,title:ur.translator.trans("core.admin.users.pagination.back_button"),onclick:this.previousPage.bind(this),icon:"fas fa-chevron-left",className:"Button Button--icon UserListPage-backBtn"}),m("span",{class:"UserListPage-pageNumber"},ur.translator.trans("core.admin.users.pagination.page_counter",{current:this.pageNumber+1,total:this.getTotalPageCount()})),m(V,{disabled:!this.moreData,title:ur.translator.trans("core.admin.users.pagination.next_button"),onclick:this.nextPage.bind(this),icon:"fas fa-chevron-right",className:"Button Button--icon UserListPage-nextBtn"}))]},n.columns=function(){var t=new D;return t.add("id",{name:ur.translator.trans("core.admin.users.grid.columns.user_id.title"),content:function(t){var e;return null!=(e=t.id())?e:""}},100),t.add("username",{name:ur.translator.trans("core.admin.users.grid.columns.username.title"),content:function(t){var e=ur.forum.attribute("baseUrl")+"/u/"+t.slug();return m("a",{target:"_blank",href:e,title:U(ur.translator.trans("core.admin.users.grid.columns.username.profile_link_tooltip",{username:t.username()}))},t.username())}},90),t.add("joinDate",{name:ur.translator.trans("core.admin.users.grid.columns.join_time.title"),content:function(t){return m("span",{class:"UserList-joinDate",title:t.joinTime()},dayjs(t.joinTime()).format("LLL"))}},80),t.add("groupBadges",{name:ur.translator.trans("core.admin.users.grid.columns.group_badges.title"),content:function(t){var e=t.badges().toArray();return e.length?m("ul",{className:"DiscussionHero-badges badges"},R(e)):ur.translator.trans("core.admin.users.grid.columns.group_badges.no_badges")}},70),t.add("emailAddress",{name:ur.translator.trans("core.admin.users.grid.columns.email.title"),content:function(t){function e(e){var n=$("[data-column-name=emailAddress][data-user-id="+t.id()+"] .UserList-email"),r=n.find(".UserList-emailAddress"),i=n.find(".UserList-emailIconBtn"),o=i.find(".icon");i.attr("title",U(e?ur.translator.trans("core.admin.users.grid.columns.email.visibility_hide"):ur.translator.trans("core.admin.users.grid.columns.email.visibility_show"))),r.attr("aria-hidden",e?"false":"true"),e?(o.addClass("fa-eye"),o.removeClass("fa-eye-slash")):(o.removeClass("fa-eye"),o.addClass("fa-eye-slash")),n.attr("data-email-shown",""+e)}return m("div",{class:"UserList-email",key:t.id(),"data-email-shown":"false"},m("span",{class:"UserList-emailAddress","aria-hidden":"true",onclick:function(){return e(!0)}},t.email()),m("button",{onclick:function(){e(!("true"===$("[data-column-name=emailAddress][data-user-id="+t.id()+"] .UserList-email").attr("data-email-shown")))},class:"Button Button--text UserList-emailIconBtn",title:ur.translator.trans("core.admin.users.grid.columns.email.visibility_show")},q("far fa-eye-slash fa-fw",{className:"icon"})))}},70),t.add("editUser",{name:ur.translator.trans("core.admin.users.grid.columns.edit_user.title"),content:function(t){return m(V,{className:"Button UserList-editModalBtn",title:ur.translator.trans("core.admin.users.grid.columns.edit_user.tooltip",{username:t.username()}),onclick:function(){return ur.modal.show(ce,{user:t})}},ur.translator.trans("core.admin.users.grid.columns.edit_user.button"))}},-90),t},n.headerInfo=function(){return{className:"UserListPage",icon:"fas fa-users",title:ur.translator.trans("core.admin.users.title"),description:ur.translator.trans("core.admin.users.description")}},n.loadPage=function(){var t=se(ue().mark((function t(e){var n=this;return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e<0&&(e=0),ur.store.find("users",{page:{limit:this.numPerPage,offset:e*this.numPerPage}}).then((function(t){var r,i;n.moreData=!(null==(r=t.payload)||null==(i=r.links)||!i.next);var o=t;delete o.payload,n.pageData=o,n.pageNumber=e,n.isLoadingPage=!1,m.redraw()})).catch((function(t){console.error(t),n.pageData=[]}));case 2:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.nextPage=function(){this.isLoadingPage=!0,this.loadPage(this.pageNumber+1)},n.previousPage=function(){this.isLoadingPage=!0,this.loadPage(this.pageNumber-1)},e}(It);function fe(t){if(2===t.length)return b.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,b.translator.trans("core.lib.series.glue_text")])}),[]).slice(0,-1);return b.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t}var he=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).extensionId=void 0,e}N(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.extensionId=this.attrs.extensionId},n.permissionItems=function(){var e=new D;return t.prototype.permissionItems.call(this).toArray().filter((function(t){return t.children.length>0})).forEach((function(t){e.add(t.itemName,t)})),e},n.viewItems=function(){return ur.extensionData.getExtensionPermissions(this.extensionId,"view")||new D},n.startItems=function(){return ur.extensionData.getExtensionPermissions(this.extensionId,"start")||new D},n.replyItems=function(){return ur.extensionData.getExtensionPermissions(this.extensionId,"reply")||new D},n.moderateItems=function(){return ur.extensionData.getExtensionPermissions(this.extensionId,"moderate")||new D},n.scopeControlItems=function(){var t=new D;return t.add("configureScopes",m(V,{className:"Button Button--text",onclick:function(){return m.route.set(ur.route("permissions"))}},ur.translator.trans("core.admin.extension.configure_scopes"))),t},e}(Jt),pe=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.attrs.text))},e}(S),me=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).content=qt.attribute("content"),e}return N(e,t),e}(qt),ve=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),ur.store.models["extension-readmes"]=me,this.name=this.attrs.extension.id,this.extName=this.attrs.extension.extra["flarum-extension"].title,this.loading=!0,this.loadReadme()},n.className=function(){return"ReadmeModal Modal--large Modal--inverted"},n.title=function(){return ur.translator.trans("core.admin.extension.readme.title",{extName:this.extName})},n.content=function(){var t=ur.translator.trans("core.admin.extension.readme.no_readme");return m("div",{className:"Modal-body"},this.loading?m("div",{className:"ReadmeModal-loading"},W.component()):m("div",null,this.readme.content()?m.trust(this.readme.content()):pe.component({text:t})))},n.loadReadme=function(){var t=se(ue().mark((function t(){return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ur.store.find("extension-readmes",this.name);case 2:this.readme=t.sent,this.loading=!1,m.redraw();case 5:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),e}(ot),ge=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).extension=void 0,e.changingState=!1,e.infoFields={discuss:"fas fa-comment-alt",documentation:"fas fa-book",support:"fas fa-life-ring",website:"fas fa-link",donate:"fas fa-donate",source:"fas fa-code"},e}N(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e);var n=ur.data.extensions[this.attrs.id];if(!n)return m.route.set(ur.route("dashboard"));this.extension=n},n.className=function(){return this.extension?this.extension.id+"-Page":""},n.view=function(t){return this.extension?m("div",{className:"ExtensionPage "+this.className()},this.header(),this.isEnabled()?m("div",{className:"ExtensionPage-body"},this.sections(t).toArray()):m("div",{className:"container"},m("h3",{className:"ExtensionPage-subHeader"},ur.translator.trans("core.admin.extension.enable_to_see")))):null},n.header=function(){var t=this.isEnabled();return[m("div",{className:"ExtensionPage-header"},m("div",{className:"container"},m("div",{className:"ExtensionTitle"},m("span",{className:"ExtensionIcon",style:this.extension.icon},this.extension.icon?q(this.extension.icon.name):""),m("div",{className:"ExtensionName"},m("h2",null,this.extension.extra["flarum-extension"].title)),m("div",{className:"ExtensionPage-headerTopItems"},m("ul",null,R(this.topItems().toArray())))),m("div",{className:"helpText"},this.extension.description),m("div",{className:"ExtensionPage-headerItems"},m(vt,{state:this.changingState?!t:t,loading:this.changingState,onchange:this.toggle.bind(this,this.extension.id)},t?ur.translator.trans("core.admin.extension.enabled"):ur.translator.trans("core.admin.extension.disabled")),m("aside",{className:"ExtensionInfo"},m("ul",null,R(this.infoItems().toArray()))))))]},n.sections=function(t){var e=new D;return e.add("content",this.content(t)),e.add("permissions",[m("div",{className:"ExtensionPage-permissions"},m("div",{className:"ExtensionPage-permissions-header"},m("div",{className:"container"},m("h2",{className:"ExtensionTitle"},ur.translator.trans("core.admin.extension.permissions_title")))),m("div",{className:"container"},ur.extensionData.extensionHasPermissions(this.extension.id)?he.component({extensionId:this.extension.id}):m("h3",{className:"ExtensionPage-subHeader"},ur.translator.trans("core.admin.extension.no_permissions"))))]),e},n.content=function(t){var e=ur.extensionData.getSettings(this.extension.id);return m("div",{className:"ExtensionPage-settings"},m("div",{className:"container"},e?m("div",{className:"Form"},e.map(this.buildSettingComponent.bind(this)),m("div",{className:"Form-group"},this.submitButton(t))):m("h3",{className:"ExtensionPage-subHeader"},ur.translator.trans("core.admin.extension.no_settings"))))},n.topItems=function(){var t=this,e=new D;return e.add("version",m("span",{className:"ExtensionVersion"},this.extension.version)),this.isEnabled()||e.add("uninstall",m(V,{icon:"fas fa-trash-alt",className:"Button Button--primary",onclick:function(){confirm(ur.translator.trans("core.admin.extension.confirm_purge"))&&(ur.request({url:ur.forum.attribute("apiUrl")+"/extensions/"+t.extension.id,method:"DELETE"}).then((function(){return window.location.reload()})),ur.modal.show(at))}.bind(this)},ur.translator.trans("core.admin.extension.purge_button"))),e},n.infoItems=function(){var t,e=this,n=new D,r=this.extension.links;if(null!=(t=r.authors)&&t.length){var i=r.authors.map((function(t){return m(X,{href:t.link,external:!0,target:"_blank"},t.name)}));n.add("authors",[q("fas fa-user"),m("span",null,fe(i))])}Object.keys(this.infoFields).map((function(t){r[t]&&n.add(t,m(J,{href:r[t],icon:e.infoFields[t],external:!0,target:"_blank"},ur.translator.trans("core.admin.extension.info_links."+t)))}));var o=this.extension;return n.add("readme",V.component({icon:"fab fa-readme",class:"Button Button--text",onclick:function(){ur.modal.show(ve,{extension:o})}},ur.translator.trans("core.admin.extension.readme.button_label")),10),n},n.toggle=function(){var t=this,e=this.isEnabled();this.changingState=!0,ur.request({url:ur.forum.attribute("apiUrl")+"/extensions/"+this.extension.id,method:"PATCH",body:{enabled:!e},errorHandler:this.onerror.bind(this)}).then((function(){e||localStorage.setItem("enabledExtension",t.extension.id),window.location.reload()})),ur.modal.show(at)},n.isEnabled=function(){return lt(this.extension.id)},n.onerror=function(t){var e,n;if(setTimeout((function(){ur.modal.close()}),300),this.changingState=!1,409!==t.status)throw t;var r=null==(e=t.response)||null==(n=e.errors)?void 0:n[0];r&&ur.alerts.show({type:"error"},ur.translator.trans("core.lib.error."+r.code+"_message",{extension:r.extension,extensions:r.extensions.join(", ")}))},e}(It),ye=function(){function t(t,e){this.component=void 0,this.routeName=void 0,this.component=t,this.routeName=e}var e=t.prototype;return e.makeKey=function(){return this.routeName+JSON.stringify(m.route.param())},e.makeAttrs=function(t){return T({},t.attrs,{routeName:this.routeName})},e.onmatch=function(t,e,n){return this.component},e.render=function(t){return[T({},t,{attrs:this.makeAttrs(t),key:this.makeKey()})]},t}(),be=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.onmatch=function(e,n,r){return ur.extensionData.getPage(e.id)||t.prototype.onmatch.call(this,e,n,r)},e}(ye);function we(t){t.routes={dashboard:{path:"/",component:jt},basics:{path:"/basics",component:$t},permissions:{path:"/permissions",component:Qt},appearance:{path:"/appearance",component:ie},mail:{path:"/mail",component:oe},users:{path:"/users",component:de},extension:{path:"/extension/:id",component:ge,resolverClass:be}}}be.extension=null;var xe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Ee=xe.join(","),Ne="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Te=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return isNaN(e)?function(t){return"true"===t.contentEditable}(t)?0:"AUDIO"!==t.nodeName&&"VIDEO"!==t.nodeName&&"DETAILS"!==t.nodeName||null!==t.getAttribute("tabindex")?t.tabIndex:0:e},Se=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Ce=function(t){return"INPUT"===t.tagName},ke=function(t,e){return!(e.disabled||function(t){return Ce(t)&&"hidden"===t.type}(e)||function(t,e){if("hidden"===getComputedStyle(t).visibility)return!0;var n=Ne.call(t,"details>summary:first-of-type")?t.parentElement:t;if(Ne.call(n,"details:not([open]) *"))return!0;if(e&&"full"!==e){if("non-zero-area"===e){var r=t.getBoundingClientRect(),i=r.width,o=r.height;return 0===i&&0===o}}else for(;t;){if("none"===getComputedStyle(t).display)return!0;t=t.parentElement}return!1}(e,t.displayCheck)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(Ce(t)||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||"BUTTON"===t.tagName)for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var r=e.children.item(n);if("LEGEND"===r.tagName)return!r.contains(t)}return!0}e=e.parentElement}return!1}(e))},Ae=function(t,e){return!(!ke(t,e)||function(t){return function(t){return Ce(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||t.ownerDocument,r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var i=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!i||i===t}(t)}(e)||Te(e)<0)},_e=xe.concat("iframe").join(","),De=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Ne.call(t,_e)&&ke(e,t)};function Oe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Pe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ie,je=(Ie=[],{activateTrap:function(t){if(Ie.length>0){var e=Ie[Ie.length-1];e!==t&&e.pause()}var n=Ie.indexOf(t);-1===n||Ie.splice(n,1),Ie.push(t)},deactivateTrap:function(t){var e=Ie.indexOf(t);-1!==e&&Ie.splice(e,1),Ie.length>0&&Ie[Ie.length-1].unpause()}}),Le=function(t){return setTimeout(t,0)},$e=function(t,e){var n=-1;return t.every((function(t,r){return!e(t)||(n=r,!1)})),n},Me=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return"function"==typeof t?t.apply(void 0,n):t},Re=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},Be=function(t,e){var n,r=(null==e?void 0:e.document)||document,i=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Oe(Object(n),!0).forEach((function(e){Pe(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},e),o={containers:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(t,e,n){return t&&void 0!==t[e]?t[e]:i[n||e]},s=function(t){return!(!t||!o.containers.some((function(e){return e.contains(t)})))},l=function(t){var e=i[t];if("function"==typeof e){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];e=e.apply(void 0,o)}if(!e){if(void 0===e||!1===e)return e;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var s=e;if("string"==typeof e&&!(s=r.querySelector(e)))throw new Error("`".concat(t,"` as selector refers to no known node"));return s},u=function(){var t=l("initialFocus");if(!1===t)return!1;if(void 0===t)if(s(r.activeElement))t=r.activeElement;else{var e=o.tabbableGroups[0];t=e&&e.firstTabbableNode||l("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},c=function(){if(o.tabbableGroups=o.containers.map((function(t){var e,n,r,i,o,a,s,l=(n=[],r=[],(i=t,o=(e=e||{}).includeContainer,a=Ae.bind(null,e),s=Array.prototype.slice.apply(i.querySelectorAll(Ee)),o&&Ne.call(i,Ee)&&s.unshift(i),s.filter(a)).forEach((function(t,e){var i=Te(t);0===i?n.push(t):r.push({documentOrder:e,tabIndex:i,node:t})})),r.sort(Se).map((function(t){return t.node})).concat(n));if(l.length>0)return{container:t,firstTabbableNode:l[0],lastTabbableNode:l[l.length-1]}})).filter((function(t){return!!t})),o.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function t(e){!1!==e&&e!==r.activeElement&&(e&&e.focus?(e.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=e,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(e)&&e.select()):t(u()))},f=function(t){var e=l("setReturnFocus",t);return e||!1!==e&&t},h=function(t){var e=Re(t);s(e)||(Me(i.clickOutsideDeactivates,t)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!De(e)}):Me(i.allowOutsideClick,t)||t.preventDefault())},p=function(t){var e=Re(t),n=s(e);n||e instanceof Document?n&&(o.mostRecentlyFocusedNode=e):(t.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||u()))},m=function(t){if(function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t)&&!1!==Me(i.escapeDeactivates,t))return t.preventDefault(),void n.deactivate();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){var e=Re(t);c();var n=null;if(o.tabbableGroups.length>0){var r=$e(o.tabbableGroups,(function(t){return t.container.contains(e)}));if(r<0)n=t.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(t.shiftKey){var i=$e(o.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e===n}));if(i<0&&o.tabbableGroups[r].container===e&&(i=r),i>=0){var a=0===i?o.tabbableGroups.length-1:i-1;n=o.tabbableGroups[a].lastTabbableNode}}else{var s=$e(o.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e===n}));if(s<0&&o.tabbableGroups[r].container===e&&(s=r),s>=0){var u=s===o.tabbableGroups.length-1?0:s+1;n=o.tabbableGroups[u].firstTabbableNode}}}else n=l("fallbackFocus");n&&(t.preventDefault(),d(n))}(t)},v=function(t){if(!Me(i.clickOutsideDeactivates,t)){var e=Re(t);s(e)||Me(i.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())}},g=function(){if(o.active)return je.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?Le((function(){d(u())})):d(u()),r.addEventListener("focusin",p,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},y=function(){if(o.active)return r.removeEventListener("focusin",p,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",m,!0),n};return(n={activate:function(t){if(o.active)return this;var e=a(t,"onActivate"),n=a(t,"onPostActivate"),i=a(t,"checkCanFocusTrap");i||c(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,e&&e();var s=function(){i&&c(),g(),n&&n()};return i?(i(o.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(t){if(!o.active)return this;clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,y(),o.active=!1,o.paused=!1,je.deactivateTrap(n);var e=a(t,"onDeactivate"),r=a(t,"onPostDeactivate"),i=a(t,"checkCanReturnFocus");e&&e();var s=a(t,"returnFocus","returnFocusOnDeactivate"),l=function(){Le((function(){s&&d(f(o.nodeFocusedBeforeActivation)),r&&r()}))};return s&&i?(i(f(o.nodeFocusedBeforeActivation)).then(l,l),this):(l(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,y()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,c(),g(),this):this},updateContainerElements:function(t){var e=[].concat(t).filter(Boolean);return o.containers=e.map((function(t){return"string"==typeof t?r.querySelector(t):t})),o.active&&c(),this}}).updateContainerElements(t),n};function He(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e[1]=T({escapeDeactivates:!1},e[1]),Be.apply(void 0,e)}var Fe,qe=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).focusTrap=void 0,e.modalShown=!1,e}N(e,t);var n=e.prototype;return n.view=function(t){var e=this.attrs.state.modal;return m("div",{className:"ModalManager modal fade"},!!e&&e.componentClass.component(T({},e.attrs,{animateShow:this.animateShow.bind(this),animateHide:this.animateHide.bind(this),state:this.attrs.state})))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$().on("hidden.bs.modal",this.attrs.state.close.bind(this.attrs.state)),this.focusTrap=He(this.element)},n.onupdate=function(e){var n=this;t.prototype.onupdate.call(this,e),requestAnimationFrame((function(){try{n.modalShown?null==n.focusTrap.activate||n.focusTrap.activate():null==n.focusTrap.deactivate||n.focusTrap.deactivate()}catch(t){}}))},n.animateShow=function(t){if(this.attrs.state.modal){var e=!!this.attrs.state.modal.componentClass.isDismissible;this.modalShown=!0,this.$().hasClass("in")?t():this.$().one("shown.bs.modal",t).modal({backdrop:e||"static",keyboard:e}).modal("show")}},n.animateHide=function(){this.$().modal("hide"),this.modalShown=!1},e}(S),Ue=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.view=function(){var t=this;return m("div",{className:"AlertManager"},Object.entries(this.state.getActiveAlerts()).map((function(e){var n=e[0],r=e[1];return m("div",{className:"AlertManager-alert"},m(r.componentClass,Object.assign({},r.attrs,{ondismiss:t.state.dismiss.bind(t.state,n)}),r.children))})))},e}(S),ze=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return this.attrs.error.xhr?this.attrs.error.xhr.status+" "+this.attrs.error.xhr.statusText:""},n.content=function(){var t,e=this.attrs,n=e.error,r=e.formattedError;if(r)t=r.join("\n\n");else try{var i=n.response||JSON.parse(n.responseText);t=JSON.stringify(i,null,2)}catch(e){t=n.responseText}return m("div",{className:"Modal-body"},m("pre",null,this.attrs.error.options.method," ",this.attrs.error.options.url,m("br",null),m("br",null),t))},e}(ot);function We(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ge(t){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ge(t)}function Ve(t,e){if(e&&("object"===Ge(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return x(t)}function Ye(t){return Ye=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ye(t)}function Ke(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Xe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ke(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ke(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Je(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qe(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?Qe(e):e)}),[])}function Ze(t){var e={};return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.length?r.map((function(t){return null===t?"null":void 0===t?"undefined":"function"==typeof t?t.toString():t instanceof Date?t.toISOString():JSON.stringify(t)})).join("|"):"_(no-args)_";if(Object.prototype.hasOwnProperty.call(e,o))return e[o];var a=t.apply(void 0,r);return e[o]=a,a}}function tn(t){for(var e=function(t){return/\s/.test(t)},n=[],r={},i=0,o=null,a=!1,s=0;s<t.length;){if(a&&(e(t[s])||"{"===t[s]))a=!1,o=t.slice(i,s),"{"===t[s]&&s--;else if(!a&&!e(t[s])){var l="{"===t[s];if(o&&l){var u=en(t,s);if(-1===u)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));r[o]=t.slice(s+1,u),s=u,o=null}else o&&(n.push(o),o=null),a=!0,i=s}s++}return a&&(o=t.slice(i)),o&&n.push(o),{args:n,cases:r}}function en(t,e){for(var n=0,r=e+1;r<t.length;r++){var i=t.charAt(r);if("}"===i){if(0===n)return r;n--}else"{"===i&&n++}return-1}function nn(t){return rn(t.slice(1,-1),",",3)}function rn(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!t)return r;if(1===n)return r.push(t),r;var i=t.indexOf(e);if(-1===i)return r.push(t),r;var o=t.substring(0,i).trim(),a=t.substring(i+e.length+1).trim();return r.push(o),rn(a,e,n-1,r)}function on(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function an(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?on(Object(n),!0).forEach((function(e){Je(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var sn=0,ln="other";function un(t,e){for(var n=0,r="",i=0,o={};n<t.length;){if("#"!==t[n]||i)r+=t[n];else{var a="__hashToken".concat(sn++);r+="{".concat(a,", number}"),o[a]=e}"{"===t[n]?i++:"}"===t[n]&&i--,n++}return{caseBody:r,numberValues:o}}function cn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=tn(e),a=o.args,s=o.cases,l=parseInt(t);a.forEach((function(t){t.startsWith("offset:")&&(l-=parseInt(t.slice("offset:".length)))}));var u=[];if("PluralRules"in Intl){void 0!==Fe&&Fe.resolvedOptions().locale===n||(Fe=new Intl.PluralRules(n));var c=Fe.select(l);c!==ln&&u.push(c)}1===l&&u.push("one"),u.push("=".concat(l),ln);for(var d=0;d<u.length;d++){var f=u[d];if(f in s){var h=un(s[f],l),p=h.caseBody,m=h.numberValues;return i(p,an(an({},r),m))}}return t}var dn="other";function fn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,i=tn(e),o=i.cases;return t in o?r(o[t],n):dn in o?r(o.other,n):t}function hn(t,e,n){return"<".concat(t,">").concat(n,"</").concat(t,">")}function pn(t,e,n){var r=[];return mn(t,0,0,r,(function(i,o,a,s,l,u){if(o)return{break:!0};var c=function(t,e,n,r){var i,o=1;return mn(t,n,r,[],(function(t,n,r,a,s,l){return r===e&&(n?o--:o++,0===o)?(i={segmentIndex:a,segmentStart:l,segmentEnd:s},{exit:!0}):{exit:!1}})),i}(t,a,s,l);if(!c)throw new Error("Unbalanced tags: no closing tag found for <".concat(a,">"));var d=c.segmentIndex===s,f=t[c.segmentIndex],h=[];if(d)h.push(i.slice(l+1,c.segmentStart));else{h.push(i.slice(l+1));for(var p=s+1;p<c.segmentIndex;p++)h.push(t[p]);h.push(f.slice(0,c.segmentStart))}return r.push(i.slice(0,u)),r.push(n(a,e,pn(h.filter((function(t){return""!==t})),e,n))),t.splice(c.segmentIndex+1,0,f.slice(c.segmentEnd+1)),{processedSegment:!0,newSegmentIndex:c.segmentIndex,break:!0}})),r.filter((function(t){return""!==t}))}function mn(t,e,n,r,i){for(var o,a=e;a<t.length;a++){var s=t[a];if("string"==typeof s){for(var l=!1,u=null,c=!1,d=!1,f=a===e?n:0;f<s.length;f++)if(c||"<"!==s[f])if(c&&">"===s[f]){var h=s.slice(u+1+l,f),p=i(s,l,h,a,f,u);if(p.exit)return;if(p.newSegmentIndex&&(a=p.newSegmentIndex),p.processedSegment&&(d=!0),p.break)break;l=!1,u=null,c=!1}else c&&(o=s[f],!/[a-zA-Z-_]/.test(o))&&(l=!1,u=null,c=!1);else u=f,c=!0,"/"===s[f+1]&&(l=!0,f++);d||r.push(s)}else r.push(s)}}function vn(t){return Object.keys(t).reduce((function(e,n){return e[n]=gn(t[n]),e}),{})}function gn(t){return"string"==typeof t||t instanceof String?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):Array.isArray(t)?t.map(gn):t}var yn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&E(t,e)}(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=Ye(e);if(n){var i=Ye(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return Ve(this,t)});function i(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return We(this,i),(e=r.call(this,t,n)).richHandler=o||hn,e}return k(i,[{key:"rich",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=vn(e),r=Qe(this.process(t,n));return pn(r,n,this.richHandler)}}]),i}(function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};We(this,t),Je(this,"format",Ze((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Qe(n.process(t,e)).join("")}))),this.locale=e,this.typeHandlers=r}return k(t,[{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return[];var n=t.indexOf("{");if(-1!==n){var r=en(t,n);if(-1===r)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));var i=t.substring(n,r+1);if(i){var o=[],a=t.substring(0,n);a&&o.push(a);var s=nn(i),l=Xe(s,3),u=l[0],c=l[1],d=l[2],f=e[u];null==f&&(f="");var h=c&&this.typeHandlers[c];o.push(h?h(f,d,this.locale,e,this.process.bind(this)):f);var p=t.substring(r+1);return p&&o.push(this.process(p,e)),o}}return[t]}}]),t}());function bn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function wn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?bn(Object(n),!0).forEach((function(e){Je(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function xn(t,e,n){var r=e[t]||m(t),i=m.fragment(n).children;return wn(wn({},r),{},{children:i})}var En=function(){function t(){this.translations={},this.formatter=new yn(null,this.formatterTypeHandlers(),xn)}var e=t.prototype;return e.setLocale=function(t){this.formatter.locale=t},e.addTranslations=function(t){Object.assign(this.translations,t)},e.formatterTypeHandlers=function(){return{plural:cn,select:fn}},e.preprocessParameters=function(t){if("user"in t){var e=Y(t,"user");t.username||(t.username=Z(e))}return t},e.trans=function(t,e){void 0===e&&(e={});var n=this.translations[t];return n?(e=this.preprocessParameters(e),this.formatter.rich(n,e)):t},t}();function Nn(t){return Array.isArray(t.data)}var Tn=function(){function t(t){this.data={},this.models=void 0,this.models=t}var e=t.prototype;return e.pushPayload=function(t){var e=this;t.included&&t.included.map(this.pushObject.bind(this));var n=t.data instanceof Array?t.data.map((function(t){return e.pushObject(t,!1)})):this.pushObject(t.data,!1);return n.payload=t,n},e.pushObject=function(t,e){if(void 0===e&&(e=!0),!this.models[t.type]){if(e)return null;throw new Error("Cannot push object of type "+t.type+", as that type has not yet been registered in the store.")}var n=this.data[t.type]=this.data[t.type]||{},r=n[t.id],i=r?r.pushData(t):this.createRecord(t.type,t);return n[t.id]=i,i.exists=!0,i},e.find=function(){var t=se(ue().mark((function t(e,n,r,i){var o,a,s=this;return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r={}),void 0===i&&(i={}),o=r,a=b.forum.attribute("apiUrl")+"/"+e,n instanceof Array?a+="?filter[id]="+n.join(","):"object"==typeof n?o=n:n&&(a+="/"+n),t.abrupt("return",b.request(T({method:"GET",url:a,params:o},i)).then((function(t){return Nn(t),s.pushPayload(t)})));case 6:case"end":return t.stop()}}),t)})));return function(e,n,r,i){return t.apply(this,arguments)}}(),e.getById=function(t,e){var n,r;return null==(n=this.data)||null==(r=n[t])?void 0:r[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.values(e):[]},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}(),Sn=function(){function t(t,e){this.user=void 0,this.csrfToken=void 0,this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),b.request(T({method:"POST",url:b.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location.href=b.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}(),Cn=function(){function t(){var t=this;this.focusTrap=void 0,this.appElement=void 0,this.resizeHandler=function(e){console.log(t,e),!e.matches&&t.isOpen()&&t.hide()}.bind(this),this.drawerAvailableMediaQuery=void 0,document.getElementById("content").addEventListener("click",(function(e){t.isOpen()&&(e.preventDefault(),t.hide())})),this.appElement=document.getElementById("app"),this.focusTrap=He("#drawer",{allowOutsideClick:!0}),this.drawerAvailableMediaQuery=window.matchMedia("(max-width: "+getComputedStyle(document.documentElement).getPropertyValue("--screen-phone-max")+")")}var e=t.prototype;return e.isOpen=function(){return this.appElement.classList.contains("drawerOpen")},e.hide=function(){var t;if(this.focusTrap.deactivate(),this.drawerAvailableMediaQuery.removeListener(this.resizeHandler),this.isOpen()){var e=$("#drawer");e.css("visibility","visible").one("transitionend",(function(){return e.css("visibility","")})),this.appElement.classList.remove("drawerOpen"),null==(t=this.$backdrop)||null==t.remove||t.remove()}},e.show=function(){var t=this;this.appElement.classList.add("drawerOpen"),this.drawerAvailableMediaQuery.addListener(this.resizeHandler),this.$backdrop=$("<div/>").addClass("drawer-backdrop fade").appendTo("body").on("click",this.hide.bind(this)),requestAnimationFrame((function(){t.$backdrop.addClass("in"),t.focusTrap.activate()}))},t}();function kn(t,e){void 0===e&&(e="");var n={};for(var r in t){var i=t[r];if("resolver"in i)n[e+i.path]=i.resolver;else{if(!("component"in i))throw new Error("Either a resolver or a component must be provided for the route ["+r+"]");var o="resolverClass"in i?i.resolverClass:ye;n[e+i.path]=new o(i.component,r)}}return n}var An=function(t,e,n,r){this.status=void 0,this.options=void 0,this.xhr=void 0,this.responseText=void 0,this.response=void 0,this.alert=void 0,this.status=t,this.responseText=e,this.options=n,this.xhr=r;try{this.response=JSON.parse(null!=e?e:"null")}catch(t){this.response=null}this.alert=null},_n=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},Dn=function(){function t(t){this.callback=t,this.ticking=!1}var e=t.prototype;return e.loop=function(){var t=this;this.ticking||(_n((function(){t.update(),t.ticking=!1})),this.ticking=!0)},e.update=function(){this.callback(window.pageYOffset)},e.start=function(){this.active||window.addEventListener("scroll",this.active=this.loop.bind(this),{passive:!0})},e.stop=function(){window.removeEventListener("scroll",this.active),this.active=null},t}(),On=n(555),Pn=n.n(On);function In(t){var e=Pn()(t),n=Pn()();return e.isAfter(n)&&(e=n),e.diff(Pn()())<-2592e6?e.year()===Pn()().year()?e.format("D MMM"):e.format("ll"):e.fromNow()}function jn(){$("[data-humantime]").each((function(){var t=$(this),e=In(t.attr("datetime"));t.html(e)}))}function Ln(){setInterval(jn,1e4)}function $n(t,e,n){(Array.isArray(e)?e:[e]).forEach((function(e){var r=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var o=r?r.apply(this,e):void 0;return n.apply(this,[o].concat(e)),o},Object.assign(t[e],r)}))}function Mn(t,e,n){(Array.isArray(e)?e:[e]).forEach((function(e){var r=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n.apply(this,[r.bind(this)].concat(e))},Object.assign(t[e],r)}))}var Rn=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(qt),Bn=n(28),Hn=n.n(Bn);function Fn(t){for(var e=0,n=0;n<t.length;n++)e+=t.charCodeAt(n);var r=function(t,e,n){var r,i,o,a=Math.floor(6*t),s=6*t-a,l=.63,u=n*(1-.3*s),c=n*(1-.3*(1-s));switch(a%6){case 0:r=n,i=c,o=l;break;case 1:r=u,i=n,o=l;break;case 2:r=l,i=n,o=c;break;case 3:r=l,i=u,o=n;break;case 4:r=c,i=l,o=n;break;case 5:r=n,i=l,o=u}return{r:Math.floor(255*r),g:Math.floor(255*i),b:Math.floor(255*o)}}(e%360/360,0,.9);return""+r.r.toString(16)+r.g.toString(16)+r.b.toString(16)}function qn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=e.slice(0,-1),o=e.slice(-1)[0],a={};return function(){var t=this,e=!1;return i.forEach((function(n){var r=t[n],i="function"==typeof r?r.call(t):r;a[n]!==i&&(e=!0,a[n]=i)})),e&&(r=o.apply(this,i.map((function(t){return a[t]})))),r}}var Un=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).avatarColor=null,e}N(e,t);var n=e.prototype;return n.username=function(){return qt.attribute("username").call(this)},n.slug=function(){return qt.attribute("slug").call(this)},n.displayName=function(){return qt.attribute("displayName").call(this)},n.email=function(){return qt.attribute("email").call(this)},n.isEmailConfirmed=function(){return qt.attribute("isEmailConfirmed").call(this)},n.password=function(){return qt.attribute("password").call(this)},n.avatarUrl=function(){return qt.attribute("avatarUrl").call(this)},n.preferences=function(){return qt.attribute("preferences").call(this)},n.groups=function(){return qt.hasMany("groups").call(this)},n.joinTime=function(){return qt.attribute("joinTime",qt.transformDate).call(this)},n.lastSeenAt=function(){return qt.attribute("lastSeenAt",qt.transformDate).call(this)},n.markedAllAsReadAt=function(){return qt.attribute("markedAllAsReadAt",qt.transformDate).call(this)},n.unreadNotificationCount=function(){return qt.attribute("unreadNotificationCount").call(this)},n.newNotificationCount=function(){return qt.attribute("newNotificationCount").call(this)},n.discussionCount=function(){return qt.attribute("discussionCount").call(this)},n.commentCount=function(){return qt.attribute("commentCount").call(this)},n.canEdit=function(){return qt.attribute("canEdit").call(this)},n.canEditCredentials=function(){return qt.attribute("canEditCredentials").call(this)},n.canEditGroups=function(){return qt.attribute("canEditGroups").call(this)},n.canDelete=function(){return qt.attribute("canDelete").call(this)},n.color=function(){var t=this;return qn("displayName","avatarUrl","avatarColor",(function(e,n,r){return r?"rgb("+r.join(", ")+")":n?(t.calculateAvatarColor(),""):"#"+Fn(e)})).call(this)},n.isOnline=function(){return dayjs().subtract(5,"minutes").isBefore(this.lastSeenAt())},n.badges=function(){var t=new D,e=this.groups();return e&&e.forEach((function(e){t.add("group"+(null==e?void 0:e.id()),m(Ft,{group:e}))})),t},n.calculateAvatarColor=function(){var t,e=new Image,n=this;e.addEventListener("load",(function(){try{var t=new(Hn());n.avatarColor=t.getColor(this)}catch(t){if(!(t instanceof TypeError))throw t;n.avatarColor=[255,255,255]}n.freshness=new Date,m.redraw()})),e.crossOrigin="anonymous",e.src=null!=(t=this.avatarUrl())?t:""},n.savePreferences=function(t){var e=this.preferences();return Object.assign(e,t),this.save({preferences:e})},e}(qt),zn=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.title=function(){return qt.attribute("title").call(this)},n.slug=function(){return qt.attribute("slug").call(this)},n.createdAt=function(){return qt.attribute("createdAt",qt.transformDate).call(this)},n.user=function(){return qt.hasOne("user").call(this)},n.firstPost=function(){return qt.hasOne("firstPost").call(this)},n.lastPostedAt=function(){return qt.attribute("lastPostedAt",qt.transformDate).call(this)},n.lastPostedUser=function(){return qt.hasOne("lastPostedUser").call(this)},n.lastPost=function(){return qt.hasOne("lastPost").call(this)},n.lastPostNumber=function(){return qt.attribute("lastPostNumber").call(this)},n.commentCount=function(){return qt.attribute("commentCount").call(this)},n.replyCount=function(){return qn("commentCount",(function(t){var e;return Math.max(0,(null!=(e=t)?e:0)-1)})).call(this)},n.posts=function(){return qt.hasMany("posts").call(this)},n.mostRelevantPost=function(){return qt.hasOne("mostRelevantPost").call(this)},n.lastReadAt=function(){return qt.attribute("lastReadAt",qt.transformDate).call(this)},n.lastReadPostNumber=function(){return qt.attribute("lastReadPostNumber").call(this)},n.isUnread=function(){return qn("unreadCount",(function(t){return!!t})).call(this)},n.isRead=function(){return qn("unreadCount",(function(t){return!(!b.session.user||t)})).call(this)},n.hiddenAt=function(){return qt.attribute("hiddenAt",qt.transformDate).call(this)},n.hiddenUser=function(){return qt.hasOne("hiddenUser").call(this)},n.isHidden=function(){return qn("hiddenAt",(function(t){return!!t})).call(this)},n.canReply=function(){return qt.attribute("canReply").call(this)},n.canRename=function(){return qt.attribute("canRename").call(this)},n.canHide=function(){return qt.attribute("canHide").call(this)},n.canDelete=function(){return qt.attribute("canDelete").call(this)},n.removePost=function(t){var e=this.rawRelationship("posts");e&&e.some((function(n,r){return t===n.id&&(e.splice(r,1),!0)}))},n.unreadCount=function(){var t,e,n,r=b.session.user;if(r&&(null!=(t=null==(e=r.markedAllAsReadAt())?void 0:e.getTime())?t:0)<(null==(n=this.lastPostedAt())?void 0:n.getTime())){var i,o,a=Math.max(0,(null!=(i=this.lastPostNumber())?i:0)-(this.lastReadPostNumber()||0));return Math.min(a,null!=(o=this.commentCount())?o:0)}return 0},n.badges=function(){var t=new D;return this.isHidden()&&t.add("hidden",m(Ht,{type:"hidden",icon:"fas fa-trash",label:b.translator.trans("core.lib.badge.hidden_tooltip")})),t},n.postIds=function(){var t,e;return null!=(t=null==(e=this.rawRelationship("posts"))?void 0:e.map((function(t){return t.id})))?t:[]},e}(qt);function Wn(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function Gn(t){return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}function Vn(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 &nbsp;").replace(/<img\b[^>]*>/gi," "),n=(new DOMParser).parseFromString(e,"text/html").documentElement;return Vn.removeSelectors.forEach((function(t){n.querySelectorAll(t).forEach((function(t){t.remove()}))})),n.innerText.replace(/\s+/g," ").trim()}function Yn(t){return t.substr(0,1).toUpperCase()+t.substr(1)}Vn.removeSelectors=["blockquote","script"];var Kn=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.number=function(){return qt.attribute("number").call(this)},n.discussion=function(){return qt.hasOne("discussion").call(this)},n.createdAt=function(){return qt.attribute("createdAt",qt.transformDate).call(this)},n.user=function(){return qt.hasOne("user").call(this)},n.contentType=function(){return qt.attribute("contentType").call(this)},n.content=function(){return qt.attribute("content").call(this)},n.contentHtml=function(){return qt.attribute("contentHtml").call(this)},n.renderFailed=function(){return qt.attribute("renderFailed").call(this)},n.contentPlain=function(){return qn("contentHtml",(function(t){return"string"==typeof t?Vn(t):t})).call(this)},n.editedAt=function(){return qt.attribute("editedAt",qt.transformDate).call(this)},n.editedUser=function(){return qt.hasOne("editedUser").call(this)},n.isEdited=function(){return qn("editedAt",(function(t){return!!t})).call(this)},n.hiddenAt=function(){return qt.attribute("hiddenAt",qt.transformDate).call(this)},n.hiddenUser=function(){return qt.hasOne("hiddenUser").call(this)},n.isHidden=function(){return qn("hiddenAt",(function(t){return!!t})).call(this)},n.canEdit=function(){return qt.attribute("canEdit").call(this)},n.canHide=function(){return qt.attribute("canHide").call(this)},n.canDelete=function(){return qt.attribute("canDelete").call(this)},e}(qt),Xn=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.contentType=function(){return qt.attribute("contentType").call(this)},n.content=function(){return qt.attribute("content").call(this)},n.createdAt=function(){return qt.attribute("createdAt",qt.transformDate).call(this)},n.isRead=function(){return qt.attribute("isRead").call(this)},n.user=function(){return qt.hasOne("user").call(this)},n.fromUser=function(){return qt.hasOne("fromUser").call(this)},n.subject=function(){return qt.hasOne("subject").call(this)},e}(qt),Jn=function(){function t(){this.modal=null,this.closeTimeout=void 0}var e=t.prototype;return e.show=function(t,e){if(void 0===e&&(e={}),!(t.prototype instanceof ot)){var n="The ModalManager can only show Modals.";throw console.error(n),new Error(n)}this.closeTimeout&&clearTimeout(this.closeTimeout),this.modal={componentClass:t,attrs:e},m.redraw.sync()},e.close=function(){var t=this;this.modal&&(this.closeTimeout=setTimeout((function(){t.modal=null,m.redraw()})))},e.isModalOpen=function(){return!!this.modal},t}(),Qn=function(){function t(){this.activeAlerts={},this.alertId=0}var e=t.prototype;return e.getActiveAlerts=function(){return this.activeAlerts},e.show=function(t,e,n){var r,i=it,o={};return 1==arguments.length?r=t:2==arguments.length?(o=t,r=e):3==arguments.length&&(i=t,o=e,r=n),this.activeAlerts[++this.alertId]={children:r,attrs:o,componentClass:i},m.redraw(),this.alertId},e.dismiss=function(t){t&&t in this.activeAlerts&&(delete this.activeAlerts[t],m.redraw())},e.clear=function(){this.activeAlerts={},m.redraw()},t}(),Zn=["background","deserialize","extract","modifyText"];function tr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var er=function(){function t(){this.forum=void 0,this.routes={},this.initializers=new D,this.session=void 0,this.translator=new En,this.store=new Tn({forums:Rn,users:Un,discussions:zn,posts:Kn,groups:Ut,notifications:Xn}),this.cache={},this.booted=!1,this.current=new ft(null),this.previous=new ft(null),this.modal=new Jn,this.alerts=new Qn,this.drawer=void 0,this.data=void 0,this._title="",this._titleCount=0,this.requestErrorAlert=null,this.initialRoute=void 0}var e=t.prototype;return e.load=function(t){this.data=t,this.translator.setLocale(t.locale)},e.boot=function(){var t,e=this;this.initializers.toArray().forEach((function(t){return t(e)})),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums","1"),this.session=new Sn(null!=(t=this.store.getById("users",String(this.data.session.userId)))?t:null,this.data.session.csrfToken),this.mount(),this.initialRoute=window.location.href},e.bootExtensions=function(t){var e=this;Object.keys(t).forEach((function(n){var r=t[n];if(r.extend)for(var i,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return tr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.extend.flat(1/0));!(i=o()).done;)i.value.extend(e,{name:n,exports:r})}))},e.mount=function(t){var e=this;void 0===t&&(t=""),m.mount(document.getElementById("modal"),{view:function(){return qe.component({state:e.modal})}}),m.mount(document.getElementById("alerts"),{view:function(){return Ue.component({state:e.alerts})}}),this.drawer=new Cn,m.route(document.getElementById("content"),t+"/",kn(this.routes,t));var n=document.getElementById("app"),r=document.querySelector(".App-header"),i=new Dn((function(t){var e=n.getBoundingClientRect().top+document.body.scrollTop;n.classList.toggle("affix",t>=e),n.classList.toggle("scrolled",t>e),r.classList.toggle("navbar-fixed-top",t>=e)}));i.start(),i.update(),document.body.classList.add("ontouchstart"in window?"touch":"no-touch"),Ln()},e.preloadedApiDocument=function(){if(this.data.apiDocument&&window.location.href===this.initialRoute){var t=(Nn(this.data.apiDocument),this.store.pushPayload(this.data.apiDocument));return this.data.apiDocument=null,t}return null},e.screen=function(){return getComputedStyle(document.documentElement).getPropertyValue("--flarum-screen")},e.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){var t=this.titleCount?"("+this.titleCount+") ":"",e=this.title&&m.route.get()!==this.forum.attribute("basePath")+"/"?this.title+" - ":"",n=this.forum.attribute("title");document.title=t+e+n},e.transformRequestOptions=function(t){var e=this,n=T({},t),r=n.background,i=n.deserialize,o=n.extract,a=n.modifyText,s=H(n,Zn),l=a||o,u=T({background:null==r||r,deserialize:null!=i?i:function(t){return t}},s);if($n(u,"config",(function(t,n){n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),u.method&&!["GET","POST"].includes(u.method)){var c=u.method;$n(u,"config",(function(t,e){e.setRequestHeader("X-HTTP-Method-Override",c)})),u.method="POST"}return u.extract=function(t){var e;e=l?l(t.responseText):t.responseText;var n=t.status;if(n<200||n>299)throw new An(n,""+e,u,t);if(t.getResponseHeader){var r=t.getResponseHeader("X-CSRF-Token");r&&(b.session.csrfToken=r)}try{return""===e?null:JSON.parse(e)}catch(n){throw new An(500,""+e,u,t)}},u},e.request=function(t){var e=this,n=this.transformRequestOptions(t);return this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),m.request(n).catch((function(n){return e.requestErrorCatch(n,t.errorHandler)}))},e.requestErrorCatch=function(t,e){var n,r,i,o,a=null!=(n=null==(r=t.response)||null==(i=r.errors)?void 0:i.map((function(t){var e;return decodeURI(null!=(e=t.detail)?e:"")})))?n:[];switch(t.status){case 422:o=a.map((function(t){return[t,m("br",null)]})).flat().slice(0,-1);break;case 401:case 403:o=b.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:o=b.translator.trans("core.lib.error.not_found_message");break;case 413:o=b.translator.trans("core.lib.error.payload_too_large_message");break;case 429:o=b.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:o=b.translator.trans("core.lib.error.generic_message")}var s=b.forum.attribute("debug");return t.alert={type:"error",content:o,controls:s&&[m(V,{className:"Button Button--link",onclick:this.showDebug.bind(this,t,a)},b.translator.trans("core.lib.debug_button"))]},e?e(t):this.requestErrorDefaultHandler(t,s,a),Promise.reject(t)},e.requestErrorDefaultHandler=function(t,e,n){if(!(t instanceof An))throw t;if(e&&t.xhr){var r,i=t.options,o=i.method,a=i.url,s=t.xhr.status,l=void 0===s?"":s;console.group(o+" "+a+" "+l),(r=console).error.apply(r,n||[t]),console.groupEnd()}t.alert&&(this.requestErrorAlert=this.alerts.show(t.alert,t.alert.content))},e.showDebug=function(t,e){null!==this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),this.modal.show(ze,{error:t,formattedError:e})},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var r=n.path.replace(/:([^\/]+)/g,(function(t,n){return""+Y(e,n)}));for(var i in e)e.hasOwnProperty(i)&&!e[i]&&delete e[i];var o=m.buildQueryString(e);return(""===m.route.prefix?this.forum.attribute("basePath"):"")+r+(o?"?"+o:"")},k(t,[{key:"title",get:function(){return this._title},set:function(t){this._title=t}},{key:"titleCount",get:function(){return this._titleCount},set:function(t){this._titleCount=t}}]),t}(),nr=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.view=function(){var t=b.history,e=b.pane;return m("div",{className:"Navigation ButtonGroup "+(this.attrs.className||""),onmouseenter:e&&e.show.bind(e),onmouseleave:e&&e.onmouseleave.bind(e)},t.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.getBackButton=function(){var t=b.history,e=t.getPrevious()||{};return J.component({className:"Button Navigation-back Button--icon",href:t.backUrl(),icon:"fas fa-chevron-left","aria-label":e.title,onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),t.back())}})},n.getPaneButton=function(){var t=b.pane;return t&&t.active?V.component({className:"Button Button--icon Navigation-pin"+(t.pinned?" active":""),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):""},n.getDrawerButton=function(){if(!this.attrs.drawer)return"";var t=b.drawer,e=b.session.user;return V.component({className:"Button Button--icon Navigation-drawer"+(e&&e.newNotificationCount()?" new":""),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars","aria-label":b.translator.trans("core.lib.nav.drawer_button")})},e}(S),rr=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.getButtonContent=function(e){var n=t.prototype.getButtonContent.call(this,e),r=ur.data.extensions[this.attrs.extensionId],i=this.statusItems(r.id).toArray();return n.unshift(m("span",{className:"ExtensionListItem-icon ExtensionIcon",style:r.icon},r.icon?q(r.icon.name):"")),n.push(i),n},n.statusItems=function(t){var e=new D;return e.add("enabled",m("span",{class:"ExtensionListItem-Dot "+(lt(t)?"enabled":"disabled")})),e},e}(J),ir=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.query=xt("")},n.view=function(){return m(Kt,{className:"AdminNav App-titleControl AdminNav-Main",buttonClassName:"Button"},this.items().toArray().concat(this.extensionItems().toArray()))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.scrollToActive()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.scrollToActive()},n.scrollToActive=function(){var t=$(".Dropdown-menu").children(".active"),e=$("#admin-navigation"),n=ur.previous.type?250:0;t.length>0&&(t[0].offsetTop>e.scrollTop()+e.outerHeight()||t[0].offsetTop+t[0].offsetHeight<e.scrollTop())&&e.animate({scrollTop:t[0].offsetTop-e.height()/2},n)},n.items=function(){var t=new D;return t.add("category-core",m("h4",{className:"ExtensionListTitle"},ur.translator.trans("core.admin.nav.categories.core"))),t.add("dashboard",m(J,{href:ur.route("dashboard"),icon:"far fa-chart-bar",title:ur.translator.trans("core.admin.nav.dashboard_title")},ur.translator.trans("core.admin.nav.dashboard_button"))),t.add("basics",m(J,{href:ur.route("basics"),icon:"fas fa-pencil-alt",title:ur.translator.trans("core.admin.nav.basics_title")},ur.translator.trans("core.admin.nav.basics_button"))),t.add("mail",m(J,{href:ur.route("mail"),icon:"fas fa-envelope",title:ur.translator.trans("core.admin.nav.email_title")},ur.translator.trans("core.admin.nav.email_button"))),t.add("permissions",m(J,{href:ur.route("permissions"),icon:"fas fa-key",title:ur.translator.trans("core.admin.nav.permissions_title")},ur.translator.trans("core.admin.nav.permissions_button"))),t.add("appearance",m(J,{href:ur.route("appearance"),icon:"fas fa-paint-brush",title:ur.translator.trans("core.admin.nav.appearance_title")},ur.translator.trans("core.admin.nav.appearance_button"))),t.add("userList",m(J,{href:ur.route("users"),icon:"fas fa-users",title:ur.translator.trans("core.admin.nav.userlist_title")},ur.translator.trans("core.admin.nav.userlist_button"))),t.add("search",m("div",{className:"Search-input"},m("input",{className:"FormControl SearchBar",bidi:this.query,type:"search",placeholder:ur.translator.trans("core.admin.nav.search_placeholder")}))),t},n.extensionItems=function(){var t=this,e=new D,n=ut(),r=ur.extensionCategories;return Object.keys(n).map((function(i){t.query()||e.add("category-"+i,m("h4",{className:"ExtensionListTitle"},ur.translator.trans("core.admin.nav.categories."+i)),r[i]),n[i].map((function(n){var o=t.query().toUpperCase(),a=n.extra["flarum-extension"].title||"",s=n.description||"";(!o||a.toUpperCase().includes(o)||s.toUpperCase().includes(o))&&e.add("extension-"+n.id,m(rr,{href:ur.route("extension",{id:n.id}),extensionId:n.id,className:"ExtensionNavButton",title:s},a),r[i])}))})),e},e}(S),or="You must select an active extension via `.for()` before using extensionData.",ar=function(){function t(){this.state={currentExtension:null,data:{}}}var e=t.prototype;return e.for=function(t){return this.state.currentExtension=t,this.state.data[t]=this.state.data[t]||{},this},e.registerSetting=function(t,e){if(void 0===e&&(e=0),null===this.state.currentExtension)throw new Error(or);var n=t;n instanceof Function&&(n.setting=Math.random().toString(36));var r=this.state.data[this.state.currentExtension].settings||new D;return r.add(n.setting,n,e),this.state.data[this.state.currentExtension].settings=r,this},e.registerPermission=function(t,e,n){var r;if(void 0===n&&(n=0),null===this.state.currentExtension)throw new Error(or);var i=this.state.data[this.state.currentExtension].permissions||{},o=i[e]||new D;return o.add(t.permission,t,n),this.state.data[this.state.currentExtension].permissions=T({},i,((r={})[e]=o,r)),this},e.registerPage=function(t){if(null===this.state.currentExtension)throw new Error(or);return this.state.data[this.state.currentExtension].page=t,this},e.getSettings=function(t){var e,n;return null==(e=this.state.data[t])||null==(n=e.settings)?void 0:n.toArray()},e.getAllExtensionPermissions=function(t){var e=this,n=new D;return Object.keys(this.state.data).map((function(r){var i,o,a=null==(i=e.state.data[r])||null==(o=i.permissions)?void 0:o[t];e.extensionHasPermissions(r)&&void 0!==a&&n.merge(a)})),n},e.getExtensionPermissions=function(t,e){var n,r,i=null==(n=this.state.data[t])||null==(r=n.permissions)?void 0:r[e];return this.extensionHasPermissions(t)&&null!=i?i:new D},e.extensionHasPermissions=function(t){var e;return void 0!==(null==(e=this.state.data[t])?void 0:e.permissions)},e.getPage=function(t){var e;return null==(e=this.state.data[t])?void 0:e.page},t}(),sr=function(t){function e(){var e;return(e=t.call(this)||this).extensionData=new ar,e.extensionCategories={feature:30,theme:20,language:10},e.history={canGoBack:function(){return!0},getPrevious:function(){},backUrl:function(){return e.forum.attribute("baseUrl")},back:function(){window.location.assign(this.backUrl())}},e.data=void 0,we(x(e)),e}N(e,t);var n=e.prototype;return n.mount=function(){document.location.hash||(document.location.hash="#/"),m.route.prefix="#",t.prototype.mount.call(this),m.mount(document.getElementById("app-navigation"),{view:function(){return nr.component({className:"App-backControl",drawer:!0})}}),m.mount(document.getElementById("header-navigation"),nr),m.mount(document.getElementById("header-primary"),B),m.mount(document.getElementById("header-secondary"),nt),m.mount(document.getElementById("admin-navigation"),ir)},n.getRequiredPermissions=function(t){var e=[];return"startDiscussion"!==t&&0!==t.indexOf("discussion.")||e.push("viewForum"),"discussion.delete"===t&&e.push("discussion.hide"),"discussion.deletePosts"===t&&e.push("discussion.hidePosts"),"user.editGroups"===t&&e.push("viewHiddenGroups"),e},e}(er),lr=new sr;window.app=lr;const ur=lr;var cr=n(887),dr=n.n(cr),fr=null;function hr(t,e){var n=e.text,r=e.selectionStart,i=e.selectionEnd,o=t.selectionStart,a=t.value.slice(0,o),s=t.value.slice(t.selectionEnd);if(null===fr||!0===fr){t.contentEditable="true";try{fr=document.execCommand("insertText",!1,n)}catch(t){fr=!1}t.contentEditable="false"}fr&&!t.value.slice(0,t.selectionStart).endsWith(n)&&(fr=!1),fr||(t.value=a+n+s,t.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))),null!=r&&null!=i?t.setSelectionRange(r,i):t.setSelectionRange(o,t.selectionEnd)}var pr=function(){function t(t,e){this.el=void 0,this.el=document.createElement("textarea"),this.build(t,e)}var e=t.prototype;return e.build=function(t,e){var n=this;this.el.className=e.classNames.join(" "),this.el.disabled=e.disabled,this.el.placeholder=e.placeholder,this.el.value=e.value;var r=function(t){e.inputListeners.forEach((function(t){t()})),t.redraw=!1};this.el.oninput=function(t){e.oninput(n.el.value),r(t)},this.el.onclick=r,this.el.onkeyup=r,this.el.addEventListener("keydown",(function(t){n.keyHandlers(e).toArray().forEach((function(e){return e(t)}))})),t.append(this.el)},e.keyHandlers=function(t){var e=new D;return e.add("submit",(function(e){(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&t.onsubmit()})),e},e.moveCursorTo=function(t){this.setSelectionRange(t,t)},e.getSelectionRange=function(){return[this.el.selectionStart,this.el.selectionEnd]},e.getLastNChars=function(t){return this.el.value.slice(Math.max(0,this.el.selectionStart-t),this.el.selectionStart)},e.insertAtCursor=function(t){this.insertAt(this.el.selectionStart,t)},e.insertAt=function(t,e){this.insertBetween(t,t,e)},e.insertBetween=function(t,e,n){this.setSelectionRange(t,e);var r=t+n.length;hr(this.el,{text:n,selectionStart:r,selectionEnd:r})},e.replaceBeforeCursor=function(t,e){this.insertBetween(t,this.el.selectionStart,e)},e.setSelectionRange=function(t,e){this.el.setSelectionRange(t,e),this.focus()},e.getCaretCoordinates=function(t){var e=dr()(this.el,t);return{top:e.top-this.el.scrollTop,left:e.left}},e.disabled=function(t){this.el.disabled=t},e.focus=function(){this.el.focus()},e.destroy=function(){this.el.remove()},t}(),mr="The `evented` util is deprecated and will be removed in Flarum 2.0. For more info, please see https://github.com/flarum/core/issues/2547";const vr={handlers:null,getHandlers:function(t){return F(mr),this.handlers=this.handlers||{},this.handlers[t]=this.handlers[t]||[],this.handlers[t]},trigger:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];F(mr),this.getHandlers(t).forEach((function(t){return t.apply(e,r)}))},on:function(t,e){F(mr),this.getHandlers(t).push(e)},one:function(t,e){F(mr),this.getHandlers(t).push((function n(){e.apply(this,arguments),this.off(t,n)}))},off:function(t,e){F(mr);var n=this.getHandlers(t),r=n.indexOf(e);-1!==r&&n.splice(r,1)}};var gr={prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,trimFirst:!1};function yr(t){return t.trim().split("\n").length>1}function br(t,e){return Array(e+1).join(t)}function wr(t,e,n){for(var r=e,i=n?/\n/:/\s/;t[r]&&!t[r].match(i);)r++;return r}function xr(t){var e,n,r=t.value.slice(0,t.selectionStart),i=t.value.slice(t.selectionEnd),o=r.match(/\n*$/),a=i.match(/^\n*/),s=o?o[0].length:0,l=a?a[0].length:0;return r.match(/\S/)&&s<2&&(e=br("\n",2-s)),i.match(/\S/)&&l<2&&(n=br("\n",2-l)),null==e&&(e=""),null==n&&(n=""),{newlinesToAppend:e,newlinesToPrepend:n}}var Er=/[.*+?^${}()|[\]\\]/g;function Nr(t,e,n,r){var i,o=!1,a=0;function s(){i&&clearTimeout(i)}function l(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];var d=this,f=Date.now()-a;function h(){a=Date.now(),n.apply(d,u)}function p(){i=void 0}o||(r&&!i&&h(),s(),void 0===r&&f>t?h():!0!==e&&(i=setTimeout(r?p:h,void 0===r?t-f:t)))}return"boolean"!=typeof e&&(r=n,n=e,e=void 0),l.cancel=function(){s(),o=!0},l}function Tr(t,e,n){return void 0===n?Nr(t,e,!1):Nr(t,n,!1!==e)}var Sr,Cr=function(){function t(){this.callbacks=void 0,this.data=void 0;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=e,this.data={},this.needsRebuild()}var e=t.prototype;return e.needsRebuild=function(){var t=this,e=!1;return this.callbacks.forEach((function(n,r){var i=n();i!==t.data[r]&&(t.data[r]=i,e=!0)})),e},e.check=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=this.callbacks.concat(e),this.needsRebuild()},e.invalidate=function(){this.data={}},t}();function kr(t,e){var n,r,i=new RegExp(String.raw(Sr||(n=["(w+/)?(","|common)/"],(r=["(\\w+\\/)?(","|common)\\/"])||(r=n.slice(0)),n.raw=r,Sr=n),e)),o=/(\.js|\.tsx?)$/;return new Proxy(t,{get:function(t,e){return t[e]||t[e.replace(i,"$1").replace(o,"")]}})}var Ar=function(t){function e(){return t.apply(this,arguments)||this}N(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className+=" Dropdown--split",e.menuClassName+=" Dropdown-menu--right"};var n=e.prototype;return n.getButton=function(t){var e=this.getFirstChild(t),n=Object.assign({},e.attrs);return n.className=(n.className||"")+" SplitDropdown-button Button "+this.attrs.buttonClassName,[V.component(n,e.children),m("button",{className:"Dropdown-toggle Button Button--icon "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown"},q(this.attrs.icon,{className:"Button-icon"}),q("fas fa-caret-down",{className:"Button-caret"}))]},n.getFirstChild=function(t){for(var e=t;e instanceof Array;)e=e[0];return e},e}(tt),_r=function(t){function e(){return t.apply(this,arguments)||this}N(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.value=this.attrs.value||"",this.disabled=!!this.attrs.disabled},n.view=function(){return m("div",{className:"TextEditor"},m("div",{className:"TextEditor-editorContainer"}),m("ul",{className:"TextEditor-controls Composer-footer"},R(this.controlItems().toArray()),m("li",{className:"TextEditor-toolbar"},this.toolbarItems().toArray())))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.attrs.composer.editor=this.buildEditor(this.$(".TextEditor-editorContainer")[0])},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=!!this.attrs.disabled;this.disabled!==n&&(this.disabled=n,this.attrs.composer.editor.disabled(n))},n.buildEditorParams=function(){var t=this;return{classNames:["FormControl","Composer-flexible","TextEditor-editor"],disabled:this.disabled,placeholder:this.attrs.placeholder||"",value:this.value,oninput:this.oninput.bind(this),inputListeners:[],onsubmit:function(){t.onsubmit(),m.redraw()}}},n.buildEditor=function(t){return new pr(t,this.buildEditorParams())},n.controlItems=function(){var t=new D;return t.add("submit",V.component({icon:"fas fa-paper-plane",className:"Button Button--primary",itemClassName:"App-primaryControl",onclick:this.onsubmit.bind(this)},this.attrs.submitLabel)),this.attrs.preview&&t.add("preview",m(Rt,{text:b.translator.trans("core.forum.composer.preview_tooltip")},m(V,{icon:"far fa-eye",className:"Button Button--icon",onclick:this.attrs.preview}))),t},n.toolbarItems=function(){return new D},n.oninput=function(t){this.value=t,this.attrs.onchange(this.value)},n.onsubmit=function(){this.attrs.onsubmit(this.value)},e}(S),Dr=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return m(Rt,{text:this.attrs.tooltipText||U(e.children)},n)},e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=e.className||"Button Button--icon Button--link",e.tooltipText=e.title},e}(V);const Or={extend:i,Session:Sn,Store:Tn,"utils/BasicEditorDriver":pr,"utils/evented":vr,"utils/liveHumanTimes":Ln,"utils/ItemList":D,"utils/mixin":function(t){for(var e=function(t){function e(){return t.apply(this,arguments)||this}return N(e,t),e}(t),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.forEach((function(t){Object.assign(e.prototype,t)})),e},"utils/humanTime":In,"utils/computed":qn,"utils/insertText":hr,"utils/styleSelectedText":function(t,e){t.focus(),e=Object.assign({},gr,e);var n,r=t.value.slice(t.selectionStart,t.selectionEnd);n=e.orderedList?function(t){var e,n,r,i,o=/^\d+\.\s+/,a=t.selectionStart===t.selectionEnd,s=t.value.slice(t.selectionStart,t.selectionEnd),l=s,u=s.split("\n");if(a){var c=t.value.slice(0,t.selectionStart).split(/\n/);r=t.selectionStart-c[c.length-1].length,i=wr(t.value,t.selectionStart,!0),l=t.value.slice(r,i)}var d=l.split("\n");if(d.every((function(t){return o.test(t)}))){if(s=(u=d.map((function(t){return t.replace(o,"")}))).join("\n"),a&&r&&i){var f=d[0].length-u[0].length;n=e=t.selectionStart-f,t.selectionStart=r,t.selectionEnd=i}}else{s=(u=function(t){var e,n,r,i=[];for(r=e=0,n=t.length;e<n;r=++e){var o=t[r];i.push(r+1+". "+o)}return i}(u)).join("\n");var h=xr(t),p=h.newlinesToAppend,m=h.newlinesToPrepend;e=(n=t.selectionStart+p.length)+s.length,a&&(n=e),s=p+s+m}return{text:s,selectionStart:n,selectionEnd:e}}(t):e.multiline&&yr(r)?function(t,e){var n=e.prefix,r=e.suffix,i=e.surroundWithNewlines,o=t.value.slice(t.selectionStart,t.selectionEnd),a=t.selectionStart,s=t.selectionEnd,l=o.split("\n");if(l.every((function(t){return t.startsWith(n)&&t.endsWith(r)})))s=a+(o=l.map((function(t){return t.slice(n.length,t.length-r.length)})).join("\n")).length;else if(o=l.map((function(t){return n+t+r})).join("\n"),i){var u=xr(t),c=u.newlinesToAppend,d=u.newlinesToPrepend;s=(a+=c.length)+o.length,o=c+o+d}return{text:o,selectionStart:a,selectionEnd:s}}(t,e):function(t,e){var n=e.prefix,r=e.suffix,i=e.blockPrefix,o=e.blockSuffix,a=e.replaceNext,s=e.prefixSpace,l=e.scanFor,u=e.surroundWithNewlines,c=t.selectionStart,d=t.selectionEnd,f=t.value.slice(t.selectionStart,t.selectionEnd),h=yr(f)&&i.length>0?i+"\n":n,p=yr(f)&&o.length>0?"\n"+o:r;if(s){var m=t.value[t.selectionStart-1];0===t.selectionStart||null==m||m.match(/\s/)||(h=" "+h)}f=function(t,e,n,r){if(void 0===r&&(r=!1),t.selectionStart===t.selectionEnd)t.selectionStart=function(t,e){for(var n=e;t[n]&&null!=t[n-1]&&!t[n-1].match(/\s/);)n--;return n}(t.value,t.selectionStart),t.selectionEnd=wr(t.value,t.selectionEnd,r);else{var i=t.selectionStart-e.length,o=t.selectionEnd+n.length,a=t.value.slice(i,t.selectionStart)===e,s=t.value.slice(t.selectionEnd,o)===n;a&&s&&(t.selectionStart=i,t.selectionEnd=o)}return t.value.slice(t.selectionStart,t.selectionEnd)}(t,h,p,e.multiline);var v=t.selectionStart,g=t.selectionEnd,y=a.length>0&&p.indexOf(a)>-1&&f.length>0;if(u){var b=xr(t);h=b.newlinesToAppend+n,p+=b.newlinesToPrepend}if(f.startsWith(h)&&f.endsWith(p)){var w=f.slice(h.length,f.length-p.length);if(c===d){var x=c-h.length;x=Math.max(x,v),v=g=x=Math.min(x,v+w.length)}else g=v+w.length;return{text:w,selectionStart:v,selectionEnd:g}}if(y)return l.length>0&&f.match(l)?{text:h+(p=p.replace(a,f)),selectionStart:v=g=v+h.length,selectionEnd:g}:{text:h+f+p,selectionStart:v=v+h.length+f.length+p.indexOf(a),selectionEnd:g=v+a.length};var E=h+f+p;v=c+h.length,g=d+h.length;var N=f.match(/^\s*|\s*$/g);if(e.trimFirst&&N){var T=N[0]||"",S=N[1]||"";E=T+h+f.trim()+p+S,v+=T.length,g-=S.length}return{text:E,selectionStart:v,selectionEnd:g}}(t,e),hr(t,n)},"utils/Drawer":Cn,"utils/anchorScroll":function(t,e){var n=$(window),r=$(t).offset().top-n.scrollTop();e(),n.scrollTop($(t).offset().top-r)},"utils/RequestError":An,"utils/abbreviateNumber":function(t){return t>=1e6?Math.floor(t/1e6)+b.translator.trans("core.lib.number_suffix.mega_text"):t>=1e3?(t/1e3).toFixed(1)+b.translator.trans("core.lib.number_suffix.kilo_text"):t.toString()},"utils/string":o,"utils/SubtreeRetainer":Cr,"utils/escapeRegExp":function(t){return t.replace(Er,"\\$&")},"utils/extract":Y,"utils/ScrollListener":Dn,"utils/stringToColor":Fn,"utils/Stream":xt,"utils/subclassOf":dt,"utils/setRouteWithForcedRefresh":function(t,e,n){void 0===e&&(e=null),void 0===n&&(n={});var r=T({},n);r.state=r.state||{},r.state.key=Date.now(),m.route.set(t,e,r)},"utils/patchMithril":h,"utils/proxifyCompat":kr,"utils/classList":j,"utils/extractText":U,"utils/formatNumber":function(t,e){return void 0===e&&(e=b.data.locale),new Intl.NumberFormat(e).format(t)},"utils/mapRoutes":kn,"utils/withAttr":pt,"utils/throttleDebounce":a,"utils/isObject":A,"utils/focusTrap":e,"models/Notification":Xn,"models/User":Un,"models/Post":Kn,"models/Discussion":zn,"models/Group":Ut,"models/Forum":Rn,Component:S,Fragment:function(){function t(){this.element=void 0}var e=t.prototype;return e.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),e.render=function(){var t=this,e=this.view();e.attrs=e.attrs||{};var n=e.attrs.oncreate;return e.attrs.oncreate=function(e){t.element=e.dom,n&&n.apply(t,[e])},e},t}(),Translator:En,"components/AlertManager":Ue,"components/Page":ht,"components/Switch":vt,"components/Badge":Ht,"components/LoadingIndicator":W,"components/Placeholder":pe,"components/Separator":P,"components/Dropdown":tt,"components/SplitDropdown":Ar,"components/RequestErrorModal":ze,"components/FieldSet":Lt,"components/Select":bt,"components/Navigation":nr,"components/Alert":it,"components/Link":X,"components/LinkButton":J,"components/Checkbox":mt,"components/ColorPreviewInput":Ct,"components/SelectDropdown":Kt,"components/ModalManager":qe,"components/Button":V,"components/Modal":ot,"components/GroupBadge":Ft,"components/TextEditor":_r,"components/TextEditorButton":Dr,"components/Tooltip":Rt,"components/EditUserModal":ce,Model:qt,Application:er,"helpers/fullTime":function(t){var e=Pn()(t),n=e.format(),r=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},r)},"helpers/avatar":Q,"helpers/icon":q,"helpers/humanTime":function(t){var e=Pn()(t),n=e.format(),r=e.format("LLLL"),i=In(t);return m("time",{pubdate:!0,datetime:n,title:r,"data-humantime":!0},i)},"helpers/punctuateSeries":fe,"helpers/highlight":function(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(e,"gi"),i=t,o=0;return n&&(e&&(o=Math.max(0,t.search(r)-n/2)),i=Wn(i,n,o)),i=$("<div/>").text(i).html(),e&&(i=i.replace(r,"<mark>$&</mark>")),m.trust(i)},"helpers/username":Z,"helpers/userOnline":function(t){return t.lastSeenAt()&&t.isOnline()?m("span",{className:"UserOnline"},q("fas fa-circle")):null},"helpers/listItems":R,"resolvers/DefaultResolver":ye,"states/PaginatedListState":function(){function t(t,e,n){void 0===t&&(t={}),void 0===e&&(e=1),void 0===n&&(n=20),this.location=void 0,this.pageSize=void 0,this.pages=[],this.params={},this.initialLoading=!1,this.loadingPrev=!1,this.loadingNext=!1,this.params=t,this.location={page:e},this.pageSize=n}var e=t.prototype;return e.clear=function(){this.pages=[],m.redraw()},e.loadPrev=function(){var t=this;if(this.loadingPrev||1===this.getLocation().page)return Promise.resolve();this.loadingPrev=!0;var e=this.getPrevPageNumber();return this.loadPage(e).then(this.parseResults.bind(this,e)).finally((function(){return t.loadingPrev=!1}))},e.loadNext=function(){var t=this;if(this.loadingNext)return Promise.resolve();this.loadingNext=!0;var e=this.getNextPageNumber();return this.loadPage(e).then(this.parseResults.bind(this,e)).finally((function(){return t.loadingNext=!1}))},e.parseResults=function(t,e){var n,r=Number(t),i=null==(n=e.payload)?void 0:n.links,o={number:r,items:e,hasNext:!(null==i||!i.next),hasPrev:!(null==i||!i.prev)};this.isEmpty()||r>this.getNextPageNumber()-1?this.pages.push(o):this.pages.unshift(o),this.location={page:r},m.redraw()},e.loadPage=function(t){void 0===t&&(t=1);var e=this.requestParams(),n=Array.isArray(e.include)?e.include.join(","):e.include,r=T({},e,{page:T({},e.page,{offset:this.pageSize*(t-1)}),include:n});return b.store.find(this.type,r)},e.requestParams=function(){return this.params},e.refreshParams=function(t,e){return this.isEmpty()||this.paramsChanged(t)?(this.params=t,this.refresh(e)):Promise.resolve()},e.refresh=function(t){var e=this;return void 0===t&&(t=1),this.initialLoading=!0,this.loadingPrev=!1,this.loadingNext=!1,this.clear(),this.location={page:t},this.loadPage().then((function(t){e.pages=[],e.parseResults(e.location.page,t)})).finally((function(){return e.initialLoading=!1}))},e.getPages=function(){return this.pages},e.getLocation=function(){return this.location},e.isLoading=function(){return this.initialLoading||this.loadingNext||this.loadingPrev},e.isInitialLoading=function(){return this.initialLoading},e.isLoadingPrev=function(){return this.loadingPrev},e.isLoadingNext=function(){return this.loadingNext},e.hasItems=function(){return!!this.getAllItems().length},e.isEmpty=function(){return!this.isInitialLoading()&&!this.hasItems()},e.hasPrev=function(){var t;return!(null==(t=this.pages[0])||!t.hasPrev)},e.hasNext=function(){var t;return!(null==(t=this.pages[this.pages.length-1])||!t.hasNext)},e.getParams=function(){return this.params},e.getNextPageNumber=function(){var t,e=null==(t=this.pages[this.pages.length-1])?void 0:t.number;return e&&!isNaN(e)?e+1:this.location.page},e.getPrevPageNumber=function(){var t,e=null==(t=this.pages[0])?void 0:t.number;return e&&!isNaN(e)?Math.max(e-1,1):this.location.page},e.paramsChanged=function(t){var e=this;return Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))},e.getAllItems=function(){return this.getPages().map((function(t){return t.items})).flat()},t}()},Pr=Object.assign(Or,{"utils/saveSettings":Et,"utils/ExtensionData":ar,"utils/isExtensionEnabled":lt,"utils/getCategorizedExtensions":ut,"utils/generateElementId":Tt,"components/SettingDropdown":Xt,"components/EditCustomFooterModal":ne,"components/SessionDropdown":et,"components/HeaderPrimary":B,"components/AdminPage":It,"components/AppearancePage":ie,"components/StatusWidget":st,"components/ExtensionsWidget":ct,"components/HeaderSecondary":nt,"components/SettingsModal":Zt,"components/DashboardWidget":rt,"components/ExtensionPage":ge,"components/ExtensionLinkButton":rr,"components/PermissionGrid":Jt,"components/ExtensionPermissionGrid":he,"components/MailPage":oe,"components/UploadImageButton":re,"components/LoadingModal":at,"components/DashboardPage":jt,"components/BasicsPage":$t,"components/UserListPage":de,"components/EditCustomHeaderModal":ee,"components/PermissionsPage":Qt,"components/PermissionDropdown":Vt,"components/AdminNav":ir,"components/AdminHeader":Nt,"components/EditCustomCssModal":te,"components/EditGroupModal":zt,routes:we,AdminApplication:sr});Pr.app=ur;var Ir=kr(Pr,"admin")})(),flarum.core=r})();
//# sourceMappingURL=admin.js.map