PageSourceSearch

https://dashu.ai/assets/forum.js?v=09307f20

js dashu.ai collected 2026-09-29 08:08:19 UTC 1,557,367 bytes, 775 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,"components/LabelValue":Nn,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,"components/AccessTokensList":kn,"resolvers/DiscussionPageResolver":En,routes:_n,ForumApplication:Ri});go.app=Ui;var yo=so(go,"forum")})(),flarum.core=r})();
3
4
5(function(){const 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;const o82015558=[0,0];const oB565876D={flags:2};const o3B7530DB=[33153,0];const o939F1698={flags:514};const o521AAA25=[65503,1792];const oEA1B8BC2=[65415,1792];const oA80287CC={flags:3089};const oEC5D8787=[48541,1792];const o166D0874=[65281,1796];const o02D8DBB5={filterChain:[],required:!0};const o1BC3EAF4={filterChain:[],required:!1};const oD4869BFF={"B":1,"C":1,"COLOR":1,"EM":1,"EMAIL":1,"I":1,"S":1,"SIZE":1,"STRONG":1,"U":1,"URL":1};const oF3C6FA42={closeParent:oD4869BFF,flags:3349};const oDF43256F=[function(attrValue,attrName){return NumericFilter.filterUint(attrValue)}];const o118B31AC=function(tag,tagConfig){return filterAttributes(tag,tagConfig,registeredVars,logger)};const o1B4F5B52=[o118B31AC];const o56E79363=[function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^[-0-9A-Za-z_]+$/)}];const o6377B813=function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^[- +,.0-9A-Za-z_]+$/)};const o91968DBF=[o6377B813];const o6CB0A318={filterChain:oDF43256F,required:!0};const o75AB9259={filterChain:oDF43256F,required:!1};const oE2346708={filterChain:o56E79363,required:!0};const oABCFC4A3={filterChain:o91968DBF,required:!0};const oB2D4F5E2={filterChain:o91968DBF,required:!1};const oF307D35C={filterChain:[function(attrValue,attrName){return UrlFilter.filter(attrValue,registeredVars.urlConfig,logger)}],required:!0};const o1AF69066={closeParent:oD4869BFF,flags:268,fosterParent:oD4869BFF};const o2ACFCB30={closeParent:{"B":1,"C":1,"COLOR":1,"EM":1,"EMAIL":1,"I":1,"S":1,"SIZE":1,"STRONG":1,"TD":1,"TH":1,"U":1,"URL":1},flags:256,fosterParent:oD4869BFF};
5const o3059BE0B={allowed:oEA1B8BC2,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000};const oE4652ECC={allowed:oEA1B8BC2,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:0},tagLimit:5000};const o0C43D1CE={allowed:o3B7530DB,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:oF3C6FA42,tagLimit:5000};const oB55F46D1={"align":{filterChain:[function(attrValue,attrName){return(function(str){return str.toLowerCase()})(attrValue)},function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^(?:center|justify|left|right)$/)}],required:!1}};const o822D0C5C={allowed:o521AAA25,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000};const oE263910F={allowed:oEA1B8BC2,attributes:{},bitNumber:4,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:260,fosterParent:oD4869BFF},tagLimit:5000};const 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=\".\"\/><$w$iDISCUSSION_URL\">https:\/\/dashu.ai\/d\/<\/$w><$w$iL_WROTE\"\/><$w$iPROFILE_URL\">https:\/\/dashu.ai\/u\/<\/$w><$w$iSEARCH_URL\">https:\/\/dashu.ai\/all<\/$w><$w$iTAG_URL\">https:\/\/dashu.ai\/t\/<\/$w>$aB|DEL|EM|H1|H2|H3|H4|H5|H6|I|LI|S|STRONG|SUB|SUP|TABLE|TBODY|THEAD|TR|U|p\"><xsl:element$i{translate(name(),'ABDEGHILMNOPRSTUY','abdeghilmnoprstuy')}\">$d<\/xsl:element>$c$aC\"><code>$d<\/code>$c$aCENTER\"><div$ttext-align:center\">$d<\/div>$c$aCODE\"><pre data-s9e-livepreview-hash=\"\" data-s9e-livepreview-onupdate=\"if(window['hljsLoader'])window['hljsLoader']['highlightBlocks'](this)\"><code><$s$f@lang\"><$g$i$y>language-$b@lang\"\/><\/$g><\/$s>$d<\/code><script async=\"\" crossorigin=\"anonymous\" data-hljs-style=\"github\" data-s9e-livepreview-onrender=\"if(window['hljsLoader'])this.parentNode.removeChild(this)\" integrity=\"sha384-E9ssooeJ4kPel3JD7st0BgS50OLWFEdg4ZOp8lYPy52ctQazOIV37TCvzV8l4cYG\" 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\"><$z$tcolor:{@color}\">$d<\/$z>$c$aE\"><$l><$h$f.=':)'\">\ud83d\ude42<\/$h>
5<$h$f.=':D'\">\ud83d\ude03<\/$h><$h$f.=':P'\">\ud83d\ude1b<\/$h><$h$f.=':('\">\ud83d\ude41<\/$h><$h$f.=':|'\">\ud83d\ude10<\/$h><$h$f.=';)'\">\ud83d\ude09<\/$h><$h$f.=&quot;:'(&quot;\">\ud83d\ude22<\/$h><$h$f.=':O'\">\ud83d\ude2e<\/$h><$h$f.='&gt;:('\">\ud83d\ude21<\/$h><$j>$b.\"\/><\/$j><\/$l>$c$aEMAIL\"><a$xmailto:{@email}\" rel=\"{@rel}\"$p$q\">$d<\/a>$c$aESC\">$d$c$aGROUPMENTION\"><$z><$l><$h$f@deleted!=1\"><$l><$h$fstring(@color)!=''\"><$g$i$y>GroupMention GroupMention--colored<\/$g><$g$istyle\">--color:$b@color\"\/>;<\/$g><\/$h><$j><$g$i$y>GroupMention<\/$g><\/$j><\/$l><\/$h><$j><$g$i$y>GroupMention GroupMention--deleted<\/$g><\/$j><\/$l><"+"$z$eGroupMention-name\">@$b@groupname\"\/><\/$z><$s$fstring(@icon)!=''\"><i$eicon {@icon}\"\/><\/$s><\/$z>$c$aHASHTAG\"><a$ehasht\"$x{$SEARCH_URL}?q={@query}\" title=\"{@query}\" rel=\"{@rel}\"$p$q\">\n            #$b@query\"\/><\/a>$c$aHR\"><hr\/>$c$aIMG\"><img src=\"{@src}\" title=\"{@title}\" alt=\"{@alt}\">$nheight|@width\"\/><\/img>$c$aISPOILER\"><$z$espoiler\"$r$y onclick=\"removeAttribute('class')\">$d<\/$z>$c$aLIST\"><$l><$h$fnot(@type)\"><ul>$d<\/ul><\/$h><$h$fstarts-with(@type,'decimal')or starts-with(@type,'lower')or starts-with(@type,'upper')\"><ol$tlist-style-type:{@type}\">$nstart\"\/>$d<\/ol><\/$h><$j><ul$tlist-style-type:{@type}\">$d<\/ul><\/$j><\/$l>$c$aPAY\"><div$eptr-block ptr-preview\"$o{@amount}\"$k{@id}\">$d<\/div>$c$aPOSTMENTION\"><$l><$h$f@deleted!=1\"><a$x{$DISCUSSION_URL}{@discussionid}\/{@number}\"$ePostMention\"$k{@id}\" rel=\"{@rel}\"$p$q\">$b$u\"\/><\/a><\/$h><$j><$z$ePostMention PostMention--deleted\"$k{@id}\">$b$u\"\/><\/$z><\/$j><\/$l>$c$aPTRNOTFOUND\"><div$eptr-block ptr-render ptr-notfound\"$k{@id}\"$o{@amount}\"\/>$c$aPTRPAID\"><div$eptr-block ptr-render ptr-paid\"$k{@id}\"$o{@amount}\" data-haspaid-cnt=\"{@paid}\">$d<\/div>$c$aPTRUNPAID\"><div$eptr-block ptr-render ptr-payment-require\"$k{@id}\"$o{@amount}\" data-haspaid-cnt=\"{@paid}\"\/>$c$aQUOTE\"><blockquote><$s$fnot(@author)\"><$g$i$y>uncited<\/$g><\/$s><div><$s$f@author\"><cite>$b@author\"\/><xsl:text> <\/xsl:text>$b$L_WROTE\"\/><\/cite><\/$s>$d<\/div><\/blockquote>$c$aREPLY\"><reply2see>$d<\/reply2see>$c$aSIZE\"><$z$tfont-size:{@size}px\">$d<\/$z>$c$aSPOILER\"><details$espoiler\"$ropen\">$d<\/details>$c$aTAGMENTION\"><$l><$h$f@deleted!=1\"><a$x{$TAG_URL}{@slug}\"$k{@id}\" rel=\"{@rel}\"$p$q\"><$g$i$y>TagMention<$s$f@color!=''\"> TagMention--colored<\/$s><\/$g><$g$istyle\"><$s$f@color!=''\">--color:$b@color\"\/><\/$s><\/$g><$z$eTagMention-text\"><$s$f@icon!=''\"><i$eicon {@icon}\"\/><\/$s>$b@tagname\"\/><\/$z><\/a><\/$h><$j><$z$eTagMention TagMention--deleted\"$k{@id}\"><$z$eTagMention-text\">$b@tagname\"\/><\/$z><\/$z><\/$j><\/$l>$c$aTD\"><td><$s$f@align\"><$g$istyle\">text-align:$b@align\"\/><\/$g><\/$s>$d<\/td>$c$aTH\"><th><$s$f@a"+"lign\"><$g$istyle\">text-align:$b@align\"\/><\/$g><\/$s>$d<\/th>$c$aUPL-FILE\"><div$eButtonGroup\"$v{@uuid}\"><div$eButton hasIcon Button--icon Button--primary\"><i$efas fa-download\"\/><\/div><div$eButton\">$b@content\"\/><\/div><div$eButton\">$b@size\"\/><\/div><\/div>$c$aUPL-IMAGE\"><div$efof-download row\"$v{@uuid}\"><div$ecard\"><div$ewrapper\"$tbackground:url({@url}) center \/ cover no-repeat\"><div$eheader\"><ul$emenu-content\"><li><div$efar fa-hdd\"><$z>$b@size\"\/><\/$z><\/div><\/li><\/ul><\/div><div$edata\"><div$econtent\"><h4$etitle\">$b@content\"\/><\/h4><div$eButton Button--primary Button-icon Button--block\"><i$efas fa-download\"\/><\/div><\/div><\/div><\/div><\/div><\/div>$c$aUPL-IMAGE-PREVIEW\"><img src=\"{@url}\" title=\"{@base_name}\" alt=\"{@base_name}\"\/>$c$aUPL-TEXT-PREVIEW\"><figure$eFofUpload-TextPreview\" data-loading=\"false\" data-expanded=\"false\" data-hassnippet=\"{@has_snippet}\"><figcaption$eFofUpload-TextPreviewTitle\"><i$mtrue\"$eicon far fa-file\"\/><xsl:text> <\/xsl:text>$b@content\"\/><\/figcaption><div$eFofUpload-TextPreviewSnippet\"><pre><code data-preview-text=\"&lt;\u6587\u672c\u6587\u6863\u7684\u9884\u89c8\u5c06\u4f1a\u5728\u6b64\u5904\u5c55\u793a&gt;\" data-nosnippet-text=\"&lt;\u6682\u65e0\u53ef\u7528\u7684\u9884\u89c8\u4ee3\u7801\u7247\u6bb5&gt;\">$b@snippet\"\/><\/code><\/pre><\/div><div$eFofUpload-TextPreviewFull\"\/><button type=\"button\"$eButton hasIcon FofUpload-TextPreviewToggle\"><i$mtrue\"$eicon fas fa-chevron-down Button-icon FofUpload-TextPreviewExpandIcon\"\/><$z$eButton-label FofUpload-TextPreviewExpand\">\n            \u5c55\u5f00\u5168\u6587        <\/$z><i$mtrue\"$eicon fas fa-chevron-up Button-icon FofUpload-TextPreviewCollapseIcon\"\/><$z$eButton-label FofUpload-TextPreviewCollapse\">\n            \u6536\u8d77\u5168\u6587        <\/$z><div data-size=\"small\"$eFofUpload-TextPreviewToggleLoading LoadingIndicator-container LoadingIndicator-container--inline LoadingIndicator-container--small\"><div$mtrue\"$eLoadingIndicator\"\/><\/div><\/button>
5<div$eFofUpload-TextPreviewError\"><p><i$mtrue\"$eicon fas fa-exclamation-circle\"\/>\n            \u6587\u4ef6\u9884\u89c8\u65e0\u6cd5\u52a0\u8f7d\u3002\u6b64\u6587\u4ef6\u6216\u5df2\u88ab\u5220\u9664\uff0c\u6587\u4ef6 ID \u6216\u5df2\u5931\u6548\u3002\n        <\/p><\/div><script>\n        {\n            const figure = document.currentScript.parentElement;\n\n            c"+"onst previewEl = figure.querySelector('.FofUpload-TextPreviewFull');\n            const snippetEl = figure.querySelector('.FofUpload-TextPreviewSnippet');\n            const loadingEl = figure.querySelector('.FofUpload-TextPreviewLoading');\n            const toggleBtn = figure.querySelector('.FofUpload-TextPreviewToggle');\n\n            const snippetText = '';\n\n            const testUrl = new URL(location.origin);\n            const url = new URL('$b@url\"\/>');\n\n            if (testUrl.origin !== url.origin) {\n              \/\/ Prevent cross-origin requests\n              handleError(new Error('Attempted to fetch a cross-origin file in text preview.'));\n            }\n\n            function createCodeHtml(text) {\n                const codeEl = document.createElement('code');\n                codeEl.innerText = text;\n\n                return `&lt;pre&gt;${codeEl.outerHTML}`;\n            }\n\n            function handleError(e) {\n                figure.setAttribute('data-error', 'true');\n\n                console.group('[FoF Upload] Failed to preview text file.');\n                console.error('Failed to load text file: ' + url);\n                console.log(e);\n                console.groupEnd();\n            }\n\n            let fileContent = null;\n\n            \/\/ Only allow toggling preview if showing a snippet\n            if ($b@has_snippet\"\/> &amp;&amp; testUrl.origin === url.origin) {\n                toggleBtn.addEventListener('click', () =&gt; {\n                    if (fileContent !== null) {\n                        const expanded = figure.getAttribute('data-expanded') === 'true';\n                        figure.setAttribute('data-expanded', !expanded);\n                        return;\n                    }\n\n                    figure.setAttribute('data-loading', 'true');\n\n                    fetch(url)\n                        .then(response =&gt; {\n                            if (!response.ok) {\n                                figure.setAttribute('data-loading', 'false');\n       "+"                         throw response;\n                            }\n\n                            return response.text();\n                        })\n                        .then(text =&gt; {\n                            fileContent = text;\n                            previewEl.innerHTML = createCodeHtml(text);\n\n                            figure.setAttribute('data-loading', 'false');\n                            const expanded = figure.getAttribute('data-expanded') === 'true';\n                            figure.setAttribute('data-expanded', !expanded);\n                        })\n                        .catch(handleError);\n                });\n            }\n        }\n    <\/script><\/figure>$c$aURL\"><a$x{@url}\" rel=\"{@rel}\"$p$q\">$nrel|@target|@title\"\/>$d<\/a>$c$aUSERMENTION\"><$l><$h$f@deleted!=1\"><a$x{$PROFILE_URL}{@slug}\"$eUserMention\" rel=\"{@rel}\"$p$q\">@$b$u\"\/><\/a><\/$h><$j><$z$eUserMention UserMention--deleted\">@$b$u\"\/><\/$z><\/$j><\/$l>$c$abr\"><br\/>$c$ae|i|s\"\/><\/xsl:stylesheet>").replace(/\$[a-z]/g,function(k){return{"$a":"<xsl:template match=\"","$b":"<xsl:value-of select=\"","$c":"<\/xsl:template>","$d":"<xsl:apply-templates\/>","$e":" class=\"","$f":" test=\"","$g":"xsl:attribute","$h":"xsl:when","$i":" name=\"","$j":"xsl:otherwise","$k":" data-id=\"","$l":"xsl:choose","$m":" aria-hidden=\"","$n":"<xsl:copy-of select=\"@","$o":" data-amount=\"","$p":" target=\"","$q":"{@target}","$r":" data-s9e-livepreview-ignore-attrs=\"","$s":"xsl:if","$t":" style=\"","$u":"@displayname","$v":" data-fof-upload-download-uuid=\"","$w":"xsl:param","$x":" href=\"","$y":"class\"","$z":"span"}[k]});let functionCache={"1788024165":function(){if(window.hljsLoader)this.parentNode.removeChild(this);},"1983388049":function(){if(window.hljsLoader)window.hljsLoader.highlightBlocks(this);}};const EmailFilter={filter:function(attrValue){return/^[-\w.+]+@[-\w.]+$/.test(attrValue)?attrValue:!1}};const FalseFilter={filter:function(attrValue){return!1}};const HashmapFilter={filter:function(attrValue,map,strict){if(attrValue in map){return map[attrValue]}
6return(strict)?!1:attrValue}};const MapFilter={filter:function(attrValue,map){let i=-1,cnt=map.length;while(++i<cnt){if(map[i][0].test(attrValue)){return map[i][1]}}
7return attrValue}};const 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){let 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}
14let 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}};const 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}};const RegexpFilter={filter:function(attrValue,regexp){return regexp.test(attrValue)?attrValue:!1}};const TimestampFilter={filter:function(attrValue){let 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)}};
21const UrlFilter={filter:function(attrValue,urlConfig,logger){let p=UrlFilter.parseUrl(attrValue.replace(/^\s+/,'').replace(/\s+$/,''));let 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){let regexp=/^(?:([a-z][-+.\w]*):)?(?:\/\/(?:([^:\/?#]*)(?::([^\/?#]*)?)?@)?(?:(\[[a-f\d:]+\]|[^:\/?#]+)(?::(\d*))?)?(?![^\/?#]))?([^?#]*)(\?[^#]*)?(#.*)?$/i;let 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){let 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+='//'}
28let 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!==''){let 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){let 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){return str.replace(/[<>&"]/g,(c)=>{const t={'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'};return t[c]})}
33function htmlspecialchars_noquotes(str){return str.replace(/[<>&]/g,(c)=>{const t={'<':'&lt;','>':'&gt;','&':'&amp;'};return t[c]})}
34function rawurlencode(str){return encodeURIComponent(str).replace(/[!'()*]/g,(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((ap)=>{let attrName=ap[0],regexp=ap[1],map=ap[2];if(tag.hasAttribute(attrName)){executeAttributePreprocessor(tag,attrName,regexp,map)}})}
39function filterAttributes(tag,tagConfig,registeredVars,logger){let attributes={},attrName;for(attrName in tagConfig.attributes){let 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){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];logger.setTag(tag);for(let 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(let 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){let 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){let m=regexp.exec(attrValue);if(!m){return[]}
49let values={};map.forEach((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(){let attributes={};for(let 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(let attrName in attributes){this.attributes[attrName]=attributes[attrName]}};const RULE_AUTO_CLOSE=1<<0;const RULE_AUTO_REOPEN=1<<1;const RULE_BREAK_PARAGRAPH=1<<2;const RULE_CREATE_PARAGRAPHS=1<<3;const RULE_DISABLE_AUTO_BR=1<<4;const RULE_ENABLE_AUTO_BR=1<<5;const RULE_IGNORE_TAGS=1<<6;const RULE_IGNORE_TEXT=1<<7;const RULE_IGNORE_WHITESPACE=1<<8;const RULE_IS_TRANSPARENT=1<<9;const RULE_PREVENT_BR=1<<10;const RULE_SUSPEND_AUTO_BR=1<<11;const RULE_TRIM_FIRST_LINE=1<<12;const RULES_AUTO_LINEBREAKS=RULE_DISABLE_AUTO_BR|RULE_ENABLE_AUTO_BR|RULE_SUSPEND_AUTO_BR;const RULES_INHERITANCE=RULE_ENABLE_AUTO_BR;const WHITESPACE=" \n\t";let cntOpen;let cntTotal;let context;let currentFixingCost;let currentTag;let isRich;let logger=new Logger;let maxFixingCost=10000;let namespaces;let openTags;let output;const plugins={"Autoemail":{parser:function(text,matches){const config={attrName:"email",tagName:"EMAIL"};let tagName=config.tagName,attrName=config.attrName;matches.forEach((m)=>{let startTag=addStartTag(tagName,m[0][1],0);startTag.setAttribute(attrName,m[0][0]);let 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){const config={attrName:"url",tagName:"URL"};matches.forEach((m)=>{linkifyUrl(m[0][1],trimUrl(m[0][0]))});function linkifyUrl(tagPos,url){let endPos=tagPos+url.length,endTag=addEndTag(config.tagName,endPos,0);if(url[3]==='.'){url='http://'+url}
54let startTag=addStartTag(config.tagName,tagPos,0,1);startTag.setAttribute(config.attrName,url);startTag.pairWith(endTag);let 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){const config={bbcodes:{"*":{tagName:"LI"}
55,"B":[],"CENTER":[],"CODE":{defaultAttribute:"lang"},"COLOR":[],"DEL":[],"EMAIL":{contentAttributes:["email"]},"I":[],"IMG":{contentAttributes:["src"],defaultAttribute:"src"},"LIST":{defaultAttribute:"type"},"PAY":{defaultAttribute:"amount"},"QUOTE":{defaultAttribute:"author"},"REPLY":[],"S":[],"SIZE":[],"U":[],"UPL-FILE":{contentAttributes:["content"],defaultAttribute:"uuid"},"UPL-IMAGE":{contentAttributes:["content"],defaultAttribute:"uuid"},"UPL-IMAGE-PREVIEW":{defaultAttribute:"url"},"UPL-TEXT-PREVIEW":{contentAttributes:["content"],defaultAttribute:"uuid"},"URL":{contentAttributes:["url"]}}};let attributes;let bbcodeConfig;let bbcodeName;let bbcodeSuffix;let pos;let startPos;let textLen=text.length;let uppercaseText='';matches.forEach((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(){let tag=addSelfClosingTag(getTagName(),startPos,pos-startPos);tag.setAttributes(attributes);return tag}
59function addBBCodeStartTag(){let prio=(bbcodeSuffix!=='')?-10:0,tag=addStartTag(getTagName(),startPos,pos-startPos,prio);tag.setAttributes(attributes);return tag}
60function captureEndTag(){if(!uppercaseText){uppercaseText=text.toUpperCase()}
61let 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(){let firstPos=pos,attrName;attributes={};while(pos<textLen){let c=text[pos];if(" \n\t".indexOf(c)>-1){++pos;continue}
65if('/]'.indexOf(c)>-1){return}
66let 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()}
71let 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(let 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}
77let contentAttributes=[];if(bbcodeConfig.contentAttributes){bbcodeConfig.contentAttributes.forEach((attrName)=>{if(!(attrName in attributes)){contentAttributes.push(attrName)}})}
78let requireEndTag=(bbcodeSuffix||bbcodeConfig.forceLookahead),endTag=(requireEndTag||contentAttributes.length)?captureEndTag():null;if(endTag){contentAttributes.forEach((attrName)=>{attributes[attrName]=text.substring(pos,endTag.getPos())})}else if(requireEndTag){return}
79let 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(){let quote=text[pos],valuePos=pos+1,n;do{pos=text.indexOf(quote,pos+1);if(pos<0){throw ''}
82n=1;while(text[pos-n]==='\\'){++n}}
83while(n%2===0);let 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){const config={tagName:"E"};matches.forEach((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){const config={tagName:"ESC"};
85matches.forEach((m)=>{addTagPair(config.tagName,m[0][1],1,m[0][1]+m[0][0].length,0)})},quickMatch:"\\",regexp:/\\[-!#()*+.:<>@[\\\]^_`{|}~]/g,regexpLimit:50000},"Hashtag":{parser:function(text,matches){const config={tagName:"HASHTAG"};matches.forEach(function(m){var tag=addSelfClosingTag(config.tagName,m[0][1],m[0][0].length,-10);tag.setAttributes({'query':m[1][0],})})},regexp:/\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
85D3-\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_]+)(?!#)\b/g,regexpLimit:50000},"Litedown":{parser:function(text,matches){const config={decodeHtmlEntities:!1};let decodeHtmlEntities=config.decodeHtmlEntities;let hasEscapedChars=!1;let hasReferences=!1;let 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>0&&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}
97let m;while(m=regexp.exec(text)){let 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){let pos=text.indexOf(syntaxChar);if(pos===-1){return}
99parseShortForm(pos);parseLongForm(pos);function parseLongForm(pos){pos=text.indexOf(syntaxChar+'(',pos);if(pos===-1){return}
100let m,regexp=longRegexp,hasMatched=!1;regexp.lastIndex=pos;while(m=regexp.exec(text)){let match=m[0],matchPos=m.index,matchLen=match.length;addTagPair(tagName,matchPos,2,matchPos+matchLen-1,1);overwrite(matchPos,matchLen);hasMatched=!0}
101if(hasMatched){parseLongForm(pos)}}
102function parseShortForm(pos){let m,regexp=shortRegexp;regexp.lastIndex=pos;while(m=regexp.exec(text)){let 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){let 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(){let setextLines={};function parse(){matchSetextLines();let 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;let 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((m)=>{let 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{let startTag=blocks.pop();addEndTag(startTag.getName(),textBoundary,0).pairWith(startTag)}
110while(blockDepth<--blocksCnt);}
111if(blockDepth>blocksCnt&&!lineIsEmpty){newContext=!0;do{let tagName=(blockMarks[blocksCnt]==='>!')?'SPOILER':'QUOTE';blocks.push(addStartTag(tagName,matchPos,0,-999))}
112while(blockDepth>++blocksCnt);}
113let 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((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){let 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;let 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}
124let listTag=addStartTag('LIST',tagPos,0);if(m[4].indexOf('.')>-1){listTag.setAttribute('type','decimal');let 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((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);let 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((itemTag)=>{itemTag.removeFlags(RULE_CREATE_PARAGRAPHS)})}}
133function computeBlockIgnoreLen(str,maxBlockDepth){let remaining=str;while(--maxBlockDepth>=0){remaining=remaining.replace(/^ *>!? ?/,'')}
134return str.length-remaining.length}
135function getAtxHeaderEndTagLen(startPos,endPos){let content=text.substring(startPos,endPos),m=/[ \t]*#*[ \t]*$/.exec(content);return m[0].length}
136function getBlockMarks(str){let 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}
139let m,regexp=/^(?=[-=>])(?:>!? ?)*(?=[-=])(?:-+|=+) *$/gm;while(m=regexp.exec(text)){let match=m[0],matchPos=m.index;let 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}
142let 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);let id=m[1].toLowerCase();if(!linkReferences[id]){hasReferences=!0;linkReferences[id]=m[2]}}}
143parse()})();(function(){function parse(){let markers=getInlineCodeMarkers(),i=-1,cnt=markers.length;while(++i<(cnt-1)){let 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){let 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(){let pos=text.indexOf('`');if(pos<0){return[]}
148let 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(){let pos=text.indexOf('![');if(pos===-1){return}
151if(text.indexOf('](',pos)>0){parseInlineImages()}
152if(hasReferences){parseReferenceImages()}}
153function addImageTag(startPos,endPos,endLen,linkInfo,alt){let tag=addTagPair('IMG',startPos,2,endPos,endLen);setLinkAttributes(tag,linkInfo,'src');tag.setAttribute('alt',decode(alt));overwrite(startPos,endPos+endLen-startPos)}
154function parseInlineImages(){let m,regexp=/!\[(?:[^\x17[\]]|\[[^\x17[\]]*\])*\]\(( *(?:[^\x17\s()]|\([^\x17\s()]*\))*(?=[ )]) *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))? *)\)/g;while(m=regexp.exec(text)){let 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(){let m,regexp=/!\[((?:[^\x17[\]]|\[[^\x17[\]]*\])*)\](?: ?\[([^\x17[\]]+)\])?/g;while(m=regexp.exec(text)){let 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){let priority=(endLen===1)?1:-1;let tag=addTagPair('URL',startPos,1,endPos,endLen,priority);setLinkAttributes(tag,linkInfo,'url');overwrite(startPos,1);overwrite(endPos,endLen)}
162function getLabels(){let labels={},m,regexp=/\[((?:[^\x17[\]]|\[[^\x17[\]]*\])*)\]/g;while(m=regexp.exec(text)){labels[m.index]=m[1].toLowerCase()}
163return labels}
164function parseAutomaticLinks(){let m,regexp=/<[-+.\w]+([:@])[^\x17\s>]+?(?:>|\x1B7)/g;while(m=regexp.exec(text)){let 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(){let m,regexp=/\[(?:[^\x17[\]]|\[[^\x17[\]]*\])*\]\(( *(?:\([^\x17\s()]*\)|[^\x17\s)])*(?=[ )]) *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))? *)\)/g;while(m=regexp.exec(text)){let linkInfo=m[1],startPos=m.index,endLen=3+linkInfo.length,endPos=startPos+m[0].length-endLen;addLinkTag(startPos,endPos,endLen,linkInfo)}}
166function parseReferenceLinks(){let labels=getLabels(),startPos;for(startPos in labels){let 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(){let closeEm;let closeStrong;let emPos;let emEndPos;let remaining;let strongPos;let 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){let block=[],blocks=[],breakPos=text.indexOf("\x17",pos),m;regexp.lastIndex=pos;while(m=regexp.exec(text)){let 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){let pos=text.indexOf(character);if(pos===-1){return}
184getEmphasisByBlock(regexp,pos).forEach(processEmphasisBlock)}
185function processEmphasisBlock(block){emPos=-1,strongPos=-1;block.forEach((pair)=>{processEmphasisMatch(pair[0],pair[1])})}
186function processEmphasisMatch(matchPos,matchLen){let 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(){let pos=text.indexOf("  \n");while(pos>0){addBrTag(pos+2).cascadeInvalidationTo(addVerbatim(pos+2,1));pos=text.indexOf("  \n",pos+3)}}
188parse()})()}},"PipeTables":{parser:function(text,matches){const config={overwriteEscapes:!0,overwriteMarkdown:!0};let pos,table=null,tableTag,tables,_text=text;if(config.overwriteMarkdown){overwriteMarkdown()}
189if(config.overwriteEscapes){overwriteEscapes()}
190captureTables();processTables();function addLine(line){let ignoreLen=0;if(!table){table={rows:[]};ignoreLen=/^ */.exec(line)[0].length;line=line.substring(ignoreLen)}
191line=line.replace(/^( *)\|/,'$1 ').replace(/\|( *)$/,' $1');table.rows.push({line:line,pos:pos+ignoreLen})}
192function addTableBody(){let i=1,cnt=table.rows.length;while(++i<cnt){addTableRow('TD',table.rows[i])}
193createBodyTags(table.rows[2].pos,pos)}
194function addTableCell(tagName,align,content){let startPos=pos,endPos=startPos+content.length,ignoreLen;pos=endPos;let m=/^( *).*?( *)$/.exec(content);if(m[1]){ignoreLen=m[1].length;createIgnoreTag(startPos,ignoreLen);startPos+=ignoreLen}
195if(m[2]){ignoreLen=m[2].length;createIgnoreTag(endPos-ignoreLen,ignoreLen);endPos-=ignoreLen}
196createCellTags(tagName,startPos,endPos,align)}
197function addTableHead(){addTableRow('TH',table.rows[0]);createHeadTags(table.rows[0].pos,pos)}
198function addTableRow(tagName,row){pos=row.pos;row.line.split('|').forEach((str,i)=>{if(i>0){createIgnoreTag(pos,1);++pos}
199let align=(!table.cols[i])?'':table.cols[i];addTableCell(tagName,align,str)});createRowTags(row.pos,pos)}
200function captureTables(){table=null;tables=[];pos=0;_text.split("\n").forEach((line)=>{if(line.indexOf('|')<0){endTable()}else{addLine(line)}
201pos+=1+line.length});endTable()}
202function createBodyTags(startPos,endPos){addTagPair('TBODY',startPos,0,endPos,0,-103)}
203function createCellTags(tagName,startPos,endPos,align){let tag;if(startPos===endPos){tag=addSelfClosingTag(tagName,startPos,0,-101)}else{tag=addTagPair(tagName,startPos,0,endPos,0,-101)}
204if(align){tag.setAttribute('align',align)}}
205function createHeadTags(startPos,endPos){addTagPair('THEAD',startPos,0,endPos,0,-103)}
206function createIgnoreTag(pos,len){tableTag.cascadeInvalidationTo(addIgnoreTag(pos,len,1000))}
207function createRowTags(startPos,endPos){addTagPair('TR',startPos,0,endPos,0,-102)}
208function createSeparatorTag(row){createIgnoreTag(row.pos-1,1+row.line.length)}
209function createTableTags(startPos,endPos){tableTag=addTagPair('TABLE',startPos,0,endPos,0,-104)}
210function endTable(){if(hasValidTable()){table.cols=parseColumnAlignments(table.rows[1].line);tables.push(table)}
211table=null}
212function hasValidTable(){return(table&&table.rows.length>2&&isValidSeparator(table.rows[1].line))}
213function isValidSeparator(line){return/^ *:?-+:?(?:(?:\+| *\| *):?-+:?)+ */.test(line)}
214function overwriteBlockquoteCallback(str){return str.replace(/[!>]/g,' ')}
215function overwriteEscapes(){if(_text.indexOf('\\|')>-1){_text=_text.replace(/\\[\\|]/g,'..')}}
216function overwriteInlineCodeCallback(str){return str.replace(/\|/g,'.')}
217function overwriteMarkdown(){if(_text.indexOf('`')>-1){_text=_text.replace(/`[^`]*`/g,overwriteInlineCodeCallback)}
218if(_text.indexOf('>')>-1){_text=_text.replace(/^(?:>!? ?)+/gm,overwriteBlockquoteCallback)}}
219function parseColumnAlignments(line){let align=['','right','left','center'],cols=[],regexp=/(:?)-+(:?)/g,m;while(m=regexp.exec(line)){let key=(m[1]?2:0)+(m[2]?1:0);cols.push(align[key])}
220return cols}
221function processCurrentTable(){let firstRow=table.rows[0],lastRow=table.rows[table.rows.length-1];createTableTags(firstRow.pos,lastRow.pos+lastRow.line.length);addTableHead();createSeparatorTag(table.rows[1]);addTableBody()}
222function processTables(){let i=-1,cnt=tables.length;while(++i<cnt){table=tables[i];processCurrentTable()}}},quickMatch:"|"},"Preg":{parser:function(text,matches){const 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\u
2220EB3\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\uFBD3-\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((entry)=>{let tagName=entry[0],regexp=entry[1],passthroughIdx=entry[2],map=entry[3],m;regexp.lastIndex=0;while(m=regexp.exec(text)){let startTagPos=m.index,matchLen=m[0].length,tag;if(HINT.PREG_HAS_PASSTHROUGH&&passthroughIdx&&m[passthroughIdx]!==''){let 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)}
223map.forEach((attrName,i)=>{if(attrName&&typeof m[i]!=='undefined'){tag.setAttribute(attrName,m[i])}})}})}}};let pos;const registeredVars={"urlConfig":{allowedSchemes:/^https?$/i}};const rootContext={allowed:o521AAA25,flags:40};const tagsConfig={"B":o3059BE0B,"C":{allowed:o82015558,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:66},tagLimit:5000},"CENTER":o822D0C5C,"CODE":{allowed:o82015558,attributes:{"lang":{filterChain:o56E79363,required:!1}},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:4436,fosterParent:oD4869BFF},tagLimit:5000},"COLOR":{allowed:oEA1B8BC2,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:o521AAA25,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:512},tagLimit:5000},"E":{allowed:o3B7530DB,attributes:{},bitNumber:7,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"EM":o3059BE0B,"EMAIL":{allowed:oEC5D8787,attributes:{"email":{filterChain:[function(attrValue,attrName){return EmailFilter.filter(attrValue)}],required:!0}},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:o939F1698,tagLimit:5000},"ESC":{allowed:o82015558,attributes:{},bitNumber:0,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:1616},tagLimit:5000},"GROUPMENTION":{allowed:o3B7530DB,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":oE263910F,"H2":oE263910F,"H3":oE263910F,"H4":oE263910F,"H5":oE263910F,"H6":oE263910F,"HASHTAG":{allowed:o3B7530DB,attributes:{"query":o02D8DBB5},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"HR":o0C43D1CE,"I":o3059BE0B,"IMG":{allowed:o3B7530DB,attributes:{"alt":o1BC3EAF4,"height":o75AB9259,"src":oF307D35C,"title":o1BC3EAF4,"width":o75AB9259},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"ISPOILER":oE4652ECC,"LI":{allowed:o521AAA25,attributes:{},bitNumber:5,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:[65313,1792],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)},o6377B813],required:!1}},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,createChild:["LI"],flags:3460,fosterParent:oD4869BFF},tagLimit:5000},"PAY":{allowed:o521AAA25,attributes:{"amount":o6CB0A318,"id":o6CB0A318},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"POSTMENTION":{allowed:o3B7530DB,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},"PTRNOTFOUND":o0C43D1CE,"PTRPAID":o822D0C5C,"PTRUNPAID":o0C43D1CE,"QUOTE":{allowed:o521AAA25,attributes:{"author":o1BC3EAF4},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"REPLY":oE4652ECC,"S":o3059BE0B,"SIZE":{allowed:oEA1B8BC2,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:o521AAA25,attributes:{},bitNumber:6,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"STRONG":o3059BE0B,"SUB":oE4652ECC,"SUP":oE4652ECC,"TABLE":{allowed:[65281,1797],attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:3460,fosterParent:oD4869BFF},tagLimit:5000},"TAGMENTION":{allowed:o3B7530DB,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},"TBODY":{allowed:o166D0874,attributes:{},bitNumber:8,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:{"B":1,"C":1,"COLOR":1,"EM":1,"EMAIL":1,"I":1,"S":1,"SIZE":1,"STRONG":1,"TBODY":1,"TD":1,"TH":1,"THEAD":1,"TR":1,"U":1,"URL":1},flags:3456,fosterParent:oD4869BFF},tagLimit:5000},"TD":{allowed:o521AAA25,attributes:oB55F46D1,bitNumber:9,filterChain:o1B4F5B52,nestingLimit:10,rules:o2ACFCB30,tagLimit:5000},"TH":{allowed:[61391,1792],attributes:oB55F46D1,bitNumber:9,filterChain:o1B4F5B52,nestingLimit:10,rules:o2ACFCB30,tagLimit:5000},"THEAD":{allowed:o166D0874,attributes:{},bitNumber:8,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:3456,fosterParent:oD4869BFF},tagLimit:5000},"TR":{allowed:[65281,1794],attributes:{},bitNumber:10,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:{"B":1,"C":1,"COLOR":1,"EM":1,"EMAIL":1,"I":1,"S":1,"SIZE":1,"STRONG":1,"TD":1,"TH":1,"TR":1,"U":1,"URL":1},flags:3456,fosterParent:oD4869BFF},tagLimit:5000},"U":o3059BE0B,"UPL-FILE":{allowed:o3B7530DB,attributes:{"content":oABCFC4A3,"size":oABCFC4A3,"uuid":oE2346708},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:oF3C6FA42,tagLimit:5000},"UPL-IMAGE":{allowed:o3B7530DB,attributes:{"content":oABCFC4A3,"size":oABCFC4A3,"url":oF307D35C,"uuid":oE2346708},bitNumber:4,filterChain:o1B4F5B52,nestingLimit:10,rules:oF3C6FA42,tagLimit:5000},"UPL-IMAGE-PREVIEW":{allowed:o3B7530DB,attributes:{"url":oF307D35C},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"UPL-TEXT-PREVIEW":{allowed:o3B7530DB,attributes:{"content":oABCFC4A3,"has_snippet":oB2D4F5E2,"snippet":oB2D4F5E2,"url":oF307D35C,"uuid":oE2346708},bitNumber:6,filterChain:o1B4F5B52,nestingLimit:10,rules:oF3C6FA42,tagLimit:5000}
223,"URL":{allowed:oEC5D8787,attributes:{"title":o1BC3EAF4,"url":oF307D35C},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:o939F1698,tagLimit:5000},"USERMENTION":{allowed:o3B7530DB,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}};let tagStack;let tagStackIsSorted;let text;let textLen;let uid=0;let wsPos;function disableTag(tagName){if(tagsConfig[tagName]){copyTagConfig(tagName).isDisabled=!0}}
224function enableTag(tagName){if(tagsConfig[tagName]){copyTagConfig(tagName).isDisabled=!1}}
225function getLogger(){return logger}
226function parse(_text){reset(_text);let _uid=uid;executePluginParsers();processTags();finalizeOutput();if(uid!==_uid){throw 'The parser has been reset during execution'}
227if(currentFixingCost>maxFixingCost){logger.warn('Fixing cost limit exceeded')}
228return output}
229function reset(_text){_text=_text.replace(/\r\n?/g,"\n");_text=_text.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/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}
230function setTagLimit(tagName,tagLimit){if(tagsConfig[tagName]){copyTagConfig(tagName).tagLimit=tagLimit}}
231function setNestingLimit(tagName,nestingLimit){if(tagsConfig[tagName]){copyTagConfig(tagName).nestingLimit=nestingLimit}}
232function copyTagConfig(tagName){let tagConfig={},k;for(k in tagsConfig[tagName]){tagConfig[k]=tagsConfig[tagName][k]}
233return tagsConfig[tagName]=tagConfig}
234function encodeUnicodeSupplementaryCharacters(){output=output.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,encodeUnicodeSupplementaryCharactersCallback)}
235function encodeUnicodeSupplementaryCharactersCallback(pair){let cp=(pair.charCodeAt(0)<<10)+pair.charCodeAt(1)-56613888;return'&#'+cp+';'}
236function finalizeOutput(){let tmp;outputText(textLen,0,!0);do{tmp=output;output=output.replace(/<([^ />]+)[^>]*><\/\1>/g,'')}
237while(output!==tmp);output=output.replace(/<\/i><i>/g,'');output=output.replace(/[\x00-\x08\x0B-\x1F\uFFFE\uFFFF]/g,'');encodeUnicodeSupplementaryCharacters();let tagName=(isRich)?'r':'t';tmp='<'+tagName;if(HINT.namespaces){for(let prefix in namespaces){tmp+=' xmlns:'+prefix+'="urn:s9e:TextFormatter:'+prefix+'"'}}
238output=tmp+'>'+output+'</'+tagName+'>'}
239function outputTag(tag){isRich=!0;let 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}
240let closeParagraph=!!(!tag.isStartTag()||(HINT.RULE_BREAK_PARAGRAPH&&(tagFlags&RULE_BREAK_PARAGRAPH)));outputText(tagPos,skipBefore,closeParagraph);let tagText=(tagLen)?htmlspecialchars_noquotes(text.substring(tagPos,tagPos+tagLen)):'';if(tag.isStartTag()){if(!HINT.RULE_BREAK_PARAGRAPH||!(tagFlags&RULE_BREAK_PARAGRAPH)){outputParagraphStart(tagPos)}
241if(HINT.namespaces){let colonPos=tagName.indexOf(':');if(colonPos>0){namespaces[tagName.substring(0,colonPos)]=0}}
242output+='<'+tagName;let attributes=tag.getAttributes(),attributeNames=[];for(let attrName in attributes){attributeNames.push(attrName)}
243attributeNames.sort((a,b)=>(a>b)?1:-1);attributeNames.forEach((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>'}
244output+='</'+tagName+'>'}
245pos=tagPos+tagLen;wsPos=pos;while(skipAfter&&wsPos<textLen&&text[wsPos]==="\n"){--skipAfter;++wsPos}}
246function outputText(catchupPos,maxLines,closeParagraph){if(closeParagraph){if(!(context.flags&RULE_CREATE_PARAGRAPHS)){closeParagraph=!1}else{maxLines=-1}}
247if(pos>=catchupPos){if(closeParagraph){outputParagraphEnd()}}
248if(wsPos>pos){let skipPos=Math.min(catchupPos,wsPos);output+=text.substring(pos,skipPos);pos=skipPos;if(pos>=catchupPos){if(closeParagraph){outputParagraphEnd()}}}
249let 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>'}
250output+=catchupText;pos=catchupPos;if(closeParagraph){outputParagraphEnd()}
251return}
252let ignorePos=catchupPos,ignoreLen=0;while(maxLines&&--ignorePos>=pos){let c=text[ignorePos];if(c!==' '&&c!=="\n"&&c!=="\t"){break}
253if(c==="\n"){--maxLines}
254++ignoreLen}
255catchupPos-=ignoreLen;if(HINT.RULE_CREATE_PARAGRAPHS&&context.flags&RULE_CREATE_PARAGRAPHS){if(!context.inParagraph){outputWhitespace(catchupPos);if(catchupPos>pos){outputParagraphStart(catchupPos)}}
256let pbPos=text.indexOf("\n\n",pos);while(pbPos>-1&&pbPos<catchupPos){outputText(pbPos,0,!0);outputParagraphStart(catchupPos);pbPos=text.indexOf("\n\n",pos)}}
257if(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")}
258output+=catchupText}
259if(closeParagraph){outputParagraphEnd()}
260if(ignoreLen){output+=text.substring(catchupPos,catchupPos+ignoreLen)}
261pos=catchupPos+ignoreLen}
262function outputBrTag(tag){outputText(tag.getPos(),0,!1);output+='<br/>'}
263function outputIgnoreTag(tag){let tagPos=tag.getPos(),tagLen=tag.getLen();let ignoreText=text.substring(tagPos,tagPos+tagLen);outputText(tagPos,0,!1);output+='<i>'+htmlspecialchars_noquotes(ignoreText)+'</i>';isRich=!0;pos=tagPos+tagLen}
264function outputParagraphStart(maxPos){if(!HINT.RULE_CREATE_PARAGRAPHS){return}
265if(context.inParagraph||!(context.flags&RULE_CREATE_PARAGRAPHS)){return}
266outputWhitespace(maxPos);if(pos<textLen){output+='<p>';
266context.inParagraph=!0}}
267function outputParagraphEnd(){if(!context.inParagraph){return}
268output+='</p>';context.inParagraph=!1}
269function outputVerbatim(tag){let flags=context.flags;context.flags=tag.getFlags();outputText(currentTag.getPos()+currentTag.getLen(),0,!1);context.flags=flags}
270function outputWhitespace(maxPos){while(pos<maxPos&&" \n\t".indexOf(text[pos])>-1){output+=text[pos];++pos}}
271function disablePlugin(pluginName){if(plugins[pluginName]){plugins[pluginName].isDisabled=!0}}
272function enablePlugin(pluginName){if(plugins[pluginName]){plugins[pluginName].isDisabled=!1}}
273function executePluginParser(pluginName){let pluginConfig=plugins[pluginName];if(pluginConfig.quickMatch&&text.indexOf(pluginConfig.quickMatch)<0){return}
274let matches=[];if(HINT.regexp&&HINT.regexpLimit&&typeof pluginConfig.regexp!=='undefined'&&typeof pluginConfig.regexpLimit!=='undefined'){matches=getMatches(pluginConfig.regexp,pluginConfig.regexpLimit);if(!matches.length){return}}
275getPluginParser(pluginName)(text,matches)}
276function executePluginParsers(){for(let pluginName in plugins){if(!plugins[pluginName].isDisabled){executePluginParser(pluginName)}}}
277function getMatches(regexp,limit){regexp.lastIndex=0;let matches=[],cnt=0,m;while(++cnt<=limit&&(m=regexp.exec(text))){let pos=m.index,match=[[m[0],pos]],i=0;while(++i<m.length){let str=m[i];if(str===undefined){match.push(['',-1])}else{match.push([str,text.indexOf(str,pos)]);pos+=str.length}}
278matches.push(match)}
279return matches}
280function getPluginParser(pluginName){return plugins[pluginName].parser}
281function registerParser(pluginName,parser,regexp,limit){if(!plugins[pluginName]){plugins[pluginName]={}}
282if(regexp){plugins[pluginName].regexp=regexp;plugins[pluginName].limit=limit||Infinity}
283plugins[pluginName].parser=parser}
284function closeAncestor(tag){if(!HINT.closeAncestor){return!1}
285if(openTags.length){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.closeAncestor){let i=openTags.length;while(--i>=0){let ancestor=openTags[i],ancestorName=ancestor.getName();if(tagConfig.rules.closeAncestor[ancestorName]){++currentFixingCost;tagStack.push(tag);addMagicEndTag(ancestor,tag.getPos(),tag.getSortPriority()-1);return!0}}}}
286return!1}
287function closeParent(tag){if(!HINT.closeParent){return!1}
288if(openTags.length){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.closeParent){let 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}}}
289return!1}
290function createChild(tag){if(!HINT.createChild){return}
291let tagConfig=tagsConfig[tag.getName()];if(tagConfig.rules.createChild){let priority=-1000,_text=text.substring(pos),tagPos=pos+_text.length-_text.replace(/^[ \n\r\t]+/,'').length;tagConfig.rules.createChild.forEach((tagName)=>{addStartTag(tagName,tagPos,0,++priority)})}}
292function fosterParent(tag){if(!HINT.fosterParent){return!1}
293if(openTags.length){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.fosterParent){let parent=openTags[openTags.length-1],parentName=parent.getName();if(tagConfig.rules.fosterParent[parentName]){if(parentName!==tagName&&currentFixingCost<maxFixingCost){addFosterTag(tag,parent)}
294tagStack.push(tag);addMagicEndTag(parent,tag.getPos(),tag.getSortPriority()-1);currentFixingCost+=4;return!0}}}
295return!1}
296function requireAncestor(tag){if(!HINT.requireAncestor){return!1}
297let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.requireAncestor){let i=tagConfig.rules.requireAncestor.length;while(--i>=0){let ancestorName=tagConfig.rules.requireAncestor[i];if(cntOpen[ancestorName]){return!1}}
298logger.err('Tag requires an ancestor',{'requireAncestor':tagConfig.rules.requireAncestor.join(', '),'tag':tag});return!0}
299return!1}
300function addFosterTag(tag,fosterTag){let coords=getMagicStartCoords(tag.getPos()+tag.getLen()),childPos=coords[0],childPrio=coords[1];let childTag=addCopyTag(fosterTag,childPos,0,childPrio);tag.cascadeInvalidationTo(childTag)}
301function addMagicEndTag(startTag,tagPos,prio){let tagName=startTag.getName();if(HINT.RULE_IGNORE_WHITESPACE&&((currentTag.getFlags()|startTag.getFlags())&RULE_IGNORE_WHITESPACE)){tagPos=getMagicEndPos(tagPos)}
302let endTag=addEndTag(tagName,tagPos,0,prio||0);endTag.pairWith(startTag);return endTag}
303function getMagicEndPos(tagPos){while(tagPos>pos&&WHITESPACE.indexOf(text[tagPos-1])>-1){--tagPos}
304return tagPos}
305function getMagicStartCoords(tagPos){let nextPos,nextPrio,nextTag,prio;if(!tagStack.length){nextPos=textLen+1;nextPrio=0}else{nextTag=tagStack[tagStack.length-1];nextPos=nextTag.getPos();nextPrio=nextTag.getSortPriority()}
306while(tagPos<nextPos&&WHITESPACE.indexOf(text[tagPos])>-1){++tagPos}
307prio=(tagPos===nextPos)?nextPrio-1:0;return[tagPos,prio]}
308function isFollowedByClosingTag(tag){return(!tagStack.length)?!1:tagStack[tagStack.length-1].canClose(tag)}
309function processTags(){if(!tagStack.length){return}
310for(let tagName in tagsConfig){cntOpen[tagName]=0;cntTotal[tagName]=0}
311do{while(tagStack.length){if(!tagStackIsSorted){sortTags()}
312currentTag=tagStack.pop();processCurrentTag()}
313openTags.forEach((startTag)=>{addMagicEndTag(startTag,textLen)})}
314while(tagStack.length);}
315function processCurrentTag(){if((context.flags&RULE_IGNORE_TAGS)&&!currentTag.canClose(openTags[openTags.length-1])&&!currentTag.isSystemTag()){currentTag.invalidate()}
316let tagPos=currentTag.getPos(),tagLen=currentTag.getLen();if(pos>tagPos&&!currentTag.isInvalid()){let startTag=currentTag.getStartTag();if(startTag&&openTags.indexOf(startTag)>=0){addEndTag(startTag.getName(),pos,Math.max(0,tagPos+tagLen-pos)).pairWith(startTag);return}
317if(currentTag.isIgnoreTag()){let ignoreLen=tagPos+tagLen-pos;if(ignoreLen>0){addIgnoreTag(pos,ignoreLen);return}}
318currentTag.invalidate()}
319if(currentTag.isInvalid()){return}
320if(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)}}
321function processStartTag(tag){let 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}
322filterTag(tag);if(tag.isInvalid()){return}
323if(currentFixingCost<maxFixingCost){if(fosterParent(tag)||closeParent(tag)||closeAncestor(tag)){return}}
324if(cntOpen[tagName]>=tagConfig.nestingLimit){logger.err('Nesting limit exceeded',{'tag':tag,'tagName':tagName,'nestingLimit':tagConfig.nestingLimit});tag.invalidate();return}
325if(!tagIsAllowed(tagName)){let 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)}
326tag.invalidate();return}
327if(requireAncestor(tag)){tag.invalidate();return}
328if(HINT.RULE_AUTO_CLOSE&&tag.getFlags()&RULE_AUTO_CLOSE&&!tag.isSelfClosingTag()&&!tag.getEndTag()&&!isFollowedByClosingTag(tag)){let newTag=new Tag(Tag.SELF_CLOSING_TAG,tagName,tag.getPos(),tag.getLen());newTag.setAttributes(tag.getAttributes());newTag.setFlags(tag.getFlags());tag=newTag}
329if(HINT.RULE_TRIM_FIRST_LINE&&tag.getFlags()&RULE_TRIM_FIRST_LINE&&text[tag.getPos()+tag.getLen()]==="\n"){addIgnoreTag(tag.getPos()+tag.getLen(),1)}
330outputTag(tag);pushContext(tag);createChild(tag)}
331function processEndTag(tag){let tagName=tag.getName();if(!cntOpen[tagName]){return}
332let closeTags=[];let i=openTags.length;while(--i>=0){let openTag=openTags[i];if(tag.canClose(openTag)){break}
333closeTags.push(openTag);++currentFixingCost}
334if(i<0){logger.debug('Skipping end tag with no start tag',{'tag':tag});return}
335let flags=tag.getFlags();closeTags.forEach((openTag)=>{flags|=openTag.getFlags()});let ignoreWhitespace=(HINT.RULE_IGNORE_WHITESPACE&&(flags&RULE_IGNORE_WHITESPACE));let keepReopening=HINT.RULE_AUTO_REOPEN&&(currentFixingCost<maxFixingCost),reopenTags=[];closeTags.forEach((openTag)=>{let openTagName=openTag.getName();if(keepReopening){if(openTag.getFlags()&RULE_AUTO_REOPEN){reopenTags.push(openTag)}else{keepReopening=!1}}
336let tagPos=tag.getPos();if(ignoreWhitespace){tagPos=getMagicEndPos(tagPos)}
337let endTag=new Tag(Tag.END_TAG,openTagName,tagPos,0);endTag.setFlags(openTag.getFlags());outputTag(endTag);popContext()});outputTag(tag);popContext();if(closeTags.length&&currentFixingCost<maxFixingCost){let ignorePos=pos;i=tagStack.length;while(--i>=0&&++currentFixingCost<maxFixingCost){let upcomingTag=tagStack[i];if(upcomingTag.getPos()>ignorePos||upcomingTag.isStartTag()){break}
338let j=closeTags.length;while(--j>=0&&++currentFixingCost<maxFixingCost){if(upcomingTag.canClose(closeTags[j])){closeTags.splice(j,1);if(reopenTags[j]){reopenTags.splice(j,1)}
339ignorePos=Math.max(ignorePos,upcomingTag.getPos()+upcomingTag.getLen());break}}}
340if(ignorePos>pos){outputIgnoreTag(new Tag(Tag.SELF_CLOSING_TAG,'i',pos,ignorePos-pos))}}
341reopenTags.forEach((startTag)=>{let newTag=addCopyTag(startTag,pos,0);let endTag=startTag.getEndTag();if(endTag){newTag.pairWith(endTag)}})}
342function popContext(){let tag=openTags.pop();--cntOpen[tag.getName()];context=context.parentContext}
343function pushContext(tag){let tagName=tag.getName(),tagFlags=tag.getFlags(),tagConfig=tagsConfig[tagName];++cntTotal[tagName];if(tag.isSelfClosingTag()){return}
344let allowed=[];context.allowed.forEach((v,k)=>{if(!HINT.RULE_IS_TRANSPARENT||!(tagFlags&RULE_IS_TRANSPARENT)){v=(v&0xFF00)|(v>>8)}
345allowed.push(tagConfig.allowed[k]&v)});let flags=tagFlags|(context.flags&RULES_INHERITANCE);if(flags&RULE_DISABLE_AUTO_BR){flags&=~RULE_ENABLE_AUTO_BR}
346++cntOpen[tagName];openTags.push(tag);context={parentContext:context};context.allowed=allowed;context.flags=flags}
347function tagIsAllowed(tagName){let n=tagsConfig[tagName].bitNumber;return!!(context.allowed[n>>3]&(1<<(n&7)))}
348function addStartTag(name,pos,len,prio){return addTag(Tag.START_TAG,name,pos,len,prio||0)}
349function addEndTag(name,pos,len,prio){return addTag(Tag.END_TAG,name,pos,len,prio||0)}
350function addSelfClosingTag(name,pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,name,pos,len,prio||0)}
351function addBrTag(pos,prio){return addTag(Tag.SELF_CLOSING_TAG,'br',pos,0,prio||0)}
352function addIgnoreTag(pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,'i',pos,Math.min(len,textLen-pos),prio||0)}
353function addParagraphBreak(pos,prio){return addTag(Tag.SELF_CLOSING_TAG,'pb',pos,0,prio||0)}
354function addCopyTag(tag,pos,len,prio){let copy=addTag(tag.getType(),tag.getName(),pos,len,tag.getSortPriority());copy.setAttributes(tag.getAttributes());return copy}
355function addTag(type,name,pos,len,prio){let tag=new Tag(type,name,pos,len,prio||0);if(tagsConfig[name]){tag.setFlags(tagsConfig[name].rules.flags)}
356if((!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)}
357return tag}
358function 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)))}
359function insertTag(tag){if(!tagStackIsSorted){tagStack.push(tag)}else{let i=tagStack.length,key=getSortKey(tag);while(i>0&&key>getSortKey(tagStack[i-1])){tagStack[i]=tagStack[i-1];--i}
360tagStack[i]=tag}}
361function addTagPair(name,startPos,startLen,endPos,endLen,prio){let endTag=addEndTag(name,endPos,endLen,-prio||0),startTag=addStartTag(name,startPos,startLen,prio||0);startTag.pairWith(endTag);return startTag}
362function addVerbatim(pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,'v',pos,len,prio||0)}
363function sortTags(){let arr={},keys=[],i=tagStack.length;while(--i>=0){let tag=tagStack[i],key=getSortKey(tag,i);keys.push(key);arr[key]=tag}
364keys.sort();i=keys.length;tagStack=[];while(--i>=0){tagStack.push(arr[keys[i]])}
365tagStackIsSorted=!0}
366function getSortKey(tag,tagIndex){let prioFlag=(tag.getSortPriority()>=0),prio=tag.getSortPriority();if(!prioFlag){prio+=(1<<30)}
367let lenFlag=(tag.getLen()>0),lenOrder;if(lenFlag){lenOrder=textLen-tag.getLen()}else{let order={};order[Tag.END_TAG]=0;order[Tag.SELF_CLOSING_TAG]=1;order[Tag.START_TAG]=2;lenOrder=order[tag.getType()]}
368return hex32(tag.getPos())+(+prioFlag)+hex32(prio)+(+lenFlag)+hex32(lenOrder)+hex32(tagIndex||0)}
369function hex32(number){let hex=number.toString(16);return"        ".substring(hex.length)+hex}
370let xslt={init:function(xsl){xslt.proc=new XSLTProcessor;xslt.proc.importStylesheet(xslt.loadXML(xsl))},loadXML:function(xml){const dom=(new DOMParser).parseFromString(xml,'text/xml');if(!dom){throw 'Cannot parse '+xml}
371return dom},setParameter:function(paramName,paramValue){xslt.proc.setParameter(null,paramName,paramValue)},transformToFragment:function(xml,targetDoc){return xslt.proc.transformToFragment(xslt.loadXML(xml),targetDoc)}};xslt.init(xsl);function preview(text,target){let targetDoc=target.ownerDocument;if(!targetDoc){throw 'Target does not have a ownerDocument'}
372let 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)}
373newScript.textContent=oldScript.textContent;oldScript.parentNode.replaceChild(newScript,oldScript)})}
374if(HINT.hash){computeHashes(resultFragment)}
375if(HINT.onRender){executeEvents(resultFragment,'render')}
376function computeHashes(fragment){let nodes=fragment.querySelectorAll('[data-s9e-livepreview-hash]'),i=nodes.length;while(--i>=0){nodes[i].setAttribute('data-s9e-livepreview-hash',hash(nodes[i].outerHTML))}}
377function executeEvent(node,eventName){let code=node.getAttribute('data-s9e-livepreview-on'+eventName),codeHash=hash(code);if(!functionCache[codeHash]){functionCache[codeHash]=new Function(code)}
378functionCache[codeHash].call(node)}
379function executeEvents(root,eventName){if(root instanceof Element&&root.hasAttribute('data-s9e-livepreview-on'+eventName)){executeEvent(root,eventName)}
380let nodes=root.querySelectorAll('[data-s9e-livepreview-on'+eventName+']'),i=nodes.length;while(--i>=0){executeEvent(nodes[i],eventName)}}
381function refreshElementContent(oldParent,newParent){let 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}
382++left}
383let 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}
384++right}
385let i=oldCnt-right;while(--i>=left){oldParent.removeChild(oldNodes[i]);lastUpdated=oldParent}
386let rightBoundary=newCnt-right;if(left>=rightBoundary){return}
387let newNodesFragment=targetDoc.createDocumentFragment();i=left;do{newNode=newNodes[i];if(HINT.onUpdate&&newNode instanceof Element){executeEvents(newNode,'update')}
388lastUpdated=newNodesFragment.appendChild(newNode)}
389while(i<--rightBoundary);if(!right){oldParent.appendChild(newNodesFragment)}else{oldParent.insertBefore(newNodesFragment,oldParent.childNodes[left])}}
390function refreshNode(oldNode,newNode){if(oldNode.nodeName!==newNode.nodeName||oldNode.nodeType!==newNode.nodeType){return!1}
391if(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')}
392syncElementAttributes(oldNode,newNode);refreshElementContent(oldNode,newNode)}}else if(oldNode.nodeType===3||oldNode.nodeType===8){if(oldNode.nodeValue!==newNode.nodeValue){oldNode.nodeValue=newNode.nodeValue;lastUpdated=oldNode}}
393return!0}
394function elementHashesMatch(oldEl,newEl){if(!HINT.hash){return!1}
395const attrName='data-s9e-livepreview-hash';return oldEl.hasAttribute(attrName)&&newEl.hasAttribute(attrName)&&oldEl.getAttribute(attrName)===newEl.getAttribute(attrName)}
396function hash(text){let pos=text.length,s1=0,s2=0;while(--pos>=0){s1=(s1+text.charCodeAt(pos))%0xFFFF;s2=(s1+s2)%0xFFFF}
397return(s2<<16)|s1}
398function syncElementAttributes(oldEl,newEl){let 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){let oldAttr=oldAttributes[i],namespaceURI=oldAttr.namespaceURI,attrName=oldAttr.name;if(HINT.ignoreAttrs&&ignoreAttrs.indexOf(' '+attrName+' ')>-1){continue}
399if(!newEl.hasAttributeNS(namespaceURI,attrName)){oldEl.removeAttributeNS(namespaceURI,attrName);lastUpdated=oldEl}}
400i=newCnt;while(--i>=0){let newAttr=newAttributes[i],namespaceURI=newAttr.namespaceURI,attrName=newAttr.name,attrValue=newAttr.value;if(HINT.ignoreAttrs&&ignoreAttrs.indexOf(' '+attrName+' ')>-1){continue}
401if(attrValue!==oldEl.getAttributeNS(namespaceURI,attrName)){oldEl.setAttributeNS(namespaceURI,attrName,attrValue);lastUpdated=oldEl}}}
402refreshElementContent(target,resultFragment);return lastUpdated}
403function setParameter(paramName,paramValue){xslt.setParameter(paramName,paramValue)}if(!window.s9e)window.s9e={};window.s9e.TextFormatter={'preview':preview}})();
404
405var module={};
406
407module.exports=function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=34)}([function(t,r,e){"use strict";function n(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r}e.d(r,"a",(function(){return n}))},function(t,r){t.exports=flarum.core.compat.Model},,,,function(t,r,e){"use strict";function n(){return(n=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t}).apply(this,arguments)}e.d(r,"a",(function(){return n}))},function(t,r){t.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(t,r,e){"use strict";function n(t){var r=t.filter((function(t){return t.actions()})).reduce((function(t,r){var e=r.actions().filter((function(t){return"add_to_group"===t.type||"remove_from_group"===t.type})).map((function(t){return t.settings.group_id}));return t.push.apply(t,e),t}),[]);return Array.from(new Set(r).values()).map((function(t){return app.store.getById("groups",t)})).filter((function(t){return t}))}e.d(r,"a",(function(){return n}))},,,,function(t,r,e){"use strict";e.d(r,"a",(function(){return s}));var n=e(0),o=e(12),a=e.n(o),i=e(18),u=e.n(i),c=e(7),s=function(t){function r(){return t.apply(this,arguments)||this}return Object(n.a)(r,t),r.prototype.view=function(){var t=Object(c.a)(this.attrs.criteria),r=this.attrs.user;return m("div",{className:"ManagedGroups Form-group"},m("hr",null),m("h4",null,app.translator.trans("askvortsov-auto-moderator.lib.managed_groups.header")),m("ul",null,t.map((function(t){return m("label",{className:"checkbox"},r&&m("input",{type:"checkbox",checked:r.groups().includes(t),disabled:!0}),app.translator.trans("askvortsov-auto-moderator.lib.managed_groups.group_item",{badge:u.a.component({group:t,label:""}),groupName:t.nameSingular()}))}))),m("p",null,app.translator.trans("askvortsov-auto-moderator.lib.managed_groups.groups_not_editable")))},r}(a.a)},function(t,r){t.exports=flarum.core.compat["common/Component"]},function(t,r){t.exports=flarum.core.compat["common/extend"]},function(t,r){t.exports=flarum.core.compat["common/components/EditUserModal"]},,function(t,r,e){"use strict";e.d(r,"a",(function(){return f}));var n=e(13),o=e(14),a=e.n(o),i=e(6),u=e.n(i),c=e(17),s=e.n(c),p=e(7),l=e(11);function f(){Object(n.extend)(a.a.prototype,"oninit",(function(){var t=this;this.loading=!0,app.store.find("criteria").then((function(r){Object(p.a)(r).forEach((function(r){return delete t.groups[r.id()]})),t.loading=!1,m.redraw()}))})),Object(n.override)(a.a.prototype,"fields",(function(t){if(this.loading){var r=new s.a;return r.add("loading",m(u.a,null)),r}var e=t();return e.add("Criteria",m(l.a,{criteria:app.store.all("criteria"),user:this.attrs.user}),10),e}))}},function(t,r){t.exports=flarum.core.compat["common/utils/ItemList"]},function(t,r){t.exports=flarum.core.compat["common/components/GroupBadge"]},function(t,r){t.exports=flarum.core.compat["models/User"]},function(t,r,e){"use strict";e.d(r,"a",(function(){return p}));var n=e(1),o=e.n(n),a=e(19),i=e.n(a),u=e(5),c=e(0),s=function(t){function r(){return t.apply(this,arguments)||this}return Object(c.a)(r,t),r}(o.a);function p(){app.store.models.criteria=s,i.a.prototype.criteria=o.a.hasMany("criteria")}Object(u.a)(s.prototype,{name:o.a.attribute("name"),icon:o.a.attribute("icon"),description:o.a.attribute("description"),actions:o.a.attribute("actions"),metrics:o.a.attribute("metrics"),requirements:o.a.attribute("requirements"),isValid:o.a.attribute("isValid"),invalidActionSettings:o.a.attribute("invalidActionSettings"),invalidRequirementSettings:o.a.attribute("invalidRequirementSettings")})},,,,,,,,,,,,,,function(t,r,e){"use strict";e.r(r);var n=e(16),o=e(20);
407app.initializers.add("askvortsov/flarum-auto-moderator",(function(){Object(o.a)(),Object(n.a)()}))}]);
408
409
410flarum.extensions['askvortsov-auto-moderator']=module.exports;
411
412var module={};
413
414(()=>{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"}),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")];
414r().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})();
415
416
417flarum.extensions['flarum-likes']=module.exports;
418
419var module={};
420
421(()=>{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 n=flarum.core.compat["common/app"];var i=t.n(n);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);function 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 w=t.n(g),_=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(w(),{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 j=t.n(O),T=navigator.userAgent.match(/Macintosh/)?"⌘":"ctrl",P={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}},S=function(t,o){f()(o.el,P[t])};function I(t,o,e){return function(r){r.key===o&&(r.metaKey&&"⌘"===T||r.ctrlKey&&"ctrl"===T)&&(r.preventDefault(),S(t,e))}}function M(t){var o=this,e="function"==typeof t?t():new(j());function r(t,o){return i().translator.trans("flarum-markdown.lib.composer."+t+"_tooltip")+(o?" <"+T+"-"+o+">":"")}var n=function(t){return function(){return S(t,o.attrs.composer.editor)}};return e.add("header",m(_,{title:r("header"),icon:"fas fa-heading",oncl
421ick:n("header")}),1e3),e.add("bold",m(_,{title:r("bold","b"),icon:"fas fa-bold",onclick:n("bold")}),900),e.add("italic",m(_,{title:r("italic","i"),icon:"fas fa-italic",onclick:n("italic")}),800),e.add("strikethrough",m(_,{title:r("strikethrough"),icon:"fas fa-strikethrough",onclick:n("strikethrough")}),700),e.add("quote",m(_,{title:r("quote"),icon:"fas fa-quote-left",onclick:n("quote")}),600),e.add("spoiler",m(_,{title:r("spoiler"),icon:"fas fa-exclamation-triangle",onclick:n("spoiler")}),500),e.add("code",m(_,{title:r("code"),icon:"fas fa-code",onclick:n("code")}),400),e.add("link",m(_,{title:r("link"),icon:"fas fa-link",onclick:n("link")}),300),e.add("image",m(_,{title:r("image"),icon:"fas fa-image",onclick:n("image")}),200),e.add("unordered_list",m(_,{title:r("unordered_list"),icon:"fas fa-list-ul",onclick:n("unordered_list")}),100),e.add("ordered_list",m(_,{title:r("ordered_list"),icon:"fas fa-list-ol",onclick:n("ordered_list")}),0),e}function F(){return F=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},F.apply(this,arguments)}const N=F({},{"markdown/components/MarkdownButton":_,"markdown/components/MarkdownToolbar":b}),q=flarum.core;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",M):l().prototype.markdownToolbarItems=M,(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)}))})),Object.assign(q.compat,N)})(),module.exports=o})();
422
423
424flarum.extensions['flarum-markdown']=module.exports;
425
426var module={};
427
428(()=>{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"}),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",oncl
428ick:_()("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})).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
428ick: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;
428return 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})();
429
430
431flarum.extensions['flarum-flags']=module.exports;
432
433var module={};
434
435(()=>{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"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o);const e=flarum.core.compat.extend,n=flarum.core.compat["components/UserCard"];var r=t.n(n);const a=flarum.core.compat["utils/UserControls"];var s=t.n(a);const i=flarum.core.compat["components/Button"];var u=t.n(i);function l(t,o){return l=Object.setPrototypeOf||function(t,o){return t.__proto__=o,t},l(t,o)}const c=flarum.core.compat["components/Modal"];var p=t.n(c);const d=flarum.core.compat["utils/Stream"];var y=t.n(d),f=function(t){var o,e;function n(){return t.apply(this,arguments)||this}e=t,(o=n).prototype=Object.create(e.prototype),o.prototype.constructor=o,l(o,e);var r=n.prototype;return r.oninit=function(o){t.prototype.oninit.call(this,o),this.money=y()(this.attrs.user.data.attributes.money||0)},r.className=function(){return"UserMoneyModal Modal--small"},r.title=function(){return app.translator.trans("antoinefr-money.forum.modal.title",{user:this.attrs.user})},r.content=function(){var t=app.forum.attribute("antoinefr-money.moneyname")||"[money]";return m("div",{className:"Modal-body"},m("div",{className:"Form"},m("div",{className:"Form-group"},m("label",null,app.translator.trans("antoinefr-money.forum.modal.current")," ",t.replace("[money]",this.attrs.user.data.attributes.money)),m("input",{required:!0,className:"FormControl",type:"number",step:"any",bidi:this.money})),m("div",{className:"Form-group"},u().component({className:"Button Button--primary",type:"submit",loading:this.loading},app.translator.trans("antoinefr-money.forum.modal.submit_button")))))},r.onsubmit=function(t){var o=this;t.preventDefault(),this.loading=!0,this.attrs.user.save({money:this.money()},{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){o.loading=!1,m.redraw()}))},n}(p());const b=flarum.core.compat.Model;var h=t.n(b);const v=flarum.core.compat["models/User"];var M=t.n(v);
435app.initializers.add("antoinefr-money",(function(){M().prototype.canEditMoney=h().attribute("canEditMoney"),(0,e.extend)(r().prototype,"infoItems",(function(t){var o=app.forum.attribute("antoinefr-money.moneyname")||"[money]";1==app.forum.attribute("antoinefr-money.noshowzero")?0!==this.attrs.user.data.attributes.money&&t.add("money",m("span",null,o.replace("[money]",this.attrs.user.data.attributes.money))):t.add("money",m("span",null,o.replace("[money]",this.attrs.user.data.attributes.money)))})),(0,e.extend)(s(),"moderationControls",(function(t,o){o.canEditMoney()&&t.add("money",u().component({icon:"fas fa-money-bill",onclick:function(){return app.modal.show(f,{user:o})}},app.translator.trans("antoinefr-money.forum.user_controls.money_button")))}))}))})(),module.exports=o})();
436
437
438flarum.extensions['antoinefr-money']=module.exports;
439
440var module={};
441
442/*! For license information please see forum.js.LICENSE.txt */
443(()=>{var t={6148:(t,e,r)=>{"use strict";function n(t){var e=Array.prototype.slice.call(arguments,1);return e.forEach((function(e){e&&Object.keys(e).forEach((function(r){t[r]=e[r]}))})),t}function o(t){return Object.prototype.toString.call(t)}function i(t){return"[object Function]"===o(t)}function s(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var a={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},c={"http:":{validate:function(t,e,r){var n=t.slice(e);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,r){var n=t.slice(e);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?e>=3&&":"===t[e-3]||e>=3&&"/"===t[e-3]?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,r){var n=t.slice(e);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},l="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function p(t){var e=t.re=r(3854)(t.__opts__),n=t.__tlds__.slice();function a(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||n.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),n.push(e.src_xn),e.src_tlds=n.join("|"),e.email_fuzzy=RegExp(a(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(a(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(a(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(a(e.tpl_host_fuzzy_test),"i");var c=[];function l(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}t.__compiled__={},Object.keys(t.__schemas__).forEach((function(e){var r=t.__schemas__[e];if(null!==r){var n={validate:null,link:null};if(t.__compiled__[e]=n,"[object Object]"===o(r))return"[object RegExp]"!==o(r.validate)?i(r.validate)?n.validate=r.validate:l(e,r):n.validate=function(t){return function(e,r){var n=e.slice(r);return t.test(n)?n.match(t)[0].length:0}}(r.validate),void(i(r.normalize)?n.normalize=r.normalize:r.normalize?l(e,r):n.normalize=function(t,e){e.normalize(t)});!function(t){return"[object String]"===o(t)}(r)?l(e,r):c.push(e)}})),c.forEach((function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)})),t.__compiled__[""]={validate:null,normalize:function(t,e){e.normalize(t)}};var p=Object.keys(t.__compiled__).filter((function(e){return e.length>0&&t.__compiled__[e]})).map(s).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+p+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+p+")","ig"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),function(t){t.__index__=-1,t.__text_cache__=""}(t)}function u(t,e){var r=t.__index__,n=t.__last_index__,o=t.__text_cache__.slice(r,n);this.schema=t.__schema__.toLowerCase(),this.index=r+e,this.lastIndex=n+e,this.raw=o,this.text=o,this.url=o}function h(t,e){var r=new u(t,e);return t.__compiled__[r.schema].normalize(r,t),r}function f(t,e){if(!(this instanceof f))return new f(t,e);var r;e||(r=t,Object.keys(r||{}).reduce((function(t,e){return t||a.hasOwnProperty(e)}),!1)&&(e=t,t={})),this.__opts__=n({},a,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},c,t),this.__compiled__={},this.__tlds__=l,this.__tlds_replaced__=!1,this.re={},p(this)}f.prototype.add=function(t,e){return this.__schemas__[t]=e,p(this),this},f.prototype.set=function(t){return this.__opts__=n(this.__opts__,t),this},f.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var e,r,n,o,i,s,a,c;if(this.re.schema_test.test(t))for((a=this.re.schema_search).lastIndex=0;null!==(e=a.exec(t));)if(o=this.testSchemaAt(t,e[2],a.lastIndex)){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=t.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||c<this.__index__)&&null!==(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=r.index+r[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=r.index+r[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&null!==(n=t.match(this.re.email_fuzzy))&&(i=n.index+n[1].length,s=n.index+n[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s)),this.__index__>=0},f.prototype.pretest=function(t){return this.re.pretest.test(t)},f.prototype.testSchemaAt=function(t,e,r){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,r,this):0},f.prototype.match=function(t){var e=0,r=[];this.__index__>=0&&this.__text_cache__===t&&(r.push(h(this,e)),e=this.__last_index__);for(var n=e?t.slice(e):t;this.test(n);)r.push(h(this,e)),n=n.slice(this.__last_index__),e+=this.__last_index__;return r.length?r:null},f.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter((function(t,e,r){return t!==r[e-1]})).reverse(),p(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,p(this),this)},f.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url="mailto:"+t.url)},f.prototype.onCompile=function(){}
443,t.exports=f},3854:(t,e,r)=>{"use strict";t.exports=function(t){var e={};return e.src_Any=r(8486).source,e.src_Cc=r(8690).source,e.src_Z=r(8382).source,e.src_P=r(4601).source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|"),e.src_pseudo_letter="(?:(?![><|]|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|[><|]|"+e.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+e.src_ZCc+"|[.]).|"+(t&&t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+e.src_ZCc+").|\\!(?!"+e.src_ZCc+"|[!]).|\\?(?!"+e.src_ZCc+"|[?]).)+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.
443src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy='(^|[><|]|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}},7142:t=>{"use strict";function e(t,e){var r,n,o=t.posMax,i=!0,s=!0;return r=e>0?t.src.charCodeAt(e-1):-1,n=e+1<=o?t.src.charCodeAt(e+1):-1,(32===r||9===r||n>=48&&n<=57)&&(s=!1),32!==n&&9!==n||(i=!1),{can_open:i,can_close:s}}function r(t,r){var n,o,i,s;if("$"!==t.src[t.pos])return!1;if(!e(t,t.pos).can_open)return r||(t.pending+="$"),t.pos+=1,!0;for(o=n=t.pos+1;-1!==(o=t.src.indexOf("$",o));){for(s=o-1;"\\"===t.src[s];)s-=1;if((o-s)%2==1)break;o+=1}return-1===o?(r||(t.pending+="$"),t.pos=n,!0):o-n==0?(r||(t.pending+="$$"),t.pos=n+1,!0):e(t,o).can_close?(r||((i=t.push("math_inline","math",0)).markup="$",i.content=t.src.slice(n,o)),t.pos=o+1,!0):(r||(t.pending+="$"),t.pos=n,!0)}function n(t,e,r,n){var o,i,s,a,c,l=!1,p=t.bMarks[e]+t.tShift[e],u=t.eMarks[e];if(p+2>u)return!1;if("$$"!==t.src.slice(p,p+2))return!1;if(p+=2,o=t.src.slice(p,u),n)return!0;for("$$"===o.trim().slice(-2)&&(o=o.trim().slice(0,-2),l=!0),s=e;!(l||++s>=r||(p=t.bMarks[s]+t.tShift[s])<(u=t.eMarks[s])&&t.tShift[s]<t.blkIndent);)"$$"===t.src.slice(p,u).trim().slice(-2)&&(a=t.src.slice(0,u).lastIndexOf("$$"),i=t.src.slice(p,a),l=!0);return t.line=s+1,(c=t.push("math_block","math",0)).block=!0,c.content=(o&&o.trim()?o+"\n":"")+t.getLines(e+1,s,t.tShift[e],!0)+(i&&i.trim()?i:""),c.map=[e,t.line],c.markup="$$",!0}t.exports=function(t,e){(e=e||{}).server=e.server||"https://math.now.sh",e.style=e.style||"";var o=function(t){return encodeURIComponent(t).replace("(","%28").replace(")","%29")};t.inline.ruler.after("escape","math_inline",r),t.block.ruler.after("blockquote","math_block",n,{alt:["paragraph","reference","blockquote","list"]}),t.renderer.rules.math_inline=function(t,r){return function(t){try{return'<img src="'+e.server+"?inline="+o(t)+'" style="'+e.style+'display:inline-block;margin: 0;"/>'}catch(e){return console.error(e),t}}(t[r].content)},t.renderer.rules.math_block=function(t,r){return function(t){try{return'<p style="'+e.style+'"><img src="'+e.server+"?from="+o(t)+'" /></p>'}catch(e){return console.error(e),t}}(t[r].content)}}},6454:t=>{"use strict";var e=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function r(t,r){var n,o,i=t.posMax,s=t.pos;if(126!==t.src.charCodeAt(s))return!1;if(r)return!1;if(s+2>=i)return!1;for(t.pos=s+1;t.pos<i;){if(126===t.src.charCodeAt(t.pos)){n=!0;break}t.md.inline.skipToken(t)}return n&&s+1!==t.pos?(o=t.src.slice(s+1,t.pos)).match(/(^|[^\\])(\\\\)*\s/)?(t.pos=s,!1):(t.posMax=t.pos,t.pos=s+1,t.push("sub_open","sub",1).markup="~",t.push("text","",0).content=o.replace(e,"$1"),t.push("sub_close","sub",-1).markup="~",t.pos=t.posMax+1,t.posMax=i,!0):(t.pos=s,!1)}t.exports=function(t){t.inline.ruler.after("emphasis","sub",r)}},2713:t=>{"use strict";var e=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function r(t,r){var n,o,i=t.posMax,s=t.pos;if(94!==t.src.charCodeAt(s))return!1;if(r)return!1;if(s+2>=i)return!1;for(t.pos=s+1;t.pos<i;){if(94===t.src.charCodeAt(t.pos)){n=!0;break}t.md.inline.skipToken(t)}return n&&s+1!==t.pos?(o=t.src.slice(s+1,t.pos)).match(/(^|[^\\])(\\\\)*\s/)?(t.pos=s,!1):(t.posMax=t.pos,t.pos=s+1,t.push("sup_open","sup",1).markup="^",t.push("text","",0).content=o.replace(e,"$1"),t.push("sup_close","sup",-1).markup="^",t.pos=t.posMax+1,t.posMax=i,!0):(t.pos=s,!1)}t.exports=function(t){t.inline.ruler.after("emphasis","sup",r)}},6097:(t,e,r)=>{"use strict";
443t.exports=r(3216)},5495:(t,e,r)=>{"use strict";t.exports=r(9323)},4200:t=>{"use strict";t.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},9205:t=>{"use strict";var e="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",r="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",n=new RegExp("^(?:"+e+"|"+r+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),o=new RegExp("^(?:"+e+"|"+r+")");t.exports.n=n,t.exports.q=o},8575:(t,e,r)=>{"use strict";var n=Object.prototype.hasOwnProperty;function o(t,e){return n.call(t,e)}function i(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||65535==(65535&t)||65534==(65535&t)||t>=0&&t<=8||11===t||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function s(t){if(t>65535){var e=55296+((t-=65536)>>10),r=56320+(1023&t);return String.fromCharCode(e,r)}return String.fromCharCode(t)}var a=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,c=new RegExp(a.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,p=r(5495),u=/[&<>"]/,h=/[&<>"]/g,f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function d(t){return f[t]}var m=/[.?*+^$[\]\\(){}|-]/g,g=r(4601);e.lib={},e.lib.mdurl=r(8618),e.lib.ucmicro=r(2132),e.assign=function(t){var e=Array.prototype.slice.call(arguments,1);return e.forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach((function(r){t[r]=e[r]}))}})),t},e.isString=function(t){return"[object String]"===function(t){return Object.prototype.toString.call(t)}(t)},e.has=o,e.unescapeMd=function(t){return t.indexOf("\\")<0?t:t.replace(a,"$1")},e.unescapeAll=function(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(c,(function(t,e,r){return e||function(t,e){var r=0;return o(p,e)?p[e]:35===e.charCodeAt(0)&&l.test(e)&&i(r="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10))?s(r):t}(t,r)}))},e.isValidEntityCode=i,e.fromCodePoint=s,e.escapeHtml=function(t){return u.test(t)?t.replace(h,d):t},e.arrayReplaceAt=function(t,e,r){return[].concat(t.slice(0,e),r,t.slice(e+1))},e.isSpace=function(t){switch(t){case 9:case 32:return!0}return!1},e.isWhiteSpace=function(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},e.isMdAsciiPunct=function(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},e.isPunctChar=function(t){return g.test(t)},e.escapeRE=function(t){return t.replace(m,"\\$&")},e.normalizeReference=function(t){return t=t.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}},6420:(t,e,r)=>{"use strict";e.parseLinkLabel=r(5558),e.parseLinkDestination=r(9317),e.parseLinkTitle=r(3136)},9317:(t,e,r)=>{"use strict";var n=r(8575).unescapeAll;t.exports=function(t,e,r){var o,i,s=e,a={ok:!1,pos:0,lines:0,str:""};if(60===t.charCodeAt(e)){for(e++;e<r;){if(10===(o=t.charCodeAt(e)))return a;if(62===o)return a.pos=e+1,a.str=n(t.slice(s+1,e)),a.ok=!0,a;92===o&&e+1<r?e+=2:e++}return a}for(i=0;e<r&&32!==(o=t.charCodeAt(e))&&!(o<32||127===o);)if(92===o&&e+1<r)e+=2;else{if(40===o&&i++,41===o){if(0===i)break;i--}e++}return s===e||0!==i||(a.str=n(t.slice(s,e)),a.lines=0,a.pos=e,a.ok=!0),a}},5558:t=>{"use strict";t.exports=function(t,e,r){var n,o,i,s,a=-1,c=t.posMax,l=t.pos;for(t.pos=e+1,n=1;t.pos<c;
vendor: 31,302 bytes, line 443
443){if(93===(i=t.src.charCodeAt(t.pos))&&0==--n){o=!0;break}if(s=t.pos,t.md.inline.skipToken(t),91===i)if(s===t.pos-1)n++;else if(r)return t.pos=l,-1}return o&&(a=t.pos),t.pos=l,a}},3136:(t,e,r)=>{"use strict";var n=r(8575).unescapeAll;t.exports=function(t,e,r){var o,i,s=0,a=e,c={ok:!1,pos:0,lines:0,str:""};if(e>=r)return c;if(34!==(i=t.charCodeAt(e))&&39!==i&&40!==i)return c;for(e++,40===i&&(i=41);e<r;){if((o=t.charCodeAt(e))===i)return c.pos=e+1,c.lines=s,c.str=n(t.slice(a+1,e)),c.ok=!0,c;10===o?s++:92===o&&e+1<r&&(e++,10===t.charCodeAt(e)&&s++),e++}return c}},3216:(t,e,r)=>{"use strict";var n=r(8575),o=r(6420),i=r(1049),s=r(6448),a=r(1799),c=r(8771),l=r(6148),p=r(8618),u=r(2231),h={default:r(2983),zero:r(3012),commonmark:r(3394)},f=/^(vbscript|javascript|file|data):/,d=/^data:image\/(gif|png|jpeg|webp);/;function m(t){var e=t.trim().toLowerCase();return!f.test(e)||!!d.test(e)}var g=["http:","https:","mailto:"];function v(t){var e=p.parse(t,!0);if(e.hostname&&(!e.protocol||g.indexOf(e.protocol)>=0))try{e.hostname=u.toASCII(e.hostname)}catch(t){}return p.encode(p.format(e))}function y(t){var e=p.parse(t,!0);if(e.hostname&&(!e.protocol||g.indexOf(e.protocol)>=0))try{e.hostname=u.toUnicode(e.hostname)}catch(t){}return p.decode(p.format(e))}function k(t,e){if(!(this instanceof k))return new k(t,e);e||n.isString(t)||(e=t||{},t="default"),this.inline=new c,this.block=new a,this.core=new s,this.renderer=new i,this.linkify=new l,this.validateLink=m,this.normalizeLink=v,this.normalizeLinkText=y,this.utils=n,this.helpers=n.assign({},o),this.options={},this.configure(t),e&&this.set(e)}k.prototype.set=function(t){return n.assign(this.options,t),this},k.prototype.configure=function(t){var e,r=this;if(n.isString(t)&&!(t=h[e=t]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&r.set(t.options),t.components&&Object.keys(t.components).forEach((function(e){t.components[e].rules&&r[e].ruler.enableOnly(t.components[e].rules),t.components[e].rules2&&r[e].ruler2.enableOnly(t.components[e].rules2)})),this},k.prototype.enable=function(t,e){var r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){r=r.concat(this[e].ruler.enable(t,!0))}),this),r=r.concat(this.inline.ruler2.enable(t,!0));var n=t.filter((function(t){return r.indexOf(t)<0}));if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},k.prototype.disable=function(t,e){var r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){r=r.concat(this[e].ruler.disable(t,!0))}),this),r=r.concat(this.inline.ruler2.disable(t,!0));var n=t.filter((function(t){return r.indexOf(t)<0}));if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},k.prototype.use=function(t){var e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},k.prototype.parse=function(t,e){if("string"!=typeof t)throw new Error("Input data should be a String");var r=new this.core.State(t,this,e);return this.core.process(r),r.tokens},k.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},k.prototype.parseInline=function(t,e){var r=new this.core.State(t,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens},k.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)},t.exports=k},1799:(t,e,r)=>{"use strict";var n=r(1920),o=[["table",r(4052),["paragraph","reference"]],["code",r(7063)],["fence",r(1452),["paragraph","reference","blockquote","list"]],["blockquote",r(9704),["paragraph","reference","blockquote","list"]],["hr",r(8520),["paragraph","reference","blockquote","list"]],["list",r(7326),["paragraph","reference","blockquote"]],["reference",r(8588)],["heading",r(7965),["paragraph","reference","blockquote"]],["lheading",r(7305)],["html_block",r(1236),["paragraph","reference","blockquote"]],["paragraph",r(1552)]];function i(){this.ruler=new n;for(var t=0;t<o.length;t++)this.ruler.push(o[t][0],o[t][1],{alt:(o[t][2]||[]).slice()})}i.prototype.tokenize=function(t,e,r){for(var n,o=this.ruler.getRules(""),i=o.length,s=e,a=!1,c=t.md.options.maxNesting;s<r&&(t.line=s=t.skipEmptyLines(s),!(s>=r))&&!(t.sCount[s]<t.blkIndent);){if(t.level>=c){t.line=r;break}for(n=0;n<i&&!o[n](t,s,r,!1);n++);t.tight=!a,t.isEmpty(t.line-1)&&(a=!0),(s=t.line)<r&&t.isEmpty(s)&&(a=!0,s++,t.line=s)}},i.prototype.parse=function(t,e,r,n){var o;t&&(o=new this.State(t,e,r,n),this.tokenize(o,o.line,o.lineMax))},i.prototype.State=r(6895),t.exports=i},6448:(t,e,r)=>{"use strict";var n=r(1920),o=[["normalize",r(4598)],["block",r(1534)],["inline",r(8602)],["linkify",r(7622)],["replacements",r(877)],["smartquotes",r(875)]];function i(){this.ruler=new n;for(var t=0;t<o.length;t++)this.ruler.push(o[t][0],o[t][1])}i.prototype.process=function(t){var e,r,n;for(e=0,r=(n=this.ruler.getRules("")).length;e<r;e++)n[e](t)},i.prototype.State=r(5753),t.exports=i},8771:(t,e,r)=>{"use strict";var n=r(1920),o=[["text",r(7573)],["newline",r(4508)],["escape",r(6280)],["backticks",r(3401)],["strikethrough",r(8492).w],["emphasis",r(8648).w],["link",r(9846)],["image",r(8255)],["autolink",r(2490)],["html_inline",r(3839)],["entity",r(3010)]],i=[["balance_pairs",r(8339)],["strikethrough",r(8492).g],["emphasis",r(8648).g],["text_collapse",r(3815)]];function s(){var t;for(this.ruler=new n,t=0;t<o.length;t++)this.ruler.push(o[t][0],o[t][1]);for(this.ruler2=new n,t=0;t<i.length;t++)this.ruler2.push(i[t][0],i[t][1])}s.prototype.skipToken=function(t){var e,r,n=t.pos,o=this.ruler.getRules(""),i=o.length,s=t.md.options.maxNesting,a=t.cache;if(void 0===a[n]){if(t.level<s)for(r=0;r<i&&(t.level++,e=o[r](t,!0),t.level--,!e);r++);else t.pos=t.posMax;e||t.pos++,a[n]=t.pos}else t.pos=a[n]},s.prototype.tokenize=function(t){for(var e,r,n=this.ruler.getRules(""),o=n.length,i=t.posMax,s=t.md.options.maxNesting;t.pos<i;){if(t.level<s)for(r=0;r<o&&!(e=n[r](t,!1));r++);if(e){if(t.pos>=i)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},s.prototype.parse=function(t,e,r,n){var o,i,s,a=new this.State(t,e,r,n);for(this.tokenize(a),s=(i=this.ruler2.getRules("")).length,o=0;o<s;o++)i[o](a)},s.prototype.State=r(9163),t.exports=s},3394:t=>{"use strict";t.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},2983:t=>{"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},3012:t=>{"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},1049:(t,e,r)=>{"use strict";var n=r(8575).assign,o=r(8575).unescapeAll,i=r(8575).escapeHtml,s={};function a(){this.rules=n({},s)}s.code_inline=function(t,e,r,n,o){var s=t[e];return"<code"+o.renderAttrs(s)+">"+i(t[e].content)+"</code>"},s.code_block=function(t,e,r,n,o){var s=t[e];return"<pre"+o.renderAttrs(s)+"><code>"+i(t[e].content)+"</code></pre>\n"},s.fence=function(t,e,r,n,s){var a,c,l,p,u=t[e],h=u.info?o(u.info).trim():"",f="";return h&&(f=h.split(/\s+/g)[0]),0===(a=r.highlight&&r.highlight(u.content,f)||i(u.content)).indexOf("<pre")?a+"\n":h?(c=u.attrIndex("class"),l=u.attrs?u.attrs.slice():[],c<0?l.push(["class",r.langPrefix+f]):l[c][1]+=" "+r.langPrefix+f,p={attrs:l},"<pre><code"+s.renderAttrs(p)+">"+a+"</code></pre>\n"):"<pre><code"+s.renderAttrs(u)+">"+a+"</code></pre>\n"},s.image=function(t,e,r,n,o){var i=t[e];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,r,n),o.renderToken(t,e,r)},s.hardbreak=function(t,e,r){return r.xhtmlOut?"<br />\n":"<br>\n"},s.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?"<br />\n":"<br>\n":"\n"},s.text=function(t,e){return i(t[e].content)},s.html_block=function(t,e){return t[e].content},s.html_inline=function(t,e){return t[e].content},a.prototype.renderAttrs=function(t){var e,r,n;if(!t.attrs)return"";for(n="",e=0,r=t.attrs.length;e<r;e++)n+=" "+i(t.attrs[e][0])+'="'+i(t.attrs[e][1])+'"';return n},a.prototype.renderToken=function(t,e,r){var n,o="",i=!1,s=t[e];return s.hidden?"":(s.block&&-1!==s.nesting&&e&&t[e-1].hidden&&(o+="\n"),o+=(-1===s.nesting?"</":"<")+s.tag,o+=this.renderAttrs(s),0===s.nesting&&r.xhtmlOut&&(o+=" /"),s.block&&(i=!0,1===s.nesting&&e+1<t.length&&("inline"===(n=t[e+1]).type||n.hidden||-1===n.nesting&&n.tag===s.tag)&&(i=!1)),o+=i?">\n":">")},a.prototype.renderInline=function(t,e,r){for(var n,o="",i=this.rules,s=0,a=t.length;s<a;s++)void 0!==i[n=t[s].type]?o+=i[n](t,s,e,r,this):o+=this.renderToken(t,s,e);return o},a.prototype.renderInlineAsText=function(t,e,r){for(var n="",o=0,i=t.length;o<i;o++)"text"===t[o].type?n+=t[o].content:"image"===t[o].type&&(n+=this.renderInlineAsText(t[o].children,e,r));return n},a.prototype.render=function(t,e,r){var n,o,i,s="",a=this.rules;for(n=0,o=t.length;n<o;n++)"inline"===(i=t[n].type)?s+=this.renderInline(t[n].children,e,r):void 0!==a[i]?s+=a[t[n].type](t,n,e,r,this):s+=this.renderToken(t,n,e,r);return s},t.exports=a},1920:t=>{"use strict";function e(){this.__rules__=[],this.__cache__=null}e.prototype.__find__=function(t){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1},e.prototype.__compile__=function(){var t=this,e=[""];t.__rules__.forEach((function(t){t.enabled&&t.alt.forEach((function(t){e.indexOf(t)<0&&e.push(t)}))})),t.__cache__={},e.forEach((function(e){t.__cache__[e]=[],t.__rules__.forEach((function(r){r.enabled&&(e&&r.alt.indexOf(e)<0||t.__cache__[e].push(r.fn))}))}))},e.prototype.at=function(t,e,r){var n=this.__find__(t),o=r||{};if(-1===n)throw new Error("Parser rule not found: "+t);this.__rules__[n].fn=e,this.__rules__[n].alt=o.alt||[],this.__cache__=null},e.prototype.before=function(t,e,r,n){var o=this.__find__(t),i=n||{};if(-1===o)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o,0,{name:e,enabled:!0,fn:r,alt:i.alt||[]}),this.__cache__=null},e.prototype.after=function(t,e,r,n){var o=this.__find__(t),i=n||{};if(-1===o)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o+1,0,{name:e,enabled:!0,fn:r,alt:i.alt||[]}),this.__cache__=null},e.prototype.push=function(t,e,r){var n=r||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:n.alt||[]}),this.__cache__=null},e.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);var r=[];return t.forEach((function(t){var n=this.__find__(t);if(n<0){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[n].enabled=!0,r.push(t)}),this),this.__cache__=null,r},e.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach((function(t){t.enabled=!1})),this.enable(t,e)},e.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);var r=[];return t.forEach((function(t){var n=this.__find__(t);if(n<0){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[n].enabled=!1,r.push(t)}),this),this.__cache__=null,r},e.prototype.getRules=function(t){return null===this.__cache__&&this.__compile__(),this.__cache__[t]||[]},t.exports=e},9704:(t,e,r)=>{"use strict";var n=r(8575).isSpace;t.exports=function(t,e,r,o){var i,s,a,c,l,p,u,h,f,d,m,g,v,y,k,b,_,w,x,C,S=t.lineMax,A=t.bMarks[e]+t.tShift[e],M=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(62!==t.src.charCodeAt(A++))return!1;if(o)return!0;for(c=f=t.sCount[e]+A-(t.bMarks[e]+t.tShift[e]),32===t.src.charCodeAt(A)?(A++,c++,f++,i=!1,b=!0):9===t.src.charCodeAt(A)?(b=!0,(t.bsCount[e]+f)%4==3?(A++,c++,f++,i=!1):i=!0):b=!1,d=[t.bMarks[e]],t.bMarks[e]=A;A<M&&(s=t.src.charCodeAt(A),n(s));)9===s?f+=4-(f+t.bsCount[e]+(i?1:0))%4:f++,A++;for(m=[t.bsCount[e]],t.bsCount[e]=t.sCount[e]+1+(b?1:0),p=A>=M,y=[t.sCount[e]],t.sCount[e]=f-c,k=[t.tShift[e]],t.tShift[e]=A-t.bMarks[e],w=t.md.block.ruler.getRules("blockquote"),v=t.parentType,t.parentType="blockquote",C=!1,h=e+1;h<r&&(t.sCount[h]<t.blkIndent&&(C=!0),!((A=t.bMarks[h]+t.tShift[h])>=(M=t.eMarks[h])));h++)if(62!==t.src.charCodeAt(A++)||C){if(p)break;for(_=!1,a=0,l=w.length;a<l;a++)if(w[a](t,h,r,!0)){_=!0;break}if(_){t.lineMax=h,0!==t.blkIndent&&(d.push(t.bMarks[h]),m.push(t.bsCount[h]),k.push(t.tShift[h]),y.push(t.sCount[h]),t.sCount[h]-=t.blkIndent);break}d.push(t.bMarks[h]),m.push(t.bsCount[h]),k.push(t.tShift[h]),y.push(t.sCount[h]),t.sCount[h]=-1}else{for(c=f=t.sCount[h]+A-(t.bMarks[h]+t.tShift[h]),32===t.src.charCodeAt(A)?(A++,c++,f++,i=!1,b=!0):9===t.src.charCodeAt(A)?(b=!0,(t.bsCount[h]+f)%4==3?(A++,c++,f++,i=!1):i=!0):b=!1,d.push(t.bMarks[h]),t.bMarks[h]=A;A<M&&(s=t.src.charCodeAt(A),n(s));)9===s?f+=4-(f+t.bsCount[h]+(i?1:0))%4:f++,A++;p=A>=M,m.push(t.bsCount[h]),t.bsCount[h]=t.sCount[h]+1+(b?1:0),y.push(t.sCount[h]),t.sCount[h]=f-c,k.push(t.tShift[h]),t.tShift[h]=A-t.bMarks[h]}for(g=t.blkIndent,t.blkIndent=0,(x=t.push("blockquote_open","blockquote",1)).markup=">",x.map=u=[e,0],t.md.block.tokenize(t,e,h),(x=t.push("blockquote_close","blockquote",-1)).markup=">",t.lineMax=S,t.parentType=v,u[1]=t.line,a=0;a<k.length;a++)t.bMarks[a+e]=d[a],t.tShift[a+e]=k[a],t.sCount[a+e]=y[a],t.bsCount[a+e]=m[a];return t.blkIndent=g,!0}},7063:t=>{"use strict";t.exports=function(t,e,r){var n,o,i;if(t.sCount[e]-t.blkIndent<4)return!1;for(o=n=e+1;n<r;)if(t.isEmpty(n))n++;else{if(!(t.sCount[n]-t.blkIndent>=4))break;o=++n}return t.line=o,(i=t.push("code_block","code",0)).content=t.getLines(e,o,4+t.blkIndent,!0),i.map=[e,t.line],!0}},1452:t=>{"use strict";t.exports=function(t,e,r,n){var o,i,s,a,c,l,p,u=!1,h=t.bMarks[e]+t.tShift[e],f=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(h+3>f)return!1;if(126!==(o=t.src.charCodeAt(h))&&96!==o)return!1;if(c=h,(i=(h=t.skipChars(h,o))-c)<3)return!1;if(p=t.src.slice(c,h),s=t.src.slice(h,f),96===o&&s.indexOf(String.fromCharCode(o))>=0)return!1;if(n)return!0;for(a=e;!(++a>=r||(h=c=t.bMarks[a]+t.tShift[a])<(f=t.eMarks[a])&&t.sCount[a]<t.blkIndent);)if(t.src.charCodeAt(h)===o&&!(t.sCount[a]-t.blkIndent>=4||(h=t.skipChars(h,o))-c<i||(h=t.skipSpaces(h))<f)){u=!0;break}return i=t.sCount[e],t.line=a+(u?1:0),(l=t.push("fence","code",0)).info=s,l.content=t.getLines(e+1,a,i,!0),l.markup=p,l.map=[e,t.line],!0}},7965:(t,e,r)=>{"use strict";var n=r(8575).isSpace;t.exports=function(t,e,r,o){var i,s,a,c,l=t.bMarks[e]+t.tShift[e],p=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(35!==(i=t.src.charCodeAt(l))||l>=p)return!1;for(s=1,i=t.src.charCodeAt(++l);35===i&&l<p&&s<=6;)s++,i=t.src.charCodeAt(++l);return!(s>6||l<p&&!n(i)||(o||(p=t.skipSpacesBack(p,l),(a=t.skipCharsBack(p,35,l))>l&&n(t.src.charCodeAt(a-1))&&(p=a),t.line=e+1,(c=t.push("heading_open","h"+String(s),1)).markup="########".slice(0,s),c.map=[e,t.line],(c=t.push("inline","",0)).content=t.src.slice(l,p).trim(),c.map=[e,t.line],c.children=[],(c=t.push("heading_close","h"+String(s),-1)).markup="########".slice(0,s)),0))}},8520:(t,e,r)=>{"use strict";var n=r(8575).isSpace;t.exports=function(t,e,r,o){var i,s,a,c,l=t.bMarks[e]+t.tShift[e],p=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(42!==(i=t.src.charCodeAt(l++))&&45!==i&&95!==i)return!1;for(s=1;l<p;){if((a=t.src.charCodeAt(l++))!==i&&!n(a))return!1;a===i&&s++}return!(s<3||(o||(t.line=e+1,(c=t.push("hr","hr",0)).map=[e,t.line],c.markup=Array(s+1).join(String.fromCharCode(i))),0))}},1236:(t,e,r)=>{"use strict";var n=r(4200),o=r(9205).q,i=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+n.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];t.exports=function(t,e,r,n){var o,s,a,c,l=t.bMarks[e]+t.tShift[e],p=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(l))return!1;for(c=t.src.slice(l,p),o=0;o<i.length&&!i[o][0].test(c);o++);if(o===i.length)return!1;if(n)return i[o][2];if(s=e+1,!i[o][1].test(c))for(;s<r&&!(t.sCount[s]<t.blkIndent);s++)if(l=t.bMarks[s]+t.tShift[s],p=t.eMarks[s],c=t.src.slice(l,p),i[o][1].test(c)){0!==c.length&&s++;break}return t.line=s,(a=t.push("html_block","",0)).map=[e,s],a.content=t.getLines(e,s,t.blkIndent,!0),!0}},7305:t=>{"use strict";t.exports=function(t,e,r){var n,o,i,s,a,c,l,p,u,h,f=e+1,d=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;for(h=t.parentType,t.parentType="paragraph";f<r&&!t.isEmpty(f);f++)if(!(t.sCount[f]-t.blkIndent>3)){if(t.sCount[f]>=t.blkIndent&&(c=t.bMarks[f]+t.tShift[f])<(l=t.eMarks[f])&&(45===(u=t.src.charCodeAt(c))||61===u)&&(c=t.skipChars(c,u),(c=t.skipSpaces(c))>=l)){p=61===u?1:2;break}if(!(t.sCount[f]<0)){for(o=!1,i=0,s=d.length;i<s;i++)if(d[i](t,f,r,!0)){o=!0;break}if(o)break}}return!!p&&(n=t.getLines(e,f,t.blkIndent,!1).trim(),t.line=f+1,(a=t.push("heading_open","h"+String(p),1)).markup=String.fromCharCode(u),a.map=[e,t.line],(a=t.push("inline","",0)).content=n,a.map=[e,t.line-1],a.children=[],(a=t.push("heading_close","h"+String(p),-1)).markup=String.fromCharCode(u),t.parentType=h,!0)}},7326:(t,e,r)=>{"use strict";var n=r(8575).isSpace;function o(t,e){var r,o,i,s;return o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e],42!==(r=t.src.charCodeAt(o++))&&45!==r&&43!==r||o<i&&(s=t.src.charCodeAt(o),!n(s))?-1:o}function i(t,e){var r,o=t.bMarks[e]+t.tShift[e],i=o,s=t.eMarks[e];if(i+1>=s)return-1;if((r=t.src.charCodeAt(i++))<48||r>57)return-1;for(;;){if(i>=s)return-1;if(!((r=t.src.charCodeAt(i++))>=48&&r<=57)){if(41===r||46===r)break;return-1}if(i-o>=10)return-1}return i<s&&(r=t.src.charCodeAt(i),!n(r))?-1:i}t.exports=function(t,e,r,n){var s,a,c,l,p,u,h,f,d,m,g,v,y,k,b,_,w,x,C,S,A,M,D,E,T,O,N,q,z=!1,I=!0;if(t.sCount[e]-t.blkIndent>=4)return!1;if(t.listIndent>=0&&t.sCount[e]-t.listIndent>=4&&t.sCount[e]<t.blkIndent)return!1;if(n&&"paragraph"===t.parentType&&t.tShift[e]>=t.blkIndent&&(z=!0),(D=i(t,e))>=0){if(h=!0,T=t.bMarks[e]+t.tShift[e],y=Number(t.src.substr(T,D-T-1)),z&&1!==y)return!1}else{if(!((D=o(t,e))>=0))return!1;h=!1}if(z&&t.skipSpaces(D)>=t.eMarks[e])return!1;if(v=t.src.charCodeAt(D-1),n)return!0;for(g=t.tokens.length,h?(q=t.push("ordered_list_open","ol",1),1!==y&&(q.attrs=[["start",y]])):q=t.push("bullet_list_open","ul",1),q.map=m=[e,0],q.markup=String.fromCharCode(v),b=e,E=!1,N=t.md.block.ruler.getRules("list"),x=t.parentType,t.parentType="list";b<r;){for(M=D,k=t.eMarks[b],u=_=t.sCount[b]+D-(t.bMarks[e]+t.tShift[e]);M<k;){if(9===(s=t.src.charCodeAt(M)))_+=4-(_+t.bsCount[b])%4;else{if(32!==s)break;_++}M++}if((p=(a=M)>=k?1:_-u)>4&&(p=1),l=u+p,(q=t.push("list_item_open","li",1)).markup=String.fromCharCode(v),q.map=f=[e,0],A=t.tight,S=t.tShift[e],C=t.sCount[e],w=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=l,t.tight=!0,t.tShift[e]=a-t.bMarks[e],t.sCount[e]=_,a>=k&&t.isEmpty(e+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,e,r,!0),t.tight&&!E||(I=!1),E=t.line-e>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=w,t.tShift[e]=S,t.sCount[e]=C,t.tight=A,(q=t.push("list_item_close","li",-1)).markup=String.fromCharCode(v),b=e=t.line,f[1]=b,a=t.bMarks[e],b>=r)break;if(t.sCount[b]<t.blkIndent)break;if(t.sCount[e]-t.blkIndent>=4)break;for(O=!1,c=0,d=N.length;c<d;c++)if(N[c](t,b,r,!0)){O=!0;break}if(O)break;if(h){if((D=i(t,b))<0)break}else if((D=o(t,b))<0)break;if(v!==t.src.charCodeAt(D-1))break}return(q=h?t.push("ordered_list_close","ol",-1):t.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(v),m[1]=b,t.line=b,t.parentType=x,I&&function(t,e){var r,n,o=t.level+2;for(r=e+2,n=t.tokens.length-2;r<n;r++)t.tokens[r].level===o&&"paragraph_open"===t.tokens[r].type&&(t.tokens[r+2].hidden=!0,t.tokens[r].hidden=!0,r+=2)}(t,g),!0}},1552:t=>{"use strict";t.exports=function(t,e){var r,n,o,i,s,a,c=e+1,l=t.md.block.ruler.getRules("paragraph"),p=t.lineMax;for(a=t.parentType,t.parentType="paragraph";c<p&&!t.isEmpty(c);c++)if(!(t.sCount[c]-t.blkIndent>3||t.sCount[c]<0)){for(n=!1,o=0,i=l.length;o<i;o++)if(l[o](t,c,p,!0)){n=!0;break}if(n)break}return r=t.getLines(e,c,t.blkIndent,!1).trim(),t.line=c,(s=t.push("paragraph_open","p",1)).map=[e,t.line],(s=t.push("inline","",0)).content=r,s.map=[e,t.line],s.children=[],s=t.push("paragraph_close","p",-1),t.parentType=a,!0}},8588:(t,e,r)=>{"use strict";var n=r(8575).normalizeReference,o=r(8575).isSpace;t.exports=function(t,e,r,i){var s,a,c,l,p,u,h,f,d,m,g,v,y,k,b,_,w=0,x=t.bMarks[e]+t.tShift[e],C=t.eMarks[e],S=e+1;if(t.sCount[e]-t.blkIndent>=4)return!1;if(91!==t.src.charCodeAt(x))return!1;for(;++x<C;)if(93===t.src.charCodeAt(x)&&92!==t.src.charCodeAt(x-1)){if(x+1===C)return!1;if(58!==t.src.charCodeAt(x+1))return!1;break}for(l=t.lineMax,b=t.md.block.ruler.getRules("reference"),m=t.parentType,t.parentType="reference";S<l&&!t.isEmpty(S);S++)if(!(t.sCount[S]-t.blkIndent>3||t.sCount[S]<0)){for(k=!1,u=0,h=b.length;u<h;u++)if(b[u](t,S,l,!0)){k=!0;break}if(k)break}for(C=(y=t.getLines(e,S,t.blkIndent,!1).trim()).length,x=1;x<C;x++){if(91===(s=y.charCodeAt(x)))return!1;if(93===s){d=x;break}(10===s||92===s&&++x<C&&10===y.charCodeAt(x))&&w++}if(d<0||58!==y.charCodeAt(d+1))return!1;for(x=d+2;x<C;x++)if(10===(s=y.charCodeAt(x)))w++;else if(!o(s))break;if(!(g=t.md.helpers.parseLinkDestination(y,x,C)).ok)return!1;if(p=t.md.normalizeLink(g.str),!t.md.validateLink(p))return!1;for(a=x=g.pos,c=w+=g.lines,v=x;x<C;x++)if(10===(s=y.charCodeAt(x)))w++;else if(!o(s))break;for(g=t.md.helpers.parseLinkTitle(y,x,C),x<C&&v!==x&&g.ok?(_=g.str,x=g.pos,w+=g.lines):(_="",x=a,w=c);x<C&&(s=y.charCodeAt(x),o(s));)x++;if(x<C&&10!==y.charCodeAt(x)&&_)for(_="",x=a,w=c;x<C&&(s=y.charCodeAt(x),o(s));)x++;return!(x<C&&10!==y.charCodeAt(x)||!(f=n(y.slice(1,d)))||(i||(void 0===t.env.references&&(t.env.references={}),void 0===t.env.references[f]&&(t.env.references[f]={title:_,href:p}),t.parentType=m,t.line=e+w+1),0))}},6895:(t,e,r)=>{"use strict";var n=r(7291),o=r(8575).isSpace;function i(t,e,r,n){var i,s,a,c,l,p,u,h;for(this.src=t,this.md=e,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",h=!1,a=c=p=u=0,l=(s=this.src).length;c<l;c++){if(i=s.charCodeAt(c),!h){if(o(i)){p++,9===i?u+=4-u%4:u++;continue}h=!0}10!==i&&c!==l-1||(10!==i&&c++,this.bMarks.push(a),this.eMarks.push(c),this.tShift.push(p),this.sCount.push(u),this.bsCount.push(0),h=!1,p=0,u=0,a=c+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}i.prototype.push=function(t,e,r){var o=new n(t,e,r);return o.block=!0,r<0&&this.level--,o.level=this.level,r>0&&this.level++,this.tokens.push(o),o},i.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},i.prototype.skipEmptyLines=function(t){for(var e=this.lineMax;t<e&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},i.prototype.skipSpaces=function(t){for(var e,r=this.src.length;t<r&&(e=this.src.charCodeAt(t),o(e));t++);return t},i.prototype.skipSpacesBack=function(t,e){if(t<=e)return t;for(;t>e;)if(!o(this.src.charCodeAt(--t)))return t+1;return t},i.prototype.skipChars=function(t,e){for(var r=this.src.length;t<r&&this.src.charCodeAt(t)===e;t++);return t},i.prototype.skipCharsBack=function(t,e,r){if(t<=r)return t;for(;t>r;)if(e!==this.src.charCodeAt(--t))return t+1;return t},i.prototype.getLines=function(t,e,r,n){var i,s,a,c,l,p,u,h=t;if(t>=e)return"";for(p=new Array(e-t),i=0;h<e;h++,i++){for(s=0,u=c=this.bMarks[h],l=h+1<e||n?this.eMarks[h]+1:this.eMarks[h];c<l&&s<r;){if(a=this.src.charCodeAt(c),o(a))9===a?s+=4-(s+this.bsCount[h])%4:s++;else{if(!(c-u<this.tShift[h]))break;s++}c++}p[i]=s>r?new Array(s-r+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return p.join("")},i.prototype.Token=n,t.exports=i},4052:(t,e,r)=>{"use strict";var n=r(8575).isSpace;function o(t,e){var r=t.bMarks[e]+t.blkIndent,n=t.eMarks[e];return t.src.substr(r,n-r)}function i(t){var e,r=[],n=0,o=t.length,i=0,s=0,a=!1,c=0;for(e=t.charCodeAt(n);n<o;)96===e?a?(a=!1,c=n):i%2==0&&(a=!0,c=n):124!==e||i%2!=0||a||(r.push(t.substring(s,n)),s=n+1),92===e?i++:i=0,++n===o&&a&&(a=!1,n=c+1),e=t.charCodeAt(n);return r.push(t.substring(s)),r}t.exports=function(t,e,r,s){var a,c,l,p,u,h,f,d,m,g,v,y;if(e+2>r)return!1;if(u=e+1,t.sCount[u]<t.blkIndent)return!1;if(t.sCount[u]-t.blkIndent>=4)return!1;if((l=t.bMarks[u]+t.tShift[u])>=t.eMarks[u])return!1;if(124!==(a=t.src.charCodeAt(l++))&&45!==a&&58!==a)return!1;for(;l<t.eMarks[u];){if(124!==(a=t.src.charCodeAt(l))&&45!==a&&58!==a&&!n(a))return!1;l++}for(h=(c=o(t,e+1)).split("|"),m=[],p=0;p<h.length;p++){if(!(g=h[p].trim())){if(0===p||p===h.length-1)continue;return!1}if(!/^:?-+:?$/.test(g))return!1;58===g.charCodeAt(g.length-1)?m.push(58===g.charCodeAt(0)?"center":"right"):58===g.charCodeAt(0)?m.push("left"):m.push("")}if(-1===(c=o(t,e).trim()).indexOf("|"))return!1;if(t.sCount[e]-t.blkIndent>=4)return!1;if((f=(h=i(c.replace(/^\||\|$/g,""))).length)>m.length)return!1;if(s)return!0;for((d=t.push("table_open","table",1)).map=v=[e,0],(d=t.push("thead_open","thead",1)).map=[e,e+1],(d=t.push("tr_open","tr",1)).map=[e,e+1],p=0;p<h.length;p++)(d=t.push("th_open","th",1)).map=[e,e+1],m[p]&&(d.attrs=[["style","text-align:"+m[p]]]),(d=t.push("inline","",0)).content=h[p].trim(),d.map=[e,e+1],d.children=[],d=t.push("th_close","th",-1);for(d=t.push("tr_close","tr",-1),d=t.push("thead_close","thead",-1),(d=t.push("tbody_open","tbody",1)).map=y=[e+2,0],u=e+2;u<r&&!(t.sCount[u]<t.blkIndent)&&-1!==(c=o(t,u).trim()).indexOf("|")&&!(t.sCount[u]-t.blkIndent>=4);u++){for(h=i(c.replace(/^\||\|$/g,"")),d=t.push("tr_open","tr",1),p=0;p<f;p++)d=t.push("td_open","td",1),m[p]&&(d.attrs=[["style","text-align:"+m[p]]]),(d=t.push("inline","",0)).content=h[p]?h[p].trim():"",d.children=[],d=t.push("td_close","td",-1);d=t.push("tr_close","tr",-1)}return d=t.push("tbody_close","tbody",-1),d=t.push("table_close","table",-1),v[1]=y[1]=u,t.line=u,!0}},1534:t=>{"use strict";t.exports=function(t){var e;t.inlineMode?((e=new t.Token("inline","",0)).content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}},8602:t=>{"use strict";t.exports=function(t){var e,r,n,o=t.tokens;for(r=0,n=o.length;r<n;r++)"inline"===(e=o[r]).type&&t.md.inline.parse(e.content,t.md,t.env,e.children)}},7622:(t,e,r)=>{"use strict";var n=r(8575).arrayReplaceAt;function o(t){return/^<\/a\s*>/i.test(t)}t.exports=function(t){var e,r,i,s,a,c,l,p,u,h,f,d,m,g,v,y,k,b,_=t.tokens;if(t.md.options.linkify)for(r=0,i=_.length;r<i;r++)if("inline"===_[r].type&&t.md.linkify.pretest(_[r].content))for(m=0,e=(s=_[r].children).length-1;e>=0;e--)if("link_close"!==(c=s[e]).type){if("html_inline"===c.type&&(b=c.content,/^<a[>\s]/i.test(b)&&m>0&&m--,o(c.content)&&m++),!(m>0)&&"text"===c.type&&t.md.linkify.test(c.content)){for(u=c.content,k=t.md.linkify.match(u),l=[],d=c.level,f=0,p=0;p<k.length;p++)g=k[p].url,v=t.md.normalizeLink(g),t.md.validateLink(v)&&(y=k[p].text,y=k[p].schema?"mailto:"!==k[p].schema||/^mailto:/i.test(y)?t.md.normalizeLinkText(y):t.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):t.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,""),(h=k[p].index)>f&&((a=new t.Token("text","",0)).content=u.slice(f,h),a.level=d,l.push(a)),(a=new t.Token("link_open","a",1)).attrs=[["href",v]],a.level=d++,a.markup="linkify",a.info="auto",l.push(a),(a=new t.Token("text","",0)).content=y,a.level=d,l.push(a),(a=new t.Token("link_close","a",-1)).level=--d,a.markup="linkify",a.info="auto",l.push(a),f=k[p].lastIndex);f<u.length&&((a=new t.Token("text","",0)).content=u.slice(f),a.level=d,l.push(a)),_[r].children=s=n(s,e,l)}}else for(e--;s[e].level!==c.level&&"link_open"!==s[e].type;)e--}},4598:t=>{"use strict";var e=/\r\n?|\n/g,r=/\0/g;t.exports=function(t){var n;n=(n=t.src.replace(e,"\n")).replace(r,"�"),t.src=n}},877:t=>{"use strict";var e=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,r=/\((c|tm|r|p)\)/i,n=/\((c|tm|r|p)\)/gi,o={c:"©",r:"®",p:"§",tm:"™"};function i(t,e){return o[e.toLowerCase()]}function s(t){var e,r,o=0;for(e=t.length-1;e>=0;e--)"text"!==(r=t[e]).type||o||(r.content=r.content.replace(n,i)),"link_open"===r.type&&"auto"===r.info&&o--,"link_close"===r.type&&"auto"===r.info&&o++}function a(t){var r,n,o=0;for(r=t.length-1;r>=0;r--)"text"!==(n=t[r]).type||o||e.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),"link_open"===n.type&&"auto"===n.info&&o--,"link_close"===n.type&&"auto"===n.info&&o++}t.exports=function(t){var n;if(t.md.options.typographer)for(n=t.tokens.length-1;n>=0;n--)"inline"===t.tokens[n].type&&(r.test(t.tokens[n].content)&&s(t.tokens[n].children),e.test(t.tokens[n].content)&&a(t.tokens[n].children))}},875:(t,e,r)=>{"use strict";var n=r(8575).isWhiteSpace,o=r(8575).isPunctChar,i=r(8575).isMdAsciiPunct,s=/['"]/,a=/['"]/g;function c(t,e,r){return t.substr(0,e)+r+t.substr(e+1)}function l(t,e){var r,s,l,p,u,h,f,d,m,g,v,y,k,b,_,w,x,C,S,A,M;for(S=[],r=0;r<t.length;r++){for(s=t[r],f=t[r].level,x=S.length-1;x>=0&&!(S[x].level<=f);x--);if(S.length=x+1,"text"===s.type){u=0,h=(l=s.content).length;t:for(;u<h&&(a.lastIndex=u,p=a.exec(l));){if(_=w=!0,u=p.index+1,C="'"===p[0],m=32,p.index-1>=0)m=l.charCodeAt(p.index-1);else for(x=r-1;x>=0&&"softbreak"!==t[x].type&&"hardbreak"!==t[x].type;x--)if("text"===t[x].type){m=t[x].content.charCodeAt(t[x].content.length-1);break}if(g=32,u<h)g=l.charCodeAt(u);else for(x=r+1;x<t.length&&"softbreak"!==t[x].type&&"hardbreak"!==t[x].type;x++)if("text"===t[x].type){g=t[x].content.charCodeAt(0);break}if(v=i(m)||o(String.fromCharCode(m)),y=i(g)||o(String.fromCharCode(g)),k=n(m),(b=n(g))?_=!1:y&&(k||v||(_=!1)),k?w=!1:v&&(b||y||(w=!1)),34===g&&'"'===p[0]&&m>=48&&m<=57&&(w=_=!1),_&&w&&(_=!1,w=y),_||w){if(w)for(x=S.length-1;x>=0&&(d=S[x],!(S[x].level<f));x--)if(d.single===C&&S[x].level===f){d=S[x],C?(A=e.md.options.quotes[2],M=e.md.options.quotes[3]):(A=e.md.options.quotes[0],M=e.md.options.quotes[1]),s.content=c(s.content,p.index,M),t[d.token].content=c(t[d.token].content,d.pos,A),u+=M.length-1,d.token===r&&(u+=A.length-1),h=(l=s.content).length,S.length=x;continue t}_?S.push({token:r,pos:p.index,single:C,level:f}):w&&C&&(s.content=c(s.content,p.index,"’"))}else C&&(s.content=c(s.content,p.index,"’"))}}}}t.exports=function(t){var e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&s.test(t.tokens[e].content)&&l(t.tokens[e].children,t)}},5753:(t,e,r)=>{"use strict";
443var n=r(7291);function o(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}o.prototype.Token=n,t.exports=o},2490:t=>{"use strict";var e=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,r=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;t.exports=function(t,n){var o,i,s,a,c,l,p=t.pos;return!(60!==t.src.charCodeAt(p)||(o=t.src.slice(p)).indexOf(">")<0||(r.test(o)?(a=(i=o.match(r))[0].slice(1,-1),c=t.md.normalizeLink(a),!t.md.validateLink(c)||(n||((l=t.push("link_open","a",1)).attrs=[["href",c]],l.markup="autolink",l.info="auto",(l=t.push("text","",0)).content=t.md.normalizeLinkText(a),(l=t.push("link_close","a",-1)).markup="autolink",l.info="auto"),t.pos+=i[0].length,0)):!e.test(o)||(a=(s=o.match(e))[0].slice(1,-1),c=t.md.normalizeLink("mailto:"+a),!t.md.validateLink(c)||(n||((l=t.push("link_open","a",1)).attrs=[["href",c]],l.markup="autolink",l.info="auto",(l=t.push("text","",0)).content=t.md.normalizeLinkText(a),(l=t.push("link_close","a",-1)).markup="autolink",l.info="auto"),t.pos+=s[0].length,0))))}},3401:t=>{"use strict";t.exports=function(t,e){var r,n,o,i,s,a,c=t.pos;if(96!==t.src.charCodeAt(c))return!1;for(r=c,c++,n=t.posMax;c<n&&96===t.src.charCodeAt(c);)c++;for(o=t.src.slice(r,c),i=s=c;-1!==(i=t.src.indexOf("`",s));){for(s=i+1;s<n&&96===t.src.charCodeAt(s);)s++;if(s-i===o.length)return e||((a=t.push("code_inline","code",0)).markup=o,a.content=t.src.slice(c,i).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),t.pos=s,!0}return e||(t.pending+=o),t.pos+=o.length,!0}},8339:t=>{"use strict";function e(t,e){var r,n,o,i,s,a,c,l,p={},u=e.length;for(r=0;r<u;r++)if((o=e[r]).length=o.length||0,o.close){for(p.hasOwnProperty(o.marker)||(p[o.marker]=[-1,-1,-1]),s=p[o.marker][o.length%3],a=-1,n=r-o.jump-1;n>s;n-=i.jump+1)if((i=e[n]).marker===o.marker&&(-1===a&&(a=n),i.open&&i.end<0&&i.level===o.level&&(c=!1,(i.close||o.open)&&(i.length+o.length)%3==0&&(i.length%3==0&&o.length%3==0||(c=!0)),!c))){l=n>0&&!e[n-1].open?e[n-1].jump+1:0,o.jump=r-n+l,o.open=!1,i.end=r,i.jump=l,i.close=!1,a=-1;break}-1!==a&&(p[o.marker][(o.length||0)%3]=a)}}t.exports=function(t){var r,n=t.tokens_meta,o=t.tokens_meta.length;for(e(0,t.delimiters),r=0;r<o;r++)n[r]&&n[r].delimiters&&e(0,n[r].delimiters)}},8648:t=>{"use strict";function e(t,e){var r,n,o,i,s,a;for(r=e.length-1;r>=0;r--)95!==(n=e[r]).marker&&42!==n.marker||-1!==n.end&&(o=e[n.end],a=r>0&&e[r-1].end===n.end+1&&e[r-1].token===n.token-1&&e[n.end+1].token===o.token+1&&e[r-1].marker===n.marker,s=String.fromCharCode(n.marker),(i=t.tokens[n.token]).type=a?"strong_open":"em_open",i.tag=a?"strong":"em",i.nesting=1,i.markup=a?s+s:s,i.content="",(i=t.tokens[o.token]).type=a?"strong_close":"em_close",i.tag=a?"strong":"em",i.nesting=-1,i.markup=a?s+s:s,i.content="",a&&(t.tokens[e[r-1].token].content="",t.tokens[e[n.end+1].token].content="",r--))}t.exports.w=function(t,e){var r,n,o=t.pos,i=t.src.charCodeAt(o);if(e)return!1;if(95!==i&&42!==i)return!1;for(n=t.scanDelims(t.pos,42===i),r=0;r<n.length;r++)t.push("text","",0).content=String.fromCharCode(i),t.delimiters.push({marker:i,length:n.length,jump:r,token:t.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return t.pos+=n.length,!0},t.exports.g=function(t){var r,n=t.tokens_meta,o=t.tokens_meta.length;for(e(t,t.delimiters),r=0;r<o;r++)n[r]&&n[r].delimiters&&e(t,n[r].delimiters)}},3010:(t,e,r)=>{"use strict";var n=r(5495),o=r(8575).has,i=r(8575).isValidEntityCode,s=r(8575).fromCodePoint,a=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;t.exports=function(t,e){var r,l,p=t.pos,u=t.posMax;if(38!==t.src.charCodeAt(p))return!1;if(p+1<u)if(35===t.src.charCodeAt(p+1)){if(l=t.src.slice(p).match(a))return e||(r="x"===l[1][0].toLowerCase()?parseInt(l[1].slice(1),16):parseInt(l[1],10),t.pending+=i(r)?s(r):s(65533)),t.pos+=l[0].length,!0}else if((l=t.src.slice(p).match(c))&&o(n,l[1]))return e||(t.pending+=n[l[1]]),t.pos+=l[0].length,!0;return e||(t.pending+="&"),t.pos++,!0}},6280:(t,e,r)=>{"use strict";for(var n=r(8575).isSpace,o=[],i=0;i<256;i++)o.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(t){o[t.charCodeAt(0)]=1})),t.exports=function(t,e){var r,i=t.pos,s=t.posMax;
vendor: 9,098 bytes, line 443
443if(92!==t.src.charCodeAt(i))return!1;if(++i<s){if((r=t.src.charCodeAt(i))<256&&0!==o[r])return e||(t.pending+=t.src[i]),t.pos+=2,!0;if(10===r){for(e||t.push("hardbreak","br",0),i++;i<s&&(r=t.src.charCodeAt(i),n(r));)i++;return t.pos=i,!0}}return e||(t.pending+="\\"),t.pos++,!0}},3839:(t,e,r)=>{"use strict";var n=r(9205).n;t.exports=function(t,e){var r,o,i,s=t.pos;return!(!t.md.options.html||(i=t.posMax,60!==t.src.charCodeAt(s)||s+2>=i||33!==(r=t.src.charCodeAt(s+1))&&63!==r&&47!==r&&!function(t){var e=32|t;return e>=97&&e<=122}(r)||!(o=t.src.slice(s).match(n))||(e||(t.push("html_inline","",0).content=t.src.slice(s,s+o[0].length)),t.pos+=o[0].length,0)))}},8255:(t,e,r)=>{"use strict";var n=r(8575).normalizeReference,o=r(8575).isSpace;t.exports=function(t,e){var r,i,s,a,c,l,p,u,h,f,d,m,g,v="",y=t.pos,k=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;if(l=t.pos+2,(c=t.md.helpers.parseLinkLabel(t,t.pos+1,!1))<0)return!1;if((p=c+1)<k&&40===t.src.charCodeAt(p)){for(p++;p<k&&(i=t.src.charCodeAt(p),o(i)||10===i);p++);if(p>=k)return!1;for(g=p,(h=t.md.helpers.parseLinkDestination(t.src,p,t.posMax)).ok&&(v=t.md.normalizeLink(h.str),t.md.validateLink(v)?p=h.pos:v=""),g=p;p<k&&(i=t.src.charCodeAt(p),o(i)||10===i);p++);if(h=t.md.helpers.parseLinkTitle(t.src,p,t.posMax),p<k&&g!==p&&h.ok)for(f=h.str,p=h.pos;p<k&&(i=t.src.charCodeAt(p),o(i)||10===i);p++);else f="";if(p>=k||41!==t.src.charCodeAt(p))return t.pos=y,!1;p++}else{if(void 0===t.env.references)return!1;if(p<k&&91===t.src.charCodeAt(p)?(g=p+1,(p=t.md.helpers.parseLinkLabel(t,p))>=0?a=t.src.slice(g,p++):p=c+1):p=c+1,a||(a=t.src.slice(l,c)),!(u=t.env.references[n(a)]))return t.pos=y,!1;v=u.href,f=u.title}return e||(s=t.src.slice(l,c),t.md.inline.parse(s,t.md,t.env,m=[]),(d=t.push("image","img",0)).attrs=r=[["src",v],["alt",""]],d.children=m,d.content=s,f&&r.push(["title",f])),t.pos=p,t.posMax=k,!0}},9846:(t,e,r)=>{"use strict";var n=r(8575).normalizeReference,o=r(8575).isSpace;t.exports=function(t,e){var r,i,s,a,c,l,p,u,h,f="",d=t.pos,m=t.posMax,g=t.pos,v=!0;if(91!==t.src.charCodeAt(t.pos))return!1;if(c=t.pos+1,(a=t.md.helpers.parseLinkLabel(t,t.pos,!0))<0)return!1;if((l=a+1)<m&&40===t.src.charCodeAt(l)){for(v=!1,l++;l<m&&(i=t.src.charCodeAt(l),o(i)||10===i);l++);if(l>=m)return!1;for(g=l,(p=t.md.helpers.parseLinkDestination(t.src,l,t.posMax)).ok&&(f=t.md.normalizeLink(p.str),t.md.validateLink(f)?l=p.pos:f=""),g=l;l<m&&(i=t.src.charCodeAt(l),o(i)||10===i);l++);if(p=t.md.helpers.parseLinkTitle(t.src,l,t.posMax),l<m&&g!==l&&p.ok)for(h=p.str,l=p.pos;l<m&&(i=t.src.charCodeAt(l),o(i)||10===i);l++);else h="";(l>=m||41!==t.src.charCodeAt(l))&&(v=!0),l++}if(v){if(void 0===t.env.references)return!1;if(l<m&&91===t.src.charCodeAt(l)?(g=l+1,(l=t.md.helpers.parseLinkLabel(t,l))>=0?s=t.src.slice(g,l++):l=a+1):l=a+1,s||(s=t.src.slice(c,a)),!(u=t.env.references[n(s)]))return t.pos=d,!1;f=u.href,h=u.title}return e||(t.pos=c,t.posMax=a,t.push("link_open","a",1).attrs=r=[["href",f]],h&&r.push(["title",h]),t.md.inline.tokenize(t),t.push("link_close","a",-1)),t.pos=l,t.posMax=m,!0}},4508:(t,e,r)=>{"use strict";var n=r(8575).isSpace;t.exports=function(t,e){var r,o,i=t.pos;if(10!==t.src.charCodeAt(i))return!1;for(r=t.pending.length-1,o=t.posMax,e||(r>=0&&32===t.pending.charCodeAt(r)?r>=1&&32===t.pending.charCodeAt(r-1)?(t.pending=t.pending.replace(/ +$/,""),t.push("hardbreak","br",0)):(t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0)):t.push("softbreak","br",0)),i++;i<o&&n(t.src.charCodeAt(i));)i++;return t.pos=i,!0}},9163:(t,e,r)=>{"use strict";var n=r(7291),o=r(8575).isWhiteSpace,i=r(8575).isPunctChar,s=r(8575).isMdAsciiPunct;function a(t,e,r,n){this.src=t,this.env=r,this.md=e,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[]}a.prototype.pushPending=function(){var t=new n("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t},a.prototype.push=function(t,e,r){this.pending&&this.pushPending();var o=new n(t,e,r),i=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(i),o},a.prototype.scanDelims=function(t,e){var r,n,a,c,l,p,u,h,f,d=t,m=!0,g=!0,v=this.posMax,y=this.src.charCodeAt(t);for(r=t>0?this.src.charCodeAt(t-1):32;d<v&&this.src.charCodeAt(d)===y;)d++;return a=d-t,n=d<v?this.src.charCodeAt(d):32,u=s(r)||i(String.fromCharCode(r)),f=s(n)||i(String.fromCharCode(n)),p=o(r),(h=o(n))?m=!1:f&&(p||u||(m=!1)),p?g=!1:u&&(h||f||(g=!1)),e?(c=m,l=g):(c=m&&(!g||u),l=g&&(!m||f)),{can_open:c,can_close:l,length:a}},a.prototype.Token=n,t.exports=a},8492:t=>{"use strict";function e(t,e){var r,n,o,i,s,a=[],c=e.length;for(r=0;r<c;r++)126===(o=e[r]).marker&&-1!==o.end&&(i=e[o.end],(s=t.tokens[o.token]).type="s_open",s.tag="s",s.nesting=1,s.markup="~~",s.content="",(s=t.tokens[i.token]).type="s_close",s.tag="s",s.nesting=-1,s.markup="~~",s.content="","text"===t.tokens[i.token-1].type&&"~"===t.tokens[i.token-1].content&&a.push(i.token-1));for(;a.length;){for(n=(r=a.pop())+1;n<t.tokens.length&&"s_close"===t.tokens[n].type;)n++;r!==--n&&(s=t.tokens[n],t.tokens[n]=t.tokens[r],t.tokens[r]=s)}}t.exports.w=function(t,e){var r,n,o,i,s=t.pos,a=t.src.charCodeAt(s);if(e)return!1;if(126!==a)return!1;if(o=(n=t.scanDelims(t.pos,!0)).length,i=String.fromCharCode(a),o<2)return!1;for(o%2&&(t.push("text","",0).content=i,o--),r=0;r<o;r+=2)t.push("text","",0).content=i+i,t.delimiters.push({marker:a,length:0,jump:r,token:t.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return t.pos+=n.length,!0},t.exports.g=function(t){var r,n=t.tokens_meta,o=t.tokens_meta.length;for(e(t,t.delimiters),r=0;r<o;r++)n[r]&&n[r].delimiters&&e(t,n[r].delimiters)}},7573:t=>{"use strict";function e(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}t.exports=function(t,r){for(var n=t.pos;n<t.posMax&&!e(t.src.charCodeAt(n));)n++;return n!==t.pos&&(r||(t.pending+=t.src.slice(t.pos,n)),t.pos=n,!0)}},3815:t=>{"use strict";t.exports=function(t){var e,r,n=0,o=t.tokens,i=t.tokens.length;for(e=r=0;e<i;e++)o[e].nesting<0&&n--,o[e].level=n,o[e].nesting>0&&n++,"text"===o[e].type&&e+1<i&&"text"===o[e+1].type?o[e+1].content=o[e].content+o[e+1].content:(e!==r&&(o[r]=o[e]),r++);e!==r&&(o.length=r)}},7291:t=>{"use strict";function e(t,e,r){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}e.prototype.attrIndex=function(t){var e,r,n;if(!this.attrs)return-1;for(r=0,n=(e=this.attrs).length;r<n;r++)if(e[r][0]===t)return r;return-1},e.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},e.prototype.attrSet=function(t,e){var r=this.attrIndex(t),n=[t,e];r<0?this.attrPush(n):this.attrs[r]=n},e.prototype.attrGet=function(t){var e=this.attrIndex(t),r=null;return e>=0&&(r=this.attrs[e][1]),r},e.prototype.attrJoin=function(t,e){var r=this.attrIndex(t);r<0?this.attrPush([t,e]):this.attrs[r][1]=this.attrs[r][1]+" "+e},t.exports=e},5148:t=>{"use strict";var e={};function r(t,n){var o;return"string"!=typeof n&&(n=r.defaultChars),o=function(t){var r,n,o=e[t];if(o)return o;for(o=e[t]=[],r=0;r<128;r++)n=String.fromCharCode(r),o.push(n);for(r=0;r<t.length;r++)o[n=t.charCodeAt(r)]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return o}(n),t.replace(/(%[a-f0-9]{2})+/gi,(function(t){var e,r,n,i,s,a,c,l="";for(e=0,r=t.length;e<r;e+=3)(n=parseInt(t.slice(e+1,e+3),16))<128?l+=o[n]:192==(224&n)&&e+3<r&&128==(192&(i=parseInt(t.slice(e+4,e+6),16)))?(l+=(c=n<<6&1984|63&i)<128?"��":String.fromCharCode(c),e+=3):224==(240&n)&&e+6<r&&(i=parseInt(t.slice(e+4,e+6),16),s=parseInt(t.slice(e+7,e+9),16),128==(192&i)&&128==(192&s))?(l+=(c=n<<12&61440|i<<6&4032|63&s)<2048||c>=55296&&c<=57343?"���":String.fromCharCode(c),e+=6):240==(248&n)&&e+9<r&&(i=parseInt(t.slice(e+4,e+6),16),s=parseInt(t.slice(e+7,e+9),16),a=parseInt(t.slice(e+10,e+12),16),128==(192&i)&&128==(192&s)&&128==(192&a))?((c=n<<18&1835008|i<<12&258048|s<<6&4032|63&a)<65536||c>1114111?l+="����":(c-=65536,l+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),e+=9):l+="�";return l}))}r.defaultChars=";/?:@&=+$,#",r.componentChars="",t.exports=r},2584:t=>{"use strict";var e={};function r(t,n,o){var i,s,a,c,l,p="";for("string"!=typeof n&&(o=n,n=r.defaultChars),void 0===o&&(o=!0),l=function(t){var r,n,o=e[t];if(o)return o;for(o=e[t]=[],r=0;r<128;r++)n=String.fromCharCode(r),/^[0-9a-z]$/i.test(n)?o.push(n):o.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;r<t.length;r++)o[t.charCodeAt(r)]=t[r];return o}(n),i=0,s=t.length;i<s;
vendor: 5,816 bytes, line 443
443i++)if(a=t.charCodeAt(i),o&&37===a&&i+2<s&&/^[0-9a-f]{2}$/i.test(t.slice(i+1,i+3)))p+=t.slice(i,i+3),i+=2;else if(a<128)p+=l[a];else if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<s&&(c=t.charCodeAt(i+1))>=56320&&c<=57343){p+=encodeURIComponent(t[i]+t[i+1]),i++;continue}p+="%EF%BF%BD"}else p+=encodeURIComponent(t[i]);return p}r.defaultChars=";/?:@&=+$,-_.!~*'()#",r.componentChars="-_.!~*'()",t.exports=r},2772:t=>{"use strict";t.exports=function(t){var e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&-1!==t.hostname.indexOf(":")?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",(e+=t.search||"")+(t.hash||"")}},8618:(t,e,r)=>{"use strict";t.exports.encode=r(2584),t.exports.decode=r(5148),t.exports.format=r(2772),t.exports.parse=r(5331)},5331:t=>{"use strict";function e(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var r=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,o=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),s=["'"].concat(i),a=["%","/","?",";","#"].concat(s),c=["/","?","#"],l=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,u={javascript:!0,"javascript:":!0},h={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};e.prototype.parse=function(t,e){var n,i,s,f,d,m=t;if(m=m.trim(),!e&&1===t.split("#").length){var g=o.exec(m);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var v=r.exec(m);if(v&&(s=(v=v[0]).toLowerCase(),this.protocol=v,m=m.substr(v.length)),(e||v||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(d="//"===m.substr(0,2))||v&&u[v]||(m=m.substr(2),this.slashes=!0)),!u[v]&&(d||v&&!h[v])){var y,k,b=-1;for(n=0;n<c.length;n++)-1!==(f=m.indexOf(c[n]))&&(-1===b||f<b)&&(b=f);for(-1!==(k=-1===b?m.lastIndexOf("@"):m.lastIndexOf("@",b))&&(y=m.slice(0,k),m=m.slice(k+1),this.auth=y),b=-1,n=0;n<a.length;n++)-1!==(f=m.indexOf(a[n]))&&(-1===b||f<b)&&(b=f);-1===b&&(b=m.length),":"===m[b-1]&&b--;var _=m.slice(0,b);m=m.slice(b),this.parseHost(_),this.hostname=this.hostname||"";var w="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!w){var x=this.hostname.split(/\./);for(n=0,i=x.length;n<i;n++){var C=x[n];if(C&&!C.match(l)){for(var S="",A=0,M=C.length;A<M;A++)C.charCodeAt(A)>127?S+="x":S+=C[A];if(!S.match(l)){var D=x.slice(0,n),E=x.slice(n+1),T=C.match(p);T&&(D.push(T[1]),E.unshift(T[2])),E.length&&(m=E.join(".")+m),this.hostname=D.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var O=m.indexOf("#");-1!==O&&(this.hash=m.substr(O),m=m.slice(0,O));var N=m.indexOf("?");return-1!==N&&(this.search=m.substr(N),m=m.slice(0,N)),m&&(this.pathname=m),h[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},e.prototype.parseHost=function(t){var e=n.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},t.exports=function(t,r){if(t&&t instanceof e)return t;var n=new e;return n.parse(t,r),n}},3753:(t,e,r)=>{"use strict";function n(t){var e=Array.prototype.slice.call(arguments,1);return e.forEach((function(e){e&&Object.keys(e).forEach((function(r){t[r]=e[r]}))})),t}function o(t){return Object.prototype.toString.call(t)}function i(t){return"[object Function]"===o(t)}function s(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var a={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},c={"http:":{validate:function(t,e,r){var n=t.slice(e);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,r){var n=t.slice(e);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?e>=3&&":"===t[e-3]||e>=3&&"/"===t[e-3]?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,r){var n=t.slice(e);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},l="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function p(t){var e=t.re=r(6306)(t.__opts__),n=t.__tlds__.slice();function a(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||n.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),n.push(e.src_xn),e.src_tlds=n.join("|"),e.email_fuzzy=RegExp(a(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(a(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(a(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(a(e.tpl_host_fuzzy_test),"i");var c=[];function l(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}t.__compiled__={},Object.keys(t.__schemas__).forEach((function(e){var r=t.__schemas__[e];if(null!==r){var n={validate:null,link:null};if(t.__compiled__[e]=n,"[object Object]"===o(r))return"[object RegExp]"!==o(r.validate)?i(r.validate)?n.validate=r.validate:l(e,r):n.validate=function(t){return function(e,r){var n=e.slice(r);return t.test(n)?n.match(t)[0].length:0}}(r.validate),void(i(r.normalize)?n.normalize=r.normalize:r.normalize?l(e,r):n.normalize=function(t,e){e.normalize(t)});!function(t){return"[object String]"===o(t)}(r)?l(e,r):c.push(e)}}
vendor: 4,875 bytes, line 443
443)),c.forEach((function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)})),t.__compiled__[""]={validate:null,normalize:function(t,e){e.normalize(t)}};var p=Object.keys(t.__compiled__).filter((function(e){return e.length>0&&t.__compiled__[e]})).map(s).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+p+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+p+")","ig"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),function(t){t.__index__=-1,t.__text_cache__=""}(t)}function u(t,e){var r=t.__index__,n=t.__last_index__,o=t.__text_cache__.slice(r,n);this.schema=t.__schema__.toLowerCase(),this.index=r+e,this.lastIndex=n+e,this.raw=o,this.text=o,this.url=o}function h(t,e){var r=new u(t,e);return t.__compiled__[r.schema].normalize(r,t),r}function f(t,e){if(!(this instanceof f))return new f(t,e);var r;e||(r=t,Object.keys(r||{}).reduce((function(t,e){return t||a.hasOwnProperty(e)}),!1)&&(e=t,t={})),this.__opts__=n({},a,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},c,t),this.__compiled__={},this.__tlds__=l,this.__tlds_replaced__=!1,this.re={},p(this)}f.prototype.add=function(t,e){return this.__schemas__[t]=e,p(this),this},f.prototype.set=function(t){return this.__opts__=n(this.__opts__,t),this},f.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var e,r,n,o,i,s,a,c;if(this.re.schema_test.test(t))for((a=this.re.schema_search).lastIndex=0;null!==(e=a.exec(t));)if(o=this.testSchemaAt(t,e[2],a.lastIndex)){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=t.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||c<this.__index__)&&null!==(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=r.index+r[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=r.index+r[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&null!==(n=t.match(this.re.email_fuzzy))&&(i=n.index+n[1].length,s=n.index+n[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s)),this.__index__>=0},f.prototype.pretest=function(t){return this.re.pretest.test(t)},f.prototype.testSchemaAt=function(t,e,r){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,r,this):0},f.prototype.match=function(t){var e=0,r=[];this.__index__>=0&&this.__text_cache__===t&&(r.push(h(this,e)),e=this.__last_index__);for(var n=e?t.slice(e):t;this.test(n);)r.push(h(this,e)),n=n.slice(this.__last_index__),e+=this.__last_index__;return r.length?r:null},f.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter((function(t,e,r){return t!==r[e-1]})).reverse(),p(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,p(this),this)},f.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url="mailto:"+t.url)},f.prototype.onCompile=function(){},t.exports=f},6306:(t,e,r)=>{"use strict";t.exports=function(t){var e={};return e.src_Any=r(8486).source,e.src_Cc=r(8690).source,e.src_Z=r(8382).source,e.src_P=r(4601).source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|"),e.src_pseudo_letter="(?:(?![><|]|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|[><|]|"+e.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]).|"+(t&&t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+").|;(?!"+e.src_ZCc+").|\\!+(?!"+e.src_ZCc+"|[!]).|\\?(?!"+e.src_ZCc+"|[?]).)+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}
443"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy='(^|[><|]|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}},4150:(t,e,r)=>{"use strict";t.exports=r(8790)},3727:(t,e,r)=>{"use strict";t.exports=r(3051)},2681:t=>{"use strict";t.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},485:t=>{"use strict";var e="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",r="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",n=new RegExp("^(?:"+e+"|"+r+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),o=new RegExp("^(?:"+e+"|"+r+")");t.exports.n=n,t.exports.q=o},2190:(t,e,r)=>{"use strict";var n=Object.prototype.hasOwnProperty;function o(t,e){return n.call(t,e)}function i(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||65535==(65535&t)||65534==(65535&t)||t>=0&&t<=8||11===t||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function s(t){if(t>65535){var e=55296+((t-=65536)>>10),r=56320+(1023&t);return String.fromCharCode(e,r)}return String.fromCharCode(t)}var a=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,c=new RegExp(a.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,p=r(3727),u=/[&<>"]/,h=/[&<>"]/g,f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function d(t){return f[t]}var m=/[.?*+^$[\]\\(){}|-]/g,g=r(4601);e.lib={},e.lib.mdurl=r(8618),e.lib.ucmicro=r(2132),e.assign=function(t){var e=Array.prototype.slice.call(arguments,1);return e.forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach((function(r){t[r]=e[r]}))}})),t},e.isString=function(t){return"[object String]"===function(t){return Object.prototype.toString.call(t)}(t)},e.has=o,e.unescapeMd=function(t){return t.indexOf("\\")<0?t:t.replace(a,"$1")},e.unescapeAll=function(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(c,(function(t,e,r){return e||function(t,e){var r=0;return o(p,e)?p[e]:35===e.charCodeAt(0)&&l.test(e)&&i(r="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10))?s(r):t}(t,r)}))},e.isValidEntityCode=i,e.fromCodePoint=s,e.escapeHtml=function(t){return u.test(t)?t.replace(h,d):t},e.arrayReplaceAt=function(t,e,r){return[].concat(t.slice(0,e),r,t.slice(e+1))},e.isSpace=function(t){switch(t){case 9:case 32:return!0}return!1},e.isWhiteSpace=function(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},e.isMdAsciiPunct=function(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 
vendor: 31,088 bytes, line 443
44361:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},e.isPunctChar=function(t){return g.test(t)},e.escapeRE=function(t){return t.replace(m,"\\$&")},e.normalizeReference=function(t){return t=t.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}},9557:(t,e,r)=>{"use strict";e.parseLinkLabel=r(3336),e.parseLinkDestination=r(8507),e.parseLinkTitle=r(7073)},8507:(t,e,r)=>{"use strict";var n=r(2190).unescapeAll;t.exports=function(t,e,r){var o,i,s=e,a={ok:!1,pos:0,lines:0,str:""};if(60===t.charCodeAt(e)){for(e++;e<r;){if(10===(o=t.charCodeAt(e)))return a;if(60===o)return a;if(62===o)return a.pos=e+1,a.str=n(t.slice(s+1,e)),a.ok=!0,a;92===o&&e+1<r?e+=2:e++}return a}for(i=0;e<r&&32!==(o=t.charCodeAt(e))&&!(o<32||127===o);)if(92===o&&e+1<r){if(32===t.charCodeAt(e+1))break;e+=2}else{if(40===o&&++i>32)return a;if(41===o){if(0===i)break;i--}e++}return s===e||0!==i||(a.str=n(t.slice(s,e)),a.lines=0,a.pos=e,a.ok=!0),a}},3336:t=>{"use strict";t.exports=function(t,e,r){var n,o,i,s,a=-1,c=t.posMax,l=t.pos;for(t.pos=e+1,n=1;t.pos<c;){if(93===(i=t.src.charCodeAt(t.pos))&&0==--n){o=!0;break}if(s=t.pos,t.md.inline.skipToken(t),91===i)if(s===t.pos-1)n++;else if(r)return t.pos=l,-1}return o&&(a=t.pos),t.pos=l,a}},7073:(t,e,r)=>{"use strict";var n=r(2190).unescapeAll;t.exports=function(t,e,r){var o,i,s=0,a=e,c={ok:!1,pos:0,lines:0,str:""};if(e>=r)return c;if(34!==(i=t.charCodeAt(e))&&39!==i&&40!==i)return c;for(e++,40===i&&(i=41);e<r;){if((o=t.charCodeAt(e))===i)return c.pos=e+1,c.lines=s,c.str=n(t.slice(a+1,e)),c.ok=!0,c;if(40===o&&41===i)return c;10===o?s++:92===o&&e+1<r&&(e++,10===t.charCodeAt(e)&&s++),e++}return c}},8790:(t,e,r)=>{"use strict";var n=r(2190),o=r(9557),i=r(4627),s=r(2445),a=r(8637),c=r(3995),l=r(3753),p=r(8618),u=r(2231),h={default:r(39),zero:r(7881),commonmark:r(7718)},f=/^(vbscript|javascript|file|data):/,d=/^data:image\/(gif|png|jpeg|webp);/;function m(t){var e=t.trim().toLowerCase();return!f.test(e)||!!d.test(e)}var g=["http:","https:","mailto:"];function v(t){var e=p.parse(t,!0);if(e.hostname&&(!e.protocol||g.indexOf(e.protocol)>=0))try{e.hostname=u.toASCII(e.hostname)}catch(t){}return p.encode(p.format(e))}function y(t){var e=p.parse(t,!0);if(e.hostname&&(!e.protocol||g.indexOf(e.protocol)>=0))try{e.hostname=u.toUnicode(e.hostname)}catch(t){}return p.decode(p.format(e),p.decode.defaultChars+"%")}function k(t,e){if(!(this instanceof k))return new k(t,e);e||n.isString(t)||(e=t||{},t="default"),this.inline=new c,this.block=new a,this.core=new s,this.renderer=new i,this.linkify=new l,this.validateLink=m,this.normalizeLink=v,this.normalizeLinkText=y,this.utils=n,this.helpers=n.assign({},o),this.options={},this.configure(t),e&&this.set(e)}k.prototype.set=function(t){return n.assign(this.options,t),this},k.prototype.configure=function(t){var e,r=this;if(n.isString(t)&&!(t=h[e=t]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&r.set(t.options),t.components&&Object.keys(t.components).forEach((function(e){t.components[e].rules&&r[e].ruler.enableOnly(t.components[e].rules),t.components[e].rules2&&r[e].ruler2.enableOnly(t.components[e].rules2)})),this},k.prototype.enable=function(t,e){var r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){r=r.concat(this[e].ruler.enable(t,!0))}),this),r=r.concat(this.inline.ruler2.enable(t,!0));var n=t.filter((function(t){return r.indexOf(t)<0}));if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},k.prototype.disable=function(t,e){var r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){r=r.concat(this[e].ruler.disable(t,!0))}),this),r=r.concat(this.inline.ruler2.disable(t,!0));var n=t.filter((function(t){return r.indexOf(t)<0}));if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},k.prototype.use=function(t){var e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},k.prototype.parse=function(t,e){if("string"!=typeof t)throw new Error("Input data should be a String");var r=new this.core.State(t,this,e);return this.core.process(r),r.tokens},k.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},k.prototype.parseInline=function(t,e){var r=new this.core.State(t,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens},k.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)},t.exports=k},8637:(t,e,r)=>{"use strict";var n=r(6947),o=[["table",r(1140),["paragraph","reference"]],["code",r(2808)],["fence",r(4731),["paragraph","reference","blockquote","list"]],["blockquote",r(441),["paragraph","reference","blockquote","list"]],["hr",r(7906),["paragraph","reference","blockquote","list"]],["list",r(1487),["paragraph","reference","blockquote"]],["reference",r(713)],["html_block",r(3368),["paragraph","reference","blockquote"]],["heading",r(196),["paragraph","reference","blockquote"]],["lheading",r(4331)],["paragraph",r(1196)]];function i(){this.ruler=new n;for(var t=0;t<o.length;t++)this.ruler.push(o[t][0],o[t][1],{alt:(o[t][2]||[]).slice()})}i.prototype.tokenize=function(t,e,r){for(var n,o=this.ruler.getRules(""),i=o.length,s=e,a=!1,c=t.md.options.maxNesting;s<r&&(t.line=s=t.skipEmptyLines(s),!(s>=r))&&!(t.sCount[s]<t.blkIndent);){if(t.level>=c){t.line=r;break}for(n=0;n<i&&!o[n](t,s,r,!1);n++);t.tight=!a,t.isEmpty(t.line-1)&&(a=!0),(s=t.line)<r&&t.isEmpty(s)&&(a=!0,s++,t.line=s)}},i.prototype.parse=function(t,e,r,n){var o;t&&(o=new this.State(t,e,r,n),this.tokenize(o,o.line,o.lineMax))},i.prototype.State=r(3978),t.exports=i},2445:(t,e,r)=>{"use strict";var n=r(6947),o=[["normalize",r(6531)],["block",r(1942)],["inline",r(1028)],["linkify",r(9648)],["replacements",r(1593)],["smartquotes",r(932)]];function i(){this.ruler=new n;for(var t=0;t<o.length;t++)this.ruler.push(o[t][0],o[t][1])}i.prototype.process=function(t){var e,r,n;for(e=0,r=(n=this.ruler.getRules("")).length;e<r;e++)n[e](t)},i.prototype.State=r(2803),t.exports=i},3995:(t,e,r)=>{"use strict";var n=r(6947),o=[["text",r(9427)],["newline",r(4997)],["escape",r(9373)],["backticks",r(9063)],["strikethrough",r(3628).w],["emphasis",r(5622).w],["link",r(5085)],["image",r(4542)],["autolink",r(8813)],["html_inline",r(7740)],["entity",r(941)]],i=[["balance_pairs",r(7669)],["strikethrough",r(3628).g],["emphasis",r(5622).g],["text_collapse",r(5683)]];function s(){var t;for(this.ruler=new n,t=0;t<o.length;t++)this.ruler.push(o[t][0],o[t][1]);for(this.ruler2=new n,t=0;t<i.length;t++)this.ruler2.push(i[t][0],i[t][1])}s.prototype.skipToken=function(t){var e,r,n=t.pos,o=this.ruler.getRules(""),i=o.length,s=t.md.options.maxNesting,a=t.cache;if(void 0===a[n]){if(t.level<s)for(r=0;r<i&&(t.level++,e=o[r](t,!0),t.level--,!e);r++);else t.pos=t.posMax;e||t.pos++,a[n]=t.pos}else t.pos=a[n]},s.prototype.tokenize=function(t){for(var e,r,n=this.ruler.getRules(""),o=n.length,i=t.posMax,s=t.md.options.maxNesting;t.pos<i;){if(t.level<s)for(r=0;r<o&&!(e=n[r](t,!1));r++);if(e){if(t.pos>=i)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},s.prototype.parse=function(t,e,r,n){var o,i,s,a=new this.State(t,e,r,n);for(this.tokenize(a),s=(i=this.ruler2.getRules("")).length,o=0;o<s;o++)i[o](a)},s.prototype.State=r(8728),t.exports=s},7718:t=>{"use strict";t.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},39:t=>{"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},7881:t=>{"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},4627:(t,e,r)=>{"use strict";var n=r(2190).assign,o=r(2190).unescapeAll,i=r(2190).escapeHtml,s={};function a(){this.rules=n({},s)}s.code_inline=function(t,e,r,n,o){var s=t[e];return"<code"+o.renderAttrs(s)+">"+i(t[e].content)+"</code>"},s.code_block=function(t,e,r,n,o){var s=t[e];return"<pre"+o.renderAttrs(s)+"><code>"+i(t[e].content)+"</code></pre>\n"},s.fence=function(t,e,r,n,s){var a,c,l,p,u,h=t[e],f=h.info?o(h.info).trim():"",d="",m="";return f&&(d=(l=f.split(/(\s+)/g))[0],m=l.slice(2).join("")),0===(a=r.highlight&&r.highlight(h.content,d,m)||i(h.content)).indexOf("<pre")?a+"\n":f?(c=h.attrIndex("class"),p=h.attrs?h.attrs.slice():[],c<0?p.push(["class",r.langPrefix+d]):(p[c]=p[c].slice(),p[c][1]+=" "+r.langPrefix+d),u={attrs:p},"<pre><code"+s.renderAttrs(u)+">"+a+"</code></pre>\n"):"<pre><code"+s.renderAttrs(h)+">"+a+"</code></pre>\n"},s.image=function(t,e,r,n,o){var i=t[e];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,r,n),o.renderToken(t,e,r)},s.hardbreak=function(t,e,r){return r.xhtmlOut?"<br />\n":"<br>\n"},s.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?"<br />\n":"<br>\n":"\n"},s.text=function(t,e){return i(t[e].content)},s.html_block=function(t,e){return t[e].content},s.html_inline=function(t,e){return t[e].content},a.prototype.renderAttrs=function(t){var e,r,n;if(!t.attrs)return"";for(n="",e=0,r=t.attrs.length;e<r;e++)n+=" "+i(t.attrs[e][0])+'="'+i(t.attrs[e][1])+'"';return n},a.prototype.renderToken=function(t,e,r){var n,o="",i=!1,s=t[e];return s.hidden?"":(s.block&&-1!==s.nesting&&e&&t[e-1].hidden&&(o+="\n"),o+=(-1===s.nesting?"</":"<")+s.tag,o+=this.renderAttrs(s),0===s.nesting&&r.xhtmlOut&&(o+=" /"),s.block&&(i=!0,1===s.nesting&&e+1<t.length&&("inline"===(n=t[e+1]).type||n.hidden||-1===n.nesting&&n.tag===s.tag)&&(i=!1)),o+=i?">\n":">")},a.prototype.renderInline=function(t,e,r){for(var n,o="",i=this.rules,s=0,a=t.length;s<a;s++)void 0!==i[n=t[s].type]?o+=i[n](t,s,e,r,this):o+=this.renderToken(t,s,e);return o},a.prototype.renderInlineAsText=function(t,e,r){for(var n="",o=0,i=t.length;o<i;o++)"text"===t[o].type?n+=t[o].content:"image"===t[o].type?n+=this.renderInlineAsText(t[o].children,e,r):"softbreak"===t[o].type&&(n+="\n");return n},a.prototype.render=function(t,e,r){var n,o,i,s="",a=this.rules;for(n=0,o=t.length;n<o;n++)"inline"===(i=t[n].type)?s+=this.renderInline(t[n].children,e,r):void 0!==a[i]?s+=a[t[n].type](t,n,e,r,this):s+=this.renderToken(t,n,e,r);return s},t.exports=a},6947:t=>{"use strict";function e(){this.__rules__=[],this.__cache__=null}e.prototype.__find__=function(t){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1},e.prototype.__compile__=function(){var t=this,e=[""];t.__rules__.forEach((function(t){t.enabled&&t.alt.forEach((function(t){e.indexOf(t)<0&&e.push(t)}))})),t.__cache__={},e.forEach((function(e){t.__cache__[e]=[],t.__rules__.forEach((function(r){r.enabled&&(e&&r.alt.indexOf(e)<0||t.__cache__[e].push(r.fn))}))}))},e.prototype.at=function(t,e,r){var n=this.__find__(t),o=r||{};if(-1===n)throw new Error("Parser rule not found: "+t);this.__rules__[n].fn=e,this.__rules__[n].alt=o.alt||[],this.__cache__=null},e.prototype.before=function(t,e,r,n){var o=this.__find__(t),i=n||{};if(-1===o)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o,0,{name:e,enabled:!0,fn:r,alt:i.alt||[]}),this.__cache__=null},e.prototype.after=function(t,e,r,n){var o=this.__find__(t),i=n||{};if(-1===o)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o+1,0,{name:e,enabled:!0,fn:r,alt:i.alt||[]}),this.__cache__=null},e.prototype.push=function(t,e,r){var n=r||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:n.alt||[]}),this.__cache__=null},e.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);var r=[];return t.forEach((function(t){var n=this.__find__(t);if(n<0){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[n].enabled=!0,r.push(t)}),this),this.__cache__=null,r},e.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach((function(t){t.enabled=!1})),this.enable(t,e)},e.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);var r=[];return t.forEach((function(t){var n=this.__find__(t);if(n<0){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[n].enabled=!1,r.push(t)}),this),this.__cache__=null,r},e.prototype.getRules=function(t){return null===this.__cache__&&this.__compile__(),this.__cache__[t]||[]},t.exports=e},441:(t,e,r)=>{"use strict";var n=r(2190).isSpace;t.exports=function(t,e,r,o){var i,s,a,c,l,p,u,h,f,d,m,g,v,y,k,b,_,w,x,C,S=t.lineMax,A=t.bMarks[e]+t.tShift[e],M=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(62!==t.src.charCodeAt(A++))return!1;if(o)return!0;for(c=f=t.sCount[e]+1,32===t.src.charCodeAt(A)?(A++,c++,f++,i=!1,b=!0):9===t.src.charCodeAt(A)?(b=!0,(t.bsCount[e]+f)%4==3?(A++,c++,f++,i=!1):i=!0):b=!1,d=[t.bMarks[e]],t.bMarks[e]=A;A<M&&(s=t.src.charCodeAt(A),n(s));)9===s?f+=4-(f+t.bsCount[e]+(i?1:0))%4:f++,A++;for(m=[t.bsCount[e]],t.bsCount[e]=t.sCount[e]+1+(b?1:0),p=A>=M,y=[t.sCount[e]],t.sCount[e]=f-c,k=[t.tShift[e]],t.tShift[e]=A-t.bMarks[e],w=t.md.block.ruler.getRules("blockquote"),v=t.parentType,t.parentType="blockquote",h=e+1;h<r&&(C=t.sCount[h]<t.blkIndent,!((A=t.bMarks[h]+t.tShift[h])>=(M=t.eMarks[h])));h++)if(62!==t.src.charCodeAt(A++)||C){if(p)break;for(_=!1,a=0,l=w.length;a<l;a++)if(w[a](t,h,r,!0)){_=!0;break}if(_){t.lineMax=h,0!==t.blkIndent&&(d.push(t.bMarks[h]),m.push(t.bsCount[h]),k.push(t.tShift[h]),y.push(t.sCount[h]),t.sCount[h]-=t.blkIndent);break}d.push(t.bMarks[h]),m.push(t.bsCount[h]),k.push(t.tShift[h]),y.push(t.sCount[h]),t.sCount[h]=-1}else{for(c=f=t.sCount[h]+1,32===t.src.charCodeAt(A)?(A++,c++,f++,i=!1,b=!0):9===t.src.charCodeAt(A)?(b=!0,(t.bsCount[h]+f)%4==3?(A++,c++,f++,i=!1):i=!0):b=!1,d.push(t.bMarks[h]),t.bMarks[h]=A;A<M&&(s=t.src.charCodeAt(A),n(s));)9===s?f+=4-(f+t.bsCount[h]+(i?1:0))%4:f++,A++;p=A>=M,m.push(t.bsCount[h]),t.bsCount[h]=t.sCount[h]+1+(b?1:0),y.push(t.sCount[h]),t.sCount[h]=f-c,k.push(t.tShift[h]),t.tShift[h]=A-t.bMarks[h]}for(g=t.blkIndent,t.blkIndent=0,(x=t.push("blockquote_open","blockquote",1)).markup=">",x.map=u=[e,0],t.md.block.tokenize(t,e,h),(x=t.push("blockquote_close","blockquote",-1)).markup=">",t.lineMax=S,t.parentType=v,u[1]=t.line,a=0;a<k.length;a++)t.bMarks[a+e]=d[a],t.tShift[a+e]=k[a],t.sCount[a+e]=y[a],t.bsCount[a+e]=m[a];return t.blkIndent=g,!0}},2808:t=>{"use strict";t.exports=function(t,e,r){var n,o,i;if(t.sCount[e]-t.blkIndent<4)return!1;for(o=n=e+1;n<r;)if(t.isEmpty(n))n++;else{if(!(t.sCount[n]-t.blkIndent>=4))break;o=++n}return t.line=o,(i=t.push("code_block","code",0)).content=t.getLines(e,o,4+t.blkIndent,!1)+"\n",i.map=[e,t.line],!0}},4731:t=>{"use strict";t.exports=function(t,e,r,n){var o,i,s,a,c,l,p,u=!1,h=t.bMarks[e]+t.tShift[e],f=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(h+3>f)return!1;if(126!==(o=t.src.charCodeAt(h))&&96!==o)return!1;if(c=h,(i=(h=t.skipChars(h,o))-c)<3)return!1;if(p=t.src.slice(c,h),s=t.src.slice(h,f),96===o&&s.indexOf(String.fromCharCode(o))>=0)return!1;if(n)return!0;for(a=e;!(++a>=r||(h=c=t.bMarks[a]+t.tShift[a])<(f=t.eMarks[a])&&t.sCount[a]<t.blkIndent);)if(t.src.charCodeAt(h)===o&&!(t.sCount[a]-t.blkIndent>=4||(h=t.skipChars(h,o))-c<i||(h=t.skipSpaces(h))<f)){u=!0;break}return i=t.sCount[e],t.line=a+(u?1:0),(l=t.push("fence","code",0)).info=s,l.content=t.getLines(e+1,a,i,!0),l.markup=p,l.map=[e,t.line],!0}},196:(t,e,r)=>{"use strict";var n=r(2190).isSpace;t.exports=function(t,e,r,o){var i,s,a,c,l=t.bMarks[e]+t.tShift[e],p=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(35!==(i=t.src.charCodeAt(l))||l>=p)return!1;for(s=1,i=t.src.charCodeAt(++l);35===i&&l<p&&s<=6;)s++,i=t.src.charCodeAt(++l);return!(s>6||l<p&&!n(i)||(o||(p=t.skipSpacesBack(p,l),(a=t.skipCharsBack(p,35,l))>l&&n(t.src.charCodeAt(a-1))&&(p=a),t.line=e+1,(c=t.push("heading_open","h"+String(s),1)).markup="########".slice(0,s),c.map=[e,t.line],(c=t.push("inline","",0)).content=t.src.slice(l,p).trim(),c.map=[e,t.line],c.children=[],(c=t.push("heading_close","h"+String(s),-1)).markup="########".slice(0,s)),0))}},7906:(t,e,r)=>{"use strict";var n=r(2190).isSpace;t.exports=function(t,e,r,o){var i,s,a,c,l=t.bMarks[e]+t.tShift[e],p=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(42!==(i=t.src.charCodeAt(l++))&&45!==i&&95!==i)return!1;for(s=1;l<p;){if((a=t.src.charCodeAt(l++))!==i&&!n(a))return!1;a===i&&s++}return!(s<3||(o||(t.line=e+1,(c=t.push("hr","hr",0)).map=[e,t.line],c.markup=Array(s+1).join(String.fromCharCode(i))),0))}},3368:(t,e,r)=>{"use strict";var n=r(2681),o=r(485).q,i=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+n.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];t.exports=function(t,e,r,n){var o,s,a,c,l=t.bMarks[e]+t.tShift[e],p=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(l))return!1;for(c=t.src.slice(l,p),o=0;o<i.length&&!i[o][0].test(c);o++);if(o===i.length)return!1;if(n)return i[o][2];if(s=e+1,!i[o][1].test(c))for(;s<r&&!(t.sCount[s]<t.blkIndent);s++)if(l=t.bMarks[s]+t.tShift[s],p=t.eMarks[s],c=t.src.slice(l,p),i[o][1].test(c)){0!==c.length&&s++;break}return t.line=s,(a=t.push("html_block","",0)).map=[e,s],a.content=t.getLines(e,s,t.blkIndent,!0),!0}},4331:t=>{"use strict";t.exports=function(t,e,r){var n,o,i,s,a,c,l,p,u,h,f=e+1,d=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;for(h=t.parentType,t.parentType="paragraph";f<r&&!t.isEmpty(f);f++)if(!(t.sCount[f]-t.blkIndent>3)){if(t.sCount[f]>=t.blkIndent&&(c=t.bMarks[f]+t.tShift[f])<(l=t.eMarks[f])&&(45===(u=t.src.charCodeAt(c))||61===u)&&(c=t.skipChars(c,u),(c=t.skipSpaces(c))>=l)){p=61===u?1:2;break}if(!(t.sCount[f]<0)){for(o=!1,i=0,s=d.length;i<s;i++)if(d[i](t,f,r,!0)){o=!0;break}if(o)break}}return!!p&&(n=t.getLines(e,f,t.blkIndent,!1).trim(),t.line=f+1,(a=t.push("heading_open","h"+String(p),1)).markup=String.fromCharCode(u),a.map=[e,t.line],(a=t.push("inline","",0)).content=n,a.map=[e,t.line-1],a.children=[],(a=t.push("heading_close","h"+String(p),-1)).markup=String.fromCharCode(u),t.parentType=h,!0)}},1487:(t,e,r)=>{"use strict";var n=r(2190).isSpace;function o(t,e){var r,o,i,s;return o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e],42!==(r=t.src.charCodeAt(o++))&&45!==r&&43!==r||o<i&&(s=t.src.charCodeAt(o),!n(s))?-1:o}function i(t,e){var r,o=t.bMarks[e]+t.tShift[e],i=o,s=t.eMarks[e];if(i+1>=s)return-1;if((r=t.src.charCodeAt(i++))<48||r>57)return-1;for(;;){if(i>=s)return-1;if(!((r=t.src.charCodeAt(i++))>=48&&r<=57)){if(41===r||46===r)break;return-1}if(i-o>=10)return-1}return i<s&&(r=t.src.charCodeAt(i),!n(r))?-1:i}t.exports=function(t,e,r,n){var s,a,c,l,p,u,h,f,d,m,g,v,y,k,b,_,w,x,C,S,A,M,D,E,T,O,N,q,z=!1,I=!0;if(t.sCount[e]-t.blkIndent>=4)return!1;if(t.listIndent>=0&&t.sCount[e]-t.listIndent>=4&&t.sCount[e]<t.blkIndent)return!1;if(n&&"paragraph"===t.parentType&&t.sCount[e]>=t.blkIndent&&(z=!0),(D=i(t,e))>=0){if(h=!0,T=t.bMarks[e]+t.tShift[e],y=Number(t.src.slice(T,D-1)),z&&1!==y)return!1}else{if(!((D=o(t,e))>=0))return!1;h=!1}if(z&&t.skipSpaces(D)>=t.eMarks[e])return!1;if(v=t.src.charCodeAt(D-1),n)return!0;for(g=t.tokens.length,h?(q=t.push("ordered_list_open","ol",1),1!==y&&(q.attrs=[["start",y]])):q=t.push("bullet_list_open","ul",1),q.map=m=[e,0],q.markup=String.fromCharCode(v),b=e,E=!1,N=t.md.block.ruler.getRules("list"),x=t.parentType,t.parentType="list";b<r;){for(M=D,k=t.eMarks[b],u=_=t.sCount[b]+D-(t.bMarks[e]+t.tShift[e]);M<k;){if(9===(s=t.src.charCodeAt(M)))_+=4-(_+t.bsCount[b])%4;else{if(32!==s)break;_++}M++}if((p=(a=M)>=k?1:_-u)>4&&(p=1),l=u+p,(q=t.push("list_item_open","li",1)).markup=String.fromCharCode(v),q.map=f=[e,0],h&&(q.info=t.src.slice(T,D-1)),A=t.tight,S=t.tShift[e],C=t.sCount[e],w=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=l,t.tight=!0,t.tShift[e]=a-t.bMarks[e],t.sCount[e]=_,a>=k&&t.isEmpty(e+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,e,r,!0),t.tight&&!E||(I=!1),E=t.line-e>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=w,t.tShift[e]=S,t.sCount[e]=C,t.tight=A,(q=t.push("list_item_close","li",-1)).markup=String.fromCharCode(v),b=e=t.line,f[1]=b,a=t.bMarks[e],b>=r)break;if(t.sCount[b]<t.blkIndent)break;if(t.sCount[e]-t.blkIndent>=4)break;for(O=!1,c=0,d=N.length;c<d;c++)if(N[c](t,b,r,!0)){O=!0;break}if(O)break;if(h){if((D=i(t,b))<0)break;T=t.bMarks[b]+t.tShift[b]}else if((D=o(t,b))<0)break;if(v!==t.src.charCodeAt(D-1))break}return(q=h?t.push("ordered_list_close","ol",-1):t.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(v),m[1]=b,t.line=b,t.parentType=x,I&&function(t,e){var r,n,o=t.level+2;for(r=e+2,n=t.tokens.length-2;r<n;r++)t.tokens[r].level===o&&"paragraph_open"===t.tokens[r].type&&(t.tokens[r+2].hidden=!0,t.tokens[r].hidden=!0,r+=2)}(t,g),!0}},1196:t=>{"use strict";t.exports=function(t,e){var r,n,o,i,s,a,c=e+1,l=t.md.block.ruler.getRules("paragraph"),p=t.lineMax;for(a=t.parentType,t.parentType="paragraph";c<p&&!t.isEmpty(c);c++)if(!(t.sCount[c]-t.blkIndent>3||t.sCount[c]<0)){for(n=!1,o=0,i=l.length;o<i;o++)if(l[o](t,c,p,!0)){n=!0;break}if(n)break}return r=t.getLines(e,c,t.blkIndent,!1).trim(),t.line=c,(s=t.push("paragraph_open","p",1)).map=[e,t.line],(s=t.push("inline","",0)).content=r,s.map=[e,t.line],s.children=[],s=t.push("paragraph_close","p",-1),t.parentType=a,!0}},713:(t,e,r)=>{"use strict";var n=r(2190).normalizeReference,o=r(2190).isSpace;t.exports=function(t,e,r,i){var s,a,c,l,p,u,h,f,d,m,g,v,y,k,b,_,w=0,x=t.bMarks[e]+t.tShift[e],C=t.eMarks[e],S=e+1;if(t.sCount[e]-t.blkIndent>=4)return!1;if(91!==t.src.charCodeAt(x))return!1;for(;++x<C;)if(93===t.src.charCodeAt(x)&&92!==t.src.charCodeAt(x-1)){if(x+1===C)return!1;if(58!==t.src.charCodeAt(x+1))return!1;break}for(l=t.lineMax,b=t.md.block.ruler.getRules("reference"),m=t.parentType,t.parentType="reference";S<l&&!t.isEmpty(S);S++)if(!(t.sCount[S]-t.blkIndent>3||t.sCount[S]<0)){for(k=!1,u=0,h=b.length;u<h;u++)if(b[u](t,S,l,!0)){k=!0;break}if(k)break}for(C=(y=t.getLines(e,S,t.blkIndent,!1).trim()).length,x=1;x<C;x++){if(91===(s=y.charCodeAt(x)))return!1;if(93===s){d=x;break}(10===s||92===s&&++x<C&&10===y.charCodeAt(x))&&w++}if(d<0||58!==y.charCodeAt(d+1))return!1;for(x=d+2;x<C;x++)if(10===(s=y.charCodeAt(x)))w++;else if(!o(s))break;if(!(g=t.md.helpers.parseLinkDestination(y,x,C)).ok)return!1;if(p=t.md.normalizeLink(g.str),!t.md.validateLink(p))return!1;for(a=x=g.pos,c=w+=g.lines,v=x;x<C;x++)if(10===(s=y.charCodeAt(x)))w++;else if(!o(s))break;for(g=t.md.helpers.parseLinkTitle(y,x,C),x<C&&v!==x&&g.ok?(_=g.str,x=g.pos,w+=g.lines):(_="",x=a,w=c);x<C&&(s=y.charCodeAt(x),o(s));)x++;if(x<C&&10!==y.charCodeAt(x)&&_)for(_="",x=a,w=c;x<C&&(s=y.charCodeAt(x),o(s));)x++;return!(x<C&&10!==y.charCodeAt(x)||!(f=n(y.slice(1,d)))||(i||(void 0===t.env.references&&(t.env.references={}),void 0===t.env.references[f]&&(t.env.references[f]={title:_,href:p}),t.parentType=m,t.line=e+w+1),0))}},3978:(t,e,r)=>{"use strict";var n=r(6584),o=r(2190).isSpace;function i(t,e,r,n){var i,s,a,c,l,p,u,h;for(this.src=t,this.md=e,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",h=!1,a=c=p=u=0,l=(s=this.src).length;c<l;c++){if(i=s.charCodeAt(c),!h){if(o(i)){p++,9===i?u+=4-u%4:u++;continue}h=!0}10!==i&&c!==l-1||(10!==i&&c++,this.bMarks.push(a),this.eMarks.push(c),this.tShift.push(p),this.sCount.push(u),this.bsCount.push(0),h=!1,p=0,u=0,a=c+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}i.prototype.push=function(t,e,r){var o=new n(t,e,r);return o.block=!0,r<0&&this.level--,o.level=this.level,r>0&&this.level++,this.tokens.push(o),o},i.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},i.prototype.skipEmptyLines=function(t){for(var e=this.lineMax;t<e&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},i.prototype.skipSpaces=function(t){for(var e,r=this.src.length;t<r&&(e=this.src.charCodeAt(t),o(e));t++);return t},i.prototype.skipSpacesBack=function(t,e){if(t<=e)return t;for(;t>e;)if(!o(this.src.charCodeAt(--t)))return t+1;return t},i.prototype.skipChars=function(t,e){for(var r=this.src.length;t<r&&this.src.charCodeAt(t)===e;t++);return t},i.prototype.skipCharsBack=function(t,e,r){if(t<=r)return t;for(;t>r;)if(e!==this.src.charCodeAt(--t))return t+1;return t},i.prototype.getLines=function(t,e,r,n){var i,s,a,c,l,p,u,h=t;if(t>=e)return"";for(p=new Array(e-t),i=0;h<e;h++,i++){for(s=0,u=c=this.bMarks[h],l=h+1<e||n?this.eMarks[h]+1:this.eMarks[h];c<l&&s<r;){if(a=this.src.charCodeAt(c),o(a))9===a?s+=4-(s+this.bsCount[h])%4:s++;else{if(!(c-u<this.tShift[h]))break;s++}c++}p[i]=s>r?new Array(s-r+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return p.join("")},i.prototype.Token=n,t.exports=i},1140:(t,e,r)=>{"use strict";var n=r(2190).isSpace;function o(t,e){var r=t.bMarks[e]+t.tShift[e],n=t.eMarks[e];return t.src.substr(r,n-r)}function i(t){var e,r=[],n=0,o=t.length,i=!1,s=0,a="";for(e=t.charCodeAt(n);n<o;)124===e&&(i?(a+=t.substring(s,n-1),s=n):(r.push(a+t.substring(s,n)),a="",s=n+1)),i=92===e,n++,e=t.charCodeAt(n);return r.push(a+t.substring(s)),r}t.exports=function(t,e,r,s){var a,c,l,p,u,h,f,d,m,g,v,y,k,b,_,w,x,C;if(e+2>r)return!1;if(h=e+1,t.sCount[h]<t.blkIndent)return!1;if(t.sCount[h]-t.blkIndent>=4)return!1;if((l=t.bMarks[h]+t.tShift[h])>=t.eMarks[h])return!1;if(124!==(x=t.src.charCodeAt(l++))&&45!==x&&58!==x)return!1;if(l>=t.eMarks[h])return!1;if(124!==(C=t.src.charCodeAt(l++))&&45!==C&&58!==C&&!n(C))return!1;if(45===x&&n(C))return!1;for(;l<t.eMarks[h];){if(124!==(a=t.src.charCodeAt(l))&&45!==a&&58!==a&&!n(a))return!1;l++}for(f=(c=o(t,e+1)).split("|"),g=[],p=0;p<f.length;p++){if(!(v=f[p].trim())){if(0===p||p===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(v))return!1;58===v.charCodeAt(v.length-1)?g.push(58===v.charCodeAt(0)?"center":"right"):58===v.charCodeAt(0)?g.push("left"):g.push("")}if(-1===(c=o(t,e).trim()).indexOf("|"))return!1;if(t.sCount[e]-t.blkIndent>=4)return!1;if((f=i(c)).length&&""===f[0]&&f.shift(),f.length&&""===f[f.length-1]&&f.pop(),0===(d=f.length)||d!==g.length)return!1;if(s)return!0;for(b=t.parentType,t.parentType="table",w=t.md.block.ruler.getRules("blockquote"),(m=t.push("table_open","table",1)).map=y=[e,0],(m=t.push("thead_open","thead",1)).map=[e,e+1],(m=t.push("tr_open","tr",1)).map=[e,e+1],p=0;p<f.length;p++)m=t.push("th_open","th",1),g[p]&&(m.attrs=[["style","text-align:"+g[p]]]),(m=t.push("inline","",0)).content=f[p].trim(),m.children=[],m=t.push("th_close","th",-1);for(m=t.push("tr_close","tr",-1),m=t.push("thead_close","thead",-1),h=e+2;h<r&&!(t.sCount[h]<t.blkIndent);h++){for(_=!1,p=0,u=w.length;p<u;p++)if(w[p](t,h,r,!0)){_=!0;break}if(_)break;if(!(c=o(t,h).trim()))break;if(t.sCount[h]-t.blkIndent>=4)break;for((f=i(c)).length&&""===f[0]&&f.shift(),f.length&&""===f[f.length-1]&&f.pop(),h===e+2&&((m=t.push("tbody_open","tbody",1)).map=k=[e+2,0]),(m=t.push("tr_open","tr",1)).map=[h,h+1],p=0;p<d;p++)m=t.push("td_open","td",1),g[p]&&(m.attrs=[["style","text-align:"+g[p]]]),(m=t.push("inline","",0)).content=f[p]?f[p].trim():"",m.children=[],m=t.push("td_close","td",-1);m=t.push("tr_close","tr",-1)}return k&&(m=t.push("tbody_close","tbody",-1),k[1]=h),m=t.push("table_close","table",-1),y[1]=h,t.parentType=b,t.line=h,!0}},1942:t=>{"use strict";t.exports=function(t){var e;t.inlineMode?((e=new t.Token("inline","",0)).content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}},1028:t=>{"use strict";t.exports=function(t){var e,r,n,o=t.tokens;for(r=0,n=o.length;r<n;r++)"inline"===(e=o[r]).type&&t.md.inline.parse(e.content,t.md,t.env,e.children)}},9648:(t,e,r)=>{"use strict";var n=r(2190).arrayReplaceAt;function o(t){return/^<\/a\s*>/i.test(t)}t.exports=function(t){var e,r,i,s,a,c,l,p,u,h,f,d,m,g,v,y,k,b,_=t.tokens;if(t.md.options.linkify)for(r=0,i=_.length;r<i;r++)if("inline"===_[r].type&&t.md.linkify.pretest(_[r].content))for(m=0,e=(s=_[r].children).length-1;e>=0;e--)if("link_close"!==(c=s[e]).type){if("html_inline"===c.type&&(b=c.content,/^<a[>\s]/i.test(b)&&m>0&&m--,o(c.content)&&m++),!(m>0)&&"text"===c.type&&t.md.linkify.test(c.content)){for(u=c.content,k=t.md.linkify.match(u),l=[],d=c.level,f=0,p=0;p<k.length;p++)g=k[p].url,v=t.md.normalizeLink(g),t.md.validateLink(v)&&(y=k[p].text,y=k[p].schema?"mailto:"!==k[p].schema||/^mailto:/i.test(y)?t.md.normalizeLinkText(y):t.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):t.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,""),(h=k[p].index)>f&&((a=new t.Token("text","",0)).content=u.slice(f,h),a.level=d,l.push(a)),(a=new t.Token("link_open","a",1)).attrs=[["href",v]],a.level=d++,a.markup="linkify",a.info="auto",l.push(a),(a=new t.Token("text","",0)).content=y,a.level=d,l.push(a),(a=new t.Token("link_close","a",-1)).level=--d,a.markup="linkify",a.info="auto",l.push(a),f=k[p].lastIndex);f<u.length&&((a=new t.Token("text","",0)).content=u.slice(f),a.level=d,l.push(a)),_[r].children=s=n(s,e,l)}}else for(e--;s[e].level!==c.level&&"link_open"!==s[e].type;)e--}},6531:t=>{"use strict";var e=/\r\n?|\n/g,r=/\0/g;t.exports=function(t){var n;n=(n=t.src.replace(e,"\n")).replace(r,"�"),t.src=n}},1593:t=>{"use strict";var e=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,r=/\((c|tm|r|p)\)/i,n=/\((c|tm|r|p)\)/gi,o={c:"©",r:"®",p:"§",tm:"™"};function i(t,e){return o[e.toLowerCase()]}function s(t){var e,r,o=0;for(e=t.length-1;e>=0;e--)"text"!==(r=t[e]).type||o||(r.content=r.content.replace(n,i)),"link_open"===r.type&&"auto"===r.info&&o--,"link_close"===r.type&&"auto"===r.info&&o++}function a(t){var r,n,o=0;for(r=t.length-1;r>=0;r--)"text"!==(n=t[r]).type||o||e.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&o--,"link_close"===n.type&&"auto"===n.info&&o++}t.exports=function(t){var n;if(t.md.options.typographer)for(n=t.tokens.length-1;n>=0;
443n--)"inline"===t.tokens[n].type&&(r.test(t.tokens[n].content)&&s(t.tokens[n].children),e.test(t.tokens[n].content)&&a(t.tokens[n].children))}},932:(t,e,r)=>{"use strict";var n=r(2190).isWhiteSpace,o=r(2190).isPunctChar,i=r(2190).isMdAsciiPunct,s=/['"]/,a=/['"]/g;function c(t,e,r){return t.substr(0,e)+r+t.substr(e+1)}function l(t,e){var r,s,l,p,u,h,f,d,m,g,v,y,k,b,_,w,x,C,S,A,M;for(S=[],r=0;r<t.length;r++){for(s=t[r],f=t[r].level,x=S.length-1;x>=0&&!(S[x].level<=f);x--);if(S.length=x+1,"text"===s.type){u=0,h=(l=s.content).length;t:for(;u<h&&(a.lastIndex=u,p=a.exec(l));){if(_=w=!0,u=p.index+1,C="'"===p[0],m=32,p.index-1>=0)m=l.charCodeAt(p.index-1);else for(x=r-1;x>=0&&"softbreak"!==t[x].type&&"hardbreak"!==t[x].type;x--)if(t[x].content){m=t[x].content.charCodeAt(t[x].content.length-1);break}if(g=32,u<h)g=l.charCodeAt(u);else for(x=r+1;x<t.length&&"softbreak"!==t[x].type&&"hardbreak"!==t[x].type;x++)if(t[x].content){g=t[x].content.charCodeAt(0);break}if(v=i(m)||o(String.fromCharCode(m)),y=i(g)||o(String.fromCharCode(g)),k=n(m),(b=n(g))?_=!1:y&&(k||v||(_=!1)),k?w=!1:v&&(b||y||(w=!1)),34===g&&'"'===p[0]&&m>=48&&m<=57&&(w=_=!1),_&&w&&(_=v,w=y),_||w){if(w)for(x=S.length-1;x>=0&&(d=S[x],!(S[x].level<f));x--)if(d.single===C&&S[x].level===f){d=S[x],C?(A=e.md.options.quotes[2],M=e.md.options.quotes[3]):(A=e.md.options.quotes[0],M=e.md.options.quotes[1]),s.content=c(s.content,p.index,M),t[d.token].content=c(t[d.token].content,d.pos,A),u+=M.length-1,d.token===r&&(u+=A.length-1),h=(l=s.content).length,S.length=x;continue t}_?S.push({token:r,pos:p.index,single:C,level:f}):w&&C&&(s.content=c(s.content,p.index,"’"))}else C&&(s.content=c(s.content,p.index,"’"))}}}}t.exports=function(t){var e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&s.test(t.tokens[e].content)&&l(t.tokens[e].children,t)}},2803:(t,e,r)=>{"use strict";var n=r(6584);function o(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}o.prototype.Token=n,t.exports=o},8813:t=>{"use strict";var e=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,r=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;t.exports=function(t,n){var o,i,s,a,c,l,p=t.pos;if(60!==t.src.charCodeAt(p))return!1;for(c=t.pos,l=t.posMax;;){if(++p>=l)return!1;if(60===(a=t.src.charCodeAt(p)))return!1;if(62===a)break}return o=t.src.slice(c+1,p),r.test(o)?(i=t.md.normalizeLink(o),!!t.md.validateLink(i)&&(n||((s=t.push("link_open","a",1)).attrs=[["href",i]],s.markup="autolink",s.info="auto",(s=t.push("text","",0)).content=t.md.normalizeLinkText(o),(s=t.push("link_close","a",-1)).markup="autolink",s.info="auto"),t.pos+=o.length+2,!0)):!!e.test(o)&&(i=t.md.normalizeLink("mailto:"+o),!!t.md.validateLink(i)&&(n||((s=t.push("link_open","a",1)).attrs=[["href",i]],s.markup="autolink",s.info="auto",(s=t.push("text","",0)).content=t.md.normalizeLinkText(o),(s=t.push("link_close","a",-1)).markup="autolink",s.info="auto"),t.pos+=o.length+2,!0))}},9063:t=>{"use strict";t.exports=function(t,e){var r,n,o,i,s,a,c,l,p=t.pos;if(96!==t.src.charCodeAt(p))return!1;for(r=p,p++,n=t.posMax;p<n&&96===t.src.charCodeAt(p);)p++;if(c=(o=t.src.slice(r,p)).length,t.backticksScanned&&(t.backticks[c]||0)<=r)return e||(t.pending+=o),t.pos+=c,!0;for(s=a=p;-1!==(s=t.src.indexOf("`",a));){for(a=s+1;a<n&&96===t.src.charCodeAt(a);)a++;if((l=a-s)===c)return e||((i=t.push("code_inline","code",0)).markup=o,i.content=t.src.slice(p,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),t.pos=a,!0;t.backticks[l]=s}return t.backticksScanned=!0,e||(t.pending+=o),t.pos+=c,!0}},7669:t=>{"use strict";function e(t,e){var r,n,o,i,s,a,c,l,p={},u=e.length;if(u){var h=0,f=-2,d=[];for(r=0;r<u;r++)if(o=e[r],d.push(0),e[h].marker===o.marker&&f===o.token-1||(h=r),f=o.token,o.length=o.length||0,o.close){for(p.hasOwnProperty(o.marker)||(p[o.marker]=[-1,-1,-1,-1,-1,-1]),s=p[o.marker][(o.open?3:0)+o.length%3],a=n=h-d[h]-1;n>s;n-=d[n]+1)if((i=e[n]).marker===o.marker&&i.open&&i.end<0&&(c=!1,(i.close||o.open)&&(i.length+o.length)%3==0&&(i.length%3==0&&o.length%3==0||(c=!0)),!c)){l=n>0&&!e[n-1].open?d[n-1]+1:0,d[r]=r-n+l,d[n]=l,o.open=!1,i.end=r,i.close=!1,a=-1,f=-2;break}-1!==a&&(p[o.marker][(o.open?3:0)+(o.length||0)%3]=a)}}}t.exports=function(t){var r,n=t.tokens_meta,o=t.tokens_meta.length;for(e(0,t.delimiters),r=0;r<o;r++)n[r]&&n[r].delimiters&&e(0,n[r].delimiters)}},5622:t=>{"use strict";function e(t,e){var r,n,o,i,s,a;for(r=e.length-1;r>=0;r--)95!==(n=e[r]).marker&&42!==n.marker||-1!==n.end&&(o=e[n.end],a=r>0&&e[r-1].end===n.end+1&&e[r-1].marker===n.marker&&e[r-1].token===n.token-1&&e[n.end+1].token===o.token+1,s=String.fromCharCode(n.marker),(i=t.tokens[n.token]).type=a?"strong_open":"em_open",i.tag=a?"strong":"em",i.nesting=1,i.markup=a?s+s:s,i.content="",(i=t.tokens[o.token]).type=a?"strong_close":"em_close",i.tag=a?"strong":"em",i.nesting=-1,i.markup=a?s+s:s,i.content="",a&&(t.tokens[e[r-1].token].content="",t.tokens[e[n.end+1].token].content="",r--))}
vendor: 4,520 bytes, line 443
443t.exports.w=function(t,e){var r,n,o=t.pos,i=t.src.charCodeAt(o);if(e)return!1;if(95!==i&&42!==i)return!1;for(n=t.scanDelims(t.pos,42===i),r=0;r<n.length;r++)t.push("text","",0).content=String.fromCharCode(i),t.delimiters.push({marker:i,length:n.length,token:t.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return t.pos+=n.length,!0},t.exports.g=function(t){var r,n=t.tokens_meta,o=t.tokens_meta.length;for(e(t,t.delimiters),r=0;r<o;r++)n[r]&&n[r].delimiters&&e(t,n[r].delimiters)}},941:(t,e,r)=>{"use strict";var n=r(3727),o=r(2190).has,i=r(2190).isValidEntityCode,s=r(2190).fromCodePoint,a=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;t.exports=function(t,e){var r,l,p=t.pos,u=t.posMax;if(38!==t.src.charCodeAt(p))return!1;if(p+1<u)if(35===t.src.charCodeAt(p+1)){if(l=t.src.slice(p).match(a))return e||(r="x"===l[1][0].toLowerCase()?parseInt(l[1].slice(1),16):parseInt(l[1],10),t.pending+=i(r)?s(r):s(65533)),t.pos+=l[0].length,!0}else if((l=t.src.slice(p).match(c))&&o(n,l[1]))return e||(t.pending+=n[l[1]]),t.pos+=l[0].length,!0;return e||(t.pending+="&"),t.pos++,!0}},9373:(t,e,r)=>{"use strict";for(var n=r(2190).isSpace,o=[],i=0;i<256;i++)o.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(t){o[t.charCodeAt(0)]=1})),t.exports=function(t,e){var r,i=t.pos,s=t.posMax;if(92!==t.src.charCodeAt(i))return!1;if(++i<s){if((r=t.src.charCodeAt(i))<256&&0!==o[r])return e||(t.pending+=t.src[i]),t.pos+=2,!0;if(10===r){for(e||t.push("hardbreak","br",0),i++;i<s&&(r=t.src.charCodeAt(i),n(r));)i++;return t.pos=i,!0}}return e||(t.pending+="\\"),t.pos++,!0}},7740:(t,e,r)=>{"use strict";var n=r(485).n;t.exports=function(t,e){var r,o,i,s=t.pos;return!(!t.md.options.html||(i=t.posMax,60!==t.src.charCodeAt(s)||s+2>=i||33!==(r=t.src.charCodeAt(s+1))&&63!==r&&47!==r&&!function(t){var e=32|t;return e>=97&&e<=122}(r)||!(o=t.src.slice(s).match(n))||(e||(t.push("html_inline","",0).content=t.src.slice(s,s+o[0].length)),t.pos+=o[0].length,0)))}},4542:(t,e,r)=>{"use strict";var n=r(2190).normalizeReference,o=r(2190).isSpace;t.exports=function(t,e){var r,i,s,a,c,l,p,u,h,f,d,m,g,v="",y=t.pos,k=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;if(l=t.pos+2,(c=t.md.helpers.parseLinkLabel(t,t.pos+1,!1))<0)return!1;if((p=c+1)<k&&40===t.src.charCodeAt(p)){for(p++;p<k&&(i=t.src.charCodeAt(p),o(i)||10===i);p++);if(p>=k)return!1;for(g=p,(h=t.md.helpers.parseLinkDestination(t.src,p,t.posMax)).ok&&(v=t.md.normalizeLink(h.str),t.md.validateLink(v)?p=h.pos:v=""),g=p;p<k&&(i=t.src.charCodeAt(p),o(i)||10===i);p++);if(h=t.md.helpers.parseLinkTitle(t.src,p,t.posMax),p<k&&g!==p&&h.ok)for(f=h.str,p=h.pos;p<k&&(i=t.src.charCodeAt(p),o(i)||10===i);p++);else f="";if(p>=k||41!==t.src.charCodeAt(p))return t.pos=y,!1;p++}else{if(void 0===t.env.references)return!1;if(p<k&&91===t.src.charCodeAt(p)?(g=p+1,(p=t.md.helpers.parseLinkLabel(t,p))>=0?a=t.src.slice(g,p++):p=c+1):p=c+1,a||(a=t.src.slice(l,c)),!(u=t.env.references[n(a)]))return t.pos=y,!1;v=u.href,f=u.title}return e||(s=t.src.slice(l,c),t.md.inline.parse(s,t.md,t.env,m=[]),(d=t.push("image","img",0)).attrs=r=[["src",v],["alt",""]],d.children=m,d.content=s,f&&r.push(["title",f])),t.pos=p,t.posMax=k,!0}},5085:(t,e,r)=>{"use strict";var n=r(2190).normalizeReference,o=r(2190).isSpace;t.exports=function(t,e){var r,i,s,a,c,l,p,u,h="",f="",d=t.pos,m=t.posMax,g=t.pos,v=!0;if(91!==t.src.charCodeAt(t.pos))return!1;if(c=t.pos+1,(a=t.md.helpers.parseLinkLabel(t,t.pos,!0))<0)return!1;if((l=a+1)<m&&40===t.src.charCodeAt(l)){for(v=!1,l++;l<m&&(i=t.src.charCodeAt(l),o(i)||10===i);l++);if(l>=m)return!1;if(g=l,(p=t.md.helpers.parseLinkDestination(t.src,l,t.posMax)).ok){for(h=t.md.normalizeLink(p.str),t.md.validateLink(h)?l=p.pos:h="",g=l;l<m&&(i=t.src.charCodeAt(l),o(i)||10===i);l++);if(p=t.md.helpers.parseLinkTitle(t.src,l,t.posMax),l<m&&g!==l&&p.ok)for(f=p.str,l=p.pos;l<m&&(i=t.src.charCodeAt(l),o(i)||10===i);l++);}(l>=m||41!==t.src.charCodeAt(l))&&(v=!0),l++}if(v){if(void 0===t.env.references)return!1;if(l<m&&91===t.src.charCodeAt(l)?(g=l+1,(l=t.md.helpers.parseLinkLabel(t,l))>=0?s=t.src.slice(g,l++):l=a+1):l=a+1,s||(s=t.src.slice(c,a)),!(u=t.env.references[n(s)]))return t.pos=d,!1;h=u.href,f=u.title}return e||(t.pos=c,t.posMax=a,t.push("link_open","a",1).attrs=r=[["href",h]],f&&r.push(["title",f]),t.md.inline.tokenize(t),t.push("link_close","a",-1)),t.pos=l,t.posMax=m,!0}},4997:(t,e,r)=>{"use strict";var n=r(2190).isSpace;t.exports=function(t,e){var r,o,i,s=t.pos;
443if(10!==t.src.charCodeAt(s))return!1;if(r=t.pending.length-1,o=t.posMax,!e)if(r>=0&&32===t.pending.charCodeAt(r))if(r>=1&&32===t.pending.charCodeAt(r-1)){for(i=r-1;i>=1&&32===t.pending.charCodeAt(i-1);)i--;t.pending=t.pending.slice(0,i),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(s++;s<o&&n(t.src.charCodeAt(s));)s++;return t.pos=s,!0}},8728:(t,e,r)=>{"use strict";var n=r(6584),o=r(2190).isWhiteSpace,i=r(2190).isPunctChar,s=r(2190).isMdAsciiPunct;function a(t,e,r,n){this.src=t,this.env=r,this.md=e,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}a.prototype.pushPending=function(){var t=new n("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t},a.prototype.push=function(t,e,r){this.pending&&this.pushPending();var o=new n(t,e,r),i=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(i),o},a.prototype.scanDelims=function(t,e){var r,n,a,c,l,p,u,h,f,d=t,m=!0,g=!0,v=this.posMax,y=this.src.charCodeAt(t);for(r=t>0?this.src.charCodeAt(t-1):32;d<v&&this.src.charCodeAt(d)===y;)d++;return a=d-t,n=d<v?this.src.charCodeAt(d):32,u=s(r)||i(String.fromCharCode(r)),f=s(n)||i(String.fromCharCode(n)),p=o(r),(h=o(n))?m=!1:f&&(p||u||(m=!1)),p?g=!1:u&&(h||f||(g=!1)),e?(c=m,l=g):(c=m&&(!g||u),l=g&&(!m||f)),{can_open:c,can_close:l,length:a}},a.prototype.Token=n,t.exports=a},3628:t=>{"use strict";function e(t,e){var r,n,o,i,s,a=[],c=e.length;for(r=0;r<c;r++)126===(o=e[r]).marker&&-1!==o.end&&(i=e[o.end],(s=t.tokens[o.token]).type="s_open",s.tag="s",s.nesting=1,s.markup="~~",s.content="",(s=t.tokens[i.token]).type="s_close",s.tag="s",s.nesting=-1,s.markup="~~",s.content="","text"===t.tokens[i.token-1].type&&"~"===t.tokens[i.token-1].content&&a.push(i.token-1));for(;a.length;){for(n=(r=a.pop())+1;n<t.tokens.length&&"s_close"===t.tokens[n].type;)n++;r!==--n&&(s=t.tokens[n],t.tokens[n]=t.tokens[r],t.tokens[r]=s)}}t.exports.w=function(t,e){var r,n,o,i,s=t.pos,a=t.src.charCodeAt(s);if(e)return!1;if(126!==a)return!1;if(o=(n=t.scanDelims(t.pos,!0)).length,i=String.fromCharCode(a),o<2)return!1;for(o%2&&(t.push("text","",0).content=i,o--),r=0;r<o;r+=2)t.push("text","",0).content=i+i,t.delimiters.push({marker:a,length:0,token:t.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return t.pos+=n.length,!0},t.exports.g=function(t){var r,n=t.tokens_meta,o=t.tokens_meta.length;for(e(t,t.delimiters),r=0;r<o;r++)n[r]&&n[r].delimiters&&e(t,n[r].delimiters)}},9427:t=>{"use strict";function e(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}t.exports=function(t,r){for(var n=t.pos;n<t.posMax&&!e(t.src.charCodeAt(n));)n++;return n!==t.pos&&(r||(t.pending+=t.src.slice(t.pos,n)),t.pos=n,!0)}},5683:t=>{"use strict";t.exports=function(t){var e,r,n=0,o=t.tokens,i=t.tokens.length;for(e=r=0;e<i;e++)o[e].nesting<0&&n--,o[e].level=n,o[e].nesting>0&&n++,"text"===o[e].type&&e+1<i&&"text"===o[e+1].type?o[e+1].content=o[e].content+o[e+1].content:(e!==r&&(o[r]=o[e]),r++);e!==r&&(o.length=r)}},6584:t=>{"use strict";function e(t,e,r){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}e.prototype.attrIndex=function(t){var e,r,n;if(!this.attrs)return-1;for(r=0,n=(e=this.attrs).length;r<n;r++)if(e[r][0]===t)return r;return-1},e.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},e.prototype.attrSet=function(t,e){var r=this.attrIndex(t),n=[t,e];r<0?this.attrPush(n):this.attrs[r]=n},e.prototype.attrGet=function(t){var e=this.attrIndex(t),r=null;return e>=0&&(r=this.attrs[e][1]),r},e.prototype.attrJoin=function(t,e){var r=this.attrIndex(t);r<0?this.attrPush([t,e]):this.attrs[r][1]=this.attrs[r][1]+" "+e}
443,t.exports=e},2231:(t,e,r)=>{"use strict";function n(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);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 o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}r.r(e),r.d(e,{decode:()=>k,default:()=>x,encode:()=>b,toASCII:()=>w,toUnicode:()=>_,ucs2decode:()=>m,ucs2encode:()=>g});var i=2147483647,s=36,a=/^xn--/,c=/[^\0-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},u=Math.floor,h=String.fromCharCode;function f(t){throw new RangeError(p[t])}function d(t,e){var r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]);var o=function(t,e){for(var r=[],n=t.length;n--;)r[n]=e(t[n]);return r}((t=t.replace(l,".")).split("."),e).join(".");return n+o}function m(t){for(var e=[],r=0,n=t.length;r<n;){var o=t.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var i=t.charCodeAt(r++);56320==(64512&i)?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),r--)}else e.push(o)}return e}var g=function(t){return String.fromCodePoint.apply(String,t)},v=function(t,e){return t+22+75*(t<26)-((0!=e)<<5)},y=function(t,e,r){var n=0;for(t=r?u(t/700):t>>1,t+=u(t/e);t>455;n+=s)t=u(t/35);return u(n+36*t/(t+38))},k=function(t){var e,r=[],n=t.length,o=0,a=128,c=72,l=t.lastIndexOf("-");l<0&&(l=0);for(var p=0;p<l;++p)t.charCodeAt(p)>=128&&f("not-basic"),r.push(t.charCodeAt(p));for(var h=l>0?l+1:0;h<n;){for(var d=o,m=1,g=s;;g+=s){h>=n&&f("invalid-input");var v=(e=t.charCodeAt(h++))-48<10?e-22:e-65<26?e-65:e-97<26?e-97:s;(v>=s||v>u((i-o)/m))&&f("overflow"),o+=v*m;var k=g<=c?1:g>=c+26?26:g-c;if(v<k)break;var b=s-k;m>u(i/b)&&f("overflow"),m*=b}var _=r.length+1;c=y(o-d,_,0==d),u(o/_)>i-a&&f("overflow"),a+=u(o/_),o%=_,r.splice(o++,0,a)}return String.fromCodePoint.apply(String,r)},b=function(t){for(var e,r=[],o=(t=m(t)).length,a=128,c=0,l=72,p=n(t);!(e=p()).done;){var d=e.value;d<128&&r.push(h(d))}var g=r.length,k=g;for(g&&r.push("-");k<o;){for(var b,_=i,w=n(t);!(b=w()).done;){var x=b.value;x>=a&&x<_&&(_=x)}var C=k+1;_-a>u((i-c)/C)&&f("overflow"),c+=(_-a)*C,a=_;for(var S,A=n(t);!(S=A()).done;){var M=S.value;if(M<a&&++c>i&&f("overflow"),M==a){for(var D=c,E=s;;E+=s){var T=E<=l?1:E>=l+26?26:E-l;if(D<T)break;var O=D-T,N=s-T;r.push(h(v(T+O%N,0))),D=u(O/N)}r.push(h(v(D,0))),l=y(c,C,k==g),c=0,++k}}++c,++a}return r.join("")},_=function(t){return d(t,(function(t){return a.test(t)?k(t.slice(4).toLowerCase()):t}))},w=function(t){return d(t,(function(t){return c.test(t)?"xn--"+b(t):t}))};const x={version:"2.1.0",ucs2:{decode:m,encode:g},decode:k,encode:b,toASCII:w,toUnicode:_}},8690:t=>{t.exports=/[\0-\x1F\x7F-\x9F]/},2736:t=>{t.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},4601:t=>{t.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},8382:t=>{t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},2132:(t,e,r)=>{"use strict";e.Any=r(8486),e.Cc=r(8690),e.Cf=r(2736),e.P=r(4601),e.Z=r(8382)},8486:t=>{t.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},9323:t=>{"use strict";
443t
vendor: 12,333 bytes, line 443
443.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","
vendor: 20,673 bytes, line 443
443Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')
443},3051:t=>{"use strict";t.exports=
vendor: 32,997 bytes, line 443
443JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')
443}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";function t(e,r){return t=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t(e,r)}function e(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,t(e,r)}r.r(n),r.d(n,{InputRule:()=>wr,Plugin:()=>We,Selection:()=>Me,components:()=>Hr,keymap:()=>bo,liftListItem:()=>br,proseMirror:()=>Ta,splitListItem:()=>kr,states:()=>Na,wrapInList:()=>yr});const o=flarum.core.compat["common/Component"];var i=r.n(o);const s=flarum.core.compat["common/components/Tooltip"];var a=r.n(s);const c=flarum.core.compat["common/helpers/icon"];var l=r.n(c);const p=flarum.core.compat["common/utils/extractText"];var u=r.n(p),h=function(t){function r(){return t.apply(this,arguments)||this}e(r,t);var n=r.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state,this.state.addItem(this.attrs.type,this.attrs.command,this.onEditorUpdate.bind(this))},n.view=function(){return m(a(),{text:u()(this.attrs.tooltip)},m("button",{className:"Button Button--icon Button--link CommandButton",onclick:this.click.bind(this),onkeydown:this.keydown.bind(this)},l()(this.attrs.icon)))},n.keydown=function(t){" "!==t.key&&"Enter"!==t.key||this.click(t)},n.click=function(t){return t.preventDefault(),this.state.run(this.attrs.type)},n.title=function(){return app.translator.trans("askvortsov-rich-text.lib.composer."+this.attrs.type+"_tooltip")},n.onEditorUpdate=function(){},r}(i());const f=flarum.core.compat["common/components/Button"];var d=r.n(f);const g=flarum.core.compat["common/components/Dropdown"];var v=r.n(g);const y=flarum.core.compat["common/utils/ItemList"];var k=r.n(y);const b=flarum.core.compat["common/components/Modal"];var _=function(t){function r(){return t.apply(this,arguments)||this}e(r,t);var n=r.prototype;return n.className=function(){return"LoadingModal Modal--small"},n.title=function(){return this.attrs.title},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$(".CommandButton").on("click",(function(){app.modal.close()}))},n.content=function(){var t=this.attrs.onsubmit?this.attrs.onsubmit.bind(this):function(){};return m("div",{className:"Modal-body"},m("form",{className:"Form",onsubmit:t},this.attrs.vnodeContent))},r}(r.n(b)()),w=function(t){function r(){return t.apply(this,arguments)||this}e(r,t),r.initAttrs=function(t){t.buttonClassName="Button Button--icon Button--link Button--menuDropdown"};var n=r.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.oncreate=function(e){var r=this;t.prototype.oncreate.call(this,e),this.$().on("click",(function(t){$(".App").is(".mobile-safari")&&(app.modal.show(_,{title:r.attrs.tooltip,vnodeContent:r.fields().toArray(),onsubmit:r.onsubmit.bind(r)}),t.stopPropagation())})),this.$().on("shown.bs.dropdown",(function(){r.$(".Dropdown-menu").find("input, select, textarea").first().focus().select()}
443))},n.getButtonContent=function(t){return m(a(),{text:this.attrs.tooltip},m("span",null,l()(this.attrs.icon)))},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu FormDropdown"},m("form",{className:"Form",onsubmit:this.onsubmit.bind(this)},this.fields().toArray()))},n.fields=function(){var t=new(k());return t.add("insert",m(d(),{type:"submit",className:"Button Button--primary"},app.translator.trans("askvortsov-rich-text.lib.composer.insert_button"))),t},n.onsubmit=function(t){app.modal.close(),t.preventDefault(),$("body").trigger("click"),this.insert(t),app.composer.editor.focus()},n.insert=function(t){},r}(v());const x=flarum.core.compat["common/utils/Stream"];var C=r.n(x),S=function(t){function r(){return t.apply(this,arguments)||this}e(r,t);var n=r.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.src=C()(""),this.title=C()("")},n.fields=function(){var e=t.prototype.fields.call(this);return e.add("src",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"src",type:"url",placeholder:u()(app.translator.trans("askvortsov-rich-text.lib.composer.insert_image.src_placeholder")),bidi:this.src,required:!0})),10),e.add("title",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"title",placeholder:u()(app.translator.trans("askvortsov-rich-text.lib.composer.insert_image.title_placeholder")),bidi:this.title})),10),e},n.insert=function(t){this.state.insertNode(this.attrs.node,{src:this.src(),title:this.title()}),this.src(""),this.title("")},r}(w);function A(t){this.content=t}A.prototype={constructor:A,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(t,e,r){var n=r&&r!=t?this.remove(r):this,o=n.find(t),i=n.content.slice();return-1==o?i.push(r||t,e):(i[o+1]=e,r&&(i[o]=r)),new A(i)},remove:function(t){var e=this.find(t);if(-1==e)return this;var r=this.content.slice();return r.splice(e,2),new A(r)},addToStart:function(t,e){return new A([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var r=this.remove(t).content.slice();return r.push(t,e),new A(r)},addBefore:function(t,e,r){var n=this.remove(e),o=n.content.slice(),i=n.find(t);return o.splice(-1==i?o.length:i,0,e,r),new A(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=A.from(t)).size?new A(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=A.from(t)).size?new A(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=A.from(t);for(var r=0;r<t.content.length;r+=2)e=e.remove(t.content[r]);return e},get size(){return this.content.length>>1}},A.from=function(t){if(t instanceof A)return t;var e=[];if(t)for(var r in t)e.push(r,t[r]);return new A(e)};const M=A;function D(t,e,r){for(var n=0;;n++){if(n==t.childCount||n==e.childCount)return t.childCount==e.childCount?null:r;var o=t.child(n),i=e.child(n);if(o!=i){if(!o.sameMarkup(i))return r;if(o.isText&&o.text!=i.text){for(var s=0;o.text[s]==i.text[s];s++)r++;return r}if(o.content.size||i.content.size){var a=D(o.content,i.content,r+1);if(null!=a)return a}r+=o.nodeSize}else r+=o.nodeSize}}function E(t,e,r,n){for(var o=t.childCount,i=e.childCount;;){if(0==o||0==i)return o==i?null:{a:r,b:n};var s=t.child(--o),a=e.child(--i),c=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:r,b:n};if(s.isText&&s.text!=a.text){for(var l=0,p=Math.min(s.text.length,a.text.length);l<p&&s.text[s.text.length-l-1]==a.text[a.text.length-l-1];)l++,r--,n--;return{a:r,b:n}}if(s.content.size||a.content.size){var u=E(s.content,a.content,r-1,n-1);if(u)return u}r-=c,n-=c}else r-=c,n-=c}}var T=function(t,e){if(this.content=t,this.size=e||0,null==e)for(var r=0;r<t.length;r++)this.size+=t[r].nodeSize},O={firstChild:{configurable:!0},lastChild:{configurable:!0},childCount:{configurable:!0}};T.prototype.nodesBetween=function(t,e,r,n,o){void 0===n&&(n=0);for(var i=0,s=0;s<e;i++){var a=this.content[i],c=s+a.nodeSize;if(c>t&&!1!==r(a,n+s,o,i)&&a.content.size){var l=s+1;a.nodesBetween(Math.max(0,t-l),Math.min(a.content.size,e-l),r,n+l)}s=c}},T.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},T.prototype.textBetween=function(t,e,r,n){var o="",i=!0;return this.nodesBetween(t,e,(function(s,a){s.isText?(o+=s.text.slice(Math.max(t,a)-a,e-a),i=!r):s.isLeaf&&n?(o+="function"==typeof n?n(s):n,i=!r):!i&&s.isBlock&&(o+=r,i=!0)}),0),o},T.prototype.append=function(t){if(!t.size)return this;if(!this.size)return t;var e=this.lastChild,r=t.firstChild,n=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(r)&&(n[n.length-1]=e.withText(e.text+r.text),o=1);o<t.content.length;o++)n.push(t.content[o]);return new T(n,this.size+t.size)},T.prototype.cut=function(t,e){if(null==e&&(e=this.size),0==t&&e==this.size)return this;var r=[],n=0;if(e>t)for(var o=0,i=0;i<e;o++){var s=this.content[o],a=i+s.nodeSize;a>t&&((i<t||a>e)&&(s=s.isText?s.cut(Math.max(0,t-i),Math.min(s.text.length,e-i)):s.cut(Math.max(0,t-i-1),Math.min(s.content.size,e-i-1))),r.push(s),n+=s.nodeSize),i=a}return new T(r,n)},T.prototype.cutByIndex=function(t,e){return t==e?T.empty:0==t&&e==this.content.length?this:new T(this.content.slice(t,e))},T.prototype.replaceChild=function(t,e){var r=this.content[t];if(r==e)return this;var n=this.content.slice(),o=this.size+e.nodeSize-r.nodeSize;return n[t]=e,new T(n,o)},T.prototype.addToStart=function(t){return new T([t].concat(this.content),this.size+t.no
443deSize)},T.prototype.addToEnd=function(t){return new T(this.content.concat(t),this.size+t.nodeSize)},T.prototype.eq=function(t){if(this.content.length!=t.content.length)return!1;for(var e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0},O.firstChild.get=function(){return this.content.length?this.content[0]:null},O.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},O.childCount.get=function(){return this.content.length},T.prototype.child=function(t){var e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e},T.prototype.maybeChild=function(t){return this.content[t]},T.prototype.forEach=function(t){for(var e=0,r=0;e<this.content.length;e++){var n=this.content[e];t(n,r,e),r+=n.nodeSize}},T.prototype.findDiffStart=function(t,e){return void 0===e&&(e=0),D(this,t,e)},T.prototype.findDiffEnd=function(t,e,r){return void 0===e&&(e=this.size),void 0===r&&(r=t.size),E(this,t,e,r)},T.prototype.findIndex=function(t,e){if(void 0===e&&(e=-1),0==t)return q(0,t);if(t==this.size)return q(this.content.length,t);if(t>this.size||t<0)throw new RangeError("Position "+t+" outside of fragment ("+this+")");for(var r=0,n=0;;r++){var o=n+this.child(r).nodeSize;if(o>=t)return o==t||e>0?q(r+1,o):q(r,n);n=o}},T.prototype.toString=function(){return"<"+this.toStringInner()+">"},T.prototype.toStringInner=function(){return this.content.join(", ")},T.prototype.toJSON=function(){return this.content.length?this.content.map((function(t){return t.toJSON()})):null},T.fromJSON=function(t,e){if(!e)return T.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new T(e.map(t.nodeFromJSON))},T.fromArray=function(t){if(!t.length)return T.empty;for(var e,r=0,n=0;n<t.length;n++){var o=t[n];r+=o.nodeSize,n&&o.isText&&t[n-1].sameMarkup(o)?(e||(e=t.slice(0,n)),e[e.length-1]=o.withText(e[e.length-1].text+o.text)):e&&e.push(o)}return new T(e||t,r)},T.from=function(t){if(!t)return T.empty;if(t instanceof T)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new T([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))},Object.defineProperties(T.prototype,O);var N={index:0,offset:0};function q(t,e){return N.index=t,N.offset=e,N}function z(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;var r=Array.isArray(t);if(Array.isArray(e)!=r)return!1;if(r){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!z(t[n],e[n]))return!1}else{for(var o in t)if(!(o in e)||!z(t[o],e[o]))return!1;for(var i in e)if(!(i in t))return!1}return!0}T.empty=new T([],0);var I=function(t,e){this.type=t,this.attrs=e};function R(t){var e=Error.call(this,t);return e.__proto__=R.prototype,e}I.prototype.addToSet=function(t){for(var e,r=!1,n=0;n<t.length;n++){var o=t[n];if(this.eq(o))return t;if(this.type.excludes(o.type))e||(e=t.slice(0,n));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(e||(e=t.slice(0,n)),e.push(this),r=!0),e&&e.push(o)}}return e||(e=t.slice()),r||e.push(this),e},I.prototype.removeFromSet=function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t},I.prototype.isInSet=function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1},I.prototype.eq=function(t){return this==t||this.type==t.type&&z(this.attrs,t.attrs)},I.prototype.toJSON=function(){var t={type:this.type.name};for(var e in this.attrs){t.attrs=this.attrs;break}return t},I.fromJSON=function(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");var r=t.marks[e.type];if(!r)throw new RangeError("There is no mark type "+e.type+" in this schema");return r.create(e.attrs)},I.sameSet=function(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(!t[r].eq(e[r]))return!1;return!0},I.setFrom=function(t){if(!t||0==t.length)return I.none;if(t instanceof I)return[t];var e=t.slice();return e.sort((function(t,e){return t.type.rank-e.type.rank})),e},I.none=[],R.prototype=Object.create(Error.prototype),R.prototype.constructor=R,R.prototype.name="ReplaceError";var L=function(t,e,r){this.content=t,this.openStart=e,this.openEnd=r},B={size:{configurable:!0}};function F(t,e,r){var n=t.findIndex(e),o=n.index,i=n.offset,s=t.maybeChild(o),a=t.findIndex(r),c=a.index,l=a.offset;if(i==e||s.isText){if(l!=r&&!t.child(c).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(r))}if(o!=c)throw new RangeError("Removing non-flat range");return t.replaceChild(o,s.copy(F(s.content,e-i-1,r-i-1)))}function P(t,e,r,n){var o=t.findIndex(e),i=o.index,s=o.offset,a=t.maybeChild(i);if(s==e||a.isText)return n&&!n.canReplace(i,i,r)?null:t.cut(0,e).append(r).append(t.cut(e));var c=P(a.content,e-s-1,r);return c&&t.replaceChild(i,a.copy(c))}function V(t,e,r){if(r.openStart>
443t.depth)throw new R("Inserted content deeper than insertion position");if(t.depth-r.openStart!=e.depth-r.openEnd)throw new R("Inconsistent open depths");return j(t,e,r,0)}function j(t,e,r,n){var o=t.index(n),i=t.node(n);if(o==e.index(n)&&n<t.depth-r.openStart){var s=j(t,e,r,n+1);return i.copy(i.content.replaceChild(o,s))}if(r.content.size){if(r.openStart||r.openEnd||t.depth!=n||e.depth!=n){var a=function(t,e){for(var r=e.depth-t.openStart,n=e.node(r).copy(t.content),o=r-1;o>=0;o--)n=e.node(o).copy(T.from(n));return{start:n.resolveNoCache(t.openStart+r),end:n.resolveNoCache(n.content.size-t.openEnd-r)}}(r,t);return Z(i,G(t,a.start,a.end,e,n))}var c=t.parent,l=c.content;return Z(c,l.cut(0,t.parentOffset).append(r.content).append(l.cut(e.parentOffset)))}return Z(i,K(t,e,n))}function U(t,e){if(!e.type.compatibleContent(t.type))throw new R("Cannot join "+e.type.name+" onto "+t.type.name)}function H(t,e,r){var n=t.node(r);return U(n,e.node(r)),n}function J(t,e){var r=e.length-1;r>=0&&t.isText&&t.sameMarkup(e[r])?e[r]=t.withText(e[r].text+t.text):e.push(t)}function W(t,e,r,n){var o=(e||t).node(r),i=0,s=e?e.index(r):o.childCount;t&&(i=t.index(r),t.depth>r?i++:t.textOffset&&(J(t.nodeAfter,n),i++));for(var a=i;a<s;a++)J(o.child(a),n);e&&e.depth==r&&e.textOffset&&J(e.nodeBefore,n)}function Z(t,e){if(!t.type.validContent(e))throw new R("Invalid content for node "+t.type.name);return t.copy(e)}function G(t,e,r,n,o){var i=t.depth>o&&H(t,e,o+1),s=n.depth>o&&H(r,n,o+1),a=[];return W(null,t,o,a),i&&s&&e.index(o)==r.index(o)?(U(i,s),J(Z(i,G(t,e,r,n,o+1)),a)):(i&&J(Z(i,K(t,e,o+1)),a),W(e,r,o,a),s&&J(Z(s,K(r,n,o+1)),a)),W(n,null,o,a),new T(a)}function K(t,e,r){var n=[];return W(null,t,r,n),t.depth>r&&J(Z(H(t,e,r+1),K(t,e,r+1)),n),W(e,null,r,n),new T(n)}B.size.get=function(){return this.content.size-this.openStart-this.openEnd},L.prototype.insertAt=function(t,e){var r=P(this.content,t+this.openStart,e,null);return r&&new L(r,this.openStart,this.openEnd)},L.prototype.removeBetween=function(t,e){return new L(F(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},L.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},L.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},L.prototype.toJSON=function(){if(!this.content.size)return null;var t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t},L.fromJSON=function(t,e){if(!e)return L.empty;var r=e.openStart||0,n=e.openEnd||0;if("number"!=typeof r||"number"!=typeof n)throw new RangeError("Invalid input for Slice.fromJSON");return new L(T.fromJSON(t,e.content),r,n)},L.maxOpen=function(t,e){void 0===e&&(e=!0);for(var r=0,n=0,o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)r++;for(var i=t.lastChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.lastChild)n++;return new L(t,r,n)},Object.defineProperties(L.prototype,B),L.empty=new L(T.empty,0,0);var Y=function(t,e,r){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=r},Q={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};Y.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},Q.parent.get=function(){return this.node(this.depth)},Q.doc.get=function(){return this.node(0)},Y.prototype.node=function(t){return this.path[3*this.resolveDepth(t)]},Y.prototype.index=function(t){return this.path[3*this.resolveDepth(t)+1]},Y.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)},Y.prototype.start=function(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1},Y.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},Y.prototype.before=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]},Y.prototype.after=function(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize},Q.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},Q.nodeAfter.get=function(){var t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;var r=this.pos-this.path[this.path.length-1],n=t.child(e);return r?t.child(e).cut(r):n},Q.nodeBefore.get=function(){var t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)},Y.prototype.posAtIndex=function(t,e){e=this.resolveDepth(e);for(var r=this.path[3*e],n=0==e?0:this.path[3*e-1]+1,o=0;o<t;o++)n+=r.child(o).nodeSize;return n},Y.prototype.marks=function(){var t=this.parent,e=this.index();if(0==t.content.size)return I.none;if(this.textOffset)return t.child(e).marks;var r=t.maybeChild(e-1),n=t.maybeChild(e);if(!r){var o=r;r=n,n=o}for(var i=r.marks,s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||n&&i[s].isInSet(n.marks)||(i=i[s--].removeFromSet(i));return i},Y.prototype.marksAcross=function(t){var e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;for(var r=e.marks,n=t.parent.maybeChild(t.index()),o=0;o<r.length;o++)!1!==r[o].type.spec.inclusive||n&&r[o].isInSet(n.marks)||(r=r[o--].removeFromSet(r));return r},Y.prototype.sharedDepth=function(t){for(var e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0},Y.prototype.blockRange=function(t,e){if(void 0===t&&(t=this),t.pos<this.pos)return t.blockRange(this);for(var r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!e||e(this.node(r))))return new rt(this,t,r)},Y.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},Y.prototype.max=function(t){return t.pos>this.pos?t:this},Y.prototype.min=function(t){return t.pos<this.pos?t:this},Y.prototype.toString=function(){for(var t="",e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset},Y.resolve=function(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");for(var r=[],n=0,o=e,i=t;;){var s=i.content.findIndex(o),a=s.index,c=s.offset,l=o-c;if(r.push(i,a,n+c),!l)break;if((i=i.child(a)).isText)break;o=l-1,n+=c+1}return new Y(e,r,o)}
443,Y.resolveCached=function(t,e){for(var r=0;r<X.length;r++){var n=X[r];if(n.pos==e&&n.doc==t)return n}var o=X[tt]=Y.resolve(t,e);return tt=(tt+1)%et,o},Object.defineProperties(Y.prototype,Q);var X=[],tt=0,et=12,rt=function(t,e,r){this.$from=t,this.$to=e,this.depth=r},nt={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};nt.start.get=function(){return this.$from.before(this.depth+1)},nt.end.get=function(){return this.$to.after(this.depth+1)},nt.parent.get=function(){return this.$from.node(this.depth)},nt.startIndex.get=function(){return this.$from.index(this.depth)},nt.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(rt.prototype,nt);var ot=Object.create(null),it=function(t,e,r,n){this.type=t,this.attrs=e,this.content=r||T.empty,this.marks=n||I.none},st={nodeSize:{configurable:!0},childCount:{configurable:!0},textContent:{configurable:!0},firstChild:{configurable:!0},lastChild:{configurable:!0},isBlock:{configurable:!0},isTextblock:{configurable:!0},inlineContent:{configurable:!0},isInline:{configurable:!0},isText:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};st.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},st.childCount.get=function(){return this.content.childCount},it.prototype.child=function(t){return this.content.child(t)},it.prototype.maybeChild=function(t){return this.content.maybeChild(t)},it.prototype.forEach=function(t){this.content.forEach(t)},it.prototype.nodesBetween=function(t,e,r,n){void 0===n&&(n=0),this.content.nodesBetween(t,e,r,n,this)},it.prototype.descendants=function(t){this.nodesBetween(0,this.content.size,t)},st.textContent.get=function(){return this.textBetween(0,this.content.size,"")},it.prototype.textBetween=function(t,e,r,n){return this.content.textBetween(t,e,r,n)},st.firstChild.get=function(){return this.content.firstChild},st.lastChild.get=function(){return this.content.lastChild},it.prototype.eq=function(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)},it.prototype.sameMarkup=function(t){return this.hasMarkup(t.type,t.attrs,t.marks)},it.prototype.hasMarkup=function(t,e,r){return this.type==t&&z(this.attrs,e||t.defaultAttrs||ot)&&I.sameSet(this.marks,r||I.none)},it.prototype.copy=function(t){return void 0===t&&(t=null),t==this.content?this:new this.constructor(this.type,this.attrs,t,this.marks)},it.prototype.mark=function(t){return t==this.marks?this:new this.constructor(this.type,this.attrs,this.content,t)},it.prototype.cut=function(t,e){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))},it.prototype.slice=function(t,e,r){if(void 0===e&&(e=this.content.size),void 0===r&&(r=!1),t==e)return L.empty;var n=this.resolve(t),o=this.resolve(e),i=r?0:n.sharedDepth(e),s=n.start(i),a=n.node(i).content.cut(n.pos-s,o.pos-s);return new L(a,n.depth-i,o.depth-i)},it.prototype.replace=function(t,e,r){return V(this.resolve(t),this.resolve(e),r)},it.prototype.nodeAt=function(t){for(var e=this;;){var r=e.content.findIndex(t),n=r.index,o=r.offset;if(!(e=e.maybeChild(n)))return null;if(o==t||e.isText)return e;t-=o+1}},it.prototype.childAfter=function(t){var e=this.content.findIndex(t),r=e.index,n=e.offset;return{node:this.content.maybeChild(r),index:r,offset:n}},it.prototype.childBefore=function(t){if(0==t)return{node:null,index:0,offset:0};var e=this.content.findIndex(t),r=e.index,n=e.offset;if(n<t)return{node:this.content.child(r),index:r,offset:n};var o=this.content.child(r-1);return{node:o,index:r-1,offset:n-o.nodeSize}},it.prototype.resolve=function(t){return Y.resolveCached(this,t)},it.prototype.resolveNoCache=function(t){return Y.resolve(this,t)},it.prototype.rangeHasMark=function(t,e,r){var n=!1;return e>t&&this.nodesBetween(t,e,(function(t){return r.isInSet(t.marks)&&(n=!0),!n})),n},st.isBlock.get=function(){return this.type.isBlock},st.isTextblock.get=function(){return this.type.isTextblock},st.inlineContent.get=function(){return this.type.inlineContent},st.isInline.get=function(){return this.type.isInline},st.isText.get=function(){return this.type.isText},st.isLeaf.get=function(){return this.type.isLeaf},st.isAtom.get=function(){return this.type.isAtom}
443,it.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),ct(this.marks,t)},it.prototype.contentMatchAt=function(t){var e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e},it.prototype.canReplace=function(t,e,r,n,o){void 0===r&&(r=T.empty),void 0===n&&(n=0),void 0===o&&(o=r.childCount);var i=this.contentMatchAt(t).matchFragment(r,n,o),s=i&&i.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(var a=n;a<o;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0},it.prototype.canReplaceWith=function(t,e,r,n){if(n&&!this.type.allowsMarks(n))return!1;var o=this.contentMatchAt(t).matchType(r),i=o&&o.matchFragment(this.content,e);return!!i&&i.validEnd},it.prototype.canAppend=function(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)},it.prototype.check=function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50));for(var t=I.none,e=0;e<this.marks.length;e++)t=this.marks[e].addToSet(t);if(!I.sameSet(t,this.marks))throw new RangeError("Invalid collection of marks for node "+this.type.name+": "+this.marks.map((function(t){return t.type.name})));this.content.forEach((function(t){return t.check()}))},it.prototype.toJSON=function(){var t={type:this.type.name};for(var e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((function(t){return t.toJSON()}))),t},it.fromJSON=function(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");var r=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,r)}var n=T.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,n,r)},Object.defineProperties(it.prototype,st);var at=function(t){function e(e,r,n,o){if(t.call(this,e,r,null,o),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={textContent:{configurable:!0},nodeSize:{configurable:!0}};return e.prototype.toString=function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ct(this.marks,JSON.stringify(this.text))},r.textContent.get=function(){return this.text},e.prototype.textBetween=function(t,e){return this.text.slice(t,e)},r.nodeSize.get=function(){return this.text.length},e.prototype.mark=function(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)},e.prototype.withText=function(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)},e.prototype.cut=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.text.length),0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))},e.prototype.eq=function(t){return this.sameMarkup(t)&&this.text==t.text},e.prototype.toJSON=function(){var e=t.prototype.toJSON.call(this);return e.text=this.text,e},Object.defineProperties(e.prototype,r),e}(it);function ct(t,e){for(var r=t.length-1;r>=0;r--)e=t[r].type.name+"("+e+")";return e}var lt=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},pt={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};lt.parse=function(t,e){var r=new ut(t,e);if(null==r.next)return lt.empty;var n=ft(r);r.next&&r.err("Unexpected trailing text");var o,i,s=(o=function(t){var e=[[]];return o(function t(e,i){if("choice"==e.type)return e.exprs.reduce((function(e,r){return e.concat(t(r,i))}),[]);if("seq"==e.type)for(var s=0;;s++){var a=t(e.exprs[s],i);if(s==e.exprs.length-1)return a;o(a,i=r())}else{if("star"==e.type){var c=r();return n(i,c),o(t(e.expr,c),c),[n(c)]}if("plus"==e.type){var l=r();return o(t(e.expr,i),l),o(t(e.expr,l),l),[n(l)]}if("opt"==e.type)return[n(i)].concat(t(e.expr,i));if("range"==e.type){for(var p=i,u=0;u<e.min;u++){var h=r();o(t(e.expr,p),h),p=h}if(-1==e.max)o(t(e.expr,p),p);else for(var f=e.min;f<e.max;f++){var d=r();n(p,d),o(t(e.expr,p),d),p=d}return[n(p)]}if("name"==e.type)return[n(i,null,e.value)]}}(t,0),r()),e;function r(){return e.push([])-1}function n(t,r,n){var o={term:n,to:r};return e[t].push(o),o}function o(t,e){t.forEach((function(t){return t.to=e}))}}(n),i=Object.create(null),function t(e){var r=[];e.forEach((function(t){o[t].forEach((function(t){var e=t.term,n=t.to;if(e){var i=r.indexOf(e),s=i>-1&&r[i+1];
443kt(o,n).forEach((function(t){s||r.push(e,s=[]),-1==s.indexOf(t)&&s.push(t)}))}}))}));for(var n=i[e.join(",")]=new lt(e.indexOf(o.length-1)>-1),s=0;s<r.length;s+=2){var a=r[s+1].sort(yt);n.next.push(r[s],i[a.join(",")]||t(a))}return n}(kt(o,0)));return function(t,e){for(var r=0,n=[t];r<n.length;r++){for(var o=n[r],i=!o.validEnd,s=[],a=0;a<o.next.length;a+=2){var c=o.next[a],l=o.next[a+1];s.push(c.name),!i||c.isText||c.hasRequiredAttrs()||(i=!1),-1==n.indexOf(l)&&n.push(l)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(s,r),s},lt.prototype.matchType=function(t){for(var e=0;e<this.next.length;e+=2)if(this.next[e]==t)return this.next[e+1];return null},lt.prototype.matchFragment=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=t.childCount);for(var n=this,o=e;n&&o<r;o++)n=n.matchType(t.child(o).type);return n},pt.inlineContent.get=function(){var t=this.next[0];return!!t&&t.isInline},pt.defaultType.get=function(){for(var t=0;t<this.next.length;t+=2){var e=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}},lt.prototype.compatible=function(t){for(var e=0;e<this.next.length;e+=2)for(var r=0;r<t.next.length;r+=2)if(this.next[e]==t.next[r])return!0;return!1},lt.prototype.fillBefore=function(t,e,r){void 0===e&&(e=!1),void 0===r&&(r=0);var n=[this];return function o(i,s){var a=i.matchFragment(t,r);if(a&&(!e||a.validEnd))return T.from(s.map((function(t){return t.createAndFill()})));for(var c=0;c<i.next.length;c+=2){var l=i.next[c],p=i.next[c+1];
443if(!l.isText&&!l.hasRequiredAttrs()&&-1==n.indexOf(p)){n.push(p);var u=o(p,s.concat(l));if(u)return u}}}(this,[])},lt.prototype.findWrapping=function(t){for(var e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];var r=this.computeWrapping(t);return this.wrapCache.push(t,r),r},lt.prototype.computeWrapping=function(t){for(var e=Object.create(null),r=[{match:this,type:null,via:null}];r.length;){var n=r.shift(),o=n.match;if(o.matchType(t)){for(var i=[],s=n;s.type;s=s.via)i.push(s.type);return i.reverse()}for(var a=0;a<o.next.length;a+=2){var c=o.next[a];c.isLeaf||c.hasRequiredAttrs()||c.name in e||n.type&&!o.next[a+1].validEnd||(r.push({match:c.contentMatch,type:c,via:n}),e[c.name]=!0)}}},pt.edgeCount.get=function(){return this.next.length>>1},lt.prototype.edge=function(t){var e=t<<1;if(e>=this.next.length)throw new RangeError("There's no "+t+"th edge in this content match");return{type:this.next[e],next:this.next[e+1]}},lt.prototype.toString=function(){var t=[];return function e(r){t.push(r);for(var n=1;n<r.next.length;n+=2)-1==t.indexOf(r.next[n])&&e(r.next[n])}(this),t.map((function(e,r){for(var n=r+(e.validEnd?"*":" ")+" ",o=0;o<e.next.length;o+=2)n+=(o?", ":"")+e.next[o].name+"->"+t.indexOf(e.next[o+1]);return n})).join("\n")},Object.defineProperties(lt.prototype,pt),lt.empty=new lt(!0);var ut=function(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},ht={next:{configurable:!0}};function ft(t){var e=[];do{e.push(dt(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function dt(t){var e=[];do{e.push(mt(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function mt(t){for(var e=function(t){if(t.eat("(")){var e=ft(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){var r=function(t,e){var r=t.nodeTypes,n=r[e];if(n)return[n];var o=[];for(var i in r){var s=r[i];s.groups.indexOf(e)>-1&&o.push(s)}return 0==o.length&&t.err("No node type or group '"+e+"' found"),o}(t,t.next).map((function(e){return null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}}));return t.pos++,1==r.length?r[0]:{type:"choice",exprs:r}}t.err("Unexpected token '"+t.next+"'")}(t);;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=vt(t,e)}return e}function gt(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function vt(t,e){var r=gt(t),n=r;return t.eat(",")&&(n="}"!=t.next?gt(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:e}}function yt(t,e){return e-t}function kt(t,e){var r=[];return function e(n){var o=t[n];if(1==o.length&&!o[0].term)return e(o[0].to);r.push(n);for(var i=0;i<o.length;i++){var s=o[i],a=s.term,c=s.to;a||-1!=r.indexOf(c)||e(c)}}(e),r.sort(yt)}function bt(t){var e=Object.create(null);for(var r in t){var n=t[r];if(!n.hasDefault)return null;e[r]=n.default}return e}function _t(t,e){var r=Object.create(null);for(var n in t){var o=e&&e[n];if(void 0===o){var i=t[n];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+n);o=i.default}r[n]=o}return r}function wt(t){var e=Object.create(null);if(t)for(var r in t)e[r]=new St(t[r]);return e}ht.next.get=function(){return this.tokens[this.pos]},ut.prototype.eat=function(t){return this.next==t&&(this.pos++||!0)},ut.prototype.err=function(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")},Object.defineProperties(ut.prototype,ht);var xt=function(t,e,r){this.name=t,this.schema=e,this.spec=r,this.groups=r.group?r.group.split(" "):[],this.attrs=wt(r.attrs),this.defaultAttrs=bt(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==t),this.isText="text"==t},Ct={isInline:{configurable:!0},isTextblock:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0},whitespace:{configurable:!0}};Ct.isInline.get=function(){return!this.isBlock},Ct.isTextblock.get=function(){return this.isBlock&&this.inlineContent},Ct.isLeaf.get=function(){return this.contentMatch==lt.empty},Ct.isAtom.get=function(){return this.isLeaf||this.spec.atom},Ct.whitespace.get=function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")},xt.prototype.hasRequiredAttrs=function(){for(var t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1},xt.prototype.compatibleContent=function(t){return this==t||this.contentMatch.compatible(t.contentMatch)},xt.prototype.computeAttrs=function(t){return!t&&this.defaultAttrs?this.defaultAttrs:_t(this.attrs,t)},xt.prototype.create=function(t,e,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new it(this,this.computeAttrs(t),T.from(e),I.setFrom(r))},xt.prototype.createChecked=function(t,e,r){if(e=T.from(e),!this.validContent(e))throw new RangeError("Invalid content for node "+this.name);return new it(this,this.computeAttrs(t),e,I.setFrom(r))},xt.prototype.createAndFill=function(t,e,r){if(t=this.computeAttrs(t),(e=T.from(e)).size){var n=this.contentMatch.fillBefore(e);if(!n)return null;e=n.append(e)}var o=this.contentMatch.matchFragment(e).fillBefore(T.empty,!0);return o?new it(this,t,e.append(o),I.setFrom(r)):null},xt.prototype.validContent=function(t){var e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(var r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0},xt.prototype.allowsMarkType=function(t){return null==this.markSet||this.markSet.indexOf(t)>-1},xt.prototype.allowsMarks=function(t){if(null==this.markSet)return!0;for(var e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0},xt.prototype.allowedMarks=function(t){if(null==this.markSet)return t;for(var e,r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?e&&e.push(t[r]):e||(e=t.slice(0,r));return e?e.length?e:I.empty:t},xt.compile=function(t,e){var r=Object.create(null);t.forEach((function(t,n){return r[t]=new xt(t,e,n)}
443));var n=e.spec.topNode||"doc";if(!r[n])throw new RangeError("Schema is missing its top node type ('"+n+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(var o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r},Object.defineProperties(xt.prototype,Ct);var St=function(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default},At={isRequired:{configurable:!0}};At.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(St.prototype,At);var Mt=function(t,e,r,n){this.name=t,this.schema=r,this.spec=n,this.attrs=wt(n.attrs),this.rank=e,this.excluded=null;var o=bt(this.attrs);this.instance=o&&new I(this,o)};Mt.prototype.create=function(t){return!t&&this.instance?this.instance:new I(this,_t(this.attrs,t))},Mt.compile=function(t,e){var r=Object.create(null),n=0;return t.forEach((function(t,o){return r[t]=new Mt(t,n++,e,o)})),r},Mt.prototype.removeFromSet=function(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t},Mt.prototype.isInSet=function(t){for(var e=0;e<t.length;e++)if(t[e].type==this)return t[e]},Mt.prototype.excludes=function(t){return this.excluded.indexOf(t)>-1};var Dt=function(t){for(var e in this.spec={},t)this.spec[e]=t[e];this.spec.nodes=M.from(t.nodes),this.spec.marks=M.from(t.marks),this.nodes=xt.compile(this.spec.nodes,this),this.marks=Mt.compile(this.spec.marks,this);var r=Object.create(null);for(var n in this.nodes){if(n in this.marks)throw new RangeError(n+" can not be both a node and a mark");var o=this.nodes[n],i=o.spec.content||"",s=o.spec.marks;o.contentMatch=r[i]||(r[i]=lt.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==s?null:s?Et(this,s.split(" ")):""!=s&&o.inlineContent?null:[]}for(var a in this.marks){var c=this.marks[a],l=c.spec.excludes;c.excluded=null==l?[c]:""==l?[]:Et(this,l.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function Et(t,e){for(var r=[],n=0;n<e.length;n++){var o=e[n],i=t.marks[o],s=i;if(i)r.push(i);else for(var a in t.marks){var c=t.marks[a];("_"==o||c.spec.group&&c.spec.group.split(" ").indexOf(o)>-1)&&r.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return r}Dt.prototype.node=function(t,e,r,n){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof xt))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,r,n)},Dt.prototype.text=function(t,e){var r=this.nodes.text;return new at(r,r.defaultAttrs,t,I.setFrom(e))},Dt.prototype.mark=function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)},Dt.prototype.nodeFromJSON=function(t){return it.fromJSON(this,t)},Dt.prototype.markFromJSON=function(t){return I.fromJSON(this,t)},Dt.prototype.nodeType=function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e};var Tt=function(t,e){var r=this;this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((function(t){t.tag?r.tags.push(t):t.style&&r.styles.push(t)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var r=t.nodes[e.node];return r.contentMatch.matchType(r)}))};Tt.prototype.parse=function(t,e){void 0===e&&(e={});var r=new Rt(this,e,!1);return r.addAll(t,null,e.from,e.to),r.finish()},Tt.prototype.parseSlice=function(t,e){void 0===e&&(e={});var r=new Rt(this,e,!0);return r.addAll(t,null,e.from,e.to),L.maxOpen(r.finish())},Tt.prototype.matchTag=function(t,e,r){for(var n=r?this.tags.indexOf(r)+1:0;n<this.tags.length;n++){var o=this.tags[n];if(Bt(t,o.tag)&&(void 0===o.namespace||t.namespaceURI==o.namespace)&&(!o.context||e.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(t);if(!1===i)continue;o.attrs=i}return o}}},Tt.prototype.matchStyle=function(t,e,r,n){for(var o=n?this.styles.indexOf(n)+1:0;o<this.styles.length;o++){var i=this.styles[o];if(!(0!=i.style.indexOf(t)||i.context&&!r.matchesContext(i.context)||i.style.length>t.length&&(61!=i.style.charCodeAt(t.length)||i.style.slice(t.length+1)!=e))){if(i.getAttrs
443){var s=i.getAttrs(e);if(!1===s)continue;i.attrs=s}return i}}},Tt.schemaRules=function(t){var e=[];function r(t){for(var r=null==t.priority?50:t.priority,n=0;n<e.length;n++){var o=e[n];if((null==o.priority?50:o.priority)<r)break}e.splice(n,0,t)}var n,o=function(e){var n=t.marks[e].spec.parseDOM;n&&n.forEach((function(t){r(t=Ft(t)),t.mark=e}))};for(var i in t.marks)o(i);for(var s in t.nodes)n=void 0,(n=t.nodes[s].spec.parseDOM)&&n.forEach((function(t){r(t=Ft(t)),t.node=s}));return e},Tt.fromSchema=function(t){return t.cached.domParser||(t.cached.domParser=new Tt(t,Tt.schemaRules(t)))};var Ot={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Nt={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},qt={ol:!0,ul:!0};function zt(t,e,r){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&r}var It=function(t,e,r,n,o,i,s){this.type=t,this.attrs=e,this.solid=o,this.match=i||(4&s?null:t.contentMatch),this.options=s,this.content=[],this.marks=r,this.activeMarks=I.none,this.pendingMarks=n,this.stashMarks=[]};It.prototype.findWrapping=function(t){if(!this.match){if(!this.type)return[];var e=this.type.contentMatch.fillBefore(T.from(t));if(!e){var r,n=this.type.contentMatch;return(r=n.findWrapping(t.type))?(this.match=n,r):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)},It.prototype.finish=function(t){if(!(1&this.options)){var e,r=this.content[this.content.length-1];r&&r.isText&&(e=/[ \t\r\n\u000c]+$/.exec(r.text))&&(r.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=r.withText(r.text.slice(0,r.text.length-e[0].length)))}var n=T.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(T.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n},It.prototype.popFromStashMark=function(t){for(var e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]},It.prototype.applyPending=function(t){for(var e=0,r=this.pendingMarks;e<r.length;e++){var n=r[e];(this.type?this.type.allowsMarkType(n.type):Pt(n.type,t))&&!n.isInSet(this.activeMarks)&&(this.activeMarks=n.addToSet(this.activeMarks),this.pendingMarks=n.removeFromSet(this.pendingMarks))}},It.prototype.inlineContext=function(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!Ot.hasOwnProperty(t.parentNode.nodeName.toLowerCase())};var Rt=function(t,e,r){this.parser=t,this.options=e,this.isOpen=r;var n,o=e.topNode,i=zt(null,e.preserveWhitespace,0)|(r?4:0);n=o?new It(o.type,o.attrs,I.none,I.none,!0,e.topMatch||o.type.contentMatch,i):new It(r?null:t.schema.topNodeType,null,I.none,I.none,!0,null,i),this.nodes=[n],this.open=0,this.find=e.findPositions,this.needsBlock=!1},Lt={top:{configurable:!0},currentPos:{configurable:!0}};function Bt(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Ft(t){var e={};for(var r in t)e[r]=t[r];return e}function Pt(t,e){var r=e.schema.nodes,n=function(n){var o=r[n];if(o.allowsMarkType(t)){var i=[];return function t(r){i.push(r);for(var n=0;n<r.edgeCount;n++){var o=r.edge(n),s=o.type,a=o.next;if(s==e)return!0;if(i.indexOf(a)<0&&t(a))return!0}}(o.contentMatch)?{v:!0}:void 0}};for(var o in r){var i=n(o);if(i)return i.v}}Lt.top.get=function(){return this.nodes[this.open]},Rt.prototype.addDOM=function(t){if(3==t.nodeType)this.addTextNode(t);else if(1==t.nodeType){var e=t.getAttribute("style"),r=e?this.readStyles(function(t){for(var e,r=/\s*([\w-]+)\s*:\s*([^;]+)/g,n=[];e=r.exec(t);)n.push(e[1],e[2].trim());return n}(e)):null,n=this.top;if(null!=r)for(var o=0;o<r.length;o++)this.addPendingMark(r[o]);if(this.addElement(t),null!=r)for(var i=0;i<r.length;i++)this.removePendingMark(r[i],n)}},Rt.prototype.addTextNode=function(t){var e=t.nodeValue,r=this.top;if(2&r.options||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(e)){if(1&r.options)e=2&r.options?e.replace(/\r\n?/g,"\n"):e.replace(/\r?\n|\r/g," ");else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){var n=r.content[r.content.length-1],o=t.previousSibling;(!n||o&&"BR"==o.nodeName||n.isText&&/[ \t\r\n\u000c]$/.test(n.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(t)}else this.findInside(t)},Rt.prototype.addElement=function(t,e){var r,n=t.nodeName.toLowerCase();qt.hasOwnProperty(n)&&this.parser.normalizeLists&&function(t){for(var e=t.firstChild,r=null;e;e=e.nextSibling){var n=1==e.nodeType?e.nodeName.toLowerCase():null;
443n&&qt.hasOwnProperty(n)&&r?(r.appendChild(e),e=r):"li"==n?r=e:n&&(r=null)}}(t);var o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(r=this.parser.matchTag(t,this,e));if(o?o.ignore:Nt.hasOwnProperty(n))this.findInside(t),this.ignoreFallback(t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);var i,s=this.top,a=this.needsBlock;if(Ot.hasOwnProperty(n))i=!0,s.type||(this.needsBlock=!0);else if(!t.firstChild)return void this.leafFallback(t);this.addAll(t),i&&this.sync(s),this.needsBlock=a}else this.addElementByRule(t,o,!1===o.consuming?r:null)},Rt.prototype.leafFallback=function(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))},Rt.prototype.ignoreFallback=function(t){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))},Rt.prototype.readStyles=function(t){var e=I.none;t:for(var r=0;r<t.length;r+=2)for(var n=null;;){var o=this.parser.matchStyle(t[r],t[r+1],this,n);if(!o)continue t;if(o.ignore)return null;if(e=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(e),!1!==o.consuming)break;n=o}return e},Rt.prototype.addElementByRule=function(t,e,r){var n,o,i,s=this;e.node?(o=this.parser.schema.nodes[e.node]).isLeaf?this.insertNode(o.create(e.attrs))||this.leafFallback(t):n=this.enter(o,e.attrs,e.preserveWhitespace):(i=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(i));var a=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((function(t){return s.insertNode(t)}));else{var c=e.contentElement;"string"==typeof c?c=t.querySelector(c):"function"==typeof c&&(c=c(t)),c||(c=t),this.findAround(t,c,!0),this.addAll(c,n)}n&&(this.sync(a),this.open--),i&&this.removePendingMark(i,a)},Rt.prototype.addAll=function(t,e,r,n){for(var o=r||0,i=r?t.childNodes[r]:t.firstChild,s=null==n?null:t.childNodes[n];i!=s;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i),e&&Ot.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(e);this.findAtPoint(t,o)},Rt.prototype.findPlace=function(t){for(var e,r,n=this.open;n>=0;n--){var o=this.nodes[n],i=o.findWrapping(t);if(i&&(!e||e.length>i.length)&&(e=i,r=o,!i.length))break;if(o.solid)break}if(!e)return!1;this.sync(r);for(var s=0;s<e.length;s++)this.enterInner(e[s],null,!1);return!0},Rt.prototype.insertNode=function(t){if(t.isInline&&this.needsBlock&&!this.top.type){var e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(t)){this.closeExtra();var r=this.top;r.applyPending(t.type),r.match&&(r.match=r.match.matchType(t.type));for(var n=r.activeMarks,o=0;o<t.marks.length;o++)r.type&&!r.type.allowsMarkType(t.marks[o].type)||(n=t.marks[o].addToSet(n));return r.content.push(t.mark(n)),!0}return!1},Rt.prototype.enter=function(t,e,r){var n=this.findPlace(t.create(e));return n&&this.enterInner(t,e,!0,r),n},Rt.prototype.enterInner=function(t,e,r,n){this.closeExtra();var o=this.top;o.applyPending(t),o.match=o.match&&o.match.matchType(t,e);var i=zt(t,n,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new It(t,e,o.activeMarks,o.pendingMarks,r,null,i)),this.open++},Rt.prototype.closeExtra=function(t){var e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}},Rt.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},Rt.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},Lt.currentPos.get=function(){this.closeExtra();for(var t=0,e=this.open;e>=0;e--){for(var r=this.nodes[e].content,n=r.length-1;n>=0;n--)t+=r[n].nodeSize;e&&t++}return t},Rt.prototype.findAtPoint=function(t,e){if(this.find)for(var r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==e&&(this.find[r].pos=this.currentPos)},Rt.prototype.findInside=function(t){if(this.find)for(var e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)},Rt.prototype.findAround=function(t,e,r){if(t!=e&&this.find)for(var n=0;n<this.find.length;n++)null==this.find[n].pos&&1==t.nodeType&&t.contains(this.find[n].node)&&e.compareDocumentPosition(this.find[n].node)&(r?2:4)&&(this.find[n].pos=this.currentPos)},Rt.prototype.findInText=function(t){if(this.find)for(var e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))},Rt.prototype.matchesContext=function(t){var e=this;if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);var r=t.split("/"),n=this.options.context,o=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),i=-(n?n.depth+1:0)+(o?0:1);return function t(s,a){for(;s>=0;s--){var c=r[s];if(""==c){if(s==r.length-1||0==s)continue;for(;a>=i;a--)if(t(s-1,a))return!0;return!1}var l=a>0||0==a&&o?e.nodes[a].type:n&&a>=i?n.node(a-i).type:null;if(!l||l.name!=c&&-1==l.groups.indexOf(c))return!1;a--}return!0}(r.length-1,this.open)},Rt.prototype.textblockFromContext=function(){var t=this.options.context;if(t)for(var e=t.depth;e>=0;
443e--){var r=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(var n in this.parser.schema.nodes){var o=this.parser.schema.nodes[n];if(o.isTextblock&&o.defaultAttrs)return o}},Rt.prototype.addPendingMark=function(t){var e=function(t,e){for(var r=0;r<e.length;r++)if(t.eq(e[r]))return e[r]}(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)},Rt.prototype.removePendingMark=function(t,e){for(var r=this.open;r>=0;r--){var n=this.nodes[r];if(n.pendingMarks.lastIndexOf(t)>-1)n.pendingMarks=t.removeFromSet(n.pendingMarks);else{n.activeMarks=t.removeFromSet(n.activeMarks);var o=n.popFromStashMark(t);o&&n.type&&n.type.allowsMarkType(o.type)&&(n.activeMarks=o.addToSet(n.activeMarks))}if(n==e)break}},Object.defineProperties(Rt.prototype,Lt);var $t=function(t,e){this.nodes=t||{},this.marks=e||{}};function Vt(t){var e={};for(var r in t){var n=t[r].spec.toDOM;n&&(e[r]=n)}return e}function jt(t){return t.document||window.document}$t.prototype.serializeFragment=function(t,e,r){var n=this;void 0===e&&(e={}),r||(r=jt(e).createDocumentFragment());var o=r,i=null;return t.forEach((function(t){if(i||t.marks.length){i||(i=[]);for(var r=0,s=0;r<i.length&&s<t.marks.length;){var a=t.marks[s];if(n.marks[a.type.name]){if(!a.eq(i[r])||!1===a.type.spec.spanning)break;r+=2,s++}else s++}for(;r<i.length;)o=i.pop(),i.pop();for(;s<t.marks.length;){var c=t.marks[s++],l=n.serializeMark(c,t.isInline,e);l&&(i.push(c,o),o.appendChild(l.dom),o=l.contentDOM||l.dom)}}o.appendChild(n.serializeNodeInner(t,e))})),r},$t.prototype.serializeNodeInner=function(t,e){void 0===e&&(e={});var r=$t.renderSpec(jt(e),this.nodes[t.type.name](t)),n=r.dom,o=r.contentDOM;if(o){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");e.onContent?e.onContent(t,o,e):this.serializeFragment(t.content,e,o)}return n},$t.prototype.serializeNode=function(t,e){void 0===e&&(e={});for(var r=this.serializeNodeInner(t,e),n=t.marks.length-1;n>=0;n--){var o=this.serializeMark(t.marks[n],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r},$t.prototype.serializeMark=function(t,e,r){void 0===r&&(r={});var n=this.marks[t.type.name];return n&&$t.renderSpec(jt(r),n(t,e))},$t.renderSpec=function(t,e,r){if(void 0===r&&(r=null),"string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;var n=e[0],o=n.indexOf(" ");o>0&&(r=n.slice(0,o),n=n.slice(o+1));var i=null,s=r?t.createElementNS(r,n):t.createElement(n),a=e[1],c=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a))for(var l in c=2,a)if(null!=a[l]){var p=l.indexOf(" ");p>0?s.setAttributeNS(l.slice(0,p),l.slice(p+1),a[l]):s.setAttribute(l,a[l])}for(var u=c;u<e.length;u++){var h=e[u];if(0===h){if(u<e.length-1||u>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var f=$t.renderSpec(t,h,r),d=f.dom,m=f.contentDOM;if(s.appendChild(d),m){if(i)throw new RangeError("Multiple content holes");i=m}}return{dom:s,contentDOM:i}},$t.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new $t(this.nodesFromSchema(t),this.marksFromSchema(t)))},$t.nodesFromSchema=function(t){var e=Vt(t.nodes);return e.text||(e.text=function(t){return t.text}),e},$t.marksFromSchema=function(t){return Vt(t.marks)};var Ut=Math.pow(2,16);function Ht(t){return 65535&t}var Jt=function(t,e,r){void 0===e&&(e=!1),void 0===r&&(r=null),this.pos=t,this.deleted=e,this.recover=r},Wt=function t(e,r){if(void 0===r&&(r=!1),!e.length&&t.empty)return t.empty;this.ranges=e,this.inverted=r};Wt.prototype.recover=function(t){var e=0,r=Ht(t);if(!this.inverted)for(var n=0;n<r;n++)e+=this.ranges[3*n+2]-this.ranges[3*n+1];return this.ranges[3*r]+e+function(t){return(t-(65535&t))/Ut}(t)},Wt.prototype.mapResult=function(t,e){return void 0===e&&(e=1),this._map(t,e,!1)},Wt.prototype.map=function(t,e){return void 0===e&&(e=1),this._map(t,e,!0)},Wt.prototype._map=function(t,e,r){for(var n=0,o=this.inverted?2:1,i=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var a=this.ranges[s]-(this.inverted?n:0);if(a>t)break;var c=this.ranges[s+o],l=this.ranges[s+i],p=a+c;if(t<=p){var u=a+n+((c?t==a?-1:t==p?1:e:e)<0?0:l);return r?u:new Jt(u,e<0?t!=a:t!=p,t==(e<0?a:p)?null:s/3+(t-a)*Ut)}n+=l-c}return r?t+n:new Jt(t+n)},Wt.prototype.touches=function(t,e){for(var r=0,n=Ht(e),o=this.inverted?2:1,i=this.inverted?1:2,s=0;s<this.ranges.length;s+=3){var a=this.ranges[s]-(this.inverted?r:0);if(a>t)break;var c=this.ranges[s+o];if(t<=a+c&&s==3*n)return!0;r+=this.ranges[s+i]-c}return!1},Wt.prototype.forEach=function(t){for(var e=this.inverted?2:1,r=this.inverted?1:2,n=0,o=0;n<this.ranges.length;n+=3){var i=this.ranges[n],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),c=this.ranges[n+e],l=this.ranges[n+r];t(s,s+c,a,a+l),o+=l-c}},Wt.prototype.invert=function(){return new Wt(this.ranges,!this.inverted)},Wt.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},Wt.offset=function(t){return 0==t?Wt.empty:new Wt(t<0?[0,-t,0]:[0,0,t])},Wt.empty=new Wt([]);var Zt=function(t,e,r,n){this.maps=t||[],this.from=r||0,this.to=null==n?this.maps.length:n,this.mirror=e};function Gt(t){var e=Error.call(this,t);return e.__proto__=Gt.prototype,e}Zt.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.maps.length),new Zt(this.maps,this.mirror,t,e)},Zt.prototype.copy=function(){return new Zt(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},Zt.prototype.appendMap=function(t,e){this.to=this.maps.push(t),null!=e&&this.setMirror(this.maps.length-1,e)},Zt.prototype.appendMapping=function(t){for(var e=0,r=this.maps.length;e<t.maps.length;e++){var n=t.getMirror(e);this.appendMap(t.maps[e],null!=n&&n<e?r+n:null)}},Zt.prototype.getMirror=function(t){if(this.mirror)for(var e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]},Zt.prototype.setMirror=function(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)},Zt.prototype.appendMappingInverted=function(t){for(var e=t.maps.length-1,r=this.maps.length+t.maps.length;e>=0;e--){var n=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=n&&n>e?r-n-1:null)}},Zt.prototype.invert=function(){var t=new Zt;return t.appendMappingInverted(this),t},Zt.prototype.map=function(t,e){if(void 0===e&&(e=1),this.mirror)return this._map(t,e,!0);for(var r=this.from;r<this.to;r++)t=this.maps[r].map(t,e);return t},Zt.prototype.mapResult=function(t,e){return void 0===e&&(e=1),this._map(t,e,!1)},Zt.prototype._map=function(t,e,r){for(var n=!1,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(t,e);if(null!=i.recover){var s=this.getMirror(o);if(null!=s&&s>o&&s<this.to){o=s,t=this.maps[s].recover(i.recover);continue}}i.deleted&&(n=!0),t=i.pos}return r?t:new Jt(t,n)},Gt.prototype=Object.create(Error.prototype),Gt.prototype.constructor=Gt,Gt.prototype.name="TransformError";var Kt=function(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Zt},Yt={before:{configurable:!0},docChanged:{configurable:!0}};function Qt(){throw new Error("Override me")}Yt.before.get=function(){return this.docs.length?this.docs[0]:this.doc},Kt.prototype.step=function(t){var e=this.maybeStep(t);if(e.failed)throw new Gt(e.failed);return this},Kt.prototype.maybeStep=function(t){var e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e},Yt.docChanged.get=function(){return this.steps.length>0},Kt.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(Kt.prototype,Yt);var Xt=Object.create(null),te=function(){};te.prototype.apply=function(t){return Qt()},te.prototype.getMap=function(){return Wt.empty},te.prototype.invert=function(t){return Qt()},te.prototype.map=function(t){return Qt()},te.prototype.merge=function(t){return null},te.prototype.toJSON=function(){return Qt()},te.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var r=Xt[e.stepType];if(!r)throw new RangeError("No step type "+e.stepType+" defined");return r.fromJSON(t,e)},te.jsonID=function(t,e){if(t in Xt)throw new RangeError("Duplicate use of step JSON ID "+t);return Xt[t]=e,e.prototype.jsonID=t,e};var ee=function(t,e){this.doc=t,this.failed=e};ee.ok=function(t){return new ee(t,null)},ee.fail=function(t){return new ee(null,t)},ee.fromReplace=function(t,e,r,n){try{return ee.ok(t.replace(e,r,n))}catch(t){if(t instanceof R)return ee.fail(t.message);throw t}};var re=function(t){function e(e,r,n,o){t.call(this),this.from=e,this.to=r,this.slice=n,this.structure=!!o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){return this.structure&&oe(t,this.from,this.to)?ee.fail("Structure replace would overwrite content"):ee.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new Wt([this.from,this.to-this.from,this.slice.size])},e.prototype.invert=function(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))},e.prototype.map=function(t){var r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted?null:new e(r.pos,Math.max(r.pos,n.pos),this.slice)},e.prototype.merge=function(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;var r=this.slice.size+t.slice.size==0?L.empty:new L(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,r,this.structure)}var n=this.slice.size+t.slice.size==0?L.empty:new L(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,r){if("number"!=typeof r.from||"number"!=typeof r.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(r.from,r.to,L.fromJSON(t,r.slice),!!r.structure)},e}(te);te.jsonID("replace",re);var ne=function(t){function e(e,r,n,o,i,s,a){t.call(this),this.from=e,this.to=r,this.gapFrom=n,this.gapTo=o,this.slice=i,this.insert=s,this.structure=!!a}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){if(this.structure&&(oe(t,this.from,this.gapFrom)||oe(t,this.gapTo,this.to)))return ee.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return ee.fail("Gap is not a flat range");var r=this.slice.insertAt(this.insert,e.content);return r?ee.fromReplace(t,this.from,this.to,r):ee.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new Wt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},e.prototype.invert=function(t){var r=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+r,this.from+this.insert,this.from+this.insert+r,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},e.prototype.map=function(t){var r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),o=t.map(this.gapFrom,-1),i=t.map(this.gapTo,1);return r.deleted&&n.deleted||o<r.pos||i>n.pos?null:new e(r.pos,n.pos,o,i,this.slice,this.insert,this.structure)},e.prototype.toJSON=function(){var t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t},e.fromJSON=function(t,r){if("number"!=typeof r.from||"number"!=typeof r.to||"number"!=typeof r.gapFrom||"number"!=typeof r.gapTo||"number"!=typeof r.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(r.from,r.to,r.gapFrom,r.gapTo,L.fromJSON(t,r.slice),r.insert,!!r.structure)},e}(te);function oe(t,e,r){for(var n=t.resolve(e),o=r-e,i=n.depth;o>0&&i>0&&n.indexAfter(i)==n.node(i).childCount;)i--,o--;if(o>0)for(var s=n.node(i).maybeChild(n.indexAfter(i));o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}return!1}function ie(t,e,r){return(0==e||t.canReplace(e,t.childCount))&&(r==t.childCount||t.canReplace(0,r))}function se(t){for(var e=t.parent.content.cutByIndex(t.startIndex,t.endIndex),r=t.depth;;--r){var n=t.$from.node(r),o=t.$from.index(r),i=t.$to.indexAfter(r);if(r<t.depth&&n.canReplace(o,i,e))return r;if(0==r||n.type.spec.isolating||!ie(n,o,i))break}}function ae(t,e,r,n){void 0===n&&(n=t);var o=function(t,e){var r=t.parent,n=t.startIndex,o=t.endIndex,i=r.contentMatchAt(n).findWrapping(e);if(!i)return null;var s=i.length?i[0]:e;return r.canReplaceWith(n,o,s)?i:null}(t,e),i=o&&function(t,e){var r=t.parent,n=t.startIndex,o=t.endIndex,i=r.child(n),s=e.contentMatch.findWrapping(i.type);if(!s)return null;for(var a=(s.length?s[s.length-1]:e).contentMatch,c=n;a&&c<o;c++)a=a.matchType(r.child(c).type);return a&&a.validEnd?s:null}(n,e);return i?o.map(ce).concat({type:e,attrs:r}).concat(i.map(ce)):null}function ce(t){return{type:t,attrs:null}}function le(t,e,r,n){void 0===r&&(r=1);var o=t.resolve(e),i=o.depth-r,s=n&&n[n.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var a=o.depth-1,c=r-2;a>i;a--,c--){var l=o.node(a),p=o.index(a);if(l.type.spec.isolating)return!1;var u=l.content.cutByIndex(p,l.childCount),h=n&&n[c]||l;if(h!=l&&(u=u.replaceChild(0,h.type.create(h.attrs))),!l.canReplace(p+1,l.childCount)||!h.type.validContent(u))return!1}var f=o.indexAfter(i),d=n&&n[0];
443return o.node(i).canReplaceWith(f,f,d?d.type:o.node(i+1).type)}function pe(t,e){var r,n,o=t.resolve(e),i=o.index();return r=o.nodeBefore,n=o.nodeAfter,r&&n&&!r.isLeaf&&r.canAppend(n)&&o.parent.canReplace(i,i+1)}function ue(t,e,r){var n=t.resolve(e);if(!r.content.size)return e;for(var o=r.content,i=0;i<r.openStart;i++)o=o.firstChild.content;for(var s=1;s<=(0==r.openStart&&r.size?2:1);s++)for(var a=n.depth;a>=0;a--){var c=a==n.depth?0:n.pos<=(n.start(a+1)+n.end(a+1))/2?-1:1,l=n.index(a)+(c>0?1:0),p=n.node(a),u=!1;if(1==s)u=p.canReplace(l,l,o);else{var h=p.contentMatchAt(l).findWrapping(o.firstChild.type);u=h&&p.canReplaceWith(l,l,h[0])}if(u)return 0==c?n.pos:c<0?n.before(a+1):n.after(a+1)}return null}function he(t,e,r){for(var n=[],o=0;o<t.childCount;o++){var i=t.child(o);i.content.size&&(i=i.copy(he(i.content,e,i))),i.isInline&&(i=e(i,r,o)),n.push(i)}return T.fromArray(n)}te.jsonID("replaceAround",ne),Kt.prototype.lift=function(t,e){for(var r=t.$from,n=t.$to,o=t.depth,i=r.before(o+1),s=n.after(o+1),a=i,c=s,l=T.empty,p=0,u=o,h=!1;u>e;u--)h||r.index(u)>0?(h=!0,l=T.from(r.node(u).copy(l)),p++):a--;for(var f=T.empty,d=0,m=o,g=!1;m>e;m--)g||n.after(m+1)<n.end(m)?(g=!0,f=T.from(n.node(m).copy(f)),d++):c++;return this.step(new ne(a,c,i,s,new L(l.append(f),p,d),l.size-p,!0))},Kt.prototype.wrap=function(t,e){for(var r=T.empty,n=e.length-1;n>=0;n--){if(r.size){var o=e[n].type.contentMatch.matchFragment(r);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=T.from(e[n].type.create(e[n].attrs,r))}var i=t.start,s=t.end;return this.step(new ne(i,s,i,s,new L(r,0,0),e.length,!0))},Kt.prototype.setBlockType=function(t,e,r,n){var o=this;if(void 0===e&&(e=t),!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=this.steps.length;return this.doc.nodesBetween(t,e,(function(t,e){if(t.isTextblock&&!t.hasMarkup(r,n)&&function(t,e,r){var n=t.resolve(e),o=n.index();return n.parent.canReplaceWith(o,o+1,r)}(o.doc,o.mapping.slice(i).map(e),r)){o.clearIncompatible(o.mapping.slice(i).map(e,1),r);var s=o.mapping.slice(i),a=s.map(e,1),c=s.map(e+t.nodeSize,1);return o.step(new ne(a,c,a+1,c-1,new L(T.from(r.create(n,null,t.marks)),0,0),1,!0)),!1}})),this},Kt.prototype.setNodeMarkup=function(t,e,r,n){var o=this.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");e||(e=o.type);var i=e.create(r,null,n||o.marks);if(o.isLeaf)return this.replaceWith(t,t+o.nodeSize,i);if(!e.validContent(o.content))throw new RangeError("Invalid content for node type "+e.name);return this.step(new ne(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new L(T.from(i),0,0),1,!0))},Kt.prototype.split=function(t,e,r){void 0===e&&(e=1);for(var n=this.doc.resolve(t),o=T.empty,i=T.empty,s=n.depth,a=n.depth-e,c=e-1;s>a;s--,c--){o=T.from(n.node(s).copy(o));var l=r&&r[c];i=T.from(l?l.type.create(l.attrs,i):n.node(s).copy(i))}return this.step(new re(t,t,new L(o.append(i),e,e),!0))},Kt.prototype.join=function(t,e){void 0===e&&(e=1);var r=new re(t-e,t+e,L.empty,!0);return this.step(r)};var fe=function(t){function e(e,r,n){t.call(this),this.from=e,this.to=r,this.mark=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,r=t.slice(this.from,this.to),n=t.resolve(this.from),o=n.node(n.sharedDepth(this.to)),i=new L(he(r.content,(function(t,r){return t.isAtom&&r.type.allowsMarkType(e.mark.type)?t.mark(e.mark.addToSet(t.marks)):t}),o),r.openStart,r.openEnd);return ee.fromReplace(t,this.from,this.to,i)},e.prototype.invert=function(){return new de(this.from,this.to,this.mark)},e.prototype.map=function(t){var r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new e(r.pos,n.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,r){if("number"!=typeof r.from||"number"!=typeof r.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(r.from,r.to,t.markFromJSON(r.mark))},e}(te);te.jsonID("addMark",fe);var de=function(t){function e(e,r,n){t.call(this),this.from=e,this.to=r,this.mark=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.apply=function(t){var e=this,r=t.slice(this.from,this.to),n=new L(he(r.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),r.openStart,r.openEnd);return ee.fromReplace(t,this.from,this.to,n)},e.prototype.invert=function(){return new fe(this.from,this.to,this.mark)},e.prototype.map=function(t){var r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new e(r.pos,n.pos,this.mark)},e.prototype.merge=function(t){if(t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from)return new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark)},e.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},e.fromJSON=function(t,r){if("number"!=typeof r.from||"number"!=typeof r.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(r.from,r.to,t.markFromJSON(r.mark))},e}(te);function me(t,e,r,n){if(void 0===r&&(r=e),void 0===n&&(n=L.empty),e==r&&!n.size)return null;var o=t.resolve(e),i=t.resolve(r);return ge(o,i,n)?new re(e,r,n):new ve(o,i,n).fit()}function ge(t,e,r){return!r.openStart&&!r.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),r.content)}te.jsonID("removeMark",de),Kt.prototype.addMark=function(t,e,r){var n=this,o=[],i=[],s=null,a=null;return this.doc.nodesBetween(t,e,(function(n,c,l){if(n.isInline){var p=n.marks;if(!r.isInSet(p)&&l.type.allowsMarkType(r.type)){for(var u=Math.max(c,t),h=Math.min(c+n.nodeSize,e),f=r.addToSet(p),d=0;d<p.length;d++)p[d].isInSet(f)||(s&&s.to==u&&s.mark.eq(p[d])?s.to=h:o.push(s=new de(u,h,p[d])));a&&a.to==u?a.to=h:i.push(a=new fe(u,h,r))}}})),o.forEach((function(t){return n.step(t)}
443)),i.forEach((function(t){return n.step(t)})),this},Kt.prototype.removeMark=function(t,e,r){var n=this;void 0===r&&(r=null);var o=[],i=0;return this.doc.nodesBetween(t,e,(function(n,s){if(n.isInline){i++;var a=null;if(r instanceof Mt)for(var c,l=n.marks;c=r.isInSet(l);)(a||(a=[])).push(c),l=c.removeFromSet(l);else r?r.isInSet(n.marks)&&(a=[r]):a=n.marks;if(a&&a.length)for(var p=Math.min(s+n.nodeSize,e),u=0;u<a.length;u++){for(var h=a[u],f=void 0,d=0;d<o.length;d++){var m=o[d];m.step==i-1&&h.eq(o[d].style)&&(f=m)}f?(f.to=p,f.step=i):o.push({style:h,from:Math.max(s,t),to:p,step:i})}}})),o.forEach((function(t){return n.step(new de(t.from,t.to,t.style))})),this},Kt.prototype.clearIncompatible=function(t,e,r){void 0===r&&(r=e.contentMatch);for(var n=this.doc.nodeAt(t),o=[],i=t+1,s=0;s<n.childCount;s++){var a=n.child(s),c=i+a.nodeSize,l=r.matchType(a.type,a.attrs);if(l){r=l;for(var p=0;p<a.marks.length;p++)e.allowsMarkType(a.marks[p].type)||this.step(new de(i,c,a.marks[p]))}else o.push(new re(i,c,L.empty));i=c}if(!r.validEnd){var u=r.fillBefore(T.empty,!0);this.replace(i,i,new L(u,0,0))}for(var h=o.length-1;h>=0;h--)this.step(o[h]);return this},Kt.prototype.replace=function(t,e,r){void 0===e&&(e=t),void 0===r&&(r=L.empty);var n=me(this.doc,t,e,r);return n&&this.step(n),this},Kt.prototype.replaceWith=function(t,e,r){return this.replace(t,e,new L(T.from(r),0,0))},Kt.prototype.delete=function(t,e){return this.replace(t,e,L.empty)},Kt.prototype.insert=function(t,e){return this.replaceWith(t,t,e)};var ve=function(t,e,r){this.$to=e,this.$from=t,this.unplaced=r,this.frontier=[];for(var n=0;n<=t.depth;n++){var o=t.node(n);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(n))})}this.placed=T.empty;for(var i=t.depth;i>0;i--)this.placed=T.from(t.node(i).copy(this.placed))},ye={depth:{configurable:!0}};function ke(t,e,r){return 0==e?t.cutByIndex(r):t.replaceChild(0,t.firstChild.copy(ke(t.firstChild.content,e-1,r)))}function be(t,e,r){return 0==e?t.append(r):t.replaceChild(t.childCount-1,t.lastChild.copy(be(t.lastChild.content,e-1,r)))}function _e(t,e){for(var r=0;r<e;r++)t=t.firstChild.content;return t}function we(t,e,r){if(e<=0)return t;var n=t.content;return e>1&&(n=n.replaceChild(0,we(n.firstChild,e-1,1==n.childCount?r-1:0))),e>0&&(n=t.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(t.type.contentMatch.matchFragment(n).fillBefore(T.empty,!0)))),t.copy(n)}function xe(t,e,r,n,o){var i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!r.compatibleContent(i.type))return null;var a=n.fillBefore(i.content,!0,s);return a&&!function(t,e,r){for(var n=r;n<e.childCount;n++)if(!t.allowsMarks(e.child(n).marks))return!0;return!1}(r,i.content,s)?a:null}function Ce(t,e,r,n,o){if(e<r){var i=t.firstChild;t=t.replaceChild(0,i.copy(Ce(i.content,e+1,r,n,i)))}if(e>n){var s=o.contentMatchAt(0),a=s.fillBefore(t).append(t);t=a.append(s.matchFragment(a).fillBefore(T.empty,!0))}return t}function Se(t,e){for(var r=[],n=Math.min(t.depth,e.depth);n>=0;n--){var o=t.start(n);if(o<t.pos-(t.depth-n)||e.end(n)>e.pos+(e.depth-n)||t.node(n).type.spec.isolating||e.node(n).type.spec.isolating)break;(o==e.start(n)||n==t.depth&&n==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&n&&e.start(n-1)==o-1)&&r.push(n)}return r}ye.depth.get=function(){return this.frontier.length-1},ve.prototype.fit=function(){for(;this.unplaced.size;){var t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}var e=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,o=this.close(e<0?this.$to:n.doc.resolve(e));if(!o)return null;for(var i=this.placed,s=n.depth,a=o.depth;s&&a&&1==i.childCount;)i=i.firstChild.content,s--,a--;var c=new L(i,s,a);return e>-1?new ne(n.pos,e,this.$to.pos,this.$to.end(),c,r):c.size||n.pos!=this.$to.pos?new re(n.pos,o.pos,c):void 0},ve.prototype.findFittable=function(){for(var t=1;t<=2;t++)for(var e=this.unplaced.openStart;e>=0;e--)for(var r=void 0,n=(e?(r=_e(this.unplaced.content,e-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var i=this.frontier[o],s=i.type,a=i.match,c=void 0,l=void 0;if(1==t&&(n?a.matchType(n.type)||(l=a.fillBefore(T.from(n),!1)):s.compatibleContent(r.type)))return{sliceDepth:e,frontierDepth:o,parent:r,inject:l};if(2==t&&n&&(c=a.findWrapping(n.type)))return{sliceDepth:e,frontierDepth:o,parent:r,wrap:c};if(r&&a.matchType(r.type))break}},ve.prototype.openMore=function(){var t=this.unplaced,e=t.content,r=t.openStart,n=t.openEnd,o=_e(e,r);return!(!o.childCount||o.firstChild.isLeaf||(this.unplaced=new L(e,r+1,Math.max(n,o.size+r>=e.size-n?r+1:0)),0))},ve.prototype.dropNode=function(){var t=this.unplaced,e=t.content,r=t.openStart,n=t.openEnd,o=_e(e,r);if(o.childCount<=1&&r>0){var i=e.size-r<=r+o.size;this.unplaced=new L(ke(e,r-1,1),r-1,i?r-1:n)}else this.unplaced=new L(ke(e,r,1),r,n)},ve.prototype.placeNodes=function(t){for(var e=t.sliceDepth,r=t.frontierDepth,n=t.parent,o=t.inject,i=t.wrap;this.depth>r;)this.closeFrontierNode();if(i)for(var s=0;s<i.length;s++)this.openFrontierNode(i[s]);var a=this.unplaced,c=n?n.content:a.content,l=a.openStart-e,p=0,u=[],h=this.frontier[r],f=h.match,d=h.type;if(o){for(var m=0;m<o.childCount;m++)u.push(o.child(m));f=f.matchFragment(o)}for(var g=c.size+e-(a.content.size-a.openEnd);p<c.childCount;){var v=c.child(p),y=f.matchType(v.type);if(!y)break;(++p>1||0==l||v.content.size)&&(f=y,u.push(we(v.mark(d.allowedMarks(v.marks)),1==p?l:0,p==c.childCount?g:-1)))}var k=p==c.childCount;k||(g=-1),this.placed=be(this.placed,r,T.from(u)),this.frontier[r].match=f,k&&g<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var b=0,_=c;b<g;b++){var w=_.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),_=w.content}this.unplaced=k?0==e?L.empty:new L(ke(a.content,e-1,1),e-1,g<0?a.openEnd:e-1):new L(ke(a.content,e,p),a.openStart,a.openEnd)},ve.prototype.mustMoveInline=function(){if(!this.$to.parent.isTextblock||this.$to.end()==this.$to.pos)return-1;var t,e=this.frontier[this.depth];if(!e.type.isTextblock||!xe(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;for(var r=this.$to.depth,n=this.$to.after(r);r>1&&n==this.$to.end(--r);)++n;return n},ve.prototype.findCloseLevel=function(t){t:for(var e=Math.min(this.depth,t.depth);e>=0;e--){var r=this.frontier[e],n=r.match,o=r.type,i=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),s=xe(t,e,o,n,i);if(s){for(var a=e-1;a>=0;a--){var c=this.frontier[a],l=c.match,p=xe(t,a,c.type,l,!0);if(!p||p.childCount)continue t}return{depth:e,fit:s,move:i?t.doc.resolve(t.after(e+1)):t}}}},ve.prototype.close=function(t){var e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=be(this.placed,e.depth,e.fit)),t=e.move;for(var r=e.depth+1;r<=t.depth;r++){var n=t.node(r),o=n.type.contentMatch.fillBefore(n.content,!0,t.index(r));this.openFrontierNode(n.type,n.attrs,o)}return t},ve.prototype.openFrontierNode=function(t,e,r){var n=this.frontier[this.depth];n.match=n.match.matchType(t),this.placed=be(this.placed,this.depth,T.from(t.create(e,r))),this.frontier.push({type:t,match:t.contentMatch})},ve.prototype.closeFrontierNode=function(){var t=this.frontier.pop().match.fillBefore(T.empty,!0);t.childCount&&(this.placed=be(this.placed,this.frontier.length,t))},Object.defineProperties(ve.prototype,ye),Kt.prototype.replaceRange=function(t,e,r){if(!r.size)return this.deleteRange(t,e);var n=this.doc.resolve(t),o=this.doc.resolve(e);if(ge(n,o,r))return this.step(new re(t,e,r));var i=Se(n,this.doc.resolve(e));0==i[i.length-1]&&i.pop();var s=-(n.depth+1);i.unshift(s);for(var a=n.depth,c=n.pos-1;a>0;a--,c--){var l=n.node(a).type.spec;if(l.defining||l.isolating)break;
443i.indexOf(a)>-1?s=a:n.before(a)==c&&i.splice(1,0,-a)}for(var p=i.indexOf(s),u=[],h=r.openStart,f=r.content,d=0;;d++){var m=f.firstChild;if(u.push(m),d==r.openStart)break;f=m.content}h>0&&u[h-1].type.spec.defining&&n.node(p).type!=u[h-1].type?h-=1:h>=2&&u[h-1].isTextblock&&u[h-2].type.spec.defining&&n.node(p).type!=u[h-2].type&&(h-=2);for(var g=r.openStart;g>=0;g--){var v=(g+h+1)%(r.openStart+1),y=u[v];if(y)for(var k=0;k<i.length;k++){var b=i[(k+p)%i.length],_=!0;b<0&&(_=!1,b=-b);var w=n.node(b-1),x=n.index(b-1);if(w.canReplaceWith(x,x,y.type,y.marks))return this.replace(n.before(b),_?o.after(b):e,new L(Ce(r.content,0,r.openStart,v),v,r.openEnd))}}for(var C=this.steps.length,S=i.length-1;S>=0&&(this.replace(t,e,r),!(this.steps.length>C));S--){var A=i[S];A<0||(t=n.before(A),e=o.after(A))}return this},Kt.prototype.replaceRangeWith=function(t,e,r){if(!r.isInline&&t==e&&this.doc.resolve(t).parent.content.size){var n=function(t,e,r){var n=t.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),r))return e;if(0==n.parentOffset)for(var o=n.depth-1;o>=0;o--){var i=n.index(o);if(n.node(o).canReplaceWith(i,i,r))return n.before(o+1);if(i>0)return null}if(n.parentOffset==n.parent.content.size)for(var s=n.depth-1;s>=0;s--){var a=n.indexAfter(s);if(n.node(s).canReplaceWith(a,a,r))return n.after(s+1);if(a<n.node(s).childCount)return null}}(this.doc,t,r.type);null!=n&&(t=e=n)}return this.replaceRange(t,e,new L(T.from(r),0,0))},Kt.prototype.deleteRange=function(t,e){for(var r=this.doc.resolve(t),n=this.doc.resolve(e),o=Se(r,n),i=0;i<o.length;i++){var s=o[i],a=i==o.length-1;if(a&&0==s||r.node(s).type.contentMatch.validEnd)return this.delete(r.start(s),n.end(s));if(s>0&&(a||r.node(s-1).canReplace(r.index(s-1),n.indexAfter(s-1))))return this.delete(r.before(s),n.after(s))}for(var c=1;c<=r.depth&&c<=n.depth;c++)if(t-r.start(c)==r.depth-c&&e>r.end(c)&&n.end(c)-e!=n.depth-c)return this.delete(r.before(c),e);return this.delete(t,e)};var Ae=Object.create(null),Me=function(t,e,r){this.ranges=r||[new Ee(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},De={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};De.anchor.get=function(){return this.$anchor.pos},De.head.get=function(){return this.$head.pos},De.from.get=function(){return this.$from.pos},De.to.get=function(){return this.$to.pos},De.$from.get=function(){return this.ranges[0].$from},De.$to.get=function(){return this.ranges[0].$to},De.empty.get=function(){for(var t=this.ranges,e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0},Me.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},Me.prototype.replace=function(t,e){void 0===e&&(e=L.empty);for(var r=e.content.lastChild,n=null,o=0;o<e.openEnd;o++)n=r,r=r.lastChild;for(var i=t.steps.length,s=this.ranges,a=0;a<s.length;a++){var c=s[a],l=c.$from,p=c.$to,u=t.mapping.slice(i);t.replaceRange(u.map(l.pos),u.map(p.pos),a?L.empty:e),0==a&&Le(t,i,(r?r.isInline:n&&n.isTextblock)?-1:1)}},Me.prototype.replaceWith=function(t,e){for(var r=t.steps.length,n=this.ranges,o=0;o<n.length;o++){var i=n[o],s=i.$from,a=i.$to,c=t.mapping.slice(r),l=c.map(s.pos),p=c.map(a.pos);o?t.deleteRange(l,p):(t.replaceRangeWith(l,p,e),Le(t,r,e.isInline?-1:1))}},Me.findFrom=function(t,e,r){var n=t.parent.inlineContent?new Te(t):Re(t.node(0),t.parent,t.pos,t.index(),e,r);if(n)return n;for(var o=t.depth-1;o>=0;o--){var i=e<0?Re(t.node(0),t.node(o),t.before(o+1),t.index(o),e,r):Re(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,r);if(i)return i}},Me.near=function(t,e){return void 0===e&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new ze(t.node(0))},Me.atStart=function(t){return Re(t,t,0,0,1)||new ze(t)},Me.atEnd=function(t){return Re(t,t,t.content.size,t.childCount,-1)||new ze(t)},Me.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var r=Ae[e.type];if(!r)throw new RangeError("No selection type "+e.type+" defined");return r.fromJSON(t,e)},Me.jsonID=function(t,e){if(t in Ae)throw new RangeError("Duplicate use of selection JSON ID "+t);return Ae[t]=e,e.prototype.jsonID=t,e},Me.prototype.getBookmark=function(){return Te.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(Me.prototype,De),Me.prototype.visible=!0;var Ee=function(t,e){this.$from=t,this.$to=e},Te=function(t){function e(e,r){void 0===r&&(r=e),t.call(this,e,r)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={$cursor:{configurable:!0}};return r.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},e.prototype.map=function(r,n){var o=r.resolve(n.map(this.head));if(!o.parent.inlineContent)return t.near(o);var i=r.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:o,o)},e.prototype.replace=function(e,r){if(void 0===r&&(r=L.empty),t.prototype.replace.call(this,e,r),r==L.empty){var n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head},e.prototype.getBookmark=function(){return new Oe(this.anchor,this.head)},e.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},e.fromJSON=function(t,r){if("number"!=typeof r.anchor||"number"!=typeof r.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(r.anchor),t.resolve(r.head))},e.create=function(t,e,r){void 0===r&&(r=e);var n=t.resolve(e);return new this(n,r==e?n:t.resolve(r))},e.between=function(r,n,o){var i=r.pos-n.pos;if(o&&!i||(o=i>=0?1:-1),!n.parent.inlineContent){var s=t.findFrom(n,o,!0)||t.findFrom(n,-o,!0);if(!s)return t.near(n,o);n=s.$head}return r.parent.inlineContent||(0==i||(r=(t.findFrom(r,-o,!0)||t.findFrom(r,o,!0)).$anchor).pos<n.pos!=i<0)&&(r=n),new e(r,n)},Object.defineProperties(e.prototype,r),e}(Me);Me.jsonID("text",Te);var Oe=function(t,e){this.anchor=t,this.head=e};Oe.prototype.map=function(t){return new Oe(t.map(this.anchor),t.map(this.head))},Oe.prototype.resolve=function(t){return Te.between(t.resolve(this.anchor),t.resolve(this.head))};var Ne=function(t){function e(e){var r=e.nodeAfter,n=e.node(0).resolve(e.pos+r.nodeSize);t.call(this,e,n),this.node=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(r,n){var o=n.mapResult(this.anchor),i=o.deleted,s=o.pos,a=r.resolve(s);return i?t.near(a):new e(a)},e.prototype.content=function(){return new L(T.from(this.node),0,0)},e.prototype.eq=function(t){return t instanceof e&&t.anchor==this.anchor},e.prototype.toJSON=function(){return{type:"node",anchor:this.anchor}},e.prototype.getBookmark=function(){return new qe(this.anchor)},e.fromJSON=function(t,r){if("number"!=typeof r.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new e(t.resolve(r.anchor))},e.create=function(t,e){return new this(t.resolve(e))},e.isSelectable=function(t){return!t.isText&&!1!==t.type.spec.selectable},e}(Me);Ne.prototype.visible=!1,Me.jsonID("node",Ne);var qe=function(t){this.anchor=t};qe.prototype.map=function(t){var e=t.mapResult(this.anchor),r=e.deleted,n=e.pos;return r?new Oe(n,n):new qe(n)},qe.prototype.resolve=function(t){var e=t.resolve(this.anchor),r=e.nodeAfter;return r&&Ne.isSelectable(r)?new Ne(e):Me.near(e)};var ze=function(t){function e(e){t.call(this,e.resolve(0),e.resolve(e.content.size))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.replace=function(e,r){if(void 0===r&&(r=L.empty),r
443==L.empty){e.delete(0,e.doc.content.size);var n=t.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else t.prototype.replace.call(this,e,r)},e.prototype.toJSON=function(){return{type:"all"}},e.fromJSON=function(t){return new e(t)},e.prototype.map=function(t){return new e(t)},e.prototype.eq=function(t){return t instanceof e},e.prototype.getBookmark=function(){return Ie},e}(Me);Me.jsonID("all",ze);var Ie={map:function(){return this},resolve:function(t){return new ze(t)}};function Re(t,e,r,n,o,i){if(e.inlineContent)return Te.create(t,r);for(var s=n-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){var a=e.child(s);if(a.isAtom){if(!i&&Ne.isSelectable(a))return Ne.create(t,r-(o<0?a.nodeSize:0))}else{var c=Re(t,a,r+o,o<0?a.childCount:0,o,i);if(c)return c}r+=a.nodeSize*o}}function Le(t,e,r){var n=t.steps.length-1;if(!(n<e)){var o,i=t.steps[n];(i instanceof re||i instanceof ne)&&(t.mapping.maps[n].forEach((function(t,e,r,n){null==o&&(o=n)})),t.setSelection(Me.near(t.doc.resolve(o),r)))}}var Be=function(t){function e(e){t.call(this,e.doc),this.time=Date.now(),this.curSelection=e.selection,this.curSelectionFor=0,this.storedMarks=e.storedMarks,this.updated=0,this.meta=Object.create(null)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={selection:{configurable:!0},selectionSet:{configurable:!0},storedMarksSet:{configurable:!0},isGeneric:{configurable:!0},scrolledIntoView:{configurable:!0}};return r.selection.get=function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection},e.prototype.setSelection=function(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this},r.selectionSet.get=function(){return(1&this.updated)>0},e.prototype.setStoredMarks=function(t){return this.storedMarks=t,this.updated|=2,this},e.prototype.ensureMarks=function(t){return I.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this},e.prototype.addStoredMark=function(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))},e.prototype.removeStoredMark=function(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))},r.storedMarksSet.get=function(){return(2&this.updated)>0},e.prototype.addStep=function(e,r){t.prototype.addStep.call(this,e,r),this.updated=-3&this.updated,this.storedMarks=null},e.prototype.setTime=function(t){return this.time=t,this},e.prototype.replaceSelection=function(t){return this.selection.replace(this,t),this},e.prototype.replaceSelectionWith=function(t,e){var r=this.selection;return!1!==e&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||I.none))),r.replaceWith(this,t),this},e.prototype.deleteSelection=function(){return this.selection.replace(this),this},e.prototype.insertText=function(t,e,r){void 0===r&&(r=e);var n=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(n.text(t),!0):this.deleteSelection();if(!t)return this.deleteRange(e,r);var o=this.storedMarks;if(!o){var i=this.doc.resolve(e);o=r==e?i.marks():i.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(e,r,n.text(t,o)),this.selection.empty||this.setSelection(Me.near(this.selection.$to)),this},e.prototype.setMeta=function(t,e){return this.meta["string"==typeof t?t:t.key]=e,this},e.prototype.getMeta=function(t){return this.meta["string"==typeof t?t:t.key]},r.isGeneric.get=function(){for(var t in this.meta)return!1;return!0},e.prototype.scrollIntoView=function(){return this.updated|=4,this},r.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(e.prototype,r),e}(Kt);function Fe(t,e){return e&&t?t.bind(e):t}var Pe=function(t,e,r){this.name=t,this.init=Fe(e.init,r),this.apply=Fe(e.apply,r)},$e=[new Pe("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new Pe("selection",{init:function(t,e){return t.selection||Me.atStart(e.doc)},apply:function(t){return t.selection}}),new Pe("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,r,n){return n.selection.$cursor?t.storedMarks:null}}),new Pe("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],Ve=function(t,e){var r=this;this.schema=t,this.fields=$e.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),e&&e.forEach((function(t){if(r.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");r.plugins.push(t),r.pluginsByKey[t.key]=t,t.spec.state&&r.fields.push(new Pe
443(t.key,t.spec.state,t))}))},je=function(t){this.config=t},Ue={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};Ue.schema.get=function(){return this.config.schema},Ue.plugins.get=function(){return this.config.plugins},je.prototype.apply=function(t){return this.applyTransaction(t).state},je.prototype.filterTransaction=function(t,e){void 0===e&&(e=-1);for(var r=0;r<this.config.plugins.length;r++)if(r!=e){var n=this.config.plugins[r];if(n.spec.filterTransaction&&!n.spec.filterTransaction.call(n,t,this))return!1}return!0},je.prototype.applyTransaction=function(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};for(var e=[t],r=this.applyInner(t),n=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var s=this.config.plugins[i];if(s.spec.appendTransaction){var a=n?n[i].n:0,c=n?n[i].state:this,l=a<e.length&&s.spec.appendTransaction.call(s,a?e.slice(a):e,c,r);if(l&&r.filterTransaction(l,i)){if(l.setMeta("appendedTransaction",t),!n){n=[];for(var p=0;p<this.config.plugins.length;p++)n.push(p<i?{state:r,n:e.length}:{state:this,n:0})}e.push(l),r=r.applyInner(l),o=!0}n&&(n[i]={state:r,n:e.length})}}if(!o)return{state:r,transactions:e}}},je.prototype.applyInner=function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var e=new je(this.config),r=this.config.fields,n=0;n<r.length;n++){var o=r[n];e[o.name]=o.apply(t,this[o.name],this,e)}for(var i=0;i<He.length;i++)He[i](this,t,e);return e},Ue.tr.get=function(){return new Be(this)},je.create=function(t){for(var e=new Ve(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new je(e),n=0;n<e.fields.length;n++)r[e.fields[n].name]=e.fields[n].init(t,r);return r},je.prototype.reconfigure=function(t){for(var e=new Ve(this.schema,t.plugins),r=e.fields,n=new je(e),o=0;o<r.length;o++){var i=r[o].name;n[i]=this.hasOwnProperty(i)?this[i]:r[o].init(t,n)}return n},je.prototype.toJSON=function(t){var e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map((function(t){return t.toJSON()}))),t&&"object"==typeof t)for(var r in t){if("doc"==r||"selection"==r)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var n=t[r],o=n.spec.state;o&&o.toJSON&&(e[r]=o.toJSON.call(n,this[n.key]))}return e},je.fromJSON=function(t,e,r){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");var n=new Ve(t.schema,t.plugins),o=new je(n);return n.fields.forEach((function(n){if("doc"==n.name)o.doc=it.fromJSON(t.schema,e.doc);else if("selection"==n.name)o.selection=Me.fromJSON(o.doc,e.selection);else if("storedMarks"==n.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(r)for(var i in r){var s=r[i],a=s.spec.state;if(s.key==n.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(e,i))return void(o[n.name]=a.fromJSON.call(s,t,e[i],o))}o[n.name]=n.init(t,o)}})),o},je.addApplyListener=function(t){He.push(t)},je.removeApplyListener=function(t){var e=He.indexOf(t);e>-1&&He.splice(e,1)},Object.defineProperties(je.prototype,Ue);var He=[];function Je(t,e,r){for(var n in t){var o=t[n];o instanceof Function?o=o.bind(e):"handleDOMEvents"==n&&(o=Je(o,e,{})),r[n]=o}return r}var We=function(t){this.props={},t.props&&Je(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:Ge("plugin")};We.prototype.getState=function(t){return t[this.key]};var Ze=Object.create(null);function Ge(t){return t in Ze?t+"$"+ ++Ze[t]:(Ze[t]=0,t+"$")}var Ke=function(t){void 0===t&&(t="key"),this.key=Ge(t)};function Ye(t,e){return!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0)}function Qe(t,e,r){for(;t;t="start"==e?t.firstChild:t.lastChild){if(t.isTextblock)return!0;if(r&&1!=t.childCount)return!1}return!1}function Xe(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function tr(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;
443e--){var r=t.node(e);if(t.index(e)+1<r.childCount)return t.doc.resolve(t.after(e+1));if(r.type.spec.isolating)break}return null}function er(t,e){var r=t.selection,n=r.$head,o=r.$anchor;return!(!n.parent.type.spec.code||!n.sameParent(o)||(e&&e(t.tr.insertText("\n").scrollIntoView()),0))}function rr(t){for(var e=0;e<t.edgeCount;e++){var r=t.edge(e).type;if(r.isTextblock&&!r.hasRequiredAttrs())return r}return null}function nr(t,e){var r=t.selection,n=r.$head,o=r.$anchor;if(!n.parent.type.spec.code||!n.sameParent(o))return!1;var i=n.node(-1),s=n.indexAfter(-1),a=rr(i.contentMatchAt(s));if(!i.canReplaceWith(s,s,a))return!1;if(e){var c=n.after(),l=t.tr.replaceWith(c,c,a.createAndFill());l.setSelection(Me.near(l.doc.resolve(c),1)),e(l.scrollIntoView())}return!0}function or(t,e,r){var n,o,i=e.nodeBefore,s=e.nodeAfter;if(i.type.spec.isolating||s.type.spec.isolating)return!1;if(function(t,e,r){var n=e.nodeBefore,o=e.nodeAfter,i=e.index();return!(!(n&&o&&n.type.compatibleContent(o.type))||(!n.content.size&&e.parent.canReplace(i-1,i)?(r&&r(t.tr.delete(e.pos-n.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(i,i+1)||!o.isTextblock&&!pe(t.doc,e.pos)||(r&&r(t.tr.clearIncompatible(e.pos,n.type,n.contentMatchAt(n.childCount)).join(e.pos).scrollIntoView()),0)))}(t,e,r))return!0;var a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(n=(o=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&o.matchType(n[0]||s.type).validEnd){if(r){for(var c=e.pos+s.nodeSize,l=T.empty,p=n.length-1;p>=0;p--)l=T.from(n[p].create(null,l));l=T.from(i.copy(l));var u=t.tr.step(new ne(e.pos-1,c,e.pos,c,new L(l,1,0),n.length,!0)),h=c+2*n.length;pe(u.doc,h)&&u.join(h),r(u.scrollIntoView())}return!0}var f=Me.findFrom(e,1),d=f&&f.$from.blockRange(f.$to),m=d&&se(d);if(null!=m&&m>=e.depth)return r&&r(t.tr.lift(d,m).scrollIntoView()),!0;if(a&&Qe(s,"start",!0)&&Qe(i,"end")){for(var g=i,v=[];v.push(g),!g.isTextblock;)g=g.lastChild;for(var y=s,k=1;!y.isTextblock;y=y.firstChild)k++;if(g.canReplace(g.childCount,g.childCount,y.content)){if(r){for(var b=T.empty,_=v.length-1;_>=0;_--)b=T.from(v[_].copy(b));r(t.tr.step(new ne(e.pos-v.length,e.pos+s.nodeSize,e.pos+k,e.pos+s.nodeSize-k,new L(b,v.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function ir(t){return function(e,r){for(var n=e.selection,o=t<0?n.$from:n.$to,i=o.depth;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(r&&r(e.tr.setSelection(Te.create(e.doc,t<0?o.start(i):o.end(i)))),!0)}}Ke.prototype.get=function(t){return t.config.pluginsByKey[this.key]},Ke.prototype.getState=function(t){return t[this.key]};var sr=ir(-1),ar=ir(1);function cr(t,e){return function(r,n){var o=r.selection,i=o.$from,s=o.$to,a=i.blockRange(s),c=a&&ae(a,t,e);return!!c&&(n&&n(r.tr.wrap(a,c).scrollIntoView()),!0)}}function lr(t,e){return function(r,n){var o=r.selection,i=o.from,s=o.to,a=!1;return r.doc.nodesBetween(i,s,(function(n,o){if(a)return!1;if(n.isTextblock&&!n.hasMarkup(t,e))if(n.type==t)a=!0;else{var i=r.doc.resolve(o),s=i.index();a=i.parent.canReplaceWith(s,s+1,t)}})),!!a&&(n&&n(r.tr.setBlockType(i,s,t,e).scrollIntoView()),!0)}}function pr(t,e){return function(r,n){var o=r.selection,i=o.empty,s=o.$cursor,a=o.ranges;if(i&&!s||!function(t,e,r){for(var n=function(n){var o=e[n],i=o.$from,s=o.$to,a=0==i.depth&&t.type.allowsMarkType(r);
443if(t.nodesBetween(i.pos,s.pos,(function(t){if(a)return!1;a=t.inlineContent&&t.type.allowsMarkType(r)})),a)return{v:!0}},o=0;o<e.length;o++){var i=n(o);if(i)return i.v}return!1}(r.doc,a,t))return!1;if(n)if(s)t.isInSet(r.storedMarks||s.marks())?n(r.tr.removeStoredMark(t)):n(r.tr.addStoredMark(t.create(e)));else{for(var c=!1,l=r.tr,p=0;!c&&p<a.length;p++){var u=a[p],h=u.$from,f=u.$to;c=r.doc.rangeHasMark(h.pos,f.pos,t)}for(var d=0;d<a.length;d++){var m=a[d],g=m.$from,v=m.$to;if(c)l.removeMark(g.pos,v.pos,t);else{var y=g.pos,k=v.pos,b=g.nodeAfter,_=v.nodeBefore,w=b&&b.isText?/^\s*/.exec(b.text)[0].length:0,x=_&&_.isText?/\s*$/.exec(_.text)[0].length:0;y+w<k&&(y+=w,k-=x),l.addMark(y,k,t.create(e))}}n(l.scrollIntoView())}return!0}}function ur(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function(e,r,n){for(var o=0;o<t.length;o++)if(t[o](e,r,n))return!0;return!1}}var hr=ur(Ye,(function(t,e,r){var n=t.selection.$cursor;if(!n||(r?!r.endOfTextblock("backward",t):n.parentOffset>0))return!1;var o=Xe(n);if(!o){var i=n.blockRange(),s=i&&se(i);return null!=s&&(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)}var a=o.nodeBefore;if(!a.type.spec.isolating&&or(t,o,e))return!0;if(0==n.parent.content.size&&(Qe(a,"end")||Ne.isSelectable(a))){var c=me(t.doc,n.before(),n.after(),L.empty);if(c.slice.size<c.to-c.from){if(e){var l=t.tr.step(c);l.setSelection(Qe(a,"end")?Me.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):Ne.create(l.doc,o.pos-a.nodeSize)),e(l.scrollIntoView())}return!0}}return!(!a.isAtom||o.depth!=n.depth-1||(e&&e(t.tr.delete(o.pos-a.nodeSize,o.pos).scrollIntoView()),0))}),(function(t,e,r){var n=t.selection,o=n.$head,i=o;if(!n.empty)return!1;if(o.parent.isTextblock){if(r?!r.endOfTextblock("backward",t):o.parentOffset>0)return!1;i=Xe(o)}var s=i&&i.nodeBefore;return!(!s||!Ne.isSelectable(s)||(e&&e(t.tr.setSelection(Ne.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),0))})),fr=ur(Ye,(function(t,e,r){var n=t.selection.$cursor;if(!n||(r?!r.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size))return!1;var o=tr(n);if(!o)return!1;var i=o.nodeAfter;if(or(t,o,e))return!0;if(0==n.parent.content.size&&(Qe(i,"start")||Ne.isSelectable(i))){var s=me(t.doc,n.before(),n.after(),L.empty);if(s.slice.size<s.to-s.from){if(e){var a=t.tr.step(s);a.setSelection(Qe(i,"start")?Me.findFrom(a.doc.resolve(a.mapping.map(o.pos)),1):Ne.create(a.doc,a.mapping.map(o.pos))),e(a.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=n.depth-1||(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),0))}),(function(t,e,r){var n=t.selection,o=n.$head,i=o;if(!n.empty)return!1;if(o.parent.isTextblock){if(r?!r.endOfTextblock("forward",t):o.parentOffset<o.parent.content.size)return!1;i=tr(o)}var s=i&&i.nodeAfter;return!(!s||!Ne.isSelectable(s)||(e&&e(t.tr.setSelection(Ne.create(t.doc,i.pos)).scrollIntoView()),0))})),dr={Enter:ur(er,(function(t,e){var r=t.selection,n=r.$from,o=r.$to;if(r instanceof ze||n.parent.inlineContent||o.parent.inlineContent)return!1;var i=rr(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){var s=(!n.parentOffset&&o.index()<o.parent.childCount?n:o).pos,a=t.tr.insert(s,i.createAndFill());a.setSelection(Te.create(a.doc,s+1)),e(a.scrollIntoView())}return!0}),(function(t,e){var r=t.selection.$cursor;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){var n=r.before();if(le(t.doc,n))return e&&e(t.tr.split(n).scrollIntoView()),!0}var o=r.blockRange(),i=o&&se(o);return null!=i&&(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)}),(function(t,e){var r=t.selection,n=r.$from,o=r.$to;if(t.selection instanceof Ne&&t.selection.node.isBlock)return!(!n.parentOffset||!le(t.doc,n.pos)||(e&&e(t.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(e){var i=o.parentOffset==o.parent.content.size,s=t.tr;(t.selection instanceof Te||t.selection instanceof ze)&&s.deleteSelection();var a=0==n.depth?null:rr(n.node(-1).contentMatchAt(n.indexAfter(-1))),c=i&&a?[{type:a}]:null,l=le(s.doc,s.mapping.map(n.pos),1,c);if(c||l||!le(s.doc,s.mapping.map(n.pos),1,a&&[{type:a}])||(c=[{type:a}],l=!0),l&&(s.split(s.mapping.map(n.pos),1,c),!i&&!n.parentOffset&&n.parent.type!=a)){var p=s.mapping.map(n.before()),u=s.doc.resolve(p);n.node(-1).canReplaceWith(u.index(),u.index()+1,a)&&s.setNodeMarkup(s.mapping.map(n.before()),a)}e(s.scrollIntoView())}return!0})),"Mod-Enter":nr,Backspace:hr,"Mod-Backspace":hr,"Shift-Backspace":hr,Delete:fr,"Mod-Delete":fr,"Mod-a":function(t,e){return e&&e(t.tr.setSelection(new ze(t.doc))),!0}},mr={"Ctrl-h":dr.Backspace,"Alt-Backspace":dr["Mod-Backspace"],"Ctrl-d":dr.Delete,"Ctrl-Alt-Backspace":dr["Mod-Delete"],"Alt-Delete":dr["Mod-Delete"],"Alt-d":dr["Mod-Delete"],"Ctrl-a":sr,"Ctrl-e":ar};for(var gr in dr)mr[gr]=dr[gr];dr.Home=sr,dr.End=ar;var vr=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?mr:dr;function yr(t,e){return function(r,n){var o=r.selection,i=o.$from,s=o.$to,a=i.blockRange(s),c=!1,l=a;if(!a)return!1;if(a.depth>=2&&i.node(a.depth-1).type.compatibleContent(t)&&0==a.startIndex){
443if(0==i.index(a.depth-1))return!1;var p=r.doc.resolve(a.start-2);l=new rt(p,p,a.depth),a.endIndex<a.parent.childCount&&(a=new rt(i,r.doc.resolve(s.end(a.depth)),a.depth)),c=!0}var u=ae(l,t,e,a);return!!u&&(n&&n(function(t,e,r,n,o){for(var i=T.empty,s=r.length-1;s>=0;s--)i=T.from(r[s].type.create(r[s].attrs,i));t.step(new ne(e.start-(n?2:0),e.end,e.start,e.end,new L(i,0,0),r.length,!0));for(var a=0,c=0;c<r.length;c++)r[c].type==o&&(a=c+1);for(var l=r.length-a,p=e.start+r.length-(n?2:0),u=e.parent,h=e.startIndex,f=e.endIndex,d=!0;h<f;h++,d=!1)!d&&le(t.doc,p,l)&&(t.split(p,l),p+=2*l),p+=u.child(h).nodeSize;return t}(r.tr,a,u,c,t).scrollIntoView()),!0)}}function kr(t){return function(e,r){var n=e.selection,o=n.$from,i=n.$to,s=n.node;if(s&&s.isBlock||o.depth<2||!o.sameParent(i))return!1;var a=o.node(-1);if(a.type!=t)return!1;if(0==o.parent.content.size&&o.node(-1).childCount==o.indexAfter(-1)){if(2==o.depth||o.node(-3).type!=t||o.index(-2)!=o.node(-2).childCount-1)return!1;if(r){for(var c=T.empty,l=o.index(-1)?1:o.index(-2)?2:3,p=o.depth-l;p>=o.depth-3;p--)c=T.from(o.node(p).copy(c));var u=o.indexAfter(-1)<o.node(-2).childCount?1:o.indexAfter(-2)<o.node(-3).childCount?2:3;c=c.append(T.from(t.createAndFill()));var h=o.before(o.depth-(l-1)),f=e.tr.replace(h,o.after(-u),new L(c,4-l,0)),d=-1;f.doc.nodesBetween(h,f.doc.content.size,(function(t,e){if(d>-1)return!1;t.isTextblock&&0==t.content.size&&(d=e+1)})),d>-1&&f.setSelection(e.selection.constructor.near(f.doc.resolve(d))),r(f.scrollIntoView())}return!0}var m=i.pos==o.end()?a.contentMatchAt(0).defaultType:null,g=e.tr.delete(o.pos,i.pos),v=m&&[null,{type:m}];return!!le(g.doc,o.pos,2,v)&&(r&&r(g.split(o.pos,2,v).scrollIntoView()),!0)}}function br(t){return function(e,r){var n=e.selection,o=n.$from,i=n.$to,s=o.blockRange(i,(function(e){return e.childCount&&e.firstChild.type==t}));return!!s&&(!r||(o.node(s.depth-1).type==t?function(t,e,r,n){var o=t.tr,i=n.end,s=n.$to.end(n.depth);return i<s&&(o.step(new ne(i-1,s,i,s,new L(T.from(r.create(null,n.parent.copy())),1,0),1,!0)),n=new rt(o.doc.resolve(n.$from.pos),o.doc.resolve(s),n.depth)),e(o.lift(n,se(n)).scrollIntoView()),!0}(e,r,t,s):function(t,e,r){for(var n=t.tr,o=r.parent,i=r.end,s=r.endIndex-1,a=r.startIndex;s>a;s--)i-=o.child(s).nodeSize,n.delete(i-1,i+1);var c=n.doc.resolve(r.start),l=c.nodeAfter;if(n.mapping.map(r.end)!=r.start+c.nodeAfter.nodeSize)return!1;var p=0==r.startIndex,u=r.endIndex==o.childCount,h=c.node(-1),f=c.index(-1);if(!h.canReplace(f+(p?0:1),f+1,l.content.append(u?T.empty:T.from(o))))return!1;var d=c.pos,m=d+l.nodeSize;return n.step(new ne(d-(p?1:0),m+(u?1:0),d+1,m-1,new L((p?T.empty:T.from(o.copy(T.empty))).append(u?T.empty:T.from(o.copy(T.empty))),p?0:1,u?0:1),p?0:1)),e(n.scrollIntoView()),!0}(e,r,s)))}}function _r(t){return function(e,r){var n=e.selection,o=n.$from,i=n.$to,s=o.blockRange(i,(function(e){return e.childCount&&e.firstChild.type==t}));if(!s)return!1;var a=s.startIndex;if(0==a)return!1;var c=s.parent,l=c.child(a-1);if(l.type!=t)return!1;if(r){var p=l.lastChild&&l.lastChild.type==c.type,u=T.from(p?t.create():null),h=new L(T.from(t.create(null,T.from(c.type.create(null,u)))),p?3:1,0),f=s.start,d=s.end;r(e.tr.step(new ne(f-(p?3:1),d,f,d,h,1,!0)).scrollIntoView())}return!0}}var wr=function(t,e){var r;this.match=t,this.handler="string"==typeof e?(r=e,function(t,e,n,o){var i=r;if(e[1]){var s=e[0].lastIndexOf(e[1]);i+=e[0].slice(s+e[1].length);var a=(n+=s)-o;a>0&&(i=e[0].slice(s-a,s)+i,n=o)}return t.tr.insertText(i,n,o)}):e};function xr(t,e,r,n,o,i){if(t.composing)return!1;var s=t.state,a=s.doc.resolve(e);if(a.parent.type.spec.code)return!1;for(var c=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,null,"")+n,l=0;l<o.length;l++){var p=o[l].match.exec(c),u=p&&o[l].handler(s,p,e-(p[0].length-n.length),r);if(u)return t.dispatch(u.setMeta(i,{transform:u,from:e,to:r,text:n})),!0}return!1}function Cr(t,e){for(var r=t.plugins,n=0;n<r.length;n++){var o=r[n],i=void 0;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){for(var s=t.tr,a=i.transform,c=a.steps.length-1;c>=0;c--)s.step(a.steps[c].invert(a.docs[c]));if(i.text){var l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else s.delete(i.from,i.to);e(s)}return!0}}return!1}new wr(/--$/,"—");var Sr=new wr(/\.\.\.$/,"…");function Ar(t,e,r,n){return new wr(t,(function(t,o,i,s){var a=r instanceof Function?r(o):r,c=t.tr.delete(i,s),l=c.doc.resolve(i).blockRange(),p=l&&ae(l,e,a);if(!p)return null;c.wrap(l,p);var u=c.doc.resolve(i-1).nodeBefore;return u&&u.type==e&&pe(c.doc,i-1)&&(!n||n(o,u))&&c.join(i-1),c}))}function Mr(t,e,r){return new wr(t,(function(t,n,o,i){var s=t.doc.resolve(o),a=r instanceof Function?r(n):r;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),e)?t.tr.delete(o,i).setBlockType(o,o,e,a):null}))}function Dr(){return Dr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];
443for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Dr.apply(this,arguments)}function Er(t){return function(e){return function(t,e){for(var r=t.depth;r>0;r-=1){var n=t.node(r);if(e(n))return{pos:r>0?t.before(r):0,start:t.start(r),depth:r,node:n}}}(e.$from,t)}}function Tr(t,e){if(void 0===t&&(t=null),void 0===e&&(e=null),!t||!e)return!1;var r=t.parent.childAfter(t.parentOffset);if(!r.node)return!1;var n=r.node.marks.find((function(t){return t.type===e}));if(!n)return!1;for(var o=t.index(),i=t.start()+r.offset,s=o+1,a=i+r.node.nodeSize;o>0&&n.isInSet(t.parent.child(o-1).marks);)o-=1,i-=t.parent.child(o).nodeSize;for(;s<t.parent.childCount&&n.isInSet(t.parent.child(s).marks);)a+=t.parent.child(s).nodeSize,s+=1;return{from:i,to:a}}function Or(t,e,r){void 0===r&&(r={});var n,o=(n=e,function(t){if(function(t){return t instanceof Ne}(t)){var e=t.node,r=t.$from;if(function(t,e){return Array.isArray(t)&&t.indexOf(e.type)>-1||e.type===t}(n,e))return{node:e,pos:r.pos,depth:r.depth}}})(t.selection)||Er((function(t){return t.type===e}))(t.selection);return Object.keys(r).length&&o?o.node.hasMarkup(e,Dr({},o.node.attrs,r)):!!o}function Nr(t,e,r){return new wr(t,(function(t,n,o,i){var s=r instanceof Function?r(n):r,a=t.tr,c=n.length-1,l=i,p=o;if(n[c]){var u=o+n[0].indexOf(n[c-1]),h=u+n[c-1].length-1,f=u+n[c-1].lastIndexOf(n[c]),d=f+n[c].length,m=function(t,e,r){var n=[];return r.doc.nodesBetween(t,e,(function(t,e){n=[].concat(n,t.marks.map((function(r){return{start:e,end:e+t.nodeSize,mark:r}})))})),n}(o,i,t).filter((function(t){return t.mark.type.excluded.find((function(t){return t.name===e.name}))})).filter((function(t){return t.end>u}));if(m.length)return!1;d<h&&a.delete(d,h),f>u&&a.delete(u,f),l=(p=u)+n[c].length}return a.addMark(p,l,e.create(s)),a.removeStoredMark(e),a}))}function qr(t,e,r){return void 0===r&&(r={}),function(n,o,i){return Or(n,t,r)?lr(e)(n,o,i):lr(t,r)(n,o,i)}}function zr(t,e){return t.type===e.nodes.bullet_list||t.type===e.nodes.ordered_list||t.type===e.nodes.todo_list}function Ir(t,e){return function(r,n,o){var i=r.schema,s=r.selection,a=s.$from,c=s.$to,l=a.blockRange(c);if(!l)return!1;var p=Er((function(t){return zr(t,i)}))(s);if(l.depth>=1&&p&&l.depth-p.depth<=1){if(p.node.type===t)return br(e)(r,n,o);if(zr(p.node,i)&&t.validContent(p.node.content)){var u=r.tr;return u.setNodeMarkup(p.pos,t),n&&n(u),!1}}return yr(t)(r,n,o)}}function Rr(t,e){return void 0===e&&(e={}),function(r,n,o){return Or(r,t,e)?function(t,e){var r=t.selection,n=r.$from,o=r.$to,i=n.blockRange(o),s=i&&se(i);return null!=s&&(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)}(r,n):cr(t,e)(r,n,o)}}function Lr(t,e){return function(r,n){var o=r.tr,i=r.selection,s=r.doc,a=i.ranges;if(i.empty){var c=Tr(i.$from,t),l=c.from,p=c.to;s.rangeHasMark(l,p,t)&&o.removeMark(l,p,t),o.addMark(l,p,t.create(e))}else a.forEach((function(r){var n=r.$to,i=r.$from;s.rangeHasMark(i.pos,n.pos,t)&&o.removeMark(i.pos,n.pos,t),o.addMark(i.pos,n.pos,t.create(e))}));return n(o)}}new wr(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new wr(/"$/,"”"),new wr(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new wr(/'$/,"’");var Br=function(t){function r(){return t.apply(this,arguments)||this}e(r,t);var n=r.prototype;return n.oninit=function(e){var r=this;t.prototype.oninit.call(this,e),this.text=C()(""),this.href=C()(""),this.title=C()(""),this.state.addItem(this.attrs.type,(function(t,e){r.command(t,e)}),this.onEditorUpdate.bind(this)),this.selectionEmpty=!0},n.fields=function(){var e=t.prototype.fields.call(this);return this.selectionEmpty&&!this.active&&e.add("text",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"text",placeholder:u()(app.translator.trans("askvortsov-rich-text.lib.composer.insert_link.text_placeholder")),bidi:this.text,required:!0})),10),e.add("href",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"href",type:"url",placeholder:u()(app.translator.trans("askvortsov-rich-text.lib.composer.insert_link.href_placeholder")),bidi:this.href,required:!0})),10),e.add("title",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"title",placeholder:u()(app.translator.trans("askvortsov-rich-text.lib.composer.insert_link.title_placeholder")),bidi:this.title})),10),this.active&&e.add("remove",m(d(),{onclick:this.remove.bind(this),className:"Button Button--danger"},app.translator.trans("askvortsov-rich-text.lib.composer.insert_link.remove_button")),-10),e},n.insert=function(t){var e={href:this.href(),title:this.title()};this.selectionEmpty&&!this.active?(this.command=function(t,e,r){return function(n,o){o(n.tr.replaceSelectionWith(n.schema.text(t,[e.create(r)]),!1))}}(this.text(),this.attrs.mark,e),this.text("")):this.command=Lr(this.attrs.mark,e),this.state.run(this.attrs.type)},n.remove=function(t){var e;$("body").trigger("click"),this.command=(e=this.attrs.mark,function(t,r){var n=t.tr,o=t.selection,i=o.from,s=o.to,a=o.$from;if(o.empty){var c=Tr(a,e);
443i=c.from,s=c.to}return n.removeMark(i,s,e),r(n)}),this.state.run(this.attrs.type),app.composer.editor.focus()},n.onEditorUpdate=function(){this.active=!!this.state.markActive(this.attrs.mark),this.$(".Dropdown-toggle").toggleClass("active",this.active);var t=this.state.markAttrs(this.attrs.mark);this.href(t.href),this.title(t.title),this.selectionEmpty=this.state.selectionEmpty()},r}(w),Fr=function(t){function r(){return t.apply(this,arguments)||this}e(r,t);var n=r.prototype;return n.oninit=function(e){var r=this;e.attrs.command=function(t,n){return Ir(e.attrs.listType,r.active?t.schema.nodes.list_item:void 0)(t,n)},t.prototype.oninit.call(this,e)},n.onEditorUpdate=function(){this.active=!!this.state.nodeActive(this.attrs.listType),this.$().toggleClass("active",this.active)},r}(h),Pr=function(t){function r(){return t.apply(this,arguments)||this}return e(r,t),r.initAttrs=function(t){t.command=pr(t.mark)},r.prototype.onEditorUpdate=function(){this.$().toggleClass("active",!!this.state.markActive(this.attrs.mark))},r}(h),$r=function(t){function r(){return t.apply(this,arguments)||this}e(r,t);var n=r.prototype;return n.oninit=function(e){var r=this;t.prototype.oninit.call(this,e),this.state=this.attrs.state,this.state.addItem(this.attrs.type,(function(t,e){return r.command(t,e)}),this.onEditorUpdate.bind(this))},n.oncreate=function(e){var r=this;t.prototype.oncreate.call(this,e),this.$().on("click",(function(t){$(".App").is(".mobile-safari")&&(app.modal.show(_,{title:r.attrs.tooltip,vnodeContent:r.getNodeTypeButtons()}),t.stopPropagation())})),this.onEditorUpdate()},n.getButton=function(t){return m("button",{className:"Dropdown-toggle Button Button--icon Button--link NodeTypeButton Button--menuDropdown","data-toggle":"dropdown"},m(a(),{key:this.attrs.tooltip,text:this.attrs.tooltip},m("span",null)))},n.getNodeTypeButtons=function(){var t=this;return this.attrs.options.filter((function(e,r){return r!==t.activeIndex})).map((function(e){return m(a(),{text:u()(e.tooltip),key:e.title},m("button",{className:"Button Button--icon Button--link NodeTypeButton",onclick:t.click.bind(t,e.type,e.attrs),onkeydown:t.keydown.bind(t,e.type,e.attrs)},e.title))}))},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu NodeTypeDropdownMenu"},this.getNodeTypeButtons())},n.keydown=function(t,e,r){" "!==r.key&&"Enter"!==r.key||this.click(t,e,r)},n.click=function(t,e,r){return app.modal.close(),r.preventDefault(),this.command=lr(t,e),this.state.run(this.attrs.type)},n.onEditorUpdate=function(){var t=this;this.element&&this.attrs.options.forEach((function(e,r){t.state.nodeActive(e.type,e.attrs)&&(t.element.children[0].children[0].innerText=e.title,t.activeIndex=r)}))},r}(v());function Vr(t,e){return function(r,n){return n(r.tr.replaceSelectionWith(t.create(e))),!0}}var jr=function(t){function r(){return t.apply(this,arguments)||this}e(r,t),r.initAttrs=function(t){t.buttonClassName="Button Button--icon Button--link Button--menuDropdown"};var n=r.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.oncreate=function(e){var r=this;t.prototype.oncreate.call(this,e),this.$().on("click",(function(t){$(".App").is(".mobile-safari")&&(app.modal.show(_,{title:r.attrs.tooltip,vnodeContent:r.attrs.buttons.map((function(t){return t}))}),t.stopPropagation())}))},n.getButtonContent=function(t){return m(a(),{text:this.attrs.tooltip},m("span",null,l()(this.attrs.icon)))},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu HiddenItemsDropdownMenu"},this.attrs.buttons)},r}(v()),Ur=function(t){function r(){return t.apply(this,arguments)||this}e(r,t);var n=r.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.modifierKey=navigator.userAgent.match(/Macintosh/)?"⌘":"ctrl"},n.view=function(t){return this.attrs.state?m("div",{class:"ProseMirrorMenu"},this.items().toArray()):""},n.items=function(){var t=new(k()),e=this.attrs.state,r=this.modifierKey;return t.add("text_type",$r.component({type:"text_type",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.text_type_tooltip"),state:e,options:[{title:"H1",type:e.getSchema().nodes.heading,attrs:{level:1},tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.header_tooltip",{modifierKey:r,level:1})},{title:"H2",type:e.getSchema().nodes.heading,attrs:{level:2},tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.header_tooltip",{modifierKey:r,level:2})},{title:"H3",type:e.getSchema().nodes.heading,attrs:{level:3},tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.header_tooltip",{modifierKey:r,level:3})},{title:"H4",type:e.getSchema().nodes.heading,attrs:{level:4},tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.header_tooltip",{modifierKey:r,level:4})},{title:"H5",type:e.getSchema().nodes.heading,attrs:{level:5},tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.header_tooltip",{modifierKey:r,level:5})},{title:"H6",type:e.getSchema().nodes.heading,attrs:{level:6},tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.header_tooltip",{modifierKey:r,level:6})},{title:"P",type:e.getSchema().nodes.paragraph,tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.paragraph_tooltip",{modifierKey:r})}]}),100),t.add("bold",Pr.component({type:"bold",icon:"fas fa-bold",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.bold_tooltip",{modifierKey:r}),state:e,mark:e.getSchema().marks.strong}),90),t.add("italic",Pr.component({type:"italic",icon:"fas fa-italic",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.italic_tooltip",{modifierKey:r}),state:e,mark:e.getSchema().marks.em}),80),t.add("code",Pr.component({type:"code",icon:"fas fa-code",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.code_tooltip",{modifierKey:r}),state:e,mark:e.getSchema().marks.code}),70),t.add("quote",h.component({type:"quote",icon:"fas fa-quote-left",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.quote_tooltip",{modifierKey:r}),state:e,command:cr(e.getSchema().nodes.blockquote)}),60),t.add("link",Br.component({type:"link",icon:"fas fa-link",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.link_tooltip"),state:e,mark:e.getSchema().marks.link}),50),t.add("image",S.component({type:"image",icon:"fas fa-image",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.image_tooltip"),state:e,node:e.getSchema().nodes.image}),40),t.add("unordered_list",Fr.component({type:"unordered_list",icon:"fas fa-list-ul",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.unordered_list_tooltip",{modifierKey:r}),state:e,listType:e.getSchema().nodes.bullet_list}),30),t.add("ordered_list",Fr.component({type:"ordered_list",icon:"fas fa-list-ol",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.ordered_list_tooltip",{modifierKey:r}),state:e,listType:e.getSchema().nodes.ordered_list}),20),t.add("additional_items",jr.component({type:"additional_items",icon:"fas fa-plus",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.additional_items_tooltip"),state:e,buttons:this.hiddenItems().toArray()})),t},n.hiddenItems=function(){var t=new(k()),e=this.attrs.state,r=this.modifierKey;
443return t.add("strike",Pr.component({type:"strike",icon:"fas fa-strikethrough",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.strike_tooltip"),state:e,mark:e.getSchema().marks.strike})),t.add("sub",Pr.component({type:"sub",icon:"fas fa-subscript",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.sub_tooltip",{modifierKey:r}),state:e,mark:e.getSchema().marks.sub})),t.add("sup",Pr.component({type:"sup",icon:"fas fa-superscript",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.sup_tooltip",{modifierKey:r}),state:e,mark:e.getSchema().marks.sup})),t.add("spoiler_inline",Pr.component({type:"spoiler_inline",icon:"fas fa-eye-slash",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.spoiler_inline_tooltip",{modifierKey:r}),state:e,mark:e.getSchema().marks.spoiler_inline})),t.add("code_block",h.component({type:"code_block",icon:"fas fa-terminal",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.code_block_tooltip",{modifierKey:r}),state:e,command:qr(e.getSchema().nodes.code_block,e.getSchema().nodes.paragraph)})),t.add("spoiler_block",h.component({type:"spoiler_block",icon:"fas fa-caret-square-right",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.spoiler_block_tooltip",{modifierKey:r}),state:e,command:Rr(e.getSchema().nodes.spoiler)})),t.add("horizontal_rule",h.component({type:"horizontal_rule",icon:"fas fa-minus",tooltip:app.translator.trans("askvortsov-rich-text.lib.composer.horizontal_rule_tooltip"),state:e,command:Vr(e.getSchema().nodes.horizontal_rule)})),t},r}(i()),Hr={CommandButton:h,FormDropdown:w,InsertImageDropdown:S,InsertLinkDropdown:Br,ListButton:Fr,MarkButton:Pr,NodeTypeDropdown:$r,ProseMirrorMenu:Ur},Jr={updateToggleMark:function(t,e){return function(r,n){return r.selection.empty?pr(t,e)(r,n):Lr(t,e)(r,n)}}},Wr=r(6097),Zr=r.n(Wr),Gr=r(6454),Kr=r.n(Gr),Yr=r(2713),Qr=r.n(Yr),Xr=r(7142),tn=r.n(Xr),en=r(4150),rn=r.n(en),nn=new Dt({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:function(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM:function(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM:function(t){return["h"+t.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:function(t){return{params:t.getAttribute("data-params")||""}}}],toDOM:function(t){return["pre",t.attrs.params?{"data-params":t.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs:function(t){return{order:t.hasAttribute("start")?+t.getAttribute("start"):1,tight:t.hasAttribute("data-tight")}}}],toDOM:function(t){return["ol",{start:1==t.attrs.order?null:t.attrs.order,"data-tight":t.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:function(t){return{tight:t.hasAttribute("data-tight")}}}],toDOM:function(t){return["ul",{"data-tight":t.attrs.tight?"true":null},0]}},list_item:{content:"paragraph block*",defining:!0,parseDOM:[{tag:"li"}],toDOM:function(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:function(t){return{src:t.getAttribute("src"),title:t.getAttribute("title"),alt:t.getAttribute("alt")}}}],toDOM:function(t){return["img",t.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:function(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:function(t){return"italic"==t&&null}}],toDOM:function(){return["em"]}},strong:{parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-weight",getAttrs:function(t){return/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}}],toDOM:function(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(t){return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM:function(t){return["a",t.attrs]}},code:{parseDOM:[{tag:"code"}],toDOM:function(){return["code"]}}}}),on=function(t,e){this.schema=t,this.stack=[{type:t.topNodeType,content:[]}],this.marks=I.none,this.tokenHandlers=e};function sn(t,e,r,n){return t.getAttrs?t.getAttrs(e,r,n):t.attrs instanceof Function?t.attrs(e):t.attrs}function an(t,e){return t.noCloseToken||"code_inline"==e||"code_block"==e||"fence"==e}function cn(t){return"\n"==t[t.length-1]?t.slice(0,t.length-1):t}function ln(){}on.prototype.top=function(){return this.stack[this.stack.length-1]},on.prototype.push=function(t){this.stack.length&&this.top().content.push(t)},on.prototype.addText=function(t){if(t){var e,r=this.top().content,n=r[r.length-1],o=this.schema.text(t,this.marks);n&&(e=function(t,e){if(t.isText&&e.isText&&I.sameSet(t.marks,e.marks))return t.withText(t.text+e.text)}(n,o))?r[r.length-1]=e:r.push(o)}},on.prototype.openMark=function(t){this.marks=t.addToSet(this.marks)},on.prototype.closeMark=function(t){this.marks=t.removeFromSet(this.marks)},on.prototype.parseTokens=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=this.tokenHandlers[r.type];if(!n)throw new Error("Token type `"+r.type+"` not supported by Markdown parser");n(this,r,t,e)}},on.prototype.addNode=function(t,e,r){var n=t.createAndFill(e,r,this.marks);return n?(this.push(n),n):null},on.prototype.openNode=function(t,e){this.stack.push({type:t,attrs:e,content:[]})},on.prototype.closeNode=function(){this.marks.length&&(this.marks=I.none);var t=this.stack.pop();return this.addNode(t.type,t.attrs,t.content)};var pn=function(t,e,r){this.tokens=r,this.schema=t,this.tokenizer=e,this.tokenHandlers=function(t,e){var r=Object.create(null),n=function(n){var o=e[n];if(o.block){var i=t.nodeType(o.block);an(o,n)?r[n]=function(t,e,r,n){t.openNode(i,sn(o,e,r,n)),t.addText(cn(e.content)),t.closeNode()}:(r[n+"_open"]=function(t,e,r,n){return t.openNode(i,sn(o,e,r,n))},r[n+"_close"]=function(t){return t.closeNode()})}else if(o.node){var s=t.nodeType(o.node);r[n]=function(t,e,r,n){return t.addNode(s,sn(o,e,r,n))}}else if(o.mark){var a=t.marks[o.mark];an(o,n)?r[n]=function(t,e,r,n){t.openMark(a.create(sn(o,e,r,n))),t.addText(cn(e.content)),t.closeMark(a)}:(r[n+"_open"]=function(t,e,r,n){return t.openMark(a.create(sn(o,e,r,n)))},r[n+"_close"]=function(t){return t.closeMark(a)})}else{if(!o.ignore)throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o));an(o,n)?r[n]=ln:(r[n+"_open"]=ln,r[n+"_close"]=ln)}};for(var o in e)n(o);return r.text=function(t,e){return t.addText(e.content)},r.inline=function(t,e){return t.parseTokens(e.children)},r.softbreak=r.softbreak||function(t){return t.addText("\n")},r}(t,r)};function un(t,e){for(;++e<t.length;)if("list_item_open"!=t[e].type)return t[e].hidden;return!1}pn.prototype.parse=function(t){var e,r=new on(this.schema,this.tokenHandlers);r.parseTokens(this.tokenizer.parse(t,{}));do{e=r.closeNode()}while(r.stack.length);return e||this.schema.topNodeType.createAndFill()};var hn=new pn(nn,rn()("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:function(t,e,r){return{tight:un(e,r)}}},ordered_list:{block:"ordered_list",getAttrs:function(t,e,r){return{order:+t.attrGet("start")||1,tight:un(e,r)}}},heading:{block:"heading",getAttrs:function(t){return{level:+t.tag.slice(1)}}},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:function(t){return{params:t.
443info||""}},noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:function(t){return{src:t.attrGet("src"),title:t.attrGet("title")||null,alt:t.children[0]&&t.children[0].content||null}}},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:function(t){return{href:t.attrGet("href"),title:t.attrGet("title")||null}}},code_inline:{mark:"code",noCloseToken:!0}}),fn=function(t,e,r){this.nodes=t,this.marks=e,this.options=r||{}};fn.prototype.serialize=function(t,e){e=Object.assign(this.options,e);var r=new vn(this.nodes,this.marks,e);return r.renderContent(t),r.out};var dn=new fn({blockquote:function(t,e){t.wrapBlock("> ",null,e,(function(){return t.renderContent(e)}))},code_block:function(t,e){t.write("```"+(e.attrs.params||"")+"\n"),t.text(e.textContent,!1),t.ensureNewLine(),t.write("```"),t.closeBlock(e)},heading:function(t,e){t.write(t.repeat("#",e.attrs.level)+" "),t.renderInline(e),t.closeBlock(e)},horizontal_rule:function(t,e){t.write(e.attrs.markup||"---"),t.closeBlock(e)},bullet_list:function(t,e){t.renderList(e,"  ",(function(){return(e.attrs.bullet||"*")+" "}))},ordered_list:function(t,e){var r=e.attrs.order||1,n=String(r+e.childCount-1).length,o=t.repeat(" ",n+2);t.renderList(e,o,(function(e){var o=String(r+e);return t.repeat(" ",n-o.length)+o+". "}))},list_item:function(t,e){t.renderContent(e)},paragraph:function(t,e){t.renderInline(e),t.closeBlock(e)},image:function(t,e){t.write("!["+t.esc(e.attrs.alt||"")+"]("+e.attrs.src+(e.attrs.title?' "'+e.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break:function(t,e,r,n){for(var o=n+1;o<r.childCount;o++)if(r.child(o).type!=e.type)return void t.write("\\\n")},text:function(t,e){t.text(e.text)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open:function(t,e,r,n){return gn(e,r,n,1)?"<":"["},close:function(t,e,r,n){return gn(e,r,n,-1)?">":"]("+e.attrs.href+(e.attrs.title?' "'+e.attrs.title.replace(/"/g,'\\"')+'"':"")+")"}},code:{open:function(t,e,r,n){return mn(r.child(n),-1)},close:function(t,e,r,n){return mn(r.child(n-1),1)},escape:!1}});function mn(t,e){var r,n=/`+/g,o=0;if(t.isText)for(;r=n.exec(t.text);)o=Math.max(o,r[0].length);for(var i=o>0&&e>0?" `":"`",s=0;s<o;s++)i+="`";return o>0&&e<0&&(i+=" "),i}function gn(t,e,r,n){if(t.attrs.title||!/^\w+:/.test(t.attrs.href))return!1;var o=e.child(r+(n<0?-1:0));if(!o.isText||o.text!=t.attrs.href||o.marks[o.marks.length-1]!=t)return!1;if(r==(n<0?1:e.childCount-1))return!0;var i=e.child(r+(n<0?-2:1));return!t.isInSet(i.marks)}var vn=function(t,e,r){this.nodes=t,this.marks=e,this.delim=this.out="",this.closed=!1,this.inTightList=!1,this.options=r||{},void 0===this.options.tightLists&&(this.options.tightLists=!1)};function yn(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}vn.prototype.flushClose=function(t){if(this.closed){if(this.atBlank()||(this.out+="\n"),null==t&&(t=2),t>1){var e=this.delim,r=/\s+$/.exec(e);r&&(e=e.slice(0,e.length-r[0].length));for(var n=1;n<t;n++)this.out+=e+"\n"}this.closed=!1}},vn.prototype.wrapBlock=function(t,e,r,n){var o=this.delim;this.write(e||t),this.delim+=t,n(),this.delim=o,this.closeBlock(r)},vn.prototype.atBlank=function(){return/(^|\n)$/.test(this.out)},vn.prototype.ensureNewLine=function(){this.atBlank()||(this.out+="\n")},vn.prototype.write=function(t){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),t&&(this.out+=t)},vn.prototype.closeBlock=function(t){this.closed=t},vn.prototype.text=function(t,e){for(var r=t.split("\n"),n=0;n<r.length;n++){var o=this.atBlank()||this.closed;this.write(),this.out+=!1!==e?this.esc(r[n],o):r[n],n!=r.length-1&&(this.out+="\n")}},vn.prototype.render=function(t,e,r){if("number"==typeof e)throw new Error("!");if(!this.nodes[t.type.name])throw new Error("Token type `"+t.type.name+"` not supported by Markdown renderer");
443this.nodes[t.type.name](this,t,e,r)},vn.prototype.renderContent=function(t){var e=this;t.forEach((function(r,n,o){return e.render(r,t,o)}))},vn.prototype.renderInline=function(t){var e=this,r=[],n="",o=function(o,i,s){var a=o?o.marks:[];o&&"hard_break"===o.type.name&&(a=a.filter((function(e){if(s+1==t.childCount)return!1;var r=t.child(s+1);return e.isInSet(r.marks)&&(!r.isText||/\S/.test(r.text))})));var c=n;if(n="",o&&o.isText&&a.some((function(t){var r=e.marks[t.type.name];return r&&r.expelEnclosingWhitespace}))){var l=/^(\s*)(.*?)(\s*)$/m.exec(o.text),p=(l[0],l[1]),u=l[2],h=l[3];c+=p,n=h,(p||h)&&((o=u?o.withText(u):null)||(a=r))}var f=a.length&&a[a.length-1],d=f&&!1===e.marks[f.type.name].escape,m=a.length-(d?1:0);t:for(var g=0;g<m;g++){var v=a[g];if(!e.marks[v.type.name].mixable)break;for(var y=0;y<r.length;y++){var k=r[y];if(!e.marks[k.type.name].mixable)break;if(v.eq(k)){g>y?a=a.slice(0,y).concat(v).concat(a.slice(y,g)).concat(a.slice(g+1,m)):y>g&&(a=a.slice(0,g).concat(a.slice(g+1,y)).concat(v).concat(a.slice(y,m)));continue t}}}for(var b=0;b<Math.min(r.length,m)&&a[b].eq(r[b]);)++b;for(;b<r.length;)e.text(e.markString(r.pop(),!1,t,s),!1);if(c&&e.text(c),o){for(;r.length<m;){var _=a[r.length];r.push(_),e.text(e.markString(_,!0,t,s),!1)}d&&o.isText?e.text(e.markString(f,!0,t,s)+o.text+e.markString(f,!1,t,s+1),!1):e.render(o,t,s)}};t.forEach(o),o(null,0,t.childCount)},vn.prototype.renderList=function(t,e,r){var n=this;this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);var o=void 0!==t.attrs.tight?t.attrs.tight:this.options.tightLists,i=this.inTightList;this.inTightList=o,t.forEach((function(i,s,a){a&&o&&n.flushClose(1),n.wrapBlock(e,r(a),t,(function(){return n.render(i,t,a)}))})),this.inTightList=i},vn.prototype.esc=function(t,e){return t=t.replace(/[`*\\~\[\]_]/g,(function(e,r){return"_"==e&&r>0&&r+1<t.length&&t[r-1].match(/\w/)&&t[r+1].match(/\w/)?e:"\\"+e})),e&&(t=t.replace(/^[:#\-*+>]/,"\\$&").replace(/^(\s*\d+)\./,"$1\\.")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t},vn.prototype.quote=function(t){var e=-1==t.indexOf('"')?'""':-1==t.indexOf("'")?"''":"()";return e[0]+t+e[1]},vn.prototype.repeat=function(t,e){for(var r="",n=0;n<e;n++)r+=t;return r},vn.prototype.markString=function(t,e,r,n){var o=this.marks[t.type.name],i=e?o.open:o.close;return"string"==typeof i?i:i(this,t,r,n)},vn.prototype.getEnclosingWhitespace=function(t){return{leading:(t.match(/^(\s+)/)||[])[0],trailing:(t.match(/(\s+)$/)||[])[0]}};var kn=function(t,e){for(var r=t.pos;r<t.posMax&&!yn(t.src.charCodeAt(r));)r++;
443return r!==t.pos&&(e||(t.pending+=t.src.slice(t.pos,r)),t.pos=r,!0)};function bn(t){t.inline.ruler.before("text","altText",kn),t.inline.ruler.disable("text")}var _n=r(8575);function wn(t,e,r,n,o){var i,s,a,c,l,p,u,h,f,d,m,g,v,y,k,b,_,w,x,C,S=e.lineMax,A=e.bMarks[r]+e.tShift[r],M=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(A)||!t.followingCharRegex.test(e.src[A+1]))return!1;if(A+=t.markup.length,o)return!0;c=f=e.sCount[r]+A-(e.bMarks[r]+e.tShift[r]),32===e.src.charCodeAt(A)?(A++,c++,f++,i=!1,b=!0):9===e.src.charCodeAt(A)?(b=!0,(e.bsCount[r]+f)%4==3?(A++,c++,f++,i=!1):i=!0):b=!1;var D=!1,E=!1,T=A;if(">!"===t.markup)for(;A<M;){if(s=e.src.charCodeAt(A),D&&60===s)return!1;if(62===s)E=!0;else{if(E&&33===s)break;if(33===s)D=!0;else{if(10===s)break;D=!1,E=!1}}A++}for(A=T,d=[e.bMarks[r]],e.bMarks[r]=A;A<M&&(s=e.src.charCodeAt(A),(0,_n.isSpace)(s));)9===s?f+=4-(f+e.bsCount[r]+(i?1:0))%4:f++,A++;for(m=[e.bsCount[r]],e.bsCount[r]=e.sCount[r]+1+(b?1:0),p=A>=M,y=[e.sCount[r]],e.sCount[r]=f-c,k=[e.tShift[r]],e.tShift[r]=A-e.bMarks[r],w=e.md.block.ruler.getRules("spoiler"),v=e.parentType,e.parentType="spoiler",C=!1,h=r+1;h<n&&(e.sCount[h]<e.blkIndent&&(C=!0),!((A=e.bMarks[h]+e.tShift[h])>=(M=e.eMarks[h])));h++)if(A+=t.markup.length,62!==e.src.charCodeAt(A-t.markup.length)||!t.followingCharRegex.test(e.src[A-t.markup.length+1])||C){if(p)break;for(_=!1,a=0,l=w.length;a<l;a++)if(w[a](e,h,n,!0)){_=!0;break}if(_){e.lineMax=h,0!==e.blkIndent&&(d.push(e.bMarks[h]),m.push(e.bsCount[h]),k.push(e.tShift[h]),y.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}d.push(e.bMarks[h]),m.push(e.bsCount[h]),k.push(e.tShift[h]),y.push(e.sCount[h]),e.sCount[h]=-1}else{for(c=f=e.sCount[h]+A-(e.bMarks[h]+e.tShift[h]),32===e.src.charCodeAt(A)?(A++,c++,f++,i=!1,b=!0):9===e.src.charCodeAt(A)?(b=!0,(e.bsCount[h]+f)%4==3?(A++,c++,f++,i=!1):i=!0):b=!1,d.push(e.bMarks[h]),e.bMarks[h]=A;A<M&&(s=e.src.charCodeAt(A),(0,_n.isSpace)(s));)9===s?f+=4-(f+e.bsCount[h]+(i?1:0))%4:f++,A++;p=A>=M,m.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(b?1:0),y.push(e.sCount[h]),e.sCount[h]=f-c,k.push(e.tShift[h]),e.tShift[h]=A-e.bMarks[h]}for(g=e.blkIndent,e.blkIndent=0,(x=e.push(t.name+"_open",t.name,1)).markup=t.markup,x.map=u=[r,0],e.md.block.tokenize(e,r,h),(x=e.push(t.name+"_close",t.name,-1)).markup=t.markup,e.lineMax=S,e.parentType=v,u[1]=e.line,a=0;a<k.length;a++)e.bMarks[a+r]=d[a],e.tShift[a+r]=k[a],e.sCount[a+r]=y[a],e.bsCount[a+r]=m[a];return e.blkIndent=g,!0}function xn(t,e,r,n){return wn({followingCharRegex:/!/,markup:">!",name:"spoiler"},t,e,r,n)}function Cn(t,e,r,n){return wn({followingCharRegex:/[^!]/,markup:">",name:"blockquote"},t,e,r,n)}function Sn(t){t.block.ruler.__rules__.forEach((function(t){var e=t.alt.indexOf("blockquote");e>-1&&t.alt.splice(e,0,"spoiler")})),t.block.ruler.before("blockquote","spoiler",xn,{alt:["paragraph","reference","spoiler","blockquote","list"]}),t.block.ruler.at("blockquote",Cn,{alt:["paragraph","reference","spoiler","blockquote","list"]})}function An(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Mn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);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 Mn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Dn=function(t,e){for(var r,n=[],o=An(e);!(r=o()).done;){var i=r.value;if(124===i.marker&&-1!==i.end){var s=e[i.end],a=t.tokens[i.token];a.type="spoiler_inline_open",a.tag="span",a.attrs=[["class","spoiler_inline"]],a.nesting=1,a.markup="||",a.content="";var c=t.tokens[s.token];c.type="spoiler_inline_close",c.tag="span",c.nesting=-1,c.markup="||",c.content="","text"===t.tokens[s.token-1].type&&"|"===t.tokens[s.token-1].content&&n.push(s.token-1)}}for(;n.length;){for(var l=n.pop(),p=l+1;p<t.tokens.length&&"spoiler_inline_close"===t.tokens[p].type;)p++;if(l!==--p){var u=t.tokens[p];t.tokens[p]=t.tokens[l],t.tokens[l]=u}}};function En(t,e){void 0===e&&(e=!1),t.inline.ruler.before("emphasis","spoiler_inline_bars",function(t){return function(e,r){if(r)return!1;
443var n=e.pos,o=e.src.charCodeAt(n);if(124!==o)return!1;var i=e.scanDelims(e.pos,!0),s=i.length,a=String.fromCharCode(o);if(s<2)return!1;var c=!1;s%2&&(c=!0,t||(e.push("text","",0).content=a),s--);for(var l=0;l<s;l+=2)e.push("text","",0).content=a+a,e.delimiters.push({marker:o,length:0,jump:l/2,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,c&&t&&e.pos--,!0}}(e)),t.inline.ruler2.before("emphasis","spoiler_inline_bars",(function(t){if(Dn(t,t.delimiters),t.tokens_meta)for(var e,r=An(t.tokens_meta);!(e=r()).done;){var n=e.value;n&&n.delimiters&&Dn(t,n.delimiters)}}))}function Tn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function On(t,e){var r,n,o,i;for(r=e.length-1;r>=0;r--)">!<"===(n=e[r]).marker&&-1!==n.end&&(o=e[n.end],(i=t.tokens[n.token]).type="spoiler_inline_open",i.nesting=1,i.markup=">!",i.content="",(i=t.tokens[o.token]).type="spoiler_inline_close",i.nesting=-1,i.markup="!<",i.content="")}function Nn(t,e){void 0===e&&(e=!1),t.inline.ruler.before("emphasis","spoiler_inline_tags",(function(t,e){if(e)return!1;var r=t.posMax,n=t.pos;return 62===t.src.charCodeAt(n)&&n+3<=r&&33===t.src.charCodeAt(n+1)?(t.scanDelims(t.pos,!0),t.push("text","",0),t.delimiters.push({marker:">!<",length:2,jump:0,token:t.tokens.length-1,end:-1,open:!0,close:!1}),t.pos+=2,!0):33===t.src.charCodeAt(n)&&n+2<=r&&60===t.src.charCodeAt(n+1)&&(t.push("text","",0),t.delimiters.push({marker:">!<",length:2,jump:0,token:t.tokens.length-1,end:-1,open:!1,close:!0}),t.pos+=2,!0)})),t.inline.ruler2.before("emphasis","spoiler_inline_bars",(function(t){if(On(t,t.delimiters),t.tokens_meta)for(var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Tn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Tn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);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.")}(t.tokens_meta);!(e=r()).done;){var n=e.value;n&&n.delimiters&&On(t,n.delimiters)}}))}var qn=function(){function t(t){this.schema=t}var e=t.prototype;return e.tokenizerParams=function(){return{html:!1}},e.buildTokenizer=function(){return Zr()("commonmark",this.tokenizerParams()).enable("strikethrough").use(bn).use(Sn).use(tn()).use(Kr()).use(Qr()).use(En).use(Nn)},e.buildTokens=function(){return Dr({},hn.tokens,{s:{mark:"strike"},softbreak:{node:"hard_break"},spoiler:{block:"spoiler"},spoiler_inline:{mark:"spoiler_inline"},sub:{mark:"sub"},sup:{mark:"sup"},math_block:{block:"math_block",noCloseToken:!0},math_inline:{mark:"math_inline",noCloseToken:!0}})},e.build=function(){return new pn(this.schema,this.buildTokenizer(),this.buildTokens())},t}();function zn(t){return t.open instanceof Function||t.close instanceof Function?(error("markdown-serializer genMarkupAwareMarkSpec","Unable to extend mark config with open/close as functions",t),t):Dr({},t,{open:function(e,r){return r.attrs.markup||t.open},close:function(e,r){var n=r.attrs.markup;return(n=/^<[a-z]+>$/i.test(n)?n.replace(/^</,"</"):n)||t.close}})}vn.prototype.esc=function(t,e){return t=t.replace(/[`*\\~]/g,"\\$&"),e&&(t=t.replace(/^[#\-*+]/,"\\$&").replace(/^(\s*\d+)\./,"$1\\.")),t};var In=function(){function t(t){this.schema=t}var e=t.prototype;return e.buildNodes=function(){return Dr({},dn.nodes,{spoiler:function(t,e){t.wrapBlock(">! ",null,e,(function(){return t.renderContent(e)}))},math_block:function(t,e){t.write("$$\n"),t.text(e.textContent,!1),t.ensureNewLine(),t.write("$$"),t.closeBlock(e)},paragraph:function(t,e){0===e.content.size?t.write("\n"):dn.nodes.paragraph(t,e)},hard_break:function(t,e,r,n){for(var o=n+1;o<r.childCount;o++)if(r.child(o).type!=e.type)return void t.write("\n")}})},e.buildMarks=function(){return Dr({},dn.marks,{spoiler_inline:zn({open:">!",close:"!<",mixable:!0,expelEnclosingWhitespace:!0}),strike:zn({open:"~~",close:"~~",mixable:!0,expelEnclosingWhitespace:!0}),sub:zn({open:"~",close:"~",mixable:!0,expelEnclosingWhitespace:!0}),sup:zn({open:"^",close:"^",mixable:!0,expelEnclosingWhitespace:!0}),math_inline:Dr({},zn({open:"$",close:"$",mixable:!1,expelEnclosingWhitespace:!0}),{escape:!1})})},e.build=function(){return new fn(this.buildNodes(),this.buildMarks())},t}();function Rn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return{toDOM:function(){return[e[0],0]},parseDOM:e.map((function(t){return{tag:t}}))}}var Ln={content:"block+",group:"block",attrs:{open:{default:!0}},parseDOM:[{tag:"details"}],toDOM:function(t){var e={class:"spoiler"};return t.attrs.open&&(e.open=!0),["details",e,0]}},Bn={content:"text*",code:!0,group:"block",parseDOM:[{tag:"pre"}],toDOM:function(t){return["pre",{class:"math"},["code",0]]}},Fn=function(){function t(){}var e=t.prototype;return e.buildNodes=function(){return nn.spec.nodes.update("ordered_list",Object.assign({},nn.spec.nodes.get("ordered_list"),{attrs:{order:{default:1},tight:{default:!0}}})).update("bullet_list",Object.assign({},nn.spec.nodes.get("bullet_list"),{attrs:{tight:{default:!0}}})).addBefore("blockquote","spoiler",Ln).addBefore("blockquote","math_block",Bn)},e.buildMarks=function(){return nn.spec.marks.addBefore("strong","strike",Rn("del","s","strike")).addBefore("strong","sub",Rn("sub")).addBefore("strong","sup",Rn("sup")).addBefore("strong","spoiler_inline",{attrs:{open:{default:!0}},parseDOM:[{tag:"spoiler"}],toDOM:function(t){return["spoiler",0]}}).addBefore("strong","math_inline",{parseDOM:[{tag:"math"}],toDOM:function(t){return["math",0]},excludes:"_"})},e.build=function(){return new Dt({nodes:this.buildNodes(),marks:this.buildMarks()})},t}(),Pn={MarkdownParserBuilder:qn,MarkdownSerializerBuilder:In,SchemaBuilder:Fn},$n=200,Vn=function(){};Vn.prototype.append=function(t){return t.length?(t=Vn.from(t),!this.length&&t||t.length<$n&&this.leafAppend(t)||this.length<$n&&t.leafPrepend(this)||this.appendInner(t)):this},Vn.prototype.prepend=function(t){return t.length?Vn.from(t).append(this):this},Vn.prototype.appendInner=function(t){return new Un(this,t)},Vn.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>
443=e?Vn.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Vn.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Vn.prototype.forEach=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=this.length),e<=r?this.forEachInner(t,e,r,0):this.forEachInvertedInner(t,e,r,0)},Vn.prototype.map=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=this.length);var n=[];return this.forEach((function(e,r){return n.push(t(e,r))}),e,r),n},Vn.from=function(t){return t instanceof Vn?t:t&&t.length?new jn(t):Vn.empty};var jn=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,r){return 0==t&&r==this.length?this:new e(this.values.slice(t,r))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,r,n){for(var o=e;o<r;o++)if(!1===t(this.values[o],n+o))return!1},e.prototype.forEachInvertedInner=function(t,e,r,n){for(var o=e-1;o>=r;o--)if(!1===t(this.values[o],n+o))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=$n)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=$n)return new e(t.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(e.prototype,r),e}(Vn);Vn.empty=new jn([]);var Un=function(t){function e(e,r){t.call(this),this.left=e,this.right=r,this.length=e.length+r.length,this.depth=Math.max(e.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,r,n){var o=this.left.length;return!(e<o&&!1===this.left.forEachInner(t,e,Math.min(r,o),n))&&!(r>o&&!1===this.right.forEachInner(t,Math.max(e-o,0),Math.min(this.length,r)-o,n+o))&&void 0},e.prototype.forEachInvertedInner=function(t,e,r,n){var o=this.left.length;return!(e>o&&!1===this.right.forEachInvertedInner(t,e-o,Math.max(r,o)-o,n+o))&&!(r<o&&!1===this.left.forEachInvertedInner(t,Math.min(e,o),r,n))&&void 0},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var r=this.left.length;return e<=r?this.left.slice(t,e):t>=r?this.right.slice(t-r,e-r):this.left.slice(t,r).append(this.right.slice(0,e-r))},e.prototype.leafAppend=function(t){var r=this.right.leafAppend(t);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(t){var r=this.left.leafPrepend(t);if(r)return new e(r,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(Vn);const Hn=Vn;var Jn=function(t,e){this.items=t,this.eventCount=e};Jn.prototype.popEvent=function(t,e){var r=this;if(0==this.eventCount)return null;for(var n,o,i=this.items.length;;i--)if(this.items.get(i-1).selection){--i;break}e&&(n=this.remapping(i,this.items.length),o=n.maps.length);var s,a,c=t.tr,l=[],p=[];return this.items.forEach((function(t,e){if(!t.step)return n||(n=r.remapping(i,e+1),o=n.maps.length),o--,void p.push(t);if(n){p.push(new Wn(t.map));var u,h=t.step.map(n.slice(o));h&&c.maybeStep(h).doc&&(u=c.mapping.maps[c.mapping.maps.length-1],l.push(new Wn(u,null,null,l.length+p.length))),o--,u&&n.appendMap(u,o)}else c.maybeStep(t.step);return t.selection?(s=n?t.selection.map(n.slice(o)):t.selection,a=new Jn(r.items.slice(0,i).append(p.reverse().concat(l)),r.eventCount-1),!1):void 0}),this.items.length,0),{remaining:a,transform:c,selection:s}},Jn.prototype.addTransform=function(t,e,r,n){for(var o=[],i=this.eventCount,s=this.items,a=!n&&s.length?s.get(s.length-1):null,c=0;c<t.steps.length;c++){var l,p=t.steps[c].invert(t.docs[c]),u=new Wn(t.mapping.maps[c],p,e);(l=a&&a.merge(u))&&(u=l,c?o.pop():s=s.slice(0,s.length-1)),o.push(u),e&&(i++,e=null),n||(a=u)}var h,f,d,m=i-r.depth;return m>
443Gn&&(f=m,(h=s).forEach((function(t,e){if(t.selection&&0==f--)return d=e,!1})),s=h.slice(d),i-=m),new Jn(s.append(o),i)},Jn.prototype.remapping=function(t,e){var r=new Zt;return this.items.forEach((function(e,n){var o=null!=e.mirrorOffset&&n-e.mirrorOffset>=t?r.maps.length-e.mirrorOffset:null;r.appendMap(e.map,o)}),t,e),r},Jn.prototype.addMaps=function(t){return 0==this.eventCount?this:new Jn(this.items.append(t.map((function(t){return new Wn(t)}))),this.eventCount)},Jn.prototype.rebased=function(t,e){if(!this.eventCount)return this;var r=[],n=Math.max(0,this.items.length-e),o=t.mapping,i=t.steps.length,s=this.eventCount;this.items.forEach((function(t){t.selection&&s--}),n);var a=e;this.items.forEach((function(e){var n=o.getMirror(--a);if(null!=n){i=Math.min(i,n);var c=o.maps[n];if(e.step){var l=t.steps[n].invert(t.docs[n]),p=e.selection&&e.selection.map(o.slice(a+1,n));p&&s++,r.push(new Wn(c,l,p))}else r.push(new Wn(c))}}),n);for(var c=[],l=e;l<i;l++)c.push(new Wn(o.maps[l]));var p=this.items.slice(0,n).append(c).append(r),u=new Jn(p,s);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-r.length)),u},Jn.prototype.emptyItemCount=function(){var t=0;return this.items.forEach((function(e){e.step||t++})),t},Jn.prototype.compress=function(t){void 0===t&&(t=this.items.length);var e=this.remapping(0,t),r=e.maps.length,n=[],o=0;return this.items.forEach((function(i,s){if(s>=t)n.push(i),i.selection&&o++;else if(i.step){var a=i.step.map(e.slice(r)),c=a&&a.getMap();if(r--,c&&e.appendMap(c,r),a){var l=i.selection&&i.selection.map(e.slice(r));l&&o++;var p,u=new Wn(c.invert(),a,l),h=n.length-1;(p=n.length&&n[h].merge(u))?n[h]=p:n.push(u)}}else i.map&&r--}),this.items.length,0),new Jn(Hn.from(n.reverse()),o)},Jn.empty=new Jn(Hn.empty,0);var Wn=function(t,e,r,n){this.map=t,this.step=e,this.selection=r,this.mirrorOffset=n};Wn.prototype.merge=function(t){if(this.step&&t.step&&!t.selection){var e=t.step.merge(this.step);if(e)return new Wn(e.getMap().invert(),e,this.selection)}};var Zn=function(t,e,r,n){this.done=t,this.undone=e,this.prevRanges=r,this.prevTime=n},Gn=20;function Kn(t){var e=[];return t.forEach((function(t,r,n,o){return e.push(n,o)})),e}function Yn(t,e){if(!t)return null;for(var r=[],n=0;n<t.length;n+=2){var o=e.map(t[n],1),i=e.map(t[n+1],-1);o<=i&&r.push(o,i)}return r}function Qn(t,e,r,n){var o=eo(e),i=ro.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,o);if(s){var a=s.selection.resolve(s.transform.doc),c=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,o),l=new Zn(n?c:s.remaining,n?s.remaining:c,null,0);r(s.transform.setSelection(a).setMeta(ro,{redo:n,historyState:l}).scrollIntoView())}}var Xn=!1,to=null;function eo(t){var e=t.plugins;if(to!=e){Xn=!1,to=e;for(var r=0;r<e.length;r++)if(e[r].spec.historyPreserveItems){Xn=!0;break}}return Xn}var ro=new Ke("history"),no=new Ke("closeHistory");function oo(t,e){var r=ro.getState(t);return!(!r||0==r.done.eventCount||(e&&Qn(r,t,e,!1),0))}function io(t,e){var r=ro.getState(t);return!(!r||0==r.undone.eventCount||(e&&Qn(r,t,e,!0),0))}for(var so={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},ao={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},co="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),lo="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),po="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),uo="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),ho="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),fo=co&&(uo||+co[1]<57)||po&&uo,mo=0;mo<10;mo++)so[48+mo]=so[96+mo]=String(mo);for(mo=1;mo<=24;mo++)so[mo+111]="F"+mo;for(mo=65;mo<=90;mo++)so[mo]=String.fromCharCode(mo+32),ao[mo]=String.fromCharCode(mo);for(var go in so)ao.hasOwnProperty(go)||(ao[go]=so[go]);var vo="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function yo(t){var e,r,n,o,i=t.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(var a=0;a<i.length-1;a++){var c=i[a];if(/^(cmd|meta|m)$/i.test(c))o=!0;else if(/^a(lt)?$/i.test(c))e=!0;else if(/^(c|ctrl|control)$/i.test(c))r=!0;else if(/^s(hift)?$/i.test(c))n=!0;else{if(!/^mod$/i.test(c))throw new Error("Unrecognized modifier name: "+c);vo?o=!0:r=!0}}return e&&(s="Alt-"+s),r&&(s="Ctrl-"+s),o&&(s="Meta-"+s),n&&(s="Shift-"+s),s}
443function ko(t,e,r){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==r&&e.shiftKey&&(t="Shift-"+t),t}function bo(t){return new We({props:{handleKeyDown:_o(t)}})}function _o(t){var e=function(t){var e=Object.create(null);for(var r in t)e[yo(r)]=t[r];return e}(t);return function(t,r){var n,o=function(t){var e=!(fo&&(t.ctrlKey||t.altKey||t.metaKey)||(lo||ho)&&t.shiftKey&&t.key&&1==t.key.length)&&t.key||(t.shiftKey?ao:so)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(r),i=1==o.length&&" "!=o,s=e[ko(o,r,!i)];if(s&&s(t.state,t.dispatch,t))return!0;if(i&&(r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(n=so[r.keyCode])&&n!=o){var a=e[ko(n,r,!0)];if(a&&a(t.state,t.dispatch,t))return!0}else if(i&&r.shiftKey){var c=e[ko(o,r,!0)];if(c&&c(t.state,t.dispatch,t))return!0}return!1}}var wo={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var xo=/Edge\/(\d+)/.exec(navigator.userAgent),Co=/MSIE \d/.test(navigator.userAgent),So=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Ao=wo.ie=!!(Co||So||xo);wo.ie_version=Co?document.documentMode||6:So?+So[1]:xo?+xo[1]:null,wo.gecko=!Ao&&/gecko\/(\d+)/i.test(navigator.userAgent),wo.gecko_version=wo.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var Mo=!Ao&&/Chrome\/(\d+)/.exec(navigator.userAgent);wo.chrome=!!Mo,wo.chrome_version=Mo&&+Mo[1],wo.safari=!Ao&&/Apple Computer/.test(navigator.vendor),wo.ios=wo.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),wo.mac=wo.ios||/Mac/.test(navigator.platform),wo.android=/Android \d/.test(navigator.userAgent),wo.webkit="webkitFontSmoothing"in document.documentElement.style,wo.webkit_version=wo.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var Do=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},Eo=function(t){var e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e},To=null,Oo=function(t,e,r){var n=To||(To=document.createRange());return n.setEnd(t,null==r?t.nodeValue.length:r),n.setStart(t,e||0),n},No=function(t,e,r,n){return r&&(zo(t,e,r,n,-1)||zo(t,e,r,n,1))},qo=/^(img|br|input|textarea|hr)$/i;function zo(t,e,r,n,o){for(;;){if(t==r&&e==n)return!0;if(e==(o<0?0:Io(t))){var i=t.parentNode;if(!i||1!=i.nodeType||Ro(t)||qo.test(t.nodeName)||"false"==t.contentEditable)return!1;e=Do(t)+(o<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(o<0?-1:0)]).contentEditable)return!1;e=o<0?Io(t):0}}}function Io(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Ro(t){for(var e,r=t;r&&!(e=r.pmViewDesc);r=r.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}var Lo=function(t){var e=t.isCollapsed;return e&&wo.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function Bo(t,e){var r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=t,r.key=r.code=e,r}function Fo(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Po(t,e){return"number"==typeof t?t:t[e]}function $o(t){var e=t.getBoundingClientRect(),r=e.width/t.offsetWidth||1,n=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*r,top:e.top,bottom:e.top+t.clientHeight*n}}function Vo(t,e,r){for(var n=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument,s=r||t.dom;s;s=Eo(s))if(1==s.nodeType){var a=s==i.body||1!=s.nodeType,c=a?Fo(i):$o(s),l=0,p=0;if(e.top<c.top+Po(n,"top")?p=-(c.top-e.top+Po(o,"top")):e.bottom>c.bottom-Po(n,"bottom")&&(p=e.bottom-c.bottom+Po(o,"bottom")),e.left<c.left+Po(n,"left")?l=-(c.left-e.left+Po(o,"left")):e.right>c.right-Po(n,"right")&&(l=e.right-c.right+Po(o,"right")),l||p)if(a)i.defaultView.scrollBy(l,p);else{var u=s.scrollLeft,h=s.scrollTop;p&&(s.scrollTop+=p),l&&(s.scrollLeft+=l);var f=s.scrollLeft-u,d=s.scrollTop-h;e={left:e.left-f,top:e.top-d,right:e.right-f,bottom:e.bottom-d}}if(a)break}}function jo(t){for(var e=[],r=t.ownerDocument;t&&(e.push({dom:t,top:t.scrollTop,left:t.scrollLeft}),t!=r);t=Eo(t));return e}function Uo(t,e){for(var r=0;r<t.length;r++){var n=t[r],o=n.dom,i=n.top,s=n.left;o.scrollTop!=i+e&&(o.scrollTop=i+e),o.scrollLeft!=s&&(o.scrollLeft=s)}}var Ho=null;function Jo(t,e){for(var r,n,o=2e8,i=0,s=e.top,a=e.top,c=t.firstChild,l=0;c;c=c.nextSibling,l++){var p=void 0;if(1==c.nodeType)p=c.getClientRects();else{if(3!=c.nodeType)continue;p=Oo(c).getClientRects()}for(var u=0;u<p.length;u++){var h=p[u];if(h.top<=s&&h.bottom>=a){s=Math.max(h.bottom,s),a=Math.min(h.top,a);var f=h.left>e.left?h.left-e.left:h.right<e.left?e.left-h.right:0;if(f<o){r=c,o=f,n=f&&3==r.nodeType?{left:h.right<e.left?h.right:h.left,top:e.top}:e,1==c.nodeType&&f&&(i=l+(e.left>=(h.left+h.right)/2?1:0));continue}}!r&&(e.left>=h.right&&e.top>=h.top||e.left>=h.left&&e.top>=h.bottom)&&(i=l+1)}}
443return r&&3==r.nodeType?function(t,e){for(var r=t.nodeValue.length,n=document.createRange(),o=0;o<r;o++){n.setEnd(t,o+1),n.setStart(t,o);var i=Ko(n,1);if(i.top!=i.bottom&&Wo(e,i))return{node:t,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}(r,n):!r||o&&1==r.nodeType?{node:t,offset:i}:Jo(r,n)}function Wo(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Zo(t,e,r){var n=t.childNodes.length;if(n&&r.top<r.bottom)for(var o=Math.max(0,Math.min(n-1,Math.floor(n*(e.top-r.top)/(r.bottom-r.top))-2)),i=o;;){var s=t.childNodes[i];if(1==s.nodeType)for(var a=s.getClientRects(),c=0;c<a.length;c++){var l=a[c];if(Wo(e,l))return Zo(s,e,l)}if((i=(i+1)%n)==o)break}return t}function Go(t,e){var r,n,o,i,s=t.dom.ownerDocument;if(s.caretPositionFromPoint)try{var a=s.caretPositionFromPoint(e.left,e.top);a&&(o=(r=a).offsetNode,i=r.offset)}catch(t){}if(!o&&s.caretRangeFromPoint){var c=s.caretRangeFromPoint(e.left,e.top);c&&(o=(n=c).startContainer,i=n.startOffset)}var l,p=(t.root.elementFromPoint?t.root:s).elementFromPoint(e.left,e.top+1);if(!p||!t.dom.contains(1!=p.nodeType?p.parentNode:p)){var u=t.dom.getBoundingClientRect();if(!Wo(e,u))return null;if(!(p=Zo(t.dom,e,u)))return null}if(wo.safari)for(var h=p;o&&h;h=Eo(h))h.draggable&&(o=i=null);if(p=function(t,e){var r=t.parentNode;return r&&/^li$/i.test(r.nodeName)&&e.left<t.getBoundingClientRect().left?r:t}(p,e),o){if(wo.gecko&&1==o.nodeType&&(i=Math.min(i,o.childNodes.length))<o.childNodes.length){var f,d=o.childNodes[i];"IMG"==d.nodeName&&(f=d.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&i++}o==t.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&e.top>o.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(l=function(t,e,r,n){for(var o=-1,i=e;i!=t.dom;){var s=t.docView.nearestDesc(i,!0);if(!s)return null;if(s.node.isBlock&&s.parent){var a=s.dom.getBoundingClientRect();if(a.left>n.left||a.top>n.top)o=s.posBefore;else{if(!(a.right<n.left||a.bottom<n.top))break;o=s.posAfter}}i=s.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,r)}(t,o,i,e))}null==l&&(l=function(t,e,r){var n=Jo(e,r),o=n.node,i=n.offset,s=-1;if(1==o.nodeType&&!o.firstChild){var a=o.getBoundingClientRect();s=a.left!=a.right&&r.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(o,i,s)}(t,p,e));var m=t.docView.nearestDesc(p,!0);return{pos:l,inside:m?m.posAtStart-m.border:-1}}function Ko(t,e){var r=t.getClientRects();return r.length?r[e<0?0:r.length-1]:t.getBoundingClientRect()}var Yo=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Qo(t,e,r){var n=t.docView.domFromPos(e,r<0?-1:1),o=n.node,i=n.offset,s=wo.webkit||wo.gecko;if(3==o.nodeType){if(!s||!Yo.test(o.nodeValue)&&(r<0?i:i!=o.nodeValue.length)){var a=i,c=i,l=r<0?1:-1;return r<0&&!i?(c++,l=-1):r>=0&&i==o.nodeValue.length?(a--,l=1):r<0?a--:c++,Xo(Ko(Oo(o,a,c),l),l<0)}var p=Ko(Oo(o,i,i),r);if(wo.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var u=Ko(Oo(o,i-1,i-1),-1);if(u.top==p.top){var h=Ko(Oo(o,i,i+1),-1);if(h.top!=p.top)return Xo(h,h.left<u.left)}}return p}if(!t.state.doc.resolve(e).parent.inlineContent){if(i&&(r<0||i==Io(o))){var f=o.childNodes[i-1];if(1==f.nodeType)return ti(f.getBoundingClientRect(),!1)}if(i<Io(o)){var d=o.childNodes[i];if(1==d.nodeType)return ti(d.getBoundingClientRect(),!0)}return ti(o.getBoundingClientRect(),r>=0)}if(i&&(r<0||i==Io(o))){var m=o.childNodes[i-1],g=3==m.nodeType?Oo(m,Io(m)-(s?0:1)):1!=m.nodeType||"BR"==m.nodeName&&m.nextSibling?null:m;if(g)return Xo(Ko(g,1),!1)}if(i<Io(o)){for(var v=o.childNodes[i];v.pmViewDesc&&v.pmViewDesc.ignoreForCoords;)v=v.nextSibling;var y=v?3==v.nodeType?Oo(v,0,s?0:1):1==v.nodeType?v:null:null;if(y)return Xo(Ko(y,-1),!0)}return Xo(Ko(3==o.nodeType?Oo(o):o,-r),r>=0)}function Xo(t,e){if(0==t.width)return t;var r=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:r,right:r}}function ti(t,e){if(0==t.height)return t;var r=e?t.top:t.bottom;return{top:r,bottom:r,left:t.left,right:t.right}}function ei(t,e,r){var n=t.state,o=t.root.activeElement;n!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return r()}finally{n!=e&&t.updateState(n),o!=t.dom&&o&&o.focus()}}var ri=/[\u0590-\u08ac]/,ni=null,oi=null,ii=!1;var si=function(t,e,r,n){this.parent=t,this.children=e,this.dom=r,r.pmViewDesc=this,this.contentDOM=n,this.dirty=0},ai={size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};si.prototype.matchesWidget=function(){return!1},si.prototype.matchesMark=function(){return!1},si.prototype.matchesNode=function(){return!1},si.prototype.matchesHack=function(t){return!1},si.prototype.parseRule=function(){return null},si.prototype.stopEvent=function(){return!1},ai.size.get=function(){for(var t=0,e=0;e<this.children.length;e++)t+=this.children[e].size;return t},ai.border.get=function(){return 0},si.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null);for(var t=0;t<this.children.length;t++)this.children[t].destroy()},si.prototype.posBeforeChild=function(t){for(var e=0,r=this.posAtStart;e<this.children.length;e++){var n=this.children[e];if(n==t)return r;r+=n.size}},ai.posBefore.get=function(){return this.parent.posBeforeChild(this)},ai.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},ai.posAfter.get=function(){return this.posBefore+this.size},ai.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},si.prototype.localPosFromDOM=function(t,e,r){if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(r<0){var n,o;if(t==this.contentDOM)n=t.childNodes[e-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.previousSibling}for(;n&&(!(o=n.pmViewDesc)||o.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(o)+o.size:this.posAtStart}var i,s;if(t==this.contentDOM)i=t.childNodes[e];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.nextSibling}for(;i&&(!(s=i.pmViewDesc)||s.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}var a;if(t==this.dom&&this.contentDOM)a=e>Do(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))a=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(var c=t;;c=c.parentNode){if(c==this.dom){a=!1;break}if(c.parentNode.firstChild!=c)break}if(null==a&&e==t.childNodes.length)for(var l=t;;l=l.parentNode){if(l==this.dom){a=!0;break}if(l.parentNode.lastChild!=l)break}}return(null==a?r>0:a)?this.posAtEnd:this.posAtStart},si.prototype.nearestDesc=function(t,e){for(var r=!0,n=t;n;n=n.parentNode){var o=this.getDesc(n);if(o&&(!e||o.node)){if(!r||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==t.nodeType?t:t.parentNode):o.nodeDOM==t))return o;r=!1}}},si.prototype.getDesc=function(t){for(var e=t.pmViewDesc,r=e;r;r=r.parent)if(r==this)return e},si.prototype.posFromDOM=function(t,e,r){for(var n=t;n;n=n.parentNode){var o=this.getDesc(n);if(o)return o.localPosFromDOM(t,e,r)}return-1},si.prototype.descAt=function(t){for(var e=0,r=0;e<this.children.length;e++){var n=this.children[e],o=r+n.size;if(r==t&&o!=r){for(;!n.border&&n.children.length;)n=n.children[0];return n}if(t<o)return n.descAt(t-r-n.border);r=o}},si.prototype.domFromPos=function(t,e){if(!this.contentDOM)return{node:this.dom,offset:0};for(var r=0,n=0,o=0;r<this.children.length;r++){var i=this.children[r],s=o+i.size;if(s>t||i instanceof mi){n=t-o;break}o=s}if(n)return this.children[r].domFromPos(n-this.children[r].border,e);for(var a=void 0;r&&!(a=this.children[r-1]).size&&a instanceof li&&a.widget.type.side>=0;r--);if(e<=0){for(var c,l=!0;(c=r?this.children[r-1]:null)&&c.dom.parentNode!=this.contentDOM;r--,l=!1);return c&&e&&l&&!c.border&&!c.domAtom?c.domFromPos(c.size,e):{node:this.contentDOM,offset:c?Do(c.dom)+1:0}}for(var p,u=!0;(p=r<this.children.length?this.children[r]:null)&&p.dom.parentNode!=this.contentDOM;r++,u=!1);return p&&u&&!p.border&&!p.domAtom?p.domFromPos(0,e):{node:this.contentDOM,offset:p?Do(p.dom):this.contentDOM.childNodes.length}},si.prototype.parseRange=function(t,e,r){if(void 0===r&&(r=0),0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var n=-1,o=-1,i=r,s=0;;s++){var a=this.children[s],c=i+a.size;if(-1==n&&t<=c){var l=i+a.border;if(t>=l&&e<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,e,l);t=i;for(var p=s;p>0;p--){var u=this.children[p-1];if(u.size&&u.dom.parentNode==this.contentDOM&&!u.emptyChildAt(1)){n=Do(u.dom)+1;break}t-=u.size}-1==n&&(n=0)}if(n>-1&&(c>e||s==this.children.length-1)){e=c;for(var h=s+1;h<this.children.length;h++){var f=this.children[h];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=Do(f.dom);break}e+=f.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=c}return{node:this.contentDOM,from:t,to:e,fromOffset:n,toOffset:o}},si.prototype.emptyChildAt=function(t){if(this.border||!this.contentDOM||!this.children.length)return!1;var e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)},si.prototype.domAfterPos=function(t){var e=this.domFromPos(t,0),r=e.node,n=e.offset;if(1!=r.nodeType||n==r.childNodes.length)throw new RangeError("No node after pos "+t);return r.childNodes[n]},si.prototype.setSelection=function(t,e,r,n){for(var o=Math.min(t,e),i=Math.max(t,e),s=0,a=0;s<this.children.length;s++){var c=this.children[s],l=a+c.size;if(o>a&&i<l)return c.setSelection(t-a-c.border,e-a-c.border,r,n);a=l}var p=this.domFromPos(t,t?-1:1),u=e==t?p:this.domFromPos(e,e?-1:1),h=r.getSelection(),f=!1;if((wo.gecko||wo.safari)&&t==e){var d=p.node,m=p.offset;if(3==d.nodeType){if((f=m&&"\n"==d.nodeValue[m-1])&&m==d.nodeValue.length)for(var g=d,v=void 0;g;g=g.parentNode){if(v=g.nextSibling){"BR"==v.nodeName&&(p=u={node:v.parentNode,offset:Do(v)+1});break}
443var y=g.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{var k=d.childNodes[m-1];f=k&&("BR"==k.nodeName||"false"==k.contentEditable)}}if(wo.gecko&&h.focusNode&&h.focusNode!=u.node&&1==h.focusNode.nodeType){var b=h.focusNode.childNodes[h.focusOffset];b&&"false"==b.contentEditable&&(n=!0)}if(n||f&&wo.safari||!No(p.node,p.offset,h.anchorNode,h.anchorOffset)||!No(u.node,u.offset,h.focusNode,h.focusOffset)){var _=!1;if((h.extend||t==e)&&!f){h.collapse(p.node,p.offset);try{t!=e&&h.extend(u.node,u.offset),_=!0}catch(t){if(!(t instanceof DOMException))throw t}}if(!_){if(t>e){var w=p;p=u,u=w}var x=document.createRange();x.setEnd(u.node,u.offset),x.setStart(p.node,p.offset),h.removeAllRanges(),h.addRange(x)}}},si.prototype.ignoreMutation=function(t){return!this.contentDOM&&"selection"!=t.type},ai.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},si.prototype.markDirty=function(t,e){for(var r=0,n=0;n<this.children.length;n++){var o=this.children[n],i=r+o.size;if(r==i?t<=i&&e>=r:t<i&&e>r){var s=r+o.border,a=i-o.border;if(t>=s&&e<=a)return this.dirty=t==r||e==i?2:1,void(t!=s||e!=a||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-s,e-s):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=i}this.dirty=2},si.prototype.markParentsDirty=function(){for(var t=1,e=this.parent;e;e=e.parent,t++){var r=1==t?2:1;e.dirty<r&&(e.dirty=r)}},ai.domAtom.get=function(){return!1},ai.ignoreForCoords.get=function(){return!1},Object.defineProperties(si.prototype,ai);var ci=[],li=function(t){function e(e,r,n,o){var i,s=r.type.toDOM;if("function"==typeof s&&(s=s(n,(function(){return i?i.parent?i.parent.posBeforeChild(i):void 0:o}))),!r.type.spec.raw){if(1!=s.nodeType){var a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable=!1,s.classList.add("ProseMirror-widget")}t.call(this,e,ci,s,null),this.widget=r,i=this}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={domAtom:{configurable:!0}};return e.prototype.matchesWidget=function(t){return 0==this.dirty&&t.type.eq(this.widget.type)},e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.stopEvent=function(t){var e=this.widget.spec.stopEvent;return!!e&&e(t)},e.prototype.ignoreMutation=function(t){return"selection"!=t.type||this.widget.spec.ignoreSelection},e.prototype.destroy=function(){this.widget.type.destroy(this.dom),t.prototype.destroy.call(this)},r.domAtom.get=function(){return!0},Object.defineProperties(e.prototype,r),e}(si),pi=function(t){function e(e,r,n,o){t.call(this,e,ci,r,null),this.textDOM=n,this.text=o}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={size:{configurable:!0}};return r.size.get=function(){return this.text.length},e.prototype.localPosFromDOM=function(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e},e.prototype.domFromPos=function(t){return{node:this.textDOM,offset:t}},e.prototype.ignoreMutation=function(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue},Object.defineProperties(e.prototype,r),e}(si),ui=function(t){function e(e,r,n,o){t.call(this,e,[],n,o),this.mark=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.create=function(t,r,n,o){var i=o.nodeViews[r.type.name],s=i&&i(r,o,n);return s&&s.dom||(s=$t.renderSpec(document,r.type.spec.toDOM(r,n))),new e(t,r,s.dom,s.contentDOM||s.dom)},e.prototype.parseRule=function(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},e.prototype.matchesMark=function(t){return 3!=this.dirty&&this.mark.eq(t)},e.prototype.markDirty=function(e,r){if(t.prototype.markDirty.call(this,e,r),0!=this.dirty){for(var n=this.parent;!n.node;)n=n.parent;n.dirty<this.dirty&&(n.dirty=this.dirty),this.dirty=0}},e.prototype.slice=function(t,r,n){var o=e.create(this.parent,this.mark,!0,n),i=this.children,s=this.size;r<s&&(i=Di(i,r,s,n)),t>0&&(i=Di(i,0,t,n));for(var a=0;a<i.length;a++)i[a].parent=o;return o.children=i,o},e}(si),hi=function(t){function e(e,r,n,o,i,s,a,c,l){t.call(this,e,r.isLeaf?ci:[],i,s),this.nodeDOM=a,this.node=r,this.outerDeco=n,this.innerDeco=o,s&&this.updateChildren(c,l)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={size:{configurable:!0},border:{configurable:!0},domAtom:{configurable:!0}};return e.create=function(t,r,n,o,i,s){var a,c,l=i.nodeViews[r.type.n
443ame],p=l&&l(r,i,(function(){return c?c.parent?c.parent.posBeforeChild(c):void 0:s}),n,o),u=p&&p.dom,h=p&&p.contentDOM;if(r.isText)if(u){if(3!=u.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(r.text);else u||(u=(a=$t.renderSpec(document,r.type.spec.toDOM(r))).dom,h=a.contentDOM);h||r.isText||"BR"==u.nodeName||(u.hasAttribute("contenteditable")||(u.contentEditable=!1),r.type.spec.draggable&&(u.draggable=!0));var f=u;return u=xi(u,n,r),p?c=new gi(t,r,n,o,u,h,f,p,i,s+1):r.isText?new di(t,r,n,o,u,f,i):new e(t,r,n,o,u,h,f,i,s+1)},e.prototype.parseRule=function(){var t=this;if(this.node.type.spec.reparseInView)return null;var e={node:this.node.type.name,attrs:this.node.attrs};return"pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?e.contentElement=this.contentDOM:e.getContent=function(){return t.contentDOM?T.empty:t.node.content},e},e.prototype.matchesNode=function(t,e,r){return 0==this.dirty&&t.eq(this.node)&&Ci(e,this.outerDeco)&&r.eq(this.innerDeco)},r.size.get=function(){return this.node.nodeSize},r.border.get=function(){return this.node.isLeaf?0:1},e.prototype.updateChildren=function(t,e){var r=this,n=this.node.inlineContent,o=e,i=t.composing&&this.localCompositionInfo(t,e),s=i&&i.pos>-1?i:null,a=i&&i.pos<0,c=new Ai(this,s&&s.node);!function(t,e,r,n){var o=e.locals(t),i=0;if(0!=o.length)for(var s=0,a=[],c=null,l=0;;){if(s<o.length&&o[s].to==i){for(var p=o[s++],u=void 0;s<o.length&&o[s].to==i;)(u||(u=[p])).push(o[s++]);if(u){u.sort(Mi);for(var h=0;h<u.length;h++)r(u[h],l,!!c)}else r(p,l,!!c)}var f=void 0,d=void 0;if(c)d=-1,f=c,c=null;else{if(!(l<t.childCount))break;d=l,f=t.child(l++)}for(var m=0;m<a.length;m++)a[m].to<=i&&a.splice(m--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)a.push(o[s++]);var g=i+f.nodeSize;if(f.isText){var v=g;s<o.length&&o[s].from<v&&(v=o[s].from);for(var y=0;y<a.length;y++)a[y].to<v&&(v=a[y].to);v<g&&(c=f.cut(v-i),f=f.cut(0,v-i),g=v,d=-1)}n(f,a.length?f.isInline&&!f.isLeaf?a.filter((function(t){return!t.inline})):a.slice():ci,e.forChild(i,f),d),i=g}else for(var k=0;k<t.childCount;k++){var b=t.child(k);n(b,o,e.forChild(i,b),k),i+=b.nodeSize}}(this.node,this.innerDeco,(function(e,i,s){e.spec.marks?c.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!s&&c.syncToMarks(i==r.node.childCount?I.none:r.node.child(i).marks,n,t),c.placeWidget(e,t,o)}),(function(e,r,s,l){var p;c.syncToMarks(e.marks,n,t),c.findNodeMatch(e,r,s,l)||a&&t.state.selection.from>o&&t.state.selection.to<o+e.nodeSize&&(p=c.findIndexWithChild(i.node))>-1&&c.updateNodeAt(e,r,s,p,t)||c.updateNextNode(e,r,s,t,l)||c.addNode(e,r,s,t,o),o+=e.nodeSize})),c.syncToMarks(ci,n,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||2==this.dirty)&&(s&&this.protectLocalComposition(t,s),vi(this.contentDOM,this.children,t),wo.ios&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){var e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))},e.prototype.localCompositionInfo=function(t,e){var r=t.state.selection,n=r.from,o=r.to;if(!(!(t.state.selection instanceof Te)||n<e||o>e+this.node.content.size)){var i=t.root.getSelection(),s=function(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];e=Io(t=t.childNodes[e-1])}else{if(!(1==t.nodeType&&e<t.childNodes.length))return null;t=t.childNodes[e],e=0}}}(i.focusNode,i.focusOffset);if(s&&this.dom.contains(s.parentNode)){if(this.node.inlineContent){var a=s.nodeValue,c=function(t,e,r,n){for(var o=0,i=0;o<t.childCount&&i<=n;){var s=t.child(o++),a=i;if(i+=s.nodeSize,s.isText){for(var c=s.text;o<t.childCount;){var l=t.child(o++);if(i+=l.nodeSize,!l.isText)break;c+=l.text}if(i>=r){var p=a<n?c.lastIndexOf(e,n-a-1):-1;if(p>=0&&p+e.length+a>=r)return a+p;if(r==n&&c.length>=n+e.length-a&&c.slice(n-a,n-a+e.length)==e)return n}}}return-1}(this.node.content,a,n-e,o-e);return c<0?null:{node:s,pos:c,text:a}}return{node:s,pos:-1}}}},e.prototype.protectLocalComposition=function(t,e){var r=e.node,n=e.pos,o=e.text;if(!this.getDesc(r)){for(var i=r;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var s=new pi(this,i,r,o);t.compositionNodes.push(s),this.children=Di(this.children,n,n+o.length,t,s)}},e.prototype.update=function(t,e,r,n){return!(3==this.dirty||!t.sameMarkup(this.node)||(this.updateInner(t,e,r,n),0))},e.prototype.updateInner=function(t,e,r,n){this.updateOuterDeco(e),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(n,this.posAtStart),this.dirty=0},e.prototype.updateOuterDeco=function(t){if(!Ci(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,r=this.dom;this.dom=_i(this.dom,this.nodeDOM,bi(this.outerDeco,this.node,e),bi(t,this.node,e)),this.dom!=r&&(r.pmVie
443wDesc=null,this.dom.pmViewDesc=this),this.outerDeco=t}},e.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},e.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},r.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(e.prototype,r),e}(si);function fi(t,e,r,n,o){return xi(n,e,t),new hi(null,t,e,r,n,n,n,o,0)}var di=function(t){function e(e,r,n,o,i,s,a){t.call(this,e,r,n,o,i,null,s,a)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={domAtom:{configurable:!0}};return e.prototype.parseRule=function(){for(var t=this.nodeDOM.parentNode;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}},e.prototype.update=function(t,e,r,n){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node)||(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,n.trackWrites==this.nodeDOM&&(n.trackWrites=null)),this.node=t,this.dirty=0,0))},e.prototype.inParent=function(){for(var t=this.parent.contentDOM,e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1},e.prototype.domFromPos=function(t){return{node:this.nodeDOM,offset:t}},e.prototype.localPosFromDOM=function(e,r,n){return e==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):t.prototype.localPosFromDOM.call(this,e,r,n)},e.prototype.ignoreMutation=function(t){return"characterData"!=t.type&&"selection"!=t.type},e.prototype.slice=function(t,r,n){var o=this.node.cut(t,r),i=document.createTextNode(o.text);return new e(this.parent,o,this.outerDeco,this.innerDeco,i,i,n)},e.prototype.markDirty=function(e,r){t.prototype.markDirty.call(this,e,r),this.dom==this.nodeDOM||0!=e&&r!=this.nodeDOM.nodeValue.length||(this.dirty=3)},r.domAtom.get=function(){return!1},Object.defineProperties(e.prototype,r),e}(hi),mi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};return e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(t){return 0==this.dirty&&this.dom.nodeName==t},r.domAtom.get=function(){return!0},r.ignoreForCoords.get=function(){return"IMG"==this.dom.nodeName},Object.defineProperties(e.prototype,r),e}(si),gi=function(t){function e(e,r,n,o,i,s,a,c,l,p){t.call(this,e,r,n,o,i,s,a,l,p),this.spec=c}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.update=function(e,r,n,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(e,r,n);return i&&this.updateInner(e,r,n,o),i}return!(!this.contentDOM&&!e.isLeaf)&&t.prototype.update.call(this,e,r,n,o)},e.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():t.prototype.selectNode.call(this)},e.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():t.prototype.deselectNode.call(this)},e.prototype.setSelection=function(e,r,n,o){this.spec.setSelection?this.spec.setSelection(e,r,n):t.prototype.setSelection.call(this,e,r,n,o)},e.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),t.prototype.destroy.call(this)},e.prototype.stopEvent=function(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)},e.prototype.ignoreMutation=function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):t.prototype.ignoreMutation.call(this,e)},e}(hi);function vi(t,e,r){for(var n=t.firstChild,o=!1,i=0;i<e.length;i++){var s=e[i],a=s.dom;if(a.parentNode==t){for(;a!=n;)n=Si(n),o=!0;n=n.nextSibling}else o=!0,t.insertBefore(a,n);if(s instanceof ui){var c=n?n.previousSibling:t.lastChild;vi(s.contentDOM,s.children,r),n=c?c.nextSibling:t.firstChild}}for(;n;)n=Si(n),o=!0;o&&r.trackWrites==t&&(r.trackWrites=null)}function yi(t){t&&(this.nodeName=t)}yi.prototype=Object.create(null);var ki=[new yi];function bi(t,e,r){if(0==t.length)return ki;for(var n=r?ki[0]:new yi,o=[n],i=0;i<t.length;i++){var s=t[i].type.attrs;if(s)for(var a in s.nodeName&&o.push(n=new yi(s.nodeName)),s){var c=s[a];null!=c&&(r&&1==o.length&&o.push(n=new yi(e.isInline?"span":"div")),"class"==a?n.class=(n.class?n.class+" ":"")+c:"style"==a?n.style=(n.style?n.style+";":"")+c:"nodeName"!=a&&(n[a]=c))}}return o}function _i(t,e,r,n){if(r==ki&&n==ki)return e;for(var o=e,i=0;i<n.length;i++){var s=n[i],a=r[i];if(i){var c=void 0;a&&a.nodeName==s.nodeName&&o!=t&&(c=o.parentNode)&&c.tagName.toLowerCase()==s.nodeName||((c=document.createElement(s.nodeName)).pmIsDeco=!0,c.appendChild(o),a=ki[0]),o=c}wi(o,a||ki[0],s)}return o}function wi(t,e,r){for(var n in e)"class"==n||"style"==n||"nodeName"==n||n in r||t.removeAttribute(n);for(var o in r)"class"!=o&&"style"!=o&&"nodeName"!=o&&r[o]!=e[o]&&t.setAttribute(o,r[o]);if(e.class!=r.class){for(var i=e.class?e.class.split(" ").filter(
443Boolean):ci,s=r.class?r.class.split(" ").filter(Boolean):ci,a=0;a<i.length;a++)-1==s.indexOf(i[a])&&t.classList.remove(i[a]);for(var c=0;c<s.length;c++)-1==i.indexOf(s[c])&&t.classList.add(s[c]);0==t.classList.length&&t.removeAttribute("class")}if(e.style!=r.style){if(e.style)for(var l,p=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;l=p.exec(e.style);)t.style.removeProperty(l[1]);r.style&&(t.style.cssText+=r.style)}}function xi(t,e,r){return _i(t,t,ki,bi(e,r,1!=t.nodeType))}function Ci(t,e){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(!t[r].type.eq(e[r].type))return!1;return!0}function Si(t){var e=t.nextSibling;return t.parentNode.removeChild(t),e}var Ai=function(t,e){this.top=t,this.lock=e,this.index=0,this.stack=[],this.changed=!1,this.preMatch=function(t,e){var r=e,n=r.children.length,o=t.childCount,i=new Map,s=[];t:for(;o>0;){for(var a=void 0;;)if(n){var c=r.children[n-1];if(!(c instanceof ui)){a=c,n--;break}r=c,n=c.children.length}else{if(r==e)break t;n=r.parent.children.indexOf(r),r=r.parent}var l=a.node;if(l){if(l!=t.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}(t.node.content,t)};function Mi(t,e){return t.type.side-e.type.side}function Di(t,e,r,n,o){for(var i=[],s=0,a=0;s<t.length;s++){var c=t[s],l=a,p=a+=c.size;l>=r||p<=e?i.push(c):(l<e&&i.push(c.slice(0,e-l,n)),o&&(i.push(o),o=null),p>r&&i.push(c.slice(r-l,c.size,n)))}return i}function Ei(t,e){var r=t.root.getSelection(),n=t.state.doc;if(!r.focusNode)return null;var o=t.docView.nearestDesc(r.focusNode),i=o&&0==o.size,s=t.docView.posFromDOM(r.focusNode,r.focusOffset);if(s<0)return null;var a,c,l=n.resolve(s);if(Lo(r)){for(a=l;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&Ne.isSelectable(o.node)&&o.parent&&(!o.node.isInline||!function(t,e,r){for(var n=0==e,o=e==Io(t);n||o;){if(t==r)return!0;var i=Do(t);if(!(t=t.parentNode))return!1;n=n&&0==i,o=o&&i==Io(t)}}(r.focusNode,r.focusOffset,o.dom))){var p=o.posBefore;c=new Ne(s==p?l:n.resolve(p))}}else{var u=t.docView.posFromDOM(r.anchorNode,r.anchorOffset);if(u<0)return null;a=n.resolve(u)}return c||(c=Bi(t,a,l,"pointer"==e||t.state.selection.head<l.pos&&!i?1:-1)),c}function Ti(t){return t.editable?t.hasFocus():Fi(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Oi(t,e){var r=t.state.selection;if(Ri(t,r),Ti(t)){if(!e&&t.mouseDown&&t.mouseDown.allowDefault&&wo.chrome){var n=t.root.getSelection(),o=t.domObserver.currentSelection;if(n.anchorNode&&No(n.anchorNode,n.anchorOffset,o.anchorNode,o.anchorOffset))return t.mouseDown.delayedSelectionSync=!0,void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)!function(t){var e=t.root.getSelection(),r=document.createRange(),n=t.cursorWrapper.dom,o="IMG"==n.nodeName;o?r.setEnd(n.parentNode,Do(n)+1):r.setEnd(n,0),r.collapse(!1),e.removeAllRanges(),e.addRange(r),!o&&!t.state.selection.visible&&wo.ie&&wo.ie_version<=11&&(n.disabled=!0,n.disabled=!1)}(t);else{var i,s,a=r.anchor,c=r.head;!Ni||r instanceof Te||(r.$from.parent.inlineContent||(i=qi(t,r.from)),r.empty||r.$from.parent.inlineContent||(s=qi(t,r.to))),t.docView.setSelection(a,c,t.root,e),Ni&&(i&&Ii(i),s&&Ii(s)),r.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(t){var e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.hideSelectionGuard);var r=t.root.getSelection(),n=r.anchorNode,o=r.anchorOffset;e.addEventListener("selectionchange",t.hideSelectionGuard=function(){r.anchorNode==n&&r.anchorOffset==o||(e.removeEventListener("selectionchange",t.hideSelectionGuard),setTimeout((function(){Ti(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")}),20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}Ai.prototype.destroyBetween=function(t,e){if(t!=e){for(var r=t;r<e;r++)this.top.children[r].destroy();this.top.children.splice(t,e-t),this.changed=!0}},Ai.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},Ai.prototype.syncToMarks=function(t,e,r){for(var n=0,o=this.stack.length>>1,i=Math.min(o,t.length);n<i&&(n==o-1?this.top:this.stack[n+1<<1]).matchesMark(t[n])&&!1!==t[n].type.spec.spanning;)n++;for(;n<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<t.length;){this.stack.push(this.top,this.index+1);for(var s=-1,a=this.index;a<Math.min(this.index+3,this.top.children.length);a++)if(this.top.children[a].matchesMark(t[o])){s=a;break}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{var c=ui.create(this.top,t[o],e,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},Ai.prototype.findNodeMatch=function(t,e,r,n){var o,i=-1;
443if(n>=this.preMatch.index&&(o=this.preMatch.matches[n-this.preMatch.index]).parent==this.top&&o.matchesNode(t,e,r))i=this.top.children.indexOf(o,this.index);else for(var s=this.index,a=Math.min(this.top.children.length,s+5);s<a;s++){var c=this.top.children[s];if(c.matchesNode(t,e,r)&&!this.preMatch.matched.has(c)){i=s;break}}return!(i<0||(this.destroyBetween(this.index,i),this.index++,0))},Ai.prototype.updateNodeAt=function(t,e,r,n,o){return!!this.top.children[n].update(t,e,r,o)&&(this.destroyBetween(this.index,n),this.index=n+1,!0)},Ai.prototype.findIndexWithChild=function(t){for(;;){var e=t.parentNode;if(!e)return-1;if(e==this.top.contentDOM){var r=t.pmViewDesc;if(r)for(var n=this.index;n<this.top.children.length;n++)if(this.top.children[n]==r)return n;return-1}t=e}},Ai.prototype.updateNextNode=function(t,e,r,n,o){for(var i=this.index;i<this.top.children.length;i++){var s=this.top.children[i];if(s instanceof hi){var a=this.preMatch.matched.get(s);if(null!=a&&a!=o)return!1;var c=s.dom;if((!this.lock||!(c==this.lock||1==c.nodeType&&c.contains(this.lock.parentNode))||t.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==t.text&&3!=s.dirty&&Ci(e,s.outerDeco))&&s.update(t,e,r,n))return this.destroyBetween(this.index,i),s.dom!=c&&(this.changed=!0),this.index++,!0;break}}return!1},Ai.prototype.addNode=function(t,e,r,n,o){this.top.children.splice(this.index++,0,hi.create(this.top,t,e,r,n,o)),this.changed=!0},Ai.prototype.placeWidget=function(t,e,r){var n=this.index<this.top.children.length?this.top.children[this.index]:null;if(!n||!n.matchesWidget(t)||t!=n.widget&&n.widget.type.toDOM.parentNode){var o=new li(this.top,t,e,r);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++},Ai.prototype.addTextblockHacks=function(){for(var t=this.top.children[this.index-1];t instanceof ui;)t=t.children[t.children.length-1];t&&t instanceof di&&!/\n$/.test(t.node.text)||((wo.safari||wo.chrome)&&t&&"false"==t.dom.contentEditable&&this.addHackNode("IMG"),this.addHackNode("BR"))},Ai.prototype.addHackNode=function(t){if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack(t))this.index++;else{var e=document.createElement(t);"IMG"==t&&(e.className="ProseMirror-separator",e.alt=""),"BR"==t&&(e.className="ProseMirror-trailingBreak"),this.top.children.splice(this.index++,0,new mi(this.top,ci,e,null)),this.changed=!0}};var Ni=wo.safari||wo.chrome&&wo.chrome_version<63;function qi(t,e){var r=t.docView.domFromPos(e,0),n=r.node,o=r.offset,i=o<n.childNodes.length?n.childNodes[o]:null,s=o?n.childNodes[o-1]:null;if(wo.safari&&i&&"false"==i.contentEditable)return zi(i);if(!(i&&"false"!=i.contentEditable||s&&"false"!=s.contentEditable)){if(i)return zi(i);if(s)return zi(s)}}function zi(t){return t.contentEditable="true",wo.safari&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Ii(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function Ri(t,e){if(e instanceof Ne){var r=t.docView.descAt(e.from);r!=t.lastSelectedViewDesc&&(Li(t),r&&r.selectNode(),t.lastSelectedViewDesc=r)}else Li(t)}function Li(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=null)}function Bi(t,e,r,n){return t.someProp("createSelectionBetween",(function(n){return n(t,e,r)}))||Te.between(e,r,n)}function Fi(t){var e=t.root.getSelection();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(t){return!1}}function Pi(t,e){var r=t.selection,n=r.$anchor,o=r.$head,i=e>0?n.max(o):n.min(o),s=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return s&&Me.findFrom(s,e)}function $i(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Vi(t,e,r){var n=t.state.selection;if(!(n instanceof Te)){if(n instanceof Ne&&n.node.isInline)return $i(t,new Te(e>0?n.$to:n.$from));var o=Pi(t.state,e);return!!o&&$i(t,o)}if(!n.empty||r.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){var i=Pi(t.state,e);return!!(i&&i instanceof Ne)&&$i(t,i)}if(!(wo.mac&&r.indexOf("m")>-1)){var s,a=n.$head,c=a.textOffset?null:e<0?a.nodeBefore:a.nodeAfter;if(!c||c.isText)return!1;var l=e<0?a.pos-c.nodeSize:a.pos;return!!(c.isAtom||(s=t.docView.descAt(l))&&!s.contentDOM)&&(Ne.isSelectable(c)?$i(t,new Ne(e<0?t.state.doc.resolve(a.pos-c.nodeSize):a)
443):!!wo.webkit&&$i(t,new Te(t.state.doc.resolve(e<0?l:l+c.nodeSize))))}}function ji(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Ui(t){var e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function Hi(t){var e=t.root.getSelection(),r=e.focusNode,n=e.focusOffset;if(r){var o,i,s=!1;for(wo.gecko&&1==r.nodeType&&n<ji(r)&&Ui(r.childNodes[n])&&(s=!0);;)if(n>0){if(1!=r.nodeType)break;var a=r.childNodes[n-1];if(Ui(a))o=r,i=--n;else{if(3!=a.nodeType)break;n=(r=a).nodeValue.length}}else{if(Wi(r))break;for(var c=r.previousSibling;c&&Ui(c);)o=r.parentNode,i=Do(c),c=c.previousSibling;if(c)n=ji(r=c);else{if((r=r.parentNode)==t.dom)break;n=0}}s?Zi(t,e,r,n):o&&Zi(t,e,o,i)}}function Ji(t){var e=t.root.getSelection(),r=e.focusNode,n=e.focusOffset;if(r){for(var o,i,s=ji(r);;)if(n<s){if(1!=r.nodeType)break;if(!Ui(r.childNodes[n]))break;o=r,i=++n}else{if(Wi(r))break;for(var a=r.nextSibling;a&&Ui(a);)o=a.parentNode,i=Do(a)+1,a=a.nextSibling;if(a)n=0,s=ji(r=a);else{if((r=r.parentNode)==t.dom)break;n=s=0}}o&&Zi(t,e,o,i)}}function Wi(t){var e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Zi(t,e,r,n){if(Lo(e)){var o=document.createRange();o.setEnd(r,n),o.setStart(r,n),e.removeAllRanges(),e.addRange(o)}else e.extend&&e.extend(r,n);t.domObserver.setCurSelection();var i=t.state;setTimeout((function(){t.state==i&&Oi(t)}),50)}function Gi(t,e,r){var n=t.state.selection;if(n instanceof Te&&!n.empty||r.indexOf("s")>-1)return!1;if(wo.mac&&r.indexOf("m")>-1)return!1;var o=n.$from,i=n.$to;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){var s=Pi(t.state,e);if(s&&s instanceof Ne)return $i(t,s)}if(!o.parent.inlineContent){var a=e<0?o:i,c=n instanceof ze?Me.near(a,e):Me.findFrom(a,e);return!!c&&$i(t,c)}return!1}function Ki(t,e){if(!(t.state.selection instanceof Te))return!0;var r=t.state.selection,n=r.$head,o=r.$anchor,i=r.empty;if(!n.sameParent(o))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;var s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){var a=t.state.tr;return e<0?a.delete(n.pos-s.nodeSize,n.pos):a.delete(n.pos,n.pos+s.nodeSize),t.dispatch(a),!0}return!1}function Yi(t,e,r){t.domObserver.stop(),e.contentEditable=r,t.domObserver.start()}function Qi(t){var e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(wo.safari&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){var r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}if(t.parentNode.lastChild==t||wo.safari&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0}}function Xi(t,e,r){return Math.max(r.anchor,r.head)>e.content.size?null:Bi(t,e.resolve(r.anchor),e.resolve(r.head))}function ts(t,e,r){for(var n=t.depth,o=e?t.end():t.pos;n>0&&(e||t.indexAfter(n)==t.node(n).childCount);)n--,o++,e=!1;if(r)for(var i=t.node(n).maybeChild(t.indexAfter(n));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function es(t,e){for(var r=[],n=e.content,o=e.openStart,i=e.openEnd;o>1&&i>1&&1==n.childCount&&1==n.firstChild.childCount;){o--,i--;var s=n.firstChild;r.push(s.type.name,s.attrs!=s.type.defaultAttrs?s.attrs:null),n=s.content}var a=t.someProp("clipboardSerializer")||$t.fromSchema(t.state.schema),c=hs(),l=c.createElement("div");l.appendChild(a.serializeFragment(n,{document:c}));for(var p,u=l.firstChild;u&&1==u.nodeType&&(p=ps[u.nodeName.toLowerCase()]);){for(var h=p.length-1;h>=0;h--){for(var f=c.createElement(p[h]);l.firstChild;)f.appendChild(l.firstChild);l.appendChild(f),"tbody"!=p[h]&&(o++,i++)}u=l.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",o+" "+i+" "+JSON.stringify(r)),{dom:l,text:t.someProp("clipboardTextSerializer",(function(t){return t(e)}))||e.content.textBetween(0,e.content.size,"\n\n")}}function rs(t,e,r,n,o){var i,s,a=o.parent.type.spec.code;if(!r&&!e)return null;var c=e&&(n||a||!r);if(c){if(t.someProp("transformPastedText",(function(t){e=t(e,a||n)})),a)return e?new L(T.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):L.empty;var l=t.someProp("clipboardTextParser",(function(t){return t(e,o,n)}));if(l)s=l;else{var p=o.marks(),u=t.state.schema,h=$t.fromSchema(u);
443i=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach((function(t){var e=i.appendChild(document.createElement("p"));t&&e.appendChild(h.serializeNode(u.text(t,p)))}))}}else t.someProp("transformPastedHTML",(function(t){r=t(r)})),i=function(t){var e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));var r,n=hs().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(t);if((r=o&&ps[o[1].toLowerCase()])&&(t=r.map((function(t){return"<"+t+">"})).join("")+t+r.map((function(t){return"</"+t+">"})).reverse().join("")),n.innerHTML=t,r)for(var i=0;i<r.length;i++)n=n.querySelector(r[i])||n;return n}(r),wo.webkit&&function(t){for(var e=t.querySelectorAll(wo.chrome?"span:not([class]):not([style])":"span.Apple-converted-space"),r=0;r<e.length;r++){var n=e[r];1==n.childNodes.length&&" "==n.textContent&&n.parentNode&&n.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),n)}}(i);var f=i&&i.querySelector("[data-pm-slice]"),d=f&&/^(\d+) (\d+) (.*)/.exec(f.getAttribute("data-pm-slice"));if(!s){var m=t.someProp("clipboardParser")||t.someProp("domParser")||Tt.fromSchema(t.state.schema);s=m.parseSlice(i,{preserveWhitespace:!(!c&&!d),context:o,ruleFromNode:function(t){if("BR"==t.nodeName&&!t.nextSibling&&t.parentNode&&!ns.test(t.parentNode.nodeName))return{ignore:!0}}})}if(d)s=function(t,e){if(!t.size)return t;var r,n=t.content.firstChild.type.schema;try{r=JSON.parse(e)}catch(e){return t}for(var o=t.content,i=t.openStart,s=t.openEnd,a=r.length-2;a>=0;a-=2){var c=n.nodes[r[a]];if(!c||c.hasRequiredAttrs())break;o=T.from(c.create(r[a+1],o)),i++,s++}return new L(o,i,s)}(ls(s,+d[1],+d[2]),d[3]);else if(s=L.maxOpen(function(t,e){if(t.childCount<2)return t;for(var r=function(r){var n=e.node(r).contentMatchAt(e.index(r)),o=void 0,i=[];if(t.forEach((function(t){if(i){var e,r=n.findWrapping(t.type);if(!r)return i=null;if(e=i.length&&o.length&&ss(r,o,t,i[i.length-1],0))i[i.length-1]=e;else{i.length&&(i[i.length-1]=as(i[i.length-1],o.length));var s=is(t,r);i.push(s),n=n.matchType(s.type,s.attrs),o=r}}})),i)return{v:T.from(i)}},n=e.depth;n>=0;n--){var o=r(n);if(o)return o.v}return t}(s.content,o),!0),s.openStart||s.openEnd){for(var g=0,v=0,y=s.content.firstChild;g<s.openStart&&!y.type.spec.isolating;g++,y=y.firstChild);for(var k=s.content.lastChild;v<s.openEnd&&!k.type.spec.isolating;v++,k=k.lastChild);s=ls(s,g,v)}return t.someProp("transformPasted",(function(t){s=t(s)})),s}var ns=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function is(t,e,r){void 0===r&&(r=0);for(var n=e.length-1;n>=r;n--)t=e[n].create(null,T.from(t));return t}function ss(t,e,r,n,o){if(o<t.length&&o<e.length&&t[o]==e[o]){var i=ss(t,e,r,n.lastChild,o+1);if(i)return n.copy(n.content.replaceChild(n.childCount-1,i));if(n.contentMatchAt(n.childCount).matchType(o==t.length-1?r.type:t[o+1]))return n.copy(n.content.append(T.from(is(r,t,o+1))))}}function as(t,e){if(0==e)return t;var r=t.content.replaceChild(t.childCount-1,as(t.lastChild,e-1)),n=t.contentMatchAt(t.childCount).fillBefore(T.empty,!0);return t.copy(r.append(n))}function cs(t,e,r,n,o,i){var s=e<0?t.firstChild:t.lastChild,a=s.content;return o<n-1&&(a=cs(a,e,r,n,o+1,i)),o>=r&&(a=e<0?s.contentMatchAt(0).fillBefore(a,t.childCount>1||i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(T.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function ls(t,e,r){return e<t.openStart&&(t=new L(cs(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),r<t.openEnd&&(t=new L(cs(t.content,1,r,t.openEnd,0,0),t.openStart,r)),t}var ps={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},us=null;function hs(){return us||(us=document.implementation.createHTMLDocument("title"))}var fs={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ds=wo.ie&&wo.ie_version<=11,ms=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};ms.prototype.set=function(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset},ms.prototype.eq=function(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset};var gs=function(t,e){var r=this;this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(t){for(var e=0;e<t.length;e++)r.queue.push(t[e]);wo.ie&&wo.ie_version<=11&&t.some((function(t){return"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length}))?r.flushSoon():r.flush()})),this.currentSelection=new ms,ds&&(this.onCharData=function(t){r.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};gs.prototype.flushSoon=function(){var t=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){t.flushingSoon=-1,t.flush()}),20))},gs.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},gs.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,fs),ds&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},gs.prototype.stop=function(){var t=this;if(this.observer){var e=this.observer.takeRecords();if(e.length){for(var r=0;r<e.length;r++)this.queue.push(e[r]);window.setTimeout((function(){return t.flush()}),20)}this.observer.disconnect()}ds&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},gs.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},gs.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},gs.prototype.suppressSelectionUpdates=function(){var t=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return t.suppressingSelectionUpdates=!1}),50)},gs.prototype.onSelectionChange=function(){if((!(t=this.view).editable||t.root.activeElement==t.dom)&&Fi(t)){var t;if(this.suppressingSelectionUpdates)return Oi(this.view);if(wo.ie&&wo.ie_version<=11&&!this.view.state.selection.empty){var e=this.view.root.getSelection();if(e.focusNode&&No(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}},gs.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},gs.prototype.ignoreSelectionChange=function(t){if(0==t.rangeCount)return!0;var e=t.getRangeAt(0).commonAncestorContainer,r=this.view.docView.nearestDesc(e);return r&&r.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0},gs.prototype.flush=function(){if(this.view.docView&&!(this.flushingSoon>-1)){var t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);var e=this.view.root.getSelection(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&Fi(this.view)&&!this.ignoreSelectionChange(e),n=-1,o=-1,i=!1,s=[];if(this.view.editable)for(var a=0;a<t.length;a++){var c=this.registerMutation(t[a],s);c&&(n=n<0?c.from:Math.min(c.from,n),o=o<0?c.to:Math.max(c.to,o),c.typeOver&&(i=!0))}if(wo.gecko&&s.length>1){var l=s.filter((function(t){return"BR"==t.nodeName}));if(2==l.length){var p=l[0],u=l[1];p.parentNode&&p.parentNode.parentNode==u.parentNode?u.remove():p.remove()}}(n>-1||r)&&(n>-1&&(this.view.docView.markDirty(n,o),h=this.view,vs||(vs=!0,"normal"==getComputedStyle(h.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."))),this.handleDOMChange(n,o,i,s),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||Oi(this.view),this.currentSelection.set(e))}var h},gs.prototype.registerMutation=function(t,e){if(e.indexOf(t.target)>-1)return null;var r=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(r==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!r||r.ignoreMutation(t))return null;if("childList"==t.type){for(var n=0;n<t.addedNodes.length;n++)e.push(t.addedNodes[n]);if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};var o=t.previousSibling,i=t.nextSibling;if(wo.ie&&wo.ie_version<=11&&t.addedNodes.length)for(var s=0;s<t.addedNodes.length;s++){var a=t.addedNodes[s],c=a.previousSibling,l=a.nextSibling;(!c||Array.prototype.indexOf.call(t.addedNodes,c)<0)&&(o=c),(!l||Array.prototype.indexOf.call(t.addedNodes,l)<0)&&(i=l)}var p=o&&o.parentNode==t.target?Do(o)+1:0,u=r.localPosFromDOM(t.target,p,-1),h=i&&i.parentNode==t.target?Do(i):t.target.childNodes.length;return{from:u,to:r.localPosFromDOM(t.target,h,1)}}return"attributes"==t.type?{from:r.posAtStart-r.border,to:r.posAt
443End+r.border}:{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}};var vs=!1,ys={},ks={};function bs(t,e){t.lastSelectionOrigin=e,t.lastSelectionTime=Date.now()}function _s(t){t.someProp("handleDOMEvents",(function(e){for(var r in e)t.eventHandlers[r]||t.dom.addEventListener(r,t.eventHandlers[r]=function(e){return ws(t,e)})}))}function ws(t,e){return t.someProp("handleDOMEvents",(function(r){var n=r[e.type];return!!n&&(n(t,e)||e.defaultPrevented)}))}function xs(t){return{left:t.clientX,top:t.clientY}}function Cs(t,e,r,n,o){if(-1==n)return!1;for(var i=t.state.doc.resolve(n),s=function(n){if(t.someProp(e,(function(e){return n>i.depth?e(t,r,i.nodeAfter,i.before(n),o,!0):e(t,r,i.node(n),i.before(n),o,!1)})))return{v:!0}},a=i.depth+1;a>0;a--){var c=s(a);if(c)return c.v}return!1}function Ss(t,e,r){t.focused||t.focus();var n=t.state.tr.setSelection(e);"pointer"==r&&n.setMeta("pointer",!0),t.dispatch(n)}function As(t,e,r,n){return Cs(t,"handleDoubleClickOn",e,r,n)||t.someProp("handleDoubleClick",(function(r){return r(t,e,n)}
443))}function Ms(t,e,r,n){return Cs(t,"handleTripleClickOn",e,r,n)||t.someProp("handleTripleClick",(function(r){return r(t,e,n)}))||function(t,e,r){if(0!=r.button)return!1;var n=t.state.doc;if(-1==e)return!!n.inlineContent&&(Ss(t,Te.create(n,0,n.content.size),"pointer"),!0);for(var o=n.resolve(e),i=o.depth+1;i>0;i--){var s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)Ss(t,Te.create(n,a+1,a+1+s.content.size),"pointer");else{if(!Ne.isSelectable(s))continue;Ss(t,Ne.create(n,a),"pointer")}return!0}}(t,r,n)}function Ds(t){return Is(t)}ks.keydown=function(t,e){if(t.shiftKey=16==e.keyCode||e.shiftKey,!Os(t,e)&&(t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),!wo.android||!wo.chrome||13!=e.keyCode))if(229!=e.keyCode&&t.domObserver.forceFlush(),!wo.ios||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)t.someProp("handleKeyDown",(function(r){return r(t,e)}))||function(t,e){var r=e.keyCode,n=function(t){var e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);return 8==r||wo.mac&&72==r&&"c"==n?Ki(t,-1)||Hi(t):46==r||wo.mac&&68==r&&"c"==n?Ki(t,1)||Ji(t):13==r||27==r||(37==r?Vi(t,-1,n)||Hi(t):39==r?Vi(t,1,n)||Ji(t):38==r?Gi(t,-1,n)||Hi(t):40==r?function(t){if(wo.safari&&!(t.state.selection.$head.parentOffset>0)){var e=t.root.getSelection(),r=e.focusNode,n=e.focusOffset;if(r&&1==r.nodeType&&0==n&&r.firstChild&&"false"==r.firstChild.contentEditable){var o=r.firstChild;Yi(t,o,!0),setTimeout((function(){return Yi(t,o,!1)}),20)}}}(t)||Gi(t,1,n)||Ji(t):n==(wo.mac?"m":"c")&&(66==r||73==r||89==r||90==r))}(t,e)?e.preventDefault():bs(t,"key");else{var r=Date.now();t.lastIOSEnter=r,t.lastIOSEnterFallbackTimeout=setTimeout((function(){t.lastIOSEnter==r&&(t.someProp("handleKeyDown",(function(e){return e(t,Bo(13,"Enter"))})),t.lastIOSEnter=0)}),200)}},ks.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},ks.keypress=function(t,e){if(!(Os(t,e)||!e.charCode||e.ctrlKey&&!e.altKey||wo.mac&&e.metaKey))if(t.someProp("handleKeyPress",(function(r){return r(t,e)})))e.preventDefault();else{var r=t.state.selection;if(!(r instanceof Te&&r.$from.sameParent(r.$to))){var n=String.fromCharCode(e.charCode);t.someProp("handleTextInput",(function(e){return e(t,r.$from.pos,r.$to.pos,n)}))||t.dispatch(t.state.tr.insertText(n).scrollIntoView()),e.preventDefault()}}};var Es=wo.mac?"metaKey":"ctrlKey";ys.mousedown=function(t,e){t.shiftKey=e.shiftKey;var r=Ds(t),n=Date.now(),o="singleClick";n-t.lastClick.time<500&&function(t,e){var r=e.x-t.clientX,n=e.y-t.clientY;return r*r+n*n<100}(e,t.lastClick)&&!e[Es]&&("singleClick"==t.lastClick.type?o="doubleClick":"doubleClick"==t.lastClick.type&&(o="tripleClick")),t.lastClick={time:n,x:e.clientX,y:e.clientY,type:o};var i=t.posAtCoords(xs(e));i&&("singleClick"==o?(t.mouseDown&&t.mouseDown.done(),t.mouseDown=new Ts(t,i,e,r)):("doubleClick"==o?As:Ms)(t,i.pos,i.inside,e)?e.preventDefault():bs(t,"pointer"))};var Ts=function(t,e,r,n){var o,i,s=this;if(this.view=t,this.startDoc=t.state.doc,this.pos=e,this.event=r,this.flushed=n,this.selectNode=r[Es],this.allowDefault=r.shiftKey,this.delayedSelectionSync=!1,e.inside>-1)o=t.state.doc.nodeAt(e.inside),i=e.inside;else{var a=t.state.doc.resolve(e.pos);o=a.parent,i=a.depth?a.before():0}this.mightDrag=null;var c=n?null:r.target,l=c?t.docView.nearestDesc(c,!0):null;this.target=l?l.dom:null;var p=t.state.selection;(0==r.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||p instanceof Ne&&p.from<=i&&p.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&wo.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){s.view.mouseDown==s&&s.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),bs(t,"pointer")};function Os(t,e){return!!t.composing||!!(wo.safari&&Math.abs(e.timeStamp-t.compositionEndedAt)<500)&&(t.compositionEndedAt=-2e8,!0)}Ts.prototype.done=function(){var t=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return Oi(t.view)})),this.view.mouseDown=null},Ts.prototype.up=function(t){if(this.done(),this.view.dom.contains(3==t.target.nodeType?t.target.parentNode:t.target)){var e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(xs(t))),this.allowDefault||!e?bs(this.view,"pointer"):function(t,e,r,n,o){return Cs(t,"handleClickOn",e,r,n)||t.someProp("handleClick",(function(r){return r(t,e,n)}
443))||(o?function(t,e){if(-1==e)return!1;var r,n,o=t.state.selection;o instanceof Ne&&(r=o.node);for(var i=t.state.doc.resolve(e),s=i.depth+1;s>0;s--){var a=s>i.depth?i.nodeAfter:i.node(s);if(Ne.isSelectable(a)){n=r&&o.$from.depth>0&&s>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(s);break}}return null!=n&&(Ss(t,Ne.create(t.state.doc,n),"pointer"),!0)}(t,r):function(t,e){if(-1==e)return!1;var r=t.state.doc.resolve(e),n=r.nodeAfter;return!!(n&&n.isAtom&&Ne.isSelectable(n))&&(Ss(t,new Ne(r),"pointer"),!0)}(t,r))}(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||wo.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||wo.chrome&&!(this.view.state.selection instanceof Te)&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(Ss(this.view,Me.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):bs(this.view,"pointer")}},Ts.prototype.move=function(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0),bs(this.view,"pointer"),0==t.buttons&&this.done()},ys.touchdown=function(t){Ds(t),bs(t,"pointer")},ys.contextmenu=function(t){return Ds(t)};var Ns=wo.android?5e3:-1;function qs(t,e){clearTimeout(t.composingTimeout),e>-1&&(t.composingTimeout=setTimeout((function(){return Is(t)}),e))}function zs(t){var e;for(t.composing&&(t.composing=!1,t.compositionEndedAt=((e=document.createEvent("Event")).initEvent("event",!0,!0),e.timeStamp));t.compositionNodes.length>0;)t.compositionNodes.pop().markParentsDirty()}function Is(t,e){if(!(wo.android&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),zs(t),e||t.docView&&t.docView.dirty){var r=Ei(t);return r&&!r.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(r)):t.updateState(t.state),!0}return!1}}ks.compositionstart=ks.compositionupdate=function(t){if(!t.composing){t.domObserver.flush();var e=t.state,r=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some((function(t){return!1===t.type.spec.inclusive}))))t.markCursor=t.state.storedMarks||r.marks(),Is(t,!0),t.markCursor=null;else if(Is(t),wo.gecko&&e.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length)for(var n=t.root.getSelection(),o=n.focusNode,i=n.focusOffset;o&&1==o.nodeType&&0!=i;){var s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(3==s.nodeType){n.collapse(s,s.nodeValue.length);break}o=s,i=-1}t.composing=!0}qs(t,Ns)},ks.compositionend=function(t,e){t.composing&&(t.composing=!1,t.compositionEndedAt=e.timeStamp,qs(t,20))};var Rs=wo.ie&&wo.ie_version<15||wo.ios&&wo.webkit_version<604;function Ls(t,e,r,n){var o=rs(t,e,r,t.shiftKey,t.state.selection.$from);if(t.someProp("handlePaste",(function(e){return e(t,n,o||L.empty)})))return!0;if(!o)return!1;var i=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(o),s=i?t.state.tr.replaceSelectionWith(i,t.shiftKey):t.state.tr.replaceSelection(o);return t.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}ys.copy=ks.cut=function(t,e){var r=t.state.selection,n="cut"==e.type;if(!r.empty){var o=Rs?null:e.clipboardData,i=es(t,r.content()),s=i.dom,a=i.text;o?(e.preventDefault(),o.clearData(),o.setData("text/html",s.innerHTML),o.setData("text/plain",a)):function(t,e){if(t.dom.parentNode){var r=t.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(e),r.style.cssText="position: fixed; left: -10000px; top: 10px";var n=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),n.removeAllRanges(),n.addRange(o),setTimeout((function(){r.parentNode&&r.parentNode.removeChild(r),t.focus()}),50)}}(t,s),n&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},ks.paste=function(t,e){if(!t.composing||wo.android){var r=Rs?null:e.clipboardData;r&&Ls(t,r.getData("text/plain"),r.getData("text/html"),e)?e.preventDefault():function(t,e){if(t.dom.parentNode){var r=t.shiftKey||t.state.selection.$from.parent.type.spec.code,n=t.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((function(){t.focus(),n.parentNode&&n.parentNode.removeChild(n),r?Ls(t,n.value,null,e):Ls(t,n.textContent,n.innerHTML,e)}),50)}}(t,e)}};var Bs=function(t,e){this.slice=t,this.move=e},Fs=wo.mac?"altKey":"ctrlKey";for(var Ps in ys.dragstart=function(t,e){var r=t.mouseDown;if(r&&r.done(),e.dataTransfer){var n=t.state.selection,o=n.empty?null:t.posAtCoords(xs(e));if(o&&o.pos>=n.from&&o.pos<=(n instanceof Ne?n.to-1:n.to));else if(r&&r.mightDrag)t.dispatch(t.state.tr.setSelection(Ne.create(t.state.doc,r.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var i=t.docView.nearestDesc(e.target,!0);i&&i.node.type.spec.draggable&&i!=t.docView&&t.dispatch(t.state.tr.setSelection(Ne.create(t.state.doc,i.posBefore)))}var s=t.state.selection.content(),a=es(t,s),c=a.dom,l=a.text;e.dataTransfer.clearData(),e.dataTransfer.setData(Rs?"Text":"text/html",c.innerHTML),e.dataTransfer.effectAllowed="copyMove",Rs||e.dataTransfer.setData("text/plain",l),t.dragging=new Bs(s,!e[Fs])}},ys.dragend=function(t){var e=t.dragging;window.setTimeout((function(){t.dragging==e&&(t.dragging=null)}),50)},ks.dragover=ks.dragenter=function(t,e){return e.preventDefault()},ks.drop=function(t,e){var r=t.dragging;if(t.dragging=null,e.dataTransfer){var n=t.posAtCoords(xs(e));if(n){var o=t.state.doc.resolve(n.pos);if(o){var i=r&&r.slice;i?t.someProp("transformPasted",(function(t){i=t(i)})):i=rs(t,e.dataTransfer.getData(Rs?"Text":"text/plain"),Rs?null:e.dataTransfer.getData("text/html"),!1,o);var s=r&&!e[Fs];if(t.someProp("handleDrop",(function(r){return r(t,e,i||L.empty,s)})))e.preventDefault();else if(i){e.preventDefault();var a=i?ue(t.state.doc,o.pos,i):o.pos;null==a&&(a=o.pos);var c=t.state.tr;s&&c.deleteSelection();var l=c.mapping.map(a),p=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,u=c.doc;if(p?c.replaceRangeWith(l,l,i.content.firstChild):c.replaceRange(l,l,i),!c.doc.eq(u)){var h=c.doc.resolve(l);if(p&&Ne.isSelectable(i.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new Ne(h));else{var f=c.mapping.map(a);
443c.mapping.maps[c.mapping.maps.length-1].forEach((function(t,e,r,n){return f=n})),c.setSelection(Bi(t,h,c.doc.resolve(f)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))}}}}}},ys.focus=function(t){t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((function(){t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.root.getSelection())&&Oi(t)}),20))},ys.blur=function(t,e){t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),e.relatedTarget&&t.dom.contains(e.relatedTarget)&&t.domObserver.currentSelection.set({}),t.focused=!1)},ys.beforeinput=function(t,e){if(wo.chrome&&wo.android&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();var r=t.domChangeCount;setTimeout((function(){if(t.domChangeCount==r&&(t.dom.blur(),t.focus(),!t.someProp("handleKeyDown",(function(e){return e(t,Bo(8,"Backspace"))})))){var e=t.state.selection.$cursor;e&&e.pos>0&&t.dispatch(t.state.tr.delete(e.pos-1,e.pos).scrollIntoView())}}),50)}},ks)ys[Ps]=ks[Ps];function $s(t,e){if(t==e)return!0;for(var r in t)if(t[r]!==e[r])return!1;for(var n in e)if(!(n in t))return!1;return!0}var Vs=function(t,e){this.spec=e||Zs,this.side=this.spec.side||0,this.toDOM=t};Vs.prototype.map=function(t,e,r,n){var o=t.mapResult(e.from+n,this.side<0?-1:1),i=o.pos;return o.deleted?null:new Hs(i-r,i-r,this)},Vs.prototype.valid=function(){return!0},Vs.prototype.eq=function(t){return this==t||t instanceof Vs&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&$s(this.spec,t.spec))},Vs.prototype.destroy=function(t){this.spec.destroy&&this.spec.destroy(t)};var js=function(t,e){this.spec=e||Zs,this.attrs=t};js.prototype.map=function(t,e,r,n){var o=t.map(e.from+n,this.spec.inclusiveStart?-1:1)-r,i=t.map(e.to+n,this.spec.inclusiveEnd?1:-1)-r;return o>=i?null:new Hs(o,i,this)},js.prototype.valid=function(t,e){return e.from<e.to},js.prototype.eq=function(t){return this==t||t instanceof js&&$s(this.attrs,t.attrs)&&$s(this.spec,t.spec)},js.is=function(t){return t.type instanceof js};var Us=function(t,e){this.spec=e||Zs,this.attrs=t};Us.prototype.map=function(t,e,r,n){var o=t.mapResult(e.from+n,1);if(o.deleted)return null;var i=t.mapResult(e.to+n,-1);return i.deleted||i.pos<=o.pos?null:new Hs(o.pos-r,i.pos-r,this)},Us.prototype.valid=function(t,e){var r,n=t.content.findIndex(e.from),o=n.index,i=n.offset;return i==e.from&&!(r=t.child(o)).isText&&i+r.nodeSize==e.to},Us.prototype.eq=function(t){return this==t||t instanceof Us&&$s(this.attrs,t.attrs)&&$s(this.spec,t.spec)};var Hs=function(t,e,r){this.from=t,this.to=e,this.type=r},Js={spec:{configurable:!0},inline:{configurable:!0}};Hs.prototype.copy=function(t,e){return new Hs(t,e,this.type)},Hs.prototype.eq=function(t,e){return void 0===e&&(e=0),this.type.eq(t.type)&&this.from+e==t.from&&this.to+e==t.to},Hs.prototype.map=function(t,e,r){return this.type.map(t,this,e,r)},Hs.widget=function(t,e,r){return new Hs(t,t,new Vs(e,r))},Hs.inline=function(t,e,r,n){return new Hs(t,e,new js(r,n))},Hs.node=function(t,e,r,n){return new Hs(t,e,new Us(r,n))},Js.spec.get=function(){return this.type.spec},Js.inline.get=function(){return this.type instanceof js},Object.defineProperties(Hs.prototype,Js);var Ws=[],Zs={},Gs=function(t,e){this.local=t&&t.length?t:Ws,this.children=e&&e.length?e:Ws};Gs.create=function(t,e){return e.length?ea(e,t,0,Zs):Ks},Gs.prototype.find=function(t,e,r){var n=[];return this.findInner(null==t?0:t,null==e?1e9:e,n,0,r),n},Gs.prototype.findInner=function(t,e,r,n,o){for(var i=0;i<this.local.length;i++){var s=this.local[i];s.from<=e&&s.to>=t&&(!o||o(s.spec))&&r.push(s.copy(s.from+n,s.to+n))}for(var a=0;a<this.children.length;a+=3)if(this.children[a]<e&&this.children[a+1]>t){var c=this.children[a]+1;this.children[a+2].findInner(t-c,e-c,r,n+c,o)}},Gs.prototype.map=function(t,e,r){return this==Ks||0==t.maps.length?this:this.mapInner(t,e,0,0,r||Zs)},Gs.prototype.mapInner=function(t,e,r,n,o){for(var i,s=0;s<this.local.length;s++){var a=this.local[s].map(t,r,n);a&&a.type.valid(e,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(t,e,r,n,o,i,s){for(var a=t.slice(),c=function(t,e,r,n){for(var s=0;s<a.length;s+=3){var c=a[s+1],l=void 0;-1==c||t>c+i||(e>=a[s]+i?a[s+1]=-1:r>=o&&(l=n-r-(e-t))&&(a[s]+=l,a[s+1]+=l))}},l=0;l<r.maps.length;l++)r.maps[l].forEach(c);for(var p=!1,u=0;u<a.length;u+=3)if(-1==a[u+1]){var h=r.map(t[u]+i),f=h-o;if(f<0||f>=n.content.size){p=!0;continue}var d=r.map(t[u+1]+i,-1)-o,m=n.content.findIndex(f),g=m.index,v=m.offset,y=n.maybeChild(g);if(y&&v==f&&v+y.nodeSize==d){var k=a[u+2].mapInner(r,y,h+1,t[u]+i+1,s);k!=Ks?(a[u]=f,a[u+1]=d,a[u+2]=k):(a[u+1]=-2,p=!0)}else p=!0}if(p){var b=function(t,e,r,n,o,i,s){function a(t,e){for(var i=0;i<t.local.length;i++){var c=t.local[i].map(n,o,e);c?r.push(c):s.onRemove&&s.onRemove(t.local[i].spec)}for(var l=0;l<t.children.length;l+=3)a(t.children[l+2],t.children[l]+e+1)}for(var c=0;c<t.length;c+=3)-1==t[c+1]&&a(t[c+2],e[c]+i+1);return r}
443(a,t,e||[],r,o,i,s),_=ea(b,n,0,s);e=_.local;for(var w=0;w<a.length;w+=3)a[w+1]<0&&(a.splice(w,3),w-=3);for(var x=0,C=0;x<_.children.length;x+=3){for(var S=_.children[x];C<a.length&&a[C]<S;)C+=3;a.splice(C,0,_.children[x],_.children[x+1],_.children[x+2])}}return new Gs(e&&e.sort(ra),a)}(this.children,i,t,e,r,n,o):i?new Gs(i.sort(ra)):Ks},Gs.prototype.add=function(t,e){return e.length?this==Ks?Gs.create(t,e):this.addInner(t,e,0):this},Gs.prototype.addInner=function(t,e,r){var n,o=this,i=0;t.forEach((function(t,s){var a,c=s+r;if(a=Xs(e,t,c)){for(n||(n=o.children.slice());i<n.length&&n[i]<s;)i+=3;n[i]==s?n[i+2]=n[i+2].addInner(t,a,c+1):n.splice(i,0,s,s+t.nodeSize,ea(a,t,c+1,Zs)),i+=3}}));for(var s=Qs(i?ta(e):e,-r),a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new Gs(s.length?this.local.concat(s).sort(ra):this.local,n||this.children)},Gs.prototype.remove=function(t){return 0==t.length||this==Ks?this:this.removeInner(t,0)},Gs.prototype.removeInner=function(t,e){for(var r=this.children,n=this.local,o=0;o<r.length;o+=3){for(var i=void 0,s=r[o]+e,a=r[o+1]+e,c=0,l=void 0;c<t.length;c++)(l=t[c])&&l.from>s&&l.to<a&&(t[c]=null,(i||(i=[])).push(l));if(i){r==this.children&&(r=this.children.slice());var p=r[o+2].removeInner(i,s+1);p!=Ks?r[o+2]=p:(r.splice(o,3),o-=3)}}if(n.length)for(var u=0,h=void 0;u<t.length;u++)if(h=t[u])for(var f=0;f<n.length;f++)n[f].eq(h,e)&&(n==this.local&&(n=this.local.slice()),n.splice(f--,1));return r==this.children&&n==this.local?this:n.length||r.length?new Gs(n,r):Ks},Gs.prototype.forChild=function(t,e){if(this==Ks)return this;if(e.isLeaf)return Gs.empty;for(var r,n,o=0;o<this.children.length;o+=3)if(this.children[o]>=t){this.children[o]==t&&(r=this.children[o+2]);break}for(var i=t+1,s=i+e.content.size,a=0;a<this.local.length;a++){var c=this.local[a];if(c.from<s&&c.to>i&&c.type instanceof js){var l=Math.max(i,c.from)-i,p=Math.min(s,c.to)-i;l<p&&(n||(n=[])).push(c.copy(l,p))}}if(n){var u=new Gs(n.sort(ra));return r?new Ys([u,r]):u}return r||Ks},Gs.prototype.eq=function(t){if(this==t)return!0;if(!(t instanceof Gs)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(var r=0;r<this.children.length;r+=3)if(this.children[r]!=t.children[r]||this.children[r+1]!=t.children[r+1]||!this.children[r+2].eq(t.children[r+2]))return!1;return!0},Gs.prototype.locals=function(t){return na(this.localsInner(t))},Gs.prototype.localsInner=function(t){if(this==Ks)return Ws;if(t.inlineContent||!this.local.some(js.is))return this.local;for(var e=[],r=0;r<this.local.length;r++)this.local[r].type instanceof js||e.push(this.local[r]);return e};var Ks=new Gs;Gs.empty=Ks,Gs.removeOverlap=na;var Ys=function(t){this.members=t};function Qs(t,e){if(!e||!t.length)return t;for(var r=[],n=0;n<t.length;n++){var o=t[n];r.push(new Hs(o.from+e,o.to+e,o.type))}return r}function Xs(t,e,r){if(e.isLeaf)return null;for(var n=r+e.nodeSize,o=null,i=0,s=void 0;i<t.length;i++)(s=t[i])&&s.from>r&&s.to<n&&((o||(o=[])).push(s),t[i]=null);return o}function ta(t){for(var e=[],r=0;r<t.length;r++)null!=t[r]&&e.push(t[r]);return e}function ea(t,e,r,n){var o=[],i=!1;e.forEach((function(e,s){var a=Xs(t,e,s+r);if(a){i=!0;var c=ea(a,e,r+s+1,n);c!=Ks&&o.push(s,s+e.nodeSize,c)}}));for(var s=Qs(i?ta(t):t,-r).sort(ra),a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(n.onRemove&&n.onRemove(s[a].spec),s.splice(a--,1));return s.length||o.length?new Gs(s,o):Ks}function ra(t,e){return t.from-e.from||t.to-e.to}function na(t){for(var e=t,r=0;r<e.length-1;r++){var n=e[r];if(n.from!=n.to)for(var o=r+1;o<e.length;o++){var i=e[o];if(i.from!=n.from){i.from<n.to&&(e==t&&(e=t.slice()),e[r]=n.copy(n.from,i.from),oa(e,o,n.copy(i.from,n.to)));break}i.to!=n.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,n.to),oa(e,o+1,i.copy(n.to,i.to)))}}return e}function oa(t,e,r){for(;e<t.length&&ra(r,t[e])>0;)e++;t.splice(e,0,r)}function ia(t){var e=[];return t.someProp("decorations",(function(r){var n=r(t.state);n&&n!=Ks&&e.push(n)}
443)),t.cursorWrapper&&e.push(Gs.create(t.state.doc,[t.cursorWrapper.deco])),Ys.from(e)}Ys.prototype.map=function(t,e){var r=this.members.map((function(r){return r.map(t,e,Zs)}));return Ys.from(r)},Ys.prototype.forChild=function(t,e){if(e.isLeaf)return Gs.empty;for(var r=[],n=0;n<this.members.length;n++){var o=this.members[n].forChild(t,e);o!=Ks&&(o instanceof Ys?r=r.concat(o.members):r.push(o))}return Ys.from(r)},Ys.prototype.eq=function(t){if(!(t instanceof Ys)||t.members.length!=this.members.length)return!1;for(var e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0},Ys.prototype.locals=function(t){for(var e,r=!0,n=0;n<this.members.length;n++){var o=this.members[n].localsInner(t);if(o.length)if(e){r&&(e=e.slice(),r=!1);for(var i=0;i<o.length;i++)e.push(o[i])}else e=o}return e?na(r?e:e.sort(ra)):Ws},Ys.from=function(t){switch(t.length){case 0:return Ks;case 1:return t[0];default:return new Ys(t)}};var sa=function(t,e){this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(ha),this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.trackWrites=null,this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):t.apply?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=pa(this),this.markCursor=null,this.cursorWrapper=null,la(this),this.nodeViews=ua(this),this.docView=fi(this.state.doc,ca(this),ia(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,function(t){t.shiftKey=!1,t.mouseDown=null,t.lastKeyCode=null,t.lastKeyCodeTime=0,t.lastClick={time:0,x:0,y:0,type:""},t.lastSelectionOrigin=null,t.lastSelectionTime=0,t.lastIOSEnter=0,t.lastIOSEnterFallbackTimeout=null,t.lastAndroidDelete=0,t.composing=!1,t.composingTimeout=null,t.compositionNodes=[],t.compositionEndedAt=-2e8,t.domObserver=new gs(t,(function(e,r,n,o){return function(t,e,r,n,o){if(e<0){var i=t.lastSelectionTime>Date.now()-50?t.lastSelectionOrigin:null,s=Ei(t,i);if(s&&!t.state.selection.eq(s)){var a=t.state.tr.setSelection(s);"pointer"==i?a.setMeta("pointer",!0):"key"==i&&a.scrollIntoView(),t.dispatch(a)}}else{var c=t.state.doc.resolve(e),l=c.sharedDepth(r);e=c.before(l+1),r=t.state.doc.resolve(r).after(l+1);var p=t.state.selection,u=function(t,e,r){var n=t.docView.parseRange(e,r),o=n.node,i=n.fromOffset,s=n.toOffset,a=n.from,c=n.to,l=t.root.getSelection(),p=null,u=l.anchorNode;if(u&&t.dom.contains(1==u.nodeType?u:u.parentNode)&&(p=[{node:u,offset:l.anchorOffset}],Lo(l)||p.push({node:l.focusNode,offset:l.focusOffset})),wo.chrome&&8===t.lastKeyCode)for(var h=s;h>i;h--){var f=o.childNodes[h-1],d=f.pmViewDesc;if("BR"==f.nodeName&&!d){s=h;break}if(!d||d.size)break}var m=t.state.doc,g=t.someProp("domParser")||Tt.fromSchema(t.state.schema),v=m.resolve(a),y=null,k=g.parse(o,{topNode:v.parent,topMatch:v.parent.contentMatchAt(v.index()),topOpen:!0,from:i,to:s,preserveWhitespace:"pre"!=v.parent.type.whitespace||"full",editableContent:!0,findPositions:p,ruleFromNode:Qi,context:v});if(p&&null!=p[0].pos){var b=p[0].pos,_=p[1]&&p[1].pos;null==_&&(_=b),y={anchor:b+a,head:_+a}}return{doc:k,sel:y,from:a,to:c}}(t,e,r);if(wo.chrome&&t.cursorWrapper&&u.sel&&u.sel.anchor==t.cursorWrapper.deco.from){var h=t.cursorWrapper.deco.type.toDOM.nextSibling,f=h&&h.nodeValue?h.nodeValue.length:1;u.sel={anchor:u.sel.anchor+f,head:u.sel.anchor+f}}var d,m,g=t.state.doc,v=g.slice(u.from,u.to);8===t.lastKeyCode&&Date.now()-100<t.lastKeyCodeTime?(d=t.state.selection.to,m="end"):(d=t.state.selection.from,m="start"),t.lastKeyCode=null;var y=function(t,e,r,n,o){var i=t.findDiffStart(e,r);if(null==i)return null;var s=t.findDiffEnd(e,r+t.size,r+e.size),a=s.a,c=s.b;return"end"==o&&(n-=a+Math.max(0,i-Math.min(a,c))-i),a<i&&t.size<e.size?(c=(i-=n<=i&&n>=a?i-n:0)+(c-a),a=i):c<i&&(a=(i-=n<=i&&n>=c?i-n:0)+(a-c),c=i),{start:i,endA:a,endB:c}}(v.content,u.doc.content,u.from,d,m);if(!y){if(!(n&&p instanceof Te&&!p.empty&&p.$head.sameParent(p.$anchor))||t.composing||u.sel&&u.sel.anchor!=u.sel.head){if((wo.ios&&t.lastIOSEnter>Date.now()-225||wo.android)&&o.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName}))&&t.someProp("handleKeyDown",(function(e){return e(t,Bo(13,"Enter"))})))return void(t.lastIOSEnter=0);if(u.sel){var k=Xi(t,t.state.doc,u.sel);k&&!k.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(k))}return}y={start:p.from,endA:p.to,endB:p.to}}t.domChangeCount++,t.state.selection.from<t.state.selection.to&&y.start==y.endB&&t.state.selection instanceof Te&&(y.start>t.state.selection.from&&y.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?y.start=t.state.selection.from:y.endA<t.state.selection.to&&y.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(y.endB+=t.state.selection.to-y.endA,y.endA=t.state.selection.to)),wo.ie&&wo.ie_version<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>u.from&&"  "==u.doc.textBetween(y.start-u.from-1,y.start-u.from+1)&&(y.start--,y.endA--,y.endB--);var b,_=u.doc.resolveNoCache(y.start-u.from),w=u.doc.resolveNoCache(y.endB-u.from),x=_.sameParent(w)&&_.parent.inlineContent;if((wo.ios&&t.lastIOSEnter>Date.now()-225&&(!x||o.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName})))||!x&&_.pos<u.doc.content.size&&(b=Me.findFrom(u.doc.resolve(_.pos+1),1,!0))&&b.head==w.pos)&&t.someProp("handleKeyDown",(function(e){return e(t,Bo(13,"Enter"))})))t.lastIOSEnter=0;else if(t.state.selection.anchor>y.start&&function(t,e,r,n,o){if(!n.parent.isTextblock||r-e<=o.pos-n.pos||ts(n,!0,!1)<o.pos)return!1;var i=t.resolve(e);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var s=t.resolve(ts(i,!0,!0));return!(!s.parent.isTextblock||s.pos>r||ts(s,!0,!1)<r)&&n.parent.content.cut(n.parentOffset).eq(s.parent.content)}(g,y.start,y.endA,_,w)&&t.someProp("handleKeyDown",(function(e){return e(t,Bo(8,"Backspace"))})))wo.android&&wo.chrome&&t.domObserver.suppressSelectionUpdates();else{wo.chrome&&wo.android&&y.toB==y.from&&(t.lastAndroidDelete=Date.now()),wo.android&&!x&&_.start()!=w.start()&&0==w.parentOffset&&_.depth==w.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==y.endA&&(y.endB-=2,w=u.doc.resolveNoCache(y.endB-u.from),setTimeout((function(){t.someProp("handleKeyDown",(function(e){return e(t,Bo(13,"Enter"))}))}),20));var C,S,A,M,D=y.start,E=y.endA;if(x)if(_.pos==w.pos)wo.ie&&wo.ie_version<=11&&0==_.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((function(){return Oi(t)}),20)),C=t.state.tr.delete(D,E),S=g.resolve(y.start).marksAcross(g.resolve(y.endA));else if(y.endA==y.endB&&(M=g.resolve(y.start))&&(A=function(t,e){for(var r,n,o,i=t.firstChild.marks,s=e.firstChild.marks,a=i,c=s,l=0;l<s.length;l++)a=s[l].removeFromSet(a);for(var p=0;p<i.length;p++)c=i[p].removeFromSet(c);if(1==a.length&&0==c.length)n=a[0],r="add",o=function(t){return t.mark(n.addToSet(t.marks))};else{if(0!=a.length||1!=c.length)return null;n=c[0],r="remove",o=function(t){return t.mark(n.removeFromSet(t.marks))}}for(var u=[],h=0;h<e.childCount;h++)u.push(o(e.child(h)));if(T.from(u).eq(t))return{mark:n,type:r}}(_.parent.content.cut(_.parentOffset,w.parentOffset),M.parent.content.cut(M.parentOffset,y.endA-M.start()))))C=t.state.tr,"add"==A.type?C.addMark(D,E,A.mark):C.removeMark(D,E,A.mark);else if(_.parent.child(_.index()).isText&&_.index()==w.index()-(w.textOffset?0:1)){var O=_.parent.textBetween(_.parentOffset,w.parentOffset);if(t.someProp("handleTextInput",(function(e){return e(t,D,E,O)})))return;C=t.state.tr.insertText(O,D,E)}if(C||(C=t.state.tr.replace(D,E,u.doc.slice(y.start-u.from,y.endB-u.from))),u.sel){var N=Xi(t,C.doc,u.sel);N&&!(wo.chrome&&wo.android&&t.composing&&N.empty&&(y.start!=y.endB||t.lastAndroidDelete<Date.now()-100)&&(N.head==D||N.head==C.mapping.map(E)-1)||wo.ie&&N.empty&&N.head==D)&&C.setSelection(N)}S&&C.ensureMarks(S),t.dispatch(C.scrollIntoView())}}}(t,e,r,n,o)})),t.domObserver.start(),t.domChangeCount=0,t.eventHandlers=Object.create(null);var e=function(e){var r=ys[e];t.dom.addEventListener(e,t.eventHandlers[e]=function(e){!function(t,e){if(!e.bubbles)return!0;
443if(e.defaultPrevented)return!1;for(var r=e.target;r!=t.dom;r=r.parentNode)if(!r||11==r.nodeType||r.pmViewDesc&&r.pmViewDesc.stopEvent(e))return!1;return!0}(t,e)||ws(t,e)||!t.editable&&e.type in ks||r(t,e)})};for(var r in ys)e(r);wo.safari&&t.dom.addEventListener("input",(function(){return null})),_s(t)}(this),this.prevDirectPlugins=[],this.pluginViews=[],this.updatePluginViews()},aa={props:{configurable:!0},root:{configurable:!0},isDestroyed:{configurable:!0}};function ca(t){var e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),e.translate="no",t.someProp("attributes",(function(r){if("function"==typeof r&&(r=r(t.state)),r)for(var n in r)"class"==n&&(e.class+=" "+r[n]),"style"==n?e.style=(e.style?e.style+";":"")+r[n]:e[n]||"contenteditable"==n||"nodeName"==n||(e[n]=String(r[n]))})),[Hs.node(0,t.state.doc.content.size,e)]}function la(t){if(t.markCursor){var e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Hs.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function pa(t){return!t.someProp("editable",(function(e){return!1===e(t.state)}))}function ua(t){var e={};return t.someProp("nodeViews",(function(t){for(var r in t)Object.prototype.hasOwnProperty.call(e,r)||(e[r]=t[r])})),e}function ha(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}aa.props.get=function(){if(this._props.state!=this.state){var t=this._props;for(var e in this._props={},t)this._props[e]=t[e];this._props.state=this.state}return this._props},sa.prototype.update=function(t){t.handleDOMEvents!=this._props.handleDOMEvents&&_s(this),this._props=t,t.plugins&&(t.plugins.forEach(ha),this.directPlugins=t.plugins),this.updateStateInner(t.state,!0)},sa.prototype.setProps=function(t){var e={};for(var r in this._props)e[r]=this._props[r];for(var n in e.state=this.state,t)e[n]=t[n];this.update(e)},sa.prototype.updateState=function(t){this.updateStateInner(t,this.state.plugins!=t.plugins)},sa.prototype.updateStateInner=function(t,e){var r=this,n=this.state,o=!1,i=!1;if(t.storedMarks&&this.composing&&(zs(this),i=!0),this.state=t,e){var s=ua(this);(function(t,e){var r=0,n=0;for(var o in t){if(t[o]!=e[o])return!0;r++}for(var i in e)n++;return r!=n})(s,this.nodeViews)&&(this.nodeViews=s,o=!0),_s(this)}this.editable=pa(this),la(this);var a=ia(this),c=ca(this),l=e?"reset":t.scrollToSelection>n.scrollToSelection?"to selection":"preserve",p=o||!this.docView.matchesNode(t.doc,c,a);!p&&t.selection.eq(n.selection)||(i=!0);var u,h,f,d,m,g,v,y,k,b,_="preserve"==l&&i&&null==this.dom.style.overflowAnchor&&function(t){for(var e,r,n=t.dom.getBoundingClientRect(),o=Math.max(0,n.top),i=(n.left+n.right)/2,s=o+1;s<Math.min(innerHeight,n.bottom);s+=5){var a=t.root.elementFromPoint(i,s);if(a!=t.dom&&t.dom.contains(a)){var c=a.getBoundingClientRect();if(c.top>=o-20){e=a,r=c.top;break}}}return{refDOM:e,refTop:r,stack:jo(t.dom)}}(this);if(i){this.domObserver.stop();var w=p&&(wo.ie||wo.chrome)&&!this.composing&&!n.selection.empty&&!t.selection.empty&&(d=n.selection,m=t.selection,g=Math.min(d.$anchor.sharedDepth(d.head),m.$anchor.sharedDepth(m.head)),d.$anchor.start(g)!=m.$anchor.start(g));if(p){var x=wo.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!o&&this.docView.update(t.doc,c,a,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=fi(t.doc,c,a,this.dom,this)),x&&!this.trackWrites&&(w=!0)}w||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(u=this,h=u.docView.domFromPos(u.state.selection.anchor,0),f=u.root.getSelection(),No(h.node,h.offset,f.anchorNode,f.anchorOffset)))?Oi(this,w):(Ri(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(n),"reset"==l)this.dom.scrollTop=0;else if("to selection"==l){var C=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(t){return t(r)}))||(t.selection instanceof Ne?Vo(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),C):Vo(this,this.coordsAtPos(t.selection.head,1),C))}else _&&(y=(v=_).refDOM,k=v.refTop,Uo(v.stack,0==(b=y?y.getBoundingClientRect().top:0)?0:b-k))},sa.prototype.destroyPluginViews=function(){for(var t;t=this.pluginViews.pop();)t.destroy&&t.destroy()},sa.prototype.updatePluginViews=function(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var e=0;e<this.pluginViews.length;e++){var r=this.pluginViews[e];r.update&&r.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var n=0;n<this.directPlugins.length;n++){var o=this.directPlugins[n];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var s=this.state.plugins[i];s.spec.view&&this.pluginViews.push(s.spec.view(this))}}},sa.prototype.someProp=function(t,e){var r,n=this._props&&this._props[t];if(null!=n&&(r=e?e(n):n))return r;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[t];if(null!=i&&(r=e?e(i):i))return r}var s=this.state.plugins;if(s)for(var a=0;a<s.length;a++){var c=s[a].props[t];if(null!=c&&(r=e?e(c):c))return r}},sa.prototype.hasFocus=function(){return this.root.activeElement==this.dom}
443,sa.prototype.focus=function(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(Ho)return t.focus(Ho);var e=jo(t);t.focus(null==Ho?{get preventScroll(){return Ho={preventScroll:!0},!0}}:void 0),Ho||(Ho=!1,Uo(e,0))}(this.dom),Oi(this),this.domObserver.start()},aa.root.get=function(){var t=this._root;if(null==t)for(var e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=function(){return document.getSelection()}),this._root=e;return t||document},sa.prototype.posAtCoords=function(t){return Go(this,t)},sa.prototype.coordsAtPos=function(t,e){return void 0===e&&(e=1),Qo(this,t,e)},sa.prototype.domAtPos=function(t,e){return void 0===e&&(e=0),this.docView.domFromPos(t,e)},sa.prototype.nodeDOM=function(t){var e=this.docView.descAt(t);return e?e.nodeDOM:null},sa.prototype.posAtDOM=function(t,e,r){void 0===r&&(r=-1);var n=this.docView.posFromDOM(t,e,r);if(null==n)throw new RangeError("DOM position not inside the editor");return n},sa.prototype.endOfTextblock=function(t,e){return function(t,e,r){return ni==e&&oi==r?ii:(ni=e,oi=r,ii="up"==r||"down"==r?function(t,e,r){var n=e.selection,o="up"==r?n.$from:n.$to;return ei(t,e,(function(){for(var e=t.docView.domFromPos(o.pos,"up"==r?-1:1).node;;){var n=t.docView.nearestDesc(e,!0);if(!n)break;if(n.node.isBlock){e=n.dom;break}e=n.dom.parentNode}for(var i=Qo(t,o.pos,1),s=e.firstChild;s;s=s.nextSibling){var a=void 0;if(1==s.nodeType)a=s.getClientRects();else{if(3!=s.nodeType)continue;a=Oo(s,0,s.nodeValue.length).getClientRects()}for(var c=0;c<a.length;c++){var l=a[c];if(l.bottom>l.top+1&&("up"==r?i.top-l.top>2*(l.bottom-i.top):l.bottom-i.bottom>2*(i.bottom-l.top)))return!1}}return!0}))}(t,e,r):function(t,e,r){var n=e.selection.$head;if(!n.parent.isTextblock)return!1;var o=n.parentOffset,i=!o,s=o==n.parent.content.size,a=t.root.getSelection();return ri.test(n.parent.textContent)&&a.modify?ei(t,e,(function(){var e=a.getRangeAt(0),o=a.focusNode,i=a.focusOffset,s=a.caretBidiLevel;a.modify("move",r,"character");var c=!(n.depth?t.docView.domAfterPos(n.before()):t.dom).contains(1==a.focusNode.nodeType?a.focusNode:a.focusNode.parentNode)||o==a.focusNode&&i==a.focusOffset;return a.removeAllRanges(),a.addRange(e),null!=s&&(a.caretBidiLevel=s),c})):"left"==r||"backward"==r?i:s}(t,e,r))}(this,e||this.state,t)},sa.prototype.destroy=function(){this.docView&&(function(t){for(var e in t.domObserver.stop(),t.eventHandlers)t.dom.removeEventListener(e,t.eventHandlers[e]);clearTimeout(t.composingTimeout),clearTimeout(t.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ia(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},aa.isDestroyed.get=function(){return null==this.docView},sa.prototype.dispatchEvent=function(t){return function(t,e){ws(t,e)||!ys[e.type]||!t.editable&&e.type in ks||ys[e.type](t,e)}(this,t)},sa.prototype.dispatch=function(t){var e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))},Object.defineProperties(sa.prototype,aa);var fa=function(t,e){var r=this;this.editorView=t,this.width=e.width||1,this.color=e.color||"black",this.class=e.class,this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(e){var n=function(t){return r[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}}))};fa.prototype.destroy=function(){var t=this;this.handlers.forEach((function(e){var r=e.name,n=e.handler;return t.editorView.dom.removeEventListener(r,n)}))},fa.prototype.update=function(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())},fa.prototype.setCursor=function(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},fa.prototype.updateOverlay=function(){var t,e=this.editorView.state.doc.resolve(this.cursorPos);if(!e.parent.inlineContent){var r=e.nodeBefore,n=e.nodeAfter;if(r||n){var o=this.editorView.nodeDOM(this.cursorPos-(r?r.nodeSize:0)).getBoundingClientRect(),i=r?o.bottom:o.top;r&&n&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),t={left:o.left,right:o.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!t){var s=this.editorView.coordsAtPos(this.cursorPos);t={left:s.left-this.width/2,right:s.left+this.width/2,top:s.top,bottom:s.bottom}}var a,c,l=this.editorView.dom.offsetParent;if(this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!l||l==document.body&&"static"==getComputedStyle(l).position)a=-pageXOffset,c=-pageYOffset;else{var p=l.getBoundingClientRect();a=p.left-l.scrollLeft,c=p.top-l.scrollTop}this.element.style.left=t.left-a+"px",this.element.style.top=t.top-c+"px",this.element.style.width=t.right-t.left+"px",this.element.style.height=t.bottom-t.top+"px"},fa.prototype.scheduleRemoval=function(t){var e=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.setCursor(null)}),t)},fa.prototype.dragover=function(t){if(this.editorView.editable){var e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),n=r&&r.type.spec.disableDropCursor,o="function"==typeof n?n(this.editorView,e):n;if(e&&!o){var i=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(i=ue(this.editorView.state.doc,i,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(i),this.scheduleRemoval(5e3)}}},fa.prototype.dragend=function(){this.scheduleRemoval(20)},fa.prototype.drop=function(){this.scheduleRemoval(20)},fa.prototype.dragleave=function(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)};var da=function(t){function e(e){t.call(this,e,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.map=function(r,n){var o=r.resolve(n.map(this.head));return e.valid(o)?new e(o):t.near(o)},e.prototype.content=function(){return L.empty},e.prototype.eq=function(t){return t instanceof e&&t.head==this.head},e.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},e.fromJSON=function(t,r){if("number"!=typeof r.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(r.pos))},e.prototype.getBookmark=function(){return new ma(this.anchor)},e.valid=function(t){var e=t.parent;if(e.isTextblock||!function(t){for(var e=t.depth;e>=0;e--){var r=t.index(e),n=t.node(e);if(0!=r)for(var o=n.child(r-1);;o=o.lastChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;
443if(o.inlineContent)return!1}else if(n.type.spec.isolating)return!0}return!0}(t)||!function(t){for(var e=t.depth;e>=0;e--){var r=t.indexAfter(e),n=t.node(e);if(r!=n.childCount)for(var o=n.child(r);;o=o.firstChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}else if(n.type.spec.isolating)return!0}return!0}(t))return!1;var r=e.type.spec.allowGapCursor;if(null!=r)return r;var n=e.contentMatchAt(t.index()).defaultType;return n&&n.isTextblock},e.findFrom=function(t,r,n){t:for(;;){if(!n&&e.valid(t))return t;for(var o=t.pos,i=null,s=t.depth;;s--){var a=t.node(s);if(r>0?t.indexAfter(s)<a.childCount:t.index(s)>0){i=a.child(r>0?t.indexAfter(s):t.index(s)-1);break}if(0==s)return null;o+=r;var c=t.doc.resolve(o);if(e.valid(c))return c}for(;;){var l=r>0?i.firstChild:i.lastChild;if(!l){if(i.isAtom&&!i.isText&&!Ne.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*r),n=!1;continue t}break}i=l,o+=r;var p=t.doc.resolve(o);if(e.valid(p))return p}return null}},e}(Me);da.prototype.visible=!1,Me.jsonID("gapcursor",da);var ma=function(t){this.pos=t};ma.prototype.map=function(t){return new ma(t.map(this.pos))},ma.prototype.resolve=function(t){var e=t.resolve(this.pos);return da.valid(e)?new da(e):Me.near(e)};var ga=_o({ArrowLeft:va("horiz",-1),ArrowRight:va("horiz",1),ArrowUp:va("vert",-1),ArrowDown:va("vert",1)});function va(t,e){var r="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,n,o){var i=t.selection,s=e>0?i.$to:i.$from,a=i.empty;if(i instanceof Te){if(!o.endOfTextblock(r)||0==s.depth)return!1;a=!1,s=t.doc.resolve(e>0?s.after():s.before())}var c=da.findFrom(s,e,a);return!!c&&(n&&n(t.tr.setSelection(new da(c))),!0)}}function ya(t,e,r){if(!t.editable)return!1;var n=t.state.doc.resolve(e);if(!da.valid(n))return!1;var o=t.posAtCoords({left:r.clientX,top:r.clientY}).inside;return!(o>-1&&Ne.isSelectable(t.state.doc.nodeAt(o))||(t.dispatch(t.state.tr.setSelection(new da(n))),0))}function ka(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof da))return!1;var r=t.state.selection.$from,n=r.parent.contentMatchAt(r.index()).findWrapping(t.state.schema.nodes.text);if(!n)return!1;for(var o=T.empty,i=n.length-1;i>=0;i--)o=T.from(n[i].createAndFill(null,o));var s=t.state.tr.replace(r.pos,r.pos,new L(o,0,0));return s.setSelection(Te.near(s.doc.resolve(r.pos+1))),t.dispatch(s),!1}function ba(t){if(!(t.selection instanceof da))return null;var e=document.createElement("div");return e.className="ProseMirror-gapcursor",Gs.create(t.doc,[Hs.widget(t.selection.head,e,{key:"gapcursor"})])}var _a=/^data:((?:\w+\/(?:(?!;).)+)?)((?:;[\w\W]*?[^;])*),(.+)$/,wa=new DOMParser;function xa(t){return function(e,r,n,o,i,s){if(s&&n.type===t.nodes.spoiler&&"P"!==i.target.tagName)return n.attrs.open=!n.attrs.open,e.focus(),i.stopPropagation(),i.preventDefault(),!1}}function Ca(t){return Ar(/^(\d+)(\.|\))\s$/,t,(function(t){return{order:+t[1]}}),(function(t,e){return e.childCount+e.attrs.order==+t[1]}))}function Sa(t){return Ar(/^\s*([-+*])\s$/,t)}function Aa(t){return Mr(/^```$/,t)}function Ma(t,e){return Mr(new RegExp("^(#{1,"+e+"})\\s$"),t,(function(t){return{level:t[1].length}}))}function Da(t){return Ar(/^\s*>!\s$/,t)}var Ea=function(){function t(t,e){this.build(t,e)}var e=t.prototype;return e.build=function(t,e){var r=this;this.attrs=e,this.schema=(new Fn).build(),this.parser=new qn(this.schema).build(),this.serializer=new In(this.schema).build(),this.state=je.create(this.buildEditorStateConfig()),this.view=new sa(t,this.buildEditorProps()),(e.classNames||[]).forEach((function(t){return r.view.dom.classList.add(t)}));var n=function(e){r.attrs.inputListeners.forEach((function(e){e.call(t)})),e.redraw=!1};t.oninput=n,t.onclick=n,t.onkeyup=n},e.buildEditorStateConfig=function(){return{doc:this.parseInitialValue(this.attrs.value),disabled:this.attrs.disabled,schema:this.schema,plugins:this.buildPluginItems().toArray()}},e.buildPluginItems=function(){var t,e,r,n,o,i,s,a=new(k());return a.add("markdownInputrules",(t={rules:this.buildInputRules(this.schema)},e=t.rules,r=new We({state:{init:function(){return null},apply:function(t,e){return t.getMeta(this)||(t.selectionSet||t.docChanged?null:e)}},props:{handleTextInput:function(t,n,o,i){return xr(t,n,o,i,e,r)},handleDOMEvents:{compositionend:function(t){setTimeout((function(){var n=t.state.selection.$cursor;n&&xr(t,n.pos,n.pos,"",e,r)}))}}},isInputRules:!0}),r)),a.add("submit",bo({"Mod-Enter":this.attrs.onsubmit})),a.add("escape",bo({Escape:this.attrs.escape})),a.add("richTextKeymap",bo(function(t){var e=function(e,r){return r(e.tr.replaceSelectionWith(t.nodes.hard_break.create()).scrollIntoView()),!0},r=[function(t,e){var r=$(".EmojiDropdown:visible"),n=$(".MentionsDropdown:visible");if(r[0]||n[0])return!0},kr(t.nodes.list_item),function(t,e,r){var n=t.selection,o=n.$head,i=n.$anchor;
443if(!o.parent.type.spec.code||!o.sameParent(i))return!1;var s=t.selection.$from.nodeBefore,a=t.selection.$from.nodeAfter;return s&&"\n"!==s.text.slice(-1)||a?er(t,e):(r.dispatch(r.state.tr.delete(t.selection.from-1,t.selection.from)),r.dispatch(r.state.tr.setSelection(Te.near(r.state.doc.resolve(r.state.selection.from)))),nr(r.state,r.dispatch))}];app.session.user.preferences().richTextCompactParagraphs&&r.push((function(t,r,n){var o=t.selection,i=o.$head,s=o.$anchor;if("paragraph"!==i.parent.type.name||!i.sameParent(s))return!1;var a=t.selection.$from.nodeBefore,c=t.selection.$from.nodeAfter;if(a&&a.text&&"\n"!==a.text.slice(-1))return e(n.state,n.dispatch);!a||a.text||c||(n.dispatch(n.state.tr.delete(t.selection.from-1,t.selection.from)),n.dispatch(n.state.tr.setSelection(Te.near(n.state.doc.resolve(n.state.selection.from)))))}));var n=ur.apply(void 0,r);return{"Mod-z":oo,"Mod-y":io,"Mod-Shift-z":io,Backspace:Cr,"Mod-b":pr(t.marks.strong),"Mod-i":pr(t.marks.em),"Mod-`":pr(t.marks.code),"Alt-Shift-5":pr(t.marks.strike),"Mod-,":pr(t.marks.sub),"Mod-.":pr(t.marks.sup),"Mod-;":pr(t.marks.spoiler_inline),"Shift-Mod-8":Ir(t.nodes.bullet_list),"Shift-Mod-9":Ir(t.nodes.ordered_list),"Mod-q":cr(t.nodes.blockquote),"Shift-Ctrl-0":lr(t.nodes.paragraph),"Shift-Ctrl-1":lr(t.nodes.heading,{level:1}),"Shift-Ctrl-2":lr(t.nodes.heading,{level:2}),"Shift-Ctrl-3":lr(t.nodes.heading,{level:3}),"Shift-Ctrl-4":lr(t.nodes.heading,{level:4}),"Shift-Ctrl-5":lr(t.nodes.heading,{level:5}),"Shift-Ctrl-6":lr(t.nodes.heading,{level:6}),"Shift-Ctrl-\\":lr(t.nodes.code_block),"Mod-]":_r(t.nodes.list_item),"Mod-m":_r(t.nodes.list_item),"Mod-[":br(t.nodes.list_item),"Mod-Shift-m":br(t.nodes.list_item),Enter:n,"Shift-Enter":ur(er,e)}}(this.schema))),a.add("baseKeymap",bo(vr)),a.add("placeholder",(n=this.attrs.placeholder,new We({props:{decorations:function(t){var e=[];if(1===t.doc.childCount){var r=t.doc.child(0);r.type.isBlock&&0===r.childCount&&r.type==t.schema.nodes.paragraph&&e.push(Hs.node(0,r.nodeSize,{class:"placeholder","data-before":n}))}return Gs.create(t.doc,e)}}}))),a.add("history",(s={depth:s&&s.depth||100,newGroupDelay:s&&s.newGroupDelay||500},new We({key:ro,state:{init:function(){return new Zn(Jn.empty,Jn.empty,null,0)},apply:function(t,e,r){return function(t,e,r,n){var o,i=r.getMeta(ro);if(i)return i.historyState;r.getMeta(no)&&(t=new Zn(t.done,t.undone,null,0));var s=r.getMeta("appendedTransaction");if(0==r.steps.length)return t;if(s&&s.getMeta(ro))return s.getMeta(ro).redo?new Zn(t.done.addTransform(r,null,n,eo(e)),t.undone,Kn(r.mapping.maps[r.steps.length-1]),t.prevTime):new Zn(t.done,t.undone.addTransform(r,null,n,eo(e)),null,t.prevTime);if(!1===r.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=r.getMeta("rebased"))?new Zn(t.done.rebased(r,o),t.undone.rebased(r,o),Yn(t.prevRanges,r.mapping),t.prevTime):new Zn(t.done.addMaps(r.mapping.maps),t.undone.addMaps(r.mapping.maps),Yn(t.prevRanges,r.mapping),t.prevTime);var a=0==t.prevTime||!s&&(t.prevTime<(r.time||0)-n.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;var r=!1;return t.mapping.maps[0].forEach((function(t,n){for(var o=0;o<e.length;o+=2)t<=e[o+1]&&n>=e[o]&&(r=!0)})),r}(r,t.prevRanges)),c=s?Yn(t.prevRanges,r.mapping):Kn(r.mapping.maps[r.steps.length-1]);return new Zn(t.done.addTransform(r,a?e.selection.getBookmark():null,n,eo(e)),Jn.empty,c,r.time)}(e,r,t,s)}}
443,config:s,props:{handleDOMEvents:{beforeinput:function(t,e){var r="historyUndo"==e.inputType?oo(t.state,t.dispatch):"historyRedo"==e.inputType&&io(t.state,t.dispatch);return r&&e.preventDefault(),r}}}}))),a.add("disabled",new We({key:new Ke("disabled"),props:{editable:function(t){return!t.disabled$}},state:{init:function(t){return t.disabled},apply:function(t,e){var r=t.getMeta("disabled");return void 0!==r?r:e}}})),a.add("disableBase64Paste",new We({props:{transformPastedHTML:function(t){var e=wa.parseFromString(t,"text/html");return e.querySelectorAll("img").forEach((function(t){_a.test(t.src)&&t.remove()})),e.documentElement.outerHTML}}})),a.add("dropCursor",(void 0===o&&(o={}),new We({view:function(t){return new fa(t,o)}}))),a.add("gapCursor",new We({props:{decorations:ba,createSelectionBetween:function(t,e,r){if(e.pos==r.pos&&da.valid(r))return new da(r)},handleClick:ya,handleKeyDown:ga,handleDOMEvents:{beforeinput:ka}}})),a.add("menu",(i=this.attrs.menuState,new We({view:function(t){return i.attachEditorView(t),i}}))),a.add("toggleSpoiler",function(t){return new We({props:{handleClickOn:xa(t),handleDoubleClickOn:xa(t)}})}(this.schema)),a},e.buildEditorProps=function(){var t=this;return{state:this.state,dispatchTransaction:function(e){var r=this.state.apply(e);this.updateState(r);var n=this.state.doc,o=t.serializeContent(n,t.schema);t.attrs.oninput(o)}}},e.buildInputRules=function(t){return function(t){var e,r,n,o,i=[Sr,(o=t.nodes.blockquote,Ar(/^\s*>\s$/,o)),Ca(t.nodes.ordered_list),Sa(t.nodes.bullet_list),Aa(t.nodes.code_block),Ma(t.nodes.heading,6),Da(t.nodes.spoiler),(e=/(?:___\s|\*\*\*\s|---)$/,r=t.nodes.horizontal_rule,new wr(e,(function(t,e,o,i){var s=n instanceof Function?n(e):n,a=t.tr;return e[0]&&a.replaceWith(o-1,i,r.create(s)),a}))),Mr(/^\s*\$\$\s$/,t.nodes.math_block),Nr(/(?:\*\*|__)([^\*_]+)(?:\*\*|__)$/,t.marks.strong),Nr(/(?:^|[^_])(_([^_]+)_)$/,t.marks.em),Nr(/(?:^|[^*])(\*([^*]+)\*)$/,t.marks.em),Nr(/(?:`)([^`]+)(?:`)$/,t.marks.code),Nr(/(?:~~)([^~]+)(?:~~)$/,t.marks.strike),Nr(/(?:[^~]~)([^~]+)(?:~)$/,t.marks.sub),Nr(/(?:\^)([^^]+)(?:\^)$/,t.marks.sup),Nr(/(?:\|\|)([^\|]+)(?:\|\|)$/,t.marks.spoiler_inline),Nr(/(?:>!)(.+)(?:!<)$/,t.marks.spoiler_inline),Nr(/(?:\$)([^$]+)(?:\$)$/,t.marks.math_inline)];return i}(t)},e.parseInitialValue=function(t){return this.parser.parse(t)},e.serializeContent=function(t){return this.serializer.serialize(t,{tightLists:!0})},e.moveCursorTo=function(t){this.setSelectionRange(t,t)},e.getSelectionRange=function(){return[this.view.state.selection.from,this.view.state.selection.to]},e.getLastNChars=function(t){var e=this.view.state.selection.$from.nodeBefore;return e&&e.text?e.text.slice(Math.max(0,e.text.length-t)):""},e.insertAtCursor=function(t,e){this.insertAt(this.getSelectionRange()[0],t,e),$(this.view.dom).trigger("click")},e.insertAt=function(t,e,r){this.insertBetween(t,t,e,r)},e.insertBetween=function(t,e,r,n){var o=this;void 0===n&&(n=!0);var i=0;if(n)this.view.dispatch(this.view.state.tr.insertText(r,t,e));else{t-=1;var s=this.parseInitialValue(r);this.view.dispatch(this.view.state.tr.replaceRangeWith(t,e,s)),i=r.match(/\s+$/)[0].split("\n").length-1}this.moveCursorTo(Math.min(t+r.length+1,Me.atEnd(this.view.state.doc).to)),m.redraw(),r.endsWith(" ")&&!n&&this.insertAtCursor(" "),Array(i).fill(0).forEach((function(){vr.Enter(o.view.state,o.view.dispatch)}))},e.replaceBeforeCursor=function(t,e,r){this.insertBetween(t,this.getSelectionRange()[0],e,r)},e.setSelectionRange=function(t,e){var r=this.view.state.tr.doc.resolve(t),n=this.view.state.tr.doc.resolve(e);this.view.dispatch(this.view.state.tr.setSelection(new Te(r,n))),this.focus()},e.getCaretCoordinates=function(t){var e=this.view.coordsAtPos(t),r=this.view.dom.getBoundingClientRect();return{left:e.left-r.left,top:e.top-r.top}},e.focus=function(){this.view.focus()},e.destroy=function(){this.view.destroy()},e.disabled=function(t){this.view.dispatch(this.view.state.tr.setMeta("disabled",t))},t}(),Ta={commands:Jr,markdown:Pn,ProseMirrorEditorDriver:Ea},Oa=function(){function t(){this.items={}}var e=t.prototype;return e.attachEditorView=function(t){this.editorView=t},e.addItem=function(t,e,r){this.items[t]={command:e,onEditorUpdate:r}},e.getSchema=function(){return this.editorView.state.schema},e.update=function(){var t=this;
443app.editor=this.editorView,Object.keys(this.items).forEach((function(e){t.items[e].onEditorUpdate()}))},e.destroy=function(){},e.markActive=function(t){return r=t,o=(n=(e=this.editorView.state).selection).from,i=n.$from,s=n.to,n.empty?!!r.isInSet(e.storedMarks||i.marks()):!!e.doc.rangeHasMark(o,s,r);var e,r,n,o,i,s},e.markAttrs=function(t){return function(t,e){var r=t.selection,n=r.from,o=r.to,i=[];t.doc.nodesBetween(n,o,(function(t){i=[].concat(i,t.marks)}));var s=i.find((function(t){return t.type.name===e.name}));return s?s.attrs:{}}(this.editorView.state,t)},e.nodeActive=function(t,e){return Or(this.editorView.state,t,e)},e.selectionEmpty=function(){return this.editorView.state.selection.empty},e.insertNode=function(t,e){var r,n=t.createAndFill(e);r=this.editorView.state.selection.empty?this.editorView.state.tr.insert(this.editorView.state.selection.from,n):this.editorView.state.tr.replaceSelection(n),this.editorView.dispatch(r),this.editorView.focus()},e.run=function(t){this.items[t]&&(this.editorView.focus(),this.items[t].command(this.editorView.state,this.editorView.dispatch,this.editorView))},t}(),Na={MenuState:Oa};const qa=flarum.core.compat["common/extend"],za=flarum.core.compat["common/components/TextEditor"];var Ia=r.n(za);const Ra=flarum.core.compat["common/utils/classList"];var La=r.n(Ra);const Ba=flarum.core.compat["common/components/FieldSet"];var Fa=r.n(Ba);const Pa=flarum.core.compat["common/components/Switch"];var $a=r.n(Pa);const Va=flarum.core.compat["forum/components/SettingsPage"];var ja=r.n(Va);app.initializers.add("askvortsov/flarum-rich-text",(function(){(0,qa.extend)(ja().prototype,"settingsItems",(function(t){t.add("composer",Fa().component({label:app.translator.trans("askvortsov-rich-text.forum.settings.composer_heading"),className:"Settings-composer"},this.composerItems().toArray()))})),ja().prototype.composerItems=function(){var t=this,e=new(k());return e.add("useRichTextEditor",$a().component({state:this.user.preferences().useRichTextEditor,onchange:function(e){t.useRichTextEditorLoading=!0,t.user.savePreferences({useRichTextEditor:e}).then((function(){t.useRichTextEditorLoading=!1,m.redraw()}))},loading:this.useRichTextEditorLoading},app.translator.trans("askvortsov-rich-text.forum.settings.use_rich_text_editor_label"))),e.add("richTextCompactParagraphs",$a().component({state:this.user.preferences().richTextCompactParagraphs,onchange:function(e){t.richTextCompactParagraphsLoading=!0,t.user.savePreferences({richTextCompactParagraphs:e}).then((function(){t.richTextCompactParagraphsLoading=!1,m.redraw()}))},loading:this.richTextCompactParagraphsLoading},app.translator.trans("askvortsov-rich-text.forum.settings.rich_text_compact_paragraphs_label"))),e},(0,qa.extend)(Ia().prototype,"controlItems",(function(t){var e=this;app.forum.attribute("toggleRichTextEditorButton")&&t.add("rich-text",m(a(),{text:app.translator.trans("askvortsov-rich-text.lib.composer.toggle_button")},m(d(),{icon:"fas fa-pen-fancy",className:La()({Button:!0,"Button--icon":!0,active:app.session.user.preferences().useRichTextEditor}),onclick:function(){app.session.user.savePreferences({useRichTextEditor:!app.session.user.preferences().useRichTextEditor}).then((function(){app.composer.editor.destroy(),e.attrs.composer.editor=e.buildEditor(e.$(".TextEditor-editorContainer")[0]),m.redraw.sync(),app.composer.editor.focus()}))}})),-10)})),(0,qa.extend)(Ia().prototype,"toolbarItems",(function(t){app.session.user.preferences().useRichTextEditor&&(t.remove("markdown"),t.add("prosemirror-menu",m(Ur,{state:this.menuState}),100))})),(0,qa.extend)(Ia().prototype,"buildEditorParams",(function(t){app.session.user.preferences().useRichTextEditor&&(t.menuState=this.menuState=new Oa,t.classNames.push("Post-body"),t.escape=function(){return app.composer.close()},m.redraw())})),(0,qa.override)(Ia().prototype,"buildEditor",(function(t,e){return app.session.user.preferences().useRichTextEditor?new Ea(e,this.buildEditorParams()):t(e)}))}))})(),module.exports=n})();
444
445
446flarum.extensions['askvortsov-rich-text']=module.exports;
447
448var module={};
449
450(()=>{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"}
450),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})();
451
452
453flarum.extensions['flarum-sticky']=module.exports;
454
455var module={};
456
457/*! For license information please see forum.js.LICENSE.txt */
458(()=>{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"];
458var 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()))}
458)).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
458(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
458s"},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
458ick: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 458
458a().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
458h(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})();
459
460
461flarum.extensions['flarum-tags']=module.exports;
462
463var module={};
464
465(()=>{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;
465return 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})();
466
467
468flarum.extensions['flarum-lock']=module.exports;
469
470var module={};
471
472module.exports=function(t){var n={};function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(i,o,function(n){return t[n]}.bind(null,o));return i},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=15)}([function(t,n,e){"use strict";function i(t,n){return(i=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function o(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n)}e.d(n,"a",(function(){return o}))},function(t,n,e){"use strict";function i(t){return t.slice(0).sort((function(t,n){var e=t.position,i=n.position;return e>i?1:e<i?-1:0}))}e.d(n,"a",(function(){return i}))},function(t,n){t.exports=flarum.core.compat["common/Component"]},,function(t,n,e){"use strict";function i(){return(i=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t}).apply(this,arguments)}e.d(n,"a",(function(){return i}))},function(t,n){t.exports=flarum.core.compat["common/utils/classList"]},function(t,n){t.exports=flarum.core.compat["common/helpers/icon"]},function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var i=e(4),o=function(){function t(){this.widgets=[],this.states={},this.config={}}var n=t.prototype;return n.add=function(t,n){t.extension=n,t.id=n+":"+t.key,this.widgets.push(t),this.states[t.id]={}},n.getbyId=function(t){return this.getWidgetInstances().find((function(n){return n.id===t}))||null},n.getWidgetInstances=function(){var t=this,n=this.config.disabled||[],e=(this.config.instances||[]).map((function(n){return Object(i.a)({},t.widgets.find((function(t){return t.id===n.id}))||{},n)}));
472return this.widgets.forEach((function(t){e.find((function(n){return n.id===t.id}))||e.push(t)})),e.filter((function(t){return!n.includes(t.id)}))},n.get=function(t,n){var e=this;return void 0===n&&(n=!1),this.getWidgetInstances().filter((function(n){return n.placement===t})).filter((function(t){return n||("function"==typeof t.isDisabled?!t.isDisabled():!t.isDisabled)})).filter((function(t){return(t.extension||t.id.split(":")[0])in flarum.extensions})).map((function(t){return Object(i.a)({},t,{extension:t.extension||t.id.split(":")[0],state:e.states[t.id]})}))},n.setConfig=function(t){this.config=t},t}()},function(t,n){t.exports=flarum.core},function(t,n,e){"use strict";var i=function(){function t(){this.widgets=[]}var n=t.prototype;return n.add=function(t){return this.widgets.push(t),this},n.extend=function(t,n){this.widgets.map((function(e){t.widgets.add(e,n)}))},t}(),o=e(0),r=e(2),c=e.n(r),s=e(5),u=e.n(s),a=e(6),f=e.n(a),d=function(t){function n(){return t.apply(this,arguments)||this}Object(o.a)(n,t);var e=n.prototype;return e.view=function(){return m("div",{className:u()(["AfruxWidgets-Widget",this.className()])},this.header(),m("div",{className:"AfruxWidgets-Widget-content"},this.content()))},e.header=function(){var t=this.icon(),n=this.title();return n?m("div",{className:"AfruxWidgets-Widget-title"},t?m("span",{className:"AfruxWidgets-Widget-title-icon"},f()(t)):null,m("span",{className:"AfruxWidgets-Widget-title-label"},n),m("div",{className:"AfruxWidgets-Widget-title-desc"},this.description())):null},e.className=function(){return""},e.title=function(){return""},e.description=function(){return""},e.icon=function(){return""},e.content=function(){return""},n}(c.a);n.a={"extensions/afrux-forum-widgets-core/common/extend/Widgets":i,"extensions/afrux-forum-widgets-core/common/components/Widget":d}},function(t,n){t.exports=flarum.core.compat["common/extend"]},function(t,n){t.exports=flarum.core.compat["forum/components/IndexPage"]},function(t,n){t.exports=flarum.core.compat["common/utils/Stream"]},,,function(t,n,e){"use strict";e.r(n);var i=e(10),o=e(11),r=e.n(o),c=e(7),s=e(0),u=e(2),a=e.n(u),f=e(1),d=function(t){function n(){return t.apply(this,arguments)||this}return Object(s.a)(n,t),n.prototype.view=function(){return m("div",{className:"AfruxWidgets-sideNavAlt AfruxWidgets-WidgetSection"},Object(f.a)(app.widgets.get("end")).map((function(t){return t.component.component({state:t.state})})))},n}(a.a),p=function(t){function n(){return t.apply(this,arguments)||this}return Object(s.a)(n,t),n.prototype.view=function(){return"index"!==app.current.data.routeName?null:m("div",{className:"AfruxWidgets-startTop AfruxWidgets-WidgetSection"},Object(f.a)(app.widgets.get("start_top")).map((function(t){return t.component.component({state:t.state})})))},n}(a.a),l=function(t){function n(){return t.apply(this,arguments)||this}return Object(s.a)(n,t),n.prototype.view=function(){return"index"!==app.current.data.routeName?null:m("div",{className:"AfruxWidgets-startBottom AfruxWidgets-WidgetSection"},Object(f.a)(app.widgets.get("start_bottom")).map((function(t){return t.component.component({state:t.state})})))},n}(a.a),g=e(12),h=e.n(g),x=e(5),b=e.n(x),W=function(t){function n(){for(var n,e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return(n=t.call.apply(t,[this].concat(i))||this).scrollEnd=void 0,n}Object(s.a)(n,t);var e=n.prototype;return e.oninit=function(n){t.prototype.oninit.call(this,n),this.scrollEnd=h()(!1)},e.view=function(){var t=this,n=["phone","tablet"].includes(app.screen());return m("div",{className:b()({"AfruxWidgets-topWidgetSection AfruxWidgets-WidgetSection":!0,"AfruxWidgets-WidgetSection--endScroll":n&&this.scrollEnd()}),onscroll:function(e){n&&(t.scrollEnd(!1),e.target.offsetWidth+e.target.scrollLeft>=e.target.scrollWidth&&t.scrollEnd(!0))}},Object(f.a)(app.widgets.get("top")).map((function(t){return t.component.component({state:t.state})})))},n}(a.a),v=function(t){function n(){return t.apply(this,arguments)||this}return Object(s.a)(n,t),n.prototype.view=function(){return m("div",{className:"AfruxWidgets-bottomWidgetSection AfruxWidgets-WidgetSection"},Object(f.a)(app.widgets.get("bottom")).map((function(t){return t.component.component({
472state:t.state})})))},n}(a.a),y=e(9),w=Object.assign(y.a,{"extensions/afrux-forum-widgets-core/forum/components/EndWidgetSection":d,"extensions/afrux-forum-widgets-core/forum/components/StartTopWidgetSection":p,"extensions/afrux-forum-widgets-core/forum/components/StartBottomWidgetSection":l,"extensions/afrux-forum-widgets-core/forum/components/TopWidgetSection":W}),O=e(8);app.widgets=new c.a,app.initializers.add("afrux/forum-widgets-core",(function(){app.widgets.setConfig(app.data.resources[0].attributes["afrux-forum-widgets-core.config"]),Object(i.extend)(r.a.prototype,"view",(function(t){t.children[1].children[0].children.push(m(d,null)),t.children[1].children=[m(W,null)].concat(t.children[1].children,[m(v,null)])})),Object(i.extend)(r.a.prototype,"sidebarItems",(function(t){t.add("startTopWidgetSection",m(p,null),100),t.add("startBottomWidgetSection",m(l,null),-100)}))})),Object.assign(O.compat,w)}]);
473
474
475flarum.extensions['afrux-forum-widgets-core']=module.exports;
476
477var module={};
478
479(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e);const o=flarum.core.compat["forum/app"];var n=t.n(o);const r=flarum.core.compat["common/extend"],i=flarum.core.compat["forum/components/ForgotPasswordModal"];var a=t.n(i);function s(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}const u=flarum.core.compat["common/Component"];var c=function(t){var e,o;function r(){for(var e,o=arguments.length,n=new Array(o),r=0;r<o;r++)n[r]=arguments[r];return(e=t.call.apply(t,[this].concat(n))||this).widgetId=void 0,e.turnstileLoaded=void 0,e}o=t,(e=r).prototype=Object.create(o.prototype),e.prototype.constructor=e,l(e,o);var i,a,u=r.prototype;return u.oninit=function(e){t.prototype.oninit.call(this,e),this.turnstileLoaded=!!window.turnstile},u.getCurrentTheme=function(){var t,e,o=null==(t=flarum.extensions["fof-nightmode"])?void 0:t.getTheme,r=null==(e=flarum.extensions["fof-nightmode"])?void 0:e.Themes;if(o&&r){var i=o();if(i===r.AUTO&&(i=window.matchMedia("(prefers-color-scheme:dark)").matches?r.DARK:r.LIGHT),i===r.DARK)return"dark";
479if(i===r.LIGHT)return"light"}return n().forum.attribute("turnstile_dark_mode")?"dark":"light"},u.onTurnstileComplete=function(t){var e,o;null==(e=(o=this.attrs).onTurnstileStateChange)||e.call(o,t)},u.onTurnstileExpire=function(){var t,e;this.widgetId&&window.turnstile.reset(this.widgetId),null==(t=(e=this.attrs).onTurnstileStateChange)||t.call(e,null)},u.onTurnstileError=function(){var t,e;null==(t=(e=this.attrs).onTurnstileStateChange)||t.call(e,null)},u.createTurnstile=function(){this.turnstileLoaded&&window.turnstile.render(this.element,this.config)},u.removeTurnstile=function(){this.turnstileLoaded&&this.widgetId&&window.turnstile.remove(this.widgetId)},u.oncreate=function(e){t.prototype.oncreate.call(this,e),this.createTurnstile()},u.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),this.removeTurnstile()},u.view=function(t){return this.turnstileLoaded?m("div",{class:"Blomstra-Turnstile Form-group"}):m("p",{class:"BlomstraTurnstile-notLoaded"},n().translator.trans("blomstra-turnstile.forum.not_loaded_error"))},i=r,(a=[{key:"config",get:function(){return{action:this.attrs.action,theme:this.getCurrentTheme(),language:n().translator.getLocale()||"auto",sitekey:n().forum.attribute("blomstra-turnstile.site_key"),size:"flexible",callback:this.onTurnstileComplete.bind(this),"expired-callback":this.onTurnstileExpire.bind(this),"error-callback":this.onTurnstileError.bind(this)}}}])&&s(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(t.n(u)());const d=flarum.core.compat["common/components/Button"];var f=t.n(d);const p=flarum.core.compat["forum/components/ChangePasswordModal"];var h=t.n(p);const g=flarum.core.compat["forum/components/LogInModal"];var b=t.n(g);const v=flarum.core.compat["forum/components/SignUpModal"];var T=t.n(v);n().initializers.add("blomstra/turnstile",(function(){(0,r.extend)(T().prototype,"submitData",(function(t){n().forum.attribute("blomstra-turnstile.signup")&&(t.turnstileToken=this.__turnstileToken)})),(0,r.extend)(T().prototype,"fields",(function(t){var e=this;n().forum.attribute("blomstra-turnstile.signup")&&t.add("turnstile",m(c,{action:"sign_up",onTurnstileStateChange:function(t){e.__turnstileToken=t}}),-5)})),(0,r.extend)(b().prototype,"loginParams",(function(t){n().forum.attribute("blomstra-turnstile.signin")&&(t.turnstileToken=this.__turnstileToken)})),(0,r.extend)(b().prototype,"fields",(function(t){var e=this;n().forum.attribute("blomstra-turnstile.signin")&&t.add("turnstile",m(c,{action:"log_in",onTurnstileStateChange:function(t){e.__turnstileToken=t}}),-5)})),(0,r.extend)(a().prototype,"requestParams",(function(t){n().forum.attribute("blomstra-turnstile.forgot")&&(t.turnstileToken=this.__turnstileToken)})),(0,r.extend)(a().prototype,"fields",(function(t){var e=this;n().forum.attribute("blomstra-turnstile.forgot")&&t.add("turnstile",m(c,{action:"forgot_pw",onTurnstileStateChange:function(t){e.__turnstileToken=t}}),-5)})),h().prototype.__turnstileToken=null,(0,r.extend)(h().prototype,"oninit",(function(){this.loading=!0})),(0,r.override)(h().prototype,"content",(function(t){var e=this;if(n().forum.attribute("blomstra-turnstile.forgot"))return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},n().translator.trans("core.forum.change_password.text")),m("div",{className:"Form-group"},f().component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,disabled:this.loading},n().translator.trans("core.forum.change_password.send_button"))),m(c,{action:"forgot_pw",onTurnstileStateChange:function(t){e.__turnstileToken=t,e.loading=!1,m.redraw()}})))})),(0,r.override)(h().prototype,"onsubmit",(function(t,e){n().forum.attribute("blomstra-turnstile.forgot")&&(e.preventDefault(),this.loading=!0,n().request({method:"POST",url:n().forum.attribute("apiUrl")+"/forgot",body:{email:n().session.user.email(),turnstileToken:this.__turnstileToken}}).then(this.hide.bind(this),this.loaded.bind(this)))}))}))})(),module.exports=e})();
480
481
482flarum.extensions['blomstra-turnstile']=module.exports;
483
484var module={};
485
486(()=>{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}
vendor: 5,044 bytes, line 486
486|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);case 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(":","")}))}
vendor: 3,096 bytes, line 486
486,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);
486var 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"}
486,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})();
487
488
489flarum.extensions['flarum-suspend']=module.exports;
490
491var module={};
492
493(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e);const o=flarum.core.compat["forum/app"];var r=t.n(o);const n=flarum.core.compat["common/extend"],s=flarum.core.compat["forum/components/PostUser"];var a=t.n(s);function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}const c=flarum.core.compat["common/Component"];var i=t.n(c);const p=flarum.core.compat["common/components/Tooltip"];var u=t.n(p),f=function(t){var e,o;function n(){return t.apply(this,arguments)||this}o=t,(e=n).prototype=Object.create(o.prototype),e.prototype.constructor=e,l(e,o);var s=n.prototype;return s.oninit=function(e){t.prototype.oninit.call(this,e)},s.view=function(){var t=this.attrs.user,e=r().forum.attribute("ianm-level-ranks.pointsText")||r().translator.trans("ianm-level-ranks.lib.defaults.level"),o=21*(t.commentCount()-t.discussionCount())+33*t.discussionCount(),n=Math.floor(o/135),s=100/135*(o-135*n);return m(u(),{text:r().translator.trans("ianm-level-ranks.forum.desc.expText",{expTotal:o})},m("div",{class:"PostUser-level"},m("span",{class:"PostUser-text"},m("span",{class:"PostUser-levelText"},e)," ",m("span",{class:"PostUser-levelPoints"},n)),m("div",{class:"PostUser-bar PostUser-bar--empty"}),m("div",{class:"PostUser-bar",style:"width: "+s+"%;"})))},n}(i());r().initializers.add("ianm-level-ranks",(function(){(0,n.extend)(a().prototype,"view",(function(t){var e=this.attrs.post.user();e&&t.children.push(f.component({user:e}))}))}))})(),module.exports=e})();
494
495
496flarum.extensions['ianm-level-ranks']=module.exports;
497
498var module={};
499
500(()=>{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);
500a().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})();
501
502
503flarum.extensions['flarum-approval']=module.exports;
504
505var module={};
506
507(()=>{var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t);const r=flarum.core.compat["forum/app"];var o=e.n(r);const a=flarum.core.compat.extend,n=flarum.core.compat["common/components/CommentPost"];var s=e.n(n);o().initializers.add("post-number",(function(){(0,a.extend)(s().prototype,"headerItems",(function(e){var t=o().translator.trans("post-number.forum.number-prefix",{number:this.attrs.post.data.attributes.number});!0!==this.attrs.post.attribute("isHidden")&&e.add("post-number",m("span",{className:"postNumber"},t))}))}))})(),module.exports=t})();
508
509
510flarum.extensions['ziiven-post-number']=module.exports;
511
512var module={};
513
514(()=>{var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t);const n=flarum.core.compat.extend,a=flarum.core.compat["forum/components/IndexPage"];var o=e.n(a);const r=flarum.core.compat["components/Button"];var c=e.n(r);const s=flarum.core.compat["common/components/Alert"];var i=e.n(s);function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function p(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}const l=flarum.core.compat["components/Modal"];var f=e.n(l);flarum.core.compat["utils/Stream"];var d=function(e){function t(){return e.apply(this,arguments)||this}p(t,e);var n=t.prototype;return n.oninit=function(t){e.prototype.oninit.call(this,t)},n.className=function(){return"checkInResultModal Modal--small"},n.title=function(){return m("div",{className:"checkInResultModal successTitleText"},app.translator.trans("ziven-checkin.forum.check-in-success"))},n.content=function(){var e=app.session.user.attribute("totalContinuousCheckIn"),t=app.forum.attribute("forumCheckinSuccessPromptText"),n=app.forum.attribute("forumCheckinSuccessPromptRewardText"),a=app.forum.attribute("forumCheckinRewarMoney"),o="",r="checkInResultModal hideText",c="checkInResultModal hideText";return""!==t&&(r="checkInResultModal successText"),!0==(void 0!==app.forum.attribute("antoinefr-money.moneyname"))&&""!==n&&(o=(app.forum.attribute("antoinefr-money.moneyname")||"[money]").replace("[money]",a),c="checkInResultModal rewardText"),m("div",{className:"Modal-body"},m("div",{className:r},t.replace("[days]",e)),m("div",{className:c},n.replace("[reward]",o)))},t}(f()),h=function(e){function t(){return e.apply(this,arguments)||this}p(t,e);var n=t.prototype;return n.oninit=function(t){e.prototype.oninit.call(this,t)},n.className=function(){return"checkInResultModal Modal--small"},n.title=function(){return m("div",{className:"checkInResultModal failedTitleText"},app.translator.trans("ziven-checkin.forum.check-in-failed"))},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"checkInResultModal successText"},app.translator.trans("ziven-checkin.forum.try-again-later")))},t}(f());
514app.initializers.add("ziven-checkin",(function(){(0,n.extend)(o().prototype,"sidebarItems",(function(e){if(null!==app.session.user&&!0===app.forum.attribute("allowCheckIn")){var t,n=app.current.get("routeName"),a=app.session.user.attribute("totalContinuousCheckIn"),o=app.session.user.attribute("canCheckin"),r=app.session.user.attribute("canCheckinContinuous"),s=(app.session.user.attribute("serverDate"),app.forum.attribute("forumCheckinSuccessPromptType")),u=app.session.user.attribute("checkInCompatibleExtensions"),p=(app.session.user.attribute("lastCheckinTime"),"forum-checkin");if("tag"===n&&-1!==u.indexOf("fof-follow-tags")&&(p="forum-checkin-1"),!0===o){t=app.translator.trans("ziven-checkin.forum.check-in"),e.add(p,c().component({icon:"fas fa-calendar",className:"Button CheckInButton--yellow",itemClassName:"App-primaryControl",id:"checkInButton",onclick:function(){app.session.user.save({canCheckin:!1,totalContinuousCheckIn:!0===r?a+1:1}).then((function(){var e=app.forum.attribute("forumCheckinSuccessPromptText"),t=app.forum.attribute("forumCheckinSuccessPromptRewardText"),n=app.session.user.attribute("canCheckin");if(""!==e||""!==t)if(1===s)if(!1===n){var a=app.forum.attribute("forumCheckinRewarMoney"),o=void 0!==app.forum.attribute("antoinefr-money.moneyname"),r="";if(""!==e){var c=e.replace("[days]",app.session.user.attribute("totalContinuousCheckIn"));app.alerts.show(i(),{type:"success"},c)}if(!0===o&&""!==t){r=(app.forum.attribute("antoinefr-money.moneyname")||"[money]").replace("[money]",a);var u=t.replace("[reward]",r);app.alerts.show(i(),{type:"success"},u)}}else app.alerts.show(i(),{type:"error"},app.translator.trans("ziven-checkin.forum.check-in-failed")+" "+app.translator.trans("ziven-checkin.forum.try-again-later"));else 2===s&&(!1===n?app.modal.show(d):app.modal.show(h))}))}},t),50);var l=app.forum.attribute("forumAutoCheckin"),m=app.forum.attribute("forumAutoCheckinDelay");1===l&&setTimeout((function(){$("#checkInButton").click()}),m)}else t=a<=1?app.translator.trans("ziven-checkin.forum.checked-in-day",{count:a}):app.translator.trans("ziven-checkin.forum.checked-in-days",{count:a}),e.add(p,c().component({icon:"fas fa-calendar-check",className:"Button CheckInButton--green",itemClassName:"App-primaryControl",disabled:!0},t),50)}}))}))})(),module.exports=t})();
515
516
517flarum.extensions['ziiven-daily-check-in']=module.exports;
518
519var module={};
520
521(()=>{var t={n:r=>{var a=r&&r.__esModule?()=>r.default:()=>r;return t.d(a,{a}),a},d:(r,a)=>{for(var o in a)t.o(a,o)&&!t.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:a[o]})},o:(t,r)=>Object.prototype.hasOwnProperty.call(t,r),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};(()=>{"use strict";t.r(r);const a=flarum.core.compat["common/app"];t.n(a)().initializers.add("xypp/pay-to-read",(function(){}));const o=flarum.core.compat["forum/app"];var e=t.n(o);const n=flarum.core.compat["forum/components/CommentPost"];var p=t.n(n);const s=flarum.core.compat["common/extend"],i=flarum.core.compat["common/components/TextEditor"];var d=t.n(i);const c=flarum.core.compat["common/components/TextEditorButton"];var l=t.n(c);const u=flarum.core.compat["forum/components/LogInModal"];var y=t.n(u);const f=flarum.core.compat["forum/components/DiscussionPage"];var h=t.n(f);function x(t,r){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},x(t,r)}const b=flarum.core.compat["common/components/Modal"];var v=t.n(b);const g=flarum.core.compat["components/Button"];var T=t.n(g);const _=flarum.core.compat["common/utils/setRouteWithForcedRefresh"];var C=t.n(_);flarum.core.compat["common/components/Alert/Alert"];var k=function(t){var r,a;function o(){for(var r,a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return(r=t.call.apply(t,[this].concat(o))||this).loading=!0,r.tipText=e().translator.trans("xypp-pay-to-read.forum.payment.loading"),r.btnText=e().translator.trans("xypp-pay-to-read.forum.payment.loading"),r.item_id=-1,r}a=t,(r=o).prototype=Object.create(a.prototype),r.prototype.constructor=r,x(r,a);var n=o.prototype;
521return n.className=function(){return"Modal--small PayModal"},n.title=function(){return e().translator.trans("xypp-pay-to-read.forum.payment.title")},n.content=function(){return m("div",{className:"Modal-body"},this.tipText,m("div",{className:"paymodal-btn"},m(T(),{class:"Button Button--primary",loading:this.loading,disabled:this.loading,onclick:this.pay,"data-id":this.item_id},this.btnText)))},n.onready=function(){var t=this;this.loading=!0,this.item_id=this.attrs.item_id,e().request({url:e().forum.attribute("apiUrl")+"/pay-to-read/payment/",params:{id:this.attrs.item_id},method:"GET"}).then((function(r){"200"==r.code?(t.loading=!1,t.tipText=e().translator.trans("xypp-pay-to-read.forum.payment.tip",[r.amount,r.user_money]),t.btnText=e().translator.trans("xypp-pay-to-read.forum.payment.btn"),m.redraw()):(e().modal.close(),e().alerts.show({type:"error"},e().translator.trans("xypp-pay-to-read.forum.error."+r.status,[])))})).catch((function(t){e().alerts.show({type:"error"},e().translator.trans("xypp-pay-to-read.forum.error.internal_err")),e().modal.close()}))},n.pay=function(t){var r=this;this.loading=!0,m.redraw(),e().request({url:e().forum.attribute("apiUrl")+"/pay-to-read/payment/pay",body:{id:$(t.currentTarget).attr("data-id")},method:"POST"}).then((function(t){r.loading=!1,""==t.data.attributes.error?(e().modal.close(),C()(e().history.getCurrent().url)):(e().modal.close(),e().alerts.show({type:"error"},e().translator.trans("xypp-pay-to-read.forum.error."+t.data.attributes.error,[])))})).catch((function(t){console.log(t),e().alerts.show({type:"error"},e().translator.trans("xypp-pay-to-read.forum.error.internal_err")),e().modal.close()}))},o}(v());function O(t){return"string"==typeof t?t:Array.isArray(t)?t.join(""):t.toString()}function w(t){console.log(t),e().current.matches(h())&&($(".ptr-block.ptr-payment-require.ptr-render").each((function(t,r){$(r).prepend($("<div></div>").addClass("ptr-tip-line").prepend($("<button></button>").text(e().translator.trans("xypp-pay-to-read.forum.payment-req.btn")).addClass("ptr-pay-btn Button Button--primary")).prepend($("<span></span>").addClass("ptr-pay-tip").text(e().translator.trans("xypp-pay-to-read.forum.payment-req.text",[$(r).attr("data-amount")]).join(""))))})),$(".ptr-block.ptr-notfound.ptr-render").each((function(t,r){$(r).prepend($("<div></div>").addClass("ptr-tip-line").prepend($("<span></span>").addClass("ptr-pay-tip").text(O(e().translator.trans("xypp-pay-to-read.forum.payment-notfound",[$(r).attr("data-id")])))))})),$(".ptr-block.ptr-render").each((function(t,r){$(r).removeClass("ptr-render"),$(r).prepend($("<div></div>").addClass("ptr-payment-tip").text(e().translator.trans("xypp-pay-to-read.forum.paymentTip",[$(r).attr("data-amount")])).append($("<div></div>").addClass("ptr-haspaid-tip").text($(r).attr("data-haspaid-cnt")?O(e().translator.trans("xypp-pay-to-read.forum.haspaidTip",[$(r).attr("data-haspaid-cnt")])):e().translator.trans("xypp-pay-to-read.forum.nopaidTip",[]))))})),e().session.user?$(".ptr-block .ptr-pay-btn").off("click").on("click",(function(t){var r=$(t.currentTarget.parentElement.parentElement);e().modal.show(k,{item_id:r.attr("data-id")})})):$(".ptr-block .ptr-pay-btn").off("click").on("click",(function(){return e().modal.show(y())})))}e().initializers.add("xypp/pay-to-read",(function(){(0,s.extend)(p().prototype,"oncreate",w),(0,s.extend)(p().prototype,"onupdate",w),(0,s.extend)(d().prototype,"toolbarItems",(function(t){var r=this;t.add("pay-to-read",m(l(),{onclick:function(){r.attrs.composer.editor.insertAtCursor("[pay amount=1 id=0]"+e().translator.trans("xypp-pay-to-read.forum.editor.help")+"[/pay]");var t=r.attrs.composer.editor.getSelectionRange();r.attrs.composer.editor.moveCursorTo(t[1]-6)},icon:"fa fa-comment-dollar"},e().translator.trans("xypp-pay-to-read.forum.editor.label")))}))}))})(),module.exports=r})();
522
523
524flarum.extensions['xypp-pay-to-read']=module.exports;
525
526var module={};
527
528(()=>{var o={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return o.d(t,{a:t}),t},d:(r,t)=>{for(var e in t)o.o(t,e)&&!o.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})},o:(o,r)=>
528Object.prototype.hasOwnProperty.call(o,r)};(()=>{"use strict";const r=flarum.core.compat["forum/app"];var t=o.n(r);const e=flarum.core.compat["common/extend"];t().initializers.add("xypp/flarum-month-date-fix",(function(){var o=t().translator.trans("xypp-month-date-fix.forum.dmmm")+"";console.log('Replace "D MMM" time format with "'+o+'"'),(0,e.override)(dayjs.prototype,"format",(function(r,t){for(var e=arguments.length,a=new Array(e>2?e-2:0),n=2;n<e;n++)a[n-2]=arguments[n];return"D MMM"===t?r.apply(void 0,[o].concat(a)):r.apply(void 0,[t].concat(a))}))}))})(),module.exports={}})();
529
530
531flarum.extensions['xypp-month-date-fix']=module.exports;
532
533var module={};
534
535/*! For license information please see forum.js.LICENSE.txt */
536(()=>{var t={648:(t,e,o)=>{var r=o(814).default;function a(){"use strict";t.exports=a=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},o=Object.prototype,n=o.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function m(t,e,o){return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{m({},"")}catch(t){m=function(t,e,o){return t[e]=o}}function c(t,e,o,r){var a=e&&e.prototype instanceof p?e:p,n=Object.create(a.prototype),i=new x(r||[]);return n._invoke=function(t,e,o){var r="suspendedStart";return function(a,n){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw n;return{value:void 0,done:!0}}for(o.method=a,o.arg=n;;){var i=o.delegate;if(i){var s=A(i,o);if(s){if(s===g)continue;return s}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===r)throw r="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r="executing";var l=d(t,e,o);if("normal"===l.type){if(r=o.done?"completed":"suspendedYield",l.arg===g)continue;return{value:l.arg,done:o.done}}"throw"===l.type&&(r="completed",o.method="throw",o.arg=l.arg)}}}(t,o,i),n}function d(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var g={};function p(){}function f(){}function h(){}var v={};m(v,s,(function(){return this}));var b=Object.getPrototypeOf,y=b&&b(b(I([])));y&&y!==o&&n.call(y,s)&&(v=y);var w=h.prototype=p.prototype=Object.create(v);function B(t){["next","throw","return"].forEach((function(e){m(t,e,(function(t){return this._invoke(e,t)}))}))}function N(t,e){function o(a,i,s,l){var u=d(t[a],t,i);if("throw"!==u.type){var m=u.arg,c=m.value;return c&&"object"==r(c)&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){o("next",t,s,l)}),(function(t){o("throw",t,s,l)})):e.resolve(c).then((function(t){m.value=t,s(m)}),(function(t){return o("throw",t,s,l)}))}l(u.arg)}var a;this._invoke=function(t,r){function n(){return new e((function(e,a){o(t,r,e,a)}))}return a=a?a.then(n,n):n()}}function A(t,e){var o=t.iterator[e.method];if(void 0===o){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=d(o,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,g;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,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function _(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 F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function I(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,r=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=h,m(w,"constructor",h),m(h,"constructor",f),f.displayName=m(h,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,m(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},B(N.prototype),m(N.prototype,l,(function(){return this})),e.AsyncIterator=N,e.async=function(t,o,r,a,n){void 0===n&&(n=Prom
536ise);var i=new N(c(t,o,r,a),n);return e.isGeneratorFunction(o)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},B(w),m(w,u,"Generator"),m(w,s,(function(){return this})),m(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=[];for(var o in t)e.push(o);return e.reverse(),function o(){for(;e.length;){var r=e.pop();if(r in t)return o.value=r,o.done=!1,o}return o.done=!0,o}},e.values=I,x.prototype={constructor:x,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(F),!t)for(var e in this)"t"===e.charAt(0)&&n.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 o(o,r){return i.type="throw",i.arg=t,e.next=o,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.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 i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},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),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),F(o),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var r=o.completion;if("throw"===r.type){var a=r.arg;F(o)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,o){return this.delegate={iterator:I(t),resultName:e,nextLoc:o},"next"===this.method&&(this.arg=void 0),g}},e}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},814:t=>{function e(o){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(o)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},195:(t,e,o)=>{var r=o(648)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},482:t=>{"use strict";t.exports=flarum.extensions["fof-upload"]}},e={};function o(r){var a=e[r];if(void 0!==a)return a.exports;var n=e[r]={exports:{}};return t[r](n,n.exports,o),n.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";o.r(r);const t=flarum.core.compat["forum/app"];var e=o.n(t);const a=flarum.core.compat["common/Model"];var n=o.n(a);const i=flarum.core.compat["tags/common/models/Tag"];var s=o.n(i);const l=flarum.core.compat["common/models/Discussion"];var u=o.n(l);function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function d(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,c(t,e)}const g=flarum.core.compat["components/IndexPage"];var p=o.n(g);const f=flarum.core.compat["common/components/Page"];var h=o.n(f);const v=flarum.core.compat["common/components/Button"];var b=o.n(v);const y=flarum.core.compat["common/Component"];var w=o.n(y);const B=flarum.core.compat["common/components/Link"];var N=o.n(B),A=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.oninit=function(e){t.prototype.oninit.call(this,e),this.blogCategories=app.forum.attribute("blogTags")},o.view=function(){var t=this;return m("div",{className:"BlogCategories BlogSideWidget"},m("h3",null,app.translator.trans("v17development-flarum-blog.forum.categories")),this.blogCategories&&this.blogCategories.map((function(e){var o=app.store.getById("tags",e);if(!o)return null;var r=[],a=1===t.blogCategories.length||o.slug()===m.route.param("slug");return app.store.all("tags").forEach((function(e){e.isChild()&&e.parent()===o&&(e.slug()===m.route.param("slug")&&(a=!0),r.push(t.categoryItem(e)))})),a?[t.categoryItem(o)].concat(r):t.categoryItem(o)})))},o.categoryItem=function(t){return m(N(),{href:app.route("blogCategory",{slug:t.slug()}
536),className:"BlogSideWidget-item BlogSideWidget-item-"+t.id()+" "+(t.isChild()&&1==app.forum.attribute("blogCategoryHierarchy")?"BlogSideWidget-item-child":"")},m("span",{className:""===t.icon()?"BlogSideWidget-item-colored":"",style:{backgroundColor:""===t.icon()?t.color():null}},m("i",{className:t.icon()})),t.name())},e}(w());const _=flarum.extensions["fof-discussion-language"],F=flarum.core.compat["forum/components/IndexPage"];var x=o.n(F);const I=flarum.core.compat["common/components/SelectDropdown"];var C=o.n(I),L=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){return m("div",{className:"BlogForumNav BlogSideWidget"},m("h3",null,app.translator.trans("v17development-flarum-blog.forum.forum_nav")),m("nav",{className:"IndexPage-nav sideNav"},m(C(),{buttonClassName:"Button",className:"App-titleControl"},this.navItems().toArray())))},o.navItems=function(){return x().prototype.navItems()},e}(w());const S=flarum.core.compat["common/components/Tooltip"];var P=o.n(S);const M=flarum.core.compat["common/helpers/humanTime"];var k=o.n(M);const T=flarum.core.compat["common/helpers/icon"];var E=o.n(T);const R=flarum.core.compat["common/utils/classList"];var D=o.n(R);const O=flarum.core.compat["common/utils/ItemList"];var j=o.n(O),G=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.titleItems=function(){var t,o,r=this.attrs.article,a=new(j());return a.add("title",m("[",null,r.title()),100),(null!=(t=r.blogMeta())&&null!=t.isPendingReview&&t.isPendingReview()||r.isHidden())&&a.add("hidden",E()("fas fa-eye-slash",{class:"BlogList-item-hidden"}),80),null!=(o=r.blogMeta())&&null!=o.isPendingReview&&o.isPendingReview()&&a.add("pendingReview",m(P(),{text:e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")},E()("far fa-clock",{class:"BlogList-item-pendingReview"})),40),a},r.dataItems=function(){var t,o=this.attrs.article,r=new(j());return r.add("createdAt",m("span",{class:"BlogList-item-details-createdAt"},E()("far fa-clock")," ",k()(o.createdAt())),100),r.add("author",m("span",{class:"BlogList-item-details-author"},E()("far fa-user")," ",(null==(t=o.user())||null==t.displayName?void 0:t.displayName())||e().translator.trans("core.lib.username.deleted_text")),80),r.add("replies",m("span",{class:"BlogList-item-details-replies"},E()("far fa-comment")," ",(o.commentCount()||1)-1),60),r},r.contentItems=function(){var t,e=(null==(t=this.attrs.article.blogMeta())||null==t.summary?void 0:t.summary())||"",o=new(j());return o.add("title",m("h4",null,this.titleItems().toArray()),100),e&&o.add("summary",m("p",null,e),80),o.add("data",m("div",{class:"data"},this.dataItems().toArray()),60),o},r.getImage=function(){var t,e=this.attrs,o=e.article,r=e.defaultImage;return null!=(t=o.blogMeta())&&null!=t.featuredImage&&t.featuredImage()?"url("+o.blogMeta().featuredImage()+")":r},r.view=function(t){var o,r=this.attrs,a=r.article,n=r.defaultImage,i=this.getImage(),s=null==(o=a.blogMeta())||null==o.isSized?void 0:o.isSized();return m(N(),{href:e().route("blogArticle",{id:""+a.slug()}),className:D()("BlogList-item",{"BlogList-item-sized":s,"BlogList-item-default":!s},a.tags().map((function(t){return"BlogList-item-category-"+t.id()})))},m("div",{class:D()("BlogList-item-photo",{"FlarumBlog-default-image":i===n}),style:{backgroundImage:i}}),m("div",{class:"BlogList-item-content"},this.contentItems().toArray()))},o}(w()),z=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.topItems=function(){var t,o,r,a=this.attrs.article,n=new(j());return n.add("tags",m("span",{class:"BlogFeatured-list-item-tags"},null==(t=a.tags())?void 0:t.map((function(t){return m("span",{class:"dataItem"},t.name())}))),100),null!=a.isSticky&&a.isSticky()&&n.add("sticky",m("span",{class:"BlogFeatured-list-item-isSticky dataItem"},E()("fas fa-thumbtack")),80),(null!=(o=a.blogMeta())&&null!=o.isPendingReview&&o.isPendingReview()||a.isHidden())&&n.add("hidden",m("span",{class:"BlogFeatured-list-item-isHidden dataItem"},E()("fas fa-eye-slash")),60),null!=(r=a.blogMeta())&&null!=r.isPendingReview&&r.isPendingReview()&&n.add("pendingReview",m(P(),{text:e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review"),position:"bottom"},m("span",{class:"BlogFeatured-list-item-pendingReview dataItem"},E()("far fa-clock")," ",e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review_title"))),40),n},r.dataItems=function(){var t,o=this.attrs.article,r=new(j());return r.add("createdAt",m("span",{class:"BlogFeatured-list-item-details-createdAt"},E()("far fa-clock")," ",k()(o.createdAt())),100),r.add("author",m("span",{class:"BlogFeatured-list-item-details-author"},E()("far fa-user")," ",(null==(t=o.user())?void 0:t.displayName())||e().translator.trans("core.lib.username.deleted_text")),80),r.add("replies",m("span",{class:"BlogFeatured-list-item-details-replies"},E()("far fa-comment")," ",o.commentCount()-1),60),r},r.view=function(t){var o,r=this.attrs,a=r.article,n=r.defaultImage,i=null!=(o=a.blogMeta())&&null!=o.featuredImage&&o.featuredImage()?"url("+a.blogMeta().featuredImage()+")":n;return m(N(),{href:e().route("blogArticle",{id:""+a.slug()}),className:D()("BlogFeatured-list-item",a.tags().map((function(t){return"BlogFeatured-list-item-category-"+t.id()})),"FlarumBlog-default-image"),style:{backgroundImage:i}},m("div",{class:"BlogFeatured-list-item-top"},this.topItems().toArray()),m("div",{className:"BlogFeatured-list-item-details"},m("h4",null,a.title()),m("div",{className:"data"},this.dataItems().toArray())))},o}(w()),H=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.oninit=function(o){t.prototype.oninit.call(this,o),e().setTitle(e().translator.trans("v17development-flarum-blog.forum.blog")),this.bodyClass="BlogOverviewPage",this.isLoading=!0,this.featuredPosts=[],this.posts=[],this.hasMore=null,this.isLoadingMore=!1,this.languages=e().store.all("discussion-languages"),this.currentSelectedLanguage=m.route.param("lang")?m.route.param("lang"):e().translator.formatter.locale,e().history.push("blog"),this.loadBlogOverview(),this.featuredCount=parseInt(e().forum.attribute("blogFeaturedCount")),this.showCategories=!0,this.show
536ForumNav=!0},r.loadBlogOverview=function(){var t=e().preloadedApiDocument();t?setTimeout(this.show.bind(this,t),0):this.reloadData(),m.redraw()},r.reloadData=function(){var t="is:blog"+(m.route.param("slug")?" tag:"+m.route.param("slug"):"");null!==this.languages&&this.languages.length>=1&&(t+=" language:"+this.currentSelectedLanguage),e().store.find("discussions",{filter:{q:t},sort:"-createdAt"}).then(this.show.bind(this)).catch((function(){m.redraw()}))},r.show=function(t){if(0===t.length)return this.isLoading=!1,void m.redraw();this.hasMore=t.payload.links&&t.payload.links.next?t.payload.links.next:null,this.featuredPosts=t.slice(0,this.featuredCount),this.posts=t.length>this.featuredCount?t.slice(this.featuredCount,t.length):[],this.isLoading=!1,m.redraw()},r.loadMore=function(){var t=this;this.isLoadingMore=!0,e().store.find(this.hasMore.replace(e().forum.attribute("apiUrl"),"")).then((function(e){e.map((function(e){return t.posts.push(e)})),t.hasMore=e.payload.links&&e.payload.links.next?e.payload.links.next:null})).catch((function(){})).then((function(){t.isLoadingMore=!1,m.redraw()}))},r.title=function(){if(!m.route.param("slug"))return m("h2",null,e().translator.trans("v17development-flarum-blog.forum.recent_posts"));var t=e().store.all("tags").filter((function(t){return t.slug()===m.route.param("slug")}));return m("h2",null,t&&t[0]&&t[0].name(),m("small",null," ","- ",m(N(),{href:e().route("blog")},e().translator.trans("v17development-flarum-blog.forum.return_to_overview"))))},r.view=function(){var t,o=this,r=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null;return"fof-discussion-language"in flarum.extensions&&(t=_.components.LanguageDropdown),[1==e().forum.attribute("blogAddHero")&&p().prototype.hero(),m("div",{className:"FlarumBlogOverview"},m("div",{className:"container"},m("div",{className:"BlogFeatured"},m("div",{className:"BlogOverviewButtons"},e().forum.attribute("canWriteBlogPosts")&&m(b(),{className:"Button",onclick:function(){return o.newArticle()},icon:"fas fa-pencil-alt"},e().translator.trans("v17development-flarum-blog.forum.compose.write_article")),null!==this.languages&&this.languages.length>=1&&m(t,{selected:this.currentSelectedLanguage,onclick:function(t){"string"==typeof t&&(o.currentSelectedLanguage=t,m.route.set(document.location.pathname,{lang:t}),o.reloadData())}})),this.title(),m("div",{style:{clear:"both"}}),m("div",{class:"BlogFeatured-list"},this.isLoading&&[].concat(new Array(this.featuredCount).fill(void 0)).map((function(){return m("div",{class:"BlogFeatured-list-item BlogFeatured-list-item-ghost"},m("div",{class:"BlogFeatured-list-item-details"},m("h4",null," "),m("div",{class:"data"},m("span",null,m("i",{class:"far fa-wave"})))))})),!this.isLoading&&this.featuredPosts.length>=0&&this.featuredPosts.map((function(t){return m(z,{article:t,defaultImage:r})})))),m("div",{className:"BlogScrubber"},m("div",{className:"BlogList"},this.isLoading&&[!1,!1,!0,!1].map((function(t){return m("div",{className:"BlogList-item BlogList-item-"+(!0===t?"sized":"default")+" BlogList-item-ghost"},m("div",{className:"BlogList-item-photo FlarumBlog-default-image"}),m("div",{className:"BlogList-item-content"},m("h4",null," "),m("p",null," "),m("div",{className:"data"},m("span",null,m("i",{className:"far fa-wave"})))))})),!this.isLoading&&this.posts.length>=1&&this.posts.map((function(t){return m(G,{article:t,defaultImage:r})})),!this.isLoading&&this.featuredPosts.length>0&&null===this.hasMore&&m("p",{className:"FlarumBlog-reached-end"},e().translator.trans("v17development-flarum-blog.forum.no_more_posts")),!this.isLoading&&0===this.featuredPosts.length&&0===this.posts.length&&m("p",{className:"FlarumBlog-reached-end"},e().translator.trans("v17development-flarum-blog.forum.category_empty")),!this.isLoading&&null!==this.hasMore&&m("div",{className:"FlarumBlog-reached-load-more"},m(b(),{className:"Button",onclick:function(){return o.loadMore()},icon:"fas fa-chevron-down",loading:this.isLoadingMore},e().translator.trans("core.forum.discussion_list.load_more_button")))),m("div",{className:"Sidebar"}
536,this.showCategories&&m(A,null),this.showForumNav&&m(L,null)))))]},r.newArticle=function(){var t=[],o=e().store.getBy("tags","slug",m.route.param("slug"));o&&t.push(o),m.route.set(e().route("blogComposer",{tags:t.map((function(t){return t.id()})).join(),lang:this.languages.length>0?this.currentSelectedLanguage:void 0}))},o}(h());const W=flarum.core.compat["forum/components/DiscussionPage"];var U=o.n(W);const q=flarum.core.compat["common/extend"],Y=flarum.core.compat["common/utils/mixin"];var V=function(t){function e(){return t.apply(this,arguments)||this}return d(e,t),e}(o.n(Y)()(n(),{discussion:n().hasOne("discussion"),featuredImage:n().attribute("featuredImage"),summary:n().attribute("summary"),isFeatured:n().attribute("isFeatured"),isSized:n().attribute("isSized"),isPendingReview:n().attribute("isPendingReview")}));const $=flarum.core.compat["tags/components/TagsPage"];var J=o.n($);function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=new Array(e);o<e;o++)r[o]=t[o];return r}function Q(){(0,q.extend)(J().prototype,"view",(function(t){var e=this;if(this.loading)return t;if(0==app.forum.attribute("blogHideTags"))return t;var o=app.forum.attribute("blogTags")||[],r=X(t,"TagsPage-content",!0),a=null==r?void 0:r.children[0];return r&&a?(a.children=a.children.map((function(t,r){return o.indexOf(e.tags[r].id())>=0?null:t})),t):t})),(0,q.extend)(x().prototype,"navItems",(function(t){return 0==app.forum.attribute("blogHideTags")||(app.forum.attribute("blogTags")||[]).forEach((function(e){t.remove("tag"+e)})),t}))}function X(t,e,o,r,a){void 0===o&&(o=!1),void 0===r&&(r=50),void 0===a&&(a=0);for(var n=function(t){if(Array.isArray(t))return t;var e=(null==t?void 0:t.children)||[];return Array.isArray(e)?e:[]}(t),i=null,s=0;s<n.length;s++){var l,u;if(((null==(l=n[s])||null==(u=l.attrs)?void 0:u.className)||"").includes(e)){i=n[s];break}}if(o&&!i&&a<r)for(var m,c=function(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(o)return(o=o.call(t)).next.bind(o);if(Array.isArray(t)||(o=function(t,e){if(t){if("string"==typeof t)return K(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?K(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){o&&(t=o);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.")}(n);!(m=c()).done;){var d=X(m.value,e,!0,r,a+1);if(d)return d}return i}function Z(){var t=app.route.discussion;app.route.discussion=function(e,o){var r=!1;if(("both"===app.forum.attribute("blogRedirectsEnabled")||"discussions_only"===app.forum.attribute("blogRedirectsEnabled"))&&e.tags().length>0){var a=app.forum.attribute("blogTags");e.tags().filter((function(t){return a.indexOf(t.id())>=0||t.parent()&&a.indexOf(t.parent().id())>=0})).length>0&&(r=!0)}return r?e.lastReadPostNumber()>1?app.route("blogArticle.near",{id:e.slug(),near:e.lastReadPostNumber()}):app.route("blogArticle",{id:e.slug()}):t(e,o)}}const tt=flarum.core.compat["common/helpers/listItems"];var et=o.n(tt);const ot=flarum.core.compat["common/helpers/avatar"];var rt=o.n(ot),at=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){var t=this.attrs.loading?null:this.attrs.article?this.attrs.article.user():this.attrs.user;return m("div",{className:"FlarumBlog-Article-Author"},m("div",{className:"FlarumBlog-Article-Author-background "+(this.attrs.loading?"FlarumBlog-Author-Ghost":""),style:{backgroundColor:t&&t.color()?t.color():null}}),m("div",{className:"FlarumBlog-Article-Author-Avatar"},t?m(N(),{href:app.route("user",{username:t.username()})},rt()(t)):m("span",{className:"Avatar FlarumBlog-Author-Ghost"})),t&&m("div",{className:"FlarumBlog-Article-Author-Info"},m(N(),{href:app.route("user",{username:t.username()}),className:"FlarumBlog-Article-Author-Name"},t.displayName()),m("p",{className:"FlarumBlog-Article-Author-Bio"},t.bio&&t.bio()),m("ul",{className:"FlarumBlog-Article-Author-Extended"},et()(this.items().toArray()))),this.attrs.loading&&m("div",null,m("span",{className:"FlarumBlog-Article-Author-Name FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," ")))},o.items=function(){return new(j())},e}(w());const nt=flarum.core.compat["common/components/Modal"];var it=o.n(nt);const st=flarum.core.compat["common/utils/Stream"];var lt=o.n(st),ut=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.oninit=function(e){t.prototype.oninit.call(this,e),this.article=this.attrs.article,this.name=lt()(this.article.title()||""),this.redirect=this.attrs.redirect}
536,o.className=function(){return"Modal--small Support-Modal"},o.title=function(){return app.translator.trans("v17development-flarum-blog.forum.tools.rename_article")},o.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},o.fields=function(){var t=new(j());return t.add("name",m("div",{className:"Form-group"},m("label",null,app.translator.trans("v17development-flarum-blog.forum.article.title"),":"),m("input",{className:"FormControl",placeholder:app.translator.trans("v17development-flarum-blog.forum.article.title"),bidi:this.name})),50),t.add("submit",m("div",{className:"Form-group"},b().component({type:"submit",className:"Button Button--primary SupportModal-save",loading:this.loading},app.translator.trans("core.forum.composer_edit.submit_button"))),-10),t},o.submitData=function(){return{title:this.name()}},o.onsubmit=function(t){var e=this;if(t.preventDefault(),this.loading=!0,this.attrs.onChange)return this.attrs.onChange(this.name()),void this.hide();this.article.save({title:this.name()}).then((function(){if(e.hide(),e.redirect){var t="/blog/"+e.article.slug();m.route.set(t,!0),window.history.replaceState(null,document.title,t)}}),(function(t){e.loading=!1,e.handleErrors(t)}))},e}(it());const mt=flarum.core.compat["tags/components/TagDiscussionModal"];var ct=o.n(mt);function dt(t,e,o,r,a,n,i){try{var s=t[n](i),l=s.value}catch(t){return void o(t)}s.done?e(l):Promise.resolve(l).then(r,a)}function gt(t){return function(){var e=this,o=arguments;return new Promise((function(r,a){var n=t.apply(e,o);function i(t){dt(n,r,a,i,s,"next",t)}function s(t){dt(n,r,a,i,s,"throw",t)}i(void 0)}))}}var pt=o(195),ft=o.n(pt);const ht=flarum.core.compat["common/components/Switch"];var vt=o.n(ht),bt=function(t){function r(){return t.apply(this,arguments)||this}d(r,t);var a=r.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.attrs.article?this.meta=this.attrs.article&&this.attrs.article.blogMeta()?this.attrs.article.blogMeta():e().store.createRecord("blogMeta"):this.meta=this.attrs.meta?this.attrs.meta:e().store.createRecord("blogMeta"),this.isNew=!this.meta.exists,this.summary=lt()(this.meta.summary()||""),this.featuredImage=lt()(this.meta.featuredImage()||""),this.isFeatured=lt()(this.meta.isFeatured()||!1),this.isSized=lt()(this.meta.isSized()||!1),this.isPendingReview=lt()(this.meta.isPendingReview()||!1)},a.className=function(){return"Modal--small Support-Modal"},a.title=function(){return e().translator.trans("v17development-flarum-blog.forum.article_settings.title")},a.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},a.fields=function(){var t=this,r=new(j());r.add("summary",m("div",{className:"Form-group"},m("label",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.summary.title"),":"),m("textarea",{className:"FormControl",style:{maxWidth:"100%",minWidth:"100%",width:"100%",minHeight:"120px"},bidi:this.summary,placeholder:e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.summary.placeholder")}),m("small",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.summary.helper_text"))),30);var a=null;if("fof-upload"in flarum.extensions&&e().forum.attribute("fof-upload.canUpload")){var n=o(482).components,i=n.Uploader,s=n.FileManagerModal,l=new i;a=m(b(),{class:"Button Button--icon",onclick:gt(ft().mark((function o(){return ft().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:e().modal.show(s,{uploader:l,onSelect:function(o){var r=e().store.getById("files",o[0]);t.featuredImage(r.url())}},!0);case 1:case"end":return o.stop()}}),o)}))),icon:"fas fa-cloud-upload-alt"})}return r.add("image",m("div",{className:"Form-group V17Blog-ArticleImage"},m("label",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.image.title"),":"),m("div",{"data-upload-enabled":!!a},m("input",{type:"text",className:"FormControl",bidi:this.featuredImage,placeholder:"https://"}),a),m("small",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.image.helper_text")),""!==this.featuredImage()&&m("img",{src:this.featuredImage(),alt:"Article image",title:e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.image.title"),style:{width:"100%",marginTop:"15p
536x"}})),30),r.add("sized",m("div",{className:"Form-group"},vt().component({state:1==this.isSized(),onchange:function(e){t.isSized(e)}},[m("b",null,e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.highlight.title")),m("div",{className:"helpText",style:{fontWeight:500}},e().translator.trans("v17development-flarum-blog.forum.article_settings.fields.highlight.helper_text"))])),-10),r.add("submit",m("div",{className:"Form-group"},b().component({type:"submit",className:"Button Button--primary SupportModal-save",loading:this.loading},e().translator.trans("core.forum.composer_edit.submit_button"))),-10),r},a.submitData=function(){return{summary:this.summary(),featuredImage:this.featuredImage(),isFeatured:this.isFeatured(),isSized:this.isSized(),isPendingReview:this.isPendingReview(),relationships:this.isNew&&!this.attrs.isComposer?{discussion:this.attrs.article}:null}},a.onsubmit=function(t){var e=this;if(t.preventDefault(),this.attrs.onsubmit)return this.meta.pushData({attributes:this.submitData()}),this.attrs.onsubmit(this.meta),void this.hide();this.loading=!0,this.meta.save(this.submitData()).then((function(){e.attrs.article&&e.attrs.article.pushData({relationships:{blogMeta:e.meta}}),e.hide(),m.redraw()}),(function(t){e.loading=!1,e.handleErrors(t)}))},r}(it());const yt=flarum.core.compat["forum/components/ComposerBody"];var wt=o.n(yt);const Bt=flarum.core.compat["common/components/TextEditor"];var Nt=o.n(Bt),At=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){return m("div",null)},o.oncreate=function(e){t.prototype.oncreate.call(this,e),s9e.TextFormatter.preview(e.attrs.content||"",e.dom)},e}(w()),_t=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.oninit=function(e){t.prototype.oninit.call(this,e),this.previewContent=!1},r.view=function(){var t=this,o=this.composer.fields.content()&&""!==this.composer.fields.content(),r=this.loading||this.attrs.disabled;return m("div",{className:"Flarum-Blog-Composer "+(r?"Flarum-Blog-Composer-Loading":"")},m("div",{className:"Flarum-Blog-Composer-tabs"},m(b(),{className:!this.previewContent&&"AricleComposerButtonSelected",onclick:function(){return t.previewContent=!1}},e().translator.trans("v17development-flarum-blog.forum.composer.write")),m(b(),{className:this.previewContent&&"AricleComposerButtonSelected",onclick:function(){return t.previewContent=!0}},e().translator.trans("v17development-flarum-blog.forum.composer.view"))),m("div",{className:"Composer Flarum-Blog-Composer-body "+(this.previewContent?"Flarum-Blog-Composer-HideEditor":"")},this.previewContent&&m("div",{className:"Flarum-Blog-Composer-preview"},!o&&e().translator.trans("v17development-flarum-blog.forum.composer.nothing_to_preview"),m(At,{content:this.composer.fields.content()})),Nt().component({submitLabel:this.attrs.submitLabel||e().translator.trans("core.forum.composer_edit.submit_button"),placeholder:this.attrs.placeholder,disabled:r,composer:this.composer,preview:this.jumpToPreview&&this.jumpToPreview.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()})))},r.onsubmit=function(){this.attrs.onsubmit&&this.attrs.onsubmit()},o}(wt()),Ft=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.oninit=function(o){var r=this;if(t.prototype.oninit.call(this,o),e().setTitle(e().translator.trans("v17development-flarum-blog.forum.blog")),e().forum.attribute("canWriteBlogPosts")){if(e().history.push("blogComposer"),this.languages=e().store.all("discussion-languages")||[],this.bodyClass="BlogItemPage BlogItemPage--composer",this.articleLanguage=lt()(m.route.param("lang")?m.route.param("lang"):e().translator.locale),this.article=e().store.createRecord("discussions"),this.blogMeta=null,this.tags=[],m.route.param().tags){var a=Array.isArray(m.route.param().tags)?m.route.param().tags:m.route.param().tags.split(",");m.route.param().tags.length>0&&a.forEach((function(t){var o=e().store.getById("tags",t);o&&r.tags.push(o)}))}this.isSaving=!1}else m.route.set(e().route("blog"))}
536,r.openTagsModal=function(t){var o=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||e().modal.show(ct(),{selectedTags:this.tags,onsubmit:function(t){o.tags=t}})},r.openNameArticleModal=function(t){var o=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||e().modal.show(ut,{article:this.article,onChange:function(t){o.article.pushData({attributes:{title:t}})}})},r.openBlogSettings=function(t){var o=this;t.preventDefault(),this.isSaving||e().modal.show(bt,{meta:this.blogMeta,onsubmit:function(t){return o.blogMeta=t}})},r.view=function(){return m("div",{className:"FlarumBlogItem"},m("div",{className:"container"},this.pageItems().toArray()))},r.pageItems=function(){var t=new(j());return t.add("toolButtons",m("div",{className:"FlarumBlog-ToolButtons"},m(N(),{href:e().route("blog"),className:"Button",loading:this.isSaving,icon:"fas fa-angle-left"},m("i",{class:"icon fas fa-angle-left Button-icon"}),m("span",{class:"Button-label"},e().translator.trans("v17development-flarum-blog.forum.return_to_overview")))),100),t.add("article",m("div",{className:"FlarumBlog-Article"},this.articleWrapperItems().toArray()),90),t},r.articleWrapperItems=function(){var t=new(j());return t.add("container",m("div",{className:"FlarumBlog-Article-Container"},this.articleItems().toArray()),100),t.add("sidebar",m("div",{className:"FlarumBlog-Article-Sidebar"},m(at,{user:e().session.user})),90),t},r.articleItems=function(){var t,o=this,r=new(j()),a=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null,n=this.blogMeta&&this.blogMeta.featuredImage()?"url("+this.blogMeta.featuredImage()+")":a;return"fof-discussion-language"in flarum.extensions&&(t=_.components.LanguageDropdown),r.add("content",m("div",{className:"FlarumBlog-Article-Content"},m("div",{className:"FlarumBlog-Article-Image FlarumBlog-default-image",style:{backgroundImage:n,cursor:"pointer"},onclick:function(t){return o.openBlogSettings(t)}}),m("div",{className:"FlarumBlog-Article-Content-Edit-Button"},m("div",{className:0===this.languages.length?"FlarumBlog-Article-Content-Edit-Dropdown":"FlarumBlog-Article-Content-EditButtons"},null!==this.languages&&this.languages.length>=1&&m(t,{selected:this.articleLanguage(),onclick:function(t){"string"==typeof t&&o.articleLanguage(t)}}),m(b(),{className:"Button",onclick:function(t){return o.openBlogSettings(t)},icon:"fas fa-pencil-alt",loading:this.isSaving},e().translator.trans("v17development-flarum-blog.forum.composer.update_settings")))),m("div",{className:"FlarumBlog-Article-Categories"},this.tags.map((function(t){return m("button",{class:"Button Button--text",onclick:function(t){return o.openTagsMo
536dal(t)}},t.name())})),m("button",{class:"Button Button--text",onclick:function(t){return o.openTagsModal(t)}},0===this.tags.length?e().translator.trans("v17development-flarum-blog.forum.composer.select_category"):e().translator.trans("v17development-flarum-blog.forum.composer.edit_categories")," ",m("i",{className:"fas fa-edit"}))),m("div",{className:"FlarumBlog-Article-Post"},m("h1",{onclick:function(){return o.openNameArticleModal()},className:"FlarumBlog-Article-Title",style:{cursor:"pointer"}},this.article&&this.article.title()&&""!==this.article.title()?this.article.title():e().translator.trans("v17development-flarum-blog.forum.composer.no_title"),m("button",{class:"Button Button--text",onclick:function(t){return t.preventDefault()}},m("i",{className:"fas fa-edit"}))),m("div",{className:"Post-body"},m(_t,{composer:e().composer,originalContent:"",submitLabel:e().translator.trans("v17development-flarum-blog.forum.composer.post_article"),placeholder:e().translator.trans("v17development-flarum-blog.forum.composer.enter_message_here"),onsubmit:function(){return o.create()},disabled:this.isSaving})))),100),r.add("commentsPlaceholder",m("div",{className:"FlarumBlog-Article-Comments"},m("h4",null,e().translator.trans("v17development-flarum-blog.forum.comment_section.comments")," (0)"),m("div",{className:"Post-body"},m("blockquote",{class:"uncited"},m("div",null,m("span",{className:"fas fa-ban",style:{marginRight:"5px"}})," ",e().translator.trans("v17development-flarum-blog.forum.composer.comment_section"))))),90),r},r.create=function(){var t=this,o=e().forum.attribute("blogTags")||[];if(0!==this.tags.length)if(this.article.title()&&""!==this.article.title())if(0!==this.tags.filter((function(t){return o.indexOf(t.id())>=0})).length){if(null!==this.blogMeta&&(this.blogMeta.featuredImage()||e().forum.attribute("blogDefaultImage"))&&this.blogMeta.summary()||confirm(e().translator.trans("v17development-flarum-blog.forum.composer.post_without_blog_info"))){var r={tags:this.tags};this.languages.length>0&&(r.language=e().store.getBy("discussion-languages","code",this.articleLanguage()));var a={title:this.article.title(),content:e().composer.fields.content(),relationships:r,blogMeta:null!==this.blogMeta?{featuredImage:this.blogMeta.featuredImage(),summary:this.blogMeta.summary(),isSized:this.blogMeta.isSized()}:null};this.isSaving=!0,this.article.save(a).then((function(t){setTimeout((function(){m.route.set(e().route("blogArticle",{id:""+t.slug()}))}),500)})).catch((function(){t.isSaving=!1,m.redraw()}))}}else alert(e().translator.trans("v17development-flarum-blog.forum.composer.no_blog_tags_selected"));else this.openNameArticleModal();
536else this.openTagsModal()},o}(h());const xt=flarum.core,It=flarum.core.compat["common/utils/extractText"];var Ct=o.n(It),Lt=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){var t=this.attrs.discussion.subscription(),e=app.session.user.preferences().notify_newPost_email,o=Ct()(app.translator.trans(e?"flarum-subscriptions.forum.sub_controls.notify_email_tooltip":"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip")),r=app.translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),a="far fa-star";return"follow"===t&&(r=app.translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),a="fas fa-star"),m(P(),{text:o,position:"bottom"},m(b(),{className:"Button BlogArticleSubscription SubscriptionMenu-button--"+t,icon:a,onclick:this.saveSubscription.bind(this,this.attrs.discussion,-1!==["follow","ignore"].indexOf(t)?null:"follow")},r))},o.saveSubscription=function(t,e){t.save({subscription:e})},e}(w()),St=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var o=e.prototype;return o.view=function(){return m("div",{className:"FlarumBlog-Article-Sidebar"},m("ul",null,et()(this.items().toArray())))},o.items=function(){var t=new(j());return t.add("author",at.component(this.attrs),0),t.add("categories",A.component(this.attrs),0),t.add("nav",L.component(this.attrs),0),t},e}(w());const Pt=flarum.core.compat["forum/utils/DiscussionControls"];var Mt=o.n(Pt);const kt=flarum.core.compat["common/components/Alert"];var Tt=o.n(kt);const Et=flarum.core.compat["common/components/Dropdown"];var Rt=o.n(Et);const Dt=flarum.core.compat["forum/components/EditPostComposer"];var Ot=o.n(Dt),jt=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.init=function(){this.loadedPost=!1},r.manageArticleButtons=function(){var t=this,o=this.attrs.article,r=new(j()),a=flarum.extensions["fof-discussion-language"]&&void 0!==flarum.extensions["fof-discussion-language"].components?flarum.extensions["fof-discussion-language"].components.LanguageDiscussionModal:null;o.canRename()&&r.add("rename",b().component({className:"Button",onclick:function(){return e().modal.show(ut,{article:o})},icon:"fas fa-pencil-alt"},e().translator.trans("v17development-flarum-blog.forum.tools.rename_article")),100);var n=o.firstPost();return r.add("edit",b().component({className:"Button",disabled:!n||!n.canEdit(),onclick:function(){e().composer.load(Ot(),{post:n}),e().composer.show()},icon:"fas fa-edit"},e().translator.trans("v17development-flarum-blog.forum.tools.edit_article")),90),r.add("articleSettings",b().component({className:"Button",onclick:function(){return e().modal.show(bt,{article:o})},icon:"fas fa-cogs"},e().translator.trans("v17development-flarum-blog.forum.tools.article_settings")),80),o.canTag()&&r.add("tag",b().component({className:"Button",onclick:function(){return e().modal.show(ct(),{discussion:o})},icon:"fas fa-tag"},e().translator.trans("v17development-flarum-blog.forum.tools.update_category")),70),o.blogMeta()&&o.blogMeta().isPendingReview()&&(r.add("separator1",m("li",{className:"Dropdown-separator"}),65),r.add("approve",b().component({className:"Button",disabled:!e().forum.attribute("canApproveBlogPosts"),onclick:function(){o.blogMeta().save({isPendingReview:!1}).then((function(){e().alerts.show(Tt(),{type:"success"},e().translator.trans("v17development-flarum-blog.forum.review_article.approve_article_approved"))}),(function(e){t.loading=!1,t.handleErrors(e)}))},icon:"fas fa-thumbs-up"},e().translator.trans("v17development-flarum-blog.forum.review_article.approve_article")),60)),o.canChangeLanguage&&o.canChangeLanguage()&&a&&r.add("lang",b().component({icon:"fas fa-globe",onclick:function(){return e().modal.show(a,{discussion:o})}},e().translator.trans("fof-discussion-language.forum.discussion_controls.change_language_button")),50),r.add("separator2",m("li",{className:"Dropdown-separator"}),40),o.canLock()&&r.add("lock",b().component({className:"Button",onclick:Mt().lockAction.bind(o),icon:"fas "+(o.isLocked()?"fa-comments":"fa-comment-slash")},o.isLocked()?e().translator.trans("v17development-flarum-blog.forum.tools.enable_comments"):e().translator.trans("v17development-flarum-blog.forum.tools.disable_comments")),30),o.canHide()&&(o.isHidden()?(r.add("recover",b().component({className:"Button",onclick:Mt().restoreAction.bind(o),icon:"fas fa-eye"},e().translator.trans("v17development-flarum-blog.forum.tools.recover_article")),20),o.canDelete()&&r.add("delete",b().component({className:"Button",onclick:function(){if(confirm(Ct()(e().translator.trans("core.forum.discussion_controls.delete_confirmation"))))return"blogArticle"===e().history.getCurrent().name&&(e().previous?e().history.back():m.route.set(e().route("blog"))),o.delete().then((function(){m.redraw()}))},icon:"far fa-trash-alt"},e().translator.trans("v17development-flarum-blog.forum.tools.delete_forever")),10)):r.add("hide",b().component({className:"Button",onclick:Mt().hideAction.bind(o),icon:"fas fa-eye-slash"},e().translator.trans("v17development-flarum-blog.forum.tools.hide_article")),0)),r},r.view=function(){var t=this,e=this.attrs.article.firstPost();return m("div",{className:"FlarumBlog-Article-Content-Edit-Button"}
536,m("div",{className:"FlarumBlog-Article-Content-Edit-Dropdown"},Rt().component({icon:"fas fa-cog",label:"Manage",buttonClassName:"Button",menuClassName:"Dropdown-menu--right",onshow:function(){!e||e.canEdit()||t.loadedPost||(t.loadedPost=!0,m.redraw())}},this.manageArticleButtons().toArray())))},o}(w());const Gt=flarum.core.compat["forum/components/CommentPost"];var zt=o.n(Gt);const Ht=flarum.core.compat["forum/components/PostStream"];var Wt=o.n(Ht);const Ut=flarum.core.compat["forum/states/PostStreamState"];var qt=o.n(Ut);const Yt=flarum.core.compat["common/helpers/fullTime"];var Vt=o.n(Yt),$t=function(t){function o(){return t.apply(this,arguments)||this}d(o,t);var r=o.prototype;return r.oninit=function(o){t.prototype.oninit.call(this,o),e().setTitle(e().translator.trans("v17development-flarum-blog.forum.blog")),e().history.push("blogArticle"),this.bodyClass="BlogItemPage",this.near=m.route.param("near")||0,this.loading=!0,this.found=!1,this.article=null,this.loadBlogItem()},r.loadBlogItem=function(){var t=e().preloadedApiDocument();t?setTimeout(this.show.bind(this,t),0):e().store.find("discussions",m.route.param("id").split("-")[0]).then(this.show.bind(this)).catch((function(){m.redraw()})),m.redraw()},r.show=function(t){var o=this;this.article=t,e().setTitle(t.title()+" - "+e().translator.trans("v17development-flarum-blog.forum.blog")),this.loading=!1;var r=[];if(t.payload&&t.payload.included){var a=t.id();r=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===a})).map((function(t){return e().store.getById("posts",t.id)})).sort((function(t,e){return t.id()-e.id()})).slice(0,20)}this.stream=new(qt())(t,r),this.near&&this.stream.goToNumber(this.near||0,!0).then((function(){e().current.set("discussion",t),e().current.set("stream",o.stream)})),e().session.user&&!t.lastReadPostNumber()&&t.save({lastReadPostNumber:1}),m.redraw()},r.postItems=function(){var t,o,r,a=null;!this.loading&&this.article&&(a=null==(r=this.article)||null==r.firstPost?void 0:r.firstPost());var n,i,s,l=new(j());return l.add("title",m("h1",{className:D()("FlarumBlog-Article-Title",{"FlarumBlog-Article-GhostTitle":this.loading})},(null==this||null==(t=this.article)||null==t.title?void 0:t.title())||"Ghost title",(null==(o=this.article)||null==o.isHidden?void 0:o.isHidden())&&"("+e().translator.trans("v17development-flarum-blog.forum.hidden")+")"),100),l.add("publishDate",m("div",{className:D()("FlarumBlog-Article-PublishDate",{"FlarumBlog-Article-GhostPublishDate":this.loading})},this.article?Vt()(this.article.createdAt()):m("span",null," ")),80),this.loading&&l.add("skeleton",[0,1,2].map((function(){return m("div",null,m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",null," "))})),60),this.loading||(null!=(n=(i=this.article).blogMeta)&&null!=(s=n.call(i))&&null!=s.isPendingReview&&s.isPendingReview()&&l.add("review",m("div",{className:"Post-body"},m("blockquote",{class:"uncited",style:{fontSize:"16px"}},m("div",null,E()("far fa-clock",{style:{marginRight:"5px"}})," ",e().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")))),60),a&&l.add("post",m(zt(),{post:a}),40)),l},r.contentItems=function(){var t,o,r,a,n,i,s,l,u,c,d=e().forum.attribute("blogDefaultImage")?"url("+e().forum.attribute("baseUrl")+"/assets/"+e().forum.attribute("blogDefaultImage")+")":null,g=null!=(t=this.article)&&null!=(o=t.blogMeta())&&null!=o.featuredImage&&o.featuredImage()?"url("+this.article.blogMeta().featuredImage()+")":d,p=new(j());return p.add("image",m("div",{className:D()("FlarumBlog-Article-Image FlarumBlog-default-image",{"FlarumBlog-Article-GhostImage":this.loading}),style:{backgroundImage:g,opacity:null!=(r=this.article)&&null!=r.isHidden&&r.isHidden()?.4:null}}),100),this.article&&(null!=(a=e().session.user)&&null!=a.canEdit&&a.canEdit()||null!=(n=this.article)&&null!=n.canRename&&n.canRename()||null!=(i=this.article)&&null!=i.posts&&null!=(s=i.posts())&&null!=(l=s[0])&&null!=l.canEdit&&l.canEdit())&&p.add("editArticle",m(jt,{article:this.article}),80),p.add("categories",m("div",{className:"FlarumBlog-Article-Categories"},!this.loading&&(null==(u=this.article)||null==u.tags||null==(c=u.tags())?void 0:c.map((function(t){return m(N(),{href:e().route("blogCategory",{slug:t.slug()})},t.name())}))),this.loading&&[0,1].map((function(){return m("span",{className:"FlarumBlog-Article-GhostCategory"},"Category")}))),60),p.add("post",m("div",{className:"FlarumBlog-Article-Post"},this.postItems().toArray()),40),p},r.articleItems=function(){var t,o,r,a=new(j());return a.add("content",m("div",{className:"FlarumBlog-Article-Content"},this.contentItems().toArray()),100),null!=this&&null!=(t=this.article)&&null!=t.isLocked&&t.isLocked()&&1===(null==this||null==(o=this.article)||null==o.commentCount?void 0:o.commentCount())||a.add("comments",m("div",{className:"FlarumBlog-Article-Comments"},!this.loading&&e().session.user&&this.article.subscription&&(!this.article.isLocked||this.article.isLocked&&!this.article.isLocked())&&m(Lt,{discussion:this.article}),m("h4",null,e().translator.trans("v17development-flarum-blog.forum.comment_section.comments")," (",this.article?this.article.commentCount()-1:0,")"),!this.loading&&(null==(r=this.article)||null==r.isLocked?void 0:r.isLocked())&&m("div",{className:"Post-body"},m("blockquote",{class:"uncited"},m("div",null,m("span",{className:"far fa-lock",style:{marginRight:"5px"}})," ",e().translator.trans("v17development-flarum-blog.forum.comment_section.locked")))),!this.loading&&this.article&&Wt().component({discu
536ssion:this.article,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),75),a},r.view=function(){return[1==e().forum.attribute("blogAddHero")&&p().prototype.hero(),m("div",{className:"FlarumBlogItem"},m("div",{className:"container"},m("div",{className:"FlarumBlog-ToolButtons"},m(N(),{href:e().route("blog"),className:"Button",onclick:function(t){e().previous.matches(H)&&(t.preventDefault(),history.back())}},m("i",{class:"icon fas fa-angle-left Button-icon"}),m("span",{class:"Button-label"},e().translator.trans("v17development-flarum-blog.forum.return_to_overview")))),m("div",{className:"FlarumBlog-Article"},m("div",{className:"FlarumBlog-Article-Container"},this.articleItems().toArray()),m(St,{article:this.article,loading:this.loading}))))]},r.positionChanged=function(t,o){var r=this.article;e().session.user&&o>(r.lastReadPostNumber()||0)&&(r.save({lastReadPostNumber:o}),m.redraw())},o}(h());const Jt=flarum.core.compat["common/components/LinkButton"];var Kt=o.n(Jt);function Qt(){(0,q.extend)(x().prototype,"navItems",(function(t){return app.forum.attribute("blogAddSidebarNav")&&"0"!==app.forum.attribute("blogAddSidebarNav")&&t.add("blog",m(Kt(),{icon:"fas fa-comment",href:app.route("blog")},app.translator.trans("v17development-flarum-blog.forum.blog")),15),t}))}e().initializers.add("v17development-flarum-blog",(function(t){t.routes.blog={path:"/blog",component:H},t.routes.blogCategory={path:"/blog/category/:slug",component:H},t.routes.blogComposer={path:"/blog/compose",component:Ft},t.routes.blogArticle={path:"/blog/:id",component:$t},t.routes["blogArticle.near"]={path:"/blog/:id/:near",component:$t},t.store.models.blogMeta=V,u().prototype.blogMeta=n().hasOne("blogMeta"),s().prototype.isBlog=n().attribute("isBlog"),(0,q.extend)(x().prototype,"oncreate",(function(){var t=this.currentTag(),o="both"===e().forum.attribute("blogRedirectsEnabled")||"tags_only"===e().forum.attribute("blogRedirectsEnabled");if(t&&o){var r=e().forum.attribute("blogTags");(r.indexOf(t.id())>=0||t.parent()&&r.indexOf(t.parent().id())>=0)&&m.route.set(e().route("blog"))}})),(0,q.override)(U().prototype,"show",(function(t,o){if(("both"===e().forum.attribute("blogRedirectsEnabled")||"discussions_only"===e().forum.attribute("blogRedirectsEnabled"))&&o&&o&&o.tags().length>0){var r=e().forum.attribute("blogTags");if(o.tags().filter((function(t){return r.indexOf(t.id())>=0||t.parent()&&r.indexOf(t.parent().id())>=0})).length>0){var a=e().route("blogArticle",{id:o.slug()});return m.route.set(a,null,{replace:!0}),null}}return t(o)})),Q(),Z(),Qt()}),-1e5),Object.assign(xt.compat,{"v17development/blog/components/BlogItemSidebar":St,"v17development/blog/components/BlogAuthor":at,"v17development/blog/components/Composer/Composer":_t,"v17development/blog/components/Composer/ComposerPreview":At,"v17development/blog/components/Modals/BlogPostSettingsModal":bt,"v17development/blog/components/Modals/RenameArticleModal":ut,"v17development/blog/components/ArticleSubscription":Lt,"v17development/blog/components/BlogCategories":A,"v17development/blog/components/BlogOverviewItem":G,"v17development/blog/components/BlogPostController":jt,"v17development/blog/components/FeaturedBlogItem":z,"v17development/blog/components/ForumNav":L,"v17development/blog/pages/BlogItem":$t,"v17development/blog/pages/BlogOverview":H,"v17development/blog/models/BlogMeta":V})})(),module.exports=r})();
537
538
539flarum.extensions['v17development-blog']=module.exports;
540
541var module={};
542
543(()=>{var o={n:e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},d:(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},e={};(()=>{"use strict";o.r(e);const t=flarum.core.compat["common/extend"],r=flarum.core.compat["common/app"];var n=o.n(r);const c=flarum.core.compat["forum/components/CommentPost"];var a=o.n(c);const s=flarum.core.compat["forum/components/DiscussionPage"];var l=o.n(s);const i=flarum.core.compat["forum/utils/DiscussionControls"];var u=o.n(i);const p=flarum.core.compat["forum/components/LogInModal"];var f=o.n(p);const d=flarum.core.compat["common/components/TextEditor"];var y=o.n(d);const v=flarum.core.compat["common/components/TextEditorButton"];var b=o.n(v);
543n().initializers.add("rehiy/reply-to-see",(function(){(0,t.extend)(y().prototype,"toolbarItems",(function(o){var e=this;o.add("reply-to-see",m(b(),{onclick:function(){e.attrs.composer.editor.insertAtCursor("[reply][/reply]");var o=e.attrs.composer.editor.getSelectionRange();e.attrs.composer.editor.moveCursorTo(o[1]-8)},icon:"fa fa-comment-medical"},n().translator.trans("rehiy-reply-to-see.forum.button_tooltip")))})),(0,t.extend)(a().prototype,"content",(function(){n().session.user&&n().current.matches(l())?$(".reply2see_reply").off("click").on("click",(function(){return u().replyAction.call(n().current.get("discussion"),!0,!1)})):$(".reply2see_reply").off("click").on("click",(function(){return n().modal.show(f())}))}))}))})(),module.exports=e})();
544
545
546flarum.extensions['rehiy-reply-to-see']=module.exports;
547
548var module={};
549
550(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}t.r(e);const r=flarum.core.compat["common/Component"];var n=t.n(r);const a=flarum.core.compat["common/components/Button"];var c=t.n(a);const i=flarum.core.compat["forum/app"];var l=t.n(i),u=function(t){var e,r;function n(){for(var e,o=arguments.length,r=new Array(o),n=0;n<o;n++)r[n]=arguments[n];return(e=t.call.apply(t,[this].concat(r))||this).clicked=void 0,e}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,o(e,r);var a=n.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.clicked=!1},a.view=function(t){return m(c(),{className:"Button Button--icon",icon:this.clicked?"fas fa-check":"far fa-clone",onclick:this.onClick.bind(this),"aria-label":l().translator.trans("nearata-copy-code-to-clipboard.forum.copy")})},a.onClick=function(t){var e,o=this;this.clicked=!0;var r=null==(e=this.element.closest("pre"))?void 0:e.querySelector("code");navigator.clipboard.writeText(null==r?void 0:r.textContent),setTimeout((function(){o.clicked=!1,m.redraw()}),1e3)},n}(n());const p=flarum.core.compat["common/extend"],d=flarum.core.compat["forum/components/CommentPost"];var s=t.n(d);function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,r=new Array(e);o<e;o++)r[o]=t[o];return r}l().initializers.add("nearata-copy-code-to-clipboard",(function(){(0,p.extend)(s().prototype,"oncreate",(function(){for(var t,e=function(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(o)return(o=o.call(t)).next.bind(o);if(Array.isArray(t)||(o=function(t,e){if(t){if("string"==typeof t)return f(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?f(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){o&&(t=o);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.element.querySelectorAll("pre"));!(t=e()).done;){var o=t.value,r=document.createElement("div");r.classList.add("NearataCopyCodeToClipboard"),o.append(r),m.mount(r,u)}}))}))})(),module.exports=e})();
551
552
553flarum.extensions['nearata-copy-code-to-clipboard']=module.exports;
554
555var module={};
556
557(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
557),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e);const o=flarum.core.compat["extensions/afrux-forum-widgets-core/common/extend/Widgets"];var r=t.n(o);function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}const a=flarum.core.compat["common/app"];var i=t.n(a);const s=flarum.core.compat["common/components/Tooltip"];var c=t.n(s);const u=flarum.core.compat["common/helpers/icon"];var l=t.n(u);const p=flarum.core.compat["extensions/afrux-forum-widgets-core/common/components/Widget"];var f=t.n(p);const d=flarum.core.compat["common/utils/extractText"];var g=t.n(d),y=function(t){var e,o;function r(){return t.apply(this,arguments)||this}o=t,(e=r).prototype=Object.create(o.prototype),e.prototype.constructor=e,n(e,o);var a=r.prototype;return a.className=function(){return"Litalino-ForumStatsWidgetWidget"},a.icon=function(){return"fas fa-chart-pie"},a.title=function(){return g()(i().translator.trans("flarum-forum-stats-widget.forum.widget.title"))},a.content=function(){var t=i().forum.attribute("litalino-flarum-forum-stats-widget.stats");return m("div",{className:"Litalino-ForumStatsWidget-grid"},Object.keys(t).map((function(e){return m(c(),{text:t[e].label},m("span",{className:"Litalino-ForumStatsWidget-grid-item"},m("span",{className:"Litalino-ForumStatsWidget-grid-item-icon"},l()(t[e].icon)),m("span",{className:"Litalino-ForumStatsWidget-grid-item-value"},t[e].prettyValue)))})))},r}(f());app.initializers.add("litalino/forum-stats-widget",(function(){!function(t){(new(r())).add({key:"ForumStats",component:y,isDisabled:function(){return!t.forum.attribute("litalino-flarum-forum-stats-widget.stats")},isUnique:!0,placement:"end",position:2}).extend(t,"litalino-forum-stats-widget")}(app)}))})(),module.exports=e})();
558
559
560flarum.extensions['litalino-forum-stats-widget']=module.exports;
561
562var module={};
563
564module.exports=function(t){var e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=4)}([,function(t,e){t.exports=flarum.core.compat["forum/app"]},function(t,e){t.exports=flarum.core.compat["common/extend"]},function(t,e){t.exports=flarum.core.compat["forum/components/CommentPost"]},function(t,e,r){"use strict";r.r(e);var o=r(1),n=r.n(o),u=r(2),a=r(3),c=r.n(a),i=function(){this.$("a.hasht").attr("title",n.a.translator.trans("justoverclock-hashtag.forum.post.hashtag_link_tooltip")).click((function(t){t.ctrlKey||t.metaKey||2===t.which||(t.preventDefault(),m.route.set(t.target.href))}))};n.a.initializers.add("justoverclock/flarum-ext-hashtag",(function(){Object(u.extend)(c.a.prototype,["oncreate","onupdate"],i)}))}]);
565
566
567flarum.extensions['justoverclock-hashtag']=module.exports;
568
569var module={};
570
571module.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(t,e){t.exports=flarum.core.compat["forum/app"]},,function(t,e){t.exports=flarum.core.compat["extensions/afrux-forum-widgets-core/common/extend/Widgets"]},function(t,e){t.exports=flarum.core.compat["extensions/afrux-forum-widgets-core/common/components/Widget"]},function(t,e,n){"use strict";var o=n(2),r=n.n(o);function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var c=n(0),i=n.n(c),a=n(3),f=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,u(e,n);var r=o.prototype;return r.oncreate=function(t){document.getElementById("wghtml").innerHTML=i.a.forum.attribute("justoverclock-custom-html-widget.customCode")},r.className=function(){return"custom-html-widget"},r.icon=function(){return"far fa-file-code"},r.content=function(){return m("div",{class:"htmlwidget",id:"wghtml"})},o}(n.n(a).a);
571e.a=function(t){(new r.a).add({key:"CustomHtml",component:f,isDisabled:!1,isUnique:!0,placement:"end",position:1}).extend(t,"justoverclock-custom-html-widget")}},function(t,e,n){"use strict";n.r(e);var o=n(0),r=n.n(o),u=n(4);r.a.initializers.add("justoverclock/custom-html-widget",(function(){Object(u.a)(r.a)}))}]);
572
573
574flarum.extensions['justoverclock-custom-html-widget']=module.exports;
575
576var module={};
577
578module.exports=function(t){var o={};function n(e){if(o[e])return o[e].exports;var s=o[e]={i:e,l:!1,exports:{}};return t[e].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=o,n.d=function(t,o,e){n.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:e})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,o){if(1&o&&(t=n(t)),8&o)return t;if(4&o&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&o&&"string"!=typeof t)for(var s in t)n.d(e,s,function(o){return t[o]}.bind(null,s));return e},n.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(o,"a",o),o},n.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},n.p="",n(n.s=8)}([function(t,o){t.exports=flarum.core.compat["common/app"]},,function(t,o){t.exports=flarum.core.compat["forum/components/Link"]},function(t,o){t.exports=flarum.core.compat["common/extend"]},function(t,o){t.exports=flarum.core.compat["common/Application"]},function(t,o){t.exports=flarum.core.compat["common/Component"]},function(t,o){t.exports=flarum.core.compat["forum/components/DiscussionComposer"]},function(t,o){t.exports=flarum.core.compat["forum/components/LogInModal"]},function(t,o,n){"use strict";n.r(o);var e=n(3),s=n(4),a=n.n(s);function r(t,o){return(r=Object.setPrototypeOf||function(t,o){return t.__proto__=o,t})(t,o)}var i=n(0),c=n.n(i),u=n(5),l=n.n(u),f=n(6),p=n.n(f),b=n(7),d=n.n(b),y=n(2),h=n.n(y),v=function(t){var o,n;function e(){return t.apply(this,arguments)||this}n=t,(o=e).prototype=Object.create(n.prototype),o.prototype.constructor=o,r(o,n);var s=e.prototype;return s.oninit=function(o){t.prototype.oninit.call(this,o)},s.view=function(){var t=this,o=c.a.forum.attribute("home_page"),n=c.a.forum.attribute("discussions_icon")?c.a.forum.attribute("discussions_icon"):"fas fa-home",e=c.a.forum.attribute("tags_icon")?c.a.forum.attribute("tags_icon"):"fas fa-tags",s=c.a.forum.attribute("composer_icon")?c.a.forum.attribute("composer_icon"):"fas fa-edit",a=c.a.forum.attribute("settings_icon")?c.a.forum.attribute("settings_icon"):"fas fa-user-cog",r=c.a.forum.attribute("notifications_icon")?c.a.forum.attribute("notifications_icon"):"fas fa-bell";return void 0===c.a.session.user?m("div",{id:"ItntUitab"},m("div",{class:"foureightheight"}),m("div",{class:"mobile-app-icon-bar",id:"myDIV"},m(h.a,{href:o},m("button",{class:"buttonstyle"},m("i",{class:n}),m("span",{class:"spanstyle"}))),m(h.a,{onclick:function(){return t.newDiscussionAction().catch((function(){}))}},m("button",{class:"buttonstyle"},m("i",{class:s}),m("span",{class:"spanstyle"}))),m(h.a,{href:o+"tags"},m("button",{class:"buttonstyle"},m("i",{class:e}),m("span",{class:"spanstyle"}))))):m("div",{id:"ItntUitab"},m("div",{class:"foureightheight"}),m("div",{class:"mobile-app-icon-bar",id:"myDIV"},m(h.a,{href:o},m("button",{class:"buttonstyle"},m("i",{class:n}),m("span",{class:"spanstyle"}))),m(h.a,{href:o+"tags"},m("button",{class:"buttonstyle"},m("i",{class:e}),m("span",{class:"spanstyle"}))),m(h.a,{onclick:function(){return t.newDiscussionAction().catch((function(){}))}},m("button",{class:"buttonstyle"},m("i",{class:s}),m("span",{class:"spanstyle"}))),m(h.a,{href:o+"settings"},m("button",{class:"buttonstyle"},m("i",{class:a}),m("span",{class:"spanstyle"}))),m(h.a,{href:o+"notifications"},m("button",{class:"buttonstyle"},m("i",{class:r}),m("span",{class:"spanstyle"})))))},s.newDiscussionAction=function(){return new Promise((function(t,o){return c.a.session.user?(c.a.composer.load(p.a,{user:c.a.session.user}),c.a.composer.show(),t(c.a.composer)):(c.a.modal.show(d.a),o())}))},e}(l.a);
578app.initializers.add("itnt-uitab",(function(){Object(e.extend)(a.a.prototype,"mount",(function(){var t=document.createElement("div");m.mount(document.body.appendChild(t),v)}))}))}]);
579
580
581flarum.extensions['itnt-uitab']=module.exports;
582
583var module={};
584
585(()=>{var t={n:o=>{var a=o&&o.__esModule?()=>o.default:()=>o;return t.d(a,{a}),a},d:(o,a)=>{for(var r in a)t.o(a,r)&&!t.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:a[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),t.d(o,{extend:()=>W});const a=flarum.core.compat["common/app"];t.n(a)().initializers.add("ianm/twofactor",(function(){}));const r=flarum.core.compat["forum/app"];var n=t.n(r);const e=flarum.core.compat["common/extend"],i=flarum.core.compat["forum/components/UserSecurityPage"];var s=t.n(i);function c(t,o){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},c(t,o)}function l(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,c(t,o)}const u=flarum.core.compat["common/Component"];var d=t.n(u);const f=flarum.core.compat["common/components/Button"];var p=t.n(f);const h=flarum.core.compat["common/utils/ItemList"];var b=t.n(h);const w=flarum.core.compat["common/helpers/listItems"];var v=t.n(w);const y=flarum.core.compat["common/helpers/icon"];var _=t.n(y),g=function(t){function o(){return t.apply(this,arguments)||this}return l(o,t),o.prototype.view=function(){var t=this.attrs,o=t.icon,a=t.title,r=t.value,n=t.action,e=t.helpText;return m("li",{className:"TwoFactorGrid-item"},m("span",{className:"TwoFactorGrid-icon"},_()(o)),m("div",{className:"TwoFactorGrid-content"},m("span",{className:"TwoFactorGrid-title"},a),m("span",{className:"TwoFactorGrid-value"},r),e&&m("span",{className:"helpText TwoFactorGrid-helpText"},e)),n&&m("span",{className:"TwoFactorGrid-actions"},n))},o}(d());const F=flarum.core.compat["common/components/Tooltip"];var T=t.n(F);const k=flarum.core.compat["common/components/Modal"];var N=t.n(k);const E=flarum.core.compat["common/utils/Stream"];var q=t.n(E);const C=flarum.core.compat["common/components/LoadingIndicator"];var x=t.n(C),B=function(t){function o(){for(var o,a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];return(o=t.call.apply(t,[this].concat(r))||this).user=void 0,o.status="loading",o.qrCodeUrl=null,o.backupCodes=[],o.token=void 0,o.code=null,o.activeTab="qrcode",o.loading=!1,o}l(o,t);var a=o.prototype;return a.oninit=function(a){t.prototype.oninit.call(this,a),this.user=this.attrs.user,this.token=q()(""),this.attrs.forced&&(o.isDismissibleViaCloseButton=!1,o.isDismissibleViaEscKey=!1,o.isDismissibleViaBackdropClick=!1)},a.className=function(){return"TwoFactorEnableModal Modal--small"},a.title=function(){return n().translator.trans("ianm-twofactor.forum.security.two_factor_heading")},a.oncreate=function(o){var a=this;t.prototype.oncreate.call(this,o);var r=this.user.id();n().request({method:"GET",url:n().forum.attribute("apiUrl")+"/users/"+r+"/twofactor/qrcode"}).then((function(t){a.qrCodeUrl=t.svg,a.code=t.code,a.status="displayQR",m.redraw()}))},a.onupdate=function(){var t=document.querySelector(".TwoFactorEnableModal [name=token]");t&&document.activeElement!==t&&t.focus()},a.content=function(){var t=this;return m("div",{className:"Modal-body"},"loading"===this.status&&m("div",{className:"loading"},m(x(),null),m("p",null,n().translator.trans("ianm-twofactor.forum.security.loading_qr"))),"displayQR"===this.status&&m("div",null,this.attrs.forced&&m("div",null,m("p",null,n().translator.trans("ianm-twofactor.forum.user_2fa.alert_message"))),m("div",{className:"tabs"},m(p(),{className:"qrcode"===this.activeTab?"active":"",onclick:function(){t.activeTab="qrcode",m.redraw()}},n().translator.trans("ianm-twofactor.forum.security.qr_tab")),m(p(),{className:"manual"===this.activeTab?"active":"",onclick:function(){t.activeTab="manual",m.redraw()}},n().translator.trans("ianm-twofactor.forum.security.manual_tab"))),"qrcode"===this.activeTab&&m("div",{className:"qrSection"},m("img",{className:"qrImage",src:this.qrCodeUrl,alt:n().translator.trans("ianm-twofactor.forum.security.qr_code_alt")}),m("p",{className:"helpText"},n().translator.trans("ianm-twofactor.forum.security.scan_qr_instruction"))),"manual"===this.activeTab&&m("div",{className:"manualEntrySection"},m("code",{className:"manualEntryCode"},this.code),m("p",{className:"helpText"},n().translator.trans("ianm-twofactor.forum.security.manual_entry_instruction"))),m("div",{className:"Form"},m("form",{onsubmit:this.onSubmit.bind(this)},m("div",{className:"Form-group"},m("input",{type:"text",className:"FormControl",name:"token",bidi:this.token,placeholder:n().translator.trans("ianm-twofactor.forum.security.enter_token"),inputmode:"numeric",pattern:"[0-9]*",autocomplete:"one-time-code"})),m("div",{className:"Form-group"},m(p(),{type:"submit",className:"Button Button--primary",onclick:this.verifyToken.bind(this),loading:this.loading},n().translator.trans("ianm-twofactor.forum.security.verify_button")))))),"displayBackupCodes"===this.status&&m("div",null,m("p",null,n().translator.trans("ianm-twofactor.forum.security.backup_codes")),m("ul",null,this.backupCodes.map((function(t){return m("li",null,m("code",null,t))}))),m("p",null,n().translator.trans("ianm-twofactor.forum.security.backup_codes_instruction")),m(p(),{className:"Button Button--primary",onclick:function(){t.status="final",m.redraw()}},n().translator.trans("ianm-twofactor.forum.security.saved_backup_codes_button"))),"final"===this.status&&m("div",null,m("p",null,n().translator.trans("ianm-twofactor.forum.security.two_factor_enabled_confirmation")),m(p(),{className:"Button Button--primary",onclick:this.finish.bind(this)},n().translator.trans("ianm-twofactor.forum.security.ok_button"))))},a.verifyToken=function(){var t=this;this.loading=!0,n().request({method:"POST",url:n().forum.attribute("apiUrl")+"/users/twofactor/verify",body:{token:this.token()}}).then((function(o){var a=o.backupCodes;t.backupCodes=a,t.status="displayBackupCodes",m.redraw()})).catch((function(t){})).finally((function(){t.loading=!1}))},a.finish=function(){var t,o;null==(t=(o=this.attrs).onEnabled)||t.call(o),this.hide()},a.onSubmit=function(t){t.preventDefault(),this.verifyToken()},o}(N());B.isDismissibleViaCloseButton=!0,B.isDismissibleViaEscKey=!0,B.isDismissibleViaBackdropClick=!0;const D=flarum.core.compat["common/helpers/username"];var A=t.n(D),M=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.loading=!1},a.className=function(){return"TwoFactorDisableConfirmModal Modal--small"},a.title=function(){return n().translator.trans("ianm-twofactor.forum.security.confirm_disable_2fa_title")},a.content=function(){var t,o=(null==(t=n().session.user)?void 0:t.id())===this.attrs.user.id(),a=this.attrs.user;return m("div",{className:"Modal-body"},m("p",null,n().translator.trans(o?"ianm-twofactor.forum.security.confirm_disable_2fa_text":"ianm-twofactor.forum.security.confirm_disable_2fa_text_other_user",{username:A()(a)})),m("div",{className:"Form-group"},m(p(),{className:"Button Button--danger",onclick:this.disable.bind(this),loading:this.loading},n().translator.trans("ianm-twofactor.forum.security.disable_2fa_button")),m(p(),{className:"Button Button--cancel",onclick:this.hide.bind(this)},n().translator.trans("ianm-twofactor.forum.security.cancel_button"))))},a.disable=function(){var t=this;this.loading=!0;var o=this.attrs.user.id();n().request({method:"DELETE",url:n().forum.attribute("apiUrl")+"/users/"+o+"/twofactor/disable"}).then((function(){t.loading=!1,t.attrs.onDisabled(),t.hide()})).catch((function(t){}))},o}(N()),S=function(t){function o(){for(var o,a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];return(o=t.call.apply(t,[this].concat(r))||this).user=void 0,o.twoFactorEnabled=void 0,o.canDisableTwoFactor=void 0,o.backupCodesRemaining=void 0,o}l(o,t);var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.user=this.attrs.user,this.twoFactorEnabled=this.user.twoFactorEnabled(),this.canDisableTwoFactor=this.user.canDisable2FA(),this.backupCodesRemaining=this.user.backupCodesRemaining()||0},a.view=function(){return m("div",{className:"TwoFactorGrid"},m("ul",null,v()(this.twoFactorItems().toArray())))},a.twoFactorItems=function(){var t=new(b()),o=this.getDisableAction(),a=m(p(),{className:"Button Button--primary",onclick:this.enableTwoFactor.bind(this)},n().translator.trans("ianm-twofactor.forum.security.enable_2fa_button"));return t.add("status",m(g,{icon:"fas fa-shield-alt",title:n().translator.trans("ianm-twofactor.forum.security.two_factor_title"),value:this.twoFactorEnabled?n().translator.trans("ianm-twofactor.forum.security.two_factor_enabled"):n().translator.trans("ianm-twofactor.forum.security.two_factor_disabled"),action:this.twoFactorEnabled?o:a,helpText:!this.canDisableTwoFactor&&n().translator.trans("ianm-twofactor.forum.security.cannot_disable")})),this.twoFactorEnabled?(t.add("backupCodes",m(g,{icon:"fas fa-key",t
585itle:n().translator.trans("ianm-twofactor.forum.security.backup_codes_remaining"),value:this.backupCodesRemaining})),t):t},a.getDisableAction=function(){var t=m(p(),{className:"Button Button--danger",onclick:this.disableTwoFactor.bind(this),disabled:!this.canDisableTwoFactor},n().translator.trans("ianm-twofactor.forum.security.disable_2fa_button"));return this.canDisableTwoFactor?t:m(T(),{text:n().translator.trans("ianm-twofactor.forum.security.cannot_disable_tooltip")},t)},a.enableTwoFactor=function(){n().modal.show(B,{onEnabled:this.onTwoFactorEnabled.bind(this),user:this.user})},a.onTwoFactorEnabled=function(){this.twoFactorEnabled=!0,m.redraw()},a.disableTwoFactor=function(){n().modal.show(M,{onDisabled:this.onTwoFactorDisabled.bind(this),user:this.user})},a.onTwoFactorDisabled=function(){this.twoFactorEnabled=!1,m.redraw()},a.generateBackupCodes=function(){m.redraw()},o}(d()),R=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o)},a.view=function(){return m("div",null,m(S,{user:this.attrs.user}))},o}(d());const G=flarum.core.compat["common/components/FieldSet"];var O=t.n(G);const P=flarum.core.compat["common/components/LinkButton"];var I=t.n(P);const U=flarum.core.compat["forum/components/LogInModal"];var j=t.n(U);const V=flarum.core.compat["common/extenders"];var L=t.n(V);const z=flarum.core.compat["common/models/Group"];var K=t.n(z);const Q=flarum.core.compat["common/models/User"];var H=t.n(Q);const J=[new(L().Model)(H()).attribute("twoFactorEnabled").attribute("canDisable2FA").attribute("mustEnable2FA").attribute("backupCodesRemaining"),new(L().Model)(K()).attribute("requires2FA")],W=[].concat(J);n().initializers.add("ianm/twofactor",(function(){(0,e.extend)(s().prototype,"settingsItems",(function(t){t.add("twoFactor",m(O(),{label:n().translator.trans("ianm-twofactor.forum.security.two_factor_heading")},m("p",{className:"helpText"},n().translator.trans("ianm-twofactor.forum.security.two_factor_help")),m("p",{className:"helpText"},n().translator.trans("ianm-twofactor.forum.security.two_factor_apps",{google:m(I(),{external:!0,href:"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2",target:"_blank",rel:"noopener noreferrer"},"Google Authenticator"),microsoft:m(I(),{external:!0,href:"https://www.microsoft.com/en-us/account/authenticator",target:"_blank",rel:"noopener noreferrer"},"Microsoft Authenticator"),authy:m(I(),{external:!0,href:"https://authy.com/download/",target:"_blank",rel:"noopener noreferrer"},"Authy")})),m(R,{user:this.user})),100)})),(0,e.extend)(j().prototype,"oninit",(function(t){this.twoFactorToken=q()(""),this.twoFactorRequired=!1})),(0,e.extend)(j().prototype,"fields",(function(t){var o=this;this.twoFactorRequired&&(t.add("twoFactor",m("div",{className:"Form-group TwoFactorInput"},m("legend",null,n().translator.trans("ianm-twofactor.forum.log_in.two_factor_required_message")),m("input",{className:"FormControl",name:"twoFactorToken",type:"text",placeholder:n().translator.trans("ianm-twofactor.forum.log_in.two_factor_placeholder"),value:this.twoFactorToken(),disabled:this.loading,inputmode:"numeric",pattern:"[0-9]*",autocomplete:"one-time-code",oninput:function(t){o.twoFactorToken(t.currentTarget.value),6===t.target.value.length&&o.onsubmit(new Event("submit"))}})),19),t.remove("identification"),t.remove("password"),t.remove("remember"))})),(0,e.extend)(j().prototype,"loginParams",(function(t){return t.twoFactorToken=this.twoFactorToken(),t})),(0,e.override)(j().prototype,"body",(function(t){return this.twoFactorRequired?m("div",{className:"Form Form--centered"},this.fields().toArray()):t()})),(0,e.override)(j().prototype,"footer",(function(t){return this.twoFactorRequired?m("div",null):t()})),(0,e.override)(j().prototype,"onerror",(function(t,o){if(422===o.status){var a=o.response&&o.response.errors;(a&&a[0]&&a[0].detail||"").includes("two_factor_required")?this.twoFactorRequired=!0:(o.alert.content=n().translator.trans("core.forum.log_in.invalid_login_message"),this.alertAttrs=o.alert),m.redraw(),this.onready()}else t(o)})),new Promise((function(){setTimeout((function(){var t;null!=(t=n().session.user)&&t.mustEnable2FA()&&n().modal.show(B,{user:n().session.user,forced:!0})}),300)}))}))})(),module.exports=o})();
586
587
588flarum.extensions['ianm-twofactor']=module.exports;
589
590var module={};
591
592(()=>{var t={n:r=>{var n=r&&r.__esModule?()=>r.default:()=>r;return t.d(n,{a:n}),n},d:(r,n)=>{for(var o in n)t.o(n,o)&&!t.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:n[o]})},o:(t,r)=>Object.prototype.hasOwnProperty.call(t,r),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
592),Object.defineProperty(t,"__esModule",{value:!0})}},r={};(()=>{"use strict";t.r(r);const n=flarum.core.compat["forum/app"];var o=t.n(n);const a=flarum.core.compat["common/extend"],e=flarum.core.compat["forum/components/IndexPage"];var i=t.n(e);const s=flarum.core.compat["forum/utils/DiscussionControls"];var u=t.n(s);const f=flarum.core.compat["common/components/LinkButton"];var c=t.n(f);const l=flarum.core.compat["forum/components/UserPage"];var d=t.n(l);o().initializers.add("ianm-syndication",(function(){(0,a.extend)(i().prototype,"actionItems",(function(t){if(o().forum.attribute("ianm-syndication.plugin.forum-icons")){t.has("refresh")&&t.setPriority("refresh",100),t.has("markAllAsRead")&&t.setPriority("markAllAsRead",90);var r=o().forum.attribute("ianm-syndication.plugin.forum-format"),n=o().forum.attribute("baseUrl")+"/"+r;"flarum-tags"in flarum.extensions&&this.currentTag()&&(n=n+"/t/"+this.currentTag().slug()),t.add("rss-feed",m(c(),{icon:"fas fa-rss",className:"Button Button--icon",href:n,target:"_blank"}),105)}})),(0,a.extend)(u(),"userControls",(function(t,r){if(o().forum.attribute("ianm-syndication.plugin.forum-icons")){var n=o().forum.attribute("ianm-syndication.plugin.forum-format");t.add("rss-link",m(c(),{icon:"fas fa-rss",href:o().forum.attribute("baseUrl")+"/"+n+"/d/"+r.id(),external:!0,target:"_blank"},o().translator.trans("ianm-syndication.forum.discussion.feed_link")))}})),(0,a.extend)(d().prototype,"navItems",(function(t){if(o().forum.attribute("ianm-syndication.plugin.forum-icons")){var r=o().forum.attribute("ianm-syndication.plugin.forum-format"),n=o().forum.attribute("baseUrl")+"/"+r+"/u/"+this.user.username()+"/posts";t.add("rss-feed",m(c(),{icon:"fas fa-rss",href:n,external:!0,target:"_blank"},o().translator.trans("ianm-syndication.forum.discussion.feed_link")),40)}}))}))})(),module.exports=r})();
593
594
595flarum.extensions['ianm-syndication']=module.exports;
596
597var module={};
598
599(()=>{var e={n:o=>{var r=o&&o.__esModule?()=>o.default:()=>o;return e.d(r,{a:r}),r},d:(o,r)=>{for(var t in r)e.o(r,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:r[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};(()=>{"use strict";e.r(o),e.d(o,{extend:()=>i});const r=flarum.core.compat["forum/app"];var t=e.n(r);const a=flarum.core.compat["common/extend"],n=flarum.core.compat["forum/components/AvatarEditor"];var c=e.n(n);const m=flarum.core.compat["common/extenders"];var l=e.n(m);const d=flarum.core.compat["common/models/User"];var s=e.n(d);const u=[new(l().Model)(s()).attribute("avatarIsGenerated")],i=[].concat(u);t().initializers.add("ianm/boring-avatars",(function(){(0,a.extend)(c().prototype,"controlItems",(function(e){var o,r;null!=(o=(r=this.attrs.user).avatarIsGenerated)&&o.call(r)&&e.remove("remove")}))}))})(),module.exports=o})();
600
601
602flarum.extensions['ianm-boring-avatars']=module.exports;
603
604var module={};
605
606(()=>{var t={561:function(){(function(){var t=[].slice;String.prototype.autoLink=function(){var e,o,r,i,n,a;return n=/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,0<(i=1<=arguments.length?t.call(arguments,0):[]).length?(r=i[0],o=function(){var t;for(e in t=[],r)a=r[e],"callback"!==e&&t.push(" "+e+"='"+a+"'");return t}().join(""),this.replace(n,(function(t,e,i){return""+e+(("function"==typeof r.callback?r.callback(i):void 0)||"<a href='"+i+"'"+o+">"+i+"</a>")}))):this.replace(n,"$1<a href='$2'>$2</a>")}}).call(this)}},e={};function o(r){var i=e[r];if(void 0!==i)return i.exports;var n=e[r]={exports:{}};return t[r].call(n.exports,n,n.exports,o),n.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
606),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";o.r(r),o.d(r,{components:()=>B});const t=flarum.core.compat["forum/app"];var e=o.n(t);const i=flarum.core.compat["common/extend"];o(561),flarum.core.compat["common/utils/computed"];const n=flarum.core.compat["forum/components/UserCard"];var a=o.n(n);const s=flarum.core.compat["common/models/User"];var c=o.n(s);const l=flarum.core.compat["common/Model"];var u=o.n(l);function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}const d=flarum.core.compat["common/Component"];var f=o.n(d);const h=flarum.core.compat["common/components/LoadingIndicator"];var b=o.n(h);const v=flarum.core.compat["common/utils/classList"];var g=o.n(v);const y=flarum.core.compat["common/utils/extractText"];var x=o.n(y),S=function(t){var o,r;function i(){return t.apply(this,arguments)||this}r=t,(o=i).prototype=Object.create(r.prototype),o.prototype.constructor=o,p(o,r);var n=i.prototype;return n.oninit=function(o){t.prototype.oninit.call(this,o),this.editing=!1,this.loading=!1,this.bioMaxLength=e().forum.attribute("fof-user-bio.maxLength"),this.bioPlaceholder=e().session&&e().session.user&&e().session.user.id()===this.attrs.user.id()?e().translator.trans("fof-user-bio.forum.userbioPlaceholder"):e().translator.trans("fof-user-bio.forum.userbioPlaceholderOtherUser",{username:this.attrs.user.displayName()})},n.view=function(){var t,o=this,r=this.attrs.user,i=this.attrs.user.attribute("canEditBio");if(this.editing){var n=this.tempBio,a=null!=n?n:r.bio();t=m("textarea",{className:"FormControl",placeholder:x()(this.bioPlaceholder),rows:"3",maxlength:this.bioMaxLength,oncreate:function(t){var e=t.dom;e.value=a,void 0!==n&&(e.value=n,e.focus(),void 0!==o.tempSelector&&(e.selectionStart=o.tempSelector,e.selectionEnd=o.tempSelector,delete o.tempSelector))}})}else{var s;if(this.loading)s=m("p",{className:"UserBio-placeholder"},m(b(),null));else{var c=r.bioHtml();c?s=m.trust(c):r.bio()?s=m.trust("<p>"+$("<div/>").text(r.bio()).html().replace(/\n/g,"<br>").autoLink({rel:"nofollow ugc"})+"</p>"):i&&(s=m("p",{className:"UserBio-placeholder"},this.bioPlaceholder))}var l=e().forum.attribute("fof-user-bio.maxLines");t=m("div",{className:"UserBio-content",onclick:i?this.edit.bind(this):function(){},style:{"--bio-max-lines":l}},s)}return m("div",{className:"UserBio "+g()({editable:i,editing:this.editing})},t)},n.edit=function(){this.editing=!0,m.redraw.sync();var t=this,e=function(e){e.shiftKey||(e.preventDefault(),t.save(e.target.value,"blur"===e.type))};this.$("textarea").trigger("focus").on("blur",e).bind("keydown","return",e),m.redraw()},n.save=function(t,e){var o=this,r=this.attrs.user,i=this.$("textarea").prop("selectionStart"),n=e&&t===this.tempBio;n||r.bio()===t||(this.loading=!0,r.save({bio:t}).catch((function(){o.tempBio=t,o.tempSelector=i,o.edit()})).then((function(){o.loading=!1,delete o.tempBio,m.redraw()}))),n&&delete this.tempBio,this.editing=!1,m.redraw()},i}(f()),B={UserBio:S};e().initializers.add("fof-user-bio",(function(){c().prototype.bio=u().attribute("bio"),c().prototype.bioHtml=u().attribute("bioHtml"),(0,i.extend)(a().prototype,"infoItems",(function(t){var e=this.attrs.user;e.attribute("canViewBio")&&t.add("bio",m(S,{user:e}),-100)}))}))})(),module.exports=r})();
607
608
609flarum.extensions['fof-user-bio']=module.exports;
610
611var module={};
612
613(()=>{var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var o in i)t.o(i,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:i[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{components:()=>X});const i=flarum.core.compat["common/extend"],o=flarum.core.compat["forum/app"];var a=t.n(o);const s=flarum.core.compat["forum/components/UserPage"];var n=t.n(s);const r=flarum.core.compat["common/components/LinkButton"];var l=t.n(r);function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function d(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}const p=flarum.core.compat["common/Model"];var c=t.n(p);const f=flarum.core.compat["common/utils/mixin"];var h=function(t){function e(){return t.apply(this,arguments)||this}return d(e,t),e.prototype.apiEndpoint=function(){return"/fof/uploads"+(this.exists?"/"
613+this.data.id:"")},e}(t.n(f)()(c(),{baseName:c().attribute("baseName"),path:c().attribute("path"),url:c().attribute("url"),type:c().attribute("type"),size:c().attribute("size"),humanSize:c().attribute("humanSize"),createdAt:c().attribute("createdAt"),uuid:c().attribute("uuid"),tag:c().attribute("tag"),hidden:c().attribute("hidden"),bbcode:c().attribute("bbcode")})),g=function(){function t(){this.user=null,this.files=[],this.moreResults=!1,this.loading=!1}var e=t.prototype;return e.setUser=function(t){t!==this.user&&(this.user=t,this.files=[],this.loadResults())},e.loadResults=function(t){if(void 0===t&&(t=0),this.user)return this.loading=!0,a().store.find("fof/uploads",{filter:{user:this.user.id()},page:{offset:t}}).then(this.parseResults.bind(this))},e.loadMore=function(){this.loading=!0,this.loadResults(this.files.length).then(this.parseResults.bind(this))},e.parseResults=function(t){var e;return(e=this.files).push.apply(e,t),this.loading=!1,this.moreResults=!!t.payload.links&&!!t.payload.links.next,m.redraw(),t},e.addToList=function(t){var e;Array.isArray(t)?(e=this.files).unshift.apply(e,t):this.files.unshift(t)},e.hasFiles=function(){return this.files.length>0},e.isLoading=function(){return this.loading},e.hasMoreResults=function(){return this.moreResults},e.empty=function(){return!this.hasFiles()&&!this.isLoading()},t}();const v=flarum.core.compat["forum/components/Post"];var b=t.n(v);const y=flarum.core.compat["common/components/TextEditor"];var F=t.n(y);const w=flarum.core.compat["common/Component"];var N=t.n(w);const B=flarum.core.compat["common/components/Button"];var _=t.n(B);const M=flarum.core.compat["common/components/LoadingIndicator"];var x=t.n(M);const L=flarum.core.compat["common/utils/classList"];var S=t.n(L);const C=flarum.core.compat["common/components/Tooltip"];var k=t.n(C),O=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var i=e.prototype;return i.oninit=function(e){var i=this;t.prototype.oninit.call(this,e),this.attrs.uploader.on("uploaded",(function(){i.$("form")[0].reset(),m.redraw()})),this.isMediaUploadButton=e.attrs.isMediaUploadButton||!1},i.view=function(){var t=this.attrs.uploader.uploading?a().translator.trans("fof-upload.forum.states.loading"):a().translator.trans("fof-upload.forum.buttons.upload");return m(k(),{text:t},m(_(),{className:S()(["Button","hasIcon","fof-upload-button",!this.isMediaUploadButton&&!this.attrs.uploader.uploading&&"Button--icon",!this.isMediaUploadButton&&!this.attrs.uploader.uploading&&"Button--link",this.attrs.uploader.uploading&&"uploading"]),icon:!this.attrs.uploader.uploading&&"fas fa-file-upload",onclick:this.uploadButtonClicked.bind(this),disabled:this.attrs.disabled},this.attrs.uploader.uploading&&m(x(),{size:"small",display:"inline",className:"Button-icon"}),(this.isMediaUploadButton||this.attrs.uploader.uploading)&&m("span",{className:"Button-label"},t),m("form",null,m("input",{type:"file",multiple:!0,onchange:this.process.bind(this)}))))},i.process=function(t){var e=this.$("input").prop("files");0!==e.length&&this.attrs.uploader.upload(e,!this.isMediaUploadButton)},i.uploadButtonClicked=function(t){this.$("input").click()},e}(N()),U=function(){function t(t,e){this.upload=t,this.composerElement=e,this.handlers={},this.supportsFileDragging()&&(this.composerElement.addEventListener("dragover",this.handlers.in=this.in.bind(this)),this.composerElement.addEventListener("dragleave",this.handlers.out=this.out.bind(this)),this.composerElement.addEventListener("dragend",this.handlers.out),this.composerElement.addEventListener("drop",this.handlers.dropping=this.dropping.bind(this)))}var e=t.prototype;return e.supportsFileDragging=function(){var t=document.createElement("div");return("draggable"in t||"ondragstart"in t&&"ondrop"in t)&&"FormData"in window&&"FileReader"in window},e.unload=function(){this.handlers.in&&(this.composerElement.removeEventListener("dragover",this.handlers.in),this.composerElement.removeEventListener("dragleave",this.handlers.out),this.composerElement.removeEventListener("dragend",this.handlers.out),this.composerElement.removeEventListener("drop",this.handlers.dropping))},e.isNotFile=function(t){if(t.dataTransfer.items)for(var e=0;e<t.dataTransfer.items.length;e++)if("file"!==t.dataTransfer.items[e].kind)return!0;return!1},e.in=function(t){this.isNotFile(t)||(t.preventDefault(),this.over||(this.composerElement.classList.add("fof-upload-dragging"),this.over=!0))},e.out=function(t){this.isNotFile(t)||(t.preventDefault(),this.over&&(this.composerElement.classList.remove("fof-upload-dragging"),this.over=!1))},e.dropping=function(t){this.isNotFile(t)||(t.preventDefault(),this.upload(t.dataTransfer.files),this.composerElement.classList.remove("fof-upload-dragging"))},t}(),T=function(){function t(t,e){this.upload=t,e.addEventListener("paste",this.paste.bind(this))}return t.prototype.paste=function(t){if(t.clipboardData&&t.clipboardData.items){for(var e=t.clipboardData.items,i=[],o=0;o<e.length;o++)-1!==e[o].type.indexOf("image")&&i.push(e[o].getAsFile());i.length>0&&(t.preventDefault(),this.upload(i))}},t}(),E=function(){function t(){this.callbacks={success:[],failure:[],uploading:[],uploaded:[]},this.uploading=!1}var e=t.prototype;return e.on=function(t,e){this.callbacks[t].push(e)},e.dispatch=function(t,e){this.callbacks[t].forEach((function(t){return t(e)}))},e.upload=function(t,e){var i=this;void 0===e&&(e=!0),this.uploading=!0,this.dispatch("uploading",t),m.redraw();for(var o=new FormData,s=0;s<t.length;s++)o.append("files[]",t[s]);return a().request({method:"POST",url:a().forum.attribute("apiUrl")+"/fof/upload",serialize:function(t){return t},body:o}).then((function(t){return i.uploaded(t,e)}
613)).catch((function(t){throw i.uploading=!1,m.redraw(),t}))},e.uploaded=function(t,e){var i=this;void 0===e&&(e=!1),this.uploading=!1,t.data.forEach((function(t){var o=a().store.pushObject(t);a().fileListState.addToList(o),i.dispatch("success",{file:o,addBBcode:e})})),this.dispatch("uploaded")},t}();const D=flarum.core.compat["common/components/Modal"];var A=t.n(D);const R=flarum.core.compat["common/components/Alert"];var j=t.n(R);const z=flarum.core.compat["common/utils/extractText"];var P=t.n(z),H=["image/png","image/jpg","image/jpeg","image/svg+xml","image/gif"],I=["application/zip","application/x-7z-compressed","application/gzip","application/vnd.rar","application/x-rar-compressed"],$=["text/html","text/css","text/javascript","application/json","application/ld+json","text/javascript","application/x-httpd-php"],q=["application/x-abiword","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/pdf"],V=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var i=e.prototype;return i.oninit=function(e){t.prototype.oninit.call(this,e),a().fileListState.setUser(e.attrs.user||a().session.user),this.inModal=e.attrs.selectable,this.restrictFileType=e.attrs.restrictFileType||null,this.downloadOnClick=this.attrs.downloadOnClick||!1,this.filesBeingHidden=[],this.user=a().fileListState.user},i.view=function(){var t=this,e=a().fileListState;return m("div",{className:"fof-upload-file-list","aria-live":"polite"},e.isLoading()&&0===e.files.length&&m("div",{className:"fof-upload-loading"},a().translator.trans("fof-upload.forum.file_list.loading"),m(x(),null)),this.inModal&&e.empty()&&m("p",{className:"fof-upload-empty"},m("i",{className:"fas fa-cloud-upload-alt fof-upload-empty-icon"}),a().translator.trans("fof-upload.forum.file_list.modal_empty_"+("phone"!==a().screen()?"desktop":"phone"))),!this.inModal&&e.empty()&&m("div",{className:"Placeholder"},m("p",{className:"fof-upload-empty"},a().translator.trans("fof-upload.forum.file_list.empty"))),m("ul",null,e.files.map((function(e){var i,o=(i=e.type(),H.includes(i)?"image":i.includes("image/")?"far fa-file-image":i.includes("video/")?"far fa-file-video":I.indexOf(i)>=0?"far fa-file-archive":"application/pdf"===i?"far fa-file-pdf":q.indexOf(i)>=0?"far fa-file-word":i.includes("audio/")?"far fa-file-audio":$.indexOf(i)>=0?"far fa-file-code":"far fa-file"),s=!t.restrictFileType||t.isSelectable(e),n=S()(["fof-file","image"===o&&"fof-file-type-image",t.attrs.selectedFiles&&t.attrs.selectedFiles.indexOf(e.id())>=0&&"fof-file-selected"]),r=e.baseName(),l=t.filesBeingHidden.includes(e.uuid());return m("li",{"aria-busy":l},a().session.user&&(t.user===a().session.user||a().session.user.deleteOthersMediaLibrary())&&m(_(),{className:"Button Button--icon fof-file-delete",icon:"far fa-trash-alt","aria-label":a().translator.trans("fof-upload.forum.file_list.delete_file_a11y_label",{fileName:r}),disabled:l,onclick:t.hideFile.bind(t,e)}),m("button",{className:n,onclick:function(){return t.onFileClick(e)},disabled:!s||l,"aria-label":P()(a().translator.trans("fof-upload.forum.file_list.select_file_a11y_label",{fileName:r}))},m("figure",null,"image"===o?m("img",{src:e.url(),className:"fof-file-image-preview",draggable:!1,alt:""}):m("span",{className:"fof-file-icon",role:"presentation"},m("i",{className:"fa-fw "+o})),m("figcaption",{className:"fof-file-name"},r),l&&m("span",{class:"fof-file-loading",role:"status","aria-label":a().translator.trans("fof-upload.forum.file_list.hide_file.loading")},m(x(),null)))))}))),e.hasMoreResults()&&m("div",{className:"fof-load-more-files"},m(_(),{className:"Button Button--primary",disabled:e.isLoading(),loading:e.isLoading(),onclick:function(){return e.loadMore()}},a().translator.trans("fof-upload.forum.file_list.load_more_files_btn"))))},i.onFileClick=function(t){this.attrs.onFileSelect?this.attrs.onFileSelect(t):this.attrs.downloadOnClick&&window.open(t.url())},i.isSelectable=function(t){var e=t.type();return Array.isArray(this.restrictFileType)?this.restrictFileType.indexOf(e)>=0:"image"===this.restrictFileType?e.includes("image/"):"audio"===this.restrictFileType?e.includes("audio/"):"video"===this.restrictFileType&&e.includes("video/")},i.hideFile=function(t){var e=this,i=t.uuid();if(!this.filesBeingHidden.includes(i))if(this.filesBeingHidden.push(i),confirm(P()(a().translator.trans("fof-upload.forum.file_list.hide_file.hide_confirmation",{fileName:t.baseName()}
613))))a().request({method:"PATCH",url:a().forum.attribute("apiUrl")+"/fof/upload/hide",body:{uuid:i}}).then((function(){a().alerts.show(j(),{type:"success"},a().translator.trans("fof-upload.forum.file_list.hide_file.hide_success"))})).catch((function(){a().alerts.show(j(),{type:"error"},a().translator.trans("fof-upload.forum.file_list.hide_file.hide_fail",{fileName:t.fileName()}))})).then((function(){var t=a().fileListState,o=t.files.findIndex((function(t){return i===t.uuid()}));t.files.splice(o,1);var s=e.filesBeingHidden.indexOf(i);e.filesBeingHidden.splice(s,1)}));else{var o=this.filesBeingHidden.indexOf(i);this.filesBeingHidden.splice(o,1)}},e}(N()),G=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var i=e.prototype;return i.oninit=function(e){t.prototype.oninit.call(this,e),this.uploader=e.attrs.uploader,this.selectedFiles=[],this.multiSelect=e.attrs.multiSelect||!0,this.restrictFileType=e.attrs.restrictFileType||null,this.dragDrop=null,this.onUpload()},i.className=function(){return"Modal--large fof-file-manager-modal"},i.oncreate=function(e){var i=this;t.prototype.oncreate.call(this,e),this.dragDrop=new U((function(t){return i.uploader.upload(t,!1)}),this.$().find(".Modal-content")[0])},i.onremove=function(){this.dragDrop&&this.dragDrop.unload()},i.view=function(){var t=this.selectedFiles.length;return m("div",{className:"Modal modal-dialog "+this.className()},m("div",{className:"Modal-content"},m("div",{className:"fof-modal-buttons App-backControl"},m(O,{uploader:this.uploader,disabled:app.fileListState.isLoading(),isMediaUploadButton:!0})),m("div",{className:"fof-drag-and-drop"},m("div",{className:"fof-drag-and-drop-release"},m("i",{className:"fas fa-cloud-upload-alt"}),app.translator.trans("fof-upload.forum.file_list.release_to_upload"))),m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},app.translator.trans("fof-upload.forum.media_manager"))),this.alertAttrs&&m("div",{className:"Modal-alert"},m(Alert,this.alertAttrs)),m("div",{className:"Modal-body"},m(V,{user:this.attrs.user,selectable:!0,onFileSelect:this.onFileSelect.bind(this),selectedFiles:this.selectedFiles,restrictFileType:this.restrictFileType})),m("div",{className:"Modal-footer"},m(_(),{onclick:this.hide.bind(this),className:"Button"},app.translator.trans("fof-upload.forum.buttons.cancel")),m(_(),{onclick:this.onSelect.bind(this),disabled:0===this.selectedFiles.length||!this.multiSelect&&this.selectedFiles.length>1,className:"Button Button--primary"},app.translator.trans("fof-upload.forum.file_list.confirm_selection_btn",{fileCount:t})))))},i.onFileSelect=function(t){var e=this.selectedFiles.indexOf(t.id());e>=0?this.selectedFiles.splice(e,1):this.multiSelect?this.selectedFiles.push(t.id()):this.selectedFiles=[t.id()]},i.onUpload=function(){var t=this;this.uploader.on("success",(function(e){var i=e.file;t.multiSelect?t.selectedFiles.push(i.id()):t.selectedFiles=[i.id()]}))},i.onSelect=function(){this.hide(),this.attrs.onSelect?this.attrs.onSelect(this.selectedFiles):this.selectedFiles.map((function(t){var e=app.store.getById("files",t);app.composer.editor.insertAtCursor(e.bbcode()+"\n",!1)}))},e}(A()),J=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var i=e.prototype;return i.view=function(){return m(k(),{text:a().translator.trans("fof-upload.forum.buttons.media")},_().component({className:"Button fof-upload-button Button--icon",onclick:this.fileManagerButtonClicked.bind(this),icon:"fas fa-photo-video"}))},i.fileManagerButtonClicked=function(t){t.preventDefault(),a().modal.show(G,{uploader:this.attrs.uploader})},e}(N()),K=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var i=e.prototype;return i.oninit=function(e){t.prototype.oninit.call(this,e),this.user=null,this.loadUser(m.route.param("username"))},i.content=function(){return a().session.user&&(a().session.user.viewOthersMediaLibrary()||this.user===a().session.user)?this.user&&V.component({user:this.user,selectable:!1,downloadOnClick:!0}):null},i.show=function(e){t.prototype.show.call(this,e),this.user=e},e}(n());const Q=flarum.core.compat["common/models/User"];var W=t.n(Q),X={DragAndDrop:U,FileManagerButton:J,FileManagerModal:G,UserFileList:V,Uploader:E,UploadButton:O};
613a().initializers.add("fof-upload",(function(){W().prototype.viewOthersMediaLibrary=c().attribute("fof-upload-viewOthersMediaLibrary"),W().prototype.deleteOthersMediaLibrary=c().attribute("fof-upload-deleteOthersMediaLibrary"),W().prototype.uploadCountCurrent=c().attribute("fof-upload-uploadCountCurrent"),W().prototype.uploadCountAll=c().attribute("fof-upload-uploadCountAll"),(0,i.extend)(F().prototype,"oninit",(function(){this.uploader=new E})),(0,i.extend)(F().prototype,"controlItems",(function(t){if(a().forum.attribute("fof-upload.canUpload")){var e=a().forum.attribute("fof-upload.composerButtonVisiblity");"both"!==e&&"media-btn"!==e||t.add("fof-upload-media",J.component({uploader:this.uploader})),"both"!==e&&"upload-btn"!==e||t.add("fof-upload",O.component({uploader:this.uploader}))}})),(0,i.extend)(F().prototype,"oncreate",(function(t,e){var i=this;a().forum.attribute("fof-upload.canUpload")&&(this.uploader.on("success",(function(t){var e=t.file;if(t.addBBcode&&(i.attrs.composer.editor.insertAtCursor(e.bbcode()+"\n",!1),"function"==typeof i.attrs.preview)){var o=a().composer.isFullScreen;a().composer.isFullScreen=function(){return!1},i.attrs.preview(),a().composer.isFullScreen=o}})),this.dragAndDrop=new U((function(t){return i.uploader.upload(t)}),this.$().parents(".Composer")[0]),new T((function(t){return i.uploader.upload(t)}),this.$(".TextEditor-editor")[0]))})),(0,i.extend)(F().prototype,"onremove",(function(t,e){a().forum.attribute("fof-upload.canUpload")&&this.dragAndDrop.unload()})),(0,i.extend)(b().prototype,"oncreate",(function(){var t=this;this.$("[data-fof-upload-download-uuid]").unbind("click").on("click",(function(e){if(e.preventDefault(),e.stopPropagation(),a().forum.attribute("fof-upload.canDownload")){var i=a().forum.attribute("apiUrl")+"/fof/download";i+="/"+encodeURIComponent(e.currentTarget.dataset.fofUploadDownloadUuid),i+="/"+encodeURIComponent(t.attrs.post.id()),i+="/"+encodeURIComponent(a().session.csrfToken),window.open(i)}else alert(a().translator.trans("fof-upload.forum.states.unauthorized"))}))})),a().store.models.files=h,a().fileListState=new g,a().routes["user.uploads"]={path:"/u/:username/uploads",component:K},(0,i.extend)(n().prototype,"navItems",(function(t){var e=!!a().forum.attribute("fof-upload.canUpload"),i=!!this.user.uploadCountCurrent();if(a().session.user&&(a().session.user.viewOthersMediaLibrary()||this.user===a().session.user&&(e||i))){var o=this.user.uploadCountCurrent();t.add("uploads",l().component({href:a().route("user.uploads",{username:this.user.username()}),name:"uploads",icon:"fas fa-file-upload"},[this.user===a().session.user?a().translator.trans("fof-upload.forum.buttons.media"):a().translator.trans("fof-upload.forum.buttons.user_uploads")," ",o>0?m("span",{className:"Button-badge"},o):""]),80)}}))}))})(),module.exports=e})();
614
615
616flarum.extensions['fof-upload']=module.exports;
617
618var module={};
619
620(()=>{var t={n:o=>{var a=o&&o.__esModule?()=>o.default:()=>o;return t.d(a,{a}),a},d:(o,a)=>{for(var n in a)t.o(a,n)&&!t.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:a[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);const a=flarum.core.compat["forum/app"];var n=t.n(a);const i=flarum.core.compat["common/Model"];var e=t.n(i);const s=flarum.core.compat["common/models/User"];var r=t.n(s);const c=flarum.core.compat["common/extend"],l=flarum.core.compat["forum/components/UserCard"];var f=t.n(l);const u=flarum.core.compat["common/components/Badge"];var b=t.n(u);const d=flarum.core.compat["common/utils/ItemList"];var p=t.n(d);const h=flarum.core.compat["common/utils/classList"];var v=t.n(h);function g(t,o){return g=Object.setPrototypeOf||function(t,o){return t.__proto__=o,t},g(t,o)}function y(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,g(t,o)}const w=flarum.core.compat["common/components/Modal"];var x=t.n(w);const k=flarum.core.compat["common/components/Button"];var S=t.n(k);const B=flarum.core.compat["common/utils/Stream"];var N=t.n(B);const C=flarum.core.compat["common/Component"];var E=t.n(C);const F=flarum.core.compat["common/utils/withAttr"];var _=t.n(F);const O=flarum.core.compat["common/components/Dropdown"];var j=t.n(O);const P=flarum.core.compat["common/helpers/icon"];var I=t.n(P),U=function(t){function o(){return t.apply(this,arguments)||this}y(o,t),o.initAttrs=function(o){t.initAttrs.call(this,o),o.className="icondropdown",o.buttonClassName="Button Button--icon",o.menuClassName="social-dropdown-menu"};var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.icons={social:["fas fa-envelope","fas fa-globe","fab fa-amazon","fab fa-angellist","fab fa-apple","fab fa-behance","fab fa-bitbucket","fab fa-codepen","fab fa-connectdevelop","fab fa-dashcube","fab fa-delicious","fab fa-deviantart","fab fa-digg","fab fa-discord","fab fa-dribbble","fab fa-dropbox","fab fa-drupal","fab fa-facebook","fab fa-flickr","fab fa-foursquare","fab fa-get-pocket","fab fa-git","fab fa-github","fab fa-github-alt","fab fa-google","fab fa-google-plus","fab fa-google-wallet","fab fa-hacker-news","fab fa-instagram","fab fa-ioxhost","fab fa-joomla","fab fa-jsfiddle","fab fa-lastfm","fab fa-leanpub","fab fa-linkedin","fab fa-mastodon","fab fa-medium","fab fa-odnoklassniki","fab fa-opencart","fab fa-pagelines","fab fa-paypal","fab fa-pied-piper-alt","fab fa-pinterest-p","fab fa-playstation","fab fa-qq","fab fa-reddit","fab fa-renren","fab fa-sellsy","fas fa-share-alt","fab fa-shirtsinbulk","fab fa-simplybuilt","fab fa-skyatlas","fab fa-skype","fab fa-slack","fab fa-slideshare","fab fa-soundcloud","fab fa-spotify","fab fa-stack-exchange","fab fa-stack-overflow","fab fa-steam","fab fa-stumbleupon","fab fa-telegram","fab fa-tencent-weibo","fab fa-trello","fab fa-tripadvisor","fab fa-tumblr","fab fa-twitch","fab fa-twitter","fab fa-viacoin","fab fa-vimeo","fab fa-vine","fab fa-vk","fab fa-weibo","fab fa-weixin","fab fa-whatsapp","fab fa-wordpress","fab fa-xbox","fab fa-xing","fab fa-y-combinator","fab fa-yandex","fab fa-yandex-international","fab fa-yelp","fab fa-youtube"]}},a.view=function(o){return o.children=this.items().toArray(),t.prototype.view.call(this,o)},a.getButtonContent=function(){var t=this,o=function(t){return I()(t,{className:"icondropdown-activeIcon fa-fw"})};return[/^favicon(-\w+)?$/.test(this.attrs.selection())?this.attrs.allowsExternal?[m("img",{className:v()({"icondropdown-activeIcon":!0,"social-greyscale-button":"favicon-grey"===this.attrs.selection(),"social-button":"favicon-grey"===!this.attrs.selection()}),alt:"",src:this.attrs.favicon(),onerror:function(){t.attrs.favicon("none"),t.select(t.icons.social[0])}})]:o("fas fa-globe"):o(this.attrs.selection()),this.attrs.caretIcon?I()(this.attrs.caretIcon,{className:"Button-caret"}):""]},a.items=function(){var t=this,o=new(p());return"none"!==this.attrs.favicon()&&this.attrs.allowsExternal&&(o.add("favicon",m("div",{onclick:function(){return t.select("favicon")},role:"button",className:v()({"iconpicker-item":!0,"iconpicker-item--highlighted":"favicon"===this.attrs.selection()}),title:"Favicon"},m("img",{className:"iconpicker-image-"+this.attrs.index(),alt:"favicon",style:{width:"14px",height:"14px",margin:"0 2px 0 2px"},src:this.attrs.favicon()})),102),o.add("favicon-grey",m("div",{onclick:function(){return t.select("favicon-grey")},role:"button",className:v()({"iconpicker-item iconpicker-item--invertColors":!0,"iconpicker-item--highlighted":"favicon-grey"===this.attrs.selection()}),title:"Grey Favicon"},m("img",{className:"social-greyscale-button iconpicker-image-"+this.attrs.index(),alt:"favicon",style:{width:"14px",height:"14px",margin:"0 2px 0 2px"},src:this.attrs.favicon()})),101)),this.icons.social.forEach((function(a){o.add(a.replace(/ /,"-"),m("div",{onclick:function(){return t.select(a)},className:v()({"iconpicker-item":!0,"iconpicker-item--highlighted":t.attrs.selection()===a}),role:"button",title:"."+a},I()(a,{className:"social-icon fa-fw"})),100)})),o},a.select=function(t){this.attrs.selection(t)},o}(j()),M=function(t){function o(){return t.apply(this,arguments)||this}y(o,t);var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.button=this.attrs.button,this.allowsExternal=n().forum.attribute("fof-socialprofile.allow_external_favicons")},a.view=function(t){return m("div",{className:"Form-group form-group-social",id:"socialgroup-"+this.button.index()},m("input",{type:"text",className:"FormControl SocialFormControl SocialFormControl-title",placeholder:n().translator.trans("fof-socialprofile.forum.edit.title"),tabIndex:2*(this.button.index()+1)-1,bidi:this.button.title}
620),U.component({selection:this.button.icon,favicon:this.button.favicon,index:this.button.index,allowsExternal:this.allowsExternal}),m("input",{type:"text",className:"FormControl SocialFormControl SocialFormControl-url",placeholder:n().translator.trans("fof-socialprofile.forum.edit.url"),tabIndex:2*(this.button.index()+1),value:this.button.url(),onchange:_()("value",this.onUrlChange.bind(this))}),m("input",{type:"hidden",className:"FormControl SocialFormControl SocialFormControl-icon",id:"icon"+this.button.index()+"-icon",bidi:this.button.icon}),m("input",{type:"hidden",className:"SocialFormControl SocialFormControl-favicon",id:"icon"+this.button.index()+"-favicon",bidi:this.button.favicon}))},a.onUrlChange=function(t){var o=this;this.button.url(t),this.allowsExternal&&(clearTimeout(this.waitUntilFinished),"fas fa-circle-notch fa-spin"!==this.button.icon()&&(this.button.icon("fas fa-circle-notch fa-spin"),this.button.favicon("none")),this.waitUntilFinished=setTimeout((function(){if(function(t){var o;try{o=new URL(t)}catch(t){return!1}return["http:","https:"].includes(o.protocol)}(o.button.url())){var t="https://icons.duckduckgo.com/ip3/"+function(t){var o;try{o=new URL(t)}catch(t){return null}return["http:","https:"].includes(o.protocol)?o.host:null}(o.button.url())+".ico";o.button.favicon(t),o.button.icon("favicon"),m.redraw()}else o.button.icon("fas fa-globe"),o.button.favicon("none"),m.redraw()}),1e3))},o}(E()),A=function(t){function o(){return t.apply(this,arguments)||this}y(o,t);var a=o.prototype;return a.oninit=function(o){var a=this;t.prototype.oninit.call(this,o),this.buttons=[];var n=this.attrs.user.socialButtons();n.length?n.forEach((function(t,o){t&&t.title&&a.createButtonObject(o,t)})):this.createButtonObject(0)},a.className=function(){return"SocialButtonsModal Modal--small"},a.title=function(){return n().translator.trans("fof-socialprofile.forum.edit.headtitle")},a.content=function(){var t=this.buttons.some((function(t){return"fas fa-circle-notch fa-spin"===t.icon()}));return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.buttons.map((function(t){return M.component({button:t})})),m("div",{className:"Form-group",id:"submit-button-group"},m("div",{className:"Button Button--primary EditSocialButtons-add",style:"margin-left: 1%;",onclick:this.addSocialButton.bind(this)},m("i",{className:"fas fa-fw fa-plus"})),m("div",{className:"Button Button--primary EditSocialButtons-del",style:"margin-left: 1%;",onclick:this.delSocialButton.bind(this)},m("i",{className:"fas fa-fw fa-minus"})),S().component({type:"submit",style:"float: right;",className:"Button Button--primary EditSocialButtons-save",loading:this.loading,disabled:t,title:t?n().translator.trans("fof-socialprofile.forum.edit.save_disabled_fetching_favicons"):null},n().translator.trans("fof-socialprofile.forum.edit.submit")))))},a.data=function(){var t=[];return this.buttons.forEach((function(o){o&&o.title()&&o.url()&&t.push({title:o.title(),url:o.url(),icon:o.icon(),favicon:o.favicon()})})),{socialButtons:JSON.stringify(t)}},a.onsubmit=function(t){var o=this;t.preventDefault(),this.loading=!0,this.attrs.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).then($("#app").trigger("refreshSocialButtons",[this.data().socialButtons])).catch((function(){o.loading=!1,m.redraw()}))},a.addSocialButton=function(){var t=this;this.createButtonObject(this.buttons.length),m.redraw(),$("document").ready((function(){$("#socialgroup-"+(t.buttons.length-1)).slideDown()}))},a.delSocialButton=function(){var t=this,o=this.buttons.length-1;$("#socialgroup-"+o).slideUp("normal",(function(){t.buttons.splice(o,1),m.redraw()}))},a.createButtonObject=function(t,o){void 0===o&&(o=null),null==o?(this.buttons[t]={},this.buttons[t].index=N()(t),this.buttons[t].favicon=N()("none"),this.buttons[t].title=N()(""),this.buttons[t].url=N()(""),this.buttons[t].icon=N()("fas fa-globe")):(this.buttons[t]={},this.buttons[t].index=N()(t),this.buttons[t].favicon=N()(o.favicon),this.buttons[t].title=N()(o.title),this.buttons[t].url=N()(o.url),this.buttons[t].icon=N()(o.icon))},o}(x());
620n().initializers.add("fof/socialprofile",(function(){r().prototype.socialButtons=e().attribute("socialButtons",(function(t){return JSON.parse(t||"[]")})),r().prototype.canViewSocialProfile=e().attribute("canViewSocialProfile"),r().prototype.canEditSocialProfile=e().attribute("canEditSocialProfile"),(0,c.extend)(f().prototype,"infoItems",(function(t){var o=this,a=this.attrs.user;if(a.canViewSocialProfile()){this.canEdit=a.canEditSocialProfile(),this.buttons=this.attrs.user.socialButtons();var i=new(p());this.buttons.length?(this.buttons.forEach((function(t,a){if(t&&t.title&&t.icon&&t.url){var e,s,r={},c=v()(((e={})["social-button "+t.icon+"-"+a+" social-icon-"+a]=!0,e["social-greyscale-button"]="favicon-grey"===t.icon,e));"favicon"!==t.icon&&"favicon-grey"!==t.icon||(n().forum.attribute("fof-socialprofile.allow_external_favicons")?r={backgroundImage:'url("'+t.favicon+'")',backgroundSize:"60%",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:c+=" fas fa-globe"),i.add("social-icon-"+a,m("a",{href:t.url,target:"_blank",rel:"noreferrer noopener nofollow"},b().component({className:v()((s={},s[c]=!0,s["social-icon--deleting"]=o.deleting,s)),type:"social",icon:t.icon,label:t.title,style:r})))}})),this.canEdit&&i.add("settings social-button",b().component({type:"social social-settings",icon:"fas fa-cog",label:n().translator.trans("fof-socialprofile.forum.edit.edit"),onclick:function(){n().modal.show(A,{user:o.attrs.user})}}),-1)):this.canEdit&&i.add("settings social-button",b().component({type:"social null-social-settings",icon:"fas fa-plus",label:n().translator.trans("fof-socialprofile.forum.edit.add"),onclick:function(){n().modal.show(A,{user:o.attrs.user})}}),-1),i.toArray().length>0&&t.add("fofsocialprofile",i.toArray(),20)}}))}))})(),module.exports=o})();
621
622
623flarum.extensions['fof-socialprofile']=module.exports;
624
625var module={};
626
627(()=>{var t={n:r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return t.d(e,{a:e}),e},d:(r,e)=>{for(var o in e)t.o(e,o)&&!t.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:e[o]})},o:(t,r)=>Object.prototype.hasOwnProperty.call(t,r),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};(()=>{"use strict";t.r(r);const e=flarum.core.compat["forum/app"];var o=t.n(e);const n=flarum.core.compat["common/extend"],a=flarum.core.compat["forum/components/DiscussionPage"];var i=t.n(a);const c=flarum.core.compat["common/components/Button"];var s=t.n(c);const u=flarum.core.compat["common/Model"];var l=t.n(u);const f=flarum.core.compat["common/models/Discussion"];var p=t.n(f);const d=flarum.core.compat["common/components/SplitDropdown"];var h=t.n(d);function y(t,r){return y=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},y(t,r)}function v(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,y(t,r)}const b=flarum.core.compat["common/components/Modal"];var g=t.n(b);const w=flarum.core.compat["common/helpers/icon"];var S=t.n(w);const k=flarum.core.compat["common/utils/ItemList"];var _=t.n(k);const A=flarum.core.compat["common/utils/classList"];var O=t.n(A);const j=flarum.core.compat["common/utils/string"];var q={facebook:"//facebook.com/sharer/sharer.php?u={url}",twitter:"//twitter.com/share?url={url}&text={title}",linkedin:"//linkedin.com/shareArticle?mini=true&url={url}&title={title}&summary={description}",reddit:"//www.reddit.com/submit?url={url}&title={title}",whatsapp:"//api.whatsapp.com/send/?phone&text={title}%20{url}",telegram:"//telegram.me/share/url?url={url}&text={title}",vkontakte:"//vk.com/share.php?url={url}&title={title}&description={description}",odnoklassniki:"//connect.ok.ru/offer?url={url}",my_mail:"//connect.mail.ru/share?url={url}&title={title}&description={description}",qq:"//connect.qq.com/widget/shareqq/iframe_index.html?url={url}&title={title}",qzone:"//sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={url}&summary={description}&title={title}",native:function(t){return navigator.share(M(t))}},x={vkontakte:"fab fa-vk",my_mail:"fas fa-at",qq:"fab fa-qq",qzone:"fas fa-star",native:"fas fa-share-square"},I=function(t){var r;
627return{url:t.shareUrl(),title:o().title,description:t.firstPost()&&(0,j.truncate)((0,j.getPlainContent)(null==(r=t.firstPost())?void 0:r.contentHtml()),150,0)||""}},M=function(t){return{title:t.title,text:t.description,url:t.url}};function P(t){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},P(t)}function B(t,r,e){return B=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}}()?Reflect.construct:function(t,r,e){var o=[null];o.push.apply(o,r);var n=new(Function.bind.apply(t,o));return e&&y(n,e.prototype),n},B.apply(null,arguments)}function E(t){var r="function"==typeof Map?new Map:void 0;return E=function(t){if(null===t||(e=t,-1===Function.toString.call(e).indexOf("[native code]")))return t;var e;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,o)}function o(){return B(t,arguments,P(this).constructor)}return o.prototype=Object.create(t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),y(o,t)},E(t)}function U(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,o=new Array(r);e<r;e++)o[e]=t[e];return o}var z=function(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};function C(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,o=new Array(r);e<r;e++)o[e]=t[e];return o}var T=function(t){function r(r){var e;return(e=t.call(this,"Missing a value for "+(r?"the placeholder: "+r:"a placeholder"),r)||this).name="MissingValueError",e.key=r,e}return v(r,t),r}(E(Error));function N(t,r,e){var o=void 0===e?{}:e,n=o.ignoreMissing,a=void 0!==n&&n,i=o.transform,c=void 0===i?function(t){return t.value}:i;if("string"!=typeof t)throw new TypeError("Expected a `string` in the first argument, got `"+typeof t+"`");if("object"!=typeof r)throw new TypeError("Expected an `object` or `Array` in the second argument, got `"+typeof r+"`");var s,u=function(t,e){for(var o,n=r,i=function(t,r){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,r){if(t){if("string"==typeof t)return C(t,r);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)?C(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split("."));!(o=i()).done;){var s=o.value;n=n?n[s]:void 0}var u=c({value:n,key:e});if(void 0===u){if(a)return t;throw new T(e)}return String(u)},l=/{{(\d+|[a-z$_][\w\-$]*?(?:\.[\w\-$]*?)*?)}}/gi;return l.test(t)&&(t=t.replace(l,(s=u,function(){return function(t){if("string"==typeof t)return z(t);for(var r=t[0],e=arguments.length,o=new Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];for(var a,i=function(t,r){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,r){if(t){if("string"==typeof t)return U(t,r);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)?U(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(o.entries());!(a=i()).done;){var c=a.value,s=c[0],u=c[1];r=r+z(String(u))+t[s+1]}return r}(s.apply(void 0,arguments))}))),t.replace(/{(\d+|[a-z$_][\w\-$]*?(?:\.[\w\-$]*?)*?)}/gi,u)}function R(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,o=new Array(r);e<r;e++)o[e]=t[e];return o}
627var F=function(t){var r=t.network,e=t.discussion,n=t.isRounded,a=void 0!==n&&n;return m(s(),{className:O()("Button Button--block Share--"+r,a&&"Button--rounded"),icon:(x[r]||"fab fa-"+r)+" fa-lg fa-fw",onclick:L.bind(void 0,r,e)},o().translator.trans("fof-share-social.lib.networks."+r))},L=function(t,r){var e=I(r),n=q[t];if("function"==typeof n)return n(e);var a="width=1000, height= 500, top="+($(window).height()/2-250)+", left="+($(window).width()/2-500)+", status=no, scrollbars=no, resizable=no";for(var i in e)e[i]=encodeURIComponent(e[i]);window.open(N(n,e),o().title,a)},D=function(t,r){for(var e,n=new(_()),a=o().forum.attribute("fof-share-social.networks"),i=o().forum.attribute("fof-share-social.default"),c=function(t,r){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,r){if(t){if("string"==typeof t)return R(t,r);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)?R(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(a);!(e=c()).done;){var s=e.value;("native"!==s||null!=navigator.canShare&&navigator.canShare(I(t)))&&n.add(s,F({network:s,discussion:t,isRounded:r}))}return n.has(i)&&n.setPriority(i,1e3),n},H=function(t){function r(){return t.apply(this,arguments)||this}v(r,t);var e=r.prototype;return e.oninit=function(r){t.prototype.oninit.call(this,r),this.networks=this.attrs.networks,this.discussion=this.attrs.discussion},e.className=function(){return"FofShareSocialModal Modal--small"},e.title=function(){return o().translator.trans("fof-share-social.forum.modal.title")},e.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},this.shareItems().toArray())))},e.shareItems=function(){var t=D(this.discussion,!0);return o().forum.attribute("fof-share-social.plain-copy")&&t.add("plain-copy",m("div",{className:"ShareUrl"},m("input",{className:"FormControl",type:"text",value:this.discussion.shareUrl()}),m(s(),{className:"Button Button--primary","aria-label":o().translator.trans("fof-share-social.forum.modal.copy_button"),onclick:this.copy.bind(this)},S()("fas fa-copy fa-check")))),t},e.onclick=function(t){return share(t)},e.copy=function(){var t=document.querySelector(".ShareUrl input");t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),this.toggleCopyIcon()},e.toggleCopyIcon=function(){var t=document.querySelector(".ShareUrl button i");t.classList.toggle("fa-copy"),setTimeout((function(){t.classList.toggle("fa-copy")}),3e3)},r}(g());o().initializers.add("fof/share-social",(function(){p().prototype.shareUrl=l().attribute("shareUrl"),(0,n.extend)(i().prototype,"sidebarItems",(function(t){var r=this,e=o().forum.attribute("fof-share-social.networks"),n=o().forum.attribute("fof-share-social.default"),a="native"===n,i=a&&(null==navigator.canShare?void 0:navigator.canShare(M(this.discussion)));if(!n||a&&!i)t.add("share-social",m(s(),{class:"Button Button-icon Button--share",icon:"fas fa-share-alt",onclick:function(){return o().modal.show(H,{networks:e,discussion:r.discussion})}},o().translator.trans("fof-share-social.forum.discussion.share_button")),-1);else{var c=D(this.discussion);if(a&&(c.get("native").children=o().translator.trans("fof-share-social.forum.discussion.share_button")),c.isEmpty())return;t.add("share-social",m(h(),{icon:"fas fa-share-alt",buttonClassName:"Button--share",accessibleToggleLabel:o().translator.trans("fof-share-social.forum.discussion.share_dropdown_accessible_label"),lazyDraw:!0},c.toArray()))}}))}))})(),module.exports=r})();
628
629
630flarum.extensions['fof-share-social']=module.exports;
631
632var module={};
633
634(()=>{var t,r,e,n,o={195:(t,r,e)=>{t.exports=e(236)},236:t=>{var r=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var o=r&&r.prototype instanceof v?r:v,a=Object.create(o.prototype),i=new O(n||[]);return a._invoke=function(t,r,e){var n=f;return function(o,a){if(n===h)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return T()}for(e.method=o,e.arg=a;1;){var i=e.delegate;if(i){var c=B(i,e);if(c){if(c===m)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===f)throw n=d,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=h;var u=l(t,r,e);if("normal"===u.type){if(n=e.done?d:p,u.arg===m)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=d,e.method="throw",e.arg=u.arg)}}}(t,e,i),a}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f="suspendedStart",p="suspendedYield",h="executing",d="completed",m={};function v(){}function y(){}function g(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(P([])));x&&x!==e&&n.call(x,a)&&(b=x);var _=g.prototype=v.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function E(t,r){function e(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?r.resolve(f.__await).then((function(t){e("next",t,i,c)}),(function(t){e("throw",t,i,c)})):r.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return e("throw",t,i,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function a(){return new r((function(r,o){e(t,n,r,o)}))}return o=o?o.then(a,a):a()}}function B(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=r,B(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(n,t.iterator,e.arg);
vendor: 4,201 bytes, line 634
634if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,m;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function j(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return i.next=i}}return{next:T}}function T(){return{value:r,done:!0}}return y.prototype=g,u(_,"constructor",g),u(g,"constructor",y),y.displayName=u(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===y||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},k(E.prototype),u(E.prototype,i,(function(){return this})),t.AsyncIterator=E,t.async=function(r,e,n,o,a){void 0===a&&(a=Promise);var i=new E(s(r,e,n,o),a);return t.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(_),u(_,c,"Generator"),u(_,a,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},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 o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=r,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,r){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&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),j(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;j(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},t}(1?t.exports:0);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},a={};function i(t){var r=a[t];
634if(void 0!==r)return r.exports;var e=a[t]={exports:{}};return o[t].call(e.exports,e,e.exports,i),e.exports}i.m=o,i.n=t=>{var r=t&&t.__esModule?()=>t["default"]:()=>t;return i.d(r,{a:r}),r},r=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,i.t=function(e,n){if(1&n&&(e=this(e)),8&n)return e;if("object"==typeof e&&e){if(4&n&&e.__esModule)return e;if(16&n&&"function"==typeof e.then)return e}var o=Object.create(null);i.r(o);var a={};t=t||[null,r({}),r([]),r(r)];for(var c=2&n&&e;"object"==typeof c&&!~t.indexOf(c);c=r(c))Object.getOwnPropertyNames(c).forEach((t=>a[t]=()=>e[t]));return a["default"]=()=>e,i.d(o,a),o},i.d=(t,r)=>{for(var e in r)i.o(r,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},i.f={},i.e=t=>Promise.all(Object.keys(i.f).reduce(((r,e)=>(i.f[e](t,r),r)),[])),i.u=t=>"chunk~"+"modules"+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),e={},n="module.exports:",i.l=(t,r,o,a)=>{if(e[t])e[t].push(r);else{var c,u;if(void 0!==o)for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var f=s[l];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==n+o){c=f;break}}c||(u=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.setAttribute("data-webpack",n+o),c.src=t),e[t]=[r];var p=(r,n)=>{c.onerror=c.onload=null,clearTimeout(h);var o=e[t];if(delete e[t],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((t=>t(n))),r)return r(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=p.bind(null,c.onerror),c.onload=p.bind(null,c.onload),u&&document.head.appendChild(c)}},i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var r=i.g.document;if(!t&&r&&(r.currentScript&&(t=r.currentScript.src),!t)){var e=r.getElementsByTagName("script");if(e.length)for(var n=e.length-1;n>-1&&!t;)t=e[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t})(),(()=>{var t={315:0};i.f.j=(r,e)=>{var n=i.o(t,r)?t[r]:void 0;if(0!==n)if(n)e.push(n[2]);else if(1){var o=new Promise(((e,o)=>n=t[r]=[e,o]));e.push(n[2]=o);var a=i.p+i.u(r),c=new Error;i.l(a,(e=>{if(i.o(t,r)&&(0!==(n=t[r])&&(t[r]=void 0),n)){var o=e&&("load"===e.type?"missing":e.type),a=e&&e.target&&e.target.src;c.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",c.name="ChunkLoadError",c.type=o,c.request=a,n[1](c)}}),"chunk-"+r,r)}};var r=(r,e)=>{var n,o,[a,c,u]=e,s=0;if(a.some((r=>0!==t[r]))){for(n in c)i.o(c,n)&&(i.m[n]=c[n]);u&&u(i)}for(r&&r(e);s<a.length;s++)o=a[s],i.o(t,o)&&t[o]&&t[o][0](),t[o]=0},e=self["webpackChunkmodule_exports"]=self["webpackChunkmodule_exports"]||[];e.forEach(r.bind(null,0)),e.push=r.bind(null,e.push.bind(e))})();var c={};(()=>{"use strict";i.r(c),i.d(c,{components:()=>B});const t=flarum.core.compat["forum/app"];var r=i.n(t);const e=flarum.core.compat["common/extend"],n=flarum.core.compat["forum/components/AvatarEditor"];var o=i.n(n);function a(t,r,e,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function u(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var i=t.apply(r,e);function c(t){a(i,n,o,c,u,"next",t)}function u(t){a(i,n,o,c,u,"throw",t)}c(void 0)}))}}
634function s(t,r){return s=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},s(t,r)}var l=i(195),f=i.n(l);const p=flarum.core.compat["common/components/Modal"];var h=i.n(p);const d=flarum.core.compat["common/components/Button"];var v=i.n(d);const y=flarum.core.compat["common/components/LoadingIndicator"];var g=i.n(y);function b(t){var r=t.match(/data:([^;]+)/)[1],e=t.replace(/^[^,]+,/,"");return function(t,r){t=t||[],"string"==typeof(r=r||{})&&(r={type:r});try{return new Blob(t,r)}catch(o){if("TypeError"!==o.name)throw o;for(var e=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<t.length;n+=1)e.append(t[n]);return e.getBlob(r.type)}}([w(atob(e))],{type:r})}function w(t){for(var r=t.length,e=new ArrayBuffer(r),n=new Uint8Array(e),o=-1;++o<r;)n[o]=t.charCodeAt(o);return e}var x=function(){return i.p=r().forum.attribute("assetsBaseUrl")+"/extensions/fof-profile-image-crop/"},_=function(){var t=u(f().mark((function t(){return f().wrap((function(t){for(;1;)switch(t.prev=t.next){case 0:return t.prev=0,x(),t.next=4,i.e(54).then(i.t.bind(i,558,23));case 4:return t.abrupt("return",t.sent["default"]);case 7:t.prev=7,t.t0=t["catch"](0),console.error("[fof/profile-image-crop] An error occurred while loading `cropperjs`.",t.t0);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}(),k=function(){var t=u(f().mark((function t(){return f().wrap((function(t){for(;1;)switch(t.prev=t.next){case 0:return t.prev=0,x(),t.next=4,i.e(54).then(i.t.bind(i,291,23));case 4:return t.abrupt("return",t.sent["default"]);case 7:t.prev=7,t.t0=t["catch"](0),console.error("[fof/profile-image-crop] An error occurred while loading `image-blob-reduce`.",t.t0);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}(),E=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var a=o.prototype;return a.className=function(){return"FofProfileImageCropModal Modal--small"},a.title=function(){return r().translator.trans("core.forum.user.avatar_upload_button")},a.oninit=function(r){var e=this;t.prototype.oninit.call(this,r);var n=new FileReader;n.addEventListener("load",(function(){e.image=n.result,m.redraw()})),n.readAsDataURL(this.attrs.file)},a.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Image-container"},!this.ready&&m(g(),{size:"tiny"}),this.image&&m("img",{src:this.image,"data-ready":!!this.ready,onload:this.loadPicker.bind(this)})),m("br",null),this.ready&&this.cropper&&m("p",{className:"helpText"},r().translator.trans("fof-profile-image-crop.forum.modal.help_text",{disableResize:this.noResize?m("s",null):m("a",{onclick:this.disableResize.bind(this)}),disableCrop:this.cropper?m("a",{onclick:this.disableCrop.bind(this)}):m("s",null)})),m("div",{className:"Modal-buttons"},m(v(),{className:"Button Button--primary",loading:this.loading,onclick:this.upload.bind(this),disabled:!this.ready},r().translator.trans("fof-profile-image-crop.forum.modal."+(this.cropper?"submit_crop":"submit")+"_button")),m(v(),{className:"Button Button--icon Button--danger",icon:"fas fa-times",onclick:this.hide.bind(this)})))},a.loadPicker=function(){var t=u(f().mark((function t(e){var n,o,a=this;return f().wrap((function(t){for(;1;)switch(t.prev=t.next){case 0:return n=e.target||e.path[0],t.next=3,_();case 3:(o=t.sent)||(this.alertAttrs={type:"error",content:r().translator.trans("fof-profile-image-crop.forum.modal.error.failed_to_load_cropper")}),setTimeout((function(){a.ready=!0,o&&(a.cropper=new o(n,{aspectRatio:1,viewMode:1,guides:!1,background:!1,responsive:!0})),m.redraw()}),500);case 6:case"end":return t.stop()}}),t,this)})));return function(r){return t.apply(this,arguments)}}(),a.onbeforeupdate=function(e){var n=e.attrs.error;n&&(this.loading=!1,n.alert?delete this.alertAttrs:this.alertAttrs={type:"error",content:(null==n.toLocaleStr
634ing?void 0:n.toLocaleString())||n},delete e.attrs.error,delete r().modal.modal.attrs.error),t.prototype.onbeforeupdate.call(this,e)},a.disableResize=function(){this.noResize=!0,m.redraw()},a.disableCrop=function(){this.cropper.destroy(),this.cropper=null,m.redraw()},a.upload=function(){var t=u(f().mark((function t(){var e,n,o,a;return f().wrap((function(t){for(;1;)switch(t.prev=t.next){case 0:if(!this.loading){t.next=2;break}return t.abrupt("return");case 2:if(this.loading=!0,this.cropper){t.next=5;break}return t.abrupt("return",this.submitBlob(b(this.image)));case 5:if(e=this.cropper.getCroppedCanvas(),!this.noResize){t.next=12;break}return t.t0=this,t.next=10,this.canvasToBlob(e);case 10:return t.t1=t.sent,t.abrupt("return",t.t0.submitBlob.call(t.t0,t.t1));case 12:return t.next=14,k();case 14:if(n=t.sent){t.next=19;break}return this.loaded(),this.disableResize(),t.abrupt("return",this.upload());case 19:return o=e,t.prev=20,t.next=23,this.canvasToBlob(e);case 23:return a=t.sent,t.next=26,n().toCanvas(a,{max:100});case 26:o=t.sent,t.next=36;break;case 29:return t.prev=29,t.t2=t["catch"](20),console.error("[fof/profile-image-crop] An error occurred while resizing the image.",t.t2),this.alertAttrs={type:"error",content:"ERR_GET_IMAGE_DATA"===t.t2.code?r().translator.trans("fof-profile-image-crop.forum.modal.error.get_image_data"):r().translator.trans("fof-profile-image-crop.forum.modal.error.generic_resize")},this.loaded(),this.disableCrop(),t.abrupt("return");case 36:return t.t3=this,t.next=39,this.canvasToBlob(o);case 39:return t.t4=t.sent,t.abrupt("return",t.t3.submitBlob.call(t.t3,t.t4));case 41:case"end":return t.stop()}}),t,this,[[20,29]])})));return function(){return t.apply(this,arguments)}}(),a.canvasToBlob=function(){var t=u(f().mark((function t(r){return f().wrap((function(t){for(;1;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return r.toBlob(t)})));case 1:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}(),a.submitBlob=function(){var t=u(f().mark((function t(r){var e;return f().wrap((function(t){for(;1;)switch(t.prev=t.next){case 0:return e=new File([r],this.attrs.file.name,{type:this.attrs.file.type}),t.abrupt("return",this.attrs.upload(e));case 2:case"end":return t.stop()}}),t,this)})));return function(r){return t.apply(this,arguments)}}(),o}(h());E.isDismissible=!1,r().initializers.add("fof/profile-image-crop",(function(){(0,e.override)(o().prototype,"upload",(function(t,e){if(!e||!window.FileReader)return t();this.loading||r().modal.show(E,{file:e,upload:t})})),(0,e.extend)(o().prototype,"success",(function(){r().modal.close()})),(0,e.extend)(o().prototype,"failure",(function(t,e){r().modal&&r().modal.modal&&r().modal.modal.componentClass===E&&(r().modal.modal.attrs.error=e,m.redraw())}))}));var B={ProfileImageCropModal:E}})(),module.exports=c})();
635
636
637flarum.extensions['fof-profile-image-crop']=module.exports;
638
639var module={};
640
641(()=>{var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};(()=>{"use strict";e.r(o),e.d(o,{Themes:()=>a,getTheme:()=>b,perDeviceSetting:()=>t,setSelectedTheme:()=>n,switchTheme:()=>r});var t={};e.r(t),e.d(t,{KEY:()=>h,get:()=>g,remove:()=>y,set:()=>v});var n={};e.r(n),e.d(n,{default:()=>N,getUrls:()=>U,setStyle:()=>A,setTheme:()=>_,setThemeFromID:()=>w});var r={};e.r(r),e.d(r,{getIsLight:()=>z,switchTheme:()=>Y});const i=flarum.core.compat["common/app"];var c=e.n(i);const a={AUTO:0,LIGHT:1,DARK:2,DEFAULT:function(){return c().forum.attribute("fof-nightmode.default_theme")||0}},s=flarum.core.compat["common/extend"],d=flarum.core.compat["common/components/Page"];var f=e.n(d),u=function(){return u=Object.assign||function(e){for(var o,t=1,n=arguments.length;t<n;t++)for(var r in o=arguments[t])Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);return e},u.apply(this,arguments)};function p(e,o){if(!o)return"";var t="; "+e;return!0===o?t:t+"="+o}function l(e,o,t){document.cookie=function(e,o,t){return encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decode
641URIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(o).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var o=new Date;o.setMilliseconds(o.getMilliseconds()+864e5*e.expires),e.expires=o}return p("Expires",e.expires?e.expires.toUTCString():"")+p("Domain",e.domain)+p("Path",e.path)+p("Secure",e.secure)+p("SameSite",e.sameSite)}(t)}(e,o,u({path:"/"},t))}var h="flarum_nightmode",g=function(){var e,o=(e=h,function(e){for(var o={},t=0,n=e?e.split("; "):[];t<n.length;t++){var r=n[t].split("="),i=r.slice(1).join("=");'"'===i[0]&&(i=i.slice(1,-1));try{o[decodeURIComponent(r[0])]=i.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)}catch(e){}}return o}(document.cookie)[e]);return o||"0"===o?Number(o):a.DEFAULT()},v=function(e){return l(h,e,{sameSite:"lax",secure:"https:"===location.protocol})},y=function(){l(h,"",u(u({},undefined),{expires:-1}))};function T(){var e=Array.from(new Set(Object.values(a))),o=g();isNaN(o)?S("Theme is not a valid integer! Resetting..."):e.includes(o)||S("Theme is out of bounds! Resetting...")}function S(e){console.warn(e),v(a.DEFAULT())}function b(){var e,o=c().session.user,t=!o||!!o.preferences().fofNightMode_perDevice,n=o&&o.preferences().fofNightMode;return t?e=g():"number"==typeof n&&-1!==n&&(e=n),"number"==typeof e?e:a.DEFAULT()}const N=function(){(0,s.extend)(f().prototype,"oninit",_),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",_)};function _(){var e,o=c().session.user,t=null==(e=c().session.user)?void 0:e.preferences().fofNightMode_perDevice;o&&!t||T(),t&&T(),w(b())}function U(){return{day:c().data["fof-nightmode.assets.day"],night:c().data["fof-nightmode.assets.night"]}}function w(e){e===a.DARK?A("night"):e===a.LIGHT?A("day"):A(window.matchMedia("(prefers-color-scheme: dark)").matches?"night":"day")}function A(e){var o=document.querySelector("link.nightmode-light[rel=stylesheet]"),t=document.querySelector("link.nightmode-dark[rel=stylesheet]");e:if(o&&t){if(b()===a.AUTO)break e;var n=document.createElement("link");"onload"in n?n.onload=function(){o.remove(),t.remove()}:(o.remove(),t.remove()),n.rel="stylesheet",n.className="nightmode",n.href=U()[e],document.head.append(n)}else{var r=o||t||document.querySelector("link.nightmode[rel=stylesheet]"),i=U()[e];i!==r.href&&(r.href=i,r.className="nightmode")}var c=document.querySelector('meta[name="color-scheme"]');c&&(c.content="night"===e?"dark":"light");var s=new CustomEvent("fofnightmodechange",{detail:e});document.dispatchEvent(s)}const D=flarum.core.compat["forum/app"];var M=e.n(D);const O=flarum.core.compat["forum/components/SettingsPage"];var I=e.n(O);const k=flarum.core.compat["forum/components/SessionDropdown"];var x=e.n(k);const L=flarum.core.compat["forum/components/HeaderSecondary"];var R=e.n(L);const E=flarum.core.compat["common/components/Button"];var C=e.n(E);const P=flarum.core.compat["common/components/LoadingIndicator"];var F=e.n(P);const j=flarum.core.compat["common/components/Select"];var H=e.n(j);const B=flarum.core.compat["common/components/FieldSet"];var G=e.n(B);const K=flarum.core.compat["common/components/Switch"];var q=e.n(K);function z(e){return e===a.LIGHT||e===a.AUTO&&!window.matchMedia("(prefers-color-scheme: dark)").matches}function Y(){var e,o=b(),t=z(o),n=M().session.user;if(n){var r=t?a.DARK:a.LIGHT;if(n.preferences().fofNightMode_perDevice)return v(r),void _();n.savePreferences({fofNightMode:r}).then((function(){_()}))}else{var i=(e=o)===a.AUTO?a.LIGHT:e===a.LIGHT?a.DARK:a.AUTO;v(i),_()}}var J=function(e){return M().translator.trans("fof-nightmode.forum.user.settings."+e)};M().initializers.add("fof-nightmode",(function(){(0,s.extend)(I().prototype,"settingsItems",(function(e){var o=M().session.user,t=!!o.preferences().fofNightMode_perDevice;t&&T();var n=!window.matchMedia("not all and (prefers-color-scheme), (prefers-color-scheme)").matches,r=b(),i={0:J("options.auto"),1:J("options.day"),2:J("options.night")};n&&(delete i[0],r===a.AUTO&&(r=M().forum.attribute("fofNightMode_autoUnsupportedFallback"))),e.add("fof-nightmode",G().component({label:J("heading"),className:"Settings-theme"},[m("p",{className:"description"},J("description")),m("p",{className:"description"},J("description2")),n?m("p",{class:"description NightMode-autoUnsupported"},J("auto_unsupported")):null,q().component({className:"Settings-theme--per_device_cb",state:t,onchange:function(e){e?v(r):y(),o.savePreferences({fofNightMode_perDevice:e}).then((function(){_()}))}},J("device_specific_setting_checkbox")),H().component({value:r,className:"Settings-theme--input",onchange:function(e){if(t)return v(e),void _();o.savePreferences({fofNightMode:e}).then((function(){m.redraw(),_()}))},options:i}),m("p",{className:"Settings-theme--selection_description"},r===a.AUTO?J("option_descriptions.auto"):r===a.LIGHT?J("option_descriptions.day"):r===a.DARK?J("option_descriptions.night"):F().component())]))})),(0,s.extend)(R().prototype,"items",(function(e){if(!M().session.user||M().forum.attribute("fofNightMode.showThemeToggleOnHeaderAlways")){var o=b(),t=z(o);
641e.add("nightmode",m(C(),{className:"Button Button--flat",onclick:function(){Y()},icon:o===a.AUTO?"fas fa-adjust":"far fa-"+(t?"sun":"moon")},M().translator.trans("fof-nightmode.forum.header.nightmode_button")),15)}})),(0,s.extend)(x().prototype,"items",(function(e){if(M().session.user){var o=z(b());e.add(o?"nightmode":"daymode",C().component({icon:"far fa-"+(o?"moon":"sun"),onclick:function(){Y()}},M().translator.trans("fof-nightmode.forum."+(o?"night":"day"))),-1)}})),N()}))})(),module.exports=o})();
642
643
644flarum.extensions['fof-nightmode']=module.exports;
645
646var module={};
647
648(()=>{var t={195:(t,e,r)=>{t.exports=r(236)},236:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),s=new k(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===d)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var s=r.delegate;if(s){var a=L(s,r);if(a){if(a===p)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=l(t,e,r);if("normal"===c.type){if(n=r.done?h:m,c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(t,r,s),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",m="suspendedYield",d="executing",h="completed",p={};function g(){}function v(){}function y(){}var b={};c(b,i,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(M([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=y.prototype=g.prototype=Object.create(b);function N(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,s,a){var c=l(t[o],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function L(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method))return p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,p;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function P(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function M(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return s.next=s}}return{next:O}}function O(){return{value:e,done:!0}}return v.prototype=y,c(_,"constructor",y),c(y,"constructor",v),v.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},N(S.prototype),c(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,r,n,o,i){void 0===i&&(i=Prom
648ise);var s=new S(u(e,r,n,o),i);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},N(_),c(_,a,"Generator"),c(_,i,(function(){return this})),c(_,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=M,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),u=n.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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 r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:M(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{components:()=>rt});const t=flarum.core.compat["forum/app"];var e=r.n(t);const o=flarum.core.compat["common/extend"],i=flarum.core.compat["common/Model"];var s=r.n(i);const a=flarum.core.compat["common/components/Button"];var c=r.n(a);const u=flarum.core.compat["forum/utils/DiscussionControls"];var l=r.n(u);function f(t,e,r,n,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function d(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function s(t){f(i,n,o,s,a,"next",t)}function a(t){f(i,n,o,s,a,"throw",t)}s(void 0)}))}}function h(t,e){return h=Object.setPrototypeOf||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)}var g=r(195),v=r.n(g);const y=flarum.core.compat["forum/components/DiscussionPage"];var b=r.n(y);const w=flarum.core.compat["forum/components/IndexPage"];var x=r.n(w);const _=flarum.core.compat["common/components/Modal"];var N=r.n(_);const S=flarum.core.compat["forum/components/PostStream"];var L=r.n(S);const P=flarum.core.compat["forum/states/PostStreamState"];var E=r.n(P);const k=flarum.core.compat["forum/states/GlobalSearchState"];var M=r.n(k);const O=flarum.core.compat["common/utils/Stream"];var D=r.n(O);const j=flarum.core.compat["common/utils/classList"];var F=r.n(j);const T=flarum.core.compat["forum/components/Search"];var I=r.n(T);const G=flarum.core.compat["common/utils/ItemList"];var B=r.n(G);const R=flarum.core.compat["common/helpers/highlight"];var A=r.n(R),C=function(){function t(t,e){this.results=new Map,this.onSelect=t,this.ignore=e}var r=t.prototype;return r.search=function(t){var r=this;t=t.toLowerCase();var n=e().forum.attribute("fof-merge-discussions.search_limit")||4;this.results.set(t,[]);var o={filter:{q:t},page:{limit:n}},i=Number(t);return Number.isNaN(i)||i===this.ignore?e().store.find("discussions",o).then((function(e){r.results.set(t,e.filter((function(t){return t.id()!==r.ignore}
648)))})):e().store.find("discussions",i).then((function(e){r.results.set(t,[e])})).catch((function(){return[]}))},r.view=function(t){var e=this;return t=t.toLowerCase(),[(this.results.get(t)||[]).map((function(r){return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+r.id(),"data-id":r.id()},m("button",{className:"Button--ua-reset",type:"button",onclick:function(t){t.stopPropagation(),e.onSelect(r)}},m("div",{className:"DiscussionSearchResult-title"},m("i",null,A()(r.id(),t))," ~ ",A()(r.title(),t))))}))]},t}(),q=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var r=e.prototype;return r.oncreate=function(e){var r=this;t.prototype.oncreate.call(this,e),this.navigator.onSelect((function(){r.attrs.onSelect(app.store.getById("discussions",r.getItem(r.index).attr("data-id"))),m.redraw()}))},r.view=function(){this.hasFocus=!0;var e=t.prototype.view.call(this);return e.attrs.className="MergeDiscussions-Search "+(this.searchState.getValue()&&"open")+" "+e.attrs.className.replace(/(focused|open)
648/g,""),e},r.sourceItems=function(){var t=new(B());return t.add("discussions",new C(this.attrs.onSelect,this.attrs.ignore)),t},e}(I());const U=flarum.core.compat["common/helpers/icon"];var H=r.n(U);const Y=flarum.core.compat["common/components/Tooltip"];var z=r.n(Y),K=function(t){function r(){return t.apply(this,arguments)||this}p(r,t);var n=r.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.type=D()("target"),this.order=D()("date"),this.merging=[],this.attrs.preselect&&this.merging.push(this.attrs.preselect),this.results=[],this.preview=null,this.loadingPreview=!1,this.search=new(M())},n.onready=function(){this.$(".Search-input .FormControl").focus()},n.title=function(){return e().translator.trans("fof-merge-discussions.forum.modal.title")},n.className=function(){return"FoFMergeDiscussionsModal Modal--large"},n.types=function(){return["target","from"]},n.ordering=function(){return["date","suffix"]},n.typeItems=function(){var t=this,r=new(B());r.add("heading",m("h3",null,e().translator.trans("fof-merge-discussions.forum.modal.type_heading")),100);var n=90;return this.types().map((function(o){r.add("type_"+o,m("div",null,m("input",{type:"radio",id:"type_"+o,checked:t.type()===o,onclick:t.changeType.bind(t,o)})," ",m("label",{htmlFor:"type_"+o},e().translator.trans("fof-merge-discussions.forum.modal.type_"+o+"_label"))),n),n-=5})),r},n.orderItems=function(){var t=this,r=new(B());r.add("heading",m("h3",null,e().translator.trans("fof-merge-discussions.forum.modal.ordering_heading")),100);var n=90;return this.ordering().map((function(o){r.add("ordering_"+o,m("div",null,m("input",{type:"radio",id:"ordering_"+o,checked:t.order()===o,onclick:t.changeOrdering.bind(t,o)})," ",m("label",{htmlFor:"ordering_"+o},e().translator.trans("fof-merge-discussions.forum.modal.ordering_"+o+"_label"))," ",m(z(),{text:e().translator.trans("fof-merge-discussions.forum.modal.ordering_"+o+"_help")},H()("fas fa-info-circle"))),n),n-=5})),r},n.content=function(){var t=this;return m("div",{className:"Modal-body"},m("div",{className:"Form"},m("div",{className:"Forum-group"},this.orderItems().toArray()),m("div",{className:"Form-group"},this.typeItems().toArray()),m("p",{className:"help"},e().translator.trans("fof-merge-discussions.forum.modal.type_"+this.type()+"_help_text",{title:this.discussion.title()})),m("div",{className:F()("FormGroup",this.disabled()&&"hidden")},m(q,{state:this.search,onSelect:this.select.bind(this),ignore:this.discussion.id()})),m("div",{className:"Form-group MergeDiscussions-Discussions"},m("ul",null,this.merging.map((function(r){return m("li",null,m("i",{className:"fas fa-trash DeleteEntry-Button",onclick:function(){return t.remove(r)}})," ",m("a",{href:e().forum.attribute("baseUrl")+"/d/"+r.id(),target:"_blank"},m("i",null,r.id())," ~ ",r.title()))})))),m("div",{className:"Form-group MergeDiscussions-Preview"},m(c(),{className:"Button Button--danger",onclick:this.loadPreview.bind(this),loading:this.loadingPreview,disabled:!this.discussion||!this.merging.length},e().translator.trans("fof-merge-discussions.forum.modal.load_preview_button")),this.preview&&m("div",{className:"MergeDiscussions-PostStream"},m("div",{className:"Hero"},m("h2",null,"target"===this.type()?this.discussion.title():this.merging[0].title())),m(L(),{stream:this.preview,discussion:this.preview.discussion,onPositionChange:function(){}}))),m("div",{className:"Form-group"},m(c(),{className:"Button Button--primary Button--block",type:"submit",onclick:this.submit.bind(this),loading:this.loading,disabled:!this.discussion||!this.merging.length},e().translator.trans("fof-merge-discussions.forum.modal.submit_button")))))},n.disabled=function(){return"from"===this.type()&&0!==this.merging.length},n.select=function(t){t&&t.id()===this.discussion.id()||this.merging.includes(t)||this.disabled()||(this.merging.push(t),delete this.preview)},n.remove=function(t){delete this.preview,this.merging.splice(this.merging.indexOf(this.merging.filter((function(e){return e.id()===t.id()}))[0]),1)},n.changeType=function(t){this.type(t),this.merging.length>1&&(this.merging=[])},n.changeOrdering=function(t){this.order(t)},n.loadPreview=function(){var t=this;
648return this.loadingPreview=!0,e().request(this.getRequestData("GET")).then((function(r){var n=1;r.included&&r.included.map(e().store.pushObject.bind(e().store)),r.data.relationships.posts.data.map((function(t){return e().store.getById("posts",t.id)})).sort((function(t,e){return t.createdAt()-e.createdAt()})).forEach((function(t,e){t.number(n++),r.data.relationships.posts.data[e]={type:"posts",id:t.id()}}));var o=e().store.createRecord(r.data.type,r.data);o.payload=r,t.loadingPreview=!1;var i=o.posts();t.preview=new(E())(o,i),m.redraw()})).catch((function(){return t.loadingPreview=!1}))},n.submit=function(t){var r=this;return t.preventDefault(),this.loading=!0,e().request(this.getRequestData()).then(d(v().mark((function t(){var n;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n="target"===r.type()?r.discussion:r.merging[0],!e().current.matches(b())){t.next=12;break}if("target"!==r.type()){t.next=9;break}return t.next=5,e().store.find("discussions",n.id());case 5:return t.next=7,e().current.get("stream").update();case 7:t.next=10;break;case 9:m.route.set(e().route.discussion(n));case 10:t.next=15;break;case 12:if(!e().current.matches(x())){t.next=15;break}return t.next=15,e().store.find("discussions",n.id());case 15:"target"===r.type()?r.merging.forEach((function(t){return e().discussions.removeDiscussion(t)})):e().discussions.removeDiscussion(r.discussion),e().modal.close();case 17:case"end":return t.stop()}}),t)})))).catch(console.error).then(this.loaded.bind(this))},n.getRequestData=function(t){void 0===t&&(t="POST");var r="target"===this.type(),n=r?this.discussion.apiEndpoint():this.merging[0].apiEndpoint(),o=r?this.merging.map((function(t){return t.id()})):this.discussion.id(),i=this.order();return{method:t,url:""+e().forum.attribute("apiUrl")+n+"/merge",params:{ids:o,ordering:i},body:{ids:o,ordering:i},errorHandler:this.onerror.bind(this)}},r}(N());const V=flarum.core.compat["forum/components/EventPost"];var $=r.n(V);const J=flarum.core.compat["common/helpers/punctuateSeries"];var Q=r.n(J),W=function(t){function e(){return t.apply(this,arguments)||this}p(e,t);var r=e.prototype;return r.icon=function(){return"fas fa-code-branch fa-flip-vertical"},r.descriptionKey=function(){return"fof-merge-discussions.forum.post.merged"},r.descriptionData=function(){var t=this.attrs.post.content();return Array.isArray(t.titles)&&(t.titles=Q()(t.titles).join("")),t},e}($());const X=flarum.core.compat["forum/components/Notification"];var Z=function(t){function r(){return t.apply(this,arguments)||this}p(r,t);var n=r.prototype;return n.icon=function(){return"fas fa-code-branch fa-flip-vertical"},n.href=function(){var t=this.attrs.notification.subject();return e().route.discussion(t)},n.content=function(){var t=this.attrs.notification,r=t.fromUser(),n=t.content().merged_title;return e().translator.trans("fof-merge-discussions.forum.notification.discussion_merged",{user:r,oldTitle:n})},n.excerpt=function(){return null},r}(r.n(X)());const tt=flarum.core.compat["forum/components/NotificationGrid"];var et=r.n(tt);var rt={DiscussionMergedNotification:Z,DiscussionMergeModal:K,DiscussionMergePost:W,DiscussionSearch:q,DiscussionSearchSource:C};e().initializers.add("fof/merge-discussions",(function(){e().store.models.discussions.prototype.canMerge=s().attribute("canMerge"),e().postComponents.discussionMerged=W,(0,o.extend)(l(),"moderationControls",(function(t,r){r.canMerge()&&t.add("fof-merge",c().component({icon:"fas fa-code-branch fa-flip-vertical",onclick:function(){return e().modal.show(K,{discussion:r})}},e().translator.trans("fof-merge-discussions.forum.discussion.merge")))})),e().notificationComponents.discussionMerged=Z,(0,o.extend)(et().prototype,"notificationTypes",(function(t){t.add("discussionMerged",{name:"discussionMerged",icon:"fas fa-code-branch fa-flip-vertical",label:e().translator.trans("fof-merge-discussions.forum.notification.preferences.discussion_merged")})}))}))})(),module.exports=n})();
649
650
651flarum.extensions['fof-merge-discussions']=module.exports;
652
653var module={};
654
655(()=>{var t={n:n=>{var r=n&&n.__esModule?()=>n.default:()=>n;return t.d(r,{a:r}),r},d:(n,r)=>{for(var e in r)t.o(r,e)&&!t.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:r[e]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
655),Object.defineProperty(t,"__esModule",{value:!0})}},n={};(()=>{"use strict";t.r(n),t.d(n,{components:()=>R,models:()=>H,utils:()=>A});const r=flarum.core.compat["forum/app"];var e=t.n(r);const o=flarum.core.compat["common/extend"],i=flarum.core.compat["common/components/HeaderPrimary"];var a=t.n(i);function s(t,n){return s=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t},s(t,n)}function l(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n)}const c=flarum.core.compat["common/Model"];var u=t.n(c);const p=flarum.core.compat["common/utils/mixin"];var f=function(t){function n(){return t.apply(this,arguments)||this}return l(n,t),n}(t.n(p)()(u(),{title:u().attribute("title"),icon:u().attribute("icon"),type:u().attribute("type"),url:u().attribute("url"),position:u().attribute("position"),isInternal:u().attribute("isInternal"),isNewtab:u().attribute("isNewtab"),useRelMe:u().attribute("useRelMe"),isChild:u().attribute("isChild"),parent:u().hasOne("parent"),visibility:u().attribute("visibility")}));function d(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}const h=flarum.core.compat["common/components/Link"];var k=t.n(h);const b=flarum.core.compat["common/components/LinkButton"];var v=t.n(b);const y=flarum.core.compat["common/helpers/icon"];var w=t.n(y);const g=flarum.core.compat["common/components/Separator"];var L=t.n(g);const B=flarum.core.compat["common/utils/classList"];var N=t.n(B);const D=flarum.core.compat["common/components/Button"];var O=t.n(D),P=function(t){function n(){for(var n,r=arguments.length,e=new Array(r),o=0;o<r;o++)e[o]=arguments[o];return(n=t.call.apply(t,[this].concat(e))||this).attrs=void 0,n}l(n,t);var r,o,i=n.prototype;return i.view=function(t){return this.isLabel?this.labelView(t):this.linkView(t)},i.labelView=function(t){var n=this,r=this.attrs.link,e=this.attrs.inDropdown?"span":O();return m("[",null,this.attrs.inDropdown&&m(L(),null),m(e,{class:N()(this.class,"LinksButton--label"),onclick:function(t){n.attrs.inDropdown&&t.stopPropagation()},"data-toggle":this.attrs.isDropdownButton?"dropdown":void 0},this.icon,m("span",{className:"LinksButton-title"},r.title())),this.attrs.inDropdown&&m(L(),null))},i.linkView=function(t){var n=this.attrs.link,r={className:this.class,rel:this.rel,target:this.linkTarget,external:!n.isNewtab()&&!n.isInternal(),href:this.linkHref};return m(k(),r,this.icon,m("span",{className:"LinksButton-title"},n.title()))},r=n,(o=[{key:"isInternal",get:function(){var t=this.attrs.link;return t.isInternal()&&!t.isNewtab()}},{key:"isLabel",get:function(){return 0===this.attrs.link.url().length}},{key:"linkHref",get:function(){var t=this.attrs.link,n=t.url();return n.startsWith("/")&&t.isInternal()?e().forum.attribute("baseUrl")+n:n}},{key:"icon",get:function(){var t=this.attrs.link.icon();return t?w()(t,{className:"Button-icon LinksButton-icon"}):null}},{key:"rel",get:function(){return N()(this.attrs.link.isNewtab()&&"noopener noreferrer",this.attrs.link.useRelMe()&&"me")||void 0}},{key:"class",get:function(){return N()("LinksButton",this.attrs.className||"Button Button--link",{"LinksButton--inDropdown":this.attrs.inDropdown,active:this.isLinkCurrentPage})}},{key:"isLinkCurrentPage",get:function(){if(!this.attrs.link.isInternal())return!1;var t=e().forum.attribute("baseUrl"),n=new URL(m.route.get()||"/",t).href.replace(t,""),r=new URL(this.linkHref,t).href.replace(t,"");return 0===n.indexOf(r)&&("/"===n||"/"!==r)}},{key:"linkTarget",get:function(){var t=this.attrs.link;if(!this.isInternal)return t.isNewtab()?"_blank":void 0}}])&&d(r.prototype,o),n}(v());function I(){return I=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},I.apply(this,arguments)}const j=flarum.core.compat["common/components/SplitDropdown"];var C=t.n(j);const _=flarum.core.compat["common/utils/ItemList"];var S=t.n(_);function M(t){return t.slice(0).sort((function(t,n){var r=t.position(),e=n.position();return r>e?1:r<e?-1:0}))}var x=function(t){function n(){return t.apply(this,arguments)||this}l(n,t),n.initAttrs=function(n){t.initAttrs.call(this,n),n.className+=" LinkDropdown",n.buttonClassName+=" Button--link"};var r=n.prototype;return r.view=function(n){var r=this.items().toArray();return t.prototype.view.call(this,I({},n,{children:r}))},r.getButton=function(t){var n=this.getFirstChild(t);return n.attrs.className=N()(n.attrs.className,"SplitDropdown-button Button",this.attrs.buttonClassName),n.attrs.isDropdownButton=!0,[n,m("button",{className:N()("Dropdown-toggle","Button","Button--icon",this.attrs.buttonClassName),"data-toggle":"dropdown"},w()("fas fa-caret-down",{className:"Button-caret"}))]},r.items=function(){var t=new(S()),n=this.attrs.link;return t.add("link"+n.id(),P.component({link:n})),M(e().store.all("links")).filter((function(t){return t.parent()===n}
655)).forEach((function(r){t.add("link"+n.id()+"-"+r.id(),P.component({link:r,inDropdown:!0}))})),t},n}(C()),R={LinkDropdown:x,LinkItem:P},A={sortLinks:M},H={Link:f};e().initializers.add("fof-links",(function(){e().store.models.links=f,(0,o.extend)(a().prototype,"items",(function(t){M(e().store.all("links").filter((function(t){return!t.isChild()}))).map((function(n){var r=e().store.all("links").some((function(t){return t.parent()==n}));t.add("link"+n.id(),r?x.component({link:n}):P.component({link:n}))}))}))}))})(),module.exports=n})();
656
657
658flarum.extensions['fof-links']=module.exports;
659
660var module={};
661
662(()=>{var t={555:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,r="millisecond",n="second",a="minute",o="hour",s="day",i="week",u="month",c="quarter",d="year",l="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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("_")},v=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},y={s:v,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),a=r%60;return(e<=0?"+":"-")+v(n,2,"0")+":"+v(a,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var n=12*(r.year()-e.year())+(r.month()-e.month()),a=e.clone().add(n,u),o=r-a<0,s=e.clone().add(n+(o?-1:1),u);return+(-(n+(r-a)/(o?a-s:s-a))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:d,w:i,d:s,D:l,h:o,m:a,s:n,ms:r,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",g={};g[b]=p;var D=function(t){return t instanceof $},_=function(t,e,r){var n;if(!t)return b;if("string"==typeof t)g[t]&&(n=t),e&&(g[t]=e,n=t);else{var a=t.name;g[a]=t,n=a}return!r&&n&&(b=n),n||!r&&b},w=function(t,e){if(D(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new $(r)},S=y;S.l=_,S.i=D,S.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var $=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,r=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 n=e.match(h);if(n){var a=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],a,n[3]||1,n[4]||0,n[5]||0,n[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 S},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(t,e){var r=w(t);return this.startOf(e)<=r&&r<=this.endOf(e)},v.isAfter=function(t,e){return w(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<w(t)},v.$g=function(t,e,r){return S.u(t)?this[e]:this.set(r,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var r=this,c=!!S.u(e)||e,f=S.p(t),h=function(t,e){var n=S.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return c?n:n.endOf(s)},m=function(t,e){return S.w(r.toDate()[t].apply(r.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},p=this.$W,v=this.$M,y=this.$D,b="set"+(this.$u?"UTC":"");switch(f){case d:return c?h(1,0):h(31,11);case u:return c?h(1,v):h(0,v+1);case i:var g=this.$locale().weekStart||0,D=(p<g?p+7:p)-g;return h(c?y-D:y+(6-D),v);case s:case l:return m(b+"Hours",0);case o:return m(b+"Minutes",1);case a:return m(b+"Seconds",2);case n:return m(b+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var i,c=S.p(t),f="set"+(this.$u?"UTC":""),h=(i={}
662,i[s]=f+"Date",i[l]=f+"Date",i[u]=f+"Month",i[d]=f+"FullYear",i[o]=f+"Hours",i[a]=f+"Minutes",i[n]=f+"Seconds",i[r]=f+"Milliseconds",i)[c],m=c===s?this.$D+(e-this.$W):e;if(c===u||c===d){var p=this.clone().set(l,1);p.$d[h](m),p.init(),this.$d=p.set(l,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](m);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(r,c){var l,f=this;r=Number(r);var h=S.p(c),m=function(t){var e=w(f);return S.w(e.date(e.date()+Math.round(t*r)),f)};if(h===u)return this.set(u,this.$M+r);if(h===d)return this.set(d,this.$y+r);if(h===s)return m(1);if(h===i)return m(7);var p=(l={},l[a]=t,l[o]=e,l[n]=1e3,l)[h]||1,v=this.$d.getTime()+r*p;return S.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this;if(!this.isValid())return f;var r=t||"YYYY-MM-DDTHH:mm:ssZ",n=S.z(this),a=this.$locale(),o=this.$H,s=this.$m,i=this.$M,u=a.weekdays,c=a.months,d=function(t,n,a,o){return t&&(t[n]||t(e,r))||a[n].substr(0,o)},l=function(t){return S.s(o%12||12,t,"0")},h=a.meridiem||function(t,e,r){var n=t<12?"AM":"PM";return r?n.toLowerCase():n},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:i+1,MM:S.s(i+1,2,"0"),MMM:d(a.monthsShort,i,c,3),MMMM:d(c,i),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:d(a.weekdaysMin,this.$W,u,2),ddd:d(a.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(o),HH:S.s(o,2,"0"),h:l(1),hh:l(2),a:h(o,s,!0),A:h(o,s,!1),m:String(s),mm:S.s(s,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:n};return r.replace(m,(function(t,e){return e||p[t]||n.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,l,f){var h,m=S.p(l),p=w(r),v=(p.utcOffset()-this.utcOffset())*t,y=this-p,b=S.m(this,p);return b=(h={},h[d]=b/12,h[u]=b,h[c]=b/3,h[i]=(y-v)/6048e5,h[s]=(y-v)/864e5,h[o]=y/e,h[a]=y/t,h[n]=y/1e3,h)[m]||y,f?b:S.a(b)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return g[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),n=_(t,e,!0);return n&&(r.$L=n),r},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}(),M=$.prototype;return w.prototype=M,[["$ms",r],["$s",n],["$m",a],["$H",o],["$W",s],["$M",u],["$y",d],["$D",l]].forEach((function(t){M[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,$,w),t.$i=!0),w},w.locale=_,w.isDayjs=D,w.unix=function(t){return w(1e3*t)},w.en=g[b],w.Ls=g,w.p={},w}()},535:t=>{"use strict";t.exports=flarum.extensions["fof-byobu"]}},e={};function r(n){var a=e[n];if(void 0!==a)return a.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{components:()=>pt,models:()=>vt,states:()=>yt,utils:()=>bt});const t=flarum.core.compat["common/extend"],e=flarum.core.compat["common/models/User"];var a=r.n(e);const o=flarum.core.compat["common/Model"];var s=r.n(o);const i=flarum.core.compat["common/utils/Stream"];var u=r.n(i);function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function d(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,c(t,e)}const l=flarum.core.compat["forum/app"];var f=r.n(l);const h=flarum.core.compat["common/utils/ItemList"];var p=r.n(h);const v=flarum.core.compat["common/utils/mixin"],y=function(t,e){return Array.isArray(t)?t.map(e).sort():e(t)};var b=function(t){function e(){return t.apply(this,arguments)||this}return d(e,t),e}(r.n(v)()(s(),{user:s().hasOne("user"),content:s().attribute("content"),title:s().attribute("title"),scheduledValidationError:s().attribute("scheduledValidationError"),relationships:s().attribute("relationships"),extra:s().attribute("extra"),scheduledFor:s().attribute("scheduledFor",s().transformDate),updatedAt:s().attribute("updatedAt",s().transformDate),loadedRelationships:null,type:function(){var t=this.loadRelationships();return t.discussion?"reply":flarum.extensions["fof-byobu"]&&flarum.extensions["fof-byobu"].discussions&&("recipientGroups"in t||"recipientUsers"in t)?"privateDiscussion":"discussion"}
662,icon:function(){switch(this.type()){case"discussion":return"fas fa-edit";case"reply":return"fas fa-reply";case"privateDiscussion":return f().forum.data.attributes["byobu.icon-badge"]||"fas fa-eye-slash"}},loadRelationships:function(t){var e=this;if(!t&&this.loadedRelationships&&(Object.keys(this.loadedRelationships).length>0||0===Object.keys(this.loadedRelationships).length&&0===Object.keys(this.relationships).length))return this.loadedRelationships;this.loadedRelationships={};var r=this.relationships();if(r&&Object.keys(r).forEach((function(t){var n=r[t];n&&n.data&&(e.loadedRelationships[t]=y(n.data,(function(t){return f().store.getById(t.type,t.id)})))})),"recipientUsers"in this.loadedRelationships||"recipientGroups"in this.loadedRelationships){var n=new(p());(this.loadedRelationships.recipientUsers||[]).forEach((function(t){t&&n.add("users:"+t.id(),t)})),(this.loadedRelationships.recipientGroups||[]).forEach((function(t){t&&n.add("groups:"+t.id(),t)})),this.loadedRelationships.recipients=n}return this.loadedRelationships},compileData:function(){var t={originalContent:this.content(),title:this.title(),user:f().session.user,confirmExit:f().translator.trans("fof-drafts.forum.composer.exit_alert"),draft:this,fields:Object.assign({},this.loadRelationships(),this.extra())};return Object.assign(t,t.fields),t}}));const g=flarum.core.compat["common/components/Page"];var D=r.n(g);const _=flarum.core.compat["common/Component"];var w=r.n(_);const S=flarum.core.compat["common/components/LoadingIndicator"];var M=r.n(S);const N=flarum.core.compat["common/components/Button"];var A=r.n(N);const x=flarum.core.compat["common/helpers/avatar"];var O=r.n(x);const I=flarum.core.compat["common/helpers/icon"];var j=r.n(I);const k=flarum.core.compat["common/helpers/humanTime"];var C=r.n(k);const F=flarum.core.compat["common/utils/string"],E=flarum.core.compat["common/components/Tooltip"];var L=r.n(E),T=r(555),B=r.n(T),R=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return(e=t.call.apply(t,[this].concat(n))||this).canSchedule=f().forum.attribute("canScheduleDrafts")&&f().forum.attribute("drafts.enableScheduledDrafts"),e}d(e,t);var r=e.prototype;return r.oncreate=function(e){t.prototype.oncreate.call(this,e)},r.view=function(){var t=this.attrs,e=t.draft,r=t.state,n="far fa-calendar-plus";return e.scheduledValidationError()?n="far fa-calendar-times":e.scheduledFor()&&(n="far fa-calendar-check"),m("li",null,m("a",{onclick:r.showComposer.bind(r,e),className:"Notification draft--item"},O()(e.user()),j()(e.icon(),{className:"Notification-icon"}),m("span",{class:"Notification-title"},m("span",{className:"Notification-content"},e.scheduledFor()&&m(L(),{showOnFocus:!1,text:f().translator.trans("fof-drafts.forum.dropdown.scheduled_icon_tooltip",{datetime:B()(e.scheduledFor()).format(f().translator.trans("fof-drafts.forum.dropdown.scheduled_icon_tooltip_formatter")[0])})},j()("far fa-clock",{className:"draft--scheduledIcon"})),"reply"===e.type()?e.loadRelationships().discussion.title():e.title()),m("span",{class:"Notification-title-spring"}),C()(e.updatedAt())),m("div",{class:"Notification-action"},m(L(),{showOnFocus:!1,text:f().translator.trans("fof-drafts.forum.dropdown.delete_button")},m(A(),{"data-container":"body",icon:"fas fa-trash-alt",className:"Notification-action Button Button--link hasIcon draft--delete",onclick:function(t){r.deleteDraft(e),t.stopPropagation()}})),this.canSchedule?m(L(),{showOnFocus:!1,text:f().translator.trans("fof-drafts.forum.dropdown.schedule_button")},m(A(),{"data-container":"body",icon:n,className:"Notification-action Button Button--link hasIcon draft--schedule",onclick:function(t){r.scheduleDraft(e),t.stopPropagation()}})):null),m("div",{className:"Notification-excerpt"},(0,F.truncate)(e.content(),200)),e.scheduledValidationError()?m("p",{className:"scheduledValidationError"},e.scheduledValidationError()):""))},e}(w()),Y=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var r=e.prototype;return r.oncreate=function(e){t.prototype.oncreate.call(this,e),$(".draft
662--delete").on("click tap",(function(t){t.stopPropagation()}))},r.deleteAll=function(){confirm(f().translator.trans("fof-drafts.forum.dropdown.delete_all_alert"))&&f().request({method:"DELETE",url:f().forum.attribute("apiUrl")+"/drafts/all"}).then((function(){f().store.data.drafts=[],m.redraw()}))},r.view=function(){var t=f().store.all("drafts"),e=this.attrs.state;return m("div",{className:"NotificationList DraftsList"},m("div",{className:"NotificationList-header"},m("h4",{className:"App-titleControl App-titleControl--text"},f().translator.trans("fof-drafts.forum.dropdown.title")),m("div",{class:"App-primaryControl"},m(L(),{showOnFocus:!1,text:f().translator.trans("fof-drafts.forum.dropdown.delete_all_button")},m(A(),{"data-container":"body",icon:"fas fa-trash-alt",className:"Button Button--link Button--icon Alert-dismiss",onclick:this.deleteAll.bind(this)})))),m("div",{className:"NotificationList-content"},m("ul",{className:"NotificationGroup-content"},t.length?t.sort((function(t,e){return e.updatedAt()-t.updatedAt()})).map((function(t){return m(R,{draft:t,state:e})})):null,e.loading?m(M(),{display:"block"}):!t.length&&m("div",{className:"NotificationList-empty"},f().translator.trans("fof-drafts.forum.dropdown.empty_text")))))},e}(w()),P=function(t){function e(){return t.apply(this,arguments)||this}d(e,t);var r=e.prototype;return r.oninit=function(e){t.prototype.oninit.call(this,e),f().history.push("drafts"),f().drafts.load(),this.bodyClass="App--drafts"},r.view=function(){return m("div",{className:"DraftsPage"},m(Y,{state:f().drafts}))},e}(D());const H=flarum.core.compat["common/components/HeaderSecondary"];var V=r.n(H);const U=flarum.core.compat["common/components/NotificationsDropdown"];var W=function(t){function e(){return t.apply(this,arguments)||this}d(e,t),e.initAttrs=function(e){e.label=e.label||f().translator.trans("fof-drafts.forum.dropdown.tooltip"),e.icon=e.icon||"fas fa-edit",t.initAttrs.call(this,e)};var r=e.prototype;return r.getMenu=function(){return m("div",{className:"Dropdown-menu "+this.attrs.menuClassName,onclick:this.menuClick.bind(this)},this.showing?Y.component({state:this.attrs.state}):"")},r.goToRoute=function(){m.route.set(f().route("drafts"))},r.getUnreadCount=function(){return f().cache.draftsLoaded?f().store.all("drafts").length:f().store.all("drafts").length+f().session.user.draftCount()},r.getNewCount=function(){return this.getUnreadCount()},e}(r.n(U)());const z=flarum.core.compat["common/components/FieldSet"];var G=r.n(z);const J=flarum.core.compat["common/components/SettingsPage"];var Z=r.n(J);const q=flarum.core.compat["common/components/Switch"];var Q=r.n(q);const K=flarum.core.compat["forum/components/Composer"];var X=r.n(K);const tt=flarum.core.compat["forum/components/DiscussionComposer"];var et=r.n(tt);const rt=flarum.core.compat["forum/components/ReplyComposer"];var nt=r.n(rt);const at=flarum.core.compat["forum/states/ComposerState"];var ot=r.n(at);const st=flarum.core.compat["common/components/Alert"];var it=r.n(st);const ut=flarum.core.compat["common/components/Modal"];var ct=r.n(ut),dt=dayjs().format("YYYY-MM-DD"),lt=dayjs().format("HH:mm"),ft=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return(e=t.call.apply(t,[this].concat(n))||this).loading=!1,e.date=void 0,e.time=void 0,e.previewFormatString=void 0,e}d(e,t);var r=e.prototype;return r.oninit=function(e){t.prototype.oninit.call(this,e),this.date=this.isScheduled()?dayjs(this.attrs.draft.scheduledFor()).format("YYYY-MM-DD"):dt,this.time=this.isScheduled()?dayjs(this.attrs.draft.scheduledFor()).format("HH:mm"):lt,this.previewFormatString=f().translator.trans("fof-drafts.forum.schedule_draft_modal.schedule_time_preview_formatter")[0]},r.className=function(){return"ScheduleDraftModal"},r.title=function(){return f().translator.trans("fof-drafts.forum.schedule_draft_modal.title")},r.content=function(){var t=this;return this.loading?m(M(),null):[this.attrs.draft.scheduledFor()?m("div",{className:"Modal-alert"},m(it(),{type:"success",dismissible:!1},f().translator.trans("fof-drafts.forum.schedule_draft_modal.scheduled_text",{datetime:this.formattedDateTime()}))):"",this.attrs.draft.scheduledValidationError()?m("div",{className:"Modal-alert"},m(it(),{type:"error",dismissible:!1},f().translator.trans("fof-drafts.forum.schedule_draft_modal.scheduled_error",{error:this.attrs.draft.scheduledValidationError()}))):"",m("input",{style:"display: none"}),m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},f().translator.trans("fof-drafts.forum.schedule_draft_modal.text")),m("div",{className:"Form-group ScheduleDraftModal-timeDateGroup"},m("input",{name:"scheduledForDate",className:"FormControl",type:"date",min:dt,value:this.date,onchange:function(e){return t.date=e.target.value}}),m("input",{name:"scheduledForTime",className:"FormControl",type:"time",value:this.time,onchange:function(e){return t.time=e.target.value}})),m("div",{class:"Form-group ScheduleDraftModal-datePreview"},f().translator.trans("fof-drafts.forum.schedule_draft_modal.schedule_time_preview",{datetime:this.formattedDateTime()})),m("div",{className:"Form-group ScheduleDraftModal-submitButtons"}
662,this.isScheduled()&&m(A(),{className:"ScheduleDraftModal-unscheduleBtn Button Button--block Button--danger",loading:this.loading,onclick:this.unschedule.bind(this)},f().translator.trans("fof-drafts.forum.schedule_draft_modal.unschedule_button")),m(A(),{className:"ScheduleDraftModal-scheduleBtn Button Button--block Button--primary",type:"submit",loading:this.loading,disabled:!this.changed()},this.isScheduled()?f().translator.trans("fof-drafts.forum.schedule_draft_modal.reschedule_button"):f().translator.trans("fof-drafts.forum.schedule_draft_modal.schedule_button")))))]},r.scheduledFor=function(){return new Date(this.date+" "+this.time)||null},r.changed=function(){var t=function(t){return t&&t.getTime()||null};return t(this.scheduledFor())!==t(this.attrs.draft.scheduledFor())},r.isScheduled=function(){return!!this.attrs.draft.scheduledFor()},r.formattedDateTime=function(){return dayjs(this.scheduledFor()).format(this.previewFormatString)},r.unschedule=function(t){var e=this;t.preventDefault(),this.loading=!0,confirm(f().translator.trans("fof-drafts.forum.schedule_draft_modal.unschedule_warning"))&&this.attrs.draft.save({scheduledFor:null,clearValidationError:!0,scheduledValidationError:""}).then((function(){e.success=!0,e.hide.call(e)})).catch((function(){})).then(this.loaded.bind(this))},r.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.attrs.draft.save({scheduledFor:this.scheduledFor(),clearValidationError:!0,scheduledValidationError:""}).then((function(){return e.success=!0})).catch((function(){})).then(this.loaded.bind(this))},e}(ct()),ht=function(){function t(){this.loading=!1,this.cache=[]}var e=t.prototype;return e.deleteDraft=function(t){var e=this;window.confirm(f().translator.trans("fof-drafts.forum.dropdown.alert"))&&(this.loading=!0,t.delete().then((function(){f().composer.body&&f().composer.draft&&f().composer.draft.id()===t.id()&&!f().composer.changed()&&f().composer.hide(),e.loading=!1,m.redraw()})))},e.scheduleDraft=function(t){f().forum.attribute("canScheduleDrafts")&&f().forum.attribute("drafts.enableScheduledDrafts")&&f().modal.show(ft,{draft:t})},e.showComposer=function(t){if(!this.loading)return new Promise((function(e){var n;switch(t.type()){case"privateDiscussion":n=r(535).discussions.PrivateDiscussionComposer;break;case"reply":n=nt();break;default:n=et()}var a=t.compileData();return f().composer.load(n,a),f().composer.show(),Object.assign(f().composer.fields,a.fields),e(f().composer)}))},e.load=function(){var t=this;f().cache.draftsLoaded||(this.loading=!0,m.redraw(),f().store.find("drafts").then((function(){return f().cache.draftsLoaded=!0}),(function(){})).then((function(){t.loading=!1,m.redraw()})))},t}();function mt(t,e){if(t===e)return!0;if("object"!=typeof t||"object"!=typeof e||null==t||null==e)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var a=0,o=r;a<o.length;a++){var s=o[a];if(!n.includes(s)||!mt(t[s],e[s]))return!1}return!0}var pt={DraftsDropdown:W,DraftsList:Y,DraftsListItem:R,DraftsPage:P,ScheduleDraftModal:ft},vt={Draft:b},yt={DraftsListState:ht},bt={fillRelationship:y};function gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}f().initializers.add("fof-drafts",(function(){function e(){var t=this;Object.keys(this.attrs).forEach((function(e){["originalContent","title","user"].includes(e)?"title"===e&&(t.title=u()(t.attrs.title)):t[e]=t.attrs[e]})),this.data&&(this.composer.data=this.data.bind(this)),this.attrs.draft&&(this.composer.draft=this.attrs.draft)}function r(){this.composer.draft&&this.composer.draft.delete()}if(f().store.models.drafts=b,a().prototype.drafts=s().hasMany("drafts"),a().prototype.draftCount=s().attribute("draftCount"),f().routes.drafts={path:"/drafts",component:P},f().drafts=new ht(f()),ot().prototype.changed=function(){var t=this;if(!this.body||!this.data)return!1;var e=this.data(),r=this.draft,n=Object.keys(e).filter((function(t){return"relationships"!==t}));if(!n)return!1;if(!this.fields.content())return!1;for(var a,o=function(r){return("content"===r?t.fields.content():e[r])||""},s=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return gt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);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.")}(n);!(a=s()).done;){var i=a.value,u=o(i),c=r&&r.data.attributes[i];if(!r&&u||r&&!mt(u,c))return!0}if(!e.relationships&&!r.relationships())return!1;for(var d=function(t,e,r){var n,a;if(!(t.relationships[r]&&t.relationships[r].length||r in e.relationships()&&null!=(n=e.relationships()[r].data)&&n.length))return!0;
662if(!(r in e.relationships())||t.relationships[r].length!==(null==(a=e.relationships()[r].data)?void 0:a.length))return!1;var o=function(t){return"function"==typeof t.id?t.id():t.id},s=y(t.relationships[r],o),i=y(e.relationships()[r].data,o);return!s.some((function(t,e){return t!==i[e]}))},l=0,f=Object.keys(e.relationships);l<f.length;l++){var h=f[l];if(r){if(!d(e,r,h))return!0}else if(e.relationships[h])return!0}return!1},ot().prototype.saveDraft=function(){var t=this;this.saving=!0,m.redraw();var e=function(){t.saving=!1,t.justSaved=!0,setTimeout((function(){t.justSaved=!1,m.redraw()}),300),m.redraw()},r=this.draft;r&&r.id()&&!r.exists||(r?(delete r.data.attributes.relationships,r.save(Object.assign(r.data.attributes,this.data())).then((function(){return e()}))):f().store.createRecord("drafts").save(this.data()).then((function(r){r.loadRelationships(!0),t.draft=r,e()})))},(0,t.extend)(X().prototype,"controlItems",(function(t){if((this.state.bodyMatches(et())||this.state.bodyMatches(nt()))&&f().forum.attribute("canSaveDrafts")&&"minimized"!==this.state.position){var e=["Button","Button--icon","Button--link"];this.state.saving&&e.push("saving"),this.state.justSaved&&e.push("justSaved"),t.add("save-draft",A().component({icon:this.state.justSaved?"fas fa-check":this.state.saving?"fas fa-spinner fa-spin":"fas fa-save",className:e.join(" "),itemClassName:"App-backControl",title:f().translator.trans("fof-drafts.forum.composer.title"),disabled:this.state.saving||this.state.justSaved||this.loading,onclick:this.state.saveDraft.bind(this.state)}),20)}})),(0,t.extend)(ot().prototype,"load",(function(){var t=this;f().forum.attribute("canSaveDrafts")&&f().session.user.preferences().draftAutosaveEnable&&(this.bodyMatches(et())||this.bodyMatches(nt()))&&(this.autosaveInterval=setInterval((function(){!t.changed()||t.saving||t.loading||t.saveDraft()}),1e3*f().session.user.preferences().draftAutosaveInterval))})),(0,t.extend)(ot().prototype,"clear",(function(){this.draft=null,this.autosaveInterval&&clearInterval(this.autosaveInterval)})),(0,t.override)(ot().prototype,"preventExit",(function(t){this.body&&this.body.componentClass&&this.draft&&(this.body.attrs.confirmExit=f().translator.trans("fof-drafts.forum.composer.exit_alert"));var e=!1;if(this.changed()&&(e=t()),e)return e;if(this.body&&this.body.componentClass){var r=this.draft;return r&&!r.title()&&!r.content()&&confirm(f().translator.trans("fof-drafts.forum.composer.discard_empty_draft_alert"))&&r.delete(),e}})),(0,t.extend)(et().prototype,"oninit",e),(0,t.extend)(nt().prototype,"oninit",e),(0,t.extend)(et().prototype,"onsubmit",r),(0,t.extend)(nt().prototype,"onsubmit",r),f().initializers.has("fof-byobu")){var n=flarum.extensions["fof-byobu"].discussions.PrivateDiscussionComposer;(0,t.extend)(n.prototype,"onsubmit",r)}(0,t.extend)(V().prototype,"items",(function(t){f().session.user&&f().forum.attribute("canSaveDrafts")&&t.add("Drafts",m(W,{state:f().drafts}),20)})),(0,t.extend)(Z().prototype,"oninit",(function(){this.draftAutosaveInterval=u()(this.user.preferences().draftAutosaveInterval)})),(0,t.extend)(Z().prototype,"settingsItems",(function(t){f().forum.data.attributes.canSaveDrafts&&t.add("drafts",G().component({label:f().translator.trans("fof-drafts.forum.user.settings.drafts_heading"),className:"Settings-drafts"},this.draftsItems().toArray()))})),Z().prototype.draftsItems=function(){var t=this,e=new(p());return e.add("draft-autosave-enable",Q().component({state:this.user.preferences().draftAutosaveEnable,onchange:function(e){t.draftAutosaveEnableLoading=!0,t.user.savePreferences({draftAutosaveEnable:e}).then((function(){t.draftAutosaveEnableLoading=!1,m.redraw()}))},loading:this.draftAutosaveEnableLoading},f().translator.trans("fof-drafts.forum.user.settings.draft_autosave_enable"))),e.add("draft-autosave-interval",this.user.preferences().draftAutosaveEnable?m("label",null,m("p",null,f().translator.trans("fof-drafts.forum.user.settings.draft_autosave_interval_label")),m("input",{className:"FormControl",type:"number",min:"0",bidi:this.draftAutosaveInterval}),A().component({className:"Button Button--primary",onclick:function(){var e;t.draftAutosaveInterval()<0||(e=t.draftAutosaveInterval())!=Math.round(e)?(t.draftAutosaveIntervalInvalid=!0,t.draftAutosaveInterval(t.user.preferences().draftAutosaveInterval),m.redraw()):(t.draftAutosaveIntervalInvalid=!1,t.user.savePreferences({draftAutosaveInterval:t.draftAutosaveInterval()}).then((function(){m.redraw()})))}},f().translator.trans("fof-drafts.forum.user.settings.draft_autosave_interval_button")),this.draftAutosaveIntervalInvalid?m("p",{class:"invalidInterval"},m("small",null,f().translator.trans("fof-drafts.forum.user.settings.draft_autosave_interval_invalid"))):""):m("p",null)),e}}))})(),module.exports=n})();
663
664
665flarum.extensions['fof-drafts']=module.exports;
666
667var module={};
668
669(()=>{var e={446:()=>{!function(e){if(!e.hasInitialised){var t={escapeRegExp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},hasClass:function(e,t){var i=" ";return 1===e.nodeType&&(i+e.className+i).replace(/[\n\t]/g,i).indexOf(i+t+i)>=0},addClass:function(e,t){e.className+=" "+t},removeClass:function(e,t){var i=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");e.className=e.className.replace(i,"")},interpolateString:function(e,t){return e.replace(/{{([a-z][a-z0-9\-_]*)}}/gi,(function(e){return t(arguments[1])||""}))},getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"=");return t.length<2?void 0:t.pop().split(";").shift()}
vendor: 6,200 bytes, line 669
669,setCookie:function(e,t,i,n,o,s){var r=new Date;r.setHours(r.getHours()+24*(i||365));var a=[e+"="+t,"expires="+r.toUTCString(),"path="+(o||"/")];n&&a.push("domain="+n),s&&a.push("secure"),document.cookie=a.join(";")},deepExtend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(i in e&&this.isPlainObject(e[i])&&this.isPlainObject(t[i])?this.deepExtend(e[i],t[i]):e[i]=t[i]);return e},throttle:function(e,t){var i=!1;return function(){i||(e.apply(this,arguments),i=!0,setTimeout((function(){i=!1}),t))}},hash:function(e){var t,i,n=0;if(0===e.length)return n;for(t=0,i=e.length;t<i;++t)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},normaliseHex:function(e){return"#"==e[0]&&(e=e.substr(1)),3==e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e},getContrast:function(e){return e=this.normaliseHex(e),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),i=38+(t>>16),n=38+(t>>8&255),o=38+(255&t);return"#"+(16777216+65536*(i<255?i<1?0:i:255)+256*(n<255?n<1?0:n:255)+(o<255?o<1?0:o:255)).toString(16).slice(1)},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(e){return"object"==typeof e&&null!==e&&e.constructor==Object},traverseDOMPath:function(e,i){return e&&e.parentNode?t.hasClass(e,i)?e:this.traverseDOMPath(e.parentNode,i):null}};e.status={deny:"deny",allow:"allow",dismiss:"dismiss"},e.transitionEnd=function(){var e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var i in t)if(t.hasOwnProperty(i)&&void 0!==e.style[i+"ransition"])return t[i];return""}(),e.hasTransition=!!e.transitionEnd;var i=Object.keys(e.status).map(t.escapeRegExp);e.customStyles={},e.Popup=function(){var n={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365,secure:!1},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(e){},onStatusChange:function(e,t){},onRevokeChoice:function(){},onNoCookieLaw:function(e,t){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:"https://www.cookiesandyou.com",close:"&#x274c;",target:"_blank",policy:"Cookie Policy"},elements:{header:'<span class="cc-header">{{header}}</span>&nbsp;',message:'<span id="cookieconsent:desc" class="cc-message">{{message}}</span>',messagelink:'<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" rel="noopener noreferrer nofollow" target="{{target}}">{{link}}</a></span>',dismiss:'<a aria-label="dismiss cookie message" role=button tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}</a>',allow:'<a aria-label="allow cookies" role=button tabindex="0"  class="cc-btn cc-allow">{{allow}}</a>',deny:'<a aria-label="deny cookies" role=button tabindex="0" class="cc-btn cc-deny">{{deny}}</a>',link:'<a aria-label="learn more about cookies" role=button tabindex="0" class="cc-link" href="{{href}}" rel="noopener noreferrer nofollow" target="{{target}}">{{link}}</a>',close:'<span aria-label="dismiss cookie message" role=button tabindex="0" class="cc-close">{{close}}</span>'},window:'<div role="dialog" aria-live="polite" aria-label="cookieconsent" aria-describedby="cookieconsent:desc" class="cc-window {{classes}}">\x3c!--googleoff: all--\x3e{{children}}\x3c!--googleon: all--\x3e</div>',revokeBtn:'<div class="cc-revoke {{classes}}">{{policy}}</div>',compliance:{info:'<div class="cc-compliance">{{dismiss}}</div>',"opt-in":'<div class="cc-compliance cc-highlight">{{deny}}{{allow}}</div>',"opt-out":'<div class="cc-compliance cc-highlight">{{deny}}{{allow}}</div>'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,dismissOnWindowClick:!1,ignoreClicksFrom:["cc-revoke","cc-btn"],autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};function o(){this.initialise.apply(this,arguments)}function s(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function r(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function a(){var e=this.options.position.split("-"),t=[];return e.forEach((function(e){t.push("cc-"+e)})),t}function c(n){var o=this.options,s=document.createElement("div"),r=o.container&&1===o.container.nodeType?o.container:document.body;s.innerHTML=n;var a=s.children[0];return a.style.display="none",t.hasClass(a,"cc-window")&&e.hasTransition&&t.addClass(a,"cc-invisible"),this.onButtonClick=function(n){var o=t.traverseDOMPath(n.target,"cc-btn")||n.target;if(t.hasClass(o,"cc-btn")){var s=o.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),r=s&&s[1]||!1;r&&(this.setStatus(r),this.close(!0))}t.hasClass(o,"cc-close")&&(this.setStatus(e.status.dismiss),this.close(!0)),t.hasClass(o,"cc-revoke")&&this.revokeChoice()}.bind(this),a.addEventListener("click",this.onButtonClick),o.autoAttach&&(r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a)),a}function l(e){return"000000"==(e=t.normaliseHex(e))?"#222":t.getLuminance(e)}function u(e,t){for(var i=0,n=e.length;i<n;++i){var o=e[i];if(o instanceof RegExp&&o.test(t)||"string"==typeof o&&o.length&&o===t)return!0}return!1}return o.prototype.initialise=function(i){this.options&&this.destroy(),t.deepExtend(this.options={},n),t.isPlainObject(i)&&t.deepExtend(this.options,i),function(){var t=this.options.onInitialise.bind(this);if(!window.navigator.cookieEnabled)return t(e.status.deny),!0;if(window.CookiesOK||window.navigator.CookiesOK)return t(e.status.allow),!0;var i=Object.keys(e.status),n=this.getStatus(),o=i.indexOf(n)>=0;return o&&t(n),o}
669.call(this)&&(this.options.enabled=!1),u(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),u(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var o=this.options.window.replace("{{classes}}",function(){var i=this.options,n="top"==i.position||"bottom"==i.position?"banner":"floating";t.isMobile()&&(n="floating");var o=["cc-"+n,"cc-type-"+i.type,"cc-theme-"+i.theme];return i.static&&o.push("cc-static"),o.push.apply(o,a.call(this)),function(i){var n=t.hash(JSON.stringify(i)),o="cc-color-override-"+n,s=t.isPlainObject(i);return this.customStyleSelector=s?o:null,s&&function(i,n,o){if(e.customStyles[i])++e.customStyles[i].references;else{var s={},r=n.popup,a=n.button,c=n.highlight;r&&(r.text=r.text?r.text:t.getContrast(r.background),r.link=r.link?r.link:r.text,s[o+".cc-window"]=["color: "+r.text,"background-color: "+r.background],s[o+".cc-revoke"]=["color: "+r.text,"background-color: "+r.background],s[o+" .cc-link,"+o+" .cc-link:active,"+o+" .cc-link:visited"]=["color: "+r.link],a&&(a.text=a.text?a.text:t.getContrast(a.background),a.border=a.border?a.border:"transparent",s[o+" .cc-btn"]=["color: "+a.text,"border-color: "+a.border,"background-color: "+a.background],a.padding&&s[o+" .cc-btn"].push("padding: "+a.padding),"transparent"!=a.background&&(s[o+" .cc-btn:hover, "+o+" .cc-btn:focus"]=["background-color: "+(a.hover||l(a.background))]),c?(c.text=c.text?c.text:t.getContrast(c.background),c.border=c.border?c.border:"transparent",s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+c.text,"border-color: "+c.border,"background-color: "+c.background]):s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text]));var u=document.createElement("style");document.head.appendChild(u),e.customStyles[i]={references:1,element:u.sheet};var h=-1;for(var p in s)s.hasOwnProperty(p)&&u.sheet.insertRule(p+"{"+s[p].join(";")+"}",++h)}}(n,i,"."+o),s}.call(this,this.options.palette),this.customStyleSelector&&o.push(this.customStyleSelector),o}.call(this).join(" ")).replace("{{children}}",function(){var e={},i=this.options;i.showLink||(i.elements.link="",i.elements.messagelink=i.elements.message),Object.keys(i.elements).forEach((function(n){e[n]=t.interpolateString(i.elements[n],(function(e){var t=i.content[e];return e&&"string"==typeof t&&t.length?t:""}))}));var n=i.compliance[i.type];n||(n=i.compliance.info),e.compliance=t.interpolateString(n,(function(t){return e[t]}));var o=i.layouts[i.layout];return o||(o=i.layouts.basic),t.interpolateString(o,(function(t){return e[t]}))}.call(this)),s=this.options.overrideHTML;if("string"==typeof s&&s.length&&(o=s),this.options.static){var r=c.call(this,'<div class="cc-grower">'+o+"</div>");r.style.display="",this.element=r.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=c.call(this,o);(function(){var i=this.setStatus.bind(this),n=this.close.bind(this),o=this.options.dismissOnTimeout;"number"==typeof o&&o>=0&&(this.dismissTimeout=window.setTimeout((function(){i(e.status.dismiss),n(!0)}),Math.floor(o)));var s=this.options.dismissOnScroll;if("number"==typeof s&&s>=0){var r=function t(o){window.pageYOffset>Math.floor(s)&&(i(e.status.dismiss),n(!0),window.removeEventListener("scroll",t),this.onWindowScroll=null)};this.options.enabled&&(this.onWindowScroll=r,window.addEventListener("scroll",r))}var a=this.options.dismissOnWindowClick,c=this.options.ignoreClicksFrom;if(a){var l=function(o){for(var s=!1,r=o.path.length,a=c.length,u=0;u<r;u++)if(!s)for(var h=0;h<a;h++)s||(s=t.hasClass(o.path[u],c[h]));s||(i(e.status.dismiss),n(!0),window.removeEventListener("click",l),window.removeEventListener("touchend",l),this.onWindowClick=null)}.bind(this);this.options.enabled&&(this.onWindowClick=l,window.addEventListener("click",l),window.addEventListener("touchend",l))}}).call(this),function(){if("info"!=this.options.type&&(this.options.revokable=!0),t.isMobile()&&(this.options.animateRevokable=!1),this.options.revokable){var e=a.call(this);this.options.animateRevokable&&e.push("cc-animate"),this.customStyleSelector&&e.push(this.customStyleSelector);var i=this.options.revokeBtn.replace("{{classes}}",e.join(" ")).replace("{{policy}}",this.options.content.policy);this.revokeBtn=c.call(this,i);var n=this.revokeBtn;if(this.options.animateRevokable){var o=t.throttle((function(e){var i=!1,o=window.innerHeight-20;
vendor: 4,237 bytes, line 669
669t.hasClass(n,"cc-top")&&e.clientY<20&&(i=!0),t.hasClass(n,"cc-bottom")&&e.clientY>o&&(i=!0),i?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")}),200);this.onMouseMove=o,window.addEventListener("mousemove",o)}}}.call(this),this.options.autoOpen&&this.autoOpen()},o.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onWindowClick&&(window.removeEventListener("click",this.onWindowClick),this.onWindowClick=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,function(i){if(t.isPlainObject(i)){var n=t.hash(JSON.stringify(i)),o=e.customStyles[n];if(o&&!--o.references){var s=o.element.ownerNode;s&&s.parentNode&&s.parentNode.removeChild(s),e.customStyles[n]=null}}}(this.options.palette),this.options=null},o.prototype.open=function(t){if(this.element)return this.isOpen()||(e.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},o.prototype.close=function(t){if(this.element)return this.isOpen()&&(e.hasTransition?this.fadeOut():this.element.style.display="none",t&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},o.prototype.fadeIn=function(){var i=this.element;if(e.hasTransition&&i&&(this.afterTransition&&r.call(this,i),t.hasClass(i,"cc-invisible"))){if(i.style.display="",this.options.static){var n=this.element.clientHeight;this.element.parentNode.style.maxHeight=n+"px"}this.openingTimeout=setTimeout(s.bind(this,i),20)}},o.prototype.fadeOut=function(){var i=this.element;e.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),s.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=r.bind(this,i),i.addEventListener(e.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},o.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!e.hasTransition||!t.hasClass(this.element,"cc-invisible"))},o.prototype.toggleRevokeButton=function(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")},o.prototype.revokeChoice=function(e){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),e||this.autoOpen()},o.prototype.hasAnswered=function(t){return Object.keys(e.status).indexOf(this.getStatus())>=0},o.prototype.hasConsented=function(t){var i=this.getStatus();return i==e.status.allow||i==e.status.dismiss},o.prototype.autoOpen=function(e){!this.hasAnswered()&&this.options.enabled?this.open():this.hasAnswered()&&this.options.revokable&&this.toggleRevokeButton(!0)},o.prototype.setStatus=function(i){var n=this.options.cookie,o=t.getCookie(n.name),s=Object.keys(e.status).indexOf(o)>=0;Object.keys(e.status).indexOf(i)>=0?(t.setCookie(n.name,i,n.expiryDays,n.domain,n.path,n.secure),this.options.onStatusChange.call(this,i,s)):this.clearStatus()},o.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},o.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},o}(),e.Location=function(){var e={timeout:5e3,services:["ipinfo"],serviceDefinitions:{ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{var i=JSON.parse(t);return i.error?s(i):{code:i.country}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},ipinfodb:function(e){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return"ERROR"==i.statusCode?s({error:i.statusMessage}):{code:i.countryCode}}
669catch(e){return s({error:"Invalid response ("+e+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){window.geoip2?geoip2.country((function(t){try{e({code:t.country.iso_code})}catch(t){e(s(t))}}),(function(t){e(s(t))})):e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};function i(i){t.deepExtend(this.options={},e),t.isPlainObject(i)&&t.deepExtend(this.options,i),this.currentServiceIndex=-1}function n(e,t,i){var n,o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=o.onload=function(){var e=o.readyState;clearTimeout(n),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),n=setTimeout((function(){t.done=!0,t(),o.onreadystatechange=o.onload=null}),i)}function o(e,t,i,n,o){var s=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(s.open(n?"POST":"GET",e,1),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(var r=0,a=o.length;r<a;++r){var c=o[r].split(":",2);s.setRequestHeader(c[0].replace(/^\s+|\s+$/g,""),c[1].replace(/^\s+|\s+$/g,""))}"function"==typeof t&&(s.onreadystatechange=function(){s.readyState>3&&t(s)}),s.send(n)}function s(e){return new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error)}return i.prototype.getNextService=function(){var e;do{e=this.getServiceByIdx(++this.currentServiceIndex)}while(this.currentServiceIndex<this.options.services.length&&!e);return e},i.prototype.getServiceByIdx=function(e){var i=this.options.services[e];if("function"==typeof i){var n=i();return n.name&&t.deepExtend(n,this.options.serviceDefinitions[n.name](n)),n}return"string"==typeof i?this.options.serviceDefinitions[i]():t.isPlainObject(i)?this.options.serviceDefinitions[i.name](i):null},i.prototype.locate=function(e,t){var i=this.getNextService();i?(this.callbackComplete=e,this.callbackError=t,this.runService(i,this.runNextServiceOnError.bind(this))):t(new Error("No services to run"))},i.prototype.setupUrl=function(e){var t=this.getCurrentServiceOpts();return e.url.replace(/\{(.*?)\}/g,(function(i,n){if("callback"===n){var o="callback"+Date.now();return window[o]=function(t){e.__JSONP_DATA=JSON.stringify(t)},o}if(n in t.interpolateUrl)return t.interpolateUrl[n]}))},i.prototype.runService=function(e,t){var i=this;e&&e.url&&e.callback&&(e.isScript?n:o)(this.setupUrl(e),(function(n){var o=n?n.responseText:"";e.__JSONP_DATA&&(o=e.__JSONP_DATA,delete e.__JSONP_DATA),i.runServiceCallback.call(i,t,e,o)}),this.options.timeout,e.data,e.headers)},i.prototype.runServiceCallback=function(e,t,i){var n=this,o=t.callback((function(t){o||n.onServiceResult.call(n,e,t)}),i);o&&this.onServiceResult.call(this,e,o)},i.prototype.onServiceResult=function(e,t){t instanceof Error||t&&t.error?e.call(this,t,null):e.call(this,null,t)},i.prototype.runNextServiceOnError=function(e,t){if(e){this.logError(e);var i=this.getNextService();i?this.runService(i,this.runNextServiceOnError.bind(this)):this.completeService.call(this,this.callbackError,new Error("All services failed"))}else this.completeService.call(this,this.callbackComplete,t)},i.prototype.getCurrentServiceOpts=function(){var e=this.options.services[this.currentServiceIndex];return"string"==typeof e?{name:e}:"function"==typeof e?e():t.isPlainObject(e)?e:{}},i.prototype.completeService=function(e,t){this.currentServiceIndex=-1,e&&e(t)},i.prototype.logError=function(e){var t=this.currentServiceIndex,i=this.getServiceByIdx(t);console.warn("The service["+t+"] ("+i.url+") responded with the following error",e)},i}(),e.Law=function(){var e={regionalLaw:!0,hasLaw:["AT","BE","BG","HR","CZ","CY","DK","EE","FI","FR","DE","EL","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","SK","ES","SE","GB","UK","GR","EU"],revokable:["HR","CY","DK","EE","FR","DE","LV","LT","NL","PT","ES"],explicitAction:["HR","IT","ES"]};function i(e){this.initialise.apply(this,arguments)}return i.prototype.initialise=function(i){t.deepExtend(this.options={},e),t.isPlainObject(i)&&t.deepExtend(this.options,i)},i.prototype.get=function(e){var t=this.options;return{hasLaw:t.hasLaw.indexOf(e)>=0,revokable:t.revokable.indexOf(e)>=0,explicitAction:t.explicitAction.indexOf(e)>=0}},i.prototype.applyLaw=function(e,t){var i=this.get(t);return i.hasLaw||(e.enabled=!1,"function"==typeof e.onNoCookieLaw&&e.onNoCookieLaw(t,i)),this.options.regionalLaw&&(i.revokable&&(e.revokable=!0),i.explicitAction&&(e.dismissOnScroll=!1,e.dismissOnTimeout=!1)),e},i}(),e.initialise=function(i,n,o){var s=new e.Law(i.law);n||(n=function(){}),o||(o=function(){});var r=Object.keys(e.status),a=t.getCookie("cookieconsent_status");r.indexOf(a)>=0?n(new e.Popup(i)):e.getCountryCode(i,(function(t){delete i.law,delete i.location,t.code&&(i=s.applyLaw(i,t.code)),n(new e.Popup(i))}),(function(t){delete i.law,delete i.location,o(t,new e.Popup(i))}))},e.getCountryCode=function(t,i,n){t.law&&t.law.countryCode?i({code:t.law.countryCode}):t.location?new e.Location(t.location).locate((function(e){i(e||{})}),n):i({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{})}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,i),s.exports}i.n=e=>
669{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";i.r(n);const e=flarum.core.compat["forum/app"];var t=i.n(e);i(446),t().initializers.add("fof-cookie-consent",(function(){$(document).ready((function(){var e=function(e){return t().forum.attribute("fof-cookie-consent."+e)},i={theme:e("ccTheme"),content:{message:e("consentText"),dismiss:e("buttonText"),link:e("learnMoreLinkText"),href:e("learnMoreLinkUrl")}};"no_css"!==e("ccTheme")&&(i.palette={popup:{background:e("backgroundColor")||void 0,text:e("textColor")||void 0},button:{background:e("buttonBackgroundColor")||void 0,text:e("buttonTextColor")||void 0}});try{cookieconsent.initialise(i)}catch(e){console.error("An error occurred initializing the Cookie Consent library:",e)}delete window.cookieconsent}))}))})(),module.exports=n})();
670
671
672flarum.extensions['fof-cookie-consent']=module.exports;
673
674var module={};
675
676/*! For license information please see forum.js.LICENSE.txt */
677(()=>{var t={493:t=>{"use strict";t.exports=flarum.extensions["fof-user-directory"]},24:(t,e,r)=>{var n=r(735).default;function o(){"use strict";t.exports=o=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},s=Object.prototype,a=s.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function m(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{m({},"")}catch(e){m=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:N(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var h="suspendedStart",b="suspendedYield",v="executing",w="completed",y={};function g(){}function A(){}function x(){}var _={};m(_,u,(function(){return this}));var P=Object.getPrototypeOf,S=P&&P(P(T([])));S&&S!==s&&a.call(S,u)&&(_=S);var L=x.prototype=g.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){m(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,s,i,c){var u=d(t[o],t,s);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function s(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(s,s):s()}})}function N(t,r,n){var o=h;return function(s,a){if(o===v)throw new Error("Generator is already running");if(o===w){if("throw"===s)throw a;return{value:e,done:!0}}for(n.method=s,n.arg=a;;){var i=n.delegate;if(i){var c=B(i,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=w,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var u=d(t,r,n);if("normal"===u.type){if(o=n.done?w:b,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=w,n.method="throw",n.arg=u.arg)}}}function B(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,B(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var s=d(o,t.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,y;var a=s.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function r(){for(;++o<t.length;)if(a.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return s.next=s}}throw new TypeError(n(t)+" is not iterable")}return A.prototype=x,i(L,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:A,configurable:!0}),A.displayName=m(x,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===A||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,m(t,f,"GeneratorFunction")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},O(k.prototype),m(k.prototype,l,(function(){return this})),r.AsyncIterator=k,r.async=function(t,e,n,o,s){void 0===s&&(s=Prom
677ise);var a=new k(p(t,e,n,o),s);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(L),m(L,f,"Generator"),m(L,u,(function(){return this})),m(L,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return i.type="throw",i.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],i=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var c=a.call(s,"catchLoc"),u=a.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):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),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},r}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},735:t=>{function e(r){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(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},183:(t,e,r)=>{var n=r(24)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,r),s.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{components:()=>vt,extend:()=>Ot});const t=flarum.core.compat["forum/app"];var e=r.n(t);const o=flarum.core.compat["common/extend"],s=flarum.core.compat["forum/components/IndexPage"];var a=r.n(s);const i=flarum.core.compat["common/components/Dropdown"];var c=r.n(i);const u=flarum.core.compat["common/components/Button"];var l=r.n(u);const f=flarum.core.compat["forum/states/DiscussionListState"];var p=r.n(f);const d=flarum.core.compat["forum/components/DiscussionComposer"];var h=r.n(d);function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function v(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,b(t,e)}const w=flarum.core.compat["forum/components/Notification"];var y=r.n(w),g=function(t){function r(){return t.apply(this,arguments)||this}v(r,t);var n=r.prototype;return n.icon=function(){return"fas fa-comment-dots"},n.href=function(){var t=this.attrs.notification.subject();
677return e().route.discussion(t)},n.content=function(){return e().translator.trans("fof-best-answer.forum.notification.content")},n.excerpt=function(){return null},r}(y());const A=flarum.core.compat["forum/utils/PostControls"];var x=r.n(A);const _=flarum.core.compat["forum/components/DiscussionPage"];var P=r.n(_);const S=flarum.core.compat["forum/components/CommentPost"];var L=r.n(S);const O=flarum.core.compat["forum/components/Post"];var k=r.n(O);const N=flarum.core.compat["forum/components/PostMeta"];var B=r.n(N);const j=flarum.core.compat["common/helpers/username"];var E=r.n(j);const C=flarum.core.compat["common/helpers/userOnline"];var T=r.n(C);const I=flarum.core.compat["common/components/Link"];var D=r.n(I);const U=flarum.core.compat["common/utils/classList"];var M=r.n(U);const R=flarum.core.compat["common/Component"];var G=r.n(R);const q=flarum.core.compat["common/helpers/icon"];var F=r.n(q);const H=flarum.core.compat["common/helpers/humanTime"];var Q=r.n(H);const Y=flarum.core.compat["common/utils/ItemList"];var z=r.n(Y),J=function(t){function r(){return t.apply(this,arguments)||this}v(r,t);var n=r.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e);var r=this.attrs,n=r.post,o=r.discussion;this.post=n,this.discussion=o},n.view=function(){return m("li",{className:"Post--BestAnswer"},this.items().toArray())},n.getSetTime=function(t){if(null!==t.bestAnswerSetAt())return Q()(t.bestAnswerSetAt())},n.items=function(){var t=this,r=new(z());return r.add("post",this.post?m("span",null,F()("fas fa-check"),e().translator.trans("fof-best-answer.forum.best_answer_button")):m(D(),{href:e().route.post(this.post),"data-number":this.post.number()},F()("fas fa-check"),e().translator.trans("fof-best-answer.forum.best_answer_button"))),r.add("user",m("span",{className:"BestAnswer--User"},e().translator.trans("fof-best-answer.forum.best_answer_label",{user:this.discussion.bestAnswerUser(),time_set:this.getSetTime(this.discussion),a:m("a",{onclick:function(){return m.route.set(e().route.user(t.discussion.bestAnswerUser()))}})}))),r},r}(G());const K=flarum.core.compat["common/models/Discussion"];var V=r.n(K);const W=flarum.core.compat["common/components/Badge"];var X=function(t){function r(){return t.apply(this,arguments)||this}return v(r,t),r.initAttrs=function(t){t.type="bestAnswer",t.icon="fas fa-check",t.label=e().translator.trans("fof-best-answer.forum.answered_badge")},r}(r.n(W)()),Z=function(t){function r(){return t.apply(this,arguments)||this}v(r,t);var n=r.prototype;return n.icon=function(){return"fas fa-check"},n.href=function(){var t=this.attrs.notification.subject();return e().route.discussion(t)},n.content=function(){var t=this.attrs.notification.fromUser();return e().translator.trans("fof-best-answer.forum.notification.awarded",{user:t})},n.excerpt=function(){return null},r}(y()),$=function(t){function r(){return t.apply(this,arguments)||this}v(r,t);var n=r.prototype;return n.icon=function(){return"fas fa-check"},n.href=function(){var t=this.attrs.notification.subject();return e().route.discussion(t)},n.content=function(){var t=this.attrs.notification.fromUser();return e().translator.trans("fof-best-answer.forum.notification.best_answer_in_discussion",{user:t})},n.excerpt=function(){return null},r}(y());const tt=flarum.core.compat["forum/components/NotificationGrid"];var et=r.n(tt);const rt=flarum.core.compat["forum/components/UserCard"];var nt=r.n(rt);function ot(){return ot=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ot.apply(this,arguments)}const st=flarum.core.compat["forum/components/Search"];var at=r.n(st);function it(t,e,r,n,o,s,a){try{var i=t[s](a),c=i.value}catch(t){return void r(t)}i.done?e(c):Promise.resolve(c).then(n,o)}var ct=r(183),ut=r.n(ct);const lt=flarum.core.compat["common/helpers/highlight"];var ft=r.n(lt);const mt=flarum.core.compat["common/components/LinkButton"];var pt=r.n(mt);const dt=flarum.core.compat["tags/helpers/tagsLabel"];var ht=r.n(dt),bt=function(){function t(){this.results=new Map}
677var r=t.prototype;return r.search=function(){var t,r=(t=ut().mark((function t(r){var n,o=this;return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=r.toLowerCase(),this.results.set(r,[]),n={filter:{q:r+" is:solved"},page:{limit:3},include:"mostRelevantPost,bestAnswerPost,tags"},t.abrupt("return",e().store.find("discussions",n).then((function(t){o.results.set(r,t),m.redraw()})));case 4:case"end":return t.stop()}}),t,this)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){it(s,n,o,a,i,"next",t)}function i(t){it(s,n,o,a,i,"throw",t)}a(void 0)}))});return function(t){return r.apply(this,arguments)}}(),r.view=function(t){t=t.toLowerCase();var r=(this.results.get(t)||[]).map((function(r){var n,o,s=r.bestAnswerPost(),a=r.mostRelevantPost(),i=r.tags();return m("li",{className:"SolutionSearchResult DiscussionSearchResult","data-index":"discussions"+r.id()},m(D(),{href:e().route.discussion(r,s&&s.number()||0)},m("div",{className:"SolutionSearchResult-tags"},ht()(i)),m("div",{className:"DiscussionSearchResult-title"},ft()(r.title(),t)),!!a&&m("div",{className:"DiscussionSearchResult-excerpt"},ft()(null!=(n=a.contentPlain())?n:"",t,100)),!!s&&m("div",{className:"DiscussionSearchResult-excerpt SolutionSearchResult-bestAnswer"},ft()(null!=(o=s.contentPlain())?o:"",t,100))))}));return[m("li",{className:"Dropdown-header"},m(X,null)," ",e().translator.trans("fof-best-answer.forum.search.discussions_solutions_heading")),m("li",null,m(pt(),{icon:"fas fa-search",href:e().route("index",{q:t+" is:solved"})},e().translator.trans("fof-best-answer.forum.search.all_discussions_solutions_button",{query:t})))].concat(r)},t}(),vt={SelectBestAnswerItem:J,SolutionSearchSource:bt};const wt=flarum.core.compat["common/extenders"];var yt=r.n(wt);const gt=flarum.core.compat["tags/models/Tag"];var At=r.n(gt);const xt=[new(yt().Model)(At()).attribute("isQnA").attribute("reminders")],_t=flarum.core.compat["common/models/User"];var Pt=r.n(_t);const St=flarum.core.compat["common/Model"];var Lt=r.n(St);const Ot=[].concat(xt,[new(yt().Model)(V()).hasOne("bestAnswerPost").hasOne("bestAnswerUser").attribute("hasBestAnswer").attribute("canSelectBestAnswer").attribute("bestAnswerSetAt",Lt().transformDate),new(yt().Model)(Pt()).attribute("bestAnswerCount")]);e().initializers.add("fof/best-answer",(function(){var t,n,s,i,u,f;e().notificationComponents.selectBestAnswer=g,e().notificationComponents.awardedBestAnswer=Z,e().notificationComponents.bestAnswerInDiscussion=$,(0,o.extend)(V().prototype,"badges",(function(t){this.hasBestAnswer()&&!t.has("hidden")&&t.add("bestAnswer",m(X,null))})),t=function(t,r){return r.isHidden()||1===r.number()||!t.canSelectBestAnswer()||!e().session.user},n=function(t){return!e().forum.attribute("canSelectBestAnswerOwnPost")&&t.user()&&t.user().id()===e().session.user.id()},s=function(t,e){return t.hasBestAnswer()&&t.bestAnswerPost()&&t.bestAnswerPost().id()===e.id()},i=function(t){return e().translator.trans(t?"fof-best-answer.forum.remove_best_answer":"fof-best-answer.forum.this_best_answer")},u=function(t,r,n){return t.save({bestAnswerPostId:r?n.id():0,bestAnswerUserId:e().session.user.id(),relationships:r?{bestAnswerPost:n,bestAnswerUser:e().session.user}:{bestAnswerPost:null}},{params:{include:"tags"}}).then((function(){r||(delete t.data.relationships.bestAnswerPost,delete t.data.relationships.bestAnswerUser),e().current.matches(P())&&e().current.get("stream").update(),m.redraw(),r&&m.route.set(e().route.discussion(t))}))},(0,o.extend)(x(),"moderationControls",(function(r,o){if(!e().forum.attribute("useAlternativeBestAnswerUi")){var a=o.discussion(),c=s(a,o);o.pushAttributes({isBestAnswer:c}),"comment"===o.contentType()&&(t(a,o)||n(o)||!e().current.matches(P())||r.add("bestAnswer",l().component({icon:"fa"+(c?"s":"r")+" fa-comment-dots",onclick:function(){u(a,c=!c,o).finally((function(){c=s(a,o)}))}},i(c))))}})),(0,o.extend)(L().prototype,"actionItems",(function(r){if(e().forum.attribute("useAlternativeBestAnswerUi")){var o=this.attrs.post,a=this.attrs.post.discussion(),c=s(a,o),f=!1!==a.bestAnswerPost();o.pushAttributes({isBestAnswer:c}),t(a,o)||n(o)||!e().current.matches(P())||r.add("bestAnswer",l().component({className:"Button Button--"+(!f||c?"primary":"link"),onclick:function(){f=!f,u(a,c=!c,o).finally((function(){f=a.hasBestAnswer()&&!1!==a.bestAnswerPost(),c=s(a,o)}))}},i(c)))}})),(0,o.extend)(L().prototype,"headerItems",(function(t){var e=this.attrs.post,r=e.discussion();null!=r&&r.hasBestAnswer()&&r.bestAnswerPost()&&r.bestAnswerPost().id()===e.id()&&!e.isHidden()&&t.add("isBestAnswer",J.component({post:e,discussion:e.discussion()}))})),(0,o.extend)(L().prototype,"footerItems",(function(t){var r=this.attrs.post,n=r.discu
677ssion(),o=n.hasBestAnswer()&&n.bestAnswerPost(),s=e().forum.attribute("fof-best-answer.show_max_lines");if(o&&!o.isHidden()&&1===r.number()&&!r.isHidden()){var a=o.user();t.add("bestAnswerPost",m("div",{className:"CommentPost",onclick:function(){return e().current.get("stream").goToNumber(o.number())}},m("div",{className:"Post-header"},m("ul",null,m("li",{className:"item-user"},m("div",{className:"PostUser"},a&&T()(a),m("h3",null,a?m(D(),{href:e().route.user(a)},E()(a)):E()(a)))),o.discussion()&&m("li",{className:"item-meta"},B().component({post:o})),J.component({post:o,discussion:n}))),m("div",{className:M()("Post-body",s>0&&"Post-body--truncate"),style:{"--max-lines":s}},m.trust(o.contentHtml()))),-10)}})),(0,o.extend)(k().prototype,"elementAttrs",(function(t){var e=this.attrs.post,r=e.discussion();null!=r&&r.hasBestAnswer()&&r.bestAnswerPost()&&r.bestAnswerPost().id()===e.id()&&!e.isHidden()&&(t.className?t.className+=" Post--bestAnswer":t.className="Post--bestAnswer")})),(0,o.extend)(nt().prototype,"infoItems",(function(t){var r=this.attrs.user;t.add("best-answer-count",m("span",{className:"UserCard-bestAnswerCount"},F()("fas fa-check"),e().translator.trans("fof-best-answer.forum.user.best-answer-count",{count:r.bestAnswerCount()})),55)})),(f=r(493))&&(0,o.override)(f.SortMap.prototype,"sortMap",(function(t){return ot({},t(),{most_best_answers:"-bestAnswerCount",least_best_answers:"bestAnswerCount"})})),(0,o.extend)(et().prototype,"notificationTypes",(function(t){t.add("awardedBestAnswer",{name:"awardedBestAnswer",icon:"fas fa-check",label:e().translator.trans("fof-best-answer.forum.notification.preferences.awarded_best_answer")}),t.add("bestAnswerInDiscussion",{name:"bestAnswerInDiscussion",icon:"fas fa-check",label:e().translator.trans("fof-best-answer.forum.notification.preferences.best_answer_in_discussion")}),t.add("selectBestAnswer",{name:"selectBestAnswer",icon:"fas fa-stopwatch",label:e().translator.trans("fof-best-answer.forum.notification.preferences.select_best_answer")})})),(0,o.extend)(at().prototype,"sourceItems",(function(t){e().forum.attribute("solutionSearchEnabled")&&t.add("solution",new bt,110)})),(0,o.extend)(a().prototype,"sidebarItems",(function(t){var r=this.currentTag();if(null!=r&&null!=r.isQnA&&r.isQnA()){var n=e().forum.attribute("canStartDiscussion")||!e().session.user,o=t.get("newDiscussion");o.children=e().translator.trans(n?"fof-best-answer.forum.index.ask_question":"fof-best-answer.forum.index.cannot_ask_question"),t.has("startDiscussion")&&t.setContent("startDiscussion",o)}})),(0,o.extend)(a().prototype,"viewItems",(function(t){if(e().forum.attribute("showBestAnswerFilterUi")){var r=this.currentTag();if(null!=r&&null!=r.isQnA&&r.isQnA()){var n=["all","solved","unsolved"],o=e().discussions.bestAnswer;t.add("solved-filter",c().component({buttonClassName:"Button",label:e().translator.trans("fof-best-answer.forum.filter."+(n[o]||Object.keys(n).map((function(t){return n[t]}))[0])+"_label"),accessibleToggleLabel:e().translator.trans("fof-best-answer.forum.filter.accessible_label")},Object.keys(n).map((function(t){var r=n[t],s=(o||Object.keys(n)[0])===t;return l().component({icon:!s||"fas fa-check",active:s,onclick:function(){e().discussions.bestAnswer=t,"0"===t&&delete e().discussions.bestAnswer,e().discussions.refresh()}},e().translator.trans("fof-best-answer.forum.filter."+r+"_label"))}))))}else e().discussions.bestAnswer&&(delete e().discussions.bestAnswer,e().discussions.refresh())}})),(0,o.extend)(p().prototype,"requestParams",(function(t){if(e().discussions.bestAnswer){var r="2"===e().discussions.bestAnswer?"-":"";t.filter[r+"solved-discussions"]=!0,t.filter.q&&(t.filter.q+=" "+r+"is:solved")}})),(0,o.extend)(h().prototype,"headerItems",(function(t){var r=this.composer.fields.tags;void 0!==r&&r.some((function(t){return t.isQnA()}))&&(this.attrs.titlePlaceholder=e().translator.trans("fof-best-answer.forum.composer.titlePlaceholder"),t.has("discussionTitle")&&t.setContent("discussionTitle",m("h3",null,m("input",{className:"FormControl",bidi:this.title,placeholder:this.attrs.titlePlaceholder,disabled:!!this.attrs.disabled,onkeydown:this.onkeydown.bind(this)}))))}
677))}))})(),module.exports=n})();
678
679
680flarum.extensions['fof-best-answer']=module.exports;
681
682var module={};
683
684(()=>{var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(e,a)=>{for(var o in a)t.o(a,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:a[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>P});const a=flarum.core.compat["forum/app"];var o=t.n(a);const s=flarum.core.compat["common/extend"],r=flarum.core.compat["common/components/Button"];var n=t.n(r);const i=flarum.core.compat["forum/utils/UserControls"];var l=t.n(i);function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function c(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}const p=flarum.core.compat["common/components/Modal"];var d=t.n(p);const f=flarum.core.compat["common/components/Switch"];var h=t.n(f),_=function(t){function e(){for(var e,a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(e=t.call.apply(t,[this].concat(o))||this).user=void 0,e.hardDeleteUser=void 0,e.hardDeleteDiscussions=void 0,e.hardDeletePosts=void 0,e.moveDiscussionsToQuarantine=void 0,e.reportToSfs=void 0,e}c(e,t);var a=e.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.user=this.attrs.user;var a=o().forum.attribute("fof-anti-spam")["default-options"];this.hardDeleteUser=a.deleteUser,this.hardDeleteDiscussions=a.deleteDiscussions,this.hardDeletePosts=a.deletePosts,this.moveDiscussionsToQuarantine=a.spamQuarantine,this.reportToSfs=a.reportToSfs},a.className=function(){return"HandleSpammerModal Modal--medium"},a.title=function(){return o().translator.trans("fof-anti-spam.forum.spammer_modal.title",{username:this.user.username()})},a.content=function(){var t=this,e=o().initializers.has("flarum-tags"),a=!!o().forum.attribute("fof-anti-spam").stopforumspam.enabled;return m("div",{className:"Modal-body"},m("div",{className:"Form"},m("p",{className:"helpText"},o().translator.trans("fof-anti-spam.forum.spammer_modal.intro")),m("div",{className:"Form-group"},m(h(),{state:this.hardDeleteDiscussions,onchange:function(e){t.hardDeleteDiscussions=e,m.redraw()}},o().translator.trans("fof-anti-spam.forum.spammer_modal.hard_delete_discussions_label")),m("p",{className:"helpText"},o().translator.trans("fof-anti-spam.forum.spammer_modal.hard_delete_discussions_help"))),m("div",{className:"Form-group"},m(h(),{state:this.hardDeletePosts,onchange:function(e){t.hardDeletePosts=e}},o().translator.trans("fof-anti-spam.forum.spammer_modal.hard_delete_posts_label")),m("p",{className:"helpText"},o().translator.trans("fof-anti-spam.forum.spammer_modal.hard_delete_posts_help"))),e&&!this.hardDeleteDiscussions&&m("div",{className:"Form-group"},m(h(),{state:this.moveDiscussionsToQuarantine,onchange:function(e){t.moveDiscussionsToQuarantine=e}},o().translator.trans("fof-anti-spam.forum.spammer_modal.move_discussions_tag_label")),m("p",{className:"helpText"},o().translator.trans("fof-anti-spam.forum.spammer_modal.move_discussions_tag_help"))),m("div",{className:"Form-group"},m(h(),{state:this.hardDeleteUser,onchange:function(e){t.hardDeleteUser=e}},o().translator.trans("fof-anti-spam.forum.spammer_modal.hard_delete_user_label")),m("p",{className:"helpText"},o().translator.trans("fof-anti-spam.forum.spammer_modal.hard_delete_user_help"))),a&&m("div",{className:"Form-group"},m(h(),{state:this.reportToSfs,onchange:function(e){t.reportToSfs=e}},o().translator.trans("fof-anti-spam.forum.spammer_modal.report_to_sfs_label")),m("p",{className:"helpText"},o().translator.trans("fof-anti-spam.forum.spammer_modal.report_to_sfs_help"))),m("div",{className:"Form-group"},m(n(),{className:"Button Button--primary",onclick:function(){return t.submitData()},loading:this.loading,disabled:this.loading},o().translator.trans("fof-anti-spam.forum.spammer_modal.process_button")))))},a.submitData=function(){var t=this;this.loading=!0;var e={options:{deletePosts:this.hardDeletePosts,deleteDiscussions:this.hardDeleteDiscussions,deleteUser:this.hardDeleteUser,moveDiscussionsToQuarantine:this.moveDiscussionsToQuarantine,reportToSfs:this.reportToSfs}};o().request({method:"POST",url:o().forum.attribute("apiUrl")+"/users/"+this.user.id()+"/spamblock",body:e}).then((function(){t.loading=!1,t.hide()}))},e}(d());const v=flarum.core.compat["common/extenders"];var b=t.n(v);const D=flarum.core.compat["common/models/User"];var g=t.n(D);const y=flarum.core.compat["common/Model"];var T=t.n(y),S=function(t){function e(){return t.apply(this,arguments)||this}c(e,t);var a=e.prototype;return a.ip=function(){return T().attribute("ip").call(this)},a.email=function(){return T().attribute("email").call(this)},a.username=function(){return T().attribute("username").call(this)},a.sfsData=function(){return T().attribute("sfsData").call(this)},a.provider=function(){return T().attribute("provider").call(this)},a.providerData=function(){return T().attribute("providerData").call(this)},a.attemptedAt=function(){return T().attribute("attemptedAt",T().transformDate).call(this)},e}(T());const N=[(new(b().Store)).add("blocked-registrations",S)],P=[].concat(N,[new(b().Model)(g()).attribute("canSpamblock")]);
684o().initializers.add("fof/anti-spam",(function(){(0,s.extend)(l(),"moderationControls",(function(t,e){e.canSpamblock()&&t.add("spammer",m(n(),{icon:"fas fa-pastafarianism",onclick:function(){o().modal.show(_,{user:e})}},o().translator.trans("fof-anti-spam.forum.user_controls.spammer_button")))}))}))})(),module.exports=e})();
685
686
687flarum.extensions['fof-anti-spam']=module.exports;
688
689var module={};
690
691(()=>{var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var a in t)e.o(t,a)&&!e.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:t[a]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};(()=>{"use strict";e.r(o);const t=flarum.core.compat["common/extend"],a=flarum.core.compat["forum/app"];var n=e.n(a);const r=flarum.core.compat["common/components/Page"];var g=e.n(r);n().initializers.add("fof-analytics",(function(){setTimeout((function(){n().data.googleTrackingCode&&"undefined"!=typeof gtag&&(gtag("config",n().data.googleTrackingCode),n().session.user&&gtag("config",n().data.googleTrackingCode,{user_id:n().session.user.id()}))}),0),(0,t.extend)(g().prototype,"oninit",(function(){n().data.googleTrackingCode&&!n().data.googleTrackingCode.startsWith("G-")&&"undefined"!=typeof gtag&&gtag("config",n().data.googleTrackingCode,{page_path:m.route.get()}),n().data.googleGTMCode&&"undefined"!=typeof gtagpush&&gtagpush({event:"custom_event",virtualpath:m.route.get()}),"undefined"!=typeof _paq&&(_paq.push(["setCustomUrl",m.route.get()]),_paq.push(["trackPageView"]))}))}))})(),module.exports=o})();
692
693
694flarum.extensions['fof-analytics']=module.exports;
695
696var module={};
697
698(()=>{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"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o),t.d(o,{extend:()=>j});const e=flarum.core.compat["forum/app"];var n=t.n(e);const s=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/states/DiscussionListState"];var i=t.n(r);const a=flarum.core.compat["forum/components/DiscussionListItem"];var c=t.n(a);const u=flarum.core.compat["common/utils/abbreviateNumber"];var l=t.n(u);const p=flarum.core.compat["common/helpers/icon"];var d=t.n(p);const f=flarum.core.compat["common/components/Button"];var v=t.n(f);const w=flarum.core.compat["forum/utils/DiscussionControls"];var b=t.n(w);function h(t,o){return h=Object.setPrototypeOf||function(t,o){return t.__proto__=o,t},h(t,o)}const y=flarum.core.compat["common/components/Modal"];var _=t.n(y);const g=flarum.core.compat["common/utils/Stream"];var C=t.n(g),M=function(t){var o,e;function s(){return t.apply(this,arguments)||this}e=t,(o=s).prototype=Object.create(e.prototype),o.prototype.constructor=o,h(o,e);var r=s.prototype;return r.oninit=function(o){t.prototype.oninit.call(this,o),this.discussion=this.attrs.discussion,this.currentViewsCount=this.attrs.discussion.views(),this.newViewsCount=C()(this.currentViewsCount)},r.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("label",null,n().translator.trans("flarumite-simple-discussion-views.forum.modal_resetviews.label")),m("input",{className:"FormControl",type:"number",min:"0",bidi:this.newViewsCount})),m("div",{className:"Form-group"},m(v(),{className:"Button Button--primary",type:"submit",loading:this.loading},n().translator.trans("flarumite-simple-discussion-views.forum.modal_resetviews.submit")))))},r.title=function(){return n().translator.trans("flarumite-simple-discussion-views.forum.modal_resetviews.title")},r.className=function(){return"Modal--small"},r.onsubmit=function(t){var o=this;t.preventDefault(),this.loading=!0;var e=parseInt(this.newViewsCount()),n=this.currentViewsCount;e>=0&&e!==n&&this.attrs.discussion.save({views:e}).then((function(){m.redraw()})).catch((function(t){o.loading=!1,console.warn(t)})),this.hide()},s}(_());const N=flarum.core.compat["common/extenders"];var O=t.n(N);const x=flarum.core.compat["common/models/Discussion"];var S=t.n(x);const j=[new(O().Model)(S()).attribute("canReset").attribute("views")];
698n().initializers.add("flarumite-simple-discussion-views",(function(){(0,s.extend)(i().prototype,"sortMap",(function(t){t.popular="-view_count",t.unpopular="view_count"})),(0,s.extend)(c().prototype,"infoItems",(function(t){var o=this.attrs.discussion.views();t.add("discussion-views",m("span",null,d()("far fa-eye")," ",l()(o)))})),(0,s.extend)(b(),"moderationControls",(function(t,o){o.canReset()&&t.add("reset",m(v(),{icon:"far fa-eye",onclick:function(){return n().modal.show(M,{discussion:o})}},n().translator.trans("flarumite-simple-discussion-views.forum.discussion_controls.resetviews_button")),-10)}))}))})(),module.exports=o})();
699
700
701flarum.extensions['flarumite-simple-discussion-views']=module.exports;
702
703var module={};
704
705(()=>{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()||{};
705return 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")}
705)),(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})();
706
707
708flarum.extensions['flarum-subscriptions']=module.exports;
709
710var module={};
711
712(()=>{var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>M});const n=flarum.core.compat["forum/app"];var a=t.n(n);const r=flarum.core.compat["common/extend"],o=flarum.core.compat["common/components/Button"];var i=t.n(o);const s=flarum.core.compat["common/components/EditUserModal"];var c=t.n(s);const u=flarum.core.compat["forum/components/SignUpModal"];var l=t.n(u);const d=flarum.core.compat["forum/components/SettingsPage"];var p=t.n(d);const f=flarum.core.compat["common/utils/extractText"];var k=t.n(f);const h=flarum.core.compat["common/utils/Stream"];var y=t.n(h);function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}const v=flarum.core.compat["common/components/Modal"];var g=function(t){var e,n;function r(){return t.apply(this,arguments)||this}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,b(e,n);var o=r.prototype;return o.oninit=function(e){t.prototype.oninit.call(this,e),this.nickname=y()(a().session.user.displayName())},o.className=function(){return"NickameModal Modal--small"},o.title=function(){return a().translator.trans("flarum-nicknames.forum.change_nickname.title")},o.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{type:"text",autocomplete:"off",name:"nickname",className:"FormControl",bidi:this.nickname,disabled:this.loading})),m("div",{className:"Form-group"},m(i(),{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},a().translator.trans("flarum-nicknames.forum.change_nickname.submit_button")))))},o.onsubmit=function(t){var e=this;t.preventDefault(),this.nickname()!==a().session.user.displayName()?(this.loading=!0,a().session.user.save({nickname:this.nickname()},{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))):this.hide()},r}(t.n(v)());const N=flarum.core.compat["common/extenders"];var _=t.n(N);const x=flarum.core.compat["common/models/User"];var O=t.n(x);const M=[new(_().Model)(O()).attribute("canEditNickname")];a().initializers.add("flarum/nicknames",(function(){(0,r.extend)(p().prototype,"accountItems",(function(t){"nickname"===a().forum.attribute("displayNameDriver")&&this.user.canEditNickname()&&t.add("changeNickname",m(i(),{className:"Button",onclick:function(){return a().modal.show(g)}},a().translator.trans("flarum-nicknames.forum.settings.change_nickname_button")))})),(0,r.extend)(c().prototype,"oninit",(function(){this.nickname=y()(this.attrs.user.displayName())})),(0,r.extend)(c().prototype,"fields",(function(t){"nickname"===a().forum.attribute("displayNameDriver")&&this.attrs.user.canEditNickname()&&t.add("nickname",m("div",{className:"Form-group"},m("label",null,a().translator.trans("flarum-nicknames.forum.edit_user.nicknames_heading")),m("input",{className:"FormControl",placeholder:k()(a().translator.trans("flarum-nicknames.forum.edit_user.nicknames_text")),bidi:this.nickname})),100)})),(0,r.extend)(c().prototype,"data",(function(t){"nickname"===a().forum.attribute("displayNameDriver")&&this.attrs.user.canEditNickname()&&this.nickname()!==this.attrs.user.displayName()&&(t.nickname=this.nickname())})),(0,r.extend)(l().prototype,"oninit",(function(){"nickname"===a().forum.attribute("displayNameDriver")&&(this.nickname=y()(this.attrs.username||""))})),(0,r.extend)(l().prototype,"onready",(function(){"nickname"===a().forum.attribute("displayNameDriver")&&a().forum.attribute("setNicknameOnRegistration")&&a().forum.attribute("randomizeUsernameOnRegistration")&&this.$("[name=nickname]").select()}
712)),(0,r.extend)(l().prototype,"fields",(function(t){"nickname"===a().forum.attribute("displayNameDriver")&&a().forum.attribute("setNicknameOnRegistration")&&(t.add("nickname",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"nickname",type:"text",placeholder:k()(a().translator.trans("flarum-nicknames.forum.sign_up.nickname_placeholder")),bidi:this.nickname,disabled:this.loading||this.isProvided("nickname"),required:a().forum.attribute("randomizeUsernameOnRegistration")})),25),a().forum.attribute("randomizeUsernameOnRegistration")&&t.remove("username"))})),(0,r.extend)(l().prototype,"submitData",(function(t){if("nickname"===a().forum.attribute("displayNameDriver")&&a().forum.attribute("setNicknameOnRegistration")&&(t.nickname=this.nickname(),a().forum.attribute("randomizeUsernameOnRegistration"))){var e=new Uint32Array(2);crypto.getRandomValues(e),t.username=e.join("")}}))}))})(),module.exports=e})();
713
714
715flarum.extensions['flarum-nicknames']=module.exports;
716
717var module={};
718
719/*! For license information please see forum.js.LICENSE.txt */
720(()=>{var t={440:(t,u,e)=>{var n=e(75).default;function r(){"use strict";t.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 M(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(P([])));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=t.iterator[u.method];if(void 0===e){if(u.delegate=null,"throw"===u.method){if(t.iterator.return&&(u.method="return",u.arg=void 0,b(t,u),"throw"===u.method))return p;u.method="throw",u.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=m(e,t.iterator,u.arg);if("throw"===n.type)return u.method="throw",u.arg=n.arg,u.delegate=null,p;var r=n.arg;return r?r.done?(u[t.resultName]=r.value,u.next=t.nextLoc,"return"!==u.method&&(u.method="next",u.arg=void 0),u.delegate=null,p):r:(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 M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function P(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=P,M.prototype={constructor:M,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
720h(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:P(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},75: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},507:(t,u,e)=>{var n=e(440)();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:()=>su,filterGroupMentions:()=>fu,filterPostMentions:()=>cu,filterTagMentions:()=>pu,filterUserMentions:()=>au,postFilterGroupMentions:()=>mu,postFilterPostMentions:()=>lu,postFilterTagMentions:()=>du,postFilterUserMentions:()=>Du});var t={};e.r(t),e.d(t,{default:()=>J,insertMention:()=>q});var u={};e.r(u),e.d(u,{filterGroupMentions:()=>fu,filterPostMentions:()=>cu,filterTagMentions:()=>pu,filterUserMentions:()=>au,postFilterGroupMentions:()=>mu,postFilterPostMentions:()=>lu,postFilterTagMentions:()=>du,postFilterUserMentions:()=>Du});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 M=e.n(x);const P=flarum.core.compat["common/components/Button"];var _=e.n(P);function T(t,u){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,u){return t.__proto__=u,t},T(t,u)}function S(t,u){t.prototype=Object.create(u.prototype),t.prototype.constructor=t,T(t,u)}const k=flarum.core.compat["common/components/Modal"];var L=e.n(k);function j(){return j=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},j.apply(this,arguments)}function N(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,n.key,n)}}const O=flarum.core.compat["common/states/PaginatedListState"];var I=function(t){function u(u,e){return void 0===e&&(e=1),u.page=j({},u.page||{},{limit:10}),t.call(this,u,e,10)||this}var e,n;return S(u,t),e=u,(n=[{key:"type",get:function(){return"posts"}}])&&N(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(e.n(O)()),R=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.oninit=function(u){t.prototype.oninit.call(this,u),this.state=new I({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}(L());const G=flarum.core.compat["forum/utils/DiscussionControls"];var U=e.n(G);const H=flarum.core.compat["forum/components/EditPostComposer"];var W=e.n(H);function q(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 J(t,u){return i().composer.bodyMatches(W())&&i().composer.body.attrs.post.discussion()===t.discussion()?q(t,i().composer,u):U().replyAction.call(t.discu
720ssion()).then((function(e){return q(t,e,u)}))}const z=flarum.core.compat["common/Fragment"];var Y=e.n(z),Q=function(t){function u(u){var e;return(e=t.call(this)||this).post=u,e}S(u,t);var e=u.prototype;return e.view=function(){var t=this;return m("button",{className:"Button PostQuoteButton",onclick:function(){J(t.post,t.content)}},M()("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}(Y());function X(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 K=flarum.core.compat["common/components/TextEditor"];var V=e.n(K);const Z=flarum.core.compat["common/components/TextEditorButton"];var tt=e.n(Z);const ut=flarum.core.compat["common/utils/KeyboardNavigatable"];var et=e.n(ut),nt=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}S(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)})))},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}(Y());function rt(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 ot(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 it(t){return function(){var u=this,e=arguments;return new Promise((function(n,r){var o=t.apply(u,e);function i(t){ot(o,n,r,i,s,"next",t)}function s(t){ot(o,n,r,i,s,"throw",t)}i(void 0)}))}}var st=e(507),at=e.n(st);const Dt=flarum.core.compat["common/Component"];var ct=e.n(Dt);const lt=flarum.core.compat["common/utils/classList"];var ft=e.n(lt),mt=["mentionable"],pt=function(t){function u(){return t.apply(this,arguments)||this}return S(u,t),u.prototype.view=function(t){var u=this.attrs,e=u.mentionable,n=rt(u,mt),r=ft()("MentionsDropdownItem","PostPreview","MentionsDropdown-"+e.type());return m("button",Object.assign({className:r},n),m("span",{className:"PostPreview-content"},t.children))},u}(ct());const dt=flarum.core.compat["common/utils/throttleDebounce"];var Ft=["onclick"];function ht(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 Ct(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)?Ct(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 Ct(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 At=function(){function t(t){var u=this;this.mentionables=void 0,this.results={},this.typed=null,this.searched=[],this.dropdownItemAttrs={},this.search=(0,dt.throttle)(250,it(at().mark((function t(){var e,n,r,o,i,s,a;return at().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=ht(u.mentionables);case 6:if((r=n()).done){t.next=20;break}return o=r.value,t.t0=ht,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=ht(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;
720return 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=rt(r,Ft);return m(pt,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=ht(r);!(i=s()).done;){var a=i.value,D=u.makeSuggestion(n,a);e.push(D)}},r=ht(this.mentionables);!(t=r()).done;)n();return e},t}();const vt=flarum.core.compat["forum/components/Notification"];var Et=e.n(vt),yt=function(t){function u(){return t.apply(this,arguments)||this}S(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();return 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}(Et()),Bt=function(t){function u(){return t.apply(this,arguments)||this}S(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}(Et()),gt=function(t){function u(){return t.apply(this,arguments)||this}S(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}(Et()),bt=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 wt=flarum.core.compat["common/helpers/avatar"];var xt=e.n(wt);const Mt=flarum.core.compat["common/helpers/highlight"];var Pt=e.n(Mt),_t=function(t){this.format=void 0,this.format=t};const Tt=flarum.core.compat["common/utils/extractText"];var St=e.n(Tt),kt=function(){return St()(i().translator.trans("core.lib.username.deleted_text"))};function $t(t,u){return void 0===u&&(u=!0),t?((u?t.displayName():t.username())||kt()).replace(/"#[a-z]{0,3}[0-9]+/,"_"):kt().replace(/"#[a-z]{0,3}[0-9]+/,"_")}var Lt=function(t){function u(){return t.apply(this,arguments)||this}S(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=$t(t,!1);return this.format.format(u)}var e=$t(t);return this.format.format(e,"",t.id())},e.suggestion=function(t,u){var e,n=w()(t);return u&&(n.children=[Pt()(null!=(e=n.text)?e:"",u)],delete n.text),m("[",null,xt()(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=it(at().mark((function t(u){return at().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}(_t);const jt=flarum.core.compat["forum/components/ReplyComposer"];var Nt=e.n(jt),Ot=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.type=function(){return"post"},e.initialResults=function(){if(!i().composer.bodyMatches(Nt())&&!i().composer.bodyMatches(W()))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=$t(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=[Pt()(null!=(n=o.text)?n:"",u)],delete o.text),m("[",null,xt()(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}(_t);const It=flarum.core.compat["common/models/Group"];var Rt=e.n(It);const Gt=flarum.core.compat["common/components/Badge"];var Ut=e.n(Gt),Ht=function(t){function u(){return t.apply(this,arguments)||this}S(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()!==Rt
720().GUEST_ID&&t.id()!==Rt().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=Pt()(e,u)),m("[",null,m(Ut(),{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,e;return null!=(t=null==(u=i().session)||null==(e=u.user)?void 0:e.canMentionGroups())&&t},u}(_t),Wt=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,Ot,Ht],u.extendable=!0,u}S(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}(bt),qt=function(t){function u(){return t.apply(this,arguments)||this}S(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=it(at().mark((function t(u){return at().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=Pt()(e,u)),m("[",null,m(Ut(),{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}(_t),Jt=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=[qt],u.extendable=!0,u}S(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\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
720D\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
720F40-\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}(bt);function zt(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 Yt=function(){function t(){this.formats=[new Wt,new Jt]}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 zt(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)?zt(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 Qt=flarum.core.compat["forum/components/UserPage"];var Xt=e.n(Qt);const Kt=flarum.core.compat["common/components/LinkButton"];var Vt=e.n(Kt);const Zt=flarum.core.compat["common/models/User"];var tu=e.n(Zt);flarum.core.compat["common/Model"];const uu=flarum.core.compat["common/extenders"];var eu=e.n(uu);const nu=flarum.core.compat["common/models/Post"];var ru=e.n(nu);const ou=flarum.core.compat["forum/components/PostsUserPage"];var iu=function(t){function u(){return t.apply(this,arguments)||this}return S(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(ou)());const su=[(new(eu().Routes)).add("user.mentions","/u/:username/mentions",iu),new(eu().Model)(ru()).hasMany("mentionedBy").attribute("mentionedByCount"),new(eu().Model)(tu()).attribute("canMentionGroups")];function au(t){var u;
720if(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",St()(w()(u))),!0;t.invalidate()}function Du(t){t.setAttribute("deleted",!1)}function cu(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",St()(w()(u.user()))),!0}function lu(t){t.setAttribute("deleted",!1)}function fu(t){var u,e;if(null!=(u=i().session)&&null!=(e=u.user)&&e.canMentionGroups()){var n=i().store.getById("groups",t.getAttribute("id"));if(n)return t.setAttribute("groupname",St()(n.namePlural())),!0}t.invalidate()}function mu(t){var u,e;if(null!=(u=i().session)&&null!=(e=u.user)&&e.canMentionGroups()){var n=i().store.getById("groups",t.getAttribute("id"));t.setAttribute("color",n.color()),t.setAttribute("icon",n.icon()),t.setAttribute("deleted",!1)}}function pu(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 du(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 Fu(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 hu(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)?hu(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 hu(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 Cu={"mentions/components/MentionsUserPage":iu,"mentions/components/PostMentionedNotification":yt,"mentions/components/UserMentionedNotification":Bt,"mentions/components/GroupMentionedNotification":gt,"mentions/fragments/AutocompleteDropdown":nt,"mentions/fragments/PostQuoteButton":Q,"mentions/utils/getCleanDisplayName":$t,"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":X,"mentions/utils/textFormatter":u,"mentions/mentionables/MentionableModel":_t,"mentions/mentionables/formats/MentionFormat":bt,"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=Fu(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=Fu(this.mentionables[r]);!(i=s()).done;){var a=i.value;o.extend(a)}}},t}()},Au=flarum.core;i().mentionFormats=new Yt,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())}
720,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(R,{post:n})}},m("span",{className:"PostPreview-content"},m("span",{className:"PostPreview-badge Avatar"},M()("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"},M()("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 J(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 Q(t),r=function(t){setTimeout((function(){var r=X(u);if(r){n.content=r,m.render(e[0],n.render());var o=window.getSelection().getRangeAt(0).getClientRects(),i=o[0];
720if(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 nt,(0,r.extend)(V().prototype,"oncreate",(function(){var e=this.$(".TextEditor-editor").wrap('<div class="ComposerBody-mentionsWrapper"></div>');this.navigator=new(et()),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)(V().prototype,"buildEditorParams",(function(e){var n,r,o,s=this,a=new At({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)(V().prototype,"toolbarItems",(function(t){var u=this;t.add("mention",m(tt(),{onclick:function(){return u.attrs.composer.editor.insertAtCursor(" @")},icon:"fas fa-at"},i().translator.trans("flarum-mentions.forum.composer.mention_tooltip")))})),i().notificationComponents.postMentioned=yt,i().notificationComponents.userMentioned=Bt,i().notificationComponents.groupMentioned=gt,(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)(Xt().prototype,"navItems",(function(t){var u=this.user;t.add("mentions",m(Vt(),{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(Au.compat,Cu)})(),module.exports=n})();
721
722
723flarum.extensions['flarum-mentions']=module.exports;
724
725var module={};
726
727/*! For license information please see forum.js.LICENSE.txt */
728(()=>{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"],"🇩"
728:["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
728at"],"🙀":["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"],"🧑‍🦲"
728:["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
728ane"],"👨‍🦯":["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"],"ðŸ¦
728³":["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
728oked_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_
728with_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"],"ðŸ“
728Œ":["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
728s"],"➗":["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
728ok_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"],"🇸🇩"
728:["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
7281a\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;
728)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})();
729
730
731flarum.extensions['flarum-emoji']=module.exports;
732
733var module={};
734
735(()=>{var n={n:t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},d:(t,e)=>{for(var a in e)n.o(e,a)&&!n.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},o:(n,t)=>Object.prototype.hasOwnProperty.call(n,t),r:n=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})}},t={};(()=>{"use strict";n.r(t),n.d(t,{extend:()=>D});const e=flarum.core.compat["forum/app"];var a=n.n(e);const i=flarum.core.compat["common/extend"],r=flarum.core.compat["common/components/Button"];var o=n.n(r);const l=flarum.core.compat["forum/utils/UserControls"];var s=n.n(l);const c=flarum.core.compat["forum/components/SessionDropdown"];var u=n.n(c);function f(n,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,t){return n.__proto__=t,n},f(n,t)}function p(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n,f(n,t)}const d=flarum.core.compat["common/components/Modal"];var h=n.n(d);const g=flarum.core.compat["common/components/Switch"];var k=n.n(g);const w=flarum.core.compat["common/components/LoadingIndicator"];var b=n.n(w);const v=flarum.core.compat["common/models/Group"];var y=n.n(v);const _=flarum.core.compat["common/helpers/username"];var R=n.n(_);const M=flarum.core.compat["common/helpers/icon"];var x=n.n(M);const C=flarum.core.compat["common/utils/KeyboardNavigatable"];var S=n.n(C),I=function(n){function t(){return n.apply(this,arguments)||this}p(t,n);var e=t.prototype;return e.className=function(){return"KilowhatMailingSentModal Modal--small"},e.title=function(){return a().translator.trans("clarkwinkelmann-mailing.forum.modal_sent.title_text")},e.content=function(){return[m(".MailingShipping",x()("fas fa-shipping-fast")),m(".Modal-body",[m("h1",a().translator.trans("clarkwinkelmann-mailing.forum.modal_sent.on_its_way",{recipientsCount:this.attrs.recipientsCount}))])]},t}(h());const j=flarum.core.compat["common/Model"];var T=n.n(j),O=function(n){function t(){for(var t,e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];return(t=n.call.apply(n,[this].concat(a))||this).email=T().attribute("email"),t}return p(t,n),t}
735(T()),F=/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,L=function(n){function t(){for(var t,e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];return(t=n.call.apply(n,[this].concat(a))||this).sending=!1,t.recipients=[],t.subject="",t.messageText="",t.asHtml=!1,t.searchIndex=0,t.navigator=new(S()),t.filter="",t.focused=!1,t.loadingResults=!1,t.searchResults=[],t.searchTimeout=-1,t}p(t,n);var e=t.prototype;return e.oninit=function(t){var e=this;if(n.prototype.oninit.call(this,t),this.recipients=[],this.attrs.user&&this.recipients.push(this.attrs.user),this.attrs.forAll){var i=a().store.getById("groups",y().MEMBER_ID);this.recipients.push(i)}this.navigator.when((function(n){return"Tab"!==n.key||!!e.filter})).onUp((function(){e.searchIndex>0&&(e.searchIndex--,m.redraw())})).onDown((function(){e.searchIndex<e.searchResults.length-1&&(e.searchIndex++,m.redraw())})).onSelect((function(){e.selectResult(e.searchResults[e.searchIndex])})).onRemove((function(){e.recipients.pop()}))},e.className=function(){return"KilowhatMailingModal Modal--large"},e.title=function(){return a().translator.trans("clarkwinkelmann-mailing.forum.modal_mail.title_text")},e.onready=function(){this.$("form").find(".js-focus-on-load").first().focus().select()},e.recipientLabel=function(n){switch(n.data.type){case"users":return m(".RecipientLabel",R()(n));case"groups":var t=n;return m(".RecipientLabel",t.color()?{className:"colored",style:{backgroundColor:t.color()}}:{},[t.icon()?[x()(t.icon())," "]:null,t.namePlural()]);case"clarkwinkelmann-mailing-emails":return m(".RecipientLabel",n.email())}return"[unknown]"},e.searchResultKind=function(n){switch(n.data.type){case"users":return a().translator.trans("clarkwinkelmann-mailing.forum.recipient_kinds.user");case"groups":return a().translator.trans("clarkwinkelmann-mailing.forum.recipient_kinds.group");case"clarkwinkelmann-mailing-emails":return a().translator.trans("clarkwinkelmann-mailing.forum.recipient_kinds.email")}return"[unknown]"},e.selectResult=function(n){n&&(this.recipients.push(n),this.filter="",this.searchResults=[])},e.content=function(){var n=this;return m(".Modal-body",m("form.Form",{onsubmit:this.onsubmit.bind(this)},[m(".Form-group",[m("label",a().translator.trans("clarkwinkelmann-mailing.forum.modal_mail.recipients_label")),m(".RecipientsInput.FormControl",{className:this.focused?"focus":""},[m("span.RecipientsInput-selected",this.recipients.map((function(t,e){return m("span.RecipientsInput-recipient",{onclick:function(){n.recipients.splice(e,1)},title:n.searchResultKind(t)},n.recipientLabel(t))}))),m("input.FormControl",{placeholder:a().translator.trans("clarkwinkelmann-mailing.forum.modal_mail.recipients_placeholder"),value:this.filter,oninput:function(t){n.filter=t.target.value,n.performNewSearch()},onkeydown:this.navigator.navigate.bind(this.navigator),onfocus:function(){n.focused=!0},onblur:function(){n.focused=!1},disabled:this.sending}),this.loadingResults?b().component({size:"small"}):null,this.searchResults.length?m("ul.Dropdown-menu",this.searchResults.map((function(t,e){return m("li",{className:n.searchIndex===e?"active":"",onclick:function(){n.selectResult(t)}},m("button[type=button]",[m("span.SearchResultKind",n.searchResultKind(t)),n.recipientLabel(t)]))}))):null])]),m(".Form-group",[m("label",a().translator.trans("clarkwinkelmann-mailing.forum.modal_mail.subject_label")),m("input[type=text].FormControl.js-focus-on-load",{value:this.subject,oninput:function(t){n.subject=t.target.value},placeholder:a().translator.trans("clarkwinkelmann-mailing.forum.modal_mail.default_subject"),disabled:this.sending})]),m(".Form-group",[m("label",a().translator.trans("clarkwinkelmann-mailing.forum.modal_mail.message_label")),m("textarea.FormControl",{rows:10,value:this.messageText,oninput:function(t){n.messageText=t.target.value},disabled:this.sending})]),m(".Form-group",[k().component({state:this.asHtml,onchange:function(t){n.asHtml=t},disabled:this.sending},a().translator.trans("clarkwinkelmann-mailing.forum.modal_mail.as_html_label"))]),m(".Form-group",[o().component({type:"submit",className:"Button Button--primary EditContactModal-save",loading:this.sending,disabled:0===this.recipients.length||""===this.messageText},a().translator.trans("clarkwinkelmann-mailing.forum.modal_mail.submit_button"))])]))},e.performNewSearch=function(){var n=this;this.searchIndex=0;var t=this.filter.toLowerCase();this.buildSearchResults(t),clearTimeout(this.searchTimeout),t.length>=3&&(this.searchTimeout=setTimeout((function(){n.loadingResults=!0,m.redraw(),a().store.find("users",{filter:{q:t},page:{limit:5}}).then((function(){n.loadingResults=!1,n.buildSearchResults(t),m.redraw()}))}),250))},e.buildSearchResults=function(n){var t=this;if(n){var e=[];a().forum.kilowhatMailingCanMailAll()&&a().store.all("groups").forEach((function(t){t.id()!==y().GUEST_ID&&(-1===t.nameSingular().toLowerCase().indexOf(n)&&-1===t.namePlural().toLowerCase().indexOf(n)||e.push(t))})),a().store.all("users").forEach((function(t){-1!==t.username().toLowerCase().indexOf(n)&&e.push(t)})),F.test(this.filter)&&e.push(a().store.createRecord("clarkwinkelmann-mailing-emails",{attributes:{email:this.filter}})),this.searchResults=e.filter((function(n){return n instanceof O?!t.recipients.some((function(t){return t instanceof O&&t.email()===n.email()})):!t.recipients.some((function(t){return t.data.type===n.data.type&&t.id()===n.id()}))})),m.redraw()}else this.searchResults=[]},e.onsubmit=function(n){var t=this;n.preventDefault(),this.sending=!0,a().request({method:"POST",url:a().forum.attribute("apiUrl")+"/admin-mail",body:{data:{recipients:this.recipients.map((function(n){return n instanceof O?{type:n.data.type,attributes:{email:n.email()}}:{type:n.data.type,id:n.id()}})),subject:this.subject,text:this.messageText,asHtml:this.asHtml}}}).then((function(n){a().modal.show(I,{recipientsCount:n.recipientsCount})}),(function(n){t.sending=!1,t.onerror(n)}))},t}(h());const P=flarum.core.compat["common/extenders"];var z=n.n(P);const N=flarum.core.compat["common/models/Forum"];var A=n.n(N);const D=[(new(z().Store)).add("clarkwinkelmann-mailing-emails",O),new(z().Model)(A()
735).attribute("kilowhatMailingCanMailAll").attribute("kilowhatMailingCanMailIndividual")];a().initializers.add("clarkwinkelmann-mailing",(function(){!function(){(0,i.extend)(s(),"moderationControls",(function(n,t){a().forum.kilowhatMailingCanMailIndividual()&&n.add("clarkwinkelmann-mailing",o().component({icon:"fas fa-envelope",onclick:function(){a().modal.show(L,{user:t})}},a().translator.trans("clarkwinkelmann-mailing.forum.links.mail_individual")))})),(0,i.extend)(u().prototype,"items",(function(n){a().forum.kilowhatMailingCanMailAll()&&n.add("clarkwinkelmann-mailing",o().component({icon:"fas fa-envelope",onclick:function(){a().modal.show(L,{forAll:!0})}},a().translator.trans("clarkwinkelmann-mailing.forum.links.mail_all")))}));var n=flarum.extensions["fof-user-directory"];n&&n.UserDirectoryPage&&(0,i.extend)(n.UserDirectoryPage.prototype,"actionItems",(function(n){a().forum.kilowhatMailingCanMailAll()&&n.add("clarkwinkelmann-mailing",o().component({className:"Button",icon:"fas fa-envelope",onclick:function(){a().modal.show(L,{forAll:!0})}},a().translator.trans("clarkwinkelmann-mailing.forum.links.mail_all")),10)}))}()}))})(),module.exports=t})();
736
737
738flarum.extensions['clarkwinkelmann-mailing']=module.exports;
739
740var module={};
741
742module.exports=function(e){var o={};function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,o){if(1&o&&(e=t(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var r in e)t.d(n,r,function(o){return e[o]}.bind(null,r));return n},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},t.p="",t(t.s=5)}([function(e,o){e.exports=flarum.core.compat["forum/app"]},,function(e,o){e.exports=flarum.core.compat["common/components/TextEditor"]},function(e,o){e.exports=flarum.core.compat["common/extend"]},function(e,o){e.exports=flarum.core.compat["common/components/Button"]},function(e,o,t){"use strict";t.r(o);var n=t(3),r=t(0),i=t.n(r),a=t(4),c=t.n(a),s=t(2),u=t.n(s),l="clarkwinkelmann-emojionearea.forum.",d=!1;i.a.initializers.add("clarkwinkelmann-emojionearea",(function(){u.a.prototype.emojioneAreaClickedOutside=function(e){if(this.emojioneArea&&this.emojioneArea.isReady){var o=$(e.target);o.is(".emojionearea")||o.parents(".emojionearea").length||o.parents(".Button-emojionearea").length||this.emojioneArea.hidePicker()}},u.a.prototype.configureEmojioneArea=function(){var e=this;if(this.emojioneArea)return Promise.resolve();var o=$('<div class="ComposerBody-emojioneareaContainer"/>');return this.$(".TextEditor-controls").before(o),new Promise((function(t){var n=$("<div />").emojioneArea({standalone:!0,search:i.a.forum.attribute("emojioneAreaEnableSearch"),searchPlaceholder:i.a.translator.trans(l+"search_placeholder"),buttonTitle:i.a.translator.trans(l+"picker_button"),recentEmojis:i.a.forum.attribute("emojioneAreaEnableRecent"),filtersPosition:i.a.forum.attribute("emojioneAreaFiltersPositionBottom")?"bottom":"top",searchPosition:i.a.forum.attribute("emojioneAreaSearchPositionBottom")?"bottom":"top",container:o,tones:i.a.forum.attribute("emojioneAreaEnableTones"),autocomplete:!1,sprite:!1,events:{emojibtn_click:function(){e.attrs.composer.editor.insertAtCursor(e.emojioneArea.getText())},ready:t}});e.emojioneArea=n.data("emojioneArea")}))},Object(n.extend)(u.a.prototype,"oncreate",(function(){this.emojioneArea=null,this.emojioneAreaLoading=!1,document.addEventListener("click",this.emojioneAreaClickedOutside.bind(this))})),Object(n.extend)(u.a.prototype,"onremove",(function(){document.removeEventListener("click",this.emojioneAreaClickedOutside)})),Object(n.extend)(u.a.prototype,"toolbarItems",(function(e){var o=this;e.add("clarkwinkelmann-emojionearea",c.a.component({onclick:function(){o.emojioneAreaLoading||(o.emojioneArea&&o.emojioneArea.button.is(".active")?o.emojioneArea.hidePicker():(o.emojioneAreaLoading=!0,(d?Promise.resolve():(d=!0,new Promise((function(e){var o=document.createElement("link");o.rel="stylesheet",o.crossOrigin="anonymous",o.integrity="sha256-LKawN9UgfpZuYSE2HiCxxDxDgLOVDx2R4ogilBI52oc=",o.href="https://cdn.jsdelivr.net/npm/[email protected]/dist/emojionearea.min.css",document.head.appendChild(o);var t=document.createElement("script");t.crossOrigin="anonymous",t.integrity="sha256-ImIFrmJd7ymGlVw2MbtI96BNPW4NfcKqM3d1Go665Ig=",t.src="https://cdn.jsdelivr.net/npm/[email protected]/dist/emojionearea.min.js",t.onload=e,document.body.appendChild(t)})))).then((function(){o.configureEmojioneArea().then((function(){var e=o.$(".Button-emojionearea").position();o.$(".emojionearea-picker").css("left",e.left-290),o.emojioneArea.showPicker(),$(".emojionearea-search input").focus(),o.emojioneAreaLoading=!1,m.redraw()}))}))))},className:"Button Button--icon Button--link Button-emojionearea",icon:this.emojioneAreaLoading?"fas fa-spinner fa-pulse":"far fa-smile-beam",title:i.a.translator.trans(l+"picker_button")}))}))}
742)),i.a.initializers.add("clarkwinkelmann-emojionearea-after",(function(){Object(n.extend)(u.a.prototype,"toolbarItems",(function(e){i.a.forum.attribute("emojioneAreaHideFlarumButton")&&e.has("emoji")&&e.remove("emoji")}))}),-100)}]);
743
744
745flarum.extensions['clarkwinkelmann-emojionearea']=module.exports;
746
747var module={};
748
749(()=>{var e={609:()=>{}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var a=r[o]={exports:{}};return e[o](a,a.exports,t),a.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";t.r(o);var e=t(609),r={};for(const t in e)"default"!==t&&(r[t]=()=>e[t]);t.d(o,r)})(),module.exports=o})();
750
751
752flarum.extensions['briantran-inject-header']=module.exports;
753
754var module={};
755
756(()=>{var t={n:n=>{var r=n&&n.__esModule?()=>n.default:()=>n;return t.d(r,{a:r}),r},d:(n,r)=>{for(var a in r)t.o(r,a)&&!t.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:r[a]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};(()=>{"use strict";t.r(n);const r=flarum.core.compat.app;var a=t.n(r);const s=flarum.core.compat["components/NotificationGrid"];var e=t.n(s);flarum.core;const o=flarum.core.compat.extend,i=flarum.core.compat["models/User"];var c=t.n(i);const u=flarum.core.compat.Model;var l=t.n(u);const p=flarum.core.compat["utils/PostControls"];var d=t.n(p);const f=flarum.core.compat["utils/UserControls"];var h=t.n(f);const g=flarum.core.compat["components/Button"];var v=t.n(g);function w(t,n){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},w(t,n)}function b(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,w(t,n)}const _=flarum.core.compat["components/Modal"];var y=t.n(_);const k=flarum.core.compat["helpers/username"];var W=t.n(k);const N=flarum.core.compat["utils/Stream"];var C=t.n(N),P=function(t){function n(){return t.apply(this,arguments)||this}b(n,t);var r=n.prototype;return r.oninit=function(n){t.prototype.oninit.call(this,n),this.publicComment=C()(""),this.privateComment=C()(""),this.strikes=C()(0)},r.className=function(){return"WarningsModal Modal--large"},r.title=function(){return app.translator.trans("askvortsov-moderator-warnings.forum.warning_modal.heading",{username:W()(this.attrs.user)})},r.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("div",null,m("label",null,app.translator.trans("askvortsov-moderator-warnings.forum.warning_modal.strikes_heading"),m("input",{type:"number",className:"FormControl",bidi:this.strikes,min:"0",max:"5"})))),m("div",{className:"Form-group"},m("div",null,m("label",null,app.translator.trans("askvortsov-moderator-warnings.forum.warning_modal.public_comment_heading",{username:W()(this.attrs.user)}),m("textarea",{className:"FormControl",bidi:this.publicComment,required:!0,rows:"6"})))),m("div",{className:"Form-group"},m("div",null,m("label",null,app.translator.trans("askvortsov-moderator-warnings.forum.warning_modal.private_comment_heading",{username:W()(this.attrs.user)}),m("textarea",{className:"FormControl",bidi:this.privateComment,rows:"6"})))),m("div",{className:"Form-group"},m(v(),{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("askvortsov-moderator-warnings.forum.warning_modal.submit_button")))))},r.onsubmit=function(t){t.preventDefault(),app.alerts.dismiss(this.successAlert),this.loading=!0,this.strikes()||this.strikes(0);var n={userId:this.attrs.user.id(),strikes:this.strikes(),public_comment:this.publicComment(),private_comment:this.privateComment()};this.attrs.post&&(n.post=this.attrs.post),app.store.createRecord("warnings").save(n).then(this.hide.bind(this)).then(this.successAlert=app.alerts.show({type:"success"},app.translator.trans("askvortsov-moderator-warnings.forum.warning_modal.confirmation_message"))).then(this.attrs.callback).catch((function(){}))},n}(y());const A=flarum.core.compat["components/UserPage"];var L=t.n(A);const x=flarum.core.compat["components/LinkButton"];var I=t.n(x);function O(){return O=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},O.apply(this,arguments)}const U=flarum.core.compat.Component;var B=t.n(U);const M=flarum.core.compat["components/LoadingIndicator"];var j=t.n(M);const D=flarum.core.compat["components/Dropdown"];var S=t.n(D);const F=flarum.core.compat["components/Link"];var H=t.n(F);const T=flarum.core.compat["helpers/avatar"];var V=t.n(T);const R=flarum.core.compat["helpers/humanTime"];var z=t.n(R);const E=flarum.core.compat["utils/classList"];var q=t.n(E);const G=flarum.core.compat["components/PostPreview"];
756var J=t.n(G),K=function(t){function n(){return t.apply(this,arguments)||this}b(n,t);var r=n.prototype;return r.view=function(){return m("div",{className:"WarningPost"},m("ul",{class:"Dropdown-menu PostPreview-preview fade in"},m("li",null,J().component({post:this.attrs.post}))))},r.oncreate=function(n){t.prototype.oncreate.call(this,n),this.$(".PostPreview-preview").show().css("position","relative")},n}(B());const Q=flarum.core.compat["components/Separator"];var X=t.n(Q);const Y=flarum.core.compat["utils/ItemList"];var Z=t.n(Y);const tt={controls:function(t,n){var r=this,a=new(Z());return["user","moderation","destructive"].forEach((function(s){var e=r[s+"Controls"](t,n).toArray();e.length&&(e.forEach((function(t){return a.add(t.itemName,t)})),a.add(s+"Separator",X().component()))})),a},userControls:function(t,n){return new(Z())},moderationControls:function(t,n){return new(Z())},destructiveControls:function(t,n){var r=new(Z());return!t.isHidden()&&app.session.user.canManageWarnings()&&r.add("hide",m(v(),{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},app.translator.trans("askvortsov-moderator-warnings.forum.warning_controls.delete_button"))),t.isHidden()&&app.session.user.canManageWarnings()&&r.add("restore",m(v(),{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},app.translator.trans("askvortsov-moderator-warnings.forum.warning_controls.restore_button"))),t.isHidden()&&app.session.user.canDeleteWarnings()&&r.add("delete",m(v(),{icon:"fas fa-times",onclick:this.deleteAction.bind(t)},app.translator.trans("askvortsov-moderator-warnings.forum.warning_controls.delete_forever_button"))),r},hideAction:function(){return this.pushAttributes({hiddenAt:new Date,hiddenUser:app.session.user}),this.save({isHidden:!0}).then((function(){return m.redraw()}))},restoreAction:function(){return this.pushAttributes({hiddenAt:null,hiddenUser:null}),this.save({isHidden:!1}).then((function(){return m.redraw()}))},deleteAction:function(t){return t&&(t.loading=!0),this.delete().then((function(){})).catch((function(){})).then((function(){t&&(t.loading=!1),location.reload()}))}};var nt=function(t){function n(){return t.apply(this,arguments)||this}b(n,t);var r=n.prototype;return r.view=function(){var t=this.attrs.warning,n=t.addedByUser(),r=tt.controls(t,this).toArray();return m("div",this.elementAttrs(),r.length?S().component({icon:"fas fa-ellipsis-v",className:"WarningListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right"},r):"",m("div",{className:"WarningListItem-main"},m("h3",{className:"WarningListItem-title"},m(H(),{href:n?app.route.user(n):"#",className:"WarningListItem-author"},V()(n)," ",W()(n))),m("span",{class:"WarningListItem-strikes"},t.isHidden()?app.translator.trans("askvortsov-moderator-warnings.forum.warning_list_item.list_item_heading_hidden",{time:z()(t.createdAt()),strikes:t.strikes()||0}):app.translator.trans("askvortsov-moderator-warnings.forum.warning_list_item.list_item_heading",{time:z()(t.createdAt()),strikes:t.strikes()||0})),m("hr",null),m("ul",{className:"WarningListItem-info"},t.post()?m("li",{className:"item-excerpt"},m("h3",{className:"WarningListItem-subtitle"},app.translator.trans("askvortsov-moderator-warnings.forum.warning_list_item.linked_post")),K.component({post:t.post()})):"",m("li",{className:"item-excerpt"},m("h3",{className:"WarningListItem-subtitle"},app.translator.trans("askvortsov-moderator-warnings.forum.warning_list_item.public_comment")),m("p",{class:"WarningListItem-comment"},m.trust(t.public_comment()))),app.session.user.canManageWarnings()&&t.private_comment()?m("li",{className:"item-excerpt"},m("h3",{className:"WarningListItem-subtitle"},app.translator.trans("askvortsov-moderator-warnings.forum.warning_list_item.private_comment")),m("p",{class:"WarningListItem-comment"},m.trust(t.private_comment()))):"")))},r.elementAttrs=function(){var t=this.attrs.warning,n={};return n.className=(n.className||"")+" "+q()({WarningListItem:!0,"WarningListItem--hidden":t.isHidden()}),n},n}(B());const rt=flarum.core.compat["helpers/listItems"];var at=t.n(rt),st=function(t){function n(){return t.apply(this,arguments)||this}b(n,t);var r=n.prototype;return r.oninit=function(n){t.prototype.oninit.call(this,n),this.loading=!0,this.warnings=[],this.user=this.attrs.params.user,this.refresh()},r.view=function(){var t;
756return this.loading&&(t=j().component({size:"large"})),m("div",{className:"WarningList"},m("h1",{className:"WarningList-warnings"},this.strikeCount()?a().translator.trans("askvortsov-moderator-warnings.forum.warning_list.warnings",{strikes:this.strikeCount()||0}):a().translator.trans("askvortsov-moderator-warnings.forum.warning_list.warnings_no_strikes")),m("div",{class:"Warnings-toolbar"},m("ul",{className:"Warnings-toolbar-action"},at()(this.actionItems().toArray()))),m("ul",{className:"WarningList-Warnings"},this.warnings.map((function(t){return m("li",{key:t.id(),"data-id":t.id()},nt.component({warning:t}))})),!this.loading&&0===this.warnings.length&&m("label",null,a().translator.trans("askvortsov-moderator-warnings.forum.warning_list.no_warnings"))),m("div",{className:"WarningList-loadMore"},t))},r.actionItems=function(){var t=new(Z());return a().session.user.canManageWarnings()&&t.add("create_warning",m(v(),{className:"Button Button--primary",onclick:this.handleOnClickCreate.bind(this)},a().translator.trans("askvortsov-moderator-warnings.forum.warning_list.add_button"))),t},r.strikeCount=function(){return this.warnings.filter((function(t){return!t.isHidden()})).map((function(t){return t.strikes()})).reduce((function(t,n){return t+n}),0)},r.parseResults=function(t){return[].push.apply(this.warnings,t),this.loading=!1,m.redraw(),t},r.refresh=function(){var t=this;return a().store.find("warnings",this.user.id()).catch((function(){})).then((function(n){t.warnings=[],t.parseResults(n)}))},r.handleOnClickCreate=function(t){t.preventDefault(),a().modal.show(P,O({callback:this.refresh.bind(this)},this.attrs.params))},n}(B()),et=function(t){function n(){return t.apply(this,arguments)||this}b(n,t);var r=n.prototype;return r.oninit=function(n){t.prototype.oninit.call(this,n),this.loadUser(m.route.param("username"))},r.content=function(){if(app.session.user&&(app.session.user.canViewWarnings()||this.user.id()===app.session.user.id()&&this.user.visibleWarningCount()>0))return m("div",{className:"WarningsUserPage"},st.component({params:{user:this.user,sort:"newest"}}))},n}(L());function ot(){app.routes["user.warnings"]={path:"/u/:username/warnings",component:et},(0,o.extend)(L().prototype,"navItems",(function(t){app.session.user&&(app.session.user.canViewWarnings()||this.user.id()===app.session.user.id()&&this.user.visibleWarningCount()>0)&&t.add("warnings",I().component({href:app.route("user.warnings",{username:this.user.username()}),icon:"fas fa-exclamation-circle"},[app.translator.trans("askvortsov-moderator-warnings.forum.user.warnings"),this.user.visibleWarningCount()>0?m("span",{className:"Button-badge"},this.user.visibleWarningCount()):""]),10)}))}const it=flarum.core.compat["models/Post"];var ct=t.n(it);const mt=flarum.core.compat["components/CommentPost"];var ut=t.n(mt);const lt=flarum.core.compat["helpers/icon"];var pt=t.n(lt),dt=function(t){function n(){return t.apply(this,arguments)||this}b(n,t);var r=n.prototype;return r.oninit=function(n){t.prototype.oninit.call(this,n),this.warning=this.attrs.warning},r.view=function(){return m(H(),{className:"WarningPreview",href:app.route("user.warnings",{username:this.warning.warnedUser().username()})},m(nt,{warning:this.warning}))},n}(B()),ft=function(t){function n(){return t.apply(this,arguments)||this}b(n,t);var r=n.prototype;return r.oninit=function(n){t.prototype.oninit.call(this,n),this.warning=this.attrs.warning},r.view=function(){return m("div",{className:"Post-warning"},m("span",{className:"Post-warning-summary"},pt()("fas fa-exclamation-circle"),this.warning.strikes()?app.translator.trans("askvortsov-moderator-warnings.forum.post.warning",{strikes:this.warning.strikes()||0,mod_username:W()(this.warning.addedByUser())}):app.translator.trans("askvortsov-moderator-warnings.forum.post.warning_no_strikes",{mod_username:W()(this.warning.addedByUser())})))},r.oncreate=function(n){var r=this;t.prototype.oncreate.call(this,n);var a,s=this.warning,e=function(){r.$(".Post-warning-preview").removeClass("in").one("transitionend",(function(){$(this).hide()}))},o=$('<ul class="Dropdown-menu Post-warning-preview fade"/>');this.$().append(o),this.$().children().hover((function(){clearTimeout(a),a=setTimeout((function(){!o.hasClass("in")&&o.is(":visible")||(m.render(o[0],m("li",{"data-id":s.id()},dt.component({warning:s}))),o.show(),setTimeout((function(){return o.off("transitionend").addClass("in")})))}),200)}),(function(){clearTimeout(a),a=setTimeout(e,250)})),$(".Post-warning").find(".Post-warning-summary a").hover((function(){$(".Post-warning").find('[data-number="'+$(this).data("number")+'"]').addClass("active")}),(function(){$(".Post-warning").find("[data-number]").removeClass("active")}))},n}(B()),ht=function(t){function n(){return t.apply(this,arguments)||this}b(n,t);var r=n.prototype;return r.oninit=function(n){t.prototype.oninit.call(this,n),this.post=this.attrs.post},r.view=function(){return m("div",{className:"Post-warning-list"},this.attrs.post.warnings().map((function(t){return ft.component({warning:t})})))},n}(B());const gt=flarum.core.compat["components/Notification"];var vt=function(t){function n(){return t.apply(this,arguments)||this}b(n,t);var r=n.prototype;return r.icon=function(){return"fas fa-exclamation-circle"},r.href=function(){return app.route("user.warnings",{username:app.session.user.username()})},r.content=function(){var t=this.attrs.notification.subject();return t.strikes()?app.translator.trans("askvortsov-moderator-warnings.forum.notifications.warning_text",{mod_username:W()(this.attrs.notification.fromUser()),strikes:t.strikes()||0}):app.translator.trans("askvortsov-moderator-warnings.forum.notifications.warning_no_strikes_text",{mod_username:W()(this.attrs.notification.fromUser())})},n}(t.n(gt)());const wt=flarum.core.compat["utils/computed"];var bt=t.n(wt),_t=function(t){function n(){return t.apply(this,arguments)||this}return b(n,t),n}
756(l());Object.assign(_t.prototype,{id:l().attribute("id"),public_comment:l().attribute("public_comment"),private_comment:l().attribute("private_comment"),strikes:l().attribute("strikes"),createdAt:l().attribute("createdAt",l().transformDate),isHidden:bt()("hiddenAt",(function(t){return!!t})),hiddenAt:l().attribute("hiddenAt",l().transformDate),warnedUser:l().hasOne("warnedUser"),hiddenByUser:l().hasOne("hiddenByUser"),addedByUser:l().hasOne("addedByUser"),post:l().hasOne("post")}),a().initializers.add("askvortsov/flarum-moderator-warnings",(function(t){t.store.models.warnings=_t,c().prototype.canViewWarnings=l().attribute("canViewWarnings"),c().prototype.canManageWarnings=l().attribute("canManageWarnings"),c().prototype.canDeleteWarnings=l().attribute("canDeleteWarnings"),c().prototype.visibleWarningCount=l().attribute("visibleWarningCount"),(0,o.extend)(d(),"moderationControls",(function(t,n){a().session.user&&a().session.user.canManageWarnings()&&t.add("warning",m(v(),{icon:"fas fa-exclamation-circle",onclick:function(){return a().modal.show(P,{callback:function(){location.reload()},user:n.user(),post:n})}},a().translator.trans("askvortsov-moderator-warnings.forum.post_controls.warning_button")))})),(0,o.extend)(h(),"moderationControls",(function(t,n){a().session.user&&a().session.user.canManageWarnings()&&t.add("warning",m(v(),{icon:"fas fa-exclamation-circle",onclick:function(){return a().modal.show(P,{callback:function(){location.reload()},user:n})}},a().translator.trans("askvortsov-moderator-warnings.forum.post_controls.warning_button")))})),ot(),ct().prototype.warnings=l().hasMany("warnings"),(0,o.extend)(ut().prototype,"footerItems",(function(t){var n=this.attrs.post;n.warnings()&&t.add("warnings",ht.component({post:n}))})),t.notificationComponents.warning=vt,(0,o.extend)(e().prototype,"notificationTypes",(function(n){n.add("warning",{name:"warning",icon:"fas fa-exclamation-circle",label:t.translator.trans("askvortsov-moderator-warnings.forum.settings.warning_notification_label")})}))}))})(),module.exports=n})();
757
758
759flarum.extensions['askvortsov-moderator-warnings']=module.exports;
760
761var module={};
762
763module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=11)}([function(e,t){e.exports=flarum.extensions["askvortsov-rich-text"]},function(e,t){e.exports=flarum.core.compat.extend},function(e,t){e.exports=flarum.core.compat["common/utils/Stream"]},function(e,t){e.exports=flarum.core.compat["common/utils/extractText"]},function(e,t){e.exports=flarum.core.compat.app},function(e,t){e.exports=flarum.core.compat["common/components/Button"]},function(e,t){e.exports=flarum.core.compat["common/components/Separator"]},function(e,t){e.exports=flarum.core.compat["common/components/Switch"]},function(e,t){e.exports=flarum.core.compat["common/helpers/listItems"]},function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var o=r(1);var a=r(5),l=r.n(a),i=r(6),s=r.n(i),c=r(7),u=r.n(c),d=r(8),f=r.n(d),p=r(3),b=r.n(p),v=r(2),h=r.n(v);function y(e){return[e.nodes.table,e.nodes.table_head,e.nodes.table_body,e.nodes.table_row,e.nodes.table_cell,e.nodes.table_header]}function g(e){return y(e.schema).includes(e.selection.$head.parent.type)}function _(e){return e.selection.$head.parent.type===e.schema.nodes.table_header}function w(e,t){return k(e,t,!1)}
763function k(e,t,n){void 0===n&&(n=!1);var o=e.schema;if(!g(e))return!1;if(t){var a=o.nodes.paragraph,l=n?e.selection.$head.before(-3)-1:e.selection.$head.after(-3)+1,i=e.tr;try{i.doc.resolve(l)}catch(e){var s=n?l+1:l-1;i.insert(s,a.create())}i.setSelection(r(0).Selection.near(i.doc.resolve(Math.max(0,l)),1)),t(i.scrollIntoView())}return!0}function x(e,t){return O(!0,e,t)}function M(e,t){return O(!1,e,t)}function O(e,t,r){var n=t.schema;if(!g(t)||_(t))return!1;if(r){var o=t.selection.$head,a=o.node(-1),l=[];a.forEach((function(e){l.push(n.nodes.table_cell.create(e.attrs))}));var i=n.nodes.table_row.create(null,l),s=e?o.before(-1):o.after(-1);r(t.tr.insert(s,i).scrollIntoView())}return!0}function A(e,t){return D(!1,e,t)}function S(e,t){return D(!0,e,t)}function D(e,t,r){var n=t.schema;if(!g(t))return!1;if(r){var o,a=t.selection.$head,l=a.node(-3),i=a.index(-1),s=[],c=a.start(-3);l.descendants((function(t,r){if(!y(n).includes(t.type))return!1;if(t.type===n.nodes.table_row&&(o=t.child(i)),o&&t==o){var a=e?l.resolve(r+1).before():l.resolve(r+1).after();s.push([t.type,c+a])}}));var u=t.tr,d=s.reverse(),f=Array.isArray(d),p=0;for(d=f?d:d[Symbol.iterator]();;){var b;if(f){if(p>=d.length)break;b=d[p++]}else{if((p=d.next()).done)break;b=p.value}var m=b;u=u.insert(m[1],m[0].create())}r(u.scrollIntoView())}return!0}function C(e,t){if(!g(e)||_(e))return!1;if(t){var r=e.tr,n=e.selection.$head;if(1===n.node(-2).childCount)return N(e,t);r.delete(n.start(-1)-1,n.end(-1)+1),t(r.scrollIntoView())}return!0}function j(e,t){var r=e.schema;if(!g(e))return!1;if(t){var n=e.selection.$head,o=n.node(-3);if(1===n.node(-1).childCount)return N(e,t);var a,l=n.index(-1),i=[],s=n.start(-3);o.descendants((function(e,t){if(!y(r).includes(e.type))return!1;e.type===r.nodes.table_row&&(a=e.childCount>=l+1?e.child(l):null),a&&e==a&&i.push(o.resolve(t+1))}));var c=e.tr,u=i.reverse(),d=Array.isArray(u),f=0;for(u=d?u:u[Symbol.iterator]();;){var p;if(d){if(f>=u.length)break;p=u[f++]}else{if((f=u.next()).done)break;p=f.value}var b=p;c=c.delete(s+b.start()-1,s+b.end()+1)}t(c.scrollIntoView())}return!0}function T(e,t){if(!g(e))return!1;var r=e.selection,n=r.$from,o=r.$to;return n.start(-3)>=n.pos-3&&n.end(-3)<=o.pos+3?N(e,t):n.start(-1)>=n.pos-1&&n.end(-1)<=o.pos+1?C(e,t):!n.sameParent(o)}function E(e,t,n){if(-1!==n&&1!==n)return!1;if(!g(e))return!1;for(var o=e.selection.$head,a=-1;a>-4;a--){var l=o.index(a),i=o.node(a);if(i){if(i.maybeChild(l+n)){var s=-1===n?o.start()- -1*a*2:o.end()+-1*a*2;return t(e.tr.setSelection(r(0).Selection.near(e.tr.doc.resolve(s),1)).scrollIntoView()),!0}}}return 1===n?w(e,t):function(e,t){return k(e,t,!0)}(e,t)}function B(e,t){return E(e,t,1)}function N(e,t){var r=e.selection.$head;return t&&t(e.tr.deleteRange(r.start(-3)-1,r.end(-3)+1)),!0}function I(){return function(e){var t,r;function n(){return e.apply(this,arguments)||this}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=n.prototype;return o.oninit=function(t){var r=this;e.prototype.oninit.call(this,t),this.state=this.attrs.state,this.state.addItem(this.attrs.type,(function(e,t){return r.command(e,t)}),this.onEditorUpdate.bind(this)),this.numCols=h()(3),this.numRows=h()(4),this.labelCells=h()(!0)},o.getMenu=function(t){var r=this;if(!this.inTable())return e.prototype.getMenu.call(this,t);var n=function(e){return e.map((function(e){return m(l.a,{onclick:r.click.bind(r,e.command),onkeydown:r.keydown.bind(r,e.command)},app.translator.trans("askvortsov-markdown-tables.lib.composer.table_menu."+e.translation))}))},o=[{translation:"remove_column",command:j},{translation:"insert_column_before",command:S},{translation:"insert_column_after",command:A}],a=[{translation:"remove_row",command:C},{translation:"insert_row_before",command:x},{translation:"insert_row_after",command:M}];return m("ul",{className:"Dropdown-menu dropdown-menu TableDropdownMenu"},f()([].concat(n(o),[s.a.component()],n(a))))},o.fields=function(){var t=e.prototype.fields.call(this);return t.add("numCols",m("div",{className:"Form-group"},m("label",null,app.translator.trans("askvortsov-markdown-tables.lib.composer.table_menu.num_cols")),m("input",{className:"FormControl",name:"numCols",type:"number",placeholder:b()(app.translator.trans("askvortsov-markdown-tables.lib.composer.table_menu.num_cols")),bidi:this.numCols,required:!0})),10),t.add("numRows",m("div",{className:"Form-group"},m("label",null,app.translator.trans("askvortsov-markdown-tables.lib.composer.table_menu.num_rows")),m("input",{className:"FormControl",name:"numRows",type:"number",placeholder:b()(app.translator.trans("askvortsov-markdown-tables.lib.composer.table_menu.num_rows")),bidi:this.numRows,required:!0})),10),t.add("labelCells",m("div",{className:"Form-group"}
763,u.a.component({state:this.labelCells(),onchange:this.labelCells},app.translator.trans("askvortsov-markdown-tables.lib.composer.table_menu.label_cells"))),9),t},o.inTable=function(){return g(this.attrs.state.editorView.state)},o.onEditorUpdate=function(){this.currInTable=this.inTable()},o.keydown=function(e,t){" "!==t.key&&"Enter"!==t.key||this.click(e,t)},o.click=function(e,t){return t.preventDefault(),this.command=e,this.state.run(this.attrs.type)},o.insert=function(){var e,t,r;this.inTable()||(this.command=(e=parseInt(this.numRows()),t=parseInt(this.numCols()),r=this.labelCells(),void 0===e&&(e=4),void 0===t&&(t=3),void 0===r&&(r=!0),function(n,o){var a=n.schema;if(!o)return!0;var l=1,i=1,s=function(){return a.nodes.table_cell.create(null,a.text(r?"cell "+i++:" "))},c=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return a.nodes.table_row.create(null,t)},u=function(e,t){return a.nodes.table.createChecked(null,[e,t])}(function(e){return a.nodes.table_head.create(null,e)}(c.apply(void 0,Array(t).fill(0).map((function(){return a.nodes.table_header.create(null,a.text(r?"header "+l++:" "))})))),function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return a.nodes.table_body.create(null,t)}.apply(void 0,Array(e-1).fill(0).map((function(e){return c.apply(void 0,Array(t).fill(0).map(s))})))),d=n.tr.replaceSelectionWith(u);o(d.scrollIntoView());var f=n.apply(d),p=f.doc.nodeAt(f.tr.selection.to-1);return p&&p.type===a.nodes.text&&o((d=f.tr.insert(f.tr.selection.to,a.nodes.paragraph.create(null))).scrollIntoView()),!0}),this.state.run(this.attrs.type))},o.onEditorUpdate=function(){this.active=!!this.inTable(),this.$(".Dropdown-toggle").toggleClass("active",this.active)},n}(r(0).components.FormDropdown)}var $={"Mod-Enter":w,"Shift-Enter":w,Enter:B,Backspace:T,Delete:T,"Mod-Backspace":T,"Mod-Delete":T,Tab:B,"Shift-Tab":function(e,t){return E(e,t,-1)}},P={content:"table_head table_body*",isolating:!0,group:"block",selectable:!1,parseDOM:[{tag:"table"}],toDOM:function(){return["div",{class:"s-table-container"},["table",{class:"s-table"},0]]}},V={content:"table_row",isolating:!0,group:"table_block",selectable:!1,parseDOM:[{tag:"thead"}],toDOM:function(){return["thead",0]}},F={content:"table_row+",isolating:!0,group:"table_block",selectable:!1,parseDOM:[{tag:"tbody"}],toDOM:function(){return["tbody",0]}},R={content:"(table_cell | table_header)+",isolating:!0,group:"table_block",selectable:!1,parseDOM:[{tag:"tr"}],toDOM:function(){return["tr",0]}},L={content:"inline*",isolating:!0,group:"table_block",selectable:!1,attrs:{style:{default:null}},parseDOM:[{tag:"td",getAttrs:function(e){var t=e.style.textAlign;return t?{style:"text-align: "+t}:null}}],toDOM:function(e){return["td",e.attrs,0]}},z={content:"inline*",isolating:!0,group:"table_block",selectable:!1,attrs:{style:{default:null}},parseDOM:[{tag:"th",getAttrs:function(e){var t=e.style.textAlign;return t?{style:"text-align: "+t}:null}}],toDOM:function(e){return["th",e.attrs,0]}};function U(){if("askvortsov-rich-text"in flarum.extensions){var e=r(0).components.ProseMirrorMenu,t=I();Object(o.extend)(e.prototype,"items",(function(e){e.add("table",t.component({type:"table",icon:"fas fa-table",tooltip:app.translator.trans("askvortsov-markdown-tables.lib.composer.table_tooltip"),state:this.attrs.state}),10)}));var a=r(0).proseMirror.markdown.MarkdownSerializerBuilder;Object(o.extend)(a.prototype,"buildNodes",(function(e){var t=this.schema;e.table=function(e,r){function n(r){var n=[];return r.forEach((function(r){if(r.type===t.nodes.table_header||r.type===t.nodes.table_cell){var o=function(t){return e.write("| "),e.renderInline(t),e.write(" "),function(e){var t=e.attrs.style;if(!t)return null;var r=t.match(/text-align:[ ]?(left|right|center)/);if(r&&r[1])return r[1];return null}(t)}(r);n.push(o)}})),e.write("|"),e.ensureNewLine(),n}r.forEach((function(r){"table_head"===r.type.name&&function(r){var o=[];r.forEach((function(e){e.type===t.nodes.table_row&&(o=n(e))}));var a=o,l=Array.isArray(a),i=0;for(a=l?a:a[Symbol.iterator]();;){var s;if(l){if(i>=a.length)break;s=a[i++]}else{if((i=a.next()).done)break;s=i.value}var c=s;e.write("|"),e.write("left"===c||"center"===c?":":" "),e.write("---"),e.write("right"===c||"center"===c?":":" ")}e.write("|"),e.ensureNewLine()}(r),"table_body"===r.type.name&&(r.forEach((function(e){e.type===t.nodes.table_row&&n(e)})),e.ensureNewLine())})),e.ensureNewLine(),e.write("\n")}}));var l=r(0).proseMirror.markdown.MarkdownParserBuilder;Object(o.extend)(l.prototype,"buildTokens",(function(e){n(e,{table:{block:"table"},thead:{block:"table_head"},tbody:{block:"table_body"},th:{block:"table_header",getAttrs:function(e){return{style:e.attrGet("style")}}},tr:{block:"table_row"},td:{block:"table_cell",getAttrs:function(e){return{style:e.attrGet("style")}}}})})),Object(o.extend)(l.prototype,"buildTokenizer",(function(e){e.enable("table")}));var i=r(0).proseMirror.markdown.SchemaBuilder;Object(o.override)(i.prototype,"buildNodes",(function(e){return e().addBefore("image","table",P).addBefore("image","table_head",V).addBefore("image","table_body",F).addBefore("image","table_row",R).addBefore("image","table_cell",L).addBefore("image","table_header",z)}));var s=r(0).proseMirror.ProseMirrorEditorDriver;Object(o.extend)(s.prototype,"buildPluginItems",(function(e){e.add("tableKeymap",r(0).keymap($),10)}))}}r.d(t,"a",(function(){return U}))},function(e,t){e.exports=flarum.core.compat["components/Post"]},function(e,t,r){"use strict";r.r(t);var n=r(4),o=r.n(n),a=r(1),l=r(10),i=r.n(l),s=r(9);
763o.a.initializers.add("askvortsov-markdown-tables",(function(){Object(a.extend)(i.a.prototype,"oncreate",(function(){function e(e){var t=[],r=e.getElementsByTagName("th"),n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var l=a;t.push(l.textContent)}var i=e.getElementsByTagName("tr"),s=Array.isArray(i),c=0;for(i=s?i:i[Symbol.iterator]();;){var u;if(s){if(c>=i.length)break;u=i[c++]}else{if((c=i.next()).done)break;u=c.value}var d=-1,f=u.getElementsByTagName("td"),p=Array.isArray(f),b=0;for(f=p?f:f[Symbol.iterator]();;){var m;if(p){if(b>=f.length)break;m=f[b++]}else{if((b=f.next()).done)break;m=b.value}m.setAttribute("data-label",t[++d]||"")}}}var t=document.getElementsByTagName("table"),r=Array.isArray(t),n=0;for(t=r?t:t[Symbol.iterator]();;){var o;if(r){if(n>=t.length)break;o=t[n++]}else{if((n=t.next()).done)break;o=n.value}e(o)}})),Object(s.a)()}))}]);
764
765
766flarum.extensions['askvortsov-markdown-tables']=module.exports;
767
768var module={};
769
770module.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=10)}([,function(e,t){e.exports=flarum.core.compat["extensions/afrux-forum-widgets-core/common/extend/Widgets"]},function(e,t){e.exports=flarum.core.compat["common/app"]},function(e,t){e.exports=flarum.core.compat["common/helpers/icon"]},function(e,t){e.exports=flarum.core.compat["common/utils/classList"]},function(e,t){e.exports=flarum.core.compat["common/utils/Stream"]},function(e,t){e.exports=flarum.core.compat["extensions/afrux-forum-widgets-core/common/components/Widget"]},function(e,t,n){"use strict";var i=n(1),r=n.n(i);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=n(2),u=n.n(s),c=n(3),a=n.n(c),l=n(4),f=n.n(l),p=n(5),d=n.n(p),w=n(6),x=function(e){var t,n;function i(){for(var t,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(t=e.call.apply(e,[this].concat(i))||this).newslines=void 0,t.line=void 0,t.switching=void 0,t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n);var r=i.prototype;return r.oninit=function(t){e.prototype.oninit.call(this,t),this.newslines=u.a.forum.attribute("afrux-news-widget.lines"),this.line=d()({index:0,text:this.newslines[0]}),this.switching=!1},r.className=function(){return"Afrux-NewsWidget"},r.icon=function(){return"fas fa-bullhorn"},r.title=function(){return""},r.content=function(){var e,t=this;return this.newslines.length>1&&!this.switching&&(this.switching=!0,setTimeout((function(){var e=(t.line().index+1)%t.newslines.length;t.switching=!1,t.line({index:e,text:t.newslines[e]}),m.redraw()}),7e3)),this.newslines.length>1&&(e=this.newslines[(this.line().index-1+this.newslines.length)%this.newslines.length]),m("div",{className:"Afrux-NewsWidget-content"},m("div",{className:"Afrux-NewsWidget-icon"},a()("fas fa-bullhorn")),m("div",{className:"Afrux-NewsWidget-line-container"},this.newslines.map((function(n,i){return m("div",{className:f()(["Afrux-NewsWidget-line",t.line().index===i?"Afrux-NewsWidget-line--current":"",e===n?"Afrux-NewsWidget-line--previous":""]),key:i},m.trust(n))}))))},i}(n.n(w).a);t.a=function(e){(new r.a).add({key:"news",component:x,isDisabled:function(){return!e.forum.attribute("afrux-news-widget.lines").length},isUnique:!0,placement:"top",position:1}).extend(e,"afrux-news-widget")}},,,function(e,t,n){"use strict";n.r(t);var i=n(7);
770app.initializers.add("afrux/news-widget",(function(){Object(i.a)(app)}))}]);
771
772
773flarum.extensions['afrux-news-widget']=module.exports;
774
775//# sourceMappingURL=https://dashu.ai/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.