if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,i;this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a<r.length;a++)if(n=this._input.match(this.rules[r[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,i=a,this.options.backtrack_lexer){if(e=this.test_match(n,r[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,r[i]),e!==!1?e:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,i){switch(n){case 0:break;case 1:return t.yytext=t.yytext.substring(9,t.yytext.length-10),9;case 2:return 23;case 3:return 23;case 4:return 21;case 5:return 22;case 6:return 19;case 7:return 16;case 8:return 15;case 9:return 18;case 10:return 17;case 11:return 20;case 12:return 41;case 13:return 42;case 14:return 39;case 15:return 40;case 16:return this.begin("command"),24;case 17:return this.begin("command"),46;case 18:return this.begin("command"),46;case 19:return 44;case 20:return 28;case 21:return 36;case 22:return 37;case 23:return this.begin("command"),29;case 24:return this.begin("command"),31;case 25:return 32;case 26:return this.begin("command"),33;case 27:return 48;case 28:return 35;case 29:return 13;case 30:return this.popState(),12;case 31:return 12;case 32:return 14;case 33:return 5;case 34:return 11}},rules:[/^(?:\{\*.*\*\})/,/^(?:\{literal\}.*?\{\/literal\})/,/^(?:"([^"]|\\\.)*")/,/^(?:'([^']|\\\.)*')/,/^(?:\$)/,/^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:=)/,/^(?:\{ldelim\})/,/^(?:\{rdelim\})/,/^(?:\{#)/,/^(?:\{@)/,/^(?:\{if )/,/^(?:\{else if )/,/^(?:\{elseif )/,/^(?:\{else\})/,/^(?:\{\/if\})/,/^(?:\{lang\})/,/^(?:\{\/lang\})/,/^(?:\{include )/,/^(?:\{implode )/,/^(?:\{\/implode\})/,/^(?:\{foreach )/,/^(?:\{foreachelse\})/,/^(?:\{\/foreach\})/,/^(?:\{)/,/^(?:\})/,/^(?:\})/,/^(?:\s+)/,/^(?:$)/,/^(?:[^{])/],conditions:{command:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],inclusive:!0},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33,34],inclusive:!0}}};return e}();return m.lexer=g,m}),define("WoltLab/WCF/NumberUtil",[],function(){"use strict";var e={round:function(e,t){return"undefined"==typeof t||0===+t?Math.round(e):(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!==0?0/0:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}};return e}),define("WoltLab/WCF/StringUtil",["Language","./NumberUtil"],function(e,t){"use strict";var n={addThousandsSeparator:function(t){return void 0===e&&(e=require("Language")),String(t).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+e.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(n,i){void 0===e&&(e=require("Language")),n=String(t.round(n,i||-2));var r=n.split(".");return n=this.addThousandsSeparator(r[0]),r.length>1&&(n+=e.get("wcf.global.decimalPoint")+r[1]),n=n.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")}};return n}),define("WoltLab/WCF/Template",["./Template.grammar","./StringUtil","Language"],function(e,t,n){"use strict";function i(){this.yy={}}function r(i){void 0===n&&(n=require("Language"));try{i=e.parse(i),i="var tmp = {};\nfor (var key in v) tmp[key] = v[key];\nv = tmp;\nv.__wcf = window.WCF; v.__window = window;\nreturn "+i,this.fetch=new Function("StringUtil","Language","v",i).bind(void 0,t,n)}catch(r){throw console.debug(r.message),r}}return i.prototype=e,e.Parser=i,e=new i,Object.defineProperty(r,"callbacks",{enumerable:!1,configurable:!1,get:function(){throw new Error("WCF.Template.callbacks is no longer supported")},set:function(){throw new Error("WCF.Template.callbacks is no longer supported")}}),r.prototype={fetch:function(){throw new Error("This Template is not initialized.")}},r}),define("WoltLab/WCF/Language",["Dictionary","./Template"],function(e,t){"use strict";var n=new e,i={addObject:function(t){n.merge(e.fromObject(t))},add:function(e,t){n.set(e,t)},get:function(e,i){i||(i={});var r=n.get(e);return void 0===r?(console.warn("Attempt to retrieve unknown phrase '"+e+"'."),console.warn((new Error).stack),e):("string"==typeof r&&(n.set(e,new t(r)),r=n.get(e)),r instanceof t&&(r=r.fetch(i)),r)}};return i}),define("WoltLab/WCF/CallbackList",["Dictionary"],function(e){"use strict";function t(){this._dictionary=new e}return t.prototype={add:function(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._dictionary.has(e)||this._dictionary.set(e,[]),this._dictionary.get(e).push(t)},remove:function(e){this._dictionary["delete"](e)},forEach:function(e,t){if(null===e)this._dictionary.forEach(function(e){e.forEach(t)});else{var n=this._dictionary.get(e);void 0!==n&&n.forEach(t)}}},t}),define("WoltLab/WCF/Dom/Change/Listener",["CallbackList"],function(e){"use strict";var t=new e,n=!1,i={add:t.add.bind(t),remove:t.remove.bind(t),trigger:function(){if(!n)try{n=!0,t.forEach(null,function(e){e()})}finally{n=!1}}};return i}),define("WoltLab/WCF/Dom/Util",[],function(){"use strict";for(var e="",t=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector"],n=0;4>n;n++)if(Element.prototype.hasOwnProperty(t[n])){e=t[n];break}var i=0,r={createFragmentFromHtml:function(e){var t=elCreate("div");t.innerHTML=e;for(var n=document.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return n},getUniqueId:function(){var e;do e="wcf"+i++;while(null!==elById(e));return e},identify:function(e){if(!(e&&e instanceof Element))return null;var t=elAttr(e,"id");return t||(t=this.getUniqueId(),elAttr(e,"id",t)),t},matches:function(t,n){return t[e](n)},outerHeight:function(e,t){t=t||window.getComputedStyle(e);var n=e.offsetHeight;return n+=~~t.marginTop+~~t.marginBottom},outerWidth:function(e,t){t=t||window.getComputedStyle(e);var n=e.offsetWidth;return n+=~~t.marginLeft+~~t.marginRight},outerDimensions:function(e){var t=window.getComputedStyle(e);return{height:this.outerHeight(e,t),width:this.outerWidth(e,t)}},offset:function(e){var t=e.getBoundingClientRect();return{top:t.top+document.body.scrollTop,left:t.left+document.body.scrollLeft}},prepend:function(e,t){0===t.childElementCount?t.appendChild(e):t.insertBefore(e,t.children[0])},insertAfter:function(e,t){null!==t.nextElementSibling?t.parentNode.insertBefore(e,t.nextElementSibling):t.parentNode.appendChild(e)},setStyles:function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.style.setProperty(n,t[n])},styleAsInt:function(e,t){var n=e.getPropertyValue(t);return null===n?0:parseInt(n)}};return window.bc_wcfDomUtil=r,r}),function(e,t,n){var i=window.matchMedia;"undefined"!=typeof module&&module.exports?module.exports=n(i):"function"==typeof define&&define.amd?define("enquire",[],function(){return t[e]=n(i)}):t[e]=n(i)}("enquire",this,function(e){"use strict";function t(e,t){var n,i=0,r=e.length;for(i;r>i&&(n=t(e[i],i),n!==!1);i++);}function n(e){return"[object Array]"===Object.prototype.toString.apply(e)}function i(e){return"function"==typeof e}function r(e){this.options=e,!e.deferSetup&&this.setup()}function a(t,n){this.query=t,this.isUnconditional=n,this.handlers=[],this.mql=e(t);var i=this;this.listener=function(e){i.mql=e,i.assess()},this.mql.addListener(this.listener)}function o(){if(!e)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!e("only all").matches}return r.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}},a.prototype={addHandler:function(e){var t=new r(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var n=this.handlers;t(n,function(t,i){return t.equals(e)?(t.destroy(),!n.splice(i,1)):void 0})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){t(this.handlers,function(e){e.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";t(this.handlers,function(t){t[e]()})}},o.prototype={register:function(e,r,o){var l=this.queries,s=o&&this.browserIsIncapable;return l[e]||(l[e]=new a(e,s)),i(r)&&(r={match:r}),n(r)||(r=[r]),t(r,function(t){i(t)&&(t={match:t}),l[e].addHandler(t)}),this},unregister:function(e,t){var n=this.queries[e];return n&&(t?n.removeHandler(t):(n.clear(),delete this.queries[e])),this}},new o}),define("WoltLab/WCF/Environment",[],function(){"use strict";var e="other",t="none",n="desktop",i=!1,r={setup:function(){if("object"==typeof window.chrome)e="chrome";else for(var r=window.getComputedStyle(document.documentElement),a=0,o=r.length;o>a;a++){var l=r[a];0===l.indexOf("-ms-")?e="microsoft":0===l.indexOf("-moz-")?e="firefox":0===l.indexOf("-webkit-")&&(e="safari")}var s=window.navigator.userAgent.toLowerCase();-1!==s.indexOf("crios")?(e="chrome",n="ios"):/(?:iphone|ipad|ipod)/.test(s)?(e="safari",n="ios"):-1!==s.indexOf("android")?n="android":-1!==s.indexOf("iemobile")&&(e="microsoft",n="windows"),"desktop"!==n||-1===s.indexOf("mobile")&&-1===s.indexOf("tablet")||(n="mobile"),t="redactor",i=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof DocumentTouch},browser:function(){return e},editor:function(){return t},platform:function(){return n},touch:function(){return i}};return r}),define("WoltLab/WCF/ObjectMap",[],function(){"use strict";function e(){this._map=t?new WeakMap:{key:[],value:[]}}var t=objOwns(window,"WeakMap")&&"function"==typeof window.WeakMap;return e.prototype={set:function(e,n){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof n||null===n)throw new TypeError("Only objects can be used as value");t?this._map.set(e,n):(this._map.key.push(e),this._map.value.push(n))},"delete":function(e){if(t)this._map["delete"](e);else{var n=this._map.key.indexOf(e);this._map.key.splice(n),this._map.value.splice(n)}},has:function(e){return t?this._map.has(e):-1!==this._map.key.indexOf(e)},get:function(e){if(t)return this._map.get(e);var n=this._map.key.indexOf(e);return-1!==n?this._map.value[n]:void 0}},e}),define("WoltLab/WCF/Ui/Confirmation",["Core","Language","Ui/Dialog"],function(e,t,n){"use strict";var i=!1,r=null,a=null,o={},l=null,s={show:function(t){if(void 0===n&&(n=require("Ui/Dialog")),!i){if(o=e.extend({cancel:null,confirm:null,legacyCallback:null,message:"",parameters:{},template:""},t),o.message="string"==typeof o.message?o.message.trim():"",!o.message.length)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof o.confirm&&"function"!=typeof o.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");null===a&&this._createDialog(),a.innerHTML="string"==typeof t.template?t.template.trim():"",l.textContent=o.message,i=!0,n.open(this)}},_dialogSetup:function(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:t.get("wcf.global.confirmation.title")}}},getContentElement:function(){return a},_createDialog:function(){var e=elCreate("div");elAttr(e,"id","wcfSystemConfirmation"),e.classList.add("systemConfirmation"),l=elCreate("p"),e.appendChild(l),a=elCreate("div"),elAttr(a,"id","wcfSystemConfirmationContent"),e.appendChild(a);var i=elCreate("div");i.classList.add("formSubmit"),e.appendChild(i),r=elCreate("button"),r.classList.add("buttonPrimary"),r.textContent=t.get("wcf.global.confirmation.confirm"),r.addEventListener("click",this._confirm.bind(this)),i.appendChild(r);var o=elCreate("button");o.textContent=t.get("wcf.global.confirmation.cancel"),o.addEventListener("click",function(){n.close("wcfSystemConfirmation")}),i.appendChild(o),document.body.appendChild(e)},_confirm:function(){"function"==typeof o.legacyCallback?o.legacyCallback("confirm",o.parameters):o.confirm(o.parameters),i=!1,n.close("wcfSystemConfirmation")},_onClose:function(){i&&(r.blur(),i=!1,"function"==typeof o.legacyCallback?o.legacyCallback("cancel",o.parameters):"function"==typeof o.cancel&&o.cancel(o.parameters))},_onShow:function(){r.blur(),r.focus()}};return s}),define("WoltLab/WCF/Ui/Dialog",["enquire","Ajax","Core","Dictionary","Environment","Language","ObjectMap","Dom/ChangeListener","Dom/Util","Ui/Confirmation"],function(e,t,n,i,r,a,o,l,s,c){"use strict";var u=null,d=null,h=new i,f=new o,p=!1,m=null,g=elByClass("jsStaticDialog"),v={setup:function(){void 0===t&&(t=require("Ajax")),d=elCreate("div"),d.classList.add("dialogOverlay"),elAttr(d,"aria-hidden","true"),d.addEventListener("click",this._closeOnBackdrop.bind(this)),document.body.appendChild(d),m=function(e){return 27===e.keyCode&&"INPUT"!==e.target.nodeName&&"TEXTAREA"!==e.target.nodeName?(this.close(u),!1):!0}.bind(this),e.register("screen and (max-width: 800px)",{match:function(){p=!0},unmatch:function(){p=!1},setup:function(){p=!0},deferSetup:!0}),this._initStaticDialogs(),l.add("Ui/Dialog",this._initStaticDialogs.bind(this))},_initStaticDialogs:function(){for(var e,t,n;g.length;)e=g[0],e.classList.remove("jsStaticDialog"),n=elAttr(e,"data-dialog-id"),n&&(t=elById(n))&&function(e,t){t.classList.remove("jsStaticDialogContent"),e.addEventListener("click",this.openStatic.bind(this,t.id,null,{title:elAttr(t,"data-title")}))}.bind(this)(e,t)},open:function(e,i){var r=f.get(e);if(n.isPlainObject(r))return this.openStatic(r.id,i);if("function"!=typeof e._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");var a=e._dialogSetup();if(!n.isPlainObject(a))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");r={id:a.id};var o=!0;if(void 0===a.source){var l=elById(a.id);if(null===l)throw new Error("Element id '"+a.id+"' is invalid and no source attribute was given.");a.source=document.createDocumentFragment(),a.source.appendChild(l)}else if(null===a.source)a.source=i;else if("function"==typeof a.source)a.source();else if(n.isPlainObject(a.source))t.api(this,a.source.data,function(t){t.returnValues&&"string"==typeof t.returnValues.template&&(this.open(e,t.returnValues.template),"function"==typeof a.source.after&&a.source.after(h.get(a.id).content,t))}.bind(this));else{if("string"==typeof a.source){var l=elCreate("div");elAttr(l,"id",a.id),l.innerHTML=a.source,a.source=document.createDocumentFragment(),a.source.appendChild(l)}if(!a.source.nodeType||a.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");o=!1}return f.set(e,r),this.openStatic(a.id,a.source,a.options,o)},openStatic:function(e,t,i){return h.has(e)?this._updateDialog(e,t):(i=n.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:a.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,disposeOnClose:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},i),i.closable||(i.backdropCloseOnClick=!1),i.closeConfirmMessage&&(i.onBeforeClose=function(e){c.show({confirm:this.close.bind(this,e),message:i.closeConfirmMessage})}.bind(this)),this._createDialog(e,t,i)),h.get(e)},setTitle:function(e,t){var n=h.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");var i=DomTraverse.childrenByTag(n.dialog,"HEADER");DomTraverse.childrenByTag(i[0],"SPAN").textContent=t},_createDialog:function(e,t,n,i){var r=null;if(null===t&&(r=elById(e),null===r))throw new Error("Expected either a HTML string or an existing element id.");var a=elCreate("div");a.classList.add("dialogContainer"),elAttr(a,"aria-hidden","true"),elAttr(a,"role","dialog"),elAttr(a,"data-id",e),n.disposeOnClose&&elAttr(a,"data-dispose-on-close",!0);var o=elCreate("header");if(a.appendChild(o),n.title){var l=s.getUniqueId();elAttr(a,"aria-labelledby",l);var c=elCreate("span");c.classList.add("dialogTitle"),c.textContent=n.title,elAttr(c,"id",l),o.appendChild(c)}if(n.closable){var u=elCreate("a");u.className="dialogCloseButton jsTooltip",elAttr(u,"title",n.closeButtonLabel),elAttr(u,"aria-label",n.closeButtonLabel),u.addEventListener("click",this._close.bind(this)),o.appendChild(u);var f=elCreate("span");f.textContent=n.closeButtonLabel,u.appendChild(f)}var p=elCreate("div");p.classList.add("dialogContent"),n.disableContentPadding&&p.classList.add("dialogContentNoPadding"),a.appendChild(p);var m;null===r?(m=elCreate("div"),"string"==typeof t?m.innerHTML=t:t instanceof DocumentFragment&&("div"!==t.children[0].nodeName||t.childElementCount>1?m.appendChild(t):m=t.children[0]),m.id=e):m=r,p.appendChild(m),"none"===m.style.getPropertyValue("display")&&m.style.removeProperty("display"),h.set(e,{backdropCloseOnClick:n.backdropCloseOnClick,content:m,dialog:a,header:o,onBeforeClose:n.onBeforeClose,onClose:n.onClose,onShow:n.onShow}),s.prepend(a,d),i!==!0&&this._updateDialog(e,null)},_updateDialog:function(e,t){var n=h.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t){n.content.innerHTML="";var i=elCreate("div");i.innerHTML=t,n.content.appendChild(i)}"true"===elAttr(n.dialog,"aria-hidden")&&("true"===elAttr(d,"aria-hidden")&&window.addEventListener("keyup",m),elAttr(n.dialog,"aria-hidden","false"),elAttr(d,"aria-hidden","false"),elAttr(d,"data-close-on-click",n.backdropCloseOnClick?"true":"false"),u=e,this.rebuild(e),"function"==typeof n.onShow&&n.onShow(e)),l.trigger()},rebuild:function(e){var t=h.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("true"!==elAttr(t.dialog,"aria-hidden")){var n=t.content.parentNode,i=elBySel(".formSubmit",t.content),a=0;null!==i?(n.classList.add("dialogForm"),i.classList.add("dialogFormSubmit"),a+=s.outerHeight(i),n.style.setProperty("margin-bottom",a+"px")):n.classList.remove("dialogForm"),a+=s.outerHeight(t.header);var o=window.innerHeight*(p?1:.8)-a;n.style.setProperty("max-height",~~o+"px"),"chrome"===r.browser()&&(t.content.scrollHeight>o?t.content.style.setProperty("margin-right","-1px"):t.content.style.removeProperty("margin-right"))}},_close:function(e){e.preventDefault();var t=h.get(u);return"function"==typeof t.onBeforeClose?(t.onBeforeClose(u),!1):void this.close(u)},_closeOnBackdrop:function(e){return e.target!==d?!0:void("true"===elAttr(d,"data-close-on-click")?this._close(e):e.preventDefault())},close:function(e){if("object"==typeof e){var t=f.get(e);void 0!==t&&(e=t.id)}var n=h.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");"function"==typeof n.onClose&&n.onClose(e),elAttr(n.dialog,"data-dispose-on-close")?setTimeout(function(){"true"===elAttr(n.dialog,"aria-hidden")&&(d.removeChild(n.dialog),h["delete"](e))},5e3):elAttr(n.dialog,"aria-hidden","true"),u=null;for(var i=0;i<d.childElementCount;i++){var r=d.children[i];if("false"===elAttr(r,"aria-hidden")){u=elAttr(r,"data-id");break}}null===u?(elAttr(d,"aria-hidden","true"),elAttr(d,"data-close-on-click","false"),window.removeEventListener("keyup",m)):(n=h.get(u),elAttr(d,"data-close-on-click",n.backdropCloseOnClick?"true":"false"))},getDialog:function(e){return h.get(e)},_ajaxSetup:function(){return{}}};return v}),define("WoltLab/WCF/Ajax/Status",["Language"],function(e){"use strict";var t=0,n=null,i=null,r={_init:function(){n=elCreate("div"),n.classList.add("spinner");var t=elCreate("span");t.className="icon icon48 fa-spinner",n.appendChild(t);var i=elCreate("span");i.textContent=e.get("wcf.global.loading"),n.appendChild(i),document.body.appendChild(n)},show:function(){null===n&&this._init(),t++,null===i&&(i=window.setTimeout(function(){t&&n.classList.add("active"),i=null},250))},hide:function(){t--,0===t&&(null!==i&&window.clearTimeout(i),n.classList.remove("active"))}};return r}),define("WoltLab/WCF/Ajax/Request",["Core","Language","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLab/WCF/Ajax/Status"],function(e,t,n,i,r,a){"use strict";function o(e){this._data=null,this._options={},this._previousXhr=null,this._xhr=null,this._init(e)}var l=!1,s=!1;return o.prototype={_init:function(t){this._options=e.extend({data:{},responseType:"application/json",type:"POST",url:"",autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,failure:null,finalize:null,success:null,callbackObject:null},t),"object"==typeof t.callbackObject&&(this._options.callbackObject=t.callbackObject),this._options.url=e.convertLegacyUrl(this._options.url),this._options.pinData&&(this._data=e.extend({},this._options.data)),null!==this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject))),l===!1&&(l=!0,window.addEventListener("beforeunload",function(){s=!0}))},sendRequest:function(t){(t===!0||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||a.show(),this._xhr instanceof XMLHttpRequest&&(this._previousXhr=this._xhr),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");var n=this,i=e.clone(this._options);if(this._xhr.onload=function(){this.readyState===XMLHttpRequest.DONE&&(this.status>=200&&this.status<300||304===this.status?i.responseType&&i.responseType!==this.getResponseHeader("Content-Type")?n._failure(this,i):n._success(this,i):n._failure(this,i))},this._xhr.onerror=function(){n._failure(this,i)},"POST"===this._options.type){var r=this._options.data;"object"==typeof r&&(r=e.serialize(r)),this._xhr.send(r)}else this._xhr.send()},abortPrevious:function(){null!==this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=null,this._options.silent||a.hide())},setOption:function(e,t){this._options[e]=t},getOption:function(e){return this._options.hasOwnProperty(e)?this._options[e]:null},setData:function(t){null!==this._data&&(t=e.extend(this._data,t)),this._options.data=t},_success:function(e,t){if(t.silent||a.hide(),"function"==typeof t.success){var n=null;if("application/json"===e.getResponseHeader("Content-Type")){try{n=JSON.parse(e.responseText)}catch(i){return void this._failure(e,t)}n&&n.returnValues&&void 0!==n.returnValues.template&&(n.returnValues.template=n.returnValues.template.trim())}t.success(n,e.responseText,e,t.data)}this._finalize(t)},_failure:function(e,n){if(!s){n.silent||a.hide();var o=null;try{o=JSON.parse(e.responseText)}catch(l){}var c=!0;if("function"==typeof n.failure&&(c=n.failure(o,e.responseText,e,n.data)),n.ignoreError!==!0&&c!==!1){var u="",d="";if(null!==o?(o.stacktrace?u="<br /><p>Stacktrace:</p><p>"+o.stacktrace+"</p>":o.exceptionID&&(u="<br /><p>Exception ID: <code>"+o.exceptionID+"</code></p>"),d=o.message):d=e.responseText,!d||"undefined"===d)return;var h='<div class="ajaxDebugMessage"><p>'+d+"</p>"+u+"</div>";r.openStatic(i.getUniqueId(),h,{title:t.get("wcf.global.error.title")})}this._finalize(n)}},_finalize:function(e){"function"==typeof e.finalize&&e.finalize(this._xhr),this._previousXhr=null,n.trigger();for(var t=elBySelAll('a[href*="#"]'),i=0,r=t.length;r>i;i++){var a=t[i],o=elAttr(a,"href");(-1!==o.indexOf("AJAXProxy")||-1!==o.indexOf("ajax-proxy"))&&(o=o.substr(o.indexOf("#")),elAttr(a,"href",document.location.toString().replace(/#.*/,"")+o))}}},o}),define("WoltLab/WCF/Ajax",["AjaxRequest","Core","ObjectMap"],function(e,t,n){"use strict";var i=new n,r={api:function(t,n,r,a){"object"!=typeof n&&(n={});var o=i.get(t);if(void 0===o){if("function"!=typeof t._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");var l=t._ajaxSetup();l.pinData=!0,l.callbackObject=t,l.url||(l.url="index.php/AJAXProxy/?t="+SECURITY_TOKEN),o=new e(l),i.set(t,o)}var s=null,c=null;return"function"==typeof r&&(s=o.getOption("success"),o.setOption("success",r)),"function"==typeof a&&(c=o.getOption("failure"),o.setOption("failure",a)),o.setData(n),o.sendRequest(),null!==s&&o.setOption("success",s),null!==c&&o.setOption("failure",c),o},apiOnce:function(t){t.pinData=!1,t.callbackObject=null,t.url||(t.url="index.php/AJAXProxy/?t="+SECURITY_TOKEN);var n=new e(t);n.sendRequest()}};return r}),function(){var e=function(e){"use strict";function t(e){if(e.paused||e.ended||g)return!1;try{u.clearRect(0,0,s,l),u.drawImage(e,0,0,s,l)}catch(n){}y=setTimeout(t,D.duration,e),M.setIcon(c)}function n(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,n,i){return t+t+n+n+i+i});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:!1}function i(e,t){var n,i={};for(n in e)i[n]=e[n];for(n in t)i[n]=t[n];return i}function r(){return document.hidden||document.msHidden||document.webkitHidden||document.mozHidden}e=e?e:{};var a,o,l,s,c,u,d,h,f,p,m,g,v,b,y,w={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:!1,dataUrl:!1};v={},v.ff="undefined"!=typeof InstallTrigger,v.chrome=!!window.chrome,v.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0,v.ie=!1,v.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,v.supported=v.chrome||v.ff||v.opera;var C=[];m=function(){},h=g=!1;var _=function(){a=i(w,e),a.bgColor=n(a.bgColor),a.textColor=n(a.textColor),a.position=a.position.toLowerCase(),a.animation=D.types[""+a.animation]?a.animation:w.animation;var t=a.position.indexOf("up")>-1,r=a.position.indexOf("left")>-1;if(t||r)for(var h=0;h<D.types[""+a.animation].length;h++){var f=D.types[""+a.animation][h];t&&(f.y=f.y<.6?f.y-.4:f.y-2*f.y+(1-f.w)),r&&(f.x=f.x<.6?f.x-.4:f.x-2*f.x+(1-f.h)),D.types[""+a.animation][h]=f}a.type=L[""+a.type]?a.type:w.type,o=M.getIcon(),c=document.createElement("canvas"),d=document.createElement("img"),o.hasAttribute("href")?(d.setAttribute("src",o.getAttribute("href")),d.onload=function(){l=d.height>0?d.height:32,s=d.width>0?d.width:32,c.height=l,c.width=s,u=c.getContext("2d"),x.ready()}):(d.setAttribute("src",""),l=32,s=32,d.height=l,d.width=s,c.height=l,c.width=s,u=c.getContext("2d"),x.ready())},x={};x.ready=function(){h=!0,x.reset(),m()},x.reset=function(){h&&(C=[],f=!1,p=!1,u.clearRect(0,0,s,l),u.drawImage(d,0,0,s,l),M.setIcon(c),window.clearTimeout(b),window.clearTimeout(y))},x.start=function(){if(h&&!p){var e=function(){f=C[0],p=!1,C.length>0&&(C.shift(),x.start())};if(C.length>0){p=!0;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in C[0].options&&(a[e]=C[0].options[e])}),D.run(C[0].options,function(){e()},!1)};f?D.run(f.options,function(){t()},!0):t()}}};var L={},E=function(e){return e.n="number"==typeof e.n?Math.abs(0|e.n):e.n,e.x=s*e.x,e.y=l*e.y,e.w=s*e.w,e.h=l*e.h,e.len=(""+e.n).length,e};L.circle=function(e){e=E(e);var t=!1;2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),u.clearRect(0,0,s,l),u.drawImage(d,0,0,s,l),u.beginPath(),u.font=a.fontStyle+" "+Math.floor(e.h*(e.n>99?.85:1))+"px "+a.fontFamily,u.textAlign="center",t?(u.moveTo(e.x+e.w/2,e.y),u.lineTo(e.x+e.w-e.h/2,e.y),u.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),u.lineTo(e.x+e.w,e.y+e.h-e.h/2),u.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),u.lineTo(e.x+e.h/2,e.y+e.h),u.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),u.lineTo(e.x,e.y+e.h/2),u.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):u.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),u.fillStyle="rgba("+a.bgColor.r+","+a.bgColor.g+","+a.bgColor.b+","+e.o+")",u.fill(),u.closePath(),u.beginPath(),u.stroke(),u.fillStyle="rgba("+a.textColor.r+","+a.textColor.g+","+a.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?u.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):u.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),u.closePath()},L.rectangle=function(e){e=E(e);var t=!1;2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),u.clearRect(0,0,s,l),u.drawImage(d,0,0,s,l),u.beginPath(),u.font=a.fontStyle+" "+Math.floor(e.h*(e.n>99?.9:1))+"px "+a.fontFamily,u.textAlign="center",u.fillStyle="rgba("+a.bgColor.r+","+a.bgColor.g+","+a.bgColor.b+","+e.o+")",u.fillRect(e.x,e.y,e.w,e.h),u.fillStyle="rgba("+a.textColor.r+","+a.textColor.g+","+a.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?u.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):u.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),u.closePath()};var T=function(e,t){t=("string"==typeof t?{animation:t}:t)||{},m=function(){try{if("number"==typeof e?e>0:""!==e){var i={type:"badge",options:{n:e}};if("animation"in t&&D.types[""+t.animation]&&(i.options.animation=""+t.animation),"type"in t&&L[""+t.type]&&(i.options.type=""+t.type),["bgColor","textColor"].forEach(function(e){e in t&&(i.options[e]=n(t[e]))}),["fontStyle","fontFamily"].forEach(function(e){e in t&&(i.options[e]=t[e])}),C.push(i),C.length>100)throw"Too many badges requests in queue.";x.start()}else x.reset()}catch(r){throw"Error setting badge. Message: "+r.message}},h&&m()},k=function(e){m=function(){try{var t=e.width,n=e.height,i=document.createElement("img"),r=n/l>t/s?t/s:n/l;i.setAttribute("src",e.getAttribute("src")),i.height=n/r,i.width=t/r,u.clearRect(0,0,s,l),u.drawImage(i,0,0,s,l),M.setIcon(c)}catch(a){throw"Error setting image. Message: "+a.message}},h&&m()},A=function(e){m=function(){try{if("stop"===e)return g=!0,x.reset(),void(g=!1);e.addEventListener("play",function(){t(this)},!1)}catch(n){throw"Error setting video. Message: "+n.message}},h&&m()},S=function(e){if(window.URL&&window.URL.createObjectURL||(window.URL=window.URL||{},window.URL.createObjectURL=function(e){return e}),v.supported){var n=!1;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia,m=function(){try{if("stop"===e)return g=!0,x.reset(),void(g=!1);
n=document.createElement("video"),n.width=s,n.height=l,navigator.getUserMedia({video:!0,audio:!1},function(e){n.src=URL.createObjectURL(e),n.play(),t(n)},function(){})}catch(i){throw"Error setting webcam. Message: "+i.message}},h&&m()}},M={};M.getIcon=function(){var e=!1,t=function(){for(var e=document.getElementsByTagName("head")[0].getElementsByTagName("link"),t=e.length,n=t-1;n>=0;n--)if(/(^|\s)icon(\s|$)/i.test(e[n].getAttribute("rel")))return e[n];return!1};return a.element?e=a.element:a.elementId?(e=document.getElementById(a.elementId),e.setAttribute("href",e.getAttribute("src"))):(e=t(),e===!1&&(e=document.createElement("link"),e.setAttribute("rel","icon"),document.getElementsByTagName("head")[0].appendChild(e))),e.setAttribute("type","image/png"),e},M.setIcon=function(e){var t=e.toDataURL("image/png");if(a.dataUrl&&a.dataUrl(t),a.element)a.element.setAttribute("src",t);else if(a.elementId)document.getElementById(a.elementId).setAttribute("src",t);else if(v.ff||v.opera){var n=o;o=document.createElement("link"),v.opera&&o.setAttribute("rel","icon"),o.setAttribute("rel","icon"),o.setAttribute("type","image/png"),document.getElementsByTagName("head")[0].appendChild(o),o.setAttribute("href",t),n.parentNode&&n.parentNode.removeChild(n)}else o.setAttribute("href",t)};var D={};return D.duration=40,D.types={},D.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],D.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],D.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],D.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],D.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],D.run=function(e,t,n,o){var l=D.types[r()?"none":a.animation];return o=n===!0?"undefined"!=typeof o?o:l.length-1:"undefined"!=typeof o?o:0,t=t?t:function(){},o<l.length&&o>=0?(L[a.type](i(e,l[o])),b=setTimeout(function(){n?o-=1:o+=1,D.run(e,t,n,o)},D.duration),M.setIcon(c),void 0):void t()},_(),{badge:T,video:A,image:k,webcam:S,reset:x.reset,browser:{supported:v.supported}}};"undefined"!=typeof define&&define.amd?define("favico",[],function(){return e}):"undefined"!=typeof module&&module.exports?module.exports=e:this.Favico=e}(),function e(t,n,i){function r(o,l){if(!n[o]){if(!t[o]){var s="function"==typeof require&&require;if(!l&&s)return s(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){var n=t[o][1][e];return r(n?n:e)},u,u.exports,e,t,n,i)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(e){"use strict";var t=e("../main");"function"==typeof define&&define.amd?define("perfect-scrollbar",t):(window.PerfectScrollbar=t,"undefined"==typeof window.Ps&&(window.Ps=t))},{"../main":7}],2:[function(e,t,n){"use strict";function i(e,t){var n=e.className.split(" ");n.indexOf(t)<0&&n.push(t),e.className=n.join(" ")}function r(e,t){var n=e.className.split(" "),i=n.indexOf(t);i>=0&&n.splice(i,1),e.className=n.join(" ")}n.add=function(e,t){e.classList?e.classList.add(t):i(e,t)},n.remove=function(e,t){e.classList?e.classList.remove(t):r(e,t)},n.list=function(e){return e.classList?e.classList:e.className.split(" ")}},{}],3:[function(e,t,n){"use strict";function i(e,t){return window.getComputedStyle(e)[t]}function r(e,t,n){return"number"==typeof n&&(n=n.toString()+"px"),e.style[t]=n,e}function a(e,t){for(var n in t){var i=t[n];"number"==typeof i&&(i=i.toString()+"px"),e.style[n]=i}return e}n.e=function(e,t){var n=document.createElement(e);return n.className=t,n},n.appendTo=function(e,t){return t.appendChild(e),e},n.css=function(e,t,n){return"object"==typeof t?a(e,t):"undefined"==typeof n?i(e,t):r(e,t,n)},n.matches=function(e,t){return"undefined"!=typeof e.matches?e.matches(t):"undefined"!=typeof e.matchesSelector?e.matchesSelector(t):"undefined"!=typeof e.webkitMatchesSelector?e.webkitMatchesSelector(t):"undefined"!=typeof e.mozMatchesSelector?e.mozMatchesSelector(t):"undefined"!=typeof e.msMatchesSelector?e.msMatchesSelector(t):void 0},n.remove=function(e){"undefined"!=typeof e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}},{}],4:[function(e,t){"use strict";var n=function(e){this.element=e,this.events={}};n.prototype.bind=function(e,t){"undefined"==typeof this.events[e]&&(this.events[e]=[]),this.events[e].push(t),this.element.addEventListener(e,t,!1)},n.prototype.unbind=function(e,t){var n="undefined"!=typeof t;this.events[e]=this.events[e].filter(function(i){return n&&i!==t?!0:(this.element.removeEventListener(e,i,!1),!1)},this)},n.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var i=function(){this.eventElements=[]};i.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return"undefined"==typeof t&&(t=new n(e),this.eventElements.push(t)),t},i.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},i.prototype.unbind=function(e,t,n){this.eventElement(e).unbind(t,n)},i.prototype.unbindAll=function(){for(var e=0;e<this.eventElements.length;e++)this.eventElements[e].unbindAll()},i.prototype.once=function(e,t,n){var i=this.eventElement(e),r=function(e){i.unbind(t,r),n(e)};i.bind(t,r)},t.exports=i},{}],5:[function(e,t){"use strict";t.exports=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}()},{}],6:[function(e,t,n){"use strict";var i=e("./class"),r=e("./dom");n.toInt=function(e){return"string"==typeof e?parseInt(e,10):~~e},n.clone=function(e){if(null===e)return null;if("object"==typeof e){var t={};for(var n in e)t[n]=this.clone(e[n]);return t}return e},n.extend=function(e,t){var n=this.clone(e);for(var i in t)n[i]=this.clone(t[i]);return n},n.isEditable=function(e){return r.matches(e,"input,[contenteditable]")||r.matches(e,"select,[contenteditable]")||r.matches(e,"textarea,[contenteditable]")||r.matches(e,"button,[contenteditable]")},n.removePsClasses=function(e){for(var t=i.list(e),n=0;n<t.length;n++){var r=t[n];0===r.indexOf("ps-")&&i.remove(e,r)}},n.outerWidth=function(e){return this.toInt(r.css(e,"width"))+this.toInt(r.css(e,"paddingLeft"))+this.toInt(r.css(e,"paddingRight"))+this.toInt(r.css(e,"borderLeftWidth"))+this.toInt(r.css(e,"borderRightWidth"))},n.startScrolling=function(e,t){i.add(e,"ps-in-scrolling"),"undefined"!=typeof t?i.add(e,"ps-"+t):(i.add(e,"ps-x"),i.add(e,"ps-y"))},n.stopScrolling=function(e,t){i.remove(e,"ps-in-scrolling"),"undefined"!=typeof t?i.remove(e,"ps-"+t):(i.remove(e,"ps-x"),i.remove(e,"ps-y"))},n.env={isWebKit:"WebkitAppearance"in document.documentElement.style,supportsTouch:"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,supportsIePointer:null!==window.navigator.msMaxTouchPoints}},{"./class":2,"./dom":3}],7:[function(e,t){"use strict";var n=e("./plugin/destroy"),i=e("./plugin/initialize"),r=e("./plugin/update");t.exports={initialize:i,update:r,destroy:n}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":20}],8:[function(e,t){"use strict";t.exports={wheelSpeed:1,wheelPropagation:!1,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0}},{}],9:[function(e,t){"use strict";var n=e("../lib/dom"),i=e("../lib/helper"),r=e("./instances");t.exports=function(e){var t=r.get(e);t.event.unbindAll(),n.remove(t.scrollbarX),n.remove(t.scrollbarY),n.remove(t.scrollbarXRail),n.remove(t.scrollbarYRail),i.removePsClasses(e),r.remove(e)}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(e,t){"use strict";function n(e,t){function n(e){return e.getBoundingClientRect()}var r=window.Event.prototype.stopPropagation.bind;t.event.bind(t.scrollbarY,"click",r),t.event.bind(t.scrollbarYRail,"click",function(r){var o=i.toInt(t.scrollbarYHeight/2),l=r.pageY-n(t.scrollbarYRail).top-o,s=t.containerHeight-t.scrollbarYHeight,c=l/s;0>c?c=0:c>1&&(c=1),e.scrollTop=(t.contentHeight-t.containerHeight)*c,a(e)}),t.event.bind(t.scrollbarX,"click",r),t.event.bind(t.scrollbarXRail,"click",function(r){var o=i.toInt(t.scrollbarXWidth/2),l=r.pageX-n(t.scrollbarXRail).left-o;console.log(r.pageX,t.scrollbarXRail.offsetLeft);var s=t.containerWidth-t.scrollbarXWidth,c=l/s;0>c?c=0:c>1&&(c=1),e.scrollLeft=(t.contentWidth-t.containerWidth)*c,a(e)})}var i=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],11:[function(e,t){"use strict";function n(e,t){function n(n){var r=i+n,o=t.containerWidth-t.scrollbarXWidth;t.scrollbarXLeft=0>r?0:r>o?o:r;var l=a.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.scrollbarXWidth));e.scrollLeft=l}var i=null,o=null,s=function(t){n(t.pageX-o),l(e),t.stopPropagation(),t.preventDefault()},c=function(){a.stopScrolling(e,"x"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarX,"mousedown",function(n){o=n.pageX,i=a.toInt(r.css(t.scrollbarX,"left")),a.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),n.stopPropagation(),n.preventDefault()})}function i(e,t){function n(n){var r=i+n,o=t.containerHeight-t.scrollbarYHeight;t.scrollbarYTop=0>r?0:r>o?o:r;var l=a.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.scrollbarYHeight));e.scrollTop=l}var i=null,o=null,s=function(t){n(t.pageY-o),l(e),t.stopPropagation(),t.preventDefault()},c=function(){a.stopScrolling(e,"y"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarY,"mousedown",function(n){o=n.pageY,i=a.toInt(r.css(t.scrollbarY,"top")),a.startScrolling(e,"y"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),n.stopPropagation(),n.preventDefault()})}var r=e("../../lib/dom"),a=e("../../lib/helper"),o=e("../instances"),l=e("../update-geometry");t.exports=function(e){var t=o.get(e);n(e,t),i(e,t)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19}],12:[function(e,t){"use strict";function n(e,t){function n(n,i){var r=e.scrollTop;if(0===n){if(!t.scrollbarYActive)return!1;if(0===r&&i>0||r>=t.contentHeight-t.containerHeight&&0>i)return!t.settings.wheelPropagation}var a=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===a&&0>n||a>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}var r=!1;t.event.bind(e,"mouseenter",function(){r=!0}),t.event.bind(e,"mouseleave",function(){r=!1});var o=!1;t.event.bind(t.ownerDocument,"keydown",function(l){if((!l.isDefaultPrevented||!l.isDefaultPrevented())&&r){var s=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(s){for(;s.shadowRoot;)s=s.shadowRoot.activeElement;if(i.isEditable(s))return}var c=0,u=0;switch(l.which){case 37:c=-30;break;case 38:u=30;break;case 39:c=30;break;case 40:u=-30;break;case 33:u=90;break;case 32:case 34:u=-90;break;case 35:u=l.ctrlKey?-t.contentHeight:-t.containerHeight;break;case 36:u=l.ctrlKey?e.scrollTop:t.containerHeight;break;default:return}e.scrollTop=e.scrollTop-u,e.scrollLeft=e.scrollLeft+c,a(e),o=n(c,u),o&&l.preventDefault()}})}var i=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],13:[function(e,t){"use strict";function n(e,t){function n(n,i){var r=e.scrollTop;if(0===n){if(!t.scrollbarYActive)return!1;if(0===r&&i>0||r>=t.contentHeight-t.containerHeight&&0>i)return!t.settings.wheelPropagation}var a=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===a&&0>n||a>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}function r(e){var t=e.deltaX,n=-1*e.deltaY;return("undefined"==typeof t||"undefined"==typeof n)&&(t=-1*e.wheelDeltaX/6,n=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,n*=10),t!==t&&n!==n&&(t=0,n=e.wheelDelta),[t,n]}function o(t,n){var i=e.querySelector("textarea:hover");if(i){var r=i.scrollHeight-i.clientHeight;if(r>0&&!(0===i.scrollTop&&n>0||i.scrollTop===r&&0>n))return!0;var a=i.scrollLeft-i.clientWidth;if(a>0&&!(0===i.scrollLeft&&0>t||i.scrollLeft===a&&t>0))return!0}return!1}function l(l){if(i.env.isWebKit||!e.querySelector("select:focus")){var c=r(l),u=c[0],d=c[1];o(u,d)||(s=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(e.scrollTop=d?e.scrollTop-d*t.settings.wheelSpeed:e.scrollTop+u*t.settings.wheelSpeed,s=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(e.scrollLeft=u?e.scrollLeft+u*t.settings.wheelSpeed:e.scrollLeft-d*t.settings.wheelSpeed,s=!0):(e.scrollTop=e.scrollTop-d*t.settings.wheelSpeed,e.scrollLeft=e.scrollLeft+u*t.settings.wheelSpeed),a(e),s=s||n(u,d),s&&(l.stopPropagation(),l.preventDefault()))}}var s=!1;"undefined"!=typeof window.onwheel?t.event.bind(e,"wheel",l):"undefined"!=typeof window.onmousewheel&&t.event.bind(e,"mousewheel",l)}var i=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],14:[function(e,t){"use strict";function n(e,t){t.event.bind(e,"scroll",function(){r(e)})}var i=e("../instances"),r=e("../update-geometry");t.exports=function(e){var t=i.get(e);n(e,t)}},{"../instances":18,"../update-geometry":19}],15:[function(e,t){"use strict";function n(e,t){function n(){var e=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===e.toString().length?null:e.getRangeAt(0).commonAncestorContainer}function o(){s||(s=setInterval(function(){return r.get(e)?(e.scrollTop=e.scrollTop+c.top,e.scrollLeft=e.scrollLeft+c.left,void a(e)):void clearInterval(s)},50))}function l(){s&&(clearInterval(s),s=null),i.stopScrolling(e)}var s=null,c={top:0,left:0},u=!1;t.event.bind(t.ownerDocument,"selectionchange",function(){e.contains(n())?u=!0:(u=!1,l())}),t.event.bind(window,"mouseup",function(){u&&(u=!1,l())}),t.event.bind(window,"mousemove",function(t){if(u){var n={x:t.pageX,y:t.pageY},r={left:e.offsetLeft,right:e.offsetLeft+e.offsetWidth,top:e.offsetTop,bottom:e.offsetTop+e.offsetHeight};n.x<r.left+3?(c.left=-5,i.startScrolling(e,"x")):n.x>r.right-3?(c.left=5,i.startScrolling(e,"x")):c.left=0,n.y<r.top+3?(c.top=r.top+3-n.y<5?-5:-20,i.startScrolling(e,"y")):n.y>r.bottom-3?(c.top=n.y-r.bottom+3<5?5:20,i.startScrolling(e,"y")):c.top=0,0===c.top&&0===c.left?l():o()}})}var i=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],16:[function(e,t){"use strict";function n(e,t,n,a){function o(n,i){var r=e.scrollTop,a=e.scrollLeft,o=Math.abs(n),l=Math.abs(i);if(l>o){if(0>i&&r===t.contentHeight-t.containerHeight||i>0&&0===r)return!t.settings.swipePropagation}else if(o>l&&(0>n&&a===t.contentWidth-t.containerWidth||n>0&&0===a))return!t.settings.swipePropagation;return!0}function l(t,n){e.scrollTop=e.scrollTop-n,e.scrollLeft=e.scrollLeft-t,r(e)}function s(){y=!0}function c(){y=!1}function u(e){return e.targetTouches?e.targetTouches[0]:e}function d(e){return e.targetTouches&&1===e.targetTouches.length?!0:e.pointerType&&"mouse"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE?!0:!1}function h(e){if(d(e)){w=!0;var t=u(e);m.pageX=t.pageX,m.pageY=t.pageY,g=(new Date).getTime(),null!==b&&clearInterval(b),e.stopPropagation()}}function f(e){if(!y&&w&&d(e)){var t=u(e),n={pageX:t.pageX,pageY:t.pageY},i=n.pageX-m.pageX,r=n.pageY-m.pageY;l(i,r),m=n;var a=(new Date).getTime(),s=a-g;s>0&&(v.x=i/s,v.y=r/s,g=a),o(i,r)&&(e.stopPropagation(),e.preventDefault())}}function p(){!y&&w&&(w=!1,clearInterval(b),b=setInterval(function(){return i.get(e)?Math.abs(v.x)<.01&&Math.abs(v.y)<.01?void clearInterval(b):(l(30*v.x,30*v.y),v.x*=.8,void(v.y*=.8)):void clearInterval(b)},10))}var m={},g=0,v={},b=null,y=!1,w=!1;n&&(t.event.bind(window,"touchstart",s),t.event.bind(window,"touchend",c),t.event.bind(e,"touchstart",h),t.event.bind(e,"touchmove",f),t.event.bind(e,"touchend",p)),a&&(window.PointerEvent?(t.event.bind(window,"pointerdown",s),t.event.bind(window,"pointerup",c),t.event.bind(e,"pointerdown",h),t.event.bind(e,"pointermove",f),t.event.bind(e,"pointerup",p)):window.MSPointerEvent&&(t.event.bind(window,"MSPointerDown",s),t.event.bind(window,"MSPointerUp",c),t.event.bind(e,"MSPointerDown",h),t.event.bind(e,"MSPointerMove",f),t.event.bind(e,"MSPointerUp",p)))}var i=e("../instances"),r=e("../update-geometry");t.exports=function(e,t,r){var a=i.get(e);n(e,a,t,r)}},{"../instances":18,"../update-geometry":19}],17:[function(e,t){"use strict";var n=e("../lib/class"),i=e("../lib/helper"),r=e("./instances"),a=e("./update-geometry"),o=e("./handler/click-rail"),l=e("./handler/drag-scrollbar"),s=e("./handler/keyboard"),c=e("./handler/mouse-wheel"),u=e("./handler/native-scroll"),d=e("./handler/selection"),h=e("./handler/touch");t.exports=function(e,t){t="object"==typeof t?t:{},n.add(e,"ps-container");var f=r.add(e);f.settings=i.extend(f.settings,t),o(e),l(e),c(e),u(e),d(e),(i.env.supportsTouch||i.env.supportsIePointer)&&h(e,i.env.supportsTouch,i.env.supportsIePointer),f.settings.useKeyboard&&s(e),a(e)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(e,t,n){"use strict";function i(e){var t=this;t.settings=d.clone(s),t.containerWidth=null,t.containerHeight=null,t.contentWidth=null,t.contentHeight=null,t.isRtl="rtl"===l.css(e,"direction"),t.event=new c,t.ownerDocument=e.ownerDocument||document,t.scrollbarXRail=l.appendTo(l.e("div","ps-scrollbar-x-rail"),e),t.scrollbarX=l.appendTo(l.e("div","ps-scrollbar-x"),t.scrollbarXRail),t.scrollbarXActive=null,t.scrollbarXWidth=null,t.scrollbarXLeft=null,t.scrollbarXBottom=d.toInt(l.css(t.scrollbarXRail,"bottom")),t.isScrollbarXUsingBottom=t.scrollbarXBottom===t.scrollbarXBottom,t.scrollbarXTop=t.isScrollbarXUsingBottom?null:d.toInt(l.css(t.scrollbarXRail,"top")),t.railBorderXWidth=d.toInt(l.css(t.scrollbarXRail,"borderLeftWidth"))+d.toInt(l.css(t.scrollbarXRail,"borderRightWidth")),t.railXMarginWidth=d.toInt(l.css(t.scrollbarXRail,"marginLeft"))+d.toInt(l.css(t.scrollbarXRail,"marginRight")),t.railXWidth=null,t.scrollbarYRail=l.appendTo(l.e("div","ps-scrollbar-y-rail"),e),t.scrollbarY=l.appendTo(l.e("div","ps-scrollbar-y"),t.scrollbarYRail),t.scrollbarYActive=null,t.scrollbarYHeight=null,t.scrollbarYTop=null,t.scrollbarYRight=d.toInt(l.css(t.scrollbarYRail,"right")),t.isScrollbarYUsingRight=t.scrollbarYRight===t.scrollbarYRight,t.scrollbarYLeft=t.isScrollbarYUsingRight?null:d.toInt(l.css(t.scrollbarYRail,"left")),t.scrollbarYOuterWidth=t.isRtl?d.outerWidth(t.scrollbarY):null,t.railBorderYWidth=d.toInt(l.css(t.scrollbarYRail,"borderTopWidth"))+d.toInt(l.css(t.scrollbarYRail,"borderBottomWidth")),t.railYMarginHeight=d.toInt(l.css(t.scrollbarYRail,"marginTop"))+d.toInt(l.css(t.scrollbarYRail,"marginBottom")),t.railYHeight=null}function r(e){return"undefined"==typeof e.dataset?e.getAttribute("data-ps-id"):e.dataset.psId}function a(e,t){"undefined"==typeof e.dataset?e.setAttribute("data-ps-id",t):e.dataset.psId=t}function o(e){"undefined"==typeof e.dataset?e.removeAttribute("data-ps-id"):delete e.dataset.psId}var l=e("../lib/dom"),s=e("./default-setting"),c=e("../lib/event-manager"),u=e("../lib/guid"),d=e("../lib/helper"),h={};n.add=function(e){var t=u();return a(e,t),h[t]=new i(e),h[t]},n.remove=function(e){delete h[r(e)],o(e)},n.get=function(e){return h[r(e)]}},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(e,t){"use strict";function n(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function i(e,t){var n={width:t.railXWidth};n.left=t.isRtl?e.scrollLeft+t.containerWidth-t.contentWidth:e.scrollLeft,t.isScrollbarXUsingBottom?n.bottom=t.scrollbarXBottom-e.scrollTop:n.top=t.scrollbarXTop+e.scrollTop,a.css(t.scrollbarXRail,n);var i={top:e.scrollTop,height:t.railYHeight};t.isScrollbarYUsingRight?i.right=t.isRtl?t.contentWidth-e.scrollLeft-t.scrollbarYRight-t.scrollbarYOuterWidth:t.scrollbarYRight-e.scrollLeft:i.left=t.isRtl?e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:t.scrollbarYLeft+e.scrollLeft,a.css(t.scrollbarYRail,i),a.css(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),a.css(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}var r=e("../lib/class"),a=e("../lib/dom"),o=e("../lib/helper"),l=e("./instances");t.exports=function(e){var t=l.get(e);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||a.appendTo(t.scrollbarXRail,e),e.contains(t.scrollbarYRail)||a.appendTo(t.scrollbarYRail,e),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.scrollbarXWidth=n(t,o.toInt(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=o.toInt(e.scrollLeft*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):(t.scrollbarXActive=!1,t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=0),!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.scrollbarYHeight=n(t,o.toInt(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=o.toInt(e.scrollTop*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):(t.scrollbarYActive=!1,t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0),t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),i(e,t),r[t.scrollbarXActive?"add":"remove"](e,"ps-active-x"),r[t.scrollbarYActive?"add":"remove"](e,"ps-active-y")}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18}],20:[function(e,t){"use strict";var n=e("../lib/dom"),i=e("./instances"),r=e("./update-geometry");t.exports=function(e){var t=i.get(e);n.css(t.scrollbarXRail,"display","none"),n.css(t.scrollbarYRail,"display","none"),r(e),n.css(t.scrollbarXRail,"display","block"),n.css(t.scrollbarYRail,"display","block")}},{"../lib/dom":3,"./instances":18,"./update-geometry":19}]},{},[1]),define("WoltLab/WCF/Date/Util",["Language"],function(e){"use strict";var t={formatDate:function(t){return this.format(t,e.get("wcf.date.dateFormat"))},formatTime:function(t){return this.format(t,e.get("wcf.date.timeFormat"))},formatDateTime:function(t){return this.format(t,e.get("wcf.date.dateTimeFormat").replace(/%date%/,e.get("wcf.date.dateFormat")).replace(/%time%/,e.get("wcf.date.timeFormat")))},format:function(t,n){var i,r="";"c"===n&&(n="Y-m-dTH:i:sP");for(var a=0,o=n.length;o>a;a++){switch(n[a]){case"s":i=("0"+t.getSeconds().toString()).slice(-2);break;case"i":i=t.getMinutes();break;case"a":i=t.getHours()>11?"pm":"am";break;case"g":i=t.getHours(),0===i?i=12:i>12&&(i-=12);break;case"h":i=t.getHours(),0===i?i=12:i>12&&(i-=12),i=("0"+i.toString()).slice(-2);break;case"A":i=t.getHours()>11?"PM":"AM";break;case"G":i=t.getHours();break;case"H":i=t.getHours(),i=("0"+i.toString()).slice(-2);break;case"d":i=t.getDate(),i=("0"+i.toString()).slice(-2);break;case"j":i=t.getDate();break;case"l":i=e.get("__days")[t.getDay()];break;case"D":i=e.get("__daysShort")[t.getDay()];break;case"S":i="";break;case"m":i=t.getMonth()+1,i=("0"+i.toString()).slice(-2);break;case"n":i=t.getMonth()+1;break;case"F":i=e.get("__months")[t.getMonth()];break;case"M":i=e.get("__monthsShort")[t.getMonth()];break;case"y":i=t.getYear().toString().replace(/^\d{2}/,"");break;case"Y":i=t.getFullYear();break;case"P":var l=t.getTimezoneOffset();i=l>0?"-":"+",l=Math.abs(l),i+=("0"+(~~(l/60)).toString()).slice(-2),i+=":",i+=("0"+(l%60).toString()).slice(-2);break;case"r":i=t.toString();break;case"U":i=Math.round(t.getTime()/1e3);break;default:i=n[a]}r+=i}return r},gmdate:function(){return date instanceof Date||(date=new Date),Math.round(Date.UTC(date.getUTCFullYear(),date.getUTCMonth(),date.getUTCDay(),date.getUTCHours(),date.getUTCMinutes(),date.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var n=new Date(e),i=6e4*n.getTimezoneOffset();return new Date(e+i+t)}};return t}),define("WoltLab/WCF/Timer/Repeating",[],function(){"use strict";function e(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(0>t||t>864e5)throw new RangeError("Invalid delta "+t+". Delta must be in the interval [0, 86400000].");this._callback=e.bind(void 0,this),this._delta=t,this._timer=void 0,this.restart()}return e.prototype={restart:function(){this.stop(),this._timer=setInterval(this._callback,this._delta)},stop:function(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)},setDelta:function(e){this._delta=e,this.restart()}},e}),define("WoltLab/WCF/Date/Time/Relative",["Dom/ChangeListener","Language","WoltLab/WCF/Date/Util","WoltLab/WCF/Timer/Repeating"],function(e,t,n,i){"use strict";var r=elByTag("time"),a=null,o={setup:function(){this._refresh(),new i(this._refresh.bind(this),6e4),e.add("WoltLab/WCF/Date/Time/Relative",this._refresh.bind(this))},_refresh:function(){var e=new Date,i=(e.getTime()-e.getMilliseconds())/1e3;null===a&&(a=i-TIME_NOW);for(var o=0,l=r.length;l>o;o++){var s=r[o];if(s.classList.contains("datetime")&&!elAttr(s,"data-is-future-date")){s.getAttribute("title")||elAttr(s,"title",s.textContent.trim());var c=~~s.getAttribute("data-timestamp")+a,u=elAttr(s,"data-date"),d=elAttr(s,"data-time"),h=elAttr(s,"data-offset");if(c>=i||c+60>i)s.textContent=t.get("wcf.date.relative.now");else if(c+3540>i){var f=Math.max(Math.round((i-c)/60),1);s.textContent=t.get("wcf.date.relative.minutes",{minutes:f})}else if(c+86400>i){var p=Math.round((i-c)/3600);s.textContent=t.get("wcf.date.relative.hours",{hours:p})}else if(c+518400>i){var m=new Date(e.getFullYear(),e.getMonth(),e.getDate()),g=Math.ceil((m/1e3-c)/86400),v=n.getTimezoneDate(1e3*c,1e3*h),b=v.getDay(),y=t.get("__days")[b];s.textContent=t.get("wcf.date.relative.pastDays",{days:g,day:y,time:d})}else s.textContent=t.get("wcf.date.shortDateTimeFormat").replace(/\%date\%/,u).replace(/\%time\%/,d)}}}};return o}),define("WoltLab/WCF/Dom/Traverse",["Dom/Util"],function(e){"use strict";var t=0,n=1,i=2,r=3,a=[function(){return!0},function(t,n){return e.matches(t,n)},function(e,t){return e.classList.contains(t)},function(e,t){return e.nodeName===t}],o=function(e,t,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");for(var i=[],r=0;r<e.childElementCount;r++)a[t](e.children[r],n)&&i.push(e.children[r]);return i},l=function(e,t,n,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");for(e=e.parentNode;e instanceof Element;){if(e===i)return null;if(a[t](e,n))return e;e=e.parentNode}return null},s=function(e,t,n,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");return e instanceof Element&&null!==e[t]&&a[n](e[t],i)?e[t]:null},c={childBySel:function(e,t){return o(e,n,t)[0]||null},childByClass:function(e,t){return o(e,i,t)[0]||null},childByTag:function(e,t){return o(e,r,t)[0]||null},childrenBySel:function(e,t){return o(e,n,t)},childrenByClass:function(e,t){return o(e,i,t)},childrenByTag:function(e,t){return o(e,r,t)},parentBySel:function(e,t,i){return l(e,n,t,i)},parentByClass:function(e,t,n){return l(e,i,t,n)},parentByTag:function(e,t,n){return l(e,r,t,n)},next:function(e){return s(e,"nextElementSibling",t,null)},nextBySel:function(e,t){return s(e,"nextElementSibling",n,t)},nextByClass:function(e,t){return s(e,"nextElementSibling",i,t)},nextByTag:function(e){return s(e,"nextElementSibling",i,className)},prev:function(e){return s(e,"previousElementSibling",t,null)},prevBySel:function(e,t){return s(e,"previousElementSibling",n,t)},prevByClass:function(e,t){return s(e,"previousElementSibling",i,t)},prevByTag:function(e){return s(e,"previousElementSibling",i,className)}};return c}),define("WoltLab/WCF/Ui/Alignment",["Core","Language","Dom/Traverse","Dom/Util"],function(e,t,n,i){"use strict";var r={set:function(r,a,o){o=e.extend({verticalOffset:7,pointer:!1,pointerOffset:4,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},o),Array.isArray(o.pointerClassNames)&&o.pointerClassNames.length===(o.pointer?1:2)||(o.pointerClassNames=[]),-1===["left","right","center"].indexOf(o.horizontal)&&(o.horizontal="left"),"bottom"!==o.vertical&&(o.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(o.allowFlip)&&(o.allowFlip="both"),i.setStyles(r,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important"});var l=i.outerDimensions(r),s=i.outerDimensions(o.refDimensionsElement instanceof Element?o.refDimensionsElement:a),c=i.offset(a),u=window.innerHeight,d=document.body.clientWidth,h={result:null},f=!1;if("center"===o.horizontal&&(f=!0,h=this._tryAlignmentHorizontal(o.horizontal,l,s,c,d),h.result||("both"===o.allowFlip||"horizontal"===o.allowFlip?o.horizontal="left":h.result=!0)),"rtl"===t.get("wcf.global.pageDirection")&&(o.horizontal="left"===o.horizontal?"right":"left"),!h.result){var p=h;if(h=this._tryAlignmentHorizontal(o.horizontal,l,s,c,d),!h.result&&("both"===o.allowFlip||"horizontal"===o.allowFlip)){var m=this._tryAlignmentHorizontal("left"===o.horizontal?"right":"left",l,s,c,d);m.result?h=m:f&&(h=p)}}var g=h.left,v=h.right,b=this._tryAlignmentVertical(o.vertical,l,s,c,u,o.verticalOffset);if(!b.result&&("both"===o.allowFlip||"vertical"===o.allowFlip)){var y=this._tryAlignmentVertical("top"===o.vertical?"bottom":"top",l,s,c,u,o.verticalOffset);y.result&&(b=y)}var w=b.bottom,C=b.top;if(o.pointer){var _=n.childrenByClass(r,"elementPointer");if(_=_[0]||null,null===_)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===h.align?(_.classList.add("center"),_.classList.remove("left"),_.classList.remove("right")):(_.classList.add(h.align),_.classList.remove("center"),_.classList.remove("left"===h.align?"right":"left")),"top"===b.align?_.classList.add("flipVertical"):_.classList.remove("flipVertical")}else if(2===o.pointerClassNames.length){var x=0,L=1;r.classList["auto"===C?"add":"remove"](o.pointerClassNames[L]),r.classList["auto"===g?"add":"remove"](o.pointerClassNames[x])}i.setStyles(r,{bottom:w+("auto"!==w?"px":""),left:g+("auto"!==g?"px":""),right:v+("auto"!==v?"px":""),top:C+("auto"!==C?"px":"")})},_tryAlignmentHorizontal:function(e,t,n,i,r){var a="auto",o="auto",l=!0;return"left"===e?(a=i.left,a+t.width>r&&(l=!1)):"right"===e?(o=r-(i.left+n.width),0>o&&(l=!1)):(a=i.left+n.width/2-t.width/2,a=~~a,(0>a||a+t.width>r)&&(l=!1)),{align:e,left:a,right:o,result:l}
},_tryAlignmentVertical:function(e,t,n,i,r,a){var o="auto",l="auto",s=!0;if("top"===e){var c=document.body.clientHeight;o=c-i.top+a,c-(o+t.height)<document.body.scrollTop&&(s=!1)}else l=i.top+n.height+a,l+t.height>r&&(s=!1);return{align:e,bottom:o,top:l,result:s}}};return r}),define("WoltLab/WCF/Ui/CloseOverlay",["CallbackList"],function(e){"use strict";var t=new e,n={setup:function(){document.body.addEventListener("click",this.execute.bind(this))},add:t.add.bind(t),remove:t.remove.bind(t),execute:function(){t.forEach(null,function(e){e()})}};return n.setup(),n}),define("WoltLab/WCF/Ui/Dropdown/Simple",["CallbackList","Core","Dictionary","Ui/Alignment","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/CloseOverlay"],function(e,t,n,i,r,a,o,l){"use strict";var s=null,c=new e,u=!1,d=new n,h=new n,f=null,p={setup:function(){u||(u=!0,f=elCreate("div"),elAttr(f,"id","dropdownMenuContainer"),document.body.appendChild(f),s=elByClass("dropdownToggle"),this.initAll(),l.add("WoltLab/WCF/Ui/Dropdown/Simple",this.closeAll.bind(this)),r.add("WoltLab/WCF/Ui/Dropdown/Simple",this.initAll.bind(this)),document.addEventListener("scroll",this._onScroll.bind(this)),window.bc_wcfSimpleDropdown=this)},initAll:function(){for(var e=0,t=s.length;t>e;e++)this.init(s[e],!1)},init:function(e,n){if(this.setup(),e.classList.contains("jsDropdownEnabled")||elAttr(e,"data-target"))return!1;var i=a.parentByClass(e,"dropdown");if(null===i)throw new Error("Invalid dropdown passed, button '"+o.identify(e)+"' does not have a parent with .dropdown.");var r=a.nextByClass(e,"dropdownMenu");if(null===r)throw new Error("Invalid dropdown passed, button '"+o.identify(e)+"' does not have a menu as next sibling.");f.appendChild(r);var l=o.identify(i);d.has(l)||(e.classList.add("jsDropdownEnabled"),e.addEventListener("click",this._toggle.bind(this)),d.set(l,i),h.set(l,r),l.match(/^wcf\d+$/)||elAttr(r,"data-source",l)),elAttr(e,"data-target",l),n&&setTimeout(function(){t.triggerEvent(e,"click")},10)},initFragment:function(e,t){if(this.setup(),!d.has(e)){var n=o.identify(e);d.set(n,e),f.appendChild(t),h.set(n,t)}},registerCallback:function(e,t){c.add(e,t)},getDropdown:function(e){return d.get(e)},getDropdownMenu:function(e){return h.get(e)},toggleDropdown:function(e){this._toggle(null,e)},setAlignment:function(e,t){var n=elBySel(".dropdownToggle",e),r=null;null!==n&&n.classList.contains("dropdownCaptionTextarea")&&(r=n),i.set(t,e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:r})},setAlignmentById:function(e){var t=d.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");var n=h.get(e);this.setAlignment(t,n)},isOpen:function(e){var t=h.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")?!0:!1},open:function(e){var t=h.get(e);void 0===t||t.classList.contains("dropdownOpen")||this.toggleDropdown(e)},close:function(e){var t=d.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),h.get(e).classList.remove("dropdownOpen"))},closeAll:function(){d.forEach(function(e,t){e.classList.contains("dropdownOpen")&&(e.classList.remove("dropdownOpen"),h.get(t).classList.remove("dropdownOpen"),this._notifyCallbacks(t,"close"))}.bind(this))},destroy:function(e){if(!d.has(e))return!1;this.close(e);var t=h.get(e);return h.parentNode.removeChild(t),h["delete"](e),d["delete"](e),!0},_onDialogScroll:function(e){for(var t=e.currentTarget,n=elBySelAll(".dropdown.dropdownOpen",t),i=0,r=n.length;r>i;i++){var a=n[i],l=o.identify(a),s=o.offset(a),c=o.offset(t);s.top+a.clientHeight<=c.top?this.toggleDropdown(l):s.top>=c.top+t.offsetHeight?this.toggleDropdown(l):s.left<=c.left?this.toggleDropdown(l):s.left>=c.left+t.offsetWidth?this.toggleDropdown(l):this.setAlignment(l,h.get(l))}},_onScroll:function(){d.forEach(function(e,t){elAttr(e,"data-is-overlay-dropdown-button")===!0&&e.classList.contains("dropdownOpen")&&this.setAlignment(e,h.get(t))}.bind(this))},_notifyCallbacks:function(e,t){c.forEach(e,function(n){n(e,t)})},_toggle:function(e,t){null!==e&&(e.preventDefault(),e.stopPropagation(),t=elAttr(e.currentTarget,"data-target"));var n=d.get(t);if(void 0!==n&&null===elAttr(n,"data-is-overlay-dropdown-button")){var i=a.parentByClass(n,"dialogContent");elAttr(n,"data-is-overlay-dropdown-button",null!==i),null!==i&&i.addEventListener("scroll",this._onDialogScroll.bind(this))}return d.forEach(function(e,n){var i=h.get(n);e.classList.contains("dropdownOpen")?(e.classList.remove("dropdownOpen"),i.classList.remove("dropdownOpen"),this._notifyCallbacks(n,"close")):n===t&&i.childElementCount>0&&(e.classList.add("dropdownOpen"),i.classList.add("dropdownOpen"),this._notifyCallbacks(n,"open"),this.setAlignment(e,i))}.bind(this)),WCF.Dropdown.Interactive.Handler.closeAll(),null===e}};return p}),define("WoltLab/WCF/Ui/Mobile",["enquire","Environment","Language","Dom/ChangeListener","Dom/Traverse","Ui/CloseOverlay"],function(e,t,n,i,r,a){"use strict";var o=null,l=!1,s=null,c=null,u={setup:function(){o=elByClass("buttonGroupNavigation"),s=elById("main"),c=elBySel("#main > div > div > .sidebar",s),t.touch()&&document.documentElement.classList.add("touch"),"desktop"!==t.platform()&&document.documentElement.classList.add("mobile"),e.register("screen and (max-width: 800px)",{match:this.enable.bind(this),unmatch:this.disable.bind(this),setup:this._init.bind(this),deferSetup:!0}),"microsoft"===t.browser()&&null!==c&&c.clientWidth>305&&this._fixSidebarIE()},enable:function(){l=!0,"microsoft"===t.browser()&&this._fixSidebarIE()},disable:function(){l=!1,"microsoft"===t.browser()&&this._fixSidebarIE()},_fixSidebarIE:function(){null!==c&&(c.style.setProperty("display","none"),c.style.removeProperty("display"))},_init:function(){this._initSidebarToggleButtons(),this._initSearchBar(),this._initButtonGroupNavigation(),a.add("WoltLab/WCF/Ui/Mobile",this._closeAllMenus.bind(this)),i.add("WoltLab/WCF/Ui/Mobile",this._initButtonGroupNavigation.bind(this))},_initSidebarToggleButtons:function(){if(null!==c){var e=s.classList.contains("sidebarOrientationLeft")?"Left":"";if(e=e?e:s.classList.contains("sidebarOrientationRight")?"Right":""){var t="wcf.global.sidebar.show"+e+"Sidebar";(t===n.get(t)||""===n.get(t))&&(t=elCreate("span"),t.className="icon icon16 fa-angle-double-"+e.toLowerCase());var i="wcf.global.sidebar.hide"+e+"Sidebar";(i===n.get(i)||""===n.get(i))&&(i=elCreate("span"),i.className="icon icon16 fa-angle-double-"+("Left"===e?"right":"left"));var r=elCreate("span");r.className="button small mobileSidebarToggleButton",r.addEventListener("click",function(){s.classList.add("mobileShowSidebar")}),t instanceof Element?r.appendChild(t):r.textContent=t;var a=elCreate("span");a.className="button small mobileSidebarToggleButton",a.addEventListener("click",function(){s.classList.remove("mobileShowSidebar")}),i instanceof Element?a.appendChild(i):a.textContent=i,elBySel(".content").appendChild(r),c.appendChild(a)}}},_initSearchBar:function(){var e=elBySel(".searchBar");e.addEventListener("click",function(){return l?(e.classList.add("searchBarOpen"),!1):!1}),s.addEventListener("click",function(){e.classList.remove("searchBarOpen")})},_initButtonGroupNavigation:function(){for(var e=0,t=o.length;t>e;e++){var n=o[e];if(!n.classList.contains("jsMobileButtonGroupNavigation")){n.classList.add("jsMobileButtonGroupNavigation");var i=elCreate("a");i.classList.add("dropdownLabel");var a=elCreate("span");a.className="icon icon24 fa-list",i.appendChild(a),i.addEventListener("click",function(e){var t=r.next(i);return null!==t?(t.classList.toggle("open"),e.stopPropagation(),!1):!0}),n.insertBefore(i,n.firstChild)}}},_closeAllMenus:function(){for(var e=elBySelAll(".jsMobileButtonGroupNavigation > ul.open"),t=0,n=e.length;n>t;t++)e[t].classList.remove("open")}};return u}),define("WoltLab/WCF/Event/Handler",["Core","Dictionary"],function(e,t){"use strict";var n=new t,i={add:function(i,r,a){if("function"!=typeof a)throw new TypeError("[WoltLab/WCF/Event/Handler] Expected a valid callback for '"+r+"@"+i+"'.");var o=n.get(i);void 0===o&&(o=new t,n.set(i,o));var l=o.get(r);void 0===l&&(l=new t,o.set(r,l));var s=e.getUuid();return l.set(s,a),s},fire:function(e,t,i){i=i||{};var r=n.get(e);if(void 0!==r){var a=r.get(t);void 0!==a&&a.forEach(function(e){e(i)})}},remove:function(e,t,i){var r=n.get(e);if(void 0!==r){var a=r.get(t);void 0!==a&&a["delete"](i)}},removeAll:function(e,t){"string"!=typeof t&&(t=void 0);var i=n.get(e);void 0!==i&&("undefined"==typeof t?n["delete"](e):i["delete"](t))}};return i}),define("WoltLab/WCF/Ui/TabMenu/Simple",["Dictionary","Dom/Traverse","Dom/Util","EventHandler"],function(e,t,n,i){"use strict";function r(t){this._container=t,this._containers=new e,this._isLegacy=null,this._tabs=new e}return r.prototype={validate:function(){if(!this._container.classList.contains("tabMenuContainer"))return!1;var e=t.childByTag(this._container,"NAV");if(null===e)return!1;var i=elByTag("li",e);if(null===i.length)return!1;for(var r,a,o=t.childrenByTag(this._container,"DIV"),l=0,s=o.length;s>l;l++)r=o[l],a=elAttr(r,"data-name"),a||(a=n.identify(r)),elAttr(r,"data-name",a),this._containers.set(a,r);for(var c,u=this._container.id,l=0,s=i.length;s>l;l++)if(c=i[l],a=this._getTabName(c)){if(this._tabs.has(a))throw new Error("Tab names must be unique, li[data-name='"+a+"'] (tab menu id: '"+u+"') exists more than once.");if(r=this._containers.get(a),void 0===r)throw new Error("Expected content element for li[data-name='"+a+"'] (tab menu id: '"+u+"').");if(r.parentNode!==this._container)throw new Error("Expected content element '"+a+"' (tab menu id: '"+u+"') to be a direct children.");if(1!==c.childElementCount||"A"!==c.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+a+"'] (tab menu id: '"+u+"').");this._tabs.set(a,c)}if(!this._tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+u+"').");return this._isLegacy&&(elAttr(this._container,"data-is-legacy",!0),this._tabs.forEach(function(e,t){elAttr(e,"aria-controls",t)})),!0},init:function(e){e=e||null,this._tabs.forEach(function(t){e&&e.get(elAttr(t,"data-name"))===t||t.children[0].addEventListener("click",this._onClick.bind(this))}.bind(this));var t=null;if(!e){var n=window.location.hash.replace(/^#/,""),i=null;if(""!==n&&(i=this._tabs.get(n),i&&this._container.parentNode.classList.contains("tabMenuContainer")&&(t=this._container)),!i){var r=elAttr(this._container,"data-preselect");"true"!==r&&r||(r=!0),r===!0?this._tabs.forEach(function(e){i||e.previousElementSibling||(i=e)}):"false"!==r&&(i=this._tabs.get(r))}i&&(this._containers.forEach(function(e){e.classList.add("hidden")}),this.select(null,i,!0))}return t},select:function(e,t,n){if(t=t||this._tabs.get(e),!t){if(~~e==e){e=~~e;var r=0;this._tabs.forEach(function(n){r===e&&(t=n),r++})}if(!t)throw new Error("Expected a valid tab name, '"+e+"' given (tab menu id: '"+this._container.id+"').")}e=e||elAttr(t,"data-name");var a=elBySel("#"+this._container.id+" > nav > ul > li.active"),o=null;a&&(a.classList.remove("active"),o=this._containers.get(elAttr(a,"data-name")),o.classList.remove("active"),o.classList.add("hidden"),this._isLegacy&&(a.classList.remove("ui-state-active"),o.classList.remove("ui-state-active"))),t.classList.add("active");var l=this._containers.get(e);if(l.classList.add("active"),this._isLegacy&&(t.classList.add("ui-state-active"),l.classList.add("ui-state-active"),l.classList.remove("hidden")),!n){i.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"select",{active:t,activeName:e,previous:a,previousName:a?elAttr(a,"data-name"):null});var s=this._isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;s&&s(this._container).trigger("wcftabsbeforeactivate",{newTab:s(t),oldTab:s(a),newPanel:s(l),oldPanel:s(o)}),window.history.replaceState(void 0,void 0,window.location.href.replace(/#[^#]+$/,"")+"#"+e)}},rebuild:function(){var t=new e;t.merge(this._tabs),this.validate(),this.init(t)},_onClick:function(e){e.preventDefault(),this.select(null,e.currentTarget.parentNode)},_getTabName:function(e){var t=elAttr(e,"data-name");return t||1===e.childElementCount&&"A"===e.children[0].nodeName&&e.children[0].href.match(/#([^#]+)$/)&&(t=RegExp.$1,null===elById(t)?t=null:(this._isLegacy=!0,elAttr(e,"data-name",t))),t},getContainers:function(){return this._containers},getTabs:function(){return this._tabs}},r}),define("WoltLab/WCF/Ui/TabMenu",["Dictionary","Dom/ChangeListener","Dom/Util","./TabMenu/Simple"],function(e,t,n,i){"use strict";var r=new e,a={setup:function(){this._init(),this._selectErroneousTabs(),t.add("WoltLab/WCF/Ui/TabMenu",this._init.bind(this))},_init:function(){for(var e,t,a,o,l=elBySelAll(".tabMenuContainer:not(.staticTabMenuContainer)"),s=0,c=l.length;c>s;s++)e=l[s],t=n.identify(e),r.has(t)||(o=new i(e),o.validate()&&(a=o.init(),r.set(t,o),a instanceof Element&&(o=this.getTabMenu(a.parentNode.id),o.select(a.id,null,!0))))},_selectErroneousTabs:function(){r.forEach(function(e){var t=!1;e.getContainers().forEach(function(n){!t&&elByClass("formError",n).length&&(t=!0,e.select(n.id))})})},getTabMenu:function(e){return r.get(e)}};return a}),define("WoltLab/WCF/Ui/FlexibleMenu",["Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,n,i,r,a){"use strict";var o=new t,l=new t,s=new t,c=new t,u={setup:function(){null!==elById("mainMenu")&&this.register("mainMenu");var e=elBySel(".navigationHeader");null!==e&&this.register(r.identify(e)),window.addEventListener("resize",this.rebuildAll.bind(this)),n.add("WoltLab/WCF/Ui/FlexibleMenu",this.registerTabMenus.bind(this))},register:function(e){var t=elById(e);if(null===t)throw"Expected a valid element id, '"+e+"' does not exist.";if(!o.has(e)){var n=i.childByTag(t,"UL");if(null===n)throw"Expected an <ul> element as child of container '"+e+"'.";o.set(e,t),c.set(e,n),this.rebuild(e)}},registerTabMenus:function(){for(var e=elBySelAll(".tabMenuContainer:not(.jsFlexibleMenuEnabled), .messageTabMenu:not(.jsFlexibleMenuEnabled)"),t=0,n=e.length;n>t;t++){var a=e[t],o=i.childByTag(a,"NAV");null!==o&&(a.classList.add("jsFlexibleMenuEnabled"),this.register(r.identify(o)))}},rebuildAll:function(){o.forEach(function(e,t){this.rebuild(t)}.bind(this))},rebuild:function(t){var n=o.get(t);if(void 0===n)throw"Expected a valid element id, '"+t+"' is unknown.";var u=window.getComputedStyle(n),d=n.parentNode.clientWidth;d-=r.styleAsInt(u,"margin-left"),d-=r.styleAsInt(u,"margin-right");var h=c.get(t),f=i.childrenByTag(h,"LI"),p=l.get(t),m=0;if(void 0!==p){for(var g=0,v=f.length;v>g;g++){var b=f[g];b.classList.contains("dropdown")||b.style.removeProperty("display")}null!==p.parentNode&&(m=r.outerWidth(p))}var y=h.scrollWidth-m,w=[];if(y>d)for(var g=f.length-1;g>=0;g--){var b=f[g];if(!(b.classList.contains("dropdown")||b.classList.contains("active")||b.classList.contains("ui-state-active"))&&(w.push(b),b.style.setProperty("display","none"),h.scrollWidth<d))break}if(w.length){var C;if(void 0===p){p=elCreate("li"),p.className="dropdown jsFlexibleMenuDropdown";var _=elCreate("a");_.className="icon icon16 fa-list",p.appendChild(_),C=elCreate("ul"),C.classList.add("dropdownMenu"),p.appendChild(C),l.set(t,p),s.set(t,C),a.init(_)}else C=s.get(t);null===p.parentNode&&h.appendChild(p);var x=document.createDocumentFragment(),L=this;w.forEach(function(n){var i=elCreate("li");i.innerHTML=n.innerHTML,i.addEventListener("click",function(i){i.preventDefault(),e.triggerEvent(n.querySelector("a"),"click"),setTimeout(function(){L.rebuild(t)},59)}.bind(this)),x.appendChild(i)}),C.innerHTML="",C.appendChild(x)}else void 0!==p&&null!==p.parentNode&&p.parentNode.removeChild(p)}};return u}),define("WoltLab/WCF/Ui/Tooltip",["Environment","Dom/ChangeListener","Ui/Alignment"],function(e,t,n){"use strict";var i=null,r=null,a=null,o=null,l={setup:function(){"desktop"===e.platform()&&(o=elCreate("div"),elAttr(o,"id","balloonTooltip"),o.classList.add("balloonTooltip"),a=elCreate("span"),elAttr(a,"id","balloonTooltipText"),o.appendChild(a),r=elCreate("span"),r.classList.add("elementPointer"),r.appendChild(elCreate("span")),o.appendChild(r),document.body.appendChild(o),i=elByClass("jsTooltip"),this.init(),t.add("WoltLab/WCF/Ui/Tooltip",this.init.bind(this)))},init:function(){for(;i.length;){var e=i[0];e.classList.remove("jsTooltip");var t=elAttr(e,"title");t="string"==typeof t?t.trim():"",t.length&&(elAttr(e,"data-tooltip",t),e.removeAttribute("title"),e.addEventListener("mouseenter",this._mouseEnter.bind(this)),e.addEventListener("mouseleave",this._mouseLeave.bind(this)),e.addEventListener("click",this._mouseLeave.bind(this)))}},_mouseEnter:function(e){var t=e.currentTarget,i=elAttr(t,"title");return i="string"==typeof i?i.trim():"",""!==i&&(elAttr(t,"data-tooltip",i),t.removeAttribute("title")),i=elAttr(t,"data-tooltip"),o.style.removeProperty("top"),o.style.removeProperty("left"),i.length?(o.classList.add("active"),a.textContent=i,void n.set(o,t,{horizontal:"center",pointer:!0,pointerClassNames:["inverse"],vertical:"top"})):void o.classList.remove("active")},_mouseLeave:function(){o.classList.remove("active")}};return l}),define("WoltLab/WCF/Date/Picker",["DateUtil","Language","ObjectMap","Dom/ChangeListener","Ui/Alignment","WoltLab/WCF/Ui/CloseOverlay"],function(e,t,n,i,r,a){"use strict";var o=!1,l=0,s=new n,c=null,u=0,d=0,h=[],f=null,p=null,m=null,g=null,v=null,b=null,y=null,w=null,C=null,_=null,x={init:function(){this._setup();for(var t=elBySelAll('input[type="date"]:not(.inputDatePicker), input[type="datetime"]:not(.inputDatePicker)'),n=new Date,i=0,r=t.length;r>i;i++){var a=t[i];a.classList.add("inputDatePicker"),a.readOnly=!0;var o="datetime"===elAttr(a,"type");elAttr(a,"data-is-date-time",o);var l=null,c=elAttr(a,"value");elAttr(a,"value")&&(l=new Date(c),elAttr(a,"data-value",l.getTime()),c=e["formatDate"+(o?"Time":"")](l));var u=0===c.length;if(a.classList.contains("birthday")&&(elAttr(a,"data-min-date","100"),elAttr(a,"data-max-date","now")),this._initDateRange(a,n,!0),this._initDateRange(a,n,!1),elAttr(a,"data-min-date")===elAttr(a,"data-max-date"))throw new Error("Minimum and maximum date cannot be the same (element id '"+a.id+"').");a.type="text",a.value=c,elAttr(a,"data-empty",u),elAttr(a,"data-placeholder")&&elAttr(a,"placeholder",elAttr(a,"data-placeholder"));var d=elCreate("input");d.id=a.id+"DatePicker",d.name=a.name,d.type="hidden",null!==l&&(d.value=e.format(l,o?"c":"Y-m-d")),a.parentNode.insertBefore(d,a),a.removeAttribute("name"),a.addEventListener("click",_);var h=elCreate("div");h.className="inputAddon";var f=elCreate("a");f.className="inputSuffix",f.addEventListener("click",_),h.appendChild(f);var p=elCreate("span");p.className="icon icon16 fa-calendar",f.appendChild(p),a.parentNode.insertBefore(h,a),h.insertBefore(a,f),s.set(a,{shadow:d,isDateTime:o,isEmpty:u,onClose:null})}},_initDateRange:function(e,t,n){var i="data-"+(n?"min":"max")+"-date",r=e.hasAttribute(i)?elAttr(e,i).trim():"";if(r.match(/^(\d{4})-(\d{2})-(\d{2})$/))r=new Date(r).getTime();else if("now"===r)r=t.getTime();else if(r.match(/^\d{1,3}$/)){var a=new Date(t.getTime());a.setFullYear(a.getFullYear()+~~r*(n?-1:1)),r=a.getTime()}else if(r.match(/^datePicker-(.+)$/)){if(r=RegExp.$1,null===elById(r))throw new Error("Reference date picker identified by '"+r+"' does not exists (element id: '"+e.id+"').")}else r=new Date(n?1970:2038,0,1).getTime();elAttr(e,i,r)},_setup:function(){o||(o=!0,l=~~t.get("wcf.date.firstDayOfTheWeek"),_=this._open.bind(this),i.add("WoltLab/WCF/Date/Picker",this.init.bind(this)),a.add("WoltLab/WCF/Date/Picker",this._close.bind(this)))},_open:function(e){e.preventDefault(),e.stopPropagation(),this._createPicker();var t="INPUT"===e.currentTarget.nodeName?e.currentTarget:e.currentTarget.previousElementSibling;if(t!==c){c=t;var n,i=s.get(c),a=elAttr(c,"data-value");a?(n=new Date(+a),"Invalid Date"===n.toString()&&(n=new Date)):n=new Date,d=elAttr(c,"data-min-date"),d.match(/^datePicker-(.+)$/)&&(d=elById(RegExp.$1).getAttribute("data-value")),d=new Date(+d),u=elAttr(c,"data-max-date"),u.match(/^datePicker-(.+)$/)&&(u=elById(RegExp.$1).getAttribute("data-value")),u=new Date(+u),i.isDateTime&&(p.value=n.getHours(),m.value=n.getMinutes()),this._renderPicker(n.getDate(),n.getMonth(),n.getFullYear()),r.set(C,c,{pointer:!0})}},_close:function(){if(null!==C&&C.classList.contains("active")){C.classList.remove("active");var e=s.get(c);"function"==typeof e.onClose&&e.onClose(),c=null,d=0,u=0}},_renderPicker:function(e,t,n){this._renderGrid(e,t,n);for(var i="",r=d.getFullYear(),a=u.getFullYear();a>=r;r++)i+='<option value="'+r+'">'+r+"</option>";w.innerHTML=i,w.value=n,g.value=t,C.classList.add("active")},_renderGrid:function(e,t,n){var i,r=void 0!==e,a=void 0!==t;if(e=~~e||~~f.getAttribute("data-day"),t=~~t,n=~~n,a||n){var o=0!==n,s=document.createDocumentFragment();s.appendChild(f),a||(t=~~f.getAttribute("data-month")),n=n||~~f.getAttribute("data-year");var c=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(d>c?(n=d.getFullYear(),t=d.getMonth(),e=d.getDate(),g.value=t,w.value=n,o=!0):c>u&&(n=u.getFullYear(),t=u.getMonth(),e=u.getDate(),g.value=t,w.value=n,o=!0),c=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-01");c.getDay()!==l;)c.setDate(c.getDate()-1);for(var p,m=0;35>m;m++)i=h[m],i.textContent=c.getDate(),p=c.getMonth()===t,p&&(d>c?p=!1:c>u&&(p=!1)),i.classList[p?"remove":"add"]("otherMonth"),c.setDate(c.getDate()+1);if(elAttr(f,"data-month",t),elAttr(f,"data-year",n),C.insertBefore(s,y),!r&&(c=new Date(n,t,e),c.getDate()!==e)){for(;c.getMonth()!==t;)c.setDate(c.getDate()-1);e=c.getDate()}if(o){for(var m=0;12>m;m++){var _=g.children[m];_.disabled=n===d.getFullYear()&&_.value<d.getMonth()||n===u.getFullYear()&&_.value>u.getMonth()}var x=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-01");x.setMonth(x.getMonth()+1),v.classList[u>x?"add":"remove"]("active");var L=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-01");L.setDate(L.getDate()-1),b.classList[L>d?"add":"remove"]("active")}}if(e){for(var m=0;35>m;m++)i=h[m],i.classList[i.classList.contains("otherMonth")||~~i.textContent!==e?"remove":"add"]("active");elAttr(f,"data-day",e)}this._formatValue()},_formatValue:function(){var t,n,i,r=s.get(c);"true"!==elAttr(c,"data-empty")&&(r.isDateTime?(t=new Date(elAttr(f,"data-year"),elAttr(f,"data-month"),elAttr(f,"data-day"),p.value,m.value),n=e.formatDateTime(t),i=e.format(t,"c")):(t=new Date(elAttr(f,"data-year"),elAttr(f,"data-month"),elAttr(f,"data-day")),n=e.formatDate(t),i=e.format(t,"Y-m-d")),c.value=n,elAttr(c,"data-value",t.getTime()),r.shadow.value=i)},_createPicker:function(){if(null===C){C=elCreate("div"),C.className="datePicker",C.addEventListener("click",function(e){e.stopPropagation()});var n=elCreate("span");n.className="elementPointer",n.innerHTML="<span></span>",C.appendChild(n);var i=elCreate("header");C.appendChild(i),b=elCreate("a"),b.className="icon icon16 fa-arrow-left previous",b.addEventListener("click",this.previousMonth.bind(this)),i.appendChild(b);var r=elCreate("span");i.appendChild(r),g=elCreate("select"),g.className="month",g.addEventListener("change",this._changeMonth.bind(this)),r.appendChild(g);for(var a="",o=t.get("__monthsShort"),s=0;12>s;s++)a+='<option value="'+s+'">'+o[s]+"</option>";g.innerHTML=a,w=elCreate("select"),w.className="year",w.addEventListener("change",this._changeYear.bind(this)),r.appendChild(w),v=elCreate("a"),v.className="icon icon16 fa-arrow-right next",v.addEventListener("click",this.nextMonth.bind(this)),i.appendChild(v),f=elCreate("ul"),C.appendChild(f);var c=elCreate("li");c.className="weekdays",f.appendChild(c);for(var u,d=t.get("__daysShort"),s=0;7>s;s++){var _=s+l;_>6&&(_-=7),u=elCreate("span"),u.textContent=d[_],c.appendChild(u)}for(var x,L,E=this._click.bind(this),s=0;5>s;s++){L=elCreate("li"),f.appendChild(L);for(var T=0;7>T;T++)x=elCreate("a"),x.addEventListener("click",E),h.push(x),L.appendChild(x)}y=elCreate("footer"),C.appendChild(y),p=elCreate("select"),p.className="hour",p.addEventListener("change",this._formatValue.bind(this));for(var k="",A=new Date(2e3,0,1),S=t.get("wcf.date.timeFormat").replace(/:/,"").replace(/[isu]/g,""),s=0;24>s;s++)A.setHours(s),k+='<option value="'+s+'">'+e.format(A,S)+"</option>";p.innerHTML=k,y.appendChild(p),y.appendChild(document.createTextNode(" : ")),m=elCreate("select"),m.className="minute",m.addEventListener("change",this._formatValue.bind(this));for(var k="",s=0;60>s;s++)k+='<option value="'+s+'">'+(10>s?"0"+s.toString():s)+"</option>";m.innerHTML=k,y.appendChild(m),document.body.appendChild(C)}},previousMonth:function(){"0"===g.value?(g.value=11,w.value=~~w.value-1):g.value=~~g.value-1,this._renderGrid(void 0,g.value,w.value)},nextMonth:function(){"11"===g.value?(g.value=0,w.value=~~w.value+1):g.value=~~g.value+1,this._renderGrid(void 0,g.value,w.value)},_changeMonth:function(e){this._renderGrid(void 0,e.currentTarget.value)},_changeYear:function(e){this._renderGrid(void 0,void 0,e.currentTarget.value)},_click:function(e){e.currentTarget.classList.contains("otherMonth")||(elAttr(c,"data-empty",!1),this._renderGrid(e.currentTarget.textContent),this._close())},getDate:function(e){return e=this._getElement(e),e.hasAttribute("data-value")?new Date(+e.getAttribute("data-value")):null},setDate:function(t,n){t=this._getElement(t);var i=s.get(t);elAttr(t,"data-value",n.getTime()),t.value=e["formatDate"+(i.isDateTime?"Time":"")](n),i.shadow.value=e.format(n,i.isDateTime?"c":"Y-m-d")},clear:function(e){e=this._getElement(e);var t=s.get(e);e.removeAttribute("data-value"),e.value="",t.isEmpty=!0,t.shadow.value=""},destroy:function(e){e=this._getElement(e);var t=s.get(e),n=e.parentNode;n.parentNode.insertBefore(e,n),n.parentNode.removeChild(n),elAttr(e,"type","date"+(t.isDateTime?"time":"")),e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener("click",_),t.shadow.parentNode.removeChild(t.shadow),e.classList.remove("inputDatePicker"),e.readOnly=!1,s["delete"](e)},setCloseCallback:function(e,t){e=this._getElement(e),s.get(e).onClose=t},_getElement:function(e){if("string"==typeof e&&(e=elById(e)),!(e instanceof Element&&e.classList.contains("inputDatePicker")&&s.has(e)))throw new Error("Expected a valid date picker input element or id.");return e}};return window.__wcf_bc_datePicker=x,x}),define("WoltLab/WCF/Bootstrap",["favico","enquire","perfect-scrollbar","WoltLab/WCF/Date/Time/Relative","Ui/SimpleDropdown","WoltLab/WCF/Ui/Mobile","WoltLab/WCF/Ui/TabMenu","WoltLab/WCF/Ui/FlexibleMenu","Ui/Dialog","WoltLab/WCF/Ui/Tooltip","WoltLab/WCF/Language","WoltLab/WCF/Environment","WoltLab/WCF/Date/Picker"],function(e,t,n,i,r,a,o,l,s,c,u,d,h){"use strict";window.Favico=e,window.enquire=t,null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=u.get,window.WCF.Language.add=u.add,window.WCF.Language.addObject=u.addObject;var f={setup:function(){d.setup(),i.setup(),h.init(),r.setup(),a.setup(),o.setup(),l.setup(),s.setup(),c.setup();for(var e=elBySelAll("form[method=get]"),t=0,n=e.length;n>t;t++)e[t].setAttribute("method","post");"microsoft"===d.browser()&&(window.onbeforeunload=function(){});var u=0;u=window.setInterval(function(){"function"==typeof window.jQuery&&(window.clearInterval(u),window.jQuery.holdReady(!1))},20)}};return f}),define("WoltLab/WCF/Controller/Sitemap",["Ajax","EventHandler","Language","Dom/Util","Ui/Dialog","Ui/TabMenu"],function(e,t,n,i,r,a){"use strict";var o=[],l={setup:function(){elById("sitemap").addEventListener("click",this._click.bind(this))},_click:function(e){e.preventDefault(),r.open(this)},_ajaxSetup:function(){return{data:{actionName:"getSitemap",className:"wcf\\data\\sitemap\\SitemapAction"}}},_ajaxSuccess:function(e){o.push(e.returnValues.sitemapName),elById("sitemap_"+e.returnValues.sitemapName).innerHTML=e.returnValues.template},_dialogSetup:function(){return{id:"sitemapDialog",options:{disableContentPadding:!0,title:n.get("wcf.page.sitemap")},source:{data:{actionName:"getSitemap",className:"wcf\\data\\sitemap\\SitemapAction"},after:function(e,n){o.push(n.returnValues.sitemapName);var r=elBySel(".tabMenuContainer",e),l=i.identify(r);a.getTabMenu(l).select("sitemap_"+n.returnValues.sitemapName),t.add("com.woltlab.wcf.simpleTabMenu_"+l,"select",this.showTab.bind(this))}.bind(this)}}},showTab:function(t){var n=elAttr(t.active,"data-name").replace(/^sitemap_/,"");-1===o.indexOf(n)&&e.api(this,{parameters:{sitemapName:n}})}};return l}),define("WoltLab/WCF/Controller/Style/Changer",["Ajax","Language","Ui/Dialog"],function(e,t,n){"use strict";var i={setup:function(){var e=elBySel("#footerNavigation > ul.navigationItems");if(null!==e){var n=elCreate("li");n.classList.add("styleChanger"),n.addEventListener("click",this.showDialog.bind(this));var i=elCreate("a");elAttr(i,"href","#"),i.textContent=t.get("wcf.style.changeStyle"),n.appendChild(i),e.appendChild(n)}},showDialog:function(e){e.preventDefault(),n.open(this)},_dialogSetup:function(){return{id:"styleChanger",options:{disableContentPadding:!0,title:t.get("wcf.style.changeStyle")},source:{data:{actionName:"getStyleChooser",className:"wcf\\data\\style\\StyleAction"},after:function(e){for(var t=elBySelAll(".styleList > li",e),n=0,i=t.length;i>n;n++){var r=t[n];r.classList.add("pointer"),r.addEventListener("click",this._click.bind(this))}}.bind(this)}}},_click:function(t){t.preventDefault(),e.apiOnce({data:{actionName:"changeStyle",className:"wcf\\data\\style\\StyleAction",objectIDs:[elAttr(t.currentTarget,"data-style-id")]},success:function(){window.location.reload()}})}};return i}),define("WoltLab/WCF/Controller/Popover",["Ajax","Dictionary","Environment","Dom/ChangeListener","Dom/Util","Ui/Alignment"],function(e,t,n,i,r,a){"use strict";var o=null,l=0,s=new t,c=new t,u=new t,d=null,h=!1,f=null,p=null,m=null,g=null,v=null,b=null,y=null,w=null,C=null,_=0,x=1,L=2,E=800,T=500,k={_setup:function(){if(null===m){m=elCreate("div"),m.classList.add("popover"),g=elCreate("div"),g.classList.add("popoverContent"),m.appendChild(g);var e=elCreate("span");e.classList.add("elementPointer"),e.appendChild(elCreate("span")),m.appendChild(e),v=elCreate("span"),v.className="icon icon32 fa-spinner",m.appendChild(v),document.body.appendChild(m),b=this._hide.bind(this),w=this._mouseEnter.bind(this),C=this._mouseLeave.bind(this),m.addEventListener("mouseenter",this._popoverMouseEnter.bind(this)),m.addEventListener("mouseleave",C),g.addEventListener("transitionend",function(e){"height"===e.propertyName&&g.classList.remove("loading")}),m.addEventListener("transitionend",this._clearContent.bind(this)),window.addEventListener("beforeunload",function(){h=!0,null!==f&&window.clearTimeout(f),this._hide(!0)}.bind(this)),i.add("WoltLab/WCF/Controller/Popover",this._init.bind(this))}},init:function(e){"desktop"===n.platform()&&(e.attributeName=e.attributeName||"data-object-id",e.legacy=e.legacy===!0,this._setup(),u.has(e.identifier)||(u.set(e.identifier,{attributeName:e.attributeName,elements:e.legacy?e.className:elByClass(e.className),legacy:e.legacy,loadCallback:e.loadCallback}),this._init(e.identifier)))},_init:function(e){"string"==typeof e&&e.length?this._initElements(u.get(e),e):u.forEach(this._initElements.bind(this))},_initElements:function(e,t){for(var n=e.legacy?elBySelAll(e.elements):e.elements,i=0,a=n.length;a>i;i++){var o=n[i],l=r.identify(o);if(s.has(l))return;var u=e.legacy?l:~~o.getAttribute(e.attributeName);if(0!==u){o.addEventListener("mouseenter",w),o.addEventListener("mouseleave",C),"A"===o.nodeName&&elAttr(o,"href")&&o.addEventListener("click",b);var d=t+"-"+u;elAttr(o,"data-cache-id",d),c.set(l,{element:o,identifier:t,objectId:u}),s.has(d)||s.set(t+"-"+u,{content:null,state:_})}}},setContent:function(e,t,n){var i=e+"-"+t,a=s.get(i);if(void 0===a)throw new Error("Unable to find element for object id '"+t+"' (identifier: '"+e+"').");if(a.content=r.createFragmentFromHtml(n),a.state=L,o){var l=c.get(o).element;elAttr(l,"data-cache-id")===i&&this._show()}},_mouseEnter:function(e){if(!h){null!==f&&(window.clearTimeout(f),f=null);
-var t=r.identify(e.currentTarget);o===t&&null!==p&&(window.clearTimeout(p),p=null),d=t,f=window.setTimeout(function(){f=null,d===t&&this._show()}.bind(this),E)}},_mouseLeave:function(){d=null,null===p&&(null===y&&(y=this._hide.bind(this)),null!==p&&window.clearTimeout(p),p=window.setTimeout(y,T))},_popoverMouseEnter:function(){null!==p&&(window.clearTimeout(p),p=null)},_show:function(){null!==p&&(window.clearTimeout(p),p=null);var e=null!==o&&o!==d;m.classList.contains("active")&&this._hide(e),o=d;var t=c.get(o),n=s.get(elAttr(t.element,"data-cache-id"));n.state===L?g.appendChild(n.content):n.state===_&&g.classList.add("loading"),this._rebuild(o),n.state===_&&(n.state=x,u.get(t.identifier).loadCallback(t.objectId,this))},_hide:function(e){null!==p&&(window.clearTimeout(p),p=null),m.classList.remove("active"),"boolean"==typeof e&&e===!0&&(m.classList.add("disableAnimation"),m.offsetHeight,this._clearContent())},_clearContent:function(){if(o&&g.childElementCount&&!m.classList.contains("active")){for(var e=s.get(c.get(o).element.getAttribute("data-cache-id"));g.childNodes.length;)e.content.appendChild(g.childNodes[0]);g.style.removeProperty("height")}},_rebuild:function(){if(!m.classList.contains("active")){if(m.classList.add("active"),m.classList.remove("disableAnimation"),g.classList.contains("loading"))if(0===g.childElementCount)0===l&&(l=g.offsetHeight),g.style.setProperty("height",l+"px");else{g.style.removeProperty("height");var e=g.offsetHeight;g.style.setProperty("height",l+"px"),g.offsetHeight,g.style.setProperty("height",e+"px")}a.set(m,c.get(o).element,{pointer:!0,vertical:"top",verticalOffset:3})}},_ajaxSetup:function(){return{}},ajaxApi:function(t,n,i){if("function"!=typeof n)throw new TypeError("Expected a valid callback for parameter 'success'.");e.api(this,t,n,i)}};return k}),define("WoltLab/WCF/BootstrapFrontend",["Ajax","WoltLab/WCF/Bootstrap","WoltLab/WCF/Controller/Sitemap","WoltLab/WCF/Controller/Style/Changer","WoltLab/WCF/Controller/Popover"],function(e,t,n,i,r){"use strict";var a={setup:function(e){t.setup(),n.setup(),e.styleChanger&&i.setup(),this._initUserPopover(),this._invokeBackgroundQueue(e.backgroundQueueUrl)},_initUserPopover:function(){r.init({attributeName:"data-user-id",className:"userLink",identifier:"com.woltlab.wcf.user",loadCallback:function(e,t){var n=function(n){t.setContent("com.woltlab.wcf.user",e,n.returnValues.template)};t.ajaxApi({actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]},n,n)}})},_invokeBackgroundQueue:function(t){Math.random()<.1&&e.apiOnce({url:t,ignoreError:!0,silent:!0})}};return a}),define("WoltLab/WCF/List",[],function(){"use strict";function e(){this._set=t?new Set:[]}var t=objOwns(window,"Set")&&"function"==typeof window.Set;return e.prototype={add:function(e){t?this._set.add(e):this.has(e)||this._set.push(e)},clear:function(){t?this._set.clear():this._set=[]},"delete":function(e){if(t)return this._set["delete"](e);var n=this._set.indexOf(n);return-1===n?!1:(this._set.splice(n,1),!0)},forEach:function(e){if(t)this._set.forEach(e);else for(var n=0,i=this._set.length;i>n;n++)e(this._set[n])},has:function(e){return t?this._set.has(e):-1!==this._set.indexOf(e)}},Object.defineProperty(e.prototype,"size",{enumerable:!1,configurable:!0,get:function(){return _hasMap?this._set.size:this._set.length}}),e}),define("WoltLab/WCF/Ajax/Jsonp",["Core"],function(e){"use strict";var t={send:function(t,n,i,r){if(t="string"==typeof t?t.trim():"",0===t.length)throw new Error("Expected a non-empty string for parameter 'url'.");if("function"!=typeof n)throw new TypeError("Expected a valid callback function for parameter 'success'.");r=e.extend({parameterName:"callback",timeout:10},r||{});var a="wcf_jsonp_"+e.getUuid().replace(/-/g,"").substr(0,8),o=window.setTimeout(function(){window[a]=function(){},"function"==typeof i&&i()},1e3*(~~r.timeout||10));window[a]=function(){window.clearTimeout(o),n.apply(null,arguments)},t+=-1===t.indexOf("?")?"?":"&",t+=r.parameterName+"="+a;var l=elCreate("script");l.async=!0,elAttr(l,"src",t),document.head.appendChild(l)}};return t}),define("WoltLab/WCF/Bbcode/FromHtml",["EventHandler","StringUtil","Dom/Traverse"],function(e,t,n){"use strict";function i(e,t){var n=e[t?"previousSibling":"nextSibling"];return null!==n&&n.nodeType===Node.TEXT_NODE&&/\s$/.test(n.textContent)?!1:!0}var r=[],a={},o=[],l={convert:function(t){t.length&&this._setup();var n=elCreate("div");n.innerHTML=t;for(var i=elByTag("P",n);i.length;)i[0].outerHTML=i[0].innerHTML;for(i=elByTag("BR",n);i.length;)i[0].outerHTML="\n";var a=this._preserveSourceElements(n);e.fire("com.woltlab.wcf.bbcode.fromHtml","beforeConvert",{container:n});for(var o=0,l=r.length;l>o;o++)this._convert(n,r[o]);for(e.fire("com.woltlab.wcf.bbcode.fromHtml","afterConvert",{container:n}),this._restoreSourceElements(n,a),i=elByTag("*",n);i.length;)i[0].outerHTML=i[0].innerHTML;return t=this._convertSpecials(n.innerHTML)},_preserveSourceElements:function(e){for(var t,n,i=[],r=0,a=o.length;a>r;r++){t=elBySelAll(o[r].selector,e),n=[];for(var l=0,s=t.length;s>l;l++)this._preserveSourceElement(t[l],n);i.push(n)}return i},_preserveSourceElement:function(e,t){var n=elCreate("var");elAttr(n,"data-source","wcf"),e.parentNode.insertBefore(n,e);var i=document.createDocumentFragment();i.appendChild(e),t.push({fragment:i,placeholder:n})},_restoreSourceElements:function(e,t){for(var n,i,r,a=0,l=t.length;l>a;a++)if(i=t[a],0!==i.length)for(var s=0,c=i.length;c>s;s++)n=i[s],r=n.placeholder,r.parentNode.insertBefore(n.fragment,r),o[a].callback(r.previousElementSibling),r.parentNode.removeChild(r)},_convertSpecials:function(e){return e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">")},_setup:function(){r.length||(r=[{tagName:"STRONG",bbcode:"b"},{tagName:"DEL",bbcode:"s"},{tagName:"EM",bbcode:"i"},{tagName:"SUB",bbcode:"sub"},{tagName:"SUP",bbcode:"sup"},{tagName:"U",bbcode:"u"},{tagName:"KBD",bbcode:"tt"},{tagName:"A",callback:this._convertUrl.bind(this)},{tagName:"IMG",callback:this._convertImage.bind(this)},{tagName:"LI",callback:this._convertListItem.bind(this)},{tagName:"OL",callback:this._convertList.bind(this)},{tagName:"TABLE",callback:this._convertTable.bind(this)},{tagName:"UL",callback:this._convertList.bind(this)},{tagName:"BLOCKQUOTE",callback:this._convertBlockquote.bind(this)},{tagName:"SPAN",callback:this._convertSpan.bind(this)},{tagName:"DIV",callback:this._convertDiv.bind(this)}],a={span:[{style:"color",callback:this._convertInlineColor.bind(this)},{style:"font-size",callback:this._convertInlineFontSize.bind(this)},{style:"font-family",callback:this._convertInlineFontFamily.bind(this)}],div:[{style:"text-align",callback:this._convertInlineTextAlign.bind(this)}]},o=[{selector:"div.codeBox",callback:this._convertSourceCodeBox.bind(this)}],e.fire("com.woltlab.wcf.bbcode.fromHtml","init",{converter:r,inlineConverter:a,sourceConverter:o}))},_convert:function(e,t){if("function"==typeof t)return void t(e);for(var n,i=elByTag(t.tagName,e);i.length;)n=i[0],t.bbcode?n.outerHTML="["+t.bbcode+"]"+n.innerHTML+"[/"+t.bbcode+"]":t.callback(n)},_convertBlockquote:function(e){var i=elAttr(e,"data-author"),r=elAttr(e,"cite"),a="[quote]";i&&(i=t.escapeHTML(i).replace(/(\\)?'/g,function(e,t){return t?e:"\\'"}),a=r?"[quote='"+i+"','"+t.escapeHTML(r)+"']":"[quote='"+i+"']");var o=n.childByTag(e,"HEADER");null!==o&&e.removeChild(o);for(var l=n.childrenByTag(e,"DIV"),s=0,c=l.length;c>s;s++)l[s].outerHTML=l[s].innerHTML+"\n";e.outerHTML=a+e.innerHTML.replace(/^\n*/,"").replace(/\n*$/,"")+"[/quote]\n"},_convertImage:function(e){if(e.classList.contains("smiley"))return void(e.outerHTML=(i(e,!0)?" ":"")+elAttr(e,"alt")+(i(e,!1)?" ":""));var t=e.style.getPropertyValue("float")||"none",n=e.style.getPropertyValue("width");if(n="string"==typeof n?~~n.replace(/px$/,""):0,e.classList.contains("redactorEmbeddedAttachment")){var r=elAttr(e,"data-attachment-id");e.outerHTML=n>0?"[attach="+r+","+t+","+n+"][/attach]":"none"!==t?"[attach="+r+","+t+"][/attach]":"[attach="+r+"][/attach]"}else{var a=e.src.trim();e.outerHTML=n>0?"[img='"+a+"',"+t+","+n+"][/img]":"none"!==t?"[img='"+a+"',"+t+"][/img]":"[img]"+a+"[/img]"}},_convertList:function(e){var t;if("OL"===e.nodeName)t="[list=1]";else{var n=e.style.getPropertyValue("list-style-type")||"";t=""===n?"[list]":"[list="+("lower-latin"===n?"a":n)+"]"}e.outerHTML=t+e.innerHTML+"[/list]"},_convertListItem:function(e){e.outerHTML="UL"!==e.parentNode.nodeName&&"OL"!==e.parentNode.nodeName?e.innerHTML:"[*]"+e.innerHTML},_convertSpan:function(e){if(e.style.length||e.className)for(var t,n,i=0,r=a.span.length;r>i;i++)t=a.span[i],t.style?(n=e.style.getPropertyValue(t.style)||"",n&&t.callback(e,n)):e.classList.contains(t.className)&&t.callback(e);e.outerHTML=e.innerHTML},_convertDiv:function(e){if(e.className.length||e.style.length)for(var t,n,i=0,r=a.div.length;r>i;i++)t=a.div[i],t.className&&e.classList.contains(t.className)?t.callback(e):t.style&&(n=e.style.getPropertyValue(t.style)||"",n&&t.callback(e,n));e.outerHTML=e.innerHTML},_convertInlineColor:function(e,t){if(t.match(/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/i)){var n=RegExp.$1,i=RegExp.$2,r=RegExp.$3,a="0123456789ABCDEF";t="#"+(a.charAt((n-n%16)/16)+""+a.charAt(n%16))+(a.charAt((i-i%16)/16)+""+a.charAt(i%16))+(a.charAt((r-r%16)/16)+""+a.charAt(r%16))}e.innerHTML="[color="+t+"]"+e.innerHTML+"[/color]"},_convertInlineFontSize:function(e,t){t.match(/^(\d+)pt$/)?t=RegExp.$1:t.match(/^(\d+)(px|em|rem|%)$/)?(t=window.getComputedStyle(t).fontSize.replace(/^(\d+).*$/,"$1"),t=Math.round(t)):t="",t&&(t=Math.min(Math.max(t,8),36),e.innerHTML="[size="+t+"]"+e.innerHTML+"[/size]")},_convertInlineFontFamily:function(e,t){e.innerHTML="[font="+t.replace(/'/g,"")+"]"+e.innerHTML+"[/font]"},_convertInlineTextAlign:function(e,t){-1!==["center","justify","left","right"].indexOf(t)&&(e.innerHTML="[align="+t+"]"+e.innerHTML+"[/align]")},_convertTable:function(e){for(var t=elByTag("TD",e);t.length;)t[0].outerHTML="[td]"+t[0].innerHTML+"[/td]\n";for(t=elByTag("TR",e);t.length;)t[0].outerHTML="\n[tr]\n"+t[0].innerHTML+"[/tr]";var i=n.childByTag(e,"TBODY"),r=null===i?e.innerHTML:i.innerHTML;e.outerHTML="\n[table]"+r+"\n[/table]\n"},_convertUrl:function(e){var t=e.textContent.trim(),n=e.href.trim(),i="url";return""===n||""===t?void(e.outerHTML=e.innerHTML):(0===n.indexOf("mailto:")&&(n=n.substr(7),i="email"),void(e.outerHTML=n===t?"["+i+"]"+n+"[/"+i+"]":"["+i+"='"+n+"']"+e.innerHTML+"[/"+i+"]"))},_convertSourceCodeBox:function(e){var t=elAttr(e,"data-filename").trim()||"",i=elAttr(e,"data-highlighter");window.dtdesign=e;for(var r=n.childByTag(e.children[0],"OL"),a=~~r.getAttribute("start")||1,o="",l=0,s=r.childElementCount;s>l;l++)o&&(o+="\n"),o+=r.children[l].textContent;var c="[code='"+i+"',"+a+",'"+t+"']";e.outerHTML=c+o+"[/code]"}};return l}),define("WoltLab/WCF/Bbcode/Parser",[],function(){"use strict";var e={parse:function(e){var t=this._splitTags(e);return this._buildLinearTree(t),t},_splitTags:function(e){for(var t,n,i=__REDACTOR_BBCODES.join("|"),r="(\\[(?:/(?:"+i+")|(?:"+i+")(?:=(?:\\'[^\\'\\\\]*(?:\\\\.[^\\'\\\\]*)*\\'|[^,\\]]*)(?:,(?:\\'[^\\'\\\\]*(?:\\\\.[^\\'\\\\]*)*'|[^,\\]]*))*)?)\\])",a=new RegExp("^"+r+"$","i"),o=e.split(new RegExp(r,"i")),l=[],s=0,c=o.length;c>s;s++)t=o[s],""!==t&&(t.match(a)?(n={name:"",closing:!1,attributes:[],source:t},"/"===t[1]?(n.name=t.substring(2,t.length-1),n.closing=!0):t.match(/^\[([a-z0-9]+)=?(.*)\]$/i)&&(n.name=RegExp.$1,RegExp.$2&&(n.attributes=this._parseAttributes(RegExp.$2))),l.push(n)):l.push(t));return l},_buildLinearTree:function(e){for(var t,n,i=[],r="",a=0;a<e.length;a++)if(t=e[a],"object"==typeof t){if(r.length&&(t.name!==r||!t.closing)){e[a]=t.source;continue}if(t.closing){if(this._hasOpenTag(i,t.name)){n=this._closeUnclosedTags(e,i,t.name);for(var o=0,l=n.length;l>o;o++)e.splice(a,n[o]),a++;i.pop().pair=a}else e[a]=t.source;r===t.name&&(r="")}else i.push(t),-1!==__REDACTOR_SOURCE_BBCODES.indexOf(t.name)&&(r=t.name)}this._closeUnclosedTags(e,i,"")},_closeUnclosedTags:function(e,t,n){for(var i,r,a=[],o=t.length-1;o>=0&&(i=t[o],i.name!==n);o--)r={name:i.name,closing:!0,attributes:i.attributes.slice(),source:"[/"+i.name+"]"},i.pair=e.length,e.push(r),t.pop(),a.push({name:i.name,closing:!1,attributes:i.attributes.slice(),source:i.source});return a.reverse()},_hasOpenTag:function(e,t){for(var n=e.length-1;n>=0;n--)if(e[n].name===t)return!0;return!1},_parseAttributes:function(e){for(var t,n=e.split(/(?:^|,)('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'|[^,]*)/g),i=[],r=0,a=n.length;a>r;r++)t=n[r],""!==t&&i.push("'"===t.charAt(0)&&"'"===t.substr(-1)?t.substring(1,t.length-1).trim():t.trim());return i}};return e}),define("WoltLab/WCF/Bbcode/ToHtml",["Core","EventHandler","Language","StringUtil","WoltLab/WCF/Bbcode/Parser"],function(e,t,n,i,r){"use strict";function a(e){return e&&e==~~e}function o(e){return-1!==e.indexOf(".")||!a(e)&&!l(e)}function l(e){return objOwns(__REDACTOR_CODE_HIGHLIGHTERS,e)}var s=null,c={},u=[],d=[],h={convert:function(n,i){c=e.extend({attachments:{images:{},thumbnailUrl:"",url:""}},i),this._convertSpecials(n);var a=r.parse(n);a.length&&this._initBBCodes(),t.fire("com.woltlab.wcf.bbcode.toHtml","beforeConvert",{stack:a});for(var o,l,s=0,u=a.length;u>s;s++)o=a[s],"object"==typeof o&&(l=this._convert(a,o,s),Array.isArray(l)?(a[s]=null===l[0]?o.source:l[0],a[o.pair]=null===l[1]?a[o.pair].source:l[1]):a[s]=l);return t.fire("com.woltlab.wcf.bbcode.toHtml","afterConvert",{stack:a}),n=a.join(""),n=n.replace(/\n/g,"<br>")},_convertSpecials:function(e){return e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">")},_initBBCodes:function(){null===s&&(s={b:"strong",i:"em",u:"u",s:"del",sub:"sub",sup:"sup",table:"table",td:"td",tr:"tr",tt:"kbd",align:this._convertAlignment.bind(this),attach:this._convertAttachment.bind(this),color:this._convertColor.bind(this),code:this._convertCode.bind(this),email:this._convertEmail.bind(this),list:this._convertList.bind(this),quote:this._convertQuote.bind(this),size:this._convertSize.bind(this),url:this._convertUrl.bind(this),img:this._convertImage.bind(this)},u=["quote","table","td","tr"],d=["table","td","tr"],t.fire("com.woltlab.wcf.bbcode.toHtml","init",{bbcodes:s,removeNewlineAfter:u,removeNewlineBefore:d}))},_convert:function(e,t,n){var i,r=s[t.name];return void 0===r?[null,null]:(-1!==u.indexOf(t.name)&&(i=e[n+1],"string"==typeof i&&(e[n+1]=i.replace(/^\n/,"")),e.length>t.pair+1&&(i=e[t.pair+1],"string"==typeof i&&(e[t.pair+1]=i.replace(/^\n/,"")))),-1!==d.indexOf(t.name)&&(n-1>=0&&(i=e[n-1],"string"==typeof i&&(e[n-1]=i.replace(/\n$/,""))),i=e[t.pair-1],"string"==typeof i&&(e[t.pair-1]=i.replace(/\n$/,""))),this._convertSmilies(e),"string"==typeof r?["<"+r+">","</"+r+">"]:r(e,t,n))},_convertAlignment:function(e,t){var n=t.attributes.length?t.attributes[0]:"";return-1===["center","justify","left","right"].indexOf(n)?[null,null]:['<div style="text-align: '+n+'">',"</div>"]},_convertAttachment:function(e,t){var n=0,i=t.attributes,r=i.length;if(c.attachments.url?r>0&&(n=~~i[0],c.attachments.images.hasOwnProperty(n)||(r=0)):r=0,0===r)return[null,null];var a=~~c.attachments.images[n].height,o=~~c.attachments.images[n].width,l=["max-height: "+a+"px","max-width: "+o+"px"];r>1&&("left"===t.attributes[1]||"right"===i[1])&&(l.push("float: "+i[1]),l.push("margin: "+("left"===i[1]?"0 15px 7px 0":"0 0 7px 15px")));var s=c.attachments.thumbnailUrl;return r>2&&(width=~~i[2]||0,width&&(width>o&&(width=o),l.push("width: "+width+"px"),s=c.attachments.url)),['<img src="'+s.replace(/987654321/,n)+'" class="redactorEmbeddedAttachment redactorDisableResize" data-attachment-id="'+n+'"'+(l.length?' style="'+l.join(";")+'"':"")+">",""]},_convertCode:function(e,t,n){var r=t.attributes,s="",c="auto",u=0;switch(r.length){case 1:a(r[0])?u=~~r[0]:o(r[0])?s=r[0]:l(r[0])&&(c=r[0]);break;case 2:a(r[0])?(u=~~r[0],l(r[1])?c=r[1]:o(r[1])&&(s=r[1])):(l(r[0])&&(c=r[0]),o(r[1])&&(s=r[1]));break;case 3:l(r[0])&&(c=r[0]),a(r[1])&&(u=~~r[1]),o(r[2])&&(s=r[2])}for(var d,h,f=!0,p=-1,m=n+1;m<t.pair;m++){if(h=e[m],""===h.trim()){if(f){e[m]="";continue}-1===p&&(p=m)}else f=!1,p=-1;d=h.split("\n");for(var g=0,v=d.length;v>g;g++)d[g]="<li>"+(d[g]?i.escapeHTML(d[g]):"")+"</li>";e[m]=d.join("")}if(!f&&-1!==p)for(var m=t.pair-1;m>=p;m--)e[m]="";return['<div class="codeBox container" contenteditable="false" data-highlighter="'+c+'" data-filename="'+(s?i.escapeHTML(s):"")+'"><div><div><h3>'+__REDACTOR_CODE_HIGHLIGHTERS[c]+(s?": "+i.escapeHTML(s):"")+'</h3></div><ol start="'+(u>1?u:1)+'">',"</ol></div></div>"]},_convertColor:function(e,t){return t.attributes.length&&t.attributes[0].match(/^[a-z0-9#]+$/i)?['<span style="color: '+i.escapeHTML(t.attributes[0])+'">',"</span>"]:[null,null]},_convertEmail:function(e,t,n){var r="";if(t.attributes.length)r=t.attributes[0];else{for(var a,o=n+1;o<t.pair;o++){if(a=e[o],"object"==typeof a){r="";break}r+=a}if(""===r.trim())return[null,null]}return['<a href="mailto:'+i.escapeHTML(r)+'">',"</a>"]},_convertImage:function(e,t,n){var r="none",a="",o=0;switch(t.attributes.length){case 0:if(!(n+1<t.pair&&"string"==typeof e[n+1]))return"";a=e[n+1],e[n+1]="";break;case 1:a=t.attributes[0];break;case 2:a=t.attributes[0],r=t.attributes[1];break;case 3:a=t.attributes[0],r=t.attributes[1],o=~~t.attributes[2]}"left"!==r&&"right"!==r&&(r="none");var l=[];return o>0&&l.push("width: "+o+"px"),"none"!==r&&(l.push("float: "+r),l.push("margin: "+("left"===r?"0 15px 7px 0":"0 0 7px 15px"))),['<img src="'+i.escapeHTML(a)+'"'+(l.length?' style="'+l.join(";")+'"':"")+">",""]},_convertList:function(e,t,n){for(var i=items.attributes.length?t.attributes[0]:"",r=n+1;r<t.pair;r++)"string"==typeof e[r]&&(e[r]=e[r].replace(/\[\*\]/g,"<li>"));return"1"==i||"decimal"===i?["<ol>","</ol>"]:i.length&&i.match(/^(?:none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)$/)?['<ul style="list-style-type: '+i+'">',"</ul>"]:["<ul>","</ul>"]},_convertQuote:function(e,t,r){var a="",o="";t.attributes.length>1?(a=t.attributes[0],o=t.attributes[1]):1===t.attributes.length&&(a=t.attributes[0]);for(var l=t.pair-1;l>r;l--)if("string"==typeof e[l]){e[l]=e[l].replace(/\n$/,"");break}var s="";return a?(o&&(s='<a href="'+i.escapeHTML(o)+'" tabindex="-1">'),s+=n.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:a.replace(/\\'/g,"'")}),o&&(s+="</a>")):s="<small>"+n.get("wcf.bbcode.quote.title.clickToSet")+"</small>",['<blockquote class="quoteBox container containerPadding quoteBoxSimple" cite="'+i.escapeHTML(o)+'" data-author="'+i.escapeHTML(a)+'"><header contenteditable="false"><h3>'+s+'</h3><a class="redactorQuoteEdit"></a></header><div>',"</div></blockquote>"]},_convertSmilies:function(e){for(var t,n,r,a=0,o=e.length;o>a;a++)if(n=e[a],"string"==typeof n){for(var l in __REDACTOR_SMILIES)__REDACTOR_SMILIES.hasOwnProperty(l)&&(t=l.replace(/</g,"<").replace(/>/g,">"),r=new RegExp("(\\s|^)"+i.escapeRegExp(l)+"(?=\\s|$)","gi"),n=n.replace(r,'$1<img src="'+__REDACTOR_SMILIES[l]+'" class="smiley" alt="'+t+'">'));e[a]=n}else-1!==__REDACTOR_SOURCE_BBCODES.indexOf(n.name)&&(a=n.pair)},_convertSize:function(e,t){return t.attributes.length&&0!==~~t.attributes[0]?['<span style="font-size: '+~~t.attributes[0]+'pt">',"</span>"]:[null,null]},_convertUrl:function(e,t){return t.attributes.length?['<a href="'+i.escapeHTML(t.attributes[0])+'">',"</a>"]:[null,null]}};return h}),define("WoltLab/WCF/Controller/Clipboard",["Ajax","Core","Dictionary","EventHandler","Language","List","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/SimpleDropdown"],function(e,t,n,i,r,a,o,l,s,c,u,d){"use strict";var h=new n,f=new n,p=elByClass("jsClipboardContainer"),m=new o,g=new a,v={},b=null,y=null,w=null,C={setup:function(e){if(b=this._mark.bind(this),y=this._executeAction.bind(this),w=this._unmarkAll.bind(this),v=t.extend({hasMarkedItems:!1,pageClassName:"",pageObjectId:0},e),!v.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");this._initContainers(),this._initEditors(),v.hasMarkedItems&&p.length&&this._loadMarkedItems(),l.add("WoltLab/WCF/Controller/Clipboard",this._initContainers.bind(this))},reload:function(){h.size&&this._loadMarkedItems()},_initContainers:function(){for(var e=0,t=p.length;t>e;e++){var n=p[e],i=c.identify(n),r=h.get(i);if(void 0===r){var o=elBySel(".jsClipboardMarkAll",n);null!==o&&(elAttr(o,"data-container-id",i),o.addEventListener("click",this._markAll.bind(this))),r={checkboxes:elByClass("jsClipboardItem",n),element:n,markAll:o,markedObjectIds:new a},h.set(i,r)}for(var l=0,s=r.checkboxes.length;s>l;l++){var u=r.checkboxes[l];g.has(u)||(elAttr(u,"data-container-id",i),u.addEventListener("click",b),g.add(u))}}},_initEditors:function(){for(var e=function(e){try{var t=elAttr(e,"data-types");if("string"==typeof t)return JSON.parse('{ "types": '+t.replace(/'/g,'"')+"}").types}catch(n){throw new Error("Expected a valid 'data-type' attribute for element '"+c.identify(e)+"'.")}return[]},t=elByClass("jsClipboardEditor"),n=0,i=t.length;i>n;n++)for(var r=t[n],a=e(r),o=0,l=a.length;l>o;o++)f.set(a[o],r)},_loadMarkedItems:function(){e.api(this,{actionName:"getMarkedItems",parameters:{pageClassName:v.pageClassName,pageObjectID:v.pageObjectId}})},_markAll:function(e){for(var t=e.currentTarget,n="INPUT"!==t.nodeName||t.checked,i=[],r=elAttr(t,"data-container-id"),a=h.get(r),o=elAttr(a.element,"data-type"),l=0,c=a.checkboxes.length;c>l;l++){var u=a.checkboxes[l],d=~~u.getAttribute("data-object-id");n?u.checked||(u.checked=!0,a.markedObjectIds.add(d),i.push(d)):u.checked&&(u.checked=!1,a.markedObjectIds["delete"](d),i.push(d));var f=s.parentByClass(t,"jsClipboardObject");null!==f&&f.classList[n?"addClass":"removeClass"]("jsMarked")}this._saveState(o,i,n)},_mark:function(e){var t=e.currentTarget,n=~~t.getAttribute("data-object-id"),i=t.checked,r=elAttr(t,"data-container-id"),a=h.get(r),o=elAttr(a.element,"data-type"),l=s.parentByClass(t,"jsClipboardObject");a.markedObjectIds[i?"add":"delete"](n),l.classList[i?"add":"remove"]("jsMarked");for(var c=!0,u=0,d=a.checkboxes.length;d>u;u++)if(!a.checkboxes[u].checked){c=!1;break}a.markAll.checked=c,this._saveState(o,[n],i)},_saveState:function(t,n,i){e.api(this,{actionName:i?"mark":"unmark",parameters:{pageClassName:v.pageClassName,pageObjectID:v.pageObjectId,objectIDs:n,objectType:t}})},_executeAction:function(e){var t=e.currentTarget,n=m.get(t);if(n.url)return void(window.location.href=n.url);var r=function(){var e=elAttr(t,"data-type");i.fire("com.woltlab.wcf.clipboard",e,{data:n,listItem:t,responseData:null}),"function"==typeof window.jQuery&&window.jQuery(f.get(e)).trigger("clipboardAction",[e,n.actionName,n.parameters])},a="string"==typeof n.internalData.confirmMessage?n.internalData.confirmMessage:"",o=!0;if("object"==typeof n.parameters&&n.parameters.actionName&&n.parameters.className){if("unmarkAll"===n.parameters.actionName||Array.isArray(n.parameters.objectIDs))if(a.length){var l="string"==typeof n.internalData.template?n.internalData.template:"";u.show({confirm:function(){var e={};if(l.length)for(var i=u.getContentElement().querySelectorAll("input, select, textarea"),r=0,a=i.length;a>r;r++){var o=i[r],s=elAttr(o,"name");switch(o.nodeName){case"INPUT":o.checked&&(e[s]=elAttr(o,"value"));break;case"SELECT":e[s]=o.value;break;case"TEXTAREA":e[s]=o.value.trim()}}this._executeProxyAction(t,n,e)}.bind(this),message:a,template:l})}else this._executeProxyAction(t,n)}else a.length&&(o=!1,u.show({confirm:r,message:a}));o&&r()},_executeProxyAction:function(t,n,r){r=r||{};var a="unmarkAll"!==n.parameters.actionName?n.parameters.objectIDs:[],o={data:r};if("object"==typeof n.internalData.parameters)for(var l in n.internalData.parameters)n.internalData.parameters.hasOwnProperty(l)&&(o[l]=n.internalData.parameters[l]);e.api(this,{actionName:n.parameters.actionName,className:n.parameters.className,objectIDs:a,parameters:o},function(e){if("unmarkAll"!==n.actionName){var r=elAttr(t,"data-type");i.fire("com.woltlab.wcf.clipboard",r,{data:n,listItem:t,responseData:e}),"function"==typeof window.jQuery&&window.jQuery(f.get(r)).trigger("clipboardActionResponse",[e,r,n.actionName,n.parameters])}this._loadMarkedItems()}.bind(this))},_unmarkAll:function(t){var n=elAttr(t.currentTarget,"data-type");e.api(this,{actionName:"unmarkAll",parameters:{objectType:n}})},_ajaxSetup:function(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}},_ajaxSuccess:function(e){if("unmarkAll"===e.actionName)return void h.forEach(function(t){if(elAttr(t.element,"data-type")===e.returnValues.objectType){for(var n=elByClass("jsMarked",t.element);n.length;)n[0].classList.remove("jsMarked");t.markAll.checked=!1;for(var i=0,r=t.checkboxes.length;r>i;i++)t.checkboxes[i].checked=!1;f.get(e.returnValues.objectType).innerHTML=""}}.bind(this));if(f.forEach(function(e){e.innerHTML=""}),m=new o,h.forEach(function(t){var n=elAttr(t.element,"data-type"),i=e.returnValues.markedItems&&objOwns(e.returnValues.markedItems,n)?e.returnValues.markedItems[n]:[];this._rebuildMarkings(t,i)}.bind(this)),e.returnValues&&e.returnValues.items){var t=document.createDocumentFragment();for(var n in e.returnValues.items)if(e.returnValues.items.hasOwnProperty(n)&&f.has(n)){var i=e.returnValues.items[n],a=f.get(n),l=s.childrenByTag(a,"UL"),c=l[0]||null;null===c&&(c=elCreate("ul")),t.appendChild(c);var u=elCreate("li");u.classList.add("dropdown"),c.appendChild(u);var p=elCreate("span");p.className="dropdownToggle button",p.textContent=i.label,u.appendChild(p);var g=elCreate("ol");g.classList.add("dropdownMenu");for(var v in i.items)if(i.items.hasOwnProperty(v)){var b=i.items[v],C=elCreate("li"),_=elCreate("span");_.textContent=b.label,C.appendChild(_),g.appendChild(C),elAttr(C,"data-type",n),C.addEventListener("click",y),m.set(C,b)}var x=elCreate("li");x.classList.add("dropdownDivider"),g.appendChild(x);var L=elCreate("li");elAttr(L,"data-type",n);var _=elCreate("span");_.textContent=r.get("wcf.clipboard.item.unmarkAll"),L.appendChild(_),g.appendChild(L),u.appendChild(g),L.addEventListener("click",w),a.appendChild(t),d.init(p,!1)}}},_rebuildMarkings:function(e,t){for(var n=!0,i=0,r=e.checkboxes.length;r>i;i++){var a=e.checkboxes[i],o=s.parentByClass(a,"jsClipboardObject"),l=-1!==t.indexOf(~~a.getAttribute("data-object-id"));l||(n=!1),a.checked=l,o.classList[l?"add":"remove"]("jsMarked")}e.markAll.checked=n}};return C}),define("WoltLab/WCF/Language/Input",["Dictionary","Language","ObjectMap","StringUtil","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,n,i,r,a,o){"use strict";var l=new e,s=!1,c=new n,u=new e,d=null,h=null,f={init:function(t,n,r,a){if(!u.has(t)){var o=elById(t);if(null===o)throw new Error("Expected a valid element id, cannot find '"+t+"'.");this._setup();var l=new e;for(var s in n)n.hasOwnProperty(s)&&l.set(~~s,i.unescapeHTML(n[s]));u.set(t,l),this._initElement(t,o,l,r,a)}},_setup:function(){s||(s=!0,d=this._dropdownToggle.bind(this),h=this._submit.bind(this))},_initElement:function(e,n,i,s,u){var f=n.parentNode;f.classList.contains("inputAddon")||(f=elCreate("div"),f.className="inputAddon"+("TEXTAREA"===n.nodeName?" inputAddonTextarea":""),elAttr(f,"data-input-id",e),n.parentNode.insertBefore(f,n),f.appendChild(n)),f.classList.add("dropdown");var p=elCreate("span");p.className="button dropdownToggle inputPrefix";var m=elCreate("span");m.textContent=t.get("wcf.global.button.disabledI18n"),p.appendChild(m),f.insertBefore(p,n);var g=elCreate("ul");g.className="dropdownMenu",a.insertAfter(g,p);var v=function(t,n){var i=~~t.currentTarget.getAttribute("data-language-id"),a=r.childByClass(g,"active");null!==a&&a.classList.remove("active"),i&&t.currentTarget.classList.add("active"),this._select(e,i,t.currentTarget.children[0].textContent,n||!1)}.bind(this);for(var b in s)if(s.hasOwnProperty(b)){var y=elCreate("li");elAttr(y,"data-language-id",b),m=elCreate("span"),m.textContent=s[b],y.appendChild(m),y.addEventListener("click",v),g.appendChild(y)}if(u!==!0){var y=elCreate("li");y.className="dropdownDivider",elAttr(y,"data-language-id",0),g.appendChild(y),y=elCreate("li"),m=elCreate("span"),m.textContent=t.get("wcf.global.button.disabledI18n"),y.appendChild(m),y.addEventListener("click",v),g.appendChild(y)}var w=null;if(u===!0||i.size)for(var C=0,_=g.childElementCount;_>C;C++)if(~~g.children[C].getAttribute("data-language-id")===LANGUAGE_ID){w=g.children[C];break}o.init(p),o.registerCallback(f.id,d),l.set(e,{buttonLabel:p.children[0],element:n,languageId:0});var x=r.parentByTag(n,"FORM");if(null!==x){x.addEventListener("submit",h);var L=c.get(x);void 0===L&&(L=[],c.set(x,L)),L.push(e)}null!==w&&v({currentTarget:w},!0)},_select:function(t,n,i,r){var a=l.get(t);if(a.languageId!==n){var o=u.get(t);a.languageId&&o.set(a.languageId,a.element.value),0===n?u.set(t,new e):(a.buttonLabel.classList.contains("active")||r===!0)&&(a.element.value=o.has(n)?o.get(n):""),a.buttonLabel.textContent=i,a.buttonLabel.classList[n?"add":"remove"]("active"),a.languageId=n}a.element.blur(),a.element.focus()},_dropdownToggle:function(e,t){if("open"===t)for(var n,i,r=o.getDropdownMenu(e),a=elById(e).getAttribute("data-input-id"),l=u.get(a),s=0,c=r.childElementCount;c>s;s++)n=r.children[s],i=~~n.getAttribute("data-language-id"),i&&n.classList[l.has(i)||!l.size?"remove":"add"]("missingValue")},_submit:function(e){for(var t,n,i,r,a=c.get(e.currentTarget),o=0,s=a.length;s>o;o++)n=a[o],t=l.get(n),r=u.get(n),t.languageId&&r.set(t.languageId,t.element.value),r.size&&(r.forEach(function(t,r){i=elCreate("input"),i.type="hidden",i.name=n+"_i18n["+r+"]",i.value=t,e.currentTarget.appendChild(i)}),t.element.removeAttribute("name"))}};return f}),define("WoltLab/WCF/Ui/Suggestion",["Ajax","Core","Ui/SimpleDropdown"],function(e,t,n){"use strict";function i(e,t){this.init(e,t)}return i.prototype={init:function(e,n){if(this._dropdownMenu=null,this._value="",this._element=elById(e),null===this._element)throw new Error("Expected a valid element id.");if(this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},callbackSelect:null,excludedSearchValues:[],treshold:3},n),"function"!=typeof this._options.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this._element.addEventListener("click",function(e){e.stopPropagation()}),this._element.addEventListener("keydown",this._keyDown.bind(this)),this._element.addEventListener("keyup",this._keyUp.bind(this))},addExcludedValue:function(e){-1===this._options.excludedSearchValues.indexOf(e)&&this._options.excludedSearchValues.push(e)},removeExcludedValue:function(e){var t=this._options.excludedSearchValues.indexOf(e);-1!==t&&this._options.excludedSearchValues.splice(t,1)},_keyDown:function(e){if(null===this._dropdownMenu||!n.isOpen(this._element.id))return!0;if(13!==e.keyCode&&27!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode)return!0;for(var t,i=0,r=this._dropdownMenu.childElementCount;r>i&&(t=this._dropdownMenu.children[i],!t.classList.contains("active"));)i++;if(13===e.keyCode)n.close(this._element.id),this._select(t);else if(27===e.keyCode){if(!n.isOpen(this._element.id))return!0;n.close(this._element.id)}else{var a=0;38===e.keyCode?a=(0===i?r:i)-1:40===e.keyCode&&(a=i+1,a===r&&(a=0)),a!==i&&(t.classList.remove("active"),this._dropdownMenu.children[a].classList.add("active"))}return e.preventDefault(),!1},_select:function(e){var t=e instanceof Event;t&&(e=e.currentTarget.parentNode),this._options.callbackSelect(this._element.id,{objectId:e.children[0].getAttribute("data-object-id"),value:e.textContent}),t&&this._element.focus()},_keyUp:function(t){var i=t.currentTarget.value.trim();if(this._value!==i){if(i.length<this._options.treshold)return null!==this._dropdownMenu&&n.close(this._element.id),void(this._value=i);this._value=i,e.api(this,{parameters:{data:{excludedSearchValues:this._options.excludedSearchValues,searchString:i}}})
+var t=r.identify(e.currentTarget);o===t&&null!==p&&(window.clearTimeout(p),p=null),d=t,f=window.setTimeout(function(){f=null,d===t&&this._show()}.bind(this),E)}},_mouseLeave:function(){d=null,null===p&&(null===y&&(y=this._hide.bind(this)),null!==p&&window.clearTimeout(p),p=window.setTimeout(y,T))},_popoverMouseEnter:function(){null!==p&&(window.clearTimeout(p),p=null)},_show:function(){null!==p&&(window.clearTimeout(p),p=null);var e=null!==o&&o!==d;m.classList.contains("active")&&this._hide(e),o=d;var t=c.get(o),n=s.get(elAttr(t.element,"data-cache-id"));n.state===L?g.appendChild(n.content):n.state===_&&g.classList.add("loading"),this._rebuild(o),n.state===_&&(n.state=x,u.get(t.identifier).loadCallback(t.objectId,this))},_hide:function(e){null!==p&&(window.clearTimeout(p),p=null),m.classList.remove("active"),"boolean"==typeof e&&e===!0&&(m.classList.add("disableAnimation"),m.offsetHeight,this._clearContent())},_clearContent:function(){if(o&&g.childElementCount&&!m.classList.contains("active")){for(var e=s.get(c.get(o).element.getAttribute("data-cache-id"));g.childNodes.length;)e.content.appendChild(g.childNodes[0]);g.style.removeProperty("height")}},_rebuild:function(){if(!m.classList.contains("active")){if(m.classList.add("active"),m.classList.remove("disableAnimation"),g.classList.contains("loading"))if(0===g.childElementCount)0===l&&(l=g.offsetHeight),g.style.setProperty("height",l+"px");else{g.style.removeProperty("height");var e=g.offsetHeight;g.style.setProperty("height",l+"px"),g.offsetHeight,g.style.setProperty("height",e+"px")}a.set(m,c.get(o).element,{pointer:!0,vertical:"top",verticalOffset:3})}},_ajaxSetup:function(){return{}},ajaxApi:function(t,n,i){if("function"!=typeof n)throw new TypeError("Expected a valid callback for parameter 'success'.");e.api(this,t,n,i)}};return k}),define("WoltLab/WCF/BootstrapFrontend",["Ajax","WoltLab/WCF/Bootstrap","WoltLab/WCF/Controller/Sitemap","WoltLab/WCF/Controller/Style/Changer","WoltLab/WCF/Controller/Popover"],function(e,t,n,i,r){"use strict";var a={setup:function(e){t.setup(),n.setup(),e.styleChanger&&i.setup(),this._initUserPopover(),this._invokeBackgroundQueue(e.backgroundQueue.url,e.backgroundQueue.force)},_initUserPopover:function(){r.init({attributeName:"data-user-id",className:"userLink",identifier:"com.woltlab.wcf.user",loadCallback:function(e,t){var n=function(n){t.setContent("com.woltlab.wcf.user",e,n.returnValues.template)};t.ajaxApi({actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]},n,n)}})},_invokeBackgroundQueue:function(t,n){(Math.random()<.1||n)&&e.apiOnce({url:t,ignoreError:!0,silent:!0})}};return a}),define("WoltLab/WCF/List",[],function(){"use strict";function e(){this._set=t?new Set:[]}var t=objOwns(window,"Set")&&"function"==typeof window.Set;return e.prototype={add:function(e){t?this._set.add(e):this.has(e)||this._set.push(e)},clear:function(){t?this._set.clear():this._set=[]},"delete":function(e){if(t)return this._set["delete"](e);var n=this._set.indexOf(n);return-1===n?!1:(this._set.splice(n,1),!0)},forEach:function(e){if(t)this._set.forEach(e);else for(var n=0,i=this._set.length;i>n;n++)e(this._set[n])},has:function(e){return t?this._set.has(e):-1!==this._set.indexOf(e)}},Object.defineProperty(e.prototype,"size",{enumerable:!1,configurable:!0,get:function(){return _hasMap?this._set.size:this._set.length}}),e}),define("WoltLab/WCF/Ajax/Jsonp",["Core"],function(e){"use strict";var t={send:function(t,n,i,r){if(t="string"==typeof t?t.trim():"",0===t.length)throw new Error("Expected a non-empty string for parameter 'url'.");if("function"!=typeof n)throw new TypeError("Expected a valid callback function for parameter 'success'.");r=e.extend({parameterName:"callback",timeout:10},r||{});var a="wcf_jsonp_"+e.getUuid().replace(/-/g,"").substr(0,8),o=window.setTimeout(function(){window[a]=function(){},"function"==typeof i&&i()},1e3*(~~r.timeout||10));window[a]=function(){window.clearTimeout(o),n.apply(null,arguments)},t+=-1===t.indexOf("?")?"?":"&",t+=r.parameterName+"="+a;var l=elCreate("script");l.async=!0,elAttr(l,"src",t),document.head.appendChild(l)}};return t}),define("WoltLab/WCF/Bbcode/FromHtml",["EventHandler","StringUtil","Dom/Traverse"],function(e,t,n){"use strict";function i(e,t){var n=e[t?"previousSibling":"nextSibling"];return null!==n&&n.nodeType===Node.TEXT_NODE&&/\s$/.test(n.textContent)?!1:!0}var r=[],a={},o=[],l={convert:function(t){t.length&&this._setup();var n=elCreate("div");n.innerHTML=t;for(var i=elByTag("P",n);i.length;)i[0].outerHTML=i[0].innerHTML;for(i=elByTag("BR",n);i.length;)i[0].outerHTML="\n";var a=this._preserveSourceElements(n);e.fire("com.woltlab.wcf.bbcode.fromHtml","beforeConvert",{container:n});for(var o=0,l=r.length;l>o;o++)this._convert(n,r[o]);for(e.fire("com.woltlab.wcf.bbcode.fromHtml","afterConvert",{container:n}),this._restoreSourceElements(n,a),i=elByTag("*",n);i.length;)i[0].outerHTML=i[0].innerHTML;return t=this._convertSpecials(n.innerHTML)},_preserveSourceElements:function(e){for(var t,n,i=[],r=0,a=o.length;a>r;r++){t=elBySelAll(o[r].selector,e),n=[];for(var l=0,s=t.length;s>l;l++)this._preserveSourceElement(t[l],n);i.push(n)}return i},_preserveSourceElement:function(e,t){var n=elCreate("var");elAttr(n,"data-source","wcf"),e.parentNode.insertBefore(n,e);var i=document.createDocumentFragment();i.appendChild(e),t.push({fragment:i,placeholder:n})},_restoreSourceElements:function(e,t){for(var n,i,r,a=0,l=t.length;l>a;a++)if(i=t[a],0!==i.length)for(var s=0,c=i.length;c>s;s++)n=i[s],r=n.placeholder,r.parentNode.insertBefore(n.fragment,r),o[a].callback(r.previousElementSibling),r.parentNode.removeChild(r)},_convertSpecials:function(e){return e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">")},_setup:function(){r.length||(r=[{tagName:"STRONG",bbcode:"b"},{tagName:"DEL",bbcode:"s"},{tagName:"EM",bbcode:"i"},{tagName:"SUB",bbcode:"sub"},{tagName:"SUP",bbcode:"sup"},{tagName:"U",bbcode:"u"},{tagName:"KBD",bbcode:"tt"},{tagName:"A",callback:this._convertUrl.bind(this)},{tagName:"IMG",callback:this._convertImage.bind(this)},{tagName:"LI",callback:this._convertListItem.bind(this)},{tagName:"OL",callback:this._convertList.bind(this)},{tagName:"TABLE",callback:this._convertTable.bind(this)},{tagName:"UL",callback:this._convertList.bind(this)},{tagName:"BLOCKQUOTE",callback:this._convertBlockquote.bind(this)},{tagName:"SPAN",callback:this._convertSpan.bind(this)},{tagName:"DIV",callback:this._convertDiv.bind(this)}],a={span:[{style:"color",callback:this._convertInlineColor.bind(this)},{style:"font-size",callback:this._convertInlineFontSize.bind(this)},{style:"font-family",callback:this._convertInlineFontFamily.bind(this)}],div:[{style:"text-align",callback:this._convertInlineTextAlign.bind(this)}]},o=[{selector:"div.codeBox",callback:this._convertSourceCodeBox.bind(this)}],e.fire("com.woltlab.wcf.bbcode.fromHtml","init",{converter:r,inlineConverter:a,sourceConverter:o}))},_convert:function(e,t){if("function"==typeof t)return void t(e);for(var n,i=elByTag(t.tagName,e);i.length;)n=i[0],t.bbcode?n.outerHTML="["+t.bbcode+"]"+n.innerHTML+"[/"+t.bbcode+"]":t.callback(n)},_convertBlockquote:function(e){var i=elAttr(e,"data-author"),r=elAttr(e,"cite"),a="[quote]";i&&(i=t.escapeHTML(i).replace(/(\\)?'/g,function(e,t){return t?e:"\\'"}),a=r?"[quote='"+i+"','"+t.escapeHTML(r)+"']":"[quote='"+i+"']");var o=n.childByTag(e,"HEADER");null!==o&&e.removeChild(o);for(var l=n.childrenByTag(e,"DIV"),s=0,c=l.length;c>s;s++)l[s].outerHTML=l[s].innerHTML+"\n";e.outerHTML=a+e.innerHTML.replace(/^\n*/,"").replace(/\n*$/,"")+"[/quote]\n"},_convertImage:function(e){if(e.classList.contains("smiley"))return void(e.outerHTML=(i(e,!0)?" ":"")+elAttr(e,"alt")+(i(e,!1)?" ":""));var t=e.style.getPropertyValue("float")||"none",n=e.style.getPropertyValue("width");if(n="string"==typeof n?~~n.replace(/px$/,""):0,e.classList.contains("redactorEmbeddedAttachment")){var r=elAttr(e,"data-attachment-id");e.outerHTML=n>0?"[attach="+r+","+t+","+n+"][/attach]":"none"!==t?"[attach="+r+","+t+"][/attach]":"[attach="+r+"][/attach]"}else{var a=e.src.trim();e.outerHTML=n>0?"[img='"+a+"',"+t+","+n+"][/img]":"none"!==t?"[img='"+a+"',"+t+"][/img]":"[img]"+a+"[/img]"}},_convertList:function(e){var t;if("OL"===e.nodeName)t="[list=1]";else{var n=e.style.getPropertyValue("list-style-type")||"";t=""===n?"[list]":"[list="+("lower-latin"===n?"a":n)+"]"}e.outerHTML=t+e.innerHTML+"[/list]"},_convertListItem:function(e){e.outerHTML="UL"!==e.parentNode.nodeName&&"OL"!==e.parentNode.nodeName?e.innerHTML:"[*]"+e.innerHTML},_convertSpan:function(e){if(e.style.length||e.className)for(var t,n,i=0,r=a.span.length;r>i;i++)t=a.span[i],t.style?(n=e.style.getPropertyValue(t.style)||"",n&&t.callback(e,n)):e.classList.contains(t.className)&&t.callback(e);e.outerHTML=e.innerHTML},_convertDiv:function(e){if(e.className.length||e.style.length)for(var t,n,i=0,r=a.div.length;r>i;i++)t=a.div[i],t.className&&e.classList.contains(t.className)?t.callback(e):t.style&&(n=e.style.getPropertyValue(t.style)||"",n&&t.callback(e,n));e.outerHTML=e.innerHTML},_convertInlineColor:function(e,t){if(t.match(/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/i)){var n=RegExp.$1,i=RegExp.$2,r=RegExp.$3,a="0123456789ABCDEF";t="#"+(a.charAt((n-n%16)/16)+""+a.charAt(n%16))+(a.charAt((i-i%16)/16)+""+a.charAt(i%16))+(a.charAt((r-r%16)/16)+""+a.charAt(r%16))}e.innerHTML="[color="+t+"]"+e.innerHTML+"[/color]"},_convertInlineFontSize:function(e,t){t.match(/^(\d+)pt$/)?t=RegExp.$1:t.match(/^(\d+)(px|em|rem|%)$/)?(t=window.getComputedStyle(t).fontSize.replace(/^(\d+).*$/,"$1"),t=Math.round(t)):t="",t&&(t=Math.min(Math.max(t,8),36),e.innerHTML="[size="+t+"]"+e.innerHTML+"[/size]")},_convertInlineFontFamily:function(e,t){e.innerHTML="[font="+t.replace(/'/g,"")+"]"+e.innerHTML+"[/font]"},_convertInlineTextAlign:function(e,t){-1!==["center","justify","left","right"].indexOf(t)&&(e.innerHTML="[align="+t+"]"+e.innerHTML+"[/align]")},_convertTable:function(e){for(var t=elByTag("TD",e);t.length;)t[0].outerHTML="[td]"+t[0].innerHTML+"[/td]\n";for(t=elByTag("TR",e);t.length;)t[0].outerHTML="\n[tr]\n"+t[0].innerHTML+"[/tr]";var i=n.childByTag(e,"TBODY"),r=null===i?e.innerHTML:i.innerHTML;e.outerHTML="\n[table]"+r+"\n[/table]\n"},_convertUrl:function(e){var t=e.textContent.trim(),n=e.href.trim(),i="url";return""===n||""===t?void(e.outerHTML=e.innerHTML):(0===n.indexOf("mailto:")&&(n=n.substr(7),i="email"),void(e.outerHTML=n===t?"["+i+"]"+n+"[/"+i+"]":"["+i+"='"+n+"']"+e.innerHTML+"[/"+i+"]"))},_convertSourceCodeBox:function(e){var t=elAttr(e,"data-filename").trim()||"",i=elAttr(e,"data-highlighter");window.dtdesign=e;for(var r=n.childByTag(e.children[0],"OL"),a=~~r.getAttribute("start")||1,o="",l=0,s=r.childElementCount;s>l;l++)o&&(o+="\n"),o+=r.children[l].textContent;var c="[code='"+i+"',"+a+",'"+t+"']";e.outerHTML=c+o+"[/code]"}};return l}),define("WoltLab/WCF/Bbcode/Parser",[],function(){"use strict";var e={parse:function(e){var t=this._splitTags(e);return this._buildLinearTree(t),t},_splitTags:function(e){for(var t,n,i=__REDACTOR_BBCODES.join("|"),r="(\\[(?:/(?:"+i+")|(?:"+i+")(?:=(?:\\'[^\\'\\\\]*(?:\\\\.[^\\'\\\\]*)*\\'|[^,\\]]*)(?:,(?:\\'[^\\'\\\\]*(?:\\\\.[^\\'\\\\]*)*'|[^,\\]]*))*)?)\\])",a=new RegExp("^"+r+"$","i"),o=e.split(new RegExp(r,"i")),l=[],s=0,c=o.length;c>s;s++)t=o[s],""!==t&&(t.match(a)?(n={name:"",closing:!1,attributes:[],source:t},"/"===t[1]?(n.name=t.substring(2,t.length-1),n.closing=!0):t.match(/^\[([a-z0-9]+)=?(.*)\]$/i)&&(n.name=RegExp.$1,RegExp.$2&&(n.attributes=this._parseAttributes(RegExp.$2))),l.push(n)):l.push(t));return l},_buildLinearTree:function(e){for(var t,n,i=[],r="",a=0;a<e.length;a++)if(t=e[a],"object"==typeof t){if(r.length&&(t.name!==r||!t.closing)){e[a]=t.source;continue}if(t.closing){if(this._hasOpenTag(i,t.name)){n=this._closeUnclosedTags(e,i,t.name);for(var o=0,l=n.length;l>o;o++)e.splice(a,n[o]),a++;i.pop().pair=a}else e[a]=t.source;r===t.name&&(r="")}else i.push(t),-1!==__REDACTOR_SOURCE_BBCODES.indexOf(t.name)&&(r=t.name)}this._closeUnclosedTags(e,i,"")},_closeUnclosedTags:function(e,t,n){for(var i,r,a=[],o=t.length-1;o>=0&&(i=t[o],i.name!==n);o--)r={name:i.name,closing:!0,attributes:i.attributes.slice(),source:"[/"+i.name+"]"},i.pair=e.length,e.push(r),t.pop(),a.push({name:i.name,closing:!1,attributes:i.attributes.slice(),source:i.source});return a.reverse()},_hasOpenTag:function(e,t){for(var n=e.length-1;n>=0;n--)if(e[n].name===t)return!0;return!1},_parseAttributes:function(e){for(var t,n=e.split(/(?:^|,)('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'|[^,]*)/g),i=[],r=0,a=n.length;a>r;r++)t=n[r],""!==t&&i.push("'"===t.charAt(0)&&"'"===t.substr(-1)?t.substring(1,t.length-1).trim():t.trim());return i}};return e}),define("WoltLab/WCF/Bbcode/ToHtml",["Core","EventHandler","Language","StringUtil","WoltLab/WCF/Bbcode/Parser"],function(e,t,n,i,r){"use strict";function a(e){return e&&e==~~e}function o(e){return-1!==e.indexOf(".")||!a(e)&&!l(e)}function l(e){return objOwns(__REDACTOR_CODE_HIGHLIGHTERS,e)}var s=null,c={},u=[],d=[],h={convert:function(n,i){c=e.extend({attachments:{images:{},thumbnailUrl:"",url:""}},i),this._convertSpecials(n);var a=r.parse(n);a.length&&this._initBBCodes(),t.fire("com.woltlab.wcf.bbcode.toHtml","beforeConvert",{stack:a});for(var o,l,s=0,u=a.length;u>s;s++)o=a[s],"object"==typeof o&&(l=this._convert(a,o,s),Array.isArray(l)?(a[s]=null===l[0]?o.source:l[0],a[o.pair]=null===l[1]?a[o.pair].source:l[1]):a[s]=l);return t.fire("com.woltlab.wcf.bbcode.toHtml","afterConvert",{stack:a}),n=a.join(""),n=n.replace(/\n/g,"<br>")},_convertSpecials:function(e){return e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">")},_initBBCodes:function(){null===s&&(s={b:"strong",i:"em",u:"u",s:"del",sub:"sub",sup:"sup",table:"table",td:"td",tr:"tr",tt:"kbd",align:this._convertAlignment.bind(this),attach:this._convertAttachment.bind(this),color:this._convertColor.bind(this),code:this._convertCode.bind(this),email:this._convertEmail.bind(this),list:this._convertList.bind(this),quote:this._convertQuote.bind(this),size:this._convertSize.bind(this),url:this._convertUrl.bind(this),img:this._convertImage.bind(this)},u=["quote","table","td","tr"],d=["table","td","tr"],t.fire("com.woltlab.wcf.bbcode.toHtml","init",{bbcodes:s,removeNewlineAfter:u,removeNewlineBefore:d}))},_convert:function(e,t,n){var i,r=s[t.name];return void 0===r?[null,null]:(-1!==u.indexOf(t.name)&&(i=e[n+1],"string"==typeof i&&(e[n+1]=i.replace(/^\n/,"")),e.length>t.pair+1&&(i=e[t.pair+1],"string"==typeof i&&(e[t.pair+1]=i.replace(/^\n/,"")))),-1!==d.indexOf(t.name)&&(n-1>=0&&(i=e[n-1],"string"==typeof i&&(e[n-1]=i.replace(/\n$/,""))),i=e[t.pair-1],"string"==typeof i&&(e[t.pair-1]=i.replace(/\n$/,""))),this._convertSmilies(e),"string"==typeof r?["<"+r+">","</"+r+">"]:r(e,t,n))},_convertAlignment:function(e,t){var n=t.attributes.length?t.attributes[0]:"";return-1===["center","justify","left","right"].indexOf(n)?[null,null]:['<div style="text-align: '+n+'">',"</div>"]},_convertAttachment:function(e,t){var n=0,i=t.attributes,r=i.length;if(c.attachments.url?r>0&&(n=~~i[0],c.attachments.images.hasOwnProperty(n)||(r=0)):r=0,0===r)return[null,null];var a=~~c.attachments.images[n].height,o=~~c.attachments.images[n].width,l=["max-height: "+a+"px","max-width: "+o+"px"];r>1&&("left"===t.attributes[1]||"right"===i[1])&&(l.push("float: "+i[1]),l.push("margin: "+("left"===i[1]?"0 15px 7px 0":"0 0 7px 15px")));var s=c.attachments.thumbnailUrl;return r>2&&(width=~~i[2]||0,width&&(width>o&&(width=o),l.push("width: "+width+"px"),s=c.attachments.url)),['<img src="'+s.replace(/987654321/,n)+'" class="redactorEmbeddedAttachment redactorDisableResize" data-attachment-id="'+n+'"'+(l.length?' style="'+l.join(";")+'"':"")+">",""]},_convertCode:function(e,t,n){var r=t.attributes,s="",c="auto",u=0;switch(r.length){case 1:a(r[0])?u=~~r[0]:o(r[0])?s=r[0]:l(r[0])&&(c=r[0]);break;case 2:a(r[0])?(u=~~r[0],l(r[1])?c=r[1]:o(r[1])&&(s=r[1])):(l(r[0])&&(c=r[0]),o(r[1])&&(s=r[1]));break;case 3:l(r[0])&&(c=r[0]),a(r[1])&&(u=~~r[1]),o(r[2])&&(s=r[2])}for(var d,h,f=!0,p=-1,m=n+1;m<t.pair;m++){if(h=e[m],""===h.trim()){if(f){e[m]="";continue}-1===p&&(p=m)}else f=!1,p=-1;d=h.split("\n");for(var g=0,v=d.length;v>g;g++)d[g]="<li>"+(d[g]?i.escapeHTML(d[g]):"")+"</li>";e[m]=d.join("")}if(!f&&-1!==p)for(var m=t.pair-1;m>=p;m--)e[m]="";return['<div class="codeBox container" contenteditable="false" data-highlighter="'+c+'" data-filename="'+(s?i.escapeHTML(s):"")+'"><div><div><h3>'+__REDACTOR_CODE_HIGHLIGHTERS[c]+(s?": "+i.escapeHTML(s):"")+'</h3></div><ol start="'+(u>1?u:1)+'">',"</ol></div></div>"]},_convertColor:function(e,t){return t.attributes.length&&t.attributes[0].match(/^[a-z0-9#]+$/i)?['<span style="color: '+i.escapeHTML(t.attributes[0])+'">',"</span>"]:[null,null]},_convertEmail:function(e,t,n){var r="";if(t.attributes.length)r=t.attributes[0];else{for(var a,o=n+1;o<t.pair;o++){if(a=e[o],"object"==typeof a){r="";break}r+=a}if(""===r.trim())return[null,null]}return['<a href="mailto:'+i.escapeHTML(r)+'">',"</a>"]},_convertImage:function(e,t,n){var r="none",a="",o=0;switch(t.attributes.length){case 0:if(!(n+1<t.pair&&"string"==typeof e[n+1]))return"";a=e[n+1],e[n+1]="";break;case 1:a=t.attributes[0];break;case 2:a=t.attributes[0],r=t.attributes[1];break;case 3:a=t.attributes[0],r=t.attributes[1],o=~~t.attributes[2]}"left"!==r&&"right"!==r&&(r="none");var l=[];return o>0&&l.push("width: "+o+"px"),"none"!==r&&(l.push("float: "+r),l.push("margin: "+("left"===r?"0 15px 7px 0":"0 0 7px 15px"))),['<img src="'+i.escapeHTML(a)+'"'+(l.length?' style="'+l.join(";")+'"':"")+">",""]},_convertList:function(e,t,n){for(var i=items.attributes.length?t.attributes[0]:"",r=n+1;r<t.pair;r++)"string"==typeof e[r]&&(e[r]=e[r].replace(/\[\*\]/g,"<li>"));return"1"==i||"decimal"===i?["<ol>","</ol>"]:i.length&&i.match(/^(?:none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)$/)?['<ul style="list-style-type: '+i+'">',"</ul>"]:["<ul>","</ul>"]},_convertQuote:function(e,t,r){var a="",o="";t.attributes.length>1?(a=t.attributes[0],o=t.attributes[1]):1===t.attributes.length&&(a=t.attributes[0]);for(var l=t.pair-1;l>r;l--)if("string"==typeof e[l]){e[l]=e[l].replace(/\n$/,"");break}var s="";return a?(o&&(s='<a href="'+i.escapeHTML(o)+'" tabindex="-1">'),s+=n.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:a.replace(/\\'/g,"'")}),o&&(s+="</a>")):s="<small>"+n.get("wcf.bbcode.quote.title.clickToSet")+"</small>",['<blockquote class="quoteBox container containerPadding quoteBoxSimple" cite="'+i.escapeHTML(o)+'" data-author="'+i.escapeHTML(a)+'"><header contenteditable="false"><h3>'+s+'</h3><a class="redactorQuoteEdit"></a></header><div>',"</div></blockquote>"]},_convertSmilies:function(e){for(var t,n,r,a=0,o=e.length;o>a;a++)if(n=e[a],"string"==typeof n){for(var l in __REDACTOR_SMILIES)__REDACTOR_SMILIES.hasOwnProperty(l)&&(t=l.replace(/</g,"<").replace(/>/g,">"),r=new RegExp("(\\s|^)"+i.escapeRegExp(l)+"(?=\\s|$)","gi"),n=n.replace(r,'$1<img src="'+__REDACTOR_SMILIES[l]+'" class="smiley" alt="'+t+'">'));e[a]=n}else-1!==__REDACTOR_SOURCE_BBCODES.indexOf(n.name)&&(a=n.pair)},_convertSize:function(e,t){return t.attributes.length&&0!==~~t.attributes[0]?['<span style="font-size: '+~~t.attributes[0]+'pt">',"</span>"]:[null,null]},_convertUrl:function(e,t){return t.attributes.length?['<a href="'+i.escapeHTML(t.attributes[0])+'">',"</a>"]:[null,null]}};return h}),define("WoltLab/WCF/Controller/Clipboard",["Ajax","Core","Dictionary","EventHandler","Language","List","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/SimpleDropdown"],function(e,t,n,i,r,a,o,l,s,c,u,d){"use strict";var h=new n,f=new n,p=elByClass("jsClipboardContainer"),m=new o,g=new a,v={},b=null,y=null,w=null,C={setup:function(e){if(b=this._mark.bind(this),y=this._executeAction.bind(this),w=this._unmarkAll.bind(this),v=t.extend({hasMarkedItems:!1,pageClassName:"",pageObjectId:0},e),!v.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");this._initContainers(),this._initEditors(),v.hasMarkedItems&&p.length&&this._loadMarkedItems(),l.add("WoltLab/WCF/Controller/Clipboard",this._initContainers.bind(this))},reload:function(){h.size&&this._loadMarkedItems()},_initContainers:function(){for(var e=0,t=p.length;t>e;e++){var n=p[e],i=c.identify(n),r=h.get(i);if(void 0===r){var o=elBySel(".jsClipboardMarkAll",n);null!==o&&(elAttr(o,"data-container-id",i),o.addEventListener("click",this._markAll.bind(this))),r={checkboxes:elByClass("jsClipboardItem",n),element:n,markAll:o,markedObjectIds:new a},h.set(i,r)}for(var l=0,s=r.checkboxes.length;s>l;l++){var u=r.checkboxes[l];g.has(u)||(elAttr(u,"data-container-id",i),u.addEventListener("click",b),g.add(u))}}},_initEditors:function(){for(var e=function(e){try{var t=elAttr(e,"data-types");if("string"==typeof t)return JSON.parse('{ "types": '+t.replace(/'/g,'"')+"}").types}catch(n){throw new Error("Expected a valid 'data-type' attribute for element '"+c.identify(e)+"'.")}return[]},t=elByClass("jsClipboardEditor"),n=0,i=t.length;i>n;n++)for(var r=t[n],a=e(r),o=0,l=a.length;l>o;o++)f.set(a[o],r)},_loadMarkedItems:function(){e.api(this,{actionName:"getMarkedItems",parameters:{pageClassName:v.pageClassName,pageObjectID:v.pageObjectId}})},_markAll:function(e){for(var t=e.currentTarget,n="INPUT"!==t.nodeName||t.checked,i=[],r=elAttr(t,"data-container-id"),a=h.get(r),o=elAttr(a.element,"data-type"),l=0,c=a.checkboxes.length;c>l;l++){var u=a.checkboxes[l],d=~~u.getAttribute("data-object-id");n?u.checked||(u.checked=!0,a.markedObjectIds.add(d),i.push(d)):u.checked&&(u.checked=!1,a.markedObjectIds["delete"](d),i.push(d));var f=s.parentByClass(t,"jsClipboardObject");null!==f&&f.classList[n?"addClass":"removeClass"]("jsMarked")}this._saveState(o,i,n)},_mark:function(e){var t=e.currentTarget,n=~~t.getAttribute("data-object-id"),i=t.checked,r=elAttr(t,"data-container-id"),a=h.get(r),o=elAttr(a.element,"data-type"),l=s.parentByClass(t,"jsClipboardObject");a.markedObjectIds[i?"add":"delete"](n),l.classList[i?"add":"remove"]("jsMarked");for(var c=!0,u=0,d=a.checkboxes.length;d>u;u++)if(!a.checkboxes[u].checked){c=!1;break}a.markAll.checked=c,this._saveState(o,[n],i)},_saveState:function(t,n,i){e.api(this,{actionName:i?"mark":"unmark",parameters:{pageClassName:v.pageClassName,pageObjectID:v.pageObjectId,objectIDs:n,objectType:t}})},_executeAction:function(e){var t=e.currentTarget,n=m.get(t);if(n.url)return void(window.location.href=n.url);var r=function(){var e=elAttr(t,"data-type");i.fire("com.woltlab.wcf.clipboard",e,{data:n,listItem:t,responseData:null}),"function"==typeof window.jQuery&&window.jQuery(f.get(e)).trigger("clipboardAction",[e,n.actionName,n.parameters])},a="string"==typeof n.internalData.confirmMessage?n.internalData.confirmMessage:"",o=!0;if("object"==typeof n.parameters&&n.parameters.actionName&&n.parameters.className){if("unmarkAll"===n.parameters.actionName||Array.isArray(n.parameters.objectIDs))if(a.length){var l="string"==typeof n.internalData.template?n.internalData.template:"";u.show({confirm:function(){var e={};if(l.length)for(var i=u.getContentElement().querySelectorAll("input, select, textarea"),r=0,a=i.length;a>r;r++){var o=i[r],s=elAttr(o,"name");switch(o.nodeName){case"INPUT":o.checked&&(e[s]=elAttr(o,"value"));break;case"SELECT":e[s]=o.value;break;case"TEXTAREA":e[s]=o.value.trim()}}this._executeProxyAction(t,n,e)}.bind(this),message:a,template:l})}else this._executeProxyAction(t,n)}else a.length&&(o=!1,u.show({confirm:r,message:a}));o&&r()},_executeProxyAction:function(t,n,r){r=r||{};var a="unmarkAll"!==n.parameters.actionName?n.parameters.objectIDs:[],o={data:r};if("object"==typeof n.internalData.parameters)for(var l in n.internalData.parameters)n.internalData.parameters.hasOwnProperty(l)&&(o[l]=n.internalData.parameters[l]);e.api(this,{actionName:n.parameters.actionName,className:n.parameters.className,objectIDs:a,parameters:o},function(e){if("unmarkAll"!==n.actionName){var r=elAttr(t,"data-type");i.fire("com.woltlab.wcf.clipboard",r,{data:n,listItem:t,responseData:e}),"function"==typeof window.jQuery&&window.jQuery(f.get(r)).trigger("clipboardActionResponse",[e,r,n.actionName,n.parameters])}this._loadMarkedItems()}.bind(this))},_unmarkAll:function(t){var n=elAttr(t.currentTarget,"data-type");e.api(this,{actionName:"unmarkAll",parameters:{objectType:n}})},_ajaxSetup:function(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}},_ajaxSuccess:function(e){if("unmarkAll"===e.actionName)return void h.forEach(function(t){if(elAttr(t.element,"data-type")===e.returnValues.objectType){for(var n=elByClass("jsMarked",t.element);n.length;)n[0].classList.remove("jsMarked");t.markAll.checked=!1;for(var i=0,r=t.checkboxes.length;r>i;i++)t.checkboxes[i].checked=!1;f.get(e.returnValues.objectType).innerHTML=""}}.bind(this));if(f.forEach(function(e){e.innerHTML=""}),m=new o,h.forEach(function(t){var n=elAttr(t.element,"data-type"),i=e.returnValues.markedItems&&objOwns(e.returnValues.markedItems,n)?e.returnValues.markedItems[n]:[];this._rebuildMarkings(t,i)}.bind(this)),e.returnValues&&e.returnValues.items){var t=document.createDocumentFragment();for(var n in e.returnValues.items)if(e.returnValues.items.hasOwnProperty(n)&&f.has(n)){var i=e.returnValues.items[n],a=f.get(n),l=s.childrenByTag(a,"UL"),c=l[0]||null;null===c&&(c=elCreate("ul")),t.appendChild(c);var u=elCreate("li");u.classList.add("dropdown"),c.appendChild(u);var p=elCreate("span");p.className="dropdownToggle button",p.textContent=i.label,u.appendChild(p);var g=elCreate("ol");g.classList.add("dropdownMenu");for(var v in i.items)if(i.items.hasOwnProperty(v)){var b=i.items[v],C=elCreate("li"),_=elCreate("span");_.textContent=b.label,C.appendChild(_),g.appendChild(C),elAttr(C,"data-type",n),C.addEventListener("click",y),m.set(C,b)}var x=elCreate("li");x.classList.add("dropdownDivider"),g.appendChild(x);var L=elCreate("li");elAttr(L,"data-type",n);var _=elCreate("span");_.textContent=r.get("wcf.clipboard.item.unmarkAll"),L.appendChild(_),g.appendChild(L),u.appendChild(g),L.addEventListener("click",w),a.appendChild(t),d.init(p,!1)}}},_rebuildMarkings:function(e,t){for(var n=!0,i=0,r=e.checkboxes.length;r>i;i++){var a=e.checkboxes[i],o=s.parentByClass(a,"jsClipboardObject"),l=-1!==t.indexOf(~~a.getAttribute("data-object-id"));l||(n=!1),a.checked=l,o.classList[l?"add":"remove"]("jsMarked")}e.markAll.checked=n}};return C}),define("WoltLab/WCF/Language/Input",["Dictionary","Language","ObjectMap","StringUtil","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,n,i,r,a,o){"use strict";var l=new e,s=!1,c=new n,u=new e,d=null,h=null,f={init:function(t,n,r,a){if(!u.has(t)){var o=elById(t);if(null===o)throw new Error("Expected a valid element id, cannot find '"+t+"'.");this._setup();var l=new e;for(var s in n)n.hasOwnProperty(s)&&l.set(~~s,i.unescapeHTML(n[s]));u.set(t,l),this._initElement(t,o,l,r,a)}},_setup:function(){s||(s=!0,d=this._dropdownToggle.bind(this),h=this._submit.bind(this))},_initElement:function(e,n,i,s,u){var f=n.parentNode;f.classList.contains("inputAddon")||(f=elCreate("div"),f.className="inputAddon"+("TEXTAREA"===n.nodeName?" inputAddonTextarea":""),elAttr(f,"data-input-id",e),n.parentNode.insertBefore(f,n),f.appendChild(n)),f.classList.add("dropdown");var p=elCreate("span");p.className="button dropdownToggle inputPrefix";var m=elCreate("span");m.textContent=t.get("wcf.global.button.disabledI18n"),p.appendChild(m),f.insertBefore(p,n);var g=elCreate("ul");g.className="dropdownMenu",a.insertAfter(g,p);var v=function(t,n){var i=~~t.currentTarget.getAttribute("data-language-id"),a=r.childByClass(g,"active");null!==a&&a.classList.remove("active"),i&&t.currentTarget.classList.add("active"),this._select(e,i,t.currentTarget.children[0].textContent,n||!1)}.bind(this);for(var b in s)if(s.hasOwnProperty(b)){var y=elCreate("li");elAttr(y,"data-language-id",b),m=elCreate("span"),m.textContent=s[b],y.appendChild(m),y.addEventListener("click",v),g.appendChild(y)}if(u!==!0){var y=elCreate("li");y.className="dropdownDivider",elAttr(y,"data-language-id",0),g.appendChild(y),y=elCreate("li"),m=elCreate("span"),m.textContent=t.get("wcf.global.button.disabledI18n"),y.appendChild(m),y.addEventListener("click",v),g.appendChild(y)}var w=null;if(u===!0||i.size)for(var C=0,_=g.childElementCount;_>C;C++)if(~~g.children[C].getAttribute("data-language-id")===LANGUAGE_ID){w=g.children[C];break}o.init(p),o.registerCallback(f.id,d),l.set(e,{buttonLabel:p.children[0],element:n,languageId:0});var x=r.parentByTag(n,"FORM");if(null!==x){x.addEventListener("submit",h);var L=c.get(x);void 0===L&&(L=[],c.set(x,L)),L.push(e)}null!==w&&v({currentTarget:w},!0)},_select:function(t,n,i,r){var a=l.get(t);if(a.languageId!==n){var o=u.get(t);a.languageId&&o.set(a.languageId,a.element.value),0===n?u.set(t,new e):(a.buttonLabel.classList.contains("active")||r===!0)&&(a.element.value=o.has(n)?o.get(n):""),a.buttonLabel.textContent=i,a.buttonLabel.classList[n?"add":"remove"]("active"),a.languageId=n}a.element.blur(),a.element.focus()},_dropdownToggle:function(e,t){if("open"===t)for(var n,i,r=o.getDropdownMenu(e),a=elById(e).getAttribute("data-input-id"),l=u.get(a),s=0,c=r.childElementCount;c>s;s++)n=r.children[s],i=~~n.getAttribute("data-language-id"),i&&n.classList[l.has(i)||!l.size?"remove":"add"]("missingValue")},_submit:function(e){for(var t,n,i,r,a=c.get(e.currentTarget),o=0,s=a.length;s>o;o++)n=a[o],t=l.get(n),r=u.get(n),t.languageId&&r.set(t.languageId,t.element.value),r.size&&(r.forEach(function(t,r){i=elCreate("input"),i.type="hidden",i.name=n+"_i18n["+r+"]",i.value=t,e.currentTarget.appendChild(i)}),t.element.removeAttribute("name"))}};return f}),define("WoltLab/WCF/Ui/Suggestion",["Ajax","Core","Ui/SimpleDropdown"],function(e,t,n){"use strict";function i(e,t){this.init(e,t)}return i.prototype={init:function(e,n){if(this._dropdownMenu=null,this._value="",this._element=elById(e),null===this._element)throw new Error("Expected a valid element id.");if(this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},callbackSelect:null,excludedSearchValues:[],treshold:3},n),"function"!=typeof this._options.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this._element.addEventListener("click",function(e){e.stopPropagation()}),this._element.addEventListener("keydown",this._keyDown.bind(this)),this._element.addEventListener("keyup",this._keyUp.bind(this))},addExcludedValue:function(e){-1===this._options.excludedSearchValues.indexOf(e)&&this._options.excludedSearchValues.push(e)},removeExcludedValue:function(e){var t=this._options.excludedSearchValues.indexOf(e);-1!==t&&this._options.excludedSearchValues.splice(t,1)},_keyDown:function(e){if(null===this._dropdownMenu||!n.isOpen(this._element.id))return!0;if(13!==e.keyCode&&27!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode)return!0;for(var t,i=0,r=this._dropdownMenu.childElementCount;r>i&&(t=this._dropdownMenu.children[i],!t.classList.contains("active"));)i++;if(13===e.keyCode)n.close(this._element.id),this._select(t);else if(27===e.keyCode){if(!n.isOpen(this._element.id))return!0;n.close(this._element.id)}else{var a=0;38===e.keyCode?a=(0===i?r:i)-1:40===e.keyCode&&(a=i+1,a===r&&(a=0)),a!==i&&(t.classList.remove("active"),this._dropdownMenu.children[a].classList.add("active"))}return e.preventDefault(),!1},_select:function(e){var t=e instanceof Event;t&&(e=e.currentTarget.parentNode),this._options.callbackSelect(this._element.id,{objectId:e.children[0].getAttribute("data-object-id"),value:e.textContent}),t&&this._element.focus()},_keyUp:function(t){var i=t.currentTarget.value.trim();if(this._value!==i){if(i.length<this._options.treshold)return null!==this._dropdownMenu&&n.close(this._element.id),void(this._value=i);this._value=i,e.api(this,{parameters:{data:{excludedSearchValues:this._options.excludedSearchValues,searchString:i}}})
}},_ajaxSetup:function(){return{data:this._options.ajax}},_ajaxSuccess:function(e){if(null===this._dropdownMenu?(this._dropdownMenu=elCreate("div"),this._dropdownMenu.className="dropdownMenu",n.initFragment(this._element,this._dropdownMenu)):this._dropdownMenu.innerHTML="",e.returnValues.length){for(var t,i,r,a=0,o=e.returnValues.length;o>a;a++)i=e.returnValues[a],t=elCreate("a"),t.textContent=i.label,elAttr(t,"data-object-id",i.objectID),t.addEventListener("click",this._select.bind(this)),r=elCreate("li"),0===a&&(r.className="active"),r.appendChild(t),this._dropdownMenu.appendChild(r);n.open(this._element.id)}else n.close(this._element.id)}},i}),define("WoltLab/WCF/Ui/ItemList",["Core","Dictionary","Language","Dom/Traverse","WoltLab/WCF/Ui/Suggestion"],function(e,t,n,i,r){"use strict";var a="",o=new t,l=!1,s=null,c=null,u=null,d=null,h={init:function(t,n,a){var l=elById(t);if(null===l)throw new Error("Expected a valid element id.");a=e.extend({ajax:{actionName:"getSearchResultList",className:"",data:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},a);var s=i.parentByTag(l,"FORM");if(null!==s&&a.isCSV===!1){if(!a.submitFieldName.length&&"function"!=typeof a.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");s.addEventListener("submit",function(){var e=this.getValues(t);if(a.submitFieldName.length)for(var n,i=0,r=e.length;r>i;i++)n=elCreate("input"),n.type="hidden",n.name=a.submitFieldName.replace(/{$objectId}/,e[i].objectId),n.value=e[i].value,s.appendChild(n);else a.callbackSubmit(s,e)}.bind(this))}this._setup();var c=this._createUI(l,a,n),u=new r(t,{ajax:a.ajax,callbackSelect:this._addItem.bind(this),excludedSearchValues:a.excludedSearchValues});if(o.set(t,{dropdownMenu:null,element:c.element,list:c.list,listItem:c.element.parentNode,options:a,shadow:c.shadow,suggestion:u}),n=c.values.length?c.values:n,Array.isArray(n))for(var d,h=0,f=n.length;f>h;h++)d=n[h],"string"==typeof d&&(d={objectId:0,value:d}),this._addItem(t,d)},getValues:function(e){if(!o.has(e))throw new Error("Element id '"+e+"' is unknown.");for(var t,n,r=o.get(e),a=i.childrenByClass(r.list,"item"),l=[],s=0,c=a.length;c>s;s++)n=a[s],t={objectId:elAttr(n,"data-object-id"),value:i.childByTag(n,"SPAN").textContent},l.push(t);return l},_setup:function(){l||(l=!0,s=this._keyDown.bind(this),c=this._keyPress.bind(this),u=this._keyUp.bind(this),d=this._removeItem.bind(this))},_createUI:function(e,t){var n=elCreate("ol");n.className="inputItemList",elAttr(n,"data-element-id",e.id),n.addEventListener("click",function(t){t.target===n&&e.focus()});var i=elCreate("li");i.className="input",n.appendChild(i),e.addEventListener("keydown",s),e.addEventListener("keypress",c),e.addEventListener("keyup",u),e.parentNode.insertBefore(n,e),i.appendChild(e),-1!==t.maxLength&&elAttr(e,"maxLength",t.maxLength);var r=null,a=[];if(t.isCSV&&(r=elCreate("input"),r.className="itemListInputShadow",r.type="hidden",r.name=e.name,e.removeAttribute("name"),n.parentNode.insertBefore(r,n),"TEXTAREA"===e.nodeName)){for(var o,l=e.value.split(","),d=0,h=l.length;h>d;d++)o=l[d].trim(),o.length&&a.push(o);var f=elCreate("input");e.parentNode.insertBefore(f,e),f.id=e.id,e.parentNode.removeChild(e),e=f}return{element:e,list:n,shadow:r,values:a}},_handleLimit:function(e){var t=o.get(e);-1!==t.options.maxItems&&(t.list.childElementCount-1<t.options.maxItems?t.element.disabled&&(t.element.disabled=!1,t.element.removeAttribute("placeholder")):t.element.disabled||(t.element.disabled=!0,elAttr(t.element,"placeholder",n.get("wcf.global.form.input.maxItems"))))},_keyDown:function(e){var t=e.currentTarget,n=t.parentNode.previousElementSibling;a=t.id,8===e.keyCode?0===t.value.length&&null!==n&&(n.classList.contains("active")?this._removeItem(null,n):n.classList.add("active")):27===e.keyCode&&null!==n&&n.classList.contains("active")&&n.classList.remove("active")},_keyPress:function(e){if(13===e.charCode||44===e.charCode){if(e.preventDefault(),o.get(e.currentTarget.id).options.restricted)return;var t=e.currentTarget.value.trim();t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}},_keyUp:function(e){var t=e.currentTarget;if(t.value.length>0){var n=t.parentNode.previousElementSibling;null!==n&&n.classList.remove("active")}},_addItem:function(e,t){var n=o.get(e),i=elCreate("li");i.className="item";var r=elCreate("span");r.className="content",elAttr(r,"data-object-id",t.objectId),r.textContent=t.value;var a=elCreate("a");a.className="icon icon16 fa-times",a.addEventListener("click",d),i.appendChild(r),i.appendChild(a),n.list.insertBefore(i,n.listItem),n.suggestion.addExcludedValue(t.value),n.element.value="",this._handleLimit(e);var l=this._syncShadow(n);"function"==typeof n.options.callbackChange&&(null===l&&(l=this.getValues(e)),n.options.callbackChange(e,l))},_removeItem:function(e,t){t=null===e?t:e.currentTarget.parentNode;var n=t.parentNode,i=elAttr(n,"data-element-id"),r=o.get(i);r.suggestion.removeExcludedValue(t.children[0].textContent),n.removeChild(t),r.element.focus(),this._handleLimit(i);var a=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===a&&(a=this.getValues(i)),r.options.callbackChange(i,a))},_syncShadow:function(e){if(!e.options.isCSV)return null;for(var t="",n=this.getValues(e.element.id),i=0,r=n.length;r>i;i++)t+=(t.length?",":"")+n[i].value;return e.shadow.value=t,n}};return h}),define("WoltLab/WCF/Controller/Notice/Dismiss",["Ajax"],function(e){"use strict";var t={setup:function(){var e=elByClass("jsDismissNoticeButton");if(e.length)for(var t=this._click.bind(this),n=0,i=e.length;i>n;n++)e[n].addEventListener("click",t)},_click:function(t){var n=t.currentTarget;e.apiOnce({data:{actionName:"dismiss",className:"wcf\\data\\notice\\NoticeAction",objectIDs:[elAttr(n,"data-object-id")]},success:function(){var e=n.parentNode;e.addEventListener("transitionend",function(){e.parentNode.removeChild(e)}),e.classList.remove("active")}})}};return t}),define("WoltLab/WCF/Ui/Collapsible/Sidebar",["Ajax","Language","Dom/Util"],function(e,t,n){"use strict";var i=!1,r=null,a="",o={setup:function(){var e=elBySel(".sidebar");null!==e&&(i="true"===elAttr(e,"data-is-open"),r=elById("main"),a=elAttr(e,"data-sidebar-name"),this._createUI(e),r.classList[i?"remove":"add"]("sidebarCollapsed"))},_createUI:function(e){var i=elCreate("a");i.href="#",i.className="collapsibleButton jsTooltip",elAttr(i,"title",t.get("wcf.global.button.collapsible"));var r=elCreate("span");r.appendChild(i),n.prepend(r,e),i.addEventListener("click",this._click.bind(this))},_click:function(t){t.preventDefault(),i=i===!1,e.api(this,{isOpen:~~i})},_ajaxSetup:function(){return{data:{actionName:"toggle",className:"wcf\\system\\user\\collapsible\\content\\UserCollapsibleSidebarHandler",sidebarName:a},url:"index.php/AJAXInvoke/?t="+SECURITY_TOKEN+SID_ARG_2ND}},_ajaxSuccess:function(){r.classList[i?"remove":"add"]("sidebarCollapsed")}};return o}),define("WoltLab/WCF/Ui/ItemList/User",["WoltLab/WCF/Ui/ItemList"],function(e){"use strict";var t={init:function(t,n){e.init(t,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:~~n.includeUserGroups}}},callbackChange:"function"==typeof n.callbackChange?n.callbackChange:null,excludedSearchValues:Array.isArray(n.excludedSearchValues)?n.excludedSearchValues:[],isCSV:!0,maxItems:~~n.maxItems||-1,restricted:!0})},getValues:function(t){return e.getValues(t)}};return t}),define("WoltLab/WCF/Controller/User/Notification/Settings",["Dictionary","Language","Dom/Traverse","Ui/SimpleDropdown"],function(e,t,n,i){"use strict";var r=new e,a=null,o=null,l={setup:function(){a=this._click.bind(this),o=this._selectType.bind(this);for(var e,t,n=elBySelAll("#notificationSettings .flexibleButtonGroup"),i=0,r=n.length;r>i;i++)e=n[i],t=elBySel(".notificationSettingsEmail",e),null!==t&&this._initGroup(e,t)},_initGroup:function(e,t){var i=~~e.getAttribute("data-object-id"),o=elById("settings_"+i+"_disabled");o.addEventListener("click",function(){t.classList.remove("active")});var l=elById("settings_"+i+"_enabled");l.addEventListener("click",function(){t.classList.add("active")});var s=n.childByTag(t,"INPUT"),c=n.childByTag(t,"A");elAttr(c,"data-object-id",i),c.addEventListener("click",a),r.set(i,{button:c,dropdownMenu:null,mailSetting:t,mailValue:s})},_click:function(e){e.preventDefault();var t=e.currentTarget,a=~~t.getAttribute("data-object-id"),o=r.get(a);if(null===o.dropdownMenu)o.dropdownMenu=this._createDropdown(a,o.mailValue.value),t.parentNode.classList.add("dropdown"),t.parentNode.appendChild(o.dropdownMenu),i.init(t,!0);else for(var l=n.childrenByTag(o.dropdownMenu,"LI"),s=o.mailValue.value,c=0;4>c;c++)l[c].classList[l[c].getAttribute("data-value")===s?"add":"remove"]("active")},_createDropdown:function(e,n){var i=elCreate("ul");i.className="dropdownMenu",elAttr(i,"data-object-id",e);for(var r,a,l,s=["instant","daily","divider","none"],c=0;4>c;c++)l=s[c],a=elCreate("li"),"divider"===l?a.className="dropdownDivider":(r=elCreate("a"),r.textContent=t.get("wcf.user.notification.mailNotificationType."+l),a.appendChild(r),elAttr(a,"data-value",l),a.addEventListener("click",o),n===l&&(a.className="active")),i.appendChild(a);return i},_selectType:function(e){var n=elAttr(e.currentTarget,"data-value"),i=~~e.currentTarget.parentNode.getAttribute("data-object-id"),a=r.get(i);a.mailValue.value=n,elBySel("span.title",a.mailSetting).textContent=t.get("wcf.user.notification.mailNotificationType."+n),a.button.classList["none"===n?"remove":"add"]("yellow"),a.button.classList["none"===n?"remove":"add"]("active")}};return l}),function(e){function t(){for(;i.length&&"function"==typeof i[0];)i.shift()()}var n=e.require,i=[],r=0;e.require=function(a,o){if(!Array.isArray(a))return n.apply(e,arguments);var l=r++;i.push(l),n(a,function(){var n=arguments;i[i.indexOf(l)]=function(){o.apply(e,n)},t()})}}(window),define("require.linearExecution",function(){});
\ No newline at end of file