Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Sun, 6 Jul 2014 15:11:07 +0000 (17:11 +0200)
committerwoltlab.com <woltlab@woltlab.com>
Sun, 6 Jul 2014 15:11:07 +0000 (17:11 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js

index 6bf464fbad8d2413a622d21c15e19abda188e009..4f08bcfe885522e67e98e24fd1bd5e8b3f7d027e 100644 (file)
@@ -1,15 +1,15 @@
 // wbbcode.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbbcode={init:function(){this.opts.initCallback=$.proxy(function(){if(this.$source.val().length){this.toggle();this.toggle()}},this);this.opts.pasteBeforeCallback=$.proxy(this._wPasteBeforeCallback,this);this.opts.pasteAfterCallback=$.proxy(this._wPasteAfterCallback,this);var b=this.syncClean;var a=this;this.syncClean=function(c){c=c.replace(/<p><br([^>]+)?><\/p>/g,"<p>@@@wcf_empty_line@@@</p>");return b.call(a,c)};if(this.getOption("wAutosaveOnce")){this._saveTextToStorage();delete this.opts.wAutosaveOnce}},_createSmileyDropdown:function(){var d=$('<div class="redactor_dropdown redactor_dropdown_box_wsmiley" style="display: none; width: 195px;" />');var c=$('<ul class="smileyList" />').appendTo(d);for(var a in __REDACTOR_SMILIES){var b=$('<li><img src="'+__REDACTOR_SMILIES[a]+'" class="smiley" /></li>').data("smileyCode",a);b.appendTo(c).click($.proxy(this._onSmileyPick,this))}$(this.$toolbar).append(d);return d},_onSmileyPick:function(b){var a=$(b.currentTarget).data("smileyCode");this.insertSmiley(a,__REDACTOR_SMILIES[a],false)},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.toggleCode(a);this._convertFromHtml();this.buttonGet("html").children("i").removeClass("fa-square-o").addClass("fa-square")}else{this._convertToHtml();this.toggleVisual();this.buttonGet("html").children("i").removeClass("fa-square").addClass("fa-square-o")}},_convertFromHtml:function(){var m=this.$source.val();m=m.replace(/\r?\n/g,"");var f=m.split(/(<\/?p>)/);var g="";var x="";for(var a=0;a<f.length;a++){var y=f[a];if(y=="<p>"){continue}else{if(y=="</p>"){x=$.trim(x);if(x!="@@@wcf_empty_line@@@"){x+="\n"}g+=x;x=""}else{if(a==0){g+=y}else{x+=y}}}}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(/<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 [^>]*?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(x.length){x[x.length-1]+=h}else{q+=h}}}}m=q;m=m.replace(/<div style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)<\/div>/gi,"[align=$1]$2[/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>/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+"@@"});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+"@@"})}var g=m.split("\n");for(var a=0,i=g.length;a<i;a++){g[a]=g[a].replace(/^\s*/,"")}m=g.join("\n");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();e=this.removeZeroWidthSpace(e);e=e.replace(/&/g,"&amp;");e=e.replace(/</g,"&lt;");e=e.replace(/>/g,"&gt;");var b={};for(var k=0,i=__REDACTOR_SOURCE_BBCODES.length;k<i;k++){var c=__REDACTOR_SOURCE_BBCODES[k];var d=new RegExp("\\["+c+"([\\S\\s]+?)\\[\\/"+c+"\\]","gi");e=e.replace(d,function(m){var n=m.hashCode();b[n]=m.replace(/\$/g,"$$$$");return"@@"+n+"@@"})}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(m,n){return"[table]"+$.trim(n)+"[/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(m,n){return"<td>"+$.trim(n)+"</td>"});for(var l in __REDACTOR_SMILIES){$smileyCode=l.replace(/</g,"&lt;").replace(/>/g,"&gt;");var g=new RegExp("(\\s|>|^)"+WCF.String.escapeRegExp($smileyCode)+"(?=\\s|<|$)","gi");e=e.replace(g,'$1<img src="'+__REDACTOR_SMILIES[l]+'" class="smiley" alt="'+$smileyCode+'" />')}e=e.replace(/(javascript):/gi,"$1<span></span>:");e=e.replace(/(\r|\r\n)/,"\n");var a=e.split("\n");e="";for(var k=0,i=a.length;k<i;k++){var j=$.trim(a[k]);if(j.indexOf("<")===0){e+=j}else{if(!j){j="<br>"}e+="<p>"+j+"</p>"}}if($.getLength(b)){for(var f in b){var h=new RegExp("@@"+f+"@@","g");e=e.replace(h,b[f])}}e=e.replace(/\[code\][\S\s]*?\[\/code\]/,"<pre>$&</pre>");this.$source.val(e)},_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@@@");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>");return a}};
+if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbbcode={init:function(){this.opts.initCallback=$.proxy(function(){if(this.$source.val().length){this.toggle();this.toggle()}},this);this.opts.pasteBeforeCallback=$.proxy(this._wPasteBeforeCallback,this);this.opts.pasteAfterCallback=$.proxy(this._wPasteAfterCallback,this);var d=this.syncClean;var b=this;this.syncClean=function(e){e=e.replace(/<p><br([^>]+)?><\/p>/g,"<p>@@@wcf_empty_line@@@</p>");return d.call(b,e)};if(this.getOption("wAutosaveOnce")){this._saveTextToStorage();delete this.opts.wAutosaveOnce}var a=this.buttonGet("table");if(a.length){var c=a.data("dropdown").children("a.redactor_dropdown_add_head");c.prev().remove();c.next().remove();c.remove();a.click($.proxy(this._tableButtonClick,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()}},_createSmileyDropdown:function(){var d=$('<div class="redactor_dropdown redactor_dropdown_box_wsmiley" style="display: none; width: 195px;" />');var c=$('<ul class="smileyList" />').appendTo(d);for(var a in __REDACTOR_SMILIES){var b=$('<li><img src="'+__REDACTOR_SMILIES[a]+'" class="smiley" /></li>').data("smileyCode",a);b.appendTo(c).click($.proxy(this._onSmileyPick,this))}$(this.$toolbar).append(d);return d},_onSmileyPick:function(b){var a=$(b.currentTarget).data("smileyCode");this.insertSmiley(a,__REDACTOR_SMILIES[a],false)},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.toggleCode(a);this._convertFromHtml();this.buttonGet("html").children("i").removeClass("fa-square-o").addClass("fa-square")}else{this._convertToHtml();this.toggleVisual();this.buttonGet("html").children("i").removeClass("fa-square").addClass("fa-square-o")}},_convertFromHtml:function(){var m=this.$source.val();m=m.replace(/\r?\n/g,"");var f=m.split(/(<\/?p>)/);var g="";var x="";for(var a=0;a<f.length;a++){var y=f[a];if(y=="<p>"){continue}else{if(y=="</p>"){x=$.trim(x);if(x!="@@@wcf_empty_line@@@"){x+="\n"}g+=x;x=""}else{if(a==0){g+=y}else{x+=y}}}}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(/<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 [^>]*?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(x.length){x[x.length-1]+=h}else{q+=h}}}}m=q;m=m.replace(/<div style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)<\/div>/gi,"[align=$1]$2[/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+"@@"});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+"@@"})}var g=m.split("\n");for(var a=0,i=g.length;a<i;a++){g[a]=g[a].replace(/^\s*/,"")}m=g.join("\n");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();e=this.removeZeroWidthSpace(e);e=e.replace(/&/g,"&amp;");e=e.replace(/</g,"&lt;");e=e.replace(/>/g,"&gt;");var b={};for(var k=0,i=__REDACTOR_SOURCE_BBCODES.length;k<i;k++){var c=__REDACTOR_SOURCE_BBCODES[k];var d=new RegExp("\\["+c+"([\\S\\s]+?)\\[\\/"+c+"\\]","gi");e=e.replace(d,function(m){var n=m.hashCode();b[n]=m.replace(/\$/g,"$$$$");return"@@"+n+"@@"})}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(m,n){return"[table]"+$.trim(n)+"[/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(m,o){var n=$.trim(o);if(!n.length){n="&#8203;"}return"<td>"+n+"</td>"});for(var l in __REDACTOR_SMILIES){$smileyCode=l.replace(/</g,"&lt;").replace(/>/g,"&gt;");var g=new RegExp("(\\s|>|^)"+WCF.String.escapeRegExp($smileyCode)+"(?=\\s|<|$)","gi");e=e.replace(g,'$1<img src="'+__REDACTOR_SMILIES[l]+'" class="smiley" alt="'+$smileyCode+'" />')}e=e.replace(/(javascript):/gi,"$1<span></span>:");e=e.replace(/(\r|\r\n)/,"\n");var a=e.split("\n");e="";for(var k=0,i=a.length;k<i;k++){var j=$.trim(a[k]);if(j.indexOf("<")===0){e+=j}else{if(!j){j="<br>"}e+="<p>"+j+"</p>"}}if($.getLength(b)){for(var f in b){var h=new RegExp("@@"+f+"@@","g");e=e.replace(h,b[f])}}e=e.replace(/\[code\][\S\s]*?\[\/code\]/,"<pre>$&</pre>");this.$source.val(e)},_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@@@");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>");return a}};
 // 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,f,b,e){var d=this._bbcodes[a];var c=this.getSelectionHtml();this.insertHtml("["+d+"]"+c+"[/"+d+"]");this.sync()}};
 // wfontcolor.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontcolor={init:function(){var a=this._createFontColorDropdown();this.buttonReplace("fontcolor","fontcolor",this.opts.curLang.fontcolor,$.proxy(function(f,c,b,d){this.dropdownShow(d,f)},this));this.buttonGet("fontcolor").data("dropdown",a)},_createFontColorDropdown:function(){var d=$('<div class="redactor_dropdown redactor_dropdown_box_fontcolor" style="display: none;">');var b=["#000000","#800000","#8B4513","#2F4F4F","#008080","#000080","#4B0082","#696969","#B22222","#A52A2A","#DAA520","#006400","#40E0D0","#0000CD","#800080","#808080","#FF0000","#FF8C00","#FFD700","#008000","#00FFFF","#0000FF","#EE82EE","#A9A9A9","#FFA07A","#FFA500","#FFFF00","#00FF00","#AFEEEE","#ADD8E6","#DDA0DD","#D3D3D3","#FFF0F5","#FAEBD7","#FFFFE0","#F0FFF0","#F0FFFF","#F0F8FF","#E6E6FA","#FFFFFF"];for(var g=0,e=b.length;g<e;g++){var f=b[g];var c=$('<a href="#" />').data("color",f).css("background-color",f);d.append(c);c.click($.proxy(this._onColorPick,this))}var a=$('<a href="#" />').html(this.opts.curLang.none).data("color","none");a.click($.proxy(this._onColorPick,this));d.append(a);$(this.$toolbar).append(d);return d},_onColorPick:function(a){a.preventDefault();var b=$(a.currentTarget).data("color");if(b==="none"){this.inlineRemoveStyle("color")}else{this.inlineSetStyle("color",b)}}};
+if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontcolor={init:function(){var a=this._createFontColorDropdown();this.buttonReplace("fontcolor","fontcolor",this.opts.curLang.fontcolor,$.proxy(function(f,c,b,d){this.dropdownShow(d,f)},this));this.buttonGet("fontcolor").data("dropdown",a)},_createFontColorDropdown:function(){var d=$('<div class="redactor_dropdown redactor_dropdown_box_fontcolor dropdownMenu" style="display: none;">');var b=["#000000","#800000","#8B4513","#2F4F4F","#008080","#000080","#4B0082","#696969","#B22222","#A52A2A","#DAA520","#006400","#40E0D0","#0000CD","#800080","#808080","#FF0000","#FF8C00","#FFD700","#008000","#00FFFF","#0000FF","#EE82EE","#A9A9A9","#FFA07A","#FFA500","#FFFF00","#00FF00","#AFEEEE","#ADD8E6","#DDA0DD","#D3D3D3","#FFF0F5","#FAEBD7","#FFFFE0","#F0FFF0","#F0FFFF","#F0F8FF","#E6E6FA","#FFFFFF"];var f=$('<li class="redactorColorPallet" />');for(var h=0,e=b.length;h<e;h++){var g=b[h];var c=$('<a href="#" />').data("color",g).css("background-color",g);f.append(c);c.click($.proxy(this._onColorPick,this))}var a=$('<a href="#" />').html(this.opts.curLang.none).data("color","none");a.click($.proxy(this._onColorPick,this));d.append(f);d.append($('<li class="dropdownDivider" />'));d.append(a);a.wrap("<li />");$(this.$toolbar).append(d);return d},_onColorPick:function(a){a.preventDefault();var b=$(a.currentTarget).data("color");if(b==="none"){this.inlineRemoveStyle("color")}else{this.inlineSetStyle("color",b)}}};
 // wfontfamily.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontfamily={init:function(){var b={Arial:"Arial, Helvetica, sans-serif","Comic Sans MS":"Comic Sans MS, cursive","Courier New":"Consolas, Courier New, Courier, monospace",Georgia:"Georgia, serif","Lucida Sans Unicode":"Lucida Sans Unicode, Lucida Grande, sans-serif",Tahoma:"Tahoma, Geneva, sans-serif","Times New Roman":"Times New Roman, Times, serif","Trebuchet MS":"Trebuchet MS, Helvetica, sans-serif",Verdana:"Verdana, Geneva, sans-serif"};var c={};var d=0;var a=this;$.each(b,function(f,e){c["fontFamily"+d]={title:f,className:"wfontfamily-"+d,callback:function(){a.inlineSetStyle("font-family",e)}};d++});c.separator={name:"separator"};c.remove={title:"remove font",callback:function(){this.inlineRemoveStyle("font-family")}};this.buttonReplace("fontfamily","wfontfamily","Change font family",false,c);this.buttonGet("wfontfamily").addClass("re-fontfamily");c=this.$toolbar.find(".redactor_dropdown_box_wfontfamily");d=0;$.each(b,function(f,e){c.children(".wfontfamily-"+d).removeClass("wfontfamily-"+d).css("font-family",e);d++})}};
+if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontfamily={init:function(){var a=this._createFontFamilyDropdown();this.buttonReplace("fontfamily","wfontfamily",this.opts.curLang.fontfamily,$.proxy(function(f,c,b,d){this.dropdownShow(d,f)},this));this.buttonGet("wfontfamily").addClass("re-fontfamily").data("dropdown",a)},_createFontFamilyDropdown:function(){var d=$('<div class="redactor_dropdown redactor_dropdown_box_wfontfamily dropdownMenu" style="display: none;">');var c={Arial:"Arial, Helvetica, sans-serif","Comic Sans MS":"Comic Sans MS, cursive","Courier New":"Consolas, Courier New, Courier, monospace",Georgia:"Georgia, serif","Lucida Sans Unicode":"Lucida Sans Unicode, Lucida Grande, sans-serif",Tahoma:"Tahoma, Geneva, sans-serif","Times New Roman":"Times New Roman, Times, serif","Trebuchet MS":"Trebuchet MS, Helvetica, sans-serif",Verdana:"Verdana, Geneva, sans-serif"};var a=this;$.each(c,function(h,e){var g=$('<li><a href="#">'+h+"</a></li>").appendTo(d);var f=g.children("a").data("fontFamily",e).css("font-family",e);f.click(function(){event.preventDefault();a.inlineSetStyle("font-family",$(this).data("fontFamily"))})});$('<li class="dropdownDivider" />').appendTo(d);var b=$('<li><a href="#">None</a></li>').appendTo(d);b.children("a").click(function(){event.preventDefault();a.inlineRemoveStyle("font-family")});$(this.$toolbar).append(d);return d}};
 // wfontsize.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontsize={init:function(){var d=[8,10,12,14,18,24,36];var e={};var a=this;for(var g=0,f=d.length;g<f;g++){var b=d[g];e["fontSize"+g]={title:b,className:"wfontsize-"+b,fontSize:b,callback:function(i,j,h,k){a.inlineSetStyle("font-size",h.fontSize+"pt")}}}e.separator={name:"separator"};e.remove={title:"remove font size",callback:function(){this.inlineRemoveStyle("font-size")}};this.buttonReplace("fontsize","wfontsize","Change font size",false,e);this.buttonGet("wfontsize").addClass("re-fontsize");e=this.$toolbar.find(".redactor_dropdown_box_wfontsize");for(var g=0,f=d.length;g<f;g++){var b=d[g];var c=e.children("a.wfontsize-"+b).removeClass("wfontsize-"+d).css("font-size",b+"pt");if(b>18){c.css("line-height","1em")}}}};
+if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontsize={init:function(){var a=this._createFontSizeDropdown();this.buttonReplace("fontsize","wfontsize",this.opts.curLang.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 c=this;var b=this.indentingStart;this.indentingStart=function(i){if(c.mpIndentingStart(i)){b.call(c,i)}};var a=this.buildEventKeydown;this.buildEventKeydown=function(i){if(c.callback("wkeydown",i)!==false){a.call(c,i)}};var h=this.toggleCode;this.toggleCode=function(j){var i=c.normalize(c.$editor.css("height"));h.call(c,j);c.$source.height(i)};var f=this.modalInit;this.modalInit=function(k,j,i,l){c.mpModalInit();f.call(c,k,j,i,l)};var g=this.modalShowOnDesktop;this.modalShowOnDesktop=function(){g.call(c);$(document.body).css("overflow",false)};var d=this.destroy;this.destroy=function(){c.callback("destroy",false,{});d.call(c)};var e=this.buttonActiveObserver;this.buttonActiveObserver=function(i,j){c.mpButtonActiveObserver(i,j);e.call(c,i,j)};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");this.setOption("modalOpenedCallback",$.proxy(this.modalOpenedCallback,this));this.modalTemplatesInit()},cleanRemoveSpaces:function(b,a){return b},mpButtonActiveObserver:function(b,c){var a=this.getParent();if(a!==false&&$(a).closest("ul",this.$editor.get()[0]).length!=0){this.$toolbar.find("a.re-indent, a.re-outdent").removeClass("redactor_button_disabled")}else{this.$toolbar.find("a.re-indent, a.re-outdent").addClass("redactor_button_disabled")}},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()},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_file_link" id="redactor_file_link" 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>");$.extend(this.opts,{modal_file:String()+'<section id="redactor-modal-file-insert"><div id="redactor-progress" class="redactor-progress-inline" style="display: none;"><span></span></div><form id="redactorUploadFileForm" method="post" action="" enctype="multipart/form-data"><label>'+this.opts.curLang.filename+'</label><input type="text" id="redactor_filename" class="redactor_input" /><div style="margin-top: 7px;"><input type="file" id="redactor_file" name="'+this.opts.fileUploadParam+'" /></div></form></section>',modal_video:String()+'<section id="redactor-modal-video-insert"><form id="redactorInsertVideoForm"><label>'+this.opts.curLang.video_html_code+'</label><textarea id="redactor_insert_video_area" style="width: 99%; height: 160px;"></textarea></form></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><button id="redactor_insert_video_btn" class="redactor_modal_btn redactor_modal_action_btn">'+this.opts.curLang.insert+"</button></footer>"})},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")},tableInsert:function(){this.bufferSet(false);var m=$("#redactor_table_rows").val(),b=$("#redactor_table_columns").val(),h=$("<div></div>"),a=Math.floor(Math.random()*99999),k=$('<table id="table'+a+'"><tbody></tbody></table>'),c,f,g,j;for(c=0;c<m;c++){f=$("<tr></tr>");for(g=0;g<b;g++){j=$("<td>"+this.opts.invisibleSpace+"</td>");if(c===0&&g===0){j.append('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>")}$(f).append(j)}k.append(f)}h.append(k);var d=h.html();if(this.opts.linebreaks===false&&this.browser("mozilla")){d+="<p>"+this.opts.invisibleSpace+"</p>"}this.modalClose();this.selectionRestore();var e=this.getBlock()||this.getCurrent();if(e&&e.tagName!="BODY"){if(e.tagName=="TD"){$(e).append(d)}else{if(e.tagName=="LI"){var e=$(e).closest("ul, ol")}$(e).after(d)}}else{this.insertHtmlAdvanced(d,false)}this.selectionRestore();var l=this.$editor.find("#table"+a);this.buttonActiveObserver();l.find("span#selection-marker-1, inline#selection-marker-1").remove();l.removeAttr("id");this.sync()},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"})},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))}};
+if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wmonkeypatch={init:function(){var c=this;var b=this.indentingStart;this.indentingStart=function(i){if(c.mpIndentingStart(i)){b.call(c,i)}};var a=this.buildEventKeydown;this.buildEventKeydown=function(i){if(c.callback("wkeydown",i)!==false){a.call(c,i)}};var h=this.toggleCode;this.toggleCode=function(j){var i=c.normalize(c.$editor.css("height"));h.call(c,j);c.$source.height(i)};var f=this.modalInit;this.modalInit=function(k,j,i,l){c.mpModalInit();f.call(c,k,j,i,l)};var g=this.modalShowOnDesktop;this.modalShowOnDesktop=function(){g.call(c);$(document.body).css("overflow",false)};var d=this.destroy;this.destroy=function(){c.callback("destroy",false,{});d.call(c)};var e=this.buttonActiveObserver;this.buttonActiveObserver=function(i,j){c.mpButtonActiveObserver(i,j);e.call(c,i,j)};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");this.setOption("modalOpenedCallback",$.proxy(this.modalOpenedCallback,this));this.setOption("dropdownShowCallback",$.proxy(this.dropdownShowCallback,this));this.modalTemplatesInit()},cleanRemoveSpaces:function(b,a){return b},mpButtonActiveObserver:function(b,c){var a=this.getParent();if(a!==false&&$(a).closest("ul",this.$editor.get()[0]).length!=0){this.$toolbar.find("a.re-indent, a.re-outdent").removeClass("redactor_button_disabled")}else{this.$toolbar.find("a.re-indent, a.re-outdent").addClass("redactor_button_disabled")}},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()},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_file_link" id="redactor_file_link" 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>");$.extend(this.opts,{modal_file:String()+'<section id="redactor-modal-file-insert"><div id="redactor-progress" class="redactor-progress-inline" style="display: none;"><span></span></div><form id="redactorUploadFileForm" method="post" action="" enctype="multipart/form-data"><label>'+this.opts.curLang.filename+'</label><input type="text" id="redactor_filename" class="redactor_input" /><div style="margin-top: 7px;"><input type="file" id="redactor_file" name="'+this.opts.fileUploadParam+'" /></div></form></section>',modal_video:String()+'<section id="redactor-modal-video-insert"><form id="redactorInsertVideoForm"><label>'+this.opts.curLang.video_html_code+'</label><textarea id="redactor_insert_video_area" style="width: 99%; height: 160px;"></textarea></form></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><button id="redactor_insert_video_btn" class="redactor_modal_btn redactor_modal_action_btn">'+this.opts.curLang.insert+"</button></footer>"})},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))}};
 // woptions.js
 if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.woptions={_messageOptions:{},_messageOptionContainer:{},_messageOptionNavigation:{},init:function(){var a=this.getOption("wMessageOptions");if(!a.length){return}var d=this.$source.wcfIdentify();this.$box.wrap('<div class="redactorContainer" />');this._messageOptionContainer[d]=$('<div id="redactorMessageOptions" class="redactorMessageOptions" />').insertAfter(this.$box);this._messageOptionNavigation[d]=$("<nav><ul /></nav>").appendTo(this._messageOptionContainer[d]).children("ul");this._messageOptions[d]={};for(var g=0;g<a.length;g++){var f=a[g];var c=$("<li><a>"+f.title+"</a></li>").appendTo(this._messageOptionNavigation[d]);c.data("containerID",f.containerID).click($.proxy(this._showMessageOptionContainer,this));var b=$('<div class="redactorMessageOptionContainer redactorMessageOptions_'+f.containerID+'" />').hide().appendTo(this._messageOptionContainer[d]);for(var e=0;e<f.items.length;e++){$(f.items[e]).appendTo(b)}this._messageOptions[d][f.containerID]={container:b,listItem:c}}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","updateMessageOptions",this._messageOptions);WCF.System.Event.addListener("com.woltlab.wcf.redactor","reset",$.proxy(this._wOptionsListener,this))},_showMessageOptionContainer:function(d,a){var c=(d===null)?a:$(d.currentTarget).data("containerID");var b=this.$source.wcfIdentify();if(this._messageOptions[b][c].listItem.hasClass("active")){this._messageOptions[b][c].listItem.removeClass("active");this._messageOptions[b][c].container.hide();return}$.each(this._messageOptions[b],function(e,f){if(e==c){f.listItem.addClass("active");f.container.show()}else{f.listItem.removeClass("active");f.container.hide()}})},_wOptionsListener:function(a){$.each(this._messageOptions,function(b,c){c.listItem.removeClass("active");c.container.hide();c.container.find("input, select, textarea").each(function(e,f){var d=$(f);switch(d.getTagName()){case"input":d.prop("checked",false);break;default:d.val("");break}})});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","updateMessageOptions",this._messageOptions)}};
 // wupload.js