1flarum.core=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=135)}([function(t,e,n){"use strict";function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2),r=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=null),this.data=t,this.freshness=new Date,this.exists=!1,this.store=e}var e=t.prototype;return e.id=function(){return this.data.id},e.attribute=function(t){return this.data.attributes[t]},e.pushData=function(e){for(var n in e)if("object"==typeof e[n])for(var i in this.data[n]=this.data[n]||{},e[n])e[n][i]instanceof t&&(e[n][i]={data:t.getIdentifier(e[n][i])}),this.data[n][i]=e[n][i];else this.data[n]=e[n];this.freshness=new Date},e.pushAttributes=function(t){this.pushData({attributes:t})},e.save=function(e,n){var r=this;void 0===n&&(n={});var o={type:this.data.type,id:this.data.id,attributes:e};if(e.relationships){for(var s in o.relationships={},e.relationships){var a=e.relationships[s];o.relationships[s]={data:a instanceof Array?a.map(t.getIdentifier):t.getIdentifier(a)}}delete e.relationships}var c=this.copyData();this.pushData(o);var u={data:o};return n.meta&&(u.meta=n.meta),app.request(Object(i.a)({method:this.exists?"PATCH":"POST",url:app.forum.attribute("apiUrl")+this.apiEndpoint(),body:u},n)).then((function(t){return r.store.data[t.data.type]=r.store.data[t.data.type]||{},r.store.data[t.data.type][t.data.id]=r,r.store.pushPayload(t)}),(function(t){throw r.pushData(c),m.redraw(),t}))},e.delete=function(t,e){var n=this;return void 0===e&&(e={}),this.exists?app.request(Object(i.a)({method:"DELETE",url:app.forum.attribute("apiUrl")+this.apiEndpoint(),body:t},e)).then((function(){n.exists=!1,n.store.remove(n)})):Promise.resolve()},e.apiEndpoint=function(){return"/"+this.data.type+(this.exists?"/"+this.data.id:"")},e.copyData=function(){return JSON.parse(JSON.stringify(this.data))},t.attribute=function(t,e){return function(){var n=this.data.attributes&&this.data.attributes[t];return e?e(n):n}},t.hasOne=function(t){return function(){if(this.data.relationships){var e=this.data.relationships[t];if(e)return app.store.getById(e.data.type,e.data.id)}return!1}},t.hasMany=function(t){return function(){if(this.data.relationships){var e=this.data.relationships[t];if(e)return e.data.map((function(t){return app.store.getById(t.type,t.id)}))}return!1}},t.transformDate=function(t){return t?new Date(t):null},t.getIdentifier=function(t){return{type:t.data.type,id:t.data.id}},t}()},function(t,e,n){"use strict";function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(2),r=n(5),o=function(){function t(){Object(r.a)(this,"element",void 0),Object(r.a)(this,"attrs",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.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}
1((function(t){var e=$(this.element);return t?e.find(t):e})),t.component=function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var n=Object(i.a)({},t);return m(this,n,e)},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(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n(2),r=n(0),o=n(3),s=n(7),a=n(16),c=n(10),u=n(9),l=n(18),d=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(t){var e=Object(i.a)({},this.attrs);e.type=e.type||"button",e.title&&!t.children&&(e["aria-label"]=e.title),"object"==typeof e.title&&(e.title=Object(u.a)(e.title)),!e.title&&t.children&&(e.title=Object(u.a)(t.children));var n=Object(c.a)(e,"icon"),r=Object(c.a)(e,"loading");return(e.disabled||r)&&delete e.onclick,e.className=Object(a.a)([e.className,n&&"hasIcon",(e.disabled||r)&&"disabled",r&&"loading"]),m("button",e,this.getButtonContent(t.children))},n.getButtonContent=function(t){var e=this.attrs.icon;return[e&&!0!==e?Object(s.a)(e,{className:"Button-icon"}):"",t?m("span",{className:"Button-label"},t):"",this.attrs.loading?m(l.a,{size:"tiny",className:"LoadingIndicator--inline"}):""]},e}(o.a)},function(t,e,n){"use strict";function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(5),r=function(t,e){Object(i.a)(this,"content",void 0),Object(i.a)(this,"priority",void 0),Object(i.a)(this,"key",void 0),this.content=t,this.priority=e},o=function(){function t(){Object(i.a)(this,"items",{})}var e=t.prototype;return e.isEmpty=function(){for(var t in this.items)if(this.items.hasOwnProperty(t))return!1;return!0},e.has=function(t){return!!this.items[t]},e.get=function(t){return this.items[t].content},e.add=function(t,e,n){return void 0===n&&(n=0),this.items[t]=new r(e,n),this},e.replace=function(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),this.items[t]&&(null!==e&&(this.items[t].content=e),null!==n&&(this.items[t].priority=n)),this},e.remove=function(t){return delete this.items[t],this},e.merge=function(t){for(var e in t.items)t.items.hasOwnProperty(e)&&t.items[e]instanceof r&&(this.items[e]=t.items[e]);return this},e.toArray=function(){var t=[];for(var e in this.items)this.items.hasOwnProperty(e)&&this.items[e]instanceof r&&(this.items[e].content=Object(this.items[e].content),this.items[e].content.itemName=e,t.push(this.items[e]),this.items[e].key=t.length);return t.sort((function(t,e){return t.priority===e.priority?t.key-e.key:t.priority>e.priority?-1:1})).map((function(t){return t.content}))},t}()},function(t,e,n){"use strict";function i(t,e){return void 0===e&&(e={}),e.className="icon "+t+" "+(e.className||""),m("i",e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(25),r=n(16);function o(t){return t.tag===i.a}function s(t){return t instanceof Array||(t=[t]),function(t){var e,n=[];return t.filter(Boolean).forEach((function(i,r){(!o(i)||e&&!o(e)&&r!==t.length-1)&&(e=i,n.push(i))})),n}(t).map((function(t){var e=t.tag&&t.tag.isListItem,n=t.tag&&t.tag.isActive&&t.tag.isActive(t.attrs),i=t.attrs&&t.attrs.itemClassName||t.itemClassName;return e&&(t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key),e?t:m("li",{className:Object(r.a)([i,t.itemName&&"item-"+t.itemName,n&&"active"]),key:t.attrs&&t.attrs.key||t.itemName},t)}))}},function(t,e,n){"use strict";function i(t){return t instanceof Array?t.map((function(t){return i(t)})).join(""):"object"==typeof t&&null!==t?t.children?i(t.children):t.text:t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t,e){var n=t[e];return delete t[e],n}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(100),r=n.n(i);e.a=r.a},function(t,e,n){"use strict";var i=n(2),r=n(0),o=n(1),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e}(o.a);Object(i.a)(s.prototype,{nameSingular:o.a.attribute("nameSingular"),namePlural:o.a.attribute("namePlural"),color:o.a.attribute("color"),icon:o.a.attribute("icon"),isHidden:o.a.attribute("isHidden")}),s.ADMINISTRATOR_ID="1",s.GUEST_ID="2",s.MEMBER_ID="3",e.a=s},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),r=n(3),o=n(10),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(t){var e=t.attrs,n=e.options,i=void 0===n?{}:n,r=function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}(e,["options"]);r.href=r.href||"";var s=t.children||{tag:"#",children:t.text};return r.external?m("a",r,s):(r.href===m.route.get()&&("replace"in i||(i.replace=!0)),Object(o.a)(r,"force")&&("state"in i||(i.state={}),"key"in i.state||(i.state.key=Date.now())),r.options=i,m(m.route.
1Link,r,s))},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(22),r=n(0),o=n(5),s=n(3),a=n(23),c=n(4),u=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e=t.call.apply(t,[this].concat(r))||this,Object(o.a)(Object(i.a)(e),"alertAttrs",null),e}Object(r.a)(e,t);var n=e.prototype;return n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.attrs.animateShow((function(){return n.onready()}))},n.onbeforeremove=function(){if(!this.attrs.state.modal)return this.attrs.animateHide(),new Promise((function(t){return setTimeout(t,300)}))},n.view=function(){return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:"Modal modal-dialog "+this.className()},m("div",{className:"Modal-content"},this.constructor.isDismissible?m("div",{className:"Modal-close App-backControl"},c.a.component({icon:"fas fa-times",onclick:this.hide.bind(this),className:"Button Button--icon Button--link"})):"",m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),this.alertAttrs?m("div",{className:"Modal-alert"},a.a.component(this.alertAttrs)):"",this.content())))},n.className=function(){},n.title=function(){},n.content=function(){},n.onsubmit=function(){},n.onready=function(){this.$("form").find("input, select, textarea").first().focus().select()},n.hide=function(){this.attrs.state.close()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){this.alertAttrs=t.alert,m.redraw(),422===t.status&&t.response.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").select():this.onready()},e}(s.a);Object(o.a)(u,"isDismissible",!0)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),r=n(4),o=n(13),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.active=this.isActive(e),void 0===e.force&&(e.force=!0)},e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return n.tag=o.a,n.attrs.active=String(n.attrs.active),n},e.isActive=function(t){return void 0!==t.active?t.active:m.route.get()===t.href},e}(r.a)},function(t,e,n){"use strict";function i(t){var e;if(t instanceof Array)e=t.filter((function(t){return t}));else for(var n in e=[],t)t[n]&&e.push(n);return e.join(" ")}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),r=n(3),o=n(7),s=n(8),a=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t),e.initAttrs=function(t){t.className=t.className||"",t.buttonClassName=t.buttonClassName||"",t.menuClassName=t.menuClassName||"",t.label=t.label||"",t.caretIcon=void 0!==t.caretIcon?t.caretIcon:"fas fa-caret-down"};var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.showing=!1},n.view=function(t){var e=t.children?Object(s.a)(t.children):[];return m("div",{className:"ButtonGroup Dropdown dropdown "+this.attrs.className+" itemCount"+e.length+(this.showing?" open":"")},this.getButton(t.children),this.getMenu(e))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.$().on("shown.bs.dropdown",(function(){n.showing=!0,n.attrs.onshow&&n.attrs.onshow(),m.redraw();var t=n.$(".Dropdown-menu"),e=t.hasClass("Dropdown-menu--right");t.removeClass("Dropdown-menu--top Dropdown-menu--right"),t.toggleClass("Dropdown-menu--top",t.offset().top+t.height()>$(window).scrollTop()+$(window).height()),t.offset().top<0&&t.removeClass("Dropdown-menu--top"),t.toggleClass("Dropdown-menu--right",e||t.offset().left+t.width()>$(window).scrollLeft()+$(window).width())})),this.$().on("hidden.bs.dropdown",(function(){n.showing=!1,n.attrs.onhide&&n.attrs.onhide(),m.redraw()}))},n.getButton=function(t){return m("button",{className:"Dropdown-toggle "+this.attrs.buttonClassName,"data-toggle":"dropdown",onclick:this.attrs.onclick},this.getButtonContent(t))},n.getButtonContent=function(t){return[this.attrs.icon?Object(o.a)(this.attrs.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},this.attrs.label),this.attrs.caretIcon?Object(o.a)(this.attrs.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.attrs.menuClassName},t)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var i=n(2),r=n(0),o=n(3),s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},a={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",fadeColor:"transparent",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:"none",position:"absolute"},c=function(){function t(t){void 0===t&&(t={}),this.opts=s({},a,t)}return t.prototype.spin=function(t){var e,n,i,r=this;this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),d(this.el,{position:this.opts.position,width:0,zIndex:this.opts.zIndex,left:this.opts.left,top:this.opts.top,transform:"scale("+this.opts.scale+")"}
1),t&&t.insertBefore(this.el,t.firstChild||null),"undefined"!=typeof requestAnimationFrame?(e=requestAnimationFrame,n=function(){return performance.now()}):(e=function(t){return setTimeout(t,1e3/r.opts.fps)},n=function(){return Date.now()});var o=0,s=function(){var t,a,c=n();if(void 0===i&&(i=c-1),o+=(t=c-i,a=r.opts.speed,t/1e3*a),i=c,o>1&&(o-=Math.floor(o)),r.el.childNodes.length===r.opts.lines)for(var l=0;l<r.opts.lines;l++){var d=u(l,o,r.opts);r.el.childNodes[l].childNodes[0].style.opacity=d.toString()}r.animateId=r.el?e(s):void 0};return function(t,e){var n=Math.round(e.corners*e.width*500)/1e3+"px",i="none";!0===e.shadow?i="0 2px 4px #000":"string"==typeof e.shadow&&(i=e.shadow);for(var r=function(t){for(var e=/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/,n=[],i=0,r=t.split(",");i<r.length;i++){var o=r[i].match(e);if(null!==o){var s=+o[2],a=+o[5],c=o[4],u=o[7];0!==s||c||(c=u),0!==a||u||(u=c),c===u&&n.push({prefix:o[1]||"",x:s,y:a,xUnits:c,yUnits:u,end:o[8]})}}return n}(i),o=0;o<e.lines;o++){var s=~~(360/e.lines*o+e.rotate),a=d(document.createElement("div"),{position:"absolute",top:-e.width/2+"px",width:e.length+e.width+"px",height:e.width+"px",background:p(e.fadeColor,o),borderRadius:n,transformOrigin:"left",transform:"rotate("+s+"deg) translateX("+e.radius+"px)"}),c=d(document.createElement("div"),{width:"100%",height:"100%",background:p(e.color,o),borderRadius:n,boxShadow:h(r,s),opacity:e.opacity});a.appendChild(c),t.appendChild(a)}}(this.el,this.opts),s(),this},t.prototype.stop=function(){return this.el&&("undefined"!=typeof requestAnimationFrame?cancelAnimationFrame(this.animateId):clearTimeout(this.animateId),this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=void 0),this},t}();function u(t,e,n){var i=e-(t+1)/n.lines*n.direction;(i<0||i>1)&&(i+=n.direction);var r=1-i/(n.trail/100);return r<0?n.opacity:r*(1-n.opacity)+n.opacity}function l(t,e){if(void 0!==t.style[e])return e;var n="ms"+e.charAt(0).toUpperCase()+e.slice(1);return void 0!==t.style[n]?n:""}function d(t,e){for(var n in e)t.style[l(t,n)||n]=e[n];return t}function p(t,e){return"string"==typeof t?t:t[e%t.length]}function h(t,e){for(var n=[],i=0,r=t;i<r.length;i++){var o=r[i],s=f(o.x,o.y,e);n.push(o.prefix+s[0]+o.xUnits+" "+s[1]+o.yUnits+o.end)}return n.join(", ")}function f(t,e,n){var i=n*Math.PI/180,r=Math.sin(i),o=Math.cos(i);return[Math.round(1e3*(t*o+e*r))/1e3,Math.round(1e3*(-t*r+e*o))/1e3]}var v=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){var t=Object(i.a)({},this.attrs);return t.className="LoadingIndicator "+(t.className||""),delete t.size,m("div",t,m.trust(" "))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n={zIndex:"auto",color:this.$().css("color")};switch(this.attrs.size){case"large":Object(i.a)(n,{lines:10,length:8,width:4,radius:8});break;case"tiny":Object(i.a)(n,{lines:8,length:2,width:2,radius:3});break;default:Object(i.a)(n,{lines:8,length:4,width:3,radius:5})}new c(n).spin(this.element)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2);function r(t,e){void 0===e&&(e={}),e.className="Avatar "+(e.className||"");var n="",r="undefined"===e.title||e.title;if(r||delete e.title,t){var o=t.displayName()||"?",s=t.avatarUrl();if(r&&(e.title=e.title||o),s)return m("img",Object(i.a)({},e,{src:s,alt:""}));n=o.charAt(0).toUpperCase(),e.style={background:t.color()}}return m("span",e,n)}},function(t,e,n){"use strict";function i(t){var e=t&&t.displayName()||app.translator.trans("core.lib.username.deleted_text");return m("span",{className:"username"},e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i,r=e.slice(0,-1),o=e.slice(-1)[0],s={};return function(){var t=this,e=!1;return r.forEach((function(n){var i="function"==typeof t[n]?t[n]():t[n];s[n]!==i&&(e=!0,s[n]=i)})),e&&(i=o.apply(this,r.map((function(t){return s[t]})))),i}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(2),r=n(0),o=n(3),s=n(4),a=n(8),c=n(10),u=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(t){var e=Object(i.a)({},this.attrs),n=Object(c.a)(e,"type");e.className="Alert Alert--"+n+" "+(e.className||"");var r=Object(c.a)(e,"content")||t.children,o=Object(c.a)(e,"controls")||[],u=Object(c.a)(e,"dismissible"),l=Object(c.a)(e,"ondismiss"),d=[];return(u||void 0===u)&&d.push(m(s.a,{icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:l})),m("div",e,m("span",{className:"Alert-body"}
vendor: 4,114 bytes, line 1
1,r),m("ul",{className:"Alert-controls"},Object(a.a)(o.concat(d))))},e}(o.a)},function(t,e,n){"use strict";var i=n(78).a.Symbol;e.a=i},function(t,e,n){"use strict";var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(n(3).a);r.isListItem=!0,e.a=r},function(t,e,n){t.exports=function(){"use strict";var t="millisecond",e="second",n="minute",i="hour",r="day",o="week",s="month",a="quarter",c="year",u="date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|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("_")},h=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},f={s:h,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+h(i,2,"0")+":"+h(r,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var i=12*(n.year()-e.year())+(n.month()-e.month()),r=e.clone().add(i,s),o=n-r<0,a=e.clone().add(i+(o?-1:1),s);return+(-(i+(n-r)/(o?r-a:a-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(l){return{M:s,y:c,w:o,d:r,D:u,h:i,m:n,s:e,ms:t,Q:a}[l]||String(l||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},m="en",v={};v[m]=p;var g=function(t){return t instanceof x},b=function(t,e,n){var i;if(!t)return m;if("string"==typeof t)v[t]&&(i=t),e&&(v[t]=e,i=t);else{var r=t.name;v[r]=t,i=r}return!n&&i&&(m=i),i||!n&&m},y=function(t,e){if(g(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new x(n)},w=f;w.l=b,w.i=g,w.w=function(t,e){return y(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var x=function(){function p(t){this.$L=b(t.locale,null,!0),this.parse(t)}var h=p.prototype;return h.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(w.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(l);if(i){var r=i[2]-1||0,o=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},h.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()},h.$utils=function(){return w},h.isValid=function(){return!("Invalid Date"===this.$d.toString())},h.isSame=function(t,e){var n=y(t);return this.startOf(e)<=n&&n<=this.endOf(e)},h.isAfter=function(t,e){return y(t)<this.startOf(e)},h.isBefore=function(t,e){return this.endOf(e)<y(t)},h.$g=function(t,e,n){return w.u(t)?this[e]:this.set(n,t)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(t,a){var l=this,d=!!w.u(a)||a,p=w.p(t),h=function(t,e){var n=w.w(l.$u?Date.UTC(l.$y,e,t):new Date(l.$y,e,t),l);return d?n:n.endOf(r)},f=function(t,e){return w.w(l.toDate()[t].apply(l.toDate("s"),(d?[0,0,0,0]:[23,59,59,999]).slice(e)),l)},m=this.$W,v=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(p){case c:return d?h(1,0):h(31,11);case s:return d?h(1,v):h(0,v+1);case o:var y=this.$locale().weekStart||0,x=(m<y?m+7:m)-y;return h(d?g-x:g+(6-x),v);case r:case u:return f(b+"Hours",0);case i:return f(b+"Minutes",1);case n:return f(b+"Seconds",2);case e:return f(b+"Milliseconds",3);default:return this.clone()}},h.endOf=function(t){return this.startOf(t,!1)},h.$set=function(o,a){var l,d=w.p(o),p="set"+(this.$u?"UTC":""),h=(l={},l[r]=p+"Date",l[u]=p+"Date",l[s]=p+"Month",l[c]=p+"FullYear",l[i]=p+"Hours",l[n]=p+"Minutes",l[e]=p+"Seconds",l[t]=p+"Milliseconds",l)[d],f=d===r?this.$D+(a-this.$W):a;if(d===s||d===c){var m=this.clone().set(u,1);
1m.$d[h](f),m.init(),this.$d=m.set(u,Math.min(this.$D,m.daysInMonth())).$d}else h&&this.$d[h](f);return this.init(),this},h.set=function(t,e){return this.clone().$set(t,e)},h.get=function(t){return this[w.p(t)]()},h.add=function(t,a){var u,l=this;t=Number(t);var d=w.p(a),p=function(e){var n=y(l);return w.w(n.date(n.date()+Math.round(e*t)),l)};if(d===s)return this.set(s,this.$M+t);if(d===c)return this.set(c,this.$y+t);if(d===r)return p(1);if(d===o)return p(7);var h=(u={},u[n]=6e4,u[i]=36e5,u[e]=1e3,u)[d]||1,f=this.$d.getTime()+t*h;return w.w(f,this)},h.subtract=function(t,e){return this.add(-1*t,e)},h.format=function(t){var e=this;if(!this.isValid())return"Invalid Date";var n=t||"YYYY-MM-DDTHH:mm:ssZ",i=w.z(this),r=this.$locale(),o=this.$H,s=this.$m,a=this.$M,c=r.weekdays,u=r.months,l=function(t,i,r,o){return t&&(t[i]||t(e,n))||r[i].substr(0,o)},p=function(t){return w.s(o%12||12,t,"0")},h=r.meridiem||function(t,e,n){var i=t<12?"AM":"PM";return n?i.toLowerCase():i},f={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:w.s(a+1,2,"0"),MMM:l(r.monthsShort,a,u,3),MMMM:l(u,a),D:this.$D,DD:w.s(this.$D,2,"0"),d:String(this.$W),dd:l(r.weekdaysMin,this.$W,c,2),ddd:l(r.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(o),HH:w.s(o,2,"0"),h:p(1),hh:p(2),a:h(o,s,!0),A:h(o,s,!1),m:String(s),mm:w.s(s,2,"0"),s:String(this.$s),ss:w.s(this.$s,2,"0"),SSS:w.s(this.$ms,3,"0"),Z:i};return n.replace(d,(function(t,e){return e||f[t]||i.replace(":","")}))},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(t,u,l){var d,p=w.p(u),h=y(t),f=6e4*(h.utcOffset()-this.utcOffset()),m=this-h,v=w.m(this,h);return v=(d={},d[c]=v/12,d[s]=v,d[a]=v/3,d[o]=(m-f)/6048e5,d[r]=(m-f)/864e5,d[i]=m/36e5,d[n]=m/6e4,d[e]=m/1e3,d)[p]||m,l?v:w.a(v)},h.daysInMonth=function(){return this.endOf(s).$D},h.$locale=function(){return v[this.$L]},h.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),i=b(t,e,!0);return i&&(n.$L=i),n},h.clone=function(){return w.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},p}(),N=x.prototype;return y.prototype=N,[["$ms",t],["$s",e],["$m",n],["$H",i],["$W",r],["$M",s],["$y",c],["$D",u]].forEach((function(t){N[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),y.extend=function(t,e){return t.$i||(t(e,x,y),t.$i=!0),y},y.locale=b,y.isDayjs=g,y.unix=function(t){return y(1e3*t)},y.en=v[m],y.Ls=v,y.p={},y}()},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(26),r=n.n(i);n(76);function o(t){var e=r()(t),n=r()();e.isAfter(n)&&(e=n);return e.diff(r()())<-2592e6?e.year()===r()().year()?e.format("D MMM"):e.format("ll"):e.fromNow()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(2),r=n(0),o=n(3),s=n(7),a=n(10),c=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){var t=Object(i.a)({},this.attrs),e=Object(a.a)(t,"type"),n=Object(a.a)(t,"icon");return t.className="Badge "+(e?"Badge--"+e:"")+" "+(t.className||""),t.title=Object(a.a)(t,"label")||"",m("span",t,n?Object(s.a)(n,{className:"Badge-icon"}):m.trust(" "))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.attrs.label&&this.$().tooltip()},e}(o.a)},function(t,e,n){"use strict";function i(t,e,n,i,r,o){return{tag:t,key:e,attrs:n,children:i,text:r,dom:o,domSize:void 0,state:void 0,events:void 0,instance:void 0}}i.normalize=function(t){return Array.isArray(t)?i("[",void 0,void 0,i.normalizeChildren(t),void 0,void 0):null==t||"boolean"==typeof t?null:"object"==typeof t?t:i("#",void 0,void 0,String(t),void 0,void 0)},i.normalizeChildren=function(t){var e=[];if(t.length){for(var n=null!=t[0]&&null!=t[0].key,r=1;r<t.length;r++)if((null!=t[r]&&null!=t[r].key)!==n)throw new TypeError("Vnodes must either always have keys or never have keys!");for(r=0;r<t.length;r++)e[r]=i.normalize(t[r])}return e},t.exports=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),r=n(3),o=n(48),s=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),app.previous=app.current,app.current=ne
1w o.a(this.constructor,{routeName:this.attrs.routeName}),app.drawer.hide(),app.modal.close(),this.bodyClass="",this.scrollTopOnCreate=!0,this.useBrowserScrollRestoration=!0},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(){this.bodyClass&&$("#app").removeClass(this.bodyClass)},e}(r.a)},function(t,e,n){"use strict";function i(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function r(t){return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}function o(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 ").replace(/<img\b[^>]*>/gi," "),n=$("<div/>").html(e);return n.find(o.removeSelectors.join(",")).remove(),n.text().replace(/\s+/g," ").trim()}function s(t){return t.substr(0,1).toUpperCase()+t.substr(1)}n.r(e),n.d(e,"truncate",(function(){return i})),n.d(e,"slug",(function(){return r})),n.d(e,"getPlainContent",(function(){return o})),n.d(e,"ucfirst",(function(){return s})),o.removeSelectors=["blockquote","script"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),r=n(17),o=n(7);function s(t){var e=t.tag;return("string"!=typeof e||"a"===e||"button"===e)&&("initAttrs"in e&&e.initAttrs(t.attrs),"isActive"in e?e.isActive(t.attrs):t.attrs.active)}var a=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initAttrs=function(e){e.caretIcon=void 0!==e.caretIcon?e.caretIcon:"fas fa-sort",t.initAttrs.call(this,e),e.className+=" Dropdown--select"},e.prototype.getButtonContent=function(t){var e=t.find(s),n=e&&e.children||this.attrs.defaultLabel;return n instanceof Array&&(n=n[0]),[m("span",{className:"Button-label"},n),Object(o.a)(this.attrs.caretIcon,{className:"Button-caret"})]},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.group&&(e.icon=e.group.icon(),e.style={backgroundColor:e.group.color()},e.label=void 0===e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.id(),delete e.group)},e}(n(29).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(32);function r(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(e,"gi"),o=t,s=0;return n&&(e&&(s=Math.max(0,t.search(r)-n/2)),o=Object(i.truncate)(o,n,s)
1),o=$("<div/>").text(o).html(),e&&(o=o.replace(r,"<mark>$&</mark>")),m.trust(o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},r=function(){function t(t){this.callback=t,this.ticking=!1}var e=t.prototype;return e.loop=function(){var t=this;this.ticking||(i((function(){t.update(),t.ticking=!1})),this.ticking=!0)},e.update=function(){this.callback(window.pageYOffset)},e.start=function(){this.active||window.addEventListener("scroll",this.active=this.loop.bind(this),{passive:!0})},e.stop=function(){window.removeEventListener("scroll",this.active),this.active=null},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=(e.className||"")+" Checkbox--switch"},e.prototype.getDisplay=function(){return this.attrs.loading?t.prototype.getDisplay.call(this):""},e}(n(47).a)},function(t,e,n){"use strict";e.a=function(t,e){return function(){e(this.getAttribute(t)||this[t])}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(2),r=n(5),o=function(){function t(t,e){Object(r.a)(this,"component",void 0),Object(r.a)(this,"routeName",void 0),this.component=t,this.routeName=e}var e=t.prototype;return e.makeKey=function(){return this.routeName+JSON.stringify(m.route.param())},e.makeAttrs=function(t){return Object(i.a)({},t.attrs,{routeName:this.routeName})},e.onmatch=function(t,e,n){return this.component},e.render=function(t){return[Object(i.a)({},t,{attrs:this.makeAttrs(t),key:this.makeKey()})]},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(5),r=n(99),o=n.n(r),s=function(){function t(t,e){Object(i.a)(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 i=function(t){e.inputListeners.forEach((function(t){t()})),t.redraw=!1};this.el.oninput=function(t){e.oninput(n.el.value),i(t)},this.el.onclick=i,this.el.onkeyup=i,this.el.addEventListener("keydown",(function(t){(t.metaKey||t.ctrlKey)&&"Enter"===t.key&&e.onsubmit()})),t.append(this.el)},e.setValue=function(t){$(this.el).val(t).trigger("input"),this.el.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))},e.moveCursorTo=function(t){this.setSelectionRange(t,t)},e.getSelectionRange=function(){return[this.el.selectionStart,this.el.selectionEnd]},e.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){var i=this.el.value,r=i.slice(0,t),o=i.slice(e);this.setValue(""+r+n+o),this.moveCursorTo(t+n.length)},e.replaceBeforeCursor=function(t,e){this.insertBetween(t,this.el.selectionStart,e)},e.setSelectionRange=function(t,e){this.el.setSelectionRange(t,e),this.focus()},e.getCaretCoordinates=function(t){var e=o()(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}()},function(t,e,n){"use strict";n.r(e),n.d(e,"extend",(function(){return r})),n.d(e,"override",(function(){return o}));var i=n(2);function r(t,e,n){var r=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var o=r?r.apply(this,e):void 0;return n.apply(this,[o].concat(e)),o},Object(i.a)(t[e],r)}function o(t,e,n){var r=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n.apply(this,[r.bind(this)].concat(e))},Object(i.a)(t[e],r)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),r=n(3),o=n(8),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(t){return m("fieldset",{className:this.attrs.className},m("legend",null,this.attrs.label),m("ul",null,Object(o.a)(t.children)))},e}(r.a)},function(t,e,n){"use strict";function i(t,e){return t&&(t===e||t.prototype instanceof e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(26),r=n.n(i),o=n(28);function s(t){var e=r()(t),n=e.format(),i=e.format("LLLL"),s=Object(o.a)(t);return m("time",{pubdate:!0,datetime:n,title:i,"data-humantime":!0},s)}},function(t,e,n){"use strict";e.a=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(2),r=n(0),o=n(1),s=n(21),a=n(6),c=n(29),u=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e}(o.a);Object(i.a)(u.prototype,{title:o.a.attribute("title"),slug:o.a.attribute("slug"),createdAt:o.a.attribute("createdAt",o.a.transformDate),user:o.a.hasOne("user"),firstPost:o.a.hasOne("firstPost"),lastPostedAt:o.a.attribute("lastPostedAt",o.a.transformDate),lastPostedUser:o.a.hasOne("lastPostedUser"),lastPost:o.a.hasOne("lastPost"),lastPostNumber:o.a.attribute("lastPostNumber"),commentCount:o.a.attribute("commentCount"),replyCount:Object(s.a)("commentCount",(function(t){return Math.max(0,t-1)})),posts:o.a.hasMany("posts"),mostRelevantPost:o.a.hasOne("mostRelevantPost"),lastReadAt:o.a.attribute("lastReadAt",o.a.transformDate),lastReadPostNumber:o.a.attribute("lastReadPostNumber"),isUnread:Object(s.a)("unreadCount",(function(t){return!!t})),isRead:Object(s.a)("unreadCount",(function(t){return app.session.user&&!t})),hiddenAt:o.a.attribute("hiddenAt",o.a.transformDate),hiddenUser:o.a.hasOne("hiddenUser"),isHidden:Object(s.a)("hiddenAt",(function(t){return!!t})),canReply:o.a.attribute("canReply"),canRename:o.a.attribute("canRename"),canHide:o.a.attribute("canHide"),canDelete:o.a.attribute("canDelete"),removePost:function(t){var e=this.data.relationships,n=e&&e.posts;n&&n.data.some((function(e,i){if(t===e.id)return n.data.splice(i,1),!0}))},unreadCount:function(){var t=app.session.user;if(t&&t.markedAllAsReadAt()<this.lastPostedAt()){var e=Math.max(0,this.lastPostNumber()-(this.lastReadPostNumber()||0));return Math.min(e,this.commentCount())}return 0},badges:function(){var t=new a.a;return this.isHidden()&&t.add("hidden",m(c.a,{type:"hidden",icon:"fas fa-tras
1h",label:app.translator.trans("core.lib.badge.hidden_tooltip")})),t},postIds:function(){var t=this.data.relationships.posts;return t?t.data.map((function(t){return t.id})):[]}})},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(0),r=n(3),o=n(18),s=n(7),a=n(16),c=n(38),u=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.view=function(t){"0"===this.attrs.state&&(this.attrs.state=!1);var e=Object(a.a)(["Checkbox",this.attrs.state?"on":"off",this.attrs.className,this.attrs.loading&&"loading",this.attrs.disabled&&"disabled"]);return m("label",{className:e},m("input",{type:"checkbox",checked:this.attrs.state,disabled:this.attrs.disabled,onchange:Object(c.a)("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display"},this.getDisplay()),t.children)},n.getDisplay=function(){return this.attrs.loading?m(o.a,{size:"tiny"}):Object(s.a)(this.attrs.state?"fas fa-check":"fas fa-times")},n.onchange=function(t){this.attrs.onchange&&this.attrs.onchange(t,this)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(43),r=function(){function t(t,e){void 0===e&&(e={}),this.type=t,this.data=e}var e=t.prototype;return e.matches=function(t,e){var n=this;return void 0===e&&(e={}),!!Object(i.a)(this.type,t)&&Object.keys(e).every((function(t){return n.data[t]===e[t]}))},e.get=function(t){return this.data[t]},e.set=function(t,e){this.data[t]=e},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(5),r=function(t,e,n,r){Object(i.a)(this,"status",void 0),Object(i.a)(this,"options",void 0),Object(i.a)(this,"xhr",void 0),Object(i.a)(this,"responseText",void 0),Object(i.a)(this,"response",void 0),Object(i.a)(this,"alert",void 0),this.status=t,this.responseText=e,this.options=n,this.xhr=r;try{this.response=JSON.parse(e)}catch(t){this.response=null}this.alert=null}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),r=n(3),o=n(4),s=n(15),a=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.view=function(){var t=app,e=t.history,n=t.pane;return m("div",{className:"Navigation ButtonGroup "+(this.attrs.className||""),onmouseenter:n&&n.show.bind(n),onmouseleave:n&&n.onmouseleave.bind(n)},e.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.getBackButton=function(){var t=app.history,e=t.getPrevious()||{};return s.a.component({className:"Button Navigation-back Button--icon",href:t.backUrl(),icon:"fas fa-chevron-left",title:e.title,onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),t.back())}})},n.getPaneButton=function(){var t=app.pane;return t&&t.active?o.a.component({className:"Button Button--icon Navigation-pin"+(t.pinned?" active":""),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):""},n.getDrawerButton=function(){if(!this.attrs.drawer)return"";var t=app.drawer,e=app.session.user;return o.a.component({className:"Button Button--icon Navigation-drawer"+(e&&e.newNotificationCount()?" new":""),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars"})},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2);function r(t,e,n){void 0===e&&(e=null),void 0===n&&(n={});var r=Object(i.a)({},n);r.state=r.state||{},r.state.key=Date.now(),m.route.set(t,e,r)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=e,this.data={},this.needsRebuild()}var e=t.prototype;return e.needsRebuild=function(){var t=this,e=!1;return this.callbacks.forEach((function(n,i){var r=n();r!==t.data[i]&&(t.data[i]=r,e=!0)})),e},e.check=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=this.callbacks.concat(e),this.needsRebuild()},e.invalidate=function(){this.data={}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(0),r=n(3),o=n(6),s=n(8),a=n(4),c=n(40),u=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.value=this.attrs.value||"",this.disabled=!!this.attrs.disabled},n.view=function(){return m("div",{className:"TextEditor"},m("div",{className:"TextEditor-editorContainer"}
1),m("ul",{className:"TextEditor-controls Composer-footer"},Object(s.a)(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(){var t=!!this.attrs.disabled;this.disabled!==t&&(this.disabled=t,this.attrs.composer.editor.disabled(t))},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 c.a(t,this.buildEditorParams())},n.controlItems=function(){var t=new o.a;return t.add("submit",a.a.component({icon:"fas fa-paper-plane",className:"Button Button--primary",itemClassName:"App-primaryControl",onclick:this.onsubmit.bind(this)},this.attrs.submitLabel)),this.attrs.preview&&t.add("preview",a.a.component({icon:"far fa-eye",className:"Button Button--icon",onclick:this.attrs.preview,title:app.translator.trans("core.forum.composer.preview_tooltip"),oncreate:function(t){return $(t.dom).tooltip()}})),t},n.toolbarItems=function(){return new o.a},n.oninput=function(t){this.value=t,this.attrs.onchange(this.value)},n.onsubmit=function(){this.attrs.onsubmit(this.value)},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.attrs.text))},e}(n(3).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(2),r=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.state.modal;return m("div",{className:"ModalManager modal fade"},t?t.componentClass.component(Object(i.a)({},t.attrs,{animateShow:this.animateShow.bind(this),animateHide:this.animateHide.bind(this),state:this.attrs.state})):"")},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$().on("hidden.bs.modal",this.attrs.state.close.bind(this.attrs.state))},n.animateShow=function(t){var e=!!this.attrs.state.modal.componentClass.isDismissible;this.$().hasClass("in")?t():this.$().one("shown.bs.modal",t).modal({backdrop:e||"static",keyboard:e}).modal("show")},n.animateHide=function(){this.$().modal("hide")},e}(n(3).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(2),r=n(0),o=n(3),s=(n(23),function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.view=function(){var t=this;return m("div",{className:"AlertManager"},Object.entries(this.state.getActiveAlerts()).map((function(e){var n=e[0],r=e[1];return m("div",{className:"AlertManager-alert"},m(r.componentClass,Object(i.a)({},r.attrs,{ondismiss:t.state.dismiss.bind(t.state,n)}),r.children))})))},e}(o.a))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return this.attrs.error.xhr?this.attrs.error.xhr.status+" "+this.attrs.error.xhr.statusText:""},n.content=function(){var t,e=this.attrs,n=e.error,i=e.formattedError;if(i)t=i.join("\n\n");else try{var r=n.response||JSON.parse(n.responseText);t=JSON.stringify(r,null,2)}catch(e){t=n.responseText}return m("div",{className:"Modal-body"},m("pre",null,this.attrs.error.options.method," ",this.attrs.error.options.url,m("br",null),m("br",null),t))},e}(n(14).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(2),r=n(20),o=n(10),s=function(){function t(){this.translations={},this.locale=null}var e=t.prototype;return e.addTranslations=function(t){Object(i.a)(this.translations,t)},e.trans=function(t,e){var n=this.translations[t];return n?this.apply(n,e||{}):t},e.transChoice=function(t,e,n){var i=this.translations[t];return i?(e=parseInt(e,10),i=this.pluralize(i,e),this.apply(i,n||{})):t},e.apply=function(t,e){if("user"in e){var n=Object(o.a)(e,"user");e.username||(e.username=Object(r.a)(n))}t=t.split(new RegExp("({[a-z0-9_]+}|</?[a-z0-9_]+>)","gi"));var i=[],s=[i];return t.forEach((function(t){var n=t.match(new RegExp("{([a-z0-9_]+)}|<(/?)([a-z0-9_]+)>","i"));if(n){if(n[1])s[0].push(e[n[1]]);else if(n[3])if(n[2]){var i,r=s[0].splice(0,s[0].length);(i=s[0]).push.apply(i,m.fragment(r).children),s.shift()}else{var o=e[n[3]]||{tag:n[3],children:[]};s[0].push(o),s.unshift(o.children||o)}}else s[0].push(t)})),i.filter((function(t){return t}))},e.pluralize=function(t,e){var n=this,i=new RegExp(/^\w+\: +(.+)$/),r=new RegExp(/^\s*((\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]]))\s?(.+?)$/),o=new RegExp(/^\s*(\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\}
1)|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]])/),s=[],a=[];return t.split("|").forEach((function(t){if(r.test(t)){var e=t.match(r);a[e[0]]=e[e.length-1]}else if(i.test(t)){var n=t.match(i);s.push(n[1])}else s.push(t)})),a.forEach((function(t,i){if(o.test(i)){var r=i.match(o);if(r[1]){var s=r[2].split(",");for(var c in s)if(e==s[c])return a[i]}else{var u=n.convertNumber(r[4]),l=n.convertNumber(r[5]);if(("["===r[3]?e>=u:e>u)&&("]"===r[6]?e<=l:e<l))return a[i]}}})),s[this.pluralPosition(e,this.locale)]||s[0]||void 0},e.convertNumber=function(t){return"-Inf"===t?Number.NEGATIVE_INFINITY:"+Inf"===t||"Inf"===t?Number.POSITIVE_INFINITY:parseInt(t,10)},e.pluralPosition=function(t,e){switch("pt_BR"===e&&(e="xbr"),e.length>3&&(e=e.split("_")[0]),e){case"bo":case"dz":case"id":case"ja":case"jv":case"ka":case"km":case"kn":case"ko":case"ms":case"th":case"vi":case"zh":return 0;case"af":case"az":case"bn":case"bg":case"ca":case"da":case"de":case"el":case"en":case"eo":case"es":case"et":case"eu":case"fa":case"fi":case"fo":case"fur":case"fy":case"gl":case"gu":case"ha":case"he":case"hu":case"is":case"it":case"ku":case"lb":case"ml":case"mn":case"mr":case"nah":case"nb":case"ne":case"nl":case"nn":case"no":case"om":case"or":case"pa":case"pap":case"ps":case"pt":case"so":case"sq":case"sv":case"sw":case"ta":case"te":case"tk":case"tr":case"ur":case"zu":return 1==t?0:1;case"am":case"bh":case"fil":case"fr":case"gun":case"hi":case"ln":case"mg":case"nso":case"xbr":case"ti":case"wa":return 0===t||1==t?0:1;case"be":case"bs":case"hr":case"ru":case"sr":case"uk":return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2;case"cs":case"sk":return 1==t?0:t>=2&&t<=4?1:2;case"ga":return 1==t?0:2==t?1:2;case"lt":return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2;case"sl":return t%100==1?0:t%100==2?1:t%100==3||t%100==4?2:3;case"mk":return t%10==1?0:1;case"mt":return 1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3;case"lv":return 0===t?0:t%10==1&&t%100!=11?1:2;case"pl":return 1==t?0:t%10>=2&&t%10<=4&&(t%100<12||t%100>14)?1:2;case"cy":return 1==t?0:2==t?1:8==t||11==t?2:3;case"ro":return 1==t?0:0===t||t%100>0&&t%100<20?1:2;case"ar":return 0===t?0:1==t?1:2==t?2:t>=3&&t<=10?3:t>=11&&t<=99?4:5;default:return 0}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2),r=function(){function t(t){this.data={},this.models=t}var e=t.prototype;return e.pushPayload=function(t){t.included&&t.included.map(this.pushObject.bind(this));var e=t.data instanceof Array?t.data.map(this.pushObject.bind(this)):this.pushObject(t.data);return e.payload=t,e},e.pushObject=function(t){if(!this.models[t.type])return null;var e=this.data[t.type]=this.data[t.type]||{};return e[t.id]?e[t.id].pushData(t):e[t.id]=this.createRecord(t.type,t),e[t.id].exists=!0,e[t.id]},e.find=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={});var o=n,s=app.forum.attribute("apiUrl")+"/"+t;return e instanceof Array?s+="?filter[id]="+e.join(","):"object"==typeof e?o=e:e&&(s+="/"+e),app.request(Object(i.a)({method:"GET",url:s,params:o},r)).then(this.pushPayload.bind(this))},e.getById=function(t,e){return this.data[t]&&this.data[t][e]},e.getBy=function(t,e,n){return this.all(t).filter((function(t){return t[e]()===n}))[0]},e.all=function(t){var e=this.data[t];return e?Object.keys(e).map((function(t){return e[t]})):[]},e.remove=function(t){delete this.data[t.data.type][t.id()]},e.createRecord=function(t,e){return void 0===e&&(e={}),e.type=e.type||t,new this.models[t](e,this)},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2),r=function(){function t(t,e){this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),app.request(Object(i.a)({method:"POST",url:app.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location=app.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){var t=this;$("#content").click((function(e){t.isOpen()&&(e.preventDefault(),t.hide())}))}var e=t.prototype;
1return e.isOpen=function(){return $("#app").hasClass("drawerOpen")},e.hide=function(){$("#app").removeClass("drawerOpen"),this.$backdrop&&this.$backdrop.remove()},e.show=function(){var t=this;$("#app").addClass("drawerOpen"),this.$backdrop=$("<div/>").addClass("drawer-backdrop fade").appendTo("body").click((function(){return t.hide()})),setTimeout((function(){return t.$backdrop.addClass("in")}))},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(39);function r(t,e){void 0===e&&(e="");var n={};for(var r in t){var o=t[r];if("resolver"in o)n[e+o.path]=o.resolver;else{if(!("component"in o))throw new Error("Either a resolver or a component must be provided for the route ["+r+"]");var s="resolverClass"in o?o.resolverClass:i.a;n[e+o.path]=new s(o.component,r)}}return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(28);function r(){$("[data-humantime]").each((function(){var t=$(this),e=Object(i.a)(t.attr("datetime"));t.html(e)}))}function o(){setInterval(r,1e4)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(n(1).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(2),r=n(0),o=n(1),s=n(66),a=n(6),c=n(21),u=n(34),l=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e}(o.a);Object(i.a)(l.prototype,{username:o.a.attribute("username"),slug:o.a.attribute("slug"),displayName:o.a.attribute("displayName"),email:o.a.attribute("email"),isEmailConfirmed:o.a.attribute("isEmailConfirmed"),password:o.a.attribute("password"),avatarUrl:o.a.attribute("avatarUrl"),preferences:o.a.attribute("preferences"),groups:o.a.hasMany("groups"),joinTime:o.a.attribute("joinTime",o.a.transformDate),lastSeenAt:o.a.attribute("lastSeenAt",o.a.transformDate),markedAllAsReadAt:o.a.attribute("markedAllAsReadAt",o.a.transformDate),unreadNotificationCount:o.a.attribute("unreadNotificationCount"),newNotificationCount:o.a.attribute("newNotificationCount"),discussionCount:o.a.attribute("discussionCount"),commentCount:o.a.attribute("commentCount"),canEdit:o.a.attribute("canEdit"),canEditCredentials:o.a.attribute("canEditCredentials"),canEditGroups:o.a.attribute("canEditGroups"),canDelete:o.a.attribute("canDelete"),avatarColor:null,color:Object(c.a)("username","avatarUrl","avatarColor",(function(t,e,n){return n?"rgb("+n.join(", ")+")":e?(this.calculateAvatarColor(),""):"#"+Object(s.a)(t)})),isOnline:function(){return dayjs().subtract(5,"minutes").isBefore(this.lastSeenAt())},badges:function(){var t=new a.a,e=this.groups();return e&&e.forEach((function(e){t.add("group"+e.id(),u.a.component({group:e}))})),t},calculateAvatarColor:function(){var t=new Image,e=this;t.onload=function(){var t=new ColorThief;e.avatarColor=t.getColor(this),e.freshness=new Date,m.redraw()},t.crossOrigin="anonymous",t.src=this.avatarUrl()},savePreferences:function(t){var e=this.preferences();return Object(i.a)(e,t),this.save({preferences:e})}})},function(t,e,n){"use strict";function i(t){for(var e=0,n=0;n<t.length;n++)e+=t.charCodeAt(n);var i=function(t,e,n){var i,r,o,s=Math.floor(6*t),a=6*t-s,c=n*(1-e),u=n*(1-a*e),l=n*(1-(1-a)*e);switch(s%6){case 0:i=n,r=l,o=c;break;case 1:i=u,r=n,o=c;break;case 2:i=c,r=n,o=l;break;case 3:i=c,r=u,o=n;break;case 4:i=l,r=c,o=n;break;case 5:i=n,r=c,o=u}return{r:Math.floor(255*i),g:Math.floor(255*r),b:Math.floor(255*o)}}(e%360/360,.3,.9);return""+i.r.toString(16)+i.g.toString(16)+i.b.toString(16)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(2),r=n(0),o=n(1),s=n(21),a=n(32),c=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e}(o.a);Object(i.a)(c.prototype,{number:o.a.attribute("number"),discussion:o.a.hasOne("discussion"),createdAt:o.a.attribute("createdAt",o.a.transformDate),user:o.a.hasOne("user"),contentType:o.a.attribute("contentType"),content:o.a.attribute("content"),contentHtml:o.a.attribute("contentHtml"),contentPlain:Object(s.a)("contentHtml",a.getPlainContent),editedAt:o.a.attribute("editedAt",o.a.transformDate),editedUser:o.a.hasOne("editedUser"),isEdited:Object(s.a)("editedAt",(function(t){return!!t})),hiddenAt:o.a.attribute("hiddenAt",o.a.transformDate),hiddenUser:o.a.hasOne("hiddenUser"),isHidden:Object(s.a)("hiddenAt",(function(t){return!!t})),canEdit:o.a.attribute("canEdit"),canHide:o.a.attribute("canHide"),canDelete:o.a.attribute("canDelete")})},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(2),r=n(0),o=n(1),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e}(o.a);Object(i.a)(s.prototype,{contentType:o.a.attribute("contentType"),content:o.a.attribute("content"),createdAt:o.a.attribute("createdAt",o.a.transformDate),isRead:o.a.attribute("isRead"),user:o.a.hasOne("user"),fromUser:o.a.hasOne("fromUser"),subject:o.a.hasOne("subject")})},function(t,e,n){"use strict";e.a=function(t,e){var n=new RegExp("(\\w+\\/)?("+e+"|common)\\/");return new Proxy(t,{get:function(t,e){return t[e]||t[e.replace(n,"$1")]}})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return G}));var i=n(2),r=n(5),o=n(6),s=n(4),a=n(55),c=n(56),u=n(57),l=n(58),d=n(59),p=n(60),h=n(10),f=n(61),v=n(62),g=n(49),b=n(36),y=n(63),w=n(41),x=n(64),N=n(65),
1C=n(46),O=n(67),T=n(12),k=n(68);var j=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t},S=n(24),A=n(87),E=n(45);var P=function(t){return Object(E.a)(t)&&"[object Arguments]"==Object(A.a)(t)},D=Object.prototype,_=D.hasOwnProperty,I=D.propertyIsEnumerable,M=P(function(){return arguments}())?P:function(t){return Object(E.a)(t)&&_.call(t,"callee")&&!I.call(t,"callee")},L=n(79),R=S.a?S.a.isConcatSpreadable:void 0;var B=function(t){return Object(L.a)(t)||M(t)||!!(R&&t&&t[R])};var H=function t(e,n,i,r,o){var s=-1,a=e.length;for(i||(i=B),o||(o=[]);++s<a;){var c=e[s];n>0&&i(c)?n>1?t(c,n-1,i,r,o):j(o,c):r||(o[o.length]=c)}return o};var U=function(t){return(null==t?0:t.length)?H(t,1/0):[]},F=n(48),q=n(14),z=function(){function t(){this.modal=null}var e=t.prototype;return e.show=function(t,e){if(!(t.prototype instanceof q.a))throw console.error("The ModalManager can only show Modals"),new Error("The ModalManager can only show Modals");if(t.init)throw console.error("The componentClass parameter must be a modal class, not a modal instance. Whichever extension triggered this modal should be updated to comply with beta 14."),new Error("The componentClass parameter must be a modal class, not a modal instance. Whichever extension triggered this modal should be updated to comply with beta 14.");clearTimeout(this.closeTimeout),this.modal={componentClass:t,attrs:e},m.redraw.sync()},e.close=function(){var t=this;this.modal&&(this.closeTimeout=setTimeout((function(){t.modal=null,m.redraw()})))},t}(),W=n(23),V=function(){function t(){Object(r.a)(this,"activeAlerts",{}),Object(r.a)(this,"alertId",0)}var e=t.prototype;return e.getActiveAlerts=function(){return this.activeAlerts},e.show=function(t,e,n){var i,r=W.a,o={};if(1==arguments.length?i=t:2==arguments.length?(o=t,i=e):3==arguments.length&&(r=t,o=e,i=n),o===W.a||o instanceof W.a)throw console.error("The AlertManager can only show Alerts. Whichever extension triggered this alert should be updated to comply with beta 14."),new Error("The AlertManager can only show Alerts. Whichever extension triggered this alert should be updated to comply with beta 14.");return this.activeAlerts[++this.alertId]={children:i,attrs:o,componentClass:r},m.redraw(),this.alertId},e.dismiss=function(t){t&&t in this.activeAlerts&&(delete this.activeAlerts[t],m.redraw())},e.clear=function(){this.activeAlerts={},m.redraw()},t}();function Y(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return K(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=t[Symbol.iterator]()).next.bind(n)}function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var G=function(){function t(){Object(r.a)(this,"forum",null),Object(r.a)(this,"routes",{}),Object(r.a)(this,"initializers",new o.a),Object(r.a)(this,"session",null),Object(r.a)(this,"translator",new l.a),Object(r.a)(this,"store",new d.a({forums:x.a,users:N.a,discussions:C.a,posts:O.a,groups:T.a,notifications:k.a})),Object(r.a)(this,"cache",{}),Object(r.a)(this,"booted",!1),Object(r.a)(this,"requestErrorAlert",null),Object(r.a)(this,"current",new F.a(null)),Object(r.a)(this,"previous",new F.a(null)),Object(r.a)(this,"modal",new z),Object(r.a)(this,"alerts",new V),Object(r.a)(this,"data",void 0),Object(r.a)(this,"title",""),Object(r.a)(this,"titleCount",0)}var e=t.prototype;return e.load=function(t){this.data=t,this.translator.locale=t.locale},e.boot=function(){var t=this;this.initializers.toArray().forEach((function(e){return e(t)})),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums",1),this.session=new p.a(this.store.getById("users",this.data.session.userId),this.data.session.csrfToken),this.mount()},e.bootExtensions=function(t){var e=this;Object.keys(t).forEach((function(n){for(var i,r=t[n],o=Y(U(r.extend));!(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 a.a.component({
1state:e.modal})}}),m.mount(document.getElementById("alerts"),{view:function(){return c.a.component({state:e.alerts})}}),this.drawer=new f.a,m.route(document.getElementById("content"),t+"/",Object(v.a)(this.routes,t));var n=new b.a((function(t){var e=$("#app"),n=e.offset().top;e.toggleClass("affix",t>=n).toggleClass("scrolled",t>n),$(".App-header").toggleClass("navbar-fixed-top",t>=n)}));n.start(),n.update(),$((function(){$("body").addClass("ontouchstart"in window?"touch":"no-touch")})),Object(y.a)()},e.preloadedApiDocument=function(){if(this.data.apiDocument){var t=this.store.pushPayload(this.data.apiDocument);return this.data.apiDocument=null,t}return null},e.screen=function(){return getComputedStyle(document.documentElement).getPropertyValue("--flarum-screen")},e.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){var t=this.titleCount?"("+this.titleCount+") ":"",e=this.title&&m.route.get()!==this.forum.attribute("basePath")+"/"?this.title+" - ":"",n=this.forum.attribute("title");document.title=t+e+n},e.request=function(t){var e=this,n=Object(i.a)({},t);if(n.background=n.background||!0,Object(w.extend)(n,"config",(function(t,n){return n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),"GET"!==n.method&&"POST"!==n.method){var r=n.method;Object(w.extend)(n,"config",(function(t,e){return e.setRequestHeader("X-HTTP-Method-Override",r)})),n.method="POST"}n.deserialize=n.deserialize||function(t){return t},n.errorHandler=n.errorHandler||function(t){throw t};var o=n.extract;return n.extract=function(t){var e;e=o?o(t.responseText):t.responseText||null;var i=t.status;if(i<200||i>299)throw new g.a(i,e,n,t);if(t.getResponseHeader){var r=t.getResponseHeader("X-CSRF-Token");r&&(app.session.csrfToken=r)}try{return JSON.parse(e)}catch(i){throw new g.a(500,e,n,t)}},this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),m.request(n).then((function(t){return t}),(function(t){var i;switch(t.status){case 422:i=t.response.errors.map((function(t){return[t.detail,m("br",null)]})).reduce((function(t,e){return t.concat(e)}),[]).slice(0,-1);break;case 401:case 403:i=app.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:i=app.translator.trans("core.lib.error.not_found_message");break;case 429:i=app.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:i=app.translator.trans("core.lib.error.generic_message")}var r=app.forum.attribute("debug"),o=t.response&&t.response.errors,a=Array.isArray(o)&&o[0]&&o[0].detail&&o.map((function(t){return decodeURI(t.detail)}));t.alert={type:"error",content:i,controls:r&&[m(s.a,{className:"Button Button--link",onclick:e.showDebug.bind(e,t,a)},"Debug")]};try{n.errorHandler(t)}catch(t){if(r&&t.xhr){var c,u=t.options,l=u.method,d=u.url,p=t.xhr.status,h=void 0===p?"":p;console.group(l+" "+d+" "+h),(c=console).error.apply(c,a||[t]),console.groupEnd()}e.requestErrorAlert=e.alerts.show(t.alert,t.alert.content)}return Promise.reject(t)}))},e.showDebug=function(t,e){this.alerts.dismiss(this.requestErrorAlert),this.modal.show(u.a,{error:t,formattedError:e})},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var i=n.path.replace(/:([^\/]+)/g,(function(t,n){return Object(h.a)(e,n)}));for(var r in e)e.hasOwnProperty(r)&&!e[r]&&delete e[r];var o=m.buildQueryString(e);return(""===m.route.prefix?this.forum.attribute("basePath"):"")+i+(o?"?"+o:"")},t}()},function(t,e,n){"use strict";function i(t,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}n.d(e,"a",(function(){return o}
1)),i.view=function(t,e,n){return i(e,e.attrs.bidi)};var r=i;function o(t){var e=t.m,n=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var s=e.apply(this,arguments);return s.attrs||(s.attrs={}),s.attrs.bidi&&r(s,s.attrs.bidi),s};Object.keys(e).forEach((function(t){return n[t]=e[t]})),t.m=n}},function(t,e,n){"use strict";function i(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(93);t.exports=n(116)(i,requestAnimationFrame,console)},function(t,e,n){"use strict";var i=n(94),r=n(95);t.exports=function(t,e){if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Template parameter names *must* be separated");if(null==e)return t;var n=t.indexOf("?"),o=t.indexOf("#"),s=o<0?t.length:o,a=n<0?s:n,c=t.slice(0,a),u={};r(u,e);var l=c.replace(/:([^\/\.-]+)(\.{3})?/g,(function(t,n,i){return delete u[n],null==e[n]?t:i?e[n]:encodeURIComponent(String(e[n]))})),d=l.indexOf("?"),p=l.indexOf("#"),h=p<0?l.length:p,f=d<0?h:d,m=l.slice(0,f);n>=0&&(m+=t.slice(n,s)),d>=0&&(m+=(n<0?"?":"&")+l.slice(d,h));var v=i(u);return v&&(m+=(n<0&&d<0?"?":"&")+v),o>=0&&(m+=t.slice(o)),p>=0&&(m+=(o<0?"":"&")+l.slice(p)),m}},function(t,e,n){"use strict";var i=n(96);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),r=n<0?t.length:n,o=e<0?r:e,s=t.slice(0,o).replace(/\/{2,}/g,"/");return s?("/"!==s[0]&&(s="/"+s),s.length>1&&"/"===s[s.length-1]&&(s=s.slice(0,-1))):s="/",{path:s,params:e<0?{}:i(t.slice(e+1,r))}}},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){t=t||{};var i=e.prototype,r={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o(t,e,n,r){return i.fromToBase(t,e,n,r)}n.en.relativeTime=r,i.fromToBase=function(e,i,o,s,a){for(var c,u,l,d=o.$locale().relativeTime||r,p=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],h=p.length,f=0;f<h;f+=1){var m=p[f];m.d&&(c=s?n(e).diff(o,m.d,!0):o.diff(e,m.d,!0));var v=(t.rounding||Math.round)(Math.abs(c));if(l=c>0,v<=m.r||!m.r){v<=1&&f>0&&(m=p[f-1]);var g=d[m.l];a&&(v=a(""+v)),u="string"==typeof g?g.replace("%d",v):g(v,i,m.l,l);break}}if(i)return u;var b=l?d.future:d.past;return"function"==typeof b?b(u):b.replace("%s",u)},i.to=function(t,e){return o(t,e,this,!0)},i.from=function(t,e){return o(t,e,this)};var s=function(t){return t.$u?n.utc():n()};i.toNow=function(t){return this.to(s(this),t)},i.fromNow=function(t){return this.from(s(this),t)}}}()},function(t,e,n){"use strict";function i(t){return t>=1e6?Math.floor(t/1e6)+app.translator.trans("core.lib.number_suffix.mega_text"):t>=1e3?(t/1e3).toFixed(1)+app.translator.trans("core.lib.number_suffix.kilo_text"):t.toString()}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(101),r="object"==typeof self&&self&&self.Object===Object&&self,o=i.a||r||Function("return this")();e.a=o},function(t,e,n){"use strict";var i=Array.isArray;e.a=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(2),r=n(0),o=n(17),s=n(4),a=n(7),c=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className+=" Dropdown--split",e.menuClassName+=" Dropdown-menu--right"};var n=e.prototype;return n.getButton=function(t){var e=this.getFirstChild(t),n=Object(i.a)({},e.attrs);return n.className=(n.className||"")+" SplitDropdown-button Button "+this.attrs.buttonClassName,[s.a.component(n,e.children),m("button",{className:"Dropdown-toggle Button Button--icon "+this.attrs.buttonClassName,"data-toggle":"dropdown"},Object(a.a)(this.attrs.icon,{className:"Button-icon"}),Object(a.a)("fas fa-caret-down",{className:"Button-caret"}))]},n.getFirstChild=function(t){for(var e=t;e instanceof Array;)e=e[0];return e},e}(o.a)},function(t,e,n){"use strict";function i(t,e){var n=$(window),i=$(t).offset().top-n.scrollTop();e(),n.scrollTop($(t).offset().top-i)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(7);function r(t){if(t.lastSeenAt()&&t.isOnline())return m("span",{className:"UserOnline"},Object(i.a)("fas fa-circle"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}
1));var i=n(26),r=n.n(i);function o(t){var e=r()(t),n=e.format(),i=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},i)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),r=n(3),o=n(7),s=n(38),a=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){var t=this.attrs,e=t.options,n=t.onchange,i=t.value,r=t.disabled;return m("span",{className:"Select"},m("select",{className:"Select-input FormControl",onchange:n?Object(s.a)("value",n.bind(this)):void 0,value:i,disabled:r},Object.keys(e).map((function(t){return m("option",{value:t},e[t])}))),Object(o.a)("fas fa-sort",{className:"Select-caret"}))},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=e.className||"Button Button--icon Button--link"},e.prototype.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$().tooltip()},e}(n(4).a)},function(t,e,n){"use strict";function i(t){if(2===t.length)return app.translator.trans("core.lib.series.two_text",{first:t[0],second:t[1]});if(t.length>=3){var e=t.slice(1,t.length-1).reduce((function(t,e){return t.concat([e,app.translator.trans("core.lib.series.glue_text")])}),[]).slice(0,-1);return app.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(24),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=i.a?i.a.toStringTag:void 0;var c=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(t){}var r=s.call(t);return i&&(e?t[a]=n:delete t[a]),r},u=Object.prototype.toString;var l=function(t){return u.call(t)},d=i.a?i.a.toStringTag:void 0;e.a=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":d&&d in Object(t)?c(t):l(t)}},function(t,e,n){"use strict";var i=n(30),r=n(89),o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,s={},a={}.hasOwnProperty;function c(t){for(var e in t)if(a.call(t,e))return!1;return!0}function u(t){for(var e,n="div",i=[],r={};e=o.exec(t);){var a=e[1],c=e[2];if(""===a&&""!==c)n=c;else if("#"===a)r.id=c;else if("."===a)i.push(c);else if("["===e[3][0]){var u=e[6];u&&(u=u.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?i.push(u):r[e[4]]=""===u?u:u||!0}}return i.length>0&&(r.className=i.join(" ")),s[t]={tag:n,attrs:r}}function l(t,e){var n=e.attrs,r=i.normalizeChildren(e.children),o=a.call(n,"class"),s=o?n.class:n.className;if(e.tag=t.tag,e.attrs=null,e.children=void 0,!c(t.attrs)&&!c(n)){var u={};for(var l in n)a.call(n,l)&&(u[l]=n[l]);n=u}for(var l in t.attrs)a.call(t.attrs,l)&&"className"!==l&&!a.call(n,l)&&(n[l]=t.attrs[l]);for(var l in null==s&&null==t.attrs.className||(n.className=null!=s?null!=t.attrs.className?String(t.attrs.className)+" "+String(s):s:null!=t.attrs.className?t.attrs.className:null),o&&(n.class=null),n)if(a.call(n,l)&&"key"!==l){e.attrs=n;break}return Array.isArray(r)&&1===r.length&&null!=r[0]&&"#"===r[0].tag?e.text=r[0].children:e.children=r,e}t.exports=function(t){if(null==t||"string"!=typeof t&&"function"!=typeof t&&"function"!=typeof t.view)throw Error("The selector must be either a string or a component.");var e=r.apply(1,arguments);return"string"==typeof t&&(e.children=i.normalizeChildren(e.children),"["!==t)?l(s[t]||u(t),e):(e.tag=t,e)}},function(t,e,n){"use strict";var i=n(30);t.exports=function(){var t,e=arguments[this],n=this+1;if(null==e?e={}:("object"!=typeof e||null!=e.tag||Array.isArray(e))&&(e={},n=this),arguments.length===n+1)t=arguments[n],Array.isArray(t)||(t=[t]);else for(t=[];n<arguments.length;)t.push(arguments[n++]);return i("",e.key,e,t)}},function(t,e,n){"use strict";(function(e){var i=n(91);"undefined"!=typeof window?(void 0===window.Promise?window.Promise=i:window.Promise.prototype.finally||(window.Promise.prototype.finally=i.prototype.finally),t.exports=window.Promise):void 0!==e?(void 0===e.Promise?e.Promise=i:e.Promise.prototype.finally||(e.Promise.prototype.finally=i.prototype.finally),t.exports=e.Promise):t.exports=i}).call(this,n(27))},function(t,e,n){"use strict";(function(e){var n=function(t){if(!(this instanceof n))throw new Error("Promise must be called with `new`");if("function"!=typeof t)throw new TypeError("executor must be a function");var i=this,r=[],o=[],s=l(r,!0),a=l(o,!1),c=i._instance={resolvers:r,rejectors:o},u="function"==typeof e?e:setTimeout;function l(t,e){return function n(s){var l;try{if(!e||null==s||"object"!=typeof s&&"function"!=typeof s||"function"!=typeof(l=s.then))u((function(){e||0!==t.length||console.error("Possible unhandled promise rejection:",s);for(var i=0;i<t.length;i++)t[i](s);r.length=0,o.length=0,c.state=e,c.retry=function(){n(s)}}));else{if(s===i)throw new TypeError("Promise can't be resolved w/ itself");
1d(l.bind(s))}}catch(t){a(t)}}}function d(t){var e=0;function n(t){return function(n){e++>0||t(n)}}var i=n(a);try{t(n(s),i)}catch(t){i(t)}}d(t)};n.prototype.then=function(t,e){var i,r,o=this._instance;function s(t,e,n,s){e.push((function(e){if("function"!=typeof t)n(e);else try{i(t(e))}catch(t){r&&r(t)}})),"function"==typeof o.retry&&s===o.state&&o.retry()}var a=new n((function(t,e){i=t,r=e}));return s(t,o.resolvers,i,!0),s(e,o.rejectors,r,!1),a},n.prototype.catch=function(t){return this.then(null,t)},n.prototype.finally=function(t){return this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){return n.reject(e)}))}))},n.resolve=function(t){return t instanceof n?t:new n((function(e){e(t)}))},n.reject=function(t){return new n((function(e,n){n(t)}))},n.all=function(t){return new n((function(e,n){var i=t.length,r=0,o=[];if(0===t.length)e([]);else for(var s=0;s<t.length;s++)!function(s){function a(t){r++,o[s]=t,r===i&&e(o)}null==t[s]||"object"!=typeof t[s]&&"function"!=typeof t[s]||"function"!=typeof t[s].then?a(t[s]):t[s].then(a,n)}(s)}))},n.race=function(t){return new n((function(e,n){for(var i=0;i<t.length;i++)t[i].then(e,n)}))},t.exports=n}).call(this,n(92).setImmediate)},function(t,e,n){(function(t){var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(113),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(27))},function(t,e,n){"use strict";t.exports=n(115)(window)},function(t,e,n){"use strict";t.exports=function(t){if("[object Object]"!==Object.prototype.toString.call(t))return"";var e=[];for(var n in t)i(n,t[n]);return e.join("&");function i(t,n){if(Array.isArray(n))for(var r=0;r<n.length;r++)i(t+"["+r+"]",n[r]);else if("[object Object]"===Object.prototype.toString.call(n))for(var r in n)i(t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+(null!=n&&""!==n?"="+encodeURIComponent(n):""))}}},function(t,e,n){"use strict";t.exports=Object.assign||function(t,e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))}},function(t,e,n){"use strict";t.exports=function(t){if(""===t||null==t)return{};"?"===t.charAt(0)&&(t=t.slice(1));for(var e=t.split("&"),n={},i={},r=0;r<e.length;r++){var o=e[r].split("="),s=decodeURIComponent(o[0]),a=2===o.length?decodeURIComponent(o[1]):"";"true"===a?a=!0:"false"===a&&(a=!1);var c=s.split(/\]\[?|\[/),u=i;s.indexOf("[")>-1&&c.pop();for(var l=0;l<c.length;l++){var d=c[l],p=c[l+1],h=""==p||!isNaN(parseInt(p,10));if(""===d)null==n[s=c.slice(0,l).join()]&&(n[s]=Array.isArray(u)?u.length:0),d=n[s]++;else if("__proto__"===d)break;if(l===c.length-1)u[d]=a;else{var f=Object.getOwnPropertyDescriptor(u,d);null!=f&&(f=f.value),null==f&&(u[d]=f=h?[]:{}),u=f}}}return i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i={};n.r(i),n.d(i,"Model",(function(){return l})),n.d(i,"PostTypes",(function(){return p})),n.d(i,"Routes",(function(){return h}));n(104),n(107),n(121),n(122),n(123),n(124),n(125),n(126),n(127);var r=n(76),o=n.n(r),s=n(98),a=n.n(s),c=n(71),u=n(5),l=function(){function t(t,e){void 0===e&&(e=null),Object(u.a)(this,"type",void 0),Object(u.a)(this,"attributes",[]),Object(u.a)(this,"hasOnes",[]),Object(u.a)(this,"hasManys",[]),this.type=t,this.model=e}var e=t.prototype;return e.attribute=function(t){return this.attributes.push(t),this},e.hasOne=function(t){return this.hasOnes.push(t),this},e.hasMany=function(t){return this.hasManys.push(t),this},e.extend=function(t,e){this.model&&(t.store.models[this.type]=this.model);var n=t.store.models[this.type];
1this.attributes.forEach((function(t){return n.prototype[t]=n.attribute(t)})),this.hasOnes.forEach((function(t){return n.prototype[t]=n.hasOne(t)})),this.hasManys.forEach((function(t){return n.prototype[t]=n.hasMany(t)}))},t}(),d=n(2),p=function(){function t(){Object(u.a)(this,"postComponents",{})}var e=t.prototype;return e.add=function(t,e){return this.postComponents[t]=e,this},e.extend=function(t,e){Object(d.a)(t.postComponents,this.postComponents)},t}(),h=function(){function t(){Object(u.a)(this,"routes",{})}var e=t.prototype;return e.add=function(t,e,n){return this.routes[t]={path:e,component:n},this},e.extend=function(t,e){Object(d.a)(t.routes,this.routes)},t}();dayjs.extend(o.a),dayjs.extend(a.a),Object(c.a)(window)},function(t,e,n){t.exports=function(){"use strict";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,i){var r=n.prototype,o=r.format;i.en.formats=t,r.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,i=function(e,n){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,i,r){var o=r&&r.toUpperCase();return i||n[r]||t[r]||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,i)}}}()},function(t,e,n){!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,i=n&&null!=window.mozInnerScreenX;function r(t,r,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 c=document.createElement("div");c.id="input-textarea-caret-position-mirror-div",document.body.appendChild(c);var u=c.style,l=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,d="INPUT"===t.nodeName;u.whiteSpace="pre-wrap",d||(u.wordWrap="break-word"),u.position="absolute",s||(u.visibility="hidden"),e.forEach((function(t){d&&"lineHeight"===t?u.lineHeight=l.height:u[t]=l[t]})),i?t.scrollHeight>parseInt(l.height)&&(u.overflowY="scroll"):u.overflow="hidden",c.textContent=t.value.substring(0,r),d&&(c.textContent=c.textContent.replace(/\s/g,"Â "));var p=document.createElement("span");p.textContent=t.value.substring(r)||".",c.appendChild(p);var h={top:p.offsetTop+parseInt(l.borderTopWidth),left:p.offsetLeft+parseInt(l.borderLeftWidth),height:parseInt(l.lineHeight)};return s?p.style.backgroundColor="#aaa":document.body.removeChild(c),h}void 0!==t.exports?t.exports=r:n&&(window.getCaretCoordinates=r)}()},function(t,e,n){"use strict";t.exports=n(128)},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(this,n(27))},function(t,e,n){"use strict";var i=n(41),r=n(60),o=n(59),s=n(40),a={handlers:null,getHandlers:function(t){return this.handlers=this.handlers||{},this.handlers[t]=this.handlers[t]||[],this.handlers[t]},trigger:function(t){for(var e=this,n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];this.getHandlers(t).forEach((function(t){return t.apply(e,i)}))},on:function(t,e){this.getHandlers(t).push(e)},one:function(t,e){this.getHandlers(t).push((function n(){e.apply(this,arguments),this.off(t,n)}
1))},off:function(t,e){var n=this.getHandlers(t),i=n.indexOf(e);-1!==i&&n.splice(i,1)}},c=n(63),u=n(6),l=n(2),d=n(0);var p=n(28),h=n(21),f=n(61),m=n(81),v=n(49),g=n(77),b=n(32),y=n(11),w=n(52),x=n(51),N=n(10),C=n(36),O=n(66),T=n(43),k=n(71),j=n(69),S=n(16),A=n(9),E=n(72),P=n(62),D=n(38),_=n(68),I=n(65),M=n(67),L=n(46),R=n(12),B=n(64),H=n(3),U=n(58),F=n(56),q=n(31),z=n(37),W=n(29),V=n(18),Y=n(54),K=n(25),G=n(17),X=n(80),J=n(57),Q=n(42),Z=n(84),tt=n(50),et=n(23),nt=n(13),it=n(15),rt=n(47),ot=n(33),st=n(55),at=n(4),ct=n(14),ut=n(34),lt=n(53),dt=n(85),pt=n(1),ht=n(70),ft=n(83),mt=n(19),vt=n(7),gt=n(44),bt=n(86),yt=n(35),wt=n(20),xt=n(82),Nt=n(8),Ct=n(5),Ot=function(){function t(){Object(Ct.a)(this,"element",void 0)}var e=t.prototype;return e.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),e.render=function(){var t=this,e=this.view();e.attrs=e.attrs||{};var n=e.attrs.oncreate;return e.attrs.oncreate=function(e){t.element=e.dom,n&&n.apply(t,[e])},e},t}(),Tt=n(39);e.a={extend:i,Session:r.a,Store:o.a,"utils/BasicEditorDriver":s.a,"utils/evented":a,"utils/liveHumanTimes":c.a,"utils/ItemList":u.a,"utils/mixin":function(t){for(var e=function(t){function e(){return t.apply(this,arguments)||this}return Object(d.a)(e,t),e}(t),n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.forEach((function(t){Object(l.a)(e.prototype,t)})),e},"utils/humanTime":p.a,"utils/computed":h.a,"utils/Drawer":f.a,"utils/anchorScroll":m.a,"utils/RequestError":v.a,"utils/abbreviateNumber":g.a,"utils/string":b,"utils/SubtreeRetainer":w.a,"utils/extract":N.a,"utils/ScrollListener":C.a,"utils/stringToColor":O.a,"utils/Stream":y.a,"utils/subclassOf":T.a,"utils/setRouteWithForcedRefresh":x.a,"utils/patchMithril":k.a,"utils/proxifyCompat":j.a,"utils/classList":S.a,"utils/extractText":A.a,"utils/formatNumber":E.a,"utils/mapRoutes":P.a,"utils/withAttr":D.a,"models/Notification":_.a,"models/User":I.a,"models/Post":M.a,"models/Discussion":L.a,"models/Group":R.a,"models/Forum":B.a,Component:H.a,Fragment:Ot,Translator:U.a,"components/AlertManager":F.a,"components/Page":q.a,"components/Switch":z.a,"components/Badge":W.a,"components/LoadingIndicator":V.a,"components/Placeholder":Y.a,"components/Separator":K.a,"components/Dropdown":G.a,"components/SplitDropdown":X.a,"components/RequestErrorModal":J.a,"components/FieldSet":Q.a,"components/Select":Z.a,"components/Navigation":tt.a,"components/Alert":et.a,"components/Link":nt.a,"components/LinkButton":it.a,"components/Checkbox":rt.a,"components/SelectDropdown":ot.a,"components/ModalManager":st.a,"components/Button":at.a,"components/Modal":ct.a,"components/GroupBadge":ut.a,"components/TextEditor":lt.a,"components/TextEditorButton":dt.a,Model:pt.a,Application:ht.a,"helpers/fullTime":ft.a,"helpers/avatar":mt.a,"helpers/icon":vt.a,"helpers/humanTime":gt.a,"helpers/punctuateSeries":bt.a,"helpers/highlight":yt.a,"helpers/username":wt.a,"helpers/userOnline":xt.a,"helpers/listItems":Nt.a,"resolvers/DefaultResolver":Tt.a}},,function(t,e,n){(function(e){t.exports=e.$=n(105)}).call(this,n(27))},function(t,e,n){(function(e){t.exports=e.jQuery=n(106)}).call(this,n(27))},function(t,e,n){var i; 2/*! 3 * jQuery JavaScript Library v3.5.1 4 * https://jquery.com/ 5 * 6 * Includes Sizzle.js 7 * https://sizzlejs.com/ 8 * 9 * Copyright JS Foundation and other contributors 10 * Released under the MIT license 11 * https://jquery.org/license 12 * 13 * Date: 2020-05-04T22:49Z 14 */!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(n,r){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,c=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},u=o.push,l=o.indexOf,d={},p=d.toString,h=d.hasOwnProperty,f=h.toString,m=f.call(Object),v={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},b=function(t){return null!=t&&t===t.window},y=n.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var i,r,o=(n=n||y).createElement("script");
vendor: 5,735 bytes, lines 14-25
14if(o.text=t,e)for(i in w)(r=e[i]||e.getAttribute&&e.getAttribute(i))&&o.setAttribute(i,r);n.head.appendChild(o).parentNode.removeChild(o)}function N(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[p.call(t)]||"object":typeof t}var C=function(t,e){return new C.fn.init(t,e)};function O(t){var e=!!t&&"length"in t&&t.length,n=N(t);return!g(t)&&!b(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}C.fn=C.prototype={jquery:"3.5.1",constructor:C,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=C.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return C.each(this,t)},map:function(t){return this.pushStack(C.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(C.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:o.sort,splice:o.splice},C.extend=C.fn.extend=function(){var t,e,n,i,r,o,s=arguments[0]||{},a=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||g(s)||(s={}),a===c&&(s=this,a--);a<c;a++)if(null!=(t=arguments[a]))for(e in t)i=t[e],"__proto__"!==e&&s!==i&&(u&&i&&(C.isPlainObject(i)||(r=Array.isArray(i)))?(n=s[e],o=r&&!Array.isArray(n)?[]:r||C.isPlainObject(n)?n:{},r=!1,s[e]=C.extend(u,o,i)):void 0!==i&&(s[e]=i));return s},C.extend({expando:"jQuery"+("3.5.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==p.call(t))&&(!(e=s(t))||"function"==typeof(n=h.call(e,"constructor")&&e.constructor)&&f.call(n)===m)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){x(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,i=0;if(O(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},makeArray:function(t,e){var n=e||[];return null!=t&&(O(Object(t))?C.merge(n,"string"==typeof t?[t]:t):u.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:l.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,r=t.length;i<n;i++)t[r++]=e[i];return t.length=r,t},grep:function(t,e,n){for(var i=[],r=0,o=t.length,s=!n;r<o;r++)!e(t[r],r)!==s&&i.push(t[r]);return i},map:function(t,e,n){var i,r,o=0,s=[];if(O(t))for(i=t.length;o<i;o++)null!=(r=e(t[o],o,n))&&s.push(r);else for(o in t)null!=(r=e(t[o],o,n))&&s.push(r);return c(s)},guid:1,support:v}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=o[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){d["[object "+e+"]"]=e.toLowerCase()}));var T= 15/*! 16 * Sizzle CSS Selector Engine v2.3.5 17 * https://sizzlejs.com/ 18 * 19 * Copyright JS Foundation and other contributors 20 * Released under the MIT license 21 * https://js.foundation/ 22 * 23 * Date: 2020-03-14 24 */ 25function(t){var e,n,i,r,o,s,a,c,u,l,d,p,h,f,m,v,g,b,y,w="sizzle"+1*new Date,x=t.document,N=0,C=0,O=ct(),T=ct(),k=ct(),j=ct(),S=function(t,e){return t===e&&(d=!0),0},A={}.hasOwnProperty,E=[],P=E.pop,D=E.push,$=E.push,_=E.slice,I=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",R="(?:\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",B="\\["+L+"*("+R+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+L+"*\\]",H=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",U=new RegExp(L+"+","g"),F=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),q=new RegExp("^"+L+"*,"+L+"*"),z=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),W=new RegExp(L+"|>"),V=new RegExp(H),Y=new RegExp("^"+R+"$"),K={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,rt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){p()},st=wt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{$.apply(E=_.call(x.childNodes),x.childNodes),E[x.childNodes.length].nodeType}catch(t){$={apply:E.length?function(t,e){D.apply(t,_.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function at(t,e,i,r){var o,a,u,l,d,f,g,b=e&&e.ownerDocument,x=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return i;
vendor: 5,499 bytes, line 25
25if(!r&&(p(e),e=e||h,m)){if(11!==x&&(d=Z.exec(t)))if(o=d[1]){if(9===x){if(!(u=e.getElementById(o)))return i;if(u.id===o)return i.push(u),i}else if(b&&(u=b.getElementById(o))&&y(e,u)&&u.id===o)return i.push(u),i}else{if(d[2])return $.apply(i,e.getElementsByTagName(t)),i;if((o=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return $.apply(i,e.getElementsByClassName(o)),i}if(n.qsa&&!j[t+" "]&&(!v||!v.test(t))&&(1!==x||"object"!==e.nodeName.toLowerCase())){if(g=t,b=e,1===x&&(W.test(t)||z.test(t))){for((b=tt.test(t)&>(e.parentNode)||e)===e&&n.scope||((l=e.getAttribute("id"))?l=l.replace(it,rt):e.setAttribute("id",l=w)),a=(f=s(t)).length;a--;)f[a]=(l?"#"+l:":scope")+" "+yt(f[a]);g=f.join(",")}try{return $.apply(i,b.querySelectorAll(g)),i}catch(e){j(t,!0)}finally{l===w&&e.removeAttribute("id")}}}return c(t.replace(F,"$1"),e,i,r)}function ct(){var t=[];return function e(n,r){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function ut(t){return t[w]=!0,t}function lt(t){var e=h.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function dt(t,e){for(var n=t.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=e}function pt(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ht(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ft(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&st(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function vt(t){return ut((function(e){return e=+e,ut((function(n,i){for(var r,o=t([],n.length,e),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))}))}))}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=at.support={},o=at.isXML=function(t){var e=t.namespaceURI,n=(t.ownerDocument||t).documentElement;return!G.test(e||n&&n.nodeName||"HTML")},p=at.setDocument=function(t){var e,r,s=t?t.ownerDocument||t:x;return s!=h&&9===s.nodeType&&s.documentElement?(f=(h=s).documentElement,m=!o(h),x!=h&&(r=h.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",ot,!1):r.attachEvent&&r.attachEvent("onunload",ot)),n.scope=lt((function(t){return f.appendChild(t).appendChild(h.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=lt((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=lt((function(t){return t.appendChild(h.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(h.getElementsByClassName),n.getById=lt((function(t){return f.appendChild(t).id=w,!h.getElementsByName||!h.getElementsByName(w).length})),n.getById?(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n,i,r,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(r=e.getElementsByName(t),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),i.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},g=[],v=[],(n.qsa=Q.test(h.querySelectorAll))&&(lt((function(t){var e;f.appendChild(t).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+L+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\["+L+"*(?:value|"+M+")"),t.querySelectorAll("[id~="+w+"-]").length||v.push("~="),(e=h.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||v.push("\\["+L+"*name"+L+"*="+L+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]"),t.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),lt((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=h.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name"+L+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=Q.test(b=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&<((function(t){n.disconnectedMatch=b.call(t,"*"),b.call(t,"[s!='']:x"),g.push("!=",H)}
vendor: 14,873 bytes, line 25
25)),v=v.length&&new RegExp(v.join("|")),g=g.length&&new RegExp(g.join("|")),e=Q.test(f.compareDocumentPosition),y=e||Q.test(f.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S=e?function(t,e){if(t===e)return d=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t==h||t.ownerDocument==x&&y(x,t)?-1:e==h||e.ownerDocument==x&&y(x,e)?1:l?I(l,t)-I(l,e):0:4&i?-1:1)}:function(t,e){if(t===e)return d=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,s=[t],a=[e];if(!r||!o)return t==h?-1:e==h?1:r?-1:o?1:l?I(l,t)-I(l,e):0;if(r===o)return pt(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?pt(s[i],a[i]):s[i]==x?-1:a[i]==x?1:0},h):h},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(p(t),n.matchesSelector&&m&&!j[e+" "]&&(!g||!g.test(e))&&(!v||!v.test(e)))try{var i=b.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){j(e,!0)}return at(e,h,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!=h&&p(t),y(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!=h&&p(t);var r=i.attrHandle[e.toLowerCase()],o=r&&A.call(i.attrHandle,e.toLowerCase())?r(t,e,!m):void 0;return void 0!==o?o:n.attributes||!m?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},at.escape=function(t){return(t+"").replace(it,rt)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,i=[],r=0,o=0;if(d=!n.detectDuplicates,l=!n.sortStable&&t.slice(0),t.sort(S),d){for(;e=t[o++];)e===t[o]&&(r=i.push(o));for(;r--;)t.splice(i[r],1)}return l=null,t},r=at.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=r(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=r(e);return n},(i=at.selectors={cacheLength:50,createPseudo:ut,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return K.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&V.test(n)&&(e=s(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=O[t+" "];return e||(e=new RegExp("(^|"+L+")"+t+"("+L+"|$)"))&&O(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(i){var r=at.attr(i,t);return null==r?"!="===e:!e||(r+="","="===e?r===n:"!="===e?r!==n:"^="===e?n&&0===r.indexOf(n):"*="===e?n&&r.indexOf(n)>-1:"$="===e?n&&r.slice(-n.length)===n:"~="===e?(" "+r.replace(U," ")+" ").indexOf(n)>-1:"|="===e&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,c){var u,l,d,p,h,f,m=o!==s?"nextSibling":"previousSibling",v=e.parentNode,g=a&&e.nodeName.toLowerCase(),b=!c&&!a,y=!1;if(v){if(o){for(;m;){for(p=e;p=p[m];)if(a?p.nodeName.toLowerCase()===g:1===p.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?v.firstChild:v.lastChild],s&&b){for(y=(h=(u=(l=(d=(p=v)[w]||(p[w]={}))[p.uniqueID]||(d[p.uniqueID]={}))[t]||[])[0]===N&&u[1])&&u[2],p=h&&v.childNodes[h];p=++h&&p&&p[m]||(y=h=0)||f.pop();)if(1===p.nodeType&&++y&&p===e){l[t]=[N,h,y];break}}else if(b&&(y=h=(u=(l=(d=(p=e)[w]||(p[w]={}))[p.uniqueID]||(d[p.uniqueID]={}))[t]||[])[0]===N&&u[1]),!1===y)for(;(p=++h&&p&&p[m]||(y=h=0)||f.pop())&&((a?p.nodeName.toLowerCase()!==g:1!==p.nodeType)||!++y||(b&&((l=(d=p[w]||(p[w]={}))[p.uniqueID]||(d[p.uniqueID]={}))[t]=[N,y]),p!==e)););return(y-=r)===i||y%i==0&&y/i>=0}}},PSEUDO:function(t,e){var n,r=i.pseudos[t]||i.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return r[w]?r(e):r.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?ut((function(t,n){for(var i,o=r(t,e),s=o.length;s--;)t[i=I(t,o[s])]=!(n[i]=o[s])})):function(t){return r(t,0,n)}):r}},pseudos:{not:ut((function(t){var e=[],n=[],i=a(t.replace(F,"$1"));return i[w]?ut((function(t,e,n,r){for(var o,s=i(t,null,r,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))})):function(t,r,o){return e[0]=t,i(e,null,o,n),e[0]=null,!n.pop()}})),has:ut((function(t){return function(e){return at(t,e).length>0}})),contains:ut((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||r(e)).indexOf(t)>-1}})),lang:ut((function(t){return Y.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===f},focus:function(t){return t===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},header:function(t){return J.test(t.nodeName)},input:function(t){return X.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:vt((function(){return[0]})),last:vt((function(t,e){return[e-1]})),eq:vt((function(t,e,n){return[n<0?n+e:n]})),even:vt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:vt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:vt((function(t,e,n){for(var i=n<0?n+e:n>e?e:n;--i>=0;)t.push(i);return t})),gt:vt((function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t}))}}).pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=ht(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=ft(e);function bt(){}function yt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function wt(t,e,n){var i=e.dir,r=e.next,o=r||i,s=n&&"parentNode"===o,a=C++;return e.first?function(e,n,r){for(;e=e[i];)if(1===e.nodeType||s)return t(e,n,r);return!1}:function(e,n,c){var u,l,d,p=[N,a];if(c){for(;e=e[i];)if((1===e.nodeType||s)&&t(e,n,c))return!0}else for(;e=e[i];)if(1===e.nodeType||s)if(l=(d=e[w]||(e[w]={}))[e.uniqueID]||(d[e.uniqueID]={}),r&&r===e.nodeName.toLowerCase())e=e[i]||e;else{if((u=l[o])&&u[0]===N&&u[1]===a)return p[2]=u[2];if(l[o]=p,p[2]=t(e,n,c))return!0}return!1}}function xt(t){return t.length>1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function Nt(t,e,n,i,r){for(var o,s=[],a=0,c=t.length,u=null!=e;a<c;a++)(o=t[a])&&(n&&!n(o,i,r)||(s.push(o),u&&e.push(a)));return s}function Ct(t,e,n,i,r,o){return i&&!i[w]&&(i=Ct(i)),r&&!r[w]&&(r=Ct(r,o)),ut((function(o,s,a,c){var u,l,d,p=[],h=[],f=s.length,m=o||function(t,e,n){for(var i=0,r=e.length;i<r;i++)at(t,e[i],n);return n}(e||"*",a.nodeType?[a]:a,[]),v=!t||!o&&e?m:Nt(m,p,t,a,c),g=n?r||(o?t:f||i)?[]:s:v;if(n&&n(v,g,a,c),i)for(u=Nt(g,h),i(u,[],a,c),l=u.length;l--;)(d=u[l])&&(g[h[l]]=!(v[h[l]]=d));if(o){if(r||t){if(r){for(u=[],l=g.length;l--;)(d=g[l])&&u.push(v[l]=d);r(null,g=[],u,c)}for(l=g.length;l--;)(d=g[l])&&(u=r?I(o,d):p[l])>-1&&(o[u]=!(s[u]=d))}}else g=Nt(g===s?g.splice(f,g.length):g),r?r(null,s,g,c):$.apply(s,g)}))}function Ot(t){for(var e,n,r,o=t.length,s=i.relative[t[0].type],a=s||i.relative[" "],c=s?1:0,l=wt((function(t){return t===e}),a,!0),d=wt((function(t){return I(e,t)>-1}),a,!0),p=[function(t,n,i){var r=!s&&(i||n!==u)||((e=n).nodeType?l(t,n,i):d(t,n,i));return e=null,r}];c<o;c++)if(n=i.relative[t[c].type])p=[wt(xt(p),n)];else{if((n=i.filter[t[c].type].apply(null,t[c].matches))[w]){for(r=++c;r<o&&!i.relative[t[r].type];r++);return Ct(c>1&&xt(p),c>1&&yt(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(F,"$1"),n,c<r&&Ot(t.slice(c,r)),r<o&&Ot(t=t.slice(r)),r<o&&yt(t))}p.push(n)}return xt(p)}return bt.prototype=i.filters=i.pseudos,i.setFilters=new bt,s=at.tokenize=function(t,e){var n,r,o,s,a,c,u,l=T[t+" "];if(l)return e?0:l.slice(0);for(a=t,c=[],u=i.preFilter;a;){for(s in n&&!(r=q.exec(a))||(r&&(a=a.slice(r[0].length)||a),c.push(o=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(F," ")}),a=a.slice(n.length)),i.filter)!(r=K[s].exec(a))||u[s]&&!(r=u[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return e?a.length:a?at.error(t):T(t,c).slice(0)},a=at.compile=function(t,e){var n,r=[],o=[],a=k[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=Ot(e[n]))[w]?r.push(a):o.push(a);(a=k(t,function(t,e){var n=e.length>0,r=t.length>0,o=function(o,s,a,c,l){var d,f,v,g=0,b="0",y=o&&[],w=[],x=u,C=o||r&&i.find.TAG("*",l),O=N+=null==x?1:Math.random()||.1,T=C.length;for(l&&(u=s==h||s||l);b!==T&&null!=(d=C[b]);b++){if(r&&d){for(f=0,s||d.ownerDocument==h||(p(d),a=!m);v=t[f++];)if(v(d,s||h,a)){c.push(d);break}l&&(N=O)}n&&((d=!v&&d)&&g--,o&&y.push(d))}if(g+=b,n&&b!==g){for(f=0;v=e[f++];)v(y,w,s,a);if(o){if(g>0)for(;b--;)y[b]||w[b]||(w[b]=P.call(c));w=Nt(w)}$.apply(c,w),l&&!o&&w.length>0&&g+e.length>1&&at.uniqueSort(c)}return l&&(N=O,u=x),y};return n?ut(o):o}(o,r))).selector=t}return a},c=at.select=function(t,e,n,r){var o,c,u,l,d,p="function"==typeof t&&t,h=!r&&s(t=p.selector||t);if(n=n||[],1===h.length){if((c=h[0]=h[0].slice(0)).length>2&&"ID"===(u=c[0]).type&&9===e.nodeType&&m&&i.relative[c[1].type]){if(!(e=(i.find.ID(u.matches[0].replace(et,nt),e)||[])[0]))return n;p&&(e=e.parentNode),t=t.slice(c.shift().value.length)}for(o=K.needsContext.test(t)?0:c.length;o--&&(u=c[o],!i.relative[l=u.type]);)if((d=i.find[l])&&(r=d(u.matches[0].replace(et,nt),tt.test(c[0].type)&>(e.parentNode)||e))){if(c.splice(o,1),!(t=r.length&&yt(c)))return $.apply(n,r),n;break}}return(p||a(t,h))(r,e,!m,n,!e||tt.test(t)&>(e.parentNode)||e),n},n.sortStable=w.split("").sort(S).join("")===w,n.detectDuplicates=!!d,p(),n.sortDetached=lt((function(t){return 1&t.compareDocumentPosition(h.createElement("fieldset"))})),lt((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||dt("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&<((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||dt("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),lt((function(t){return null==t.getAttribute("disabled")}))||dt(M,(function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null})),at}(n);C.find=T,C.expr=T.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=T.uniqueSort,C.text=T.getText,C.isXMLDoc=T.isXML,C.contains=T.contains,C.escapeSelector=T.escape;var k=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&C(t).is(n))break;i.push(t)}return i},j=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},S=C.expr.match.needsContext;function A(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var E=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(t,e,n){return g(e)?C.grep(t,(function(t,i){return!!e.call(t,i,t)!==n})):e.nodeType?C.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?C.grep(t,(function(t){return l.call(e,t)>-1!==n})):C.filter(e,t,n)}C.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?C.find.matchesSelector(i,t)?[i]:[]:C.find.matches(t,C.grep(e,(function(t){return 1===t.nodeType})))},C.fn.extend({find:function(t){var e,n,i=this.length,r=this;if("string"!=typeof t)return this.pushStack(C(t).filter((function(){for(e=0;e<i;e++)if(C.contains(r[e],this))return!0})));for(n=this.pushStack([]),e=0;e<i;e++)C.find(t,r[e],n);return i>1?C.uniqueSort(n):n},filter:function(t){return this.pushStack(P(this,t||[],!1))},not:function(t){return this.pushStack(P(this,t||[],!0))},is:function(t){return!!P(this,"string"==typeof t&&S.test(t)?C(t):t||[],!1).length}});var D,$=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||D,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:$.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof C?e[0]:e,C.merge(this,C.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:y,!0)),E.test(i[1])&&C.isPlainObject(e))for(i in e)g(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=y.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):g(t)?void 0!==n.ready?n.ready(t):t(C):C.makeArray(t,this)}).prototype=C.fn,D=C(y);var _=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function M(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}C.fn.extend({has:function(t){var e=C(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(C.contains(this,e[t]))return!0}))},closest:function(t,e){var n,i=0,r=this.length,o=[],s="string"!=typeof t&&C(t);if(!S.test(t))for(;i<r;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&C.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?C.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?l.call(C(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1}
vendor: 4,908 bytes, line 25
25,add:function(t,e){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),C.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return 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 j((t.parentNode||{}).firstChild,t)},children:function(t){return j(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(A(t,"template")&&(t=t.content||t),C.merge([],t.childNodes))}},(function(t,e){C.fn[t]=function(n,i){var r=C.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=C.filter(i,r)),this.length>1&&(I[t]||C.uniqueSort(r),_.test(t)&&r.reverse()),this.pushStack(r)}}));var L=/[^\x20\t\r\n\f]+/g;function R(t){return t}function B(t){throw t}function H(t,e,n,i){var r;try{t&&g(r=t.promise)?r.call(t).done(e).fail(n):t&&g(r=t.then)?r.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}C.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return C.each(t.match(L)||[],(function(t,n){e[n]=!0})),e}(t):C.extend({},t);var e,n,i,r,o=[],s=[],a=-1,c=function(){for(r=r||t.once,i=e=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=o.length,n=!1);t.memory||(n=!1),e=!1,r&&(o=n?[]:"")},u={add:function(){return o&&(n&&!e&&(a=o.length-1,s.push(n)),function e(n){C.each(n,(function(n,i){g(i)?t.unique&&u.has(i)||o.push(i):i&&i.length&&"string"!==N(i)&&e(i)}))}(arguments),n&&!e&&c()),this},remove:function(){return C.each(arguments,(function(t,e){for(var n;(n=C.inArray(e,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(t){return t?C.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||e||(o=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},C.extend({Deferred:function(t){var e=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return C.Deferred((function(n){C.each(e,(function(e,i){var r=g(t[i[4]])&&t[i[4]];o[i[1]]((function(){var t=r&&r.apply(this,arguments);t&&g(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[t]:arguments)}))})),t=null})).promise()},then:function(t,i,r){var o=0;function s(t,e,i,r){return function(){var a=this,c=arguments,u=function(){var n,u;if(!(t<o)){if((n=i.apply(a,c))===e.promise())throw new TypeError("Thenable self-resolution");u=n&&("object"==typeof n||"function"==typeof n)&&n.then,g(u)?r?u.call(n,s(o,e,R,r),s(o,e,B,r)):(o++,u.call(n,s(o,e,R,r),s(o,e,B,r),s(o,e,R,e.notifyWith))):(i!==R&&(a=void 0,c=[n]),(r||e.resolveWith)(a,c))}},l=r?u:function(){try{u()}catch(n){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(n,l.stackTrace),t+1>=o&&(i!==B&&(a=void 0,c=[n]),e.rejectWith(a,c))}};t?l():(C.Deferred.getStackHook&&(l.stackTrace=C.Deferred.getStackHook()),n.setTimeout(l))}}return C.Deferred((function(n){e[0][3].add(s(0,n,g(r)?r:R,n.notifyWith)),e[1][3].add(s(0,n,g(t)?t:R)),e[2][3].add(s(0,n,g(i)?i:B))})).promise()},promise:function(t){return null!=t?C.extend(t,r):r}},o={};return C.each(e,(function(t,n){var s=n[2],a=n[5];r[n[1]]=s.add,a&&s.add((function(){i=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith})),r.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,i=Array(n),r=a.call(arguments),o=C.Deferred(),s=function(t){return function(n){i[t]=this,r[t]=arguments.length>1?a.call(arguments):n,--e||o.resolveWith(i,r)}};if(e<=1&&(H(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||g(r[n]&&r[n].then)))return o.then();for(;n--;)H(r[n],s(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&U.test(t.name)&&n.c
vendor: 6,468 bytes, line 25
25onsole.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},C.readyException=function(t){n.setTimeout((function(){throw t}))};var F=C.Deferred();function q(){y.removeEventListener("DOMContentLoaded",q),n.removeEventListener("load",q),C.ready()}C.fn.ready=function(t){return F.then(t).catch((function(t){C.readyException(t)})),this},C.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--C.readyWait:C.isReady)||(C.isReady=!0,!0!==t&&--C.readyWait>0||F.resolveWith(y,[C]))}}),C.ready.then=F.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?n.setTimeout(C.ready):(y.addEventListener("DOMContentLoaded",q),n.addEventListener("load",q));var z=function(t,e,n,i,r,o,s){var a=0,c=t.length,u=null==n;if("object"===N(n))for(a in r=!0,n)z(t,e,a,n[a],!0,o,s);else if(void 0!==i&&(r=!0,g(i)||(s=!0),u&&(s?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(C(t),n)})),e))for(;a<c;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return r?t:u?e.call(t):c?e(t[0],n):o},W=/^-ms-/,V=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function K(t){return t.replace(W,"ms-").replace(V,Y)}var G=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function X(){this.expando=C.expando+X.uid++}X.uid=1,X.prototype={cache:function(t){var e=t[this.expando];return e||(e={},G(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,r=this.cache(t);if("string"==typeof e)r[K(e)]=n;else for(i in e)r[K(i)]=e[i];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][K(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i=t[this.expando];if(void 0!==i){if(void 0!==e){n=(e=Array.isArray(e)?e.map(K):(e=K(e))in i?[e]:e.match(L)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||C.isEmptyObject(i))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!C.isEmptyObject(e)}};var J=new X,Q=new X,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,tt=/[A-Z]/g;function et(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(tt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Z.test(t)?JSON.parse(t):t)}(n)}catch(t){}Q.set(t,e,n)}else n=void 0;return n}C.extend({hasData:function(t){return Q.hasData(t)||J.hasData(t)},data:function(t,e,n){return Q.access(t,e,n)},removeData:function(t,e){Q.remove(t,e)},_data:function(t,e,n){return J.access(t,e,n)},_removeData:function(t,e){J.remove(t,e)}}),C.fn.extend({data:function(t,e){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(r=Q.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=K(i.slice(5)),et(o,i,r[i]));J.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each((function(){Q.set(this,t)})):z(this,(function(e){var n;if(o&&void 0===e)return void 0!==(n=Q.get(o,t))||void 0!==(n=et(o,t))?n:void 0;this.each((function(){Q.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){Q.remove(this,t)}))}}),C.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=J.get(t,e),n&&(!i||Array.isArray(n)?i=J.access(t,e,C.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=C.queue(t,e),i=n.length,r=n.shift(),o=C._queueHooks(t,e);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,(function(){C.dequeue(t,e)}),o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return J.get(t,n)||J.access(t,n,{empty:C.Callbacks("once memory").add((function(){J.remove(t,[e+"queue",n])}))})}}),C.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?C.queue(this[0],t):void 0===e?this:this.each((function(){var n=C.queue(this,t,e);C._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&C.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){C.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=C.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=J.get(o[s],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(e)}});var nt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,it=new RegExp("^(?:([+-])=|)("+nt+")([a-z%]*)$","i"),rt=["Top","Right","Bottom","Left"],ot=y.documentElement,st=function(t){return C.contains(t.ownerDocument,t)},at={composed:!0};ot.getRootNode&&(st=function(t){return C.contains(t.ownerDocument,t)||t.getRootNode(at)===t.ownerDocument});var ct=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&st(t)&&"none"===C.css(t,"display")};function ut(t,e,n,i){var r,o,s=20,a=i?function(){return i.cur()}:function(){return C.css(t,e,"")},c=a(),u=n&&n[3]||(C.cssNumber[e]?"":"px"),l=t.nodeType&&(C.cssNumber[e]||"px"!==u&&+c)&&it.exec(C.css(t,e));if(l&&l[3]!==u){for(c/=2,u=u||l[3],l=+c||1;s--;)C.style(t,e,l+u),(1-o)*(1-(o=a()/c||.5))<=0&&(s=0),l/=o;l*=2,C.style(t,e,l+u),n=n||[]}return n&&(l=+l||+c||0,r=n[1]?l+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=l,i.end=r)),r}var lt={};function dt(t){var e,n=t.ownerDocument,i=t.nodeName,r=lt[i];return r||(e=n.body.appendChild(n.createElement(i)),r=C.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),lt[i]=r,r)}function pt(t,e){for(var n,i,r=[],o=0,s=t.length;o<s;o++)(i=t[o]).style&&(n=i.style.display,e?("none"===n&&(r[o]=J.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&ct(i)&&(r[o]=dt(i))):"none"!==n&&(r[o]="none",J.set(i,"display",n)));for(o=0;o<s;o++)null!=r[o]&&(t[o].style.display=r[o]);return t}C.fn.extend({show:function(){return pt(this,!0)},hide:function(){return pt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ct(this)?C(this).show():C(this).hide()}))}});var ht,ft,mt=/^(?:checkbox|radio)$/i,vt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,gt=/^$|^module$|\/(?:java|ecma)script/i;ht=y.createDocumentFragment().appendChild(y.createElement("div")),(ft=y.createElement("input")).setAttribute("type","radio"),ft.setAttribute("checked","checked"),ft.setAttribute("name","t"),ht.appendChild(ft),v.checkClone
vendor: 4,824 bytes, line 25
25=ht.cloneNode(!0).cloneNode(!0).lastChild.checked,ht.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ht.cloneNode(!0).lastChild.defaultValue,ht.innerHTML="<option></option>",v.option=!!ht.lastChild;var bt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function yt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&A(t,e)?C.merge([t],n):n}function wt(t,e){for(var n=0,i=t.length;n<i;n++)J.set(t[n],"globalEval",!e||J.get(e[n],"globalEval"))}bt.tbody=bt.tfoot=bt.colgroup=bt.caption=bt.thead,bt.th=bt.td,v.option||(bt.optgroup=bt.option=[1,"<select multiple='multiple'>","</select>"]);var xt=/<|&#?\w+;/;function Nt(t,e,n,i,r){for(var o,s,a,c,u,l,d=e.createDocumentFragment(),p=[],h=0,f=t.length;h<f;h++)if((o=t[h])||0===o)if("object"===N(o))C.merge(p,o.nodeType?[o]:o);else if(xt.test(o)){for(s=s||d.appendChild(e.createElement("div")),a=(vt.exec(o)||["",""])[1].toLowerCase(),c=bt[a]||bt._default,s.innerHTML=c[1]+C.htmlPrefilter(o)+c[2],l=c[0];l--;)s=s.lastChild;C.merge(p,s.childNodes),(s=d.firstChild).textContent=""}else p.push(e.createTextNode(o));for(d.textContent="",h=0;o=p[h++];)if(i&&C.inArray(o,i)>-1)r&&r.push(o);else if(u=st(o),s=yt(d.appendChild(o),"script"),u&&wt(s),n)for(l=0;o=s[l++];)gt.test(o.type||"")&&n.push(o);return d}var Ct=/^key/,Ot=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Tt=/^([^.]*)(?:\.(.+)|)/;function kt(){return!0}function jt(){return!1}function St(t,e){return t===function(){try{return y.activeElement}catch(t){}}()==("focus"===e)}function At(t,e,n,i,r,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=void 0),e)At(t,a,n,i,e[a],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=jt;else if(!r)return t;return 1===o&&(s=r,(r=function(t){return C().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=C.guid++)),t.each((function(){C.event.add(this,e,r,i,n)}))}function Et(t,e,n){n?(J.set(t,e,!1),C.event.add(t,e,{namespace:!1,handler:function(t){var i,r,o=J.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(C.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=a.call(arguments),J.set(this,e,o),i=n(this,e),this[e](),o!==(r=J.get(this,e))||i?J.set(this,e,!1):r={},o!==r)return t.stopImmediatePropagation(),t.preventDefault(),r.value}else o.length&&(J.set(this,e,{value:C.event.trigger(C.extend(o[0],C.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===J.get(t,e)&&C.event.add(t,e,kt)}C.event={global:{},add:function(t,e,n,i,r){var o,s,a,c,u,l,d,p,h,f,m,v=J.get(t);if(G(t))for(n.handler&&(n=(o=n).handler,r=o.selector),r&&C.find.matchesSelector(ot,r),n.guid||(n.guid=C.guid++),(c=v.events)||(c=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(e){return void 0!==C&&C.event.triggered!==e.type?C.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(L)||[""]).length;u--;)h=m=(a=Tt.exec(e[u])||[])[1],f=(a[2]||"").split(".").sort(),h&&(d=C.event.special[h]||{},h=(r?d.delegateType:d.bindType)||h,d=C.event.special[h]||{},l=C.extend({type:h,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&C.expr.match.needsContext.test(r),namespace:f.join(".")},o),(p=c[h])||((p=c[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,i,f,s)||t.addEventListener&&t.addEventListener(h,s)),d.add&&(d.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,l):p.push(l),C.event.global[h]=!0)},remove:function(t,e,n,i,r){var o,s,a,c,u,l,d,p,h,f,m,v=J.hasData(t)&&J.get(t);if(v&&(c=v.events)){for(u=(e=(e||"").match(L)||[""]).length;u--;)if(h=m=(a=Tt.exec(e[u])||[])[1],f=(a[2]||"").split(".").sort(),h){for(d=C.event.special[h]||{},p=c[h=(i?d.delegateType:d.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)l=p[o],!r&&m!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||i&&i!==l.selector&&("**"!==i||!l.selector)||(p.splice(o,1),l.selector&&p.delegateCount--,d.remove&&d.remove.call(t,l));s&&!p.length&&(d.teardown&&!1!==d.teardown.call(t,f,v.handle)||C.removeEvent(t,h,v.handle),delete c[h])}else for(h in c)C.event.remove(t,h+e[u],n,i,!0);C.isEmptyObject(c)&&J.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,o,s,a=new Array(arguments.length),c=C.event.fix(t),u=(J.get(this,"events")||Object.create(null))[c.type]||[],l=C.event.special[c.type]||{};for(a[0]=c,e=1;e<arguments.length;e++)a[e]=arguments[e];if(c.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,c)){for(s=C.event.handlers.call(this,c,u),e=0;(r=s[e++])&&!c.isPropagationStopped();
vendor: 3,521 bytes, line 25
25)for(c.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!c.isImmediatePropagationStopped();)c.rnamespace&&!1!==o.namespace&&!c.rnamespace.test(o.namespace)||(c.handleObj=o,c.data=o.data,void 0!==(i=((C.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a))&&!1===(c.result=i)&&(c.preventDefault(),c.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,c),c.result}},handlers:function(t,e){var n,i,r,o,s,a=[],c=e.delegateCount,u=t.target;if(c&&u.nodeType&&!("click"===t.type&&t.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],s={},n=0;n<c;n++)void 0===s[r=(i=e[n]).selector+" "]&&(s[r]=i.needsContext?C(r,this).index(u)>-1:C.find(r,this,null,[u]).length),s[r]&&o.push(i);o.length&&a.push({elem:u,handlers:o})}return u=this,c<e.length&&a.push({elem:u,handlers:e.slice(c)}),a},addProp:function(t,e){Object.defineProperty(C.Event.prototype,t,{enumerable:!0,configurable:!0,get:g(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[C.expando]?t:new C.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return mt.test(e.type)&&e.click&&A(e,"input")&&Et(e,"click",kt),!1},trigger:function(t){var e=this||t;return mt.test(e.type)&&e.click&&A(e,"input")&&Et(e,"click"),!0},_default:function(t){var e=t.target;return mt.test(e.type)&&e.click&&A(e,"input")&&J.get(e,"click")||A(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},C.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},C.Event=function(t,e){if(!(this instanceof C.Event))return new C.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?kt:jt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&C.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[C.expando]=!0},C.Event.prototype={constructor:C.Event,isDefaultPrevented:jt,isPropagationStopped:jt,isImmediatePropagationStopped:jt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=kt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=kt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=kt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},C.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&Ct.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&Ot.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},C.event.addProp),C.each({focus:"focusin",blur:"focusout"},(function(t,e){C.event.special[t]={setup:function(){return Et(this,t,St),!1},trigger:function(){return Et(this,t),!0},delegateType:e}}
vendor: 4,565 bytes, line 25
25)),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){C.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,r=t.relatedTarget,o=t.handleObj;return r&&(r===i||C.contains(i,r))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),C.fn.extend({on:function(t,e,n,i){return At(this,t,e,n,i)},one:function(t,e,n,i){return At(this,t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,C(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=jt),this.each((function(){C.event.remove(this,t,n,e)}))}});var Pt=/<script|<style|<link/i,Dt=/checked\s*(?:[^=]|=\s*.checked.)/i,$t=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function _t(t,e){return A(t,"table")&&A(11!==e.nodeType?e:e.firstChild,"tr")&&C(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Mt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Lt(t,e){var n,i,r,o,s,a;if(1===e.nodeType){if(J.hasData(t)&&(a=J.get(t).events))for(r in J.remove(e,"handle events"),a)for(n=0,i=a[r].length;n<i;n++)C.event.add(e,r,a[r][n]);Q.hasData(t)&&(o=Q.access(t),s=C.extend({},o),Q.set(e,s))}}function Rt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&mt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Bt(t,e,n,i){e=c(e);var r,o,s,a,u,l,d=0,p=t.length,h=p-1,f=e[0],m=g(f);if(m||p>1&&"string"==typeof f&&!v.checkClone&&Dt.test(f))return t.each((function(r){var o=t.eq(r);m&&(e[0]=f.call(this,r,o.html())),Bt(o,e,n,i)}));if(p&&(o=(r=Nt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===r.childNodes.length&&(r=o),o||i)){for(a=(s=C.map(yt(r,"script"),It)).length;d<p;d++)u=r,d!==h&&(u=C.clone(u,!0,!0),a&&C.merge(s,yt(u,"script"))),n.call(t[d],u,d);if(a)for(l=s[s.length-1].ownerDocument,C.map(s,Mt),d=0;d<a;d++)u=s[d],gt.test(u.type||"")&&!J.access(u,"globalEval")&&C.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?C._evalUrl&&!u.noModule&&C._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):x(u.textContent.replace($t,""),u,l))}return t}function Ht(t,e,n){for(var i,r=e?C.filter(e,t):t,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||C.cleanData(yt(i)),i.parentNode&&(n&&st(i)&&wt(yt(i,"script")),i.parentNode.removeChild(i));return t}C.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var i,r,o,s,a=t.cloneNode(!0),c=st(t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||C.isXMLDoc(t)))for(s=yt(a),i=0,r=(o=yt(t)).length;i<r;i++)Rt(o[i],s[i]);if(e)if(n)for(o=o||yt(t),s=s||yt(a),i=0,r=o.length;i<r;i++)Lt(o[i],s[i]);else Lt(t,a);return(s=yt(a,"script")).length>0&&wt(s,!c&&yt(t,"script")),a},cleanData:function(t){for(var e,n,i,r=C.event.special,o=0;void 0!==(n=t[o]);o++)if(G(n)){if(e=n[J.expando]){if(e.events)for(i in e.events)r[i]?C.event.remove(n,i):C.removeEvent(n,i,e.handle);n[J.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),C.fn.extend({detach:function(t){return Ht(this,t,!0)},remove:function(t){return Ht(this,t)},text:function(t){return z(this,(function(t){return void 0===t?C.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Bt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||_t(this,t).appendChild(t)}))},prepend:function(){return Bt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=_t(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Bt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Bt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(C.cleanData(yt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return C.clone(this,t,e)}))},html:function(t){return z(this,(function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Pt.test(t)&&!bt[(vt.exec(t)||["",""])[1].toLowerCase()]){t=C.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}
vendor: 2,437 bytes, line 25
25).nodeType&&(C.cleanData(yt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Bt(this,arguments,(function(e){var n=this.parentNode;C.inArray(this,t)<0&&(C.cleanData(yt(this)),n&&n.replaceChild(e,this))}),t)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){C.fn[t]=function(t){for(var n,i=[],r=C(t),o=r.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),C(r[s])[e](n),u.apply(i,n.get());return this.pushStack(i)}}));var Ut=new RegExp("^("+nt+")(?!px)[a-z%]+$","i"),Ft=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},qt=function(t,e,n){var i,r,o={};for(r in e)o[r]=t.style[r],t.style[r]=e[r];for(r in i=n.call(t),e)t.style[r]=o[r];return i},zt=new RegExp(rt.join("|"),"i");function Wt(t,e,n){var i,r,o,s,a=t.style;return(n=n||Ft(t))&&(""!==(s=n.getPropertyValue(e)||n[e])||st(t)||(s=C.style(t,e)),!v.pixelBoxStyles()&&Ut.test(s)&&zt.test(e)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function Vt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ot.appendChild(u).appendChild(l);var t=n.getComputedStyle(l);i="1%"!==t.top,c=12===e(t.marginLeft),l.style.right="60%",s=36===e(t.right),r=36===e(t.width),l.style.position="absolute",o=12===e(l.offsetWidth/3),ot.removeChild(u),l=null}}function e(t){return Math.round(parseFloat(t))}var i,r,o,s,a,c,u=y.createElement("div"),l=y.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,C.extend(v,{boxSizingReliable:function(){return t(),r},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),c},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,i,r;return null==a&&(t=y.createElement("table"),e=y.createElement("tr"),i=y.createElement("div"),t.style.cssText="position:absolute;
25left:-11111px",e.style.height="1px",i.style.height="9px",ot.appendChild(t).appendChild(e).appendChild(i),r=n.getComputedStyle(e),a=parseInt(r.height)>3,ot.removeChild(t)),a}}))}();var Yt=["Webkit","Moz","ms"],Kt=y.createElement("div").style,Gt={};function Xt(t){var e=C.cssProps[t]||Gt[t];return e||(t in Kt?t:Gt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Yt.length;n--;)if((t=Yt[n]+e)in Kt)return t}(t)||t)}var Jt=/^(none|table(?!-c[ea]).+)/,Qt=/^--/,Zt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,n){var i=it.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function ne(t,e,n,i,r,o){var s="width"===e?1:0,a=0,c=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(c+=C.css(t,n+rt[s],!0,r)),i?("content"===n&&(c-=C.css(t,"padding"+rt[s],!0,r)),"margin"!==n&&(c-=C.css(t,"border"+rt[s]+"Width",!0,r))):(c+=C.css(t,"padding"+rt[s],!0,r),"padding"!==n?c+=C.css(t,"border"+rt[s]+"Width",!0,r):a+=C.css(t,"border"+rt[s]+"Width",!0,r));return!i&&o>=0&&(c+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-c-a-.5))||0),c}function ie(t,e,n){var i=Ft(t),r=(!v.boxSizingReliable()||n)&&"border-box"===C.css(t,"boxSizing",!1,i),o=r,s=Wt(t,e,i),a="offset"+e[0].toUpperCase()+e.slice(1);if(Ut.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&r||!v.reliableTrDimensions()&&A(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===C.css(t,"display",!1,i))&&t.getClientRects().length&&(r="border-box"===C.css(t,"boxSizing",!1,i),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+ne(t,e,n||(r?"border":"content"),o,i,s)+"px"}function re(t,e,n,i,r){return new re.prototype.init(t,e,n,i,r)}C.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Wt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=K(e),c=Qt.test(e),u=t.style;if(c||(e=Xt(a)),s=C.cssHooks[e]||C.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(t,!1,i))?r:u[e];"string"===(o=typeof n)&&(r=it.exec(n))&&r[1]&&(n=ut(t,e,r),o="number"),null!=n&&n==n&&("number"!==o||c||(n+=r&&r[3]||(C.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,i))||(c?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,i){var r,o,s,a=K(e);return Qt.test(e)||(e=Xt(a)),(s=C.cssHooks[e]||C.cssHooks[a])&&"get"in s&&(r=s.get(t,!0,n)),void 0===r&&(r=Wt(t,e,i)),"normal"===r&&e in te&&(r=te[e]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),C.each(["height","width"],(function(t,e){C.cssHooks[e]={get:function(t,n,i){if(n)return!Jt.test(C.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ie(t,e,i):qt(t,Zt,(function(){return ie(t,e,i)}))},set:function(t,n,i){var r,o=Ft(t),s=!v.scrollboxSize()&&"absolute"===o.position,a=(s||i)&&"border-box"===C.css(t,"boxSizing",!1,o),c=i?ne(t,e,i,a,o):0;return a&&s&&(c-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ne(t,e,"border",!1,o)-.5)),c&&(r=it.exec(n))&&"px"!==(r[3]||"px")&&(t.style[e]=n,n=C.css(t,e)),ee(0,n,c)}}})),C.cssHooks.marginLeft=Vt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-qt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),C.each({margin:"",padding:"",border:"Width"},(function(t,e){C.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[t+rt[i]+e]=o[i]||o[i-2]||o[0];return r}},"margin"!==t&&(C.cssHooks[t+e].set=ee)})),C.fn.extend({css:function(t,e){return z(this,(function(t,e,n){var i,r,o={},s=0;if(Array.isArray(e)){for(i=Ft(t),r=e.length;s<r;s++)o[e[s]]=C.css(t,e[s],!1,i);return o}return void 0!==n?C.style(t,e,n):C.css(t,e)}),t,e,arguments.length>1)}}),C.Tween=re,re.prototype={constructor:re,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||
vendor: 8,767 bytes, line 25
25C.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(C.cssNumber[n]?"":"px")},cur:function(){var t=re.propHooks[this.prop];return t&&t.get?t.get(this):re.propHooks._default.get(this)},run:function(t){var e,n=re.propHooks[this.prop];return this.options.duration?this.pos=e=C.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):re.propHooks._default.set(this),this}},re.prototype.init.prototype=re.prototype,re.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=C.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){C.fx.step[t.prop]?C.fx.step[t.prop](t):1!==t.elem.nodeType||!C.cssHooks[t.prop]&&null==t.elem.style[Xt(t.prop)]?t.elem[t.prop]=t.now:C.style(t.elem,t.prop,t.now+t.unit)}}},re.propHooks.scrollTop=re.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},C.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},C.fx=re.prototype.init,C.fx.step={};var oe,se,ae=/^(?:toggle|show|hide)$/,ce=/queueHooks$/;function ue(){se&&(!1===y.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ue):n.setTimeout(ue,C.fx.interval),C.fx.tick())}function le(){return n.setTimeout((function(){oe=void 0})),oe=Date.now()}function de(t,e){var n,i=0,r={height:t};for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=rt[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function pe(t,e,n){for(var i,r=(he.tweeners[e]||[]).concat(he.tweeners["*"]),o=0,s=r.length;o<s;o++)if(i=r[o].call(n,e,t))return i}function he(t,e,n){var i,r,o=0,s=he.prefilters.length,a=C.Deferred().always((function(){delete c.elem})),c=function(){if(r)return!1;for(var e=oe||le(),n=Math.max(0,u.startTime+u.duration-e),i=1-(n/u.duration||0),o=0,s=u.tweens.length;o<s;o++)u.tweens[o].run(i);return a.notifyWith(t,[u,i,n]),i<1&&s?n:(s||a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u]),!1)},u=a.promise({elem:t,props:C.extend({},e),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},n),originalProperties:e,originalOptions:n,startTime:oe||le(),duration:n.duration,tweens:[],createTween:function(e,n){var i=C.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var n=0,i=e?u.tweens.length:0;if(r)return this;for(r=!0;n<i;n++)u.tweens[n].run(1);return e?(a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u,e])):a.rejectWith(t,[u,e]),this}}),l=u.props;for(!function(t,e){var n,i,r,o,s;for(n in t)if(r=e[i=K(n)],o=t[n],Array.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),(s=C.cssHooks[i])&&"expand"in s)for(n in o=s.expand(o),delete t[i],o)n in t||(t[n]=o[n],e[n]=r);else e[i]=r}(l,u.opts.specialEasing);o<s;o++)if(i=he.prefilters[o].call(u,t,l,u.opts))return g(i.stop)&&(C._queueHooks(u.elem,u.opts.queue).stop=i.stop.bind(i)),i;return C.map(l,pe,u),g(u.opts.start)&&u.opts.start.call(t,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),C.fx.timer(C.extend(c,{elem:t,anim:u,queue:u.opts.queue})),u}C.Animation=C.extend(he,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ut(n.elem,t,it.exec(e),n),n}]},tweener:function(t,e){g(t)?(e=t,t=["*"]):t=t.match(L);for(var n,i=0,r=t.length;i<r;i++)n=t[i],he.tweeners[n]=he.tweeners[n]||[],he.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,r,o,s,a,c,u,l,d="width"in e||"height"in e,p=this,h={},f=t.style,m=t.nodeType&&ct(t),v=J.get(t,"fxshow");for(i in n.queue||(null==(s=C._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,p.always((function(){p.always((function(){s.unqueued--,C.queue(t,"fx").length||s.empty.fire()}))}))),e)if(r=e[i],ae.test(r)){if(delete e[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!v||void 0===v[i])continue;m=!0}h[i]=v&&v[i]||C.style(t,i)}if((c=!C.isEmptyObject(e))||!C.isEmptyObject(h))for(i in d&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(u=v&&v.display)&&(u=J.get(t,"display")),"none"===(l=C.css(t,"display"))&&(u?l=u:(pt([t],!0),u=t.style.display||u,l=C.css(t,"display"),pt([t]))),("inline"===l||"inline-block"===l&&null!=u)&&"none"===C.css(t,"float")&&(c||(p.done((function(){f.display=u})),null==u&&(l=f.display,u="none"===l?"":l)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",p.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),c=!1,h)c||(v?"hidden"in v&&(m=v.hidden):v=J.access(t,"fxshow",{display:u}),o&&(v.hidden=!m),m&&pt([t],!0),p.done((function(){for(i in m||pt([t]),J.remove(t,"fxshow"),h)C.style(t,i,h[i])}))),c=pe(m?v[i]:0,i,p),i in v||(v[i]=c.start,m&&(c.end=c.start,c.start=0))}],prefilter:function(t,e){e?he.prefilters.unshift(t):he.prefilters.push(t)}}),C.speed=function(t,e,n){var i=t&&"object"==typeof t?C.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return C.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in C.fx.speeds?i.duration=C.fx.speeds[i.duration]:i.duration=C.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){g(i.old)&&i.old.call(this),i.queue&&C.dequeue(this,i.queue)},i},C.fn.extend({fadeTo:function(t,e,n,i){return this.filter(ct).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var r=C.isEmptyObject(t),o=C.speed(e,n,i),s=function(){var e=he(this,C.extend({},t),o);(r||J.get(this,"finish"))&&e.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,r=null!=t&&t+"queueHooks",o=C.timers,s=J.get(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&ce.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(n),e=!1,o.splice(r,1));!e&&n||C.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=J.get(this),i=n[t+"queue"],r=n[t+"queueHooks"],o=C.timers,s=i?i.length:0;for(n.finish=!0,C.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish}))}}),C.each(["toggle","show","hide"],(function(t,e){var n=C.fn[e];C.fn[e]=function(t,i,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(de(e,!0),t,i,r)}})),C.each({slideDown:de("show"),slideUp:de("hide"),slideToggle:de("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){C.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}})),C.timers=[],C.fx.tick=function(){var t,e=0,n=C.timers;for(oe=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||C.fx.stop(),oe=void 0},C.fx.timer=function(t){C.timers.push(t),C.fx.start()},C.fx.interval=13,C.fx.start=function(){se||(se=!0,ue())},C.fx.stop=function(){se=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(t,e){return t=C.fx&&C.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,i){var r=n.setTimeout(e,t);i.stop=function(){n.clearTimeout(r)}}))},function(){var t=y.createElement("input"),e=y.createElement("select").appendChild(y.createElement("option"));t.type="checkbox",v.checkOn=""!==t.value,v.optSelected=e.selected,(t=y.createElement("input")).value="t",t.type="radio",v.radioValue="t"===t.value}();var fe,me=C.expr.attrHandle;C.fn.extend({attr:function(t,e){return z(this,C.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){C.removeAttr(this,t)}))}}),C.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?C.prop(t,e,n):(1===o&&C.isXMLDoc(t)||(r=C.attrHooks[e.toLowerCase()]||(C.expr.match.bool.test(e)?fe:void 0)),void 0!==n?null===n?void C.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=C.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&A(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,r=e&&e.match(L);if(r&&1===t.nodeType)for(;n=r[i++];)t.removeAttribute(n)}}),fe={set:function(t,e,n){return!1===e?C.removeAttr(t,n):t.setAttribute(n,n),n}},C.each(C.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=me[e]||C.find.attr;
vendor: 20,397 bytes, line 25
25me[e]=function(t,e,i){var r,o,s=e.toLowerCase();return i||(o=me[s],me[s]=r,r=null!=n(t,e,i)?s:null,me[s]=o),r}}));var ve=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function be(t){return(t.match(L)||[]).join(" ")}function ye(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(L)||[]}C.fn.extend({prop:function(t,e){return z(this,C.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[C.propFix[t]||t]}))}}),C.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&C.isXMLDoc(t)||(e=C.propFix[e]||e,r=C.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=C.find.attr(t,"tabindex");return e?parseInt(e,10):ve.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(C.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){C.propFix[this.toLowerCase()]=this})),C.fn.extend({addClass:function(t){var e,n,i,r,o,s,a,c=0;if(g(t))return this.each((function(e){C(this).addClass(t.call(this,e,ye(this)))}));if((e=we(t)).length)for(;n=this[c++];)if(r=ye(n),i=1===n.nodeType&&" "+be(r)+" "){for(s=0;o=e[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(a=be(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,r,o,s,a,c=0;if(g(t))return this.each((function(e){C(this).removeClass(t.call(this,e,ye(this)))}));if(!arguments.length)return this.attr("class","");if((e=we(t)).length)for(;n=this[c++];)if(r=ye(n),i=1===n.nodeType&&" "+be(r)+" "){for(s=0;o=e[s++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");r!==(a=be(i))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t,i="string"===n||Array.isArray(t);return"boolean"==typeof e&&i?e?this.addClass(t):this.removeClass(t):g(t)?this.each((function(n){C(this).toggleClass(t.call(this,n,ye(this),e),e)})):this.each((function(){var e,r,o,s;if(i)for(r=0,o=C(this),s=we(t);e=s[r++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=ye(this))&&J.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":J.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+be(ye(n))+" ").indexOf(e)>-1)return!0;return!1}});var xe=/\r/g;C.fn.extend({val:function(t){var e,n,i,r=this[0];return arguments.length?(i=g(t),this.each((function(n){var r;1===this.nodeType&&(null==(r=i?t.call(this,n,C(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=C.map(r,(function(t){return null==t?"":t+""}))),(e=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))}))):r?(e=C.valHooks[r.type]||C.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(xe,""):null==n?"":n:void 0}}),C.extend({valHooks:{option:{get:function(t){var e=C.find.attr(t,"value");return null!=e?e:be(C.text(t))}},select:{get:function(t){var e,n,i,r=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],c=s?o+1:r.length;for(i=o<0?c:s?o:0;i<c;i++)if(((n=r[i]).selected||i===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(e=C(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,i,r=t.options,o=C.makeArray(e),s=r.length;s--;)((i=r[s]).selected=C.inArray(C.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),C.each(["radio","checkbox"],(function(){C.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=C.inArray(C(t).val(),e)>-1}},v.checkOn||(C.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in n;var Ne=/^(?:focusinfocus|focusoutblur)$/,Ce=function(t){t.stopPropagation()};C.extend(C.event,{trigger:function(t,e,i,r){var o,s,a,c,u,l,d,p,f=[i||y],m=h.call(t,"type")?t.type:t,v=h.call(t,"namespace")?t.namespace.split("."):[];if(s=p=a=i=i||y,3!==i.nodeType&&8!==i.nodeType&&!Ne.test(m+C.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),u=m.indexOf(":")<0&&"on"+m,(t=t[C.expando]?t:new C.Event(m,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:C.makeArray(e,[t]),d=C.event.special[m]||{},r||!d.trigger||!1!==d.trigger.apply(i,e))){if(!r&&!d.noBubble&&!b(i)){for(c=d.delegateType||m,Ne.test(c+m)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(i.ownerDocument||y)&&f.push(a.defaultView||a.parentWindow||n)}for(o=0;(s=f[o++])&&!t.isPropagationStopped();)p=s,t.type=o>1?c:d.bindType||m,(l=(J.get(s,"events")||Object.create(null))[t.type]&&J.get(s,"handle"))&&l.apply(s,e),(l=u&&s[u])&&l.apply&&G(s)&&(t.result=l.apply(s,e),!1===t.result&&t.preventDefault());return t.type=m,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),e)||!G(i)||u&&g(i[m])&&!b(i)&&((a=i[u])&&(i[u]=null),C.event.triggered=m,t.isPropagationStopped()&&p.addEventListener(m,Ce),i[m](),t.isPropagationStopped()&&p.removeEventListener(m,Ce),C.event.triggered=void 0,a&&(i[u]=a)),t.result}},simulate:function(t,e,n){var i=C.extend(new C.Event,n,{type:t,isSimulated:!0});C.event.trigger(i,null,e)}}),C.fn.extend({trigger:function(t,e){return this.each((function(){C.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return C.event.trigger(t,e,n,!0)}}),v.focusin||C.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){C.event.simulate(e,t.target,C.event.fix(t))};C.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,r=J.access(i,e);r||i.addEventListener(t,n,!0),J.access(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,r=J.access(i,e)-1;r?J.access(i,e,r):(i.removeEventListener(t,n,!0),J.remove(i,e))}}}));var Oe=n.location,Te={guid:Date.now()},ke=/\?/;C.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||C.error("Invalid XML: "+t),e};var je=/\[\]$/,Se=/\r?\n/g,Ae=/^(?:submit|button|image|reset|file)$/i,Ee=/^(?:input|select|textarea|keygen)/i;function Pe(t,e,n,i){var r;if(Array.isArray(e))C.each(e,(function(e,r){n||je.test(t)?i(t,r):Pe(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,i)}));else if(n||"object"!==N(e))i(t,e);else for(r in e)Pe(t+"["+r+"]",e[r],n,i)}C.param=function(t,e){var n,i=[],r=function(t,e){var n=g(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!C.isPlainObject(t))C.each(t,(function(){r(this.name,this.value)}));else for(n in t)Pe(n,t[n],e,r);return i.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=C.prop(this,"elements");return t?C.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!C(this).is(":disabled")&&Ee.test(this.nodeName)&&!Ae.test(t)&&(this.checked||!mt.test(t))})).map((function(t,e){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,(function(t){return{name:e.name,value:t.replace(Se,"\r\n")}})):{name:e.name,value:n.replace(Se,"\r\n")}})).get()}});var De=/%20/g,$e=/#.*$/,_e=/([?&])_=[^&]*/,Ie=/^(.*?):[ \t]*([^\r\n]*)$/gm,Me=/^(?:GET|HEAD)$/,Le=/^\/\//,Re={},Be={},He="*/".concat("*"),Ue=y.createElement("a");function Fe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(L)||[];if(g(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function qe(t,e,n,i){var r={},o=t===Be;function s(a){var c;return r[a]=!0,C.each(t[a]||[],(function(t,a){var u=a(e,n,i);return"string"!=typeof u||o||r[u]?o?!(c=u):void 0:(e.dataTypes.unshift(u),s(u),!1)})),c}return s(e.dataTypes[0])||!r["*"]&&s("*")}function ze(t,e){var n,i,r=C.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&C.extend(!0,t,i),t}Ue.href=Oe.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Oe.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Oe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":He,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?ze(ze(t,C.ajaxSettings),e):ze(C.ajaxSettings,t)},ajaxPrefilter:Fe(Re),ajaxTransport:Fe(Be),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,r,o,s,a,c,u,l,d,p,h=C.ajaxSetup({},e),f=h.context||h,m=h.context&&(f.nodeType||f.jquery)?C(f):C.event,v=C.Deferred(),g=C.Callbacks("once memory"),b=h.statusCode||{},w={},x={},N="canceled",O={readyState:0,getResponseHeader:function(t){var e;if(u){if(!s)for(s={};e=Ie.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(t,e){return null==u&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==u&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)O.always(t[O.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||N;return i&&i.abort(e),T(0,e),this}};if(v.promise(O),h.url=((t||h.url||Oe.href)+"").replace(Le,Oe.protocol+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(L)||[""],null==h.crossDomain){c=y.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=Ue.protocol+"//"+Ue.host!=c.protocol+"//"+c.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=C.param(h.data,h.traditional)),qe(Re,h,e,O),u)return O;for(d in(l=C.event&&h.global)&&0==C.active++&&C.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Me.test(h.type),r=h.url.replace($e,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(De,"+")):(p=h.url.slice(r.length),h.data&&(h.processData||"string"==typeof h.data)&&(r+=(ke.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(r=r.replace(_e,"$1"),p=(ke.test(r)?"&":"?")+"_="+Te.guid+++p),h.url=r+p),h.ifModified&&(C.lastModified[r]&&O.setRequestHeader("If-Modified-Since",C.lastModified[r]),C.etag[r]&&O.setRequestHeader("If-None-Match",C.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&O.setRequestHeader("Content-Type",h.contentType),O.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+He+"; q=0.01":""):h.accepts["*"]),h.headers)O.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(f,O,h)||u))return O.abort();if(N="abort",g.add(h.complete),O.done(h.success),O.fail(h.error),i=qe(Be,h,e,O)){if(O.readyState=1,l&&m.trigger("ajaxSend",[O,h]),u)return O;h.async&&h.timeout>0&&(a=n.setTimeout((function(){O.abort("timeout")}),h.timeout));try{u=!1,i.send(w,T)}catch(t){if(u)throw t;T(-1,t)}}else T(-1,"No Transport");function T(t,e,s,c){var d,p,y,w,x,N=e;u||(u=!0,a&&n.clearTimeout(a),i=void 0,o=c||"",O.readyState=t>0?4:0,d=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var i,r,o,s,a=t.contents,c=t.dataTypes;"*"===c[0];)c.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){c.unshift(r);break}if(c[0]in n)o=c[0];else{for(r in n){if(!c[0]||t.converters[r+" "+c[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==c[0]&&c.unshift(o),n[o]}(h,O,s)),!d&&C.inArray("script",h.dataTypes)>-1&&(h.converters["text script"]=function(){}),w=function(t,e,n,i){var r,o,s,a,c,u={},l=t.dataTypes.slice();if(l[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!c&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),c=o,o=l.shift())if("*"===o)o=c;else if("*"!==c&&c!==o){if(!(s=u[c+" "+o]||u["* "+o]))for(r in u)if((a=r.split(" "))[1]===o&&(s=u[c+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[r]:!0!==u[r]&&(o=a[0],l.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+c+" to "+o}}}return{state:"success",data:e}}(h,w,O,d),d?(h.ifModified&&((x=O.getResponseHeader("Last-Modified"))&&(C.lastModified[r]=x),(x=O.getResponseHeader("etag"))&&(C.etag[r]=x)),204===t||"HEAD"===h.type?N="nocontent":304===t?N="notmodified":(N=w.state,p=w.data,d=!(y=w.error))):(y=N,!t&&N||(N="error",t<0&&(t=0))),O.status=t,O.statusText=(e||N)+"",d?v.resolveWith(f,[p,N,O]):v.rejectWith(f,[O,N,y]),O.statusCode(b),b=void 0,l&&m.trigger(d?"ajaxSuccess":"ajaxError",[O,h,d?p:y]),g.fireWith(f,[O,N]),l&&(m.trigger("ajaxComplete",[O,h]),--C.active||C.event.trigger("ajaxStop")))}return O},getJSON:function(t,e,n){return C.get(t,e,n,"json")},getScript:function(t,e){return C.get(t,void 0,e,"script")}}),C.each(["get","post"],(function(t,e){C[e]=function(t,n,i,r){return g(n)&&(r=r||i,i=n,n=void 0),C.ajax(C.extend({url:t,type:e,dataType:r,data:n,success:i},C.isPlainObject(t)&&t))}})),C.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),C._evalUrl=function(t,e,n){return C.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){C.globalEval(t,e,n)}})},C.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=C(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return g(t)?this.each((function(e){C(this).wrapInner(t.call(this,e))})):this.each((function(){var e=C(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){C(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){C(this).replaceWith(this.childNodes)})),this}}),C.expr.pseudos.hidden=function(t){return!C.expr.pseudos.visible(t)},C.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var We={0:200,1223:204},Ve=C.ajaxSettings.xhr();v.cors=!!Ve&&"withCredentials"in Ve,v.ajax=Ve=!!Ve,C.ajaxTransport((function(t){var e,i;if(v.cors||Ve&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);e=function(t){return function(){e&&(e=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(We[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),i=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){e&&i()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),C.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return C.globalEval(t),t}}}),C.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),C.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,r){e=C("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&r("error"===t.type?404:200,t.type)}),y.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Ye,Ke=[],Ge=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ke.pop()||C.expando+"_"+Te.guid++;return this[t]=!0,t}}),C.ajaxPrefilter("json jsonp",(function(t,e,i){var r,o,s,a=!1!==t.jsonp&&(Ge.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ge.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ge,"$1"+r):!1!==t.jsonp&&(t.url+=(ke.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return s||C.error(r+" was not called"),s[0]},t.dataTypes[0]="json",o=n[r],n[r]=function(){s=arguments},i.always((function(){void 0===o?C(n).removeProp(r):n[r]=o,t[r]&&(t.jsonpCallback=e.jsonpCallback,Ke.push(r)),s&&g(o)&&o(s[0]),s=o=void 0})),"script"})),v.createHTMLDocument=((Ye=y.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ye.childNodes.length),C.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(v.createHTMLDocument?((i=(e=y.implementation.createHTMLDocument("")).createElement("base")).href=y.location.href,e.head.appendChild(i)):e=y),o=!n&&[],(r=E.exec(t))?[e.createElement(r[1])]:(r=Nt([t],e,o),o&&o.length&&C(o).remove(),C.merge([],r.childNodes)));var i,r,o},C.fn.load=function(t,e,n){var i,r,o,s=this,a=t.indexOf(" ");return a>-1&&(i=be(t.slice(a)),t=t.slice(0,a)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(r="POST"),s.length>0&&C.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done((function(t){o=arguments,s.html(i?C("<div>").append(C.parseHTML(t)).find(i):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},C.expr.pseudos.animated=function(t){return C.grep(C.timers,(function(e){return t===e.elem})).length},C.offset={setOffset:function(t,e,n){var i,r,o,s,a,c,u=C.css(t,"position"),l=C(t),d={};"static"===u&&(t.style.position="relative"),a=l.offset(),o=C.css(t,"top"),c=C.css(t,"left"),("absolute"===u||"fixed"===u)&&(o+c).indexOf("auto")>-1?(s=(i=l.position()).top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(c)||0),g(e)&&(e=e.call(t,n,C.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+r),"using"in e?e.using.call(t,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),l.css(d))}},C.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){C.offset.setOffset(this,t,e)}));var e,n,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,i=this[0],r={top:0,left:0};if("fixed"===C.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),n=i.ownerDocument,t=i.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===C.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((r=C(t).offset()).top+=C.css(t,"borderTopWidth",!0),r.left+=C.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-C.css(i,"marginTop",!0),left:e.left-r.left-C.
25css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===C.css(t,"position");)t=t.offsetParent;return t||ot}))}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;C.fn[t]=function(i){return z(this,(function(t,i,r){var o;if(b(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===r)return o?o[e]:t[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):t[i]=r}),t,i,arguments.length)}})),C.each(["top","left"],(function(t,e){C.cssHooks[e]=Vt(v.pixelPosition,(function(t,n){if(n)return n=Wt(t,e),Ut.test(n)?C(t).position()[e]+"px":n}))})),C.each({Height:"height",Width:"width"},(function(t,e){C.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,i){C.fn[i]=function(r,o){var s=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===o?"margin":"border");return z(this,(function(e,n,r){var o;return b(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===r?C.css(e,n,a):C.style(e,n,r,a)}),e,s?r:void 0,s)}}))})),C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){C.fn[e]=function(t){return this.on(e,t)}})),C.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),C.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){C.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Xe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;C.proxy=function(t,e){var n,i,r;if("string"==typeof e&&(n=t[e],e=t,t=n),g(t))return i=a.call(arguments,2),(r=function(){return t.apply(e||this,i.concat(a.call(arguments)))}).guid=t.guid=t.guid||C.guid++,r},C.holdReady=function(t){t?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=A,C.isFunction=g,C.isWindow=b,C.camelCase=K,C.type=N,C.now=Date.now,C.isNumeric=function(t){var e=C.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},C.trim=function(t){return null==t?"":(t+"").replace(Xe,"")},void 0===(i=function(){return C}.apply(e,[]))||(t.exports=i);var Je=n.jQuery,Qe=n.$;return C.noConflict=function(t){return n.$===C&&(n.$=Qe),t&&n.jQuery===C&&(n.jQuery=Je),C},void 0===r&&(n.jQuery=n.$=C),C}))},function(t,e,n){(function(e){t.exports=e.m=n(108)}).call(this,n(27))},function(t,e,n){"use strict";var i=n(109),r=n(112),o=n(73),s=function(){return i.apply(this,arguments)};s.m=i,s.trust=i.trust,s.fragment=i.fragment,s.mount=o.mount,s.route=n(118),s.render=n(93),s.redraw=o.redraw,s.request=r.request,s.jsonp=r.jsonp,s.parseQueryString=n(96),s.buildQueryString=n(94),s.parsePathname=n(75),s.buildPathname=n(74),s.vnode=n(30),s.PromisePolyfill=n(91),t.exports=s},function(t,e,n){"use strict";var i=n(88);i.trust=n(110),i.fragment=n(111),t.exports=i},function(t,e,n){"use strict";var i=n(30);t.exports=function(t){return null==t&&(t=""),i("<",void 0,void 0,t,void 0,void 0)}},function(t,e,n){"use strict";var i=n(30),r=n(89);t.exports=function(){var t=r.apply(0,arguments);return t.tag="[",t.children=i.normalizeChildren(t.children),t}},function(t,e,n){"use strict";var i=n(90),r=n(73);t.exports=n(117)(window,i,r.redraw)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var i,r,o,s,a,c=1,u={},l=!1,d=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick((function(){f(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){f(t.data)},i=function(t){o.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(t){var e=d.createElement("script");e.onreadystatechange=function(){f(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):i=function(t){setTimeout(f,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&f(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),i=function(e){t.postMessage(s+e,"*")}),p.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return u[c]=r,i(c),c++},p.clearImmediate=h}function h(t){delete u[t]}function f(t){if(l)setTimeout(f,0,t);else{var e=u[t];if(e){l=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{h(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(27),n(114))},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}
25catch(t){i=s}}();var c,u=[],l=!1,d=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&h())}function h(){if(!l){var t=a(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++d<e;)c&&c[d].run();d=-1,e=u.length}c=null,l=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||l||a(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e,n){"use strict";var i=n(30);t.exports=function(t){var e,n=t&&t.document,r={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function o(t){return t.attrs&&t.attrs.xmlns||r[t.tag]}function s(t,e){if(t.state!==e)throw new Error("`vnode.state` must not be modified")}function a(t){var e=t.state;try{return this.apply(e,arguments)}finally{s(t,e)}}function c(){try{return n.activeElement}catch(t){return null}}function u(t,e,n,i,r,o,s){for(var a=n;a<i;a++){var c=e[a];null!=c&&l(t,c,r,s,o)}}function l(t,e,r,s,c){var d=e.tag;if("string"==typeof d)switch(e.state={},null!=e.attrs&&M(e.attrs,e,r),d){case"#":!function(t,e,i){e.dom=n.createTextNode(e.children),y(t,e.dom,i)}(t,e,c);break;case"<":p(t,e,s,c);break;case"[":!function(t,e,i,r,o){var s=n.createDocumentFragment();if(null!=e.children){var a=e.children;u(s,a,0,a.length,i,null,r)}e.dom=s.firstChild,e.domSize=s.childNodes.length,y(t,s,o)}(t,e,r,s,c);break;default:!function(t,e,r,s,a){var c=e.tag,l=e.attrs,d=l&&l.is,p=(s=o(e)||s)?d?n.createElementNS(s,c,{is:d}):n.createElementNS(s,c):d?n.createElement(c,{is:d}):n.createElement(c);e.dom=p,null!=l&&function(t,e,n){for(var i in e)k(t,i,null,e[i],n)}(e,l,s);if(y(t,p,a),!w(e)&&(null!=e.text&&(""!==e.text?p.textContent=e.text:e.children=[i("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var h=e.children;u(p,h,0,h.length,r,null,s),"select"===e.tag&&null!=l&&function(t,e){if("value"in e)if(null===e.value)-1!==t.dom.selectedIndex&&(t.dom.value=null);else{var n=""+e.value;t.dom.value===n&&-1!==t.dom.selectedIndex||(t.dom.value=n)}"selectedIndex"in e&&k(t,"selectedIndex",null,e.selectedIndex,void 0)}(e,l)}}(t,e,r,s,c)}else!function(t,e,n,r,o){(function(t,e){var n;if("function"==typeof t.tag.view){if(t.state=Object.create(t.tag),null!=(n=t.state.view).$$reentrantLock$$)return;n.$$reentrantLock$$=!0}else{if(t.state=void 0,null!=(n=t.tag).$$reentrantLock$$)return;n.$$reentrantLock$$=!0,t.state=null!=t.tag.prototype&&"function"==typeof t.tag.prototype.view?new t.tag(t):t.tag(t)}M(t.state,t,e),null!=t.attrs&&M(t.attrs,t,e);if(t.instance=i.normalize(a.call(t.state.view,t)),t.instance===t)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(e,n),null!=e.instance?(l(t,e.instance,n,r,o),e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0):e.domSize=0}(t,e,r,s,c)}var d={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function p(t,e,i,r){var o=e.children.match(/^\s*?<(\w+)/im)||[],s=n.createElement(d[o[1]]||"div");"http://www.w3.org/2000/svg"===i?(s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e.children+"</svg>",s=s.firstChild):s.innerHTML=e.children,e.dom=s.firstChild,e.domSize=s.childNodes.length,e.instance=[];for(var a,c=n.createDocumentFragment();a=s.firstChild;)e.instance.push(a),c.appendChild(a);y(t,c,r)}function h(t,e,n,i,r,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)u(t,n,0,n.length,i,r,o);else if(null==n||0===n.length)x(t,e,0,e.length);else{var s=null!=e[0]&&null!=e[0].key,a=null!=n[0]&&null!=n[0].key,c=0,d=0;if(!s)for(;d<e.length&&null==e[d];)d++;if(!a)for(;c<n.length&&null==n[c];)c++;if(null===a&&null==s)return;if(s!==a)x(t,e,d,e.length),u(t,n,c,n.length,i,r,o);else if(a){for(var p,h,y,w,C,O=e.length-1,T=n.length-1;O>=d&&T>=c&&(y=e[O],w=n[T],y.key===w.key);)y!==w&&f(t,y,w,i,r,o),null!=w.dom&&(r=w.dom),O--,T--;for(;O>=d&&T>=c&&(p=e[d],h=n[c],p.key===h.key);)d++,c++,p!==h&&f(t,p,h,i,g(e,d,r),o);for(;O>=d&&T>=c&&c!==T&&p.key===w.key&&y.key===h.key;)b(t,y,C=g(e,d,r)),y!==h&&f(t,y,h,i,C,o),++c<=--T&&b(t,p,r),p!==w&&f(t,p,w,i,r,o),null!=w.dom&&(r=w.dom),d++,y=e[--O],w=n[T],p=e[d],h=n[c];for(;O>=d&&T>=c&&y.key===w.key;)y!==w&&f(t,y,w,i,r,o),null!=w.dom&&(r=w.dom),T--,y=e[--O],w=n[T];if(c>T)x(t,e,d,O+1);else if(d>O)u(t,n,c,T+1,i,r,o);else{var k,j,S=r,A=T-c+1,E=new Array(A),P=0,D=0,$=2147483647,_=0;for(D=0;D<A;D++)E[D]=-1;for(D=T;D>=c;D--){null==k&&(k=m(e,d,O+1));var I=k[(w=n[D]).key];null!=I&&($=I<$?I:-1,E[D-c]=I,y=e[I],e[I]=null,y!==w&&f(t,y,w,i,r,o),null!=w.dom&&(r=w.dom),_++)}if(r=S,_!==O-d+1&&x(t,e,d,O+1),0===_)u(t,n,c,T+1,i,r,o);else if(-1===$)for(P=(j=function(t){var e=[0],n=0,i=0,r=0,o=v.length=t.length;for(r=0;r<o;r++)v[r]=t[r];for(r=0;r<o;++r)if(-1!==t[r]){var s=e[e.length-1];if(t[s]<t[r])v[r]=s,e.push(r);else{for(n=0,i=e.length-1;n<i;){var a=(n>>>1)+(i>>>1)+(n&i&1);t[e[a]]<t[r]?n=a+1:i=a}t[r]<t[e[n]]&&(n>0&&(v[r]=e[n-1]),e[n]=r)}}n=e.length,i=e[n-1];for(;n-- >0;)e[n]=i,i=v[i];return v.length=0,e}(E)).length-1,D=T;D>=c;D--)h=n[D],-1===E[D-c]?l(t,h,i,o,r):j[P]===D-c?P--:b(t,h,r),null!=h.dom&&(r=n[D].dom);else for(D=T;D>=c;D--)h=n[D],-1===E[D-c]&&l(t,h,i,o,r),null!=h.dom&&(r=n[D].dom)}}else{var M=e.length<n.length?e.length:n.length;for(c=c<d?c:d;c<M;c++)(p=e[c])===(h=n[c])||null==p&&null==h||(null==p?l(t,h,i,o,g(e,c+1,r)):null==h?N(t,p):f(t,p,h,i,g(e,c+1,r),o));e.length>M&&x(t,e,c,e.length),n.length>M&&u(t,n,c,n.length,i,r,o)}}}function f(t,e,n,r,s,c){var u=e.tag;if(u===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate)if(void 0!==(n=a.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate)if(void 0!==(n=a.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof u)switch(null!=n.attrs&&L(n.attrs,n,r),u){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children);e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,i,r){e.children!==n.children?(C(t,e),p(t,n,i,r)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,c,s);break;case"[":!function(t,e,n,i,r,o){h(t,e.children,n.children,i,r,o);var s=0,a=n.children;if(n.dom=null,null!=a){for(var c=0;c<a.length;c++){var u=a[c];null!=u&&null!=u.dom&&(null==n.dom&&(n.dom=u.dom),s+=u.domSize||1)}1!==s&&(n.domSize=s)}}(t,e,n,r,s,c);break;default:!function(t,e,n,r){var s=e.dom=t.dom;r=o(e)||r,"textarea"===e.tag&&(null==e.attrs&&(e.attrs={}),null!=e.text&&(e.attrs.value=e.text,e.text=void 0));(function(t,e,n,i){if(null!=n)for(var r in n)k(t,r,e&&e[r],n[r],i);var o;if(null!=e)for(var r in e)null==(o=e[r])||null!=n&&null!=n[r]||j(t,r,o,i)})(e,t.attrs,e.attrs,r),w(e)||(null!=t.text&&null!=e.text&&""!==e.text?t.text.toString()!==e.text.toString()&&(t.dom.firstChild.nodeValue=e.text):(null!=t.text&&(t.children=[i("#",void 0,void 0,t.text,void 0,t.dom.firstChild)]),null!=e.text&&(e.children=[i("#",void 0,void 0,e.text,void 0,void 0)]),h(s,t.children,e.children,n,null,r)))}(e,n,r,c)}else!function(t,e,n,r,o,s){if(n.instance=i.normalize(a.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");L(n.state,n,r),null!=n.attrs&&L(n.attrs,n,r);null!=n.instance?(null==e.instance?l(t,n.instance,r,s,o):f(t,e.instance,n.instance,r,o,s),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=e.instance?(N(t,e.instance),n.dom=void 0,n.domSize=0):(n.dom=e.dom,n.domSize=e.domSize)}(t,e,n,r,s,c)}else N(t,e),l(t,n,r,c,s)}function m(t,e,n){for(var i=Object.create(null);e<n;e++){var r=t[e];if(null!=r){var o=r.key;null!=o&&(i[o]=e)}}return i}var v=[];function g(t,e,n){for(;e<t.length;e++)if(null!=t[e]&&null!=t[e].dom)return t[e].dom;return n}function b(t,e,i){var r=n.createDocumentFragment();!function t(e,n,i){for(;null!=i.dom&&i.dom.parentNode===e;){if("string"!=typeof i.tag){if(null!=(i=i.instance))continue}else if("<"===i.tag)for(var r=0;r<i.instance.length;r++)n.appendChild(i.instance[r]);else if("["!==i.tag)n.appendChild(i.dom);else if(1===i.children.length){if(null!=(i=i.children[0]))continue}else for(r=0;r<i.children.length;r++){var o=i.children[r];null!=o&&t(e,n,o)}break}}(t,r,e),y(t,r,i)}function y(t,e,n){null!=n?t.insertBefore(e,n):t.appendChild(e)}function w(t){if(null==t.attrs||null==t.attrs.contenteditable&&null==t.attrs.contentEditable)return!1;var e=t.children;if(null!=e&&1===e.length&&"<"===e[0].tag){var n=e[0].children;t.dom.innerHTML!==n&&(t.dom.innerHTML=n)}else if(null!=t.text||null!=e&&0!==e.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function x(t,e,n,i){for(var r=n;r<i;r++){var o=e[r];null!=o&&N(t,o)}}function N(t,e){var n,i,r,o=0,c=e.state;"string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&(null!=(r=a.call(e.state.onbeforeremove,e))&&"function"==typeof r.then&&(o=1,n=r));e.attrs&&"function"==typeof e.attrs.onbeforeremove&&(null!=(r=a.call(e.attrs.onbeforeremove,e))&&"function"==typeof r.then&&(o|=2,i=r));if(s(e,c),o){if(null!=n){var u=function(){1&o&&((o&=2)||l())};n.then(u,u)}if(null!=i){u=function(){2&o&&((o&=1)||l())};i.then(u,u)}}else T(e),O(t,e);function l(){s(e,c),T(e),O(t,e)}}function C(t,e){for(var n=0;n<e.instance.length;n++)t.removeChild(e.instance[n])}function O(t,e){for(;null!=e.dom&&e.dom.parentNode===t;){if("string"!=typeof e.tag){if(null!=(e=e.instance))continue}else if("<"===e.tag)C(t,e);else{if("["!==e.tag&&(t.removeChild(e.dom),!Array.isArray(e.children)))break;if(1===e.children.length){if(null!=(e=e.children[0]))continue}else for(var n=0;n<e.children.length;n++){var i=e.children[n];null!=i&&O(t,i)}}break}}function T(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&&T(t.instance);else{var e=t.children;if(Array.isArray(e))for(var n=0;n<e.length;n++){var i=e[n];null!=i&&T(i)}}}function k(t,e,i,r,o){if("key"!==e&&"is"!==e&&null!=r&&!S(e)&&(i!==r||function(t,e){return"value"===e||"checked"===e||"selectedIndex"===e||"selected"===e&&t.dom===c()||"option"===t.tag&&t.dom.parentNode===n.activeElement}(t,e)||"object"==typeof r)){if("o"===e[0]&&"n"===e[1])return I(t,e,r);
25if("xlink:"===e.slice(0,6))t.dom.setAttributeNS("http://www.w3.org/1999/xlink",e.slice(6),r);else if("style"===e)$(t.dom,i,r);else if(A(t,e,o)){if("value"===e){if(("input"===t.tag||"textarea"===t.tag)&&t.dom.value===""+r&&t.dom===c())return;if("select"===t.tag&&null!==i&&t.dom.value===""+r)return;if("option"===t.tag&&null!==i&&t.dom.value===""+r)return}"input"===t.tag&&"type"===e?t.dom.setAttribute(e,r):t.dom[e]=r}else"boolean"==typeof r?r?t.dom.setAttribute(e,""):t.dom.removeAttribute(e):t.dom.setAttribute("className"===e?"class":e,r)}}function j(t,e,n,i){if("key"!==e&&"is"!==e&&null!=n&&!S(e))if("o"!==e[0]||"n"!==e[1]||S(e))if("style"===e)$(t.dom,n,null);else if(!A(t,e,i)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===c())||"input"===t.tag&&"type"===e){var r=e.indexOf(":");-1!==r&&(e=e.slice(r+1)),!1!==n&&t.dom.removeAttribute("className"===e?"class":e)}else t.dom[e]=null;else I(t,e,void 0)}function S(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function A(t,e,n){return void 0===n&&(t.tag.indexOf("-")>-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var E=/[A-Z]/g;function P(t){return"-"+t.toLowerCase()}function D(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(E,P)}function $(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var i in t.style.cssText="",n){null!=(r=n[i])&&t.style.setProperty(D(i),String(r))}else{for(var i in n){var r;null!=(r=n[i])&&(r=String(r))!==String(e[i])&&t.style.setProperty(D(i),r)}for(var i in e)null!=e[i]&&null==n[i]&&t.style.removeProperty(D(i))}}function _(){this._=e}function I(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new _,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function M(t,e,n){"function"==typeof t.oninit&&a.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(a.bind(t.oncreate,e))}function L(t,e,n){"function"==typeof t.onupdate&&n.push(a.bind(t.onupdate,e))}return _.prototype=Object.create(null),_.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,r){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],s=c(),a=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=i.normalizeChildren(Array.isArray(n)?n:[n]);var u=e;try{e="function"==typeof r?r:void 0,h(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===a?void 0:a)}finally{e=u}t.vnodes=n,null!=s&&c()!==s&&"function"==typeof s.focus&&s.focus();for(var l=0;l<o.length;l++)o[l]()}}},function(t,e,n){"use strict";var i=n(30);t.exports=function(t,e,n){var r=[],o=!1,s=!1;function a(){if(o)throw new Error("Nested m.redraw.sync() call");o=!0;for(var e=0;e<r.length;e+=2)try{t(r[e],i(r[e+1]),c)}catch(t){n.error(t)}o=!1}function c(){s||(s=!0,e((function(){s=!1,a()})))}return c.sync=a,{mount:function(e,n){if(null!=n&&null==n.view&&"function"!=typeof n)throw new TypeError("m.mount(element, component) expects a component, not a vnode");var o=r.indexOf(e);o>=0&&(r.splice(o,2),t(e,[],c)),null!=n&&(r.push(e,n),t(e,i(n),c))},redraw:c}}},function(t,e,n){"use strict";var i=n(74);t.exports=function(t,e,n){var r=0;function o(t){return new e(t)}function s(t){return function(r,s){"string"!=typeof r?(s=r,r=r.url):null==s&&(s={});var a=new e((function(e,n){t(i(r,s.params),s,(function(t){if("function"==typeof s.type)if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=new s.type(t[n]);else t=new s.type(t);e(t)}),n)}));if(!0===s.background)return a;var c=0;function u(){0==--c&&"function"==typeof n&&n()}return function t(e){var n=e.then;return e.constructor=o,e.then=function(){c++;var i=n.apply(e,arguments);return i.then(u,(function(t){if(u(),0===c)throw t})),t(i)},e}(a)}}function a(t,e){for(var n in t.headers)if({}.hasOwnProperty.call(t.headers,n)&&e.test(n))return!0;return!1}return o.prototype=e.prototype,o.__proto__=e,{request:s((function(e,n,i,r){var o,s=null!=n.method?n.method.toUpperCase():"GET",c=n.body,u=!(null!=n.serialize&&n.serialize!==JSON.serialize||c instanceof t.FormData),l=n.responseType||("function"==typeof n.extract?"":"json"),d=new t.XMLHttpRequest,p=!1,h=d,f=d.abort;for(var m in d.abort=function(){p=!0,f.call(this)},d.open(s,e,!1!==n.async,"string"==typeof n.user?n.user:void 0,"string"==typeof n.password?n.password:void 0),u&&null!=c&&!a(n,/^content-type$/i)&&d.setRequestHeader("Content-Type","application/json; charset=utf-8"),"function"==typeof n.deserialize||a(n,/^accept$/i)||d.setRequestHeader("Accept","application/json, text/*"),n.withCredentials&&(d.withCredentials=n.withCredentials),n.timeout&&(d.timeout=n.timeout),d.responseType=l,n.headers)({}).hasOwnProperty.call(n.headers,m)&&d.setRequestHeader(m,n.headers[m]);d.onreadystatechange=function(t){if(!p&&4===t.target.readyState)try{var o,s=t.target.status>=200&&t.target.status<300||304===t.target.status||/^file:\/\//i.test(e),a=t.target.response;if("json"===l?t.target.responseType||"function"==typeof n.extract||(
25a=JSON.parse(t.target.responseText)):l&&"text"!==l||null==a&&(a=t.target.responseText),"function"==typeof n.extract?(a=n.extract(t.target,n),s=!0):"function"==typeof n.deserialize&&(a=n.deserialize(a)),s)i(a);else{try{o=t.target.responseText}catch(t){o=a}var c=new Error(o);c.code=t.target.status,c.response=a,r(c)}}catch(t){r(t)}},"function"==typeof n.config&&(d=n.config(d,n,e)||d)!==h&&(o=d.abort,d.abort=function(){p=!0,o.call(this)}),null==c?d.send():"function"==typeof n.serialize?d.send(n.serialize(c)):c instanceof t.FormData?d.send(c):d.send(JSON.stringify(c))})),jsonp:s((function(e,n,i,o){var s=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+r++,a=t.document.createElement("script");t[s]=function(e){delete t[s],a.parentNode.removeChild(a),i(e)},a.onerror=function(){delete t[s],a.parentNode.removeChild(a),o(new Error("JSONP request failed"))},a.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(s),t.document.documentElement.appendChild(a)}))}}},function(t,e,n){"use strict";var i=n(73);t.exports=n(119)(window,i)},function(t,e,n){"use strict";(function(e){var i=n(30),r=n(88),o=n(90),s=n(74),a=n(75),c=n(120),u=n(95),l={};t.exports=function(t,n){var d;function p(e,n,i){if(e=s(e,n),null!=d){d();var r=i?i.state:null,o=i?i.title:null;i&&i.replace?t.history.propertyIsEnumerable(r,o,y.prefix+e):t.history.propertyIsEnumerable(r,o,y.prefix+e)}else t.location.href=y.prefix+e}var h,f,m,v,g=l,b=y.SKIP={};function y(r,s,w){if(null==r)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var x,N=0,C=Object.keys(w).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:w[t],check:c(t)}})),O="function"==typeof e?e:setTimeout,T=o.resolve(),k=!1;if(d=null,null!=s){var j=a(s);if(!C.some((function(t){return t.check(j)})))throw new ReferenceError("Default route doesn't match any known routes")}function S(){k=!1;var e=t.location.hash;"#"!==y.prefix[0]&&(e=t.location.search+e,"?"!==y.prefix[0]&&"/"!==(e=t.location.pathname+e)[0]&&(e="/"+e));var i=e.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(y.prefix.length),r=a(i);function o(){if(i===s)throw new Error("Could not resolve default route "+s);p(s,null,{replace:!0})}u(r.params,t.history.state),function t(e){for(;e<C.length;e++)if(C[e].check(r)){var s=C[e].component,a=C[e].route,c=s,u=v=function(o){if(u===v){if(o===b)return t(e+1);h=null==o||"function"!=typeof o.view&&"function"!=typeof o?"div":o,f=r.params,m=i,v=null,g=s.render?s:null,2===N?n.redraw():(N=2,n.redraw.sync())}};return void(s.view||"function"==typeof s?(s={},u(c)):s.onmatch?T.then((function(){return s.onmatch(r.params,i,a)})).then(u,o):u("div"))}o()}(0)}return d=function(){k||(k=!0,O(S))},"function"==typeof t.history.pushState?(x=function(){t.removeEventListener("popstate",d,!1)},t.addEventListener("popstate",d,!1)):"#"===y.prefix[0]&&(d=null,x=function(){t.removeEventListener("hashchange",S,!1)},t.addEventListener("hashchange",S,!1)),n.mount(r,{onbeforeupdate:function(){return!(!(N=N?2:1)||l===g)},oncreate:S,onremove:x,view:function(){if(N&&l!==g){var t=[i(h,f.key,f)];return g&&(t=g.render(t[0])),t}}})}return y.set=function(t,e,n){null!=v&&((n=n||{}).replace=!0),v=null,p(t,e,n)},y.get=function(){return m},y.prefix="#!",y.Link={view:function(t){var e,n,i=t.attrs.options,o={};u(o,t.attrs),o.selector=o.options=o.key=o.oninit=o.oncreate=o.onbeforeupdate=o.onupdate=o.onbeforeremove=o.onremove=null;var s=r(t.attrs.selector||"a",o,t.children);return(s.attrs.disabled=Boolean(s.attrs.disabled))?(s.attrs.href=null,s.attrs["aria-disabled"]="true",s.attrs.onclick=null):(e=s.attrs.onclick,n=s.attrs.href,s.attrs.href=y.prefix+n,s.attrs.onclick=function(t){var r;"function"==typeof e?r=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===r||t.defaultPrevented||0!==t.button&&0!==t.which&&1!==t.which||t.currentTarget.target&&"_self"!==t.currentTarget.target||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||(t.preventDefault(),t.redraw=!1,y.set(n,null,i))}),s}},y.param=function(t){return f&&null!=t?f[t]:f},y}}).call(this,n(92).setImmediate)},function(t,e,n){"use strict";var i=n(75);t.exports=function(t){var e=i(t),n=Object.keys(e.params),r=[],o=new RegExp("^"+e.path.replace(/:([^\/.-]+)(\.{3}
25|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,(function(t,e,n){return null==e?"\\"+t:(r.push({k:e,r:"..."===n}),"..."===n?"(.*)":"."===n?"([^/]+)\\.":"([^/]+)"+(n||""))}))+"$");return function(t){for(var i=0;i<n.length;i++)if(e.params[n[i]]!==t.params[n[i]])return!1;if(!r.length)return o.test(t.path);var s=o.exec(t.path);if(null==s)return!1;for(i=0;i<r.length;i++)t.params[r[i].k]=r[i].r?s[i+1]:decodeURIComponent(s[i+1]);return!0}}},function(t,e,n){(function(e){t.exports=e.dayjs=n(26)}).call(this,n(27))},function(t,e){!function(t){"use strict";var e=function(n,i){this.options=t.extend({},e.DEFAULTS,i);var r=this.options.target===e.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=r.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var i=t(this),r=i.data("bs.affix"),o="object"==typeof n&&n;r||i.data("bs.affix",r=new e(this,o)),"string"==typeof n&&r[n]()}))}e.VERSION="3.4.1",e.RESET="affix affix-top affix-bottom",e.DEFAULTS={offset:0,target:window},e.prototype.getState=function(t,e,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return r<n&&"top";if("bottom"==this.affixed)return null!=n?!(r+this.unpin<=o.top)&&"bottom":!(r+s<=t-i)&&"bottom";var a=null==this.affixed,c=a?r:o.top;return null!=n&&r<=n?"top":null!=i&&c+(a?s:e)>=t-i&&"bottom"},e.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(e.RESET).addClass("affix");var t=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-t},e.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var a=this.getState(s,n,r,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var c="affix"+(a?"-"+a:""),u=t.Event(c+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(c).trigger(c.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var i=t.fn.affix;t.fn.affix=n,t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var e=t(this),i=e.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),n.call(e,i)}))}))}(jQuery)},function(t,e){!function(t){"use strict";var e='[data-toggle="dropdown"]',n=function(e){t(e).on("click.bs.dropdown",this.toggle)};function i(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==n?t(document).find(n):null;return i&&i.length?i:e.parent()}function r(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),r=i(e),o={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(r[0],n.target)||(r.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(e.attr("aria-expanded","false"),r.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var o=i(n),s=o.hasClass("open");if(r(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",r);var a={relatedTarget:this};if(o.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},n.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var r=t(this);if(n.preventDefault(),n.stopPropagation(),!r.is(".disabled, :disabled")){var o=i(r),s=o.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&o.find(e).trigger("focus"),r.trigger("click");var a=o.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var c=a.index(n.target);38==n.which&&c>
250&&c--,40==n.which&&c<a.length-1&&c++,~c||(c=0),a.eq(c).trigger("focus")}}}};var o=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var i=t(this),r=i.data("bs.dropdown");r||i.data("bs.dropdown",r=new n(this)),"string"==typeof e&&r[e].call(i)}))},t.fn.dropdown.Constructor=n,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=o,this},t(document).on("click.bs.dropdown.data-api",r).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",e,n.prototype.toggle).on("keydown.bs.dropdown.data-api",e,n.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",n.prototype.keydown)}(jQuery)},function(t,e){!function(t){"use strict";var e=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};function n(n,i){return this.each((function(){var r=t(this),o=r.data("bs.modal"),s=t.extend({},e.DEFAULTS,r.data(),"object"==typeof n&&n);o||r.data("bs.modal",o=new e(this,s)),"string"==typeof n?o[n](i):s.show&&o.show(i)}))}e.VERSION="3.4.1",e.TRANSITION_DURATION=300,e.BACKDROP_TRANSITION_DURATION=150,e.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},e.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},e.prototype.show=function(n){var i=this,r=t.Event("show.bs.modal",{relatedTarget:n});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",(function(){i.$element.one("mouseup.dismiss.bs.modal",(function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var r=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),r&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:n});r?i.$dialog.one("bsTransitionEnd",(function(){i.$element.trigger("focus").trigger(o)})).emulateTransitionEnd(e.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)})))},e.prototype.hide=function(n){n&&n.preventDefault(),n=t.Event("hide.bs.modal"),this.$element.trigger(n),this.isShown&&!n.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(e.TRANSITION_DURATION):this.hideModal())},e.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy((function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}),this))},e.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy((function(t){27==t.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},e.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},e.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop((function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")}))},e.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},e.prototype.backdrop=function(n){var i=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&r;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy((function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())}),this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!n)return;o?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):n()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){i.removeBackdrop(),n&&n()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):s()}else n&&n()},e.prototype.handleUpdate=function(){this.adjustDialog()},e.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},e.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},e.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},e.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",e+n),t(this.fixedContent).each((function(e,i){var r=i.style.paddingRight,o=t(i).css("padding-right");t(i).data("padding-right",r).css("padding-right",parseFloat(o)+n+"px")})))},e.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),t(this.fixedContent).each((function(e,n){var i=t(n).data("padding-right");t(n).removeData("padding-right"),n.style.paddingRight=i||""}))},e.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=n,t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(e){var i=t(this),r=i.attr("href"),o=i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,""),s=t(document).find(o),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},s.data(),i.data());i.is("a")&&e.preventDefault(),s.one("show.bs.modal",(function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",(function(){i.is(":visible")&&i.trigger("focus")}))}
vendor: 4,663 bytes, line 25
25)),n.call(s,a,this)}))}(jQuery)},function(t,e){!function(t){"use strict";var e=["sanitize","whiteList","sanitizeFn"],n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],i={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,o=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function s(e,i){var s=e.nodeName.toLowerCase();if(-1!==t.inArray(s,i))return-1===t.inArray(s,n)||Boolean(e.nodeValue.match(r)||e.nodeValue.match(o));for(var a=t(i).filter((function(t,e){return e instanceof RegExp})),c=0,u=a.length;c<u;c++)if(s.match(a[c]))return!0;return!1}function a(e,n,i){if(0===e.length)return e;if(i&&"function"==typeof i)return i(e);if(!document.implementation||!document.implementation.createHTMLDocument)return e;var r=document.implementation.createHTMLDocument("sanitization");r.body.innerHTML=e;for(var o=t.map(n,(function(t,e){return e})),a=t(r.body).find("*"),c=0,u=a.length;c<u;c++){var l=a[c],d=l.nodeName.toLowerCase();if(-1!==t.inArray(d,o))for(var p=t.map(l.attributes,(function(t){return t})),h=[].concat(n["*"]||[],n[d]||[]),f=0,m=p.length;f<m;f++)s(p[f],h)||l.removeAttribute(p[f].nodeName);else l.parentNode.removeChild(l)}return r.body.innerHTML}var c=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};c.VERSION="3.4.1",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},c.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var s=r[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",c="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(c+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(n){var i=this.$element.data();for(var r in i)i.hasOwnProperty(r)&&-1!==t.inArray(r,e)&&delete i[r];return(n=t.extend({},this.getDefaults(),i,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=a(n.template,n.whiteList,n.sanitizeFn)),n},c.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,(function(t,i){n[t]!=i&&(e[t]=i)})),e},c.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},c.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},c.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focu
25s":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},c.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var i=this,r=this.tip(),o=this.getUID(this.type);this.setContent(),r.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&r.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,u=a.test(s);u&&(s=s.replace(a,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?r.appendTo(t(document).find(this.options.container)):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),d=r[0].offsetWidth,p=r[0].offsetHeight;if(u){var h=s,f=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+p>f.bottom?"top":"top"==s&&l.top-p<f.top?"bottom":"right"==s&&l.right+d>f.width?"left":"left"==s&&l.left-d<f.left?"right":s,r.removeClass(h).addClass(s)}var m=this.getCalculatedOffset(s,l,d,p);this.applyPlacement(m,s);var v=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};t.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",v).emulateTransitionEnd(c.TRANSITION_DURATION):v()}},c.prototype.applyPlacement=function(e,n){var i=this.tip(),r=i[0].offsetWidth,o=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var c=i[0].offsetWidth,u=i[0].offsetHeight;"top"==n&&u!=o&&(e.top=e.top+o-u);var l=this.getViewportAdjustedDelta(n,e,c,u);l.left?e.left+=l.left:e.top+=l.top;var d=/top|bottom/.test(n),p=d?2*l.left-r+c:2*l.top-o+u,h=d?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(p,i[0][h],d)},c.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},c.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=a(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},c.prototype.hide=function(e){var n=this,i=t(this.$tip),r=t.Event("hide.bs."+this.type);function o(){"in"!=n.hoverState&&i.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}if(this.$element.trigger(r),!r.isDefaultPrevented())return i.removeClass("in"),t.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",o).emulateTransitionEnd(c.TRANSITION_DURATION):o(),this.hoverState=null,this},c.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(e){var n=(e=e||this.$element)[0],i="BODY"==n.tagName,r=n.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=window.SVGElement&&n instanceof window.SVGElement,s=i?{top:0,left:0}:o?null:e.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},c=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,a,c,s)},c.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},c.prototype.getViewportAdjustedDelta=function(t,e,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-s.scroll,c=e.top+o-s.scroll+i;a<s.top?r.top=s.top-a:c>s.top+s.height&&(r.top=s.top+s.height-c)}else{var u=e.left-o,l=e.left+o+n;u<s.left?r.left=s.left-u:l>s.right&&(r.left=s.left+s.width-l)}return r},c.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},c.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.t
25ype+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},c.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null}))},c.prototype.sanitizeHtml=function(t){return a(t,this.options.whiteList,this.options.sanitizeFn)};var u=t.fn.tooltip;t.fn.tooltip=function(e){return this.each((function(){var n=t(this),i=n.data("bs.tooltip"),r="object"==typeof e&&e;!i&&/destroy|hide/.test(e)||(i||n.data("bs.tooltip",i=new c(this,r)),"string"==typeof e&&i[e]())}))},t.fn.tooltip.Constructor=c,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=u,this}}(jQuery)},function(t,e){!function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",(function(){n=!0}));return setTimeout((function(){n||t(i).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})}))}(jQuery)},function(t,e){!function(t){function e(e){if("string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys){var n=e.handler,i=e.data.keys.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!(t.hotkeys.options.filterInputAcceptingElements&&t.hotkeys.textInputTypes.test(e.target.nodeName)||t.hotkeys.options.filterContentEditable&&t(e.target).attr("contenteditable")||t.hotkeys.options.filterTextInputs&&t.inArray(e.target.type,t.hotkeys.textAcceptingInputTypes)>-1)){var r="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],o=String.fromCharCode(e.which).toLowerCase(),s="",a={};t.each(["alt","ctrl","shift"],(function(t,n){e[n+"Key"]&&r!==n&&(s+=n+"+")})),e.metaKey&&!e.ctrlKey&&"meta"!==r&&(s+="meta+"),e.metaKey&&"meta"!==r&&s.indexOf("alt+ctrl+shift+")>-1&&(s=s.replace("alt+ctrl+shift+","hyper+")),r?a[s+r]=!0:(a[s+o]=!0,a[s+t.hotkeys.shiftNums[o]]=!0,"shift+"===s&&(a[t.hotkeys.shiftNums[o]]=!0));for(var c=0,u=i.length;c<u;c++)if(a[i[c]])return n.apply(this,arguments)}}}}t.hotkeys={version:"0.2.0",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},t.each(["keydown","keyup","keypress"],(function(){t.event.special[this]={add:e}}))}(jQuery||this.jQuery||window.jQuery)},function(t,e,n){!function(){"use strict";n.SKIP={},n.lift=function(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1
25);return r(e).map((function(e){return t.apply(void 0,e)}))},n.scan=function(t,e,i){var r=i.map((function(i){var r=t(e,i);return r!==n.SKIP&&(e=r),r}));return r(e),r},n.merge=r,n.combine=i,n.scanMerge=function(t,e){var n=t.map((function(t){return t[0]})),r=i((function(){var i=arguments[arguments.length-1];return n.forEach((function(n,r){i.indexOf(n)>-1&&(e=t[r][1](e,n()))})),e}),n);return r(e),r},n["fantasy-land/of"]=n;var e=!1;function n(t){var e,r=[],s=[];function a(e){return arguments.length&&e!==n.SKIP&&(t=e,o(a)&&(a._changing(),a._state="active",r.forEach((function(e,n){e(s[n](t))})))),t}function c(){return(e=n()).map((function(t){return!0===t&&(a._parents.forEach((function(t){t._unregisterChild(a)})),a._state="ended",a._parents.length=r.length=s.length=0),t})),e}return a.constructor=n,a._state=arguments.length&&t!==n.SKIP?"active":"pending",a._parents=[],a._changing=function(){o(a)&&(a._state="changing"),r.forEach((function(t){t._changing()}))},a._map=function(e,i){var o=i?n():n(e(t));return o._parents.push(a),r.push(o),s.push(e),o},a.map=function(t){return a._map(t,"active"!==a._state)},a.toJSON=function(){return null!=t&&"function"==typeof t.toJSON?t.toJSON():t},a["fantasy-land/map"]=a.map,a["fantasy-land/ap"]=function(t){return i((function(t,e){return t()(e())}),[t,a])},a._unregisterChild=function(t){var e=r.indexOf(t);-1!==e&&(r.splice(e,1),s.splice(e,1))},Object.defineProperty(a,"end",{get:function(){return e||c()}}),a}function i(t,e){var i=e.every((function(t){if(t.constructor!==n)throw new Error("Ensure that each item passed to stream.combine/stream.merge/lift is a stream");return"active"===t._state})),r=i?n(t.apply(null,e.concat([e]))):n(),o=[],s=e.map((function(n){return n._map((function(s){return o.push(n),(i||e.every((function(t){return"pending"!==t._state})))&&(i=!0,r(t.apply(null,e.concat([o]))),o=[]),s}),!0)})),a=r.end.map((function(t){!0===t&&(s.forEach((function(t){t.end(!0)})),a.end(!0))}));return r}function r(t){return i((function(){return t.map((function(t){return t()}))}),t)}function o(t){return"pending"===t._state||"active"===t._state||"changing"===t._state}Object.defineProperty(n,"HALT",{get:function(){return e||console.log("HALT is deprecated and has been renamed to SKIP"),e=!0,n.SKIP}}),t.exports=n}()},function(t,e,n){(function(e){t.exports=e.punycode=n(130)}).call(this,n(27))},function(t,e,n){(function(t,i){var r;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof i&&i;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,u=/^xn--/,l=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function m(t){throw new RangeError(p[t])}function v(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function g(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+v((t=t.replace(d,".")).split("."),e).join(".")}function b(t){for(var e,n,i=[],r=0,o=t.length;r<o;)(e=t.charCodeAt(r++))>=55296&&e<=56319&&r<o?56320==(64512&(n=t.charCodeAt(r++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),r--):i.push(e);return i}function y(t){return v(t,(function(t){var e="";return t>65535&&(e+=f((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=f(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function x(t,e,n){var i=0;for(t=n?h(t/700):t>>1,t+=h(t/e);t>455;i+=36)t=h(t/35);return h(i+36*t/(t+38))}function N(t){var e,n,i,r,o,s,a,u,l,d,p,f=[],v=t.length,g=0,b=128,w=72;for((n=t.lastIndexOf("-"))<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&m("not-basic"),f.push(t.charCodeAt(i));for(r=n>0?n+1:0;r<v;){for(o=g,s=1,a=36;r>=v&&m("invalid-input"),((u=(p=t.charCodeAt(r++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||u>h((c-g)/s))&&m("overflow"),g+=u*s,!(u<(l=a<=w?1:a>=w+26?26:a-w));a+=36)s>h(c/(d=36-l))&&m("overflow"),s*=d;w=x(g-o,e=f.length+1,0==o),h(g/e)>c-b&&m("overflow"),b+=h(g/e),g%=e,f.splice(g++,0,b)}return y(f)}function C(t){var e,n,i,r,o,s,a,u,l,d,p,v,g,y,N,C=[];for(v=(t=b(t)).length,e=128,n=0,o=72,s=0;s<v;++s)(p=t[s])<128&&C.push(f(p));for(i=r=C.length,r&&C.push("-");i<v;){for(a=c,s=0;s<v;++s)(p=t[s])>=e&&p<a&&(a=p);for(a-e>h((c-n)/(g=i+1))&&m("overflow"),n+=(a-e)*g,e=a,s=0;s<v;++s)if((p=t[s])<e&&++n>c&&m("overflow"),p==e){for(u=n,l=36;!(u<(d=l<=o?1:l>=o+26?26:l-o));l+=36)N=u-d,y=36-d,C.push(f(w(d+N%y,0))),u=h(N/y);C.push(f(w(u,0))),o=x(n,g,i==r),n=0,++i}++n,++e}return C.join("")}a={version:"1.4.1",ucs2:{decode:b,encode:y},decode:N,encode:C,toASCII:function(t){return g(t,(function(t){return l.test(t)?"xn--"+C(t):t}))},toUnicode:function(t){return g(t,(function(t){return u.test(t)?N(t.slice(4).toLowerCase()):t}))}},void 0===(r=function(){return a}.call(e,n,e,t))||(t.exports=r)}()}).call(this,n(131)(t),n(27))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){(function(e){t.exports=e.ColorThief=n(133)}).call(this,n(27))},function(t,e){ 26/*! 27 * Color Thief v2.0 28 * by Lokesh Dhakar - http://www.lokeshdhakar.com 29 * 30 * Thanks 31 * ------ 32 * Nick Rabinowitz - For creating quantize.js. 33 * John Schulz - For clean up and optimization. @JFSIII 34 * Nathan Spady - For adding drag and drop support to the demo page. 35 * 36 * License 37 * ------- 38 * Copyright 2011, 2015 Lokesh Dhakar 39 * Released under the MIT license 40 * https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE 41 * 42 */ 43var n=function(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),document.body.appendChild(this.canvas),this.width=this.canvas.width=t.width,this.height=this.canvas.height=t.height,this.context.drawImage(t,0,0,this.width,this.height)};n.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},n.prototype.update=function(t){this.context.putImageData(t,0,0)},n.prototype.getPixelCount=function(){return this.width*this.height},n.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},n.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var i=function(){}; 44/*! 45 * quantize.js Copyright 2008 Nick Rabinowitz. 46 * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php 47 */ 48/*! 49 * Block below copied from Protovis: http://mbostock.github.com/protov
49is/ 50 * Copyright 2010 Stanford Visualization Group 51 * Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php 52 */if(i.prototype.getColor=function(t,e){return this.getPalette(t,5,e)[0]},i.prototype.getPalette=function(t,e,i){void 0===e&&(e=10),(void 0===i||1>i)&&(i=10);for(var r,s,a,c,u=new n(t),l=u.getImageData().data,d=u.getPixelCount(),p=[],h=0;d>h;h+=i)s=l[(r=4*h)+0],a=l[r+1],c=l[r+2],l[r+3]>=125&&(s>250&&a>250&&c>250||p.push([s,a,c]));var f=o.quantize(p,e),m=f?f.palette():null;return u.removeCanvas(),m},!r)var r={map:function(t,e){var n={};return e?t.map((function(t,i){return n.index=i,e.call(n,t)})):t.slice()},naturalOrder:function(t,e){return e>t?-1:t>e?1:0},sum:function(t,e){var n={};return t.reduce(e?function(t,i,r){return n.index=r,t+e.call(n,i)}:function(t,e){return t+e},0)},max:function(t,e){return Math.max.apply(null,e?r.map(t,e):t)}};var o=function(){function t(t,e,n){return(t<<2*c)+(e<<c)+n}function e(t){function e(){n.sort(t),i=!0}var n=[],i=!1;return{push:function(t){n.push(t),i=!1},peek:function(t){return i||e(),void 0===t&&(t=n.length-1),n[t]},pop:function(){return i||e(),n.pop()},size:function(){return n.length},map:function(t){return n.map(t)},debug:function(){return i||e(),n}}}function n(t,e,n,i,r,o,s){var a=this;a.r1=t,a.r2=e,a.g1=n,a.g2=i,a.b1=r,a.b2=o,a.histo=s}function i(){this.vboxes=new e((function(t,e){return r.naturalOrder(t.vbox.count()*t.vbox.volume(),e.vbox.count()*e.vbox.volume())}))}function o(e){var n,i,r,o,s=new Array(1<<3*c);return e.forEach((function(e){i=e[0]>>u,r=e[1]>>u,o=e[2]>>u,n=t(i,r,o),s[n]=(s[n]||0)+1})),s}function s(t,e){var i,r,o,s=1e6,a=0,c=1e6,l=0,d=1e6,p=0;return t.forEach((function(t){i=t[0]>>u,r=t[1]>>u,o=t[2]>>u,s>i?s=i:i>a&&(a=i),c>r?c=r:r>l&&(l=r),d>o?d=o:o>p&&(p=o)})),new n(s,a,c,l,d,p,e)}function a(e,n){if(n.count()){var i=n.r2-n.r1+1,o=n.g2-n.g1+1,s=n.b2-n.b1+1,a=r.max([i,o,s]);if(1==n.count())return[n.copy()];var c,u,l,d,p=0,h=[],f=[];if(a==i)for(c=n.r1;c<=n.r2;c++){for(d=0,u=n.g1;u<=n.g2;u++)for(l=n.b1;l<=n.b2;l++)d+=e[t(c,u,l)]||0;p+=d,h[c]=p}else if(a==o)for(c=n.g1;c<=n.g2;c++){for(d=0,u=n.r1;u<=n.r2;u++)for(l=n.b1;l<=n.b2;l++)d+=e[t(u,c,l)]||0;p+=d,h[c]=p}else for(c=n.b1;c<=n.b2;c++){for(d=0,u=n.r1;u<=n.r2;u++)for(l=n.g1;l<=n.g2;l++)d+=e[t(u,l,c)]||0;p+=d,h[c]=p}return h.forEach((function(t,e){f[e]=p-t})),function(t){var e,i,r,o,s,a=t+"1",u=t+"2",l=0;for(c=n[a];c<=n[u];c++)if(h[c]>p/2){for(r=n.copy(),o=n.copy(),e=c-n[a],s=(i=n[u]-c)>=e?Math.min(n[u]-1,~~(c+i/2)):Math.max(n[a],~~(c-1-e/2));!h[s];)s++;for(l=f[s];!l&&h[s-1];)l=f[--s];return r[u]=s,o[a]=r[u]+1,[r,o]}}(a==i?"r":a==o?"g":"b")}}var c=5,u=8-c,l=1e3,d=.75;return n.prototype={volume:function(t){var e=this;return(!e._volume||t)&&(e._volume=(e.r2-e.r1+1)*(e.g2-e.g1+1)*(e.b2-e.b1+1)),e._volume},count:function(e){var n=this,i=n.histo;if(!n._count_set||e){var r,o,s,a=0;for(r=n.r1;r<=n.r2;r++)for(o=n.g1;o<=n.g2;o++)for(s=n.b1;s<=n.b2;s++)index=t(r,o,s),a+=i[index]||0;n._count=a,n._count_set=!0}return n._count},copy:function(){var t=this;return new n(t.r1,t.r2,t.g1,t.g2,t.b1,t.b2,t.histo)},avg:function(e){var n=this,i=n.histo;if(!n._avg||e){var r,o,s,a,u=0,l=1<<8-c,d=0,p=0,h=0;for(o=n.r1;o<=n.r2;o++)for(s=n.g1;s<=n.g2;s++)for(a=n.b1;a<=n.b2;a++)u+=r=i[t(o,s,a)]||0,d+=r*(o+.5)*l,p+=r*(s+.5)*l,h+=r*(a+.5)*l;n._avg=u?[~~(d/u),~~(p/u),~~(h/u)]:[~~(l*(n.r1+n.r2+1)/2),~~(l*(n.g1+n.g2+1)/2),~~(l*(n.b1+n.b2+1)/2)]}return n._avg},contains:function(t){var e=this,n=t[0]>>u;return gval=t[1]>>u,bval=t[2]>>u,n>=e.r1&&n<=e.r2&&gval>=e.g1&&gval<=e.g2&&bval>=e.b1&&bval<=e.b2}},i.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map((function(t){return t.color}))},size:function(){return this.vboxes.size()},map:function(t){for(var e=this.vboxes,n=0;n<e.size();n++)if(e.peek(n).vbox.contains(t))return e.peek(n).color;return this.nearest(t)},nearest:function(t){for(var e,n,i,r=this.vboxes,o=0;o<r.size();o++)(e>(n=Math.sqrt(Math.pow(t[0]-r.peek(o).color[0],2)+Math.pow(t[1]-r.peek(o).color[1],2)+Math.pow(t[2]-r.peek(o).color[2],2)))||void 0===e)&&(e=n,i=r.peek(o).color);return i},forcebw:function(){var t=this.vboxes;t.sort((function(t,e){return r.naturalOrder(r.sum(t.color),r.sum(e.color))}));var e=t[0].color;
52e[0]<5&&e[1]<5&&e[2]<5&&(t[0].color=[0,0,0]);var n=t.length-1,i=t[n].color;i[0]>251&&i[1]>251&&i[2]>251&&(t[n].color=[255,255,255])}},{quantize:function(t,n){function c(t,e){for(var n,i=1,r=0;l>r;)if((n=t.pop()).count()){var o=a(u,n),s=o[0],c=o[1];if(!s)return;if(t.push(s),c&&(t.push(c),i++),i>=e)return;if(r++>l)return}else t.push(n),r++}if(!t.length||2>n||n>256)return!1;var u=o(t);u.forEach((function(){0}));var p=s(t,u),h=new e((function(t,e){return r.naturalOrder(t.count(),e.count())}));h.push(p),c(h,d*n);for(var f=new e((function(t,e){return r.naturalOrder(t.count()*t.volume(),e.count()*e.volume())}));h.size();)f.push(h.pop());c(f,n-f.size());for(var m=new i;f.size();)m.push(f.pop());return m}}}();t.exports=i},function(t,e){},function(t,e,n){"use strict";n.r(e),n.d(e,"Extend",(function(){return i.a})),n.d(e,"app",(function(){return en})),n.d(e,"compat",(function(){return nn}));var i=n(97),r=(n(129),n(132),n(22)),o=n(0),s=n(5),a=n(2),c=n(51),u=function(){function t(t){this.stack=[]}var e=t.prototype;return e.getCurrent=function(){return this.stack[this.stack.length-1]},e.getPrevious=function(){return this.stack[this.stack.length-2]},e.push=function(t,e,n){void 0===n&&(n=m.route.get());var i=this.stack[this.stack.length-2];i&&i.name===t&&this.stack.pop();var r=this.getCurrent();r&&r.name===t?Object(a.a)(r,{url:n,title:e}):this.stack.push({name:t,url:n,title:e})},e.canGoBack=function(){return this.stack.length>1},e.back=function(){if(!this.canGoBack())return this.home();this.stack.pop(),m.route.set(this.getCurrent().url)},e.backUrl=function(){return this.stack[this.stack.length-2].url},e.home=function(){this.stack.splice(0),Object(c.a)("/")},t}(),l=function(){function t(t){this.pinnedKey="panePinned",this.$element=$(t),this.pinned="true"===localStorage.getItem(this.pinnedKey),this.active=!1,this.showing=!1,this.render()}var e=t.prototype;return e.enable=function(){this.active=!0,this.render()},e.disable=function(){this.active=!1,this.showing=!1,this.render()},e.show=function(){clearTimeout(this.hideTimeout),this.showing=!0,this.render()},e.hide=function(){this.showing=!1,this.render()},e.onmouseleave=function(){this.hideTimeout=setTimeout(this.hide.bind(this),250)},e.togglePinned=function(){this.pinned=!this.pinned,localStorage.setItem(this.pinnedKey,this.pinned?"true":"false"),this.render()},e.render=function(){this.$element.toggleClass("panePinned",this.pinned).toggleClass("hasPane",this.active).toggleClass("paneShowing",this.showing)},t}(),d=n(31),p=n(6),h=n(3),f=n(8),v=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){return m("header",{className:"Hero DiscussionHero"},m("div",{className:"container"},m("ul",{className:"DiscussionHero-items"},Object(f.a)(this.items().toArray()))))},n.items=function(){var t=new p.a,e=this.attrs.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},Object(f.a)(n)),10),t.add("title",m("h2",{className:"DiscussionHero-title"},e.title())),t},e}(h.a),g=n(13),b=n(19),y=n(35),w=n(7),x=n(28),N=n(77),C=n(17),O=n(44),T=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t=this.attrs.discussion,e=this.attrs.lastPost&&t.replyCount(),n=t[e?"lastPostedUser":"user"](),i=t[e?"lastPostedAt":"createdAt"]();return m("span",null,e?Object(w.a)("fas fa-reply"):""," ",app.translator.trans("core.forum.discussion_list."+(e?"replied":"started")+"_text",{user:n,ago:Object(O.a)(i)}))},e}(h.a),k=n(52),j=n(18),S=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.handler=function(){return this.attrs.when()||void 0},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)},n.onremove=function(){$(window).off("beforeunload",this.boundHandler)},n.view=function(t){return t.children[0]},e}(h.a),A=n(53),E=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){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(){return m(S,{when:this.hasChanges.bind(this)},m("div",{className:"ComposerBody "+(this.attrs.className||"")},Object(b.a)(this.attrs.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},Object(f.a)(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"}
52,A.a.component({submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:this.jumpToPreview&&this.jumpToPreview.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),j.a.component({className:"ComposerBody-loading"+(this.loading?" active":"")})))},n.hasChanges=function(){var t=this.composer.fields.content();return t&&t!==this.attrs.originalContent},n.headerItems=function(){return new p.a},n.onsubmit=function(){},n.loaded=function(){this.loading=!1,m.redraw()},e}(h.a),P=n(4),D=n(9);function _(t){app.composer.isFullScreen()&&(app.composer.minimize(),t.stopPropagation())}var I=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||Object(D.a)(app.translator.trans("core.forum.composer_reply.body_placeholder")),e.submitLabel=e.submitLabel||app.translator.trans("core.forum.composer_reply.submit_button"),e.confirmExit=e.confirmExit||Object(D.a)(app.translator.trans("core.forum.composer_reply.discard_confirmation"))};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.attrs.discussion;return e.add("title",m("h3",null,Object(w.a)("fas fa-reply")," ",m(g.a,{href:app.route.discussion(n),onclick:_},n.title()))),e},n.jumpToPreview=function(t){_(t),m.route.set(app.route.discussion(this.attrs.discussion,"reply"))},n.data=function(){return{content:this.composer.fields.content(),relationships:{discussion:this.attrs.discussion}}},n.onsubmit=function(){var t=this,e=this.attrs.discussion;this.loading=!0,m.redraw();var n=this.data();app.store.createRecord("posts").save(n).then((function(n){if(app.viewingDiscussion(e)){var i=app.current.get("stream");i.update().then((function(){return i.goToNumber(n.number())}))}else{var r,o=P.a.component({className:"Button Button--link",onclick:function(){m.route.set(app.route.post(n)),app.alerts.dismiss(r)}},app.translator.trans("core.forum.composer_reply.view_button"));r=app.alerts.show({type:"success",controls:[o]},app.translator.trans("core.forum.composer_reply.posted_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(E),M=n(14),L=n(11),R=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Object(L.a)(this.attrs.email||""),this.success=!1},n.className=function(){return"ForgotPasswordModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.forgot_password.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("core.forum.forgot_password.email_sent_message")),m("div",{className:"Form-group"},m(P.a,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},app.translator.trans("core.forum.forgot_password.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("core.forum.forgot_password.text")),m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:Object(D.a)(app.translator.trans("core.forum.forgot_password.email_placeholder")),bidi:this.email,disabled:this.loading})),m("div",{className:"Form-group"},P.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("core.forum.forgot_password.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/forgot",body:{email:this.email()},errorHandler:this.onerror.bind(this)}).then((function(){e.success=!0,e.alert=null})).catch((function(){})).then(this.loaded.bind(this))},n.onerror=function(e){404===e.status&&(e.alert.content=app.translator.trans("core.forum.forgot_password.not_found_message")),t.prototype.onerror.call(this,e)},e}(M.a),B=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new p.a},e}(h.a),H=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.username=Object(L.a)(this.attrs.username||""),this.email=Object(L.a)(this.attrs.email||""),this.password=Object(L.a)(this.attrs.password||"")}
52,n.className=function(){return"Modal--small SignUpModal"},n.title=function(){return app.translator.trans("core.forum.sign_up.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.isProvided=function(t){return this.attrs.provided&&-1!==this.attrs.provided.indexOf(t)},n.body=function(){return[this.attrs.token?"":m(B,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new p.a;return t.add("username",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"username",type:"text",placeholder:Object(D.a)(app.translator.trans("core.forum.sign_up.username_placeholder")),bidi:this.username,disabled:this.loading||this.isProvided("username")})),30),t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:Object(D.a)(app.translator.trans("core.forum.sign_up.email_placeholder")),bidi:this.email,disabled:this.loading||this.isProvided("email")})),20),this.attrs.token||t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",placeholder:Object(D.a)(app.translator.trans("core.forum.sign_up.password_placeholder")),bidi:this.password,disabled:this.loading})),10),t.add("submit",m("div",{className:"Form-group"},m(P.a,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("core.forum.sign_up.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"SignUpModal-logIn"},app.translator.trans("core.forum.sign_up.log_in_text",{a:m("a",{onclick:this.logIn.bind(this)})}))]},n.logIn=function(){var t={identification:this.email()||this.username(),password:this.password()};app.modal.show(U,t)},n.onready=function(){this.attrs.username&&!this.attrs.email?this.$("[name=email]").select():this.$("[name=username]").select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.submitData();app.request({url:app.forum.attribute("baseUrl")+"/register",method:"POST",body:e,errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.submitData=function(){var t={username:this.username(),email:this.email()};return this.attrs.token?t.token=this.attrs.token:t.password=this.password(),t},e}(M.a),U=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.identification=Object(L.a)(this.attrs.identification||""),this.password=Object(L.a)(this.attrs.password||""),this.remember=Object(L.a)(!!this.attrs.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.log_in.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.body=function(){return[m(B,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new p.a;return t.add("identification",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"identification",type:"text",placeholder:Object(D.a)(app.translator.trans("core.forum.log_in.username_or_email_placeholder")),bidi:this.identification,disabled:this.loading})),30),t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",placeholder:Object(D.a)(app.translator.trans("core.forum.log_in.password_placeholder")),bidi:this.password,disabled:this.loading})),20),t.add("remember",m("div",{className:"Form-group"},m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:this.remember,disabled:this.loading}),app.translator.trans("core.forum.log_in.remember_me_label")))),10),t.add("submit",m("div",{className:"Form-group"},P.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("core.forum.log_in.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"LogInModal-forgotPassword"},m("a",{onclick:this.forgotPassword.bind(this)},app.translator.trans("core.forum.log_in.forgot_password_link"))),app.forum.attribute("allowSignUp")?m("p",{className:"LogInModal-signUp"},app.translator.trans("core.forum.log_in.sign_up_text",{a:m("a",{onclick:this.signUp.bind(this)})})):""]},n.forgotPassword=function(){var t=this.identification(),e=-1!==t.indexOf("@")?{email:t}:void 0;app.modal.show(R,e)},n.signUp=function(){var t={password:this.password()},e=this.identification();t[-1!==e.indexOf("@")?"email":"username"]=e,app.modal.show(H,t)},n.onready=function(){this.$("[name="+(this.identification()?"password":"identification")+"]").select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.identification(),n=this.password(),i=this.remember();app.session.login({identification:e,password:n,remember:i},{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.onerror=function(e){401===e.status&&(e.alert.content=app.translator.trans("core.forum.log_in.invalid_login_message")),t.prototype.onerror.call(this,e)},e}(M.a),F=n(25),q=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.currentTitle=this.attrs.currentTitle,this.newTitle=Object(L.a)(this.currentTitle)},n.className=function(){return"RenameDiscussionModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.rename_discussion.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{className:"FormControl",bidi:this.newTitle,type:"text"})),m("div",{className:"Form-group"},P.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("core.forum.rename_discussion.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=this.newTitle,i=this.currentTitle;if(n&&n!==i)return this.discussion.save({title:n}).then((function(){app.viewingDiscussion(e.discussion)&&app.current.get("stream").update(),m.redraw(),e.hide()})).catch((function(){e.loading=!1,m.redraw()}));this.hide()},e}(M.a),z={controls:function(t,e){var n=this,i=new p.a;return["user","moderation","destructive"].forEach((function(r){var o=n[r+"Controls"](t,e).toArray();
52o.length&&(o.forEach((function(t){return i.add(t.itemName,t)})),i.add(r+"Separator",F.a.component()))})),i},userControls:function(t,e){var n=this,i=new p.a;return e instanceof Mt&&i.add("reply",!app.session.user||t.canReply()?P.a.component({icon:"fas fa-reply",onclick:function(){return n.replyAction.bind(t)(!0,!1).catch((function(){}))}},app.translator.trans(app.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button")):P.a.component({icon:"fas fa-reply",className:"disabled",title:app.translator.trans("core.forum.discussion_controls.cannot_reply_text")},app.translator.trans("core.forum.discussion_controls.cannot_reply_button"))),i},moderationControls:function(t){var e=new p.a;return t.canRename()&&e.add("rename",P.a.component({icon:"fas fa-pencil-alt",onclick:this.renameAction.bind(t)},app.translator.trans("core.forum.discussion_controls.rename_button"))),e},destructiveControls:function(t){var e=new p.a;return t.isHidden()?(t.canHide()&&e.add("restore",P.a.component({icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},app.translator.trans("core.forum.discussion_controls.restore_button"))),t.canDelete()&&e.add("delete",P.a.component({icon:"fas fa-times",onclick:this.deleteAction.bind(t)},app.translator.trans("core.forum.discussion_controls.delete_forever_button")))):t.canHide()&&e.add("hide",P.a.component({icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},app.translator.trans("core.forum.discussion_controls.delete_button"))),e},replyAction:function(t,e){var n=this;return new Promise((function(i,r){return app.session.user?n.canReply()?(app.composer.composingReplyTo(n)&&!e||app.composer.load(I,{user:app.session.user,discussion:n}),app.composer.show(),t&&app.viewingDiscussion(n)&&!app.composer.isFullScreen()&&app.current.get("stream").goToNumber("reply"),i(app.composer)):r():(app.modal.show(U),r())}))},hideAction:function(){return this.pushAttributes({hiddenAt:new Date,hiddenUser:app.session.user}),this.save({isHidden:!0})},restoreAction:function(){return this.pushAttributes({hiddenAt:null,hiddenUser:null}),this.save({isHidden:!1})},deleteAction:function(){var t=this;if(confirm(Object(D.a)(app.translator.trans("core.forum.discussion_controls.delete_confirmation"))))return app.viewingDiscussion(this)&&app.history.back(),this.delete().then((function(){return app.discussions.removeDiscussion(t)}))},renameAction:function(){return app.modal.show(q,{currentTitle:this.title(),discussion:this})}};function W(t){var e,n,i,r,o=$(t),s=!1,a=!1,c=0,u=function(t,e){void 0===e&&(e={}),e.duration=e.duration||"fast",e.step=function(t){$(this).css("transform","translate("+t+"px, 0)")},o.find(".Slidable-content").animate({"background-position-x":t},e)},l=function(){u(0,{complete:function(){o.removeClass("sliding"),e.hide(),n.hide(),a=!1}})};return o.find(".Slidable-content").on("touchstart",(function(t){e=o.find(".Slidable-underneath--left:not(.disabled)"),n=o.find(".Slidable-underneath--right:not(.disabled)"),i=t.originalEvent.targetTouches[0].clientX,r=t.originalEvent.targetTouches[0].clientY,s=!0,c=0})).on("touchmove",(function(t){var u=t.originalEvent.targetTouches[0].clientX,l=t.originalEvent.targetTouches[0].clientY;if(s&&Math.abs(u-i)>Math.abs(l-r)&&(a=!0),s=!1,a){c=u-i;var d=function(t,e){if(t.length){var n="left"===e?c>0:c<0;n&&t.hasClass("Slidable-underneath--elastic")&&(c-=.5*c),t.toggle(n);var i=Math.max(0,Math.min(1,(Math.abs(c)-25)/50));t.find(".icon").css("transform","scale("+i+")")}else c=Math["left"===e?"min":"max"](0,c)};d(e,"left"),d(n,"right"),$(this).css("transform","translate("+c+"px, 0)"),$(this).css("background-position-x",c+"px"),o.toggleClass("sliding",!!c),t.preventDefault()}})).on("touchend",(function(){var t=function(t){t.click(),t.hasClass("Slidable-underneath--elastic")?l():u((c>0?1:-1)*o.width())};n.length&&c<-50?t(n):e.length&&c>50?t(e):l(),s=!1,a=!1})),{reset:l}}var V=n(16),Y=n(24);var K=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r},G=n(79),X=n(87),J=n(45);var Q=function(t){return"symbol"==typeof t||Object(J.a)(t)&&"[object Symbol]"==Object(X.a)(t)},Z=Y.a?Y.a.prototype:void 0,tt=Z?Z.toString:void 0;var et=function t(e){if("string"==typeof e)return e;if(Object(G.a)(e))return K(e,t)+"";if(Q(e))return tt?tt.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n};var nt=function(t){return null==t?"":et(t)},it=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(it.source);var ot=function(t){return(t=nt(t))&&rt.test(t)?t.replace(it,"\\$&"):t},st=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.subtree=new k.a((function(){return n.attrs.discussion.freshness}),(function(){var t=app.session.user&&app.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return n.active()}
52))},n.elementAttrs=function(){return{className:Object(V.a)(["DiscussionListItem",this.active()?"active":"",this.attrs.discussion.isHidden()?"DiscussionListItem--hidden":"","ontouchstart"in window?"Slidable":""])}},n.view=function(){var t=this.attrs.discussion,e=t.user(),n=t.isUnread(),i=t.isRead(),r=!this.showRepliesCount()&&n,o=0,s=z.controls(t,this).toArray(),a=this.elementAttrs();if(this.attrs.params.q){var c=t.mostRelevantPost();c&&(o=c.number());var u=ot(this.attrs.params.q);this.highlightRegExp=new RegExp(u+"|"+u.trim().replace(/\s+/g,"|"),"gi")}else o=Math.min(t.lastPostNumber(),(t.lastReadPostNumber()||0)+1);return m("div",a,s.length?C.a.component({icon:"fas fa-ellipsis-v",className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right"},s):"",m("span",{className:"Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic"+(n?"":" disabled"),onclick:this.markAsRead.bind(this)},Object(w.a)("fas fa-check")),m("div",{className:"DiscussionListItem-content Slidable-content"+(n?" unread":"")+(i?" read":"")},m(g.a,{href:e?app.route.user(e):"#",className:"DiscussionListItem-author",title:Object(D.a)(app.translator.trans("core.forum.discussion_list.started_text",{user:e,ago:Object(x.a)(t.createdAt())})),oncreate:function(t){$(t.dom).tooltip({placement:"right"})}},Object(b.a)(e,{title:""})),m("ul",{className:"DiscussionListItem-badges badges"},Object(f.a)(t.badges().toArray())),m(g.a,{href:app.route.discussion(t,o),className:"DiscussionListItem-main"},m("h3",{className:"DiscussionListItem-title"},Object(y.a)(t.title(),this.highlightRegExp)),m("ul",{className:"DiscussionListItem-info"},Object(f.a)(this.infoItems().toArray()))),m("span",{tabindex:"0",role:"button",className:"DiscussionListItem-count",onclick:this.markAsRead.bind(this),title:r?app.translator.trans("core.forum.discussion_list.mark_as_read_tooltip"):""},Object(N.a)(t[r?"unreadCount":"replyCount"]()))))},n.oncreate=function(e){if(t.prototype.oncreate.call(this,e),"ontouchstart"in window){var n=W(this.$());this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return n.reset()}))}},n.onbeforeupdate=function(e,n){return t.prototype.onbeforeupdate.call(this,e,n),this.subtree.needsRebuild()},n.active=function(){return app.current.matches(Mt,{discussion:this.attrs.discussion})},n.showFirstPost=function(){return-1!==["newest","oldest"].indexOf(this.attrs.params.sort)},n.showRepliesCount=function(){return"replies"===this.attrs.params.sort},n.markAsRead=function(){var t=this.attrs.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new p.a;if(this.attrs.params.q){var e=this.attrs.discussion.mostRelevantPost()||this.attrs.discussion.firstPost();if(e&&"comment"===e.contentType()){var n=Object(y.a)(e.contentPlain(),this.highlightRegExp,175);t.add("excerpt",n,-100)}}else t.add("terminalPost",T.component({discussion:this.attrs.discussion,lastPost:!this.showFirstPost()}));return t},e}(h.a),at=n(54),ct=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t,e=this.attrs.state,n=e.getParams();if(e.isLoading()?t=j.a.component():e.moreResults&&(t=P.a.component({className:"Button",onclick:e.loadMore.bind(e)},app.translator.trans("core.forum.discussion_list.load_more_button"))),e.empty()){var i=app.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},at.a.component({text:i}))}return m("div",{className:"DiscussionList"+(e.isSearchResults()?" DiscussionList--searchResults":"")},m("ul",{className:"DiscussionList-discussions"},e.discussions.map((function(t){return m("li",{key:t.id(),"data-id":t.id()},st.component({discussion:t,params:n}))}))),m("div",{className:"DiscussionList-loadMore"},t))},e}(h.a),ut=function(t){t.pageX<10&&app.pane.show()},lt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){if(this.attrs.state.hasDiscussions())return m("div",{className:"DiscussionPage-list"},this.enoughSpace()&&m(ct,{state:this.attrs.state}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n=$(e.dom),i=app.pane;if(n.hover(i.show.bind(i),i.onmouseleave.bind(i)),$(document).on("mousemove",ut),app.previous.matches(Mt)){var r=app.cache.discussionListPaneScrollTop||0;n.scrollTop(r)}else{var o=n.find(".DiscussionListItem.active");if(o.length){var s=n.offset().top,a=s+n.outerHeight(),c=o.offset().top,u=c+o.outerHeight();(c<s||u>a)&&n.scrollTop(n.scrollTop()-s+c)}}},n.onremove=function(t){app.cache.discussionListPaneScrollTop=$(t.dom).scrollTop(),$(document).off("mousemove",ut)},n.enoughSpace=function(){return!$(".App-navigation").is(":visible")},e}(h.a),dt=n(36),pt=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},Object(b.a)(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))},e}(h.a),ht=n(20),ft=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(t){t.className=t.className||"",t.surround=t.surround||function(t){return t()}};var n=e.prototype;return n.view=function(){return m("div",{className:this.attrs.className})},n.oncreate=function(e){var n,i=this;t.prototype.oncreate.call(this,e);var r=function(){if(i.attrs.composer.isVisible()){var t=i.attrs.composer.fields.content();n!==t&&(n=t,i.attrs.surround((function(){return s9e.TextFormatter.preview(n||"",e.dom)}
52)))}};r(),this.updateInterval=setInterval(r,50)},n.onremove=function(){clearInterval(this.updateInterval)},e}(h.a),mt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this;if(app.composer.composingReplyTo(this.attrs.discussion))return m("article",{className:"Post CommentPost editing"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",null,Object(b.a)(app.session.user,{className:"PostUser-avatar"}),Object(ht.a)(app.session.user)),m("ul",{className:"PostUser-badges badges"},Object(f.a)(app.session.user.badges().toArray())))),m(ft,{className:"Post-body",composer:app.composer,surround:this.anchorPreview.bind(this)}));return m("article",{className:"Post ReplyPlaceholder",onclick:function(){z.replyAction.call(t.attrs.discussion,!0).catch((function(){}))}},m("header",{className:"Post-header"},Object(b.a)(app.session.user,{className:"PostUser-avatar"})," ",app.translator.trans("core.forum.post_stream.reply_placeholder")))},n.anchorPreview=function(t){var e=$(window).scrollTop()+$(window).height()>=$(document).height();t(),e&&$(window).scrollTop($(document).height())},e}(h.a),vt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.stream=this.attrs.stream,this.scrollListener=new dt.a(this.onscroll.bind(this))},n.view=function(){var t,e=this,n=this.stream.viewingEnd(),i=this.stream.posts(),r=this.discussion.postIds(),o=function(t){$(t.dom).addClass("fadeIn"),setTimeout((function(){return $(t.dom).removeClass("fadeIn")}),500)},s=i.map((function(n,i){var s,c={"data-index":e.stream.visibleStart+i};if(n){var u=n.createdAt(),l=app.postComponents[n.contentType()];s=l?l.component({post:n}):"",c.key="post"+n.id(),c.oncreate=o,c["data-time"]=u.toISOString(),c["data-number"]=n.number(),c["data-id"]=n.id(),c["data-type"]=n.contentType();var d=u-t;d>3456e5&&(s=[m("div",{className:"PostStream-timeGap"},m("span",null,app.translator.trans("core.forum.post_stream.time_lapsed_text",{period:dayjs().add(d,"ms").fromNow(!0)}))),s]),t=u}else c.key="post"+r[e.stream.visibleStart+i],s=pt.component();return m("div",Object(a.a)({className:"PostStream-item"},c),s)}));return!n&&i[this.stream.visibleEnd-this.stream.visibleStart-1]&&s.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(P.a,{className:"Button",onclick:this.stream.loadNext.bind(this.stream)},app.translator.trans("core.forum.post_stream.load_more_button")))),!n||app.session.user&&!this.discussion.canReply()||s.push(m("div",{className:"PostStream-item",key:"reply","data-index":this.stream.count(),oncreate:o},mt.component({discussion:this.discussion}))),m("div",{className:"PostStream"},s)},n.onupdate=function(){this.triggerScroll()},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.triggerScroll(),setTimeout((function(){return n.scrollListener.start()}))},n.onremove=function(){this.scrollListener.stop(),clearTimeout(this.calculatePositionTimeout)},n.triggerScroll=function(){if(this.stream.needsScroll){var t=this.stream.targetPost;this.stream.needsScroll=!1,"number"in t?this.scrollToNumber(t.number,this.stream.animateScroll):"index"in t&&this.scrollToIndex(t.index,this.stream.animateScroll,t.reply)}},n.onscroll=function(t){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,i=t+e;if(this.stream.visibleStart>0){var r=this.$(".PostStream-item[data-index="+this.stream.visibleStart+"]");r.length&&r.offset().top>i-300&&this.stream.loadPrevious()}if(this.stream.visibleEnd<this.stream.count()){var o=this.$(".PostStream-item[data-index="+(this.stream.visibleEnd-1)+"]");o.length&&o.offset().top+o.outerHeight(!0)<i+n+300&&this.stream.loadNext()}},n.updateScrubber=function(t){void 0===t&&(t=window.pageYOffset);var e=this.getMarginTop(),n=$(window).height()-e,i=t+e,r=this.$(".PostStream-item[data-index]"),o=0,s="",a=null;r.each((function(){var t=$(this),e=t.offset().top,r=t.outerHeight(!0);if(e+r<i)return!0;
52if(e>i+n)return!1;var c=Math.max(0,i-e),u=Math.min(r,i+n-e)-c;null===a&&(a=parseFloat(t.data("index"))+c/r),u>0&&(o+=u/r);var l=t.data("time");l&&(s=l)})),this.stream.index=null!==a?a+1:this.stream.count(),this.stream.visible=o,s&&(this.stream.description=dayjs(s).format("MMMM YYYY"))},n.calculatePosition=function(t){void 0===t&&(t=window.pageYOffset);var e,n,i=this.getMarginTop(),r=$(window),o=r.height()-i,s=r.scrollTop()+i,a=t+i;this.$(".PostStream-item").each((function(){var t=$(this),i=t.offset().top,r=t.outerHeight(!0),c=Math.max(0,a-i);if(void 0===e&&(c/r<.75||(r-c)/o>.25)&&(e=t.data("number")),i+r>s){if(!(i+r<s+o))return!1;t.data("number")&&(n=t.data("number"))}})),e&&this.attrs.onPositionChange(e||1,n,e)},n.getMarginTop=function(){var t="phone"===app.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 i=n?$(".PostStream-item:last-child"):this.$(".PostStream-item[data-index="+t+"]");this.scrollToItem(i,e,!0,n),n&&this.flashItem(i)},n.scrollToItem=function(t,e,n,i){var r=this,o=$("html, body").stop(!0),s=t.data("index");if(t.length){var a=t.offset().top-this.getMarginTop(),c=t.offset().top+t.height(),u=$(document).scrollTop(),l=u+$(window).height();if(n||a<u||c>l){var d=i?c-$(window).height()+app.composer.computedHeight():t.is(":first-child")?0:a;e?d!==u&&o.animate({scrollTop:d},"fast"):o.scrollTop(d)}}var p=function(){r.updateScrubber(),void 0!==s&&(r.stream.index=s+1)};return p(),this.stream.forceUpdateScrubber=!0,Promise.all([o.promise(),this.stream.loadPromise]).then((function(){var t;if(m.redraw.sync(),i){var e=$(".PostStream-item:last-child");$(window).scrollTop(e.offset().top+e.height()-$(window).height()+app.composer.computedHeight())}else 0===s?$(window).scrollTop(0):(t=$(".PostStream-item[data-index="+s+"]").offset())&&$(window).scrollTop(t.top-r.getMarginTop());p(),r.calculatePosition(),r.stream.paused=!1,r.loadPostsIfNeeded()}))},n.flashItem=function(t){t.removeClass("fadeIn"),t.addClass("flash").on("animationend webkitAnimationEnd",(function(e){t.removeClass("flash")}))},e}(h.a),gt=n(72),bt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.stream=this.attrs.stream,this.handlers={},this.scrollListener=new dt.a(this.updateScrubberValues.bind(this,{fromScroll:!0,forceHeightChange:!0}))},n.view=function(){var t=this.stream.count(),e=app.translator.transChoice("core.forum.post_scrubber.viewing_text",t,{index:m("span",{className:"Scrubber-index"}),count:m("span",{className:"Scrubber-count"},Object(gt.a)(t))}),n=this.stream.discussion.unreadCount(),i=t?Math.min(t-this.stream.index,n)/t:0;function r(t){var e=$(t.dom),n={top:100-100*i+"%",height:100*i+"%"};t.state.oldStyle?e.stop(!0).css(t.state.oldStyle).animate(n):e.css(n),t.state.oldStyle=n}var o=["PostStreamScrubber","Dropdown"];return this.attrs.className&&o.push(this.attrs.className),m("div",{className:o.join(" ")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},e," ",Object(w.a)("fas fa-sort")),m("div",{className:"Dropdown-menu dropdown-menu"},m("div",{className:"Scrubber"},m("a",{className:"Scrubber-first",onclick:this.goToFirst.bind(this)},Object(w.a)("fas fa-angle-double-up")," ",app.translator.trans("core.forum.post_scrubber.original_post_link")),m("div",{className:"Scrubber-scrollbar"},m("div",{className:"Scrubber-before"}),m("div",{className:"Scrubber-handle"},m("div",{className:"Scrubber-bar"}),m("div",{className:"Scrubber-info"},m("strong",null,e),m("span",{className:"Scrubber-description"}))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",oncreate:r,onupdate:r},app.translator.trans("core.forum.post_scrubber.unread_text",{count:n}))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},Object(w.a)("fas fa-angle-double-down")," ",app.translator.trans("core.forum.post_scrubber.now_link")))))},n.onupdate=function(){var t=this;this.stream.forceUpdateScrubber&&(this.stream.forceUpdateScrubber=!1,this.stream.loadPromise.then((function(){return t.updateScrubberValues({animate:!0,forceHeight
52Change:!0})})))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),$(window).on("resize",this.handlers.onresize=this.onresize.bind(this)).resize(),this.$(".Scrubber-scrollbar").bind("click",this.onclick.bind(this)).css({cursor:"pointer","user-select":"none"}).bind("dragstart mousedown touchstart",(function(t){return t.preventDefault()})),this.dragging=!1,this.mouseStart=0,this.indexStart=0,this.$(".Scrubber-handle").css("cursor","move").bind("mousedown touchstart",this.onmousedown.bind(this)).click((function(t){return t.stopPropagation()})),$(document).on("mousemove touchmove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup touchend",this.handlers.onmouseup=this.onmouseup.bind(this)),setTimeout((function(){return n.scrollListener.start()})),this.stream.loadPromise.then((function(){return n.updateScrubberValues({animate:!1,forceHeightChange:!0})}))},n.onremove=function(){this.scrollListener.stop(),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove touchmove",this.handlers.onmousemove).off("mouseup touchend",this.handlers.onmouseup)},n.updateScrubberValues=function(t){var e=this;void 0===t&&(t={});var n=this.stream.index,i=this.stream.count(),r=this.stream.visible||1,o=this.percentPerPost(),s=this.$();s.find(".Scrubber-index").text(Object(gt.a)(this.stream.sanitizeIndex(Math.max(1,n)))),s.find(".Scrubber-description").text(this.stream.description),s.toggleClass("disabled",this.stream.disabled());var a={};if(a.before=Math.max(0,o.index*Math.min(n-1,i-r)),a.handle=Math.min(100-a.before,o.visible*r),a.after=100-a.before-a.handle,!(t.fromScroll&&this.stream.paused||this.adjustingHeight&&!t.forceHeightChange)){var c=t.animate?"animate":"css";this.adjustingHeight=!0;var u=[];for(var l in a){var d=s.find(".Scrubber-"+l);u.push(d.stop(!0,!0)[c]({height:a[l]+"%"},"fast").promise()),"animate"===c&&d.css("overflow","visible")}Promise.all(u).then((function(){return e.adjustingHeight=!1}))}},n.goToFirst=function(){this.stream.goToFirst(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.goToLast=function(){this.stream.goToLast(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.onresize=function(){var t=this.$(),e=this.$(".Scrubber-scrollbar");e.css("max-height",$(window).height()-t.offset().top+$(window).scrollTop()-parseInt($("#app").css("padding-bottom"),10)-(t.outerHeight()-e.outerHeight()))},n.onmousedown=function(t){t.redraw=!1,this.mouseStart=t.clientY||t.originalEvent.touches[0].clientY,this.indexStart=this.stream.index,this.dragging=!0,$("body").css("cursor","move"),this.$().toggleClass("dragging",this.dragging)},n.onmousemove=function(t){if(this.dragging){var e=((t.clientY||t.originalEvent.touches[0].clientY)-this.mouseStart)/this.$(".Scrubber-scrollbar").outerHeight()*100/this.percentPerPost().index||0,n=Math.min(this.indexStart+e,this.stream.count()-1);this.stream.index=Math.max(0,n),this.updateScrubberValues()}},n.onmouseup=function(){if(this.$().toggleClass("dragging",this.dragging),this.dragging){this.mouseStart=0,this.indexStart=0,this.dragging=!1,$("body").css("cursor",""),this.$().removeClass("open");var t=Math.floor(this.stream.index);this.stream.goToIndex(t)}},n.onclick=function(t){var e=this.$(".Scrubber-scrollbar"),n=((t.pageY||t.originalEvent.touches[0].pageY)-e.offset().top+$("body").scrollTop())/e.outerHeight()*100,i=(n-=parseFloat(e.find(".Scrubber-handle")[0].style.height)/2)/this.percentPerPost().index;i=Math.max(0,Math.min(this.stream.count()-1,i)),this.stream.goToIndex(Math.floor(i)),this.updateScrubberValues({animate:!0,forceHeightChange:!0}),this.$().removeClass("open")},n.percentPerPost=function(){var t=this.stream.count()||1,e=this.stream.visible||1,n=50/this.$(".Scrubber-scrollbar").outerHeight()*100,i=Math.max(100/t,n/e),r=t===e?0:(100-i*e)/(t-e);return{index:r,visible:i}},e}(h.a),yt=n(80);var wt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},xt=n(78),Nt=function(){return xt.a.Date.now()},Ct=/^\s+|\s+$/g,Ot=/^[-+]0x[0-9a-f]+$/i,Tt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,jt=parseInt;var St=function(t){if("number"==typeof t)return t;if(Q(t))return NaN;if(wt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=wt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Ct,"");var n=Tt.test(t);return n||kt.test(t)?jt(t.slice(2),n?2:8):Ot.test(t)?NaN:+t},At=Math.max,Et=Math.min;var Pt=function(t,e,n){var i,r,o,s,a,c,u=0,l=!1,d=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function h(e){var n=i,o=r;return i=r=void 0,u=e,s=t.apply(o,n)}function f(t){return u=t,a=setTimeout(v,e),l?h(t):s}function m(t){var n=t-c;return void 0===c||n>=e||n<0||d&&t-u>=o}function v(){var t=Nt();if(m(t))return g(t);a=setTimeout(v,function(t){var n=e-(t-c);return d?Et(n,o-(t-u)):n}(t))}function g(t){return a=void 0,p&&i?h(t):(i=r=void 0,s)}function b(){var t=Nt(),n=m(t);if(i=arguments,r=this,c=t,n){if(void 0===a)return f(c);if(d)return clearTimeout(a),a=setTimeout(v,e),h(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=St(e)||0,wt(n)&&(l=!!n.leading,o=(d="maxWait"in n)?At(St(n.maxWait)||0,e):o,p="trailing"in n?!!n.trailing:p),b.cancel=function(){void 0!==a&&clearTimeout(a),u=0,i=c=r=a=void 0},b.flush=function(){return void 0===a?s:g(Nt())},b};var Dt=function(t,e,n){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return wt(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Pt(t,e,{leading:i,maxWait:e,trailing:r})},$t=n(81),_t=function(){function t(t,e){void 0===e&&(e=[]),this.discussion=t,this.paused=!1,this.loadPageTimeouts={},this.pagesLoading=0,this.index=0,this.number=1,this.visible=1,this.description="",this.forceUpdateScrubber=!1,this.loadNext=Dt(this._loadNext,300),this.loadPrevious=Dt(this._loadPrevious,300),this.show(e)}var e=t.prototype;return e.update=function(){return this.viewingEnd()?(this.visibleEnd=this.count(),this.loadRange(this.visibleStart,this.visibleEnd)):Promise.resolve()},e.goToFirst=function(){return this.goToIndex(0)},e.goToLast=function(){return this.goToIndex(this.count()-1,!0)},e.goToNumber=function(t,e){if(void 0===e&&(e=!1),"reply"===t){var n=this.goToLast();return this.targetPost.reply=!0,n}return this.paused=!0,this.loadPromise=this.loadNearNumber(t),this.needsScroll=!0,this.targetPost={number:t},this.animateScroll=!e,this.number=t,this.loadPromise.then((function(){return m.redraw()}))},e.goToIndex=function(t,e){return void 0===e&&(e=!1),this.paused=!0,this.loadPromise=this.loadNearIndex(t),this.needsScroll=!0,this.targetPost={index:t},this.animateScroll=!e,this.index=t,m.redraw(),this.loadPromise},e.loadNearNumber=function(t){return this.posts().some((function(e){return e&&Number(e.number())===Number(t)}))?Promise.resolve():(this.reset(),app.store.find("posts",{filter:{discu
52ssion:this.discussion.id()},page:{near:t}}).then(this.show.bind(this)))},e.loadNearIndex=function(t){if(t>=this.visibleStart&&t<this.visibleEnd)return Promise.resolve();var e=this.sanitizeIndex(t-this.constructor.loadCount/2),n=e+this.constructor.loadCount;return this.reset(e,n),this.loadRange(e,n).then(this.show.bind(this))},e._loadNext=function(){var t=this.visibleEnd,e=this.visibleEnd=this.sanitizeIndex(this.visibleEnd+this.constructor.loadCount),n=t-2*this.constructor.loadCount;n>this.visibleStart&&n>=0&&(this.visibleStart=n+this.constructor.loadCount+1,this.loadPageTimeouts[n]&&(clearTimeout(this.loadPageTimeouts[n]),this.loadPageTimeouts[n]=null,this.pagesLoading--)),this.loadPage(t,e)},e._loadPrevious=function(){var t=this.visibleStart,e=this.visibleStart=this.sanitizeIndex(this.visibleStart-this.constructor.loadCount),n=e+2*this.constructor.loadCount;n<this.visibleEnd&&n<=this.count()&&(this.visibleEnd=n,this.loadPageTimeouts[n]&&(clearTimeout(this.loadPageTimeouts[n]),this.loadPageTimeouts[n]=null,this.pagesLoading--)),this.loadPage(e,t,!0)},e.loadPage=function(t,e,n){var i=this;void 0===n&&(n=!1),this.pagesLoading++;var r=function(){if(!(t<i.visibleStart||e>i.visibleEnd)){var r=n?i.visibleEnd-1:i.visibleStart;Object($t.a)('.PostStream-item[data-index="'+r+'"]',m.redraw.sync)}};r(),this.loadPageTimeouts[t]=setTimeout((function(){i.loadRange(t,e).then((function(){r(),i.pagesLoading--})),i.loadPageTimeouts[t]=null}),this.pagesLoading-1?1e3:0)},e.loadRange=function(t,e){var n=[],i=[];return this.discussion.postIds().slice(t,e).forEach((function(t){var e=app.store.getById("posts",t);e&&e.discussion()&&void 0!==e.canEdit()?i.push(e):n.push(t)})),n.length?app.store.find("posts",n).then((function(t){return i.concat(t).sort((function(t,e){return t.createdAt()-e.createdAt()}))})):Promise.resolve(i)},e.show=function(t){this.visibleStart=t.length?this.discussion.postIds().indexOf(t[0].id()):0,this.visibleEnd=this.sanitizeIndex(this.visibleStart+t.length)},e.reset=function(t,e){this.visibleStart=t||0,this.visibleEnd=this.sanitizeIndex(e||this.constructor.loadCount)},e.posts=function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map((function(t){var e=app.store.getById("posts",t);return e&&e.discussion()&&void 0!==e.canEdit()?e:null}))},e.count=function(){return this.discussion.postIds().length},e.disabled=function(){return this.visible>=this.count()},e.viewingEnd=function(){return Math.abs(this.count()-this.visibleEnd)<=1},e.sanitizeIndex=function(t){return Math.max(0,Math.min(this.count(),Math.floor(t)))},t}();_t.loadCount=20;var It=_t,Mt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.useBrowserScrollRestoration=!1,this.discussion=null,this.near=m.route.param("near")||0,this.load(),app.discussions.hasDiscussions()&&(app.pane.enable(),app.pane.hide()),app.history.push("discussion"),this.bodyClass="App--discussion"},n.onremove=function(){t.prototype.onremove.call(this),app.pane.disable(),app.composer.composingReplyTo(this.discussion)&&!app.composer.fields.content()?app.composer.hide():app.composer.minimize()},n.view=function(){var t=this.discussion;return m("div",{className:"DiscussionPage"},m(lt,{state:app.discussions}),m("div",{className:"DiscussionPage-discussion"},t?[v.component({discussion:t}),m("div",{className:"container"},m("nav",{className:"DiscussionPage-nav"},m("ul",null,Object(f.a)(this.sidebarItems().toArray()))),m("div",{className:"DiscussionPage-stream"},vt.component({discussion:t,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})))]:j.a.component({className:"LoadingIndicator--block"})))},n.load=function(){var t=app.preloadedApiDocument();if(t)setTimeout(this.show.bind(this,t),0);else{var e=this.requestParams();app.store.find("discussions",m.route.param("id"),e).then(this.show.bind(this))}m.redraw()},n.requestParams=function(){return{bySlug:!0,page:{near:this.near}}},n.show=function(t){var e=this;app.history.push("discussion",t.title()),app.setTitle(t.title()),app.setTitleCount(0);var n=[];if(t.payload&&t.payload.included){var i=t.id();n=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===i})).map((function(t){return app.store.getById("posts",t.id)}
52)).sort((function(t,e){return t.createdAt()-e.createdAt()})).slice(0,20)}this.stream=new It(t,n),this.stream.goToNumber(m.route.param("near")||n[0]&&n[0].number(),!0).then((function(){e.discussion=t,app.current.set("discussion",t),app.current.set("stream",e.stream)}))},n.sidebarItems=function(){var t=new p.a;return t.add("controls",yt.a.component({icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary"},z.controls(this.discussion,this).toArray())),t.add("scrubber",bt.component({stream:this.stream,className:"App-titleControl"}),-100),t},n.positionChanged=function(t,e){var n=this.discussion,i=app.route.discussion(n,this.near=t);window.history.propertyIsEnumerable(null,document.title,i),app.history.push("discussion",n.title()),app.session.user&&e>(n.lastReadPostNumber()||0)&&(n.save({lastReadPostNumber:e}),m.redraw())},e}(d.a),Lt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},Object(f.a)(this.items().toArray()))},n.items=function(){return new p.a},e}(h.a),Rt=n(15),Bt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right"};var n=e.prototype;return n.view=function(e){return t.prototype.view.call(this,Object(a.a)({},e,{children:this.items().toArray()}))},n.getButtonContent=function(){var t=app.session.user;return[Object(b.a)(t)," ",m("span",{className:"Button-label"},Object(ht.a)(t))]},n.items=function(){var t=new p.a,e=app.session.user;return t.add("profile",Rt.a.component({icon:"fas fa-user",href:app.route.user(e)},app.translator.trans("core.forum.header.profile_button")),100),t.add("settings",Rt.a.component({icon:"fas fa-cog",href:app.route("settings")},app.translator.trans("core.forum.header.settings_button")),50),app.forum.attribute("adminUrl")&&t.add("administration",Rt.a.component({icon:"fas fa-wrench",href:app.forum.attribute("adminUrl"),target:"_blank"},app.translator.trans("core.forum.header.admin_button")),0),t.add("separator",F.a.component(),-90),t.add("logOut",P.a.component({icon:"fas fa-sign-out-alt",onclick:app.session.logout.bind(app.session)},app.translator.trans("core.forum.header.log_out_button")),-100),t},e}(C.a),Ht=n(33),Ut=n(46),Ft=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.state,e=t.getNotificationPages();return m("div",{className:"NotificationList"},m("div",{className:"NotificationList-header"},m("div",{className:"App-primaryControl"},P.a.component({className:"Button Button--icon Button--link",icon:"fas fa-check",title:app.translator.trans("core.forum.notifications.mark_all_as_read_tooltip"),onclick:t.markAllAsRead.bind(t)})),m("h4",{className:"App-titleControl App-titleControl--text"},app.translator.trans("core.forum.notifications.title"))),m("div",{className:"NotificationList-content"},e.length?e.map((function(t){var e=[],n={};return t.forEach((function(t){var i=t.subject();if(void 0!==i){var r=!1;i instanceof Ut.a?r=i:i&&i.discussion&&(r=i.discussion());var o=r?r.id():0;n[o]=n[o]||{discussion:r,notifications:[]},n[o].notifications.push(t),-1===e.indexOf(n[o])&&e.push(n[o])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m(g.a,{className:"NotificationGroup-header",href:app.route.discussion(t.discussion)},e&&e.length?m("ul",{className:"NotificationGroup-badges badges"},Object(f.a)(e)):"",t.discussion.title()):m("div",{className:"NotificationGroup-header"},app.forum.attribute("title")),m("ul",{className:"NotificationGroup-content"},t.notifications.map((function(t){var e=app.notificationComponents[t.contentType()];return e?m("li",null,e.component({notification:t})):""}))))}))})):"",t.isLoading()?m(j.a,{className:"LoadingIndicator--block"}):e.length?"":m("div",{className:"NotificationList-empty"},app.translator.trans("core.forum.notifications.empty_text"))))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$notifications=this.$(".NotificationList-content"),this.$scrollParent=this.inPanel()?this.$n
52otifications:$(window),this.boundScrollHandler=this.scrollHandler.bind(this),this.$scrollParent.on("scroll",this.boundScrollHandler)},n.onremove=function(){this.$scrollParent.off("scroll",this.boundScrollHandler)},n.scrollHandler=function(){var t=this.attrs.state,e=this.inPanel()?this.$scrollParent[0]:document.documentElement,n=Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<=1;t.hasMoreResults()&&!t.isLoading()&&n&&t.loadMore()},n.inPanel=function(){return"auto"===this.$notifications.css("overflow")},e}(h.a),qt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){e.className=e.className||"NotificationsDropdown",e.buttonClassName=e.buttonClassName||"Button Button--flat",e.menuClassName=e.menuClassName||"Dropdown-menu--right",e.label=e.label||app.translator.trans("core.forum.notifications.tooltip"),e.icon=e.icon||"fas fa-bell",t.initAttrs.call(this,e)};var n=e.prototype;return n.getButton=function(){var e=this.getNewCount(),n=t.prototype.getButton.call(this);return n.attrs.title=this.attrs.label,n.attrs.className+=e?" new":"",n.attrs.onclick=this.onclick.bind(this),n},n.getButtonContent=function(){var t=this.getUnreadCount();return[Object(w.a)(this.attrs.icon,{className:"Button-icon"}),t?m("span",{className:"NotificationsDropdown-unread"},t):"",m("span",{className:"Button-label"},this.attrs.label)]},n.getMenu=function(){return m("div",{className:"Dropdown-menu "+this.attrs.menuClassName,onclick:this.menuClick.bind(this)},this.showing?Ft.component({state:this.attrs.state}):"")},n.onclick=function(){app.drawer.isOpen()?this.goToRoute():this.attrs.state.load()},n.goToRoute=function(){m.route.set(app.route("notifications"))},n.getUnreadCount=function(){return app.session.user.unreadNotificationCount()},n.getNewCount=function(){return app.session.user.newNotificationCount()},n.menuClick=function(t){(t.shiftKey||t.metaKey||t.ctrlKey||2===t.which)&&t.stopPropagation()},e}(C.a),zt=function(){function t(){this.callbacks={},this.whenCallback=function(t){return!0}}var e=t.prototype;return e.onUp=function(t){return this.callbacks[38]=function(e){e.preventDefault(),t(e)},this},e.onDown=function(t){return this.callbacks[40]=function(e){e.preventDefault(),t(e)},this},e.onSelect=function(t){return this.callbacks[9]=this.callbacks[13]=function(e){e.preventDefault(),t(e)},this},e.onCancel=function(t){return this.callbacks[27]=function(e){e.stopPropagation(),e.preventDefault(),t(e)},this},e.onRemove=function(t){return this.callbacks[8]=function(e){0===e.target.selectionStart&&0===e.target.selectionEnd&&(t(e),e.preventDefault())},this},e.when=function(t){return this.whenCallback=t,this}
52,e.bindTo=function(t){t.on("keydown",this.navigate.bind(this))},e.navigate=function(t){if(this.whenCallback(t)){var e=this.callbacks[t.which];e&&e(t)}},t}(),Wt=function(){function t(){this.results={}}var e=t.prototype;return e.search=function(t){var e=this;t=t.toLowerCase(),this.results[t]=[];var n={filter:{q:t},page:{limit:3},include:"mostRelevantPost"};return app.store.find("discussions",n).then((function(n){return e.results[t]=n}))},e.view=function(t){t=t.toLowerCase();var e=this.results[t]||[];return[m("li",{className:"Dropdown-header"},app.translator.trans("core.forum.search.discussions_heading")),m("li",null,Rt.a.component({icon:"fas fa-search",href:app.route("index",{q:t})},app.translator.trans("core.forum.search.all_discussions_button",{query:t}))),e.map((function(e){var n=e.mostRelevantPost();return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+e.id()},m(g.a,{href:app.route.discussion(e,n&&n.number())},m("div",{className:"DiscussionSearchResult-title"},Object(y.a)(e.title(),t)),n?m("div",{className:"DiscussionSearchResult-excerpt"},Object(y.a)(n.contentPlain(),t,100)):""))}))]},t}(),Vt=function(){function t(){this.results={}}var e=t.prototype;return e.search=function(t){var e=this;return app.store.find("users",{filter:{q:t},page:{limit:5}}).then((function(n){e.results[t]=n,m.redraw()}))},e.view=function(t){t=t.toLowerCase();var e=(this.results[t]||[]).concat(app.store.all("users").filter((function(e){return[e.username(),e.displayName()].some((function(e){return e.toLowerCase().substr(0,t.length)===t}))}))).filter((function(t,e,n){return n.lastIndexOf(t)===e})).sort((function(t,e){return t.displayName().localeCompare(e.displayName())}));return e.length?[m("li",{className:"Dropdown-header"},app.translator.trans("core.forum.search.users_heading")),e.map((function(e){var n=Object(ht.a)(e),i=[Object(y.a)(n.text,t)];return m("li",{className:"UserSearchResult","data-index":"users"+e.id()},m(g.a,{href:app.route.user(e)},Object(b.a)(e),Object(a.a)({},n,{text:void 0,children:i})))}))]:""},t}(),Yt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state,this.hasFocus=!1,this.sources=null,this.loadingSources=0,this.index=0},n.view=function(){var t=this,e=this.state.getInitialSearch();return this.sources||(this.sources=this.sourceItems().toArray()),this.sources.length?m("div",{className:"Search "+Object(V.a)({open:this.state.getValue()&&this.hasFocus,focused:this.hasFocus,active:!!e,loading:!!this.loadingSources})},m("div",{className:"Search-input"},m("input",{className:"FormControl",type:"search",placeholder:Object(D.a)(app.translator.trans("core.forum.header.search_placeholder")),value:this.state.getValue(),oninput:function(e){return t.state.setValue(e.target.value)},onfocus:function(){return t.hasFocus=!0},onblur:function(){return t.hasFocus=!1}}),this.loadingSources?j.a.component({size:"tiny",className:"Button Button--icon Button--link"}):e?m("button",{className:"Search-clear Button Button--icon Button--link",onclick:this.clear.bind(this)},Object(w.a)("fas fa-times-circle")):""),m("ul",{className:"Dropdown-menu Search-results"},this.state.getValue()&&this.hasFocus?this.sources.map((function(e){return e.view(t.state.getValue())})):"")):m("div",null)},n.onupdate=function(){if(this.setIndex(this.getCurrentNumericIndex()),this.sources.length){var t=window.innerHeight-this.element.querySelector(".Search-input>.FormControl").getBoundingClientRect().bottom-14;this.element.querySelector(".Search-results").style["max-height"]=t+"px"}},n.oncreate=function(n){var i=this;t.prototype.oncreate.call(this,n);var r=this,o=this.state;this.setIndex(this.getCurrentNumericIndex()),this.$(".Search-results").on("mousedown",(function(t){return t.preventDefault()})).on("click",(function(){return i.$("input").blur()})).on("mouseenter","> li:not(.Dropdown-header)",(function(){r.setIndex(r.selectableItems().index(this))}));var s=this.$("input");this.navigator=new zt,this.navigator.onUp((function(){return i.setIndex(i.getCurrentNumericIndex()-1,!0)})).onDown((function(){return i.setIndex(i.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this)).onCancel(this.clear.bind(this)).bindTo(s),s.on("input focus",(function(){var t=this.value.toLowerCase();t&&(clearTimeout(r.searchTimeout),r.searchTimeout=setTimeout((function(){o.isCached(t)||(t.length>=e.MIN_SEARCH_LEN&&r.sources.map((function(e){e.search&&(r.loadingSources++,e.search(t).then((function(){r.loadingSources=Math.max(0,r.loadingSources-1),m.redraw()})))})),o.cache(t),m.redraw())}),250))})).on("focus",(function(){$(this).one("mouseup",(function(t){return t.preventDefault()})).select()}
52))},n.selectResult=function(){clearTimeout(this.searchTimeout),this.loadingSources=0,this.state.getValue()?m.route.set(this.getItem(this.index).find("a").attr("href")):this.clear(),this.$("input").blur()},n.clear=function(){this.state.clear()},n.sourceItems=function(){var t=new p.a;return app.forum.attribute("canViewDiscussions")&&t.add("discussions",new Wt),app.forum.attribute("canViewUserList")&&t.add("users",new Vt),t},n.selectableItems=function(){return this.$(".Search-results > li:not(.Dropdown-header)")},n.getCurrentNumericIndex=function(){return this.selectableItems().index(this.getItem(this.index))},n.getItem=function(t){var e=this.selectableItems(),n=e.filter('[data-index="'+t+'"]');return n.length||(n=e.eq(t)),n},n.setIndex=function(t,e){var n=this.selectableItems(),i=n.parent(),r=t;t<0?r=n.length-1:t>=n.length&&(r=0);var o=n.removeClass("active").eq(r).addClass("active");if(this.index=o.attr("data-index")||r,e){var s,a=i.scrollTop(),c=i.offset().top,u=c+i.outerHeight(),l=o.offset().top,d=l+o.outerHeight();l<c?s=a-c+l-parseInt(i.css("padding-top"),10):d>u&&(s=a-u+d+parseInt(i.css("padding-bottom"),10)),void 0!==s&&i.stop(!0).animate({scrollTop:s},100)}},e}(h.a);Object(s.a)(Yt,"MIN_SEARCH_LEN",3);var Kt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},Object(f.a)(this.items().toArray()))},n.items=function(){var t=new p.a;if(t.add("search",Yt.component({state:app.search}),30),app.forum.attribute("showLanguageSelector")&&Object.keys(app.data.locales).length>1){var e=[],n=function(t){e.push(P.a.component({active:app.data.locale===t,icon:app.data.locale!==t||"fas fa-check",onclick:function(){app.session.user?app.session.user.savePreferences({locale:t}).then((function(){return window.location.reload()})):(document.cookie="locale="+t+"; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT",window.location.reload())}},app.data.locales[t]))};for(var i in app.data.locales)n(i);t.add("locale",Ht.a.component({buttonClassName:"Button Button--link"},e),20)}return app.session.user?(t.add("notifications",qt.component({state:app.notifications}),10),t.add("session",Bt.component(),0)):(app.forum.attribute("allowSignUp")&&t.add("signUp",P.a.component({className:"Button Button--link",onclick:function(){return app.modal.show(H)}},app.translator.trans("core.forum.header.sign_up_link")),10),t.add("logIn",P.a.component({className:"Button Button--link",onclick:function(){return app.modal.show(U)}},app.translator.trans("core.forum.header.log_in_link")),0)),t},e}(h.a),Gt=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=e.className||"Button Button--icon Button--link"},e}(P.a),Xt=n(43),Jt=(n(134),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:Object(L.a)("")},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={}),!!Object(Xt.a)(this.body.componentClass,t)&&Object.keys(e).every((function(t){return n.body.attrs[t]===e[t]}))},e.isVisible=function(){return this.position!==t.Position.HIDDEN},e.isFullScreen=function(){return this.position===t.Position.FULLSCREEN||"phone"===app.screen()},e.composingReplyTo=function(t){return this.isVisible()&&this.bodyMatches(I,{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}());Jt.Position={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"};var Qt=Jt,Zt=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state,this.active=!1,this.prevPosition=this.state.position},n.view=function(){var t=this.state.body,e={normal:this.state.position===Qt.Position.NORMAL,minimized:this.state.position===Qt.Position.MINIMIZED,fullScreen:this.state.position===Qt.Position.FULLSCREEN,active:this.active,visible:this.state.isVisible()},n=this.state.position===Qt.Position.MINIMIZED?this.state.show.bind(this.state):void 0;return m("div",{className:"Composer "+Object(V.a)(e)},m("div",{className:"Composer-handle",oncreate:this.configHandle.bind(this)}
52),m("ul",{className:"Composer-controls"},Object(f.a)(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:n},t.componentClass?t.componentClass.component(Object(a.a)({},t.attrs,{composer:this.state,disabled:e.minimized})):""))},n.onupdate=function(){this.state.position===this.prevPosition?this.updateHeight():(this.animatePositionChange(),this.prevPosition=this.state.position)},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.initializeHeight(),this.$().hide().css("bottom",-this.state.computedHeight()),this.$().on("focus blur",":input,.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(){$(window).off("resize",this.handlers.onresize),$(document).off("mousemove",this.handlers.onmousemove).off("mouseup",this.handlers.onmouseup)},n.configHandle=function(t){var e=this;$(t.dom).css("cursor","row-resize").bind("dragstart mousedown",(function(t){return t.preventDefault()})).mousedown((function(t){e.mouseStart=t.clientY,e.heightStart=e.$().height(),e.handle=$(this),$("body").css("cursor","row-resize")}))},n.onmousemove=function(t){if(this.handle){var e=this.mouseStart-t.clientY;this.changeHeight(this.heightStart+e);var n=$(window).scrollTop(),i=n>0&&n+$(window).height()>=$(document).height();this.updateBodyPadding(i)}},n.onmouseup=function(){this.handle&&(this.handle=null,$("body").css("cursor",""))},n.focus=function(){this.$(".Composer-content :input:enabled:visible, .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,i=parseInt(e.css("padding-bottom"),10),r=this.$(".Composer-footer").outerHeight(!0);e.height(this.$().outerHeight()-n-i-r)}},n.updateBodyPadding=function(){var t=this.state.position!==Qt.Position.HIDDEN&&this.state.position!==Qt.Position.MINIMIZED&&"phone"!==app.screen()?this.state.computedHeight()-parseInt($("#app").css("padding-bottom"),10):0;$("#content").css({paddingBottom:t})},n.animatePositionChange=function(){if(this.prevPosition!==Qt.Position.FULLSCREEN||this.state.position!==Qt.Position.NORMAL)switch(this.state.position){case Qt.Position.HIDDEN:return this.hide();case Qt.Position.MINIMIZED:return this.minimize();case Qt.Position.FULLSCREEN:return this.focus();case Qt.Position.NORMAL:return this.show()}else this.focus()},n.animateHeightChange=function(){var t=this.$().stop(!0),e=t.outerHeight(),n=$(window).scrollTop();t.show(),this.updateHeight();var i=t.outerHeight();this.prevPosition===Qt.Position.HIDDEN?t.css({bottom:-i,height:i}):t.css({height:e});var r=t.animate({bottom:0,height:i},"fast").promise();return this.updateBodyPadding(),$(window).scrollTop(n),r},n.showBackdrop=function(){this.$backdrop=$("<div/>").addClass("composer-backdrop").appendTo("body")},n.hideBackdrop=function(){this.$backdrop&&this.$backdrop.remove()},n.show=function(){var t=this;if(this.animateHeightChange().then((function(){return t.focus()})),"phone"===app.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.a;return this.state.position===Qt.Position.FULLSCREEN?t.add("exitFullScreen",Gt.component({icon:"fas fa-compress",title:app.translator.trans("core.forum.composer.exit_full_screen_tooltip"),onclick:this.state.exitFullScreen.bind(this.state)})):(this.state.position!==Qt.Position.MINIMIZED&&(t.add("minimize",Gt.component({icon:"fas fa-minus minimize",title:app.translator.trans("core.forum.composer.minimize_tooltip"),onclick:this.state.minimize.bind(this.state),itemClassName:"App-backControl"})),t.add("fullScreen",Gt.component({icon:"fas fa-expand",title:app.translator.trans("core.forum.composer.full_screen_tooltip"),onclick:this.state.fullScreen.bind(this.state)}))),t.add("close",Gt.component({icon:"fas fa-times",title:app.translator.trans("core.forum.composer.close_tooltip"),onclick:this.state.close.bind(this.state)}))),t},n.initializeHeight=function(){this.state.height=localStorage.getItem("composerHeight"),this.state.height||(this.state.height=this.defaultHeight())},n.defaultHeight=function(){return this.$().height()},n.changeHeight=function(t){this.state.height=t,this.updateHeight(),localStorage.setItem("composerHeight",this.state.height)},e}(h.a),te=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this,e=this.attrs.notification,n=this.href();return m(g.a,{className:"Notification Notification--"+e.contentType()+" "+(e.isRead()?"":"unread"),href:n,external:n.includes("://"),onclick:this.markAsRead.bind(this)},!e.isRead()&&P.a.component({className:"Notification-action Button Button--icon Button--link",icon:"fas fa-check",title:app.translator.trans("core.forum.notifications.mark_as_read_tooltip"),onclick:function(e){e.preventDefault(),e.stopPropagation(),t.markAsRead()}}),Object(b.a)(e.fromUser()),Object(w.a)(this.icon(),{className:"Notification-icon"}),m("span",{className:"Notification-content"},this.content()),Object(O.a)(e.createdAt()),m("div",{className:"Notification-excerpt"},this.excerpt()))},n.icon=function(){},n.href=function(){}
52,n.content=function(){},n.excerpt=function(){},n.markAsRead=function(){this.attrs.notification.isRead()||(app.session.user.pushAttributes({unreadNotificationCount:app.session.user.unreadNotificationCount()-1}),this.attrs.notification.save({isRead:!0}))},e}(h.a),ee=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.href=function(){var t=this.attrs.notification;return app.route.discussion(t.subject(),t.content().postNumber)},n.content=function(){return app.translator.trans("core.forum.notifications.discussion_renamed_text",{user:this.attrs.notification.fromUser()})},e}(te);function ne(t){app.composer.isFullScreen()&&(app.composer.minimize(),t.stopPropagation())}var ie=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.submitLabel=e.submitLabel||app.translator.trans("core.forum.composer_edit.submit_button"),e.confirmExit=e.confirmExit||app.translator.trans("core.forum.composer_edit.discard_confirmation"),e.originalContent=e.originalContent||e.post.content(),e.user=e.user||e.post.user(),e.post.editedContent=e.originalContent};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.attrs.post;return e.add("title",m("h3",null,Object(w.a)("fas fa-pencil-alt")," ",m(g.a,{href:app.route.discussion(n.discussion(),n.number()),onclick:ne},app.translator.trans("core.forum.composer_edit.post_link",{number:n.number(),discussion:n.discussion().title()})))),e},n.jumpToPreview=function(t){ne(t),m.route.set(app.route.post(this.attrs.post))},n.data=function(){return{content:this.composer.fields.content()}},n.onsubmit=function(){var t=this,e=this.attrs.post.discussion();this.loading=!0;var n=this.data();this.attrs.post.save(n).then((function(n){if(app.viewingDiscussion(e))app.current.get("stream").goToNumber(n.number());else{var i,r=P.a.component({className:"Button Button--link",onclick:function(){m.route.set(app.route.post(n)),app.alerts.dismiss(i)}},app.translator.trans("core.forum.composer_edit.view_button"));i=app.alerts.show({type:"success",controls:[r]},app.translator.trans("core.forum.composer_edit.edited_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(E),re={controls:function(t,e){var n=this,i=new p.a;return["user","moderation","destructive"].forEach((function(r){var o=n[r+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return i.add(t.itemName,t)})),i.add(r+"Separator",F.a.component()))})),i},userControls:function(t,e){return new p.a},moderationControls:function(t,e){var n=new p.a;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",P.a.component({icon:"fas fa-pencil-alt",onclick:this.editAction.bind(t)},app.translator.trans("core.forum.post_controls.edit_button")))),n},destructiveControls:function(t,e){var n=new p.a;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",P.a.component({icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},app.translator.trans("core.forum.post_controls.restore_button"))),t.canDelete()&&n.add("delete",P.a.component({icon:"fas fa-times",onclick:this.deleteAction.bind(t,e)},app.translator.trans("core.forum.post_controls.delete_forever_button")))):t.canHide()&&n.add("hide",P.a.component({icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},app.translator.trans("core.forum.post_controls.delete_button"))),n},editAction:function(){var t=this;return new Promise((function(e){return app.composer.load(ie,{post:t}),app.composer.show(),e()}))},hideAction:function(){if(confirm(Object(D.a)(app.translator.trans("core.forum.post_controls.hide_confirmation"))))return this.pushAttributes({hiddenAt:new Date,hiddenUser:app.session.user}),this.save({isHidden:!0}).then((function(){return m.redraw()}))},restoreAction:function(){return this.pushAttributes({hiddenAt:null,hiddenUser:null}),this.save({isHidden:!1}).then((function(){return m.redraw()}))},deleteAction:function(t){var e=this;if(confirm(Object(D.a)(app.translator.trans("core.forum.post_controls.delete_confirmation"))))return t&&(t.loading=!0),this.delete().then((function(){var t=e.discussion();t.removePost(e.id()),t.postIds().length||(app.discussions.removeDiscussion(t),app.viewingDiscussion(t)&&app.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}},oe=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.loading=!1,this.subtree=new k.a((function(){return n.attrs.post.freshness}),(function(){var t=n.attrs.post.user();return t&&t.freshness}),(function(){return n.controlsOpen}))},n.view=function(){var t=this,e=this.elementAttrs();e.className=this.classes(e.className).join(" ");var n=re.controls(this.attrs.post,this).toArray();return m("article",e,m("div",null,this.content(),m("aside",{className:"Post-actions"},m("ul",null,Object(f.a)(this.actionItems().toArray()),n.length?m("li",null,m(C.a,{className:"Post-control
52s",buttonClassName:"Button Button--icon Button--flat",menuClassName:"Dropdown-menu--right",icon:"fas fa-ellipsis-h",onshow:function(){return t.$(".Post-actions").addClass("open")},onhide:function(){return t.$(".Post-actions").removeClass("open")}},n)):"")),m("footer",{className:"Post-footer"},m("ul",null,Object(f.a)(this.footerItems().toArray())))))},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.onupdate=function(){var t=this.$(".Post-actions"),e=this.$(".Post-controls");t.toggleClass("open",e.hasClass("open"))},n.elementAttrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]),n=this.attrs.post.user(),i=this.attrs.post.discussion();return this.loading&&e.push("Post--loading"),n&&n===app.session.user&&e.push("Post--by-actor"),n&&n===i.user()&&e.push("Post--by-start-user"),e},n.actionItems=function(){return new p.a},n.footerItems=function(){return new p.a},e}(h.a),se=n(34),ae=n(12),ce=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e);var i=this.attrs.user;this.username=Object(L.a)(i.username()||""),this.email=Object(L.a)(i.email()||""),this.isEmailConfirmed=Object(L.a)(i.isEmailConfirmed()||!1),this.setPassword=Object(L.a)(!1),this.password=Object(L.a)(i.password()||""),this.groups={},app.store.all("groups").filter((function(t){return-1===[ae.a.GUEST_ID,ae.a.MEMBER_ID].indexOf(t.id())})).forEach((function(t){return n.groups[t.id()]=Object(L.a)(-1!==i.groups().indexOf(t))}))},n.className=function(){return"EditUserModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.edit_user.title")},n.content=function(){var t=this.fields().toArray();return m("div",{className:"Modal-body"},t.length>1?m("div",{className:"Form"},this.fields().toArray()):app.translator.trans("core.forum.edit_user.nothing_available"))},n.fields=function(){var t=this,e=new p.a;return app.session.user.canEditCredentials()&&(e.add("username",m("div",{className:"Form-group"},m("label",null,app.translator.trans("core.forum.edit_user.username_heading")),m("input",{className:"FormControl",placeholder:Object(D.a)(app.translator.trans("core.forum.edit_user.username_label")),bidi:this.username,disabled:this.nonAdminEditingAdmin()})),40),app.session.user!==this.attrs.user&&(e.add("email",m("div",{className:"Form-group"},m("label",null,app.translator.trans("core.forum.edit_user.email_heading")),m("div",null,m("input",{className:"FormControl",placeholder:Object(D.a)(app.translator.trans("core.forum.edit_user.email_label")),bidi:this.email,disabled:this.nonAdminEditingAdmin()})),!this.isEmailConfirmed()&&this.userIsAdmin(app.session.user)?m("div",null,P.a.component({className:"Button Button--block",loading:this.loading,onclick:this.activate.bind(this)},app.translator.trans("core.forum.edit_user.activate_button"))):""),30),e.add("password",m("div",{className:"Form-group"},m("label",null,app.translator.trans("core.forum.edit_user.password_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",onchange:function(e){t.setPassword(e.target.checked),m.redraw.sync(),e.target.checked&&t.$("[name=password]").select(),e.redraw=!1},disabled:this.nonAdminEditingAdmin()}),app.translator.trans("core.forum.edit_user.set_password_label")),this.setPassword()?m("input",{className:"FormControl",type:"password",name:"password",placeholder:Object(D.a)(app.translator.trans("core.forum.edit_user.password_label")),bidi:this.password,disabled:this.nonAdminEditingAdmin()}):"")),20))),app.session.user.canEditGroups()&&e.add("groups",m("div",{className:"Form-group EditUserModal-groups"},m("label",null,app.translator.trans("core.forum.edit_user.groups_heading")),m("div",null,Object.keys(this.groups).map((function(t){return app.store.getById("groups",t)})).map((function(e){return m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:t.groups[e.id()],disabled:e.id()===ae.a.ADMINISTRATOR_ID&&(t.attrs.user===app.session.user||!t.userIsAdmin(app.session.user))}),se.a.component({group:e,label:""})," ",e.nameSingular())})))),10),e.add("submit",m("div",{className:"Form-group"},P.a.component({className:"Button Button--primary",type:"submit",loading:this.loading},app.translator.trans("core.forum.edit_user.submit_button"))),-10),e},n.activate=function(){var t=this;this.loading=!0;var e={username:this.username(),isEmailConfirmed:!0};this.attrs.user.save(e,{errorHandler:this.onerror.bind(this)}).then((function(){t.isEmailConfirmed(!0),t.loading=!1,m.redraw()})).catch((function(){t.loading=!1,m.redraw()}))},n.data=function(){var t=this,e={relationships:{}};return this.attrs.user.canEditCredentials()&&!this.nonAdminEditingAdmin()&&(e.username=this.username(),app.session.user!==this.attrs.user&&(e.email=this.email()
52),this.setPassword()&&(e.password=this.password())),this.attrs.user.canEditGroups()&&(e.relationships.groups=Object.keys(this.groups).filter((function(e){return t.groups[e]()})).map((function(t){return app.store.getById("groups",t)}))),e},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.attrs.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},n.nonAdminEditingAdmin=function(){return this.userIsAdmin(this.attrs.user)&&!this.userIsAdmin(app.session.user)},n.userIsAdmin=function(t){return t.groups().some((function(t){return t.id()===ae.a.ADMINISTRATOR_ID}))},e}(M.a),ue=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(t){return t.children[0]},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundOnresize=this.onresize.bind(this),$(window).on("resize",this.boundOnresize).resize()},n.onremove=function(){$(window).off("resize",this.boundOnresize)},n.onresize=function(){var t=this,e=this.$(),n=$("#header"),i=$("#footer"),r=e.find("> ul");$(window).off(".affix"),r.removeClass("affix affix-top affix-bottom").removeData("bs.affix"),e.outerHeight(!0)>$(window).height()-n.outerHeight(!0)||r.affix({offset:{top:function(){return e.offset().top-n.outerHeight(!0)-parseInt(e.css("margin-top"),10)},bottom:function(){return t.bottom=i.outerHeight(!0)}}})},e}(h.a),le=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.user=null,this.bodyClass="App--user"},n.view=function(){return m("div",{className:"UserPage"},this.user?[m(he,{user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===app.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m(ue,null,m("nav",{className:"sideNav UserPage-nav"},m("ul",null,Object(f.a)(this.sidebarItems().toArray())))),m("div",{className:"sideNavOffset UserPage-content"},this.content())))]:[m(j.a,{className:"LoadingIndicator--block"})])},n.content=function(){},n.show=function(t){this.user=t,app.current.set("user",t),app.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();app.preloadedApiDocument(),app.store.all("users").some((function(i){if((i.username().toLowerCase()===n||i.id()===t)&&i.joinTime())return e.show(i),!0})),this.user||app.store.find("users",t,{bySlug:!0}).then(this.show.bind(this))},n.sidebarItems=function(){var t=new p.a;return t.add("nav",m(Ht.a,{className:"App-titleControl",buttonClassName:"Button"},this.navItems().toArray())),t},n.navItems=function(){var t=new p.a,e=this.user;return t.add("posts",m(Rt.a,{href:app.route("user.posts",{username:e.username()}),icon:"far fa-comment"},app.translator.trans("core.forum.user.posts_link")," ",m("span",{className:"Button-badge"},e.commentCount())),100),t.add("discussions",m(Rt.a,{href:app.route("user.discussions",{username:e.username()}),icon:"fas fa-bars"},app.translator.trans("core.forum.user.discussions_link")," ",m("span",{className:"Button-badge"},e.discussionCount())),90),app.session.user===e&&(t.add("separator",m(F.a,null),-90),t.add("settings",m(Rt.a,{href:app.route("settings"),icon:"fas fa-cog"},app.translator.trans("core.forum.user.settings_link")),-100)),t},e}(d.a),de={controls:function(t,e){var n=this,i=new p.a;return["user","moderation","destructive"].forEach((function(r){var o=n[r+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return i.add(t.itemName,t)})),i.add(r+"Separator",m(F.a,null)))})),i},userControls:function(){return new p.a},moderationControls:function(t){var e=new p.a;return(t.canEdit()||t.canEditCredentials()||t.canEditGroups())&&e.add("edit",m(P.a,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(this,t)},app.translator.trans("core.forum.user_controls.edit_button"))),e},destructiveControls:function(t){var e=new p.a;return"1"!==t.id()&&t.canDelete()&&e.add("delete",m(P.a,{icon:"fas fa-times",onclick:this.deleteAction.bind(this,t)},app.translator.trans("core.forum.user_controls.delete_button"))),e},deleteAction:function(t){var e=this;confirm(app.translator.trans("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),app.current.matches(le,{user:t})?app.history.back():window.location.reload()})).catch((function(){return e.showDeletionAlert(t,"error")}))},showDeletionAlert:function(t,e){var n=t.data.attributes,i=n.username,r=n.email,o={success:"core.forum.user_controls.delete_success_message",error:"core.forum.user_controls.delete_error_message"}[e];app.alerts.show({type:e},app.translator.trans(o,{username:i,email:r}))},editAction:function(t){app.modal.show(ce,{user:t})}},pe=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loading=!1,this.isDraggedOver=!1},n.view=function(){var t=this.attrs.user;return m("div",{className:Object(V.a)(["AvatarEditor","Dropdown",this.attrs.className,this.loading&&"loading",this.isDraggedOver&&"dragover"])},Object(b.a)(t),m("a",{className:t.avatarUrl()?"Dropdown-toggle":"Dropdown-toggle AvatarEditor--noAvatar",title:app.translator.trans("core.forum.user.avatar_upload_tooltip"),"data-toggle":"dropdown",onclick:this.quickUpload.bind(this),ondragover:this.enableDragover.b
52ind(this),ondragenter:this.enableDragover.bind(this),ondragleave:this.disableDragover.bind(this),ondragend:this.disableDragover.bind(this),ondrop:this.dropUpload.bind(this)},this.loading?m(j.a,null):t.avatarUrl()?Object(w.a)("fas fa-pencil-alt"):Object(w.a)("fas fa-plus-circle")),m("ul",{className:"Dropdown-menu Menu"},Object(f.a)(this.controlItems().toArray())))},n.controlItems=function(){var t=new p.a;return t.add("upload",m(P.a,{icon:"fas fa-upload",onclick:this.openPicker.bind(this)},app.translator.trans("core.forum.user.avatar_upload_button"))),t.add("remove",m(P.a,{icon:"fas fa-times",onclick:this.remove.bind(this)},app.translator.trans("core.forum.user.avatar_remove_button"))),t},n.enableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!0},n.disableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1},n.dropUpload=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1,this.upload(t.dataTransfer.files[0])},n.quickUpload=function(t){this.attrs.user.avatarUrl()||(t.preventDefault(),t.stopPropagation(),this.openPicker())},n.openPicker=function(){var t=this;this.loading||$('<input type="file">').appendTo("body").hide().click().on("input",(function(e){t.upload($(e.target)[0].files[0])}))},n.upload=function(t){if(!this.loading){var e=this.attrs.user,n=new FormData;n.append("avatar",t),this.loading=!0,m.redraw(),app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/users/"+e.id()+"/avatar",serialize:function(t){return t},body:n}).then(this.success.bind(this),this.failure.bind(this))}},n.remove=function(){var t=this.attrs.user;this.loading=!0,m.redraw(),app.request({method:"DELETE",url:app.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){app.store.pushPayload(t),delete this.attrs.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(h.a),he=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.user,e=de.controls(t,this).toArray(),n=t.color(),i=t.badges().toArray();return m("div",{className:"UserCard "+(this.attrs.className||""),style:n?{backgroundColor:n}:""},m("div",{className:"darkenBackground"},m("div",{className:"container"},e.length?C.a.component({className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.attrs.controlsButtonClassName,label:app.translator.trans("core.forum.user_controls.button"),icon:"fas fa-ellipsis-v"},e):"",m("div",{className:"UserCard-profile"},m("h2",{className:"UserCard-identity"},this.attrs.editable?[pe.component({user:t,className:"UserCard-avatar"}),Object(ht.a)(t)]:m(g.a,{href:app.route.user(t)},m("div",{className:"UserCard-avatar"},Object(b.a)(t)),Object(ht.a)(t))),i.length?m("ul",{className:"UserCard-badges badges"},Object(f.a)(i)):"",m("ul",{className:"UserCard-info"},Object(f.a)(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new p.a,e=this.attrs.user,n=e.lastSeenAt();if(n){var i=e.isOnline();t.add("lastSeen",m("span",{className:"UserCard-lastSeen"+(i?" online":"")},i?[Object(w.a)("fas fa-circle")," ",app.translator.trans("core.forum.user.online_text")]:[Object(w.a)("far fa-clock")," ",Object(x.a)(n)]))}return t.add("joined",app.translator.trans("core.forum.user.joined_date_text",{ago:Object(x.a)(e.joinTime())})),t},e}(h.a),fe=n(82),me=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();if(!e)return m("div",{className:"PostUser"},m("h3",null,Object(b.a)(e,{className:"PostUser-avatar"})," ",Object(ht.a)(e)));var n="";return!t.isHidden()&&this.attrs.cardVisible&&(n=he.component({user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})),m("div",{className:"PostUser"},m("h3",null,m(g.a,{href:app.route.user(e)},Object(b.a)(e,{className:"PostUser-avatar"}),Object(fe.a)(e),Object(ht.a)(e))),m("ul",{className:"PostUser-badges badges"},Object(f.a)(e.badges().toArray())),n)},n.oncreate=function(e){var n,i=this;t.prototype.oncreate.call(this,e),this.$().on("mouseover","h3 a, .UserCard",(function(){clearTimeout(n),n=setTimeout(i.showCard.bind(i),500)})).on("mouseout","h3 a, .UserCard",(function(){clearTimeout(n),n=setTimeout(i.hideCard.bind(i),250)}))},n.showCard=function(){var t=this;this.attrs.oncardshow(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.attrs.oncardhide()}))},e}(h.a),ve=n(83),ge=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.createdAt(),n=this.getPermalink(t),i="ontouchstart"in document.documentElement;return m("div",{className:"Dropdown PostMeta"}
52,m("a",{className:"Dropdown-toggle",onclick:function(t){var e=this;setTimeout((function(){return $(e).parent().find(".PostMeta-permalink").select()})),t.redraw=!1},"data-toggle":"dropdown"},Object(O.a)(e)),m("div",{className:"Dropdown-menu dropdown-menu"},m("span",{className:"PostMeta-number"},app.translator.trans("core.forum.post.number_tooltip",{number:t.number()}))," ",m("span",{className:"PostMeta-time"},Object(ve.a)(e))," ",m("span",{className:"PostMeta-ip"},t.data.attributes.ipAddress),i?m("a",{className:"Button PostMeta-permalink",href:n},n):m("input",{className:"FormControl PostMeta-permalink",value:n,onclick:function(t){return t.stopPropagation()}})))},n.getPermalink=function(t){return window.location.origin+app.route.post(t)},e}(h.a),be=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.shouldUpdateTooltip=!1,this.oldEditedInfo=null},n.view=function(){var t=this.attrs.post,e=t.editedUser(),n=Object(D.a)(app.translator.trans("core.forum.post.edited_tooltip",{user:e,ago:Object(x.a)(t.editedAt())}));return n!==this.oldEditedInfo&&(this.shouldUpdateTooltip=!0,this.oldEditedInfo=n),m("span",{className:"PostEdited",title:n},app.translator.trans("core.forum.post.edited_text"))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.rebuildTooltip()},n.onupdate=function(){this.rebuildTooltip()},n.rebuildTooltip=function(){this.shouldUpdateTooltip&&(this.$().tooltip("destroy").tooltip(),this.shouldUpdateTooltip=!1)},e}(h.a),ye=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.revealContent=!1,this.cardVisible=!1,this.subtree.check((function(){return n.cardVisible}),(function(){return n.isEditing()}),(function(){return n.revealContent}))},n.content=function(){return t.prototype.content.call(this).concat([m("header",{className:"Post-header"},m("ul",null,Object(f.a)(this.headerItems().toArray()))),m("div",{className:"Post-body"},this.isEditing()?m(ft,{className:"Post-preview",composer:app.composer}):m.trust(this.attrs.post.contentHtml()))])},n.refreshContent=function(){var t=this.isEditing()?"":this.attrs.post.contentHtml();this.contentHtml!==t&&this.$(".Post-body script").each((function(){var t=document.createElement("script");t.textContent=this.textContent,Array.from(this.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),this.parentNode.replaceChild(t,this)})),this.contentHtml=t},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.refreshContent()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.refreshContent()},n.isEditing=function(){return app.composer.bodyMatches(ie,{post:this.attrs.post})},n.elementAttrs=function(){var e=this.attrs.post,n=t.prototype.elementAttrs.call(this);return n.className=(n.className||"")+" "+Object(V.a)({CommentPost:!0,"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()}),n},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=this,e=new p.a,n=this.attrs.post;return e.add("user",me.component({post:n,cardVisible:this.cardVisible,oncardshow:function(){t.cardVisible=!0,m.redraw()},oncardhide:function(){t.cardVisible=!1,m.redraw()}}),100),e.add("meta",ge.component({post:n})),n.isEdited()&&!n.isHidden()&&e.add("edited",be.component({post:n})),n.isHidden()&&e.add("toggle",P.a.component({className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),e},e}(oe),we=n(32),xe=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.elementAttrs=function(){var e=t.prototype.elementAttrs.call(this);return e.className=(e.className||"")+" EventPost "+Object(we.ucfirst)(this.attrs.post.contentType())+"Post",e},n.content=function(){var e=this.attrs.post.user(),n=Object(ht.a)(e),i=Object(a.a)(this.descriptionData(),{user:e,username:e?m(g.a,{className:"EventPost-user",href:app.route.user(e)},n):n});return t.prototype.content.call(this).concat([Object(w.a)(this.icon(),{className:"EventPost-icon"}),m("div",{class:"EventPost-info"},this.description(i))])},n.icon=function(){return""},n.description=function(t){return app.translator.transChoice(this.descriptionKey(),t.count,t)},n.descriptionKey=function(){return""},n.descriptionData=function(){return{}},e}(oe),Ne=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.description=function(t){var e=app.translator.trans("core.forum.post_stream.discussion_renamed_text",t),n=app.translator.trans("core.forum.post_stream.discussion_renamed_old_tooltip",t);return m("span",{title:Object(D.a)(n)},e)},n.descriptionData=function(){var t=this.attrs.post,e=t.content()[0],n=t.content()[1];return{old:e,new:m("strong",{className:"DiscussionRenamedPost-new"},n)}},e}(xe),Ce=(n(41),function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.hidden=localStorage.getItem("welcomeHidden")},n.view=function(){var t=this;if(this.hidden)return m("div",null);return m("header",{className:"Hero WelcomeHero"},m("div",{class:"container"},P.a.component({icon:"fas fa-times",onclick:function(){t.$().slideUp(t.hide.bind(t))},className:"Hero-close Button Button--icon Button--link"}),m("div",{className:"containerNarrow"},m("h2",{className:"Hero-title"},app.forum.attribute("welcomeTitle")),m("div",{className:"Hero-subtitle"},m.trust(app.forum.attribute("welcomeMessage"))))))},n.hide=function(){localStorage.setItem("welcomeHidden","true"),this.hidden=!0},e}(h.a)),Oe=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||Object(D.a)(app.translator.trans("core.forum.composer_discussion.body_placeholder")),e.submitLabel=e.submitLabel||app.translator.trans("core.forum.composer_discussion.submit_button"),e.confirmExit=e.confirmExit||Object(D.a)(app.translator.trans("core.forum.composer_discussion.discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||Object(D.a)(app.translator.trans("core.forum.composer_discussion.title_placeholder")),e.className="ComposerBody--discussion"};var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.composer.fields.title=this.composer.fields.title||Object(L.a)(""),this.title=this.composer.fields.title},n.headerItems=function(){var e=t.prototype.headerItems.call(this);return e.add("title",m("h3",null,app.translator.trans("core.forum.composer_discussion.title")),100),e.add("discussionTitle",m("h3",null,m("input",{className:"FormControl",bidi:this.title,placeholder:this.attrs.titlePlaceholder,disabled:!!this.attrs.disabled,onkeydown:this.onkeydown.bind(this)}))),e},n.onkeydown=function(t){13===t.which&&(t.preventDefault(),this.composer.editor.moveCursorTo(0)),t.redraw=!1},n.hasChanges=function(){return this.title()||this.composer.fields.content()},n.data=function(){return{title:this.title(),content:this.composer.fields.content()}},n.onsubmit=function(){var t=this;this.loading=!0;var e=this.data();app.store.createRecord("discussions").save(e).then((function(e){t.composer.hide(),app.discussions.refresh({deferClear:!0}
52),m.route.set(app.route.discussion(e))}),this.loaded.bind(this))},e}(E),Te=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(n){t.prototype.oninit.call(this,n),app.previous.matches(Mt)&&(this.lastDiscussion=app.previous.get("discussion")),app.previous.matches(e)&&app.discussions.clear(),app.discussions.refreshParams(app.search.params()),app.history.push("index",app.translator.trans("core.forum.header.back_to_index_tooltip")),this.bodyClass="App--index",this.scrollTopOnCreate=!1},n.view=function(){return m("div",{className:"IndexPage"},this.hero(),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m("nav",{className:"IndexPage-nav sideNav"},m("ul",null,Object(f.a)(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},m("div",{className:"IndexPage-toolbar"},m("ul",{className:"IndexPage-toolbar-view"},Object(f.a)(this.viewItems().toArray())),m("ul",{className:"IndexPage-toolbar-action"},Object(f.a)(this.actionItems().toArray()))),m(ct,{state:app.discussions})))))},n.setTitle=function(){app.setTitle(app.translator.trans("core.forum.index.meta_title_text")),app.setTitleCount(0)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.setTitle();var n=app.cache.heroHeight,i=app.cache.heroHeight=this.$(".Hero").outerHeight()||0,r=app.cache.scrollTop;if($("#app").css("min-height",$(window).height()+i),null!=app.previous.type&&("desktop"==app.screen()||"desktop-hd"==app.screen()||this.lastDiscussion?$(window).scrollTop(r-n+i):$(window).scrollTop(0),this.lastDiscussion)){var o=this.$('li[data-id="'+this.lastDiscussion.id()+'"] .DiscussionListItem');if(o.length){var s=$("#header").outerHeight(),a=$(window).height(),c=o.offset().top,u=c+o.outerHeight();(c<r+s||u>r+a)&&$(window).scrollTop(c-s)}}},n.onbeforeremove=function(){app.cache.scrollTop=$(window).scrollTop()},n.onremove=function(){t.prototype.onremove.call(this),$("#app").css("min-height","")},n.hero=function(){return Ce.component()},n.sidebarItems=function(){var t=this,e=new p.a,n=app.forum.attribute("canStartDiscussion")||!app.session.user;return e.add("newDiscussion",P.a.component({icon:"fas fa-edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:function(){return t.newDiscussionAction().catch((function(){}))},disabled:!n},app.translator.trans(n?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button"))),e.add("nav",Ht.a.component({buttonClassName:"Button",className:"App-titleControl"},this.navItems(this).toArray())),e},n.navItems=function(){var t=new p.a,e=app.search.stickyParams();return t.add("allDiscussions",Rt.a.component({href:app.route("index",e),icon:"far fa-comments"},app.translator.trans("core.forum.index.all_discussions_link")),100),t},n.viewItems=function(){var t=new p.a,e=app.discussions.sortMap(),n={};
52for(var i in e)n[i]=app.translator.trans("core.forum.index_sort."+i+"_button");return t.add("sort",C.a.component({buttonClassName:"Button",label:n[app.search.params().sort]||Object.keys(e).map((function(t){return n[t]}))[0]},Object.keys(n).map((function(t){var i=n[t],r=(app.search.params().sort||Object.keys(e)[0])===t;return P.a.component({icon:!r||"fas fa-check",onclick:app.search.changeSort.bind(app.search,t),active:r},i)})))),t},n.actionItems=function(){var t=new p.a;return t.add("refresh",P.a.component({title:app.translator.trans("core.forum.index.refresh_tooltip"),icon:"fas fa-sync",className:"Button Button--icon",onclick:function(){app.discussions.refresh(),app.session.user&&(app.store.find("users",app.session.user.id()),m.redraw())}})),app.session.user&&t.add("markAllAsRead",P.a.component({title:app.translator.trans("core.forum.index.mark_all_as_read_tooltip"),icon:"fas fa-check",className:"Button Button--icon",onclick:this.markAllAsRead.bind(this)})),t},n.newDiscussionAction=function(){return new Promise((function(t,e){return app.session.user?(app.composer.load(Oe,{user:app.session.user}),app.composer.show(),t(app.composer)):(app.modal.show(U),e())}))},n.markAllAsRead=function(){confirm(app.translator.trans("core.forum.index.mark_all_as_read_confirmation"))&&app.session.user.save({markedAllAsReadAt:new Date})},e}(d.a);Object(s.a)(Te,"providesInitialSearch",!0);var ke=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loading=!0,this.moreResults=!1,this.posts=[],this.loadLimit=20,this.loadUser(m.route.param("username"))},n.content=function(){return 0!==this.posts.length||this.loading?(this.loading?t=m(j.a,null):this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},m(P.a,{className:"Button",onclick:this.loadMore.bind(this)},app.translator.trans("core.forum.user.posts_load_more_button")))),m("div",{className:"PostsUserPage"},m("ul",{className:"PostsUserPage-list"},this.posts.map((function(t){return m("li",null,m("div",{className:"PostsUserPage-discussion"},app.translator.trans("core.forum.user.in_discussion_text",{discussion:m(g.a,{href:app.route.post(t)},t.discussion().title())})),m(ye,{post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(at.a,{text:app.translator.trans("core.forum.user.posts_empty_text")}));var t},n.show=function(e){t.prototype.show.call(this,e),this.refresh()},n.refresh=function(){this.loading=!0,this.posts=[],m.redraw(),this.loadResults().then(this.parseResults.bind(this))},n.loadResults=function(t){return app.store.find("posts",{filter:{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){return this.loading=!1,[].push.apply(this.posts,t),this.moreResults=t.length>=this.loadLimit,m.redraw(),t},e}(le),je=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=window.app),this.params=t,this.app=e,this.discussions=[],this.moreResults=!1,this.loading=!1}var e=t.prototype;return e.requestParams=function(){var t={include:["user","lastPostedUser"],filter:{}};return t.sort=this.sortMap()[this.params.sort],this.params.q&&(t.filter.q=this.params.q,t.include.push("mostRelevantPost","mostRelevantPost.user")),t},e.sortMap=function(){var t={};return this.params.q&&(t.relevance=""),t.latest="-lastPostedAt",t.top="-commentCount",t.newest="-createdAt",t.oldest="createdAt",t},e.getParams=function(){return this.params},e.clear=function(){this.discussions=[],m.redraw()},e.refreshParams=function(t){var e=this;this.hasDiscussions()&&!Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))||(this.params=t,this.refresh())},e.refresh=function(t){var e=this,n=(void 0===t?{}:t).deferClear,i=void 0!==n&&n;return this.loading=!0,i||this.clear(),this.loadResults().then((function(t){e.discussions=[],e.parseResults(t)}),(function(){e.loading=!1,m.redraw()}))},e.loadResults=function(t){var e=this.app.preloadedApiDocument();if(e)return Promise.resolve(e);
52var n=this.requestParams();return n.page={offset:t},n.include=n.include.join(","),this.app.store.find("discussions",n)},e.loadMore=function(){this.loading=!0,this.loadResults(this.discussions.length).then(this.parseResults.bind(this))},e.parseResults=function(t){var e;return(e=this.discussions).push.apply(e,t),this.loading=!1,this.moreResults=!!t.payload.links&&!!t.payload.links.next,m.redraw(),t},e.removeDiscussion=function(t){var e=this.discussions.indexOf(t);-1!==e&&this.discussions.splice(e,1),m.redraw()},e.addDiscussion=function(t){this.discussions.unshift(t),m.redraw()},e.hasDiscussions=function(){return this.discussions.length>0},e.isLoading=function(){return this.loading},e.isSearchResults=function(){return!!this.params.q},e.empty=function(){return!this.hasDiscussions()&&!this.isLoading()},t}(),Se=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.show=function(e){t.prototype.show.call(this,e),this.state=new je({q:"author:"+e.username(),sort:"newest"}),this.state.refresh()},n.content=function(){return m("div",{className:"DiscussionsUserPage"},ct.component({state:this.state}))},e}(le),Ae=n(37),Ee=n(42),Pe=n(47),De=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.methods=this.notificationMethods().toArray(),this.loading={},this.types=this.notificationTypes().toArray()},n.view=function(){var t=this,e=this.attrs.user.preferences();return m("table",{className:"NotificationGrid"},m("thead",null,m("tr",null,m("td",null),this.methods.map((function(e){return m("th",{className:"NotificationGrid-groupToggle",onclick:t.toggleMethod.bind(t,e.name)},Object(w.a)(e.icon)," ",e.label)})))),m("tbody",null,this.types.map((function(n){return m("tr",null,m("td",{className:"NotificationGrid-groupToggle",onclick:t.toggleType.bind(t,n.name)},Object(w.a)(n.icon)," ",n.label),t.methods.map((function(i){var r=t.preferenceKey(n.name,i.name);return m("td",{className:"NotificationGrid-checkbox"},m(Pe.a,{state:!!e[r],loading:t.loading[r],disabled:!(r in e),onchange:t.toggle.bind(t,[r])}))})))}))))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$("thead .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){var e=parseInt($(this).index(),10)+1;$(this).parents("table").find("td:nth-child("+e+")").toggleClass("highlighted","mouseenter"===t.type)})),this.$("tbody .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){$(this).parent().find("td").toggleClass("highlighted","mouseenter"===t.type)}))},n.toggle=function(t){var e=this,n=this.attrs.user,i=n.preferences(),r=!i[t[0]];t.forEach((function(t){e.loading[t]=!0,i[t]=r})),m.redraw(),n.save({preferences:i}).then((function(){t.forEach((function(t){return e.loading[t]=!1})),m.redraw()}))},n.toggleMethod=function(t){var e=this,n=this.types.map((function(n){return e.preferenceKey(n.name,t)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.toggleType=function(t){var e=this,n=this.methods.map((function(n){return e.preferenceKey(t,n.name)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new p.a;return t.add("alert",{name:"alert",icon:"fas fa-bell",label:app.translator.trans("core.forum.settings.notify_by_web_heading")}),t.add("email",{name:"email",icon:"far fa-envelope",label:app.translator.trans("core.forum.settings.notify_by_email_heading")}),t},n.notificationTypes=function(){var t=new p.a;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:app.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(h.a),$e=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.className=function(){return"ChangePasswordModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.change_password.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("core.forum.change_password.text")),m("div",{className:"Form-group"},P.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("core.forum.change_password.send_button")))))},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/forgot",body:{email:app.session.user.email()}}).then(this.hide.bind(this),this.loaded.bind(this))},e}(M.a),_e=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.success=!1,this.email=Object(L.a)(app.session.user.email()),this.password=Object(L.a)("")},n.className=function(){return"ChangeEmailModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.change_email.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("core.forum.change_email.confirmation_message",{email:m("strong",null,this.email()
52)})),m("div",{className:"Form-group"},m(P.a,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},app.translator.trans("core.forum.change_email.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{type:"email",name:"email",className:"FormControl",placeholder:app.session.user.email(),bidi:this.email,disabled:this.loading})),m("div",{className:"Form-group"},m("input",{type:"password",name:"password",className:"FormControl",placeholder:app.translator.trans("core.forum.change_email.confirm_password_placeholder"),bidi:this.password,disabled:this.loading})),m("div",{className:"Form-group"},P.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("core.forum.change_email.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.email()!==app.session.user.email()?(this.loading=!0,this.alertAttrs=null,app.session.user.save({email:this.email()},{errorHandler:this.onerror.bind(this),meta:{password:this.password()}}).then((function(){e.success=!0})).catch((function(){})).then(this.loaded.bind(this))):this.hide()},n.onerror=function(e){401===e.status&&(e.alert.content=app.translator.trans("core.forum.change_email.incorrect_password_message")),t.prototype.onerror.call(this,e)},e}(M.a),Ie=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.show(app.session.user),app.setTitle(app.translator.trans("core.forum.settings.title"))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,Object(f.a)(this.settingsItems().toArray())))},n.settingsItems=function(){var t=this,e=new p.a;return["account","notifications","privacy"].forEach((function(n){e.add(n,m(Ee.a,{className:"Settings-"+n,label:app.translator.trans("core.forum.settings."+n+"_heading")},t[n+"Items"]().toArray()))})),e},n.accountItems=function(){var t=new p.a;return t.add("changePassword",m(P.a,{className:"Button",onclick:function(){return app.modal.show($e)}},app.translator.trans("core.forum.settings.change_password_button"))),t.add("changeEmail",m(P.a,{className:"Button",onclick:function(){return app.modal.show(_e)}},app.translator.trans("core.forum.settings.change_email_button"))),t},n.notificationsItems=function(){var t=new p.a;return t.add("notificationGrid",m(De,{user:this.user})),t},n.privacyItems=function(){var t=this,e=new p.a;return e.add("discloseOnline",m(Ae.a,{state:this.user.preferences().discloseOnline,onchange:function(e){t.discloseOnlineLoading=!0,t.user.savePreferences({discloseOnline:e}).then((function(){t.discloseOnlineLoading=!1,m.redraw()}))},loading:this.discloseOnlineLoading},app.translator.trans("core.forum.settings.privacy_disclose_online_label"))),e},e}(le),Me=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),app.history.push("notifications"),app.notifications.load(),this.bodyClass="App--notifications"},n.view=function(){return m("div",{className:"NotificationsPage"},m(Ft,{state:app.notifications}))},e}(d.a),Le=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.canonicalizeDiscussionSlug=function(t){if(t)return t.split("-")[0]},n.makeKey=function(){var t=Object(a.a)({},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,i,r){return app.current.matches(Mt)&&this.canonicalizeDiscussionSlug(n.id)===this.canonicalizeDiscussionSlug(m.route.param("id"))&&(e.scrollToPostNumber=n.near||"1"),t.prototype.onmatch.call(this,n,i,r)},n.render=function(n){if(null!==e.scrollToPostNumber){var i=e.scrollToPostNumber;setTimeout((function(){return app.current.get("stream").goToNumber(i)})),e.scrollToPostNumber=null}return t.prototype.render.call(this,n)},e}(n(39).a);Object(s.a)(Le,"scrollToPostNumber",null);var Re=function(t){t.routes={index:{path:"/all",component:Te},discussion:{path:"/d/:id",component:Mt,resolverClass:Le},"discussion.near":{path:"/d/:id/:near",component:Mt,resolverClass:Le},user:{path:"/u/:username",component:ke},"user.posts":{path:"/u/:username",component:ke},"user.discussions":{path:"/u/:username/discussions",component:Se},settings:{path:"/settings",component:Ie},notifications:{path:"/notifications",component:Me}}
52,t.route.discussion=function(e,n){return t.route(n&&1!==n?"discussion.near":"discussion",{id:e.slug(),near:n&&1!==n?n:void 0})},t.route.post=function(e){return t.route.discussion(e.discussion(),e.number())},t.route.user=function(e){return t.route("user",{username:e.slug()})}},Be=n(23);function He(t){var e=t.session.user;if(e&&!e.isEmailConfirmed()){var n=function(n){function i(){return n.apply(this,arguments)||this}Object(o.a)(i,n);var r=i.prototype;return r.oninit=function(t){n.prototype.oninit.call(this,t),this.loading=!1,this.sent=!1},r.view=function(){return m(P.a,{class:"Button Button--link",onclick:this.onclick.bind(this),loading:this.loading,disabled:this.sent},this.sent?[Object(w.a)("fas fa-check")," ",t.translator.trans("core.forum.user_email_confirmation.sent_message")]:t.translator.trans("core.forum.user_email_confirmation.resend_button"))},r.onclick=function(){var n=this;this.loading=!0,m.redraw(),t.request({method:"POST",url:t.forum.attribute("apiUrl")+"/users/"+e.id()+"/send-confirmation"}).then((function(){n.loading=!1,n.sent=!0,m.redraw()})).catch((function(){n.loading=!1,m.redraw()}))},i}(h.a),i=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return Object(a.a)({},n,{children:[m("div",{className:"container"},n.children)]})},e}(Be.a);m.mount($("<div/>").insertBefore("#content")[0],{view:function(){return m(i,{dismissible:!1,controls:[m(n,null)]},t.translator.trans("core.forum.user_email_confirmation.alert_message",{email:m("strong",null,e.email())}))}})}}var Ue=n(70),Fe=n(50),qe=function(){function t(t){this.app=t,this.notificationPages=[],this.loading=!1,this.moreResults=!1}var e=t.prototype;return e.clear=function(){this.notificationPages=[]},e.getNotificationPages=function(){return this.notificationPages},e.isLoading=function(){return this.loading},e.hasMoreResults=function(){return this.moreResults},e.load=function(){this.app.session.user.newNotificationCount()&&(this.notificationPages=[]),this.notificationPages.length>0||(this.app.session.user.pushAttributes({newNotificationCount:0}),this.loadMore())},e.loadMore=function(){var t=this;this.loading=!0,m.redraw();var e=this.notificationPages.length>0?{page:{offset:10*this.notificationPages.length}}:null;return this.app.store.find("notifications",e).then(this.parseResults.bind(this)).catch((function(){})).then((function(){t.loading=!1,m.redraw()}))},e.parseResults=function(t){return t.length&&this.notificationPages.push(t),this.moreResults=!!t.payload.links.next,t},e.markAllAsRead=function(){0!==this.notificationPages.length&&(this.app.session.user.pushAttributes({unreadNotificationCount:0}
52),this.notificationPages.forEach((function(t){t.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),this.app.request({url:this.app.forum.attribute("apiUrl")+"/notifications/read",method:"POST"}))},t}(),ze=function(){function t(t){void 0===t&&(t=[]),this.cachedSearches=t}var e=t.prototype;return e.getValue=function(){return this.value},e.setValue=function(t){this.value=t},e.clear=function(){this.setValue("")},e.cache=function(t){this.cachedSearches.push(t)},e.isCached=function(t){return-1!==this.cachedSearches.indexOf(t)},t}(),We=function(t){function e(e){return void 0===e&&(e=[]),t.call(this,e)||this}Object(o.a)(e,t);var n=e.prototype;return n.getValue=function(){return void 0===this.value&&(this.value=this.getInitialSearch()||""),t.prototype.getValue.call(this)},n.clear=function(){t.prototype.clear.call(this),this.getInitialSearch()?this.clearInitialSearch():m.redraw()},n.stickyParams=function(){return{sort:m.route.param("sort"),q:m.route.param("q")}},n.params=function(){var t=this.stickyParams();return t.filter=m.route.param("filter"),t},n.changeSort=function(t){var e=this.params();t===Object.keys(app.discussions.sortMap())[0]?delete e.sort:e.sort=t,Object(c.a)(app.route(app.current.get("routeName"),e))},n.getInitialSearch=function(){return app.current.type&&app.current.type.providesInitialSearch&&this.params().q},n.clearInitialSearch=function(){var t=this.params();delete t.q,Object(c.a)(app.route(app.current.get("routeName"),t))},e}(ze);var Ve=function(t){function e(){var e;return e=t.call(this)||this,Object(s.a)(Object(r.a)(e),"notificationComponents",{discussionRenamed:ee}),Object(s.a)(Object(r.a)(e),"postComponents",{comment:ye,discussionRenamed:Ne}),Object(s.a)(Object(r.a)(e),"pane",null),Object(s.a)(Object(r.a)(e),"drawer",null),Object(s.a)(Object(r.a)(e),"history",new u),Object(s.a)(Object(r.a)(e),"notifications",new qe(Object(r.a)(e))),Object(s.a)(Object(r.a)(e),"search",new We),Object(s.a)(Object(r.a)(e),"composer",new Qt),Re(Object(r.a)(e)),e.discussions=new je({},Object(r.a)(e)),e}Object(o.a)(e,t);var n=e.prototype;return n.mount=function(){var e=this,n=this.forum.attribute("defaultRoute"),i="index";for(var r in this.routes)this.routes[r].path===n&&(i=r);this.routes[i].path="/",this.history.push(i,this.translator.trans("core.forum.header.back_to_index_tooltip"),"/"),this.pane=new l(document.getElementById("app")),m.route.prefix="",t.prototype.mount.call(this,this.forum.attribute("basePath")),m.mount(document.getElementById("app-navigation"),{view:function(){return Fe.a.component({className:"App-backControl",drawer:!0})}}),m.mount(document.getElementById("header-navigation"),Fe.a),m.mount(document.getElementById("header-primary"),Lt),m.mount(document.getElementById("header-secondary"),Kt),m.mount(document.getElementById("composer"),{view:function(){return Zt.component({state:e.composer})}}),He(this),$("#home-link").click((function(t){t.ctrlKey||t.metaKey||2===t.which||(t.preventDefault(),app.history.home(),app.session.user&&(app.store.find("users",app.session.user.id()),m.redraw()))})),"ontouchstart"in window&&navigator.vendor&&navigator.vendor.includes("Apple")&&navigator.userAgent&&!navigator.userAgent.includes("CriOS")&&!navigator.userAgent.includes("FxiOS")&&$((function(){$(".App").addClass("mobile-safari")}))},n.viewingDiscussion=function(t){return this.current.matches(Mt,{discussion:t})},n.authenticationComplete=function(t){t.loggedIn?window.location.reload():this.modal.show(H,t)},e}(Ue.a),Ye=n(102),Ke=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.initAttrs=function(e){e.className=(e.className||"")+" LogInButton",e.onclick=function(){var t=$(window);window.open(app.forum.attribute("baseUrl")+e.path,"logInPopup","width=580,height=400,top="+(t.height()/2-200)+",left="+(t.width()/2-290)+",status=no,scrollbars=yes,resizable=no")},t.initAttrs.call(this,e)},e}(P.a),Ge=n(85),Xe=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t=this.attrs.post,e=t.user(),n=Object(y.a)(t.contentPlain(),this.attrs.highlight,300);return m(g.a,{className:"PostPreview",href:app.route.post(t),onclick:this.attrs.onclick},m("span",{className:"PostPreview-content"},Object(b.a)(e),Object(ht.a)(e)," ",m("span",{className:"PostPreview-excerpt"},n)))},e}(h.a),Je=function(){function t(){}var e=t.prototype;return e.search=function(){},e.view=function(){},t}(),Qe=n(40),Ze=Object(a.a)(Ye.a,{"utils/PostControls":re,"utils/KeyboardNavigatable":zt,"utils/slidable":W,"utils/History":u,"utils/DiscussionControls":z,"utils/alertEmailConfirmation":He,"utils/UserControls":de,"utils/Pane":l,"utils/BasicEditorDriver":Qe.a,"utils/SuperTextarea":Qe.a,"states/ComposerState":Qt,"states/DiscussionListState":je,"states/GlobalSearchState":We,"states/NotificationListState":qe,"states/PostStreamState":It,"states/SearchState":ze,"components/AffixedSidebar":ue,"components/DiscussionPage":Mt,"components/DiscussionListPane":lt,"components/LogInModal":U,"components/ComposerBody":E,"components/ForgotPasswordModal":R,"components/Notification":te,"components/LogInButton":Ke,"components/DiscussionsUserPage":Se,"components/Composer":Zt,"components/SessionDropdown":Bt,"components/HeaderPrimary":Lt,"components/PostEdited":be,"components/PostStream":vt,"components/ChangePasswordModal":$e,"components/IndexPage":Te,"components/DiscussionRenamedNotification":ee,"components/DiscussionsSearchSource":Wt,"components/HeaderSecondary":Kt,"components/ComposerButton":Gt,"components/DiscussionList":ct,"components/ReplyPlaceholder":mt,"components/TextEditor":A.a,"components/TextEditorButton":Ge.a,"components/AvatarEditor":pe,"components/Post":oe,"components/SettingsPage":Ie,"components/TerminalPost":T,"components/ChangeEmailModal":_e,"components/NotificationsDropdown":qt,"components/UserPage":le,"components/PostUser":me,"components/UserCard":he,"components/UsersSearchSource":Vt,"components/NotificationGrid":De,"components/PostPreview":Xe,"components/EventPost":xe,"components/DiscussionHero":v,"components/PostMeta":ge,"components/EditUserModal":ce,"components/SearchSource":Je,"components/DiscussionRenamedPost":Ne,"components/DiscussionComposer":Oe,"components/LogInButtons":B,"components/NotificationList":Ft,"components/WelcomeHero":Ce,"components/SignUpModal":H,"components/CommentPost":ye,"components/ComposerPostPreview":ft,"components/ReplyComposer":I,"components/NotificationsPage":Me,"components/PostStreamScrubber":bt,"components/EditPostComposer":ie,"components/RenameDiscussionModal":q,"components/Search":Yt,"components/DiscussionListItem":st,"components/LoadingPost":pt,"components/PostsUserPage":ke,"resolvers/DiscussionPageResolver":Le,routes:Re,ForumApplication:Ve}),tn=n(69),en=new Ve;window.app=en,Ze.app=en;var nn=Object(tn.a)(Ze,"forum")}]); 53 54 55(function(){var HINT={};HINT.EMOTICONS_NOT_AFTER=0;HINT.LITEDOWN_DECODE_HTML_ENTITIES=0;HINT.PREG_HAS_PASSTHROUGH=!1;HINT.RULE_AUTO_CLOSE=1;HINT.RULE_AUTO_REOPEN=1;HINT.RULE_BREAK_PARAGRAPH=1;HINT.RULE_CREATE_PARAGRAPHS=1;HINT.RULE_DISABLE_AUTO_BR=1;HINT.RULE_ENABLE_AUTO_BR=1;HINT.RULE_IGNORE_TAGS=1;HINT.RULE_IGNORE_TEXT=1;HINT.RULE_IGNORE_WHITESPACE=1;HINT.RULE_IS_TRANSPARENT=1;HINT.RULE_PREVENT_BR=1;HINT.RULE_SUSPEND_AUTO_BR=1;HINT.RULE_TRIM_FIRST_LINE=1;HINT.attributeDefaultValue=1;HINT.closeAncestor=0;HINT.closeParent=1;HINT.createChild=1;HINT.fosterParent=1;HINT.hash=1;HINT.ignoreAttrs=1;HINT.namespaces=0;HINT.onRender=1;HINT.onUpdate=1;HINT.regexp=1;HINT.regexpLimit=1;HINT.requireAncestor=0;var oB4E9AE58=[""];var o82015558=[0,0];var o90B2B224=["","t"];var o8706E0A9=[261,769];var o85888FAE=["","id"];var oA9ACF916=[257,771];var oB565876D={flags:2};var o3A598861=["","vid"];var o939F1698={flags:514};var oD276C2BF=["","type"];var o6F423A3F=[31033,7939];var oCB183773=[65295,7939];var oA80287CC={flags:3089};var o42DE1101=[65281,7954];var o59C778D8=[65471,7939];var o06856E8A=["","width"];var oF3C0ADD0=["","height"];var o9338E0AD=/embed\/(\d+)/;var oA60012B9=["","album_id"];var oC59CF925=["","video_id"];var o5F5D8CFC=["","track_id"];var o0E3C680A=[[/(?:)/,oB4E9AE58]];var oEDE19F33=["","user","id"];var oF5EDDAF6=["","id","type"];
55var o28C25529=["","fid","eid"];var oAB64EF36=["","type","id"];var o37C2EA3B=["","episode_id"];var oB0695997=["","playlist_id"];var o1BD7B50C=["","oid","vid","hash"];var o6ACB7DBF=["","channel","clip_id"];var o86C6DC19=["","athlete","highlight"];var o1BC3EAF4={filterChain:[],required:!1};var o02D8DBB5={filterChain:[],required:!0};var oD0874E6E=["","account_id","event_id"];var o251A6FB9={"id":o1BC3EAF4};var oD4A66010=[[/globalnews\.ca\/video\/(\d+)/,o85888FAE]];var oF7034233=[/hudl\.com\/video\/(\w+)(?![\w\/])/,o85888FAE];var oBF39CE41=[/flickr\.com\/photos\/[^\/]+\/(\d+)/,o85888FAE];var oFF5E442E=[[/([-\w]+)\.castos\.com\/player\/(\d+)/,["","host","id"]]];var o3C5A4C51=[[/247sports\.com\/PlayerSport\/[-\w]*(\d+)\/Embed/,["","player_id"]]];var o3773CEC3=[/hudl\.com\/video\/\d+\/(\d+)\/([\da-f]+)/,o86C6DC19];var oD4869BFF={"B":1,"C":1,"COLOR":1,"EM":1,"EMAIL":1,"I":1,"S":1,"SIZE":1,"STRONG":1,"U":1,"URL":1};var oD03A52D8=[[/(?:open|play)\.spotify\.com\/(?:user\/[-.\w]+\/)?((?:album|artist|episode|playlist|show|track)(?:[:\/][-.\w]+)+)/,o85888FAE]];var oDF43256F=[function(attrValue,attrName){return NumericFilter.filterUint(attrValue)}];var o118B31AC=function(tag,tagConfig){return filterAttributes(tag,tagConfig,registeredVars,logger)};var o1B4F5B52=[o118B31AC];var o0967AFCF={filterChain:[function(attrValue,attrName){return TimestampFilter.filter(attrValue)}],required:!1};var o75AB9259={filterChain:oDF43256F,required:!1};var o6CB0A318={filterChain:oDF43256F,required:!0};var oFB2F5649={filterChain:[function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^[-0-9A-Za-z_]+$/)}],required:!1};var o28FFC5A0={defaultValue:640,filterChain:oDF43256F,required:!1};var o9244B582={defaultValue:360,filterChain:oDF43256F,required:!1};var oF307D35C={filterChain:[function(attrValue,attrName){return UrlFilter.filter(attrValue,registeredVars.urlConfig,logger)}],required:!0};var o1AF69066={closeParent:oD4869BFF,flags:268,fosterParent:oD4869BFF};var 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};var o212FA0B5={allowed:oCB183773,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:0},tagLimit:5000};var oF5133072={allowed:oCB183773,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000};var o1C8AA61D={allowed:o8706E0A9,attributes:o251A6FB9,bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000};var oCCD33097={allowed:oA9ACF916,attributes:{"char":o02D8DBB5},bitNumber:8,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000};var o285DC803={allowed:o8706E0A9,attributes:{"id":o1BC3EAF4,"user":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000};var 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}};var o620084AE={allowed:oCB183773,attributes:{},bitNumber:5,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:260,fosterParent:oD4869BFF},tagLimit:5000};var o57881CFF={allowed:o8706E0A9,attributes:{"height":o9244B582,"id":o1BC3EAF4,"width":o28FFC5A0},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000};var xsl=("<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http:\/\/www.w3.org\/1999\/XSL\/Transform\"><xsl:output method=\"html\" encoding=\"utf-8\" indent=\"no\"\/><xsl:decimal-format decimal-separator=\".\"\/><xsl:param$wAMAZON_ASSOCIATE_TAG\"\/><xsl:param$wAMAZON_ASSOCIATE_TAG_CA\"\/><xsl:param$wAMAZON_ASSOCIATE_TAG_DE\"\/><xsl:param$wAMAZON_ASSOCIATE_TAG_ES\"\/><xsl:param$wAMAZON_ASSOCIATE_TAG_FR\"\/><xsl:param$wAMAZON_ASSOCIATE_TAG_IN\"\/><xsl:param$wAMAZON_ASSOCIATE_TAG_IT\"\/><xsl:param$wAMAZON_ASSOCIATE_TAG_JP\"\/><xsl:param$wAMAZON_ASSOCIATE_TAG_UK\"\/><xsl:param$wDISCUSSION_URL\">https:\/\/muziktek.net\/d\/<\/xsl:param><xsl:param$wMEDIAEMBED_THEME\"\/><xsl:param$wPROFILE_URL\">https:\/\/muziktek.net\/u\/<\/xsl:param>$dABCNEWS\"><$s$eabcnews\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/abcnews.go.com\/video\/embed?id={@id}\"$h$b\/><\/$s><\/$s>$g$dAMAZON\"><$s$eamazon\"$h$c120px\"><$s$h$a200%\"><$n$f\"$l$r$kno\"$hbackground:url(https:\/\/www.amazon.com\/favicon.ico) center no-repeat;$b><$m$wsrc\">\/\/ws-<$x><$u$q@tld='jp'\">fe<\/$u><$u$q@tld and contains('desfrinituk',@tld)\">eu<\/$u><$t>na<\/$t><\/$x>.assoc-amazon.com\/widgets\/cm?l=as1&f=ifr&o=<$x><$u$q@tld='ca'\">15&t=$i$AMAZON_ASSOCIATE_TAG_CA\"\/><\/$u><$u$q@tld='de'\">3&t=$i$AMAZON_ASSOCIATE_TAG_DE\"\/><\/$u><$u$q@tld='es'\">30&t=$i$AMAZON_ASSOCIATE_TAG_ES\"\/><\/$u><$u$q@tld='fr'\">8&t=$i$AMAZON_ASSOCIATE_TAG_FR\"\/><\/$u><$u$q@tld='in'\">31&t=$i$AMAZON_ASSOCIATE_TAG_IN\"\/><\/$u><$u$q@tld='it'\">29&t=$i$AMAZON_ASSOCIATE_TAG_IT\"\/><\/$u><$u$q@tld='jp'\">9&t=$i$AMAZON_ASSOCIATE_TAG_JP\"\/><\/$u><$u$q@tld='uk'\">2&t=$i$AMAZON_ASSOCIATE_TAG_UK\"\/><\/$u><$t>1&t=$i$AMAZON_ASSOCIATE_TAG\"\/><\/$t><\/$x>&asins=$i@id\"\/><\/$m><\/$n><\/$s><\/$s>$g$dANCHOR\"><$n$eanchor\"$f\"$l$r$kno\"$o\/\/anchor.fm\/x\/embed\/episodes\/x-{@id}\"$hborder:0;height:102px;max-width:768px;width:100%\"\/>$g$dAUDIOBOOM\"><$n$eaudioboom\"$f\"$l$r$kno\"$o\/\/audioboom.com\/posts\/{@id}\/embed\/v3\"$hborder:0;height:150px;max-width:700px;width:100%\"\/>$g$dAUDIOMACK\"><$n$eaudiomack\"$f\"$l$r$kno\"><$x><$u$q@mode='album'\"><$m$wsrc\">https:\/\/www.au"+"diomack.com\/embed\/album\/<$x><$u$q@id\">$i@id\"\/><\/$u><$t>$i@artist\"\/>\/$i@title\"\/><\/$t><\/$x><\/$m><$m$w$z>border:0;height:400px;max-width:900px;width:100%<\/$m><\/$u><$t><$m$wsrc\">https:\/\/www.audiomack.com\/embed\/song\/<$x><$u$q@id\">$i@id\"\/><\/$u><$t>$i@artist\"\/>\/$i@title\"\/><\/$t><\/$x><\/$m><$m$w$z>border:0;height:252px;max-width:900px;width:100%<\/$m><\/$t><\/$x><\/$n>
55$g$dB|DEL|EM|H1|H2|H3|H4|H5|H6|I|LI|S|STRONG|SUB|SUP|TABLE|TBODY|THEAD|TR|U|p\"><xsl:element$w{translate(name(),'ABDEGHILMNOPRSTUY','abdeghilmnoprstuy')}\">$v<\/xsl:element>$g$dBANDCAMP\"><$s$ebandcamp\"$h$c400px\"><$s$h$a100%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">\/\/bandcamp.com\/EmbeddedPlayer\/size=large\/minimal=true\/<$x><$u$q@album_id\">album=$i@album_id\"\/><xsl:if$q@track_num\">\/t=$i@track_num\"\/><\/xsl:if><\/$u><$t>track=$i@track_id\"\/><\/$t><\/$x><xsl:if$q$MEDIAEMBED_THEME='dark'\">\/bgcol=333333\/linkcol=0f91ff<\/xsl:if><\/$m><\/$n><\/$s><\/$s>$g$dBBCNEWS\"><$s$ebbcnews\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">\/\/www.bbc.com\/news\/av-embeds\/<$x><$u$qstarts-with(@playlist,'\/news\/')\"><$x><$u$qcontains(@playlist,'-')\">$isubstring-after(substring-after(translate(@playlist,'A','#'),'news\/'),'-')\"\/><\/$u><$t>$isubstring-after(translate(@playlist,'A','\/'),'\/news\/')\"\/><\/$t><\/$x><\/$u><$u$qcontains(@id,'\/')\">$isubstring-after(@id,'\/')\"\/><\/$u><$t>$i@id\"\/><\/$t><\/$x><\/$m><\/$n><\/$s><\/$s>$g$dBITCHUTE\"><$s$ebitchute\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$ohttps:\/\/www.bitchute.com\/embed\/{@id}\/\"$h$b\/><\/$s><\/$s>$g$dBLEACHERREPORT\"><$s$ebleacherreport\"$h$c320px\"><$s$h$a100%\"><$n$f\"$l$r$kno\"$o\/\/bleacherreport.com\/video_embed?id={@id}&library=video-cms\"$h$b\/><\/$s><\/$s>$g$dBREAK\"><$s$ebreak\"$h$c464px\"><$s$h$a60.344828%\"><$n$f\"$l$r$kno\"$o\/\/break.com\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dBRIGHTCOVE\"><$s$ebrightcove\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">https:\/\/<$x><$u$q@bckey\">link.brightcove.com\/services\/player\/bcpid$i@bcpid\"\/>?bckey=$i@bckey\"\/>&bctid=$i@bctid\"\/>&secureConnections=true&secureHTMLConnections=true&autoSt"+"art=false&height=360&width=640<\/$u><$t>players.brightcove.net\/$i@bcpid\"\/>\/default_default\/index.html?videoId=$i@bctid\"\/><\/$t><\/$x><\/$m><\/$n><\/$s><\/$s>$g$dC\"><code>$v<\/code>$g$dCASTOS\"><$n$ecastos\"$f\"$l$r$kno\"$ohttps:\/\/player.castos.com\/player\/{@id}\"$hborder:0;height:150px;max-width:900px;width:100%\"\/>$g$dCBSNEWS\"><$s$ecbsnews\"$h$c640px\"><$s><$x><$u$qcontains(@id,'-')\"><$m$w$z>$a56.25%<\/$m><$n$f\"$l$r$kno\"$ohttps:\/\/www.cbsnews.com\/embed\/videos\/{@id}\/\"$h$b\/><\/$u><$u$q@pid\"><$m$w$z>$a62.1875%;padding-bottom:calc(56.25% + 38px)<\/$m><object data=\"\/\/www.cbsnews.com\/common\/video\/cbsnews_player.swf\"$h$y type=\"application\/x-shockwave-flash\" typemustmatch=\"\"><param$wallowfullscreen\" value=\"true\"\/><param$wflashvars\" value=\"pType=embed&si=254&pid={@pid}\"\/><\/object><\/$u><$t><$m$w$z>$a62.5%;padding-bottom:calc(56.25% + 40px)<\/$m><object data=\"\/\/i.i.cbsi.com\/cnwk.1d\/av\/video\/cbsnews\/atlantis2\/cbsnews_player_embed.swf\"$h$y type=\"application\/x-shockwave-flash\" typemustmatch=\"\"><param$wallowfullscreen\" value=\"true\"\/><param$wflashvars\" value=\"si=254&contentValue={@id}\"\/><\/object><\/$t><\/$x><\/$s><\/$s>$g$dCENTER\"><div$htext-align:center\">$v<\/div>$g$dCLYP\"><$n$eclyp\"$f\"$l$r$kno\"$ohttps:\/\/clyp.it\/{@id}\/widget\"$hborder:0;height:265px;max-width:900px;width:100%\"\/>$g$dCNBC\"><$s$ecnbc\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$ohttps:\/\/player.cnbc.com\/p\/gZWlPC\/cnbc_global?playertype=synd&byGuid={@id}&size=640_360\"$h$b\/><\/$s><\/$s>$g$dCNN\"><$s$ecnn\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/fave.api.cnn.io\/v1\/fav\/?video={@id}&customer=cnn&edition=international&env=prod\"$h$b\/><\/$s><\/$s>$g$dCNNMONEY\"><$s$ecnnmoney\"$h$c560px\"><$s$h$a64.285714%\"><$n$f\"$l$r$kno\"$o\/\/money.cnn.com\/.element\/ssi\/video\/7.0\/players\/embed.player.html?videoid=video\/{@id}&width=560&height=360\"$h$b\/><\/$s><\/$s>$g$dCODE\"><pre data-s9e-livepreview-hash=\"\" data-s9e-livepreview-onupdate=\"if(typeof hljsLoader!=='undefined')hljsLoader.highlightBlocks(this)\"><code><xsl:if$q@lang\"><$m$wcl"+"ass\">language-$i@lang\"\/><\/$m><\/xsl:if>$v<\/code><script async=\"\" crossorigin=\"anonymous\" data-hljs-style=\"github-gist\" data-s9e-livepreview-onrender=\"if(typeof hljsLoader!=='undefined')this.parentNode.removeChild(this)\" integrity=\"sha384-0R2eSjxhS3nwxyF5hfN2eeJ2m+X1s6yA8sb5pK7+\/haZVPDRqEZIAQvSK4isiB5K\" onload=\"hljsLoader.highlightBlocks(this.parentNode)\"$ohttps:\/\/cdn.jsdelivr.net\/gh\/s9e\/[email protected]\/loader.min.js\"\/><\/pre>$g$dCODEPEN\"><$n$ecodepen\"$f\"$l$r$kno\"$ohttps:\/\/codepen.io\/{@user}\/embed\/{@id}?height=400&default-tab=html,result\"$hborder:0;height:400px;width:100%\"\/>$g$dCOLOR\"><$s$hcolor:{@color}\">$v<\/$s>$g$dCOMEDYCENTRAL\"><$s$ecomedycentral\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/media.mtvnservices.com\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dCOUB\"><$s$ecoub\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/coub.com\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dDAILYMOTION\"><$s$edailymotion\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">\/\/www.dailymotion.com\/embed\/video\/$i@id\"\/><xsl:if$q@t\">?start=$i@t\"\/><\/xsl:if><\/$m><\/$n><\/$s><\/$s>$g$dDEMOCRACYNOW\"><$s$edemocracynow\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">\/\/www.democracynow.org\/embed\/<$x><$u$qcontains(@id,'\/headlines')\">headlines\/$isubstring-before(@id,'\/headlines')\"\/><\/$u><$u$qstarts-with(@id,'2')\">story\/$i@id\"\/><\/$u><$u$qstarts-with(@id,'shows\/')\">show\/$isubstring-after(@id,'\/')\"\/><\/$u><$t>$i@id\"\/><\/$t><\/$x><\/$m><\/$n><\/$s><\/$s>$g$dDUMPERT\"><$s$edumpert\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.dumpert.nl\/embed\/{translate(@id,'\/','_')}\"$h$b\/><\/$s><\/$s>$g$dE\"><$x><$u$q.=':)'\">\ud83d\ude42<\/$u><$u$q.=':D'\">\ud83d\ude03<\/$u><$u$q.=':P'\">\ud83d\ude1b<\/$u><$u$q.=':('\">\ud83d\ude41<\/$u><$u$q.=':|'\">\ud83d\ude10<\/$u><$u$q.=';)'\">\ud83d\ude09<\/$u><$u$q.=":'("\">\ud83d\ude22<\/$u><$u$q.=':O'\">\ud83d\ude2e<\/$u><$u$q.='>:('\">\ud83d\ude21<\/$u><$t>$i.\"\/><\/$t><\/$x>$g$dEIGHTTRACKS\"><$s$eeighttracks\"$h$c400px\"><$s$h$a100%\"><$n$f\"$l$r$kno\"$o\/\/8tracks.com\/mixes\/{@id}\/player_v3_universal\"$h$b\/><\/$s><\/$s>$g$dEMAIL\"><a href=\"mailto:{@email}\">$v<\/a>$g$dESC\">$v$g$dESPN\"><$s"+"$eespn\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.espn.com\/core\/video\/$n?id={@id}\"$h$b\/><\/$s><\/$s>$g$dFACEBOOK\"><$n$efacebook\"$f\"$p$z$l$r onload=\"$j$kno\"$ohttps:\/\/s9e.github.io\/$n\/2\/facebook.min.html#{@type}{@id}\"$hborder:0;height:360px;max-width:640px;width:100%\"\/>$g$dFALSTAD\"><$n$efalstad\"$f\"$l$r$kno\"$hborder:0;height:500px;max-height:90vh;width:100%\"><$m$wsrc\">https:\/\/www.falstad.com\/circuit\/circuitjs.html?running=false&c<$x><$u$q@cct\">ct=$i@cct\"\/><\/$u><$t>tz=$i@ctz\"\/><\/$t><\/$x><\/$m><\/$n>$g$dFLICKR\"><$s$eflickr\"$h$c500px\"><$s$h$a100%\"><$n$f\"$l$r$kno\"$ohttps:\/\/www.flickr.com\/photos\/_\/{@id}\/player\/\"$h$b\/><\/$s><\/$s>$g$dFOXNEWS\"><$s$efoxnews\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/video.foxnews.com\/v\/video-embed.html?video_id={@id}\"$h$b\/><\/$s><\/$s>$g$dFP|HE\">$i@char\"\/>$g$dFUNNYORDIE\"><$s$efunnyordie\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.funnyordie.com\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dGAMESPOT\"><$s$egamespot\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.gamespot.com\/videos\/embed\/{@id}\/\"$h$b\/><\/$s><\/$s>$g$dGAMETRAILERS\"><$s$egametrailers\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">\/\/<$x><$u$qstarts-with(@id,'mgid:')\">media.mtvnservices.com\/embed\/$i@id\"\/><\/$u><$t>embed.gametrailers.com\/embed\/$i@id\"\/>?embed=1&suppressBumper=1<\/$t><\/$x><\/$m><\/$n><\/$s><\/$s>$g$dGETTY\"><$s$egetty\"$h$c{@width}px\"><$s><$m$w$z>display:block;overflow:hidden;position:relative;<xsl:if$q@width>0\">padding-bottom:$i100*@height div@width\"\/>%<\/xsl:if><\/$m><$n$f\"$l$r$kno\"$o\/\/embed.gettyimages.com\/embed\/{@id}?et={@et}&tld=com&sig={@sig}&caption=false&ver=1\"$h$b\/><\/$s><\/$s>$g$dGFYCAT\"><$s$egfycat\"$h$c{@width}px\"><$s><$m$w$z>display:block;overflow:hidden;position:relative;<xsl:if$q@width>0\">padding-bottom:$i100*(@height+44)div@width\"\/>%;padding-bottom:calc($i100*@height div@width\"\/>% + 44px)<\/xsl:if><\/$m><$n$f\"$l$r$kno\"$o\/\/gfycat.com\/ifr\/{@id}?hd=1\"$h$b\/><\/$s><\/$s>$g$dGIFS\"><$s$egifs\"$h$c{@width}px\"><$s><$m$w$z>display:block;overflow:hidden;"+"position:relative;<xsl:if$q@width>0\">padding-bottom:$i100*@height div@width\"\/>%<\/xsl:if><\/$m><$n$f\"$l$r$kno\"$o\/\/gifs.com\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dGIPHY\"><$s$egiphy\"$h$c{@width}px\"><$s><$m$w$z>display:block;overflow:hidden;position:relative;<xsl:if$q@width>0\">padding-bottom:$i100*@height div@width\"\/>%<\/xsl:if><\/$m><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">\/\/giphy.com\/embed\/$i@id\"\/><xsl:if$q@type='video'\">\/video<\/xsl:if><\/$m><\/$n><\/$s><\/$s>$g$dGIST\"><$n$egist\"$f\"$p$z$l$r onload=\"$j$k\"$ohttps:\/\/s9e.github.io\/$n\/2\/gist.min.html#{@id}\"$hborder:0;height:180px;width:100%\"\/>$g$dGLOBALNEWS\"><$s$eglobalnews\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/globalnews.ca\/video\/embed\/{@id}\/\"$h$b\/><\/$s><\/$s>$g$dGOFUNDME\"><$s$egofundme\"$h$c349px\"><$s$h$a118.911175%;padding-bottom:calc(59.312321% + 208px)\"><$n$f\"$l$r$kno\"$o\/\/www.gofundme.com\/mvc.php?route=widgets\/mediawidget&fund={@id}&image=1&coinfo=1\"$h$b\/><\/$s><\/$s>$g$dGOOGLEDRIVE\"><$s$egoogledrive\"$h$c640px\"><$s$h$a75%\"><$n$f\"$l$r$kno\"$o\/\/drive.google.com\/file\/d\/{@id}\/preview\"$h$b\/><\/$s><\/$s>$g$dGOOGLEPLUS\"><$n$egoogleplus\"$f\"$p$z$l$r onload=\"$j$kno\"$hborder:0;height:240px;max-width:450px;width:100%\"><$m$wsrc\">https:\/\/s9e.github.io\/$n\/2\/googleplus.min.html#<$x><$u$q@oid\">$i@oid\"\/><\/$u><$t>+$i@name\"\/><\/$t><\/$x>\/posts\/$i@pid\"\/><\/$m><\/$n>$g$dGOOGLESHEETS\"><$x><$u$q@type='chart'\"><$s$egooglesheets\"$h$c600px\"><$s$h$a62%\"><$n$f\"$l$r$kno\"$ohttps:\/\/docs.google.com\/spreadsheets\/d\/{@id}\/pubchart?oid={@oid}&format=interactive\"$h$b\/><\/$s><\/$s><\/$u><$t><$n$egooglesheets\"$f\"$l$r$kno\"$hborder:0;height:500px;resize:vertical;width:100%\"><$m$wsrc\">https:\/\/docs.google.com\/spreadsheets\/d\/$i@id\"\/>\/p<$x><$u$qstarts-with(@id,'e\/')\">ubhtml?widget=true&headers=false<\/$u><$t>review<\/$t><\/$x>#gid=$i@gid\"\/><\/$m><\/$n><\/$t><\/$x>$g$dHR\"><hr\/>$g$dHUDL\"><$s$ehudl\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">\/\/www.hudl.com\/embed\/<$x><$u$q@id\">video\/$i@id\"\/><\/$u><$t>athlete\/$i@athlete\"\/>\/highlights\/$i@highlight\"\/><\/$t><\/$x><\/$m><\/$n><"+"\/$s><\/$s>$g$dHULU\"><$s$ehulu\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$ohttps:\/\/secure.hulu.com\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dIGN\"><$s$eign\"$h$c468px\"><$s$h$a56.196581%\"><$n$f\"$l$r$kno\"$o\/\/widgets.ign.com\/video\/embed\/content.html?url={@id}\"$h$b\/><\/$s><\/$s>$g$dIMDB\"><$s$eimdb\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.imdb.com\/video\/imdb\/vi{@id}\/imdb\/embed?autoplay=false&width=640\"$h$b\/><\/$s><\/$s>$g$dIMG\"><img$o{@src}\" title=\"{@title}\" alt=\"{@alt}\"><xsl:copy-of select=\"@height|@width\"\/><\/img>$g$dIMGUR\"><$n$eimgur\"$f\"$p$z$l$r onload=\"var c=new MessageChannel;c.port1.onmessage=function(e){{var d=e.data.split(' ');style.height=d[0]+'px';style.width=d[1]+'px'}};contentWindow.postMessage('s9e:init','https:\/\/s9e.github.io',[c.port2])\"$kno\"$hborder:0;height:400px;max-width:100%;width:542px\"><$m$wsrc\">https:\/\/s9e.github.io\/$n\/2\/imgur.min.html#<xsl:if$q@type='album'\">a\/<\/xsl:if>$i@id\"\/><\/$m><\/$n>$g$dINDIEGOGO\"><$s$eindiegogo\"$h$c222px\"><$s$h$a200.45045%\"><$n$f\"$l$r$kno\"$o\/\/www.indiegogo.com\/project\/{@id}\/embedded\"$h$b\/><\/$s><\/$s>$g$dINSTAGRAM\"><$n$einstagram\"$f\"$p$z$l$r onload=\"$j$kno\"$ohttps:\/\/s9e.github.io\/$n\/2\/instagram.min.html#{@id}\"$hbackground:url(https:\/\/www.instagram.com\/static\/images\/ico\/favicon.svg\/fc72dd4bfde8.svg) no-repeat 50% 50% \/ 50%;border:0;height:540px;max-width:540px;width:100%\"\/>$g$dINTERNETARCHIVE\"><$x><$u$qcontains(@id,'playlist=1')\"><$n$einternetarchive\"$f\"$l$r$kno\"$ohttps:\/\/archive.org\/embed\/{@id}&list_height=150\"$hborder:0;height:170px;max-width:640px;width:100%\"\/><\/$u><$t><$s$einternetarchive\"$h$c{@width}px\"><$s><$m$w$z>display:block;overflow:hidden;position:relative;<xsl:if$q@width>0\">padding-bottom:$i100*@height div@width\"\/>%<\/xsl:if><\/$m><$n$f\"$l$r$kno\"$ohttps:\/\/archive.org\/embed\/{@id}\"$h$b\/><\/$s><\/$s><\/$t><\/$x>$g$dISPOILER\"><$s class=\"spoiler\"$pclass\" onclick=\"removeAttribute('class')\">$v<\/$s>$g$dIZLESENE\"><$s$eizlesene\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.izlesene.com\/embedplayer\/{@id}?autoplay=0\"$h$b\/><\/$s><\/$s>"+"$g$dJSFIDDLE\"><$n$ejsfiddle\"$f\"$l$r$kno\"$o\/\/jsfiddle.net\/{@id}\/{@revision}\/embedded\/{$MEDIAEMBED_THEME}\/\"$hborder:0;height:400px;width:100%\"\/>$g$dJWPLATFORM\"><$s$ejwplatform\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/content.jwplatform.com\/players\/{@id}.html\"$h$b\/><\/$s><\/$s>$g$dKALTURA\"><$s$ekaltura\"$h$c640px\"><$s$h$a61.875%;padding-bottom:calc(56.25% + 36px)\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">https:\/\/cdnapisec.kaltura.com\/p\/$i@partner_id\"\/>\/sp\/<$x><$u$q@sp\">$i@sp\"\/><\/$u><$t>$i@partner_id\"\/>00<\/$t><\/$x>\/embedIframeJs\/uiconf_id\/$i@uiconf_id\"\/>\/partner_id\/$i@partner_id\"\/>?$nembed=true&entry_id=$i@entry_id\"\/><\/$m><\/$n><\/$s><\/$s>$g$dKHL\"><$s$ekhl\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/video.khl.ru\/$n\/feed\/start\/{@id}?type_id=18&width=560&height=315\"$h$b\/><\/$s><\/$s>$g$dKICKSTARTER\"><$s$ekickstarter\"><$x><$u$q@video\"><$m$w$z>$c640px<\/$m><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.kickstarter.com\/projects\/{@id}\/widget\/video.html\"$h$b\/><\/$s><\/$u><$t><$m$w$z>$c220px<\/$m><$s$h$a190.909091%\"><$n$f\"$l$r$kno\"$o\/\/www.kickstarter.com\/projects\/{@id}\/widget\/card.html\"$h$b\/><\/$s><\/$t><\/$x><\/$s>$g$dLIBSYN\"><$n$elibsyn\"$f\"$l$r$kno\"$o\/\/html5-player.libsyn.com\/embed\/episode\/id\/{@id}
55\/thumbnail\/no\"$hborder:0;height:90px;max-width:900px;width:100%\"\/>$g$dLIST\"><$x><$u$qnot(@type)\"><ul>$v<\/ul><\/$u><$u$qstarts-with(@type,'decimal')or starts-with(@type,'lower')or starts-with(@type,'upper')\"><ol$hlist-style-type:{@type}\"><xsl:copy-of select=\"@start\"\/>$v<\/ol><\/$u><$t><ul$hlist-style-type:{@type}\">$v<\/ul><\/$t><\/$x>$g$dLIVELEAK\"><$s$eliveleak\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.liveleak.com\/e\/{@id}\"$h$b\/><\/$s><\/$s>$g$dLIVESTREAM\"><$s$elivestream\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">\/\/<$x><$u$q@clip_id\">cdn.livestream.com\/embed\/$i@channel\"\/>?layout=4&autoplay=false&clip=$i@clip_id\"\/><\/$u><$t>livestream.com\/accounts\/$i@account_id\"\/>\/events\/$i@event_id\"\/><xsl:if$q@video_id\">\/videos\/$i@video_id\"\/><\/xsl:if>\/player?autoPlay=false<\/$t><\/$x><\/$m><\/$n><\/$s><"+"\/$s>$g$dMAILRU\"><$s$emailru\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$ohttps:\/\/my.mail.ru\/video\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dMEDIUM\"><$n$emedium\"$f\"$p$z$l$r onload=\"$j$kno\"$ohttps:\/\/s9e.github.io\/$n\/2\/medium.min.html#{@id}\"$hborder:0;height:316px;max-width:900px;width:100%\"\/>$g$dMEGAPHONE\"><$n$emegaphone\"$f\"$l$r$kno\"$hborder:0;height:200px;max-width:900px;width:100%\"><$m$wsrc\">https:\/\/player.megaphone.fm\/$i@id\"\/><xsl:if$q$MEDIAEMBED_THEME='light'\">?light=true<\/xsl:if><\/$m><\/$n>$g$dMETACAFE\"><$s$emetacafe\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.metacafe.com\/embed\/{@id}\/\"$h$b\/><\/$s><\/$s>$g$dMIXCLOUD\"><$s$emixcloud\"$h$c400px\"><$s$h$a100%\"><$n$f\"$l$r$kno\"$o\/\/www.mixcloud.com\/widget\/$n\/?feed=http%3A%2F%2Fwww.mixcloud.com%2F{@id}%2F&embed_type=widget_standard\"$h$b\/><\/$s><\/$s>$g$dMIXER\"><$s$emixer\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">https:\/\/mixer.com\/embed\/player\/$i@channel\"\/><xsl:if$q@vod\">?vod=$i@vod\"\/><\/xsl:if><\/$m><\/$n><\/$s><\/$s>$g$dMLB\"><$s$emlb\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$ohttps:\/\/www.mlb.com\/video\/share\/c-{@id}\"$h$b\/><\/$s><\/$s>$g$dMRCTV\"><$s$emrctv\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$ohttps:\/\/www.mrctv.org\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dMSNBC\"><$s$emsnbc\"$h$c640px\"><$s><$x><$u$qcontains(@id,'_')\"><$m$w$z>$a68.75%;padding-bottom:calc(56.25% + 80px)<\/$m><$n$f\"$l$r$kno\"$o\/\/player.theplatform.com\/p\/7wvmTC\/MSNBCEmbeddedOffSite?guid={@id}\"$h$b\/><\/$u><$t><$m$w$z>$a56.25%<\/$m><$n$f\"$l$r$kno\"$ohttps:\/\/www.msnbc.com\/msnbc\/embedded-video\/{@id}\"$h$b\/><\/$t><\/$x><\/$s><\/$s>$g$dNATGEOCHANNEL\"><$s$enatgeochannel\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/channel.nationalgeographic.com\/{@id}\/embed\/\"$h$b\/><\/$s><\/$s>$g$dNATGEOVIDEO\"><$s$enatgeovideo\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/player.d.nationalgeographic.com\/players\/ngsvideo\/share\/?guid={@id}\"$h$b\/><\/$s><\/$s>$g$dNBCNEWS\"><$s$enbcnews\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.nbcnews.com\/widget\/video-embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dNBCSPORTS\"><$s$enbcspor"+"ts\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/vplayer.nbcsports.com\/p\/BxmELC\/nbcsports_embed\/select\/media\/{@id}?parentUrl=\"$h$b\/><\/$s><\/$s>$g$dNHL\"><$s$enhl\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">https:\/\/www.nhl.com\/video\/embed<xsl:if$q@t\">\/t-$i@t\"\/><\/xsl:if><xsl:if$q@c\">\/c-$i@c\"\/><\/xsl:if>?autostart=false<\/$m><\/$n><\/$s><\/$s>$g$dNPR\"><$n$enpr\"$f\"$l$r$kno\"$o\/\/www.npr.org\/player\/embed\/{@i}\/{@m}\"$hborder:0;height:228px;max-width:800px;width:100%\"\/>$g$dNYTIMES\"><$s$enytimes\"$h$c585px\"><$s$h$a68.376068%\"><$n$f\"$l$r$kno\"$o\/\/graphics8.nytimes.com\/video\/players\/offsite\/index.html?videoId={@id}\"$h$b\/><\/$s><\/$s>$g$dORFIUM\"><$n$eorfium\"$f\"$l$r$kno\"><$m$wsrc\">https:\/\/www.orfium.com\/embedded\/<$x><$u$q@album_id\">album\/$i@album_id\"\/><\/$u><$u$q@playlist_id\">playlist\/$i@playlist_id\"\/><\/$u><$u$q@set_id\">live-set\/$i@set_id\"\/><\/$u><$t>track\/$i@track_id\"\/><\/$t><\/$x><\/$m><$m$w$z>border:0;height:<$x><$u$q@album_id\">550<\/$u><$t>275<\/$t><\/$x>px;max-width:900px;width:100%<\/$m><\/$n>$g$dPASTEBIN\"><$n$epastebin\"$f\"$l$r$k\"$o\/\/pastebin.com\/embed_$n.php?i={@id}\"$hborder:0;height:300px;resize:vertical;width:100%\"\/>$g$dPINTEREST\"><$n$epinterest\"$f\"$p$z$l$r onload=\"$j$kno\"$ohttps:\/\/s9e.github.io\/$n\/2\/pinterest.min.html#{@id}\"><$m$w$z>border:0;height:360px;max-width:<$x><$u$qcontains(@id,'\/')\">730<\/$u><$t>345<\/$t><\/$x>px;width:100%<\/$m><\/$n>$g$dPODBEAN\"><$n$epodbean\"$f\"$l$r$kno\"$o\/\/www.podbean.com\/media\/player\/{@id}\"$hborder:0;height:100px;max-width:900px;width:100%\"\/>$g$dPOSTMENTION\"><a href=\"{$DISCUSSION_URL}
55{@discussionid}\/{@number}\" class=\"PostMention\" data-id=\"{@id}\">$i@displayname\"\/><\/a>$g$dPREZI\"><$s$eprezi\"$h$c550px\"><$s$h$a72.727273%\"><$n$f\"$l$r$kno\"$o\/\/prezi.com\/embed\/{@id}\/\"$h$b\/><\/$s><\/$s>$g$dQUOTE\"><blockquote><xsl:if$qnot(@author)\"><$m$wclass\">uncited<\/$m><\/xsl:if><div><xsl:if$q@author\"><cite>$i@author\"\/> wrote:<\/cite><\/xsl:if>$v<\/div><\/blockquote>$g$dREDDIT\"><$n$ereddit\"$f\"$p$z$l$r onload=\"$j$kno\"$ohttps:\/\/s9e.github.io\/$n\/2\/reddit.min.html#{@id}{@path}\"$hborder:0;hei"+"ght:165px;max-width:800px;width:100%\"\/>$g$dRUMBLE\"><$s$erumble\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$ohttps:\/\/rumble.com\/embed\/{@id}\/\"$h$b\/><\/$s><\/$s>$g$dRUTUBE\"><$s$erutube\"$h$c720px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/rutube.ru\/play\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dSCRIBD\"><$n$escribd\"$f\"$l$r$kno\"$ohttps:\/\/www.scribd.com\/embeds\/{@id}\/content?view_mode=scroll&show_recommendations=false\"$hborder:0;height:500px;resize:vertical;width:100%\"\/>$g$dSENDVID\"><$s$esendvid\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/sendvid.com\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dSIZE\"><$s$hfont-size:{@size}px\">$v<\/$s>$g$dSLIDESHARE\"><$s$eslideshare\"$h$c427px\"><$s$h$a83.372365%\"><$n$f\"$l$r$kno\"$o\/\/www.slideshare.net\/slideshow\/embed_code\/{@id}\"$h$b\/><\/$s><\/$s>$g$dSOUNDCLOUD\"><$n$esoundcloud\"$f\"$l$r$kno\"><$m$wsrc\">https:\/\/w.soundcloud.com\/player\/?url=<$x><$u$q@playlist_id\">https%3A\/\/api.soundcloud.com\/playlists\/$i@playlist_id\"\/><\/$u><$u$q@track_id\">https%3A\/\/api.soundcloud.com\/tracks\/$i@track_id\"\/>&secret_token=$i@secret_token\"\/><\/$u><$t><xsl:if$qnot(contains(@id,':\/\/'))\">https%3A\/\/soundcloud.com\/<\/xsl:if>$i@id\"\/><\/$t><\/$x><\/$m><$m$w$z>border:0;height:<$x><$u$q@playlist_id or contains(@id,'\/sets\/')\">450<\/$u><$t>166<\/$t><\/$x>px;max-width:900px;width:100%<\/$m><\/$n>$g$dSPOILER\"><details class=\"spoiler\"$popen\">$v<\/details>$g$dSPORCLE\"><$n$esporcle\"$f\"$p$z$l$r onload=\"var c=new MessageChannel;c.port1.onmessage=function(e){{style.height=e.data+'px'}};contentWindow.postMessage('s9e:init','*',[c.port2])\"$kno\"$ohttps:\/\/s9e.github.io\/$n\/2\/sporcle.min.html#{@id}\"$hborder:0;height:535px;max-width:820px;width:100%\"\/>$g$dSPORTSNET\"><$s$esportsnet\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/players.brightcove.net\/1704050871\/rkedLxwfab_default\/index.html?videoId={@id}\"$h$b\/><\/$s><\/$s>$g$dSPOTIFY\"><$x><$u$qstarts-with(@id,'episode\/')or starts-with(@id,'show\/')\"><$n$espotify\" allow=\"encrypted-media\"$f\"$l$r$kno\"$ohttps:\/\/open.spotify.com\/embed\/{@id}\"$hborder:0;height:152px;max-width:900px;width:100%\"\/><\/"+"$u><$t><$s$espotify\"$h$c320px\"><$s$h$a125%;padding-bottom:calc(100% + 80px)\"><$n allow=\"encrypted-media\"$f\"$l$r$kno\"$ohttps:\/\/open.spotify.com\/embed\/{translate(@id,':','\/')}{@path}\"$h$b\/><\/$s><\/$s><\/$t><\/$x>$g$dSPREAKER\"><$n$espreaker\"$f\"$l$r$kno\"$ohttps:\/\/widget.spreaker.com\/player?episode_id={@episode_id}&show_id={@show_id}&theme={$MEDIAEMBED_THEME}\"$hborder:0;height:{400-200*boolean(@episode_id)}px;max-width:900px;width:100%\"\/>$g$dSTEAMSTORE\"><$n$esteamstore\"$f\"$l$r$kno\"$o\/\/store.steampowered.com\/widget\/{@id}\"$hborder:0;height:190px;max-width:900px;width:100%\"\/>$g$dSTITCHER\"><$n$estitcher\"$f\"$l$r$kno\"$ohttps:\/\/www.stitcher.com\/embed\/{@fid}\/{@eid}\"$hborder:0;height:150px;max-width:900px;width:100%\"\/>$g$dSTRAWPOLL\"><$s$estrawpoll\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$k\"$o\/\/www.strawpoll.me\/embed_1\/{@id}\"$h$b\/><\/$s><\/$s>$g$dSTREAMABLE\"><$s$estreamable\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/streamable.com\/e\/{@id}\"$h$b\/><\/$s><\/$s>$g$dSTREAMJA\"><$s$estreamja\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$ohttps:\/\/streamja.com\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dTD\"><td><xsl:if$q@align\"><$m$w$z>text-align:$i@align\"\/><\/$m><\/xsl:if>$v<\/td>$g$dTEAMCOCO\"><$s$eteamcoco\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/teamcoco.com\/embed\/v\/{@id}\"$h$b\/><\/$s><\/$s>$g$dTED\"><$s$eted\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">\/\/embed.ted.com\/$i@id\"\/><xsl:if$qnot(contains(@id,'.html'))\">.html<\/xsl:if><\/$m><\/$n><\/$s><\/$s>$g$dTELEGRAM\"><$n$etelegram\"$f\"$p$z$l$r onload=\"$j$kno\"$ohttps:\/\/s9e.github.io\/$n\/2\/telegram.min.html#{@id}\"$hborder:0;height:96px;max-width:500px;width:100%\"\/>$g$dTH\"><th><xsl:if$q@align\"><$m$w$z>text-align:$i@align\"\/><\/$m><\/xsl:if>$v<\/th>
55$g$dTHEATLANTIC\"><$s$etheatlantic\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.theatlantic.com\/video\/$n\/{@id}\/\"$h$b\/><\/$s><\/$s>$g$dTHEGUARDIAN\"><$s$etheguardian\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/embed.theguardian.com\/embed\/video\/{@id}\"$h$b\/><\/$s><\/$s>$g$dTHEONION\"><$s$etheonion\"$h$c640px\"><$s$h$a56.25%\">"+"<$n$f\"$l$r$kno\"$o\/\/www.theonion.com\/video_embed\/?id={@id}\"$h$b\/><\/$s><\/$s>$g$dTIKTOK\"><$s$etiktok\"$h$c340px\"><$s$h$a205.882353%\"><$n$f\"$l$r$kno\"$o\/\/www.tiktok.com\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dTMZ\"><$s$etmz\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.kaltura.com\/index.php\/kwidget\/cache_st\/133592691\/wid\/_591531\/partner_id\/591531\/uiconf_id\/9071262\/entry_id\/{@id}\"$h$b\/><\/$s><\/$s>$g$dTRADINGVIEW\"><$n$etradingview\"$f\"$l$r$kno\"$hborder:0;height:400px;width:100%\"><$m$wsrc\">https:\/\/s.tradingview.com\/<$x><$u$q@symbol\">widgetembed\/?interval=D&symbol=$itranslate(@symbol,'-',':')\"\/><\/$u><$t>embed\/$i@chart\"\/><\/$t><\/$x><\/$m><\/$n>$g$dTRAILERADDICT\"><$s$etraileraddict\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/v.traileraddict.com\/{@id}\"$h$b\/><\/$s><\/$s>$g$dTRENDINGVIEWS\"><$s$etrendingviews\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$ohttps:\/\/trendingviews.co\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dTUMBLR\"><$n$etumblr\"$f\"$p$z$l$r onload=\"$j$kno\"$ohttps:\/\/s9e.github.io\/$n\/2\/tumblr.min.html#{@key}\/{@id}\"$hborder:0;height:300px;max-width:520px;width:100%\"\/>$g$dTWENTYFOURSEVENSPORTS\"><$x><$u$q@video_id\"><$s$etwentyfoursevensports\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$ohttps:\/\/www.cbssports.com\/video\/player\/embed?args=player_id%3D{@video_id}%26channel%3Dmobilevideo%26pcid%3D{@video_id}%26width%3D640%26height%3D360%26autoplay%3Dfalse%26comp_ads_enabled%3Dfalse%26uvpc%3Dhttp%3A%2F%2Fsports.cbsimg.net%2Fvideo%2Fuvp%2Fconfig%2Fv4%2Fuvp_247sports.xml%26uvpc_m%3Dhttp%3A%2F%2Fsports.cbsimg.net%2Fvideo%2Fuvp%2Fconfig%2Fv4%2Fuvp_247sports_m.xml%26partner%3D247%26partner_m%3D247_mobile%26utag%3D247sportssite%26resizable%3Dtrue\"$h$b\/><\/$s><\/$s><\/$u><$t><$n$etwentyfoursevensports\"$f\"$l$r onload=\"window.addEventListener('message',function(e){{if(e.source===this.contentWindow&&e.data.height)this.style.height=e.data.height+'px'}})\"$kno\"$ohttps:\/\/247sports.com\/PlayerSport\/{@player_id}\/Embed\/\"$hborder:0;height:200px;max-width:600px;width:100%\"\/><\/$t><\/$x>$g$dTWITCH\"><$s$etwitch\"$h$c640px\"><"+"$s$h$a56.25%\"><$n$f\"$l$r onload=\"contentWindow.postMessage('','https:\/\/s9e.github.io')\"$kno\"$ohttps:\/\/s9e.github.io\/$n\/2\/twitch.min.html#channel={@channel};clip_id={@clip_id};t={@t};video_id={@video_id}\"$h$b\/><\/$s><\/$s>$g$dTWITTER\"><$n$etwitter\" allow=\"autoplay *\"$f\"$p$z$l$r onload=\"$j$kno\"$ohttps:\/\/s9e.github.io\/$n\/2\/twitter.min.html#{@id}{$MEDIAEMBED_THEME}\"$hborder:0;height:250px;max-width:550px;width:100%\"\/>$g$dURL\"><a href=\"{@url}\" rel=\" nofollow ugc\"><xsl:copy-of select=\"@title\"\/>$v<\/a>$g$dUSERMENTION\"><a href=\"{$PROFILE_URL}{@username}\" class=\"UserMention\">@$i@displayname\"\/><\/a>$g$dUSTREAM\"><$s$eustream\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">\/\/www.ustream.tv\/embed\/<$x><$u$q@vid\">recorded\/$i@vid\"\/><\/$u><$t>$i@cid\"\/><\/$t><\/$x>?html5ui<\/$m><\/$n><\/$s><\/$s>$g$dVBOX7\"><$s$evbox7\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/vbox7.com\/emb\/external.php?vid={@id}\"$h$b\/><\/$s><\/$s>$g$dVEOH\"><$s$eveoh\"$h$c640px\"><$s$h$a62.5%;padding-bottom:calc(56.25% + 40px)\"><object data=\"\/\/www.veoh.com\/swf\/webplayer\/WebPlayer.swf?version=AFrontend.5.7.0.1509&permalinkId=v{@id}&player=videodetailsembedded&videoAutoPlay=0&id=anonymous\"$h$y type=\"application\/x-shockwave-flash\" typemustmatch=\"\"><param$wallowfullscreen\" value=\"true\"\/><\/object><\/$s><\/$s>$g$dVEVO\"><$s$evevo\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$ohttps:\/\/embed.vevo.com\/?isrc={@id}\"$h$b\/><\/$s><\/$s>$g$dVIDEO\"><video controls=\"\"$o{@src}\"\/>$g$dVIDEODETECTIVE\"><$s$evideodetective\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.videodetective.com\/embed\/video\/?options=false&autostart=false&playlist=none&publishedid={@id}\"$h$b\/><\/$s><\/$s>$g$dVIMEO\"><$s$evimeo\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$h$b><$m$wsrc\">\/\/player.vimeo.com\/video\/$i@id\"\/><xsl:if$q@t\">#t=$i@t\"\/><\/xsl:if><\/$m><\/$n><\/$s><\/$s>$g$dVINE\"><$s$evine\"$h$c480px\"><$s$h$a100%\"><$n$f\"$l$r$kno\"$ohttps:\/\/vine.co\/v\/{@id}\/embed\/simple?audio=1\"$h$b\/><\/$s><\/$s>$g$dVK\"><$s$evk\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/vk.com\/v"+"ideo_ext.php?oid={@oid}&id={@vid}&hash={@hash}&hd=1\"$h$b\/><\/$s><\/$s>$g$dVOCAROO\"><$s$evocaroo\"><$x><$u$qstarts-with(@id,'s0')or starts-with(@id,'s1')\"><$m$w$z>$c148px<\/$m><$s$h$a29.72973%\"><object data=\"\/\/vocaroo.com\/player.swf?playMediaID={@id}&autoplay=0\"$h$y type=\"application\/x-shockwave-flash\" typemustmatch=\"\"><param$wallowfullscreen\" value=\"true\"\/><\/object><\/$s><\/$u><$t><$m$w$z>$c300px<\/$m><$s$h$a20%\"><$n$f\"$l$r$kno\"$ohttps:\/\/vocaroo.com\/embed\/{@id}\"$h$b\/><\/$s><\/$t><\/$x><\/$s>$g$dVOX\"><$s$evox\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/player.ooyala.com\/$n.html#pbid=a637d53c5c0a43c7bf4e342886b9d8b0&ec={@id}\"$h$b\/><\/$s><\/$s>$g$dWASHINGTONPOST\"><$s$ewashingtonpost\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/www.washingtonpost.com\/video\/c\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dWISTIA\"><$x><$u$q@type='audio'\"><$n$ewistia\"$f\"$l$r$kno\"$ohttps:\/\/fast.wistia.net\/embed\/$n\/{@id}\"$hborder:0;height:218px;max-width:900px;width:100%\"\/><\/$u><$t><$s$ewistia\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$ohttps:\/\/fast.wistia.net\/embed\/$n\/{@id}\"$h$b\/><\/$s><\/$s><\/$t><\/$x>$g$dWSHH\"><$s$ewshh\"$h$c640px\"><$s$h$a56.25%\">
55<$n$f\"$l$r$kno\"$o\/\/www.worldstarhiphop.com\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dWSJ\"><$s$ewsj\"$h$c512px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/video-api.wsj.com\/api-video\/player\/$n.html?guid={@id}\"$h$b\/><\/$s><\/$s>$g$dXBOXCLIPS\"><$s$exboxclips\"$h$c560px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/gameclips.io\/{@user}\/{@id}\/embed\"$h$b\/><\/$s><\/$s>$g$dXBOXDVR\"><$s$exboxdvr\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/gamerdvr.com\/gamer\/{@user}\/video\/{@id}\/embed\"$h$b\/><\/$s><\/$s>$g$dYOUKU\"><$s$eyouku\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$o\/\/player.youku.com\/embed\/{@id}\"$h$b\/><\/$s><\/$s>$g$dYOUTUBE\"><$s$eyoutube\"$h$c640px\"><$s$h$a56.25%\"><$n$f\"$l$r$kno\"$hbackground:url(https:\/\/i.ytimg.com\/vi\/{@id}\/hqdefault.jpg) 50% 50% \/ cover;$b><$m$wsrc\">https:\/\/www.youtube.com\/embed\/$i@id\"\/><xsl:if$q@list\">?list=$i@list\"\/><\/xsl:if><xsl:if$q@t\"><$x><$u$q@list\">&<\/$u><$t>?<\/$t><\/$x>start=$i"+"@t\"\/><\/xsl:if><\/$m><\/$n><\/$s><\/$s>$g$dbr\"><br\/>$g$de|i|s\"\/><\/xsl:stylesheet>").replace(/\$[a-z]/g,function(k){return{"$a":"display:block;overflow:hidden;position:relative;padding-bottom:","$b":"border:0;height:100%;left:0;position:absolute;width:100%\"","$c":"display:inline-block;width:100%;max-width:","$d":"<xsl:template match=\"","$e":" data-s9e-mediaembed=\"","$f":" allowfullscreen=\"","$g":"<\/xsl:template>","$h":" style=\"","$i":"<xsl:value-of select=\"","$j":"var c=new MessageChannel;c.port1.onmessage=function(e){{style.height=e.data+'px'}};contentWindow.postMessage('s9e:init','https:\/\/s9e.github.io',[c.port2])\"","$k":" scrolling=\"","$l":" loading=\"","$m":"xsl:attribute","$n":"iframe","$o":" src=\"","$p":" data-s9e-livepreview-ignore-attrs=\"","$q":" test=\"","$r":"lazy\"","$s":"span","$t":"xsl:otherwise","$u":"xsl:when","$v":"<xsl:apply-templates\/>","$w":" name=\"","$x":"xsl:choose","$y":"height:100%;left:0;position:absolute;width:100%\"","$z":"style\""}[k]});var EmailFilter={filter:function(attrValue){return/^[-\w.+]+@[-\w.]+$/.test(attrValue)?attrValue:!1}};var FalseFilter={filter:function(attrValue){return!1}};var HashmapFilter={filter:function(attrValue,map,strict){if(attrValue in map){return map[attrValue]} 56return(strict)?!1:attrValue}};var MapFilter={filter:function(attrValue,map){var i=-1,cnt=map.length;while(++i<cnt){if(map[i][0].test(attrValue)){return map[i][1]}} 57return attrValue}};var NetworkFilter={filterIp:function(attrValue){if(/^[\d.]+$/.test(attrValue)){return NetworkFilter.filterIpv4(attrValue)} 58if(/^[\da-f:]+$/i.test(attrValue)){return NetworkFilter.filterIpv6(attrValue)} 59return!1},filterIpport:function(attrValue){var m,ip;if(m=/^\[([\da-f:]+)(\]:[1-9]\d*)$/i.exec(attrValue)){ip=NetworkFilter.filterIpv6(m[1]);if(ip===!1){return!1} 60return'['+ip+m[2]} 61if(m=/^([\d.]+)(:[1-9]\d*)$/.exec(attrValue)){ip=NetworkFilter.filterIpv4(m[1]);if(ip===!1){return!1} 62return ip+m[2]} 63return!1},filterIpv4:function(attrValue){if(!/^\d+\.\d+\.\d+\.\d+$/.test(attrValue)){return!1} 64var i=4,p=attrValue.split('.');while(--i>=0){if(p[i][0]==='0'||p[i]>255){return!1}} 65return attrValue},filterIpv6:function(attrValue){return/^([\da-f]{0,4}:){2,7}(?:[\da-f]{0,4}|\d+\.\d+\.\d+\.\d+)$/.test(attrValue)?attrValue:!1}};var NumericFilter={filterFloat:function(attrValue){return/^(?:0|-?[1-9]\d*)(?:\.\d+)?(?:e[1-9]\d*)?$/i.test(attrValue)?attrValue:!1},filterInt:function(attrValue){return/^(?:0|-?[1-9]\d*)$/.test(attrValue)?attrValue:!1},filterRange:function(attrValue,min,max,logger){if(!/^(?:0|-?[1-9]\d*)$/.test(attrValue)){return!1} 66attrValue=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})} 67return min} 68if(attrValue>max){if(logger){logger.warn('Value outside of range, adjusted down to max value',{'attrValue':attrValue,'min':min,'max':max})} 69return max} 70return attrValue},filterUint:function(attrValue){return/^(?:0|[1-9]\d*)$/.test(attrValue)?attrValue:!1}};var RegexpFilter={filter:function(attrValue,regexp){return regexp.test(attrValue)?attrValue:!1}};var TimestampFilter={filter:function(attrValue){var m=/^(?=\d)(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(attrValue);if(m){return 3600*(m[1]||0)+60*(m[2]||0)+(+m[3]||0)} 71return NumericFilter.filterUint(attrValue)}};
71var UrlFilter={filter:function(attrValue,urlConfig,logger){var p=UrlFilter.parseUrl(attrValue.replace(/^\s+/,'').replace(/\s+$/,''));var error=UrlFilter.validateUrl(urlConfig,p);if(error){if(logger){p.attrValue=attrValue;logger.err(error,p)} 72return!1} 73return UrlFilter.rebuildUrl(urlConfig,p)},parseUrl:function(url){var regexp=/^(?:([a-z][-+.\w]*):)?(?:\/\/(?:([^:\/?#]*)(?::([^\/?#]*)?)?@)?(?:(\[[a-f\d:]+\]|[^:\/?#]+)(?::(\d*))?)?(?![^\/?#]))?([^?#]*)(\?[^#]*)?(#.*)?$/i;var m=regexp.exec(url),parts={},tokens=['scheme','user','pass','host','port','path','query','fragment'];tokens.forEach(function(name,i){parts[name]=(m[i+1]>'')?m[i+1]:''});parts.scheme=parts.scheme.toLowerCase();parts.host=parts.host.replace(/[\u3002\uff0e\uff61]/g,'.').replace(/\.+$/g,'');if(/[^\x00-\x7F]/.test(parts.host)&&typeof punycode!=='undefined'){parts.host=punycode.toASCII(parts.host)} 74return parts},rebuildUrl:function(urlConfig,p){var url='';if(p.scheme!==''){url+=p.scheme+':'} 75if(p.host!==''){url+='//';if(p.user!==''){url+=rawurlencode(decodeURIComponent(p.user));if(p.pass!==''){url+=':'+rawurlencode(decodeURIComponent(p.pass))} 76url+='@'} 77url+=p.host;if(p.port!==''){url+=':'+p.port}}else if(p.scheme==='file'){url+='//'} 78var 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')} 79return url}
79,sanitizeUrl:function(url){return url.replace(/[^\u0020-\u007E]+/g,encodeURIComponent).replace(/%(?![0-9A-Fa-f]{2})|[^!#-&*-;=?-Z_a-z~]/g,escape)},validateUrl:function(urlConfig,p){if(p.scheme!==''&&!urlConfig.allowedSchemes.test(p.scheme)){return'URL scheme is not allowed'} 80if(p.host!==''){var regexp=/^(?!-)[-a-z0-9]{0,62}[a-z0-9](?:\.(?!-)[-a-z0-9]{0,62}[a-z0-9])*$/i;if(!regexp.test(p.host)){if(!NetworkFilter.filterIpv4(p.host)&&!NetworkFilter.filterIpv6(p.host.replace(/^\[(.*)\]$/,'$1',p.host))){return'URL host is invalid'}} 81if((urlConfig.disallowedHosts&&urlConfig.disallowedHosts.test(p.host))||(urlConfig.restrictedHosts&&!urlConfig.restrictedHosts.test(p.host))){return'URL host is not allowed'}}else if(/^(?:(?:f|ht)tps?)$/.test(p.scheme)){return'Missing host'}}};function html_entity_decode(str){var b=document.createElement('b');html_entity_decode=function(str){b.innerHTML=str.replace(/</g,'<');return b.textContent};return html_entity_decode(str)} 82function htmlspecialchars_compat(str){var t={'<':'<','>':'>','&':'&','"':'"'};return str.replace(/[<>&"]/g,function(c){return t[c]})} 83function htmlspecialchars_noquotes(str){var t={'<':'<','>':'>','&':'&'};return str.replace(/[<>&]/g,function(c){return t[c]})} 84function rawurlencode(str){return encodeURIComponent(str).replace(/[!'()*]/g,function(c){return'%'+c.charCodeAt(0).toString(16).toUpperCase()})} 85function returnFalse(){return!1} 86function returnTrue(){return!0} 87function executeAttributePreprocessors(tag,tagConfig){if(typeof tagConfig.attributePreprocessors==='undefined'){return} 88tagConfig.attributePreprocessors.forEach(function(ap){var attrName=ap[0],regexp=ap[1],map=ap[2];if(tag.hasAttribute(attrName)){executeAttributePreprocessor(tag,attrName,regexp,map)}})} 89function filterAttributes(tag,tagConfig,registeredVars,logger){var attributes={},attrName;for(attrName in tagConfig.attributes){var attrConfig=tagConfig.attributes[attrName],attrValue=!1;if(tag.hasAttribute(attrName)){attrValue=executeAttributeFilterChain(attrConfig.filterChain,attrName,tag.getAttribute(attrName))} 90if(attrValue!==!1){attributes[attrName]=attrValue}else if(HINT.attributeDefaultValue&&typeof attrConfig.defaultValue!=='undefined'){attributes[attrName]=attrConfig.defaultValue}else if(attrConfig.required){tag.invalidate()}} 91tag.setAttributes(attributes)} 92function filterTag(tag){var tagName=tag.getName(),tagConfig=tagsConfig[tagName];logger.setTag(tag);for(var i=0;i<tagConfig.filterChain.length;++i){if(tag.isInvalid()){break} 93tagConfig.filterChain[i](tag,tagConfig)} 94logger.unsetTag()} 95function executeAttributeFilterChain(filterChain,attrName,attrValue){logger.setAttribute(attrName);for(var i=0;i<filterChain.length;++i){attrValue=filterChain[i](attrValue,attrName);if(attrValue===!1){break}} 96logger.unsetAttribute();return attrValue} 97function executeAttributePreprocessor(tag,attrName,regexp,map){var attrValue=tag.getAttribute(attrName),captures=getNamedCaptures(attrValue,regexp,map),k;for(k in captures){if(k===attrName||!tag.hasAttribute(k)){tag.setAttribute(k,captures[k])}}} 98function getNamedCaptures(attrValue,regexp,map){var m=regexp.exec(attrValue);if(!m){return[]} 99var values={};map.forEach(function(k,i){if(typeof m[i]==='string'&&m[i]!==''){values[k]=m[i]}});return values} 100function 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()}} 101Tag.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);
101if(this.invalid){tag.invalidate()}};Tag.prototype.invalidate=function(){if(!this.invalid){this.invalid=!0;this.cascade.forEach(function(tag){tag.invalidate()})}};Tag.prototype.pairWith=function(tag){if(this.canBePaired(this,tag)){this.endTag=tag;tag.startTag=this;this.cascadeInvalidationTo(tag)}else if(this.canBePaired(tag,this)){this.startTag=tag;tag.endTag=this}};Tag.prototype.canBePaired=function(startTag,endTag){return startTag.name===endTag.name&&startTag.type===Tag.START_TAG&&endTag.type===Tag.END_TAG&&startTag.pos<=startTag.pos};Tag.prototype.removeFlags=function(flags){this.flags&=~flags};Tag.prototype.setFlags=function(flags){this.flags=flags};Tag.prototype.getAttributes=function(){var attributes={};for(var attrName in this.attributes){attributes[attrName]=this.attributes[attrName]} 102return 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} 103return!0};Tag.prototype.isBrTag=function(){return(this.name==='br')};Tag.prototype.isEndTag=function(){return!!(this.type&Tag.END_TAG)};Tag.prototype.isIgnoreTag=function(){return(this.name==='i')};Tag.prototype.isInvalid=function(){return this.invalid};Tag.prototype.isParagraphBreak=function(){return(this.name==='pb')};Tag.prototype.isSelfClosingTag=function(){return(this.type===Tag.SELF_CLOSING_TAG)};Tag.prototype.isSystemTag=function(){return('br i pb v'.indexOf(this.name)>-1)};Tag.prototype.isStartTag=function(){return!!(this.type&Tag.START_TAG)};Tag.prototype.isVerbatim=function(){return(this.name==='v')};Tag.prototype.getAttribute=function(attrName){return this.attributes[attrName]};Tag.prototype.hasAttribute=function(attrName){return(attrName in this.attributes)};Tag.prototype.removeAttribute=function(attrName){delete this.attributes[attrName]};Tag.prototype.setAttribute=function(attrName,attrValue){this.attributes[attrName]=attrValue};Tag.prototype.setAttributes=function(attributes){this.attributes={};for(var attrName in attributes){this.attributes[attrName]=attributes[attrName]}};var RULE_AUTO_CLOSE=1<<0;var RULE_AUTO_REOPEN=1<<1;var RULE_BREAK_PARAGRAPH=1<<2;var RULE_CREATE_PARAGRAPHS=1<<3;var RULE_DISABLE_AUTO_BR=1<<4;var RULE_ENABLE_AUTO_BR=1<<5;var RULE_IGNORE_TAGS=1<<6;var RULE_IGNORE_TEXT=1<<7;var RULE_IGNORE_WHITESPACE=1<<8;var RULE_IS_TRANSPARENT=1<<9;var RULE_PREVENT_BR=1<<10;var RULE_SUSPEND_AUTO_BR=1<<11;var RULE_TRIM_FIRST_LINE=1<<12;var RULES_AUTO_LINEBREAKS=RULE_DISABLE_AUTO_BR|RULE_ENABLE_AUTO_BR|RULE_SUSPEND_AUTO_BR;var RULES_INHERITANCE=RULE_ENABLE_AUTO_BR;var WHITESPACE=" \n\t";var cntOpen;var cntTotal;var context;var currentFixingCost;var currentTag;var isRich;var logger=new Logger;var maxFixingCost=10000;var namespaces;var openTags;var output;var plugins={"Autoemail":{parser:function(text,matches){var config={attrName:"email",tagName:"EMAIL"};var tagName=config.tagName,attrName=config.attrName;matches.forEach(function(m){var startTag=addStartTag(tagName,m[0][1],0);startTag.setAttribute(attrName,m[0][0]);var endTag=addEndTag(tagName,m[0][1]+m[0][0].length,0);startTag.pairWith(endTag)})},quickMatch:"@",regexp:/\b[-a-z0-9_+.]+@[-a-z0-9.]*[a-z0-9]/ig,regexpLimit:50000},"Autoimage":{parser:function(text,matches){var config={attrName:"src",tagName:"IMG"};var tagName=config.tagName,attrName=config.attrName;matches.forEach(function(m){addTagPair(tagName,m[0][1],0,m[0][1]+m[0][0].length,0,2).setAttribute(attrName,m[0][0])})},quickMatch:":\/\/",regexp:/\bhttps?:\/\/[-.\w]+\/(?:[-+.:\/\w]|%[0-9a-f]{2}|\(\w+\))+\.(?:gif|jpe?g|png|svgz?|webp)(?!\S)/ig,regexpLimit:50000},"Autolink":{parser:function(text,matches){var config={attrName:"url",tagName:"URL"};
103matches.forEach(function(m){linkifyUrl(m[0][1],trimUrl(m[0][0]))});function linkifyUrl(tagPos,url){var endPos=tagPos+url.length,endTag=addEndTag(config.tagName,endPos,0);if(url[3]==='.'){url='http://'+url} 104var startTag=addStartTag(config.tagName,tagPos,0,1);startTag.setAttribute(config.attrName,url);startTag.pairWith(endTag);var contentTag=addVerbatim(tagPos,endPos-tagPos,1000);startTag.cascadeInvalidationTo(contentTag)} 105function trimUrl(url){return url.replace(/(?:(?![-=)\/_])[\s!-.:-@[-`{-~])+$/,'')}},quickMatch:":",regexp:/\bhttps?:(?:[^\s()\[\]\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65]|\([^\s()]*\)|\[\w*\])+/ig,regexpLimit:50000},"Autovideo":{parser:function(text,matches){var config={attrName:"src",tagName:"VIDEO"};var tagName=config.tagName,attrName=config.attrName;matches.forEach(function(m){addTagPair(tagName,m[0][1],0,m[0][1]+m[0][0].length,0,-1).setAttribute(attrName,m[0][0])})},quickMatch:":\/\/",regexp:/\bhttps?:\/\/[-.\w]+\/(?:[-+.:\/\w]|%[0-9a-f]{2}|\(\w+\))+\.(?:mp4|ogg|webm)(?!\S)/ig,regexpLimit:50000},"BBCodes":{parser:function(text,matches){var config={bbcodes:{"*":{tagName:"LI"}
105,"B":[],"CENTER":[],"CODE":{defaultAttribute:"lang"},"COLOR":[],"DEL":[],"EMAIL":{contentAttributes:["email"]},"I":[],"IMG":{contentAttributes:["src"],defaultAttribute:"src"},"LIST":{defaultAttribute:"type"},"MEDIA":{contentAttributes:["url"]},"QUOTE":{defaultAttribute:"author"},"S":[],"SIZE":[],"U":[],"URL":{contentAttributes:["url"]}}};var attributes;var bbcodeConfig;var bbcodeName;var bbcodeSuffix;var pos;var startPos;var textLen=text.length;var uppercaseText='';matches.forEach(function(m){bbcodeName=m[1][0].toUpperCase();if(!(bbcodeName in config.bbcodes)){return} 106bbcodeConfig=config.bbcodes[bbcodeName];startPos=m[0][1];pos=startPos+m[0][0].length;try 107{parseBBCode()}catch(e){}});function addBBCodeEndTag(){return addEndTag(getTagName(),startPos,pos-startPos)} 108function addBBCodeSelfClosingTag(){var tag=addSelfClosingTag(getTagName(),startPos,pos-startPos);tag.setAttributes(attributes);return tag} 109function addBBCodeStartTag(){var tag=addStartTag(getTagName(),startPos,pos-startPos);tag.setAttributes(attributes);return tag} 110function captureEndTag(){if(!uppercaseText){uppercaseText=text.toUpperCase()} 111var match='[/'+bbcodeName+bbcodeSuffix+']',endTagPos=uppercaseText.indexOf(match,pos);if(endTagPos<0){return null} 112return addEndTag(getTagName(),endTagPos,match.length)} 113function getTagName(){return bbcodeConfig.tagName||bbcodeName} 114function parseAttributes(){var firstPos=pos,attrName;attributes={};while(pos<textLen){var c=text[pos];if(" \n\t".indexOf(c)>-1){++pos;continue} 115if('/]'.indexOf(c)>-1){return} 116var spn=/^[-\w]*/.exec(text.substr(pos,100))[0].length;if(spn){attrName=text.substr(pos,spn).toLowerCase();pos+=spn;if(pos>=textLen){throw ''} 117if(text[pos]!=='='){continue}}else if(c==='='&&pos===firstPos){attrName=bbcodeConfig.defaultAttribute||bbcodeName.toLowerCase()}else{throw ''} 118if(++pos>=textLen){throw ''} 119attributes[attrName]=parseAttributeValue()}} 120function parseAttributeValue(){if(text[pos]==='"'||text[pos]==="'"){return parseQuotedAttributeValue()} 121var match=/(?:[^\s\]]|[ \t](?!\s*(?:[-\w]+=|\/?\])))*/.exec(text.substr(pos)),attrValue=match[0];pos+=attrValue.length;return attrValue} 122function parseBBCode(){parseBBCodeSuffix();if(text[startPos+1]==='/'){if(text[pos]===']'&&bbcodeSuffix===''){++pos;addBBCodeEndTag()} 123return} 124parseAttributes();if(bbcodeConfig.predefinedAttributes){for(var attrName in bbcodeConfig.predefinedAttributes){if(!(attrName in attributes)){attributes[attrName]=bbcodeConfig.predefinedAttributes[attrName]}}} 125if(text[pos]===']'){++pos}else{if(text.substr(pos,2)==='/]'){pos+=2;addBBCodeSelfClosingTag()} 126return} 127var contentAttributes=[];if(bbcodeConfig.contentAttributes){bbcodeConfig.contentAttributes.forEach(function(attrName){if(!(attrName in attributes)){contentAttributes.push(attrName)}})} 128var requireEndTag=(bbcodeSuffix||bbcodeConfig.forceLookahead),endTag=(requireEndTag||contentAttributes.length)?captureEndTag():null;if(endTag){contentAttributes.forEach(function(attrName){attributes[attrName]=text.substr(pos,endTag.getPos()-pos)})}else if(requireEndTag){return} 129var tag=addBBCodeStartTag();if(endTag){tag.pairWith(endTag)}} 130function parseBBCodeSuffix(){bbcodeSuffix='';if(text[pos]===':'){bbcodeSuffix=/^:\d*/.exec(text.substr(pos))[0];pos+=bbcodeSuffix.length}} 131function parseQuotedAttributeValue(){var quote=text[pos],valuePos=pos+1;do{pos=text.indexOf(quote,pos+1);if(pos<0){throw ''} 132var n=1;while(text[pos-n]==='\\'){++n}} 133while(n%2===0);var attrValue=text.substr(valuePos,pos-valuePos);if(attrValue.indexOf('\\')>-1){attrValue=attrValue.replace(/\\([\\'"])/g,'$1')} 134++pos;return attrValue}},quickMatch:"[",regexp:/\[\/?(\*|[-\w]+)(?=[\]\s=:\/])/g,regexpLimit:50000},"Emoticons":{parser:function(text,matches){var config={tagName:"E"};matches.forEach(function(m){if(HINT.EMOTICONS_NOT_AFTER&&config.notAfter&&m[0][1]&&config.notAfter.test(text[m[0][1]-1])){return} 135addSelfClosingTag(config.tagName,m[0][1],m[0][0].length)})},regexp:/(?::(?:[()DOP|]|'\()|;\)|>:\()/g,regexpLimit:50000},"Escaper":{parser:function(text,matches){var config={tagName:"ESC"};matches.forEach(function(m){addTagPair(config.tagName,m[0][1],1,m[0][1]+m[0][0].length,0)})},quickMatch:"\\",regexp:/\\[-!#()*+.:<>@[\\\]^_`{|}~]/g,regexpLimit:50000},"FancyPants":{parser:function(text,matches){var config={attrName:"char",tagName:"FP"};var attrName=config.attrName,hasSingleQuote=(text.indexOf("'")>=0),hasDoubleQuote=(text.indexOf('"')>=0),tagName=config.tagName;if(typeof config.disableQuotes==='undefined'){parseSingleQuotes();parseSingleQuotePairs();parseDoubleQuotePairs()} 136if(typeof config.disableGuillemets==='undefined'){parseGuillemets()}
137if(typeof config.disableMathSymbols==='undefined'){parseNotEqualSign();parseSymbolsAfterDigits();parseFractions()} 138if(typeof config.disablePunctuation==='undefined'){parseDashesAndEllipses()} 139if(typeof config.disableSymbols==='undefined'){parseSymbolsInParentheses()} 140function addTag(tagPos,tagLen,chr,prio){var tag=addSelfClosingTag(tagName,tagPos,tagLen,prio||0);tag.setAttribute(attrName,chr);return tag} 141function parseDashesAndEllipses(){if(text.indexOf('...')<0&&text.indexOf('--')<0){return} 142var chrs={'--':"\u2013",'---':"\u2014",'...':"\u2026"},regexp=/---?|\.\.\./g,m;while(m=regexp.exec(text)){addTag(m.index,m[0].length,chrs[m[0]])}} 143function parseDoubleQuotePairs(){if(hasDoubleQuote){parseQuotePairs('"',/(?:^|\W)".+?"(?!\w)/g,"\u201c","\u201d")}} 144function parseFractions(){if(text.indexOf('/')<0){return} 145var map={'0/3':"\u2189",'1/10':"\u2152",'1/2':"\u00BD",'1/3':"\u2153",'1/4':"\u00BC",'1/5':"\u2155",'1/6':"\u2159",'1/7':"\u2150",'1/8':"\u215B",'1/9':"\u2151",'2/3':"\u2154",'2/5':"\u2156",'3/4':"\u00BE",'3/5':"\u2157",'3/8':"\u215C",'4/5':"\u2158",'5/6':"\u215A",'5/8':"\u215D",'7/8':"\u215E"};var m,regexp=/\b(?:0\/3|1\/(?:[2-9]|10)|2\/[35]|3\/[458]|4\/5|5\/[68]|7\/8)\b/g;while(m=regexp.exec(text)){addTag(m.index,m[0].length,map[m[0]])}} 146function parseGuillemets(){if(text.indexOf('<<')<0){return} 147var m,regexp=/<<( ?)(?! )[^\n<>]*?[^\n <>]\1>>(?!>)/g;while(m=regexp.exec(text)){var left=addTag(m.index,2,"\u00AB"),right=addTag(m.index+m[0].length-2,2,"\u00BB");left.cascadeInvalidationTo(right)}} 148function parseNotEqualSign(){if(text.indexOf('!=')<0&&text.indexOf('=/=')<0){return} 149var m,regexp=/\b (?:!|=\/)=(?= \b)/g;while(m=regexp.exec(text)){addTag(m.index+1,m[0].length-1,"\u2260")}} 150function parseQuotePairs(q,regexp,leftQuote,rightQuote){var m;while(m=regexp.exec(text)){var left=addTag(m.index+m[0].indexOf(q),1,leftQuote),right=addTag(m.index+m[0].length-1,1,rightQuote);left.cascadeInvalidationTo(right)}} 151function parseSingleQuotePairs(){if(hasSingleQuote){parseQuotePairs("'",/(?:^|\W)'.+?'(?!\w)/g,"\u2018","\u2019")}} 152function parseSingleQuotes(){if(!hasSingleQuote){return} 153var m,regexp=/[a-z]'|(?:^|\s)'(?=[a-z]|[0-9]{2})/gi;while(m=regexp.exec(text)){addTag(m.index+m[0].indexOf("'"),1,"\u2019",10)}} 154function parseSymbolsAfterDigits(){if(!hasSingleQuote&&!hasDoubleQuote&&text.indexOf('x')<0){return} 155var map={"'s":"\u2019","'":"\u2032","' ":"\u2032","'x":"\u2032",'"':"\u2033",'" ':"\u2033",'"x':"\u2033"};var m,regexp=/[0-9](?:'s|["']? ?x(?= ?[0-9])|["'])/g;while(m=regexp.exec(text)){if(m[0][m[0].length-1]==='x'){addTag(m.index+m[0].length-1,1,"\u00d7")} 156var str=m[0].substr(1,2);if(map[str]){addTag(m.index+1,1,map[str])}}} 157function parseSymbolsInParentheses(){if(text.indexOf('(')<0){return} 158var chrs={'(c)':"\u00A9",'(r)':"\u00AE",'(tm)':"\u2122"},regexp=/\((?:c|r|tm)\)/gi,m;while(m=regexp.exec(text)){addTag(m.index,m[0].length,chrs[m[0].toLowerCase()])}}}},"HTMLEntities":{parser:function(text,matches){var config={attrName:"char",tagName:"HE"};var tagName=config.tagName,attrName=config.attrName;matches.forEach(function(m){var entity=m[0][0],chr=html_entity_decode(entity);if(chr===entity||chr.charCodeAt(0)<32){return} 159addSelfClosingTag(tagName,m[0][1],entity.length).setAttribute(attrName,chr)})},quickMatch:"&",regexp:/&(?:[a-z]+|#(?:[0-9]+|x[0-9a-f]+));/ig,regexpLimit:50000},"Litedown":{parser:function(text,matches){var config={decodeHtmlEntities:!1};var decodeHtmlEntities=config.decodeHtmlEntities;var hasEscapedChars=!1;var hasReferences=!1;var linkReferences={};if(text.indexOf('\\')>=0){hasEscapedChars=!0;text=text.replace(/\\[!"'()*<>[\\\]^_`~]/g,function(str){return{'\\!':"\x1B0",'\\"':"\x1B1","\\'":"\x1B2",'\\(':"\x1B3",'\\)':"\x1B4",'\\*':"\x1B5",'\\<':"\x1B6",'\\>':"\x1B7",'\\[':"\x1B8",'\\\\':"\x1B9",'\\]':"\x1BA",'\\^':"\x1BB",'\\_':"\x1BC",'\\`':"\x1BD",'\\~':"\x1BE"}[str]})} 160text+="\n\n\x17";function decode(str){if(HINT.LITEDOWN_DECODE_HTML_ENTITIES&&decodeHtmlEntities&&str.indexOf('&')>-1){str=html_entity_decode(str)} 161str=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]})} 162return str} 163function isAfterWhitespace(pos){return(pos>0&&isWhitespace(text.charAt(pos-1)))} 164function isAlnum(chr){return(' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.indexOf(chr)>0)} 165function isBeforeWhitespace(pos){return isWhitespace(text[pos+1])} 166function isSurroundedByAlnum(pos,len){return(pos>
1660&&isAlnum(text[pos-1])&&isAlnum(text[pos+len]))} 167function isWhitespace(chr){return(" \n\t".indexOf(chr)>-1)} 168function markBoundary(pos){text=text.substr(0,pos)+"\x17"+text.substr(pos+1)} 169function overwrite(pos,len){if(len>0){text=text.substr(0,pos)+new Array(1+len).join("\x1A")+text.substr(pos+len)}} 170function parseInlineMarkup(str,regexp,tagName){if(text.indexOf(str)===-1){return} 171var m;while(m=regexp.exec(text)){var match=m[0],matchPos=m.index,matchLen=match.length,endPos=matchPos+matchLen-2;addTagPair(tagName,matchPos,2,endPos,2);overwrite(matchPos,2);overwrite(endPos,2)}} 172function parseAbstractScript(tagName,syntaxChar,shortRegexp,longRegexp){var pos=text.indexOf(syntaxChar);if(pos===-1){return} 173parseShortForm(pos);parseLongForm(pos);function parseLongForm(pos){pos=text.indexOf(syntaxChar+'(',pos);if(pos===-1){return} 174var m,regexp=longRegexp;regexp.lastIndex=pos;while(m=regexp.exec(text)){var match=m[0],matchPos=m.index,matchLen=match.length;addTagPair(tagName,matchPos,2,matchPos+matchLen-1,1);overwrite(matchPos,matchLen)} 175if(match){parseLongForm(pos)}} 176function parseShortForm(pos){var m,regexp=shortRegexp;regexp.lastIndex=pos;while(m=regexp.exec(text)){var match=m[0],matchPos=m.index,matchLen=match.length,startPos=matchPos,endLen=(match.substr(-1)===syntaxChar)?1:0,endPos=matchPos+matchLen-endLen;addTagPair(tagName,startPos,1,endPos,endLen)}}} 177function setLinkAttributes(tag,linkInfo,attrName){var url=linkInfo.replace(/^\s*/,'').replace(/\s*$/,''),title='',pos=url.indexOf(' ');if(pos!==-1){title=url.substr(pos).replace(/^\s*\S/,'').replace(/\S\s*$/,'');url=url.substr(0,pos)} 178if(/^<.+>$/.test(url)){url=url.replace(/^<(.+)>$/,'$1').replace(/\\>/g,'>')} 179tag.setAttribute(attrName,decode(url));if(title>''){tag.setAttribute('title',decode(title))}}(function(){var setextLines={};function parse(){matchSetextLines();var blocks=[],blocksCnt=0,codeFence,codeIndent=4,codeTag,lineIsEmpty=!0,lists=[],listsCnt=0,newContext=!1,textBoundary=0,breakParagraph,continuation,ignoreLen,indentStr,indentLen,lfPos,listIndex,maxIndent,minIndent,blockDepth,tagPos,tagLen;var matches=[],m,regexp=/^(?:(?=[-*+\d \t>`~#_])((?: {0,3}>(?:(?!!)|!(?![^\n>]*?!<)) ?)+)?([ \t]+)?(\* *\* *\*[* ]*$|- *- *-[- ]*$|_ *_ *_[_ ]*$)?((?:[-*+]|\d+\.)[ \t]+(?=\S))?[ \t]*(#{1,6}[ \t]+|```+[^`\n]*$|~~~+[^~\n]*$)?)?/gm;while(m=regexp.exec(text)){matches.push(m);if(m.index===regexp.lastIndex){++regexp.lastIndex}} 180matches.forEach(function(m){var blockMarks=[],matchPos=m.index,matchLen=m[0].length,startPos,startLen,endPos,endLen;ignoreLen=0;blockDepth=0;continuation=!lineIsEmpty;lfPos=text.indexOf("\n",matchPos);lineIsEmpty=(lfPos===matchPos+matchLen&&!m[3]&&!m[4]&&!m[5]);if(!matchLen){++regexp.lastIndex} 181breakParagraph=(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)} 182overwrite(matchPos,ignoreLen)} 183if(blockDepth<blocksCnt&&!continuation){newContext=!0;do{var startTag=blocks.pop();addEndTag(startTag.getName(),textBoundary,0).pairWith(startTag)} 184while(blockDepth<--blocksCnt);} 185if(blockDepth>blocksCnt&&!lineIsEmpty){newContext=!0;do{var tagName=(blockMarks[blocksCnt]==='>!')?'SPOILER':'QUOTE';blocks.push(addStartTag(tagName,matchPos,0,-999))} 186while(blockDepth>++blocksCnt);} 187var indentWidth=0,indentPos=0;if(m[2]&&!codeFence){indentStr=m[2];indentLen=indentStr.length;do{if(indentStr[indentPos]===' '){++indentWidth}else{indentWidth=(indentWidth+4)&~3}} 188while(++indentPos<indentLen&&indentWidth<codeIndent);} 189if(codeTag&&!codeFence&&indentWidth<codeIndent&&!lineIsEmpty){newContext=!0} 190if(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()} 191codeTag=null;codeFence=null}
192lists.forEach(function(list){closeList(list,textBoundary)});lists=[];listsCnt=0;if(matchPos){markBoundary(matchPos-1)}} 193if(indentWidth>=codeIndent){if(codeTag||!continuation){ignoreLen=(m[1]||'').length+indentPos;if(!codeTag){codeTag=addStartTag('CODE',matchPos+ignoreLen,0,-999)} 194m={}}}else if(!codeTag){var hasListItem=!!m[4];if(!indentWidth&&!continuation&&!hasListItem){listIndex=-1}else if(continuation&&!hasListItem){listIndex=listsCnt-1}else if(!listsCnt){listIndex=(hasListItem)?0:-1}else{listIndex=0;while(listIndex<listsCnt&&indentWidth>lists[listIndex].maxIndent){++listIndex}} 195while(listIndex<listsCnt-1){closeList(lists.pop(),textBoundary);--listsCnt} 196if(listIndex===listsCnt&&!hasListItem){--listIndex} 197if(hasListItem&&listIndex>=0){breakParagraph=!0;tagPos=matchPos+ignoreLen+indentPos;tagLen=m[4].length;var itemTag=addStartTag('LI',tagPos,tagLen);overwrite(tagPos,tagLen);if(listIndex<listsCnt){addEndTag('LI',textBoundary,0).pairWith(lists[listIndex].itemTag);lists[listIndex].itemTag=itemTag;lists[listIndex].itemTags.push(itemTag)}else{++listsCnt;if(listIndex){minIndent=lists[listIndex-1].maxIndent+1;maxIndent=Math.max(minIndent,listIndex*4)}else{minIndent=0;maxIndent=indentWidth} 198var listTag=addStartTag('LIST',tagPos,0);if(m[4].indexOf('.')>-1){listTag.setAttribute('type','decimal');var start=+m[4];if(start!==1){listTag.setAttribute('start',start)}} 199lists.push({listTag:listTag,itemTag:itemTag,itemTags:[itemTag],minIndent:minIndent,maxIndent:maxIndent,tight:!0})}} 200if(listsCnt&&!continuation&&!lineIsEmpty){if(lists[0].itemTags.length>1||!hasListItem){lists.forEach(function(list){list.tight=!1})}} 201codeIndent=(listsCnt+1)*4} 202if(m[5]){if(m[5][0]==='#'){startLen=m[5].length;startPos=matchPos+matchLen-startLen;endLen=getAtxHeaderEndTagLen(matchPos+matchLen,lfPos);endPos=lfPos-endLen;addTagPair('H'+/#{1,6}/.exec(m[5])[0].length,startPos,startLen,endPos,endLen);markBoundary(startPos);markBoundary(lfPos);if(continuation){breakParagraph=!0}}else if(m[5][0]==='`'||m[5][0]==='~'){tagPos=matchPos+ignoreLen;tagLen=lfPos-tagPos;if(codeTag&&m[5]===codeFence){codeTag.pairWith(addEndTag('CODE',tagPos,tagLen,-1));addIgnoreTag(textBoundary,tagPos-textBoundary);overwrite(codeTag.getPos(),tagPos+tagLen-codeTag.getPos());codeTag=null;codeFence=null}else if(!codeTag){codeTag=addStartTag('CODE',tagPos,tagLen);codeFence=m[5].replace(/[^`~]+/,'');codeTag.setAttribute('blockDepth',blockDepth);addIgnoreTag(tagPos+tagLen,1);var lang=m[5].replace(/^[`~\s]*/,'').replace(/\s+$/,'');if(lang!==''){codeTag.setAttribute('lang',lang)}}}}else if(m[3]&&!listsCnt&&text[matchPos+matchLen]!=="\x17"){addSelfClosingTag('HR',matchPos+ignoreLen,matchLen-ignoreLen);breakParagraph=!0;markBoundary(lfPos)}else if(setextLines[lfPos]&&setextLines[lfPos].blockDepth===blockDepth&&!lineIsEmpty&&!listsCnt&&!codeTag){addTagPair(setextLines[lfPos].tagName,matchPos+ignoreLen,0,setextLines[lfPos].endPos,setextLines[lfPos].endLen);markBoundary(setextLines[lfPos].endPos+setextLines[lfPos].endLen)} 203if(breakParagraph){addParagraphBreak(textBoundary);markBoundary(textBoundary)} 204if(!lineIsEmpty){textBoundary=lfPos} 205if(ignoreLen){addIgnoreTag(matchPos,ignoreLen,1000)}})} 206function closeList(list,textBoundary){addEndTag('LIST',textBoundary,0).pairWith(list.listTag);addEndTag('LI',textBoundary,0).pairWith(list.itemTag);if(list.tight){list.itemTags.forEach(function(itemTag){itemTag.removeFlags(RULE_CREATE_PARAGRAPHS)})}} 207function computeBlockIgnoreLen(str,maxBlockDepth){var remaining=str;while(--maxBlockDepth>=0){remaining=remaining.replace(/^ *>!? ?/,'')} 208return str.length-remaining.length} 209function getAtxHeaderEndTagLen(startPos,endPos){var content=text.substr(startPos,endPos-startPos),m=/[ \t]*#*[ \t]*$/.exec(content);return m[0].length} 210function getBlockMarks(str){var blockMarks=[],regexp=/>!?/g,m;while(m=regexp.exec(str)){blockMarks.push(m[0])} 211return blockMarks} 212function matchSetextLines(){if(text.indexOf('-')===-1&&text.indexOf('=')===-1){return} 213var m,regexp=/^(?=[-=>])(?:>!? ?)*(?=[-=])(?:-+|=+) *$/gm;while(m=regexp.exec(text)){var match=m[0],matchPos=m.index;var endPos=matchPos-1;while(endPos>0&&text[endPos-1]===' '){--endPos} 214setextLines[matchPos-1]={endLen:matchPos+match.length-endPos,endPos:endPos,blockDepth:match.length-match.replace(/>/g,'').length,tagName:(match[0]==='=')?'H1':'H2'}}} 215parse()})();
215(function(){function parse(){if(text.indexOf(']:')<0){return} 216var m,regexp=/^\x1A* {0,3}\[([^\x17\]]+)\]: *([^[\s\x17]+ *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))?) *(?=$|\x17)\n?/gm;while(m=regexp.exec(text)){addIgnoreTag(m.index,m[0].length);var id=m[1].toLowerCase();if(!linkReferences[id]){hasReferences=!0;linkReferences[id]=m[2]}}} 217parse()})();(function(){function parse(){var markers=getInlineCodeMarkers(),i=-1,cnt=markers.length;while(++i<(cnt-1)){var pos=markers[i].next,j=i;if(text[markers[i].pos]!=='`'){++markers[i].pos;--markers[i].len} 218while(++j<cnt&&markers[j].pos===pos){if(markers[j].len===markers[i].len){addInlineCodeTags(markers[i],markers[j]);i=j;break} 219pos=markers[j].next}}} 220function addInlineCodeTags(left,right){var startPos=left.pos,startLen=left.len+left.trimAfter,endPos=right.pos-right.trimBefore,endLen=right.len+right.trimBefore;addTagPair('C',startPos,startLen,endPos,endLen);overwrite(startPos,endPos+endLen-startPos)} 221function getInlineCodeMarkers(){var pos=text.indexOf('`');if(pos<0){return[]} 222var 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} 223return markers} 224parse()})();(function(){function parse(){var pos=text.indexOf('>0){parseInlineImages()} 226if(hasReferences){parseReferenceImages()}} 227function addImageTag(startPos,endPos,endLen,linkInfo,alt){var tag=addTagPair('IMG',startPos,2,endPos,endLen);setLinkAttributes(tag,linkInfo,'src');tag.setAttribute('alt',decode(alt));overwrite(startPos,endPos+endLen-startPos)} 228function parseInlineImages(){var m,regexp=/!\[(?:[^\x17[\]]|\[[^\x17[\]]*\])*\]\(( *(?:[^\x17\s()]|\([^\x17\s()]*\))*(?=[ )]) *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))? *)\)/g;while(m=regexp.exec(text)){var linkInfo=m[1],startPos=m.index,endLen=3+linkInfo.length,endPos=startPos+m[0].length-endLen,alt=m[0].substr(2,m[0].length-endLen-2);addImageTag(startPos,endPos,endLen,linkInfo,alt)}} 229function parseReferenceImages(){var m,regexp=/!\[((?:[^\x17[\]]|\[[^\x17[\]]*\])*)\](?: ?\[([^\x17[\]]+)\])?/g;while(m=regexp.exec(text)){var startPos=m.index,endPos=startPos+2+m[1].length,endLen=1,alt=m[1],id=alt;if(m[2]>''&&linkReferences[m[2]]){endLen=m[0].length-alt.length-2;id=m[2]}else if(!linkReferences[id]){continue} 230addImageTag(startPos,endPos,endLen,linkReferences[id],alt)}} 231parse()})();(function(){function parse(){parseInlineMarkup('>!',/>![^\x17]+?!</g,'ISPOILER');parseInlineMarkup('||',/\|\|[^\x17]+?\|\|/g,'ISPOILER')} 232parse()})();(function(){function parse(){if(text.indexOf('](')!==-1){parseInlineLinks()} 233if(text.indexOf('<')!==-1){parseAutomaticLinks()} 234if(hasReferences){parseReferenceLinks()}} 235function addLinkTag(startPos,endPos,endLen,linkInfo){var priority=(endLen===1)?1:-1;var tag=addTagPair('URL',startPos,1,endPos,endLen,priority);setLinkAttributes(tag,linkInfo,'url');overwrite(startPos,1);overwrite(endPos,endLen)} 236function getLabels(){var labels={},m,regexp=/\[((?:[^\x17[\]]|\[[^\x17[\]]*\])*)\]/g;while(m=regexp.exec(text)){labels[m.index]=m[1].toLowerCase()} 237return labels} 238function parseAutomaticLinks(){var m,regexp=/<[-+.\w]+([:@])[^\x17\s>]+?(?:>|\x1B7)/g;while(m=regexp.exec(text)){var content=decode(m[0].replace(/\x1B/g,"\\\x1B")).replace(/^<(.+)>$/,'$1'),startPos=m.index,endPos=startPos+m[0].length-1,tagName=(m[1]===':')?'URL':'EMAIL',attrName=tagName.toLowerCase();addTagPair(tagName,startPos,1,endPos,1).setAttribute(attrName,content)}} 239function parseInlineLinks(){var m,regexp=/\[(?:[^\x17[\]]|\[[^\x17[\]]*\])*\]\(( *(?:\([^\x17\s()]*\)|[^\x17\s)])*(?=[ )]) *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))? *)\)/g;while(m=regexp.exec(text)){var linkInfo=m[1],startPos=m.index,endLen=3+linkInfo.length,endPos=startPos+m[0].length-endLen;addLinkTag(startPos,endPos,endLen,linkInfo)}} 240function parseReferenceLinks(){var labels=getLabels(),startPos;for(startPos in labels){var id=labels[startPos],labelPos=+startPos+2+id.length,endPos=labelPos-1,endLen=1;if(text[labelPos]===' '){++labelPos} 241if(labels[labelPos]>''&&linkReferences[labels[labelPos]]){id=labels[labelPos];endLen=labelPos+2+id.length-endPos} 242if(linkReferences[id]){addLinkTag(+startPos,endPos,endLen,linkReferences[id])}}} 243parse()})();(function(){function parse(){parseInlineMarkup('~~',/~~[^\x17]+?~~(?!~)/g,'DEL')} 244parse()})();(function(){function parse(){parseAbstractScript('SUB','~',/~[^\x17\s!"#$%&\'()*+,\-.\/:;<=>?@[\]^_`{}|~]+~?/g,/~\([^\x17()]+\)/g)} 245parse()})();(function(){function parse(){parseAbstractScript('SUP','^',/\^[^\x17\s!"#$%&\'()*+,\-.\/:;<=>?@[\]^_`{}|~]+\^?/g,/\^\([^\x17()]+\)/g)} 246parse()})();(function(){var closeEm;var closeStrong;var emPos;var emEndPos;var remaining;var strongPos;var strongEndPos;function parse(){parseEmphasisByCharacter('*',/\*+/g);parseEmphasisByCharacter('_',/_+/g)} 247function adjustEndingPositions(){if(closeEm&&closeStrong){if(emPos<strongPos){emEndPos+=2}else{++strongEndPos}}} 248function adjustStartingPositions(){if(emPos>=0&&emPos===strongPos){if(closeEm){emPos+=2}else{++strongPos}}} 249function closeSpans(){if(closeEm){--remaining;addTagPair('EM',emPos,1,emEndPos,1);emPos=-1} 250if(closeStrong){remaining-=2;addTagPair('STRONG',strongPos,2,strongEndPos,2);strongPos=-1}} 251function getEmphasisByBlock(regexp,pos){var block=[],blocks=[],breakPos=text.indexOf("\x17",pos),m;regexp.lastIndex=pos;while(m=regexp.exec(text)){var matchPos=m.index,matchLen=m[0].length;if(matchPos>breakPos){blocks.push(block);block=[];breakPos=text.indexOf("\x17",matchPos)} 252if(!ignoreEmphasis(matchPos,matchLen)){block.push([matchPos,matchLen])}} 253blocks.push(block);return blocks} 254function ignoreEmphasis(pos,len){return(text.charAt(pos)==='_'&&len===1&&isSurroundedByAlnum(pos,len))} 255function openSpans(pos){if(remaining&1){emPos=pos-remaining} 256if(remaining&2){strongPos=pos-remaining}} 257function parseEmphasisByCharacter(character,regexp){var pos=text.indexOf(character);if(pos===-1){return}
258getEmphasisByBlock(regexp,pos).forEach(processEmphasisBlock)} 259function processEmphasisBlock(block){emPos=-1,strongPos=-1;block.forEach(function(pair){processEmphasisMatch(pair[0],pair[1])})} 260function processEmphasisMatch(matchPos,matchLen){var canOpen=!isBeforeWhitespace(matchPos+matchLen-1),canClose=!isAfterWhitespace(matchPos),closeLen=(canClose)?Math.min(matchLen,3):0;closeEm=!!(closeLen&1)&&emPos>=0;closeStrong=!!(closeLen&2)&&strongPos>=0;emEndPos=matchPos;strongEndPos=matchPos;remaining=matchLen;adjustStartingPositions();adjustEndingPositions();closeSpans();remaining=(canOpen)?Math.min(remaining,3):0;openSpans(matchPos+matchLen)} 261parse()})();(function(){function parse(){var pos=text.indexOf(" \n");while(pos>0){addBrTag(pos+2).cascadeInvalidationTo(addVerbatim(pos+2,1));pos=text.indexOf(" \n",pos+3)}} 262parse()})()}},"MediaEmbed":{parser:function(text,matches){var config={tagName:"MEDIA"};matches.forEach(function(m){var tagName=config.tagName,url=m[0][0],pos=m[0][1],len=url.length;addSelfClosingTag(tagName,pos,len,-10).setAttribute('url',url)})},quickMatch:":\/\/",regexp:/\bhttps?:\/\/[^["'\s]+/ig,regexpLimit:50000},"PipeTables":{parser:function(text,matches){var config={overwriteEscapes:!0,overwriteMarkdown:!0};var pos,table=null,tableTag,tables,_text=text;if(config.overwriteMarkdown){overwriteMarkdown()} 263if(config.overwriteEscapes){overwriteEscapes()} 264captureTables();processTables();function addLine(line){var ignoreLen=0;if(!table){table={rows:[]};ignoreLen=/^ */.exec(line)[0].length;line=line.substr(ignoreLen)} 265line=line.replace(/^( *)\|/,'$1 ').replace(/\|( *)$/,' $1');table.rows.push({line:line,pos:pos+ignoreLen})} 266function addTableBody(){var i=1,cnt=table.rows.length;while(++i<cnt){addTableRow('TD',table.rows[i])} 267createBodyTags(table.rows[2].pos,pos)} 268function addTableCell(tagName,align,content){var startPos=pos,endPos=startPos+content.length,ignoreLen;pos=endPos;var m=/^( *).*?( *)$/.exec(content);if(m[1]){ignoreLen=m[1].length;createIgnoreTag(startPos,ignoreLen);startPos+=ignoreLen} 269if(m[2]){ignoreLen=m[2].length;createIgnoreTag(endPos-ignoreLen,ignoreLen);endPos-=ignoreLen} 270createCellTags(tagName,startPos,endPos,align)} 271function addTableHead(){addTableRow('TH',table.rows[0]);createHeadTags(table.rows[0].pos,pos)} 272function addTableRow(tagName,row){pos=row.pos;row.line.split('|').forEach(function(str,i){if(i>0){createIgnoreTag(pos,1);++pos} 273var align=(!table.cols[i])?'':table.cols[i];addTableCell(tagName,align,str)});createRowTags(row.pos,pos)} 274function captureTables(){table=null;tables=[];pos=0;_text.split("\n").forEach(function(line){if(line.indexOf('|')<0){endTable()}else{addLine(line)} 275pos+=1+line.length});endTable()} 276function createBodyTags(startPos,endPos){addTagPair('TBODY',startPos,0,endPos,0,-103)} 277function createCellTags(tagName,startPos,endPos,align){var tag;if(startPos===endPos){tag=addSelfClosingTag(tagName,startPos,0,-101)}else{tag=addTagPair(tagName,startPos,0,endPos,0,-101)} 278if(align){tag.setAttribute('align',align)}} 279function createHeadTags(startPos,endPos){addTagPair('THEAD',startPos,0,endPos,0,-103)} 280function createIgnoreTag(pos,len){tableTag.cascadeInvalidationTo(addIgnoreTag(pos,len,1000))} 281function createRowTags(startPos,endPos){addTagPair('TR',startPos,0,endPos,0,-102)} 282function createSeparatorTag(row){createIgnoreTag(row.pos-1,1+row.line.length)} 283function createTableTags(startPos,endPos){tableTag=addTagPair('TABLE',startPos,0,endPos,0,-104)} 284function endTable(){if(hasValidTable()){table.cols=parseColumnAlignments(table.rows[1].line);tables.push(table)} 285table=null} 286function hasValidTable(){return(table&&table.rows.length>2&&isValidSeparator(table.rows[1].line))} 287function isValidSeparator(line){return/^ *:?-+:?(?:(?:\+| *\| *):?-+:?)+ */.test(line)} 288function overwriteBlockquoteCallback(str){return str.replace(/[!>]/g,' ')} 289function overwriteEscapes(){if(_text.indexOf('\\|')>-1){_text=_text.replace(/\\[\\|]/g,'..')}} 290function overwriteInlineCodeCallback(str){return str.replace(/\|/g,'.')} 291function overwriteMarkdown(){if(_text.indexOf('`')>-1){_text=_text.replace(/`[^`]*`/g,overwriteInlineCodeCallback)} 292if(_text.indexOf('>')>-1){_text=_text.replace(/^(?:>!? ?)+/gm,overwriteBlockquoteCallback)}} 293function parseColumnAlignments(line){var align=['','right','left','center'],cols=[],regexp=/(:?)-+(:?)/g,m;while(m=regexp.exec(line)){var key=(m[1]?2:0)+(m[2]?1:0);cols.push(align[key])} 294return cols} 295function processCurrentTable(){var 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()} 296function processTables(){var i=-1,cnt=tables.length;while(++i<cnt){table=tables[i];processCurrentTable()}}},quickMatch:"|"},"Preg":{parser:function(text,matches){var config={generics:[["USERMENTION",/\B@([a-z0-9_-]+)(?!#)/ig,0,["","username"]],["POSTMENTION",/\B@([a-z0-9_-]+)#(\d+)/ig,0,["","username","id"]]]};config.generics.forEach(function(entry){var tagName=entry[0],regexp=entry[1],passthroughIdx=entry[2],map=entry[3],m;regexp.lastIndex=0;while(m=regexp.exec(text)){var startTagPos=m.index,matchLen=m[0].length,tag;if(HINT.PREG_HAS_PASSTHROUGH&&passthroughIdx&&m[passthroughIdx]!==''){var contentPos=text.indexOf(m[passthroughIdx],startTagPos),contentLen=m[passthroughIdx].length,startTagLen=contentPos-startTagPos,endTagPos=contentPos+contentLen,endTagLen=matchLen-(startTagLen+contentLen);tag=addTagPair(tagName,startTagPos,startTagLen,endTagPos,endTagLen,-100)}else{tag=addSelfClosingTag(tagName,startTagPos,matchLen,-100)}
297map.forEach(function(attrName,i){if(attrName&&typeof m[i]!=='undefined'){tag.setAttribute(attrName,m[i])}})}})}}};var pos;var registeredVars={"MediaEmbed.hosts":{"247sports.com":"twentyfoursevensports","8tracks.com":"eighttracks","abcnews.go.com":"abcnews","amazon.ca":"amazon","amazon.co.jp":"amazon","amazon.co.uk":"amazon","amazon.com":"amazon","amazon.de":"amazon","amazon.es":"amazon","amazon.fr":"amazon","amazon.in":"amazon","amazon.it":"amazon","anchor.fm":"anchor","archive.org":"internetarchive","audioboo.fm":"audioboom","audioboom.com":"audioboom","audiomack.com":"audiomack","bandcamp.com":"bandcamp","bbc.co.uk":"bbcnews","bbc.com":"bbcnews","bitchute.com":"bitchute","bleacherreport.com":"bleacherreport","break.com":"break","castos.com":"castos","cbsnews.com":"cbsnews","cc.com":"comedycentral","channel.nationalgeographic.com":"natgeochannel","clyp.it":"clyp","cnbc.com":"cnbc","cnn.com":"cnn","codepen.io":"codepen","comedycentral.com":"comedycentral","coub.com":"coub","dai.ly":"dailymotion","dailymotion.com":"dailymotion","democracynow.org":"democracynow","docs.google.com":"googlesheets","drive.google.com":"googledrive","dumpert.nl":"dumpert","espn.com":"espn","espn.go.com":"espn","facebook.com":"facebook","falstad.com":"falstad","fb.watch":"facebook","flic.kr":"flickr","flickr.com":"flickr","funnyordie.com":"funnyordie","gameclips.io":"xboxclips","gamerdvr.com":"xboxdvr","gamespot.com":"gamespot","gametrailers.com":"gametrailers","gettyimages.be":"getty","gettyimages.cn":"getty","gettyimages.co.jp":"getty","gettyimages.co.uk":"getty","gettyimages.com":"getty","gettyimages.com.au":"getty","gettyimages.de":"getty","gettyimages.dk":"getty","gettyimages.es":"getty","gettyimages.fr":"getty","gettyimages.ie":"getty","gettyimages.it":"getty","gettyimages.nl":"getty","gettyimages.pt":"getty","gettyimages.se":"getty","gfycat.com":"gfycat","gifs.com":"gifs","giphy.com":"giphy","github.com":"gist","globalnews.ca":"globalnews","gofundme.com":"gofundme","gty.im":"getty","hudl.com":"hudl","hulu.com":"hulu","ign.com":"ign","imdb.com":"imdb","imgur.com":"imgur","indiegogo.com":"indiegogo","instagram.com":"instagram","izlesene.com":"izlesene","jsfiddle.net":"jsfiddle","jwplatform.com":"jwplatform","kaltura.com":"kaltura","kickstarter.com":"kickstarter","libsyn.com":"libsyn","link.brightcove.com":"brightcove","link.tospotify.com":"spotify","liveleak.com":"liveleak","livestre.am":"livestream","livestream.com":"livestream","medium.com":"medium","megaphone.fm":"megaphone","megaphone.link":"megaphone","metacafe.com":"metacafe","mixcloud.com":"mixcloud","mixer.com":"mixer","mlb.com":"mlb","money.cnn.com":"cnnmoney","mrctv.org":"mrctv","msnbc.com":"msnbc","my.mail.ru":"mailru","n.pr":"npr","nbcnews.com":"nbcnews","nbcsports.com":"nbcsports","nhl.com":"nhl","npr.org":"npr","nytimes.com":"nytimes","open.spotify.com":"spotify","orfium.com":"orfium","pastebin.com":"pastebin","pinterest.com":"pinterest","play.spotify.com":"spotify","players.brightcove.net":"brightcove","plus.google.com":"googleplus","podbean.com":"podbean","prezi.com":"prezi","reddit.com":"reddit","rumble.com":"rumble","rutube.ru":"rutube","scribd.com":"scribd","sendvid.com":"sendvid","slideshare.net":"slideshare","soundcloud.com":"soundcloud","sporcle.com":"sporcle","sportsnet.ca":"sportsnet","spreaker.com":"spreaker","stitcher.com":"stitcher","store.steampowered.com":"steamstore","strawpoll.me":"strawpoll","streamable.com":"streamable","streamja.com":"streamja","t.me":"telegram","teamcoco.com":"teamcoco","ted.com":"ted","theatlantic.com":"theatlantic","theguardian.com":"theguardian","theonion.com":"theonion","tiktok.com":"tiktok","tmz.com":"tmz","tradingview.com":"tradingview","traileraddict.com":"traileraddict","trendingviews.co":"trendingviews","tumblr.com":"tumblr","twitch.tv":"twitch","twitter.com":"twitter","ustream.tv":"ustream","vbox7.com":"vbox7","veoh.com":"veoh","vevo.com":"vevo","video.foxnews.com":"foxnews","video.khl.ru":"khl","video.nationalgeographic.com":"natgeovideo","videodetective.com":"videodetective","vimeo.com":"vimeo","vine.co":"vine","vk.com":"vk","vkontakte.ru":"vk","voca.ro":"vocaroo","vocaroo.com":"vocaroo","vox.com":"vox","washingtonpost.com":"washingtonpost","wistia.com":"wistia","worldstarhi
297phop.com":"wshh","wsj.com":"wsj","xboxclips.com":"xboxclips","xboxdvr.com":"xboxdvr","youku.com":"youku","youtu.be":"youtube","youtube.com":"youtube"},"MediaEmbed.sites":{"abcnews":[[[/abcnews\.go\.com\/(?:video\/embed\?id=|[^\/]+\/video\/[^\/]+-)(\d+)/,o85888FAE]],[]],"amazon":[[[/\/(?:dp|gp\/product)\/([A-Z0-9]+)/,o85888FAE],[/amazon\.(?:co\.)?(ca|de|es|fr|in|it|jp|uk)/,["","tld"]]],[]],"anchor":[[[/anchor.fm\/(?:[-\w]+\/)*episodes\/(?:[-\w]+-)(\w+)(?![-\w])/,o85888FAE]],[]],"audioboom":[[[/audioboo(?:\.f|m\.co)m\/(?:boo|post)s\/(\d+)/,o85888FAE]],[]],"audiomack":[[[/audiomack\.com\/(album|song)\/([-\w]+)\/([-\w]+)/,["","mode","artist","title"]],[/audiomack\.com\/([-\w]+)\/(album|song)\/([-\w]+)/,["","artist","mode","title"]]],[]],"bandcamp":[[],[{extract:[[/\/album=(\d+)/,oA60012B9]],match:[[/bandcamp\.com\/album\/./,oB4E9AE58]]},{extract:[[/"album_id":(\d+)/,oA60012B9],[/"track_num":(\d+)/,["","track_num"]],[/\/track=(\d+)/,o5F5D8CFC]],match:[[/bandcamp\.com\/track\/./,oB4E9AE58]]}]],"bbcnews":[[[/bbc\.co(?:m|\.uk)\/news\/(?:av|video_and_audio)\/(?:\w+-)+(\d+)/,o85888FAE],[/bbc\.co(?:m|\.uk)\/news\/(?:av|video_and_audio)\/embed\/(\w+\/\d+)/,o85888FAE],[/bbc\.co(?:m|\.uk)\/news\/(?:av|video_and_audio)\/\w+\/(\d+)/,o85888FAE],[/bbc\.co(?:m|\.uk)\/news\/av-embeds\/(\d+)/,o85888FAE]],[]],"bitchute":[[[/bitchute\.com\/(?:embed|video)\/([-\w]+)/,o85888FAE]],[]],"bleacherreport":[[],[{extract:[[/id="video-([-\w]+)/,o85888FAE],[/video_embed\?id=([-\w]+)/,o85888FAE]],match:[[/\/articles\/./,oB4E9AE58]]}]],"break":[[[/break\.com\/video\/.*-(\d+)$/,o85888FAE]],[]],"brightcove":[[[/link\.brightcove\.com\/services\/player\/bcpid(\d+).*?bckey=([-,~\w]+).*?bctid=(\d+)/,["","bcpid","bckey","bctid"]],[/players\.brightcove\.net\/(\d+)\/.*?videoId=(\d+)/,["","bcpid","bctid"]]],[]],"castos":[oFF5E442E,[{extract:oFF5E442E,match:[[/castos\.com\/(?:podcasts\/[^\/]*\/)?episodes\/./,oB4E9AE58]]}]],"cbsnews":[[[/cbsnews\.com\/videos?\/(?!watch\/)([-\w]+)/,o85888FAE],[/cbsnews\.com\/video\/watch\/\?id=(\d+)/,o85888FAE]],[]],"clyp":[[[/clyp\.it\/(?!user\/)(\w+)/,o85888FAE]],[]],"cnbc":[[[/cnbc\.com\/gallery\/\?video=(\d+)/,o85888FAE]],[{extract:[[/byGuid=(\d+)/,o85888FAE]],match:[[/cnbc\.com\/video\/20\d\d\/\d\d\/\d\d\/\w/,oB4E9AE58]]}]],"cnn":[[[/cnn.com\/videos\/(.*\.cnn)/,o85888FAE],[/cnn\.com\/video\/data\/2\.0\/video\/(.*\.cnn)/,o85888FAE]],[]],"cnnmoney":[[[/money\.cnn\.com\/video\/(.*\.cnnmoney)/,o85888FAE]],[]],"codepen":[[[/codepen\.io\/([-\w]+)\/(?:details|embed|full|live|pen)\/(\w+)/,oEDE19F33]],[]],"comedycentral":[[],[{extract:[[/(mgid:arc:(?:episode|video):[.\w]+:[-\w]+)/,o85888FAE]],match:[[/c(?:c|omedycentral)\.com\/(?:full-episode|video-clip)s\//,oB4E9AE58]]}]],"coub":[[[/coub\.com\/view\/(\w+)/,o85888FAE]],[]],"dailymotion":[[[/dai\.ly\/([a-z0-9]+)/i,o85888FAE],[/dailymotion\.com\/(?:live\/|swf\/|user\/[^#]+#video=|(?:related\/\d+\/)?video\/)([a-z0-9]+)/i,o85888FAE],[/start=(\d+)/,o90B2B224]],[]],"democracynow":[[[/democracynow.org\/(?:embed\/)?((?:\w+\/)?\d+\/\d+\/\d+(?:\/\w+)?)/,o85888FAE]],[{extract:[[/democracynow\.org\/((?:\w+\/)?\d+\/\d+\/\d+(?:\/\w+)?)' rel='canonical/,o85888FAE]],match:[[/m\.democracynow\.org\/stories\/\d/,oB4E9AE58]]}]],"dumpert":[[[/dumpert\.nl\/(?:item|mediabase)\/(\d+[\/_]\w+)/,o85888FAE]],[]],"eighttracks":[[[/8tracks\.com\/[-\w]+\/(\d+)(?=#|$)/,o85888FAE]],[{extract:[[/eighttracks:\/\/mix\/(\d+)/,o85888FAE]],match:[[/8tracks\.com\/[-\w]+\/\D/,oB4E9AE58]]}]],"espn":[[[/video\/(?:clip(?:\?id=|\/_\/id\/))?(\d+)/,o85888FAE]],[]],"facebook":[[[/\/(?!(?:apps|developers|graph)\.)[-\w.]*facebook\.com\/(?:[\/\w]+\/permalink|(?!marketplace\/|pages\/|groups\/).*?)(?:\/|fbid=|\?v=)(\d+)(?=$|[\/?&#])/,o85888FAE],[/facebook\.com\/([.\w]+)\/(?=(?:post|video)s?\/)([pv])/,["","user","type"]],[/facebook\.com\/video\/(?=post|video)([pv])/,oD276C2BF],[/facebook\.com\/watch\/\?([pv])=/,oD276C2BF]],[{extract:[[/facebook\.com\/watch\/\?(v)=(\d+)/,oAB64EF36],[/facebook\.com\/([.\w]+)\/(v)ideos\/(\d+)/,["","user","type","id"]]],header:"User-agent: PHP (not Mozilla)",match:[[/fb\.watch\/./,oB4E9AE58]]}]],"falstad":[[[/falstad\.com\/circuit\/circuitjs\.html\?c(?:ct=([^&]+)|tz=([-+=\w]+))/,["","cct","ctz"]]],[]],"flickr":[[oBF39CE41,[/flic\.kr\/(?!p\/)[^\/]+\/(\d+)/,o85888FAE]],[{extract:[oBF39CE41],match:[[/flic\.kr\/p\/(\w+)/,["","short"]]],url:"https:\/\/www.flickr.com\/photo.gne?rb=1&short={@short}"}]],"foxnews":[[[/video\.foxnews\.com\/v\/(\d+)/,o85888FAE]],[]],"funnyordie":[[[/funnyordie\.com\/videos\/([0-9a-f]+)/,o85888FAE]],[]],"gamespot":[[[/gamespot\.com.*?\/(?:events|videos)\/.*?-(\d+)\/(?:[#?].*)?$/,o85888FAE]],[]],"gametrailers":[[],[{extract:[[o9338E0AD,o85888FAE]],match:[[/gametrailers\.com\/(?:full-episode|review|video)s\//,oB4E9AE58]]}]],"getty":[[[/gty\.im\/(\d+)/,o85888FAE],[/gettyimages\.[.\w]+\/detail(?=\/).*?\/(\d+)/,o85888FAE],[/#[-\w]*picture-id(\d+)$/,o85888FAE]],[{extract:[[/"height":[ "]*(\d+)/,oF3C0ADD0],[/"width":[ "]*(\d+)/,o06856E8A],[/\bid[=:]['"]?([-=\w]+)/,["","et"]],[/\bsig[=:]['"]?([-=\w]+)/,["","sig"]]],match:o0E3C680A,url:"https:\/\/embed.gettyimages.com\/preview\/{@id}"}]],"gfycat":[[[/gfycat\.com\/(?!gaming|reactions|stickers|gifs\/tag)(?:gifs\/detail\/|ifr(?:ame)?\/)?(\w+)/,o85888FAE]],[{extract:[[/\/ifr\/(\w+)/,o85888FAE]],match:[[/gfycat\.com\/(?!gaming|reactions|stickers|gifs\/tag)(?:gifs\/detail\/|ifr(?:ame)?\/)?[a-z]/,oB4E9AE58]],url:"https:\/\/gfycat.com\/ifr\/{@id}"},{extract:[[/"height":(\d+)/,oF3C0ADD0],[/"width":(\d+)/,o06856E8A]],match:o0E3C680A,url:"https:\/\/api.gfycat.com\/v1\/oembed?url=https:\/\/gfycat.com\/{@id}"}]],"gifs":[[[/gifs\.com\/(?:gif\/)?(\w+)/,o85888FAE]],[{extract:[[/meta property="og:image:width" content="(\d+)/,o06856E8A],[/meta property="og:image:height" content="(\d+)/,oF3C0ADD0]],match:o0E3C680A,url:"https:\/\/gifs.com\/gif\/{@id}"}]],"giphy":[[[/giphy\.com\/(gif|video|webp)\w+\/(?:[-\w]+-)*(\w+)/,oAB64EF36],[/giphy\.com\/media\/(\w+)\/\w+\.(gif|webp)/,oF5EDDAF6],[/i\.giphy\.com\/(\w+)\.(gif|webp)/,oF5EDDAF6]],[{extract:[[/"height"\s*:\s*(\d+)/,oF3C0ADD0],[/"width"\s*:\s*(\d+)/,o06856E8A]],match:o0E3C680A,url:"https:\/\/giphy.com\/services\/oembed?url=https:\/\/media.giphy.com\/media\/{@id}\/giphy.gif"}
297]],"gist":[[[/gist\.github\.com\/((?:\w+\/)?[\da-f]+(?:\/[\da-f]+)?)/,o85888FAE]],[]],"globalnews":[oD4A66010,[{extract:oD4A66010,match:[[/globalnews\.ca\/video\/rd\//,oB4E9AE58]]}]],"gofundme":[[[/gofundme\.com\/(\w+)(?![^#?])/,o85888FAE]],[]],"googledrive":[[[/drive\.google\.com\/.*?(?:file\/d\/|id=)([-\w]+)/,o85888FAE]],[]],"googleplus":[[[/\/\/plus\.google\.com\/(?:u\/\d+\/)?(?:\+([^\/]+)|(\d+))\/posts\/(\w+)/,["","name","oid","pid"]]],[]],"googlesheets":[[[/docs\.google\.com\/spreadsheet(?:\/ccc\?key=|(?:[^e]\/)+)((?:e\/)?[-\w]+)/,o85888FAE],[/oid=(\d+)/,["","oid"]],[/#gid=(\d+)/,["","gid"]],[/\/pub(chart)/,oD276C2BF]],[]],"hudl":[[[/hudl\.com\/athlete\/(\d+)\/highlights\/([\da-f]+)/,o86C6DC19],o3773CEC3,oF7034233],[{extract:[o3773CEC3,oF7034233],match:[[/hudl\.com\/v\//,oB4E9AE58]]}]],"hulu":[[],[{extract:[[/eid=([-\w]+)/,o85888FAE]],match:[[/hulu\.com\/watch\//,oB4E9AE58]]}]],"ign":[[[/(https?:\/\/.*?ign\.com\/videos\/.+)/i,o85888FAE]],[]],"imdb":[[[/imdb\.com\/[\/\w]+\/vi(\d+)/,o85888FAE]],[]],"imgur":[[[/imgur\.com\/(a\/\w+)/,o85888FAE],[/i\.imgur\.com\/(\w{5,7})[lms]?\./,o85888FAE],[/imgur\.com\/(\w+)(?![\w.\/])/,o85888FAE]],[{extract:[[/data-id="([\w\/]+)"/,o85888FAE]],match:[[/imgur\.com\/(?![art]\/|user\/)((?:gallery\/)?\w+)(?![\w.])/,["","path"]]],url:"https:\/\/api.imgur.com\/oembed.xml?url=\/{@path}"}]],"indiegogo":[[[/indiegogo\.com\/projects\/([-\w]+)/,o85888FAE]],[]],"instagram":[[[/instagram\.com\/(?:p|reel|tv)\/([-\w]+)/,o85888FAE]],[]],"internetarchive":[[],[{extract:[[/meta property="twitter:player" content="https:\/\/archive.org\/embed\/([^\/"]+)/,o85888FAE],[/meta property="og:video:width" content="(\d+)/,o06856E8A],[/meta property="og:video:height" content="(\d+)/,oF3C0ADD0]],match:[[/archive\.org\/(?:details|embed)\//,oB4E9AE58]]}]],"izlesene":[[[/izlesene\.com\/video\/[-\w]+\/(\d+)/,o85888FAE]],[]],"jsfiddle":[[[/jsfiddle.net\/(?:(\w+)\/)?(?!\d+\b|embedded\b|show\b)(\w+)\b(?:\/(\d+)\b)?/,["","user","id","revision"]]],[]],"jwplatform":[[[/jwplatform\.com\/\w+\/([-\w]+)/,o85888FAE]],[]],"kaltura":[[[/\/p(?:artner_id)?\/(\d+)\//,["","partner_id"]],[/\/sp\/(\d+)\//,["","sp"]],[/\/uiconf_id\/(\d+)\//,["","uiconf_id"]],[/\bentry_id[=\/](\w+)/,["","entry_id"]]],[{extract:[[/kaltura\.com\/+p\/(\d+)\/sp\/(\d+)\/\w*\/uiconf_id\/(\d+)\/.*?\bentry_id=(\w+)/,["","partner_id","sp","uiconf_id","entry_id"]]],match:[[/kaltura\.com\/(?:media\/t|tiny)\/./,oB4E9AE58]]}]],"khl":[[],[{extract:[[/\/feed\/start\/([\/\w]+)/,o85888FAE]],match:[[/video\.khl\.ru\/(?:event|quote)s\/\d/,oB4E9AE58]]}]],"kickstarter":[[[/kickstarter\.com\/projects\/([^\/]+\/[^\/?]+)(?:\/widget\/(?:(card)|(video)))?/,["","id","card","video"]]],[]],"libsyn":[[],[{extract:[[/embed\/episode\/id\/(\d+)/,o85888FAE]],match:[[/(?!\.mp3)....$/,oB4E9AE58]]}]],"liveleak":[[[/liveleak\.com\/(?:e\/|view\?i=)(\w+)/,o85888FAE]],[{extract:[[/liveleak\.com\/e\/(\w+)/,o85888FAE]],match:[[/liveleak\.com\/view\?t=/,oB4E9AE58]]}]],"livestream":[[[/livestream\.com\/accounts\/(\d+)\/events\/(\d+)/,oD0874E6E],[/\/videos\/(\d+)/,oC59CF925],[/original\.livestream\.com\/(\w+)\/video\?clipId=([-\w]+)/,o6ACB7DBF]],[{extract:[[/accounts\/(\d+)\/events\/(\d+)/,oD0874E6E]],match:[[/livestream\.com\/(?!accounts\/\d+\/events\/\d)/,oB4E9AE58]]},{extract:[[/\/\/original\.livestream\.com\/(\w+)\/video\/([-\w]+)/,o6ACB7DBF]],match:[[/livestre.am/,oB4E9AE58]]}]],"mailru":[[],[{extract:[[/"itemId": ?"?(\d+)/,o85888FAE]],match:[[/my\.mail\.ru\/\w+\/\w+\/video\/\w+\/\d/,oB4E9AE58]]}]],"medium":[[[/medium\.com\/(?:s\/\w+\/|@?\w+\/)?(?:\w+-)*([0-9a-f]+)/,o85888FAE]],[]],"megaphone":[[[/megaphone\.fm\/.*?\?(?:e|selected)=(\w+)/,o85888FAE],[/(?:dcs|player|traffic)\.megaphone\.fm\/(\w+)/,o85888FAE],[/megaphone\.link\/(\w+)/,o85888FAE]],[]],"metacafe":[[[/metacafe\.com\/watch\/(\d+)/,o85888FAE]],[]],"mixcloud":[[[/mixcloud\.com\/(?!categories|tag)([-\w]+\/[^\/&]+)\//,o85888FAE]],[]],"mixer":[[[/mixer.com\/(?!browse\/)(\w+)(?!\?clip|\w)(?:\?vod=([-\w]+))?/,["","channel","vod"]]],[]],"mlb":[[[/mlb\.com\/video\/(?:[-\w\/]+\/)?(?:c-|v|[-\w]+-c)(\d+)/,o85888FAE]],[]],"mrctv":[[],[{extract:[[/mrctv\.org\/embed\/(\d+)/,o85888FAE]],match:[[/mrctv\.org\/videos\/./,oB4E9AE58]]}]],"msnbc":[[],[{extract:[[/embedded-video\/(?!undefined)(\w+)/,o85888FAE]],match:[[/msnbc\.com\/[-\w]+\/watch\//,oB4E9AE58],[/on\.msnbc\.com\/./,oB4E9AE58]]}]],"natgeochannel":[[[/channel\.nationalgeographic\.com\/([-\/\w]+\/videos\/[-\w]+)/,o85888FAE]],[]],"natgeovideo":[[],[{extract:[[/guid="([-\w]+)"/,o85888FAE]],match:[[/video\.
297nationalgeographic\.com\/(?:tv|video)\/\w/,oB4E9AE58]]}]],"nbcnews":[[[/nbcnews\.com\/(?:widget\/video-embed\/|video\/[-\w]+-)(\d+)/,o85888FAE]],[]],"nbcsports":[[],[{extract:[[/select\/media\/(\w+)/,o85888FAE]],match:[[/nbcsports\.com\/video\/./,oB4E9AE58]]}]],"nhl":[[[/nhl\.com\/(?:\w+\/)?video(?:\/(?![ct]-)[-\w]+)?(?:\/t-(\d+))?(?:\/c-(\d+))?/,["","t","c"]]],[]],"npr":[[],[{extract:[[/player\/embed\/(\d+)\/(\d+)/,["","i","m"]]],header:"Cookie: trackingChoice=false; choiceVersion=1",match:[[/npr\.org\/[\/\w]+\/\d+/,oB4E9AE58],[/n\.pr\/\w/,oB4E9AE58]]}]],"nytimes":[[[/nytimes\.com\/video\/[a-z]+\/(?:[a-z]+\/)?(\d+)/,o85888FAE],[/nytimes\.com\/video\/\d+\/\d+\/\d+\/[a-z]+\/(\d+)/,o85888FAE]],[{extract:[[/\/video\/movies\/(\d+)/,o85888FAE]],match:[[/nytimes\.com\/movie(?:s\/movie)?\/(\d+)\/[-\w]+\/trailers/,["","playlist"]]],url:"http:\/\/www.nytimes.com\/svc\/video\/api\/playlist\/{@playlist}?externalId=true"}]],"orfium":[[[/album\/(\d+)/,oA60012B9],[/playlist\/(\d+)/,oB0695997],[/live-set\/(\d+)/,["","set_id"]],[/track\/(\d+)/,o5F5D8CFC]],[]],"pastebin":[[[/pastebin\.com\/(?!u\/)(?:\w+(?:\.php\?i=|\/))?(\w+)/,o85888FAE]],[]],"pinterest":[[[/pinterest.com\/pin\/(\d+)/,o85888FAE],[/pinterest.com\/(?!_\/|discover\/|explore\/|news_hub\/|pin\/|search\/)([-\w]+\/[-\w]+)/,o85888FAE]],[]],"podbean":[[[/podbean\.com\/media\/(?:player\/|share\/pb-)([-\w]+)/,o85888FAE]],[{extract:[[/podbean\.com\/media\/player\/([-\w]+)/,o85888FAE]],match:[[/podbean\.com\/(?:media\/shar)?e\/(?!pb-)/,oB4E9AE58]]}]],"prezi":[[[/\/\/prezi\.com\/(?!(?:a(?:bout|mbassadors)|c(?:o(?:llaborate|mmunity|ntact)|reate)|exp(?:erts|lore)|ip(?:ad|hone)|jobs|l(?:ear|ogi)n|m(?:ac|obility)|pr(?:es(?:s|ent)|icing)|recommend|support|user|windows|your)\/)(\w+)\//,o85888FAE]],[]],"reddit":[[[/(\w+\/comments\/\w+(?:\/\w+\/\w+)?)/,o85888FAE]],[]],"rumble":[[[/rumble\.com\/embed\/(\w+)/,o85888FAE]],[{extract:[[/video"?:"(\w+)/,o85888FAE]],match:[[/rumble\.com\/(?!embed\/)./,oB4E9AE58]]}]],"rutube":[[[/rutube\.ru\/(?:play\/embed|tracks)\/(\d+)/,o85888FAE]],[{extract:[[/rutube\.ru\/play\/embed\/(\d+)/,o85888FAE]],header:"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/89.0.0.0 Safari\/537.36",match:[[/rutube\.ru\/video\/([0-9a-f]{32})/,o3A598861]],url:"https:\/\/rutube.ru\/api\/oembed\/?url=https:\/\/rutube.ru\/video\/{@vid}\/"}]],"scribd":[[[/scribd\.com\/(?:mobile\/)?(?:doc(?:ument)?|presentation)\/(\d+)/,o85888FAE]],[]],"sendvid":[[[/sendvid\.com\/(\w+)/,o85888FAE]],[]],"slideshare":[[[/slideshare\.net\/[^\/]+\/[-\w]+-(\d{6,})$/,o85888FAE]],[{extract:[[/"presentationId":(\d+)/,o85888FAE]],match:[[/slideshare\.net\/[^\/]+\/\w(?![-\w]+-\d{6,}$)/,oB4E9AE58]]}]],"soundcloud":[[[/https?:\/\/(?:api\.)?soundcloud\.com\/(?!pages\/)([-\/\w]+\/[-\/\w]+|^[^\/]+\/[^\/]+$)/i,o85888FAE],[/api\.soundcloud\.com\/playlists\/(\d+)/,oB0695997],[/api\.soundcloud\.com\/tracks\/(\d+)(?:\?secret_token=([-\w]+))?/,["","track_id","secret_token"]],[/soundcloud\.com\/(?!playlists|tracks)[-\w]+\/[-\w]+\/(?=s-)([-\w]+)/,["","secret_token"]]],[{extract:[[/soundcloud:tracks:(\d+)/,o5F5D8CFC]],header:"User-agent: PHP (not Mozilla)",match:[[/soundcloud\.com\/(?!playlists\/\d|tracks\/\d)[-\w]+\/[-\w]/,oB4E9AE58]]},{extract:[[/soundcloud:\/\/playlists:(\d+)/,oB0695997]],header:"User-agent: PHP (not Mozilla)",match:[[/soundcloud\.com\/\w+\/sets\//,oB4E9AE58]]}]],"sporcle":[[[/sporcle.com\/framed\/.*?gid=(\w+)/,o85888FAE]],[{extract:[[/encodedGameID\W+(\w+)/,o85888FAE]],match:[[/sporcle\.com\/games\/(?!\w*category\/)[-\w]+\/[-\w]/,oB4E9AE58]]}]],"sportsnet":[[],[{extract:[[/bc_videos\s*:\s*(\d+)/,o85888FAE]],match:o0E3C680A}]],"spotify":[oD03A52D8,[{extract:oD03A52D8,header:"User-agent: PHP (not Mozilla)",match:[[/link\.tospotify\.com\/./,oB4E9AE58]]}]],"spreaker":[[[/spreaker\.com\/episode\/(\d+)/,o37C2EA3B]],[{extract:[[/episode_id=(\d+)/,o37C2EA3B],[/show_id=(\d+)/,["","show_id"]]],match:[[/(.+\/(?:show\/|user\/.+\/).+)/,["","url"]]],url:"https:\/\/api.spreaker.com\/oembed?format=json&url={@url}"}]],"steamstore":[[[/store.steampowered.com\/app\/(\d+)/,o85888FAE]],[]],"stitcher":[[[/\/(?:embed|splayer\/f)\/(\d+)\/(\d+)/,o28C25529]],[{extract:[[/\/embed\/(\d+)\/(\d+)/,o28C25529]],match:[[/\/(?:podcast\/|show\/|s\?)/,oB4E9AE58]]}]],"strawpoll":[[[/strawpoll\.me\/(\d+)/,o85888FAE]],[]],"streamable":[[[/streamable\.com\/(?:e\/)?(\w+)/,o85888FAE]],[]],"streamja":[[[/streamja\.com\/(?!login|signup|terms|videos)(\w+)/,o85888FAE]],[]],"teamcoco":[[[/teamcoco\.com\/video\/(\d+)/,o85888FAE]],[{extract:[[/embed\/v\/(\d+)/,o85888FAE]],match:[[/teamcoco\.com\/video\/\D/,oB4E9AE58]]}]],"ted":[[[/ted\.com\/((?:talk|playlist)s\/[-\w]+(?:\.html)?)(?![-\w]|\/transcript)/i,o85888FAE]],[]],"telegram":[[[/\/\/https:\/\/t.me\/(?!addstickers\/|joinchat\/)(\w+\/\d+)/,o85888FAE]],[]],"theatlantic":[[[/theatlantic\.com\/video\/index\/(\d+)/,o85888FAE]],[]],"theguardian":[[[/theguardian\.com\/(\w+\/video\/20(?:0[0-9]|1[0-7])[-\/\w]+)/,o85888FAE]],[]],"theonion":[[[/theonion\.com\/video\/[-\w]+[-,](\d+)/,o85888FAE]],[]],"tiktok":[[[/tiktok\.com\/(?:@[.\w]+\/video|v|i18n\/share\/video)\/(\d+)/,o85888FAE]],[{extract:[[/tiktok\.com\/@[.\w]+\/video\/(\d+)/,o85888FAE]],header:"User-agent: Mozilla\/5.0 (X11; Linux x86_64; rv:62.0) Gecko\/20100101 Firefox\/62.0",match:[[/\/\/vm\.tiktok\.com\/./,oB4E9AE58]]}]],"tmz":[[[/tmz\.com\/videos\/(\w+)/,o85888FAE]],[]],"tradingview":[[[/tradingview\.com\/(?:chart\/[^\/]+|i)\/(\w+)/,["","chart"]],[/tradingview\.com\/symbols\/([-:\w]+)/,["","symbol"]]],[]],"traileraddict":[[],[{extract:[[/v\.traileraddict\.com\/(\d+)/,o85888FAE]],match:[[/traileraddict\.com\/(?!tags\/)[^\/]+\/./,oB4E9AE58]]}]],"trendingviews":[[[/trendingviews.co\/(?:video|embed)\/(?:[^\/]+-)?(\d+)/,o85888FAE]],[]],"tumblr":[[[/([-\w]+)\.tumblr\.com\/post\/(\d+)/,["","name","id"]]],[{extract:[[/did=\\u0022([-\w]+)/,["","did"]],[/embed\\\/post\\\/([-\w]+)/,["","key"]]],header:"User-agent: curl",match:[[/\w\.tumblr\.com\/post\/\d/,oB4E9AE58]],url:"https:\/\/www.tumblr.com\/oembed\/1.0?url=https:\/\/{@name}.tumblr.com\/post\/{@id}"}]],"twentyfoursevensports":[o3C5A4C51,[{extract:o3C5A4C51,header:"User-agent: Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/73.0.3683.86 Safari\/537.36",match:[[/247sports\.com\/Player\/[-\w]*\d/,oB4E9AE58]]},{extract:[[/player_id%3[Dd](\d+)/,oC59CF925]],header:"User-agent: Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/73.0.3683.86 Safari\/537.36",match:[[/247sports\.com\/Video\/./,oB4E9AE58]]}]],"twitch":[[[/twitch\.tv\/(?:videos|\w+\/v)\/(\d+)?/,oC59CF925],[/www\.twitch\.tv\/(?!videos\/)(\w+)(?:\/clip\/([-\w]+))?/,o6ACB7DBF],[/t=((?:(?:\d+h)?\d+m)?\d+s)/,o90B2B224],[/clips\.twitch\.tv\/(?:(\w+)\/)?([-\w]+)/,o6ACB7DBF]],[]],"twitter":[[[/twitter\.com\/(?:#!\/|i\/)?\w+\/(?:status(?:es)?|tweet)\/(\d+)/,o85888FAE]],[]],"ustream":[[[/ustream\.tv\/recorded\/(\d+)/,o3A598861]],[{extract:[[o9338E0AD,["","cid"]]],match:[[/ustream\.tv\/(?!explore\/|platform\/|recorded\/|search\?|upcoming$|user\/)(?:channel\/)?[-\w]+/,oB4E9AE58]]}]],"vbox7":[[[/vbox7\.com\/play:([\da-f]+)/,o85888FAE]],[]],"veoh":[[[/veoh\.com\/(?:m\/watch\.php\?v=|watch\/)v(\w+)/,o85888FAE]],[]],"vevo":[[[/vevo\.com\/watch\/(.*?\/)?([A-Z]+\d+)/,["","","id"]]],[]],"videodetective":[[[/videodetective\.com\/\w+\/[-\w]+\/(?:trailer\/P0*)?(\d+)/,o85888FAE]],[]],"vimeo":[[[/vimeo\.com\/(?:channels\/[^\/]+\/|video\/)?(\d+)/,o85888FAE],[/#t=([\dhms]+)/,o90B2B224]],[]],"vine":[[[/vine\.co\/v\/([^\/]+)/,o85888FAE]],[]],"vk":[[[/vk(?:\.com|ontakte\.ru)\/(?:[\w.]+\?z=)?video(-?\d+)_(\d+).*?hash=([0-9a-f]+)/,o1BD7B50C],[/vk(?:\.com|ontakte\.ru)\/video_ext\.php\?oid=(-?\d+)&id=(\d+)&hash=([0-9a-f]+)/,o1BD7B50C]],[{extract:[[/meta property="og:video" content=".*?oid=(-?\d+).*?id=(\d+).*?hash=([0-9a-f]+)/,o1BD7B50C]],header:"User-agent: Mozilla\/5.0 (X11; Linux x86_64; rv:62.0) Gecko\/20100101 Firefox\/62.0",match:[[/^(?!.*?hash=)/,oB4E9AE58]]}]],"vocaroo":[[[/voca(?:\.ro|roo\.com)\/(?:i\/)?(\w+)/,o85888FAE]],[]],"vox":[[[/vox.com\/.*#ooid=([-\w]+)/,o85888FAE]],[]],"washingtonpost":[[[/washingtonpost\.com\/video\/c\/\w+\/([-0-9a-f]+)/,o85888FAE],[/washingtonpost\.com\/video\/[-\/\w]+\/([-0-9a-f]+)_video\.html/,o85888FAE]],[]],"wistia":[[[/wistia.com\/(?:(?:embed\/iframe|medias)\/|.*wmediaid=)(\w+)/,o85888FAE]],[{extract:[[/"type":"(audio)/,oD276C2BF]],match:[[/wistia.com\/(?:(?:embed\/iframe|medias)\/|.*wmediaid=)\w/,oB4E9AE58]],url:"https:\/\/fast.wistia.com\/oembed.json?url=https%3A%2F%2Ffast.wistia.com%2Fmedias%2F{@id}"}
297]],"wshh":[[[/worldstarhiphop\.com\/featured\/(\d+)/,o85888FAE]],[{extract:[[/v: ?"?(\d+)/,o85888FAE]],match:[[/worldstarhiphop\.com\/(?:\w+\/)?video\.php\?v=\w+/,oB4E9AE58]]}]],"wsj":[[[/wsj\.com\/[^#]*#!([-0-9A-F]{36})/,o85888FAE],[/wsj\.com\/video\/[^\/]+\/([-0-9A-F]{36})/,o85888FAE]],[{extract:[[/guid=([-0-9A-F]{36})/,o85888FAE]],match:[[/on\.wsj\.com\/\w/,oB4E9AE58]]}]],"xboxclips":[[[/(?:gameclips\.io|xboxclips\.com)\/(?!game\/)([^\/]+)\/(?!screenshots\/)([-0-9a-f]+)/,oEDE19F33]],[]],"xboxdvr":[[[/(?:gamer|xbox)dvr\.com\/gamer\/([^\/]+)\/video\/(\d+)/,oEDE19F33]],[]],"youku":[[[/youku\.com\/v(?:_show|ideo)\/id_(\w+=*)/,o85888FAE]],[]],"youtube":[[[/youtube\.com\/(?:watch.*?v=|v\/|attribution_link.*?v%3D)([-\w]+)/,o85888FAE],[/youtu\.be\/([-\w]+)/,o85888FAE],[/[#&?]t=(\d[\dhms]*)/,o90B2B224],[/[&?]list=([-\w]+)/,["","list"]]],[{extract:[[/\/vi\/([-\w]+)/,o85888FAE]],match:[[/\/shared\?ci=/,oB4E9AE58]]}]]},"urlConfig":{allowedSchemes:/^https?$/i}};var rootContext={allowed:o59C778D8,flags:40};var tagsConfig={"ABCNEWS":o1C8AA61D,"AMAZON":{allowed:o8706E0A9,attributes:{"id":o02D8DBB5,"tld":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"ANCHOR":o1C8AA61D,"AUDIOBOOM":o1C8AA61D,"AUDIOMACK":{allowed:o8706E0A9,attributes:{"artist":o1BC3EAF4,"mode":o1BC3EAF4,"title":
297o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"B":oF5133072,"BANDCAMP":{allowed:o8706E0A9,attributes:{"album_id":o1BC3EAF4,"track_id":o1BC3EAF4,"track_num":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"BBCNEWS":o1C8AA61D,"BITCHUTE":o1C8AA61D,"BLEACHERREPORT":o1C8AA61D,"BREAK":o1C8AA61D,"BRIGHTCOVE":{allowed:o8706E0A9,attributes:{"bckey":o1BC3EAF4,"bcpid":o1BC3EAF4,"bctid":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"C":{allowed:o82015558,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:66},tagLimit:5000},"CASTOS":{allowed:o8706E0A9,attributes:{"host":o1BC3EAF4,"id":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"CBSNEWS":o1C8AA61D,"CENTER":{allowed:o59C778D8,attributes:{},bitNumber:4,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"CLYP":o1C8AA61D,"CNBC":o1C8AA61D,"CNN":o1C8AA61D,"CNNMONEY":o1C8AA61D,"CODE":{allowed:o82015558,attributes:{"lang":oFB2F5649},bitNumber:4,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:4436,fosterParent:oD4869BFF},tagLimit:5000},"CODEPEN":o285DC803,"COLOR":{allowed:oCB183773,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:3,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000},"COMEDYCENTRAL":o1C8AA61D,"COUB":o1C8AA61D,"DAILYMOTION":{allowed:o8706E0A9,attributes:{"id":o1BC3EAF4,"t":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"DEL":{allowed:o59C778D8,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:512},tagLimit:5000},"DEMOCRACYNOW":o1C8AA61D,"DUMPERT":o1C8AA61D,"E":{allowed:oA9ACF916,attributes:{},bitNumber:8,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"EIGHTTRACKS":o1C8AA61D,"EM":oF5133072,"EMAIL":{allowed:o6F423A3F,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},"ESPN":o1C8AA61D,"FACEBOOK":{allowed:o8706E0A9,attributes:{"id":o1BC3EAF4,"type":o1BC3EAF4,"user":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"FALSTAD":{allowed:o8706E0A9,attributes:{"cct":o1BC3EAF4,"ctz":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"FLICKR":o1C8AA61D,"FOXNEWS":o1C8AA61D,"FP":oCCD33097,"FUNNYORDIE":o1C8AA61D,"GAMESPOT":o1C8AA61D,"GAMETRAILERS":o1C8AA61D,"GETTY":{allowed:o8706E0A9,attributes:{"et":o1BC3EAF4,"height":o9244B582,"id":o1BC3EAF4,"sig":o1BC3EAF4,"width":o28FFC5A0},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"GFYCAT":o57881CFF,"GIFS":o57881CFF,"GIPHY":{allowed:o8706E0A9,attributes:{"height":o9244B582,"id":o1BC3EAF4,"type":o1BC3EAF4,"width":o28FFC5A0},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"GIST":o1C8AA61D,"GLOBALNEWS":o1C8AA61D,"GOFUNDME":o1C8AA61D,"GOOGLEDRIVE":o1C8AA61D,"GOOGLEPLUS":{allowed:o8706E0A9,attributes:{"name":{filterChain:[function(attrValue,attrName){return(function(str){return decodeURIComponent(""+str)})(attrValue)}],required:!1},"oid":o1BC3EAF4,"pid":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"GOOGLESHEETS":{allowed:o8706E0A9,attributes:{"gid":o1BC3EAF4,"id":o1BC3EAF4,"oid":o1BC3EAF4,"type":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"H1":o620084AE,"H2":o620084AE,"H3":o620084AE,"H4":o620084AE,"H5":o620084AE,"H6":o620084AE,"HE":oCCD33097,"HR":{allowed:oA9ACF916,attributes:{},bitNumber:4,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:3349},tagLimit:5000},"HUDL":{allowed:o8706E0A9,attributes:{"athlete":o1BC3EAF4,"highlight":o1BC3EAF4,"id":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"HULU":o1C8AA61D,"I":oF5133072,"IGN":o1C8AA61D,"IMDB":o1C8AA61D,"IMG":{allowed:oA9ACF916,attributes:{"alt":o1BC3EAF4,"height":o75AB9259,"src":oF307D35C,"title":
297o1BC3EAF4,"width":o75AB9259},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"IMGUR":o1C8AA61D,"INDIEGOGO":o1C8AA61D,"INSTAGRAM":o1C8AA61D,"INTERNETARCHIVE":{allowed:o8706E0A9,attributes:{"height":o9244B582,"id":{filterChain:[returnFalse],required:!1},"width":o28FFC5A0},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"ISPOILER":o212FA0B5,"IZLESENE":o1C8AA61D,"JSFIDDLE":{allowed:o8706E0A9,attributes:{"id":o1BC3EAF4,"revision":o1BC3EAF4,"user":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"JWPLATFORM":o1C8AA61D,"KALTURA":{allowed:o8706E0A9,attributes:{"entry_id":o02D8DBB5,"partner_id":o02D8DBB5,"sp":o1BC3EAF4,"uiconf_id":o02D8DBB5},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"KHL":o1C8AA61D,"KICKSTARTER":{allowed:o8706E0A9,attributes:{"card":o1BC3EAF4,"id":o1BC3EAF4,"video":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"LI":{allowed:o59C778D8,attributes:{},bitNumber:6,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},"LIBSYN":o1C8AA61D,"LIST":{allowed:[65345,7938],attributes:{"start":o75AB9259,"type":{filterChain:[function(attrValue,attrName){return HashmapFilter.filter(attrValue,{"A":"upper-alpha","I":"upper-roman","a":"lower-alpha","i":"lower-roman","1":"decimal"},!1)},function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^[- +,.0-9A-Za-z_]+$/)}],required:!1}},bitNumber:4,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,createChild:["LI"],flags:3460,fosterParent:oD4869BFF},tagLimit:5000},"LIVELEAK":o1C8AA61D,"LIVESTREAM":{allowed:o8706E0A9,attributes:{"account_id":o1BC3EAF4,"channel":o1BC3EAF4,"clip_id":o1BC3EAF4,"event_id":o1BC3EAF4,"video_id":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"MAILRU":o1C8AA61D,"MEDIA":{allowed:[65471,7937],attributes:{},bitNumber:9,filterChain:[function(tag,tagConfig){return(function(tag,hosts,sites,cacheDir){function filterTag(tag,hosts,sites){tag.invalidate();if(tag.hasAttribute('url')){var url=tag.getAttribute('url'),siteId=getSiteIdFromUrl(url,hosts);if(sites[siteId]){var attributes=getAttributes(url,sites[siteId]);if(!empty(attributes)){createTag(siteId.toUpperCase(),tag).setAttributes(attributes)}}}} 298function addNamedCaptures(attributes,string,regexps){var matched=!1;regexps.forEach(function(pair){var regexp=pair[0],map=pair[1],m=regexp.exec(string);if(!m){return} 299matched=!0;map.forEach(function(name,i){if(m[i]>''&&name>''){attributes[name]=m[i]}})});return matched} 300function createTag(tagName,tag){var startPos=tag.getPos(),endTag=tag.getEndTag(),startLen,endPos,endLen;if(endTag){startLen=tag.getLen();endPos=endTag.getPos();endLen=endTag.getLen()}else{startLen=0;endPos=tag.getPos()+tag.getLen();endLen=0} 301return addTagPair(tagName,startPos,startLen,endPos,endLen,tag.getSortPriority())} 302function empty(attributes){for(var attrName in attributes){return!1} 303return!0} 304function getAttributes(url,config){var attributes={};addNamedCaptures(attributes,url,config[0]);return attributes} 305function getSiteIdFromUrl(url,hosts){var m=/^https?:\/\/([^\/]+)/.exec(url.toLowerCase()),host=m[1]||'';while(host>''){if(hosts[host]){return hosts[host]} 306host=host.replace(/^[^.]*./,'')} 307return''} 308filterTag(tag,hosts,sites)})(tag,registeredVars["MediaEmbed.hosts"],registeredVars["MediaEmbed.sites"],registeredVars.cacheDir)}],nestingLimit:10,rules:{flags:513},tagLimit:5000},"MEDIUM":o1C8AA61D,"MEGAPHONE":o1C8AA61D,"METACAFE":o1C8AA61D,"MIXCLOUD":o1C8AA61D,"MIXER":{allowed:o8706E0A9,attributes:{"channel":o1BC3EAF4,"vod":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"MLB":o1C8AA61D,"MRCTV":o1C8AA61D,"MSNBC":o1C8AA61D,"NATGEOCHANNEL":o1C8AA61D,"NATGEOVIDEO":o1C8AA61D,"NBCNEWS":o1C8AA61D,"NBCSPORTS":o1C8AA61D,"NHL":{allowed:o8706E0A9,attributes:{"c":o1BC3EAF4,"t":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"NPR":{allowed:o8706E0A9,attributes:{"i":o1BC3EAF4,"m":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"NYTIMES":o1C8AA61D,"ORFIUM":{allowed:o8706E0A9,attributes:{"album_id":o1BC3EAF4,"playlist_id":o1BC3EAF4,"set_id":o1BC3EAF4,"track_id":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"PASTEBIN":o1C8AA61D,"PINTEREST":o1C8AA61D,"PODBEAN":o1C8AA61D,"POSTMENTION":{allowed:oA9ACF916,attributes:{"discussionid":o6CB0A318,"displayname":o02D8DBB5,"id":o6CB0A318,"number":o6CB0A318,"username":o02D8DBB5},bitNumber:1,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterPostMentions(tag)})(tag)},o118B31AC],nestingLimit:10,rules:oA80287CC,tagLimit:5000},"PREZI":o1C8AA61D,"QUOTE":{allowed:o59C778D8,attributes:{"author":o1BC3EAF4},bitNumber:4,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"REDDIT":o1C8AA61D,"RUMBLE":o1C8AA61D,"RUTUBE":o1C8AA61D,"S":oF5133072,"SCRIBD":o1C8AA61D,"SENDVID":o1C8AA61D,"SIZE":{allowed:oCB183773,attributes:{"size":{filterChain:[function(attrValue,attrName){return NumericFilter.filterRange(attrValue,8,36,logger)}],required:!0}},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000},"SLIDESHARE":o1C8AA61D,"SOUNDCLOUD":{allowed:o8706E0A9,attributes:{"id":o1BC3EAF4,"playlist_id":o1BC3EAF4,"secret_token":o1BC3EAF4,"track_id":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"SPOILER":{allowed:o59C778D8,attributes:{},bitNumber:7,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"SPORCLE":o1C8AA61D,"SPORTSNET":o1C8AA61D,"SPOTIFY":o1C8AA61D,"SPREAKER":{allowed:o8706E0A9,attributes:{"episode_id":o1BC3EAF4,"show_id":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"STEAMSTORE":o1C8AA61D,"STITCHER":{allowed:o8706E0A9,attributes:{"eid":o1BC3EAF4,"fid":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"STRAWPOLL":o1C8AA61D,"STREAMABLE":o1C8AA61D,"STREAMJA":o1C8AA61D,"STRONG":oF5133072,"SUB":o212FA0B5,"SUP":o212FA0B5,"TABLE":{allowed:[65281,7958],attributes:{},bitNumber:4,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:3460,fosterParent:oD4869BFF},tagLimit:5000},"TBODY":{allowed:o42DE1101,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,"TBODY":1,"TD":1,"TH":1,"THEAD":1,"TR":1,"U":1,"URL":1},flags:3456,fosterParent:oD4869BFF},tagLimit:5000},"TD":{allowed:o59C778D8,attributes:oB55F46D1,bitNumber:11,filterChain:o1B4F5B52,nestingLimit:10,rules:o2ACFCB30,tagLimit:5000},"TEAMCOCO":o1C8AA61D,"TED":o1C8AA61D,"TELEGRAM":o1C8AA61D,"TH":{allowed:[57247,7939],attributes:oB55F46D1,bitNumber:11,filterChain:o1B4F5B52,nestingLimit:10,rules:o2ACFCB30,tagLimit:5000},"THEAD":{allowed:o42DE1101,attributes:{},bitNumber:10,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:3456,fosterParent:oD4869BFF},tagLimit:5000},"THEATLANTIC":o1C8AA61D,"THEGUARDIAN":o1C8AA61D,"THEONION":o1C8AA61D,"TIKTOK":o1C8AA61D,"TMZ":o1C8AA61D,"TR":{allowed:[65281,7946],attributes:{},bitNumber:12,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},"TRADINGVIEW":{allowed:o8706E0A9,attributes:{"chart":o1BC3EAF4,"symbol":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"TRAILERADDICT":o1C8AA61D,"TRENDINGVIEWS":o1C8AA61D,"TUMBLR":{allowed:o8706E0A9,attributes:{"did":o1BC3EAF4,"id":o1BC3EAF4,"key":o1BC3EAF4,"name":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"TWENTYFOURSEVENSPORTS":{allowed:o8706E0A9,attributes:{"player_id":o1BC3EAF4,"video_id":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"TWITCH":{allowed:o8706E0A9,attributes:{"channel":o1BC3EAF4,"clip_id":o1BC3EAF4,"t":o1BC3EAF4,"video_id":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"TWITTER":o1C8AA61D,"U":oF5133072,"URL":{allowed:o6F423A3F,attributes:{"title":
308o1BC3EAF4,"url":oF307D35C},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:o939F1698,tagLimit:5000},"USERMENTION":{allowed:oA9ACF916,attributes:{"displayname":o02D8DBB5,"id":o6CB0A318,"username":o02D8DBB5},bitNumber:1,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterUserMentions(tag)})(tag)},o118B31AC],nestingLimit:10,rules:oA80287CC,tagLimit:5000},"USTREAM":{allowed:o8706E0A9,attributes:{"cid":o1BC3EAF4,"vid":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"VBOX7":o1C8AA61D,"VEOH":{allowed:o8706E0A9,attributes:o251A6FB9,bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"VEVO":o1C8AA61D,"VIDEO":{allowed:[261,771],attributes:{"src":oF307D35C},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"VIDEODETECTIVE":o1C8AA61D,"VIMEO":{allowed:o8706E0A9,attributes:{"id":o1BC3EAF4,"t":o0967AFCF},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"VINE":o1C8AA61D,"VK":{allowed:o8706E0A9,attributes:{"hash":o1BC3EAF4,"oid":o1BC3EAF4,"vid":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"VOCAROO":o1C8AA61D,"VOX":o1C8AA61D,"WASHINGTONPOST":o1C8AA61D,"WISTIA":{allowed:o8706E0A9,attributes:{"id":o1BC3EAF4,"type":o1BC3EAF4},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"WSHH":o1C8AA61D,"WSJ":o1C8AA61D,"XBOXCLIPS":o285DC803,"XBOXDVR":o285DC803,"YOUKU":o1C8AA61D,"YOUTUBE":{allowed:o8706E0A9,attributes:{"id":oFB2F5649,"list":o1BC3EAF4,"t":o0967AFCF},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000}};var tagStack;var tagStackIsSorted;var text;var textLen;var uid=0;var wsPos;function disableTag(tagName){if(tagsConfig[tagName]){copyTagConfig(tagName).isDisabled=!0}} 309function enableTag(tagName){if(tagsConfig[tagName]){copyTagConfig(tagName).isDisabled=!1}} 310function getLogger(){return logger} 311function parse(_text){reset(_text);var _uid=uid;executePluginParsers();processTags();finalizeOutput();if(uid!==_uid){throw 'The parser has been reset during execution'} 312if(currentFixingCost>maxFixingCost){logger.warn('Fixing cost limit exceeded')} 313return output} 314function reset(_text){_text=_text.replace(/\r\n?/g,"\n");_text=_text.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]+/g,'');logger.clear();cntOpen={};cntTotal={};currentFixingCost=0;currentTag=null;isRich=!1;namespaces={};openTags=[];output='';pos=0;tagStack=[];tagStackIsSorted=!1;text=_text;textLen=text.length;wsPos=0;context=rootContext;context.inParagraph=!1;++uid} 315function setTagLimit(tagName,tagLimit){if(tagsConfig[tagName]){copyTagConfig(tagName).tagLimit=tagLimit}} 316function setNestingLimit(tagName,nestingLimit){if(tagsConfig[tagName]){copyTagConfig(tagName).nestingLimit=nestingLimit}} 317function copyTagConfig(tagName){var tagConfig={},k;for(k in tagsConfig[tagName]){tagConfig[k]=tagsConfig[tagName][k]} 318return tagsConfig[tagName]=tagConfig} 319function encodeUnicodeSupplementaryCharacters(){output=output.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,encodeUnicodeSupplementaryCharactersCallback)} 320function encodeUnicodeSupplementaryCharactersCallback(pair){var cp=(pair.charCodeAt(0)<<10)+pair.charCodeAt(1)-56613888;return'&#'+cp+';'} 321function finalizeOutput(){var tmp;outputText(textLen,0,!0);do{tmp=output;output=output.replace(/<([^ />]+)[^>]*><\/\1>/g,'')} 322while(output!==tmp);output=output.replace(/<\/i><i>/g,'');output=output.replace(/[\x00-\x08\x0B-\x1F]/g,'');encodeUnicodeSupplementaryCharacters();var tagName=(isRich)?'r':'t';tmp='<'+tagName;if(HINT.namespaces){for(var prefix in namespaces){tmp+=' xmlns:'+prefix+'="urn:s9e:TextFormatter:'+prefix+'"'}} 323output=tmp+'>'+output+'</'+tagName+'>'} 324function outputTag(tag){isRich=!0;var tagName=tag.getName(),tagPos=tag.getPos(),tagLen=tag.getLen(),tagFlags=tag.getFlags(),skipBefore=0,skipAfter=0;if(HINT.RULE_IGNORE_WHITESPACE&&(tagFlags&RULE_IGNORE_WHITESPACE)){skipBefore=1;skipAfter=(tag.isEndTag())?2:1} 325var closeParagraph=!!(!tag.isStartTag()||(HINT.RULE_BREAK_PARAGRAPH&&(tagFlags&RULE_BREAK_PARAGRAPH)));outputText(tagPos,skipBefore,closeParagraph);var tagText=(tagLen)?htmlspecialchars_noquotes(text.substr(tagPos,tagLen)):'';if(tag.isStartTag()){if(!HINT.RULE_BREAK_PARAGRAPH||!(tagFlags&RULE_BREAK_PARAGRAPH)){outputParagraphStart(tagPos)} 326if(HINT.namespaces){var colonPos=tagName.indexOf(':');if(colonPos>0){namespaces[tagName.substr(0,colonPos)]=0}} 327output+='<'+tagName;var attributes=tag.getAttributes(),attributeNames=[];for(var attrName in attributes){attributeNames.push(attrName)} 328attributeNames.sort(function(a,b){return(a>b)?1:-1});
328attributeNames.forEach(function(attrName){output+=' '+attrName+'="'+htmlspecialchars_compat(attributes[attrName].toString()).replace(/\n/g,' ')+'"'});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>'} 329output+='</'+tagName+'>'} 330pos=tagPos+tagLen;wsPos=pos;while(skipAfter&&wsPos<textLen&&text[wsPos]==="\n"){--skipAfter;++wsPos}} 331function outputText(catchupPos,maxLines,closeParagraph){if(closeParagraph){if(!(context.flags&RULE_CREATE_PARAGRAPHS)){closeParagraph=!1}else{maxLines=-1}} 332if(pos>=catchupPos){if(closeParagraph){outputParagraphEnd()}} 333if(wsPos>pos){var skipPos=Math.min(catchupPos,wsPos);output+=text.substr(pos,skipPos-pos);pos=skipPos;if(pos>=catchupPos){if(closeParagraph){outputParagraphEnd()}}} 334var catchupLen,catchupText;if(HINT.RULE_IGNORE_TEXT&&context.flags&RULE_IGNORE_TEXT){catchupLen=catchupPos-pos,catchupText=text.substr(pos,catchupLen);if(!/^[ \n\t]*$/.test(catchupText)){catchupText='<i>'+htmlspecialchars_noquotes(catchupText)+'</i>'} 335output+=catchupText;pos=catchupPos;if(closeParagraph){outputParagraphEnd()} 336return} 337var ignorePos=catchupPos,ignoreLen=0;while(maxLines&&--ignorePos>=pos){var c=text[ignorePos];if(c!==' '&&c!=="\n"&&c!=="\t"){break} 338if(c==="\n"){--maxLines} 339++ignoreLen} 340catchupPos-=ignoreLen;if(HINT.RULE_CREATE_PARAGRAPHS&&context.flags&RULE_CREATE_PARAGRAPHS){if(!context.inParagraph){outputWhitespace(catchupPos);if(catchupPos>pos){outputParagraphStart(catchupPos)}} 341var pbPos=text.indexOf("\n\n",pos);while(pbPos>-1&&pbPos<catchupPos){outputText(pbPos,0,!0);outputParagraphStart(catchupPos);pbPos=text.indexOf("\n\n",pos)}} 342if(catchupPos>pos){catchupText=htmlspecialchars_noquotes(text.substr(pos,catchupPos-pos));if(HINT.RULE_ENABLE_AUTO_BR&&(context.flags&RULES_AUTO_LINEBREAKS)===RULE_ENABLE_AUTO_BR){catchupText=catchupText.replace(/\n/g,"<br/>\n")} 343output+=catchupText} 344if(closeParagraph){outputParagraphEnd()} 345if(ignoreLen){output+=text.substr(catchupPos,ignoreLen)} 346pos=catchupPos+ignoreLen} 347function outputBrTag(tag){outputText(tag.getPos(),0,!1);output+='<br/>'} 348function outputIgnoreTag(tag){var tagPos=tag.getPos(),tagLen=tag.getLen();var ignoreText=text.substr(tagPos,tagLen);outputText(tagPos,0,!1);output+='<i>'+htmlspecialchars_noquotes(ignoreText)+'</i>';isRich=!0;pos=tagPos+tagLen} 349function outputParagraphStart(maxPos){if(!HINT.RULE_CREATE_PARAGRAPHS){return} 350if(context.inParagraph||!(context.flags&RULE_CREATE_PARAGRAPHS)){return} 351outputWhitespace(maxPos);if(pos<textLen){output+='<p>';context.inParagraph=!0}} 352function outputParagraphEnd(){if(!context.inParagraph){return} 353output+='</p>';context.inParagraph=!1} 354function outputVerbatim(tag){var flags=context.flags;context.flags=tag.getFlags();outputText(currentTag.getPos()+currentTag.getLen(),0,!1);context.flags=flags} 355function outputWhitespace(maxPos){while(pos<maxPos&&" \n\t".indexOf(text[pos])>-1){output+=text[pos];++pos}} 356function disablePlugin(pluginName){if(plugins[pluginName]){plugins[pluginName].isDisabled=!0}} 357function enablePlugin(pluginName){if(plugins[pluginName]){plugins[pluginName].isDisabled=!1}} 358function executePluginParser(pluginName){var pluginConfig=plugins[pluginName];if(pluginConfig.quickMatch&&text.indexOf(pluginConfig.quickMatch)<0){return} 359var matches=[];if(HINT.regexp&&HINT.regexpLimit&&typeof pluginConfig.regexp!=='undefined'&&typeof pluginConfig.regexpLimit!=='undefined'){matches=getMatches(pluginConfig.regexp,pluginConfig.regexpLimit);if(!matches.length){return}} 360getPluginParser(pluginName)(text,matches)} 361function executePluginParsers(){for(var pluginName in plugins){if(!plugins[pluginName].isDisabled){executePluginParser(pluginName)}}} 362function getMatches(regexp,limit){regexp.lastIndex=0;var matches=[],cnt=0,m;while(++cnt<=limit&&(m=regexp.exec(text))){var pos=m.index,match=[[m[0],pos]],i=0;while(++i<m.length){var str=m[i];if(str===undefined){match.push(['',-1])}else{match.push([str,text.indexOf(str,pos)]);pos+=str.length}} 363matches.push(match)} 364return matches} 365function getPluginParser(pluginName){return plugins[pluginName].parser} 366function registerParser(pluginName,parser,regexp,limit){if(!plugins[pluginName]){plugins[pluginName]={}} 367if(regexp){plugins[pluginName].regexp=regexp;plugins[pluginName].limit=limit||Infinity} 368plugins[pluginName].parser=parser} 369function closeAncestor(tag){if(!HINT.closeAncestor){return!1} 370if(openTags.length){var tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.closeAncestor){var i=openTags.length;while(--i>=0){var ancestor=openTags[i],ancestorName=ancestor.getName();if(tagConfig.rules.closeAncestor[ancestorName]){++currentFixingCost;tagStack.push(tag);addMagicEndTag(ancestor,tag.getPos(),tag.getSortPriority()-1);return!0}}}} 371return!1} 372function closeParent(tag){if(!HINT.closeParent){return!1} 373if(openTags.length){var tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.closeParent){var parent=openTags[openTags.length-1],parentName=parent.getName();if(tagConfig.rules.closeParent[parentName]){++currentFixingCost;tagStack.push(tag);addMagicEndTag(parent,tag.getPos(),tag.getSortPriority()-1);return!0}}} 374return!1} 375function createChild(tag){if(!HINT.createChild){return} 376var tagConfig=tagsConfig[tag.getName()];if(tagConfig.rules.createChild){var priority=-1000,_text=text.substr(pos),tagPos=pos+_text.length-_text.replace(/^[ \n\r\t]+/,'').length;tagConfig.rules.createChild.forEach(function(tagName){addStartTag(tagName,tagPos,0,++priority)})}} 377function fosterParent(tag){if(!HINT.fosterParent){return!1} 378if(openTags.length){var tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.fosterParent){var parent=openTags[openTags.length-1],parentName=parent.getName();if(tagConfig.rules.fosterParent[parentName]){if(parentName!==tagName&¤tFixingCost<maxFixingCost){addFosterTag(tag,parent)} 379tagStack.push(tag);addMagicEndTag(parent,tag.getPos(),tag.getSortPriority()-1);currentFixingCost+=4;return!0}}} 380return!1} 381function requireAncestor(tag){if(!HINT.requireAncestor){return!1} 382var tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.requireAncestor){var i=tagConfig.rules.requireAncestor.length;while(--i>=0){var ancestorName=tagConfig.rules.requireAncestor[i];if(cntOpen[ancestorName]){return!1}} 383logger.err('Tag requires an ancestor',{'requireAncestor':tagConfig.rules.requireAncestor.join(', '),'tag':tag});return!0} 384return!1} 385function addFosterTag(tag,fosterTag){var coords=getMagicStartCoords(tag.getPos()+tag.getLen()),childPos=coords[0],childPrio=coords[1];var childTag=addCopyTag(fosterTag,childPos,0,childPrio);tag.cascadeInvalidationTo(childTag)} 386function addMagicEndTag(startTag,tagPos,prio){var tagName=startTag.getName();if(HINT.RULE_IGNORE_WHITESPACE&&((currentTag.getFlags()|startTag.getFlags())&RULE_IGNORE_WHITESPACE)){tagPos=getMagicEndPos(tagPos)} 387var endTag=addEndTag(tagName,tagPos,0,prio||0);endTag.pairWith(startTag);return endTag} 388function getMagicEndPos(tagPos){while(tagPos>pos&&WHITESPACE.indexOf(text[tagPos-1])>-1){--tagPos} 389return tagPos} 390function getMagicStartCoords(tagPos){var nextPos,nextPrio,nextTag,prio;if(!tagStack.length){nextPos=textLen+1;nextPrio=0}else{nextTag=tagStack[tagStack.length-1];nextPos=nextTag.getPos();nextPrio=nextTag.getSortPriority()} 391while(tagPos<nextPos&&WHITESPACE.indexOf(text[tagPos])>-1){++tagPos} 392prio=(tagPos===nextPos)?nextPrio-1:0;return[tagPos,prio]} 393function isFollowedByClosingTag(tag){return(!tagStack.length)?!1:tagStack[tagStack.length-1].canClose(tag)} 394function processTags(){if(!tagStack.length){return} 395for(var tagName in tagsConfig){cntOpen[tagName]=0;cntTotal[tagName]=0} 396do{while(tagStack.length){if(!tagStackIsSorted){sortTags()} 397currentTag=tagStack.pop();processCurrentTag()}
398openTags.forEach(function(startTag){addMagicEndTag(startTag,textLen)})} 399while(tagStack.length);} 400function processCurrentTag(){if((context.flags&RULE_IGNORE_TAGS)&&!currentTag.canClose(openTags[openTags.length-1])&&!currentTag.isSystemTag()){currentTag.invalidate()} 401var tagPos=currentTag.getPos(),tagLen=currentTag.getLen();if(pos>tagPos&&!currentTag.isInvalid()){var startTag=currentTag.getStartTag();if(startTag&&openTags.indexOf(startTag)>=0){addEndTag(startTag.getName(),pos,Math.max(0,tagPos+tagLen-pos)).pairWith(startTag);return} 402if(currentTag.isIgnoreTag()){var ignoreLen=tagPos+tagLen-pos;if(ignoreLen>0){addIgnoreTag(pos,ignoreLen);return}} 403currentTag.invalidate()} 404if(currentTag.isInvalid()){return} 405if(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)}} 406function processStartTag(tag){var tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(cntTotal[tagName]>=tagConfig.tagLimit){logger.err('Tag limit exceeded',{'tag':tag,'tagName':tagName,'tagLimit':tagConfig.tagLimit});tag.invalidate();return} 407filterTag(tag);if(tag.isInvalid()){return} 408if(currentFixingCost<maxFixingCost){if(fosterParent(tag)||closeParent(tag)||closeAncestor(tag)){return}} 409if(cntOpen[tagName]>=tagConfig.nestingLimit){logger.err('Nesting limit exceeded',{'tag':tag,'tagName':tagName,'nestingLimit':tagConfig.nestingLimit});tag.invalidate();return} 410if(!tagIsAllowed(tagName)){var msg='Tag is not allowed in this context',context={'tag':tag,'tagName':tagName};if(tag.getLen()>0){logger.warn(msg,context)}else{logger.debug(msg,context)} 411tag.invalidate();return} 412if(requireAncestor(tag)){tag.invalidate();return} 413if(HINT.RULE_AUTO_CLOSE&&tag.getFlags()&RULE_AUTO_CLOSE&&!tag.isSelfClosingTag()&&!tag.getEndTag()&&!isFollowedByClosingTag(tag)){var newTag=new Tag(Tag.SELF_CLOSING_TAG,tagName,tag.getPos(),tag.getLen());newTag.setAttributes(tag.getAttributes());newTag.setFlags(tag.getFlags());tag=newTag} 414if(HINT.RULE_TRIM_FIRST_LINE&&tag.getFlags()&RULE_TRIM_FIRST_LINE&&text[tag.getPos()+tag.getLen()]==="\n"){addIgnoreTag(tag.getPos()+tag.getLen(),1)} 415outputTag(tag);pushContext(tag);createChild(tag)} 416function processEndTag(tag){var tagName=tag.getName();if(!cntOpen[tagName]){return} 417var closeTags=[];var i=openTags.length;while(--i>=0){var openTag=openTags[i];if(tag.canClose(openTag)){break} 418closeTags.push(openTag);++currentFixingCost} 419if(i<0){logger.debug('Skipping end tag with no start tag',{'tag':tag});return} 420var flags=tag.getFlags();closeTags.forEach(function(openTag){flags|=openTag.getFlags()});var ignoreWhitespace=(HINT.RULE_IGNORE_WHITESPACE&&(flags&RULE_IGNORE_WHITESPACE));var keepReopening=HINT.RULE_AUTO_REOPEN&&(currentFixingCost<maxFixingCost),reopenTags=[];closeTags.forEach(function(openTag){var openTagName=openTag.getName();if(keepReopening){if(openTag.getFlags()&RULE_AUTO_REOPEN){reopenTags.push(openTag)}else{keepReopening=!1}} 421var tagPos=tag.getPos();if(ignoreWhitespace){tagPos=getMagicEndPos(tagPos)} 422var endTag=new Tag(Tag.END_TAG,openTagName,tagPos,0);endTag.setFlags(openTag.getFlags());outputTag(endTag);popContext()});outputTag(tag);popContext();if(closeTags.length&¤tFixingCost<maxFixingCost){var ignorePos=pos;i=tagStack.length;while(--i>=0&&++currentFixingCost<maxFixingCost){var upcomingTag=tagStack[i];if(upcomingTag.getPos()>ignorePos||upcomingTag.isStartTag()){break} 423var j=closeTags.length;while(--j>=0&&++currentFixingCost<maxFixingCost){if(upcomingTag.canClose(closeTags[j])){closeTags.splice(j,1);if(reopenTags[j]){reopenTags.splice(j,1)} 424ignorePos=Math.max(ignorePos,upcomingTag.getPos()+upcomingTag.getLen());break}}} 425if(ignorePos>pos){outputIgnoreTag(new Tag(Tag.SELF_CLOSING_TAG,'i',pos,ignorePos-pos))}}
426reopenTags.forEach(function(startTag){var newTag=addCopyTag(startTag,pos,0);var endTag=startTag.getEndTag();if(endTag){newTag.pairWith(endTag)}})} 427function popContext(){var tag=openTags.pop();--cntOpen[tag.getName()];context=context.parentContext} 428function pushContext(tag){var tagName=tag.getName(),tagFlags=tag.getFlags(),tagConfig=tagsConfig[tagName];++cntTotal[tagName];if(tag.isSelfClosingTag()){return} 429var allowed=[];context.allowed.forEach(function(v,k){if(!HINT.RULE_IS_TRANSPARENT||!(tagFlags&RULE_IS_TRANSPARENT)){v=(v&0xFF00)|(v>>8)} 430allowed.push(tagConfig.allowed[k]&v)});var flags=tagFlags|(context.flags&RULES_INHERITANCE);if(flags&RULE_DISABLE_AUTO_BR){flags&=~RULE_ENABLE_AUTO_BR} 431++cntOpen[tagName];openTags.push(tag);context={parentContext:context};context.allowed=allowed;context.flags=flags} 432function tagIsAllowed(tagName){var n=tagsConfig[tagName].bitNumber;return!!(context.allowed[n>>3]&(1<<(n&7)))} 433function addStartTag(name,pos,len,prio){return addTag(Tag.START_TAG,name,pos,len,prio||0)} 434function addEndTag(name,pos,len,prio){return addTag(Tag.END_TAG,name,pos,len,prio||0)} 435function addSelfClosingTag(name,pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,name,pos,len,prio||0)} 436function addBrTag(pos,prio){return addTag(Tag.SELF_CLOSING_TAG,'br',pos,0,prio||0)} 437function addIgnoreTag(pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,'i',pos,Math.min(len,textLen-pos),prio||0)} 438function addParagraphBreak(pos,prio){return addTag(Tag.SELF_CLOSING_TAG,'pb',pos,0,prio||0)} 439function addCopyTag(tag,pos,len,prio){var copy=addTag(tag.getType(),tag.getName(),pos,len,tag.getSortPriority());copy.setAttributes(tag.getAttributes());return copy} 440function addTag(type,name,pos,len,prio){var tag=new Tag(type,name,pos,len,prio||0);if(tagsConfig[name]){tag.setFlags(tagsConfig[name].rules.flags)} 441if((!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)} 442return tag} 443function isInvalidTextSpan(pos,len){return(len<0||pos<0||pos+len>textLen||/[\uDC00-\uDFFF]/.test(text.substr(pos,1)+text.substr(pos+len,1)))} 444function insertTag(tag){if(!tagStackIsSorted){tagStack.push(tag)}else{var i=tagStack.length,key=getSortKey(tag);while(i>0&&key>getSortKey(tagStack[i-1])){tagStack[i]=tagStack[i-1];--i} 445tagStack[i]=tag}} 446function addTagPair(name,startPos,startLen,endPos,endLen,prio){var endTag=addEndTag(name,endPos,endLen,-prio||0),startTag=addStartTag(name,startPos,startLen,prio||0);startTag.pairWith(endTag);return startTag} 447function addVerbatim(pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,'v',pos,len,prio||0)} 448function sortTags(){var arr={},keys=[],i=tagStack.length;while(--i>=0){var tag=tagStack[i],key=getSortKey(tag,i);keys.push(key);arr[key]=tag} 449keys.sort();i=keys.length;tagStack=[];while(--i>=0){tagStack.push(arr[keys[i]])} 450tagStackIsSorted=!0} 451function getSortKey(tag,tagIndex){var prioFlag=(tag.getSortPriority()>=0),prio=tag.getSortPriority();if(!prioFlag){prio+=(1<<30)} 452var lenFlag=(tag.getLen()>0),lenOrder;if(lenFlag){lenOrder=textLen-tag.getLen()}else{var order={};order[Tag.END_TAG]=0;order[Tag.SELF_CLOSING_TAG]=1;order[Tag.START_TAG]=2;lenOrder=order[tag.getType()]} 453return hex32(tag.getPos())+(+prioFlag)+hex32(prio)+(+lenFlag)+hex32(lenOrder)+hex32(tagIndex||0)} 454function hex32(number){var hex=number.toString(16);return" ".substr(hex.length)+hex} 455var MSXML=(typeof DOMParser==='undefined'||typeof XSLTProcessor==='undefined');var xslt={init:function(xsl){var stylesheet=xslt.loadXML(xsl);if(MSXML){var generator=new ActiveXObject('MSXML2.XSLTemplate.6.0');generator.stylesheet=stylesheet;xslt.proc=generator.createProcessor()}else{xslt.proc=new XSLTProcessor;xslt.proc.importStylesheet(stylesheet)}},loadXML:function(xml){var dom;if(MSXML){dom=new ActiveXObject('MSXML2.FreeThreadedDOMDocument.6.0');dom.async=!1;dom.validateOnParse=!1;dom.loadXML(xml)}else{dom=(new DOMParser).parseFromString(xml,'text/xml')} 456if(!dom){throw 'Cannot parse '+xml} 457return dom},setParameter:function(paramName,paramValue){if(MSXML){xslt.proc.addParameter(paramName,paramValue,'')}else{xslt.proc.setParameter(null,paramName,paramValue)}},transformToFragment:function(xml,targetDoc){if(MSXML){var div=targetDoc.
457createElement('div'),fragment=targetDoc.createDocumentFragment();xslt.proc.input=xslt.loadXML(xml);xslt.proc.transform();div.innerHTML=xslt.proc.output;while(div.firstChild){fragment.appendChild(div.firstChild)} 458return fragment} 459return xslt.proc.transformToFragment(xslt.loadXML(xml),targetDoc)}};xslt.init(xsl);var functionCache={};function preview(text,target){var targetDoc=target.ownerDocument;if(!targetDoc){throw 'Target does not have a ownerDocument'} 460var 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)} 461newScript.textContent=oldScript.textContent;oldScript.parentNode.replaceChild(newScript,oldScript)})} 462if(HINT.hash){computeHashes(resultFragment)} 463if(HINT.onRender){executeEvents(resultFragment,'render')} 464function computeHashes(fragment){var nodes=fragment.querySelectorAll('[data-s9e-livepreview-hash]'),i=nodes.length;while(--i>=0){nodes[i].setAttribute('data-s9e-livepreview-hash',hash(nodes[i].outerHTML))}} 465function executeEvent(node,eventName){var code=node.getAttribute('data-s9e-livepreview-on'+eventName);if(!functionCache[code]){functionCache[code]=new Function(code)} 466functionCache[code].call(node)} 467function executeEvents(root,eventName){if(root instanceof Element&&root.hasAttribute('data-s9e-livepreview-on'+eventName)){executeEvent(root,eventName)} 468var nodes=root.querySelectorAll('[data-s9e-livepreview-on'+eventName+']'),i=nodes.length;while(--i>=0){executeEvent(nodes[i],eventName)}} 469function refreshElementContent(oldParent,newParent){var oldNodes=oldParent.childNodes,newNodes=newParent.childNodes,oldCnt=oldNodes.length,newCnt=newNodes.length,oldNode,newNode,left=0,right=0;while(left<oldCnt&&left<newCnt){oldNode=oldNodes[left];newNode=newNodes[left];if(!refreshNode(oldNode,newNode)){break} 470++left} 471var 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} 472++right} 473var i=oldCnt-right;while(--i>=left){oldParent.removeChild(oldNodes[i]);lastUpdated=oldParent} 474var rightBoundary=newCnt-right;if(left>=rightBoundary){return} 475var newNodesFragment=targetDoc.createDocumentFragment();i=left;do{newNode=newNodes[i];if(HINT.onUpdate&&newNode instanceof Element){executeEvents(newNode,'update')} 476lastUpdated=newNodesFragment.appendChild(newNode)} 477while(i<--rightBoundary);if(!right){oldParent.appendChild(newNodesFragment)}else{oldParent.insertBefore(newNodesFragment,oldParent.childNodes[left])}} 478function refreshNode(oldNode,newNode){if(oldNode.nodeName!==newNode.nodeName||oldNode.nodeType!==newNode.nodeType){return!1} 479if(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')} 480syncElementAttributes(oldNode,newNode);refreshElementContent(oldNode,newNode)}}else if(oldNode.nodeType===3||oldNode.nodeType===8){if(oldNode.nodeValue!==newNode.nodeValue){oldNode.nodeValue=newNode.nodeValue;lastUpdated=oldNode}} 481return!0} 482function elementHashesMatch(oldEl,newEl){if(!HINT.hash){return!1} 483const attrName='data-s9e-livepreview-hash';return oldEl.hasAttribute(attrName)&&newEl.hasAttribute(attrName)&&oldEl.getAttribute(attrName)===newEl.getAttribute(attrName)} 484function hash(text){var pos=text.length,s1=0,s2=0;while(--pos>=0){s1=(s1+text.charCodeAt(pos))%0xFFFF;s2=(s1+s2)%0xFFFF} 485return(s2<<16)|s1} 486function syncElementAttributes(oldEl,newEl){var oldAttributes=oldEl.attributes,newAttributes=newEl.attributes,oldCnt=oldAttributes.length,newCnt=newAttributes.length,i=oldCnt,ignoreAttrs=' '+oldEl.getAttribute('data-s9e-livepreview-ignore-attrs')+' ';while(--i>=0){var oldAttr=oldAttributes[i],namespaceURI=oldAttr.namespaceURI,attrName=oldAttr.name;if(HINT.ignoreAttrs&&ignoreAttrs.indexOf(' '+attrName+' ')>-1){continue} 487if(!newEl.hasAttributeNS(namespaceURI,attrName)){oldEl.removeAttributeNS(namespaceURI,attrName);lastUpdated=oldEl}} 488i=newCnt;while(--i>=0){var newAttr=newAttributes[i],namespaceURI=newAttr.namespaceURI,attrName=newAttr.name,attrValue=newAttr.value;if(HINT.ignoreAttrs&&ignoreAttrs.indexOf(' '+attrName+' ')>-1){continue} 489if(attrValue!==oldEl.getAttributeNS(namespaceURI,attrName)){oldEl.setAttributeNS(namespaceURI,attrName,attrValue);lastUpdated=oldEl}}} 490refreshElementContent(target,resultFragment);return lastUpdated} 491function setParameter(paramName,paramValue){xslt.setParameter(paramName,paramValue)}if(!window.s9e)window.s9e={};window.s9e.TextFormatter={'preview':preview}})(); 492 493var module={} 494 495module.exports=function(t){var e={};function a(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,a),n.l=!0,n.exports}return a.m=t,a.c=e,a.d=function(t,e,s){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
495),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(a.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(s,n,function(e){return t[e]}.bind(null,n));return s},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=50)}([function(t,e){t.exports=flarum.core.compat.Model},function(t,e){t.exports=flarum.core.compat.extend},function(t,e,a){"use strict";function s(t){return t.slice(0).sort((function(t,e){var a=t.position(),s=e.position();if(null===a&&null===s)return e.discussionCount()-t.discussionCount();if(null===s)return-1;if(null===a)return 1;var n=t.parent(),o=e.parent();return n===o?a-s:n&&o?n.position()-o.position():n?n===e?1:n.position()-s:o?o===t?-1:a-o.position():0}))}a.d(e,"a",(function(){return s}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var s=a(9),n=a.n(s);function o(t,e,a){void 0===e&&(e={}),void 0===a&&(a={});var s=t&&t.icon(),o=a.useColor,r=void 0===o||o;return e.className=n()([e.className,"icon",s?t.icon():"TagIcon"]),t?(e.style=e.style||{},s?e.style.color=r?t.color():"":e.style.backgroundColor=t.color()):e.className+=" untagged",s?m("i",e):m("span",e)}},function(t,e,a){"use strict";function s(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}a.d(e,"a",(function(){return s}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var s=a(14),n=a.n(s),o=a(10),r=a.n(o),i=a(3);function c(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");var a=n()(e,"link"),s=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){var o=t.color();o&&(e.style.backgroundColor=e.style.color=o,e.className+=" colored"),a&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(a?r.a:"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&Object(i.a)(t,{},{useColor:!1})," ",s))}},function(t,e){t.exports=flarum.core.compat["components/IndexPage"]},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var s=a(14),n=a.n(s),o=a(5),r=a(2);function i(t,e){void 0===e&&(e={});var a=[],s=n()(e,"link");return e.className="TagsLabel "+(e.className||""),t?Object(r.a)(t).forEach((function(e){(e||1===t.length)&&a.push(Object(o.a)(e,{link:s}))})):a.push(Object(o.a)()),m("span",e,a)}},function(t,e){t.exports=flarum.core.compat["components/Button"]},function(t,e){t.exports=flarum.core.compat["utils/classList"]},function(t,e){t.exports=flarum.core.compat["components/Link"]},function(t,e){t.exports=flarum.core.compat["utils/Stream"]},function(t,e,a){"use strict";function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(t[s]=a[s])}return t}).apply(this,arguments)}a.d(e,"a",(function(){return s}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var s=a(4),n=a(0),o=a.n(n),r=a(16),i=a.n(r),c=a(17),u=a.n(c),l=function(t){function e(){return t.apply(this,arguments)||this}return Object(s.a)(e,t),e}(i()(o.a,{name:o.a.attribute("name"),slug:o.a.attribute("slug"),description:o.a.attribute("description"),color:o.a.attribute("color"),backgroundUrl:o.a.attribute("backgroundUrl"),backgroundMode:o.a.attribute("backgroundMode"),icon:o.a.attribute("icon"),position:o.a.attribute("position"),parent:o.a.hasOne("parent"),defaultSort:o.a.attribute("defaultSort"),isChild:o.a.attribute("isChild"),isHidden:o.a.attribute("isHidden"),discussionCount:o.a.attribute("discussionCount"),lastPostedAt:o.a.attribute("lastPostedAt",o.a.transformDate),lastPostedDiscussion:o.a.hasOne("lastPostedDiscussion"),isRestricted:o.a.attribute("isRestricted"),canStartDiscussion:o.a.attribute("canStartDiscussion"),canAddToDiscussion:o.a.attribute("canAddToDiscussion"),isPrimary:u()("position","parent",(function(t,e){return null!==t&&!1===e}))}))},function(t,e){t.exports=flarum.core.compat["utils/extract"]},function(t,e){},function(t,e){t.exports=flarum.core.compat["utils/mixin"]},function(t,e){t.exports=flarum.core.compat["utils/computed"]},function(t,e){t.exports=flarum.core.compat["components/Modal"]}
495,function(t,e,a){"use strict";var s=a(2),n=a(13),o=a(7),r=a(3),i=a(5);e.a={"tags/utils/sortTags":s.a,"tags/models/Tag":n.a,"tags/helpers/tagsLabel":o.a,"tags/helpers/tagIcon":r.a,"tags/helpers/tagLabel":i.a}},function(t,e){t.exports=flarum.core},function(t,e){t.exports=flarum.core.compat["components/LinkButton"]},,function(t,e){t.exports=flarum.core.compat["components/DiscussionComposer"]},function(t,e){t.exports=flarum.core.compat["models/Discussion"]},function(t,e){t.exports=flarum.core.compat["components/DiscussionHero"]},function(t,e){t.exports=flarum.core.compat["utils/extractText"]},,function(t,e,a){"use strict";var s=a(12),n=a(0),o=a.n(n),r=a(24),i=a.n(r),c=a(6),u=a.n(c),l=a(13),p=a(4),d=a(30),f=a.n(d),g=a(10),h=a.n(g),b=a(31),v=a.n(b),y=a(32),x=a.n(y),T=a(3),O=a(5),N=a(2),_=function(t){function e(){return t.apply(this,arguments)||this}Object(p.a)(e,t);var a=e.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.tags=Object(N.a)(app.store.all("tags").filter((function(t){return!t.parent()}))),app.history.push("tags",app.translator.trans("flarum-tags.forum.header.back_to_tags_tooltip"))},a.view=function(){var t=this.tags.filter((function(t){return null!==t.position()})),e=this.tags.filter((function(t){return null===t.position()}));return m("div",{className:"TagsPage"},u.a.prototype.hero(),m("div",{className:"container"},m("nav",{className:"TagsPage-nav IndexPage-nav sideNav"},m("ul",null,v()(u.a.prototype.sidebarItems().toArray()))),m("div",{className:"TagsPage-content sideNavOffset"},m("ul",{className:"TagTiles"},t.map((function(t){var e=t.lastPostedDiscussion(),a=Object(N.a)(app.store.all("tags").filter((function(e){return e.parent()===t})));return m("li",{className:"TagTile "+(t.color()?"colored":""),style:{backgroundColor:t.color()}},m(h.a,{className:"TagTile-info",href:app.route.tag(t)},t.icon()&&Object(T.a)(t,{},{useColor:!1}),m("h3",{className:"TagTile-name"},t.name()),m("p",{className:"TagTile-description"},t.description()),a?m("div",{className:"TagTile-children"},a.map((function(t){return[m(h.a,{href:app.route.tag(t)},t.name())," "]}))):""),e?m(h.a,{className:"TagTile-lastPostedDiscussion",href:app.route.discussion(e,e.lastPostNumber())},m("span",{className:"TagTile-lastPostedDiscussion-title"},e.title()),x()(e.lastPostedAt())):m("span",{className:"TagTile-lastPostedDiscussion"}))}))),e.length?m("div",{className:"TagCloud"},e.map((function(t){return[Object(O.a)(t,{link:!0})," "]}))):"")))},a.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)},e}(f.a),j=a(33),C=a.n(j),P=a(7),D=function(t){function e(){return t.apply(this,arguments)||this}Object(p.a)(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e);var a=e.post.content()[0],s=e.post.content()[1];function n(t,e){return t.filter((function(t){return-1===e.indexOf(t)})).map((function(t){return app.store.getById("tags",t)}))}e.tagsAdded=n(s,a),e.tagsRemoved=n(a,s)};var a=e.prototype;return a.icon=function(){return"fas fa-tag"},a.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"},a.descriptionData=function(){var t={};return this.attrs.tagsAdded.length&&(t.tagsAdded=app.translator.transChoice("flarum-tags.forum.post_stream.tags_text",this.attrs.tagsAdded.length,{tags:Object(P.a)(this.attrs.tagsAdded,{link:!0}),count:this.attrs.tagsAdded.length})),this.attrs.tagsRemoved.length&&(t.tagsRemoved=app.translator.transChoice("flarum-tags.forum.post_stream.tags_text",this.attrs.tagsRemoved.length,{tags:Object(P.a)(this.attrs.tagsRemoved,{link:!0}),count:this.attrs.tagsRemoved.length})),t},e}(C.a),I=a(1),k=a(34),S=a.n(k),w=a(21),A=a.n(w),L=a(9),M=a.n(L),B=function(t){function e(){return t.apply(this,arguments)||this}return Object(p.a)(e,t),e.prototype.view=function(t){var e=this.attrs.model,a=this.constructor.isActive(this.attrs),s=e&&e.description(),n=M()(["TagLinkButton","hasIcon",this.attrs.className,e.isChild()&&"child"]);return m(h.a,{className:n,href:this.attrs.route,style:a&&e?{color:e.color()}:"",title:s||""},Object(T.a)(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 a=e.model;e.params.tags=a?a.slug():"untagged",e.route=app.route("tag",e.params)},e}(A.a),H=function(){Object(I.extend)(u.a.prototype,"navItems",(function(t){if(t.add("tags",m(A.a,{icon:"fas fa-th-large",href:app.route("tags")}
495,app.translator.trans("flarum-tags.forum.index.tags_link")),-10),!app.current.matches(_)){t.add("separator",S.a.component(),-12);var e=app.search.stickyParams(),a=app.store.all("tags"),s=this.currentTag(),n=function(a){var n=s===a;!n&&s&&(n=s.parent()===a),t.add("tag"+a.id(),B.component({model:a,params:e,active:n},null==a?void 0:a.name()),-14)};Object(N.a)(a).filter((function(t){return null!==t.position()&&(!t.isChild()||s&&(t.parent()===s||t.parent()===s.parent()))})).forEach(n);var o=a.filter((function(t){return null===t.position()})).sort((function(t,e){return e.discussionCount()-t.discussionCount()}));o.splice(0,3).forEach(n),o.length&&t.add("moreTags",m(A.a,{href:app.route("tags")},app.translator.trans("flarum-tags.forum.index.more_link")),-16)}}))},R=a(35),E=a.n(R),q=a(36),K=a.n(q),$=a(37),F=function(t){function e(){return t.apply(this,arguments)||this}return Object(p.a)(e,t),e.prototype.view=function(){var t=this.attrs.model,e=t.color();return m("header",{className:"Hero TagHero"+(e?" TagHero--colored":""),style:e?{color:"#fff",backgroundColor:e}:""},m("div",{className:"container"},m("div",{className:"containerNarrow"},m("h2",{className:"Hero-title"},t.icon()&&Object(T.a)(t,{},{useColor:!1})," ",t.name()),m("div",{className:"Hero-subtitle"},t.description()))))},e}(a.n($).a),U=function(){u.a.prototype.currentTag=function(){var t=app.search.params().tags;if(t)return app.store.getBy("tags","slug",t)},Object(I.override)(u.a.prototype,"hero",(function(t){var e=this.currentTag();return e?m(F,{model:e}):t()})),Object(I.extend)(u.a.prototype,"view",(function(t){var e=this.currentTag();e&&(t.attrs.className+=" IndexPage--tag"+e.id())})),Object(I.extend)(u.a.prototype,"setTitle",(function(){var t=this.currentTag();t&&app.setTitle(t.name())})),Object(I.extend)(u.a.prototype,"sidebarItems",(function(t){var e=this.currentTag();if(e){var a=e.color(),s=e.canStartDiscussion()||!app.session.user;a&&(t.get("newDiscussion").attrs.style={backgroundColor:a}),t.get("newDiscussion").attrs.disabled=!s,t.get("newDiscussion").children=app.translator.trans(s?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button")}})),Object(I.extend)(K.a.prototype,"params",(function(t){t.tags=m.route.param("tags")})),Object(I.extend)(E.a.prototype,"requestParams",(function(t){t.include.push("tags"),this.params.tags&&(t.filter.tag=this.params.tags)}))},z=a(38),G=a.n(z),J=a(25),Q=a.n(J),V=function(){Object(I.extend)(G.a.prototype,"infoItems",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",Object(P.a)(e),10)})),Object(I.extend)(Q.a.prototype,"view",(function(t){var e=Object(N.a)(this.attrs.discussion.tags());if(e&&e.length){var a=e[0].color();a&&(t.attrs.style={backgroundColor:a},t.attrs.className+=" DiscussionHero--colored")}})),Object(I.extend)(Q.a.prototype,"items",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",Object(P.a)(e,{link:!0}),5)}))},W=a(39),X=a.n(W),Y=a(8),Z=a.n(Y),tt=a(18),et=a.n(tt),at=a(40),st=a.n(at),nt=a(41),ot=a.n(nt),rt=a(26),it=a.n(rt),ct=a(42),ut=a.n(ct),lt=a(11),pt=a.n(lt);function mt(t){var e=app.store.all("tags");return e=t?e.filter((function(e){return e.canAddToDiscussion()||-1!==t.tags().indexOf(e)})):e.filter((function(t){return t.canStartDiscussion()}))}var dt=function(t){function e(){return t.apply(this,arguments)||this}Object(p.a)(e,t);var a=e.prototype;return a.oninit=function(e){var a=this;t.prototype.oninit.call(this,e),this.tags=mt(this.attrs.discussion),this.tags=Object(N.a)(this.tags),this.selected=[],this.filter=pt()(""),this.index=this.tags[0].id(),this.focused=!1,this.attrs.selectedTags?this.attrs.selectedTags.map(this.addTag.bind(this)):this.attrs.discussion&&this.attrs.discussion.tags().map(this.addTag.bind(this)),this.minPrimary=app.forum.attribute("minPrimaryTags"),this.maxPrimary=app.forum.attribute("maxPrimaryTags"),this.minSecondary=app.forum.attribute("minSecondaryTags"),this.maxSecondary=app.forum.attribute("maxSecondaryTags"),this.navigator=new ut.a,this.navigator.onUp((function(){return a.setIndex(a.getCurrentNumericIndex()-1,!0)})).onDown((function(){return a.setIndex(a.getCurrentNumericIndex()+1,!0)})).onSelect(this.select.bind(this)).onRemove((function(){return a.selected.splice(a.selected.length-1,1)}))},a.primaryCount=function(){return this.selected.filter((function(t){return t.isPrimary()})).length},a.secondaryCount=function(){return this.selected.filter((function(t){return!t.isPrimary()})).length},a.addTag=function(t){if(t.canStartDiscussion()){var e=t.parent();e&&-1===this.selected.indexOf(e)&&this.selected.push(e),-1===this.selected.indexOf(t)&&this.selected.push(t)}},a.removeTag=function(t){var e=this.selected.indexOf(t);-1!==e&&(this.selected.splice(e,1),this.selected.filter((function(e){return e.parent()===t}
495)).forEach(this.removeTag.bind(this)))},a.className=function(){return"TagDiscussionModal"},a.title=function(){return this.attrs.discussion?app.translator.trans("flarum-tags.forum.choose_tags.edit_title",{title:m("em",null,this.attrs.discussion.title())}):app.translator.trans("flarum-tags.forum.choose_tags.title")},a.getInstruction=function(t,e){if(t<this.minPrimary){var a=this.minPrimary-t;return app.translator.transChoice("flarum-tags.forum.choose_tags.choose_primary_placeholder",a,{count:a})}if(e<this.minSecondary){var s=this.minSecondary-e;return app.translator.transChoice("flarum-tags.forum.choose_tags.choose_secondary_placeholder",s,{count:s})}return""},a.content=function(){var t=this,e=this.tags,a=this.filter().toLowerCase(),s=this.primaryCount(),n=this.secondaryCount();e=e.filter((function(e){var a=e.parent();return!1===a||-1!==t.selected.indexOf(a)})),s>=this.maxPrimary&&(e=e.filter((function(e){return!e.isPrimary()||-1!==t.selected.indexOf(e)}))),n>=this.maxSecondary&&(e=e.filter((function(e){return e.isPrimary()||-1!==t.selected.indexOf(e)}))),a&&(e=e.filter((function(t){return t.name().substr(0,a.length).toLowerCase()===a}))),-1===e.indexOf(this.index)&&(this.index=e[0]);var o=Math.max(it()(this.getInstruction(s,n)).length,this.filter().length);return[m("div",{className:"Modal-body"},m("div",{className:"TagDiscussionModal-form"},m("div",{className:"TagDiscussionModal-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()}},Object(O.a)(e))}))),m("input",{className:"FormControl",placeholder:it()(this.getInstruction(s,n)),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:"TagDiscussionModal-form-submit App-primaryControl"},m(Z.a,{type:"submit",className:"Button Button--primary",disabled:!this.meetsRequirements(s,n),icon:"fas fa-check"},app.translator.trans("flarum-tags.forum.choose_tags.submit_button"))))),m("div",{className:"Modal-footer"},m("ul",{className:"TagDiscussionModal-list SelectTagList"},e.filter((function(e){return a||!e.parent()||-1!==t.selected.indexOf(e.parent())})).map((function(e){return m("li",{"data-index":e.id(),className:M()({pinned:null!==e.position(),child:!!e.parent(),colored:!!e.color(),selected:-1!==t.selected.indexOf(e),active:t.index===e}),style:{color:e.color()},onmouseover:function(){return t.index=e},onclick:t.toggleTag.bind(t,e)},Object(T.a)(e),m("span",{className:"SelectTagListItem-name"},ot()(e.name(),a)),e.description()?m("span",{className:"SelectTagListItem-description"},e.description()):"")}))))]},a.meetsRequirements=function(t,e){return!!app.forum.attribute("canBypassTagCounts")||t>=this.minPrimary&&e>=this.minSecondary},a.toggleTag=function(t){-1!==this.selected.indexOf(t)?this.removeTag(t):this.addTag(t),this.filter()&&(this.filter(""),this.index=this.tags[0]),this.onready()},a.select=function(t){t.metaKey||t.ctrlKey||-1!==this.selected.indexOf(this.index)?this.selected.length&&this.$('button[type="submit"]').click():this.getItem(this.index)[0].dispatchEvent(new Event("click"))},a.selectableItems=function(){return this.$(".TagDiscussionModal-list > li")},a.getCurrentNumericIndex=function(){return this.selectableItems().index(this.getItem(this.index))},a.getItem=function(t){return this.selectableItems().filter('[data-index="'+t.id()+'"]')},a.setIndex=function(t,e){var a=this.selectableItems(),s=a.parent();t<0?t=a.length-1:t>=a.length&&(t=0);var n=a.eq(t);if(this.index=app.store.getById("tags",n.attr("data-index")),m.redraw(),e){var o,r=s.scrollTop(),i=s.offset().top,c=i+s.outerHeight(),u=n.offset().top,l=u+n.outerHeight();u<i?o=r-i+u-parseInt(s.css("padding-top"),10):l>c&&(o=r-c+l+parseInt(s.css("padding-bottom"),10)),void 0!==o&&s.stop(!0).animate({scrollTop:o},100)}},a.onsubmit=function(t){t.preventDefault();var e=this.attrs.discussion,a=this.selected;e&&e.save({relationships:{tags:a}}).then((function(){app.current.matches(st.a)&&app.current.get("stream").update(),m.redraw()})),this.attrs.onsubmit&&this.attrs.onsubmit(a),this.hide()},e}(et.a),ft=function(){Object(I.extend)(X.a,"moderationControls",(function(t,e){e.canTag()&&t.add("tags",m(Z.a,{icon:"fas fa-tag",oncl
495ick:function(){return app.modal.show(dt,{discussion:e})}},app.translator.trans("flarum-tags.forum.discussion_controls.edit_tags_button")))}))},gt=a(23),ht=a.n(gt),bt=function(){Object(I.extend)(u.a.prototype,"newDiscussionAction",(function(t){var e=app.store.getBy("tags","slug",app.search.params().tags);if(e){var a=e.parent(),s=a?[a,e]:[e];t.then((function(t){return t.fields.tags=s}))}else app.composer.fields.tags=[]})),ht.a.prototype.chooseTags=function(){var t=this;mt().length&&app.modal.show(dt,{selectedTags:(this.composer.fields.tags||[]).slice(0),onsubmit:function(e){t.composer.fields.tags=e,t.$("textarea").focus()}})},Object(I.extend)(ht.a.prototype,"headerItems",(function(t){var e=this.composer.fields.tags||[],a=mt();t.add("tags",m("a",{className:M()(["DiscussionComposer-changeTags",!a.length&&"disabled"]),onclick:this.chooseTags.bind(this)},e.length?Object(P.a)(e):m("span",{className:"TagLabel untagged"},app.translator.trans("flarum-tags.forum.composer_discussion.choose_tags_link"))),10)})),Object(I.override)(ht.a.prototype,"onsubmit",(function(t){var e=this,a=this.composer.fields.tags||[],s=a.filter((function(t){return null!==t.position()&&!t.isChild()})),n=a.filter((function(t){return null===t.position()})),o=mt();(!a.length||s.length<app.forum.attribute("minPrimaryTags")||n.length<app.forum.attribute("minSecondaryTags"))&&o.length?app.modal.show(dt,{selectedTags:a,onsubmit:function(a){e.composer.fields.tags=a,t()}}):t()})),Object(I.extend)(ht.a.prototype,"data",(function(t){t.relationships=t.relationships||{},t.relationships.tags=this.composer.fields.tags}))},vt=a(19),yt=Object(s.a)(vt.a,{"tags/addTagFilter":U,"tags/addTagControl":ft,"tags/components/TagHero":F,"tags/components/TagDiscussionModal":dt,"tags/components/TagsPage":_,"tags/components/DiscussionTaggedPost":D,"tags/components/TagLinkButton":B,"tags/addTagList":H,"tags/addTagLabels":V,"tags/addTagComposer":bt}),xt=a(20);app.initializers.add("flarum-tags",(function(t){t.routes.tags={path:"/tags",component:_},t.routes.tag={path:"/t/:tags",component:u.a},t.route.tag=function(e){return t.route("tag",{tags:e.slug()})},t.postComponents.discussionTagged=D,t.store.models.tags=l.a,i.a.prototype.tags=o.a.hasMany("tags"),i.a.prototype.canTag=o.a.attribute("canTag"),H(),U(),V(),ft(),bt()})),Object(s.a)(xt.compat,yt)},,function(t,e){t.exports=flarum.core.compat["components/Page"]},function(t,e){t.exports=flarum.core.compat["helpers/listItems"]},function(t,e){t.exports=flarum.core.compat["helpers/humanTime"]},function(t,e){t.exports=flarum.core.compat["components/EventPost"]},function(t,e){t.exports=flarum.core.compat["components/Separator"]},function(t,e){t.exports=flarum.core.compat["states/DiscussionListState"]},function(t,e){t.exports=flarum.core.compat["states/GlobalSearchState"]},function(t,e){t.exports=flarum.core.compat.Component},function(t,e){t.exports=flarum.core.compat["components/DiscussionListItem"]},function(t,e){t.exports=flarum.core.compat["utils/DiscussionControls"]},function(t,e){t.exports=flarum.core.compat["components/DiscussionPage"]},function(t,e){t.exports=flarum.core.compat["helpers/highlight"]},function(t,e){t.exports=flarum.core.compat["utils/KeyboardNavigatable"]},,,,,,,,function(t,e,a){"use strict";a.r(e);var s=a(15);for(var n in s)"default"!==n&&function(t){a.d(e,t,(function(){return s[t]}))}(n);a(28)}]); 496 497 498flarum.extensions['flarum-tags']=module.exports 499 500var module={} 501 502module.exports=function(t){var a={};function o(e){if(a[e])return a[e].exports;var s=a[e]={i:e,l:!1,exports:{}};return t[e].call(s.exports,s,s.exports,o),s.l=!0,s.exports}return o.m=t,o.c=a,o.d=function(t,a,e){o.o(t,a)||Object.defineProperty(t,a,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,a){if(1&a&&(t=o(t)),8&a)return t;if(4&a&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&a&&"string"!=typeof t)for(var s in t)o.d(e,s,function(a){return t[a]}.bind(null,s));return e},o.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(a,"a",a),a},o.o=function(t,a){return Object.prototype.hasOwnProperty.call(t,a)},o.p="",o(o.s=22)}([function(t,a){t.exports=flarum.core.compat.app},function(t,a){t.exports=flarum.core.compat.Model},function(t,a){t.exports=flarum.core.compat["utils/withAttr"]},function(t,a){t.exports=flarum.core.compat.extend},function(t,a){t.exports=flarum.core.compat["components/Button"]},function(t,a){t.exports=flarum.core.compat["components/Post"]},function(t,a){t.exports=flarum.core.compat["utils/PostControls"]},function(t,a){t.exports=flarum.core.compat["utils/Stream"]},function(t,a){t.exports=flarum.core.compat["components/Page"]},function(t,a){t.exports=flarum.core.compat.Component},function(t,a){t.exports=flarum.core.compat["components/Link"]},function(t,a){t.exports=flarum.core.compat["components/LoadingIndicator"]},function(t,a){t.exports=flarum.core.compat["helpers/avatar"]},function(t,a){t.exports=flarum.core.compat["helpers/username"]},function(t,a){t.exports=flarum.core.compat["helpers/icon"]},function(t,a){t.exports=flarum.core.compat["helpers/humanTime"]},function(t,a){t.exports=flarum.core.compat["components/Modal"]}
502,function(t,a){t.exports=flarum.core.compat["components/HeaderSecondary"]},function(t,a){t.exports=flarum.core.compat["components/NotificationsDropdown"]},function(t,a){t.exports=flarum.core.compat["utils/ItemList"]},function(t,a){t.exports=flarum.core.compat["utils/humanTime"]},function(t,a){t.exports=flarum.core},function(t,a,o){"use strict";function e(){return(e=Object.assign||function(t){for(var a=1;a<arguments.length;a++){var o=arguments[a];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])}return t}).apply(this,arguments)}o.r(a);var s=o(0),n=o.n(s),r=o(1),l=o.n(r);function i(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a}var c=function(t){function a(){return t.apply(this,arguments)||this}return i(a,t),a}(l.a);e(c.prototype,{type:l.a.attribute("type"),reason:l.a.attribute("reason"),reasonDetail:l.a.attribute("reasonDetail"),createdAt:l.a.attribute("createdAt",l.a.transformDate),post:l.a.hasOne("post"),user:l.a.hasOne("user")});var u=c,p=o(8),f=o.n(p),d=o(9),g=o.n(d),h=o(10),v=o.n(h),b=o(11),_=o.n(b),y=o(12),x=o.n(y),N=o(13),F=o.n(N),k=o(14),w=o.n(k),C=o(15),D=o.n(C),P=function(t){function a(){return t.apply(this,arguments)||this}i(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"},app.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(v.a,{href:app.route.post(a),className:"Notification Flag",oncl
502ick:function(t){app.flags.index=a,t.redraw=!1}},x()(a.user()),w()("fas fa-flag",{className:"Notification-icon"}),m("span",{className:"Notification-content"},app.translator.trans("flarum-flags.forum.flagged_posts.item_text",{username:F()(a.user()),em:m("em",null),discussion:a.discussion().title()})),D()(t.createdAt()),m("div",{className:"Notification-excerpt"},a.contentPlain())))})):this.state.loading?_.a.component({className:"LoadingIndicator--block"}):m("div",{className:"NotificationList-empty"},app.translator.trans("flarum-flags.forum.flagged_posts.empty_text")))))},a}(g.a),O=function(t){function a(){return t.apply(this,arguments)||this}i(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),app.history.push("flags"),app.flags.load(),this.bodyClass="App--flags"},o.view=function(){return m("div",{className:"FlagsPage"},m(P,{state:app.flags}))},a}(f.a),A=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}(),j=o(3),M=o(6),L=o.n(M),B=o(4),T=o.n(B),S=o(16),E=o.n(S),I=o(7),H=o.n(I),R=o(2),U=o.n(R),G=function(t){function a(){return t.apply(this,arguments)||this}i(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 app.translator.trans("flarum-flags.forum.flag_post.title")},o.content=function(){if(this.success)return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("flarum-flags.forum.flag_post.confirmation_message")),m("div",{className:"Form-group"},m(T.a,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},app.translator.trans("flarum-flags.forum.flag_post.dismiss_button")))));var t=app.forum.attribute("guidelinesUrl");return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("div",null,m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"off_topic"===this.reason(),value:"off_topic",onclick:U()("value",this.reason)}),m("strong",null,app.translator.trans("flarum-flags.forum.flag_post.reason_off_topic_label")),app.translator.trans("flarum-flags.forum.flag_post.reason_off_topic_text"),"off_topic"===this.reason()?m("textarea",{className:"FormControl",placeholder:app.translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:U()("value",this.reasonDetail)}):""),m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"inappropriate"===this.reason(),value:"inappropriate",onclick:U()("value",this.reason)}),m("strong",null,app.translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_label")),app.translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_text",{a:t?m("a",{href:t,target:"_blank"}):void 0}),"inappropriate"===this.reason()?m("textarea",{className:"FormControl",placeholder:app.translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:U()("value",this.reasonDetail)}):""),m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"spam"===this.reason(),value:"spam",onclick:U()("value",this.reason)}),m("strong",null,app.translator.trans("flarum-flags.forum.flag_post.reason_spam_label")),app.translator.trans("flarum-flags.forum.flag_post.reason_spam_text"),"spam"===this.reason()?m("textarea",{className:"FormControl",placeholder:app.translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:U()("value",this.reasonDetail)}):""),m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"other"===this.reason(),value:"other",onclick:U()("value",this.reason)}),m("strong",null,app.translator.trans("flarum-flags.forum.flag_post.reason_other_label")),"other"===this.reason()?m("textarea",{className:"FormControl",value:this.reasonDetail(),oninput:U()("value",this.reasonDetail)}):""))),m("div",{className:"Form-group"},m(T.a,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading,disabled:!this.reason()},app.translator.trans("flarum-flags.forum.flag_post.submit_button")))))},o.onsubmit=function(t){var a=this;t.preventDefault(),this.loading=!0,app.store.createRecord("flags").save({reason:"other"===this.reason()?null:this.reason(),reasonDetail:this.reasonDetail(),relationships:{user:app.session.user,post:this.attrs.post}},{errorHandler:this.onerror.bind(this)}).then((function(){return a.success=!0}
502)).catch((function(){})).then(this.loaded.bind(this))},a}(E.a),q=function(){Object(j.extend)(L.a,"userControls",(function(t,a){!a.isHidden()&&"comment"===a.contentType()&&a.canFlag()&&t.add("flag",m(T.a,{icon:"fas fa-flag",onclick:function(){return n.a.modal.show(G,{post:a})}},n.a.translator.trans("flarum-flags.forum.post_controls.flag_button")))}))},z=o(17),V=o.n(z),J=o(18),K=function(t){function a(){return t.apply(this,arguments)||this}i(a,t),a.initAttrs=function(a){a.label=a.label||app.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?P.component({state:this.attrs.state}):"")},o.goToRoute=function(){m.route.set(app.route("flags"))},o.getUnreadCount=function(){return app.flags.cache?app.flags.cache.length:app.forum.attribute("flagCount")},o.getNewCount=function(){return app.session.user.attribute("newFlagCount")},a}(o.n(J).a),Q=function(){Object(j.extend)(V.a.prototype,"items",(function(t){n.a.forum.attribute("canViewFlags")&&t.add("flags",m(K,{state:n.a.flags}),15)}))},W=o(5),X=o.n(W),Y=o(19),Z=o.n(Y),$=o(20),tt=o.n($),at=function(){Object(j.extend)(X.a.prototype,"elementAttrs",(function(t){this.attrs.post.flags().length&&(t.className+=" Post--flagged")})),X.a.prototype.dismissFlag=function(t){var a=this.attrs.post;
502return delete a.data.relationships.flags,this.subtree.invalidate(),n.a.flags.cache&&n.a.flags.cache.some((function(t,o){if(t.post()===a){if(n.a.flags.cache.splice(o,1),n.a.flags.index===a){var e=n.a.flags.cache[o];if(e||(e=n.a.flags.cache[0]),e){var s=e.post();n.a.flags.index=s,m.route.set(n.a.route.post(s))}}return!0}})),n.a.request({url:n.a.forum.attribute("apiUrl")+a.apiEndpoint()+"/flags",method:"DELETE",body:t})},X.a.prototype.flagActionItems=function(){var t=this,a=new Z.a,o=L.a.destructiveControls(this.attrs.post);return Object.keys(o.items).forEach((function(a){var e=o.get(a).attrs;e.className="Button",Object(j.extend)(e,"onclick",(function(){return t.dismissFlag()}))})),a.add("controls",m("div",{className:"ButtonGroup"},o.toArray())),a.add("dismiss",m(T.a,{className:"Button",icon:"far fa-eye-slash",onclick:this.dismissFlag.bind(this)},n.a.translator.trans("flarum-flags.forum.post.dismiss_flag_button")),-100),a},Object(j.extend)(X.a.prototype,"content",(function(t){var a=this,o=this.attrs.post,e=o.flags();e.length&&(o.isHidden()&&(this.revealContent=!0),t.unshift(m("div",{className:"Post-flagged"},m("div",{className:"Post-flagged-flags"},e.map((function(t){return m("div",{className:"Post-flagged-flag"},a.flagReason(t))}))),m("div",{className:"Post-flagged-actions"},this.flagActionItems().toArray()))))})),X.a.prototype.flagReason=function(t){if("user"===t.type()){var a=t.user(),o=t.reason(),e=t.reasonDetail(),s=tt()(t.createdAt());return[n.a.translator.trans(o?"flarum-flags.forum.post.flagged_by_with_reason_text":"flarum-flags.forum.post.flagged_by_text",{time:s,user:a,reason:o}),e?m("span",{className:"Post-flagged-detail"},e):""]}}},ot={"flags/addFlagsToPosts":at,"flags/addFlagControl":q,"flags/addFlagsDropdown":Q,"flags/models/Flag":u,"flags/components/FlagList":P,"flags/components/FlagPostModal":G,"flags/components/FlagsPage":O,"flags/components/FlagsDropdown":K},et=o(21);n.a.initializers.add("flarum-flags",(function(){n.a.store.models.posts.prototype.flags=l.a.hasMany("flags"),n.a.store.models.posts.prototype.canFlag=l.a.attribute("canFlag"),n.a.store.models.flags=u,n.a.routes.flags={path:"/flags",component:O},n.a.flags=new A(n.a),q(),Q(),at()})),e(et.compat,ot)}]); 503 504 505flarum.extensions['flarum-flags']=module.exports 506 507var module={} 508 509module.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=6)}([function(e,t){e.exports=flarum.core.compat.extend},function(e,t){e.exports=flarum.core.compat["components/TextEditor"]},function(e,t){e.exports=flarum.core.compat.Component},function(e,t){e.exports=flarum.core.compat["helpers/icon"]},function(e,t,n){e.exports=function(){"use strict";const e=/^[ \t]*(?:(?:[-+*]|\d+\.)[ \t]+(?:\[[ x]][ \t]+)?|>[ \t]*)*(?::[ \t]*)?/,t=/(?:[-+*]|\d+\.)[ \t]+(?:\[[ x]][ \t]+)?$/,n=/[-+*\[\]x\d.]/g,i=/[^ \t]/g,r=/(\d+)\.(?=[ \t]+$)/,o=/(?:(?:^[ \t]+)?(?:[-+*]|\d+\.|[>:])(?:[ \t]+\[[ x]])?[ \t]*|^[ \t]+)$/,s=/[*_]/,l=/[-=\s"'`<>\[\](){}+*^$\\.|]$/,a=/^(?:\n|$)/,c=/^(?!$)/gm,u={"`":/^``$/m,"~":/^~~$/m},d={"[":"]","(":")","{":"}","<":">"},f={"]":"[",")":"(","}":"{",">":"<"},h={enter:(n,i,s,l,c)=>{const u=s?null:function(t){const n=t.lastIndexOf("\n")+1,i=t.substring(n),r=e.exec(i);return{line:i,offset:n,prefix:r&&r[0]}}(i);if(u)if(u.line&&u.line.charAt(u.line.length-1)in d){const e=u.prefix?y(u.prefix,!0):"";l="\n"+e+l,c.shiftKey||(i+="\n"+e+n.indent)}
509else u.prefix?!c.shiftKey&&u.prefix===u.line&&a.test(l)?i=i.substring(0,u.offset)+function(e){return e.replace(o,"")}(u.prefix):!c.shiftKey&&function(e){return t.test(e)}(u.prefix)?i+="\n"+function(e){return e.replace(r,(function(e,t){return parseInt(t)+1+"."}))}(u.prefix):i+="\n"+y(u.prefix,c.shiftKey):i+="\n";else i+="\n";return{v:i+l,s:i.length}},indent:(e,t,n,i)=>{let r=t.length,o=t.lastIndexOf("\n")+1;return o<r&&(n=t.substring(o)+n,t=t.substring(0,o)),(o<r||!n)&&(r+=e.indent.length),n?n=n.replace(c,e.indent):t+=e.indent,{v:t+n+i,s:r,e:n?o+n.length:r}},outdent:(e,t,n,i)=>{let r=t.length,o=t.lastIndexOf("\n")+1;return o<r&&(n=t.substring(o)+n,t=t.substring(0,o),n.substring(0,e.indent.length)===e.indent&&(r-=e.indent.length)),{v:t+(n=n.replace(e.reOutdent,""))+i,s:r,e:o+n.length}},inline:(e,t,n,i,r)=>n||r.key in d||i.charAt(0)!==r.key?n||("'"!==r.key||l.test(t))&&!(r.key in f)?!n&&r.key in u&&u[r.key].test(t)?{v:t+r.key+"language\n"+r.key+r.key+r.key+("\n"!==i.charAt(0)?"\n":"")+i,s:t.length+1,e:t.length+9}:r.key===t.slice(-1)&&r.key===i.slice(0,1)?{v:t.slice(0,-1)+n+i.slice(1),s:t.length-1,e:t.length-1+n.length}:{v:t+(f[r.key]||r.key)+n+(d[r.key]||r.key)+i,s:t.length+1,e:t.length+1+n.length}:{v:t+r.key+i,s:t.length+1}:{v:t+(s.test(r.key)?r.key+r.key:"")+i,s:t.length+1}};class p{constructor(e){this.options=e}handleKey(e,t,n,i){const r=this.options.keyMap.find(e=>function(e,t){for(const n in t)if(t.hasOwnProperty(n)&&e[n]!==t[n])return!1;return!0}(i,e.key));if(r&&h[r.action])return h[r.action](this.options,e,t,n,i)}}function y(e,t){return e.replace(t?i:n," ")}const m=/mac|iphone|ipad|ipod/i.test(navigator.platform),v=/firefox/i.test(navigator.userAgent),x=m?"metaKey":"ctrlKey",g={enter:["Enter","Shift+Enter"],indent:["Tab","Cmd+m"],outdent:["Shift+Tab","Cmd+Shift+m"],inline:['"',"'","`","*","_","[","]","(",")","{","}","<",">"]};function k(e={}){const t={},n=[];for(let i in g)if(g.hasOwnProperty(i)){let r=e[i]||g[i];Array.isArray(r)||(r=r.toString().trim().split(/\s*[|,]\s*/g)),n.push.apply(n,r.map(e=>{const n=b(e);return n.key in t||(t[n.key]=0),++t[n.key],{key:n,action:i}}))}return n.forEach(e=>{var n;t[e.key.key]>1&&("ctrlKey"in(n=e.key)||(n.ctrlKey=!1),"altKey"in n||(n.altKey=!1),"shiftKey"in n||(n.shiftKey=!1),"metaKey"in n||(n.metaKey=!1))}),n}function b(e){const t={};return e.trim().split(/\s*\+\s*/g).forEach((function(e){switch(e.toLowerCase()){case"cmd":t[x]=!0;break;case"ctrl":case"alt":case"shift":case"meta":t[e.toLowerCase()+"Key"]=!0;break;default:t.key=e}})),t}function E(){const e=document.createElement("div");return e.setAttribute("aria-hidden","true"),e.tabIndex=-1,e.contentEditable=!0,e.textContent="0",e.addEventListener("focus",()=>setTimeout(()=>e.blur(),0)),e.style.position="fixed",e.style.overflow="hidden",e.style.left="-1000px",e.style.top="50%",e.style.width=e.style.height="1px",e.style.opacity="0",e}function S(e,t=!1){return{s:e.selectionStart,e:e.selectionEnd,x:e.scrollLeft,y:e.scrollTop,v:e.value.replace(/\u00A0/g," "),c:t}}function w(e,t){e.lock=!0;const n=void 0===t.e?t.s:t.e,i=void 0===t.x?e.elem.scrollLeft:t.x,r=void 0===t.y?e.elem.scrollTop:t.y;C(e,{...t,e:n,x:i,y:r,c:!0},!0),e.lock=!1}function O(e,t){if(!e.elem||t.defaultPrevented)return;if(v&&t[x]&&"z"===t.key)return void e.elem.blur();const n=S(e.elem),i=n.v.substring(0,n.s),r=n.v.substring(n.s,n.e),o=n.v.substring(n.e);for(let n=0,s=e.options.extensions.length;n<s;n++){const s=e.options.extensions[n].handleKey(i,r,o,t);if(s){t.preventDefault(),w(e,s);break}}}function K(e,t){if(e.lock||"insertFromPaste"===t.type)return;e.lock=!0;const n=S(e.elem);document.execCommand("undo"),C(e,n),e.lock=!1}function j(e){e.lock||(e.lock=!0,e.idx=+(e.helper.textContent||"0"),e.state=e.history[e.idx],I(e.elem,e.state),e.lock=!1)}function L(e){e.helper.textContent="0",e.state=S(e.elem),e.history=[e.state],e.idx=0}function C(e,t,n=!1){(e.idx<1||n&&!e.state.c)&&T(e,S(e.elem,!0)),e.state.c?function(e,t){e.history.splice(++e.idx,e.history.length,t),e.state=t,e.helper.focus(),document.execCommand("selectAll"),document.execCommand("insertText",!1,e.idx.toString())}(e,t):T(e,t),I(e.elem,e.state)}function T(e,t){Object.assign(e.state,t)}function I(e,t){e.value=t.v,e.selectionStart=t.s,e.selectionEnd=t.e,e.
509scrollTo(t.x,t.y),e.focus()}class P{constructor(e,t){const n=function(e={}){const t=function(e=4){return"number"!=typeof e&&(e=(e+"").length),new Array(e+1).join(" ")}(e.indent),n={indent:t,reOutdent:new RegExp("^"+t,"mg"),keyMap:k(e.keyMap),extensions:e.extensions||[]};return n.extensions.push(new p(n)),n}(t),i=this.ed={elem:e,options:n,helper:E(),history:[],state:void 0,idx:-1,lock:!1};i.onKeyDown=O.bind(null,i),i.onInput=K.bind(null,i),i.onUndo=j.bind(null,i),i.helper.addEventListener("input",i.onUndo),document.body.appendChild(i.helper),this.setElement(e)}getElement(){return this.ed.elem}setElement(e){this.ed.elem&&(this.ed.options.extensions.forEach(e=>e.cleanup&&e.cleanup(this)),this.ed.elem.removeEventListener("input",this.ed.onInput),this.ed.elem.removeEventListener("keydown",this.ed.onKeyDown)),this.ed.elem=e,e.addEventListener("keydown",this.ed.onKeyDown),e.addEventListener("input",this.ed.onInput),L(this.ed),this.ed.options.extensions.forEach(e=>e.init&&e.init(this))}getValue(){return this.ed.elem.value.replace(/\u00A0/g," ")}setValue(e,t=!1){this.ed.elem.value=e,t||L(this.ed)}pushState(e){w(this.ed,e)}destroy(){return this.ed.options.extensions.forEach(e=>e.cleanup&&e.cleanup(this)),this.ed.elem.removeEventListener("keydown",this.ed.onKeyDown),this.ed.elem.removeEventListener("input",this.ed.onInput),this.ed.helper.removeEventListener("input",this.ed.onUndo),document.body.removeChild(this.ed.helper),this.ed.options.extensions.forEach(e=>e.destroy&&e.destroy()),Object.assign(this.ed,{elem:null,helper:null,options:null,reOutdent:null,onKeyDown:null,onInput:null,onUndo:null,history:null}),Object.assign(this,{ed:null}),null}}return function(e){e.version="v2.0.9"}(P||(P={})),P}()},function(e,t){e.exports=flarum.core.compat["utils/BasicEditorDriver"]},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n(1),o=n.n(r);function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var l=n(2),a=n.n(l),c=navigator.userAgent.match(/Macintosh/)?"Meta":"Control",u=function(e){function t(){return e.apply(this,arguments)||this}s(t,e);var n=t.prototype;return n.oncreate=function(t){e.prototype.oncreate.call(this,t),this.attrs.setShortcutHandler(this.shortcut.bind(this))},n.view=function(e){return m("div",{id:"MarkdownToolbar","data-for":this.attrs.for,style:{display:"inline-block"}},e.children)},n.shortcut=function(e){if(e.metaKey&&"Meta"===c||e.ctrlKey&&"Control"===c){var t=this.element.querySelector('[data-hotkey="'+e.key+'"]');t&&(t.click(),e.preventDefault())}},t}(a.a),d=n(3),f=n.n(d);function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var p=null;function y(e){return e.trim().split("\n").length>1}function v(e,t){return Array(t+1).join(e)}function x(e,t){for(var n=t;e[n]&&null!=e[n-1]&&!e[n-1].match(/\s/);)n--;return n}function g(e,t,n){for(var i=t,r=n?/\n/:/\s/;e[i]&&!e[i].match(r);)i++;return i}function k(e){var t,n,i=e.value.slice(0,e.selectionStart),r=e.value.slice(e.selectionEnd),o=i.match(/\n*$/),s=r.match(/^\n*/),l=o?o[0].length:0,a=s?s[0].length:0;return i.match(/\S/)&&l<2&&(t=v("\n",2-l)),r.match(/\S/)&&a<2&&(n=v("\n",2-a)),null==t&&(t=""),null==n&&(n=""),{newlinesToAppend:t,newlinesToPrepend:n}}var b=function(e,t){var n=t.prefix,i=t.suffix,r=t.blockPrefix,o=t.blockSuffix,s=t.replaceNext,l=t.prefixSpace,a=t.scanFor,c=t.surroundWithNewlines,u=e.selectionStart,d=e.selectionEnd,f=e.value.slice(e.selectionStart,e.selectionEnd),h=y(f)&&r.length>0?r+"\n":n,p=y(f)&&o.length>0?"\n"+o:i;if(l){var m=e.value[e.selectionStart-1];0===e.selectionStart||null==m||m.match(/\s/)||(h=" "+h)}f=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.selectionStart===e.selectionEnd)e.selectionStart=x(e.value,e.selectionStart),e.selectionEnd=g(e.value,e.selectionEnd,i);else{var r=e.selectionStart-t.length,o=e.selectionEnd+n.length,s=e.value.slice(r,e.selectionStart)===t,l=e.value.slice(e.selectionEnd,o)===n;s&&l&&(e.selectionStart=r,e.selectionEnd=o)}return e.value.slice(e.selectionStart,e.selectionEnd)}(e,h,p,t.multiline);var v=e.selectionStart,b=e.selectionEnd,E=s.length>0&&p.indexOf(s)>-1&&f.length>0;if(c){var S=k(e);h=S.newlinesToAppend+n,p+=S.newlinesToPrepend}
509if(f.startsWith(h)&&f.endsWith(p)){var w=f.slice(h.length,f.length-p.length);if(u===d){var O=u-h.length;O=Math.max(O,v),v=b=O=Math.min(O,v+w.length)}else b=v+w.length;return{text:w,selectionStart:v,selectionEnd:b}}if(E)return a.length>0&&f.match(a)?{text:h+(p=p.replace(s,f)),selectionStart:v=b=v+h.length,selectionEnd:b}:{text:h+f+p,selectionStart:v=v+h.length+f.length+p.indexOf(s),selectionEnd:b=v+s.length};var K=h+f+p;v=u+h.length,b=d+h.length;var j=f.match(/^\s*|\s*$/g);if(t.trimFirst&&j){var L=j[0]||"",C=j[1]||"";K=L+h+f.trim()+p+C,v+=L.length,b-=C.length}return{text:K,selectionStart:v,selectionEnd:b}},E=function(e,t){var n,i=e.value.slice(e.selectionStart,e.selectionEnd);n=t.orderedList?function(e){var t,n,i,r,o=/^\d+\.\s+/,s=e.selectionStart===e.selectionEnd,l=e.value.slice(e.selectionStart,e.selectionEnd),a=l,c=l.split("\n");if(s){var u=e.value.slice(0,e.selectionStart).split(/\n/);i=e.selectionStart-u[u.length-1].length,r=g(e.value,e.selectionStart,!0),a=e.value.slice(i,r)}var d=a.split("\n");if(d.every((function(e){return o.test(e)}))){if(l=(c=d.map((function(e){return e.replace(o,"")}))).join("\n"),s&&i&&r){var f=d[0].length-c[0].length;n=t=e.selectionStart-f,e.selectionStart=i,e.selectionEnd=r}}else{l=(c=function(){var e,t,n,i=[];for(n=e=0,t=c.length;e<t;n=++e){var r=c[n];i.push(n+1+". "+r)}return i}()).join("\n");var h=k(e),p=h.newlinesToAppend,y=h.newlinesToPrepend;t=(n=e.selectionStart+p.length)+l.length,s&&(n=t),l=p+l+y}return{text:l,selectionStart:n,selectionEnd:t}}(e):t.multiline&&y(i)?function(e,t){var n=t.prefix,i=t.suffix,r=t.surroundWithNewlines,o=e.value.slice(e.selectionStart,e.selectionEnd),s=e.selectionStart,l=e.selectionEnd,a=o.split("\n");if(a.every((function(e){return e.startsWith(n)&&e.endsWith(i)})))l=s+(o=a.map((function(e){return e.slice(n.length,e.length-i.length)})).join("\n")).length;else if(o=a.map((function(e){return n+e+i})).join("\n"),r){var c=k(e),u=c.newlinesToAppend,d=c.newlinesToPrepend;l=(s+=u.length)+o.length,o=u+o+d}return{text:o,selectionStart:s,selectionEnd:l}}(e,t):b(e,t),function(e,t){var n=t.text,i=t.selectionStart,r=t.selectionEnd,o=e.selectionStart,s=e.value.slice(0,o),l=e.value.slice(e.selectionEnd);if(null===p||!0===p){e.contentEditable="true";try{p=document.execCommand("insertText",!1,n)}catch(e){p=!1}e.contentEditable="false"}if(p&&!e.value.slice(0,e.selectionStart).endsWith(n)&&(p=!1),!p){try{document.execCommand("ms-beginUndoUnit")}catch(e){}e.value=s+n+l;try{document.execCommand("ms-endUndoUnit")}catch(e){}var a=document.createEvent("Event");a.initEvent("input",!0,!0),e.dispatchEvent(a)}null!=i&&null!=r?e.setSelectionRange(i,r):e.setSelectionRange(o,e.selectionEnd)}(e,n)},S=navigator.userAgent.match(/Macintosh/)?"â":"ctrl",w=function(e){function t(){return e.apply(this,arguments)||this}s(t,e);var n=t.prototype;return n.oncreate=function(t){e.prototype.oncreate.call(this,t),this.$().tooltip()},n.view=function(){return m("button",{className:"Button Button--icon Button--link",title:this.title(),"data-hotkey":this.attrs.hotkey,onclick:this.click.bind(this),onkeydown:this.keydown.bind(this)},f()(this.attrs.icon))},n.keydown=function(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),this.click())},n.click=function(){return e=this.element,t=this.attrs.style,n=e.parentElement,i=h({},{prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,trimFirst:!1},t),void((r=document.getElementById(n.dataset.for))&&(r.focus(),E(r,i)));var e,t,n,i,r},n.title=function(){var e=this.attrs.title;return this.attrs.hotkey&&(e+=" <"+S+"-"+this.attrs.hotkey+">"),e},t}(a.a),O=n(4),K=n.n(O),j=n(5),L=n.n(j),C=function(){function e(e,t,n){this.oninput=e,this.callInputListeners=t,this.onsubmit=n}return e.prototype.handleKey=function(e,t,n,i){var r=this;setTimeout((function(){if(r.oninput(i.target.value),(i.metaKey||i.ctrlKey)&&"Enter"===i.key)return r.onsubmit();r.callInputListeners(i)}),25)},e}(),T=function(e){function t(){return e.apply(this,arguments)||this}s(t,e);var n=t.prototype;return n.build=function(e,t){this.el.className=t.classNames.join(" "),this.el.disabled=t.disabled,this.el.placeholder=t.placeholder,this.el.value=t.value,this.el.id=t.textareaId,e.append(this.el);
509var n=function(e){t.inputListeners.forEach((function(e){e()})),e.redraw=!1};this.el.addEventListener("keydown",(function(e){return t.shortcutHandler.apply(t,arguments)})),this.el.addEventListener("input",(function(e){e instanceof CustomEvent&&(t.oninput(e.target.value),n(e))})),this.el.addEventListener("click",n),this.mdarea=new K.a(this.el,{keyMap:{indent:["Ctrl+m"],outdent:["Ctrl+M"],inline:[]},extensions:[new C(t.oninput,n,t.onsubmit)]})},n.destroy=function(){this.mdarea.destroy(),e.prototype.destroy.call(this)},t}(L.a),I=function(){};app.initializers.add("flarum-markdown",(function(e){var t=1;Object(i.extend)(o.a.prototype,"oninit",(function(){this.textareaId="textarea"+t++})),Object(i.override)(o.a.prototype,"buildEditor",(function(e,t){return new T(t,this.buildEditorParams())})),Object(i.extend)(o.a.prototype,"buildEditorParams",(function(e){e.textareaId=this.textareaId,e.shortcutHandler=I})),Object(i.extend)(o.a.prototype,"toolbarItems",(function(t){var n=function(t){return e.translator.trans("flarum-markdown.forum.composer."+t+"_tooltip")};t.add("markdown",m(u,{for:this.textareaId,setShortcutHandler:function(e){return I=e}},m(w,{title:n("header"),icon:"fas fa-heading",style:{prefix:"### "}}),m(w,{title:n("bold"),icon:"fas fa-bold",style:{prefix:"**",suffix:"**",trimFirst:!0},hotkey:"b"}),m(w,{title:n("italic"),icon:"fas fa-italic",style:{prefix:"_",suffix:"_",trimFirst:!0},hotkey:"i"}),m(w,{title:n("quote"),icon:"fas fa-quote-left",style:{prefix:"> ",multiline:!0,surroundWithNewlines:!0}}),m(w,{title:n("code"),icon:"fas fa-code",style:{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"}}),m(w,{title:n("link"),icon:"fas fa-link",style:{prefix:"[",suffix:"](https://)",replaceNext:"https://",scanFor:"https?://"}}),m(w,{title:n("image"),icon:"fas fa-image",style:{prefix:"",replaceNext:"https://",scanFor:"https?://"}}),m(w,{title:n("unordered_list"),icon:"fas fa-list-ul",style:{prefix:"- ",multiline:!0,surroundWithNewlines:!0}}),m(w,{title:n("ordered_list"),icon:"fas fa-list-ol",style:{prefix:"1. ",multiline:!0,orderedList:!0}})),100)}))}))}]); 510 511 512flarum.extensions['flarum-markdown']=module.exports 513 514var module={} 515 516module.exports=function(t){var o={};function n(e){if(o[e])return o[e].exports;var r=o[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.l=!0,r.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 r in t)n.d(e,r,function(o){return t[o]}.bind(null,r));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=9)}([function(t,o){t.exports=flarum.core.compat["common/extend"]},function(t,o){t.exports=flarum.core.compat["common/components/LogInButton"]},function(t,o){t.exports=flarum.core.compat["common/components/LogInButtons"]},,function(t,o){t.exports=flarum.core.compat["common/utils/extractText"]},,,,,function(t,o,n){"use strict";n.r(o);var e=n(0),r=n(2),a=n.n(r),u=n(1),i=n.n(u),c=n(4),f=n.n(c);app.initializers.add("fof/oauth",(function(){var t=!!Number(app.data["fof-oauth.only_icons"]);Object(e.extend)(a.a.prototype,"items",(function(o){app.forum.attribute("fof-oauth").filter(Boolean).forEach((function(n){var e=n.name,r=n.icon,a="Button FoFLogInButton LogInButton--"+e;t&&"google"!==e&&(a+=" Button--icon"),o.add(e,m(i.a,{className:a,icon:r,path:"/auth/"+e},app.translator.trans("fof-oauth.forum.log_in.with_button",{provider:app.translator.trans("fof-oauth.lib.providers."+e)})))}))})),t&&(Object(e.extend)(i.a.prototype,"oncreate",(function(){this.$().tooltip({container:"#modal"})})),Object(e.override)(i.a.prototype,"view",(function(t,o){return this.attrs.title=f()(o.children),t(o)})),Object(e.extend)(a.a.prototype,"view",(function(t){t.attrs.className+=" FoFLogInButtons--icons"})))}))}]); 517 518 519flarum.extensions['fof-oauth']=module.exports 520 521var module={} 522 523module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
523),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 n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},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=18)}([function(t,e){t.exports=flarum.core.compat.Model},function(t,e,r){"use strict";function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}r.d(e,"a",(function(){return n}))},,function(t,e){t.exports=flarum.core.compat["components/LoadingIndicator"]},,function(t,e){t.exports=flarum.core.compat["models/User"]},function(t,e){t.exports=flarum.core.compat["utils/ItemList"]},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return c}));var n=r(0),o=r.n(n),u=r(5),a=r.n(u);function s(){return(s=Object.assign||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}).apply(this,arguments)}var i=r(1),l=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e}(o.a);function c(){app.store.models.trust_levels=l,a.a.prototype.trustLevels=o.a.hasMany("trustLevels")}s(l.prototype,{name:o.a.attribute("name"),group:o.a.hasOne("group"),metrics:o.a.attribute("metrics")})},,,function(t,e){t.exports=flarum.core.compat.extend},function(t,e){t.exports=flarum.core.compat["components/EditUserModal"]},,function(t,e,r){var n=r(7).default,o=r(19).default;app.initializers.add("askvortsov/flarum-trust-levels",(function(){n(),o()}))},function(t,e){t.exports=flarum.core.compat["components/GroupBadge"]},,,,function(t,e,r){"use strict";r.r(e);var n=r(13);for(var o in n)["default"].indexOf(o)<0&&function(t){r.d(e,t,(function(){return n[t]}))}(o)},function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return f}));var n=r(10),o=r(11),u=r.n(o),a=r(14),s=r.n(a),i=r(3),l=r.n(i),c=r(6),p=r.n(c);function f(){Object(n.extend)(u.a.prototype,"oninit",(function(){var t=this;this.loading=!0,app.store.find("trust_levels").then((function(e){e.forEach((function(e){return delete t.groups[e.group().id()]})),t.loading=!1,m.redraw()}))})),Object(n.override)(u.a.prototype,"fields",(function(t){var e=this;if(this.loading){var r=new p.a;return r.add("loading",m(l.a,null)),r}var n=t();return n.add("trustLevels",m("div",{className:"Form-group"},m("label",null,app.translator.trans("askvortsov-trust-levels.forum.edit_user.trust_levels_heading")),app.store.all("trust_levels").map((function(t){return m("label",{className:"checkbox"},m("input",{type:"checkbox",checked:e.attrs.user.trustLevels().includes(t),disabled:!0}),app.translator.trans("askvortsov-trust-levels.forum.edit_user.trust_level_item",{badge:s.a.component({group:t.group(),label:""}),level:t.name(),groupName:t.group().nameSingular()}))})),m("p",null,app.translator.trans("askvortsov-trust-levels.forum.edit_user.trust_levels_not_editable"))),10),n}))}}]); 524 525 526flarum.extensions['askvortsov-trust-levels']=module.exports 527 528var module={} 529 530module.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=7)}([function(t,e){t.exports=flarum.core.compat["common/extend"]},,,function(t,e){t.exports=flarum.core.compat["forum/components/IndexPage"]},,,,function(t,e,r){"use strict";r.r(e);var o=r(0),n=r(3),u=r.n(n);
530app.initializers.add("nearata-tags-color-generator",(function(t){Object(o.extend)(u.a.prototype,"oncreate",(function(){if("tag"===this.attrs.routeName){var e=this.currentTag().attribute("textColor"),r=this.currentTag().attribute("isCustomColor"),o=this.element.querySelector(".Hero-title");e.startsWith("theme")&&(o.style.color=t.forum.attribute(e)),r&&(o.style.color=e)}}))}))}]); 531 532 533flarum.extensions['nearata-tags-color-generator']=module.exports 534 535var module={} 536 537module.exports=function(t){var o={};function e(r){if(o[r])return o[r].exports;var n=o[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,e),n.l=!0,n.exports}return e.m=t,e.c=o,e.d=function(t,o,r){e.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:r})},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,o){if(1&o&&(t=e(t)),8&o)return t;if(4&o&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&o&&"string"!=typeof t)for(var n in t)e.d(r,n,function(o){return t[o]}.bind(null,n));return r},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},e.p="",e(e.s=22)}([function(t,o){t.exports=flarum.core.compat.app},function(t,o){t.exports=flarum.core.compat["common/Model"]},function(t,o){t.exports=flarum.core.compat["common/components/Button"]},function(t,o){t.exports=flarum.core.compat["forum/components/UserPage"]},function(t,o){t.exports=flarum.core.compat["common/Component"]},function(t,o){t.exports=flarum.core.compat["common/helpers/username"]},function(t,o){t.exports=flarum.core.compat["common/utils/ItemList"]},function(t,o){t.exports=flarum.core.compat["models/User"]},function(t,o){t.exports=flarum.core.compat["common/models/User"]},function(t,o){t.exports=flarum.core.compat["common/extend"]},function(t,o){t.exports=flarum.core.compat["common/components/LinkButton"]},function(t,o){t.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(t,o){t.exports=flarum.core.compat["common/helpers/fullTime"]},function(t,o){t.exports=flarum.core.compat["common/utils/extractText"]},function(t,o){t.exports=flarum.core.compat["common/helpers/avatar"]},function(t,o){t.exports=flarum.core.compat["common/components/Dropdown"]},function(t,o){t.exports=flarum.core.compat["common/components/Link"]},function(t,o){t.exports=flarum.core.compat["common/components/Modal"]},function(t,o){t.exports=flarum.core.compat["common/utils/Stream"]},function(t,o){t.exports=flarum.core.compat["common/utils/withAttr"]},function(t,o){t.exports=flarum.core.compat["common/helpers/listItems"]},function(t,o){t.exports=flarum.core},function(t,o,e){"use strict";e.r(o);var r=e(0),n=e.n(r),a=e(9),s=e(3),i=e.n(s),c=e(10),u=e.n(c);function l(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,t.__proto__=o}function p(){return(p=Object.assign||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}).apply(this,arguments)}var f=e(4),d=e.n(f),h=e(11),N=e.n(h),b=e(5),y=e.n(b),v=e(12),x=e.n(v),M=e(13),g=e.n(M),w=e(14),C=e.n(w),_=e(15),O=e.n(_),L=e(6),B=e.n(L),I=e(2),j=e.n(I),k=e(16),A=e.n(k),P=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var e=o.prototype;return e.view=function(){var t=this.attrs.note,o=t.addedByUser(),e=x()(t.createdAt()),r=this.noteActions(t);return m("div",{className:"ModeratorNotesListItem"},r.length?O.a.component({icon:"fas fa-ellipsis-v",className:"ModeratorNotesListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right"},r):"",m("div",{className:"ModeratorNotesListItem-main"},m("div",{className:"ModeratorNotesListItem-title"},m(A.a,{href:o?app.route.user(o):"#",className:"ModeratorNotesListItem-author",title:g()(app.translator.trans("fof-moderator-notes.forum.moderatorNotes.created_text",{user:o,date:e})),config:function(t){$(t).tooltip({placement:"right"}),m.route.apply(this,arguments)}},C()(o,{title:""})," ",y()(o))),m("p",null,e),m("hr",null),m("div",{className:"ModeratorNotesListItem-note"},m("ul",{className:"ModeratorNotesListItem-info"},m("li",{className:"item-content"},m("span",null,m.trust(t.note())))))))},e.noteActions=function(t){var o=this,e=new B.a;return app.session.user.canDeleteModeratorNotes()&&e.add("delete",j.a.component({icon:"far fa-trash-alt",onclick:function(){return o.deleteNote(t)}},app.translator.trans("fof-moderator-notes.forum.moderatorNotes.delete"))),e.toArray()},e.deleteNote=function(t){if(!0===confirm(app.translator.trans("fof-moderator-notes.forum.moderatorNotes.confirm")))return t.delete().then((function(){})).catch((function(){})).then((function(){location.reload()}))},o}(d.a),D=e(17),S=e.n(D),U=e(18),F=e.n(U),V=e(19),R=e.n(V),T=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var e=o.prototype;return e.oninit=function(o){t.prototype.oninit.call(this,o),this.noteContent=F()("")},e.className=function(){return"ModeratorNotesCreateModal Modal--large"},e.title=function(){return app.translator.trans("fof-moderator-notes.forum.moderatorNotes.create-heading")},e.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("fof-moderator-notes.forum.moderatorNotes.input_heading",{username:y()(this.attrs.user)}),m("textarea",{className:"FormControl",value:this.noteContent(),oninput:R()("value",this.noteContent),rows:"6"})))),m("div",{className:"Form-group"},m(j.a,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("fof-moderator-notes.forum.moderatorNotes.submit_button")))))},e.onsubmit=function(t){t.preventDefault(),this.loading=!0,app.store.createRecord("notes").save({userId:this.attrs.user.id(),note:this.noteContent()},{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).then(this.attrs.callback).catch((function(){})).then(this.loaded.bind(this))},e.onerror=function(o){422===o.status&&(o.alert.attrs=app.translator.trans("fof-moderator-notes.forum.no_content_given")),t.prototype.onerror.call(this,o)},o}(S.a),E=e(20),z=e.n(E),H=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var e=o.prototype;return e.oninit=function(o){t.prototype.oninit.call(this,o),this.loading=!0,this.notes=[],this.refresh()},e.view=function(){var t;return this.loading&&(t=N.a.component()),m("div",{className:"ModeratorNotesList"},m("h1",{className:"ModeratorNotesList-notes"},n.a.translator.trans("fof-moderator-notes.forum.user.notes")),m("div",{class:"ModeratorNotes-toolbar"},m("ul",{className:"ModeratorNotes-toolbar-action"},z()(this.actionItems().toArray()))),m("ul",{className:"ModeratorNotesList-discussions"},this.notes.map((function(t){return m("li",{key:t.id(),"data-id":t.id()},P.component({note:t}))})),!this.loading&&0===this.notes.length&&m("label",null,n.a.translator.trans("fof-moderator-notes.forum.moderatorNotes.noNotes"))),m("div",{className:"ModeratorNotesList-loadMore"},t))},e.actionItems=function(){var t=new B.a,o=n.a.session.user.canCreateModeratorNotes();return t.add("create_note",j.a.component({className:"Button Button--primary",onclick:this.handleOnClickCreate.bind(this),disabled:!o},n.a.translator.trans("fof-moderator-notes.forum.moderatorNotes.add_button"))),t},e.parseResults=function(t){return[].push.apply(this.notes,t),this.loading=!1,m.redraw(),t},e.refresh=function(){var t=this;return n.a.store.find("notes",this.attrs.params.user.id()).then((function(o){t.notes=[],t.parseResults(o)}),(function(){t.loading=!1,m.redraw.sync()}))},e.handleOnClickCreate=function(t){t.preventDefault(),n.a.modal.show(T,p({callback:this.refresh.bind(this)},this.attrs.params))},o}(d.a),q=function(t){function o(){return t.apply(this,arguments)||this}l(o,t);var e=o.prototype;return e.oninit=function(o){t.prototype.oninit.call(this,o),this.loadUser(m.route.param("username"))},e.content=function(){return m("div",{className:"DiscussionsUserPage"},H.component({params:{user:this.user,sort:"newest"}}))},o}(i.a),G=e(1),J=e.n(G),K=e(8),Q=e.n(K),W=function(){Q.a.prototype.canViewModeratorNotes=J.a.attribute("canViewModeratorNotes"),Q.a.prototype.moderatorNoteCount=J.a.attribute("moderatorNoteCount"),app.routes["user.notes"]={path:"/u/:username/notes",component:q},Object(a.extend)(i.a.prototype,"navItems",(function(t){app.session.user&&app.session.user.canViewModeratorNotes()&&t.add("notes",u.a.component({href:app.route("user.notes",{username:this.user.username()}),icon:"fas fa-sticky-note"},[app.translator.trans("fof-moderator-notes.forum.user.notes"),this.user.moderatorNoteCount()>0?m("span",{className:"Button-badge"},this.user.moderatorNoteCount()):""]),10)}))};function X(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Y(t,o,e){return o in t?Object.defineProperty(t,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[o]=e,t}var Z=function(t){function o(){for(var o,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Y(X(o=t.call.apply(t,[this].concat(r))||this),"id",J.a.attribute("id")),Y(X(o),"note",J.a.attribute("note")),Y(X(o),"createdAt",J.a.attribute("createdAt",J.a.transformDate)),Y(X(o),"addedByUser",J.a.hasOne("addedByUser")),o}return l(o,t),o}(J.a),tt=e(21),ot=e(7),et=e.n(ot);
537n.a.initializers.add("fof-moderator-notes",(function(t){t.store.models.notes=Z,et.a.prototype.canViewModeratorNotes=J.a.attribute("canViewModeratorNotes"),et.a.prototype.canCreateModeratorNotes=J.a.attribute("canCreateModeratorNotes"),et.a.prototype.canDeleteModeratorNotes=J.a.attribute("canDeleteModeratorNotes"),W()}));var rt=[new tt.Extend.Model("moderatorNotes",Z)];e.d(o,"extend",(function(){return rt}))}]); 538 539 540flarum.extensions['fof-moderator-notes']=module.exports 541 542var module={} 543 544module.exports=function(t){var r={};function o(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=t,o.c=r,o.d=function(t,r,e){o.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,r){if(1&r&&(t=o(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var n in t)o.d(e,n,function(r){return t[r]}.bind(null,n));return e},o.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(r,"a",r),r},o.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},o.p="",o(o.s=8)}([,function(t,r){t.exports=flarum.core.compat["common/utils/formatNumber"]},function(t,r){t.exports=flarum.core.compat["common/utils/Stream"]},function(t,r){t.exports=flarum.core.compat.extend},function(t,r){t.exports=flarum.core.compat["forum/components/IndexPage"]},function(t,r){t.exports=flarum.core.compat.Component},function(t,r){t.exports=flarum.core.compat["common/helpers/username"]},function(t,r){t.exports=flarum.core.compat["common/components/Link"]},function(t,r,o){"use strict";o.r(r);var e=o(3),n=o(4),u=o.n(n);var a=o(5),s=o.n(a),i=o(6),c=o.n(i),p=o(1),f=o.n(p),l=o(2),d=o.n(l),b=o(7),y=o.n(b),v="fof-forum-statistics-widget.forum.navbar.",g="fof-forum-statistics-widget.",x=function(t){var r,o;function e(){return t.apply(this,arguments)||this}return o=t,(r=e).prototype=Object.create(o.prototype),r.prototype.constructor=r,r.__proto__=o,e.prototype.view=function(){var t=f()(app.forum.attribute(g+"discussionsCount")),r=f()(app.forum.attribute(g+"postsCount")),o=f()(app.forum.attribute(g+"usersCount")),e={displayName:d()(app.forum.attribute(g+"lastUser")),slug:d()(app.forum.attribute(g+"lastUser"))};return m("div",{class:"ForumStatistics containerNarrow"},m("div",{class:"row"},m("h2",null,m("i",{class:"fas fa-chart-bar"})," ",app.translator.trans(v+"widget_title")),m("div",null,m("ul",{id:"ForumStatisticsList"},m("li",null,app.translator.trans(v+"discussions_count",{discussionsCount:t})),m("li",null,app.translator.trans(v+"posts_count",{postsCount:r})),m("li",null,app.translator.trans(v+"users_count",{usersCount:o})),m("li",null,app.translator.trans(v+"latest_member"),m(y.a,{href:app.route.user(e)},m("strong",null," ",c()(e))))))))},e}(s.a);app.initializers.add("fof/forum-statistics-widget",(function(){Object(e.extend)(u.a.prototype,"sidebarItems",(function(t){t.add("forumStatisticsWidget",x.component(),app.forum.attribute("fof-forum-statistics-widget.widget_order"))}))}))}]); 545 546 547flarum.extensions['fof-forum-statistics-widget']=module.exports 548 549var module={} 550 551module.exports=function(t){var e={};function n(s){if(e[s])return e[s].exports;var o=e[s]={i:s,l:!1,exports:{}};return t[s].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,s){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},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 s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(s,o,function(e){return t[e]}.bind(null,o));return s},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=23)}([function(t,e,n){"use strict";function s(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"a",(function(){return s}))},function(t,e){t.exports=flarum.core.compat["common/extend"]},function(t,e){t.exports=flarum.core.compat["common/app"]},function(t,e){t.exports=flarum.core.compat["common/models/Discussion"]},function(t,e){t.exports=flarum.core.compat["common/Model"]},function(t,e){t.exports=flarum.core.compat["common/components/Notification"]},function(t,e){t.exports=flarum.core.compat["common/components/CommentPost"]},,function(t,e){t.exports=flarum.core.compat["common/components/Link"]},function(t,e){t.exports=flarum.core.compat["common/components/DiscussionPage"]},function(t,e){t.exports=flarum.core.compat["common/components/Button"]},function(t,e){t.exports=flarum.core.compat["common/helpers/username"]},function(t,e){t.exports=flarum.core.compat["common/helpers/icon"]},function(t,e){t.exports=flarum.core.compat["common/components/NotificationGrid"]},function(t,e){t.exports=flarum.core.compat["common/utils/PostControls"]},function(t,e){t.exports=flarum.core.compat["common/components/Post"]},function(t,e){t.exports=flarum.core.compat["common/components/PostMeta"]},function(t,e){t.exports=flarum.core.compat["common/helpers/userOnline"]},function(t,e){t.exports=flarum.core.compat["common/Component"]},function(t,e){t.exports=flarum.core.compat["common/helpers/humanTime"]},function(t,e){t.exports=flarum.core.compat["common/components/Badge"]},,,function(t,e,n){"use strict";n.r(e);var s=n(1),o=n(2),r=n.n(o),a=n(3),i=n.n(a),c=n(4),u=n.n(c),p=n(13),f=n.n(p),l=n(0),d=n(5),b=n.n(d),w=function(t){function e(){return t.apply(this,arguments)||this}Object(l.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-comment-dots"},n.href=function(){var t=this.attrs.notification.subject();
551return app.route.discussion(t)},n.content=function(){return app.translator.trans("fof-best-answer.forum.notification.content")},e}(b.a),A=n(10),h=n.n(A),y=n(14),v=n.n(y),x=n(9),P=n.n(x),_=n(6),B=n.n(_),O=n(15),j=n.n(O),g=n(16),N=n.n(g),S=n(11),k=n.n(S),U=n(17),C=n.n(U),I=n(8),T=n.n(I),D=n(18),H=n.n(D),M=n(12),z=n.n(M),G=n(19),L=n.n(G),q=function(t){function e(){return t.apply(this,arguments)||this}Object(l.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs,e=t.post,n=t.discussion;return m("li",{className:"Post--BestAnswer"},e?m("span",null,z()("fas fa-check"),app.translator.trans("fof-best-answer.forum.best_answer_button")):m(T.a,{href:app.route.post(e),"data-number":e.number()},z()("fas fa-check"),app.translator.trans("fof-best-answer.forum.best_answer_button")),m("span",{className:"BestAnswer--User"},app.translator.trans("fof-best-answer.forum.best_answer_label",{user:n.bestAnswerUser(),time_set:this.getSetTime(n),a:m("a",{onclick:function(){return m.route.set(app.route.user(n.bestAnswerUser()))}})})))},n.getSetTime=function(t){if(null!==t.bestAnswerSetAt())return L()(t.bestAnswerSetAt())},e}(H.a),E=n(20),F=n.n(E),J=function(t){function e(){return t.apply(this,arguments)||this}Object(l.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-check"},n.href=function(){var t=this.attrs.notification.subject();return app.route.discussion(t)},n.content=function(){var t=this.attrs.notification.fromUser();return app.translator.trans("fof-best-answer.forum.notification.awarded",{user:t})},e}(b.a),K=function(t){function e(){return t.apply(this,arguments)||this}Object(l.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-check"},n.href=function(){var t=this.attrs.notification.subject();return app.route.discussion(t)},n.content=function(){var t=this.attrs.notification.fromUser();return app.translator.trans("fof-best-answer.forum.notification.best_answer_in_discussion",{user:t})},e}(b.a);r.a.initializers.add("fof/best-answer",(function(){var t,e,n,o,a;i.a.prototype.bestAnswerPost=u.a.hasOne("bestAnswerPost"),i.a.prototype.bestAnswerUser=u.a.hasOne("bestAnswerUser"),i.a.prototype.hasBestAnswer=u.a.attribute("hasBestAnswer"),i.a.prototype.canSelectBestAnswer=u.a.attribute("canSelectBestAnswer"),i.a.prototype.bestAnswerSetAt=u.a.attribute("bestAnswerSetAt",u.a.transformDate),r.a.notificationComponents.selectBestAnswer=w,r.a.notificationComponents.awardedBestAnswer=J,r.a.notificationComponents.bestAnswerInDiscussion=K,Object(s.extend)(i.a.prototype,"badges",(function(t){this.hasBestAnswer()&&!t.has("hidden")&&t.add("bestAnswer",F.a.component({type:"bestAnswer",icon:"fas fa-check",label:r.a.translator.trans("fof-best-answer.forum.answered_badge")}))})),t=function(t,e){return e.isHidden()||1===e.number()||!t.canSelectBestAnswer()||!app.session.user},e=function(t){return!app.forum.attribute("canSelectBestAnswerOwnPost")&&t.user()&&t.user().id()===app.session.user.id()},n=function(t,e){return t.bestAnswerPost()&&t.bestAnswerPost().id()===e.id()},o=function(t){return app.translator.trans(t?"fof-best-answer.forum.remove_best_answer":"fof-best-answer.forum.this_best_answer")},a=function(t,e,n){t.save({bestAnswerPostId:e?n.id():0,bestAnswerUserId:app.session.user.id(),relationships:e?{bestAnswerPost:n,bestAnswerUser:app.session.user}:delete t.data.relationships.bestAnswerPost}).then((function(){app.current.matches(P.a)&&app.current.get("stream").update(),m.redraw(),e&&m.route.set(app.route.discussion(t))}))},Object(s.extend)(v.a,"moderationControls",(function(s,r){if(!app.forum.attribute("useAlternativeBestAnswerUi")){var i=r.discussion(),c=n(i,r);r.pushAttributes({isBestAnswer:c}),"comment"===r.contentType()&&(t(i,r)||e(r)||!app.current.matches(P.a)||s.add("bestAnswer",h.a.component({icon:"fa"+(c?"s":"r")+" fa-comment-dots",onclick:function(){a(i,c=!c,r)}},o(c))))}})),Object(s.extend)(B.a.prototype,"actionItems",(function(s){if(app.forum.attribute("useAlternativeBestAnswerUi")){var r=this.attrs.post,i=this.attrs.post.discussion(),c=n(i,r),u=!1!==i.bestAnswerPost();r.pushAttributes({isBestAnswer:c}),t(i,r)||e(r)||!app.current.matches(P.a)||s.add("bestAnswer",h.a.component({className:u?c?"Button Button--primary":"Button Button--link":"Button Button--primary",onclick:function(){u=!u,a(i,c=!c,r)}},o(c)))}})),Object(s.extend)(B.a.prototype,"headerItems",(function(t){var e=this.attrs.post;e.discussion().bestAnswerPost()&&e.discussion().bestAnswerPost().id()===e.id()&&!e.isHidden()&&t.add("isBestAnswer",q.component({post:e,discussion:e.discussion()}))})),Object(s.extend)(B.a.prototype,"footerItems",(function(t){var e=this.attrs.post,n=e.discussion(),s=n.bestAnswerPost();if(s&&!s.isHidden()&&1===e.number()&&!e.isHidden()){var o=s.user();
551t.add("bestAnswerPost",m("div",{className:"CommentPost",onclick:function(){return app.current.get("stream").goToNumber(s.number())}},m("div",{className:"Post-header"},m("ul",null,m("li",{className:"item-user"},m("div",{className:"PostUser"},o&&C()(o),m("h3",null,o?m(T.a,{href:app.route.user(o)},k()(o)):k()(o)))),s.discussion()&&m("li",{className:"item-meta"},N.a.component({post:s})),q.component({post:s,discussion:n}))),m("div",{className:"Post-body"},m.trust(s.contentHtml()))),-10)}})),Object(s.extend)(j.a.prototype,"elementAttrs",(function(t){var e=this.attrs.post;e.discussion().bestAnswerPost()&&e.discussion().bestAnswerPost().id()===e.id()&&!e.isHidden()&&(t.className?t.className+=" Post--bestAnswer":t.className="Post--bestAnswer")})),Object(s.extend)(f.a.prototype,"notificationTypes",(function(t){t.add("awardedBestAnswer",{name:"awardedBestAnswer",icon:"fas fa-check",label:r.a.translator.trans("fof-best-answer.forum.notification.preferences.awarded_best_answer")}),t.add("bestAnswerInDiscussion",{name:"bestAnswerInDiscussion",icon:"fas fa-check",label:r.a.translator.trans("fof-best-answer.forum.notification.preferences.best_answer_in_discussion")})}))}))}]); 552 553 554flarum.extensions['fof-best-answer']=module.exports 555 556var module={} 557 558module.exports=function(t){var e={};function n(s){if(e[s])return e[s].exports;var a=e[s]={i:s,l:!1,exports:{}};return t[s].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,s){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},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 s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(s,a,function(e){return t[e]}.bind(null,a));return s},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=11)}([function(t,e){t.exports=flarum.core.compat.app},function(t,e){t.exports=flarum.core.compat["components/Button"]},function(t,e){t.exports=flarum.core.compat["components/Notification"]},function(t,e){t.exports=flarum.core.compat.Model},function(t,e){t.exports=flarum.core.compat["models/User"]},function(t,e){t.exports=flarum.core.compat["utils/withAttr"]},function(t,e){t.exports=flarum.core.compat.extend},function(t,e){t.exports=flarum.core.compat["utils/Stream"]},function(t,e){t.exports=flarum.core.compat["utils/UserControls"]},function(t,e){t.exports=flarum.core.compat["components/Badge"]},function(t,e){t.exports=flarum.core.compat["components/Modal"]},function(t,e,n){"use strict";n.r(e);var s=n(6),a=n(0),r=n.n(a),o=n(8),u=n.n(o),i=n(1),l=n.n(i),p=n(9),c=n.n(p),d=n(3),f=n.n(d),y=n(4),h=n.n(y);function b(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var v=n(10),_=n.n(v),x=n(7),g=n.n(x),j=n(5),S=n.n(j),U=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);var n=this.attrs.user.suspendedUntil(),s=null;new Date>n&&(n=null),n&&(s=9999===n.getFullYear()?"indefinitely":"limited"),this.status=g()(s),this.daysRemaining=g()("limited"===s&&1-dayjs().diff(n,"days"))},n.className=function(){return"SuspendUserModal Modal--small"},n.title=function(){return app.translator.trans("flarum-suspend.forum.suspend_user.title",{user:this.attrs.user})},n.content=function(){var t=this;return m("div",{className:"Modal-body"},m("div",{className:"Form"},m("div",{className:"Form-group"},m("label",null,app.translator.trans("flarum-suspend.forum.suspend_user.status_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:!this.status(),value:"",onclick:S()("value",this.status)}),app.translator.trans("flarum-suspend.forum.suspend_user.not_suspended_label")),m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:"indefinitely"===this.status(),value:"indef
558initely",onclick:S()("value",this.status)}),app.translator.trans("flarum-suspend.forum.suspend_user.indefinitely_label")),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}}),app.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"}),app.translator.trans("flarum-suspend.forum.suspend_user.limited_time_days_text")):""))),m("div",{className:"Form-group"},m(l.a,{className:"Button Button--primary",loading:this.loading,type:"submit"},app.translator.trans("flarum-suspend.forum.suspend_user.submit_button")))))},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}).then((function(){return e.hide()}),this.loaded.bind(this))},e}(_.a),M=n(2),N=n.n(M),k=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-ban"},n.href=function(){return app.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 app.translator.trans("flarum-suspend.forum.notifications.user_suspended_text",{user:t.fromUser(),timeReadable:n})},e}(N.a),O=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-ban"},n.href=function(){return app.route.user(this.attrs.notification.subject())},n.content=function(){var t=this.attrs.notification;return app.translator.trans("flarum-suspend.forum.notifications.user_unsuspended_text",{user:t.fromUser()})},e}(N.a);r.a.initializers.add("flarum-suspend",(function(){r.a.notificationComponents.userSuspended=k,r.a.notificationComponents.userUnsuspended=O,h.a.prototype.canSuspend=f.a.attribute("canSuspend"),h.a.prototype.suspendedUntil=f.a.attribute("suspendedUntil",f.a.transformDate),Object(s.extend)(u.a,"moderationControls",(function(t,e){e.canSuspend()&&t.add("suspend",l.a.component({icon:"fas fa-ban",onclick:function(){return r.a.modal.show(U,{user:e})}},r.a.translator.trans("flarum-suspend.forum.user_controls.suspend_button")))})),Object(s.extend)(h.a.prototype,"badges",(function(t){var e=this.suspendedUntil();new Date<e&&t.add("suspended",c.a.component({icon:"fas fa-ban",type:"suspended",label:r.a.translator.trans("flarum-suspend.forum.user_badge.suspended_tooltip")}))}))}))}]); 559 560 561flarum.extensions['flarum-suspend']=module.exports 562 563var module={} 564 565module.exports=function(t){var o={};function n(r){if(o[r])return o[r].exports;var s=o[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=o,n.d=function(t,o,r){n.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&o&&"string"!=typeof t)for(var s in t)n.d(r,s,function(o){return t[o]}.bind(null,s));return r},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=21)}([function(t,o){t.exports=flarum.core.compat.extend},function(t,o){t.exports=flarum.core.compat["components/IndexPage"]},function(t,o){t.exports=flarum.core.compat["helpers/icon"]},function(t,o){t.exports=flarum.core.compat.app},function(t,o){t.exports=flarum.core.compat["models/Discussion"]},function(t,o){t.exports=flarum.core.compat["components/Button"]},function(t,o){t.exports=flarum.core.compat["components/Badge"]},function(t,o){t.exports=flarum.core.compat["components/DiscussionPage"]},function(t,o){t.exports=flarum.core.compat.Model},function(t,o){t.exports=flarum.core.compat["components/NotificationGrid"]},function(t,o){t.exports=flarum.core.compat["utils/DiscussionControls"]},function(t,o){t.exports=flarum.core.compat["components/Dropdown"]},function(t,o){t.exports=flarum.core.compat["utils/extractText"]},function(t,o){t.exports=flarum.core.compat.Component},function(t,o){t.exports=flarum.core.compat["components/LinkButton"]},function(t,o){t.exports=flarum.core.compat["states/DiscussionListState"]},function(t,o){t.exports=flarum.core.compat["states/GlobalSearchState"]},function(t,o){t.exports=flarum.core.compat["components/SettingsPage"]},function(t,o){t.exports=flarum.core.compat["components/Switch"]},function(t,o){t.exports=flarum.core.compat["components/Notification"]},function(t,o){t.exports=flarum.core.compat["helpers/username"]},function(t,o,n){"use strict";n.r(o);var r=n(0),s=n(3),e=n.n(s),a=n(8),i=n.n(a),c=n(4),u=n.n(c),p=n(1),l=n.n(p),f=n(9),b=n.n(f),d=n(6),g=n.n(d);var _=n(5),w=n.n(_),y=n(7),h=n.n(y),x=n(10),v=n.n(x);function O(){return(O=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var n=arguments[o];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function S(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,t.__proto__=o}var j=n(11),P=n.n(j),N=n(2),M=n.n(N),k=n(12),B=n.n(k),D=n(13),I=function(t){function o(){return t.apply(this,arguments)||this}return S(o,t),o.prototype.view=function(){return m("button",{className:"SubscriptionMenuItem hasIcon",onclick:this.attrs.onclick},this.attrs.active?M()("fas fa-check",{className:"Button-icon"}):"",m("span",{className:"SubscriptionMenuItem-label"},M()(this.attrs.icon,{className:"Button-icon"}),m("strong",null,this.attrs.label),m("span",{className:"SubscriptionMenuItem-description"},this.attrs.description)))},o}(n.n(D).a),A=function(t){function o(){return t.apply(this,arguments)||this}S(o,t);var n=o.prototype;return n.oninit=function(o){t.prototype.oninit.call(this,o),this.options=[{subscription:!1,icon:"far fa-star",label:app.translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),description:app.translator.trans("flarum-subscriptions.forum.sub_controls.not_following_text")},{subscription:"follow",icon:"fas fa-star",label:app.translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),description:app.translator.trans("flarum-subscriptions.forum.sub_controls.following_text")},{subscription:"ignore",icon:"far fa-eye-slash",label:app.translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_button"),description:app.translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_text")}]},n.view=function(){var t=this,o=this.attrs.discussion,n=o.subscription(),r=app.translator.trans("flarum-subscriptions.forum.sub_controls.follow_button"),s="far fa-star",e="SubscriptionMenu-button--"+n;switch(n){case"follow":r=app.translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),s="fas fa-star";break;case"ignore":r=app.translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_button"),s="far fa-eye-slash"}var a=app.session.user.preferences(),i=a.notify_newPost_email,c=a.notify_newPost_alert,u=B()(app.translator.trans(i?"flarum-subscriptions.forum.sub_controls.notify_email_tooltip":"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip")),p={className:"Button SubscriptionMenu-button "+e,icon:s,onclick:this.saveSubscription.bind(this,o,-1===["follow","ignore"].indexOf(n)&&"follow"),title:u};return(i||c)&&!1===n?p.oncreate=p.onupdate=function(t){$(t.dom).tooltip({container:".SubscriptionMenu",placement:"bottom",delay:250,title:u})}:p.onupdate=function(t){return $(t.dom).tooltip("destroy")},m("div",{className:"Dropdown ButtonGroup SubscriptionMenu"},w.a.component(p,r),m("button",{className:"Dropdown-toggle Button Button--icon "+e,"data-toggle":"dropdown"},M()("fas fa-caret-down",{className:"Button-icon"})),m("ul",{className:"Dropdown-menu dropdown-menu Dropdown-menu--right"},this.options.map((function(r){return m("li",null,I.component(O(O({},r),{},{onclick:t.saveSubscription.bind(t,o,r.subscription),active:n===r.subscription})))}))))},n.saveSubscription=function(t,o){t.save({subscription:o}),this.$(".SubscriptionMenu-button").tooltip("hide")},o}(P.a);var R=n(14),T=n.n(R),L=n(15),C=n.n(L),G=n(16),F=n.n(G);var q=n(17),z=n.n(q),U=n(18),E=n.n(U),H=n(19),J=n.n(H),K=(n(20),function(t){function o(){return t.apply(this,arguments)||this}S(o,t);var n=o.prototype;return n.icon=function(){return"fas fa-star"},n.href=function(){var t=this.attrs.notification,o=t.subject(),n=t.content()||{};
565return app.route.discussion(o,n.postNumber)},n.content=function(){return app.translator.trans("flarum-subscriptions.forum.notifications.new_post_text",{user:this.attrs.notification.fromUser()})},o}(J.a));e.a.initializers.add("subscriptions",(function(){e.a.routes.following={path:"/following",component:l.a},e.a.notificationComponents.newPost=K,u.a.prototype.subscription=i.a.attribute("subscription"),Object(r.extend)(u.a.prototype,"badges",(function(t){var o;switch(this.subscription()){case"follow":o=g.a.component({label:app.translator.trans("flarum-subscriptions.forum.badge.following_tooltip"),icon:"fas fa-star",type:"following"});break;case"ignore":o=g.a.component({label:app.translator.trans("flarum-subscriptions.forum.badge.ignoring_tooltip"),icon:"far fa-eye-slash",type:"ignoring"})}o&&t.add("subscription",o)})),Object(r.extend)(v.a,"userControls",(function(t,o,n){if(app.session.user&&!(n instanceof h.a)){var r={none:{label:app.translator.trans("flarum-subscriptions.forum.discussion_controls.follow_button"),icon:"fas fa-star",save:"follow"},follow:{label:app.translator.trans("flarum-subscriptions.forum.discussion_controls.unfollow_button"),icon:"far fa-star",save:!1},ignore:{label:app.translator.trans("flarum-subscriptions.forum.discussion_controls.unignore_button"),icon:"fas fa-eye",save:!1}},s=o.subscription()||"none";t.add("subscription",w.a.component({icon:r[s].icon,onclick:o.save.bind(o,{subscription:r[s].save})},r[s].label))}})),Object(r.extend)(h.a.prototype,"sidebarItems",(function(t){if(app.session.user){var o=this.discussion;t.add("subscription",A.component({discussion:o}))}})),Object(r.extend)(l.a.prototype,"navItems",(function(t){if(app.session.user){var o=app.search.stickyParams();t.add("following",T.a.component({href:app.route("following",o),icon:"fas fa-star"},app.translator.trans("flarum-subscriptions.forum.index.following_link")),50)}})),Object(r.extend)(l.a.prototype,"setTitle",(function(){"following"===app.current.get("routeName")&&app.setTitle(app.translator.trans("flarum-subscriptions.forum.following.meta_title_text"))})),Object(r.extend)(F.a.prototype,"params",(function(t){t.onFollowing="following"===app.current.get("routeName")}
565)),Object(r.extend)(C.a.prototype,"requestParams",(function(t){this.params.onFollowing&&(t.filter.subscription="following")})),Object(r.extend)(z.a.prototype,"notificationsItems",(function(t){var o=this;t.add("followAfterReply",E.a.component({state:this.user.preferences().followAfterReply,onchange:function(t){o.followAfterReplyLoading=!0,o.user.savePreferences({followAfterReply:t}).then((function(){o.followAfterReplyLoading=!1,m.redraw()}))},loading:this.followAfterReplyLoading},app.translator.trans("flarum-subscriptions.forum.settings.follow_after_reply_label")))})),Object(r.extend)(b.a.prototype,"notificationTypes",(function(t){t.add("newPost",{name:"newPost",icon:"fas fa-star",label:e.a.translator.trans("flarum-subscriptions.forum.settings.notify_new_post_label")})}))}))}]); 566 567 568flarum.extensions['flarum-subscriptions']=module.exports 569 570var module={} 571 572module.exports=function(t){var o={};function n(e){if(o[e])return o[e].exports;var r=o[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.l=!0,r.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 r in t)n.d(e,r,function(o){return t[o]}.bind(null,r));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=13)}([function(t,o){t.exports=flarum.core.compat.app},function(t,o){t.exports=flarum.core.compat.extend},function(t,o){t.exports=flarum.core.compat["models/Discussion"]},function(t,o){t.exports=flarum.core.compat["components/DiscussionPage"]},function(t,o){t.exports=flarum.core.compat.Model},function(t,o){t.exports=flarum.core.compat["utils/DiscussionControls"]},function(t,o){t.exports=flarum.core.compat["components/EventPost"]},function(t,o){t.exports=flarum.core.compat["components/Badge"]},function(t,o){t.exports=flarum.core.compat["components/Button"]},function(t,o){t.exports=flarum.core.compat["states/DiscussionListState"]},function(t,o){t.exports=flarum.core.compat["components/DiscussionListItem"]},function(t,o){t.exports=flarum.core.compat["components/IndexPage"]},function(t,o){t.exports=flarum.core.compat["utils/string"]},function(t,o,n){"use strict";n.r(o);var e=n(0),r=n.n(e),c=n(4),i=n.n(c),s=n(2),a=n.n(s);var u=n(6),p=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,o.__proto__=n;var r=e.prototype;return r.icon=function(){return"fas fa-thumbtack"},r.descriptionKey=function(){return this.attrs.post.content().sticky?"flarum-sticky.forum.post_stream.discussion_stickied_text":"flarum-sticky.forum.post_stream.discussion_unstickied_text"},e}(n.n(u).a),f=n(1),l=n(7),d=n.n(l);var y=n(5),k=n.n(y),b=n(3),x=n.n(b),_=n(8),v=n.n(_);var h=n(9),S=n.n(h),g=n(10),j=n.n(g),O=n(11),P=n.n(O),D=n(12);r.a.initializers.add("flarum-sticky",(function(){r.a.postComponents.discussionStickied=p,a.a.prototype.isSticky=i.a.attribute("isSticky"),a.a.prototype.canSticky=i.a.attribute("canSticky"),Object(f.extend)(a.a.prototype,"badges",(function(t){this.isSticky()&&t.add("sticky",d.a.component({type:"sticky",label:app.translator.trans("flarum-sticky.forum.badge.sticky_tooltip"),icon:"fas fa-thumbtack"}),10)})),Object(f.extend)(k.a,"moderationControls",(function(t,o){o.canSticky()&&t.add("sticky",v.a.component({icon:"fas fa-thumbtack",onclick:this.stickyAction.bind(o)},app.translator.trans(o.isSticky()?"flarum-sticky.forum.discussion_controls.unsticky_button":"flarum-sticky.forum.discussion_controls.sticky_button")))})),k.a.stickyAction=function(){this.save({isSticky:!this.isSticky()}).then((function(){app.current.matches(x.a)&&app.current.get("stream").update(),m.redraw()}))}
572,Object(f.extend)(S.a.prototype,"requestParams",(function(t){(app.current.matches(P.a)||app.current.matches(x.a))&&t.include.push("firstPost")})),Object(f.extend)(j.a.prototype,"infoItems",(function(t){var o=this.attrs.discussion;if(o.isSticky()&&!this.attrs.params.q&&!o.lastReadPostNumber()){var n=o.firstPost();if(n){var e=Object(D.truncate)(n.contentPlain(),175);t.add("excerpt",m("div",null,e),-100)}}}))}))}]); 573 574 575flarum.extensions['flarum-sticky']=module.exports 576 577var module={} 578 579module.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=28)}([function(t,e){t.exports=flarum.core.compat.extend},function(t,e){t.exports=flarum.core.compat["components/CommentPost"]},function(t,e){t.exports=flarum.core.compat.app},function(t,e){t.exports=flarum.core.compat["utils/string"]},function(t,e){t.exports=flarum.core.compat["helpers/username"]},function(t,e){t.exports=flarum.core.compat["components/PostPreview"]},function(t,e){t.exports=flarum.core.compat["helpers/icon"]},function(t,e){t.exports=flarum.core.compat["components/EditPostComposer"]},function(t,e){t.exports=flarum.core.compat.Fragment},function(t,e){t.exports=flarum.core.compat["components/Notification"]},function(t,e){t.exports=flarum.core.compat["components/TextEditor"]},function(t,e){t.exports=flarum.core.compat["utils/extractText"]},function(t,e){t.exports=flarum.core.compat["components/NotificationGrid"]},function(t,e){t.exports=flarum.core.compat["components/LoadingIndicator"]},function(t,e){t.exports=flarum.core.compat.Model},function(t,e){t.exports=flarum.core.compat["models/Post"]},function(t,e){t.exports=flarum.core.compat["components/Link"]},function(t,e){t.exports=flarum.core.compat["helpers/punctuateSeries"]},function(t,e){t.exports=flarum.core.compat["components/Button"]},function(t,e){t.exports=flarum.core.compat["utils/DiscussionControls"]},function(t,e){t.exports=flarum.core.compat["components/TextEditorButton"]},function(t,e){t.exports=flarum.core.compat["components/ReplyComposer"]},function(t,e){t.exports=flarum.core.compat["helpers/avatar"]},function(t,e){t.exports=flarum.core.compat["helpers/highlight"]},function(t,e){t.exports=flarum.core.compat["utils/KeyboardNavigatable"]},function(t,e){t.exports=flarum.core.compat["components/UserPage"]},function(t,e){t.exports=flarum.core.compat["components/LinkButton"]},function(t,e){t.exports=flarum.core.compat["components/PostsUserPage"]},function(t,e,n){"use strict";n.r(e),n.d(e,"filterUserMentions",(function(){return vt})),n.d(e,"filterPostMentions",(function(){return bt}));var o=n(0),r=n(2),i=n.n(r),s=n(12),a=n.n(s),u=n(3),c=n(1),p=n.n(c),f=n(5),l=n.n(f),d=n(13),h=n.n(d);var v=n(14),b=n.n(v),y=n(15),g=n.n(y),x=n(16),w=n.n(x),P=n(17),C=n.n(P),T=n(4),_=n.n(T),j=n(6),M=n.n(j);var O=n(18),B=n.n(O),k=n(19),A=n.n(k),S=n(7),H=n.n(S);function N(t,e,n){var o=t.user(),r="@"+(o?o.username():t.number())+"#"+t.id()+" ";e.fields.content()||(e.body.attrs.originalContent=r);var i=e.editor.getSelectionRange()[0],s=e.fields.content().slice(0,i),a=0==s.length?0:3-s.match(/(\n{0,2})$/)[0].length;e.editor.insertAtCursor(Array(a).join("\n")+(n?"> "+r+n.trim().replace(/\n/g,"\n> ")+"\n\n":r),!1)}function E(t,e){app.composer.bodyMatches(H.a)&&app.composer.body.attrs.post.discussion()===t.discussion()?N(t,app.composer,e):A.a.replyAction.call(t.discu
579ssion()).then((function(n){return N(t,n,e)}))}function I(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var W=n(8),D=n.n(W),L=function(t){function e(e){var n;return(n=t.call(this)||this).post=e,n}I(e,t);var n=e.prototype;return n.view=function(){var t=this;return m("button",{class:"Button PostQuoteButton",onclick:function(){E(t.post,t.content)}},M()("fas fa-quote-left",{className:"Button-icon"}),app.translator.trans("flarum-mentions.forum.post.quote_button"))},n.show=function(t,e){var n=this.$().show(),o=n.offsetParent().offset();n.css("left",t-o.left).css("top",e-o.top),this.hideHandler=this.hide.bind(this),$(document).on("mouseup",this.hideHandler)},n.showStart=function(t,e){var n=this.$();this.show(t,$(window).scrollTop()+e-n.outerHeight()-5)},n.showEnd=function(t,e){var n=this.$();this.show(t-n.outerWidth(),$(window).scrollTop()+e+5)},n.hide=function(){this.$().hide(),$(document).off("mouseup",this.hideHandler)},e}(D.a);function R(){Object(o.extend)(p.a.prototype,"oncreate",(function(){var t=this.attrs.post;if(!(t.isHidden()||app.session.user&&!t.discussion().canReply())){var e=this.$(".Post-body"),n=$('<div class="Post-quoteButtonContainer"></div>'),o=new L(t),r=function(t){setTimeout((function(){var r=function(t){var e=window.getSelection();if(e.rangeCount){var n=e.getRangeAt(0),o=n.commonAncestorContainer;if(t[0]===o||$.contains(t[0],o)){var r=$("<div>").append(n.cloneContents());return r.find("img.emoji").replaceWith((function(){return this.alt})),r.find("img").replaceWith((function(){return""})),r.find("a").replaceWith((function(){return"["+this.innerText+"]("+this.href+")"})),r.text()}}return""}(e);if(r){o.content=r,m.render(n[0],o.render());var i=window.getSelection().getRangeAt(0).getClientRects(),s=i[0];
579if(t.clientY<s.bottom&&t.clientX-s.right<s.left-t.clientX)o.showStart(s.left,s.top);else{var a=i[i.length-1];o.showEnd(a.right,a.bottom)}}}),1)};this.$().after(n).on("mouseup",r),"ontouchstart"in window&&document.addEventListener("selectionchange",r,!1)}}))}var U=n(10),q=n.n(U),J=n(20),X=n.n(J),Y=n(21),z=n.n(Y),F=n(22),G=n.n(F),K=n(23),Q=n.n(K),V=n(24),Z=n.n(V);function tt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nt=function(t){function e(){for(var e,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return et(tt(tt(e=t.call.apply(t,[this].concat(o))||this)),"items",[]),et(tt(tt(e)),"active",!1),et(tt(tt(e)),"index",0),et(tt(tt(e)),"keyWasJustPressed",!1),e}I(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Dropdown-menu MentionsDropdown"},this.items.map((function(t){return m("li",null,t)})))},n.show=function(t,e){this.$().show().css({left:t+"px",top:e+"px"}),this.active=!0},n.hide=function(){this.$().hide(),this.active=!1},n.navigate=function(t){var e=this;this.keyWasJustPressed=!0,this.setIndex(this.index+t,!0),clearTimeout(this.keyWasJustPressedTimeout),this.keyWasJustPressedTimeout=setTimeout((function(){return e.keyWasJustPressed=!1}),500)},n.complete=function(){this.$("li").eq(this.index).find("button").click()},n.setIndex=function(t,e){if(!this.keyWasJustPressed||e){var n=this.$(),o=n.find("li"),r=t;r<0?r=o.length-1:r>=o.length&&(r=0),this.index=r;var i=o.removeClass("active").eq(r).addClass("active");if(e){var s,a=n.scrollTop(),u=n.offset().top,c=u+n.outerHeight(),p=i.offset().top,f=p+i.outerHeight();p<u?s=a-u+p-parseInt(n.css("padding-top"),10):f>c&&(s=a-c+f+parseInt(n.css("padding-bottom"),10)),void 0!==s&&n.stop(!0).animate({scrollTop:s},100)}}},e}(D.a);function ot(){var t=$('<div class="ComposerBody-mentionsDropdownContainer"></div>'),e=new nt;Object(o.extend)(q.a.prototype,"oncreate",(function(n){var o=this.$(".TextEditor-editor").wrap('<div class="ComposerBody-mentionsWrapper"></div>');this.navigator=new Z.a,this.navigator.when((function(){return e.active})).onUp((function(){return e.navigate(-1)})).onDown((function(){return e.navigate(1)})).onSelect(e.complete.bind(e)).onCancel(e.hide.bind(e)).bindTo(o),o.after(t)})),Object(o.extend)(q.a.prototype,"buildEditorParams",(function(n){var o,r,i,s,a=[],c=Array.from(app.store.all("users")),p=new Set(c.map((function(t){return t.id()})));n.inputListeners.push((function(n){var f=app.composer.editor.getSelectionRange(),l=f[0];if(!(f[1]-l>0)){var d=app.composer.editor.getLastNChars(30);r=0;for(var h=d.length-1;h>=0;h--){if("@"===d.substr(h,1)&&(0==h||/\s/.test(d.substr(h-1,1)))){o=h+1,r=l-d.length+h+1;break}}if(e.hide(),e.active=!1,r){i=d.substring(o).toLowerCase();var v=function(t,n,o,s){void 0===s&&(s="");var a=_()(t);return i&&(a.children=[Q()(a.text,i)],delete a.text),m("button",{className:"PostPreview "+s,onclick:function(){return function(t){app.composer.editor.replaceBeforeCursor(r-1,t+" "),e.hide()}(n)},onmouseenter:function(){e.setIndex($(this).parent().index())}},m("span",{className:"PostPreview-content"},G()(t),a," "," ",o))},b=function(t){return[t.username(),t.displayName()].some((function(t){return t.toLowerCase().substr(0,i.length)===i}))},y=function(){var n=[];if(i&&c.forEach((function(t){b(t)&&n.push(v(t,"@"+t.username(),"","MentionsDropdown-user"))})),app.composer.bodyMatches(z.a)||app.composer.bodyMatches(H.a)){var o=app.composer.body.attrs,s=o.post,a=s&&s.discussion()||o.discussion;a&&a.posts().filter((function(t){return t&&"comment"===t.contentType()&&(!s||t.number()<s.number())})).sort((function(t,e){return e.createdAt()-t.createdAt()})).filter((function(t){var e=t.user();return e&&b(e)})).splice(0,5).forEach((function(t){var e=t.user();n.push(v(e,"@"+e.username()+"#"+t.id(),[app.translator.trans("flarum-mentions.forum.composer.reply_to_post_text",{number:t.number()})," â ",Object(u.truncate)(t.contentPlain(),200)],"MentionsDropdown-post"))}))}if(n.length){e.items=n,m.render(t[0],e.render()),e.show();var p=app.composer.editor.getCaretCoordinates(r),f=e.$().outerWidth(),l=e.$().outerHeight(),d=e.$().offsetParent(),h=p.left,y=p.top+15;y+l>d.height()&&(y=p.top-l-15),h+f>d.width()&&(h=d.width()-f),y=Math.max(-(d.offset().top-$(document).scrollTop()),y),h=Math.max(-d.offset().left,h),e.show(h,y)}else e.active=!1,e.hide()};e.active=!0,y(),e.setIndex(0),e.$().scrollTop(0),clearTimeout(s),i.length>1&&(s=setTimeout((function(){var t=i.toLowerCase();-1===a.indexOf(t)&&(app.store.find("users",{filter:{q:i},page:{limit:5}}).then((function(t){t.forEach((function(t){p.has(t.id())||(p.add(t.id()),c.push(t))})),e.active&&y()})),a.push(t))}),250))}}}))})),Object(o.extend)(q.a.prototype,"toolbarItems",(function(t){var e=this;t.add("mention",m(X.a,{onclick:function(){return e.attrs.composer.editor.insertAtCursor(" @")},icon:"fas fa-at"},app.translator.trans("flarum-mentions.forum.composer.mention_tooltip")))}))}var rt=n(9),it=n.n(rt),st=function(t){function e(){return t.apply(this,arguments)||this}I(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-reply"},n.href=function(){var t=this.attrs.notification,e=t.subject(),n=t.content();
579return app.route.discussion(e.discussion(),n&&n.replyNumber)},n.content=function(){var t=this.attrs.notification.fromUser();return app.translator.transChoice("flarum-mentions.forum.notifications.post_mentioned_text",1,{user:t})},n.excerpt=function(){return Object(u.truncate)(this.attrs.notification.subject().contentPlain(),200)},e}(it.a),at=function(t){function e(){return t.apply(this,arguments)||this}I(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-at"},n.href=function(){var t=this.attrs.notification.subject();return app.route.discussion(t.discussion(),t.number())},n.content=function(){var t=this.attrs.notification.fromUser();return app.translator.trans("flarum-mentions.forum.notifications.user_mentioned_text",{user:t})},n.excerpt=function(){return Object(u.truncate)(this.attrs.notification.subject().contentPlain(),200)},e}(it.a),ut=n(25),ct=n.n(ut),pt=n(26),ft=n.n(pt),mt=n(27),lt=function(t){function e(){return t.apply(this,arguments)||this}return I(e,t),e.prototype.loadResults=function(t){return app.store.find("posts",{filter:{type:"comment",mentioned:this.user.id()},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},e}(n.n(mt).a),dt=n(11),ht=n.n(dt);function vt(t){var e=app.store.getBy("users","username",t.getAttribute("username"));if(e)return t.setAttribute("id",e.id()),t.setAttribute("displayname",ht()(_()(e))),!0}function bt(t){var e=app.store.getById("posts",t.getAttribute("id"));if(e)return t.setAttribute("discussionid",e.discussion().id()),t.setAttribute("number",e.number()),t.setAttribute("displayname",ht()(_()(e.user()))),!0}i.a.initializers.add("flarum-mentions",(function(){!function(){function t(){var t=this.attrs.post.contentHtml();if(t!==this.oldPostContentHtml&&!this.isEditing()){this.oldPostContentHtml=t;var e=this.attrs.post,n=this.$();this.$().on("click",".UserMention, .PostMention",(function(t){m.route.set(this.getAttribute("href")),t.preventDefault()})),this.$(".PostMention").each((function(){var t,o=$(this),r=o.data("id"),i=$('<ul class="Dropdown-menu PostMention-preview fade"/>');n.append(i);var s=function(){return $('.PostStream-item[data-id="'+r+'"]')},a=function(){var t=s(),a=!1;if(t.length){var u=t.offset().top,c=window.pageYOffset;u>c&&u+t.height()<c+$(window).height()&&(t.addClass("pulsate"),a=!0)}if(!a){var p=function(){var t=i.outerHeight(!0),e=0;o.offset().top-t<$(window).scrollTop()+$("#header").outerHeight()?e+=o.outerHeight(!0):e-=t,i.show().css("top",o.offset().top-n.offset().top+e).css("left",o.offsetParent().offset().left-n.offset().left).css("max-width",o.offsetParent().width())},f=function(t){var n=t.discussion();m.render(i[0],[n!==e.discussion()?m("li",null,m("span",{className:"PostMention-preview-discussion"},n.title())):"",m("li",null,l.a.component({post:t}))]),p()},d=app.store.getById("posts",r);d&&d.discussion()?f(d):(m.render(i[0],h.a.component()),app.store.find("posts",r).then(f),p()),setTimeout((function(){return i.off("transitionend").addClass("in")}))}},u=function(){s().removeClass("pulsate"),i.hasClass("in")&&i.removeClass("in").one("transitionend",(function(){return i.hide()}))};o.on("touchend",(function(t){t.cancelable&&t.preventDefault()})),o.add(i).hover((function(){clearTimeout(t),t=setTimeout(a,250)}),(function(){clearTimeout(t),s().removeClass("pulsate"),t=setTimeout(u,250)})).on("touchend",(function(t){a(),t.stopPropagation()})),$(document).on("touchend",u)}))}}Object(o.extend)(p.a.prototype,"oncreate",t),Object(o.extend)(p.a.prototype,"onupdate",t)}(),g.a.prototype.mentionedBy=b.a.hasMany("mentionedBy"),Object(o.extend)(p.a.prototype,"footerItems",(function(t){var e=this,n=this.attrs.post.mentionedBy();if(n&&n.length){var o=function(){e.$(".Post-mentionedBy-preview").removeClass("in").one("transitionend",(function(){$(this).hide()}))},r=[],i=n.sort((function(t){return t.user()===app.session.user?-1:0})).filter((function(t){var e=t.user();if(-1===r.indexOf(e))return r.push(e),!0})),s=i.length>4,a=i.slice(0,s?3:4).map((function(t){var e=t.user();return m(w.a,{href:app.route.post(t),onclick:o,"data-number":t.number()},app.session.user===e?app.translator.trans("flarum-mentions.forum.post.you_text"):_()(e))}));if(s){var u=i.length-a.length;a.push(app.translator.transChoice("flarum-mentions.forum.post.others_text",u,{count:u}))}t.add("replies",m("div",{className:"Post-mentionedBy",oncreate:function(t){var e,r=$(t.dom),i=$('<ul class="Dropdown-menu Post-mentionedBy-preview fade"/>');r.append(i),r.children().hover((function(){clearTimeout(e),e=setTimeout((function(){!i.hasClass("in")&&i.is(":visible")||(m.render(i[0],n.map((function(t){return m("li",{"data-number":t.number()},l.a.component({post:t,onclick:o}))}))),i.show(),setTimeout((function(){return i.off("transitionend").addClass("in")})))}),500)}),(function(){clearTimeout(e),e=setTimeout(o,250)})),r.find(".Post-mentionedBy-summary a").hover((function(){i.find('[data-number="'+$(this).data("number")+'"]').addClass("active")}),(function(){i.find("[data-number]").removeClass("active")}))}},m("span",{className:"Post-mentionedBy-summary"},M()("fas fa-reply"),app.translator.transChoice("flarum-mentions.forum.post.mentioned_by"+(i[0].user()===app.session.user?"_self":"")+"_text",a.length,{count:a.length,users:C()(a)}))))}})),Object(o.extend)(p.a.prototype,"actionItems",(function(t){var e=this.attrs.post;e.isHidden()||app.session.user&&!e.discussion().canReply()||t.add("reply",m(B.a,{className:"Button Button--link",onclick:function(){return E(e)}},app.translator.trans("flarum-mentions.forum.post.reply_link")))})),R(),ot(),i.a.notificationComponents.postMentioned=st,i.a.notificationComponents.userMentioned=at,Object(o.extend)(a.a.prototype,"notificationTypes",(function(t){t.add("postMentioned",{name:"postMentioned",icon:"fas fa-reply",label:i.a.translator.trans("flarum-mentions.forum.settings.notify_post_mentioned_label")}),t.add("userMentioned",{name:"userMentioned",icon:"fas fa-at",label:i.a.translator.trans("flarum-mentions.forum.settings.notify_user_mentioned_label")})})),i.a.routes["user.mentions"]={path:"/u/:username/mentions",component:lt},Object(o.extend)(ct.a.prototype,"navItems",(function(t){var e=this.user;
579t.add("mentions",ft.a.component({href:i.a.route("user.mentions",{username:e.username()}),name:"mentions",icon:"fas fa-at"},i.a.translator.trans("flarum-mentions.forum.user.mentions_link")),80)})),u.getPlainContent.removeSelectors.push("a.PostMention")}))}]); 580 581 582flarum.extensions['flarum-mentions']=module.exports 583 584var module={} 585 586module.exports=function(o){var t={};function n(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return o[e].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=o,n.c=t,n.d=function(o,t,e){n.o(o,t)||Object.defineProperty(o,t,{enumerable:!0,get:e})},n.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n.t=function(o,t){if(1&t&&(o=n(o)),8&t)return o;if(4&t&&"object"==typeof o&&o&&o.__esModule)return o;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:o}),2&t&&"string"!=typeof o)for(var r in o)n.d(e,r,function(t){return o[t]}.bind(null,r));return e},n.n=function(o){var t=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(t,"a",t),t},n.o=function(o,t){return Object.prototype.hasOwnProperty.call(o,t)},n.p="",n(n.s=11)}([function(o,t){o.exports=flarum.core.compat.app},function(o,t){o.exports=flarum.core.compat.extend},function(o,t){o.exports=flarum.core.compat["models/Discussion"]},function(o,t){o.exports=flarum.core.compat.Model},function(o,t){o.exports=flarum.core.compat["utils/DiscussionControls"]},function(o,t){o.exports=flarum.core.compat["components/NotificationGrid"]},function(o,t){o.exports=flarum.core.compat["components/EventPost"]},function(o,t){o.exports=flarum.core.compat["components/Notification"]},function(o,t){o.exports=flarum.core.compat["components/Badge"]},function(o,t){o.exports=flarum.core.compat["components/DiscussionPage"]},function(o,t){o.exports=flarum.core.compat["components/Button"]},function(o,t,n){"use strict";n.r(t);var e=n(1),r=n(0),c=n.n(r),i=n(3),a=n.n(i),s=n(2),u=n.n(s),f=n(5),p=n.n(f);function l(o,t){o.prototype=Object.create(t.prototype),o.prototype.constructor=o,o.__proto__=t}var d=n(6),k=function(o){function t(){return o.apply(this,arguments)||this}l(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}(n.n(d).a),b=n(7),y=function(o){function t(){return o.apply(this,arguments)||this}l(t,o);var n=t.prototype;return n.icon=function(){return"fas fa-lock"},n.href=function(){var o=this.attrs.notification;return app.route.discussion(o.subject(),o.content().postNumber)},n.content=function(){return app.translator.trans("flarum-lock.forum.notifications.discussion_locked_text",{user:this.attrs.notification.fromUser()})},t}(n.n(b).a),_=n(8),x=n.n(_);var h=n(4),v=n.n(h),L=n(9),g=n.n(L),j=n(10),O=n.n(j);c.a.initializers.add("flarum-lock",(function(){c.a.postComponents.discussionLocked=k,c.a.notificationComponents.discussionLocked=y,u.a.prototype.isLocked=a.a.attribute("isLocked"),u.a.prototype.canLock=a.a.attribute("canLock"),Object(e.extend)(u.a.prototype,"badges",(function(o){this.isLocked()&&o.add("locked",x.a.component({type:"locked",label:app.translator.trans("flarum-lock.forum.badge.locked_tooltip"),icon:"fas fa-lock"}))})),Object(e.extend)(v.a,"moderationControls",(function(o,t){t.canLock()&&o.add("lock",O.a.component({icon:"fas fa-lock",onclick:this.lockAction.bind(t)},app.translator.trans(t.isLocked()?"flarum-lock.forum.discussion_controls.unlock_button":"flarum-lock.forum.discussion_controls.lock_button")))})),v.a.lockAction=function(){this.save({isLocked:!this.isLocked()}).then((function(){app.current.matches(g.a)&&app.current.get("stream").update(),m.redraw()}))},Object(e.extend)(p.a.prototype,"notificationTypes",(function(o){o.add("discussionLocked",{name:"discussionLocked",icon:"fas fa-lock",label:c.a.translator.trans("flarum-lock.forum.settings.notify_discussion_locked_label")})}))}))}]); 587 588 589flarum.extensions['flarum-lock']=module.exports 590 591var module={} 592 593module.exports=function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};
593return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=16)}([function(t,e){t.exports=flarum.core.compat.app},function(t,e){t.exports=flarum.core.compat.extend},function(t,e){t.exports=flarum.core.compat["components/CommentPost"]},function(t,e){t.exports=flarum.core.compat["components/Link"]},function(t,e){t.exports=flarum.core.compat["helpers/username"]},function(t,e){t.exports=flarum.core.compat["models/Post"]},function(t,e){t.exports=flarum.core.compat.Model},function(t,e){t.exports=flarum.core.compat["components/NotificationGrid"]},function(t,e){t.exports=flarum.core.compat["components/Button"]},function(t,e){t.exports=flarum.core.compat["helpers/punctuateSeries"]},function(t,e){t.exports=flarum.core.compat["helpers/icon"]},function(t,e){t.exports=flarum.core.compat["components/Modal"]},function(t,e){t.exports=flarum.core.compat["helpers/avatar"]},function(t,e){t.exports=flarum.core.compat["components/Notification"]},function(t,e){t.exports=flarum.core.compat["utils/string"]},,function(t,e,o){"use strict";o.r(e);var n=o(1),r=o(0),a=o.n(r),s=o(5),i=o.n(s),u=o(6),c=o.n(u),l=o(7),f=o.n(l),p=o(8),d=o.n(p),k=o(2),h=o.n(k),y=o(3),x=o.n(y),b=o(9),v=o.n(b),_=o(4),g=o.n(_),j=o(10),O=o.n(j);function M(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var P=o(11),L=o.n(P),N=o(12),S=o.n(N),C=function(t){function e(){return t.apply(this,arguments)||this}M(e,t);var o=e.prototype;return o.className=function(){return"PostLikesModal Modal--small"},o.title=function(){return app.translator.trans("flarum-likes.forum.post_likes.title")},o.content=function(){return m("div",{className:"Modal-body"},m("ul",{className:"PostLikesModal-list"},this.attrs.post.likes().map((function(t){return m("li",null,m(x.a,{href:app.route.user(t)},S()(t)," "," ",g()(t)))}))))},e}(L.a),B=o(13),T=o.n(B),w=o(14),I=function(t){function e(){return t.apply(this,arguments)||this}M(e,t);var o=e.prototype;return o.icon=function(){return"far fa-thumbs-up"},o.href=function(){return app.route.post(this.attrs.notification.subject())},o.content=function(){var t=this.attrs.notification.fromUser();return app.translator.transChoice("flarum-likes.forum.notifications.post_liked_text",1,{user:t})},o.excerpt=function(){return Object(w.truncate)(this.attrs.notification.subject().contentPlain(),200)},e}(T.a);a.a.initializers.add("flarum-likes",(function(){a.a.notificationComponents.postLiked=I,i.a.prototype.canLike=c.a.attribute("canLike"),i.a.prototype.likes=c.a.hasMany("likes"),Object(n.extend)(h.a.prototype,"actionItems",(function(t){var e=this.attrs.post;if(!e.isHidden()&&e.canLike()){var o=e.likes(),n=a.a.session.user&&o&&o.some((function(t){return t===a.a.session.user}));t.add("like",d.a.component({className:"Button Button--link",onclick:function(){n=!n,e.save({isLiked:n});var t=e.data.relationships.likes.data;t.some((function(e,o){if(e.id===a.a.session.user.id())return t.splice(o,1),!0})),n&&t.unshift({type:"users",id:a.a.session.user.id()})}},a.a.translator.trans(n?"flarum-likes.forum.post.unlike_link":"flarum-likes.forum.post.like_link")))}})),Object(n.extend)(h.a.prototype,"footerItems",(function(t){var e=this.attrs.post,o=e.likes();if(o&&o.length){var n=o.length>4,r=o.sort((function(t){return t===a.a.session.user?-1:1})).slice(0,n?3:4).map((function(t){return m(x.a,{href:a.a.route.user(t)},t===a.a.session.user?a.a.translator.trans("flarum-likes.forum.post.you_text"):g()(t))}));if(n){var s=o.length-r.length;r.push(m("a",{href:"#",onclick:function(t){t.preventDefault(),a.a.modal.show(C,{post:e})}},a.a.translator.transChoice("flarum-likes.forum.post.others_link",s,{count:s})))}t.add("liked",m("div",{className:"Post-likedBy"},O()("far fa-thumbs-up"),a.a.translator.transChoice("flarum-likes.forum.post.liked_by"+(o[0]===a.a.session.user?"_self":"")+"_text",r.length,{count:r.length,users:v()(r)})))}})),Object(n.extend)(f.a.prototype,"notificationTypes",(function(t){t.add("postLiked",{name:"postLiked",icon:"far fa-thumbs-up",label:a.a.translator.trans("flarum-likes.forum.settings.notify_post_liked_label")})}))}))}]); 594 595 596flarum.extensions['flarum-likes']=module.exports 597 598var module={} 599 600module.exports=function(t){var o={};function e(r){if(o[r])return o[r].exports;var n=o[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,e),n.l=!0,n.exports}return e.m=t,e.c=o,e.d=function(t,o,r){e.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
600),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,o){if(1&o&&(t=e(t)),8&o)return t;if(4&o&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&o&&"string"!=typeof t)for(var n in t)e.d(r,n,function(o){return t[o]}.bind(null,n));return r},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},e.p="",e(e.s=10)}([function(t,o){t.exports=flarum.core.compat.app},function(t,o){t.exports=flarum.core.compat.extend},function(t,o){t.exports=flarum.core.compat["models/Post"]},function(t,o){t.exports=flarum.core.compat["models/Discussion"]},function(t,o){t.exports=flarum.core.compat["utils/PostControls"]},function(t,o){t.exports=flarum.core.compat["components/Post"]},function(t,o){t.exports=flarum.core.compat["components/Badge"]},function(t,o){t.exports=flarum.core.compat["components/DiscussionListItem"]},function(t,o){t.exports=flarum.core.compat["components/CommentPost"]},function(t,o){t.exports=flarum.core.compat["components/Button"]},function(t,o,e){"use strict";e.r(o);var r=e(1),n=e(0),a=e.n(n),p=e(3),s=e.n(p),i=e(2),u=e.n(i),c=e(6),l=e.n(c),f=e(7),d=e.n(f),v=e(5),b=e.n(v),x=e(8),y=e.n(x),A=e(9),g=e.n(A),h=e(4),_=e.n(h);a.a.initializers.add("flarum-approval",(function(){s.a.prototype.isApproved=s.a.attribute("isApproved"),Object(r.extend)(s.a.prototype,"badges",(function(t){this.isApproved()||t.has("hidden")||t.add("awaitingApproval",m(l.a,{type:"awaitingApproval",icon:"fas fa-gavel",label:a.a.translator.trans("flarum-approval.forum.badge.awaiting_approval_tooltip")}))})),u.a.prototype.isApproved=u.a.attribute("isApproved"),u.a.prototype.canApprove=u.a.attribute("canApprove"),Object(r.extend)(d.a.prototype,"elementAttrs",(function(t){this.attrs.discussion.isApproved()||(t.className+=" DiscussionListItem--unapproved")})),Object(r.extend)(b.a.prototype,"elementAttrs",(function(t){this.attrs.post.isApproved()||(t.className+=" Post--unapproved")})),Object(r.extend)(y.a.prototype,"headerItems",(function(t){this.attrs.post.isApproved()||this.attrs.post.isHidden()||t.add("unapproved",a.a.translator.trans("flarum-approval.forum.post.awaiting_approval_text"))})),Object(r.override)(b.a.prototype,"flagReason",(function(t,o){return"approval"===o.type()?a.a.translator.trans("flarum-approval.forum.post.awaiting_approval_text"):t(o)})),Object(r.extend)(_.a,"destructiveControls",(function(t,o){!o.isApproved()&&o.canApprove()&&t.add("approve",m(g.a,{icon:"fas fa-check",onclick:_.a.approveAction.bind(o)},a.a.translator.trans("flarum-approval.forum.post_controls.approve_button")),10)})),_.a.approveAction=function(){this.save({isApproved:!0}),1===this.number()&&this.discussion().pushAttributes({isApproved:!0})}}),-10)}]); 601 602 603flarum.extensions['flarum-approval']=module.exports 604 605var module={} 606 607module.exports=function(e){var d={};function a(u){if(d[u])return d[u].exports;var o=d[u]={i:u,l:!1,exports:{}};return e[u].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=e,a.c=d,a.d=function(e,d,u){a.o(e,d)||Object.defineProperty(e,d,{enumerable:!0,get:u})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,d){if(1&d&&(e=a(e)),8&d)return e;if(4&d&&"object"==typeof e&&e&&e.__esModule)return e;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:e}),2&d&&"string"!=typeof e)for(var o in e)a.d(u,o,function(d){return e[d]}.bind(null,o));return u},a.n=function(e){var d=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(d,"a",d),d},a.o=function(e,d){return Object.prototype.hasOwnProperty.call(e,d)},a.p="",a(a.s=9)}([function(e,d){e.exports=flarum.core.compat.extend},function(e,d){e.exports=flarum.core.compat["components/TextEditor"]},function(e){e.exports=JSON.parse('{"ð":["gleeful"],"ð":["glad","smile"],"ð":["happy"],"ð":["blissful","grin"],"ð":["amused","laugh","lol"],"ð ":["embarassed","sweat_smile"],"ð¤£":["entertained","rofl"],"ð":["joyful","haha"],"ð":["pleased","slight_smile"],"ð":["ecstatic","upside_down"],"ð":["coy","wink"],"ð":["blush"],"ð":["innocent","halo"],"ð¥°":["love"],"ð":["lovestruck"],"ð¤©":["starstruck"],"ð":["flirty"],"ð":["kiss"],"âºï¸":["relaxed"],"ð":["loving_kiss"],"ð":["happy_kiss"],"ð¥²":["tear_smile"],"ð":["yum","savour"],"ð":["playful","tongue_out"],"ð":["mischievous"],"ð¤ª":["crazy"],"ð":["facetious","lmao"],"ð¤":["pretentious","money_mouth"],"ð¤":["hugging"],"ð¤":["gasp"],"ð¤«":["shushing"],"ð¤":["curious","thinking"],"ð¤":["silenced","zipper_mouth"],"ð¤¨":["contempt"],"ðï¸":["indifferent","neutral"],"ð":["apathetic","expressionless"],"ð¶":["vacant","no_mouth"],"ð":["cocky","smirk"],"ð":["unamused"],"ð":["disbelief"],"ð¬":["grimaced"],"ð¤¥":["lying"],"ð":["relieved"],"ð":["pensive"],"ðª":["sleepy"],"ð¤¤":["drooling"],"ð´":["exhausted","sleeping"],"ð·":["ill","mask"],"ð¤":["sick"],"ð¤":["injured"],"ð¤¢":["nauseated"],"ð¤®":["vomiting"],"ð¤§":["sneezing"],"ð¥µ":["overheating"],"ð¥¶":["freezing"],"ð¥´":["woozy"],"ðµ":["dizzy"],"ð¤¯":["shocked","exploding_head"],"ð¤ ":["cowboy"],"ð¥³":["partying","celebrating"],"ð¥¸":["disguised_face"],"ð":["confident"],"ð¤":["nerd"],"ð§":["monocle"],"ð":["confused"],"ð":["worried"],"ð":["cheerless","slight_frown"],"â¹ï¸":["sad","frowning"],"ð®":["surprised"],"ð¯":["hushed"],"ð²":["astonished"],"ð³":["flushed"],"ð¥º":["pleading"],"ð¦":["bored"],"ð§":["anguished","wtf"],"ð¨":["fearful"],"ð°":["cold_sweat","anxious","frustrated"],"ð¥":["hopeful"],"ð¢":["upset","cry"],"ð":["distressed","sob"],"ð±":["frightened","scream"],"ð":["confounded"],"ð£":["persevered"],"ð":["disappointed"],"ð":["shamed"],"ð©":["weary"],"ð«":["tired"],"ð¥±":["yawn"],"ð¤":["annoyed","hrmph"],"ð¡":["enraged","pout"],"ð ":["angry"],"ð¤¬":["censored"],"ð":["imp"],"ð¿":["angry_imp"],"ð":["skull"],"â ï¸":["crossbones"],"ð©":["poop"],"ð¤¡":["clown"],"ð¹":["ogre"],"ðº":["goblin"],"ð»":["ghost"],"ð½ï¸":["alien"],"ð¾":["alien_monster","space_invader"],"ð¤":["robot"],"ðº":["smiling_cat"],"ð¸":["grinning_cat"],"ð¹":["joyful_cat"],"ð»":["lovestruck_cat"],"ð¼":["smirking_cat"],"ð½":["kissing_c
607at"],"ð":["weary_cat"],"ð¿":["crying_cat"],"ð¾":["pouting_cat"],"ð":["see_no_evil"],"ð":["hear_no_evil"],"ð":["speak_no_evil"],"ð":["kiss_lips"],"ð":["love_letter"],"ð":["cupid"],"ð":["heart_ribbon"],"ð":["sparkling_heart"],"ð":["heartpulse"],"ð":["heartbeat"],"ð":["revolving_hearts"],"ð":["two_hearts"],"ð":["heart_decoration"],"â£ï¸":["heart_exclamation"],"ð":["broken_heart"],"â¤ï¸":["heart"],"ð§¡":["orange_heart"],"ð":["yellow_heart"],"ð":["green_heart"],"ð":["blue_heart"],"ð":["purple_heart"],"ð¤":["brown_heart"],"ð¤":["black_heart"],"ð¤":["white_heart"],"ð¯":["100"],"ð¢":["anger"],"ð¥":["boom","collision"],"ð«":["dizzy_star"],"ð¦":["sweat_drops"],"ð¨":["dash"],"ð³ï¸":["hole"],"ð£ï¸":["bomb"],"ð¬":["speech"],"ðâð¨":["eye_bubble"],"ð¨ï¸":["left_speech"],"ð¯ï¸":["right_anger_speech"],"ð":["thought"],"ð¤":["zzz"],"ð":["wave"],"ð¤":["raised_backhand"],"ðï¸":["splayed_hand"],"â":["raised_hand"],"ð":["vulcan"],"ð":["ok_hand"],"ð¤":["pinched_fingers"],"ð¤":["pinch"],"âï¸":["victory"],"ð¤":["fingers_crossed"],"ð¤":["love_you_gesture"],"ð¤":["metal"],"ð¤":["call_me"],"ðï¸":["point_left"],"ðï¸":["point_right"],"ðï¸":["backhand_point_up"],"ð":["middle_finger"],"ðï¸":["point_down"],"âï¸":["point_up"],"ðï¸":["thumbsup","+1","yes"],"ðï¸":["thumbsdown","-1","no"],"â":["fist"],"ð":["punch"],"ð¤":["left_facing_fist"],"ð¤":["right_facing_fist"],"ð":["clap"],"ð":["raised_hands"],"ð":["open_hands"],"ð¤²":["palms_up"],"ð¤":["handshake"],"ð":["pray"],"âï¸":["writing_hand"],"ð
":["nail_care"],"ð¤³":["selfie"],"ðª":["muscle","right_bicep"],"ð¦¾":["mech_arm"],"ð¦¿":["mech_leg"],"ð¦µ":["leg"],"ð¦¶":["foot"],"ðï¸":["ear"],"ð¦»":["hearing_aid"],"ð":["nose"],"ð§ ":["brain"],"ð«":["anatomical_heart"],"ð«":["lungs"],"ð¦·":["tooth"],"ð¦´":["bone"],"ð":["eyes"],"ðï¸":["eye"],"ð
":["tongue"],"ð":["lips"],"ð¶":["baby"],"ð§":["child"],"ð¦":["boy"],"ð§":["girl"],"ð§":["adult"],"ð±":["blond_person"],"ð¨":["man"],"ð§":["bearded_person"],"ð¨âð¦°":["red_haired_man"],"ð¨âð¦±":["curly_haired_man"],"ð¨âð¦³":["white_haired_man"],"ð¨âð¦²":["bald_man"],"ð©":["woman"],"ð©âð¦°":["red_haired_woman"],"ð§âð¦°":["red_haired_person"],"ð©âð¦±":["curly_haired_woman"],"ð§âð¦±":["curly_haired_person"],"ð©âð¦³":["white_haired_woman"],"ð§âð¦³":["white_haired_person"],"ð©âð¦²":["bald_woman"],"ð§âð¦²"
607:["bald_person"],"ð±ââï¸":["blond_woman"],"ð±ââï¸":["blond_man"],"ð§":["older_adult"],"ð´":["older_man"],"ðµ":["older_woman"],"ð":["person_frowning"],"ðââï¸":["man_frowning"],"ðââï¸":["woman_frowning"],"ð":["person_pouting"],"ðââï¸":["man_pouting"],"ðââï¸":["woman_pouting"],"ð
":["person_gesturing_no"],"ð
ââï¸":["man_gesturing_no"],"ð
ââï¸":["woman_gesturing_no"],"ð":["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"],"ð§":["person_deaf"],"ð§ââï¸":["man_deaf"],"ð§ââï¸":["woman_deaf"],"ð":["person_bowing"],"ðââï¸":["man_bowing"],"ðââï¸":["woman_bowing"],"ð¤¦":["person_facepalming"],"ð¤¦ââï¸":["man_facepalming"],"ð¤¦ââï¸":["woman_facepalming"],"ð¤·":["person_shrugging"],"ð¤·ââï¸":["man_shrugging"],"ð¤·ââï¸":["woman_shrugging"],"ð§ââï¸":["person_health_worker"],"ð¨ââï¸":["man_health_worker"],"ð©ââï¸":["woman_health_worker"],"ð§âð":["person_student"],"ð¨âð":["man_student"],"ð©âð":["woman_student"],"ð§âð«":["person_teacher"],"ð¨âð«":["man_teacher"],"ð©âð«":["woman_teacher"],"ð§ââï¸":["person_judge"],"ð¨ââï¸":["man_judge"],"ð©ââï¸":["woman_judge"],"ð§âð¾":["person_farmer"],"ð¨âð¾":["man_farmer"],"ð©âð¾":["woman_farmer"],"ð§âð³":["person_cook"],"ð¨âð³":["man_cook"],"ð©âð³":["woman_cook"],"ð§âð§":["person_mechanic"],"ð¨âð§":["man_mechanic"],"ð©âð§":["woman_mechanic"],"ð§âð":["person_factory_worker"],"ð¨âð":["man_factory_worker"],"ð©âð":["woman_factory_worker"],"ð§âð¼":["person_office_worker"],"ð¨âð¼":["man_office_worker"],"ð©âð¼":["woman_office_worker"],"ð§âð¬":["person_scientist"],"ð¨âð¬":["man_scientist"],"ð©âð¬":["woman_scientist"],"ð§âð»":["person_technologist"],"ð¨âð»":["man_technologist"],"ð©âð»":["woman_technologist"],"ð§âð¤":["person_singer"],"ð¨âð¤":["man_singer"],"ð©âð¤":["woman_singer"],"ð§âð¨":["person_artist"],"ð¨âð¨":["man_artist"],"ð©âð¨":["woman_artist"],"ð§ââï¸":["person_pilot"],"ð¨ââï¸":["man_pilot"],"ð©ââï¸":["woman_pilot"],"ð§âð":["person_astronaut"],"ð¨âð":["man_astronaut"],"ð©âð":["woman_astronaut"],"ð§âð":["person_firefighter"],"ð¨âð":["man_firefighter"],"ð©âð":["woman_firefighter"],"ð®":["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"],"ð¤´":["prince"],"ð¸":["princess"],"ð³":["person_turban"],"ð³ââï¸":["man_turban"],"ð³ââï¸":["woman_turban"],"ð²":["man_chinese_cap"],"ð§":["woman_headscarf"],"ð¤µ":["man_tuxedo"],"ð¤µââï¸":["man_in_tuxedo"],"ð¤µââï¸":["woman_in_tuxedo"],"ð°":["person_veiled_bride","bride_veil"],"ð°ââï¸":["man_veiled_bride"],"ð°ââï¸":["woman_veiled_bride"],"ð¤°":["pregnant_woman"],"ð¤±":["breast_feeding"],"ð©âð¼":["woman_feeding_baby"],"ð¨âð¼":["man_feeding_baby"],"ð§âð¼":["person_feeding_baby"],"ð¼":["baby_angel"],"ð
":["santa"],"ð¤¶":["mrs_claus"],"ð§âð":["mx_claus"],"ð¦¸":["hero","superhero"],"ð¦¸ââï¸":["man_hero"],"ð¦¸ââï¸":["woman_hero"],"ð¦¹":["villain","supervillain"],"ð¦¹ââï¸":["man_villain"],"ð¦¹ââï¸":["woman_villain"],"ð§":["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"],"ð":["person_getting_massage"],"ðââï¸":["man_getting_face_massage"],"ðââï¸":["woman_getting_face_massage"],"ð":["person_getting_haircut"],"ðââï¸":["man_getting_haircut"],"ðââï¸":["woman_getting_haircut"],"ð¶":["person_walking"],"ð¶ââï¸":["man_walking"],"ð¶ââï¸":["woman_walking"],"ð§":["person_standing"],"ð§ââï¸":["man_standing"],"ð§ââï¸":["woman_standing"],"ð§":["person_kneeling"],"ð§ââï¸":["man_kneeling"],"ð§ââï¸":["woman_kneeling"],"ð§âð¦¯":["person_probing_cane"],"ð¨âð¦¯":["man_probing_cane"],"ð©âð¦¯":["woman_probing_cane"],"ð§âð¦¼":["person_motor_wheelchair"],"ð¨âð¦¼":["man_motor_wheelchair"],"ð©âð¦¼":["woman_motor_wheelchair"],"ð§âð¦½":["person_wheelchair"],"ð¨âð¦½":["man_wheelchair"],"ð©âð¦½":["woman_wheelchair"],"ð":["person_running"],"ðââï¸":["man_running"],"ðââï¸":["woman_running"],"ð":["dancer","woman_dancing"],"ðº":["man_dancing"],"ð´ï¸":["levitate"],"ð¯":["people_bunny_ears_partying"],"ð¯ââï¸":["men_bunny_ears_partying"],"ð¯ââï¸":["women_bunny_ears_partying"],"ð§":["person_steamy_room"],"ð§ââï¸":["man_steamy_room"],"ð§ââï¸":["woman_steamy_room"],"ð§":["person_climbing"],"ð§ââï¸":["man_climbing"],"ð§ââï¸":["woman_climbing"],"ð¤º":["person_fencing"],"ð":["horse_racing"],"â·ï¸":["skier"],"ðï¸":["snowboarder"],"ðï¸":["person_golfing"],"ðï¸ââï¸":["man_golfing"],"ðï¸ââï¸":["woman_golfing"],"ðï¸":["person_surfing"],"ðââï¸":["man_surfing"],"ðââï¸":["woman_surfing"],"ð£":["person_rowing_boat"],"ð£ââï¸":["man_rowing_boat"],"ð£ââï¸":["woman_rowing_boat"],"ðï¸":["person_swimming"],"ðââï¸":["man_swimming"],"ðââï¸":["woman_swimming"],"â¹ï¸":["person_bouncing_ball"],"â¹ï¸ââï¸":["man_bouncing_ball"],"â¹ï¸ââï¸":["woman_bouncing_ball"],"ðï¸":["person_lifting_weights"],"ðï¸ââï¸":["man_lifting_weights"],"ðï¸ââï¸":["woman_lifting_weights"],"ð´":["person_biking"],"ð´ââï¸":["man_biking"],"ð´ââï¸":["woman_biking"],"ðµ":["person_mountain_biking"],"ðµââï¸":["man_mountain_biking"],"ðµââï¸":["woman_mountain_biking"],"ð¤¸":["person_cartwheel"],"ð¤¸ââï¸":["man_cartwheeling"],"ð¤¸ââï¸":["woman_cartwheeling"],"ð¤¼":["people_wrestling"],"ð¤¼ââï¸":["men_wrestling"],"ð¤¼ââï¸":["women_wrestling"],"ð¤½":["person_water_polo"],"ð¤½ââï¸":["man_water_polo"],"ð¤½ââï¸":["woman_water_polo"],"ð¤¾":["person_handball"],"ð¤¾ââï¸":["man_handball"],"ð¤¾ââï¸":["woman_handball"],"ð¤¹":["person_juggling"],"ð¤¹ââï¸":["man_juggling"],"ð¤¹ââï¸":["woman_
607juggling"],"ð§":["person_lotus_position"],"ð§ââï¸":["man_lotus_position"],"ð§ââï¸":["woman_lotus_position"],"ð":["bath"],"ð":["in_bed"],"ð§âð¤âð§":["holding_hands_people"],"ð":["holding_hands_ww"],"ð«":["holding_hands_mw","holding_hands_wm"],"ð¬":["holding_hands_mm"],"ð":["couple"],"ð©ââ¤ï¸âðâð¨":["kiss_mw","kiss_wm"],"ð¨ââ¤ï¸âðâð¨":["kiss_mm"],"ð©ââ¤ï¸âðâð©":["kiss_ww"],"ð":["couple_heart"],"ð©ââ¤ï¸âð¨":["couple_mw","couple_wm"],"ð¨ââ¤ï¸âð¨":["couple_mm"],"ð©ââ¤ï¸âð©":["couple_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_silhouette"],"ð¥":["busts_silhouette"],"ð«":["people_hugging"],"ð£":["footprints"],"ð»":["tone_light","tone1"],"ð¼":["tone_medium_light","tone2"],"ð½":["tone_medium","tone3"],"ð¾":["tone_medium_dark","tone4"],"ð¿":["tone_dark","tone5"],"ð¦°":["red_hair"],"ð¦±":["curly_hair"],"ð¦³":["white_hair"],"ð¦²":["bald"],"ðµ":["monkey_face"],"ð":["monkey"],"ð¦":["gorilla"],"ð¦§":["orangutan"],"ð¶":["dog_face"],"ðï¸":["dog"],"ð¦®":["guide_dog"],"ðâð¦º":["service_dog"],"ð©":["poodle"],"ðº":["wolf_face"],"ð¦":["fox_face"],"ð¦":["raccoon"],"ð±":["cat_face"],"ðï¸":["cat"],"ðââ¬":["black_cat"],"ð¦":["lion_face"],"ð¯":["tiger_face"],"ð
":["tiger"],"ð":["leopard"],"ð´":["horse_face"],"ð":["horse"],"ð¦":["unicorn_face"],"ð¦":["zebra"],"ð¦":["deer"],"ð¦¬":["bison"],"ð®":["cow_face"],"ð":["ox"],"ð":["water_buffalo"],"ð":["cow"],"ð·":["pig_face"],"ð":["pig"],"ð":["boar"],"ð½":["pig_nose"],"ð":["ram"],"ð":["sheep"],"ð":["goat"],"ðª":["camel"],"ð«":["two_hump_camel"],"ð¦":["llama"],"ð¦":["giraffe"],"ð":["elephant"],"ð¦£":["mammoth"],"ð¦":["rhino"],"ð¦":["hippo"],"ð":["mouse_face"],"ð":["mouse"],"ð":["rat"],"ð¹":["hamster_face"],"ð°":["rabbit_face"],"ð":["rabbit"],"ð¿ï¸":["chipmunk"],"ð¦«":["beaver"],"ð¦":["hedgehog"],"ð¦":["bat"],"ð»":["bear_face"],"ð»ââï¸":["polar_bear_face"],"ð¨":["koala_face"],"ð¼":["panda_face"],"ð¦¥":["sloth"],"ð¦¦":["otter"],"ð¦¨":["skunk"],"ð¦":["kangaroo"],"ð¦¡":["badger"],"ð¾":["feet"],"ð¦":["turkey"],"ð":["chicken"],"ð":["rooster"],"ð£":["hatching_chick"],"ð¤":["baby_chick"],"ð¥":["hatched_chick"],"ð¦ï¸":["bird"],"ð§":["penguin"],"ðï¸":["dove"],"ð¦
":["eagle"],"ð¦":["duck"],"ð¦¢":["swan"],"ð¦":["owl"],"ð¦¤":["dodo"],"ðª¶":["feather"],"ð¦©":["flamingo"],"ð¦":["peacock"],"ð¦":["parrot"],"ð¸":["frog_face"],"ð":["crocodile"],"ð¢":["turtle"],"ð¦":["lizard"],"ð":["snake"],"ð²":["dragon_face"],"ð":["dragon"],"ð¦":["sauropod"],"ð¦":["trex"],"ð³":["spouting_whale"],"ð":["whale"],"ð¬":["dolphin"],"ð¦":["seal"],"ðï¸":["fish"],"ð ":["tropical_fish"],"ð¡":["blowfish"],"ð¦":["shark"],"ð":["octopus"],"ð":["shell"],"ð":["snail"],"ð¦":["butterfly"],"ð":["bug"],"ð":["ant"],"ð":["bee"],"ðª²":["beetle"],"ð":["lady_bug"],"ð¦":["cricket"],"ðª³":["cockroach"],"ð·ï¸":["spider"],"ð¸ï¸":["spider_web"],"ð¦":["scorpion"],"ð¦":["mosquito"],"ðª°":["fly"],"ðª±":["worm"],"ð¦ ":["microbe","germ"],"ð":["bouquet"],"ð¸":["cherry_blossom"],"ð®":["white_flower"],"ðµï¸":["rosette"],"ð¹":["rose"],"ð¥":["wilted_rose"],"ðº":["hibiscus"],"ð»":["sunflower"],"ð¼":["blossom"],"ð·":["tulip"],"ð±":["seedling"],"ðª´":["potted_plant"],"ð²":["evergreen_tree"],"ð³":["deciduous_tree"],"ð´":["palm_tree"],"ðµ":["cactus"],"ð¾":["ear_of_rice"],"ð¿":["herb"],"âï¸":["shamrock"],"ð":["four_leaf_clover"],"ð":["maple_leaf"],"ð":["fallen_leaf"],"ð":["leaves"],"ð":["grapes"],"ð":["melon"],"ð":["watermelon"],"ð":["tangerine"],"ð":["lemon"],"ð":["banana"],"ð":["pineapple"],"ð¥":["mango"],"ð":["apple"],"ð":["green_apple"],"ð":["pear"],"ð":["peach"],"ð":["cherries"],"ð":["strawberry"],"ð«":["blueberry"],"ð¥":["kiwi"],"ð
":["tomato"],"ð«":["olive"],"ð¥¥":["coconut"],"ð¥":["avocado"],"ð":["eggplant"],"ð¥":["potato"],"ð¥":["carrot"],"ð½":["corn"],"ð¶ï¸":["hot_pepper"],"ð«":["bell_pepper"],"ð¥":["cucumber"],"ð¥¬":["leafy_green"],"ð¥¦":["broccoli"],"ð§":["garlic"],"ð§
":["onion"],"ð":["mushroom"],"ð¥":["peanuts"],"ð°":["chestnut"],"ð":["bread"],"ð¥":["croissant"],"ð¥":["french_bread"],"ð«":["flatbread"],"ð¥¨":["pretzel"],"ð¥¯":["bagel"],"ð¥":["pancakes"],"ð§":["waffle"],"ð§":["cheese"],"ð":["meat_on_bone"],"ð":["poultry_leg"],"ð¥©":["cut_of_meat"],"ð¥":["bacon"],"ð":["hamburger"],"ð":["fries"],"ð":["pizza"],"ð":["hotdog"],"ð¥ª":["sandwich"],"ð®":["taco"],"ð¯":["burrito"],"ð«":["tamale"],"ð¥":["stuffed_flatbread"],"ð§":["falafel"],"ð¥":["egg"],"ð³":["cooking"],"ð¥":["shallow_pan_of_food"],"ð²":["stew"],"ð«":["fondue"],"ð¥£":["bowl_spoon"],"ð¥":["salad"],"ð¿":["popcorn"],"ð§":["butter"],"ð§":["salt"],"ð¥«":["canned_food"],"ð±":["bento"],"ð":["rice_cracker"],"ð":["rice_ball"],"ð":["rice"],"ð":["curry"],"ð":["ramen"],"ð":["spaghetti"],"ð ":["sweet_potato"],"ð¢":["oden"],"ð£":["sushi"],"ð¤":["fried_shrimp"],"ð¥":["fish_cake"],"ð¥®":["moon_cake"],"ð¡":["dango"],"ð¥":["dumpling"],"ð¥ ":["fortune_cookie"],"ð¥¡":["takeout_box"],"ð¦":["crab"],"ð¦":["lobster"],"ð¦":["shrimp"],"ð¦":["squid"],"ð¦ª":["oyster"],"ð¦":["icecream"],"ð§":["shaved_ice"],"ð¨":["ice_cream"],"ð©":["doughnut"],"ðª":["cookie"],"ð":["birthday"],"ð°":["cake"],"ð§":["cupcake"],"ð¥§":["pie"],"ð«":["chocolate_bar"],"ð¬":["candy"],"ð":["lollipop"],"ð®":["custard"],"ð¯":["honey_pot"],"ð¼":["baby_bottle"],"ð¥":["milk"],"âï¸":["coffee"],"ð«":["teapot"],"ðµ":["tea"],"ð¶":["sake"],"ð¾":["champagne"],"ð·":["wine_glass"],"ð¸ï¸":["cocktail"],"ð¹":["tropical_drink"],"ðº":["beer"],"ð»":["beer
607s"],"ð¥":["champagne_glass"],"ð¥":["tumbler_glass"],"ð¥¤":["cup_straw"],"ð§":["bubble_tea","boba_drink"],"ð§":["beverage_box","juice_box"],"ð§":["mate","yerba_mate"],"ð§":["ice"],"ð¥¢":["chopsticks"],"ð½ï¸":["fork_knife_plate"],"ð´":["utensils"],"ð¥":["spoon"],"ðª":["knife"],"ðº":["amphora"],"ðï¸":["earth_africa"],"ðï¸":["earth_americas"],"ðï¸":["earth_asia"],"ð":["globe"],"ðºï¸":["map"],"ð¾":["japan"],"ð§":["compass"],"ðï¸":["snowy_mountain"],"â°ï¸":["mountain"],"ð":["volcano"],"ð»":["mount_fuji"],"ðï¸":["camping"],"ðï¸":["beach"],"ðï¸":["desert"],"ðï¸":["island"],"ðï¸":["park"],"ðï¸":["stadium"],"ðï¸":["classical_building"],"ðï¸":["construction_site"],"ð§±":["brick"],"ðª¨":["rock"],"ðªµ":["wood"],"ð":["hut"],"ðï¸":["homes"],"ðï¸":["house_abandoned"],"ð ï¸":["house"],"ð¡":["house_garden"],"ð¢":["office"],"ð£":["ja_post_office"],"ð¤":["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_stars"],"ðï¸":["cityscape"],"ð":["sunrise_over_mountains"],"ð
":["sunrise"],"ð":["dusk"],"ð":["sunset"],"ð":["bridge_at_night"],"â¨ï¸":["hotsprings"],"ð ":["carousel_horse"],"ð¡":["ferris_wheel"],"ð¢":["roller_coaster"],"ð":["barber"],"ðª":["circus_tent"],"ð":["steam_locomotive"],"ð":["railway_car"],"ð":["bullettrain_side"],"ð
":["bullettrain"],"ð":["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"],"ð":["red_car"],"ðï¸":["oncoming_automobile"],"ð":["blue_car"],"ð»":["pickup_truck"],"ð":["truck"],"ð":["lorry"],"ð":["tractor"],"ðï¸":["race_car"],"ðï¸":["motorcycle"],"ðµ":["motor_scooter"],"ð¦½":["wheelchair"],"ð¦¼":["motor_wheelchair"],"ðº":["auto_rickshaw"],"ð²ï¸":["bike"],"ð´":["scooter"],"ð¹":["skateboard"],"ð¼":["roller_skate"],"ð":["bus_stop"],"ð£ï¸":["motorway"],"ð¤ï¸":["railway_track"],"ð¢ï¸":["oil_drum"],"â½ï¸":["fuel_pump"],"ð¨":["rotating_light","police_light"],"ð¥":["traffic_light"],"ð¦":["vertical_traffic_light"],"ð":["stop_sign","octagonal_sign"],"ð§":["construction"],"âï¸":["anchor"],"âµï¸":["sailboat"],"ð¶":["canoe"],"ð¤":["speedboat"],"ð³ï¸":["cruise_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"],"âï¸":["watch"],"â°":["alarm_clock"],"â±ï¸":["stopwatch"],"â²ï¸":["timer"],"ð°ï¸":["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_face"],"ð":["first_quarter_moon_face"],"ðï¸":["last_quarter_moon_face"],"ð¡ï¸":["thermometer"],"âï¸":["sun"],"ð":["full_moon_face"],"ð":["sun_face"],"ðª":["ringed_planet","saturn"],"âï¸":["star"],"ð":["star2","glowing_star"],"ð ":["star3","shooting_star"],"ð":["milky_way"],"âï¸":["cloud"],"â
ï¸":["partly_sunny"],"âï¸":["storm"],"ð¤ï¸":["overcast"],"ð¥ï¸":["cloudy"],"ð¦ï¸":["sunshower"],"ð§ï¸":["rain"],"ð¨ï¸":["snow"],"ð©ï¸":["lightning"],"ðªï¸":["tornado"],"ð«ï¸":["fog"],"ð¬ï¸":["wind_face"],"ð":["cyclone"],"ð":["rainbow"],"ð":["closed_umbrella"],"âï¸":["umbrella"],"âï¸":["umbrella_rain"],"â±ï¸":["beach_umbrella"],"â¡ï¸":["zap","high_voltage"],"âï¸":["snowflake"],"âï¸":["snowy_snowman"],"âï¸":["snowman"],"âï¸":["comet"],"ð¥":["fire"],"ð§":["droplet"],"ð":["ocean"],"ð":["jack_o_lantern"],"ð":["christmas_tree","xmas_tree"],"ð":["fireworks"],"ð":["sparkler"],"ð§¨":["firecracker"],"â¨":["sparkles"],"ð":["balloon"],"ð":["tada","party"],"ð":["confetti_ball"],"ð":["tanabata_tree"],"ð":["bamboo","pine_decor"],"ð":["dolls"],"ð":["carp_streamer"],"ð":["wind_chime"],"ð":["moon_ceremony","rice_scene"],"ð§§":["red_envelope"],"ð":["ribbon"],"ð":["gift"],"ðï¸":["reminder_ribbon"],"ðï¸":["tickets","admission"],"ð«":["ticket"],"ðï¸":["military_medal"],"ðï¸":["trophy"],"ð
":["medal"],"ð¥":["first_place"],"ð¥":["second_place"],"ð¥"
607:["third_place"],"â½ï¸":["soccer"],"â¾ï¸":["baseball"],"ð¥":["softball"],"ð":["basketball"],"ð":["volleyball"],"ð":["football"],"ð":["rugby"],"ð¾":["tennis"],"ð¥":["flying_disc"],"ð³":["bowling"],"ð":["cricket_game"],"ð":["field_hockey"],"ð":["hockey"],"ð¥":["lacrosse"],"ð":["ping_pong"],"ð¸":["badminton"],"ð¥":["boxing_glove"],"ð¥":["gi","martial_arts_uniform"],"ð¥
":["goal"],"â³ï¸":["golf"],"â¸ï¸":["ice_skate"],"ð£":["fishing_pole"],"ð¤¿":["diving_mask","scuba_mask"],"ð½":["running_shirt"],"ð¿":["ski"],"ð·":["sled"],"ð¥":["curling_stone"],"ð¯":["dart"],"ðª":["yoyo"],"ðª":["kite"],"ð±":["8ball"],"ð®":["crystal_ball"],"ðª":["wand"],"ð§¿":["nazar_amulet"],"ð®ï¸":["video_game"],"ð¹ï¸":["joystick"],"ð°":["slot_machine"],"ð²":["game_die"],"ð§©":["jigsaw","puzzle_piece"],"ð§¸":["teddy_bear"],"ðª
":["pinata"],"ðª":["nesting_dolls"],"â ï¸":["spades"],"â¥ï¸":["hearts"],"â¦ï¸":["diamonds"],"â£ï¸":["clubs"],"âï¸":["chess_pawn"],"ð":["black_joker"],"ðï¸":["mahjong"],"ð´":["flower_cards"],"ðï¸":["performing_arts"],"ð¼ï¸":["frame_photo"],"ð¨":["art","palette"],"ð§µ":["spool"],"ðª¡":["sewing_needle"],"ð§¶":["yarn"],"ðª¢":["knot"],"ðï¸":["glasses"],"ð¶ï¸":["sunglasses"],"ð¥½":["goggles"],"ð¥¼":["lab_coat"],"ð¦º":["safety_vest"],"ð":["necktie","tie"],"ð":["shirt"],"ð":["jeans"],"ð§£":["scarf"],"ð§¤":["gloves"],"ð§¥":["coat"],"ð§¦":["socks"],"ð":["dress"],"ð":["kimono"],"ð¥»":["sari"],"ð©±":["one_piece_swimsuit"],"ð©²":["briefs"],"ð©³":["shorts"],"ð":["bikini"],"ð":["blouse","womans_clothes"],"ð":["purse"],"ð":["handbag"],"ð":["pouch","clutch_bag"],"ðï¸":["shopping_bags"],"ð":["backpack"],"ð©´":["sandal"],"ð":["dress_shoe","mans_shoe"],"ð":["sneaker","athletic_shoe"],"ð¥¾":["hiking_boot"],"ð¥¿":["flat_shoe"],"ð ":["high_heel"],"ð¡":["womans_sandal"],"ð©°":["ballet_shoes"],"ð¢":["womans_boot"],"ð":["crown"],"ð":["womans_hat"],"ð©":["top_hat"],"ðï¸":["graduation_cap"],"ð§¢":["billed_cap"],"ðª":["military_helmet"],"âï¸":["helmet_cross"],"ð¿":["prayer_beads"],"ð":["lipstick"],"ð":["ring"],"ð":["gem"],"ð":["mute","no_sound"],"ðï¸":["speaker","low_sound"],"ð":["sound"],"ð":["loud_sound"],"ð¢":["loudspeaker"],"ð£":["megaphone"],"ð¯":["postal_horn"],"ð":["bell"],"ð":["no_bell"],"ð¼":["musical_score"],"ðµ":["musical_note"],"ð¶":["musical_notes"],"ðï¸":["studio_microphone"],"ðï¸":["level_slider"],"ðï¸":["control_knobs"],"ð¤":["microphone"],"ð§ï¸":["headphones"],"ð»ï¸":["radio"],"ð·":["saxophone"],"ðª":["accordion"],"ð¸":["guitar"],"ð¹":["musical_keyboard"],"ðº":["trumpet"],"ð»":["violin"],"ðª":["banjo"],"ð¥":["drum"],"ðª":["long_drum"],"ð±":["mobile","iphone","android"],"ð²":["mobile_calling"],"âï¸":["telephone"],"ð":["telephone_receiver"],"ðï¸":["pager"],"ð ":["fax"],"ð":["battery"],"ð":["electric_plug"],"ð»ï¸":["laptop"],"ð¥ï¸":["desktop","computer"],"ð¨ï¸":["printer"],"â¨ï¸":["keyboard"],"ð±ï¸":["computer_mouse"],"ð²ï¸":["trackball"],"ð½":["minidisc"],"ð¾":["floppy_disk"],"ð¿ï¸":["cd","disk"],"ð":["dvd"],"ð§®":["abacus"],"ð¥":["movie_camera"],"ðï¸":["film_frames"],"ð½ï¸":["projector"],"ð¬ï¸":["clapper"],"ðºï¸":["tv"],"ð·ï¸":["camera"],"ð¸":["camera_flash"],"ð¹ï¸":["video_camera"],"ð¼":["vhs"],"ðï¸":["mag"],"ð":["mag_right"],"ð¯ï¸":["candle"],"ð¡":["bulb","light_bulb"],"ð¦":["flashlight"],"ð®":["red_lantern"],"ðª":["diya_lamp"],"ð":["decorative_notebook"],"ð":["closed_book"],"ð":["book"],"ð":["green_book"],"ð":["blue_book"],"ð":["orange_book"],"ðï¸":["books"],"ð":["notebook"],"ð":["ledger"],"ð":["page_curl"],"ð":["scroll"],"ð":["page_facing_up"],"ð°":["newspaper"],"ðï¸":["rolled_newspaper"],"ð":["bookmark_tabs"],"ð":["bookmark"],"ð·ï¸":["label"],"ð°ï¸":["moneybag"],"ðª":["coin"],"ð´":["yen"],"ðµ":["dollar"],"ð¶":["euro"],"ð·":["pound"],"ð¸":["money_wings"],"ð³ï¸":["credit_card"],"ð§¾":["receipt"],"ð¹":["ja_chart"],"âï¸":["envelope"],"ð§":["email"],"ð¨":["incoming_envelope"],"ð©":["envelope_arrow"],"ð¤ï¸":["outbox_tray"],"ð¥ï¸":["inbox_tray"],"ð¦ï¸":["package"],"ð«ï¸":["mailbox"],"ðªï¸":["mailbox_closed"],"ð¬ï¸":["mailbox_mail"],"ðï¸":["mailbox_no_mail"],"ð®":["postbox"],"ð³ï¸":["ballot_box"],"âï¸":["pencil"],"âï¸":["black_nib"],"ðï¸":["fountain_pen"],"ðï¸":["pen"],"ðï¸":["paintbrush"],"ðï¸":["crayon"],"ð":["memo"],"ð¼":["briefcase"],"ð":["file_folder"],"ð":["open_file_folder"],"ðï¸":["dividers"],"ð
":["date","calendar"],"ð":["torn_calendar"],"ðï¸":["notepad_spiral"],"ðï¸":["calendar_spiral"],"ð":["card_index"],"ð":["chart_up"],"ð":["chart_down"],"ð":["bar_chart"],"ðï¸":["clipboard"],"ð
607":["pushpin"],"ð":["round_pushpin"],"ð":["paperclip"],"ðï¸":["paperclips"],"ð":["straight_ruler"],"ð":["triangular_ruler"],"âï¸":["scissors"],"ðï¸":["card_box"],"ðï¸":["file_cabinet"],"ðï¸":["trashcan","wastebasket"],"ðï¸":["lock"],"ðï¸":["unlock"],"ð":["locked_pen"],"ð":["locked_key"],"ð":["key"],"ðï¸":["old_key"],"ð¨":["hammer"],"ðª":["axe"],"âï¸":["pick"],"âï¸":["hammer_pick"],"ð ï¸":["tools","hammer_wrench"],"ð¡ï¸":["dagger"],"âï¸":["crossed_swords"],"ð«":["gun","pistol"],"ðª":["boomerang"],"ð¹":["bow"],"ð¡ï¸":["shield"],"ðª":["saw"],"ð§":["wrench"],"ðª":["screwdriver"],"ð©":["nut_and_bolt"],"âï¸":["gear"],"ðï¸":["clamp","compression"],"âï¸":["scales"],"ð¦¯":["probing_cane"],"ð":["link"],"âï¸":["chains"],"ðª":["hook"],"ð§°":["toolbox"],"ð§²":["magnet"],"ðª":["ladder"],"âï¸":["alembic"],"ð§ª":["test_tube"],"ð§«":["petri_dish"],"ð§¬":["dna","double_helix"],"ð¬":["microscope"],"ð":["telescope"],"ð¡":["satellite_antenna"],"ð":["syringe"],"ð©¸":["blood_drop"],"ð":["pill"],"ð©¹":["bandaid","adhesive_bandage"],"ð©º":["stethoscope"],"ðª":["door"],"ð":["elevator"],"ðª":["mirror"],"ðª":["window"],"ðï¸":["bed"],"ðï¸":["couch"],"ðª":["chair"],"ð½":["toilet"],"ðª ":["plunger"],"ð¿":["shower"],"ð":["bathtub"],"ðª¤":["mouse_trap"],"ðª":["razor"],"ð§´":["lotion"],"ð§·":["safety_pin"],"ð§¹":["broom"],"ð§º":["basket"],"ð§»":["toilet_paper"],"ðª£":["bucket"],"ð§¼":["soap"],"ðª¥":["toothbrush"],"ð§½":["sponge"],"ð§¯":["fire_extinguisher"],"ð":["shopping_cart"],"ð¬":["cigarette","smoking"],"â°ï¸":["coffin"],"ðª¦":["headstone"],"â±ï¸":["urn"],"ð¿":["moai"],"ðª§":["placard"],"ð§":["atm"],"ð®":["litter_bin"],"ð°":["potable_water"],"â¿ï¸":["handicapped"],"ð¹ï¸":["mens"],"ðºï¸":["womens"],"ð»":["restroom","bathroom"],"ð¼ï¸":["baby_symbol"],"ð¾":["wc"],"ð":["passport_control"],"ð":["customs"],"ð":["baggage_claim"],"ð
":["left_luggage"],"â ï¸":["warning"],"ð¸":["children_crossing"],"âï¸":["no_entry"],"ð«":["no_entry_sign"],"ð³":["no_bicycles"],"ðï¸":["no_smoking"],"ð¯":["do_not_litter"],"ð±":["non_potable_water"],"ð·":["no_pedestrians"],"ðµ":["no_mobile_phones"],"ð":["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"],"âï¸":["arrow_left_right"],"â©ï¸":["arrow_left_hook"],"âªï¸":["arrow_right_hook"],"⤴ï¸":["arrow_heading_up"],"⤵ï¸":["arrow_heading_down"],"ð":["clockwise"],"ð":["counter_clockwise"],"ð":["back"],"ð":["end"],"ð":["on"],"ð":["soon"],"ð":["top"],"ð":["place_of_worship"],"âï¸":["atom"],"ðï¸":["om_symbol"],"â¡ï¸":["star_of_david"],"â¸ï¸":["wheel_of_dharma"],"â¯ï¸":["yin_yang"],"âï¸":["cross"],"â¦ï¸":["orthodox_cross"],"âªï¸":["star_and_crescent"],"â®ï¸":["peace"],"ð":["menorah"],"ð¯":["six_pointed_star"],"âï¸":["aries"],"âï¸":["taurus"],"âï¸":["gemini"],"âï¸":["cancer"],"âï¸":["leo"],"âï¸":["virgo"],"âï¸":["libra"],"âï¸":["scorpius"],"âï¸":["sagittarius"],"âï¸":["capricorn"],"âï¸":["aquarius"],"âï¸":["pisces"],"â":["ophiuchus"],"ð":["shuffle"],"ð":["repeat"],"ð":["repeat_single"],"â¶ï¸":["play"],"â©ï¸":["fast_forward"],"âï¸":["next_track"],"â¯ï¸":["play_pause"],"âï¸":["reverse"],"âªï¸":["rewind"],"â®ï¸":["previous_track"],"ð¼":["up_button"],"â«":["fast_up_button"],"ð½":["down_button"],"â¬":["fast_down_button"],"â¸ï¸":["pause"],"â¹ï¸":["stop"],"âºï¸":["record"],"âï¸":["eject"],"ð¦":["cinema"],"ð
":["dim","low_brightness"],"ð":["bright","high_brightness"],"ð¶":["signal_strength","antenna_bars"],"ð³":["vibration_mode"],"ð´":["mobile_phone_off"],"âï¸":["female","female_sign"],"âï¸":["male","male_sign"],"â§ï¸":["trans"],"âï¸":["multiplication"],"â":["plus"],"â":["minu
607s"],"â":["division"],"â¾ï¸":["infinity"],"â¼ï¸":["bangbang","double_exclamation"],"âï¸":["interrobang","exclamation_question"],"âï¸":["question"],"â":["white_question"],"â":["white_exclamation"],"âï¸":["exclamation"],"ã°ï¸":["wavy_dash"],"ð±":["currency_exchange"],"ð²":["dollar_sign"],"âï¸":["medical"],"â»ï¸":["recycle"],"âï¸":["fleur-de-lis"],"ð±":["trident"],"ð":["name_badge"],"ð°":["ja_beginner"],"âï¸":["o"],"â
":["white_check_mark"],"âï¸":["checked_ballot"],"âï¸":["check_mark"],"â":["x","cross_mark"],"â":["cross_mark_button"],"â°":["curly_loop"],"â¿":["double_curly_loop"],"ã½ï¸":["part_alternation_mark"],"â³ï¸":["eight_spoked_asterisk"],"â´ï¸":["eight_pointed_star"],"âï¸":["sparkle"],"©ï¸":["copyright"],"®ï¸":["registered"],"â¢ï¸":["tm"],"#ï¸â£":["hash"],"*ï¸â£":["asterisk"],"0ï¸â£":["zero"],"1ï¸â£":["one"],"2ï¸â£":["two"],"3ï¸â£":["three"],"4ï¸â£":["four"],"5ï¸â£":["five"],"6ï¸â£":["six"],"7ï¸â£":["seven"],"8ï¸â£":["eight"],"9ï¸â£":["nine"],"ð":["ten"],"ð ":["upper_abcd"],"ð¡":["abcd"],"ð¢":["1234"],"ð£":["symbols"],"ð¤":["abc"],"ð
°ï¸":["a_blood"],"ð":["ab_blood"],"ð
±ï¸":["b_blood"],"ð":["cl"],"ð":["cool"],"ð":["free"],"â¹ï¸":["info"],"ð":["id"],"âï¸":["m"],"ð":["new"],"ð":["ng"],"ð
¾ï¸":["o_blood"],"ð":["ok"],"ð
¿ï¸":["p"],"ð":["sos"],"ð":["up"],"ð":["vs"],"ð":["ja_here","koko"],"ðï¸":["ja_service_charge"],"ð·ï¸":["ja_monthly_amount"],"ð¶":["ja_not_free_of_carge"],"ð¯ï¸":["ja_reserved"],"ð":["ja_bargain"],"ð¹":["ja_discount"],"ðï¸":["ja_free_of_charge"],"ð²":["ja_prohibited"],"ð":["ja_acceptable"],"ð¸":["ja_application"],"ð´":["ja_passing_grade"],"ð³":["ja_vacancy"],"ãï¸":["ja_congratulations"],"ãï¸":["ja_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"],"â¬ï¸":["large_black_square"],"â¬ï¸":["large_white_square"],"â¼ï¸":["medium_black_square"],"â»ï¸":["medium_white_square"],"â¾ï¸":["medium_small_black_square"],"â½ï¸":["medium_small_white_square"],"âªï¸":["small_black_square"],"â«ï¸":["small_white_square"],"ð¶":["large_orange_diamond"],"ð·":["large_blue_diamond"],"ð¸":["small_orange_diamond"],"ð¹":["small_blue_diamond"],"ðº":["up_red_triangle"],"ð»":["down_red_triangle"],"ð ":["diamond_dot"],"ð":["radio_button"],"ð³":["white_square_button"],"ð²":["black_square_button"],"ð":["checkered_flag"],"ð©":["triangle_flag"],"ð":["crossed_flags"],"ð´":["black_flag"],"ð³ï¸":["white_flag"],"ð³ï¸âð":["rainbow_flag"],"ð³ï¸ââ§ï¸":["trans_flag"],"ð´ââ ï¸":["pirate_flag","jolly_roger"],"ð¦ð¨":["flag_ac"],"ð¦ð©":["flag_ad"],"ð¦ðª":["flag_ae"],"ð¦ð«":["flag_af"],"ð¦ð¬":["flag_ag"],"ð¦ð®":["flag_ai"],"ð¦ð±":["flag_al"],"ð¦ð²":["flag_am"],"ð¦ð´":["flag_ao"],"ð¦ð¶":["flag_aq"],"ð¦ð·":["flag_ar"],"ð¦ð¸":["flag_as"],"ð¦ð¹":["flag_at"],"ð¦ðº":["flag_au"],"ð¦ð¼":["flag_aw"],"ð¦ð½":["flag_ax"],"ð¦ð¿":["flag_az"],"ð§ð¦":["flag_ba"],"ð§ð§":["flag_bb"],"ð§ð©":["flag_bd"],"ð§ðª":["flag_be"],"ð§ð«":["flag_bf"],"ð§ð¬":["flag_bg"],"ð§ð":["flag_bh"],"ð§ð®":["flag_bi"],"ð§ð¯":["flag_bj"],"ð§ð±":["flag_bl"],"ð§ð²":["flag_bm"],"ð§ð³":["flag_bn"],"ð§ð´":["flag_bo"],"ð§ð¶":["flag_bq"],"ð§ð·":["flag_br"],"ð§ð¸":["flag_bs"],"ð§ð¹":["flag_bt"],"ð§ð»":["flag_bv"],"ð§ð¼":["flag_bw"],"ð§ð¾":["flag_by"],"ð§ð¿":["flag_bz"],"ð¨ð¦":["flag_ca"],"ð¨ð¨":["flag_cc"],"ð¨ð©":["flag_cd"],"ð¨ð«":["flag_cf"],"ð¨ð¬":["flag_cg"],"ð¨ð":["flag_ch"],"ð¨ð®":["flag_ci"],"ð¨ð°":["flag_ck"],"ð¨ð±":["flag_cl"],"ð¨ð²":["flag_cm"],"ð¨ð³":["flag_cn"],"ð¨ð´":["flag_co"],"ð¨ðµ":["flag_cp"],"ð¨ð·":["flag_cr"],"ð¨ðº":["flag_cu"],"ð¨ð»":["flag_cv"],"ð¨ð¼":["flag_cw"],"ð¨ð½":["flag_cx"],"ð¨ð¾":["flag_cy"],"ð¨ð¿":["flag_cz"],"ð©ðª":["flag_de"],"ð©ð¬":["flag_dg"],"ð©ð¯":["flag_dj"],"ð©ð°":["flag_dk"],"ð©ð²":["flag_dm"],"ð©ð´":["flag_do"],"ð©ð¿":["flag_dz"],"ðªð¦":["flag_ea"],"ðªð¨":["flag_ec"],"ðªðª":["flag_ee"],"ðªð¬":["flag_eg"],"ðªð":["flag_eh"],"ðªð·":["flag_er"],"ðªð¸":["flag_es"],"ðªð¹":["flag_et"],"ðªðº":["flag_eu"],"ð«ð®":["flag_fi"],"ð«ð¯":["flag_fj"],"ð«ð°":["flag_fk"],"ð«ð²":["flag_fm"],"ð«ð´":["flag_fo"],"ð«ð·":["flag_fr"],"ð¬ð¦":["flag_ga"],"ð¬ð§":["flag_gb"],"ð¬ð©":["flag_gd"],"ð¬ðª":["flag_ge"],"ð¬ð«":["flag_gf"],"ð¬ð¬":["flag_gg"],"ð¬ð":["flag_gh"],"ð¬ð®":["flag_gi"],"ð¬ð±":["flag_gl"],"ð¬ð²":["flag_gm"],"ð¬ð³":["flag_gn"],"ð¬ðµ":["flag_gp"],"ð¬ð¶":["flag_gq"],"ð¬ð·":["flag_gr"],"ð¬ð¸":["flag_gs"],"ð¬ð¹":["flag_gt"],"ð¬ðº":["flag_gu"],"ð¬ð¼":["flag_gw"],"ð¬ð¾":["flag_gy"],"ðð°":["flag_hk"],"ðð²":["flag_hm"],"ðð³":["flag_hn"],"ðð·":["flag_hr"],"ðð¹":["flag_ht"],"ððº":["flag_hu"],"ð®ð¨":["flag_ic"],"ð®ð©":["flag_id"],"ð®ðª":["flag_ie"],"ð®ð±":["flag_il"],"ð®ð²":["flag_im"],"ð®ð³":["flag_in"],"ð®ð´":["flag_io"],"ð®ð¶":["flag_iq"],"ð®ð·":["flag_ir"],"ð®ð¸":["flag_is"],"ð®ð¹":["flag_it"],"ð¯ðª":["flag_je"],"ð¯ð²":["flag_jm"],"ð¯ð´":["flag_jo"],"ð¯ðµ":["flag_jp"],"ð°ðª":["flag_ke"],"ð°ð¬":["flag_kg"],"ð°ð":["flag_kh"],"ð°ð®":["flag_ki"],"ð°ð²":["flag_km"],"ð°ð³":["flag_kn"],"ð°ðµ":["flag_kp"],"ð°ð·":["flag_kr"],"ð°ð¼":["flag_kw"],"ð°ð¾":["flag_ky"],"ð°ð¿":["flag_kz"],"ð±ð¦":["flag_la"],"ð±ð§":["flag_lb"],"ð±ð¨":["flag_lc"],"ð±ð®":["flag_li"],"ð±ð°":["flag_lk"],"ð±ð·":["flag_lr"],"ð±ð¸":["flag_ls"],"ð±ð¹":["flag_lt"],"ð±ðº":["flag_lu"],"ð±ð»":["flag_lv"],"ð±ð¾":["flag_ly"],"ð²ð¦":["flag_ma"],"ð²ð¨":["flag_mc"],"ð²ð©":["flag_md"],"ð²ðª":["flag_me"],"ð²ð«":["flag_mf"],"ð²ð¬":["flag_mg"],"ð²ð":["flag_mh"],"ð²ð°":["flag_mk"],"ð²ð±":["flag_ml"],"ð²ð²":["flag_mm"],"ð²ð³":["flag_mn"],"ð²ð´":["flag_mo"],"ð²ðµ":["flag_mp"],"ð²ð¶":["flag_mq"],"ð²ð·":["flag_mr"],"ð²ð¸":["flag_ms"],"ð²ð¹":["flag_mt"],"ð²ðº":["flag_mu"],"ð²ð»":["flag_mv"],"ð²ð¼":["flag_mw"],"ð²ð½":["flag_mx"],"ð²ð¾":["flag_my"],"ð²ð¿":["flag_mz"],"ð³ð¦":["flag_na"],"ð³ð¨":["flag_nc"],"ð³ðª":["flag_ne"],"ð³ð«":["flag_nf"],"ð³ð¬":["flag_ng"],"ð³ð®":["flag_ni"],"ð³ð±":["flag_nl"],"ð³ð´":["flag_no"],"ð³ðµ":["flag_np"],"ð³ð·":["flag_nr"],"ð³ðº":["flag_nu"],"ð³ð¿":["flag_nz"],"ð´ð²":["flag_om"],"ðµð¦":["flag_pa"],"ðµðª":["flag_pe"],"ðµð«":["flag_pf"],"ðµð¬":["flag_pg"],"ðµð":["flag_ph"],"ðµð°":["flag_pk"],"ðµð±":["flag_pl"],"ðµð²":["flag_pm"],"ðµð³":["flag_pn"],"ðµð·":["flag_pr"],"ðµð¸":["flag_ps"],"ðµð¹":["flag_pt"],"ðµð¼":["flag_pw"],"ðµð¾":["flag_py"],"ð¶ð¦":["flag_qa"],"ð·ðª":["flag_re"],"ð·ð´":["flag_ro"],"ð·ð¸":["flag_rs"],"ð·ðº":["flag_ru"],"ð·ð¼":["flag_rw"],"ð¸ð¦":["flag_sa"],"ð¸ð§":["flag_sb"],"ð¸ð¨":["flag_sc"],"ð¸ð©"
607:["flag_sd"],"ð¸ðª":["flag_se"],"ð¸ð¬":["flag_sg"],"ð¸ð":["flag_sh"],"ð¸ð®":["flag_si"],"ð¸ð¯":["flag_sj"],"ð¸ð°":["flag_sk"],"ð¸ð±":["flag_sl"],"ð¸ð²":["flag_sm"],"ð¸ð³":["flag_sn"],"ð¸ð´":["flag_so"],"ð¸ð·":["flag_sr"],"ð¸ð¸":["flag_ss"],"ð¸ð¹":["flag_st"],"ð¸ð»":["flag_sv"],"ð¸ð½":["flag_sx"],"ð¸ð¾":["flag_sy"],"ð¸ð¿":["flag_sz"],"ð¹ð¦":["flag_ta"],"ð¹ð¨":["flag_tc"],"ð¹ð©":["flag_td"],"ð¹ð«":["flag_tf"],"ð¹ð¬":["flag_tg"],"ð¹ð":["flag_th"],"ð¹ð¯":["flag_tj"],"ð¹ð°":["flag_tk"],"ð¹ð±":["flag_tl"],"ð¹ð²":["flag_tm"],"ð¹ð³":["flag_tn"],"ð¹ð´":["flag_to"],"ð¹ð·":["flag_tr"],"ð¹ð¹":["flag_tt"],"ð¹ð»":["flag_tv"],"ð¹ð¼":["flag_tw"],"ð¹ð¿":["flag_tz"],"ðºð¦":["flag_ua"],"ðºð¬":["flag_ug"],"ðºð²":["flag_um"],"ðºð³":["flag_un"],"ðºð¸":["flag_us","usa"],"ðºð¾":["flag_uy"],"ðºð¿":["flag_uz"],"ð»ð¦":["flag_va"],"ð»ð¨":["flag_vc"],"ð»ðª":["flag_ve"],"ð»ð¬":["flag_vg"],"ð»ð®":["flag_vi"],"ð»ð³":["flag_vn"],"ð»ðº":["flag_vu"],"ð¼ð«":["flag_wf"],"ð¼ð¸":["flag_ws"],"ð½ð°":["flag_xk"],"ð¾ðª":["flag_ye"],"ð¾ð¹":["flag_yt"],"ð¿ð¦":["flag_za"],"ð¿ð²":["flag_zm"],"ð¿ð¼":["flag_zw"],"ð´ó §ó ¢ó ¥ó ®ó §ó ¿":["flag_gbeng","england"],"ð´ó §ó ¢ó ³ó £ó ´ó ¿":["flag_gbsct","scotland"],"ð´ó §ó ¢ó ·ó ¬ó ³ó ¿":["flag_gbwls","wales"]}')},function(e){e.exports=JSON.parse("{}")},function(e,d){e.exports=flarum.core.compat.app},function(e,d){e.exports=flarum.core.compat["components/TextEditorButton"]},function(e,d){e.exports=flarum.core.compat["utils/KeyboardNavigatable"]},function(e,d){e.exports=flarum.core.compat.Fragment},function(e,d){e.exports=flarum.core.compat["models/Post"]},function(e,d,a){"use strict";a.r(d);var u=a(4),o=a.n(u),n=a(2),r=(a(3),a(0)),t=a(1),c=a.n(t),f=a(5),i=a.n(f),_=a(6),l=a.n(_);function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,d,a){return d in e?Object.defineProperty(e,d,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[d]=a,e}var p=a(7),b=function(e){var d,a;function u(){for(var d,a=arguments.length,u=new Array(a),o=0;o<a;o++)u[o]=arguments[o];return g(s(s(d=e.call.apply(e,[this].concat(u))||this)),"items",[]),g(s(s(d)),"active",!1),g(s(s(d)),"index",0),g(s(s(d)),"keyWasJustPressed",!1),d}a=e,(d=u).prototype=Object.create(a.prototype),d.prototype.constructor=d,d.__proto__=a;var o=u.prototype;return o.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(e){return m("li",{key:e.attrs.key},e)})))}
607,o.show=function(e,d){this.$().show().css({left:e+"px",top:d+"px"}),this.active=!0},o.hide=function(){this.$().hide(),this.active=!1},o.navigate=function(e){var d=this;this.keyWasJustPressed=!0,this.setIndex(this.index+e,!0),clearTimeout(this.keyWasJustPressedTimeout),this.keyWasJustPressedTimeout=setTimeout((function(){return d.keyWasJustPressed=!1}),500)},o.complete=function(){this.$("li:not(.Dropdown-header)").eq(this.index).find("button").click()},o.setIndex=function(e,d){if(!this.keyWasJustPressed||d){var a=this.$(),u=a.find("li:not(.Dropdown-header)"),o=e;o<0?o=u.length-1:o>=u.length&&(o=0),this.index=o;var n=u.removeClass("active").eq(o).addClass("active");if(d){var r,t=a.scrollTop(),c=a.offset().top,f=c+a.outerHeight(),i=n.offset().top,_=i+n.outerHeight();i<c?r=t-c+i-parseInt(a.css("padding-top"),10):_>f&&(r=t-f+_+parseInt(a.css("padding-bottom"),10)),void 0!==r&&a.stop(!0).animate({scrollTop:r},100)}}},u}(a.n(p).a),h=function(){var e={base:"https://twemoji.maxcdn.com/v/13.0.0/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(e){var d="string"==typeof e?parseInt(e,16):e;if(d<65536)return t(d);return t(55296+((d-=65536)>>10),56320+(1023&d))},toCodePoint:p},onerror:function(){this.parentNode&&this.parentNode.replaceChild(c(this.alt,!1),this)},parse:function(d,a){a&&"function"!=typeof a||(a={callback:a});return("string"==typeof d?l:_)(d,{callback:a.callback||f,attributes:"function"==typeof a.attributes?a.attributes:g,base:"string"==typeof a.base?a.base:e.base,ext:a.ext||e.ext,size:a.folder||(u=a.size||e.size,"number"==typeof u?u+"x"+u:u),className:a.className||e.className,onerror:a.onerror||e.onerror});var u},replace:m,test:function(e){a.lastIndex=0;var d=a.test(e);return a.lastIndex=0,d}},d={"&":"&","<":"<",">":">","'":"'",'"':"""},a=/(?:\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\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\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\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\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\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\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d])|(?:\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\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\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\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\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\u2764\ufe0f\u200d\ud83d\udc68|\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\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\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|\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|\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
6071a\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]|[\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-\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\udeeb\udeec\udef4-\udefc\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78\udd7a-\uddb4\uddb7\uddba\uddbc-\uddcb\uddd0\uddde
607-\uddff\ude70-\ude74\ude78-\ude7a\ude80-\ude86\ude90-\udea8\udeb0-\udeb6\udec0-\udec2\uded0-\uded6]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,u=/\uFE0F/g,o=String.fromCharCode(8205),n=/[&<>'"]/g,r=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,t=String.fromCharCode;return e;function c(e,d){return document.createTextNode(d?e.replace(u,""):e)}function f(e,d){return"".concat(d.base,d.size,"/",e,d.ext)}function i(e){return p(e.indexOf(o)<0?e.replace(u,""):e)}function _(e,d){for(var u,o,n,t,f,_,l,s,g,m,p,b,h,w=function e(d,a){for(var u,o,n=d.childNodes,t=n.length;t--;)3===(o=(u=n[t]).nodeType)?a.push(u):1!==o||"ownerSVGElement"in u||r.test(u.nodeName.toLowerCase())||e(u,a);return a}(e,[]),k=w.length;k--;){for(n=!1,t=document.createDocumentFragment(),_=(f=w[k]).nodeValue,s=0;l=a.exec(_);){if((g=l.index)!==s&&t.appendChild(c(_.slice(s,g),!0)),b=i(p=l[0]),s=g+p.length,h=d.callback(b,d),b&&h){for(o in(m=new Image).onerror=d.onerror,m.setAttribute("draggable","false"),u=d.attributes(p,b))u.hasOwnProperty(o)&&0!==o.indexOf("on")&&!m.hasAttribute(o)&&m.setAttribute(o,u[o]);m.className=d.className,m.alt=p,m.src=h,n=!0,t.appendChild(m)}m||t.appendChild(c(p,!1)),m=null}n&&(s<_.length&&t.appendChild(c(_.slice(s),!0)),f.parentNode.replaceChild(t,f))}return e}function l(e,d){return m(e,(function(e){var a,u,o=e,r=i(e),t=d.callback(r,d);if(r&&t){for(u in o="<img ".concat('class="',d.className,'" ','draggable="false" ','alt="',e,'"',' src="',t,'"'),a=d.attributes(e,r))a.hasOwnProperty(u)&&0!==u.indexOf("on")&&-1===o.indexOf(" "+u+"=")&&(o=o.concat(" ",u,'="',a[u].replace(n,s),'"'));o=o.concat("/>")}return o}))}function s(e){return d[e]}function g(){return null}function m(e,d){return String(e).replace(a,d)}function p(e,d){for(var a=[],u=0,o=0,n=0;n<e.length;)u=e.charCodeAt(n++),o?(a.push((65536+(o-55296<<10)+(u-56320)).toString(16)),o=0):55296<=u&&u<=56319?o=u:a.push(u.toString(16));return a.join(d||"-")}}(),w=String.fromCharCode(8205),k=/\uFE0F/g;function y(e){return h.convert.toCodePoint(e.indexOf(w)<0?e.replace(k,""):e)}var v="https://cdn.jsdelivr.net/gh/twitter/twemoji@"+/([0-9]+).[0-9]+.[0-9]+/g.exec(h.base)[1]+"/assets/";function x(){var e=Object.keys(n),d=$('<div class="ComposerBody-emojiDropdownContainer"></div>'),a=new b;Object(r.extend)(c.a.prototype,"oncreate",(function(){var e=this.$(".TextEditor-editor").wrap('<div class="ComposerBody-emojiWrapper"></div>');this.navigator=new l.a,this.navigator.when((function(){return a.active})).onUp((function(){return a.navigate(-1)})).onDown((function(){return a.navigate(1)})).onSelect(a.complete.bind(a)).onCancel(a.hide.bind(a)).bindTo(e),e.after(d)})),Object(r.extend)(c.a.prototype,"buildEditorParams",(function(u){var o,r,t,c=this;u.inputListeners.push((function(u){var f=app.composer.editor.getSelectionRange(),i=f[0];if(!(f[1]-i>0)){var _=app.composer.editor.getLastNChars(15);r=0;for(var l=_.length-1;l>=0;l--){var s=_.substr(l,1);if(!/[a-z0-9]|\+|\-|_|\:/.test(s))break;if(":"===s&&(0==l||/\s/.test(_.substr(l-1,1)))){o=l+1,r=i-_.length+l+1;break}}if(a.hide(),a.active=!1,r){t=_.substring(o).toLowerCase();var g=function(e){var d=e.emoji,u=e.name,o=e.code;return m("button",{key:d,onclick:function(){return e=d,c.attrs.composer.editor.replaceBeforeCursor(r-1,e+" "),void a.hide();var e},onmouseenter:function(){a.setIndex($(this).parent().index()-1)}},m("img",{alt:d,class:"emoji",draggable:"false",loading:"lazy",src:v+"72x72/"+o+".png"}),u)};!function(){var u,o,c=[],f=(u=t,o=new RegExp("\\((["+"+.*?[]{}()^$|\\".replace(/(.)/g,"\\$1")+"])\\)","g"),new RegExp("(.*)"+u.toLowerCase().replace(/(.)/g,"($1)(.*?)").replace(o,"(\\$1)")+"$","i")),i=7,_=function(d){for(var a=0;a<e.length&&i>0;a++){var u=e[a];if(-1===c.indexOf(u)){var o=n[u],r=Array.isArray(o),t=0;for(o=r?o:o[Symbol.iterator]();;){var f;if(r){if(t>=o.length)break;f=o[t++]}else{if((t=o.next()).done)break;f=t.value}if(d(f)){--i,c.push(u);break}}}}};_((function(e){return 0===e.indexOf(t)})),_((function(e){return f.test(e)}));var l=c.map((function(e){return{emoji:e,name:n[e][0],code:y(e)}})).map(g);if(l.length){a.items=l,m.render(d[0],a.render()),a.show();var s=app.composer.editor.getCaretCoordinates(r),p=a.$().outerWidth(),b=a.$().outerHeight(),h=a.$().offsetParent(),w=s.left,k=s.top+15;k+b>
607h.height()&&(k=s.top-b-15),w+p>h.width()&&(w=h.width()-p),k=Math.max(-(h.offset().top-$(document).scrollTop()),k),w=Math.max(-h.offset().left,w),a.show(w,k)}}(),a.setIndex(0),a.$().scrollTop(0),a.active=!0}}}))})),Object(r.extend)(c.a.prototype,"toolbarItems",(function(e){var d=this;e.add("emoji",m(i.a,{onclick:function(){return d.attrs.composer.editor.insertAtCursor(" :")},icon:"far fa-smile"},app.translator.trans("flarum-emoji.forum.composer.emoji_tooltip")))}))}var j=a(8),z=a.n(j),q={base:v,attributes:function(){return{loading:"lazy"}}};o.a.initializers.add("flarum-emoji",(function(){x(),Object(r.override)(z.a.prototype,"contentHtml",(function(e){var d=e();return this.oldContentHtml!==d&&(this.emojifiedContentHtml=h.parse(d,q),this.oldContentHtml=d),this.emojifiedContentHtml})),Object(r.override)(s9e.TextFormatter,"preview",(function(e,d,a){e(d,a),h.parse(a,q)}))}))}]); 608 609 610flarum.extensions['flarum-emoji']=module.exports 611 612var module={} 613 614module.exports=function(t){var n={};function r(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},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,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)r.d(e,o,function(n){return t[n]}.bind(null,o));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=21)}([function(t,n){t.exports=flarum.core.compat["common/Model"]},function(t,n){t.exports=flarum.core.compat["common/app"]},function(t,n,r){"use strict";function e(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}r.d(n,"a",(function(){return e}))},function(t,n,r){"use strict";function e(t){return t.slice(0).sort((function(t,n){var r=t.position(),e=n.position();return r>e?1:r<e?-1:0}))}r.d(n,"a",(function(){return e}))},function(t,n,r){"use strict";r.d(n,"a",(function(){return u}));var e=r(2),o=r(0),i=r.n(o),a=r(9),u=function(t){function n(){return t.apply(this,arguments)||this}return Object(e.a)(n,t),n}(r.n(a)()(i.a,{title:i.a.attribute("title"),icon:i.a.attribute("icon"),type:i.a.attribute("type"),url:i.a.attribute("url"),position:i.a.attribute("position"),isInternal:i.a.attribute("isInternal"),isNewtab:i.a.attribute("isNewtab"),isChild:i.a.attribute("isChild"),parent:i.a.hasOne("parent"),visibility:i.a.attribute("visibility")}))},function(t,n){t.exports=flarum.core.compat["common/helpers/icon"]},,function(t,n,r){"use strict";r.d(n,"a",(function(){return e}));var e={sortLinks:r(3).a}},function(t,n,r){"use strict";r.d(n,"a",(function(){return e}));var e={Link:r(4).a}},function(t,n){t.exports=flarum.core.compat["common/utils/mixin"]},function(t,n){t.exports=flarum.core.compat["common/utils/ItemList"]},,function(t,n){t.exports=flarum.core.compat["common/extend"]},function(t,n){t.exports=flarum.core.compat["common/components/HeaderPrimary"]},function(t,n){t.exports=flarum.core.compat["common/components/Link"]},function(t,n){t.exports=flarum.core.compat["common/components/LinkButton"]},function(t,n){t.exports=flarum.core.compat["common/components/SplitDropdown"]},,,,,function(t,n,r){"use strict";r.r(n),r.d(n,"components",(function(){return N})),r.d(n,"utils",(function(){return B.a})),r.d(n,"models",(function(){return _.a}));var e=r(12),o=r(13),i=r.n(o),a=r(4),u=r(2),c=r(1),s=r.n(c),l=r(14),p=r.n(l),f=r(15),d=r.n(f),b=r(5),v=r.n(b),y=function(t){function n(){return t.apply(this,arguments)||this}return Object(u.a)(n,t),n.prototype.view=function(){var t=this.attrs.link,n=t.icon(),r="LinksButton "+(this.attrs.className||"Button Button--link"),e=null;if(t.isInternal()){var o=m.route.get()||"/",i=t.url().replace(s.a.forum.attribute("baseUrl"),"");""===i&&(i="/"),0!==o.indexOf(i)||"/"!==o&&"/"===i||(r+=" active")}else e=t.isNewtab()?"noopener noreferrer":null;var a={className:r,rel:e,target:t.isNewtab()?"_blank":"",title:t.title(),external:!t.isInternal(),href:t.url()};return m(p.a,a,n?v()(n,{className:"Button-icon"}):"",t.title())},n}(d.a);
614function h(){return(h=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}).apply(this,arguments)}var k=r(16),x=r.n(k),O=r(10),g=r.n(O),w=r(3),j=function(t){function n(){return t.apply(this,arguments)||this}Object(u.a)(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,h({},n,{children:r}))},r.getButton=function(t){var n=this.getFirstChild(t);return n.attrs.className=(n.attrs.className||"")+" SplitDropdown-button Button "+this.attrs.buttonClassName,[n,m("button",{className:"Dropdown-toggle Button Button--icon "+this.attrs.buttonClassName,"data-toggle":"dropdown"},v()("fas fa-caret-down",{className:"Button-caret"}))]},r.items=function(){var t=new g.a,n=this.attrs.link;return t.add("link"+n.id(),y.component({link:n})),Object(w.a)(app.store.all("links")).filter((function(t){return t.parent()===n})).forEach((function(r){return t.add("link"+n.id()+"-"+r.id(),y.component({link:r,className:" "}))})),t},n}(x.a),N={LinkDropdown:j,LinkItem:y},B=r(7),_=r(8);app.initializers.add("fof-links",(function(){app.store.models.links=a.a,Object(e.extend)(i.a.prototype,"items",(function(t){var n=app.store.all("links").filter((function(t){return!t.isChild()}));Object(w.a)(n).map((function(n){var r=!!app.store.all("links").filter((function(t){return t.parent()==n})).length;t.add("link"+n.id(),r?j.component({link:n}):y.component({link:n}))}))}))}))}]); 615 616 617flarum.extensions['fof-links']=module.exports 618 619var module={} 620 621module.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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=15)}([function(e,t,n){"use strict";var o={AUTO:0,LIGHT:1,DARK:2,DEFAULT:function(){return Number.parseInt(app.data["fof-nightmode.default_theme"])||0}};t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s}));var o=n(4),r=n(0),c="flarum_nightmode",i=function(){var e=o.get(c);return e||"0"===e?Number(e):r.a.DEFAULT()},a=function(e){return o.set(c,e,{sameSite:"lax",secure:"https:"===location.protocol})},s=function(){return o.remove(c)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u}));var o=n(5),r=n(7),c=n.n(r),i=n(0),a=n(6),s=n(3);function u(){var e=app.session.user;e?(e.preferences().fofNightMode_perDevice&&Object(a.a)(),p(Object(s.a)())):p(i.a.DEFAULT())}function f(){return{day:app.data["fof-nightmode.assets.day"],night:app.data["fof-nightmode.assets.night"]}}function p(e){if(e===i.a.DARK)m("night");else if(e===i.a.LIGHT)m("day");else{m(window.matchMedia("(prefers-color-scheme: dark)").matches?"night":"day")}}function m(e){var t=document.querySelector("link.nightmode-light[rel=stylesheet]"),n=document.querySelector("link.nightmode-dark[rel=stylesheet]");if(t&&n){if(Object(s.a)()===i.a.AUTO)return;var o=document.createElement("link");"onload"in o?o.onload=function(){t.remove(),n.remove()}:(t.remove(),n.remove()),o.rel="stylesheet",o.className="nightmode",o.href=f()[e],document.head.append(o)}else{var r=t||n||document.querySelector("link.nightmode[rel=stylesheet]"),c=f()[e];c!==r.href&&(r.href=c,r.className="nightmode")}}t.a=function(){Object(o.extend)(c.a.prototype,"oninit",u)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n(0),r=n(1);function c(){var e,t=app.session.user,n=t&&!!t.preferences().fofNightMode_perDevice,c=t&&t.preferences().fofNightMode;return n?e=Object(r.a)():"number"==typeof c&&-1!==c&&(e=c),"number"==typeof e?e:o.a.DEFAULT()}},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function r(e,t){if(!t)return"";var n="; "+e;return!0===t?n:n+"="+t}
621function c(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return r("Expires",e.expires?e.expires.toUTCString():"")+r("Domain",e.domain)+r("Path",e.path)+r("Secure",e.secure)+r("SameSite",e.sameSite)}(n)}function i(e){for(var t={},n=e?e.split("; "):[],o=/(%[\dA-F]{2})+/gi,r=0;r<n.length;r++){var c=n[r].split("="),i=c.slice(1).join("=");'"'===i.charAt(0)&&(i=i.slice(1,-1));try{t[c[0].replace(o,decodeURIComponent)]=i.replace(o,decodeURIComponent)}catch(e){}}return t}function a(){return i(document.cookie)}function s(e,t,n){document.cookie=c(e,t,o({path:"/"},n))}t.__esModule=!0,t.encode=c,t.parse=i,t.getAll=a,t.get=function(e){return a()[e]},t.set=s,t.remove=function(e,t){s(e,"",o(o({},t),{expires:-1}))}},function(e,t){e.exports=flarum.core.compat["common/extend"]},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n(0),r=n(1);function c(){var e=Array.from(new Set(Object.values(o.a))),t=Object(r.a)();isNaN(t)?i("Theme is not a valid integer! Resetting..."):e.includes(t)||i("Theme is out of bounds! Resetting...")}function i(e){console.warn(e),Object(r.c)(o.a.DEFAULT())}},function(e,t){e.exports=flarum.core.compat["common/components/Page"]},function(e,t){e.exports=flarum.core.compat["common/components/SettingsPage"]},function(e,t){e.exports=flarum.core.compat["common/components/Button"]},function(e,t){e.exports=flarum.core.compat["common/components/SessionDropdown"]},function(e,t){e.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(e,t){e.exports=flarum.core.compat["common/components/Select"]},function(e,t){e.exports=flarum.core.compat["common/components/FieldSet"]},function(e,t){e.exports=flarum.core.compat["common/components/Switch"]},function(e,t,n){"use strict";n.r(t);var o=n(5),r=n(8),c=n.n(r),i=n(9),a=n.n(i),s=n(10),u=n.n(s),f=n(11),p=n.n(f),d=n(12),l=n.n(d),h=n(13),g=n.n(h),v=n(14),b=n.n(v),y=n(2),O=n(6),j=n(1),x=n(3),_=n(0),S=function(e){return app.translator.trans("fof-nightmode.forum.user.settings."+e)};app.initializers.add("fof-nightmode",(function(){Object(o.extend)(c.a.prototype,"settingsItems",(function(e){var t=app.session.user,n=!!t.preferences().fofNightMode_perDevice;n&&Object(O.a)();var o=Object(x.a)();
621e.add("fof-nightmode",g.a.component({label:S("heading"),className:"Settings-theme"},[m("p",{className:"description"},S("description")),m("p",{className:"description"},S("description2")),b.a.component({className:"Settings-theme--per_device_cb",state:n,onchange:function(e){e?j.c(o):j.b(),t.savePreferences({fofNightMode_perDevice:e}).then((function(){Object(y.b)()}))}},S("device_specific_setting_checkbox")),l.a.component({value:o,className:"Settings-theme--input",onchange:function(e){if(n)return j.c(e),void Object(y.b)();t.savePreferences({fofNightMode:Number.parseInt(e)}).then((function(){m.redraw(),Object(y.b)()}))},options:[S("options.auto"),S("options.day"),S("options.night")]}),m("p",{className:"Settings-theme--selection_description"},o===_.a.AUTO?S("option_descriptions.auto"):o===_.a.LIGHT?S("option_descriptions.day"):o===_.a.DARK?S("option_descriptions.night"):p.a.component())]))})),Object(o.extend)(u.a.prototype,"items",(function(e){if(app.session.user){var t=app.session.user,n=Object(x.a)(),o=n===_.a.LIGHT||n===_.a.AUTO&&!window.matchMedia("(prefers-color-scheme: dark)").matches;e.add(o?"nightmode":"daymode",a.a.component({icon:"far fa-"+(o?"moon":"sun"),onclick:function(){var e=o?_.a.DARK:_.a.LIGHT;if(t.preferences().fofNightMode_perDevice)return j.c(e),void Object(y.b)();t.savePreferences({fofNightMode:e}).then((function(){Object(y.b)()}))}},app.translator.trans("fof-nightmode.forum."+(o?"night":"day"))),-1)}})),Object(y.a)()}))}]); 622 623 624flarum.extensions['fof-nightmode']=module.exports 625 626var module={} 627 628module.exports=function(t){var n={};function r(a){if(n[a])return n[a].exports;var e=n[a]={i:a,l:!1,exports:{}};return t[a].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=t,r.c=n,r.d=function(t,n,a){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:a})},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,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var e in t)r.d(a,e,function(n){return t[n]}.bind(null,e));return a},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=31)}([function(t,n){t.exports=flarum.core.compat.app},function(t,n){t.exports=flarum.core.compat.Model},function(t,n){t.exports=flarum.core.compat.Component},function(t,n){t.exports=flarum.core.compat["helpers/username"]},function(t,n){t.exports=flarum.core.compat["components/Button"]},function(t,n){t.exports=flarum.core.compat.extend},function(t,n){t.exports=flarum.core.compat["utils/ItemList"]},function(t,n){t.exports=flarum.core.compat["models/User"]},function(t,n){t.exports=flarum.core.compat["components/UserPage"]},function(t,n){t.exports=flarum.core.compat["components/Link"]},function(t,n){t.exports=flarum.core.compat["utils/Stream"]},function(t,n){t.exports=flarum.core.compat["helpers/humanTime"]},function(t,n){t.exports=flarum.core.compat["components/NotificationGrid"]},function(t,n){t.exports=flarum.core.compat["utils/PostControls"]},function(t,n){t.exports=flarum.core.compat["utils/UserControls"]},function(t,n){t.exports=flarum.core.compat["components/Modal"]},function(t,n){t.exports=flarum.core.compat["components/LinkButton"]},function(t,n){t.exports=flarum.core.compat["components/LoadingIndicator"]},function(t,n){t.exports=flarum.core.compat["components/Dropdown"]},function(t,n){t.exports=flarum.core.compat["helpers/avatar"]},function(t,n){t.exports=flarum.core.compat["utils/classList"]},function(t,n){t.exports=flarum.core.compat["components/PostPreview"]},function(t,n){t.exports=flarum.core.compat["components/Separator"]},function(t,n){t.exports=flarum.core.compat["helpers/listItems"]},function(t,n){t.exports=flarum.core.compat["models/Post"]},function(t,n){t.exports=flarum.core.compat["components/CommentPost"]},function(t,n){t.exports=flarum.core.compat["helpers/icon"]},function(t,n){t.exports=flarum.core.compat["components/Notification"]},function(t,n){t.exports=flarum.core.compat["utils/computed"]},function(t,n){t.exports=flarum.core},function(t,n){t.exports=flarum.core.compat["utils/string"]},function(t,n,r){"use strict";r.r(n);var a=r(0),e=r.n(a),s=r(12),o=r.n(s),i=(r(29),r(5)),c=r(7),u=r.n(c),l=r(1),p=r.n(l),d=r(13),f=r.n(d),h=r(14),g=r.n(h),v=r(4),w=r.n(v);function b(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}var _=r(15),k=r.n(_),y=r(3),x=r.n(y),C=r(10),W=r.n(C),N=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=W()(""),this.privateComment=W()(""),this.strikes=W()(0)},r.className=function(){return"WarningsModal Modal--large"},r.title=function(){return app.translator.trans("askvortsov-moderator-warnings.forum.warning_modal.heading",{username:x()(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:x()(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:x()(this.attrs.user)}),m("textarea",{className:"FormControl",bidi:this.privateComment,rows:"6"})))),m("div",{className:"Form-group"},m(w.a,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("askvortsov-moderator-warnings.forum.warning_modal.submit_button")))))}
628,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}(k.a),P=r(8),A=r.n(P),L=r(16),O=r.n(L);function I(){return(I=Object.assign||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}).apply(this,arguments)}var M=r(2),U=r.n(M),B=r(17),j=r.n(B),D=r(18),S=r.n(D),F=r(9),H=r.n(F),T=r(19),V=r.n(T),R=r(11),E=r.n(R),q=r(20),z=r.n(q),G=r(21),J=r.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.a.component({post:this.attrs.post}))))},r.oncreate=function(n){t.prototype.oncreate.call(this,n),this.$(".PostPreview-preview").show().css("position","relative")},n}(U.a),Q=r(22),X=r.n(Q),Y=r(6),Z=r.n(Y),tt={controls:function(t,n){var r=this,a=new Z.a;return["user","moderation","destructive"].forEach((function(e){var s=r[e+"Controls"](t,n).toArray();s.length&&(s.forEach((function(t){return a.add(t.itemName,t)})),a.add(e+"Separator",X.a.component()))})),a},userControls:function(t,n){return new Z.a},moderationControls:function(t,n){return new Z.a},destructiveControls:function(t,n){var r=new Z.a;return!t.isHidden()&&app.session.user.canManageWarnings()&&r.add("hide",m(w.a,{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(w.a,{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(w.a,{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()}))}},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.a.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.a,{href:n?app.route.user(n):"#",className:"WarningListItem-author",oncreate:function(t){$(t.dom).tooltip({placement:"right"})}},V()(n)," ",x()(n))),m("span",{class:"WarningListItem-strikes"},t.isHidden()?app.translator.transChoice("askvortsov-moderator-warnings.forum.warning_list_item.list_item_heading_hidden",t.strikes(),{time:E()(t.createdAt()),strikes:t.strikes()||"0"}):app.translator.transChoice("askvortsov-moderator-warnings.forum.warning_list_item.list_item_heading",t.strikes(),{time:E()(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||"")+" "+z()({WarningListItem:!0,"WarningListItem--hidden":t.isHidden()}),n},n}(U.a),rt=r(23),at=r.n(rt),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.loading=!0,this.warnings=[],this.user=this.attrs.params.user,this.refresh()},r.view=function(){var t;return this.loading&&(t=j.a.component()),m("div",{className:"WarningList"},m("h1",{className:"WarningList-warnings"},this.strikeCount()?e.a.translator.transChoice("askvortsov-moderator-warnings.forum.warning_list.warnings",this.strikeCount(),{strikes:this.strikeCount()||"0"}):e.a.translator.trans("askvortsov-moderator-warnings.forum.warning_list.warnings_n
628o_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,e.a.translator.trans("askvortsov-moderator-warnings.forum.warning_list.no_warnings"))),m("div",{className:"WarningList-loadMore"},t))},r.actionItems=function(){var t=new Z.a;return e.a.session.user.canManageWarnings()&&t.add("create_warning",m(w.a,{className:"Button Button--primary",onclick:this.handleOnClickCreate.bind(this)},e.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 e.a.store.find("warnings",this.user.id()).catch((function(){})).then((function(n){t.warnings=[],t.parseResults(n)}))},r.handleOnClickCreate=function(t){t.preventDefault(),e.a.modal.show(N,I({callback:this.refresh.bind(this)},this.attrs.params))},n}(U.a),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.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"},et.component({params:{user:this.user,sort:"newest"}}))},n}(A.a),ot=function(){app.routes["user.warnings"]={path:"/u/:username/warnings",component:st},Object(i.extend)(A.a.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",O.a.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)}))},it=r(24),ct=r.n(it),ut=r(25),mt=r.n(ut),lt=r(26),pt=r.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.a,{className:"WarningPreview",href:app.route("user.warnings",{username:this.warning.warnedUser().username()})},m(nt,{warning:this.warning}))},n}(U.a),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.transChoice("askvortsov-moderator-warnings.forum.post.warning",this.warning.strikes(),{strikes:this.warning.strikes()||"0",mod_username:x()(this.warning.addedByUser())}):app.translator.trans("askvortsov-moderator-warnings.forum.post.warning_no_strikes",{mod_username:x()(this.warning.addedByUser())})))},r.oncreate=function(n){var r=this;t.prototype.oncreate.call(this,n);var a,e=this.warning,s=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":e.id()},dt.component({warning:e}))),o.show(),setTimeout((function(){return o.off("transitionend").addClass("in")})))}),200)}),(function(){clearTimeout(a),a=setTimeout(s,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}(U.a),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}(U.a);
628var gt=r(27),vt=r.n(gt),wt=(r(30),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.transChoice("askvortsov-moderator-warnings.forum.notifications.warning_text",t.strikes(),{mod_username:x()(this.attrs.notification.fromUser()),strikes:t.strikes()||"0"}):app.translator.trans("askvortsov-moderator-warnings.forum.notifications.warning_no_strikes_text",{mod_username:x()(this.attrs.notification.fromUser())})},n}(vt.a)),bt=r(28),_t=r.n(bt),kt=function(t){function n(){return t.apply(this,arguments)||this}return b(n,t),n}(p.a);I(kt.prototype,{id:p.a.attribute("id"),public_comment:p.a.attribute("public_comment"),private_comment:p.a.attribute("private_comment"),strikes:p.a.attribute("strikes"),createdAt:p.a.attribute("createdAt",p.a.transformDate),isHidden:_t()("hiddenAt",(function(t){return!!t})),hiddenAt:p.a.attribute("hiddenAt",p.a.transformDate),warnedUser:p.a.hasOne("warnedUser"),hiddenByUser:p.a.hasOne("hiddenByUser"),addedByUser:p.a.hasOne("addedByUser"),post:p.a.hasOne("post")}),e.a.initializers.add("askvortsov/flarum-moderator-warnings",(function(t){t.store.models.warnings=kt,u.a.prototype.canViewWarnings=p.a.attribute("canViewWarnings"),u.a.prototype.canManageWarnings=p.a.attribute("canManageWarnings"),u.a.prototype.canDeleteWarnings=p.a.attribute("canDeleteWarnings"),u.a.prototype.visibleWarningCount=p.a.attribute("visibleWarningCount"),Object(i.extend)(f.a,"moderationControls",(function(t,n){e.a.session.user&&e.a.session.user.canManageWarnings()&&t.add("warning",m(w.a,{icon:"fas fa-exclamation-circle",onclick:function(){return e.a.modal.show(N,{callback:function(){location.reload()},user:n.user(),post:n})}},e.a.translator.trans("askvortsov-moderator-warnings.forum.post_controls.warning_button")))})),Object(i.extend)(g.a,"moderationControls",(function(t,n){e.a.session.user&&e.a.session.user.canManageWarnings()&&t.add("warning",m(w.a,{icon:"fas fa-exclamation-circle",onclick:function(){return e.a.modal.show(N,{callback:function(){location.reload()},user:n})}},e.a.translator.trans("askvortsov-moderator-warnings.forum.post_controls.warning_button")))})),ot(),ct.a.prototype.warnings=p.a.hasMany("warnings"),Object(i.extend)(mt.a.prototype,"footerItems",(function(t){var n=this.attrs.post;n.warnings()&&t.add("warnings",ht.component({post:n}))})),t.notificationComponents.warning=wt,Object(i.extend)(o.a.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")})}))}))}]); 629 630 631flarum.extensions['askvortsov-moderator-warnings']=module.exports 632 633var module={} 634 635module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},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 n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},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=3)}([function(t,e){t.exports=flarum.core.compat.app},function(t,e){t.exports=flarum.core.compat.extend},function(t,e){t.exports=flarum.core.compat["components/PostUser"]},function(t,e,r){"use strict";r.r(e);var n=r(1),o=r(0),i=r.n(o),u=r(2),a=r.n(u);
635i.a.initializers.add("dem13n-topic-starter-label",(function(){Object(n.extend)(a.a.prototype,"view",(function(t){var e=i.a.current.get("routeName");if("discussion"===e||"discussion.near"===e||"blogArticle"===e){var r="blogArticle"===e?i.a.translator.trans("dem13n.forum.blog_article_author"):i.a.translator.trans("dem13n.forum.topic_starter"),n=this.attrs.post,o=n.user().id(),u=n.discussion().user().id();if(!u&&!o)return;o===u&&function(t){var e=t.discussion().firstPost();return!e||e.id()!==t.id()}(n)&&t.children.push(m("span",{className:"topicStarter"},r))}}))}))}]); 636 637 638flarum.extensions['dem13n-topic-starter-label']=module.exports 639 640var module={} 641 642module.exports=function(t){var o={};function e(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}return e.m=t,e.c=o,e.d=function(t,o,n){e.o(t,o)||Object.defineProperty(t,o,{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,o){if(1&o&&(t=e(t)),8&o)return t;if(4&o&&"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&o&&"string"!=typeof t)for(var r in t)e.d(n,r,function(o){return t[o]}.bind(null,r));return n},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},e.p="",e(e.s=11)}([function(t,o){t.exports=flarum.core.compat["common/app"]},function(t,o){t.exports=flarum.core.compat["common/models/User"]},function(t,o){t.exports=flarum.core.compat["common/extend"]},function(t,o){t.exports=flarum.core.compat["common/utils/computed"]},function(t,o){t.exports=flarum.core.compat["common/components/UserCard"]},function(t,o){t.exports=flarum.core.compat["common/Model"]},function(t,o){t.exports=flarum.core.compat["common/Component"]},function(t,o){t.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(t,o){t.exports=flarum.core.compat["common/utils/classList"]},function(t,o){t.exports=flarum.core.compat["common/utils/extractText"]},function(t,o){(function(){var t=[].slice;String.prototype.autoLink=function(){var o,e,n,r,i,a;return i=/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,0<(r=1<=arguments.length?t.call(arguments,0):[]).length?(n=r[0],e=function(){var t;for(o in t=[],n)a=n[o],"callback"!==o&&t.push(" "+o+"='"+a+"'");return t}().join(""),this.replace(i,(function(t,o,r){return""+o+(("function"==typeof n.callback?n.callback(r):void 0)||"<a href='"+r+"'"+e+">"+r+"</a>")}))):this.replace(i,"$1<a href='$2'>$2</a>")}}).call(this)},function(t,o,e){"use strict";e.r(o);var n=e(2),r=(e(10),e(3)),i=e.n(r),a=e(4),c=e.n(a),u=e(1),s=e.n(u),l=e(5),f=e.n(l);var p=e(0),d=e.n(p),h=e(6),b=e.n(h),v=e(7),g=e.n(v),x=e(8),y=e.n(x),_=e(9),j=e.n(_),w=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,o.__proto__=e;var r=n.prototype;return r.oninit=function(o){t.prototype.oninit.call(this,o),this.editing=!1,this.loading=!1,this.bioMaxLength=d.a.forum.attribute("fof-user-bio.maxLength")},r.view=function(){var t,o=this.attrs.user,e=this.attrs.user.attribute("canEditBio");if(this.editing)t=m("textarea",{className:"FormControl",placeholder:j()(d.a.translator.trans("fof-user-bio.forum.userbioPlaceholder")),rows:"3",maxlength:this.bioMaxLength,value:o.bio()});else{var n;if(this.loading)n=m("p",{className:"UserBio-placeholder"},g.a.component({size:"tiny"}));else{var r=o.bioHtml();r?n=m.trust(r):e&&(n=m("p",{className:"UserBio-placeholder"},d.a.translator.trans("fof-user-bio.forum.userbioPlaceholder")))}t=m("div",{className:"UserBio-content",onclick:e?this.edit.bind(this):function(){}},n)}return m("div",{className:"UserBio "+y()({editable:e,editing:this.editing})},t)},r.edit=function(){this.editing=!0,m.redraw.sync();var t=this,o=function(o){o.shiftKey||(o.preventDefault(),t.save($(this).val()))};this.$("textarea").focus().bind("blur",o).bind("keydown","return",o),m.redraw()},r.save=function(t){var o=this,e=this.attrs.user;e.bio()!==t&&(this.loading=!0,e.save({bio:t}).catch((function(){})).then((function(){o.loading=!1,m.redraw()}))),this.editing=!1,m.redraw()},n}(b.a);
642app.initializers.add("fof-user-bio",(function(){s.a.prototype.bio=f.a.attribute("bio"),s.a.prototype.bioHtml=i()("bio",(function(t){return t?"<p>"+$("<div/>").text(t).html().replace(/\n/g,"<br>").autoLink({rel:"nofollow ugc"})+"</p>":""})),Object(n.extend)(c.a.prototype,"infoItems",(function(t){var o=this.attrs.user;o.attribute("canViewBio")&&t.add("bio",w.component({user:o}))}))}))}]); 643 644 645flarum.extensions['fof-user-bio']=module.exports 646 647var module={} 648 649module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},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 n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},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=87)}([function(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,u=r(15);var p=/[&<>"]/,h=/[&<>"]/g,f={"&":"&","<":"<",">":">",'"':"""};function d(t){return f[t]}var m=/[.?*+^$[\]\\(){}|-]/g;var v=r(11);e.lib={},e.lib.mdurl=r(16),e.lib.ucmicro=r(36),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(u,e)?u[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 p.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 v.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()}},function(t,e){t.exports=flarum.core.compat["common/utils/extractText"]},function(t,e){t.exports=flarum.core.compat["common/utils/ItemList"]},function(t,e){t.exports=flarum.core.compat["common/extend"]},function(t,e){t.exports=flarum.core.compat["common/utils/Stream"]},function(t,e){t.exports=flarum.core.compat["common/components/Button"]},function(t,e){t.exports=flarum.core.compat["common/helpers/icon"]},function(t,e){t.exports=flarum.core.compat["common/components/Dropdown"]},function(t,e){t.exports=flarum.core.compat["common/components/TextEditor"]},function(t,e,r){"use strict";
vendor: 4,823 bytes, line 649
649t.exports=r(30)},function(t,e){t.exports=flarum.core.compat["common/Component"]},function(t,e){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]/},function(t,e,r){"use strict";function n(){this.__rules__=[],this.__cache__=null}n.prototype.__find__=function(t){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1},n.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))}))}))},n.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},n.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},n.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},n.prototype.push=function(t,e,r){var n=r||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:n.alt||[]}),this.__cache__=null},n.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},n.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach((function(t){t.enabled=!1})),this.enable(t,e)},n.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},n.prototype.getRules=function(t){return null===this.__cache__&&this.__compile__(),this.__cache__[t]||[]},t.exports=n},function(t,e,r){"use strict";function n(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}n.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},n.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},n.prototype.attrSet=function(t,e){var r=this.attrIndex(t),n=[t,e];r<0?this.attrPush(n):this.attrs[r]=n},n.prototype.attrGet=function(t){var e=this.attrIndex(t),r=null;return e>=0&&(r=this.attrs[e][1]),r},n.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}
649,t.exports=n},function(t,e){t.exports=flarum.core.compat["forum/components/SettingsPage"]},function(t,e,r){"use strict";t.exports=r(31)},function(t,e,r){"use strict";t.exports.encode=r(32),t.exports.decode=r(33),t.exports.format=r(34),t.exports.parse=r(35)},function(t,e){t.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(t,e){t.exports=/[\0-\x1F\x7F-\x9F]/},function(t,e){t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(t,e,r){"use strict";var n="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",o="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",i=new RegExp("^(?:"+n+"|"+o+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),s=new RegExp("^(?:"+n+"|"+o+")");t.exports.HTML_TAG_RE=i,t.exports.HTML_OPEN_CLOSE_TAG_RE=s},function(t,e,r){"use strict";function n(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.tokenize=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.postProcess=function(t){var e,r=t.tokens_meta,o=t.tokens_meta.length;for(n(t,t.delimiters),e=0;e<o;e++)r[e]&&r[e].delimiters&&n(t,r[e].delimiters)}},function(t,e,r){"use strict";function n(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.tokenize=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.postProcess=function(t){var e,r=t.tokens_meta,o=t.tokens_meta.length;for(n(t,t.delimiters),e=0;e<o;e++)r[e]&&r[e].delimiters&&n(t,r[e].delimiters)}},,function(t,e){t.exports=flarum.core.compat["common/components/FieldSet"]},function(t,e){t.exports=flarum.core.compat["common/components/Switch"]},function(t,e){t.exports=flarum.core.compat["forum/components/ComposerBody"]},function(t,e,r){"use strict";var n=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function o(t,e){var r,o,i=t.posMax,s=t.pos;if(126!==t.src.charCodeAt(s))return!1;if(e)return!1;if(s+2>=i)return!1;for(t.pos=s+1;t.pos<i;){if(126===t.src.charCodeAt(t.pos)){r=!0;break}t.md.inline.skipToken(t)}return r&&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(n,"$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",o)}},function(t,e,r){"use strict";var n=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function o(t,e){var r,o,i=t.posMax,s=t.pos;
649if(94!==t.src.charCodeAt(s))return!1;if(e)return!1;if(s+2>=i)return!1;for(t.pos=s+1;t.pos<i;){if(94===t.src.charCodeAt(t.pos)){r=!0;break}t.md.inline.skipToken(t)}return r&&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(n,"$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",o)}},function(t,e,r){"use strict";function n(t,e){let 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 o(t,e){let r,o,i,s,a;if("$"!==t.src[t.pos])return!1;if(s=n(t,t.pos),!s.can_open)return e||(t.pending+="$"),t.pos+=1,!0;for(r=t.pos+1,o=r;-1!==(o=t.src.indexOf("$",o));){for(a=o-1;"\\"===t.src[a];)a-=1;if((o-a)%2==1)break;o+=1}return-1===o?(e||(t.pending+="$"),t.pos=r,!0):o-r==0?(e||(t.pending+="$$"),t.pos=r+1,!0):(s=n(t,o),s.can_close?(e||(i=t.push("math_inline","math",0),i.markup="$",i.content=t.src.slice(r,o)),t.pos=o+1,!0):(e||(t.pending+="$"),t.pos=r,!0))}function i(t,e,r,n){let o,i,s,a,c,l=!1,u=t.bMarks[e]+t.tShift[e],p=t.eMarks[e];if(u+2>p)return!1;if("$$"!==t.src.slice(u,u+2))return!1;if(u+=2,o=t.src.slice(u,p),n)return!0;for("$$"===o.trim().slice(-2)&&(o=o.trim().slice(0,-2),l=!0),s=e;!l&&(s++,!(s>=r))&&(u=t.bMarks[s]+t.tShift[s],p=t.eMarks[s],!(u<p&&t.tShift[s]<t.blkIndent));)"$$"===t.src.slice(u,p).trim().slice(-2)&&(a=t.src.slice(0,p).lastIndexOf("$$"),i=t.src.slice(u,a),l=!0);return t.line=s+1,c=t.push("math_block","math",0),c.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=(t,e)=>{(e=e||{}).server=e.server||"https://math.now.sh",e.style=e.style||"";const r=t=>encodeURIComponent(t).replace("(","%28").replace(")","%29");t.inline.ruler.after("escape","math_inline",o),t.block.ruler.after("blockquote","math_block",i,{alt:["paragraph","reference","blockquote","list"]}),t.renderer.rules.math_inline=(t,n)=>(t=>{try{return`<img src="${e.server}?inline=${r(t)}" style="${e.style}display:inline-block;margin: 0;"/>`}catch(e){return console.error(e),t}})(t[n].content),t.renderer.rules.math_block=(t,n)=>(t=>{try{return`<p style="${e.style}"><img src="${e.server}?from=${r(t)}" /></p>`}catch(e){return console.error(e),t}})(t[n].content)}},function(t,e,r){"use strict";var n=r(0),o=r(38),i=r(42),s=r(43),a=r(51),c=r(65),l=r(78),u=r(16),p=r(80),h={default:r(83),zero:r(84),commonmark:r(85)},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 v=["http:","https:","mailto:"];function g(t){var e=u.parse(t,!0);if(e.hostname&&(!e.protocol||v.indexOf(e.protocol)>=0))try{e.hostname=p.toASCII(e.hostname)}catch(t){}return u.encode(u.format(e))}function y(t){var e=u.parse(t,!0);if(e.hostname&&(!e.protocol||v.indexOf(e.protocol)>=0))try{e.hostname=p.toUnicode(e.hostname)}catch(t){}return u.decode(u.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=g,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.enableO
vendor: 1,424 bytes, line 649
649nly(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},function(t){t.exports=
vendor: 32,997 bytes, line 649
649JSON.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":"ï¬","fflig":"ï¬","ffllig":"ï¬","Ffr":"ð","ffr":"ð£","filig":"ï¬","FilledSmallSquare":"â¼","FilledVerySmallSquare":"âª","fjlig":"fj","flat":"â","fllig":"ï¬","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":"Å","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":"â"}')
vendor: 52,489 bytes, line 649
649},function(t,e,r){"use strict";var n={};function o(t,e,r){var i,s,a,c,l,u="";for("string"!=typeof e&&(r=e,e=o.defaultChars),void 0===r&&(r=!0),l=function(t){var e,r,o=n[t];if(o)return o;for(o=n[t]=[],e=0;e<128;e++)r=String.fromCharCode(e),/^[0-9a-z]$/i.test(r)?o.push(r):o.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e<t.length;e++)o[t.charCodeAt(e)]=t[e];return o}(e),i=0,s=t.length;i<s;i++)if(a=t.charCodeAt(i),r&&37===a&&i+2<s&&/^[0-9a-f]{2}$/i.test(t.slice(i+1,i+3)))u+=t.slice(i,i+3),i+=2;else if(a<128)u+=l[a];else if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1<s&&(c=t.charCodeAt(i+1))>=56320&&c<=57343){u+=encodeURIComponent(t[i]+t[i+1]),i++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(t[i]);return u}o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()",t.exports=o},function(t,e,r){"use strict";var n={};function o(t,e){var r;return"string"!=typeof e&&(e=o.defaultChars),r=function(t){var e,r,o=n[t];if(o)return o;for(o=n[t]=[],e=0;e<128;e++)r=String.fromCharCode(e),o.push(r);for(e=0;e<t.length;e++)o[r=t.charCodeAt(e)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return o}(e),t.replace(/(%[a-f0-9]{2})+/gi,(function(t){var e,n,o,i,s,a,c,l="";for(e=0,n=t.length;e<n;e+=3)(o=parseInt(t.slice(e+1,e+3),16))<128?l+=r[o]:192==(224&o)&&e+3<n&&128==(192&(i=parseInt(t.slice(e+4,e+6),16)))?(l+=(c=o<<6&1984|63&i)<128?"��":String.fromCharCode(c),e+=3):224==(240&o)&&e+6<n&&(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=o<<12&61440|i<<6&4032|63&s)<2048||c>=55296&&c<=57343?"���":String.fromCharCode(c),e+=6):240==(248&o)&&e+9<n&&(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=o<<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}))}o.defaultChars=";/?:@&=+$,#",o.componentChars="",t.exports=o},function(t,e,r){"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||"",e+=t.hash||""}},function(t,e,r){"use strict";function n(){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 o=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(a),l=["%","/","?",";","#"].concat(c),u=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};n.prototype.parse=function(t,e){var r,n,i,a,c,m=t;if(m=m.trim(),!e&&1===t.split("#").length){var v=s.exec(m);if(v)return this.pathname=v[1],v[2]&&(this.search=v[2]),this}var g=o.exec(m);if(g&&(i=(g=g[0]).toLowerCase(),this.protocol=g,m=m.substr(g.length)),(e||g||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(c="//"===m.substr(0,2))||g&&f[g]||(m=m.substr(2),this.slashes=!0)),!f[g]&&(c||g&&!d[g])){var y,k,b=-1;for(r=0;r<u.length;r++)-1!==(a=m.indexOf(u[r]))&&(-1===b||a<b)&&(b=a);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,r=0;r<l.length;r++)-1!==(a=m.indexOf(l[r]))&&(-1===b||a<b)&&(b=a);-1===b&&(b=m.length),":"===m[b-1]&&b--;var w=m.slice(0,b);m=m.slice(b),this.parseHost(w),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x){var _=this.hostname.split(/\./);for(r=0,n=_.length;r<n;r++){var C=_[r];if(C&&!C.match(p)){for(var S="",A=0,M=C.length;A<M;A++)C.charCodeAt(A)>127?S+="x":S+=C[A];if(!S.match(p)){var D=_.slice(0,r),O=_.slice(r+1),E=C.match(h);E&&(D.push(E[1]),O.unshift(E[2])),O.length&&(m=O.join(".")+m),this.hostname=D.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var T=m.indexOf("#");-1!==T&&(this.hash=m.substr(T),m=m.slice(0,T));var N=m.indexOf("?");return-1!==N&&(this.search=m.substr(N),m=m.slice(0,N)),m&&(this.pathname=m),d[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},n.prototype.parseHost=function(t){var e=i.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,e){if(t&&t instanceof n)return t;var r=new n;return r.parse(t,e),r}},function(t,e,r){"use strict";e.Any=r(17),e.Cc=r(18),e.Cf=r(37),e.P=r(11),e.Z=r(19)},function(t,e){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]/},function(t,e,r){"use strict";e.parseLinkLabel=r(39),e.parseLinkDestination=r(40),e.parseLinkTitle=r(41)},function(t,e,r){"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}},function(t,e,r){"use strict";var n=r(0).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}},function(t,e,r){"use strict";var n=r(0).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}},function(t,e,r){"use strict";var n=r(0).assign,o=r(0).unescapeAll,i=r(0).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,u,p=t[e],h=p.info?o(p.info).trim():"",f="";return h&&(f=h.split(/\s+/g)[0]),0===(a=r.highlight&&r.highlight(p.content,f)||i(p.content)).indexOf("<pre")?a+"\n":h?(c=p.attrIndex("class"),l=p.attrs?p.attrs.slice():[],c<0?l.push(["class",r.langPrefix+f]):l[c][1]+=" "+r.langPrefix+f,u={attrs:l},"<pre><code"+s.renderAttrs(u)+">"+a+"</code></pre>\n"):"<pre><code"+s.renderAttrs(p)+">"+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},function(t,e,r){"use strict";var n=r(12),o=[["normalize",r(44)],["block",r(45)],["inline",r(46)],["linkify",r(47)],["replacements",r(48)],["smartquotes",r(49)]];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(50),t.exports=i},function(t,e,r){"use strict";var n=/\r\n?|\n/g,o=/\0/g;t.exports=function(t){var e;e=(e=t.src.replace(n,"\n")).replace(o,"�"),t.src=e}},function(t,e,r){"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)}},function(t,e,r){"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)}},function(t,e,r){"use strict";var n=r(0).arrayReplaceAt;function o(t){return/^<\/a\s*>/i.test(t)}t.exports=function(t){var e,r,i,s,a,c,l,u,p,h,f,d,m,v,g,y,k,b,w=t.tokens;if(t.md.options.linkify)for(r=0,i=w.length;r<i;r++)if("inline"===w[r].type&&t.md.linkify.pretest(w[r].content))for(m=0,e=(s=w[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(p=c.content,k=t.md.linkify.match(p),l=[],d=c.level,f=0,u=0;u<k.length;u++)v=k[u].url,g=t.md.normalizeLink(v),t.md.validateLink(g)&&(y=k[u].text,y=k[u].schema?"mailto:"!==k[u].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[u].index)>f&&((a=new t.Token("text","",0)).content=p.slice(f,h),a.level=d,l.push(a)),(a=new t.Token("link_open","a",1)).attrs=[["href",g]],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[u].lastIndex);f<p.length&&((a=new t.Token("text","",0)).content=p.slice(f),a.level=d,l.push(a)),w[r].children=s=n(s,e,l)}}else for(e--;s[e].level!==c.level&&"link_open"!==s[e].type;)e--}},function(t,e,r){"use strict";var n=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,o=/\((c|tm|r|p)\)/i,i=/\((c|tm|r|p)\)/gi,s={c:"©",r:"®",p:"§",tm:"â¢"};function a(t,e){return s[e.toLowerCase()]}function c(t){var e,r,n=0;for(e=t.length-1;e>=0;e--)"text"!==(r=t[e]).type||n||(r.content=r.content.replace(i,a)),"link_open"===r.type&&"auto"===r.info&&n--,"link_close"===r.type&&"auto"===r.info&&n++}function l(t){var e,r,o=0;for(e=t.length-1;e>=0;e--)"text"!==(r=t[e]).type||o||n.test(r.content)&&(r.content=r.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"===r.type&&"auto"===r.info&&o--,"link_close"===r.type&&"auto"===r.info&&o++}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&&(o.test(t.tokens[e].content)&&c(t.tokens[e].children),n.test(t.tokens[e].content)&&l(t.tokens[e].children))}},function(t,e,r){"use strict";var n=r(0).isWhiteSpace,o=r(0).isPunctChar,i=r(0).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,u,p,h,f,d,m,v,g,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,_=S.length-1;_>=0&&!(S[_].level<=f);_--);if(S.length=_+1,"text"===s.type){p=0,h=(l=s.content).length;t:for(;p<h&&(a.lastIndex=p,u=a.exec(l));){if(w=x=!0,p=u.index+1,C="'"===u[0],m=32,u.index-1>=0)m=l.charCodeAt(u.index-1);else for(_=r-1;_>=0&&("softbreak"!==t[_].type&&"hardbreak"!==t[_].type);_--)if("text"===t[_].type){m=t[_].content.charCodeAt(t[_].content.length-1);break}if(v=32,p<h)v=l.charCodeAt(p);else for(_=r+1;_<t.length&&("softbreak"!==t[_].type&&"hardbreak"!==t[_].type);_++)if("text"===t[_].type){v=t[_].content.charCodeAt(0);break}if(g=i(m)||o(String.fromCharCode(m)),y=i(v)||o(String.fromCharCode(v)),k=n(m),(b=n(v))?w=!1:y&&(k||g||(w=!1)),k?x=!1:g&&(b||y||(x=!1)),34===v&&'"'===u[0]&&m>=48&&m<=57&&(x=w=!1),w&&x&&(w=!1,x=y),w||x){if(x)for(_=S.length-1;_>=0&&(d=S[_],!(S[_].level<f));_--)if(d.single===C&&S[_].level===f){d=S[_],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,u.index,M),t[d.token].content=c(t[d.token].content,d.pos,A),p+=M.length-1,d.token===r&&(p+=A.length-1),h=(l=s.content).length,S.length=_;continue t}w?S.push({token:r,pos:u.index,single:C,level:f}):x&&C&&(s.content=c(s.content,u.index,"â"))}else C&&(s.content=c(s.content,u.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)}},function(t,e,r){"use strict";var n=r(13);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},function(t,e,r){"use strict";var n=r(12),o=[["table",r(52),["paragraph","reference"]],["code",r(53)],["fence",r(54),["paragraph","reference","blockquote","list"]],["blockquote",r(55),["paragraph","reference","blockquote","list"]],["hr",r(56),["paragraph","reference","blockquote","list"]],["list",r(57),["paragraph","reference","blockquote"]],["reference",r(58)],["heading",r(59),["paragraph","reference","blockquote"]],["lheading",r(60)],["html_block",r(61),["paragraph","reference","blockquote"]],["paragraph",r(63)]];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(64),t.exports=i},function(t,e,r){"use strict";var n=r(0).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,u,p,h,f,d,m,v,g,y;if(e+2>r)return!1;if(p=e+1,t.sCount[p]<t.blkIndent)return!1;if(t.sCount[p]-t.blkIndent>=4)return!1;if((l=t.bMarks[p]+t.tShift[p])>=t.eMarks[p])return!1;if(124!==(a=t.src.charCodeAt(l++))&&45!==a&&58!==a)return!1;for(;l<t.eMarks[p];){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=[],u=0;u<h.length;u++){if(!(v=h[u].trim())){if(0===u||u===h.length-1)continue;return!1}if(!/^:?-+:?$/.test(v))return!1;58===v.charCodeAt(v.length-1)?m.push(58===v.charCodeAt(0)?"center":"right"):58===v.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=g=[e,0],(d=t.push("thead_open","thead",1)).map=[e,e+1],(d=t.push("tr_open","tr",1)).map=[e,e+1],u=0;u<h.length;u++)(d=t.push("th_open","th",1)).map=[e,e+1],m[u]&&(d.attrs=[["style","text-align:"+m[u]]]),(d=t.push("inline","",0)).content=h[u].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],p=e+2;p<r&&!(t.sCount[p]<t.blkIndent)&&-1!==(c=o(t,p).trim()).indexOf("|")&&!(t.sCount[p]-t.blkIndent>=4);p++){for(h=i(c.replace(/^\||\|$/g,"")),d=t.push("tr_open","tr",1),u=0;u<f;u++)d=t.push("td_open","td",1),m[u]&&(d.attrs=[["style","text-align:"+m[u]]]),(d=t.push("inline","",0)).content=h[u]?h[u].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),g[1]=y[1]=p,t.line=p,!0}},function(t,e,r){"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}},function(t,e,r){"use strict";t.exports=function(t,e,r,n){var o,i,s,a,c,l,u,p=!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(u=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)){p=!0;break}return i=t.sCount[e],t.line=a+(p?1:0),(l=t.push("fence","code",0)).info=s,l.content=t.getLines(e+1,a,i,!0),l.markup=u,l.map=[e,t.line],!0}},function(t,e,r){"use strict";var n=r(0).isSpace;t.exports=function(t,e,r,o){var i,s,a,c,l,u,p,h,f,d,m,v,g,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),u=A>=M,y=[t.sCount[e]],t.sCount[e]=f-c,k=[t.tShift[e]],t.tShift[e]=A-t.bMarks[e],x=t.md.block.ruler.getRules("blockquote"),g=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(u)break;for(w=!1,a=0,l=x.length;a<l;a++)if(x[a](t,h,r,!0)){w=!0;break}if(w){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++;u=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(v=t.blkIndent,t.blkIndent=0,(_=t.push("blockquote_open","blockquote",1)).markup=">",_.map=p=[e,0],t.md.block.tokenize(t,e,h),(_=t.push("blockquote_close","blockquote",-1)).markup=">",t.lineMax=S,t.parentType=g,p[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=v,!0}},function(t,e,r){"use strict";var n=r(0).isSpace;t.exports=function(t,e,r,o){var i,s,a,c,l=t.bMarks[e]+t.tShift[e],u=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<u;){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)}},function(t,e,r){"use strict";var n=r(0).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,u,p,h,f,d,m,v,g,y,k,b,w,x,_,C,S,A,M,D,O,E,T,N,I,z=!1,R=!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,E=t.bMarks[e]+t.tShift[e],y=Number(t.src.substr(E,D-E-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(g=t.src.charCodeAt(D-1),n)return!0;for(v=t.tokens.length,h?(I=t.push("ordered_list_open","ol",1),1!==y&&(I.attrs=[["start",y]])):I=t.push("bullet_list_open","ul",1),I.map=m=[e,0],I.markup=String.fromCharCode(g),b=e,O=!1,N=t.md.block.ruler.getRules("list"),_=t.parentType,t.parentType="list";b<r;){for(M=D,k=t.eMarks[b],p=w=t.sCount[b]+D-(t.bMarks[e]+t.tShift[e]);M<k;){if(9===(s=t.src.charCodeAt(M)))w+=4-(w+t.bsCount[b])%4;else{if(32!==s)break;w++}M++}if((u=(a=M)>=k?1:w-p)>4&&(u=1),l=p+u,(I=t.push("list_item_open","li",1)).markup=String.fromCharCode(g),I.map=f=[e,0],A=t.tight,S=t.tShift[e],C=t.sCount[e],x=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=l,t.tight=!0,t.tShift[e]=a-t.bMarks[e],t.sCount[e]=w,a>=k&&t.isEmpty(e+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,e,r,!0),t.tight&&!O||(R=!1),O=t.line-e>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=x,t.tShift[e]=S,t.sCount[e]=C,t.tight=A,(I=t.push("list_item_close","li",-1)).markup=String.fromCharCode(g),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(T=!1,c=0,d=N.length;c<d;c++)if(N[c](t,b,r,!0)){T=!0;break}if(T)break;if(h){if((D=i(t,b))<0)break}else if((D=o(t,b))<0)break;if(g!==t.src.charCodeAt(D-1))break}return(I=h?t.push("ordered_list_close","ol",-1):t.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(g),m[1]=b,t.line=b,t.parentType=_,R&&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,v),!0}},function(t,e,r){"use strict";var n=r(0).normalizeReference,o=r(0).isSpace;t.exports=function(t,e,r,i){var s,a,c,l,u,p,h,f,d,m,v,g,y,k,b,w,x=0,_=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(_))return!1;for(;++_<C;)if(93===t.src.charCodeAt(_)&&92!==t.src.charCodeAt(_-1)){if(_+1===C)return!1;if(58!==t.src.charCodeAt(_+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,p=0,h=b.length;p<h;p++)if(b[p](t,S,l,!0)){k=!0;break}if(k)break}for(C=(y=t.getLines(e,S,t.blkIndent,!1).trim()).length,_=1;_<C;_++){if(91===(s=y.charCodeAt(_)))return!1;if(93===s){d=_;break}(10===s||92===s&&++_<C&&10===y.charCodeAt(_))&&x++}if(d<0||58!==y.charCodeAt(d+1))return!1;for(_=d+2;_<C;_++)if(10===(s=y.charCodeAt(_)))x++;else if(!o(s))break;if(!(v=t.md.helpers.parseLinkDestination(y,_,C)).ok)return!1;if(u=t.md.normalizeLink(v.str),!t.md.validateLink(u))return!1;for(a=_=v.pos,c=x+=v.lines,g=_;_<C;_++)if(10===(s=y.charCodeAt(_)))x++;else if(!o(s))break;for(v=t.md.helpers.parseLinkTitle(y,_,C),_<C&&g!==_&&v.ok?(w=v.str,_=v.pos,x+=v.lines):(w="",_=a,x=c);_<C&&(s=y.charCodeAt(_),o(s));)_++;if(_<C&&10!==y.charCodeAt(_)&&w)for(w="",_=a,x=c;_<C&&(s=y.charCodeAt(_),o(s));)_++;return!(_<C&&10!==y.charCodeAt(_))&&(!!(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:w,href:u}),t.parentType=m,t.line=e+x+1),!0))}},function(t,e,r){"use strict";var n=r(0).isSpace;t.exports=function(t,e,r,o){var i,s,a,c,l=t.bMarks[e]+t.tShift[e],u=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(35!==(i=t.src.charCodeAt(l))||l>=u)return!1;for(s=1,i=t.src.charCodeAt(++l);35===i&&l<u&&s<=6;)s++,i=t.src.charCodeAt(++l);return!(s>6||l<u&&!n(i))&&(o||(u=t.skipSpacesBack(u,l),(a=t.skipCharsBack(u,35,l))>l&&n(t.src.charCodeAt(a-1))&&(u=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,u).trim(),c.map=[e,t.line],c.children=[],(c=t.push("heading_close","h"+String(s),-1)).markup="########".slice(0,s)),!0)}},function(t,e,r){"use strict";t.exports=function(t,e,r){var n,o,i,s,a,c,l,u,p,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===(p=t.src.charCodeAt(c))||61===p)&&(c=t.skipChars(c,p),(c=t.skipSpaces(c))>=l)){u=61===p?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!!u&&(n=t.getLines(e,f,t.blkIndent,!1).trim(),t.line=f+1,(a=t.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),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(u),-1)).markup=String.fromCharCode(p),t.parentType=h,!0)}},function(t,e,r){"use strict";var n=r(62),o=r(20).HTML_OPEN_CLOSE_TAG_RE,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],u=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,u),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],u=t.eMarks[s],c=t.src.slice(l,u),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}},function(t,e,r){"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"]},function(t,e,r){"use strict";t.exports=function(t,e){var r,n,o,i,s,a,c=e+1,l=t.md.block.ruler.getRules("paragraph"),u=t.lineMax;for(a=t.parentType,t.parentType="paragraph";c<u&&!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,u,!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}},function(t,e,r){"use strict";var n=r(13),o=r(0).isSpace;function i(t,e,r,n){var i,s,a,c,l,u,p,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=u=p=0,l=(s=this.src).length;c<l;c++){if(i=s.charCodeAt(c),!h){if(o(i)){u++,9===i?p+=4-p%4:p++;continue}h=!0}10!==i&&c!==l-1||(10!==i&&c++,this.bMarks.push(a),this.eMarks.push(c),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),h=!1,u=0,p=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,u,p,h=t;if(t>=e)return"";for(u=new Array(e-t),i=0;h<e;h++,i++){for(s=0,p=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-p<this.tShift[h]))break;s++}c++}u[i]=s>r?new Array(s-r+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return u.join("")},i.prototype.Token=n,t.exports=i},function(t,e,r){"use strict";var n=r(12),o=[["text",r(66)],["newline",r(67)],["escape",r(68)],["backticks",r(69)],["strikethrough",r(21).tokenize],["emphasis",r(22).tokenize],["link",r(70)],["image",r(71)],["autolink",r(72)],["html_inline",r(73)],["entity",r(74)]],i=[["balance_pairs",r(75)],["strikethrough",r(21).postProcess],["emphasis",r(22).postProcess],["text_collapse",r(76)]];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(77),t.exports=s},function(t,e,r){"use strict";function n(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,e){for(var r=t.pos;r<t.posMax&&!n(t.src.charCodeAt(r));)r++;return r!==t.pos&&(e||(t.pending+=t.src.slice(t.pos,r)),t.pos=r,!0)}},function(t,e,r){"use strict";var n=r(0).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}},function(t,e,r){"use strict";for(var n=r(0).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}},function(t,e,r){"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}},function(t,e,r){"use strict";var n=r(0).normalizeReference,o=r(0).isSpace;t.exports=function(t,e){var r,i,s,a,c,l,u,p,h,f="",d=t.pos,m=t.posMax,v=t.pos,g=!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(g=!1,l++;l<m&&(i=t.src.charCodeAt(l),o(i)||10===i);l++);if(l>=m)return!1;for(v=l,(u=t.md.helpers.parseLinkDestination(t.src,l,t.posMax)).ok&&(f=t.md.normalizeLink(u.str),t.md.validateLink(f)?l=u.pos:f=""),v=l;l<m&&(i=t.src.charCodeAt(l),o(i)||10===i);l++);if(u=t.md.helpers.parseLinkTitle(t.src,l,t.posMax),l<m&&v!==l&&u.ok)for(h=u.str,l=u.pos;l<m&&(i=t.src.charCodeAt(l),o(i)||10===i);l++);else h="";(l>=m||41!==t.src.charCodeAt(l))&&(g=!0),l++}if(g){if(void 0===t.env.references)return!1;if(l<m&&91===t.src.charCodeAt(l)?(v=l+1,(l=t.md.helpers.parseLinkLabel(t,l))>=0?s=t.src.slice(v,l++):l=a+1):l=a+1,s||(s=t.src.slice(c,a)),!(p=t.env.references[n(s)]))return t.pos=d,!1;f=p.href,h=p.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}},function(t,e,r){"use strict";var n=r(0).normalizeReference,o=r(0).isSpace;t.exports=function(t,e){var r,i,s,a,c,l,u,p,h,f,d,m,v,g="",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((u=c+1)<k&&40===t.src.charCodeAt(u)){for(u++;u<k&&(i=t.src.charCodeAt(u),o(i)||10===i);u++);if(u>=k)return!1;for(v=u,(h=t.md.helpers.parseLinkDestination(t.src,u,t.posMax)).ok&&(g=t.md.normalizeLink(h.str),t.md.validateLink(g)?u=h.pos:g=""),v=u;u<k&&(i=t.src.charCodeAt(u),o(i)||10===i);u++);if(h=t.md.helpers.parseLinkTitle(t.src,u,t.posMax),u<k&&v!==u&&h.ok)for(f=h.str,u=h.pos;u<k&&(i=t.src.charCodeAt(u),o(i)||10===i);u++);else f="";if(u>=k||41!==t.src.charCodeAt(u))return t.pos=y,!1;u++}else{if(void 0===t.env.references)return!1;if(u<k&&91===t.src.charCodeAt(u)?(v=u+1,(u=t.md.helpers.parseLinkLabel(t,u))>=0?a=t.src.slice(v,u++):u=c+1):u=c+1,a||(a=t.src.slice(l,c)),!(p=t.env.references[n(a)]))return t.pos=y,!1;g=p.href,f=p.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",g],["alt",""]],d.children=m,d.content=s,f&&r.push(["title",f])),t.pos=u,t.posMax=k,!0}},function(t,e,r){"use strict";var n=/^<([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])?)*)>/,o=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;t.exports=function(t,e){var r,i,s,a,c,l,u=t.pos;return 60===t.src.charCodeAt(u)&&(!((r=t.src.slice(u)).indexOf(">")<0)&&(o.test(r)?(a=(i=r.match(o))[0].slice(1,-1),c=t.md.normalizeLink(a),!!t.md.validateLink(c)&&(e||((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)):!!n.test(r)&&(a=(s=r.match(n))[0].slice(1,-1),c=t.md.normalizeLink("mailto:"+a),!!t.md.validateLink(c)&&(e||((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))))}},function(t,e,r){"use strict";var n=r(20).HTML_TAG_RE;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))))}},function(t,e,r){"use strict";var n=r(15),o=r(0).has,i=r(0).isValidEntityCode,s=r(0).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,u=t.pos,p=t.posMax;if(38!==t.src.charCodeAt(u))return!1;if(u+1<p)if(35===t.src.charCodeAt(u+1)){if(l=t.src.slice(u).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(u).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}},function(t,e,r){"use strict";function n(t,e){var r,n,o,i,s,a,c,l,u={},p=e.length;for(r=0;r<p;r++)if((o=e[r]).length=o.length||0,o.close){for(u.hasOwnProperty(o.marker)||(u[o.marker]=[-1,-1,-1]),s=u[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&&(u[o.marker][(o.length||0)%3]=a)}}t.exports=function(t){var e,r=t.tokens_meta,o=t.tokens_meta.length;for(n(0,t.delimiters),e=0;e<o;e++)r[e]&&r[e].delimiters&&n(0,r[e].delimiters)}},function(t,e,r){"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)}},function(t,e,r){"use strict";var n=r(13),o=r(0).isWhiteSpace,i=r(0).isPunctChar,s=r(0).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,u,p,h,f,d=t,m=!0,v=!0,g=this.posMax,y=this.src.charCodeAt(t);for(r=t>0?this.src.charCodeAt(t-1):32;d<g&&this.src.charCodeAt(d)===y;)d++;return a=d-t,n=d<g?this.src.charCodeAt(d):32,p=s(r)||i(String.fromCharCode(r)),f=s(n)||i(String.fromCharCode(n)),u=o(r),(h=o(n))?m=!1:f&&(u||p||(m=!1)),u?v=!1:p&&(h||f||(v=!1)),e?(c=m,l=v):(c=m&&(!v||p),l=v&&(!m||f)),{can_open:c,can_close:l,length:a}},a.prototype.Token=n,t.exports=a},function(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};var 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 u(t){var e=t.re=r(79)(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!function(t){return"[object RegExp]"===o(t)}(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 u=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+"))("+u+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><ï½]|"+e.src_ZPCc+"))("+u+")","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 p(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 p(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={},u(this)}f.prototype.add=function(t,e){return this.__schemas__[t]=e,u(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(),u(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,u(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},function(t,e,r){"use strict";t.exports=function(t){var e={};e.src_Any=r(17).source,e.src_Cc=r(18).source,e.src_Z=r(19).source,e.src_P=r(11).source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");return 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.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}},function(t,e,r){(function(t,n){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof n&&n;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,l=/^xn--/,u=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,d=String.fromCharCode;function m(t){throw new RangeError(h[t])}function v(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function g(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+v((t=t.replace(p,".")).split("."),e).join(".")}function y(t){for(var e,r,n=[],o=0,i=t.length;o<i;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<i?56320==(64512&(r=t.charCodeAt(o++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),o--):n.push(e);return n}function k(t){return v(t,(function(t){var e="";return t>65535&&(e+=d((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=d(t)})).join("")}function b(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function w(t,e,r){var n=0;for(t=r?f(t/700):t>>1,t+=f(t/e);t>455;n+=36)t=f(t/35);return f(n+36*t/(t+38))}function x(t){var e,r,n,o,i,s,a,l,u,p,h,d=[],v=t.length,g=0,y=128,b=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&m("not-basic"),d.push(t.charCodeAt(n));for(o=r>0?r+1:0;o<v;){for(i=g,s=1,a=36;o>=v&&m("invalid-input"),((l=(h=t.charCodeAt(o++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||l>f((c-g)/s))&&m("overflow"),g+=l*s,!(l<(u=a<=b?1:a>=b+26?26:a-b));a+=36)s>f(c/(p=36-u))&&m("overflow"),s*=p;b=w(g-i,e=d.length+1,0==i),f(g/e)>c-y&&m("overflow"),y+=f(g/e),g%=e,d.splice(g++,0,y)}return k(d)}function _(t){var e,r,n,o,i,s,a,l,u,p,h,v,g,k,x,_=[];for(v=(t=y(t)).length,e=128,r=0,i=72,s=0;s<v;++s)(h=t[s])<128&&_.push(d(h));for(n=o=_.length,o&&_.push("-");n<v;){for(a=c,s=0;s<v;++s)(h=t[s])>=e&&h<a&&(a=h);for(a-e>f((c-r)/(g=n+1))&&m("overflow"),r+=(a-e)*g,e=a,s=0;s<v;++s)if((h=t[s])<e&&++r>c&&m("overflow"),h==e){for(l=r,u=36;!(l<(p=u<=i?1:u>=i+26?26:u-i));u+=36)x=l-p,k=36-p,_.push(d(b(p+x%k,0))),l=f(x/k);_.push(d(b(l,0))),i=w(r,g,n==o),r=0,++n}++r,++e}return _.join("")}a={version:"1.4.1",ucs2:{decode:y,encode:k},decode:x,encode:_,toASCII:function(t){return g(t,(function(t){return u.test(t)?"xn--"+_(t):t}))},toUnicode:function(t){return g(t,(function(t){return l.test(t)?x(t.slice(4).toLowerCase()):t}))}},void 0===(o=function(){return a}.call(e,r,e,t))||(t.exports=o)}()}).call(this,r(81)(t),r(82))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"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:{}}}},function(t,e,r){"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"]}}}},function(t,e,r){"use strict";
649t.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"]}}}},,function(t,e,r){"use strict";r.r(e),r.d(e,"components",(function(){return ba})),r.d(e,"proseMirror",(function(){return wa})),r.d(e,"states",(function(){return xa})),r.d(e,"InputRule",(function(){return sr})),r.d(e,"keymap",(function(){return tn})),r.d(e,"liftListItem",(function(){return or})),r.d(e,"splitListItem",(function(){return nr})),r.d(e,"wrapInList",(function(){return rr})),r.d(e,"Plugin",(function(){return Ie})),r.d(e,"Selection",(function(){return de}));var n=r(3),o=r(24),i=r.n(o),s=r(25),a=r.n(s),c=r(14),l=r.n(c),u=r(2),p=r.n(u);var h=r(5),f=r.n(h),d=r(26),v=r.n(d),g=r(8),y=r.n(g);function k(t){this.content=t}k.prototype={constructor:k,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 k(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 k(r)}
649,addToStart:function(t,e){return new k([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var r=this.remove(t).content.slice();return r.push(t,e),new k(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 k(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=k.from(t)).size?new k(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=k.from(t)).size?new k(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=k.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}},k.from=function(t){if(t instanceof k)return t;var e=[];if(t)for(var r in t)e.push(r,t[r]);return new k(e)};var b=k;var w=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},x={firstChild:{configurable:!0},lastChild:{configurable:!0},childCount:{configurable:!0}};w.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}},w.prototype.descendants=function(t){this.nodesBetween(0,this.size,t)},w.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+=n,i=!r):!i&&s.isBlock&&(o+=r,i=!0)}),0),o},w.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 w(n,this.size+t.size)},w.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 w(r,n)},w.prototype.cutByIndex=function(t,e){return t==e?w.empty:0==t&&e==this.content.length?this:new w(this.content.slice(t,e))},w.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 w(n,o)},w.prototype.addToStart=function(t){return new w([t].concat(this.content),this.size+t.nodeSize)},w.prototype.addToEnd=function(t){return new w(this.content.concat(t),this.size+t.nodeSize)},w.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},x.firstChild.get=function(){return this.content.length?this.content[0]:null},x.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},x.childCount.get=function(){return this.content.length},w.prototype.child=function(t){var e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e},w.prototype.maybeChild=function(t){return this.content[t]},w.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}},w.prototype.findDiffStart=function(t,e){return void 0===e&&(e=0),function t(e,r,n){for(var o=0;;o++){if(o==e.childCount||o==r.childCount)return e.childCount==r.childCount?null:n;var i=e.child(o),s=r.child(o);if(i!=s){if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(var a=0;i.text[a]==s.text[a];a++)n++;return n}if(i.content.size||s.content.size){var c=t(i.content,s.content,n+1);if(null!=c)return c}n+=i.nodeSize}else n+=i.nodeSize}}(this,t,e)},w.prototype.findDiffEnd=function(t,e,r){return void 0===e&&(e=this.size),void 0===r&&(r=t.size),function t(e,r,n,o){for(var i=e.childCount,s=r.childCount;;){if(0==i||0==s)return i==s?null:{a:n,b:o};var a=e.child(--i),c=r.child(--s),l=a.nodeSize;if(a!=c){if(!a.sameMarkup(c))return{a:n,b:o};if(a.isText&&a.text!=c.text){for(var u=0,p=Math.min(a.text.length,c.text.length);u<p&&a.text[a.text.length-u-1]==c.text[c.text.length-u-1];)u++,n--,o--;return{a:n,b:o}}if(a.content.size||c.content.size){var h=t(a.content,c.content,n-1,o-1);if(h)return h}n-=l,o-=l}else n-=l,o-=l}}(this,t,e,r)},w.prototype.findIndex=function(t,e){if(void 0===e&&(e=-1),0==t)return C(0,t);if(t==this.size)return C(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?C(r+1,o):C(r,n);n=o}},w.prototype.toString=function(){return"<"+this.toStringInner()+">"},w.prototype.toStringInner=function(){return this.content.join(", ")},w.prototype.toJSON=function(){return this.content.length?this.content.map((function(t){return t.toJSON()})):null},w.fromJSON=function(t,e){if(!e)return w.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new w(e.map(t.nodeFromJSON))},w.fromArray=function(t){if(!t.length)return w.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 w(e||t,r)},w.from=function(t){if(!t)return w.empty;if(t instanceof w)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new w([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(w.prototype,x);var _={index:0,offset:0};function C(t,e){return _.index=t,_.offset=e,_}function S(t,e){if(t===e)return!0;
649if(!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(!S(t[n],e[n]))return!1}else{for(var o in t)if(!(o in e)||!S(t[o],e[o]))return!1;for(var i in e)if(!(i in t))return!1}return!0}w.empty=new w([],0);var A=function(t,e){this.type=t,this.attrs=e};function M(t){var e=Error.call(this,t);return e.__proto__=M.prototype,e}A.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},A.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},A.prototype.isInSet=function(t){for(var e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1},A.prototype.eq=function(t){return this==t||this.type==t.type&&S(this.attrs,t.attrs)},A.prototype.toJSON=function(){var t={type:this.type.name};for(var e in this.attrs){t.attrs=this.attrs;break}return t},A.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)}
649,A.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},A.setFrom=function(t){if(!t||0==t.length)return A.none;if(t instanceof A)return[t];var e=t.slice();return e.sort((function(t,e){return t.type.rank-e.type.rank})),e},A.none=[],M.prototype=Object.create(Error.prototype),M.prototype.constructor=M,M.prototype.name="ReplaceError";var D=function(t,e,r){this.content=t,this.openStart=e,this.openEnd=r},O={size:{configurable:!0}};function E(t,e,r){if(r.openStart>t.depth)throw new M("Inserted content deeper than insertion position");if(t.depth-r.openStart!=e.depth-r.openEnd)throw new M("Inconsistent open depths");return function t(e,r,n,o){var i=e.index(o),s=e.node(o);if(i==r.index(o)&&o<e.depth-n.openStart){var a=t(e,r,n,o+1);return s.copy(s.content.replaceChild(i,a))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=o||r.depth!=o){var c=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(w.from(n));return{start:n.resolveNoCache(t.openStart+r),end:n.resolveNoCache(n.content.size-t.openEnd-r)}}(n,e),l=c.start,u=c.end;return R(s,function t(e,r,n,o,i){var s=e.depth>i&&N(e,r,i+1),a=o.depth>i&&N(n,o,i+1),c=[];z(null,e,i,c),s&&a&&r.index(i)==n.index(i)?(T(s,a),I(R(s,t(e,r,n,o,i+1)),c)):(s&&I(R(s,F(e,r,i+1)),c),z(r,n,i,c),a&&I(R(a,F(n,o,i+1)),c));return z(o,null,i,c),new w(c)}(e,l,u,r,o))}var p=e.parent,h=p.content;return R(p,h.cut(0,e.parentOffset).append(n.content).append(h.cut(r.parentOffset)))}return R(s,F(e,r,o))}(t,e,r,0)}function T(t,e){if(!e.type.compatibleContent(t.type))throw new M("Cannot join "+e.type.name+" onto "+t.type.name)}function N(t,e,r){var n=t.node(r);return T(n,e.node(r)),n}function I(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 z(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&&(I(t.nodeAfter,n),i++));for(var a=i;a<s;a++)I(o.child(a),n);e&&e.depth==r&&e.textOffset&&I(e.nodeBefore,n)}function R(t,e){if(!t.type.validContent(e))throw new M("Invalid content for node "+t.type.name);return t.copy(e)}function F(t,e,r){var n=[];(z(null,t,r,n),t.depth>r)&&I(R(N(t,e,r+1),F(t,e,r+1)),n);return z(e,null,r,n),new w(n)}O.size.get=function(){return this.content.size-this.openStart-this.openEnd},D.prototype.insertAt=function(t,e){var r=function t(e,r,n,o){var i=e.findIndex(r),s=i.index,a=i.offset,c=e.maybeChild(s);if(a==r||c.isText)return o&&!o.canReplace(s,s,n)?null:e.cut(0,r).append(n).append(e.cut(r));var l=t(c.content,r-a-1,n);return l&&e.replaceChild(s,c.copy(l))}(this.content,t+this.openStart,e,null);return r&&new D(r,this.openStart,this.openEnd)},D.prototype.removeBetween=function(t,e){return new D(function t(e,r,n){var o=e.findIndex(r),i=o.index,s=o.offset,a=e.maybeChild(i),c=e.findIndex(n),l=c.index,u=c.offset;if(s==r||a.isText){if(u!=n&&!e.child(l).isText)throw new RangeError("Removing non-flat range");return e.cut(0,r).append(e.cut(n))}if(i!=l)throw new RangeError("Removing non-flat range");return e.replaceChild(i,a.copy(t(a.content,r-s-1,n-s-1)))}(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)},D.prototype.eq=function(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd},D.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},D.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},D.fromJSON=function(t,e){if(!e)return D.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 D(w.fromJSON(t,e.content),r,n)},D.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 D(t,r,n)},Object.defineProperties(D.prototype,O),D.empty=new D(w.empty,0,0);var q=function(t,e,r){this.pos=t,this.path=e,this.depth=e.length/3-1,this.parentOffset=r},B={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};q.prototype.resolveDepth=function(t){return null==t?this.depth:t<0?this.depth+t:t},B.parent.get=function(){return this.node(this.depth)},B.doc.get=function(){return this.node(0)},q.prototype.node=function(t){return this.path[3*this.resolveDepth(t)]},q.prototype.index=function(t){return this.path[3*this.resolveDepth(t)+1]},q.prototype.indexAfter=function(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)},q.prototype.start=function(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1},q.prototype.end=function(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size},q.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]},q.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},B.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},B.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},B.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)},q.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},q.prototype.marks=function(){var t=this.parent,e=this.index();if(0==t.content.size)return A.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},q.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},q.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},q.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 j(this,t,r)},q.prototype.sameParent=function(t){return this.pos-this.parentOffset==t.pos-t.parentOffset},q.prototype.max=function(t){return t.pos>this.pos?t:this},q.prototype.min=function(t){return t.pos<this.pos?t:this},q.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},q.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 q(e,r,o)}
649,q.resolveCached=function(t,e){for(var r=0;r<P.length;r++){var n=P[r];if(n.pos==e&&n.doc==t)return n}var o=P[L]=q.resolve(t,e);return L=(L+1)%V,o},Object.defineProperties(q.prototype,B);var P=[],L=0,V=12,j=function(t,e,r){this.$from=t,this.$to=e,this.depth=r},U={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};U.start.get=function(){return this.$from.before(this.depth+1)},U.end.get=function(){return this.$to.after(this.depth+1)},U.parent.get=function(){return this.$from.node(this.depth)},U.startIndex.get=function(){return this.$from.index(this.depth)},U.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(j.prototype,U);var J=Object.create(null),W=function(t,e,r,n){this.type=t,this.attrs=e,this.content=r||w.empty,this.marks=n||A.none},K={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}};K.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},K.childCount.get=function(){return this.content.childCount},W.prototype.child=function(t){return this.content.child(t)},W.prototype.maybeChild=function(t){return this.content.maybeChild(t)},W.prototype.forEach=function(t){this.content.forEach(t)},W.prototype.nodesBetween=function(t,e,r,n){void 0===n&&(n=0),this.content.nodesBetween(t,e,r,n,this)},W.prototype.descendants=function(t){this.nodesBetween(0,this.content.size,t)},K.textContent.get=function(){return this.textBetween(0,this.content.size,"")},W.prototype.textBetween=function(t,e,r,n){return this.content.textBetween(t,e,r,n)},K.firstChild.get=function(){return this.content.firstChild},K.lastChild.get=function(){return this.content.lastChild},W.prototype.eq=function(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)},W.prototype.sameMarkup=function(t){return this.hasMarkup(t.type,t.attrs,t.marks)},W.prototype.hasMarkup=function(t,e,r){return this.type==t&&S(this.attrs,e||t.defaultAttrs||J)&&A.sameSet(this.marks,r||A.none)},W.prototype.copy=function(t){return void 0===t&&(t=null),t==this.content?this:new this.constructor(this.type,this.attrs,t,this.marks)},W.prototype.mark=function(t){return t==this.marks?this:new this.constructor(this.type,this.attrs,this.content,t)},W.prototype.cut=function(t,e){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))},W.prototype.slice=function(t,e,r){if(void 0===e&&(e=this.content.size),void 0===r&&(r=!1),t==e)return D.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 D(a,n.depth-i,o.depth-i)},W.prototype.replace=function(t,e,r){return E(this.resolve(t),this.resolve(e),r)},W.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}},W.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}},W.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}},W.prototype.resolve=function(t){return q.resolveCached(this,t)},W.prototype.resolveNoCache=function(t){return q.resolve(this,t)},W.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},K.isBlock.get=function(){return this.type.isBlock},K.isTextblock.get=function(){return this.type.isTextblock},K.inlineContent.get=function(){return this.type.inlineContent},K.isInline.get=function(){return this.type.isInline},K.isText.get=function(){return this.type.isText},K.isLeaf.get=function(){return this.type.isLeaf},K.isAtom.get=function(){return this.type.isAtom}
649,W.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()+")"),G(this.marks,t)},W.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},W.prototype.canReplace=function(t,e,r,n,o){void 0===r&&(r=w.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},W.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},W.prototype.canAppend=function(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)},W.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));this.content.forEach((function(t){return t.check()}))},W.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},W.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=w.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,n,r)},Object.defineProperties(W.prototype,K);var H=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):G(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}(W);function G(t,e){for(var r=t.length-1;r>=0;r--)e=t[r].type.name+"("+e+")";return e}var Z=function(t){this.validEnd=t,this.next=[],this.wrapCache=[]},Y={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};Z.parse=function(t,e){var r=new X(t,e);if(null==r.next)return Z.empty;var n=tt(r);r.next&&r.err("Unexpected trailing text");var o=function(t){var e=Object.create(null);return function r(n){var o=[];n.forEach((function(e){t[e].forEach((function(e){var r=e.term,n=e.to;if(r){var i=o.indexOf(r),s=i>-1&&o[i+1];st(t,n).forEach((function(t){s||o.push(r,s=[]),-1==s.indexOf(t)&&s.push(t)}))}}))}));for(var i=e[n.join(",")]=new Z(n.indexOf(t.length-1)>-1),s=0;s<o.length;s+=2){var a=o[s+1].sort(it);i.next.push(o[s],e[a.join(",")]||r(a))}return i}(st(t,0))}(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 u=i,p=0;p<e.min;p++){var h=r();o(t(e.expr,u),h),u=h}if(-1==e.max)o(t(e.expr,u),u);else for(var f=e.min;f<e.max;f++){var d=r();n(u,d),o(t(e.expr,u),d),u=d}return[n(u)]}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));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)")}}(o,r),o},Z.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},Z.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},Y.inlineContent.get=function(){var t=this.next[0];return!!t&&t.isInline},Y.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}},Z.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},Z.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);
649if(a&&(!e||a.validEnd))return w.from(s.map((function(t){return t.createAndFill()})));for(var c=0;c<i.next.length;c+=2){var l=i.next[c],u=i.next[c+1];if(!l.isText&&!l.hasRequiredAttrs()&&-1==n.indexOf(u)){n.push(u);var p=o(u,s.concat(l));if(p)return p}}}(this,[])},Z.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},Z.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)}}},Y.edgeCount.get=function(){return this.next.length>>1},Z.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]}},Z.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(Z.prototype,Y),Z.empty=new Z(!0);var X=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()},Q={next:{configurable:!0}};function tt(t){var e=[];do{e.push(et(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function et(t){var e=[];do{e.push(rt(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function rt(t){for(var e=function(t){if(t.eat("(")){var e=tt(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)}0==o.length&&t.err("No node type or group '"+e+"' found");return 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=ot(t,e)}return e}function nt(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");var e=Number(t.next);return t.pos++,e}function ot(t,e){var r=nt(t),n=r;return t.eat(",")&&(n="}"!=t.next?nt(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:e}}function it(t,e){return e-t}function st(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(it)}function at(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 ct(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 lt(t){var e=Object.create(null);if(t)for(var r in t)e[r]=new ht(t[r]);return e}Q.next.get=function(){return this.tokens[this.pos]},X.prototype.eat=function(t){return this.next==t&&(this.pos++||!0)},X.prototype.err=function(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")},Object.defineProperties(X.prototype,Q);var ut=function(t,e,r){this.name=t,this.schema=e,this.spec=r,this.groups=r.group?r.group.split(" "):[],this.attrs=lt(r.attrs),this.defaultAttrs=at(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==t),this.isText="text"==t}
649,pt={isInline:{configurable:!0},isTextblock:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};pt.isInline.get=function(){return!this.isBlock},pt.isTextblock.get=function(){return this.isBlock&&this.inlineContent},pt.isLeaf.get=function(){return this.contentMatch==Z.empty},pt.isAtom.get=function(){return this.isLeaf||this.spec.atom},ut.prototype.hasRequiredAttrs=function(){for(var t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1},ut.prototype.compatibleContent=function(t){return this==t||this.contentMatch.compatible(t.contentMatch)},ut.prototype.computeAttrs=function(t){return!t&&this.defaultAttrs?this.defaultAttrs:ct(this.attrs,t)},ut.prototype.create=function(t,e,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new W(this,this.computeAttrs(t),w.from(e),A.setFrom(r))},ut.prototype.createChecked=function(t,e,r){if(e=w.from(e),!this.validContent(e))throw new RangeError("Invalid content for node "+this.name);return new W(this,this.computeAttrs(t),e,A.setFrom(r))},ut.prototype.createAndFill=function(t,e,r){if(t=this.computeAttrs(t),(e=w.from(e)).size){var n=this.contentMatch.fillBefore(e);if(!n)return null;e=n.append(e)}var o=this.contentMatch.matchFragment(e).fillBefore(w.empty,!0);return o?new W(this,t,e.append(o),A.setFrom(r)):null},ut.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},ut.prototype.allowsMarkType=function(t){return null==this.markSet||this.markSet.indexOf(t)>-1},ut.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},ut.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:A.empty:t},ut.compile=function(t,e){var r=Object.create(null);t.forEach((function(t,n){return r[t]=new ut(t,e,n)}
649));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(ut.prototype,pt);var ht=function(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default},ft={isRequired:{configurable:!0}};ft.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(ht.prototype,ft);var dt=function(t,e,r,n){this.name=t,this.schema=r,this.spec=n,this.attrs=lt(n.attrs),this.rank=e,this.excluded=null;var o=at(this.attrs);this.instance=o&&new A(this,o)};dt.prototype.create=function(t){return!t&&this.instance?this.instance:new A(this,ct(this.attrs,t))},dt.compile=function(t,e){var r=Object.create(null),n=0;return t.forEach((function(t,o){return r[t]=new dt(t,n++,e,o)})),r},dt.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},dt.prototype.isInSet=function(t){for(var e=0;e<t.length;e++)if(t[e].type==this)return t[e]},dt.prototype.excludes=function(t){return this.excluded.indexOf(t)>-1};var mt=function(t){for(var e in this.spec={},t)this.spec[e]=t[e];this.spec.nodes=b.from(t.nodes),this.spec.marks=b.from(t.marks),this.nodes=ut.compile(this.spec.nodes,this),this.marks=dt.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]=Z.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==s?null:s?vt(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?[]:vt(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 vt(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}mt.prototype.node=function(t,e,r,n){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof ut))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)},mt.prototype.text=function(t,e){var r=this.nodes.text;return new H(r,r.defaultAttrs,t,A.setFrom(e))},mt.prototype.mark=function(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)},mt.prototype.nodeFromJSON=function(t){return W.fromJSON(this,t)},mt.prototype.markFromJSON=function(t){return A.fromJSON(this,t)},mt.prototype.nodeType=function(t){var e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e};var gt=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)}))};gt.prototype.parse=function(t,e){void 0===e&&(e={});var r=new _t(this,e,!1);return r.addAll(t,null,e.from,e.to),r.finish()},gt.prototype.parseSlice=function(t,e){void 0===e&&(e={});var r=new _t(this,e,!0);return r.addAll(t,null,e.from,e.to),D.maxOpen(r.finish())},gt.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(St(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}}},gt.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
649){var s=i.getAttrs(e);if(!1===s)continue;i.attrs=s}return i}}},gt.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=function(e){var n=t.marks[e].spec.parseDOM;n&&n.forEach((function(t){r(t=At(t)),t.mark=e}))};for(var o in t.marks)n(o);var i;for(var s in t.nodes)i=void 0,(i=t.nodes[s].spec.parseDOM)&&i.forEach((function(t){r(t=At(t)),t.node=s}));return e},gt.fromSchema=function(t){return t.cached.domParser||(t.cached.domParser=new gt(t,gt.schemaRules(t)))};var yt={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},kt={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},bt={ol:!0,ul:!0};function wt(t){return(t?1:0)|("full"===t?2:0)}var xt=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=A.none,this.pendingMarks=n,this.stashMarks=[]};xt.prototype.findWrapping=function(t){if(!this.match){if(!this.type)return[];var e=this.type.contentMatch.fillBefore(w.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)},xt.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=w.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(w.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n},xt.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]},xt.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):Mt(n.type,t))&&!n.isInSet(this.activeMarks)&&(this.activeMarks=n.addToSet(this.activeMarks),this.pendingMarks=n.removeFromSet(this.pendingMarks))}};var _t=function(t,e,r){this.parser=t,this.options=e,this.isOpen=r;var n,o=e.topNode,i=wt(e.preserveWhitespace)|(r?4:0);n=o?new xt(o.type,o.attrs,A.none,A.none,!0,e.topMatch||o.type.contentMatch,i):new xt(r?null:t.schema.topNodeType,null,A.none,A.none,!0,null,i),this.nodes=[n],this.open=0,this.find=e.findPositions,this.needsBlock=!1},Ct={top:{configurable:!0},currentPos:{configurable:!0}};function St(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function At(t){var e={};for(var r in t)e[r]=t[r];return e}function Mt(t,e){var r=e.schema.nodes,n=function(n){var o=r[n];if(o.allowsMarkType(t)){var i=[],s=function(t){i.push(t);for(var r=0;r<t.edgeCount;r++){var n=t.edge(r),o=n.type,a=n.next;if(o==e)return!0;if(i.indexOf(a)<0&&s(a))return!0}};return s(o.contentMatch)?{v:!0}:void 0}};for(var o in r){var i=n(o);if(i)return i.v}}Ct.top.get=function(){return this.nodes[this.open]},_t.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){var e,r=/\s*([\w-]+)\s*:\s*([^;]+)/g,n=[];for(;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)}},_t.prototype.addTextNode=function(t){var e=t.nodeValue,r=this.top;if((r.type?r.type.inlineContent:r.content.length&&r.content[0].isInline)||/[^ \t\r\n\u000c]/.test(e)){if(1&r.options)2&r.options||(e=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)},_t.prototype.addElement=function(t,e){var r,n=t.nodeName.toLowerCase();bt.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;
649n&&bt.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:kt.hasOwnProperty(n))this.findInside(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(yt.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)},_t.prototype.leafFallback=function(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))},_t.prototype.readStyles=function(t){var e=A.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},_t.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)},_t.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&&yt.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(e);this.findAtPoint(t,o)},_t.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},_t.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},_t.prototype.enter=function(t,e,r){var n=this.findPlace(t.create(e));return n&&this.enterInner(t,e,!0,r),n},_t.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=null==n?-5&o.options:wt(n);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new xt(t,e,o.activeMarks,o.pendingMarks,r,null,i)),this.open++},_t.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}},_t.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},_t.prototype.sync=function(t){for(var e=this.open;e>=0;e--)if(this.nodes[e]==t)return void(this.open=e)},Ct.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},_t.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)},_t.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)},_t.prototype.findAround=function(t,e,r){if(t!=e&&this.find)for(var n=0;n<this.find.length;n++){if(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)}},_t.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))},_t.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),s=function(t,a){for(;t>=0;t--){var c=r[t];if(""==c){if(t==r.length-1||0==t)continue;for(;a>=i;a--)if(s(t-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};return s(r.length-1,this.open)},_t.prototype.textblockFromContext=function(){var t=this.options.context;if(t)for(var e=t.depth;e>=0;
649e--){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}},_t.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)},_t.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(_t.prototype,Ct);var Dt=function(t,e){this.nodes=t||{},this.marks=e||{}};function Ot(t){var e={};for(var r in t){var n=t[r].spec.toDOM;n&&(e[r]=n)}return e}function Et(t){return t.document||window.document}Dt.prototype.serializeFragment=function(t,e,r){var n=this;void 0===e&&(e={}),r||(r=Et(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.serializeNode(t,e))})),r},Dt.prototype.serializeNode=function(t,e){void 0===e&&(e={});var r=Dt.renderSpec(Et(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},Dt.prototype.serializeNodeAndMarks=function(t,e){void 0===e&&(e={});for(var r=this.serializeNode(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},Dt.prototype.serializeMark=function(t,e,r){void 0===r&&(r={});var n=this.marks[t.type.name];return n&&Dt.renderSpec(Et(r),n(t,e))},Dt.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 u=l.indexOf(" ");u>0?s.setAttributeNS(l.slice(0,u),l.slice(u+1),a[l]):s.setAttribute(l,a[l])}for(var p=c;p<e.length;p++){var h=e[p];if(0===h){if(p<e.length-1||p>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var f=Dt.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}},Dt.fromSchema=function(t){return t.cached.domSerializer||(t.cached.domSerializer=new Dt(this.nodesFromSchema(t),this.marksFromSchema(t)))},Dt.nodesFromSchema=function(t){var e=Ot(t.nodes);return e.text||(e.text=function(t){return t.text}),e},Dt.marksFromSchema=function(t){return Ot(t.marks)};var Tt=Math.pow(2,16);function Nt(t){return 65535&t}var It=function(t,e,r){void 0===e&&(e=!1),void 0===r&&(r=null),this.pos=t,this.deleted=e,this.recover=r},zt=function(t,e){void 0===e&&(e=!1),this.ranges=t,this.inverted=e};zt.prototype.recover=function(t){var e=0,r=Nt(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))/Tt}(t)},zt.prototype.mapResult=function(t,e){return void 0===e&&(e=1),this._map(t,e,!1)},zt.prototype.map=function(t,e){return void 0===e&&(e=1),this._map(t,e,!0)},zt.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],u=a+c;if(t<=u){var p=a+n+((c?t==a?-1:t==u?1:e:e)<0?0:l);if(r)return p;var h=t==(e<0?a:u)?null:s/3+(t-a)*Tt;return new It(p,e<0?t!=a:t!=u,h)}n+=l-c}return r?t+n:new It(t+n)},zt.prototype.touches=function(t,e){for(var r=0,n=Nt(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},zt.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}},zt.prototype.invert=function(){return new zt(this.ranges,!this.inverted)},zt.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},zt.offset=function(t){return 0==t?zt.empty:new zt(t<0?[0,-t,0]:[0,0,t])},zt.empty=new zt([]);var Rt=function(t,e,r,n){this.maps=t||[],this.from=r||0,this.to=null==n?this.maps.length:n,this.mirror=e};function Ft(t){var e=Error.call(this,t);return e.__proto__=Ft.prototype,e}Rt.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.maps.length),new Rt(this.maps,this.mirror,t,e)},Rt.prototype.copy=function(){return new Rt(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},Rt.prototype.appendMap=function(t,e){this.to=this.maps.push(t),null!=e&&this.setMirror(this.maps.length-1,e)},Rt.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)}},Rt.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)]},Rt.prototype.setMirror=function(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)},Rt.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)}},Rt.prototype.invert=function(){var t=new Rt;return t.appendMappingInverted(this),t},Rt.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},Rt.prototype.mapResult=function(t,e){return void 0===e&&(e=1),this._map(t,e,!1)},Rt.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 It(t,n)},Ft.prototype=Object.create(Error.prototype),Ft.prototype.constructor=Ft,Ft.prototype.name="TransformError";var qt=function(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Rt},Bt={before:{configurable:!0},docChanged:{configurable:!0}};function $t(){throw new Error("Override me")}Bt.before.get=function(){return this.docs.length?this.docs[0]:this.doc},qt.prototype.step=function(t){var e=this.maybeStep(t);if(e.failed)throw new Ft(e.failed);return this},qt.prototype.maybeStep=function(t){var e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e},Bt.docChanged.get=function(){return this.steps.length>0},qt.prototype.addStep=function(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e},Object.defineProperties(qt.prototype,Bt);var Pt=Object.create(null),Lt=function(){};Lt.prototype.apply=function(t){return $t()},Lt.prototype.getMap=function(){return zt.empty},Lt.prototype.invert=function(t){return $t()},Lt.prototype.map=function(t){return $t()},Lt.prototype.merge=function(t){return null},Lt.prototype.toJSON=function(){return $t()},Lt.fromJSON=function(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");var r=Pt[e.stepType];if(!r)throw new RangeError("No step type "+e.stepType+" defined");return r.fromJSON(t,e)},Lt.jsonID=function(t,e){if(t in Pt)throw new RangeError("Duplicate use of step JSON ID "+t);return Pt[t]=e,e.prototype.jsonID=t,e};var Vt=function(t,e){this.doc=t,this.failed=e};Vt.ok=function(t){return new Vt(t,null)},Vt.fail=function(t){return new Vt(null,t)},Vt.fromReplace=function(t,e,r,n){try{return Vt.ok(t.replace(e,r,n))}catch(t){if(t instanceof M)return Vt.fail(t.message);throw t}};var jt=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&&Jt(t,this.from,this.to)?Vt.fail("Structure replace would overwrite content"):Vt.fromReplace(t,this.from,this.to,this.slice)},e.prototype.getMap=function(){return new zt([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?D.empty:new D(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?D.empty:new D(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,D.fromJSON(t,r.slice),!!r.structure)},e}(Lt);Lt.jsonID("replace",jt);var Ut=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&&(Jt(t,this.from,this.gapFrom)||Jt(t,this.gapTo,this.to)))return Vt.fail("Structure gap-replace would overwrite content");var e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return Vt.fail("Gap is not a flat range");var r=this.slice.insertAt(this.insert,e.content);return r?Vt.fromReplace(t,this.from,this.to,r):Vt.fail("Content does not fit in gap")},e.prototype.getMap=function(){return new zt([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,D.fromJSON(t,r.slice),r.insert,!!r.structure)},e}(Lt);function Jt(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 Wt(t,e,r){return(0==e||t.canReplace(e,t.childCount))&&(r==t.childCount||t.canReplace(0,r))}function Kt(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||!Wt(n,o,i))break}}function Ht(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);if(!a||!a.validEnd)return null;return s}(n,e);return i?o.map(Gt).concat({type:e,attrs:r}).concat(i.map(Gt)):null}function Gt(t){return{type:t,attrs:null}}function Zt(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),u=o.index(a);if(l.type.spec.isolating)return!1;var p=l.content.cutByIndex(u,l.childCount),h=n&&n[c]||l;if(h!=l&&(p=p.replaceChild(0,h.type.create(h.attrs))),!l.canReplace(u+1,l.childCount)||!h.type.validContent(p))return!1}var f=o.indexAfter(i),d=n&&n[0];
649return o.node(i).canReplaceWith(f,f,d?d.type:o.node(i+1).type)}function Yt(t,e){var r=t.resolve(e),n=r.index();return Xt(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function Xt(t,e){return t&&e&&!t.isLeaf&&t.canAppend(e)}function Qt(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);if(1==s?n.node(a).canReplace(l,l,o):n.node(a).contentMatchAt(l).findWrapping(o.firstChild.type))return 0==c?n.pos:c<0?n.before(a+1):n.after(a+1)}return null}function te(t,e,r){for(var n=[],o=0;o<t.childCount;o++){var i=t.child(o);i.content.size&&(i=i.copy(te(i.content,e,i))),i.isInline&&(i=e(i,r,o)),n.push(i)}return w.fromArray(n)}Lt.jsonID("replaceAround",Ut),qt.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=w.empty,u=0,p=o,h=!1;p>e;p--)h||r.index(p)>0?(h=!0,l=w.from(r.node(p).copy(l)),u++):a--;for(var f=w.empty,d=0,m=o,v=!1;m>e;m--)v||n.after(m+1)<n.end(m)?(v=!0,f=w.from(n.node(m).copy(f)),d++):c++;return this.step(new Ut(a,c,i,s,new D(l.append(f),u,d),l.size-u,!0))},qt.prototype.wrap=function(t,e){for(var r=w.empty,n=e.length-1;n>=0;n--)r=w.from(e[n].type.create(e[n].attrs,r));var o=t.start,i=t.end;return this.step(new Ut(o,i,o,i,new D(r,0,0),e.length,!0))},qt.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 Ut(a,c,a+1,c-1,new D(w.from(r.create(n,null,t.marks)),0,0),1,!0)),!1}})),this},qt.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 Ut(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new D(w.from(i),0,0),1,!0))},qt.prototype.split=function(t,e,r){void 0===e&&(e=1);for(var n=this.doc.resolve(t),o=w.empty,i=w.empty,s=n.depth,a=n.depth-e,c=e-1;s>a;s--,c--){o=w.from(n.node(s).copy(o));var l=r&&r[c];i=w.from(l?l.type.create(l.attrs,i):n.node(s).copy(i))}return this.step(new jt(t,t,new D(o.append(i),e,e),!0))},qt.prototype.join=function(t,e){void 0===e&&(e=1);var r=new jt(t-e,t+e,D.empty,!0);return this.step(r)};var ee=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 D(te(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 Vt.fromReplace(t,this.from,this.to,i)},e.prototype.invert=function(){return new re(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}(Lt);Lt.jsonID("addMark",ee);var re=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 D(te(r.content,(function(t){return t.mark(e.mark.removeFromSet(t.marks))})),r.openStart,r.openEnd);return Vt.fromReplace(t,this.from,this.to,n)},e.prototype.invert=function(){return new ee(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}(Lt);function ne(t,e,r){return!r.openStart&&!r.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),r.content)}Lt.jsonID("removeMark",re),qt.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 u=n.marks;if(!r.isInSet(u)&&l.type.allowsMarkType(r.type)){for(var p=Math.max(c,t),h=Math.min(c+n.nodeSize,e),f=r.addToSet(u),d=0;d<u.length;d++)u[d].isInSet(f)||(s&&s.to==p&&s.mark.eq(u[d])?s.to=h:o.push(s=new re(p,h,u[d])));a&&a.to==p?a.to=h:i.push(a=new ee(p,h,r))}}})),o.forEach((function(t){return n.step(t)}
649)),i.forEach((function(t){return n.step(t)})),this},qt.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 dt)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 u=Math.min(s+n.nodeSize,e),p=0;p<a.length;p++){for(var h=a[p],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=u,f.step=i):o.push({style:h,from:Math.max(s,t),to:u,step:i})}}})),o.forEach((function(t){return n.step(new re(t.from,t.to,t.style))})),this},qt.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 u=0;u<a.marks.length;u++)e.allowsMarkType(a.marks[u].type)||this.step(new re(i,c,a.marks[u]))}else o.push(new jt(i,c,D.empty));i=c}if(!r.validEnd){var p=r.fillBefore(w.empty,!0);this.replace(i,i,new D(p,0,0))}for(var h=o.length-1;h>=0;h--)this.step(o[h]);return this},qt.prototype.replace=function(t,e,r){void 0===e&&(e=t),void 0===r&&(r=D.empty);var n=function(t,e,r,n){if(void 0===r&&(r=e),void 0===n&&(n=D.empty),e==r&&!n.size)return null;var o=t.resolve(e),i=t.resolve(r);return ne(o,i,n)?new jt(e,r,n):new oe(o,i,n).fit()}(this.doc,t,e,r);return n&&this.step(n),this},qt.prototype.replaceWith=function(t,e,r){return this.replace(t,e,new D(w.from(r),0,0))},qt.prototype.delete=function(t,e){return this.replace(t,e,D.empty)},qt.prototype.insert=function(t,e){return this.replaceWith(t,t,e)};var oe=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=w.empty;for(var i=t.depth;i>0;i--)this.placed=w.from(t.node(i).copy(this.placed))},ie={depth:{configurable:!0}};function se(t,e,r){return 0==e?t.cutByIndex(r):t.replaceChild(0,t.firstChild.copy(se(t.firstChild.content,e-1,r)))}function ae(t,e,r){return 0==e?t.append(r):t.replaceChild(t.childCount-1,t.lastChild.copy(ae(t.lastChild.content,e-1,r)))}function ce(t,e){for(var r=0;r<e;r++)t=t.firstChild.content;return t}function le(t,e,r){if(e<=0)return t;var n=t.content;return e>1&&(n=n.replaceChild(0,le(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(w.empty,!0)))),t.copy(n)}function ue(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 pe(t,e,r,n,o){if(e<r){var i=t.firstChild;t=t.replaceChild(0,i.copy(pe(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(w.empty,!0))}return t}function he(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)&&r.push(n)}return r}ie.depth.get=function(){return this.frontier.length-1},oe.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 D(i,s,a);return e>-1?new Ut(n.pos,e,this.$to.pos,this.$to.end(),c,r):c.size||n.pos!=this.$to.pos?new jt(n.pos,o.pos,c):void 0},oe.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=ce(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(w.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}},oe.prototype.openMore=function(){var t=this.unplaced,e=t.content,r=t.openStart,n=t.openEnd,o=ce(e,r);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new D(e,r+1,Math.max(n,o.size+r>=e.size-n?r+1:0)),!0)},oe.prototype.dropNode=function(){var t=this.unplaced,e=t.content,r=t.openStart,n=t.openEnd,o=ce(e,r);if(o.childCount<=1&&r>0){var i=e.size-r<=r+o.size;this.unplaced=new D(se(e,r-1,1),r-1,i?r-1:n)}else this.unplaced=new D(se(e,r,1),r,n)},oe.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,u=0,p=[],h=this.frontier[r],f=h.match,d=h.type;if(o){for(var m=0;m<o.childCount;m++)p.push(o.child(m));f=f.matchFragment(o)}for(var v=c.size+e-(a.content.size-a.openEnd);u<c.childCount;){var g=c.child(u),y=f.matchType(g.type);if(!y)break;(++u>1||0==l||g.content.size)&&(f=y,p.push(le(g.mark(d.allowedMarks(g.marks)),1==u?l:0,u==c.childCount?v:-1)))}var k=u==c.childCount;k||(v=-1),this.placed=ae(this.placed,r,w.from(p)),this.frontier[r].match=f,k&&v<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var b=0,x=c;b<v;b++){var _=x.lastChild;this.frontier.push({type:_.type,match:_.contentMatchAt(_.childCount)}),x=_.content}this.unplaced=k?0==e?D.empty:new D(se(a.content,e-1,1),e-1,v<0?a.openEnd:e-1):new D(se(a.content,e,u),a.openStart,a.openEnd)},oe.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||!ue(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},oe.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=ue(t,e,o,n,i);if(s){for(var a=e-1;a>=0;a--){var c=this.frontier[a],l=c.match,u=ue(t,a,c.type,l,!0);if(!u||u.childCount)continue t}return{depth:e,fit:s,move:i?t.doc.resolve(t.after(e+1)):t}}}},oe.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=ae(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},oe.prototype.openFrontierNode=function(t,e,r){var n=this.frontier[this.depth];n.match=n.match.matchType(t),this.placed=ae(this.placed,this.depth,w.from(t.create(e,r))),this.frontier.push({type:t,match:t.contentMatch})},oe.prototype.closeFrontierNode=function(){var t=this.frontier.pop().match.fillBefore(w.empty,!0);t.childCount&&(this.placed=ae(this.placed,this.frontier.length,t))},Object.defineProperties(oe.prototype,ie),qt.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(ne(n,o,r))return this.step(new jt(t,e,r));var i=he(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;
649i.indexOf(a)>-1?s=a:n.before(a)==c&&i.splice(1,0,-a)}for(var u=i.indexOf(s),p=[],h=r.openStart,f=r.content,d=0;;d++){var m=f.firstChild;if(p.push(m),d==r.openStart)break;f=m.content}h>0&&p[h-1].type.spec.defining&&n.node(u).type!=p[h-1].type?h-=1:h>=2&&p[h-1].isTextblock&&p[h-2].type.spec.defining&&n.node(u).type!=p[h-2].type&&(h-=2);for(var v=r.openStart;v>=0;v--){var g=(v+h+1)%(r.openStart+1),y=p[g];if(y)for(var k=0;k<i.length;k++){var b=i[(k+u)%i.length],w=!0;b<0&&(w=!1,b=-b);var x=n.node(b-1),_=n.index(b-1);if(x.canReplaceWith(_,_,y.type,y.marks))return this.replace(n.before(b),w?o.after(b):e,new D(pe(r.content,0,r.openStart,g),g,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];S<0||(t=n.before(A),e=o.after(A))}return this},qt.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 D(w.from(r),0,0))},qt.prototype.deleteRange=function(t,e){for(var r=this.doc.resolve(t),n=this.doc.resolve(e),o=he(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 fe=Object.create(null),de=function(t,e,r){this.ranges=r||[new ve(t.min(e),t.max(e))],this.$anchor=t,this.$head=e},me={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};me.anchor.get=function(){return this.$anchor.pos},me.head.get=function(){return this.$head.pos},me.from.get=function(){return this.$from.pos},me.to.get=function(){return this.$to.pos},me.$from.get=function(){return this.ranges[0].$from},me.$to.get=function(){return this.ranges[0].$to},me.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},de.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},de.prototype.replace=function(t,e){void 0===e&&(e=D.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,u=c.$to,p=t.mapping.slice(i);t.replaceRange(p.map(l.pos),p.map(u.pos),a?D.empty:e),0==a&&Ce(t,i,(r?r.isInline:n&&n.isTextblock)?-1:1)}},de.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),u=c.map(a.pos);o?t.deleteRange(l,u):(t.replaceRangeWith(l,u,e),Ce(t,r,e.isInline?-1:1))}},de.findFrom=function(t,e,r){var n=t.parent.inlineContent?new ge(t):_e(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?_e(t.node(0),t.node(o),t.before(o+1),t.index(o),e,r):_e(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,r);if(i)return i}},de.near=function(t,e){return void 0===e&&(e=1),this.findFrom(t,e)||this.findFrom(t,-e)||new we(t.node(0))},de.atStart=function(t){return _e(t,t,0,0,1)||new we(t)},de.atEnd=function(t){return _e(t,t,t.content.size,t.childCount,-1)||new we(t)},de.fromJSON=function(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");var r=fe[e.type];if(!r)throw new RangeError("No selection type "+e.type+" defined");return r.fromJSON(t,e)},de.jsonID=function(t,e){if(t in fe)throw new RangeError("Duplicate use of selection JSON ID "+t);return fe[t]=e,e.prototype.jsonID=t,e},de.prototype.getBookmark=function(){return ge.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(de.prototype,me),de.prototype.visible=!0;var ve=function(t,e){this.$from=t,this.$to=e},ge=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=D.empty),t.prototype.replace.call(this,e,r),r==D.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 ye(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}(de);de.jsonID("text",ge);var ye=function(t,e){this.anchor=t,this.head=e};ye.prototype.map=function(t){return new ye(t.map(this.anchor),t.map(this.head))},ye.prototype.resolve=function(t){return ge.between(t.resolve(this.anchor),t.resolve(this.head))};var ke=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 D(w.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 be(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}(de);ke.prototype.visible=!1,de.jsonID("node",ke);var be=function(t){this.anchor=t};be.prototype.map=function(t){var e=t.mapResult(this.anchor),r=e.deleted,n=e.pos;return r?new ye(n,n):new be(n)},be.prototype.resolve=function(t){var e=t.resolve(this.anchor),r=e.nodeAfter;return r&&ke.isSelectable(r)?new ke(e):de.near(e)};var we=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=D.empty),r
649==D.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 xe},e}(de);de.jsonID("all",we);var xe={map:function(){return this},resolve:function(t){return new we(t)}};function _e(t,e,r,n,o,i){if(e.inlineContent)return ge.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&&ke.isSelectable(a))return ke.create(t,r-(o<0?a.nodeSize:0))}else{var c=_e(t,a,r+o,o<0?a.childCount:0,o,i);if(c)return c}r+=a.nodeSize*o}}function Ce(t,e,r){var n=t.steps.length-1;if(!(n<e)){var o,i=t.steps[n];if(i instanceof jt||i instanceof Ut)t.mapping.maps[n].forEach((function(t,e,r,n){null==o&&(o=n)})),t.setSelection(de.near(t.doc.resolve(o),r))}}var Se=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 A.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)||A.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(de.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}(qt);function Ae(t,e){return e&&t?t.bind(e):t}var Me=function(t,e,r){this.name=t,this.init=Ae(e.init,r),this.apply=Ae(e.apply,r)},De=[new Me("doc",{init:function(t){return t.doc||t.schema.topNodeType.createAndFill()},apply:function(t){return t.doc}}),new Me("selection",{init:function(t,e){return t.selection||de.atStart(e.doc)},apply:function(t){return t.selection}}),new Me("storedMarks",{init:function(t){return t.storedMarks||null},apply:function(t,e,r,n){return n.selection.$cursor?t.storedMarks:null}}),new Me("scrollToSelection",{init:function(){return 0},apply:function(t,e){return t.scrolledIntoView?e+1:e}})],Oe=function(t,e){var r=this;this.schema=t,this.fields=De.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 Me(t.key,t.spec.state,t))}))},Ee=function(t){this.config=t},Te={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};Te.schema.get=function(){return this.config.schema},Te.plugins.get=function(){return this.config.plugins},Ee.prototype.apply=function(t){return this.applyTransaction(t).state},Ee.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},Ee.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 u=0;u<this.config.plugins.length;u++)n.push(u<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}}},Ee.prototype.applyInner=function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var e=new Ee(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<Ne.length;i++)Ne[i](this,t,e);return e},Te.tr.get=function(){return new Se(this)},Ee.create=function(t){for(var e=new Oe(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new Ee(e),n=0;n<e.fields.length;n++)r[e.fields[n].name]=e.fields[n].init(t,r);return r},Ee.prototype.reconfigure=function(t){for(var e=new Oe(this.schema,t.plugins),r=e.fields,n=new Ee(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},Ee.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},Ee.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 Oe(t.schema,t.plugins),o=new Ee(n);return n.fields.forEach((function(n){if("doc"==n.name)o.doc=W.fromJSON(t.schema,e.doc);else if("selection"==n.name)o.selection=de.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},Ee.addApplyListener=function(t){Ne.push(t)},Ee.removeApplyListener=function(t){var e=Ne.indexOf(t);e>-1&&Ne.splice(e,1)}
649,Object.defineProperties(Ee.prototype,Te);var Ne=[];var Ie=function(t){this.props={},t.props&&function t(e,r,n){for(var o in e){var i=e[o];i instanceof Function?i=i.bind(r):"handleDOMEvents"==o&&(i=t(i,r,{})),n[o]=i}return n}(t.props,this,this.props),this.spec=t,this.key=t.key?t.key.key:Re("plugin")};Ie.prototype.getState=function(t){return t[this.key]};var ze=Object.create(null);function Re(t){return t in ze?t+"$"+ ++ze[t]:(ze[t]=0,t+"$")}var Fe=function(t){void 0===t&&(t="key"),this.key=Re(t)};function qe(t,e){return!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0)}function Be(t,e){for(;t;t="start"==e?t.firstChild:t.lastChild)if(t.isTextblock)return!0;return!1}function $e(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 Pe(t){if(!t.parent.type.spec.isolating)for(var e=t.depth-1;e>=0;e--){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 Le(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 Ve(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 je(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=Ve(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(de.near(l.doc.resolve(c),1)),e(l.scrollIntoView())}return!0}function Ue(t,e){var r=t.selection,n=r.$from,o=r.$to;if(t.selection instanceof ke&&t.selection.node.isBlock)return!(!n.parentOffset||!Zt(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 ge&&s.deleteSelection();var a=0==n.depth?null:Ve(n.node(-1).contentMatchAt(n.indexAfter(-1))),c=i&&a?[{type:a}]:null,l=Zt(s.doc,s.mapping.map(n.pos),1,c);c||l||!Zt(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||!n.node(-1).canReplace(n.index(-1),n.indexAfter(-1),w.from([a.create(),n.parent]))||s.setNodeMarkup(s.mapping.map(n.before()),a)),e(s.scrollIntoView())}return!0}function Je(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&&!Yt(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=w.empty,u=n.length-1;u>=0;u--)l=w.from(n[u].create(null,l));l=w.from(i.copy(l));var p=t.tr.step(new Ut(e.pos-1,c,e.pos,c,new D(l,1,0),n.length,!0)),h=c+2*n.length;Yt(p.doc,h)&&p.join(h),r(p.scrollIntoView())}return!0}var f=de.findFrom(e,1),d=f&&f.$from.blockRange(f.$to),m=d&&Kt(d);if(null!=m&&m>=e.depth)return r&&r(t.tr.lift(d,m).scrollIntoView()),!0;if(a&&s.isTextblock&&Be(i,"end")){for(var v=i,g=[];g.push(v),!v.isTextblock;)v=v.lastChild;if(v.canReplace(v.childCount,v.childCount,s.content)){if(r){for(var y=w.empty,k=g.length-1;k>=0;k--)y=w.from(g[k].copy(y));r(t.tr.step(new Ut(e.pos-g.length,e.pos+s.nodeSize,e.pos+1,e.pos+s.nodeSize-1,new D(y,g.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function We(t,e){return function(r,n){var o=r.selection,i=o.$from,s=o.$to,a=i.blockRange(s),c=a&&Ht(a,t,e);return!!c&&(n&&n(r.tr.wrap(a,c).scrollIntoView()),!0)}}function Ke(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 He(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);
649if(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,u=0;!c&&u<a.length;u++){var p=a[u],h=p.$from,f=p.$to;c=r.doc.rangeHasMark(h.pos,f.pos,t)}for(var d=0;d<a.length;d++){var m=a[d],v=m.$from,g=m.$to;if(c)l.removeMark(v.pos,g.pos,t);else{var y=v.pos,k=g.pos,b=v.nodeAfter,w=g.nodeBefore,x=b&&b.isText?/^\s*/.exec(b.text)[0].length:0,_=w&&w.isText?/\s*$/.exec(w.text)[0].length:0;y+x<k&&(y+=x,k-=_),l.addMark(y,k,t.create(e))}}n(l.scrollIntoView())}return!0}}function Ge(){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}}Fe.prototype.get=function(t){return t.config.pluginsByKey[this.key]},Fe.prototype.getState=function(t){return t[this.key]};var Ze=Ge(qe,(function(t,e,r){var n=t.selection.$cursor;if(!n||(r?!r.endOfTextblock("backward",t):n.parentOffset>0))return!1;var o=$e(n);if(!o){var i=n.blockRange(),s=i&&Kt(i);return null!=s&&(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)}var a=o.nodeBefore;if(!a.type.spec.isolating&&Je(t,o,e))return!0;if(0==n.parent.content.size&&(Be(a,"end")||ke.isSelectable(a))){if(e){var c=t.tr.deleteRange(n.before(),n.after());c.setSelection(Be(a,"end")?de.findFrom(c.doc.resolve(c.mapping.map(o.pos,-1)),-1):ke.create(c.doc,o.pos-a.nodeSize)),e(c.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=$e(o)}var s=i&&i.nodeBefore;return!(!s||!ke.isSelectable(s))&&(e&&e(t.tr.setSelection(ke.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)})),Ye=Ge(qe,(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=Pe(n);if(!o)return!1;var i=o.nodeAfter;if(Je(t,o,e))return!0;if(0==n.parent.content.size&&(Be(i,"start")||ke.isSelectable(i))){if(e){var s=t.tr.deleteRange(n.before(),n.after());s.setSelection(Be(i,"start")?de.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):ke.create(s.doc,s.mapping.map(o.pos))),e(s.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=Pe(o)}var s=i&&i.nodeAfter;return!(!s||!ke.isSelectable(s))&&(e&&e(t.tr.setSelection(ke.create(t.doc,i.pos)).scrollIntoView()),!0)})),Xe={Enter:Ge(Le,(function(t,e){var r=t.selection,n=r.$from,o=r.$to;if(n.parent.inlineContent||o.parent.inlineContent)return!1;var i=Ve(n.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(ge.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(Zt(t.doc,n))return e&&e(t.tr.split(n).scrollIntoView()),!0}var o=r.blockRange(),i=o&&Kt(o);return null!=i&&(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)}),Ue),"Mod-Enter":je,Backspace:Ze,"Mod-Backspace":Ze,Delete:Ye,"Mod-Delete":Ye,"Mod-a":function(t,e){return e&&e(t.tr.setSelection(new we(t.doc))),!0}},Qe={"Ctrl-h":Xe.Backspace,"Alt-Backspace":Xe["Mod-Backspace"],"Ctrl-d":Xe.Delete,"Ctrl-Alt-Backspace":Xe["Mod-Delete"],"Alt-Delete":Xe["Mod-Delete"],"Alt-d":Xe["Mod-Delete"]};for(var tr in Xe)Qe[tr]=Xe[tr];var er=("undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?Qe:Xe;function rr(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){
649if(0==i.index(a.depth-1))return!1;var u=r.doc.resolve(a.start-2);l=new j(u,u,a.depth),a.endIndex<a.parent.childCount&&(a=new j(i,r.doc.resolve(s.end(a.depth)),a.depth)),c=!0}var p=Ht(l,t,e,a);return!!p&&(n&&n(function(t,e,r,n,o){for(var i=w.empty,s=r.length-1;s>=0;s--)i=w.from(r[s].type.create(r[s].attrs,i));t.step(new Ut(e.start-(n?2:0),e.end,e.start,e.end,new D(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,u=e.start+r.length-(n?2:0),p=e.parent,h=e.startIndex,f=e.endIndex,d=!0;h<f;h++,d=!1)!d&&Zt(t.doc,u,l)&&(t.split(u,l),u+=2*l),u+=p.child(h).nodeSize;return t}(r.tr,a,p,c,t).scrollIntoView()),!0)}}function nr(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=w.empty,l=o.index(-1)>0,u=o.depth-(l?1:2);u>=o.depth-3;u--)c=w.from(o.node(u).copy(c));c=c.append(w.from(t.createAndFill()));var p=e.tr.replace(o.before(l?null:-1),o.after(-3),new D(c,l?3:2,2));p.setSelection(e.selection.constructor.near(p.doc.resolve(o.pos+(l?3:2)))),r(p.scrollIntoView())}return!0}var h=i.pos==o.end()?a.contentMatchAt(0).defaultType:null,f=e.tr.delete(o.pos,i.pos),d=h&&[null,{type:h}];return!!Zt(f.doc,o.pos,2,d)&&(r&&r(f.split(o.pos,2,d).scrollIntoView()),!0)}}function or(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);i<s&&(o.step(new Ut(i-1,s,i,s,new D(w.from(r.create(null,n.parent.copy())),1,0),1,!0)),n=new j(o.doc.resolve(n.$from.pos),o.doc.resolve(s),n.depth));return e(o.lift(n,Kt(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,u=0==r.startIndex,p=r.endIndex==o.childCount,h=c.node(-1),f=c.index(-1);if(!h.canReplace(f+(u?0:1),f+1,l.content.append(p?w.empty:w.from(o))))return!1;var d=c.pos,m=d+l.nodeSize;return n.step(new Ut(d-(u?1:0),m+(p?1:0),d+1,m-1,new D((u?w.empty:w.from(o.copy(w.empty))).append(p?w.empty:w.from(o.copy(w.empty))),u?0:1,p?0:1),u?0:1)),e(n.scrollIntoView()),!0}(e,r,s)))}}function ir(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 u=l.lastChild&&l.lastChild.type==c.type,p=w.from(u?t.create():null),h=new D(w.from(t.create(null,w.from(c.type.create(null,p)))),u?3:1,0),f=s.start,d=s.end;r(e.tr.step(new Ut(f-(u?3:1),d,f,d,h,1,!0)).scrollIntoView())}return!0}}var sr=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 ar(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 u=o[l].match.exec(c),p=u&&o[l].handler(s,u,e-(u[0].length-n.length),r);if(p)return t.dispatch(p.setMeta(i,{transform:p,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 sr(/--$/,"â");var lr=new sr(/\.\.\.$/,"â¦");new sr(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"â"),new sr(/"$/,"â"),new sr(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"â"),new sr(/'$/,"â");function ur(t,e,r,n){return new sr(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(),u=l&&Ht(l,e,a);if(!u)return null;c.wrap(l,u);var p=c.doc.resolve(i-1).nodeBefore;return p&&p.type==e&&Yt(c.doc,i-1)&&(!n||n(o,p))&&c.join(i-1),c}))}function pr(t,e,r){return new sr(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}))} 650/*! 651 * tiptap-utils v1.13.0 652 * (c) 2021 überdosis GbR (limited liability) 653 * @license MIT 654 */function hr(t){return e=>function(t,e){for(let r=t.depth;r>0;r-=1){const 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 fr(t){return function(e){if(function(t){return t instanceof ke}(e)){const{node:r}=e,{$from:n}=e;if(function(t,e){return Array.isArray(t)&&t.indexOf(e.type)>-1||e.type===t}(t,r))return{node:r,pos:n.pos,depth:n.depth}}}}function dr(t=null,e=null){if(!t||!e)return!1;const r=t.parent.childAfter(t.parentOffset);if(!r.node)return!1;const n=r.node.marks.find(t=>t.type===e);if(!n)return!1;let o=t.index(),i=t.start()+r.offset,s=o+1,a=i+r.node.nodeSize;
654for(;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 mr(t,e,r={}){const n=fr(e)(t.selection)||hr(t=>t.type===e)(t.selection);return Object.keys(r).length&&n?n.node.hasMarkup(e,{...n.node.attrs,...r}):!!n} 655/*! 656 * tiptap-commands v1.17.0 657 * (c) 2021 überdosis GbR (limited liability) 658 * @license MIT 659 */function vr(t,e,r){return new sr(t,(t,n,o,i)=>{const s=r instanceof Function?r(n):r,{tr:a}=t,c=n.length-1;let l=i,u=o;if(n[c]){const r=o+n[0].indexOf(n[c-1]),s=r+n[c-1].length-1,p=r+n[c-1].lastIndexOf(n[c]),h=p+n[c].length;if(function(t,e,r){let n=[];return r.doc.nodesBetween(t,e,(t,e)=>{n=[...n,...t.marks.map(r=>({start:e,end:e+t.nodeSize,mark:r}))]}),n}(o,i,t).filter(t=>{const{excluded:r}=t.mark.type;return r.find(t=>t.name===e.name)}).filter(t=>t.end>r).length)return!1;h<s&&a.delete(h,s),p>r&&a.delete(r,p),u=r,l=u+n[c].length}return a.addMark(u,l,e.create(s)),a.removeStoredMark(e),a})}function gr(t,e,r={}){return(n,o,i)=>mr(n,t,r)?Ke(e)(n,o,i):Ke(t,r)(n,o,i)}function yr(t,e){return t.type===e.nodes.bullet_list||t.type===e.nodes.ordered_list||t.type===e.nodes.todo_list}function kr(t,e){return(r,n,o)=>{const{schema:i,selection:s}=r,{$from:a,$to:c}=s,l=a.blockRange(c);if(!l)return!1;const u=hr(t=>yr(t,i))(s);if(l.depth>=1&&u&&l.depth-u.depth<=1){if(u.node.type===t)return or(e)(r,n,o);if(yr(u.node,i)&&t.validContent(u.node.content)){const{tr:e}=r;return e.setNodeMarkup(u.pos,t),n&&n(e),!1}}return rr(t)(r,n,o)}}function br(t,e={}){return(r,n,o)=>mr(r,t,e)?function(t,e){var r=t.selection,n=r.$from,o=r.$to,i=n.blockRange(o),s=i&&Kt(i);return null!=s&&(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)}(r,n):We(t,e)(r,n,o)}function wr(t,e){return(r,n)=>{const{tr:o,selection:i,doc:s}=r,{ranges:a,empty:c}=i;if(c){const{from:r,to:n}=dr(i.$from,t);s.rangeHasMark(r,n,t)&&o.removeMark(r,n,t),o.addMark(r,n,t.create(e))}else a.forEach(r=>{const{$to:n,$from:i}=r;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)}}var xr=function(){};xr.prototype.append=function(t){return t.length?(t=xr.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},xr.prototype.prepend=function(t){return t.length?xr.from(t).append(this):this},xr.prototype.appendInner=function(t){return new Cr(this,t)},xr.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?xr.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},xr.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},xr.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)},xr.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},xr.from=function(t){return t instanceof xr?t:t&&t.length?new _r(t):xr.empty};var _r=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<=200)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=200)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}(xr);xr.empty=new _r([]);
659var Cr=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}(xr),Sr=xr,Ar=function(t,e){this.items=t,this.eventCount=e};Ar.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=[],u=[];return this.items.forEach((function(t,e){if(!t.step)return n||(n=r.remapping(i,e+1),o=n.maps.length),o--,void u.push(t);if(n){u.push(new Mr(t.map));var p,h=t.step.map(n.slice(o));h&&c.maybeStep(h).doc&&(p=c.mapping.maps[c.mapping.maps.length-1],l.push(new Mr(p,null,null,l.length+u.length))),o--,p&&n.appendMap(p,o)}else c.maybeStep(t.step);return t.selection?(s=n?t.selection.map(n.slice(o)):t.selection,a=new Ar(r.items.slice(0,i).append(u.reverse().concat(l)),r.eventCount-1),!1):void 0}),this.items.length,0),{remaining:a,transform:c,selection:s}},Ar.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,u=t.steps[c].invert(t.docs[c]),p=new Mr(t.mapping.maps[c],u,e);(l=a&&a.merge(p))&&(p=l,c?o.pop():s=s.slice(0,s.length-1)),o.push(p),e&&(i++,e=null),n||(a=p)}var h,f,d,m=i-r.depth;return m>
659Or&&(f=m,(h=s).forEach((function(t,e){if(t.selection&&0==f--)return d=e,!1})),s=h.slice(d),i-=m),new Ar(s.append(o),i)},Ar.prototype.remapping=function(t,e){var r=new Rt;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},Ar.prototype.addMaps=function(t){return 0==this.eventCount?this:new Ar(this.items.append(t.map((function(t){return new Mr(t)}))),this.eventCount)},Ar.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]),u=e.selection&&e.selection.map(o.slice(a+1,n));u&&s++,r.push(new Mr(c,l,u))}else r.push(new Mr(c))}}),n);for(var c=[],l=e;l<i;l++)c.push(new Mr(o.maps[l]));var u=this.items.slice(0,n).append(c).append(r),p=new Ar(u,s);return p.emptyItemCount()>500&&(p=p.compress(this.items.length-r.length)),p},Ar.prototype.emptyItemCount=function(){var t=0;return this.items.forEach((function(e){e.step||t++})),t},Ar.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 u,p=new Mr(c.invert(),a,l),h=n.length-1;(u=n.length&&n[h].merge(p))?n[h]=u:n.push(p)}}else i.map&&r--}),this.items.length,0),new Ar(Sr.from(n.reverse()),o)},Ar.empty=new Ar(Sr.empty,0);var Mr=function(t,e,r,n){this.map=t,this.step=e,this.selection=r,this.mirrorOffset=n};Mr.prototype.merge=function(t){if(this.step&&t.step&&!t.selection){var e=t.step.merge(this.step);if(e)return new Mr(e.getMap().invert(),e,this.selection)}};var Dr=function(t,e,r,n){this.done=t,this.undone=e,this.prevRanges=r,this.prevTime=n},Or=20;function Er(t){var e=[];return t.forEach((function(t,r,n,o){return e.push(n,o)})),e}function Tr(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 Nr(t,e,r,n){var o=Rr(e),i=Fr.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 Dr(n?c:s.remaining,n?s.remaining:c,null,0);r(s.transform.setSelection(a).setMeta(Fr,{redo:n,historyState:l}).scrollIntoView())}}var Ir=!1,zr=null;function Rr(t){var e=t.plugins;if(zr!=e){Ir=!1,zr=e;for(var r=0;r<e.length;r++)if(e[r].spec.historyPreserveItems){Ir=!0;break}}return Ir}var Fr=new Fe("history"),qr=new Fe("closeHistory");function Br(t){return t={depth:t&&t.depth||100,newGroupDelay:t&&t.newGroupDelay||500},new Ie({key:Fr,state:{init:function(){return new Dr(Ar.empty,Ar.empty,null,0)},apply:function(e,r,n){return function(t,e,r,n){var o,i=r.getMeta(Fr);if(i)return i.historyState;r.getMeta(qr)&&(t=new Dr(t.done,t.undone,null,0));var s=r.getMeta("appendedTransaction");if(0==r.steps.length)return t;if(s&&s.getMeta(Fr))return s.getMeta(Fr).redo?new Dr(t.done.addTransform(r,null,n,Rr(e)),t.undone,Er(r.mapping.maps[r.steps.length-1]),t.prevTime):new Dr(t.done,t.undone.addTransform(r,null,n,Rr(e)),null,t.prevTime);if(!1===r.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=r.getMeta("rebased"))?new Dr(t.done.rebased(r,o),t.undone.rebased(r,o),Tr(t.prevRanges,r.mapping),t.prevTime):new Dr(t.done.addMaps(r.mapping.maps),t.undone.addMaps(r.mapping.maps),Tr(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?Tr(t.prevRanges,r.mapping):Er(r.mapping.maps[r.steps.length-1]);return new Dr(t.done.addTransform(r,a?e.selection.getBookmark():null,n,Rr(e)),Ar.empty,c,r.time)}(r,n,e,t)}},config:t})}function $r(t,e){var r=Fr.getState(t);return!(!r||0==r.done.eventCount)&&(e&&Nr(r,t,e,!1),!0)}function Pr(t,e){var r=Fr.getState(t);return!(!r||0==r.undone.eventCount)&&(e&&Nr(r,t,e,!0),!0)}for(var Lr={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"},Vr={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"},jr="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),Ur="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Jr="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Wr="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Kr="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Hr=jr&&(Wr||+jr[1]<57)||Jr&&Wr,Gr=0;Gr<10;Gr++)Lr[48+Gr]=Lr[96+Gr]=String(Gr);for(Gr=1;Gr<=24;Gr++)Lr[Gr+111]="F"+Gr;for(Gr=65;Gr<=90;Gr++)Lr[Gr]=String.fromCharCode(Gr+32),Vr[Gr]=String.fromCharCode(Gr);for(var Zr in Lr)Vr.hasOwnProperty(Zr)||(Vr[Zr]=Lr[Zr]);var Yr="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function Xr(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);Yr?o=!0:r=!0}}return e&&(s="Alt-"+s),r&&(s="Ctrl-"+s),o&&(s="Meta-"+s),n&&(s="Shift-"+s),s}
659function Qr(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 tn(t){return new Ie({props:{handleKeyDown:en(t)}})}function en(t){var e=function(t){var e=Object.create(null);for(var r in t)e[Xr(r)]=t[r];return e}(t);return function(t,r){var n,o=function(t){var e=!(Hr&&(t.ctrlKey||t.altKey||t.metaKey)||(Ur||Kr)&&t.shiftKey&&t.key&&1==t.key.length)&&t.key||(t.shiftKey?Vr:Lr)[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[Qr(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=Lr[r.keyCode])&&n!=o){var a=e[Qr(n,r,!0)];if(a&&a(t.state,t.dispatch,t))return!0}else if(i&&r.shiftKey){var c=e[Qr(o,r,!0)];if(c&&c(t.state,t.dispatch,t))return!0}return!1}}var rn={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var nn=/Edge\/(\d+)/.exec(navigator.userAgent),on=/MSIE \d/.test(navigator.userAgent),sn=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);rn.mac=/Mac/.test(navigator.platform);var an=rn.ie=!!(on||sn||nn);rn.ie_version=on?document.documentMode||6:sn?+sn[1]:nn?+nn[1]:null,rn.gecko=!an&&/gecko\/(\d+)/i.test(navigator.userAgent),rn.gecko_version=rn.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var cn=!an&&/Chrome\/(\d+)/.exec(navigator.userAgent);rn.chrome=!!cn,rn.chrome_version=cn&&+cn[1],rn.safari=!an&&/Apple Computer/.test(navigator.vendor),rn.ios=rn.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),rn.android=/Android \d/.test(navigator.userAgent),rn.webkit="webkitFontSmoothing"in document.documentElement.style,rn.webkit_version=rn.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var ln=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},un=function(t){var e=t.parentNode;return e&&11==e.nodeType?e.host:e},pn=null,hn=function(t,e,r){var n=pn||(pn=document.createRange());return n.setEnd(t,null==r?t.nodeValue.length:r),n.setStart(t,e||0),n},fn=function(t,e,r,n){return r&&(mn(t,e,r,n,-1)||mn(t,e,r,n,1))},dn=/^(img|br|input|textarea|hr)$/i;function mn(t,e,r,n,o){for(;;){if(t==r&&e==n)return!0;if(e==(o<0?0:vn(t))){var i=t.parentNode;if(1!=i.nodeType||gn(t)||dn.test(t.nodeName)||"false"==t.contentEditable)return!1;e=ln(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?vn(t):0}}}function vn(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function gn(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 yn=function(t){var e=t.isCollapsed;return e&&rn.chrome&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function kn(t,e){var r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=t,r.key=r.code=e,r}function bn(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function wn(t,e){return"number"==typeof t?t:t[e]}function xn(t){var e=t.getBoundingClientRect();return{left:e.left,right:e.left+t.clientWidth,top:e.top,bottom:e.top+t.clientHeight}}function _n(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=un(s))if(1==s.nodeType){var a=s==i.body||1!=s.nodeType,c=a?bn(i):xn(s),l=0,u=0;if(e.top<c.top+wn(n,"top")?u=-(c.top-e.top+wn(o,"top")):e.bottom>c.bottom-wn(n,"bottom")&&(u=e.bottom-c.bottom+wn(o,"bottom")),e.left<c.left+wn(n,"left")?l=-(c.left-e.left+wn(o,"left")):e.right>c.right-wn(n,"right")&&(l=e.right-c.right+wn(o,"right")),l||u)if(a)i.defaultView.scrollBy(l,u);else{var p=s.scrollLeft,h=s.scrollTop;u&&(s.scrollTop+=u),l&&(s.scrollLeft+=l);var f=s.scrollLeft-p,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 Cn(t){for(var e=[],r=t.ownerDocument;t&&(e.push({dom:t,top:t.scrollTop,left:t.scrollLeft}),t!=r);t=un(t));return e}function Sn(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 An=null;function Mn(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 u=void 0;if(1==c.nodeType)u=c.getClientRects();else{if(3!=c.nodeType)continue;u=hn(c).getClientRects()}for(var p=0;p<u.length;p++){var h=u[p];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)}}
659return 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=En(n,1);if(i.top!=i.bottom&&Dn(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}:Mn(r,n)}function Dn(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function On(t,e){var r,n,o,i,s=t.root;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,u=s.elementFromPoint(e.left,e.top+1);if(!u||!t.dom.contains(1!=u.nodeType?u.parentNode:u)){var p=t.dom.getBoundingClientRect();if(!Dn(e,p))return null;if(!(u=function t(e,r,n){var o=e.childNodes.length;if(o&&n.top<n.bottom)for(var i=Math.max(0,Math.min(o-1,Math.floor(o*(r.top-n.top)/(n.bottom-n.top))-2)),s=i;;){var a=e.childNodes[s];if(1==a.nodeType)for(var c=a.getClientRects(),l=0;l<c.length;l++){var u=c[l];if(Dn(r,u))return t(a,r,u)}if((s=(s+1)%o)==i)break}return e}(t.dom,e,p)))return null}if(rn.safari&&u.draggable&&(o=i=null),u=function(t,e){var r=t.parentNode;return r&&/^li$/i.test(r.nodeName)&&e.left<t.getBoundingClientRect().left?r:t}(u,e),o){if(rn.gecko&&1==o.nodeType&&(i=Math.min(i,o.childNodes.length))<o.childNodes.length){var h,f=o.childNodes[i];"IMG"==f.nodeName&&(h=f.getBoundingClientRect()).right<=e.left&&h.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=Mn(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,u,e));var d=t.docView.nearestDesc(u,!0);return{pos:l,inside:d?d.posAtStart-d.border:-1}}function En(t,e){var r=t.getClientRects();return r.length?r[e<0?0:r.length-1]:t.getBoundingClientRect()}var Tn=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Nn(t,e,r){var n=t.docView.domFromPos(e,r<0?-1:1),o=n.node,i=n.offset,s=rn.webkit||rn.gecko;if(3==o.nodeType){if(!s||!Tn.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++,In(En(hn(o,a,c),l),l<0)}var u=En(hn(o,i,i),r);if(rn.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var p=En(hn(o,i-1,i-1),-1);if(p.top==u.top){var h=En(hn(o,i,i+1),-1);if(h.top!=u.top)return In(h,h.left<p.left)}}return u}if(!t.state.doc.resolve(e).parent.inlineContent){if(i&&(r<0||i==vn(o))){var f=o.childNodes[i-1];if(1==f.nodeType)return zn(f.getBoundingClientRect(),!1)}if(i<vn(o)){var d=o.childNodes[i];if(1==d.nodeType)return zn(d.getBoundingClientRect(),!0)}return zn(o.getBoundingClientRect(),r>=0)}if(i&&(r<0||i==vn(o))){var m=o.childNodes[i-1],v=3==m.nodeType?hn(m,vn(m)-(s?0:1)):1!=m.nodeType||"BR"==m.nodeName&&m.nextSibling?null:m;if(v)return In(En(v,1),!1)}if(i<vn(o)){var g=o.childNodes[i],y=3==g.nodeType?hn(g,0,s?0:1):1==g.nodeType?g:null;if(y)return In(En(y,-1),!0)}return In(En(3==o.nodeType?hn(o):o,-r),r>=0)}function In(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 zn(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 Rn(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 Fn=/[\u0590-\u08ac]/;var qn=null,Bn=null,$n=!1;function Pn(t,e,r){return qn==e&&Bn==r?$n:(qn=e,Bn=r,$n="up"==r||"down"==r?function(t,e,r){var n=e.selection,o="up"==r?n.$from:n.$to;return Rn(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=Nn(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=hn(s,0,s.nodeValue.length).getClientRects()}for(var c=0;c<a.length;c++){var l=a[c];if(l.bottom>l.top&&("up"==r?l.bottom<i.top+1:l.top>i.bottom-1))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=getSelection();return Fn.test(n.parent.textContent)&&a.modify?Rn(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;
659return a.removeAllRanges(),a.addRange(e),null!=s&&(a.caretBidiLevel=s),c})):"left"==r||"backward"==r?i:s}(t,e,r))}var Ln=function(t,e,r,n){this.parent=t,this.children=e,this.dom=r,r.pmViewDesc=this,this.contentDOM=n,this.dirty=0},Vn={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0}};Ln.prototype.matchesWidget=function(){return!1},Ln.prototype.matchesMark=function(){return!1},Ln.prototype.matchesNode=function(){return!1},Ln.prototype.matchesHack=function(){return!1},Vn.beforePosition.get=function(){return!1},Ln.prototype.parseRule=function(){return null},Ln.prototype.stopEvent=function(){return!1},Vn.size.get=function(){for(var t=0,e=0;e<this.children.length;e++)t+=this.children[e].size;return t},Vn.border.get=function(){return 0},Ln.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()},Ln.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}},Vn.posBefore.get=function(){return this.parent.posBeforeChild(this)},Vn.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},Vn.posAfter.get=function(){return this.posBefore+this.size},Vn.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},Ln.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(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},Ln.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}}},Ln.prototype.getDesc=function(t){for(var e=t.pmViewDesc,r=e;r;r=r.parent)if(r==this)return e},Ln.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},Ln.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}},Ln.prototype.domFromPos=function(t,e){if(!this.contentDOM)return{node:this.dom,offset:0};for(var r=0,n=0,o=!0;;n++,o=!1){for(;n<this.children.length&&(this.children[n].beforePosition||this.children[n].dom.parentNode!=this.contentDOM);)r+=this.children[n++].size;var i=n==this.children.length?null:this.children[n];if(r==t&&(0==e||!i||!i.size||i.border||e<0&&o)||i&&i.domAtom&&t<r+i.size)return{node:this.contentDOM,offset:i?ln(i.dom):this.contentDOM.childNodes.length};if(!i)throw new Error("Invalid position "+t);var s=r+i.size;if(!i.domAtom&&(e<0&&!i.border?s>=t:s>t))return i.domFromPos(t-r-i.border,e);r=s}},Ln.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 u=s;u>0;u--){var p=this.children[u-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){n=ln(p.dom)+1;break}t-=p.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=l
659n(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}},Ln.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)},Ln.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]},Ln.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 u=this.domFromPos(t,t?-1:1),p=e==t?u:this.domFromPos(e,e?-1:1),h=r.getSelection(),f=!1;if((rn.gecko||rn.safari)&&t==e){var d=u.node,m=u.offset;if(3==d.nodeType)(f=m&&"\n"==d.nodeValue[m-1])&&m==d.nodeValue.length&&d.nextSibling&&"BR"==d.nextSibling.nodeName&&(u=p={node:d.parentNode,offset:ln(d)+1});else{var v=d.childNodes[m-1];f=v&&("BR"==v.nodeName||"false"==v.contentEditable)}}if(n||f&&rn.safari||!fn(u.node,u.offset,h.anchorNode,h.anchorOffset)||!fn(p.node,p.offset,h.focusNode,h.focusOffset)){var g=!1;if((h.extend||t==e)&&!f){h.collapse(u.node,u.offset);try{t!=e&&h.extend(p.node,p.offset),g=!0}catch(t){if(!(t instanceof DOMException))throw t}}if(!g){if(t>e){var y=u;u=p,p=y}var k=document.createRange();k.setEnd(p.node,p.offset),k.setStart(u.node,u.offset),h.removeAllRanges(),h.addRange(k)}}},Ln.prototype.ignoreMutation=function(t){return!this.contentDOM&&"selection"!=t.type},Vn.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Ln.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=3}r=i}this.dirty=2},Ln.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)}},Vn.domAtom.get=function(){return!1},Object.defineProperties(Ln.prototype,Vn);var jn=[],Un=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,jn,s,null),this.widget=r,i=this}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={beforePosition:{configurable:!0},domAtom:{configurable:!0}};return r.beforePosition.get=function(){return this.widget.type.side<0},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},r.domAtom.get=function(){return!0},Object.defineProperties(e.prototype,r),e}(Ln),Jn=function(t){function e(e,r,n,o){t.call(this,e,jn,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}(Ln),Wn=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.n
659ame],s=i&&i(r,o,n);return s&&s.dom||(s=Dt.renderSpec(document,r.type.spec.toDOM(r,n))),new e(t,r,s.dom,s.contentDOM||s.dom)},e.prototype.parseRule=function(){return{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=co(i,r,s,n)),t>0&&(i=co(i,0,t,n));for(var a=0;a<i.length;a++)i[a].parent=o;return o.children=i,o},e}(Ln),Kn=function(t){function e(e,r,n,o,i,s,a,c,l){t.call(this,e,r.isLeaf?jn:[],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.name],u=l&&l(r,i,(function(){return c?c.parent?c.parent.posBeforeChild(c):void 0:s}),n),p=u&&u.dom,h=u&&u.contentDOM;if(r.isText)if(p){if(3!=p.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else p=document.createTextNode(r.text);else p||(p=(a=Dt.renderSpec(document,r.type.spec.toDOM(r))).dom,h=a.contentDOM);h||r.isText||"BR"==p.nodeName||(p.hasAttribute("contenteditable")||(p.contentEditable=!1),r.type.spec.draggable&&(p.draggable=!0));var f=p;return p=no(p,n,r),u?c=new Yn(t,r,n,o,p,h,f,u,i,s+1):r.isText?new Gn(t,r,n,o,p,f,i):new e(t,r,n,o,p,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 this.node.type.spec.code&&(e.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?e.contentElement=this.contentDOM:e.getContent=function(){return t.contentDOM?w.empty:t.node.content},e},e.prototype.matchesNode=function(t,e,r){return 0==this.dirty&&t.eq(this.node)&&oo(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=n&&t.composing&&this.localCompositionNode(t,e),s=new so(this,i&&i.node);!function(t,e,r,n){var o=e.locals(t),i=0;if(0==o.length){for(var s=0;s<t.childCount;s++){var a=t.child(s);n(a,o,e.forChild(i,a),s),i+=a.nodeSize}return}for(var c=0,l=[],u=null,p=0;;){if(c<o.length&&o[c].to==i){for(var h=o[c++],f=void 0;c<o.length&&o[c].to==i;)(f||(f=[h])).push(o[c++]);if(f){f.sort(ao);for(var d=0;d<f.length;d++)r(f[d],p,!!u)}else r(h,p,!!u)}var m=void 0,v=void 0;if(u)v=-1,m=u,u=null;else{if(!(p<t.childCount))break;v=p,m=t.child(p++)}for(var g=0;g<l.length;g++)l[g].to<=i&&l.splice(g--,1);for(;c<o.length&&o[c].from<=i&&o[c].to>i;)l.push(o[c++]);var y=i+m.nodeSize;if(m.isText){var k=y;c<o.length&&o[c].from<k&&(k=o[c].from);for(var b=0;b<l.length;b++)l[b].to<k&&(k=l[b].to);k<y&&(u=m.cut(k-i),m=m.cut(0,k-i),y=k,v=-1)}var w=l.length?m.isInline&&!m.isLeaf?l.filter((function(t){return!t.inline})):l.slice():jn;n(m,w,e.forChild(i,m),v),i=y}}(this.node,this.innerDeco,(function(e,i,a){e.spec.marks?s.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!a&&s.syncToMarks(i==r.node.childCount?A.none:r.node.child(i).marks,n,t),s.placeWidget(e,t,o)}),(function(e,r,i,a){s.syncToMarks(e.marks,n,t),s.findNodeMatch(e,r,i,a)||s.updateNextNode(e,r,i,t,a)||s.addNode(e,r,i,t,o),o+=e.nodeSize})),s.syncToMarks(jn,n,t),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||2==this.dirty)&&(i&&this.protectLocalComposition(t,i),function t(e,r,n){for(var o=e.firstChild,i=!1,s=0;s<r.length;s++){var a=r[s],c=a.dom;if(c.parentNode==e){for(;c!=o;)o=io(o),i=!0;o=o.nextSibling}else i=!0,e.insertBefore(c,o);if(a instanceof Wn){var l=o?o.previousSibling:e.lastChild;t(a.contentDOM,a.children,n),o=l?l.nextSibling:e.firstChild}}for(;o;)o=io(o),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}(this.contentDOM,this.children,t),rn.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.localCompositionNode=function(t,e){var r=t.state.selection,n=r.from,o=r.to;if(!(!(t.state.selection instanceof ge)||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];t=t.childNodes[e-1],e=vn(t)}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)){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 u=c.lastIndexOf(e,n-a);if(u>=0&&u+e.length+a>=r)return a+u}}}return-1}(this.node.content,a,n-e,o-e);return c<0?null:{node:s,pos:c,text:a}}}},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 Jn(this,i,r,o);t.compositionNodes.push(s),this.children=co(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(!oo(t,this.outerDeco)){var e=1!=this.nodeDOM.nodeType,r=this.dom;this.dom=eo(this.dom,this.nodeDOM,to(this.outerDeco,this.node,e),to(t,this.node,e)),this.dom!=r&&(r.pmVie
659wDesc=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}(Ln);function Hn(t,e,r,n,o){return no(n,e,t),new Kn(null,t,e,r,n,n,n,o,0)}var Gn=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)},r.domAtom.get=function(){return!1},Object.defineProperties(e.prototype,r),e}(Kn),Zn=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}};return e.prototype.parseRule=function(){return{ignore:!0}},e.prototype.matchesHack=function(){return 0==this.dirty},r.domAtom.get=function(){return!0},Object.defineProperties(e.prototype,r),e}(Ln),Yn=function(t){function e(e,r,n,o,i,s,a,c,l,u){t.call(this,e,r,n,o,i,s,a,l,u),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);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}(Kn);function Xn(t){t&&(this.nodeName=t)}Xn.prototype=Object.create(null);var Qn=[new Xn];function to(t,e,r){if(0==t.length)return Qn;for(var n=r?Qn[0]:new Xn,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 Xn(s.nodeName)),s){var c=s[a];null!=c&&(r&&1==o.length&&o.push(n=new Xn(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 eo(t,e,r,n){if(r==Qn&&n==Qn)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=Qn[0]),o=c}ro(o,a||Qn[0],s)}return o}function ro(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(" "):jn,s=r.class?r.class.split(" "):jn,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])}if(e.style!=r.style){if(e.style)for(var l,u=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;l=u.exec(e.style);)t.style.removeProperty(l[1]);r.style&&(t.style.cssText+=r.style)}}function no(t,e,r){return eo(t,t,Qn,to(e,r,1!=t.nodeType))}function oo(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 io(t){var e=t.nextSibling;return t.parentNode.removeChild(t),e}var so=function(t,e){this.top=t,this.lock=e,this.index=0,this.stack=[],this.changed=!1;var r=function(t,e){for(var r=[],n=t.childCount,o=e.length-1;n>0&&o>=0;o--){var i=e[o],s=i.node;if(s){if(s!=t.child(n-1))break;r.push(i),--n}}return{nodes:r.reverse(),offset:n}}(t.node.content,t.children);this.preMatched=r.nodes,this.preMatchOffset=r.offset};function ao(t,e){return t.type.side-e.type.side}function co(t,e,r,n,o){for(var i=[],s=0,a=0;s<t.length;s++){var c=t[s],l=a,u=a+=c.size;l>=r||u<=e?i.push(c):(l<e&&i.push(c.slice(0,e-l,n)),o&&(i.push(o),o=null),u>r&&i.push(c.slice(r-l,c.size,n)))}return i}function lo(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.focu
659sOffset);if(s<0)return null;var a,c,l=n.resolve(s);if(yn(r)){for(a=l;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&ke.isSelectable(o.node)&&o.parent&&(!o.node.isInline||!function(t,e,r){for(var n=0==e,o=e==vn(t);n||o;){if(t==r)return!0;var i=ln(t);if(!(t=t.parentNode))return!1;n=n&&0==i,o=o&&i==vn(t)}}(r.focusNode,r.focusOffset,o.dom))){var u=o.posBefore;c=new ke(s==u?l:n.resolve(u))}}else{var p=t.docView.posFromDOM(r.anchorNode,r.anchorOffset);if(p<0)return null;a=n.resolve(p)}c||(c=yo(t,a,l,"pointer"==e||t.state.selection.head<l.pos&&!i?1:-1));return c}function uo(t,e){var r=t.state.selection;if(vo(t,r),t.editable?t.hasFocus():ko(t)&&document.activeElement&&document.activeElement.contains(t.dom)){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,ln(n)+1):r.setEnd(n,0);r.collapse(!1),e.removeAllRanges(),e.addRange(r),!o&&!t.state.selection.visible&&rn.ie&&rn.ie_version<=11&&(n.disabled=!0,n.disabled=!1)}(t);else{var n,o,i=r.anchor,s=r.head;!po||r instanceof ge||(r.$from.parent.inlineContent||(n=ho(t,r.from)),r.empty||r.$from.parent.inlineContent||(o=ho(t,r.to))),t.docView.setSelection(i,s,t.root,e),po&&(n&&mo(n),o&&mo(o)),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),t.dom.classList.remove("ProseMirror-hideselection"))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}so.prototype.getPreMatch=function(t){return t>=this.preMatchOffset?this.preMatched[t-this.preMatchOffset]:null},so.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}},so.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},so.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=Wn.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++}},so.prototype.findNodeMatch=function(t,e,r,n){var o=-1,i=n<0?void 0:this.getPreMatch(n),s=this.top.children;if(i&&i.matchesNode(t,e,r))o=s.indexOf(i);else for(var a=this.index,c=Math.min(s.length,a+5);a<c;a++){var l=s[a];if(l.matchesNode(t,e,r)&&this.preMatched.indexOf(l)<0){o=a;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)},so.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 Kn){var a=this.preMatched.indexOf(s);if(a>-1&&a+this.preMatchOffset!=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&&oo(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},so.prototype.addNode=function(t,e,r,n,o){this.top.children.splice(this.index++,0,Kn.create(this.top,t,e,r,n,o)),this.changed=!0},so.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 Un(this.top,t,e,r);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++},so.prototype.addTextblockHacks=function(){for(var t=this.top.children[this.index-1];t instanceof Wn;)t=t.children[t.children.length-1];
659if(!t||!(t instanceof Gn)||/\n$/.test(t.node.text))if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack())this.index++;else{var e=document.createElement("br");this.top.children.splice(this.index++,0,new Zn(this.top,jn,e,null)),this.changed=!0}};var po=rn.safari||rn.chrome&&rn.chrome_version<63;function ho(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(rn.safari&&i&&"false"==i.contentEditable)return fo(i);if(!(i&&"false"!=i.contentEditable||s&&"false"!=s.contentEditable)){if(i)return fo(i);if(s)return fo(s)}}function fo(t){return t.contentEditable="true",rn.safari&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function mo(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function vo(t,e){if(e instanceof ke){var r=t.docView.descAt(e.from);r!=t.lastSelectedViewDesc&&(go(t),r&&r.selectNode(),t.lastSelectedViewDesc=r)}else go(t)}function go(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=null)}function yo(t,e,r,n){return t.someProp("createSelectionBetween",(function(n){return n(t,e,r)}))||ge.between(e,r,n)}function ko(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 bo(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&&de.findFrom(s,e)}function wo(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function xo(t,e,r){var n=t.state.selection;if(!(n instanceof ge)){if(n instanceof ke&&n.node.isInline)return wo(t,new ge(e>0?n.$to:n.$from));var o=bo(t.state,e);return!!o&&wo(t,o)}if(!n.empty||r.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){var i=bo(t.state,e);return!!(i&&i instanceof ke)&&wo(t,i)}if(!(rn.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)&&(ke.isSelectable(c)?wo(t,new ke(e<0?t.state.doc.resolve(a.pos-c.nodeSize):a)):!!rn.webkit&&wo(t,new ge(t.state.doc.resolve(e<0?l:l+c.nodeSize))))}}function _o(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Co(t){var e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function So(t){var e=t.root.getSelection(),r=e.focusNode,n=e.focusOffset;if(r){var o,i,s=!1;for(rn.gecko&&1==r.nodeType&&n<_o(r)&&Co(r.childNodes[n])&&(s=!0);;)if(n>0){if(1!=r.nodeType)break;var a=r.childNodes[n-1];if(Co(a))o=r,i=--n;else{if(3!=a.nodeType)break;n=(r=a).nodeValue.length}}else{if(Mo(r))break;for(var c=r.previousSibling;c&&Co(c);)o=r.parentNode,i=ln(c),c=c.previousSibling;if(c)n=_o(r=c);else{if((r=r.parentNode)==t.dom)break;n=0}}s?Do(t,e,r,n):o&&Do(t,e,o,i)}}function Ao(t){var e=t.root.getSelection(),r=e.focusNode,n=e.focusOffset;if(r){for(var o,i,s=_o(r);;)if(n<s){if(1!=r.nodeType)break;if(!Co(r.childNodes[n]))break;o=r,i=++n}else{if(Mo(r))break;for(var a=r.nextSibling;a&&Co(a);)o=a.parentNode,i=ln(a)+1,a=a.nextSibling;if(a)n=0,s=_o(r=a);else{if((r=r.parentNode)==t.dom)break;n=s=0}}o&&Do(t,e,o,i)}}function Mo(t){var e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Do(t,e,r,n){if(yn(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&&uo(t)}),50)}function Oo(t,e,r){var n=t.state.selection;if(n instanceof ge&&!n.empty||r.indexOf("s")>-1)return!1;if(rn.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=bo(t.state,e);if(s&&s instanceof ke)return wo(t,s)}if(!o.parent.inlineContent){var a=de.findFrom(e<0?o:i,e);return!a||wo(t,a)}return!1}function Eo(t,e){if(!(t.state.selection instanceof ge))return!0;var r=t.state.selection,n=r.$head,o=r.$anchor,i=r.empty;if(!n.sameParent(o))return!0;
659if(!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 To(t,e,r){t.domObserver.stop(),e.contentEditable=r,t.domObserver.start()}function No(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||rn.mac&&72==r&&"c"==n?Eo(t,-1)||So(t):46==r||rn.mac&&68==r&&"c"==n?Eo(t,1)||Ao(t):13==r||27==r||(37==r?xo(t,-1,n)||So(t):39==r?xo(t,1,n)||Ao(t):38==r?Oo(t,-1,n)||So(t):40==r?function(t){if(rn.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;To(t,o,!0),setTimeout((function(){return To(t,o,!1)}),20)}}}(t)||Oo(t,1,n)||Ao(t):n==(rn.mac?"m":"c")&&(66==r||73==r||89==r||90==r))}function Io(t){var e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(rn.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||rn.safari&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0}}function zo(t,e,r,n,o){if(e<0){var i=t.lastSelectionTime>Date.now()-50?t.lastSelectionOrigin:null,s=lo(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 u=t.state.selection,p=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(),u=null,p=l.anchorNode;if(p&&t.dom.contains(1==p.nodeType?p:p.parentNode)&&(u=[{node:p,offset:l.anchorOffset}],yn(l)||u.push({node:l.focusNode,offset:l.focusOffset})),rn.chrome&&8===t.lastKeyCode)for(var h=s;h>i;h--){var f=o.childNodes[h-1],d=f.pmViewDesc;if("BR"==f.nodeType&&!d){s=h;break}if(!d||d.size)break}var m=t.state.doc,v=t.someProp("domParser")||gt.fromSchema(t.state.schema),g=m.resolve(a),y=null,k=v.parse(o,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:i,to:s,preserveWhitespace:!g.parent.type.spec.code||"full",editableContent:!0,findPositions:u,ruleFromNode:Io,context:g});if(u&&null!=u[0].pos){var b=u[0].pos,w=u[1]&&u[1].pos;null==w&&(w=b),y={anchor:b+a,head:w+a}}return{doc:k,sel:y,from:a,to:c}}(t,e,r);if(rn.chrome&&t.cursorWrapper&&p.sel&&p.sel.anchor==t.cursorWrapper.deco.from){var h=t.cursorWrapper.deco.type.toDOM.nextSibling,f=h&&h.nodeValue?h.nodeValue.length:1;p.sel={anchor:p.sel.anchor+f,head:p.sel.anchor+f}}var d,m,v=t.state.doc,g=v.slice(p.from,p.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;if("end"==o){var l=Math.max(0,i-Math.min(a,c));n-=a+l-i}if(a<i&&t.size<e.size){c=(i-=n<=i&&n>=a?i-n:0)+(c-a),a=i}else if(c<i){a=(i-=n<=i&&n>=c?i-n:0)+(a-c),c=i}return{start:i,endA:a,endB:c}}(g.content,p.doc.content,p.from,d,m);if(!y){if(!(n&&u instanceof ge&&!u.empty&&u.$head.sameParent(u.$anchor))||t.composing||p.sel&&p.sel.anchor!=p.sel.head){if(rn.ios&&t.lastIOSEnter>Date.now()-225&&o.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName}))&&t.someProp("handleKeyDown",(function(e){return e(t,kn(13,"Enter"))})))return void(t.lastIOSEnter=0);if(p.sel){var k=Ro(t,t.state.doc,p.sel);k&&!k.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(k))}return}y={start:u.from,endA:u.to,endB:u.to}}t.domChangeCount++,t.state.selection.from<t.state.selection.to&&y.start==y.endB&&t.state.selection instanceof ge&&(y.start>t.state.selection.from&&y.start<=t.state.selection.from+2?y.start=t.state.selection.from:y.endA<t.state.selection.to&&y.endA>=t.state.selection.to-2&&(y.endB+=t.state.selection.to-y.endA,y.endA=t.state.selection.to)),rn.ie&&rn.ie_version<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>p.from&&" Â "==p.doc.textBetween(y.start-p.from-1,y.start-p.from+1)&&(y.start--,y.endA--,y.endB--);var b,x=p.doc.resolveNoCache(y.start-p.from),_=p.doc.resolveNoCache(y.endB-p.from),C=x.sameParent(_)&&x.parent.inlineContent;if((rn.ios&&t.lastIOSEnter>Date.now()-225&&(!C||o.some((function(t){return"DIV"==t.nodeName||"P"==t.nodeName})))||!C&&x.pos<p.doc.content.size&&(b=de.findFrom(p.doc.resolve(x.pos+1),1,!0))&&b.head==_.pos)&&t.someProp("handleKeyDown",(function(e){return e(t,kn(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||Fo(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(Fo(i,!0,!0));if(!s.parent.isTextblock||s.pos>
659r||Fo(s,!0,!1)<r)return!1;return n.parent.content.cut(n.parentOffset).eq(s.parent.content)}(v,y.start,y.endA,x,_)&&t.someProp("handleKeyDown",(function(e){return e(t,kn(8,"Backspace"))})))rn.android&&rn.chrome&&t.domObserver.suppressSelectionUpdates();else{rn.android&&!C&&x.start()!=_.start()&&0==_.parentOffset&&x.depth==_.depth&&p.sel&&p.sel.anchor==p.sel.head&&p.sel.head==y.endA&&(y.endB-=2,_=p.doc.resolveNoCache(y.endB-p.from),setTimeout((function(){t.someProp("handleKeyDown",(function(e){return e(t,kn(13,"Enter"))}))}),20));var S,A,M,D,O=y.start,E=y.endA;if(C)if(x.pos==_.pos)rn.ie&&rn.ie_version<=11&&0==x.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((function(){return uo(t)}),20)),S=t.state.tr.delete(O,E),A=v.resolve(y.start).marksAcross(v.resolve(y.endA));else if(y.endA==y.endB&&(D=v.resolve(y.start))&&(M=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 u=0;u<i.length;u++)c=i[u].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 p=[],h=0;h<e.childCount;h++)p.push(o(e.child(h)));if(w.from(p).eq(t))return{mark:n,type:r}}(x.parent.content.cut(x.parentOffset,_.parentOffset),D.parent.content.cut(D.parentOffset,y.endA-D.start()))))S=t.state.tr,"add"==M.type?S.addMark(O,E,M.mark):S.removeMark(O,E,M.mark);else if(x.parent.child(x.index()).isText&&x.index()==_.index()-(_.textOffset?0:1)){var T=x.parent.textBetween(x.parentOffset,_.parentOffset);if(t.someProp("handleTextInput",(function(e){return e(t,O,E,T)})))return;S=t.state.tr.insertText(T,O,E)}if(S||(S=t.state.tr.replace(O,E,p.doc.slice(y.start-p.from,y.endB-p.from))),p.sel){var N=Ro(t,S.doc,p.sel);N&&!(rn.chrome&&rn.android&&t.composing&&N.empty&&(N.head==O||N.head==S.mapping.map(E)-1)||rn.ie&&N.empty&&N.head==O)&&S.setSelection(N)}A&&S.ensureMarks(A),t.dispatch(S.scrollIntoView())}}}function Ro(t,e,r){return Math.max(r.anchor,r.head)>e.content.size?null:yo(t,e.resolve(r.anchor),e.resolve(r.head))}function Fo(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 qo(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")||Dt.fromSchema(t.state.schema),c=jo(),l=c.createElement("div");l.appendChild(a.serializeFragment(n,{document:c}));for(var u,p=l.firstChild;p&&1==p.nodeType&&(u=Lo[p.nodeName.toLowerCase()]);){for(var h=u.length-1;h>=0;h--){for(var f=c.createElement(u[h]);l.firstChild;)f.appendChild(l.firstChild);l.appendChild(f)}p=l.firstChild}return p&&1==p.nodeType&&p.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 Bo(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 new D(w.from(t.state.schema.text(e)),0,0);var l=t.someProp("clipboardTextParser",(function(t){return t(e,o,n)}));l?s=l:(i=document.createElement("div"),e.trim().split(/(?:\r\n?|\n)+/).forEach((function(t){i.appendChild(document.createElement("p")).textContent=t})))}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=jo().createElement("div"),o=/(?:<meta [^>]*>)*<([a-z][^>\s]+)/i.exec(t),i=0;(r=o&&Lo[o[1].toLowerCase()])&&(t=r.map((function(t){return"<"+t+">"})).join("")+t+r.map((function(t){return"</"+t+">"})).reverse().join(""),i=r.length);n.innerHTML=t;for(var s=0;s<i;s++)n=n.firstChild;return n}(r);var u=i&&i.querySelector("[data-pm-slice]"),p=u&&/^(\d+) (\d+) (.*)/.exec(u.getAttribute("data-pm-slice"));if(!s){var h=t.someProp("clipboardParser")||t.someProp("domParser")||gt.fromSchema(t.state.schema);s=h.parseSlice(i,{preserveWhitespace:!(!c&&!p),context:o})}return s=p?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=w.from(c.create(r[a+1],o)),i++,s++}
659return new D(o,i,s)}(function(t,e,r){e<t.openStart&&(t=new D(Po(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd));r<t.openEnd&&(t=new D(Po(t.content,1,r,t.openEnd,0,0),t.openStart,r));return t}(s,+p[1],+p[2]),p[3]):D.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&&function t(e,r,n,o,i){if(i<e.length&&i<r.length&&e[i]==r[i]){var s=t(e,r,n,o.lastChild,i+1);if(s)return o.copy(o.content.replaceChild(o.childCount-1,s));if(o.contentMatchAt(o.childCount).matchType(i==e.length-1?n.type:e[i+1]))return o.copy(o.content.append(w.from($o(n,e,i+1))))}}(r,o,t,i[i.length-1],0))i[i.length-1]=e;else{i.length&&(i[i.length-1]=function t(e,r){if(0==r)return e;var n=e.content.replaceChild(e.childCount-1,t(e.lastChild,r-1)),o=e.contentMatchAt(e.childCount).fillBefore(w.empty,!0);return e.copy(n.append(o))}(i[i.length-1],o.length));var s=$o(t,r);i.push(s),n=n.matchType(s.type,s.attrs),o=r}}})),i)return{v:w.from(i)}},n=e.depth;n>=0;n--){var o=r(n);if(o)return o.v}return t}(s.content,o),!1),t.someProp("transformPasted",(function(t){s=t(s)})),s}function $o(t,e,r){void 0===r&&(r=0);for(var n=e.length-1;n>=r;n--)t=e[n].create(null,w.from(t));return t}function Po(t,e,r,n,o,i){var s=e<0?t.firstChild:t.lastChild,a=s.content;return o<n-1&&(a=Po(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(w.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}var Lo={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Vo=null;function jo(){return Vo||(Vo=document.implementation.createHTMLDocument("title"))}var Uo={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Jo=rn.ie&&rn.ie_version<=11,Wo=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Wo.prototype.set=function(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset},Wo.prototype.eq=function(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset};var Ko=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]);rn.ie&&rn.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 Wo,Jo&&(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};Ko.prototype.flushSoon=function(){var t=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){t.flushingSoon=-1,t.flush()}),20))},Ko.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Ko.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Uo),Jo&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Ko.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()}Jo&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},Ko.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},Ko.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},Ko.prototype.suppressSelectionUpdates=function(){var t=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return t.suppressingSelectionUpdates=!1}),50)},Ko.prototype.onSelectionChange=function(){if((!(t=this.view).editable||t.root.activeElement==t.dom)&&ko(t)){var t;if(this.suppressingSelectionUpdates)return uo(this.view);if(rn.ie&&rn.ie_version<=11&&!this.view.state.selection.empty){var e=this.view.root.getSelection();if(e.focusNode&&fn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}},Ko.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},Ko.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},Ko.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)&&ko(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(rn.gecko&&s.length>1){var l=s.filter((function(t){return"BR"==t.nodeName}));if(2==l.length){var u=l[0],p=l[1];u.parentNode&&u.parentNode.parentNode==p.parentNode?p.remove():u.remove()}}(n>-1||r)&&(n>-1&&(this.view.docView.markDirty(n,o),function(t){if(Ho)return;Ho=!0,"normal"==getComputedStyle(t.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.view)),this.handleDOMChange(n,o,i,s),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||uo(this.view),this.currentSelection.set(e))}},Ko.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){var n=t.previousSibling,o=t.nextSibling;if(rn.ie&&rn.ie_version<=11&&t.addedNodes.length)for(var i=0;i<t.addedNodes.length;i++){var s=t.addedNodes[i],a=s.previousSibling,c=s.nextSibling;(!a||Array.prototype.indexOf.call(t.addedNodes,a)<0)&&(n=a),(!c||Array.prototype.indexOf.call(t.addedNodes,c)<0)&&(o=c)}for(var l=n&&n.parentNode==t.target?ln(n)+1:0,u=r.localPosFromDOM(t.target,l,-1),p=o&&o.parentNode==t.target?ln(o):t.target.childNodes.length,h=0;h<t.addedNodes.length;
659h++)e.push(t.addedNodes[h]);return{from:u,to:r.localPosFromDOM(t.target,p,1)}}return"attributes"==t.type?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}};var Ho=!1;var Go={},Zo={};function Yo(t,e){t.lastSelectionOrigin=e,t.lastSelectionTime=Date.now()}function Xo(t){t.someProp("handleDOMEvents",(function(e){for(var r in e)t.eventHandlers[r]||t.dom.addEventListener(r,t.eventHandlers[r]=function(e){return Qo(t,e)})}))}function Qo(t,e){return t.someProp("handleDOMEvents",(function(r){var n=r[e.type];return!!n&&(n(t,e)||e.defaultPrevented)}))}function ti(t){return{left:t.clientX,top:t.clientY}}function ei(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 ri(t,e,r){t.focused||t.focus();var n=t.state.tr.setSelection(e);"pointer"==r&&n.setMeta("pointer",!0),t.dispatch(n)}function ni(t,e,r,n,o){return ei(t,"handleClickOn",e,r,n)||t.someProp("handleClick",(function(r){return r(t,e,n)}
659))||(o?function(t,e){if(-1==e)return!1;var r,n,o=t.state.selection;o instanceof ke&&(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(ke.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&&(ri(t,ke.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&&ke.isSelectable(n))&&(ri(t,new ke(r),"pointer"),!0)}(t,r))}function oi(t,e,r,n){return ei(t,"handleDoubleClickOn",e,r,n)||t.someProp("handleDoubleClick",(function(r){return r(t,e,n)}))}function ii(t,e,r,n){return ei(t,"handleTripleClickOn",e,r,n)||t.someProp("handleTripleClick",(function(r){return r(t,e,n)}))||function(t,e){var r=t.state.doc;if(-1==e)return!!r.inlineContent&&(ri(t,ge.create(r,0,r.content.size),"pointer"),!0);for(var n=r.resolve(e),o=n.depth+1;o>0;o--){var i=o>n.depth?n.nodeAfter:n.node(o),s=n.before(o);if(i.inlineContent)ri(t,ge.create(r,s+1,s+1+i.content.size),"pointer");else{if(!ke.isSelectable(i))continue;ri(t,ke.create(r,s),"pointer")}return!0}}(t,r)}function si(t){return fi(t)}Zo.keydown=function(t,e){if(t.shiftKey=16==e.keyCode||e.shiftKey,!li(t,e))if(t.domObserver.forceFlush(),t.lastKeyCode=e.keyCode,t.lastKeyCodeTime=Date.now(),!rn.ios||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)t.someProp("handleKeyDown",(function(r){return r(t,e)}))||No(t,e)?e.preventDefault():Yo(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,kn(13,"Enter"))})),t.lastIOSEnter=0)}),200)}},Zo.keyup=function(t,e){16==e.keyCode&&(t.shiftKey=!1)},Zo.keypress=function(t,e){if(!(li(t,e)||!e.charCode||e.ctrlKey&&!e.altKey||rn.mac&&e.metaKey))if(t.someProp("handleKeyPress",(function(r){return r(t,e)})))e.preventDefault();else{var r=t.state.selection;if(!(r instanceof ge&&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 ai=rn.mac?"metaKey":"ctrlKey";Go.mousedown=function(t,e){t.shiftKey=e.shiftKey;var r=si(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[ai]&&("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(ti(e));i&&("singleClick"==o?t.mouseDown=new ci(t,i,e,r):("doubleClick"==o?oi:ii)(t,i.pos,i.inside,e)?e.preventDefault():Yo(t,"pointer"))};var ci=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[ai],this.allowDefault=r.shiftKey,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,(o.type.spec.draggable&&!1!==o.type.spec.selectable||t.state.selection instanceof ke&&i==t.state.selection.from)&&(this.mightDrag={node:o,pos:i,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&rn.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(){return 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)),Yo(t,"pointer")};function li(t,e){return!!t.composing||!!(rn.safari&&Math.abs(e.timeStamp-t.compositionEndedAt)<500)&&(t.compositionEndedAt=-2e8,!0)}ci.prototype.done=function(){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.view.mouseDown=null},ci.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(ti(t))),this.allowDefault||!e?Yo(this.view,"pointer"):ni(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():this.flushed||rn.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||rn.chrome&&!(this.view.state.selection instanceof ge)&&(e.pos==this.view.state.selection.from||e.pos==this.view.state.selection.to)?(ri(this.view,de.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):Yo(this.view,"pointer")}},ci.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),Yo(this.view,"pointer")},Go.touchdown=function(t){si(t),Yo(t,"pointer")},Go.contextmenu=function(t){return si(t)};var ui=rn.android?5e3:-1;function pi(t,e){clearTimeout(t.composingTimeout),e>-1&&(t.composingTimeout=setTimeout((function(){return fi(t)}),e))}function hi(t){for(t.composing=!1;t.compositionNodes.length>0;)t.compositionNodes.pop().markParentsDirty()}function fi(t,e){if(t.domObserver.forceFlush(),hi(t),e||t.docView.dirty){var r=lo(t);return r&&!r.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(r)):t.updateState(t.state),!0}return!1}Zo.compositionstart=Zo.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(),fi(t,!0),t.markCursor=null;else if(fi(t),rn.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}pi(t,ui)},Zo.compositionend=function(t,e){t.composing&&(t.composing=!1,t.compositionEndedAt=e.timeStamp,pi(t,20))};var di=rn.ie&&rn.ie_version<15||rn.ios&&rn.webkit_version<604;function mi(t,e,r,n){var o=Bo(t,e,r,t.shiftKey,t.state.selection.$from);if(t.someProp("handlePaste",(function(e){return e(t,n,o||D.empty)})))return!0;
659if(!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}Go.copy=Zo.cut=function(t,e){var r=t.state.selection,n="cut"==e.type;if(!r.empty){var o=di?null:e.clipboardData,i=qo(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"))}},Zo.paste=function(t,e){var r=di?null:e.clipboardData;r&&mi(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?mi(t,n.value,null,e):mi(t,n.textContent,n.innerHTML,e)}),50)}}(t,e)};var vi=function(t,e){this.slice=t,this.move=e},gi=rn.mac?"altKey":"ctrlKey";for(var yi in Go.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(ti(e));if(o&&o.pos>=n.from&&o.pos<=(n instanceof ke?n.to-1:n.to));else if(r&&r.mightDrag)t.dispatch(t.state.tr.setSelection(ke.create(t.state.doc,r.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){var i=t.docView.nearestDesc(e.target,!0);if(!i||!i.node.type.spec.draggable||i==t.docView)return;t.dispatch(t.state.tr.setSelection(ke.create(t.state.doc,i.posBefore)))}var s=t.state.selection.content(),a=qo(t,s),c=a.dom,l=a.text;e.dataTransfer.clearData(),e.dataTransfer.setData(di?"Text":"text/html",c.innerHTML),di||e.dataTransfer.setData("text/plain",l),t.dragging=new vi(s,!e[gi])}},Go.dragend=function(t){var e=t.dragging;window.setTimeout((function(){t.dragging==e&&(t.dragging=null)}),50)},Zo.dragover=Zo.dragenter=function(t,e){return e.preventDefault()},Zo.drop=function(t,e){var r=t.dragging;if(t.dragging=null,e.dataTransfer){var n=t.posAtCoords(ti(e));if(n){var o=t.state.doc.resolve(n.pos);if(o){var i=r&&r.slice||Bo(t,e.dataTransfer.getData(di?"Text":"text/plain"),di?null:e.dataTransfer.getData("text/html"),!1,o),s=r&&!e[gi];if(t.someProp("handleDrop",(function(r){return r(t,e,i||D.empty,s)})))e.preventDefault();else if(i){e.preventDefault();var a=i?Qt(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),u=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,p=c.doc;if(u?c.replaceRangeWith(l,l,i.content.firstChild):c.replaceRange(l,l,i),!c.doc.eq(p)){var h=c.doc.resolve(l);if(u&&ke.isSelectable(i.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new ke(h));else{var f=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((function(t,e,r,n){return f=n})),c.setSelection(yo(t,h,c.doc.resolve(f)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))}}}}}},Go.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())&&uo(t)}),20))},Go.blur=function(t){t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),t.domObserver.currentSelection.set({}),t.focused=!1)},Go.beforeinput=function(t,e){if(rn.chrome&&rn.android&&"deleteContentBackward"==e.inputType){var r=t.domChangeCount;setTimeout((function(){if(t.domChangeCount==r&&(t.dom.blur(),t.focus(),!t.someProp("handleKeyDown",(function(e){return e(t,kn(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)}},Zo)Go[yi]=Zo[yi];function ki(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 bi=function(t,e){this.spec=e||Ai,this.side=this.spec.side||0,this.toDOM=t};bi.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 _i(i-r,i-r,this)},bi.prototype.valid=function(){return!0},bi.prototype.eq=function(t){return this==t||t instanceof bi&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ki(this.spec,t.spec))};var wi=function(t,e){this.spec=e||Ai,this.attrs=t};wi.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 _i(o,i,this)},wi.prototype.valid=function(t,e){return e.from<e.to},wi.prototype.eq=function(t){return this==t||t instanceof wi&&ki(this.attrs,t.attrs)&&ki(this.spec,t.spec)},wi.is=function(t){return t.type instanceof wi};var xi=function(t,e){this.spec=e||Ai,this.attrs=t};xi.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 _i(o.pos-r,i.pos-r,this)},xi.prototype.valid=function(t,e){var r=t.content.findIndex(e.from),n=r.index,o=r.offset;return o==e.from&&o+t.child(n).nodeSize==e.to},xi.prototype.eq=function(t){return this==t||t instanceof xi&&ki(this.attrs,t.attrs)&&ki(this.spec,t.spec)};var _i=function(t,e,r){this.from=t,this.to=e,this.type=r},Ci={spec:{configurable:!0},inline:{configurable:!0}};_i.prototype.copy=function(t,e){return new _i(t,e,this.type)},_i.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},_i.prototype.map=function(t,e,r){return this.type.map(t,this,e,r)},_i.widget=function(t,e,r){return new _i(t,t,new bi(e,r))},_i.inline=function(t,e,r,n){return new _i(t,e,new wi(r,n))},_i.node=function(t,e,r,n){return new _i(t,e,new xi(r,n))},Ci.spec.get=function(){return this.type.spec},Ci.inline.get=function(){return this.type instanceof wi},Object.defineProperties(_i.prototype,Ci);var Si=[],Ai={},Mi=function(t,e){this.local=t&&t.length?t:Si,this.children=e&&e.length?e:Si};Mi.create=function(t,e){return e.length?Ii(e,t,0,Ai):Di},Mi.prototype.find=function(t,e,r){var n=[];return this.findInner(null==t?0:t,null==e?1e9:e,n,0,r),n},Mi.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)}},Mi.prototype.map=function(t,e,r){return this==Di||0==t.maps.length?this:this.mapInner(t,e,0,0,r||Ai)},Mi.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 u=!1,p=0;p<a.length;p+=3)if(-1==a[p+1]){var h=r.map(t[p]+i),f=h-o;if(f<0||f>=n.content.size){u=!0;continue}var d=r.map(t[p+1]+i,-1)-o,m=n.content.findIndex(f),v=m.index,g=m.offset,y=n.maybeChild(v);if(y&&g==f&&g+y.nodeSize==d){var k=a[p+2].mapInner(r,y,h+1,t[p]+i+1,s);k!=Di?(a[p]=f,a[p+1]=d,a[p+2]=k):(a[p+1]=-2,u=!0)}else u=!0}if(u){var b=Ii(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}(a,t,e||[],r,o,i,s),n,0,s);e=b.local;for(var w=0;w<a.length;w+=3)a[w+1]<0&&(a.splice(w,3),w-=3);for(var x=0,_=0;x<b.children.length;x+=3){for(var C=b.children[x];_<a.length&&a[_]<C;)_+=3;a.splice(_,0,b.children[x],b.children[x+1],b.children[x+2])}}return new Mi(e&&e.sort(zi),a)}(this.children,i,t,e,r,n,o):i?new Mi(i.sort(zi)):Di},Mi.prototype.add=function(t,e){return e.length?this==Di?Mi.create(t,e):this.addInner(t,e,0):this},Mi.prototype.addInner=function(t,e,r){var n,o=this,i=0;t.forEach((function(t,s){var a,c=s+r;if(a=Ti(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,Ii(a,t,c+1,Ai)),i+=3}}));for(var s=Ei(i?Ni(e):e,-r),a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new Mi(s.length?this.local.concat(s).sort(zi):this.local,n||this.children)},Mi.prototype.remove=function(t){return 0==t.length||this==Di?this:this.removeInner(t,0)},Mi.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 u=r[o+2].removeInner(i,s+1);u!=Di?r[o+2]=u:(r.splice(o,3),o-=3)}}if(n.length)for(var p=0,h=void 0;p<t.length;p++)if(h=t[p])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 Mi(n,r):Di},Mi.prototype.forChild=function(t,e){if(this==Di)return this;if(e.isLeaf)return Mi.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 wi){var l=Math.max(i,c.from)-i,u=Math.min(s,c.to)-i;l<u&&(n||(n=[])).push(c.copy(l,u))}}if(n){var p=new Mi(n.sort(zi));return r?new Oi([p,r]):p}return r||Di},Mi.prototype.eq=function(t){if(this==t)return!0;
659if(!(t instanceof Mi)||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},Mi.prototype.locals=function(t){return Ri(this.localsInner(t))},Mi.prototype.localsInner=function(t){if(this==Di)return Si;if(t.inlineContent||!this.local.some(wi.is))return this.local;for(var e=[],r=0;r<this.local.length;r++)this.local[r].type instanceof wi||e.push(this.local[r]);return e};var Di=new Mi;Mi.empty=Di,Mi.removeOverlap=Ri;var Oi=function(t){this.members=t};function Ei(t,e){if(!e||!t.length)return t;for(var r=[],n=0;n<t.length;n++){var o=t[n];r.push(new _i(o.from+e,o.to+e,o.type))}return r}function Ti(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 Ni(t){for(var e=[],r=0;r<t.length;r++)null!=t[r]&&e.push(t[r]);return e}function Ii(t,e,r,n){var o=[],i=!1;e.forEach((function(e,s){var a=Ti(t,e,s+r);if(a){i=!0;var c=Ii(a,e,r+s+1,n);c!=Di&&o.push(s,s+e.nodeSize,c)}}));for(var s=Ei(i?Ni(t):t,-r).sort(zi),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 Mi(s,o):Di}function zi(t,e){return t.from-e.from||t.to-e.to}function Ri(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),Fi(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),Fi(e,o+1,i.copy(n.to,i.to)))}}return e}function Fi(t,e,r){for(;e<t.length&&zi(r,t[e])>0;)e++;t.splice(e,0,r)}function qi(t){var e=[];return t.someProp("decorations",(function(r){var n=r(t.state);n&&n!=Di&&e.push(n)})),t.cursorWrapper&&e.push(Mi.create(t.state.doc,[t.cursorWrapper.deco])),Oi.from(e)}Oi.prototype.forChild=function(t,e){if(e.isLeaf)return Mi.empty;for(var r=[],n=0;n<this.members.length;n++){var o=this.members[n].forChild(t,e);o!=Di&&(o instanceof Oi?r=r.concat(o.members):r.push(o))}return Oi.from(r)},Oi.prototype.eq=function(t){if(!(t instanceof Oi)||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},Oi.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?Ri(r?e:e.sort(zi)):Si},Oi.from=function(t){switch(t.length){case 0:return Di;case 1:return t[0];default:return new Oi(t)}};var Bi=function(t,e){this._props=e,this.state=e.state,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=Vi(this),this.markCursor=null,this.cursorWrapper=null,Li(this),this.nodeViews=ji(this),this.docView=Hn(this.state.doc,Pi(this),qi(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.composing=!1,t.composingTimeout=null,t.compositionNodes=[],t.compositionEndedAt=-2e8,t.domObserver=new Ko(t,(function(e,r,n,o){return zo(t,e,r,n,o)})),t.domObserver.start(),t.domChangeCount=0,t.eventHandlers=Object.create(null);var e=function(e){var r=Go[e];t.dom.addEventListener(e,t.eventHandlers[e]=function(e){!function(t,e){if(!e.bubbles)return!0;if(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)||Qo(t,e)||!t.editable&&e.type in Zo||r(t,e)})};for(var r in Go)e(r);rn.safari&&t.dom.addEventListener("input",(function(){return null})),Xo(t)}(this),this.pluginViews=[],this.updatePluginViews()},$i={props:{configurable:!0},root:{configurable:!0}};function Pi(t){var e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),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]:e[n]||"contenteditable"==n||"nodeName"==n||(e[n]=String(r[n]))}
659)),[_i.node(0,t.state.doc.content.size,e)]}function Li(t){if(t.markCursor){var e=document.createElement("img");e.setAttribute("mark-placeholder","true"),t.cursorWrapper={dom:e,deco:_i.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Vi(t){return!t.someProp("editable",(function(e){return!1===e(t.state)}))}function ji(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}$i.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},Bi.prototype.update=function(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Xo(this),this._props=t,this.updateStateInner(t.state,!0)},Bi.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)},Bi.prototype.updateState=function(t){this.updateStateInner(t,this.state.plugins!=t.plugins)},Bi.prototype.updateStateInner=function(t,e){var r=this,n=this.state,o=!1,i=!1;if(t.storedMarks&&this.composing&&(hi(this),i=!0),this.state=t,e){var s=ji(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),Xo(this)}this.editable=Vi(this),Li(this);var a=qi(this),c=Pi(this),l=e?"reset":t.scrollToSelection>n.scrollToSelection?"to selection":"preserve",u=o||!this.docView.matchesNode(t.doc,c,a);!u&&t.selection.eq(n.selection)||(i=!0);var p,h,f,d,m,v,g,y,k,b,w,x="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:Cn(t.dom)}}(this);if(i){this.domObserver.stop();var _=u&&(rn.ie||rn.chrome)&&!this.composing&&!n.selection.empty&&!t.selection.empty&&(d=n.selection,m=t.selection,v=Math.min(d.$anchor.sharedDepth(d.head),m.$anchor.sharedDepth(m.head)),d.$anchor.start(v)!=m.$anchor.start(v));if(u){var C=rn.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=Hn(t.doc,c,a,this.dom,this)),C&&!this.trackWrites&&(_=!0)}_||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(p=this,h=p.docView.domFromPos(p.state.selection.anchor,0),f=p.root.getSelection(),fn(h.node,h.offset,f.anchorNode,f.anchorOffset)))?uo(this,_):(vo(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 S=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(t){return t(r)}))||(t.selection instanceof ke?_n(this,this.docView.domAfterPos(t.selection.from).getBoundingClientRect(),S):_n(this,this.coordsAtPos(t.selection.head,1),S))}else x&&(y=(g=x).refDOM,k=g.refTop,b=g.stack,w=y?y.getBoundingClientRect().top:0,Sn(b,0==w?0:w-k))},Bi.prototype.destroyPluginViews=function(){for(var t;t=this.pluginViews.pop();)t.destroy&&t.destroy()},Bi.prototype.updatePluginViews=function(t){if(t&&t.plugins==this.state.plugins)for(var e=0;e<this.pluginViews.length;e++){var r=this.pluginViews[e];r.update&&r.update(this,t)}else{this.destroyPluginViews();for(var n=0;n<this.state.plugins.length;n++){var o=this.state.plugins[n];o.spec.view&&this.pluginViews.push(o.spec.view(this))}}},Bi.prototype.someProp=function(t,e){var r,n=this._props&&this._props[t];if(null!=n&&(r=e?e(n):n))return r;var o=this.state.plugins;if(o)for(var i=0;i<o.length;i++){var s=o[i].props[t];if(null!=s&&(r=e?e(s):s))return r}},Bi.prototype.hasFocus=function(){return this.root.activeElement==this.dom},Bi.prototype.focus=function(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(An)return t.focus(An);var e=Cn(t);
659t.focus(null==An?{get preventScroll(){return An={preventScroll:!0},!0}}:void 0),An||(An=!1,Sn(e,0))}(this.dom),uo(this),this.domObserver.start()},$i.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},Bi.prototype.posAtCoords=function(t){return On(this,t)},Bi.prototype.coordsAtPos=function(t,e){return void 0===e&&(e=1),Nn(this,t,e)},Bi.prototype.domAtPos=function(t,e){return void 0===e&&(e=0),this.docView.domFromPos(t,e)},Bi.prototype.nodeDOM=function(t){var e=this.docView.descAt(t);return e?e.nodeDOM:null},Bi.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},Bi.prototype.endOfTextblock=function(t,e){return Pn(this,e||this.state,t)},Bi.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,[],qi(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},Bi.prototype.dispatchEvent=function(t){return function(t,e){Qo(t,e)||!Go[e.type]||!t.editable&&e.type in Zo||Go[e.type](t,e)}(this,t)},Bi.prototype.dispatch=function(t){var e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))},Object.defineProperties(Bi.prototype,$i);var Ui=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}}))};Ui.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)}))},Ui.prototype.update=function(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&this.updateOverlay()},Ui.prototype.setCursor=function(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},Ui.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 u=l.getBoundingClientRect();a=u.left-l.scrollLeft,c=u.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"},Ui.prototype.scheduleRemoval=function(t){var e=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.setCursor(null)}),t)},Ui.prototype.dragover=function(t){if(this.editorView.editable){var e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY});if(e){var r=e.pos;this.editorView.dragging&&this.editorView.dragging.slice&&null==(r=Qt(this.editorView.state.doc,r,this.editorView.dragging.slice))&&(r=e.pos),this.setCursor(r),this.scheduleRemoval(5e3)}}},Ui.prototype.dragend=function(){this.scheduleRemoval(20)},Ui.prototype.drop=function(){this.scheduleRemoval(20)},Ui.prototype.dragleave=function(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)};var Ji=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 D.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 Wi(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);if(0!=r)for(var n=t.node(e).child(r-1);;n=n.lastChild){if(0==n.childCount&&!n.inlineContent||n.isAtom||n.type.spec.isolating)return!0;
659if(n.inlineContent)return!1}}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}}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&&!ke.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*r),n=!1;continue t}break}i=l,o+=r;var u=t.doc.resolve(o);if(e.valid(u))return u}return null}},e}(de);Ji.prototype.visible=!1,de.jsonID("gapcursor",Ji);var Wi=function(t){this.pos=t};Wi.prototype.map=function(t){return new Wi(t.map(this.pos))},Wi.prototype.resolve=function(t){var e=t.resolve(this.pos);return Ji.valid(e)?new Ji(e):de.near(e)};var Ki=en({ArrowLeft:Hi("horiz",-1),ArrowRight:Hi("horiz",1),ArrowUp:Hi("vert",-1),ArrowDown:Hi("vert",1)});function Hi(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 ge){if(!o.endOfTextblock(r)||0==s.depth)return!1;a=!1,s=t.doc.resolve(e>0?s.after():s.before())}var c=Ji.findFrom(s,e,a);return!!c&&(n&&n(t.tr.setSelection(new Ji(c))),!0)}}function Gi(t,e,r){if(!t.editable)return!1;var n=t.state.doc.resolve(e);if(!Ji.valid(n))return!1;var o=t.posAtCoords({left:r.clientX,top:r.clientY}).inside;return!(o>-1&&ke.isSelectable(t.state.doc.nodeAt(o)))&&(t.dispatch(t.state.tr.setSelection(new Ji(n))),!0)}function Zi(t){if(!(t.selection instanceof Ji))return null;var e=document.createElement("div");return e.className="ProseMirror-gapcursor",Mi.create(t.doc,[_i.widget(t.selection.head,e,{key:"gapcursor"})])}function Yi(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 Xi(t){return ur(/^(\d+)(\.|\))\s$/,t,(function(t){return{order:+t[1]}}),(function(t,e){return e.childCount+e.attrs.order==+t[1]}))}function Qi(t){return ur(/^\s*([-+*])\s$/,t)}function ts(t){return pr(/^```$/,t)}function es(t,e){return pr(new RegExp("^(#{1,"+e+"})\\s$"),t,(function(t){return{level:t[1].length}}))}function rs(t){return ur(/^\s*>!\s$/,t)}function ns(){return(ns=Object.assign||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}).apply(this,arguments)}var is=r(9),ss=r.n(is),as=new mt({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"]}}}});var cs=function(t,e){this.schema=t,this.stack=[{type:t.topNodeType,content:[]}],this.marks=A.none,this.tokenHandlers=e};function ls(t,e,r,n){return t.getAttrs?t.getAttrs(e,r,n):t.attrs instanceof Function?t.attrs(e):t.attrs}function us(t,e){return t.noCloseToken||"code_inline"==e||"code_block"==e||"fence"==e}function ps(t){return"\n"==t[t.length-1]?t.slice(0,t.length-1):t}function hs(){}cs.prototype.top=function(){return this.stack[this.stack.length-1]},cs.prototype.push=function(t){this.stack.length&&this.top().content.push(t)},cs.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&&A.sameSet(t.marks,e.marks))return t.withText(t.text+e.text)}(n,o))?r[r.length-1]=e:r.push(o)}},cs.prototype.openMark=function(t){this.marks=t.addToSet(this.marks)},cs.prototype.closeMark=function(t){this.marks=t.removeFromSet(this.marks)},cs.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)}},cs.prototype.addNode=function(t,e,r){var n=t.createAndFill(e,r,this.marks);return n?(this.push(n),n):null},cs.prototype.openNode=function(t,e){this.stack.push({type:t,attrs:e,content:[]})},cs.prototype.closeNode=function(){this.marks.length&&(this.marks=A.none);var t=this.stack.pop();return this.addNode(t.type,t.attrs,t.content)};var fs=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);us(o,n)?r[n]=function(t,e,r,n){t.openNode(i,ls(o,e,r,n)),t.addText(ps(e.content)),t.closeNode()}:(r[n+"_open"]=function(t,e,r,n){return t.openNode(i,ls(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,ls(o,e,r,n))}}else if(o.mark){var a=t.marks[o.mark];us(o,n)?r[n]=function(t,e,r,n){t.openMark(a.create(ls(o,e,r,n))),t.addText(ps(e.content)),t.closeMark(a)}:(r[n+"_open"]=function(t,e,r,n){return t.openMark(a.create(ls(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));us(o,n)?r[n]=hs:(r[n+"_open"]=hs,r[n+"_close"]=hs)}};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 ds(t,e){for(;++e<t.length;)if("list_item_open"!=t[e].type)return t[e].hidden;return!1}fs.prototype.parse=function(t){var e,r=new cs(this.schema,this.tokenHandlers);r.parseTokens(this.tokenizer.parse(t,{}));do{e=r.closeNode()}while(r.stack.length);return e};var ms=new fs(as,ss()("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:ds(e,r)}}},ordered_list:{block:"ordered_list",getAttrs:function(t,e,r){return{order:+t.attrGet("start")||1,tight:ds(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.
659info||""}},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}}),vs=function(t,e){this.nodes=t,this.marks=e};vs.prototype.serialize=function(t,e){var r=new bs(this.nodes,this.marks,e);return r.renderContent(t),r.out};var gs=new vs({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("+(e.attrs.title?" "+t.quote(e.attrs.title):"")+")")},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 ks(e,r,n,1)?"<":"["},close:function(t,e,r,n){return ks(e,r,n,-1)?">":"]("+t.esc(e.attrs.href)+(e.attrs.title?" "+t.quote(e.attrs.title):"")+")"}},code:{open:function(t,e,r,n){return ys(r.child(n),-1)},close:function(t,e,r,n){return ys(r.child(n-1),1)},escape:!1}});function ys(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 ks(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 bs=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 ws(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):ns({},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}})}bs.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}},bs.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)},bs.prototype.atBlank=function(){return/(^|\n)$/.test(this.out)},bs.prototype.ensureNewLine=function(){this.atBlank()||(this.out+="\n")},bs.prototype.write=function(t){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),t&&(this.out+=t)},bs.prototype.closeBlock=function(t){this.closed=t},bs.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")}},bs.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");
659this.nodes[t.type.name](this,t,e,r)},bs.prototype.renderContent=function(t){var e=this;t.forEach((function(r,n,o){return e.render(r,t,o)}))},bs.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),u=(l[0],l[1]),p=l[2],h=l[3];c+=u,n=h,(u||h)&&((o=p?o.withText(p):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 v=0;v<m;v++){var g=a[v];if(!e.marks[g.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(g.eq(k)){v>y?a=a.slice(0,y).concat(g).concat(a.slice(y,v)).concat(a.slice(v+1,m)):y>v&&(a=a.slice(0,v).concat(a.slice(v+1,y)).concat(g).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 w=a[r.length];r.push(w),e.text(e.markString(w,!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)},bs.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},bs.prototype.esc=function(t,e){return t=t.replace(/[`*\\~\[\]]/g,"\\$&"),e&&(t=t.replace(/^[:#\-*+]/,"\\$&").replace(/^(\s*\d+)\./,"$1\\.")),t},bs.prototype.quote=function(t){var e=-1==t.indexOf('"')?'""':-1==t.indexOf("'")?"''":"()";return e[0]+t+e[1]},bs.prototype.repeat=function(t,e){for(var r="",n=0;n<e;n++)r+=t;return r},bs.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)},bs.prototype.getEnclosingWhitespace=function(t){return{leading:(t.match(/^(\s+)/)||[])[0],trailing:(t.match(/(\s+)$/)||[])[0]}},bs.prototype.esc=function(t,e){return t=t.replace(/[`*\\~]/g,"\\$&"),e&&(t=t.replace(/^[:#\-*+]/,"\\$&").replace(/^(\s*\d+)\./,"$1\\.")),t};var xs=function(){function t(t){this.schema=t}var e=t.prototype;return e.buildNodes=function(){return ns({},gs.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"):gs.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 ns({},gs.marks,{spoiler_inline:ws({open:">!",close:"!<",mixable:!0,expelEnclosingWhitespace:!0}),strike:ws({open:"~~",close:"~~",mixable:!0,expelEnclosingWhitespace:!0}),sub:ws({open:"~",close:"~",mixable:!0,expelEnclosingWhitespace:!0}),sup:ws({open:"^",close:"^",mixable:!0,expelEnclosingWhitespace:!0}),math_inline:ns({},ws({open:"$",close:"$",mixable:!1,expelEnclosingWhitespace:!0}),{escape:!1})})},e.build=function(){return new vs(this.buildNodes(),this.buildMarks())},t}(),_s=r(27),Cs=r.n(_s),Ss=r(28),As=r.n(Ss),Ms=r(29),Ds=r.n(Ms);function Os(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}}var Es=function(t,e){for(var r=t.pos;r<t.posMax&&!Os(t.src.charCodeAt(r));)r++;
659return r!==t.pos&&(e||(t.pending+=t.src.slice(t.pos,r)),t.pos=r,!0)},Ts=function(t){t.inline.ruler.before("text","altText",Es),t.inline.ruler.disable("text")},Ns=r(0);function Is(t,e,r,n,o){var i,s,a,c,l,u,p,h,f,d,m,v,g,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,O=!1,E=A;if(">!"===t.markup)for(;A<M;){if(s=e.src.charCodeAt(A),D&&60===s)return!1;if(62===s)O=!0;else{if(O&&33===s)break;if(33===s)D=!0;else{if(10===s)break;D=!1,O=!1}}A++}for(A=E,d=[e.bMarks[r]],e.bMarks[r]=A;A<M&&(s=e.src.charCodeAt(A),Object(Ns.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),u=A>=M,y=[e.sCount[r]],e.sCount[r]=f-c,k=[e.tShift[r]],e.tShift[r]=A-e.bMarks[r],x=e.md.block.ruler.getRules("spoiler"),g=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(u)break;for(w=!1,a=0,l=x.length;a<l;a++)if(x[a](e,h,n,!0)){w=!0;break}if(w){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),Object(Ns.isSpace)(s));)9===s?f+=4-(f+e.bsCount[h]+(i?1:0))%4:f++,A++;u=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(v=e.blkIndent,e.blkIndent=0,(_=e.push(t.name+"_open",t.name,1)).markup=t.markup,_.map=p=[r,0],e.md.block.tokenize(e,r,h),(_=e.push(t.name+"_close",t.name,-1)).markup=t.markup,e.lineMax=S,e.parentType=g,p[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=v,!0}function zs(t,e,r,n){return Is({followingCharRegex:/!/,markup:">!",name:"spoiler"},t,e,r,n)}function Rs(t,e,r,n){return Is({followingCharRegex:/[^!]/,markup:">",name:"blockquote"},t,e,r,n)}function Fs(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",zs,{alt:["paragraph","reference","spoiler","blockquote","list"]}),t.block.ruler.at("blockquote",Rs,{alt:["paragraph","reference","spoiler","blockquote","list"]})} 660/**! 661 * markdown-it-mark 662 * 663 * Copyright (c) 2014-2015 Vitaly Puzrin, Alex Kocharin. 664 * Permission is hereby granted, free of charge, to any person 665 * obtaining a copy of this software and associated documentation 666 * files (the "Software"), to deal in the Software without 667 * restriction, including without limitation the rights to use, 668 * copy, modify, merge, publish, distribute, sublicense, and/or sell 669 * copies of the Software, and to permit persons to whom the 670 * Software is furnished to do so, subject to the following 671 * conditions: 672 * 673 * The above copyright notice and this permission notice shall be 674 * included in all copies or substantial portions of the Software. 675 * 676 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 677 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 678 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 679 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 680 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 681 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 682 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 683 * OTHER DEALINGS IN THE SOFTWARE. 684 */function qs(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Bs(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bs(t,e)}(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.")}return(r=t[Symbol.iterator]()).next.bind(r)}function Bs(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 $s=function(t,e){for(var r,n=[],o=qs(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(),u=l+1;u<t.tokens.length&&"spoiler_inline_close"===t.tokens[u].type;)u++;if(l!==--u){var p=t.tokens[u];t.tokens[u]=t.tokens[l],t.tokens[l]=p}}},Ps=function(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;
684var 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;if(s%2){if(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($s(t,t.delimiters),t.tokens_meta)for(var e,r=qs(t.tokens_meta);!(e=r()).done;){var n=e.value;n&&n.delimiters&&$s(t,n.delimiters)}}))};function Ls(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Vs(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vs(t,e)}(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.")}return(r=t[Symbol.iterator]()).next.bind(r)}function Vs(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 js(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="")}var Us=function(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(js(t,t.delimiters),t.tokens_meta)for(var e,r=Ls(t.tokens_meta);!(e=r()).done;){var n=e.value;n&&n.delimiters&&js(t,n.delimiters)}}))},Js=function(){function t(t){this.schema=t}var e=t.prototype;return e.tokenizerParams=function(){return{html:!1}},e.buildTokenizer=function(){return ss()("commonmark",this.tokenizerParams()).enable("strikethrough").use(Ts).use(Fs).use(Ds.a).use(Cs.a).use(As.a).use(Ps).use(Us)},e.buildTokens=function(){return ns({},ms.tokens,{s:{mark:"strike"},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 fs(this.schema,this.buildTokenizer(),this.buildTokens())},t}();function Ws(){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 Ks={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]}},Hs={content:"text*",code:!0,group:"block",parseDOM:[{tag:"pre"}],toDOM:function(t){return["pre",{class:"math"},["code",0]]}},Gs=function(){function t(){}var e=t.prototype;return e.buildNodes=function(){return as.spec.nodes.update("ordered_list",ns({},as.spec.nodes.get("ordered_list"),{attrs:{order:{default:1},tight:{default:!0}}})).update("bullet_list",ns({},as.spec.nodes.get("bullet_list"),{attrs:{tight:{default:!0}}})).addBefore("blockquote","spoiler",Ks).addBefore("blockquote","math_block",Hs)},e.buildMarks=function(){return as.spec.marks.addBefore("strong","strike",Ws("del","s","strike")).addBefore("strong","sub",Ws("sub")).addBefore("strong","sup",Ws("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 mt({nodes:this.buildNodes(),marks:this.buildMarks()})},t}(),Zs=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 Gs).build(),this.parser=new Js(this.schema).build(),this.serializer
684=new xs(this.schema).build(),this.state=Ee.create(this.buildEditorStateConfig()),this.view=new Bi(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,c=new p.a;return c.add("markdownInputrules",(t={rules:this.buildInputRules(this.schema)},e=t.rules,r=new Ie({state:{init:function(){return null},apply:function(t,e){var r=t.getMeta(this);return r||(t.selectionSet||t.docChanged?null:e)}},props:{handleTextInput:function(t,n,o,i){return ar(t,n,o,i,e,r)},handleDOMEvents:{compositionend:function(t){setTimeout((function(){var n=t.state.selection.$cursor;n&&ar(t,n.pos,n.pos,"",e,r)}))}}},isInputRules:!0}))),c.add("submit",tn({"Mod-Enter":this.attrs.onsubmit})),c.add("escape",tn({Escape:this.attrs.escape})),c.add("richTextKeymap",tn((n=this.schema,o=Ge((function(t,e){var r=$(".EmojiDropdown:visible"),n=$(".MentionsDropdown:visible");if(r[0]||n[0])return!0}),nr(n.nodes.list_item),(function(t,e,r){var n=t.selection,o=n.$head,i=n.$anchor;if(!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?Le(t,e):(r.dispatch(r.state.tr.delete(t.selection.from-1,t.selection.from)),r.dispatch(r.state.tr.setSelection(ge.near(r.state.doc.resolve(r.state.selection.from)))),je(r.state,r.dispatch))}
684)),{"Mod-z":$r,"Mod-y":Pr,"Mod-Shift-z":Pr,Backspace:cr,"Mod-b":He(n.marks.strong),"Mod-i":He(n.marks.em),"Mod-`":He(n.marks.code),"Alt-Shift-5":He(n.marks.strike),"Mod-,":He(n.marks.sub),"Mod-.":He(n.marks.sup),"Mod-;":He(n.marks.spoiler_inline),"Shift-Mod-8":kr(n.nodes.bullet_list),"Shift-Mod-9":kr(n.nodes.ordered_list),"Mod-q":We(n.nodes.blockquote),"Shift-Ctrl-0":Ke(n.nodes.paragraph),"Shift-Ctrl-1":Ke(n.nodes.heading,{level:1}),"Shift-Ctrl-2":Ke(n.nodes.heading,{level:2}),"Shift-Ctrl-3":Ke(n.nodes.heading,{level:3}),"Shift-Ctrl-4":Ke(n.nodes.heading,{level:4}),"Shift-Ctrl-5":Ke(n.nodes.heading,{level:5}),"Shift-Ctrl-6":Ke(n.nodes.heading,{level:6}),"Shift-Ctrl-\\":Ke(n.nodes.code_block),"Mod-]":ir(n.nodes.list_item),"Mod-m":ir(n.nodes.list_item),"Mod-[":or(n.nodes.list_item),"Mod-Shift-m":or(n.nodes.list_item),Enter:o,"Shift-Enter":Ge(Le,(function(t,e){return e(t.tr.replaceSelectionWith(n.nodes.hard_break.create()).scrollIntoView()),!0}))}))),c.add("baseKeymap",tn(er)),c.add("placeholder",(i=this.attrs.placeholder,new Ie({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(_i.node(0,r.nodeSize,{class:"placeholder","data-before":i}))}return Mi.create(t.doc,e)}}}))),c.add("history",Br()),c.add("disabled",new Ie({key:new Fe("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}}})),c.add("dropCursor",(void 0===s&&(s={}),new Ie({view:function(t){return new Ui(t,s)}}))),c.add("gapCursor",new Ie({props:{decorations:Zi,createSelectionBetween:function(t,e,r){if(e.pos==r.pos&&Ji.valid(r))return new Ji(r)},handleClick:Gi,handleKeyDown:Ki}})),c.add("menu",(a=this.attrs.menuState,new Ie({view:function(t){return a.attachEditorView(t),a}}))),c.add("toggleSpoiler",function(t){return new Ie({props:{handleClickOn:Yi(t),handleDoubleClickOn:Yi(t)}})}(this.schema)),c},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;return[lr,(o=t.nodes.blockquote,ur(/^\s*>\s$/,o)),Xi(t.nodes.ordered_list),Qi(t.nodes.bullet_list),ts(t.nodes.code_block),es(t.nodes.heading,6),rs(t.nodes.spoiler),(e=/(?:___\s|\*\*\*\s|---)$/,r=t.nodes.horizontal_rule,new sr(e,(t,e,o,i)=>{const s=n instanceof Function?n(e):n,{tr:a}=t;return e[0]&&a.replaceWith(o-1,i,r.create(s)),a})),pr(/^\s*\$\$\s$/,t.nodes.math_block),vr(/(?:\*\*|__)([^\*_]+)(?:\*\*|__)$/,t.marks.strong),vr(/(?:^|[^\*_])(?:\*|_)([^\*_]+)(?:\*|_)$/,t.marks.em),vr(/(?:`)([^`]+)(?:`)$/,t.marks.code),vr(/(?:~~)([^~]+)(?:~~)$/,t.marks.strike),vr(/(?:[^~]~)([^~]+)(?:~)$/,t.marks.sub),vr(/(?:\^)([^^]+)(?:\^)$/,t.marks.sup),vr(/(?:\|\|)([^\|]+)(?:\|\|)$/,t.marks.spoiler_inline),vr(/(?:>!)(.+)(?:!<)$/,t.marks.spoiler_inline),vr(/(?:\$)([^$]+)(?:\$)$/,t.marks.math_inline)]}(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;void 0===n&&(n=!0),n?o=this.view.state.tr.insertText(r,t,e):(t-=1,o=this.view.state.tr.replaceRangeWith(t,e,this.parseInitialValue(r))),this.view.dispatch(o),this.moveCursorTo(Math.min(t+r.length,de.atEnd(this.view.state.doc).to)),m.redraw(),r.endsWith(" ")&&!n&&this.insertAtCursor(" ")},e.replaceBeforeCursor=function(t,e,r){this.insertBetween(t,this.get
684SelectionRange()[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 ge(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}();function Ys(t,e){return(Ys=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xs(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ys(t,e)}var Qs=r(10),ta=r.n(Qs),ea=r(6),ra=r.n(ea),na=r(1),oa=r.n(na),ia=function(t){function e(){return t.apply(this,arguments)||this}Xs(e,t);var r=e.prototype;return r.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))},r.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$().tooltip()},r.view=function(){return m("button",{className:"Button Button--icon Button--link",title:oa()(this.attrs.tooltip),onclick:this.click.bind(this),onkeydown:this.keydown.bind(this)},ra()(this.attrs.icon))},r.keydown=function(t){" "!==t.key&&"Enter"!==t.key||this.click(t)},r.click=function(t){return t.preventDefault(),this.state.run(this.attrs.type)},r.title=function(){return app.translator.trans("askvortsov-rich-text.forum.composer."+this.attrs.type+"_tooltip")},r.onEditorUpdate=function(){},e}(ta.a),sa=function(t){function e(){return t.apply(this,arguments)||this}return Xs(e,t),e.initAttrs=function(t){t.command=He(t.mark)},e.prototype.onEditorUpdate=function(){this.$().toggleClass("active",!!this.state.markActive(this.attrs.mark))},e}(ia),aa=r(7),ca=r.n(aa),la=function(t){function e(){return t.apply(this,arguments)||this}Xs(e,t);var r=e.prototype;return r.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))},r.oncreate=function(e){t.prototype.oncreate.call(this,e),this.onEditorUpdate(),this.$('[data-toggle="tooltip"]').tooltip()},r.getButton=function(t){return m("button",{className:"Dropdown-toggle Button Button--icon Button--link NodeTypeButton Button--menuDropdown","data-toggle":"dropdown"},m("span",{"data-toggle":"tooltip",title:this.attrs.tooltip}))},r.getMenu=function(t){var e=this;return m("ul",{className:"Dropdown-menu dropdown-menu NodeTypeDropdownMenu"},this.attrs.options.filter((function(t,r){return r!==e.activeIndex})).map((function(t){return m("button",{className:"Button Button--icon Button--link NodeTypeButton",key:t.title,title:oa()(t.tooltip),oncreate:function(t){return $(t.dom).tooltip()},onclick:e.click.bind(e,t.type,t.attrs),onkeydown:e.keydown.bind(e,t.type,t.attrs)},t.title)})))},r.keydown=function(t,e,r){" "!==r.key&&"Enter"!==r.key||this.click(t,e,r)},r.click=function(t,e,r){return r.preventDefault(),this.command=Ke(t,e),this.state.run(this.attrs.type)},r.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)}))},e}(ca.a),ua=r(4),pa=r.n(ua),ha=function(t){function e(){return t.apply(this,arguments)||this}Xs(e,t),e.initAttrs=function(t){t.buttonClassName="Button Button--icon Button--link Button--menuDropdown"};var r=e.prototype;return r.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},r.oncreate=function(e){var r=this;t.prototype.oncreate.call(this,e),this.$().on("shown.bs.dropdown",(function(){r.$(".Dropdown-menu").find("input, select, textarea").first().focus().select()})),this.$('[data-toggle="tooltip"]').tooltip()},r.getButtonContent=function(t){return m("span",{"data-toggle":"tooltip",title:this.attrs.tooltip},ra()(this.attrs.icon))},r.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu FormDropdown"},m("form",{className:"Form",onsubmit:this.onsubmit.bind(this)},this.fields().toArray()))},r.fields=function(){var t=new p.a;return t.add("insert",m(f.a,{type:"submit",className:"Button Button--primary"},app.translator.trans("askvortsov-rich-text.forum.composer.insert_button"))),t},r.onsubmit=function(t){t.preventDefault(),$("body").trigger("click"),this.insert(t),app.composer.editor.focus()},r.insert=function(t){},e}(ca.a),fa=function(t){function e(){return t.apply(this,arguments)||this}Xs(e,t);var r=e.prototype;return r.oninit=function(e){t.prototype.oninit.call(this,e),this.src=p
684a()(""),this.title=pa()("")},r.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:oa()(app.translator.trans("askvortsov-rich-text.forum.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:oa()(app.translator.trans("askvortsov-rich-text.forum.composer.insert_image.title_placeholder")),bidi:this.title})),10),e},r.insert=function(t){this.state.insertNode(this.attrs.node,{src:this.src(),title:this.title()}),this.src(""),this.title("")},e}(ha);var da=function(t){function e(){return t.apply(this,arguments)||this}Xs(e,t);var r=e.prototype;return r.oninit=function(e){var r=this;t.prototype.oninit.call(this,e),this.text=pa()(""),this.href=pa()(""),this.title=pa()(""),this.state.addItem(this.attrs.type,(function(t,e){r.command(t,e)}),this.onEditorUpdate.bind(this))},r.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:oa()(app.translator.trans("askvortsov-rich-text.forum.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:oa()(app.translator.trans("askvortsov-rich-text.forum.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:oa()(app.translator.trans("askvortsov-rich-text.forum.composer.insert_link.title_placeholder")),bidi:this.title})),10),this.active&&e.add("remove",m(f.a,{onclick:this.remove.bind(this),className:"Button Button--danger"},app.translator.trans("askvortsov-rich-text.forum.composer.insert_link.remove_button")),-10),e},r.insert=function(t){var e,r,n,o={href:this.href(),title:this.title()};this.selectionEmpty&&!this.active?(this.command=(e=this.text(),r=this.attrs.mark,n=o,function(t,o){o(t.tr.replaceSelectionWith(t.schema.text(e,[r.create(n)]),!1))}),this.text("")):this.command=wr(this.attrs.mark,o),this.state.run(this.attrs.type)},r.remove=function(t){var e;$("body").trigger("click"),this.command=(e=this.attrs.mark,(t,r)=>{const{tr:n,selection:o}=t;let{from:i,to:s}=o;const{$from:a,empty:c}=o;if(c){const t=dr(a,e);i=t.from,s=t.to}return n.removeMark(i,s,e),r(n)}),this.state.run(this.attrs.type),app.composer.editor.focus()},r.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()},e}(ha),ma=function(t){function e(){return t.apply(this,arguments)||this}Xs(e,t);var r=e.prototype;return r.oninit=function(e){var r=this;e.attrs.command=function(t,n){return kr(e.attrs.listType,r.active?t.schema.nodes.list_item:void 0)(t,n)},t.prototype.oninit.call(this,e)},r.onEditorUpdate=function(){this.active=!!this.state.nodeActive(this.attrs.listType),this.$().toggleClass("active",this.active)},e}(ia);var va=function(t){function e(){return t.apply(this,arguments)||this}Xs(e,t),e.initAttrs=function(t){t.buttonClassName="Button Button--icon Button--link Button--menuDropdown"};var r=e.prototype;return r.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},r.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$('[data-toggle="tooltip"]').tooltip()},r.getButtonContent=function(t){return m("span",{"data-toggle":"tooltip",title:this.attrs.tooltip},ra()(this.attrs.icon))},r.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu HiddenItemsDropdownMenu"},this.attrs.buttons)},e}(ca.a),ga=function(t){function e(){return t.apply(this,arguments)||this}Xs(e,t);var r=e.prototype;return r.oninit=function(e){t.prototype.oninit.call(this,e),this.modifierKey=navigator.userAgent.match(/Macintosh/)?"â":"ctrl"},r.view=function(t){return this.attrs.state?m("div",{class:"ProseMirrorMenu"},this.items().toArray()):""},r.items=function(){var t=new p.a,e=this.attrs.state,r=this.modifierKey;return t.add("text_type",la.component({type:"text_type",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.text_type_tooltip"),state:e,options:[{title:"H1",type:e.getSchema().nodes.heading,attrs:{level:1},tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.header_tooltip",{modifierKey:r,level:1})},{title:"H2",type:e.getSchema().nodes.heading,attrs:{level:2},tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.header_tooltip",{modifierKey:r,level:2})},{title:"H3",type:e.getSchema().nodes.heading,attrs:{level:3},tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.header_tooltip",{modifierKey:r,level:3})},{title:"H4",type:e.getSchema().nodes.heading,attrs:{level:4},tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.header_tooltip",{modifierKey:r,level:4})},{title:"H5",type:e.getSchema().nodes.heading,attrs:{level:5},tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.header_tooltip",{modifierKey:r,level:5})},{title:"H6",type:e.getSchema().nodes.heading,attrs:{level:6},tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.header_tooltip",{modifierKey:r,level:6})},{title:"P",type:e.getSchema().nodes.paragraph,tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.paragraph_tooltip",{modifierKey:r})}]}),100),t.add("bold",sa.component({type:"bold",icon:"fas fa-bold",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.bold_tooltip",{modifierKey:r}),state:e,mark:e.getSchema().marks.strong}),90),t.add("italic",sa.component({type:"italic",icon:"fas fa-italic",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.italic_tooltip",{modifierKey:r}),state:e,mark:e.getSchema().marks.em}),80),t.add("code",sa.component({type:"code",icon:"fas fa-code",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.code_tooltip",{modifierKey:r}),state:e,mark:e.getSchema().marks.code}),70),t.add("quote",ia.component({type:"quote",icon:"fas fa-quote-left",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.quote_tooltip",{modifierKey:r}),state:e,command:We(e.getSchema().nodes.blockquote)}),60),t.add("link",da.component({type:"link",icon:"fas fa-link",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.link_tooltip"),state:e,mark:e.getSchema().marks.link}),50),t.add("image",fa.component({type:"image",icon:"fas fa-image",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.image_tooltip"),state:e,node:e.getSchema().nodes.image}),40),t.add("unordered_list",ma.component({type:"unordered_list",icon:"fas fa-list-ul",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.unordered_list_tooltip",{modifierKey:r}),state:e,listType:e.getSchema().nodes.bullet_list}),30),t.add("ordered_list",ma.component({type:"ordered_list",icon:"fas fa-list-ol",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.ordered_list_tooltip",{modifierKey:r}),state:e,listType:e.getSchema().nodes.ordered_list}),20),t.add("additional_items",va.component({type:"additional_items",icon:"fas fa-plus",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.additional_items_tooltip"),state:e,buttons:this.hiddenItems().toArray()})),t},r.hiddenItems=function(){var t,e,r=new p.a,n=this.attrs.state,o=this.modifierKey;
684return r.add("strike",sa.component({type:"strike",icon:"fas fa-strikethrough",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.strike_tooltip"),state:n,mark:n.getSchema().marks.strike})),r.add("sub",sa.component({type:"sub",icon:"fas fa-subscript",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.sub_tooltip",{modifierKey:o}),state:n,mark:n.getSchema().marks.sub})),r.add("sup",sa.component({type:"sup",icon:"fas fa-superscript",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.sup_tooltip",{modifierKey:o}),state:n,mark:n.getSchema().marks.sup})),r.add("spoiler_inline",sa.component({type:"spoiler_inline",icon:"fas fa-eye-slash",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.spoiler_inline_tooltip",{modifierKey:o}),state:n,mark:n.getSchema().marks.spoiler_inline})),r.add("code_block",ia.component({type:"code_block",icon:"fas fa-terminal",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.code_block_tooltip",{modifierKey:o}),state:n,command:gr(n.getSchema().nodes.code_block,n.getSchema().nodes.paragraph)})),r.add("spoiler_block",ia.component({type:"spoiler_block",icon:"fas fa-caret-square-right",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.spoiler_block_tooltip",{modifierKey:o}),state:n,command:br(n.getSchema().nodes.spoiler)})),r.add("horizontal_rule",ia.component({type:"horizontal_rule",icon:"fas fa-minus",tooltip:app.translator.trans("askvortsov-rich-text.forum.composer.horizontal_rule_tooltip"),state:n,command:(t=n.getSchema().nodes.horizontal_rule,function(r,n){return n(r.tr.replaceSelectionWith(t.create(e))),!0})})),r},e}(ta.a),ya=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;app.editor=this.editorView,Object.keys(this.items).forEach((function(e){t.items[e].onEditorUpdate()}))},e.destroy=function(){},e.markActive=function(t){return function(t,e){const{from:r,$from:n,to:o,empty:i}=t.selection;return i?!!e.isInSet(t.storedMarks||n.marks()):!!t.doc.rangeHasMark(r,o,e)}(this.editorView.state,t)},e.markAttrs=function(t){return function(t,e){const{from:r,to:n}=t.selection;let o=[];t.doc.nodesBetween(r,n,t=>{o=[...o,...t.marks]});const i=o.find(t=>t.type.name===e.name);return i?i.attrs:{}}(this.editorView.state,t)},e.nodeActive=function(t,e){return mr(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}(),ka=0;var ba={CommandButton:ia,FormDropdown:ha,InsertImageDropdown:fa,InsertLinkDropdown:da,ListButton:ma,MarkButton:sa,NodeTypeDropdown:la,ProseMirrorMenu:ga};var wa={commands:{updateToggleMark:function(t,e){return function(r,n){return r.selection.empty?He(t,e)(r,n):wr(t,e)(r,n)}}},markdown:{MarkdownParserBuilder:Js,MarkdownSerializerBuilder:xs,SchemaBuilder:Gs},ProseMirrorEditorDriver:Zs},xa={MenuState:ya};app.initializers.add("askvortsov/flarum-rich-text",(function(){Object(n.extend)(l.a.prototype,"settingsItems",(function(t){t.add("composer",i.a.component({label:app.translator.trans("askvortsov-rich-text.forum.settings.composer_heading"),className:"Settings-composer"},this.composerItems().toArray()))})),l.a.prototype.composerItems=function(){var t=this,e=new p.a;return e.add("useRichTextEditor",a.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},Object(n.extend)(v.a.prototype,"view",(function(t){var e=t.children[0].children[1].children[1].children[0];e.attrs.key=ka,e.key=ka})),Object(n.extend)(y.a.prototype,"controlItems",(function(t){if(app.forum.attribute("toggleRichTextEditorButton")){var e=["Button","Button--icon"];app.session.user.preferences().useRichTextEditor&&e.push("active"),t.add("rich-text",f.a.component({icon:"fas fa-pen-fancy",className:e.join(" "),onclick:function(){app.session.user.savePreferences({useRichTextEditor:!app.session.user.preferences().useRichTextEditor}).then((function(){ka++,m.redraw.sync(),app.composer.editor.focus()}))},title:app.translator.trans("core.forum.composer.preview_tooltip"),oncreate:function(t){return $(t.dom).tooltip()}}),-10)}})),Object(n.extend)(y.a.prototype,"toolbarItems",(function(t){app.session.user.preferences().useRichTextEditor&&(t.remove("markdown"),t.add("prosemirror-menu",m(ga,{state:this.menuState}),100))})),Object(n.extend)(y.a.prototype,"buildEditorParams",(function(t){app.session.user.preferences().useRichTextEditor&&(t.menuState=this.menuState=new ya,t.classNames.push("Post-body"),t.escape=function(){return app.composer.close()})})),Object(n.override)(y.a.prototype,"buildEditor",(function(t,e){return app.session.user.preferences().useRichTextEditor?new Zs(e,this.buildEditorParams()):t(e)}
684))}))}]); 685 686 687flarum.extensions['askvortsov-rich-text']=module.exports 688 689//# sourceMappingURL=https://muziktek.net/assets/forum-2f64dfa9.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.