Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Sun, 14 Sep 2014 00:46:50 +0000 (02:46 +0200)
committerwoltlab.com <woltlab@woltlab.com>
Sun, 14 Sep 2014 00:46:50 +0000 (02:46 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js

index faaa7c6190f2ddd0da94edbd80a942c8cb1e5fe7..606676e0dfb26bf214eae7e4e62514151c271634 100644 (file)
@@ -1,5 +1,5 @@
 // wbbcode.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbbcode={wBlockTest:/^(BLOCKQUOTE|DIV)$/,init:function(){var c=this.$source.wcfIdentify();this.opts.initCallback=$.proxy(function(){var f=$.trim(this.getOption("wOriginalValue"));if(f.length){this.toggle();this.$source.val(f);this.toggle()}delete this.opts.wOriginalValue},this);this.opts.pasteBeforeCallback=$.proxy(this._wPasteBeforeCallback,this);this.opts.pasteAfterCallback=$.proxy(this._wPasteAfterCallback,this);var e=this.syncClean;var b=this;this.syncClean=function(f){f=f.replace(/<p><br([^>]+)?><\/p>/g,"<p>@@@wcf_empty_line@@@</p>");return e.call(b,f)};if(this.getOption("wAutosaveOnce")){this._saveTextToStorage();delete this.opts.wAutosaveOnce}var a=this.buttonGet("table");if(a.length){var d=a.data("dropdown").children("a.redactor_dropdown_add_head");d.prev().remove();d.next().remove();d.remove();a.click($.proxy(this._tableButtonClick,this))}WCF.System.Event.addListener("com.woltlab.wcf.redactor","insertBBCode_quote_"+c,$.proxy(function(f){f.cancel=true;this._handleInsertQuote()},this));WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+c,$.proxy(this._wKeydownCallback,this))},_tableButtonClick:function(b){var c=$(b.currentTarget);if(!c.hasClass("dropact")){return}var a=this.getBlock()||this.getCurrent();var d=c.data("dropdown");d.children("li").show();var e=d.find("> li > .redactor_dropdown_insert_table").parent();if(a.tagName=="TD"){e.hide().next().hide()}else{e.nextAll().hide()}},insertSmiley:function(a,b,c){if(c){this.registerSmiley(a,b)}if(this.opts.visual){this.bufferSet();this.$editor.focus();this.insertHtml('&nbsp;<img src="'+b+'" class="smiley" alt="'+a+'" />&nbsp;');if(this.opts.air){this.$air.fadeOut(100)}this.sync()}else{this.insertAtCaret(" "+a+" ")}},registerSmiley:function(a,b){if(__REDACTOR_SMILIES[a]){return false}__REDACTOR_SMILIES[a]=b;return true},toggle:function(a){if(this.opts.visual){this.sync(undefined,true);this.toggleCode(a);this._convertFromHtml();this.buttonGet("html").children("i").removeClass("fa-square-o").addClass("fa-square")}else{this._convertToHtml();this.toggleVisual();this.fixQuoteContent();this._observeQuotes();this.buttonGet("html").children("i").removeClass("fa-square").addClass("fa-square-o")}},_convertFromHtml:function(){var m=this.$source.val();WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertFromHtml",{html:m});m=m.replace(/&trade;/gi,"\u2122");m=m.replace(/&copy;/gi,"\u00a9");m=m.replace(/&hellip;/gi,"\u2026");m=m.replace(/&mdash;/gi,"\u2014");m=m.replace(/&dash;/gi,"\u2010");m=m.replace(/\r?\n/g,"");var f=m.split(/(<\/?(?:div|p)>)/);var g="";var x="";for(var a=0;a<f.length;a++){var y=f[a];if(y=="<p>"||y=="<div>"){continue}else{if(y=="</p>"||y=="</div>"){x=$.trim(x);if(x!="@@@wcf_empty_line@@@"){x+="\n"}g+=x;x=""}else{if(a==0||a+1==f.length){g+=y}else{x+=y}}}}if(x){g+=x;x=""}m=g;m=m.replace(/@@@wcf_empty_line@@@/g,"\n");m=m.replace(/\n\n$/,"\n");m=m.replace(/<br>$/,"");m=m.replace(/<br>/g,"\n");m=m.replace(/<br>/g,"");m=m.replace(/&nbsp;/gi," ");m=m.replace(/<blockquote class="quoteBox" cite="([^"]+)?" data-author="([^"]+)?">\n?<div[^>]+>\n?<header>[\s\S]*?<\/header>/gi,function(z,B,A,C){var D;if(B){D="[quote='"+A+"','"+B+"']"}else{if(A){D="[quote='"+A+"']"}else{D="[quote]"}}return D});m=m.replace(/(?:\n*)<\/blockquote>/gi,"[/quote]\n");m=m.replace(/<a [^>]*?href=(["'])mailto:(.+?)\1.*?>([\s\S]+?)<\/a>/gi,"[email=$2]$3[/email]");m=m.replace(/<a [^>]*?href=(["'])(.+?)\1.*?>([\s\S]+?)<\/a>/gi,function(B,z,A,C){if(A==C){return"[url]"+A+"[/url]"}return"[url='"+A+"']"+C+"[/url]"});m=m.replace(/<(?:b|strong)>/gi,"[b]");m=m.replace(/<\/(?:b|strong)>/gi,"[/b]");m=m.replace(/<(?:i|em)>/gi,"[i]");m=m.replace(/<\/(?:i|em)>/gi,"[/i]");m=m.replace(/<u>/gi,"[u]");m=m.replace(/<\/u>/gi,"[/u]");m=m.replace(/<(?:s(trike)?|del)>/gi,"[s]");m=m.replace(/<\/(?:s(trike)?|del)>/gi,"[/s]");m=m.replace(/<sub>/gi,"[sub]");m=m.replace(/<\/sub>/gi,"[/sub]");m=m.replace(/<sup>/gi,"[sup]");m=m.replace(/<\/sup>/gi,"[/sup]");m=m.replace(/<img [^>]*?alt="([^"]+?)" class="smiley".*?> ?/gi,"$1 ");m=m.replace(/<img [^>]*?class="smiley" alt="([^"]+?)".*?> ?/gi,"$1 ");m=m.replace(/<img [^>]*?class="redactorEmbeddedAttachment" data-attachment-id="(\d+)".*?>/gi,"[attach=$1][/attach]");m=m.replace(/<img [^>]*?src=(["'])([^"']+?)\1 style="float: (left|right)[^"]*".*?>/gi,"[img='$2',$3][/img]");m=m.replace(/<img [^>]*?src=(["'])([^"']+?)\1.*?>/gi,"[img]$2[/img]");var d=m.split(/(<\/?span[^>]*>)/);var x=[];var p=[];var q="";for(var a=0;a<d.length;a++){var h=d[a];if(h=="</span>"){var c=p.pop();var g=c.start+x.pop()+c.end;if(x.length){x[x.length-1]+=g}else{q+=g}}else{if(h.match(/^<span style="([^"]+)">/)){var k=RegExp.$1;var v;var n;if(k.match(/^color: ?rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\);?$/i)){var u=RegExp.$1;var b=RegExp.$2;var e=RegExp.$3;var s=("0123456789ABCDEF".charAt((u-u%16)/16)+""+"0123456789ABCDEF".charAt(u%16))+""+("0123456789ABCDEF".charAt((b-b%16)/16)+""+"0123456789ABCDEF".charAt(b%16))+""+("0123456789ABCDEF".charAt((e-e%16)/16)+""+"0123456789ABCDEF".charAt(e%16));v="[color=#"+s+"]";n="[/color]"}else{if(k.match(/^color: ?(.*?);?$/i)){v="[color="+RegExp.$1+"]";n="[/color]"}else{if(k.match(/^font-size: ?(\d+)pt;?$/i)){v="[size="+RegExp.$1+"]";n="[/size]"}else{if(k.match(/^font-family: ?(.*?);?$/)){v="[font="+RegExp.$1.replace(/'/g,"")+"]";n="[/font]"}else{v='<span style="'+k+'">';n="</span>"}}}}x[x.length]="";p[x.length]={start:v,end:n}}else{if(h.match(/^<span class="inlineCode">/)){x[x.length]="";p[x.length]={start:"[tt]",end:"[/tt]"}}else{if(x.length){x[x.length-1]+=h}else{q+=h}}}}}m=q;m=m.replace(/<(div|p) style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)\n/gi,function(A,z,C,B){return"[align="+C+"]"+$.trim(B)+"[/align]"});m=m.replace(/<li>/gi,"[*]");m=m.replace(/<\/li>/gi,"");m=m.replace(/<ul>/gi,"[list]");m=m.replace(/<(ol|ul style="list-style-type: decimal")>/gi,"[list=1]");m=m.replace(/<ul style="list-style-type: (none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)">/gi,"[list=$1]");m=m.replace(/<\/(ul|ol)>/gi,"[/list]");m=m.replace(/<table[^>]*>/gi,"[table]\n");m=m.replace(/<\/table>/gi,"[/table]\n");m=m.replace(/<tbody>([\s\S]*?)<\/tbody>/,function(z,A){return $.trim(A)});m=m.replace(/<tr><\/tr>/gi,"");m=m.replace(/<tr>/gi,"[tr]\n");m=m.replace(/<\/tr>/gi,"[/tr]\n");m=m.replace(/<td style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)<\/td>/gi,"[td][align=$1]$2[/align][/td]");m=m.replace(/(\t)*<td>(\t)*/gi,"[td]");m=m.replace(/(\t)*<\/td>/gi,"[/td]\n");var w={};m.replace(/<span id="selection-marker-\d+" class="redactor-selection-marker"><\/span>/,function(z){var A=z.hashCode();w[A]=z.replace(/\$/g,"$$$$");return"@@"+A+"@@"});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","convertFromHtml",{html:m});m=m.replace(/<[^>]+>/g,"");if($.getLength(w)){for(var j in w){var t=new RegExp("@@"+j+"@@","g");data=data.replace(t,w[j])}}m=m.replace(/&lt;/g,"<");m=m.replace(/&gt;/g,">");m=m.replace(/&amp;/g,"&");m=m.replace(/%28/g,"(");m=m.replace(/%29/g,")");var r={};for(var a=0,i=__REDACTOR_SOURCE_BBCODES.length;a<i;a++){var o=__REDACTOR_SOURCE_BBCODES[a];var l=new RegExp("\\["+o+"([\\S\\s]+?)\\[\\/"+o+"\\]","gi");m=m.replace(l,function(z){var A=z.hashCode();r[A]=z.replace(/\$/g,"$$$$");return"@@"+A+"@@"})}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertFromHtml",{html:m});if($.getLength(r)){for(var j in r){var t=new RegExp("@@"+j+"@@","g");m=m.replace(t,r[j])}}this.$source.val(m)},_convertToHtml:function(){var e=this.$source.val();WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertToHtml",{data:e});e=this.removeZeroWidthSpace(e);e=e.replace(/&/g,"&amp;");e=e.replace(/</g,"&lt;");e=e.replace(/>/g,"&gt;");var b={};for(var n=0,k=__REDACTOR_SOURCE_BBCODES.length;n<k;n++){var c=__REDACTOR_SOURCE_BBCODES[n];var d=new RegExp("\\["+c+"([\\S\\s]+?)\\[\\/"+c+"\\]","gi");e=e.replace(d,function(p){var q=p.hashCode();b[q]=p.replace(/\$/g,"$$$$");return"@@"+q+"@@"})}e=e.replace(/\[url\]([^"]+?)\[\/url]/gi,'<a href="$1">$1</a>');e=e.replace(/\[url\='([^'"]+)'](.+?)\[\/url]/gi,'<a href="$1">$2</a>');e=e.replace(/\[url\=([^'"\]]+)](.+?)\[\/url]/gi,'<a href="$1">$2</a>');e=e.replace(/\[email\]([^"]+?)\[\/email]/gi,'<a href="mailto:$1">$1</a>');e=e.replace(/\[email\=([^"\]]+)](.+?)\[\/email]/gi,'<a href="mailto:$1">$2</a>');e=e.replace(/\[b\](.*?)\[\/b]/gi,"<b>$1</b>");e=e.replace(/\[i\](.*?)\[\/i]/gi,"<i>$1</i>");e=e.replace(/\[u\](.*?)\[\/u]/gi,"<u>$1</u>");e=e.replace(/\[s\](.*?)\[\/s]/gi,"<strike>$1</strike>");e=e.replace(/\[sub\](.*?)\[\/sub]/gi,"<sub>$1</sub>");e=e.replace(/\[sup\](.*?)\[\/sup]/gi,"<sup>$1</sup>");e=e.replace(/\[img\]([^"]+?)\[\/img\]/gi,'<img src="$1" />');e=e.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi,'<img src="$1" style="float: $2" />');e=e.replace(/\[img='?([^"]*?)'?\]\[\/img\]/gi,'<img src="$1" />');e=e.replace(/\[size=(\d+)\](.*?)\[\/size\]/gi,'<span style="font-size: $1pt">$2</span>');e=e.replace(/\[color=([#a-z0-9]*?)\](.*?)\[\/color\]/gi,'<span style="color: $1">$2</span>');e=e.replace(/\[font='?([a-z,\- ]*?)'?\](.*?)\[\/font\]/gi,'<span style="font-family: $1">$2</span>');e=e.replace(/\[align=(left|right|center|justify)\](.*?)\[\/align\]/gi,'<div style="text-align: $1">$2</div>');e=e.replace(/\[\*\](.*?)(?=\[\*\]|\[\/list\])/gi,"<li>$1</li>");e=e.replace(/\[list\]/gi,"<ul>");e=e.replace(/\[list=1\]/gi,'<ul style="list-style-type: decimal">');e=e.replace(/\[list=a\]/gi,'<ul style="list-style-type: lower-latin">');e=e.replace(/\[list=(none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)\]/gi,'<ul style="list-style-type: $1">');e=e.replace(/\[\/list]/gi,"</ul>");e=e.replace(/\[table\]([\S\s]*?)\[\/table\]/gi,function(p,q){return"[table]"+$.trim(q)+"[/table]"});e=e.replace(/\[table\]/gi,'<table border="1" cellspacing="1" cellpadding="1" style="width: 500px;">');e=e.replace(/\[\/table\]/gi,"</table>");e=e.replace(/\[tr\]/gi,"<tr>");e=e.replace(/\[\/tr\]/gi,"</tr>");e=e.replace(/\[td\]/gi,"<td>");e=e.replace(/\[\/td\]/gi,"</td>");e=e.replace(/<td>([\S\s]*?)<\/td>/gi,function(p,r){var q=$.trim(r);if(!q.length){q="&#8203;"}return"<td>"+q+"</td>"});var g=this.getOption("wAttachmentUrl");if(g){var l=this._getImageAttachmentIDs();e=e.replace(/\[attach=(\d+)\]\[\/attach\]/g,function(p,q){q=parseInt(q);if(WCF.inArray(q,l)){return'<img src="'+g.replace(/987654321/,q)+'" class="redactorEmbeddedAttachment" data-attachment-id="'+q+'" />'}return p})}for(var o in __REDACTOR_SMILIES){$smileyCode=o.replace(/</g,"&lt;").replace(/>/g,"&gt;");var i=new RegExp("(\\s|>|^)"+WCF.String.escapeRegExp($smileyCode)+"(?=\\s|<|$)","gi");e=e.replace(i,'$1<img src="'+__REDACTOR_SMILIES[o]+'" class="smiley" alt="'+$smileyCode+'" />')}e=e.replace(/(javascript):/gi,"$1<span></span>:");e=e.replace(/(\r|\r\n)/g,"\n");var h={};e=e.replace(/\[quote.*?\][\S\s]*?\[\/quote\]/gi,function(p){var q=p.hashCode();h[q]=p.replace(/\$/g,"$$$$");return"@@"+q+"@@"});e=e.replace(/(\[quote.*?\])/gi,"$1\n");e=e.replace(/(\[\/quote\])/gi,"\n$1");e=e.replace(/\n*$/,"");var a=e.split("\n");e="";for(var n=0,k=a.length;n<k;n++){var m=$.trim(a[n]);if(m.indexOf("<")===0){e+=m;if(!m.match(/>$/)||m.match(/<span[^>]+>.*?<\/span>$/)){e+="<br>"}}else{if(!m){m="<br>"}e+="<p>"+m+"</p>"}}if($.getLength(b)){for(var f in b){var j=new RegExp("@@"+f+"@@","g");e=e.replace(j,b[f])}e=e.replace(/\[tt\](.*?)\[\/tt\]/gi,'<span class="inlineCode">$1</span>')}e=e.replace(/\[code\][\S\s]*?\[\/code\]/,"<pre>$&</pre>");if($.getLength(h)){for(var f in h){var j=new RegExp("@@"+f+"@@","g");e=e.replace(j,this.transformQuote(h[f]))}}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:e});this.$source.val(e)},unquoteString:function(a){return a.replace(/^['"]/,"").replace(/['"]$/,"")},transformQuote:function(b){var a=this;b=b.replace(/\[quote([^\]]+)?\]/gi,function(e,d,g){var f="";var c="";if(d){d=d.substr(1);d=d.split(",");switch(d.length){case 1:f=d[0];break;case 2:f=d[0];c=d[1];break}f=WCF.String.escapeHTML(a.unquoteString($.trim(f)));c=WCF.String.escapeHTML(a.unquoteString($.trim(c)))}var h='<blockquote class="quoteBox" cite="'+c+'" data-author="'+f+'"><div class="container containerPadding"><header><h3>'+a._buildQuoteHeader(f,c)+'</h3><a class="redactorQuoteEdit"></a></header><div class="redactorQuoteContent">';return h});return b.replace(/\[\/quote\]/gi,"</blockquote>")},fixQuoteContent:function(){var c=this.$editor.find(".redactorQuoteContent").length;var a=this;while(c>0){var b=this.$editor.find(".redactorQuoteContent:eq(0)").removeClass("redactorQuoteContent");b.contents().each(function(e,g){if(g.nodeType===Element.ELEMENT_NODE){if(a.opts.rBlockTest.test(this.tagName)||a.wBlockTest.test(this.tagName)){$(g).wrap("<div />")}}else{if(g.nodeType===Element.TEXT_NODE){var d=$(g);var f=g.nodeValue.split(/\n/);for(var i=0;i<f.length;i++){var h=$.trim(f[i]);if(!h.length){h=a.opts.invisibleSpace}$("<div>"+h+"</div>").insertAfter(d)}d.remove()}}});c--}},_wPasteBeforeCallback:function(a){var b={1:24,2:22,3:18,4:14,5:12,6:10};a=a.replace(/<h([1-6])[^>]+>/g,function(c,d){return"[size="+b[d]+"]"});a=a.replace(/<\/h[1-6]>/g,"[/size]");a=a.replace(/<(article|header)[^>]+>/g,"<div>");a=a.replace(/<\/(article|header)>/g,"</div>");a=a.replace(/<(div|p)([^>]+)?><(div|p)([^>]+)?>/g,"<p>");a=a.replace(/<\/(div|p)><\/(div|p)>/g,"</p>@@@wcf_break@@@");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:a});return a},_wPasteAfterCallback:function(a){a=a.replace(/<p>([\s\S]*?)<\/p>/g,"<p>$1<br></p>");a=a.replace(/<header[^>]*>/g,"");a=a.replace(/<\/header>/g,"");a=a.replace(/<div>.*?<\/div>/g,"<p>$1</p>");a=a.replace(/<\/?div>/g,"");a=a.replace(/@@@wcf_break@@@/g,"<p><br></p>");a=a.replace(/<p><p>/g,"<p>");a=a.replace(/\[size=(\d+)\]/g,'<p><br></p><p><inline style="font-size: $1pt">');a=a.replace(/\[\/size\]/g,"</inline></p><p><br></p>");a=a.replace(/<img([^>]+)>/g,function(b,c){b=b.replace(/data-mozilla-paste-image="0"/,'data-mozilla-paste-image="0" style="display:none"');return b});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterPaste",{html:a});return a},insertAttachment:function(d){d=parseInt(d);var b=this.getOption("wAttachmentUrl");var c="[attach="+d+"][/attach]";var a=this._getImageAttachmentIDs();if(b&&WCF.inArray(d,a)){this.insertDynamic('<img src="'+b.replace(/987654321/,d)+'" class="redactorEmbeddedAttachment" data-attachment-id="'+d+'" />',c)}else{this.insertDynamic(c)}},_getImageAttachmentIDs:function(){var a=this.getOption("wAttachmentImageIDs")||[];if(a.length){delete this.opts.wAttachmentImageIDs;return a}var b={imageAttachmentIDs:[]};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$source.wcfIdentify(),b);return b.imageAttachmentIDs},_wKeydownCallback:function(d){if(d.event.which!==$.ui.keyCode.DOWN&&d.event.which!==$.ui.keyCode.UP){return}var b=$(this.getCurrent());var e=this.getParent();e=(e)?$(e):e;var g=(e)?e.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};switch(d.event.which){case $.ui.keyCode.DOWN:if(e){if(g.length){var f=b.closest("div",g[0]);if(!f.next().length){this.insertingAfterLastElement(g);d.cancel=true}}else{if(e.next("blockquote.quoteBox").length){this.selectionStart(e.next().find("> div > div:first"));d.cancel=true}}}else{if(b.next("blockquote.quoteBox").length){this.selectionStart(b.next().find("> div > div:first"));d.cancel=true}}break;case $.ui.keyCode.UP:if(!e||!g.length){return}var f=b.closest("div",g[0]);if(f.prev("div").length){return}var c=g.prev();if(c.length===0){var a=$(this.opts.emptyHtml);a.insertBefore(g);this.selectionStart(a)}else{if(c[0].tagName==="BLOCKQUOTE"){this.selectionEnd(c.find("> div > div:last"))}else{if($.trim(c.html())==""){c.html(this.opts.invisibleSpace)}this.selectionEnd(c)}}d.cancel=true;break}},_observeQuotes:function(){this.$editor.find(".redactorQuoteEdit:not(.jsRedactorQuoteEdit)").addClass("jsRedactorQuoteEdit").click($.proxy(this._observeQuotesClick,this))},_observeQuotesClick:function(d){var b=$(d.currentTarget).closest("header");var c=$('<span class="redactor-link-tooltip" />');$('<a href="#">'+WCF.Language.get("wcf.bbcode.quote.edit")+"</a>").click($.proxy(function(f){f.preventDefault();this._openQuoteEditOverlay($(d.currentTarget).closest("blockquote.quoteBox"),false);$(".redactor-link-tooltip").remove()},this)).appendTo(c);var a=b.offset();c.css({left:a.left+"px",top:(a.top+20)+"px"});$(".redactor-link-tooltip").remove();c.appendTo(document.body)},_openQuoteEditOverlay:function(a,b){if(b){this.modalInit(WCF.Language.get("wcf.bbcode.quote.insert"),this.opts.modal_quote,300,$.proxy(function(){$("#redactorEditQuote").click($.proxy(function(){var d=$("#redactorQuoteAuthor").val();var c=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.insertQuoteBBCode(d,c);this.modalClose()},this))},this))}else{this.modalInit(WCF.Language.get("wcf.bbcode.quote.edit"),this.opts.modal_quote,300,$.proxy(function(){if(!b){$("#redactorQuoteAuthor").val(a.data("author"));$("#redactorQuoteLink").val(a.attr("cite"))}$("#redactorEditQuote").click($.proxy(function(){var c=$("#redactorQuoteAuthor").val();a.data("author",c);a.attr("data-author",c);a.prop("cite",WCF.String.escapeHTML($("#redactorQuoteLink").val()));this._updateQuoteHeader(a);this.modalClose()},this))},this))}},_updateQuoteHeader:function(b){var c=b.data("author");var a=b.attr("cite");if(a){a=WCF.String.escapeHTML(a)}b.find("> div > header > h3").empty().append(this._buildQuoteHeader(c,a))},insertQuoteBBCode:function(d,f,c,b){if(this.inWysiwygMode()){var a='<blockquote class="quoteBox" cite="'+f+'" data-author="'+d+'" id="redactorInsertedQuote"><div class="container containerPadding"><header><h3>'+this._buildQuoteHeader(d,f)+'</h3><a class="redactorQuoteEdit"></a></header></div></blockquote>';this.insertHtml(a);var h=$("#redactorInsertedQuote");var g=$("<div>"+(c?c:this.opts.invisibleSpace)+"</div>").insertAfter(h.find("> div > header"));h.removeAttr("id");this.selectionStart(g[0]);this._observeQuotes();this.$toolbar.find("a.re-__wcf_quote").addClass("redactor_button_disabled")}else{var e="[quote]";if(d){if(f){e="[quote='"+d+"','"+f+"']"}else{e="[quote='"+d+"']"}}if(b){e+=b}e+="[/quote]";this.insertAtCaret(e)}},_buildQuoteHeader:function(b,c){var a="";if(!b&&c){b=c;c=""}if(b){if(c){a+='<a href="'+c+'">'}a+=WCF.Language.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:WCF.String.unescapeHTML(b)});if(c){a+="</a>"}}else{a="<small>"+WCF.Language.get("wcf.bbcode.quote.title.clickToSet")+"</small>"}return a},_handleInsertQuote:function(){this._openQuoteEditOverlay(null,true)}};
+if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbbcode={init:function(){var c=this.$source.wcfIdentify();this.opts.initCallback=$.proxy(function(){var f=$.trim(this.getOption("wOriginalValue"));if(f.length){this.toggle();this.$source.val(f);this.toggle()}delete this.opts.wOriginalValue},this);this.opts.pasteBeforeCallback=$.proxy(this._wPasteBeforeCallback,this);this.opts.pasteAfterCallback=$.proxy(this._wPasteAfterCallback,this);var e=this.syncClean;var b=this;this.syncClean=function(f){f=f.replace(/<p><br([^>]+)?><\/p>/g,"<p>@@@wcf_empty_line@@@</p>");return e.call(b,f)};if(this.getOption("wAutosaveOnce")){this._saveTextToStorage();delete this.opts.wAutosaveOnce}var a=this.buttonGet("table");if(a.length){var d=a.data("dropdown").children("a.redactor_dropdown_add_head");d.prev().remove();d.next().remove();d.remove();a.click($.proxy(this._tableButtonClick,this))}WCF.System.Event.addListener("com.woltlab.wcf.redactor","insertBBCode_quote_"+c,$.proxy(function(f){f.cancel=true;this._handleInsertQuote()},this));WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+c,$.proxy(this._wKeydownCallback,this))},_tableButtonClick:function(b){var c=$(b.currentTarget);if(!c.hasClass("dropact")){return}var a=this.getBlock()||this.getCurrent();var d=c.data("dropdown");d.children("li").show();var e=d.find("> li > .redactor_dropdown_insert_table").parent();if(a.tagName=="TD"){e.hide().next().hide()}else{e.nextAll().hide()}},insertSmiley:function(a,b,c){if(c){this.registerSmiley(a,b)}if(this.opts.visual){this.bufferSet();this.$editor.focus();this.insertHtml('&nbsp;<img src="'+b+'" class="smiley" alt="'+a+'" />&nbsp;');if(this.opts.air){this.$air.fadeOut(100)}this.sync()}else{this.insertAtCaret(" "+a+" ")}},registerSmiley:function(a,b){if(__REDACTOR_SMILIES[a]){return false}__REDACTOR_SMILIES[a]=b;return true},toggle:function(a){if(this.opts.visual){this.sync(undefined,true);this.toggleCode(a);this.$source.val(this.convertFromHtml(this.$source.val()));this.buttonGet("html").children("i").removeClass("fa-square-o").addClass("fa-square")}else{this.$source.val(this.convertToHtml(this.$source.val()));this.toggleVisual();this._observeQuotes();this.buttonGet("html").children("i").removeClass("fa-square").addClass("fa-square-o")}},convertFromHtml:function(m){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertFromHtml",{html:m});m=m.replace(/&trade;/gi,"\u2122");m=m.replace(/&copy;/gi,"\u00a9");m=m.replace(/&hellip;/gi,"\u2026");m=m.replace(/&mdash;/gi,"\u2014");m=m.replace(/&dash;/gi,"\u2010");m=m.replace(/\r?\n/g,"");var f=m.split(/(<\/?(?:div|p)>)/);var g="";var x="";for(var a=0;a<f.length;a++){var y=f[a];if(y=="<p>"||y=="<div>"){continue}else{if(y=="</p>"||y=="</div>"){x=$.trim(x);if(x!="@@@wcf_empty_line@@@"){x+="\n"}g+=x;x=""}else{if(a==0||a+1==f.length){g+=y}else{x+=y}}}}if(x){g+=x;x=""}m=g;m=m.replace(/@@@wcf_empty_line@@@/g,"\n");m=m.replace(/\n\n$/,"\n");m=m.replace(/<br>$/,"");m=m.replace(/<br>/g,"\n");m=m.replace(/<br>/g,"");m=m.replace(/&nbsp;/gi," ");m=m.replace(/<blockquote class="quoteBox" cite="([^"]+)?" data-author="([^"]+)?">\n?<div[^>]+>\n?<header>[\s\S]*?<\/header>/gi,function(z,B,A,C){var D;if(B){D="[quote='"+A+"','"+B+"']"}else{if(A){D="[quote='"+A+"']"}else{D="[quote]"}}return D});m=m.replace(/(?:\n*)<\/blockquote>/gi,"[/quote]\n");m=m.replace(/<a [^>]*?href=(["'])mailto:(.+?)\1.*?>([\s\S]+?)<\/a>/gi,"[email=$2]$3[/email]");m=m.replace(/<a [^>]*?href=(["'])(.+?)\1.*?>([\s\S]+?)<\/a>/gi,function(B,z,A,C){if(A==C){return"[url]"+A+"[/url]"}return"[url='"+A+"']"+C+"[/url]"});m=m.replace(/<(?:b|strong)>/gi,"[b]");m=m.replace(/<\/(?:b|strong)>/gi,"[/b]");m=m.replace(/<(?:i|em)>/gi,"[i]");m=m.replace(/<\/(?:i|em)>/gi,"[/i]");m=m.replace(/<u>/gi,"[u]");m=m.replace(/<\/u>/gi,"[/u]");m=m.replace(/<(?:s(trike)?|del)>/gi,"[s]");m=m.replace(/<\/(?:s(trike)?|del)>/gi,"[/s]");m=m.replace(/<sub>/gi,"[sub]");m=m.replace(/<\/sub>/gi,"[/sub]");m=m.replace(/<sup>/gi,"[sup]");m=m.replace(/<\/sup>/gi,"[/sup]");m=m.replace(/<img [^>]*?alt="([^"]+?)" class="smiley".*?> ?/gi,"$1 ");m=m.replace(/<img [^>]*?class="smiley" alt="([^"]+?)".*?> ?/gi,"$1 ");m=m.replace(/<img [^>]*?class="redactorEmbeddedAttachment" data-attachment-id="(\d+)".*?>/gi,"[attach=$1][/attach]");m=m.replace(/<img [^>]*?src=(["'])([^"']+?)\1 style="float: (left|right)[^"]*".*?>/gi,"[img='$2',$3][/img]");m=m.replace(/<img [^>]*?src=(["'])([^"']+?)\1.*?>/gi,"[img]$2[/img]");var d=m.split(/(<\/?span[^>]*>)/);var x=[];var p=[];var q="";for(var a=0;a<d.length;a++){var h=d[a];if(h=="</span>"){var c=p.pop();var g=c.start+x.pop()+c.end;if(x.length){x[x.length-1]+=g}else{q+=g}}else{if(h.match(/^<span style="([^"]+)">/)){var k=RegExp.$1;var v;var n;if(k.match(/^color: ?rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\);?$/i)){var u=RegExp.$1;var b=RegExp.$2;var e=RegExp.$3;var s=("0123456789ABCDEF".charAt((u-u%16)/16)+""+"0123456789ABCDEF".charAt(u%16))+""+("0123456789ABCDEF".charAt((b-b%16)/16)+""+"0123456789ABCDEF".charAt(b%16))+""+("0123456789ABCDEF".charAt((e-e%16)/16)+""+"0123456789ABCDEF".charAt(e%16));v="[color=#"+s+"]";n="[/color]"}else{if(k.match(/^color: ?(.*?);?$/i)){v="[color="+RegExp.$1+"]";n="[/color]"}else{if(k.match(/^font-size: ?(\d+)pt;?$/i)){v="[size="+RegExp.$1+"]";n="[/size]"}else{if(k.match(/^font-family: ?(.*?);?$/)){v="[font="+RegExp.$1.replace(/'/g,"")+"]";n="[/font]"}else{v='<span style="'+k+'">';n="</span>"}}}}x[x.length]="";p[x.length]={start:v,end:n}}else{if(h.match(/^<span class="inlineCode">/)){x[x.length]="";p[x.length]={start:"[tt]",end:"[/tt]"}}else{if(x.length){x[x.length-1]+=h}else{q+=h}}}}}m=q;m=m.replace(/<(div|p) style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)\n/gi,function(A,z,C,B){return"[align="+C+"]"+$.trim(B)+"[/align]"});m=m.replace(/<li>/gi,"[*]");m=m.replace(/<\/li>/gi,"");m=m.replace(/<ul>/gi,"[list]");m=m.replace(/<(ol|ul style="list-style-type: decimal")>/gi,"[list=1]");m=m.replace(/<ul style="list-style-type: (none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)">/gi,"[list=$1]");m=m.replace(/<\/(ul|ol)>/gi,"[/list]");m=m.replace(/<table[^>]*>/gi,"[table]\n");m=m.replace(/<\/table>/gi,"[/table]\n");m=m.replace(/<tbody>([\s\S]*?)<\/tbody>/,function(z,A){return $.trim(A)});m=m.replace(/<tr><\/tr>/gi,"");m=m.replace(/<tr>/gi,"[tr]\n");m=m.replace(/<\/tr>/gi,"[/tr]\n");m=m.replace(/<td style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)<\/td>/gi,"[td][align=$1]$2[/align][/td]");m=m.replace(/(\t)*<td>(\t)*/gi,"[td]");m=m.replace(/(\t)*<\/td>/gi,"[/td]\n");var w={};m.replace(/<span id="selection-marker-\d+" class="redactor-selection-marker"><\/span>/,function(z){var A=z.hashCode();w[A]=z.replace(/\$/g,"$$$$");return"@@"+A+"@@"});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","convertFromHtml",{html:m});m=m.replace(/<[^>]+>/g,"");if($.getLength(w)){for(var j in w){var t=new RegExp("@@"+j+"@@","g");data=data.replace(t,w[j])}}m=m.replace(/&lt;/g,"<");m=m.replace(/&gt;/g,">");m=m.replace(/&amp;/g,"&");m=m.replace(/%28/g,"(");m=m.replace(/%29/g,")");var r={};for(var a=0,i=__REDACTOR_SOURCE_BBCODES.length;a<i;a++){var o=__REDACTOR_SOURCE_BBCODES[a];var l=new RegExp("\\["+o+"([\\S\\s]+?)\\[\\/"+o+"\\]","gi");m=m.replace(l,function(z){var A=z.hashCode();r[A]=z.replace(/\$/g,"$$$$");return"@@"+A+"@@"})}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertFromHtml",{html:m});if($.getLength(r)){for(var j in r){var t=new RegExp("@@"+j+"@@","g");m=m.replace(t,r[j])}}m=$.trim(m);m+="\n";return m},convertToHtml:function(q){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertToHtml",{data:q});q=this.removeZeroWidthSpace(q);q=q.replace(/&/g,"&amp;");q=q.replace(/</g,"&lt;");q=q.replace(/>/g,"&gt;");var m={};for(var a=0,f=__REDACTOR_SOURCE_BBCODES.length;a<f;a++){var k=__REDACTOR_SOURCE_BBCODES[a];var h=new RegExp("\\["+k+"([\\S\\s]+?)\\[\\/"+k+"\\]","gi");q=q.replace(h,function(s){var t=s.hashCode();m[t]=s.replace(/\$/g,"$$$$");return"@@"+t+"@@"})}q=q.replace(/\[url\]([^"]+?)\[\/url]/gi,'<a href="$1">$1</a>');q=q.replace(/\[url\='([^'"]+)'](.+?)\[\/url]/gi,'<a href="$1">$2</a>');q=q.replace(/\[url\=([^'"\]]+)](.+?)\[\/url]/gi,'<a href="$1">$2</a>');q=q.replace(/\[email\]([^"]+?)\[\/email]/gi,'<a href="mailto:$1">$1</a>');q=q.replace(/\[email\=([^"\]]+)](.+?)\[\/email]/gi,'<a href="mailto:$1">$2</a>');q=q.replace(/\[b\](.*?)\[\/b]/gi,"<b>$1</b>");q=q.replace(/\[i\](.*?)\[\/i]/gi,"<i>$1</i>");q=q.replace(/\[u\](.*?)\[\/u]/gi,"<u>$1</u>");q=q.replace(/\[s\](.*?)\[\/s]/gi,"<strike>$1</strike>");q=q.replace(/\[sub\](.*?)\[\/sub]/gi,"<sub>$1</sub>");q=q.replace(/\[sup\](.*?)\[\/sup]/gi,"<sup>$1</sup>");q=q.replace(/\[img\]([^"]+?)\[\/img\]/gi,'<img src="$1" />');q=q.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi,'<img src="$1" style="float: $2" />');q=q.replace(/\[img='?([^"]*?)'?\]\[\/img\]/gi,'<img src="$1" />');q=q.replace(/\[size=(\d+)\](.*?)\[\/size\]/gi,'<span style="font-size: $1pt">$2</span>');q=q.replace(/\[color=([#a-z0-9]*?)\](.*?)\[\/color\]/gi,'<span style="color: $1">$2</span>');q=q.replace(/\[font='?([a-z,\- ]*?)'?\](.*?)\[\/font\]/gi,'<span style="font-family: $1">$2</span>');q=q.replace(/\[align=(left|right|center|justify)\](.*?)\[\/align\]/gi,'<div style="text-align: $1">$2</div>');q=q.replace(/\[\*\](.*?)(?=\[\*\]|\[\/list\])/gi,"<li>$1</li>");q=q.replace(/\[list\]/gi,"<ul>");q=q.replace(/\[list=1\]/gi,'<ul style="list-style-type: decimal">');q=q.replace(/\[list=a\]/gi,'<ul style="list-style-type: lower-latin">');q=q.replace(/\[list=(none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)\]/gi,'<ul style="list-style-type: $1">');q=q.replace(/\[\/list]/gi,"</ul>");q=q.replace(/\[table\]([\S\s]*?)\[\/table\]/gi,function(s,t){return"[table]"+$.trim(t)+"[/table]"});q=q.replace(/\[table\]/gi,'<table border="1" cellspacing="1" cellpadding="1" style="width: 500px;">');q=q.replace(/\[\/table\]/gi,"</table>");q=q.replace(/\[tr\]/gi,"<tr>");q=q.replace(/\[\/tr\]/gi,"</tr>");q=q.replace(/\[td\]/gi,"<td>");q=q.replace(/\[\/td\]/gi,"</td>");q=q.replace(/<td>([\S\s]*?)<\/td>/gi,function(s,u){var t=$.trim(u);if(!t.length){t="&#8203;"}return"<td>"+t+"</td>"});var b=this.getOption("wAttachmentUrl");if(b){var c=this._getImageAttachmentIDs();q=q.replace(/\[attach=(\d+)\]\[\/attach\]/g,function(s,t){t=parseInt(t);if(WCF.inArray(t,c)){return'<img src="'+b.replace(/987654321/,t)+'" class="redactorEmbeddedAttachment" data-attachment-id="'+t+'" />'}return s})}for(var n in __REDACTOR_SMILIES){$smileyCode=n.replace(/</g,"&lt;").replace(/>/g,"&gt;");var e=new RegExp("(\\s|>|^)"+WCF.String.escapeRegExp($smileyCode)+"(?=\\s|<|$)","gi");q=q.replace(e,'$1<img src="'+__REDACTOR_SMILIES[n]+'" class="smiley" alt="'+$smileyCode+'" />')}q=q.replace(/(javascript):/gi,"$1<span></span>:");q=q.replace(/(\r|\r\n)/g,"\n");var p={};q=q.replace(/\[quote.*?\][\S\s]*?\[\/quote\]/gi,function(s){var t=s.hashCode();p[t]=s.replace(/\$/g,"$$$$");return"@@"+t+"@@"});q=q.replace(/(\[quote.*?\])/gi,"$1\n");q=q.replace(/(\[\/quote\])/gi,"\n$1");q=q.replace(/\n*$/,"");var d=q.split("\n");q="";for(var a=0,f=d.length;a<f;a++){var l=$.trim(d[a]);if(l.indexOf("<")===0){q+=l;if(!l.match(/>$/)||l.match(/<span[^>]+>.*?<\/span>$/)){q+="<br>"}}else{if(!l){l="<br>"}q+="<p>"+l+"</p>"}}if($.getLength(m)){for(var g in m){var o=new RegExp("@@"+g+"@@","g");q=q.replace(o,m[g])}q=q.replace(/\[tt\](.*?)\[\/tt\]/gi,'<span class="inlineCode">$1</span>')}q=q.replace(/\[code\][\S\s]*?\[\/code\]/,"<pre>$&</pre>");if($.getLength(p)){var r=function(s){return s.replace(/^['"]/,"").replace(/['"]$/,"")};var j=this;var i=function(s){return s.replace(/\[quote([^\]]+)?\]([\S\s]*)\[\/quote\]?/gi,$.proxy(function(v,u,x){var B="";var w="";if(u){u=u.substr(1);u=u.split(",");switch(u.length){case 1:B=u[0];break;case 2:B=u[0];w=u[1];break}B=WCF.String.escapeHTML(r($.trim(B)));w=WCF.String.escapeHTML(r($.trim(w)))}var C='<blockquote class="quoteBox" cite="'+w+'" data-author="'+B+'"><div class="container containerPadding"><header><h3>'+j._buildQuoteHeader(B,w)+'</h3><a class="redactorQuoteEdit"></a></header>';x=$.trim(x);var t="";if(x.length){var A=x.split("\n");for(var z=0;z<A.length;z++){var y=A[z];if(y.length===0){y=j.opts.invisibleSpace}t+="<div>"+y+"</div>"}}else{t="<div>"+j.opts.invisibleSpace+"</div>"}C+=t;C+="</blockquote>";return C},this))};for(var g in p){var o=new RegExp("@@"+g+"@@","g");q=q.replace(o,i(p[g]))}}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:q});return q},_wPasteBeforeCallback:function(a){var b={1:24,2:22,3:18,4:14,5:12,6:10};a=a.replace(/<h([1-6])[^>]+>/g,function(c,d){return"[size="+b[d]+"]"});a=a.replace(/<\/h[1-6]>/g,"[/size]");a=a.replace(/<(article|header)[^>]+>/g,"<div>");a=a.replace(/<\/(article|header)>/g,"</div>");a=a.replace(/<(div|p)([^>]+)?><(div|p)([^>]+)?>/g,"<p>");a=a.replace(/<\/(div|p)><\/(div|p)>/g,"</p>@@@wcf_break@@@");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:a});return a},_wPasteAfterCallback:function(a){a=a.replace(/<p>([\s\S]*?)<\/p>/g,"<p>$1<br></p>");a=a.replace(/<header[^>]*>/g,"");a=a.replace(/<\/header>/g,"");a=a.replace(/<div>.*?<\/div>/g,"<p>$1</p>");a=a.replace(/<\/?div>/g,"");a=a.replace(/@@@wcf_break@@@/g,"<p><br></p>");a=a.replace(/<p><p>/g,"<p>");a=a.replace(/\[size=(\d+)\]/g,'<p><br></p><p><inline style="font-size: $1pt">');a=a.replace(/\[\/size\]/g,"</inline></p><p><br></p>");a=a.replace(/<img([^>]+)>/g,function(b,c){b=b.replace(/data-mozilla-paste-image="0"/,'data-mozilla-paste-image="0" style="display:none"');return b});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterPaste",{html:a});return a},insertAttachment:function(d){d=parseInt(d);var b=this.getOption("wAttachmentUrl");var c="[attach="+d+"][/attach]";var a=this._getImageAttachmentIDs();if(b&&WCF.inArray(d,a)){this.insertDynamic('<img src="'+b.replace(/987654321/,d)+'" class="redactorEmbeddedAttachment" data-attachment-id="'+d+'" />',c)}else{this.insertDynamic(c)}},_getImageAttachmentIDs:function(){var a=this.getOption("wAttachmentImageIDs")||[];if(a.length){delete this.opts.wAttachmentImageIDs;return a}var b={imageAttachmentIDs:[]};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$source.wcfIdentify(),b);return b.imageAttachmentIDs},_wKeydownCallback:function(d){if(d.event.which!==$.ui.keyCode.DOWN&&d.event.which!==$.ui.keyCode.UP){return}var b=$(this.getCurrent());var e=this.getParent();e=(e)?$(e):e;var g=(e)?e.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};switch(d.event.which){case $.ui.keyCode.DOWN:if(e){if(g.length){var f=b.closest("div",g[0]);if(!f.next().length){this.insertingAfterLastElement(g);d.cancel=true}}else{if(e.next("blockquote.quoteBox").length){this.selectionStart(e.next().find("> div > div:first"));d.cancel=true}}}else{if(b.next("blockquote.quoteBox").length){this.selectionStart(b.next().find("> div > div:first"));d.cancel=true}}break;case $.ui.keyCode.UP:if(!e||!g.length){return}var f=b.closest("div",g[0]);if(f.prev("div").length){return}var c=g.prev();if(c.length===0){var a=$(this.opts.emptyHtml);a.insertBefore(g);this.selectionStart(a)}else{if(c[0].tagName==="BLOCKQUOTE"){this.selectionEnd(c.find("> div > div:last"))}else{if($.trim(c.html())==""){c.html(this.opts.invisibleSpace)}this.selectionEnd(c)}}d.cancel=true;break}},_observeQuotes:function(){this.$editor.find(".redactorQuoteEdit:not(.jsRedactorQuoteEdit)").addClass("jsRedactorQuoteEdit").click($.proxy(this._observeQuotesClick,this))},_observeQuotesClick:function(d){var b=$(d.currentTarget).closest("header");var c=$('<span class="redactor-link-tooltip" />');$('<a href="#">'+WCF.Language.get("wcf.bbcode.quote.edit")+"</a>").click($.proxy(function(f){f.preventDefault();this._openQuoteEditOverlay($(d.currentTarget).closest("blockquote.quoteBox"),false);$(".redactor-link-tooltip").remove()},this)).appendTo(c);var a=b.offset();c.css({left:a.left+"px",top:(a.top+20)+"px"});$(".redactor-link-tooltip").remove();c.appendTo(document.body)},_openQuoteEditOverlay:function(a,b){if(b){this.modalInit(WCF.Language.get("wcf.bbcode.quote.insert"),this.opts.modal_quote,300,$.proxy(function(){$("#redactorEditQuote").click($.proxy(function(){var d=$("#redactorQuoteAuthor").val();var c=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.insertQuoteBBCode(d,c);this.modalClose()},this))},this))}else{this.modalInit(WCF.Language.get("wcf.bbcode.quote.edit"),this.opts.modal_quote,300,$.proxy(function(){if(!b){$("#redactorQuoteAuthor").val(a.data("author"));$("#redactorQuoteLink").val(a.attr("cite"))}$("#redactorEditQuote").click($.proxy(function(){var c=$("#redactorQuoteAuthor").val();a.data("author",c);a.attr("data-author",c);a.prop("cite",WCF.String.escapeHTML($("#redactorQuoteLink").val()));this._updateQuoteHeader(a);this.modalClose()},this))},this))}},_updateQuoteHeader:function(b){var c=b.data("author");var a=b.attr("cite");if(a){a=WCF.String.escapeHTML(a)}b.find("> div > header > h3").empty().append(this._buildQuoteHeader(c,a))},insertQuoteBBCode:function(c,e,b,a){var d="[quote]";if(c){if(e){d="[quote='"+c+"','"+e+"']"}else{d="[quote='"+c+"']"}}if(a){d+=a}d+="[/quote]";if(this.inWysiwygMode()){d=this.convertToHtml(d);this.insertHtml(d);this._observeQuotes();this.$toolbar.find("a.re-__wcf_quote").addClass("redactor_button_disabled")}else{this.insertAtCaret(d)}},_buildQuoteHeader:function(b,c){var a="";if(!b&&c){b=c;c=""}if(b){if(c){a+='<a href="'+c+'">'}a+=WCF.Language.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:WCF.String.unescapeHTML(b)});if(c){a+="</a>"}}else{a="<small>"+WCF.Language.get("wcf.bbcode.quote.title.clickToSet")+"</small>"}return a},_handleInsertQuote:function(){this._openQuoteEditOverlay(null,true)}};
 // wbutton.js
 if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbutton={_bbcodes:{},init:function(){this._bbcodes={};for(var g=0,d=__REDACTOR_BUTTONS.length;g<d;g++){this._addBBCodeButton(__REDACTOR_BUTTONS[g])}var a={html:"fa-square-o",bold:"fa-bold",italic:"fa-italic",underline:"fa-underline",deleted:"fa-strikethrough",subscript:"fa-subscript",superscript:"fa-superscript",orderedlist:"fa-list-ol",unorderedlist:"fa-list-ul",outdent:"fa-outdent",indent:"fa-indent",link:"fa-link",alignment:"fa-align-left",table:"fa-table"};var b=this.getOption("buttons");var f="";for(var g=0,d=b.length;g<d;g++){var c=b[g];if(c=="separator"){this.buttonGet(f).parent().addClass("separator");continue}var e=this.buttonGet(c);if(e.length){if(a[c]){this.buttonAwesome(c,a[c])}}else{this._addCoreButton(c,(a[c]?a[c]:null),f)}f=c}},_addCoreButton:function(b,a,c){var d=this.buttonBuild(b,{title:b,exec:b},false);$("<li />").append(d).insertAfter(this.buttonGet(c).parent());if(a!==null){this.buttonAwesome(b,a)}},_addBBCodeButton:function(b){var c="__wcf_"+b.name;var a=this.buttonAdd(c,b.label,this._insertBBCode);this._bbcodes[c]=b.name;if(b.icon.match(/^fa\-[a-z\-]+$/)){this.buttonAwesome(c,b.icon)}else{a.css("background-image","url("+__REDACTOR_ICON_PATH+b.icon+")")}},_insertBBCode:function(a,g,c,f){var e=this._bbcodes[a];var b={buttonName:a,buttonDOM:g,buttonObj:c,event:f,cancel:false};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","insertBBCode_"+e+"_"+this.$source.wcfIdentify(),b);if(b.cancel===false){var d=this.getSelectionHtml();if(e==="tt"){var h=(this.getParent())?$(this.getParent()):null;if(h&&h.closest("inline.inlineCode",this.$editor.get()[0]).length){this.inlineRemoveClass("inlineCode")}else{this.inlineSetClass("inlineCode")}}else{this.insertHtml("["+e+"]"+d+"[/"+e+"]")}}f.preventDefault();return false}};
 // wfontcolor.js
@@ -9,8 +9,8 @@ if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontfamily={init:fu
 // wfontsize.js
 if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontsize={init:function(){var a=this._createFontSizeDropdown();this.buttonReplace("fontsize","wfontsize",WCF.Language.get("wcf.bbcode.button.fontSize"),$.proxy(function(f,c,b,d){this.dropdownShow(d,f)},this));this.buttonGet("wfontsize").addClass("re-fontsize").data("dropdown",a)},_createFontSizeDropdown:function(){var f=$('<div class="redactor_dropdown redactor_dropdown_box_wfontsize dropdownMenu" style="display: none;">');var e=[8,10,12,14,18,24,36];var b=this;for(var g=0;g<e.length;g++){var c=e[g];var d=$('<li><a href="#">'+c+"</a></li>").appendTo(f);var a=d.children("a").data("fontSize",c).css("font-size",c+"pt");if(c>18){a.css("line-height","1em")}a.click(function(){event.preventDefault();b.inlineSetStyle("font-size",$(this).data("fontSize")+"pt")})}$('<li class="dropdownDivider" />').appendTo(f);var d=$('<li><a href="#">None</a></li>').appendTo(f);d.children("a").click(function(){event.preventDefault();b.inlineRemoveStyle("font-size")});$(this.$toolbar).append(f);return f}};
 // wmonkeypatch.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wmonkeypatch={init:function(){var m=this;var e=this.$source.wcfIdentify();var b=this.indentingStart;this.indentingStart=function(o){if(m.mpIndentingStart(o)){b.call(m,o)}};var n=this.buildEventKeydown;this.buildEventKeydown=function(p){var o={cancel:false,event:p};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keydown_"+e,o);if(o.cancel!==true){return n.call(m,p)}return false};var l=this.toggleCode;this.toggleCode=function(p){var o=m.normalize(m.$editor.css("height"));l.call(m,p);m.$source.height(o)};var i=this.modalInit;this.modalInit=function(q,p,o,r){m.mpModalInit();i.call(m,q,p,o,r)};var j=this.modalShowOnDesktop;this.modalShowOnDesktop=function(){j.call(m);$(document.body).css("overflow",false)};var g=this.destroy;this.destroy=function(){m.callback("destroy",false,{});g.call(m)};var f=this.sync;this.sync=function(p,o){if(o===true){f.call(m,p)}};var h=this.buttonActiveObserver;this.buttonActiveObserver=function(o,p){h.call(m,o,p);m.mpButtonActiveObserver(o,p)};if(this.opts.activeButtons){this.$editor.off("mouseup.redactor keyup.redactor").on("mouseup.redactor keyup.redactor",$.proxy(this.buttonActiveObserver,this))}this.$toolbar.find("a.re-indent, a.re-outdent").addClass("redactor_button_disabled");var d=this.imageResizeControls;this.imageResizeControls=function(o){if(!o.data("attachmentID")){d.call(m,o)}return false};var a=this.imageEdit;this.imageEdit=function(o){a.call(m,o);$("#redactor_image_source").val($(o).prop("src"))};var k=this.imageSave;this.imageSave=function(o){$(o).prop("src",$("#redactor_image_source").val());k.call(m,o)};var c=this.buildEventKeydownBackspace;this.buildEventKeydownBackspace=function(q,p,o){if(c.call(m,q,p,o)!==false){return m.mpBuildEventKeydownBackspace(q,p,o)}return false};this.setOption("modalOpenedCallback",$.proxy(this.modalOpenedCallback,this));this.setOption("dropdownShowCallback",$.proxy(this.dropdownShowCallback,this));this.modalTemplatesInit()},cleanRemoveSpaces:function(b,a){return b},mpButtonActiveObserver:function(d,g){var b=this.getParent();b=(b===false)?null:$(b);var a=this;var c=this.$editor.get()[0];var f=function(e,j,h,k,l){var i=a.$toolbar.find(j);if(b&&b.closest(e,c).length!=0){i[(h?"removeClass":"addClass")](k)}else{if(l&&!a.opts.visual){return}i[(h?"addClass":"removeClass")](k)}};f("ul","a.re-indent, a.re-outdent",true,"redactor_button_disabled");f("inline.inlineCode","a.re-__wcf_tt",false,"redactor_act");f("blockquote.quoteBox","a.re-__wcf_quote",false,"redactor_button_disabled",true);f("sub","a.re-subscript",false,"redactor_act");f("sup","a.re-superscript",false,"redactor_act")},inlineRemoveStyle:function(a){this.selectionSave();this.inlineEachNodes(function(b){$(b).css(a,"");this.removeEmptyAttr(b,"style")});this.$editor.find("inline").each(function(c,d){if(!d.attributes.length){var b=$(d);b.replaceWith(b.html())}});this.selectionRestore();this.sync()},inlineMethods:function(e,b,g){this.bufferSet();this.selectionSave();var c=this.getRange();var d=this.getElement();if((c.collapsed||c.startContainer===c.endContainer)&&d&&!this.nodeTestBlocks(d)){$(d)[e](b,g)}else{var f,a=g;switch(b){case"font-size":f="fontSize";a=4;break;case"font-family":f="fontName";break;case"color":f="foreColor";break;case"background-color":f="backColor";break}if(e==="addClass"){f="fontSize";a=4}this.document.execCommand(f,false,a);var h=this.$editor.find("font");$.each(h,$.proxy(function(j,k){this.inlineSetMethods(e,k,b,g)},this))}this.selectionRestore();this.sync()},mpIndentingStart:function(a){if(this.getBlock().tagName=="LI"){return true}return false},modalTemplatesInit:function(){this.setOption("modal_image",'<fieldset><dl><dt><label for="redactor_file_link">'+this.opts.curLang.image_web_link+'</label></dt><dd><input type="text" name="redactor_image_source" id="redactor_image_source" class="long"  /></dd></dl><dl><dt><label for="redactor_form_image_align">'+this.opts.curLang.image_position+'</label></dt><dd><select id="redactor_form_image_align"><option value="none">'+this.opts.curLang.none+'</option><option value="left">'+this.opts.curLang.left+'</option><option value="right">'+this.opts.curLang.right+'</option></select></dd></dl></fieldset><div class="formSubmit"><button id="redactor_upload_btn">'+this.opts.curLang.insert+"</button></div>");this.setOption("modal_image_edit",this.getOption("modal_image").replace('<button id="redactor_upload_btn">'+this.opts.curLang.insert+"</button>",'<button id="redactorSaveBtn">'+this.opts.curLang.save+"</button>"));this.setOption("modal_link",'<fieldset><dl><dt><label for="redactor_link_url">URL</label></dt><dd><input type="text" id="redactor_link_url" class="long" /></dd></dl><dl><dt><label for="redactor_link_url_text">'+this.opts.curLang.text+'</label></dt><dd><input type="text" id="redactor_link_url_text" class="long" /></dd></dl></fieldset><div class="formSubmit"><button id="redactor_insert_link_btn">'+this.opts.curLang.insert+"</button></div>");this.setOption("modal_table",'<fieldset><dl><dt><label for="redactor_table_rows">'+this.opts.curLang.rows+'</label></dt><dd><input type="number" size="5" value="2" min="0" id="redactor_table_rows" class="tiny" /></dd></dl><dl><dt><label for="redactor_table_columns">'+this.opts.curLang.columns+'</label></dt><dd><input type="number" size="5" value="3" min="0" id="redactor_table_columns" class="tiny" /></dd></dl></fieldset><div class="formSubmit"><button id="redactor_insert_table_btn">'+this.opts.curLang.insert+"</button></div>");this.setOption("modal_quote",'<fieldset><dl><dt><label for="redactorQuoteAuthor">'+WCF.Language.get("wcf.bbcode.quote.edit.author")+'</label></dt><dd><input type="text" id="redactorQuoteAuthor" class="long" /></dd></dl><dl><dt><label for="redactorQuoteLink">'+WCF.Language.get("wcf.bbcode.quote.edit.link")+'</label></dt><dd><input type="text" id="redactorQuoteLink" class="long" /></dd></dl></fieldset><div class="formSubmit"><button id="redactorEditQuote">'+this.opts.curLang.save+"</button></div>")},mpModalInit:function(){if(!$("#redactor_modal_overlay").length){this.$overlay=$('<div id="redactor_modal_overlay" class="dialogOverlay" />').css({height:"100%",zIndex:50000}).hide().appendTo(document.body)}if(!$("#redactor_modal").length){this.$modal=$('<div id="redactor_modal" class="dialogContainer" />').css({display:"none",zIndex:50001}).appendTo(document.body);$('<header class="dialogTitlebar"><span id="redactor_modal_header" class="dialogTitle" /><a id="redactor_modal_close" class="dialogCloseButton" /></header>').appendTo(this.$modal);$('<div class="dialogContent"><div id="redactor_modal_inner" /></div>').appendTo(this.$modal)}this.$modal.children(".dialogContent").removeClass("dialogForm")},modalOpenedCallback:function(){var a=0;if(this.$modal.find(".formSubmit").length){a=this.$modal.find(".formSubmit").outerHeight();this.$modal.children(".dialogContent").addClass("dialogForm").css({marginBottom:a+"px"})}else{this.$modal.children(".dialogContent").removeClass("dialogForm").css({marginBottom:"0px"})}var b=this.$modal.getDimensions("outer");this.$modal.css({marginLeft:-1*Math.round(b.width/2)+"px",marginTop:-1*Math.round(b.height/2)+"px"})},dropdownShowCallback:function(a){if(!a.dropdown.hasClass("dropdownMenu")){a.dropdown.addClass("dropdownMenu");a.dropdown.children(".redactor_separator_drop").replaceWith('<li class="dropdownDivider" />');a.dropdown.children("a").wrap("<li />")}},inlineEachNodes:function(e){var b=this.getRange(),c=this.getElement(),a=this.getNodes(),d;if(b.collapsed||b.startContainer===b.endContainer&&c){a=$(c);d=true}$.each(a,$.proxy(function(g,j){if(!d&&j.tagName!=="INLINE"){var f=this.getSelectionText();var k=$(j).parent().text();var h=this.removeZeroWidthSpace(f)==this.removeZeroWidthSpace(k);if(h&&j.parentNode.tagName==="INLINE"&&!$(j.parentNode).hasClass("redactor_editor")){j=j.parentNode}else{return}}e.call(this,j)},this))},imageCallbackLink:function(){var a=$.trim($("#redactor_image_source").val());if(a.length){var c="";var d=$("#redactor_form_image_align").val();switch(d){case"left":c=' style="float: left;"';break;case"right":c=' style="float: right;"';break}var b='<img id="image-marker" src="'+a+'"'+c+" />";this.imageInsert(b,true)}else{this.modalClose()}},observeLinks:function(){this.$editor.find("a:not(.redactorQuoteEdit)").on("click",$.proxy(this.linkObserver,this));this.$editor.on("click.redactor",$.proxy(function(a){this.linkObserverTooltipClose(a)},this));$(document).on("click.redactor",$.proxy(function(a){this.linkObserverTooltipClose(a)},this))},observeImages:function(){if(this.opts.observeImages===false){return false}this.$editor.find("img:not(.smiley)").each($.proxy(function(a,c){if(this.browser("msie")){$(c).attr("unselectable","on")}var b=$(c).parent();if(!b.hasClass("royalSlider")&&!b.hasClass("fotorama")){this.imageResize(c)}},this));this.$editor.find(".fotorama, .royalSlider").on("click",$.proxy(this.editGallery,this))},mpBuildEventKeydownBackspace:function(c,d,b){var a=$.trim((d.textContent)?d.textContent:d.innerText);if(a==""&&b.parentNode&&b.parentNode.tagName=="BLOCKQUOTE"){var e=b.parentNode.parentNode;$(b.parentNode).remove();this.selectionStart(e);return false}},cleanGetTabs:function(){return""},};
+if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wmonkeypatch={init:function(){var m=this;var e=this.$source.wcfIdentify();var b=this.indentingStart;this.indentingStart=function(o){if(m.mpIndentingStart(o)){b.call(m,o)}};var n=this.buildEventKeydown;this.buildEventKeydown=function(p){var o={cancel:false,event:p};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keydown_"+e,o);if(o.cancel!==true){return n.call(m,p)}return false};var l=this.toggleCode;this.toggleCode=function(p){var o=m.normalize(m.$editor.css("height"));l.call(m,p);m.$source.height(o)};var i=this.modalInit;this.modalInit=function(q,p,o,r){m.mpModalInit();i.call(m,q,p,o,r)};var j=this.modalShowOnDesktop;this.modalShowOnDesktop=function(){j.call(m);$(document.body).css("overflow",false)};var g=this.destroy;this.destroy=function(){m.callback("destroy",false,{});g.call(m)};var f=this.sync;this.sync=function(p,o){if(o===true){f.call(m,p)}};var h=this.buttonActiveObserver;this.buttonActiveObserver=function(o,p){h.call(m,o,p);m.mpButtonActiveObserver(o,p)};if(this.opts.activeButtons){this.$editor.off("mouseup.redactor keyup.redactor").on("mouseup.redactor keyup.redactor",$.proxy(this.buttonActiveObserver,this))}this.$toolbar.find("a.re-indent, a.re-outdent").addClass("redactor_button_disabled");var d=this.imageResizeControls;this.imageResizeControls=function(o){if(!o.data("attachmentID")){d.call(m,o)}return false};var a=this.imageEdit;this.imageEdit=function(o){a.call(m,o);$("#redactor_image_source").val($(o).prop("src"))};var k=this.imageSave;this.imageSave=function(o){$(o).prop("src",$("#redactor_image_source").val());k.call(m,o)};var c=this.buildEventKeydownBackspace;this.buildEventKeydownBackspace=function(q,p,o){if(c.call(m,q,p,o)!==false){return m.mpBuildEventKeydownBackspace(q,p,o)}return false};this.setOption("modalOpenedCallback",$.proxy(this.modalOpenedCallback,this));this.setOption("dropdownShowCallback",$.proxy(this.dropdownShowCallback,this));this.modalTemplatesInit()},cleanRemoveSpaces:function(b,a){return b},mpButtonActiveObserver:function(d,g){var b=this.getParent();b=(b===false)?null:$(b);var a=this;var c=this.$editor.get()[0];var f=function(e,j,h,k,l){var i=a.$toolbar.find(j);if(b&&b.closest(e,c).length!=0){i[(h?"removeClass":"addClass")](k)}else{if(l&&!a.opts.visual){return}i[(h?"addClass":"removeClass")](k)}};f("ul","a.re-indent, a.re-outdent",true,"redactor_button_disabled");f("inline.inlineCode","a.re-__wcf_tt",false,"redactor_act");f("blockquote.quoteBox","a.re-__wcf_quote",false,"redactor_button_disabled",true);f("sub","a.re-subscript",false,"redactor_act");f("sup","a.re-superscript",false,"redactor_act")},inlineRemoveStyle:function(a){this.selectionSave();this.inlineEachNodes(function(b){$(b).css(a,"");this.removeEmptyAttr(b,"style")});this.$editor.find("inline").each(function(c,d){if(!d.attributes.length){var b=$(d);b.replaceWith(b.html())}});this.selectionRestore();this.sync()},inlineMethods:function(e,b,g){this.bufferSet();this.selectionSave();var c=this.getRange();var d=this.getElement();if((c.collapsed||c.startContainer===c.endContainer)&&d&&!this.nodeTestBlocks(d)){$(d)[e](b,g)}else{var f,a=g;switch(b){case"font-size":f="fontSize";a=4;break;case"font-family":f="fontName";break;case"color":f="foreColor";break;case"background-color":f="backColor";break}if(e==="addClass"){f="fontSize";a=4}this.document.execCommand(f,false,a);var h=this.$editor.find("font");$.each(h,$.proxy(function(j,k){this.inlineSetMethods(e,k,b,g)},this))}this.selectionRestore();this.sync()},mpIndentingStart:function(a){if(this.getBlock().tagName=="LI"){return true}return false},modalTemplatesInit:function(){this.setOption("modal_image",'<fieldset><dl><dt><label for="redactor_file_link">'+this.opts.curLang.image_web_link+'</label></dt><dd><input type="text" name="redactor_image_source" id="redactor_image_source" class="long"  /></dd></dl><dl><dt><label for="redactor_form_image_align">'+this.opts.curLang.image_position+'</label></dt><dd><select id="redactor_form_image_align"><option value="none">'+this.opts.curLang.none+'</option><option value="left">'+this.opts.curLang.left+'</option><option value="right">'+this.opts.curLang.right+'</option></select></dd></dl></fieldset><div class="formSubmit"><button id="redactor_upload_btn">'+this.opts.curLang.insert+"</button></div>");this.setOption("modal_image_edit",this.getOption("modal_image").replace('<button id="redactor_upload_btn">'+this.opts.curLang.insert+"</button>",'<button id="redactorSaveBtn">'+this.opts.curLang.save+"</button>"));this.setOption("modal_link",'<fieldset><dl><dt><label for="redactor_link_url">URL</label></dt><dd><input type="text" id="redactor_link_url" class="long" /></dd></dl><dl><dt><label for="redactor_link_url_text">'+this.opts.curLang.text+'</label></dt><dd><input type="text" id="redactor_link_url_text" class="long" /></dd></dl></fieldset><div class="formSubmit"><button id="redactor_insert_link_btn">'+this.opts.curLang.insert+"</button></div>");this.setOption("modal_table",'<fieldset><dl><dt><label for="redactor_table_rows">'+this.opts.curLang.rows+'</label></dt><dd><input type="number" size="5" value="2" min="0" id="redactor_table_rows" class="tiny" /></dd></dl><dl><dt><label for="redactor_table_columns">'+this.opts.curLang.columns+'</label></dt><dd><input type="number" size="5" value="3" min="0" id="redactor_table_columns" class="tiny" /></dd></dl></fieldset><div class="formSubmit"><button id="redactor_insert_table_btn">'+this.opts.curLang.insert+"</button></div>");this.setOption("modal_quote",'<fieldset><dl><dt><label for="redactorQuoteAuthor">'+WCF.Language.get("wcf.bbcode.quote.edit.author")+'</label></dt><dd><input type="text" id="redactorQuoteAuthor" class="long" /></dd></dl><dl><dt><label for="redactorQuoteLink">'+WCF.Language.get("wcf.bbcode.quote.edit.link")+'</label></dt><dd><input type="text" id="redactorQuoteLink" class="long" /></dd></dl></fieldset><div class="formSubmit"><button id="redactorEditQuote">'+this.opts.curLang.save+"</button></div>")},mpModalInit:function(){if(!$("#redactor_modal_overlay").length){this.$overlay=$('<div id="redactor_modal_overlay" class="dialogOverlay" />').css({height:"100%",zIndex:50000}).hide().appendTo(document.body)}if(!$("#redactor_modal").length){this.$modal=$('<div id="redactor_modal" class="dialogContainer" />').css({display:"none",zIndex:50001}).appendTo(document.body);$('<header class="dialogTitlebar"><span id="redactor_modal_header" class="dialogTitle" /><a id="redactor_modal_close" class="dialogCloseButton" /></header>').appendTo(this.$modal);$('<div class="dialogContent"><div id="redactor_modal_inner" /></div>').appendTo(this.$modal)}this.$modal.children(".dialogContent").removeClass("dialogForm")},modalOpenedCallback:function(){var a=0;if(this.$modal.find(".formSubmit").length){a=this.$modal.find(".formSubmit").outerHeight();this.$modal.children(".dialogContent").addClass("dialogForm").css({marginBottom:a+"px"})}else{this.$modal.children(".dialogContent").removeClass("dialogForm").css({marginBottom:"0px"})}var b=this.$modal.getDimensions("outer");this.$modal.css({marginLeft:-1*Math.round(b.width/2)+"px",marginTop:-1*Math.round(b.height/2)+"px"})},dropdownShowCallback:function(a){if(!a.dropdown.hasClass("dropdownMenu")){a.dropdown.addClass("dropdownMenu");a.dropdown.children(".redactor_separator_drop").replaceWith('<li class="dropdownDivider" />');a.dropdown.children("a").wrap("<li />")}},inlineEachNodes:function(e){var b=this.getRange(),c=this.getElement(),a=this.getNodes(),d;if(b.collapsed||b.startContainer===b.endContainer&&c){a=$(c);d=true}$.each(a,$.proxy(function(g,j){if(!d&&j.tagName!=="INLINE"){var f=this.getSelectionText();var k=$(j).parent().text();var h=this.removeZeroWidthSpace(f)==this.removeZeroWidthSpace(k);if(h&&j.parentNode.tagName==="INLINE"&&!$(j.parentNode).hasClass("redactor_editor")){j=j.parentNode}else{return}}e.call(this,j)},this))},imageCallbackLink:function(){var a=$.trim($("#redactor_image_source").val());if(a.length){var c="";var d=$("#redactor_form_image_align").val();switch(d){case"left":c=' style="float: left;"';break;case"right":c=' style="float: right;"';break}var b='<img id="image-marker" src="'+a+'"'+c+" />";this.imageInsert(b,true)}else{this.modalClose()}},observeLinks:function(){this.$editor.find("a:not(.redactorQuoteEdit)").on("click",$.proxy(this.linkObserver,this));this.$editor.on("click.redactor",$.proxy(function(a){this.linkObserverTooltipClose(a)},this));$(document).on("click.redactor",$.proxy(function(a){this.linkObserverTooltipClose(a)},this))},observeImages:function(){if(this.opts.observeImages===false){return false}this.$editor.find("img:not(.smiley)").each($.proxy(function(a,c){if(this.browser("msie")){$(c).attr("unselectable","on")}var b=$(c).parent();if(!b.hasClass("royalSlider")&&!b.hasClass("fotorama")){this.imageResize(c)}},this));this.$editor.find(".fotorama, .royalSlider").on("click",$.proxy(this.editGallery,this))},mpBuildEventKeydownBackspace:function(c,d,b){var a=$.trim((d.textContent)?d.textContent:d.innerText);if(a==""&&b.parentNode&&b.parentNode.tagName=="BLOCKQUOTE"){var e=b.parentNode.parentNode;$(b.parentNode).remove();this.selectionStart(e);return false}},cleanGetTabs:function(){return""},cleanRemoveEmptyTags:function(a){return a}};
 // wupload.js
 if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wupload={_boundGlobalUploadEvents:false,_wUploadDropArea:{},_timer:null,_isDragging:false,_isFile:false,init:function(){var a=".redactor_"+this.$source.wcfIdentify();$(document).on("dragover"+a,$.proxy(this._dragOver,this));$(document).on("dragleave"+a,$.proxy(this._dragLeave,this));$(document).on("drop"+a,$.proxy(function(b){b.preventDefault();this._revertDropArea(undefined,this.$source.wcfIdentify())},this));if(!this._boundGlobalUploadEvents){this._boundGlobalUploadEvents=true;$(document).on("dragend",function(b){b.preventDefault()})}WCF.System.Event.addListener("com.woltlab.wcf.attachment","autoInsert_"+this.$source.wcfIdentify(),$.proxy(this.insertPastedImageAttachment,this))},_dragOver:function(c){c=c.originalEvent;if(!c.dataTransfer||!c.dataTransfer.types){return}if(c.dataTransfer.types[0]!=="Files"&&c.dataTransfer.types[0]!=="application/x-moz-file"){this._isFile=false;return}this._isFile=true;c.preventDefault();if(!this._isDragging){var b=this.$source.wcfIdentify();if(this._wUploadDropArea[b]===undefined){this._wUploadDropArea[b]=$('<div class="redactorDropArea">'+WCF.Language.get("wcf.attachment.dragAndDrop.dropHere")+"</div>").hide().appendTo(document.body);this._wUploadDropArea[b].on("dragover",$.proxy(this._hoverDropArea,this)).on("dragleave",$.proxy(this._revertDropArea,this)).on("drop",$.proxy(this._drop,this))}var a=(this.inWysiwygMode())?this.$editor.getDimensions("outer"):this.$source.getDimensions("outer");var d=(this.inWysiwygMode())?this.$editor.getOffsets("offset"):this.$source.getOffsets("offset");this._wUploadDropArea[b].css({height:a.height+"px",left:d.left+"px",lineHeight:a.height+"px",top:d.top+"px",width:a.width+"px"}).show();this._isDragging=true}c.preventDefault()},_hoverDropArea:function(a){this._wUploadDropArea[this.$source.wcfIdentify()].addClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropNow"))},_revertDropArea:function(c,a){if(!this._isFile){return}var b=a||this.$source.wcfIdentify();this._wUploadDropArea[b].removeClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropHere"));if(a){this._wUploadDropArea[b].hide()}},_dragLeave:function(){if(!this._isDragging||!this._isFile){return}if(this._timer===null){var a=this;this._timer=new WCF.PeriodicalExecuter(function(b){b.stop();if(!a._isDragging){a._wUploadDropArea[a.$source.wcfIdentify()].hide()}},100)}else{this._timer.resume()}this._isDragging=false},_drop:function(b){if(!this._isFile){return}b=b.originalEvent||b;if(b.dataTransfer&&b.dataTransfer.files.length==1){b.preventDefault();var a=this.$source.wcfIdentify();this._revertDropArea(undefined,a);WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","upload_"+a,{file:b.dataTransfer.files[0]})}},pasteClipboardUploadMozilla:function(){this.$editor.find("img[data-mozilla-paste-image]").each($.proxy(function(d,g){var f=$(g);var a=f.prop("src").split(",");var e=a[0].split(";")[0].split(":")[1];var c=a[1];var b={blob:WCF.base64toBlob(c,e),uploadID:null};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","upload_"+this.$source.wcfIdentify(),b);f.replaceWith('<span class="redactor-pastedImageFromClipboard-'+b.uploadID+'" />')},this))},insertPastedImageAttachment:function(b){var a=this.$editor.find("span.redactor-pastedImageFromClipboard-"+b.uploadID);a.before(b.attachment);a.remove()}};
 // wutil.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wutil={_autosaveWorker:null,init:function(){this.$source.parents("form").submit($.proxy(this.submit,this));if(this.getOption("wautosave").active){this.autosaveEnable();if(this.getOption("wautosave").saveOnInit||this.$source.data("saveOnInit")){this.setOption("wAutosaveOnce",true)}else{this.autosaveRestore()}}this.setOption("autosave",false);var b=this.destroy;var a=this;this.destroy=function(){a.autosaveDisable();b.call(a)}},insertAtCaret:function(b){if(this.opts.visual){console.debug("insertAtCaret() failed: Editor is in WYSIWYG-mode.");return false}this.$source.focus();var c=this.$source.getCaret();if(c==-1){console.debug("insertAtCaret() failed: Source is not input[type=text], input[type=password] or textarea.")}var a=this.$source.val();a=a.substr(0,c)+b+a.substr(c);this.$source.val(a);return true},insertDynamic:function(a,b){if(this.inWysiwygMode()){this.insertHtml(a)}else{if(b===undefined||b===null){b=a}this.insertAtCaret(b)}},setOption:function(a,b){this.opts[a]=b},getOption:function(a){if(this.opts[a]){return this.opts[a]}return null},inPlainMode:function(){return !this.opts.visual},inWysiwygMode:function(){return(this.opts.visual)},replaceRangesWith:function(a){getSelection().removeAllRanges();getSelection().addRange(a)},getText:function(){if(this.inWysiwygMode()){this.wSync()}return this.$source.val()},submit:function(){if(this.inWysiwygMode()){this.wSync()}this.autosavePurge()},reset:function(){if(this.inWysiwygMode()){this.$editor.html("<p>"+this.opts.invisibleSpace+"</p>");this.sync()}else{this.$source.val("")}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","reset",{wysiwygContainerID:this.$source.wcfIdentify()})},autosaveEnable:function(a){if(!this.getOption("wautosave").active){this.setOption("wautosave",{active:true,key:a})}if(this._autosaveWorker===null){this._autosaveWorker=new WCF.PeriodicalExecuter($.proxy(this._saveTextToStorage,this),60*1000)}return true},_saveTextToStorage:function(){localStorage.setItem(this.getOption("wautosave").key,this.getText())},autosaveDisable:function(){if(!this.getOption("wautosave").active){return false}this._autosaveWorker.stop();this._autosaveWorker=null;this.setOption("wautosave",{active:false,key:""});return true},autosavePurge:function(){localStorage.removeItem(this.getOption("wautosave").key)},autosaveRestore:function(){var a=this.getOption("wautosave");var b=localStorage.getItem(a.key);if(b!==null){if(this.inWysiwygMode()){this.setOption("wOriginalValue",b)}else{this.$source.val(b)}return true}return false},buttonReplace:function(d,b,e,g,f){var a=this.buttonGet(d);var c=this.buttonAddAfter(d,b,e,g,f);if(a.parent().hasClass("separator")){c.parent().addClass("separator")}a.parent().remove();return c},removeZeroWidthSpace:function(a){var b="";for(var e=0,d=a.length;e<d;e++){var c=a.charCodeAt(e).toString(16);if(c!="200b"){b+=a[e]}}return b},wSync:function(){this.sync(undefined,true);this.$source.val(this.cleanHtml(this.$source.val()));this._convertFromHtml()},getSource:function(){return this.$source},getName:function(){return this.$source.wcfIdentify()},selectionEndOfEditor:function(){this.selectionEnd(this.$editor.children(":last")[0])},replaceText:function(b){var a=false;if(this.inWysiwygMode()){this.toggle();a=true}this.$source.val(b);if(a){this.toggle()}}};
+if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wutil={_autosaveWorker:null,init:function(){this.$source.parents("form").submit($.proxy(this.submit,this));if(this.getOption("wautosave").active){this.autosaveEnable();if(this.getOption("wautosave").saveOnInit||this.$source.data("saveOnInit")){this.setOption("wAutosaveOnce",true)}else{this.autosaveRestore()}}this.setOption("autosave",false);var b=this.destroy;var a=this;this.destroy=function(){a.autosaveDisable();b.call(a)}},insertAtCaret:function(b){if(this.opts.visual){console.debug("insertAtCaret() failed: Editor is in WYSIWYG-mode.");return false}this.$source.focus();var c=this.$source.getCaret();if(c==-1){console.debug("insertAtCaret() failed: Source is not input[type=text], input[type=password] or textarea.")}var a=this.$source.val();a=a.substr(0,c)+b+a.substr(c);this.$source.val(a);return true},insertDynamic:function(a,b){if(this.inWysiwygMode()){this.insertHtml(a)}else{if(b===undefined||b===null){b=a}this.insertAtCaret(b)}},setOption:function(a,b){this.opts[a]=b},getOption:function(a){if(this.opts[a]){return this.opts[a]}return null},inPlainMode:function(){return !this.opts.visual},inWysiwygMode:function(){return(this.opts.visual)},replaceRangesWith:function(a){getSelection().removeAllRanges();getSelection().addRange(a)},getText:function(){if(this.inWysiwygMode()){this.wSync()}return this.$source.val()},submit:function(){if(this.inWysiwygMode()){this.wSync()}this.autosavePurge()},reset:function(){if(this.inWysiwygMode()){this.$editor.html("<p>"+this.opts.invisibleSpace+"</p>");this.sync()}else{this.$source.val("")}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","reset",{wysiwygContainerID:this.$source.wcfIdentify()})},autosaveEnable:function(a){if(!this.getOption("wautosave").active){this.setOption("wautosave",{active:true,key:a})}if(this._autosaveWorker===null){this._autosaveWorker=new WCF.PeriodicalExecuter($.proxy(this._saveTextToStorage,this),60*1000)}return true},_saveTextToStorage:function(){localStorage.setItem(this.getOption("wautosave").key,this.getText())},autosaveDisable:function(){if(!this.getOption("wautosave").active){return false}this._autosaveWorker.stop();this._autosaveWorker=null;this.setOption("wautosave",{active:false,key:""});return true},autosavePurge:function(){localStorage.removeItem(this.getOption("wautosave").key)},autosaveRestore:function(){var a=this.getOption("wautosave");var b=localStorage.getItem(a.key);if(b!==null){if(this.inWysiwygMode()){this.setOption("wOriginalValue",b)}else{this.$source.val(b)}return true}return false},buttonReplace:function(d,b,e,g,f){var a=this.buttonGet(d);var c=this.buttonAddAfter(d,b,e,g,f);if(a.parent().hasClass("separator")){c.parent().addClass("separator")}a.parent().remove();return c},removeZeroWidthSpace:function(a){var b="";for(var e=0,d=a.length;e<d;e++){var c=a.charCodeAt(e).toString(16);if(c!="200b"){b+=a[e]}}return b},wSync:function(){this.sync(undefined,true);this.$source.val(this.convertFromHtml(this.cleanHtml(this.$source.val())))},getSource:function(){return this.$source},getName:function(){return this.$source.wcfIdentify()},selectionEndOfEditor:function(){this.selectionEnd(this.$editor.children(":last")[0])},replaceText:function(b){var a=false;if(this.inWysiwygMode()){this.toggle();a=true}this.$source.val(b);if(a){this.toggle()}}};