PageSourceSearch

https://greatsoftwarecompany.com/discuss/public/assets/forum.js?v=88d45400

js greatsoftwarecompany.com collected 2026-10-08 21:03:02 UTC 734,119 bytes, 461 lines download raw bytes

1/*! For license information please see forum.js.LICENSE.txt */
2(()=>{var t={1859:()=>{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)})},9043:()=>{!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(),s=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+s<=t-r)&&"bottom";var a=null==this.affixed,u=a?i:o.top;return null!=n&&i<=n?"top":null!=r&&u+(a?s: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,s=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 a=this.getState(s,n,i,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),l=t.Event(u+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-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)},6199:()=>{!function(t){"use strict";var e='[data-toggle="dropdown"]',n=function(e){t(e).on("click.bs.dropdown",this.toggle)};function r(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?t(document).find(n):null;return r&&r.length?r:e.parent()}function i(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),i=r(e),o={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(i[0],n.target)||(i.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(e.attr("aria-expanded","false"),i.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var o=r(n),s=o.hasClass("open");if(i(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(o.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},n.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var o=r(i),s=o.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&o.find(e).trigger("focus"),i.trigger("click");var a=o.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var u=a.index(n.target);38==n.which&&u>0&&u--,40==n.which&&u<a.length-1&&u++,~u||(u=0),a.eq(u).trigger("focus")}}}};var o=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var r=t(this),i=r.data("bs.dropdown");
2i||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)},7865:()=>{!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 s=e.nodeName.toLowerCase();if(-1!==t.inArray(s,o))return-1===t.inArray(s,n)||Boolean(e.nodeValue.match(r)||e.nodeValue.match(i));for(var a=t(o).filter((function(t,e){return e instanceof RegExp})),u=0,l=a.length;u<l;u++)if(s.match(a[u]))return!0;return!1}function s(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 s=t.map(n,(function(t,e){return e})),a=t(i.body).find("*"),u=0,l=a.length;u<l;u++){var c=a[u],d=c.nodeName.toLowerCase();if(-1!==t.inArray(d,s))for(var h=t.map(c.attributes,(function(t){return t})),f=[].concat(n["*"]||[],n[d]||[]),p=0,m=h.length;p<m;p++)o(h[p],f)||c.removeAttribute(h[p].nodeName);else c.parentNode.removeChild(c)}return i.body.innerHTML}var a=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)};a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.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:[]}},a.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 s=i[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},a.prototype.getDefaults=function(){return a.DEFAULTS},a.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=s(n.template,n.whiteList,n.sanitizeFn)),n},a.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();
vendor: 5,522 bytes, line 2
2return this._options&&t.each(this._options,(function(t,r){n[t]!=r&&(e[t]=r)})),e},a.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)}},a.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},a.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)}},a.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 s="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,u=/\s?auto?\s?/i,l=u.test(s);l&&(s=s.replace(u,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(s).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,h=i[0].offsetHeight;if(l){var f=s,p=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>p.bottom?"top":"top"==s&&c.top-h<p.top?"bottom":"right"==s&&c.right+d>p.width?"left":"left"==s&&c.left-d<p.left?"right":s,i.removeClass(f).addClass(s)}var m=this.getCalculatedOffset(s,c,d,h);this.applyPlacement(m,s);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(a.TRANSITION_DURATION):v()}},a.prototype.applyPlacement=function(e,n){var r=this.tip(),i=r[0].offsetWidth,o=r[0].offsetHeight,s=parseInt(r.css("margin-top"),10),a=parseInt(r.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,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 u=r[0].offsetWidth,l=r[0].offsetHeight;"top"==n&&l!=o&&(e.top=e.top+o-l);var c=this.getViewportAdjustedDelta(n,e,u,l);c.left?e.left+=c.left:e.top+=c.top;var d=/top|bottom/.test(n),h=d?2*c.left-i+u:2*c.top-o+l,f=d?"offsetWidth":"offsetHeight";r.offset(e),this.replaceArrow(h,r[0][f],d)},a.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},a.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=s(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")},a.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(a.TRANSITION_DURATION):o(),this.hoverState=null,this},a.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","")},a.prototype.hasContent=function(){return this.getTitle()},a.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,s=r?{top:0,left:0}:o?null:e.offset(),a={scroll:r?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},u=r?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},i,a,u,s)},a.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}},a.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,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-s.scroll,u=e.top+o-s.scroll+r;a<s.top?i.top=s.top-a:u>s.top+s.height&&(i.top=s.top+s.height-u)}else{var l=e.left-o,c=e.left+o+n;l<s.left?i.left=s.left-l:c>
2s.right&&(i.left=s.left+s.width-c)}return i},a.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)},a.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},a.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},a.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},a.prototype.enable=function(){this.enabled=!0},a.prototype.disable=function(){this.enabled=!1},a.prototype.toggleEnabled=function(){this.enabled=!this.enabled},a.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)},a.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}))},a.prototype.sanitizeHtml=function(t){return s(t,this.options.whiteList,this.options.sanitizeFn)};var u=t.fn.tooltip;t.fn.tooltip=function(e){return this.each((function(){var n=t(this),r=n.data("bs.tooltip"),i="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||n.data("bs.tooltip",r=new a(this,i)),"string"==typeof e&&r[e]())}))},t.fn.tooltip.Constructor=a,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=u,this}}(jQuery)},6935:()=>{!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)},2898: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,s,a,u,l=new e(t),c=l.getImageData().data,d=l.getPixelCount(),h=[],f=0;d>f;f+=r)s=c[0+(o=4*f)],a=c[o+1],u=c[o+2],c[o+3]>=125&&(s>250&&a>250&&u>250||h.push([s,a,u]));var p=i.quantize(h,n),m=p?p.palette():null;return l.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*u)+(e<<u)+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,s){var a=this;a.r1=t,a.r2=e,a.g1=n,a.g2=r,a.b1=i,a.b2=o,a.histo=s}function i(){this.vboxes=new e((function(t,e){return r.naturalOrder(t.vbox.count()*t.vbox.volume(),e.vbox.count()*e.vbox.volume())}))}function o(e){var n,r,i,o,s=new Array(1<<3*u);return e.forEach((function(e){r=e[0]>>l,i=e[1]>>l,o=e[2]>>l,n=t(r,i,o),s[n]=(s[n]||0)+1})),s}function s(t,e){var r,i,o,s=1e6,a=0,u=1e6,c=0,d=1e6,h=0;return t.forEach((function(t){r=t[0]>>l,i=t[1]>>l,o=t[2]>>l,s>r?s=r:r>a&&(a=r),u>i?u=i:i>c&&(c=i),d>o?d=o:o>h&&(h=o)})),new n(s,a,u,c,d,h,e)}function a(e,n){if(n.count()){var i=n.r2-n.r1+1,o=n.g2-n.g1+1,s=n.b2-n.b1+1,a=r.max([i,o,s]);if(1==n.count())return[n.copy()];var u,l,c,d,h=0,f=[],p=[];if(a==i)for(u=n.r1;u<=n.r2;u++){for(d=0,l=n.g1;l<=n.g2;l++)for(c=n.b1;c<=n.b2;c++)d+=e[t(u,l,c)]||0;h+=d,f[u]=h}else if(a==o)for(u=n.g1;u<=n.g2;u++){for(d=0,l=n.r1;l<=n.r2;l++)for(c=n.b1;c<=n.b2;c++)d+=e[t(l,u,c)]||0;h+=d,f[u]=h}else for(u=n.b1;u<=n.b2;u++){for(d=0,l=n.r1;l<=n.r2;l++)for(c=n.g1;c<=n.g2;c++)d+=e[t(l,c,u)]||0;h+=d,f[u]=h}return f.forEach((function(t,e){p[e]=h-t})),function(t){var e,r,i,o,s,a=t+"1",l=t+"2",c=0;for(u=n[a];u<=n[l];u++)if(f[u]>h/2){for(i=n.copy(),o=n.copy(),e=u-n[a],s=(r=n[l]-u)>=e?Math.min(n[l]-1,~~(u+r/2)):Math.max(n[a],~~(u-1-e/2));!f[s];)s++;for(c=p[s];!c&&f[s-1];)c=p[--s];return i[l]=s,o[a]=i[l]+1,[i,o]}}(a==i?"r":a==o?"g":"b")}}var u=5,l=8-u;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,s,a=0;for(i=n.r1;i<=n.r2;i++)for(o=n.g1;o<=n.g2;o++)for(s=n.b1;s<=n.b2;s++)index=t(i,o,s),a+=r[index]||0;n._count=a,n._count_set=!0}return n._count},copy:function(){var t=this;return new n(t.r1,t.r2,t.g1,t.g2,t.b1,t.b2,t.histo)},avg:function(e){var n=this,r=n.histo;if(!n._avg||e){var i,o,s,a,l=0,c=1<<8-u,d=0,h=0,f=0;for(o=n.r1;o<=n.r2;o++)for(s=n.g1;s<=n.g2;s++)for(a=n.b1;a<=n.b2;a++)l+=i=r[t(o,s,a)]||0,d+=i*(o+.5)*c,h+=i*(s+.5)*c,f+=i*(a+.5)*c;n._avg=l?[~~(d/l),~~(h/l),~~(f/l)]:[~~(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]>>l;return gval=t[1]>>l,bval=t[2]>>l,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;
2e[0]<5&&e[1]<5&&e[2]<5&&(t[0].color=[0,0,0]);var n=t.length-1,i=t[n].color;i[0]>251&&i[1]>251&&i[2]>251&&(t[n].color=[255,255,255])}},{quantize:function(t,n){function u(t,e){for(var n,r=1,i=0;1e3>i;)if((n=t.pop()).count()){var o=a(l,n),s=o[0],u=o[1];if(!s)return;if(t.push(s),u&&(t.push(u),r++),r>=e)return;if(i++>1e3)return}else t.push(n),i++}if(!t.length||2>n||n>256)return!1;var l=o(t);l.forEach((function(){}));var c=s(t,l),d=new e((function(t,e){return r.naturalOrder(t.count(),e.count())}));d.push(c),u(d,.75*n);for(var h=new e((function(t,e){return r.naturalOrder(t.count()*t.volume(),e.count()*e.volume())}));d.size();)h.push(d.pop());u(h,n-h.size());for(var f=new i;h.size();)f.push(h.pop());return f}}}();t.exports=n},4757:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",r="second",i="minute",o="hour",s="day",a="week",u="month",l="quarter",c="year",d="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},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,u),o=n-i<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:c,w:a,d:s,D:d,h:o,m:i,s:r,ms:n,Q:l}[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 A},D=function t(e,n,r){var i;if(!e)return y;if("string"==typeof e){var o=e.toLowerCase();b[o]&&(i=o),n&&(b[o]=n,i=o);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var a=e.name;b[a]=e,i=a}return!r&&i&&(y=i),i||!r&&y},x=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new A(n)},C=g;C.l=D,C.i=w,C.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var A=function(){function m(t){this.$L=D(t.locale,null,!0),this.parse(t)}var v=m.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(C.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(f);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 C},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return x(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<x(t)},v.$g=function(t,e,n){return C.u(t)?this[e]:this.set(n,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var n=this,l=!!C.u(e)||e,h=C.p(t),f=function(t,e){var r=C.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return l?r:r.endOf(s)},p=function(t,e){return C.w(n.toDate()[t].apply(n.toDate("s"),(l?[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(h){case c:return l?f(1,0):f(31,11);case u:return l?f(1,v):f(0,v+1);case a:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return f(l?g-w:g+(6-w),v);case s: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 a,l=C.p(t),h="set"+(this.$u?"UTC":""),f=(a={},a[s]=h+"Date",a[d]=h+"Date",a[u]=h+"Month",a[c]=h+"FullYear",a[o]=h+"Hours",a[i]=h+"Minutes",a[r]=h+"Seconds",a[n]=h+"Milliseconds",a)[l],p=l===s?this.$D+(e-this.$W):e;if(l===u||l===c){var m=this.clone().set(d,1);
vendor: 4,411 bytes, line 2
2m.$d[f](p),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[C.p(t)]()},v.add=function(n,l){var d,h=this;n=Number(n);var f=C.p(l),p=function(t){var e=x(h);return C.w(e.date(e.date()+Math.round(t*n)),h)};if(f===u)return this.set(u,this.$M+n);if(f===c)return this.set(c,this.$y+n);if(f===s)return p(1);if(f===a)return p(7);var m=(d={},d[i]=t,d[o]=e,d[r]=1e3,d)[f]||1,v=this.$d.getTime()+n*m;return C.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=C.z(this),o=this.$H,s=this.$m,a=this.$M,u=n.weekdays,l=n.months,c=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].slice(0,o)},d=function(t){return C.s(o%12||12,t,"0")},f=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:a+1,MM:C.s(a+1,2,"0"),MMM:c(n.monthsShort,a,l,3),MMMM:c(l,a),D:this.$D,DD:C.s(this.$D,2,"0"),d:String(this.$W),dd:c(n.weekdaysMin,this.$W,u,2),ddd:c(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(o),HH:C.s(o,2,"0"),h:d(1),hh:d(2),a:f(o,s,!0),A:f(o,s,!1),m:String(s),mm:C.s(s,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.s(this.$ms,3,"0"),Z: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,h){var f,p=C.p(d),m=x(n),v=(m.utcOffset()-this.utcOffset())*t,g=this-m,y=C.m(this,m);return y=(f={},f[c]=y/12,f[u]=y,f[l]=y/3,f[a]=(g-v)/6048e5,f[s]=(g-v)/864e5,f[o]=g/e,f[i]=g/t,f[r]=g/1e3,f)[p]||g,h?y:C.a(y)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return b[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=D(t,e,!0);return r&&(n.$L=r),n},v.clone=function(){return C.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),E=A.prototype;return x.prototype=E,[["$ms",n],["$s",r],["$m",i],["$H",o],["$W",s],["$M",u],["$y",c],["$D",d]].forEach((function(t){E[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,A,x),t.$i=!0),x},x.locale=D,x.isDayjs=w,x.unix=function(t){return x(1e3*t)},x.en=b[y],x.Ls=b,x.p={},x}()},6982: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)}}}()},5635: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,s,a){for(var u,l,c,d=o.$locale().relativeTime||i,h=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],f=h.length,p=0;p<f;p+=1){var m=h[p];m.d&&(u=s?n(e).diff(o,m.d,!0):o.diff(e,m.d,!0));var v=(t.rounding||Math.round)(Math.abs(u));if(c=u>0,v<=m.r||!m.r){v<=1&&p>0&&(m=h[p-1]);var g=d[m.l];a&&(v=a(""+v)),l="string"==typeof g?g.replace("%d",v):g(v,r,m.l,c);break}}if(r)return l;var y=c?d.future:d.past;return"function"==typeof y?y(l):y.replace("%s",l)},r.to=function(t,e){return o(t,e,this,!0)},r.from=function(t,e){return o(t,e,this)};var s=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(s(this),t)},r.fromNow=function(t){return this.from(s(this),t)}}}()},356:(t,e,n)=>{"use strict";
2t.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}()},9411: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(),s="",a={};t.each(["alt","ctrl","shift"],(function(t,n){e[n+"Key"]&&i!==n&&(s+=n+"+")})),e.metaKey&&!e.ctrlKey&&"meta"!==i&&(s+="meta+"),e.metaKey&&"meta"!==i&&s.indexOf("alt+ctrl+shift+")>-1&&(s=s.replace("alt+ctrl+shift+","hyper+")),i?a[s+i]=!0:(a[s+o]=!0,a[s+t.hotkeys.shiftNums[o]]=!0,"shift+"===s&&(a[t.hotkeys.shiftNums[o]]=!0));for(var u=0,l=r.length;u<l;u++)if(a[r[u]])return n.apply(this,arguments)}}}}t.hotkeys={version:"0.2.0",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},t.each(["keydown","keyup","keypress"],(function(){t.event.special[this]={add:e}}))}(jQuery||this.jQuery||window.jQuery)},9152: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=[],s=Object.getPrototypeOf,a=o.slice,u=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},l=o.push,c=o.indexOf,d={},h=d.toString,f=d.hasOwnProperty,p=f.toString,m=p.call(Object),v={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},y=function(t){return null!=t&&t===t.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function D(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 x(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[h.call(t)]||"object":typeof t}var C="3.6.1",A=function t(e,n){return new t.fn.init(e,n)};function E(t){var e=!!t&&"length"in t&&t.length,n=x(t);return!g(t)&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}A.fn=A.prototype={jquery:C,constructor:A,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=A.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return A.each(this,t)},map:function(t){return this.pushStack(A.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(A.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(A.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:l,sort:o.sort,splice:o.splice},A.extend=A.fn.extend=function(){var t,e,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||g(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(t=arguments[a]))for(e in t)r=t[e],"__proto__"!==e&&s!==r&&(l&&r&&(A.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[e],o=i&&!Array.isArray(n)?[]:i||A.isPlainObject(n)?n:{},i=!1,s[e]=A.extend(l,o,r)):void 0!==r&&(s[e]=r));return s},A.extend({expando:"jQuery"+(C+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;
vendor: 9,433 bytes, line 2
2return!(!t||"[object Object]"!==h.call(t)||(e=s(t))&&("function"!=typeof(n=f.call(e,"constructor")&&e.constructor)||p.call(n)!==m))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){D(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(E(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&&(E(Object(t))?A.merge(n,"string"==typeof t?[t]:t):l.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,s=!n;i<o;i++)!e(t[i],i)!==s&&r.push(t[i]);return r},map:function(t,e,n){var r,i,o=0,s=[];if(E(t))for(r=t.length;o<r;o++)null!=(i=e(t[o],o,n))&&s.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&s.push(i);return u(s)},guid:1,support:v}),"function"==typeof Symbol&&(A.fn[Symbol.iterator]=o[Symbol.iterator]),A.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){d["[object "+e+"]"]=e.toLowerCase()}));var N=function(t){var e,n,r,i,o,s,a,u,l,c,d,h,f,p,m,v,g,y,b,w="sizzle"+1*new Date,D=t.document,x=0,C=0,A=ut(),E=ut(),N=ut(),k=ut(),S=function(t,e){return t===e&&(d=!0),0},T={}.hasOwnProperty,F=[],_=F.pop,P=F.push,B=F.push,I=F.slice,O=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",$="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",j="\\[[\\x20\\t\\r\\n\\f]*("+$+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+$+"))|)"+M+"*\\]",R=":("+$+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+j+")*)|.*)\\)|)",H=new RegExp(M+"+","g"),U=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),q=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]*"),V=new RegExp(M+"|>"),W=new RegExp(R),G=new RegExp("^"+$+"$"),Y={ID:new RegExp("^#("+$+")"),CLASS:new RegExp("^\\.("+$+")"),TAG:new RegExp("^("+$+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+R),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("^(?:"+L+")$","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?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){h()},st=wt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{B.apply(F=I.call(D.childNodes),D.childNodes),F[D.childNodes.length].nodeType}catch(t){B={apply:F.length?function(t,e){P.apply(t,I.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function at(t,e,r,i){var o,a,l,c,d,p,g,y=e&&e.ownerDocument,D=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==D&&9!==D&&11!==D)return r;if(!i&&(h(e),e=e||f,m)){if(11!==D&&(d=Z.exec(t)))if(o=d[1]){if(9===D){if(!(l=e.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&b(e,l)&&l.id===o)return r.push(l),r}else{if(d[2])return B.apply(r,e.getElementsByTagName(t)),r;if((o=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return B.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!k[t+" "]&&(!v||!v.test(t))&&(1!==D||"object"!==e.nodeName.toLowerCase())){if(g=t,y=e,1===D&&(V.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)),a=(p=s(t)).length;a--;)p[a]=(c?"#"+c:":scope")+" "+bt(p[a]);g=p.join(",")}try{return B.apply(r,y.querySelectorAll(g)),r}catch(e){k(t,!0)}finally{c===w&&e.removeAttribute("id")}}}return u(t.replace(U,"$1"),e,r,i)}function ut(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function lt(t){return t[w]=!0,t}function ct(t){var e=f.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function dt(t,e){for(var n=t.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function ht(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 ft(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&st(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function vt(t){return lt((function(e){return e=+e,lt((function(n,r){for(var i,o=t([],n.length,e),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=at.support={},o=at.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!K.test(e||n&&n.nodeName||"HTML")},h=at.setDocument=function(t){var e,i,s=t?t.ownerDocument||t:D;return s!=f&&9===s.nodeType&&s.documentElement?(p=(f=s).documentElement,m=!o(f),D!=f&&(i=f.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(f.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(f.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(f.getElementsByClassName),n.getById=ct((function(t){return p.appendChild(t).id=w,!f.getElementsByName||!f.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(f.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|"+L+")"),t.querySelectorAll("[id~="+w+"-]").length||v.push("~="),(e=f.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=f.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("!=",R)}
vendor: 12,938 bytes, line 2
2)),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},S=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==f||t.ownerDocument==D&&b(D,t)?-1:e==f||e.ownerDocument==D&&b(D,e)?1:c?O(c,t)-O(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,s=[t],a=[e];if(!i||!o)return t==f?-1:e==f?1:i?-1:o?1:c?O(c,t)-O(c,e):0;if(i===o)return ht(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?ht(s[r],a[r]):s[r]==D?-1:a[r]==D?1:0},f):f},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(h(t),n.matchesSelector&&m&&!k[e+" "]&&(!g||!g.test(e))&&(!v||!v.test(e)))try{var r=y.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){k(e,!0)}return at(e,f,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!=f&&h(t),b(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!=f&&h(t);var i=r.attrHandle[e.toLowerCase()],o=i&&T.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},at.escape=function(t){return(t+"").replace(rt,it)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,r=[],i=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&t.slice(0),t.sort(S),d){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return c=null,t},i=at.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=at.selectors={cacheLength:50,createPseudo:lt,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]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&W.test(n)&&(e=s(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=A[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+M+"|$)"))&&A(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=at.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(H," ")+" ").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),s="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var l,c,d,h,f,p,m=o!==s?"nextSibling":"previousSibling",v=e.parentNode,g=a&&e.nodeName.toLowerCase(),y=!u&&!a,b=!1;if(v){if(o){for(;m;){for(h=e;h=h[m];)if(a?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;p=m="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?v.firstChild:v.lastChild],s&&y){for(b=(f=(l=(c=(d=(h=v)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===x&&l[1])&&l[2],h=f&&v.childNodes[f];h=++f&&h&&h[m]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===e){c[t]=[x,f,b];break}}else if(y&&(b=f=(l=(c=(d=(h=e)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===x&&l[1]),!1===b)for(;(h=++f&&h&&h[m]||(b=f=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++b||(y&&((c=(d=h[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]=[x,b]),h!==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()]||at.error("unsupported pseudo: "+t);return i[w]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?lt((function(t,n){for(var r,o=i(t,e),s=o.length;s--;)t[r=O(t,o[s])]=!(n[r]=o[s])})):function(t){return i(t,0,n)}):i}},pseudos:{not:lt((function(t){var e=[],n=[],r=a(t.replace(U,"$1"));return r[w]?lt((function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))})):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}})),has:lt((function(t){return function(e){return at(t,e).length>0}})),contains:lt((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||i(e)).indexOf(t)>-1}})),lang:lt((function(t){return G.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===p},focus:function(t){return t===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!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]=ft(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,s=n&&"parentNode"===o,a=C++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||s)return t(e,n,i);return!1}:function(e,n,u){var l,c,d,h=[x,a];if(u){for(;e=e[r];)if((1===e.nodeType||s)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||s)if(c=(d=e[w]||(e[w]={}))[e.uniqueID]||(d[e.uniqueID]={}),i&&i===e.nodeName.toLowerCase())e=e[r]||e;else{if((l=c[o])&&l[0]===x&&l[1]===a)return h[2]=l[2];if(c[o]=h,h[2]=t(e,n,u))return!0}return!1}}function Dt(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 xt(t,e,n,r,i){for(var o,s=[],a=0,u=t.length,l=null!=e;a<u;a++)(o=t[a])&&(n&&!n(o,r,i)||(s.push(o),l&&e.push(a)));return s}function Ct(t,e,n,r,i,o){return r&&!r[w]&&(r=Ct(r)),i&&!i[w]&&(i=Ct(i,o)),lt((function(o,s,a,u){var l,c,d,h=[],f=[],p=s.length,m=o||function(t,e,n){for(var r=0,i=e.length;r<i;r++)at(t,e[r],n);return n}(e||"*",a.nodeType?[a]:a,[]),v=!t||!o&&e?m:xt(m,h,t,a,u),g=n?i||(o?t:p||r)?[]:s:v;if(n&&n(v,g,a,u),r)for(l=xt(g,f),r(l,[],a,u),c=l.length;c--;)(d=l[c])&&(g[f[c]]=!(v[f[c]]=d));if(o){if(i||t){if(i){for(l=[],c=g.length;c--;)(d=g[c])&&l.push(v[c]=d);i(null,g=[],l,u)}for(c=g.length;c--;)(d=g[c])&&(l=i?O(o,d):h[c])>-1&&(o[l]=!(s[l]=d))}}else g=xt(g===s?g.splice(p,g.length):g),i?i(null,s,g,u):B.apply(s,g)}))}function At(t){for(var e,n,i,o=t.length,s=r.relative[t[0].type],a=s||r.relative[" "],u=s?1:0,c=wt((function(t){return t===e}),a,!0),d=wt((function(t){return O(e,t)>-1}),a,!0),h=[function(t,n,r){var i=!s&&(r||n!==l)||((e=n).nodeType?c(t,n,r):d(t,n,r));return e=null,i}];u<o;u++)if(n=r.relative[t[u].type])h=[wt(Dt(h),n)];else{if((n=r.filter[t[u].type].apply(null,t[u].matches))[w]){for(i=++u;i<o&&!r.relative[t[i].type];i++);return Ct(u>1&&Dt(h),u>1&&bt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(U,"$1"),n,u<i&&At(t.slice(u,i)),i<o&&At(t=t.slice(i)),i<o&&bt(t))}h.push(n)}return Dt(h)}return yt.prototype=r.filters=r.pseudos,r.setFilters=new yt,s=at.tokenize=function(t,e){var n,i,o,s,a,u,l,c=E[t+" "];if(c)return e?0:c.slice(0);for(a=t,u=[],l=r.preFilter;a;){for(s in n&&!(i=q.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),n=!1,(i=z.exec(a))&&(n=i.shift(),o.push({value:n,type:i[0].replace(U," ")}),a=a.slice(n.length)),r.filter)!(i=Y[s].exec(a))||l[s]&&!(i=l[s](i))||(n=i.shift(),o.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return e?a.length:a?at.error(t):E(t,u).slice(0)},a=at.compile=function(t,e){var n,i=[],o=[],a=N[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=At(e[n]))[w]?i.push(a):o.push(a);a=N(t,function(t,e){var n=e.length>0,i=t.length>0,o=function(o,s,a,u,c){var d,p,v,g=0,y="0",b=o&&[],w=[],D=l,C=o||i&&r.find.TAG("*",c),A=x+=null==D?1:Math.random()||.1,E=C.length;for(c&&(l=s==f||s||c);y!==E&&null!=(d=C[y]);y++){if(i&&d){for(p=0,s||d.ownerDocument==f||(h(d),a=!m);v=t[p++];)if(v(d,s||f,a)){u.push(d);break}c&&(x=A)}n&&((d=!v&&d)&&g--,o&&b.push(d))}if(g+=y,n&&y!==g){for(p=0;v=e[p++];)v(b,w,s,a);if(o){if(g>0)for(;y--;)b[y]||w[y]||(w[y]=_.call(u));w=xt(w)}B.apply(u,w),c&&!o&&w.length>0&&g+e.length>1&&at.uniqueSort(u)}return c&&(x=A,l=D),b};return n?lt(o):o}(o,i)),a.selector=t}return a},u=at.select=function(t,e,n,i){var o,u,l,c,d,h="function"==typeof t&&t,f=!i&&s(t=h.selector||t);if(n=n||[],1===f.length){if((u=f[0]=f[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===e.nodeType&&m&&r.relative[u[1].type]){if(!(e=(r.find.ID(l.matches[0].replace(et,nt),e)||[])[0]))return n;h&&(e=e.parentNode),t=t.slice(u.shift().value.length)}for(o=Y.needsContext.test(t)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((d=r.find[c])&&(i=d(l.matches[0].replace(et,nt),tt.test(u[0].type)&&gt(e.parentNode)||e))){if(u.splice(o,1),!(t=i.length&&bt(u)))return B.apply(n,i),n;break}}return(h||a(t,f))(i,e,!m,n,!e||tt.test(t)&&gt(e.parentNode)||e),n},n.sortStable=w.split("").sort(S).join("")===w,n.detectDuplicates=!!d,h(),n.sortDetached=ct((function(t){return 1&t.compareDocumentPosition(f.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(L,(function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null})),at}(r);A.find=N,(A.expr=N.selectors)[":"]=A.expr.pseudos,A.uniqueSort=A.unique=N.uniqueSort,A.text=N.getText,A.isXMLDoc=N.isXML,A.contains=N.contains,A.escapeSelector=N.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&&A(t).is(n))break;r.push(t)}return r},S=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},T=A.expr.match.needsContext;function F(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var _=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(t,e,n){return g(e)?A.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?A.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?A.grep(t,(function(t){return c.call(e,t)>-1!==n})):A.filter(e,t,n)}A.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?A.find.matchesSelector(r,t)?[r]:[]:A.f
vendor: 4,246 bytes, line 2
2ind.matches(t,A.grep(e,(function(t){return 1===t.nodeType})))},A.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(A(t).filter((function(){for(e=0;e<r;e++)if(A.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)A.find(t,i[e],n);return r>1?A.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&&T.test(t)?A(t):t||[],!1).length}});var B,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||B,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:I.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 A?e[0]:e,A.merge(this,A.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),_.test(r[1])&&A.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(A):A.makeArray(t,this)}).prototype=A.fn,B=A(b);var O=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function M(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}A.fn.extend({has:function(t){var e=A(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(A.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],s="string"!=typeof t&&A(t);if(!T.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&A.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?A.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(A(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(A.uniqueSort(A.merge(this.get(),A(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),A.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 S((t.parentNode||{}).firstChild,t)},children:function(t){return S(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(F(t,"template")&&(t=t.content||t),A.merge([],t.childNodes))}},(function(t,e){A.fn[t]=function(n,r){var i=A.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=A.filter(r,i)),this.length>1&&(L[t]||A.uniqueSort(i),O.test(t)&&i.reverse()),this.pushStack(i)}}));var $=/[^\x20\t\r\n\f]+/g;function j(t){return t}function R(t){throw t}function H(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])}}A.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return A.each(t.match($)||[],(function(t,n){e[n]=!0})),e}(t):A.extend({},t);var e,n,r,i,o=[],s=[],a=-1,u=function(){for(i=i||t.once,r=e=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=o.length,n=!1);t.memory||(n=!1),e=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!e&&(a=o.length-1,s.push(n)),function e(n){A.each(n,(function(n,r){g(r)?t.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return A.each(arguments,(function(t,e){for(var n;(n=A.inArray(e,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(t){return t?A.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||e||(o=n=""),this},locked:function(){return!!i}
vendor: 4,521 bytes, line 2
2,fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},A.extend({Deferred:function(t){var e=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.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 A.Deferred((function(n){A.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 s(t,e,n,i){return function(){var a=this,u=arguments,l=function(){var r,l;if(!(t<o)){if((r=n.apply(a,u))===e.promise())throw new TypeError("Thenable self-resolution");l=r&&("object"==typeof r||"function"==typeof r)&&r.then,g(l)?i?l.call(r,s(o,e,j,i),s(o,e,R,i)):(o++,l.call(r,s(o,e,j,i),s(o,e,R,i),s(o,e,j,e.notifyWith))):(n!==j&&(a=void 0,u=[r]),(i||e.resolveWith)(a,u))}},c=i?l:function(){try{l()}catch(r){A.Deferred.exceptionHook&&A.Deferred.exceptionHook(r,c.stackTrace),t+1>=o&&(n!==R&&(a=void 0,u=[r]),e.rejectWith(a,u))}};t?c():(A.Deferred.getStackHook&&(c.stackTrace=A.Deferred.getStackHook()),r.setTimeout(c))}}return A.Deferred((function(r){e[0][3].add(s(0,r,g(i)?i:j,r.notifyWith)),e[1][3].add(s(0,r,g(t)?t:j)),e[2][3].add(s(0,r,g(n)?n:R))})).promise()},promise:function(t){return null!=t?A.extend(t,i):i}},o={};return A.each(e,(function(t,r){var s=r[2],a=r[5];i[r[1]]=s.add,a&&s.add((function(){n=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=s.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=a.call(arguments),o=A.Deferred(),s=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?a.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(H(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)H(i[n],s(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.Deferred.exceptionHook=function(t,e){r.console&&r.console.warn&&t&&U.test(t.name)&&r.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},A.readyException=function(t){r.setTimeout((function(){throw t}))};var q=A.Deferred();function z(){b.removeEventListener("DOMContentLoaded",z),r.removeEventListener("load",z),A.ready()}A.fn.ready=function(t){return q.then(t).catch((function(t){A.readyException(t)})),this},A.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==t&&--A.readyWait>0||q.resolveWith(b,[A]))}}),A.ready.then=q.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(A.ready):(b.addEventListener("DOMContentLoaded",z),r.addEventListener("load",z));var V=function t(e,n,r,i,o,s,a){var u=0,l=e.length,c=null==r;if("object"===x(r))for(u in o=!0,r)t(e,n,u,r[u],!0,s,a);else if(void 0!==i&&(o=!0,g(i)||(a=!0),c&&(a?(n.call(e,i),n=null):(c=n,n=function(t,e,n){return c.call(A(t),n)})),n))for(;u<l;u++)n(e[u],r,a?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):s},W=/^-ms-/,G=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function K(t){return t.replace(W,"ms-").replace(G,Y)}var X=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function J(){this.expando=A.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($)||[]).length;for(;n--;)delete r[e[n]]}
vendor: 4,555 bytes, line 2
2(void 0===e||A.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&&!A.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}A.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)}}),A.fn.extend({data:function(t,e){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(i=Z.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(r=s[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)})):V(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)}))}}),A.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,A.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){var n=A.queue(t,e=e||"fx"),r=n.length,i=n.shift(),o=A._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){A.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:A.Callbacks("once memory").add((function(){Q.remove(t,[e+"queue",n])}))})}}),A.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?A.queue(this[0],t):void 0===e?this:this.each((function(){var n=A.queue(this,t,e);A._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&A.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){A.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=A.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=Q.get(o[s],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(e)}});var rt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,it=new RegExp("^(?:([+-])=|)("+rt+")([a-z%]*)$","i"),ot=["Top","Right","Bottom","Left"],st=b.documentElement,at=function(t){return A.contains(t.ownerDocument,t)},ut={composed:!0};st.getRootNode&&(at=function(t){return A.contains(t.ownerDocument,t)||t.getRootNode(ut)===t.ownerDocument});var lt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&at(t)&&"none"===A.css(t,"display")};function ct(t,e,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return A.css(t,e,"")},u=a(),l=n&&n[3]||(A.cssNumber[e]?"":"px"),c=t.nodeType&&(A.cssNumber[e]||"px"!==l&&+u)&&it.exec(A.css(t,e));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)A.style(t,e,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;A.style(t,e,(c*=2)+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var dt={};function ht(t){var e,n=t.ownerDocument,r=t.nodeName,i=dt[r];return i||(e=n.body.appendChild(n.createElement(r)),i=A.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),dt[r]=i,i)}function ft(t,e){for(var n,r,i=[],o=0,s=t.length;o<s;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&&lt(r)&&(i[o]=ht(r))):"none"!==n&&(i[o]="none",Q.set(r,"display",n)));for(o=0;o<s;o++)null!=i[o]&&(t[o].style.display=i[o]);return t}A.fn.extend({show:function(){return ft(this,!0)},hide:function(){return ft(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){lt(this)?A(this).show():A(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
vendor: 15,613 bytes, line 2
2=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&&F(t,e)?A.merge([t],n):n}function Dt(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 xt=/<|&#?\w+;/;function Ct(t,e,n,r,i){for(var o,s,a,u,l,c,d=e.createDocumentFragment(),h=[],f=0,p=t.length;f<p;f++)if((o=t[f])||0===o)if("object"===x(o))A.merge(h,o.nodeType?[o]:o);else if(xt.test(o)){for(s=s||d.appendChild(e.createElement("div")),a=(gt.exec(o)||["",""])[1].toLowerCase(),u=bt[a]||bt._default,s.innerHTML=u[1]+A.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;A.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(e.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(r&&A.inArray(o,r)>-1)i&&i.push(o);else if(l=at(o),s=wt(d.appendChild(o),"script"),l&&Dt(s),n)for(c=0;o=s[c++];)yt.test(o.type||"")&&n.push(o);return d}var At=/^([^.]*)(?:\.(.+)|)/;function Et(){return!0}function Nt(){return!1}function kt(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function St(t,e,n,r,i,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(r=r||n,n=void 0),e)St(t,a,n,r,e[a],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=Nt;else if(!i)return t;return 1===o&&(s=i,i=function(t){return A().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=A.guid++)),t.each((function(){A.event.add(this,e,i,r,n)}))}function Tt(t,e,n){n?(Q.set(t,e,!1),A.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)(A.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=a.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:A.event.trigger(A.extend(o[0],A.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&A.event.add(t,e,Et)}A.event={global:{},add:function(t,e,n,r,i){var o,s,a,u,l,c,d,h,f,p,m,v=Q.get(t);if(X(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&A.find.matchesSelector(st,i),n.guid||(n.guid=A.guid++),(u=v.events)||(u=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(e){return A.event.triggered!==e.type?A.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match($)||[""]).length;l--;)f=m=(a=At.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=A.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=A.event.special[f]||{},c=A.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&A.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=u[f])||((h=u[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,r,p,s)||t.addEventListener&&t.addEventListener(f,s)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),A.event.global[f]=!0)},remove:function(t,e,n,r,i){var o,s,a,u,l,c,d,h,f,p,m,v=Q.hasData(t)&&Q.get(t);if(v&&(u=v.events)){for(l=(e=(e||"").match($)||[""]).length;l--;)if(f=m=(a=At.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=A.event.special[f]||{},h=u[f=(r?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)c=h[o],!i&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(t,c));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,p,v.handle)||A.removeEvent(t,f,v.handle),delete u[f])}else for(f in u)A.event.remove(t,f+e[l],n,r,!0);A.isEmptyObject(u)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,s,a=new Array(arguments.length),u=A.event.fix(t),l=(Q.get(this,"events")||Object.create(null))[u.type]||[],c=A.event.special[u.type]||{};for(a[0]=u,e=1;e<arguments.length;e++)a[e]=arguments[e];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(s=A.event.handlers.call(this,u,l),e=0;(i=s[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((A.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,o,s,a=[],u=e.delegateCount,l=t.target;if(u&&l.nodeType&&!("click"===t.type&&t.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(o=[],s={},n=0;n<u;n++)void 0===s[i=(r=e[n]).selector+" "]&&(s[i]=r.needsContext?A(i,this).index(l)>-1:A.find(i,this,null,[l]).length),s[i]&&o.push(r);o.length&&a.push({elem:l,handlers:o})}return l=this,u<e.length&&a.push({elem:l,handlers:e.slice(u)}),a},addProp:function(t,e){Object.defineProperty(A.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[A.expando]?t:new A.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return vt.test(e.type)&&e.click&&F(e,"input")&&Tt(e,"click",Et),!1},trigger:function(t){var e=this||t;return vt.test(e.type)&&e.click&&F(e,"input")&&Tt(e,"click"),!0},_default:function(t){var e=t.target;return vt.test(e.type)&&e.click&&F(e,"input")&&Q.get(e,"click")||F(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},A.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},(A.Event=function(t,e){if(!(this instanceof A.Event))return new A.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Et:Nt,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&&A.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[A.expando]=!0}).prototype={constructor:A.Event,isDefaultPrevented:Nt,isPropagationStopped:Nt,isImmediatePropagationStopped:Nt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Et,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Et,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Et,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},A.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},A.event.addProp),A.each({focus:"focusin",blur:"focusout"},(function(t,e){A.event.special[t]={setup:function(){return Tt(this,t,kt),!1},trigger:function(){return Tt(this,t),!0},_default:function(e){return Q.get(e.target,t)},delegateType:e}})),A.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){A.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||A.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),A.fn.extend({on:function(t,e,n,r){return St(this,t,e,n,r)},one:function(t,e,n,r){return St(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,A(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=Nt),this.each((function(){A.event.remove(this,t,n,e)}))}});var Ft=/<script|<style|<link/i,_t=/checked\s*(?:[^=]|=\s*.checked.)/i,Pt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Bt(t,e){return F(t,"table")&&F(11!==e.nodeType?e:e.firstChild,"tr")&&A(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ot(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Lt(t,e){var n,r,i,o,s,a;if(1===e.nodeType){if(Q.hasData(t)&&(a=Q.get(t).events))for(i in Q.remove(e,"handle events"),a)for(n=0,r=a[i].length;n<r;n++)A.event.add(e,i,a[i][n]);Z.hasData(t)&&(o=Z.access(t),s=A.extend({},o),Z.set(e,s))}}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 $t(t,e,n,r){e=u(e);var i,o,s,a,l,c,d=0,h=t.length,f=h-1,p=e[0],m=g(p);if(m||h>1&&"string"==typeof p&&!v.checkClone&&_t.test(p))return t.each((function(i){var o=t.eq(i);m&&(e[0]=p.call(this,i,o.html())),$t(o,e,n,r)}));if(h&&(o=(i=Ct(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=A.map(wt(i,"script"),It)).length;d<h;d++)l=i,d!==f&&(l=A.clone(l,!0,!0),a&&A.merge(s,wt(l,"script"))),n.call(t[d],l,d);if(a)for(c=s[s.length-1].ownerDocument,A.map(s,Ot),d=0;d<a;d++)l=s[d],yt.test(l.type||"")&&!Q.access(l,"globalEval")&&A.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?A._evalUrl&&!l.noModule&&A._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):D(l.textContent.replace(Pt,""),l,c))}return t}function jt(t,e,n){for(var r,i=e?A.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||A.cleanData(wt(r)),r.parentNode&&(n&&at(r)&&Dt(wt(r,"script")),r.parentNode.removeChild(r));return t}A.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,o,s,a=t.cloneNode(!0),u=at(t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||A.isXMLDoc(t)))for(s=wt(a),r=0,i=(o=wt(t)).length;r<i;r++)Mt(o[r],s[r]);if(e)if(n)for(o=o||wt(t),s=s||wt(a),r=0,i=o.length;r<i;r++)Lt(o[r],s[r]);else Lt(t,a);return(s=wt(a,"script")).length>0&&Dt(s,!u&&wt(t,"script")),a},cleanData:function(t){for(var e,n,r,i=A.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]?A.event.remove(n,r):A.removeEvent(n,r,e.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),A.fn.extend({detach:function(t){return jt(this,t,!0)},remove:function(t){return jt(this,t)},text:function(t){return V(this,(function(t){return void 0===t?A.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 $t(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Bt(this,t).appendChild(t)}))},prepend:function(){return $t(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Bt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return $t(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return $t(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&&(A.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 A.clone(this,t,e)}))},html:function(t){return V(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&&!Ft.test(t)&&!bt[(gt.exec(t)||["",""])[1].toLowerCase()]){t=A.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(A.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 $t(this,arguments,(function(e){var n=this.parentNode;A.inArray(this,t)<0&&(A.cleanData(wt(this)),n&&n.replaceChild(e,this))}),t)}}),A.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){A.fn[t]=function(t){for(var n,r=[],i=A(t),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),A(i[s])[e](n),l.apply(r,n.get());return this.pushStack(r)}}));var Rt=new RegExp("^("+rt+")(?!px)[a-z%]+$","i"),Ht=/^--/,Ut=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},zt=new RegExp(ot.join("|"),"i"),Vt=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g");function Wt(t,e,n){var r,i,o,s,a=Ht.test(e),u=t.style;return(n=n||Ut(t))&&(s=n.getPropertyValue(e)||n[e],a&&(s=s.replace(Vt,"$1")),""!==s||at(t)||(s=A.style(t,e)),!v.pixelBoxStyles()&&Rt.test(s)&&zt.test(e)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=s,s=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==s?s+"":s}function Gt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){l.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%",st.appendChild(l).appendChild(c);var t=r.getComputedStyle(c);n="1%"!==t.top,u=12===e(t.marginLeft),c.style.right="60%",s=36===e(t.right),i=36===e(t.width),c.style.position="absolute",o=12===e(c.offsetWidth/3),st.removeChild(l),c=null}}function e(t){return Math.round(parseFloat(t))}var n,i,o,s,a,u,l=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,A.extend(v,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,n,i;return null==a&&(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",st.appendChild(t).appendChild(e).appendChild(n),i=r.getComputedStyle(e),a=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,st.removeChild(t)),a}}
vendor: 4,837 bytes, line 2
2))}();var Yt=["Webkit","Moz","ms"],Kt=b.createElement("div").style,Xt={};function Jt(t){return A.cssProps[t]||Xt[t]||(t in Kt?t:Xt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Yt.length;n--;)if((t=Yt[n]+e)in Kt)return t}(t)||t)}var Qt=/^(none|table(?!-c[ea]).+)/,Zt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,n){var r=it.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ne(t,e,n,r,i,o){var s="width"===e?1:0,a=0,u=0;if(n===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(u+=A.css(t,n+ot[s],!0,i)),r?("content"===n&&(u-=A.css(t,"padding"+ot[s],!0,i)),"margin"!==n&&(u-=A.css(t,"border"+ot[s]+"Width",!0,i))):(u+=A.css(t,"padding"+ot[s],!0,i),"padding"!==n?u+=A.css(t,"border"+ot[s]+"Width",!0,i):a+=A.css(t,"border"+ot[s]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-a-.5))||0),u}function re(t,e,n){var r=Ut(t),i=(!v.boxSizingReliable()||n)&&"border-box"===A.css(t,"boxSizing",!1,r),o=i,s=Wt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Rt.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&F(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===A.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===A.css(t,"boxSizing",!1,r),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+ne(t,e,n||(i?"border":"content"),o,r,s)+"px"}function ie(t,e,n,r,i){return new ie.prototype.init(t,e,n,r,i)}A.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Wt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,s,a=K(e),u=Ht.test(e),l=t.style;if(u||(e=Jt(a)),s=A.cssHooks[e]||A.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(t,!1,r))?i:l[e];"string"==(o=typeof n)&&(i=it.exec(n))&&i[1]&&(n=ct(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(A.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,r))||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,r){var i,o,s,a=K(e);return Ht.test(e)||(e=Jt(a)),(s=A.cssHooks[e]||A.cssHooks[a])&&"get"in s&&(i=s.get(t,!0,n)),void 0===i&&(i=Wt(t,e,r)),"normal"===i&&e in te&&(i=te[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),A.each(["height","width"],(function(t,e){A.cssHooks[e]={get:function(t,n,r){if(n)return!Qt.test(A.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,r):qt(t,Zt,(function(){return re(t,e,r)}))},set:function(t,n,r){var i,o=Ut(t),s=!v.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===A.css(t,"boxSizing",!1,o),u=r?ne(t,e,r,a,o):0;return a&&s&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ne(t,e,"border",!1,o)-.5)),u&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=A.css(t,e)),ee(0,n,u)}}})),A.cssHooks.marginLeft=Gt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-qt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(t,e){A.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&&(A.cssHooks[t+e].set=ee)})),A.fn.extend({css:function(t,e){return V(this,(function(t,e,n){var r,i,o={},s=0;if(Array.isArray(e)){for(r=Ut(t),i=e.length;s<i;s++)o[e[s]]=A.css(t,e[s],!1,r);return o}return void 0!==n?A.style(t,e,n):A.css(t,e)}),t,e,arguments.length>1)}}),A.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||A.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(A.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=A.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):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.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=A.css(t.elem,t.prop,""))&&"auto"!==e?e:0}
vendor: 11,733 bytes, line 2
2,set:function(t){A.fx.step[t.prop]?A.fx.step[t.prop](t):1!==t.elem.nodeType||!A.cssHooks[t.prop]&&null==t.elem.style[Jt(t.prop)]?t.elem[t.prop]=t.now:A.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},A.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},(A.fx=ie.prototype.init).step={};var oe,se,ae=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function le(){se&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(le):r.setTimeout(le,A.fx.interval),A.fx.tick())}function ce(){return r.setTimeout((function(){oe=void 0})),oe=Date.now()}function de(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 he(t,e,n){for(var r,i=(fe.tweeners[e]||[]).concat(fe.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,e,t))return r}function fe(t,e,n){var r,i,o=0,s=fe.prefilters.length,a=A.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=oe||ce(),n=Math.max(0,l.startTime+l.duration-e),r=1-(n/l.duration||0),o=0,s=l.tweens.length;o<s;o++)l.tweens[o].run(r);return a.notifyWith(t,[l,r,n]),r<1&&s?n:(s||a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l]),!1)},l=a.promise({elem:t,props:A.extend({},e),opts:A.extend(!0,{specialEasing:{},easing:A.easing._default},n),originalProperties:e,originalOptions:n,startTime:oe||ce(),duration:n.duration,tweens:[],createTween:function(e,n){var r=A.Tween(t,l.opts,e,n,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(r),r},stop:function(e){var n=0,r=e?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return e?(a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l,e])):a.rejectWith(t,[l,e]),this}}),c=l.props;for(function(t,e){var n,r,i,o,s;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]),(s=A.cssHooks[r])&&"expand"in s)for(n in o=s.expand(o),delete t[r],o)n in t||(t[n]=o[n],e[n]=i);else e[r]=i}(c,l.opts.specialEasing);o<s;o++)if(r=fe.prefilters[o].call(l,t,c,l.opts))return g(r.stop)&&(A._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return A.map(c,he,l),g(l.opts.start)&&l.opts.start.call(t,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),A.fx.timer(A.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}A.Animation=A.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($);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,s,a,u,l,c,d="width"in e||"height"in e,h=this,f={},p=t.style,m=t.nodeType&&lt(t),v=Q.get(t,"fxshow");for(r in n.queue||(null==(s=A._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,h.always((function(){h.always((function(){s.unqueued--,A.queue(t,"fx").length||s.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}f[r]=v&&v[r]||A.style(t,r)}if((u=!A.isEmptyObject(e))||!A.isEmptyObject(f))for(r in d&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(l=v&&v.display)&&(l=Q.get(t,"display")),"none"===(c=A.css(t,"display"))&&(l?c=l:(ft([t],!0),l=t.style.display||l,c=A.css(t,"display"),ft([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===A.css(t,"float")&&(u||(h.done((function(){p.display=l})),null==l&&(c=p.display,l="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,f)u||(v?"hidden"in v&&(m=v.hidden):v=Q.access(t,"fxshow",{display:l}),o&&(v.hidden=!m),m&&ft([t],!0),h.done((function(){for(r in m||ft([t]),Q.remove(t,"fxshow"),f)A.style(t,r,f[r])}))),u=he(m?v[r]:0,r,h),r in v||(v[r]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?fe.prefilters.unshift(t):fe.prefilters.push(t)}}),A.speed=function(t,e,n){var r=t&&"object"==typeof t?A.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return A.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in A.fx.speeds?r.duration=A.fx.speeds[r.duration]:r.duration=A.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&&A.dequeue(this,r.queue)},r},A.fn.extend({fadeTo:function(t,e,n,r){return this.filter(lt).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=A.isEmptyObject(t),o=A.speed(e,n,r),s=function(){var e=fe(this,A.extend({},t),o);(i||Q.get(this,"finish"))&&e.stop(!0)};return s.finish=s,i||!1===o.queue?this.each(s):this.queue(o.queue,s)},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=A.timers,s=Q.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&ue.test(i)&&r(s[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||A.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=A.timers,s=r?r.length:0;for(n.finish=!0,A.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<s;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),A.each(["toggle","show","hide"],(function(t,e){var n=A.fn[e];A.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(de(e,!0),t,r,i)}})),A.each({slideDown:de("show"),slideUp:de("hide"),slideToggle:de("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){A.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),A.timers=[],A.fx.tick=function(){var t,e=0,n=A.timers;for(oe=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||A.fx.stop(),oe=void 0},A.fx.timer=function(t){A.timers.push(t),A.fx.start()},A.fx.interval=13,A.fx.start=function(){se||(se=!0,le())},A.fx.stop=function(){se=null},A.fx.speeds={slow:600,fast:200,_default:400},A.fn.delay=function(t,e){return t=A.fx&&A.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 pe,me=A.expr.attrHandle;A.fn.extend({attr:function(t,e){return V(this,A.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){A.removeAttr(this,t)}))}}),A.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?A.prop(t,e,n):(1===o&&A.isXMLDoc(t)||(i=A.attrHooks[e.toLowerCase()]||(A.expr.match.bool.test(e)?pe:void 0)),void 0!==n?null===n?void A.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=A.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&F(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($);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),pe={set:function(t,e,n){return!1===e?A.removeAttr(t,n):t.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=me[e]||A.find.attr;me[e]=function(t,e,r){var i,o,s=e.toLowerCase();return r||(o=me[s],me[s]=i,i=null!=n(t,e,r)?s:null,me[s]=o),i}}));var ve=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function ye(t){return(t.match($)||[]).join(" ")}function be(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match($)||[]}A.fn.extend({prop:function(t,e){return V(this,A.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[A.propFix[t]||t]}))}}),A.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&A.isXMLDoc(t)||(e=A.propFix[e]||e,i=A.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=A.find.attr(t,"tabindex");return e?parseInt(e,10):ve.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(A.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)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(t){var e,n,r,i,o,s;return g(t)?this.each((function(e){A(this).addClass(t.call(this,e,be(this)))})):(e=we(t)).length?this.each((function(){if(r=be(this),n=1===this.nodeType&&" "+ye(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");s=ye(n),r!==s&&this.setAttribute("class",s)}})):this},removeClass:function(t){var e,n,r,i,o,s;return g(t)?this.each((function(e){A(this).removeClass(t.call(this,e,be(this)))})):arguments.length?(e=we(t)).length?this.each((function(){if(r=be(this),n=1===this.nodeType&&" "+ye(r)+" "){for(o=0;o<e.length;o++)for(i=e[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");s=ye(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,o,s=typeof t,a="string"===s||Array.isArray(t);return g(t)?this.each((function(n){A(this).toggleClass(t.call(this,n,be(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=we(t),this.each((function(){if(a)for(o=A(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==s||((r=be(this))&&Q.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Q.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+ye(be(n))+" ").indexOf(e)>-1)return!0;return!1}});var De=/\r/g;A.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,A(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=A.map(i,(function(t){return null==t?"":t+""}))),(e=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=A.valHooks[i.type]||A.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(De,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(t){var e=A.find.attr(t,"value");return null!=e?e:ye(A.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!F(n.parentNode,"optgroup"))){if(e=A(n).val(),s)return e;a.push(e)}return a}
vendor: 4,428 bytes, line 2
2,set:function(t,e){for(var n,r,i=t.options,o=A.makeArray(e),s=i.length;s--;)((r=i[s]).selected=A.inArray(A.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=A.inArray(A(t).val(),e)>-1}},v.checkOn||(A.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in r;var xe=/^(?:focusinfocus|focusoutblur)$/,Ce=function(t){t.stopPropagation()};A.extend(A.event,{trigger:function(t,e,n,i){var o,s,a,u,l,c,d,h,p=[n||b],m=f.call(t,"type")?t.type:t,v=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=a=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!xe.test(m+A.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[A.expando]?t:new A.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]:A.makeArray(e,[t]),d=A.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(n,e))){if(!i&&!d.noBubble&&!y(n)){for(u=d.delegateType||m,xe.test(u+m)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(n.ownerDocument||b)&&p.push(a.defaultView||a.parentWindow||r)}for(o=0;(s=p[o++])&&!t.isPropagationStopped();)h=s,t.type=o>1?u:d.bindType||m,(c=(Q.get(s,"events")||Object.create(null))[t.type]&&Q.get(s,"handle"))&&c.apply(s,e),(c=l&&s[l])&&c.apply&&X(s)&&(t.result=c.apply(s,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),e)||!X(n)||l&&g(n[m])&&!y(n)&&((a=n[l])&&(n[l]=null),A.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Ce),n[m](),t.isPropagationStopped()&&h.removeEventListener(m,Ce),A.event.triggered=void 0,a&&(n[l]=a)),t.result}},simulate:function(t,e,n){var r=A.extend(new A.Event,n,{type:t,isSimulated:!0});A.event.trigger(r,null,e)}}),A.fn.extend({trigger:function(t,e){return this.each((function(){A.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return A.event.trigger(t,e,n,!0)}}),v.focusin||A.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){A.event.simulate(e,t.target,A.event.fix(t))};A.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 Ae=r.location,Ee={guid:Date.now()},Ne=/\?/;A.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||A.error("Invalid XML: "+(n?A.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var ke=/\[\]$/,Se=/\r?\n/g,Te=/^(?:submit|button|image|reset|file)$/i,Fe=/^(?:input|select|textarea|keygen)/i;function _e(t,e,n,r){var i;if(Array.isArray(e))A.each(e,(function(e,i){n||ke.test(t)?r(t,i):_e(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==x(e))r(t,e);else for(i in e)_e(t+"["+i+"]",e[i],n,r)}A.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&&!A.isPlainObject(t))A.each(t,(function(){i(this.name,this.value)}));else for(n in t)_e(n,t[n],e,i);return r.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=A.prop(this,"elements");return t?A.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!A(this).is(":disabled")&&Fe.test(this.nodeName)&&!Te.test(t)&&(this.checked||!vt.test(t))})).map((function(t,e){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(t){return{name:e.name,value:t.replace(Se,"\r\n")}})):{name:e.name,value:n.replace(Se,"\r\n")}})).get()}});var Pe=/%20/g,Be=/#.*$/,Ie=/([?&])_=[^&]*/,Oe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:GET|HEAD)$/,Me=/^\/\//,$e={},je={},Re="*/".concat("*"),He=b.createElement("a");function Ue(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match($)||[];
vendor: 5,970 bytes, line 2
2if(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===je;function s(a){var u;return i[a]=!0,A.each(t[a]||[],(function(t,a){var l=a(e,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(e.dataTypes.unshift(l),s(l),!1)})),u}return s(e.dataTypes[0])||!i["*"]&&s("*")}function ze(t,e){var n,r,i=A.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&A.extend(!0,t,r),t}He.href=Ae.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ae.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ae.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?ze(ze(t,A.ajaxSettings),e):ze(A.ajaxSettings,t)},ajaxPrefilter:Ue($e),ajaxTransport:Ue(je),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0);var n,i,o,s,a,u,l,c,d,h,f=A.ajaxSetup({},e=e||{}),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?A(p):A.event,v=A.Deferred(),g=A.Callbacks("once memory"),y=f.statusCode||{},w={},D={},x="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=Oe.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=D[t.toLowerCase()]=D[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==l&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),E(0,e),this}};if(v.promise(C),f.url=((t||f.url||Ae.href)+"").replace(Me,Ae.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match($)||[""],null==f.crossDomain){u=b.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=He.protocol+"//"+He.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=A.param(f.data,f.traditional)),qe($e,f,e,C),l)return C;for(d in(c=A.event&&f.global)&&0==A.active++&&A.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Le.test(f.type),i=f.url.replace(Be,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Pe,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Ne.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Ie,"$1"),h=(Ne.test(i)?"&":"?")+"_="+Ee.guid+++h),f.url=i+h),f.ifModified&&(A.lastModified[i]&&C.setRequestHeader("If-Modified-Since",A.lastModified[i]),A.etag[i]&&C.setRequestHeader("If-None-Match",A.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Re+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,C,f)||l))return C.abort();if(x="abort",g.add(f.complete),C.done(f.success),C.fail(f.error),n=qe(je,f,e,C)){if(C.readyState=1,c&&m.trigger("ajaxSend",[C,f]),l)return C;f.async&&f.timeout>0&&(a=r.setTimeout((function(){C.abort("timeout")}),f.timeout));try{l=!1,n.send(w,E)}catch(t){if(l)throw t;E(-1,t)}}else E(-1,"No Transport");function E(t,e,s,u){var d,h,b,w,D,x=e;l||(l=!0,a&&r.clearTimeout(a),n=void 0,o=u||"",C.readyState=t>0?4:0,d=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var r,i,o,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(f,C,s)),!d&&A.inArray("script",f.dataTypes)>-1&&A.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,r){var i,o,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(i in l)if((a=i.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(f,w,C,d),d?(f.ifModified&&((D=C.getResponseHeader("Last-Modified"))&&(A.lastModified[i]=D),(D=C.getResponseHeader("etag"))&&(A.etag[i]=D)),204===t||"HEAD"===f.type?x="nocontent":304===t?x="notmodified":(x=w.state,h=w.data,d=!(b=w.error))):(b=x,!t&&x||(x="error",t<0&&(t=0))),C.status=t,C.statusText=(e||x)+"",d?v.resolveWith(p,[h,x,C]):v.rejectWith(p,[C,x,b]),C.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[C,f,d?h:b]),g.fireWith(p,[C,x]),c&&(m.trigger("ajaxComplete",[C,f]),--A.active||A.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return A.get(t,e,n,"json")},getScript:function(t,e){return A.get(t,void 0,e,"script")}}),A.each(["get","post"],(function(t,e){A[e]=function(t,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),A.ajax(A.extend({url:t,type:e,dataType:i,data:n,success:r}
vendor: 8,845 bytes, line 2
2,A.isPlainObject(t)&&t))}})),A.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),A._evalUrl=function(t,e,n){return A.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){A.globalEval(t,e,n)}})},A.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=A(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){A(this).wrapInner(t.call(this,e))})):this.each((function(){var e=A(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){A(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(t){return!A.expr.pseudos.visible(t)},A.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Ve={0:200,1223:204},We=A.ajaxSettings.xhr();v.cors=!!We&&"withCredentials"in We,v.ajax=We=!!We,A.ajaxTransport((function(t){var e,n;if(v.cors||We&&!t.crossDomain)return{send:function(i,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Ve[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout((function(){e&&n()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),A.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),A.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 A.globalEval(t),t}}}),A.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),A.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=A("<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,Ye=[],Ke=/(=)\?(?=&|$)|\?\?/;A.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ye.pop()||A.expando+"_"+Ee.guid++;return this[t]=!0,t}}),A.ajaxPrefilter("json jsonp",(function(t,e,n){var i,o,s,a=!1!==t.jsonp&&(Ke.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ke.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ke,"$1"+i):!1!==t.jsonp&&(t.url+=(Ne.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||A.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=r[i],r[i]=function(){s=arguments},n.always((function(){void 0===o?A(r).removeProp(i):r[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ye.push(i)),s&&g(o)&&o(s[0]),s=o=void 0})),"script"})),v.createHTMLDocument=((Ge=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),A.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=_.exec(t))?[e.createElement(i[1])]:(i=Ct([t],e,o),o&&o.length&&A(o).remove(),A.merge([],i.childNodes)));var r,i,o},A.fn.load=function(t,e,n){var r,i,o,s=this,a=t.indexOf(" ");return a>-1&&(r=ye(t.slice(a)),t=t.slice(0,a)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),s.length>0&&A.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){o=arguments,s.html(r?A("<div>").append(A.parseHTML(t)).find(r):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},A.expr.pseudos.animated=function(t){return A.grep(A.timers,(function(e){return t===e.elem})).length},A.offset={setOffset:function(t,e,n){var r,i,o,s,a,u,l=A.css(t,"position"),c=A(t),d={};"static"===l&&(t.style.position="relative"),a=c.offset(),o=A.css(t,"top"),u=A.css(t,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(s=(r=c.position()).top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),g(e)&&(e=e.call(t,n,A.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+i),"using"in e?e.using.call(t,d):c.css(d)}},A.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){A.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"===A.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"===A.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=A(t).offset()).top+=A.css(t,"borderTopWidth",!0),i.left+=A.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-A.css(r,"marginTop",!0),left:e.left-i.left-A.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===A.css(t,"position");)t=t.offsetParent;return t||st}))}}),A.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;A.fn[t]=function(r){return V(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)}})),A.each(["top","left"],(function(t,e){A.cssHooks[e]=Gt(v.pixelPosition,(function(t,n){if(n)return n=Wt(t,e),Rt.test(n)?A(t).position()[e]+"px":n}))})),A.each({Height:"height",Width:"width"},(function(t,e){A.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){A.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return V(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?A.css(e,n,a):A.style(e,n,i,a)}),e,s?i:void 0,s)}}))})),A.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){A.fn[e]=function(t){return this.on(e,t)}})),A.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)}}),A.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){A.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Xe=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;A.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),g(t))return r=a.call(arguments,2),i=function(){return t.apply(e||this,r.concat(a.call(arguments)))},i.guid=t.guid=t.guid||A.guid++,i},A.holdReady=function(t){t?A.readyWait++:A.ready(!0)},A.isArray=Array.isArray,A.parseJSON=JSON.parse,A.nodeName=F,A.isFunction=g,A.isWindow=y,A.camelCase=K,A.type=x,A.now=Date.now,A.isNumeric=function(t){var e=A.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},A.trim=function(t){return null==t?"":(t+"").replace(Xe,"$1")}
2,void 0===(n=function(){return A}.apply(e,[]))||(t.exports=n);var Je=r.jQuery,Qe=r.$;return A.noConflict=function(t){return r.$===A&&(r.$=Qe),t&&r.jQuery===A&&(r.jQuery=Je),A},void 0===i&&(r.jQuery=r.$=A),A}))},542:(t,e,n)=>{"use strict";var r=n(1642);t.exports=function(t,e,n){var i=[],o=!1,s=!1;function a(){if(o)throw new Error("Nested m.redraw.sync() call");o=!0;for(var e=0;e<i.length;e+=2)try{t(i[e],r(i[e+1]),u)}catch(t){n.error(t)}o=!1}function u(){s||(s=!0,e((function(){s=!1,a()})))}return u.sync=a,{mount:function(e,n){if(null!=n&&null==n.view&&"function"!=typeof n)throw new TypeError("m.mount(element, component) expects a component, not a vnode");var o=i.indexOf(e);o>=0&&(i.splice(o,2),t(e,[],u)),null!=n&&(i.push(e,n),t(e,r(n),u))},redraw:u}}},3600:(t,e,n)=>{"use strict";var r=n(1642),i=n(5334),o=n(187),s=n(3690),a=n(1490),u=n(5211),l=n(6797),c={};t.exports=function(t,e){var n;function d(e,r,i){if(e=s(e,r),null!=n){n();var o=i?i.state:null,a=i?i.title:null;i&&i.replace?t.history.replaceState(o,a,y.prefix+e):t.history.pushState(o,a,y.prefix+e)}else t.location.href=y.prefix+e}var h,f,p,m,v=c,g=y.SKIP={};function y(i,s,b){if(null==i)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var w,D=0,x=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:u(t)}})),C="function"==typeof setImmediate?setImmediate:setTimeout,A=o.resolve(),E=!1;if(n=null,null!=s){var N=a(s);if(!x.some((function(t){return t.check(N)})))throw new ReferenceError("Default route doesn't match any known routes")}function k(){E=!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=a(r);function o(){if(r===s)throw new Error("Could not resolve default route "+s);d(s,null,{replace:!0})}l(i.params,t.history.state),function t(n){for(;n<x.length;n++)if(x[n].check(i)){var s=x[n].component,a=x[n].route,u=s,l=m=function(o){if(l===m){if(o===g)return t(n+1);h=null==o||"function"!=typeof o.view&&"function"!=typeof o?"div":o,f=i.params,p=r,m=null,v=s.render?s:null,2===D?e.redraw():(D=2,e.redraw.sync())}};return void(s.view||"function"==typeof s?(s={},l(u)):s.onmatch?A.then((function(){return s.onmatch(i.params,r,a)})).then(l,o):l("div"))}o()}(0)}return n=function(){E||(E=!0,C(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!(!(D=D?2:1)||c===v)},oncreate:k,onremove:w,view:function(){if(D&&c!==v){var t=[r(h,f.key,f)];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={};l(o,t.attrs),o.selector=o.options=o.key=o.oninit=o.oncreate=o.onbeforeupdate=o.onupdate=o.onbeforeremove=o.onremove=null;var s=i(t.attrs.selector||"a",o,t.children);return(s.attrs.disabled=Boolean(s.attrs.disabled))?(s.attrs.href=null,s.attrs["aria-disabled"]="true",s.attrs.onclick=null):(e=s.attrs.onclick,n=s.attrs.href,s.attrs.href=y.prefix+n,s.attrs.onclick=function(t){var i;"function"==typeof e?i=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===i||t.defaultPrevented||0!==t.button&&0!==t.which&&1!==t.which||t.currentTarget.target&&"_self"!==t.currentTarget.target||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||(t.preventDefault(),t.redraw=!1,y.set(n,null,r))}),s}},y.param=function(t){return f&&null!=t?f[t]:f},y}},589:(t,e,n)=>{"use strict";var r=n(5334);r.trust=n(4031),r.fragment=n(2505),t.exports=r},7945:(t,e,n)=>{"use strict";var r=n(589),i=n(8450),o=n(570),s=function(){return r.apply(this,arguments)};s.m=r,s.trust=r.trust,s.fragment=r.fragment,s.mount=o.mount,s.route=n(2092),s.render=n(2031),s.redraw=o.redraw,s.request=i.request,s.jsonp=i.jsonp,s.parseQueryString=n(5784),s.buildQueryString=n(7477),s.parsePathname=n(1490),s.buildPathname=n(3690),s.vnode=n(1642),s.PromisePolyfill=n(7068),t.exports=s},570:(t,e,n)=>{"use strict";var r=n(2031);t.exports=n(542)(r,requestAnimationFrame,console)},6797:t=>{"use strict";
2t.exports=Object.assign||function(t,e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))}},3690:(t,e,n)=>{"use strict";var r=n(7477),i=n(6797);t.exports=function(t,e){if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Template parameter names *must* be separated");if(null==e)return t;var n=t.indexOf("?"),o=t.indexOf("#"),s=o<0?t.length:o,a=n<0?s:n,u=t.slice(0,a),l={};i(l,e);var c=u.replace(/:([^\/\.-]+)(\.{3})?/g,(function(t,n,r){return delete l[n],null==e[n]?t:r?e[n]:encodeURIComponent(String(e[n]))})),d=c.indexOf("?"),h=c.indexOf("#"),f=h<0?c.length:h,p=d<0?f:d,m=c.slice(0,p);n>=0&&(m+=t.slice(n,s)),d>=0&&(m+=(n<0?"?":"&")+c.slice(d,f));var v=r(l);return v&&(m+=(n<0&&d<0?"?":"&")+v),o>=0&&(m+=t.slice(o)),h>=0&&(m+=(o<0?"":"&")+c.slice(h)),m}},5211:(t,e,n)=>{"use strict";var r=n(1490);t.exports=function(t){var e=r(t),n=Object.keys(e.params),i=[],o=new RegExp("^"+e.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,(function(t,e,n){return null==e?"\\"+t:(i.push({k:e,r:"..."===n}),"..."===n?"(.*)":"."===n?"([^/]+)\\.":"([^/]+)"+(n||""))}))+"$");return function(t){for(var r=0;r<n.length;r++)if(e.params[n[r]]!==t.params[n[r]])return!1;if(!i.length)return o.test(t.path);var s=o.exec(t.path);if(null==s)return!1;for(r=0;r<i.length;r++)t.params[i[r].k]=i[r].r?s[r+1]:decodeURIComponent(s[r+1]);return!0}}},1490:(t,e,n)=>{"use strict";var r=n(5784);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),i=n<0?t.length:n,o=e<0?i:e,s=t.slice(0,o).replace(/\/{2,}/g,"/");return s?("/"!==s[0]&&(s="/"+s),s.length>1&&"/"===s[s.length-1]&&(s=s.slice(0,-1))):s="/",{path:s,params:e<0?{}:r(t.slice(e+1,i))}}},7068: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=l(r,!0),s=l(i,!1),a=n._instance={resolvers:r,rejectors:i},u="function"==typeof setImmediate?setImmediate:setTimeout;function l(t,e){return function o(l){var d;try{if(!e||null==l||"object"!=typeof l&&"function"!=typeof l||"function"!=typeof(d=l.then))u((function(){e||0!==t.length||console.error("Possible unhandled promise rejection:",l);for(var n=0;n<t.length;n++)t[n](l);r.length=0,i.length=0,a.state=e,a.retry=function(){o(l)}}));else{if(l===n)throw new TypeError("Promise can't be resolved w/ itself");c(d.bind(l))}}catch(t){s(t)}}}function c(t){var e=0;function n(t){return function(n){e++>0||t(n)}}var r=n(s);try{t(n(o),r)}catch(t){r(t)}}c(e)};e.prototype.then=function(t,n){var r,i,o=this._instance;function s(t,e,n,s){e.push((function(e){if("function"!=typeof t)n(e);else try{r(t(e))}catch(t){i&&i(t)}})),"function"==typeof o.retry&&s===o.state&&o.retry()}var a=new e((function(t,e){r=t,i=e}));return s(t,o.resolvers,r,!0),s(n,o.rejectors,i,!1),a},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)}))}
2,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 s=0;s<t.length;s++)!function(s){function a(t){i++,o[s]=t,i===r&&e(o)}null==t[s]||"object"!=typeof t[s]&&"function"!=typeof t[s]||"function"!=typeof t[s].then?a(t[s]):t[s].then(a,n)}(s)}))},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},187:(t,e,n)=>{"use strict";var r=n(7068);"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},7477: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):""))}}},5784: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("="),s=decodeURIComponent(o[0]),a=2===o.length?decodeURIComponent(o[1]):"";"true"===a?a=!0:"false"===a&&(a=!1);var u=s.split(/\]\[?|\[/),l=r;s.indexOf("[")>-1&&u.pop();for(var c=0;c<u.length;c++){var d=u[c],h=u[c+1],f=""==h||!isNaN(parseInt(h,10));if(""===d)null==n[s=u.slice(0,c).join()]&&(n[s]=Array.isArray(l)?l.length:0),d=n[s]++;else if("__proto__"===d)break;if(c===u.length-1)l[d]=a;else{var p=Object.getOwnPropertyDescriptor(l,d);null!=p&&(p=p.value),null==p&&(l[d]=p=f?[]:{}),l=p}}}return r}},2031:(t,e,n)=>{"use strict";t.exports=n(4615)(window)},2505:(t,e,n)=>{"use strict";var r=n(1642),i=n(8239);t.exports=function(){var t=i.apply(0,arguments);return t.tag="[",t.children=r.normalizeChildren(t.children),t}},5334:(t,e,n)=>{"use strict";var r=n(1642),i=n(8239),o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,s={},a={}.hasOwnProperty;function u(t){for(var e in t)if(a.call(t,e))return!1;return!0}function l(t){for(var e,n="div",r=[],i={};e=o.exec(t);){var a=e[1],u=e[2];if(""===a&&""!==u)n=u;else if("#"===a)i.id=u;else if("."===a)r.push(u);else if("["===e[3][0]){var l=e[6];l&&(l=l.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?r.push(l):i[e[4]]=""===l?l:l||!0}}return r.length>0&&(i.className=r.join(" ")),s[t]={tag:n,attrs:i}}function c(t,e){var n=e.attrs,i=r.normalizeChildren(e.children),o=a.call(n,"class"),s=o?n.class:n.className;if(e.tag=t.tag,e.attrs=null,e.children=void 0,!u(t.attrs)&&!u(n)){var l={};for(var c in n)a.call(n,c)&&(l[c]=n[c]);n=l}for(var c in t.attrs)a.call(t.attrs,c)&&"className"!==c&&!a.call(n,c)&&(n[c]=t.attrs[c]);for(var c in null==s&&null==t.attrs.className||(n.className=null!=s?null!=t.attrs.className?String(t.attrs.className)+" "+String(s):s:null!=t.attrs.className?t.attrs.className:null),o&&(n.class=null),n)if(a.call(n,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(s[t]||l(t),e):(e.tag=t,e)}},8239:(t,e,n)=>{"use strict";var r=n(1642);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)}},4615:(t,e,n)=>{"use strict";var r=n(1642);t.exports=function(t){var e,n=t&&t.document,i={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function o(t){return t.attrs&&t.attrs.xmlns||i[t.tag]}function s(t,e){if(t.state!==e)throw new Error("`vnode.state` must not be modified")}function a(t){var e=t.state;try{return this.apply(e,arguments)}finally{s(t,e)}}function u(){try{return n.activeElement}catch(t){return null}}function l(t,e,n,r,i,o,s){for(var a=n;a<r;a++){var u=e[a];null!=u&&c(t,u,i,s,o)}}function c(t,e,i,s,u){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,u);break;case"<":h(t,e,s,u);break;case"[":!function(t,e,r,i,o){var s=n.createDocumentFragment();if(null!=e.children){var a=e.children;l(s,a,0,a.length,r,null,i)}e.dom=s.firstChild,e.domSize=s.childNodes.length,w(t,s,o)}(t,e,i,s,u);break;
2default:!function(t,e,i,s,a){var u=e.tag,c=e.attrs,d=c&&c.is,h=(s=o(e)||s)?d?n.createElementNS(s,u,{is:d}):n.createElementNS(s,u):d?n.createElement(u,{is:d}):n.createElement(u);if(e.dom=h,null!=c&&function(t,e,n){for(var r in e)k(t,r,null,e[r],n)}(e,c,s),w(t,h,a),!D(e)&&(null!=e.text&&(""!==e.text?h.textContent=e.text:e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var f=e.children;l(h,f,0,f.length,i,null,s),"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,s,u)}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(a.call(t.state.view,t)),t.instance===t)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(e,n),null!=e.instance?(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,s,u)}var d={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function h(t,e,r,i){var o=e.children.match(/^\s*?<(\w+)/im)||[],s=n.createElement(d[o[1]]||"div");"http://www.w3.org/2000/svg"===r?(s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e.children+"</svg>",s=s.firstChild):s.innerHTML=e.children,e.dom=s.firstChild,e.domSize=s.childNodes.length,e.instance=[];for(var a,u=n.createDocumentFragment();a=s.firstChild;)e.instance.push(a),u.appendChild(a);w(t,u,i)}function f(t,e,n,r,i,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)l(t,n,0,n.length,r,i,o);else if(null==n||0===n.length)x(t,e,0,e.length);else{var s=null!=e[0]&&null!=e[0].key,a=null!=n[0]&&null!=n[0].key,u=0,d=0;if(!s)for(;d<e.length&&null==e[d];)d++;if(!a)for(;u<n.length&&null==n[u];)u++;if(null===a&&null==s)return;if(s!==a)x(t,e,d,e.length),l(t,n,u,n.length,r,i,o);else if(a){for(var h,f,b,w,D,A=e.length-1,E=n.length-1;A>=d&&E>=u&&(b=e[A],w=n[E],b.key===w.key);)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),A--,E--;for(;A>=d&&E>=u&&(h=e[d],f=n[u],h.key===f.key);)d++,u++,h!==f&&p(t,h,f,r,g(e,d,i),o);for(;A>=d&&E>=u&&u!==E&&h.key===w.key&&b.key===f.key;)y(t,b,D=g(e,d,i)),b!==f&&p(t,b,f,r,D,o),++u<=--E&&y(t,h,i),h!==w&&p(t,h,w,r,i,o),null!=w.dom&&(i=w.dom),d++,b=e[--A],w=n[E],h=e[d],f=n[u];for(;A>=d&&E>=u&&b.key===w.key;)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),E--,b=e[--A],w=n[E];if(u>E)x(t,e,d,A+1);else if(d>A)l(t,n,u,E+1,r,i,o);else{var N,k,S=i,T=E-u+1,F=new Array(T),_=0,P=0,B=2147483647,I=0;for(P=0;P<T;P++)F[P]=-1;for(P=E;P>=u;P--){null==N&&(N=m(e,d,A+1));var O=N[(w=n[P]).key];null!=O&&(B=O<B?O:-1,F[P-u]=O,b=e[O],e[O]=null,b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),I++)}if(i=S,I!==A-d+1&&x(t,e,d,A+1),0===I)l(t,n,u,E+1,r,i,o);else if(-1===B)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 s=e[e.length-1];if(t[s]<t[i])v[i]=s,e.push(i);else{for(n=0,r=e.length-1;n<r;){var a=(n>>>1)+(r>>>1)+(n&r&1);t[e[a]]<t[i]?n=a+1:r=a}t[i]<t[e[n]]&&(n>0&&(v[i]=e[n-1]),e[n]=i)}}for(r=e[(n=e.length)-1];n-- >0;)e[n]=r,r=v[r];return v.length=0,e}(F),_=k.length-1,P=E;P>=u;P--)f=n[P],-1===F[P-u]?c(t,f,r,o,i):k[_]===P-u?_--:y(t,f,i),null!=f.dom&&(i=n[P].dom);else for(P=E;P>=u;P--)f=n[P],-1===F[P-u]&&c(t,f,r,o,i),null!=f.dom&&(i=n[P].dom)}}else{var L=e.length<n.length?e.length:n.length;for(u=u<d?u:d;u<L;u++)(h=e[u])===(f=n[u])||null==h&&null==f||(null==h?c(t,f,r,o,g(e,u+1,i)):null==f?C(t,h):p(t,h,f,r,g(e,u+1,i),o));e.length>L&&x(t,e,u,e.length),n.length>L&&l(t,n,u,n.length,r,i,o)}}}function p(t,e,n,i,s,u){var l=e.tag;if(l===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=a.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate&&void 0!==(n=a.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof l)switch(null!=n.attrs&&$(n.attrs,n,i),l){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?(A(t,e),h(t,n,r,i)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,u,s);break;case"[":!function(t,e,n,r,i,o){f(t,e.children,n.children,r,i,o);var s=0,a=n.children;if(n.dom=null,null!=a){for(var u=0;u<a.length;u++){var l=a[u];null!=l&&null!=l.dom&&(null==n.dom&&(n.dom=l.dom),s+=l.domSize||1)}1!==s&&(n.domSize=s)}}(t,e,n,i,s,u);break;default:!function(t,e,n,i){var s=e.dom=t.dom;i=o(e)||i,"textarea"===e.tag&&(null==e.attrs&&(e.attrs={}),null!=e.text&&(e.attrs.value=e.text,e.text=void 0)),function(t,e,n,r){if(null!=n)for(var i in n)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]||S(t,i,o,r)}(e,t.attrs,e.attrs,i),D(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)]),f(s,t.children,e.children,n,null,i)))}(e,n,i,u)}
2else!function(t,e,n,i,o,s){if(n.instance=r.normalize(a.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");$(n.state,n,i),null!=n.attrs&&$(n.attrs,n,i),null!=n.instance?(null==e.instance?c(t,n.instance,i,s,o):p(t,e.instance,n.instance,i,o,s),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=e.instance?(C(t,e.instance),n.dom=void 0,n.domSize=0):(n.dom=e.dom,n.domSize=e.domSize)}(t,e,n,i,s,u)}else C(t,e),c(t,n,i,u,s)}function m(t,e,n){for(var r=Object.create(null);e<n;e++){var i=t[e];if(null!=i){var o=i.key;null!=o&&(r[o]=e)}}return r}var v=[];function g(t,e,n){for(;e<t.length;e++)if(null!=t[e]&&null!=t[e].dom)return t[e].dom;return n}function y(t,e,r){var i=n.createDocumentFragment();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 D(t){if(null==t.attrs||null==t.attrs.contenteditable&&null==t.attrs.contentEditable)return!1;var e=t.children;if(null!=e&&1===e.length&&"<"===e[0].tag){var n=e[0].children;t.dom.innerHTML!==n&&(t.dom.innerHTML=n)}else if(null!=t.text||null!=e&&0!==e.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function x(t,e,n,r){for(var i=n;i<r;i++){var o=e[i];null!=o&&C(t,o)}}function C(t,e){var n,r,i,o=0,u=e.state;if("string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&null!=(i=a.call(e.state.onbeforeremove,e))&&"function"==typeof i.then&&(o=1,n=i),e.attrs&&"function"==typeof e.attrs.onbeforeremove&&null!=(i=a.call(e.attrs.onbeforeremove,e))&&"function"==typeof i.then&&(o|=2,r=i),s(e,u),o){if(null!=n){var l=function(){1&o&&((o&=2)||c())};n.then(l,l)}null!=r&&(l=function(){2&o&&((o&=1)||c())},r.then(l,l))}else N(e),E(t,e);function c(){s(e,u),N(e),E(t,e)}}function A(t,e){for(var n=0;n<e.instance.length;n++)t.removeChild(e.instance[n])}function E(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)A(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&&E(t,r)}}break}}function N(t){if("string"!=typeof t.tag&&"function"==typeof t.state.onremove&&a.call(t.state.onremove,t),t.attrs&&"function"==typeof t.attrs.onremove&&a.call(t.attrs.onremove,t),"string"!=typeof t.tag)null!=t.instance&&N(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&&N(r)}}}function k(t,e,r,i,o){if("key"!==e&&"is"!==e&&null!=i&&!T(e)&&(r!==i||function(t,e){return"value"===e||"checked"===e||"selectedIndex"===e||"selected"===e&&t.dom===u()||"option"===t.tag&&t.dom.parentNode===n.activeElement}(t,e)||"object"==typeof i)){if("o"===e[0]&&"n"===e[1])return L(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)I(t.dom,r,i);else if(F(t,e,o)){if("value"===e){if(("input"===t.tag||"textarea"===t.tag)&&t.dom.value===""+i&&t.dom===u())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 S(t,e,n,r){if("key"!==e&&"is"!==e&&null!=n&&!T(e))if("o"!==e[0]||"n"!==e[1]||T(e))if("style"===e)I(t.dom,n,null);else if(!F(t,e,r)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===u())||"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 L(t,e,void 0)}function T(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function F(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 _=/[A-Z]/g;function P(t){return"-"+t.toLowerCase()}function B(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(_,P)}function I(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(B(r),String(i));else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(e[r])&&t.style.setProperty(B(r),i)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(B(r))}}function O(){this._=e}function L(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 O,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function M(t,e,n){"function"==typeof t.oninit&&a.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(a.bind(t.oncreate,e))}function $(t,e,n){"function"==typeof t.onupdate&&n.push(a.bind(t.onupdate,e))}return O.prototype=Object.create(null),O.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,i){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],s=u(),a=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var l=e;try{e="function"==typeof i?i:void 0,f(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===a?void 0:a)}finally{e=l}t.vnodes=n,null!=s&&u()!==s&&"function"==typeof s.focus&&s.focus();for(var c=0;c<o.length;c++)o[c]()}}},4031:(t,e,n)=>{"use strict";var r=n(1642);t.exports=function(t){return null==t&&(t=""),r("<",void 0,void 0,t,void 0,void 0)}},1642: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},8450:(t,e,n)=>{"use strict";var r=n(187),i=n(570);t.exports=n(1950)(window,r,i.redraw)},1950:(t,e,n)=>{"use strict";var r=n(3690);t.exports=function(t,e,n){var i=0;function o(t){return new e(t)}function s(t){return function(i,s){"string"!=typeof i?(s=i,i=i.url):null==s&&(s={});var a=new e((function(e,n){t(r(i,s.params),s,(function(t){if("function"==typeof s.type)if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=new s.type(t[n]);else t=new s.type(t);e(t)}),n)}));if(!0===s.background)return a;var u=0;function l(){0==--u&&"function"==typeof n&&n()}return function t(e){var n=e.then;return e.constructor=o,e.then=function(){u++;var r=n.apply(e,arguments);return r.then(l,(function(t){if(l(),0===u)throw t})),t(r)},e}(a)}}function a(t,e){for(var n in t.headers)if({}.hasOwnProperty.call(t.headers,n)&&e.test(n))return!0;return!1}return o.prototype=e.prototype,o.__proto__=e,{request:s((function(e,n,r,i){var o,s=null!=n.method?n.method.toUpperCase():"GET",u=n.body,l=!(null!=n.serialize&&n.serialize!==JSON.serialize||u instanceof t.FormData),c=n.responseType||("function"==typeof n.extract?"":"json"),d=new t.XMLHttpRequest,h=!1,f=d,p=d.abort;for(var m in d.abort=function(){h=!0,p.call(this)},d.open(s,e,!1!==n.async,"string"==typeof n.user?n.user:void 0,"string"==typeof n.password?n.password:void 0),l&&null!=u&&!a(n,/^content-type$/i)&&d.setRequestHeader("Content-Type","application/json; charset=utf-8"),"function"==typeof n.deserialize||a(n,/^accept$/i)||d.setRequestHeader("Accept","application/json, text/*"),n.withCredentials&&(d.withCredentials=n.withCredentials),n.timeout&&(d.timeout=n.timeout),d.responseType=c,n.headers)({}).hasOwnProperty.call(n.headers,m)&&d.setRequestHeader(m,n.headers[m]);d.onreadystatechange=function(t){if(!h&&4===t.target.readyState)try{var o,s=t.target.status>=200&&t.target.status<300||304===t.target.status||/^file:\/\//i.test(e),a=t.target.response;if("json"===c?t.target.responseType||"function"==typeof n.extract||(
2a=JSON.parse(t.target.responseText)):c&&"text"!==c||null==a&&(a=t.target.responseText),"function"==typeof n.extract?(a=n.extract(t.target,n),s=!0):"function"==typeof n.deserialize&&(a=n.deserialize(a)),s)r(a);else{try{o=t.target.responseText}catch(t){o=a}var u=new Error(o);u.code=t.target.status,u.response=a,i(u)}}catch(t){i(t)}},"function"==typeof n.config&&(d=n.config(d,n,e)||d)!==f&&(o=d.abort,d.abort=function(){h=!0,o.call(this)}),null==u?d.send():"function"==typeof n.serialize?d.send(n.serialize(u)):u instanceof t.FormData?d.send(u):d.send(JSON.stringify(u))})),jsonp:s((function(e,n,r,o){var s=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+i++,a=t.document.createElement("script");t[s]=function(e){delete t[s],a.parentNode.removeChild(a),r(e)},a.onerror=function(){delete t[s],a.parentNode.removeChild(a),o(new Error("JSONP request failed"))},a.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(s),t.document.documentElement.appendChild(a)}))}}},2092:(t,e,n)=>{"use strict";var r=n(570);t.exports=n(3600)(window,r)},30:(t,e,n)=>{"use strict";t.exports=n(6807)},6807: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=[],s=[];function a(e){return arguments.length&&e!==n.SKIP&&(t=e,o(a)&&(a._changing(),a._state="active",i.forEach((function(e,n){e(s[n](t))})))),t}function u(){return(e=n()).map((function(t){return!0===t&&(a._parents.forEach((function(t){t._unregisterChild(a)})),a._state="ended",a._parents.length=i.length=s.length=0),t})),e}return a.constructor=n,a._state=arguments.length&&t!==n.SKIP?"active":"pending",a._parents=[],a._changing=function(){o(a)&&(a._state="changing"),i.forEach((function(t){t._changing()}))},a._map=function(e,r){var o=r?n():n(e(t));return o._parents.push(a),i.push(o),s.push(e),o},a.map=function(t){return a._map(t,"active"!==a._state)},a.toJSON=function(){return null!=t&&"function"==typeof t.toJSON?t.toJSON():t},a["fantasy-land/map"]=a.map,a["fantasy-land/ap"]=function(t){return r((function(t,e){return t()(e())}),[t,a])},a._unregisterChild=function(t){var e=i.indexOf(t);-1!==e&&(i.splice(e,1),s.splice(e,1))}
2,Object.defineProperty(a,"end",{get:function(){return e||u()}}),a}function r(t,e){var r=e.every((function(t){if(t.constructor!==n)throw new Error("Ensure that each item passed to stream.combine/stream.merge/lift is a stream");return"active"===t._state})),i=r?n(t.apply(null,e.concat([e]))):n(),o=[],s=e.map((function(n){return n._map((function(s){return o.push(n),(r||e.every((function(t){return"pending"!==t._state})))&&(r=!0,i(t.apply(null,e.concat([o]))),o=[]),s}),!0)})),a=i.end.map((function(t){!0===t&&(s.forEach((function(t){t.end(!0)})),a.end(!0))}));return i}function i(t){return r((function(){return t.map((function(t){return t()}))}),t)}function o(t){return"pending"===t._state||"active"===t._state||"changing"===t._state}Object.defineProperty(n,"HALT",{get:function(){return e||console.log("HALT is deprecated and has been renamed to SKIP"),e=!0,n.SKIP}}),t.exports=n}()},619:(t,e,n)=>{"use strict";function r(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 i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t))||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.")}function i(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}n.r(e),n.d(e,{decode:()=>b,default:()=>C,encode:()=>w,toASCII:()=>x,toUnicode:()=>D,ucs2decode:()=>m,ucs2encode:()=>v});var o=2147483647,s=36,a=/^xn--/,u=/[^\0-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,h=String.fromCharCode;function f(t){throw new RangeError(c[t])}function p(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]);var i=function(t,e){for(var n=[],r=t.length;r--;)n[r]=e(t[r]);return n}((t=t.replace(l,".")).split("."),e).join(".");return r+i}function m(t){for(var e=[],n=0,r=t.length;n<r;){var i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=t.charCodeAt(n++);56320==(64512&o)?e.push(((1023&i)<<10)+(1023&o)+65536):(e.push(i),n--)}else e.push(i)}return e}var v=function(t){return String.fromCodePoint.apply(String,t)},g=function(t,e){return t+22+75*(t<26)-((0!=e)<<5)},y=function(t,e,n){var r=0;for(t=n?d(t/700):t>>1,t+=d(t/e);t>455;r+=s)t=d(t/35);return d(r+36*t/(t+38))},b=function(t){var e,n=[],r=t.length,i=0,a=128,u=72,l=t.lastIndexOf("-");l<0&&(l=0);for(var c=0;c<l;++c)t.charCodeAt(c)>=128&&f("not-basic"),n.push(t.charCodeAt(c));for(var h=l>0?l+1:0;h<r;){for(var p=i,m=1,v=s;;v+=s){h>=r&&f("invalid-input");var g=(e=t.charCodeAt(h++))-48<10?e-22:e-65<26?e-65:e-97<26?e-97:s;(g>=s||g>d((o-i)/m))&&f("overflow"),i+=g*m;var b=v<=u?1:v>=u+26?26:v-u;if(g<b)break;var w=s-b;m>d(o/w)&&f("overflow"),m*=w}var D=n.length+1;u=y(i-p,D,0==p),d(i/D)>o-a&&f("overflow"),a+=d(i/D),i%=D,n.splice(i++,0,a)}return String.fromCodePoint.apply(String,n)},w=function(t){for(var e,n=[],i=(t=m(t)).length,a=128,u=0,l=72,c=r(t);!(e=c()).done;){var p=e.value;p<128&&n.push(h(p))}var v=n.length,b=v;for(v&&n.push("-");b<i;){for(var w,D=o,x=r(t);!(w=x()).done;){var C=w.value;C>=a&&C<D&&(D=C)}var A=b+1;D-a>d((o-u)/A)&&f("overflow"),u+=(D-a)*A,a=D;for(var E,N=r(t);!(E=N()).done;){var k=E.value;if(k<a&&++u>o&&f("overflow"),k==a){for(var S=u,T=s;;T+=s){var F=T<=l?1:T>=l+26?26:T-l;if(S<F)break;var _=S-F,P=s-F;n.push(h(g(F+_%P,0))),S=d(_/P)}n.push(h(g(S,0))),l=y(u,A,b==v),u=0,++b}}++u,++a}return n.join("")},D=function(t){return p(t,(function(t){return a.test(t)?b(t.slice(4).toLowerCase()):t}))},x=function(t){return p(t,(function(t){return u.test(t)?"xn--"+w(t):t}))};const C={version:"2.1.0",ucs2:{decode:m,encode:v},decode:b,encode:w,toASCII:x,toUnicode:D}},1655: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 s=o&&o.debug||!1;if(s){var a=document.querySelector("#input-textarea-caret-position-mirror-div");a&&a.parentNode.removeChild(a)}var u=document.createElement("div");u.id="input-textarea-caret-position-mirror-div",document.body.appendChild(u);var l=u.style,c=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,d="INPUT"===t.nodeName;l.whiteSpace="pre-wrap",d||(l.wordWrap="break-word"),l.position="absolute",s||(l.visibility="hidden"),e.forEach((function(t){d&&"lineHeight"===t?l.lineHeight=c.height:l[t]=c[t]})),r?t.scrollHeight>parseInt(c.height)&&(l.overflowY="scroll"):l.overflow="hidden",u.textContent=t.value.substring(0,i),d&&(u.textContent=u.textContent.replace(/\s/g," "));var h=document.createElement("span");h.textContent=t.value.substring(i)||".",u.appendChild(h);var f={top:h.offsetTop+parseInt(c.borderTopWidth),left:h.offsetLeft+parseInt(c.borderLeftWidth),height:parseInt(c.lineHeight)};return s?h.style.backgroundColor="#aaa":document.body.removeChild(u),f}void 0!==t.exports?t.exports=i:n&&(window.getCaretCoordinates=i)}()},391:(t,e,n)=>{var r=n(9152),i=n(356);
2void 0===i.$&&(i.$=r),void 0===i.jQuery&&(i.jQuery=r),t.exports=r},1683:(t,e,n)=>{var r=n(2898),i=n(356);void 0===i.ColorThief&&(i.ColorThief=r),t.exports=r},982:(t,e,n)=>{var r=n(4757),i=n(356);void 0===i.dayjs&&(i.dayjs=r),t.exports=r},4473:(t,e,n)=>{var r=n(7945),i=n(356);void 0===i.m&&(i.m=r),t.exports=r},1885:(t,e,n)=>{var r=n(619),i=n(356);void 0===i.punycode&&(i.punycode=r),t.exports=r},9882:t=>{t.exports=function(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},t.exports.__esModule=!0,t.exports.default=t.exports},9696:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},230:t=>{t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},1904:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},8213:t=>{function e(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)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},402:t=>{t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},9767:t=>{function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2061:(t,e,n)=>{var r=n(480);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},1209:t=>{t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}},t.exports.__esModule=!0,t.exports.default=t.exports},6067:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},8974:(t,e,n)=>{var r=n(2075).default,i=n(230);t.exports=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},9440:(t,e,n)=>{var r=n(2075).default;function i(){"use strict";t.exports=i=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,o=n.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new S(r||[]);return s(o,"_invoke",{value:A(t,n,a)}),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p={};function m(){}function v(){}function g(){}var y={};d(y,u,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(T([])));w&&w!==n&&o.call(w,u)&&(y=w);var D=g.prototype=m.prototype=Object.create(y);function x(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,s,a,u){var l=f(t[i],t,s);if("throw"!==l.type){var c=l.arg,d=c.value;
vendor: 5,491 bytes, line 2
2return d&&"object"==r(d)&&o.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(l.arg)}var i;s(this,"_invoke",{value: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 A(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=E(s,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function E(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function N(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 S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:F}}function F(){return{value:void 0,done:!0}}return v.prototype=g,s(D,"constructor",{value:g,configurable:!0}),s(g,"constructor",{value:v,configurable:!0}),v.displayName=d(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,d(t,c,"GeneratorFunction")),t.prototype=Object.create(D),t},e.awrap=function(t){return{__await:t}},x(C.prototype),d(C.prototype,l,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var s=new C(h(t,n,r,i),o);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},x(D),d(D,c,"Generator"),d(D,u,(function(){return this})),d(D,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=T,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 e=this;function n(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(s)},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),p},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),p}},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,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}
2t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},480:t=>{function e(n,r){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},5387:(t,e,n)=>{var r=n(9696),i=n(1209),o=n(9111),s=n(6067);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},2075:t=>{function e(n){return t.exports=e="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},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},9111:(t,e,n)=>{var r=n(9882);t.exports=function(t,e){if(t){if("string"==typeof t)return r(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)?r(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},2507:(t,e,n)=>{var r=n(9440)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(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,{app:()=>p,compat:()=>yo});var t={};n.r(t),n.d(t,{camelCaseToSnakeCase:()=>Q,generateRandomString:()=>Z,getPlainContent:()=>X,slug:()=>K,truncate:()=>Y,ucfirst:()=>J});var e={};n.r(e),n.d(e,{createFocusTrap:()=>ur});var i={};n.r(i),n.d(i,{extend:()=>bi,override:()=>wi});var o={};n.r(o),n.d(o,{debounce:()=>re,throttle:()=>ne}),n(391),n(4473),n(982),n(9043),n(6199),n(7865),n(6935),n(9411);var s=n(5635),a=n.n(s),u=n(6982),l=n.n(u);function c(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}c.view=function(t,e,n){return c(e,e.attrs.bidi)};const d=c;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&&d(o,o.attrs.bidi),o};Object.keys(e).forEach((function(t){return n[t]=e[t]})),t.m=n}var f=window;const p=new Proxy({},{get:function(t,e){return Reflect.get(f.app,e,f.app)},set:function(t,e,n){return Reflect.set(f.app,e,n,f.app)}});n(1859),dayjs.extend(a()),dayjs.extend(l()),h(window);var v=$.fn.tooltip;function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function b(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,y(t,e)}function w(){return w=Object.assign?Object.assign.bind():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},w.apply(this,arguments)}function D(t,e,n){void 0===e&&(e=null),void 0===n&&(n={});var r=w({},n);r.state=r.state||{},r.state.key=Date.now(),m.route.set(t,e,r)}$.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"),v.bind(this)(t)},n(1885),n(1683);var x=function(){function t(){this.stack=[]}var e=t.prototype;return e.getCurrent=function(){return this.stack[this.stack.length-1]},e.getPrevious=function(){return this.stack[this.stack.length-2]},e.push=function(t,e,n){void 0===n&&(n=m.route.get());var r=this.stack[this.stack.length-2];r&&r.name===t&&this.stack.pop();var i=this.getCurrent();i&&i.name===t?Object.assign(i,{url:n,title:e}):this.stack.push({name:t,url:n,title:e})},e.canGoBack=function(){return this.stack.length>1},e.back=function(){if(!this.canGoBack())return this.home();this.stack.pop(),m.route.set(this.getCurrent().url)},e.backUrl=function(){return this.stack[this.stack.length-2].url},e.home=function(){this.stack.splice(0),D("/")},t}(),C=function(){function t(t){this.pinnedKey="panePinned",this.$element=$(t),this.pinned="true"===localStorage.getItem(this.pinnedKey),this.active=!1,this.showing=!1,this.render()}var e=t.prototype;return e.enable=function(){this.active=!0,this.render()},e.disable=function(){this.active=!1,this.showing=!1,this.render()},e.show=function(){clearTimeout(this.hideTimeout),this.showing=!0,this.render()},e.hide=function(){this.showing=!1,this.render()},e.onmouseleave=function(){this.hideTimeout=setTimeout(this.hide.bind(this),250)},e.togglePinned=function(){this.pinned=!this.pinned,localStorage.setItem(this.pinnedKey,this.pinned?"true":"false"),this.render()},e.render=function(){this.$element.toggleClass("panePinned",this.pinned).toggleClass("hasPane",this.active).toggleClass("paneShowing",this.showing)},t}(),A=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}
2((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=w({},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 E(t,e){return t&&(t===e||t.prototype instanceof e)}var N=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={}),!!E(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}(),k=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}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),p.previous=p.current,p.current=new N(this.constructor,{routeName:this.attrs.routeName}),p.drawer.hide(),p.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}(A);function S(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 T(t,e,n){return e&&S(t.prototype,e),n&&S(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function F(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},P=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||F(i.content)?w({},i,{content:e.createItemContentProxy(F(i.content)?i.content:Object(i.content),n)}):w({},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)}})},T(t,[{key:"items",get:function(){return new Proxy(this._items,{set:function(){return console.warn("Modifying `ItemList.items` is not allowed."),!1}})}}]),t}(),B=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(A);B.isListItem=!0;const I=B;function O(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=O(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}const L=function(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=O(t))&&(r&&(r+=" "),r+=e);return r};function M(t){return"object"==typeof t&&null!==t&&"tag"in t}function j(t){return M(t)&&t.tag===I}function R(t,e,n){void 0===e&&(e="li"),void 0===n&&(n={});var r,i,o,s=e;
2return(r=t instanceof Array?t:[t],o=[],r.filter(Boolean).forEach((function(t,e){(!j(t)||i&&!j(i)&&e!==r.length-1)&&(i=t,o.push(t))})),o).map((function(t){var e,r,i=[t.itemName&&"item-"+t.itemName];if(M(t)&&t.tag.isListItem)return t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key,t;M(t)&&(i.push((null==(r=t.attrs)?void 0:r.itemClassName)||t.itemClassName),null!=t.tag.isActive&&t.tag.isActive(t.attrs)&&i.push("active"));var o=M(t)&&(null==t||null==(e=t.attrs)?void 0:e.key)||t.itemName;return m(s,Object.assign({className:L(i),key:o},n),t)}))}var H=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){return m("header",{className:"Hero DiscussionHero"},m("div",{className:"container"},m("ul",{className:"DiscussionHero-items"},R(this.items().toArray()))))},n.items=function(){var t=new P,e=this.attrs.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},R(n)),10),t.add("title",m("h1",{className:"DiscussionHero-title"},e.title())),t},e}(A);function U(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 q(t,e){var n=t[e];return delete t[e],n}var z,V=["options"],W=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(t){var e=t.attrs,n=e.options,r=void 0===n?{}:n,i=U(e,V);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)),q(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}(A);function G(t,e){var n;void 0===e&&(e={}),e.className=L("Avatar",e.className),null!=(n=e).loading||(n.loading="lazy");var r="",i="undefined"===e.title||e.title;if(i||delete e.title,t){var o=t.displayName()||"?",s=t.avatarUrl();if(i&&(e.title=e.title||o),s)return m("img",Object.assign({},e,{src:s,alt:""}));r=o.charAt(0).toUpperCase(),e.style={"--avatar-bg":t.color()}}return m("span",e,r)}function Y(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function K(t,e){switch(void 0===e&&(e=z.ALPHANUMERIC),e){case z.UTF8:return t.toLowerCase().replace(/(?:(?![0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BF2\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D63\u0D66-\u0D78\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CF
2D\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE6\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD27\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDEFD-\uDF27\uDF30-\uDF54\uDF70-\uDF85\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC52-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE37\uDE3E-\uDE41\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uD
2F40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF])[\s\S])/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"");case z.ALPHANUMERIC:default:return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}}function X(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 &nbsp;").replace(/<img\b[^>]*>/gi," "),n=(new DOMParser).parseFromString(e,"text/html").documentElement;return X.removeSelectors.forEach((function(t){n.querySelectorAll(t).forEach((function(t){t.remove()}))})),n.innerText.replace(/\s+/g," ").trim()}function J(t){return t.substr(0,1).toUpperCase()+t.substr(1)}function Q(t){return t.replace(/[A-Z]/g,(function(t){return"_"+t.toLowerCase()}))}function Z(t){if(t<0)throw new Error("Cannot generate a random string with length less than 0.");if(0===t)return"";var e=new Uint8Array(t/2);return window.crypto.getRandomValues(e),Array.from(e,(function(t){return t.toString(16).padStart(2,"0")})).join("")}function tt(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(null!=e?e:"","gi"),i=t,o=0;return n&&(e&&(o=Math.max(0,t.search(r)-n/2)),i=Y(i,n,o)),i=$("<div/>").text(i).html(),e&&(i=i.replace(r,"<mark>$&</mark>")),m.trust(i)}function et(t,e){return void 0===e&&(e={}),e.className=L("icon",t,e.className),m("i",Object.assign({"aria-hidden":"true"},e))}!function(t){t.ALPHANUMERIC="alphanum",t.UTF8="utf8"}(z||(z={})),X.removeSelectors=["blockquote","script"];var nt=n(4757),rt=n.n(nt);function it(t){var e=rt()(t),n=rt()();return e.isAfter(n)&&(e=n),e.diff(rt()())<-2592e6?e.year()===rt()().year()?e.format("D MMM"):e.format("ll"):e.fromNow()}function ot(t){return t instanceof Array?t.map((function(t){return ot(t)})).join(""):"object"==typeof t&&null!==t?t.children?ot(t.children):String(t.text):String(t)}function st(t){return t>=1e6?Math.floor(t/1e6)+ot(p.translator.trans("core.lib.number_suffix.mega_text")):t>=1e3?(t/1e3).toFixed(1)+ot(p.translator.trans("core.lib.number_suffix.kilo_text")):t.toString()}var at=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).showing=!1,e}b(e,t),e.initAttrs=function(t){t.className||(t.className=""),t.buttonClassName||(t.buttonClassName=""),t.menuClassName||(t.menuClassName=""),t.label||(t.label=""),null!=t.caretIcon||(t.caretIcon="fas fa-caret-down"),t.accessibleToggleLabel||(t.accessibleToggleLabel=ot(p.translator.trans("core.lib.dropdown.toggle_dropdown_accessible_label")))};var n=e.prototype;return 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,e,r,i,o,s,a,u,l,c,d,h=n.attrs,f=h.lazyDraw,p=h.onshow;n.showing=!0,f&&m.redraw.sync(),"function"==typeof p&&p(),f||m.redraw();var v=n.$(".Dropdown-menu"),g=v.hasClass("Dropdown-menu--right"),y=null!=(t=null==(e=v.offset())?void 0:e.top)?t:0,b=null!=(r=v.height())?r:0,w=null!=(i=$(window).scrollTop())?i:0,D=null!=(o=$(window).height())?o:0;v.removeClass("Dropdown-menu--top Dropdown-menu--right"),v.toggleClass("Dropdown-menu--top",y+b>w+D),((null==(s=v.offset())?void 0:s.top)||0)<0&&v.removeClass("Dropdown-menu--top");var x=null!=(a=null==(u=v.offset())?void 0:u.left)?a:0,C=null!=(l=v.width())?l:0,A=null!=(c=$(window).scrollLeft())?c:0,E=null!=(d=$(window).width())?d:0;v.toggleClass("Dropdown-menu--right",g||x+C>A+E)})),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?et(this.attrs.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},this.attrs.label),this.attrs.caretIcon?et(this.attrs.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.attrs.menuClassName},t)},e}(A);function ut(t){var e=rt()(t),n=e.format(),r=e.format("LLLL"),i=it(t);return m("time",{pubdate:!0,datetime:n,title:r,"data-humantime":!0},i)}var lt=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){var t=this.attrs.discussion,e=this.attrs.lastPost&&t.replyCount(),n=t[e?"lastPostedUser":"user"](),r=t[e?"lastPostedAt":"createdAt"]();return m("span",null,!!e&&et("fas fa-reply")," ",Ui.translator.trans("core.forum.discussion_list."+(e?"replied":"started")+"_text",{user:n,ago:ut(r)}))},e}(A),ct=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()}
2,e.invalidate=function(){this.data={}},t}(),dt=["display","size","containerClassName","className"],ht=function(t){function e(){return t.apply(this,arguments)||this}return b(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,s=t.className,a=U(t,dt),u=L("LoadingIndicator",s),l=L("LoadingIndicator-container","unset"!==n&&"LoadingIndicator-container--"+n,i&&"LoadingIndicator-container--"+i,o);return m("div",Object.assign({"aria-label":p.translator.trans("core.lib.loading_indicator.accessible_label"),role:"status"},a.containerAttrs,{"data-size":i,className:l}),m("div",Object.assign({"aria-hidden":"true",className:u},a)))},e}(A),ft=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.handler=function(){return this.attrs.when()||void 0},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("beforeunload",this.boundHandler)},n.view=function(t){return m("[",null,t.children)},e}(A);function pt(){var t;p.forum.attribute("debug")&&(t=console).warn.apply(t,arguments)}function mt(t,e,n,r){void 0===n&&(n="2.0"),void 0===r&&(r="flarum/core"),pt("[Flarum "+n+" Deprecation] "+t+"\n\nSee: https://github.com/"+r+"/pull/"+e)}var vt=["type","title","aria-label","icon","disabled","loading","className","class"],gt=function(t){function e(){return t.apply(this,arguments)||this}b(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,s=e.disabled,a=e.loading,u=e.className,l=e.class,c=U(e,vt);n||(n="button"),i||(i=r),"object"==typeof i&&(i=ot(i)),(s||a)&&delete c.onclick;var d=w({disabled:s,className:u=L(l,u,{hasIcon:o,disabled:s||a,loading:a}),type:n,"aria-label":i},c);return m("button",d,this.getButtonContent(t.children))},n.oncreate=function(n){var r;t.prototype.oncreate.call(this,n);var i=this.attrs["aria-label"];this.view!==e.prototype.view||i||ot(n.children)||null!=(r=this.element)&&null!=r.getAttribute&&r.getAttribute("aria-label")||pt('[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&&et(e,{className:"Button-icon"}),t&&m("span",{className:"Button-label"},t),this.attrs.loading&&m(ht,{size:"small",display:"inline"})]},e}(A),yt=n(1655),bt=n.n(yt),wt=null;function Dt(t,e){var n=e.text,r=e.selectionStart,i=e.selectionEnd,o=t.selectionStart,s=t.value.slice(0,o),a=t.value.slice(t.selectionEnd);if(null===wt||!0===wt){t.contentEditable="true";try{wt=document.execCommand("insertText",!1,n)}catch(t){wt=!1}t.contentEditable="false"}wt&&!t.value.slice(0,t.selectionStart).endsWith(n)&&(wt=!1),wt||(t.value=s+n+a,t.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))),null!=r&&null!=i?t.setSelectionRange(r,i):t.setSelectionRange(o,t.selectionEnd)}var xt=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 P;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;Dt(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=bt()(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}(),Ct=["text","tooltipVisible","showOnFocus","position","ignoreTitleWarning","html","delay"],At=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).firstChild=null,e.childDomNode=null,e.oldText="",e.oldVisibility=void 0,e.shouldRecreateTooltip=!1,e.shouldChangeTooltipVisibility=!1,e}b(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,U(n,Ct),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 s=this.getRealText();if(s!==this.oldText&&(this.oldText=s,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 
2no 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 a=e[0];if("object"!=typeof a||Array.isArray(a)||null===a)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 a.tag&&["#","[","<"].includes(a.tag))throw new Error('Tooltip component with provided with a vnode with tag "'+a.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=a,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,s=t.html,a=void 0!==s&&s,u=t.tooltipVisible,l=(t.text,"boolean"==typeof u?"manual":L("hover",[n&&"focus"])),c=this.getRealText();this.childDomNode.setAttribute("title",c),this.childDomNode.setAttribute("aria-label",c),$(this.childDomNode).tooltip({html:a,delay:o,placement:i,trigger:l},"DANGEROUS_tooltip_jquery_fn_deprecation_exempt")}},n.getRealText=function(){var t=this.attrs.text;return Array.isArray(t)?ot(t):t},n.checkDomNodeChanged=function(){var t=this.firstChild.dom;t&&!t.isSameNode(this.childDomNode)&&(this.childDomNode=t,this.shouldRecreateTooltip=!0)},e}(A),Et=function(t){function e(){return t.apply(this,arguments)||this}b(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 xt(t,this.buildEditorParams())},n.controlItems=function(){var t=new P;return t.add("submit",m(gt,{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(At,{text:p.translator.trans("core.forum.composer.preview_tooltip")},m(gt,{icon:"far fa-eye",className:"Button Button--icon",onclick:this.attrs.preview}))),t},n.toolbarItems=function(){return new P},n.oninput=function(t){this.value=t,this.attrs.onchange(this.value)},n.onsubmit=function(){this.attrs.onsubmit(this.value)},e}(A),Nt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.composer=this.attrs.composer,this.loading=!1,this.attrs.confirmExit&&this.composer.preventClosingWhen((function(){return n.hasChanges()}),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")},n.view=function(){var t;return m(ft,{when:this.hasChanges.bind(this)},m("div",{className:L("ComposerBody",this.attrs.className)},G(this.attrs.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},R(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},m(Et,{submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:null==(t=this.jumpToPreview)?void 0:t.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),m(ht,{display:"unset",containerClassName:L("ComposerBody-loading",this.loading&&"active"),size:"large"})))},n.hasChanges=function(){var t=this.composer.fields.content();return t&&t!==this.attrs.originalContent},n.headerItems=function(){return new P},n.onsubmit=function(){},n.loaded=function(){this.loading=!1,m.redraw()},e}(A);function kt(t){Ui.composer.isFullScreen()&&(Ui.composer.minimize(),t.stopPropagation())}var St=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||ot(Ui.translator.trans("core.forum.composer_reply.body_placeholder")),e.submitLabel=e.submitLabel||Ui.translator.trans("core.forum.composer_reply.submit_button"),e.confirmExit=e.confirmExit||ot(Ui.translator.trans("core.forum.composer_reply.discard_confirmation"))};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.attrs.discussion;return e.add("title",m("h3",null,et("fas fa-reply")," ",m(W,{href:Ui.route.discu
2ssion(n),onclick:kt},n.title()))),e},n.jumpToPreview=function(t){kt(t),m.route.set(Ui.route.discussion(this.attrs.discussion,"reply"))},n.data=function(){return{content:this.composer.fields.content(),relationships:{discussion:this.attrs.discussion}}},n.onsubmit=function(){var t=this,e=this.attrs.discussion;this.loading=!0,m.redraw();var n=this.data();Ui.store.createRecord("posts").save(n).then((function(n){if(Ui.viewingDiscussion(e)){var r=Ui.current.get("stream");r.update().then((function(){return r.goToNumber(n.number())}))}else{var i,o=m(gt,{className:"Button Button--link",onclick:function(){m.route.set(Ui.route.post(n)),Ui.alerts.dismiss(i)}},Ui.translator.trans("core.forum.composer_reply.view_button"));i=Ui.alerts.show({type:"success",controls:[o]},Ui.translator.trans("core.forum.composer_reply.posted_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(Nt),Tt=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(t){var e=Object.assign({},this.attrs),n=q(e,"type");e.className=L("Alert","Alert--"+n,e.className);var r=q(e,"title"),i=q(e,"icon"),o=q(e,"content")||t.children,s=q(e,"controls")||[],a=q(e,"dismissible"),u=q(e,"ondismiss"),l=[];return(a||void 0===a)&&l.push(m(gt,{"aria-label":p.translator.trans("core.lib.alert.dismiss_a11y_label"),icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:u})),m("div",e,!!r&&m("div",{className:"Alert-title"},!!i&&m("span",{className:"Alert-title-icon"},et(i)),m("span",{className:"Alert-title-text"},r)),m("span",{className:"Alert-body"},o),m("ul",{className:"Alert-controls"},R(s.concat(l))))},e}(A),Ft=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=null,e}b(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&&pt("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 new Promise((function(t){return setTimeout(t,300)}))},n.view=function(){var t=this;return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:L("Modal modal-dialog fade",this.className())},m("div",{className:"Modal-content"},this.dismissibleOptions.viaCloseButton&&m("div",{className:"Modal-close App-backControl"},m(gt,{icon:"fas fa-times",onclick:function(){return t.hide()},className:"Button Button--icon Button--link","aria-label":p.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"},m(Tt,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.animateHide()},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()},T(e,[{key:"dismissibleOptions",get:function(){return this.constructor.dismissibleOptions}}],[{key:"dismissibleOptions",get:function(){return this.isDismissible?{isDismissible:!0,viaCloseButton:this.isDismissibleViaCloseButton,viaEscKey:this.isDismissibleViaEscKey,viaBackdropClick:this.isDismissibleViaBackdropClick}:{isDismissible:!1,viaCloseButton:!1,viaEscKey:!1,viaBackdropClick:!1}}}]),e}(A);Ft.isDismissible=!0,Ft.isDismissibleViaCloseButton=!0,Ft.isDismissibleViaEscKey=!0,Ft.isDismissibleViaBackdropClick=!0;var _t=n(30);const Pt=n.n(_t)();var Bt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).email=void 0,e.success=!1,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Pt(this.attrs.email||"")},n.className=function(){return"ForgotPasswordModal Modal--small"},n.title=function(){return Ui.translator.trans("core.forum.forgot_password.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},Ui.translator.trans("core.forum.forgot_password.email_sent_message")),m("div",{className:"Form-group"},m(gt,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},Ui.translator.trans("core.forum.forgot_password.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},Ui.translator.trans("core.forum.forgot_password.text")),this.fields().toArray()))},n.fields=function(){var t=new P,e=ot(Ui.translator.trans("core.forum.forgot_password.email_placeholder"));return t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:e,"aria-label":e,bidi:this.email,disabled:this.loading})),50),t.add("submit",m("div",{className:"Form-group"},m(gt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Ui.translator.trans("core.forum.forgot_password.submit_button"))),-10),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,Ui.request({method:"POST",url:Ui.forum.attribute("apiUrl")+"/forgot",body:this.requestParam
2s(),errorHandler:this.onerror.bind(this)}).then((function(){e.success=!0,e.alertAttrs=null})).catch((function(){})).then(this.loaded.bind(this))},n.requestParams=function(){return{email:this.email()}},n.onerror=function(e){404===e.status&&e.alert&&(e.alert.content=Ui.translator.trans("core.forum.forgot_password.not_found_message")),t.prototype.onerror.call(this,e)},e}(Ft),It=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new P},e}(A),Ot=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).username=void 0,e.email=void 0,e.password=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.username=Pt(this.attrs.username||""),this.email=Pt(this.attrs.email||""),this.password=Pt(this.attrs.password||"")},n.className=function(){return"Modal--small SignUpModal"},n.title=function(){return Ui.translator.trans("core.forum.sign_up.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.isProvided=function(t){var e,n;return null!=(e=null==(n=this.attrs.provided)?void 0:n.includes(t))&&e},n.body=function(){return[!this.attrs.token&&m(It,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new P,e=ot(Ui.translator.trans("core.forum.sign_up.username_placeholder")),n=ot(Ui.translator.trans("core.forum.sign_up.email_placeholder")),r=ot(Ui.translator.trans("core.forum.sign_up.password_placeholder"));return t.add("username",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"username",type:"text",placeholder:e,"aria-label":e,bidi:this.username,disabled:this.loading||this.isProvided("username")})),30),t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:n,"aria-label":n,bidi:this.email,disabled:this.loading||this.isProvided("email")})),20),this.attrs.token||t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",autocomplete:"new-password",placeholder:r,"aria-label":r,bidi:this.password,disabled:this.loading})),10),t.add("submit",m("div",{className:"Form-group"},m(gt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Ui.translator.trans("core.forum.sign_up.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"SignUpModal-logIn"},Ui.translator.trans("core.forum.sign_up.log_in_text",{a:m("a",{onclick:this.logIn.bind(this)})}))]},n.logIn=function(){var t={identification:this.email()||this.username()};Ui.modal.show(Lt,t)},n.onready=function(){this.attrs.username&&!this.attrs.email?this.$("[name=email]").select():this.$("[name=username]").select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.submitData();Ui.request({url:Ui.forum.attribute("baseUrl")+"/register",method:"POST",body:e,errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.submitData=function(){var t=this.attrs.token?{token:this.attrs.token}:{password:this.password()};return w({username:this.username(),email:this.email()},t)},e}(Ft),Lt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).identification=void 0,e.password=void 0,e.remember=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.identification=Pt(this.attrs.identification||""),this.password=Pt(this.attrs.password||""),this.remember=Pt(!!this.attrs.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return Ui.translator.trans("core.forum.log_in.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.body=function(){return[m(It,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new P,e=ot(Ui.translator.trans("core.forum.log_in.username_or_email_placeholder")),n=ot(Ui.translator.trans("core.forum.log_in.password_placeholder"));return t.add("identification",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"identification",type:"text",placeholder:e,"aria-label":e,bidi:this.identification,disabled:this.loading})),30),t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",autocomplete:"current-password",placeholder:n,"aria-label":n,bidi:this.password,disabled:this.loading})),20),t.add("remember",m("div",{className:"Form-group"},m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:this.remember,disabled:this.loading}),Ui.translator.trans("core.forum.log_in.remember_me_label")))),10),t.add("submit",m("div",{className:"Form-group"},m(gt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Ui.translator.trans("core.forum.log_in.submit_button"))),-10),t},n.footer=function(){return m("[",null,m("p",{className:"LogInModal-forgotPassword"},m("a",{onclick:this.forgotPassword.bind(this)},Ui.translator.trans("core.forum.log_in.forgot_password_link"))),Ui.forum.attribute("allowSignUp")&&m("p",{className:"LogInModal-signUp"},Ui.translator.trans("core.forum.log_in.sign_up_text",{a:m("a",{onclick:this.signUp.bind(this)})})))},n.forgotPassword=function(){var t=this.identification(),e=t.includes("@")?{email:t}:void 0;Ui.modal.show(Bt,e)},n.signUp=function(){var t,e=this.identification(),n=((t={})[e.includes("@")?"email":"username"]=e,t);Ui.modal.show(Ot,n)},n.onready=function(){this.$("[name="+(this.identification()?"password":"identification")+"]").trigger("select")},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,Ui.session.login(this.loginParams(),{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.loginParams=function(){return{identification:this.identification(),password:this.password(),remember:this.remember()}},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=Ui.translator.trans("core.forum.log_in.invalid_login_message"),this.password("")),t.prototype.onerror.call(this,e)},e}(Ft),Mt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).discussion=void 0,e.currentTitle=void 0,e.newTitle=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.currentTitle=this.attrs.currentTitle,this.newTitle=Pt(this.currentTitle)},n.className=function(){return"RenameDiscussionModal Modal--small"},n.title=function(){return Ui.translator.trans("core.forum.rename_discussion.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{className:"FormControl",bidi:this.newTitle,type:"text"})),m("div",{className:"Form-group"},m(gt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Ui.translator.trans("core.forum.rename_discussion.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=this.newTitle(),r=this.currentTitle;if(n&&n!==r)return this.discussion.save({title:n}).then((function(){Ui.viewingDiscussion(e.discussion)&&Ui.current.get("stream").update(),m.redraw(),e.hide()})).catch((function(){e.loading=!1,m.redraw()}));this.hide()},e}(Ft);const $t={controls:function(t,e){var n=this,r=new P;return["user","moderation","destructive"].forEach((function(i){var o=n[i+"Controls"](t,e).toArray();
2o.length&&(o.forEach((function(t){return r.add(t.itemName,t)})),r.add(i+"Separator",m(I,null)))})),r},userControls:function(t,e){var n=this,r=new P;return e instanceof se&&r.add("reply",!Ui.session.user||t.canReply()?m(gt,{icon:"fas fa-reply",onclick:function(){return n.replyAction.bind(t)(!0,!1).catch((function(){}))}},Ui.translator.trans(Ui.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button")):m(gt,{icon:"fas fa-reply",className:"disabled",title:ot(Ui.translator.trans("core.forum.discussion_controls.cannot_reply_text"))},Ui.translator.trans("core.forum.discussion_controls.cannot_reply_button"))),r},moderationControls:function(t){var e=new P;return t.canRename()&&e.add("rename",m(gt,{icon:"fas fa-pencil-alt",onclick:this.renameAction.bind(t)},Ui.translator.trans("core.forum.discussion_controls.rename_button"))),e},destructiveControls:function(t){var e=new P;return t.isHidden()?(t.canHide()&&e.add("restore",m(gt,{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},Ui.translator.trans("core.forum.discussion_controls.restore_button"))),t.canDelete()&&e.add("delete",m(gt,{icon:"fas fa-times",onclick:this.deleteAction.bind(t)},Ui.translator.trans("core.forum.discussion_controls.delete_forever_button")))):t.canHide()&&e.add("hide",m(gt,{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},Ui.translator.trans("core.forum.discussion_controls.delete_button"))),e},replyAction:function(t,e){var n=this;return new Promise((function(r,i){return Ui.session.user?n.canReply()?(Ui.composer.composingReplyTo(n)&&!e||Ui.composer.load(St,{user:Ui.session.user,discussion:n}),Ui.composer.show(),t&&Ui.viewingDiscussion(n)&&!Ui.composer.isFullScreen()&&Ui.current.get("stream").goToNumber("reply"),r(Ui.composer)):i():(Ui.modal.show(Lt),i())}))},hideAction:function(){return this.pushData({attributes:{hiddenAt:new Date},relationships:{hiddenUser:Ui.session.user}}),this.save({isHidden:!0})},restoreAction:function(){return this.pushData({attributes:{hiddenAt:null},relationships:{hiddenUser:null}}),this.save({isHidden:!1})},deleteAction:function(){var t=this;if(confirm(ot(Ui.translator.trans("core.forum.discussion_controls.delete_confirmation"))))return Ui.viewingDiscussion(this)&&Ui.history.back(),this.delete().then((function(){return Ui.discussions.removeDiscussion(t)}))},renameAction:function(){return Ui.modal.show(Mt,{currentTitle:this.title(),discussion:this})}};function jt(t){var e,n,r,i,o=$(t),s=!1,a=!1,u=0,l=function(t,e){var n;void 0===e&&(e={}),(n=e).duration||(n.duration="fast"),e.step=function(t){$(this).css("transform","translate("+t+"px, 0)")},o.find(".Slidable-content").animate({"background-position-x":t},e)},c=function(){l(0,{complete:function(){o.removeClass("sliding"),e.hide(),n.hide(),a=!1}})};return o.find(".Slidable-content").on("touchstart",(function(t){e=o.find(".Slidable-underneath--left:not(.disabled)"),n=o.find(".Slidable-underneath--right:not(.disabled)"),r=t.originalEvent.targetTouches[0].clientX,i=t.originalEvent.targetTouches[0].clientY,s=!0,u=0})).on("touchmove",(function(t){var l=t.originalEvent.targetTouches[0].clientX,c=t.originalEvent.targetTouches[0].clientY;if(s&&Math.abs(l-r)>Math.abs(c-i)&&(a=!0),s=!1,a){u=l-r;var d=function(t,e){if(t.length){var n="left"===e?u>0:u<0;n&&t.hasClass("Slidable-underneath--elastic")&&(u-=.5*u),t.toggle(n);var r=Math.max(0,Math.min(1,(Math.abs(u)-25)/50));t.find(".icon").css("transform","scale("+r+")")}else u=Math["left"===e?"min":"max"](0,u)};d(e,"left"),d(n,"right"),$(this).css("transform","translate("+u+"px, 0)"),$(this).css("background-position-x",u+"px"),o.toggleClass("sliding",!!u),t.preventDefault()}})).on("touchend",(function(){var t=function(t){t.click(),t.hasClass("Slidable-underneath--elastic")?c():l((u>0?1:-1)*o.width())};n.length&&u<-50?t(n):e.length&&u>50?t(e):c(),s=!1,a=!1})),{reset:c}}var Rt=/[.*+?^${}()|[\]\\]/g;function Ht(t){return t.replace(Rt,"\\$&")}var Ut=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).subtree=void 0,e.highlightRegExp=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.subtree=new ct((function(){return n.attrs.discussion.freshness}),(function(){var t=Ui.session.user&&Ui.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return n.active()}
2))},n.elementAttrs=function(){return{className:L("DiscussionListItem",{active:this.active(),"DiscussionListItem--hidden":this.attrs.discussion.isHidden(),Slidable:"ontouchstart"in window})}},n.view=function(){var t=this.attrs.discussion,e=$t.controls(t,this).toArray(),n=this.elementAttrs();return m("div",n,this.controlsView(e),this.slidableUnderneathView(),this.contentView())},n.controlsView=function(t){return!!t.length&&m(at,{icon:"fas fa-ellipsis-v",className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right",accessibleToggleLabel:Ui.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},t)},n.slidableUnderneathView=function(){var t=this.attrs.discussion.isUnread();return m("span",{className:L("Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic",{disabled:!t}),onclick:this.markAsRead.bind(this)},et("fas fa-check"))},n.contentView=function(){var t=this.attrs.discussion,e=t.isUnread(),n=t.isRead();return m("div",{className:L("DiscussionListItem-content","Slidable-content",{unread:e,read:n})},this.authorAvatarView(),this.badgesView(),this.mainView(),this.replyCountItem())},n.authorAvatarView=function(){var t=this.attrs.discussion,e=t.user();return m(At,{text:Ui.translator.trans("core.forum.discussion_list.started_text",{user:e,ago:it(t.createdAt())}),position:"right"},m(W,{className:"DiscussionListItem-author",href:e?Ui.route.user(e):"#"},G(e||null,{title:""})))},n.badgesView=function(){var t=this.attrs.discussion;return m("ul",{className:"DiscussionListItem-badges badges"},R(t.badges().toArray()))},n.mainView=function(){var t=this.attrs.discussion,e=this.getJumpTo();return m(W,{href:Ui.route.discussion(t,e),className:"DiscussionListItem-main"},m("h2",{className:"DiscussionListItem-title"},tt(t.title(),this.highlightRegExp)),m("ul",{className:"DiscussionListItem-info"},R(this.infoItems().toArray())))},n.getJumpTo=function(){var t=this.attrs.discussion,e=0;if(this.attrs.params.q){var n=t.mostRelevantPost();n&&(e=n.number());var r=Ht(this.attrs.params.q);this.highlightRegExp=new RegExp(r+"|"+r.trim().replace(/\s+/g,"|"),"gi")}else{var i;e=Math.min(null!=(i=t.lastPostNumber())?i:0,(t.lastReadPostNumber()||0)+1)}return e},n.oncreate=function(e){if(t.prototype.oncreate.call(this,e),"ontouchstart"in window){var n=jt(this.element);this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return n.reset()}))}},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.active=function(){return Ui.current.matches(se,{discussion:this.attrs.discussion})},n.showFirstPost=function(){var t;return["newest","oldest"].includes(null!=(t=this.attrs.params.sort)?t:"")},n.showRepliesCount=function(){return"replies"===this.attrs.params.sort},n.markAsRead=function(){var t=this.attrs.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new P;if(this.attrs.params.q){var e=this.attrs.discussion.mostRelevantPost()||this.attrs.discussion.firstPost();if(e&&"comment"===e.contentType()){var n,r=tt(null!=(n=e.contentPlain())?n:"",this.highlightRegExp,175);t.add("excerpt",r,-100)}}else t.add("terminalPost",m(lt,{discussion:this.attrs.discussion,lastPost:!this.showFirstPost()}));return t},n.replyCountItem=function(){var t=this.attrs.discussion;return!this.showRepliesCount()&&t.isUnread()?m("button",{className:"Button--ua-reset DiscussionListItem-count",onclick:this.markAsRead.bind(this)},m("span",{"aria-hidden":"true"},st(t.unreadCount())),m("span",{className:"visually-hidden"},Ui.translator.trans("core.forum.discussion_list.unread_replies_a11y_label",{count:t.replyCount()}))):m("span",{className:"DiscussionListItem-count"},m("span",{"aria-hidden":"true"},st(t.replyCount())),m("span",{className:"visually-hidden"},Ui.translator.trans("core.forum.discussion_list.total_replies_a11y_label",{count:t.replyCount()})))},e}(A),qt=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.attrs.text))},e}(A),zt=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){var t,e=this.attrs.state,n=e.getParams(),r=e.isInitialLoading()||e.isLoadingNext();if(r?t=m(ht,null):e.hasNext()&&(t=m(gt,{className:"Button",onclick:e.loadNext.bind(e)},Ui.translator.trans("core.forum.discussion_list.load_more_button"))),e.isEmpty()){var i=Ui.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},m(qt,{text:i}))}var o=e.pageSize;return m("div",{className:L("DiscussionList",{"DiscussionList--searchResults":e.isSearchResults()})},m("ul",{role:"feed","aria-busy":r,className:"DiscussionList-discussions"},e.getPages().map((function(t,e){return t.items.map((function(t,r){return m("li",{key:t.id(),"data-id":t.id(),role:"article","aria-setsize":"-1","aria-posinset":e*o+r},m(Ut,{discussion:t,params:n}))}))}))),m("div",{className:"DiscussionList-loadMore"},t))},e}(A),Vt=function(t){t.pageX<10&&Ui.pane.show()},Wt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){if(this.attrs.state.hasItems())return m("aside",{className:"DiscussionPage-list"},this.enoughSpace()&&m(zt,{state:this.attrs.state}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n=$(e.dom),r=Ui.pane;if(n.hover(r.show.bind(r),r.onmouseleave.bind(r)),$(document).on("mousemove",Vt),Ui.previous.matches(se)){var i=Ui.cache.discussionListPaneScrollTop||0;n.scrollTop(i)}else{var o=n.find(".DiscussionListItem.active");if(o.length){var s=n.offset().top,a=s+n.outerHeight(),u=o.offset().top,l=u+o.outerHeight();(u<s||l>a)&&n.scrollTop(n.scrollTop()-s+u)}}},n.onremove=function(t){Ui.cache.discussionListPaneScrollTop=$(t.dom).scrollTop(),$(document).off("mousemove",Vt)},n.enoughSpace=function(){return!$(".App-navigation").is(":visible")},e}(A),Gt=function(){function t(t){this.callback=t,this.ticking=!1}var e=t.prototype;return e.loop=function(){var t=this;
2this.ticking||(requestAnimationFrame((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}(),Yt=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},G(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))},e}(A);function Kt(t){var e=t&&t.displayName()||p.translator.trans("core.lib.username.deleted_text");return m("span",{className:"username"},e)}var Xt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(t){t.className=t.className||"",t.surround=t.surround||function(t){return t()}};var n=e.prototype;return n.view=function(){return m("div",{className:this.attrs.className})},n.oncreate=function(e){var n,r=this;t.prototype.oncreate.call(this,e);var i=function(){if(r.attrs.composer.isVisible()){var t=r.attrs.composer.fields.content();n!==t&&(n=t,r.attrs.surround((function(){return s9e.TextFormatter.preview(n||"",e.dom)})))}};i(),this.updateInterval=setInterval(i,50)},n.onremove=function(e){t.prototype.onremove.call(this,e),clearInterval(this.updateInterval)},e}(A),Jt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){var t=this;return Ui.composer.composingReplyTo(this.attrs.discussion)?m("article",{className:"Post CommentPost editing","aria-busy":"true"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},G(Ui.session.user,{className:"PostUser-avatar"}),Kt(Ui.session.user)),m("ul",{className:"PostUser-badges badges"},R(Ui.session.user.badges().toArray())))),m(Xt,{className:"Post-body",composer:Ui.composer,surround:this.anchorPreview.bind(this)})):m("button",{className:"Post ReplyPlaceholder",onclick:function(){$t.replyAction.call(t.attrs.discussion,!0).catch((function(){}))}},m("span",{className:"Post-header"},G(Ui.session.user,{className:"PostUser-avatar"})," ",Ui.translator.trans("core.forum.post_stream.reply_placeholder")))},n.anchorPreview=function(t){var e=$(window).scrollTop()+$(window).height()>=$(document).height();t(),e&&$(window).scrollTop($(document).height())},e}(A),Qt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.stream=this.attrs.stream,this.scrollListener=new Gt(this.onscroll.bind(this))},n.view=function(){var t,e=this,n=this.stream.viewingEnd(),r=this.stream.posts(),i=this.discussion.postIds(),o=function(t){$(t.dom).addClass("fadeIn"),setTimeout((function(){return $(t.dom).removeClass("fadeIn")}),500)},s=r.map((function(n,r){var s,a={"data-index":e.stream.visibleStart+r};if(n){var u=n.createdAt(),l=Ui.postComponents[n.contentType()];s=!!l&&m(l,{post:n}),a.key="post"+n.id(),a.oncreate=o,a["data-time"]=u.toISOString(),a["data-number"]=n.number(),a["data-id"]=n.id(),a["data-type"]=n.contentType();var c=u-t;c>3456e5&&(s=[m("div",{className:"PostStream-timeGap"},m("span",null,Ui.translator.trans("core.forum.post_stream.time_lapsed_text",{period:dayjs().add(c,"ms").fromNow(!0)}))),s]),t=u}else a.key="post"+i[e.stream.visibleStart+r],s=m(Yt,null);return m("div",Object.assign({className:"PostStream-item"},a),s)}));return!n&&r[this.stream.visibleEnd-this.stream.visibleStart-1]&&s.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(gt,{className:"Button",onclick:this.stream.loadNext.bind(this.stream)},Ui.translator.trans("core.forum.post_stream.load_more_button")))),n&&s.push.apply(s,this.endItems().toArray()),!n||Ui.session.user&&!this.discussion.canReply()||s.push(m("div",{className:"PostStream-item",key:"reply","data-index":this.stream.count(),oncreate:o},m(Jt,{discussion:this.discussion}))),m("div",{className:"PostStream",role:"feed","aria-live":"off","aria-busy":this.stream.pagesLoading?"true":"false"},s)},n.endItems=function(){return new P},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.triggerScroll()},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.triggerScroll(),setTimeout((function(){return n.scrollListener.start()}))},n.onremove=function(e){t.prototype.onremove.call(this,e),this.scrollListener.stop(),clearTimeout(this.calculatePositionTimeout)},n.triggerScroll=function(){if(this.stream.needsScroll){var t=this.stream.targetPost;
2this.stream.needsScroll=!1,"number"in t?this.scrollToNumber(t.number,this.stream.animateScroll):"index"in t&&this.scrollToIndex(t.index,this.stream.animateScroll,t.reply)}},n.onscroll=function(t){void 0===t&&(t=window.pageYOffset),this.stream.paused||this.stream.pagesLoading||(this.updateScrubber(t),this.loadPostsIfNeeded(t),clearTimeout(this.calculatePositionTimeout),this.calculatePositionTimeout=setTimeout(this.calculatePosition.bind(this,t),100))},n.loadPostsIfNeeded=function(t){void 0===t&&(t=window.pageYOffset);var e=this.getMarginTop(),n=$(window).height()-e,r=t+e;if(this.stream.visibleStart>0){var i=this.$(".PostStream-item[data-index="+this.stream.visibleStart+"]");i.length&&i.offset().top>r-300&&this.stream.loadPrevious()}if(this.stream.visibleEnd<this.stream.count()){var o=this.$(".PostStream-item[data-index="+(this.stream.visibleEnd-1)+"]");o.length&&o.offset().top+o.outerHeight(!0)<r+n+300&&this.stream.loadNext()}},n.updateScrubber=function(t){void 0===t&&(t=window.pageYOffset);var e=this.getMarginTop(),n=$(window).height()-e,r=t+e,i=this.$(".PostStream-item[data-index]"),o=0,s="",a=null;i.each((function(){var t=$(this),e=t.offset().top,i=t.outerHeight(!0);if(e+i<r)return!0;if(e>r+n)return!1;var u=Math.max(0,r-e),l=Math.min(i,r+n-e)-u;null===a&&(a=parseFloat(t.data("index"))+u/i),l>0&&(o+=l/i);var c=t.data("time");c&&(s=c)})),this.stream.index=null!==a?a+1:this.stream.count(),this.stream.visible=o,s&&(this.stream.description=dayjs(s).format("MMMM YYYY"))},n.calculatePosition=function(t){void 0===t&&(t=window.pageYOffset);var e,n,r=this.getMarginTop(),i=$(window),o=i.height()-r,s=i.scrollTop()+r,a=t+r;this.$(".PostStream-item").each((function(){var t=$(this),r=t.offset().top,i=t.outerHeight(!0),u=Math.max(0,a-r);if(void 0===e&&(u/i<.75||(i-u)/o>.25)&&(e=t.data("number")),r+i>s){if(!(r+i<s+o))return!1;t.data("number")&&(n=t.data("number"))}})),e&&this.attrs.onPositionChange(e||1,n,e)},n.getMarginTop=function(){var t="phone"===Ui.screen()?"#app-navigation":"#header";return this.$()&&$(t).outerHeight()+parseInt(this.$().css("margin-top"),10)},n.scrollToNumber=function(t,e){var n=this.$(".PostStream-item[data-number="+t+"]");return this.scrollToItem(n,e).then(this.flashItem.bind(this,n))},n.scrollToIndex=function(t,e,n){var r=n?$(".PostStream-item:last-child"):this.$(".PostStream-item[data-index="+t+"]");this.scrollToItem(r,e,!0,n),n&&this.flashItem(r)},n.scrollToItem=function(t,e,n,r){var i=this,o=$("html, body").stop(!0),s=t.data("index");if(t.length){var a=t.offset().top-this.getMarginTop(),u=t.offset().top+t.height(),l=$(document).scrollTop(),c=l+$(window).height();if(n||a<l||u>c){var d=r?u-$(window).height()+Ui.composer.computedHeight():t.is(":first-child")?0:a;e?d!==l&&o.animate({scrollTop:d},"fast"):o.scrollTop(d)}}var h=function(){i.updateScrubber(),void 0!==s&&(i.stream.index=s+1)};return h(),this.stream.forceUpdateScrubber=!0,Promise.all([o.promise(),this.stream.loadPromise]).then((function(){var t;if(m.redraw.sync(),r){var e=$(".PostStream-item:last-child");$(window).scrollTop(e.offset().top+e.height()-$(window).height()+Ui.composer.computedHeight())}else 0===s?$(window).scrollTop(0):(t=$(".PostStream-item[data-index="+s+"]").offset())&&$(window).scrollTop(t.top-i.getMarginTop());h(),i.calculatePosition(),i.stream.paused=!1,i.loadPostsIfNeeded()}))},n.flashItem=function(t){t.removeClass("fadeIn"),t.addClass("flash").on("animationend webkitAnimationEnd",(function(e){t.removeClass("flash")}))},e}(A);function Zt(t,e){return void 0===e&&(e=p.data.locale),new Intl.NumberFormat(e).format(t)}var te=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.stream=this.attrs.stream,this.handlers={},this.scrollListener=new Gt(this.updateScrubberValues.bind(this,{fromScroll:!0,forceHeightChange:!0}))},n.view=function(){var t=this.stream.count(),e=Ui.translator.trans("core.forum.post_scrubber.viewing_text",{count:t,index:m("span",{className:"Scrubber-index"}),formattedCount:m("span",{className:"Scrubber-count"},Zt(t))}),n=this.stream.discussion.unreadCount(),r=t?Math.min(t-this.stream.index,n)/t:0;
2function i(t){var e=$(t.dom),n={top:100-100*r+"%",height:100*r+"%",opacity:r?1:0};t.state.oldStyle?e.stop(!0).css(t.state.oldStyle).animate(n):e.css(n),t.state.oldStyle=n}var o=["PostStreamScrubber","Dropdown"];return this.attrs.className&&o.push(this.attrs.className),m("div",{className:o.join(" ")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},e," ",et("fas fa-sort")),m("div",{className:"Dropdown-menu dropdown-menu"},m("div",{className:"Scrubber"},m("a",{className:"Scrubber-first",onclick:this.goToFirst.bind(this)},et("fas fa-angle-double-up")," ",Ui.translator.trans("core.forum.post_scrubber.original_post_link")),m("div",{className:"Scrubber-scrollbar"},m("div",{className:"Scrubber-before"}),m("div",{className:"Scrubber-handle"},m("div",{className:"Scrubber-bar"}),m("div",{className:"Scrubber-info"},m("strong",null,e),m("span",{className:"Scrubber-description"}))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",oncreate:i,onupdate:i},Ui.translator.trans("core.forum.post_scrubber.unread_text",{count:n}))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},et("fas fa-angle-double-down")," ",Ui.translator.trans("core.forum.post_scrubber.now_link")))))},n.onupdate=function(e){var n=this;t.prototype.onupdate.call(this,e),this.stream.forceUpdateScrubber&&(this.stream.forceUpdateScrubber=!1,this.stream.loadPromise.then((function(){return n.updateScrubberValues({animate:!0,forceHeightChange:!0})})))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),$(window).on("resize",this.handlers.onresize=this.onresize.bind(this)).resize(),this.$(".Scrubber-scrollbar").bind("click",this.onclick.bind(this)).bind("dragstart mousedown touchstart",(function(t){return t.preventDefault()})),this.dragging=!1,this.mouseStart=0,this.indexStart=0,this.$(".Scrubber-handle").bind("mousedown touchstart",this.onmousedown.bind(this)).click((function(t){return t.stopPropagation()})),$(document).on("mousemove touchmove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup touchend",this.handlers.onmouseup=this.onmouseup.bind(this)),setTimeout((function(){return n.scrollListener.start()})),this.stream.loadPromise.then((function(){return n.updateScrubberValues({animate:!1,forceHeightChange:!0})}))},n.onremove=function(e){t.prototype.onremove.call(this,e),this.scrollListener.stop(),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove touchmove",this.handlers.onmousemove).off("mouseup touchend",this.handlers.onmouseup)},n.updateScrubberValues=function(t){var e=this;void 0===t&&(t={});var n=this.stream.index,r=this.stream.count(),i=this.stream.visible||1,o=this.percentPerPost(),s=this.$();s.find(".Scrubber-index").text(Zt(this.stream.sanitizeIndex(Math.max(1,n)))),s.find(".Scrubber-description").text(this.stream.description),s.toggleClass("disabled",this.stream.disabled());var a={};if(a.before=Math.max(0,o.index*Math.min(n-1,r-i)),a.handle=Math.min(100-a.before,o.visible*i),a.after=100-a.before-a.handle,!(t.fromScroll&&this.stream.paused||this.adjustingHeight&&!t.forceHeightChange)){var u=t.animate?"animate":"css";this.adjustingHeight=!0;var l=[];for(var c in a){var d=s.find(".Scrubber-"+c);l.push(d.stop(!0,!0)[u]({height:a[c]+"%"},"fast").promise()),"animate"===u&&d.css("overflow","visible")}Promise.all(l).then((function(){return e.adjustingHeight=!1}))}},n.goToFirst=function(){this.stream.goToFirst(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.goToLast=function(){this.stream.goToLast(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.onresize=function(){var t=this.$(),e=this.$(".Scrubber-scrollbar");e.css("max-height",$(window).height()-t.offset().top+$(window).scrollTop()-parseInt($("#app").css("padding-bottom"),10)-(t.outerHeight()-e.outerHeight()))},n.onmousedown=function(t){t.redraw=!1,this.mouseStart=t.clientY||t.originalEvent.touches[0].clientY,this.indexStart=this.stream.index,this.dragging=!0,$("body").css("cursor","move"),this.$().toggleClass("dragging",this.dragging)},n.onmousemove=function(t){if(this.dragging){var e=((t.clientY||t.originalEvent.touches[0].clientY)-this.mouseStart)/this.$(".Scrubber-scrollbar").outerHeight()*100/this.percentPerPost().index||0,n=Math.min(this.indexStart+e,this.stream.count()-1);this.stream.index=Math.max(0,n),this.updateScrubberValues()}},n.onmouseup=function(){if(this.$().toggleClass("dragging",this.dragging),this.dragging){this.mouseStart=0,this.indexStart=0,this.dragging=!1,$("body").css("cursor",""),this.$().removeClass("open");var t=Math.floor(this.stream.index);this.stream.goToIndex(t)}},n.onclick=function(t){var e=this.$(".Scrubber-scrollbar"),n=((t.pageY||t.originalEvent.touches[0].pageY)-e.offset().top+$("body").scrollTop())/e.outerHeight()*100,r=(n-=parseFloat(e.find(".Scrubber-handle")[0].style.height)/2)/this.percentPerPost().index;r=Math.max(0,Math.min(this.stream.count()-1,r)),this.stream.goToIndex(Math.floor(r)),this.updateScrubberValues({animate:!0,forceHeight
2Change:!0}),this.$().removeClass("open")},n.percentPerPost=function(){var t=this.stream.count()||1,e=this.stream.visible||1,n=50/this.$(".Scrubber-scrollbar").outerHeight()*100,r=Math.max(100/t,n/e);return{index:t===e?0:(100-r*e)/(t-e),visible:r}},e}(A),ee=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=L(e.className,"Dropdown--split"),e.menuClassName=L(e.menuClassName,"Dropdown-menu--right")};var n=e.prototype;return n.getButton=function(t){var e=this.getFirstChild(t),n=Object.assign({},null==e?void 0:e.attrs);return n.className=L(n.className,"SplitDropdown-button Button",this.attrs.buttonClassName),m("[",null,m(gt,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"},this.attrs.icon?et(this.attrs.icon,{className:"Button-icon"}):null,et("fas fa-caret-down",{className:"Button-caret"})))},n.getFirstChild=function(t){for(var e=t;e instanceof Array;)e=e[0];return e},e}(at);function ne(t,e,n,r){var i,o=!1,s=0;function a(){i&&clearTimeout(i)}function u(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var d=this,h=Date.now()-s;function f(){s=Date.now(),n.apply(d,l)}function p(){i=void 0}o||(r&&!i&&f(),a(),void 0===r&&h>t?f():!0!==e&&(i=setTimeout(r?p:f,void 0===r?t-h:t)))}return"boolean"!=typeof e&&(r=n,n=e,e=void 0),u.cancel=function(){a(),o=!0},u}function re(t,e,n){return void 0===n?ne(t,e,!1):ne(t,n,!1!==e)}function ie(t,e){var n=$(window),r=$(t).offset().top-n.scrollTop();e(),n.scrollTop($(t).offset().top-r)}var oe=function(){function t(t,e){void 0===e&&(e=[]),this.discussion=void 0,this.paused=!1,this.loadPageTimeouts={},this.pagesLoading=0,this.index=0,this.number=1,this.visible=1,this.visibleStart=0,this.visibleEnd=0,this.animateScroll=!1,this.needsScroll=!1,this.targetPost=null,this.description="",this.forceUpdateScrubber=!1,this.loadPromise=null,this.loadNext=void 0,this.loadPrevious=void 0,this.discussion=t,this.loadNext=ne(300,this._loadNext),this.loadPrevious=ne(300,this._loadPrevious),this.show(e)}var e=t.prototype;return e.update=function(){return this.viewingEnd()?(this.visibleEnd=this.count(),this.loadRange(this.visibleStart,this.visibleEnd)):Promise.resolve()},e.goToFirst=function(){return this.goToIndex(0)},e.goToLast=function(){return this.goToIndex(this.count()-1,!0)},e.goToNumber=function(t,e){if(void 0===e&&(e=!1),"reply"===t){var n=this.goToLast();return this.targetPost=w({},this.targetPost,{reply:!0}),n}return this.paused=!0,this.loadPromise=this.loadNearNumber(t),this.needsScroll=!0,this.targetPost={number:t},this.animateScroll=!e,this.number=t,this.loadPromise.then((function(){return m.redraw()}))},e.goToIndex=function(t,e){return void 0===e&&(e=!1),this.paused=!0,this.loadPromise=this.loadNearIndex(t),this.needsScroll=!0,this.targetPost={index:t},this.animateScroll=!e,this.index=t,m.redraw(),this.loadPromise},e.loadNearNumber=function(t){return this.posts().some((function(e){return e&&Number(e.number())===Number(t)}))?Promise.resolve():(this.reset(),Ui.store.find("posts",{filter:{discussion:this.discussion.id()},page:{near:t}}).then(this.show.bind(this)))},e.loadNearIndex=function(e){if(e>=this.visibleStart&&e<this.visibleEnd)return Promise.resolve();var n=this.sanitizeIndex(e-t.loadCount/2),r=n+t.loadCount;return this.reset(n,r),this.loadRange(n,r).then(this.show.bind(this))},e._loadNext=function(){var e=this.visibleEnd,n=this.visibleEnd=this.sanitizeIndex(this.visibleEnd+t.loadCount),r=e-2*t.loadCount;r>this.visibleStart&&r>=0&&(this.visibleStart=r+t.loadCount+1,this.loadPageTimeouts[r]&&(clearTimeout(this.loadPageTimeouts[r]),delete this.loadPageTimeouts[r],this.pagesLoading--)),this.loadPage(e,n)},e._loadPrevious=function(){var e=this.visibleStart,n=this.visibleStart=this.sanitizeIndex(this.visibleStart-t.loadCount),r=n+2*t.loadCount;r<this.visibleEnd&&r<=this.count()&&(this.visibleEnd=r,this.loadPageTimeouts[r]&&(clearTimeout(this.loadPageTimeouts[r]),delete this.loadPageTimeouts[r],this.pagesLoading--)),this.loadPage(n,e,!0)},e.loadPage=function(t,e,n){var r=this;void 0===n&&(n=!1),this.pagesLoading++;var i=function(){t<r.visibleStart||e>r.visibleEnd||ie('.PostStream-item[data-index="'+(n?r.visibleEnd-1:r.visibleStart)+'"]',m.redraw.sync)};i(),this.loadPageTimeouts[t]=setTimeout((function(){r.loadRange(t,e).then((function(){i(),r.pagesLoading--})),delete r.loadPageTimeouts[t]}),this.pagesLoading-1?1e3:0)},e.loadRange=function(t,e){var n=[],r=[];return this.discussion.postIds().slice(t,e).forEach((function(t){var e=Ui.store.getById("posts",t);e&&e.discussion()&&void 0!==e.canEdit()?r.push(e):n.push(t)})),n.length?Ui.store.find("posts",n).then((function(t){return r.concat(t).sort((function(t,e){return t.number()-e.number()}))})):Promise.resolve(r)},e.show=function(t){var e;this.visibleStart=t.length?this.discussion.postIds().indexOf(null!=(e=t[0].id())?e:"0"):0,this.visibleEnd=this.sanitizeIndex(this.visibleStart+t.length)},e.reset=function(e,n){this.visibleStart=e||0,this.visibleEnd=this.sanitizeIndex(n||t.loadCount)},e.posts=function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map((function(t){var e=Ui.store.getById("posts",t);return e&&e.discussion()&&void 0!==e.canEdit()?e:null}))},e.count=function(){return this.discussion.postIds().length},e.disabled=function(){return this.visible>=this.count()},e.viewingEnd=function(){return Math.abs(this.count()-this.visibleEnd)<=1},e.sanitizeIndex=function(t){return Math.max(0,Math.min(this.count(),Math.floor(t)))},t}();oe.loadCount=20;var se=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).discussion=null,e.stream=null,e.near=0,e.useBrowserScrollRestoration=!0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){var n,r;t.prototype.oninit.call(this,e),this.load(),(Ui.discussions.hasItems()||Ui.discussions.isLoading())&&(null==(n=Ui.pane)||n.enable(),null==(r=Ui.pane)||r.hide()),this.bodyClass="App--discussion"},n.onremove=function(e){var n,r,i;t.prototype.onremove.call(this,e),null==(n=Ui.pane)||n.disable(),!this.discussion||!Ui.composer.composingReplyTo(this.discussion)||null!=(r=Ui.composer)&&null!=(i=r.fields)&&i.content()?Ui.composer.minimize():Ui.composer.hide()},n.view=function(){return m("div",{className:"DiscussionPage"},m(Wt,{state:Ui.discussions}),m("div",{className:"DiscussionPage-discussion"},this.discussion?this.pageContent().toArray():this.loadingItems().toArray()))},n.loadingItems=function(){var t=new P;return t.add("spinner",m(ht,null),100),t},n.sidebar=function(){return m("nav",{className:"DiscussionPage-nav"},m("ul",null,R(this.sidebarItems().toArray())))},n.hero=function(){return m(H,{discussion:this.discussion})},n.pageContent=function(){var t=new P;return t.add("hero",this.hero(),100),t.add("main",m("div",{className:"container"},this.mainContent().toArray()),10),t},n.mainContent=function(){var t=new P;return t.add("sidebar",this.sidebar(),100),t.add("poststream",m("div",{className:"DiscussionPage-stream"},m(Qt,{discussion:this.discussion,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),10),t},n.load=function(){var t=Ui.preloadedApiDocument();if(t)setTimeout(this.show.bind(this,t),0);
2else{var e=this.requestParams();Ui.store.find("discussions",m.route.param("id"),e).then(this.show.bind(this))}m.redraw()},n.requestParams=function(){return{bySlug:!0,page:{near:this.near}}},n.show=function(t){var e,n,r=this;Ui.history.push("discussion",t.title()),Ui.setTitle(t.title()),Ui.setTitleCount(0);var i=[];if(t.payload&&t.payload.included){var o=t.id();i=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&!Array.isArray(t.relationships.discussion.data)&&t.relationships.discussion.data.id===o})).map((function(t){return Ui.store.getById("posts",t.id)})).sort((function(t,e){return t.number()-e.number()})).slice(0,20)}this.stream=new oe(t,i);var s=m.route.param("near"),a="reply"===s?"reply":parseInt(s);this.stream.goToNumber(a||(null!=(e=null==(n=i[0])?void 0:n.number())?e:0),!0).then((function(){r.discussion=t,Ui.current.set("discussion",t),Ui.current.set("stream",r.stream)}))},n.sidebarItems=function(){var t=new P;return this.discussion&&t.add("controls",m(ee,{icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary",accessibleToggleLabel:Ui.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},$t.controls(this.discussion,this).toArray()),100),t.add("scrubber",m(te,{stream:this.stream,className:"App-titleControl"}),-100),t},n.positionChanged=function(t,e){var n=this.discussion;if(n){var r=Ui.route.discussion(n,this.near=t);window.history.replaceState(null,document.title,r),Ui.history.push("discussion",n.title()),Ui.session.user&&e>(n.lastReadPostNumber()||0)&&(n.save({lastReadPostNumber:e}),m.redraw())}},e}(k),ae=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},R(this.items().toArray()))},n.items=function(){return new P},e}(A),ue=function(t){function e(){return t.apply(this,arguments)||this}return b(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=W,n.attrs.active=String(n.attrs.active),delete n.attrs.type,n},e.isActive=function(t){var e,n;return void 0!==t.active?t.active:(null==(e=m.route.get())?void 0:e.split("?")[0])===(null==(n=t.href)?void 0:n.split("?")[0])},e}(gt),le=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right",e.accessibleToggleLabel=ot(Ui.translator.trans("core.forum.header.session_dropdown_accessible_label"))};var n=e.prototype;return n.view=function(e){return t.prototype.view.call(this,w({},e,{children:this.items().toArray()}))},n.getButtonContent=function(){var t=Ui.session.user;return[G(t)," ",m("span",{className:"Button-label"},Kt(t))]},n.items=function(){var t=new P,e=Ui.session.user;return t.add("profile",m(ue,{icon:"fas fa-user",href:Ui.route.user(e)},Ui.translator.trans("core.forum.header.profile_button")),100),t.add("settings",m(ue,{icon:"fas fa-cog",href:Ui.route("settings")},Ui.translator.trans("core.forum.header.settings_button")),50),Ui.forum.attribute("adminUrl")&&t.add("administration",m(ue,{icon:"fas fa-wrench",href:Ui.forum.attribute("adminUrl"),target:"_blank"},Ui.translator.trans("core.forum.header.admin_button")),0),t.add("separator",m(I,null),-90),t.add("logOut",m(gt,{icon:"fas fa-sign-out-alt",onclick:Ui.session.logout.bind(Ui.session)},Ui.translator.trans("core.forum.header.log_out_button")),-100),t},e}(at);function ce(t){if(!t||"object"!=typeof t||t instanceof Array)return!1;var e=t.tag;return("string"!=typeof e||"a"===e||"button"===e)&&("object"!=typeof e&&"function"!=typeof e||!("initAttrs"in e)||e.initAttrs(t.attrs),"object"!=typeof e&&"function"!=typeof e||!("isActive"in e)?t.attrs.active:e.isActive(t.attrs))}var de=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.initAttrs=function(e){null!=e.caretIcon||(e.caretIcon="fas fa-sort"),t.initAttrs.call(this,e),e.className=L(e.className,"Dropdown--select")},e.prototype.getButtonContent=function(t){var e=t.find(ce),n=e&&"object"==typeof e&&"children"in e&&e.children||this.attrs.defaultLabel;return Array.isArray(n)&&(n=n[0]),[m("span",{className:"Button-label"},n),this.attrs.caretIcon?et(this.attrs.caretIcon,{className:"Button-caret"}):null]},e}(at),he=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=p.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){var n;for(var r in(n=this.data).attributes||(n.attributes={}),e.attributes){var i=e.attributes[r];i&&i instanceof t&&(mt("Providing models as attributes to `Model.pushData()` or `Model.pushAttributes()` is deprecated.","3249"),delete e.attributes[r],e.relationships||(e.relationships={}),e.relationships[r]={data:t.getIdentifier(i)})}Object.assign(this.data.attributes,e.attributes)}if("relationships"in e){var o,s=null!=(o=this.data.relationships)?o:{};for(var a in e.relationships){var u=e.relationships[a];if(null!==u){var l;l=u instanceof t?{data:t.getIdentifier(u)}:u instanceof Array?{data:u.map(t.getIdentifier)}:u,e.relationships[a]=l,s[a]=l}else delete s[a],delete e.relationships[a]}this.data.relationships=s}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 s=e.relationships[o];null!==s&&(i.relationships[o]={data:s instanceof Array?s.map(t.getIdentifier):t.getIdentifier(s)})}delete e.relationships}var a=this.copyData();this.pushData(i);var u={data:i,meta:n.meta||void 0};return p.request(w({method:this.exists?"PATCH":"POST",url:p.forum.attribute("apiUrl")+this.apiEndpoint(),body:u},n)).then((function(t){return r.store.pushPayload(t)}),(function(t){throw r.pushData(a),m.redraw(),t}))},e.delete=function(t,e){var n=this;return void 0===t&&(t={}),void 0===e&&(e={}),this.exists?p.request(w({method:"DELETE",url:p.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(){var e,n,r=null==(e=this.data.relationships)||null==(n=e[t])?void 0:n.data;if(r&&r instanceof Array)throw new Error("Relationship "+t+" on model "+this.data.type+" is plural, so the hasOne method cannot be used to access it.");return!!r&&this.store.getById(r.type,r.id)}},t.hasMany=function(t){return function(){var e,n,r=this,i=null==(e=this.data.relationships)||null==(n=e[t])?void 0:n.data;if(i&&!(i instanceof Array))throw new Error("Relationship "+t+" on model "+this.data.type+" is singular, so the hasMany method cannot be used to access it.");return!!i&&i.map((function(t){return r.store.getById(t.type,t.id)}
2))}},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}();function fe(){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],s={};return function(){var t=this,e=!1;return i.forEach((function(n){var r=t[n],i="function"==typeof r?r.call(t):r;s[n]!==i&&(e=!0,s[n]=i)})),e&&(r=o.apply(this,i.map((function(t){return s[t]})))),r}}function pe(t){if(!t||t.length<4)return!1;var e=t.replace("#","");return 3===e.length&&(e+=e),(299*parseInt(e.slice(0,2),16)+587*parseInt(e.slice(2,4),16)+114*parseInt(e.slice(4,6),16))/1e3<(parseInt(getComputedStyle(document.body).getPropertyValue("--yiq-threshold").trim())||128)}function me(t){return t?pe(t)?"text-contrast--light":"text-contrast--dark":"text-contrast--unchanged"}var ve,ge=["type","icon","label","color","style"],ye=function(t){function e(){return t.apply(this,arguments)||this}return b(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,s=void 0===o?{}:o,a=U(t,ge),u=L("Badge",[e&&"Badge--"+e],a.className,me(i)),l=n?et(n,{className:"Badge-icon"}):m.trust("&nbsp;"),c=w({},s,{"--badge-bg":i}),d=w({},a,{className:u,style:c}),h=m("div",d,l);return r?m(At,{text:r},h):h},e}(A),be=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.title=function(){return he.attribute("title").call(this)},n.slug=function(){return he.attribute("slug").call(this)},n.createdAt=function(){return he.attribute("createdAt",he.transformDate).call(this)},n.user=function(){return he.hasOne("user").call(this)},n.firstPost=function(){return he.hasOne("firstPost").call(this)},n.lastPostedAt=function(){return he.attribute("lastPostedAt",he.transformDate).call(this)},n.lastPostedUser=function(){return he.hasOne("lastPostedUser").call(this)},n.lastPost=function(){return he.hasOne("lastPost").call(this)},n.lastPostNumber=function(){return he.attribute("lastPostNumber").call(this)},n.commentCount=function(){return he.attribute("commentCount").call(this)},n.replyCount=function(){return fe("commentCount",(function(t){var e;return Math.max(0,(null!=(e=t)?e:0)-1)})).call(this)},n.posts=function(){return he.hasMany("posts").call(this)},n.mostRelevantPost=function(){return he.hasOne("mostRelevantPost").call(this)},n.lastReadAt=function(){return he.attribute("lastReadAt",he.transformDate).call(this)},n.lastReadPostNumber=function(){return he.attribute("lastReadPostNumber").call(this)},n.isUnread=function(){return fe("unreadCount",(function(t){return!!t})).call(this)},n.isRead=function(){return fe("unreadCount",(function(t){return!(!p.session.user||t)})).call(this)},n.hiddenAt=function(){return he.attribute("hiddenAt",he.transformDate).call(this)},n.hiddenUser=function(){return he.hasOne("hiddenUser").call(this)},n.isHidden=function(){return fe("hiddenAt",(function(t){return!!t})).call(this)},n.canReply=function(){return he.attribute("canReply").call(this)},n.canRename=function(){return he.attribute("canRename").call(this)},n.canHide=function(){return he.attribute("canHide").call(this)},n.canDelete=function(){return he.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=p.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,s=Math.max(0,(null!=(i=this.lastPostNumber())?i:0)-(this.lastReadPostNumber()||0));return Math.min(s,null!=(o=this.commentCount())?o:0)}return 0},n.badges=function(){var t=new P;return this.isHidden()&&t.add("hidden",m(ye,{type:"hidden",icon:"fas fa-trash",label:p.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}(he),we=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.state;return m("div",{className:"NotificationList"},m("div",{className:"NotificationList-header"},m("h4",{className:"App-titleControl App-titleControl--text"},Ui.translator.trans("core.forum.notifications.title")),m("div",{className:"App-primaryControl"},this.controlItems().toArray())),m("div",{className:"NotificationList-content"},this.content(t)))},n.controlItems=function(){var t=new P,e=this.attrs.state;return t.add("mark_all_as_read",m(At,{text:Ui.translator.trans("core.forum.notifications.mark_all_as_read_tooltip")},m(gt,{className:"Button Button--link","data-container":".NotificationList",icon:"fas fa-check",title:Ui.translator.trans("core.forum.notifications.mark_all_as_read_tooltip"),onclick:e.markAllAsRead.bind(e)})),70),t.add("delete_all",m(At,{text:Ui.translator.trans("core.forum.notifications.delete_all_tooltip")},m(gt,{className:"Button Button--link","data-container":".NotificationList",icon:"fas fa-tras
2h-alt",title:Ui.translator.trans("core.forum.notifications.delete_all_tooltip"),onclick:function(){confirm(Ui.translator.trans("core.forum.notifications.delete_all_confirm"))&&e.deleteAll.call(e)}})),50),t},n.content=function(t){return t.isLoading()?m(ht,{className:"LoadingIndicator--block"}):t.hasItems()?t.getPages().map((function(t){var e=[],n={};return t.items.forEach((function(t){var r=t.subject();if(void 0!==r){var i=null;r instanceof be?i=r:r&&r.discussion&&(i=r.discussion());var o=i?i.id():0;n[o]=n[o]||{discussion:i,notifications:[]},n[o].notifications.push(t),-1===e.indexOf(n[o])&&e.push(n[o])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m(W,{className:"NotificationGroup-header",href:Ui.route.discussion(t.discussion)},e&&!!e.length&&m("ul",{className:"NotificationGroup-badges badges"},R(e)),m("span",null,t.discussion.title())):m("div",{className:"NotificationGroup-header"},Ui.forum.attribute("title")),m("ul",{className:"NotificationGroup-content"},t.notifications.map((function(t){var e=Ui.notificationComponents[t.contentType()];return!!e&&m("li",null,m(e,{notification:t}))}))))}))})):m("div",{className:"NotificationList-empty"},Ui.translator.trans("core.forum.notifications.empty_text"))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$notifications=this.$(".NotificationList-content"),this.$scrollParent=this.inPanel()?this.$notifications:$(window),this.boundScrollHandler=this.scrollHandler.bind(this),this.$scrollParent.on("scroll",this.boundScrollHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),this.$scrollParent.off("scroll",this.boundScrollHandler)},n.scrollHandler=function(){var t=this.attrs.state,e=this.inPanel()?this.$scrollParent[0]:document.documentElement,n=Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<=1;t.hasNext()&&!t.isLoadingNext()&&n&&t.loadNext()},n.inPanel=function(){return"auto"===this.$notifications.css("overflow")},e}(A),De=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(e){e.className||(e.className="NotificationsDropdown"),e.buttonClassName||(e.buttonClassName="Button Button--flat"),e.menuClassName||(e.menuClassName="Dropdown-menu--right"),e.label||(e.label=ot(Ui.translator.trans("core.forum.notifications.tooltip"))),e.icon||(e.icon="fas fa-bell"),e.accessibleToggleLabel||(e.accessibleToggleLabel=ot(Ui.translator.trans("core.forum.notifications.toggle_dropdown_accessible_label"))),t.initAttrs.call(this,e)};var n=e.prototype;return n.getButton=function(e){var n=this.getNewCount(),r=t.prototype.getButton.call(this,e);return r.attrs.title=this.attrs.label,r.attrs.className=L(r.attrs.className,[n&&"new"]),r.attrs.onclick=this.onclick.bind(this),r},n.getButtonContent=function(){var t=this.getUnreadCount();return[this.attrs.icon?et(this.attrs.icon,{className:"Button-icon"}):null,0!==t&&m("span",{className:"NotificationsDropdown-unread"},t),m("span",{className:"Button-label"},this.attrs.label)]},n.getMenu=function(){return m("div",{className:L("Dropdown-menu",this.attrs.menuClassName),onclick:this.menuClick.bind(this)},this.showing&&m(we,{state:this.attrs.state}))},n.onclick=function(){Ui.drawer.isOpen()?this.goToRoute():this.attrs.state.load()},n.goToRoute=function(){m.route.set(Ui.route("notifications"))},n.getUnreadCount=function(){return Ui.session.user.unreadNotificationCount()},n.getNewCount=function(){return Ui.session.user.newNotificationCount()},n.menuClick=function(t){(t.shiftKey||t.metaKey||t.ctrlKey||1===t.button)&&t.stopPropagation()},e}(at);!function(t){t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowDown=40]="ArrowDown",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowRight=39]="ArrowRight",t[t.Tab=9]="Tab",t[t.Backspace=8]="Backspace"}(ve||(ve={}));var xe=function(){function t(){this.callbacks=new Map,this.whenCallback=function(t){return!0}}var e=t.prototype;return e.onUp=function(t){return this.callbacks.set(ve.ArrowUp,(function(e){e.preventDefault(),t(e)})),this},e.onDown=function(t){return this.callbacks.set(ve.ArrowDown,(function(e){e.preventDefault(),t(e)})),this},e.onSelect=function(t,e){void 0===e&&(e=!1);var n=function(e){e.preventDefault(),t(e)};return e||this.callbacks.set(ve.Tab,n),this.callbacks.set(ve.Enter,n),this},e.onTab=function(t){return this.callbacks.set(9,(function(e){e.preventDefault(),t(e)})),this},e.onCancel=function(t){return this.callbacks.set(ve.Escape,(function(e){e.stopPropagation(),e.preventDefault(),t(e)})),this},e.onRemove=function(t){return this.callbacks.set(ve.Backspace,(function(e){e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&0===e.target.selectionStart&&0===e.target.selectionEnd&&(t(e),e.preventDefault())})),this},e.when=function(t){return this.whenCallback=t,this},e.bindTo=function(t){t[0].addEventListener("keydown",this.navigate.bind(this))},e.navigate=function(t){if(this.whenCallback(t)){var e=this.callbacks.get(t.which);e&&e(t)}
2},t}();function Ce(t,e,n,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,i)}function Ae(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){Ce(o,r,i,s,a,"next",t)}function a(t){Ce(o,r,i,s,a,"throw",t)}s(void 0)}))}}var Ee=n(2507),Ne=n.n(Ee),ke=function(){function t(){this.results=new Map}var e=t.prototype;return e.search=function(){var t=Ae(Ne().mark((function t(e){var n,r=this;return Ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=e.toLowerCase(),this.results.set(e,[]),n={filter:{q:e},page:{limit:3},include:"mostRelevantPost"},t.abrupt("return",Ui.store.find("discussions",n).then((function(t){r.results.set(e,t),m.redraw()})));case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.view=function(t){t=t.toLowerCase();var e=(this.results.get(t)||[]).map((function(e){var n,r=e.mostRelevantPost();return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+e.id()},m(W,{href:Ui.route.discussion(e,r&&r.number()||0)},m("div",{className:"DiscussionSearchResult-title"},tt(e.title(),t)),!!r&&m("div",{className:"DiscussionSearchResult-excerpt"},tt(null!=(n=r.contentPlain())?n:"",t,100))))}));return[m("li",{className:"Dropdown-header"},Ui.translator.trans("core.forum.search.discussions_heading")),m("li",null,m(ue,{icon:"fas fa-search",href:Ui.route("index",{q:t})},Ui.translator.trans("core.forum.search.all_discussions_button",{query:t})))].concat(e)},t}(),Se=function(){function t(){this.results=new Map}var e=t.prototype;return e.search=function(){var t=Ae(Ne().mark((function t(e){var n=this;return Ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Ui.store.find("users",{filter:{q:e},page:{limit:5}}).then((function(t){n.results.set(e,t),m.redraw()})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.view=function(t){t=t.toLowerCase();var e=(this.results.get(t)||[]).concat(Ui.store.all("users").filter((function(e){return[e.username(),e.displayName()].some((function(e){return e.toLowerCase().substr(0,t.length)===t}))}))).filter((function(t,e,n){return n.lastIndexOf(t)===e})).sort((function(t,e){return t.displayName().localeCompare(e.displayName())}));return e.length?[m("li",{className:"Dropdown-header"},Ui.translator.trans("core.forum.search.users_heading"))].concat(e.map((function(e){var n=Kt(e),r=[tt(n.text,t)];return m("li",{className:"UserSearchResult","data-index":"users"+e.id()},m(W,{href:Ui.route.user(e)},G(e),w({},n,{text:void 0,children:r})))}))):[]},t}(),Te=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).searchState=void 0,e.hasFocus=!1,e.sources=void 0,e.loadingSources=0,e.index=0,e.navigator=void 0,e.searchTimeout=void 0,e.updateMaxHeightHandler=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.searchState=this.attrs.state},n.view=function(){var t=this,e=this.searchState.getInitialSearch();if(this.sources||(this.sources=this.sourceItems().toArray()),!this.sources.length)return m("div",null);var n=ot(Ui.translator.trans("core.forum.header.search_placeholder")),r=!!e,i=!(!this.searchState.getValue()||!this.hasFocus),o=!(this.loadingSources||!this.searchState.getValue());return m("div",{role:"search","aria-label":Ui.translator.trans("core.forum.header.search_role_label"),className:L("Search",{open:this.searchState.getValue()&&this.hasFocus,focused:this.hasFocus,active:r,loading:!!this.loadingSources})},m("div",{className:"Search-input"},m("input",{"aria-label":n,className:"FormControl",type:"search",placeholder:n,value:this.searchState.getValue(),oninput:function(e){var n;return t.searchState.setValue(null==e||null==(n=e.target)?void 0:n.value)},onfocus:function(){return t.hasFocus=!0},onblur:function(){return t.hasFocus=!1}}),!!this.loadingSources&&m(ht,{size:"small",display:"inline",containerClassName:"Button Button--icon Button--link"}),o&&m("button",{className:"Search-clear Button Button--icon Button--link",onclick:this.clear.bind(this),"aria-label":Ui.translator.trans("core.forum.header.search_clear_button_accessible_label"),type:"button"},et("fas fa-times-circle"))),m("ul",{className:"Dropdown-menu Search-results","aria-hidden":!i||void 0,"aria-live":i?"polite":void 0},i&&this.sources.map((function(e){return e.view(t.searchState.getValue())}))))},n.updateMaxHeight=function(){var t,e,n=window.innerHeight-this.element.querySelector(".Search-input>.FormControl").getBoundingClientRect().bottom-14;null==(t=this.element.querySelector(".Search-results"))||null==(e=t.style)||e.setProperty("max-height",n+"px")},n.onupdate=function(e){var n;t.prototype.onupdate.call(this,e),this.setIndex(this.getCurrentNumericIndex()),null!=(n=this.sources)&&n.length&&this.updateMaxHeight()},n.oncreate=function(e){var n,r=this;if(t.prototype.oncreate.call(this,e),null!=(n=this.sources)&&n.length){var i=this,o=this.searchState;this.setIndex(this.getCurrentNumericIndex()),this.$(".Search-results").on("mousedown",(function(t){return t.preventDefault()})).on("click",(function(){return r.$("input").trigger("blur")})).on("mouseenter","> li:not(.Dropdown-header)",(function(){i.setIndex(i.selectableItems().index(this))}));var s=this.$("input");this.navigator=new xe,this.navigator.onUp((function(){return r.setIndex(r.getCurrentNumericIndex()-1,!0)})).onDown((function(){return r.setIndex(r.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this),!0).onCancel(this.clear.bind(this)).bindTo(s),s.on("input focus",(function(){var t=this.value.toLowerCase();t&&(i.searchTimeout&&clearTimeout(i.searchTimeout),i.searchTimeout=window.setTimeout((function(){var e;o.isCached(t)||(t.length>=i.constructor.MIN_SEARCH_LEN&&(null==(e=i.sources)||e.map((function(e){e.search&&(i.loadingSources++,e.search(t).then((function(){i.loadingSources=Math.max(0,i.loadingSources-1),m.redraw()})))}))),o.cache(t),m.redraw())}),250))})).on("focus",(function(){$(this).one("mouseup",(function(t){return t.preventDefault()})).trigger("select")})),this.updateMaxHeightHandler=this.updateMaxHeight.bind(this),window.addEventListener("resize",this.updateMaxHeightHandler)}},n.onremove=function(e){t.prototype.onremove.call(this,e),this.updateMaxHeightHandler&&window.removeEventListener("resize",this.updateMaxHeightHandler)},n.selectResult=function(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.loadingSources=0;var t=this.getItem(this.index).find("a").attr("href");this.searchState.getValue()&&t?m.route.set(t):this.clear(),this.$("input").blur()},n.clear=function(){this.searchState.clear()},n.sourceItems=function(){var t=new P;return Ui.forum.attribute("canViewForum")&&t.add("discussions",new ke),Ui.forum.attribute("canSearchUsers")&&t.add("users",new Se),t},n.selectableItems=function(){return this.$(".Search-results > li:not(.Dropdown-header)")},n.getCurrentNumericIndex=function(){return Math.max(0,this.selectableItems().index(this.getItem(this.index)))},n.getItem=function(t){var e=this.selectableItems(),n=e.filter('[data-index="'+t+'"]');return n.length||(n=e.eq(t)),n},n.setIndex=function(t,e){void 0===e&&(e=!1);var n=this.selectableItems(),r=n.parent(),i=t;t<0?i=n.length-1:t>=n.length&&(i=0);var o=n.removeClass("active").eq(i).addClass("active");if(this.index=parseInt(o.attr("data-index"))||i,e){var s,a=r.scrollTop(),u=r.offset().top,l=u+r.outerHeight(),c=o.offset().top,d=c+o.outerHeight();c<u?s=a-u+c-parseInt(r.css("padding-top"),10):d>l&&(s=a-l+d+parseInt(r.css("padding-bottom"),10)),void 0!==s&&r.stop(!0).animate({scrollTop:s},100)}},T(e,[{key:"state",get:function(){return mt("`state` property of the Search component is deprecated","3212"),this.searchState},set:function(t){void 0!==t&&mt("`state` property of the Search component is deprecated","3212"),this.searchState=t}}]),e}(A);Te.MIN_SEARCH_LEN=3;var Fe=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-control
2s"},R(this.items().toArray()))},n.items=function(){var t=new P;if(t.add("search",m(Te,{state:Ui.search}),30),Ui.forum.attribute("showLanguageSelector")&&Object.keys(Ui.data.locales).length>1){var e=[],n=function(t){e.push(m(gt,{active:Ui.data.locale===t,icon:Ui.data.locale!==t||"fas fa-check",onclick:function(){Ui.session.user?Ui.session.user.savePreferences({locale:t}).then((function(){return window.location.reload()})):(document.cookie="locale="+t+"; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT",window.location.reload())}},Ui.data.locales[t]))};for(var r in Ui.data.locales)n(r);t.add("locale",m(de,{buttonClassName:"Button Button--link",accessibleToggleLabel:Ui.translator.trans("core.forum.header.locale_dropdown_accessible_label")},e),20)}return Ui.session.user?(t.add("notifications",m(De,{state:Ui.notifications}),10),t.add("session",m(le,null),0)):(Ui.forum.attribute("allowSignUp")&&t.add("signUp",m(gt,{className:"Button Button--link",onclick:function(){return Ui.modal.show(Ot)}},Ui.translator.trans("core.forum.header.sign_up_link")),10),t.add("logIn",m(gt,{className:"Button Button--link",onclick:function(){return Ui.modal.show(Lt)}},Ui.translator.trans("core.forum.header.log_in_link")),0)),t},e}(A),_e=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=e.className||"Button Button--icon Button--link"},e}(gt),Pe=function(){function t(){this.position=t.Position.HIDDEN,this.height=null,this.body={attrs:{}},this.editor=null,this.clear()}var e=t.prototype;return e.load=function(t,e){var n={componentClass:t,attrs:e};this.preventExit()||(this.isVisible()&&(this.clear(),m.redraw.sync()),this.body=n)},e.clear=function(){this.position=t.Position.HIDDEN,this.body={attrs:{}},this.onExit=null,this.fields={content:Pt("")},this.editor&&this.editor.destroy(),this.editor=null},e.show=function(){this.position!==t.Position.NORMAL&&this.position!==t.Position.FULLSCREEN&&(this.position=t.Position.NORMAL,m.redraw.sync())},e.hide=function(){this.clear(),m.redraw()},e.close=function(){this.preventExit()||this.hide()},e.minimize=function(){this.isVisible()&&(this.position=t.Position.MINIMIZED,m.redraw())},e.fullScreen=function(){this.isVisible()&&(this.position=t.Position.FULLSCREEN,m.redraw())},e.exitFullScreen=function(){this.position===t.Position.FULLSCREEN&&(this.position=t.Position.NORMAL,m.redraw())},e.bodyMatches=function(t,e){var n=this;return void 0===e&&(e={}),!!E(this.body.componentClass,t)&&Object.keys(e).every((function(t){return n.body.attrs[t]===e[t]}))},e.isVisible=function(){return this.position!==t.Position.HIDDEN},e.isFullScreen=function(){return this.position===t.Position.FULLSCREEN||"phone"===Ui.screen()},e.composingReplyTo=function(t){return this.isVisible()&&this.bodyMatches(St,{discussion:t})},e.preventExit=function(){if(this.isVisible()&&this.onExit)return this.onExit.callback()?!confirm(this.onExit.message):void 0},e.preventClosingWhen=function(t,e){this.onExit={callback:t,message:e}},e.minimumHeight=function(){return 200},e.maximumHeight=function(){return $(window).height()-$("#header").outerHeight()},e.computedHeight=function(){return this.position===t.Position.MINIMIZED?"":this.position===t.Position.FULLSCREEN?$(window).height():Math.max(this.minimumHeight(),Math.min(this.height,this.maximumHeight()))},t}();Pe.Position={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"};const Be=Pe;var Ie=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state,this.active=!1,this.prevPosition=this.state.position},n.view=function(){var t=this.state.body,e={normal:this.state.position===Be.Position.NORMAL,minimized:this.state.position===Be.Position.MINIMIZED,fullScreen:this.state.position===Be.Position.FULLSCREEN,active:this.active,visible:this.state.isVisible()},n=this.state.position===Be.Position.MINIMIZED?this.state.show.bind(this.state):void 0,r=t.componentClass;return m("div",{className:"Composer "+L(e)},m("div",{className:"Composer-handle",oncreate:this.configHandle.bind(this)}
2),m("ul",{className:"Composer-controls"},R(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:n},r&&m(r,Object.assign({},t.attrs,{composer:this.state,disabled:e.minimized}))))},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.state.position===this.prevPosition?this.updateHeight():(this.animatePositionChange(),this.prevPosition=this.state.position)},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.initializeHeight(),this.$().hide().css("bottom",-this.state.computedHeight()),this.$().on("focus blur",":input,.TextEditor-editorContainer",(function(t){n.active="focusin"===t.type,m.redraw()})),this.$().on("keydown",":input,.TextEditor-editorContainer","esc",(function(){return n.state.close()})),this.handlers={},$(window).on("resize",this.handlers.onresize=this.updateHeight.bind(this)).resize(),$(document).on("mousemove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup",this.handlers.onmouseup=this.onmouseup.bind(this))},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove",this.handlers.onmousemove).off("mouseup",this.handlers.onmouseup)},n.configHandle=function(t){var e=this;$(t.dom).css("cursor","row-resize").bind("dragstart mousedown",(function(t){return t.preventDefault()})).mousedown((function(t){e.mouseStart=t.clientY,e.heightStart=e.$().height(),e.handle=$(this),$("body").css("cursor","row-resize")}))},n.onmousemove=function(t){if(this.handle){var e=this.mouseStart-t.clientY;this.changeHeight(this.heightStart+e);var n=$(window).scrollTop(),r=n>0&&n+$(window).height()>=$(document).height();this.updateBodyPadding(r)}},n.onmouseup=function(){this.handle&&(this.handle=null,$("body").css("cursor",""))},n.focus=function(){this.$(".Composer-content :input:enabled:visible, .TextEditor-editor").first().focus()},n.updateHeight=function(){var t=this.state.computedHeight(),e=this.$(".Composer-flexible");if(this.$().height(t),e.length){var n=e.offset().top-this.$().offset().top,r=parseInt(e.css("padding-bottom"),10),i=this.$(".Composer-footer").outerHeight(!0);e.height(this.$().outerHeight()-n-r-i)}},n.updateBodyPadding=function(){var t=this.state.position!==Be.Position.HIDDEN&&this.state.position!==Be.Position.MINIMIZED&&"phone"!==Ui.screen()?this.state.computedHeight()-parseInt($("#app").css("padding-bottom"),10):0;$("#content").css({paddingBottom:t})},n.animatePositionChange=function(){if(this.prevPosition!==Be.Position.FULLSCREEN||this.state.position!==Be.Position.NORMAL)switch(this.state.position){case Be.Position.HIDDEN:return this.hide();case Be.Position.MINIMIZED:return this.minimize();case Be.Position.FULLSCREEN:return this.focus();case Be.Position.NORMAL:return this.show()}else this.focus()},n.animateHeightChange=function(){var t=this.$().stop(!0),e=t.outerHeight(),n=$(window).scrollTop();t.show(),this.updateHeight();var r=t.outerHeight();this.prevPosition===Be.Position.HIDDEN?t.css({bottom:-r,height:r}):t.css({height:e});var i=t.animate({bottom:0,height:r},"fast").promise();return this.updateBodyPadding(),$(window).scrollTop(n),i},n.showBackdrop=function(){this.$backdrop=$("<div/>").addClass("composer-backdrop").appendTo("body")},n.hideBackdrop=function(){this.$backdrop&&this.$backdrop.remove()},n.show=function(){var t=this;if(this.animateHeightChange().then((function(){return t.focus()})),"phone"===Ui.screen()){var e=document.documentElement,n=Math.min(e.scrollTop,e.scrollHeight-e.clientHeight);this.$().css("top",$(".App").is(".mobile-safari")?n:0),this.showBackdrop()}},n.hide=function(){var t=this,e=this.$();e.stop(!0).animate({bottom:-e.height()},"fast",(function(){e.hide(),t.hideBackdrop(),t.updateBodyPadding()}))},n.minimize=function(){this.animateHeightChange(),this.$().css("top","auto"),this.hideBackdrop()},n.controlItems=function(){var t=new P;return this.state.position===Be.Position.FULLSCREEN?t.add("exitFullScreen",m(_e,{icon:"fas fa-compress",title:Ui.translator.trans("core.forum.composer.exit_full_screen_tooltip"),onclick:this.state.exitFullScreen.bind(this.state)})):(this.state.position!==Be.Position.MINIMIZED&&(t.add("minimize",m(_e,{icon:"fas fa-minus minimize",title:Ui.translator.trans("core.forum.composer.minimize_tooltip"),onclick:this.state.minimize.bind(this.state),itemClassName:"App-backControl"})),t.add("fullScreen",m(_e,{icon:"fas fa-expand",title:Ui.translator.trans("core.forum.composer.full_screen_tooltip"),onclick:this.state.fullScreen.bind(this.state)}))),t.add("close",m(_e,{icon:"fas fa-times",title:Ui.translator.trans("core.forum.composer.close_tooltip"),onclick:this.state.close.bind(this.state)}))),t},n.initializeHeight=function(){this.state.height=localStorage.getItem("composerHeight"),this.state.height||(this.state.height=this.defaultHeight())},n.defaultHeight=function(){return this.$().height()},n.changeHeight=function(t){this.state.height=t,this.updateHeight(),localStorage.setItem("composerHeight",this.state.height)},e}(A),Oe=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(t){var e,n,r,i,o,s=this,a=this.attrs.notification,u=null!=(e=null==(n=this.href)?void 0:n.call(this))?e:"",l=a.fromUser();return m(W,{className:L("Notification","Notification--"+a.contentType(),[!a.isRead()&&"unread"]),href:u,external:u.includes("://"),onclick:this.markAsRead.bind(this)},G(l||null),et(null==(r=this.icon)?void 0:r.call(this),{className:"Notification-icon"}),m("span",{className:"Notification-title"},m("span",{className:"Notification-content"},null==(i=this.content)?void 0:i.call(this)),m("span",{className:"Notification-title-spring"}),ut(a.createdAt())),!a.isRead()&&m(gt,{className:"Notification-action Button Button--link",icon:"fas fa-check",title:Ui.translator.trans("core.forum.notifications.mark_as_read_tooltip"),onclick:function(t){t.preventDefault(),t.stopPropagation(),s.markAsRead()}}),m("div",{className:"Notification-excerpt"},null==(o=this.excerpt)?void 0:o.call(this)))},n.markAsRead=function(){var t,e;this.attrs.notification.isRead()||(null==(t=Ui.session.user)||t.pushAttributes({unreadNotificationCount:(null!=(e=Ui.session.user.unreadNotificationCount())?e:1)-1}),this.attrs.notification.save({isRead:!0}))},e}(A),Le=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.href=function(){var t=this.attrs.notification,e=t.subject();
2return e?Ui.route.discussion(e,t.content().postNumber):"#"},n.content=function(){return Ui.translator.trans("core.forum.notifications.discussion_renamed_text",{user:this.attrs.notification.fromUser()})},n.excerpt=function(){return null},e}(Oe);function Me(t){Ui.composer.isFullScreen()&&(Ui.composer.minimize(),t.stopPropagation())}var $e=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.submitLabel=e.submitLabel||Ui.translator.trans("core.forum.composer_edit.submit_button"),e.confirmExit=e.confirmExit||Ui.translator.trans("core.forum.composer_edit.discard_confirmation"),e.originalContent=e.originalContent||e.post.content(),e.user=e.user||e.post.user(),e.post.editedContent=e.originalContent};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.attrs.post;return e.add("title",m("h3",null,et("fas fa-pencil-alt")," ",m(W,{href:Ui.route.discussion(n.discussion(),n.number()),onclick:Me},Ui.translator.trans("core.forum.composer_edit.post_link",{number:n.number(),discussion:n.discussion().title()})))),e},n.jumpToPreview=function(t){Me(t),m.route.set(Ui.route.post(this.attrs.post))},n.data=function(){return{content:this.composer.fields.content()}},n.onsubmit=function(){var t=this,e=this.attrs.post.discussion();this.loading=!0;var n=this.data();this.attrs.post.save(n).then((function(n){if(Ui.viewingDiscussion(e))Ui.current.get("stream").goToNumber(n.number());else var r=Ui.alerts.show({type:"success",controls:[m(gt,{className:"Button Button--link",onclick:function(){m.route.set(Ui.route.post(n)),Ui.alerts.dismiss(r)}},Ui.translator.trans("core.forum.composer_edit.view_button"))]},Ui.translator.trans("core.forum.composer_edit.edited_message"));t.composer.hide()}),this.loaded.bind(this))},e}(Nt);const je={controls:function(t,e){var n=this,r=new P;return["user","moderation","destructive"].forEach((function(i){var o=n[i+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return r.add(t.itemName,t)})),r.add(i+"Separator",m(I,null)))})),r},userControls:function(t,e){return new P},moderationControls:function(t,e){var n=new P;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",m(gt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(t)},Ui.translator.trans("core.forum.post_controls.edit_button")))),n},destructiveControls:function(t,e){var n=new P;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",m(gt,{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},Ui.translator.trans("core.forum.post_controls.restore_button"))),t.canDelete()&&n.add("delete",m(gt,{icon:"fas fa-times",onclick:this.deleteAction.bind(t,e)},Ui.translator.trans("core.forum.post_controls.delete_forever_button")))):t.canHide()&&n.add("hide",m(gt,{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},Ui.translator.trans("core.forum.post_controls.delete_button"))),n},editAction:function(){var t=this;return new Promise((function(e){return Ui.composer.load($e,{post:t}),Ui.composer.show(),e()}))},hideAction:function(){if(confirm(ot(Ui.translator.trans("core.forum.post_controls.hide_confirmation"))))return this.pushData({attributes:{hiddenAt:new Date},relationships:{hiddenUser:Ui.session.user}}),this.save({isHidden:!0}).then((function(){return m.redraw()}))},restoreAction:function(){return this.pushData({attributes:{hiddenAt:null},relationships:{hiddenUser:null}}),this.save({isHidden:!1}).then((function(){return m.redraw()}))},deleteAction:function(t){var e=this;if(confirm(ot(Ui.translator.trans("core.forum.post_controls.delete_confirmation"))))return t&&(t.loading=!0),this.delete().then((function(){var t=e.discussion();t.removePost(e.id()),t.postIds().length||(Ui.discussions.removeDiscussion(t),Ui.viewingDiscussion(t)&&Ui.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}};var 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.subtree=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.loading=!1,this.subtree=new ct((function(){return n.loading}),(function(){return n.attrs.post.freshness}),(function(){var t=n.attrs.post.user();return t&&t.freshness}))},n.view=function(t){var e=this,n=this.elementAttrs();n.className=this.classes(n.className).join(" ");var r=je.controls(this.attrs.post,this).toArray(),i=this.footerItems().toArray();return m("article",n,m("div",null,this.loading?m(ht,null):this.content(),m("aside",{className:"Post-actions"},m("ul",null,R(this.actionItems().toArray()),!!r.length&&m("li",null,m(at,{className:"Post-control
2s",buttonClassName:"Button Button--icon Button--flat",menuClassName:"Dropdown-menu--right",icon:"fas fa-ellipsis-h",onshow:function(){return e.$(".Post-controls").addClass("open")},onhide:function(){return e.$(".Post-controls").removeClass("open")},accessibleToggleLabel:Ui.translator.trans("core.forum.post_controls.toggle_dropdown_accessible_label")},r)))),m("footer",{className:"Post-footer"},i.length?m("ul",null,R(i)):null)))},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=this.$(".Post-actions"),r=this.$(".Post-controls");n.toggleClass("openWithin",r.hasClass("open"))},n.elementAttrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]),n=this.attrs.post.user(),r=this.attrs.post.discussion();return this.loading&&e.push("Post--loading"),n&&n===Ui.session.user&&e.push("Post--by-actor"),n&&n===r.user()&&e.push("Post--by-start-user"),e},n.actionItems=function(){return new P},n.footerItems=function(){return new P},e}(A),He=function(t){function e(){return t.apply(this,arguments)||this}return b(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}(ye),Ue=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.nameSingular=function(){return he.attribute("nameSingular").call(this)},n.namePlural=function(){return he.attribute("namePlural").call(this)},n.color=function(){return he.attribute("color").call(this)},n.icon=function(){return he.attribute("icon").call(this)},n.isHidden=function(){return he.attribute("isHidden").call(this)},e}(he);Ue.ADMINISTRATOR_ID="1",Ue.GUEST_ID="2",Ue.MEMBER_ID="3";var 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).username=void 0,e.email=void 0,e.isEmailConfirmed=void 0,e.setPassword=void 0,e.password=void 0,e.groups={},e}b(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=Pt(r.username()||""),this.email=Pt(r.email()||""),this.isEmailConfirmed=Pt(r.isEmailConfirmed()||!1),this.setPassword=Pt(!1),this.password=Pt(r.password()||"");var i=r.groups()||[];p.store.all("groups").filter((function(t){return![Ue.GUEST_ID,Ue.MEMBER_ID].includes(t.id())})).forEach((function(t){return n.groups[t.id()]=Pt(i.includes(t))}))},n.className=function(){return"EditUserModal Modal--small"},n.title=function(){return p.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()):p.translator.trans("core.lib.edit_user.nothing_available"))},n.fields=function(){var t=this,e=new P;return this.attrs.user.canEditCredentials()&&(e.add("username",m("div",{className:"Form-group"},m("label",null,p.translator.trans("core.lib.edit_user.username_heading")),m("input",{className:"FormControl",placeholder:ot(p.translator.trans("core.lib.edit_user.username_label")),bidi:this.username,disabled:this.nonAdminEditingAdmin()})),40),p.session.user!==this.attrs.user&&(e.add("email",m("div",{className:"Form-group"},m("label",null,p.translator.trans("core.lib.edit_user.email_heading")),m("div",null,m("input",{className:"FormControl",placeholder:ot(p.translator.trans("core.lib.edit_user.email_label")),bidi:this.email,disabled:this.nonAdminEditingAdmin()})),!this.isEmailConfirmed()&&this.userIsAdmin(p.session.user)&&m("div",null,m(gt,{className:"Button Button--block",loading:this.loading,onclick:this.activate.bind(this)},p.translator.trans("core.lib.edit_user.activate_button")))),30),e.add("password",m("div",{className:"Form-group"},m("label",null,p.translator.trans("core.lib.edit_user.password_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",onchange:function(e){var n=e.target;t.setPassword(n.checked),m.redraw.sync(),n.checked&&t.$("[name=password]").select(),e.redraw=!1},disabled:this.nonAdminEditingAdmin()}),p.translator.trans("core.lib.edit_user.set_password_label")),this.setPassword()&&m("input",{className:"FormControl",type:"password",name:"password",placeholder:ot(p.translator.trans("core.lib.edit_user.password_label")),bidi:this.password,disabled:this.nonAdminEditingAdmin()}))),20))),this.attrs.user.canEditGroups()&&e.add("groups",m("div",{className:"Form-group EditUserModal-groups"},m("label",null,p.translator.trans("core.lib.edit_user.groups_heading")),m("div",null,Object.keys(this.groups).map((function(t){return p.store.getById("groups",t)}
2)).filter(Boolean).map((function(e){return e&&m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:t.groups[e.id()],disabled:e.id()===Ue.ADMINISTRATOR_ID&&(t.attrs.user===p.session.user||!t.userIsAdmin(p.session.user))}),m(He,{group:e,label:null})," ",e.nameSingular())})))),10),e.add("submit",m("div",{className:"Form-group"},m(gt,{className:"Button Button--primary",type:"submit",loading:this.loading},p.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={},n={};return this.attrs.user.canEditCredentials()&&!this.nonAdminEditingAdmin()&&(e.username=this.username(),p.session.user!==this.attrs.user&&(e.email=this.email()),this.setPassword()&&(e.password=this.password())),this.attrs.user.canEditGroups()&&(n.groups=Object.keys(this.groups).filter((function(e){return t.groups[e]()})).map((function(t){return p.store.getById("groups",t)})).filter((function(t){return t instanceof Ue}))),e.relationships=n,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(p.session.user)},n.userIsAdmin=function(t){return!!((null==t?void 0:t.groups())||[]).some((function(t){return(null==t?void 0:t.id())===Ue.ADMINISTRATOR_ID}))},e}(Ft),ze=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(t){return t.children[0]},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundOnresize=this.onresize.bind(this),$(window).on("resize",this.boundOnresize).resize()},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("resize",this.boundOnresize)},n.onresize=function(){var t=this,e=this.$(),n=$("#header"),r=$("#footer"),i=e.find("> ul");$(window).off(".affix"),i.removeClass("affix affix-top affix-bottom").removeData("bs.affix"),e.outerHeight(!0)>$(window).height()-n.outerHeight(!0)||i.affix({offset:{top:function(){return e.offset().top-n.outerHeight(!0)-parseInt(e.css("margin-top"),10)},bottom:function(){return t.bottom=r.outerHeight(!0)}}})},e}(A),Ve=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).user=null,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.bodyClass="App--user"},n.view=function(){return m("div",{className:"UserPage"},this.user?[m(Ye,{user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===Ui.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m(ze,null,m("nav",{className:"sideNav UserPage-nav"},m("ul",null,R(this.sidebarItems().toArray())))),m("div",{className:"sideNavOffset UserPage-content"},this.content())))]:[m(ht,{display:"block"})])},n.content=function(){},n.show=function(t){this.user=t,Ui.current.set("user",t),Ui.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();Ui.preloadedApiDocument(),Ui.store.all("users").some((function(r){return!(r.username().toLowerCase()!==n&&r.id()!==t||!r.joinTime()||(e.show(r),0))})),this.user||Ui.store.find("users",t,{bySlug:!0}).then(this.show.bind(this))},n.sidebarItems=function(){var t=new P;return t.add("nav",m(de,{className:"App-titleControl",buttonClassName:"Button"},this.navItems().toArray())),t},n.navItems=function(){var t=new P,e=this.user,n=Ui.session.user===e;return t.add("posts",m(ue,{href:Ui.route("user.posts",{username:e.slug()}),icon:"far fa-comment"},Ui.translator.trans("core.forum.user.posts_link")," ",m("span",{className:"Button-badge"},e.commentCount())),100),t.add("discussions",m(ue,{href:Ui.route("user.discussions",{username:e.slug()}),icon:"fas fa-bars"},Ui.translator.trans("core.forum.user.discussions_link")," ",m("span",{className:"Button-badge"},e.discussionCount())),90),n&&(t.add("separator",m(I,null),-90),t.add("settings",m(ue,{href:Ui.route("settings"),icon:"fas fa-cog"},Ui.translator.trans("core.forum.user.settings_link")),-100)),(n||Ui.forum.attribute("canModerateAccessTokens"))&&(n||t.add("security-separator",m(I,null),-90),t.add("security",m(ue,{href:Ui.route("user.security",{username:e.slug()}),icon:"fas fa-shield-alt"},Ui.translator.trans("core.forum.user.security_link")),-100)),t},e}(k);const We={controls:function(t,e){var n=this,r=new P;return["user","moderation","destructive"].forEach((function(i){var o=n[i+"Controls"](t,e).toArray();
2o.length&&(o.forEach((function(t){return r.add(t.itemName,t)})),r.add(i+"Separator",m(I,null)))})),r},userControls:function(){return new P},moderationControls:function(t){var e=new P;return(t.canEdit()||t.canEditCredentials()||t.canEditGroups())&&e.add("edit",m(gt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(this,t)},Ui.translator.trans("core.forum.user_controls.edit_button"))),e},destructiveControls:function(t){var e=new P;return"1"!==t.id()&&t.canDelete()&&e.add("delete",m(gt,{icon:"fas fa-times",onclick:this.deleteAction.bind(this,t)},Ui.translator.trans("core.forum.user_controls.delete_button"))),e},deleteAction:function(t){var e=this;confirm(Ui.translator.trans("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),Ui.current.matches(Ve,{user:t})?Ui.history.back():window.location.reload()})).catch((function(){return e.showDeletionAlert(t,"error")}))},showDeletionAlert:function(t,e){var n={success:"core.forum.user_controls.delete_success_message",error:"core.forum.user_controls.delete_error_message"}[e];Ui.alerts.show({type:e},Ui.translator.trans(n,{user:t,email:t.email()}))},editAction:function(t){Ui.modal.show(qe,{user:t})}};var Ge=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loading=!1,this.isDraggedOver=!1},n.view=function(){var t=this.attrs.user;return m("div",{className:L(["AvatarEditor","Dropdown",this.attrs.className,this.loading&&"loading",this.isDraggedOver&&"dragover"])},G(t,{loading:"eager"}),m("a",{className:t.avatarUrl()?"Dropdown-toggle":"Dropdown-toggle AvatarEditor--noAvatar",title:Ui.translator.trans("core.forum.user.avatar_upload_tooltip"),"data-toggle":"dropdown",onclick:this.quickUpload.bind(this),ondragover:this.enableDragover.bind(this),ondragenter:this.enableDragover.bind(this),ondragleave:this.disableDragover.bind(this),ondragend:this.disableDragover.bind(this),ondrop:this.dropUpload.bind(this)},this.loading?m(ht,{display:"unset",size:"large"}):t.avatarUrl()?et("fas fa-pencil-alt"):et("fas fa-plus-circle")),m("ul",{className:"Dropdown-menu Menu"},R(this.controlItems().toArray())))},n.controlItems=function(){var t=new P;return t.add("upload",m(gt,{icon:"fas fa-upload",onclick:this.openPicker.bind(this)},Ui.translator.trans("core.forum.user.avatar_upload_button"))),t.add("remove",m(gt,{icon:"fas fa-times",onclick:this.remove.bind(this)},Ui.translator.trans("core.forum.user.avatar_remove_button"))),t},n.enableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!0},n.disableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1},n.dropUpload=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1,this.upload(t.dataTransfer.files[0])},n.quickUpload=function(t){this.attrs.user.avatarUrl()||(t.preventDefault(),t.stopPropagation(),this.openPicker())},n.openPicker=function(){var t=this;this.loading||$('<input type="file" accept=".jpg, .jpeg, .png, .bmp, .gif">').appendTo("body").hide().click().on("input",(function(e){t.upload($(e.target)[0].files[0])}))},n.upload=function(t){if(!this.loading){var e=this.attrs.user,n=new FormData;n.append("avatar",t),this.loading=!0,m.redraw(),Ui.request({method:"POST",url:Ui.forum.attribute("apiUrl")+"/users/"+e.id()+"/avatar",serialize:function(t){return t},body:n}).then(this.success.bind(this),this.failure.bind(this))}},n.remove=function(){var t=this.attrs.user;this.loading=!0,m.redraw(),Ui.request({method:"DELETE",url:Ui.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){Ui.store.pushPayload(t),delete this.attrs.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(A),Ye=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.user,e=We.controls(t,this).toArray(),n=t.color(),r=t.badges().toArray();return m("div",{className:L("UserCard",this.attrs.className),style:n&&{"--usercard-bg":n}}
2,m("div",{className:"darkenBackground"},m("div",{className:"container"},!!e.length&&m(at,{className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.attrs.controlsButtonClassName,label:Ui.translator.trans("core.forum.user_controls.button"),accessibleToggleLabel:Ui.translator.trans("core.forum.user_controls.toggle_dropdown_accessible_label"),icon:"fas fa-ellipsis-v"},e),m("div",{className:"UserCard-profile"},m("h1",{className:"UserCard-identity"},this.attrs.editable?m("[",null,m(Ge,{user:t,className:"UserCard-avatar"})," ",Kt(t)):m(W,{href:Ui.route.user(t)},m("div",{className:"UserCard-avatar"},G(t,{loading:"eager"})),Kt(t))),!!r.length&&m("ul",{className:"UserCard-badges badges"},R(r)),m("ul",{className:"UserCard-info"},R(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new P,e=this.attrs.user,n=e.lastSeenAt();if(n){var r=e.isOnline();t.add("lastSeen",m("span",{className:L("UserCard-lastSeen",{online:r})},r?[et("fas fa-circle")," ",Ui.translator.trans("core.forum.user.online_text")]:[et("far fa-clock")," ",it(n)]),100)}return t.add("joined",Ui.translator.trans("core.forum.user.joined_date_text",{ago:it(e.joinTime())}),90),t},e}(A);function Ke(t){return t.lastSeenAt()&&t.isOnline()?m("span",{className:"UserOnline"},et("fas fa-circle")):null}var Xe=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();return e?m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},m(W,{href:Ui.route.user(e)},G(e,{className:"PostUser-avatar"}),Ke(e),Kt(e))),m("ul",{className:"PostUser-badges badges"},R(e.badges().toArray())),!t.isHidden()&&this.attrs.cardVisible&&m(Ye,{user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})):m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},G(e,{className:"PostUser-avatar"})," ",Kt(e)))},n.oncreate=function(e){var n,r=this;t.prototype.oncreate.call(this,e),this.$().on("mouseover",".PostUser-name a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.showCard.bind(r),500)})).on("mouseout",".PostUser-name a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.hideCard.bind(r),250)}))},n.showCard=function(){var t=this;this.attrs.oncardshow(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.attrs.oncardhide()}))},e}(A);function Je(t){var e=rt()(t),n=e.format(),r=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},r)}var Qe=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.createdAt(),n=this.getPermalink(t),r="ontouchstart"in document.documentElement;return m("div",{className:"Dropdown PostMeta"},m("a",{className:"Dropdown-toggle",onclick:function(t){var e=this;setTimeout((function(){return $(e).parent().find(".PostMeta-permalink").select()}
2)),t.redraw=!1},"data-toggle":"dropdown"},ut(e)),m("div",{className:"Dropdown-menu dropdown-menu"},m("span",{className:"PostMeta-number"},Ui.translator.trans("core.forum.post.number_tooltip",{number:t.number()}))," ",m("span",{className:"PostMeta-time"},Je(e))," ",m("span",{className:"PostMeta-ip"},t.data.attributes.ipAddress),r?m("a",{className:"Button PostMeta-permalink",href:n},n):m("input",{className:"FormControl PostMeta-permalink",value:n,onclick:function(t){return t.stopPropagation()}})))},n.getPermalink=function(t){return Ui.forum.attribute("baseOrigin")+Ui.route.post(t)},e}(A),Ze=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e)},n.view=function(){var t=this.attrs.post,e=t.editedUser(),n=Ui.translator.trans("core.forum.post.edited_tooltip",{user:e,ago:it(t.editedAt())});return m(At,{text:n},m("span",{className:"PostEdited"},Ui.translator.trans("core.forum.post.edited_text")))},n.oncreate=function(e){t.prototype.oncreate.call(this,e)},e}(A),tn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.revealContent=!1,this.cardVisible=!1,this.subtree.check((function(){return n.cardVisible}),(function(){return n.isEditing()}),(function(){return n.revealContent}))},n.content=function(){return t.prototype.content.call(this).concat([m("header",{className:"Post-header"},m("ul",null,R(this.headerItems().toArray()))),m("div",{className:"Post-body"},this.isEditing()?m(Xt,{className:"Post-preview",composer:Ui.composer}):m.trust(this.attrs.post.contentHtml()))])},n.refreshContent=function(){var t=this.isEditing()?"":this.attrs.post.contentHtml();this.contentHtml!==t&&this.$(".Post-body script").each((function(){var t=document.createElement("script");t.textContent=this.textContent,Array.from(this.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),this.parentNode.replaceChild(t,this)})),this.contentHtml=t},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.refreshContent()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.refreshContent()},n.isEditing=function(){return Ui.composer.bodyMatches($e,{post:this.attrs.post})},n.elementAttrs=function(){var e=this.attrs.post,n=t.prototype.elementAttrs.call(this);return n.className=L(n.className,"CommentPost",{"Post--renderFailed":e.renderFailed(),"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()}),this.isEditing()&&(n["aria-busy"]="true"),n},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=this,e=new P,n=this.attrs.post;return e.add("user",m(Xe,{post:n,cardVisible:this.cardVisible,oncardshow:function(){t.cardVisible=!0,m.redraw()},oncardhide:function(){t.cardVisible=!1,m.redraw()}}),100),e.add("meta",m(Qe,{post:n})),n.isEdited()&&!n.isHidden()&&e.add("edited",m(Ze,{post:n})),n.isHidden()&&e.add("toggle",m(gt,{className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),e},e}(Re),en=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.elementAttrs=function(){var e=t.prototype.elementAttrs.call(this);return e.className=L(e.className,"EventPost",J(this.attrs.post.contentType())+"Post"),e},n.content=function(){var e=this.attrs.post.user(),n=Kt(e),r=Object.assign(this.descriptionData(),{user:e,username:e?m(W,{className:"EventPost-user",href:Ui.route.user(e)},n):n,time:ut(this.attrs.post.createdAt())});return t.prototype.content.call(this).concat([et(this.icon(),{className:"EventPost-icon"}),m("div",{className:"EventPost-info"},this.description(r))])},n.icon=function(){return""},n.description=function(t){return Ui.translator.trans(this.descriptionKey(),t)},n.descriptionKey=function(){return""},n.descriptionData=function(){return{}},e}(Re),nn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.description=function(t){var e=Ui.translator.trans("core.forum.post_stream.discussion_renamed_text",t);return m("span",null,e)},n.descriptionData=function(){var t=this.attrs.post,e=t.content()[0],n=t.content()[1];return{new:m(At,{text:ot(Ui.translator.trans("core.forum.post_stream.discussion_renamed_old_tooltip",{old:e}))},m("strong",{className:"DiscussionRenamedPost-new"},n))}},e}(en),rn="welcomeHidden",on=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).hidden=!1,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e)},n.view=function(t){var e=this;return this.isHidden()?null:m("header",{className:"Hero WelcomeHero"},m("div",{className:"container"},m(gt,{icon:"fas fa-times",onclick:function(){e.$().slideUp(e.hide.bind(e))},className:"Hero-close Button Button--icon Button--link","aria-label":Ui.translator.trans("core.forum.welcome_hero.hide")}),m("div",{className:"containerNarrow"},m("h1",{className:"Hero-title"},Ui.forum.attribute("welcomeTitle")),m("div",{className:"Hero-subtitle"},m.trust(Ui.forum.attribute("welcomeMessage"))))))},n.hide=function(){localStorage.setItem(rn,"true")},n.isHidden=function(){var t;return null==(t=Ui.forum.attribute("welcomeTitle"))||!t.trim()||!!localStorage.getItem(rn)||!!this.hidden},e}(A),sn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||ot(Ui.translator.trans("core.forum.composer_discussion.body_placeholder")),e.submitLabel=e.submitLabel||Ui.translator.trans("core.forum.composer_discussion.submit_button"),e.confirmExit=e.confirmExit||ot(Ui.translator.trans("core.forum.composer_discussion.discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||ot(Ui.translator.trans("core.forum.composer_discussion.title_placeholder")),e.className="ComposerBody--discussion"};var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.composer.fields.title=this.composer.fields.title||Pt(""),this.title=this.composer.fields.title},n.headerItems=function(){var e=t.prototype.headerItems.call(this);return e.add("title",m("h3",null,Ui.translator.trans("core.forum.composer_discussion.title")),100),e.add("discussionTitle",m("h3",null,m("input",{className:"FormControl",bidi:this.title,placeholder:this.attrs.titlePlaceholder,disabled:!!this.attrs.disabled,onkeydown:this.onkeydown.bind(this)}))),e},n.onkeydown=function(t){13===t.which&&(t.preventDefault(),this.composer.editor.moveCursorTo(0)),t.redraw=!1},n.hasChanges=function(){return this.title()||this.composer.fields.content()},n.data=function(){return{title:this.title(),content:this.composer.fields.content()}},n.onsubmit=function(){var t=this;this.loading=!0;var e=this.data();Ui.store.createRecord("discussions").save(e).then((function(e){t.composer.hide(),Ui.discussions.refresh(),m.route.set(Ui.route.discu
2ssion(e))}),this.loaded.bind(this))},e}(Nt),an=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).lastDiscussion=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(n){t.prototype.oninit.call(this,n),Ui.previous.matches(se)&&(this.lastDiscussion=Ui.previous.get("discussion")),Ui.previous.matches(e)&&Ui.discussions.clear(),Ui.discussions.refreshParams(Ui.search.params(),m.route.param("page")&&Number(m.route.param("page"))||1),Ui.history.push("index",ot(Ui.translator.trans("core.forum.header.back_to_index_tooltip"))),this.bodyClass="App--index",this.scrollTopOnCreate=!1},n.view=function(){return m("div",{className:"IndexPage"},this.hero(),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m("nav",{className:"IndexPage-nav sideNav"},m("ul",null,R(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},m("div",{className:"IndexPage-toolbar"},m("ul",{className:"IndexPage-toolbar-view"},R(this.viewItems().toArray())),m("ul",{className:"IndexPage-toolbar-action"},R(this.actionItems().toArray()))),m(zt,{state:Ui.discussions})))))},n.setTitle=function(){Ui.setTitle(ot(Ui.translator.trans("core.forum.index.meta_title_text"))),Ui.setTitleCount(0)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.setTitle();var n=Ui.cache.heroHeight,r=Ui.cache.heroHeight=this.$(".Hero").outerHeight()||0,i=Ui.cache.scrollTop;if($("#app").css("min-height",($(window).height()||0)+r),null!=Ui.previous.type&&(this.lastDiscussion?$(window).scrollTop(i-n+r):$(window).scrollTop(0),this.lastDiscussion)){var o=this.$('li[data-id="'+this.lastDiscussion.id()+'"] .DiscussionListItem');if(o.length){var s=$("#header").outerHeight()||0,a=$(window).height()||0,u=o.offset(),l=u&&u.top||0,c=l+(o.outerHeight()||0);(l<i+s||c>i+a)&&$(window).scrollTop(l-s)}}},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),Ui.cache.scrollTop=$(window).scrollTop()},n.onremove=function(e){t.prototype.onremove.call(this,e),$("#app").css("min-height","")},n.hero=function(){return m(on,null)},n.sidebarItems=function(){var t=this,e=new P,n=Ui.forum.attribute("canStartDiscussion")||!Ui.session.user;return e.add("newDiscussion",m(gt,{icon:"fas fa-edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:function(){return t.newDiscussionAction().catch((function(){}))},disabled:!n},Ui.translator.trans("core.forum.index."+(n?"start_discussion_button":"cannot_start_discussion_button")))),e.add("nav",m(de,{buttonClassName:"Button",className:"App-titleControl",accessibleToggleLabel:Ui.translator.trans("core.forum.index.toggle_sidenav_dropdown_accessible_label")},this.navItems().toArray())),e},n.navItems=function(){var t=new P,e=Ui.search.stickyParams();return t.add("allDiscussions",m(ue,{href:Ui.route("index",e),icon:"far fa-comments"},Ui.translator.trans("core.forum.index.all_discussions_link")),100),t},n.viewItems=function(){var t=new P,e=Ui.discussions.sortMap(),n=Object.keys(e).reduce((function(t,e){return t[e]=Ui.translator.trans("core.forum.index_
2sort."+e+"_button"),t}),{});return t.add("sort",m(at,{buttonClassName:"Button",label:n[Ui.search.params().sort]||Object.keys(e).map((function(t){return n[t]}))[0],accessibleToggleLabel:Ui.translator.trans("core.forum.index_sort.toggle_dropdown_accessible_label")},Object.keys(n).map((function(t){var r=n[t],i=(Ui.search.params().sort||Object.keys(e)[0])===t;return m(gt,{icon:!i||"fas fa-check",onclick:Ui.search.changeSort.bind(Ui.search,t),active:i},r)})))),t},n.actionItems=function(){var t=new P;return t.add("refresh",m(gt,{title:Ui.translator.trans("core.forum.index.refresh_tooltip"),icon:"fas fa-sync",className:"Button Button--icon",onclick:function(){Ui.discussions.refresh(),Ui.session.user&&(Ui.store.find("users",Ui.session.user.id()),m.redraw())}})),Ui.session.user&&t.add("markAllAsRead",m(gt,{title:Ui.translator.trans("core.forum.index.mark_all_as_read_tooltip"),icon:"fas fa-check",className:"Button Button--icon",onclick:this.markAllAsRead.bind(this)})),t},n.newDiscussionAction=function(){return new Promise((function(t,e){return Ui.session.user?(Ui.composer.load(sn,{user:Ui.session.user}),Ui.composer.show(),t(Ui.composer)):(Ui.modal.show(Lt),e())}))},n.markAllAsRead=function(){var t;confirm(ot(Ui.translator.trans("core.forum.index.mark_all_as_read_confirmation")))&&(null==(t=Ui.session.user)||t.save({markedAllAsReadAt:new Date}))},e}(k);an.providesInitialSearch=!0;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).loading=!0,e.moreResults=!1,e.posts=[],e.loadLimit=20,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.content=function(){return 0!==this.posts.length||this.loading?(this.loading?t=m(ht,null):this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},m(gt,{className:"Button",onclick:this.loadMore.bind(this)},Ui.translator.trans("core.forum.user.posts_load_more_button")))),m("div",{className:"PostsUserPage"},m("ul",{className:"PostsUserPage-list"},this.posts.map((function(t){return m("li",null,m("div",{className:"PostsUserPage-discussion"},Ui.translator.trans("core.forum.user.in_discussion_text",{discussion:m(W,{href:Ui.route.post(t)},t.discussion().title())})),m(tn,{post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(qt,{text:Ui.translator.trans("core.forum.user.posts_empty_text")}));var t},n.show=function(e){t.prototype.show.call(this,e),this.refresh()},n.refresh=function(){this.loading=!0,this.posts=[],m.redraw(),this.loadResults().then(this.parseResults.bind(this))},n.loadResults=function(t){return void 0===t&&(t=0),Ui.store.find("posts",{filter:{author:this.user.username(),type:"comment"},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},n.loadMore=function(){this.loading=!0,this.loadResults(this.posts.length).then(this.parseResults.bind(this))},n.parseResults=function(t){var e;return this.loading=!1,(e=this.posts).push.apply(e,t),this.moreResults=t.length>=this.loadLimit,m.redraw(),t},e}(Ve),ln=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);
2var e=this.requestParams(),n=Array.isArray(e.include)?e.include.join(","):e.include,r=w({},e,{page:w({},e.page,{offset:this.pageSize*(t-1)}),include:n});return p.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}(),cn=function(){function t(){this.events={},this.events={}}var e=t.prototype;return e.on=function(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this},e.emit=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];this.events[t]&&this.events[t].forEach((function(t){return t.apply(void 0,n)}))},t}();function dn(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 hn=new cn,fn=function(t){function e(e,n){var r;return void 0===n&&(n=1),(r=t.call(this,e,n,20)||this).extraDiscussions=[],r.eventEmitter=void 0,r.eventEmitter=hn.on("discussion.deleted",r.deleteDiscussion.bind(g(r))),r}b(e,t);var n=e.prototype;return n.requestParams=function(){var t,e={include:["user","lastPostedUser"],filter:this.params.filter||{},sort:this.sortMap()[null!=(t=this.params.sort)?t:""]};return this.params.q&&(e.filter.q=this.params.q,e.include.push("mostRelevantPost","mostRelevantPost.user")),e},n.loadPage=function(e){void 0===e&&(e=1);var n=Ui.preloadedApiDocument();return n?(this.initialLoading=!1,Promise.resolve(n)):t.prototype.loadPage.call(this,e)},n.clear=function(){t.prototype.clear.call(this),this.extraDiscussions=[]},n.sortMap=function(){var t={};return this.params.q&&(t.relevance=""),t.latest="-lastPostedAt",t.top="-commentCount",t.newest="-createdAt",t.oldest="createdAt",t},n.isSearchResults=function(){return!!this.params.q},n.removeDiscussion=function(t){this.eventEmitter.emit("discussion.deleted",t)},n.deleteDiscussion=function(t){for(var e,n=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 dn(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)?dn(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.")}(this.pages);!(e=n()).done;){var r=e.value,i=r.items.indexOf(t);if(-1!==i){r.items.splice(i,1);break}}var o=this.extraDiscussions.indexOf(t);-1!==o&&this.extraDiscussions.splice(o),m.redraw()},n.addDiscussion=function(t){this.removeDiscussion(t),this.extraDiscussions.unshift(t),m.redraw()},n.getAllItems=function(){return this.extraDiscussions.concat(t.prototype.getAllItems.call(this))},n.getPages=function(){var e=t.prototype.getPages.call(this);return this.extraDiscussions.length?[{number:-1,items:this.extraDiscussions}].concat(e):e},T(e,[{key:"type",get:function(){return"discussions"}}]),e}(ln),pn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.show=function(e){t.prototype.show.call(this,e),this.state=new fn({filter:{author:e.username()},sort:"newest"}),this.state.refresh()},n.content=function(){return m("div",{className:"DiscussionsUserPage"},m(zt,{state:this.state}))},e}(Ve);const mn=function(t,e){return function(){e(this.getAttribute(t)||this[t])}};var vn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(t){var e=L(["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:mn("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(ht,{display:"unset",size:"small"}):et(this.attrs.state?"fas fa-check":"fas fa-times")},n.onchange=function(t){this.attrs.onchange&&this.attrs.onchange(t,this)},e}(A),gn=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=L(e.className,"Checkbox--switch")},e.prototype.getDisplay=function(){return!!this.attrs.loading&&t.prototype.getDisplay.call(this)},e}(vn),yn=function(t){function e(){return t.apply(this,arguments)||this}return b(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}(A),bn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.methods=this.notificationMethods().toArray(),this.loading={},this.types=this.notificationTypes().toArray()},n.view=function(){var t=this,e=this.attrs.user.preferences();return m("table",{className:"NotificationGrid"},m("thead",null,m("tr",null,m("td",null),this.methods.map((function(e){return m("th",{className:"NotificationGrid-groupToggle",oncl
2ick:t.toggleMethod.bind(t,e.name)},et(e.icon)," ",e.label)})))),m("tbody",null,this.types.map((function(n){return m("tr",null,m("td",{className:"NotificationGrid-groupToggle",onclick:t.toggleType.bind(t,n.name)},et(n.icon)," ",n.label),t.methods.map((function(r){var i=t.preferenceKey(n.name,r.name);return m("td",{className:"NotificationGrid-checkbox"},m(vn,{state:!!e[i],loading:t.loading[i],disabled:!(i in e),onchange:t.toggle.bind(t,[i])},m("span",{className:"sr-only"},Ui.translator.trans("core.forum.settings.notification_checkbox_a11y_label_template",{description:n.label,method:r.label}))))})))}))))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$("thead .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){var e=parseInt($(this).index(),10)+1;$(this).parents("table").find("td:nth-child("+e+")").toggleClass("highlighted","mouseenter"===t.type)})),this.$("tbody .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){$(this).parent().find("td").toggleClass("highlighted","mouseenter"===t.type)}))},n.toggle=function(t){var e=this,n=this.attrs.user,r=n.preferences(),i=!r[t[0]];t.forEach((function(t){e.loading[t]=!0,r[t]=i})),m.redraw(),n.save({preferences:r}).then((function(){t.forEach((function(t){return e.loading[t]=!1})),m.redraw()}))},n.toggleMethod=function(t){var e=this,n=this.types.map((function(n){return e.preferenceKey(n.name,t)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.toggleType=function(t){var e=this,n=this.methods.map((function(n){return e.preferenceKey(t,n.name)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new P;return t.add("alert",{name:"alert",icon:"fas fa-bell",label:Ui.translator.trans("core.forum.settings.notify_by_web_heading")}),t.add("email",{name:"email",icon:"far fa-envelope",label:Ui.translator.trans("core.forum.settings.notify_by_email_heading")}),t},n.notificationTypes=function(){var t=new P;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:Ui.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(A),wn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.className=function(){return"ChangePasswordModal Modal--small"},n.title=function(){return Ui.translator.trans("core.forum.change_password.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},this.fields().toArray()))},n.fields=function(){var t=new P;return t.add("help",m("p",{className:"helpText"},Ui.translator.trans("core.forum.change_password.text"))),t.add("submit",m("div",{className:"Form-group"},m(gt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Ui.translator.trans("core.forum.change_password.send_button")))),t},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,Ui.request({method:"POST",url:Ui.forum.attribute("apiUrl")+"/forgot",body:this.requestBody()}).then(this.hide.bind(this),this.loaded.bind(this))},n.requestBody=function(){return{email:Ui.session.user.email()}},e}(Ft),Dn=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).email=void 0,e.password=void 0,e.success=!1,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Pt(Ui.session.user.email()||""),this.password=Pt("")},n.className=function(){return"ChangeEmailModal Modal--small"},n.title=function(){return Ui.translator.trans("core.forum.change_email.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},this.fields().toArray()))},n.fields=function(){var t=new P;return this.success?(t.add("help",m("p",{className:"helpText"},Ui.translator.trans("core.forum.change_email.confirmation_message",{email:m("strong",null,this.email())}))),t.add("dismiss",m("div",{className:"Form-group"},m(gt,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},Ui.translator.trans("core.forum.change_email.dismiss_button"))))):(t.add("email",m("div",{className:"Form-group"},m("input",{type:"email",name:"email",className:"FormControl",placeholder:Ui.session.user.email(),bidi:this.email,disabled:this.loading}
2))),t.add("password",m("div",{className:"Form-group"},m("input",{type:"password",name:"password",className:"FormControl",autocomplete:"current-password",placeholder:Ui.translator.trans("core.forum.change_email.confirm_password_placeholder"),bidi:this.password,disabled:this.loading}))),t.add("submit",m("div",{className:"Form-group"},m(gt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Ui.translator.trans("core.forum.change_email.submit_button"))))),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.email()!==Ui.session.user.email()?(this.loading=!0,this.alertAttrs=null,Ui.session.user.save(this.requestAttributes(),{errorHandler:this.onerror.bind(this),meta:{password:this.password()}}).then((function(){e.success=!0})).catch((function(){})).then(this.loaded.bind(this))):this.hide()},n.requestAttributes=function(){return{email:this.email()}},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=Ui.translator.trans("core.forum.change_email.incorrect_password_message")),t.prototype.onerror.call(this,e)},e}(Ft),xn=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).discloseOnlineLoading=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.show(Ui.session.user),Ui.setTitle(ot(Ui.translator.trans("core.forum.settings.title")))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,R(this.settingsItems().toArray())))},n.settingsItems=function(){var t=this,e=new P;return["account","notifications","privacy"].forEach((function(n,r){var i=n+"Items";e.add(n,m(yn,{className:"Settings-"+n,label:Ui.translator.trans("core.forum.settings."+n+"_heading")},t[i]().toArray()),100-10*r)})),e},n.accountItems=function(){var t=new P;return t.add("changePassword",m(gt,{className:"Button",onclick:function(){return Ui.modal.show(wn)}},Ui.translator.trans("core.forum.settings.change_password_button")),100),t.add("changeEmail",m(gt,{className:"Button",onclick:function(){return Ui.modal.show(Dn)}},Ui.translator.trans("core.forum.settings.change_email_button")),90),t},n.notificationsItems=function(){var t=new P;return t.add("notificationGrid",m(bn,{user:this.user}),100),t},n.privacyItems=function(){var t,e=this,n=new P;return n.add("discloseOnline",m(gn,{state:null==(t=this.user.preferences())?void 0:t.discloseOnline,onchange:function(t){e.discloseOnlineLoading=!0,e.user.savePreferences({discloseOnline:t}).then((function(){e.discloseOnlineLoading=!1,m.redraw()}))},loading:this.discloseOnlineLoading},Ui.translator.trans("core.forum.settings.privacy_disclose_online_label")),100),n},e}(Ve),Cn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),Ui.history.push("notifications",ot(Ui.translator.trans("core.forum.notifications.title"))),Ui.notifications.load(),this.bodyClass="App--notifications"},n.view=function(){return m("div",{className:"NotificationsPage"},m(we,{state:Ui.notifications}))},e}(k),An=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 w({},t.attrs,{routeName:this.routeName})},e.onmatch=function(t,e,n){return this.component},e.render=function(t){return[w({},t,{attrs:this.makeAttrs(t),key:this.makeKey()})]},t}(),En=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.canonicalizeDiscussionSlug=function(t){if(t)return t.split("-")[0]},n.makeKey=function(){var t=w({},m.route.param());return"near"in t&&delete t.near,t.id=this.canonicalizeDiscussionSlug(t.id),this.routeName.replace(".near","")+JSON.stringify(t)},n.onmatch=function(n,r,i){return Ui.current.matches(se)&&this.canonicalizeDiscussionSlug(n.id)===this.canonicalizeDiscussionSlug(m.route.param("id"))&&(e.scrollToPostNumber=n.near||1),t.prototype.onmatch.call(this,n,r,i)},n.render=function(n){if(null!==e.scrollToPostNumber){var r=e.scrollToPostNumber;setTimeout((function(){return Ui.current.get("stream").goToNumber(r)})),e.scrollToPostNumber=null}return t.prototype.render.call(this,n)},e}(An);En.scrollToPostNumber=null;var Nn=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(t){return m("div",{className:"LabelValue"},m("div",{className:"LabelValue-label"},p.translator.trans("core.lib.data_segment.label",{label:this.attrs.label})),m("div",{className:"LabelValue-value"},this.attrs.value))},e}(A),kn=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={},e.showingTokens={},e}b(e,t);var n=e.prototype;
2return n.view=function(t){return m("div",{className:"AccessTokensList"},this.attrs.tokens.length?this.attrs.tokens.map(this.tokenView.bind(this)):m("div",{className:"AccessTokensList--empty"},Ui.translator.trans("core.forum.security.empty_text")))},n.tokenView=function(t){return m("div",{className:L("AccessTokensList-item",{"AccessTokensList-item--active":t.isCurrent()}),key:t.id()},this.tokenViewItems(t).toArray())},n.tokenViewItems=function(t){var e=new P;return e.add("icon",m("div",{className:"AccessTokensList-item-icon"},et(this.attrs.icon||"fas fa-key")),50),e.add("info",m("div",{className:"AccessTokensList-item-info"},this.tokenInfoItems(t).toArray()),40),e.add("actions",m("div",{className:"AccessTokensList-item-actions"},this.tokenActionItems(t).toArray()),30),e},n.tokenInfoItems=function(t){var e=new P;return"session"===this.attrs.type?e.add("title",m("div",{className:"AccessTokensList-item-title"},m("span",{className:"AccessTokensList-item-title-main"},t.device()),t.isCurrent()&&[" — ",m("span",{className:"AccessTokensList-item-title-sub"},Ui.translator.trans("core.forum.security.current_active_session"))])):e.add("title",m("div",{className:"AccessTokensList-item-title"},m("span",{className:"AccessTokensList-item-title-main"},this.generateTokenTitle(t)))),e.add("createdAt",m("div",{className:"AccessTokensList-item-createdAt"},m(Nn,{label:Ui.translator.trans("core.forum.security.created"),value:ut(t.createdAt())}))),e.add("lastActivityAt",m("div",{className:"AccessTokensList-item-lastActivityAt"},m(Nn,{label:Ui.translator.trans("core.forum.security.last_activity"),value:t.lastActivityAt()?m("[",null,ut(t.lastActivityAt()),t.lastIpAddress()&&" — "+t.lastIpAddress(),"developer_token"===this.attrs.type&&t.device()&&m("[",null," ","— ",m("span",{className:"AccessTokensList-item-title-sub"},t.device()))):Ui.translator.trans("core.forum.security.never")}))),e},n.tokenActionItems=function(t){var e=this,n=new P,r={session:"terminate_session",developer_token:"revoke_access_token"}[this.attrs.type];if("developer_token"===this.attrs.type){var i=!this.showingTokens[t.id()],o=i?"show_access_token":"hide_access_token";n.add("toggleDisplay",m(gt,{className:"Button Button--inverted",icon:i?"fas fa-eye":"fas fa-eye-slash",onclick:function(){e.showingTokens[t.id()]=i,m.redraw()}},Ui.translator.trans("core.forum.security."+o)))}var s=m(gt,{className:"Button Button--danger",disabled:t.isCurrent(),loading:!!this.loading[t.id()],onclick:function(){return e.revoke(t)}},Ui.translator.trans("core.forum.security."+r));return t.isCurrent()&&(s=m(At,{text:Ui.translator.trans("core.forum.security.cannot_terminate_current_session")},m("div",{tabindex:"0"},s))),n.add("revoke",s),n},n.revoke=function(){var t=Ae(Ne().mark((function t(e){var n,r,i;return Ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(confirm(ot(Ui.translator.trans("core.forum.security.revoke_access_token_confirmation")))){t.next=2;break}return t.abrupt("return");case 2:return this.loading[e.id()]=!0,t.next=5,e.delete();case 5:this.loading[e.id()]=!1,null==(n=(r=this.attrs).ondelete)||n.call(r,e),i="session"===this.attrs.type?"session_terminated":"token_revoked",Ui.alerts.show({type:"success"},Ui.translator.trans("core.forum.security."+i,{count:1})),m.redraw();case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.generateTokenTitle=function(t){var e=t.title()||Ui.translator.trans("core.forum.security.token_title_placeholder"),n=this.tokenValueDisplay(t);return Ui.translator.trans("core.forum.security.token_item_title",{title:e,token:n})},n.tokenValueDisplay=function(t){var e=Array(12).fill("*").join(""),n=this.showingTokens[t.id()]?t.token():e;return m("code",{className:"AccessTokensList-item-token"},n)},e}(A),Sn=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).titleInput=Pt(""),e}b(e,t);var n=e.prototype;return n.className=function(){return"Modal--small NewAccessTokenModal"},n.title=function(){return Ui.translator.trans("core.forum.security.new_access_token_modal.title")},n.content=function(){var t=Ui.translator.trans("core.forum.security.new_access_token_modal.title_placeholder");return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{type:"text",className:"FormControl",bidi:this.titleInput,placeholder:t,"aria-label":t})),m("div",{className:"Form-group"},m(gt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Ui.translator.trans("core.forum.security.new_access_token_modal.submit_button")))))},n.submitData=function(){return{title:this.titleInput()}},n.onsubmit=function(e){var n=this;t.prototype.onsubmit.call(this,e),e.preventDefault(),this.loading=!0,Ui.store.createRecord("access-tokens").save(this.submitData()).then((function(t){n.attrs.onsuccess(t),Ui.modal.close()})).finally(this.loaded.bind(this))},e}(Ft),Tn=function(){function t(){this.tokens=null,this.loadingTerminateSessions=!1,this.loadingGlobalLogout=!1}var e=t.prototype;return e.hasLoadedTokens=function(){return null!==this.tokens},e.getTokens=function(){return this.tokens},e.setTokens=function(t){this.tokens=t},e.pushToken=function(t){var e;null==(e=this.tokens)||e.push(t)},e.removeToken=function(t){this.tokens=this.tokens.filter((function(e){return e!==t}))},e.getSessionTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return t.isSessionToken()})).sort((function(t,e){return e.isCurrent()?1:-1})))||[]},e.getDeveloperTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return!t.isSessionToken()})))||null},e.getOtherSessionTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return t.isSessionToken()&&!t.isCurrent()})))||[]},e.hasOtherActiveSessions=function(){return(this.getOtherSessionTokens()||[]).length>0},e.removeOtherSessionTokens=function(){this.tokens=this.tokens.filter((function(t){return!t.isSessionToken()||t.isCurrent()}))},t}(),Fn=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).state=new Tn,e}b(e,t);var n=e.prototype;return n.oninit=function(e){var n;t.prototype.oninit.call(this,e);var r=m.route.param("username");r===(null==(n=Ui.session.user)?void 0:n.slug())||Ui.forum.attribute("canModerateAccessTokens")||m.route.set("/"),this.loadUser(r),Ui.setTitle(ot(Ui.translator.trans("core.forum.security.title"))),this.loadTokens()},n.content=function(){return m("div",{className:"UserSecurityPage"},m("ul",null,R(this.settingsItems().toArray())))},n.settingsItems=function(){var t,e=new P;return Ui.forum.attribute("canCreateAccessToken")||Ui.forum.attribute("canModerateAccessTokens")||this.state.hasLoadedTokens()&&null!=(t=this.state.getDeveloperTokens())&&t.length?e.add("developerTokens",m(yn,{className:"UserSecurityPage-developerTokens",label:Ui.translator.trans("core.forum.security.developer_tokens_heading")},this.developerTokensItems().toArray())):this.state.hasLoadedTokens()||e.add("developerTokens",m(ht,null)),e.add("sessions",m(yn,{className:"UserSecurityPage-sessions",label:Ui.translator.trans("core.forum.security.sessions_heading")},this.sessionsItems().toArray())),this.user.id()===Ui.session.user.id()&&e.add("globalLogout",m(yn,{className:"UserSecurityPage-globalLogout",label:Ui.translator.trans("core.forum.security.global_logout.heading")},m("span",{className:"helpText"},Ui.translator.trans("core.forum.security.global_logout.help_text")),m(gt,{className:"Button",icon:"fas fa-sign-out-alt",onclick:this.globalLogout.bind(this),loading:this.state.loadingGlobalLogout,disabled:this.state.loadingTerminateSessions},Ui.translator.trans("core.forum.security.global_logout.log_out_button")))),e},n.developerTokensItems=function(){var t=this,e=new P;return e.add("accessTokenList",this.state.hasLoadedTokens()?m(kn,{type:"developer_token",ondelete:function(e){t.state.removeToken(e),m.redraw()},tokens:this.state.getDeveloperTokens(),icon:"fas fa-key",hideTokens:!1}):m(ht,null)),this.user.id()===Ui.session.user.id()&&e.add("newAccessToken",m(gt,{className:"Button",disabled:!Ui.forum.attribute("canCreateAccessToken"),onclick:function(){return Ui.modal.show(Sn,{onsuccess:function(e){t.state.pushToken(e),m.redraw()}})}},Ui.translator.trans("core.forum.security.new_access_token_button"))),e},n.sessionsItems=function(){var t=this,e=new P;if(e.add("sessionsList",this.state.hasLoadedTokens()?m(kn,{type:"session",ondelete:function(e){t.state.removeToken(e),m.redraw()},tokens:this.state.getSessionTokens(),icon:"fas fa-laptop",hideTokens:!0}):m(ht,null)),this.user.id()===Ui.session.user.id()){var n=!this.state.hasOtherActiveSessions(),r=m(gt,{className:"Button",onclick:this.terminateAllOtherSessions.bind(this),loading:this.state.loadingTerminateSessions,disabled:this.state.loadingGlobalLogout||n},Ui.translator.trans("core.forum.security.terminate_all_other_sessions"));n&&(r=m(At,{text:Ui.translator.trans("core.forum.security.cannot_terminate_current_session")},m("span",{tabindex:"0"},r))),e.add("terminateAllOtherSessions",r)}return e},n.loadTokens=function(){var t=this;return Ui.store.find("access-tokens",{filter:{user:this.user.id()}}).then((function(e){t.state.setTokens(e),m.redraw()}))},n.terminateAllOtherSessions=function(){var t=this;if(confirm(ot(Ui.translator.trans("core.forum.security.terminate_all_other_sessions_confirmation"))))return this.state.loadingTerminateSessions=!0,Ui.request({method:"DELETE",url:Ui.forum.attribute("apiUrl")+"/sessions"}).then((function(){var e=t.state.getOtherSessionTokens().length;t.state.removeOtherSessionTokens(),Ui.alerts.show({type:"success"},Ui.translator.trans("core.forum.security.session_terminated",{count:e}))})).catch((function(){Ui.alerts.show({type:"error"},Ui.translator.trans("core.forum.security.session_termination_failed"))})).finally((function(){t.state.loadingTerminateSessions=!1,m.redraw()}))},n.globalLogout=function(){var t=this;return this.state.loadingGlobalLogout=!0,Ui.request({method:"POST",url:Ui.forum.attribute("baseUrl")+"/global-logout"}).then((function(){return window.location.reload()})).finally((function(){t.state.loadingGlobalLogout=!1,m.redraw()}))},e}(Ve);function _n(t){t.routes={index:{path:"/all",component:an},discussion:{path:"/d/:id",component:se,resolverClass:En},"discussion.near":{path:"/d/:id/:near",component:se,resolverClass:En},user:{path:"/u/:username",component:un},"user.posts":{path:"/u/:username",component:un},"user.discussions":{path:"/u/:username/discussions",component:pn},settings:{path:"/settings",component:xn},"user.security":{path:"/u/:username/security",component:Fn},notifications:{path:"/notifications",component:Cn}}}function Pn(t){var e=t.session.user;if(e&&!e.isEmailConfirmed()){var n=function(n){function r(){return n.apply(this,arguments)||this}b(r,n);var i=r.prototype;return i.oninit=function(t){n.prototype.oninit.call(this,t),this.loading=!1,this.sent=!1},i.view=function(){return m(gt,{className:"Button Button--link",onclick:this.onclick.bind(this),loading:this.loading,disabled:this.sent},this.sent?[et("fas fa-check")," ",t.translator.trans("core.forum.user_email_confirmation.sent_message")]:t.translator.trans("core.forum.user_email_confirmation.resend_button"))},i.onclick=function(){var n=this;this.loading=!0,m.redraw(),t.request({method:"POST",url:t.forum.attribute("apiUrl")+"/users/"+e.id()+"/send-confirmation"}).then((function(){n.loading=!1,n.sent=!0,m.redraw()})).catch((function(){n.loading=!1,m.redraw()}))},r}(A),r=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return w({},n,{children:[m("div",{className:"container"},n.children)]})},e}(Tt);m.mount($('<div className="App-notices"/>').insertBefore("#content")[0],{view:function(){return m(r,{dism
vendor: 4,802 bytes, line 2
2issible:!1,controls:[m(n,null)],className:"Alert--emailConfirmation"},t.translator.trans("core.forum.user_email_confirmation.alert_message",{email:m("strong",null,e.email())}))}})}}var Bn=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],In=Bn.join(","),On="undefined"==typeof Element,Ln=On?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Mn=!On&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},$n=function(t,e,n){var r=Array.prototype.slice.apply(t.querySelectorAll(In));return e&&Ln.call(t,In)&&r.unshift(t),r.filter(n)},jn=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),u=t(a.length?a:s.children,!0,r);r.flatten?i.push.apply(i,u):i.push({scope:s,candidates:u})}else{Ln.call(s,In)&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var l=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),c=!r.shadowRootFilter||r.shadowRootFilter(s);if(l&&c){var d=t(!0===l?s.children:l.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scope:s,candidates:d})}else o.unshift.apply(o,s.children)}}return i},Rn=function(t,e){return t.tabIndex<0&&(e||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},Hn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Un=function(t){return"INPUT"===t.tagName},qn=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return 0===n&&0===r},zn=function(t,e){return!(e.disabled||function(t){return Un(t)&&"hidden"===t.type}(e)||function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var i=Ln.call(t,"details>summary:first-of-type")?t.parentElement:t;if(Ln.call(i,"details:not([open]) *"))return!0;var o=Mn(t).host,s=(null==o?void 0:o.ownerDocument.contains(o))||t.ownerDocument.contains(t);if(n&&"full"!==n){if("non-zero-area"===n)return qn(t)}else{if("function"==typeof r){for(var a=t;t;){var u=t.parentElement,l=Mn(t);if(u&&!u.shadowRoot&&!0===r(u))return qn(t);t=t.assignedSlot?t.assignedSlot:u||l===t.ownerDocument?u:l.host}t=a}if(s)return!t.getClientRects().length}return!1}(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(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!!Ln.call(e,"fieldset[disabled] *")||!r.contains(t)}return!0}e=e.parentElement}return!1}(e))},Vn=function(t,e){return!(function(t){return function(t){return Un(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||Mn(t),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)||Rn(e)<0||!zn(t,e))},Wn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Gn=function t(e){var n=[],r=[];return e.forEach((function(e,i){var o=!!e.scope,s=o?e.scope:e,a=Rn(s,o),u=o?t(e.candidates):s;0===a?o?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:a,item:e,isScope:o,content:u})})),r.sort(Hn).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(n)},Yn=function(t,e){var n;return n=(e=e||{}).getShadowRoot?jn([t],e.includeContainer,{filter:Vn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Wn}):$n(t,e.includeContainer,Vn.bind(null,e)),Gn(n)},Kn=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Ln.call(t,In)&&Vn(e,t)},Xn=Bn.concat("iframe").join(","),Jn=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Ln.call(t,Xn)&&zn(e,t)};function Qn(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 Zn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
2e%2?Qn(Object(n),!0).forEach((function(e){tr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function tr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var er,nr=(er=[],{activateTrap:function(t){if(er.length>0){var e=er[er.length-1];e!==t&&e.pause()}var n=er.indexOf(t);-1===n||er.splice(n,1),er.push(t)},deactivateTrap:function(t){var e=er.indexOf(t);-1!==e&&er.splice(e,1),er.length>0&&er[er.length-1].unpause()}}),rr=function(t){return setTimeout(t,0)},ir=function(t,e){var n=-1;return t.every((function(t,r){return!e(t)||(n=r,!1)})),n},or=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},sr=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},ar=function(t,e){var n,r=(null==e?void 0:e.document)||document,i=Zn({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},e),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(t,e,n){return t&&void 0!==t[e]?t[e]:i[n||e]},a=function(t){return o.containerGroups.findIndex((function(e){var n=e.container,r=e.tabbableNodes;return n.contains(t)||r.find((function(e){return e===t}))}))},u=function(t){var e=i[t];if("function"==typeof e){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];e=e.apply(void 0,o)}if(!0===e&&(e=void 0),!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 a=e;if("string"==typeof e&&!(a=r.querySelector(e)))throw new Error("`".concat(t,"` as selector refers to no known node"));return a},l=function(){var t=u("initialFocus");if(!1===t)return!1;if(void 0===t)if(a(r.activeElement)>=0)t=r.activeElement;else{var e=o.tabbableGroups[0];t=e&&e.firstTabbableNode||u("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},c=function(){if(o.containerGroups=o.containers.map((function(t){var e,n,r=Yn(t,i.tabbableOptions),o=(e=t,(n=(n=i.tabbableOptions)||{}).getShadowRoot?jn([e],n.includeContainer,{filter:zn.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):$n(e,n.includeContainer,zn.bind(null,n)));return{container:t,tabbableNodes:r,focusableNodes:o,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.findIndex((function(e){return e===t}));if(!(n<0))return e?o.slice(n+1).find((function(t){return Kn(t,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(t){return Kn(t,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(t){return t.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!u("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(l()))},h=function(t){var e=u("setReturnFocus",t);return e||!1!==e&&t},f=function(t){var e=sr(t);a(e)>=0||(or(i.clickOutsideDeactivates,t)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!Jn(e,i.tabbableOptions)}):or(i.allowOutsideClick,t)||t.preventDefault())},p=function(t){var e=sr(t),n=a(e)>=0;n||e instanceof Document?n&&(o.mostRecentlyFocusedNode=e):(t.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||l()))},m=function(t){if(function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t)&&!1!==or(i.escapeDeactivates,t))return t.preventDefault(),void n.deactivate();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){var e=sr(t);c();var n=null;if(o.tabbableGroups.length>0){var r=a(e),s=r>=0?o.containerGroups[r]:void 0;if(r<0)n=t.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;
2else if(t.shiftKey){var l=ir(o.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e===n}));if(l<0&&(s.container===e||Jn(e,i.tabbableOptions)&&!Kn(e,i.tabbableOptions)&&!s.nextTabbableNode(e,!1))&&(l=r),l>=0){var h=0===l?o.tabbableGroups.length-1:l-1;n=o.tabbableGroups[h].lastTabbableNode}}else{var f=ir(o.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e===n}));if(f<0&&(s.container===e||Jn(e,i.tabbableOptions)&&!Kn(e,i.tabbableOptions)&&!s.nextTabbableNode(e))&&(f=r),f>=0){var p=f===o.tabbableGroups.length-1?0:f+1;n=o.tabbableGroups[p].firstTabbableNode}}}else n=u("fallbackFocus");n&&(t.preventDefault(),d(n))}(t)},v=function(t){var e=sr(t);a(e)>=0||or(i.clickOutsideDeactivates,t)||or(i.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())},g=function(){if(o.active)return nr.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?rr((function(){d(l())})):d(l()),r.addEventListener("focusin",p,!0),r.addEventListener("mousedown",f,{capture:!0,passive:!1}),r.addEventListener("touchstart",f,{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",f,!0),r.removeEventListener("touchstart",f,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(t){if(o.active)return this;var e=s(t,"onActivate"),n=s(t,"onPostActivate"),i=s(t,"checkCanFocusTrap");i||c(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,e&&e();var a=function(){i&&c(),g(),n&&n()};return i?(i(o.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(t){if(!o.active)return this;var e=Zn({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},t);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,y(),o.active=!1,o.paused=!1,nr.deactivateTrap(n);var r=s(e,"onDeactivate"),a=s(e,"onPostDeactivate"),u=s(e,"checkCanReturnFocus"),l=s(e,"returnFocus","returnFocusOnDeactivate");r&&r();var c=function(){rr((function(){l&&d(h(o.nodeFocusedBeforeActivation)),a&&a()}))};return l&&u?(u(h(o.nodeFocusedBeforeActivation)).then(c,c),this):(c(),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 ur(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e[1]=w({escapeDeactivates:!1},e[1]),ar.apply(void 0,e)}var lr=!1;if("undefined"!=typeof window){var cr={get passive(){lr=!0}};window.addEventListener("testPassive",null,cr),window.removeEventListener("testPassive",null,cr)}var dr,hr="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),fr=[],pr=!1,mr=-1,vr=void 0,gr=void 0,yr=void 0,br=function(t){return fr.some((function(e){return!(!e.options.allowTouchMove||!e.options.allowTouchMove(t))}))},wr=function(t){var e=t||window.event;return!!br(e.target)||e.touches.length>1||(e.preventDefault&&e.preventDefault(),!1)},Dr=function(){hr&&(fr.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),pr&&(document.removeEventListener("touchmove",wr,lr?{passive:!1}:void 0),pr=!1),mr=-1),hr?function(){if(void 0!==gr){var t=-parseInt(document.body.style.top,10),e=-parseInt(document.body.style.left,10);document.body.style.position=gr.position,document.body.style.top=gr.top,document.body.style.left=gr.left,window.scrollTo(e,t),gr=void 0}}():(void 0!==yr&&(document.body.style.paddingRight=yr,yr=void 0),void 0!==vr&&(document.body.style.overflow=vr,vr=void 0)),fr=[]},xr=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.lastSetFocusTrap=void 0,e.modalClosing=!1,e.keyUpListener=null,e}b(e,t);var n=e.prototype;return n.view=function(t){var e=this;return m("[",null,this.attrs.state.modalList.map((function(t,n){var r=null==t?void 0:t.componentClass;return m("div",{key:t.key,className:"ModalManager modal","data-modal-key":t.key,"data-modal-number":n,role:"dialog","aria-modal":"true",style:{"--modal-number":n},"aria-hidden":e.attrs.state.modal!==t&&"true"},!!r&&[m(r,Object.assign({key:t.key},t.attrs,{animateShow:e.animateShow.bind(e),animateHide:e.animateHide.bind(e),state:e.attrs.state})),m("div",{key:t.key,className:"ModalManager-invisibleBackdrop",onclick:e.handlePossibleBackdropClick.bind(e)})])}
2)),this.attrs.state.backdropShown&&m("div",{className:"Modal-backdrop backdrop",ontransitionend:this.onBackdropTransitionEnd.bind(this),"data-showing":!!this.attrs.state.modalList.length,style:{"--modal-count":this.attrs.state.modalList.length}}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.keyUpListener=this.handleEscPress.bind(this),document.body.addEventListener("keyup",this.keyUpListener)},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),this.keyUpListener&&document.body.removeEventListener("keyup",this.keyUpListener),this.keyUpListener=null},n.onupdate=function(e){var n=this;t.prototype.onupdate.call(this,e),requestAnimationFrame((function(){try{var t,e;if(!n.attrs.state.isModalOpen())return null==(e=document.getElementById("app"))||e.setAttribute("aria-hidden","false"),null==n.focusTrap.deactivate||n.focusTrap.deactivate(),void Dr();null==(t=document.getElementById("app"))||t.setAttribute("aria-hidden","true");var r=n.attrs.state.modal.key;n.focusTrap&&n.lastSetFocusTrap!==r&&(null==n.focusTrap.deactivate||n.focusTrap.deactivate(),Dr()),n.activeDialogElement&&n.lastSetFocusTrap!==r&&(n.focusTrap=ur(n.activeDialogElement,{allowOutsideClick:!0}),null==n.focusTrap.activate||n.focusTrap.activate(),function(t,e){if(t){if(!fr.some((function(e){return e.targetElement===t}))){var n={targetElement:t,options:e||{}};fr=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(fr),[n]),hr?window.requestAnimationFrame((function(){if(void 0===gr){gr={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var t=window,e=t.scrollY,n=t.scrollX,r=t.innerHeight;document.body.style.position="fixed",document.body.style.top=-e,document.body.style.left=-n,setTimeout((function(){return window.requestAnimationFrame((function(){var t=r-window.innerHeight;t&&e>=r&&(document.body.style.top=-(e+t))}))}),300)}})):function(t){if(void 0===yr){var e=!!t&&!0===t.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;if(e&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);yr=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}void 0===vr&&(vr=document.body.style.overflow,document.body.style.overflow="hidden")}(e),hr&&(t.ontouchstart=function(t){1===t.targetTouches.length&&(mr=t.targetTouches[0].clientY)},t.ontouchmove=function(e){1===e.targetTouches.length&&function(t,e){var n=t.targetTouches[0].clientY-mr;!br(t.target)&&(e&&0===e.scrollTop&&n>0||function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight}(e)&&n<0?wr(t):t.stopPropagation())}(e,t)},pr||(document.addEventListener("touchmove",wr,lr?{passive:!1}:void 0),pr=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")}(n.activeDialogManagerElement,{reserveScrollBarGap:!0})),n.lastSetFocusTrap=r}catch(t){}}))},n.animateShow=function(t){var e=this;void 0===t&&(t=function(){}),this.attrs.state.modal&&(this.activeDialogElement.addEventListener("transitionend",(function(){t()}),{once:!0}),requestAnimationFrame((function(){e.activeDialogElement.classList.add("in")})))},n.animateHide=function(t){var e=this;void 0===t&&(t=function(){}),this.modalClosing||(this.modalClosing=!0,this.activeDialogElement.addEventListener("transitionend",(function(){e.modalClosing=!1,e.attrs.state.close(),t()}),{once:!0}),this.activeDialogElement.classList.remove("in"),this.activeDialogElement.classList.add("out"))},n.handleEscPress=function(t){if(this.attrs.state.modal){var e=this.attrs.state.modal.componentClass.dismissibleOptions;"Escape"===t.key&&e.viaEscKey&&(t.preventDefault(),this.animateHide())}},n.handlePossibleBackdropClick=function(t){this.attrs.state.modal&&this.attrs.state.modal.componentClass.dismissibleOptions.viaBackdropClick&&this.animateHide()},n.onBackdropTransitionEnd=function(t){"opacity"===t.propertyName&&null===t.currentTarget.getAttribute("data-showing")&&(this.attrs.state.backdropSh
2own=!1,m.redraw())},T(e,[{key:"activeDialogElement",get:function(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'+(null==(t=this.attrs.state.modal)?void 0:t.key)+'"] .Modal')}},{key:"activeDialogManagerElement",get:function(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'+(null==(t=this.attrs.state.modal)?void 0:t.key)+'"]')}}]),e}(A),Cr=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.view=function(){var t=this,e=this.state.getActiveAlerts();return m("div",{className:"AlertManager"},Object.keys(e).map(Number).map((function(n){var r=e[n],i="error"===r.attrs.type;return m("div",{className:"AlertManager-alert",role:"alert","aria-live":i?"assertive":"polite"},m(r.componentClass,Object.assign({},r.attrs,{ondismiss:t.state.dismiss.bind(t.state,n)}),r.children))})))},e}(A),Ar=function(t){function e(){return t.apply(this,arguments)||this}b(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;return t=r.length?r.join("\n\n"):n.response?JSON.stringify(n.response,null,2):n.responseText,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}(Ft),Er=n(5387),Nr=n.n(Er),kr=n(1904),Sr=n.n(kr),Tr=n(8213),Fr=n.n(Tr),_r=n(2061),Pr=n.n(_r),Br=n(8974),Ir=n.n(Br),Or=n(9767),Lr=n.n(Or),Mr=n(402),$r=n.n(Mr);function jr(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?jr(e):e)}),[])}function Rr(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 s=t.apply(void 0,r);return e[o]=s,s}}function Hr(t){for(var e=function(t){return/\s/.test(t)},n=[],r={},i=0,o=null,s=!1,a=0;a<t.length;){if(s&&(e(t[a])||"{"===t[a]))s=!1,o=t.slice(i,a),"{"===t[a]&&a--;else if(!s&&!e(t[a])){var u="{"===t[a];if(o&&u){var l=Ur(t,a);if(-1===l)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));r[o]=t.slice(a+1,l),a=l,o=null}else o&&(n.push(o),o=null),s=!0,i=a}a++}return s&&(o=t.slice(i)),o&&n.push(o),{args:n,cases:r}}function Ur(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 qr(t){return zr(t.slice(1,-1),",",3)}function zr(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(),s=t.substring(i+e.length+1).trim();return r.push(o),zr(s,e,n-1,r)}function Vr(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 Wr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Vr(Object(n),!0).forEach((function(e){$r()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Gr=0,Yr="other";function Kr(t,e){for(var n=0,r="",i=0,o={};n<t.length;){if("#"!==t[n]||i)r+=t[n];else{var s="__hashToken".concat(Gr++);r+="{".concat(s,", number}"),o[s]=e}"{"===t[n]?i++:"}"===t[n]&&i--,n++}return{caseBody:r,numberValues:o}}function Xr(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=Hr(e),s=o.args,a=o.cases,u=parseInt(t);
2s.forEach((function(t){t.startsWith("offset:")&&(u-=parseInt(t.slice("offset:".length)))}));var l=[];if("PluralRules"in Intl){void 0!==dr&&dr.resolvedOptions().locale===n||(dr=new Intl.PluralRules(n));var c=dr.select(u);c!==Yr&&l.push(c)}1===u&&l.push("one"),l.push("=".concat(u),Yr);for(var d=0;d<l.length;d++){var h=l[d];if(h in a){var f=Kr(a[h],u),p=f.caseBody,m=f.numberValues;return i(p,Wr(Wr({},r),m))}}return t}var Jr="other";function Qr(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=Hr(e),o=i.cases;return t in o?r(o[t],n):Jr in o?r(o.other,n):t}function Zr(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=[],o=function(r,o,s,a,u,l){if(o)return{break:!0};var c=ti(t,s,a,u);if(!c)return i;var d=c.segmentIndex===a,h=t[c.segmentIndex],f=[];if(d)f.push(r.slice(u+1,c.segmentStart));else{f.push(r.slice(u+1));for(var p=a+1;p<c.segmentIndex;p++)f.push(t[p]);f.push(h.slice(0,c.segmentStart))}return i.push(r.slice(0,l)),i.push(n(s,e,Zr(f.filter((function(t){return""!==t})),e,n))),t.splice(c.segmentIndex+1,0,h.slice(c.segmentEnd+1)),{processedSegment:!0,newSegmentIndex:c.segmentIndex,break:!0}};return ei(t,0,0,i,o),i.filter((function(t){return""!==t})).map((function(t,e){return r.includes(e)?t:ri(t)}))}function ti(t,e,n,r){var i,o=1;return ei(t,n,r,[],(function(t,n,r,s,a,u){return r===e&&(n?o--:o++,0===o)?(i={segmentIndex:s,segmentStart:u,segmentEnd:a},{exit:!0}):{exit:!1}})),i}function ei(t,e,n,r,i){for(var o,s=e;s<t.length;s++){var a=t[s];if("string"==typeof a){for(var u=!1,l=null,c=!1,d=!1,h=s===e?n:0;h<a.length;h++)if(c||"<"!==a[h])if(c&&">"===a[h]){var f=a.slice(l+1+u,h),p=i(a,u,f,s,h,l);if(p.exit)return;if(p.newSegmentIndex&&(s=p.newSegmentIndex),p.processedSegment&&(d=!0),p.break)break;u=!1,l=null,c=!1}else c&&(o=a[h],!/[a-zA-Z-_]/.test(o))&&(u=!1,l=null,c=!1);else l=h,c=!0,"/"===a[h+1]&&(u=!0,h++);d||r.push(a)}else r.push(a)}}function ni(t){return Object.keys(t).reduce((function(e,n){return e[n]=ii(t[n]),e}),{})}function ri(t){return"string"!=typeof t?t:t.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'").replace(/&amp;/g,"&")}function ii(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(ii):t}function oi(t,e,n){return"<".concat(t,">").concat(ri(n),"</").concat(t,">")}var si=function(t){Pr()(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=Lr()(e);if(n){var i=Lr()(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return Ir()(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 Sr()(this,i),(e=r.call(this,t,n)).richHandler=o||oi,e}return Fr()(i,[{key:"rich",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=ni(e),r=jr(this.process(t,n)),i=Math.random().toString(36)+Math.random().toString(36)+Math.random().toString(36),o=Object.fromEntries(Object.entries(e).map((function(t){var e=Nr()(t,2),n=e[0];return e[1],[n,i]}))),s=jr(this.process(t,o)),a=Zr(s,o,(function(){return i})),u=a.map((function(t,e){return t===i?null:e})).filter((function(t){return null!==t}));return Zr(r,n,this.richHandler,u)}}]),i}(function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Sr()(this,t),$r()(this,"format",Rr((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return jr(n.process(t,e)).join("")}))),this.locale=e,this.typeHandlers=r}return Fr()(t,[{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return[];var n=t.indexOf("{");
2if(-1!==n){var r=Ur(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=[],s=t.substring(0,n);s&&o.push(s);var a=qr(i),u=Nr()(a,3),l=u[0],c=u[1],d=u[2],h=e[l];null==h&&(h="");var f=c&&this.typeHandlers[c];o.push(f?f(h,d,this.locale,e,this.process.bind(this)):h);var p=t.substring(r+1);return p&&o.push(this.process(p,e)),o}}return[t]}}]),t}());function ai(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 ui(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ai(Object(n),!0).forEach((function(e){$r()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ai(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function li(t,e,n){var r=e[t]||m(t),i=ri(m.fragment(n).children);return ui(ui({},r),{},{children:i})}var ci=function(){function t(){this.translations={},this.formatter=new si(null,this.formatterTypeHandlers(),li)}var e=t.prototype;return e.setLocale=function(t){this.formatter.locale=t},e.getLocale=function(){return this.formatter.locale},e.addTranslations=function(t){Object.assign(this.translations,t)},e.formatterTypeHandlers=function(){return{plural:Xr,select:Qr}},e.preprocessParameters=function(t){if("user"in t){var e=q(t,"user");t.username||(t.username=Kt(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 di(t){return Array.isArray(t.data)}var hi=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])return e||setTimeout((function(){return mt("Pushing object of type `"+t.type+"` not allowed, as type not yet registered in the store.","3206")})),null;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=Ae(Ne().mark((function t(e,n,r,i){var o,s,a=this;return Ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r={}),void 0===i&&(i={}),o=r,s=p.forum.attribute("apiUrl")+"/"+e,n instanceof Array?s+="?filter[id]="+n.join(","):"object"==typeof n?o=n:n&&(s+="/"+n),t.abrupt("return",p.request(w({method:"GET",url:s,params:o},i)).then((function(t){return di(t),a.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}(),fi=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={}),p.request(w({method:"POST",url:p.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location.href=p.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}(),pi=function(){function t(){var t=this;this.focusTrap=void 0,this.appElement=void 0,this.resizeHandler=function(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=ur("#drawer",{allowOutsideClick:!0,clickOutsideDeactivates:!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=$
2("#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 mi(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:An;n[e+i.path]=new o(i.component,r)}}return n}var vi=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};function gi(){$("[data-humantime]").each((function(){var t=$(this),e=it(t.attr("datetime"));t.html(e)}))}function yi(){setInterval(gi,1e4)}function bi(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 wi(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 Di=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(he),xi=n(2898),Ci=n.n(xi);function Ai(t){for(var e=0,n=0;n<t.length;n++)e+=t.charCodeAt(n);var r=function(t,e,n){var r,i,o,s=Math.floor(6*t),a=6*t-s,u=.63,l=n*(1-.3*a),c=n*(1-.3*(1-a));switch(s%6){case 0:r=n,i=c,o=u;break;case 1:r=l,i=n,o=u;break;case 2:r=u,i=n,o=c;break;case 3:r=u,i=l,o=n;break;case 4:r=c,i=u,o=n;break;case 5:r=n,i=u,o=l}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)}var Ei=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}b(e,t);var n=e.prototype;return n.username=function(){return he.attribute("username").call(this)},n.slug=function(){return he.attribute("slug").call(this)},n.displayName=function(){return he.attribute("displayName").call(this)},n.email=function(){return he.attribute("email").call(this)},n.isEmailConfirmed=function(){return he.attribute("isEmailConfirmed").call(this)},n.password=function(){return he.attribute("password").call(this)},n.avatarUrl=function(){return he.attribute("avatarUrl").call(this)},n.preferences=function(){return he.attribute("preferences").call(this)},n.groups=function(){return he.hasMany("groups").call(this)},n.isAdmin=function(){return he.attribute("isAdmin").call(this)},n.joinTime=function(){return he.attribute("joinTime",he.transformDate).call(this)},n.lastSeenAt=function(){return he.attribute("lastSeenAt",he.transformDate).call(this)},n.markedAllAsReadAt=function(){return he.attribute("markedAllAsReadAt",he.transformDate).call(this)},n.unreadNotificationCount=function(){return he.attribute("unreadNotificationCount").call(this)},n.newNotificationCount=function(){return he.attribute("newNotificationCount").call(this)},n.discussionCount=function(){return he.attribute("discussionCount").call(this)},n.commentCount=function(){return he.attribute("commentCount").call(this)},n.canEdit=function(){return he.attribute("canEdit").call(this)},n.canEditCredentials=function(){return he.attribute("canEditCredentials").call(this)},n.canEditGroups=function(){return he.attribute("canEditGroups").call(this)},n.canDelete=function(){return he.attribute("canDelete").call(this)},n.color=function(){var t=this;return fe("displayName","avatarUrl","avatarColor",(function(e,n,r){return r?"rgb("+r.join(", ")+")":n?(t.calculateAvatarColor(),""):"#"+Ai(e)})).call(this)},n.isOnline=function(){return dayjs().subtract(5,"minutes").isBefore(this.lastSeenAt()
2)},n.badges=function(){var t=new P,e=this.groups();return e&&e.forEach((function(e){t.add("group"+(null==e?void 0:e.id()),m(He,{group:e}))})),t},n.calculateAvatarColor=function(){var t,e=new Image,n=this;e.addEventListener("load",(function(){try{var t=new(Ci());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(null!=e?e:{},t),this.save({preferences:e})},e}(he),Ni=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.number=function(){return he.attribute("number").call(this)},n.discussion=function(){return he.hasOne("discussion").call(this)},n.createdAt=function(){return he.attribute("createdAt",he.transformDate).call(this)},n.user=function(){return he.hasOne("user").call(this)},n.contentType=function(){return he.attribute("contentType").call(this)},n.content=function(){return he.attribute("content").call(this)},n.contentHtml=function(){return he.attribute("contentHtml").call(this)},n.renderFailed=function(){return he.attribute("renderFailed").call(this)},n.contentPlain=function(){return fe("contentHtml",(function(t){return"string"==typeof t?X(t):t})).call(this)},n.editedAt=function(){return he.attribute("editedAt",he.transformDate).call(this)},n.editedUser=function(){return he.hasOne("editedUser").call(this)},n.isEdited=function(){return fe("editedAt",(function(t){return!!t})).call(this)},n.hiddenAt=function(){return he.attribute("hiddenAt",he.transformDate).call(this)},n.hiddenUser=function(){return he.hasOne("hiddenUser").call(this)},n.isHidden=function(){return fe("hiddenAt",(function(t){return!!t})).call(this)},n.canEdit=function(){return he.attribute("canEdit").call(this)},n.canHide=function(){return he.attribute("canHide").call(this)},n.canDelete=function(){return he.attribute("canDelete").call(this)},e}(he),ki=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.contentType=function(){return he.attribute("contentType").call(this)},n.content=function(){return he.attribute("content").call(this)},n.createdAt=function(){return he.attribute("createdAt",he.transformDate).call(this)},n.isRead=function(){return he.attribute("isRead").call(this)},n.user=function(){return he.hasOne("user").call(this)},n.fromUser=function(){return he.hasOne("fromUser").call(this)},n.subject=function(){return he.hasOne("subject").call(this)},e}(he),Si=function(){function t(){this.modal=null,this.modalList=[],this.backdropShown=!1,this.key=0}var e=t.prototype;return e.show=function(t,e,n){var r=this;if(void 0===e&&(e={}),void 0===n&&(n=!1),!(t.prototype instanceof Ft)){var i="The ModalManager can only show Modals.";throw console.error(i),new Error(i)}this.backdropShown=!0,m.redraw.sync(),requestAnimationFrame((function(){r.modal={componentClass:t,attrs:e,key:r.key++},n?r.modalList.push(r.modal):r.modalList=[r.modal],m.redraw()}))},e.close=function(){this.modal&&(this.modalList.length>1?(this.modalList.pop(),this.modal=this.modalList[this.modalList.length-1]):(this.modal=null,this.modalList=[]),m.redraw())},e.isModalOpen=function(){return!!this.modal},t}(),Ti=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=Tt,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}(),Fi=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.token=function(){return he.attribute("token").call(this)},n.userId=function(){return he.attribute("userId").call(this)},n.title=function(){return he.attribute("title").call(this)},n.type=function(){return he.attribute("type").call(this)},n.createdAt=function(){return he.attribute("createdAt",he.transformDate).call(this)},n.lastActivityAt=function(){return he.attribute("lastActivityAt",he.transformDate).call(this)},n.lastIpAddress=function(){return he.attribute("lastIpAddress").call(this)},n.device=function(){return he.attribute("device").call(this)},n.isCurrent=function(){return he.attribute("isCurrent").call(this)},n.isSessionToken=function(){return he.attribute("isSessionToken").call(this)},e}(he),_i=["background","deserialize","extract","modifyText"];function Pi(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 Bi=function(){function t(){this.forum=void 0,this.routes={}
2,this.initializers=new P,this.session=void 0,this.translator=new ci,this.store=new hi({"access-tokens":Fi,forums:Di,users:Ei,discussions:be,posts:Ni,groups:Ue,notifications:ki}),this.cache={},this.booted=!1,this.current=new N(null),this.previous=new N(null),this.modal=new Si,this.alerts=new Ti,this.drawer=void 0,this.history=null,this.pane=null,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,n=[];this.initializers.toArray().forEach((function(t){try{t(e)}catch(e){var r=t.itemName.includes("/")?t.itemName.replace(/(\/flarum-ext-)|(\/flarum-)/g,"-"):t.itemName;n.push((function(){return t=ot(p.translator.trans("core.lib.error.extension_initialiation_failed_message",{extension:r})),n=r+" failed to initialize",i=e,console.group("%c"+n,"background-color: #d83e3e; color: #ffffff; font-weight: bold;"),console.error(i),console.groupEnd(),void(null!=(o=p.session)&&null!=(s=o.user)&&s.isAdmin()&&p.alerts.show({type:"error"},""+t));var t,n,i,o,s}))}})),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums","1"),this.session=new fi(null!=(t=this.store.getById("users",String(this.data.session.userId)))?t:null,this.data.session.csrfToken),this.mount(),this.initialRoute=window.location.href,n.forEach((function(t){return t()}))},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 Pi(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)?Pi(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 m(xr,{state:e.modal})}}),m.mount(document.getElementById("alerts"),{view:function(){return m(Cr,{state:e.alerts})}}),this.drawer=new pi,m.route(document.getElementById("content"),t+"/",mi(this.routes,t));var n=document.getElementById("app"),r=document.querySelector(".App-header"),i=new Gt((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"),yi()},e.preloadedApiDocument=function(){if(this.data.apiDocument&&window.location.href===this.initialRoute){var t=(di(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=m.route.get()===this.forum.attribute("basePath")+"/",n={pageTitle:this.title,forumName:this.forum.attribute("title"),pageNumber:1},r=e||!this.title?ot(p.translator.trans("core.lib.meta_titles.without_page_title",n)):ot(p.translator.trans("core.lib.meta_titles.with_page_title",n));r=t+r;var i=new DOMParser;document.title=i.parseFromString(r,"text/html").body.innerText},e.transformRequestOptions=function(t){var e=this,n=w({},t),r=n.background,i=n.deserialize,o=n.extract,s=n.modifyText,a=U(n,_i),u=s||o,l=w({background:null==r||r,deserialize:null!=i?i:function(t){return t}},a);if(bi(l,"config",(function(t,n){n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)}
2)),l.method&&!["GET","POST"].includes(l.method)){var c=l.method;bi(l,"config",(function(t,e){e.setRequestHeader("X-HTTP-Method-Override",c)})),l.method="POST"}return l.extract=function(t){var e;e=u?u(t.responseText):t.responseText;var n=t.status;if(n<200||n>299)throw new vi(n,""+e,l,t);if(t.getResponseHeader){var r=t.getResponseHeader("X-CSRF-Token");r&&(p.session.csrfToken=r)}try{return""===e?null:JSON.parse(e)}catch(n){throw new vi(500,""+e,l,t)}},l},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,s=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=s.map((function(t){return[t,m("br",null)]})).flat().slice(0,-1);break;case 401:case 403:o=p.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:o=p.translator.trans("core.lib.error.not_found_message");break;case 413:o=p.translator.trans("core.lib.error.payload_too_large_message");break;case 429:o=p.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:o=this.requestWasCrossOrigin(t)?p.translator.trans("core.lib.error.generic_cross_origin_message"):p.translator.trans("core.lib.error.generic_message")}var a=p.forum.attribute("debug");return t.alert={type:"error",content:o,controls:a&&[m(gt,{className:"Button Button--link",onclick:this.showDebug.bind(this,t,s)},p.translator.trans("core.lib.debug_button"))]},e?e(t):this.requestErrorDefaultHandler(t,a,s),Promise.reject(t)},e.requestWasCrossOrigin=function(t){return new URL(t.options.url,document.baseURI).origin!==window.location.origin},e.requestErrorDefaultHandler=function(t,e,n){if(!(t instanceof vi))throw t;if(e&&t.xhr){var r,i=t.options,o=i.method,s=i.url,a=t.xhr.status,u=void 0===a?"":a;console.group(o+" "+s+" "+u),n.length?(r=console).error.apply(r,n):console.error(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(Ar,{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""+q(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:"")},T(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}(),Ii=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){var t=p.history,e=p.pane;return m("div",{className:L("Navigation ButtonGroup",this.attrs.className),onmouseenter:e&&e.show.bind(e),onmouseleave:e&&e.onmouseleave.bind(e)},null!=t&&t.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.getBackButton=function(){var t=p.history,e=null==t?void 0:t.getPrevious();return m(ue,{className:"Button Navigation-back Button--icon",href:null==t?void 0:t.backUrl(),icon:"fas fa-chevron-left","aria-label":null==e?void 0:e.title,onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),null==t||t.back())}})},n.getPaneButton=function(){var t=p.pane;return t&&t.active?m(gt,{className:L("Button Button--icon Navigation-pin",{active:t.pinned}),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):null},n.getDrawerButton=function(){if(!this.attrs.drawer)return null;var t=p.drawer,e=p.session.user;return m(gt,{className:L("Button Button--icon Navigation-drawer",{new:null==e?void 0:e.newNotificationCount()}),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars","aria-label":p.translator.trans("core.lib.nav.drawer_button")})},e}(A),Oi=function(t){function e(){return t.call(this,{},1,20)||this}b(e,t);var n=e.prototype;return n.load=function(){var e,n;return null!=(e=Ui.session.user)&&e.newNotificationCount()&&(this.pages=[],this.location={page:1}),this.pages.length>0?Promise.resolve():(null==(n=Ui.session.user)||n.pushAttributes({newNotificationCount:0}),t.prototype.loadNext.call(this))},n.markAllAsRead=function(){var t;if(0!==this.pages.length)return null==(t=Ui.session.user)||t.pushAttributes({unreadNotificationCount:0}
2),this.pages.forEach((function(t){t.items.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),Ui.request({url:Ui.forum.attribute("apiUrl")+"/notifications/read",method:"POST"})},n.deleteAll=function(){var t;if(0!==this.pages.length)return null==(t=Ui.session.user)||t.pushAttributes({unreadNotificationCount:0}),this.pages=[],Ui.request({url:Ui.forum.attribute("apiUrl")+"/notifications",method:"DELETE"})},T(e,[{key:"type",get:function(){return"notifications"}}]),e}(ln),Li=function(){function t(t){void 0===t&&(t=[]),this.cachedSearches=void 0,this.value="",this.cachedSearches=new Set(t)}var e=t.prototype;return e.getInitialSearch=function(){return""},e.getValue=function(){return this.value},e.setValue=function(t){this.value=t},e.clear=function(){this.setValue("")},e.cache=function(t){this.cachedSearches.add(t)},e.isCached=function(t){return this.cachedSearches.has(t)},t}(),Mi=["q"],$i=function(t){function e(e){var n;return void 0===e&&(e=[]),(n=t.call(this,e)||this).initialValueSet=!1,n}b(e,t);var n=e.prototype;return n.getValue=function(){return!this.initialValueSet&&this.currPageProvidesSearch()&&this.intializeValue(),t.prototype.getValue.call(this)},n.intializeValue=function(){this.setValue(this.getInitialSearch()),this.initialValueSet=!0},n.currPageProvidesSearch=function(){return Ui.current.type&&Ui.current.type.providesInitialSearch},n.getInitialSearch=function(){return this.currPageProvidesSearch()?this.params().q:""},n.clear=function(){t.prototype.clear.call(this),this.getInitialSearch()?this.clearInitialSearch():m.redraw()},n.clearInitialSearch=function(){var t=this.params(),e=(t.q,U(t,Mi));D(Ui.route(Ui.current.get("routeName"),e))},n.stickyParams=function(){return{sort:m.route.param("sort"),q:m.route.param("q")}},n.params=function(){var t=this.stickyParams();return t.filter=m.route.param("filter"),t},n.changeSort=function(t){var e=this.params();t===Object.keys(Ui.discussions.sortMap())[0]?delete e.sort:e.sort=t,D(Ui.route(Ui.current.get("routeName"),e))},e}(Li);function ji(){return"ontouchstart"in window&&null!=navigator.vendor&&navigator.vendor.includes("Apple")&&null!=navigator.userAgent&&!navigator.userAgent.includes("CriOS")&&!navigator.userAgent.includes("FxiOS")}var Ri=function(t){function e(){var e;return(e=t.call(this)||this).notificationComponents={discussionRenamed:Le},e.postComponents={comment:tn,discussionRenamed:nn},e.pane=null,e.history=new x,e.notifications=new Oi,e.search=new $i,e.composer=new Be,e.discussions=new fn({}),e.route=void 0,e.data=void 0,_n(g(e)),e.route=Object.assign(Object.getPrototypeOf(Object.getPrototypeOf(g(e))).route.bind(g(e)),function(t){return{discussion:function(t){function e(e,n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e,n){return t.route(n&&1!==n?"discussion.near":"discussion",{id:e.slug(),near:n&&1!==n?n:void 0})})),post:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e){return t.route.discussion(e.discussion(),e.number())})),user:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e){return t.route("user",{username:e.slug()})}))}}(g(e))),e}b(e,t);var n=e.prototype;return n.mount=function(){var e=this,n=this.forum.attribute("defaultRoute"),r="index";for(var i in this.routes)this.routes[i].path===n&&(r=i);this.routes[r].path="/",this.history.push(r,ot(this.translator.trans("core.forum.header.back_to_index_tooltip")),"/"),this.pane=new C(document.getElementById("app")),m.route.prefix="",t.prototype.mount.call(this,this.forum.attribute("basePath")),m.mount(document.getElementById("app-navigation"),{view:function(){return m(Ii,{className:"App-backControl",drawer:!0})}}),m.mount(document.getElementById("header-navigation"),Ii),m.mount(document.getElementById("header-primary"),ae),m.mount(document.getElementById("header-secondary"),Fe),m.mount(document.getElementById("composer"),{view:function(){return m(Ie,{state:e.composer})}}),Pn(this),document.getElementById("home-link").addEventListener("click",(function(t){var e;if(!t.ctrlKey&&!t.metaKey&&1!==t.button){t.preventDefault(),Ui.history.home();var n=null==(e=Ui.session.user)?void 0:e.id();n&&(Ui.store.find("users",n),m.redraw())}})),ji()&&$((function(){$(".App").addClass("mobile-safari")}))},n.viewingDiscussion=function(t){return this.current.matches(se,{discussion:t})},n.authenticationComplete=function(t){t.loggedIn?window.location.reload():this.modal.show(Ot,t)},e}(Bi),Hi=new Ri;window.app=Hi;const Ui=Hi;function qi(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 zi=function(){function t(t){this.model=void 0,this.callbacks=[],this.model=t}var e=t.prototype;return e.attribute=function(t,e){var n=this;return void 0===e&&(e=null),this.callbacks.push((function(){n.model.prototype[t]=e?he.attribute(t,e):he.attribute(t)})),this},e.hasOne=function(t){var e=this;return this.callbacks.push((function(){e.model.prototype[t]=he.hasOne(t)})),this},e.hasMany=function(t){var e=this;return this.callbacks.push((function(){e.model.prototype[t]=he.hasMany(t)})),this},e.extend=function(t,e){for(var n,r=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 qi(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)?qi(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.")}(this.callbacks);!(n=r()).done;)n.value.call(this)},t}(),Vi=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}(),Wi=function(){function t(){this.routes={},this.helpers={}}var e=t.prototype;return e.add=function(t,e,n){return this.routes[t]={path:e,component:n},this},e.helper=function(t,e){return this.helpers[t]=e,this},e.extend=function(t,e){Object.assign(t.routes,this.routes),Object.assign(t.route,this.helpers)},t}(),Gi=function(){function t(){this.models={}}var e=t.prototype;return e.add=function(t,e){return this.models[t]=e,this}
2,e.extend=function(t,e){for(var n in this.models){if(t.store.models[n])throw new Error('The model type "'+n+'" has already been registered with the class "'+t.store.models[n].name+'".');t.store.models[n]=this.models[n]}},t}();const Yi={Model:zi,PostTypes:Vi,Routes:Wi,Store:Gi};var Ki="The `evented` util is deprecated and no longer supported.",Xi="2547";const Ji={handlers:null,getHandlers:function(t){return mt(Ki,Xi),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];mt(Ki,Xi),this.getHandlers(t).forEach((function(t){return t.apply(e,r)}))},on:function(t,e){mt(Ki,Xi),this.getHandlers(t).push(e)},one:function(t,e){mt(Ki,Xi),this.getHandlers(t).push((function n(){e.apply(this,arguments),this.off(t,n)}))},off:function(t,e){mt(Ki,Xi);var n=this.getHandlers(t),r=n.indexOf(e);-1!==r&&n.splice(r,1)}};var Qi,Zi={prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1};function to(t){return t.trim().split("\n").length>1}function eo(t,e){return Array(e+1).join(t)}function no(t){var e,n,r=t.value.slice(0,t.selectionStart),i=t.value.slice(t.selectionEnd),o=r.match(/\n*$/),s=i.match(/^\n*/),a=o?o[0].length:0,u=s?s[0].length:0;return r.match(/\S/)&&a<2&&(e=eo("\n",2-a)),i.match(/\S/)&&u<2&&(n=eo("\n",2-u)),null==e&&(e=""),null==n&&(n=""),{newlinesToAppend:e,newlinesToPrepend:n}}function ro(t){var e=t.split("\n"),n=/^\d+\.\s+/,r=e.every((function(t){return n.test(t)})),i=e;return r&&(i=e.map((function(t){return t.replace(n,"")}))),{text:i.join("\n"),processed:r}}function io(t){var e=t.split("\n"),n=e.every((function(t){return t.startsWith("- ")})),r=e;return n&&(r=e.map((function(t){return t.slice("- ".length,t.length)}))),{text:r.join("\n"),processed:n}}function oo(t,e){return e?"- ":t+1+". "}function so(t,e){var n,r,i=new RegExp(String.raw(Qi||(n=["(w+/)?(","|common)/"],(r=["(\\w+\\/)?(","|common)\\/"])||(r=n.slice(0)),n.raw=r,Qi=n),e)),o=/(\.js|\.tsx?)$/;return new Proxy(t,{get:function(t,e){return t[e]||t[e.replace(i,"$1").replace(o,"")]}})}var ao=["className","class"],uo=["options","onchange","value","disabled","className","class","wrapperAttrs"],lo=function(t){function e(){return t.apply(this,arguments)||this}return b(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,s=t.class,a=t.wrapperAttrs,u=(a=void 0===a?{}:a).className,l=a.class,c=U(a,ao),d=U(t,uo);return m("span",Object.assign({className:L("Select",u,l)},c),m("select",Object.assign({className:L("Select-input FormControl",o,s),onchange:n?mn("value",n.bind(this)):void 0,value:r,disabled:i},d),Object.keys(e).map((function(t){return m("option",{value:t},e[t])}))),et("fas fa-sort",{className:"Select-caret"}))},e}(A),co=["className","id"],ho=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=e.id,i=U(e,co);return i.type||(i.type="text"),4===i.value.length&&(i.value=i.value.replace(/#([a-f0-9])([a-f0-9])([a-f0-9])/,"#$1$1$2$2$3$3")),m("div",{className:"ColorInput"},m("input",Object.assign({className:L("FormControl",n),id:r},i)),m("span",{className:"ColorInput-icon",role:"presentation"},et("fas fa-exclamation-circle")),m("input",Object.assign({className:"ColorInput-preview"},i,{type:"color"})))},e}(A),fo=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return m(At,{text:this.attrs.tooltipText||ot(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}(gt);const po={extenders:Yi,extend:i,Session:fi,Store:hi,"utils/BasicEditorDriver":xt,"utils/evented":Ji,"utils/EventEmitter":cn,"utils/KeyboardNavigatable":xe,"utils/liveHumanTimes":yi,"utils/ItemList":P,"utils/mixin":function(t){for(var e=function(t){function e(){return t.apply(this,arguments)||this}return b(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":it,"utils/computed":fe,"utils/insertText":Dt,"utils/styleSelectedText":function(t,e){t.focus(),e=Object.assign({},Zi,e);var n,r=t.value.slice(t.selectionStart,t.selectionEnd);n=e.orderedList||e.unorderedList?function(t,e){var n=t.selectionStart===t.selectionEnd,r=t.selectionStart,i=t.selectionEnd;!function(t){for(var e=t.value.split("\n"),n=0,r=0;r<e.length;r++){var i=e[r].length+1;t.selectionStart>=n&&t.selectionStart<n+i&&(t.selectionStart=n),t.selectionEnd>=n&&t.selectionEnd<n+i&&(t.selectionEnd=n+i-1),n+=i}}(t);var o=t.value.slice(t.selectionStart,t.selectionEnd),s=function(t,e){var n,r,i;return i=t.orderedList?(n=io((r=ro(e)).text)).text:(n=ro((r=io(e)).text)).text,[r,n,i]}(e,o),a=s[0],u=s[1],l=s[2],c=l.split("\n").map((function(t,n){return""+oo(n,e.unorderedList)+t})),d=c.reduce((function(t,n,r){return t+oo(r,e.unorderedList).length}),0),h=c.reduce((function(t,n,r){return t+oo(r,!e.unorderedList).length}),0);if(a.processed)return n?i=r=Math.max(r-oo(0,e.unorderedList).length,0):(r=t.selectionStart,i=t.selectionEnd-d),{text:l,selectionStart:r,selectionEnd:i};var f=no(t),p=f.newlinesToAppend,m=f.newlinesToPrepend,v=p+c.join("\n")+m;return n?i=r=Math.max(r+oo(0,e.unorderedList).length+p.length,0):u.processed?(r=Math.max(t.selectionStart+p.length,0),i=t.selectionEnd+
2p.length+d-h):(r=Math.max(t.selectionStart+p.length,0),i=t.selectionEnd+p.length+d),{text:v,selectionStart:r,selectionEnd:i}}(t,e):e.multiline&&to(r)?function(t,e){var n=e.prefix,r=e.suffix,i=e.blockPrefix,o=e.blockSuffix,s=e.surroundWithNewlines,a=t.value.slice(t.selectionStart,t.selectionEnd),u=t.selectionStart,l=t.selectionEnd,c=a.split("\n"),d=i.length>0?i:n,h=o.length>0?o:d==n?r:"";if(c.every((function(t){return t.startsWith(d)&&t.endsWith(h)})))l=u+(a=c.map((function(t){return t.slice(d.length,t.length-h.length)})).join("\n")).length;else if(a=c.map((function(t){return d+t+h})).join("\n"),s||""===h){var f=no(t),p=f.newlinesToAppend,m=f.newlinesToPrepend;l=(u+=p.length)+a.length,a=p+a+m}return{text:a,selectionStart:u,selectionEnd:l}}(t,e):function(t,e){var n=e.prefix,r=e.suffix,i=e.blockPrefix,o=e.blockSuffix,s=e.replaceNext,a=e.prefixSpace,u=e.scanFor,l=e.surroundWithNewlines,c=t.selectionStart,d=t.selectionEnd,h=t.value.slice(t.selectionStart,t.selectionEnd),f=to(h)&&i.length>0?i+"\n":n,p=to(h)&&o.length>0?"\n"+o:f===n?r:"";if(a){var m=t.value[t.selectionStart-1];0===t.selectionStart||null==m||m.match(/\s/)||(f=" "+f)}h=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=function(t,e,n){for(var r=e,i=n?/\n/:/\s/;t[r]&&!t[r].match(i);)r++;return r}(t.value,t.selectionEnd,r);else{var i=t.selectionStart-e.length,o=t.selectionEnd+n.length,s=t.value.slice(i,t.selectionStart)===e,a=t.value.slice(t.selectionEnd,o)===n;s&&a&&(t.selectionStart=i,t.selectionEnd=o)}return t.value.slice(t.selectionStart,t.selectionEnd)}(t,f,p,e.multiline);var v=t.selectionStart,g=t.selectionEnd,y=s.length>0&&p.indexOf(s)>-1&&h.length>0;if(l){var b=no(t);f=b.newlinesToAppend+n,p+=b.newlinesToPrepend}if(h.startsWith(f)&&h.endsWith(p)){var w=h.slice(f.length,h.length-p.length);if(c===d){var D=c-f.length;D=Math.max(D,v),v=g=D=Math.min(D,v+w.length)}else g=v+w.length;return{text:w,selectionStart:v,selectionEnd:g}}if(y)return u.length>0&&h.match(u)?{text:f+(p=p.replace(s,h)),selectionStart:v=g=v+f.length,selectionEnd:g}:{text:f+h+p,selectionStart:v=v+f.length+h.length+p.indexOf(s),selectionEnd:g=v+s.length};var x=f+h+p;v=c+f.length,g=d+f.length;var C=h.match(/^\s*|\s*$/g);if(e.trimFirst&&C){var A=C[0]||"",E=C[1]||"";x=A+f+h.trim()+p+E,v+=A.length,g-=E.length}return{text:x,selectionStart:v,selectionEnd:g}}(t,e),Dt(t,n)},"utils/Drawer":pi,"utils/anchorScroll":ie,"utils/RequestError":vi,"utils/abbreviateNumber":st,"utils/string":t,"utils/SubtreeRetainer":ct,"utils/escapeRegExp":Ht,"utils/extract":q,"utils/ScrollListener":Gt,"utils/stringToColor":Ai,"utils/Stream":Pt,"utils/subclassOf":E,"utils/setRouteWithForcedRefresh":D,"utils/patchMithril":h,"utils/proxifyCompat":so,"utils/classList":L,"utils/extractText":ot,"utils/formatNumber":Zt,"utils/mapRoutes":mi,"utils/withAttr":mn,"utils/throttleDebounce":o,"utils/isObject":F,"utils/focusTrap":e,"utils/isDark":pe,"models/Notification":ki,"models/User":Ei,"models/Post":Ni,"models/Discussion":be,"models/Group":Ue,"models/Forum":Di,Component:A,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:ci,"components/AlertManager":Cr,"components/Page":k,"components/Switch":gn,"components/Badge":ye,"components/LoadingIndicator":ht,"components/Placeholder":qt,"components/Separator":I,"components/Dropdown":at,"components/SplitDropdown":ee,"components/RequestErrorModal":Ar,"components/FieldSet":yn,"components/Select":lo,"components/Navigation":Ii,"components/Alert":Tt,"components/Link":W,"components/LinkButton":ue,"components/Checkbox":vn,"components/ColorPreviewInput":ho,"components/SelectDropdown":de,"components/ModalManager":xr,"components/Button":gt,"components/Modal":Ft,"components/GroupBadge":He,"components/TextEditor":Et,"components/TextEditorButton":fo,"components/Tooltip":At,"components/EditUserModal":qe,Model:he,Application:Bi,"helpers/fullTime":Je,"helpers/avatar":G,"helpers/icon":et,"helpers/humanTime":ut,"helpers/punctuateSeries":function(t){if(2===t.length)return p.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,p.translator.trans("core.lib.series.glue_text")])}),[]).slice(0,-1);return p.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t},"helpers/highlight":tt,"helpers/username":Kt,"helpers/userOnline":Ke,"helpers/listItems":R,"helpers/textContrastClass":me,"resolvers/DefaultResolver":An,"states/PaginatedListState":ln,"states/AlertManagerState":Ti,"states/ModalManagerState":Si,"states/PageState":N};var mo=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.initAttrs=function(e){e.className=L(e.className,"LogInButton"),e.onclick=function(){var t=$(window);window.open(Ui.forum.attribute("baseUrl")+e.path,"logInPopup","width=580,height=400,top="+(t.height()/2-200)+",left="+(t.width()/2-290)+",status=no,scrollbars=yes,resizable=no")},t.initAttrs.call(this,e)},e}(gt),vo=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){var t=this.attrs.post,e=t.user(),n="comment"===t.contentType()&&t.contentPlain(),r=n?tt(n,this.attrs.highlight,300):"";return m(W,{className:"PostPreview",href:Ui.route.post(t),onclick:this.attrs.onclick},m("span",{className:"PostPreview-content"},G(e),Kt(e)," ",m("span",{className:"PostPreview-excerpt"},r)))},e}(A);const go=Object.assign(po,{"utils/PostControls":je,"utils/KeyboardNavigatable":xe,"utils/slidable":jt,"utils/History":x,"utils/DiscussionControls":$t,"utils/alertEmailConfirmation":Pn,"utils/UserControls":We,"utils/Pane":C,"utils/BasicEditorDriver":xt,"utils/isSafariMobile":ji,"states/ComposerState":Be,"states/DiscussionListState":fn,"states/GlobalSearchState":$i,"states/NotificationListState":Oi,"states/PostStreamState":oe,"states/SearchState":Li,"states/UserSecurityPageState":Tn,"components/AffixedSidebar":ze,"components/DiscussionPage":se,"components/DiscussionListPane":Wt,"components/LogInModal":Lt,"components/ComposerBody":Nt,"components/ForgotPasswordModal":Bt,"components/Notification":Oe,"components/LogInButton":mo,"components/DiscussionsUserPage":pn,"components/Composer":Ie,"components/SessionDropdown":le,"components/HeaderPrimary":ae,"components/PostEdited":Ze,"components/PostStream":Qt,"components/ChangePasswordModal":wn,"components/IndexPage":an,"components/DiscussionRenamedNotification":Le,"components/DiscussionsSearchSource":ke,"components/HeaderSecondary":Fe,"components/ComposerButton":_e,"components/DiscussionList":zt,"components/ReplyPlaceholder":Jt,"components/AvatarEditor":Ge,"components/Post":Re,"components/SettingsPage":xn,"components/TerminalPost":lt,"components/ChangeEmailModal":Dn,"components/NotificationsDropdown":De,"components/UserPage":Ve,"components/PostUser":Xe,"components/UserCard":Ye,"components/UsersSearchSource":Se,"components/UserSecurityPage":Fn,"components/NotificationGrid":bn,"components/PostPreview":vo,"components/EventPost":en,"components/DiscussionHero":H,"components/PostMeta":Qe,"components/DiscussionRenamedPost":nn,"components/DiscussionComposer":sn,"components/LogInButtons":It,"components/NotificationList":we,"components/WelcomeHero":on,"components/SignUpModal":Ot,"components/CommentPost":tn,"components/ComposerPostPreview":Xt,"components/ReplyComposer":St,"components/NotificationsPage":Cn,"components/PostStreamScrubber":te,"components/EditPostComposer":$e,"components/RenameDiscussionModal":Mt,"components/Search":Te,"components/DiscussionListItem":Ut,"components/LoadingPost":Yt,"components/PostsUserPage":un,"resolvers/DiscussionPageResolver":En,routes:_n,ForumApplication:Ri});go.app=Ui;var yo=so(go,"forum")})(),flarum.core=r})();
3
4
5(function(){var HINT={};HINT.EMOTICONS_NOT_AFTER=0;HINT.LITEDOWN_DECODE_HTML_ENTITIES=0;HINT.PREG_HAS_PASSTHROUGH=!1;HINT.RULE_AUTO_CLOSE=1;HINT.RULE_AUTO_REOPEN=1;HINT.RULE_BREAK_PARAGRAPH=1;HINT.RULE_CREATE_PARAGRAPHS=1;HINT.RULE_DISABLE_AUTO_BR=1;HINT.RULE_ENABLE_AUTO_BR=1;HINT.RULE_IGNORE_TAGS=1;HINT.RULE_IGNORE_TEXT=1;HINT.RULE_IGNORE_WHITESPACE=1;HINT.RULE_IS_TRANSPARENT=1;HINT.RULE_PREVENT_BR=1;HINT.RULE_SUSPEND_AUTO_BR=1;HINT.RULE_TRIM_FIRST_LINE=1;HINT.attributeDefaultValue=0;HINT.closeAncestor=0;HINT.closeParent=1;HINT.createChild=1;HINT.fosterParent=1;HINT.hash=1;HINT.ignoreAttrs=1;HINT.namespaces=0;HINT.onRender=1;HINT.onUpdate=1;HINT.regexp=1;HINT.regexpLimit=1;HINT.requireAncestor=0;var o553403F9=[0];var oF6AF222C=[32623];var oE98D0814=[32583];var oA385316A=[16705];var oBB818D5A=[23885];var oB565876D={flags:2};var o939F1698={flags:514};var oA80287CC={flags:3089};var o02D8DBB5={filterChain:[],required:!0};var o1BC3EAF4={filterChain:[],required:!1};var oD4869BFF={"B":1,"C":1,"COLOR":1,"EM":1,"EMAIL":1,"I":1,"S":1,"SIZE":1,"STRONG":1,"U":1,"URL":1};var oDF43256F=[function(attrValue,attrName){return NumericFilter.filterUint(attrValue)}];var o118B31AC=function(tag,tagConfig){return filterAttributes(tag,tagConfig,registeredVars,logger)};var o1B4F5B52=[o118B31AC];var o6CB0A318={filterChain:oDF43256F,required:!0};var o75AB9259={filterChain:oDF43256F,required:!1};var oF307D35C={filterChain:[function(attrValue,attrName){return UrlFilter.filter(attrValue,registeredVars.urlConfig,logger)}],required:!0};var o1AF69066={closeParent:oD4869BFF,flags:268,fosterParent:oD4869BFF};var oB84A1289={allowed:oE98D0814,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000};var o6C76824E={allowed:oE98D0814,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:0},tagLimit:5000};var o28E55ACF={allowed:oE98D0814,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:260,fosterParent:oD4869BFF},tagLimit:5000};var xsl=("<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http:\/\/www.w3.org\/1999\/XSL\/Transform\"><xsl:output method=\"html\" encoding=\"utf-8\" indent=\"no\"\/><xsl:decimal-format decimal-separator=\".\"\/><$t$jDISCUSSION_URL\">https:\/\/greatsoftwarecompany.com\/discuss\/public\/d\/<\/$t><$t$jL_WROTE\"\/><$t$jPROFILE_URL\">https:\/\/greatsoftwarecompany.com\/discuss\/public\/u\/<\/$t><$t$jTAG_URL\">https:\/\/greatsoftwarecompany.com\/discuss\/public\/t\/<\/$t>$aB|DEL|EM|H1|H2|H3|H4|H5|H6|I|LI|S|STRONG|SUB|SUP|U|p\"><xsl:element$j{translate(name(),'BDEGHILMNOPRSTU','bdeghilmnoprstu')}\">$b<\/xsl:element>$c$aC\"><code>$b<\/code>$c$aCENTER\"><div$otext-align:center\">$b<\/div>$c$aCODE\"><pre data-s9e-livepreview-hash=\"\" data-s9e-livepreview-onupdate=\"if(window['hljsLoader'])window['hljsLoader']['highlightBlocks'](this)\"><code><$p$e@lang\"><$g$j$q>language-$d@lang\"\/><\/$g><\/$p>$b<\/code><script async=\"\" crossorigin=\"anonymous\" data-hljs-style=\"github\" data-s9e-livepreview-onrender=\"if(window['hljsLoader'])this.parentNode.removeChild(this)\" integrity=\"sha384-vbylffRV+sn4FL7ftwAw6eJ1uNcsQT3ETMpPJQZaOtzW+0d+jnlf1LJj9Jgf8Scp\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/s9e\/[email protected]\/loader.min.js\"\/><script>\n                    if(window.hljsLoader &amp;&amp; !document.currentScript.parentNode.hasAttribute('data-s9e-livepreview-onupdate')) {\n                        window.hljsLoader.highlightBlocks(document.currentScript.parentNode);\n                    }\n                <\/script><\/pre>$c$aCOLOR\"><$v$ocolor:{@color}\">$b<\/$v>$c$aE\"><$k><$f$e.=':)'\">\ud83d\ude42<\/$f><$f$e.=':D'\">\ud83d\ude03<\/$f><$f$e.=':P'\">\ud83d\ude1b<\/$f><$f$e.=':('\">\ud83d\ude41<\/$f><$f$e.=':|'\">\ud83d\ude10<\/$f><$f$e.=';)'\">\ud83d\ude09<\/$f><$f$e.=&quot;:'(&quot;\">\ud83d\ude22<\/$f><$f$e.=':O'\">\ud83d\ude2e<\/$f><$f$e.='&gt;:('\">\ud83d\ude21<\/$f><$h>$d.\"\/><\/$h>
5<\/$k>$c$aEMAIL\"><a$umailto:{@email}\">$b<\/a>$c$aESC\">$b$c$aGROUPMENTION\"><$v><$k><$f$e$w!=1\"><$k><$f$estring(@color)!=''\"><$g$j$q>GroupMention GroupMention--colored<\/$g><$g$jstyle\">--color:$d@color\"\/>;<\/$g><\/$f><$h><$g$j$q>GroupMention<\/$g><\/$h><\/$k><\/$f><$h><$g$j$q>GroupMention GroupMention--deleted<\/$g><\/$h><\/$k"+"><$v$iGroupMention-name\">@$d@groupname\"\/><\/$v><$p$estring(@icon)!=''\"><i$iicon {@icon}\"\/><\/$p><\/$v>$c$aHR\"><hr\/>$c$aIMG\"><img src=\"{@src}\" title=\"{@title}\" alt=\"{@alt}\">$lheight|@width\"\/><\/img>$c$aISPOILER\"><$v$ispoiler\"$m$q onclick=\"removeAttribute('class')\">$b<\/$v>$c$aLIST\"><$k><$f$enot(@type)\"><ul>$b<\/ul><\/$f><$f$estarts-with(@type,'decimal')or starts-with(@type,'lower')or starts-with(@type,'upper')\"><ol$o$s>$lstart\"\/>$b<\/ol><\/$f><$h><ul$o$s>$b<\/ul><\/$h><\/$k>$c$aPOSTMENTION\"><$k><$f$e$w!=1\"><a$u{$DISCUSSION_URL}{@discussionid}\/{@number}\"$iPostMention\"$r{@id}\">$d$n\"\/><\/a><\/$f><$h><$v$iPostMention PostMention--deleted\"$r{@id}\">$d$n\"\/><\/$v><\/$h><\/$k>$c$aQUOTE\"><blockquote><$p$enot(@author)\"><$g$j$q>uncited<\/$g><\/$p><div><$p$e@author\"><cite>$d@author\"\/><xsl:text> <\/xsl:text>$d$L_WROTE\"\/><\/cite><\/$p>$b<\/div><\/blockquote>$c$aSIZE\"><$v$ofont-size:{@size}px\">$b<\/$v>$c$aSPOILER\"><details$ispoiler\"$mopen\">$b<\/details>$c$aTAGMENTION\"><$k><$f$e$w!=1\"><a$u{$TAG_URL}{@slug}\"$r{@id}\"><$g$j$q>TagMention<$p$e@color!=''\"> TagMention--colored<\/$p><\/$g><$g$jstyle\"><$p$e@color!=''\">--color:$d@color\"\/><\/$p><\/$g><$v$iTagMention-text\"><$p$e@icon!=''\"><i$iicon {@icon}\"\/><\/$p>$d@tagname\"\/><\/$v><\/a><\/$f><$h><$v$iTagMention TagMention--deleted\"$r{@id}\"><$v$iTagMention-text\">$d@tagname\"\/><\/$v><\/$v><\/$h><\/$k>$c$aURL\"><a$u{@url}\">$lrel|@target|@title\"\/>$b<\/a>$c$aUSERMENTION\"><$k><$f$e$w!=1\"><a$u{$PROFILE_URL}{@slug}\"$iUserMention\">@$d$n\"\/><\/a><\/$f><$h><$v$iUserMention UserMention--deleted\">@$d$n\"\/><\/$v><\/$h><\/$k>$c$abr\"><br\/>$c$ae|i|s\"\/><\/xsl:stylesheet>").replace(/\$[a-w]/g,function(k){return{"$a":"<xsl:template match=\"","$b":"<xsl:apply-templates\/>","$c":"<\/xsl:template>","$d":"<xsl:value-of select=\"","$e":" test=\"","$f":"xsl:when","$g":"xsl:attribute","$h":"xsl:otherwise","$i":" class=\"","$j":" name=\"","$k":"xsl:choose","$l":"<xsl:copy-of select=\"@","$m":" data-s9e-livepreview-ignore-attrs=\"","$n":"@displayname","$o":" style=\"","$p":"xsl:if","$q":"class\"","$r":" data-id=\"","$s":"list-style-type:{@type}\"","$t":"xsl:param","$u":" href=\"","$v":"span","$w":"@deleted"}[k]});var functionCache={"if(window['hljsLoader'])window['hljsLoader']['highlightBlocks'](this)":function(){if(window.hljsLoader)window.hljsLoader.highlightBlocks(this);},"if(window['hljsLoader'])this.parentNode.removeChild(this)":function(){if(window.hljsLoader)this.parentNode.removeChild(this);}};var EmailFilter={filter:function(attrValue){return/^[-\w.+]+@[-\w.]+$/.test(attrValue)?attrValue:!1}};var FalseFilter={filter:function(attrValue){return!1}};var HashmapFilter={filter:function(attrValue,map,strict){if(attrValue in map){return map[attrValue]}
6return(strict)?!1:attrValue}};var MapFilter={filter:function(attrValue,map){var i=-1,cnt=map.length;while(++i<cnt){if(map[i][0].test(attrValue)){return map[i][1]}}
7return attrValue}};var NetworkFilter={filterIp:function(attrValue){if(/^[\d.]+$/.test(attrValue)){return NetworkFilter.filterIpv4(attrValue)}
8if(/^[\da-f:]+$/i.test(attrValue)){return NetworkFilter.filterIpv6(attrValue)}
9return!1},filterIpport:function(attrValue){var m,ip;if(m=/^\[([\da-f:]+)(\]:[1-9]\d*)$/i.exec(attrValue)){ip=NetworkFilter.filterIpv6(m[1]);if(ip===!1){return!1}
10return'['+ip+m[2]}
11if(m=/^([\d.]+)(:[1-9]\d*)$/.exec(attrValue)){ip=NetworkFilter.filterIpv4(m[1]);if(ip===!1){return!1}
12return ip+m[2]}
13return!1},filterIpv4:function(attrValue){if(!/^\d+\.\d+\.\d+\.\d+$/.test(attrValue)){return!1}
14var i=4,p=attrValue.split('.');while(--i>=0){if(p[i][0]==='0'||p[i]>255){return!1}}
15return attrValue},filterIpv6:function(attrValue){return/^([\da-f]{0,4}:){2,7}(?:[\da-f]{0,4}|\d+\.\d+\.\d+\.\d+)$/.test(attrValue)?attrValue:!1}};var NumericFilter={filterFloat:function(attrValue){return/^(?:0|-?[1-9]\d*)(?:\.\d+)?(?:e[1-9]\d*)?$/i.test(attrValue)?attrValue:!1},filterInt:function(attrValue){return/^(?:0|-?[1-9]\d*)$/.test(attrValue)?attrValue:!1},filterRange:function(attrValue,min,max,logger){if(!/^(?:0|-?[1-9]\d*)$/.test(attrValue)){return!1}
16attrValue=parseInt(attrValue,10);if(attrValue<min){if(logger){logger.warn('Value outside of range, adjusted up to min value',{'attrValue':attrValue,'min':min,'max':max})}
17return min}
18if(attrValue>max){if(logger){logger.warn('Value outside of range, adjusted down to max value',{'attrValue':attrValue,'min':min,'max':max})}
19return max}
20return attrValue},filterUint:function(attrValue){return/^(?:0|[1-9]\d*)$/.test(attrValue)?attrValue:!1}};var RegexpFilter={filter:function(attrValue,regexp){return regexp.test(attrValue)?attrValue:!1}};var TimestampFilter={filter:function(attrValue){var m=/^(?=\d)(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(attrValue);if(m){return 3600*(m[1]||0)+60*(m[2]||0)+(+m[3]||0)}
21return NumericFilter.filterUint(attrValue)}};
21var UrlFilter={filter:function(attrValue,urlConfig,logger){var p=UrlFilter.parseUrl(attrValue.replace(/^\s+/,'').replace(/\s+$/,''));var error=UrlFilter.validateUrl(urlConfig,p);if(error){if(logger){p.attrValue=attrValue;logger.err(error,p)}
22return!1}
23return UrlFilter.rebuildUrl(urlConfig,p)},parseUrl:function(url){var regexp=/^(?:([a-z][-+.\w]*):)?(?:\/\/(?:([^:\/?#]*)(?::([^\/?#]*)?)?@)?(?:(\[[a-f\d:]+\]|[^:\/?#]+)(?::(\d*))?)?(?![^\/?#]))?([^?#]*)(\?[^#]*)?(#.*)?$/i;var m=regexp.exec(url),parts={},tokens=['scheme','user','pass','host','port','path','query','fragment'];tokens.forEach(function(name,i){parts[name]=(m[i+1]>'')?m[i+1]:''});parts.scheme=parts.scheme.toLowerCase();parts.host=parts.host.replace(/[\u3002\uff0e\uff61]/g,'.').replace(/\.+$/g,'');if(/[^\x00-\x7F]/.test(parts.host)&&typeof punycode!=='undefined'){parts.host=punycode.toASCII(parts.host)}
24return parts},rebuildUrl:function(urlConfig,p){var url='';if(p.scheme!==''){url+=p.scheme+':'}
25if(p.host!==''){url+='//';if(p.user!==''){url+=rawurlencode(decodeURIComponent(p.user));if(p.pass!==''){url+=':'+rawurlencode(decodeURIComponent(p.pass))}
26url+='@'}
27url+=p.host;if(p.port!==''){url+=':'+p.port}}else if(p.scheme==='file'){url+='//'}
28var path=p.path+p.query+p.fragment;path=path.replace(/%.?[a-f]/g,function(str){return str.toUpperCase()},path);url+=UrlFilter.sanitizeUrl(path);if(!p.scheme){url=url.replace(/^([^\/]*):/,'$1%3A')}
29return url}
29,sanitizeUrl:function(url){return url.replace(/[^\u0020-\u007E]+/g,encodeURIComponent).replace(/%(?![0-9A-Fa-f]{2})|[^!#-&*-;=?-Z_a-z~]/g,function(m){return'%'+m[0].charCodeAt(0).toString(16).toUpperCase()})},validateUrl:function(urlConfig,p){if(p.scheme!==''&&!urlConfig.allowedSchemes.test(p.scheme)){return'URL scheme is not allowed'}
30if(p.host!==''){var regexp=/^(?!-)[-a-z0-9]{0,62}[a-z0-9](?:\.(?!-)[-a-z0-9]{0,62}[a-z0-9])*$/i;if(!regexp.test(p.host)){if(!NetworkFilter.filterIpv4(p.host)&&!NetworkFilter.filterIpv6(p.host.replace(/^\[(.*)\]$/,'$1',p.host))){return'URL host is invalid'}}
31if((urlConfig.disallowedHosts&&urlConfig.disallowedHosts.test(p.host))||(urlConfig.restrictedHosts&&!urlConfig.restrictedHosts.test(p.host))){return'URL host is not allowed'}}else if(/^(?:(?:f|ht)tps?)$/.test(p.scheme)){return'Missing host'}}};function html_entity_decode(str){var b=document.createElement('b');html_entity_decode=function(str){b.innerHTML=str.replace(/</g,'&lt;');return b.textContent};return html_entity_decode(str)}
32function htmlspecialchars_compat(str){var t={'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'};return str.replace(/[<>&"]/g,function(c){return t[c]})}
33function htmlspecialchars_noquotes(str){var t={'<':'&lt;','>':'&gt;','&':'&amp;'};return str.replace(/[<>&]/g,function(c){return t[c]})}
34function rawurlencode(str){return encodeURIComponent(str).replace(/[!'()*]/g,function(c){return'%'+c.charCodeAt(0).toString(16).toUpperCase()})}
35function returnFalse(){return!1}
36function returnTrue(){return!0}
37function executeAttributePreprocessors(tag,tagConfig){if(typeof tagConfig.attributePreprocessors==='undefined'){return}
38tagConfig.attributePreprocessors.forEach(function(ap){var attrName=ap[0],regexp=ap[1],map=ap[2];if(tag.hasAttribute(attrName)){executeAttributePreprocessor(tag,attrName,regexp,map)}})}
39function filterAttributes(tag,tagConfig,registeredVars,logger){var attributes={},attrName;for(attrName in tagConfig.attributes){var attrConfig=tagConfig.attributes[attrName],attrValue=!1;if(tag.hasAttribute(attrName)){attrValue=executeAttributeFilterChain(attrConfig.filterChain,attrName,tag.getAttribute(attrName))}
40if(attrValue!==!1){attributes[attrName]=attrValue}else if(HINT.attributeDefaultValue&&typeof attrConfig.defaultValue!=='undefined'){attributes[attrName]=attrConfig.defaultValue}else if(attrConfig.required){tag.invalidate()}}
41tag.setAttributes(attributes)}
42function filterTag(tag){var tagName=tag.getName(),tagConfig=tagsConfig[tagName];logger.setTag(tag);for(var i=0;i<tagConfig.filterChain.length;++i){if(tag.isInvalid()){break}
43tagConfig.filterChain[i](tag,tagConfig)}
44logger.unsetTag()}
45function executeAttributeFilterChain(filterChain,attrName,attrValue){logger.setAttribute(attrName);for(var i=0;i<filterChain.length;++i){attrValue=filterChain[i](attrValue,attrName);if(attrValue===!1){break}}
46logger.unsetAttribute();return attrValue}
47function executeAttributePreprocessor(tag,attrName,regexp,map){var attrValue=tag.getAttribute(attrName),captures=getNamedCaptures(attrValue,regexp,map),k;for(k in captures){if(k===attrName||!tag.hasAttribute(k)){tag.setAttribute(k,captures[k])}}}
48function getNamedCaptures(attrValue,regexp,map){var m=regexp.exec(attrValue);if(!m){return[]}
49var values={};map.forEach(function(k,i){if(typeof m[i]==='string'&&m[i]!==''){values[k]=m[i]}});return values}
50function Logger(){}Logger.prototype={add:function(type,msg,context){},clear:function(){},setAttribute:function(attrName){},setTag:function(tag){},unsetAttribute:function(){},unsetTag:function(){},debug:function(msg,context){},err:function(msg,context){},info:function(msg,context){},warn:function(msg,context){}};function Tag(type,name,pos,len,priority){this.type=+type;this.name=name;this.pos=+pos;this.len=+len;this.sortPriority=+priority||0;this.attributes={};this.cascade=[];if(isNaN(type+pos+len)){this.invalidate()}}
51Tag.START_TAG=1;Tag.END_TAG=2;Tag.SELF_CLOSING_TAG=3;Tag.prototype.attributes;Tag.prototype.cascade;Tag.prototype.endTag;Tag.prototype.invalid=!1;Tag.prototype.len;Tag.prototype.name;Tag.prototype.pos;Tag.prototype.sortPriority;Tag.prototype.startTag;Tag.prototype.type;Tag.prototype.addFlags=function(flags){this.flags|=flags};Tag.prototype.cascadeInvalidationTo=function(tag){this.cascade.push(tag);
51if(this.invalid){tag.invalidate()}};Tag.prototype.invalidate=function(){if(!this.invalid){this.invalid=!0;this.cascade.forEach(function(tag){tag.invalidate()})}};Tag.prototype.pairWith=function(tag){if(this.canBePaired(this,tag)){this.endTag=tag;tag.startTag=this;this.cascadeInvalidationTo(tag)}else if(this.canBePaired(tag,this)){this.startTag=tag;tag.endTag=this}};Tag.prototype.canBePaired=function(startTag,endTag){return startTag.name===endTag.name&&startTag.type===Tag.START_TAG&&endTag.type===Tag.END_TAG&&startTag.pos<=startTag.pos};Tag.prototype.removeFlags=function(flags){this.flags&=~flags};Tag.prototype.setFlags=function(flags){this.flags=flags};Tag.prototype.getAttributes=function(){var attributes={};for(var attrName in this.attributes){attributes[attrName]=this.attributes[attrName]}
52return attributes};Tag.prototype.getEndTag=function(){return this.endTag};Tag.prototype.getFlags=function(){return this.flags};Tag.prototype.getLen=function(){return this.len};Tag.prototype.getName=function(){return this.name};Tag.prototype.getPos=function(){return this.pos};Tag.prototype.getSortPriority=function(){return this.sortPriority};Tag.prototype.getStartTag=function(){return this.startTag};Tag.prototype.getType=function(){return this.type};Tag.prototype.canClose=function(startTag){if(this.invalid||!this.canBePaired(startTag,this)||(this.startTag&&this.startTag!==startTag)||(startTag.endTag&&startTag.endTag!==this)){return!1}
53return!0};Tag.prototype.isBrTag=function(){return(this.name==='br')};Tag.prototype.isEndTag=function(){return!!(this.type&Tag.END_TAG)};Tag.prototype.isIgnoreTag=function(){return(this.name==='i')};Tag.prototype.isInvalid=function(){return this.invalid};Tag.prototype.isParagraphBreak=function(){return(this.name==='pb')};Tag.prototype.isSelfClosingTag=function(){return(this.type===Tag.SELF_CLOSING_TAG)};Tag.prototype.isSystemTag=function(){return('br i pb v'.indexOf(this.name)>-1)};Tag.prototype.isStartTag=function(){return!!(this.type&Tag.START_TAG)};Tag.prototype.isVerbatim=function(){return(this.name==='v')};Tag.prototype.getAttribute=function(attrName){return this.attributes[attrName]};Tag.prototype.hasAttribute=function(attrName){return(attrName in this.attributes)};Tag.prototype.removeAttribute=function(attrName){delete this.attributes[attrName]};Tag.prototype.setAttribute=function(attrName,attrValue){this.attributes[attrName]=attrValue};Tag.prototype.setAttributes=function(attributes){this.attributes={};for(var attrName in attributes){this.attributes[attrName]=attributes[attrName]}};var RULE_AUTO_CLOSE=1<<0;var RULE_AUTO_REOPEN=1<<1;var RULE_BREAK_PARAGRAPH=1<<2;var RULE_CREATE_PARAGRAPHS=1<<3;var RULE_DISABLE_AUTO_BR=1<<4;var RULE_ENABLE_AUTO_BR=1<<5;var RULE_IGNORE_TAGS=1<<6;var RULE_IGNORE_TEXT=1<<7;var RULE_IGNORE_WHITESPACE=1<<8;var RULE_IS_TRANSPARENT=1<<9;var RULE_PREVENT_BR=1<<10;var RULE_SUSPEND_AUTO_BR=1<<11;var RULE_TRIM_FIRST_LINE=1<<12;var RULES_AUTO_LINEBREAKS=RULE_DISABLE_AUTO_BR|RULE_ENABLE_AUTO_BR|RULE_SUSPEND_AUTO_BR;var RULES_INHERITANCE=RULE_ENABLE_AUTO_BR;var WHITESPACE=" \n\t";var cntOpen;var cntTotal;var context;var currentFixingCost;var currentTag;var isRich;var logger=new Logger;var maxFixingCost=10000;var namespaces;var openTags;var output;var plugins={"Autoemail":{parser:function(text,matches){var config={attrName:"email",tagName:"EMAIL"};var tagName=config.tagName,attrName=config.attrName;matches.forEach(function(m){var startTag=addStartTag(tagName,m[0][1],0);startTag.setAttribute(attrName,m[0][0]);var endTag=addEndTag(tagName,m[0][1]+m[0][0].length,0);startTag.pairWith(endTag)})},quickMatch:"@",regexp:/\b[-a-z0-9_+.]+@[-a-z0-9.]*[a-z0-9]/ig,regexpLimit:50000},"Autolink":{parser:function(text,matches){var config={attrName:"url",tagName:"URL"};matches.forEach(function(m){linkifyUrl(m[0][1],trimUrl(m[0][0]))});function linkifyUrl(tagPos,url){var endPos=tagPos+url.length,endTag=addEndTag(config.tagName,endPos,0);if(url[3]==='.'){url='http://'+url}
54var startTag=addStartTag(config.tagName,tagPos,0,1);startTag.setAttribute(config.attrName,url);startTag.pairWith(endTag);var contentTag=addVerbatim(tagPos,endPos-tagPos,1000);startTag.cascadeInvalidationTo(contentTag)}
55function trimUrl(url){return url.replace(/(?:(?![-=+)\/_])[\s!-.:-@[-`{-~])+$/,'')}},quickMatch:":",regexp:/\bhttps?:(?:[^\s()\[\]\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65]|\([^\s()]*\)|\[\w*\])+/ig,regexpLimit:50000},"BBCodes":{parser:function(text,matches){var config={bbcodes:{"*":{tagName:"LI"}
55,"B":[],"CENTER":[],"CODE":{defaultAttribute:"lang"},"COLOR":[],"DEL":[],"EMAIL":{contentAttributes:["email"]},"I":[],"IMG":{contentAttributes:["src"],defaultAttribute:"src"},"LIST":{defaultAttribute:"type"},"QUOTE":{defaultAttribute:"author"},"S":[],"SIZE":[],"U":[],"URL":{contentAttributes:["url"]}}};var attributes;var bbcodeConfig;var bbcodeName;var bbcodeSuffix;var pos;var startPos;var textLen=text.length;var uppercaseText='';matches.forEach(function(m){bbcodeName=m[1][0].toUpperCase();if(!(bbcodeName in config.bbcodes)){return}
56bbcodeConfig=config.bbcodes[bbcodeName];startPos=m[0][1];pos=startPos+m[0][0].length;try
57{parseBBCode()}catch(e){}});function addBBCodeEndTag(){return addEndTag(getTagName(),startPos,pos-startPos)}
58function addBBCodeSelfClosingTag(){var tag=addSelfClosingTag(getTagName(),startPos,pos-startPos);tag.setAttributes(attributes);return tag}
59function addBBCodeStartTag(){var prio=(bbcodeSuffix!=='')?-10:0,tag=addStartTag(getTagName(),startPos,pos-startPos,prio);tag.setAttributes(attributes);return tag}
60function captureEndTag(){if(!uppercaseText){uppercaseText=text.toUpperCase()}
61var match='[/'+bbcodeName+bbcodeSuffix+']',endTagPos=uppercaseText.indexOf(match,pos);if(endTagPos<0){return null}
62return addEndTag(getTagName(),endTagPos,match.length)}
63function getTagName(){return bbcodeConfig.tagName||bbcodeName}
64function parseAttributes(){var firstPos=pos,attrName;attributes={};while(pos<textLen){var c=text[pos];if(" \n\t".indexOf(c)>-1){++pos;continue}
65if('/]'.indexOf(c)>-1){return}
66var spn=/^[-\w]*/.exec(text.substring(pos,pos+100))[0].length;if(spn){attrName=text.substring(pos,pos+spn).toLowerCase();pos+=spn;if(pos>=textLen){throw ''}
67if(text[pos]!=='='){continue}}else if(c==='='&&pos===firstPos){attrName=bbcodeConfig.defaultAttribute||bbcodeName.toLowerCase()}else{throw ''}
68if(++pos>=textLen){throw ''}
69attributes[attrName]=parseAttributeValue()}}
70function parseAttributeValue(){if(text[pos]==='"'||text[pos]==="'"){return parseQuotedAttributeValue()}
71var match=/(?:[^\s\]]|[ \t](?!\s*(?:[-\w]+=|\/?\])))*/.exec(text.substring(pos)),attrValue=match[0];pos+=attrValue.length;return attrValue}
72function parseBBCode(){parseBBCodeSuffix();if(text[startPos+1]==='/'){if(text[pos]===']'&&bbcodeSuffix===''){++pos;addBBCodeEndTag()}
73return}
74parseAttributes();if(bbcodeConfig.predefinedAttributes){for(var attrName in bbcodeConfig.predefinedAttributes){if(!(attrName in attributes)){attributes[attrName]=bbcodeConfig.predefinedAttributes[attrName]}}}
75if(text[pos]===']'){++pos}else{if(text.substring(pos,pos+2)==='/]'){pos+=2;addBBCodeSelfClosingTag()}
76return}
77var contentAttributes=[];if(bbcodeConfig.contentAttributes){bbcodeConfig.contentAttributes.forEach(function(attrName){if(!(attrName in attributes)){contentAttributes.push(attrName)}})}
78var requireEndTag=(bbcodeSuffix||bbcodeConfig.forceLookahead),endTag=(requireEndTag||contentAttributes.length)?captureEndTag():null;if(endTag){contentAttributes.forEach(function(attrName){attributes[attrName]=text.substring(pos,endTag.getPos())})}else if(requireEndTag){return}
79var tag=addBBCodeStartTag();if(endTag){tag.pairWith(endTag)}}
80function parseBBCodeSuffix(){bbcodeSuffix='';if(text[pos]===':'){bbcodeSuffix=/^:\d*/.exec(text.substring(pos))[0];pos+=bbcodeSuffix.length}}
81function parseQuotedAttributeValue(){var quote=text[pos],valuePos=pos+1;do{pos=text.indexOf(quote,pos+1);if(pos<0){throw ''}
82var n=1;while(text[pos-n]==='\\'){++n}}
83while(n%2===0);var attrValue=text.substring(valuePos,pos);if(attrValue.indexOf('\\')>-1){attrValue=attrValue.replace(/\\([\\'"])/g,'$1')}
84++pos;return attrValue}},quickMatch:"[",regexp:/\[\/?(\*|[-\w]+)(?=[\]\s=:\/])/g,regexpLimit:50000},"Emoticons":{parser:function(text,matches){var config={tagName:"E"};matches.forEach(function(m){if(HINT.EMOTICONS_NOT_AFTER&&config.notAfter&&m[0][1]&&config.notAfter.test(text[m[0][1]-1])){return}
85addSelfClosingTag(config.tagName,m[0][1],m[0][0].length)})},regexp:/(?::(?:[()DOP|]|'\()|;\)|>:\()/g,regexpLimit:50000},"Escaper":{parser:function(text,matches){var config={tagName:"ESC"};matches.forEach(function(m){addTagPair(config.tagName,m[0][1],1,m[0][1]+m[0][0].length,0)})},quickMatch:"\\",regexp:/\\[-!#()*+.:<>@[\\\]^_`{|}~]/g,regexpLimit:50000},"Litedown":{parser:function(text,matches){var config={decodeHtmlEntities:!1};var decodeHtmlEntities=config.decodeHtmlEntities;var hasEscapedChars=!1;var hasReferences=!1;var linkReferences={};if(text.indexOf('\\')>=0){hasEscapedChars=!0;text=text.replace(/\\[!"'()*<>[\\\]^_`~]/g,function(str){return{'\\!':"\x1B0",'\\"':"\x1B1","\\'":"\x1B2",'\\(':"\x1B3",'\\)':"\x1B4",'\\*':"\x1B5",'\\<':"\x1B6",'\\>':"\x1B7",'\\[':"\x1B8",'\\\\':"\x1B9",'\\]':"\x1BA",'\\^':"\x1BB",'\\_':"\x1BC",'\\`':"\x1BD",'\\~':"\x1BE"}[str]})}
86text+="\n\n\x17";function decode(str){if(HINT.LITEDOWN_DECODE_HTML_ENTITIES&&decodeHtmlEntities&&str.indexOf('&')>-1){str=html_entity_decode(str)}
87str=str.replace(/\x1A/g,'');if(hasEscapedChars){str=str.replace(/\x1B./g,function(seq){return{"\x1B0":'!',"\x1B1":'"',"\x1B2":"'","\x1B3":'(',"\x1B4":')',"\x1B5":'*',"\x1B6":'<',"\x1B7":'>',"\x1B8":'[',"\x1B9":'\\',"\x1BA":']',"\x1BB":'^',"\x1BC":'_',"\x1BD":'`',"\x1BE":'~'}[seq]})}
88return str}
89function isAfterWhitespace(pos){return(pos>0&&isWhitespace(text.charAt(pos-1)))}
90function isAlnum(chr){return(' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.indexOf(chr)>0)}
91function isBeforeWhitespace(pos){return isWhitespace(text[pos+1])}
92function isSurroundedByAlnum(pos,len){return(pos>
920&&isAlnum(text[pos-1])&&isAlnum(text[pos+len]))}
93function isWhitespace(chr){return(" \n\t".indexOf(chr)>-1)}
94function markBoundary(pos){text=text.substring(0,pos)+"\x17"+text.substring(pos+1)}
95function overwrite(pos,len){if(len>0){text=text.substring(0,pos)+new Array(1+len).join("\x1A")+text.substring(pos+len)}}
96function parseInlineMarkup(str,regexp,tagName){if(text.indexOf(str)===-1){return}
97var m;while(m=regexp.exec(text)){var match=m[0],matchPos=m.index,matchLen=match.length,endPos=matchPos+matchLen-2;addTagPair(tagName,matchPos,2,endPos,2);overwrite(matchPos,2);overwrite(endPos,2)}}
98function parseAbstractScript(tagName,syntaxChar,shortRegexp,longRegexp){var pos=text.indexOf(syntaxChar);if(pos===-1){return}
99parseShortForm(pos);parseLongForm(pos);function parseLongForm(pos){pos=text.indexOf(syntaxChar+'(',pos);if(pos===-1){return}
100var m,regexp=longRegexp;regexp.lastIndex=pos;while(m=regexp.exec(text)){var match=m[0],matchPos=m.index,matchLen=match.length;addTagPair(tagName,matchPos,2,matchPos+matchLen-1,1);overwrite(matchPos,matchLen)}
101if(match){parseLongForm(pos)}}
102function parseShortForm(pos){var m,regexp=shortRegexp;regexp.lastIndex=pos;while(m=regexp.exec(text)){var match=m[0],matchPos=m.index,matchLen=match.length,startPos=matchPos,endLen=(match.charAt(matchLen-1)===syntaxChar)?1:0,endPos=matchPos+matchLen-endLen;addTagPair(tagName,startPos,1,endPos,endLen)}}}
103function setLinkAttributes(tag,linkInfo,attrName){var url=linkInfo.replace(/^\s*/,'').replace(/\s*$/,''),title='',pos=url.indexOf(' ');if(pos!==-1){title=url.substring(pos).replace(/^\s*\S/,'').replace(/\S\s*$/,'');url=url.substring(0,pos)}
104if(/^<.+>$/.test(url)){url=url.replace(/^<(.+)>$/,'$1').replace(/\\>/g,'>')}
105tag.setAttribute(attrName,decode(url));if(title>''){tag.setAttribute('title',decode(title))}}(function(){var setextLines={};function parse(){matchSetextLines();var blocks=[],blocksCnt=0,codeFence,codeIndent=4,codeTag,lineIsEmpty=!0,lists=[],listsCnt=0,newContext=!1,textBoundary=0,breakParagraph,continuation,ignoreLen,indentStr,indentLen,lfPos,listIndex,maxIndent,minIndent,blockDepth,tagPos,tagLen;var matches=[],m,regexp=/^(?:(?=[-*+\d \t>`~#_])((?: {0,3}>(?:(?!!)|!(?![^\n>]*?!<)) ?)+)?([ \t]+)?(\* *\* *\*[* ]*$|- *- *-[- ]*$|_ *_ *_[_ ]*$)?((?:[-*+]|\d+\.)[ \t]+(?=\S))?[ \t]*(#{1,6}[ \t]+|```+[^`\n]*$|~~~+[^~\n]*$)?)?/gm;while(m=regexp.exec(text)){matches.push(m);if(m.index===regexp.lastIndex){++regexp.lastIndex}}
106matches.forEach(function(m){var blockMarks=[],matchPos=m.index,matchLen=m[0].length,startPos,startLen,endPos,endLen;ignoreLen=0;blockDepth=0;continuation=!lineIsEmpty;lfPos=text.indexOf("\n",matchPos);lineIsEmpty=(lfPos===matchPos+matchLen&&!m[3]&&!m[4]&&!m[5]);if(!matchLen){++regexp.lastIndex}
107breakParagraph=(lineIsEmpty&&continuation);if(m[1]){blockMarks=getBlockMarks(m[1]);blockDepth=blockMarks.length;ignoreLen=m[1].length;if(codeTag&&codeTag.hasAttribute('blockDepth')){blockDepth=Math.min(blockDepth,codeTag.getAttribute('blockDepth'));ignoreLen=computeBlockIgnoreLen(m[1],blockDepth)}
108overwrite(matchPos,ignoreLen)}
109if(blockDepth<blocksCnt&&!continuation){newContext=!0;do{var startTag=blocks.pop();addEndTag(startTag.getName(),textBoundary,0).pairWith(startTag)}
110while(blockDepth<--blocksCnt);}
111if(blockDepth>blocksCnt&&!lineIsEmpty){newContext=!0;do{var tagName=(blockMarks[blocksCnt]==='>!')?'SPOILER':'QUOTE';blocks.push(addStartTag(tagName,matchPos,0,-999))}
112while(blockDepth>++blocksCnt);}
113var indentWidth=0,indentPos=0;if(m[2]&&!codeFence){indentStr=m[2];indentLen=indentStr.length;do{if(indentStr[indentPos]===' '){++indentWidth}else{indentWidth=(indentWidth+4)&~3}}
114while(++indentPos<indentLen&&indentWidth<codeIndent);}
115if(codeTag&&!codeFence&&indentWidth<codeIndent&&!lineIsEmpty){newContext=!0}
116if(newContext){newContext=!1;if(codeTag){if(textBoundary>codeTag.getPos()){overwrite(codeTag.getPos(),textBoundary-codeTag.getPos());codeTag.pairWith(addEndTag('CODE',textBoundary,0,-1))}else{codeTag.invalidate()}
117codeTag=null;codeFence=null}
118lists.forEach(function(list){closeList(list,textBoundary)});lists=[];listsCnt=0;if(matchPos){markBoundary(matchPos-1)}}
119if(indentWidth>=codeIndent){if(codeTag||!continuation){ignoreLen=(m[1]||'').length+indentPos;if(!codeTag){codeTag=addStartTag('CODE',matchPos+ignoreLen,0,-999)}
120m={}}}else if(!codeTag){var hasListItem=!!m[4];if(!indentWidth&&!continuation&&!hasListItem){listIndex=-1}else if(continuation&&!hasListItem){listIndex=listsCnt-1}else if(!listsCnt){listIndex=(hasListItem)?0:-1}else{listIndex=0;while(listIndex<listsCnt&&indentWidth>lists[listIndex].maxIndent){++listIndex}}
121while(listIndex<listsCnt-1){closeList(lists.pop(),textBoundary);--listsCnt}
122if(listIndex===listsCnt&&!hasListItem){--listIndex}
123if(hasListItem&&listIndex>=0){breakParagraph=!0;tagPos=matchPos+ignoreLen+indentPos;tagLen=m[4].length;var itemTag=addStartTag('LI',tagPos,tagLen);overwrite(tagPos,tagLen);if(listIndex<listsCnt){addEndTag('LI',textBoundary,0).pairWith(lists[listIndex].itemTag);lists[listIndex].itemTag=itemTag;lists[listIndex].itemTags.push(itemTag)}else{++listsCnt;if(listIndex){minIndent=lists[listIndex-1].maxIndent+1;maxIndent=Math.max(minIndent,listIndex*4)}else{minIndent=0;maxIndent=indentWidth}
124var listTag=addStartTag('LIST',tagPos,0);if(m[4].indexOf('.')>-1){listTag.setAttribute('type','decimal');var start=+m[4];if(start!==1){listTag.setAttribute('start',start)}}
125lists.push({listTag:listTag,itemTag:itemTag,itemTags:[itemTag],minIndent:minIndent,maxIndent:maxIndent,tight:!0})}}
126if(listsCnt&&!continuation&&!lineIsEmpty){if(lists[0].itemTags.length>1||!hasListItem){lists.forEach(function(list){list.tight=!1})}}
127codeIndent=(listsCnt+1)*4}
128if(m[5]){if(m[5][0]==='#'){startLen=m[5].length;startPos=matchPos+matchLen-startLen;endLen=getAtxHeaderEndTagLen(matchPos+matchLen,lfPos);endPos=lfPos-endLen;addTagPair('H'+/#{1,6}/.exec(m[5])[0].length,startPos,startLen,endPos,endLen);markBoundary(startPos);markBoundary(lfPos);if(continuation){breakParagraph=!0}}else if(m[5][0]==='`'||m[5][0]==='~'){tagPos=matchPos+ignoreLen;tagLen=lfPos-tagPos;if(codeTag&&m[5]===codeFence){codeTag.pairWith(addEndTag('CODE',tagPos,tagLen,-1));addIgnoreTag(textBoundary,tagPos-textBoundary);overwrite(codeTag.getPos(),tagPos+tagLen-codeTag.getPos());codeTag=null;codeFence=null}else if(!codeTag){codeTag=addStartTag('CODE',tagPos,tagLen);codeFence=m[5].replace(/[^`~]+/,'');codeTag.setAttribute('blockDepth',blockDepth);addIgnoreTag(tagPos+tagLen,1);var lang=m[5].replace(/^[`~\s]*/,'').replace(/\s+$/,'');if(lang!==''){codeTag.setAttribute('lang',lang)}}}}else if(m[3]&&!listsCnt&&text[matchPos+matchLen]!=="\x17"){addSelfClosingTag('HR',matchPos+ignoreLen,matchLen-ignoreLen);breakParagraph=!0;markBoundary(lfPos)}else if(setextLines[lfPos]&&setextLines[lfPos].blockDepth===blockDepth&&!lineIsEmpty&&!listsCnt&&!codeTag){addTagPair(setextLines[lfPos].tagName,matchPos+ignoreLen,0,setextLines[lfPos].endPos,setextLines[lfPos].endLen);markBoundary(setextLines[lfPos].endPos+setextLines[lfPos].endLen)}
129if(breakParagraph){addParagraphBreak(textBoundary);markBoundary(textBoundary)}
130if(!lineIsEmpty){textBoundary=lfPos}
131if(ignoreLen){addIgnoreTag(matchPos,ignoreLen,1000)}})}
132function closeList(list,textBoundary){addEndTag('LIST',textBoundary,0).pairWith(list.listTag);addEndTag('LI',textBoundary,0).pairWith(list.itemTag);if(list.tight){list.itemTags.forEach(function(itemTag){itemTag.removeFlags(RULE_CREATE_PARAGRAPHS)})}}
133function computeBlockIgnoreLen(str,maxBlockDepth){var remaining=str;while(--maxBlockDepth>=0){remaining=remaining.replace(/^ *>!? ?/,'')}
134return str.length-remaining.length}
135function getAtxHeaderEndTagLen(startPos,endPos){var content=text.substring(startPos,endPos),m=/[ \t]*#*[ \t]*$/.exec(content);return m[0].length}
136function getBlockMarks(str){var blockMarks=[],regexp=/>!?/g,m;while(m=regexp.exec(str)){blockMarks.push(m[0])}
137return blockMarks}
138function matchSetextLines(){if(text.indexOf('-')===-1&&text.indexOf('=')===-1){return}
139var m,regexp=/^(?=[-=>])(?:>!? ?)*(?=[-=])(?:-+|=+) *$/gm;while(m=regexp.exec(text)){var match=m[0],matchPos=m.index;var endPos=matchPos-1;while(endPos>0&&text[endPos-1]===' '){--endPos}
140setextLines[matchPos-1]={endLen:matchPos+match.length-endPos,endPos:endPos,blockDepth:match.length-match.replace(/>/g,'').length,tagName:(match[0]==='=')?'H1':'H2'}}}
141parse()})();
141(function(){function parse(){if(text.indexOf(']:')<0){return}
142var m,regexp=/^\x1A* {0,3}\[([^\x17\]]+)\]: *([^[\s\x17]+ *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))?) *(?=$|\x17)\n?/gm;while(m=regexp.exec(text)){addIgnoreTag(m.index,m[0].length);var id=m[1].toLowerCase();if(!linkReferences[id]){hasReferences=!0;linkReferences[id]=m[2]}}}
143parse()})();(function(){function parse(){var markers=getInlineCodeMarkers(),i=-1,cnt=markers.length;while(++i<(cnt-1)){var pos=markers[i].next,j=i;if(text[markers[i].pos]!=='`'){++markers[i].pos;--markers[i].len}
144while(++j<cnt&&markers[j].pos===pos){if(markers[j].len===markers[i].len){addInlineCodeTags(markers[i],markers[j]);i=j;break}
145pos=markers[j].next}}}
146function addInlineCodeTags(left,right){var startPos=left.pos,startLen=left.len+left.trimAfter,endPos=right.pos-right.trimBefore,endLen=right.len+right.trimBefore;addTagPair('C',startPos,startLen,endPos,endLen);overwrite(startPos,endPos+endLen-startPos)}
147function getInlineCodeMarkers(){var pos=text.indexOf('`');if(pos<0){return[]}
148var regexp=/(`+)(\s*)[^\x17`]*/g,trimNext=0,markers=[],_text=text.replace(/\x1BD/g,'\\`'),m;regexp.lastIndex=pos;while(m=regexp.exec(_text)){markers.push({pos:m.index,len:m[1].length,trimBefore:trimNext,trimAfter:m[2].length,next:m.index+m[0].length});trimNext=m[0].length-m[0].replace(/\s+$/,'').length}
149return markers}
150parse()})();(function(){function parse(){var pos=text.indexOf('![');if(pos===-1){return}
151if(text.indexOf('](',pos)>0){parseInlineImages()}
152if(hasReferences){parseReferenceImages()}}
153function addImageTag(startPos,endPos,endLen,linkInfo,alt){var tag=addTagPair('IMG',startPos,2,endPos,endLen);setLinkAttributes(tag,linkInfo,'src');tag.setAttribute('alt',decode(alt));overwrite(startPos,endPos+endLen-startPos)}
154function parseInlineImages(){var m,regexp=/!\[(?:[^\x17[\]]|\[[^\x17[\]]*\])*\]\(( *(?:[^\x17\s()]|\([^\x17\s()]*\))*(?=[ )]) *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))? *)\)/g;while(m=regexp.exec(text)){var linkInfo=m[1],startPos=m.index,endLen=3+linkInfo.length,endPos=startPos+m[0].length-endLen,alt=m[0].substring(2,m[0].length-endLen);addImageTag(startPos,endPos,endLen,linkInfo,alt)}}
155function parseReferenceImages(){var m,regexp=/!\[((?:[^\x17[\]]|\[[^\x17[\]]*\])*)\](?: ?\[([^\x17[\]]+)\])?/g;while(m=regexp.exec(text)){var startPos=m.index,endPos=startPos+2+m[1].length,endLen=1,alt=m[1],id=alt;if(m[2]>''&&linkReferences[m[2]]){endLen=m[0].length-alt.length-2;id=m[2]}else if(!linkReferences[id]){continue}
156addImageTag(startPos,endPos,endLen,linkReferences[id],alt)}}
157parse()})();(function(){function parse(){parseInlineMarkup('>!',/>![^\x17]+?!</g,'ISPOILER');parseInlineMarkup('||',/\|\|[^\x17]+?\|\|/g,'ISPOILER')}
158parse()})();(function(){function parse(){if(text.indexOf('](')!==-1){parseInlineLinks()}
159if(text.indexOf('<')!==-1){parseAutomaticLinks()}
160if(hasReferences){parseReferenceLinks()}}
161function addLinkTag(startPos,endPos,endLen,linkInfo){var priority=(endLen===1)?1:-1;var tag=addTagPair('URL',startPos,1,endPos,endLen,priority);setLinkAttributes(tag,linkInfo,'url');overwrite(startPos,1);overwrite(endPos,endLen)}
162function getLabels(){var labels={},m,regexp=/\[((?:[^\x17[\]]|\[[^\x17[\]]*\])*)\]/g;while(m=regexp.exec(text)){labels[m.index]=m[1].toLowerCase()}
163return labels}
164function parseAutomaticLinks(){var m,regexp=/<[-+.\w]+([:@])[^\x17\s>]+?(?:>|\x1B7)/g;while(m=regexp.exec(text)){var content=decode(m[0].replace(/\x1B/g,"\\\x1B")).replace(/^<(.+)>$/,'$1'),startPos=m.index,endPos=startPos+m[0].length-1,tagName=(m[1]===':')?'URL':'EMAIL',attrName=tagName.toLowerCase();addTagPair(tagName,startPos,1,endPos,1).setAttribute(attrName,content)}}
165function parseInlineLinks(){var m,regexp=/\[(?:[^\x17[\]]|\[[^\x17[\]]*\])*\]\(( *(?:\([^\x17\s()]*\)|[^\x17\s)])*(?=[ )]) *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))? *)\)/g;while(m=regexp.exec(text)){var linkInfo=m[1],startPos=m.index,endLen=3+linkInfo.length,endPos=startPos+m[0].length-endLen;addLinkTag(startPos,endPos,endLen,linkInfo)}}
166function parseReferenceLinks(){var labels=getLabels(),startPos;for(startPos in labels){var id=labels[startPos],labelPos=+startPos+2+id.length,endPos=labelPos-1,endLen=1;if(text[labelPos]===' '){++labelPos}
167if(labels[labelPos]>''&&linkReferences[labels[labelPos]]){id=labels[labelPos];endLen=labelPos+2+id.length-endPos}
168if(linkReferences[id]){addLinkTag(+startPos,endPos,endLen,linkReferences[id])}}}
169parse()})();(function(){function parse(){parseInlineMarkup('~~',/~~[^\x17]+?~~(?!~)/g,'DEL')}
170parse()})();(function(){function parse(){parseAbstractScript('SUB','~',/~[^\x17\s!"#$%&\'()*+,\-.\/:;<=>?@[\]^_`{}|~]+~?/g,/~\([^\x17()]+\)/g)}
171parse()})();(function(){function parse(){parseAbstractScript('SUP','^',/\^[^\x17\s!"#$%&\'()*+,\-.\/:;<=>?@[\]^_`{}|~]+\^?/g,/\^\([^\x17()]+\)/g)}
172parse()})();(function(){var closeEm;var closeStrong;var emPos;var emEndPos;var remaining;var strongPos;var strongEndPos;function parse(){parseEmphasisByCharacter('*',/\*+/g);parseEmphasisByCharacter('_',/_+/g)}
173function adjustEndingPositions(){if(closeEm&&closeStrong){if(emPos<strongPos){emEndPos+=2}else{++strongEndPos}}}
174function adjustStartingPositions(){if(emPos>=0&&emPos===strongPos){if(closeEm){emPos+=2}else{++strongPos}}}
175function closeSpans(){if(closeEm){--remaining;addTagPair('EM',emPos,1,emEndPos,1);emPos=-1}
176if(closeStrong){remaining-=2;addTagPair('STRONG',strongPos,2,strongEndPos,2);strongPos=-1}}
177function getEmphasisByBlock(regexp,pos){var block=[],blocks=[],breakPos=text.indexOf("\x17",pos),m;regexp.lastIndex=pos;while(m=regexp.exec(text)){var matchPos=m.index,matchLen=m[0].length;if(matchPos>breakPos){blocks.push(block);block=[];breakPos=text.indexOf("\x17",matchPos)}
178if(!ignoreEmphasis(matchPos,matchLen)){block.push([matchPos,matchLen])}}
179blocks.push(block);return blocks}
180function ignoreEmphasis(pos,len){return(text.charAt(pos)==='_'&&len===1&&isSurroundedByAlnum(pos,len))}
181function openSpans(pos){if(remaining&1){emPos=pos-remaining}
182if(remaining&2){strongPos=pos-remaining}}
183function parseEmphasisByCharacter(character,regexp){var pos=text.indexOf(character);if(pos===-1){return}
184getEmphasisByBlock(regexp,pos).forEach(processEmphasisBlock)}
185function processEmphasisBlock(block){emPos=-1,strongPos=-1;block.forEach(function(pair){processEmphasisMatch(pair[0],pair[1])})}
186function processEmphasisMatch(matchPos,matchLen){var canOpen=!isBeforeWhitespace(matchPos+matchLen-1),canClose=!isAfterWhitespace(matchPos),closeLen=(canClose)?Math.min(matchLen,3):0;closeEm=!!(closeLen&1)&&emPos>=0;closeStrong=!!(closeLen&2)&&strongPos>=0;emEndPos=matchPos;strongEndPos=matchPos;remaining=matchLen;adjustStartingPositions();adjustEndingPositions();closeSpans();remaining=(canOpen)?Math.min(remaining,3):0;openSpans(matchPos+matchLen)}
187parse()})();(function(){function parse(){var pos=text.indexOf("  \n");while(pos>0){addBrTag(pos+2).cascadeInvalidationTo(addVerbatim(pos+2,1));pos=text.indexOf("  \n",pos+3)}}
188parse()})()}},"Preg":{parser:function(text,matches){var config={generics:[["USERMENTION",/\B@["“](((?!"#[a-z]{0,3}[0-9]+).)+)["”]#([0-9]+)\b/g,0,["","displayname","","id"]],["USERMENTION",/\B@([a-z0-9_-]+)(?!#)/ig,0,["","username"]],["POSTMENTION",/\B@["“](((?!"#[a-z]{0,3}[0-9]+).)+)["”]#p([0-9]+)\b/g,0,["","displayname","","id"]],["GROUPMENTION",/\B@["“](((?!"#[a-z]{0,3}[0-9]+).)+)["|”]#g([0-9]+)\b/g,0,["","groupname","","id"]],["TAGMENTION",/(?:[^“"]|^)\B#([-_A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFB
188D3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC0-9\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19\p{M}]+)\b/ig,0,["","slug"]]]};config.generics.forEach(function(entry){var tagName=entry[0],regexp=entry[1],passthroughIdx=entry[2],map=entry[3],m;regexp.lastIndex=0;while(m=regexp.exec(text)){var startTagPos=m.index,matchLen=m[0].length,tag;if(HINT.PREG_HAS_PASSTHROUGH&&passthroughIdx&&m[passthroughIdx]!==''){var contentPos=text.indexOf(m[passthroughIdx],startTagPos),contentLen=m[passthroughIdx].length,startTagLen=contentPos-startTagPos,endTagPos=contentPos+contentLen,endTagLen=matchLen-(startTagLen+contentLen);tag=addTagPair(tagName,startTagPos,startTagLen,endTagPos,endTagLen,-100)}else{tag=addSelfClosingTag(tagName,startTagPos,matchLen,-100)}
189map.forEach(function(attrName,i){if(attrName&&typeof m[i]!=='undefined'){tag.setAttribute(attrName,m[i])}})}})}}};var pos;var registeredVars={"urlConfig":{allowedSchemes:/^https?$/i}};var rootContext={allowed:oF6AF222C,flags:40};var tagsConfig={"B":oB84A1289,"C":{allowed:o553403F9,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:66},tagLimit:5000},"CENTER":{allowed:oF6AF222C,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"CODE":{allowed:o553403F9,attributes:{"lang":{filterChain:[function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^[-0-9A-Za-z_]+$/)}],required:!1}},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:4436,fosterParent:oD4869BFF},tagLimit:5000},"COLOR":{allowed:oE98D0814,attributes:{"color":{filterChain:[function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^(?:#(?:(?:[0-9a-f]{3}){1,2}|(?:[0-9a-f]{4}){1,2})|rgb\(\d{1,3}, *\d{1,3}, *\d{1,3}\)|rgba\(\d{1,3}, *\d{1,3}, *\d{1,3}, *\d*(?:\.\d+)?\)|[a-z]+)$/i)}],required:!0}},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000},"DEL":{allowed:oF6AF222C,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:512},tagLimit:5000},"E":{allowed:oA385316A,attributes:{},bitNumber:6,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"EM":oB84A1289,"EMAIL":{allowed:oBB818D5A,attributes:{"email":{filterChain:[function(attrValue,attrName){return EmailFilter.filter(attrValue)}],required:!0}},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:o939F1698,tagLimit:5000},"ESC":{allowed:o553403F9,attributes:{},bitNumber:0,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:1616},tagLimit:5000},"GROUPMENTION":{allowed:oA385316A,attributes:{"groupname":o02D8DBB5,"id":o6CB0A318},bitNumber:2,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterGroupMentions(tag)})(tag,registeredVars.actor,registeredVars.mentions)},o118B31AC,function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].postFilterGroupMentions(tag)})(tag)}],nestingLimit:10,rules:oA80287CC,tagLimit:5000},"H1":o28E55ACF,"H2":o28E55ACF,"H3":o28E55ACF,"H4":o28E55ACF,"H5":o28E55ACF,"H6":o28E55ACF,"HR":{allowed:oA385316A,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:3349},tagLimit:5000},"I":oB84A1289,"IMG":{allowed:oA385316A,attributes:{"alt":o1BC3EAF4,"height":o75AB9259,"src":oF307D35C,"title":
189o1BC3EAF4,"width":o75AB9259},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"ISPOILER":o6C76824E,"LI":{allowed:oF6AF222C,attributes:{},bitNumber:4,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:{"B":1,"C":1,"COLOR":1,"EM":1,"EMAIL":1,"I":1,"LI":1,"S":1,"SIZE":1,"STRONG":1,"U":1,"URL":1},flags:264,fosterParent:oD4869BFF},tagLimit:5000},"LIST":{allowed:[32529],attributes:{"start":o75AB9259,"type":{filterChain:[function(attrValue,attrName){return HashmapFilter.filter(attrValue,{"1":"decimal","A":"upper-alpha","I":"upper-roman","a":"lower-alpha","i":"lower-roman"},!1)},function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^[- +,.0-9A-Za-z_]+$/)}],required:!1}},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,createChild:["LI"],flags:3460,fosterParent:oD4869BFF},tagLimit:5000},"POSTMENTION":{allowed:oA385316A,attributes:{"discussionid":o6CB0A318,"displayname":o02D8DBB5,"id":o6CB0A318,"number":o6CB0A318},bitNumber:1,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterPostMentions(tag)})(tag,registeredVars.mentions)},o118B31AC,function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].postFilterPostMentions(tag)})(tag)}],nestingLimit:10,rules:oA80287CC,tagLimit:5000},"QUOTE":{allowed:oF6AF222C,attributes:{"author":o1BC3EAF4},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"S":oB84A1289,"SIZE":{allowed:oE98D0814,attributes:{"size":{filterChain:[function(attrValue,attrName){return NumericFilter.filterRange(attrValue,8,36,logger)}],required:!0}},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000},"SPOILER":{allowed:oF6AF222C,attributes:{},bitNumber:5,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"STRONG":oB84A1289,"SUB":o6C76824E,"SUP":o6C76824E,"TAGMENTION":{allowed:oA385316A,attributes:{"id":o6CB0A318,"slug":o02D8DBB5,"tagname":o02D8DBB5},bitNumber:1,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterTagMentions(tag)})(tag,registeredVars.mentions)},o118B31AC,function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].postFilterTagMentions(tag)})(tag)}],nestingLimit:10,rules:oA80287CC,tagLimit:5000},"U":oB84A1289,"URL":{allowed:oBB818D5A,attributes:{"title":o1BC3EAF4,"url":oF307D35C},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:o939F1698,tagLimit:5000},"USERMENTION":{allowed:oA385316A,attributes:{"displayname":o02D8DBB5,"id":o6CB0A318},bitNumber:1,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterUserMentions(tag)})(tag,registeredVars.mentions)},o118B31AC,function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].postFilterUserMentions(tag)})(tag)}],nestingLimit:10,rules:oA80287CC,tagLimit:5000}};var tagStack;var tagStackIsSorted;var text;var textLen;var uid=0;var wsPos;function disableTag(tagName){if(tagsConfig[tagName]){copyTagConfig(tagName).isDisabled=!0}}
190function enableTag(tagName){if(tagsConfig[tagName]){copyTagConfig(tagName).isDisabled=!1}}
191function getLogger(){return logger}
192function parse(_text){reset(_text);var _uid=uid;executePluginParsers();processTags();finalizeOutput();if(uid!==_uid){throw 'The parser has been reset during execution'}
193if(currentFixingCost>maxFixingCost){logger.warn('Fixing cost limit exceeded')}
194return output}
195function reset(_text){_text=_text.replace(/\r\n?/g,"\n");_text=_text.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]+/g,'');logger.clear();cntOpen={};cntTotal={};currentFixingCost=0;currentTag=null;isRich=!1;namespaces={};openTags=[];output='';pos=0;tagStack=[];tagStackIsSorted=!1;text=_text;textLen=text.length;wsPos=0;context=rootContext;context.inParagraph=!1;++uid}
196function setTagLimit(tagName,tagLimit){if(tagsConfig[tagName]){copyTagConfig(tagName).tagLimit=tagLimit}}
197function setNestingLimit(tagName,nestingLimit){if(tagsConfig[tagName]){copyTagConfig(tagName).nestingLimit=nestingLimit}}
198function copyTagConfig(tagName){var tagConfig={},k;for(k in tagsConfig[tagName]){tagConfig[k]=tagsConfig[tagName][k]}
199return tagsConfig[tagName]=tagConfig}
200function encodeUnicodeSupplementaryCharacters(){output=output.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,encodeUnicodeSupplementaryCharactersCallback)}
201function encodeUnicodeSupplementaryCharactersCallback(pair){var cp=(pair.charCodeAt(0)<<10)+pair.charCodeAt(1)-56613888;return'&#'+cp+';'}
202function finalizeOutput(){var tmp;outputText(textLen,0,!0);do{tmp=output;output=output.replace(/<([^ />]+)[^>]*><\/\1>/g,'')}
203while(output!==tmp);output=output.replace(/<\/i><i>/g,'');output=output.replace(/[\x00-\x08\x0B-\x1F]/g,'');encodeUnicodeSupplementaryCharacters();
203var tagName=(isRich)?'r':'t';tmp='<'+tagName;if(HINT.namespaces){for(var prefix in namespaces){tmp+=' xmlns:'+prefix+'="urn:s9e:TextFormatter:'+prefix+'"'}}
204output=tmp+'>'+output+'</'+tagName+'>'}
205function outputTag(tag){isRich=!0;var tagName=tag.getName(),tagPos=tag.getPos(),tagLen=tag.getLen(),tagFlags=tag.getFlags(),skipBefore=0,skipAfter=0;if(HINT.RULE_IGNORE_WHITESPACE&&(tagFlags&RULE_IGNORE_WHITESPACE)){skipBefore=1;skipAfter=(tag.isEndTag())?2:1}
206var closeParagraph=!!(!tag.isStartTag()||(HINT.RULE_BREAK_PARAGRAPH&&(tagFlags&RULE_BREAK_PARAGRAPH)));outputText(tagPos,skipBefore,closeParagraph);var tagText=(tagLen)?htmlspecialchars_noquotes(text.substring(tagPos,tagPos+tagLen)):'';if(tag.isStartTag()){if(!HINT.RULE_BREAK_PARAGRAPH||!(tagFlags&RULE_BREAK_PARAGRAPH)){outputParagraphStart(tagPos)}
207if(HINT.namespaces){var colonPos=tagName.indexOf(':');if(colonPos>0){namespaces[tagName.substring(0,colonPos)]=0}}
208output+='<'+tagName;var attributes=tag.getAttributes(),attributeNames=[];for(var attrName in attributes){attributeNames.push(attrName)}
209attributeNames.sort(function(a,b){return(a>b)?1:-1});attributeNames.forEach(function(attrName){output+=' '+attrName+'="'+htmlspecialchars_compat(attributes[attrName].toString()).replace(/\n/g,'&#10;')+'"'});if(tag.isSelfClosingTag()){if(tagLen){output+='>'+tagText+'</'+tagName+'>'}else{output+='/>'}}else if(tagLen){output+='><s>'+tagText+'</s>'}else{output+='>'}}else{if(tagLen){output+='<e>'+tagText+'</e>'}
210output+='</'+tagName+'>'}
211pos=tagPos+tagLen;wsPos=pos;while(skipAfter&&wsPos<textLen&&text[wsPos]==="\n"){--skipAfter;++wsPos}}
212function outputText(catchupPos,maxLines,closeParagraph){if(closeParagraph){if(!(context.flags&RULE_CREATE_PARAGRAPHS)){closeParagraph=!1}else{maxLines=-1}}
213if(pos>=catchupPos){if(closeParagraph){outputParagraphEnd()}}
214if(wsPos>pos){var skipPos=Math.min(catchupPos,wsPos);output+=text.substring(pos,skipPos);pos=skipPos;if(pos>=catchupPos){if(closeParagraph){outputParagraphEnd()}}}
215var catchupText;if(HINT.RULE_IGNORE_TEXT&&context.flags&RULE_IGNORE_TEXT){catchupText=text.substring(pos,catchupPos);if(!/^[ \n\t]*$/.test(catchupText)){catchupText='<i>'+htmlspecialchars_noquotes(catchupText)+'</i>'}
216output+=catchupText;pos=catchupPos;if(closeParagraph){outputParagraphEnd()}
217return}
218var ignorePos=catchupPos,ignoreLen=0;while(maxLines&&--ignorePos>=pos){var c=text[ignorePos];if(c!==' '&&c!=="\n"&&c!=="\t"){break}
219if(c==="\n"){--maxLines}
220++ignoreLen}
221catchupPos-=ignoreLen;if(HINT.RULE_CREATE_PARAGRAPHS&&context.flags&RULE_CREATE_PARAGRAPHS){if(!context.inParagraph){outputWhitespace(catchupPos);if(catchupPos>pos){outputParagraphStart(catchupPos)}}
222var pbPos=text.indexOf("\n\n",pos);while(pbPos>-1&&pbPos<catchupPos){outputText(pbPos,0,!0);outputParagraphStart(catchupPos);pbPos=text.indexOf("\n\n",pos)}}
223if(catchupPos>pos){catchupText=htmlspecialchars_noquotes(text.substring(pos,catchupPos));if(HINT.RULE_ENABLE_AUTO_BR&&(context.flags&RULES_AUTO_LINEBREAKS)===RULE_ENABLE_AUTO_BR){catchupText=catchupText.replace(/\n/g,"<br/>\n")}
224output+=catchupText}
225if(closeParagraph){outputParagraphEnd()}
226if(ignoreLen){output+=text.substring(catchupPos,catchupPos+ignoreLen)}
227pos=catchupPos+ignoreLen}
228function outputBrTag(tag){outputText(tag.getPos(),0,!1);output+='<br/>'}
229function outputIgnoreTag(tag){var tagPos=tag.getPos(),tagLen=tag.getLen();var ignoreText=text.substring(tagPos,tagPos+tagLen);outputText(tagPos,0,!1);output+='<i>'+htmlspecialchars_noquotes(ignoreText)+'</i>';isRich=!0;pos=tagPos+tagLen}
230function outputParagraphStart(maxPos){if(!HINT.RULE_CREATE_PARAGRAPHS){return}
231if(context.inParagraph||!(context.flags&RULE_CREATE_PARAGRAPHS)){return}
232outputWhitespace(maxPos);if(pos<textLen){output+='<p>';context.inParagraph=!0}}
233function outputParagraphEnd(){if(!context.inParagraph){return}
234output+='</p>';context.inParagraph=!1}
235function outputVerbatim(tag){var flags=context.flags;context.flags=tag.getFlags();outputText(currentTag.getPos()+currentTag.getLen(),0,!1);context.flags=flags}
236function outputWhitespace(maxPos){while(pos<maxPos&&" \n\t".indexOf(text[pos])>-1){output+=text[pos];++pos}}
237function disablePlugin(pluginName){if(plugins[pluginName]){plugins[pluginName].isDisabled=!0}}
238function enablePlugin(pluginName){if(plugins[pluginName]){plugins[pluginName].isDisabled=!1}}
239function executePluginParser(pluginName){var pluginConfig=plugins[pluginName];if(pluginConfig.quickMatch&&text.indexOf(pluginConfig.quickMatch)<0){return}
240var matches=[];if(HINT.regexp&&HINT.regexpLimit&&typeof pluginConfig.regexp!=='undefined'&&typeof pluginConfig.regexpLimit!=='undefined'){matches=getMatches(pluginConfig.regexp,pluginConfig.regexpLimit);if(!matches.length){return}}
241getPluginParser(pluginName)(text,matches)}
242function executePluginParsers(){for(var pluginName in plugins){if(!plugins[pluginName].isDisabled){executePluginParser(pluginName)}}}
243function getMatches(regexp,limit){regexp.lastIndex=0;var matches=[],cnt=0,m;while(++cnt<=limit&&(m=regexp.exec(text))){var pos=m.index,match=[[m[0],pos]],i=0;while(++i<m.length){var str=m[i];if(str===undefined){match.push(['',-1])}else{match.push([str,text.indexOf(str,pos)]);pos+=str.length}}
244matches.push(match)}
245return matches}
246function getPluginParser(pluginName){return plugins[pluginName].parser}
247function registerParser(pluginName,parser,regexp,limit){if(!plugins[pluginName]){plugins[pluginName]={}}
248if(regexp){plugins[pluginName].regexp=regexp;plugins[pluginName].limit=limit||Infinity}
249plugins[pluginName].parser=parser}
250function closeAncestor(tag){if(!HINT.closeAncestor){return!1}
251if(openTags.length){var tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.closeAncestor){var i=openTags.length;while(--i>=0){var ancestor=openTags[i],ancestorName=ancestor.getName();if(tagConfig.rules.closeAncestor[ancestorName]){++currentFixingCost;tagStack.push(tag);addMagicEndTag(ancestor,tag.getPos(),tag.getSortPriority()-1);return!0}}}}
252return!1}
253function closeParent(tag){if(!HINT.closeParent){return!1}
254if(openTags.length){var tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.closeParent){var parent=openTags[openTags.length-1],parentName=parent.getName();if(tagConfig.rules.closeParent[parentName]){++currentFixingCost;tagStack.push(tag);addMagicEndTag(parent,tag.getPos(),tag.getSortPriority()-1);return!0}}}
255return!1}
256function createChild(tag){if(!HINT.createChild){return}
257var tagConfig=tagsConfig[tag.getName()];if(tagConfig.rules.createChild){var priority=-1000,_text=text.substring(pos),tagPos=pos+_text.length-_text.replace(/^[ \n\r\t]+/,'').length;tagConfig.rules.createChild.forEach(function(tagName){addStartTag(tagName,tagPos,0,++priority)})}}
258function fosterParent(tag){if(!HINT.fosterParent){return!1}
259if(openTags.length){var tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.fosterParent){var parent=openTags[openTags.length-1],parentName=parent.getName();if(tagConfig.rules.fosterParent[parentName]){if(parentName!==tagName&&currentFixingCost<maxFixingCost){addFosterTag(tag,parent)}
260tagStack.push(tag);addMagicEndTag(parent,tag.getPos(),tag.getSortPriority()-1);currentFixingCost+=4;return!0}}}
261return!1}
262function requireAncestor(tag){if(!HINT.requireAncestor){return!1}
263var tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.requireAncestor){var i=tagConfig.rules.requireAncestor.length;while(--i>=0){var ancestorName=tagConfig.rules.requireAncestor[i];if(cntOpen[ancestorName]){return!1}}
264logger.err('Tag requires an ancestor',{'requireAncestor':tagConfig.rules.requireAncestor.join(', '),'tag':tag});return!0}
265return!1}
266function addFosterTag(tag,fosterTag){var coords=getMagicStartCoords(tag.getPos()+tag.getLen()),childPos=coords[0],childPrio=coords[1];var childTag=addCopyTag(fosterTag,childPos,0,childPrio);tag.cascadeInvalidationTo(childTag)}
267function addMagicEndTag(startTag,tagPos,prio){var tagName=startTag.getName();if(HINT.RULE_IGNORE_WHITESPACE&&((currentTag.getFlags()|startTag.getFlags())&RULE_IGNORE_WHITESPACE)){tagPos=getMagicEndPos(tagPos)}
268var endTag=addEndTag(tagName,tagPos,0,prio||0);endTag.pairWith(startTag);return endTag}
269function getMagicEndPos(tagPos){while(tagPos>pos&&WHITESPACE.indexOf(text[tagPos-1])>-1){--tagPos}
270return tagPos}
271function getMagicStartCoords(tagPos){var nextPos,nextPrio,nextTag,prio;if(!tagStack.length){nextPos=textLen+1;nextPrio=0}else{nextTag=tagStack[tagStack.length-1];nextPos=nextTag.getPos();nextPrio=nextTag.getSortPriority()}
272while(tagPos<nextPos&&WHITESPACE.indexOf(text[tagPos])>-1){++tagPos}
273prio=(tagPos===nextPos)?nextPrio-1:0;return[tagPos,prio]}
274function isFollowedByClosingTag(tag){return(!tagStack.length)?!1:tagStack[tagStack.length-1].canClose(tag)}
275function processTags(){if(!tagStack.length){return}
276for(var tagName in tagsConfig){cntOpen[tagName]=0;cntTotal[tagName]=0}
277do{while(tagStack.length){if(!tagStackIsSorted){sortTags()}
278currentTag=tagStack.pop();processCurrentTag()}
279openTags.forEach(function(startTag){addMagicEndTag(startTag,textLen)})}
280while(tagStack.length);}
281function processCurrentTag(){if((context.flags&RULE_IGNORE_TAGS)&&!currentTag.canClose(openTags[openTags.length-1])&&!currentTag.isSystemTag()){currentTag.invalidate()}
282var tagPos=currentTag.getPos(),tagLen=currentTag.getLen();if(pos>tagPos&&!currentTag.isInvalid()){var startTag=currentTag.getStartTag();if(startTag&&openTags.indexOf(startTag)>=0){addEndTag(startTag.getName(),pos,Math.max(0,tagPos+tagLen-pos)).pairWith(startTag);return}
283if(currentTag.isIgnoreTag()){var ignoreLen=tagPos+tagLen-pos;if(ignoreLen>0){addIgnoreTag(pos,ignoreLen);return}}
284currentTag.invalidate()}
285if(currentTag.isInvalid()){return}
286if(currentTag.isIgnoreTag()){outputIgnoreTag(currentTag)}else if(currentTag.isBrTag()){if(!HINT.RULE_PREVENT_BR||!(context.flags&RULE_PREVENT_BR)){outputBrTag(currentTag)}}else if(currentTag.isParagraphBreak()){outputText(currentTag.getPos(),0,!0)}else if(currentTag.isVerbatim()){outputVerbatim(currentTag)}else if(currentTag.isStartTag()){processStartTag(currentTag)}else{processEndTag(currentTag)}}
287function processStartTag(tag){var tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(cntTotal[tagName]>=tagConfig.tagLimit){logger.err('Tag limit exceeded',{'tag':tag,'tagName':tagName,'tagLimit':tagConfig.tagLimit});tag.invalidate();return}
288filterTag(tag);if(tag.isInvalid()){return}
289if(currentFixingCost<maxFixingCost){if(fosterParent(tag)||closeParent(tag)||closeAncestor(tag)){return}}
290if(cntOpen[tagName]>=tagConfig.nestingLimit){logger.err('Nesting limit exceeded',{'tag':tag,'tagName':tagName,'nestingLimit':tagConfig.nestingLimit});tag.invalidate();return}
291if(!tagIsAllowed(tagName)){var msg='Tag is not allowed in this context',context={'tag':tag,'tagName':tagName};if(tag.getLen()>0){logger.warn(msg,context)}else{logger.debug(msg,context)}
292tag.invalidate();return}
293if(requireAncestor(tag)){tag.invalidate();return}
294if(HINT.RULE_AUTO_CLOSE&&tag.getFlags()&RULE_AUTO_CLOSE&&!tag.isSelfClosingTag()&&!tag.getEndTag()&&!isFollowedByClosingTag(tag)){var newTag=new Tag(Tag.SELF_CLOSING_TAG,tagName,tag.getPos(),tag.getLen());newTag.setAttributes(tag.getAttributes());newTag.setFlags(tag.getFlags());tag=newTag}
295if(HINT.RULE_TRIM_FIRST_LINE&&tag.getFlags()&RULE_TRIM_FIRST_LINE&&text[tag.getPos()+tag.getLen()]==="\n"){addIgnoreTag(tag.getPos()+tag.getLen(),1)}
296outputTag(tag);pushContext(tag);createChild(tag)}
297function processEndTag(tag){var tagName=tag.getName();if(!cntOpen[tagName]){return}
298var closeTags=[];var i=openTags.length;while(--i>=0){var openTag=openTags[i];if(tag.canClose(openTag)){break}
299closeTags.push(openTag);++currentFixingCost}
300if(i<0){logger.debug('Skipping end tag with no start tag',{'tag':tag});return}
301var flags=tag.getFlags();closeTags.forEach(function(openTag){flags|=openTag.getFlags()});var ignoreWhitespace=(HINT.RULE_IGNORE_WHITESPACE&&(flags&RULE_IGNORE_WHITESPACE));var keepReopening=HINT.RULE_AUTO_REOPEN&&(currentFixingCost<maxFixingCost),reopenTags=[];closeTags.forEach(function(openTag){var openTagName=openTag.getName();if(keepReopening){if(openTag.getFlags()&RULE_AUTO_REOPEN){reopenTags.push(openTag)}else{keepReopening=!1}}
302var tagPos=tag.getPos();if(ignoreWhitespace){tagPos=getMagicEndPos(tagPos)}
303var endTag=new Tag(Tag.END_TAG,openTagName,tagPos,0);endTag.setFlags(openTag.getFlags());outputTag(endTag);popContext()});outputTag(tag);popContext();if(closeTags.length&&currentFixingCost<maxFixingCost){var ignorePos=pos;i=tagStack.length;while(--i>=0&&++currentFixingCost<maxFixingCost){var upcomingTag=tagStack[i];if(upcomingTag.getPos()>ignorePos||upcomingTag.isStartTag()){break}
304var j=closeTags.length;while(--j>=0&&++currentFixingCost<maxFixingCost){if(upcomingTag.canClose(closeTags[j])){closeTags.splice(j,1);if(reopenTags[j]){reopenTags.splice(j,1)}
305ignorePos=Math.max(ignorePos,upcomingTag.getPos()+upcomingTag.getLen());break}}}
306if(ignorePos>pos){outputIgnoreTag(new Tag(Tag.SELF_CLOSING_TAG,'i',pos,ignorePos-pos))}}
307reopenTags.forEach(function(startTag){var newTag=addCopyTag(startTag,pos,0);var endTag=startTag.getEndTag();if(endTag){newTag.pairWith(endTag)}})}
308function popContext(){var tag=openTags.pop();--cntOpen[tag.getName()];context=context.parentContext}
309function pushContext(tag){var tagName=tag.getName(),tagFlags=tag.getFlags(),tagConfig=tagsConfig[tagName];++cntTotal[tagName];if(tag.isSelfClosingTag()){return}
310var allowed=[];context.allowed.forEach(function(v,k){if(!HINT.RULE_IS_TRANSPARENT||!(tagFlags&RULE_IS_TRANSPARENT)){v=(v&0xFF00)|(v>>8)}
311allowed.push(tagConfig.allowed[k]&v)});var flags=tagFlags|(context.flags&RULES_INHERITANCE);if(flags&RULE_DISABLE_AUTO_BR){flags&=~RULE_ENABLE_AUTO_BR}
312++cntOpen[tagName];openTags.push(tag);context={parentContext:context};context.allowed=allowed;context.flags=flags}
313function tagIsAllowed(tagName){var n=tagsConfig[tagName].bitNumber;return!!(context.allowed[n>>3]&(1<<(n&7)))}
314function addStartTag(name,pos,len,prio){return addTag(Tag.START_TAG,name,pos,len,prio||0)}
315function addEndTag(name,pos,len,prio){return addTag(Tag.END_TAG,name,pos,len,prio||0)}
316function addSelfClosingTag(name,pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,name,pos,len,prio||0)}
317function addBrTag(pos,prio){return addTag(Tag.SELF_CLOSING_TAG,'br',pos,0,prio||0)}
318function addIgnoreTag(pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,'i',pos,Math.min(len,textLen-pos),prio||0)}
319function addParagraphBreak(pos,prio){return addTag(Tag.SELF_CLOSING_TAG,'pb',pos,0,prio||0)}
320function addCopyTag(tag,pos,len,prio){var copy=addTag(tag.getType(),tag.getName(),pos,len,tag.getSortPriority());copy.setAttributes(tag.getAttributes());return copy}
321function addTag(type,name,pos,len,prio){var tag=new Tag(type,name,pos,len,prio||0);if(tagsConfig[name]){tag.setFlags(tagsConfig[name].rules.flags)}
322if((!tagsConfig[name]&&!tag.isSystemTag())||isInvalidTextSpan(pos,len)){tag.invalidate()}else if(tagsConfig[name]&&tagsConfig[name].isDisabled){logger.warn('Tag is disabled',{'tag':tag,'tagName':name});tag.invalidate()}else{insertTag(tag)}
323return tag}
324function isInvalidTextSpan(pos,len){return(len<0||pos<0||pos+len>textLen||/[\uDC00-\uDFFF]/.test(text.substring(pos,pos+1)+text.substring(pos+len,pos+len+1)))}
325function insertTag(tag){if(!tagStackIsSorted){tagStack.push(tag)}else{var i=tagStack.length,key=getSortKey(tag);while(i>0&&key>getSortKey(tagStack[i-1])){tagStack[i]=tagStack[i-1];--i}
326tagStack[i]=tag}}
327function addTagPair(name,startPos,startLen,endPos,endLen,prio){var endTag=addEndTag(name,endPos,endLen,-prio||0),startTag=addStartTag(name,startPos,startLen,prio||0);startTag.pairWith(endTag);return startTag}
328function addVerbatim(pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,'v',pos,len,prio||0)}
329function sortTags(){var arr={},keys=[],i=tagStack.length;while(--i>=0){var tag=tagStack[i],key=getSortKey(tag,i);keys.push(key);arr[key]=tag}
330keys.sort();i=keys.length;tagStack=[];while(--i>=0){tagStack.push(arr[keys[i]])}
331tagStackIsSorted=!0}
332function getSortKey(tag,tagIndex){var prioFlag=(tag.getSortPriority()>=0),prio=tag.getSortPriority();if(!prioFlag){prio+=(1<<30)}
333var lenFlag=(tag.getLen()>0),lenOrder;if(lenFlag){lenOrder=textLen-tag.getLen()}else{var order={};order[Tag.END_TAG]=0;order[Tag.SELF_CLOSING_TAG]=1;order[Tag.START_TAG]=2;lenOrder=order[tag.getType()]}
334return hex32(tag.getPos())+(+prioFlag)+hex32(prio)+(+lenFlag)+hex32(lenOrder)+hex32(tagIndex||0)}
335function hex32(number){var hex=number.toString(16);return"        ".substring(hex.length)+hex}
336var MSXML=(typeof DOMParser==='undefined'||typeof XSLTProcessor==='undefined');var xslt={init:function(xsl){var stylesheet=xslt.loadXML(xsl);if(MSXML){var generator=new ActiveXObject('MSXML2.XSLTemplate.6.0');generator.stylesheet=stylesheet;xslt.proc=generator.createProcessor()}else{xslt.proc=new XSLTProcessor;xslt.proc.importStylesheet(stylesheet)}},loadXML:function(xml){var dom;if(MSXML){dom=new ActiveXObject('MSXML2.FreeThreadedDOMDocument.6.0');dom.async=!1;dom.validateOnParse=!1;dom.loadXML(xml)}else{dom=(new DOMParser).parseFromString(xml,'text/xml')}
337if(!dom){throw 'Cannot parse '+xml}
338return dom},setParameter:function(paramName,paramValue){if(MSXML){xslt.proc.addParameter(paramName,paramValue,'')}else{xslt.proc.setParameter(null,paramName,paramValue)}},transformToFragment:function(xml,targetDoc){if(MSXML){var div=targetDoc.
338createElement('div'),fragment=targetDoc.createDocumentFragment();xslt.proc.input=xslt.loadXML(xml);xslt.proc.transform();div.innerHTML=xslt.proc.output;while(div.firstChild){fragment.appendChild(div.firstChild)}
339return fragment}
340return xslt.proc.transformToFragment(xslt.loadXML(xml),targetDoc)}};xslt.init(xsl);function preview(text,target){var targetDoc=target.ownerDocument;if(!targetDoc){throw 'Target does not have a ownerDocument'}
341var resultFragment=xslt.transformToFragment(parse(text).replace(/<[eis]>[^<]*<\/[eis]>/g,''),targetDoc),lastUpdated=target;if(typeof window!=='undefined'&&'chrome' in window){resultFragment.querySelectorAll('script').forEach(function(oldScript){let newScript=document.createElement('script');for(let attribute of oldScript.attributes){newScript.setAttribute(attribute.name,attribute.value)}
342newScript.textContent=oldScript.textContent;oldScript.parentNode.replaceChild(newScript,oldScript)})}
343if(HINT.hash){computeHashes(resultFragment)}
344if(HINT.onRender){executeEvents(resultFragment,'render')}
345function computeHashes(fragment){var nodes=fragment.querySelectorAll('[data-s9e-livepreview-hash]'),i=nodes.length;while(--i>=0){nodes[i].setAttribute('data-s9e-livepreview-hash',hash(nodes[i].outerHTML))}}
346function executeEvent(node,eventName){var code=node.getAttribute('data-s9e-livepreview-on'+eventName);if(!functionCache[code]){functionCache[code]=new Function(code)}
347functionCache[code].call(node)}
348function executeEvents(root,eventName){if(root instanceof Element&&root.hasAttribute('data-s9e-livepreview-on'+eventName)){executeEvent(root,eventName)}
349var nodes=root.querySelectorAll('[data-s9e-livepreview-on'+eventName+']'),i=nodes.length;while(--i>=0){executeEvent(nodes[i],eventName)}}
350function refreshElementContent(oldParent,newParent){var oldNodes=oldParent.childNodes,newNodes=newParent.childNodes,oldCnt=oldNodes.length,newCnt=newNodes.length,oldNode,newNode,left=0,right=0;while(left<oldCnt&&left<newCnt){oldNode=oldNodes[left];newNode=newNodes[left];if(!refreshNode(oldNode,newNode)){break}
351++left}
352var maxRight=Math.min(oldCnt-left,newCnt-left);while(right<maxRight){oldNode=oldNodes[oldCnt-(right+1)];newNode=newNodes[newCnt-(right+1)];if(!refreshNode(oldNode,newNode)){break}
353++right}
354var i=oldCnt-right;while(--i>=left){oldParent.removeChild(oldNodes[i]);lastUpdated=oldParent}
355var rightBoundary=newCnt-right;if(left>=rightBoundary){return}
356var newNodesFragment=targetDoc.createDocumentFragment();i=left;do{newNode=newNodes[i];if(HINT.onUpdate&&newNode instanceof Element){executeEvents(newNode,'update')}
357lastUpdated=newNodesFragment.appendChild(newNode)}
358while(i<--rightBoundary);if(!right){oldParent.appendChild(newNodesFragment)}else{oldParent.insertBefore(newNodesFragment,oldParent.childNodes[left])}}
359function refreshNode(oldNode,newNode){if(oldNode.nodeName!==newNode.nodeName||oldNode.nodeType!==newNode.nodeType){return!1}
360if(oldNode instanceof HTMLElement&&newNode instanceof HTMLElement){if(!oldNode.isEqualNode(newNode)&&!elementHashesMatch(oldNode,newNode)){if(HINT.onUpdate&&newNode.hasAttribute('data-s9e-livepreview-onupdate')){executeEvent(newNode,'update')}
361syncElementAttributes(oldNode,newNode);refreshElementContent(oldNode,newNode)}}else if(oldNode.nodeType===3||oldNode.nodeType===8){if(oldNode.nodeValue!==newNode.nodeValue){oldNode.nodeValue=newNode.nodeValue;lastUpdated=oldNode}}
362return!0}
363function elementHashesMatch(oldEl,newEl){if(!HINT.hash){return!1}
364const attrName='data-s9e-livepreview-hash';return oldEl.hasAttribute(attrName)&&newEl.hasAttribute(attrName)&&oldEl.getAttribute(attrName)===newEl.getAttribute(attrName)}
365function hash(text){var pos=text.length,s1=0,s2=0;while(--pos>=0){s1=(s1+text.charCodeAt(pos))%0xFFFF;s2=(s1+s2)%0xFFFF}
366return(s2<<16)|s1}
367function syncElementAttributes(oldEl,newEl){var oldAttributes=oldEl.attributes,newAttributes=newEl.attributes,oldCnt=oldAttributes.length,newCnt=newAttributes.length,i=oldCnt,ignoreAttrs=' '+oldEl.getAttribute('data-s9e-livepreview-ignore-attrs')+' ';while(--i>=0){var oldAttr=oldAttributes[i],namespaceURI=oldAttr.namespaceURI,attrName=oldAttr.name;if(HINT.ignoreAttrs&&ignoreAttrs.indexOf(' '+attrName+' ')>-1){continue}
368if(!newEl.hasAttributeNS(namespaceURI,attrName)){oldEl.removeAttributeNS(namespaceURI,attrName);lastUpdated=oldEl}}
369i=newCnt;while(--i>=0){var newAttr=newAttributes[i],namespaceURI=newAttr.namespaceURI,attrName=newAttr.name,attrValue=newAttr.value;if(HINT.ignoreAttrs&&ignoreAttrs.indexOf(' '+attrName+' ')>-1){continue}
370if(attrValue!==oldEl.getAttributeNS(namespaceURI,attrName)){oldEl.setAttributeNS(namespaceURI,attrName,attrValue);lastUpdated=oldEl}}}
371refreshElementContent(target,resultFragment);return lastUpdated}
372function setParameter(paramName,paramValue){xslt.setParameter(paramName,paramValue)}if(!window.s9e)window.s9e={};window.s9e.TextFormatter={'preview':preview}})();
373
374var module={};
375
376(()=>{var t={n:a=>{var o=a&&a.__esModule?()=>a.default:()=>a;return t.d(o,{a:o}),o},d:(a,o)=>{for(var s in o)t.o(o,s)&&!t.o(a,s)&&Object.defineProperty(a,s,{enumerable:!0,get:o[s]})},o:(t,a)=>Object.prototype.hasOwnProperty.call(t,a),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
376),Object.defineProperty(t,"__esModule",{value:!0})}},a={};(()=>{"use strict";t.r(a),t.d(a,{extend:()=>et});const o=flarum.core.compat["forum/app"];var s=t.n(o),e=function(){function t(t){this.app=t,this.loading=!1}return t.prototype.load=function(){var t=this;this.cache&&!this.app.session.user.attribute("newFlagCount")||(this.loading=!0,m.redraw(),this.app.store.find("flags").then((function(a){t.app.session.user.pushAttributes({newFlagCount:0}),t.cache=a.sort((function(t,a){return a.createdAt()-t.createdAt()}))})).catch((function(){})).then((function(){t.loading=!1,m.redraw()})))},t}();const n=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/utils/PostControls"];var l=t.n(r);const i=flarum.core.compat["common/components/Button"];var c=t.n(i);function u(t,a){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,a){return t.__proto__=a,t},u(t,a)}function f(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,u(t,a)}const p=flarum.core.compat["common/components/Modal"];var d=t.n(p);const g=flarum.core.compat["common/utils/Stream"];var h=t.n(g);const v=flarum.core.compat["common/utils/withAttr"];var _=t.n(v);const b=flarum.core.compat["common/utils/ItemList"];var y=t.n(b),N=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.success=!1,this.reason=h()(""),this.reasonDetail=h()("")},o.className=function(){return"FlagPostModal Modal--medium"},o.title=function(){return s().translator.trans("flarum-flags.forum.flag_post.title")},o.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},s().translator.trans("flarum-flags.forum.flag_post.confirmation_message")),m("div",{className:"Form-group"},m(c(),{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},s().translator.trans("flarum-flags.forum.flag_post.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("div",null,this.flagReasons().toArray())),m("div",{className:"Form-group"},m(c(),{className:"Button Button--primary Button--block",type:"submit",loading:this.loading,disabled:!this.reason()},s().translator.trans("flarum-flags.forum.flag_post.submit_button")))))},o.flagReasons=function(){var t=new(y()),a=s().forum.attribute("guidelinesUrl");return t.add("off-topic",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"off_topic"===this.reason(),value:"off_topic",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_off_topic_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_off_topic_text"),"off_topic"===this.reason()&&m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)})),70),t.add("inappropriate",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"inappropriate"===this.reason(),value:"inappropriate",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_text",{a:a?m("a",{href:a,target:"_blank"}):void 0}),"inappropriate"===this.reason()&&m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)})),60),t.add("spam",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"spam"===this.reason(),value:"spam",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_spam_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_spam_text"),"spam"===this.reason()&&m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)})),50),t.add("other",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"other"===this.reason(),value:"other",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_other_label")),"other"===this.reason()&&m("textarea",{className:"FormControl",value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)})),10),t},o.onsubmit=function(t){var a=this;t.preventDefault(),this.loading=!0,s().store.createRecord("flags").save({reason:"other"===this.reason()?null:this.reason(),reasonDetail:this.reasonDetail(),relationships:{user:s().session.user,post:this.attrs.post}},{errorHandler:this.onerror.bind(this)}).then((function(){return a.success=!0}
376)).catch((function(){})).then(this.loaded.bind(this))},a}(d());function F(){(0,n.extend)(l(),"userControls",(function(t,a){!a.isHidden()&&"comment"===a.contentType()&&a.canFlag()&&t.add("flag",m(c(),{icon:"fas fa-flag",onclick:function(){return s().modal.show(N,{post:a})}},s().translator.trans("flarum-flags.forum.post_controls.flag_button")))}))}const x=flarum.core.compat["forum/components/HeaderSecondary"];var k=t.n(x);const w=flarum.core.compat["forum/components/NotificationsDropdown"];var P=t.n(w);const C=flarum.core.compat["common/Component"];var D=t.n(C);const A=flarum.core.compat["common/components/Link"];var O=t.n(A);const M=flarum.core.compat["common/components/LoadingIndicator"];var L=t.n(M);const B=flarum.core.compat["common/helpers/avatar"];var j=t.n(B);const T=flarum.core.compat["common/helpers/username"];var S=t.n(T);const R=flarum.core.compat["common/helpers/icon"];var E=t.n(R);const I=flarum.core.compat["common/helpers/humanTime"];var H=t.n(I),U=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.state=this.attrs.state},o.view=function(){var t=this.state.cache||[];return m("div",{className:"NotificationList FlagList"},m("div",{className:"NotificationList-header"},m("h4",{className:"App-titleControl App-titleControl--text"},s().translator.trans("flarum-flags.forum.flagged_posts.title"))),m("div",{className:"NotificationList-content"},m("ul",{className:"NotificationGroup-content"},t.length?t.map((function(t){var a=t.post();return m("li",null,m(O(),{href:s().route.post(a),className:"Notification Flag",oncl
376ick:function(t){s().flags.index=a,t.redraw=!1}},j()(a.user()),E()("fas fa-flag",{className:"Notification-icon"}),m("span",{className:"Notification-content"},s().translator.trans("flarum-flags.forum.flagged_posts.item_text",{username:S()(a.user()),em:m("em",null),discussion:a.discussion().title()})),H()(t.createdAt()),m("div",{className:"Notification-excerpt"},a.contentPlain())))})):this.state.loading?m(L(),{className:"LoadingIndicator--block"}):m("div",{className:"NotificationList-empty"},s().translator.trans("flarum-flags.forum.flagged_posts.empty_text")))))},a}(D()),G=function(t){function a(){return t.apply(this,arguments)||this}f(a,t),a.initAttrs=function(a){a.label=a.label||s().translator.trans("flarum-flags.forum.flagged_posts.tooltip"),a.icon=a.icon||"fas fa-flag",t.initAttrs.call(this,a)};var o=a.prototype;return o.getMenu=function(){return m("div",{className:"Dropdown-menu "+this.attrs.menuClassName,onclick:this.menuClick.bind(this)},this.showing&&m(U,{state:this.attrs.state}))},o.goToRoute=function(){m.route.set(s().route("flags"))},o.getUnreadCount=function(){return s().flags.cache?s().flags.cache.length:s().forum.attribute("flagCount")},o.getNewCount=function(){return s().session.user.attribute("newFlagCount")},a}(P());function q(){(0,n.extend)(k().prototype,"items",(function(t){s().forum.attribute("canViewFlags")&&t.add("flags",m(G,{state:s().flags}),15)}))}const z=flarum.core.compat["forum/components/Post"];var V=t.n(z);const J=flarum.core.compat["common/utils/humanTime"];var K=t.n(J);function Q(){(0,n.extend)(V().prototype,"elementAttrs",(function(t){this.attrs.post.flags().length&&(t.className+=" Post--flagged")})),V().prototype.dismissFlag=function(t){var a=this.attrs.post;
376return delete a.data.relationships.flags,this.subtree.invalidate(),s().flags.cache&&s().flags.cache.some((function(t,o){if(t.post()===a){if(s().flags.cache.splice(o,1),s().flags.index===a){var e=s().flags.cache[o];if(e||(e=s().flags.cache[0]),e){var n=e.post();s().flags.index=n,m.route.set(s().route.post(n))}}return!0}})),s().request({url:s().forum.attribute("apiUrl")+a.apiEndpoint()+"/flags",method:"DELETE",body:t})},V().prototype.flagActionItems=function(){var t=this,a=new(y()),o=l().destructiveControls(this.attrs.post);return Object.keys(o.items).forEach((function(a){var s=o.get(a).attrs;s.className="Button",(0,n.extend)(s,"onclick",(function(){return t.dismissFlag()}))})),a.add("controls",m("div",{className:"ButtonGroup"},o.toArray())),a.add("dismiss",m(c(),{className:"Button",icon:"far fa-eye-slash",onclick:this.dismissFlag.bind(this)},s().translator.trans("flarum-flags.forum.post.dismiss_flag_button")),-100),a},(0,n.extend)(V().prototype,"content",(function(t){var a=this,o=this.attrs.post,s=o.flags();s.length&&(o.isHidden()&&(this.revealContent=!0),t.unshift(m("div",{className:"Post-flagged"},m("div",{className:"Post-flagged-flags"},s.map((function(t){return m("div",{className:"Post-flagged-flag"},a.flagReason(t))}))),m("div",{className:"Post-flagged-actions"},this.flagActionItems().toArray()))))})),V().prototype.flagReason=function(t){if("user"===t.type()){var a=t.user(),o=t.reason()?s().translator.trans("flarum-flags.forum.flag_post.reason_"+t.reason()+"_label"):null,e=t.reasonDetail(),n=K()(t.createdAt());return[s().translator.trans(o?"flarum-flags.forum.post.flagged_by_with_reason_text":"flarum-flags.forum.post.flagged_by_text",{time:n,user:a,reason:o}),!!e&&m("span",{className:"Post-flagged-detail"},e)]}}}const W=flarum.core.compat["common/extenders"];var X=t.n(W);const Y=flarum.core.compat["common/models/Post"];var Z=t.n(Y);const $=flarum.core.compat["components/Page"];var tt=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),s().history.push("flags"),s().flags.load(),this.bodyClass="App--flags"},o.view=function(){return m("div",{className:"FlagsPage"},m(U,{state:s().flags}))},a}(t.n($)());const at=flarum.core.compat["common/Model"];var ot=t.n(at),st=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.type=function(){return ot().attribute("type").call(this)},o.reason=function(){return ot().attribute("reason").call(this)},o.reasonDetail=function(){return ot().attribute("reasonDetail").call(this)},o.createdAt=function(){return ot().attribute("createdAt",ot().transformDate).call(this)},o.post=function(){return ot().hasOne("post").call(this)},o.user=function(){return ot().hasOne("user").call(this)},a}(ot());const et=[(new(X().Routes)).add("flags","/flags",tt),(new(X().Store)).add("flags",st),new(X().Model)(Z()).hasMany("flags").attribute("canFlag")],nt={"flags/addFlagsToPosts":Q,"flags/addFlagControl":F,"flags/addFlagsDropdown":q,"flags/models/Flag":st,"flags/components/FlagList":U,"flags/components/FlagPostModal":N,"flags/components/FlagsPage":tt,"flags/components/FlagsDropdown":G},rt=flarum.core;s().initializers.add("flarum-flags",(function(){s().flags=new e(s()),F(),q(),Q()})),Object.assign(rt.compat,nt)})(),module.exports=a})();
377
378
379flarum.extensions['flarum-flags']=module.exports;
380
381var module={};
382
383(()=>{var o={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return o.d(r,{a:r}),r},d:(t,r)=>{for(var e in r)o.o(r,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t);const r=flarum.core.compat["common/extend"],e=flarum.core.compat["forum/app"];var a=o.n(e);const p=flarum.core.compat["common/models/Discussion"];var n=o.n(p);const s=flarum.core.compat["common/models/Post"];var i=o.n(s);const c=flarum.core.compat["common/components/Badge"];var u=o.n(c);const l=flarum.core.compat["forum/components/DiscussionListItem"];var d=o.n(l);const v=flarum.core.compat["forum/components/Post"];var f=o.n(v);const A=flarum.core.compat["forum/components/CommentPost"];var y=o.n(A);const b=flarum.core.compat["common/components/Button"];var g=o.n(b);const h=flarum.core.compat["forum/utils/PostControls"];var _=o.n(h);
383a().initializers.add("flarum-approval",(function(){n().prototype.isApproved=n().attribute("isApproved"),(0,r.extend)(n().prototype,"badges",(function(o){this.isApproved()||o.has("hidden")||o.add("awaitingApproval",m(u(),{type:"awaitingApproval",icon:"fas fa-gavel",label:a().translator.trans("flarum-approval.forum.badge.awaiting_approval_tooltip")}))})),i().prototype.isApproved=i().attribute("isApproved"),i().prototype.canApprove=i().attribute("canApprove"),(0,r.extend)(d().prototype,"elementAttrs",(function(o){this.attrs.discussion.isApproved()||(o.className+=" DiscussionListItem--unapproved")})),(0,r.extend)(f().prototype,"elementAttrs",(function(o){this.attrs.post.isApproved()||(o.className+=" Post--unapproved")})),(0,r.extend)(y().prototype,"headerItems",(function(o){this.attrs.post.isApproved()||this.attrs.post.isHidden()||o.add("unapproved",a().translator.trans("flarum-approval.forum.post.awaiting_approval_text"))})),(0,r.override)(f().prototype,"flagReason",(function(o,t){return"approval"===t.type()?a().translator.trans("flarum-approval.forum.post.awaiting_approval_text"):o(t)})),(0,r.extend)(_(),"destructiveControls",(function(o,t){!t.isApproved()&&t.canApprove()&&o.add("approve",m(g(),{icon:"fas fa-check",onclick:_().approveAction.bind(t)},a().translator.trans("flarum-approval.forum.post_controls.approve_button")),10)})),_().approveAction=function(){this.save({isApproved:!0}),1===this.number()&&this.discussion().pushAttributes({isApproved:!0})}}),-10)})(),module.exports=t})();
384
385
386flarum.extensions['flarum-approval']=module.exports;
387
388var module={};
389
390/*! For license information please see forum.js.LICENSE.txt */
391(()=>{var t={810:()=>{},115:(t,e,n)=>{"use strict";n.d(e,{l:()=>Ut});const r=flarum.core.compat["forum/app"];var a=n.n(r);function o(t,e,n,r,a,o,s){try{var i=t[o](s),c=i.value}catch(t){return void n(t)}i.done?e(c):Promise.resolve(c).then(r,a)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var s=t.apply(e,n);function i(t){o(s,r,a,i,c,"next",t)}function c(t){o(s,r,a,i,c,"throw",t)}i(void 0)}))}}var i=n(507),c=n.n(i);const l=flarum.core.compat["common/app"];var u=n.n(l),d=function(){function t(){this.loadedIncludes=void 0}var e=t.prototype;return e.load=function(){var t=s(c().mark((function t(e){var n,r=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===e&&(e=[]),this.loadedIncludes){t.next=3;break}return t.abrupt("return",this.query(e));case 3:if(0!==(n=e.filter((function(t){return!r.loadedIncludes.has(t)}))).length){t.next=6;break}return t.abrupt("return",Promise.resolve(u().store.all("tags")));case 6:return t.abrupt("return",this.query(n));case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.query=function(){var t=s(c().mark((function t(e){var n=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===e&&(e=[]),null!=this.loadedIncludes||(this.loadedIncludes=new Set),t.abrupt("return",u().store.find("tags",{include:e.join(",")}).then((function(t){return e.forEach((function(t){return n.loadedIncludes.add(t)})),t})));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),t}();const f=flarum.core.compat["common/extend"],p=flarum.core.compat["forum/components/IndexPage"];var h=n.n(p);const g=flarum.core.compat["common/components/Separator"];var v=n.n(g);const y=flarum.core.compat["common/components/LinkButton"];var b=n.n(y);function T(t,e){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},T(t,e)}function x(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,T(t,e)}const w=flarum.core.compat["common/components/Link"];var _=n.n(w);const N=flarum.core.compat["common/utils/classList"];var L=n.n(N);function I(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var r=t&&t.icon(),a=n.useColor,o=void 0===a||a;return e.className=L()([e.className,"icon",r?t.icon():"TagIcon"]),t&&o?(e.style=e.style||{},e.style["--color"]=t.color(),r&&(e.style.color=t.color())):t||(e.className+=" untagged"),r?m("i",e):m("span",e)}var S=function(t){function e(){return t.apply(this,arguments)||this}return x(e,t),e.prototype.view=function(t){var e=this.attrs.model,n=e&&e.description(),r=L()("TagLinkButton hasIcon",{child:e.isChild()},this.attrs.className);return m(_(),{className:r,href:this.attrs.route,style:e?{"--color":e.color()}:void 0,title:n||void 0},I(e,{className:"Button-icon"}),m("span",{className:"Button-label"},e?e.name():app.translator.trans("flarum-tags.forum.index.untagged_link")))},e.initAttrs=function(e){t.initAttrs.call(this,e);var n=e.model;e.params.tags=n?n.slug():"untagged",e.route=app.route("tag",e.params)},e}(b());const P=flarum.core.compat["common/components/Page"];var C=n.n(P);const k=flarum.core.compat["common/components/LoadingIndicator"];var D=n.n(k);const A=flarum.core.compat["common/helpers/listItems"];var E=n.n(A);const O=flarum.core.compat["common/utils/ItemList"];var M=n.n(O);const R=flarum.core.compat["common/helpers/humanTime"];var j=n.n(R);const q=flarum.core.compat["common/helpers/textContrastClass"];var B=n.n(q);const H=flarum.core.compat["common/utils/extract"];
391var F=n.n(H);function G(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");var n=F()(e,"link"),r=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){var a=t.color();a&&(e.style["--tag-bg"]=a,e.className=L()(e.className,"colored",B()(a))),n&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(n?_():"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&I(t,{className:"TagLabel-icon"},{useColor:!1}),m("span",{className:"TagLabel-name"},r)))}function V(t){return t.slice(0).sort((function(t,e){var n=t.position(),r=e.position();if(null===n&&null===r)return e.discussionCount()-t.discussionCount();if(null===r)return-1;if(null===n)return 1;var a=t.parent(),o=e.parent();return a===o?n-r:a&&o?a.position()-o.position():a?a===e?1:a.position()-r:o?o===t?-1:n-o.position():0}))}var K=function(t){function e(){return t.apply(this,arguments)||this}x(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),app.history.push("tags",app.translator.trans("flarum-tags.forum.header.back_to_tags_tooltip")),this.tags=[];var r=app.preloadedApiDocument();r?this.tags=V(r.filter((function(t){return!t.isChild()}))):(this.loading=!0,app.tagList.load(["children","lastPostedDiscussion","parent"]).then((function(){n.tags=V(app.store.all("tags").filter((function(t){return!t.isChild()}))),n.loading=!1,m.redraw()})))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),app.setTitle(app.translator.trans("flarum-tags.forum.all_tags.meta_title_text")),app.setTitleCount(0)},n.view=function(){return m("div",{className:"TagsPage"},this.pageContent().toArray())},n.pageContent=function(){var t=new(M());return t.add("hero",this.hero(),100),t.add("main",m("div",{className:"container"},this.mainContent().toArray()),10),t},n.mainContent=function(){var t=new(M());return t.add("sidebar",this.sidebar(),100),t.add("content",this.content(),10),t},n.content=function(){return m("div",{className:"TagsPage-content sideNavOffset"},this.contentItems().toArray())},n.contentItems=function(){var t=new(M());if(this.loading)t.add("loading",m(D(),null));else{var e=this.tags.filter((function(t){return null!==t.position()})),n=this.tags.filter((function(t){return null===t.position()}));t.add("tagTiles",this.tagTileListView(e),100),n.length&&t.add("cloud",this.cloudView(n),10)}return t},n.hero=function(){return h().prototype.hero()},n.sidebar=function(){return m("nav",{className:"TagsPage-nav IndexPage-nav sideNav"},m("ul",null,E()(this.sidebarItems().toArray())))},n.sidebarItems=function(){return h().prototype.sidebarItems()},n.tagTileListView=function(t){return m("ul",{className:"TagTiles"},t.map(this.tagTileView.bind(this)))},n.tagTileView=function(t){var e=t.lastPostedDiscussion(),n=V(t.children()||[]);return m("li",{className:L()("TagTile",{colored:t.color()},B()(t.color())),style:{"--tag-bg":t.color()}},m(_(),{className:"TagTile-info",href:app.route.tag(t)},t.icon()&&I(t,{},{useColor:!1}),m("h3",{className:"TagTile-name"},t.name()),m("p",{className:"TagTile-description"},t.description()),!!n&&m("div",{className:"TagTile-children"},n.map((function(t){return[m(_(),{href:app.route.tag(t)},t.name())," "]})))),e?m(_(),{className:"TagTile-lastPostedDiscussion",href:app.route.discussion(e,e.lastPostNumber())},m("span",{className:"TagTile-lastPostedDiscussion-title"},e.title()),j()(e.lastPostedAt())):m("span",{className:"TagTile-lastPostedDiscussion"}))},n.cloudView=function(t){return m("div",{className:"TagCloud"},t.map((function(t){return[G(t,{link:!0})," "]})))},e}(C());function $(){(0,f.extend)(h().prototype,"navItems",(function(t){if(t.add("tags",m(b(),{icon:"fas fa-th-large",href:a().route("tags")},a().translator.trans("flarum-tags.forum.index.tags_link")),-10),!a().current.matches(K)){t.add("separator",m(v(),null),-12);var e=a().search.stickyParams(),n=a().store.all("tags"),r=this.currentTag(),o=function(n){var a=r===n;!a&&r&&(a=r.parent()===n),t.add("tag"+n.id(),m(S,{model:n,params:e,active:a},null==n?void 0:n.name()),-14)};V(n).filter((function(t){return null!==t.position()&&(!t.isChild()||r&&(t.parent()===r||t.parent()===r.parent()))}
391)).forEach(o);var s=n.filter((function(t){return null===t.position()})).sort((function(t,e){return e.discussionCount()-t.discussionCount()}));s.splice(0,3).forEach(o),s.length&&t.add("moreTags",m(b(),{href:a().route("tags")},a().translator.trans("flarum-tags.forum.index.more_link")),-16)}}))}const U=flarum.core.compat["forum/states/DiscussionListState"];var Y=n.n(U);const z=flarum.core.compat["forum/states/GlobalSearchState"];var J=n.n(z);const Q=flarum.core.compat["common/Component"];var W=n.n(Q),X=function(t){function e(){return t.apply(this,arguments)||this}return x(e,t),e.prototype.view=function(){var t,e=this.attrs.model,n=e.color();return m("header",{className:L()("Hero","TagHero",(t={"TagHero--colored":n},t[B()(n)]=n,t)),style:n?{"--hero-bg":n}:void 0},m("div",{className:"container"},m("div",{className:"containerNarrow"},m("h1",{className:"Hero-title"},e.icon()&&I(e,{},{useColor:!1})," ",e.name()),m("div",{className:"Hero-subtitle"},e.description()))))},e}(W()),Z=function(t){return a().store.all("tags").find((function(e){return 0===e.slug().localeCompare(t,void 0,{sensitivity:"base"})}))};function tt(){h().prototype.currentTag=function(){var t=this;if(this.currentActiveTag)return this.currentActiveTag;var e=a().search.params().tags,n=null;if(e&&(n=Z(e)),e&&!n||n&&!n.isChild()&&!n.children()){if(this.currentTagLoading)return;this.currentTagLoading=!0,a().store.find("tags",e,{include:"children,children.parent,parent,state"}).then((function(){t.currentActiveTag=Z(e),m.redraw()})).finally((function(){t.currentTagLoading=!1}))}return n?(this.currentActiveTag=n,this.currentActiveTag):void 0},(0,f.override)(h().prototype,"hero",(function(t){var e=this.currentTag();return e?m(X,{model:e}):t()})),(0,f.extend)(h().prototype,"view",(function(t){var e=this.currentTag();e&&(t.attrs.className+=" IndexPage--tag"+e.id())})),(0,f.extend)(h().prototype,"setTitle",(function(){var t=this.currentTag();t&&a().setTitle(t.name())})),(0,f.extend)(h().prototype,"sidebarItems",(function(t){var e=this.currentTag();if(e){var n=e.color(),r=e.canStartDiscussion()||!a().session.user,o=t.get("newDiscussion");n&&(o.attrs.className=L()([o.attrs.className,"Button--tagColored",B()(n)]),o.attrs.style={"--color":n}),o.attrs.disabled=!r,o.children=a().translator.trans(r?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button")}})),(0,f.extend)(J().prototype,"params",(function(t){t.tags=m.route.param("tags")})),(0,f.extend)(Y().prototype,"requestParams",(function(t){var e;if("string"==typeof t.include?t.include=[t.include]:null==(e=t.include)||e.push("tags","tags.parent"),this.params.tags){var n,r=null!=(n=t.filter)?n:{};r.tag=this.params.tags;var a=r.q;a&&(r.q=a+" tag:"+this.params.tags),t.filter=r}}))}const et=flarum.core.compat["forum/components/DiscussionListItem"];var nt=n.n(et);const rt=flarum.core.compat["forum/components/DiscussionHero"];var at=n.n(rt);function ot(t,e){if(null==t)return{};var n,r,a={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(a[n]=t[n]);return a}var st=["link"];function it(t,e){void 0===e&&(e={});var n=[],r=e,a=r.link,o=ot(r,st);return o.className=L()("TagsLabel",o.className),t?V(t).forEach((function(e){(e||1===t.length)&&n.push(G(e,{link:a}))})):n.push(G()),m("span",o,n)}function ct(){(0,f.extend)(nt().prototype,"infoItems",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",it(e),10)})),(0,f.extend)(at().prototype,"view",(function(t){var e=V(this.attrs.discussion.tags());if(e&&e.length){var n=e[0].color();n&&(t.attrs.style={"--hero-bg":n},t.attrs.className=L()(t.attrs.className,"DiscussionHero--colored",B()(n)))}})),(0,f.extend)(at().prototype,"items",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",it(e,{link:!0}),5)}))}const lt=flarum.core.compat["forum/utils/DiscussionControls"];var ut=n.n(lt);const mt=flarum.core.compat["common/components/Button"];var dt=n.n(mt);const ft=flarum.core.compat["forum/components/DiscussionPage"];var pt=n.n(ft);const ht=flarum.core.compat["common/utils/extractText"];var gt=n.n(ht);function vt(t){var e=app.store.all("tags");return t?e.filter((function(e){return e.canAddToDiscussion()||-1!==t.tags().indexOf(e)})):e.filter((function(t){return t.canStartDiscussion()}))}const yt=flarum.core.compat["common/helpers/highlight"];var bt=n.n(yt);const Tt=flarum.core.compat["common/utils/KeyboardNavigatable"];var xt=n.n(Tt);const wt=flarum.core.compat["common/components/Modal"];var _t=n.n(wt);const Nt=flarum.core.compat["common/utils/Stream"];var Lt=n.n(Nt),It=["className","isToggled"],St=function(t){function e(){return t.apply(this,arguments)||this}return x(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=e.isToggled,a=ot
391(e,It),o=r?"far fa-check-circle":"far fa-circle";return m(dt(),Object.assign({},a,{icon:o,className:L()([n,r&&"Button--toggled"])}),t.children)},e}(W()),Pt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=t.call.apply(t,[this].concat(r))||this).loading=!0,e.tags=void 0,e.selected=[],e.bypassReqs=!1,e.filter=Lt()(""),e.focused=!1,e.navigator=new(xt()),e.indexTag=void 0,e}x(e,t),e.initAttrs=function(e){var n,r,a,o,s,i,c,l,m,d,f,p,h,g,v,y,b,T;t.initAttrs.call(this,e),e.title||(e.title=gt()(u().translator.trans("flarum-tags.lib.tag_selection_modal.title"))),e.canSelect||(e.canSelect=function(){return!0}),null!=e.allowResetting||(e.allowResetting=!0),e.limits={min:{total:null!=(n=null==(r=e.limits)||null==(a=r.min)?void 0:a.total)?n:-1/0,primary:null!=(o=null==(s=e.limits)||null==(i=s.min)?void 0:i.primary)?o:-1/0,secondary:null!=(c=null==(l=e.limits)||null==(m=l.min)?void 0:m.secondary)?c:-1/0},max:{total:null!=(d=null==(f=e.limits)||null==(p=f.max)?void 0:p.total)?d:1/0,primary:null!=(h=null==(g=e.limits)||null==(v=g.max)?void 0:v.primary)?h:1/0,secondary:null!=(y=null==(b=e.limits)||null==(T=b.max)?void 0:T.secondary)?y:1/0}},function(t){if(t.min.primary>t.max.primary)throw new Error("The minimum number of primary tags allowed cannot be more than the maximum number of primary tags allowed.");if(t.min.secondary>t.max.secondary)throw new Error("The minimum number of secondary tags allowed cannot be more than the maximum number of secondary tags allowed.");if(t.min.total>t.max.primary+t.max.secondary)throw new Error("The minimum number of tags allowed cannot be more than the maximum number of primary and secondary tags allowed together.");if(t.max.total<t.min.primary+t.min.secondary)throw new Error("The maximum number of tags allowed cannot be less than the minimum number of primary and secondary tags allowed together.");if(t.min.total>t.max.total)throw new Error("The minimum number of tags allowed cannot be more than the maximum number of tags allowed.")}(e.limits)};var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.navigator.onUp((function(){return n.setIndex(n.getCurrentNumericIndex()-1,!0)})).onDown((function(){return n.setIndex(n.getCurrentNumericIndex()+1,!0)})).onSelect(this.select.bind(this)).onRemove((function(){return n.selected.splice(n.selected.length-1,1)})),u().tagList.load(["parent"]).then((function(t){n.loading=!1,n.attrs.selectableTags&&(t=n.attrs.selectableTags(t)),n.tags=V(t),n.attrs.selectedTags&&n.attrs.selectedTags.map(n.addTag.bind(n)),n.indexTag=t[0],m.redraw()}))},n.className=function(){return L()("TagSelectionModal",this.attrs.className)},n.title=function(){return this.attrs.title},n.content=function(){var t=this;if(this.loading||!this.tags)return m(D(),null);var e=this.filter().toLowerCase(),n=this.primaryCount(),r=this.secondaryCount(),a=this.getFilteredTags(),o=Math.max(gt()(this.getInstruction(n,r)).length,this.filter().length);return[m("div",{className:"Modal-body"},m("div",{className:"TagSelectionModal-form"},m("div",{className:"TagSelectionModal-form-input"},m("div",{className:"TagsInput FormControl "+(this.focused?"focus":""),onclick:function(){return t.$(".TagsInput input").focus()}},m("span",{className:"TagsInput-selected"},this.selected.map((function(e){return m("span",{className:"TagsInput-tag",onclick:function(){t.removeTag(e),t.onready()}},G(e))}))),m("input",{className:"FormControl",placeholder:gt()(this.getInstruction(n,r)),bidi:this.filter,style:{width:o+"ch"},onkeydown:this.navigator.navigate.bind(this.navigator),onfocus:function(){return t.focused=!0},onblur:function(){return t.focused=!1}}))),m("div",{className:"TagSelectionModal-form-submit App-primaryControl"},m(dt(),{type:"submit",className:"Button Button--primary",disabled:!this.meetsRequirements(n,r),icon:"fas fa-check"},u().translator.trans("flarum-tags.lib.tag_selection_modal.submit_button"))))),m("div",{className:"Modal-footer"},m("ul",{className:"TagSelectionModal-list SelectTagList"},a.map((function(n){return m("li",{"data-index":n.id(),className:L()({pinned:null!==n.position(),child:!!n.parent(),colored:!!n.color(),selected:t.selected.includes(n),active:t.indexTag===n}),style:{color:n.color()},onmouseover:function(){return t.indexTag=n},onclick:t.toggleTag.bind(t,n)},I(n),m("span",{className:"SelectTagListItem-name"},bt()(n.name(),e)),n.description()?m("span",{className:"SelectTagListItem-description"},n.description()):"")}))),this.attrs.limits.allowBypassing&&m("div",{className:"TagSelectionModal-control
391s"},m(St,{className:"Button",onclick:function(){return t.bypassReqs=!t.bypassReqs},isToggled:this.bypassReqs},u().translator.trans("flarum-tags.lib.tag_selection_modal.bypass_requirements"))))]},n.getFilteredTags=function(){var t=this,e=this.filter().toLowerCase(),n=this.primaryCount(),r=this.secondaryCount(),a=this.tags;return this.attrs.requireParentTag&&(a=a.filter((function(e){var n=e.parent();return null!==n&&(!1===n||t.selected.includes(n))}))),this.bypassReqs||(this.selected.length>=this.attrs.limits.max.total?a=a.filter((function(e){return t.selected.includes(e)})):(n>=this.attrs.limits.max.primary&&(a=a.filter((function(e){return!e.isPrimary()||t.selected.includes(e)}))),r>=this.attrs.limits.max.secondary&&(a=a.filter((function(e){return e.isPrimary()||t.selected.includes(e)}))))),e&&(a=a.filter((function(t){return t.name().toLowerCase().includes(e)}))),this.indexTag&&a.includes(this.indexTag)||(this.indexTag=a[0]),a},n.primaryCount=function(){return this.selected.filter((function(t){return t.isPrimary()})).length},n.secondaryCount=function(){return this.selected.filter((function(t){return!t.isPrimary()})).length},n.meetsRequirements=function(t,e){return!!(this.bypassReqs||this.attrs.allowResetting&&0===this.selected.length)||!(this.selected.length<this.attrs.limits.min.total)&&t>=this.attrs.limits.min.primary&&e>=this.attrs.limits.min.secondary},n.addTag=function(t){if(t&&this.attrs.canSelect(t)){if(this.attrs.onSelect&&this.attrs.onSelect(t,this.selected),this.attrs.requireParentTag){var e=t.parent();e&&!this.selected.includes(e)&&this.selected.push(e)}this.selected.includes(t)||this.selected.push(t)}},n.removeTag=function(t){var e=this.selected.indexOf(t);-1!==e&&(this.selected.splice(e,1),this.attrs.requireParentTag&&this.selected.filter((function(e){return e.parent()===t})).forEach(this.removeTag.bind(this)),this.attrs.onDeselect&&this.attrs.onDeselect(t,this.selected))},n.toggleTag=function(t){this.tags&&(this.selected.includes(t)?this.removeTag(t):this.addTag(t),this.filter()&&(this.filter(""),this.indexTag=this.tags[0]),this.onready())},n.getInstruction=function(t,e){if(this.bypassReqs)return"";if(t<this.attrs.limits.min.primary){var n=this.attrs.limits.min.primary-t;return gt()(u().translator.trans("flarum-tags.lib.tag_selection_modal.choose_primary_placeholder",{count:n}))}if(e<this.attrs.limits.min.secondary){var r=this.attrs.limits.min.secondary-e;return gt()(u().translator.trans("flarum-tags.lib.tag_selection_modal.choose_secondary_placeholder",{count:r}))}if(this.selected.length<this.attrs.limits.min.total){var a=this.attrs.limits.min.total-this.selected.length;return gt()(u().translator.trans("flarum-tags.lib.tag_selection_modal.choose_tags_placeholder",{count:a}))}return""},n.onsubmit=function(t){t.preventDefault(),this.attrs.onsubmit&&this.attrs.onsubmit(this.selected),this.hide()},n.select=function(t){t.metaKey||t.ctrlKey||this.indexTag&&this.selected.includes(this.indexTag)?this.selected.length&&this.$('button[type="submit"]').click():this.indexTag&&this.getItem(this.indexTag)[0].dispatchEvent(new Event("click"))},n.selectableItems=function(){return this.$(".TagSelectionModal-list > li")},n.getCurrentNumericIndex=function(){return this.indexTag?this.selectableItems().index(this.getItem(this.indexTag)):-1},n.getItem=function(t){return this.selectableItems().filter('[data-index="'+t.id()+'"]')},n.setIndex=function(t,e){var n=this.selectableItems(),r=n.parent();t<0?t=n.length-1:t>=n.length&&(t=0);var a=n.eq(t);if(this.indexTag=u().store.getById("tags",a.attr("data-index")),m.redraw(),e&&this.indexTag){var o,s=r.scrollTop(),i=r.offset().top,c=i+r.outerHeight(),l=a.offset().top,d=l+a.outerHeight();l<i?o=s-i+l-parseInt(r.css("padding-top"),10):d>c&&(o=s-c+d+parseInt(r.css("padding-bottom"),10)),void 0!==o&&r.stop(!0).animate({scrollTop:o},100)}},e}(_t()),Ct=function(t){function e(){return t.apply(this,arguments)||this}return x(e,t),e.initAttrs=function(e){var n;t.initAttrs.call(this,e);var r=e.discussion?a().translator.trans("flarum-tags.forum.choose_tags.edit_title",{title:m("em",null,e.discussion.title())}):a().translator.trans("flarum-tags.forum.choose_tags.title");e.className=L()(e.className,"TagDiscussionModal"),e.title=gt()(r),e.allowResetting=!!a().forum.attribute("canBypassTagCounts"),e.limits={allowBypassing:e.allowResetting,max:{primary:a().forum.attribute("maxPrimaryTags"),secondary:a().forum.attribute("maxSecondaryTags")},min:{primary:a().forum.attribute("minPrimaryTags"),secondary:a().forum.attribute("minSecondaryTags")}},e.requireParentTag=!0,e.selectableTags=function(){return vt(e.discussion)},null!=e.selectedTags||(e.selectedTags=(null==(n=e.discussion)?void 0:n.tags())||[]),e.canSelect=function(t){return t.canStartDiscussion()};var o=e.onsubmit||null;e.onsubmit=function(t){var n=e.discussion;n&&n.save({relationships:{tags:t}}).then((function(){a().current.matches(pt())&&a().current.get("stream").update(),m.redraw()})),o&&o(t)}},e}(Pt);function kt(){(0,f.extend)(ut(),"moderationControls",(function(t,e){e.canTag()&&t.add("tags",m(dt(),{icon:"fas fa-tag",oncl
391ick:function(){return app.modal.show(Ct,{discussion:e})}},app.translator.trans("flarum-tags.forum.discussion_controls.edit_tags_button")))}))}const Dt=flarum.core.compat["forum/components/DiscussionComposer"];var At=n.n(Dt);function Et(){(0,f.extend)(h().prototype,"newDiscussionAction",(function(t){var e=this.currentTag();if(e){var n=e.parent(),r=n?[n,e]:[e];t.then((function(t){return t.fields.tags=r}))}else app.composer.fields.tags=[]})),(0,f.extend)(At().prototype,"oninit",(function(){app.tagList.load(["parent"]).then((function(){return m.redraw()}))})),At().prototype.chooseTags=function(){var t=this;vt().length&&app.modal.show(Ct,{selectedTags:(this.composer.fields.tags||[]).slice(0),onsubmit:function(e){t.composer.fields.tags=e,t.$("textarea").focus()}})},(0,f.extend)(At().prototype,"headerItems",(function(t){var e=this.composer.fields.tags||[],n=vt();t.add("tags",m("a",{className:L()(["DiscussionComposer-changeTags",!n.length&&"disabled"]),onclick:this.chooseTags.bind(this)},e.length?it(e):m("span",{className:"TagLabel untagged"},app.translator.trans("flarum-tags.forum.composer_discussion.choose_tags_link"))),10)})),(0,f.override)(At().prototype,"onsubmit",(function(t){var e=this,n=this.composer.fields.tags||[],r=n.filter((function(t){return null!==t.position()&&!t.isChild()})),a=n.filter((function(t){return null===t.position()})),o=vt(),s=parseInt(app.forum.attribute("minPrimaryTags")),i=parseInt(app.forum.attribute("minSecondaryTags")),c=parseInt(app.forum.attribute("maxPrimaryTags")),l=parseInt(app.forum.attribute("maxSecondaryTags"));(!n.length&&0!==c&&0!==l||r.length<s||a.length<i)&&o.length?app.modal.show(Ct,{selectedTags:n,onsubmit:function(n){e.composer.fields.tags=n,t()}}):t()})),(0,f.extend)(At().prototype,"data",(function(t){t.relationships=t.relationships||{},t.relationships.tags=this.composer.fields.tags}))}const Ot=flarum.core.compat["common/extenders"];var Mt=n.n(Ot);const Rt=flarum.core.compat["common/models/Discussion"];var jt=n.n(Rt);const qt=flarum.core.compat["forum/components/EventPost"];var Bt=function(t){function e(){return t.apply(this,arguments)||this}x(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e);var n=e.post.content()[0],r=e.post.content()[1];function a(t,e){return t.filter((function(t){return-1===e.indexOf(t)})).map((function(t){return app.store.getById("tags",t)}))}e.tagsAdded=a(r,n),e.tagsRemoved=a(n,r)};var n=e.prototype;return n.icon=function(){return"fas fa-tag"},n.descriptionKey=function(){return this.attrs.tagsAdded.length?this.attrs.tagsRemoved.length?"flarum-tags.forum.post_stream.added_and_removed_tags_text":"flarum-tags.forum.post_stream.added_tags_text":"flarum-tags.forum.post_stream.removed_tags_text"},n.descriptionData=function(){var t={};return this.attrs.tagsAdded.length&&(t.tagsAdded=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:it(this.attrs.tagsAdded,{link:!0}),count:this.attrs.tagsAdded.length})),this.attrs.tagsRemoved.length&&(t.tagsRemoved=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:it(this.attrs.tagsRemoved,{link:!0}),count:this.attrs.tagsRemoved.length})),t},e}(n.n(qt)());const Ht=flarum.core.compat["common/utils/computed"];var Ft=n.n(Ht);const Gt=flarum.core.compat["common/Model"];var Vt=n.n(Gt),Kt=function(t){function e(){return t.apply(this,arguments)||this}x(e,t);var n=e.prototype;return n.name=function(){return Vt().attribute("name").call(this)},n.slug=function(){return Vt().attribute("slug").call(this)},n.description=function(){return Vt().attribute("description").call(this)},n.color=function(){return Vt().attribute("color").call(this)},n.backgroundUrl=function(){return Vt().attribute("backgroundUrl").call(this)},n.backgroundMode=function(){return Vt().attribute("backgroundMode").call(this)},n.icon=function(){return Vt().attribute("icon").call(this)},n.position=function(){return Vt().attribute("position").call(this)},n.parent=function(){return Vt().hasOne("parent").call(this)},n.children=function(){return Vt().hasMany("children").call(this)},n.defaultSort=function(){return Vt().attribute("defaultSort").call(this)},n.isChild=function(){return Vt().attribute("isChild").call(this)},n.isHidden=function(){return Vt().attribute("isHidden").call(this)},n.discussionCount=function(){return Vt().attribute("discussionCount").call(this)},n.lastPostedAt=function(){return Vt().attribute("lastPostedAt",Vt().transformDate).call(this)},n.lastPostedDiscussion=function(){return Vt().hasOne("lastPostedDiscussion").call(this)},n.isRestricted=function(){return Vt().attribute("isRestricted").call(this)},n.canStartDiscussion=function(){return Vt().attribute("canStartDiscussion").call(this)},n.canAddToDiscussion=function(){return Vt().attribute("canAddToDiscussion").call(this)},n.isPrimary=function(){return Ft()("position","parent",(function(t,e){return null!==t&&!1===e})).call(this)},e}(Vt());const $t=[(new(Mt().Store)).add("tags",Kt)],Ut=[].concat($t,[(new(Mt().Routes)).add("tags","/tags",K).add("tag","/t/:tags",h()).helper("tag",(function(t){return a().route("tag",{tags:t.slug()})})),(new(Mt().PostTypes)).add("discussionTagged",Bt),new(Mt().Model)(jt()).hasMany("tags").attribute("canTag")]),Yt={"tags/utils/sortTags":V,"tags/models/Tag":Kt,"tags/helpers/tagsLabel":it,"tags/helpers/tagIcon":I,"tags/helpers/tagLabel":G,"tags/components/TagSelectionModal":Pt,"tags/states/TagListState":d},zt=Object.assign(Yt,{"tags/addTagFilter":tt,"tags/addTagControl":kt,"tags/components/TagHero":X,"tags/components/TagDiscussionModal":Ct,"tags/components/TagsPage":K,"tags/components/DiscussionTaggedPost":Bt,"tags/components/TagLinkButton":S,"tags/addTagList":$,"tags/addTagLabels":ct,"tags/addTagComposer":Et,"tags/utils/getSelectableTags":vt}),Jt=flarum.core;
vendor: 4,859 bytes, line 391
391a().initializers.add("flarum-tags",(function(){a().tagList=new d,$(),tt(),ct(),kt(),Et()})),Object.assign(Jt.compat,zt)},440:(t,e,n)=>{var r=n(75).default;function a(){"use strict";t.exports=a=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,o=n.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function m(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{m({},"")}catch(t){m=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var a=e&&e.prototype instanceof h?e:h,o=Object.create(a.prototype),i=new P(r||[]);return s(o,"_invoke",{value:N(t,n,i)}),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var p={};function h(){}function g(){}function v(){}var y={};m(y,c,(function(){return this}));var b=Object.getPrototypeOf,T=b&&b(b(C([])));T&&T!==n&&o.call(T,c)&&(y=T);var x=v.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){m(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function n(a,s,i,c){var l=f(t[a],t,s);if("throw"!==l.type){var u=l.arg,m=u.value;return m&&"object"==r(m)&&o.call(m,"__await")?e.resolve(m.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):e.resolve(m).then((function(t){u.value=t,i(u)}),(function(t){return n("throw",t,i,c)}))}c(l.arg)}var a;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,a){n(t,r,e,a)}))}return a=a?a.then(o,o):o()}})}function N(t,e,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return{value:void 0,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var i=L(s,n);if(i){if(i===p)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=f(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function L(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var a=r.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function I(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function C(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:k}}function k(){return{value:void 0,done:!0}}return g.prototype=v,s(x,"constructor",{value:v,configurable:!0}),s(v,"constructor",{value:g,configurable:!0}),g.displayName=m(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,m(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},w(_.prototype),m(_.prototype,l,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var s=new _(d(t,n,r,a),o);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},w(x),m(x,u,"Generator"),m(x,c,(function(){return this})),m(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=C,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
391h(S),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 e=this;function n(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var i=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(i&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=e,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(s)},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),p},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),S(n),p}},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 a=r.arg;S(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},75:t=>{function e(n){return t.exports=e="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},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},507:(t,e,n)=>{var r=n(440)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},e={};function n(r){var a=e[r];if(void 0!==a)return a.exports;var o=e[r]={exports:{}};return t[r](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.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:()=>a.l});var t=n(810),e={};for(const n in t)"default"!==n&&(e[n]=()=>t[n]);n.d(r,e);var a=n(115)})(),module.exports=r})();
392
393
394flarum.extensions['flarum-tags']=module.exports;
395
396var module={};
397
398(()=>{var e={116:function(e,t){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};function n(e,t){if(!t)return"";var o="; "+e;return!0===t?o:o+"="+t}function r(e,t,o){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return n("Expires",e.expires?e.expires.toUTCString():"")+n("Domain",e.domain)+n("Path",e.path)+n("Secure",e.secure)+n("SameSite",e.sameSite)}(o)}function i(e){for(var t={},o=e?e.split("; "):[],n=/(%[\dA-F]{2})+/gi,r=0;r<o.length;r++){var i=o[r].split("="),s=i.slice(1).join("=");'"'===s.charAt(0)&&(s=s.slice(1,-1));try{t[i[0].replace(n,decodeURIComponent)]=s.replace(n,decodeURIComponent)}catch(e){}}return t}function s(){return i(document.cookie)}
398function c(e,t,n){document.cookie=r(e,t,o({path:"/"},n))}t.__esModule=!0,t.encode=r,t.parse=i,t.getAll=s,t.get=function(e){return s()[e]},t.set=c,t.remove=function(e,t){c(e,"",o(o({},t),{expires:-1}))}}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{Themes:()=>c,getTheme:()=>T,perDeviceSetting:()=>e,setSelectedTheme:()=>t,switchTheme:()=>r});var e={};o.r(e),o.d(e,{KEY:()=>p,get:()=>l,remove:()=>g,set:()=>h});var t={};o.r(t),o.d(t,{default:()=>S,getUrls:()=>b,setStyle:()=>N,setTheme:()=>_,setThemeFromID:()=>A});var r={};o.r(r),o.d(r,{getIsLight:()=>K,switchTheme:()=>q});const i=flarum.core.compat["common/app"];var s=o.n(i);const c={AUTO:0,LIGHT:1,DARK:2,DEFAULT:function(){return s().forum.attribute("fof-nightmode.default_theme")||0}},a=flarum.core.compat["common/extend"],u=flarum.core.compat["common/components/Page"];var f=o.n(u),d=o(116),p="flarum_nightmode",l=function(){var e=d.get(p);return e||"0"===e?Number(e):c.DEFAULT()},h=function(e){return d.set(p,e,{sameSite:"lax",secure:"https:"===location.protocol})},g=function(){return d.remove(p)};function v(){var e=Array.from(new Set(Object.values(c))),t=l();isNaN(t)?y("Theme is not a valid integer! Resetting..."):e.includes(t)||y("Theme is out of bounds! Resetting...")}function y(e){console.warn(e),h(c.DEFAULT())}function T(){var e,t=s().session.user,o=!t||!!t.preferences().fofNightMode_perDevice,n=t&&t.preferences().fofNightMode;return o?e=l():"number"==typeof n&&-1!==n&&(e=n),"number"==typeof e?e:c.DEFAULT()}const S=function(){(0,a.extend)(f().prototype,"oninit",_),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",_)};function _(){var e,t=s().session.user,o=null==(e=s().session.user)?void 0:e.preferences().fofNightMode_perDevice;t&&!o||v(),o&&v(),A(T())}function b(){return{day:s().data["fof-nightmode.assets.day"],night:s().data["fof-nightmode.assets.night"]}}function A(e){e===c.DARK?N("night"):e===c.LIGHT?N("day"):N(window.matchMedia("(prefers-color-scheme: dark)").matches?"night":"day")}function N(e){var t=document.querySelector("link.nightmode-light[rel=stylesheet]"),o=document.querySelector("link.nightmode-dark[rel=stylesheet]");e:if(t&&o){if(T()===c.AUTO)break e;var n=document.createElement("link");"onload"in n?n.onload=function(){t.remove(),o.remove()}:(t.remove(),o.remove()),n.rel="stylesheet",n.className="nightmode",n.href=b()[e],document.head.append(n)}else{var r=t||o||document.querySelector("link.nightmode[rel=stylesheet]"),i=b()[e];i!==r.href&&(r.href=i,r.className="nightmode")}var s=new CustomEvent("fofnightmodechange",{detail:e});document.dispatchEvent(s)}const D=flarum.core.compat["forum/app"];var U=o.n(D);const w=flarum.core.compat["forum/components/SettingsPage"];var M=o.n(w);const x=flarum.core.compat["forum/components/SessionDropdown"];var O=o.n(x);const I=flarum.core.compat["forum/components/HeaderSecondary"];var k=o.n(I);const L=flarum.core.compat["common/components/Button"];var E=o.n(L);const R=flarum.core.compat["common/components/LoadingIndicator"];var C=o.n(R);const P=flarum.core.compat["common/components/Select"];var F=o.n(P);const j=flarum.core.compat["common/components/FieldSet"];var H=o.n(j);const B=flarum.core.compat["common/components/Switch"];var G=o.n(B);function K(e){return e===c.LIGHT||e===c.AUTO&&!window.matchMedia("(prefers-color-scheme: dark)").matches}function q(){var e,t=T(),o=K(t),n=U().session.user;if(n){var r=o?c.DARK:c.LIGHT;if(n.preferences().fofNightMode_perDevice)return h(r),void _();n.savePreferences({fofNightMode:r}).then((function(){_()}))}else{var i=(e=t)===c.AUTO?c.LIGHT:e===c.LIGHT?c.DARK:c.AUTO;h(i),_()}}var z=function(e){return U().translator.trans("fof-nightmode.forum.user.settings."+e)};
398U().initializers.add("fof-nightmode",(function(){(0,a.extend)(M().prototype,"settingsItems",(function(e){var t=U().session.user,o=!!t.preferences().fofNightMode_perDevice;o&&v();var n=!window.matchMedia("not all and (prefers-color-scheme), (prefers-color-scheme)").matches,r=T(),i={0:z("options.auto"),1:z("options.day"),2:z("options.night")};n&&(delete i[0],r===c.AUTO&&(r=U().forum.attribute("fofNightMode_autoUnsupportedFallback"))),e.add("fof-nightmode",H().component({label:z("heading"),className:"Settings-theme"},[m("p",{className:"description"},z("description")),m("p",{className:"description"},z("description2")),n?m("p",{class:"description NightMode-autoUnsupported"},z("auto_unsupported")):null,G().component({className:"Settings-theme--per_device_cb",state:o,onchange:function(e){e?h(r):g(),t.savePreferences({fofNightMode_perDevice:e}).then((function(){_()}))}},z("device_specific_setting_checkbox")),F().component({value:r,className:"Settings-theme--input",onchange:function(e){if(o)return h(e),void _();t.savePreferences({fofNightMode:e}).then((function(){m.redraw(),_()}))},options:i}),m("p",{className:"Settings-theme--selection_description"},r===c.AUTO?z("option_descriptions.auto"):r===c.LIGHT?z("option_descriptions.day"):r===c.DARK?z("option_descriptions.night"):C().component())]))})),(0,a.extend)(k().prototype,"items",(function(e){if(!U().session.user||U().forum.attribute("fofNightMode.showThemeToggleOnHeaderAlways")){var t=T(),o=K(t);e.add("nightmode",m(E(),{className:"Button Button--flat",onclick:function(){q()},icon:t===c.AUTO?"fas fa-adjust":"far fa-"+(o?"sun":"moon")},U().translator.trans("fof-nightmode.forum.header.nightmode_button")),15)}})),(0,a.extend)(O().prototype,"items",(function(e){if(U().session.user){var t=K(T());e.add(t?"nightmode":"daymode",E().component({icon:"far fa-"+(t?"moon":"sun"),onclick:function(){q()}},U().translator.trans("fof-nightmode.forum."+(t?"night":"day"))),-1)}})),S()}))})(),module.exports=n})();
399
400
401flarum.extensions['fof-nightmode']=module.exports;
402
403var module={};
404
405(()=>{var t={757:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",s="second",r="minute",i="hour",a="day",o="week",u="month",c="quarter",l="year",d="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|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,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var s=String(t);return!s||s.length>=e?t:""+Array(e+1-s.length).join(n)+t},$={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),s=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+v(s,2,"0")+":"+v(r,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var s=12*(n.year()-e.year())+(n.month()-e.month()),r=e.clone().add(s,u),i=n-r<0,a=e.clone().add(s+(i?-1:1),u);return+(-(s+(n-r)/(i?r-a:a-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:l,w:o,d:a,D:d,h:i,m:r,s,ms:n,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",y={};y[g]=p;var M=function(t){return t instanceof D},_=function t(e,n,s){var r;if(!e)return g;if("string"==typeof e){var i=e.toLowerCase();y[i]&&(r=i),n&&(y[i]=n,r=i);var a=e.split("-");if(!r&&a.length>1)return t(a[0])}else{var o=e.name;y[o]=e,r=o}return!s&&r&&(g=r),r||!s&&g},b=function(t,e){if(M(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new D(n)},S=$;S.l=_,S.i=M,S.w=function(t,e){return b(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var D=function(){function p(t){this.$L=_(t.locale,null,!0),this.parse(t)}var v=p.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(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var s=e.match(m);if(s){var r=s[2]-1||0,i=(s[7]||"0").substring(0,3);return n?new Date(Date.UTC(s[1],r,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)):new Date(s[1],r,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)}}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 S},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(t,e){var n=b(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return b(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<b(t)},v.$g=function(t,e,n){return S.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,c=!!S.u(e)||e,f=S.p(t),m=function(t,e){var s=S.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return c?s:s.endOf(a)},h=function(t,e){return S.w(n.toDate()[t].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},p=this.$W,v=this.$M,$=this.$D,g="set"+(this.$u?"UTC":"");switch(f){case l:return c?m(1,0):m(31,11);case u:return c?m(1,v):m(0,v+1);
vendor: 5,124 bytes, line 405
405case o:var y=this.$locale().weekStart||0,M=(p<y?p+7:p)-y;return m(c?$-M:$+(6-M),v);case a:case d:return h(g+"Hours",0);case i:return h(g+"Minutes",1);case r:return h(g+"Seconds",2);case s:return h(g+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var o,c=S.p(t),f="set"+(this.$u?"UTC":""),m=(o={},o[a]=f+"Date",o[d]=f+"Date",o[u]=f+"Month",o[l]=f+"FullYear",o[i]=f+"Hours",o[r]=f+"Minutes",o[s]=f+"Seconds",o[n]=f+"Milliseconds",o)[c],h=c===a?this.$D+(e-this.$W):e;if(c===u||c===l){var p=this.clone().set(d,1);p.$d[m](h),p.init(),this.$d=p.set(d,Math.min(this.$D,p.daysInMonth())).$d}else m&&this.$d[m](h);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[S.p(t)]()},v.add=function(n,c){var d,f=this;n=Number(n);var m=S.p(c),h=function(t){var e=b(f);return S.w(e.date(e.date()+Math.round(t*n)),f)};if(m===u)return this.set(u,this.$M+n);if(m===l)return this.set(l,this.$y+n);if(m===a)return h(1);if(m===o)return h(7);var p=(d={},d[r]=t,d[i]=e,d[s]=1e3,d)[m]||1,v=this.$d.getTime()+n*p;return S.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 s=t||"YYYY-MM-DDTHH:mm:ssZ",r=S.z(this),i=this.$H,a=this.$m,o=this.$M,u=n.weekdays,c=n.months,l=function(t,n,r,i){return t&&(t[n]||t(e,s))||r[n].slice(0,i)},d=function(t){return S.s(i%12||12,t,"0")},m=n.meridiem||function(t,e,n){var s=t<12?"AM":"PM";return n?s.toLowerCase():s},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:o+1,MM:S.s(o+1,2,"0"),MMM:l(n.monthsShort,o,c,3),MMMM:l(c,o),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:S.s(i,2,"0"),h:d(1),hh:d(2),a:m(i,a,!0),A:m(i,a,!1),m:String(a),mm:S.s(a,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:r};return s.replace(h,(function(t,e){return e||p[t]||r.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,d,f){var m,h=S.p(d),p=b(n),v=(p.utcOffset()-this.utcOffset())*t,$=this-p,g=S.m(this,p);return g=(m={},m[l]=g/12,m[u]=g,m[c]=g/3,m[o]=($-v)/6048e5,m[a]=($-v)/864e5,m[i]=$/e,m[r]=$/t,m[s]=$/1e3,m)[h]||$,f?g:S.a(g)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return y[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),s=_(t,e,!0);return s&&(n.$L=s),n},v.clone=function(){return S.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()},p}(),w=D.prototype;return b.prototype=w,[["$ms",n],["$s",s],["$m",r],["$H",i],["$W",a],["$M",u],["$y",l],["$D",d]].forEach((function(t){w[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),b.extend=function(t,e){return t.$i||(t(e,D,b),t.$i=!0),b},b.locale=_,b.isDayjs=M,b.unix=function(t){return b(1e3*t)},b.en=y[g],b.Ls=y,b.p={},b}()},221:function(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(s,r,i){var a=r.prototype;i.utc=function(t){return new r({date:t,utc:!0,args:arguments})},a.utc=function(e){var n=i(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var o=a.parse;a.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var u=a.init;a.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else u.call(this)};var c=a.utcOffset;a.utcOffset=function(s,r){var i=this.$utils().u;if(i(s))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(e);if(!s)return null;var r=(""+s[0]).match(n)||["-",0,0],i=r[0],a=60*+r[1]+ +r[2];return 0===a?0:"+"===i?a:-a}(s),null===s))return this;var a=Math.abs(s)<=16?60*s:s,o=this;if(r)return o.$offset=a,o.$u=0===s,o;if(0!==s){var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(a+u,t)).$offset=a,o.$x.$localOffset=u}else o=this.utc();return o};var l=a.format;a.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},a.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(t){return"s"===t&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=a.diff;a.diff=function(t,e,n){if(t&&this.$u===t.$u)return f.call(this,t,e,n);
405var s=this.local(),r=i(t).local();return f.call(s,r,e,n)}}}()}},e={};function n(s){var r=e[s];if(void 0!==r)return r.exports;var i=e[s]={exports:{}};return t[s].call(i.exports,i,i.exports,n),i.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 s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},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 s={};(()=>{"use strict";n.r(s),n.d(s,{extend:()=>Q});const t=flarum.core.compat.extend,e=flarum.core.compat.app;var r=n.n(e);const i=flarum.core.compat["utils/UserControls"];var a=n.n(i);const o=flarum.core.compat["components/Button"];var u=n.n(o);const c=flarum.core.compat["components/Badge"];var l=n.n(c);const d=flarum.core.compat["models/User"];var f=n.n(d);function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function p(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,h(t,e)}const v=flarum.core.compat["forum/app"];var $=n.n(v);const g=flarum.core.compat["components/Modal"];var y=n.n(g);const M=flarum.core.compat["utils/Stream"];var _=n.n(M);const b=flarum.core.compat["utils/withAttr"];var S=n.n(b);const D=flarum.core.compat["common/utils/ItemList"];var w=n.n(D),O=n(757),x=n.n(O),T=n(221),U=n.n(T);function N(t){return x().utc(t).isSame(x().utc("2038-01-01"))}x().extend(U());var C=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e);var n=this.attrs.user.suspendedUntil(),s=this.attrs.user.suspendReason(),r=this.attrs.user.suspendMessage(),i=null;new Date>n&&(n=null),n&&(i=9999===n.getFullYear()?"indefinitely":"limited"),this.status=_()(i),this.reason=_()(s),this.message=_()(r),this.daysRemaining=_()("limited"===i&&1-dayjs().diff(n,"days"))},n.className=function(){return"SuspendUserModal Modal--medium"},n.title=function(){return $().translator.trans("flarum-suspend.forum.suspend_user.title",{user:this.attrs.user})},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},m("div",{className:"Form-group"},m("label",null,$().translator.trans("flarum-suspend.forum.suspend_user.status_heading")),m("div",null,this.formItems().toArray())),m("div",{className:"Form-group"},m(u(),{className:"Button Button--primary",loading:this.loading,type:"submit"},$().translator.trans("flarum-suspend.forum.suspend_user.submit_button")))))},n.radioItems=function(){var t=this,e=new(w());return e.add("not-suspended",m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:!this.status(),value:"",onclick:S()("value",this.status)}),$().translator.trans("flarum-suspend.forum.suspend_user.not_suspended_label")),100),e.add("indefinitely",m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:"indefinitely"===this.status(),value:"indefinitely",onclick:S()("value",this.status)}),$().translator.trans("flarum-suspend.forum.suspend_user.indefinitely_label")),90),e.add("time-suspension",m("label",{className:"checkbox SuspendUserModal-days"},m("input",{type:"radio",name:"status",checked:"limited"===this.status(),value:"limited",onclick:function(e){t.status(e.target.value),m.redraw.sync(),t.$(".SuspendUserModal-days-input input").select(),e.redraw=!1}}),$().translator.trans("flarum-suspend.forum.suspend_user.limited_time_label"),"limited"===this.status()&&m("div",{className:"SuspendUserModal-days-input"},m("input",{type:"number",min:"0",value:this.daysRemaining(),oninput:S()("value",this.daysRemaining),className:"FormControl"}),$().translator.trans("flarum-suspend.forum.suspend_user.limited_time_days_text"))),80),e},n.formItems=function(){var t=new(w());return t.add("radioItems",m("div",{className:"Form-group"},this.radioItems().toArray()),100),t.add("reason",m("div",{className:"Form-group"},m("label",null,$().translator.trans("flarum-suspend.forum.suspend_user.reason"),m("textarea",{className:"FormControl",bidi:this.reason,placeholder:$().translator.trans("flarum-suspend.forum.suspend_user.placeholder_optional"),rows:"2"}))),90),t.add("message",m("div",{className:"Form-group"},m("label",null,$().translator.trans("flarum-suspend.forum.suspend_user.display_message"),m("textarea",{className:"FormControl",bidi:this.message,placeholder:$().translator.trans("flarum-suspend.forum.suspend_user.placeholder_optional"),rows:"2"}))),80),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=null;switch(this.status()){case"indefinitely":n=new Date("2038-01-01");break;case"limited":n=dayjs().add(this.daysRemaining(),"days").toDate()}this.attrs.user.save({suspendedUntil:n,suspendReason:this.reason(),suspendMessage:this.message()}).then((function(){return e.hide()}),this.loaded.bind(this))},e}(y());const k=flarum.core.compat["components/Notification"];var Y=n.n(k),I=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-ban"},n.href=function(){return $().route.user(this.attrs.notification.subject())},n.content=function(){var t=this.attrs.notification,e=t.content(),n=dayjs(e).from(t.createdAt(),!0);return N(e)?$().translator.trans("flarum-suspend.forum.notifications.user_suspended_indefinite_text"):$().translator.trans("flarum-suspend.forum.notifications.user_suspended_text",{timeReadable:n})},e}(Y()),F=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-ban"},n.href=function(){return $().route.user(this.attrs.notification.subject())},n.content=function(){return this.attrs.notification,$().translator.trans("flarum-suspend.forum.notifications.user_unsuspended_text")},e}(Y());const H=flarum.core.compat["common/components/Modal"];var j=n.n(H);const L=flarum.core.compat["common/components/Button"];var A=n.n(L);const W=flarum.core.compat["common/helpers/fullTime"];var B=n.n(W),R=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.message=this.attrs.message,this.until=this.attrs.until},n.className=function(){return"SuspensionInfoModal Modal"},n.title=function(){return $().translator.trans("flarum-suspend.forum.suspension_info.title")},n.content=function(){var t=N(new Date(this.until))?$().translator.trans("flarum-suspend.forum.suspension_info.indefinite"):$().translator.trans("flarum-suspend.forum.suspension_info.limited",{date:B()(this.until)});return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},this.message),m("p",{className:"helpText"},t),m("div",{className:"Form-group"}
405,m(A(),{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},$().translator.trans("flarum-suspend.forum.suspension_info.dismiss_button")))))},n.hide=function(){localStorage.setItem("flarum-suspend.acknowledge-suspension",this.attrs.until.getTime()),this.attrs.state.close()},e}(j());function P(){return setTimeout((function(){if($().session.user){var t=$().session.user.suspendMessage(),e=$().session.user.suspendedUntil(),n=t&&e&&new Date<e,s=localStorage.getItem("flarum-suspend.acknowledge-suspension")===(null==e?void 0:e.getTime().toString());n&&!s?$().modal.show(R,{message:t,until:e}):localStorage.getItem("flarum-suspend.acknowledge-suspension")&&localStorage.removeItem("flarum-suspend.acknowledge-suspension")}}),0)}const z=flarum.core.compat["common/extenders"];var Z=n.n(z);const J=flarum.core.compat["common/models/User"];var V=n.n(J);const q=flarum.core.compat["common/Model"];var E=n.n(q);const Q=[new(Z().Model)(V()).attribute("canSuspend").attribute("suspendedUntil",E().transformDate).attribute("suspendReason").attribute("suspendMessage")],G={"suspend/components/suspendUserModal":C,"suspend/components/suspensionInfoModal":R,"suspend/components/UserSuspendedNotification":I,"suspend/components/UserUnsuspendedNotification":F,"suspend/checkForSuspension":P},K=flarum.core;r().initializers.add("flarum-suspend",(function(){r().notificationComponents.userSuspended=I,r().notificationComponents.userUnsuspended=F,(0,t.extend)(a(),"moderationControls",(function(t,e){e.canSuspend()&&t.add("suspend",m(u(),{icon:"fas fa-ban",onclick:function(){return r().modal.show(C,{user:e})}},r().translator.trans("flarum-suspend.forum.user_controls.suspend_button")))})),(0,t.extend)(f().prototype,"badges",(function(t){var e=this.suspendedUntil();new Date<e&&t.add("suspended",m(l(),{icon:"fas fa-ban",type:"suspended",label:r().translator.trans("flarum-suspend.forum.user_badge.suspended_tooltip")}),100)})),P()})),Object.assign(K.compat,G)})(),module.exports=s})();
406
407
408flarum.extensions['flarum-suspend']=module.exports;
409
410var module={};
411
412(()=>{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var s in n)o.o(n,s)&&!o.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:n[s]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>V});const n=flarum.core.compat["common/extend"],s=flarum.core.compat["forum/app"];var r=o.n(s);flarum.core.compat["common/Model"];const i=flarum.core.compat["common/models/Discussion"];var a=o.n(i);const e=flarum.core.compat["forum/components/NotificationGrid"];var c=o.n(e);const l=flarum.core.compat["common/components/Badge"];var u=o.n(l);const f=flarum.core.compat["common/components/Button"];var p=o.n(f);const b=flarum.core.compat["forum/components/DiscussionPage"];var d=o.n(b);const _=flarum.core.compat["forum/utils/DiscussionControls"];var g=o.n(_);function w(o,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,t){return o.__proto__=t,o},w(o,t)}function y(o,t){o.prototype=Object.create(t.prototype),o.prototype.constructor=o,w(o,t)}const v=flarum.core.compat["common/components/Dropdown"];var h=o.n(v);const x=flarum.core.compat["common/components/Tooltip"];var S=o.n(x);const P=flarum.core.compat["common/helpers/icon"];var N=o.n(P);const M=flarum.core.compat["common/utils/extractText"];var O=o.n(M);const k=flarum.core.compat["common/utils/classList"];var B=o.n(k);const j=flarum.core.compat["common/Component"];var D=function(o){function t(){return o.apply(this,arguments)||this}return y(t,o),t.prototype.view=function(){return m("button",{className:"SubscriptionMenuItem hasIcon",onclick:this.attrs.onclick},this.attrs.active&&N()("fas fa-check",{className:"Button-icon"}),m("span",{className:"SubscriptionMenuItem-label"},N()(this.attrs.icon,{className:"Button-icon"}),m("strong",null,this.attrs.label),m("span",{className:"SubscriptionMenuItem-description"},this.attrs.description)))},t}(o.n(j)()),I=function(o){function t(){return o.apply(this,arguments)||this}y(t,o);var n=t.prototype;return n.oninit=function(t){o.prototype.oninit.call(this,t),this.options=[{subscription:null,icon:"far fa-star",label:r().translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),description:r().translator.trans("flarum-subscriptions.forum.sub_controls.not_following_text")},{subscription:"follow",icon:"fas fa-star",label:r().translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),description:r().translator.trans("flarum-subscriptions.forum.sub_controls.following_text")},{subscription:"ignore",icon:"far fa-eye-slash",label:r().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_button"),description:r().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_text")}]},n.view=function(){var o=this,t=this.attrs.discussion,n=t.subscription(),s=r().translator.trans("flarum-subscriptions.forum.sub_controls.follow_button"),i="far fa-star",a="SubscriptionMenu-button--"+n;switch(n){case"follow":s=r().translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),i="fas fa-star";break;case"ignore":s=r().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_button"),i="far fa-eye-slash"}var e=r().session.user.preferences(),c=e.notify_newPost_email,l=e.notify_newPost_alert,u=O()(r().translator.trans(c?"flarum-subscriptions.forum.sub_controls.notify_email_tooltip":"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip")),f=(c||l)&&null===n,b=m(p(),{className:B()("Button","SubscriptionMenu-button",a),icon:i,onclick:this.saveSubscription.bind(this,t,-1!==["follow","ignore"].indexOf(n)?null:"follow")},s);return m("div",{className:"Dropdown ButtonGroup SubscriptionMenu"},f?m(S(),{text:u,position:"bottom"},b):b,m("button",{className:B()("Dropdown-toggle Button Button--icon",a),"data-toggle":"dropdown"},N()("fas fa-caret-down",{className:"Button-icon"})),m("ul",{className:"Dropdown-menu dropdown-menu Dropdown-menu--right"},this.options.map((function(s){return m("li",null,m(D,Object.assign({},s,{onclick:o.saveSubscription.bind(o,t,s.subscription),active:n===s.subscription})))}))))},n.saveSubscription=function(o,t){o.save({subscription:t}),this.$(".SubscriptionMenu-button").tooltip("hide")},t}(h());const A=flarum.core.compat["common/components/LinkButton"];var R=o.n(A);const T=flarum.core.compat["forum/components/IndexPage"];var L=o.n(T);const C=flarum.core.compat["forum/states/DiscussionListState"];var q=o.n(C);const F=flarum.core.compat["forum/states/GlobalSearchState"];var G=o.n(F);const z=flarum.core.compat["forum/components/SettingsPage"];var U=o.n(z);const $=flarum.core.compat["common/components/Switch"];var E=o.n($);const H=flarum.core.compat["forum/components/Notification"];var J=function(o){function t(){return o.apply(this,arguments)||this}y(t,o);var n=t.prototype;return n.icon=function(){return"fas fa-star"},n.href=function(){var o=this.attrs.notification,t=o.subject(),n=o.content()||{};
412return r().route.discussion(t,n.postNumber)},n.content=function(){return r().translator.trans("flarum-subscriptions.forum.notifications.new_post_text",{user:this.attrs.notification.fromUser()})},t}(o.n(H)());const K=flarum.core.compat["common/extenders"];var Q=o.n(K);const V=[(new(Q().Routes)).add("following","/following",L()),new(Q().Model)(a()).attribute("subscription")];r().initializers.add("subscriptions",(function(){r().notificationComponents.newPost=J,(0,n.extend)(a().prototype,"badges",(function(o){var t;switch(this.subscription()){case"follow":t=m(u(),{label:r().translator.trans("flarum-subscriptions.forum.badge.following_tooltip"),icon:"fas fa-star",type:"following"});break;case"ignore":t=m(u(),{label:r().translator.trans("flarum-subscriptions.forum.badge.ignoring_tooltip"),icon:"far fa-eye-slash",type:"ignoring"})}t&&o.add("subscription",t)})),(0,n.extend)(g(),"userControls",(function(o,t,n){if(r().session.user&&!(n instanceof d())){var s={none:{label:r().translator.trans("flarum-subscriptions.forum.discussion_controls.follow_button"),icon:"fas fa-star",save:"follow"},follow:{label:r().translator.trans("flarum-subscriptions.forum.discussion_controls.unfollow_button"),icon:"far fa-star",save:null},ignore:{label:r().translator.trans("flarum-subscriptions.forum.discussion_controls.unignore_button"),icon:"fas fa-eye",save:null}},i=t.subscription()||"none";o.add("subscription",m(p(),{icon:s[i].icon,onclick:t.save.bind(t,{subscription:s[i].save})},s[i].label))}})),(0,n.extend)(d().prototype,"sidebarItems",(function(o){if(r().session.user){var t=this.discussion;o.add("subscription",m(I,{discussion:t}),80)}})),(0,n.extend)(L().prototype,"navItems",(function(o){if(r().session.user){var t=r().search.stickyParams();o.add("following",m(R(),{href:r().route("following",t),icon:"fas fa-star"},r().translator.trans("flarum-subscriptions.forum.index.following_link")),50)}})),(0,n.extend)(L().prototype,"setTitle",(function(){"following"===r().current.get("routeName")&&r().setTitle(r().translator.trans("flarum-subscriptions.forum.following.meta_title_text"))})),(0,n.extend)(G().prototype,"params",(function(o){o.onFollowing="following"===r().current.get("routeName")}
412)),(0,n.extend)(q().prototype,"requestParams",(function(o){this.params.onFollowing&&(o.filter||(o.filter={}),o.filter.q?o.filter.q+=" is:following":o.filter.subscription="following")})),(0,n.extend)(U().prototype,"notificationsItems",(function(o){var t,n=this;o.add("followAfterReply",m(E(),{state:this.user.preferences().followAfterReply,onchange:function(o){n.followAfterReplyLoading=!0,n.user.savePreferences({followAfterReply:o}).then((function(){n.followAfterReplyLoading=!1,m.redraw()}))},loading:this.followAfterReplyLoading},r().translator.trans("flarum-subscriptions.forum.settings.follow_after_reply_label"))),o.add("notifyForAllPosts",m(E(),{id:"flarum_subscriptions__notify_for_all_posts",state:!(null==(t=this.user.preferences())||!t["flarum-subscriptions.notify_for_all_posts"]),onchange:function(o){n.user.savePreferences({"flarum-subscriptions.notify_for_all_posts":o})}},r().translator.trans("flarum-subscriptions.forum.settings.notify_for_all_posts_label")))})),(0,n.extend)(c().prototype,"notificationTypes",(function(o){o.add("newPost",{name:"newPost",icon:"fas fa-star",label:r().translator.trans("flarum-subscriptions.forum.settings.notify_new_post_label")})}))}))})(),module.exports=t})();
413
414
415flarum.extensions['flarum-subscriptions']=module.exports;
416
417var module={};
418
419(()=>{var t={n:o=>{var s=o&&o.__esModule?()=>o.default:()=>o;return t.d(s,{a:s}),s},d:(o,s)=>{for(var n in s)t.o(s,n)&&!t.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:s[n]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o),t.d(o,{extend:()=>L});const s=flarum.core.compat["forum/app"];var n=t.n(s);const e=flarum.core.compat["common/extend"],r=flarum.core.compat["common/models/Discussion"];var c=t.n(r);const i=flarum.core.compat["common/components/Badge"];var a=t.n(i);const u=flarum.core.compat["forum/utils/DiscussionControls"];var f=t.n(u);const p=flarum.core.compat["forum/components/DiscussionPage"];var l=t.n(p);const d=flarum.core.compat["common/components/Button"];var y=t.n(d);const k=flarum.core.compat["forum/states/DiscussionListState"];var v=t.n(k);const b=flarum.core.compat["forum/components/DiscussionListItem"];var h=t.n(b);const _=flarum.core.compat["forum/components/IndexPage"];var S=t.n(_);const P=flarum.core.compat["common/utils/string"],x=flarum.core.compat["common/utils/classList"];var g=t.n(x);const O=flarum.core.compat["common/extenders"];var j=t.n(O);function D(t,o){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},D(t,o)}const w=flarum.core.compat["forum/components/EventPost"];var I=function(t){var o,s;function n(){return t.apply(this,arguments)||this}s=t,(o=n).prototype=Object.create(s.prototype),o.prototype.constructor=o,D(o,s);var e=n.prototype;return e.icon=function(){return"fas fa-thumbtack"},e.descriptionKey=function(){return this.attrs.post.content().sticky?"flarum-sticky.forum.post_stream.discussion_stickied_text":"flarum-sticky.forum.post_stream.discussion_unstickied_text"},n}(t.n(w)());const L=[(new(j().PostTypes)).add("discussionStickied",I),new(j().Model)(c()).attribute("isSticky").attribute("canSticky")];n().initializers.add("flarum-sticky",(function(){(0,e.extend)(c().prototype,"badges",(function(t){this.isSticky()&&t.add("sticky",m(a(),{type:"sticky",label:n().translator.trans("flarum-sticky.forum.badge.sticky_tooltip"),icon:"fas fa-thumbtack"}),10)})),(0,e.extend)(f(),"moderationControls",(function(t,o){o.canSticky()&&t.add("sticky",m(y(),{icon:"fas fa-thumbtack",onclick:this.stickyAction.bind(o)},n().translator.trans("flarum-sticky.forum.discussion_controls."+(o.isSticky()?"unsticky":"sticky")+"_button")))})),f().stickyAction=function(){this.save({isSticky:!this.isSticky()}).then((function(){n().current.matches(l())&&n().current.get("stream").update(),m.redraw()}))},(0,e.extend)(v().prototype,"requestParams",(function(t){(n().current.matches(S())||n().current.matches(l()))&&t.include.push("firstPost")})),(0,e.extend)(h().prototype,"infoItems",(function(t){var o=this.attrs.discussion;if(o.isSticky()&&!this.attrs.params.q&&!o.lastReadPostNumber()){var s=o.firstPost();if(s){var n=(0,P.truncate)(s.contentPlain(),175);t.add("excerpt",m("div",null,n),-100)}}})),(0,e.extend)(h().prototype,"elementAttrs",(function(t){this.attrs.discussion.isSticky()&&(t.className=g()(t.className,"DiscussionListItem--sticky"))}))}))})(),module.exports=o})();
420
421
422flarum.extensions['flarum-sticky']=module.exports;
423
424var module={};
425
426/*! For license information please see forum.js.LICENSE.txt */
427(()=>{var t={648:(t,u,e)=>{var n=e(288).default;function r(){"use strict";
vendor: 4,676 bytes, line 427
427t.exports=r=function(){return u},t.exports.__esModule=!0,t.exports.default=t.exports;var u={},e=Object.prototype,o=e.hasOwnProperty,i=Object.defineProperty||function(t,u,e){t[u]=e.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",D=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,u,e){return Object.defineProperty(t,u,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[u]}try{l({},"")}catch(t){l=function(t,u,e){return t[u]=e}}function f(t,u,e,n){var r=u&&u.prototype instanceof d?u:d,o=Object.create(r.prototype),s=new P(n||[]);return i(o,"_invoke",{value:g(t,e,s)}),o}function m(t,u,e){try{return{type:"normal",arg:t.call(u,e)}}catch(t){return{type:"throw",arg:t}}}u.wrap=f;var p={};function d(){}function F(){}function h(){}var C={};l(C,a,(function(){return this}));var A=Object.getPrototypeOf,v=A&&A(A(M([])));v&&v!==e&&o.call(v,a)&&(C=v);var E=h.prototype=d.prototype=Object.create(C);function y(t){["next","throw","return"].forEach((function(u){l(t,u,(function(t){return this._invoke(u,t)}))}))}function B(t,u){function e(r,i,s,a){var D=m(t[r],t,i);if("throw"!==D.type){var c=D.arg,l=c.value;return l&&"object"==n(l)&&o.call(l,"__await")?u.resolve(l.__await).then((function(t){e("next",t,s,a)}),(function(t){e("throw",t,s,a)})):u.resolve(l).then((function(t){c.value=t,s(c)}),(function(t){return e("throw",t,s,a)}))}a(D.arg)}var r;i(this,"_invoke",{value:function(t,n){function o(){return new u((function(u,r){e(t,n,u,r)}))}return r=r?r.then(o,o):o()}})}function g(t,u,e){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return{value:void 0,done:!0}}for(e.method=r,e.arg=o;;){var i=e.delegate;if(i){var s=b(i,e);if(s){if(s===p)continue;return s}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var a=m(t,u,e);if("normal"===a.type){if(n=e.done?"completed":"suspendedYield",a.arg===p)continue;return{value:a.arg,done:e.done}}"throw"===a.type&&(n="completed",e.method="throw",e.arg=a.arg)}}}function b(t,u){var e=u.method,n=t.iterator[e];if(void 0===n)return u.delegate=null,"throw"===e&&t.iterator.return&&(u.method="return",u.arg=void 0,b(t,u),"throw"===u.method)||"return"!==e&&(u.method="throw",u.arg=new TypeError("The iterator does not provide a '"+e+"' method")),p;var r=m(n,t.iterator,u.arg);if("throw"===r.type)return u.method="throw",u.arg=r.arg,u.delegate=null,p;var o=r.arg;return o?o.done?(u[t.resultName]=o.value,u.next=t.nextLoc,"return"!==u.method&&(u.method="next",u.arg=void 0),u.delegate=null,p):o:(u.method="throw",u.arg=new TypeError("iterator result is not an object"),u.delegate=null,p)}function w(t){var u={tryLoc:t[0]};1 in t&&(u.catchLoc=t[1]),2 in t&&(u.finallyLoc=t[2],u.afterLoc=t[3]),this.tryEntries.push(u)}function x(t){var u=t.completion||{};u.type="normal",delete u.arg,t.completion=u}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function M(t){if(t){var u=t[a];if(u)return u.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function u(){for(;++e<t.length;)if(o.call(t,e))return u.value=t[e],u.done=!1,u;return u.value=void 0,u.done=!0,u};return n.next=n}}return{next:_}}function _(){return{value:void 0,done:!0}}return F.prototype=h,i(E,"constructor",{value:h,configurable:!0}),i(h,"constructor",{value:F,configurable:!0}),F.displayName=l(h,c,"GeneratorFunction"),u.isGeneratorFunction=function(t){var u="function"==typeof t&&t.constructor;return!!u&&(u===F||"GeneratorFunction"===(u.displayName||u.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,l(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},u.awrap=function(t){return{__await:t}},y(B.prototype),l(B.prototype,D,(function(){return this})),u.AsyncIterator=B,u.async=function(t,e,n,r,o){void 0===o&&(o=Promise);var i=new B(f(t,e,n,r),o);return u.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},y(E),l(E,c,"Generator"),l(E,a,(function(){return this})),l(E,"toString",(function(){return"[object Generator]"})),u.keys=function(t){var u=Object(t),e=[];for(var n in u)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in u)return t.value=n,t.done=!1,t}return t.done=!0,t}},u.values=M,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
427h(x),!t)for(var u in this)"t"===u.charAt(0)&&o.call(this,u)&&!isNaN(+u.slice(1))&&(this[u]=void 0)},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 u=this;function e(e,n){return i.type="throw",i.arg=t,u.next=e,n&&(u.method="next",u.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n],i=r.completion;if("root"===r.tryLoc)return e("end");if(r.tryLoc<=this.prev){var s=o.call(r,"catchLoc"),a=o.call(r,"finallyLoc");if(s&&a){if(this.prev<r.catchLoc)return e(r.catchLoc,!0);if(this.prev<r.finallyLoc)return e(r.finallyLoc)}else if(s){if(this.prev<r.catchLoc)return e(r.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return e(r.finallyLoc)}}}},abrupt:function(t,u){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=u&&u<=r.finallyLoc&&(r=null);var i=r?r.completion:{};return i.type=t,i.arg=u,r?(this.method="next",this.next=r.finallyLoc,p):this.complete(i)},complete:function(t,u){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&&u&&(this.next=u),p},finish:function(t){for(var u=this.tryEntries.length-1;u>=0;--u){var e=this.tryEntries[u];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),x(e),p}},catch:function(t){for(var u=this.tryEntries.length-1;u>=0;--u){var e=this.tryEntries[u];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var r=n.arg;x(e)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,u,e){return this.delegate={iterator:M(t),resultName:u,nextLoc:e},"next"===this.method&&(this.arg=void 0),p}},u}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},288:t=>{function u(e){return t.exports=u="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},t.exports.__esModule=!0,t.exports.default=t.exports,u(e)}t.exports=u,t.exports.__esModule=!0,t.exports.default=t.exports},357:(t,u,e)=>{var n=e(648)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},u={};function e(n){var r=u[n];if(void 0!==r)return r.exports;var o=u[n]={exports:{}};return t[n](o,o.exports,e),o.exports}e.n=t=>{var u=t&&t.__esModule?()=>t.default:()=>t;return e.d(u,{a:u}),u},e.d=(t,u)=>{for(var n in u)e.o(u,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:u[n]})},e.o=(t,u)=>Object.prototype.hasOwnProperty.call(t,u),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";e.r(n),e.d(n,{extend:()=>au,filterGroupMentions:()=>mu,filterPostMentions:()=>lu,filterTagMentions:()=>du,filterUserMentions:()=>Du,postFilterGroupMentions:()=>pu,postFilterPostMentions:()=>fu,postFilterTagMentions:()=>Fu,postFilterUserMentions:()=>cu});var t={};e.r(t),e.d(t,{default:()=>z,insertMention:()=>J});var u={};e.r(u),e.d(u,{filterGroupMentions:()=>mu,filterPostMentions:()=>lu,filterTagMentions:()=>du,filterUserMentions:()=>Du,postFilterGroupMentions:()=>pu,postFilterPostMentions:()=>fu,postFilterTagMentions:()=>Fu,postFilterUserMentions:()=>cu});const r=flarum.core.compat["common/extend"],o=flarum.core.compat["forum/app"];var i=e.n(o);const s=flarum.core.compat["forum/components/NotificationGrid"];var a=e.n(s);const D=flarum.core.compat["common/utils/string"],c=flarum.core.compat["common/helpers/textContrastClass"];var l=e.n(c);const f=flarum.core.compat["forum/components/Post"];var p=e.n(f);const d=flarum.core.compat["forum/components/CommentPost"];var F=e.n(d);const h=flarum.core.compat["forum/components/PostPreview"];var C=e.n(h);const A=flarum.core.compat["common/components/LoadingIndicator"];var v=e.n(A);const E=flarum.core.compat["common/components/Link"];var y=e.n(E);const B=flarum.core.compat["common/helpers/punctuateSeries"];var g=e.n(B);const b=flarum.core.compat["common/helpers/username"];var w=e.n(b);const x=flarum.core.compat["common/helpers/icon"];var P=e.n(x);const M=flarum.core.compat["common/components/Button"];var _=e.n(M);
427function S(t,u){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,u){return t.__proto__=u,t},S(t,u)}function T(t,u){t.prototype=Object.create(u.prototype),t.prototype.constructor=t,S(t,u)}const k=flarum.core.compat["common/components/Modal"];var j=e.n(k);function L(){return L=Object.assign?Object.assign.bind():function(t){for(var u=1;u<arguments.length;u++){var e=arguments[u];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},L.apply(this,arguments)}function N(t){return N="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},N(t)}function O(t,u){for(var e=0;e<u.length;e++){var n=u[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(r=n.key,o=void 0,o=function(t,u){if("object"!==N(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!==N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r),"symbol"===N(o)?o:String(o)),n)}var r,o}const I=flarum.core.compat["common/states/PaginatedListState"];var R=function(t){function u(u,e){return void 0===e&&(e=1),u.page=L({},u.page||{},{limit:10}),t.call(this,u,e,10)||this}var e,n;return T(u,t),e=u,(n=[{key:"type",get:function(){return"posts"}}])&&O(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(e.n(I)()),G=function(t){function u(){return t.apply(this,arguments)||this}T(u,t);var e=u.prototype;return e.oninit=function(u){t.prototype.oninit.call(this,u),this.state=new R({filter:{mentionedPost:this.attrs.post.id()},sort:"number"}),this.state.refresh()},e.className=function(){return"MentionedByModal"},e.title=function(){return i().translator.trans("flarum-mentions.forum.mentioned_by.title")},e.content=function(){var t=this;return m("[",null,m("div",{className:"Modal-body"},this.state.isInitialLoading()?m(v(),null):m("[",null,m("ul",{className:"MentionedByModal-list Dropdown-menu Dropdown-menu--inline Post-mentionedBy-preview"},this.state.getPages().map((function(t){return t.items.map((function(t){return m("li",{"data-number":t.number()},m(C(),{post:t,onclick:function(){return i().modal.close()}}))}))}))))),this.state.hasNext()&&m("div",{className:"Modal-footer"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m(_(),{className:"Button Button--block",onclick:function(){return t.state.loadNext()},loading:this.state.isLoadingNext()},i().translator.trans("flarum-mentions.forum.mentioned_by.load_more_button"))))))},u}(j());const U=flarum.core.compat["forum/utils/DiscussionControls"];var H=e.n(U);const W=flarum.core.compat["forum/components/EditPostComposer"];var q=e.n(W);function J(t,u,e){return new Promise((function(n){var r=i().mentionFormats.mentionable("post").replacement(t)+" ";u.fields.content()||(u.body.attrs.originalContent=r);var o=u.editor.getSelectionRange()[0],s=u.fields.content().slice(0,o),a=0==s.length?0:3-s.match(/(\n{0,2})$/)[0].length;return u.editor.insertAtCursor(Array(a).join("\n")+(e?"> "+r+e.trim().replace(/\n/g,"\n> ")+"\n\n":r),!1),n(u)}))}function z(t,u){return i().composer.bodyMatches(q())&&i().composer.body.attrs.post.discussion()===t.discussion()?J(t,i().composer,u):H().replyAction.call(t.discussion()).then((function(e){return J(t,e,u)}))}const Y=flarum.core.compat["common/Fragment"];var Q=e.n(Y),X=function(t){function u(u){var e;return(e=t.call(this)||this).post=u,e}T(u,t);var e=u.prototype;return e.view=function(){var t=this;return m("button",{className:"Button PostQuoteButton",onclick:function(){z(t.post,t.content)}},P()("fas fa-quote-left",{className:"Button-icon"}),i().translator.trans("flarum-mentions.forum.post.quote_button"))},e.show=function(t,u){var e=this.$().show(),n=e.offsetParent().offset();e.css("left",t-n.left).css("top",u-n.top),this.hideHandler=this.hide.bind(this),$(document).on("mouseup",this.hideHandler)},e.showStart=function(t,u){var e=this.$();this.show(t,$(window).scrollTop()+u-e.outerHeight()-5)},e.showEnd=function(t,u){var e=this.$();this.show(t-e.outerWidth(),$(window).scrollTop()+u+5)},e.hide=function(){this.$().hide(),$(document).off("mouseup",this.hideHandler)},u}(Q());function K(t){var u=window.getSelection();if(!u.isCollapsed){var e=u.getRangeAt(0),n=e.commonAncestorContainer;if(t[0]===n||$.contains(t[0],n)){var r=$("<div>").append(e.cloneContents());return r.find("img.emoji").replaceWith((function(){return this.alt})),r.find("img").replaceWith((function(){return"![]("+this.src+")"})),r.find("a").replaceWith((function(){return"["+this.innerText+"]("+this.href+")"})),r.text()}}return""}const V=flarum.core.compat["common/components/TextEditor"];var Z=e.n(V);const tt=flarum.core.compat["common/components/TextEditorButton"];var ut=e.n(tt);const et=flarum.core.compat["common/utils/KeyboardNavigatable"];var nt=e.n(et),rt=function(t){function u(){for(var u,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(u=t.call.apply(t,[this].concat(n))||this).items=[],u.active=!1,u.index=0,u.keyWasJustPressed=!1,u}T(u,t);var e=u.prototype;return e.view=function(){return m("ul",{className:"Dropdown-menu MentionsDropdown"},this.items.map((function(t){return m("li",null,t)})))}
427,e.show=function(t,u){this.$().show().css({left:t+"px",top:u+"px"}),this.active=!0},e.hide=function(){this.$().hide(),this.active=!1},e.navigate=function(t){var u=this;this.keyWasJustPressed=!0,this.setIndex(this.index+t,!0),clearTimeout(this.keyWasJustPressedTimeout),this.keyWasJustPressedTimeout=setTimeout((function(){return u.keyWasJustPressed=!1}),500)},e.complete=function(){this.$("li").eq(this.index).find("button").click()},e.setIndex=function(t,u){if(!this.keyWasJustPressed||u){var e=this.$(),n=e.find("li"),r=t;r<0?r=n.length-1:r>=n.length&&(r=0),this.index=r;var o=n.removeClass("active").eq(r).addClass("active");if(u){var i,s=e.scrollTop(),a=e.offset().top,D=a+e.outerHeight(),c=o.offset().top,l=c+o.outerHeight();c<a?i=s-a+c-parseInt(e.css("padding-top"),10):l>D&&(i=s-D+l+parseInt(e.css("padding-bottom"),10)),void 0!==i&&e.stop(!0).animate({scrollTop:i},100)}}},u}(Q());function ot(t,u){if(null==t)return{};var e,n,r={},o=Object.keys(t);for(n=0;n<o.length;n++)e=o[n],u.indexOf(e)>=0||(r[e]=t[e]);return r}function it(t,u,e,n,r,o,i){try{var s=t[o](i),a=s.value}catch(t){return void e(t)}s.done?u(a):Promise.resolve(a).then(n,r)}function st(t){return function(){var u=this,e=arguments;return new Promise((function(n,r){var o=t.apply(u,e);function i(t){it(o,n,r,i,s,"next",t)}function s(t){it(o,n,r,i,s,"throw",t)}i(void 0)}))}}var at=e(357),Dt=e.n(at);const ct=flarum.core.compat["common/Component"];var lt=e.n(ct);const ft=flarum.core.compat["common/utils/classList"];var mt=e.n(ft),pt=["mentionable"],dt=function(t){function u(){return t.apply(this,arguments)||this}return T(u,t),u.prototype.view=function(t){var u=this.attrs,e=u.mentionable,n=ot(u,pt),r=mt()("MentionsDropdownItem","PostPreview","MentionsDropdown-"+e.type());return m("button",Object.assign({className:r},n),m("span",{className:"PostPreview-content"},t.children))},u}(lt());const Ft=flarum.core.compat["common/utils/throttleDebounce"];var ht=["onclick"];function Ct(t,u){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,u){if(t){if("string"==typeof t)return At(t,u);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?At(t,u):void 0}}(t))||u&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function At(t,u){(null==u||u>t.length)&&(u=t.length);for(var e=0,n=new Array(u);e<u;e++)n[e]=t[e];return n}var vt=function(){function t(t){var u=this;this.mentionables=void 0,this.results={},this.typed=null,this.searched=[],this.dropdownItemAttrs={},this.search=(0,Ft.throttle)(250,st(Dt().mark((function t(){var e,n,r,o,i,s,a;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u.typed&&!(u.typed.length<=1)){t.next=2;break}return t.abrupt("return");case 2:if(e=u.typed.toLowerCase(),!u.searched.includes(e)){t.next=5;break}return t.abrupt("return");case 5:n=Ct(u.mentionables);case 6:if((r=n()).done){t.next=20;break}return o=r.value,t.t0=Ct,t.next=11,o.search(e);case 11:t.t1=t.sent,i=(0,t.t0)(t.t1);case 13:if((s=i()).done){t.next=18;break}a=s.value,u.results[o.type()].has(a.id())||u.results[o.type()].set(a.id(),a);case 16:t.next=13;break;case 18:t.next=6;break;case 20:return u.searched.push(e),t.abrupt("return",Promise.resolve());case 22:case"end":return t.stop()}}),t)})))),this.dropdownItemAttrs=t}var u=t.prototype;return u.init=function(t){this.typed=null,this.mentionables=t;for(var u,e=Ct(this.mentionables);!(u=e()).done;){var n=u.value;this.results[n.type()]=new Map(n.initialResults().map((function(t){return[t.id(),t]})))}},u.matches=function(t,u){var e;return t.matches(u,(null==(e=this.typed)?void 0:e.toLowerCase())||"")},u.makeSuggestion=function(t,u){var e=t.suggestion(u,this.typed),n=t.replacement(u),r=this.dropdownItemAttrs,o=r.onclick,i=ot(r,ht);return m(dt,Object.assign({mentionable:t,onclick:function(){return o(n)}},i),e)},u.buildSuggestions=function(){for(var t,u=this,e=[],n=function(){var n=t.value;if(!n.enabled())return"continue";var r=Array.from(u.results[n.type()].values()).filter((function(t){return u.matches(n,t)})),o=n.maxStoreMatchedResults();o&&(r=r.splice(0,o));for(var i,s=Ct(r);!(i=s()).done;){var a=i.value,D=u.makeSuggestion(n,a);e.push(D)}},r=Ct(this.mentionables);!(t=r()).done;)n();return e},t}();const Et=flarum.core.compat["forum/components/Notification"];var yt=e.n(Et),Bt=function(t){function u(){return t.apply(this,arguments)||this}T(u,t);var e=u.prototype;return e.icon=function(){return"fas fa-reply"},e.href=function(){var t=this.attrs.notification,u=t.subject(),e=t.content();
427return i().route.discussion(u.discussion(),e&&e.replyNumber)},e.content=function(){var t=this.attrs.notification.fromUser();return i().translator.trans("flarum-mentions.forum.notifications.post_mentioned_text",{user:t,count:1})},e.excerpt=function(){return(0,D.truncate)(this.attrs.notification.subject().contentPlain()||"",200)},u}(yt()),gt=function(t){function u(){return t.apply(this,arguments)||this}T(u,t);var e=u.prototype;return e.icon=function(){return"fas fa-at"},e.href=function(){var t=this.attrs.notification.subject();return i().route.discussion(t.discussion(),t.number())},e.content=function(){var t=this.attrs.notification.fromUser();return i().translator.trans("flarum-mentions.forum.notifications.user_mentioned_text",{user:t})},e.excerpt=function(){return(0,D.truncate)(this.attrs.notification.subject().contentPlain(),200)},u}(yt()),bt=function(t){function u(){return t.apply(this,arguments)||this}T(u,t);var e=u.prototype;return e.icon=function(){return"fas fa-at"},e.href=function(){var t=this.attrs.notification.subject();return i().route.discussion(t.discussion(),t.number())},e.content=function(){var t=this.attrs.notification.fromUser();return i().translator.trans("flarum-mentions.forum.notifications.group_mentioned_text",{user:t})},e.excerpt=function(){return(0,D.truncate)(this.attrs.notification.subject().contentPlain(),200)},u}(yt()),wt=function(){function t(){this.instances=void 0,this.mentionables=void 0,this.extendable=void 0}var u=t.prototype;return u.makeMentionables=function(){var t,u=this;return null!=(t=this.instances)?t:this.instances=this.mentionables.map((function(t){return new t(u)}))},u.getMentionable=function(t){var u;return null!=(u=this.makeMentionables().find((function(u){return u.type()===t})))?u:null},u.extend=function(t){if(!this.extendable)throw new Error("This mention format does not allow extending.");this.mentionables.push(t)},t}();const xt=flarum.core.compat["common/helpers/avatar"];var Pt=e.n(xt);const Mt=flarum.core.compat["common/helpers/highlight"];var _t=e.n(Mt),St=function(t){this.format=void 0,this.format=t};const Tt=flarum.core.compat["common/utils/extractText"];var kt=e.n(Tt),$t=function(){return kt()(i().translator.trans("core.lib.username.deleted_text"))};function jt(t,u){return void 0===u&&(u=!0),t?((u?t.displayName():t.username())||$t()).replace(/"#[a-z]{0,3}[0-9]+/,"_"):$t().replace(/"#[a-z]{0,3}[0-9]+/,"_")}var Lt=function(t){function u(){return t.apply(this,arguments)||this}T(u,t);var e=u.prototype;return e.type=function(){return"user"},e.initialResults=function(){return Array.from(i().store.all("users"))},e.replacement=function(t){if(i().forum.attribute("allowUsernameMentionFormat")){var u=jt(t,!1);return this.format.format(u)}var e=jt(t);return this.format.format(e,"",t.id())},e.suggestion=function(t,u){var e,n=w()(t);return u&&(n.children=[_t()(null!=(e=n.text)?e:"",u)],delete n.text),m("[",null,Pt()(t),n)},e.matches=function(t,u){return!!u&&[t.username(),t.displayName()].some((function(t){return t.toLowerCase().substr(0,u.length)===u}))},e.maxStoreMatchedResults=function(){return null},e.search=function(){var t=st(Dt().mark((function t(u){return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i().store.find("users",{filter:{q:u},page:{limit:5}});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(u){return t.apply(this,arguments)}}(),e.enabled=function(){return!0},u}(St);const Nt=flarum.core.compat["forum/components/ReplyComposer"];var Ot=e.n(Nt),It=function(t){function u(){return t.apply(this,arguments)||this}T(u,t);var e=u.prototype;return e.type=function(){return"post"},e.initialResults=function(){if(!i().composer.bodyMatches(Ot())&&!i().composer.bodyMatches(q()))return[];var t=i().composer.body.attrs,u=t.post;return(u&&u.discussion()||t.discussion).posts().filter((function(t){return t&&"comment"===t.contentType()&&(!u||t.number()<u.number())})).sort((function(t,u){return u.createdAt().getTime()-t.createdAt().getTime()}))},e.replacement=function(t){var u=jt(t.user());return this.format.format(u,"p",t.id())},e.suggestion=function(t,u){var e,n,r=t.user()||null,o=w()(r);return u&&(o.children=[_t()(null!=(n=o.text)?n:"",u)],delete o.text),m("[",null,Pt()(r),o,[i().translator.trans("flarum-mentions.forum.composer.reply_to_post_text",{number:t.number()})," — ",(0,D.truncate)(null!=(e=t.contentPlain())?e:"",200)])},e.matches=function(t,u){var e=t.user(),n=i().mentionFormats.mentionable("user");return!u||e&&n.matches(e,u)},e.maxStoreMatchedResults=function(){return 5},e.search=function(t){return Promise.resolve([])},e.enabled=function(){return!0},u}(St);const Rt=flarum.core.compat["common/models/Group"];var Gt=e.n(Rt);const Ut=flarum.core.compat["common/components/Badge"];var Ht=e.n(Ut),Wt=function(t){function u(){return t.apply(this,arguments)||this}T(u,t);var e=u.prototype;return e.type=function(){return"group"},e.initialResults=function(){return Array.from(i().store.all("groups").filter((function(t){return t.id()!==Gt().GUEST_ID&&t.id()!==Gt().MEMBER_ID})))},e.replacement=function(t){return this.format.format(t.namePlural(),"g",t.id())},e.suggestion=function(t,u){var e=t.namePlural();return u&&(e=_t()(e,u)),m("[",null,m(Ht(),{className:"Avatar Badge Badge--group--"+t.id()+" Badge-icon",color:t.color(),type:"group",icon:t.icon()}),m("span",{className:"username"},e))},e.matches=function(t,u){return!!u&&[t.namePlural().toLowerCase(),t.nameSingular().toLowerCase()].some((function(t){return t.toLowerCase().substr(0,u.length)===u}))},e.maxStoreMatchedResults=function(){return null},e.search=function(t){return Promise.resolve([])},e.enabled=function(){var t,u;return null!=(t=null==(u=i().session)||null==(u=u.user)?void 0:u.canMentionGroups())&&t},u}(St),qt=function(t){function u(){for(var u,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(u=t.call.apply(t,[this].concat(n))||this).mentionables=[Lt,It,Wt],u.extendable=!0,u}T(u,t);var e=u.prototype;return e.trigger=function(){return"@"},e.queryFromTyped=function(t){var u=t.match(/^["“]?((?:(?!"#).)+)$/);return u?u[1]:null},e.format=function(t,u,e){return void 0===u&&(u=""),void 0===e&&(e=null),{simple:"@"+t,safe:'@"'+t+'"#'+u+e}[e?"safe":"simple"]},u}(wt),Jt=function(t){function u(){return t.apply(this,arguments)||this}T(u,t);var e=u.prototype;return e.type=function(){return"tag"},e.initialResults=function(){return Array.from(i().store.all("tags"))},e.replacement=function(t){return this.format.format(t.slug())},e.matches=function(t,u){return!!u&&[t.name().toLowerCase()].some((function(t){return t.toLowerCase().substr(0,u.length)===u}))},e.maxStoreMatchedResults=function(){return null},e.search=function(){var t=st(Dt().mark((function t(u){return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i().store.find("tags",{filter:{q:u},page:{limit:5}});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(u){return t.apply(this,arguments)}}(),e.suggestion=function(t,u){var e=t.name();return u&&(e=_t()(e,u)),m("[",null,m(Ht(),{className:"Avatar",icon:t.icon(),color:t.color(),type:"tag"}),m("span",{className:"username"},e))},e.enabled=function(){return"flarum-tags"in flarum.extensions},u}(St),zt=function(t){function u(){for(var u,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(u=t.call.apply(t,[this].concat(n))||this).mentionables=[Jt],u.extendable=!0,u}T(u,t);var e=u.prototype;return e.trigger=function(){return"#"},e.queryFromTyped=function(t){var u=t.match(/^(?:[\x2D0-9A-Z_a-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BF2\u
4270C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D63\u0D66-\u0D78\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uD
427F40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE6\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD27\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDEFD-\uDF27\uDF30-\uDF54\uDF70-\uDF85\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC52-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE37\uDE3E-\uDE41\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF])+$/gi);return u?u[0]:null},e.format=function(t){return"#"+t},u}(wt);function Yt(t,u){(null==u||u>t.length)&&(u=t.length);for(var e=0,n=new Array(u);e<u;e++)n[e]=t[e];return n}var Qt=function(){function t(){this.formats=[new qt,new zt]}var u=t.prototype;return u.get=function(t){var u;return null!=(u=this.formats.find((function(u){return u.trigger()===t})))?u:null},u.mentionable=function(t){for(var u,e=function(t,u){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,u){if(t){if("string"==typeof t)return Yt(t,u);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Yt(t,u):void 0}}(t))||u&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.formats);!(u=e()).done;){var n=u.value.getMentionable(t);if(n)return n}return null},u.extend=function(t){this.formats.push(new t)},t}();const Xt=flarum.core.compat["forum/components/UserPage"];var Kt=e.n(Xt);const Vt=flarum.core.compat["common/components/LinkButton"];var Zt=e.n(Vt);const tu=flarum.core.compat["common/models/User"];var uu=e.n(tu);flarum.core.compat["common/Model"];const eu=flarum.core.compat["common/extenders"];var nu=e.n(eu);const ru=flarum.core.compat["common/models/Post"];var ou=e.n(ru);const iu=flarum.core.compat["forum/components/PostsUserPage"];var su=function(t){function u(){return t.apply(this,arguments)||this}return T(u,t),u.prototype.loadResults=function(t){return i().store.find("posts",{filter:{type:"comment",mentioned:this.user.id()},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},u}(e.n(iu)());const au=[(new(nu().Routes)).add("user.mentions","/u/:username/mentions",su),new(nu().Model)(ou()).hasMany("mentionedBy").attribute("mentionedByCount"),new(nu().Model)(uu()).attribute("canMentionGroups")];function Du(t){var u;
427if(i().forum.attribute("allowUsernameMentionFormat")&&t.hasAttribute("username")?u=i().store.getBy("users","username",t.getAttribute("username")):t.hasAttribute("id")&&(u=i().store.getById("users",t.getAttribute("id"))),u)return t.setAttribute("id",u.id()),t.setAttribute("slug",u.slug()),t.setAttribute("displayname",kt()(w()(u))),!0;t.invalidate()}function cu(t){t.setAttribute("deleted",!1)}function lu(t){var u=i().store.getById("posts",t.getAttribute("id"));if(u)return t.setAttribute("discussionid",u.discussion().id()),t.setAttribute("number",u.number()),t.setAttribute("displayname",kt()(w()(u.user()))),!0}function fu(t){t.setAttribute("deleted",!1)}function mu(t){var u;if(null!=(u=i().session)&&null!=(u=u.user)&&u.canMentionGroups()){var e=i().store.getById("groups",t.getAttribute("id"));if(e)return t.setAttribute("groupname",kt()(e.namePlural())),!0}t.invalidate()}function pu(t){var u;if(null!=(u=i().session)&&null!=(u=u.user)&&u.canMentionGroups()){var e=i().store.getById("groups",t.getAttribute("id"));t.setAttribute("color",e.color()),t.setAttribute("icon",e.icon()),t.setAttribute("deleted",!1)}}function du(t){if("flarum-tags"in flarum.extensions){var u=i().store.getBy("tags","slug",t.getAttribute("slug"));if(u)return t.setAttribute("id",u.id()),t.setAttribute("tagname",u.name()),!0}t.invalidate()}function Fu(t){if("flarum-tags"in flarum.extensions){var u=i().store.getBy("tags","slug",t.getAttribute("slug"));t.setAttribute("icon",u.icon()),t.setAttribute("color",u.color()),t.setAttribute("deleted",!1)}}function hu(t,u){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,u){if(t){if("string"==typeof t)return Cu(t,u);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Cu(t,u):void 0}}(t))||u&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Cu(t,u){(null==u||u>t.length)&&(u=t.length);for(var e=0,n=new Array(u);e<u;e++)n[e]=t[e];return n}const Au={"mentions/components/MentionsUserPage":su,"mentions/components/PostMentionedNotification":Bt,"mentions/components/UserMentionedNotification":gt,"mentions/components/GroupMentionedNotification":bt,"mentions/fragments/AutocompleteDropdown":rt,"mentions/fragments/PostQuoteButton":X,"mentions/utils/getCleanDisplayName":jt,"mentions/utils/getMentionText":function(t,u,e){if(void 0!==t&&void 0===u)return i().mentionables.get("user").replacement(t);if(void 0!==t&&void 0!==u)return i().mentionables.get("post").replacement(i().store.getById("posts",u));if(void 0!==e)return i().mentionables.get("group").replacement(e);throw"No parameters were passed"},"mentions/utils/reply":t,"mentions/utils/selectedText":K,"mentions/utils/textFormatter":u,"mentions/mentionables/MentionableModel":St,"mentions/mentionables/formats/MentionFormat":wt,"mentions/extenders/Mentionables":function(){function t(){this.formats=[],this.mentionables={}}var u=t.prototype;return u.format=function(t){return this.formats.push(t),this},u.mentionable=function(t,u){return this.mentionables[t]||(this.mentionables[t]=[]),this.mentionables[t].push(u),this},u.extend=function(t){for(var u,e=hu(this.formats);!(u=e()).done;){var n=u.value;t.mentionFormats.extend(n)}for(var r in this.mentionables){var o=t.mentionFormats.get(r);if(o)for(var i,s=hu(this.mentionables[r]);!(i=s()).done;){var a=i.value;o.extend(a)}}},t}()},vu=flarum.core;i().mentionFormats=new Qt,i().initializers.add("flarum-mentions",(function(){var t,u;!function(){function t(){var t=this.attrs.post.contentHtml();if(t!==this.oldPostContentHtml&&!this.isEditing()){this.oldPostContentHtml=t;var u=this.attrs.post,e=this.$();this.$().on("click",".UserMention:not(.UserMention--deleted), .PostMention:not(.PostMention--deleted), .TagMention:not(.TagMention--deleted)",(function(t){m.route.set(this.getAttribute("href")),t.preventDefault()})),this.$(".PostMention:not(.PostMention--deleted)").each((function(){var t,n=$(this),r=n.data("id"),o=$('<ul class="Dropdown-menu PostMention-preview fade"/>');e.append(o);var i=function(){return $('.PostStream-item[data-id="'+r+'"]')},s=function(){var t=i(),s=!1;if(t.length){var a=t.offset().top,D=window.pageYOffset;a>D&&a+t.height()<D+$(window).height()&&(t.addClass("pulsate"),s=!0)}if(!s){var c=function(){var t=o.outerHeight(!0),u=0;n.offset().top-t<$(window).scrollTop()+$("#header").outerHeight()?u+=n.outerHeight(!0):u-=t,o.show().css("top",n.offset().top-e.offset().top+u).css("left",n.offsetParent().offset().left-e.offset().left).css("max-width",n.offsetParent().width())}
427,l=function(t){var e=t.discussion();m.render(o[0],[e!==u.discussion()&&m("li",null,m("span",{className:"PostMention-preview-discussion"},e.title())),m("li",null,m(C(),{post:t}))]),c()},f=app.store.getById("posts",r);f&&f.discussion()?l(f):(m.render(o[0],m(v(),null)),app.store.find("posts",r).then(l),c()),setTimeout((function(){return o.off("transitionend").addClass("in")}))}},a=function(){i().removeClass("pulsate"),o.hasClass("in")&&o.removeClass("in").one("transitionend",(function(){return o.hide()}))};n.on("touchend",(function(t){t.cancelable&&t.preventDefault()})),n.add(o).hover((function(){clearTimeout(t),t=setTimeout(s,250)}),(function(){clearTimeout(t),i().removeClass("pulsate"),t=setTimeout(a,250)})).on("touchend",(function(t){s(),t.stopPropagation()})),$(document).on("touchend",a)}))}}(0,r.extend)(F().prototype,"oncreate",t),(0,r.extend)(F().prototype,"onupdate",t)}(),function(){function t(){this.$(".Post-mentionedBy-preview").removeClass("in").one("transitionend",(function(){$(this).hide()}))}(0,r.extend)(F().prototype,"oncreate",(function(){var u,e=this,n=this.attrs.post,r=n.mentionedBy();if(r&&r.length){var o=$('<ul class="Dropdown-menu Post-mentionedBy-preview fade"/>');this.$().append(o);var s=this.$(),a=this.$(".Post-mentionedBy"),D=function(){!o.hasClass("in")&&o.is(":visible")||(m.render(o[0],m("[",null,r.map((function(u){return m("li",{"data-number":u.number()},m(C(),{post:u,onclick:t.bind(e)}))})),r.length<n.mentionedByCount()&&m("li",{className:"Post-mentionedBy-preview-more"},m(_(),{className:"PostPreview Button",onclick:function(){t.call(e),i().modal.show(G,{post:n})}},m("span",{className:"PostPreview-content"},m("span",{className:"PostPreview-badge Avatar"},P()("fas fa-reply-all")),m("span",null,i().translator.trans("flarum-mentions.forum.post.mentioned_by_more_text",{count:n.mentionedByCount()-r.length}))))))),o.show().css("top",a.offset().top-s.offset().top+a.outerHeight(!0)).css("left",a.offsetParent().offset().left-s.offset().left).css("max-width",s.width()),setTimeout((function(){return o.off("transitionend").addClass("in")})))};a.add(o).hover((function(){clearTimeout(u),u=setTimeout(D,250)}),(function(){clearTimeout(u),u=setTimeout(t,250)})),this.$().find(".Post-mentionedBy-summary a").hover((function(){o.find('[data-number="'+$(this).data("number")+'"]').addClass("active")}),(function(){o.find("[data-number]").removeClass("active")}))}})),(0,r.extend)(F().prototype,"footerItems",(function(u){var e=this,n=this.attrs.post,r=n.mentionedBy();if(r&&r.length){var o=[],s=r.sort((function(t){return t.user()===i().session.user?-1:0})).filter((function(t){var u=t.user();if(-1===o.indexOf(u))return o.push(u),!0})),a=n.mentionedByCount()>4,D=s.slice(0,a?3:4).map((function(u){var n=u.user();return m(y(),{href:i().route.post(u),onclick:t.bind(e),"data-number":u.number()},i().session.user===n?i().translator.trans("flarum-mentions.forum.post.you_text"):w()(n))}));if(a){var c=n.mentionedByCount()-D.length;D.push(i().translator.trans("flarum-mentions.forum.post.others_text",{count:c}))}u.add("replies",m("div",{className:"Post-mentionedBy"},m("span",{className:"Post-mentionedBy-summary"},P()("fas fa-reply"),i().translator.trans("flarum-mentions.forum.post.mentioned_by"+(s[0].user()===i().session.user?"_self":"")+"_text",{count:D.length,users:g()(D)}))))}}))}(),(0,r.extend)(F().prototype,"actionItems",(function(t){var u=this.attrs.post;u.isHidden()||i().session.user&&!u.discussion().canReply()||t.add("reply",m(_(),{className:"Button Button--link",onclick:function(){return z(u)}},i().translator.trans("flarum-mentions.forum.post.reply_link")))})),(0,r.extend)(F().prototype,"oncreate",(function(){var t=this.attrs.post;if(!(t.isHidden()||i().session.user&&!t.discussion().canReply())){var u=this.$(".Post-body"),e=$('<div class="Post-quoteButtonContainer"></div>'),n=new X(t),r=function(t){setTimeout((function(){var r=K(u);if(r){n.content=r,m.render(e[0],n.render());var o=window.getSelection().getRangeAt(0).getClientRects(),i=o[0];
427if(t.clientY<i.bottom&&t.clientX-i.right<i.left-t.clientX)n.showStart(i.left,i.top);else{var s=o[o.length-1];n.showEnd(s.right,s.bottom)}}}),1)};this.$().after(e).on("mouseup",r),"ontouchstart"in window&&document.addEventListener("selectionchange",r,!1)}})),t=$('<div class="ComposerBody-mentionsDropdownContainer"></div>'),u=new rt,(0,r.extend)(Z().prototype,"oncreate",(function(){var e=this.$(".TextEditor-editor").wrap('<div class="ComposerBody-mentionsWrapper"></div>');this.navigator=new(nt()),this.navigator.when((function(){return u.active})).onUp((function(){return u.navigate(-1)})).onDown((function(){return u.navigate(1)})).onSelect(u.complete.bind(u)).onCancel(u.hide.bind(u)).bindTo(e),e.after(t)})),(0,r.extend)(Z().prototype,"buildEditorParams",(function(e){var n,r,o,s=this,a=new vt({onmouseenter:function(){u.setIndex($(this).parent().index())},onclick:function(t){s.attrs.composer.editor.replaceBeforeCursor(r-1,t+" "),u.hide()}});e.inputListeners.push((function(){var e=s.attrs.composer.editor.getSelectionRange(),D=e[0];if(!(e[1]-D>0)){var c=s.attrs.composer.editor.getLastNChars(30);r=0;for(var l=null,f=c.length-1;f>=0;f--){var p=c.substr(f,1);if((l=i().mentionFormats.get(p))&&(0===f||/\s/.test(c.substr(f-1,1)))){n=f+1,r=D-c.length+f+1,a.init(l.makeMentionables());break}}if(u.hide(),u.active=!1,r){var d,F=c.substring(n).toLowerCase();if(!(o=l.queryFromTyped(F)))return;a.typed=o;var h=function(){var e=a.buildSuggestions();if(e.length){u.items=e,m.render(t[0],u.render()),u.show();var n=s.attrs.composer.editor.getCaretCoordinates(r),o=u.$().outerWidth(),i=u.$().outerHeight(),D=u.$().offsetParent(),c=n.left,l=n.top+15;l+i>D.height()&&(l=n.top-i-15),c+o>D.width()&&(c=D.width()-o),l=Math.max(-(D.offset().top-$(document).scrollTop()),l),c=Math.max(-D.offset().left,c),u.show(c,l)}else u.active=!1,u.hide()};u.active=!0,h(),u.setIndex(0),u.$().scrollTop(0),null==(d=a.search())||d.then(h)}}}))})),(0,r.extend)(Z().prototype,"toolbarItems",(function(t){var u=this;t.add("mention",m(ut(),{onclick:function(){return u.attrs.composer.editor.insertAtCursor(" @")},icon:"fas fa-at"},i().translator.trans("flarum-mentions.forum.composer.mention_tooltip")))})),i().notificationComponents.postMentioned=Bt,i().notificationComponents.userMentioned=gt,i().notificationComponents.groupMentioned=bt,(0,r.extend)(a().prototype,"notificationTypes",(function(t){t.add("postMentioned",{name:"postMentioned",icon:"fas fa-reply",label:i().translator.trans("flarum-mentions.forum.settings.notify_post_mentioned_label")}),t.add("userMentioned",{name:"userMentioned",icon:"fas fa-at",label:i().translator.trans("flarum-mentions.forum.settings.notify_user_mentioned_label")}),t.add("groupMentioned",{name:"groupMentioned",icon:"fas fa-at",label:i().translator.trans("flarum-mentions.forum.settings.notify_group_mentioned_label")})})),(0,r.extend)(Kt().prototype,"navItems",(function(t){var u=this.user;t.add("mentions",m(Zt(),{href:i().route("user.mentions",{username:u.slug()}),name:"mentions",icon:"fas fa-at"},i().translator.trans("flarum-mentions.forum.user.mentions_link")),80)})),D.getPlainContent.removeSelectors.push("a.PostMention"),(0,r.extend)(p().prototype,"oncreate",(function(){this.$(".GroupMention--colored, .TagMention--colored").each((function(){this.classList.add(l()(getComputedStyle(this).getPropertyValue("--color")))}))}))})),Object.assign(vu.compat,Au)})(),module.exports=n})();
428
429
430flarum.extensions['flarum-mentions']=module.exports;
431
432var module={};
433
434(()=>{var t={n:o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return t.d(e,{a:e}),e},d:(o,e)=>{for(var r in e)t.o(e,r)&&!t.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:e[r]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o);const e=flarum.core.compat["forum/app"];var r=t.n(e);const i=flarum.core.compat["common/app"];var n=t.n(i);const a=flarum.core.compat["common/extend"],c=flarum.core.compat["common/components/TextEditor"];var l=t.n(c);const s=flarum.core.compat["common/utils/BasicEditorDriver"];var d=t.n(s);const u=flarum.core.compat["common/utils/styleSelectedText"];var f=t.n(u);
434function p(t,o){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},p(t,o)}function h(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,p(t,o)}const k=flarum.core.compat["common/Component"];var y=t.n(k),b=function(t){function o(){return t.apply(this,arguments)||this}return h(o,t),o.prototype.view=function(t){return m("div",{className:"MarkdownToolbar"},t.children)},o}(y());const x=flarum.core.compat["common/helpers/icon"];var v=t.n(x);const g=flarum.core.compat["common/components/Tooltip"];var _=t.n(g),w=function(t){function o(){return t.apply(this,arguments)||this}h(o,t);var e=o.prototype;return e.oncreate=function(o){t.prototype.oncreate.call(this,o)},e.view=function(){var t=m("button",{className:"Button Button--icon Button--link",type:"button","data-hotkey":this.attrs.hotkey,onkeydown:this.keydown.bind(this),onclick:this.attrs.onclick},v()(this.attrs.icon));return this.attrs.title?m(_(),{text:this.attrs.title},t):t},e.keydown=function(t){" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),this.element.click())},o}(y());const O=flarum.core.compat["common/utils/ItemList"];var T=t.n(O),P=navigator.userAgent.match(/Macintosh/)?"⌘":"ctrl",S={header:{prefix:"### "},bold:{prefix:"**",suffix:"**",trimFirst:!0},italic:{prefix:"_",suffix:"_",trimFirst:!0},strikethrough:{prefix:"~~",suffix:"~~",trimFirst:!0},quote:{prefix:"> ",multiline:!0,surroundWithNewlines:!0},code:{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"},link:{prefix:"[",suffix:"](https://)",replaceNext:"https://",scanFor:"https?://"},image:{prefix:"![",suffix:"](https://)",replaceNext:"https://",scanFor:"https?://"},unordered_list:{prefix:"- ",multiline:!0,surroundWithNewlines:!0},ordered_list:{prefix:"1. ",multiline:!0,orderedList:!0},spoiler:{prefix:">!",suffix:"!<",blockPrefix:">! ",multiline:!0,trimFirst:!0}},j=function(t,o){f()(o.el,S[t])};function I(t,o,e){return function(r){r.key===o&&(r.metaKey&&"⌘"===P||r.ctrlKey&&"ctrl"===P)&&(r.preventDefault(),j(t,e))}}function F(t){var o=this,e="function"==typeof t?t():new(T());function r(t,o){return n().translator.trans("flarum-markdown.lib.composer."+t+"_tooltip")+(o?" <"+P+"-"+o+">":"")}var i=function(t){return function(){return j(t,o.attrs.composer.editor)}};return e.add("header",m(w,{title:r("header"),icon:"fas fa-heading",onclick:i("header")}),1e3),e.add("bold",m(w,{title:r("bold","b"),icon:"fas fa-bold",onclick:i("bold")}),900),e.add("italic",m(w,{title:r("italic","i"),icon:"fas fa-italic",onclick:i("italic")}),800),e.add("strikethrough",m(w,{title:r("strikethrough"),icon:"fas fa-strikethrough",onclick:i("strikethrough")}),700),e.add("quote",m(w,{title:r("quote"),icon:"fas fa-quote-left",onclick:i("quote")}),600),e.add("spoiler",m(w,{title:r("spoiler"),icon:"fas fa-exclamation-triangle",onclick:i("spoiler")}),500),e.add("code",m(w,{title:r("code"),icon:"fas fa-code",onclick:i("code")}),400),e.add("link",m(w,{title:r("link"),icon:"fas fa-link",onclick:i("link")}),300),e.add("image",m(w,{title:r("image"),icon:"fas fa-image",oncl
434ick:i("image")}),200),e.add("unordered_list",m(w,{title:r("unordered_list"),icon:"fas fa-list-ul",onclick:i("unordered_list")}),100),e.add("ordered_list",m(w,{title:r("ordered_list"),icon:"fas fa-list-ol",onclick:i("ordered_list")}),0),e}r().initializers.add("flarum-markdown",(function(t){(0,a.extend)(d().prototype,"keyHandlers",(function(t){t.add("bold",I("bold","b",this)),t.add("italic",I("italic","i",this))})),l().prototype.markdownToolbarItems?(0,a.override)(l().prototype,"markdownToolbarItems",F):l().prototype.markdownToolbarItems=F,(0,a.extend)(l().prototype,"toolbarItems",(function(t){t.add("markdown",m(b,{for:this.textareaId,setShortcutHandler:function(t){return shortcutHandler=t}},this.markdownToolbarItems().toArray()),100)}))}))})(),module.exports=o})();
435
436
437flarum.extensions['flarum-markdown']=module.exports;
438
439var module={};
440
441(()=>{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var e in n)o.o(n,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>j});const n=flarum.core.compat["common/extend"],e=flarum.core.compat["forum/app"];var c=o.n(e);const r=flarum.core.compat["forum/components/NotificationGrid"];var s=o.n(r);function a(o,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,t){return o.__proto__=t,o},a(o,t)}function i(o,t){o.prototype=Object.create(t.prototype),o.prototype.constructor=o,a(o,t)}const u=flarum.core.compat["forum/components/Notification"];var f=function(o){function t(){return o.apply(this,arguments)||this}i(t,o);var n=t.prototype;return n.icon=function(){return"fas fa-lock"},n.href=function(){var o=this.attrs.notification;return c().route.discussion(o.subject(),o.content().postNumber)},n.content=function(){return c().translator.trans("flarum-lock.forum.notifications.discussion_locked_text",{user:this.attrs.notification.fromUser()})},t}(o.n(u)());const l=flarum.core.compat["common/models/Discussion"];var d=o.n(l);const p=flarum.core.compat["common/components/Badge"];var k=o.n(p);const y=flarum.core.compat["forum/utils/DiscussionControls"];var b=o.n(y);const _=flarum.core.compat["forum/components/DiscussionPage"];var v=o.n(_);const h=flarum.core.compat["common/components/Button"];var g=o.n(h);const L=flarum.core.compat["common/extenders"];var x=o.n(L);const O=flarum.core.compat["forum/components/EventPost"];var P=function(o){function t(){return o.apply(this,arguments)||this}i(t,o);var n=t.prototype;return n.icon=function(){return this.attrs.post.content().locked?"fas fa-lock":"fas fa-unlock"},n.descriptionKey=function(){return this.attrs.post.content().locked?"flarum-lock.forum.post_stream.discussion_locked_text":"flarum-lock.forum.post_stream.discussion_unlocked_text"},t}(o.n(O)());const j=[(new(x().PostTypes)).add("discussionLocked",P),new(x().Model)(d()).attribute("isLocked").attribute("canLock")];c().initializers.add("flarum-lock",(function(){c().notificationComponents.discussionLocked=f,(0,n.extend)(d().prototype,"badges",(function(o){this.isLocked()&&o.add("locked",m(k(),{type:"locked",label:c().translator.trans("flarum-lock.forum.badge.locked_tooltip"),icon:"fas fa-lock"}))})),(0,n.extend)(b(),"moderationControls",(function(o,t){t.canLock()&&o.add("lock",m(g(),{icon:"fas fa-lock",onclick:this.lockAction.bind(t)},c().translator.trans("flarum-lock.forum.discussion_controls."+(t.isLocked()?"unlock":"lock")+"_button")))})),b().lockAction=function(){this.save({isLocked:!this.isLocked()}).then((function(){c().current.matches(v())&&c().current.get("stream").update(),m.redraw()}))},(0,n.extend)(s().prototype,"notificationTypes",(function(o){o.add("discussionLocked",{name:"discussionLocked",icon:"fas fa-lock",label:c().translator.trans("flarum-lock.forum.settings.notify_discussion_locked_label")})}))}))})(),module.exports=t})();
442
443
444flarum.extensions['flarum-lock']=module.exports;
445
446var module={};
447
448(()=>{var t={n:o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return t.d(e,{a:e}),e},d:(o,e)=>{for(var n in e)t.o(e,n)&&!t.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:e[n]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
448),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o),t.d(o,{extend:()=>Q});const e=flarum.core.compat["common/extend"],n=flarum.core.compat["forum/app"];var r=t.n(n);const s=flarum.core.compat["forum/components/NotificationGrid"];var a=t.n(s);const i=flarum.core.compat["common/components/Button"];var u=t.n(i);const c=flarum.core.compat["forum/components/CommentPost"];var l=t.n(c);const f=flarum.core.compat["common/components/Link"];var p=t.n(f);const d=flarum.core.compat["common/helpers/punctuateSeries"];var k=t.n(d);const h=flarum.core.compat["common/helpers/username"];var v=t.n(h);const y=flarum.core.compat["common/helpers/icon"];var b=t.n(y);function g(t,o){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},g(t,o)}function _(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,g(t,o)}const P=flarum.core.compat["common/components/Modal"];var x=t.n(P);const O=flarum.core.compat["common/helpers/avatar"];var L=t.n(O);function N(){return N=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},N.apply(this,arguments)}function j(t,o){for(var e=0;e<o.length;e++){var n=o[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}const B=flarum.core.compat["common/states/PaginatedListState"];var M=function(t){function o(o,e){return void 0===e&&(e=1),o.page=N({},o.page||{},{limit:10}),t.call(this,o,e,10)||this}var e,n;return _(o,t),e=o,(n=[{key:"type",get:function(){return"users"}}])&&j(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(t.n(B)());const w=flarum.core.compat["common/components/LoadingIndicator"];var S=t.n(w),C=function(t){function o(){return t.apply(this,arguments)||this}_(o,t);var e=o.prototype;return e.oninit=function(o){t.prototype.oninit.call(this,o),this.state=new M({filter:{liked:this.attrs.post.id()}}),this.state.refresh()},e.className=function(){return"PostLikesModal Modal--small"},e.title=function(){return r().translator.trans("flarum-likes.forum.post_likes.title")},e.content=function(){var t=this;return m("[",null,m("div",{className:"Modal-body"},this.state.isInitialLoading()?m(S(),null):m("ul",{className:"PostLikesModal-list"},this.state.getPages().map((function(t){return t.items.map((function(t){return m("li",null,m(p(),{href:r().route.user(t)},L()(t)," ",v()(t)))}))})))),this.state.hasNext()?m("div",{className:"Modal-footer"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m(u(),{className:"Button Button--block",onclick:function(){return t.state.loadNext()},loading:this.state.isLoadingNext()},r().translator.trans("flarum-likes.forum.post_likes.load_more_button"))))):null)},o}(x());const I=flarum.core.compat["forum/components/Notification"];var U=t.n(I);const F=flarum.core.compat["common/utils/string"];var T=function(t){function o(){return t.apply(this,arguments)||this}_(o,t);var e=o.prototype;return e.icon=function(){return"far fa-thumbs-up"},e.href=function(){return r().route.post(this.attrs.notification.subject())},e.content=function(){var t=this.attrs.notification.fromUser();return r().translator.trans("flarum-likes.forum.notifications.post_liked_text",{user:t,count:1})},e.excerpt=function(){return(0,F.truncate)(this.attrs.notification.subject().contentPlain(),200)},o}(U());const R=flarum.core.compat["forum/components/UserPage"];var z=t.n(R);const A=flarum.core.compat["common/components/LinkButton"];var D=t.n(A);const G=flarum.core.compat["common/extenders"];var H=t.n(G);const q=flarum.core.compat["common/models/Post"];var E=t.n(q);const J=flarum.core.compat["forum/components/PostsUserPage"];var K=function(t){function o(){return t.apply(this,arguments)||this}return _(o,t),o.prototype.loadResults=function(t){return r().store.find("posts",{filter:{type:"comment",likedBy:this.user.id()},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},o}(t.n(J)());const Q=[(new(H().Routes)).add("user.likes","/u/:username/likes",K),new(H().Model)(E()).hasMany("likes").attribute("likesCount").attribute("canLike")];
448r().initializers.add("flarum-likes",(function(){r().notificationComponents.postLiked=T,(0,e.extend)(l().prototype,"actionItems",(function(t){var o=this.attrs.post;if(!o.isHidden()&&o.canLike()){var e=o.likes(),n=r().session.user&&e&&e.some((function(t){return t===r().session.user}));t.add("like",m(u(),{className:"Button Button--link",onclick:function(){n=!n,o.save({isLiked:n});var t=o.data.relationships.likes.data;t.some((function(o,e){if(o.id===r().session.user.id())return t.splice(e,1),!0})),n&&t.unshift({type:"users",id:r().session.user.id()})}},r().translator.trans(n?"flarum-likes.forum.post.unlike_link":"flarum-likes.forum.post.like_link")))}})),(0,e.extend)(l().prototype,"footerItems",(function(t){var o=this.attrs.post,e=o.likes();if(e&&e.length){var n=o.likesCount()>4,s=e.sort((function(t){return t===r().session.user?-1:1})).slice(0,n?3:4).map((function(t){return m(p(),{href:r().route.user(t)},t===r().session.user?r().translator.trans("flarum-likes.forum.post.you_text"):v()(t))}));if(n){var a=o.likesCount()-s.length,i=r().translator.trans("flarum-likes.forum.post.others_link",{count:a});r().forum.attribute("canSearchUsers")?s.push(m(u(),{className:"Button Button--ua-reset Button--text",onclick:function(t){t.preventDefault(),r().modal.show(C,{post:o})}},i)):s.push(m("span",null,i))}t.add("liked",m("div",{className:"Post-likedBy"},b()("far fa-thumbs-up"),r().translator.trans("flarum-likes.forum.post.liked_by"+(e[0]===r().session.user?"_self":"")+"_text",{count:s.length,users:k()(s)})))}})),(0,e.extend)(z().prototype,"navItems",(function(t){var o=this.user;t.add("likes",m(D(),{href:r().route("user.likes",{username:null==o?void 0:o.slug()}),icon:"far fa-thumbs-up"},r().translator.trans("flarum-likes.forum.user.likes_link")),88)})),(0,e.extend)(a().prototype,"notificationTypes",(function(t){t.add("postLiked",{name:"postLiked",icon:"far fa-thumbs-up",label:r().translator.trans("flarum-likes.forum.settings.notify_post_liked_label")})}))}))})(),module.exports=o})();
449
450
451flarum.extensions['flarum-likes']=module.exports;
452
453var module={};
454
455/*! For license information please see forum.js.LICENSE.txt */
456(()=>{var d={n:e=>{var u=e&&e.__esModule?()=>e.default:()=>e;return d.d(u,{a:u}),u},d:(e,u)=>{for(var a in u)d.o(u,a)&&!d.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:u[a]})},o:(d,e)=>Object.prototype.hasOwnProperty.call(d,e),r:d=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})}},e={};(()=>{"use strict";d.r(e);const u=flarum.core.compat["forum/app"];var a=d.n(u);const n=JSON.parse('{"🇦":["regional_indicator_a"],"🇧":["regional_indicator_b"],"🇨":["regional_indicator_c"],"🇩":["regional_indicator_d"],"🇪":["regional_indicator_e"],"🇫":["regional_indicator_f"],"🇬":["regional_indicator_g"],"🇭":["regional_indicator_h"],"🇮":["regional_indicator_i"],"🇯":["regional_indicator_j"],"🇰":["regional_indicator_k"],"🇱":["regional_indicator_l"],"🇲":["regional_indicator_m"],"🇳":["regional_indicator_n"],"🇴":["regional_indicator_o"],"🇵":["regional_indicator_p"],"🇶":["regional_indicator_q"],"🇷":["regional_indicator_r"],"🇸":["regional_indicator_s"],"🇹":["regional_indicator_t"],"🇺":["regional_indicator_u"],"🇻":["regional_indicator_v"],"🇼":["regional_indicator_w"],"🇽":["regional_indicator_x"],"🇾":["regional_indicator_y"],"🇿":["regional_indicator_z"],"😀":["grinning","grinning_face"],"😃":["grinning_face_with_big_eyes","smiley"],"😄":["grinning_face_with_closed_eyes","smile"],"😁":["beaming_face","grin"],"😆":["laughing","lol","satisfied","squinting_face"],"😅":["grinning_face_with_sweat","sweat_smile"],"🤣":["rofl"],"😂":["joy","lmao","tears_of_joy"],"🙂":["slightly_smiling_face"],"🙃":["upside_down_face"],"🫠":["melt","melting_face"],"😉":["wink","winking_face"],"😊":["blush","smiling_face_with_closed_eyes"],"😇":["halo","innocent"],"🥰":["smiling_face_with_3_hearts"],"😍":["heart_eyes","smiling_face_with_heart_eyes"],"🤩":["star_struck"],"😘":["blowing_a_kiss","kissing_heart"],"😗":["kissing","kissing_face"],"☺️":["relaxed","smiling_face"],"😚":["kissing_closed_eyes","kissing_face_with_closed_eyes"],"😙":["kissing_face_with_smiling_eyes","kissing_smiling_eyes"],"🥲":["smiling_face_with_tear"],"😋":["savoring_food","yum"],"😛":["face_with_tongue","stuck_out_tongue"],"😜":["stuck_out_tongue_winking_eye"],"🤪":["zany","zany_face"],"😝":["stuck_out_tongue_closed_eyes"],"🤑":["money_mouth_face"],"🤗":["hug","hugging","hugging_face"],"🤭":["face_with_hand_over_mouth","hand_over_mouth"],"🫢":["face_with_open_eyes_hand_over_mouth","gasp"],"🫣":["face_with_peeking_eye","peek"],"🤫":["shush","shushing_face"],"🤔":["thinking","thinking_face","wtf"],"🫡":["salute","saluting_face"],"🤐":["zipper_mouth","zipper_mouth_face"],"🤨":["face_with_raised_eyebrow","raised_eyebrow"],"😐️":["neutral","neutral_face"],"😑":["expressionless","expressionless_face"],"😶":["no_mouth"],"🫥":["dotted_line_face"],"😶‍🌫️":["in_clouds"],"😏":["smirk","smirking","smirking_face"],"😒":["unamused","unamused_face"],"🙄":["rolling_eyes"],"😬":["grimacing","grimacing_face"],"😮‍💨":["exhale","exhaling"],"🤥":["lying","lying_face"],"😌":["relieved","relieved_face"],"😔":["pensive","pensive_face"],"😪":["sleepy","sleepy_face"],"🤤":["drooling","drooling_face"],"😴":["sleeping","sleeping_face"],"😷":["mask","medical_mask"],"🤒":["face_with_thermometer"],"🤕":["face_with_head_bandage"],"🤢":["nauseated","nauseated_face"],"🤮":["face_vomiting","vomiting"],"🤧":["sneezing","sneezing_face"],"🥵":["hot","hot_face"],"🥶":["cold","cold_face"],"🥴":["woozy","woozy_face"],"😵":["dizzy_face","knocked_out"],"😵‍💫":["dizzy_eyes"],"🤯":["exploding_head"],"🤠":["cowboy","cowboy_face"],"🥳":["hooray","partying","partying_face"],"🥸":["disguised","disguised_face"],"😎":["smiling_face_with_sunglasses","sunglasses_cool","too_cool"],"🤓":["nerd","nerd_face"],"🧐":["face_with_monocle"],"😕":["confused","confused_face"],"🫤":["face_with_diagonal_mouth"],"😟":["worried","worried_face"],"🙁":["slightly_frowning_face"],"☹️":["white_frowning_face"],"😮":["face_with_open_mouth","open_mouth"],"😯":["hushed","hushed_face"],"😲":["astonished","astonished_face"],"😳":["flushed","flushed_face"],"🥺":["pleading","pleading_face"],"🥹":["face_holding_back_tears","watery_eyes"],"😦":["frowning","frowning_face"],"😧":["anguished","anguished_face"],"😨":["fearful","fearful_face"],"😰":["anxious","anxious_face","cold_sweat"],"😥":["disappointed_relieved","sad_relieved_face"],"😢":["cry","crying_face"],"😭":["loudly_crying_face","sob"],"😱":["scream","screaming_in_fear"],"😖":["confounded","confounded_face"],"😣":["persevere","persevering_face"],"😞":["disappointed","disappointed_face"],"😓":["downcast_face","sweat"],"😩":["weary","weary_face"],"😫":["tired","tired_face"],"🥱":["yawn","yawning","yawning_face"],"😤":["nose_steam","triumph"],"😡":["pout","pouting_face","rage"],"😠":["angry","angry_face"],"🤬":["censored","face_with_symbols_on_mouth"],"😈":["smiling_imp"],"👿":["angry_imp","imp"],"💀":["skull"],"☠️":["skull_and_crossbones"],"💩":["poop","shit"],"🤡":["clown","clown_face"],"👹":["japanese_ogre","ogre"],"👺":["goblin","japanese_goblin"],"👻":["ghost"],"👽️":["alien"],"👾":["alien_monster","space_invader"],"🤖":["robot","robot_face"],"😺":["grinning_cat","smiley_cat"],"😸":["grinning_cat_with_closed_eyes","smile_cat"],"😹":["joy_cat","tears_of_joy_cat"],"😻":["heart_eyes_cat","smiling_cat_with_heart_eyes"],"😼":["smirk_cat","wry_smile_cat"],"😽":["kissing_c
456at"],"🙀":["scream_cat","weary_cat"],"😿":["crying_cat"],"😾":["pouting_cat"],"🙈":["see_no_evil"],"🙉":["hear_no_evil"],"🙊":["speak_no_evil"],"💋":["kiss"],"💌":["love_letter"],"💘":["cupid","heart_with_arrow"],"💝":["gift_heart","heart_with_ribbon"],"💖":["sparkling_heart"],"💗":["growing_heart","heartpulse"],"💓":["beating_heart","heartbeat"],"💞":["revolving_hearts"],"💕":["two_hearts"],"💟":["heart_decoration"],"❣️":["heart_exclamation"],"💔":["broken_heart"],"❤️‍🔥":["heart_on_fire"],"❤️‍🩹":["mending_heart"],"❤️":["heart","red_heart"],"🧡":["orange_heart"],"💛":["yellow_heart"],"💚":["green_heart"],"💙":["blue_heart"],"💜":["purple_heart"],"🤎":["brown_heart"],"🖤":["black_heart"],"🤍":["white_heart"],"💯":["100"],"💢":["anger"],"💥":["boom","collision"],"💫":["dizzy"],"💦":["sweat_drops"],"💨":["dash","dashing_away"],"🕳️":["hole"],"💣️":["bomb"],"💬":["speech_balloon"],"👁‍🗨":["eye_in_speech_bubble"],"🗨️":["left_speech_bubble"],"🗯️":["right_anger_bubble"],"💭":["thought_balloon"],"💤":["zzz"],"👋":["wave","waving_hand"],"🤚":["raised_back_of_hand"],"🖐️":["raised_hand_with_fingers_splayed"],"✋":["high_five","raised_hand"],"🖖":["vulcan"],"🫱":["rightwards_hand"],"🫲":["leftwards_hand"],"🫳":["palm_down"],"🫴":["palm_up"],"👌":["ok_hand"],"🤌":["pinch","pinched_fingers"],"🤏":["pinching_hand"],"✌️":["v","victory"],"🤞":["fingers_crossed"],"🫰":["hand_with_index_finger_and_thumb_crossed"],"🤟":["love_you_gesture"],"🤘":["metal","sign_of_the_horns"],"🤙":["call_me_hand"],"👈️":["point_left"],"👉️":["point_right"],"👆️":["point_up"],"🖕":["middle_finger"],"👇️":["point_down"],"☝️":["point_up_2"],"🫵":["point_forward"],"👍️":["+1","thumbsup","yes"],"👎️":["-1","no","thumbsdown"],"✊":["fist"],"👊":["punch"],"🤛":["left_facing_fist"],"🤜":["right_facing_fist"],"👏":["clap","clapping_hands"],"🙌":["raised_hands"],"🫶":["heart_hands"],"👐":["open_hands"],"🤲":["palms_up_together"],"🤝":["handshake"],"🙏":["folded_hands","pray"],"✍️":["writing_hand"],"💅":["nail_care","nail_polish"],"🤳":["selfie"],"💪":["muscle","right_bicep"],"🦾":["mechanical_arm"],"🦿":["mechanical_leg"],"🦵":["leg"],"🦶":["foot"],"👂️":["ear"],"🦻":["ear_with_hearing_aid","hearing_aid"],"👃":["nose"],"🧠":["brain"],"🫀":["anatomical_heart"],"🫁":["lungs"],"🦷":["tooth"],"🦴":["bone"],"👀":["eyes"],"👁️":["eye"],"👅":["tongue"],"👄":["lips","mouth"],"🫦":["biting_lip"],"👶":["baby"],"🧒":["child"],"👦":["boy"],"👧":["girl"],"🧑":["adult"],"👱":["blond_haired"],"👨":["man"],"🧔":["person_bearded"],"🧔‍♂️":["man_bearded"],"🧔‍♀️":["woman_bearded"],"👨‍🦰":["man_red_haired"],"👨‍🦱":["man_curly_haired"],"👨‍🦳":["man_white_haired"],"👨‍🦲":["man_bald"],"👩":["woman"],"👩‍🦰":["woman_red_haired"],"🧑‍🦰":["red_haired"],"👩‍🦱":["woman_curly_haired"],"🧑‍🦱":["curly_haired"],"👩‍🦳":["woman_white_haired"],"🧑‍🦳":["white_haired"],"👩‍🦲":["woman_bald"],"🧑‍🦲"
456:["bald"],"👱‍♀️":["woman_blond_haired"],"👱‍♂️":["man_blond_haired"],"🧓":["older_adult"],"👴":["older_man"],"👵":["older_woman"],"🙍":["person_frowning"],"🙍‍♂️":["man_frowning"],"🙍‍♀️":["woman_frowning"],"🙎":["person_pouting","pouting"],"🙎‍♂️":["man_pouting"],"🙎‍♀️":["woman_pouting"],"🙅":["no_good","person_gesturing_no"],"🙅‍♂️":["man_gesturing_no"],"🙅‍♀️":["woman_gesturing_no"],"🙆":["all_good","person_gesturing_ok"],"🙆‍♂️":["man_gesturing_ok"],"🙆‍♀️":["woman_gesturing_ok"],"💁":["person_tipping_hand"],"💁‍♂️":["man_tipping_hand"],"💁‍♀️":["woman_tipping_hand"],"🙋":["person_raising_hand"],"🙋‍♂️":["man_raising_hand"],"🙋‍♀️":["woman_raising_hand"],"🧏":["deaf_person"],"🧏‍♂️":["deaf_man"],"🧏‍♀️":["deaf_woman"],"🙇":["bow","person_bowing"],"🙇‍♂️":["man_bowing"],"🙇‍♀️":["woman_bowing"],"🤦":["facepalm","person_facepalming"],"🤦‍♂️":["man_facepalming"],"🤦‍♀️":["woman_facepalming"],"🤷":["person_shrugging","shrug"],"🤷‍♂️":["man_shrugging"],"🤷‍♀️":["woman_shrugging"],"🧑‍⚕️":["health_worker"],"👨‍⚕️":["man_health_worker"],"👩‍⚕️":["woman_health_worker"],"🧑‍🎓":["student"],"👨‍🎓":["man_student"],"👩‍🎓":["woman_student"],"🧑‍🏫":["teacher"],"👨‍🏫":["man_teacher"],"👩‍🏫":["woman_teacher"],"🧑‍⚖️":["judge"],"👨‍⚖️":["man_judge"],"👩‍⚖️":["woman_judge"],"🧑‍🌾":["farmer"],"👨‍🌾":["man_farmer"],"👩‍🌾":["woman_farmer"],"🧑‍🍳":["cook"],"👨‍🍳":["man_cook"],"👩‍🍳":["woman_cook"],"🧑‍🔧":["mechanic"],"👨‍🔧":["man_mechanic"],"👩‍🔧":["woman_mechanic"],"🧑‍🏭":["factory_worker"],"👨‍🏭":["man_factory_worker"],"👩‍🏭":["woman_factory_worker"],"🧑‍💼":["office_worker"],"👨‍💼":["man_office_worker"],"👩‍💼":["woman_office_worker"],"🧑‍🔬":["scientist"],"👨‍🔬":["man_scientist"],"👩‍🔬":["woman_scientist"],"🧑‍💻":["technologist"],"👨‍💻":["man_technologist"],"👩‍💻":["woman_technologist"],"🧑‍🎤":["singer"],"👨‍🎤":["man_singer"],"👩‍🎤":["woman_singer"],"🧑‍🎨":["artist"],"👨‍🎨":["man_artist"],"👩‍🎨":["woman_artist"],"🧑‍✈️":["pilot"],"👨‍✈️":["man_pilot"],"👩‍✈️":["woman_pilot"],"🧑‍🚀":["astronaut"],"👨‍🚀":["man_astronaut"],"👩‍🚀":["woman_astronaut"],"🧑‍🚒":["firefighter"],"👨‍🚒":["man_firefighter"],"👩‍🚒":["woman_firefighter"],"👮":["cop","police_officer"],"👮‍♂️":["man_police_officer"],"👮‍♀️":["woman_police_officer"],"🕵️":["detective"],"🕵️‍♂️":["man_detective"],"🕵️‍♀️":["woman_detective"],"💂":["guard"],"💂‍♂️":["man_guard"],"💂‍♀️":["woman_guard"],"🥷":["ninja"],"👷":["construction_worker"],"👷‍♂️":["man_construction_worker"],"👷‍♀️":["woman_construction_worker"],"🫅":["person_with_crown","royalty"],"🤴":["prince"],"👸":["princess"],"👳":["person_wearing_turban"],"👳‍♂️":["man_wearing_turban"],"👳‍♀️":["woman_wearing_turban"],"👲":["person_with_skullcap"],"🧕":["woman_with_headscarf"],"🤵":["person_in_tuxedo"],"🤵‍♂️":["man_in_tuxedo"],"🤵‍♀️":["woman_in_tuxedo"],"👰":["person_with_veil"],"👰‍♂️":["man_with_veil"],"👰‍♀️":["woman_with_veil"],"🤰":["pregnant_woman"],"🫃":["pregnant_man"],"🫄":["pregnant_person"],"🤱":["breast_feeding"],"👩‍🍼":["woman_feeding_baby"],"👨‍🍼":["man_feeding_baby"],"🧑‍🍼":["person_feeding_baby"],"👼":["angel"],"🎅":["santa"],"🤶":["mrs_claus"],"🧑‍🎄":["mx_claus"],"🦸":["superhero"],"🦸‍♂️":["man_superhero"],"🦸‍♀️":["woman_superhero"],"🦹":["supervillain"],"🦹‍♂️":["man_supervillain"],"🦹‍♀️":["woman_supervillain"],"🧙":["mage"],"🧙‍♂️":["man_mage"],"🧙‍♀️":["woman_mage"],"🧚":["fairy"],"🧚‍♂️":["man_fairy"],"🧚‍♀️":["woman_fairy"],"🧛":["vampire"],"🧛‍♂️":["man_vampire"],"🧛‍♀️":["woman_vampire"],"🧜":["merperson"],"🧜‍♂️":["merman"],"🧜‍♀️":["mermaid"],"🧝":["elf"],"🧝‍♂️":["man_elf"],"🧝‍♀️":["woman_elf"],"🧞":["genie"],"🧞‍♂️":["man_genie"],"🧞‍♀️":["woman_genie"],"🧟":["zombie"],"🧟‍♂️":["man_zombie"],"🧟‍♀️":["woman_zombie"],"🧌":["troll"],"💆":["massage","person_getting_massage"],"💆‍♂️":["man_getting_massage"],"💆‍♀️":["woman_getting_massage"],"💇":["haircut","person_getting_haircut"],"💇‍♂️":["man_getting_haircut"],"💇‍♀️":["woman_getting_haircut"],"🚶":["person_walking","walking"],"🚶‍♂️":["man_walking"],"🚶‍♀️":["woman_walking"],"🧍":["person_standing","standing"],"🧍‍♂️":["man_standing"],"🧍‍♀️":["woman_standing"],"🧎":["kneeling","person_kneeling"],"🧎‍♂️":["man_kneeling"],"🧎‍♀️":["woman_kneeling"],"🧑‍🦯":["person_with_probing_cane","person_with_white_c
456ane"],"👨‍🦯":["man_with_probing_cane","man_with_white_cane"],"👩‍🦯":["woman_with_probing_cane","woman_with_white_cane"],"🧑‍🦼":["person_in_motorized_wheelchair"],"👨‍🦼":["man_in_motorized_wheelchair"],"👩‍🦼":["woman_in_motorized_wheelchair"],"🧑‍🦽":["person_in_manual_wheelchair"],"👨‍🦽":["man_in_manual_wheelchair"],"👩‍🦽":["woman_in_manual_wheelchair"],"🏃":["person_running","running"],"🏃‍♂️":["man_running"],"🏃‍♀️":["woman_running"],"💃":["dancer","woman_dancing"],"🕺":["man_dancing"],"🕴️":["levitate","levitating","person_in_suit_levitating"],"👯":["dancers","people_with_bunny_ears_partying"],"👯‍♂️":["men_with_bunny_ears_partying"],"👯‍♀️":["women_with_bunny_ears_partying"],"🧖":["person_in_steamy_room"],"🧖‍♂️":["man_in_steamy_room"],"🧖‍♀️":["woman_in_steamy_room"],"🧗":["climbing","person_climbing"],"🧗‍♂️":["man_climbing"],"🧗‍♀️":["woman_climbing"],"🤺":["fencer","fencing","person_fencing"],"🏇":["horse_racing"],"⛷️":["person_skiing","skier","skiing"],"🏂️":["person_snowboarding","snowboarder","snowboarding"],"🏌️":["golfer","golfing","person_golfing"],"🏌️‍♂️":["man_golfing"],"🏌️‍♀️":["woman_golfing"],"🏄️":["person_surfing","surfer","surfing"],"🏄‍♂️":["man_surfing"],"🏄‍♀️":["woman_surfing"],"🚣":["person_rowing_boat","rowboat"],"🚣‍♂️":["man_rowing_boat"],"🚣‍♀️":["woman_rowing_boat"],"🏊️":["person_swimming","swimmer","swimming"],"🏊‍♂️":["man_swimming"],"🏊‍♀️":["woman_swimming"],"⛹️":["person_bouncing_ball"],"⛹️‍♂️":["man_bouncing_ball"],"⛹️‍♀️":["woman_bouncing_ball"],"🏋️":["person_lifting_weights","weight_lifter","weight_lifting"],"🏋️‍♂️":["man_lifting_weights"],"🏋️‍♀️":["woman_lifting_weights"],"🚴":["bicyclist","biking","person_biking"],"🚴‍♂️":["man_biking"],"🚴‍♀️":["woman_biking"],"🚵":["mountain_bicyclist","mountain_biking","person_mountain_biking"],"🚵‍♂️":["man_mountain_biking"],"🚵‍♀️":["woman_mountain_biking"],"🤸":["cartwheeling","person_cartwheel"],"🤸‍♂️":["man_cartwheeling"],"🤸‍♀️":["woman_cartwheeling"],"🤼":["people_wrestling","wrestlers","wrestling"],"🤼‍♂️":["men_wrestling"],"🤼‍♀️":["women_wrestling"],"🤽":["person_playing_water_polo","water_polo"],"🤽‍♂️":["man_playing_water_polo"],"🤽‍♀️":["woman_playing_water_polo"],"🤾":["handball","person_playing_handball"],"🤾‍♂️":["man_playing_handball"],"🤾‍♀️":["woman_playing_handball"],"🤹":["juggler","juggling","person_juggling"],"🤹‍♂️":["man_juggling"],"🤹‍♀️":["woman_juggling"],"🧘":["person_in_lotus_position"],"🧘‍♂️":["man_in_lotus_position"],"🧘‍♀️":["woman_in_lotus_position"],"🛀":["bath","person_taking_bath"],"🛌":["person_in_bed","sleeping_accommodation"],"🧑‍🤝‍🧑":["people_holding_hands"],"👭":["two_women_holding_hands"],"👫":["couple"],"👬":["two_men_holding_hands"],"💏":["couple_kiss","couplekiss"],"👩‍❤️‍💋‍👨":["kiss_mw","kiss_wm"],"👨‍❤️‍💋‍👨":["kiss_mm"],"👩‍❤️‍💋‍👩":["kiss_ww"],"💑":["couple_with_heart"],"👩‍❤️‍👨":["couple_with_heart_mw","couple_with_heart_wm"],"👨‍❤️‍👨":["couple_with_heart_mm"],"👩‍❤️‍👩":["couple_with_heart_ww"],"👪️":["family"],"👨‍👩‍👦":["family_mwb"],"👨‍👩‍👧":["family_mwg"],"👨‍👩‍👧‍👦":["family_mwgb"],"👨‍👩‍👦‍👦":["family_mwbb"],"👨‍👩‍👧‍👧":["family_mwgg"],"👨‍👨‍👦":["family_mmb"],"👨‍👨‍👧":["family_mmg"],"👨‍👨‍👧‍👦":["family_mmgb"],"👨‍👨‍👦‍👦":["family_mmbb"],"👨‍👨‍👧‍👧":["family_mmgg"],"👩‍👩‍👦":["family_wwb"],"👩‍👩‍👧":["family_wwg"],"👩‍👩‍👧‍👦":["family_wwgb"],"👩‍👩‍👦‍👦":["family_wwbb"],"👩‍👩‍👧‍👧":["family_wwgg"],"👨‍👦":["family_mb"],"👨‍👦‍👦":["family_mbb"],"👨‍👧":["family_mg"],"👨‍👧‍👦":["family_mgb"],"👨‍👧‍👧":["family_mgg"],"👩‍👦":["family_wb"],"👩‍👦‍👦":["family_wbb"],"👩‍👧":["family_wg"],"👩‍👧‍👦":["family_wgb"],"👩‍👧‍👧":["family_wgg"],"🗣️":["speaking_head"],"👤":["bust_in_silhouette"],"👥":["busts_in_silhouette"],"🫂":["people_hugging"],"👣":["footprints"],"🏻":["tone1","tone_light"],"🏼":["tone2","tone_medium_light"],"🏽":["tone3","tone_medium"],"🏾":["tone4","tone_medium_dark"],"🏿":["tone5","tone_dark"],"🦰":["red_hair"],"🦱":["curly_hair"],"ðŸ¦
456³":["white_hair"],"🦲":["no_hair"],"🐵":["monkey_face"],"🐒":["monkey"],"🦍":["gorilla"],"🦧":["orangutan"],"🐶":["dog_face"],"🐕️":["dog"],"🦮":["guide_dog"],"🐕‍🦺":["service_dog"],"🐩":["poodle"],"🐺":["wolf","wolf_face"],"🦊":["fox","fox_face"],"🦝":["raccoon"],"🐱":["cat_face"],"🐈️":["cat"],"🐈‍⬛":["black_cat"],"🦁":["lion","lion_face"],"🐯":["tiger_face"],"🐅":["tiger"],"🐆":["leopard"],"🐴":["horse_face"],"🐎":["horse","racehorse"],"🦄":["unicorn","unicorn_face"],"🦓":["zebra"],"🦌":["deer"],"🦬":["bison"],"🐮":["cow_face"],"🐂":["ox"],"🐃":["water_buffalo"],"🐄":["cow"],"🐷":["pig_face"],"🐖":["pig"],"🐗":["boar"],"🐽":["pig_nose"],"🐏":["ram"],"🐑":["ewe","sheep"],"🐐":["goat"],"🐪":["dromedary_camel"],"🐫":["camel"],"🦙":["llama"],"🦒":["giraffe"],"🐘":["elephant"],"🦣":["mammoth"],"🦏":["rhino","rhinoceros"],"🦛":["hippo"],"🐭":["mouse_face"],"🐁":["mouse"],"🐀":["rat"],"🐹":["hamster","hamster_face"],"🐰":["rabbit_face"],"🐇":["rabbit"],"🐿️":["chipmunk"],"🦫":["beaver"],"🦔":["hedgehog"],"🦇":["bat"],"🐻":["bear","bear_face"],"🐻‍❄️":["polar_bear","polar_bear_face"],"🐨":["koala","koala_face"],"🐼":["panda","panda_face"],"🦥":["sloth"],"🦦":["otter"],"🦨":["skunk"],"🦘":["kangaroo"],"🦡":["badger"],"🐾":["paw_prints"],"🦃":["turkey"],"🐔":["chicken","chicken_face"],"🐓":["rooster"],"🐣":["hatching_chick"],"🐤":["baby_chick"],"🐥":["hatched_chick"],"🐦️":["bird","bird_face"],"🐧":["penguin","penguin_face"],"🕊️":["dove"],"🦅":["eagle"],"🦆":["duck"],"🦢":["swan"],"🦉":["owl"],"🦤":["dodo"],"🪶":["feather"],"🦩":["flamingo"],"🦚":["peacock"],"🦜":["parrot"],"🐸":["frog","frog_face"],"🐊":["crocodile"],"🐢":["turtle"],"🦎":["lizard"],"🐍":["snake"],"🐲":["dragon_face"],"🐉":["dragon"],"🦕":["sauropod"],"🦖":["t-rex","trex"],"🐳":["spouting_whale"],"🐋":["whale"],"🐬":["dolphin"],"🦭":["seal"],"🐟️":["fish"],"🐠":["tropical_fish"],"🐡":["blowfish"],"🦈":["shark"],"🐙":["octopus"],"🐚":["shell"],"🪸":["coral"],"🐌":["snail"],"🦋":["butterfly"],"🐛":["bug"],"🐜":["ant"],"🐝":["bee"],"🪲":["beetle"],"🐞":["lady_beetle"],"🦗":["cricket"],"🪳":["cockroach"],"🕷️":["spider"],"🕸️":["spider_web"],"🦂":["scorpion"],"🦟":["mosquito"],"🪰":["fly"],"🪱":["worm"],"🦠":["microbe"],"💐":["bouquet"],"🌸":["cherry_blossom"],"💮":["white_flower"],"🪷":["lotus"],"🏵️":["rosette"],"🌹":["rose"],"🥀":["wilted_flower"],"🌺":["hibiscus"],"🌻":["sunflower"],"🌼":["blossom"],"🌷":["tulip"],"🌱":["seedling"],"🪴":["potted_plant"],"🌲":["evergreen_tree"],"🌳":["deciduous_tree"],"🌴":["palm_tree"],"🌵":["cactus"],"🌾":["ear_of_rice","sheaf_of_rice"],"🌿":["herb"],"☘️":["shamrock"],"🍀":["four_leaf_clover"],"🍁":["maple_leaf"],"🍂":["fallen_leaf"],"🍃":["leaves"],"🪹":["empty_nest","nest"],"🪺":["nest_with_eggs"],"🍇":["grapes"],"🍈":["melon"],"🍉":["watermelon"],"🍊":["orange","tangerine"],"🍋":["lemon"],"🍌":["banana"],"🍍":["pineapple"],"🥭":["mango"],"🍎":["apple","red_apple"],"🍏":["green_apple"],"🍐":["pear"],"🍑":["peach"],"🍒":["cherries"],"🍓":["strawberry"],"🫐":["blueberries"],"🥝":["kiwi"],"🍅":["tomato"],"🫒":["olive"],"🥥":["coconut"],"🥑":["avocado"],"🍆":["eggplant"],"🥔":["potato"],"🥕":["carrot"],"🌽":["corn","ear_of_corn"],"🌶️":["hot_pepper"],"🫑":["bell_pepper"],"🥒":["cucumber"],"🥬":["leafy_green"],"🥦":["broccoli"],"🧄":["garlic"],"🧅":["onion"],"🍄":["mushroom"],"🥜":["peanuts"],"🫘":["beans"],"🌰":["chestnut"],"🍞":["bread"],"🥐":["croissant"],"🥖":["baguette_bread"],"🫓":["flatbread"],"🥨":["pretzel"],"🥯":["bagel"],"🥞":["pancakes"],"🧇":["waffle"],"🧀":["cheese"],"🍖":["meat_on_bone"],"🍗":["poultry_leg"],"🥩":["cut_of_meat"],"🥓":["bacon"],"🍔":["hamburger"],"🍟":["french_fries","fries"],"🍕":["pizza"],"🌭":["hotdog"],"🥪":["sandwich"],"🌮":["taco"],"🌯":["burrito"],"🫔":["tamale"],"🥙":["stuffed_flatbread"],"🧆":["falafel"],"🥚":["egg"],"🍳":["cooking","fried_egg"],"🥘":["shallow_pan_of_food"],"🍲":["pot_of_food","stew"],"🫕":["fondue"],"🥣":["bowl_with_spoon"],"🥗":["green_salad","salad"],"🍿":["popcorn"],"🧈":["butter"],"🧂":["salt"],"🥫":["canned_food"],"🍱":["bento","bento_box"],"🍘":["rice_cracker"],"🍙":["rice_ball"],"🍚":["co
456oked_rice","rice"],"🍛":["curry","curry_rice"],"🍜":["ramen","steaming_bowl"],"🍝":["spaghetti"],"🍠":["sweet_potato"],"🍢":["oden"],"🍣":["sushi"],"🍤":["fried_shrimp"],"🍥":["fish_cake"],"🥮":["moon_cake"],"🍡":["dango"],"🥟":["dumpling"],"🥠":["fortune_cookie"],"🥡":["takeout_box"],"🦀":["crab"],"🦞":["lobster"],"🦐":["shrimp"],"🦑":["squid"],"🦪":["oyster"],"🍦":["icecream","soft_serve"],"🍧":["shaved_ice"],"🍨":["ice_cream"],"🍩":["doughnut"],"🍪":["cookie"],"🎂":["birthday","birthday_cake"],"🍰":["cake","shortcake"],"🧁":["cupcake"],"🥧":["pie"],"🍫":["chocolate_bar"],"🍬":["candy"],"🍭":["lollipop"],"🍮":["custard"],"🍯":["honey_pot"],"🍼":["baby_bottle"],"🥛":["glass_of_milk","milk"],"☕️":["coffee"],"🫖":["teapot"],"🍵":["tea"],"🍶":["sake"],"🍾":["champagne"],"🍷":["wine_glass"],"🍸️":["cocktail"],"🍹":["tropical_drink"],"🍺":["beer"],"🍻":["beers"],"🥂":["clinking_glasses"],"🥃":["tumbler_glass","whisky"],"🫗":["pour","pouring_liquid"],"🥤":["cup_with_straw"],"🧋":["boba_drink","bubble_tea"],"🧃":["beverage_box","juice_box"],"🧉":["mate"],"🧊":["ice","ice_cube"],"🥢":["chopsticks"],"🍽️":["fork_knife_plate"],"🍴":["fork_and_knife"],"🥄":["spoon"],"🔪":["knife"],"🫙":["jar"],"🏺":["amphora"],"🌍️":["earth_africa","earth_europe"],"🌎️":["earth_americas"],"🌏️":["earth_asia"],"🌐":["globe_with_meridians"],"🗺️":["world_map"],"🗾":["japan_map"],"🧭":["compass"],"🏔️":["mountain_snow"],"⛰️":["mountain"],"🌋":["volcano"],"🗻":["mount_fuji"],"🏕️":["camping"],"🏖️":["beach","beach_with_umbrella"],"🏜️":["desert"],"🏝️":["desert_island","island"],"🏞️":["national_park"],"🏟️":["stadium"],"🏛️":["classical_building"],"🏗️":["building_construction","construction_site"],"🧱":["bricks"],"🪨":["rock"],"🪵":["wood"],"🛖":["hut"],"🏘️":["homes","houses"],"🏚️":["derelict_house","house_abandoned"],"🏠️":["house"],"🏡":["house_with_garden"],"🏢":["office"],"🏣":["post_office"],"🏤":["european_post_office"],"🏥":["hospital"],"🏦":["bank"],"🏨":["hotel"],"🏩":["love_hotel"],"🏪":["convenience_store"],"🏫":["school"],"🏬":["department_store"],"🏭️":["factory"],"🏯":["japanese_castle"],"🏰":["castle","european_castle"],"💒":["wedding"],"🗼":["tokyo_tower"],"🗽":["statue_of_liberty"],"⛪️":["church"],"🕌":["mosque"],"🛕":["hindu_temple"],"🕍":["synagogue"],"⛩️":["shinto_shrine"],"🕋":["kaaba"],"⛲️":["fountain"],"⛺️":["tent"],"🌁":["foggy"],"🌃":["night_with_stars"],"🏙️":["cityscape"],"🌄":["sunrise_over_mountains"],"🌅":["sunrise"],"🌆":["city_dusk"],"🌇":["city_sunrise","city_sunset"],"🌉":["bridge_at_night"],"♨️":["hotsprings"],"🎠":["carousel_horse"],"🛝":["playground_slide","slide"],"🎡":["ferris_wheel"],"🎢":["roller_coaster"],"💈":["barber","barber_pole"],"🎪":["circus_tent"],"🚂":["steam_locomotive"],"🚃":["railway_car"],"🚄":["bullettrain_side"],"🚅":["bullettrain_front"],"🚆":["train"],"🚇️":["metro"],"🚈":["light_rail"],"🚉":["station"],"🚊":["tram"],"🚝":["monorail"],"🚞":["mountain_railway"],"🚋":["tram_car"],"🚌":["bus"],"🚍️":["oncoming_bus"],"🚎":["trolleybus"],"🚐":["minibus"],"🚑️":["ambulance"],"🚒":["fire_engine"],"🚓":["police_car"],"🚔️":["oncoming_police_car"],"🚕":["taxi"],"🚖":["oncoming_taxi"],"🚗":["car","red_car"],"🚘️":["oncoming_automobile"],"🚙":["blue_car","suv"],"🛻":["pickup_truck"],"🚚":["delivery_truck","truck"],"🚛":["articulated_lorry"],"🚜":["tractor"],"🏎️":["racing_car"],"🏍️":["motorcycle"],"🛵":["motor_scooter"],"🦽":["manual_wheelchair"],"🦼":["motorized_wheelchair"],"🛺":["auto_rickshaw"],"🚲️":["bicycle","bike"],"🛴":["scooter"],"🛹":["skateboard"],"🛼":["roller_skate"],"🚏":["busstop"],"🛣️":["motorway"],"🛤️":["railway_track"],"🛢️":["oil_drum"],"⛽️":["fuelpump"],"🛞":["wheel"],"🚨":["rotating_light"],"🚥":["traffic_light"],"🚦":["vertical_traffic_light"],"🛑":["octagonal_sign","stop_sign"],"🚧":["construction"],"⚓️":["anchor"],"🛟":["lifebuoy","ring_buoy"],"⛵️":["sailboat"],"🛶":["canoe"],"🚤":["speedboat"],"🛳️":["cruise_ship","passenger_ship"],"⛴️":["ferry"],"🛥️":["motorboat"],"🚢":["ship"],"✈️":["airplane"],"🛩️":["small_airplane"],"🛫":["airplane_departure"],"🛬":["airplane_arriving"],"🪂":["parachute"],"💺":["seat"],"🚁":["helicopter"],"🚟":["suspension_railway"],"🚠":["mountain_cableway"],"🚡":["aerial_tramway"],"🛰️":["satellite"],"🚀":["rocket"],"🛸":["flying_saucer"],"🛎️":["bellhop"],"🧳":["luggage"],"⌛️":["hourglass"],"⏳️":["hourglass_flowing_sand"],"⌚️":["watch"],"⏰":["alarm_clock"],"⏱️":["stopwatch"],"⏲️":["timer_clock"],"🕰️":["clock"],"🕛️":["clock12"],"🕧️":["clock1230"],"🕐️":["clock1"],"🕜️":["clock130"],"🕑️":["clock2"],"🕝️":["clock230"],"🕒️":["clock3"],"🕞️":["clock330"],"🕓️":["clock4"],"🕟️":["clock430"],"🕔️":["clock5"],"🕠️":["clock530"],"🕕️":["clock6"],"🕡️":["clock630"],"🕖️":["clock7"],"🕢️":["clock730"],"🕗️":["clock8"],"🕣️":["clock830"],"🕘️":["clock9"],"🕤️":["clock930"],"🕙️":["clock10"],"🕥️":["clock1030"],"🕚️":["clock11"],"🕦️":["clock1130"],"🌑":["new_moon"],"🌒":["waxing_crescent_moon"],"🌓":["first_quarter_moon"],"🌔":["waxing_gibbous_moon"],"🌕️":["full_moon"],"🌖":["waning_gibbous_moon"],"🌗":["last_quarter_moon"],"🌘":["waning_crescent_moon"],"🌙":["crescent_moon"],"🌚":["new_moon_
456with_face"],"🌛":["first_quarter_moon_with_face"],"🌜️":["last_quarter_moon_with_face"],"🌡️":["thermometer"],"☀️":["sun"],"🌝":["full_moon_with_face"],"🌞":["sun_with_face"],"🪐":["ringed_planet","saturn"],"⭐️":["star"],"🌟":["glowing_star","star2"],"🌠":["shooting_star","stars"],"🌌":["milky_way"],"☁️":["cloud"],"⛅️":["partly_sunny","sun_behind_cloud"],"⛈️":["stormy","thunder_cloud_and_rain"],"🌤️":["sun_behind_small_cloud","sunny"],"🌥️":["cloudy","sun_behind_large_cloud"],"🌦️":["sun_and_rain","sun_behind_rain_cloud"],"🌧️":["cloud_with_rain","rainy"],"🌨️":["cloud_with_snow","snowy"],"🌩️":["cloud_with_lightning","lightning"],"🌪️":["tornado"],"🌫️":["fog"],"🌬️":["wind_blowing_face"],"🌀":["cyclone"],"🌈":["rainbow"],"🌂":["closed_umbrella"],"☂️":["umbrella"],"☔️":["umbrella_with_rain"],"⛱️":["beach_umbrella","umbrella_on_ground"],"⚡️":["high_voltage","zap"],"❄️":["snowflake"],"☃️":["snowman2"],"⛄️":["snowman"],"☄️":["comet"],"🔥":["fire"],"💧":["droplet"],"🌊":["ocean","water_wave"],"🎃":["jack_o_lantern"],"🎄":["christmas_tree"],"🎆":["fireworks"],"🎇":["sparkler"],"🧨":["firecracker"],"✨":["sparkles"],"🎈":["balloon"],"🎉":["party","party_popper","tada"],"🎊":["confetti_ball"],"🎋":["tanabata_tree"],"🎍":["bamboo"],"🎎":["dolls"],"🎏":["carp_streamer","flags"],"🎐":["wind_chime"],"🎑":["moon_ceremony","rice_scene"],"🧧":["red_envelope"],"🎀":["ribbon"],"🎁":["gift"],"🎗️":["reminder_ribbon"],"🎟️":["admission_tickets","tickets"],"🎫":["ticket"],"🎖️":["military_medal"],"🏆️":["trophy"],"🏅":["sports_medal"],"🥇":["1st","first_place_medal"],"🥈":["2nd","second_place_medal"],"🥉":["3rd","third_place_medal"],"⚽️":["soccer"],"⚾️":["baseball"],"🥎":["softball"],"🏀":["basketball"],"🏐":["volleyball"],"🏈":["football"],"🏉":["rugby_football"],"🎾":["tennis"],"🥏":["flying_disc"],"🎳":["bowling"],"🏏":["cricket_game"],"🏑":["field_hockey"],"🏒":["hockey"],"🥍":["lacrosse"],"🏓":["ping_pong"],"🏸":["badminton"],"🥊":["boxing_glove"],"🥋":["martial_arts_uniform"],"🥅":["goal_net"],"⛳️":["golf"],"⛸️":["ice_skate"],"🎣":["fishing_pole","fishing_pole_and_fish"],"🤿":["diving_mask"],"🎽":["running_shirt","running_shirt_with_sash"],"🎿":["ski"],"🛷":["sled"],"🥌":["curling_stone"],"🎯":["bullseye","dart","direct_hit"],"🪀":["yo_yo"],"🪁":["kite"],"🎱":["8ball","billiards"],"🔮":["crystal_ball"],"🪄":["magic_wand"],"🧿":["nazar_amulet"],"🪬":["hamsa"],"🎮️":["controller","video_game"],"🕹️":["joystick"],"🎰":["slot_machine"],"🎲":["game_die"],"🧩":["jigsaw","puzzle_piece"],"🧸":["teddy_bear"],"🪅":["pinata"],"🪩":["disco","disco_ball","mirror_ball"],"🪆":["nesting_dolls"],"♠️":["spades"],"♥️":["hearts"],"♦️":["diamonds"],"♣️":["clubs"],"♟️":["chess_pawn"],"🃏":["black_joker"],"🀄️":["mahjong"],"🎴":["flower_playing_cards"],"🎭️":["performing_arts"],"🖼️":["frame_with_picture","framed_picture"],"🎨":["art","palette"],"🧵":["thread"],"🪡":["sewing_needle"],"🧶":["yarn"],"🪢":["knot"],"👓️":["eyeglasses","glasses"],"🕶️":["sunglasses"],"🥽":["goggles"],"🥼":["lab_coat"],"🦺":["safety_vest"],"👔":["necktie"],"👕":["shirt"],"👖":["jeans"],"🧣":["scarf"],"🧤":["gloves"],"🧥":["coat"],"🧦":["socks"],"👗":["dress"],"👘":["kimono"],"🥻":["sari"],"🩱":["one_piece_swimsuit"],"🩲":["briefs"],"🩳":["shorts"],"👙":["bikini"],"👚":["womans_clothes"],"👛":["purse"],"👜":["handbag"],"👝":["clutch_bag","pouch"],"🛍️":["shopping_bags"],"🎒":["backpack","school_satchel"],"🩴":["thong_sandal"],"👞":["mans_shoe"],"👟":["athletic_shoe","sneaker"],"🥾":["hiking_boot"],"🥿":["flat_shoe","womans_flat_shoe"],"👠":["high_heel"],"👡":["sandal"],"🩰":["ballet_shoes"],"👢":["boot"],"👑":["crown"],"👒":["womans_hat"],"🎩":["top_hat","tophat"],"🎓️":["graduation_cap","mortar_board"],"🧢":["billed_cap"],"🪖":["military_helmet"],"⛑️":["helmet_with_cross","rescue_worker_helmet"],"📿":["prayer_beads"],"💄":["lipstick"],"💍":["ring"],"💎":["gem"],"🔇":["mute","no_sound"],"🔈️":["low_volume","quiet_sound","speaker"],"🔉":["medium_volumne","sound"],"🔊":["high_volume","loud_sound"],"📢":["loudspeaker"],"📣":["mega","megaphone"],"📯":["postal_horn"],"🔔":["bell"],"🔕":["no_bell"],"🎼":["musical_score"],"🎵":["musical_note"],"🎶":["musical_notes","notes"],"🎙️":["studio_microphone"],"🎚️":["level_slider"],"🎛️":["control_knobs"],"🎤":["microphone"],"🎧️":["headphones"],"📻️":["radio"],"🎷":["saxophone"],"🪗":["accordion"],"🎸":["guitar"],"🎹":["musical_keyboard"],"🎺":["trumpet"],"🎻":["violin"],"🪕":["banjo"],"🥁":["drum"],"🪘":["long_drum"],"📱":["android","iphone","mobile_phone"],"📲":["calling","mobile_phone_arrow"],"☎️":["telephone"],"📞":["telephone_receiver"],"📟️":["pager"],"📠":["fax","fax_machine"],"🔋":["battery"],"🪫":["low_battery"],"🔌":["electric_plug"],"💻️":["laptop"],"🖥️":["computer","desktop_computer"],"🖨️":["printer"],"⌨️":["keyboard"],"🖱️":["computer_mouse"],"🖲️":["trackball"],"💽":["computer_disk","minidisc"],"💾":["floppy_disk"],"💿️":["cd","optical_disk"],"📀":["dvd"],"🧮":["abacus"],"🎥":["movie_camera"],"🎞️":["film_frames"],"📽️":["film_projector"],"🎬️":["clapper"],"📺️":["tv"],"📷️":["camera"],"📸":["camera_with_flash"],"📹️":["video_camera"],"📼":["vhs","videocassette"],"🔍️":["mag"],"🔎":["mag_right"],"🕯️":["candle"],"💡":["bulb","light_bulb"],"🔦":["flashlight"],"🏮":["izakaya_lantern","red_paper_lantern"],"🪔":["diya_lamp"],"📔":["notebook_with_decorative_cover"],"📕":["closed_book"],"📖":["book","open_book"],"📗":["green_book"],"📘":["blue_book"],"📙":["orange_book"],"📚️":["books"],"📓":["notebook"],"📒":["ledger"],"📃":["page_with_curl"],"📜":["scroll"],"📄":["page_facing_up"],"📰":["newspaper"],"🗞️":["rolled_up_newspaper"],"📑":["bookmark_tabs"],"🔖":["bookmark"],"🏷️":["label"],"💰️":["moneybag"],"🪙":["coin"],"💴":["yen"],"💵":["dollar"],"💶":["euro"],"💷":["pound"],"💸":["money_with_wings"],"💳️":["credit_card"],"🧾":["receipt"],"💹":["chart"],"✉️":["envelope"],"📧":["e-mail","email"],"📨":["incoming_envelope"],"📩":["envelope_with_arrow"],"📤️":["outbox_tray"],"📥️":["inbox_tray"],"📦️":["package"],"📫️":["mailbox"],"📪️":["mailbox_closed"],"📬️":["mailbox_with_mail"],"📭️":["mailbox_with_no_mail"],"📮":["postbox"],"🗳️":["ballot_box"],"✏️":["pencil"],"✒️":["black_nib"],"🖋️":["fountain_pen"],"🖊️":["pen"],"🖌️":["paintbrush"],"🖍️":["crayon"],"📝":["memo"],"💼":["briefcase"],"📁":["file_folder"],"📂":["open_file_folder"],"🗂️":["card_index_dividers"],"📅":["date"],"📆":["calendar"],"🗒️":["notepad_spiral"],"🗓️":["calendar_spiral"],"📇":["card_index"],"📈":["chart_increasing","chart_with_upwards_trend"],"📉":["chart_decreasing","chart_with_downwards_trend"],"📊":["bar_chart"],"📋️":["clipboard"],"ðŸ“
456Œ":["pushpin"],"📍":["round_pushpin"],"📎":["paperclip"],"🖇️":["paperclips"],"📏":["straight_ruler"],"📐":["triangular_ruler"],"✂️":["scissors"],"🗃️":["card_file_box"],"🗄️":["file_cabinet"],"🗑️":["trashcan","wastebasket"],"🔒️":["lock","locked"],"🔓️":["unlock","unlocked"],"🔏":["lock_with_ink_pen","locked_with_pen"],"🔐":["closed_lock_with_key","locked_with_key"],"🔑":["key"],"🗝️":["old_key"],"🔨":["hammer"],"🪓":["axe"],"⛏️":["pick"],"⚒️":["hammer_and_pick"],"🛠️":["hammer_and_wrench"],"🗡️":["dagger"],"⚔️":["crossed_swords"],"🔫":["gun","pistol"],"🪃":["boomerang"],"🏹":["bow_and_arrow"],"🛡️":["shield"],"🪚":["carpentry_saw"],"🔧":["wrench"],"🪛":["screwdriver"],"🔩":["nut_and_bolt"],"⚙️":["gear"],"🗜️":["clamp","compression"],"⚖️":["scales"],"🦯":["probing_cane","white_cane"],"🔗":["link"],"⛓️":["chains"],"🪝":["hook"],"🧰":["toolbox"],"🧲":["magnet"],"🪜":["ladder"],"⚗️":["alembic"],"🧪":["test_tube"],"🧫":["petri_dish"],"🧬":["dna","double_helix"],"🔬":["microscope"],"🔭":["telescope"],"📡":["satellite_antenna"],"💉":["syringe"],"🩸":["drop_of_blood"],"💊":["pill"],"🩹":["adhesive_bandage","bandaid"],"🩼":["crutch"],"🩺":["stethoscope"],"🩻":["x-ray","xray"],"🚪":["door"],"🛗":["elevator"],"🪞":["mirror"],"🪟":["window"],"🛏️":["bed"],"🛋️":["couch_and_lamp"],"🪑":["chair"],"🚽":["toilet"],"🪠":["plunger"],"🚿":["shower"],"🛁":["bathtub"],"🪤":["mouse_trap"],"🪒":["razor"],"🧴":["lotion_bottle"],"🧷":["safety_pin"],"🧹":["broom"],"🧺":["basket"],"🧻":["roll_of_paper","toilet_paper"],"🪣":["bucket"],"🧼":["soap"],"🫧":["bubbles"],"🪥":["toothbrush"],"🧽":["sponge"],"🧯":["fire_extinguisher"],"🛒":["shopping_cart"],"🚬":["cigarette","smoking"],"⚰️":["coffin"],"🪦":["headstone"],"⚱️":["funeral_urn"],"🗿":["moai","moyai"],"🪧":["placard"],"🪪":["id_card"],"🏧":["atm"],"🚮":["litter_bin","put_litter_in_its_place"],"🚰":["potable_water"],"♿️":["handicapped","wheelchair"],"🚹️":["mens"],"🚺️":["womens"],"🚻":["bathroom","restroom"],"🚼️":["baby_symbol"],"🚾":["water_closet","wc"],"🛂":["passport_control"],"🛃":["customs"],"🛄":["baggage_claim"],"🛅":["left_luggage"],"⚠️":["warning"],"🚸":["children_crossing"],"⛔️":["no_entry"],"🚫":["no_entry_sign"],"🚳":["no_bicycles"],"🚭️":["no_smoking"],"🚯":["do_not_litter","no_littering"],"🚱":["non-potable_water"],"🚷":["no_pedestrians"],"📵":["no_mobile_phones"],"🔞":["no_one_under_18","underage"],"☢️":["radioactive"],"☣️":["biohazard"],"⬆️":["arrow_up"],"↗️":["arrow_upper_right"],"➡️":["arrow_right"],"↘️":["arrow_lower_right"],"⬇️":["arrow_down"],"↙️":["arrow_lower_left"],"⬅️":["arrow_left"],"↖️":["arrow_upper_left"],"↕️":["arrow_up_down"],"↔️":["left_right_arrow"],"↩️":["arrow_left_hook","leftwards_arrow_with_hook"],"↪️":["arrow_right_hook","rightwards_arrow_with_hook"],"⤴️":["arrow_heading_up"],"⤵️":["arrow_heading_down"],"🔃":["arrows_clockwise","clockwise"],"🔄":["arrows_counterclockwise","counterclockwise"],"🔙":["back"],"🔚":["end"],"🔛":["on"],"🔜":["soon"],"🔝":["top"],"🛐":["place_of_worship"],"⚛️":["atom","atom_symbol"],"🕉️":["om"],"✡️":["star_of_david"],"☸️":["wheel_of_dharma"],"☯️":["yin_yang"],"✝️":["latin_cross"],"☦️":["orthodox_cross"],"☪️":["star_and_crescent"],"☮️":["peace","peace_symbol"],"🕎":["menorah"],"🔯":["six_pointed_star"],"♈️":["aries"],"♉️":["taurus"],"♊️":["gemini"],"♋️":["cancer"],"♌️":["leo"],"♍️":["virgo"],"♎️":["libra"],"♏️":["scorpius"],"♐️":["sagittarius"],"♑️":["capricorn"],"♒️":["aquarius"],"♓️":["pisces"],"⛎":["ophiuchus"],"🔀":["shuffle","twisted_rightwards_arrows"],"🔁":["repeat"],"🔂":["repeat_one"],"▶️":["arrow_forward","play"],"⏩️":["fast_forward"],"⏭️":["next_track"],"⏯️":["play_pause"],"◀️":["arrow_backward","reverse"],"⏪️":["fast_reverse","rewind"],"⏮️":["previous_track"],"🔼":["arrow_up_small","up"],"⏫":["arrow_double_up","fast_up"],"🔽":["arrow_down_small","down"],"⏬":["arrow_double_down","fast_down"],"⏸️":["pause"],"⏹️":["stop"],"⏺️":["record"],"⏏️":["eject"],"🎦":["cinema"],"🔅":["dim_button","low_brightness"],"🔆":["bright_button","high_brightness"],"📶":["antenna_bars","signal_strength"],"📳":["vibration_mode"],"📴":["mobile_phone_off"],"♀️":["female","female_sign"],"♂️":["male","male_sign"],"⚧️":["transgender_symbol"],"✖️":["multiplication","multiply"],"➕":["plus"],"➖":["minu
456s"],"➗":["divide","division"],"🟰":["heavy_equals_sign"],"♾️":["infinity"],"‼️":["bangbang","double_exclamation"],"⁉️":["exclamation_question","interrobang"],"❓️":["question"],"❔":["white_question"],"❕":["white_exclamation"],"❗️":["exclamation"],"〰️":["wavy_dash"],"💱":["currency_exchange"],"💲":["heavy_dollar_sign"],"⚕️":["medical","medical_symbol"],"♻️":["recycle","recycling_symbol"],"⚜️":["fleur-de-lis"],"🔱":["trident"],"📛":["name_badge"],"🔰":["beginner"],"⭕️":["hollow_red_circle","red_o"],"✅":["check_mark_button","white_check_mark"],"☑️":["ballot_box_with_check"],"✔️":["check_mark","heavy_check_mark"],"❌":["cross_mark","x"],"❎":["cross_mark_button","negative_squared_cross_mark"],"➰":["curly_loop"],"➿":["double_curly_loop","loop"],"〽️":["part_alternation_mark"],"✳️":["eight_spoked_asterisk"],"✴️":["eight_pointed_black_star"],"❇️":["sparkle"],"©️":["copyright"],"®️":["registered"],"™️":["tm","trade_mark"],"#️⃣":["hash","number_sign"],"*️⃣":["asterisk"],"0️⃣":["zero"],"1️⃣":["one"],"2️⃣":["two"],"3️⃣":["three"],"4️⃣":["four"],"5️⃣":["five"],"6️⃣":["six"],"7️⃣":["seven"],"8️⃣":["eight"],"9️⃣":["nine"],"🔟":["ten"],"🔠":["capital_abcd"],"🔡":["abcd"],"🔢":["1234"],"🔣":["symbols"],"🔤":["abc"],"🅰️":["a","a_blood"],"🆎":["ab","ab_blood"],"🅱️":["b","b_blood"],"🆑":["cl"],"🆒":["cool"],"🆓":["free"],"ℹ️":["info","information_source"],"🆔":["id"],"Ⓜ️":["m"],"🆕":["new"],"🆖":["ng"],"🅾️":["o","o_blood"],"🆗":["ok"],"🅿️":["parking"],"🆘":["sos"],"🆙":["up2"],"🆚":["vs"],"🈁":["ja_here","koko"],"🈂️":["ja_service_charge"],"🈷️":["ja_monthly_amount"],"🈶":["ja_not_free_of_carge"],"🈯️":["ja_reserved"],"🉐":["ideograph_advantage","ja_bargain"],"🈹":["ja_discount"],"🈚️":["ja_free_of_charge"],"🈲":["ja_prohibited"],"🉑":["accept","ja_acceptable"],"🈸":["ja_application"],"🈴":["ja_passing_grade"],"🈳":["ja_vacancy"],"㊗️":["congratulations","ja_congratulations"],"㊙️":["ja_secret","secret"],"🈺":["ja_open_for_business"],"🈵":["ja_no_vacancy"],"🔴":["red_circle"],"🟠":["orange_circle"],"🟡":["yellow_circle"],"🟢":["green_circle"],"🔵":["blue_circle"],"🟣":["purple_circle"],"🟤":["brown_circle"],"⚫️":["black_circle"],"⚪️":["white_circle"],"🟥":["red_square"],"🟧":["orange_square"],"🟨":["yellow_square"],"🟩":["green_square"],"🟦":["blue_square"],"🟪":["purple_square"],"🟫":["brown_square"],"⬛️":["black_large_square"],"⬜️":["white_large_square"],"◼️":["black_medium_square"],"◻️":["white_medium_square"],"◾️":["black_medium_small_square"],"◽️":["white_medium_small_square"],"▪️":["black_small_square"],"▫️":["white_small_square"],"🔶":["large_orange_diamond"],"🔷":["large_blue_diamond"],"🔸":["small_orange_diamond"],"🔹":["small_blue_diamond"],"🔺":["small_red_triangle"],"🔻":["small_red_triangle_down"],"💠":["diamond_shape_with_a_dot_inside","diamond_with_a_dot"],"🔘":["radio_button"],"🔳":["white_square_button"],"🔲":["black_square_button"],"🏁":["checkered_flag"],"🚩":["triangular_flag","triangular_flag_on_post"],"🎌":["crossed_flags"],"🏴":["black_flag"],"🏳️":["white_flag"],"🏳️‍🌈":["rainbow_flag"],"🏳️‍⚧️":["transgender_flag"],"🏴‍☠️":["jolly_roger","pirate_flag"],"🇦🇨":["ascension_island","flag_ac"],"🇦🇩":["andorra","flag_ad"],"🇦🇪":["flag_ae","united_arab_emirates"],"🇦🇫":["afghanistan","flag_af"],"🇦🇬":["antigua_barbuda","flag_ag"],"🇦🇮":["anguilla","flag_ai"],"🇦🇱":["albania","flag_al"],"🇦🇲":["armenia","flag_am"],"🇦🇴":["angola","flag_ao"],"🇦🇶":["antarctica","flag_aq"],"🇦🇷":["argentina","flag_ar"],"🇦🇸":["american_samoa","flag_as"],"🇦🇹":["austria","flag_at"],"🇦🇺":["australia","flag_au"],"🇦🇼":["aruba","flag_aw"],"🇦🇽":["aland_islands","flag_ax"],"🇦🇿":["azerbaijan","flag_az"],"🇧🇦":["bosnia_herzegovina","flag_ba"],"🇧🇧":["barbados","flag_bb"],"🇧🇩":["bangladesh","flag_bd"],"🇧🇪":["belgium","flag_be"],"🇧🇫":["burkina_faso","flag_bf"],"🇧🇬":["bulgaria","flag_bg"],"🇧🇭":["bahrain","flag_bh"],"🇧🇮":["burundi","flag_bi"],"🇧🇯":["benin","flag_bj"],"🇧🇱":["flag_bl","st_barthelemy"],"🇧🇲":["bermuda","flag_bm"],"🇧🇳":["brunei","flag_bn"],"🇧🇴":["bolivia","flag_bo"],"🇧🇶":["caribbean_netherlands","flag_bq"],"🇧🇷":["brazil","flag_br"],"🇧🇸":["bahamas","flag_bs"],"🇧🇹":["bhutan","flag_bt"],"🇧🇻":["bouvet_island","flag_bv"],"🇧🇼":["botswana","flag_bw"],"🇧🇾":["belarus","flag_by"],"🇧🇿":["belize","flag_bz"],"🇨🇦":["canada","flag_ca"],"🇨🇨":["cocos_islands","flag_cc"],"🇨🇩":["congo_kinshasa","flag_cd"],"🇨🇫":["central_african_republic","flag_cf"],"🇨🇬":["congo_brazzaville","flag_cg"],"🇨🇭":["flag_ch","switzerland"],"🇨🇮":["cote_divoire","flag_ci"],"🇨🇰":["co
456ok_islands","flag_ck"],"🇨🇱":["chile","flag_cl"],"🇨🇲":["cameroon","flag_cm"],"🇨🇳":["china","flag_cn"],"🇨🇴":["colombia","flag_co"],"🇨🇵":["clipperton_island","flag_cp"],"🇨🇷":["costa_rica","flag_cr"],"🇨🇺":["cuba","flag_cu"],"🇨🇻":["cape_verde","flag_cv"],"🇨🇼":["curacao","flag_cw"],"🇨🇽":["christmas_island","flag_cx"],"🇨🇾":["cyprus","flag_cy"],"🇨🇿":["czech_republic","czechia","flag_cz"],"🇩🇪":["flag_de","germany"],"🇩🇬":["diego_garcia","flag_dg"],"🇩🇯":["djibouti","flag_dj"],"🇩🇰":["denmark","flag_dk"],"🇩🇲":["dominica","flag_dm"],"🇩🇴":["dominican_republic","flag_do"],"🇩🇿":["algeria","flag_dz"],"🇪🇦":["ceuta_melilla","flag_ea"],"🇪🇨":["ecuador","flag_ec"],"🇪🇪":["estonia","flag_ee"],"🇪🇬":["egypt","flag_eg"],"🇪🇭":["flag_eh","western_sahara"],"🇪🇷":["eritrea","flag_er"],"🇪🇸":["flag_es","spain"],"🇪🇹":["ethiopia","flag_et"],"🇪🇺":["european_union","flag_eu"],"🇫🇮":["finland","flag_fi"],"🇫🇯":["fiji","flag_fj"],"🇫🇰":["falkland_islands","flag_fk"],"🇫🇲":["flag_fm","micronesia"],"🇫🇴":["faroe_islands","flag_fo"],"🇫🇷":["flag_fr","france"],"🇬🇦":["flag_ga","gabon"],"🇬🇧":["flag_gb","uk","united_kingdom"],"🇬🇩":["flag_gd","grenada"],"🇬🇪":["flag_ge","georgia"],"🇬🇫":["flag_gf","french_guiana"],"🇬🇬":["flag_gg","guernsey"],"🇬🇭":["flag_gh","ghana"],"🇬🇮":["flag_gi","gibraltar"],"🇬🇱":["flag_gl","greenland"],"🇬🇲":["flag_gm","gambia"],"🇬🇳":["flag_gn","guinea"],"🇬🇵":["flag_gp","guadeloupe"],"🇬🇶":["equatorial_guinea","flag_gq"],"🇬🇷":["flag_gr","greece"],"🇬🇸":["flag_gs","south_georgia_south_sandwich_islands"],"🇬🇹":["flag_gt","guatemala"],"🇬🇺":["flag_gu","guam"],"🇬🇼":["flag_gw","guinea_bissau"],"🇬🇾":["flag_gy","guyana"],"🇭🇰":["flag_hk","hong_kong"],"🇭🇲":["flag_hm","heard_mcdonald_islands"],"🇭🇳":["flag_hn","honduras"],"🇭🇷":["croatia","flag_hr"],"🇭🇹":["flag_ht","haiti"],"🇭🇺":["flag_hu","hungary"],"🇮🇨":["canary_islands","flag_ic"],"🇮🇩":["flag_id","indonesia"],"🇮🇪":["flag_ie","ireland"],"🇮🇱":["flag_il","israel"],"🇮🇲":["flag_im","isle_of_man"],"🇮🇳":["flag_in","india"],"🇮🇴":["british_indian_ocean_territory","flag_io"],"🇮🇶":["flag_iq","iraq"],"🇮🇷":["flag_ir","iran"],"🇮🇸":["flag_is","iceland"],"🇮🇹":["flag_it","italy"],"🇯🇪":["flag_je","jersey"],"🇯🇲":["flag_jm","jamaica"],"🇯🇴":["flag_jo","jordan"],"🇯🇵":["flag_jp","japan"],"🇰🇪":["flag_ke","kenya"],"🇰🇬":["flag_kg","kyrgyzstan"],"🇰🇭":["cambodia","flag_kh"],"🇰🇮":["flag_ki","kiribati"],"🇰🇲":["comoros","flag_km"],"🇰🇳":["flag_kn","st_kitts_nevis"],"🇰🇵":["flag_kp","north_korea"],"🇰🇷":["flag_kr","south_korea"],"🇰🇼":["flag_kw","kuwait"],"🇰🇾":["cayman_islands","flag_ky"],"🇰🇿":["flag_kz","kazakhstan"],"🇱🇦":["flag_la","laos"],"🇱🇧":["flag_lb","lebanon"],"🇱🇨":["flag_lc","st_lucia"],"🇱🇮":["flag_li","liechtenstein"],"🇱🇰":["flag_lk","sri_lanka"],"🇱🇷":["flag_lr","liberia"],"🇱🇸":["flag_ls","lesotho"],"🇱🇹":["flag_lt","lithuania"],"🇱🇺":["flag_lu","luxembourg"],"🇱🇻":["flag_lv","latvia"],"🇱🇾":["flag_ly","libya"],"🇲🇦":["flag_ma","morocco"],"🇲🇨":["flag_mc","monaco"],"🇲🇩":["flag_md","moldova"],"🇲🇪":["flag_me","montenegro"],"🇲🇫":["flag_mf","st_martin"],"🇲🇬":["flag_mg","madagascar"],"🇲🇭":["flag_mh","marshall_islands"],"🇲🇰":["flag_mk","macedonia"],"🇲🇱":["flag_ml","mali"],"🇲🇲":["burma","flag_mm","myanmar"],"🇲🇳":["flag_mn","mongolia"],"🇲🇴":["flag_mo","macao","macau"],"🇲🇵":["flag_mp","northern_mariana_islands"],"🇲🇶":["flag_mq","martinique"],"🇲🇷":["flag_mr","mauritania"],"🇲🇸":["flag_ms","montserrat"],"🇲🇹":["flag_mt","malta"],"🇲🇺":["flag_mu","mauritius"],"🇲🇻":["flag_mv","maldives"],"🇲🇼":["flag_mw","malawi"],"🇲🇽":["flag_mx","mexico"],"🇲🇾":["flag_my","malaysia"],"🇲🇿":["flag_mz","mozambique"],"🇳🇦":["flag_na","namibia"],"🇳🇨":["flag_nc","new_caledonia"],"🇳🇪":["flag_ne","niger"],"🇳🇫":["flag_nf","norfolk_island"],"🇳🇬":["flag_ng","nigeria"],"🇳🇮":["flag_ni","nicaragua"],"🇳🇱":["flag_nl","netherlands"],"🇳🇴":["flag_no","norway"],"🇳🇵":["flag_np","nepal"],"🇳🇷":["flag_nr","nauru"],"🇳🇺":["flag_nu","niue"],"🇳🇿":["flag_nz","new_zealand"],"🇴🇲":["flag_om","oman"],"🇵🇦":["flag_pa","panama"],"🇵🇪":["flag_pe","peru"],"🇵🇫":["flag_pf","french_polynesia"],"🇵🇬":["flag_pg","papua_new_guinea"],"🇵🇭":["flag_ph","philippines"],"🇵🇰":["flag_pk","pakistan"],"🇵🇱":["flag_pl","poland"],"🇵🇲":["flag_pm","st_pierre_miquelon"],"🇵🇳":["flag_pn","pitcairn_islands"],"🇵🇷":["flag_pr","puerto_rico"],"🇵🇸":["flag_ps","palestinian_territories"],"🇵🇹":["flag_pt","portugal"],"🇵🇼":["flag_pw","palau"],"🇵🇾":["flag_py","paraguay"],"🇶🇦":["flag_qa","qatar"],"🇷🇪":["flag_re","reunion"],"🇷🇴":["flag_ro","romania"],"🇷🇸":["flag_rs","serbia"],"🇷🇺":["flag_ru","russia"],"🇷🇼":["flag_rw","rwanda"],"🇸🇦":["flag_sa","saudi_arabia"],"🇸🇧":["flag_sb","solomon_islands"],"🇸🇨":["flag_sc","seychelles"],"🇸🇩"
456:["flag_sd","sudan"],"🇸🇪":["flag_se","sweden"],"🇸🇬":["flag_sg","singapore"],"🇸🇭":["flag_sh","st_helena"],"🇸🇮":["flag_si","slovenia"],"🇸🇯":["flag_sj","svalbard_jan_mayen"],"🇸🇰":["flag_sk","slovakia"],"🇸🇱":["flag_sl","sierra_leone"],"🇸🇲":["flag_sm","san_marino"],"🇸🇳":["flag_sn","senegal"],"🇸🇴":["flag_so","somalia"],"🇸🇷":["flag_sr","suriname"],"🇸🇸":["flag_ss","south_sudan"],"🇸🇹":["flag_st","sao_tome_principe"],"🇸🇻":["el_salvador","flag_sv"],"🇸🇽":["flag_sx","sint_maarten"],"🇸🇾":["flag_sy","syria"],"🇸🇿":["eswatini","flag_sz","swaziland"],"🇹🇦":["flag_ta","tristan_da_cunha"],"🇹🇨":["flag_tc","turks_caicos_islands"],"🇹🇩":["chad","flag_td"],"🇹🇫":["flag_tf","french_southern_territories"],"🇹🇬":["flag_tg","togo"],"🇹🇭":["flag_th","thailand"],"🇹🇯":["flag_tj","tajikistan"],"🇹🇰":["flag_tk","tokelau"],"🇹🇱":["flag_tl","timor_leste"],"🇹🇲":["flag_tm","turkmenistan"],"🇹🇳":["flag_tn","tunisia"],"🇹🇴":["flag_to","tonga"],"🇹🇷":["flag_tr","turkey_tr"],"🇹🇹":["flag_tt","trinidad_tobago"],"🇹🇻":["flag_tv","tuvalu"],"🇹🇼":["flag_tw","taiwan"],"🇹🇿":["flag_tz","tanzania"],"🇺🇦":["flag_ua","ukraine"],"🇺🇬":["flag_ug","uganda"],"🇺🇲":["flag_um","us_outlying_islands"],"🇺🇳":["flag_un","un","united_nations"],"🇺🇸":["flag_us","united_states","usa"],"🇺🇾":["flag_uy","uruguay"],"🇺🇿":["flag_uz","uzbekistan"],"🇻🇦":["flag_va","vatican_city"],"🇻🇨":["flag_vc","st_vincent_grenadines"],"🇻🇪":["flag_ve","venezuela"],"🇻🇬":["british_virgin_islands","flag_vg"],"🇻🇮":["flag_vi","us_virgin_islands"],"🇻🇳":["flag_vn","vietnam"],"🇻🇺":["flag_vu","vanuatu"],"🇼🇫":["flag_wf","wallis_futuna"],"🇼🇸":["flag_ws","samoa"],"🇽🇰":["flag_xk","kosovo"],"🇾🇪":["flag_ye","yemen"],"🇾🇹":["flag_yt","mayotte"],"🇿🇦":["flag_za","south_africa"],"🇿🇲":["flag_zm","zambia"],"🇿🇼":["flag_zw","zimbabwe"],"🏴󠁧󠁢󠁥󠁮󠁧󠁿":["england","flag_gbeng"],"🏴󠁧󠁢󠁳󠁣󠁴󠁿":["flag_gbsct","scotland"],"🏴󠁧󠁢󠁷󠁬󠁳󠁿":["flag_gbwls","wales"]}'),o=flarum.core.compat["common/extend"],i=flarum.core.compat["common/components/TextEditor"];var r=d.n(i);const _=flarum.core.compat["common/components/TextEditorButton"];var f=d.n(_);const c=flarum.core.compat["common/utils/KeyboardNavigatable"];var t=d.n(c);function l(d,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,e){return d.__proto__=e,d},l(d,e)}const s=flarum.core.compat["common/Fragment"];var g=function(d){var e,u;function a(){for(var e,u=arguments.length,a=new Array(u),n=0;n<u;n++)a[n]=arguments[n];return(e=d.call.apply(d,[this].concat(a))||this).items=[],e.active=!1,e.index=0,e.keyWasJustPressed=!1,e}u=d,(e=a).prototype=Object.create(u.prototype),e.prototype.constructor=e,l(e,u);var n=a.prototype;return n.view=function(){return m("ul",{className:"Dropdown-menu EmojiDropdown"},m("li",{className:"Dropdown-header"},app.translator.trans("flarum-emoji.forum.composer.type_to_search_text")),this.items.map((function(d){return m("li",{key:d.attrs.key},d)})))},n.show=function(d,e){this.$().show().css({left:d+"px",top:e+"px"}),this.active=!0},n.hide=function(){this.$().hide(),this.active=!1},n.navigate=function(d){var e=this;this.keyWasJustPressed=!0,this.setIndex(this.index+d,!0),clearTimeout(this.keyWasJustPressedTimeout),this.keyWasJustPressedTimeout=setTimeout((function(){return e.keyWasJustPressed=!1}),500)},n.complete=function(){this.$("li:not(.Dropdown-header)").eq(this.index).find("button").click()},n.setIndex=function(d,e){if(!this.keyWasJustPressed||e){var u=this.$(),a=u.find("li:not(.Dropdown-header)"),n=d;n<0?n=a.length-1:n>=a.length&&(n=0),this.index=n;var o=a.removeClass("active").eq(n).addClass("active");if(e){var i,r=u.scrollTop(),_=u.offset().top,f=_+u.outerHeight(),c=o.offset().top,t=c+o.outerHeight();c<_?i=r-_+c-parseInt(u.css("padding-top"),10):t>f&&(i=r-f+t+parseInt(u.css("padding-bottom"),10)),void 0!==i&&u.stop(!0).animate({scrollTop:i},100)}}},a}(d.n(s)()),b=function(){var d={base:"https://twemoji.maxcdn.com/v/14.0.2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(d){var e="string"==typeof d?parseInt(d,16):d;return e<65536?r(e):r(55296+((e-=65536)>>10),56320+(1023&e))},toCodePoint:h},onerror:function(){this.parentNode&&this.parentNode.replaceChild(_(this.alt,!1),this)},parse:function(e,u){return u&&"function"!=typeof u||(u={callback:u}),("string"==typeof e?s:l)(e,{callback:u.callback||f,attributes:"function"==typeof u.attributes?u.attributes:m,base:"string"==typeof u.base?u.base:d.base,ext:u.ext||d.ext,size:u.folder||(a=u.size||d.size,"number"==typeof a?a+"x"+a:a),className:u.className||d.className,onerror:u.onerror||d.onerror});var a},replace:b,test:function(d){u.lastIndex=0;var e=u.test(d);return u.lastIndex=0,e}},e={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},u=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91]|\ud83e\udd1d)|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u23
4561a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd\udec3-\udec5\udef0-\udef6]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udedd-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec2\uded0-\uded9\udee0-\udee7]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,a=/\uFE0F/g,n=String.fromCharCode(8205),o=/[&<>'"]/g,i=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,r=String.fromCharCode;return d;function _(d,e){return document.createTextNode(e?d.replace(a,""):d)}function f(d,e){return"".concat(e.base,e.size,"/",d,e.ext)}function c(d,e){for(var u,a,n=d.childNodes,o=n.length;o--;)3===(a=(u=n[o]).nodeType)?e.push(u):1!==a||"ownerSVGElement"in u||i.test(u.nodeName.toLowerCase())||c(u,e);return e}function t(d){return h(d.indexOf(n)<0?d.replace(a,""):d)}function l(d,e){for(var a,n,o,i,r,f,l,s,g,m,b,h,p,w=c(d,[]),k=w.length;k--;){for(o=!1,i=document.createDocumentFragment(),f=(r=w[k]).nodeValue,s=0;l=u.exec(f);){if((g=l.index)!==s&&i.appendChild(_(f.slice(s,g),!0)),h=t(b=l[0]),s=g+b.length,p=e.callback(h,e),h&&p){for(n in(m=new Image).onerror=e.onerror,m.setAttribute("draggable","false"),a=e.attributes(b,h))a.hasOwnProperty(n)&&0!==n.indexOf("on")&&!m.hasAttribute(n)&&m.setAttribute(n,a[n]);m.className=e.className,m.alt=b,m.src=p,o=!0,i.appendChild(m)}m||i.appendChild(_(b,!1)),m=null}o&&(s<f.length&&i.appendChild(_(f.slice(s),!0)),r.parentNode.replaceChild(i,r))}return d}function s(d,e){return b(d,(function(d){var u,a,n=d,i=t(d),r=e.callback(i,e);if(i&&r){for(a in n="<img ".concat('class="',e.className,'" ','draggable="false" ','alt="',d,'"',' src="',r,'"'),u=e.attributes(d,i))u.hasOwnProperty(a)&&0!==a.indexOf("on")&&-1===n.indexOf(" "+a+"=")&&(n=n.concat(" ",a,'="',u[a].replace(o,g),'"'));n=n.concat("/>")}return n}))}function g(d){return e[d]}function m(){return null}function b(d,e){return String(d).replace(u,e)}function h(d,e){for(var u=[],a=0,n=0,o=0;o<d.length;
456)a=d.charCodeAt(o++),n?(u.push((65536+(n-55296<<10)+(a-56320)).toString(16)),n=0):55296<=a&&a<=56319?n=a:u.push(a.toString(16));return u.join(e||"-")}}();const h=b;var p=String.fromCharCode(8205),w=/\uFE0F/g;function k(d){return h.convert.toCodePoint(d.indexOf(p)<0?d.replace(w,""):d)}const y="https://cdn.jsdelivr.net/gh/twitter/twemoji@"+/([0-9]+).[0-9]+.[0-9]+/g.exec(h.base)[1]+"/assets/";function v(d,e){var u="undefined"!=typeof Symbol&&d[Symbol.iterator]||d["@@iterator"];if(u)return(u=u.call(d)).next.bind(u);if(Array.isArray(d)||(u=function(d,e){if(d){if("string"==typeof d)return x(d,e);var u=Object.prototype.toString.call(d).slice(8,-1);return"Object"===u&&d.constructor&&(u=d.constructor.name),"Map"===u||"Set"===u?Array.from(d):"Arguments"===u||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?x(d,e):void 0}}(d))||e&&d&&"number"==typeof d.length){u&&(d=u);var a=0;return function(){return a>=d.length?{done:!0}:{done:!1,value:d[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(d,e){(null==e||e>d.length)&&(e=d.length);for(var u=0,a=new Array(e);u<e;u++)a[u]=d[u];return a}const j=flarum.core.compat["common/models/Post"];var z=d.n(j),q={base:y,attributes:function(){return{loading:"lazy"}}};a().initializers.add("flarum-emoji",(function(){var d,e,u;d=Object.keys(n),e=$('<div class="ComposerBody-emojiDropdownContainer"></div>'),u=new g,(0,o.extend)(r().prototype,"oncreate",(function(){var d=this.$(".TextEditor-editor").wrap('<div class="ComposerBody-emojiWrapper"></div>');this.navigator=new(t()),this.navigator.when((function(){return u.active})).onUp((function(){return u.navigate(-1)})).onDown((function(){return u.navigate(1)})).onSelect(u.complete.bind(u)).onCancel(u.hide.bind(u)).bindTo(d),d.after(e)})),(0,o.extend)(r().prototype,"buildEditorParams",(function(a){var o,i,r,_=this;a.inputListeners.push((function(){var a=_.attrs.composer.editor.getSelectionRange(),f=a[0];if(!(a[1]-f>0)){var c=_.attrs.composer.editor.getLastNChars(15);i=0;for(var t=c.length-1;t>=0;t--){var l=c.substr(t,1);if(!/[a-z0-9]|\+|\-|_|\:/.test(l))break;if(":"===l&&(0==t||/\s/.test(c.substr(t-1,1)))){o=t+1,i=f-c.length+t+1;break}}if(u.hide(),u.active=!1,i){r=c.substring(o).toLowerCase();var s=function(d){var e=d.emoji,a=d.name,n=d.code;return m("button",{key:e,onclick:function(){return d=e,_.attrs.composer.editor.replaceBeforeCursor(i-1,d+" "),void u.hide();var d},onmouseenter:function(){u.setIndex($(this).parent().index()-1)}},m("img",{alt:e,className:"emoji",draggable:"false",loading:"lazy",src:y+"72x72/"+n+".png"}),a)};!function(){var a,o,f=[],c=(a=r,o=new RegExp("\\((["+"+.*?[]{}()^$|\\".replace(/(.)/g,"\\$1")+"])\\)","g"),new RegExp("(.*)"+a.toLowerCase().replace(/(.)/g,"($1)(.*?)").replace(o,"(\\$1)")+"$","i")),t=7,l=function(e){for(var u=0;u<d.length&&t>0;u++){var a=d[u];if(-1===f.indexOf(a))for(var o,i=v(n[a]);!(o=i()).done;)if(e(o.value)){--t,f.push(a);break}}};l((function(d){return 0===d.indexOf(r)})),l((function(d){return c.test(d)}));var g=f.map((function(d){return{emoji:d,name:n[d][0],code:k(d)}})).map(s);if(g.length){u.items=g,m.render(e[0],u.render()),u.show();var b=_.attrs.composer.editor.getCaretCoordinates(i),h=u.$().outerWidth(),p=u.$().outerHeight(),w=u.$().offsetParent(),y=b.left,x=b.top+15;x+p>w.height()&&(x=b.top-p-15),y+h>w.width()&&(y=w.width()-h),x=Math.max(-(w.offset().top-$(document).scrollTop()),x),y=Math.max(-w.offset().left,y),u.show(y,x)}}(),u.setIndex(0),u.$().scrollTop(0),u.active=!0}}}))})),(0,o.extend)(r().prototype,"toolbarItems",(function(d){var e=this;d.add("emoji",m(f(),{onclick:function(){return e.attrs.composer.editor.insertAtCursor(" :")},icon:"far fa-smile"},app.translator.trans("flarum-emoji.forum.composer.emoji_tooltip")))})),(0,o.override)(z().prototype,"contentHtml",(function(d){var e,u,a=d();if(this.oldContentHtml!==a){var n=h.parse((e=a,(u=document.implementation.createHTMLDocument()).body.innerHTML=e,u.body),q);this.emojifiedContentHtml=n.innerHTML,this.oldContentHtml=a}return this.emojifiedContentHtml})),(0,o.override)(s9e.TextFormatter,"preview",(function(d,e,u){d(e,u),h.parse(u,q)}))}))})(),module.exports=e})();
457
458
459flarum.extensions['flarum-emoji']=module.exports;
460
461//# sourceMappingURL=https://greatsoftwarecompany.com/discuss/public/assets/forum.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.