Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Mon, 7 Sep 2020 10:57:50 +0000 (10:57 +0000)
committerwoltlab.com <woltlab@woltlab.com>
Mon, 7 Sep 2020 10:57:50 +0000 (10:57 +0000)
wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js
wcfsetup/install/files/js/WCF.Combined.min.js
wcfsetup/install/files/js/WCF.Combined.tiny.min.js

index e402b299006699953ce8b39843f4e7c3711e43a2..7d0c47a9ac946750216b98bb97f4e15691e5d86f 100644 (file)
 // redactor.combined.min.js -- DO NOT EDIT
 
 // redactor.js
-(function (window, undefined) { redactor.js; })(this);
+(function (window, undefined) { !function(g){"use strict";Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;return function(){return e.apply(t)}});var i=0,h=null;function l(t,e){return new l.prototype.init(t,e)}"function"==typeof window.require&&require(["Environment"],function(t){h=t}),g.fn.redactor=function(r){var n=[],s=Array.prototype.slice.call(arguments,1);return"string"==typeof r?this.each(function(){var t,e,i=g.data(this,"redactor");"-1"!==r.search(/\./)?void 0!==i[(t=r.split("."))[0]]&&(t=i[t[0]][t[1]]):t=i[r],void 0!==i&&g.isFunction(t)?void 0!==(e=t.apply(i,s))&&e!==i&&n.push(e):g.error('No such method "'+r+'" for Redactor')}):this.each(function(){g.data(this,"redactor",{}),g.data(this,"redactor",l(this,r))}),0===n.length?this:1===n.length?n[0]:n},g.Redactor=l,g.Redactor.VERSION="2.99",g.Redactor.modules=["air","autosave","block","buffer","build","button","caret","clean","code","core","detect","dropdown","events","file","focus","image","indent","inline","insert","keydown","keyup","lang","line","link","linkify","list","marker","modal","observe","offset","paragraphize","paste","placeholder","progress","selection","shortcuts","storage","toolbar","upload","uploads3","utils","browser"],g.Redactor.settings={},g.Redactor.opts={animation:!1,lang:"en",direction:"ltr",spellcheck:!0,overrideStyles:!0,stylesClass:!1,scrollTarget:document,focus:!1,focusEnd:!1,clickToEdit:!1,structure:!1,tabindex:!1,minHeight:!1,maxHeight:!1,maxWidth:!1,plugins:!1,callbacks:{},placeholder:!1,linkify:!0,enterKey:!0,pastePlainText:!1,pasteImages:!0,pasteLinks:!0,pasteBlockTags:["pre","h1","h2","h3","h4","h5","h6","table","tbody","thead","tfoot","th","tr","td","ul","ol","li","blockquote","p","figure","figcaption"],pasteInlineTags:["br","strong","ins","code","del","span","samp","kbd","sup","sub","mark","var","cite","small","b","u","em","i"],preClass:!1,preSpaces:4,tabAsSpaces:!1,tabKey:!0,autosave:!1,autosaveName:!1,autosaveFields:!1,imageUpload:null,imageUploadParam:"file",imageUploadFields:!1,imageUploadForms:!1,imageTag:"figure",imageEditable:!0,imageCaption:!0,imagePosition:!1,imageResizable:!1,imageFloatMargin:"10px",dragImageUpload:!0,multipleImageUpload:!0,clipboardImageUpload:!0,fileUpload:null,fileUploadParam:"file",fileUploadFields:!1,fileUploadForms:!1,dragFileUpload:!0,s3:!1,linkNewTab:!1,linkTooltip:!0,linkNofollow:!1,linkSize:30,linkValidation:!0,pasteLinkTarget:!1,videoContainerClass:"video-container",toolbar:!0,toolbarFixed:!0,toolbarFixedTarget:document,toolbarFixedTopOffset:0,toolbarExternal:!1,toolbarOverflow:!1,air:!1,airWidth:!1,formatting:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],formattingAdd:!1,buttons:["format","bold","italic","deleted","lists","image","file","link","horizontalrule"],buttonsTextLabeled:!1,buttonsHide:[],buttonsHideOnMobile:[],script:!0,removeNewlines:!1,removeComments:!0,replaceTags:{b:"strong",i:"em",strike:"del"},keepStyleAttr:[],keepInlineOnEnter:!1,shortcuts:{"ctrl+shift+m, meta+shift+m":{func:"inline.removeFormat"},"ctrl+b, meta+b":{func:"inline.format",params:["bold"]},"ctrl+i, meta+i":{func:"inline.format",params:["italic"]},"ctrl+h, meta+h":{func:"inline.format",params:["superscript"]},"ctrl+l, meta+l":{func:"inline.format",params:["subscript"]},"ctrl+k, meta+k":{func:"link.show"},"ctrl+shift+7":{func:"list.toggle",params:["orderedlist"]},"ctrl+shift+8":{func:"list.toggle",params:["unorderedlist"]}},shortcutsAdd:!1,activeButtons:["deleted","italic","bold"],activeButtonsStates:{b:"bold",strong:"bold",i:"italic",em:"italic",del:"deleted",strike:"deleted"},langs:{en:{format:"Format",image:"Image",file:"File",link:"Link",bold:"Bold",italic:"Italic",deleted:"Strikethrough",underline:"Underline","bold-abbr":"B","italic-abbr":"I","deleted-abbr":"S","underline-abbr":"U",lists:"Lists","link-insert":"Insert link","link-edit":"Edit link","link-in-new-tab":"Open link in new tab",unlink:"Unlink",cancel:"Cancel",close:"Close",insert:"Insert",save:"Save",delete:"Delete",text:"Text",edit:"Edit",title:"Title",paragraph:"Normal text",quote:"Quote",code:"Code",heading1:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",heading4:"Heading 4",heading5:"Heading 5",heading6:"Heading 6",filename:"Name",optional:"optional",unorderedlist:"Unordered List",orderedlist:"Ordered List",outdent:"Outdent",indent:"Indent",horizontalrule:"Line","upload-label":"Drop file here or ",caption:"Caption",bulletslist:"Bullets",numberslist:"Numbers","image-position":"Position",none:"None",left:"Left",right:"Right",center:"Center","accessibility-help-label":"Rich text editor"}},type:"textarea",inline:!1,inlineTags:["a","span","strong","strike","b","u","em","i","code","del","ins","samp","kbd","sup","sub","mark","var","cite","small"],blockTags:["pre","ul","ol","li","p","h1","h2","h3","h4","h5","h6","dl","dt","dd","div","td","blockquote","output","figcaption","figure","address","section","header","footer","aside","article","iframe"],paragraphize:!0,paragraphizeBlocks:["table","div","pre","form","ul","ol","h1","h2","h3","h4","h5","h6","dl","blockquote","figcaption","address","section","header","footer","aside","article","object","style","script","iframe","select","input","textarea","button","option","map","area","math","hr","fieldset","legend","hgroup","nav","figure","details","menu","summary","p"],emptyHtml:"<p>&#x200b;</p>",invisibleSpace:"&#x200b;",emptyHtmlRendered:g("").html("​").html(),imageTypes:["image/png","image/jpeg","image/gif"],userAgent:navigator.userAgent.toLowerCase(),observe:{dropdowns:[]},regexps:{linkyoutube:/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.\-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/gi,linkvimeo:/https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/,linkimage:/((https?|www)[^\s]+\.)(jpe?g|png|gif)(\?[^\s-]+)?/gi,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/gi}},l.fn=g.Redactor.prototype={keyCode:{BACKSPACE:8,DELETE:46,UP:38,DOWN:40,ENTER:13,SPACE:32,ESC:27,TAB:9,CTRL:17,META:91,SHIFT:16,ALT:18,RIGHT:39,LEFT:37,LEFT_WIN:91},init:function(t,e){if(this.$element=g(t),this.uuid=i++,this.sBuffer=[],this.sRebuffer=[],this.loadOptions(e),this.loadModules(),this.opts.clickToEdit&&!this.$element.hasClass("redactor-click-to-edit"))return this.loadToEdit(e);this.$element.hasClass("redactor-click-to-edit")&&this.$element.removeClass("redactor-click-to-edit"),this.reIsBlock=new RegExp("^("+this.opts.blockTags.join("|").toUpperCase()+")$","i"),this.reIsInline=new RegExp("^("+this.opts.inlineTags.join("|").toUpperCase()+")$","i"),this.opts.dragImageUpload=null!==this.opts.imageUpload&&this.opts.dragImageUpload,this.opts.dragFileUpload=null!==this.opts.fileUpload&&this.opts.dragFileUpload,this.formatting={},this.lang.load(),g.extend(this.opts.shortcuts,this.opts.shortcutsAdd),this.$editor=this.$element,this.detectType(),this.core.callback("start"),this.core.callback("startToEdit"),this.start=!0,this.build.start()},detectType:function(){this.build.isInline()||this.opts.inline?this.opts.type="inline":this.build.isTag("DIV")?this.opts.type="div":this.build.isTag("PRE")&&(this.opts.type="pre")},loadToEdit:function(t){this.$element.on("click.redactor-click-to-edit",g.proxy(function(){this.initToEdit(t)},this)),this.$element.addClass("redactor-click-to-edit")},initToEdit:function(e){g.extend(e.callbacks,{startToEdit:function(){this.insert.node(this.marker.get(),!1)},initToEdit:function(){this.selection.restore(),this.clickToCancelStorage=this.code.get(),g(this.opts.clickToCancel).off(".redactor-click-to-edit"),g(this.opts.clickToCancel).show().on("click.redactor-click-to-edit",g.proxy(function(t){t.preventDefault(),this.core.destroy(),this.events.syncFire=!1,this.$element.html(this.clickToCancelStorage),this.core.callback("cancel",this.clickToCancelStorage),this.events.syncFire=!0,this.clickToCancelStorage="",g(this.opts.clickToCancel).hide(),g(this.opts.clickToSave).hide(),this.$element.on("click.redactor-click-to-edit",g.proxy(function(){this.initToEdit(e)},this)),this.$element.addClass("redactor-click-to-edit")},this)),g(this.opts.clickToSave).off(".redactor-click-to-edit"),g(this.opts.clickToSave).show().on("click.redactor-click-to-edit",g.proxy(function(t){t.preventDefault(),this.core.destroy(),this.core.callback("save",this.code.get()),g(this.opts.clickToCancel).hide(),g(this.opts.clickToSave).hide(),this.$element.on("click.redactor-click-to-edit",g.proxy(function(){this.initToEdit(e)},this)),this.$element.addClass("redactor-click-to-edit")},this))}}),this.$element.redactor(e),this.$element.off(".redactor-click-to-edit")},loadOptions:function(t){var e={};void 0!==g.Redactor.settings.namespace&&!this.$element.hasClass(g.Redactor.settings.namespace)||(e=g.Redactor.settings),this.opts=g.extend({},g.Redactor.opts,this.$element.data(),t),this.opts=g.extend({},this.opts,e)},getModuleMethods:function(e){return Object.getOwnPropertyNames(e).filter(function(t){return"function"==typeof e[t]})},loadModules:function(){for(var t=g.Redactor.modules.length,e=0;e<t;e++)this.bindModuleMethods(g.Redactor.modules[e])},bindModuleMethods:function(t){if(void 0!==this[t]){this[t]=this[t]();for(var e=this.getModuleMethods(this[t]),i=e.length,r=0;r<i;r++)this[t][e[r]]=this[t][e[r]].bind(this)}},air:function(){return{enabled:!1,collapsed:function(){},collapsedEnd:function(){},build:function(){},append:function(){},createContainer:function(){},show:function(){},bindHide:function(){},hide:function(){}}},autosave:function(){return{enabled:!1,html:!1,init:function(){},is:function(){},send:function(){},getHiddenFields:function(){},success:function(){},disable:function(){}}},block:function(){return{format:function(t,e,i,r){if(t="quote"===t?"blockquote":t,this.block.tags=["p","blockquote","pre","h1","h2","h3","h4","h5","h6","div","figure"],-1!==g.inArray(t,this.block.tags))return"p"===t&&void 0===e&&(e="class"),this.buffer.set(),this.utils.isCollapsed()?this.block.formatCollapsed(t,e,i,r):this.block.formatUncollapsed(t,e,i,r)},formatCollapsed:function(t,e,i,r){this.selection.save();var n=this.selection.block(),s=n.tagName.toLowerCase();if(-1!==g.inArray(s,this.block.tags)){var o,a,l=!1;if(s===t&&void 0===e&&(t="p",l=!0),l&&(this.block.removeAllClass(),this.block.removeAllAttr()),"blockquote"===s&&this.utils.isEndOfElement(n)?(this.marker.remove(),(o=document.createElement("p")).innerHTML=this.opts.invisibleSpace,g(n).after(o),this.caret.start(o),0!==(a=g(n).children().last()).length&&"BR"===a[0].tagName&&a.remove()):o=this.utils.replaceToTag(n,t),"object"==typeof e)for(var c in r=i,e)o=this.block.setAttr(o,c,e[c],r);else o=this.block.setAttr(o,e,i,r);return"pre"===t&&1===o.length&&g(o).html(g.trim(g(o).html())),this.selection.restore(),this.block.removeInlineTags(o),o}this.selection.restore()},formatUncollapsed:function(t,e,i,r){this.selection.save();var n=[],s=this.selection.blocks();s[0]&&(g(s[0]).hasClass("redactor-in")||g(s[0]).hasClass("redactor-box"))&&(s=this.core.editor().find(this.opts.blockTags.join(", ")));for(var o,a=s.length,l=0;l<a;l++){var c=s[l].tagName.toLowerCase();if(-1!==g.inArray(c,this.block.tags)&&"figure"!==c){var h=this.utils.replaceToTag(s[l],t);if("object"==typeof e)for(var d in r=i,e)h=this.block.setAttr(h,d,e[d],r);else h=this.block.setAttr(h,e,i,r);n.push(h),this.block.removeInlineTags(h)}}return this.selection.restore(),"pre"===t&&0!==n.length&&(o=n[0],g.each(n,function(t,e){0!==t&&(g(o).append("\n"+g.trim(e.html())),g(e).remove())}),(n=[]).push(o)),n},removeInlineTags:function(t){t=t[0]||t;var e,i=this.opts.inlineTags;-1!==g.inArray(t.tagName,["PRE","H1","H2","H3","H4","H5","H6"])&&("PRE"!==t.tagName&&(e=i.indexOf("a"),i.splice(e,1)),g(t).find(i.join(",")).not(".redactor-selection-marker").contents().unwrap())},setAttr:function(t,e,i,r){if(void 0===e)return t;var n=void 0===r?"replace":r;return t="class"===e?this.block[n+"Class"](i,t):"remove"===n||"removeAll"===n?this.block[n+"Attr"](e,t):this.block[n+"Attr"](e,i,t)},getBlocks:function(t){if(t=void 0===t?this.selection.blocks():t,g(t).hasClass("redactor-box")){var i=[],e=this.core.editor().children();return g.each(e,g.proxy(function(t,e){this.utils.isBlock(e)&&i.push(e)},this)),i}return t},replaceClass:function(t,e){return g(this.block.getBlocks(e)).removeAttr("class").addClass(t)[0]},toggleClass:function(t,e){return g(this.block.getBlocks(e)).toggleClass(t)[0]},addClass:function(t,e){return g(this.block.getBlocks(e)).addClass(t)[0]},removeClass:function(t,e){return g(this.block.getBlocks(e)).removeClass(t)[0]},removeAllClass:function(t){return g(this.block.getBlocks(t)).removeAttr("class")[0]},replaceAttr:function(t,e,i){return i=this.block.removeAttr(t,i),g(i).attr(t,e)[0]},toggleAttr:function(i,r,t){t=this.block.getBlocks(t);var n=this,s=[];return g.each(t,function(t,e){g(e).attr(i)?s.push(n.block.removeAttr(i,e)):s.push(n.block.addAttr(i,r,e))}),s},addAttr:function(t,e,i){return g(this.block.getBlocks(i)).attr(t,e)[0]},removeAttr:function(t,e){return g(this.block.getBlocks(e)).removeAttr(t)[0]},removeAllAttr:function(t){t=this.block.getBlocks(t);var i=[];return g.each(t,function(t,e){if(void 0!==e.attributes)for(;e.attributes.length;)e.removeAttribute(e.attributes[0].name);i.push(e)}),i}}},buffer:function(){return{set:function(t){void 0===t&&this.buffer.clear(),void 0===t||"undo"===t?this.buffer.setUndo():this.buffer.setRedo()},setUndo:function(){var t=this.selection.saveInstant(),e=this.sBuffer[this.sBuffer.length-1],i=this.core.editor().html();void 0!==e&&e[0]===i||this.sBuffer.push([i,t])},setRedo:function(){var t=this.selection.saveInstant();this.sRebuffer.push([this.core.editor().html(),t])},add:function(){this.sBuffer.push([this.core.editor().html(),0])},undo:function(){var t;0!==this.sBuffer.length&&(t=this.sBuffer.pop(),this.buffer.set("redo"),this.core.editor().html(t[0]),this.selection.restoreInstant(t[1]),this.selection.restore(),this.observe.load())},redo:function(){var t;0!==this.sRebuffer.length&&(t=this.sRebuffer.pop(),this.buffer.set("undo"),this.core.editor().html(t[0]),this.selection.restoreInstant(t[1]),this.selection.restore(),this.observe.load())},clear:function(){this.sRebuffer=[]}}},build:function(){return{start:function(){if("textarea"!==this.opts.type)throw new Error("Only `<textarea>` types are allowed.");this.build.startTextarea(),this.build.setIn(),this.build.setId(),this.build.enableEditor(),this.build.setOptions(),this.build.callEditor()},createContainerBox:function(){this.$box=g('<div class="redactor-box" role="application" />')},setIn:function(){this.core.editor().addClass("redactor-in")},setId:function(){var t="textarea"===this.opts.type?"redactor-uuid-"+this.uuid:this.$element.attr("id");this.core.editor().attr("id",void 0===t?"redactor-uuid-"+this.uuid:t)},getName:function(){var t=this.$element.attr("name");return void 0===t?"content-"+this.uuid:t},buildTextarea:function(){},loadFromTextarea:function(){this.$editor=g("<div />"),this.$textarea=this.$element,this.$element.attr("name",this.build.getName()),this.$box.insertAfter(this.$element).append(this.$editor).append(this.$element),this.build.setStartAttrs(),this.$editor.addClass("redactor-layer"),this.opts.overrideStyles&&this.$editor.addClass("redactor-styles"),this.$element.hide(),this.$box.prepend('<span class="redactor-voice-label" id="redactor-voice-'+this.uuid+'" aria-hidden="false">'+this.lang.get("accessibility-help-label")+"</span>")},setStartAttrs:function(){this.$editor.attr({"aria-labelledby":"redactor-voice-"+this.uuid,role:"presentation"})},startTextarea:function(){this.build.createContainerBox(),this.build.loadFromTextarea(),this.code.start(this.core.textarea().val()),this.core.textarea().val(this.clean.onSync(this.$editor.html()))},isTag:function(t){return this.$element[0].tagName===t},isInline:function(){return!this.build.isTag("TEXTAREA")&&!this.build.isTag("DIV")&&!this.build.isTag("PRE")},enableEditor:function(){this.core.editor().attr({contenteditable:!0})},setOptions:function(){"inline"===this.opts.type&&(this.opts.enterKey=!1),"inline"!==this.opts.type&&"pre"!==this.opts.type||(this.opts.toolbarMobile=!1,this.opts.toolbar=!1),this.core.editor().attr("spellcheck",this.opts.spellcheck),this.opts.structure&&this.core.editor().addClass("redactor-structure"),this.opts.stylesClass&&this.core.editor().addClass(this.opts.stylesClass),"textarea"===this.opts.type&&(this.core.box().attr("dir",this.opts.direction),this.core.editor().attr("dir",this.opts.direction),this.opts.tabindex&&this.core.editor().attr("tabindex",this.opts.tabindex),this.opts.minHeight?this.core.editor().css("min-height",this.opts.minHeight):this.core.editor().css("min-height","40px"),this.opts.maxHeight&&this.core.editor().css("max-height",this.opts.maxHeight),this.opts.maxWidth&&this.core.editor().css({"max-width":this.opts.maxWidth,margin:"auto"}))},callEditor:function(){this.build.disableBrowsersEditing(),this.events.init(),this.build.setHelpers(),this.toolbarsButtons=this.button.init(),this.toolbar.build(),this.core.editor().on("mouseup.redactor-observe."+this.uuid+" keyup.redactor-observe."+this.uuid+" focus.redactor-observe."+this.uuid+" touchstart.redactor-observe."+this.uuid,g.proxy(this.observe.toolbar,this)),this.core.element().on("blur.callback.redactor",g.proxy(function(){this.button.setInactiveAll()},this)),this.modal.templates(),this.build.plugins(),this.code.html=this.code.cleaned(this.core.editor().html()),this.core.callback("init"),this.core.callback("initToEdit"),this.start=!1},setHelpers:function(){this.opts.focus?setTimeout(this.focus.start,100):this.opts.focusEnd&&setTimeout(this.focus.end,100)},disableBrowsersEditing:function(){try{document.execCommand("enableObjectResizing",!1,!1),document.execCommand("enableInlineTableEditing",!1,!1),document.execCommand("AutoUrlDetect",!1,!1)}catch(t){}},plugins:function(){this.opts.plugins&&g.each(this.opts.plugins,g.proxy(function(t,e){var i="undefined"!=typeof RedactorPlugins&&void 0!==RedactorPlugins[e]?RedactorPlugins:l.fn;if(g.isFunction(i[e])){this[e]=i[e]();for(var r,n,s=this.getModuleMethods(this[e]),o=s.length,a=0;a<o;a++)this[e][s[a]]=this[e][s[a]].bind(this);void 0!==this[e].langs&&(r={},void 0!==this[e].langs[this.opts.lang]?r=this[e].langs[this.opts.lang]:void 0===this[e].langs[this.opts.lang]&&void 0!==this[e].langs.en&&(r=this[e].langs.en),n=this,g.each(r,function(t,e){void 0===n.opts.curLang[t]&&(n.opts.curLang[t]=e)})),"function"==typeof this[e].init&&this[e].init()}},this))}}},button:function(){return{toolbar:function(){return void 0!==this.button.$toolbar&&this.button.$toolbar?this.button.$toolbar:this.$toolbar},init:function(){return{format:{title:this.lang.get("format"),icon:!0,dropdown:{p:{title:this.lang.get("paragraph"),func:"block.format"},blockquote:{title:this.lang.get("quote"),func:"block.format"},pre:{title:this.lang.get("code"),func:"block.format"},h1:{title:this.lang.get("heading1"),func:"block.format"},h2:{title:this.lang.get("heading2"),func:"block.format"},h3:{title:this.lang.get("heading3"),func:"block.format"},h4:{title:this.lang.get("heading4"),func:"block.format"},h5:{title:this.lang.get("heading5"),func:"block.format"},h6:{title:this.lang.get("heading6"),func:"block.format"}}},bold:{title:this.lang.get("bold-abbr"),icon:!0,label:this.lang.get("bold"),func:"inline.format"},italic:{title:this.lang.get("italic-abbr"),icon:!0,label:this.lang.get("italic"),func:"inline.format"},deleted:{title:this.lang.get("deleted-abbr"),icon:!0,label:this.lang.get("deleted"),func:"inline.format"},underline:{title:this.lang.get("underline-abbr"),icon:!0,label:this.lang.get("underline"),func:"inline.format"},lists:{title:this.lang.get("lists"),icon:!0,dropdown:{unorderedlist:{title:"&bull; "+this.lang.get("unorderedlist"),func:"list.toggle"},orderedlist:{title:"1. "+this.lang.get("orderedlist"),func:"list.toggle"},outdent:{title:"< "+this.lang.get("outdent"),func:"indent.decrease",observe:{element:"li",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},indent:{title:"> "+this.lang.get("indent"),func:"indent.increase",observe:{element:"li",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}}}},ul:{title:"&bull; "+this.lang.get("bulletslist"),icon:!0,func:"list.toggle"},ol:{title:"1. "+this.lang.get("numberslist"),icon:!0,func:"list.toggle"},outdent:{title:this.lang.get("outdent"),icon:!0,func:"indent.decrease"},indent:{title:this.lang.get("indent"),icon:!0,func:"indent.increase"},image:{title:this.lang.get("image"),icon:!0,func:"image.show"},file:{title:this.lang.get("file"),icon:!0,func:"file.show"},link:{title:this.lang.get("link"),icon:!0,dropdown:{link:{title:this.lang.get("link-insert"),func:"link.show",observe:{element:"a",in:{title:this.lang.get("link-edit")},out:{title:this.lang.get("link-insert")}}},unlink:{title:this.lang.get("unlink"),func:"link.unlink",observe:{element:"a",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}}}},horizontalrule:{title:this.lang.get("horizontalrule"),icon:!0,func:"line.insert"}}},setFormatting:function(){for(var t in this.toolbarsButtons.format.dropdown)this.toolbarsButtons.format.dropdown.hasOwnProperty(t)&&-1===this.opts.formatting.indexOf(t)&&delete this.toolbarsButtons.format.dropdown[t]},hideButtons:function(){0!==this.opts.buttonsHide.length&&this.button.hideButtonsSlicer(this.opts.buttonsHide)},hideButtonsOnMobile:function(){this.detect.isMobile()&&0!==this.opts.buttonsHideOnMobile.length&&this.button.hideButtonsSlicer(this.opts.buttonsHideOnMobile)},hideButtonsSlicer:function(t){g.each(t,g.proxy(function(t,e){var i=this.opts.buttons.indexOf(e);-1!==i&&this.opts.buttons.splice(i,1)},this))},load:function(i){this.button.buttons=[],this.opts.buttons.forEach(function(t){var e;("image"!==t||this.image.is())&&this.toolbarsButtons.hasOwnProperty(t)&&((e=elCreate("li")).appendChild(this.button.build(t,this.toolbarsButtons[t])[0]),i[0].appendChild(e))}.bind(this))},buildButtonTooltip:function(){},build:function(t,e){var i,r=g('<a href="javascript:void(null);" rel="'+t+'" />');return r.addClass("re-button re-"+t),r.attr({role:"button",tabindex:"-1"}),r.html(e.title),(e.func||e.command||e.dropdown)&&this.button.setEvent(r,t,e),e.dropdown&&(r.addClass("redactor-toolbar-link-dropdown").attr("aria-haspopup",!0),i=g('<ul class="dropdownMenu redactor-dropdown-menu redactor-dropdown-menu-'+r[0].rel+'" data-dropdown-allow-flip="horizontal" data-dropdown-ignore-page-scroll="true" />'),r.data("dropdown",i),this.dropdown.build(t,i,e.dropdown),this.button.setupDropdown(r[0],i[0])),this.button.buttons.push(r),r},setupDropdown:function(e,i){require(["Ui/SimpleDropdown"],function(t){t.initFragment(e,i),t.registerCallback(e.id,function(t,e){"close"===e&&this.dropdown.hideOut()}.bind(this)),elData(e,"a11y-mouse-event","mousedown"),elData(e,"aria-expanded",!1),e.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation()})}.bind(this))},getButtons:function(){return this.button.toolbar().find("a.re-button")},getButtonsKeys:function(){return this.button.buttons},setEvent:function(r,n,s){r.on("mousedown",g.proxy(function(t){if(t.preventDefault(),r.hasClass("redactor-button-disabled"))return!1;var e="func",i=s.func;return s.command?(e="command",i=s.command):s.dropdown&&(i=!(e="dropdown")),this.button.toggle(t,n,e,i),!1},this))},toggle:function(t,e,i,r,n){!this.detect.isIe()&&this.detect.isDesktop()||(this.utils.freezeScroll(),t.returnValue=!1),"command"===i?this.inline.format(r):"dropdown"===i?this.dropdown.show(t,e):this.button.clickCallback(t,r,e,n),"dropdown"!==i&&this.dropdown.hideAll(!1),!this.detect.isIe()&&this.detect.isDesktop()||this.utils.unfreezeScroll()},clickCallback:function(t,e,i,r){var n;if(t instanceof Event?t.preventDefault():t&&t.originalEvent&&t.originalEvent.preventDefault(),r=void 0===r?i:r,g.isFunction(e))e.call(this,i);else if("-1"!==e.search(/\./)){if(void 0===this[(n=e.split("."))[0]])return;"object"==typeof r?this[n[0]][n[1]].apply(this,r):this[n[0]][n[1]].call(this,r)}else"object"==typeof r?this[e].apply(this,r):this[e].call(this,r);this.observe.buttons(t,i)},all:function(){return this.button.buttons},get:function(t){if(!1!==this.opts.toolbar)return this.button.toolbar().find("a.re-"+t)},set:function(t,e){if(!1!==this.opts.toolbar){var i=this.button.toolbar().find("a.re-"+t);return i.html(e).attr("aria-label",e),i}},add:function(t,e){if(!0!==this.button.isAdded(t))return g();var i=this.button.build(t,{title:e});return this.button.toolbar().append(g("<li>").append(i)),i},addFirst:function(t,e){if(!0!==this.button.isAdded(t))return g();var i=this.button.build(t,{title:e});return this.button.toolbar().prepend(g("<li>").append(i)),i},addAfter:function(t,e,i){if(!0!==this.button.isAdded(e))return g();var r=this.button.build(e,{title:i}),n=this.button.get(t);return 0!==n.length?n.parent().after(g("<li>").append(r)):this.button.toolbar().append(g("<li>").append(r)),r},addBefore:function(t,e,i){if(!0!==this.button.isAdded(e))return g();var r=this.button.build(e,{title:i}),n=this.button.get(t);return 0!==n.length?n.parent().before(g("<li>").append(r)):this.button.toolbar().append(g("<li>").append(r)),r},isAdded:function(t){var e=this.opts.buttonsHideOnMobile.indexOf(t);return!(!1===this.opts.toolbar||-1!==e&&this.detect.isMobile())},setIcon:function(t,e){this.opts.buttonsTextLabeled||t.html(e).addClass("re-button-icon")},changeIcon:function(t,e){var i=this.button.get(t);0!==i.length&&i.find("i").removeAttr("class").addClass("re-icon-"+e)},addCallback:function(e,i){var r,n;void 0!==e&&!1!==this.opts.toolbar&&(r="dropdown"===i?"dropdown":"func",n=e.attr("rel"),e.on("mousedown",g.proxy(function(t){return!e.hasClass("redactor-button-disabled")&&void this.button.toggle(t,n,r,i)},this)))},addDropdown:function(t,e){if(!1!==this.opts.toolbar){t.addClass("redactor-toolbar-link-dropdown").attr("aria-haspopup",!0);var i=t.attr("rel");this.button.addCallback(t,"dropdown");var r=g('<ul class="dropdownMenu redactor-dropdown-menu redactor-dropdown-menu-'+i+'" data-dropdown-allow-flip="horizontal" data-dropdown-ignore-page-scroll="true" />');return t.data("dropdown",r),e&&(this.dropdown.build(i,r,e),this.button.setupDropdown(t[0],r[0])),r}},setActive:function(t){this.button.get(t).addClass("redactor-act").attr({"aria-pressed":!0,tabindex:0})},setInactive:function(t){this.button.get(t).removeClass("redactor-act").attr({"aria-pressed":!1,tabindex:"html"===t?0:-1})},setInactiveAll:function(t){var e=this.button.toolbar().find("a.re-button");void 0!==t&&(e=e.not(".re-"+t)),e.removeClass("redactor-act").attr({"aria-pressed":!1,tabindex:"html"===t?0:-1})},disable:function(t){this.button.get(t).addClass("redactor-button-disabled").attr("aria-disabled",!0)},enable:function(t){this.button.get(t).removeClass("redactor-button-disabled").attr("aria-disabled",!1)},disableAll:function(t){var e=this.button.toolbar().find("a.re-button");void 0!==t&&(Array.isArray(t)||(t=[t]),t=t.map(function(t){return".re-"+t}),e=e.not(t.join(","))),e.addClass("redactor-button-disabled").attr("aria-disabled",!0)},enableAll:function(){this.button.toolbar().find("a.re-button").removeClass("redactor-button-disabled").attr("aria-disabled",!1)},remove:function(t){this.button.get(t).remove()}}},caret:function(){return{set:function(t,e,i){var r=this.core.editor().scrollTop();this.core.editor().focus(),this.core.editor().scrollTop(r),i=void 0===i?0:1,t=t[0]||t,e=e[0]||e;var n=this.selection.get(),s=this.selection.range(n);try{s.setStart(t,0),s.setEnd(e,i)}catch(t){}this.selection.update(n,s)},prepare:function(t){return this.detect.isFirefox()&&void 0!==this.start&&this.core.editor().focus(),t[0]||t},start:function(t){var e,i;if(t=this.caret.prepare(t)){if("BR"===t.tagName)return this.caret.before(t);var r=g(t).children().first(),n=this.utils.isInlineTag(t.tagName);""===t.innerHTML||n?this.caret.setStartEmptyOrInline(t,n):r&&0!==r.length&&this.utils.isInlineTag(r[0].tagName)&&""===r.text()?this.caret.setStartEmptyOrInline(r[0],!0):((e=window.getSelection()).removeAllRanges(),(i=document.createRange()).selectNodeContents(t),i.collapse(!0),e.addRange(i))}},setStartEmptyOrInline:function(t,e){var i=window.getSelection(),r=document.createRange(),n=document.createTextNode("​");r.setStart(t,0),r.insertNode(n),r.setStartAfter(n),r.collapse(!0),i.removeAllRanges(),i.addRange(r),e||this.core.editor().on("keydown.redactor-remove-textnode",function(){g(n).remove(),g(this).off("keydown.redactor-remove-textnode")})},end:function(t){var e,i;if(t=this.caret.prepare(t)){if("BR"!==t.tagName&&""===t.innerHTML)return this.caret.start(t);if("BR"===t.tagName){var r=document.createElement("span");return r.className="redactor-invisible-space",r.innerHTML="&#x200b;",g(t).after(r),(e=window.getSelection()).removeAllRanges(),(i=document.createRange()).setStartBefore(r),i.setEndBefore(r),e.addRange(i),void g(r).replaceWith(function(){return g(this).contents()})}if(t.lastChild&&1===t.lastChild.nodeType)return this.caret.after(t.lastChild);if((e=window.getSelection()).getRangeAt||e.rangeCount)try{(i=e.getRangeAt(0)).selectNodeContents(t),i.collapse(!1),e.removeAllRanges(),e.addRange(i)}catch(t){}}},after:function(t){var e,i,r,n;if(t=this.caret.prepare(t)){if("BR"===t.tagName)return this.caret.end(t);this.utils.isBlockTag(t.tagName)?void 0===(i=this.caret.next(t))?this.caret.end(t):("TABLE"===i.tagName?i=g(i).find("th, td").first()[0]:"UL"!==i.tagName&&"OL"!==i.tagName||(i=g(i).find("li").first()[0]),this.caret.start(i)):(r=document.createTextNode("​"),(n=window.getSelection()).removeAllRanges(),(e=document.createRange()).setStartAfter(t),e.insertNode(r),e.setStartAfter(r),e.collapse(!0),n.addRange(e))}},before:function(t){var e,i,r;(t=this.caret.prepare(t))&&(this.utils.isBlockTag(t.tagName)?void 0===(r=this.caret.prev(t))?this.caret.start(t):("TABLE"===r.tagName?r=g(r).find("th, td").last()[0]:"UL"!==r.tagName&&"OL"!==r.tagName||(r=g(r).find("li").last()[0]),this.caret.end(r)):((e=window.getSelection()).removeAllRanges(),(i=document.createRange()).setStartBefore(t),i.collapse(!0),e.addRange(i)))},next:function(t){var e=g(t).next();return e.hasClass("redactor-script-tag, redactor-selection-marker")?e.next()[0]:e[0]},prev:function(t){var e=g(t).prev();return e.hasClass("redactor-script-tag, redactor-selection-marker")?e.prev()[0]:e[0]},offset:function(t){return this.offset.get(t)}}},clean:function(){return{onSet:function(t){t=this.clean.savePreCode(t),this.opts.script&&(t=t.replace(/<script(.*?[^>]?)>([\w\W]*?)<\/script>/gi,'<pre class="redactor-script-tag" $1>$2</pre>')),t=(t=(t=(t=(t=t.replace(/\$/g,"&#36;")).replace(/&amp;/g,"&")).replace(/<a href="(.*?[^>]?)®(.*?[^>]?)">/gi,'<a href="$1&reg$2">')).replace(/<span id="selection-marker-1"(.*?[^>]?)>​<\/span>/gi,"###marker1###")).replace(/<span id="selection-marker-2"(.*?[^>]?)>​<\/span>/gi,"###marker2###");var e,i=this,r=g("<div/>").html(g.parseHTML(t,document,!0)),n=this.opts.replaceTags;n&&(e=Object.keys(this.opts.replaceTags),r.find(e.join(",")).each(function(t,e){i.utils.replaceToTag(e,n[e.tagName.toLowerCase()])})),r.find("span, a").attr("data-redactor-span",!0),r.find(this.opts.inlineTags.join(",")).each(function(){var t=g(this);t.attr("style")&&t.attr("data-redactor-style-cache",t.attr("style"))}),t=r.html();var s=["font","html","head","link","body","meta","applet"];return this.opts.script||s.push("script"),t=this.clean.stripTags(t,s),this.opts.removeComments&&(t=t.replace(/<!--[\s\S]*?-->/gi,"")),-1!==(t=(t=(t=this.paragraphize.load(t)).replace("###marker1###",'<span id="selection-marker-1" class="redactor-selection-marker">​</span>')).replace("###marker2###",'<span id="selection-marker-2" class="redactor-selection-marker">​</span>')).search(/^(||\s||<br\s?\/?>||&nbsp;)$/i)?this.opts.emptyHtml:t},onGet:function(t){return this.clean.onSync(t)},onSync:function(i){if(-1!==(i=(i=i.replace(/\u200B/g,"")).replace(/&#x200b;/gi,"")).search(/^<p>(||\s||<br\s?\/?>||&nbsp;)<\/p>$/i))return"";i=(i=(i=(i=i.replace(/<span(.*?)id="redactor-image-box"(.*?[^>])>([\w\W]*?)<img(.*?)><\/span>/gi,"$3<img$4>")).replace(/<span(.*?)id="redactor-image-resizer"(.*?[^>])>(.*?)<\/span>/gi,"")).replace(/<span(.*?)id="redactor-image-editter"(.*?[^>])>(.*?)<\/span>/gi,"")).replace(/<img(.*?)style="(.*?)opacity: 0\.5;(.*?)"(.*?)>/gi,'<img$1style="$2$3"$4>');var t=g("<div/>").html(g.parseHTML(i,document,!0));t.find('*[style=""]').removeAttr("style"),t.find('*[class=""]').removeAttr("class"),t.find('*[rel=""]').removeAttr("rel"),t.find('*[data-image=""]').removeAttr("data-image"),t.find('*[alt=""]').removeAttr("alt"),t.find('*[title=""]').removeAttr("title"),t.find("*[data-redactor-style-cache]").removeAttr("data-redactor-style-cache"),t.find(".redactor-invisible-space, .redactor-unlink").each(function(){g(this).contents().unwrap()}),t.find("span, a").removeAttr("data-redactor-span data-redactor-style-cache").each(function(){0===this.attributes.length&&g(this).contents().unwrap()}),t.find("img").removeAttr("rel"),t.find(".redactor-selection-marker, #redactor-insert-marker").remove(),i=t.html(),this.opts.script&&(i=i.replace(/<pre class="redactor-script-tag"(.*?[^>]?)>([\w\W]*?)<\/pre>/gi,"<script$1>$2<\/script>")),i=(i=(i=(i=(i=this.clean.restoreFormTags(i)).replace(new RegExp("<br\\s?/?></h","gi"),"</h")).replace(new RegExp("<br\\s?/?></li>","gi"),"</li>")).replace(new RegExp("</li><br\\s?/?>","gi"),"</li>")).replace(/<pre>/gi,"<pre>\n"),this.opts.preClass&&(i=i.replace(/<pre>/gi,'<pre class="'+this.opts.preClass+'">')),this.opts.linkNofollow&&(i=(i=i.replace(/<a(.*?)rel="nofollow"(.*?[^>])>/gi,"<a$1$2>")).replace(/<a(.*?[^>])>/gi,'<a$1 rel="nofollow">'));return g.each({"™":"&trade;","©":"&copy;","…":"&hellip;","—":"&mdash;","‐":"&dash;"},function(t,e){i=i.replace(new RegExp(t,"g"),e)}),i=(i=i.replace(/&amp;/g,"&")).replace(/\n{2,}/g,"\n"),this.opts.removeNewlines&&(i=i.replace(/\r?\n/g,"")),i},onPaste:function(t,e,i){return!0!==i&&(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<b\sid="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi,"$2")).replace(/<b(.*?)id="docs-internal-guid(.*?)">([\w\W]*?)<\/b>/gi,"$3")).replace(/<span[^>]*(font-style: italic; font-weight: bold|font-weight: bold; font-style: italic)[^>]*>([\w\W]*?)<\/span>/gi,"<b><i>$2</i></b>")).replace(/<span[^>]*(font-style: italic; font-weight: 700|font-weight: 700; font-style: italic)[^>]*>([\w\W]*?)<\/span>/gi,"<b><i>$2</i></b>")).replace(/<span[^>]*font-style: italic[^>]*>([\w\W]*?)<\/span>/gi,"<i>$1</i>")).replace(/<span[^>]*font-weight: bold[^>]*>([\w\W]*?)<\/span>/gi,"<b>$1</b>")).replace(/<span[^>]*font-weight: 700[^>]*>([\w\W]*?)<\/span>/gi,"<b>$1</b>")).replace(/<o:p[^>]*>/gi,"")).replace(/<\/o:p>/gi,""),this.clean.isHtmlMsWord(t)&&(t=this.clean.cleanMsWord(t))),t=g.trim(t),e.pre?this.opts.preSpaces&&(t=t.replace(/\t/g,new Array(this.opts.preSpaces+1).join(" "))):(t=this.clean.replaceBrToNl(t),t=this.clean.removeTagsInsidePre(t)),!0!==i&&(t=this.clean.removeEmptyInlineTags(t),!1===e.encode&&(t=t.replace(/&/g,"&amp;"),t=this.clean.convertTags(t,e),t=this.clean.getPlainText(t),t=this.clean.reconvertTags(t,e))),e.text&&(t=this.clean.replaceNbspToSpaces(t),t=this.clean.getPlainText(t)),e.lists&&(t=t.replace("\n","<br>")),e.encode&&(t=this.clean.encodeHtml(t)),e.paragraphize&&(t=(t=t.replace(/ \n/g," ")).replace(/\n /g," "),t=(t=this.paragraphize.load(t)).replace(/<p><\/p>/g,"")),t=(t=t.replace(/<li><p>/g,"<li>")).replace(/<\/p><\/li>/g,"</li>")},getCurrentType:function(t,e){var i=this.selection.blocks(),r={text:!1,encode:!1,paragraphize:!0,line:this.clean.isHtmlLine(t),blocks:this.clean.isHtmlBlocked(t),pre:!1,lists:!1,block:!0,inline:!0,links:!0,images:!0};return 1===i.length&&this.utils.isCurrentOrParent(["h1","h2","h3","h4","h5","h6","a","figcaption"])?(r.text=!0,r.paragraphize=!1,r.inline=!1,r.images=!1,r.links=!1,r.line=!0):"inline"===this.opts.type||!1===this.opts.enterKey?(r.paragraphize=!1,r.block=!1,r.line=!0):1===i.length&&this.utils.isCurrentOrParent(["li"])?(r.lists=!0,r.block=!1,r.paragraphize=!1,r.images=!1):1===i.length&&this.utils.isCurrentOrParent(["th","td","blockquote"])?(r.block=!1,r.paragraphize=!1):("pre"===this.opts.type||1===i.length&&this.utils.isCurrentOrParent("pre"))&&(r.inline=!1,r.block=!1,r.encode=!0,r.pre=!0,r.paragraphize=!1,r.images=!1,r.links=!1),!0===r.line&&(r.paragraphize=!1),!0===e&&(r.text=!1),r},isHtmlBlocked:function(t){var e=t.match(new RegExp("</("+this.opts.blockTags.join("|").toUpperCase()+")>","gi")),i=t.match(new RegExp("<hr(.*?[^>])>","gi"));return null!==e||null!==i},isHtmlLine:function(t){if(this.clean.isHtmlBlocked(t))return!1;var e=t.match(/<br\s?\/?>/gi),i=t.match(/\n/gi);return!e&&!i},isHtmlMsWord:function(t){return t.match(/class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i)},removeEmptyInlineTags:function(t){var e=this.opts.inlineTags,i=g("<div/>").html(g.parseHTML(t,document,!0)),r=this,n=i.find("span"),s=i.find(e.join(","));return s.removeAttr("style"),s.each(function(){var t=g(this).html();0===this.attributes.length&&r.utils.isEmpty(t)&&g(this).replaceWith(function(){return g(this).contents()})}),n.each(function(){g(this).html();0===this.attributes.length&&g(this).replaceWith(function(){return g(this).contents()})}),t=(t=(t=(t=i.html()).replace("\x3c!--?php","<?php")).replace("\x3c!--?","<?")).replace("?--\x3e","?>"),i.remove(),t},cleanMsWord:function(t){t=(t=(t=(t=(t=t.replace(/<!--[\s\S]*?-->/g,"")).replace(/<o:p>[\s\S]*?<\/o:p>/gi,"")).replace(/\n/g," ")).replace(/<\/p>/gi,'</p><p><br data-redactor="br"></p>')).replace(/<\/div>|<\/li>|<\/td>/gi,"\n\n");var l=g("<div/>").html(t);elBySelAll("br",l[0],function(t){if("br"===elData(t,"redactor"))t.removeAttribute("data-redactor");else{var e=t.parentNode;if(e&&"P"===e.nodeName){for(var i=elCreate("p");t.nextSibling;)i.appendChild(t.nextSibling);e.parentNode.insertBefore(i,e.nextSibling),elRemove(t)}}});var c=!1,h=1,d=[];return l.find("p[style]").each(function(){var t=g(this).attr("style").match(/mso\-list\:l([0-9]+)\slevel([0-9]+)/);if(t){var e=parseInt(t[1]),i=parseInt(t[2]),r=g(this).html().match(/^[\w]+\./)?"ol":"ul",n=g("<li/>").html(g(this).html());if(n.html(n.html().replace(/^([\w\.]+)</,"<")),n.find("span:first").remove(),1==i&&-1==g.inArray(e,d)){var s=g("<"+r+"/>").attr({"data-level":i,"data-list":e}).html(n);g(this).replaceWith(s),c=e,d.push(e)}else{if(h<i){for(var o=l.find('[data-level="'+h+'"][data-list="'+c+'"]'),a=h;a<i;a++)(s=g("<"+r+"/>")).appendTo(o.find("li").last()),o=s;o.attr({"data-level":i,"data-list":e}).html(n)}else{l.find('[data-level="'+i+'"][data-list="'+e+'"]').last().append(n)}h=i,c=e,g(this).remove()}}}),l.find("[data-level][data-list]").removeAttr("data-level data-list"),elBySelAll("ol, ul",l[0],function(i){["nextElementSibling","previousElementSibling"].forEach(function(t){for(var e=i[t];e&&"P"===e.nodeName&&""===e.className&&"<br>"===e.innerHTML;)elRemove(e),e=i[t]})}),t=l.html()},replaceNbspToSpaces:function(t){return t.replace("&nbsp;"," ")},replaceBrToNl:function(t){return t.replace(/<br\s?\/?>/gi,"\n")},replaceNlToBr:function(t){return t.replace(/\n/g,"<br />")},convertTags:function(t,e){var i=g("<div>").html(t);i.find("iframe").remove();var r=i.find("a");if(r.removeAttr("style"),!1!==this.opts.pasteLinkTarget&&r.attr("target",this.opts.pasteLinkTarget),e.links&&this.opts.pasteLinks&&i.find("a").each(function(t,e){if(e.href){for(var i,r='#####[a href="'+e.href+'"',n=0,s=e.attributes.length;n<s;n++)"href"!==(i=e.attributes.item(n)).name&&(r+=" "+i.name+'="'+i.value+'"');e.outerHTML=r+"]#####"+e.innerHTML+"#####[/a]#####"}}),t=i.html(),e.images&&this.opts.pasteImages&&(t=t.replace(/<img(.*?)src="(.*?)"(.*?[^>])>/gi,'#####[img$1src="$2"$3]#####')),this.opts.pastePlainText)return t;for(var n=e.lists?["ul","ol","li"]:this.opts.pasteBlockTags,s=e.block||e.lists?e.inline?n.concat(this.opts.pasteInlineTags):n:e.inline?this.opts.pasteInlineTags:[],o=s.length,a=0;a<o;a++)t=t.replace(new RegExp("</"+s[a]+">","gi"),"###/"+s[a]+"###"),t="td"===s[a]||"th"===s[a]?t.replace(new RegExp("<"+s[a]+'(.*?[^>])((colspan|rowspan)="(.*?[^>])")?(.*?[^>])>',"gi"),"###"+s[a]+" $2###"):this.utils.isInlineTag(s[a])?(t=(t=t.replace(new RegExp("<"+s[a]+'([^>]*)class="([^>]*)"[^>]*>',"gi"),"###"+s[a]+' class="$2"###')).replace(new RegExp("<"+s[a]+'([^>]*)data-redactor-style-cache="([^>]*)"[^>]*>',"gi"),"###"+s[a]+' cache="$2"###')).replace(new RegExp("<"+s[a]+"[^>]*>","gi"),"###"+s[a]+"###"):t.replace(new RegExp("<"+s[a]+"[^>]*>","gi"),"###"+s[a]+"###");return t},reconvertTags:function(t,e){if((e.links&&this.opts.pasteLinks||e.images&&this.opts.pasteImages)&&(t=(t=t.replace(new RegExp("#####\\[","gi"),"<")).replace(new RegExp("\\]#####","gi"),">")),this.opts.pastePlainText)return t;for(var i=e.lists?["ul","ol","li"]:this.opts.pasteBlockTags,r=e.block||e.lists?e.inline?i.concat(this.opts.pasteInlineTags):i:e.inline?this.opts.pasteInlineTags:[],n=r.length,s=0;s<n;s++)t=t.replace(new RegExp("###/"+r[s]+"###","gi"),"</"+r[s]+">");for(s=0;s<n;s++)t=t.replace(new RegExp("###"+r[s]+"###","gi"),"<"+r[s]+">");for(var o,s=0;s<n;s++){"td"===r[s]||"th"===r[s]?t=t.replace(new RegExp("###"+r[s]+"s?(.*?[^#])###","gi"),"<"+r[s]+"$1>"):this.utils.isInlineTag(r[s])&&(o="span"===r[s]?' data-redactor-span="true"':"",t=(t=t.replace(new RegExp("###"+r[s]+' cache="(.*?[^#])"###',"gi"),"<"+r[s]+' style="$1"'+o+' data-redactor-style-cache="$1">')).replace(new RegExp("###"+r[s]+"s?(.*?[^#])###","gi"),"<"+r[s]+"$1>"))}return t},cleanPre:function(t){t=void 0===t?g(this.selection.block()).closest("pre",this.core.editor()[0]):t,g(t).find("br").replaceWith(function(){return document.createTextNode("\n")}),g(t).find("p").replaceWith(function(){return g(this).contents()})},removeTagsInsidePre:function(t){var e=g("<div />").append(t);return e.find("pre").replaceWith(function(){var t=g(this).html();return t=(t=t.replace(/<br\s?\/?>|<\/p>|<\/div>|<\/li>|<\/td>/gi,"\n")).replace(/(<([^>]+)>)/gi,""),g("<pre />").append(t)}),t=e.html(),e.remove(),t},getPlainText:function(t){t=(t=(t=(t=(t=(t=t.replace(/<!--[\s\S]*?-->/gi,"")).replace(/<style[\s\S]*?style>/gi,"")).replace(/<p><\/p>/g,"")).replace(/<\/div>|<\/li>|<\/td>/gi,"\n")).replace(/<\/p>/gi,"\n\n")).replace(/<\/H[1-6]>/gi,"\n\n");var e=document.createElement("div");return e.innerHTML=t,t=e.textContent||e.innerText,g.trim(t)},savePreCode:function(t){return t=this.clean.savePreFormatting(t),t=this.clean.saveCodeFormatting(t),t=this.clean.restoreSelectionMarkers(t)},savePreFormatting:function(a){var t=a.match(/<pre(.*?)>([\w\W]*?)<\/pre>/gi);return null===t||g.each(t,g.proxy(function(t,e){var i,r,n,s=[],o=!1;e.match(/<pre(.*?)>(([\n\r\s]+)?)<code(.*?)>/i)?(o=!0,i=(s=e.match(/<pre(.*?)>(([\n\r\s]+)?)<code(.*?)>([\w\W]*?)<\/code>(([\n\r\s]+)?)<\/pre>/i))[5],r=s[1],n=s[4]):(i=(s=e.match(/<pre(.*?)>([\w\W]*?)<\/pre>/i))[2],r=s[1]),i=(i=i.replace(/<br\s?\/?>/g,"\n")).replace(/&nbsp;/g," "),this.opts.preSpaces&&(i=i.replace(/\t/g,new Array(this.opts.preSpaces+1).join(" "))),i=(i=this.clean.encodeEntities(i)).replace(/\$/g,"&#36;"),a=o?a.replace(e,"<pre"+r+"><code"+n+">"+i+"</code></pre>"):a.replace(e,"<pre"+r+">"+i+"</pre>")},this)),a},saveCodeFormatting:function(r){var t=r.match(/<code(.*?)>([\w\W]*?)<\/code>/gi);return null===t||g.each(t,g.proxy(function(t,e){var i=e.match(/<code(.*?)>([\w\W]*?)<\/code>/i);i[2]=i[2].replace(/&nbsp;/g," "),i[2]=this.clean.encodeEntities(i[2]),i[2]=i[2].replace(/\$/g,"&#36;"),r=r.replace(e,"<code"+i[1]+">"+i[2]+"</code>")},this)),r},restoreSelectionMarkers:function(t){return t=t.replace(/&lt;span id=&quot;selection-marker-([0-9])&quot; class=&quot;redactor-selection-marker&quot;&gt;​&lt;\/span&gt;/g,'<span id="selection-marker-$1" class="redactor-selection-marker">​</span>')},saveFormTags:function(t){return t},restoreFormTags:function(t){return t.replace(/<section(.*?) rel="redactor-form-tag"(.*?)>([\w\W]*?)<\/section>/gi,"<form$1$2>$3</form>")},encodeHtml:function(t){return t=(t=(t=(t=t.replace(/”/g,'"')).replace(/“/g,'"')).replace(/‘/g,"'")).replace(/’/g,"'"),t=this.clean.encodeEntities(t)},encodeEntities:function(t){return t=(t=String(t).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},stripTags:function(t,i){if(void 0===i)return t.replace(/(<([^>]+)>)/gi,"");return t.replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,function(t,e){return-1===i.indexOf(e.toLowerCase())?t:""})},removeMarkers:function(t){return t.replace(/<span(.*?[^>]?)class="redactor-selection-marker"(.*?[^>]?)>([\w\W]*?)<\/span>/gi,"")},removeSpaces:function(t){return t=(t=(t=(t=(t=(t=(t=(t=(t=g.trim(t)).replace(/\n/g,"")).replace(/[\t]*/g,"")).replace(/\n\s*\n/g,"\n")).replace(/^[\s\n]*/g," ")).replace(/[\s\n]*$/g," ")).replace(/>\s{2,}</g,"> <")).replace(/\n\n/g,"\n")).replace(/\u200B/g,"")},removeSpacesHard:function(t){return t=(t=(t=(t=(t=(t=(t=(t=(t=g.trim(t)).replace(/\n/g,"")).replace(/[\t]*/g,"")).replace(/\n\s*\n/g,"\n")).replace(/^[\s\n]*/g,"")).replace(/[\s\n]*$/g,"")).replace(/>\s{2,}</g,"><")).replace(/\n\n/g,"\n")).replace(/\u200B/g,"")},normalizeCurrentHeading:function(){var t=this.selection.block();this.utils.isCurrentOrParentHeader()&&t&&t.normalize()}}},code:function(){return{syncFire:!0,html:!1,start:function(t){t=(t=g.trim(t)).replace(/^(<span id="selection-marker-1" class="redactor-selection-marker">​<\/span>)/,""),t=(t=this.clean.onSet(t)).replace(/<p><span id="selection-marker-1" class="redactor-selection-marker">​<\/span><\/p>/,""),this.events.stopDetectChanges(),this.core.editor().html(t),this.observe.load(),this.events.startDetectChanges()},set:function(t,e){t=g.trim(t),(e=e||{}).start&&(this.start=e.start),"textarea"===this.opts.type?t=this.clean.onSet(t):"div"===this.opts.type&&""===t&&(t=this.opts.emptyHtml),this.core.editor().html(t),"textarea"===this.opts.type&&this.code.sync()},get:function(){if("textarea"===this.opts.type)return this.core.textarea().val();var t=this.core.editor().html();return t=this.clean.onGet(t)},sync:function(){if(this.code.syncFire){var t=this.core.editor().html(),e=this.code.cleaned(t);if(!this.code.isSync(e)){if(this.code.html=e,"textarea"!==this.opts.type)return this.core.callback("sync",t),void this.core.callback("change",t);"textarea"===this.opts.type&&setTimeout(g.proxy(function(){this.code.startSync(t)},this),10)}}},startSync:function(t){t=this.core.callback("syncBefore",t),t=this.clean.onSync(t),this.core.textarea().val(t),this.core.callback("sync",t),!1===this.start&&this.core.callback("change",t),this.start=!1},isSync:function(t){var e=!1!==this.code.html&&this.code.html;return!1!==e&&e===t},cleaned:function(t){return t=t.replace(/\u200B/g,""),this.clean.removeMarkers(t)}}},core:function(){return{id:function(){return this.$editor.attr("id")},element:function(){return this.$element},editor:function(){return void 0===this.$editor?g():this.$editor},textarea:function(){return this.$textarea},box:function(){return"textarea"===this.opts.type?this.$box:this.$element},toolbar:function(){return!!this.$toolbar&&this.$toolbar},air:function(){return!!this.$air&&this.$air},object:function(){return g.extend({},this)},structure:function(){this.core.editor().toggleClass("redactor-structure")},addEvent:function(t){this.core.event=t},getEvent:function(){return this.core.event},callback:function(t,e,i){var r=!1,n=g._data(this.core.element()[0],"events");if(void 0!==n&&void 0!==n[t])for(var s,o,a=n[t].length,l=0;l<a;l++){"callback.redactor"===n[t][l].namespace&&(s=n[t][l].handler,r=void 0===(o=void 0===i?[e]:[e,i])?s.call(this,e):s.call(this,e,o))}if(r)return r;if(void 0===this.opts.callbacks[t])return void 0===i?e:i;var c=this.opts.callbacks[t];return g.isFunction(c)?void 0===i?c.call(this,e):c.call(this,e,i):void 0===i?e:i},destroy:function(){this.opts.destroyed=!0,this.core.callback("destroy"),g("#redactor-voice-"+this.uuid).remove(),this.core.editor().removeClass("redactor-in redactor-styles redactor-structure redactor-layer-img-edit"),this.core.editor().off("keydown.redactor-remove-textnode"),this.core.editor().off(".redactor-observe."+this.uuid),this.$element.off(".redactor").removeData("redactor"),this.core.editor().off(".redactor"),g(document).off(".redactor-air."+this.uuid),g(document).off("mousedown.redactor-blur."+this.uuid),g(document).off("mousedown.redactor."+this.uuid),g(document).off("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid),g(window).off(".redactor-toolbar."+this.uuid),g(window).off("touchmove.redactor."+this.uuid),g("body").off("scroll.redactor."+this.uuid),g(this.opts.toolbarFixedTarget).off("scroll.redactor."+this.uuid);var i=this;!1!==this.opts.plugins&&g.each(this.opts.plugins,function(t,e){g(window).off(".redactor-plugin-"+e),g(document).off(".redactor-plugin-"+e),g("body").off(".redactor-plugin-"+e),i.core.editor().off(".redactor-plugin-"+e)}),this.$element.off("click.redactor-click-to-edit"),this.$element.removeClass("redactor-click-to-edit"),this.core.editor().removeClass("redactor-layer"),this.core.editor().removeAttr("contenteditable");var t=this.code.get();this.opts.toolbar&&this.$toolbar&&this.$toolbar.find("a").each(function(){var t=g(this);t.data("dropdown")&&(t.data("dropdown").remove(),t.data("dropdown",{}))}),"textarea"===this.opts.type&&(this.$box.after(this.$element),this.$box.remove(),this.$element.val(t).show()),this.opts.toolbar&&this.$toolbar&&this.$toolbar.remove(),this.$modalBox&&this.$modalBox.remove(),this.$modalOverlay&&this.$modalOverlay.remove(),g(".redactor-link-tooltip").remove()}}},detect:function(){return{isWebkit:function(){return/webkit/.test(this.opts.userAgent)},isFirefox:function(){return-1<this.opts.userAgent.indexOf("firefox")},isIe:function(t){if(document.documentMode||/Edge/.test(navigator.userAgent))return"edge";var e=RegExp("msie"+(isNaN(t)?"":"\\s"+t),"i").test(navigator.userAgent);return e=e||!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)},isMobile:function(){return/(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent)},isDesktop:function(){return!/(iPhone|iPod|iPad|BlackBerry|Android)/.test(navigator.userAgent)},isIpad:function(){return/iPad/.test(navigator.userAgent)}}},dropdown:function(){return{active:!1,button:!1,key:!1,position:[],getDropdown:function(){return this.dropdown.active},build:function(t,e,i){var r,n,s=document.createDocumentFragment();for(var o in i){i.hasOwnProperty(o)&&(r=i[o],n=this.dropdown.buildItem(o,r),this.observe.addDropdown(g(n),o,r),s.appendChild(n))}for(var a=!1,l=0,c=s.childNodes.length;l<c;l++)if(s.childNodes[l].nodeType===Node.ELEMENT_NODE){a=!0;break}a&&(e[0].rel=t,e[0].appendChild(s))},buildFormatting:function(){},buildItem:function(e,i){var t=elCreate("li");return void 0!==i.classname&&t.classList.add(i.classname),0===e.toLowerCase().indexOf("divider")?t.classList.add("redactor-dropdown-divider"):(t.innerHTML='<a href="#" class="redactor-dropdown-'+e+'" role="button"><span>'+i.title+"</span></a>",g(t.children[0]).on("mousedown",function(t){t.preventDefault(),this.dropdown.buildClick(t,e,i)}.bind(this))),t},buildClick:function(t,e,i){var r;g(t.target).hasClass("redactor-dropdown-link-inactive")||(r=this.dropdown.buildCommand(i),void 0!==i.args?this.button.toggle(t,e,r.type,r.callback,i.args):this.button.toggle(t,e,r.type,r.callback))},buildCommand:function(t){var e={type:"func"};return e.callback=t.func,t.command?(e.type="command",e.callback=t.command):t.dropdown&&(e.type="dropdown",e.callback=t.dropdown),e},show:function(t,e){this.detect.isDesktop()&&this.core.editor().focus(),this.dropdown.hideAll(!1,e),this.dropdown.key=e,this.dropdown.button=this.button.get(this.dropdown.key),require(["Ui/SimpleDropdown"],function(t){var e=this.dropdown.button[0].id;t.toggleDropdown(e),t.isOpen(e)?(this.dropdown.active=g(t.getDropdownMenu(e)),this.core.callback("dropdownShow",{dropdown:this.dropdown.active,key:this.dropdown.key,button:this.dropdown.button}),this.button.setActive(this.dropdown.key),this.dropdown.button.addClass("dropact").attr("aria-expanded",!0),this.dropdown.enableCallback()):this.dropdown.hide()}.bind(this)),t.preventDefault()},showIsFixedToolbar:function(){},showIsUnFixedToolbar:function(){},enableEvents:function(){},enableCallback:function(){this.core.callback("dropdownShown",{dropdown:this.dropdown.active,key:this.dropdown.key,button:this.dropdown.button})},getButtonPosition:function(){},closeHandler:function(){},hideAll:function(t,e){this.dropdown.hideOut(e)},hide:function(){this.dropdown.hideOut()},hideOut:function(t){var e;!1!==this.dropdown.active&&this.dropdown.button[0].rel!==t&&(this.core.callback("dropdownHide",this.dropdown.active),e=this.dropdown.button[0].id,require(["Ui/SimpleDropdown"],function(t){t.close(e)}),this.dropdown.button.removeClass("redactor-act dropact").attr("aria-expanded",!1),this.dropdown.button=!1,this.dropdown.key=!1,this.dropdown.active=!1)}}},events:function(){return{focused:!1,blured:!0,dropImage:!1,stopChanges:!1,stopDetectChanges:function(){this.events.stopChanges=!0},startDetectChanges:function(){var t=this;setTimeout(function(){t.events.stopChanges=!1},1)},dragover:function(t){t.preventDefault(),"IMG"===t.target.tagName&&g(t.target).addClass("redactor-image-dragover")},dragleave:function(t){this.core.editor().find("img").removeClass("redactor-image-dragover")},drop:function(t){return t=t.originalEvent||t,this.core.editor().find("img").removeClass("redactor-image-dragover"),"inline"===this.opts.type||"pre"===this.opts.type?(t.preventDefault(),!1):void 0===window.FormData||!t.dataTransfer||(0===t.dataTransfer.files.length?this.events.onDrop(t):(this.events.onDropUpload(t),void this.core.callback("drop",t)))},click:function(t){var e=this.core.getEvent(),i="click"!==e&&"arrow"!==e&&"click";this.core.addEvent(i),this.utils.disableSelectAll(),this.core.callback("click",t)},focus:function(t){var e,i;this.rtePaste||(this.events.isCallback("focus")&&this.core.callback("focus",t),this.events.focused=!0,(this.events.blured=!1)===this.selection.current()&&(e=this.selection.get(),(i=this.selection.range(e)).setStart(this.core.editor()[0],0),i.setEnd(this.core.editor()[0],0),this.selection.update(e,i)))},blur:function(t){this.start||this.rtePaste||0===g(t.target).closest("#"+this.core.id()+", .redactor-toolbar, .redactor-dropdown, #redactor-modal-box").length&&(!this.events.blured&&this.events.isCallback("blur")&&this.core.callback("blur",t),this.events.focused=!1,this.events.blured=!0)},touchImageEditing:function(){var t=-1;this.events.imageEditing=!1,g(window).on("touchmove.redactor."+this.uuid,g.proxy(function(){this.events.imageEditing=!0,-1!==t&&clearTimeout(t),t=setTimeout(g.proxy(function(){this.events.imageEditing=!1},this),500)},this))},init:function(){this.core.editor().on("dragover.redactor dragenter.redactor",g.proxy(this.events.dragover,this)),this.core.editor().on("dragleave.redactor",g.proxy(this.events.dragleave,this)),this.core.editor().on("drop.redactor",g.proxy(this.events.drop,this)),this.core.editor().on("click.redactor",g.proxy(this.events.click,this)),this.core.editor().on("paste.redactor",g.proxy(this.paste.init,this)),this.core.editor().on("keydown.redactor",g.proxy(this.keydown.init,this)),this.core.editor().on("keyup.redactor",g.proxy(this.keyup.init,this)),this.core.editor().on("focus.redactor",g.proxy(this.events.focus,this)),g(document).on("mousedown.redactor-blur."+this.uuid,g.proxy(this.events.blur,this)),this.events.touchImageEditing(),this.events.createObserver(),this.events.setupObserver()},createObserver:function(){var e=this;this.events.observer=new MutationObserver(function(t){t.forEach(g.proxy(e.events.iterateObserver,e))})},iterateObserver:function(t){var e=!1;("textarea"!==this.opts.type&&"div"!==this.opts.type||this.detect.isFirefox()||t.target!==this.core.editor()[0])&&("class"!==t.attributeName||t.target!==this.core.editor()[0])&&"data-vivaldi-spatnav-clickable"!=t.attributeName||(e=!0),e||(this.observe.load(),this.events.changeHandler())},setupObserver:function(){this.events.observer.observe(this.core.editor()[0],{attributes:!0,subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0})},changeHandler:function(){this.events.stopChanges||this.code.sync()},onDropUpload:function(t){if(t.preventDefault(),t.stopPropagation(),(this.opts.dragImageUpload||this.opts.dragFileUpload)&&(null!==this.opts.imageUpload||null!==this.opts.fileUpload)){"IMG"===t.target.tagName&&(this.events.dropImage=t.target);for(var e=t.dataTransfer.files,i=e.length,r=0;r<i;r++)this.upload.directUpload(e[r],t)}},onDrop:function(t){this.core.callback("drop",t)},isCallback:function(t){return void 0!==this.opts.callbacks[t]&&g.isFunction(this.opts.callbacks[t])},stopDetect:function(){this.events.stopDetectChanges()},startDetect:function(){this.events.startDetectChanges()}}},file:function(){return{is:function(){},show:function(){},insert:function(){},release:function(){},text:function(t){}}},focus:function(){return{start:function(){var t;this.core.editor().focus(),"inline"===this.opts.type||!1!==(t=this.focus.first())&&this.caret.start(t)},end:function(){this.core.editor().focus();var t,e,i,r=this.opts.inline?this.core.editor():this.focus.last();0!==r.length&&(t=this.focus.lastChild(r),this.detect.isWebkit()||!1===t?(e=this.selection.get(),null!==(i=this.selection.range(e))?(i.selectNodeContents(r[0]),i.collapse(!1),this.selection.update(e,i)):this.caret.end(r)):this.caret.end(t))},first:function(){var t=this.core.editor().children().first();return(0!==t.length||0!==t[0].length&&"BR"!==t[0].tagName&&"HR"!==t[0].tagName&&3!==t[0].nodeType)&&("UL"===t[0].tagName||"OL"===t[0].tagName?t.find("li").first():t)},last:function(){return this.core.editor().children().last()},lastChild:function(t){var e=t[0].lastChild;return!(null===e||!this.utils.isInlineTag(e.tagName))&&e},is:function(){return this.core.editor()[0]===document.activeElement}}},image:function(){return{is:function(){return!(!this.opts.imageUpload||!this.opts.imageUpload&&!this.opts.s3)},show:function(){this.modal.load("image",this.lang.get("image"),700),this.upload.init("#redactor-modal-image-droparea",this.opts.imageUpload,this.image.insert),this.modal.show()},insert:function(t,e,i){if(void 0!==t.error)return this.modal.close(),this.events.dropImage=!1,void this.core.callback("imageUploadError",t,i);if(!1!==this.events.dropImage)return r=g(this.events.dropImage),this.core.callback("imageDelete",r[0].src,r),r.attr("src",t.url),this.events.dropImage=!1,void this.core.callback("imageUpload",r,t);var r,n=g("<"+this.opts.imageTag+">");(r=g("<img>")).attr("src",t.url);var s=void 0===t.id?"":t.id,o=void 0===t.s3?"image":"s3";r.attr("data-"+o,s),n.append(r);var a,l,c=this.utils.isTag(this.selection.current(),"pre");e?(this.marker.remove(),a=this.insert.nodeToPoint(i,this.marker.get()),l=g(a).next(),this.selection.restore(),this.buffer.set(),void 0!==l&&0!==l.length&&"IMG"===l[0].tagName?(this.core.callback("imageDelete",l[0].src,l),l.closest("figure, p",this.core.editor()[0]).replaceWith(n)):c?g(c).after(n):this.insert.node(n)):(this.modal.close(),this.buffer.set(),c?g(c).after(n):this.insert.node(n)),this.caret.after(n),this.events.dropImage=!1;var h=r[0].nextSibling,d=n.next(),u=g(h).text().replace(/\u200B/g,""),p=d.text().replace(/\u200B/g,"");""===u&&g(h).remove(),1===d.length&&"FIGURE"===d[0].tagName&&""===p&&d.remove(),null!==e?this.core.callback("imageUpload",r,t):this.core.callback("imageInserted",r,t)},setEditable:function(e){var t;e.on("dragstart",function(t){t.preventDefault()}),this.opts.imageResizable?(t=g.proxy(function(t){this.observe.image=e,this.image.resizer=this.image.loadEditableControls(e),g(document).on("mousedown.redactor-image-resize-hide."+this.uuid,g.proxy(this.image.hideResize,this)),this.image.resizer&&this.image.resizer.on("mousedown.redactor touchstart.redactor",g.proxy(function(t){this.image.setResizable(t,e)},this))},this),e.off("mousedown.redactor").on("mousedown.redactor",g.proxy(this.image.hideResize,this)),e.off("click.redactor touchstart.redactor").on("click.redactor touchstart.redactor",t)):e.off("click.redactor touchstart.redactor").on("click.redactor touchstart.redactor",g.proxy(function(t){setTimeout(g.proxy(function(){this.image.showEdit(e)},this),200)},this))},setResizable:function(t,e){t.preventDefault(),this.image.resizeHandle={x:t.pageX,y:t.pageY,el:e,ratio:e.width()/e.height(),h:e.height()},(t=t.originalEvent||t).targetTouches&&(this.image.resizeHandle.x=t.targetTouches[0].pageX,this.image.resizeHandle.y=t.targetTouches[0].pageY),this.image.startResize()},startResize:function(){g(document).on("mousemove.redactor-image-resize touchmove.redactor-image-resize",g.proxy(this.image.moveResize,this)),g(document).on("mouseup.redactor-image-resize touchend.redactor-image-resize",g.proxy(this.image.stopResize,this))},moveResize:function(t){t.preventDefault(),t=t.originalEvent||t;var e=this.image.resizeHandle.h;t.targetTouches?e+=t.targetTouches[0].pageY-this.image.resizeHandle.y:e+=t.pageY-this.image.resizeHandle.y;var i=Math.round(e*this.image.resizeHandle.ratio);e<50||i<100||this.core.editor().width()<=i||(this.image.resizeHandle.el.attr({width:i,height:e}),this.image.resizeHandle.el.width(i),this.image.resizeHandle.el.height(e),this.code.sync())},stopResize:function(){this.handle=!1,g(document).off(".redactor-image-resize"),this.image.hideResize()},hideResize:function(t){var e;t&&0!==g(t.target).closest("#redactor-image-box",this.$editor[0]).length||(t&&"IMG"==t.target.tagName&&g(t.target),0!==(e=this.$editor.find("#redactor-image-box")).length&&(g("#redactor-image-editter").remove(),g("#redactor-image-resizer").remove(),e.find("img").css({marginTop:e[0].style.marginTop,marginBottom:e[0].style.marginBottom,marginLeft:e[0].style.marginLeft,marginRight:e[0].style.marginRight}),e.css("margin",""),e.find("img").css("opacity",""),e.replaceWith(function(){return g(this).contents()}),g(document).off("mousedown.redactor-image-resize-hide."+this.uuid),void 0!==this.image.resizeHandle&&this.image.resizeHandle.el.attr("rel",this.image.resizeHandle.el.attr("style"))))},loadResizableControls:function(t,e){if(!this.opts.imageResizable||this.detect.isMobile())return e.append(t),!1;var i=g('<span id="redactor-image-resizer" data-redactor="verified"></span>');return this.detect.isDesktop()||i.css({width:"15px",height:"15px"}),i.attr("contenteditable",!1),e.append(i),e.append(t),i},loadEditableControls:function(t){if(0===g("#redactor-image-box").length){var e,i=g('<span id="redactor-image-box" data-redactor="verified">');return i.css("float",t.css("float")).attr("contenteditable",!1),"auto"!=t[0].style.margin?(i.css({marginTop:t[0].style.marginTop,marginBottom:t[0].style.marginBottom,marginLeft:t[0].style.marginLeft,marginRight:t[0].style.marginRight}),t.css("margin","")):i.css({display:"block",margin:"auto"}),t.css("opacity",".5").after(i),this.opts.imageEditable&&(this.image.editter=g('<span id="redactor-image-editter" data-redactor="verified">'+this.lang.get("edit")+"</span>"),this.image.editter.attr("contenteditable",!1),this.image.editter.on("click",g.proxy(function(){this.image.showEdit(t)},this)),i.append(this.image.editter),e=this.image.editter.innerWidth(),this.image.editter.css("margin-left","-"+e/2+"px")),this.image.loadResizableControls(t,i)}},showEdit:function(t){var e,i,r,n,s;this.events.imageEditing||(e=(this.observe.image=t).closest("a",this.$editor[0]),r=0!==(i=t.closest("figure",this.$editor[0])).length?i:t,this.modal.load("image-edit",this.lang.get("edit"),705),this.image.buttonDelete=this.modal.getDeleteButton().text(this.lang.get("delete")),this.image.buttonSave=this.modal.getActionButton().text(this.lang.get("save")),this.image.buttonDelete.on("click",g.proxy(this.image.remove,this)),this.image.buttonSave.on("click",g.proxy(this.image.update,this)),!1===this.opts.imageCaption?g("#redactor-image-caption").val("").hide().prev().hide():0!==(n=t.closest(this.opts.imageTag,this.$editor[0]).find("figcaption"))&&g("#redactor-image-caption").val(n.text()).show(),this.opts.imagePosition?(s=(0!==i.length?"center"===r.css("text-align"):"block"==r.css("display")&&"none"==r.css("float"))?"center":r.css("float"),g("#redactor-image-align").val(s)):g(".redactor-image-position-option").hide(),g("#redactor-image-preview").html(g('<img src="'+t.attr("src")+'" style="max-width: 100%;">')),g("#redactor-image-title").val(t.attr("alt")),0!==e.length&&(g("#redactor-image-link").val(e.attr("href")),"_blank"===e.attr("target")&&g("#redactor-image-link-blank").prop("checked",!0)),g(".redactor-link-tooltip").remove(),this.modal.show(),this.detect.isDesktop()&&g("#redactor-image-title").focus())},update:function(){var t=this.observe.image,e=t.closest("a",this.core.editor()[0]),i=g("#redactor-image-title").val().replace(/(<([^>]+)>)/gi,"");t.attr("alt",i).attr("title",i),this.image.setFloating(t);var r,n,s,o,a,l=g.trim(g("#redactor-image-link").val()).replace(/(<([^>]+)>)/gi,"");""!==l?(r="((xn--)?[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}",n=new RegExp("^(http|ftp|https)://"+r,"i"),s=new RegExp("^"+r,"i"),-1===l.search(n)&&0===l.search(s)&&this.opts.linkProtocol&&(l=this.opts.linkProtocol+"://"+l),o=!!g("#redactor-image-link-blank").prop("checked"),0===e.length?(a=g('<a href="'+l+'" id="redactor-img-tmp">'+this.utils.getOuterHtml(t)+"</a>"),o&&a.attr("target","_blank"),t=t.replaceWith(a),(e=this.core.editor().find("#redactor-img-tmp")).removeAttr("id")):(e.attr("href",l),o?e.attr("target","_blank"):e.removeAttr("target"))):0!==e.length&&e.replaceWith(this.utils.getOuterHtml(t)),this.image.addCaption(t,e),this.modal.close(),this.buffer.set()},setFloating:function(t){var e=t.closest("figure",this.$editor[0]),i=0!==e.length?e:t,r="",n="",s="",o="";switch(g("#redactor-image-align").val()){case"left":r="left",s="0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin+" 0";break;case"right":r="right",s="0 0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin;break;case"center":0!==e.length?o="center":(n="block",s="auto")}i.css({float:r,display:n,margin:s,"text-align":o}),i.attr("rel",t.attr("style"))},addCaption:function(t,e){var i=g("#redactor-image-caption").val(),r=0!==e.length?e:t,n=r.next();0!==n.length&&"FIGCAPTION"===n[0].tagName||(n=!1),""!==i?!1===n?(n=g("<figcaption />").text(i),r.after(n)):n.text(i):!1!==n&&n.remove()},remove:function(t,e,i){e=void 0===e?g(this.observe.image):e,"boolean"!=typeof t&&this.buffer.set(),this.events.stopDetectChanges();var r,n,s=e.closest("a",this.core.editor()[0]),o=e.closest(this.opts.imageTag,this.core.editor()[0]);e.parent();if(!1===this.core.callback("imageDelete",t,e[0]))return t&&t.preventDefault(),!1;0!==g("#redactor-image-box").length&&g("#redactor-image-box").parent(),0!==o.length?(n=o.prev(),r=o.next(),o.remove()):0!==s.length?(s.parent(),s.remove()):e.remove(),g("#redactor-image-box").remove(),!1!==t&&(r&&0!==r.length?this.caret.start(r):n&&0!==n.length&&this.caret.end(n)),"boolean"!=typeof t&&this.modal.close(),this.utils.restoreScroll(),this.observe.image=!1,this.events.startDetectChanges(),this.code.sync()}}},indent:function(){return{increase:function(){var t,e,i,r,n,s;this.list.get()&&(e=(t=g(this.selection.current()).closest("li")).closest("ul, ol",this.core.editor()[0]),0!==(i=t.closest("li").prev()).length&&"LI"===i[0].tagName&&(this.buffer.set(),this.utils.isCollapsed()?(n=e[0].tagName,s=g("<"+n+" />"),this.selection.save(),1===(r=i.find("ol").first()).length?r.append(t):(n=e[0].tagName,(s=g("<"+n+" />")).append(t),i.append(s))):(document.execCommand("indent"),this.selection.save(),this.indent.removeEmpty(),this.indent.normalize()),this.selection.restore()))},decrease:function(){if(this.list.get()){g(this.selection.current()).closest("li").closest("ul, ol",this.core.editor()[0]);this.buffer.set(),document.execCommand("outdent");var t=g(this.selection.current()).closest("li",this.core.editor()[0]);this.utils.isCollapsed()&&this.indent.repositionItem(t);var e=null;if(0===t.length){var i=this.selection.block();if(i&&-1!==i.nodeName.indexOf("-")){for(this.selection.save(),e=elCreate("div");i.childNodes.length;)e.appendChild(i.childNodes[0]);i.appendChild(e),this.selection.restore()}document.execCommand("formatblock",!1,"p");var r=(t=g(this.selection.current())).next();0!==r.length&&"BR"===r[0].tagName&&r.remove()}if(this.selection.save(),null!==e){for(var n=e.parentNode;e.childNodes.length;)n.insertBefore(e.childNodes[0],e);n.removeChild(e)}this.indent.removeEmpty(),this.indent.normalize(),this.selection.restore()}},repositionItem:function(t){var e=t.next();0===e.length||"UL"===e[0].tagName&&"OL"===e[0].tagName||t.append(e);var i=t.prev();0!==i.length&&"LI"!==i[0].tagName&&(this.selection.save(),t.parents("li",this.core.editor()[0]).after(t),this.selection.restore())},normalize:function(){this.core.editor().find("li").each(g.proxy(function(t,e){var i=g(e),r="";0!==this.opts.keepStyleAttr.length&&(r=","+this.opts.keepStyleAttr.join(",")),i.find(this.opts.inlineTags.join(",")).not("img"+r).removeAttr("style");var n,s=i.parent();0===s.length||"LI"!==s[0].tagName?0===(n=i.next()).length||"UL"!==n[0].tagName&&"OL"!==n[0].tagName||i.append(n):s.after(i)},this))},removeEmpty:function(t){var e=this.core.editor().find("ul, ol"),i=this.core.editor().find("li");i.each(g.proxy(function(t,e){this.indent.removeItemEmpty(e)},this)),e.each(g.proxy(function(t,e){this.indent.removeItemEmpty(e)},this)),i.each(g.proxy(function(t,e){this.indent.removeItemEmpty(e)},this))},removeItemEmpty:function(t){""===t.innerHTML.replace(/[\t\s\n]/g,"").replace(/<span><\/span>/g,"")&&g(t).remove()}}},inline:function(){return{format:function(t,e,i,r){var n;this.utils.isCurrentOrParent(["PRE","CODE"])||(n=this.inline.getParams(e,i,r),t=this.inline.arrangeTag(t),this.buffer.set(),this.utils.isCollapsed()?this.inline.formatCollapsed(t,n):this.inline.formatUncollapsed(t,n))},formatCollapsed:function(t,e){var i,r,n,s=this.selection.inline();s?(r=s.tagName.toLowerCase())===t?this.utils.isEmpty(s.innerHTML)?(this.caret.after(s),g(s).remove()):(n=this.inline.insertBreakpoint(s,r),this.caret.after(n)):0===g(s).closest(t).length?(i=this.inline.insertInline(t),i=this.inline.setParams(i,e)):(n=this.inline.insertBreakpoint(s,r),this.caret.after(n)):(i=this.inline.insertInline(t),i=this.inline.setParams(i,e))},formatUncollapsed:function(n,s){this.selection.save();var t=this.inline.getClearedNodes();this.inline.setNodesStriked(t,n,s),this.selection.restore(),document.execCommand("strikethrough"),this.selection.saveInstant();for(var e,i,r=this.core.editor()[0].querySelectorAll('[style*="line-through"]'),o=0,a=r.length;o<a;o++)e=r[0],i=document.createElement("strike"),e.parentNode.insertBefore(i,e),i.appendChild(e),e.style.removeProperty("text-decoration");var l=this;this.core.editor().find("strike").each(function(){var t=l.utils.replaceToTag(this,n);l.inline.setParams(t[0],s);var e=t.find(n),i=t.parent(),r=i.parent();if(0!==r.length&&r[0].tagName.toLowerCase()===n&&r.html()==i[0].outerHTML)return t.replaceWith(function(){return g(this).contents()}),void r.replaceWith(function(){return g(this).contents()});0!==e.length&&l.inline.cleanInsideOrParent(e,s),i.html()==t[0].outerHTML&&l.inline.cleanInsideOrParent(i,s),l.detect.isFirefox()&&l.core.editor().find(n+":empty").remove()}),this.selection.restoreInstant()},cleanInsideOrParent:function(t,e){if(e)for(var i in e.data)this.inline.removeSpecificAttr(t,i,e.data[i])},getClearedNodes:function(){for(var t=this.selection.nodes(),e=[],i=t.length,r=0,n=0;n<i;n++)if(g(t[n]).hasClass("redactor-selection-marker")){r=n+2;break}for(n=0;n<i;n++)r<=n&&!this.utils.isBlockTag(t[n].tagName)&&e.push(t[n]);return e},isConvertableAttr:function(t,e,i){var r=g(t).attr(e);if(r)if("style"===e){for(var n=(i=g.trim(i).replace(/;$/,"")).split(";"),s=0,o=0;o<n.length;o++){var a,l=n[o].split(":"),c=g.trim(l[0]),h=g.trim(l[1]);-1!==c.search(/color/)?!(a=g(t).css(c))||a!==h&&this.utils.rgb2hex(a)!==h||s++:g(t).css(c)===h&&s++}if(s===n.length)return 1}else if(r===i)return 1;return 0},isConvertable:function(t,e,i,r){if(e===i){if(!r)return!0;var n=0;for(var s in r.data)n+=this.inline.isConvertableAttr(t,s,r.data[s]);if(n===Object.keys(r.data).length)return!0}return!1},setNodesStriked:function(t,e,i){for(var r=0;r<t.length;r++){var n=t[r].tagName?t[r].tagName.toLowerCase():void 0,s=t[r].parentNode,o=s&&s.tagName?s.tagName.toLowerCase():void 0;this.inline.isConvertable(s,o,e,i)&&g(s).replaceWith(function(){return g("<strike>").append(g(this).contents())}).attr("data-redactor-inline-converted"),this.inline.isConvertable(t[r],n,e,i)&&g(t[r]).replaceWith(function(){return g("<strike>").append(g(this).contents())})}},insertBreakpoint:function(t,e){var i=document.createElement("span");i.id="redactor-inline-breakpoint",i=this.insert.node(i);var r=this.utils.isEndOfElement(t)?"":"<"+e+">",n=(n=this.utils.getOuterHtml(t)).replace(/<span id="redactor-inline-breakpoint"><\/span>/i,"</"+e+">"+r),s=g(n);return g(t).replaceWith(s),r&&this.utils.cloneAttributes(t,s.last()),s.first()},insertInline:function(t){var e=document.createElement(t);return this.insert.node(e),this.caret.start(e),e},arrangeTag:function(t){var e=["b","bold","i","italic","underline","strikethrough","deleted","superscript","subscript"],i=["strong","strong","em","em","u","del","del","sup","sub"];t=t.toLowerCase();for(var r=0;r<e.length;r++)t===e[r]&&(t=i[r]);return t},getStyleParams:function(t){for(var e={},i=t.trim().replace(/;$/,"").split(";"),r=0;r<i.length;r++){var n=i[r].split(":");n&&(e[n[0].trim()]=n[1].trim())}return e},getParams:function(t,e,i){var r=!1,n="toggle";return"object"==typeof t?(r=t,n=void 0!==e?e:n):void 0!==t&&void 0!==e&&((r={})[t]=e,n=void 0!==i?i:n),!!r&&{func:n,data:r}},setParams:function(t,e){if(e)for(var i in e.data){var r=g(t);"style"===i?(t=this.inline[e.func+"Style"](e.data[i],t),r.attr("data-redactor-style-cache",r.attr("style"))):t="class"===i?this.inline[e.func+"Class"](e.data[i],t):"remove"===e.func?this.inline[e.func+"Attr"](i,t):this.inline[e.func+"Attr"](i,e.data[i],t),"style"===i&&"SPAN"===t.tagName&&r.attr("data-redactor-span",!0)}return t},eachInline:function(t,e){var i,r=void 0===t?this.selection.inlines():[t];if(r)for(var n=0;n<r.length;n++)i=e(r[n])[0];return i},replaceClass:function(e,t){return this.inline.eachInline(t,function(t){return g(t).removeAttr("class").addClass(e)})},toggleClass:function(e,t){return this.inline.eachInline(t,function(t){return g(t).toggleClass(e)})},addClass:function(e,t){return this.inline.eachInline(t,function(t){return g(t).addClass(e)})},removeClass:function(e,t){return this.inline.eachInline(t,function(t){return g(t).removeClass(e)})},removeAllClass:function(t){return this.inline.eachInline(t,function(t){return g(t).removeAttr("class")})},replaceAttr:function(e,t,i){return this.inline.eachInline(i,function(t){return g(t).removeAttr(e).attr(e.value)})},toggleAttr:function(e,t,i){return this.inline.eachInline(i,function(t){return g(t).attr(e)?g(t).removeAttr(e):g(t).attr(e.value)})},addAttr:function(e,i,t){return this.inline.eachInline(t,function(t){return g(t).attr(e,i)})},removeAttr:function(i,t){return this.inline.eachInline(t,function(t){var e=g(t);return e.removeAttr(i),"style"===i&&e.removeAttr("data-redactor-style-cache"),e})},removeAllAttr:function(t){return this.inline.eachInline(t,function(t){for(var e=g(t),i=t.attributes.length,r=0;r<i;r++)e.removeAttr(t.attributes[r].name);return e})},removeSpecificAttr:function(t,e,i){var r,n=g(t);"style"===e?(r=i.split(":")[0].trim(),n.css(r,""),this.utils.removeEmptyAttr(t,"style")&&n.removeAttr("data-redactor-style-cache")):n.removeAttr(e)[0]},hasParentStyle:function(t){var e=t.parent();return 1===e.length&&e[0].tagName===t[0].tagName&&e.html()===t[0].outerHTML&&e},addParentStyle:function(t){var e,i=this.inline.hasParentStyle(t);return i?(e=this.inline.getStyleParams(t.attr("style")),i.css(e),i.attr("data-redactor-style-cache",i.attr("style")),t.replaceWith(function(){return g(this).contents()})):t.attr("data-redactor-style-cache",t.attr("style")),t},replaceStyle:function(r,t){r=this.inline.getStyleParams(r);var n=this;return this.inline.eachInline(t,function(t){var e=g(t);e.removeAttr("style").css(r);var i=e.attr("style");return i&&e.attr("style",i.replace(/"/g,"'")),e=n.inline.addParentStyle(e)})},toggleStyle:function(o,t){o=this.inline.getStyleParams(o);var a=this;return this.inline.eachInline(t,function(t){var e=g(t);for(var i in o){var r=o[i],n=e.css(i);(n=a.utils.isRgb(n)?a.utils.rgb2hex(n):n.replace(/"/g,""))===(r=a.utils.isRgb(r)?a.utils.rgb2hex(r):r.replace(/"/g,""))?e.css(i,""):e.css(i,r)}var s=e.attr("style");return s&&e.attr("style",s.replace(/"/g,"'")),a.utils.removeEmptyAttr(t,"style")?e.removeAttr("data-redactor-style-cache"):e=a.inline.addParentStyle(e),e})},addStyle:function(r,t){r=this.inline.getStyleParams(r);var n=this;return this.inline.eachInline(t,function(t){var e=g(t);e.css(r);var i=e.attr("style");return i&&e.attr("style",i.replace(/"/g,"'")),e=n.inline.addParentStyle(e)})},removeStyle:function(r,t){r=this.inline.getStyleParams(r);var n=this;return this.inline.eachInline(t,function(t){var e=g(t);for(var i in r)e.css(i,"");return n.utils.removeEmptyAttr(t,"style")?e.removeAttr("data-redactor-style-cache"):e.attr("data-redactor-style-cache",e.attr("style")),e})},removeAllStyle:function(t){return this.inline.eachInline(t,function(t){return g(t).removeAttr("style").removeAttr("data-redactor-style-cache")})},removeStyleRule:function(t){var e=this.selection.parent(),i=this.selection.inlines();this.buffer.set(),e&&"SPAN"===e.tagName&&this.inline.removeStyleRuleAttr(g(e),t);for(var r=0;r<i.length;r++){var n=i[r],s=g(n);-1==g.inArray(n.tagName.toLowerCase(),this.opts.inlineTags)||s.hasClass("redactor-selection-marker")||this.inline.removeStyleRuleAttr(s,t)}},removeStyleRuleAttr:function(t,e){t.css(e,""),this.utils.removeEmptyAttr(t,"style")?t.removeAttr("data-redactor-style-cache"):t.attr("data-redactor-style-cache",t.attr("style"))},update:function(t,e,i,r){t=this.inline.arrangeTag(t);var n=this.inline.getParams(e,i,r),s=this.selection.inlines(),o=[];if(s)for(var a=0;a<s.length;a++){var l=s[a];"*"!==t&&l.tagName.toLowerCase()!==t||o.push(this.inline.setParams(l,n))}return o},removeFormat:function(){this.selection.save();for(var t=this.inline.getClearedNodes(),e=0;e<t.length;e++)1===t[e].nodeType&&g(t[e]).replaceWith(function(){return g(this).contents()});this.selection.restore()}}},insert:function(){return{set:function(t){this.code.set(t),this.focus.end()},html:function(t,e){this.core.editor().focus();var i=this.selection.block(),r=this.selection.inline();void 0===e&&(e=this.clean.getCurrentType(t,!0),t=this.clean.onPaste(t,e,!0)),t=g.parseHTML(t);var n,s,o,a=g(t).last(),l=this.selection.get(),c=this.selection.range(l);if(c.deleteContents(),this.selection.update(l,c),e.lists){var h=g(t);if(0!==h.length&&("UL"===h[0].tagName||"OL"===h[0].tagName))return void this.insert.appendLists(i,h)}e.blocks&&i?this.utils.isSelectAll()?(this.core.editor().html(t),this.focus.end()):!1===(n=this.utils.breakBlockTag())?this.insert.placeHtml(t):(g(t).children().last().append(this.marker.get()),"start"===n.type?n.$block.before(t):n.$block.after(t),this.selection.restore(),this.core.editor().find("p").each(function(){""===g.trim(this.innerHTML)&&g(this).remove()})):(r&&((s=g("<div/>").html(t)).find(r.tagName.toLowerCase()).each(function(){g(this).contents().unwrap()}),t=s.html(),t=g.parseHTML(t),a=g(t).last()),this.utils.isSelectAll()?(o=g(this.opts.emptyHtml),this.core.editor().html("").append(o),o.html(t),this.caret.end(o)):this.insert.placeHtml(t)),this.utils.disableSelectAll(),e.pre&&this.clean.cleanPre(),this.caret.end(a)},text:function(t){t=t.toString(),t=g.trim(t);var e,i,r,n,s,o=document.createElement("div");o.innerHTML=t,void 0!==(t=o.textContent||o.innerText)&&(this.core.editor().focus(),e=this.selection.blocks(),t=t.replace(/\n/g," "),this.utils.isSelectAll()?(i=g(this.opts.emptyHtml),this.core.editor().html("").append(i),i.html(t),this.caret.end(i)):(r=this.selection.get(),n=document.createTextNode(t),r.getRangeAt&&r.rangeCount&&((s=r.getRangeAt(0)).deleteContents(),s.insertNode(n),s.setStartAfter(n),s.collapse(!0),this.selection.update(r,s)),1<e.length&&(g(n).wrap("<p>"),this.caret.after(n))),this.utils.disableSelectAll(),this.clean.normalizeCurrentHeading())},raw:function(t){this.core.editor().focus();var e=this.selection.get(),i=this.selection.range(e);i.deleteContents();var r=document.createElement("div");r.innerHTML=t;for(var n,s,o=document.createDocumentFragment();n=r.firstChild;)s=o.appendChild(n);i.insertNode(o),s&&((i=i.cloneRange()).setStartAfter(s),i.collapse(!0),e.removeAllRanges(),e.addRange(i))},node:function(t,e){void 0!==this.start&&this.core.editor().focus(),t=t[0]||t;var i,r=this.selection.block(),n=this.utils.isBlockTag(t.tagName),s=!0;return this.utils.isSelectAll()?(n?this.core.editor().html(t):this.core.editor().html(g("<p>").html(t)),this.code.sync()):n&&r?!1===(i=this.utils.breakBlockTag())?this.insert.placeNode(t,e):("start"===i.type?i.$block.before(t):i.$block.after(t),this.core.editor().find("p:empty").remove()):s=this.insert.placeNode(t,e),this.utils.disableSelectAll(),s&&this.caret.end(t),t},appendLists:function(t,e){var i,r,n=g(t),s=this.utils.isEmpty(t.innerHTML);s||this.utils.isEndOfElement(t)?(i=n,e.find("li").each(function(){i.after(this),i=g(this)}),s&&n.remove()):this.utils.isStartOfElement(t)?e.find("li").each(function(){n.before(this),i=g(this)}):(r=this.selection.extractEndOfNode(t),n.after(g("<li>").append(r)),n.append(e),i=e),this.marker.remove(),i&&this.caret.end(i)},placeHtml:function(t){var e=document.createElement("span");e.id="redactor-insert-marker",e=this.insert.node(e),g(e).before(t),this.selection.restore(),this.caret.after(e),g(e).remove()},placeNode:function(t,e){var i=this.selection.get(),r=this.selection.range(i);if(null==r)return!1;!1!==e&&r.deleteContents(),r.insertNode(t),r.collapse(!1),this.selection.update(i,r)},nodeToPoint:function(t,e){if(e=e[0]||e,this.utils.isEmpty())return e=this.utils.isBlock(e)?e:g("<p />").append(e),this.core.editor().html(e),e;var i,r,n,s=t.clientX,o=t.clientY;return document.caretPositionFromPoint?(i=document.caretPositionFromPoint(s,o),(r=document.getSelection().getRangeAt(0)).setStart(i.offsetNode,i.offset),r.collapse(!0),r.insertNode(e)):document.caretRangeFromPoint?(r=document.caretRangeFromPoint(s,o)).insertNode(e):void 0!==document.body.createTextRange&&((r=document.body.createTextRange()).moveToPoint(s,o),(n=r.duplicate()).moveToPoint(s,o),r.setEndPoint("EndToEnd",n),r.select()),e},nodeToCaretPositionFromPoint:function(t,e){this.insert.nodeToPoint(t,e)},marker:function(){this.marker.insert()}}},keydown:function(){return{init:function(t){if(!this.rtePaste){var e=t.which,i=37<=e&&e<=40;if(this.keydown.ctrl=t.ctrlKey||t.metaKey,this.keydown.parent=this.selection.parent(),this.keydown.current=this.selection.current(),this.keydown.block=this.selection.block(),this.keydown.pre=this.utils.isTag(this.keydown.current,"pre"),this.keydown.blockquote=this.utils.isTag(this.keydown.current,"blockquote"),this.keydown.figcaption=this.utils.isTag(this.keydown.current,"figcaption"),this.keydown.figure=this.utils.isTag(this.keydown.current,"figure"),!1===this.core.callback("keydown",t))return t.preventDefault(),!1;if(this.shortcuts.init(t,e),this.keydown.checkEvents(i,e),this.keydown.setupBuffer(t,e),this.utils.isSelectAll()&&(e===this.keyCode.ENTER||e===this.keyCode.BACKSPACE||e===this.keyCode.DELETE))return t.preventDefault(),this.code.set(this.opts.emptyHtml),void this.events.changeHandler();if(this.keydown.addArrowsEvent(i),this.keydown.setupSelectAll(t,e),this.opts.enterKey||e!==this.keyCode.ENTER){if(this.opts.enterKey&&e===this.keyCode.DOWN&&this.keydown.onArrowDown(),this.opts.enterKey&&e===this.keyCode.UP&&this.keydown.onArrowUp(),("textarea"===this.opts.type||"div"===this.opts.type)&&this.keydown.current&&3===this.keydown.current.nodeType&&g(this.keydown.parent).hasClass("redactor-in")&&this.keydown.wrapToParagraph(),!this.keyup.lastShiftKey&&e===this.keyCode.SPACE&&(t.ctrlKey||t.shiftKey))return t.preventDefault(),this.keydown.onShiftSpace();if(e===this.keyCode.ENTER&&(t.ctrlKey||t.shiftKey)&&(null===h||"ios"!==h.platform()))return t.preventDefault(),this.keydown.onShiftEnter(t);if(e===this.keyCode.ENTER&&!t.shiftKey&&!t.ctrlKey&&!t.metaKey)return this.keydown.onEnter(t);if(e===this.keyCode.TAB||t.metaKey&&221===e||t.metaKey&&219===e)return this.keydown.onTab(t,e);if(this.detect.isFirefox()&&e===this.keyCode.BACKSPACE&&this.keydown.block&&"P"===this.keydown.block.tagName&&this.utils.isStartOfElement(this.keydown.block))if(0!==(r=g(this.keydown.block).prev()).length)return t.preventDefault(),r.append(this.marker.get()),r.append(g(this.keydown.block).html()),g(this.keydown.block).remove(),void this.selection.restore();if(e===this.keyCode.BACKSPACE||e===this.keyCode.DELETE){if(this.observe.image&&void 0!==this.observe.image&&0!==g("#redactor-image-box").length){t.preventDefault();var r=this.observe.image.closest("figure, p").prev();return this.image.remove(!1),this.observe.image=!1,void(r&&0!==r.length?this.caret.end(r):this.core.editor().focus())}this.keydown.onBackspaceAndDeleteBefore()}if(e===this.keyCode.DELETE){var n=g(this.keydown.block).next();if(this.utils.isEndOfElement(this.keydown.block)&&0!==n.length&&"FIGURE"===n[0].tagName)return n.remove(),!1;if(!(!this.keydown.block||"LI"!==this.keydown.block.tagName)&&this.keydown.block){var s=g(this.keydown.block).parents("ul, ol").last(),o=s.next();if(this.utils.isRedactorParent(s)&&this.utils.isEndOfElement(s)&&0!==o.length&&("UL"===o[0].tagName||"OL"===o[0].tagName))return t.preventDefault(),s.append(o.contents()),o.remove(),!1}if(this.utils.isEndOfElement(this.keydown.block)&&0!==n.length&&"PRE"===n[0].tagName)return g(this.keydown.block).append(n.text()),n.remove(),!1}if(e===this.keyCode.DELETE&&0!==g("#redactor-image-box").length&&this.image.remove(),e===this.keyCode.BACKSPACE){if(this.detect.isFirefox()&&this.line.removeOnBackspace(t),this.list.combineAfterAndBefore(this.keydown.block))return void t.preventDefault();var a=this.selection.block();if(a&&"LI"===a.tagName&&this.utils.isCollapsed()&&this.utils.isStartOfElement())return this.indent.decrease(),void t.preventDefault();this.keydown.removeInvisibleSpace(),this.keydown.removeEmptyListInTable(t)}e!==this.keyCode.BACKSPACE&&e!==this.keyCode.DELETE||this.keydown.onBackspaceAndDeleteAfter(t)}else{t.preventDefault();var l=this.selection.get(),c=this.selection.range(l);c.collapsed||c.deleteContents()}}},onShiftSpace:function(){return this.buffer.set(),this.insert.raw("&nbsp;"),!1},onShiftEnter:function(t){return this.buffer.set(),this.keydown.pre?this.keydown.insertNewLine(t):this.insert.raw("<br>")},onBackspaceAndDeleteBefore:function(){this.utils.saveScroll()},onBackspaceAndDeleteAfter:function(e){setTimeout(g.proxy(function(){this.code.syncFire=!1,this.keydown.removeEmptyLists();var t="";0!==this.opts.keepStyleAttr.length&&(t=","+this.opts.keepStyleAttr.join(",")),this.core.editor().find("*[style]").not("img, figure, iframe, #redactor-image-box, #redactor-image-editter, [data-redactor-style-cache], [data-redactor-span]"+t).removeAttr("style"),this.keydown.formatEmpty(e),this.code.syncFire=!0},this),1)},onEnter:function(t){if(!1===this.core.callback("enter",t))return t.preventDefault(),!1;if(this.keydown.blockquote&&!0===this.keydown.exitFromBlockquote(t))return!1;if(this.keydown.pre)return this.keydown.insertNewLine(t);if(this.keydown.blockquote||this.keydown.figcaption)return this.keydown.insertBreakLine(t);if(this.keydown.figure)setTimeout(g.proxy(function(){this.keydown.replaceToParagraph("FIGURE")},this),1);else if(this.keydown.block){if(setTimeout(g.proxy(function(){this.keydown.replaceToParagraph("DIV")},this),1),"LI"===this.keydown.block.tagName){var e=this.selection.current(),i=g(e).closest("li",this.$editor[0]),r=i.parents("ul,ol",this.$editor[0]).last();if(0!==i.length&&this.utils.isEmpty(i.html())&&0===r.next().length&&this.utils.isEmpty(r.find("li").last().html())){r.find("li").last().remove();var n=g(this.opts.emptyHtml);return r.after(n),this.caret.start(n),!1}}}else if(!this.keydown.block)return this.keydown.insertParagraph(t);this.detect.isFirefox()&&this.utils.isInline(this.keydown.parent)?this.keydown.insertBreakLine(t):this.opts.keepInlineOnEnter||setTimeout(g.proxy(function(){var t,e,i,r,n=this.selection.inline();n&&this.utils.isEmpty(n.innerHTML)&&(t=this.selection.block(),g(n).remove(),(e=document.createRange()).setStart(t,0),i=document.createTextNode("​"),e.insertNode(i),e.setStartAfter(i),e.collapse(!0),(r=window.getSelection()).removeAllRanges(),r.addRange(e))},this),1)},checkEvents:function(t,e){t||"click"!==this.core.getEvent()&&"arrow"!==this.core.getEvent()||(this.core.addEvent(!1),this.keydown.checkKeyEvents(e)&&this.buffer.set())},checkKeyEvents:function(t){var e=this.keyCode,i=[e.BACKSPACE,e.DELETE,e.ENTER,e.ESC,e.TAB,e.CTRL,e.META,e.ALT,e.SHIFT];return-1===g.inArray(t,i)},addArrowsEvent:function(t){t&&("click"!==this.core.getEvent()&&"arrow"!==this.core.getEvent()?this.core.addEvent("arrow"):this.core.addEvent(!1))},setupBuffer:function(t,e){return this.keydown.ctrl&&90===e&&!t.shiftKey&&!t.altKey&&this.sBuffer.length?(t.preventDefault(),void this.buffer.undo()):this.keydown.ctrl&&90===e&&t.shiftKey&&!t.altKey&&0!==this.sRebuffer.length?(t.preventDefault(),void this.buffer.redo()):void(this.keydown.ctrl||e!==this.keyCode.SPACE&&e!==this.keyCode.BACKSPACE&&e!==this.keyCode.DELETE&&(e!==this.keyCode.ENTER||t.ctrlKey||t.shiftKey)||this.buffer.set())},exitFromBlockquote:function(t){if(this.utils.isEndOfElement(this.keydown.blockquote)&&-1!==this.clean.removeSpacesHard(g(this.keydown.blockquote).html()).search(/(<br\s?\/?>){1}$/i)){t.preventDefault(),g(this.keydown.blockquote).children().last().filter("br").remove(),g(this.keydown.blockquote).children().last().filter("span").remove();var e=g(this.opts.emptyHtml);return g(this.keydown.blockquote).after(e),this.caret.start(e),!0}},onArrowDown:function(){for(var t=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],e=0;e<t.length;e++)if(t[e])return this.keydown.insertAfterLastElement(t[e]),!1},onArrowUp:function(){for(var t=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],e=0;e<t.length;e++)if(t[e])return this.keydown.insertBeforeFirstElement(t[e]),!1},insertAfterLastElement:function(t){var e,i;this.utils.isEndOfElement(t)&&(e=this.core.editor().contents().last(),0===("FIGCAPTION"===t.tagName?g(this.keydown.block).parent().next():g(this.keydown.block).next()).length&&(0!==e.length||e[0]===t?(i=g(this.opts.emptyHtml),"FIGCAPTION"===t.tagName?g(t).parent().after(i):g(t).after(i),this.caret.start(i)):this.caret.start(e)))},insertBeforeFirstElement:function(t){var e;this.utils.isStartOfElement()&&(1<this.core.editor().contents().length&&this.core.editor().contents().first()[0]!==t||(e=g(this.opts.emptyHtml),g(t).before(e),this.caret.start(e)))},onTab:function(t,e){if(!this.opts.tabKey)return!0;var i=this.keydown.block&&"LI"===this.keydown.block.tagName;if(this.utils.isEmpty(this.code.get())||!i&&!this.keydown.pre&&!1===this.opts.tabAsSpaces)return!0;t.preventDefault(),this.buffer.set();var r,n=i&&this.utils.isStartOfElement(this.keydown.block);return this.keydown.pre&&!t.shiftKey?(r=this.opts.preSpaces?document.createTextNode(Array(this.opts.preSpaces+1).join(" ")):document.createTextNode("\t"),this.insert.node(r)):!1===this.opts.tabAsSpaces||n?t.metaKey&&219===e||(!t.metaKey||221!==e)&&t.shiftKey?this.indent.decrease():this.indent.increase():(r=document.createTextNode(Array(this.opts.tabAsSpaces+1).join(" ")),this.insert.node(r)),!1},setupSelectAll:function(t,e){this.keydown.ctrl&&65===e?this.utils.enableSelectAll():e===this.keyCode.LEFT_WIN||this.keydown.ctrl||this.utils.disableSelectAll()},insertNewLine:function(t){t.preventDefault();var e=document.createTextNode("\n"),i=this.selection.get(),r=this.selection.range(i);return r.deleteContents(),r.insertNode(e),this.caret.after(e),!1},insertParagraph:function(t){t.preventDefault();var e=document.createElement("p");e.innerHTML="<br>";var i=this.selection.get(),r=this.selection.range(i);return r.deleteContents(),r.insertNode(e),this.caret.start(e),!1},insertBreakLine:function(t){return this.keydown.insertBreakLineProcessing(t)},insertDblBreakLine:function(t){return this.keydown.insertBreakLineProcessing(t,!0)},insertBreakLineProcessing:function(t,e){t.stopPropagation();var i,r=document.createElement("br");return this.insert.node(r),!0===e?(i=document.createElement("br"),this.insert.node(i),this.caret.after(i)):this.caret.after(r),!1},wrapToParagraph:function(){var t=g(this.keydown.current),e=g("<p>").append(t.clone());t.replaceWith(e);var i=g(e).next();void 0!==i[0]&&"BR"===i[0].tagName&&i.remove(),this.caret.end(e)},replaceToParagraph:function(t){var i=this.selection.block(),e=g(i).prev(),r=i.innerHTML.replace(/<br\s?\/?>/gi,"");if(i.tagName===t&&this.utils.isEmpty(r)&&!g(i).hasClass("redactor-in")){var n=document.createElement("p");return g(i).replaceWith(n),this.keydown.setCaretToParagraph(n),!1}if("P"===i.tagName)return g(i).removeAttr("class").removeAttr("style"),this.detect.isIe()&&this.utils.isEmpty(r)&&this.utils.isInline(this.keydown.parent)&&g(i).on("input",g.proxy(function(){var t,e=this.selection.parent();this.utils.isInline(e)&&(t=g(e).html(),g(i).html(t),this.caret.end(i)),g(i).off("keyup")},this)),!1;if(e.hasClass(this.opts.videoContainerClass)){e.removeAttr("class");n=document.createElement("p");return e.replaceWith(n),this.keydown.setCaretToParagraph(n),!1}},setCaretToParagraph:function(t){var e=document.createRange();e.setStart(t,0);var i=document.createTextNode("​");e.insertNode(i),e.setStartAfter(i),e.collapse(!0);var r=window.getSelection();r.removeAllRanges(),r.addRange(e)},removeInvisibleSpace:function(){var t=g(this.keydown.current);0===t.text().search(/^\u200B$/g)&&t.remove()},removeEmptyListInTable:function(t){var e=g(this.keydown.current),i=g(this.keydown.parent),r=e.closest("td",this.$editor[0]);if(0!==r.length&&e.closest("li",this.$editor[0])&&1===i.children("li").length){if(!this.utils.isEmpty(e.text()))return;t.preventDefault(),e.remove(),i.remove(),this.caret.start(r)}},removeEmptyLists:function(){function t(){""===g.trim(this.innerHTML).replace(/\/t\/n/g,"")&&g(this).remove()}this.core.editor().find("li").each(t),this.core.editor().find("ul, ol").each(t)},formatEmpty:function(t){var e,i=g.trim(this.core.editor().html());if(this.utils.isEmpty(i))return t.preventDefault(),"inline"===this.opts.type||"pre"===this.opts.type?(this.core.editor().html(this.marker.html()),this.selection.restore()):(e=function(){this.core.editor().html(this.opts.emptyHtml),this.focus.start()}.bind(this),null!==h&&"ios"===h.platform()?setTimeout(e,50):e()),!1}}},keyup:function(){return{init:function(t){if(!this.rtePaste){var e,i=t.which;if(this.keyup.block=this.selection.block(),this.keyup.current=this.selection.current(),this.keyup.parent=this.selection.parent(),this.keyup.lastShiftKey=t.shiftKey,!1===this.core.callback("keyup",t))return t.preventDefault(),!1;if(i===this.keyCode.ENTER&&this.keyup.block&&"FIGURE"===this.keyup.block.tagName){var r=g(this.keyup.block).prev();if(0!==r.length&&"FIGURE"===r[0].tagName){var n=this.utils.replaceToTag(r,"p");return void this.caret.start(n)}}if(i===this.keyCode.BACKSPACE||i===this.keyCode.DELETE){if(this.utils.isSelectAll())return void this.focus.start();if(this.keyup.block&&this.keydown.block&&"FIGURE"===this.keyup.block.tagName&&this.utils.isStartOfElement(this.keydown.block)){t.preventDefault(),this.selection.save(),g(this.keyup.block).find("figcaption").remove(),g(this.keyup.block).find("img").first().remove(),this.utils.replaceToTag(this.keyup.block,"p");var s=this.marker.find();return g("html, body").animate({scrollTop:s.position().top+20},500),void this.selection.restore()}this.keyup.block&&"P"===this.keyup.block.tagName&&(e=g(this.keyup.block).find("img").length,""===g(this.keyup.block).text().replace(/\u200B/g,"")&&0!==e&&this.utils.replaceToTag(this.keyup.block,"figure")),this.keyup.block&&"FIGURE"===this.keyup.block.tagName&&0===g(this.keyup.block).find("img").length&&(this.selection.save(),this.utils.replaceToTag(this.keyup.block,"p"),this.selection.restore())}}}}},lang:function(){return{load:function(){this.opts.curLang=this.opts.langs[this.opts.lang]},get:function(t){return void 0!==this.opts.curLang[t]?this.opts.curLang[t]:""}}},line:function(){return{insert:function(){this.buffer.set(),this.insert.html(this.line.getLineHtml());var t=this.core.editor().find("#redactor-hr-tmp-id");return t.removeAttr("id"),this.core.callback("insertedLine",t),t},getLineHtml:function(){var t='<hr id="redactor-hr-tmp-id" />';return!this.detect.isFirefox()&&this.utils.isEmpty()&&(t+="<p>"+this.opts.emptyHtml+"</p>"),t},removeOnBackspace:function(t){var e,i;this.utils.isCollapsed()&&(0===(e=g(this.selection.block())).length||!this.utils.isStartOfElement(e)||(i=e.prev())&&0!==i.length&&"HR"===i[0].tagName&&(t.preventDefault(),i.remove()))}}},link:function(){return{get:function(){return g(this.selection.inlines("a"))},is:function(){var t=this.selection.nodes(),e=g(this.selection.current()).closest("a",this.core.editor()[0]);return!(0===e.length||1<t.length)&&e},unlink:function(t){void 0!==t&&t.preventDefault&&t.preventDefault(),this.buffer.set();var e,i=this.selection.inlines("a");0!==i.length&&(e=this.link.replaceLinksToText(i),this.observe.closeAllTooltip(),this.core.callback("deletedLink",e))},insert:function(t,e){var i,r=this.link.is();return(!0===e||!1!==(t=this.link.buildLinkFromObject(r,t)))&&(this.buffer.set(),t=this.core.callback("beforeInsertingLink",t),!1===r?(r=g("<a />"),r=this.link.update(r,t),i=(r=g(this.insert.node(r))).parent(),!1===this.utils.isRedactorParent(i)&&r.wrap("<p>"),i.hasClass("redactor-unlink")&&i.replaceWith(function(){return g(this).contents()}),this.caret.after(r),this.core.callback("insertedLink",r)):(r=this.link.update(r,t),this.caret.after(r)),r)},update:function(t,e){return t.text(e.text),t.attr("href",e.url),this.link.target(t,e.target),t},target:function(t,e){return e?t.attr("target","_blank"):t.removeAttr("target")},show:function(t){void 0!==t&&t.preventDefault&&t.preventDefault(),this.observe.closeAllTooltip();var e=this.link.is();this.link.buildModal(e);var i=this.link.buildLinkFromElement(e);i.url=this.link.removeSelfHostFromUrl(i.url),this.opts.linkNewTab&&!e&&(i.target=!0),this.link.setModalValues(i),this.modal.show(),this.detect.isDesktop()&&g("#redactor-link-url").focus()},setModalValues:function(t){g("#redactor-link-blank").prop("checked",t.target),g("#redactor-link-url").val(t.url),g("#redactor-link-url-text").val(t.text)},buildModal:function(t){this.modal.load("link",this.lang.get(!1===t?"link-insert":"link-edit"),600),this.modal.getActionButton().text(this.lang.get(!1===t?"insert":"save")).on("click",g.proxy(this.link.callback,this))},callback:function(){var t=this.link.buildLinkFromModal();if(!1===t)return!1;this.modal.close(),this.link.insert(t,!0)},cleanUrl:function(t){return void 0===t?"":g.trim(t.replace(/[^\W\w\D\d+&\'@#/%?=~_|!:,.;\(\)]/gi,""))},cleanText:function(t){return void 0===t?"":g.trim(t.replace(/(<([^>]+)>)/gi,""))},getText:function(t){return""===t.text&&""!==t.url?this.link.truncateUrl(t.url.replace(/<|>/g,"")):t.text},isUrl:function(t){return!!new RegExp("^((https?|ftp):\\/\\/)?(([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(t)&&t},isMailto:function(t){return-1!==t.search("@")&&!1===/(http|ftp|https):\/\//i.test(t)},isEmpty:function(t){return""===t.url||""===t.text&&""===t.url},truncateUrl:function(t){return t.length>this.opts.linkSize?t.substring(0,this.opts.linkSize)+"...":t},parse:function(t){return this.link.isMailto(t.url)?t.url="mailto:"+t.url.replace("mailto:",""):0!==t.url.search("#")&&this.opts.linkValidation&&(t.url=this.link.isUrl(t.url)?"http://"+t.url.replace(/(ftp|https?):\/\//gi,""):t.url),!this.link.isEmpty(t)&&!1!==t.url&&t},buildLinkFromModal:function(){var t={};return t.url=this.link.cleanUrl(g("#redactor-link-url").val()),t.text=this.link.cleanText(g("#redactor-link-url-text").val()),t.text=this.link.getText(t),t.target=!!g("#redactor-link-blank").prop("checked"),this.link.parse(t)},buildLinkFromObject:function(t,e){return e.url=this.link.cleanUrl(e.url),e.text=void 0===e.text&&this.selection.is()?this.selection.text():this.link.cleanText(e.text),e.text=this.link.getText(e),e.target=!1===t?e.target:this.link.buildTarget(t),this.link.parse(e)},buildLinkFromElement:function(t){var e={url:"",text:this.selection.is()?this.selection.text():"",target:!1};return!1!==t&&(e.url=t.attr("href"),e.text=t.text(),e.target=this.link.buildTarget(t)),e},buildTarget:function(t){return void 0!==t.attr("target")&&"_blank"===t.attr("target")},removeSelfHostFromUrl:function(t){var e=self.location.href.replace("#","").replace(/\/$/i,"");return t.replace(/^\/\#/,"#").replace(e,"").replace("mailto:","")},replaceLinksToText:function(t){var n,e=g.each(t,function(t,e){var i=g(e),r=g('<span class="redactor-unlink" />').append(i.contents());return i.replaceWith(r),0===t&&(n=r),i});return 1===t.length&&this.selection.isCollapsed()&&this.caret.after(n),e}}},linkify:function(){return{isKey:function(){},isLink:function(){},isFiltered:function(){},handler:function(){},format:function(){},convertVideoLinks:function(){},convertImages:function(){},convertLinks:function(){}}},list:function(){return{toggle:function(t){if(!this.utils.inBlocks(["table","td","th","tr"])){t=(t="unorderedlist"===(t="orderedlist"===t?"ol":t)?"ul":t).toLowerCase(),this.buffer.set(),this.selection.save();var e=this.list._getBlocks(),i=this.selection.block(),r=g(i).parents("ul, ol").last();return 0===e.length&&0!==r.length&&(e=[r.get(0)]),e=this.list._isUnformat(t,e)?this.list._unformat(t,e):this.list._format(t,e),this.selection.restore(),e}},get:function(){var t=this.selection.current(),e=g(t).closest("ul, ol",this.core.editor()[0]);return 0!==e.length&&e},combineAfterAndBefore:function(t){var e=g(t).prev(),i=g(t).next(),r=t&&"P"===t.tagName&&("<br>"===t.innerHTML||""===t.innerHTML),n=1===e.closest("ol, ul",this.core.editor()[0]).length&&1===i.closest("ol, ul",this.core.editor()[0]).length;return!(!r||!n)&&(e.children("li").last().append(this.marker.get()),e.append(i.contents()),this.selection.restore(),!0)},_getBlocks:function(){for(var t=[],e=this.selection.blocks(),i=0;i<e.length;i++){g(e[i]).parent().hasClass("redactor-in")&&t.push(e[i])}return t},_isUnformat:function(t,e){for(var i,r=0,n=0;n<e.length;n++){3!==e[n].nodeType&&((i=e[n].tagName.toLowerCase())!==t&&"figure"!==i||r++)}return r===e.length},_uniteBlocks:function(t,e){for(var i=0,r={0:[]},n=!1,s=0;s<t.length;s++){var o=g(t[s]).closest("th, td");0!==o.length?(o.get(0)!==n&&(r[++i]=[]),this.list._isUniteBlock(t[s],e)&&r[i].push(t[s])):this.list._isUniteBlock(t[s],e)?r[i].push(t[s]):r[++i]=[],n=o.get()}return r},_isUniteBlock:function(t,e){return 3===t.nodeType||-1!==e.indexOf(t.tagName.toLowerCase())},_createList:function(t,e,i){var r=e[e.length-1],n=g(r),s=g("<"+t+">");return n.after(s),s},_createListItem:function(t){var e,i=g("<li>");return 3===t.nodeType?i.append(t):(e=g(t),i.append(e.contents()),e.remove()),i},_format:function(t,e){var i=this.list._uniteBlocks(e,["p","div","blockquote","pre","h1","h2","h3","h4","h5","h6","ul","ol"]),r=[];for(var n in i){for(var s=i[n],o=this.list._createList(t,i[n]),a=0;a<s.length;a++){var l=3===s[a].nodeType||"UL"!==s[a].tagName&&"OL"!==s[a].tagName?this.list._createListItem(s[a]):g(s[a]).contents();o.append(l)}r.push(o.get(0))}return r},_unformat:function(t,e){if(1===e.length){var i=g(e[0]),r=i.find("li"),n=this.selection.blocks(["li"]),s=this.selection.block(),o=g(s).closest("li");if(0===n.length&&0!==o.length&&(n=[o.get(0)]),n.length===r.length)return this.list._unformatEntire(e[0]);var a=this.list._getItemsPosition(r,n);if("Top"===a)return this.list._unformatAtSide("before",n,i);if("Bottom"===a)return n.reverse(),this.list._unformatAtSide("after",n,i);if("Middle"===a){var l=g(n[n.length-1]),c=!1,h=!1,d=g("<"+i.get(0).tagName.toLowerCase()+">");r.each(function(t,e){var i;c&&((i=g(e)).children("ul, ol").length,0!==i.closest(".redactor-split-item").length||!1!==h&&0!==i.closest(h).length||i.addClass("redactor-split-item"),h=i),e===l.get(0)&&(c=!0)}),r.filter(".redactor-split-item").each(function(t,e){g(e).removeClass("redactor-split-item"),d.append(e)}),i.after(d),n.reverse();for(var u=0;u<n.length;u++){var p=g(n[u]),f=this.list._createUnformatContainer(p);i.after(f),f.find("ul, ol").remove(),p.remove()}return}}else for(u=0;u<e.length;u++)3!==e[u].nodeType&&e[u].tagName.toLowerCase()===t&&this.list._unformatEntire(e[u])},_unformatEntire:function(t){var n=g(t);n.find("li").each(function(t,e){var i=g(e),r=this.list._createUnformatContainer(i);i.remove(),n.before(r)}.bind(this)),n.remove()},_unformatAtSide:function(t,n,e){for(var i=0;i<n.length;i++){var r=g(n[i]),s=this.list._createUnformatContainer(r);e[t](s);var o=s.find("ul, ol").first();r.append(o),o.each(function(t,e){var i=g(e),r=i.closest("li");r.get(0)===n[t]&&(i.unwrap(),r.addClass("r-unwrapped"))}),this.utils.isEmpty(r.html())&&r.remove()}e.find(".r-unwrapped").each(function(t){var e=g(t);""===e.html().trim()?e.remove():e.removeClass("r-unwrapped")})},_getItemsPosition:function(t,e){var i="Middle",r=e[0],n=e[e.length-1],s=t.first().get(0),o=t.last().get(0);return s===r&&o!==n?i="Top":s!==r&&o===n&&(i="Bottom"),i},_createUnformatContainer:function(t){var e=g("<p>");return e.append(t.contents()),e}}},marker:function(){return{get:function(t){t=void 0===t?1:t;var e=document.createElement("span");return e.id="selection-marker-"+t,e.className="redactor-selection-marker",e.innerHTML=this.opts.invisibleSpace,e},html:function(t){return this.utils.getOuterHtml(this.marker.get(t))},find:function(t){return t=void 0===t?1:t,this.core.editor().find("span#selection-marker-"+t)},insert:function(){var t=this.selection.get(),e=this.selection.range(t);this.marker.insertNode(e,this.marker.get(1),!0),e&&!1===e.collapsed&&this.marker.insertNode(e,this.marker.get(2),!1)},remove:function(){this.core.editor().find(".redactor-selection-marker").each(this.marker.iterateRemove)},insertNode:function(t,e,i){var r=this.selection.parent();if(null!==t&&0!==g(r).closest(".redactor-in").length){t=t.cloneRange();try{t.collapse(i),t.insertNode(e)}catch(t){this.focus.start()}}},iterateRemove:function(t,e){var i=g(e),r=i.text().replace(/\u200B/g,"");i.parent()[0];""===r?i.remove():i.replaceWith(function(){return g(this).contents()})}}},modal:function(){return{callbacks:{},templates:function(){this.opts.modal={"image-edit":"",image:"",file:"",link:String()+'<div class="redactor-modal-tab" data-title="General"><section><label>URL</label><input type="url" id="redactor-link-url" aria-label="URL" /></section><section><label>'+this.lang.get("text")+'</label><input type="text" id="redactor-link-url-text" aria-label="'+this.lang.get("text")+'" /></section><section><label class="checkbox"><input type="checkbox" id="redactor-link-blank"> '+this.lang.get("link-in-new-tab")+'</label></section><section><button id="redactor-modal-button-action">'+this.lang.get("insert")+'</button><button id="redactor-modal-button-cancel">'+this.lang.get("cancel")+"</button></section></div>"},g.extend(this.opts,this.opts.modal)},addCallback:function(t,e){this.modal.callbacks[t]=e},addTemplate:function(t,e){this.opts.modal[t]=e},getTemplate:function(t){return this.opts.modal[t]},getModal:function(){return this.$modalBody},getActionButton:function(){return this.$modalBody.find("#redactor-modal-button-action")},getCancelButton:function(){return this.$modalBody.find("#redactor-modal-button-cancel")},getDeleteButton:function(){return this.$modalBody.find("#redactor-modal-button-delete")},load:function(){},show:function(){},buildWidth:function(){},buildTabber:function(){},showTab:function(){},setTitle:function(){},setContent:function(){this.$modalBody.html(this.modal.getTemplate(this.modal.templateName)),this.modal.getCancelButton().on("mousedown",g.proxy(this.modal.close,this))},setDraggable:function(){},setEnter:function(){},build:function(){this.modal.buildOverlay(),this.$modalBox=g('<div id="redactor-modal-box"/>').hide(),this.$modal=g('<div id="redactor-modal" role="dialog" />'),this.$modalHeader=g('<div id="redactor-modal-header" />'),this.$modalClose=g('<button type="button" id="redactor-modal-close" aria-label="'+this.lang.get("close")+'" />').html("&times;"),this.$modalBody=g('<div id="redactor-modal-body" />'),this.$modal.append(this.$modalHeader),this.$modal.append(this.$modalBody),this.$modal.append(this.$modalClose),this.$modalBox.append(this.$modal),this.$modalBox.appendTo(document.body)},buildOverlay:function(){this.$modalOverlay=g('<div id="redactor-modal-overlay">').hide(),g("body").prepend(this.$modalOverlay)},enableEvents:function(){},disableEvents:function(){},closeHandler:function(){},close:function(){}}},observe:function(){return{load:function(){void 0===this.opts.destroyed&&(this.observe.links(),this.observe.images())},isCurrent:function(t,e){return void 0===e&&(e=g(this.selection.current())),e.is(t)||0<e.parents(t).length},toolbar:function(){this.observe.buttons(),this.observe.dropdowns()},buttons:function(t,e){var n=this.selection.current(),s=this.selection.parent();!1!==t?this.button.setInactiveAll():this.button.setInactiveAll(e),!1!==t||"html"===e?this.utils.isRedactorParent(n)&&("none"!==this.core.editor().css("display")&&(this.utils.isCurrentOrParentHeader()||this.utils.isCurrentOrParent(["table","pre","blockquote","li"])?this.button.disable("horizontalrule"):this.button.enable("horizontalrule")),g.each(this.opts.activeButtonsStates,g.proxy(function(t,e){var i=g(s).closest(t,this.$editor[0]),r=g(n).closest(t,this.$editor[0]);(0===i.length||this.utils.isRedactorParent(i))&&this.utils.isRedactorParent(r)&&(0===i.length&&0===r.closest(t,this.$editor[0]).length||this.button.setActive(e))},this))):-1!==g.inArray(e,this.opts.activeButtons)&&this.button.toggleActive(e)},dropdowns:function(){var a=g("<div />").html(this.selection.html()).find("a").length,l=g(this.selection.current()),c=this.utils.isRedactorParent(l);g.each(this.opts.observe.dropdowns,g.proxy(function(t,e){var i=e.observe,r=i.element,n=e.item,s=void 0!==i.in&&i.in,o=void 0!==i.out&&i.out;0<l.closest(r).length&&c||"a"===r&&0!==a?this.observe.setDropdownProperties(n,s,o):this.observe.setDropdownProperties(n,o,s)},this))},setDropdownProperties:function(t,e,i){i&&void 0!==i.attr&&this.observe.setDropdownAttr(t,i.attr,!0),void 0!==e.attr&&this.observe.setDropdownAttr(t,e.attr),void 0!==e.title&&t.find("span").text(e.title)},setDropdownAttr:function(i,t,r){g.each(t,function(t,e){"class"===t?r?i.removeClass(e):i.addClass(e):r?i.removeAttr(t):i.attr(t,e)})},addDropdown:function(t,e,i){void 0!==i.observe&&(i.item=t,this.opts.observe.dropdowns.push(i))},images:function(){this.opts.imageEditable&&(this.core.editor().addClass("redactor-layer-img-edit"),this.core.editor().find("img").each(g.proxy(function(t,e){var i=g(e);i.closest("a",this.$editor[0]).on("click",function(t){t.preventDefault()}),this.image.setEditable(i)},this)))},links:function(){this.opts.linkTooltip&&this.core.editor().find("a").each(g.proxy(function(t,e){var i=g(e);!0!==i.data("cached")&&(i.data("cached",!0),i.on("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,g.proxy(this.observe.showTooltip,this)))},this))},getTooltipPosition:function(t){return t.offset()},showTooltip:function(t){var e,i,r,n,s,o,a,l,c,h,d=g(t.target);"IMG"!==d[0].tagName&&("A"!==d[0].tagName&&(d=d.closest("a",this.$editor[0])),"A"===d[0].tagName&&(e=d,i=this.observe.getTooltipPosition(e),r=g('<span class="redactor-link-tooltip"></span>'),void 0===(n=e.attr("href"))&&(n=""),24<n.length&&(n=n.substring(0,24)+"..."),s=g('<a href="'+e.attr("href")+'" target="_blank" />').html(n).addClass("redactor-link-tooltip-action"),o=g('<a href="#" />').html(this.lang.get("edit")).on("click",g.proxy(this.link.show,this)).addClass("redactor-link-tooltip-action"),a=g('<a href="#" />').html(this.lang.get("unlink")).on("click",g.proxy(this.link.unlink,this)).addClass("redactor-link-tooltip-action"),r.append(s).append(" | ").append(o).append(" | ").append(a),l=parseInt(e.css("line-height"),10),c=Math.ceil((t.pageY-i.top)/l),h=i.top+c*l,r.css({top:h+"px",left:i.left+"px"}),g(".redactor-link-tooltip").remove(),g("body").append(r),this.core.editor().on("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,g.proxy(this.observe.closeTooltip,this)),g(document).on("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,g.proxy(this.observe.closeTooltip,this))))},closeAllTooltip:function(){g(".redactor-link-tooltip").remove()},closeTooltip:function(t){var e=(t=t.originalEvent||t).target,i=g(e).closest("a",this.$editor[0]);0!==i.length&&"A"===i[0].tagName&&"A"!==e.tagName||"A"===e.tagName&&this.utils.isRedactorParent(e)||g(e).hasClass("redactor-link-tooltip-action")||(this.observe.closeAllTooltip(),this.core.editor().off("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,g.proxy(this.observe.closeTooltip,this)),g(document).off("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,g.proxy(this.observe.closeTooltip,this)))}}},offset:function(){return{get:function(t){var e=this.offset.clone(t);if(!1===e)return 0;var i=document.createElement("div");return i.appendChild(e.cloneContents()),i.innerHTML=i.innerHTML.replace(/<img(.*?[^>])>$/gi,"i"),g.trim(g(i).text()).replace(/[\t\n\r\n]/g,"").replace(/\u200B/g,"").length},clone:function(t){var e=this.selection.get(),i=this.selection.range(e);if(null===i&&void 0===t)return!1;if(!1===(t=void 0===t?this.$editor:t))return!1;t=t[0]||t;var r=i.cloneRange();return r.selectNodeContents(t),r.setEnd(i.endContainer,i.endOffset),r},set:function(t,e){e=void 0===e?t:e,this.focus.is()||this.focus.start();for(var i,r=this.selection.get(),n=this.selection.range(r),s=0,o=document.createTreeWalker(this.$editor[0],NodeFilter.SHOW_TEXT,null,null);null!==(i=o.nextNode());)if(t<(s+=i.nodeValue.length)&&(n.setStart(i,i.nodeValue.length+t-s),t=1/0),e<=s){n.setEnd(i,i.nodeValue.length+e-s);break}n.collapse(!1),this.selection.update(r,n)}}},paragraphize:function(){return{load:function(t){return!1===this.opts.paragraphize||"inline"===this.opts.type||"pre"===this.opts.type?t:""===t||"<p></p>"===t?this.opts.emptyHtml:(t+="\n",this.paragraphize.safes=[],this.paragraphize.z=0,t=(t=(t=t.replace(/(<br\s?\/?>){1,}\n?<\/blockquote>/gi,"</blockquote>")).replace(/<\/pre>/gi,"</pre>\n\n")).replace(/<p>\s<br><\/p>/gi,"<p></p>"),t=(t=this.paragraphize.getSafes(t)).replace("<br>","\n"),t=this.paragraphize.convert(t),t=this.paragraphize.clear(t),t=(t=this.paragraphize.restoreSafes(t)).replace(new RegExp("<br\\s?/?>\n?<("+this.opts.paragraphizeBlocks.join("|")+")(.*?[^>])>","gi"),"<p><br /></p>\n<$1$2>"),g.trim(t))},getSafes:function(t){var e=g("<div />").append(t);return e.find("blockquote p").replaceWith(function(){return g(this).append("<br />").contents()}),e.find(this.opts.paragraphizeBlocks.join(", ")).each(g.proxy(function(t,e){return this.paragraphize.z++,this.paragraphize.safes[this.paragraphize.z]=e.outerHTML,g(e).replaceWith("\n#####replace"+this.paragraphize.z+"#####\n\n")},this)),e.find("span.redactor-selection-marker").each(g.proxy(function(t,e){return this.paragraphize.z++,this.paragraphize.safes[this.paragraphize.z]=e.outerHTML,g(e).replaceWith("\n#####replace"+this.paragraphize.z+"#####\n\n")},this)),e.html()},restoreSafes:function(i){return g.each(this.paragraphize.safes,function(t,e){e=void 0!==e?e.replace(/\$/g,"&#36;"):e,i=i.replace("#####replace"+t+"#####",e)}),i},convert:function(t){t=(t=(t=(t=t.replace(/\r\n/g,"xparagraphmarkerz")).replace(/\n/g,"xparagraphmarkerz")).replace(/\r/g,"xparagraphmarkerz")).replace(/\s+/g," ");return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t="<p>"+(t=(t=(t=g.trim(t)).replace(/xparagraphmarkerzxparagraphmarkerz/gi,"</p><p>")).replace(/xparagraphmarkerz/gi,"<br>"))+"</p>").replace("<p></p>","")).replace("\r\n\r\n","")).replace(/<\/p><p>/g,"</p>\r\n\r\n<p>")).replace(new RegExp("<br\\s?/?></p>","g"),"</p>")).replace(new RegExp("<p><br\\s?/?>","g"),"<p>")).replace(new RegExp("<p><br\\s?/?>","g"),"<p>")).replace(new RegExp("<br\\s?/?></p>","g"),"</p>")).replace(/<p>&nbsp;<\/p>/gi,"")).replace(/<p>\s?<br>&nbsp;<\/p>/gi,"")).replace(/<p>\s?<br>/gi,"<p>")},clear:function(t){return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<p>(.*?)#####replace(.*?)#####\s?<\/p>/gi,"<p>$1</p>#####replace$2#####")).replace(/(<br\s?\/?>){2,}<\/p>/gi,"</p>")).replace(new RegExp("</blockquote></p>","gi"),"</blockquote>")).replace(new RegExp("<p></blockquote>","gi"),"</blockquote>")).replace(new RegExp("<p><blockquote>","gi"),"<blockquote>")).replace(new RegExp("<blockquote></p>","gi"),"<blockquote>")).replace(new RegExp("<p><p ","gi"),"<p ")).replace(new RegExp("<p><p>","gi"),"<p>")).replace(new RegExp("</p></p>","gi"),"</p>")).replace(new RegExp("<p>\\s?</p>","gi"),"")).replace(new RegExp("\n</p>","gi"),"</p>")).replace(new RegExp("<p>\t?\t?\n?<p>","gi"),"<p>")).replace(new RegExp("<p>\t*</p>","gi"),"")}}},paste:function(){return{init:function(t){this.rtePaste=!0;var r=!("pre"!==this.opts.type&&!this.utils.isCurrentOrParent("pre"));this.detect.isDesktop()&&!this.paste.pre&&this.opts.clipboardImageUpload&&this.opts.imageUpload&&this.paste.detectClipboardUpload(t)?this.detect.isIe()&&setTimeout(g.proxy(this.paste.clipboardUpload,this),100):(this.utils.saveScroll(),this.selection.save(),this.paste.createPasteBox(r),g(window).on("scroll.redactor-freeze",g.proxy(function(){g(window).scrollTop(this.saveBodyScroll)},this)),setTimeout(g.proxy(function(){var t=this.paste.getPasteBoxCode(r);this.buffer.set(),this.selection.restore(),this.utils.restoreScroll();var e=this.clean.getCurrentType(t),t=this.clean.onPaste(t,e),i=this.core.callback("paste",t);t=void 0===i?t:i,this.paste.insert(t,e),this.rtePaste=!1,r&&this.clean.cleanPre(),g(window).off("scroll.redactor-freeze")},this),1))},getPasteBoxCode:function(t){var e=t?this.$pasteBox.val():this.$pasteBox.html();return this.$pasteBox.remove(),e},createPasteBox:function(t){var e={position:"fixed",width:"1px",top:0,left:"-9999px"};this.$pasteBox=t?g("<textarea>").css(e):g("<div>").attr("contenteditable","true").css(e),this.paste.appendPasteBox(),this.$pasteBox.focus()},appendPasteBox:function(){var t;this.detect.isIe()?this.core.box().append(this.$pasteBox):0<(t=g(".modal-body:visible")).length?t.append(this.$pasteBox):g("body").prepend(this.$pasteBox)},detectClipboardUpload:function(t){var e=(t=t.originalEvent||t).clipboardData;if(this.detect.isIe()||this.detect.isFirefox())return!1;if(-1!==e.types.indexOf("public.tiff"))return t.preventDefault(),!1;if(e.items&&e.items.length){var i=e.items[0].getAsFile();if(null===i)return!1;var r=new FileReader;return r.readAsDataURL(i),r.onload=g.proxy(this.paste.insertFromClipboard,this),!0}},clipboardUpload:function(){var t=this.$editor.find("img");g.each(t,g.proxy(function(t,i){var e,r;-1!==i.src.search(/^data\:image/i)&&(e=window.FormData?new FormData:null,window.FormData&&(this.upload.direct=!0,this.upload.type="image",this.upload.url=this.opts.imageUpload,this.upload.callback=g.proxy(function(t){var e;this.detect.isIe()?g(i).wrap(g("<figure />")):(e=g(i).parent(),this.utils.replaceToTag(e,"figure")),i.src=t.url,this.core.callback("imageUpload",g(i),t)},this),r=this.utils.dataURItoBlob(i.src),e.append("clipboard",1),e.append(this.opts.imageUploadParam,r),this.upload.send(e,!1),this.code.sync(),this.rtePaste=!1))},this))},insertFromClipboard:function(t){var e,i=window.FormData?new FormData:null;window.FormData&&(this.upload.direct=!0,this.upload.type="image",this.upload.url=this.opts.imageUpload,this.upload.callback=this.image.insert,e=this.utils.dataURItoBlob(t.target.result),i.append("clipboard",1),i.append(this.opts.imageUploadParam,e),this.upload.send(i,t),this.rtePaste=!1)},insert:function(t,e){e.pre?this.insert.raw(t):e.text?this.insert.text(t):this.insert.html(t,e),this.detect.isFirefox()&&this.opts.imageUpload&&this.opts.clipboardImageUpload&&setTimeout(g.proxy(this.paste.clipboardUpload,this),100)}}},placeholder:function(){return{enable:function(){},show:function(){},update:function(){},hide:function(){},is:function(){},init:function(){},enabled:function(){},enableEvents:function(){},disableEvents:function(){},build:function(){},buildPosition:function(){},getPosition:function(){},isEditorEmpty:function(){},isAttr:function(){},destroy:function(){}}},progress:function(){return{$box:null,$bar:null,target:document.body,show:function(){},hide:function(){},update:function(){},is:function(){},build:function(){},destroy:function(){}}},selection:function(){return{get:function(){return window.getSelection?window.getSelection():document.selection&&"Control"!==document.selection.type?document.selection:null},range:function(t){return void 0===t&&(t=this.selection.get()),t.getRangeAt&&t.rangeCount?t.getRangeAt(0):null},is:function(){return!this.selection.isCollapsed()},isRedactor:function(){var t=this.selection.range();if(null!==t){var e=t.startContainer.parentNode;if(g(e).hasClass("redactor-in")||0!==g(e).parents(".redactor-in").length)return!0}return!1},isCollapsed:function(){var t=this.selection.get();return null!==t&&t.isCollapsed},update:function(t,e){null!==e&&(t.removeAllRanges(),t.addRange(e))},current:function(){var t=this.selection.get();return null!==t&&t.anchorNode},parent:function(){var t=this.selection.current();return null!==t&&t.parentNode},block:function(t){for(t=t||this.selection.current();t;){if(this.utils.isBlockTag(t.tagName))return!g(t).hasClass("redactor-in")&&t;t=t.parentNode}return!1},inline:function(t){for(t=t||this.selection.current();t;){if(this.utils.isInlineTag(t.tagName))return!g(t).hasClass("redactor-in")&&t;t=t.parentNode}return!1},element:function(t){for(t=t||this.selection.current();t;){if(1===t.nodeType)return!g(t).hasClass("redactor-in")&&t;t=t.parentNode}return!1},prev:function(){return null!==this.selection.current()&&this.selection.current().previousSibling},next:function(){return null!==this.selection.current()&&this.selection.current().nextSibling},blocks:function(t){var i=[],e=this.selection.nodes(t);g.each(e,g.proxy(function(t,e){this.utils.isBlock(e)&&i.push(e)},this));var r=this.selection.block();return 0===i.length&&!1===r?[]:0===i.length&&!1!==r?[r]:i},inlines:function(t){var i=[],e=this.selection.nodes(t);g.each(e,g.proxy(function(t,e){this.utils.isInline(e)&&i.push(e)},this));var r=this.selection.inline();return 0===i.length&&!1===r?[]:0===i.length&&!1!==r?[r]:i},nodes:function(t){var r=void 0===t?[]:g.isArray(t)?t:[t],e=this.selection.get(),i=this.selection.range(e),n=[],s=[];if(this.utils.isCollapsed())n=[this.selection.current()];else{var o=i.startContainer,a=i.endContainer;if(o===a)return[o];for(;o&&o!==a;)n.push(o=this.selection.nextNode(o));for(o=i.startContainer;o&&o!==i.commonAncestorContainer;)n.unshift(o),o=o.parentNode}return g.each(n,function(t,e){if(e){var i=1===e.nodeType&&e.tagName.toLowerCase();if(g(e).hasClass("redactor-script-tag")||g(e).hasClass("redactor-selection-marker"))return;if(i&&0!==r.length&&-1===g.inArray(i,r))return;s.push(e)}}),0===s.length?[]:s},nextNode:function(t){if(t.hasChildNodes())return t.firstChild;for(;t&&!t.nextSibling;)t=t.parentNode;return t?t.nextSibling:null},save:function(){this.marker.insert(),this.savedSel=this.core.editor().html()},restore:function(t){var e=this.marker.find(1),i=this.marker.find(2);this.detect.isFirefox()&&this.core.editor().focus(),0!==e.length&&0!==i.length?this.caret.set(e,i):0!==e.length?this.caret.start(e):this.core.editor().focus(),!1!==t&&(this.marker.remove(),this.savedSel=!1)},saveInstant:function(){var t=this.core.editor()[0],e=t.ownerDocument.defaultView.getSelection();if(e.getRangeAt&&e.rangeCount){var i=e.getRangeAt(0),r=i.cloneRange();r.selectNodeContents(t),r.setEnd(i.startContainer,i.startOffset);var n=r.toString().length;return this.saved={start:n,end:n+i.toString().length,node:i.startContainer},this.saved}},restoreInstant:function(t){if(void 0!==t||this.saved){this.saved=void 0!==t?t:this.saved;var e=this.core.editor().find(this.saved.node);if(0===e.length||0!==e.text().trim().replace(/\u200B/g,"").length){var i,r=this.core.editor()[0],n=r.ownerDocument,s=n.defaultView,o=0;(i=n.createRange()).setStart(r,0),i.collapse(!0);for(var a,l,c=[r],h=!1,d=!1;!d&&(a=c.pop());)if(3==a.nodeType){var u=o+a.length;!h&&this.saved.start>=o&&this.saved.start<=u&&(i.setStart(a,this.saved.start-o),h=!0),h&&this.saved.end>=o&&this.saved.end<=u&&(i.setEnd(a,this.saved.end-o),d=!0),o=u}else for(var p=a.childNodes.length;p--;)c.push(a.childNodes[p]);(l=s.getSelection()).removeAllRanges(),l.addRange(i)}else try{(i=document.createRange()).setStart(e[0],0),(l=window.getSelection()).removeAllRanges(),l.addRange(i)}catch(t){}}},node:function(t){g(t).prepend(this.marker.get(1)),g(t).append(this.marker.get(2)),this.selection.restore()},all:function(){this.core.editor().focus();var t=this.selection.get(),e=this.selection.range(t);e.selectNodeContents(this.core.editor()[0]),this.selection.update(t,e)},remove:function(){this.selection.get().removeAllRanges()},replace:function(t){this.insert.html(t)},text:function(){return this.selection.get().toString()},html:function(){var t="",e=this.selection.get();if(e.rangeCount){for(var i=document.createElement("div"),r=e.rangeCount,n=0;n<r;++n)i.appendChild(e.getRangeAt(n).cloneContents());t=this.clean.onGet(i.innerHTML)}return t},extractEndOfNode:function(t){var e=this.selection.get(),i=this.selection.range(e),r=i.cloneRange();return r.selectNodeContents(t),r.setStart(i.endContainer,i.endOffset),r.extractContents()},removeMarkers:function(){this.marker.remove()},marker:function(t){return this.marker.get(t)},markerHtml:function(t){return this.marker.html(t)}}},shortcuts:function(){return{hotkeysSpecialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},hotkeysShiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},init:function(i,t){if(!1===this.opts.shortcuts)return!i.ctrlKey&&!i.metaKey||66!==t&&73!==t||i.preventDefault(),!1;g.each(this.opts.shortcuts,g.proxy(function(t,e){this.shortcuts.build(i,t,e)},this))},build:function(t,e,i){for(var r=g.proxy(function(){this.shortcuts.buildHandler(i)},this),n=e.split(","),s=n.length,o=0;o<s;o++)"string"==typeof n[o]&&this.shortcuts.handler(t,g.trim(n[o]),r)},buildHandler:function(t){var e;"-1"!==t.func.search(/\./)?void 0!==this[(e=t.func.split("."))[0]]&&this[e[0]][e[1]].apply(this,t.params):this[t.func].apply(this,t.params)},handler:function(i,t,e){t=t.toLowerCase().split(" ");var r=this.shortcuts.hotkeysSpecialKeys[i.keyCode],n=String.fromCharCode(i.which).toLowerCase(),s="",o={};g.each(["alt","ctrl","meta","shift"],function(t,e){i[e+"Key"]&&r!==e&&(s+=e+"+")}),r&&(o[s+r]=!0),n&&(o[s+n]=!0,o[s+this.shortcuts.hotkeysShiftNums[n]]=!0,"shift+"===s&&(o[this.shortcuts.hotkeysShiftNums[n]]=!0));for(var a=t.length,l=0;l<a;l++)if(o[t[l]])return i.preventDefault(),e.apply(this,arguments)}}},storage:function(){return{data:[],add:function(){},status:function(){},observe:function(){},changes:function(){}}},toolbar:function(){return{build:function(){this.button.hideButtons(),this.button.hideButtonsOnMobile(),this.$toolbarBox=g('<div class="redactor-toolbar-box" />'),this.$toolbarBox[0].innerHTML='<ul class="redactor-toolbar" id="redactor-toolbar-'+this.uuid+'" role="toolbar"></ul>',this.$toolbar=g(this.$toolbarBox[0].children[0]),this.$box[0].insertBefore(this.$toolbarBox[0],this.$box[0].firstChild),this.button.$toolbar=this.$toolbar,this.button.setFormatting(),this.button.load(this.$toolbar),require(["Core"],function(t){this.$toolbar[0].addEventListener("keydown",this.toolbar.keydown.bind(this,t))}.bind(this))},createContainer:function(){},append:function(){},setOverflow:function(){},setFixed:function(){},setUnfixed:function(){},getBoxTop:function(){},observeScroll:function(){},observeScrollResize:function(){},observeScrollEnable:function(){},observeScrollDisable:function(){},setDropdownsFixed:function(){},unsetDropdownsFixed:function(){},setDropdownPosition:function(){},keydown:function(t,e){var i=document.activeElement;if(i.classList.contains("re-button")){if(-1!==[13,32,35,36,37,39,40].indexOf(e.which)){if(13===e.which||32===e.which)return e.preventDefault(),void require(["Core"],function(t){t.triggerEvent(i,"mousedown")});if(40!==e.which){e.preventDefault();var r,n=Array.prototype.slice.call(elBySelAll(".re-button",this.$toolbar[0])),s=null;null!==(s=35===e.which?n[n.length-1]:36===e.which?n[0]:(r=n.indexOf(i),37===e.which?-1===--r&&(r=n.length-1):39===e.which&&++r===n.length&&(r=0),n[r]))&&s.focus()}else{if("true"!==elAttr(i,"aria-haspopup"))return;e.preventDefault(),t.triggerEvent(i,"mousedown");var o=g(i).data("dropdown"),a=elBySel("li",o[0]);a&&a.focus()}}}}}},upload:function(){return{init:function(){},directUpload:function(){},onDrop:function(){},traverseFile:function(){},setConfig:function(){},getType:function(){},getHiddenFields:function(){},send:function(){},onDrag:function(){},onDragLeave:function(){},clearImageFields:function(){},addImageFields:function(){},removeImageFields:function(){},clearFileFields:function(){},addFileFields:function(){},removeFileFields:function(){}}},uploads3:function(){return{send:function(){},executeOnSignedUrl:function(){},createCORSRequest:function(){},sendToS3:function(){}}},utils:function(){return{isEmpty:function(t){return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=void 0===t?this.core.editor().html():t).replace(/[\u200B-\u200D\uFEFF]/g,"")).replace(/&nbsp;/gi,"")).replace(/<\/?br\s?\/?>/g,"")).replace(/\s/g,"")).replace(/^<p>[^\W\w\D\d]*?<\/p>$/i,"")).replace(/<iframe(.*?[^>])>$/i,"iframe")).replace(/<source(.*?[^>])>$/i,"source")).replace(/<[^\/>][^>]*><\/[^>]+>/gi,"")).replace(/<[^\/>][^>]*><\/[^>]+>/gi,""),""===(t=g.trim(t))},isElement:function(e){try{return e instanceof HTMLElement}catch(t){return"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}},strpos:function(t,e,i){var r=t.indexOf(e,i);return 0<=r&&r},dataURItoBlob:function(t){for(var e=(0<=t.split(",")[0].indexOf("base64")?atob:unescape)(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(e.length),n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return new Blob([r],{type:i})},getOuterHtml:function(t){return g("<div>").append(g(t).eq(0).clone()).html()},cloneAttributes:function(t,e){t=t[0]||t,e=g(e);for(var i=t.attributes,r=i.length;r--;){var n=i[r];e.attr(n.name,n.value)}return e},breakBlockTag:function(){var t=this.selection.block();if(!t)return!1;var e=this.utils.isEmpty(t.innerHTML),i=t.tagName.toLowerCase();if("pre"===i||"li"===i||"td"===i||"th"===i)return!1;if(!e&&this.utils.isStartOfElement(t))return{$block:g(t),$next:g(t).next(),type:"start"};if(!e&&this.utils.isEndOfElement(t))return{$block:g(t),$next:g(t).next(),type:"end"};var r=this.selection.extractEndOfNode(t),n=g("<"+i+" />").append(r),n=this.utils.cloneAttributes(t,n);return g(t).after(n),{$block:g(t),$next:n,type:"break"}},inBlocks:function(t){t=g.isArray(t)?t:[t];for(var e,i=this.selection.blocks(),r=i.length,n=!1,s=0;s<r;s++){!1!==i[s]&&(e=i[s].tagName.toLowerCase(),-1!==g.inArray(e,t)&&(n=!0))}return n},inInlines:function(t){t=g.isArray(t)?t:[t];for(var e=this.selection.inlines(),i=e.length,r=!1,n=0;n<i;n++){var s=e[n].tagName.toLowerCase();-1!==g.inArray(s,t)&&(r=!0)}return r},isTag:function(t,e){var i=g(t).closest(e,this.core.editor()[0]);return 1===i.length&&i[0]},isBlock:function(t){return null!==t&&((t=t[0]||t)&&this.utils.isBlockTag(t.tagName))},isBlockTag:function(t){return void 0!==t&&this.reIsBlock.test(t)},isInline:function(t){return(t=t[0]||t)&&this.utils.isInlineTag(t.tagName)},isInlineTag:function(t){return void 0!==t&&this.reIsInline.test(t)},isRedactorParent:function(t){return!!t&&(0!==g(t).parents(".redactor-in").length&&!g(t).hasClass("redactor-in")&&t)},isCurrentOrParentHeader:function(){return this.utils.isCurrentOrParent(["H1","H2","H3","H4","H5","H6"])},isCurrentOrParent:function(t){var i=this.selection.parent(),r=this.selection.current();if(g.isArray(t)){var n=0;return g.each(t,g.proxy(function(t,e){this.utils.isCurrentOrParentOne(r,i,e)&&n++},this)),0!==n}return this.utils.isCurrentOrParentOne(r,i,t)},isCurrentOrParentOne:function(t,e,i){return i=i.toUpperCase(),e&&e.tagName===i?e:!(!t||t.tagName!==i)&&t},isEditorRelative:function(){var t=this.core.editor().css("position");return-1!==g.inArray(["absolute","fixed","relative"],t)},setEditorRelative:function(){this.core.editor().addClass("redactor-relative")},getScrollTarget:function(){var t=g(this.opts.scrollTarget);return 0!==t.length?t:g(document)},freezeScroll:function(){this.freezeScrollTop=this.utils.getScrollTarget().scrollTop(),this.utils.getScrollTarget().scrollTop(this.freezeScrollTop)},unfreezeScroll:function(){void 0!==this.freezeScrollTop&&this.utils.getScrollTarget().scrollTop(this.freezeScrollTop)},saveScroll:function(){this.tmpScrollTop=this.utils.getScrollTarget().scrollTop()},restoreScroll:function(){void 0!==this.tmpScrollTop&&this.utils.getScrollTarget().scrollTop(this.tmpScrollTop)},isStartOfElement:function(t){return!(void 0===t&&!(t=this.selection.block()))&&0===this.offset.get(t)},isEndOfElement:function(t){if(void 0===t&&!(t=this.selection.block()))return!1;var e=g.trim(g(t).text()).replace(/[\t\n\r\n]/g,"").replace(/\u200B/g,"");return this.offset.get(t)===e.length},removeEmptyAttr:function(t,e){var i=g(t);return void 0===i.attr(e)||""===i.attr(e)&&(i.removeAttr(e),!0)},replaceToTag:function(t,e){var i;return g(t).replaceWith(function(){i=g("<"+e+" />").append(g(this).contents());for(var t=0;t<this.attributes.length;t++)i.attr(this.attributes[t].name,this.attributes[t].value);return i}),i},isSelectAll:function(){return this.selectAll},enableSelectAll:function(){this.selectAll=!0},disableSelectAll:function(){this.selectAll=!1},disableBodyScroll:function(){},measureScrollbar:function(){var t=g("body"),e=document.createElement("div");e.className="redactor-scrollbar-measure",t.append(e);var i=e.offsetWidth-e.clientWidth;return t[0].removeChild(e),i},enableBodyScroll:function(){},appendFields:function(t,i){if(!t)return i;if("object"==typeof t)return g.each(t,function(t,e){null!==e&&0===e.toString().indexOf("#")&&(e=g(e).val()),i.append(t,e)}),i;var e=g(t);if(0===e.length)return i;return e.each(function(){i.append(g(this).attr("name"),g(this).val())}),i},appendForms:function(t,i){if(!t)return i;var e=g(t);if(0===e.length)return i;var r=e.serializeArray();return g.each(r,function(t,e){i.append(e.name,e.value)}),i},isRgb:function(t){return 0===t.search(/^rgb/i)},rgb2hex:function(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""},isCollapsed:function(){return this.selection.isCollapsed()},isMobile:function(){return this.detect.isMobile()},isDesktop:function(){return this.detect.isDesktop()},isPad:function(){return this.detect.isIpad()}}},browser:function(){return{webkit:function(){return this.detect.isWebkit()},ff:function(){return this.detect.isFirefox()},ie:function(){return this.detect.isIe()}}}},g(window).on("load.tools.redactor",function(){g('[data-tools="redactor"]').redactor()}),l.prototype.init.prototype=l.prototype}(jQuery),function(s){function r(t,e,i,r){var n={duration:.5,iterate:1,delay:0,prefix:"redactor-",timing:"linear"};this.animation=e,this.slide="slideDown"===this.animation||"slideUp"===this.animation,this.$element=s(t),this.prefixes=["","-moz-","-o-animation-","-webkit-"],this.queue=[],"function"==typeof i?(r=i,this.opts=n):this.opts=s.extend(n,i),this.slide&&this.$element.height(this.$element.height()),this.init(r)}s.fn.redactorAnimation=function(t,e,i){return this.each(function(){new r(this,t,e,i)})},r.prototype={init:function(t){this.queue.push(this.animation),this.clean(),"show"===this.animation?(this.opts.timing="linear",this.$element.removeClass("hide").show(),"function"==typeof t&&t(this)):"hide"===this.animation?(this.opts.timing="linear",this.$element.hide(),"function"==typeof t&&t(this)):this.animate(t)},animate:function(t){this.$element.addClass("redactor-animated").css("display","").removeClass("hide"),this.$element.addClass(this.opts.prefix+this.queue[0]),this.set(this.opts.duration+"s",this.opts.delay+"s",this.opts.iterate,this.opts.timing);var e=1<this.queue.length?null:t;this.complete("AnimationEnd",s.proxy(function(){this.$element.hasClass(this.opts.prefix+this.queue[0])&&(this.clean(),this.queue.shift(),this.queue.length&&this.animate(t))},this),e)},set:function(t,e,i,r){for(var n=this.prefixes.length;n--;)this.$element.css(this.prefixes[n]+"animation-duration",t),this.$element.css(this.prefixes[n]+"animation-delay",e),this.$element.css(this.prefixes[n]+"animation-iteration-count",i),this.$element.css(this.prefixes[n]+"animation-timing-function",r)},clean:function(){this.$element.removeClass("redactor-animated"),this.$element.removeClass(this.opts.prefix+this.queue[0]),this.set("","","","")},complete:function(t,e,i){this.$element.one(t.toLowerCase()+" webkit"+t+" o"+t+" MS"+t,s.proxy(function(){"function"==typeof e&&e(),"function"==typeof i&&i(this);-1!==s.inArray(this.animation,["fadeOut","slideUp","zoomOut","slideOutUp","slideOutRight","slideOutLeft"])&&this.$element.css("display","none"),this.slide&&this.$element.css("height","")},this))}}}(jQuery); })(this);
 
 // plugins/WoltLabArticle.js
-(function (window, undefined) { plugins,WoltLabArticle.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabArticle=function(){"use strict";return{init:function(){var i=this.button.add("woltlabArticle","");require(["WoltLabSuite/Core/Ui/Redactor/Article"],function(t){new t(this,i[0])}.bind(this))}}}; })(this);
 
 // plugins/WoltLabAttachment.js
-(function (window, undefined) { plugins,WoltLabAttachment.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabAttachment=function(){"use strict";return{init:function(){this.opts.woltlab.attachments&&require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","insertAttachment_"+this.$element[0].id,this.WoltLabAttachment._insert.bind(this)),t.add("com.woltlab.wcf.redactor2","deleteAttachment_"+this.$element[0].id,this.WoltLabAttachment._delete.bind(this)),t.add("com.woltlab.wcf.redactor2","replaceAttachment_"+this.$element[0].id,this.WoltLabAttachment._replaceAttachment.bind(this))}.bind(this))},_insert:function(t){if(!this.WoltLabSource.isActive()){var e=t.attachmentId;if(this.buffer.set(),t.url){var i="wcfImgAttachment"+this.uuid,a=elById(i);a&&a.removeAttribute("id"),this.insert.html('<img src="'+t.url+'" class="woltlabAttachment" data-attachment-id="'+e+'" id="'+i+'">');for(var n=!0,c=a=elById(i);c=c.nextSibling;)if(c.nodeType!==Node.TEXT_NODE||""!==c.textContent.replace(/\u200B/g,"").trim()){n=!1;break}n?this.caret.after(a.parentNode):window.setTimeout(function(){var t,e,a,n=elById(i);n&&(n.removeAttribute("id"),(t=n.nextSibling)&&t.nodeType===Node.TEXT_NODE&&"​"===t.textContent||(t=document.createTextNode("​"),n.parentNode.insertBefore(t,n.nextSibling)),(e=document.createRange()).selectNode(t),e.collapse(!1),(a=window.getSelection()).removeAllRanges(),a.addRange(e))}.bind(this),10)}else this.insert.text("[attach="+e+"][/attach]");this.buffer.set()}},_replaceAttachment:function(t){var e=elCreate("img");e.className="woltlabAttachment",e.src=t.src,elData(e,"attachment-id",t.attachmentId),t.img.parentNode.insertBefore(e,t.img),elRemove(t.img)},_delete:function(t){var e=t.attachmentId,a=this.core.editor()[0];elBySelAll('.woltlabAttachment[data-attachment-id="'+e+'"]',a,function(t){elRemove(t)});var n="[attach="+e+"][/attach]";if(!1!==a.textContent.indexOf(n)){for(var i,c=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1),r=[];i=c.nextNode();)-1!==i.textContent.indexOf(n)&&r.push(i);for(var o=0,l=r.length;o<l;o++)r[o].textContent=r[o].textContent.replace(new RegExp("\\[attach="+e+"\\]\\[\\/attach\\]","g"),"")}}}}; })(this);
 
 // plugins/WoltLabAutosave.js
-(function (window, undefined) { plugins,WoltLabAutosave.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabAutosave=function(){"use strict";return{init:function(){this.opts.woltlab.autosave&&(this.opts.woltlab.autosave.watch(this),this.opts.woltlab.autosave.createOverlay(),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveDestroy_"+this.$element[0].id,this.WoltLabAutosave.destroy.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveReset_"+this.$element[0].id,this.WoltLabAutosave.reset.bind(this)))},destroy:function(){this.opts.woltlab.autosave&&this.opts.woltlab.autosave.destroy()},reset:function(){this.opts.woltlab.autosave&&this.opts.woltlab.autosave.clear()}}}; })(this);
 
 // plugins/WoltLabBlock.js
-(function (window, undefined) { plugins,WoltLabBlock.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabBlock=function(){"use strict";return{preserveBlocks:["pre","woltlab-quote","woltlab-spoiler"],init:function(){this.block.tags=["p","blockquote","pre","h1","h2","h3","h4","h5","h6","div","figure"],this.block.format=function(e,t,o,i){if(e="quote"===e?"blockquote":e,-1!==$.inArray(e,this.block.tags))return"p"===e&&void 0===t&&(t="class"),this.placeholder.hide(),this.buffer.set(),this.utils.isCollapsed()?this.block.formatCollapsed(e,t,o,i):this.block.formatUncollapsed(e,t,o,i)}.bind(this);var c=function(e,t){return!(document.activeElement!==e||!1===t||!this.utils.isRedactorParent(t))}.bind(this),d=this.block.formatCollapsed;this.block.formatCollapsed=function(e,t,o,i){var s=this.selection.block();if(!s||"LI"!==s.nodeName&&"TD"!==s.nodeName){var r=this.core.editor()[0];c(r,s)||(this.selection.restore(),document.activeElement!==r&&r.focus()),c(r,s)||(this.focus.end(),this.selection.save());var l=d.call(this,e,t,o,i),n=l.length;if(1===n&&l[0].nodeName.match(/^H[1-6]$/)){var a=l[0];1===a.childElementCount&&"BR"===a.children[0].nodeName&&this.utils.isEmpty(a.innerHTML)&&(a.innerHTML="​")}else for(var h=0;h<n;h++)this.WoltLabBlock._paragraphize(l[h]);return this.caret.end(l),l}}.bind(this),this.block.formatUncollapsed=function(e,t,o,i){var s;this.selection.save(),this.selection.blocks().forEach(function(e){var t;"OL"!==e.nodeName&&"UL"!==e.nodeName||(e.parentNode.nodeName.toLowerCase(),t=elCreate("div"),e.parentNode.insertBefore(t,e),t.appendChild(e))}),this.selection.restore(),this.selection.save();var r=[],l=this.selection.blocks();l[0]&&($(l[0]).hasClass("redactor-in")||$(l[0]).hasClass("redactor-box"))&&(l=this.core.editor().find(this.opts.blockTags.join(", ")));for(var n,a=l.length,h=0;h<a;h++){var c=l[h].tagName.toLowerCase();if(-1!==$.inArray(c,this.block.tags)&&"figure"!==c){if(s="pre"!==e&&-1!==this.WoltLabBlock.preserveBlocks.indexOf(l[h].nodeName.toLowerCase())?(s=elCreate(e),l[h].parentNode.insertBefore(s,l[h]),s.appendChild(l[h]),$(s)):this.utils.replaceToTag(l[h],e),"object"==typeof t)for(var d in i=o,t)s=this.block.setAttr(s,d,t[d],i);else s=this.block.setAttr(s,t,o,i);r.push(s),this.block.removeInlineTags(s)}}this.selection.restore(),"pre"===e&&0!==r.length&&(n=r[0],$.each(r,function(e,t){0!==e&&($(n).append("\n"+$.trim(t.html())),$(t).remove())}),(r=[]).push(n));var p,f=null;for(h=0,p=r.length;h<p;h++)if(s=r[h][0]||r[h],this.WoltLabBlock._paragraphize(s),0===h)f=s;else{for(;s.childNodes.length;)f.appendChild(s.childNodes[0]);elRemove(s)}return f&&elBySelAll("br",f,function(e){e.parentNode.insertBefore(document.createTextNode("\n"),e),elRemove(e)}),$(f)}.bind(this),this.block.removeAllAttr=function(e){e=this.block.getBlocks(e);var o=[];return $.each(e,function(e,t){for(void 0===t.attributes&&o.push(t);t.attributes.length;)t.removeAttribute(t.attributes[0].name);o.push(t)}),o}.bind(this),this.block.getBlocks=function(e){if(e=void 0===e?this.selection.blocks():e,$(e).hasClass("redactor-box")||$(e).hasClass("redactor-layer")){var o=[],t=this.core.editor().children();return $.each(t,$.proxy(function(e,t){this.utils.isBlock(t)&&o.push(t)},this)),o}return e}.bind(this)},register:function(e,t){-1===this.block.tags.indexOf(e)&&(this.block.tags.push(e),this.opts.paragraphizeBlocks.push(e),-1===this.opts.blockTags.indexOf(e)&&(this.opts.blockTags.push(e),this.reIsBlock=new RegExp("^("+this.opts.blockTags.join("|").toUpperCase()+")$","i")),t&&this.WoltLabKeydown.register(e))},_paragraphize:function(e){if(-1===["p","pre","h1","h2","h3","h4","h5","h6","div","figure"].indexOf(e.nodeName.toLowerCase())){for(var t,o=!1,i=0,s=e.childNodes.length;i<s;i++){if((t=e.childNodes[i]).nodeType===Node.TEXT_NODE){o=!0;break}if(t.nodeType===Node.ELEMENT_NODE&&-1===this.block.tags.indexOf(t.nodeName.toLowerCase())){o=!0;break}}if(o)for(var r,l=e.childNodes[0],n=null;l;)r=l.nextSibling,l.nodeType!==Node.ELEMENT_NODE||-1===this.block.tags.indexOf(l.nodeName.toLowerCase())?(null===n&&(n=elCreate("p"),e.insertBefore(n,l)),n.appendChild(l)):null!==n&&(n=null),l=r}}}}; })(this);
 
 // plugins/WoltLabButton.js
-(function (window, undefined) { plugins,WoltLabButton.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabButton=function(){"use strict";var o;return{init:function(){for(var t,e,o=0,n=this.opts.woltlab.customButtons.length;o<n;o++)e=this.opts.woltlab.customButtons[o],t=this.button.add(e,""),this.button.addCallback(t,this.WoltLabButton._handleCustomButton);var s,i,a,r,l=this.core.toolbar()[0];for(o=0,n=this.opts.buttons.length;o<n;o++)if("wcfSeparator"!==(e=this.opts.buttons[o])){if(!this.opts.woltlab.buttons.hasOwnProperty(e))throw new Error("Missing button definition for '"+e+"'.");switch(s=this.opts.woltlab.buttons[e],"underline"===e&&(this.opts.activeButtonsStates.u="underline"),e){case"subscript":case"superscript":t=this.button.addAfter(this.opts.buttons[o-1],e,""),this.button.setEvent(t,e,{func:"inline.format"}),this.opts.activeButtonsStates["subscript"===e?"sub":"sup"]=e;break;case"redo":case"undo":t=this.button.addAfter(this.opts.buttons[o-1],e,""),this.button.addCallback(t,this.buffer[e]);break;default:t=this.button.get(e)}if(a=!(i=s.icon).match(/^fa-/)&&i.match(/\.(gif|jpe?g|png|svg)$/),this.button.setIcon(t,'<span class="icon icon16 '+(a?"redactorButtonImage":i)+'"'+(a?" style=\"background-image: url('"+WCF_PATH+"icon/"+i+"')\"":"")+"></span>"),!t[0])throw new Error("Missing button element for '"+e+"'.");t[0].title=s.title,t[0].classList.add("jsTooltip"),"lists"===e&&(r=t.data("dropdown"),elBySel(".redactor-dropdown-outdent span",r[0]).textContent=WCF.Language.get("wcf.editor.list.outdent"),elBySel(".redactor-dropdown-indent span",r[0]).textContent=WCF.Language.get("wcf.editor.list.indent"))}var d=this.opts.buttons.indexOf("tt");-1!==this.opts.buttons.indexOf("code")&&-1!==d&&(this.opts.buttons.splice(d,1),this.opts.buttons.splice(this.opts.buttons.indexOf("code")+1,0,"tt"));for(var c,u={},h=[];l.childElementCount;)c=l.removeChild(l.children[0]),e=elAttr(c.children[0],"rel"),u[e]=c,h.push(e);var b=!1;for(o=0,n=this.opts.buttons.length;o<n;o++)"wcfSeparator"!==(e=this.opts.buttons[o])?(c=u[e],l.appendChild(c),h.splice(h.indexOf(e),1),b&&(c.classList.add("redactor-toolbar-separator"),b=!1)):b=!0;for(o=0,n=l.childElementCount;o<n;o++)t=(c=l.children[o]).children[0],elData(c,"show-on-mobile",-1!==this.opts.woltlab.buttonMobile.indexOf(t.rel));h.forEach(function(t){l.appendChild(u[t])}),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(t){t.on("screen-xs",{match:this.WoltLabButton._enableToggleButton.bind(this),unmatch:this.WoltLabButton._disableToggleButton.bind(this),setup:this.WoltLabButton._setupToggleButton.bind(this)})}.bind(this)),l.addEventListener("dragstart",function(t){t.preventDefault()}),elAttr(elBySel(".re-html",l),"tabindex",0)},_handleCustomButton:function(t){var e,o,n={cancel:!1};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","bbcode_"+t+"_"+this.$element[0].id,n),!0!==n.cancel&&(this.buffer.set(),(e=this.marker.get()).classList.add("woltlab-bbcode-marker"),o="["+t+"]"+this.selection.html()+e.outerHTML+"[/"+t+"]",this.insert.html(o),this.selection.restore()),window.setTimeout(function(){document.activeElement!==this.$editor[0]&&this.$editor[0].focus()}.bind(this),10)},_enableToggleButton:function(){null===o.parentNode&&this.$toolbar[0].appendChild(o)},_disableToggleButton:function(){o&&null!==o.parentNode&&this.$toolbar[0].removeChild(o)},_setupToggleButton:function(){(o=elCreate("li")).className="redactorToolbarToggle",o.innerHTML='<a href="#"><span class="icon icon16 fa-caret-down"></span></a>',elData(o,"show-on-mobile",!0);var e=o.children[0].children[0],t=function(t){t instanceof Event&&t.preventDefault(),this.$toolbar[0].classList.toggle("redactorToolbarOverride")&&document.activeElement&&document.activeElement!==this.$editor[0]&&document.activeElement.blur(),e.classList.toggle("fa-caret-down"),e.classList.toggle("fa-caret-up")}.bind(this);o.children[0].addEventListener("mousedown",t),this.$toolbar[0].appendChild(o),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this.$element[0].id,function(){this.$toolbar[0].classList.contains("redactorToolbarOverride")&&t()}.bind(this))}}}; })(this);
 
 // plugins/WoltLabCaret.js
-(function (window, undefined) { plugins,WoltLabCaret.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabCaret=function(){"use strict";var h,u=!1,f=!1;return{init:function(){var t=this.caret.after;this.caret.after=function(e){e=this.caret.prepare(e),this.utils.isBlockTag(e.tagName)&&this.WoltLabCaret._addParagraphAfterBlock(e),t.call(this,e)}.bind(this);var n=this.caret.start;this.caret.start=function(e){if(f){if(!(e=this.caret.prepare(e)))return;"P"===e.nodeName&&"​"===e.innerHTML&&(e.innerHTML="<br>")}n.call(this,e)}.bind(this);var i=this.core.editor()[0];require(["Environment"],function(e){u="ios"===e.platform(),(f="safari"===e.browser())&&i.classList.add("jsSafariMarginClickTarget");var t=this.WoltLabCaret._handleEditorClick.bind(this),n=this.WoltLabCaret._handleEditorMouseUp.bind(this);f&&u?(i.addEventListener("touchstart",function(e){h=e.target},{passive:!0}),i.addEventListener("touchend",function(e){t(e),n(e)}.bind(this))):(i.addEventListener(WCF_CLICK_EVENT,function(e){this.WoltLabCaret._detectTripleClick(e),t(e)}.bind(this)),i.addEventListener("mouseup",n))}.bind(this));var o=this.caret.end;this.caret.end=function(e){"OL"!==(e=this.caret.prepare(e)).nodeName&&"UL"!==e.nodeName||null===(e=e.lastElementChild)&&(e=e.parentNode);var t,n=!1;if(e.nodeType===Node.ELEMENT_NODE&&e.lastChild&&"P"===e.lastChild.nodeName?n=!0:u?(t=this.core.editor()[0],e.parentNode===t&&"<p><br></p>"===t.innerHTML&&(n=!0)):"P"===e.nodeName&&0===e.childNodes.length&&(e.innerHTML="​",n=!0),n){var i=window.getSelection(),r=document.createRange();return r.selectNodeContents(e.lastChild),r.collapse(!1),i.removeAllRanges(),void i.addRange(r)}return"P"===e.nodeName&&1===e.childNodes.length&&"BR"===e.childNodes[0].nodeName?this.caret.before(e.childNodes[0]):o.call(this,e)}.bind(this);var r=this.selection.nodes;this.selection.nodes=function(e){var t=r.call(this,e);if(1===t.length&&t[0]===this.$editor[0]){var n=this.selection.range(this.selection.get());if(n.startContainer===n.endContainer)return[n.startContainer]}return t}.bind(this),this.WoltLabCaret._initInternalRange();var a=this.selection.saveInstant;this.selection.saveInstant=function(){var e,t,n=a.call(this);return n&&(n.isAtNodeStart=!1,!(e=window.getSelection()).rangeCount||e.isCollapsed||(t=e.getRangeAt(0)).startContainer.nodeType===Node.TEXT_NODE&&0===t.startOffset&&(n.isAtNodeStart=!0)),n}.bind(this);var d=this.selection.restoreInstant;this.selection.restoreInstant=function(e){if(void 0!==e||this.saved){var t=void 0!==e?e:this.saved;d.call(this,e);var n,i,r,o=window.getSelection();if(o.rangeCount)if(!0===t.isAtNodeStart){if(!o.isCollapsed){var a=o.getRangeAt(0),s=a.startContainer;if(t.node===s)return;for(;null!==s&&"P"!==s.nodeName;)s=s.parentNode;if(null!==s&&null!==(s=s.nextElementSibling)&&"P"===s.nodeName&&0===s.textContent.replace(/\u200B/g,"").length){s=s.nextElementSibling;for(var l=t.node;null!==l&&l!==s;)l=l.parentNode;l===s&&((a=a.cloneRange()).setStart(t.node,0),o.removeAllRanges(),o.addRange(a))}}}else o.isCollapsed&&(n=o.anchorNode,i=this.core.editor()[0],n.nodeType!==Node.TEXT_NODE||n.parentNode!==i||o.anchorOffset!==n.textContent.length||(r=n.nextElementSibling)&&"P"===r.nodeName&&this.caret.start(r))}}.bind(this),this.selection.nodes=function(e){var i=void 0===e?[]:$.isArray(e)?e:[e],t=this.selection.get(),n=this.selection.range(t),r=[],o=[];if(this.utils.isCollapsed())r=[this.selection.current()];else{var a=n.startContainer,s=n.endContainer;if(a===s)return[a];for(var l=n.commonAncestorContainer;a&&a!==s;)r.push(a=this.selection.nextNode(a,l));for(a=n.startContainer;a&&a!==l;)r.unshift(a),a=a.parentNode}return $.each(r,function(e,t){if(t){var n=1===t.nodeType&&t.tagName.toLowerCase();if($(t).hasClass("redactor-script-tag")||$(t).hasClass("redactor-selection-marker"))return;if(n&&0!==i.length&&-1===$.inArray(n,i))return;o.push(t)}}),0===o.length?[]:o}.bind(this),this.selection.nextNode=function(e,t){if(e.hasChildNodes())return e.firstChild;for(;e&&!e.nextSibling;)if(e=e.parentNode,t&&e===t)return null;return e?e.nextSibling:null}},paragraphAfterBlock:function(e){var t=e.nextElementSibling;t&&"P"!==t.nodeName&&(t=elCreate("p"),"<p><br></p>"===this.opts.emptyHtml?t.innerHTML="<br>":t.textContent="​",e.parentNode.insertBefore(t,e.nextSibling)),this.caret.after(e)},endOfEditor:function(){var e=this.core.editor()[0];document.activeElement!==e&&e.focus();var t=e.lastElementChild;"P"===t.nodeName?this.caret.end(t):this.caret.after(t)},_initInternalRange:function(){function i(){o=a.rangeCount?a.getRangeAt(0).cloneRange():null}var r=this.core.editor()[0],o=null,a=window.getSelection();this.WoltLabCaret.forceSelectionSave=i;function n(){if(null!==o){if(document.activeElement===r){var e=a.getRangeAt(0);if(0!==e.startOffset)return;for(var t=e.startContainer;t;){if(t.parentNode===r){if(t.previousSibling)return;break}if(t.previousSibling)return;t=t.parentNode}if(!t)return}var n=r.scrollLeft,i=r.scrollTop;r.focus(),r.scrollLeft=n,r.scrollTop=i,a.removeAllRanges(),a.addRange(o),o=null}}r.addEventListener("keyup",i),r.addEventListener("mouseup",function(){a.rangeCount&&i()});var e=this.selection.save;this.selection.save=function(){o=null,e.call(this)}.bind(this);var t=this.selection.restore;this.selection.restore=function(){o&&null===elBySel(".redactor-selection-marker",this.$editor[0])&&(n(),a.rangeCount&&this.utils.isRedactorParent(a.getRangeAt(0).commonAncestorContainer))||t.call(this)}.bind(this);var s=this.buffer.set;this.buffer.set=function(e){var t;document.activeElement!==r&&((t=window.getSelection()).rangeCount&&!1!==this.utils.isRedactorParent(t.anchorNode)?r.focus():n()),s.call(this,e),i()}.bind(this);var l=this.insert.html;this.insert.html=function(e,t){var n=elBySel(".redactor-selection-marker",this.$editor[0]);l.call(this,e,t),!n&&null!==elBySel(".redactor-selection-marker",this.$editor[0])||i()}.bind(this),require(["Environment"],function(e){"ios"===e.platform()&&(r.addEventListener("focus",function(){document.addEventListener("selectionchange",i)}),r.addEventListener("blur",function(){document.removeEventListener("selectionchange",i)}))}.bind(this))},_detectTripleClick:function(e){var t,n,i;e.detail<3||((t=window.getSelection()).isCollapsed||"TR"===(i=t.getRangeAt(0)).commonAncestorContainer.nodeName&&(n=elClosest(i.startContainer,"td"),(i=document.createRange()).selectNodeContents(n),t.removeAllRanges(),t.addRange(i)))},_handleEditorClick:function(e){var t=e.clientY;if(!this.selection.get().isCollapsed){if(!(f&&u&&h===e.target&&this.utils.isBlockTag(h.nodeName)))return;t=e.changedTouches[0].clientY}var n,i=this.selection.block();if(!1===i&&(this.selection.current()!==this.$editor[0]||(n=this.$editor[0].childNodes[this.selection.get().anchorOffset]).nodeType===Node.ELEMENT_NODE&&"TABLE"===n.nodeName&&(i=n),!1===i))return;var r=!1;f&&this.utils.isBlockTag(e.target.nodeName)&&t>e.target.getBoundingClientRect().bottom&&(i=e.target,r=!0);for(var o=e.target;o&&!this.utils.isBlockTag(o.nodeName);)o=o.parentNode;if(o&&(r||o!==i)&&("P"!==i.nodeName||(i=i.parentNode)!==this.$editor[0]&&this.utils.isBlockTag(i.nodeName))){if("TD"===i.nodeName)for(;"TABLE"!==i.nodeName;)i=i.parentNode;if(!i.nodeName.match(/^H\d$/)&&!$(i).closest("ol, ul",this.$editor[0]).length){for(var a,s,l,d,c=i;c;){if(t<(s=c.getBoundingClientRect()).top)a=!0,i=c;else{if(!(t>s.bottom))break;a=!1,i=c}if(!c.parentNode||c.parentNode===this.$editor[0])break;c=c.parentNode}void 0!==a&&((l=i[(a?"previous":"next")+"ElementSibling"])&&"P"===l.nodeName?this.caret.end(l):(this.buffer.set(),(d=elCreate("p")).textContent="​",i.parentNode.insertBefore(d,a?i:i.nextSibling),this.caret.end(d)))}}},_handleEditorMouseUp:function(e){var t,n=window.getSelection();if(n.isCollapsed||f&&u&&h===e.target&&this.utils.isBlockTag(h.nodeName))if(e.target===this.$editor[0])(i=n.anchorNode).nodeType===Node.TEXT_NODE&&(i=i.parentNode),"KBD"===i.nodeName&&(null!==(t=i.previousSibling)&&"​"===t.textContent||(t=document.createTextNode("​"),i.parentNode.insertBefore(t,i)),this.caret.before(t));else if("KBD"===e.target.nodeName){var i,r,o,a=e.target;if((i=n.anchorNode).nodeType===Node.TEXT_NODE){for(t=i;(t=t.nextSibling)&&t.nodeType===Node.TEXT_NODE&&(""===t.textContent||"​"===t.textContent););t===a&&(0!==a.childNodes.length&&"​"===a.childNodes[0].textContent||(r=document.createTextNode("​"),a.insertBefore(r,a.firstChild)),(o=document.createRange()).setStartAfter(a.childNodes[0]),o.setEndAfter(a.childNodes[0]),n.removeAllRanges(),n.addRange(o))}}},_addParagraphAfterBlock:function(e){var t=e.nextElementSibling;t&&("P"===t.nodeName||this.utils.isBlockTag(t.nodeName))||((t=elCreate("p")).textContent="​",e.parentNode.insertBefore(t,e.nextSibling))}}}; })(this);
 
 // plugins/WoltLabClean.js
-(function (window, undefined) { plugins,WoltLabClean.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){var n=this.clean.onSet;this.clean.onSet=function(e){e=(e=(e=e.replace(/\u200B/g,"")).replace(/&amp;amp;/g,"@@@WCF_LITERAL_AMP@@@")).replace(/&amp;/g,"&amp;WCF_AMPERSAND&amp;"),e=(e=(e=n.call(this,e)).replace(/&amp;WCF_AMPERSAND&(amp;)?/g,"&amp;")).replace(/@@@WCF_LITERAL_AMP@@@/g,"&amp;amp;");var t=elCreate("div");return t.innerHTML=e,elBySelAll("*",t,function(e){for(var t,n=[],r=0,l=e.attributes.length;r<l;r++)0===(t=e.attributes[r]).name.indexOf("on")&&n.push(t.name);n.forEach(e.removeAttribute.bind(e))}),elBySelAll("iframe",t,elRemove),elBySelAll("pre",t,function(e){e.classList.contains("redactor-script-tag")&&elRemove(e)}),elBySelAll("td",t,function(e){0===e.childNodes.length&&(e.innerHTML="​")}),elBySelAll("pre, woltlab-quote, woltlab-spoiler",t,function(e){0!==e.childElementCount||0!==e.textContent.length&&!e.textContent.match(/^\r?\n$/)||(e.textContent="​")}),e=t.innerHTML}.bind(this);var r=this.clean.onSync;this.clean.onSync=function(e){var t=elCreate("div");t.innerHTML=e;var n={};return elBySelAll("pre",t,function(e){var t=WCF.getUUID();n[t]=e.textContent,e.textContent=t}),elBySelAll("p",t,function(e){var t,n=e.lastElementChild;n&&"BR"===n.nodeName&&(n.nextSibling?n.nextSibling.textContent.replace(/[\r\n\t]/g,"").match(/^\u200B+$/)&&((t=elCreate("p")).innerHTML="<br>",e.parentNode.insertBefore(t,e.nextSibling),e.removeChild(n.nextSibling),e.removeChild(n)):(n.previousElementSibling||n.previousSibling&&""!==n.previousSibling.textContent.replace(/\u200B/g,"").trim())&&e.removeChild(n))}),elBySelAll("span",t,function(e){var t;0<e.childNodes.length&&((t=e.childNodes[e.childNodes.length-1]).nodeType===Node.TEXT_NODE&&t.textContent.match(/\n$/)&&(t.textContent=t.textContent.replace(/\n+$/,e.parentNode.lastChild===e?"":" ")))}),e=(e=(e=t.innerHTML).replace(/<p>\u200B<\/p>/g,"<p><br></p>")).replace(/&amp;/g,"&amp;WCF_AMPERSAND&amp;"),e=(e=r.call(this,e)).replace(/&WCF_AMPERSAND&/g,"&amp;"),t.innerHTML=e,elBySelAll("pre",t,function(e){n.hasOwnProperty(e.textContent)&&(e.textContent=n[e.textContent])}),e=t.innerHTML}.bind(this);var l=this.clean.savePreFormatting;this.clean.savePreFormatting=function(e){var t=this.clean.encodeEntities;return this.clean.encodeEntities=function(e){return WCF.String.escapeHTML(e)},e=l.call(this,e),this.clean.encodeEntities=t,e}.bind(this);var b=this.clean.onPaste;this.clean.onPaste=function(e,t,n){if(t.pre||this.utils.isCurrentOrParent("kbd"))return t.pre&&this.opts.preSpaces&&(e=e.replace(/\t/g,new Array(this.opts.preSpaces+1).join(" "))),WCF.String.escapeHTML(e);this.clean.isHtmlMsWord(e)&&(e=this.clean.cleanMsWord(e));var r,l=elCreate("div");l.innerHTML=e.replace(/@@@WOLTLAB-P-ALIGN-(?:left|right|center|justify)@@@/g,"");var i=!0;for(s=0,c=l.childElementCount;s<c;s++){if("DIV"!==(r=l.children[s]).nodeName||0===r.childNodes.length){i=!1;break}if(1===r.childNodes.length&&1===r.childElementCount){var o=r.children[0];if(0===o.childNodes.length&&"BR"!==o.nodeName){i=!1;break}}}if(i){for(var a=[],s=0,c=l.childElementCount;s<c;s++)a.push(l.children[s]);a.forEach(function(e){var t=elCreate("p");for(l.insertBefore(t,e);0<e.childNodes.length;)t.appendChild(e.childNodes[0]);l.removeChild(e)})}var h,d,p=null!==elBySel(".MsoNormal",l),u=elBySelAll("[style]",l);for(s=0,c=u.length;s<c;s++){h=[];for(var f=0,m=(r=u[s]).style.length;f<m;f++){var g,v,y=r.style[f];-1===this.opts.woltlab.allowedInlineStyles.indexOf(y)&&("font-weight"===y&&"STRONG"!==r.nodeName?("bold"!==(v=r.style.getPropertyValue(y))&&"bolder"!==v||(v=600),500<(v=~~v)&&(d=elCreate("strong"),r.parentNode.insertBefore(d,r),d.appendChild(r))):p&&"margin-bottom"===y&&"P"===r.nodeName&&(v=r.style.getPropertyValue(y)).match(/^12(?:\.0)?pt$/)&&((g=elCreate("p")).innerHTML="<br>",r.parentNode.insertBefore(g,r.nextSibling)),h.push(y))}h.forEach(function(e){r.style.removeProperty(e)})}return elBySelAll("span",l,function(e){if(!e.classList.contains("redactor-selection-marker"))if(e.hasAttribute("style")&&e.style.length)for(var t=e.style.getPropertyValue("color"),n=e.style.getPropertyValue("font-family"),r=e.style.getPropertyValue("font-size"),l=(t?1:0)+(n?1:0)+(r?1:0);1<l;){if(this.opts.pastePlainText)return e.style.removeProperty("color"),e.style.removeProperty("font-family"),void e.style.removeProperty("font-size");var i=elCreate("span");t?(i.style.setProperty("color",t,""),e.style.removeProperty("color"),t="",l--):n?(i.style.setProperty("font-family",n,""),e.style.removeProperty("font-family"),n="",l--):r&&(i.style.setProperty("font-size",r,""),e.style.removeProperty("font-size"),r="",l--),e.parentNode.insertBefore(i,e),i.appendChild(e)}else{for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}.bind(this)),elBySelAll("p",l,function(e){e.classList.contains("MsoNormal")?1===e.childElementCount&&"O:P"===e.children[0].nodeName&&" "===e.textContent&&(e.innerHTML="<br>"):e.className.match(/\btext-(left|right|center|justify)\b/)&&e.insertBefore(document.createTextNode("@@@WOLTLAB-P-ALIGN-"+RegExp.$1+"@@@"),e.firstChild),e.removeAttribute("class"),e.removeAttribute("style")}),elBySelAll("img",l,function(e){e.removeAttribute("style")}),elBySelAll("br",l,function(e){e.parentNode.insertBefore(document.createTextNode("@@@WOLTLAB-BR-MARKER@@@"),e.nextSibling)}),elBySelAll("kbd",l,function(e){for(e.insertBefore(document.createTextNode("[tt]"),e.firstChild),e.appendChild(document.createTextNode("[/tt]"));e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}),e=(e=(e=b.call(this,l.innerHTML,t,n)).replace(/\n*@@@WOLTLAB-BR-MARKER@@@\n*/g,"<woltlab-br-marker></woltlab-br-marker>")).replace(/(<p>)?\s*@@@WOLTLAB-P-ALIGN-(left|right|center|justify)@@@/g,function(e,t,n){return t?'<p class="text-'+n+'">':""}),l.innerHTML=e.replace(/&amp;quot;/g,"&quot;"),elBySelAll("woltlab-br-marker",l,function(e){var t=e.parentNode;if(null!==t){for(var n=!1,r=t;null!==r;)"P"===r.nodeName&&(n=!0),r=r.parentNode;if(n){var l=elCreate("p"),i=!(l.innerHTML="<br>"),o=e.nextSibling;o&&"WOLTLAB-BR-MARKER"===o.nodeName&&(i=!0);for(var a=!i;e.nextSibling;)a&&0!==e.nextSibling.textContent.replace(/\u200B/g,"").trim().length&&(a=!1),l.appendChild(e.nextSibling);a||elRemove(l.firstElementChild);var s=e.previousSibling;s&&"BR"===s.nodeName&&elRemove(s),t.parentNode.insertBefore(l,t.nextSibling),i&&((l=elCreate("p")).innerHTML="<br>",t.parentNode.insertBefore(l,t.nextSibling))}else t.insertBefore(elCreate("br"),e);elRemove(e)}}),elBySelAll("p",l,function(e){var t=!1;0===e.childNodes.length?t=!0:""===e.textContent?(t=!0,elBySelAll("*",e,function(e){"SPAN"!==e.nodeName&&(t=!1)})):0===e.textContent.trim().length&&(elBySelAll("span",e,function(e){if(!e.hasAttribute("style")||!e.style.length){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);elRemove(e)}}),0===e.children.length&&(e.innerHTML="<br>")),t&&elRemove(e)}),l.innerHTML}.bind(this);function i(e,t){for(var n,r,l={},i=0,o=t.length;i<o;i++)n=t[i],r=elAttr(e,n),"style"===n&&0===e.style.length&&0===r.indexOf("font-family")&&(r=r.replace(/&quot;/g,"")),l[n]=r;a.push({element:e,attributes:l})}var a=[],o=this.clean.convertTags;this.clean.convertTags=function(e,t){var n=elCreate("div");n.innerHTML=e,a=[],WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","convertTags_"+this.$element[0].id,{addToStorage:i,div:n}),elBySelAll("span",n,function(e){i(e,["style"])}),a.forEach(function(e,t){var n=e.element,r=n.parentNode;for(r.insertBefore(document.createTextNode("###custom"+t+"###"),n),r.insertBefore(document.createTextNode("###/custom"+t+"###"),n.nextSibling);n.childNodes.length;)r.insertBefore(n.childNodes[0],n);r.removeChild(n)});var r=!1;t.links&&this.opts.pasteLinks&&(elBySelAll("a",n,function(e){e.href&&(e.outerHTML='#@###[a href="'+e.href+'"]###@#'+e.innerHTML+"#@###[/a]###@#")}),r=!0,t.links=!1);var l=!1;return t.images&&this.opts.pasteImages&&(elBySelAll("img",n,function(e){if(e.src){for(var t,n='#####[img src="'+e.src+'"',r=0,l=e.attributes.length;r<l;r++)"src"!==(t=e.attributes.item(r)).name&&(n+=" "+t.name+'="'+t.value+'"');e.outerHTML=n+"]#####"}}),l=!0,t.images=!1),e=o.call(this,n.innerHTML,t),l&&(t.images=!0),r&&(t.links=!0),e}.bind(this);var s=this.clean.reconvertTags;this.clean.reconvertTags=function(e,t){var n;return a.length&&(e=e.replace(/###(\/?)custom(\d+)###/g,'<$1woltlab-custom-tag data-index="$2">'),(n=elCreate("div")).innerHTML=e,elBySelAll("woltlab-custom-tag",n,function(e){var t=~~elData(e,"index");if(a[t]){var n=a[t],r=elCreate(n.element.nodeName);for(var l in n.attributes)n.attributes.hasOwnProperty(l)&&elAttr(r,l,n.attributes[l]);for(e.parentNode.insertBefore(r,e);e.childNodes.length;)r.appendChild(e.childNodes[0])}elRemove(e)}),e=n.innerHTML),(t.links&&this.opts.pasteLinks||t.images&&this.opts.pasteImages)&&(e=(e=e.replace(new RegExp("#@###\\[","gi"),"<")).replace(new RegExp("\\]###@#","gi"),">")),s.call(this,e,t)}.bind(this),this.clean.removeSpans=function(e){return e};var c=this.clean.getCurrentType;this.clean.getCurrentType=function(e,t){var n=c.call(this,e,t);return this.utils.isCurrentOrParent(["kbd"])&&(n.inline=!1,n.block=!1,n.encode=!0,n.pre=!0,n.paragraphize=!1,n.images=!1,n.links=!1),n}.bind(this);this.clean.removeEmptyInlineTags;this.clean.removeEmptyInlineTags=function(e){var t=this.opts.inlineTags,n=$("<div/>").html($.parseHTML(e,document,!0)),r=this,l=n.find("span"),i=n.find(t.join(","));return i.filter(":not(span)").removeAttr("style"),i.each(function(){var e=$(this).html();0===this.attributes.length&&r.utils.isEmpty(e)&&$(this).replaceWith(function(){return $(this).contents()})}),l.each(function(){$(this).html();0===this.attributes.length&&$(this).replaceWith(function(){return $(this).contents()})}),e=(e=(e=(e=n.html()).replace("\x3c!--?php","<?php")).replace("\x3c!--?","<?")).replace("?--\x3e","?>"),n.remove(),e}.bind(this)},removeRedundantStyles:function(){var t,r=[];elBySelAll(["del","em","strong","sub","sup","u"].join(","),this.$editor[0],function(e){elBySelAll(e.nodeName,e,function(e){r.push(e)})}),this.opts.pastePlainText||(elBySelAll("span[style]",this.$editor[0],function(n){["color","font-family","font-size"].forEach(function(e){var t=n.style.getPropertyValue(e);t&&window.getComputedStyle(n.parentNode).getPropertyValue(e)===t&&r.push(n)})}),r.forEach(function(e){for(t=e.parentNode;e.childNodes.length;)t.insertBefore(e.childNodes[0],e);t.removeChild(e)}))}}}; })(this);
 
 // plugins/WoltLabCode.js
-(function (window, undefined) { plugins,WoltLabCode.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/Code"],function(t){new t(this)}.bind(this));var e=this.code.start;this.code.start=function(t){e.call(this,t),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","codeStart_"+this.$element[0].id),elBySelAll("kbd",this.$editor[0],function(t){var e,i=t.nextSibling;i&&i.nodeType===Node.TEXT_NODE&&"​"===i.textContent.substr(0,1)||(e=document.createTextNode("​"),t.parentNode.insertBefore(e,i))})}.bind(this);var i=this.code.set;this.code.set=function(t,e){i.call(this,t,e),this.utils.isEmpty()&&this.observe.toolbar()}.bind(this);var t=this.code.get;this.code.get=function(){return this.code.html=!1,this.code.startSync(this.core.editor().html()),t.call(this)}.bind(this)}}}; })(this);
 
 // plugins/WoltLabColor.js
-(function (window, undefined) { plugins,WoltLabColor.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabColor=function(){"use strict";var l=["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"];return{init:function(){for(var o,t=this.WoltLabColor.setColor.bind(this),e={},r=0,F=l.length;r<F;r++)e["color_"+(o=l[r])]={title:"#"+o,func:t};e.removeColor={title:this.lang.get("remove-color"),func:this.WoltLabColor.removeColor.bind(this)};var i=this.button.add("woltlabColor","");this.button.addDropdown(i,e);var s=i.data("dropdown");s.find("a").each(function(o,t){t.className.match(/redactor-dropdown-color_([A-F0-9]{6})/)&&(t.style.setProperty("color","#"+RegExp.$1,""),t.parentNode.classList.add("woltlab-color-selection"))}),$('<li class="dropdownDivider"></li>').insertBefore(s.children("li").last())},setColor:function(t){t=t.replace(/^color_/,""),this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(o){this.buffer.set(),o.format(this.$editor[0],"color","#"+t),this.buffer.set()}.bind(this)),this.selection.restore()},removeColor:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(o){this.buffer.set(),o.removeFormat(this.$editor[0],"color"),this.buffer.set()}.bind(this)),this.selection.restore()}}}; })(this);
 
 // plugins/WoltLabDragAndDrop.js
-(function (window, undefined) { plugins,WoltLabDragAndDrop.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabDragAndDrop=function(){"use strict";return{init:function(){(this.opts.woltlab.attachments||this.opts.woltlab.media)&&require(["WoltLabSuite/Core/Ui/Redactor/DragAndDrop"],function(t){t.init(this)}.bind(this))}}}; })(this);
 
 // plugins/WoltLabEvent.js
-(function (window, undefined) { plugins,WoltLabEvent.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabEvent=function(){"use strict";return{init:function(){this._callbacks=[],this._elementId=this.$element[0].id,elData(this.$editor[0],"element-id",this._elementId),require(["EventHandler"],function(t){this.WoltLabEvent._setEvents(t),t.add("com.woltlab.wcf.redactor2","destroy_"+this._elementId,function(){t.removeAllBySuffix("com.woltlab.wcf.redactor2",this._elementId)}.bind(this))}.bind(this));var t=window.navigator.userAgent.toLowerCase();-1===t.indexOf("windows phone")&&-1===t.indexOf("edge/")&&(this.$editor[0].addEventListener("focus",function(){document.documentElement.classList.add("redactorActive")}),this.$editor[0].addEventListener("focusout",function(){window.setTimeout(function(){document.activeElement&&document.activeElement.classList.contains("redactor-layer")||document.documentElement.classList.remove("redactorActive")},100)})),this.events.iterateObserver=function(t){var e=!1;(!("textarea"!==this.opts.type&&"div"!==this.opts.type||this.detect.isFirefox()||t.target!==this.core.editor()[0]||"childList"!==t.type||t.addedNodes.length||t.removedNodes.length)||"class"===t.attributeName&&t.target===this.core.editor()[0]||"data-vivaldi-spatnav-clickable"===t.attributeName||"attributes"===t.type&&null===t.attributeName)&&(e=!0),e||(this.observe.load(),this.events.changeHandler())}.bind(this),this.events.observer.disconnect(),this.events.createObserver(),this.events.setupObserver()},_setEvents:function(i){var n=this.$element[0].id,t=this.observe.load;this.observe.load=function(){t.call(this),i.fire("com.woltlab.wcf.redactor2","observe_load_"+n,{editor:this.$editor[0]})}.bind(this),this.opts.callbacks.keyup=function(t){var e={cancel:!1,event:t};return i.fire("com.woltlab.wcf.redactor","keyup_"+n,e),!1===e.cancel},i.add("com.woltlab.wcf.redactor2","getText_"+n,function(t){t.message=this.code.get()}.bind(this)),i.add("com.woltlab.wcf.redactor2","reset_"+n,function(){this.code.set("")}.bind(this))},register:function(s,e){require(["EventHandler"],function(i){var n=this.uuid;-1===this._callbacks.indexOf(s)&&(this.opts.callbacks[s]=function(t){var e={cancel:!1,event:t,redactor:this};return i.fire("com.woltlab.wcf.redactor2",s+"_"+n+"_"+this.WoltLabEvent._elementId,e),!1===e.cancel}.bind(this),this._callbacks.push(s)),require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2",s+"_"+n+"_"+this.WoltLabEvent._elementId,e)}.bind(this))}.bind(this))}}}; })(this);
 
 // plugins/WoltLabFont.js
-(function (window, undefined) { plugins,WoltLabFont.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabFont=function(){"use strict";return{_fonts:["Arial, Helvetica, sans-serif","Comic Sans MS, Marker Felt, cursive","Consolas, Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif",'Trebuchet MS", Helvetica, sans-serif',"Verdana, Geneva, sans-serif"],init:function(){var o=this.WoltLabFont.setFont.bind(this),i={};this.WoltLabFont._fonts.forEach(function(t,e){i["fontFamily_"+e]={title:t.split(",")[0].replace(/['"]/g,""),func:o}}),i.removeFont={title:this.lang.get("remove-font"),func:this.WoltLabFont.removeFont.bind(this)};var t=this.button.add("woltlabFont","");this.button.addDropdown(t,i);var e=t.data("dropdown");e.find("a").each(function(t,e){e.className.match(/^redactor-dropdown-fontFamily_(\d+)$/)&&e.style.setProperty("font-family",this.WoltLabFont._fonts[RegExp.$1],"")}.bind(this)),$('<li class="dropdownDivider"></li>').insertBefore(e.children("li").last())},setFont:function(e){e=e.replace(/^fontFamily_/,""),this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.format(this.$editor[0],"font-family",this.WoltLabFont._fonts[e]),this.buffer.set()}.bind(this)),this.selection.restore()},removeFont:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.removeFormat(this.$editor[0],"font-family"),this.buffer.set()}.bind(this)),this.selection.restore()}}}; })(this);
 
 // plugins/WoltLabFullscreen.js
-(function (window, undefined) { plugins,WoltLabFullscreen.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabFullscreen=function(){"use strict";var t,l=!1;return{init:function(){var e=this.button.add("woltlabFullscreen","");this.button.addCallback(e,this.WoltLabFullscreen._toggle.bind(this)),t=e[0],elHide(t.parentNode),require(["Ui/Screen"],function(e){e.on("screen-sm-up",{match:function(){elShow(t.parentNode)},unmatch:function(){elHide(t.parentNode),l&&this.WoltLabFullscreen._toggle()}.bind(this),setup:function(){elShow(t.parentNode)}})}.bind(this))},_toggle:function(){t.children[0].classList.toggle("fa-compress"),t.children[0].classList.toggle("fa-expand");var e=elClosest(this.core.box()[0],".anchorFixedHeader");e&&e.classList.toggle("disableAnchorFixedHeader"),l=this.core.box()[0].classList.toggle("redactorBoxFullscreen")?(WCF.System.DisableScrolling.disable(),!0):(WCF.System.DisableScrolling.enable(),!1)}}}; })(this);
 
 // plugins/WoltLabHtml.js
-(function (window, undefined) { plugins,WoltLabHtml.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabHtml=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/Html"],function(t){new t(this)}.bind(this))}}}; })(this);
 
 // plugins/WoltLabImage.js
-(function (window, undefined) { plugins,WoltLabImage.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabImage=function(){"use strict";return{init:function(){var t;this.opts.woltlab.allowImages&&(t=this.button.add("woltlabImage",""),this.button.addCallback(t,this.WoltLabImage.add));var i=this.image.showEdit;this.image.showEdit=function(t){var e,a=t[0];a.classList.contains("smiley")||(i(t),this.modal.setTitle(WCF.Language.get("wcf.editor.image.edit")),this.modal.getActionButton().text(WCF.Language.get("wcf.global.button.save")),this.modal.getDeleteButton().text(WCF.Language.get("wcf.global.button.delete")),elById("redactor-image-source").value=a.src,e=elById("redactor-image-float"),a.classList.contains("messageFloatObjectLeft")?e.value="left":a.classList.contains("messageFloatObjectRight")&&(e.value="right"),a.classList.contains("woltlabAttachment")&&elRemove(elById("redactor-image-source-container")))}.bind(this);var o=this.image.update;this.image.update=function(){function t(t,e){$('<small class="innerError" />').text(e).insertAfter(t)}var e=this.observe.image[0],a=elById("redactor-image-source");if(!e.classList.contains("woltlabAttachment")){var i=a.value.trim();if(""===i)return t(a,WCF.Language.get("wcf.global.form.error.empty"));if(!i.match(this.opts.regexps.url))return t(a,WCF.Language.get("wcf.editor.image.source.error.invalid"));if(this.opts.woltlab.forceSecureImages&&0===i.indexOf("http://"))return t(a,WCF.Language.get("wcf.editor.image.source.error.insecure"));if(!this.WoltLabImage.isValidSource(i))return t(a,WCF.Language.get("wcf.editor.image.source.error.blocked"));e.src=i}e.classList.remove("messageFloatObjectLeft"),e.classList.remove("messageFloatObjectRight");var r=elById("redactor-image-float").value;"left"!==r&&"right"!==r||e.classList.add("messageFloatObject"+WCF.String.ucfirst(r)),o.call(this),e.removeAttribute("alt"),e.removeAttribute("title"),this.caret.after(e)}.bind(this),this.opts.modal["image-edit"]='<div class="section"><dl id="redactor-image-source-container"><dt><label for="redactor-image-source">'+WCF.Language.get("wcf.editor.image.source")+'</label></dt><dd><input type="text" id="redactor-image-source" class="long"></dd></dl><dl><dt><label for="redactor-image-link">'+WCF.Language.get("wcf.editor.image.link")+'</label></dt><dd><input type="text" id="redactor-image-link" class="long"></dd></dl><dl><dt><label for="redactor-image-float">'+WCF.Language.get("wcf.editor.image.float")+'</label></dt><dd><select id="redactor-image-float"><option value="none">'+WCF.Language.get("wcf.global.noSelection")+'</option><option value="left">'+WCF.Language.get("wcf.editor.image.float.left")+'</option><option value="right">'+WCF.Language.get("wcf.editor.image.float.right")+'</option></select></dd></dl><input id="redactor-image-title" style="display: none"><input id="redactor-image-caption" style="display: none"><div class="formSubmit"><button id="redactor-modal-button-action" class="buttonPrimary">Insert</button><button id="redactor-modal-button-delete" class="redactor-modal-button-offset">Delete</button></div></div>'},add:function(){this.modal.load("image-edit",WCF.Language.get("wcf.editor.image.insert")),this.modal.show(),this.modal.getDeleteButton().hide();var t=this.modal.getActionButton()[0];t.addEventListener(WCF_CLICK_EVENT,this.WoltLabImage.insert),t.textContent=WCF.Language.get("wcf.global.button.insert"),this.WoltLabModal.rebuild()},insert:function(t){t.preventDefault(),this.modal.getModal().find(".innerError").remove();function e(t,e){$('<small class="innerError" />').text(e).insertAfter(t)}var a=elById("redactor-image-source"),i=a.value.trim();if(""===i)return e(a,WCF.Language.get("wcf.global.form.error.empty"));if(!i.match(this.opts.regexps.url))return e(a,WCF.Language.get("wcf.editor.image.source.error.invalid"));if(this.opts.woltlab.forceSecureImages&&0===i.indexOf("http://"))return e(a,WCF.Language.get("wcf.editor.image.source.error.insecure"));if(!this.WoltLabImage.isValidSource(i))return e(a,WCF.Language.get("wcf.editor.image.source.error.blocked"));var r=elById("redactor-image-link"),o=r.value.trim();if(""!==o&&!o.match(this.opts.regexps.url))return e(r,WCF.Language.get("wcf.editor.image.link.error.invalid"));var l=elById("redactor-image-float").value,s="";"left"!==l&&"right"!==l||(s="messageFloatObject"+WCF.String.ucfirst(l));var n,d='<img src="'+WCF.String.escapeHTML(i)+'"'+(s?' class="'+s+'"':"")+">";o&&(n=WCF.getUUID(),d='<a href="'+WCF.String.escapeHTML(o)+'" data-uuid="'+n+'">'+d+"</a>"),this.modal.close(),this.buffer.set(),this.insert.html(d),n&&window.setTimeout(function(){var t=elBySel('a[data-uuid="'+n+'"]',this.core.editor()[0]);t&&(t.removeAttribute("data-uuid"),this.caret.after(t))}.bind(this),1)},isValidSource:function(t){var e=elCreate("a");if(e.href=t,""===e.hostname)return!0;if(this.opts.woltlab.images.secureOnly&&"https:"!==e.protocol)return!1;if(!this.opts.woltlab.images.external){var a=!1,i=[];if(this.opts.woltlab.images.whitelist.forEach(function(t){0===t.indexOf("*.")?i.push(t.replace(/^\*\./,"")):e.hostname===t&&(a=!0)}),a||i.forEach(function(t){e.hostname.substr(-1*t.length)===t&&(a=!0)}),!a)return!1}return!0},validateImages:function(){elBySelAll("img:not(.smiley):not(.woltlabAttachment)",this.core.editor()[0],function(t){this.WoltLabImage.isValidSource(t.src)||t.classList.add("editorImageBlocked")}.bind(this))}}}; })(this);
 
 // plugins/WoltLabIndent.js
-(function (window, undefined) { plugins,WoltLabIndent.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabIndent=function(){"use strict";return{init:function(){var s,a,d,i;this.detect.isFirefox()&&(d=this.indent.decrease,this.indent.decrease=function(){if(this.list.get()){var e=$(this.selection.current()).closest("li",this.core.editor()[0]);if(0===e.closest("ul, ol",this.core.editor()[0]).parent().closest("ul, ol",this.core.editor()[0]).length){var t,i,n=e[0];if(null!==elBySel("ul, ol",n)){if(this.buffer.set(),this.selection.save(),null!==(r=n.previousElementSibling)){for(t=elCreate(n.parentNode.nodeName.toLowerCase());r.nextSibling;)t.appendChild(r.nextSibling);(i=r.parentNode).parentNode.insertBefore(t,i.nextSibling)}if(null!==n.nextElementSibling){for(t=elCreate(n.parentNode.nodeName.toLowerCase());n.nextSibling;)t.appendChild(n.nextSibling);(i=n.parentNode).parentNode.insertBefore(t,i.nextSibling)}for(i=n.parentNode;n.childNodes.length;)i.parentNode.insertBefore(n.childNodes[0],i);return elRemove(i),void this.selection.restore()}}else{elBySelAll("woltlab-list-marker",this.core.editor()[0],elRemove),this.selection.save(),s=elCreate("woltlab-list-marker"),e[0].insertBefore(s,e[0].firstChild);var l=e[0].lastElementChild;if("BR"===l.nodeName){for(var o="",r=l;r=r.nextSibling;)o+=r.textContent;""===o.replace(/\u200B/g,"").trim()&&elRemove(l)}a=elCreate("woltlab-list-marker"),e[0].appendChild(a),this.selection.restore()}d.call(this)}}.bind(this),i=this.indent.removeEmpty,this.indent.removeEmpty=function(){if(s&&s.parentNode){for(var e,t=elCreate("li");(e=s.nextSibling)&&e!==a;)t.appendChild(e);s.parentNode.insertBefore(t,s),elBySelAll("woltlab-list-marker",this.core.editor()[0],elRemove),a=s=void 0}i.call(this)}.bind(this)),this.indent.repositionItem=function(e){var t=e.next();0===t.length||"UL"===t[0].tagName&&"OL"===t[0].tagName||e.append(t);var i=e.prev();0!==i.length&&"LI"!==i[0].tagName&&(this.selection.save(),e.closest("li",this.core.editor()[0]).after(e),this.selection.restore())}.bind(this),this.indent.normalize=function(){var e,t;this.detect.isFirefox()&&(!(e=this.selection.block())||"P"!==e.nodeName||(t=e.previousElementSibling)&&"BR"===t.nodeName&&elRemove(t)),this.core.editor().find("li").each($.proxy(function(e,t){var i=$(t),n="";0!==this.opts.keepStyleAttr.length&&(n=","+this.opts.keepStyleAttr.join(",")),i.find(this.opts.inlineTags.join(",")).not("img"+n).not("span").removeAttr("style");var l=i.parent();if(0===l.length||"LI"!==l[0].tagName){var o=i.next();0===o.length||"UL"!==o[0].tagName&&"OL"!==o[0].tagName||i.append(o)}else{for(;t.nextSibling;)t.appendChild(t.nextSibling);l.after(i)}},this))}.bind(this)}}}; })(this);
 
 // plugins/WoltLabInlineCode.js
-(function (window, undefined) { plugins,WoltLabInlineCode.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabInlineCode=function(){"use strict";var s;return{init:function(){this.opts.activeButtonsStates.kbd="tt",require(["Environment","EventHandler"],function(e,t){s=e,t.add("com.woltlab.wcf.redactor2","bbcode_tt_"+this.$element[0].id,this.WoltLabInlineCode._toggle.bind(this))}.bind(this))},_toggle:function(e){var t;e.cancel=!0;var o=window.getSelection();if(o.isCollapsed){t=null;var n=o.anchorNode;n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var r,d,i=!1;if("KBD"===n.nodeName&&""!==n.textContent.replace(/\u200b/g,"")&&(r=o.anchorNode,d=o.anchorOffset,r.nodeType===Node.TEXT_NODE&&0===d?t=r:r===n&&(0===d?i=!0:t=n.childNodes[d-1])),!1===i&&null!==t)for(var a,l=0,c=n.childNodes.length;l<c;l++){if((a=n.childNodes[l])===t){i=!0;break}if(a.nodeType!==Node.TEXT_NODE||""!==a.textContent.replace(/\u200b/g,""))break}if(i){var N=n.previousSibling;return null!==N&&N.nodeType===Node.TEXT_NODE&&"​"===N.textContent||(N=document.createTextNode("​"),n.parentNode.insertBefore(N,n)),void this.caret.before(n)}}if(this.button.toggle({},"kbd","func","inline.format"),(t=o.anchorNode).nodeType===Node.TEXT_NODE&&(t=t.parentNode),"KBD"===t.nodeName){var f=t.nextSibling;if("ios"===s.platform()&&"safari"===s.browser())return void(f&&"BR"===f.nodeName&&t.parentNode.insertBefore(document.createTextNode("​"),f));for(;f;){if(f.nodeType!==Node.TEXT_NODE||f.textContent.length)return;f=f.nextSibling}f?f.textContent="​":t.parentNode.appendChild(document.createTextNode("​"))}}}}; })(this);
 
 // plugins/WoltLabInsert.js
-(function (window, undefined) { plugins,WoltLabInsert.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabInsert=function(){"use strict";return{init:function(){var s=this.opts.woltlab.placeholderCallback,a=this.insert.html;this.insert.html=function(e,t){s=s&&s();var o=window.getSelection();o.rangeCount&&"IMG"===o.anchorNode.nodeName&&this.caret.after(o.anchorNode),this.placeholder.hide(),this.core.editor().focus(),!this.detect.isFirefox()||null===(o.anchorNode.nodeType===Node.TEXT_NODE?o.anchorNode.parentNode:o.anchorNode).closest(".redactor-layer")&&(this.selection.restore(),null===(o.anchorNode.nodeType===Node.TEXT_NODE?o.anchorNode.parentNode:o.anchorNode).closest(".redactor-layer")&&(this.WoltLabCaret.endOfEditor(),this.selection.save()));var r,n=this.selection.block(),i=""===this.$editor[0].innerHTML.replace(/<\/?p>/g,"").replace(/<br>/g,"").replace(/\u200B/g,"").trim();a.call(this,e,t),i&&(n=this.$editor[0].firstElementChild),n&&"P"===n.nodeName&&n.nextElementSibling&&(r=!1,(0===n.childElementCount&&""===n.textContent.replace(/\u200B/g,"").trim()||1===n.childElementCount&&"<br>"===n.innerHTML)&&(r=!0),r&&elRemove(n)),o.rangeCount&&"IMG"===o.anchorNode.nodeName&&this.caret.after(o.anchorNode)}.bind(this);var t=this.insert.text;this.insert.text=function(e){s=s&&s(),this.core.editor().focus(),this.selection.restore(),elClosest(window.getSelection().anchorNode,".redactor-layer")!==this.core.editor()[0]&&this.WoltLabCaret.endOfEditor(),t.call(this,e),this.selection.saveInstant()}.bind(this),this.insert.placeHtml=function(e){var t=!1;e.forEach(function(e){e instanceof Element&&e.classList.contains("woltlab-bbcode-marker")&&(t=!0)});var o=document.createElement("span");o.id="redactor-insert-marker",o=this.insert.node(o),$(o).before(e),t||(this.selection.restore(),this.caret.after(o)),$(o).remove()}.bind(this)}}}; })(this);
 
 // plugins/WoltLabKeydown.js
-(function (window, undefined) { plugins,WoltLabKeydown.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabKeydown=function(){"use strict";var s=!1,n=[];return{init:function(){var b=window.getSelection();require(["Environment"],function(e){s="safari"===e.browser()});var y=this.keydown.init;this.keydown.init=function(e){if(this.detect.isFirefox()&&b.isCollapsed&&e.which===this.keyCode.BACKSPACE&&((N=b.anchorNode).nodeType===Node.ELEMENT_NODE&&0<b.anchorOffset&&(N=N.childNodes[b.anchorOffset-1]),N.nodeType===Node.TEXT_NODE&&"​"===N.textContent)){for(var t=[],i=N;i=i.previousSibling;){if(i.nodeType===Node.ELEMENT_NODE){"IMG"!==i.nodeName&&(t=[]);break}if(i.nodeType===Node.TEXT_NODE){var n=i.textContent;if(""!==n&&"​"!==n){t=[];break}t.push(i)}}t.length&&t.forEach(elRemove)}if((e.originalEvent.which===this.keyCode.BACKSPACE||e.originalEvent.which===this.keyCode.DELETE)&&b.isCollapsed){var o=this.selection.block();if("P"===o.nodeName){if(this.list.combineAfterAndBefore(o))return void e.originalEvent.preventDefault();if(this.utils.isEmpty(o.innerHTML)&&o.previousElementSibling!==o.nextElementSibling){var r=null,l=null;return e.originalEvent.which===this.keyCode.BACKSPACE?null===o.previousElementSibling?l=o.nextElementSibling:r=o.previousElementSibling:null===o.nextElementSibling?r=o.previousElementSibling:l=o.nextElementSibling,elRemove(o),null===l?("OL"!==r.nodeName&&"UL"!==r.nodeName||(r=r.lastElementChild),this.caret.end(r)):("OL"!==l.nodeName&&"UL"!==l.nodeName||(l=l.firstElementChild),this.caret.start(l)),void e.originalEvent.preventDefault()}}else{if(e.originalEvent.which===this.keyCode.DELETE&&-1!==["H1","H2","H3","H4","H5","H6"].indexOf(o.nodeName)&&this.utils.isEmpty(o.innerHTML)){var s=o.nextElementSibling;return s?s=o.nextElementSibling:((s=elCreate("p")).innerHTML=this.opts.invisibleSpace,o.parentNode.appendChild(s)),o.parentNode.removeChild(o),this.caret.start(s),void e.originalEvent.preventDefault()}if(this.detect.isWebkit()&&"LI"===o.nodeName&&e.which===this.keyCode.DELETE){var a=b.anchorNode;if(a.nodeType===Node.TEXT_NODE&&a.textContent.length===b.anchorOffset&&a.parentNode.lastChild===a){var d=o.nextElementSibling;if(d&&"LI"===d.nodeName){for(this.buffer.set(),this.selection.save();d.childNodes.length;)o.appendChild(d.childNodes[0]);return elRemove(d),this.selection.restore(),void e.preventDefault()}}}}}var h,c=null;if(e.which===this.keyCode.BACKSPACE&&this.detect.isFirefox()){var f=this.selection.block();if(f&&"P"===f.tagName&&this.utils.isStartOfElement(f)){var u=f.previousElementSibling;if(u&&("OL"===u.nodeName||"UL"===u.nodeName)){this.buffer.set(),this.selection.save();for(var m=u.lastElementChild;f.childNodes.length;)m.appendChild(f.childNodes[0]);return elRemove(f),this.selection.restore(),void e.preventDefault()}u&&"P"===u.nodeName&&null!==(c=u.lastElementChild)&&"BR"!==c.nodeName&&(c=null)}}if(!1===y.call(this,e)||e.originalEvent.defaultPrevented)null===c||!this.detect.isFirefox()||1===(h=b.getRangeAt(0)).startOffset&&h.startContainer.firstElementChild===c&&elRemove(c);else if(!(39!==(e=e.originalEvent).which||e.ctrlKey||e.shiftKey||e.metaKey||e.altKey)){if(!b.isCollapsed)return;var v=b.anchorNode;if(v.nodeType!==Node.TEXT_NODE||b.getRangeAt(0).startOffset!==v.textContent.length)return;var p=v.parentNode;if("KBD"!==p.nodeName)return;for(var g=!0,N=p;N&&N!==this.core.editor()[0];){if(null!==N.nextSibling){for(;N.nextSibling&&N.nextSibling.nodeType===Node.TEXT_NODE&&0===N.nextSibling.textContent.length;)N.parentNode.removeChild(N.nextSibling);if(N.nextSibling&&"BR"!==N.nextSibling.nodeName||null!==N.nextSibling.nextSibling){g=!1;break}}N=N.parentNode}g&&p.parentNode.insertBefore(document.createTextNode("​"),p.nextSibling)}}.bind(this);var e=window.navigator.userAgent.toLowerCase();-1!==e.indexOf("linux")&&-1!==e.indexOf("android")&&-1!==e.indexOf("chrome")&&(this.keydown.checkEvents=function(){this.core.addEvent(!1)}.bind(this)),this.core.editor().off("keydown.redactor"),this.core.editor().on("keydown.redactor",this.keydown.init.bind(this)),this.keydown.onArrowDown=function(){for(var e,t,i=this.WoltLabKeydown._getBlocks(),n=0;n<i.length;n++)if(t=i[n]){if(!this.utils.isEndOfElement(t))continue;if(null!==(e=t.nextElementSibling)&&"P"===e.nodeName)break;return void this.keydown.insertAfterLastElement(t)}}.bind(this),this.keydown.onArrowUp=function(){for(var e,t,i=this.WoltLabKeydown._getBlocks(),n=0;n<i.length;n++)if(t=i[n]){if(!this.utils.isStartOfElement())break;if(null===(e=t.previousElementSibling)||"P"===e.nodeName)return void this.keydown.insertBeforeFirstElement(t);var o=$(this.opts.emptyHtml)[0];t.parentNode.insertBefore(o,t),this.caret.end(o);break}}.bind(this);var n=function(e){if(!1===this.core.callback("enter",e))return e.preventDefault(),!1;if(this.keydown.blockquote&&!0===this.keydown.exitFromBlockquote(e))return!1;if(this.keydown.pre)return this.keydown.insertNewLine(e);if(this.keydown.blockquote||this.keydown.figcaption)return this.keydown.insertBreakLine(e);if(this.keydown.figure)setTimeout($.proxy(function(){this.keydown.replaceToParagraph("FIGURE")},this),1);else if(this.keydown.block){var t,i,n,o,r=null;this.detect.isFirefox()&&"P"===this.keydown.block.nodeName&&b.isCollapsed&&(null!==(t=elClosest(b.getRangeAt(0).startContainer,"a"))&&null===elBySel("br",t)&&(r=this.keydown.block)),setTimeout($.proxy(function(){var t,e,i;this.keydown.replaceToParagraph("DIV"),null!==r&&null!==r.previousElementSibling&&(t=[],elBySelAll("a",r.previousElementSibling,function(e){t.push(e)}),t.length&&(e=t[t.length-1],null!==(i=elBySel("br",e))&&elRemove(i)))},this),1),"LI"===this.keydown.block.tagName&&(i=this.selection.current(),n=elClosest(i,"li"),this.utils.isRedactorParent(n)&&this.utils.isEmpty(n.innerHTML)&&null===n.nextElementSibling&&(n.innerHTML=s?"<br>":"",s&&((o=document.createRange()).selectNodeContents(n),o.collapse(!1),b.removeAllRanges(),b.addRange(o))))}else if(!this.keydown.block)return this.keydown.insertParagraph(e);return this.detect.isFirefox()&&this.utils.isInline(this.keydown.parent)?(this.keydown.insertBreakLine(e),void setTimeout(function(){for(var e=this.selection.block(),t=this.selection.inline();t&&t!==e;){if("A"===t.nodeName){var i=!1;if(0===t.childNodes.length?i=!0:""===t.textContent.replace(/\u200B/g,"").trim()&&(i=!0,elBySelAll("*",t,function(e){"SPAN"!==e.nodeName&&(i=!1)})),i){for(;t.childNodes.length;)t.parentNode.insertBefore(t.childNodes[0],t);elRemove(t);break}}t=t.parentNode}}.bind(this),1)):void 0}.bind(this);this.keydown.onEnter=function(e){var t=this.keydown.blockquote;t&&(this.keydown.blockquote=!1);var i=n.call(this,e);return t&&(this.keydown.blockquote=t),i}.bind(this),this.keydown.replaceToParagraph=function(e){var t=this.selection.block(),i=t.innerHTML.replace(/<br\s?\/?>/gi,"");if(t.tagName===e&&this.utils.isEmpty(i)&&!$(t).hasClass("redactor-in")){var n=document.createElement("p");$(t).replaceWith(n);var o=document.createRange();o.setStart(n,0);var r=document.createTextNode("​");o.insertNode(r),o.setStartAfter(r),o.collapse(!0);var l=window.getSelection();return l.removeAllRanges(),l.addRange(o),!1}"P"===t.tagName&&$(t).removeAttr("style")}.bind(this),this.keydown.onShiftEnter=function(e){return this.buffer.set(),this.keydown.pre?this.keydown.insertNewLine(e):this.insert.raw("<br>​")}.bind(this);var r=this.keydown.onTab;this.keydown.onTab=function(e,t){if(!this.keydown.pre){var i=$(this.selection.current()).closest("ul, ol, td",this.core.editor()[0]);if(0===i.length)return!0;if("TD"===(i=i[0]).nodeName){var n,o=null;return e.originalEvent.shiftKey?null===(o=i.previousElementSibling)&&null!==(o=i.parentNode.previousElementSibling)&&(o=o.lastElementChild):null===(o=i.nextElementSibling)&&(null===(o=i.parentNode.nextElementSibling)&&(this.table.addRowBelow(),o=i.parentNode.nextElementSibling),o=o.firstElementChild),null!==o&&(this.utils.isEmpty(o.innerHTML)?this.caret.end(o):((n=document.createRange()).selectNodeContents(o),b.removeAllRanges(),b.addRange(n))),e.originalEvent.preventDefault(),!1}}return r.call(this,e,t)}.bind(this);var l=this.keydown.formatEmpty;this.keydown.formatEmpty=function(e){for(var t,i=this.$editor[0],n=0,o=i.childElementCount;n<o;n++)if("P"!==(t=i.children[n]).nodeName&&this.utils.isBlockTag(t.nodeName))return;return l.call(this,e)}.bind(this);var t=this.keydown.removeInvisibleSpace;this.keydown.removeInvisibleSpace=function(){this.keydown.current!==this.$editor[0]&&t.call(this)}.bind(this),require(["Core","Environment"],function(i,e){var t,n,o;"desktop"!==e.platform()||null!==(t=this.$editor[0].closest("form, .message, .jsOuterEditorContainer"))&&(null===(n=elBySel(".formSubmit",t))||(o=elBySel('input[type="submit"], button[data-type="save"], button[accesskey="s"]',n))&&(o.removeAttribute("accesskey"),this.WoltLabEvent.register("keydown",function(e){var t;83===e.event.which&&(t=!1,window.navigator.platform.match(/^Mac/)?e.event.ctrlKey&&e.event.altKey&&(t=!0):e.event.altKey&&!e.event.ctrlKey&&(t=!0),t&&(e.cancel=!0,"function"==typeof o.click?o.click():i.triggerEvent(o,WCF_CLICK_EVENT)))}.bind(this))))}.bind(this)),this.WoltLabKeydown._handleBackspaceAndDelete()},register:function(e){-1===n.indexOf(e)&&n.push(e)},_getBlocks:function(){for(var e=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],t=0,i=n.length;t<i;t++)e.push(this.utils.isTag(this.keydown.current,n[t]));return e},_handleBackspaceAndDelete:function(){function f(e){return null===elBySel("img",e)&&""===e.textContent.replace(/\u200B/g,"").trim()}var t=function(e){var t,i=this.selection.block();if(i)if("TD"===i.nodeName){var n=i.innerHTML;"​"===n?e.preventDefault():""===n&&(e.preventDefault(),i.innerHTML="​")}else if(-1!==i.nodeName.indexOf("-")&&f(i))(t=i.parentNode).insertBefore(this.marker.get(),i.nextSibling),elRemove(i),this.selection.restore();else if((t=i&&"P"===i.nodeName?i.parentNode:null)&&-1!==t.nodeName.indexOf("-")){var o=window.getSelection().getRangeAt(0),r=document.createRange();r.setStartBefore(i),r.setEnd(o.startContainer,o.startOffset);var l=r.cloneContents(),s=elCreate("div");if(s.appendChild(l),f(s)){e.preventDefault();var a=i.previousElementSibling,d=null;if(a)d=f(a);else for(t=i;(t=t.parentNode)&&t!==this.$editor[0];)if(a=t.previousElementSibling){d=!1;break}if(d)elRemove(a);else if(null!==d){var h,c=i.parentNode;if("P"===a.nodeName){for(a.appendChild(this.marker.get());i.childNodes.length;){if("BR"===(h=i.childNodes[0]).nodeName){elRemove(h);break}a.appendChild(h)}0===i.childNodes.length&&elRemove(i),this.selection.restore()}else a.appendChild(i),i.insertBefore(this.marker.get(),i.firstChild),this.selection.restore();f(c)&&elRemove(c)}else null===d&&(t=i.parentNode,f(t)&&elRemove(t))}}}.bind(this),i=function(e){var t,i=this.selection.block();if(-1!==i.nodeName.indexOf("-")&&f(i))(t=i.parentNode).insertBefore(this.marker.get(),i.nextSibling),elRemove(i),this.selection.restore();else if((t=i&&"P"===i.nodeName?i.parentNode:null)&&-1!==t.nodeName.indexOf("-")){var n=window.getSelection().getRangeAt(0),o=document.createRange();o.setStart(n.startContainer,n.startOffset),o.setEndAfter(i);var r=o.cloneContents(),l=elCreate("div");if(l.appendChild(r),f(l)){e.preventDefault();var s=i.nextElementSibling,a=null;if(s)a=f(s);else for(t=i;(t=t.parentNode)&&t!==this.$editor[0];)if(s=t.nextElementSibling){a=!1;break}if(a)elRemove(s);else if(null!==a){var d=s.parentNode;if("P"===s.nodeName){for(;s.childNodes.length;)i.appendChild(s.childNodes[0]);elRemove(s)}else{if(i.appendChild(this.marker.get()),t=i.parentNode,-1!==s.nodeName.indexOf("-")){var h=s.firstElementChild;if(h&&"P"===h.nodeName){for(;h.childNodes.length;)i.appendChild(h.childNodes[0]);s.removeChild(h),f(s)&&elRemove(s)}}else t.insertBefore(s,i.nextSibling);this.selection.restore()}f(d)&&elRemove(d)}else null===a&&(t=i.parentNode,f(t)&&elRemove(t))}}}.bind(this),l=function(){return this.opts.blockTags.filter(function(e){return-1!==e.indexOf("-")}).join(",")}.bind(this),s=[],a=function(){elBySelAll(l(),this.core.editor()[0],function(o){null!==o.parentNode&&-1!==s.indexOf(o)&&["nextElementSibling","previousElementSibling"].forEach(function(e){for(var t,i=o[e];null!==i&&i.nodeName===o.nodeName&&-1===s.indexOf(i);){if("previousElementSibling"===e)for(var n=i.childNodes.length-1;0<=n;n--)o.insertBefore(i.childNodes[n],o.firstChild);else for(;0<i.childNodes.length;)o.appendChild(i.childNodes[0]);t=i[e],elRemove(i),i=t}})})}.bind(this),d=0,h=function(){var n=!1;elBySelAll(l(),this.core.editor()[0],function(e){var t=elData(e,"firefox-duplication-bug");if(""!==t){var i=s[parseInt(t,10)];if(null!==i&&null!==i.parentNode&&e!==i&&i.contains(e)){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);return e.parentNode.removeChild(e),void(n=!0)}e.removeAttribute("data-firefox-duplication-bug")}}),n&&elBySelAll("h1,h2,h3,h4,h5,h6",this.core.editor()[0],function(e){elBySelAll("p",e,function(e){for(;e.childNodes.length;)e.parentNode.insertBefore(e.childNodes[0],e);e.parentNode.removeChild(e)})}),d=0}.bind(this);this.keydown.onBackspaceAndDeleteAfter=function(o){this.detect.isFirefox()&&(this.selection.isCollapsed()?o.which===this.keyCode.BACKSPACE?t(o):o.which===this.keyCode.DELETE&&i(o):o.which!==this.keyCode.BACKSPACE&&o.which!==this.keyCode.DELETE||elBySelAll(l(),this.core.editor()[0],function(e){s.push(e),elData(e,"firefox-duplication-bug",d++)}));var e,r=!1;o.which===this.keyCode.BACKSPACE&&this.selection.isCollapsed()&&this.detect.isWebkit()&&(!1!==(e=this.selection.block())&&"PRE"===e.nodeName&&(r=!0)),setTimeout($.proxy(function(){var e;if(0<s.length&&(this.selection.save(),a(),h(),this.selection.restore(),s=[]),r){var t=this.selection.block();if((!1===t||"PRE"!==t.nodeName)&&(e=this.selection.current()).nodeType===Node.TEXT_NODE&&e.nextSibling&&"SPAN"===e.nextSibling.nodeName){var i=e.nextSibling;if(-1!==i.style.getPropertyValue("font-family").indexOf("monospace")&&"pre-wrap"===i.style.getPropertyValue("white-space")){for(;i.childNodes.length;)i.parentNode.insertBefore(i.childNodes[0],i);elRemove(i)}}}this.code.syncFire=!1,this.keydown.removeEmptyLists();var n="";0!==this.opts.keepStyleAttr.length&&(n=","+this.opts.keepStyleAttr.join(",")),this.core.editor().find("*[style]").not("span, img, figure, iframe, #redactor-image-box, #redactor-image-editter, [data-redactor-style-cache], [data-redactor-span]"+n).removeAttr("style"),this.keydown.formatEmpty(o),"KBD"===(e=this.selection.current()).nodeName&&0===e.innerHTML.length&&elRemove(e),this.code.syncFire=!0},this),1)}.bind(this)}}}; })(this);
 
 // plugins/WoltLabKeyup.js
-(function (window, undefined) { plugins,WoltLabKeyup.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabKeyup=function(){"use strict";return{init:function(){this.WoltLabEvent.register("keyup",function(e){e.event.originalEvent.which===this.keyCode.ENTER&&this.WoltLabKeyup._keyupEnter()}.bind(this))},_keyupEnter:function(){var e=this.$editor[0],n=window.getSelection(),t=null;if(this.detect.isFirefox()){var r=n.anchorNode;if(r.nodeType===Node.TEXT_NODE&&0===n.anchorOffset&&(t=r.parentNode).childNodes[0]===r&&(r=r.parentNode),"LI"===r.nodeName){var i=r.parentNode;if("LI"===(t=i.parentNode).nodeName&&null===i.previousSibling)return t.insertBefore(this.marker.get(),i),t.insertBefore(elCreate("br"),i),void this.selection.restore()}}var o,l=elClosest(n.anchorNode,"li");null!==l&&e.contains(l)&&(null===(o=l.previousElementSibling)||"OL"!==o.nodeName&&"UL"!==o.nodeName||o.previousElementSibling.appendChild(o));for(var a=n.anchorNode;a.parentNode;){if(a.parentNode===e){t=a;break}a=a.parentNode}null!==t&&"P"===t.nodeName&&(this.WoltLabKeyup._rebuildEmptyParagraph(t,!1),null!==(t=t.previousElementSibling)&&"P"===t.nodeName&&this.WoltLabKeyup._rebuildEmptyParagraph(t,!0))},_rebuildEmptyParagraph:function(e,n){if(!(0<e.textContent.replace(/\u200B/g,"").trim().length)){for(var t,r=e;r.nodeType===Node.ELEMENT_NODE&&0!==r.childNodes.length;){if(1<r.children.length)return;r=1===r.children.length?r.children[0]:r.childNodes[0]}r.nodeType===Node.TEXT_NODE&&(t=elCreate("br"),r.parentNode.appendChild(t),n&&elRemove(r))}}}}; })(this);
 
 // plugins/WoltLabLine.js
-(function (window, undefined) { plugins,WoltLabLine.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabLine=function(){"use strict";return{init:function(){this.line.removeOnBackspace=function(){var t,i;this.utils.isCollapsed()&&(0===(t=$(this.selection.block())).length||!this.utils.isStartOfElement(t)||(i=t.prev()).length&&"HR"===i[0].tagName&&(e.preventDefault(),i.remove()))}.bind(this)}}}; })(this);
 
 // plugins/WoltLabLink.js
-(function (window, undefined) { plugins,WoltLabLink.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabLink=function(){"use strict";var r=null;return{init:function(){this.link.isUrl=function(i){var t="((xn--)?[\\W\\w\\D\\d]+(-(?!-[\\W\\w\\D\\d])+)*\\.)+[\\W\\w]{2,}",e=new RegExp("^(http|ftp|https|steam|ts3server)://"+t,"i"),s=new RegExp("^"+t,"i"),r=new RegExp(".(html|php)$","i"),l=new RegExp("^/","i"),n=new RegExp("^tel:(.*?)","i");return-1===i.search(e)&&-1!==i.search(s)&&-1===i.search(r)&&"/"!==i.substring(0,1)&&(i="http://"+i),(-1!==i.search(e)||-1!==i.search(r)||-1!==i.search(l)||-1!==i.search(n))&&i}.bind(this),this.link.show=this.WoltLabLink.show.bind(this),this.link.parse=function(i){var t;return this.link.isMailto(i.url)?i.url="mailto:"+i.url.replace("mailto:",""):0!==i.url.search("#")&&this.opts.linkValidation&&(!1===(t=this.link.isUrl(i.url))&&(t="http://"+i.url),i.url=t),!this.link.isEmpty(i)&&!1!==i.url&&i}.bind(this),require(["WoltLabSuite/Core/Ui/Redactor/Link"],function(i){r=i})},show:function(i){void 0!==i&&i.preventDefault&&i.preventDefault();var t=this.selection.is();this.selection.save(),this.observe.closeAllTooltip();var e=this.link.is();t&&this.selection.restore();var s=this.link.buildLinkFromElement(e);t&&this.selection.save(),r.showDialog({insert:!1===e,submitCallback:function(){var i=this.link.buildLinkFromModal();return!1!==i&&(this.selection.restore(),this.link.insert(i,!0),!0)}.bind(this)}),s.url=this.link.removeSelfHostFromUrl(s.url),this.link.setModalValues(s),this.detect.isDesktop()&&$("#redactor-link-url").focus()}}}; })(this);
 
 // plugins/WoltLabList.js
-(function (window, undefined) { plugins,WoltLabList.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabList=function(){"use strict";return{parentsQualifiedForLists:["woltlab-quote","woltlab-spoiler"],init:function(){this.list.combineAfterAndBefore=function(t){var e,i,s=$(t).prev(),n=$(t).next(),o=t&&"P"===t.tagName&&("<br>"===t.innerHTML||""===t.innerHTML),r=1===s.closest("ol, ul",this.core.editor()[0]).length&&1===n.closest("ol, ul",this.core.editor()[0]).length,l=!1;if(r&&!o&&0===t.textContent.replace(/\u200b/g,"").trim().length&&(e=["A","B","BR","EM","I","STRONG","U"],i=!0,elBySelAll("*",t,function(t){-1===e.indexOf(t.nodeName)&&("SPAN"===t.nodeName&&""===t.className.trim()||(i=!1))}),i&&(o=l=!0)),o&&r){if("LI"===t.nodeName&&l)return s.append(this.marker.get()),elRemove(t),this.selection.restore(),!0;s.children("li").last().append(this.marker.get()),s.append(n.contents());var a=t.nextElementSibling;return"OL"!==a.nodeName&&"UL"!==a.nodeName||0!==a.childElementCount||elRemove(a),l&&elRemove(t),this.selection.restore(),!0}return!1}.bind(this),this.list.toggle=function(t){if(!this.utils.inBlocks(["table","td","th","tr"])){t=(t="unorderedlist"===(t="orderedlist"===t?"ol":t)?"ul":t).toLowerCase(),this.buffer.set(),this.selection.save();var e=this.list._getBlocks(),i=this.selection.block(),s=$(i).parent().closest("ol, ul",this.core.editor()[0]);return 0===e.length&&0!==s.length&&(e=[s.get(0)]),e=this.list._isUnformat(t,e)?this.list._unformat(t,e):this.list._format(t,e),this.selection.restore(),e}}.bind(this),this.list._getBlocks=function(){return this.selection.blocks().filter(function(t){var e=t.parentNode;return!!e.classList.contains("redactor-in")||-1!==this.WoltLabList.parentsQualifiedForLists.indexOf(e.nodeName.toLowerCase())}.bind(this))}.bind(this)}}}; })(this);
 
 // plugins/WoltLabMedia.js
-(function (window, undefined) { plugins,WoltLabMedia.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabMedia=function(){"use strict";return{init:function(){var t=this.button.add("woltlabMedia","");$(t).addClass("jsMediaEditorButton");var e=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","metacode_wsm_"+this.$element[0].id,function(t){var e,a,i;1!==t.attributes.length&&(e="",3===t.attributes.length&&("left"===t.attributes[2]?e=" messageFloatObjectLeft":"right"===t.attributes[2]&&(e=" messageFloatObjectRight")),(a=elCreate("img")).className="woltlabSuiteMedia"+e,a.src=this.opts.woltlab.mediaUrl.replace(/&amp;/,"&").replace("-123456789",t.attributes[0]).replace("thumbnail=void",function(){return t.attributes[1]?"thumbnail="+t.attributes[1]:""}),elData(a,"media-id",t.attributes[0]),elData(a,"media-size",t.attributes[1]),(i=t.metacode).parentNode.insertBefore(a,i),elRemove(i),t.cancel=!0)}.bind(this));WCF.System.Event.addListener("com.woltlab.wcf.redactor2","destroy_"+this.$element[0].id,function(){WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","metacode_wsm_"+this.$element[0].id,e)}.bind(this)),require(["WoltLabSuite/Core/Media/Manager/Editor"],function(t){new t({editor:this})}.bind(this))}}}; })(this);
 
 // plugins/WoltLabMention.js
-(function (window, undefined) { plugins,WoltLabMention.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabMention=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/Mention"],function(t){new t(this)}.bind(this))}}}; })(this);
 
 // plugins/WoltLabModal.js
-(function (window, undefined) { plugins,WoltLabModal.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabModal=function(){"use strict";var e=null,o="",n=null,r={close:function(){this.selection.restore(),n.getDialog("redactorOverlay-"+this.uuid)&&n.close("redactorOverlay-"+this.uuid)},load:function(t,i){e.innerHTML=this.modal.getTemplate(t),o=i},setTitle:function(t){n.setTitle(this,t)},show:function(){this.selection.save(),n.open(this),n.setTitle(this,o)}};return{init:function(){(e=elCreate("div")).className="redactorModalWrapper",e.id="redactorOverlay-"+this.uuid,elHide(e),document.body.appendChild(e),this.$modalBody=$(e),require(["Ui/Dialog"],function(t){for(var i in n=t,r)r.hasOwnProperty(i)&&(this.modal[i]=r[i].bind(this))}.bind(this)),this._dialogSetup=function(){return{id:"redactorOverlay-"+this.uuid,options:{onClose:function(t){var i=n.getDialog(t);elBySelAll("[id]",i.content,function(t){t.removeAttribute("id")})}}}}},rebuild:function(){n&&n.rebuild("redactorOverlay-"+this.uuid)}}}; })(this);
 
 // plugins/WoltLabObserve.js
-(function (window, undefined) { plugins,WoltLabObserve.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabObserve=function(){"use strict";return{init:function(){var i=elByClass("re-button",this.button.toolbar()[0]);this.button.setInactiveAll=function(t){for(var e,s=0,o=i.length;s<o;s++)(e=i[s]).classList.contains("re-"+t)||(e.classList.remove("redactor-act"),"html"!==e.rel&&elAttr(e,"tabindex",-1),elAttr(e,"aria-pressed",!1))}.bind(this),this.observe.buttons=function(t,e){var s=this.selection.current();if(!1!==t?this.button.setInactiveAll():this.button.setInactiveAll(e),!1!==t||"html"===e){if(this.utils.isRedactorParent(s)){var o=this.WoltLabSource.isActive();this.utils.isCurrentOrParentHeader()||this.utils.isCurrentOrParent(["table","pre","blockquote","li"])?this.button.disable("horizontalrule"):o||this.button.enable("horizontalrule"),this.utils.isCurrentOrParent(["table","li"])?(this.button.disable("code"),this.button.disable("spoiler"),this.button.disable("woltlabHtml"),this.button.disable("woltlabQuote")):o||(this.button.enable("code"),this.button.enable("spoiler"),this.button.enable("woltlabHtml"),this.button.enable("woltlabQuote")),o&&this.button.setActive("html"),this.core.box()[0].classList.contains("redactorBoxFullscreen")&&this.button.setActive("woltlabFullscreen");var i=this.$editor[0];if(s.nodeType!==Node.ELEMENT_NODE&&(s=s.parentNode),s.closest(".redactor-layer")===i)for(var r,n,l=[];s!==i;)n=s.nodeName.toLowerCase(),-1===l.indexOf(n)&&("pre"===(r=n)&&s.classList.contains("woltlabHtml")&&(r="woltlab-html"),this.opts.activeButtonsStates.hasOwnProperty(r)&&this.button.setActive(this.opts.activeButtonsStates[r]),"pre"!==n&&l.push(n)),s=s.parentNode}}else-1!==$.inArray(e,this.opts.activeButtons)&&this.button.toggleActive(e)}.bind(this),this.observe.dropdowns=function(){var t=this.selection.current();t&&t.nodeType!==Node.ELEMENT_NODE&&(t=t.parentNode);var e,s=this.$editor[0],o=t&&t.closest(".redactor-layer")===s,i=[];if(o)for(;t!==s;)e=t.nodeName.toLowerCase(),-1===i.indexOf(e)&&i.push(e),t=t.parentNode;for(var r,n=null,l=0,a=this.opts.observe.dropdowns.length;l<a;l++){var b=(r=this.opts.observe.dropdowns[l]).observe,h=b.element,u=r.item,c=!!b.in&&b.in,d=!!b.out&&b.out;"a"===h&&null===n&&(n=$("<div />").html(this.selection.html()).find("a").length),-1!==i.indexOf(h)&&o||"a"===h&&0!==n?this.observe.setDropdownProperties(u,c,d):this.observe.setDropdownProperties(u,d,c)}}.bind(this)}}}; })(this);
 
 // plugins/WoltLabPage.js
-(function (window, undefined) { plugins,WoltLabPage.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabPage=function(){"use strict";return{init:function(){var e=this.button.add("woltlabPage","");require(["WoltLabSuite/Core/Ui/Redactor/Page"],function(t){new t(this,e[0])}.bind(this))}}}; })(this);
 
 // plugins/WoltLabPaste.js
-(function (window, undefined) { plugins,WoltLabPaste.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabPaste=function(){"use strict";var p=null;return{init:function(){var l=null,v=!1,g=document.documentMode&&"object"==typeof window.clipboardData,o=null,d=null,h=function(t){this.rtePaste=!0;var e=!("pre"!==this.opts.type&&!this.utils.isCurrentOrParent("pre"));this.utils.saveScroll(),this.selection.save(),this.paste.createPasteBox(e);var i=this.paste.getPasteBoxCode(e);this.buffer.set(),this.selection.restore(),this.utils.restoreScroll();var n=this.clean.getCurrentType(i),i=this.clean.onPaste(i,n),r=this.core.callback("paste",i);i=void 0===r?i:r,this.paste.insert(i,n),this.rtePaste=!1,e&&this.clean.cleanPre()}.bind(this),c=this.paste.init;this.paste.init=function(t){d=o=null;var e,i,n,r,s,a="pre"===this.opts.type||this.utils.isCurrentOrParent("pre");v=!a&&this.utils.isCurrentOrParent("kbd"),a||v?(l=g?window.clipboardData.getData("Text"):t.originalEvent.clipboardData.getData("text/plain"),e=this.clean.encodeEntities,this.clean.encodeEntities=function(t){return this.clean.encodeEntities=e,WCF.String.escapeHTML(t)}.bind(this)):g||(n=!1,-1!==(i=t.originalEvent.clipboardData.types).indexOf("text/html")&&((o=t.originalEvent.clipboardData.getData("text/html")).trim().match(/^<html[^>]*>[\s\S]*?<body[^>]*>([\s\S]+)<\/body>[\s\S]*?<\/html>$/)&&(o=RegExp.$1.replace(/^\s*(?:<!--StartFragment-->)(.+)(?:<!--EndFragment-->)?\s*$/,"$1")),n=0!==o.trim().length),n||-1===i.indexOf("text/plain")||(r=WCF.String.escapeHTML(t.originalEvent.clipboardData.getData("text/plain")),d="",1===(s=r.split("\n")).length?d=r:s.forEach(function(t){""===(t=t.trim())&&(t="<br>"),d+="<p>"+t+"</p>"}))),null===d&&null===o||t.preventDefault(),"android"===p.platform()&&"chrome"===p.browser()?h(t):c.call(this,t)}.bind(this),require(["Environment"],function(t){var e;"ios"===(p=t).platform()&&(e=this.paste.appendPasteBox,this.paste.appendPasteBox=function(){this.$pasteBox.css({fontSize:"16px",height:"1px",left:"1px",overflow:"hidden",position:"absolute",top:~~(window.innerHeight/4)+window.pageYOffset+"px",width:"1px"}),e.call(this)}.bind(this))}.bind(this));var e=this.paste.createPasteBox;this.paste.createPasteBox=function(t){null===o&&null===d&&e.call(this,t)}.bind(this);var i=this.paste.getPasteBoxCode;this.paste.getPasteBoxCode=function(t){if(null!==o||null!==d)return this.tmpScrollTop=void 0,o||d;var e=i.call(this,t);return!v&&(!t||e&&!g)?e:l}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this)),this.paste.detectClipboardUpload=function(t){t=t.originalEvent||t;var e=null;if(g){if(!window.clipboardData.files.length)return!1;e=window.clipboardData.files.item(0)}else{if(this.detect.isFirefox())return!1;var i=t.clipboardData,n=i.types;if(Array.isArray(n)&&-1!==n.indexOf("public.tiff")){if(0===i.files.length)return;if(1!==i.files.length)return t.preventDefault(),!1;d=!0,null!==(e=i.files[0])&&t.preventDefault()}if(null===e){if(!i.items||!i.items.length)return;if(this.detect.isWebkit()){for(var r,s=!1,a=!1,l=0,o=i.items.length;l<o;l++)"string"===(r=i.items[l]).kind&&"text/html"===r.type?a=!0:"file"===r.kind&&(s=!0);if(s&&a)return!1}var d=!1;if(null===(e=i.items[0].getAsFile())){if(this.detect.isWebkit()&&1<i.items.length&&(d=!0,null!==(e=i.items[1].getAsFile())&&t.preventDefault()),null===e)return!1}else this.detect.isWebkit()&&1===i.items.length&&t.preventDefault()}}var h=new FileReader;return h.readAsDataURL(e),h.onload=this.paste.insertFromClipboard.bind(this),!1===d}.bind(this),this.paste.insertFromClipboard=function(t){window.FormData&&(this.buffer.set(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.target.result)}),this.rtePaste=!1)}.bind(this);var A="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",x=this.paste.insert;this.paste.insert=function(t,e){if(v&&(e.pre=!0),this.utils.isCurrentOrParent("kbd")){x.call(this,t,e);var i=this.selection.current();i.nodeType===Node.TEXT_NODE&&(i=i.parentNode);for(var n=i.closest("kbd"),r=elByTag("p",n);r.length;)r[0].outerHTML=r[0].innerHTML;var s=n.innerHTML.split(/<br\s*\/?>/);if(1<s.length){for(var a=this.selection.block(),l=1,o=s.length;l<o;l++){var d=elCreate(a.nodeName);d.innerHTML="<kbd>"+s[l]+(l===o-1?this.marker.html():"")+"</kbd>",a.parentNode.insertBefore(d,a.nextSibling),a=d}n.innerHTML=s[0],this.selection.restore()}}else{if(e.pre)return x.call(this,t,e);var h=elCreate("div");if(h.innerHTML=t,1===h.childElementCount&&"A"===h.children[0].nodeName){var c=h.children[0];if(h.firstChild===c&&h.lastChild===c&&c.href===c.textContent){for(;c.childNodes.length;)h.insertBefore(c.childNodes[0],c);h.removeChild(c)}}var p=[];e.pre||e.text||elBySelAll("img",h,function(t){var e,i=t.src;0===i.indexOf("data:image")&&i!==A&&(t.src=A,e=WCF.getUUID(),elData(t,"uuid",e),p.push({src:i,uuid:e}),elHide(t))}.bind(this)),elBySelAll("pre",h,function(t){elBySelAll("br",t,function(t){var e=t.parentNode;e.insertBefore(document.createTextNode("\n"),t),e.removeChild(t)})}),x.call(this,h.innerHTML,e);var u=window.getSelection();u.rangeCount&&"A"===u.anchorNode.nodeName&&u.anchorOffset===u.anchorNode.childNodes.length&&this.caret.after(u.anchorNode),p.length&&window.setTimeout(function(){for(var t,e,i=0,n=p.length;i<n;i++)t=p[i],(e=elBySel('img[data-uuid="'+t.uuid+'"]',this.$editor[0]))&&(g?e.parentNode.removeChild(e):WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.src),replace:e}))}.bind(this),50);for(var f,b=[],m=this.core.editor()[0],l=0,o=m.childNodes.length;l<o;l++)(f=m.childNodes[l]).nodeType===Node.TEXT_NODE&&"​"===f.textContent&&b.push(f);b.forEach(elRemove),this.WoltLabClean.removeRedundantStyles(),this.rtePaste=!1}}.bind(this),this.paste.clipboardUpload=function(){}}}}; })(this);
 
 // plugins/WoltLabQuote.js
-(function (window, undefined) { plugins,WoltLabQuote.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabQuote=function(){"use strict";return{init:function(){var o=this.button.add("woltlabQuote","");this.WoltLabBlock.register("woltlab-quote",!0),this.opts.replaceTags.blockquote="woltlab-quote",this.opts.activeButtonsStates["woltlab-quote"]="woltlabQuote",require(["WoltLabSuite/Core/Ui/Redactor/Quote"],function(t){new t(this,o)}.bind(this))}}}; })(this);
 
 // plugins/WoltLabReply.js
-(function (window, undefined) { plugins,WoltLabReply.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabReply=function(){"use strict";var s=null,i=null,o=null;return{init:function(){var t=this.$editor[0].closest(".messageContent"),e=elById("messageQuickReply");t&&t.classList.contains("messageQuickReplyContent")&&e&&e.classList.contains("messageQuickReplyCollapsed")&&(s=this.WoltLabReply._click.bind(this),i=t,o=e,WCF.System.Event.addListener("com.woltlab.wcf.redactor2","showEditor",this.WoltLabReply.showEditor.bind(this)),i.addEventListener(WCF_CLICK_EVENT,s))},showEditor:function(){o?o.classList.contains("messageQuickReplyCollapsed")&&(o.classList.remove("messageQuickReplyCollapsed"),i.removeEventListener(WCF_CLICK_EVENT,s),this.WoltLabCaret.endOfEditor()):this.WoltLabCaret.endOfEditor()},_click:function(t){t.preventDefault(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","showEditor")}}}; })(this);
 
 // plugins/WoltLabSize.js
-(function (window, undefined) { plugins,WoltLabSize.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabSize=function(){"use strict";return{init:function(){for(var e,t=[8,10,12,14,18,24,36],i=this.WoltLabSize.setSize.bind(this),o={},s=0,r=t.length;s<r;s++)o["size_"+(e=t[s])]={title:e,func:i};o.removeSize={title:this.lang.get("remove-size"),func:this.WoltLabSize.removeSize.bind(this)};var n=this.button.add("woltlabSize","");this.button.addDropdown(n,o);var a=n.data("dropdown");a.find("a").each(function(e,t){t.className.match(/redactor-dropdown-size_(\d{1,2})/)&&(t.style.setProperty("font-size",RegExp.$1+"pt",""),t.parentNode.classList.add("woltlab-size-selection"))}),$('<li class="dropdownDivider"></li>').insertBefore(a.children("li").last())},setSize:function(t){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(e){this.buffer.set(),e.format(this.$editor[0],"font-size",t.replace(/^size_/,"")+"pt"),this.buffer.set()}.bind(this)),this.selection.restore()},removeSize:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(e){this.buffer.set(),e.removeFormat(this.$editor[0],"font-size"),this.buffer.set()}.bind(this)),this.selection.restore()}}}; })(this);
 
 // plugins/WoltLabSmiley.js
-(function (window, undefined) { plugins,WoltLabSmiley.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabSmiley=function(){"use strict";var r=0;return{init:function(){require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","insertSmiley_"+this.$element[0].id,this.WoltLabSmiley._insert.bind(this))}.bind(this))},_insert:function(t){var e,i;this.WoltLabSource.isActive()||(this.buffer.set(),e="wscSmiley_"+this.uuid+"_"+r++,(i=t.img.cloneNode()).id=e,this.insert.html(i.outerHTML),(i=elById(e)).removeAttribute("id"),this.caret.after(i),i.outerHTML=i.outerHTML,this.WoltLabCaret.forceSelectionSave())}}}; })(this);
 
 // plugins/WoltLabSource.js
-(function (window, undefined) { plugins,WoltLabSource.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabSource=function(){"use strict";return{init:function(){function i(e){elBySelAll("woltlab-quote",e,function(e){var t;2!==e.childElementCount||"P"!==e.children[0].nodeName||"P"!==e.children[1].nodeName||""===(t=e.children[0]).innerHTML.trim()&&"<br>"===e.children[1].innerHTML.trim()&&e.removeChild(t)})}var l=this.$element[0].id;var n=this.source.hide;this.source.hide=function(){var e,t=$("<div />").html(this.source.$textarea.val());e=t[0],elBySelAll(".icon, .fa",e,function(e){var t=(t=e.className.split(" ")).filter(function(e){return"fa"!==e&&"icon"!==e&&(!e.match(/^icon\d{2}$/)&&!e.match(/^fa-[a-z\-]+$/))});e.className=t.join(" "),""===e.className.trim()&&""===e.innerHTML&&elRemove(e)}),this.source.$textarea.val(t[0].innerHTML),n.call(this),setTimeout(function(){this.focus.end(),i(this.core.editor()[0])}.bind(this),100),this.placeholder.enable()}.bind(this);var o=this.source.$textarea[0];this.$element[0].parentNode.insertBefore(o,this.$element[0]);var a=this.source.show;this.source.show=function(){var e=this.$editor[0].offsetHeight,t=this.code.get();a.call(this),this.source.$textarea.val(t.replace(/&nbsp;/g," ")),o.style.setProperty("height",Math.ceil(e)+"px",""),o.style.setProperty("display","block","");var n,r=elCreate("div");r.innerHTML=o.value,i(r),n=r,elBySelAll("pre, woltlab-quote, woltlab-spoiler",n,function(e){e.removeAttribute("data-title")}),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","source_stripIntermediateCode_"+l,{div:n}),o.value=this.WoltLabSource.format(r.innerHTML),o.selectionStart=o.selectionEnd=o.value.length}.bind(this),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+l,function(e){o.clientHeight&&(e.api.throwError(this.$element[0],WCF.Language.get("wcf.editor.source.error.active")),e.valid=!1)}.bind(this))},isActive:function(){return"none"===this.$editor[0].style.getPropertyValue("display")},format:function(e){var t=["ul","ol","li","table","tbody","thead","tr","td","th"];this.block.tags.forEach(function(e){t.push(e)}),t=t.join("|").toLowerCase();for(var n,r=["p","li","td","th"],i="[^'\">]*(?:(?:\"[^\"]*\"|'[^']*')[^'\">]*)*",l=[],o=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("<pre"+i+">[\\s\\S]*?</pre>","g"),function(e){return l.push(e),"@@@WCF_PRE_BACKUP_"+(l.length-1)+"@@@"})).replace(new RegExp("\\s*</("+t+")>\\s*","g"),function(e,t){return(-1===r.indexOf(t)?"\n":"")+"</"+t+">"})).replace(new RegExp("\\s*<("+t+")("+i+")>\\s*","g"),function(e,t,n){return"\n<"+t+n+">"+(-1===r.indexOf(t)?"\n":"")})).replace(new RegExp("(<(?:"+t+")(?:"+i+")>\n)\n+(?=<(?:"+t+")(?:"+i+")>)","g"),"$1")).replace(/<woltlab-quote([^>]*)>\n\t*\n(\t*)<p/,"<woltlab-quote$1>\n$2<p")).replace(new RegExp("<(ol|ul)("+i+")>\\s*","g"),"<$1$2>\n")).replace(/(<\/[ou]l>)<\/li>/g,"$1\n</li>")).split(/\n/),a=0,c=new RegExp("^<("+t+")"),s=new RegExp("^</("+t+")>$"),h=!1,u=0,d=o.length;u<d;u++){if(h=!1,(n=o[u]).match(c)?-1===r.indexOf(RegExp.$1)&&(h=!0):n.match(s)&&-1===r.indexOf(RegExp.$1)&&a--,0<a){var p=a;for(o[u]="";p--;)o[u]+="\t";o[u]+=n}h&&a++}for(e=o.join("\n"),u=0,d=l.length;u<d;u++)e=e.replace("@@@WCF_PRE_BACKUP_"+u+"@@@",l[u]);return(e=e.replace(/\r?\n<\/pre>/g,"</pre>")).trim()}}}; })(this);
 
 // plugins/WoltLabSpoiler.js
-(function (window, undefined) { plugins,WoltLabSpoiler.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabSpoiler=function(){"use strict";return{init:function(){this.WoltLabBlock.register("woltlab-spoiler",!0),this.opts.activeButtonsStates["woltlab-spoiler"]="woltlabSpoiler",require(["WoltLabSuite/Core/Ui/Redactor/Spoiler"],function(t){new t(this)}.bind(this))}}}; })(this);
 
 // plugins/WoltLabTable.js
-(function (window, undefined) { plugins,WoltLabTable.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabTable=function(){"use strict";var t=null;return{init:function(){this.WoltLabEvent.register("insertedTable",function(){window.setTimeout(function(){var e,t=this.selection.block()||this.selection.current();if(t!==this.$editor[0]||(e=window.getSelection()).isCollapsed&&e.anchorNode===this.$editor[0]&&0<e.anchorOffset&&(t=e.anchorNode.childNodes[e.anchorOffset-1]),"TBODY"===t.nodeName&&(t=t.parentNode),"TABLE"===t.nodeName){for(var i,o=[],r=0,s=t.childNodes.length;r<s;r++)(i=t.childNodes[r]).nodeType===Node.TEXT_NODE&&0<i.textContent.length&&o.push(i);o.forEach(elRemove);var l=elBySel("td",t);l&&this.caret.end(l)}}.bind(this),10)}.bind(this));var e=this.button.get("table").data("dropdown").find(".redactor-dropdown-insert_table");e.off("mousedown"),e[0].addEventListener("mousedown",this.WoltLabTable._promptTableSize.bind(this)),require(["WoltLabSuite/Core/Ui/Redactor/Table"],function(e){t=e})},_promptTableSize:function(e){e.preventDefault(),this.table.getTable()||(this.selection.save(),t.showDialog({submitCallback:function(){this.WoltLabTable._insertTable(~~elById("redactor-table-rows").value,~~elById("redactor-table-cols").value)}.bind(this)}))},_insertTable:function(e,t){this.placeholder.hide();for(var i="<tr>",o=0;o<t;o++)i+="<td>"+this.opts.invisibleSpace+"</td>";i+="</tr>";var r="<table>";for(o=0;o<e;o++)r+=0===o?i.replace(new RegExp("^(<tr><td>"+this.opts.invisibleSpace+")"),"$1"+this.marker.html()):i;r+="</table>",this.selection.restore(),this.buffer.set();var s=this.selection.current();0!==$(s).closest("li",this.core.editor()[0]).length?$(s).closest("ul, ol").first().after(r):this.insert.html(r),this.selection.restore(),this.core.callback("insertedTable",void 0)}}}; })(this);
 
 // plugins/WoltLabUtils.js
-(function (window, undefined) { plugins,WoltLabUtils.js; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabUtils=function(){"use strict";return{init:function(){var r=this.utils.replaceToTag;this.utils.replaceToTag=function(t,i){return"figure"===i?t:r.call(this,t,i)}.bind(this)}}}; })(this);
 
 // plugins/alignment.js
-(function (window, undefined) { plugins,alignment.js; })(this);
+(function (window, undefined) { jQuery.Redactor.prototype.alignment=function(){return{langs:{en:{align:"Align","align-left":"Align Left","align-center":"Align Center","align-right":"Align Right","align-justify":"Align Justify"}},init:function(){var t=this,e={};e.left={title:t.lang.get("align-left"),func:t.alignment.setLeft},e.center={title:t.lang.get("align-center"),func:t.alignment.setCenter},e.right={title:t.lang.get("align-right"),func:t.alignment.setRight},e.justify={title:t.lang.get("align-justify"),func:t.alignment.setJustify};var i=this.button.add("alignment",this.lang.get("align"));this.button.setIcon(i,'<i class="re-icon-alignment"></i>'),this.button.addDropdown(i,e)},removeAlign:function(){this.block.removeClass("text-center"),this.block.removeClass("text-right"),this.block.removeClass("text-justify")},setLeft:function(){this.buffer.set(),this.alignment.removeAlign()},setCenter:function(){this.buffer.set(),this.alignment.removeAlign(),this.block.addClass("text-center"),this.core.editor().focus()},setRight:function(){this.buffer.set(),this.alignment.removeAlign(),this.block.addClass("text-right"),this.core.editor().focus()},setJustify:function(){this.buffer.set(),this.alignment.removeAlign(),this.block.addClass("text-justify"),this.core.editor().focus()}}}; })(this);
 
 // plugins/source.js
-(function (window, undefined) { plugins,source.js; })(this);
+(function (window, undefined) { !function(o){o.Redactor.prototype.source=function(){return{init:function(){var e=this.button.addFirst("html","HTML");this.button.addCallback(e,this.source.toggle);this.source.$textarea=o("<textarea />"),this.source.$textarea.css({width:"100%",margin:"0",background:"#111","box-sizing":"border-box",color:"rgba(255, 255, 255, .8)","font-size":"14px",outline:"none",padding:"16px","line-height":"22px","font-family":'Menlo, Monaco, Consolas, "Courier New", monospace'}).hide(),"textarea"===this.opts.type?this.core.box().append(this.source.$textarea):this.core.box().after(this.source.$textarea),this.core.element().on("destroy.callback.redactor",o.proxy(function(){this.source.$textarea.remove()},this))},toggle:function(){return this.source.$textarea.hasClass("open")?this.source.hide():this.source.show()},setCaretOnShow:function(){},setCaretOnHide:function(e){return e},hide:function(){this.source.$textarea.removeClass("open").hide(),this.source.$textarea.off(".redactor-source");var e=this.source.$textarea.val(),e=this.paragraphize.load(e);this.code.start(e),this.button.enableAll(),this.core.editor().show().focus(),this.selection.restore(),this.code.sync()},show:function(){this.selection.save();var e=this.core.editor().innerHeight(),t=this.code.get();t=(t=t.replace(/\n\n\n/g,"\n")).replace(/\n\n/g,"\n"),this.core.editor().hide(),this.button.disableAll(["html","woltlabFullscreen"]),this.source.$textarea.val(t).height(e).addClass("open").show(),this.source.$textarea.on("keyup.redactor-source",o.proxy(function(){"textarea"===this.opts.type&&this.core.textarea().val(this.source.$textarea.val())},this)),this.marker.remove(),o(window).scrollTop(scroll),this.source.$textarea[0].setSelectionRange&&this.source.$textarea[0].setSelectionRange(this.source.start,this.source.end),this.source.$textarea[0].scrollTop=0,setTimeout(o.proxy(function(){this.source.$textarea.focus(),this.button.setActive("html")},this),0)},enlargeOffset:function(){}}}}(jQuery); })(this);
 
 // plugins/table.js
-(function (window, undefined) { plugins,table.js; })(this);
+(function (window, undefined) { !function(o){o.Redactor.prototype.table=function(){return{langs:{en:{table:"Table","insert-table":"Insert table","insert-row-above":"Insert row above","insert-row-below":"Insert row below","insert-column-left":"Insert column left","insert-column-right":"Insert column right","add-head":"Add head","delete-head":"Delete head","delete-column":"Delete column","delete-row":"Delete row","delete-table":"Delete table"}},init:function(){var e={};e.insert_table={title:this.lang.get("insert-table"),func:this.table.insert,observe:{element:"table",in:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.insert_row_above={title:this.lang.get("insert-row-above"),func:this.table.addRowAbove,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.insert_row_below={title:this.lang.get("insert-row-below"),func:this.table.addRowBelow,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.insert_column_left={title:this.lang.get("insert-column-left"),func:this.table.addColumnLeft,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.insert_column_right={title:this.lang.get("insert-column-right"),func:this.table.addColumnRight,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.add_head={title:this.lang.get("add-head"),func:this.table.addHead,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.delete_head={title:this.lang.get("delete-head"),func:this.table.deleteHead,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.delete_column={title:this.lang.get("delete-column"),func:this.table.deleteColumn,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.delete_row={title:this.lang.get("delete-row"),func:this.table.deleteRow,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}},e.delete_table={title:this.lang.get("delete-table"),func:this.table.deleteTable,observe:{element:"table",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}};var t=this.button.addBefore("link","table",this.lang.get("table"));this.button.setIcon(t,'<i class="re-icon-table"></i>'),this.button.addDropdown(t,e)},insert:function(){if(!this.table.getTable()){this.placeholder.hide();for(var e=o("<div>"),t=o("<table />"),a=0;a<2;a++){for(var i=o("<tr>"),l=0;l<3;l++){var r=o("<td>"+this.opts.invisibleSpace+"</td>");0===a&&0===l&&r.append(this.marker.get()),o(i).append(r)}t.append(i)}e.append(t);var n=e.html();this.buffer.set();var s=this.selection.current();0!==o(s).closest("li",this.core.editor()[0]).length?o(s).closest("ul, ol").first().after(n):(this.air.collapsed(),this.insert.html(n)),this.selection.restore(),this.core.callback("insertedTable",t)}},getTable:function(){var e=o(this.selection.current()).closest("table");return!!this.utils.isRedactorParent(e)&&(0!==e.length&&e)},restoreAfterDelete:function(e){this.selection.restore(),e.find("span.redactor-selection-marker").remove()},deleteTable:function(){var e,t=this.table.getTable();t&&(this.buffer.set(),e=t.next(),this.opts.linebreaks||0===e.length?this.caret.after(t):this.caret.start(e),t.remove())},deleteRow:function(){var e,t,a,i,l=this.table.getTable();l&&(e=o(this.selection.current()),this.buffer.set(),!(a=(t=e.closest("tr")).prev().length?t.prev():t.next()).length||(i=a.children("td, th").first()).length&&i.prepend(this.marker.get()),t.remove(),this.table.restoreAfterDelete(l))},deleteColumn:function(){var l,e=this.table.getTable();e&&(this.buffer.set(),l=o(this.selection.current()).closest("td, th")[0].cellIndex,e.find("tr").each(o.proxy(function(e,t){var a=o(t),i=l-1<0?l+1:l-1;0===e&&a.find("td, th").eq(i).prepend(this.marker.get()),a.find("td, th").eq(l).remove()},this)),this.table.restoreAfterDelete(e))},addHead:function(){var e,t=this.table.getTable();t&&(this.buffer.set(),0===t.find("thead").length?((e=t.find("tr").first().clone()).find("td").replaceWith(o.proxy(function(){return o("<th>").html(this.opts.invisibleSpace)},this)),$thead=o("<thead></thead>").append(e),t.prepend($thead)):this.table.deleteHead())},deleteHead:function(){var e,t=this.table.getTable();!t||0!==(e=t.find("thead")).length&&(this.buffer.set(),e.remove())},addRowAbove:function(){this.table.addRow("before")},addRowBelow:function(){this.table.addRow("after")},addColumnLeft:function(){this.table.addColumn("before")},addColumnRight:function(){this.table.addColumn("after")},addRow:function(e){var t,a;this.table.getTable()&&(this.buffer.set(),(a=(t=o(this.selection.current()).closest("tr")).clone()).find("th").replaceWith(function(){var e=o("<td>");return e[0].attributes=this.attributes,e.append(o(this).contents())}),a.find("td").html(this.opts.invisibleSpace),"after"===e?t.after(a):t.before(a))},addColumn:function(l){var r,e,t,a,i=this.table.getTable();i&&(r=0,e=o(this.selection.current()),this.buffer.set(),t=e.closest("tr"),a=e.closest("td, th"),t.find("td, th").each(o.proxy(function(e,t){o(t)[0]===a[0]&&(r=e)},this)),i.find("tr").each(o.proxy(function(e,t){var a=o(t).find("td, th").eq(r),i=a.clone();i.html(this.opts.invisibleSpace),"after"===l?a.after(i):a.before(i)},this)))}}}}(jQuery); })(this);
 
index cc0982d757b91685e8a338b2b2f79df4599f8f4d..36be10059f9d4408cdd4f571b1da702fa83ee0b3 100755 (executable)
@@ -1,62 +1,62 @@
 // WCF.Combined.min.js -- DO NOT EDIT
 
 // 3rdParty/jquery.js
-(function (window, undefined) { undefined })(this);
+(function (window, undefined) { !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";function g(e){return null!=e&&e===e.window}var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,v=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),m={},x=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},c={type:!0,src:!0,noModule:!0};function b(e,t,n){var r,i=(t=t||E).createElement("script");if(i.text=e,n)for(r in c)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.3.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!x(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||x(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(o=i?(i=!1,n&&Array.isArray(n)?n:[]):n&&k.isPlainObject(n)?n:{},a[t]=k.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=y.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){b(e)},each:function(e,t){var n,r=0;if(d(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!=a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return v.apply([],a)},guid:1,support:m}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){function f(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}function i(){T()}var e,d,b,o,a,h,p,g,w,u,l,T,C,s,E,v,c,y,m,k="sizzle"+ +new Date,x=n.document,S=0,r=0,D=ae(),N=ae(),A=ae(),j=function(e,t){return e===t&&(l=!0),0},q={}.hasOwnProperty,t=[],L=t.pop,H=t.push,O=t.push,P=t.slice,M=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",$="\\["+I+"*("+W+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+W+"))|)"+I+"*\\]",B=":("+W+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+$+")*)|.*)\\)|)",F=new RegExp(I+"+","g"),_=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),z=new RegExp("^"+I+"*,"+I+"*"),X=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),U=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),V=new RegExp(B),G=new RegExp("^"+W+"$"),Y={ID:new RegExp("^#("+W+")"),CLASS:new RegExp("^\\.("+W+")"),TAG:new RegExp("^("+W+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ne=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=ve(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{O.apply(t=P.call(x.childNodes),x.childNodes),t[x.childNodes.length].nodeType}catch(e){O={apply:t.length?function(e,t){H.apply(e,P.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,n,r){var i,o,a,s,u,l,c,f=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!r&&((t?t.ownerDocument||t:x)!==C&&T(t),t=t||C,E)){if(11!==p&&(u=Z.exec(e)))if(i=u[1]){if(9===p){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&m(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return O.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&d.getElementsByClassName&&t.getElementsByClassName)return O.apply(n,t.getElementsByClassName(i)),n}if(d.qsa&&!A[e+" "]&&(!v||!v.test(e))){if(1!==p)f=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(ne,re):t.setAttribute("id",s=k),o=(l=h(e)).length;o--;)l[o]="#"+s+" "+ge(l[o]);c=l.join(","),f=ee.test(e)&&de(t.parentNode)||t}if(c)try{return O.apply(n,f.querySelectorAll(c)),n}catch(e){}finally{s===k&&t.removeAttribute("id")}}}return g(e.replace(_,"$1"),t,n,r)}function ae(){var n=[];function r(e,t){return n.push(e+" ")>b.cacheLength&&delete r[n.shift()],r[e+" "]=t}return r}function se(e){return e[k]=!0,e}function ue(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ie(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function pe(a){return se(function(o){return o=+o,se(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function de(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in d=oe.support={},a=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},T=oe.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:x;return r!==C&&9===r.nodeType&&r.documentElement&&(s=(C=r).documentElement,E=!a(C),x!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",i,!1):n.attachEvent&&n.attachEvent("onunload",i)),d.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ue(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ue(function(e){return s.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,f);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,f);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},c=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ue(function(e){s.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),s.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(y=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&ue(function(e){d.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),c.push("!=",B)}),v=v.length&&new RegExp(v.join("|")),c=c.length&&new RegExp(c.join("|")),t=K.test(s.compareDocumentPosition),m=t||K.test(s.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===x&&m(x,e)?-1:t===C||t.ownerDocument===x&&m(x,t)?1:u?M(u,e)-M(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?M(u,e)-M(u,t):0;if(i===o)return ce(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ce(a[r],s[r]):a[r]===x?-1:s[r]===x?1:0}),C},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),t=t.replace(U,"='$1']"),d.matchesSelector&&E&&!A[t+" "]&&(!c||!c.test(t))&&(!v||!v.test(t)))try{var n=y.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<oe(t,C,null,[e]).length},oe.contains=function(e,t){return(e.ownerDocument||e)!==C&&T(e),m(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&q.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},oe.escape=function(e){return(e+"").replace(ne,re)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return u=null,e},o=oe.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(b=oe.selectors={cacheLength:50,createPseudo:se,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,f),e[3]=(e[3]||e[4]||e[5]||"").replace(te,f),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,f).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=D[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&D(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=oe.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(F," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!=m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){for(;l;){for(a=e;a=a[l];)if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){for(d=(s=(r=(i=(o=(a=c)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1])&&r[2],a=s&&c.childNodes[s];a=++s&&a&&a[l]||(d=s=0)||u.pop();)if(1===a.nodeType&&++d&&a===e){i[h]=[S,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1]),!1===d)for(;(a=++s&&a&&a[l]||(d=s=0)||u.pop())&&((x?a.nodeName.toLowerCase()!==f:1!==a.nodeType)||!++d||(p&&((i=(o=a[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[S,d]),a!==e)););return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return a[k]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,t){for(var n,r=a(e,o),i=r.length;i--;)e[n=M(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:se(function(e){var r=[],i=[],s=p(e.replace(_,"$1"));return s[k]?se(function(e,t,n,r){for(var i,o=s(e,null,r,[]),a=e.length;a--;)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:se(function(t){return function(e){return 0<oe(t,e).length}}),contains:se(function(t){return t=t.replace(te,f),function(e){return-1<(e.textContent||e.innerText||o(e)).indexOf(t)}}),lang:se(function(n){return G.test(n||"")||oe.error("unsupported lang: "+n),n=n.replace(te,f).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===s},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:fe(!1),disabled:fe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe(function(){return[0]}),last:pe(function(e,t){return[t-1]}),eq:pe(function(e,t,n){return[n<0?n+t:n]}),even:pe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:pe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:pe(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:pe(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=function(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}(e);function he(){}function ge(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function ve(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[S,p];if(n){for(;e=e[u];)if((1===e.nodeType||f)&&s(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||f)if(i=(o=e[k]||(e[k]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===S&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function ye(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function me(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function xe(d,h,g,v,y,e){return v&&!v[k]&&(v=xe(v)),y&&!y[k]&&(y=xe(y,e)),se(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:me(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v)for(i=me(p,u),v(i,[],n,r),o=i.length;o--;)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a));if(e){if(y||d){if(y){for(i=[],o=p.length;o--;)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}for(o=p.length;o--;)(a=p[o])&&-1<(i=y?M(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=me(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):O.apply(t,p)})}function be(v,y){function e(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=S+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){for(a=0,t||o.ownerDocument===C||(T(o),n=!E);s=v[a++];)if(s(o,t||C,n)){r.push(o);break}i&&(S=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){for(a=0;s=y[a++];)s(c,f,t,n);if(e){if(0<u)for(;l--;)c[l]||f[l]||(f[l]=L.call(r));f=me(f)}O.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&oe.uniqueSort(r)}return i&&(S=h,w=p),c}var m=0<y.length,x=0<v.length;return m?se(e):e}return he.prototype=b.filters=b.pseudos,b.setFilters=new he,h=oe.tokenize=function(e,t){var n,r,i,o,a,s,u,l=N[e+" "];if(l)return t?0:l.slice(0);for(a=e,s=[],u=b.preFilter;a;){for(o in n&&!(r=z.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(_," ")}),a=a.slice(n.length)),b.filter)!(r=Y[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?oe.error(e):N(e,s).slice(0)},p=oe.compile=function(e,t){var n,r=[],i=[],o=A[e+" "];if(!o){for(n=(t=t||h(e)).length;n--;)(o=function e(t){for(var i,n,r,o=t.length,a=b.relative[t[0].type],s=a||b.relative[" "],u=a?1:0,l=ve(function(e){return e===i},s,!0),c=ve(function(e){return-1<M(i,e)},s,!0),f=[function(e,t,n){var r=!a&&(n||t!==w)||((i=t).nodeType?l:c)(e,t,n);return i=null,r}];u<o;u++)if(n=b.relative[t[u].type])f=[ve(ye(f),n)];else{if((n=b.filter[t[u].type].apply(null,t[u].matches))[k]){for(r=++u;r<o&&!b.relative[t[r].type];r++);return xe(1<u&&ye(f),1<u&&ge(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(_,"$1"),n,u<r&&e(t.slice(u,r)),r<o&&e(t=t.slice(r)),r<o&&ge(t))}f.push(n)}return ye(f)}(t[n]))[k]?r.push(o):i.push(o);(o=A(e,be(i,r))).selector=e}return o},g=oe.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,f),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=Y.needsContext.test(e)?0:o.length;i--&&(a=o[i],!b.relative[s=a.type]);)if((u=b.find[s])&&(r=u(a.matches[0].replace(te,f),ee.test(o[0].type)&&de(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&ge(o)))return O.apply(n,r),n;break}}return(l||p(e,c))(r,t,!E,n,!t||ee.test(e)&&de(t.parentNode)||t),n},d.sortStable=k.split("").sort(j).join("")===k,d.detectDuplicates=!!l,T(),d.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(C);k.find=h,k.expr=h.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=h.uniqueSort,k.text=h.getText,k.isXMLDoc=h.isXML,k.contains=h.contains,k.escapeSelector=h.escape;function T(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r}function S(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}var D=k.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return x(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1<i.call(n,e)!==r}):k.filter(n,e,r)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?k(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):x(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),A.test(r[1])&&k.isPlainObject(t))for(r in t)x(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&k(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(k(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(r,i){k.fn[r]=function(e,t){var n=k.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=k.filter(t,n)),1<this.length&&(O[r]||k.uniqueSort(n),H.test(r)&&n.reverse()),this.pushStack(n)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){return e}function I(e){throw e}function W(e,t,n,r){var i;try{e&&x(i=e.promise)?i.call(e).done(t).fail(n):e&&x(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},k.each(e.match(M)||[],function(e,t){n[t]=!0}),n):k.extend({},r);function i(){for(s=s||r.once,a=o=!0;l.length;c=-1)for(t=l.shift();++c<u.length;)!1===u[c].apply(t[0],t[1])&&r.stopOnFalse&&(c=u.length,t=!1);r.memory||(t=!1),o=!1,s&&(u=t?[]:"")}var o,t,a,s,u=[],l=[],c=-1,f={add:function(){return u&&(t&&!o&&(c=u.length-1,l.push(t)),function n(e){k.each(e,function(e,t){x(t)?r.unique&&f.has(t)||u.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!o&&i()),this},remove:function(){return k.each(arguments,function(e,t){for(var n;-1<(n=k.inArray(t,u,n));)u.splice(n,1),n<=c&&c--}),this},has:function(e){return e?-1<k.inArray(e,u):0<u.length},empty:function(){return u=u&&[],this},disable:function(){return s=l=[],u=t="",this},disabled:function(){return!u},lock:function(){return s=l=[],t||o||(u=t=""),this},locked:function(){return!!s},fireWith:function(e,t){return s||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),o||i()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!a}};return f},k.extend({Deferred:function(e){var o=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var i=arguments;return k.Deferred(function(r){k.each(o,function(e,t){var n=x(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&x(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){function e(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,x(t)?s?t.call(e,l(u,o,R,s),l(u,o,I,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,I,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}}var n=this,r=arguments,t=s?e:function(){try{e()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==I&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(k.Deferred.getStackHook&&(t.stackTrace=k.Deferred.getStackHook()),C.setTimeout(t))}}return k.Deferred(function(e){o[0][3].add(l(0,e,x(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,x(t)?t:R)),o[2][3].add(l(0,e,x(n)?n:I))}).promise()},promise:function(e){return null!=e?k.extend(e,a):a}},s={};return k.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){function t(t){return function(e){i[t]=this,o[t]=1<arguments.length?s.call(arguments):e,--n||a.resolveWith(i,o)}}var n=arguments.length,r=n,i=Array(r),o=s.call(arguments),a=k.Deferred();if(n<=1&&(W(e,a.done(t(r)).resolve,a.reject,!n),"pending"===a.state()||x(o[r]&&o[r].then)))return a.then();for(;r--;)W(o[r],t(r),a.reject);return a.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&$.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){C.setTimeout(function(){throw e})};var B=k.Deferred();function F(){E.removeEventListener("DOMContentLoaded",F),C.removeEventListener("load",F),k.ready()}k.fn.ready=function(e){return B.then(e).catch(function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||B.resolveWith(E,[k])}}),k.ready.then=B.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(k.ready):(E.addEventListener("DOMContentLoaded",F),C.addEventListener("load",F));var _=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)_(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,x(r)||(a=!0),l&&(t=a?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(k(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,X=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function V(e){return e.replace(z,"ms-").replace(X,U)}function G(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Y(){this.expando=k.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(M)||[]).length;for(;n--;)delete r[t[n]]}void 0!==t&&!k.isEmptyObject(r)||(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Q=new Y,J=new Y,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:K.test(i)?JSON.parse(i):i)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Q.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),k.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0!==n)return"object"==typeof n?this.each(function(){J.set(this,n)}):_(this,function(e){var t;return o&&void 0===e?void 0!==(t=J.get(o,n))||void 0!==(t=ee(o,n))?t:void 0:void this.each(function(){J.set(this,n,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(i=J.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(t=a.length;t--;)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=V(r.slice(5)),ee(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){k.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:k.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?k.queue(this[0],t):void 0===n?this:this.each(function(){var e=k.queue(this,t,n);k._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&k.dequeue(this,t)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){function n(){--i||o.resolveWith(a,[a])}var r,i=1,o=k.Deferred(),a=this,s=this.length;for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(r=Q.get(a[s],e+"queueHooks"))&&r.empty&&(i++,r.empty.add(n));return n(),o.promise(t)}});function te(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i}var ne=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,re=new RegExp("^(?:([+-])=|)("+ne+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],oe=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&k.contains(e.ownerDocument,e)&&"none"===k.css(e,"display")};function ae(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=s(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=(k.cssNumber[t]||"px"!==l&&+u)&&re.exec(k.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)k.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var se={};function ue(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Q.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&oe(r)&&(l[c]=(u=s=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=se[s])||(o=a.body.appendChild(a.createElement(s)),u=k.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),se[s]=u)))):"none"!==n&&(l[c]="none",Q.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}k.fn.extend({show:function(){return ue(this,!0)},hide:function(){return ue(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){oe(this)?k(this).show():k(this).hide()})}});var le=/^(?:checkbox|radio)$/i,ce=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,fe=/^$|^module$|\/(?:java|ecma)script/i,pe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function de(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&N(e,t)?k.merge([e],n):n}function he(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}pe.optgroup=pe.option,pe.tbody=pe.tfoot=pe.colgroup=pe.caption=pe.thead,pe.th=pe.td;var ge,ve,ye=/<|&#?\w+;/;function me(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))k.merge(p,o.nodeType?[o]:o);else if(ye.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(ce.exec(o)||["",""])[1].toLowerCase(),u=pe[s]||pe._default,a.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;k.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(l=k.contains(o.ownerDocument,o),a=de(f.appendChild(o),"script"),l&&he(a),n)for(c=0;o=a[c++];)fe.test(o.type||"")&&n.push(o);return f}ge=E.createDocumentFragment().appendChild(E.createElement("div")),(ve=E.createElement("input")).setAttribute("type","radio"),ve.setAttribute("checked","checked"),ve.setAttribute("name","t"),ge.appendChild(ve),m.checkClone=ge.cloneNode(!0).cloneNode(!0).lastChild.checked,ge.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!ge.cloneNode(!0).lastChild.defaultValue;var xe=E.documentElement,be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function ke(){try{return E.activeElement}catch(e){}}function Se(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Se(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(xe,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return void 0!==k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(M)||[""]).length;l--;)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(M)||[""]).length;l--;)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=k.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<k(i,this).index(l):k.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:x(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ke()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===ke()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){k.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||k.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),k.fn.extend({on:function(e,t,n,r){return Se(this,e,t,n,r)},one:function(e,t,n,r){return Se(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){k.event.remove(this,e,n,t)});for(i in e)this.off(i,t,e[i]);return this}});var De=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ne=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)k.event.add(t,i,l[i][n]);J.hasData(e)&&(s=J.access(e),u=k.extend({},s),J.set(t,u))}}function Pe(n,r,i,o){r=v.apply([],r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=x(d);if(h||1<f&&"string"==typeof d&&!m.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=me(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=k.map(de(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=k.clone(u,!0,!0),s&&k.merge(a,de(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,k.map(a,He),c=0;c<s;c++)u=a[c],fe.test(u.type||"")&&!Q.access(u,"globalEval")&&k.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&k._evalUrl(u.src):b(u.textContent.replace(je,""),l,u))}return n}function Me(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(de(r)),r.parentNode&&(n&&k.contains(r.ownerDocument,r)&&he(de(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e.replace(De,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=k.contains(e.ownerDocument,e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=de(c),r=0,i=(o=de(e)).length;r<i;r++)s=o[r],u=a[r],l=void 0,"input"===(l=u.nodeName.toLowerCase())&&le.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||de(e),a=a||de(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=de(c,"script")).length&&he(a,!f&&de(e,"script")),c},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return Me(this,e,!0)},remove:function(e){return Me(this,e)},text:function(e){return _(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=qe(this,e)).insertBefore(e,t.firstChild)})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(de(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return _(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!pe[(ce.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(de(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;k.inArray(this,n)<0&&(k.cleanData(de(this)),t&&t.replaceChild(e,this))},n)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){k.fn[e]=function(e){for(var t,n=[],r=k(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),k(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Re,Ie,We,$e,Be,Fe,_e,ze=new RegExp("^("+ne+")(?!px)[a-z%]+$","i"),Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Ue=new RegExp(ie.join("|"),"i");function Ve(){var e;_e&&(Fe.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",_e.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",xe.appendChild(Fe).appendChild(_e),e=C.getComputedStyle(_e),Re="1%"!==e.top,Be=12===Ge(e.marginLeft),_e.style.right="60%",$e=36===Ge(e.right),Ie=36===Ge(e.width),_e.style.position="absolute",We=36===_e.offsetWidth||"absolute",xe.removeChild(Fe),_e=null)}function Ge(e){return Math.round(parseFloat(e))}function Ye(e,t,n){var r,i,o,a,s=e.style;return(n=n||Xe(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||k.contains(e.ownerDocument,e)||(a=k.style(e,t)),!m.pixelBoxStyles()&&ze.test(a)&&Ue.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Qe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}Fe=E.createElement("div"),(_e=E.createElement("div")).style&&(_e.style.backgroundClip="content-box",_e.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===_e.style.backgroundClip,k.extend(m,{boxSizingReliable:function(){return Ve(),Ie},pixelBoxStyles:function(){return Ve(),$e},pixelPosition:function(){return Ve(),Re},reliableMarginLeft:function(){return Ve(),Be},scrollboxSize:function(){return Ve(),We}}));var Je=/^(none|table(?!-c[ea]).+)/,Ke=/^--/,Ze={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"},tt=["Webkit","Moz","ms"],nt=E.createElement("div").style;function rt(e){return k.cssProps[e]||(k.cssProps[e]=function(e){if(e in nt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=tt.length;n--;)if((e=tt[n]+t)in nt)return e}(e)||e)}function it(e,t,n){var r=re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function ot(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=k.css(e,n+ie[a],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+ie[a],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+ie[a]+"Width",!0,i))):(u+=k.css(e,"padding"+ie[a],!0,i),"padding"!==n?u+=k.css(e,"border"+ie[a]+"Width",!0,i):s+=k.css(e,"border"+ie[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function at(e,t,n){var r=Xe(e),i=Ye(e,t,r),o="border-box"===k.css(e,"boxSizing",!1,r),a=o;if(ze.test(i)){if(!n)return i;i="auto"}return a=a&&(m.boxSizingReliable()||i===e.style[t]),"auto"!==i&&(parseFloat(i)||"inline"!==k.css(e,"display",!1,r))||(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+ot(e,t,n||(o?"border":"content"),a,r,i)+"px"}function st(e,t,n,r,i){return new st.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ye(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=V(t),u=Ke.test(t),l=e.style;if(u||(t=rt(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=re.exec(n))&&i[1]&&(n=ae(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(k.cssNumber[s]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=V(t);return Ke.test(t)||(t=rt(s)),(a=k.cssHooks[t]||k.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ye(e,t,r)),"normal"===i&&t in et&&(i=et[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],function(e,s){k.cssHooks[s]={get:function(e,t,n){if(t)return!Je.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?at(e,s,n):te(e,Ze,function(){return at(e,s,n)})},set:function(e,t,n){var r,i=Xe(e),o="border-box"===k.css(e,"boxSizing",!1,i),a=n&&ot(e,s,n,o,i);return o&&m.scrollboxSize()===i.position&&(a-=Math.ceil(e["offset"+s[0].toUpperCase()+s.slice(1)]-parseFloat(i[s])-ot(e,s,"border",!1,i)-.5)),a&&(r=re.exec(t))&&"px"!==(r[3]||"px")&&(e.style[s]=t,t=k.css(e,s)),it(0,t,a)}}}),k.cssHooks.marginLeft=Qe(m.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ye(e,"marginLeft"))||e.getBoundingClientRect().left-te(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(i,o){k.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ie[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(k.cssHooks[i+o].set=it)}),k.fn.extend({css:function(e,t){return _(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,1<arguments.length)}}),(k.Tween=st).prototype={constructor:st,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=st.propHooks[this.prop];return e&&e.get?e.get(this):st.propHooks._default.get(this)},run:function(e){var t,n=st.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):st.propHooks._default.set(this),this}},st.prototype.init.prototype=st.prototype,st.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[k.cssProps[e.prop]]&&!k.cssHooks[e.prop]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},st.propHooks.scrollTop=st.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=st.prototype.init,k.fx.step={};var ut,lt,ct,ft,pt=/^(?:toggle|show|hide)$/,dt=/queueHooks$/;function ht(){lt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ht):C.setTimeout(ht,k.fx.interval),k.fx.tick())}function gt(){return C.setTimeout(function(){ut=void 0}),ut=Date.now()}function vt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ie[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function yt(e,t,n){for(var r,i=(mt.tweeners[t]||[]).concat(mt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function mt(o,e,t){var n,a,r=0,i=mt.prefilters.length,s=k.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=ut||gt(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},t),originalProperties:e,originalOptions:t,startTime:ut||gt(),duration:t.duration,tweens:[],createTween:function(e,t){var n=k.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=V(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=k.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=mt.prefilters[r].call(l,o,c,l.opts))return x(n.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,yt,l),x(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(mt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ae(n.elem,e,re.exec(t),n),n}]},tweener:function(e,t){for(var n,r=0,i=(e=x(e)?(t=e,["*"]):e.match(M)).length;r<i;r++)n=e[r],mt.tweeners[n]=mt.tweeners[n]||[],mt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&oe(e),v=Q.get(e,"fxshow");for(r in n.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],pt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Q.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(ue([e],!0),l=e.style.display||l,c=k.css(e,"display"),ue([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Q.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&ue([e],!0),p.done(function(){for(r in g||ue([e]),Q.remove(e,"fxshow"),d)k.style(e,r,d[r])})),u=yt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?mt.prefilters.unshift(e):mt.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||x(e)&&e,duration:e,easing:n&&t||t&&!x(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){x(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(oe).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){function i(){var e=mt(this,k.extend({},t),a);(o||Q.get(this,"finish"))&&e.stop(!0)}var o=k.isEmptyObject(t),a=k.speed(e,n,r);return i.finish=i,o||!1===a.queue?this.each(i):this.queue(a.queue,i)},stop:function(i,e,o){function a(e){var t=e.stop;delete e.stop,t(o)}return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=k.timers,r=Q.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&dt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||k.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Q.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=k.timers,o=n?n.length:0;for(t.finish=!0,k.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),k.each(["toggle","show","hide"],function(e,r){var i=k.fn[r];k.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(vt(r,!0),e,t,n)}}),k.each({slideDown:vt("show"),slideUp:vt("hide"),slideToggle:vt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){k.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(ut=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),ut=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){lt||(lt=!0,ht())},k.fx.stop=function(){lt=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(r,e){return r=k.fx&&k.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},ct=E.createElement("input"),ft=E.createElement("select").appendChild(E.createElement("option")),ct.type="checkbox",m.checkOn=""!==ct.value,m.optSelected=ft.selected,(ct=E.createElement("input")).value="t",ct.type="radio",m.radioValue="t"===ct.value;var xt,bt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return _(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):!(i&&"get"in i&&null!==(r=i.get(e,t)))&&null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),xt={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var a=bt[t]||k.find.attr;bt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=bt[o],bt[o]=r,r=null!=a(e,t,n)?o:null,bt[o]=i),r}});var wt=/^(?:input|select|textarea|button)$/i,Tt=/^(?:a|area)$/i;function Ct(e){return(e.match(M)||[]).join(" ")}function Et(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(M)||[]}k.fn.extend({prop:function(e,t){return _(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(x(t))return this.each(function(e){k(this).addClass(t.call(this,e,Et(this)))});if((e=kt(t)).length)for(;n=this[u++];)if(i=Et(n),r=1===n.nodeType&&" "+Ct(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=Ct(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(x(t))return this.each(function(e){k(this).removeClass(t.call(this,e,Et(this)))});if(!arguments.length)return this.attr("class","");if((e=kt(t)).length)for(;n=this[u++];)if(i=Et(n),r=1===n.nodeType&&" "+Ct(i)+" "){for(a=0;o=e[a++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");i!==(s=Ct(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"==o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):x(i)?this.each(function(e){k(this).toggleClass(i.call(this,e,Et(this),t),t)}):this.each(function(){var e,t,n,r;if(a)for(t=0,n=k(this),r=kt(i);e=r[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==i&&"boolean"!=o||((e=Et(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==i&&Q.get(this,"__className__")||""))})},hasClass:function(e){for(var t,n=0,r=" "+e+" ";t=this[n++];)if(1===t.nodeType&&-1<(" "+Ct(Et(t))+" ").indexOf(r))return!0;return!1}});var St=/\r/g;k.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=x(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,k(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=k.map(t,function(e){return null==e?"":e+""})),(r=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=k.valHooks[t.type]||k.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:Ct(k.text(e))}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u<s;u++)if(((n=r[u]).selected||u===i)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=k(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=k.makeArray(t),a=i.length;a--;)((r=i[a]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},m.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),m.focusin="onfocusin"in C;function Dt(e){e.stopPropagation()}var Nt=/^(?:focusinfocus|focusoutblur)$/;k.extend(k.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f=[n||E],p=y.call(e,"type")?e.type:e,d=y.call(e,"namespace")?e.namespace.split("."):[],h=c=o=n=n||E;if(3!==n.nodeType&&8!==n.nodeType&&!Nt.test(p+k.event.triggered)&&(-1<p.indexOf(".")&&(p=(d=p.split(".")).shift(),d.sort()),s=p.indexOf(":")<0&&"on"+p,(e=e[k.expando]?e:new k.Event(p,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=d.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),l=k.event.special[p]||{},r||!l.trigger||!1!==l.trigger.apply(n,t))){if(!r&&!l.noBubble&&!g(n)){for(a=l.delegateType||p,Nt.test(a+p)||(h=h.parentNode);h;h=h.parentNode)f.push(h),o=h;o===(n.ownerDocument||E)&&f.push(o.defaultView||o.parentWindow||C)}for(i=0;(h=f[i++])&&!e.isPropagationStopped();)c=h,e.type=1<i?a:l.bindType||p,(u=(Q.get(h,"events")||{})[e.type]&&Q.get(h,"handle"))&&u.apply(h,t),(u=s&&h[s])&&u.apply&&G(h)&&(e.result=u.apply(h,t),!1===e.result&&e.preventDefault());return e.type=p,r||e.isDefaultPrevented()||l._default&&!1!==l._default.apply(f.pop(),t)||!G(n)||s&&x(n[p])&&!g(n)&&((o=n[s])&&(n[s]=null),k.event.triggered=p,e.isPropagationStopped()&&c.addEventListener(p,Dt),n[p](),e.isPropagationStopped()&&c.removeEventListener(p,Dt),k.event.triggered=void 0,o&&(n[s]=o)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),m.focusin||k.each({focus:"focusin",blur:"focusout"},function(n,r){function i(e){k.event.simulate(r,e.target,k.event.fix(e))}k.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=Q.access(e,r);t||e.addEventListener(n,i,!0),Q.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=Q.access(e,r)-1;t?Q.access(e,r,t):(e.removeEventListener(n,i,!0),Q.remove(e,r))}}});var At=C.location,jt=Date.now(),qt=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Lt=/\[\]$/,Ht=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,Pt=/^(?:input|select|textarea|keygen)/i;k.param=function(e,t){function n(e,t){var n=x(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)}var r,i=[];if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){n(this.name,this.value)});else for(r in e)!function n(r,e,i,o){var t;if(Array.isArray(e))k.each(e,function(e,t){i||Lt.test(r)?o(r,t):n(r+"["+("object"==typeof t&&null!=t?e:"")+"]",t,i,o)});else if(i||"object"!==w(e))o(r,e);else for(t in e)n(r+"["+t+"]",e[t],i,o)}(r,e[r],t,n);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&Pt.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!le.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(Ht,"\r\n")}}):{name:t.name,value:n.replace(Ht,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,$t=/^(?:GET|HEAD)$/,Bt=/^\/\//,Ft={},_t={},zt="*/".concat("*"),Xt=E.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(M)||[];if(x(t))for(;n=i[r++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,k.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r=r||{})[n]=t[n]);return r&&k.extend(!0,e,r),e}Xt.href=At.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(At.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,k.ajaxSettings),t):Gt(k.ajaxSettings,e)},ajaxPrefilter:Ut(Ft),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=k.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?k(y):k.event,x=k.Deferred(),b=k.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n)for(n={};t=Wt.exec(p);)n[t[1].toLowerCase()]=t[2];t=n[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||At.href)+"").replace(Bt,At.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(M)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=k.param(v.data,v.traditional)),Vt(Ft,v,t,T),h)return T;for(i in(g=k.event&&v.global)&&0==k.active++&&k.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!$t.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(qt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(qt.test(f)?"&":"?")+"_="+jt+++o),v.url=f+o),v.ifModified&&(k.lastModified[f]&&T.setRequestHeader("If-Modified-Since",k.lastModified[f]),k.etag[f]&&T.setRequestHeader("If-None-Match",k.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a=a||i}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(k.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(k.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--k.active||k.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,i){k[i]=function(e,t,n,r){return x(t)&&(r=r||n,n=t,t=void 0),k.ajax(k.extend({url:e,type:i,dataType:r,data:t,success:n},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(x(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return x(n)?this.each(function(e){k(this).wrapInner(n.call(this,e))}):this.each(function(){var e=k(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=x(t);return this.each(function(e){k(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=k.ajaxSettings.xhr();m.cors=!!Qt&&"withCredentials"in Qt,m.ajax=Qt=!!Qt,k.ajaxTransport(function(i){var o,a;if(m.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(n){var r,i;if(n.crossDomain)return{send:function(e,t){r=k("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||k.expando+"_"+jt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=x(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(qt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&x(i)&&i(o[0]),o=i=void 0}),"script"}),m.createHTMLDocument=((Jt=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=A.exec(e))?[t.createElement(i[1])]:(i=me([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Ct(e.slice(s)),e=e.slice(0,s)),x(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),i=("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,r.left):(a=parseFloat(o)||0,parseFloat(u)||0),x(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||xe})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;return g(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n?r?r[i]:e[t]:void(r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n)},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=Qe(m.pixelPosition,function(e,t){if(t)return t=Ye(e,n),ze.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return g(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),x(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=N,k.isFunction=x,k.isWindow=g,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return k});var en=C.jQuery,tn=C.$;return k.noConflict=function(e){return C.$===k&&(C.$=tn),e&&C.jQuery===k&&(C.jQuery=en),k},e||(C.jQuery=C.$=k),k}); })(this);
 
 // 3rdParty/jquery-ui.js
-(function (window, undefined) { undefined })(this);
+(function (window, undefined) { !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(P){P.ui=P.ui||{};P.ui.version="1.12.1";var o,i=0,a=Array.prototype.slice;P.cleanData=(o=P.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)try{(e=P._data(i,"events"))&&e.remove&&P(i).triggerHandler("remove")}catch(t){}o(t)}),P.widget=function(t,i,e){var s,o,n,r={},a=t.split(".")[0],h=a+"-"+(t=t.split(".")[1]);return e||(e=i,i=P.Widget),P.isArray(e)&&(e=P.extend.apply(null,[{}].concat(e))),P.expr[":"][h.toLowerCase()]=function(t){return!!P.data(t,h)},P[a]=P[a]||{},s=P[a][t],o=P[a][t]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},P.extend(o,s,{version:e.version,_proto:P.extend({},e),_childConstructors:[]}),(n=new i).options=P.widget.extend({},n.options),P.each(e,function(e,s){function o(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}P.isFunction(s)?r[e]=function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=n,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:r[e]=s}),o.prototype=P.widget.extend(n,{widgetEventPrefix:s&&n.widgetEventPrefix||t},r,{constructor:o,namespace:a,widgetName:t,widgetFullName:h}),s?(P.each(s._childConstructors,function(t,e){var i=e.prototype;P.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete s._childConstructors):i._childConstructors.push(o),P.widget.bridge(t,o),o},P.widget.extend=function(t){for(var e,i,s=a.call(arguments,1),o=0,n=s.length;o<n;o++)for(e in s[o])i=s[o][e],s[o].hasOwnProperty(e)&&void 0!==i&&(P.isPlainObject(i)?t[e]=P.isPlainObject(t[e])?P.widget.extend({},t[e],i):P.widget.extend({},i):t[e]=i);return t},P.widget.bridge=function(n,e){var r=e.prototype.widgetFullName||n;P.fn[n]=function(i){var t="string"==typeof i,s=a.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=P.data(this,r);return"instance"===i?(o=e,!1):e?P.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,s))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:P.error("no such method '"+i+"' for "+n+" widget instance"):P.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(s.length&&(i=P.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=P.data(this,r);t?(t.option(i||{}),t._init&&t._init()):P.data(this,r,new e(i,this))})),o}},P.Widget=function(){},P.Widget._childConstructors=[],P.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=P(e||this.defaultElement||this)[0],this.element=P(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=P(),this.hoverable=P(),this.focusable=P(),this.classesElementLookup={},e!==this&&(P.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=P(e.style?e.ownerDocument:e.document||e),this.window=P(this.document[0].defaultView||this.document[0].parentWindow)),this.options=P.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:P.noop,_create:P.noop,_init:P.noop,destroy:function(){var i=this;this._destroy(),P.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:P.noop,widget:function(){return this.element},option:function(t,e){var i,s,o,n=t;if(0===arguments.length)return P.widget.extend({},this.options);if("string"==typeof t)if(n={},t=(i=t.split(".")).shift(),i.length){for(s=n[t]=P.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)s[i[o]]=s[i[o]]||{},s=s[i[o]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];n[t]=e}return this._setOptions(n),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=P(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var n=[],r=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=r.classesElementLookup[t[s]]||P(),i=o.add?P(P.unique(i.get().concat(o.element.get()))):P(i.not(o.element).get()),r.classesElementLookup[t[s]]=i,n.push(t[s]),e&&o.classes[t[s]]&&n.push(o.classes[t[s]])}return o=P.extend({element:this.element,classes:this.options.classes||{}},o),this._on(o.element,{remove:"_untrackClassesElement"}),o.keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(i){var s=this;P.each(s.classesElementLookup,function(t,e){-1!==P.inArray(i.target,e)&&(s.classesElementLookup[t]=P(e.not(i.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var o="string"==typeof t||null===t,n={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:s};return n.element.toggleClass(this._classes(n),s),this},_on:function(r,a,t){var h,l=this;"boolean"!=typeof r&&(t=a,a=r,r=!1),t?(a=h=P(a),this.bindings=this.bindings.add(a)):(t=a,a=this.element,h=this.widget()),P.each(t,function(t,e){function i(){if(r||!0!==l.options.disabled&&!P(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||P.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),o=s[1]+l.eventNamespace,n=s[2];n?h.on(o,n,i):a.on(o,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e).off(e),this.bindings=P(this.bindings.not(t).get()),this.focusable=P(this.focusable.not(t).get()),this.hoverable=P(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(P(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(P(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(P(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(P(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,o,n=this.options[t];if(i=i||{},(e=P.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(s in o)s in e||(e[s]=o[s]);return this.element.trigger(e,i),!(P.isFunction(n)&&!1===n.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},P.each({show:"fadeIn",hide:"fadeOut"},function(n,r){P.Widget.prototype["_"+n]=function(e,t,i){var s;"string"==typeof t&&(t={effect:t});var o=t?!0!==t&&"number"!=typeof t&&t.effect||r:n;"number"==typeof(t=t||{})&&(t={duration:t}),s=!P.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&P.effects&&P.effects.effect[o]?e[n](t):o!==n&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){P(this)[n](),i&&i.call(e[0]),t()})}});var n,x,C,s,r,h,l,c,z;P.widget;function H(t,e,i){return[parseFloat(t[0])*(c.test(t[0])?e/100:1),parseFloat(t[1])*(c.test(t[1])?i/100:1)]}function I(t,e){return parseInt(P.css(t,e),10)||0}x=Math.max,C=Math.abs,s=/left|center|right/,r=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,c=/%$/,z=P.fn.position,P.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,e,i=P("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=i.children()[0];return P("body").append(i),t=s.offsetWidth,i.css("overflow","scroll"),t===(e=s.offsetWidth)&&(e=i[0].clientWidth),i.remove(),n=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?P.position.scrollbarWidth():0,height:s?P.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=P(t||window),i=P.isWindow(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?P(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},P.fn.position=function(p){if(!p||!p.of)return z.apply(this,arguments);p=P.extend({},p);var f,u,d,g,m,t,e,v=P(p.of),_=P.position.getWithinInfo(p.within),b=P.position.getScrollInfo(_),w=(p.collision||"flip").split(" "),y={},i=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:P.isWindow(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()};return v[0].preventDefault&&(p.at="left top"),u=i.width,d=i.height,g=i.offset,m=P.extend({},g),P.each(["my","at"],function(){var t,e,i=(p[this]||"").split(" ");1===i.length&&(i=s.test(i[0])?i.concat(["center"]):r.test(i[0])?["center"].concat(i):["center","center"]),i[0]=s.test(i[0])?i[0]:"center",i[1]=r.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),y[this]=[t?t[0]:0,e?e[0]:0],p[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===p.at[0]?m.left+=u:"center"===p.at[0]&&(m.left+=u/2),"bottom"===p.at[1]?m.top+=d:"center"===p.at[1]&&(m.top+=d/2),f=H(y.at,u,d),m.left+=f[0],m.top+=f[1],this.each(function(){var i,t,r=P(this),a=r.outerWidth(),h=r.outerHeight(),e=I(this,"marginLeft"),s=I(this,"marginTop"),o=a+e+I(this,"marginRight")+b.width,n=h+s+I(this,"marginBottom")+b.height,l=P.extend({},m),c=H(y.my,r.outerWidth(),r.outerHeight());"right"===p.my[0]?l.left-=a:"center"===p.my[0]&&(l.left-=a/2),"bottom"===p.my[1]?l.top-=h:"center"===p.my[1]&&(l.top-=h/2),l.left+=c[0],l.top+=c[1],i={marginLeft:e,marginTop:s},P.each(["left","top"],function(t,e){P.ui.position[w[t]]&&P.ui.position[w[t]][e](l,{targetWidth:u,targetHeight:d,elemWidth:a,elemHeight:h,collisionPosition:i,collisionWidth:o,collisionHeight:n,offset:[f[0]+c[0],f[1]+c[1]],my:p.my,at:p.at,within:_,elem:r})}),p.using&&(t=function(t){var e=g.left-l.left,i=e+u-a,s=g.top-l.top,o=s+d-h,n={target:{element:v,left:g.left,top:g.top,width:u,height:d},element:{element:r,left:l.left,top:l.top,width:a,height:h},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<s?"bottom":"middle"};u<a&&C(e+i)<u&&(n.horizontal="center"),d<h&&C(s+o)<d&&(n.vertical="middle"),x(C(e),C(i))>x(C(s),C(o))?n.important="horizontal":n.important="vertical",p.using.call(this,t,n)}),r.offset(P.extend(l,{using:t}))})},P.ui.position={fit:{left:function(t,e){var i,s=e.within,o=s.isWindow?s.scrollLeft:s.offset.left,n=s.width,r=t.left-e.collisionPosition.marginLeft,a=o-r,h=r+e.collisionWidth-n-o;e.collisionWidth>n?0<a&&h<=0?(i=t.left+a+e.collisionWidth-n-o,t.left+=a-i):t.left=!(0<h&&a<=0)&&h<a?o+n-e.collisionWidth:o:0<a?t.left+=a:0<h?t.left-=h:t.left=x(t.left-r,t.left)},top:function(t,e){var i,s=e.within,o=s.isWindow?s.scrollTop:s.offset.top,n=e.within.height,r=t.top-e.collisionPosition.marginTop,a=o-r,h=r+e.collisionHeight-n-o;e.collisionHeight>n?0<a&&h<=0?(i=t.top+a+e.collisionHeight-n-o,t.top+=a-i):t.top=!(0<h&&a<=0)&&h<a?o+n-e.collisionHeight:o:0<a?t.top+=a:0<h?t.top-=h:t.top=x(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,o=e.within,n=o.offset.left+o.scrollLeft,r=o.width,a=o.isWindow?o.scrollLeft:o.offset.left,h=t.left-e.collisionPosition.marginLeft,l=h-a,c=h+e.collisionWidth-r-a,p="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,f="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,u=-2*e.offset[0];l<0?((i=t.left+p+f+u+e.collisionWidth-r-n)<0||i<C(l))&&(t.left+=p+f+u):0<c&&(0<(s=t.left-e.collisionPosition.marginLeft+p+f+u-a)||C(s)<c)&&(t.left+=p+f+u)},top:function(t,e){var i,s,o=e.within,n=o.offset.top+o.scrollTop,r=o.height,a=o.isWindow?o.scrollTop:o.offset.top,h=t.top-e.collisionPosition.marginTop,l=h-a,c=h+e.collisionHeight-r-a,p="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,u=-2*e.offset[1];l<0?((s=t.top+p+f+u+e.collisionHeight-r-n)<0||s<C(l))&&(t.top+=p+f+u):0<c&&(0<(i=t.top-e.collisionPosition.marginTop+p+f+u-a)||C(i)<c)&&(t.top+=p+f+u)}},flipfit:{left:function(){P.ui.position.flip.left.apply(this,arguments),P.ui.position.fit.left.apply(this,arguments)},top:function(){P.ui.position.flip.top.apply(this,arguments),P.ui.position.fit.top.apply(this,arguments)}}};P.ui.position,P.extend(P.expr[":"],{data:P.expr.createPseudo?P.expr.createPseudo(function(e){return function(t){return!!P.data(t,e)}}):function(t,e,i){return!!P.data(t,i[3])}}),P.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),P.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):P(this[0].form)},P.ui.formResetMixin={_formResetHandler:function(){var e=P(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");P.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element.form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(P.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},P.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},P.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=P(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&o.length?o:P(this[0].ownerDocument||document)},P.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var t,p=!1;P(document).on("mouseup",function(){p=!1});P.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===P.data(t.target,e.widgetName+".preventClickEvent"))return P.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!p){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&P(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===P.data(t.target,this.widgetName+".preventClickEvent")&&P.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),p=!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(P.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&P.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,p=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),P.ui.plugin={add:function(t,e,i){var s,o=P.ui[t].prototype;for(s in i)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var o,n=t.plugins[e];if(n&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<n.length;o++)t.options[n[o][0]]&&n[o][1].apply(t.element,i)}},P.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return(i=i||e.body).nodeName||(i=e.body),i},P.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&P(t).trigger("blur")};P.widget("ui.draggable",P.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<P(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=P(this);return P("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=P.ui.safeActiveElement(this.document[0]);P(t.target).closest(e).length||P.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),P.ui.ddmanager&&(P.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===P(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),P.ui.ddmanager&&!e.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),P.ui.ddmanager&&P.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp(new P.Event("mouseup",t)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",P.ui.ddmanager&&P.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return P.ui.ddmanager&&!this.options.dropBehaviour&&(i=P.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||P.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?P(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),P.ui.ddmanager&&P.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),P.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new P.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!P(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i=P.isFunction(e.helper),s=i?P(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&s[0]===this.element[0]&&this._setPositionRelative(),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),P.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&P.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options,o=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(i=(e=P(s.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=s.containment:this.containment=[0,0,P(o).width()-this.helperProportions.width-this.margins.left,(P(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[P(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,P(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,P(window).scrollLeft()+P(window).width()-this.helperProportions.width-this.margins.left,P(window).scrollTop()+(P(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,o,n,r=this.options,a=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(i=this.relativeContainer?(s=this.relativeContainer.offset(),[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),r.grid&&(o=r.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,l=!i||o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-r.grid[1]:o+r.grid[1],n=r.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,h=!i||n-this.offset.click.left>=i[0]||n-this.offset.click.left>i[2]?n:n-this.offset.click.left>=i[0]?n-r.grid[0]:n+r.grid[0]),"y"===r.axis&&(h=this.originalPageX),"x"===r.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),P.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),P.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),P.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=P.extend({},t,{item:i.element});i.sortables=[],P(i.options.connectToSortable).each(function(){var t=P(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=P.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,P.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,o){P.each(o.sortables,function(){var t=!1,e=this;e.positionAbs=o.positionAbs,e.helperProportions=o.helperProportions,e.offset.click=o.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,P.each(o.sortables,function(){return this.positionAbs=o.positionAbs,this.helperProportions=o.helperProportions,this.offset.click=o.offset.click,this!==e&&this._intersectsWith(this.containerCache)&&P.contains(e.element[0],this.element[0])&&(t=!1),t})),t?(e.isOver||(e.isOver=1,o._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=o.offset.click.top,e.offset.click.left=o.offset.click.left,e.offset.parent.left-=o.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=o.offset.parent.top-e.offset.parent.top,o._trigger("toSortable",i),o.dropped=e.element,P.each(o.sortables,function(){this.refreshPositions()}),o.currentItem=o.element,e.fromOutside=o),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(o._parent),o._refreshOffsets(i),s.position=o._generatePosition(i,!0),o._trigger("fromSortable",i),o.dropped=!1,P.each(o.sortables,function(){this.refreshPositions()}))})}}),P.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=P("body"),o=i.options;s.css("cursor")&&(o._cursor=s.css("cursor")),s.css("cursor",o.cursor)},stop:function(t,e,i){var s=i.options;s._cursor&&P("body").css("cursor",s._cursor)}}),P.ui.plugin.add("draggable","opacity",{start:function(t,e,i){var s=P(e.helper),o=i.options;s.css("opacity")&&(o._opacity=s.css("opacity")),s.css("opacity",o.opacity)},stop:function(t,e,i){var s=i.options;s._opacity&&P(e.helper).css("opacity",s._opacity)}}),P.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,o=!1,n=i.scrollParentNotHidden[0],r=i.document[0];n!==r&&"HTML"!==n.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+n.offsetHeight-t.pageY<s.scrollSensitivity?n.scrollTop=o=n.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(n.scrollTop=o=n.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+n.offsetWidth-t.pageX<s.scrollSensitivity?n.scrollLeft=o=n.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(n.scrollLeft=o=n.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-P(r).scrollTop()<s.scrollSensitivity?o=P(r).scrollTop(P(r).scrollTop()-s.scrollSpeed):P(window).height()-(t.pageY-P(r).scrollTop())<s.scrollSensitivity&&(o=P(r).scrollTop(P(r).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-P(r).scrollLeft()<s.scrollSensitivity?o=P(r).scrollLeft(P(r).scrollLeft()-s.scrollSpeed):P(window).width()-(t.pageX-P(r).scrollLeft())<s.scrollSensitivity&&(o=P(r).scrollLeft(P(r).scrollLeft()+s.scrollSpeed)))),!1!==o&&P.ui.ddmanager&&!s.dropBehaviour&&P.ui.ddmanager.prepareOffsets(i,t)}}),P.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],P(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=P(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){for(var s,o,n,r,a,h,l,c,p,f=i.options,u=f.snapTolerance,d=e.offset.left,g=d+i.helperProportions.width,m=e.offset.top,v=m+i.helperProportions.height,_=i.snapElements.length-1;0<=_;_--)h=(a=i.snapElements[_].left-i.margins.left)+i.snapElements[_].width,c=(l=i.snapElements[_].top-i.margins.top)+i.snapElements[_].height,g<a-u||h+u<d||v<l-u||c+u<m||!P.contains(i.snapElements[_].item.ownerDocument,i.snapElements[_].item)?(i.snapElements[_].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,P.extend(i._uiHash(),{snapItem:i.snapElements[_].item})),i.snapElements[_].snapping=!1):("inner"!==f.snapMode&&(s=Math.abs(l-v)<=u,o=Math.abs(c-m)<=u,n=Math.abs(a-g)<=u,r=Math.abs(h-d)<=u,s&&(e.position.top=i._convertPositionTo("relative",{top:l-i.helperProportions.height,left:0}).top),o&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),n&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a-i.helperProportions.width}).left),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:h}).left)),p=s||o||n||r,"outer"!==f.snapMode&&(s=Math.abs(l-m)<=u,o=Math.abs(c-v)<=u,n=Math.abs(a-d)<=u,r=Math.abs(h-g)<=u,s&&(e.position.top=i._convertPositionTo("relative",{top:l,left:0}).top),o&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),n&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a}).left),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:h-i.helperProportions.width}).left)),!i.snapElements[_].snapping&&(s||o||n||r||p)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,P.extend(i._uiHash(),{snapItem:i.snapElements[_].item})),i.snapElements[_].snapping=s||o||n||r||p)}}),P.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,o=i.options,n=P.makeArray(P(o.stack)).sort(function(t,e){return(parseInt(P(t).css("zIndex"),10)||0)-(parseInt(P(e).css("zIndex"),10)||0)});n.length&&(s=parseInt(P(n[0]).css("zIndex"),10)||0,P(n).each(function(t){P(this).css("zIndex",s+t)}),this.css("zIndex",s+n.length))}}),P.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){var s=P(e.helper),o=i.options;s.css("zIndex")&&(o._zIndex=s.css("zIndex")),s.css("zIndex",o.zIndex)},stop:function(t,e,i){var s=i.options;s._zIndex&&P(e.helper).css("zIndex",s._zIndex)}});P.ui.draggable;P.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=P.isFunction(i)?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){P.ui.ddmanager.droppables[t]=P.ui.ddmanager.droppables[t]||[],P.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=P.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){var i;"accept"===t?this.accept=P.isFunction(e)?e:function(t){return t.is(e)}:"scope"===t&&(i=P.ui.ddmanager.droppables[this.options.scope],this._splice(i),this._addToManager(e)),this._super(t,e)},_activate:function(t){var e=P.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=P.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=P.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=P.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||P.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=P(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&f(i,P.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(s=!0)}),!s&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var f=P.ui.intersect=function(t,e,i,s){if(!e.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,n=(t.positionAbs||t.position.absolute).top+t.margins.top,r=o+t.helperProportions.width,a=n+t.helperProportions.height,h=e.offset.left,l=e.offset.top,c=h+e.proportions().width,p=l+e.proportions().height;switch(i){case"fit":return h<=o&&r<=c&&l<=n&&a<=p;case"intersect":return h<o+t.helperProportions.width/2&&r-t.helperProportions.width/2<c&&l<n+t.helperProportions.height/2&&a-t.helperProportions.height/2<p;case"pointer":return u(s.pageY,l,e.proportions().height)&&u(s.pageX,h,e.proportions().width);case"touch":return(l<=n&&n<=p||l<=a&&a<=p||n<l&&p<a)&&(h<=o&&o<=c||h<=r&&r<=c||o<h&&c<r);default:return!1}};function u(t,e,i){return e<=t&&t<e+i}!(P.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,s,o=P.ui.ddmanager.droppables[t.options.scope]||[],n=e?e.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<o.length;i++)if(!(o[i].options.disabled||t&&!o[i].accept.call(o[i].element[0],t.currentItem||t.element))){for(s=0;s<r.length;s++)if(r[s]===o[i].element[0]){o[i].proportions().height=0;continue t}o[i].visible="none"!==o[i].element.css("display"),o[i].visible&&("mousedown"===n&&o[i]._activate.call(o[i],e),o[i].offset=o[i].element.offset(),o[i].proportions({width:o[i].element[0].offsetWidth,height:o[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return P.each((P.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&f(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e)))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||P.ui.ddmanager.prepareOffsets(t,e)})},drag:function(n,r){n.options.refreshPositions&&P.ui.ddmanager.prepareOffsets(n,r),P.each(P.ui.ddmanager.droppables[n.options.scope]||[],function(){var t,e,i,s,o;this.options.disabled||this.greedyChild||!this.visible||(o=!(s=f(n,this,this.options.tolerance,r))&&this.isover?"isout":s&&!this.isover?"isover":null)&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return P(this).droppable("instance").options.scope===e})).length&&((t=P(i[0]).droppable("instance")).greedyChild="isover"===o)),t&&"isover"===o&&(t.isover=!1,t.isout=!0,t._out.call(t,r)),this[o]=!0,this["isout"===o?"isover":"isout"]=!1,this["isover"===o?"_over":"_out"].call(this,r),t&&"isout"===o&&(t.isout=!1,t.isover=!0,t._over.call(t,r)))})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||P.ui.ddmanager.prepareOffsets(t,e)}})!==P.uiBackCompat&&P.widget("ui.droppable",P.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});P.ui.droppable;P.widget("ui.resizable",P.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===P(t).css("overflow"))return!1;var i,s=e&&"left"===e?"scrollLeft":"scrollTop";return 0<t[s]||(t[s]=1,i=0<t[s],t[s]=0,i)},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),P.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(P("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&P(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();function t(t){P(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var t,e,i,s,o,n=this.options,r=this;if(this.handles=n.handles||(P(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=P(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=P.trim(i[e])),o=P("<div>"),this._addClass(o,"ui-resizable-handle "+s),o.css({zIndex:n.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.append(o);this._renderAxis=function(t){var e,i,s,o;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=P(this.handles[e]),this._on(this.handles[e],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=P(this.handles[e],this.element),o=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),s=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(s,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),n.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=P(this.handles[e])[0])!==t.target&&!P.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s,o=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),o.containment&&(e+=P(o.containment).scrollLeft()||0,i+=P(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=P(".ui-resizable-"+this.axis).css("cursor"),P("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e,i,s=this.originalMousePosition,o=this.axis,n=t.pageX-s.left||0,r=t.pageY-s.top||0,a=this._change[o];return this._updatePrevProperties(),a&&(e=a.apply(this,[t,n,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),P.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,o,n,r,a,h=this.options,l=this;return this._helper&&(s=(i=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:l.sizeDiff.height,o=i?0:l.sizeDiff.width,n={width:l.helper.width()-o,height:l.helper.height()-s},r=parseFloat(l.element.css("left"))+(l.position.left-l.originalPosition.left)||null,a=parseFloat(l.element.css("top"))+(l.position.top-l.originalPosition.top)||null,h.animate||this.element.css(P.extend(n,{top:a,left:r})),l.helper.height(l.size.height),l.helper.width(l.size.width),this._helper&&!h.animate&&this._proportionallyResize()),P("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,o,n=this.options,r={minWidth:this._isNumber(n.minWidth)?n.minWidth:0,maxWidth:this._isNumber(n.maxWidth)?n.maxWidth:1/0,minHeight:this._isNumber(n.minHeight)?n.minHeight:0,maxHeight:this._isNumber(n.maxHeight)?n.maxHeight:1/0};(this._aspectRatio||t)&&(e=r.minHeight*this.aspectRatio,s=r.minWidth/this.aspectRatio,i=r.maxHeight*this.aspectRatio,o=r.maxWidth/this.aspectRatio,e>r.minWidth&&(r.minWidth=e),s>r.minHeight&&(r.minHeight=s),i<r.maxWidth&&(r.maxWidth=i),o<r.maxHeight&&(r.maxHeight=o)),this._vBoundaries=r},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,n=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return n&&(t.width=e.minWidth),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),n&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),r&&c&&(t.top=h-e.minHeight),o&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],o=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(o[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||P("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return P.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return P.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return P.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return P.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){P.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),P.ui.plugin.add("resizable","animate",{stop:function(e){var i=P(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),n=o&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,a={width:i.size.width-r,height:i.size.height-n},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,l=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(P.extend(a,l&&h?{top:l,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&P(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),P.ui.plugin.add("resizable","containment",{start:function(){var i,s,t,e,o,n,r,a=P(this).resizable("instance"),h=a.options,l=a.element,c=h.containment,p=c instanceof P?c.get(0):/parent/.test(c)?l.parent().get(0):c;p&&(a.containerElement=P(p),/document/.test(c)||c===document?(a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:P(document),left:0,top:0,width:P(document).width(),height:P(document).height()||document.body.parentNode.scrollHeight}):(i=P(p),s=[],P(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=a._num(i.css("padding"+e))}),a.containerOffset=i.offset(),a.containerPosition=i.position(),a.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=a.containerOffset,e=a.containerSize.height,o=a.containerSize.width,n=a._hasScroll(p,"left")?p.scrollWidth:o,r=a._hasScroll(p)?p.scrollHeight:e,a.parentData={element:p,left:t.left,top:t.top,width:n,height:r}))},resize:function(t){var e,i,s,o,n=P(this).resizable("instance"),r=n.options,a=n.containerOffset,h=n.position,l=n._aspectRatio||t.shiftKey,c={top:0,left:0},p=n.containerElement,f=!0;p[0]!==document&&/static/.test(p.css("position"))&&(c=a),h.left<(n._helper?a.left:0)&&(n.size.width=n.size.width+(n._helper?n.position.left-a.left:n.position.left-c.left),l&&(n.size.height=n.size.width/n.aspectRatio,f=!1),n.position.left=r.helper?a.left:0),h.top<(n._helper?a.top:0)&&(n.size.height=n.size.height+(n._helper?n.position.top-a.top:n.position.top),l&&(n.size.width=n.size.height*n.aspectRatio,f=!1),n.position.top=n._helper?a.top:0),s=n.containerElement.get(0)===n.element.parent().get(0),o=/relative|absolute/.test(n.containerElement.css("position")),s&&o?(n.offset.left=n.parentData.left+n.position.left,n.offset.top=n.parentData.top+n.position.top):(n.offset.left=n.element.offset().left,n.offset.top=n.element.offset().top),e=Math.abs(n.sizeDiff.width+(n._helper?n.offset.left-c.left:n.offset.left-a.left)),i=Math.abs(n.sizeDiff.height+(n._helper?n.offset.top-c.top:n.offset.top-a.top)),e+n.size.width>=n.parentData.width&&(n.size.width=n.parentData.width-e,l&&(n.size.height=n.size.width/n.aspectRatio,f=!1)),i+n.size.height>=n.parentData.height&&(n.size.height=n.parentData.height-i,l&&(n.size.width=n.size.height*n.aspectRatio,f=!1)),f||(n.position.left=n.prevPosition.left,n.position.top=n.prevPosition.top,n.size.width=n.prevSize.width,n.size.height=n.prevSize.height)},stop:function(){var t=P(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,o=t.containerElement,n=P(t.helper),r=n.offset(),a=n.outerWidth()-t.sizeDiff.width,h=n.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(o.css("position"))&&P(this).css({left:r.left-s.left-i.left,width:a,height:h}),t._helper&&!e.animate&&/static/.test(o.css("position"))&&P(this).css({left:r.left-s.left-i.left,width:a,height:h})}}),P.ui.plugin.add("resizable","alsoResize",{start:function(){var t=P(this).resizable("instance").options;P(t.alsoResize).each(function(){var t=P(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=P(this).resizable("instance"),s=e.options,o=e.originalSize,n=e.originalPosition,r={height:e.size.height-o.height||0,width:e.size.width-o.width||0,top:e.position.top-n.top||0,left:e.position.left-n.left||0};P(s.alsoResize).each(function(){var t=P(this),s=P(this).data("ui-resizable-alsoresize"),o={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];P.each(e,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&0<=i&&(o[e]=i||null)}),t.css(o)})},stop:function(){P(this).removeData("ui-resizable-alsoresize")}}),P.ui.plugin.add("resizable","ghost",{start:function(){var t=P(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==P.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=P(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=P(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),P.ui.plugin.add("resizable","grid",{resize:function(){var t,e=P(this).resizable("instance"),i=e.options,s=e.size,o=e.originalSize,n=e.originalPosition,r=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=a[0]||1,l=a[1]||1,c=Math.round((s.width-o.width)/h)*h,p=Math.round((s.height-o.height)/l)*l,f=o.width+c,u=o.height+p,d=i.maxWidth&&i.maxWidth<f,g=i.maxHeight&&i.maxHeight<u,m=i.minWidth&&i.minWidth>f,v=i.minHeight&&i.minHeight>u;i.grid=a,m&&(f+=h),v&&(u+=l),d&&(f-=h),g&&(u-=l),/^(se|s|e)$/.test(r)?(e.size.width=f,e.size.height=u):/^(ne)$/.test(r)?(e.size.width=f,e.size.height=u,e.position.top=n.top-p):/^(sw)$/.test(r)?(e.size.width=f,e.size.height=u,e.position.left=n.left-c):((u-l<=0||f-h<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<u-l?(e.size.height=u,e.position.top=n.top-p):(u=l-t.height,e.size.height=u,e.position.top=n.top+o.height-u),0<f-h?(e.size.width=f,e.position.left=n.left-c):(f=h-t.width,e.size.width=f,e.position.left=n.left+o.width-f))}});P.ui.resizable,P.widget("ui.selectable",P.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var s=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){s.elementPos=P(s.element[0]).offset(),s.selectees=P(s.options.filter,s.element[0]),s._addClass(s.selectees,"ui-selectee"),s.selectees.each(function(){var t=P(this),e=t.offset(),i={left:e.left-s.elementPos.left,top:e.top-s.elementPos.top};P.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=P("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=P(this.element[0]).offset(),this.options.disabled||(this.selectees=P(t.filter,this.element[0]),this._trigger("start",i),P(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=P.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),P(i.target).parents().addBack().each(function(){var t,e=P.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){if(this.dragged=!0,!this.options.disabled){var t,o=this,n=this.options,r=this.opos[0],a=this.opos[1],h=s.pageX,l=s.pageY;return h<r&&(t=h,h=r,r=t),l<a&&(t=l,l=a,a=t),this.helper.css({left:r,top:a,width:h-r,height:l-a}),this.selectees.each(function(){var t=P.data(this,"selectable-item"),e=!1,i={};t&&t.element!==o.element[0]&&(i.left=t.left+o.elementPos.left,i.right=t.right+o.elementPos.left,i.top=t.top+o.elementPos.top,i.bottom=t.bottom+o.elementPos.top,"touch"===n.tolerance?e=!(i.left>h||i.right<r||i.top>l||i.bottom<a):"fit"===n.tolerance&&(e=i.left>r&&i.right<h&&i.top>a&&i.bottom<l),e?(t.selected&&(o._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(o._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(o._addClass(t.$element,"ui-selecting"),t.selecting=!0,o._trigger("selecting",s,{selecting:t.element}))):(t.selecting&&((s.metaKey||s.ctrlKey)&&t.startselected?(o._removeClass(t.$element,"ui-selecting"),t.selecting=!1,o._addClass(t.$element,"ui-selected"),t.selected=!0):(o._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(o._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),o._trigger("unselecting",s,{unselecting:t.element}))),t.selected&&(s.metaKey||s.ctrlKey||t.startselected||(o._removeClass(t.$element,"ui-selected"),t.selected=!1,o._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,o._trigger("unselecting",s,{unselecting:t.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,P(".ui-unselecting",this.element[0]).each(function(){var t=P.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),P(".ui-selecting",this.element[0]).each(function(){var t=P.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),P.widget("ui.sortable",P.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),P.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),P(t.target).parents().each(function(){if(P.data(this,o.widgetName+"-item")===o)return i=P(this),!1}),P.data(t.target,o.widgetName+"-item")===o&&(i=P(t.target)),!!i&&(!(this.options.handle&&!e&&(P(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,e,i){var s,o,n=this.options;if((this.currentContainer=this).refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},P.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),n.containment&&this._setContainment(),n.cursor&&"auto"!==n.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",n.cursor),this.storedStylesheet=P("<style>*{ cursor: "+n.cursor+" !important; }</style>").appendTo(o)),n.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",n.opacity)),n.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",n.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return P.ui.ddmanager&&(P.ui.ddmanager.current=this),P.ui.ddmanager&&!n.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,i,s,o,n=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-this.overflowOffset.top<n.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-n.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-this.overflowOffset.left<n.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-n.scrollSpeed)):(t.pageY-this.document.scrollTop()<n.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-n.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<n.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+n.scrollSpeed)),t.pageX-this.document.scrollLeft()<n.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-n.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<n.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+n.scrollSpeed))),!1!==r&&P.ui.ddmanager&&!n.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(o=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===s||P.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&P.contains(this.element[0],s))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),P.ui.ddmanager&&P.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,o,n;if(t)return P.ui.ddmanager&&!this.options.dropBehaviour&&P.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),n={},(o=this.options.axis)&&"x"!==o||(n.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(n.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,P(this.helper).animate(n,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new P.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),P.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?P(this.domPosition.prev).after(this.currentItem):P(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},P(t).each(function(){var t=(P(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(P(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,o=s+this.helperProportions.height,n=t.left,r=n+t.width,a=t.top,h=a+t.height,l=this.offset.click.top,c=this.offset.click.left,p="x"===this.options.axis||a<s+l&&s+l<h,f="y"===this.options.axis||n<e+c&&e+c<r,u=p&&f;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u:n<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<s+this.helperProportions.height/2&&o-this.helperProportions.height/2<h},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!s||!o)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&i||"left"===o&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,o,n=[],r=[],a=this._connectWith();if(a&&t)for(e=a.length-1;0<=e;e--)for(i=(s=P(a[e],this.document[0])).length-1;0<=i;i--)(o=P.data(s[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&r.push([P.isFunction(o.options.items)?o.options.items.call(o.element):P(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function h(){n.push(this)}for(r.push([P.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):P(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=r.length-1;0<=e;e--)r[e][0].each(h);return P(n)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=P.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,o,n,r,a,h,l=this.items,c=[[P.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):P(this.options.items,this.element),this]],p=this._connectWith();if(p&&this.ready)for(e=p.length-1;0<=e;e--)for(i=(s=P(p[e],this.document[0])).length-1;0<=i;i--)(o=P.data(s[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&(c.push([P.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):P(o.options.items,o.element),o]),this.containers.push(o));for(e=c.length-1;0<=e;e--)for(n=c[e][1],i=0,h=(r=c[e][0]).length;i<h;i++)(a=P(r[i])).data(this.widgetName+"-item",n),l.push({item:a,instance:n,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var e,i,s,o;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),e=this.items.length-1;0<=e;e--)(i=this.items[e]).instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?P(this.options.toleranceElement,i.item):i.item,t||(i.width=s.outerWidth(),i.height=s.outerHeight()),o=s.offset(),i.left=o.left,i.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)o=this.containers[e].element.offset(),this.containers[e].containerCache.left=o.left,this.containers[e].containerCache.top=o.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(s=o.placeholder,o.placeholder={element:function(){var t=i.currentItem[0].nodeName.toLowerCase(),e=P("<"+t+">",i.document[0]);return i._addClass(e,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(e,"ui-sortable-helper"),"tbody"===t?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),P("<tr>",i.document[0]).appendTo(e)):"tr"===t?i._createTrPlaceholder(i.currentItem,e):"img"===t&&e.attr("src",i.currentItem.attr("src")),s||e.css("visibility","hidden"),e},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=P(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){P("<td>&#160;</td>",i.document[0]).attr("colspan",P(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,o,n,r,a,h,l,c=null,p=null,f=this.containers.length-1;0<=f;f--)if(!P.contains(this.currentItem[0],this.containers[f].element[0]))if(this._intersectsWith(this.containers[f].containerCache)){if(c&&P.contains(this.containers[f].element[0],c.element[0]))continue;c=this.containers[f],p=f}else this.containers[f].containerCache.over&&(this.containers[f]._trigger("out",t,this._uiHash(this)),this.containers[f].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(i=1e4,s=null,o=(h=c.floating||this._isFloating(this.currentItem))?"left":"top",n=h?"width":"height",l=h?"pageX":"pageY",e=this.items.length-1;0<=e;e--)P.contains(this.containers[p].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(r=this.items[e].item.offset()[o],a=!1,t[l]-r>this.items[e][n]/2&&(a=!0),Math.abs(t[l]-r)<i&&(i=Math.abs(t[l]-r),s=this.items[e],this.direction=a?"up":"down"));if(!s&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var e=this.options,i=P.isFunction(e.helper)?P(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||P("parent"!==e.appendTo?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),i[0].style.width&&!e.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!e.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),P.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&P.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&P.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),"document"!==s.containment&&"window"!==s.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===s.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===s.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(t=P(s.containment)[0],e=P(s.containment).offset(),i="hidden"!==P(t).css("overflow"),this.containment=[e.left+(parseInt(P(t).css("borderLeftWidth"),10)||0)+(parseInt(P(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(P(t).css("borderTopWidth"),10)||0)+(parseInt(P(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(P(t).css("borderLeftWidth"),10)||0)-(parseInt(P(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(P(t).css("borderTopWidth"),10)||0)-(parseInt(P(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&P.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*i}},_generatePosition:function(t){var e,i,s=this.options,o=t.pageX,n=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&P.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(n=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(n=this.containment[3]+this.offset.click.top)),s.grid&&(e=this.originalPageY+Math.round((n-this.originalPageY)/s.grid[1])*s.grid[1],n=!this.containment||e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-s.grid[1]:e+s.grid[1],i=this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0],o=!this.containment||i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-s.grid[0]:i+s.grid[0])),{top:n-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function o(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(o("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(o("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===P.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||P([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}});var d,g,m,v,e,_,b,w,y,S,W,T,k,D,E,N,O,R,L,M,A,F="ui-effects-",B="ui-effects-style",X="ui-effects-animated",Y=P;function q(t,e,i){var s=w[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:t<0?0:s.max<t?s.max:t)}function j(r){var a=_(),h=a._rgba=[];return r=r.toLowerCase(),W(e,function(t,e){var i,s=e.re.exec(r),o=s&&e.parse(s),n=e.space||"rgba";if(o)return i=a[n](o),a[b[n].cache]=i[b[n].cache],h=a._rgba=i._rgba,!1}),h.length?("0,0,0,0"===h.join()&&d.extend(h,m.transparent),a):m[r]}function $(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function U(t){var e,i,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,o={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)"string"==typeof s[e=s[i]]&&(o[P.camelCase(e)]=s[e]);else for(e in s)"string"==typeof s[e]&&(o[e]=s[e]);return o}function K(t,e,i,s){return P.isPlainObject(t)&&(t=(e=t).effect),t={effect:t},null==e&&(e={}),P.isFunction(e)&&(s=e,i=null,e={}),"number"!=typeof e&&!P.fx.speeds[e]||(s=i,i=e,e={}),P.isFunction(i)&&(s=i,i=null),e&&P.extend(t,e),i=i||e.duration,t.duration=P.fx.off?0:"number"==typeof i?i:i in P.fx.speeds?P.fx.speeds[i]:P.fx.speeds._default,t.complete=s||e.complete,t}function V(t){return!t||"number"==typeof t||P.fx.speeds[t]||("string"==typeof t&&!P.effects.effect[t]||(P.isFunction(t)||"object"==typeof t&&!t.effect))}function Q(t,e){var i=e.outerWidth(),s=e.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}P.effects={effect:{}},v=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],_=(d=Y).Color=function(t,e,i,s){return new d.Color.fn.parse(t,e,i,s)},b={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},w={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},y=_.support={},S=d("<p>")[0],W=d.each,S.style.cssText="background-color:rgba(1,1,1,.5)",y.rgba=-1<S.style.backgroundColor.indexOf("rgba"),W(b,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),_.fn=d.extend(_.prototype,{parse:function(o,t,e,i){if(o===g)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=d(o).css(t),t=g);var n=this,s=d.type(o),r=this._rgba=[];return t!==g&&(o=[o,t,e,i],s="array"),"string"===s?this.parse(j(o)||m._default):"array"===s?(W(b.rgba.props,function(t,e){r[e.idx]=q(o[e.idx],e)}),this):"object"===s?(W(b,o instanceof _?function(t,e){o[e.cache]&&(n[e.cache]=o[e.cache].slice())}:function(t,i){var s=i.cache;W(i.props,function(t,e){if(!n[s]&&i.to){if("alpha"===t||null==o[t])return;n[s]=i.to(n._rgba)}n[s][e.idx]=q(o[t],e,!0)}),n[s]&&d.inArray(null,n[s].slice(0,3))<0&&(n[s][3]=1,i.from&&(n._rgba=i.from(n[s])))}),this):void 0},is:function(t){var o=_(t),n=!0,r=this;return W(b,function(t,e){var i,s=o[e.cache];return s&&(i=r[e.cache]||e.to&&e.to(r._rgba)||[],W(e.props,function(t,e){if(null!=s[e.idx])return n=s[e.idx]===i[e.idx]})),n}),n},_space:function(){var i=[],s=this;return W(b,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,r){var e=(l=_(t))._space(),i=b[e],s=0===this.alpha()?_("transparent"):this,a=s[i.cache]||i.to(s._rgba),h=a.slice(),l=l[i.cache];return W(i.props,function(t,e){var i=e.idx,s=a[i],o=l[i],n=w[e.type]||{};null!==o&&(null===s?h[i]=o:(n.mod&&(n.mod/2<o-s?s+=n.mod:n.mod/2<s-o&&(s-=n.mod)),h[i]=q((o-s)*r+s,e)))}),this[e](h)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),s=_(t)._rgba;return _(d.map(e,function(t,e){return(1-i)*s[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=d.map(this._rgba,function(t,e){return null==t?2<e?1:0:t});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=d.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+d.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),_.fn.parse.prototype=_.fn,b.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/255,i=t[1]/255,s=t[2]/255,o=t[3],n=Math.max(e,i,s),r=Math.min(e,i,s),a=n-r,h=n+r,l=.5*h,c=r===n?0:e===n?60*(i-s)/a+360:i===n?60*(s-e)/a+120:60*(e-i)/a+240,p=0==a?0:l<=.5?a/h:a/(2-h);return[Math.round(c)%360,p,l,null==o?1:o]},b.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],n=s<=.5?s*(1+i):s+i-s*i,r=2*s-n;return[Math.round(255*$(r,n,e+1/3)),Math.round(255*$(r,n,e)),Math.round(255*$(r,n,e-1/3)),o]},W(b,function(h,t){var i=t.props,r=t.cache,a=t.to,l=t.from;_.fn[h]=function(t){if(a&&!this[r]&&(this[r]=a(this._rgba)),t===g)return this[r].slice();var e,s=d.type(t),o="array"===s||"object"===s?t:arguments,n=this[r].slice();return W(i,function(t,e){var i=o["object"===s?t:e.idx];null==i&&(i=n[e.idx]),n[e.idx]=q(i,e)}),l?((e=_(l(n)))[r]=n,e):_(n)},W(i,function(r,a){_.fn[r]||(_.fn[r]=function(t){var e,i=d.type(t),s="alpha"===r?this._hsla?"hsla":"rgba":h,o=this[s](),n=o[a.idx];return"undefined"===i?n:("function"===i&&(t=t.call(this,n),i=d.type(t)),null==t&&a.empty?this:("string"===i&&(e=v.exec(t))&&(t=n+parseFloat(e[2])*("+"===e[1]?1:-1)),o[a.idx]=t,this[s](o)))})})}),_.hook=function(t){var e=t.split(" ");W(e,function(t,n){d.cssHooks[n]={set:function(t,e){var i,s,o="";if("transparent"!==e&&("string"!==d.type(e)||(i=j(e)))){if(e=_(i||e),!y.rgba&&1!==e._rgba[3]){for(s="backgroundColor"===n?t.parentNode:t;(""===o||"transparent"===o)&&s&&s.style;)try{o=d.css(s,"backgroundColor"),s=s.parentNode}catch(t){}e=e.blend(o&&"transparent"!==o?o:"_default")}e=e.toRgbaString()}try{t.style[n]=e}catch(t){}}},d.fx.step[n]=function(t){t.colorInit||(t.start=_(t.elem,n),t.end=_(t.end),t.colorInit=!0),d.cssHooks[n].set(t.elem,t.start.transition(t.end,t.pos))}})},_.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),d.cssHooks.borderColor={expand:function(i){var s={};return W(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}},m=d.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},E=["add","remove","toggle"],N={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},P.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){P.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(Y.style(t.elem,e,t.end),t.setAttr=!0)}}),P.fn.addBack||(P.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),P.effects.animateClass=function(o,t,e,i){var n=P.speed(t,e,i);return this.queue(function(){var i=P(this),t=i.attr("class")||"",e=(e=n.children?i.find("*").addBack():i).map(function(){return{el:P(this),start:U(this)}}),s=function(){P.each(E,function(t,e){o[e]&&i[e+"Class"](o[e])})};s(),e=e.map(function(){return this.end=U(this.el[0]),this.diff=function(t,e){var i,s,o={};for(i in e)s=e[i],t[i]!==s&&(N[i]||!P.fx.step[i]&&isNaN(parseFloat(s))||(o[i]=s));return o}(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=P.Deferred(),i=P.extend({},n,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),P.when.apply(P,e.get()).done(function(){s(),P.each(arguments,function(){var e=this.el;P.each(this.diff,function(t){e.css(t,"")})}),n.complete.call(i[0])})})},P.fn.extend({addClass:(D=P.fn.addClass,function(t,e,i,s){return e?P.effects.animateClass.call(this,{add:t},e,i,s):D.apply(this,arguments)}),removeClass:(k=P.fn.removeClass,function(t,e,i,s){return 1<arguments.length?P.effects.animateClass.call(this,{remove:t},e,i,s):k.apply(this,arguments)}),toggleClass:(T=P.fn.toggleClass,function(t,e,i,s,o){return"boolean"==typeof e||void 0===e?i?P.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,o):T.apply(this,arguments):P.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,o){return P.effects.animateClass.call(this,{add:e,remove:t},i,s,o)}}),P.expr&&P.expr.filters&&P.expr.filters.animated&&(P.expr.filters.animated=(O=P.expr.filters.animated,function(t){return!!P(t).data(X)||O(t)})),!1!==P.uiBackCompat&&P.extend(P.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(F+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,o=e.length;s<o;s++)null!==e[s]&&(i=t.data(F+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=P("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return i.wrap(t),i[0]!==o&&!P.contains(i[0],o)||P(o).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(P.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),P.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!P.contains(t[0],e)||P(e).trigger("focus")),t}}),P.extend(P.effects,{version:"1.12.1",define:function(t,e,i){return i||(i=e,e="effect"),P.effects.effect[t]=i,P.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,o="vertical"!==i?(e||100)/100:1;return{height:t.height()*o,width:t.width()*s,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1<e&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(B,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(B)||"",t.removeData(B)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(t){var e,i=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=P("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(F+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=F+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){P.effects.restoreStyle(t),P.effects.removePlaceholder(t)},setTransition:function(s,t,o,n){return n=n||{},P.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(n[e]=i[0]*o+i[1])}),n}}),P.fn.extend({effect:function(){function t(t){var e=P(this),i=P.effects.mode(e,a)||n;e.data(X,!0),h.push(i),n&&("show"===i||i===n&&"hide"===i)&&e.show(),n&&"none"===i||P.effects.saveStyle(e),P.isFunction(t)&&t()}var s=K.apply(this,arguments),o=P.effects.effect[s.effect],n=o.mode,e=s.queue,i=e||"fx",r=s.complete,a=s.mode,h=[];if(P.fx.off||!o)return a?this[a](s.duration,r):this.each(function(){r&&r.call(this)});function l(t){var e=P(this);function i(){P.isFunction(r)&&r.call(e[0]),P.isFunction(t)&&t()}s.mode=h.shift(),!1===P.uiBackCompat||n?"none"===s.mode?(e[a](),i()):o.call(e[0],s,function(){e.removeData(X),P.effects.cleanUp(e),"hide"===s.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===a:"show"===a)?(e[a](),i()):o.call(e[0],s,i)}return!1===e?this.each(t).each(l):this.queue(i,t).queue(i,l)},show:(M=P.fn.show,function(t){if(V(t))return M.apply(this,arguments);var e=K.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}),hide:(L=P.fn.hide,function(t){if(V(t))return L.apply(this,arguments);var e=K.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}),toggle:(R=P.fn.toggle,function(t){if(V(t)||"boolean"==typeof t)return R.apply(this,arguments);var e=K.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}),cssUnit:function(t){var i=this.css(t),s=[];return P.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):Q(this.css("clip"),this)},transfer:function(t,e){var i=P(this),s=P(t.to),o="fixed"===s.css("position"),n=P("body"),r=o?n.scrollTop():0,a=o?n.scrollLeft():0,h=s.offset(),l={top:h.top-r,left:h.left-a,height:s.innerHeight(),width:s.innerWidth()},c=i.offset(),p=P("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(t.className).css({top:c.top-r,left:c.left-a,height:i.innerHeight(),width:i.innerWidth(),position:o?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){p.remove(),P.isFunction(e)&&e()})}}),P.fx.step.clip=function(t){t.clipInit||(t.start=P(t.elem).cssClip(),"string"==typeof t.end&&(t.end=Q(t.end,t.elem)),t.clipInit=!0),P(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},A={},P.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){A[t]=function(t){return Math.pow(t,e+2)}}),P.extend(A,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),P.each(A,function(t,e){P.easing["easeIn"+t]=e,P.easing["easeOut"+t]=function(t){return 1-e(1-t)},P.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});P.effects,P.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=P(this),o=t.direction||"up",n=s.cssClip(),r={clip:P.extend({},n)},a=P.effects.createPlaceholder(s);r.clip[i[o][0]]=r.clip[i[o][1]],"show"===t.mode&&(s.cssClip(r.clip),a&&a.css(P.effects.clipToBox(r)),r.clip=n),a&&a.animate(P.effects.clipToBox(r),t.duration,t.easing),s.animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("bounce",function(t,e){var i,s,o,n=P(this),r=t.mode,a="hide"===r,h="show"===r,l=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(h||a?1:0),u=t.duration/f,d=t.easing,g="up"===l||"down"===l?"top":"left",m="up"===l||"left"===l,v=0,_=n.queue().length;for(P.effects.createPlaceholder(n),o=n.css(g),c=c||n["top"==g?"outerHeight":"outerWidth"]()/3,h&&((s={opacity:1})[g]=o,n.css("opacity",0).css(g,m?2*-c:2*c).animate(s,u,d)),a&&(c/=Math.pow(2,p-1)),(s={})[g]=o;v<p;v++)(i={})[g]=(m?"-=":"+=")+c,n.animate(i,u,d).animate(s,u,d),c=a?2*c:c/2;a&&((i={opacity:0})[g]=(m?"-=":"+=")+c,n.animate(i,u,d)),n.queue(e),P.effects.unshift(n,_,1+f)}),P.effects.define("drop","hide",function(t,e){var i,s=P(this),o="show"===t.mode,n=t.direction||"left",r="up"===n||"down"===n?"top":"left",a="up"===n||"left"===n?"-=":"+=",h="+="==a?"-=":"+=",l={opacity:0};P.effects.createPlaceholder(s),i=t.distance||s["top"==r?"outerHeight":"outerWidth"](!0)/2,l[r]=a+i,o&&(s.css(l),l[r]=h+i,l.opacity=1),s.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;P(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("fold","hide",function(e,t){var i=P(this),s=e.mode,o="show"===s,n="hide"===s,r=e.size||15,a=/([0-9]+)%/.exec(r),h=!!e.horizFirst?["right","bottom"]:["bottom","right"],l=e.duration/2,c=P.effects.createPlaceholder(i),p=i.cssClip(),f={clip:P.extend({},p)},u={clip:P.extend({},p)},d=[p[h[0]],p[h[1]]],g=i.queue().length;a&&(r=parseInt(a[1],10)/100*d[n?0:1]),f.clip[h[0]]=r,u.clip[h[0]]=r,u.clip[h[1]]=0,o&&(i.cssClip(u.clip),c&&c.css(P.effects.clipToBox(u)),u.clip=p),i.queue(function(t){c&&c.animate(P.effects.clipToBox(f),l,e.easing).animate(P.effects.clipToBox(u),l,e.easing),t()}).animate(f,l,e.easing).animate(u,l,e.easing).queue(t),P.effects.unshift(i,g,4)}),P.effects.define("highlight","show",function(t,e){var i=P(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),P.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("size",function(o,e){var t,n,i,s=P(this),r=["fontSize"],a=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],l=o.mode,c="effect"!==l,p=o.scale||"both",f=o.origin||["middle","center"],u=s.css("position"),d=s.position(),g=P.effects.scaledDimensions(s),m=o.from||g,v=o.to||P.effects.scaledDimensions(s,0);P.effects.createPlaceholder(s),"show"===l&&(i=m,m=v,v=i),n={from:{y:m.height/g.height,x:m.width/g.width},to:{y:v.height/g.height,x:v.width/g.width}},"box"!==p&&"both"!==p||(n.from.y!==n.to.y&&(m=P.effects.setTransition(s,a,n.from.y,m),v=P.effects.setTransition(s,a,n.to.y,v)),n.from.x!==n.to.x&&(m=P.effects.setTransition(s,h,n.from.x,m),v=P.effects.setTransition(s,h,n.to.x,v))),"content"!==p&&"both"!==p||n.from.y!==n.to.y&&(m=P.effects.setTransition(s,r,n.from.y,m),v=P.effects.setTransition(s,r,n.to.y,v)),f&&(t=P.effects.getBaseline(f,g),m.top=(g.outerHeight-m.outerHeight)*t.y+d.top,m.left=(g.outerWidth-m.outerWidth)*t.x+d.left,v.top=(g.outerHeight-v.outerHeight)*t.y+d.top,v.left=(g.outerWidth-v.outerWidth)*t.x+d.left),s.css(m),"content"!==p&&"both"!==p||(a=a.concat(["marginTop","marginBottom"]).concat(r),h=h.concat(["marginLeft","marginRight"]),s.find("*[width]").each(function(){var t=P(this),e=P.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},s={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=P.effects.setTransition(t,a,n.from.y,i),s=P.effects.setTransition(t,a,n.to.y,s)),n.from.x!==n.to.x&&(i=P.effects.setTransition(t,h,n.from.x,i),s=P.effects.setTransition(t,h,n.to.x,s)),c&&P.effects.saveStyle(t),t.css(i),t.animate(s,o.duration,o.easing,function(){c&&P.effects.restoreStyle(t)})})),s.animate(v,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){var t=s.offset();0===v.opacity&&s.css("opacity",m.opacity),c||(s.css("position","static"===u?"relative":u).offset(t),P.effects.saveStyle(s)),e()}})}),P.effects.define("scale",function(t,e){var i=P(this),s=t.mode,o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),n=P.extend(!0,{from:P.effects.scaledDimensions(i),to:P.effects.scaledDimensions(i,o,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(n.from.opacity=1,n.to.opacity=0),P.effects.effect.size.call(this,n,e)}),P.effects.define("puff","hide",function(t,e){var i=P.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});P.effects.effect.scale.call(this,i,e)}),P.effects.define("pulsate","show",function(t,e){var i=P(this),s=t.mode,o="show"===s,n=o||"hide"===s,r=2*(t.times||5)+(n?1:0),a=t.duration/r,h=0,l=1,c=i.queue().length;for(!o&&i.is(":visible")||(i.css("opacity",0).show(),h=1);l<r;l++)i.animate({opacity:h},a,t.easing),h=1-h;i.animate({opacity:h},a,t.easing),i.queue(e),P.effects.unshift(i,c,1+r)}),P.effects.define("shake",function(t,e){var i=1,s=P(this),o=t.direction||"left",n=t.distance||20,r=t.times||3,a=2*r+1,h=Math.round(t.duration/a),l="up"===o||"down"===o?"top":"left",c="up"===o||"left"===o,p={},f={},u={},d=s.queue().length;for(P.effects.createPlaceholder(s),p[l]=(c?"-=":"+=")+n,f[l]=(c?"+=":"-=")+2*n,u[l]=(c?"-=":"+=")+2*n,s.animate(p,h,t.easing);i<r;i++)s.animate(f,h,t.easing).animate(u,h,t.easing);s.animate(f,h,t.easing).animate(p,h/2,t.easing).queue(e),P.effects.unshift(s,d,1+a)}),P.effects.define("slide","show",function(t,e){var i,s,o=P(this),n={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=t.mode,a=t.direction||"left",h="up"===a||"down"===a?"top":"left",l="up"===a||"left"===a,c=t.distance||o["top"==h?"outerHeight":"outerWidth"](!0),p={};P.effects.createPlaceholder(o),i=o.cssClip(),s=o.position()[h],p[h]=(l?-1:1)*c+s,p.clip=o.cssClip(),p.clip[n[a][1]]=p.clip[n[a][0]],"show"===r&&(o.cssClip(p.clip),o.css(h,p[h]),p.clip=i,p[h]=s),o.animate(p,{queue:!1,duration:t.duration,easing:t.easing,complete:e})});!1!==P.uiBackCompat&&P.effects.define("transfer",function(t,e){P(this).transfer(t,e)})}); })(this);
 
 // 3rdParty/jquery-ui/touchPunch.js
-(function (window, undefined) { undefined })(this);
+(function (window, undefined) { !function(t){var o,e,u,n;function c(o,t){var e,u;1<o.originalEvent.touches.length||(o.preventDefault(),e=o.originalEvent.changedTouches[0],(u=document.createEvent("MouseEvents")).initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(u))}t.support.touch="ontouchend"in document,t.support.touch&&(o=t.ui.mouse.prototype,e=o._mouseInit,u=o._mouseDestroy,o._touchStart=function(o){!n&&this._mouseCapture(o.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,c(o,"mouseover"),c(o,"mousemove"),c(o,"mousedown"))},o._touchMove=function(o){n&&(this._touchMoved=!0,c(o,"mousemove"))},o._touchEnd=function(o){n&&(c(o,"mouseup"),c(o,"mouseout"),this._touchMoved||c(o,"click"),n=!1)},o._mouseInit=function(){var o=this;o.element.bind({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),e.call(o)},o._mouseDestroy=function(){var o=this;o.element.unbind({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),u.call(o)})}(jQuery); })(this);
 
 // 3rdParty/jquery-ui/nestedSortable.js
-(function (window, undefined) { undefined })(this);
+(function (window, undefined) { !function(f){f.widget("mjs.nestedSortable",f.extend({},f.ui.sortable.prototype,{options:{tabSize:20,disableNesting:"mjs-nestedSortable-no-nesting",errorClass:"mjs-nestedSortable-error",doNotClear:!1,listType:"ol",maxLevels:0,protectRoot:!1,rootID:null,rtl:!1,isAllowed:function(t,e){return!0}},_create:function(){if(this.element.data("sortable",this.element.data("nestedSortable")),!this.element.is(this.options.listType))throw new Error("nestedSortable: Please check the listType option is set to your actual list type");return f.ui.sortable.prototype._create.apply(this,arguments)},destroy:function(){return this.element.removeData("nestedSortable").unbind(".nestedSortable"),f.ui.sortable.prototype.destroy.apply(this,arguments)},_mouseDrag:function(t){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);var e,s=this.options;this.options.scroll&&(e=!1,this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(t.pageY-f(document).scrollTop()<s.scrollSensitivity?e=f(document).scrollTop(f(document).scrollTop()-s.scrollSpeed):f(window).height()-(t.pageY-f(document).scrollTop())<s.scrollSensitivity&&(e=f(document).scrollTop(f(document).scrollTop()+s.scrollSpeed)),t.pageX-f(document).scrollLeft()<s.scrollSensitivity?e=f(document).scrollLeft(f(document).scrollLeft()-s.scrollSpeed):f(window).width()-(t.pageX-f(document).scrollLeft())<s.scrollSensitivity&&(e=f(document).scrollLeft(f(document).scrollLeft()+s.scrollSpeed))),!1!==e&&f.ui.ddmanager&&!s.dropBehaviour&&f.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute");var i=this.placeholder.offset().top;this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(var o=this.items.length-1;0<=o;o--){var r=this.items[o],l=r.item[0],n=this._intersectsWithPointer(r);if(n&&!(l==this.currentItem[0]||this.placeholder[1==n?"next":"prev"]()[0]==l||f.contains(this.placeholder[0],l)||"semi-dynamic"==this.options.type&&f.contains(this.element[0],l))){if(f(l).mouseenter(),this.direction=1==n?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(r))break;f(l).mouseleave(),this._rearrange(t,r),this._clearEmpty(l),this._trigger("change",t,this._uiHash());break}}var h=this.placeholder[0].parentNode.parentNode&&f(this.placeholder[0].parentNode.parentNode).closest(".ui-sortable").length?f(this.placeholder[0].parentNode.parentNode):null,a=this._getLevel(this.placeholder),p=this._getChildLevels(this.helper),c=this.placeholder[0].previousSibling?f(this.placeholder[0].previousSibling):null;if(null!=c)for(;"li"!=c[0].nodeName.toLowerCase()||c[0]==this.currentItem[0]||c[0]==this.helper[0];){if(!c[0].previousSibling){c=null;break}c=f(c[0].previousSibling)}var d=this.placeholder[0].nextSibling?f(this.placeholder[0].nextSibling):null;if(null!=d)for(;"li"!=d[0].nodeName.toLowerCase()||d[0]==this.currentItem[0]||d[0]==this.helper[0];){if(!d[0].nextSibling){d=null;break}d=f(d[0].nextSibling)}var u=document.createElement(s.listType);return this.beyondMaxLevels=0,null!=h&&null==d&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()>h.offset().left+h.outerWidth()||!s.rtl&&this.positionAbs.left<h.offset().left)?(h.after(this.placeholder[0]),this._clearEmpty(h[0]),this._trigger("change",t,this._uiHash())):null!=c&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()<c.offset().left+c.outerWidth()-s.tabSize||!s.rtl&&this.positionAbs.left>c.offset().left+s.tabSize)?(this._isAllowed(c,a,a+p+1),c.children(s.listType).length||c[0].appendChild(u),i&&i<=c.offset().top?c.children(s.listType).prepend(this.placeholder):c.children(s.listType)[0].appendChild(this.placeholder[0]),this._trigger("change",t,this._uiHash())):this._isAllowed(h,a,a+p),this._contactContainers(t),f.ui.ddmanager&&f.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){this.beyondMaxLevels&&(this.placeholder.removeClass(this.options.errorClass),this.domPosition.prev?f(this.domPosition.prev).after(this.placeholder):f(this.domPosition.parent).prepend(this.placeholder),this._trigger("revert",t,this._uiHash()));for(var s=this.items.length-1;0<=s;s--){var i=this.items[s].item[0];this._clearEmpty(i)}f.ui.sortable.prototype._mouseStop.apply(this,arguments)},serialize:function(t){var s=f.extend({},this.options,t),e=this._getItemsAsjQuery(s&&s.connected),i=[];return f(e).each(function(){var t=(f(s.item||this).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/),e=(f(s.item||this).parent(s.listType).parent(s.items).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/);t&&i.push((s.key||t[1])+"["+(s.key&&s.expression?t[1]:t[2])+"]="+(e?s.key&&s.expression?e[1]:e[2]:s.rootID))}),!i.length&&s.key&&i.push(s.key+"="),i.join("&")},toHierarchy:function(t){var o=f.extend({},this.options,t),e=(o.startDepthCount,[]);return f(this.element).children(o.items).each(function(){var t=function e(t){var s=(f(t).attr(o.attribute||"id")||"").match(o.expression||/(.+)[-=_](.+)/);if(s){var i={id:s[2]};return 0<f(t).children(o.listType).children(o.items).length&&(i.children=[],f(t).children(o.listType).children(o.items).each(function(){var t=e(this);i.children.push(t)})),i}}(this);e.push(t)}),e},toArray:function(t){var h=f.extend({},this.options,t),a=h.startDepthCount||0,p=[],e=2;return p.push({item_id:h.rootID,parent_id:"none",depth:a,left:"1",right:2*(f(h.items,this.element).length+1)}),f(this.element).children(h.items).each(function(){e=function t(e,s,i){var o,r,l=i+1;0<f(e).children(h.listType).children(h.items).length&&(s++,f(e).children(h.listType).children(h.items).each(function(){l=t(f(this),s,l)}),s--);o=f(e).attr(h.attribute||"id").match(h.expression||/(.+)[-=_](.+)/);{var n;r=s===a+1?h.rootID:(n=f(e).parent(h.listType).parent(h.items).attr(h.attribute||"id").match(h.expression||/(.+)[-=_](.+)/),n[2])}o&&p.push({item_id:o[2],parent_id:r,depth:s,left:i,right:l});i=l+1;return i}(this,a+1,e)}),p=p.sort(function(t,e){return t.left-e.left})},_clearEmpty:function(t){var e=f(t).children(this.options.listType);!e.length||e.children().length||this.options.doNotClear||e.remove()},_getLevel:function(t){var e=1;if(this.options.listType)for(var s=t.closest(this.options.listType);s&&0<s.length&&!s.is(".ui-sortable");)e++,s=s.parent().closest(this.options.listType);return e},_getChildLevels:function(t,s){var i=this,e=this.options,o=0;return s=s||0,f(t).children(e.listType).children(e.items).each(function(t,e){o=Math.max(i._getChildLevels(e,s+1),o)}),s?o+1:o},_isAllowed:function(t,e,s){var i=this.options,o=!!f(this.domPosition.parent).hasClass("ui-sortable"),r=this.placeholder.closest(".ui-sortable").nestedSortable("option","maxLevels");!i.isAllowed(this.currentItem,t)||t&&t.hasClass(i.disableNesting)||i.protectRoot&&(null==t&&!o||o&&1<e)?(this.placeholder.addClass(i.errorClass),this.beyondMaxLevels=r<s&&0!=r?s-r:1):r<s&&0!=r?(this.placeholder.addClass(i.errorClass),this.beyondMaxLevels=s-r):(this.placeholder.removeClass(i.errorClass),this.beyondMaxLevels=0)}})),f.mjs.nestedSortable.prototype.options=f.extend({},f.ui.sortable.prototype.options,f.mjs.nestedSortable.prototype.options)}(jQuery); })(this);
 
 // 3rdParty/polyfill/focus-visible.js
-(function (window, undefined) { undefined })(this);
+(function (window, undefined) { function applyFocusVisiblePolyfill(t){var i=!0,n=!1,o=null,d={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function u(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function e(e){i=!1}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(i=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",function(e){e.metaKey||e.altKey||e.ctrlKey||(s(t.activeElement)&&u(t.activeElement),i=!0)},!0),document.addEventListener("mousedown",e,!0),document.addEventListener("pointerdown",e,!0),document.addEventListener("touchstart",e,!0),document.addEventListener("visibilitychange",function(e){"hidden"==document.visibilityState&&(n&&(i=!0),a())},!0),a(),t.addEventListener("focus",function(e){var t,n,o;s(e.target)&&(i||(t=e.target,n=t.type,"INPUT"==(o=t.tagName)&&d[n]&&!t.readOnly||("TEXTAREA"==o&&!t.readOnly||!!t.isContentEditable)))&&u(e.target)},!0),t.addEventListener("blur",function(e){var t;s(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(o),o=window.setTimeout(function(){n=!1,window.clearTimeout(o)},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))},!0),t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host?t.host.setAttribute("data-js-focus-visible",""):t.nodeType===Node.DOCUMENT_NODE&&document.documentElement.classList.add("js-focus-visible")}if("undefined"!=typeof window&&"undefined"!=typeof document){var event;window.applyFocusVisiblePolyfill=applyFocusVisiblePolyfill;try{event=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(event=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(event)}"undefined"!=typeof document&&applyFocusVisiblePolyfill(document); })(this);
 
 // WCF.Assets.js
-(function (window, undefined) { WCF.Assets.js; })(this);
+(function (window, undefined) { !function(){var o=!1,a=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(e){function t(){!o&&this.init&&this.init.apply(this,arguments)}var i=this.prototype;o=!0;var n=new this;for(var r in o=!1,e)n[r]="function"==typeof e[r]&&"function"==typeof i[r]&&a.test(e[r])?function(n,r){return function(){var e=this._super;this._super=i[n];var t=r.apply(this,arguments);return this._super=e,t}}(r,e[r]):e[r];return((t.prototype=n).constructor=t).extend=arguments.callee,t}}(),function(u,r){"use strict";function s(){}function o(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;n<r;n++)t.call(e,e[n],n)}}function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==r&&null!==t&&n===e}function a(e){return t("Function",e)}function l(e){return t("Array",e)}function c(e){(e=e||s)._done||(e(),e._done=1)}function i(e){var t,n,r,i,o,a={};if("object"==typeof e)for(t in e)e[t]&&(a={name:t,url:e[t]});else a={name:(r=e.split("/"),i=r[r.length-1],-1!==(o=i.indexOf("?"))?i.substring(0,o):i),url:e};return(n=y[a.name])&&n.url===a.url?n:y[a.name]=a}function p(e){for(var t in e=e||y)if(e.hasOwnProperty(t)&&e[t].state!==k)return;return 1}function d(t){t.state===r&&(t.state=A,t.onpreload=[],n({url:t.url,type:"cache"},function(){var e;(e=t).state=x,o(e.onpreload,function(e){e.call()})}))}function f(e,t){t=t||s,e.state!==k?e.state!==L?e.state!==A?(e.state=L,n(e,function(){e.state=k,t(),o(w[e.name],function(e){c(e)}),g&&p()&&o(w.ALL,function(e){c(e)})})):e.onpreload.push(function(){f(e,t)}):O.ready(e.name,t):t()}function n(r,t){function e(e){e=e||u.event,o.onload=o.onreadystatechange=o.onerror=null,t()}function i(e){("load"===(e=e||u.event).type||/loaded|complete/.test(o.readyState)&&(!v.documentMode||v.documentMode<9))&&(u.clearTimeout(r.errorTimeout),u.clearTimeout(r.cssTimeout),o.onload=o.onreadystatechange=o.onerror=null,t())}var o,n,a,l;t=t||s,a=r.url,"css"===(l=(a=a||"").split("?")[0].split("."))[l.length-1].toLowerCase()?((o=v.createElement("link")).type="text/"+(r.type||"css"),o.rel="stylesheet",o.href=r.url,r.cssRetries=0,r.cssTimeout=u.setTimeout(function e(){if(r.state!==k&&r.cssRetries<=20){for(var t=0,n=v.styleSheets.length;t<n;t++)if(v.styleSheets[t].href===o.href)return void i({type:"load"});r.cssRetries++,r.cssTimeout=u.setTimeout(e,250)}},500)):((o=v.createElement("script")).type="text/"+(r.type||"javascript"),o.src=r.url),o.onload=o.onreadystatechange=i,o.onerror=e,o.async=!1,o.defer=!1,r.errorTimeout=u.setTimeout(function(){e({type:"timeout"})},7e3),(n=v.head||v.getElementsByTagName("head")[0]).insertBefore(o,n.lastChild)}function e(){if(!v.body)return u.clearTimeout(O.readyTimeout),void(O.readyTimeout=u.setTimeout(e,50));g||(g=!0,function(){for(var e,t=v.getElementsByTagName("script"),n=0,r=t.length;n<r;n++)if(e=t[n].getAttribute("data-headjs-load"))return O.load(e)}(),o(b,function(e){c(e)}))}function h(){v.addEventListener?(v.removeEventListener("DOMContentLoaded",h,!1),e()):"complete"===v.readyState&&(v.detachEvent("onreadystatechange",h),e())}var g,m,v=u.document,b=[],w={},y={},T="async"in v.createElement("script")||"MozAppearance"in v.documentElement.style||u.opera,E=u.head_conf&&u.head_conf.head||"head",O=u[E]=u[E]||function(){O.ready.apply(null,arguments)},A=1,x=2,L=3,k=4;if("complete"===v.readyState)e();else if(v.addEventListener)v.addEventListener("DOMContentLoaded",h,!1),u.addEventListener("load",e,!1);else{v.attachEvent("onreadystatechange",h),u.attachEvent("onload",e),m=!1;try{m=!u.frameElement&&v.documentElement}catch(e){}m&&m.doScroll&&function t(){if(!g){try{m.doScroll("left")}catch(e){return u.clearTimeout(O.readyTimeout),void(O.readyTimeout=u.setTimeout(t,50))}e()}}()}O.load=O.js=T?function(){var e=arguments,t=e[e.length-1],n={};return a(t)||(t=null),l(e[0])?(e[0].push(t),O.load.apply(null,e[0])):(o(e,function(e){e!==t&&(e=i(e),n[e.name]=e)}),o(e,function(e){e!==t&&f(e=i(e),function(){p(n)&&c(t)})})),O}:function(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),r=n[0];return a(t)||(t=null),l(e[0])?(e[0].push(t),O.load.apply(null,e[0])):r?(o(n,function(e){a(e)||!e||d(i(e))}),f(i(e[0]),a(r)?r:function(){O.load.apply(null,n)})):f(i(e[0])),O},O.test=function(e,t,n,r){var i="object"==typeof e?e:{test:e,success:!!t&&(l(t)?t:[t]),failure:!!n&&(l(n)?n:[n]),callback:r||s},o=!!i.test;return o&&i.success?(i.success.push(i.callback),O.load.apply(null,i.success)):o||!i.failure?r():(i.failure.push(i.callback),O.load.apply(null,i.failure)),O},O.ready=function(e,t){var n,r,i;return e===v?(g?c(t):b.push(t),O):(a(e)&&(t=e,e="ALL"),l(e)?(n={},o(e,function(e){n[e]=y[e],O.ready(e,function(){p(n)&&c(t)})}),O):"string"==typeof e&&a(t)?((r=y[e])&&r.state===k||"ALL"===e&&p()&&g?c(t):(i=w[e])?i.push(t):i=w[e]=[t],O):O)},O.ready(v,function(){p()&&o(w.ALL,function(e){c(e)}),O.feature&&O.feature("domloaded",!0)})}(window),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(function(oe){var ae="left",le="right",ue="up",se="down",ce="in",pe="out",de="none",fe="auto",he="swipe",ge="pinch",me="tap",ve="doubletap",be="longtap",we="horizontal",ye="vertical",Te="all",Ee=10,Oe="start",Ae="move",xe="end",Le="cancel",ke="ontouchstart"in window,Se=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,Ce=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,Me="TouchSwipe";function r(e,v){var t=ke||Ce||!v.fallbackToMouseEvents,n=t?Ce?Se?"MSPointerDown":"pointerdown":"touchstart":"mousedown",r=t?Ce?Se?"MSPointerMove":"pointermove":"touchmove":"mousemove",i=t?Ce?Se?"MSPointerUp":"pointerup":"touchend":"mouseup",o=t?null:"mouseleave",a=Ce?Se?"MSPointerCancel":"pointercancel":"touchcancel",b=0,w=null,y=0,T=0,E=0,O=1,A=0,x=0,L=null,l=oe(e),k="start",S=0,C=null,u=0,M=0,s=0,c=0,p=0,d=null,N=null;try{l.bind(n,f),l.bind(a,m)}catch(e){oe.error("events not supported "+n+","+a+" on jQuery.swipe")}function f(e){if(!0!==l.data(Me+"_intouch")&&!(0<oe(e.target).closest(v.excludedElements,l).length)){var t,n,r=e.originalEvent?e.originalEvent:e,i=ke?r.touches[0]:r;return(k=Oe,ke?S=r.touches.length:e.preventDefault(),x=w=null,O=1,A=E=T=y=b=0,C=function(){for(var e=[],t=0;t<=5;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}(),(n={})[ae]=te(ae),n[le]=te(le),n[ue]=te(ue),n[se]=te(se),L=n,Z(),!ke||S===v.fingers||v.fingers===Te||q()?($(0,i),u=ie(),2==S&&($(1,r.touches[1]),T=E=re(C[0].start,C[1].start)),(v.swipeStatus||v.pinchStatus)&&(t=F(r,k))):t=!1,!1===t)?(F(r,k=Le),t):(v.hold&&(N=setTimeout(oe.proxy(function(){l.trigger("hold",[r.target]),v.hold&&(t=v.hold.call(l,r,r.target))},this),v.longTapThreshold)),K(!0),null)}}function h(e){var t,n,r,i,o,a,l,u,s,c,p,d,f,h,g,m=e.originalEvent?e.originalEvent:e;k===xe||k===Le||G()||(n=J(ke?m.touches[0]:m),M=ie(),ke&&(S=m.touches.length),v.hold&&clearTimeout(N),k=Ae,2==S&&(0==T?($(1,m.touches[1]),T=E=re(C[0].start,C[1].start)):(J(m.touches[1]),E=re(C[0].end,C[1].end),C[0].end,C[1].end,x=O<1?pe:ce),O=(E/T*1).toFixed(2),A=Math.abs(T-E)),S===v.fingers||v.fingers===Te||!ke||q()?(f=n.start,h=n.end,g=function(e,t){var n=e.x-t.x,r=t.y-e.y,i=Math.atan2(r,n),o=Math.round(180*i/Math.PI);o<0&&(o=360-Math.abs(o));return o}(f,h),function(e,t){if(v.allowPageScroll===de||q())e.preventDefault();else{var n=v.allowPageScroll===fe;switch(t){case ae:(v.swipeLeft&&n||!n&&v.allowPageScroll!=we)&&e.preventDefault();break;case le:(v.swipeRight&&n||!n&&v.allowPageScroll!=we)&&e.preventDefault();break;case ue:(v.swipeUp&&n||!n&&v.allowPageScroll!=ye)&&e.preventDefault();break;case se:(v.swipeDown&&n||!n&&v.allowPageScroll!=ye)&&e.preventDefault()}}}(e,w=g<=45&&0<=g||g<=360&&315<=g?ae:135<=g&&g<=225?le:45<g&&g<135?se:ue),p=n.start,d=n.end,b=Math.round(Math.sqrt(Math.pow(d.x-p.x,2)+Math.pow(d.y-p.y,2))),y=ne(),s=w,c=b,c=Math.max(c,ee(s)),L[s].distance=c,(v.swipeStatus||v.pinchStatus)&&(t=F(m,k)),v.triggerOnTouchEnd&&!v.triggerOnTouchLeave||(r=!0,v.triggerOnTouchLeave&&(i={left:(u=(l=oe(l=this)).offset()).left,right:u.left+l.outerWidth(),top:u.top,bottom:u.top+l.outerHeight()},o=n.end,a=i,r=o.x>a.left&&o.x<a.right&&o.y>a.top&&o.y<a.bottom),!v.triggerOnTouchEnd&&r?k=D(Ae):v.triggerOnTouchLeave&&!r&&(k=D(xe)),k!=Le&&k!=xe||F(m,k))):F(m,k=Le),!1===t&&F(m,k=Le))}function g(e){var t=e.originalEvent;return ke&&0<t.touches.length?(s=ie(),c=event.touches.length+1,!0):(G()&&(S=c),M=ie(),y=ne(),_()||!R()?F(t,k=Le):v.triggerOnTouchEnd||0==v.triggerOnTouchEnd&&k===Ae?(e.preventDefault(),F(t,k=xe)):!v.triggerOnTouchEnd&&Y()?z(t,k=xe,me):k===Ae&&F(t,k=Le),K(!1),null)}function m(){E=T=u=M=S=0,Z(),K(!(O=1))}function I(e){var t=e.originalEvent;v.triggerOnTouchLeave&&F(t,k=D(xe))}function P(){l.unbind(n,f),l.unbind(a,m),l.unbind(r,h),l.unbind(i,g),o&&l.unbind(o,I),K(!1)}function D(e){var t=e,n=j(),r=R(),i=_();return!n||i?t=Le:!r||e!=Ae||v.triggerOnTouchEnd&&!v.triggerOnTouchLeave?!r&&e==xe&&v.triggerOnTouchLeave&&(t=Le):t=xe,t}function F(e,t){var n=void 0;return U()&&H()||H()?n=z(e,t,he):(V()&&q()||q())&&!1!==n&&(n=z(e,t,ge)),W()&&B()&&!1!==n?n=z(e,t,ve):y>v.longTapThreshold&&b<Ee&&v.longTap&&!1!==n?n=z(e,t,be):1!==S&&ke||!(isNaN(b)||b<v.threshold)||!Y()||!1===n||(n=z(e,t,me)),t===Le&&m(),t!==xe||ke&&0!=e.touches.length||m(),n}function z(e,t,n){var r=void 0;if(n==he){if(l.trigger("swipeStatus",[t,w||null,b||0,y||0,S,C]),v.swipeStatus&&!1===(r=v.swipeStatus.call(l,e,t,w||null,b||0,y||0,S,C)))return!1;if(t==xe&&U()){if(l.trigger("swipe",[w,b,y,S,C]),v.swipe&&!1===(r=v.swipe.call(l,e,w,b,y,S,C)))return!1;switch(w){case ae:l.trigger("swipeLeft",[w,b,y,S,C]),v.swipeLeft&&(r=v.swipeLeft.call(l,e,w,b,y,S,C));break;case le:l.trigger("swipeRight",[w,b,y,S,C]),v.swipeRight&&(r=v.swipeRight.call(l,e,w,b,y,S,C));break;case ue:l.trigger("swipeUp",[w,b,y,S,C]),v.swipeUp&&(r=v.swipeUp.call(l,e,w,b,y,S,C));break;case se:l.trigger("swipeDown",[w,b,y,S,C]),v.swipeDown&&(r=v.swipeDown.call(l,e,w,b,y,S,C))}}}if(n==ge){if(l.trigger("pinchStatus",[t,x||null,A||0,y||0,S,O,C]),v.pinchStatus&&!1===(r=v.pinchStatus.call(l,e,t,x||null,A||0,y||0,S,O,C)))return!1;if(t==xe&&V())switch(x){case ce:l.trigger("pinchIn",[x||null,A||0,y||0,S,O,C]),v.pinchIn&&(r=v.pinchIn.call(l,e,x||null,A||0,y||0,S,O,C));break;case pe:l.trigger("pinchOut",[x||null,A||0,y||0,S,O,C]),v.pinchOut&&(r=v.pinchOut.call(l,e,x||null,A||0,y||0,S,O,C))}}return n==me?t!==Le&&t!==xe||(clearTimeout(d),clearTimeout(N),B()&&!W()?(p=ie(),d=setTimeout(oe.proxy(function(){p=null,l.trigger("tap",[e.target]),v.tap&&(r=v.tap.call(l,e,e.target))},this),v.doubleTapThreshold)):(p=null,l.trigger("tap",[e.target]),v.tap&&(r=v.tap.call(l,e,e.target)))):n==ve?t!==Le&&t!==xe||(clearTimeout(d),p=null,l.trigger("doubletap",[e.target]),v.doubleTap&&(r=v.doubleTap.call(l,e,e.target))):n==be&&(t!==Le&&t!==xe||(clearTimeout(d),p=null,l.trigger("longtap",[e.target]),v.longTap&&(r=v.longTap.call(l,e,e.target)))),r}function R(){var e=!0;return null!==v.threshold&&(e=b>=v.threshold),e}function _(){var e=!1;return null!==v.cancelThreshold&&null!==w&&(e=ee(w)-b>=v.cancelThreshold),e}function j(){var e=!v.maxTimeThreshold||!(y>=v.maxTimeThreshold);return e}function V(){var e=X(),t=Q(),n=null===v.pinchThreshold||A>=v.pinchThreshold;return e&&t&&n}function q(){return v.pinchStatus||v.pinchIn||v.pinchOut}function U(){var e=j(),t=R(),n=X(),r=Q();return!_()&&r&&n&&t&&e}function H(){return v.swipe||v.swipeStatus||v.swipeLeft||v.swipeRight||v.swipeUp||v.swipeDown}function X(){return S===v.fingers||v.fingers===Te||!ke}function Q(){return 0!==C[0].end.x}function Y(){return v.tap}function B(){return!!v.doubleTap}function W(){if(null==p)return!1;var e=ie();return B()&&e-p<=v.doubleTapThreshold}function Z(){c=s=0}function G(){var e=!1;return s&&ie()-s<=v.fingerReleaseThreshold&&(e=!0),e}function K(e){!0===e?(l.bind(r,h),l.bind(i,g),o&&l.bind(o,I)):(l.unbind(r,h,!1),l.unbind(i,g,!1),o&&l.unbind(o,I,!1)),l.data(Me+"_intouch",!0===e)}function $(e,t){var n=void 0!==t.identifier?t.identifier:0;return C[e].identifier=n,C[e].start.x=C[e].end.x=t.pageX||t.clientX,C[e].start.y=C[e].end.y=t.pageY||t.clientY,C[e]}function J(e){var t=function(e){for(var t=0;t<C.length;t++)if(C[t].identifier==e)return C[t]}(void 0!==e.identifier?e.identifier:0);return t.end.x=e.pageX||e.clientX,t.end.y=e.pageY||e.clientY,t}function ee(e){if(L[e])return L[e].distance}function te(e){return{direction:e,distance:0}}function ne(){return M-u}function re(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+r*r))}function ie(){return(new Date).getTime()}this.enable=function(){return l.bind(n,f),l.bind(a,m),l},this.disable=function(){return P(),l},this.destroy=function(){return P(),l.data(Me,null),l},this.option=function(e,t){if(void 0!==v[e]){if(void 0===t)return v[e];v[e]=t}else oe.error("Option "+e+" does not exist on jQuery.swipe.options");return null}}oe.fn.swipe=function(e){var t=oe(this),n=t.data(Me);if(n&&"string"==typeof e){if(n[e])return n[e].apply(this,Array.prototype.slice.call(arguments,1));oe.error("Method "+e+" does not exist on jQuery.swipe")}else if(!(n||"object"!=typeof e&&e))return function(n){!n||void 0!==n.allowPageScroll||void 0===n.swipe&&void 0===n.swipeStatus||(n.allowPageScroll=de);void 0!==n.click&&void 0===n.tap&&(n.tap=n.click);n=n||{};return n=oe.extend({},oe.fn.swipe.defaults,n),this.each(function(){var e=oe(this),t=e.data(Me);t||(t=new r(this,n),e.data(Me,t))})}.apply(this,arguments);return t},oe.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe"},oe.fn.swipe.phases={PHASE_START:Oe,PHASE_MOVE:Ae,PHASE_END:xe,PHASE_CANCEL:Le},oe.fn.swipe.directions={LEFT:ae,RIGHT:le,UP:ue,DOWN:se,IN:ce,OUT:pe},oe.fn.swipe.pageScroll={NONE:de,HORIZONTAL:we,VERTICAL:ye,AUTO:fe},oe.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:Te}}),function(e){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}(navigator.userAgent||navigator.vendor||window.opera),function(d){var t={init:function(){var p=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight","border-top-width","border-right-width","border-bottom-width","border-left-width","-moz-box-sizing","-webkit-box-sizing","box-sizing"];return this.each(function(){function e(){for(var e=0;e<p.length;e++)i.css(p[e],r.css(p[e]))}function t(){var e=r.val().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&/g,"&amp;").replace(/\n/g,"<br/>");i.html(e+"&nbsp;").css({width:parseInt(r.width(),10)+"px"}),n()}function n(){var e=i.height(),t="hidden",n=o?e+u+a:e+u;c<n?(n=c,t="auto"):n<s&&(n=s),r.height()!==n&&r.css({overflow:t,height:n+"px"})}if("textarea"!==this.type)return!1;var r=d(this).css({resize:"none",overflow:"hidden"}),i=d("<div></div>").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body);e();var o="border-box"==r.css("box-sizing")||"border-box"==r.css("-moz-box-sizing")||"border-box"==r.css("-webkit-box-sizing"),a=parseInt(r.css("border-top-width"))+parseInt(r.css("padding-top"))+parseInt(r.css("padding-bottom"))+parseInt(r.css("border-bottom-width")),l=parseInt(r.css("height"),10),u=parseInt(r.css("line-height"),10)||parseInt(r.css("font-size"),10),s=l<2*u?2*u:l,c=-1<parseInt(r.css("max-height"),10)?parseInt(r.css("max-height"),10):Number.MAX_VALUE;r.bind("keyup change cut paste",function(){t()}),d(window).bind("resize",function(){i.width()!==parseInt(r.width(),10)&&t()}),r.bind("blur",function(){n()}),r.bind("updateHeight",function(){e(),t()}),d(function(){t()})})}};d.fn.flexible=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void d.error("Method "+e+" does not exist on jQuery.flexible"):t.init.apply(this,arguments)}}(jQuery),function(e,p,n,t){"use strict";function d(e,t){for(var n=0,r=e.length;n<r;n++)o(e[n],t)}function f(t){return function(e){Y(e)&&(o(e,t),d(e.querySelectorAll(C),t))}}function h(e){var t=e.getAttribute("is"),n=e.nodeName.toUpperCase(),r=N.call(k,t?A+t.toUpperCase():O+n);return t&&-1<r&&!g(n,t)?-1:r}function g(e,t){return-1<C.indexOf(e+'[is="'+t+'"]')}function l(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target;!oe||i&&i!==t||!t.attributeChangedCallback||"style"===r||t.attributeChangedCallback(r,n===e[u]?null:e.prevValue,n===e[c]?null:e.newValue)}function m(e){var t=f(e);return function(e){ee.push(t,e.target)}}function v(e){ie&&(ie=!1,e.currentTarget.removeEventListener(E,v)),d((e.target||p).querySelectorAll(C),e.detail===w?w:b),Q&&function(){for(var e,t=0,n=B.length;t<n;t++)e=B[t],M.contains(e)||(B.splice(t,1),o(e,w))}()}function r(e,t){Z.call(this,e,t),ae.call(this,{target:this})}function i(e,t){U(e,t),se?se.observe(e,$):(re&&(e.setAttribute=r,e[a]=ue(e),e.addEventListener("DOMSubtreeModified",ae)),e.addEventListener(T,l)),e.createdCallback&&oe&&(e.created=!0,e.createdCallback(),e.created=!1)}function o(e,t){var n,r=h(e);-1<r&&(ce(e,S[r]),r=0,t!==b||e[b]?t!==w||e[w]||(e[b]=!1,e[w]=!0,r=1):(e[w]=!1,e[b]=!0,r=1,Q&&N.call(B,e)<0&&B.push(e)),r&&(n=e[t+"Callback"])&&n.call(e))}var a,b,w,y,u,s,c,T,E,O,A,x,L,k,S,C,M,N,I,P,D,F,z,R,_,j,V,q,U,H,X,Q,Y,B,W,Z,G,K,$,J,ee,te,ne,re,ie,oe,ae,le,ue,se,ce,pe,de,fe;function he(e){var t=new CustomEvent(T,{bubbles:!0});t.attrName=e,t.prevValue=this.getAttribute(e),t.newValue=null,t[c]=t.attrChange=2,G.call(this,e),this.dispatchEvent(t)}function ge(e,t){var n=this.hasAttribute(e),r=n&&this.getAttribute(e),i=new CustomEvent(T,{bubbles:!0});Z.call(this,e,t),i.attrName=e,i.prevValue=n?r:null,i.newValue=t,n?i[s]=i.attrChange=1:i[u]=i.attrChange=0,this.dispatchEvent(i)}function me(e){var t,n=e.currentTarget,r=n[a],i=e.propertyName;r.hasOwnProperty(i)&&(r=r[i],(t=new CustomEvent(T,{bubbles:!0})).attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=n[i]||null,null==t.prevValue?t[u]=t.attrChange=0:t[s]=t.attrChange=1,n.dispatchEvent(t))}t in p||(a="__"+t+(1e5*Math.random()>>0),b="attached",w="detached",y="extends",u="ADDITION",s="MODIFICATION",c="REMOVAL",T="DOMAttrModified",E="DOMContentLoaded",O="<",A="=",x=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,L=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],k=[],S=[],C="",M=p.documentElement,N=k.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},I=n.prototype,P=I.hasOwnProperty,D=I.isPrototypeOf,F=n.defineProperty,z=n.getOwnPropertyDescriptor,R=n.getOwnPropertyNames,_=n.getPrototypeOf,j=n.setPrototypeOf,V=!!n.__proto__,q=n.create||function e(t){return t?(e.prototype=t,new e):this},U=j||(V?function(e,t){return e.__proto__=t,e}:R&&z?function(e,t){for(;function(e,t){for(var n,r=R(t),i=0,o=r.length;i<o;i++)n=r[i],P.call(e,n)||F(e,n,z(t,n))}(e,t),(t=_(t))&&!D.call(t,e););return e}:function(e,t){for(var n in t)e[n]=t[n];return e}),H=e.MutationObserver||e.WebKitMutationObserver,X=(e.HTMLElement||e.Element||e.Node).prototype,Q=!D.call(X,M),Y=Q?function(e){return 1===e.nodeType}:function(e){return D.call(X,e)},B=Q&&[],W=X.cloneNode,Z=X.setAttribute,G=X.removeAttribute,K=p.createElement,$=H&&{attributes:!0,characterData:!0,attributeOldValue:!0},J=H||function(e){re=!1,M.removeEventListener(T,J)},te=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,10)},oe=ie=re=!(ne=!1),fe=j||V?(ce=function(e,t){D.call(t,e)||i(e,t)},i):ce=function(e,t){e[a]||(e[a]=n(!0),i(e,t))},Q?(re=!1,pe=z(X,"addEventListener"),de=pe.value,pe.value=function(e,t,n){e===T&&this.attributeChangedCallback&&this.setAttribute!==ge&&(this[a]={className:{name:"class",value:this.className}},this.setAttribute=ge,this.removeAttribute=he,de.call(this,"propertychange",me)),de.call(this,e,t,n)},F(X,"addEventListener",pe)):H||(M.addEventListener(T,J),M.setAttribute(a,1),M.removeAttribute(a),re&&(ae=function(e){var t,n,r,i=this;if(i===e.target){for(r in t=i[a],i[a]=n=ue(i),n){if(!(r in t))return le(0,i,r,t[r],n[r],u);if(n[r]!==t[r])return le(1,i,r,t[r],n[r],s)}for(r in t)if(!(r in n))return le(2,i,r,t[r],n[r],c)}},le=function(e,t,n,r,i,o){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};a[o]=e,l(a)},ue=function(e){for(var t,n,r={},i=e.attributes,o=0,a=i.length;o<a;o++)"setAttribute"!==(n=(t=i[o]).name)&&(r[n]=t.value);return r})),p[t]=function(e,t){function o(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}var a,l,n=e.toUpperCase();if(ne||(ne=!0,H?(a=f(b),l=f(w),(se=new H(function(e){for(var t,n,r=0,i=e.length;r<i;r++)"childList"===(t=e[r]).type?(o(t.addedNodes,a),o(t.removedNodes,l)):(n=t.target,oe&&n.attributeChangedCallback&&"style"!==t.attributeName&&n.attributeChangedCallback(t.attributeName,t.oldValue,n.getAttribute(t.attributeName)))})).observe(p,{childList:!0,subtree:!0})):(ee=[],te(function e(){for(;ee.length;)ee.shift().call(null,ee.shift());te(e)}),p.addEventListener("DOMNodeInserted",m(b)),p.addEventListener("DOMNodeRemoved",m(w))),p.addEventListener(E,v),p.addEventListener("readystatechange",v),p.createElement=function(e,t){var n=K.apply(p,arguments),r=""+e,i=N.call(k,(t?A:O)+(t||r).toUpperCase()),o=-1<i;return t&&(n.setAttribute("is",t=t.toLowerCase()),o=o&&g(r.toUpperCase(),t)),oe=!p.createElement.innerHTMLHelper,o&&fe(n,S[i]),n},X.cloneNode=function(e){var t=W.call(this,!!e),n=h(t);return-1<n&&fe(t,S[n]),e&&function(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],fe(t,S[h(t)])}(t.querySelectorAll(C)),t}),-2<N.call(k,A+n)+N.call(k,O+n))throw new Error("A "+e+" type is already registered");if(!x.test(n)||-1<N.call(L,n))throw new Error("The type "+e+" is invalid");function r(){return u?p.createElement(s,n):p.createElement(s)}var n,i=t||I,u=P.call(i,y),s=u?t[y].toUpperCase():n,c=k.push((u?A:O)+n)-1;return C=C.concat(C.length?",":"",u?s+'[is="'+e.toLowerCase()+'"]':s),r.prototype=S[c]=P.call(i,"prototype")?i.prototype:q(X),d(p.querySelectorAll(C),b),r})}(window,document,Object,"registerElement"),function(h,i,g){"use strict";function m(){return h.performance!==g&&h.performance.now!==g?h.performance.now():Date.now()}function v(e){return.5*(1-Math.cos(Math.PI*e))}function o(e){if("object"!=typeof e||e.behavior===g||"auto"===e.behavior||"instant"===e.behavior)return 1;if("smooth"!==e.behavior)throw new TypeError(e.behavior+" is not a valid value for enumeration ScrollBehavior")}function n(o,a){var l=h.scrollX||h.pageXOffset,u=h.scrollY||h.pageYOffset,s=m();b&&h.cancelAnimationFrame(b),b=h.requestAnimationFrame(function e(){var t=(m()-s)/w,n=v(t=1<t?1:t),r=l+(o-l)*n,i=u+(a-u)*n;return c(r,i),r===o&&i===a?(l=u=s=null,h.cancelAnimationFrame(b)):b=h.requestAnimationFrame(e),g})}function a(u,e){if(u===i.documentElement||u===i.body)return n(e.left,e.top),g;var s=u.scrollLeft,c=u.scrollTop,p=e.left,d=e.top,f=m();b&&h.cancelAnimationFrame(b),b=h.requestAnimationFrame(function e(){var t,n,r,i=(m()-f)/w,o=v(i=1<i?1:i),a=s+(p-s)*o,l=c+(d-c)*o;return n=a,r=l,(t=u).scrollTop=r,t.scrollLeft=n,a===p&&l===d?(s=c=f=null,h.cancelAnimationFrame(b)):b=h.requestAnimationFrame(e),g})}var b,w,c,r,l;"scrollBehavior"in i.documentElement.style||(w=768,c=h.scrollTo,r=h.scrollBy,l=h.Element.prototype.scrollIntoView,h.scroll=h.scrollTo=function(){return o(arguments[0])?c.call(h,arguments[0].left||arguments[0],arguments[0].top||arguments[1]):n.call(h,~~arguments[0].left,~~arguments[0].top)},h.scrollBy=function(){if(o(arguments[0]))return r.call(h,arguments[0].left||arguments[0],arguments[0].top||arguments[1]);var e=h.scrollX||h.pageXOffset,t=h.scrollY||h.pageYOffset;return n(~~arguments[0].left+e,~~arguments[0].top+t)},Element.prototype.scrollIntoView=function(){var e,t,n,r;return o(arguments[0])?l.call(this,arguments[0]||!0):(r=h.getComputedStyle(i.body,null),t=parseInt(r.getPropertyValue("padding-left"),10),n=parseInt(r.getPropertyValue("padding-top"),10),e={top:this.offsetTop-2*n,left:this.offsetLeft-2*t},a(i.body,e))})}(window,document); })(this);
 
 // WCF.js
-(function (window, undefined) { WCF.js; })(this);
+(function (window, undefined) { "use strict";function wcfEval(expression){return eval(expression)}!function(){var o=jQuery.fn.data;jQuery.fn.data=function(e,t){var i,n=[].slice.call(arguments);if(e)switch(typeof e){case"object":for(var s in e){s.match(/ID$/)&&(i=e[s],delete e[s],e[s=s.replace(/ID$/,"-id")]=i)}n[0]=e;break;case"string":e.match(/ID$/)&&(n[0]=e.replace(/ID$/,"-id"))}var a=o.apply(this,n);if(void 0===e)for(var s in a)s.match(/Id$/)&&(a[s.replace(/Id$/,"ID")]=a[s],delete a[s]);return a},window.console||(window.console={});for(var e=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],t=0;t<e.length;t++)void 0===console[e[t]]&&(console[e[t]]=function(){});void 0===console.debug&&(console.debug=function(e){console.log(e)})}(),window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),t=e[--n],e[n]=e[i],e[i]=t;return this},function(e){var t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n={browser:i[1]||"",version:i[2]||"0"},s={};n.browser&&(s[n.browser]=!0,s.version=n.version),s.chrome?s.webkit=!0:s.webkit&&(s.safari=!0),e.browser=e.browser||{},e.browser=$.extend(e.browser,s),e.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&0<window.navigator.msMaxTouchPoints,e.browser.smartphone="bottom"==$("html").css("caption-side"),e.browser.mozilla&&t.match(/trident/)&&(e.browser.mozilla=!1,e.browser.msie=!0),e.browser.iOS=/\((ipad|iphone|ipod);/.test(t),e.browser.iOS&&$("html").addClass("iOS"),e.browser.android=-1!==t.indexOf("android"),e.browser.editor="redactor",e.browser.ckeditor=!1,e.browser.redactor=!0,e.browser.iOS&&(e.fn.focus=function(e,t){return 0<arguments.length?this.on("focus",null,e,t):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(e,i){return $.grep(e,function(e,t){return i!==e})},wcfEscapeID:function(e){return e.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(e){return!!$("#"+$.wcfEscapeID(e)).length},getLength:function(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&t++;return t}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},getOffsets:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"offset":i=this.offset();break;case"position":default:i=this.position()}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},makePositioned:function(e,t){"absolute"!=e&&"fixed"!=e&&(e="absolute");var i=this.getOffsets("position");return this.css({position:e,left:i.left,margin:0,top:i.top}),t&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;var e,t=0,i=this.get(0);return document.selection?(this.focus(),(e=document.selection.createRange()).moveStart("character",-this.val().length),t=e.text.length):!i.selectionStart&&"0"!=i.selectionStart||(t=parseInt(i.selectionStart)),t},setCaret:function(e){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;var t,i=this.get(0);return this.focus(),document.selection?((t=document.selection.createRange()).moveStart("character",e),t.moveEnd("character",0),t.select()):!i.selectionStart&&"0"!=i.selectionStart||(i.selectionStart=e,i.selectionEnd=e),!0},wcfDropIn:function(e,t,i){return e=e||"up",i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfDropOut:function(e,t,i){return e=e||"down",i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfBlindIn:function(e,t,i){return e=e||"vertical",i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfBlindOut:function(e,t,i){return e=e||"vertical",i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfHighlight:function(e,t){return this.effect("highlight",e,600,t)},wcfFadeIn:function(e,t){return t&&parseInt(t)||(t=200),this.show(WCF.getEffect(this,"fade"),{},t,e)},wcfFadeOut:function(e,t){return t&&parseInt(t)||(t=200),this.hide(WCF.getEffect(this,"fade"),{},t,e)},cssAsNumber:function(e){if(this.length){var t=this.css(e);if(void 0!==t)return parseInt(t.replace(/px$/,""))}return 0},perfectScrollbar:function(i){var n=require("perfect-scrollbar");return this.each(function(){var e,t;return"object"==typeof i||void 0===i?(e=i,$(this).data("psID")||n.initialize(this,e)):"update"===(t=i)?n.update(this):"destroy"===t&&n.destroy(this),jQuery(this)})}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(e,t){return-1!=$.inArray(e,t)},getEffect:function(e,t){return e.is("tr")?"highlight":t},getInlineCSS:function(e){var t={},i=e.attr("style");if(!i)return{};for(var n=0,s=(i=i.split(";")).length;n<s;n++){var a=$.trim(i[n]);""!=a&&(a=a.split(":"),t[$.trim(a[0])]=$.trim(a[1]))}return t},revertInlineCSS:function(e,t,i){for(var n=0,s=i.length;n<s;n++){var a=i[n];t[a]?e.css(a,t[a]):e.css(a,"")}},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},base64toBlob:function(e,t,i){t=t||"",i=i||512;for(var n=atob(e),s=[],a=0;a<n.length;a+=i){for(var o=n.slice(a,a+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);var c=new Uint8Array(r);s.push(c)}return new Blob(s,{type:t})},convertLegacyURL:function(e){return e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var i=t.split(/([A-Z][a-z0-9]+)/),n="",s=0,a=i.length;s<a;s++){var o=i[s].trim();o.length&&(n.length&&(n+="-"),n+=o.toLowerCase())}return"index.php?"+n+"/&"})}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(e){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(e,t){window.bc_wcfSimpleDropdown.init(e[0],t)},removeDropdown:function(e){window.bc_wcfSimpleDropdown.destroy(e)},initDropdownFragment:function(e,t){window.bc_wcfSimpleDropdown.initFragment(e[0],t[0])},registerCallback:function(e,t){window.bc_wcfSimpleDropdown.registerCallback(e,t)},_toggle:function(e,t){window.bc_wcfSimpleDropdown._toggle(e,t)},toggleDropdown:function(e,t){window.bc_wcfSimpleDropdown._toggle(null,e,null,t)},getDropdown:function(e){var t=window.bc_wcfSimpleDropdown.getDropdown(e);return t?$(t):null},getDropdownMenu:function(e){var t=window.bc_wcfSimpleDropdown.getDropdownMenu(e);return t?$(t):null},setAlignmentByID:function(e){window.bc_wcfSimpleDropdown.setAlignmentById(e)},setAlignment:function(e,t){window.bc_wcfSimpleDropdown.setAlignment(e[0],t[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(e){window.bc_wcfSimpleDropdown.close(e)},destroy:function(e){window.bc_wcfSimpleDropdown.destroy(e)}},WCF.Dropdown.Interactive={},WCF.Dropdown.Interactive.Handler={_dropdownContainer:null,_dropdownMenus:{},create:function(e,t,i){null===this._dropdownContainer&&(this._dropdownContainer=$('<div class="dropdownMenuContainer" />').appendTo(document.body),WCF.CloseOverlayHandler.addCallback("WCF.Dropdown.Interactive.Handler",$.proxy(this.closeAll,this)));var n=new WCF.Dropdown.Interactive.Instance(this._dropdownContainer,e,t,i);return this._dropdownMenus[t]=n},open:function(e){return!!this._dropdownMenus[e]&&(this._dropdownMenus[e].open(),!0)},close:function(e){return!!this._dropdownMenus[e]&&(this._dropdownMenus[e].close(),!0)},closeAll:function(){for(var e in this._dropdownMenus)this._dropdownMenus.hasOwnProperty(e)&&this._dropdownMenus[e].close()},getOpenDropdown:function(){for(var e in this._dropdownMenus)if(this._dropdownMenus.hasOwnProperty(e)&&this._dropdownMenus[e].isOpen())return this._dropdownMenus[e];return null},getDropdown:function(e){return this._dropdownMenus[e]}},WCF.Dropdown.Interactive.Instance=Class.extend({_container:null,_itemList:null,_linkList:null,_options:{},_pointer:null,_triggerElement:null,init:function(e,t,i,n){this._options=n||{},this._triggerElement=t;var s,a=null;!0===n.staticDropdown?this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",i).click(function(e){e.stopPropagation()}):(this._container=$('<div class="interactiveDropdown" data-source="'+i+'" />').click(function(e){e.stopPropagation()}),s=$('<div class="interactiveDropdownHeader" />').appendTo(this._container),$('<span class="interactiveDropdownTitle">'+n.title+"</span>").appendTo(s),this._linkList=$('<ul class="interactiveDropdownLinks inlineList"></ul>').appendTo(s),a=$('<div class="interactiveDropdownItemsContainer" />').appendTo(this._container),this._itemList=$('<ul class="interactiveDropdownItems" />').appendTo(a),$('<a href="'+n.showAllLink+'" class="interactiveDropdownShowAll">'+WCF.Language.get("wcf.user.panel.showAll")+"</a>").appendTo(this._container)),this._pointer=$('<span class="elementPointer"><span /></span>').appendTo(this._container),require(["Ui/Screen"],function(e){e.is("screen-lg")&&null!==a&&a.perfectScrollbar({suppressScrollX:!0})}.bind(this)),this._container.appendTo(e)},getContainer:function(){return this._container},getItemList:function(){return this._itemList},getLinkList:function(){return this._linkList},open:function(){WCF.Dropdown._closeAll(),this._triggerElement.addClass("open"),this._container.addClass("open"),WCF.System.Event.fireEvent("com.woltlab.wcf.Search","close"),this.render()},close:function(){this._triggerElement.removeClass("open"),this._container.removeClass("open"),WCF.System.Event.fireEvent("WCF.Dropdown.Interactive.Instance","close",{instance:this})},isOpen:function(){return this._triggerElement.hasClass("open")},toggle:function(){return this._container.hasClass("open")?(this.close(),!1):(WCF.Dropdown.Interactive.Handler.closeAll(),this.open(),!0)},resetItems:function(){this._itemList.empty(),this.close()},render:function(){require(["Ui/Alignment","Ui/Screen"],function(e,t){t.is("screen-lg")?e.set(this._container[0],this._triggerElement[0],{horizontal:"right",pointer:!0}):this._container.css({bottom:"",left:"",right:"",top:elById("pageHeaderPanel").clientHeight+"px"})}.bind(this))},rebuildScrollbar:function(){require(["Ui/Screen"],function(e){var t;e.is("screen-lg")&&((t=this._itemList.parent()).perfectScrollbar("destroy"),t.perfectScrollbar({suppressScrollX:!0}))}.bind(this))}}),WCF.Clipboard={init:function(n,s,a,o){require(["EventHandler","WoltLabSuite/Core/Controller/Clipboard"],function(e,t){for(var i in t.setup({hasMarkedItems:0<s,pageClassName:n,pageObjectId:o}),a)a.hasOwnProperty(i)&&function(t){e.add("com.woltlab.wcf.clipboard",t,function(e){null!==e.responseData&&a[t].hasOwnProperty(e.responseData.actionName)&&a[t][e.responseData.actionName].triggerEffect(e.responseData.objectIDs)})}(i)})},reload:function(){require(["WoltLabSuite/Core/Controller/Clipboard"],function(e){e.reload()})}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){$.isFunction(e)?(this._callback=e,this._interval=t,this.resume()):console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(e){throw this._isExecuting=!1,e}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(e){this._interval=e,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLabSuite/Core/Ajax/Status"],function(e){e.show()})},hide:function(){require(["WoltLabSuite/Core/Ajax/Status"],function(e){e.hide()})},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("fa-spinner"),e.hasClass("icon")&&e[i]("fa-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(t){this._ajaxRequest=null,"jsonp"===(t=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php?ajax-proxy/&t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},t)).dataType?require(["AjaxJsonp"],function(e){e.send(t.url,t.success,t.failure,{parameterName:t.jsonp})}):require(["AjaxRequest"],function(e){this._ajaxRequest=new e({data:t.data,type:t.type,url:t.url,withCredentials:t.url==="index.php?ajax-proxy/&t="+SECURITY_TOKEN,responseType:"json"===t.dataType?"application/json":"",autoAbort:t.autoAbortPrevious,ignoreError:t.suppressErrors,silent:!t.showLoadingOverlay,failure:t.failure,finalize:t.after,success:t.success}),t.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(t){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(t)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(t,i){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.setOption(t,i)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(e,t,i){},_success:function(e,t,i){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(e,t){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},e),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},t),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy(function(e,t){$(t).bind(this.options.eventName,$.proxy(this._handleEvent,this))},this)))},_handleEvent:function(e){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(e.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_callback:null,_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i||".jsDeleteButton",this._callback=null,this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each(function(e,t){var i,n=$(t),s=n.wcfIdentify();WCF.inArray(s,this._containers)||(i=n.find(this._buttonSelector)).length&&(this._containers.push(s),i.click($.proxy(this._click,this)))}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessageHtml")?t.data("confirmMessageHtml"):t.data("confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,!!t.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_didTriggerEffect:function(e){},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._callback&&this._callback(e.objectIDs),this.triggerEffect(e.objectIDs)},setCallback:function(e){if("function"!=typeof e)throw new TypeError("[WCF.Action.Delete] Expected a valid callback for '"+this._className+"'.");this._callback=e},triggerEffect:function(e){for(var t in this._containers){var i,n=$("#"+this._containers[t]),s=n.find(this._buttonSelector);WCF.inArray(s.data("objectID"),e)&&(i=this,n.wcfBlindOut("up",function(){var e=$(this).remove();i._containers.splice(i._containers.indexOf(e.wcfIdentify()),1),i._didTriggerEffect(e),s.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",s.data("eventName"),{button:s,container:e})}))}}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(e){for(var t in this._containers){var i,n=$("#"+this._containers[t]);WCF.inArray(n.find(this._buttonSelector).data("objectID"),e)&&(n.has("ol").has("li").length?(n.is(":only-child")?n.parent().replaceWith(n.find("> ol")):n.replaceWith(n.find("> ol > li")),this._containers.splice(this._containers.indexOf(n.wcfIdentify()),1),this._didTriggerEffect(n)):(i=this,n.wcfBlindOut("up",function(){$(this).remove(),i._containers.splice(i._containers.indexOf($(this).wcfIdentify()),1),i._didTriggerEffect($(this))})))}}}),WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i||".jsToggleButton",this._containers=[];var n={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(n),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();WCF.inArray(n,this._containers)||(this._containers.push(n),i.find(this._buttonSelector).click($.proxy(this._click,this)))},this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessageHtml")?t.data("confirmMessageHtml"):t.data("confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,!!t.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);WCF.inArray(n.data("objectID"),e)&&(i.wcfHighlight(),this._toggleButton(i,n))}},_toggleButton:function(e,t){var i="";WCF.LoadingOverlayHandler.updateIcon(t,!1),i=t.hasClass("fa-square-o")?(t.removeClass("fa-square-o").addClass("fa-check-square-o"),t.data("disableTitle")?t.data("disableTitle"):WCF.Language.get("wcf.global.button.disable")):(t.removeClass("fa-check-square-o").addClass("fa-square-o"),t.data("enableTitle")?t.data("enableTitle"):WCF.Language.get("wcf.global.button.enable")),t.attr("title",i),e.toggleClass("disabled")}}),WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(e,t,i,n){this._threshold=parseInt(e),0!==this._threshold?($.isFunction(t)&&(this._callback=t),null!==this._callback?(this._reference=$(i||window),this._target=$(n||document),this.start(),this._scroll()):console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting.")):console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting.")},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop();e-(this._reference.height()+t)<this._threshold&&this._callback(this)},start:function(){this._reference.on("scroll",$.proxy(this._scroll,this))},stop:function(){this._reference.off("scroll")}}),WCF.Date={},WCF.Date.Picker={init:function(){}},WCF.Date.Util={gmdate:function(e){var t=e||new Date;return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDay(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=6e4*new Date(e).getTimezoneOffset();return new Date(e+i+t)}},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(e,t){this._variables[e]=t},addObject:function(e){for(var t in e)this.add(t,e[t])},addDictionary:function(e){e.each($.proxy(function(e){this.add(e.key,e.value)},this))},get:function(e){return this.isset(e)?this._variables[e]:null},isset:function(e){return this._variables.hasOwnProperty(e)},remove:function(e){delete this._variables[e]},each:function(e){if($.isFunction(e))for(var t in this._variables){e({key:t,value:this._variables[t]})}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(t,i){require(["Language"],function(e){e.add(t,i)})},addObject:function(t){require(["Language"],function(e){e.addObject(t)})},get:function(e,t){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.Number={round:function(e,t){return t=Math.pow(10,t||0),Math.round(e*t)/t}},WCF.String={addThousandsSeparator:function(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+WCF.Language.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(e,t){var i=(e=String(WCF.Number.round(e,t||2))).split(".");return e=this.addThousandsSeparator(i[0]),1<i.length&&(e+=WCF.Language.get("wcf.global.decimalPoint")+i[1]),e=e.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.setup()})},reload:function(){this.init()}},WCF.Template=Class.extend({init:function(t){var i=new WCF.Dictionary,n=0;t=(t=(t=t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")).replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy(function(e){var t="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return i.add(t,e.replace(/\{\/?literal\}/g,"")),t},this))).replace(/\{\*.*?\*\}/g,"");function s(e){for(var t=e.split(""),i={},n=!0,s="",a="",o=!1,r=!1,l=!1,c=0,u=t.length;c<u;c++){var h=t[c];n&&"="!=h&&" "!=h?s+=h:n&&"="==h?l=o=r=n=!1:n||r||o||" "!=h?n||!r||l||"'"!=h?n||r||o||"'"!=h?n||!o||l||'"'!=h?n||r||o||'"'!=h?n||!o&&!r||l||"\\"!=h?n||(l=!1,a+=h):(l=!0,a+=h):(o=!0,a+=h):(o=!1,a+=h):(r=!0,a+=h):(r=!1,a+=h):(n=!0,i[s]=a,a=s="")}if(i[s]=a,o||r||l)throw new Error('Syntax error in parameterList: "'+e+'"');return i}function a(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")}for(var e in t=t.replace(/\{(\$[^\}]+?)\}/g,function(e,t){return"' + WCF.String.escapeHTML("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") + '"}).replace(/\{#(\$[^\}]+?)\}/g,function(e,t){return"' + WCF.String.formatNumeric("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") + '"}).replace(/\{@(\$[^\}]+?)\}/g,function(e,t){return"' + "+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+" + '"}).replace(/\{lang\}(.+?)\{\/lang\}/g,function(e,t){return"' + WCF.Language.get('"+t+"', v) + '"}).replace(/\{include (.+?)\}/g,function(e,t){t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=s(t);if(void 0===i.file)throw new Error("Missing file attribute in include-tag");return i.file=i.file.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"' + "+i.file+".fetch(v) + '"}).replace(/\{if (.+?)\}/g,function(e,t){return"';\nif ("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") {\n\t$output += '"}).replace(/\{else ?if (.+?)\}/g,function(e,t){return"';\n}\nelse if ("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") {\n\t$output += '"}).replace(/\{implode (.+?)\}/g,function(e,t){n++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=s(t);if(void 0===i.from)throw new Error("Missing from attribute in implode-tag");if(void 0===i.item)throw new Error("Missing item attribute in implode-tag");return void 0===i.glue&&(i.glue="', '"),i.from=i.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+n+" = false;\nfor ($implodeKey_"+n+" in "+i.from+") {\n\tv["+i.item+"] = "+i.from+"[$implodeKey_"+n+"];\n"+(void 0!==i.key?"\t\tv["+i.key+"] = $implodeKey_"+n+";\n":"")+"\tif ($implode_"+n+") $output += "+i.glue+";\n\t$implode_"+n+" = true;\n\t$output += '"}).replace(/\{foreach (.+?)\}/g,function(e,t){n++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=s(t);if(void 0===i.from)throw new Error("Missing from attribute in foreach-tag");if(void 0===i.item)throw new Error("Missing item attribute in foreach-tag");return i.from=i.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+n+" = false;\nfor ($foreachKey_"+n+" in "+i.from+") {\n\t$foreach_"+n+" = true;\n\tbreak;\n}\nif ($foreach_"+n+") {\n\tfor ($foreachKey_"+n+" in "+i.from+") {\n\t\tv["+i.item+"] = "+i.from+"[$foreachKey_"+n+"];\n"+(void 0!==i.key?"\t\tv["+i.key+"] = $foreachKey_"+n+";\n":"")+"\t\t$output += '"}).replace(/\{foreachelse\}/g,"';\n\t}\n}\nelse {\n\t{\n\t\t$output += '").replace(/\{\/foreach\}/g,"';\n\t}\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n\t$output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '"),WCF.Template.callbacks)t=WCF.Template.callbacks[e](t);t=t.replace("{ldelim}","{").replace("{rdelim}","}"),i.each(function(e){t=t.replace(e.key,e.value)}),t="$output += '"+t+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+t+" return $output;")}catch(e){throw console.debug("var $output = ''; "+t+" return $output;"),e}},fetch:function(e){}}),WCF.Template.callbacks=[],WCF.ToggleOptions=Class.extend({_element:null,_showItems:[],_hideItems:[],_callback:null,init:function(e,t,i,n){this._element=$("#"+e),this._showItems=t,this._hideItems=i,void 0!==n&&(this._callback=n),this._element.click($.proxy(this._toggle,this)),this._toggle()},_toggle:function(){if(this._element.prop("checked")){for(var e=0,t=this._showItems.length;e<t;e++){var i=this._showItems[e];$("#"+i).show()}for(e=0,t=this._hideItems.length;e<t;e++){i=this._hideItems[e];$("#"+i).hide()}null!==this._callback&&this._callback()}}}),WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy(function(e,t){this._initButton(t)},this))},_initButton:function(e){var t=$(e);t.data("isOpen")||$("#"+t.data("collapsibleContainer")).hide(),t.click($.proxy(this._toggle,this))},_toggle:function(e){var t=$(e.currentTarget),i=t.data("isOpen"),n=$("#"+$.wcfEscapeID(t.data("collapsibleContainer"))),i=i?(n.stop().wcfBlindOut("vertical",$.proxy(function(){this._toggleImage(t)},this)),!1):(n.stop().wcfBlindIn("vertical",$.proxy(function(){this._toggleImage(t)},this)),!0);return t.data("isOpen",i),e.stopPropagation(),!1},_toggleImage:function(e){var t=e.find("span.icon");e.data("isOpen")?t.removeClass("fa-chevron-right").addClass("fa-chevron-down"):t.removeClass("fa-chevron-down").addClass("fa-chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(e){this._className=e,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(e){this._getContainers().each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))},this))},_initContainer:function(e){var t=this._getTarget(e),i=this._getButtonContainer(e),n=this._createButton(e,i);this._containerData[e]={button:n,buttonContainer:i,isOpen:this._containers[e].data("isOpen"),target:t},this._containers[e].data("isOpen")||$("#"+e).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(e){},_getButtonContainer:function(e){},_createButton:function(e,t){var i=elBySel(".jsStaticCollapsibleButton",t[0]);return(i=null!==i&&i.parentNode===t[0]?(i.classList.remove("jsStaticCollapsibleButton"),$(i)):$('<span class="collapsibleButton jsTooltip pointer icon icon16 fa-chevron-down" title="'+WCF.Language.get("wcf.global.button.collapsible")+'">').prependTo(t)).data("containerID",e).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(e){var t=$(e.currentTarget).data("containerID"),i=this._containerData[t].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(t)],parameters:$.extend(!0,{containerID:t,currentState:n,newState:s},this._getAdditionalParameters(t))}),this._proxy.sendRequest(),$("#"+t).toggleClass("jsCollapsed")},_exchangeIcon:function(e,t){t=t||"spinner",e.removeClass("fa-chevron-down fa-chevron-right fa-spinner").addClass("fa-"+t)},_getObjectID:function(e){return $("#"+e).data("objectID")},_getAdditionalParameters:function(e){return{}},_updateContent:function(e,t,i){this._containerData[e].target.html(t)},_success:function(e,t,i){var n,s;e.returnValues.containerID&&(n=e.returnValues.containerID,this._containers[n]&&(this._containerData[n].isOpen=!!e.returnValues.isOpen,s=e.returnValues.isOpen?"open":"close",this._updateContent(n,$.trim(e.returnValues.content),s)))}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(e){this._super(e),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(e){this._super(e),this._containerData[e].isOpen||(this._containerData[e].target.hide(),this._exchangeIcon(this._containerData[e].button,"chevron-right"))},_toggleContainer:function(e){var t=$(e.currentTarget).data("containerID"),i=this._containerData[t].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(t)],parameters:$.extend(!0,{containerID:t,currentState:n,newState:s},this._getAdditionalParameters(t))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[t].button,"open"==s?"chevron-down":"chevron-right"),"open"==s?this._containerData[t].target.show():this._containerData[t].target.hide(),$("#"+t).toggleClass("jsCollapsed"),this._containerData[t].isOpen="open"==s}}),WCF.User={userID:0,username:"",init:function(e,t){this.userID=e,this.username=t}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(e,t,i){if(!e.length)return!0;var n=e.getOffsets("offset").top,s=$(document).height(),a=$(window).height();return s-a<n&&(n=s-a)<0&&(n=0),!0===i?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,function(e,t,i,n,s){return-n*((t=t/s-1)*t*t*t-1)+i}),!1}}),WCF.CloseOverlayHandler={addCallback:function(t,i){require(["Ui/CloseOverlay"],function(e){e.add(t,i)})},removeCallback:function(t){require(["Ui/CloseOverlay"],function(e){e.remove(t)})},forceExecution:function(){require(["Ui/CloseOverlay"],function(e){e.execute()})}},WCF.DOMNodeInsertedHandler={addCallback:function(e,t){require(["WoltLabSuite/Core/Dom/Change/Listener"],function(e){e.add("__legacy__",t)})},_executeCallbacks:function(){require(["WoltLabSuite/Core/Dom/Change/Listener"],function(e){e.trigger()})},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(e,t){if(this._bindListener(),this._callbacks.isset(e))return console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+e+"' is already bound to a callback"),!1;this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){this._isListening||(window.MutationObserver?new MutationObserver(function(e){var t=!1;e.forEach(function(e){e.removedNodes.length&&(t=!0)}.bind(this)),t&&this._executeCallbacks({})}.bind(this)).observe(document.body,{childList:!0,subtree:!0}):$(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this)),this._isListening=!0)},_executeCallbacks:function(t){this._isExecuting||(this._isExecuting=!0,this._callbacks.each(function(e){e.value(t)}),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){this._initOptions(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Option.Handler",$.proxy(this._initOptions,this))},_initOptions:function(){$(".jsEnablesOptions").each($.proxy(this._initOption,this))},_initOption:function(e,t){this._change(t),$(t).change($.proxy(this._handleChange,this))},_handleChange:function(e){this._change($(e.target))},_change:function(option){option=$(option);var disableOptions=eval(option.data("disableOptions")),enableOptions=eval(option.data("enableOptions")),isActive;switch(option.getTagName()){case"input":switch(option.attr("type")){case"checkbox":this._execute(option.prop("checked"),disableOptions,enableOptions);break;case"radio":option.prop("checked")&&(isActive=!0,option.data("isBoolean")&&1!=option.val()&&(isActive=!1),this._execute(isActive,disableOptions,enableOptions))}break;case"select":var $value=option.val(),relevantDisableOptions=[],relevantEnableOptions=[];if(0<disableOptions.length)for(var $index in disableOptions){var $item=disableOptions[$index];$item.value==$value?relevantDisableOptions.push($item.option):relevantEnableOptions.push($item.option)}if(0<enableOptions.length)for(var $index in enableOptions){var $item=enableOptions[$index];$item.value==$value?relevantEnableOptions.push($item.option):relevantDisableOptions.push($item.option)}this._execute(!0,relevantDisableOptions,relevantEnableOptions)}},_execute:function(e,t,i){if(0<t.length)for(var n=0,s=t.length;n<s;n++){var a=t[n];$.wcfIsset(a)?this._enableOption(a,!e):(o=$("."+$.wcfEscapeID(a)+"Input")).length&&this._enableOptions(o.children("dd").find("input, select, textarea"),!e)}if(0<i.length)for(n=0,s=i.length;n<s;n++){var o,a=i[n];$.wcfIsset(a)?this._enableOption(a,e):(o=$("."+$.wcfEscapeID(a)+"Input")).length&&this._enableOptions(o.children("dd").find("input, select, textarea"),e)}},_enableOption:function(e,t){this._enableOptionElement($("#"+$.wcfEscapeID(e)),t)},_enableOptionElement:function(e,t){var i,n,s,a=(e=$(e)).getTagName();"select"==a||"input"==a&&("checkbox"==e.attr("type")||"file"==e.attr("type")||"radio"==e.attr("type"))?("input"===a&&"radio"===e[0].type&&e[0].checked||(t?e.enable():e.disable()),e.parents(".optionTypeBoolean:eq(0)")&&(i=e.wcfIdentify().replace(/\./g,"\\."),n=$("#"+i+"_no"),t?n.enable():n.disable(),(s=$("#"+i+"_never")).length&&(t?s.enable():s.disable()))):t?e.removeAttr("readonly"):e.attr("readonly",!0),t?e.closest("dl").removeClass("disabled"):e.closest("dl").addClass("disabled")},_enableOptions:function(e,t){for(var i=0,n=e.length;i<n;i++)this._enableOptionElement(e[i],t)}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(e,t){if(this._bindListener(),this._callbacks.isset(e))return console.debug("[WCF.PageVisibilityHandler] identifier '"+e+"' is already bound to a callback"),!1;this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){var e;this._isListening||(e=null,void 0!==document.hidden?(this._hiddenFieldName="hidden",e="visibilitychange"):void 0!==document.mozHidden?(this._hiddenFieldName="mozHidden",e="mozvisibilitychange"):void 0!==document.msHidden?(this._hiddenFieldName="msHidden",e="msvisibilitychange"):void 0!==document.webkitHidden&&(this._hiddenFieldName="webkitHidden",e="webkitvisibilitychange"),null===e?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(e,$.proxy(this._executeCallbacks,this)),this._isListening=!0)},_executeCallbacks:function(e){var t;this._isExecuting||(this._isExecuting=!0,t=document[this._hiddenFieldName],this._callbacks.each(function(e){e.value(t)}),this._isExecuting=!1)}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(e,t,i){this._rowClassName=t,this._tableContainer=e,this._options=$.extend(!0,{emptyMessage:null,emptyMessageHtml:null,messageType:"info",refreshPage:!1,updatePageNumber:!1,isTable:0!==this._tableContainer.find("table").length},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+t,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find((this._options.isTable?"table tr.":".tabularList .")+this._rowClassName).length},_handleEmptyTable:function(){var e,t;this._options.emptyMessage?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage)):this._options.emptyMessageHtml?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).html(this._options.emptyMessageHtml)):this._options.refreshPage?this._options.updatePageNumber?(e=window.location.href.match(/(\?|&)pageNo=(\d+)/g))&&(t=e[e.length-1].match(/\d+/g),0<this._options.updatePageNumber?t++:t--,window.location=window.location.href.replace(e[e.length-1],e[e.length-1][0]+"pageNo="+t)):window.location.reload():this._tableContainer.remove()},_remove:function(e){var t;$.getLength(e)?(t=$(e.target)).hasClass(this._rowClassName)&&(this._options.isTable?1==t.parents("tbody:eq(0)").children("tr").length&&this._handleEmptyTable():1===this._getRowCount()&&this._handleEmptyTable()):this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_lastValue:"",_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(e,t,i,n,s){null==t||$.isFunction(t)?(this._callback=t||null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],this._lastValue="",i&&(this._excludedSearchValues=i),this._searchInput=$(e),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=!!n,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!0===s,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):console.debug("[WCF.Search.Base] Selector '"+e+"' for search input is invalid, aborting.")):console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var t=this;new WCF.PeriodicalExecuter(function(e){t._list.is(":visible")&&t._clearList(!1),e.stop()},250)},_keyDown:function(e){var t;e.which===$.ui.keyCode.ENTER&&((t=this._searchInput.parents(".dropdown")).data("disableAutoFocus")?-1!==this._itemIndex&&e.preventDefault():!t.data("preventSubmit")&&-1===this._itemIndex||e.preventDefault())},_keyUp:function(e){switch(e.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(e)}var t=this._getSearchString(e);if(""===t)this._clearList(!1);else if(t.length>=this._triggerLength){if(this._lastValue===t)return;this._lastValue=t;var i,n={data:{excludedSearchValues:this._excludedSearchValues,searchString:t}};this._delay?(null!==this._timer&&this._timer.stop(),(i=this)._timer=new WCF.PeriodicalExecuter(function(){i._queryServer(n),i._timer.stop(),i._timer=null},this._delay)):this._queryServer(n)}else this._clearList(!1)},_queryServer:function(e){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(e)}),this._proxy.sendRequest()},setDelay:function(e){this._delay=e},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(e){return 0===this._itemCount||(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(e){var t=$.trim(this._searchInput.val());if(this._commaSeperated){if((e.keyCode||e.which)==$.ui.keyCode.COMMA)return"";for(var i=t.split(","),n=i.length,s=0;s<n;s++)i[s]=$.trim(i[s]);for(s=0;s<n;s++){var a=i[s];if(!this._oldSearchString[s]){t=a;break}if(a!=this._oldSearchString[s]){t=a,this._caretAt=s;break}}this._oldSearchString=i}return t},_getParameters:function(e){return e},_success:function(e,t,i){if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(e.returnValues))for(var n in e.returnValues){var s=e.returnValues[n];this._createListItem(s)}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var a=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(a).hasClass("dropdownOpen")||(WCF.Dropdown.toggleDropdown(a,!0),this._openDropdown()),this._itemIndex=-1,WCF.Dropdown.getDropdown(a).data("disableAutoFocus")||this._selectNextItem()},_openDropdown:function(){},_handleEmptyResult:function(){return!1},_createListItem:function(e){var t=$("<li><span>"+WCF.String.escapeHTML(e.label)+"</span></li>").appendTo(this._list);return t.data("objectID",e.objectID).data("label",e.label).click($.proxy(this._executeCallback,this)),this._itemCount++,t},_executeCallback:function(e){var t,i,n=!1,s=$(e.currentTarget);this._commaSeperated?(t=s.data("label"),this._oldSearchString[this._caretAt]=t,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"}),i=this._searchInput.val().toLowerCase().indexOf(t.toLowerCase())+t.length,this._searchInput.focus().setCaret(i)):null===this._callback?this._searchInput.val(s.data("label")):n=!0===this._callback(s.data()),this._clearList(n)},_clearList:function(e){e&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(e){WCF.inArray(e,this._excludedSearchValues)||this._excludedSearchValues.push(e)},removeExcludedSearchValue:function(e){var t=$.inArray(e,this._excludedSearchValues);-1!=t&&this._excludedSearchValues.splice(t,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(e,t,i,n,s){this._includeUserGroups=i,this._super(e,t,n,s)},_getParameters:function(e){return e.data.includeUserGroups=this._includeUserGroups?1:0,e},_createListItem:function(e){var t,i,n=this._super(e),s=null;return e.icon?s=$(e.icon):this._includeUserGroups&&"group"===e.type&&(s=$('<span class="icon icon16 fa-users" />')),s&&(t=n.find("span").detach(),(i=$("<div />").addClass("box16").appendTo(n)).append(s),i.append($("<div />").append(t))),n.data("type",e.type),n}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(e,t){$.isFunction(t)?WCF.inArray(e,this._loaded)?setTimeout(function(){t()},1):(this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t)):console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+e+"' is invalid, aborting.")},setup:function(e,t){$.isFunction(t)?(this._setupCallbacks[e]||(this._setupCallbacks[e]=[]),this._setupCallbacks[e].push(t)):console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+e+"' is invalid, aborting.")},invoke:function(e){if(this._setupCallbacks[e]){for(var t=0,i=this._setupCallbacks[e].length;t<i;t++)this._setupCallbacks[e][t]();delete this._setupCallbacks[e]}if(this._loaded.push(e),this._callbacks[e]){for(t=0,i=this._callbacks[e].length;t<i;t++)this._callbacks[e][t]();delete this._callbacks[e]}},reset:function(e){var t=this._loaded.indexOf(e);-1!==t&&this._loaded.splice(t,1)}},WCF.System.FlexibleMenu={init:function(){},registerMenu:function(t){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],function(e){e.register(t)})},rebuild:function(t){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],function(e){e.rebuild(t)})}},WCF.System.Mobile={},WCF.System.ObjectStore={_objects:{},add:function(e,t){void 0===this._objects[e]&&(this._objects[e]=[]),this._objects[e].push(t)},invoke:function(e,t){if(this._objects[e])for(var i=0;i<this._objects[e].length;i++)t(this._objects[e][i])}},WCF.System.Captcha={_registeredCaptchas:[],addCallback:function(t,i){require(["WoltLabSuite/Core/Controller/Captcha"],function(e){try{e.add(t,i),this._registeredCaptchas.push(t)}catch(e){if(e instanceof TypeError)return void console.debug("[WCF.System.Captcha] Given callback is no function")}}.bind(this))},getData:function(t){var e;if(-1===this._registeredCaptchas.indexOf(t))return e;var i=require("WoltLabSuite/Core/Controller/Captcha");try{e=i.getData(t)}catch(e){console.debug('[WCF.System.Captcha] Unknow captcha id "'+t+'"')}return e},removeCallback:function(t){require(["WoltLabSuite/Core/Controller/Captcha"],function(e){try{e.delete(t),this._registeredCaptchas.splice(this._registeredCaptchas.indexOf(item),1)}catch(e){}}.bind(this))}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(e,t){this._cssClassNames=t||"",this._message=e||""},show:function(t,e,i,n){require(["Ui/Notification"],function(e){e.show(i||this._message,t,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(t,i,n,s,a){var e;"object"==typeof s&&((e=$("<div />")).append(s),s=e.html()),require(["Ui/Confirmation"],function(e){e.show({legacyCallback:i,message:t,parameters:n,template:s||"",messageIsHtml:!0===a})})}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){var e;0===this._depth&&(e=$("meta[name=viewport]"),this._oldViewportSettings=e.attr("content"),e.attr("content",this._oldViewportSettings+",maximum-scale=1")),this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.Fullscreen={enterFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},toggleFullscreen:function(e){null===this.getFullscreenElement()?this.enterFullscreen(e):this.exitFullscreen()},getFullscreenElement:function(){return document.fullscreenElement?document.fullscreenElement:document.mozFullScreenElement?document.mozFullScreenElement:document.webkitFullscreenElement?document.webkitFullscreenElement:document.msFullscreenElement?document.msFullscreenElement:null},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},isSupported:function(){return!!(document.documentElement.requestFullscreen||document.documentElement.msRequestFullscreen||document.documentElement.mozRequestFullScreen||document.documentElement.webkitRequestFullscreen)}},WCF.System.PageNavigation={init:function(s,a){require(["WoltLabSuite/Core/Ui/Page/JumpTo"],function(e){for(var t=elBySelAll(s),i=0,n=t.length;i<n;i++)e.init(t[i],a)})}},WCF.System.KeepAlive=Class.extend({init:function(e){new WCF.PeriodicalExecuter(function(e){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"keepAlive",className:"wcf\\data\\session\\SessionAction"},failure:function(){e.stop()},showLoadingOverlay:!1,success:function(e){WCF.System.PushNotification.executeCallbacks(e)},suppressErrors:!0})},1e3*e)}}),WCF.System.PushNotification={_callbacks:{},addCallback:function(e,t){void 0===this._callbacks[e]&&(this._callbacks[e]=[]),this._callbacks[e].push(t)},executeCallbacks:function(e){for(var t in e.returnValues)if(void 0!==this._callbacks[t])for(var i=0;i<this._callbacks[t].length;i++)this._callbacks[t][i](e.returnValues[t])}},WCF.System.Event={addListener:function(e,t,i){return window.__wcf_bc_eventHandler.add(e,t,i)},removeListener:function(e,t,i){return window.__wcf_bc_eventHandler.remove(e,t,i)},removeAllListeners:function(e,t){return window.__wcf_bc_eventHandler.removeAll(e,t)},fireEvent:function(e,t,i){window.__wcf_bc_eventHandler.fire(e,t,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:null,_className:"",_dialog:null,_proxy:null,_title:"",init:function(e,t,i,n,s){this._aborted=!1,this._actionName=e,this._callback=s||null,this._className=t,this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{actionName:this._actionName,className:this._className,parameters:n||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._title=i},_success:function(e){var t,i;null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy(function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()},this),title:this._title})),this._aborted||(e.returnValues.template&&this._dialog.html(e.returnValues.template),this._dialog.find("progress").attr("value",e.returnValues.progress).text(e.returnValues.progress+"%").next("span").text(e.returnValues.progress+"%"),e.returnValues.progress<100?((t=e.returnValues.parameters||{}).loopCount=e.returnValues.loopCount,this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:t}),this._proxy.sendRequest()):null!==this._callback?this._callback(this,e):(this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check green"),this._dialog.find(".contentHeader h1").text(WCF.Language.get("wcf.global.worker.completed")),i=$('<div class="formSubmit" />').appendTo(this._dialog),$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(i).focus().click(function(){e.returnValues.redirectURL?window.location=e.returnValues.redirectURL:window.location.reload()}),this._dialog.wcfDialog("render")))}}),WCF.InlineEditor=Class.extend({_callbacks:[],_dropdowns:{},_elements:{},_notification:null,_options:[],_proxy:null,_triggerElements:{},_updateData:[],_elementSelector:null,_quickOption:null,init:function(e){if(this._elementSelector=e,$(e).length){this._setOptions();for(var t=0,i=this._options.length;t<i;t++)if(this._options[t].isQuickOption){this._quickOption=this._options[t].optionName;break}this.rebuild(),WCF.DOMNodeInsertedHandler.addCallback("WCF.InlineEditor"+this._elementSelector.hashCode(),$.proxy(this.rebuild,this)),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),WCF.CloseOverlayHandler.addCallback("WCF.InlineEditor",$.proxy(this._closeAll,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")}},rebuild:function(){var e=$(this._elementSelector),a=this;e.each(function(e,t){var i=$(t),n=i.wcfIdentify();if(void 0===a._elements[n]){var s=a._getTriggerElement(i);if(null===s||1!==s.length)return;s.on(WCF_CLICK_EVENT,$.proxy(a._show,a)).data("elementID",n),a._quickOption&&s.disableSelection().data("optionName",a._quickOption).dblclick($.proxy(a._click,a)),a._elements[n]=i}})},_closeAll:function(){for(var e in this._elements)this._hide(e)},_setOptions:function(){this._options=[]},registerCallback:function(e){$.isFunction(e)&&this._callbacks.push(e)},_getTriggerElement:function(e){return null},_show:function(e){e.preventDefault();var t,i=$(e.currentTarget).data("elementID"),n=null;this._dropdowns[i]||(this._triggerElements[i]=n=this._getTriggerElement(this._elements[i]).addClass("dropdownToggle"),(t=n[0].parentNode)&&"LI"===t.nodeName&&1===t.childElementCount?t.classList.add("dropdown"):n.wrap('<span class="dropdown" />'),this._dropdowns[i]=$('<ul class="dropdownMenu" />').insertAfter(n)),this._dropdowns[i].empty();for(var s=!1,a="",o=0,r=this._options.length;o<r;o++){var l=this._options[o];"divider"===l.optionName?""!==a&&"divider"!==a&&($('<li class="dropdownDivider" />').appendTo(this._dropdowns[i]),a=l.optionName):(this._validate(i,l.optionName)||this._validateCallbacks(i,l.optionName))&&($("<li><span>"+l.label+"</span></li>").appendTo(this._dropdowns[i]).data("elementID",i).data("optionName",l.optionName).data("isQuickOption",!!l.isQuickOption).click($.proxy(this._click,this)),s=!0,a=l.optionName)}if(s){var c=this._dropdowns[i].children().last();c.hasClass("dropdownDivider")&&c.remove();var u=null,h=0;if(this._dropdowns[i].children().each(function(e,t){var i=$(t);i.hasClass("dropdownDivider")||(i.data("isQuickOption")?u=i:h++)}),!h)return u.trigger("click"),this._triggerElements[i]&&WCF.Dropdown.close(this._triggerElements[i].parents(".dropdown").wcfIdentify()),!1}return null!==n&&WCF.Dropdown.initDropdown(n,e.originalEvent||e),!1},_validate:function(e,t){return!1},_validateCallbacks:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;n<i;n++)if(this._callbacks[n].validate(this._elements[e],t))return!0;return!1},_success:function(e,t,i){this._updateData.length&&(this._updateState(e),this._updateData=[])},_updateState:function(e){},_click:function(e){var t=$(e.currentTarget),i=t.data("elementID"),n=t.data("optionName");this._execute(i,n)||this._executeCallback(i,n),this._hide(i)},_execute:function(e,t){return!1},_executeCallback:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;n<i;n++)if(this._callbacks[n].execute(this._elements[e],t))return!0;return!1},_hide:function(e){this._dropdowns[e]&&this._dropdowns[e].empty().removeClass("dropdownOpen")}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(e,t,i,n){this._buttonSelector=e,this._fileListSelector=t,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){var e;this._supportsAJAXUpload?(this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this)),e=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(e[0],"role","button"),e.prepend(this._fileUpload),this._fileUpload[0].addEventListener("focus",function(){this.classList.contains("focus-visible")&&e[0].classList.add("active")}),this._fileUpload[0].addEventListener("blur",function(){e[0].classList.remove("active")})):(e=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(e[0],"role","button"),elAttr(e[0],"tabindex","0"),e.click($.proxy(this._showOverlay,this))),this._insertButton(e)},_insertButton:function(e){this._buttonSelector.prepend(e)},_removeButton:function(){var e=".uploadButton";this._supportsAJAXUpload||(e=".uploadFallbackButton"),this._buttonSelector.find(e).remove()},_upload:function(e,t,i,n){var s=null,a=[];if(void 0!==n)a=n;else if(t)a.push(t);else if(i){var o="";switch(i.type){case"image/png":o=".png";break;case"image/jpeg":o=".jpg";break;case"image/gif":o=".gif"}a.push({name:"pasted-from-clipboard"+o})}else a=this._fileUpload.prop("files");if(a.length){var r=new FormData,s=this._createUploadMatrix(a);if(!this._uploadMatrix[s].length)return null;for(var l,c=0,u=a.length;c<u;c++){this._uploadMatrix[s][c]&&(l=this._uploadMatrix[s][c].data("internalFileID"),i?r.append("__files["+l+"]",i,a[c].name):r.append("__files["+l+"]",a[c],a[c].name))}r.append("actionName",this._options.action),r.append("className",this._className);var h=this._getParameters();for(var d in h)r.append("parameters["+d+"]",h[d]);var p=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:r,contentType:!1,processData:!1,success:function(e,t,i){p._success(s,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){p._progress(s,e)},!1),e},xhrFields:{withCredentials:!0}})}return s},_createUploadMatrix:function(e){if(e.length){var t=this._uploadMatrix.length;this._uploadMatrix[t]=[];for(var i=0,n=e.length;i<n;i++){var s=e[i],a=this._initFile(s);a.hasClass("uploadFailed")||(a.data("filename",s.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[t][i]=a)}return t}return null},_success:function(e,t){},_error:function(e,t,i){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);for(var n in this._uploadMatrix[e])this._uploadMatrix[e][n].find("progress").attr("value",i)},_getParameters:function(){return{}},_initFile:function(e){return $("<li>"+e.name+" ("+e.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix([e]),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(e,t,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(e,t,i,n)},_upload:function(){for(var e=this._fileUpload.prop("files"),t=0,i=e.length;t<i;t++){var n=e[t],s=new FormData,a=this._createUploadMatrix(n);if(this._uploadMatrix[a].length){s.append("__files["+a+"]",n),s.append("actionName",this._options.action),s.append("className",this._className);var o=this._getParameters();for(var r in o)s.append("parameters["+r+"]",o[r]);this._sendRequest(a,s)}}},_sendRequest:function(n,e){var s=this;return $.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:e,contentType:!1,processData:!1,success:function(e,t,i){s._success(n,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){s._progress(n,e)},!1),e}})},_createUploadMatrix:function(e){var t=this._initFile(e);return t.hasClass("uploadFailed")?null:(t.data("filename",e.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=t,this._internalFileID-1)},_success:function(e,t){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);this._uploadMatrix[e].find("progress").attr("value",i)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix(e),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:null,_notification:null,_offset:0,_options:{},_proxy:null,_structure:{},init:function(e,t,i,n,s,a){this._additionalParameters=a||{},this._containerID=$.wcfEscapeID(e),this._container=$("#"+this._containerID),this._className=t,this._offset=i||0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._structure={},this._options=$.extend(!0,{axis:"y",connectWith:"#"+this._containerID+" .sortableList",disableNesting:"sortableNoNesting",doNotClear:!0,errorClass:"sortableInvalidTarget",forcePlaceholderSize:!0,handle:"",helper:"clone",items:"li:not(.sortableNoSorting)",opacity:.6,placeholder:"sortablePlaceholder",tolerance:"pointer",toleranceElement:"> span"},n||{});var o,r=$("#"+this._containerID+" .sortableList");if(r.is("tbody")&&("li:not(.sortableNoSorting)"===this._options.items&&(this._options.items="tr:not(.sortableNoSorting)",this._options.toleranceElement=""),"clone"===this._options.helper&&(this._options.helper=this._tableRowHelper.bind(this),(o=r.prev("thead"))&&o.find("th").each(function(e,t){(t=$(t)).width(t.width())}))),s?r.sortable(this._options):r.nestedSortable(this._options),this._className){var l=this._container.find(".formSubmit");if(!l.length&&!(l=this._container.next(".formSubmit")).length)return void console.debug("[WCF.Sortable.Simple] Unable to find form submit for saving, aborting.");l.children('button[data-type="submit"]').click($.proxy(this._submit,this))}},_tableRowHelper:function(e,t){return t.children("td").each(function(e,t){(t=$(t)).width(t.width())}),t},_submit:function(){this._structure={},this._container.find(".sortableList").each($.proxy(function(e,t){var i=$(t),n=i.data("objectID");void 0!==n&&i.children(this._options.items).each($.proxy(function(e,t){var i=$(t).data("objectID");this._structure[n]||(this._structure[n]=[]),this._structure[n].push(i)},this))},this));var e=$.extend(!0,{data:{offset:this._offset,structure:this._structure}},this._additionalParameters);this._proxy.setOption("data",{actionName:"updatePosition",className:this._className,interfaceName:"wcf\\data\\ISortableAction",parameters:e}),this._proxy.sendRequest()},_success:function(e,t,i){null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show()}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(t){var i=!1;require(["Environment"],function(e){"desktop"!==e.platform()&&(i=!0)}.bind(this)),i||(this._activeElementID="",this._identifier=t,require(["WoltLabSuite/Core/Controller/Popover"],function(e){e.init({attributeName:"legacy",className:t,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(e,t){this._activeElementID=e,this._popoverObj=t,this._loadContent()},_insertContent:function(e,t){this._popoverObj.setContent(this._identifier,e,t)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(e,t){var i;this._itemList=$(e),this._searchInput=$(t),this._data={},this._itemList.length&&this._searchInput.length?(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput&&(i=this)._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",function(){setTimeout(function(){i._onPaste()},100)}),this._searchInput.parents(".dropdown").data("preventSubmit",!0)):console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.")},_keyDown:function(e){return null!==e||this._keyPress(null)},_keyPress:function(e){if(null===e||44===e.charCode||e.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&e.keyCode===$.ui.keyCode.ENTER){if(null!==e&&e.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var t=$.trim(this._searchInput.val());return(e&&44===e.charCode&&(t=t.substring(0,this._searchInput.getCaret())),""===t)?!0:(this.addItem({objectID:0,label:t}),e&&44===e.charCode?this._searchInput.val($.trim(this._searchInput.val().substr(this._searchInput.getCaret()))):this._searchInput.val(""),null!==e&&e.stopPropagation(),!1)}return!0},_onPaste:function(){for(var e=$.trim(this._searchInput.val()),t=0,i=(e=e.split(",")).length;t<i;t++){var n=$.trim(e[t]);""!==n&&this.addItem({objectID:0,label:n})}this._searchInput.val("")},load:function(e){},_click:function(e){var t=$(e.currentTarget),i=t.data("objectID"),n=t.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),t.remove(),e.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(e){return(!this._data[e.objectID]||0===e.objectID&&this._allowCustomInput)&&($('<li class="badge">'+WCF.String.escapeHTML(e.label)+"</li>").data("objectID",e.objectID).data("label",e.label).appendTo(this._itemList).click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(e.label),this._addItem(e.objectID,e.label)),!0},clearList:function(){this._itemList.children("li").each($.proxy(function(e,t){var i=$(t);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))},this))},_submit:function(){this._keyDown(null)},_addItem:function(e,t){this._data[e]=t},_removeItem:function(e,t){delete this._data[e]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(t,i,n,s,a,o){require(["WoltLabSuite/Core/Language/Chooser"],function(e){e.init(t,i,n,s,a,o)})}}),WCF.Style={},WCF.UserPanel=Class.extend({_container:null,_didLoad:!1,_link:null,_noItems:"",_revertOnEmpty:!0,init:function(e){this._container=$("#"+e),this._didLoad=!1,this._revertOnEmpty=!0,1==this._container.length?this._convert():console.debug("[WCF.UserPanel] Unable to find container identified by '"+e+"', aborting.")},_convert:function(){this._container.addClass("dropdown"),this._link=this._container.children("a").remove();var e=$('<a href="'+this._link.attr("href")+'" class="dropdownToggle">'+this._link.html()+"</a>").appendTo(this._container).click($.proxy(this._click,this)),t=$('<ul class="dropdownMenu" />').appendTo(this._container);$('<li class="jsDropdownPlaceholder"><span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t),this._addDefaultItems(t),this._container.dblclick($.proxy(function(){return window.location=this._link.attr("href"),!1},this)),WCF.Dropdown.initDropdown(e,!1)},_addDefaultItems:function(e){},_addDivider:function(e){$('<li class="dropdownDivider" />').appendTo(e)},_click:function(e){e.preventDefault(),this._didLoad||(new WCF.Action.Proxy({autoSend:!0,data:this._getParameters(),success:$.proxy(this._success,this)}),this._didLoad=!0)},_getParameters:function(){return{}},_success:function(e,t,i){var n=WCF.Dropdown.getDropdownMenu(this._container.wcfIdentify());n.children(".jsDropdownPlaceholder").remove(),e.returnValues&&e.returnValues.template?($(""+e.returnValues.template).prependTo(n),this._updateBadge(e.returnValues.totalCount),this._after(n)):($("<li><span>"+WCF.Language.get(this._noItems)+"</span></li>").prependTo(n),this._updateBadge(0))},_updateBadge:function(e){var t;(e=parseInt(e)||0)?((t=this._container.find(".badge")).length||(t=$('<span class="badge badgeUpdate" />').appendTo(this._container.children(".dropdownToggle"))).before(" "),t.html(e)):this._container.find(".badge").remove()},_after:function(e){}}),jQuery.fn.extend({wcfDialog:function(s){var a=arguments;return require(["Dom/Util","Ui/Dialog"],function(e,t){var i,n=e.identify(this[0]);"close"===s?t.close(n):"render"===s?t.rebuild(n):"option"===s?3===a.length&&("title"===a[1]&&"string"==typeof a[2]?t.setTitle(n,a[2]):0===a[1].indexOf("on")?t.setCallback(n,a[1],a[2]):"closeConfirmMessage"===a[1]&&null===a[2]&&t.setCallback(n,"onBeforeClose",null)):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),i=1===a.length&&"object"==typeof a[0]?a[0]:{},t.openStatic(n,null,i),i.hasOwnProperty("title")&&t.setTitle(n,i.title))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,1<this._count&&this._initSlideshow()},_initSlideshow:function(){var i=$(this._items.get(0)).outerHeight();this._items.addClass("slideshowItem"),this._width=this.element.css("height",i).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy(function(e,t){$(t).show().css({height:i,left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this.element.css({height:i,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element);for(var e=0;e<this._count;e++){var t=$('<li><a><span class="icon icon16 fa-circle" /></a></li>').data("index",e).click($.proxy(this._click,this)).appendTo(this._buttonList);0==e&&t.find(".icon").addClass("active")}this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var e=$(this._items.get(0)).css("height","auto").outerHeight();this._items.css("height",e+"px"),this.element.css("height",e+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy(function(e,t){$(t).css({left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){var e;this.options.cycle&&(null!==this._timer&&this._timer.stop(),(e=this)._timer=new WCF.PeriodicalExecuter(function(){e.moveTo(null)},1e3*this.options.cycleInterval))},_click:function(e){this.moveTo($(e.currentTarget).data("index")),this._resetTimer()},moveTo:function(e){this._index=null===e?this._index+1:e,this._index==this._count&&(this._index=0),$(this._buttonList.find(".icon").removeClass("active").get(this._index)).addClass("active"),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(e){return this._items[e]?this._items[e]:null}}),jQuery.fn.extend({datepicker:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);switch(e){case"destroy":window.__wcf_bc_datePicker.destroy(t);break;case"getDate":return window.__wcf_bc_datePicker.getDate(t);case"option":if("onClose"===i[0])return 1<i.length?this.datepicker("setOption","onClose",i[1]):function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(t,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(t,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+e+"' for datepicker()")}return this}}),jQuery.fn.extend({wcfTabs:function(n){var s=this[0],a=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLabSuite/Core/Ui/TabMenu"],function(e,t){var i=t.getTabMenu(e.identify(s));null!==i&&i[n].apply(i,a)})}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLabSuite/Core/Ui/Pagination"],function(e){this._api=new e(this.element[0],{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(e){return!1!==this._trigger("shouldSwitch",void 0,{nextPage:e})}.bind(this),callbackSwitch:function(e){this._trigger("switched",void 0,{activePage:e})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(e,t){var i;return"activePage"==e&&t!=this.options[e]&&0<t&&t<=this.options.maxPage&&((i=this._trigger("shouldSwitch",void 0,{nextPage:t}))||void 0!==i?this._api.switchPage(t):this._trigger("notSwitched",void 0,{activePage:t})),this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){var a=this;$(".jsCategory").each(function(e,t){var n=$(t).data("parentCategoryID",null).change($.proxy(a._updateSelection,a));a._categories[n.val()]=n;var s=[];n.parents("li").find(".jsChildCategory").each(function(e,t){var i=$(t).data("parentCategoryID",n.val()).change($.proxy(a._updateSelection,a));a._categories[i.val()]=i,s.push(i.val()),i.is(":checked")&&n.prop("checked","checked")}),n.data("childCategoryIDs",s)})},_updateSelection:function(e){var t=$(e.currentTarget),i=t.data("parentCategoryID");if(t.is(":checked"))null!==i&&this._categories[i].prop("checked","checked");else if(null===i)for(var n=t.data("childCategoryIDs"),s=0,a=n.length;s<a;s++)this._categories[n[s]].prop("checked",!1)}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:null,_categories:{},init:function(e){this._list=$("#"+e),this._buildStructure(),this._list.find("input:checked").each(function(){$(this).trigger("change")}),this._list.children("li").length<2&&this._list.addClass("flexibleCategoryListDisabled")},_buildStructure:function(){var r=this;this._list.find(".jsCategory").each(function(e,t){var a=$(t).change(r._updateSelection.bind(r)),i=parseInt(a.val()),o=[];a.parents("li:eq(0)").find(".jsChildCategory").each(function(e,t){var n=$(t);n.data("parentCategory",a).change(r._updateSelection.bind(r));var i=parseInt(n.val());o.push(n);var s=[];n.parents("li:eq(0)").find(".jsSubChildCategory").each(function(e,t){var i=$(t);i.data("parentCategory",n).change(r._updateSelection.bind(r)),s.push(i)}),r._categories[i]=s}),r._categories[i]=o})},_updateSelection:function(e){var t=$(e.currentTarget),i=parseInt(t.val()),n=t.data("parentCategory");if(t.is(":checked"))n&&(n.prop("checked","checked"),(n=n.data("parentCategory"))&&n.prop("checked","checked"));else{if(this._categories[i])for(var s=0,a=this._categories[i].length;s<a;s++){var o=this._categories[i][s];o.prop("checked",!1);var r=parseInt(o.val());if(this._categories[r])for(var l=0,c=this._categories[r].length;l<c;l++)this._categories[r][l].prop("checked",!1)}if(n){for(var u=parseInt(n.val()),s=0,a=this._categories[u].length;s<a;s++)if(this._categories[u][s].prop("checked"))return;if(n=n.data("parentCategory")){u=parseInt(n.val());for(s=0,a=this._categories[u].length;s<a;s++)if(this._categories[u][s].prop("checked"))return}}}}}),WCF.Condition={},WCF.Notice={}; })(this);
 
 // WCF.Like.js
-(function (window, undefined) { WCF.Like.js; })(this);
+(function (window, undefined) { "use strict";WCF.Like=Class.extend({init:function(){throw new Error("The `WCF.Like` API is obsolete and therefore no longer supported. Please use the current API `WoltLabSuite/Core/Ui/Reaction/Handler` instead.")},_domNodeInserted:function(){},_initContainers:function(){},_getContainers:function(){},_getWidgetContainer:function(){},_getObjectID:function(){},_addWidget:function(){},_buildWidget:function(){},_createWidget:function(){},_showLikeDetails:function(){},_click:function(){},_sendRequest:function(){},_success:function(){},_updateBadge:function(){},_updateSummary:function(){},_setActiveState:function(){}}); })(this);
 
 // WCF.ACL.js
-(function (window, undefined) { WCF.ACL.js; })(this);
+(function (window, undefined) { "use strict";WCF.ACL={},WCF.ACL.List=Class.extend({_categoryName:"",_container:null,_containerElements:{},_objectID:0,_objectTypeID:null,_options:{},_proxy:null,_search:null,_values:{group:{},user:{}},init:function(e,t,n,i,a,s){this._objectID=i||0,this._objectTypeID=t,this._categoryName=n,void 0===a&&(a=!0),this._values={group:{},user:{}},this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._container=$(e).hide().addClass("aclContainer");var r=this._container.children("dd"),c=$('<ul class="aclList containerList" />').appendTo(r),l=$('<input type="text" class="long" placeholder="'+WCF.Language.get("wcf.acl.search."+(a?"":"user.")+"description")+'" />').appendTo(r),o=$('<ul class="aclPermissionList containerList" />').hide().appendTo(r);elData(o[0],"grant",WCF.Language.get("wcf.acl.option.grant")),elData(o[0],"deny",WCF.Language.get("wcf.acl.option.deny")),this._containerElements={aclList:c,denyAll:null,grantAll:null,permissionList:o,searchInput:l},this._search=new WCF.Search.User(l,$.proxy(this.addObject,this),a);var h=this._container.parents("form:eq(0)");h.submit($.proxy(this.submit,this));var p=h.find("input[type=reset]:eq(0)");p.length&&p.click($.proxy(this._reset,this)),s?this._success(s):this._loadACL()},_reset:function(){this._values={group:{},user:{}},this._containerElements.aclList.empty(),this._containerElements.searchInput.val(""),this._containerElements.permissionList.hide().find("input[type=checkbox]").prop("checked",!1)},_loadACL:function(){this._proxy.setOption("data",{actionName:"loadAll",className:"wcf\\data\\acl\\option\\ACLOptionAction",parameters:{categoryName:this._categoryName,objectID:this._objectID,objectTypeID:this._objectTypeID}}),this._proxy.sendRequest()},addObject:function(e){var t=this._createListItem(e.objectID,e.label,e.type);this._savePermissions(),this._containerElements.aclList.children("li").removeClass("active"),t.addClass("active"),this._search.addExcludedSearchValue(e.label),this._containerElements.permissionList.find("input[type=checkbox]").prop("checked",!1),this._containerElements.searchInput.val(""),this._containerElements.permissionList.show(),WCF.DOMNodeInsertedHandler.execute()},_createListItem:function(e,t,n){var i=$('<li><span class="icon icon16 fa-user'+("group"===n?"s":"")+'" /> <span class="aclLabel">'+t+"</span></li>").appendTo(this._containerElements.aclList);return i.data("objectID",e).data("type",n).data("label",t).click($.proxy(this._click,this)),$('<span class="icon icon16 fa-times jsTooltip pointer" title="'+WCF.Language.get("wcf.global.button.delete")+'" />').click($.proxy(this._removeItem,this)).appendTo(i),i},_removeItem:function(e){var t=$(e.currentTarget).parent(),n=t.data("type"),i=t.data("objectID");this._search.removeExcludedSearchValue(t.data("label")),t.remove(),this._values[n][i]&&delete this._values[n][i],this._selectFirstEntry()},_selectFirstEntry:function(){var e=this._containerElements.aclList.children("li:eq(0)");e.length?this._select(e,!1):this._reset()},_success:function(e,t,n){if($.getLength(e.returnValues.options)){var i=0,a={};for(var s in e.returnValues.options){var r=e.returnValues.options[s],c=$("<li><span>"+r.label+"</span></li>").data("optionID",s).data("optionName",r.optionName),l=$('<input type="checkbox" id="grant'+s+'" />').appendTo(c).wrap('<label for="grant'+s+'" class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.grant")+'" />'),o=$('<input type="checkbox" id="deny'+s+'" />').appendTo(c).wrap('<label for="deny'+s+'" class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.deny")+'" />');l.data("type","grant").data("optionID",s).change($.proxy(this._change,this)),o.data("type","deny").data("optionID",s).change($.proxy(this._change,this)),a[r.categoryName]||(a[r.categoryName]=[]),""===r.categoryName?c.appendTo(this._containerElements.permissionList):a[r.categoryName].push(c),i++}if(1<i&&(c=$('<li class="aclFullAccess"><span>'+WCF.Language.get("wcf.acl.option.fullAccess")+"</span></li>").prependTo(this._containerElements.permissionList),this._containerElements.grantAll=$('<input type="checkbox" id="grantAll_'+this._container.attr("id")+'" />').appendTo(c).wrap('<label class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.grant")+'" />'),this._containerElements.denyAll=$('<input type="checkbox" id="denyAll_'+this._container.attr("id")+'" />').appendTo(c).wrap('<label class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.deny")+'" />'),this._containerElements.grantAll.data("type","grant").change($.proxy(this._changeAll,this)),this._containerElements.denyAll.data("type","deny").change($.proxy(this._changeAll,this))),$.getLength(a))for(var h in a){var p=a[h];e.returnValues.categories[h]&&$('<li class="aclCategory">'+e.returnValues.categories[h]+"</li>").appendTo(this._containerElements.permissionList);for(var d=0,u=p.length;d<u;d++)p[d].appendTo(this._containerElements.permissionList)}this._parseData(e,"group"),this._parseData(e,"user"),this._container.show(),require(["WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager"],function(e){e.checkDependencies()}),this._selectFirstEntry()}},_parseData:function(e,t){if($.getLength(e.returnValues[t].option)){for(var n in e.returnValues[t].label)this._createListItem(n,e.returnValues[t].label[n],t),this._search.addExcludedSearchValue(e.returnValues[t].label[n]);this._values[t]=e.returnValues[t].option,WCF.DOMNodeInsertedHandler.execute()}},_click:function(e){var t=$(e.currentTarget);t.hasClass("active")||this._select(t,!0)},_select:function(e,t){t&&this._savePermissions(),this._containerElements.aclList.children("li").removeClass("active"),e.addClass("active"),this._setupPermissions(e.data("type"),e.data("objectID"))},_change:function(e){var t=$(e.currentTarget),n=t.data("optionID"),i=t.data("type");t.is(":checked")?"deny"===i?($("#grant"+n).prop("checked",!1),null!==this._containerElements.grantAll&&this._containerElements.grantAll.prop("checked",!1)):($("#deny"+n).prop("checked",!1),null!==this._containerElements.denyAll&&this._containerElements.denyAll.prop("checked",!1)):"deny"===i&&null!==this._containerElements.denyAll?this._containerElements.denyAll.prop("checked",!1):"grant"===i&&null!==this._containerElements.grantAll&&this._containerElements.grantAll.prop("checked",!1);var a=!0;this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);if(n.data("type")===i&&n.attr("id")!==i+"All_"+this._container.attr("id")&&!n.is(":checked"))return a=!1},this)),"deny"==i?null!==this._containerElements.denyAll&&(a?this._containerElements.denyAll.prop("checked",!0):this._containerElements.denyAll.prop("checked",!1)):null!==this._containerElements.grantAll&&(a?this._containerElements.grantAll.prop("checked",!0):this._containerElements.grantAll.prop("checked",!1))},_changeAll:function(e){var t=$(e.currentTarget),n=t.data("type");t.is(":checked")?"deny"===n?(this._containerElements.grantAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);"deny"===n.data("type")&&n.attr("id")!=="denyAll_"+this._container.attr("id")&&n.prop("checked",!0).trigger("change")},this))):(this._containerElements.denyAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);"grant"===n.data("type")&&n.attr("id")!=="grantAll_"+this._container.attr("id")&&n.prop("checked",!0).trigger("change")},this))):"deny"===n?(this._containerElements.grantAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);"deny"===n.data("type")&&n.attr("id")!=="denyAll_"+this._container.attr("id")&&n.prop("checked",!1).trigger("change")},this))):(this._containerElements.denyAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);"grant"===n.data("type")&&n.attr("id")!=="grantAll_"+this._container.attr("id")&&n.prop("checked",!1).trigger("change")},this)))},_setupPermissions:function(e,t){if(this._containerElements.permissionList.find("input[type='checkbox']").prop("checked",!1),this._values[e]&&this._values[e][t])for(var n in this._values[e][t])1==this._values[e][t][n]?$("#grant"+n).prop("checked",!0).trigger("change"):$("#deny"+n).prop("checked",!0).trigger("change");this._containerElements.permissionList.show()},_savePermissions:function(){var s,r,e=this._containerElements.aclList.find("li.active");e.length&&(s=e.data("objectID"),r=e.data("type"),this._values[r][s]={},this._containerElements.permissionList.find("input[type='checkbox']").each(function(e,t){var n,i,a=$(t);a.attr("id")!="grantAll_"+this._container.attr("id")&&a.attr("id")!="denyAll_"+this._container.attr("id")&&(n="deny"===a.data("type")?0:1,i=a.data("optionID"),a.is(":checked")?(this._values[r][s][i]=n,a.prop("checked",!1)):this._values[r]&&this._values[r][s]&&this._values[r][s][i]&&this._values[r][s][i]==n&&delete this._values[r][s][i])}.bind(this)))},submit:function(e){this._savePermissions(),this._save("group"),this._save("user")},_save:function(e){if($.getLength(this._values[e])){var t=this._container.parents("form:eq(0)");for(var n in this._values[e]){var i=this._values[e][n];for(var a in i)$('<input type="hidden" name="aclValues['+e+"]["+n+"]["+a+']" value="'+i[a]+'" />').appendTo(t)}}},getData:function(){return this._savePermissions(),this._values}}); })(this);
 
 // WCF.Attachment.js
-(function (window, undefined) { WCF.Attachment.js; })(this);
+(function (window, undefined) { "use strict";WCF.Attachment={},WCF.Attachment.Upload=WCF.Upload.extend({_autoInsert:[],_insertAllButton:null,_objectType:"",_objectID:0,_tmpHash:"",_parentObjectID:0,_editorId:"",_replaceOnLoad:{},_options:{},init:function(t,e,i,a,n,s,r,l,o){var d,c;this._super(t,e,"wcf\\data\\attachment\\AttachmentAction",{multiple:!0,maxUploads:r}),this._autoInsert=[],this._objectType=i,this._objectID=parseInt(a),this._tmpHash=n,this._parentObjectID=parseInt(s),this._editorId=l,this._options=$.extend(!0,this._options,o||{}),this._buttonSelector.children("p.button").click($.proxy(this._validateLimit,this)),this._fileListSelector.find(".jsButtonInsertAttachment").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertThumbnail").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertFull").click($.proxy(this._insert,this)),WCF.System.Event.addListener("com.woltlab.wcf.action.delete","attachment",this._onDelete.bind(this)),this._makeSortable(),this._insertAllButton=$('<p class="button jsButtonAttachmentInsertAll">'+WCF.Language.get("wcf.attachment.insertAll")+"</p>").hide(),this._editorId&&(this._insertAllButton.appendTo(this._buttonSelector),this._insertAllButton.click($.proxy(this._insertAll,this)),this._fileListSelector.children("li:not(.uploadFailed)").length&&this._insertAllButton.show(),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","submit_"+this._editorId,this._submitInline.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this._editorId,this._reset.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","dragAndDrop_"+this._editorId,this._editorUpload.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this._editorId,this._editorUpload.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._editorId,function(t){t.tmpHashes&&Array.isArray(t.tmpHashes)||(t.tmpHashes=[]);var e=t.tmpHashes.indexOf(n);0<this._fileListSelector.children("li:not(.uploadFailed)").length?-1===e&&t.tmpHashes.push(n):-1!==e&&t.tmpHashes.splice(e)}.bind(this)),d=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","metacode_attach_"+this._editorId,function(t){var e,i,a,n,s,r=this._getImageAttachments(),l=t.attributes[0]||0;r.hasOwnProperty(l)&&(e=~~$("#"+this._editorId).data("redactor").opts.woltlab.attachmentThumbnailWidth,i=!0===(i=t.attributes[2])||"true"===i||~~i&&~~i<=e,(a=elCreate("img")).className="woltlabAttachment",a.src=r[l][i?"thumbnailUrl":"url"],elData(a,"attachment-id",l),"left"===(n=t.attributes[1]||"none")?a.classList.add("messageFloatObjectLeft"):"right"===n&&a.classList.add("messageFloatObjectRight"),(s=t.metacode).parentNode.insertBefore(a,s),elRemove(s),t.cancel=!0)}.bind(this)),c=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,this._sync.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","destroy_"+this._editorId,function(){WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","submit_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","reset_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","insertAttachment_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","dragAndDrop_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._editorId),WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","metacode_attach_"+this._editorId,d),WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,c)}.bind(this)))},_editorUpload:function(e){var i=null;this._fileListSelector.closest(".messageTabMenu").messageTabMenu("showTab","attachments",!0);var t=function(t){null===i?this._autoInsert.push(t):this._replaceOnLoad[t]=i,e.uploadID=t}.bind(this);e.file?this._upload(void 0,e.file,void 0,t):(this._upload(void 0,void 0,e.blob,t),i=e.replace||null)},_getImageAttachments:function(){var a={};return this._fileListSelector.children("li").each(function(t,e){var i=$(e);i.data("isImage")&&(a[~~i.data("objectID")]={thumbnailUrl:i.find(".jsButtonAttachmentInsertThumbnail").data("url"),url:i.find(".jsButtonAttachmentInsertFull").data("url")})}),a},_submitInline:function(t){var e;this._tmpHash&&(t.tmpHash=this._tmpHash,e={},WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","getMetaData_"+this._editorId,e),e.tmpHashes&&Array.isArray(e.tmpHashes)&&0<e.tmpHashes.length&&(t.tmpHash+=","+e.tmpHashes.join(",")))},_reset:function(){this._fileListSelector.hide().empty(),this._insertAllButton.hide(),this._validateLimit()},_validateLimit:function(){var t=this._buttonSelector.next("small.innerError"),e=this._options.maxUploads-this._fileListSelector.children("li:not(.uploadFailed)").length,i=this._fileUpload?this._fileUpload.prop("files").length:0;if(e<=0||e<i){var a=e<=0?WCF.Language.get("wcf.attachment.upload.error.reachedLimit"):WCF.Language.get("wcf.attachment.upload.error.reachedRemainingLimit").replace(/#remaining#/,e);return t.length||(t=$('<small class="innerError" />').insertAfter(this._buttonSelector)),t.html(a),!1}return t.remove(),!0},_removeLimitError:function(t){var e=this._fileListSelector.children("li");e.filter(":not(.uploadFailed)").length||this._insertAllButton.hide(),e.length||this._fileListSelector.hide(),this._editorId&&t.button&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","deleteAttachment_"+this._editorId,{attachmentId:t.button.data("objectID")})},_upload:function(s,r,l,o){var m=this._super.bind(this);require(["WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Image/ImageUtil","WoltLabSuite/Core/Image/Resizer","WoltLabSuite/Core/Ajax/Status"],function(t,d,e,i){i.show();var a=[];r?a.push(r):l?a.push(t.blobToFile(l,"pasted-from-clipboard")):a=this._fileUpload.prop("files");var c,h,n=Promise.resolve(a);this._options.autoScale&&this._options.autoScale.enable&&(c=this._buttonSelector.data("maxSize"),h=new e,n=Array.prototype.reduce.call(a,function(t,o){return t.then(function(e){if(-1===["image/png","image/gif","image/jpeg"].indexOf(o.type))return e.push(o),e;var l=new Promise(function(t,e){setTimeout(function(){t(o)},1e4)}),t=h.loadFile(o).then(function(t){var e,i,a=t.exif,n=this._options.autoScale.maxWidth,s=this._options.autoScale.maxHeight,r=this._options.autoScale.quality;return 2<=window.devicePixelRatio&&(e=window.screen.width*window.devicePixelRatio,i=window.screen.height*window.devicePixelRatio,e-10<t.image.width&&t.image.width<10+e&&i-10<t.image.height&&(n=Math.min(n,window.screen.width))),h.resize(t.image,n,s,r,o.size>c,l).then(function(t){if(void 0===t)return o;var e=this._options.autoScale.fileType;return"keep"!==this._options.autoScale.fileType&&!d.containsTransparentPixels(t)||(e=o.type),h.saveFile({exif:a,image:t},o.name,e,r)}.bind(this)).then(function(t){return t.size>o.size?(console.debug('[WCF.Attachment] File size of "'+o.name+'" increased, uploading untouched image.'),o):t})}.bind(this)).catch(function(t){return console.debug('[WCF.Attachment] Failed to resize image "'+o.name+'":',t),o});return Promise.race([l,t]).then(function(t){return e.push(t),e})}.bind(this))}.bind(this),Promise.resolve([]))),n.then(function(t){var e=void 0;return this._validateLimit()&&(e=m(s,void 0,void 0,t)),this._fileUpload&&(this._removeButton(),this._createButton()),"function"==typeof o&&o(e),e}.bind(this)).catch(function(t){console.debug("[WCF.Attachment] Failed to upload attachments:",t)}).finally(i.hide)}.bind(this),function(t){console.debug("[WCF.Attachment] Failed to load modules:",t)})},_createUploadMatrix:function(t){return this._fileListSelector.children("li.uploadFailed").remove(),this._super(t)},_getParameters:function(){return{objectType:this._objectType,objectID:this._objectID,tmpHash:this._tmpHash,parentObjectID:this._parentObjectID}},_initFile:function(t){var e=$('<li class="box64 formAttachmentListItem"><span class="icon icon64 fa-spinner" /><div><div><p>'+t.name+'</p><small><progress max="100"></progress></small></div><ul></ul></div></li>').data("filename",t.name);return this._fileListSelector.append(e),this._fileListSelector.show(),this._buttonSelector.data("maxSize")<t.size&&(e.find("progress").remove(),e.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),e.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error.tooLarge")+"</small>")),e.addClass("uploadFailed")),e},_useThumbnail:function(){return!0},_success:function(t,e){var i,a,n,s,r,l,o,d,c,h,m;for(var u in this._uploadMatrix[t]){this._uploadMatrix[t].hasOwnProperty(u)&&((a=this._uploadMatrix[t][u]).find("progress").remove(),n=a.data("filename"),s=a.data("internalFileID"),e.returnValues&&e.returnValues.attachments[s]?(i=e.returnValues.attachments[s],elData(a[0],"object-id",i.attachmentID),i.tinyURL?(a.children(".fa-spinner").replaceWith($('<img src="'+i.tinyURL+'" alt="" class="attachmentTinyThumbnail" />')),a.data("height",i.height),a.data("width",i.width),elData(a[0],"is-image",i.isImage)):a.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-"+i.iconName),(r=$('<a href=""></a>')).text(n).attr("href",i.url),r[0].target="_blank",0!=i.isImage&&r.addClass("jsImageViewer").attr("title",n),a.find("p").empty().append(r),a.find("small").append(i.formattedFilesize),l=a.find("ul").addClass("buttonGroup"),o=$('<li><span class="button small jsDeleteButton" data-object-id="'+i.attachmentID+'" data-confirm-message="'+WCF.Language.get("wcf.attachment.delete.sure")+'" data-event-name="attachment">'+WCF.Language.get("wcf.global.button.delete")+"</span></li>"),l.append(o),a.data("objectID",i.attachmentID),this._editorId&&(i.tinyURL?(i.thumbnailURL&&$('<li><span class="button small jsButtonAttachmentInsertThumbnail" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.thumbnailURL)+'">'+WCF.Language.get("wcf.attachment.insertThumbnail")+"</span></li>").appendTo(l),$('<li><span class="button small jsButtonAttachmentInsertFull" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.url)+'">'+WCF.Language.get("wcf.attachment.insertFull")+"</span></li>").appendTo(l)):$('<li><span class="button small jsButtonAttachmentInsertPlain" data-object-id="'+i.attachmentID+'">'+WCF.Language.get("wcf.attachment.insert")+"</span></li>").appendTo(l)),this._triggerSync("new",{html:a[0].outerHTML}),this._registerEditorButtons(a[0]),this._replaceOnLoad.hasOwnProperty(t)&&(a.hasClass("uploadFailed")||(d=this._replaceOnLoad[t])&&d.parentNode&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","replaceAttachment_"+this._editorId,{attachmentId:i.attachmentID,img:d,src:i.thumbnailURL?i.thumbnailURL:i.url}),this._replaceOnLoad[t]=null)):(a.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),h="",e.returnValues&&e.returnValues.errors[s]?"uploadFailed"===(h=(c=e.returnValues.errors[s]).errorType)&&c.additionalData.phpLimitExceeded&&(h="uploadPhpLimit"):h="uploadFailed",a.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error."+h)+"</small>")),a.addClass("uploadFailed")),WCF.inArray(t,this._autoInsert)&&(this._autoInsert.splice(this._autoInsert.indexOf(t),1),a.hasClass("uploadFailed")||((m=a.find(".jsButtonAttachmentInsertThumbnail")).length||(m=a.find(".jsButtonAttachmentInsertFull")),m.trigger("click"))))}this._rebuildInterface()},_rebuildInterface:function(){this._makeSortable(),this._fileListSelector.children("li:not(.uploadFailed)").length?this._insertAllButton.show():this._insertAllButton.hide(),WCF.DOMNodeInsertedHandler.execute()},_registerEditorButtons:function(t){this._editorId&&elBySelAll(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t,function(t){t.addEventListener("click",this._insert.bind(this))}.bind(this))},_insert:function(t){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertAttachment_"+this._editorId,{attachmentId:elData(t.currentTarget,"object-id"),url:elData(t.currentTarget,"url")})},_insertAll:function(){for(var t,e,i=0,a=this._fileListSelector[0].childNodes.length;i<a;i++)"LI"!==(t=this._fileListSelector[0].childNodes[i]).nodeName||t.classList.contains("uploadFailed")||(null===(e=elBySel(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertPlain",t))&&(e=elBySel(".jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t)),window.jQuery(e).trigger("click"))},_error:function(a){this._fileListSelector.find("li").each(function(t,e){var i=$(e);i.children(".fa-spinner").length&&(i.addClass("uploadFailed").children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),i.find("div > div").append($('<small class="innerError">'+(a.responseJSON&&a.responseJSON.message?a.responseJSON.message:WCF.Language.get("wcf.attachment.upload.error.uploadFailed"))+"</small>")))})},_makeSortable:function(){var t=this._fileListSelector.children("li:not(.uploadFailed)");t.length&&(t.addClass("sortableAttachment").children("img").addClass("sortableNode"),this._fileListSelector.hasClass("sortableList")||(this._fileListSelector.addClass("sortableList"),require(["Environment"],function(t){"desktop"===t.platform()&&new WCF.Sortable.List(this._fileListSelector.parent().wcfIdentify(),"",0,{axis:!1,items:"li.sortableAttachment",toleranceElement:null,start:function(t,e){e.placeholder[0].style.setProperty("height",e.helper[0].offsetHeight+"px","")},update:function(){var i=[];this._fileListSelector.children("li:not(.uploadFailed)").each(function(t,e){i.push($(e).data("objectID"))}),i.length&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"updatePosition",className:"wcf\\data\\attachment\\AttachmentAction",parameters:{attachmentIDs:i,objectID:this._objectID,objectType:this._objectType,tmpHash:this._tmpHash}}})}.bind(this)},!0)}.bind(this))))},_onDelete:function(t){var e=elData(t.button[0],"object-id"),i=elBySel('.formAttachmentListItem[data-object-id="'+e+'"]',this._fileListSelector[0]);null!==i&&elRemove(i),this._removeLimitError(t)},_sync:function(t){if(t.source!==this)switch(t.type){case"new":this._syncNew(t.data);break;default:throw new Error("Unexpected type '"+t.type+"'")}},_syncNew:function(a){require(["Dom/Util"],function(t){var e=t.createFragmentFromHtml(a.html),i=elBySel("li",e);i.id="",this._registerEditorButtons(i),this._fileListSelector[0].appendChild(i),elShow(this._fileListSelector[0]),this._rebuildInterface()}.bind(this))},_triggerSync:function(t,e){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,{source:this,type:t,data:e})}}); })(this);
 
 // WCF.ColorPicker.js
-(function (window, undefined) { WCF.ColorPicker.js; })(this);
+(function (window, undefined) { "use strict";WCF.ColorPicker=Class.extend({_bar:null,_barActive:!1,_barSelector:null,_callbackSubmit:null,_dialog:null,_didInit:!1,_elementID:"",_gradient:null,_gradientActive:!1,_gradientSelector:null,_hex:null,_hsv:{},_newColor:null,_oldColor:null,_rgba:{},_rgbaRegExp:null,init:function(t){this._callbackSubmit=null,this._elementID="",this._hsv={h:0,s:100,v:100},this._position={};var a=$(t);a.length?a.click($.proxy(this._open,this)):console.debug("[WCF.ColorPicker] Selector does not match any element, aborting.")},setCallbackSubmit:function(t){this._callbackSubmit=t},_open:function(t){this._didInit||(this._initColorPicker(),this._didInit=!0);var a=$(t.currentTarget);this._elementID=a.wcfIdentify(),this._parseColor(a);var i=this.hsvToRgb(this._hsv.h,this._hsv.s,this._hsv.v);this._oldColor.css({backgroundColor:"rgba("+i.r+", "+i.g+", "+i.b+", "+this._rgba.a.val()/100+")"}),this._dialog.wcfDialog({backdropCloseOnClick:!1,title:WCF.Language.get("wcf.style.colorPicker")}),window.setTimeout(function(){this._hex.focus()}.bind(this),200)},_parseColor:function(t){if(t.data("hsv")&&t.data("rgb")){var a=t.data("hsv");for(var i in a)this._hsv[i]=a[i];this._updateValues(t.data("rgb"),!0,!0),this._rgba.a.val(parseInt(t.data("alpha")))}else{t.data("color").match(/^rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)$/)&&t.data("color","rgba("+RegExp.$1+", "+RegExp.$2+", "+RegExp.$3+", 1)"),null===this._rgbaRegExp&&(this._rgbaRegExp=new RegExp("^rgba\\((\\d{1,3}), ?(\\d{1,3}), ?(\\d{1,3}), ?(1|1\\.00?|0|0?\\.[0-9]{1,2})\\)$")),this._rgbaRegExp.exec(t.data("color"));var s=RegExp.$4;0===s.indexOf(".")&&(s="0"+s),s*=100,this._updateValues({r:RegExp.$1,g:RegExp.$2,b:RegExp.$3,a:Math.round(s)},!0,!0)}},_initColorPicker:function(){this._dialog=$('<div id="colorPickerContainer" />').hide().appendTo(document.body),this._gradient=$('<div id="colorPickerGradient" />').appendTo(this._dialog),this._gradientSelector=$('<span id="colorPickerGradientSelector"><span></span></span>').appendTo(this._gradient),this._bar=$('<div id="colorPickerBar" />').appendTo(this._dialog),this._barSelector=$('<span id="colorPickerBarSelector" />').appendTo(this._bar),this._gradient.mousedown($.proxy(this._mouseDownGradient,this)),this._bar.mousedown($.proxy(this._mouseDownBar,this));var a=this;$(document).mouseup(function(t){a._barActive?(a._barActive=!1,a._mouseBar(t)):a._gradientActive&&(a._gradientActive=!1,a._mouseGradient(t))}).mousemove(function(t){a._barActive?a._mouseBar(t):a._gradientActive&&a._mouseGradient(t)}),this._initColorPickerForm()},_initColorPickerForm:function(){var t=$('<div id="colorPickerForm" />').appendTo(this._dialog);$("<small>"+WCF.Language.get("wcf.style.colorPicker.new")+"</small>").appendTo(t);var a=$('<ul class="colors" />').appendTo(t);this._newColor=$('<li class="new"><span /></li>').appendTo(a).children("span"),this._oldColor=$('<li class="old"><span /></li>').appendTo(a).children("span"),$("<small>"+WCF.Language.get("wcf.style.colorPicker.current")+"</small>").appendTo(t);var i=$('<ul class="rgba" />').appendTo(t);this._createInputElement("r","R",0,255).appendTo(i),this._createInputElement("g","G",0,255).appendTo(i),this._createInputElement("b","B",0,255).appendTo(i),this._createInputElement("a","a",0,100).appendTo(i);var s=$('<ul class="hex"><li><label><span>#</span></label></li></ul>').appendTo(t);this._hex=$('<input type="text" maxlength="6" />').appendTo(s.find("label")),this._rgba.r.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._rgba.g.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._rgba.b.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._rgba.a.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._hex.blur($.proxy(this._blurHex,this)).keyup($.proxy(this._keyUpHex,this));var e=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.style.colorPicker.button.apply")+"</button>").appendTo(e).click($.proxy(this._submit,this));var r=this;this._hex.on("paste",function(){r._hex.attr("maxlength","7"),setTimeout(function(){var t=r._hex.val();"#"==t.substring(0,1)&&(t=t.substr(1)),6<t.length&&(t=t.substring(0,6)),r._hex.attr("maxlength","6").val(t)},50)}),t.find("input").focus(function(){this.select()})},_keyUpRGBA:function(t){13==t.which&&(this._blurRgba(),this._submit())},_keyUpHex:function(t){13==t.which&&(this._blurHex(),this._submit())},_submit:function(){var t=this.hsvToRgb(this._hsv.h,this._hsv.s,this._hsv.v),a={};for(var i in this._hsv)a[i]=this._hsv[i];var s=$("#"+this._elementID);s.data("hsv",a).css({backgroundColor:"rgba("+t.r+", "+t.g+", "+t.b+", "+this._rgba.a.val()/100+")"}).data("alpha",parseInt(this._rgba.a.val())),s.data("rgb",{r:this._rgba.r.val(),g:this._rgba.g.val(),b:this._rgba.b.val()}),$("#"+s.data("store")).val("rgba("+this._rgba.r.val()+", "+this._rgba.g.val()+", "+this._rgba.b.val()+", "+this._rgba.a.val()/100+")").trigger("change"),this._dialog.wcfDialog("close"),"function"==typeof this._callbackSubmit&&this._callbackSubmit({r:this._rgba.r.val(),g:this._rgba.g.val(),b:this._rgba.b.val(),a:this._rgba.a.val()/100})},_createInputElement:function(t,a,i,s){var e=$('<li class="'+t+'" />'),r=$("<label />").appendTo(e);return $("<span>"+a+"</span>").appendTo(r),this._rgba[t]=$('<input type="number" value="0" min="'+i+'" max="'+s+'" step="1" />').appendTo(r),e},_mouseDownGradient:function(t){this._gradientActive=!0,this._mouseGradient(t)},_mouseGradient:function(t){var a=this._gradient.getOffsets("offset"),i=Math.max(Math.min(t.pageX-a.left,255),0),s=Math.max(Math.min(t.pageY-a.top,255),0);this._hsv.s=100*Math.max(0,Math.min(1,i/255)),this._hsv.v=100*Math.max(0,Math.min(1,(255-s)/255)),this._updateValues(null)},_mouseDownBar:function(t){this._barActive=!0,this._mouseBar(t)},_mouseBar:function(t){var a=this._bar.getOffsets("offset"),i=Math.max(Math.min(t.pageY-a.top,255),0);this._barSelector.css({top:i+"px"}),this._hsv.h=Math.max(0,Math.min(359,Math.round((255-i)/255*360))),this._updateValues(null)},_blurRgba:function(){for(var t in this._rgba){var a=parseInt(this._rgba[t].val())||0;"a"===t?this._rgba[t].val(Math.max(0,Math.min(100,a))):this._rgba[t].val(Math.max(0,Math.min(255,a)))}this._updateValues({r:this._rgba.r.val(),g:this._rgba.g.val(),b:this._rgba.b.val()},!0,!0)},_blurHex:function(){var t=this.hexToRgb(this._hex.val());t!==Number.NaN&&this._updateValues(t,!0,!0)},_updateValues:function(t,a,i){for(var s in a=!0===a,i=!0===i,null===t&&(t=this.hsvToRgb(this._hsv.h,this._hsv.s,this._hsv.v),0==this._rgba.a.val()&&(t.a=100)),void 0===t.a&&(t.a=this._rgba.a.val()),t)this._rgba[s].val(t[s]);var e;this._hex.val(this.rgbToHex(t.r,t.g,t.b)),(a||i)&&(e=this.rgbToHsv(t.r,t.g,t.b),a&&(this._hsv.h=e.h),i&&(this._hsv.s=e.s,this._hsv.v=e.v));var r=Math.max(0,Math.min(255,255-this._hsv.h/360*255));this._barSelector.css({top:r+"px"});var o=Math.max(0,Math.min(255,this._hsv.s/100*255)),r=Math.max(0,Math.min(255,255-this._hsv.v/100*255));this._gradientSelector.css({left:o-6+"px",top:r-6+"px"}),this._newColor.css({backgroundColor:"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a/100+")"});var h=this.hsvToRgb(this._hsv.h,100,100);this._gradient.css({backgroundColor:"rgb("+h.r+", "+h.g+", "+h.b+")"})},hsvToRgb:function(t,a,i){return window.__wcf_bc_colorUtil.hsvToRgb(t,a,i)},rgbToHsv:function(t,a,i){return window.__wcf_bc_colorUtil.rgbToHsv(t,a,i)},hexToRgb:function(t){return window.__wcf_bc_colorUtil.hexToRgb(t)},rgbToHex:function(t,a,i){return window.__wcf_bc_colorUtil.rgbToHex(t,a,i)}}),void 0===window.__wcf_bc_colorUtil&&require(["ColorUtil"],function(t){}),"function"==typeof window.__wcf_bc_colorPickerInit&&window.__wcf_bc_colorPickerInit(); })(this);
 
 // WCF.Comment.js
-(function (window, undefined) { WCF.Comment.js; })(this);
+(function (window, undefined) { "use strict";WCF.Comment={},WCF.Comment.Handler=Class.extend({_commentButtonList:{},_comments:{},_container:null,_containerID:"",_displayedComments:0,_loadNextComments:null,_loadNextResponses:{},_proxy:null,_responses:{},_responseCache:{},_commentData:{},_guestDialog:null,_permalinkComment:null,_permalinkResponse:null,_scrollTarget:null,init:function(e){var t,n;this._commentButtonList={},this._comments={},this._containerID=e,this._displayedComments=0,this._loadNextComments=null,this._loadNextResponses={},this._permalinkComment=null,this._permalinkResponse=null,this._responseAdd=null,this._responseCache={},this._responseRevert=null,this._responses={},this._scrollTarget=null,this._onResponsesLoaded=null,this._container=$("#"+$.wcfEscapeID(this._containerID)),this._container.length?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initComments(),this._initResponses(),this._container.data("canAdd")&&(null===elBySel(".commentListAddComment .wysiwygTextarea",this._container[0])?console.error("Missing WYSIWYG implementation, adding comments is not available."):require(["WoltLabSuite/Core/Ui/Comment/Add","WoltLabSuite/Core/Ui/Comment/Response/Add"],function(e,t){new e(elBySel(".jsCommentAdd",this._container[0])),this._responseAdd=new t(elBySel(".jsCommentResponseAdd",this._container[0]),{callbackInsert:function(){null!==this._responseRevert&&(this._responseRevert(),this._responseRevert=null)}.bind(this)})}.bind(this))),require(["WoltLabSuite/Core/Ui/Comment/Edit","WoltLabSuite/Core/Ui/Comment/Response/Edit"],function(e,t){new e(this._container[0]),new t(this._container[0])}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Comment.Handler",$.proxy(this._domNodeInserted,this)),WCF.System.ObjectStore.add("WCF.Comment.Handler",this),window.addEventListener("hashchange",function(){var t,e=window.location.hash;e&&e.match(/.+\/(comment\d+)/)&&(t=RegExp.$1,window.setTimeout(function(){var e=elById(t);e&&e.scrollIntoView({behavior:"smooth"})},100))}),window.location.hash.match(/^#(?:[^\/]+\/)?comment(\d+)(?:\/response(\d+))?/)&&((t=elById("comment"+RegExp.$1))?RegExp.$2?(n=elById("comment"+RegExp.$1+"response"+RegExp.$2))?this._scrollTo(n,!0):this._loadResponseSegment(t,RegExp.$1,RegExp.$2):this._scrollTo(t,!0):this._loadCommentSegment(RegExp.$1,RegExp.$2))):console.debug("[WCF.Comment.Handler] Unable to find container identified by '"+this._containerID+"'")},_scrollTo:function(t,n){null===this._scrollTarget&&(this._scrollTarget=elCreate("span"),this._scrollTarget.className="commentScrollTarget",document.body.appendChild(this._scrollTarget)),this._scrollTarget.style.setProperty("top",t.getBoundingClientRect().top+window.pageYOffset-49+"px",""),require(["Ui/Scroll"],function(e){e.element(this._scrollTarget,function(){n&&(t.classList.contains("commentHighlightTarget")&&(t.classList.remove("commentHighlightTarget"),t.offsetTop),t.classList.add("commentHighlightTarget"))})}.bind(this))},_loadCommentSegment:function(e,t){this._permalinkComment=elCreate("li"),this._permalinkComment.className="commentPermalinkContainer loading",this._permalinkComment.innerHTML='<span class="icon icon48 fa-spinner"></span>',this._container[0].insertBefore(this._permalinkComment,this._container[0].firstChild),this._proxy.setOption("data",{actionName:"loadComment",className:"wcf\\data\\comment\\CommentAction",objectIDs:[e],parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),responseID:~~t}}}),this._proxy.sendRequest()},_loadResponseSegment:function(e,t,n){this._permalinkResponse=elCreate("li"),this._permalinkResponse.className="commentResponsePermalinkContainer loading",this._permalinkResponse.innerHTML='<span class="icon icon32 fa-spinner"></span>';var s=elBySel(".commentResponseList",e);s.insertBefore(this._permalinkResponse,s.firstChild),this._proxy.setOption("data",{actionName:"loadResponse",className:"wcf\\data\\comment\\CommentAction",objectIDs:[t],parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),responseID:~~n}}}),this._proxy.sendRequest()},_handleLoadNextComments:function(){this._displayedComments<this._container.data("comments")?(null===this._loadNextComments&&(this._loadNextComments=$('<li class="commentLoadNext showMore"><button class="small">'+WCF.Language.get("wcf.comment.more")+"</button></li>").appendTo(this._container),this._loadNextComments.children("button").click($.proxy(this._loadComments,this))),this._loadNextComments.children("button").enable()):null!==this._loadNextComments&&this._loadNextComments.remove()},_handleLoadNextResponses:function(e){var t,n=this._comments[e];n.data("displayedResponses",n.find("ul.commentResponseList > li").length),n.data("displayedResponses")<n.data("responses")?void 0===this._loadNextResponses[e]&&(t=n.data("responses")-n.data("displayedResponses"),this._loadNextResponses[e]=$('<li class="jsCommentLoadNextResponses"><a>'+WCF.Language.get("wcf.comment.response.more",{count:t})+"</a></li>").appendTo(this._commentButtonList[e]),this._loadNextResponses[e].children("a").data("commentID",e).click($.proxy(this._loadResponses,this)),this._commentButtonList[e].parent().show()):void 0!==this._loadNextResponses[e]&&this._loadNextResponses[e].remove()},_loadComments:function(){this._loadNextComments.children("button").disable(),this._proxy.setOption("data",{actionName:"loadComments",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),lastCommentTime:this._container.data("lastCommentTime")}}}),this._proxy.sendRequest()},_loadResponses:function(e){this._loadResponsesExecute($(e.currentTarget).disable().data("commentID"),!1)},_loadResponsesExecute:function(e,t){this._proxy.setOption("data",{actionName:"loadResponses",className:"wcf\\data\\comment\\response\\CommentResponseAction",parameters:{data:{commentID:e,lastResponseTime:this._comments[e].data("lastResponseTime"),loadAllResponses:t?1:0}}}),this._proxy.sendRequest()},_domNodeInserted:function(){this._initComments(),this._initResponses()},_initComments:function(){var a=(a=elBySel('link[rel="canonical"]'))?a.href:window.location.toString().replace(/#.+$/,""),e=this._container[0].closest(".tabMenuContent");e&&(a+="#"+elData(e,"name"));var l=this,m=!1;this._container.find(".jsComment").each(function(e,t){var n=$(t).removeClass("jsComment"),s=n.data("commentID");(l._comments[s]=n)[0].id="comment"+s;var o=n.find("ul.commentResponseList");o.length||(o=n.find(".commentContent"));var i=$('<div class="commentOptionContainer" />').hide().insertAfter(o);l._commentButtonList[s]=$('<ul class="inlineList dotSeparated" />').appendTo(i),l._handleLoadNextResponses(s),l._initComment(s,n),l._initPermalink(n[0],a),l._displayedComments++,m=!0}),m&&this._handleLoadNextComments()},_initComment:function(e,t){this._container.data("canAdd")&&this._initAddResponse(e,t),t.data("canEdit")&&$('<li><a href="#" class="jsCommentEditButton jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 fa-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>").appendTo(t.find("ul.buttonList:eq(0)")),t.data("canDelete")&&$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 fa-times" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>").data("commentID",e).appendTo(t.find("ul.buttonList:eq(0)")).click($.proxy(this._delete,this));var n=elBySel(".jsEnableComment",t[0]);n&&n.addEventListener(WCF_CLICK_EVENT,this._enableComment.bind(this))},_enableComment:function(e){e.preventDefault();var t=e.currentTarget.closest(".comment");this._proxy.setOption("data",{actionName:"enable",className:"wcf\\data\\comment\\CommentAction",objectIDs:[elData(t,"object-id")]}),this._proxy.sendRequest()},_initPermalink:function(e,t){var n=elCreate("a");n.href=t+(-1===t.indexOf("#")?"#":"/")+"comment"+elData(e,"object-id");var s=elBySel(".commentContent:not(.commentResponseContent) .containerHeadline time",e);s.parentNode.insertBefore(n,s),n.appendChild(s)},_initResponses:function(){var o=(o=elBySel('link[rel="canonical"]'))?o.href:window.location.toString().replace(/#.+$/,""),e=this._container[0].closest(".tabMenuContent");for(var i in e&&(o+="#"+elData(e,"name")),this._comments)this._comments.hasOwnProperty(i)&&elBySelAll(".jsCommentResponse",this._comments[i][0],function(e){var t=$(e).removeClass("jsCommentResponse"),n=t.data("responseID");this._responses[n]=t,e.id="comment"+i+"response"+n,this._initResponse(n,t),this._initPermalinkResponse(i,e,n,o);var s=elBySel(".jsEnableResponse",e);s&&s.addEventListener(WCF_CLICK_EVENT,this._enableCommentResponse.bind(this))}.bind(this))},_enableCommentResponse:function(e){e.preventDefault();var t=e.currentTarget.closest(".commentResponse");this._proxy.setOption("data",{actionName:"enableResponse",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{responseID:elData(t,"object-id")}}}),this._proxy.sendRequest()},_initPermalinkResponse:function(e,t,n,s){var o=elCreate("a");o.href=s+(-1===s.indexOf("#")?"#":"/")+"comment"+e+"/response"+n;var i=elBySel(".commentResponseContent .containerHeadline time",t);i.parentNode.insertBefore(o,i),o.appendChild(i)},_initResponse:function(e,t){var n,s;t.data("canEdit")&&$('<li><a href="#" class="jsCommentResponseEditButton jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 fa-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>").data("responseID",e).appendTo(t.find("ul.buttonList:eq(0)")),t.data("canDelete")&&(n=$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 fa-times" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>"),s=this,n.data("responseID",e).appendTo(t.find("ul.buttonList:eq(0)")).click(function(e){s._delete(e,!0)}))},_initAddResponse:function(e,t){$('<li class="jsCommentShowAddResponse"><a>'+WCF.Language.get("wcf.comment.button.response.add")+"</a></li>").data("commentID",e).click($.proxy(this._showAddResponse,this)).appendTo(this._commentButtonList[e]);this._commentButtonList[e].parent().show()},_showAddResponse:function(e){var t,n,s;e.preventDefault(),null===this._onResponsesLoaded&&(null!==this._responseAdd?null!==(t=this._responseAdd.getContainer())&&(null!==this._responseRevert&&(this._responseRevert(),this._responseRevert=null),n=$(e.currentTarget),s=n.data("commentID"),this._onResponsesLoaded=function(){n.hide(),t.parentNode&&t.parentNode.classList.contains("jsCommentResponseAddContainer")&&elRemove(t.parentNode);var e=this._commentButtonList[s][0].closest(".commentOptionContainer");e.parentNode.insertBefore(t,e.nextSibling),"string"==typeof this._responseCache[s]?this._responseAdd.setContent(this._responseCache[s]):this._responseAdd.setContent(""),this._responseRevert=function(){this._responseCache[s]=this._responseAdd.getContent(),elRemove(t),n.show()}.bind(this),this._onResponsesLoaded=null}.bind(this),n.prev().hasClass("jsCommentLoadNextResponses")?(this._loadResponsesExecute(s,!0),n.parent().children(".button").disable()):this._onResponsesLoaded()):console.error("Missing response API."))},_delete:function(n,s){n.preventDefault(),WCF.System.Confirmation.show(WCF.Language.get("wcf.comment.delete.confirmMessage"),$.proxy(function(e){var t;"confirm"===e&&(t={objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID")},!0!==s?t.commentID=$(n.currentTarget).data("commentID"):t.responseID=$(n.currentTarget).data("responseID"),this._proxy.setOption("data",{actionName:"remove",className:"wcf\\data\\comment\\CommentAction",parameters:{data:t}}),this._proxy.sendRequest())},this))},_success:function(e,t,n){switch(e.actionName){case"enable":this._enable(e);break;case"enableResponse":this._enableResponse(e);break;case"loadComment":this._insertComment(e);break;case"loadComments":this._insertComments(e);break;case"loadResponse":this._insertResponse(e);break;case"loadResponses":this._insertResponses(e);break;case"remove":this._remove(e)}WCF.DOMNodeInsertedHandler.execute()},_enable:function(e){var t,n,s;!e.returnValues.commentID||(t=elBySel('.comment[data-object-id="'+e.returnValues.commentID+'"]',this._container[0]))&&(elData(t,"is-disabled",0),(n=elBySel(".jsIconDisabled",t))&&elRemove(n),(s=elBySel(".jsEnableComment",t))&&elRemove(s.parentNode))},_enableResponse:function(e){var t,n,s;!e.returnValues.responseID||(t=elBySel('.commentResponse[data-object-id="'+e.returnValues.responseID+'"]',this._container[0]))&&(elData(t,"is-disabled",0),(n=elBySel(".jsIconDisabled",t))&&elRemove(n),(s=elBySel(".jsEnableResponse",t))&&elRemove(s.parentNode))},_insertComment:function(e){var t,n;""!==e.returnValues.template?($(e.returnValues.template).insertBefore(this._permalinkComment),(t=this._permalinkComment.previousElementSibling).classList.add("commentPermalinkContainer"),elRemove(this._permalinkComment),this._permalinkComment=t,e.returnValues.response&&(this._permalinkResponse=elCreate("li"),this._permalinkResponse.className="commentResponsePermalinkContainer loading",this._permalinkResponse.innerHTML='<span class="icon icon32 fa-spinner"></span>',(n=elBySel(".commentResponseList",t)).insertBefore(this._permalinkResponse,n.firstChild),this._insertResponse({returnValues:{template:e.returnValues.response}})),t.offsetTop,t.classList.add("commentHighlightTarget")):elRemove(this._permalinkComment)},_insertResponse:function(e){var t;""!==e.returnValues.template?($(e.returnValues.template).insertBefore(this._permalinkResponse),(t=this._permalinkResponse.previousElementSibling).classList.add("commentResponsePermalinkContainer"),elRemove(this._permalinkResponse),(this._permalinkResponse=t).offsetTop,t.classList.add("commentHighlightTarget")):elRemove(this._permalinkResponse)},_insertComments:function(e){var t;$(e.returnValues.template).insertBefore(this._loadNextComments),this._container.data("lastCommentTime",e.returnValues.lastCommentTime),this._permalinkComment&&(t=elData(this._permalinkComment,"object-id"),null!==elBySel('.comment[data-object-id="'+t+'"]:not(.commentPermalinkContainer)',this._container[0])&&(elRemove(this._permalinkComment),this._permalinkComment=null)),this._initComments()},_insertResponses:function(e){var t,n=this._comments[e.returnValues.commentID];$(e.returnValues.template).appendTo(n.find("ul.commentResponseList")),n.data("lastResponseTime",e.returnValues.lastResponseTime),this._handleLoadNextResponses(e.returnValues.commentID),this._permalinkResponse&&(t=elData(this._permalinkResponse,"object-id"),null!==elBySel('.commentResponse[data-object-id="'+t+'"]:not(.commentPermalinkContainer)',this._container[0])&&(elRemove(this._permalinkResponse),this._permalinkResponse=null)),null!==this._onResponsesLoaded&&this._onResponsesLoaded()},_remove:function(e){var t,n,s;e.returnValues.commentID?(this._comments[e.returnValues.commentID].remove(),delete this._comments[e.returnValues.commentID]):(t=this._responses[e.returnValues.responseID],(n=this._comments[t.parents("li.comment:eq(0)").data("commentID")]).data("responses",parseInt(n.data("responses"))-1),s=t.parent(),t.remove(),s.children().length||s.empty(),delete this._responses[e.returnValues.responseID])},_prepareEdit:function(){console.warn("This method is no longer supported.")},_keyUp:function(){console.warn("This method is no longer supported.")},_save:function(){console.warn("This method is no longer supported.")},_failure:function(){console.warn("This method is no longer supported.")},_edit:function(){console.warn("This method is no longer supported.")},_update:function(){console.warn("This method is no longer supported.")},_createGuestDialog:function(){console.warn("This method is no longer supported.")},_keyDown:function(){console.warn("This method is no longer supported.")},_submit:function(){console.warn("This method is no longer supported.")},_keyUpEdit:function(){console.warn("This method is no longer supported.")},_saveEdit:function(){console.warn("This method is no longer supported.")},_cancelEdit:function(){console.warn("This method is no longer supported.")}}),WCF.Comment.Response={}; })(this);
 
 // WCF.ImageViewer.js
-(function (window, undefined) { WCF.ImageViewer.js; })(this);
+(function (window, undefined) { "use strict";WCF.ImageViewer=Class.extend({_triggerElement:null,init:function(){this._triggerElement=$('<span class="wcfImageViewerTriggerElement" />').data("disableSlideshow",!0).hide().appendTo(document.body),this._triggerElement.wcfImageViewer({enableSlideshow:0,imageSelector:".jsImageViewerEnabled",staticViewer:!0}),WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this)),WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck(),this._rebuildImageViewer()},_rebuildImageViewer:function(){var i=$("a.jsImageViewer");i.length&&i.removeClass("jsImageViewer").addClass("jsImageViewerEnabled").click($.proxy(this._click,this))},_click:function(i){i.ctrlKey||(i.preventDefault(),i.stopPropagation(),$(i.currentTarget).closest(".popover").length||this._triggerElement.wcfImageViewer("open",null,$(i.currentTarget).wcfIdentify()))},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy(function(i,e){e.complete&&this._checkImageSize({currentTarget:e})},this)),$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(i){var e,t=$(i.currentTarget);t.is(":visible")?(t.removeClass("jsResizeImage"),t.closest(".messageSignature").length||((e=new Image).src=t.attr("src"),t.closest("div.messageText, div.messageTextPreview").width()<e.width?t.parents("a").length||(t.wrap('<a href="'+t.attr("src")+'" class="jsImageViewerEnabled embeddedImageLink" />'),t.parent().click($.proxy(this._click,this)),"right"==t.css("float")?t.parent().addClass("messageFloatObjectRight"):"left"==t.css("float")&&t.parent().addClass("messageFloatObjectLeft"),t[0].style.removeProperty("float"),t[0].style.removeProperty("margin")):t.removeClass("embeddedAttachmentLink"))):t.off("load")}}),$.widget("ui.wcfImageViewer",{_active:-1,_activeImage:null,_container:null,_didInit:!1,_disableSlideshow:!1,_eventNamespace:"",_images:[],_isMobile:!1,_isOpen:!1,_items:-1,_maxDimensions:{height:0,width:0},_proxy:null,_slideshowEnabled:!1,_thumbnailContainerWidth:0,_thumbnailMarginRight:0,_thumbnailOffset:0,_thumbnailWidth:0,_timer:null,_ui:{buttonNext:null,buttonPrevious:null,header:null,image:null,imageContainer:null,imageList:null,slideshow:{container:null,enlarge:null,next:null,previous:null,toggle:null}},options:{shiftBy:5,enableSlideshow:1,speed:5,className:"",imageSelector:"",staticViewer:!1},_create:function(){this._active=-1,this._activeImage=null,this._container=null,this._didInit=!1,this._disableSlideshow=this.element.data("disableSlideshow"),this._eventNamespace=this.element.wcfIdentify(),this._images=[],this._isMobile=!1,this._isOpen=!1,this._items=-1,this._maxDimensions={height:document.documentElement.clientHeight,width:document.documentElement.clientWidth},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._slideshowEnabled=!1,this._thumbnailContainerWidth=0,this._thumbnailMarginRight=0,this._thumbnailOffset=0,this._thumbnaiLWidth=0,this._timer=null,this._ui={},this.element.click($.proxy(this.open,this)),window.addEventListener("popstate",function(i){if(null!=i.state&&"imageViewer"===i.state.name&&i.state.container===this._eventNamespace)return this.open(i),void this.showImage(i.state.image);this.close(i)}.bind(this))},open:function(i,e){return i&&i.preventDefault(),!this._isOpen&&(i&&"popstate"===i.type||window.history.pushState({name:"imageViewer"},"",""),this.options.staticViewer?(t=this._getStaticImages(),this._initUI(),this._createThumbnails(t,!0),this._render(!0,void 0,e),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable(),$.browser.touch&&setTimeout($.proxy(function(){this._isMobile&&!this._container.hasClass("maximized")&&this._toggleView()},this),500)):0===this._images.length?this._loadNextImages(!0):(this._render(!1,this.element.data("targetImageID")),1<this._items&&this._slideshowEnabled&&this.startSlideshow(),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable()),this._bindListener(),require(["Ui/Screen"],function(i){i.pageOverlayOpen()}),!0);var t},close:function(i){if(i&&i.preventDefault(),i&&"popstate"===i.type)return!!this._isOpen&&(this._container.removeClass("open"),null!==this._timer&&this._timer.stop(),this._unbindListener(),this._isOpen=!1,WCF.System.DisableScrolling.enable(),WCF.System.DisableZoom.enable(),require(["Ui/Screen"],function(i){i.pageOverlayClose()}),!0);window.history.back()},startSlideshow:function(){return!this._disableSlideshow&&!this._slideshowEnabled&&(null===this._timer?this._timer=new WCF.PeriodicalExecuter($.proxy(function(){var i=this._active+1;i==this._items&&(i=0),this.showImage(i)},this),1e3*this.options.speed):this._timer.resume(),this._slideshowEnabled=!0,this._ui.slideshow.toggle.children("span").removeClass("fa-play").addClass("fa-pause"),!0)},stopSlideshow:function(i){return!!this._slideshowEnabled&&(this._timer.stop(),i&&this._ui.slideshow.toggle.children("span").removeClass("fa-pause").addClass("fa-play"),!(this._slideshowEnabled=!1))},_bindListener:function(){$(document).on("keydown."+this._eventNamespace,$.proxy(this._keyDown,this)),$(window).on("resize."+this._eventNamespace,$.proxy(this._renderImage,this))},_unbindListener:function(){$(document).off("keydown."+this._eventNamespace),$(window).off("resize."+this._eventNamespace)},_keyDown:function(i){switch(i.which){case $.ui.keyCode.ESCAPE:this.close();break;case $.ui.keyCode.LEFT:this._previousImage();break;case $.ui.keyCode.RIGHT:this._nextImage();break;case $.ui.keyCode.UP:this._container.hasClass("maximized")||this._toggleView();break;case $.ui.keyCode.DOWN:this._container.hasClass("maximized")&&this._toggleView();break;case $.ui.keyCode.ENTER:var e=this._ui.header.find("h1 > a");1==e.length?window.location=e.prop("href"):this._ui.slideshow.full.trigger("click");break;case 80:this._ui.slideshow.toggle.trigger("click");break;default:return!0}return!1},_render:function(i,s,t){this._container.addClass("open");var a,e,n,h=null;i&&(h=this._ui.imageList.children("li:eq(0)"),this._thumbnailMarginRight=parseInt(h.css("marginRight").replace(/px$/,""))||0,this._thumbnailWidth=h.outerWidth(!0),this._thumbnailContainerWidth=this._ui.imageList.parent().innerWidth(),1<this._items&&this.options.enableSlideshow&&!s&&!t&&this.startSlideshow()),s?this._ui.imageList.children("li").each($.proxy(function(i,e){var t=$(e);if(t.data("objectID")==s)return t.trigger("click"),this.moveToImage(t.data("index")),!1},this)):t?(a=0,$(this.options.imageSelector).each(function(i,e){if($(e).wcfIdentify()==t)return a=i,!1}),e=this._ui.imageList.children("li:eq("+a+")"),-1!==this._active&&(n=!1,this._active!=e.data("index")&&(n=!0),this._ui.images[this._activeImage].prop("src")!=this._images[this._active].image.url&&(n=!0),n&&(this._active=-1)),e.trigger("click"),this.moveToImage(e.data("index"))):null!==h&&h.trigger("click"),this._toggleButtons(),this._preload()},_preload:function(){this._images.length<this._items&&this._images.length*this._thumbnailWidth-this._thumbnailOffset<this._thumbnailContainerWidth&&this._loadNextImages(!1)},_showImage:function(i){this.showImage($(i.currentTarget).data("index"),!0)},showImage:function(i,e){if(this._active==i)return!1;this.stopSlideshow(e||!1),-1!=this._active&&this._images[this._active].listItem.removeClass("active"),this._active=i,window.history.replaceState({name:"imageViewer",container:this._eventNamespace,image:this._active},"","");var t=this._images[i];this._ui.imageList.children("li").removeClass("active"),t.listItem.addClass("active");var s=this._ui.imageContainer.getDimensions("inner"),a=this._activeImage?0:1;null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=a;var n=this._active;this._ui.imageContainer.addClass("loading"),this._ui.images[a].off("load").prop("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="),this._ui.images[a].on("load",$.proxy(function(){this._imageOnLoad(n,a)},this)),this._renderImage(a,t,s),this.options.staticViewer||this._ui.header.find("> div > a").prop("href",t.user.link).prop("title",t.user.username).children("img").prop("src",t.user.avatarURL);var h,o=WCF.String.escapeHTML(t.image.title);return t.image.link&&(o='<a href="'+t.image.link+'">'+o+"</a>"),this._ui.header.find("h1").html(o),this.options.staticViewer||(h=t.series&&t.series.title?WCF.String.escapeHTML(t.series.title):"",t.series.link&&(h='<a href="'+t.series.link+'">'+h+"</a>"),this._ui.header.find("h2").html(h)),this._ui.header.find("h3").text(WCF.Language.get("wcf.imageViewer.seriesIndex").replace(/{x}/,t.listItem.data("index")+1).replace(/{y}/,this._items)),this._ui.slideshow.full.data("link",t.image.fullURL?t.image.fullURL:t.image.url),this.moveToImage(t.listItem.data("index")),this._toggleButtons(),!0},_imageOnLoad:function(i,e){i==this._active&&(this._ui.imageContainer.removeClass("loading"),this._ui.images[e].addClass("active"),this.options.staticViewer&&this._renderImage(e,null),this.startSlideshow())},_renderImage:function(i,e,t){var s=!0;e||(i=this._activeImage,e=this._images[this._active],s=!(t={height:$(window).height()-(this._container.hasClass("maximized")||this._container.hasClass("wcfImageViewerMobile")?0:200),width:this._ui.imageContainer.innerWidth()})),t.height-=22,t.width-=20;var a,n=this._ui.images[i];n.prop("src")!==e.image.url&&n.prop("src",e.image.url),s&&n[0].complete&&n.trigger("load"),this.options.staticViewer&&!e.image.height&&n[0].complete&&($.browser.mozilla||$.browser.safari?((a=new Image).src=e.image.url,e.image.height=a.height||n[0].naturalHeight,e.image.width=a.width||n[0].naturalWidth):(n.css({height:"auto",width:"auto"}),e.image.height=n[0].height,e.image.width=n[0].width));var h=e.image.height,o=e.image.width,l=0;h>t.height&&(l=t.height/h,h=t.height,o=Math.floor(o*l)),o>t.width&&(l=t.width/o,o=t.width,h=Math.floor(h*l));var r=Math.floor((t.width-o)/2);this._ui.images[i].css({height:h+"px",left:r+10+"px",marginTop:-1*Math.round(h/2)+"px",width:o+"px"})},_initUI:function(){if(this._didInit)return!1;this._didInit=!0,this._container=$('<div class="wcfImageViewer'+(this.options.staticViewer?" wcfImageViewerStatic":"")+'" />').appendTo(document.body);var e=$("<div><img /><img /></div>").appendTo(this._container),i=$('<footer><span class="wcfImageViewerButtonPrevious icon fa-angle-double-left" /><div><ul /></div><span class="wcfImageViewerButtonNext icon fa-angle-double-right" /></footer>').appendTo(this._container),t=$("<ul />").appendTo(e),s=$('<li class="wcfImageViewerSlideshowButtonPrevious"><span class="icon icon48 fa-angle-left" /></li>').appendTo(t),a=$('<li class="wcfImageViewerSlideshowButtonToggle pointer"><span class="icon icon48 fa-play" /></li>').appendTo(t),n=$('<li class="wcfImageViewerSlideshowButtonNext"><span class="icon icon48 fa-angle-right" /></li>').appendTo(t),h=$('<li class="wcfImageViewerSlideshowButtonEnlarge pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.enlarge")+'"><span class="icon icon48 fa-expand" /></li>').appendTo(t),o=$('<li class="wcfImageViewerSlideshowButtonFull pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.full")+'"><span class="icon icon48 fa-external-link" /></li>').appendTo(t);return this._ui={buttonNext:i.children("span.wcfImageViewerButtonNext"),buttonPrevious:i.children("span.wcfImageViewerButtonPrevious"),header:$("<header><div"+(this.options.staticViewer?">":' class="box64"><a class="jsTooltip"><img /></a>')+"<div><h1 /><h2 /><h3 /></div></div></header>").appendTo(this._container),imageContainer:e,images:[e.children("img:eq(0)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",function(){$(this).removeClass("animateTransformation")}),e.children("img:eq(1)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",function(){$(this).removeClass("animateTransformation")})],imageList:i.find("> div > ul"),slideshow:{container:t,enlarge:h,full:o,next:n,previous:s,toggle:a}},this._ui.buttonNext.click($.proxy(this._next,this)),this._ui.buttonPrevious.click($.proxy(this._previous,this)),n.click($.proxy(this._nextImage,this)),s.click($.proxy(this._previousImage,this)),h.click($.proxy(this._toggleView,this)),a.click($.proxy(function(){this._items<2||(this._slideshowEnabled?this.stopSlideshow(!0):(this._disableSlideshow=!1,this.startSlideshow()))},this)),o.click(function(i){window.location=$(i.currentTarget).data("link")}),$('<span class="wcfImageViewerButtonClose icon icon48 fa-times pointer jsTooltip" title="'+WCF.Language.get("wcf.global.button.close")+'" />').appendTo(this._ui.header).click($.proxy(this.close,this)),$.browser.mobile||e.click(function(i){i.target===e[0]&&this.close()}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(i){i.on("screen-sm-down",{match:$.proxy(this._enableMobileView,this),unmatch:$.proxy(this._disableMobileView,this)})}.bind(this)),!0},_enableMobileView:function(){this._container.addClass("wcfImageViewerMobile");var t=this;this._ui.imageContainer.swipe({swipeLeft:function(i){t._container.hasClass("maximized")&&t._nextImage(i)},swipeRight:function(i){t._container.hasClass("maximized")&&t._previousImage(i)},tap:function(i,e){switch(e.tagName){case"DIV":case"IMG":t._toggleView()}}}),this._isMobile=!0},_disableMobileView:function(){this._container.removeClass("wcfImageViewerMobile"),this._ui.imageContainer.swipe("destroy"),this._isMobile=!1},_toggleView:function(){this._ui.images[this._activeImage].addClass("animateTransformation"),this._container.toggleClass("maximized"),this._ui.slideshow.enlarge.toggleClass("active").children("span").toggleClass("fa-expand").toggleClass("fa-compress"),this._renderImage(null,void 0,null)},_next:function(i,e){var t;this._ui.buttonNext.hasClass("pointer")&&(null==e&&this.stopSlideshow(!0),t=Math.max(this._items*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight,0),this._thumbnailOffset=Math.min(this._thumbnailOffset+this._thumbnailWidth*(e||this.options.shiftBy),t),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._preload(),this._toggleButtons()},_previous:function(i,e){this._ui.buttonPrevious.hasClass("pointer")&&(null==e&&this.stopSlideshow(!0),this._thumbnailOffset=Math.max(this._thumbnailOffset-this._thumbnailWidth*(e||this.options.shiftBy),0),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._toggleButtons()},_nextImage:function(i){this._ui.slideshow.next.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active+1),i&&(i.preventDefault(),i.stopPropagation()))},_previousImage:function(i){this._ui.slideshow.previous.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active-1),i&&(i.preventDefault(),i.stopPropagation()))},moveToImage:function(i){var e=(i-3)*this._thumbnailWidth,t=e+5*this._thumbnailWidth,s=this._thumbnailOffset,a=this._thumbnailOffset+this._thumbnailContainerWidth;if(e<s||a<t?!0:!1){var n=0;if(e<s){for(;e<s;)n++,s-=this._thumbnailWidth;this._previous(null,n)}else{for(;a<t;)n++,a+=this._thumbnailWidth;this._next(null,n)}}},_toggleButtons:function(){0<this._thumbnailOffset?this._ui.buttonPrevious.addClass("pointer"):this._ui.buttonPrevious.removeClass("pointer");var i=this._images.length*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight;this._thumbnailOffset>=i?this._ui.buttonNext.removeClass("pointer"):this._ui.buttonNext.addClass("pointer"),0<this._active?this._ui.slideshow.previous.addClass("pointer"):this._ui.slideshow.previous.removeClass("pointer"),this._active+1<this._images.length?this._ui.slideshow.next.addClass("pointer"):this._ui.slideshow.next.removeClass("pointer"),this._items<2?this._ui.slideshow.toggle.removeClass("pointer"):this._ui.slideshow.toggle.addClass("pointer")},_createThumbnails:function(i){this.options.staticViewer&&(this._images=[],this._ui.imageList.empty());for(var e=0,t=i.length;e<t;e++){var s=i[e],a=$('<li class="loading pointer"><img src="'+s.thumbnail.url+'" /></li>').appendTo(this._ui.imageList);a.data("index",this._images.length).data("objectID",s.objectID).click($.proxy(this._showImage,this));var n,h=a.children("img");h.get(0).complete?(a.removeClass("loading"),this.options.staticViewer&&this._fixThumbnailDimensions(h)):(n=this,h.on("load",function(){var i=$(this);i.parent().removeClass("loading"),n.options.staticViewer&&n._fixThumbnailDimensions(i)})),s.listItem=a,this._images.push(s)}},_fixThumbnailDimensions:function(i){var e=new Image;e.src=i.prop("src");var t,s=e.height,a=e.width;s==a?s=a=80:s<a?(t=80/a,a=80,s*=t):(t=80/s,s=80,a*=t),i.css({height:s+"px",width:a+"px"})},_loadNextImages:function(i){this._proxy.setOption("data",{actionName:"loadNextImages",className:this.options.className,interfaceName:"wcf\\data\\IImageViewerAction",objectIDs:[this.element.data("objectID")],parameters:{maximumHeight:this._maxDimensions.height,maximumWidth:this._maxDimensions.width,offset:this._images.length,targetImageID:i&&this.element.data("targetImageID")?this.element.data("targetImageID"):0}}),this._proxy.setOption("showLoadingOverlay",!1),this._proxy.sendRequest()},_getStaticImages:function(){var a=[];return $(this.options.imageSelector).each(function(i,e){var t=$(e),s=t.find("> img, .attachmentThumbnailImage > img").first();s.length||(s=t.parentsUntil(".formAttachmentList").last().find(".attachmentTinyThumbnail")),a.push({image:{fullURL:s.data("source")?s.data("source").replace(/\\\//g,"/"):t.prop("href"),link:"",title:t.prop("title"),url:t.prop("href")},series:null,thumbnail:{url:s.prop("src")},user:null})}),this._items=a.length,a},_success:function(i,e,t){i.returnValues.items&&(this._items=i.returnValues.items);var s=this._initUI();this._createThumbnails(i.returnValues.images);var a=i.returnValues.targetImageID?i.returnValues.targetImageID:0;this._render(s,a),this._isOpen||(this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable())}}); })(this);
 
 // WCF.Label.js
-(function (window, undefined) { WCF.Label.js; })(this);
+(function (window, undefined) { "use strict";WCF.Label={},WCF.Label.ACPList=Class.extend({_labelInput:{},_labelList:{},init:function(){},_keyPressed:function(){}}),WCF.Label.ACPList.Connect=Class.extend({init:function(){var t=$("#connect .structuredList li");t.length&&t.each($.proxy(function(t,e){$(e).find('input[type="checkbox"]').click($.proxy(this._click,this))},this))},_click:function(t){var e=$(t.currentTarget);if(e.is(":checked"))for(var i=(e=e.parents("li")).data("depth");;){if(!(e=e.next()).length)return!0;if(e.data("depth")<=i)return!0;e.find('input[type="checkbox"]').prop("checked","checked")}}}),WCF.Label.Chooser=Class.extend({_container:null,_groups:{},_showWithoutSelection:!1,init:function(a,t,e,i){if(this._container=null,this._groups={},this._showWithoutSelection=!0===i,this._initContainers(t),$.getLength(a))for(var o in a){var n=this._groups[o];n&&WCF.Dropdown.getDropdownMenu(n.wcfIdentify()).find("> ul > li:not(.dropdownDivider)").each($.proxy(function(t,e){var i=$(e),n=i.data("labelID")||0;n&&a[o]==n&&this._selectLabel(i,!0)},this))}for(var s in this._containers){var r=this._containers[s];void 0===r.data("labelID")&&r.data("labelID",0)}this._container=$(t),e?$(e).click($.proxy(this._submit,this)):this._container.is("form")&&this._container.submit($.proxy(this._submit,this))},_initContainers:function(t){function l(t){t.addEventListener("wheel",function(t){t.preventDefault()},{passive:!1})}$(t).find(".labelChooser").each($.proxy(function(t,e){var i,n,a,o,s=$(e),r=s.data("groupID");this._groups[r]||(i=s.wcfIdentify(),null===(n=WCF.Dropdown.getDropdownMenu(i))&&(WCF.Dropdown.initDropdown(s.find(".dropdownToggle")),n=WCF.Dropdown.getDropdownMenu(i)),"div"==(a=n).getTagName()&&n.children(".scrollableDropdownMenu").length&&(a=$("<ul />").appendTo(n),n=n.children(".scrollableDropdownMenu")),this._groups[r]=s,n.children("li").data("groupID",r).click($.proxy(this._click,this)),s.data("forceSelection")&&!this._showWithoutSelection||$('<li class="dropdownDivider" />').appendTo(a),this._showWithoutSelection&&l($('<li data-label-id="-1"><span><span class="badge label">'+WCF.Language.get("wcf.label.withoutSelection")+"</span></span></li>").data("groupID",r).appendTo(a).click($.proxy(this._click,this))[0]),s.data("forceSelection")||((o=$('<li data-label-id="0"><span><span class="badge label">'+WCF.Language.get("wcf.label.none")+"</span></span></li>").data("groupID",r).appendTo(a)).click($.proxy(this._click,this)),l(o[0])))},this))},_click:function(t){this._selectLabel($(t.currentTarget),!1)},_selectLabel:function(t,e){var i=this._groups[t.data("groupID")];e&&void 0!==i.data("labelID")||(t.data("labelID")?i.data("labelID",t.data("labelID")):i.data("labelID",0),t=t.find("span > span"),i.find(".dropdownToggle > span").removeClass().addClass(t.attr("class")).text(t.text()),!e&&this._container[0]&&"FORM"===this._container[0].nodeName&&null===elBySel('input:not([type="hidden"]):not([type="submit"]):not([type="reset"]), select, textarea',this._container[0])&&setTimeout(function(){this._container.trigger("submit")}.bind(this),100))},_submit:function(){var t=this._container.find(".formSubmit");for(var e in t.find('input[type="hidden"]').each(function(t,e){var i=$(e);0===i.attr("name").indexOf("labelIDs[")&&i.remove()}),this._groups){var i=this._groups[e];i.data("labelID")&&$('<input type="hidden" name="labelIDs['+e+']" value="'+i.data("labelID")+'" />').appendTo(t)}},destroy:function(){for(var t in this._groups)WCF.Dropdown.destroy(this._groups[t].wcfIdentify())}}),WCF.Label.ArticleLabelChooser=WCF.Label.Chooser.extend({_labelGroupsToCategories:null,init:function(t,e,i,n,a){this._super(e,i,n,a),this._labelGroupsToCategories=t,this._updateLabelGroups(),$("#categoryID").change($.proxy(this._updateLabelGroups,this))},_updateLabelGroups:function(){$(".labelChooser").each(function(t,e){$(e).parents("dl:eq(0)").hide()});var t=parseInt($("#categoryID").val());if(this._labelGroupsToCategories[t])for(var e=0,i=this._labelGroupsToCategories[t].length;e<i;e++)$("#labelGroup"+this._labelGroupsToCategories[t][e]).parents("dl:eq(0)").show()},_submit:function(){for(var t in this._groups)this._groups[t].is(":visible")||delete this._groups[t];this._super()}}); })(this);
 
 // WCF.Location.js
-(function (window, undefined) { WCF.Location.js; })(this);
+(function (window, undefined) { "use strict";function gm_authFailure(){WCF.System.Event.fireEvent("com.woltlab.wcf.googleMaps","authenticationFailure")}WCF.Location={},WCF.Location.Util={getLocation:function(e,t){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition(function(t){e(t.coords.latitude,t.coords.longitude)},function(){e(void 0,void 0)},{timeout:t||5e3}):e(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&require(["Ui/Screen"],function(t){t.on("screen-sm-down",{setup:$.proxy(this._addSidebarMapListener,this)})}.bind(this)),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy(function(){e.open(this._map,t)},this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;case"hybrid":default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a,n=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});return s&&n.setIcon(s),i&&(a=new google.maps.InfoWindow({content:i}),this._addInfoWindowEventListener(n,a),n.infoWindow=a),this._markers.push(n),n},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t=null,e=null,o=null,s=null;for(var i in this._markers){var a=this._markers[i],n=a.getPosition().lat(),r=a.getPosition().lng();null===t?(t=e=n,o=s=r):(n<t?t=n:e<n&&(e=n),n<o?o=n:s<r&&(s=r))}this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(t,o),new google.maps.LatLng(e,s)))},removeMarkers:function(){for(var t in this._markers)this._markers[t].setMap(null);this._markers=[]},setBounds:function(t,e){this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.latitude,e.longitude),new google.maps.LatLng(t.latitude,t.longitude)))},setCenter:function(t,e){this._map.setCenter(new google.maps.LatLng(t,e))}}),WCF.Location.GoogleMaps.LargeMap=WCF.Location.GoogleMaps.Map.extend({_actionClassName:null,_additionalParameters:{},_locationSearch:null,_locationSearchInputSelector:null,_markerClusterer:null,_objectIDs:[],_previousNorthEast:null,_previousSouthWest:null,_stringifyExcludedObjectIds:!1,init:function(t,e,o,s,i){this._stringifyExcludedObjectIds=!1,e&&e.stringifyExcludedObjectIds&&(this._stringifyExcludedObjectIds=e.stringifyExcludedObjectIds,delete e.stringifyExcludedObjectIds),this._super(t,e),this._actionClassName=o,this._locationSearchInputSelector=s||"",this._additionalParameters=i||{},this._objectIDs=[],this._locationSearchInputSelector&&(this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(s,$.proxy(this._centerMap,this))),this._markerClusterer=new MarkerClusterer(this._map,this._markers,{maxZoom:17,imagePath:WCF.Location.GoogleMaps.Settings.get("markerClustererImagePath")+"m"}),this._markerSpiderfier=new OverlappingMarkerSpiderfier(this._map,{keepSpiderfied:!0,markersWontHide:!0,markersWontMove:!0}),this._markerSpiderfier.addListener("click",$.proxy(function(t){t.infoWindow&&t.infoWindow.open(this._map,t)},this)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._previousNorthEast=null,this._previousSouthWest=null,google.maps.event.addListener(this._map,"idle",$.proxy(this._loadMarkers,this))},_addInfoWindowEventListener:function(t,e){},_centerMap:function(t){this.setCenter(t.location.lat(),t.location.lng()),$(this._locationSearchInputSelector).val(t.label)},_loadMarkers:function(){var t=this._map.getBounds().getNorthEast(),e=this._map.getBounds().getSouthWest();return!(this._previousNorthEast&&this._previousNorthEast.lat()>=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng())&&(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._stringifyExcludedObjectIds?JSON.stringify(this._objectIDs):this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),!0)},_success:function(t,e,o){if(t.returnValues&&t.returnValues.markers)for(var s in t.returnValues.markers){var i=t.returnValues.markers[s];this.addMarker(i.latitude,i.longitude,i.title,null,i.infoWindow),i.objectID?this._objectIDs.push(i.objectID):i.objectIDs&&(this._objectIDs=this._objectIDs.concat(i.objectIDs))}},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('<div class="gmnoprint googleMapsCustomControlContainer"><div class="gm-style-mtc"><div class="googleMapsCustomControl">'+WCF.Language.get("wcf.map.showLocationSuggestions")+"</div></div></div>");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a=$(i),n=$('<a class="googleMapsUseLocationSuggestionLink" />').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);a.append($("<p />").append(n));var r=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",a.get(0));return n.data("marker",r),r},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t);for(var e=[],o=0,s=this._markers.length;o<s;o++){var i=this._markers[o];i.draggable||(i.setVisible(t),t&&e.push(i))}this._markerClusterer.clearMarkers(),t&&this._markerClusterer.addMarkers(e),this._loadMarkers()}}),WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i),this.setDelay(500),this._geocoder=new google.maps.Geocoder},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.formatted_address)+"</span></li>").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy(function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null},this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){var o=0;for(var s in t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var i=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i,!0),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy(function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))},this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy(function(t){null!==t&&$(this._searchInput).val(t)},this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(o,t,e,s,i){t&&(e=t.getPosition().lat(),s=t.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(e,s);this._geocoder.geocode({latLng:a},function(t,e){e==google.maps.GeocoderStatus.OK?o(i?t:t[0].formatted_address):o(null)})}}; })(this);
 
 // WCF.Message.js
-(function (window, undefined) { WCF.Message.js; })(this);
+(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({init:function(){}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,s,i,n){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=s,this._buttonSelector=i||".jsRevertButton",this._options=$.extend({isVersionTracker:!1,versionTrackerObjectType:"",versionTrackerObjectId:0,redirectUrl:""},n),this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var t=this;this._newIDInputs.change(function(e){var s=parseInt($(this).val());"current"===$(this).val()&&(s=1/0),t._oldIDInputs.each(function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),s<=t?$(this).disable():$(this).enable()})}),this._oldIDInputs.change(function(e){var s=parseInt($(this).val());"current"===$(this).val()&&(s=1/0),t._newIDInputs.each(function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t<=s?$(this).disable():$(this).enable()})}),this._oldIDInputs.filter(":checked").change(),this._newIDInputs.filter(":checked").change()},_initElements:function(){var s=this;$(this._containerSelector).each(function(e,t){$(t).find(s._buttonSelector).click($.proxy(s._click,s))})},_click:function(e){var t,s=$(e.currentTarget);e.preventDefault(),s.data("confirmMessage")?(t=this,WCF.System.Confirmation.show(s.data("confirmMessage"),function(e){"cancel"!==e&&t._sendRequest(s)},void 0,void 0,!0)):this._sendRequest(s)},_sendRequest:function(e){this._options.isVersionTracker?(this.proxy.setOption("url",window.WSC_API_URL+"index.php?ajax-invoke/&t="+window.SECURITY_TOKEN),this.proxy.setOption("data",{actionName:"revert",className:"wcf\\system\\version\\VersionTracker",parameters:{objectType:this._options.versionTrackerObjectType,objectID:this._options.versionTrackerObjectId,versionID:$(e).data("objectID")}})):this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,s){this._options.redirectUrl?(new WCF.System.Notification).show(function(){window.location=this._options.redirectUrl}.bind(this)):window.location.reload(!0)}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit(function(){$(this).find(".formSubmit input[type=submit]").disable()});$(window).on("unload",function(){e.find(".formSubmit input[type=submit]").enable()})}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:null,_proxy:null,_previewButton:null,_previewButtonLabel:"",init:function(e,t,s){this._className=e,this._messageFieldID=$.wcfEscapeID(t),this._textarea=$("#"+this._messageFieldID),this._textarea.length?(s=$.wcfEscapeID(s),this._previewButton=$("#"+s),this._previewButton.length?(this._previewButton.click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)})):console.debug("[WCF.Message.Preview] Unable to find preview button identified by '"+s+"'")):console.debug("[WCF.Message.Preview] Unable to find message field identified by '"+this._messageFieldID+"'")},_click:function(e){var t=this._getMessage();if(null!==t)return this._proxy.setOption("data",{actionName:"getMessagePreview",className:this._className,parameters:this._getParameters(t)}),this._proxy.sendRequest(),this._previewButtonLabel=this._previewButton.html(),this._previewButton.html(WCF.Language.get("wcf.global.loading")).disable(),e.stopPropagation(),!1;console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '"+this._messageFieldID+"'")},_getParameters:function(e){var i={};return $("#settings_"+this._messageFieldID).find("input[type=checkbox]").each(function(e,t){var s=$(t);s.is(":checked")&&(i[s.prop("name")]=s.prop("value"))}),{data:{message:e},options:i}},_getMessage:function(){return this._textarea.redactor("code.get")},_success:function(e,t,s){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(e){},_failure:function(e){if(null===e||void 0===e.returnValues||void 0===e.returnValues.errorType)return!0;this._previewButton.html(this._previewButtonLabel).enable();var t=this._textarea.parent().children("small.innerError").empty();t.length||(t=$('<small class="innerError" />').appendTo(this._textarea.parent()));var s="empty"===e.returnValues.errorType?WCF.Language.get("wcf.global.form.error.empty"):e.returnValues.errorMessage;return e.returnValues.realErrorMessage&&(s=e.returnValues.realErrorMessage),t.html(s),!1}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:null,_options:{},init:function(e){if(1<arguments.length&&"string"==typeof e)throw new Error("Outdated API call, please update your implementation.");if(this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFieldID:"",previewButtonID:"",messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFieldID,this._options.previewButtonID)},_handleResponse:function(t){require(["WoltLabSuite/Core/Ui/Dialog"],function(e){e.open(this,'<div class="htmlContent">'+t.returnValues.message+"</div>")}.bind(this))},_getParameters:function(e){var t=this._super(e);for(var s in this._options)this._options.hasOwnProperty(s)&&"messageFieldID"!==s&&"previewButtonID"!==s&&(t[s]=this._options[s]);return t},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:null,init:function(e,t,s){var i;this._availableLanguages=t,this._languageID=e||0,this._languageInput=$("#languageID"),this._updateLabel(),this._languageInput.find(".dropdownMenu > li").click($.proxy(this._click,this)),s||(i=this._languageInput.find(".dropdownMenu"),$('<li class="dropdownDivider" />').appendTo(i),$('<li><span><span class="badge">'+this._availableLanguages[0]+"</span></span></li>").click($.proxy(this._disable,this)).appendTo(i)),this._languageInput.parents("form").submit($.proxy(this._submit,this))},_click:function(e){this._languageID=$(e.currentTarget).data("languageID"),this._updateLabel()},_disable:function(){this._languageID=0,this._updateLabel()},_updateLabel:function(){this._languageInput.find(".dropdownToggle > span").text(this._availableLanguages[this._languageID])},_submit:function(){this._languageInput.next("input[name=languageID]").prop("value",this._languageID)}}),WCF.Message.SmileyCategories=Class.extend({_cache:[],_proxy:null,_wysiwygSelector:"",init:function(e,t,s){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._wysiwygSelector=e,this._smiliesTabMenuId=t||"smilies-"+this._wysiwygSelector,this._formBuilderUsage=s||!1,$("#"+this._smiliesTabMenuId).on("messagetabmenushow",$.proxy(this._click,this))},_click:function(e,t){if(e.preventDefault(),this._formBuilderUsage){if(!t.activeTab.tab.children("a").prop("href").match(/#([a-zA-Z0-9_-]+)$/))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");if(!RegExp.$1.match(this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab(\\d+)Container"))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");var s=parseInt(RegExp.$1)}else s=parseInt(t.activeTab.tab.data("smileyCategoryID"));s&&(t.activeTab.container.children("ul.smileyList").length||(void 0===this._cache[s]?(this._proxy.setOption("data",{actionName:"getSmilies",className:"wcf\\data\\smiley\\category\\SmileyCategoryAction",objectIDs:[s]}),this._proxy.sendRequest()):t.activeTab.container.html(this._cache[s])))},_success:function(e,t,s){var i=parseInt(e.returnValues.smileyCategoryID);this._cache[i]=e.returnValues.template,this._formBuilderUsage?$("#"+this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab"+i+"Container").html(e.returnValues.template):$("#smilies-"+this._wysiwygSelector+"-"+i).html(e.returnValues.template)}}),WCF.Message.Smilies=Class.extend({init:function(t){require(["WoltLabSuite/Core/Ui/Smiley/Insert"],function(e){new e(t)})}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(t,e,s){require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){new e({className:this._getClassName(),containerId:t,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,quoteManager:s||null,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(e,t){},_callbackDropdownInit:function(e,t){return this._initDropdownMenu($(e).wcfIdentify(),$(t)),null},_getClassName:function(){return""}}),WCF.Message.Submit={_buttons:{},registerButton:function(e,t){WCF.Browser.isChrome()&&(this._buttons[e]=$(t))},execute:function(e){this._buttons[e]&&this._buttons[e].trigger("click")}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:null,_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:null,_quoteManager:null,_selectionChangeTimer:null,_isMouseDown:!1,init:function(e,t,s,i,n,a,o){var r;this._className=t,""!==this._className?(this._objectType=s,""!==this._objectType?(this._containerSelector=i,this._message="",this._messageBodySelector=n,this._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._selectionChangeTimer=null,this._isMouseDown=!1,this._initContainers(),o=o&&e.supportPaste(),this._initCopyQuote(o),$(document).mouseup($.proxy(this._mouseUp,this)),document.addEventListener("selectionchange",this._selectionchange.bind(this)),this._quoteManager=e,this._quoteManager.register(this._objectType,this),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Quote.Handler"+s.hashCode(),$.proxy(this._initContainers,this)),r=null,window.addEventListener("touchmove",function(){this._copyQuote[0].classList.contains("active")&&(this._copyQuote[0].classList.add("touchForceInaccessible"),null!==r&&window.clearTimeout(r),r=window.setTimeout(function(){this._copyQuote[0].classList.remove("touchForceInaccessible"),r=null}.bind(this),50))}.bind(this))):console.debug("[WCF.Message.QuoteManager] Empty object type name given, aborting.")):console.debug("[WCF.Message.QuoteManager] Empty class name given, aborting.")},_initContainers:function(){var n=this;$(this._containerSelector).each(function(e,t){var s=$(t),i=s.wcfIdentify();if(!n._containers[i]){if((n._containers[i]=s).hasClass("jsInvalidQuoteTarget"))return!0;n._messageBodySelector&&s.data("body",s.find(n._messageBodySelector).data("containerID",i)),s.mousedown($.proxy(n._mouseDown,n)),s[0].classList.add("jsQuoteMessageContainer"),n._containers[i].find(".jsQuoteMessage").click($.proxy(n._saveFullQuote,n))}})},_selectionchange:function(){if(!this._isMouseDown){if(""===this._activeContainerID){var e=window.getSelection();if(1!==e.rangeCount||e.isCollapsed)return;var t=e.getRangeAt(0),s=elClosest(t.startContainer,".jsQuoteMessageContainer"),i=elClosest(t.endContainer,".jsQuoteMessageContainer");if(s&&s===i&&!s.classList.contains("jsInvalidQuoteTarget")){var n=t.commonAncestorContainer;n.nodeType!==Node.ELEMENT_NODE&&(n=n.parentNode);var a=n.offsetParent;if(s.contains(a)&&a.scrollTop+a.clientHeight<n.offsetTop)return;this._activeContainerID=s.id}}null!==this._selectionChangeTimer&&window.clearTimeout(this._selectionChangeTimer),this._selectionChangeTimer=window.setTimeout(this._mouseUp.bind(this),100)}},_mouseDown:function(e){this._copyQuote.removeClass("active"),this._activeContainerID=e.currentTarget.classList.contains("jsInvalidQuoteTarget")?"":e.currentTarget.id,null!==this._selectionChangeTimer&&(window.clearTimeout(this._selectionChangeTimer),this._selectionChangeTimer=null),this._isMouseDown=!0},_getNodeText:function(e){function t(e){switch(e.tagName){case"BLOCKQUOTE":case"SCRIPT":return NodeFilter.FILTER_REJECT;case"IMG":if(!e.classList.contains("smiley")||0===e.alt.length)return NodeFilter.FILTER_REJECT;default:return NodeFilter.FILTER_ACCEPT}}t.acceptNode=t;for(var s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,t,!0),i="",n=[];s.nextNode();){var a,o,r,l=s.currentNode;if(l.nodeType===Node.ELEMENT_NODE)switch(l.tagName){case"A":0<(r=l.textContent).indexOf("…")&&(2!==(a=r.split(/\u2026/)).length||0===(o=l.href).indexOf(a[0])&&o.substr(-1*a[1].length)===a[1]&&(i+=o,n.push(l)));break;case"BR":case"LI":case"UL":i+="\n";break;case"TD":$.browser.msie||(i+="\n");break;case"P":i+="\n\n";break;case"IMG":i+=" "+l.alt+" ";break;case"DIV":(l.classList.contains("codeBoxHeadline")||l.classList.contains("codeBoxLine"))&&(i+="\n")}else{if("A"===l.parentNode.nodeName&&-1!==n.indexOf(l.parentNode))continue;i+=l.nodeValue.replace(/\n/g," ")}}return i},_mouseUp:function(e){if(e&&e.originalEvent instanceof Event&&(null!==this._selectionChangeTimer&&(window.clearTimeout(this._selectionChangeTimer),this._selectionChangeTimer=null),this._isMouseDown=!1),""!==this._activeContainerID){var t=window.getSelection();if(1!==t.rangeCount||t.isCollapsed)this._copyQuote.removeClass("active");else{for(var s,i,n,a,o,r,l,c,u,h,d,_=(g=this._containers[this._activeContainerID]).data("objectID"),g=g.data("body")||g,p=t.anchorNode;p&&p!==g[0];)p=p.parentNode;p===g[0]?(s=this._getSelectedText(),""!==(i=$.trim(s))?(a=(n=t.getRangeAt(0)).startContainer.nodeType===Node.TEXT_NODE?n.startContainer.parentNode:n.startContainer,o=n.endContainer.nodeType===Node.TEXT_NODE?n.endContainer.parentNode:n.endContainer,a.closest("blockquote")||o.closest("blockquote")?this._copyQuote.removeClass("active"):(r=this._getNodeText(g[0]),-1!==this._normalize(r).indexOf(this._normalize(i))&&(this._copyQuote.addClass("active"),l=this._getBoundingRectangle(g,window.getSelection()),c=this._copyQuote.getDimensions("outer"),(u=(l.right-l.left)/2-c.width/2+l.left)<(h=g[0].getBoundingClientRect()).left?u=h.left:u+c.width>h.right&&(u=h.right-c.width),this._copyQuote.css({top:l.bottom+7+"px",left:u+"px"}),this._copyQuote.removeClass("active"),null===this._selectionChangeTimer?this._activeContainerID="":(window.clearTimeout(this._selectionChangeTimer),this._selectionChangeTimer=null),d=this,window.setTimeout(function(){var e=$.trim(d._getSelectedText());""!==e&&(d._copyQuote.addClass("active"),d._message=e,d._objectID=_)},10)))):this._copyQuote.removeClass("active")):this._copyQuote.removeClass("active")}}else this._copyQuote.removeClass("active")},_normalize:function(e){return e.replace(/\r?\n|\r/g,"\n").replace(/\s/g," ").replace(/\s{2,}/g," ")},_getBoundingRectangle:function(e,t){var s,i,n=null;return 0<t.rangeCount&&(s=t.getRangeAt(0).getBoundingClientRect(),i=$(document).scrollTop(),n={bottom:s.bottom+i,left:s.left,right:s.right,top:s.top+i}),n},_initCopyQuote:function(e){var t;this._copyQuote=$("#quoteManagerCopy"),this._copyQuote.length||(this._copyQuote=$('<div id="quoteManagerCopy" class="balloonTooltip interactive"><span class="jsQuoteManagerStore">'+WCF.Language.get("wcf.message.quote.quoteSelected")+"</span></div>").appendTo(document.body),t=this._copyQuote.children("span.jsQuoteManagerStore").click($.proxy(this._saveQuote,this)),e&&$('<span class="jsQuoteManagerQuoteAndInsert">'+WCF.Language.get("wcf.message.quote.quoteAndReply")+"</span>").click($.proxy(this._saveAndInsertQuote,this)).insertAfter(t))},_getSelectedText:function(){var e=window.getSelection();return e.rangeCount?this._getNodeText(e.getRangeAt(0).cloneContents()):""},_saveFullQuote:function(e){e.preventDefault();var t=$(e.currentTarget);this._proxy.setOption("data",{actionName:"saveFullQuote",className:this._className,interfaceName:"wcf\\data\\IMessageQuoteAction",objectIDs:[t.data("objectID")]}),this._proxy.sendRequest(),t.data("isQuoted")?t.data("isQuoted",!1).children("a").removeClass("active"):t.data("isQuoted",!0).children("a").addClass("active");var s=t.parents(".buttonGroupNavigation");s.hasClass("jsMobileButtonGroupNavigation")&&s.children(".dropdownLabel").trigger("click")},_saveQuote:function(e){this._proxy.setOption("data",{actionName:"saveQuote",className:this._className,interfaceName:"wcf\\data\\IMessageQuoteAction",objectIDs:[this._objectID],parameters:{message:this._message,renderQuote:!0===e}}),this._proxy.sendRequest()},_saveAndInsertQuote:function(){this._saveQuote(!0)},_success:function(e){var t;switch(void 0!==e.returnValues.count&&(void 0!==e.returnValues.fullQuoteMessageIDs&&(e.returnValues.fullQuoteObjectIDs=e.returnValues.fullQuoteMessageIDs),t=void 0!==e.returnValues.fullQuoteObjectIDs?e.returnValues.fullQuoteObjectIDs:{},this._quoteManager.updateCount(e.returnValues.count,t)),e.actionName){case"saveQuote":case"saveFullQuote":e.returnValues.renderedQuote&&WCF.System.Event.fireEvent("com.woltlab.wcf.message.quote","insert",{forceInsert:"saveQuote"===e.actionName,quote:e.returnValues.renderedQuote})}},updateFullQuoteObjectIDs:function(i){for(var e in this._containers)this._containers[e].find(".jsQuoteMessage").each(function(e,t){var s=$(t).data("isQuoted",0);s.children("a").removeClass("active"),WCF.inArray(s.data("objectID"),i)&&s.data("isQuoted",1).children("a").addClass("active")})}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:null,_editorId:"",_editorIdAlternative:"",_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_supportPaste:!1,_supportPasteOverride:!1,init:function(e,t,s,i){var n;this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorId="",this._editorIdAlternative="",this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._supportPaste=!1,this._supportPasteOverride=!1,!t||(n=$("#"+t)).length&&(this._editorId=t,this._supportPaste=!0,this._form=n.parents("form:eq(0)"),this._form.length?(this._form.submit(this._submit.bind(this)),this._removeOnSubmit=i||[]):(this._form=null,this._supportPaste=!0===s)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?message-quote/&t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.quote","reload",this.countQuotes.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertQuote_"+(this._editorIdAlternative?this._editorIdAlternative:this._editorId),{author:e.quote.username,content:e.quote.text,isText:!e.quote.isFullQuote,link:e.quote.link})}.bind(this))},setAlternativeEditor:function(e){this._editorIdAlternative||this._supportPaste||(this._hasTemplate=!1,this._supportPaste=!0,this._supportPasteOverride=!0),"object"==typeof e&&(e=e[0].id),this._editorIdAlternative=e},clearAlternativeEditor:function(){this._supportPasteOverride&&(this._hasTemplate=!1,this._supportPaste=!1,this._supportPasteOverride=!1),this._editorIdAlternative=""},register:function(e,t){this._handlers[e]=t},updateCount:function(e,t){for(var s in this._count=parseInt(e)||0,this._toggleShowQuotes(),this._handlers){var i;this._handlers.hasOwnProperty(s)&&(i=t[s]||[],this._handlers[s].updateFullQuoteObjectIDs(i))}},insertQuotes:function(e,t,s){this._insertQuotes?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:s}):this._insertQuotes=!0},_toggleShowQuotes:function(){require(["WoltLabSuite/Core/Ui/Page/Action"],function(e){var t,s="showQuotes";this._count?(void 0===(t=e.get(s))&&((t=elCreate("a")).addEventListener("mousedown",this._click.bind(this)),e.add(s,t)),t.textContent=WCF.Language.get("wcf.message.quote.showQuotes",{count:this._count}),e.show(s)):e.remove(s),this._hasTemplate=!1}.bind(this))},_click:function(){var e=document.activeElement;e.classList.contains("redactor-layer")&&$("#"+elData(e,"element-id")).redactor("selection.save"),this._hasTemplate?this._dialog.wcfDialog("open"):(this._proxy.showLoadingOverlayOnce(),this._proxy.setOption("data",{actionName:"getQuotes",supportPaste:this._supportPaste}),this._proxy.sendRequest())},renderDialog:function(e){null===this._dialog&&(this._dialog=$("#messageQuoteList"),this._dialog.length||(this._dialog=$('<div id="messageQuoteList" />').hide().appendTo(document.body))),this._dialog.html(e);var t=$('<div class="formSubmit" />').appendTo(this._dialog);this._supportPaste&&(this._buttons.insert=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.message.quote.insertAllQuotes")+"</button>").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$("<button>"+WCF.Language.get("wcf.message.quote.removeAllQuotes")+"</button>").click($.proxy(this._removeSelected,this)).appendTo(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.quote.manageQuotes")}),this._dialog.wcfDialog("render"),this._hasTemplate=!0;var i,s=this._dialog.find(".jsInsertQuote");this._supportPaste?s.click($.proxy(this._insertQuote,this)):s.hide(),this._dialog.find("input.jsCheckbox").change($.proxy(this._changeButtons,this)),this._removeOnSubmit.length&&(i=this)._dialog.find("input.jsRemoveQuote").each(function(e,t){var s=$(t).change($.proxy(this._change,this));WCF.inArray(s.parent("li").attr("data-quote-id"),i._removeOnSubmit)&&s.attr("checked","checked")})},_changeButtons:function(){this._dialog.find("input.jsCheckbox:checked").length?(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertSelectedQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeSelectedQuotes"))):(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertAllQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeAllQuotes")))},_change:function(e){var t,s=$(e.currentTarget),i=s.parent("li").attr("data-quote-id");s.prop("checked")?this._removeOnSubmit.push(i):-1!==(t=this._removeOnSubmit.indexOf(i))&&this._removeOnSubmit.splice(t,1)},_insertSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),this._dialog.find("input.jsCheckbox:checked").each($.proxy(function(e,t){this._insertQuote(null,t)},this)),this._dialog.wcfDialog("close")},_insertQuote:function(e,t){var s=$(e?e.currentTarget:t).parents("li:eq(0)"),i=s.children(".jsFullQuote")[0].textContent.trim(),n=s.parents(".message:eq(0)"),a=n.data("username"),o=n.data("link"),r=!elDataBool(s[0],"is-full-quote");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertQuote_"+(this._editorIdAlternative?this._editorIdAlternative:this._editorId),{author:a,content:i,isText:r,link:o}),this._removeOnSubmit.push(s.data("quote-id")),null!==e&&this._dialog.wcfDialog("close")},_removeSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked");var s=[];if(this._dialog.find("input.jsCheckbox:checked").each(function(e,t){s.push($(t).parents("li").attr("data-quote-id"))}),s.length){var e=[];for(var t in this._handlers)this._handlers.hasOwnProperty(t)&&e.push(t);this._proxy.setOption("data",{actionName:"remove",getFullQuoteObjectIDs:0<this._handlers.length,objectTypes:e,quoteIDs:s}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")}},_submit:function(){if(this._supportPaste&&0<this._removeOnSubmit.length)for(var e=this._form.find(".formSubmit"),t=0,s=this._removeOnSubmit.length;t<s;t++)$('<input type="hidden" name="__removeQuoteIDs[]" value="'+this._removeOnSubmit[t]+'" />').appendTo(e)},getQuotesMarkedForRemoval:function(){return this._removeOnSubmit},markQuotesForRemoval:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"markForRemoval",quoteIDs:this._removeOnSubmit}),this._proxy.suppressErrors(),this._proxy.sendRequest())},removeMarkedQuotes:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"removeMarkedQuotes",getFullQuoteObjectIDs:0<this._handlers.length}),this._proxy.sendRequest())},countQuotes:function(){var e=[];for(var t in this._handlers)this._handlers.hasOwnProperty(t)&&e.push(t);this._proxy.setOption("data",{actionName:"count",getFullQuoteObjectIDs:0<e.length,objectTypes:e}),this._proxy.sendRequest()},_success:function(e){var t;null!==e&&(void 0!==e.count&&(t=void 0!==e.fullQuoteObjectIDs?e.fullQuoteObjectIDs:{},this.updateCount(e.count,t)),void 0!==e.template&&(""==$.trim(e.template)?this.updateCount(0,{}):this.renderDialog(e.template)))},supportPaste:function(){return this._supportPaste}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){e.preventDefault();var t,s,i=$(e.currentTarget),n=i.prop("href"),a=i.data("linkTitle")?i.data("linkTitle"):n,o=n.hashCode();void 0===this._cache[o]?(t=!1,null===this._dialog?(this._dialog=$('<div id="shareContentDialog" />').hide().appendTo(document.body),t=!0):this._dialog.empty(),s=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalink" class="long" readonly />').attr("value",n).appendTo(s),s=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly />').attr("value","[url='"+n+"']"+a+"[/url]").appendTo(s),s=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkHTML" class="long" readonly />').attr("value",'<a href="'+n+'">'+WCF.String.escapeHTML(a)+"</a>").appendTo(s),""!==this._shareButtonsTemplate&&(s=$('<section class="section"><h2 class="sectionTitle">'+WCF.Language.get("wcf.message.share")+"</h2>"+this._shareButtonsTemplate+"</section>").appendTo(this._dialog),elData(s.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(n))),this._cache[o]=this._dialog.html(),t?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[o]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click(function(){$(this).select()});navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown(function(){return!1}).removeAttr("readonly").click(function(){this.setSelectionRange(0,9999)})}}),WCF.Message.Share.Page=Class.extend({init:function(){require(["WoltLabSuite/Core/Ui/Message/Share"],function(e){e.init()})}}),WCF.Message.UserMention=Class.extend({init:function(){throw new Error("Support for mentions in Redactor are now enabled by adding the attribute 'data-support-mention=\"true\"' to the textarea element.")}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var s=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),e=this.element.find("> div, > fieldset");if(s.length==e.length){var i=this.element.data("preselect");e.each(function(e,t){if(null!==elBySel(".innerError",t))return i=$(s[e]).data("name"),!1}),"true"===i&&(i=!0),this._tabs=[],this._tabsByName={};for(var t=0;t<s.length;t++){var n,a=$(s[t]),o=$(e[t]),r=a.data("name");void 0===r&&(void 0!==(n=a.children("a").prop("href"))&&n.match(/#([a-zA-Z_-]+)$/)&&(r=RegExp.$1),void 0===r&&(r=a.wcfIdentify())),this._tabs.push({container:o,name:r,tab:a}),this._tabsByName[r]=t;var l=a.children("a").data("index",t).on("mousedown",this._showTab.bind(this));l.attr("role","button").attr("tabindex","0").attr("aria-haspopup",!0).attr("aria-expanded",!1).attr("aria-controls",o[0].id),l.on("keydown",function(e){13!==e.which&&32!==e.which||(e.preventDefault(),this._showTab(e))}.bind(this)),(i===r||!0===i&&0===t)&&l.trigger("mousedown")}!0===i&&this._tabs.length&&!window.matchMedia("(max-width: 544px)").matches&&this._tabs[0].tab.children("a").trigger("click");var c=this.element.data("collapsible");void 0!==c&&(this.options.collapsible=c);var u=elData(this.element[0],"wysiwyg-container-id");u&&WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+u,function(){for(var e=0,t=this._tabs.length;e<t;e++)this._tabs[e].container.removeClass("active"),this._tabs[e].tab.removeClass("active")}.bind(this))}else console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.")},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,s){var i=null===e?t:$(e.currentTarget).data("index");s=!this.options.collapsible||!0===s;for(var n=null,a=0;a<this._tabs.length;a++){var o=this._tabs[a];if(a==i){if(!o.tab.hasClass("active")){o.tab.addClass("active"),o.container.addClass("active"),(n=o).tab.children("a").attr("aria-expanded",!0);var r,l=o.container[0];null!==elBySel(".messageTabMenuContent.active",l)||null===elBySel(".messageTabMenuContent",l)||null!==(r=elBySel("nav > ul > li[data-name] > a",l))&&$(r).trigger("mousedown");continue}if(!0===s)continue}o.tab.removeClass("active"),o.container.removeClass("active"),o.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==n&&this._trigger("show",{},{activeTab:n}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
 
 // WCF.Poll.js
-(function (window, undefined) { WCF.Poll.js; })(this);
+(function (window, undefined) { "use strict";WCF.Poll={},WCF.Poll.Management=Class.extend({_container:null,_count:0,_editorId:"",_maxOptions:0,init:function(e,t,i,n,o){this._count=0,this._maxOptions=i||-1,this._container=$("#"+e).children("ol:eq(0)"),this._fieldName=o||"pollOptions",this._container.length?(t=t||[],this._createOptionList(t),n?(this._editorId=n,WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+n,this._reset.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","submit_"+n,this._submit.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+n,this._validate.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","handleError_"+n,this._handleError.bind(this))):this._container.closest("form").submit($.proxy(this._submit,this)),require(["WoltLabSuite/Core/Ui/Sortable/List"],function(t){new t({containerId:e,options:{toleranceElement:"> div"}})})):console.debug("[WCF.Poll.Management] Invalid container id given, aborting.")},_createOptionList:function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e];this._createOption(n.optionValue,n.optionID)}t.length<this._maxOptions&&this._createOption()},_createOption:function(t,e,i){t=t||"",e=parseInt(e)||0,i=i||null;var n=$('<li class="sortableNode" />').data("optionID",e);null===i?n.appendTo(this._container):n.insertAfter(i);var o=$('<div class="pollOptionInput" />').appendTo(n);$('<span class="icon icon16 fa-arrows sortableNodeHandle" />').appendTo(o),$('<a role="button" href="#" class="icon icon16 fa-plus jsTooltip jsAddOption pointer" title="'+WCF.Language.get("wcf.poll.button.addOption")+'" />').click($.proxy(this._addOption,this)).appendTo(o),$('<a role="button" href="#" class="icon icon16 fa-times jsTooltip jsDeleteOption pointer" title="'+WCF.Language.get("wcf.poll.button.removeOption")+'" />').click($.proxy(this._removeOption,this)).appendTo(o);var s=$('<input type="text" value="'+t+'" maxlength="255" />').keydown($.proxy(this._keyDown,this)).appendTo(o);s.click(function(){document.activeElement!==this&&this.focus()}),null!==i&&s.focus(),WCF.DOMNodeInsertedHandler.execute(),this._count++,this._count===this._maxOptions&&this._container.find("span.jsAddOption").removeClass("pointer").addClass("disabled")},_keyDown:function(t){13===t.which&&($(t.currentTarget).parent().children(".jsAddOption").trigger("click"),t.preventDefault())},_addOption:function(t){if(t.preventDefault(),this._count===this._maxOptions)return!1;var e=$(t.currentTarget).closest("li",this._container[0]);this._createOption(void 0,void 0,e)},_removeOption:function(t){t.preventDefault(),$(t.currentTarget).closest("li",this._container[0]).remove(),this._count--,this._container.find("span.jsAddOption").addClass("pointer").removeClass("disabled"),0==this._container.children("li").length&&this._createOption()},_submit:function(i){var o=[];if(this._container.children("li").each(function(t,e){var i=$(e),n=$.trim(i.find("input").val());""!=n&&o.push(i.data("optionID")+"_"+n)}),"object"==typeof i.originalEvent&&i.originalEvent instanceof Event){if(o.length)for(var t=this._container.parents("form").find(".formSubmit"),e=0,n=o.length;e<n;e++)$('<input type="hidden" name="'+this._fieldName+"["+e+']">').val(o[e]).appendTo(t)}else i.poll={pollOptions:o},this._container.parents(".messageTabMenuContent:eq(0)").find("input").each(function(t,e){e.name&&("checkbox"===e.type&&!e.checked||(i.poll[e.name]=e.value))})},_reset:function(){for(var t=this._container[0];1<t.childElementCount;)t.removeChild(t.children[1]);elBySel("input",t.children[0]).value="",this._container.parents(".messageTabMenuContent:eq(0)").find("input").each(function(t,e){e.name&&("checkbox"===e.type?e.checked=!1:"text"===e.type?e.value="":"number"===e.type&&(e.value=e.min))}),require(["WoltLabSuite/Core/Date/Picker"],function(t){t.clear("pollEndTime_"+this._editorId)}.bind(this))},_validate:function(t){var e,i,n;""!==elById("pollQuestion_"+this._editorId).value.trim()&&(e=0,elBySelAll('li input[type="text"]',this._container[0],function(t){""!==t.value.trim()&&e++}),0===e?(t.api.throwError(this._container[0],WCF.Language.get("wcf.global.form.error.empty")),t.valid=!1):(n=~~(i=elById("pollMaxVotes_"+this._editorId)).value)&&e<n&&(t.api.throwError(i,WCF.Language.get("wcf.poll.maxVotes.error.invalid")),t.valid=!1))},_handleError:function(t){switch(t.returnValues.fieldName){case"pollEndTime":case"pollMaxVotes":var e="pollEndTime"===t.returnValues.fieldName?"endTime":"maxVotes",i=elCreate("small");i.className="innerError",i.innerHTML=WCF.Language.get("wcf.poll."+e+".error."+t.returnValues.errorType);var n=elById(t.returnValues.fieldName+"_"+this._editorId),o=n.parentElement;o.classList.contains("inputAddon")&&(o=(n=o).parentElement),o.insertBefore(i,n.nextSibling),t.cancel=!0}}}),WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(t){var o,e=$(t);e.length?(this._cache={},this._canViewParticipants={},this._canViewResult={},this._inputElements={},this._participants={},this._polls={},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),url:"index.php?poll/&t="+SECURITY_TOKEN}),o=this,e.each(function(t,e){var i=$(e),n=i.data("pollID");void 0===o._polls[n]&&(o._cache[n]={result:"",vote:""},o._polls[n]=i,o._canViewParticipants[n]=!!i.data("canViewParticipants"),o._canViewResult[n]=!!i.data("canViewResult"),o._canVote[n]=!!i.data("canVote"),o._bindListeners(n),i.data("inVote")&&o._prepareVote(n),o._toggleButtons(n))})):console.debug("[WCF.Poll.Manager] Given selector '"+t+"' does not match, aborting.")},_bindListeners:function(t){this._polls[t].find(".jsButtonPollShowParticipants").data("pollID",t).click($.proxy(this._showParticipants,this)),this._polls[t].find(".jsButtonPollShowResult").data("pollID",t).click($.proxy(this._showResult,this)),this._polls[t].find(".jsButtonPollShowVote").data("pollID",t).click($.proxy(this._showVote,this)),this._polls[t].find(".jsButtonPollVote").data("pollID",t).click($.proxy(this._vote,this))},_showResult:function(t,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canViewResult[i]&&this._polls[i].data("inVote")&&(this._cache[i].result?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].result),this._polls[i].data("inVote",!1),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getResult",pollID:i}),this._proxy.sendRequest()))},_showParticipants:function(t){var e=$(t.currentTarget).data("pollID");this._participants[e]||(this._participants[e]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[e].data("question"),{pollID:e})),this._participants[e].open()},_showVote:function(t,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canVote[i]&&(this._polls[i].data("inVote")||(this._cache[i].vote?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].vote),this._polls[i].data("inVote",!0),this._prepareVote(i),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getVote",pollID:i}),this._proxy.sendRequest())))},_success:function(t,e,i){if(t&&t.actionName){var n=t.pollID;switch(t.resultTemplate&&(this._cache[n].result=t.resultTemplate),t.voteTemplate&&(this._cache[n].vote=t.voteTemplate),t.actionName){case"getResult":this._showResult(null,n);break;case"getVote":this._showVote(null,n);break;case"vote":this._canViewResult[n]=!0,this._canVote[n]=!!t.canVote,this._polls[n].data("isPublic")&&(this._canViewParticipants[n]=!0);var o=elBySel(".jsPollTotalVotes",this._polls[n][0]);o.textContent=WCF.String.formatNumeric(t.totalVotes),elData(o,"tooltip",t.totalVotesTooltip),this._showResult(null,n)}}},_prepareVote:function(t){this._polls[t].find(".jsButtonPollVote").disable();var e=this._polls[t].find(".pollInnerContainer > .jsPollVote"),i=this;this._inputElements[t]=e.find("input").change(function(){i._handleVoteButton(t)}),this._handleVoteButton(t);var n=e.data("maxVotes");this._inputElements[t].filter("[type=checkbox]").length&&(this._inputElements[t].change(function(){i._enforceMaxVotes(t,n)}),this._enforceMaxVotes(t,n))},_enforceMaxVotes:function(t,e){var i=this._inputElements[t];i.filter(":checked").length==e?i.filter(":not(:checked)").disable():i.enable()},_handleVoteButton:function(t){var e=this._inputElements[t],i=this._polls[t].find(".jsButtonPollVote");e.filter(":checked").length?i.enable():i.disable()},_toggleButtons:function(t){var e=this._polls[t].children(".formSubmit");e.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide();var i=!0;this._polls[t].data("inVote")?(i=!1,e.find(".jsButtonPollVote").show(),this._canViewResult[t]&&e.find(".jsButtonPollShowResult").show()):(this._canVote[t]&&(i=!1,e.find(".jsButtonPollShowVote").show()),this._canViewParticipants[t]&&(i=!1,e.find(".jsButtonPollShowParticipants").show())),i&&e.hide()},_vote:function(t){var n,e=$(t.currentTarget).data("pollID");this._canVote[e]&&(n=[],this._inputElements[e].each(function(t,e){var i=$(e);i.is(":checked")&&n.push(i.data("optionID"))}),n.length&&(this._proxy.setOption("data",{actionName:"vote",optionIDs:n,pollID:e}),this._proxy.sendRequest()))}}); })(this);
 
 // WCF.Search.Message.js
-(function (window, undefined) { WCF.Search.Message.js; })(this);
+(function (window, undefined) { "use strict";WCF.Search.Message={},WCF.Search.Message.KeywordList=WCF.Search.Base.extend({_className:"wcf\\data\\search\\keyword\\SearchKeywordAction",_divider:null,_forceSubmit:!1,init:function(e,i,s){var t,r;$.isFunction(i)?(this._callback=i,this._excludedSearchValues=[],s&&(this._excludedSearchValues=s),this._searchInput=$(e).keyup($.proxy(this._keyUp,this)).keydown($.proxy(function(e){13===e.which&&this._itemCount&&-1!==this._itemIndex&&e.preventDefault()},this)),r=(t=WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify())).find("li.dropdownDivider").last(),this._divider=$('<li class="dropdownDivider" />').hide().insertBefore(r),this._list=$('<li class="dropdownList"><ul /></li>').hide().insertBefore(r).children("ul"),t.find("input, label").on("click",function(e){e.stopPropagation()}),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)})):console.debug("[WCF.Search.Message.KeywordList] The given callback is invalid, aborting.")},_createListItem:function(e){this._divider.show(),this._list.parent().show(),this._super(e)},_clearList:function(e){e&&this._searchInput.val(""),this._divider.hide(),this._list.empty().parent().hide(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1}}); })(this);
 
 // WCF.User.js
-(function (window, undefined) { WCF.User.js; })(this);
+(function (window, undefined) { "use strict";WCF.User.Login=Class.extend({_loginSubmitButton:null,_password:null,_passwordContainer:null,_useCookies:null,_useCookiesContainer:null,init:function(t){this._loginSubmitButton=$("#loginSubmitButton"),this._password=$("#password"),this._passwordContainer=this._password.parents("dl"),this._useCookies=$("#useCookies"),this._useCookiesContainer=this._useCookies.parents("dl"),$("#loginForm").find("input[name=action]").change($.proxy(this._change,this)),t&&WCF.User.QuickLogin.init()},_change:function(t){"register"===$(t.currentTarget).val()?this._setState(!1,WCF.Language.get("wcf.user.button.register")):this._setState(!0,WCF.Language.get("wcf.user.button.login"))},_setState:function(t,e){t?(this._password.enable(),this._passwordContainer.removeClass("disabled"),this._useCookies.enable(),this._useCookiesContainer.removeClass("disabled")):(this._password.disable(),this._passwordContainer.addClass("disabled"),this._useCookies.disable(),this._useCookiesContainer.addClass("disabled")),this._loginSubmitButton.val(e)}}),WCF.User.Panel={},WCF.User.Panel.Abstract=Class.extend({_badge:null,_dropdown:null,_identifier:"",_loadData:!0,_markAllAsReadLink:null,_options:{},_proxy:null,_triggerElement:null,_button:null,_callbackFocus:null,_callbackCloseUuid:"",_wasInsideDropdown:!1,init:function(t,e,i){var s;this._dropdown=null,this._loadData=!0,this._identifier=e,this._triggerElement=t,this._options=i,this._callbackFocus=null,this._callbackCloseUuid="",this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._triggerElement.click($.proxy(this.toggle,this)),this._button=elBySel("a",this._triggerElement[0]),this._button&&(elAttr(this._button,"role","button"),elAttr(this._button,"tabindex","0"),elAttr(this._button,"aria-haspopup",!0),elAttr(this._button,"aria-expanded",!1)),this._options.showAllLink&&this._triggerElement.dblclick($.proxy(this._dblClick,this)),!0===this._options.staticDropdown?this._loadData=!1:(s=this._triggerElement.find("span.badge")).length&&(this._badge=s)},toggle:function(t){return t instanceof Event&&t.preventDefault(),null===this._dropdown&&(this._dropdown=this._initDropdown()),this._dropdown.toggle()?(this._loadData||null===this._badge||!parseInt(this._badge.text())||this._dropdown.getItemList().children(".interactiveDropdownItemOutstanding").length||(this._loadData=!0),this._loadData&&(this._loadData=!1,this._load()),elAttr(this._button,"aria-expanded",!0),null===this._callbackFocus&&(this._callbackFocus=this._maintainFocus.bind(this)),document.body.addEventListener("focus",this._callbackFocus,{capture:!0}),this._callbackCloseUuid=WCF.System.Event.addListener("WCF.Dropdown.Interactive.Instance","close",function(t){t.instance===this._dropdown&&(WCF.System.Event.removeListener("WCF.Dropdown.Interactive.Instance","close",this._callbackCloseUuid),document.body.removeEventListener("focus",this._callbackFocus,{capture:!0}))}.bind(this))):(elAttr(this._button,"aria-expanded",!1),WCF.System.Event.removeListener("WCF.Dropdown.Interactive.Instance","close",this._callbackCloseUuid),document.body.removeEventListener("focus",this._callbackFocus,{capture:!0})),!1},_dblClick:function(t){return t.preventDefault(),window.location=this._options.showAllLink,!1},_initDropdown:function(){var t=WCF.Dropdown.Interactive.Handler.create(this._triggerElement,this._identifier,this._options);return $('<li class="loading"><span class="icon icon24 fa-spinner" /> <span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t.getItemList()),t},_load:function(){},_success:function(t){var e,i,s;void 0!==t.returnValues.template&&(e=this._dropdown.getItemList().empty(),$(t.returnValues.template).appendTo(e),e.children().length||$('<li class="noItems">'+this._options.noItems+"</li>").appendTo(e),this._options.enableMarkAsRead&&(i=this._dropdown.getItemList().children(".interactiveDropdownItemOutstanding"),null===this._markAllAsReadLink&&i.length&&(this._markAllAsReadLink=$('<li class="interactiveDropdownItemMarkAllAsRead"><a href="#" title="'+WCF.Language.get("wcf.user.panel.markAllAsRead")+'" class="jsTooltip"><span class="icon icon24 fa-check" /></a></li>').appendTo(this._dropdown.getLinkList())).click(function(t){return this._dropdown.close(),this._markAllAsRead(),!1}.bind(this)),i.each(function(t,e){var i=$(e).addClass("interactiveDropdownItemOutstandingIcon"),s=i.data("objectID");$('<div class="interactiveDropdownItemMarkAsRead"><a href="#" title="'+WCF.Language.get("wcf.user.panel.markAsRead")+'" class="jsTooltip"><span class="icon icon16 fa-check" /></a></div>').appendTo(i).click(function(t){return this._markAsRead(t,s),!1}.bind(this))}.bind(this))),this._dropdown.getItemList().children().each(function(t,e){var i=$(e),s=i.data("link");s&&($.browser.msie?i.click(function(t){if("A"!==t.target.tagName)return window.location=s,!1}):(i.addClass("interactiveDropdownItemShadow"),$('<a href="'+s+'" class="interactiveDropdownItemShadowLink" />').appendTo(i)),i.data("linkReplaceAll")&&i.find("> .box48 a:not(.userLink)").prop("href",s))}),this._dropdown.rebuildScrollbar()),void 0!==t.returnValues.totalCount&&this.updateBadge(t.returnValues.totalCount),this._options.enableMarkAsRead&&(t.returnValues.markAsRead?(s=this._dropdown.getItemList().children("li[data-object-id="+t.returnValues.markAsRead+"]")).length&&(s.removeClass("interactiveDropdownItemOutstanding").data("isRead",!0),s.children(".interactiveDropdownItemMarkAsRead").remove()):t.returnValues.markAllAsRead&&(this.resetItems(),this.updateBadge(0)))},_markAsRead:function(t,e){},_markAllAsRead:function(){},updateBadge:function(t){(t=parseInt(t)||0)?(null===this._badge&&(this._badge=$('<span class="badge badgeUpdate" />').appendTo(this._triggerElement.children("a")),this._badge.before(" ")),this._badge.text(t)):null!==this._badge&&(this._badge.remove(),this._badge=null),this._options.enableMarkAsRead&&(t||null===this._markAllAsReadLink||(this._markAllAsReadLink.remove(),this._markAllAsReadLink=null)),WCF.System.Event.fireEvent("com.woltlab.wcf.userMenu","updateBadge",{count:t,identifier:this._identifier})},resetItems:function(){null!==this._dropdown&&(this._dropdown.resetItems(),this._loadData=!0)},_maintainFocus:function(t){var e;document.activeElement&&!document.activeElement.classList.contains("focus-visible")||((e=this._dropdown.getContainer()[0]).contains(t.target)?this._wasInsideDropdown=!0:this._wasInsideDropdown?(this._button.focus(),this._wasInsideDropdown=!1):elBySel("a",e).focus())}}),WCF.User.Panel.Notification=WCF.User.Panel.Abstract.extend({_favico:null,init:function(t){t.enableMarkAsRead=!0,this._super($("#userNotifications"),"userNotifications",t);try{var e;this._favico=new Favico({animation:"none",type:"circle"}),null!==this._badge&&(e=parseInt(this._badge.text())||0,this._favico.badge(e))}catch(t){console.debug("[WCF.User.Panel.Notification] Failed to initialized Favico: "+t.message)}WCF.System.PushNotification.addCallback("userNotificationCount",$.proxy(this.updateUserNotificationCount,this)),require(["EventHandler"],function(t){t.add("com.woltlab.wcf.UserMenuMobile","more",function(t){"com.woltlab.wcf.notifications"===t.identifier&&this.toggle()}.bind(this))}.bind(this))},_initDropdown:function(){var t=this._super();return $('<li><a href="'+this._options.settingsLink+'" title="'+WCF.Language.get("wcf.user.panel.settings")+'" class="jsTooltip"><span class="icon icon24 fa-cog" /></a></li>').appendTo(t.getLinkList()),t},_load:function(){this._proxy.setOption("data",{actionName:"getOutstandingNotifications",className:"wcf\\data\\user\\notification\\UserNotificationAction"}),this._proxy.sendRequest()},_markAsRead:function(t,e){this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest()},_markAllAsRead:function(t){this._proxy.setOption("data",{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"}),this._proxy.sendRequest()},resetItems:function(){this._super(),this._markAllAsReadLink&&(this._markAllAsReadLink.remove(),this._markAllAsReadLink=null)},updateBadge:function(t){t=parseInt(t)||0,$("#userNotifications").attr("data-count",t),null!==this._favico&&this._favico.badge(t),this._super(t)},updateUserNotificationCount:function(t){null!==this._dropdown&&this._dropdown.resetItems(),this.updateBadge(t)},_success:function(t){this._super(t),elBySelAll(".interactiveDropdownItemShadowLink",this._dropdown.getItemList()[0],function(t){t.addEventListener("click",function(t){this._dropdown.close()}.bind(this))}.bind(this))}}),WCF.User.Panel.UserMenu=WCF.User.Panel.Abstract.extend({init:function(){this._super($("#userMenu"),"userMenu",{pointerOffset:"13px",staticDropdown:!0})}}),WCF.User.QuickLogin={init:function(){require(["EventHandler","Ui/Dialog"],function(t,s){var a=elById("loginForm"),n=elBySel(".loginFormLogin",a);n&&!n.nextElementSibling&&a.classList.add("loginFormLoginOnly");for(var o=elBySel(".loginFormRegister",a),e=function(t){if(t instanceof Event&&(t.preventDefault(),t.stopPropagation()),a.style.removeProperty("display"),s.openStatic("loginForm",null,{title:WCF.Language.get("wcf.user.login")}),null!==n&&null!==o){var e=n.offsetTop,i=0;if(a.clientWidth>2*n.clientWidth)for(;e<o.offsetTop-50;)i+=100,n.style.setProperty("margin-bottom",i+"px","")}},i=document.getElementsByClassName("loginLink"),r=0,l=i.length;r<l;r++)i[r].addEventListener(WCF_CLICK_EVENT,e);var c=a.querySelector("#loginForm input[name=url]");null===c||c.value.match(/^https?:\/\//)||c.setAttribute("value",window.location.protocol+"//"+window.location.host+c.getAttribute("value")),t.add("com.woltlab.wcf.UserMenuMobile","more",function(t){"com.woltlab.wcf.login"===t.identifier&&(t.handler.close(!0),e())})})}},WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("<div>"+this._cache[t]+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){this._profileContent=$("#profileContent"),this._userID=t;var s=this._profileContent.data("active"),a=!1;this._profileContent.find("div.tabMenuContent").each($.proxy(function(t,e){var i=$(e).wcfIdentify();s===i?this._hasContent[i]=!0:(this._hasContent[i]=!1,a=!0)},this)),a&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy(function(t,e){var i=$(e);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1},this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],function(t){t.getTabMenu("profileContent").select("likes")})}.bind(this))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(i,t,e){var s=i.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],function(t,e){e.insertHtml(i.returnValues.template,elById(s),"append"),t.trigger()})}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:null,_tab:null,_userID:0,init:function(t,e){this._actionName="",this._active=!1,this._cachedTemplate="",this._tab=$("#about"),this._userID=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),e&&this._beginEdit()},_initButtons:function(){this._buttons={beginEdit:$(".jsButtonEditProfile:eq(0)").click(this._beginEdit.bind(this))}},_beginEdit:function(t){t&&t.preventDefault(),this._active||(this._active=!0,this._actionName="beginEdit",this._buttons.beginEdit.parent().addClass("active"),$("#profileContent").wcfTabs("select","about"),this._proxy.setOption("data",{actionName:"beginEdit",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID]}),this._proxy.sendRequest())},_save:function(){var r,l,i=null;elBySelAll(".redactor-layer",this._tab[0],function(t){var e={api:{throwError:elInnerError},valid:!0};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","validate_"+elData(t,"element-id"),e),e.valid||null!==i||(i=t.parentNode)}),i?i.scrollIntoView({behavior:"smooth"}):(this._actionName="save",r=/values\[([a-zA-Z0-9._-]+)\]/,l={},this._tab.find("input, textarea, select").each(function(t,e){var i=$(e),s=null;switch(i.getTagName()){case"input":var a=i.attr("type");if(("radio"===a||"checkbox"===a)&&!i.prop("checked"))return;break;case"textarea":i.data("redactor")&&(s=i.redactor("code.get"))}var n,o=i.attr("name");r.test(o)&&(n=RegExp.$1,null===s&&(s=i.val()),"checkbox"===i.attr("type")&&/\[\]$/.test(o)?(Array.isArray(l[n])||(l[n]=[]),l[n].push(s)):l[n]=s)}),this._proxy.setOption("data",{actionName:"save",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID],parameters:{values:l}}),this._proxy.sendRequest())},_restore:function(){this._actionName="restore",this._active=!1,this._buttons.beginEdit.parent().removeClass("active"),this._destroyEditor(),this._tab.html(this._cachedTemplate).children().css({height:"auto"})},_success:function(t,e,i){switch(this._actionName){case"beginEdit":this._prepareEdit(t);break;case"save":t.returnValues.success?(this._cachedTemplate=t.returnValues.template,this._restore()):this._prepareEdit(t,!0)}},_prepareEdit:function(i,s){this._destroyEditor();var a=this;this._tab.html(function(t,e){return!0!==s&&(a._cachedTemplate=e),i.returnValues.template}),this._tab.find("input[type=text]").attr("autocomplete","off"),this._tab.find(".formSubmit > button[data-type=save]").click($.proxy(this._save,this)),this._tab.find(".formSubmit > button[data-type=restore]").click($.proxy(this._restore,this)),this._tab.find("input").keyup(function(t){if(t.which===$.ui.keyCode.ENTER)return a._save(),t.preventDefault(),!1})},_destroyEditor:function(){this._tab.find("textarea").each(function(t,e){var i=$(e);i.data("redactor")&&i.redactor("core.destroy")})}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e=this._element.val();if(!e)return this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"));if(null!==this._confirmElement){var i=this._confirmElement.val();if(""!=i&&e!=i)return this._showError(this._confirmElement,this._errorMessages.notEqual)}this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("<small />").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return!(t.length<this._options.minlength||t.length>this._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.User.Registration.Validation.Password=WCF.User.Registration.Validation.extend({_actionName:"validatePassword",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{password:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.password.error.",notEqual:WCF.Language.get("wcf.user.confirmPassword.error.notEqual")}}}),WCF.User.Registration.LostPassword=Class.extend({_email:null,_username:null,init:function(){this._email=$("#emailInput"),this._username=$("#usernameInput"),this._email.keyup($.proxy(this._checkEmail,this)),this._username.keyup($.proxy(this._checkUsername,this)),$.browser.mozilla&&$.browser.touch&&(this._email.on("input",$.proxy(this._checkEmail,this)),this._username.on("input",$.proxy(this._checkUsername,this))),this._checkEmail(),this._checkUsername()},_checkEmail:function(){""==this._email.val()?(this._username.enable(),this._username.parents("dl:eq(0)").removeClass("disabled")):(this._username.disable(),this._username.parents("dl:eq(0)").addClass("disabled"),this._username.val(""))},_checkUsername:function(){""==this._username.val()?(this._email.enable(),this._email.parents("dl:eq(0)").removeClass("disabled")):(this._email.disable(),this._email.parents("dl:eq(0)").addClass("disabled"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".contentHeaderNavigation .jsMarkAllAsConfirmed").click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.user.notification.markAllAsConfirmed.confirmMessage"),function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"},success:function(){window.location.reload()}})})}),this._convertList()},_convertList:function(){$(".userNotificationItemList > .notificationItem").each(function(t,e){var i=$(e);i.data("isRead")||(i.find("a:not(.userLink)").prop("href",i.data("link")),$('<a href="#" class="icon icon24 fa-check notificationItemMarkAsConfirmed jsTooltip" title="'+WCF.Language.get("wcf.user.notification.markAsConfirmed")+'" />').appendTo(i).click($.proxy(this._markAsConfirmed,this))),i.find("a:not(.notificationItemMarkAsConfirmed)").length||i.find(".details > p:eq(0)").html(function(t,e){return'<a href="'+i.data("link")+'">'+e+"</a>"})}.bind(this)),WCF.DOMNodeInsertedHandler.execute()},_markAsConfirmed:function(t){t.preventDefault();var e=$(t.currentTarget).parents(".notificationItem:eq(0)").data("objectID");return this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest(),!1},_success:function(t,e,i){var s=$(".userNotificationItemList > .notificationItem[data-object-id="+t.returnValues.markAsRead+"]");s.data("isRead",!0),s.find(".newContentBadge").remove(),s.find(".notificationItemMarkAsConfirmed").remove(),s.removeClass("notificationUnconfirmed")}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(t){var e=$("#previewContainer");e.length||(e=$('<section class="section" id="previewContainer"><h2 class="sectionTitle">'+WCF.Language.get("wcf.global.preview")+'</h2><div class="htmlContent messageSignatureConstraints"></div></section>').insertBefore($("#signatureContainer")).wcfFadeIn()),e.children("div").first().html(t.returnValues.message)}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('<li class="showMore"><button class="small">'+WCF.Language.get("wcf.user.recentActivity.more")+"</button></li>").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('<li class="showMore"><small>'+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small></li>").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($("<small>"+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small>").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.LikeLoader=Class.extend({_container:null,_likeType:"received",_likeValue:1,_loadButton:null,_noMoreEntries:null,_proxy:null,_userID:0,init:function(t){var e;this._container=$("#likeList"),this._userID=t,this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),e=$('<li class="likeListMore showMore"><button class="small">'+WCF.Language.get("wcf.like.likes.more")+"</button><small>"+WCF.Language.get("wcf.like.likes.noMoreEntries")+"</small></li>").appendTo(this._container),this._loadButton=e.children("button").click($.proxy(this._click,this)),this._noMoreEntries=e.children("small").hide(),2==this._container.find("> li").length&&(this._loadButton.hide(),this._noMoreEntries.show()),$("#likeType .button").click($.proxy(this._clickLikeType,this)),$("#likeValue .button").click($.proxy(this._clickLikeValue,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_clickLikeType:function(t){var e=$(t.currentTarget);this._likeType!=e.data("likeType")&&(this._likeType=e.data("likeType"),$("#likeType .button").removeClass("active"),e.addClass("active"),this._reload())},_clickLikeValue:function(t){var e=$(t.currentTarget);this._likeValue!=e.data("likeValue")&&(this._likeValue=e.data("likeValue"),$("#likeValue .button").removeClass("active"),e.addClass("active"),$("#likeType > li:first-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesReceived")),$("#likeType > li:last-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesGiven")),this._container.find("> li.likeListMore button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.more")),this._container.find("> li.likeListMore small").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.noMoreEntries")),this._reload())},_reload:function(){this._container.find("> li:not(:first-child):not(:last-child)").remove(),this._container.data("lastLikeTime",0),this._click()},_click:function(){this._loadButton.enable();var t={lastLikeTime:this._container.data("lastLikeTime"),userID:this._userID,likeType:this._likeType,likeValue:this._likeValue};this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\like\\LikeAction",parameters:t}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastLikeTime",t.returnValues.lastLikeTime),this._noMoreEntries.hide(),this._loadButton.show().enable()):(this._noMoreEntries.show(),this._loadButton.hide())}}),WCF.User.ProfilePreview=WCF.Popover.extend({_proxy:null,_userProfiles:{},init:function(){this._super(".userLink"),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1}),WCF.System.ObjectStore.add("WCF.User.ProfilePreview",this)},_loadContent:function(){var a,n,o=$("#"+this._activeElementID).data("userID");this._userProfiles[o]?this._insertContent(this._activeElementID,this._userProfiles[o],!0):(this._proxy.setOption("data",{actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[o]}),a=this._activeElementID,(n=this)._proxy.setOption("success",function(t,e,i){n._userProfiles[o]=t.returnValues.template,n._insertContent(a,t.returnValues.template,!0)}),this._proxy.setOption("failure",function(t,e,i,s){return n._userProfiles[o]=t.message,n._insertContent(a,t.message,!0),!1}),this._proxy.sendRequest())},purge:function(t){delete this._userProfiles[t],this._data={}}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:null,_followButtonSelector:".jsFollowButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._followButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy(function(t,e){$(e).find(this._followButtonSelector).click($.proxy(this._click,this))},this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("following")?"unfollow":"follow",className:"wcf\\data\\user\\follow\\UserFollowAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(s,t,e){this._containerList.each($.proxy(function(t,e){var i=$(e).find(this._followButtonSelector).get(0);if(i&&$(i).data("objectID")==this._userID)return i=$(i),s.returnValues.following?(i.attr("data-tooltip",WCF.Language.get("wcf.user.button.unfollow")).children(".icon").removeClass("fa-plus").addClass("fa-minus"),i.children(".invisible").text(WCF.Language.get("wcf.user.button.unfollow"))):(i.attr("data-tooltip",WCF.Language.get("wcf.user.button.follow")).children(".icon").removeClass("fa-minus").addClass("fa-plus"),i.children(".invisible").text(WCF.Language.get("wcf.user.button.follow"))),i.data("following",s.returnValues.following),!1},this)),(new WCF.System.Notification).show()}}),WCF.User.Action.Ignore=Class.extend({_containerList:null,_ignoreButtonSelector:".jsIgnoreButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._ignoreButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy(function(t,e){$(e).find(this._ignoreButtonSelector).click($.proxy(this._click,this))},this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("ignored")?"unignore":"ignore",className:"wcf\\data\\user\\ignore\\UserIgnoreAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(s,t,e){this._containerList.each($.proxy(function(t,e){var i=$(e).find(this._ignoreButtonSelector).get(0);if(i&&$(i).data("objectID")==this._userID)return i=$(i),s.returnValues.isIgnoredUser?(i.attr("data-tooltip",WCF.Language.get("wcf.user.button.unignore")).children(".icon").removeClass("fa-ban").addClass("fa-circle-o"),i.children(".invisible").text(WCF.Language.get("wcf.user.button.unignore"))):(i.attr("data-tooltip",WCF.Language.get("wcf.user.button.ignore")).children(".icon").removeClass("fa-circle-o").addClass("fa-ban"),i.children(".invisible").text(WCF.Language.get("wcf.user.button.ignore"))),i.data("ignored",s.returnValues.isIgnoredUser),!1},this)),(new WCF.System.Notification).show();var i=this;WCF.System.ObjectStore.invoke("WCF.User.ProfilePreview",function(t){t.purge(i._userID)})}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(t){this._super($("#avatarUpload > dd > div"),void 0,"wcf\\data\\user\\avatar\\UserAvatarAction"),this._userID=t||0,$("#avatarForm input[type=radio]").change(function(){"custom"==$(this).val()?$("#avatarUpload > dd > div").show():$("#avatarUpload > dd > div").hide()}),$("#avatarForm input[type=radio][value=custom]:checked").length||$("#avatarUpload > dd > div").hide()},_initFile:function(t){return $("#avatarUpload > dt > img")},_success:function(t,e){e.returnValues.url?(this._updateImage(e.returnValues.url),$("#avatarUpload > dd > .innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.user.avatar.upload.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.user.avatar.upload.error."+e.returnValues.errorType))},_updateImage:function(t){$("#avatarUpload > dt > img").remove();var e=$('<img src="'+t+'" class="userAvatarImage" alt="" />').css({height:"auto","max-height":"96px","max-width":"96px",width:"auto"});$("#avatarUpload > dt").prepend(e),WCF.DOMNodeInsertedHandler.execute()},_getInnerErrorElement:function(){var t=$("#avatarUpload > dd > .innerError");return t.length||(t=$('<small class="innerError"></span>'),$("#avatarUpload > dd").append(t)),t},_getParameters:function(){return{userID:this._userID}}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){var i;e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount)?console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount):this._cache[this._pageNo]?(i=!1,null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('<div id="userList'+this._className.hashCode()+'" />').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),1<this._pageCount?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()):(this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest())},_success:function(t,e,i){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:".jsSubscribeButton",_buttons:{},_dialog:null,_notification:null,_reloadOnUnsubscribe:!1,init:function(t){this._buttons={},this._notification=null,this._reloadOnUnsubscribe=!0===t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(this._buttonSelector).each($.proxy(function(t,e){var i=$(e);i.addClass("pointer");var s=i.data("objectType"),a=i.data("objectID");void 0===this._buttons[s]&&(this._buttons[s]={}),this._buttons[s][a]=i.click($.proxy(this._click,this))},this)),WCF.System.Event.addListener("com.woltlab.wcf.objectWatch","update",$.proxy(this._updateSubscriptionStatus,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget);this._proxy.setOption("data",{actionName:"manageSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{objectID:e.data("objectID"),objectType:e.data("objectType")}}),this._proxy.sendRequest()},_success:function(t,e,i){var s,a;"manageSubscription"===t.actionName?(null===this._dialog?(this._dialog=$("<div>"+t.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.objectWatch.manageSubscription")})):(this._dialog.html(t.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find(".formSubmit > .jsButtonSave").data("objectID",t.returnValues.objectID).data("objectType",t.returnValues.objectType).click($.proxy(this._save,this)),s=this._dialog.find("input[name=enableNotification]").disable(),this._dialog.find("input[name=subscribe]").change(function(t){1==$(t.currentTarget).val()?s.enable():s.disable()}),(a=this._dialog.find("input[name=subscribe]:checked")).length&&1==a.val()&&s.enable()):"saveSubscription"===t.actionName&&this._dialog.is(":visible")&&(this._dialog.wcfDialog("close"),this._updateSubscriptionStatus({isSubscribed:t.returnValues.subscribe,objectID:t.returnValues.objectID}),null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show())},_save:function(t){var e=this._buttons[$(t.currentTarget).data("objectType")][$(t.currentTarget).data("objectID")],i=this._dialog.find("input[name=subscribe]:checked").val(),s=this._dialog.find("input[name=enableNotification]").is(":checked")?1:0;this._proxy.setOption("data",{actionName:"saveSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{enableNotification:s,objectID:e.data("objectID"),objectType:e.data("objectType"),subscribe:i}}),this._proxy.sendRequest()},_updateSubscriptionStatus:function(t){var e=$(this._buttonSelector+"[data-object-id="+t.objectID+"]"),i=e.children(".icon");if(t.isSubscribed)i.removeClass("fa-bookmark-o").addClass("fa-bookmark"),e.data("isSubscribed",!0);else if(e.data("removeOnUnsubscribe")?e.parent().remove():(i.removeClass("fa-bookmark").addClass("fa-bookmark-o"),e.data("isSubscribed",!1)),this._reloadOnUnsubscribe)return void window.location.reload();WCF.System.Event.fireEvent("com.woltlab.wcf.objectWatch","updatedSubscription",t)}}); })(this);
 
 // WCF.Moderation.js
-(function (window, undefined) { WCF.Moderation.js; })(this);
+(function (window, undefined) { "use strict";WCF.Moderation={},WCF.Moderation.Management=Class.extend({_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:null,_languageItem:"",_proxy:null,_queueID:0,_redirectURL:"",init:function(e,t,i){this._buttonSelector?this._className?(this._dialog=null,this._queueID=e,this._redirectURL=t,this._languageItem=i,this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),$(this._buttonSelector).click($.proxy(this._click,this)),$("#moderationAssignUser").click($.proxy(this._clickAssignedUser,this))):console.debug("[WCF.Moderation.Management] Missing class name, aborting."):console.debug("[WCF.Moderation.Management] Missing button selector, aborting.")},_click:function(e){var a=$(e.currentTarget).wcfIdentify(),t="";this._confirmationTemplate[a]&&(t=this._confirmationTemplate[a]),WCF.System.Confirmation.show(WCF.Language.get(this._languageItem.replace(/{actionName}/,a)),$.proxy(function(e,t,i){var o;"confirm"===e&&(o={actionName:a,className:this._className,objectIDs:[this._queueID]},this._confirmationTemplate[a]&&(o.parameters={},$(i).find("input, textarea").each(function(e,t){var i=$(t),a=i.val();"input"===i.getTagName()&&"checkbox"===i.attr("type")&&(i.is(":checked")||(a=null)),null!==a&&(o.parameters[i.attr("name")]=a)})),this._proxy.setOption("data",o),this._proxy.sendRequest(),$(this._buttonSelector).disable())},this),{},t)},_clickAssignedUser:function(){this._proxy.setOption("data",{actionName:"getAssignUserForm",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[this._queueID]}),this._proxy.sendRequest()},_success:function(e,t,i){switch(e.actionName){case"getAssignUserForm":null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.template).wcfDialog({title:WCF.Language.get("wcf.moderation.assignedUser")})):this._dialog.html(e.returnValues.template).wcfDialog("open"),this._dialog.find("button[data-type=submit]").click($.proxy(this._assignUser,this));break;case"assignUser":var a=$("#moderationAssignedUserContainer > dd > span").empty();e.returnValues.userID?$('<a href="'+e.returnValues.link+'" data-object-id="'+e.returnValues.userID+'" class="userLink">'+WCF.String.escapeHTML(e.returnValues.username)+"</a>").appendTo(a):a.append(e.returnValues.username),a.append(" "),e.returnValues.newStatus&&$("#moderationStatusContainer > dd").text(WCF.Language.get("wcf.moderation.status."+e.returnValues.newStatus)),this._dialog.wcfDialog("close"),(new WCF.System.Notification).show();break;default:var o=new WCF.System.Notification(WCF.Language.get("wcf.global.success")),n=this;o.show(function(){window.location=n._redirectURL})}},_failure:function(e,t,i,a){if(e.returnValues&&e.returnValues.fieldName&&"assignedUsername"==e.returnValues.fieldName){this._dialog.find("small.innerError").remove();var o="";switch(e.returnValues.errorType){case"empty":o=WCF.Language.get("wcf.global.form.error.empty");break;case"notAffected":o=WCF.Language.get("wcf.moderation.assignedUser.error.notAffected");break;default:o=WCF.Language.get("wcf.user.username.error."+e.returnValues.errorType,{username:this._dialog.find("#assignedUsername").val()})}return $('<small class="innerError">'+o+"</small>").insertAfter(this._dialog.find("#assignedUsername")),!1}return!0},_assignUser:function(){var e=this._dialog.find("input[name=assignedUserID]:checked").val(),t="";if(-1==e&&(t=$.trim(this._dialog.find("#assignedUsername").val())),-1==e&&0==t.length)return this._dialog.find("small.innerError").remove(),void $('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(this._dialog.find("#assignedUsername"));this._proxy.setOption("data",{actionName:"assignUser",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[this._queueID],parameters:{assignedUserID:e,assignedUsername:t}}),this._proxy.sendRequest()}}),WCF.Moderation.Queue={},WCF.Moderation.Queue.MarkAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(document).on("dblclick",".moderationList .new .columnAvatar",$.proxy(this._dblclick,this))},_dblclick:function(e){this._proxy.setOption("data",{actionName:"markAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[$(e.currentTarget).parents(".moderationQueueEntry:eq(0)").data("queueID")]}),this._proxy.sendRequest()},_success:function(a,e,t){$(".moderationList .new").each(function(e,t){var i=$(t);WCF.inArray(i.data("queueID"),a.objectIDs)&&(i.removeClass("new"),i.find(".columnAvatar").off("dblclick"))})}}),WCF.Moderation.Queue.MarkAllAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".markAllAsReadButton").click($.proxy(this._click,this))},_click:function(e){e.preventDefault(),this._proxy.setOption("data",{actionName:"markAllAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},_success:function(e,t,i){var a=WCF.Dropdown.Interactive.Handler.getDropdown("outstandingModeration");a&&(a.getLinkList().find(".interactiveDropdownItemMarkAllAsRead").remove(),a.getItemList().find(".interactiveDropdownItemMarkAsRead").remove()),$("#outstandingModeration .badgeUpdate").remove();var o=$(".moderationList");o.find(".new").removeClass("new"),o.find(".columnAvatar").off("dblclick")}}),WCF.Moderation.Activation={},WCF.Moderation.Activation.Management=WCF.Moderation.Management.extend({init:function(e,t){this._buttonSelector="#enableContent, #removeContent",this._className="wcf\\data\\moderation\\queue\\ModerationQueueActivationAction",this._super(e,t,"wcf.moderation.activation.{actionName}.confirmMessage")}}),WCF.Moderation.Report={},WCF.Moderation.Report.Content=Class.extend({_buttons:{},_buttonSelector:"",_dialog:null,_notification:null,_objectID:0,_objectType:"",_proxy:null,init:function(e,t){this._objectType=e,this._buttonSelector=t,this._buttons={},this._notification=null,this._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Moderation.Report"+this._objectType.hashCode(),$.proxy(this._initButtons,this))},_initButtons:function(){var o=this;$(this._buttonSelector).each(function(e,t){var i=$(t),a=i.wcfIdentify();o._buttons[a]||(o._buttons[a]=i).click($.proxy(o._click,o))})},_click:function(e){e.preventDefault(),this._objectID=$(e.currentTarget).data("objectID"),this._proxy.setOption("data",{actionName:"prepareReport",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()},_success:function(e,t,i){e.returnValues.reported?(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.moderation.report.success"))),this._dialog.wcfDialog("close"),this._notification.show()):e.returnValues.template&&(this._showDialog(e.returnValues.template),e.returnValues.alreadyReported||this._dialog.find(".jsSubmitReport").click($.proxy(this._submit,this)))},_showDialog:function(e){null===this._dialog&&(this._dialog=$("#moderationReport"),this._dialog.length||(this._dialog=$('<div id="moderationReport" />').hide().appendTo(document.body))),this._dialog.html(e).wcfDialog({title:WCF.Language.get("wcf.moderation.report.reportContent")}).wcfDialog("render")},_submit:function(){var e=this._dialog.find(".jsReportMessage").val();if(""==$.trim(e))return this._dialog.find(".section > dl").addClass("formError"),void(this._dialog.find(".innerError").length||this._dialog.find(".jsReportMessage").after($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>")));this._proxy.setOption("data",{actionName:"report",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{message:e,objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()}}),WCF.Moderation.Report.Management=WCF.Moderation.Management.extend({init:function(e,t){this._buttonSelector="#removeContent, #removeReport",this._className="wcf\\data\\moderation\\queue\\ModerationQueueReportAction",this._super(e,t,"wcf.moderation.report.{actionName}.confirmMessage"),this._confirmationTemplate.removeContent=$('<div class="section"><dl><dt><label for="message">'+WCF.Language.get("wcf.moderation.report.removeContent.reason")+'</label></dt><dd><textarea name="message" id="message" cols="40" rows="3" /></dd></dl></div>'),this._confirmationTemplate.removeReport=$('<div class="section"><dl><dt></dt><dd><label><input type="checkbox" name="markAsJustified" id="markAsJustified" value="1"> '+WCF.Language.get("wcf.moderation.report.removeReport.markAsJustified")+"</label></dd></dl></div>")}}),WCF.User.Panel.Moderation=WCF.User.Panel.Abstract.extend({init:function(e){e.enableMarkAsRead=!0,this._super($("#outstandingModeration"),"outstandingModeration",e),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.UserMenuMobile","more",function(e){"com.woltlab.wcf.moderation"===e.identifier&&this.toggle()}.bind(this))}.bind(this))},_initDropdown:function(){var e=this._super();return $('<li><a href="'+this._options.deletedContentLink+'" title="'+this._options.deletedContent+'" class="jsTooltip"><span class="icon icon24 fa-trash-o" /></a></li>').appendTo(e.getLinkList()),e},_load:function(){this._proxy.setOption("data",{actionName:"getOutstandingQueues",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},_markAsRead:function(e,t){this._proxy.setOption("data",{actionName:"markAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[t]}),this._proxy.sendRequest()},_markAllAsRead:function(e){this._proxy.setOption("data",{actionName:"markAllAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},resetItems:function(){this._super(),this._loadData=!0}}); })(this);
 
index 3e0de8460b0e8a9fe34d50c50b1c664b22e9e342..95f3ab6b0a6aa9337bb82d81819b83cd53a97731 100644 (file)
@@ -1,62 +1,62 @@
 // WCF.Combined.tiny.min.js -- DO NOT EDIT
 
 // 3rdParty/jquery.js
-(function (window, undefined) { undefined })(this);
+(function (window, undefined) { !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";function g(e){return null!=e&&e===e.window}var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,v=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),m={},x=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},c={type:!0,src:!0,noModule:!0};function b(e,t,n){var r,i=(t=t||E).createElement("script");if(i.text=e,n)for(r in c)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.3.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!x(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||x(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(o=i?(i=!1,n&&Array.isArray(n)?n:[]):n&&k.isPlainObject(n)?n:{},a[t]=k.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=y.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){b(e)},each:function(e,t){var n,r=0;if(d(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!=a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return v.apply([],a)},guid:1,support:m}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){function f(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}function i(){T()}var e,d,b,o,a,h,p,g,w,u,l,T,C,s,E,v,c,y,m,k="sizzle"+ +new Date,x=n.document,S=0,r=0,D=ae(),N=ae(),A=ae(),j=function(e,t){return e===t&&(l=!0),0},q={}.hasOwnProperty,t=[],L=t.pop,H=t.push,O=t.push,P=t.slice,M=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",$="\\["+I+"*("+W+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+W+"))|)"+I+"*\\]",B=":("+W+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+$+")*)|.*)\\)|)",F=new RegExp(I+"+","g"),_=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),z=new RegExp("^"+I+"*,"+I+"*"),X=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),U=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),V=new RegExp(B),G=new RegExp("^"+W+"$"),Y={ID:new RegExp("^#("+W+")"),CLASS:new RegExp("^\\.("+W+")"),TAG:new RegExp("^("+W+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ne=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=ve(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{O.apply(t=P.call(x.childNodes),x.childNodes),t[x.childNodes.length].nodeType}catch(e){O={apply:t.length?function(e,t){H.apply(e,P.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,n,r){var i,o,a,s,u,l,c,f=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!r&&((t?t.ownerDocument||t:x)!==C&&T(t),t=t||C,E)){if(11!==p&&(u=Z.exec(e)))if(i=u[1]){if(9===p){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&m(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return O.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&d.getElementsByClassName&&t.getElementsByClassName)return O.apply(n,t.getElementsByClassName(i)),n}if(d.qsa&&!A[e+" "]&&(!v||!v.test(e))){if(1!==p)f=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(ne,re):t.setAttribute("id",s=k),o=(l=h(e)).length;o--;)l[o]="#"+s+" "+ge(l[o]);c=l.join(","),f=ee.test(e)&&de(t.parentNode)||t}if(c)try{return O.apply(n,f.querySelectorAll(c)),n}catch(e){}finally{s===k&&t.removeAttribute("id")}}}return g(e.replace(_,"$1"),t,n,r)}function ae(){var n=[];function r(e,t){return n.push(e+" ")>b.cacheLength&&delete r[n.shift()],r[e+" "]=t}return r}function se(e){return e[k]=!0,e}function ue(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ie(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function pe(a){return se(function(o){return o=+o,se(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function de(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in d=oe.support={},a=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},T=oe.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:x;return r!==C&&9===r.nodeType&&r.documentElement&&(s=(C=r).documentElement,E=!a(C),x!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",i,!1):n.attachEvent&&n.attachEvent("onunload",i)),d.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ue(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ue(function(e){return s.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,f);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,f);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},c=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ue(function(e){s.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),s.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(y=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&ue(function(e){d.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),c.push("!=",B)}),v=v.length&&new RegExp(v.join("|")),c=c.length&&new RegExp(c.join("|")),t=K.test(s.compareDocumentPosition),m=t||K.test(s.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===x&&m(x,e)?-1:t===C||t.ownerDocument===x&&m(x,t)?1:u?M(u,e)-M(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?M(u,e)-M(u,t):0;if(i===o)return ce(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ce(a[r],s[r]):a[r]===x?-1:s[r]===x?1:0}),C},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),t=t.replace(U,"='$1']"),d.matchesSelector&&E&&!A[t+" "]&&(!c||!c.test(t))&&(!v||!v.test(t)))try{var n=y.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<oe(t,C,null,[e]).length},oe.contains=function(e,t){return(e.ownerDocument||e)!==C&&T(e),m(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&q.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},oe.escape=function(e){return(e+"").replace(ne,re)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return u=null,e},o=oe.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(b=oe.selectors={cacheLength:50,createPseudo:se,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,f),e[3]=(e[3]||e[4]||e[5]||"").replace(te,f),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,f).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=D[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&D(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=oe.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(F," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!=m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){for(;l;){for(a=e;a=a[l];)if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){for(d=(s=(r=(i=(o=(a=c)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1])&&r[2],a=s&&c.childNodes[s];a=++s&&a&&a[l]||(d=s=0)||u.pop();)if(1===a.nodeType&&++d&&a===e){i[h]=[S,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1]),!1===d)for(;(a=++s&&a&&a[l]||(d=s=0)||u.pop())&&((x?a.nodeName.toLowerCase()!==f:1!==a.nodeType)||!++d||(p&&((i=(o=a[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[S,d]),a!==e)););return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return a[k]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,t){for(var n,r=a(e,o),i=r.length;i--;)e[n=M(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:se(function(e){var r=[],i=[],s=p(e.replace(_,"$1"));return s[k]?se(function(e,t,n,r){for(var i,o=s(e,null,r,[]),a=e.length;a--;)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:se(function(t){return function(e){return 0<oe(t,e).length}}),contains:se(function(t){return t=t.replace(te,f),function(e){return-1<(e.textContent||e.innerText||o(e)).indexOf(t)}}),lang:se(function(n){return G.test(n||"")||oe.error("unsupported lang: "+n),n=n.replace(te,f).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===s},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:fe(!1),disabled:fe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe(function(){return[0]}),last:pe(function(e,t){return[t-1]}),eq:pe(function(e,t,n){return[n<0?n+t:n]}),even:pe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:pe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:pe(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:pe(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=function(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}(e);function he(){}function ge(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function ve(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[S,p];if(n){for(;e=e[u];)if((1===e.nodeType||f)&&s(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||f)if(i=(o=e[k]||(e[k]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===S&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function ye(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function me(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function xe(d,h,g,v,y,e){return v&&!v[k]&&(v=xe(v)),y&&!y[k]&&(y=xe(y,e)),se(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:me(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v)for(i=me(p,u),v(i,[],n,r),o=i.length;o--;)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a));if(e){if(y||d){if(y){for(i=[],o=p.length;o--;)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}for(o=p.length;o--;)(a=p[o])&&-1<(i=y?M(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=me(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):O.apply(t,p)})}function be(v,y){function e(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=S+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){for(a=0,t||o.ownerDocument===C||(T(o),n=!E);s=v[a++];)if(s(o,t||C,n)){r.push(o);break}i&&(S=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){for(a=0;s=y[a++];)s(c,f,t,n);if(e){if(0<u)for(;l--;)c[l]||f[l]||(f[l]=L.call(r));f=me(f)}O.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&oe.uniqueSort(r)}return i&&(S=h,w=p),c}var m=0<y.length,x=0<v.length;return m?se(e):e}return he.prototype=b.filters=b.pseudos,b.setFilters=new he,h=oe.tokenize=function(e,t){var n,r,i,o,a,s,u,l=N[e+" "];if(l)return t?0:l.slice(0);for(a=e,s=[],u=b.preFilter;a;){for(o in n&&!(r=z.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=X.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(_," ")}),a=a.slice(n.length)),b.filter)!(r=Y[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?oe.error(e):N(e,s).slice(0)},p=oe.compile=function(e,t){var n,r=[],i=[],o=A[e+" "];if(!o){for(n=(t=t||h(e)).length;n--;)(o=function e(t){for(var i,n,r,o=t.length,a=b.relative[t[0].type],s=a||b.relative[" "],u=a?1:0,l=ve(function(e){return e===i},s,!0),c=ve(function(e){return-1<M(i,e)},s,!0),f=[function(e,t,n){var r=!a&&(n||t!==w)||((i=t).nodeType?l:c)(e,t,n);return i=null,r}];u<o;u++)if(n=b.relative[t[u].type])f=[ve(ye(f),n)];else{if((n=b.filter[t[u].type].apply(null,t[u].matches))[k]){for(r=++u;r<o&&!b.relative[t[r].type];r++);return xe(1<u&&ye(f),1<u&&ge(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(_,"$1"),n,u<r&&e(t.slice(u,r)),r<o&&e(t=t.slice(r)),r<o&&ge(t))}f.push(n)}return ye(f)}(t[n]))[k]?r.push(o):i.push(o);(o=A(e,be(i,r))).selector=e}return o},g=oe.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,f),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=Y.needsContext.test(e)?0:o.length;i--&&(a=o[i],!b.relative[s=a.type]);)if((u=b.find[s])&&(r=u(a.matches[0].replace(te,f),ee.test(o[0].type)&&de(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&ge(o)))return O.apply(n,r),n;break}}return(l||p(e,c))(r,t,!E,n,!t||ee.test(e)&&de(t.parentNode)||t),n},d.sortStable=k.split("").sort(j).join("")===k,d.detectDuplicates=!!l,T(),d.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(C);k.find=h,k.expr=h.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=h.uniqueSort,k.text=h.getText,k.isXMLDoc=h.isXML,k.contains=h.contains,k.escapeSelector=h.escape;function T(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r}function S(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}var D=k.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return x(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1<i.call(n,e)!==r}):k.filter(n,e,r)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?k(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):x(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),A.test(r[1])&&k.isPlainObject(t))for(r in t)x(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&k(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(k(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(r,i){k.fn[r]=function(e,t){var n=k.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=k.filter(t,n)),1<this.length&&(O[r]||k.uniqueSort(n),H.test(r)&&n.reverse()),this.pushStack(n)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){return e}function I(e){throw e}function W(e,t,n,r){var i;try{e&&x(i=e.promise)?i.call(e).done(t).fail(n):e&&x(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},k.each(e.match(M)||[],function(e,t){n[t]=!0}),n):k.extend({},r);function i(){for(s=s||r.once,a=o=!0;l.length;c=-1)for(t=l.shift();++c<u.length;)!1===u[c].apply(t[0],t[1])&&r.stopOnFalse&&(c=u.length,t=!1);r.memory||(t=!1),o=!1,s&&(u=t?[]:"")}var o,t,a,s,u=[],l=[],c=-1,f={add:function(){return u&&(t&&!o&&(c=u.length-1,l.push(t)),function n(e){k.each(e,function(e,t){x(t)?r.unique&&f.has(t)||u.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!o&&i()),this},remove:function(){return k.each(arguments,function(e,t){for(var n;-1<(n=k.inArray(t,u,n));)u.splice(n,1),n<=c&&c--}),this},has:function(e){return e?-1<k.inArray(e,u):0<u.length},empty:function(){return u=u&&[],this},disable:function(){return s=l=[],u=t="",this},disabled:function(){return!u},lock:function(){return s=l=[],t||o||(u=t=""),this},locked:function(){return!!s},fireWith:function(e,t){return s||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),o||i()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!a}};return f},k.extend({Deferred:function(e){var o=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var i=arguments;return k.Deferred(function(r){k.each(o,function(e,t){var n=x(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&x(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){function e(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,x(t)?s?t.call(e,l(u,o,R,s),l(u,o,I,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,I,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}}var n=this,r=arguments,t=s?e:function(){try{e()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==I&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(k.Deferred.getStackHook&&(t.stackTrace=k.Deferred.getStackHook()),C.setTimeout(t))}}return k.Deferred(function(e){o[0][3].add(l(0,e,x(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,x(t)?t:R)),o[2][3].add(l(0,e,x(n)?n:I))}).promise()},promise:function(e){return null!=e?k.extend(e,a):a}},s={};return k.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){function t(t){return function(e){i[t]=this,o[t]=1<arguments.length?s.call(arguments):e,--n||a.resolveWith(i,o)}}var n=arguments.length,r=n,i=Array(r),o=s.call(arguments),a=k.Deferred();if(n<=1&&(W(e,a.done(t(r)).resolve,a.reject,!n),"pending"===a.state()||x(o[r]&&o[r].then)))return a.then();for(;r--;)W(o[r],t(r),a.reject);return a.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&$.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){C.setTimeout(function(){throw e})};var B=k.Deferred();function F(){E.removeEventListener("DOMContentLoaded",F),C.removeEventListener("load",F),k.ready()}k.fn.ready=function(e){return B.then(e).catch(function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||B.resolveWith(E,[k])}}),k.ready.then=B.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(k.ready):(E.addEventListener("DOMContentLoaded",F),C.addEventListener("load",F));var _=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)_(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,x(r)||(a=!0),l&&(t=a?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(k(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,X=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function V(e){return e.replace(z,"ms-").replace(X,U)}function G(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Y(){this.expando=k.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(M)||[]).length;for(;n--;)delete r[t[n]]}void 0!==t&&!k.isEmptyObject(r)||(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Q=new Y,J=new Y,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:K.test(i)?JSON.parse(i):i)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Q.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),k.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0!==n)return"object"==typeof n?this.each(function(){J.set(this,n)}):_(this,function(e){var t;return o&&void 0===e?void 0!==(t=J.get(o,n))||void 0!==(t=ee(o,n))?t:void 0:void this.each(function(){J.set(this,n,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(i=J.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(t=a.length;t--;)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=V(r.slice(5)),ee(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){k.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:k.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?k.queue(this[0],t):void 0===n?this:this.each(function(){var e=k.queue(this,t,n);k._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&k.dequeue(this,t)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){function n(){--i||o.resolveWith(a,[a])}var r,i=1,o=k.Deferred(),a=this,s=this.length;for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(r=Q.get(a[s],e+"queueHooks"))&&r.empty&&(i++,r.empty.add(n));return n(),o.promise(t)}});function te(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i}var ne=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,re=new RegExp("^(?:([+-])=|)("+ne+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],oe=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&k.contains(e.ownerDocument,e)&&"none"===k.css(e,"display")};function ae(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=s(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=(k.cssNumber[t]||"px"!==l&&+u)&&re.exec(k.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)k.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var se={};function ue(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Q.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&oe(r)&&(l[c]=(u=s=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=se[s])||(o=a.body.appendChild(a.createElement(s)),u=k.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),se[s]=u)))):"none"!==n&&(l[c]="none",Q.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}k.fn.extend({show:function(){return ue(this,!0)},hide:function(){return ue(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){oe(this)?k(this).show():k(this).hide()})}});var le=/^(?:checkbox|radio)$/i,ce=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,fe=/^$|^module$|\/(?:java|ecma)script/i,pe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function de(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&N(e,t)?k.merge([e],n):n}function he(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}pe.optgroup=pe.option,pe.tbody=pe.tfoot=pe.colgroup=pe.caption=pe.thead,pe.th=pe.td;var ge,ve,ye=/<|&#?\w+;/;function me(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))k.merge(p,o.nodeType?[o]:o);else if(ye.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(ce.exec(o)||["",""])[1].toLowerCase(),u=pe[s]||pe._default,a.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;k.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(l=k.contains(o.ownerDocument,o),a=de(f.appendChild(o),"script"),l&&he(a),n)for(c=0;o=a[c++];)fe.test(o.type||"")&&n.push(o);return f}ge=E.createDocumentFragment().appendChild(E.createElement("div")),(ve=E.createElement("input")).setAttribute("type","radio"),ve.setAttribute("checked","checked"),ve.setAttribute("name","t"),ge.appendChild(ve),m.checkClone=ge.cloneNode(!0).cloneNode(!0).lastChild.checked,ge.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!ge.cloneNode(!0).lastChild.defaultValue;var xe=E.documentElement,be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function ke(){try{return E.activeElement}catch(e){}}function Se(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Se(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(xe,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return void 0!==k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(M)||[""]).length;l--;)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(M)||[""]).length;l--;)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=k.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<k(i,this).index(l):k.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:x(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ke()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===ke()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){k.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||k.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),k.fn.extend({on:function(e,t,n,r){return Se(this,e,t,n,r)},one:function(e,t,n,r){return Se(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){k.event.remove(this,e,n,t)});for(i in e)this.off(i,t,e[i]);return this}});var De=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ne=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)k.event.add(t,i,l[i][n]);J.hasData(e)&&(s=J.access(e),u=k.extend({},s),J.set(t,u))}}function Pe(n,r,i,o){r=v.apply([],r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=x(d);if(h||1<f&&"string"==typeof d&&!m.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=me(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=k.map(de(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=k.clone(u,!0,!0),s&&k.merge(a,de(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,k.map(a,He),c=0;c<s;c++)u=a[c],fe.test(u.type||"")&&!Q.access(u,"globalEval")&&k.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&k._evalUrl(u.src):b(u.textContent.replace(je,""),l,u))}return n}function Me(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(de(r)),r.parentNode&&(n&&k.contains(r.ownerDocument,r)&&he(de(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e.replace(De,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=k.contains(e.ownerDocument,e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=de(c),r=0,i=(o=de(e)).length;r<i;r++)s=o[r],u=a[r],l=void 0,"input"===(l=u.nodeName.toLowerCase())&&le.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||de(e),a=a||de(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=de(c,"script")).length&&he(a,!f&&de(e,"script")),c},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return Me(this,e,!0)},remove:function(e){return Me(this,e)},text:function(e){return _(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=qe(this,e)).insertBefore(e,t.firstChild)})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(de(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return _(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!pe[(ce.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(de(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;k.inArray(this,n)<0&&(k.cleanData(de(this)),t&&t.replaceChild(e,this))},n)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){k.fn[e]=function(e){for(var t,n=[],r=k(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),k(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Re,Ie,We,$e,Be,Fe,_e,ze=new RegExp("^("+ne+")(?!px)[a-z%]+$","i"),Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Ue=new RegExp(ie.join("|"),"i");function Ve(){var e;_e&&(Fe.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",_e.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",xe.appendChild(Fe).appendChild(_e),e=C.getComputedStyle(_e),Re="1%"!==e.top,Be=12===Ge(e.marginLeft),_e.style.right="60%",$e=36===Ge(e.right),Ie=36===Ge(e.width),_e.style.position="absolute",We=36===_e.offsetWidth||"absolute",xe.removeChild(Fe),_e=null)}function Ge(e){return Math.round(parseFloat(e))}function Ye(e,t,n){var r,i,o,a,s=e.style;return(n=n||Xe(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||k.contains(e.ownerDocument,e)||(a=k.style(e,t)),!m.pixelBoxStyles()&&ze.test(a)&&Ue.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Qe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}Fe=E.createElement("div"),(_e=E.createElement("div")).style&&(_e.style.backgroundClip="content-box",_e.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===_e.style.backgroundClip,k.extend(m,{boxSizingReliable:function(){return Ve(),Ie},pixelBoxStyles:function(){return Ve(),$e},pixelPosition:function(){return Ve(),Re},reliableMarginLeft:function(){return Ve(),Be},scrollboxSize:function(){return Ve(),We}}));var Je=/^(none|table(?!-c[ea]).+)/,Ke=/^--/,Ze={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"},tt=["Webkit","Moz","ms"],nt=E.createElement("div").style;function rt(e){return k.cssProps[e]||(k.cssProps[e]=function(e){if(e in nt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=tt.length;n--;)if((e=tt[n]+t)in nt)return e}(e)||e)}function it(e,t,n){var r=re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function ot(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=k.css(e,n+ie[a],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+ie[a],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+ie[a]+"Width",!0,i))):(u+=k.css(e,"padding"+ie[a],!0,i),"padding"!==n?u+=k.css(e,"border"+ie[a]+"Width",!0,i):s+=k.css(e,"border"+ie[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function at(e,t,n){var r=Xe(e),i=Ye(e,t,r),o="border-box"===k.css(e,"boxSizing",!1,r),a=o;if(ze.test(i)){if(!n)return i;i="auto"}return a=a&&(m.boxSizingReliable()||i===e.style[t]),"auto"!==i&&(parseFloat(i)||"inline"!==k.css(e,"display",!1,r))||(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+ot(e,t,n||(o?"border":"content"),a,r,i)+"px"}function st(e,t,n,r,i){return new st.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ye(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=V(t),u=Ke.test(t),l=e.style;if(u||(t=rt(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=re.exec(n))&&i[1]&&(n=ae(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(k.cssNumber[s]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=V(t);return Ke.test(t)||(t=rt(s)),(a=k.cssHooks[t]||k.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ye(e,t,r)),"normal"===i&&t in et&&(i=et[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],function(e,s){k.cssHooks[s]={get:function(e,t,n){if(t)return!Je.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?at(e,s,n):te(e,Ze,function(){return at(e,s,n)})},set:function(e,t,n){var r,i=Xe(e),o="border-box"===k.css(e,"boxSizing",!1,i),a=n&&ot(e,s,n,o,i);return o&&m.scrollboxSize()===i.position&&(a-=Math.ceil(e["offset"+s[0].toUpperCase()+s.slice(1)]-parseFloat(i[s])-ot(e,s,"border",!1,i)-.5)),a&&(r=re.exec(t))&&"px"!==(r[3]||"px")&&(e.style[s]=t,t=k.css(e,s)),it(0,t,a)}}}),k.cssHooks.marginLeft=Qe(m.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ye(e,"marginLeft"))||e.getBoundingClientRect().left-te(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(i,o){k.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ie[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(k.cssHooks[i+o].set=it)}),k.fn.extend({css:function(e,t){return _(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,1<arguments.length)}}),(k.Tween=st).prototype={constructor:st,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=st.propHooks[this.prop];return e&&e.get?e.get(this):st.propHooks._default.get(this)},run:function(e){var t,n=st.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):st.propHooks._default.set(this),this}},st.prototype.init.prototype=st.prototype,st.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[k.cssProps[e.prop]]&&!k.cssHooks[e.prop]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},st.propHooks.scrollTop=st.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=st.prototype.init,k.fx.step={};var ut,lt,ct,ft,pt=/^(?:toggle|show|hide)$/,dt=/queueHooks$/;function ht(){lt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ht):C.setTimeout(ht,k.fx.interval),k.fx.tick())}function gt(){return C.setTimeout(function(){ut=void 0}),ut=Date.now()}function vt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ie[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function yt(e,t,n){for(var r,i=(mt.tweeners[t]||[]).concat(mt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function mt(o,e,t){var n,a,r=0,i=mt.prefilters.length,s=k.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=ut||gt(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},t),originalProperties:e,originalOptions:t,startTime:ut||gt(),duration:t.duration,tweens:[],createTween:function(e,t){var n=k.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=V(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=k.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=mt.prefilters[r].call(l,o,c,l.opts))return x(n.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,yt,l),x(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(mt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ae(n.elem,e,re.exec(t),n),n}]},tweener:function(e,t){for(var n,r=0,i=(e=x(e)?(t=e,["*"]):e.match(M)).length;r<i;r++)n=e[r],mt.tweeners[n]=mt.tweeners[n]||[],mt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&oe(e),v=Q.get(e,"fxshow");for(r in n.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],pt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Q.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(ue([e],!0),l=e.style.display||l,c=k.css(e,"display"),ue([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Q.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&ue([e],!0),p.done(function(){for(r in g||ue([e]),Q.remove(e,"fxshow"),d)k.style(e,r,d[r])})),u=yt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?mt.prefilters.unshift(e):mt.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||x(e)&&e,duration:e,easing:n&&t||t&&!x(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){x(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(oe).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){function i(){var e=mt(this,k.extend({},t),a);(o||Q.get(this,"finish"))&&e.stop(!0)}var o=k.isEmptyObject(t),a=k.speed(e,n,r);return i.finish=i,o||!1===a.queue?this.each(i):this.queue(a.queue,i)},stop:function(i,e,o){function a(e){var t=e.stop;delete e.stop,t(o)}return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=k.timers,r=Q.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&dt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||k.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Q.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=k.timers,o=n?n.length:0;for(t.finish=!0,k.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),k.each(["toggle","show","hide"],function(e,r){var i=k.fn[r];k.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(vt(r,!0),e,t,n)}}),k.each({slideDown:vt("show"),slideUp:vt("hide"),slideToggle:vt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){k.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(ut=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),ut=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){lt||(lt=!0,ht())},k.fx.stop=function(){lt=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(r,e){return r=k.fx&&k.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},ct=E.createElement("input"),ft=E.createElement("select").appendChild(E.createElement("option")),ct.type="checkbox",m.checkOn=""!==ct.value,m.optSelected=ft.selected,(ct=E.createElement("input")).value="t",ct.type="radio",m.radioValue="t"===ct.value;var xt,bt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return _(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):!(i&&"get"in i&&null!==(r=i.get(e,t)))&&null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),xt={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var a=bt[t]||k.find.attr;bt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=bt[o],bt[o]=r,r=null!=a(e,t,n)?o:null,bt[o]=i),r}});var wt=/^(?:input|select|textarea|button)$/i,Tt=/^(?:a|area)$/i;function Ct(e){return(e.match(M)||[]).join(" ")}function Et(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(M)||[]}k.fn.extend({prop:function(e,t){return _(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(x(t))return this.each(function(e){k(this).addClass(t.call(this,e,Et(this)))});if((e=kt(t)).length)for(;n=this[u++];)if(i=Et(n),r=1===n.nodeType&&" "+Ct(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=Ct(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(x(t))return this.each(function(e){k(this).removeClass(t.call(this,e,Et(this)))});if(!arguments.length)return this.attr("class","");if((e=kt(t)).length)for(;n=this[u++];)if(i=Et(n),r=1===n.nodeType&&" "+Ct(i)+" "){for(a=0;o=e[a++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");i!==(s=Ct(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"==o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):x(i)?this.each(function(e){k(this).toggleClass(i.call(this,e,Et(this),t),t)}):this.each(function(){var e,t,n,r;if(a)for(t=0,n=k(this),r=kt(i);e=r[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==i&&"boolean"!=o||((e=Et(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==i&&Q.get(this,"__className__")||""))})},hasClass:function(e){for(var t,n=0,r=" "+e+" ";t=this[n++];)if(1===t.nodeType&&-1<(" "+Ct(Et(t))+" ").indexOf(r))return!0;return!1}});var St=/\r/g;k.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=x(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,k(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=k.map(t,function(e){return null==e?"":e+""})),(r=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=k.valHooks[t.type]||k.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:Ct(k.text(e))}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u<s;u++)if(((n=r[u]).selected||u===i)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=k(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=k.makeArray(t),a=i.length;a--;)((r=i[a]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},m.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),m.focusin="onfocusin"in C;function Dt(e){e.stopPropagation()}var Nt=/^(?:focusinfocus|focusoutblur)$/;k.extend(k.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f=[n||E],p=y.call(e,"type")?e.type:e,d=y.call(e,"namespace")?e.namespace.split("."):[],h=c=o=n=n||E;if(3!==n.nodeType&&8!==n.nodeType&&!Nt.test(p+k.event.triggered)&&(-1<p.indexOf(".")&&(p=(d=p.split(".")).shift(),d.sort()),s=p.indexOf(":")<0&&"on"+p,(e=e[k.expando]?e:new k.Event(p,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=d.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),l=k.event.special[p]||{},r||!l.trigger||!1!==l.trigger.apply(n,t))){if(!r&&!l.noBubble&&!g(n)){for(a=l.delegateType||p,Nt.test(a+p)||(h=h.parentNode);h;h=h.parentNode)f.push(h),o=h;o===(n.ownerDocument||E)&&f.push(o.defaultView||o.parentWindow||C)}for(i=0;(h=f[i++])&&!e.isPropagationStopped();)c=h,e.type=1<i?a:l.bindType||p,(u=(Q.get(h,"events")||{})[e.type]&&Q.get(h,"handle"))&&u.apply(h,t),(u=s&&h[s])&&u.apply&&G(h)&&(e.result=u.apply(h,t),!1===e.result&&e.preventDefault());return e.type=p,r||e.isDefaultPrevented()||l._default&&!1!==l._default.apply(f.pop(),t)||!G(n)||s&&x(n[p])&&!g(n)&&((o=n[s])&&(n[s]=null),k.event.triggered=p,e.isPropagationStopped()&&c.addEventListener(p,Dt),n[p](),e.isPropagationStopped()&&c.removeEventListener(p,Dt),k.event.triggered=void 0,o&&(n[s]=o)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),m.focusin||k.each({focus:"focusin",blur:"focusout"},function(n,r){function i(e){k.event.simulate(r,e.target,k.event.fix(e))}k.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=Q.access(e,r);t||e.addEventListener(n,i,!0),Q.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=Q.access(e,r)-1;t?Q.access(e,r,t):(e.removeEventListener(n,i,!0),Q.remove(e,r))}}});var At=C.location,jt=Date.now(),qt=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Lt=/\[\]$/,Ht=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,Pt=/^(?:input|select|textarea|keygen)/i;k.param=function(e,t){function n(e,t){var n=x(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)}var r,i=[];if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){n(this.name,this.value)});else for(r in e)!function n(r,e,i,o){var t;if(Array.isArray(e))k.each(e,function(e,t){i||Lt.test(r)?o(r,t):n(r+"["+("object"==typeof t&&null!=t?e:"")+"]",t,i,o)});else if(i||"object"!==w(e))o(r,e);else for(t in e)n(r+"["+t+"]",e[t],i,o)}(r,e[r],t,n);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&Pt.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!le.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(Ht,"\r\n")}}):{name:t.name,value:n.replace(Ht,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,$t=/^(?:GET|HEAD)$/,Bt=/^\/\//,Ft={},_t={},zt="*/".concat("*"),Xt=E.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(M)||[];if(x(t))for(;n=i[r++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,k.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r=r||{})[n]=t[n]);return r&&k.extend(!0,e,r),e}Xt.href=At.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(At.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,k.ajaxSettings),t):Gt(k.ajaxSettings,e)},ajaxPrefilter:Ut(Ft),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=k.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?k(y):k.event,x=k.Deferred(),b=k.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n)for(n={};t=Wt.exec(p);)n[t[1].toLowerCase()]=t[2];t=n[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||At.href)+"").replace(Bt,At.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(M)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=k.param(v.data,v.traditional)),Vt(Ft,v,t,T),h)return T;for(i in(g=k.event&&v.global)&&0==k.active++&&k.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!$t.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(qt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(qt.test(f)?"&":"?")+"_="+jt+++o),v.url=f+o),v.ifModified&&(k.lastModified[f]&&T.setRequestHeader("If-Modified-Since",k.lastModified[f]),k.etag[f]&&T.setRequestHeader("If-None-Match",k.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a=a||i}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(k.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(k.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--k.active||k.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,i){k[i]=function(e,t,n,r){return x(t)&&(r=r||n,n=t,t=void 0),k.ajax(k.extend({url:e,type:i,dataType:r,data:t,success:n},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(x(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return x(n)?this.each(function(e){k(this).wrapInner(n.call(this,e))}):this.each(function(){var e=k(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=x(t);return this.each(function(e){k(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=k.ajaxSettings.xhr();m.cors=!!Qt&&"withCredentials"in Qt,m.ajax=Qt=!!Qt,k.ajaxTransport(function(i){var o,a;if(m.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(n){var r,i;if(n.crossDomain)return{send:function(e,t){r=k("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||k.expando+"_"+jt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=x(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(qt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&x(i)&&i(o[0]),o=i=void 0}),"script"}),m.createHTMLDocument=((Jt=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=A.exec(e))?[t.createElement(i[1])]:(i=me([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Ct(e.slice(s)),e=e.slice(0,s)),x(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),i=("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,r.left):(a=parseFloat(o)||0,parseFloat(u)||0),x(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||xe})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;return g(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n?r?r[i]:e[t]:void(r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n)},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=Qe(m.pixelPosition,function(e,t){if(t)return t=Ye(e,n),ze.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return g(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),x(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=N,k.isFunction=x,k.isWindow=g,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return k});var en=C.jQuery,tn=C.$;return k.noConflict=function(e){return C.$===k&&(C.$=tn),e&&C.jQuery===k&&(C.jQuery=en),k},e||(C.jQuery=C.$=k),k}); })(this);
 
 // 3rdParty/jquery-ui.js
-(function (window, undefined) { undefined })(this);
+(function (window, undefined) { !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(P){P.ui=P.ui||{};P.ui.version="1.12.1";var o,i=0,a=Array.prototype.slice;P.cleanData=(o=P.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)try{(e=P._data(i,"events"))&&e.remove&&P(i).triggerHandler("remove")}catch(t){}o(t)}),P.widget=function(t,i,e){var s,o,n,r={},a=t.split(".")[0],h=a+"-"+(t=t.split(".")[1]);return e||(e=i,i=P.Widget),P.isArray(e)&&(e=P.extend.apply(null,[{}].concat(e))),P.expr[":"][h.toLowerCase()]=function(t){return!!P.data(t,h)},P[a]=P[a]||{},s=P[a][t],o=P[a][t]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},P.extend(o,s,{version:e.version,_proto:P.extend({},e),_childConstructors:[]}),(n=new i).options=P.widget.extend({},n.options),P.each(e,function(e,s){function o(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}P.isFunction(s)?r[e]=function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=n,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:r[e]=s}),o.prototype=P.widget.extend(n,{widgetEventPrefix:s&&n.widgetEventPrefix||t},r,{constructor:o,namespace:a,widgetName:t,widgetFullName:h}),s?(P.each(s._childConstructors,function(t,e){var i=e.prototype;P.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete s._childConstructors):i._childConstructors.push(o),P.widget.bridge(t,o),o},P.widget.extend=function(t){for(var e,i,s=a.call(arguments,1),o=0,n=s.length;o<n;o++)for(e in s[o])i=s[o][e],s[o].hasOwnProperty(e)&&void 0!==i&&(P.isPlainObject(i)?t[e]=P.isPlainObject(t[e])?P.widget.extend({},t[e],i):P.widget.extend({},i):t[e]=i);return t},P.widget.bridge=function(n,e){var r=e.prototype.widgetFullName||n;P.fn[n]=function(i){var t="string"==typeof i,s=a.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=P.data(this,r);return"instance"===i?(o=e,!1):e?P.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,s))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:P.error("no such method '"+i+"' for "+n+" widget instance"):P.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(s.length&&(i=P.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=P.data(this,r);t?(t.option(i||{}),t._init&&t._init()):P.data(this,r,new e(i,this))})),o}},P.Widget=function(){},P.Widget._childConstructors=[],P.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=P(e||this.defaultElement||this)[0],this.element=P(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=P(),this.hoverable=P(),this.focusable=P(),this.classesElementLookup={},e!==this&&(P.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=P(e.style?e.ownerDocument:e.document||e),this.window=P(this.document[0].defaultView||this.document[0].parentWindow)),this.options=P.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:P.noop,_create:P.noop,_init:P.noop,destroy:function(){var i=this;this._destroy(),P.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:P.noop,widget:function(){return this.element},option:function(t,e){var i,s,o,n=t;if(0===arguments.length)return P.widget.extend({},this.options);if("string"==typeof t)if(n={},t=(i=t.split(".")).shift(),i.length){for(s=n[t]=P.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)s[i[o]]=s[i[o]]||{},s=s[i[o]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];n[t]=e}return this._setOptions(n),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=P(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var n=[],r=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=r.classesElementLookup[t[s]]||P(),i=o.add?P(P.unique(i.get().concat(o.element.get()))):P(i.not(o.element).get()),r.classesElementLookup[t[s]]=i,n.push(t[s]),e&&o.classes[t[s]]&&n.push(o.classes[t[s]])}return o=P.extend({element:this.element,classes:this.options.classes||{}},o),this._on(o.element,{remove:"_untrackClassesElement"}),o.keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(i){var s=this;P.each(s.classesElementLookup,function(t,e){-1!==P.inArray(i.target,e)&&(s.classesElementLookup[t]=P(e.not(i.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var o="string"==typeof t||null===t,n={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:s};return n.element.toggleClass(this._classes(n),s),this},_on:function(r,a,t){var h,l=this;"boolean"!=typeof r&&(t=a,a=r,r=!1),t?(a=h=P(a),this.bindings=this.bindings.add(a)):(t=a,a=this.element,h=this.widget()),P.each(t,function(t,e){function i(){if(r||!0!==l.options.disabled&&!P(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||P.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),o=s[1]+l.eventNamespace,n=s[2];n?h.on(o,n,i):a.on(o,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e).off(e),this.bindings=P(this.bindings.not(t).get()),this.focusable=P(this.focusable.not(t).get()),this.hoverable=P(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(P(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(P(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(P(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(P(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,o,n=this.options[t];if(i=i||{},(e=P.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(s in o)s in e||(e[s]=o[s]);return this.element.trigger(e,i),!(P.isFunction(n)&&!1===n.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},P.each({show:"fadeIn",hide:"fadeOut"},function(n,r){P.Widget.prototype["_"+n]=function(e,t,i){var s;"string"==typeof t&&(t={effect:t});var o=t?!0!==t&&"number"!=typeof t&&t.effect||r:n;"number"==typeof(t=t||{})&&(t={duration:t}),s=!P.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&P.effects&&P.effects.effect[o]?e[n](t):o!==n&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){P(this)[n](),i&&i.call(e[0]),t()})}});var n,x,C,s,r,h,l,c,z;P.widget;function H(t,e,i){return[parseFloat(t[0])*(c.test(t[0])?e/100:1),parseFloat(t[1])*(c.test(t[1])?i/100:1)]}function I(t,e){return parseInt(P.css(t,e),10)||0}x=Math.max,C=Math.abs,s=/left|center|right/,r=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,c=/%$/,z=P.fn.position,P.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,e,i=P("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=i.children()[0];return P("body").append(i),t=s.offsetWidth,i.css("overflow","scroll"),t===(e=s.offsetWidth)&&(e=i[0].clientWidth),i.remove(),n=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?P.position.scrollbarWidth():0,height:s?P.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=P(t||window),i=P.isWindow(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?P(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},P.fn.position=function(p){if(!p||!p.of)return z.apply(this,arguments);p=P.extend({},p);var f,u,d,g,m,t,e,v=P(p.of),_=P.position.getWithinInfo(p.within),b=P.position.getScrollInfo(_),w=(p.collision||"flip").split(" "),y={},i=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:P.isWindow(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()};return v[0].preventDefault&&(p.at="left top"),u=i.width,d=i.height,g=i.offset,m=P.extend({},g),P.each(["my","at"],function(){var t,e,i=(p[this]||"").split(" ");1===i.length&&(i=s.test(i[0])?i.concat(["center"]):r.test(i[0])?["center"].concat(i):["center","center"]),i[0]=s.test(i[0])?i[0]:"center",i[1]=r.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),y[this]=[t?t[0]:0,e?e[0]:0],p[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===p.at[0]?m.left+=u:"center"===p.at[0]&&(m.left+=u/2),"bottom"===p.at[1]?m.top+=d:"center"===p.at[1]&&(m.top+=d/2),f=H(y.at,u,d),m.left+=f[0],m.top+=f[1],this.each(function(){var i,t,r=P(this),a=r.outerWidth(),h=r.outerHeight(),e=I(this,"marginLeft"),s=I(this,"marginTop"),o=a+e+I(this,"marginRight")+b.width,n=h+s+I(this,"marginBottom")+b.height,l=P.extend({},m),c=H(y.my,r.outerWidth(),r.outerHeight());"right"===p.my[0]?l.left-=a:"center"===p.my[0]&&(l.left-=a/2),"bottom"===p.my[1]?l.top-=h:"center"===p.my[1]&&(l.top-=h/2),l.left+=c[0],l.top+=c[1],i={marginLeft:e,marginTop:s},P.each(["left","top"],function(t,e){P.ui.position[w[t]]&&P.ui.position[w[t]][e](l,{targetWidth:u,targetHeight:d,elemWidth:a,elemHeight:h,collisionPosition:i,collisionWidth:o,collisionHeight:n,offset:[f[0]+c[0],f[1]+c[1]],my:p.my,at:p.at,within:_,elem:r})}),p.using&&(t=function(t){var e=g.left-l.left,i=e+u-a,s=g.top-l.top,o=s+d-h,n={target:{element:v,left:g.left,top:g.top,width:u,height:d},element:{element:r,left:l.left,top:l.top,width:a,height:h},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<s?"bottom":"middle"};u<a&&C(e+i)<u&&(n.horizontal="center"),d<h&&C(s+o)<d&&(n.vertical="middle"),x(C(e),C(i))>x(C(s),C(o))?n.important="horizontal":n.important="vertical",p.using.call(this,t,n)}),r.offset(P.extend(l,{using:t}))})},P.ui.position={fit:{left:function(t,e){var i,s=e.within,o=s.isWindow?s.scrollLeft:s.offset.left,n=s.width,r=t.left-e.collisionPosition.marginLeft,a=o-r,h=r+e.collisionWidth-n-o;e.collisionWidth>n?0<a&&h<=0?(i=t.left+a+e.collisionWidth-n-o,t.left+=a-i):t.left=!(0<h&&a<=0)&&h<a?o+n-e.collisionWidth:o:0<a?t.left+=a:0<h?t.left-=h:t.left=x(t.left-r,t.left)},top:function(t,e){var i,s=e.within,o=s.isWindow?s.scrollTop:s.offset.top,n=e.within.height,r=t.top-e.collisionPosition.marginTop,a=o-r,h=r+e.collisionHeight-n-o;e.collisionHeight>n?0<a&&h<=0?(i=t.top+a+e.collisionHeight-n-o,t.top+=a-i):t.top=!(0<h&&a<=0)&&h<a?o+n-e.collisionHeight:o:0<a?t.top+=a:0<h?t.top-=h:t.top=x(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,o=e.within,n=o.offset.left+o.scrollLeft,r=o.width,a=o.isWindow?o.scrollLeft:o.offset.left,h=t.left-e.collisionPosition.marginLeft,l=h-a,c=h+e.collisionWidth-r-a,p="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,f="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,u=-2*e.offset[0];l<0?((i=t.left+p+f+u+e.collisionWidth-r-n)<0||i<C(l))&&(t.left+=p+f+u):0<c&&(0<(s=t.left-e.collisionPosition.marginLeft+p+f+u-a)||C(s)<c)&&(t.left+=p+f+u)},top:function(t,e){var i,s,o=e.within,n=o.offset.top+o.scrollTop,r=o.height,a=o.isWindow?o.scrollTop:o.offset.top,h=t.top-e.collisionPosition.marginTop,l=h-a,c=h+e.collisionHeight-r-a,p="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,u=-2*e.offset[1];l<0?((s=t.top+p+f+u+e.collisionHeight-r-n)<0||s<C(l))&&(t.top+=p+f+u):0<c&&(0<(i=t.top-e.collisionPosition.marginTop+p+f+u-a)||C(i)<c)&&(t.top+=p+f+u)}},flipfit:{left:function(){P.ui.position.flip.left.apply(this,arguments),P.ui.position.fit.left.apply(this,arguments)},top:function(){P.ui.position.flip.top.apply(this,arguments),P.ui.position.fit.top.apply(this,arguments)}}};P.ui.position,P.extend(P.expr[":"],{data:P.expr.createPseudo?P.expr.createPseudo(function(e){return function(t){return!!P.data(t,e)}}):function(t,e,i){return!!P.data(t,i[3])}}),P.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),P.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):P(this[0].form)},P.ui.formResetMixin={_formResetHandler:function(){var e=P(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");P.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element.form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(P.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},P.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},P.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var t=P(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&o.length?o:P(this[0].ownerDocument||document)},P.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var t,p=!1;P(document).on("mouseup",function(){p=!1});P.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===P.data(t.target,e.widgetName+".preventClickEvent"))return P.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!p){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&P(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===P.data(t.target,this.widgetName+".preventClickEvent")&&P.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),p=!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(P.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&P.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,p=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),P.ui.plugin={add:function(t,e,i){var s,o=P.ui[t].prototype;for(s in i)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var o,n=t.plugins[e];if(n&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<n.length;o++)t.options[n[o][0]]&&n[o][1].apply(t.element,i)}},P.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return(i=i||e.body).nodeName||(i=e.body),i},P.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&P(t).trigger("blur")};P.widget("ui.draggable",P.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<P(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=P(this);return P("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=P.ui.safeActiveElement(this.document[0]);P(t.target).closest(e).length||P.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),P.ui.ddmanager&&(P.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===P(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),P.ui.ddmanager&&!e.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),P.ui.ddmanager&&P.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp(new P.Event("mouseup",t)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",P.ui.ddmanager&&P.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return P.ui.ddmanager&&!this.options.dropBehaviour&&(i=P.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||P.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?P(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),P.ui.ddmanager&&P.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),P.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new P.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!P(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i=P.isFunction(e.helper),s=i?P(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&s[0]===this.element[0]&&this._setPositionRelative(),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),P.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&P.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options,o=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(i=(e=P(s.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=s.containment:this.containment=[0,0,P(o).width()-this.helperProportions.width-this.margins.left,(P(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[P(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,P(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,P(window).scrollLeft()+P(window).width()-this.helperProportions.width-this.margins.left,P(window).scrollTop()+(P(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,o,n,r=this.options,a=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(i=this.relativeContainer?(s=this.relativeContainer.offset(),[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),r.grid&&(o=r.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,l=!i||o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-r.grid[1]:o+r.grid[1],n=r.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,h=!i||n-this.offset.click.left>=i[0]||n-this.offset.click.left>i[2]?n:n-this.offset.click.left>=i[0]?n-r.grid[0]:n+r.grid[0]),"y"===r.axis&&(h=this.originalPageX),"x"===r.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),P.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),P.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),P.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=P.extend({},t,{item:i.element});i.sortables=[],P(i.options.connectToSortable).each(function(){var t=P(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=P.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,P.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,o){P.each(o.sortables,function(){var t=!1,e=this;e.positionAbs=o.positionAbs,e.helperProportions=o.helperProportions,e.offset.click=o.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,P.each(o.sortables,function(){return this.positionAbs=o.positionAbs,this.helperProportions=o.helperProportions,this.offset.click=o.offset.click,this!==e&&this._intersectsWith(this.containerCache)&&P.contains(e.element[0],this.element[0])&&(t=!1),t})),t?(e.isOver||(e.isOver=1,o._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=o.offset.click.top,e.offset.click.left=o.offset.click.left,e.offset.parent.left-=o.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=o.offset.parent.top-e.offset.parent.top,o._trigger("toSortable",i),o.dropped=e.element,P.each(o.sortables,function(){this.refreshPositions()}),o.currentItem=o.element,e.fromOutside=o),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(o._parent),o._refreshOffsets(i),s.position=o._generatePosition(i,!0),o._trigger("fromSortable",i),o.dropped=!1,P.each(o.sortables,function(){this.refreshPositions()}))})}}),P.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=P("body"),o=i.options;s.css("cursor")&&(o._cursor=s.css("cursor")),s.css("cursor",o.cursor)},stop:function(t,e,i){var s=i.options;s._cursor&&P("body").css("cursor",s._cursor)}}),P.ui.plugin.add("draggable","opacity",{start:function(t,e,i){var s=P(e.helper),o=i.options;s.css("opacity")&&(o._opacity=s.css("opacity")),s.css("opacity",o.opacity)},stop:function(t,e,i){var s=i.options;s._opacity&&P(e.helper).css("opacity",s._opacity)}}),P.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,o=!1,n=i.scrollParentNotHidden[0],r=i.document[0];n!==r&&"HTML"!==n.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+n.offsetHeight-t.pageY<s.scrollSensitivity?n.scrollTop=o=n.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(n.scrollTop=o=n.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+n.offsetWidth-t.pageX<s.scrollSensitivity?n.scrollLeft=o=n.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(n.scrollLeft=o=n.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-P(r).scrollTop()<s.scrollSensitivity?o=P(r).scrollTop(P(r).scrollTop()-s.scrollSpeed):P(window).height()-(t.pageY-P(r).scrollTop())<s.scrollSensitivity&&(o=P(r).scrollTop(P(r).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-P(r).scrollLeft()<s.scrollSensitivity?o=P(r).scrollLeft(P(r).scrollLeft()-s.scrollSpeed):P(window).width()-(t.pageX-P(r).scrollLeft())<s.scrollSensitivity&&(o=P(r).scrollLeft(P(r).scrollLeft()+s.scrollSpeed)))),!1!==o&&P.ui.ddmanager&&!s.dropBehaviour&&P.ui.ddmanager.prepareOffsets(i,t)}}),P.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],P(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=P(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){for(var s,o,n,r,a,h,l,c,p,f=i.options,u=f.snapTolerance,d=e.offset.left,g=d+i.helperProportions.width,m=e.offset.top,v=m+i.helperProportions.height,_=i.snapElements.length-1;0<=_;_--)h=(a=i.snapElements[_].left-i.margins.left)+i.snapElements[_].width,c=(l=i.snapElements[_].top-i.margins.top)+i.snapElements[_].height,g<a-u||h+u<d||v<l-u||c+u<m||!P.contains(i.snapElements[_].item.ownerDocument,i.snapElements[_].item)?(i.snapElements[_].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,P.extend(i._uiHash(),{snapItem:i.snapElements[_].item})),i.snapElements[_].snapping=!1):("inner"!==f.snapMode&&(s=Math.abs(l-v)<=u,o=Math.abs(c-m)<=u,n=Math.abs(a-g)<=u,r=Math.abs(h-d)<=u,s&&(e.position.top=i._convertPositionTo("relative",{top:l-i.helperProportions.height,left:0}).top),o&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),n&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a-i.helperProportions.width}).left),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:h}).left)),p=s||o||n||r,"outer"!==f.snapMode&&(s=Math.abs(l-m)<=u,o=Math.abs(c-v)<=u,n=Math.abs(a-d)<=u,r=Math.abs(h-g)<=u,s&&(e.position.top=i._convertPositionTo("relative",{top:l,left:0}).top),o&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),n&&(e.position.left=i._convertPositionTo("relative",{top:0,left:a}).left),r&&(e.position.left=i._convertPositionTo("relative",{top:0,left:h-i.helperProportions.width}).left)),!i.snapElements[_].snapping&&(s||o||n||r||p)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,P.extend(i._uiHash(),{snapItem:i.snapElements[_].item})),i.snapElements[_].snapping=s||o||n||r||p)}}),P.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,o=i.options,n=P.makeArray(P(o.stack)).sort(function(t,e){return(parseInt(P(t).css("zIndex"),10)||0)-(parseInt(P(e).css("zIndex"),10)||0)});n.length&&(s=parseInt(P(n[0]).css("zIndex"),10)||0,P(n).each(function(t){P(this).css("zIndex",s+t)}),this.css("zIndex",s+n.length))}}),P.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){var s=P(e.helper),o=i.options;s.css("zIndex")&&(o._zIndex=s.css("zIndex")),s.css("zIndex",o.zIndex)},stop:function(t,e,i){var s=i.options;s._zIndex&&P(e.helper).css("zIndex",s._zIndex)}});P.ui.draggable;P.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=P.isFunction(i)?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){P.ui.ddmanager.droppables[t]=P.ui.ddmanager.droppables[t]||[],P.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=P.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){var i;"accept"===t?this.accept=P.isFunction(e)?e:function(t){return t.is(e)}:"scope"===t&&(i=P.ui.ddmanager.droppables[this.options.scope],this._splice(i),this._addToManager(e)),this._super(t,e)},_activate:function(t){var e=P.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=P.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=P.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=P.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||P.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=P(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&f(i,P.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(s=!0)}),!s&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var f=P.ui.intersect=function(t,e,i,s){if(!e.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,n=(t.positionAbs||t.position.absolute).top+t.margins.top,r=o+t.helperProportions.width,a=n+t.helperProportions.height,h=e.offset.left,l=e.offset.top,c=h+e.proportions().width,p=l+e.proportions().height;switch(i){case"fit":return h<=o&&r<=c&&l<=n&&a<=p;case"intersect":return h<o+t.helperProportions.width/2&&r-t.helperProportions.width/2<c&&l<n+t.helperProportions.height/2&&a-t.helperProportions.height/2<p;case"pointer":return u(s.pageY,l,e.proportions().height)&&u(s.pageX,h,e.proportions().width);case"touch":return(l<=n&&n<=p||l<=a&&a<=p||n<l&&p<a)&&(h<=o&&o<=c||h<=r&&r<=c||o<h&&c<r);default:return!1}};function u(t,e,i){return e<=t&&t<e+i}!(P.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,s,o=P.ui.ddmanager.droppables[t.options.scope]||[],n=e?e.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<o.length;i++)if(!(o[i].options.disabled||t&&!o[i].accept.call(o[i].element[0],t.currentItem||t.element))){for(s=0;s<r.length;s++)if(r[s]===o[i].element[0]){o[i].proportions().height=0;continue t}o[i].visible="none"!==o[i].element.css("display"),o[i].visible&&("mousedown"===n&&o[i]._activate.call(o[i],e),o[i].offset=o[i].element.offset(),o[i].proportions({width:o[i].element[0].offsetWidth,height:o[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return P.each((P.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&f(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e)))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||P.ui.ddmanager.prepareOffsets(t,e)})},drag:function(n,r){n.options.refreshPositions&&P.ui.ddmanager.prepareOffsets(n,r),P.each(P.ui.ddmanager.droppables[n.options.scope]||[],function(){var t,e,i,s,o;this.options.disabled||this.greedyChild||!this.visible||(o=!(s=f(n,this,this.options.tolerance,r))&&this.isover?"isout":s&&!this.isover?"isover":null)&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return P(this).droppable("instance").options.scope===e})).length&&((t=P(i[0]).droppable("instance")).greedyChild="isover"===o)),t&&"isover"===o&&(t.isover=!1,t.isout=!0,t._out.call(t,r)),this[o]=!0,this["isout"===o?"isover":"isout"]=!1,this["isover"===o?"_over":"_out"].call(this,r),t&&"isout"===o&&(t.isout=!1,t.isover=!0,t._over.call(t,r)))})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||P.ui.ddmanager.prepareOffsets(t,e)}})!==P.uiBackCompat&&P.widget("ui.droppable",P.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});P.ui.droppable;P.widget("ui.resizable",P.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===P(t).css("overflow"))return!1;var i,s=e&&"left"===e?"scrollLeft":"scrollTop";return 0<t[s]||(t[s]=1,i=0<t[s],t[s]=0,i)},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),P.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(P("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&P(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();function t(t){P(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var t,e,i,s,o,n=this.options,r=this;if(this.handles=n.handles||(P(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=P(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=P.trim(i[e])),o=P("<div>"),this._addClass(o,"ui-resizable-handle "+s),o.css({zIndex:n.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.append(o);this._renderAxis=function(t){var e,i,s,o;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=P(this.handles[e]),this._on(this.handles[e],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=P(this.handles[e],this.element),o=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),s=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(s,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),n.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=P(this.handles[e])[0])!==t.target&&!P.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s,o=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),o.containment&&(e+=P(o.containment).scrollLeft()||0,i+=P(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=P(".ui-resizable-"+this.axis).css("cursor"),P("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e,i,s=this.originalMousePosition,o=this.axis,n=t.pageX-s.left||0,r=t.pageY-s.top||0,a=this._change[o];return this._updatePrevProperties(),a&&(e=a.apply(this,[t,n,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),P.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,o,n,r,a,h=this.options,l=this;return this._helper&&(s=(i=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:l.sizeDiff.height,o=i?0:l.sizeDiff.width,n={width:l.helper.width()-o,height:l.helper.height()-s},r=parseFloat(l.element.css("left"))+(l.position.left-l.originalPosition.left)||null,a=parseFloat(l.element.css("top"))+(l.position.top-l.originalPosition.top)||null,h.animate||this.element.css(P.extend(n,{top:a,left:r})),l.helper.height(l.size.height),l.helper.width(l.size.width),this._helper&&!h.animate&&this._proportionallyResize()),P("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,o,n=this.options,r={minWidth:this._isNumber(n.minWidth)?n.minWidth:0,maxWidth:this._isNumber(n.maxWidth)?n.maxWidth:1/0,minHeight:this._isNumber(n.minHeight)?n.minHeight:0,maxHeight:this._isNumber(n.maxHeight)?n.maxHeight:1/0};(this._aspectRatio||t)&&(e=r.minHeight*this.aspectRatio,s=r.minWidth/this.aspectRatio,i=r.maxHeight*this.aspectRatio,o=r.maxWidth/this.aspectRatio,e>r.minWidth&&(r.minWidth=e),s>r.minHeight&&(r.minHeight=s),i<r.maxWidth&&(r.maxWidth=i),o<r.maxHeight&&(r.maxHeight=o)),this._vBoundaries=r},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,n=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return n&&(t.width=e.minWidth),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),n&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),r&&c&&(t.top=h-e.minHeight),o&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],o=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(o[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||P("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return P.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return P.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return P.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return P.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){P.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),P.ui.plugin.add("resizable","animate",{stop:function(e){var i=P(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),n=o&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,a={width:i.size.width-r,height:i.size.height-n},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,l=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(P.extend(a,l&&h?{top:l,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&P(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),P.ui.plugin.add("resizable","containment",{start:function(){var i,s,t,e,o,n,r,a=P(this).resizable("instance"),h=a.options,l=a.element,c=h.containment,p=c instanceof P?c.get(0):/parent/.test(c)?l.parent().get(0):c;p&&(a.containerElement=P(p),/document/.test(c)||c===document?(a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:P(document),left:0,top:0,width:P(document).width(),height:P(document).height()||document.body.parentNode.scrollHeight}):(i=P(p),s=[],P(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=a._num(i.css("padding"+e))}),a.containerOffset=i.offset(),a.containerPosition=i.position(),a.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=a.containerOffset,e=a.containerSize.height,o=a.containerSize.width,n=a._hasScroll(p,"left")?p.scrollWidth:o,r=a._hasScroll(p)?p.scrollHeight:e,a.parentData={element:p,left:t.left,top:t.top,width:n,height:r}))},resize:function(t){var e,i,s,o,n=P(this).resizable("instance"),r=n.options,a=n.containerOffset,h=n.position,l=n._aspectRatio||t.shiftKey,c={top:0,left:0},p=n.containerElement,f=!0;p[0]!==document&&/static/.test(p.css("position"))&&(c=a),h.left<(n._helper?a.left:0)&&(n.size.width=n.size.width+(n._helper?n.position.left-a.left:n.position.left-c.left),l&&(n.size.height=n.size.width/n.aspectRatio,f=!1),n.position.left=r.helper?a.left:0),h.top<(n._helper?a.top:0)&&(n.size.height=n.size.height+(n._helper?n.position.top-a.top:n.position.top),l&&(n.size.width=n.size.height*n.aspectRatio,f=!1),n.position.top=n._helper?a.top:0),s=n.containerElement.get(0)===n.element.parent().get(0),o=/relative|absolute/.test(n.containerElement.css("position")),s&&o?(n.offset.left=n.parentData.left+n.position.left,n.offset.top=n.parentData.top+n.position.top):(n.offset.left=n.element.offset().left,n.offset.top=n.element.offset().top),e=Math.abs(n.sizeDiff.width+(n._helper?n.offset.left-c.left:n.offset.left-a.left)),i=Math.abs(n.sizeDiff.height+(n._helper?n.offset.top-c.top:n.offset.top-a.top)),e+n.size.width>=n.parentData.width&&(n.size.width=n.parentData.width-e,l&&(n.size.height=n.size.width/n.aspectRatio,f=!1)),i+n.size.height>=n.parentData.height&&(n.size.height=n.parentData.height-i,l&&(n.size.width=n.size.height*n.aspectRatio,f=!1)),f||(n.position.left=n.prevPosition.left,n.position.top=n.prevPosition.top,n.size.width=n.prevSize.width,n.size.height=n.prevSize.height)},stop:function(){var t=P(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,o=t.containerElement,n=P(t.helper),r=n.offset(),a=n.outerWidth()-t.sizeDiff.width,h=n.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(o.css("position"))&&P(this).css({left:r.left-s.left-i.left,width:a,height:h}),t._helper&&!e.animate&&/static/.test(o.css("position"))&&P(this).css({left:r.left-s.left-i.left,width:a,height:h})}}),P.ui.plugin.add("resizable","alsoResize",{start:function(){var t=P(this).resizable("instance").options;P(t.alsoResize).each(function(){var t=P(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=P(this).resizable("instance"),s=e.options,o=e.originalSize,n=e.originalPosition,r={height:e.size.height-o.height||0,width:e.size.width-o.width||0,top:e.position.top-n.top||0,left:e.position.left-n.left||0};P(s.alsoResize).each(function(){var t=P(this),s=P(this).data("ui-resizable-alsoresize"),o={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];P.each(e,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&0<=i&&(o[e]=i||null)}),t.css(o)})},stop:function(){P(this).removeData("ui-resizable-alsoresize")}}),P.ui.plugin.add("resizable","ghost",{start:function(){var t=P(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==P.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=P(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=P(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),P.ui.plugin.add("resizable","grid",{resize:function(){var t,e=P(this).resizable("instance"),i=e.options,s=e.size,o=e.originalSize,n=e.originalPosition,r=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=a[0]||1,l=a[1]||1,c=Math.round((s.width-o.width)/h)*h,p=Math.round((s.height-o.height)/l)*l,f=o.width+c,u=o.height+p,d=i.maxWidth&&i.maxWidth<f,g=i.maxHeight&&i.maxHeight<u,m=i.minWidth&&i.minWidth>f,v=i.minHeight&&i.minHeight>u;i.grid=a,m&&(f+=h),v&&(u+=l),d&&(f-=h),g&&(u-=l),/^(se|s|e)$/.test(r)?(e.size.width=f,e.size.height=u):/^(ne)$/.test(r)?(e.size.width=f,e.size.height=u,e.position.top=n.top-p):/^(sw)$/.test(r)?(e.size.width=f,e.size.height=u,e.position.left=n.left-c):((u-l<=0||f-h<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<u-l?(e.size.height=u,e.position.top=n.top-p):(u=l-t.height,e.size.height=u,e.position.top=n.top+o.height-u),0<f-h?(e.size.width=f,e.position.left=n.left-c):(f=h-t.width,e.size.width=f,e.position.left=n.left+o.width-f))}});P.ui.resizable,P.widget("ui.selectable",P.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var s=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){s.elementPos=P(s.element[0]).offset(),s.selectees=P(s.options.filter,s.element[0]),s._addClass(s.selectees,"ui-selectee"),s.selectees.each(function(){var t=P(this),e=t.offset(),i={left:e.left-s.elementPos.left,top:e.top-s.elementPos.top};P.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=P("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=P(this.element[0]).offset(),this.options.disabled||(this.selectees=P(t.filter,this.element[0]),this._trigger("start",i),P(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=P.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),P(i.target).parents().addBack().each(function(){var t,e=P.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){if(this.dragged=!0,!this.options.disabled){var t,o=this,n=this.options,r=this.opos[0],a=this.opos[1],h=s.pageX,l=s.pageY;return h<r&&(t=h,h=r,r=t),l<a&&(t=l,l=a,a=t),this.helper.css({left:r,top:a,width:h-r,height:l-a}),this.selectees.each(function(){var t=P.data(this,"selectable-item"),e=!1,i={};t&&t.element!==o.element[0]&&(i.left=t.left+o.elementPos.left,i.right=t.right+o.elementPos.left,i.top=t.top+o.elementPos.top,i.bottom=t.bottom+o.elementPos.top,"touch"===n.tolerance?e=!(i.left>h||i.right<r||i.top>l||i.bottom<a):"fit"===n.tolerance&&(e=i.left>r&&i.right<h&&i.top>a&&i.bottom<l),e?(t.selected&&(o._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(o._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(o._addClass(t.$element,"ui-selecting"),t.selecting=!0,o._trigger("selecting",s,{selecting:t.element}))):(t.selecting&&((s.metaKey||s.ctrlKey)&&t.startselected?(o._removeClass(t.$element,"ui-selecting"),t.selecting=!1,o._addClass(t.$element,"ui-selected"),t.selected=!0):(o._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(o._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),o._trigger("unselecting",s,{unselecting:t.element}))),t.selected&&(s.metaKey||s.ctrlKey||t.startselected||(o._removeClass(t.$element,"ui-selected"),t.selected=!1,o._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,o._trigger("unselecting",s,{unselecting:t.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,P(".ui-unselecting",this.element[0]).each(function(){var t=P.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),P(".ui-selecting",this.element[0]).each(function(){var t=P.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),P.widget("ui.sortable",P.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),P.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),P(t.target).parents().each(function(){if(P.data(this,o.widgetName+"-item")===o)return i=P(this),!1}),P.data(t.target,o.widgetName+"-item")===o&&(i=P(t.target)),!!i&&(!(this.options.handle&&!e&&(P(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,e,i){var s,o,n=this.options;if((this.currentContainer=this).refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},P.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),n.containment&&this._setContainment(),n.cursor&&"auto"!==n.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",n.cursor),this.storedStylesheet=P("<style>*{ cursor: "+n.cursor+" !important; }</style>").appendTo(o)),n.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",n.opacity)),n.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",n.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return P.ui.ddmanager&&(P.ui.ddmanager.current=this),P.ui.ddmanager&&!n.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,i,s,o,n=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-this.overflowOffset.top<n.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-n.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-this.overflowOffset.left<n.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-n.scrollSpeed)):(t.pageY-this.document.scrollTop()<n.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-n.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<n.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+n.scrollSpeed)),t.pageX-this.document.scrollLeft()<n.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-n.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<n.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+n.scrollSpeed))),!1!==r&&P.ui.ddmanager&&!n.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(o=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===s||P.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&P.contains(this.element[0],s))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),P.ui.ddmanager&&P.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,o,n;if(t)return P.ui.ddmanager&&!this.options.dropBehaviour&&P.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),n={},(o=this.options.axis)&&"x"!==o||(n.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(n.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,P(this.helper).animate(n,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new P.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),P.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?P(this.domPosition.prev).after(this.currentItem):P(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},P(t).each(function(){var t=(P(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(P(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,o=s+this.helperProportions.height,n=t.left,r=n+t.width,a=t.top,h=a+t.height,l=this.offset.click.top,c=this.offset.click.left,p="x"===this.options.axis||a<s+l&&s+l<h,f="y"===this.options.axis||n<e+c&&e+c<r,u=p&&f;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u:n<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<s+this.helperProportions.height/2&&o-this.helperProportions.height/2<h},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!s||!o)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&i||"left"===o&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,o,n=[],r=[],a=this._connectWith();if(a&&t)for(e=a.length-1;0<=e;e--)for(i=(s=P(a[e],this.document[0])).length-1;0<=i;i--)(o=P.data(s[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&r.push([P.isFunction(o.options.items)?o.options.items.call(o.element):P(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function h(){n.push(this)}for(r.push([P.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):P(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=r.length-1;0<=e;e--)r[e][0].each(h);return P(n)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=P.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,o,n,r,a,h,l=this.items,c=[[P.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):P(this.options.items,this.element),this]],p=this._connectWith();if(p&&this.ready)for(e=p.length-1;0<=e;e--)for(i=(s=P(p[e],this.document[0])).length-1;0<=i;i--)(o=P.data(s[i],this.widgetFullName))&&o!==this&&!o.options.disabled&&(c.push([P.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):P(o.options.items,o.element),o]),this.containers.push(o));for(e=c.length-1;0<=e;e--)for(n=c[e][1],i=0,h=(r=c[e][0]).length;i<h;i++)(a=P(r[i])).data(this.widgetName+"-item",n),l.push({item:a,instance:n,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var e,i,s,o;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),e=this.items.length-1;0<=e;e--)(i=this.items[e]).instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?P(this.options.toleranceElement,i.item):i.item,t||(i.width=s.outerWidth(),i.height=s.outerHeight()),o=s.offset(),i.left=o.left,i.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)o=this.containers[e].element.offset(),this.containers[e].containerCache.left=o.left,this.containers[e].containerCache.top=o.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(s=o.placeholder,o.placeholder={element:function(){var t=i.currentItem[0].nodeName.toLowerCase(),e=P("<"+t+">",i.document[0]);return i._addClass(e,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(e,"ui-sortable-helper"),"tbody"===t?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),P("<tr>",i.document[0]).appendTo(e)):"tr"===t?i._createTrPlaceholder(i.currentItem,e):"img"===t&&e.attr("src",i.currentItem.attr("src")),s||e.css("visibility","hidden"),e},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=P(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){P("<td>&#160;</td>",i.document[0]).attr("colspan",P(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,o,n,r,a,h,l,c=null,p=null,f=this.containers.length-1;0<=f;f--)if(!P.contains(this.currentItem[0],this.containers[f].element[0]))if(this._intersectsWith(this.containers[f].containerCache)){if(c&&P.contains(this.containers[f].element[0],c.element[0]))continue;c=this.containers[f],p=f}else this.containers[f].containerCache.over&&(this.containers[f]._trigger("out",t,this._uiHash(this)),this.containers[f].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(i=1e4,s=null,o=(h=c.floating||this._isFloating(this.currentItem))?"left":"top",n=h?"width":"height",l=h?"pageX":"pageY",e=this.items.length-1;0<=e;e--)P.contains(this.containers[p].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(r=this.items[e].item.offset()[o],a=!1,t[l]-r>this.items[e][n]/2&&(a=!0),Math.abs(t[l]-r)<i&&(i=Math.abs(t[l]-r),s=this.items[e],this.direction=a?"up":"down"));if(!s&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var e=this.options,i=P.isFunction(e.helper)?P(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||P("parent"!==e.appendTo?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),i[0].style.width&&!e.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!e.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),P.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&P.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&P.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),"document"!==s.containment&&"window"!==s.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===s.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===s.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(t=P(s.containment)[0],e=P(s.containment).offset(),i="hidden"!==P(t).css("overflow"),this.containment=[e.left+(parseInt(P(t).css("borderLeftWidth"),10)||0)+(parseInt(P(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(P(t).css("borderTopWidth"),10)||0)+(parseInt(P(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(P(t).css("borderLeftWidth"),10)||0)-(parseInt(P(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(P(t).css("borderTopWidth"),10)||0)-(parseInt(P(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&P.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*i}},_generatePosition:function(t){var e,i,s=this.options,o=t.pageX,n=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&P.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(n=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(n=this.containment[3]+this.offset.click.top)),s.grid&&(e=this.originalPageY+Math.round((n-this.originalPageY)/s.grid[1])*s.grid[1],n=!this.containment||e-this.offset.click.top>=this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-s.grid[1]:e+s.grid[1],i=this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0],o=!this.containment||i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-s.grid[0]:i+s.grid[0])),{top:n-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function o(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(o("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(o("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===P.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||P([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}});var d,g,m,v,e,_,b,w,y,S,W,T,k,D,E,N,O,R,L,M,A,F="ui-effects-",B="ui-effects-style",X="ui-effects-animated",Y=P;function q(t,e,i){var s=w[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:t<0?0:s.max<t?s.max:t)}function j(r){var a=_(),h=a._rgba=[];return r=r.toLowerCase(),W(e,function(t,e){var i,s=e.re.exec(r),o=s&&e.parse(s),n=e.space||"rgba";if(o)return i=a[n](o),a[b[n].cache]=i[b[n].cache],h=a._rgba=i._rgba,!1}),h.length?("0,0,0,0"===h.join()&&d.extend(h,m.transparent),a):m[r]}function $(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function U(t){var e,i,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,o={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)"string"==typeof s[e=s[i]]&&(o[P.camelCase(e)]=s[e]);else for(e in s)"string"==typeof s[e]&&(o[e]=s[e]);return o}function K(t,e,i,s){return P.isPlainObject(t)&&(t=(e=t).effect),t={effect:t},null==e&&(e={}),P.isFunction(e)&&(s=e,i=null,e={}),"number"!=typeof e&&!P.fx.speeds[e]||(s=i,i=e,e={}),P.isFunction(i)&&(s=i,i=null),e&&P.extend(t,e),i=i||e.duration,t.duration=P.fx.off?0:"number"==typeof i?i:i in P.fx.speeds?P.fx.speeds[i]:P.fx.speeds._default,t.complete=s||e.complete,t}function V(t){return!t||"number"==typeof t||P.fx.speeds[t]||("string"==typeof t&&!P.effects.effect[t]||(P.isFunction(t)||"object"==typeof t&&!t.effect))}function Q(t,e){var i=e.outerWidth(),s=e.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}P.effects={effect:{}},v=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],_=(d=Y).Color=function(t,e,i,s){return new d.Color.fn.parse(t,e,i,s)},b={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},w={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},y=_.support={},S=d("<p>")[0],W=d.each,S.style.cssText="background-color:rgba(1,1,1,.5)",y.rgba=-1<S.style.backgroundColor.indexOf("rgba"),W(b,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),_.fn=d.extend(_.prototype,{parse:function(o,t,e,i){if(o===g)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=d(o).css(t),t=g);var n=this,s=d.type(o),r=this._rgba=[];return t!==g&&(o=[o,t,e,i],s="array"),"string"===s?this.parse(j(o)||m._default):"array"===s?(W(b.rgba.props,function(t,e){r[e.idx]=q(o[e.idx],e)}),this):"object"===s?(W(b,o instanceof _?function(t,e){o[e.cache]&&(n[e.cache]=o[e.cache].slice())}:function(t,i){var s=i.cache;W(i.props,function(t,e){if(!n[s]&&i.to){if("alpha"===t||null==o[t])return;n[s]=i.to(n._rgba)}n[s][e.idx]=q(o[t],e,!0)}),n[s]&&d.inArray(null,n[s].slice(0,3))<0&&(n[s][3]=1,i.from&&(n._rgba=i.from(n[s])))}),this):void 0},is:function(t){var o=_(t),n=!0,r=this;return W(b,function(t,e){var i,s=o[e.cache];return s&&(i=r[e.cache]||e.to&&e.to(r._rgba)||[],W(e.props,function(t,e){if(null!=s[e.idx])return n=s[e.idx]===i[e.idx]})),n}),n},_space:function(){var i=[],s=this;return W(b,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,r){var e=(l=_(t))._space(),i=b[e],s=0===this.alpha()?_("transparent"):this,a=s[i.cache]||i.to(s._rgba),h=a.slice(),l=l[i.cache];return W(i.props,function(t,e){var i=e.idx,s=a[i],o=l[i],n=w[e.type]||{};null!==o&&(null===s?h[i]=o:(n.mod&&(n.mod/2<o-s?s+=n.mod:n.mod/2<s-o&&(s-=n.mod)),h[i]=q((o-s)*r+s,e)))}),this[e](h)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),s=_(t)._rgba;return _(d.map(e,function(t,e){return(1-i)*s[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=d.map(this._rgba,function(t,e){return null==t?2<e?1:0:t});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=d.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+d.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),_.fn.parse.prototype=_.fn,b.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/255,i=t[1]/255,s=t[2]/255,o=t[3],n=Math.max(e,i,s),r=Math.min(e,i,s),a=n-r,h=n+r,l=.5*h,c=r===n?0:e===n?60*(i-s)/a+360:i===n?60*(s-e)/a+120:60*(e-i)/a+240,p=0==a?0:l<=.5?a/h:a/(2-h);return[Math.round(c)%360,p,l,null==o?1:o]},b.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],n=s<=.5?s*(1+i):s+i-s*i,r=2*s-n;return[Math.round(255*$(r,n,e+1/3)),Math.round(255*$(r,n,e)),Math.round(255*$(r,n,e-1/3)),o]},W(b,function(h,t){var i=t.props,r=t.cache,a=t.to,l=t.from;_.fn[h]=function(t){if(a&&!this[r]&&(this[r]=a(this._rgba)),t===g)return this[r].slice();var e,s=d.type(t),o="array"===s||"object"===s?t:arguments,n=this[r].slice();return W(i,function(t,e){var i=o["object"===s?t:e.idx];null==i&&(i=n[e.idx]),n[e.idx]=q(i,e)}),l?((e=_(l(n)))[r]=n,e):_(n)},W(i,function(r,a){_.fn[r]||(_.fn[r]=function(t){var e,i=d.type(t),s="alpha"===r?this._hsla?"hsla":"rgba":h,o=this[s](),n=o[a.idx];return"undefined"===i?n:("function"===i&&(t=t.call(this,n),i=d.type(t)),null==t&&a.empty?this:("string"===i&&(e=v.exec(t))&&(t=n+parseFloat(e[2])*("+"===e[1]?1:-1)),o[a.idx]=t,this[s](o)))})})}),_.hook=function(t){var e=t.split(" ");W(e,function(t,n){d.cssHooks[n]={set:function(t,e){var i,s,o="";if("transparent"!==e&&("string"!==d.type(e)||(i=j(e)))){if(e=_(i||e),!y.rgba&&1!==e._rgba[3]){for(s="backgroundColor"===n?t.parentNode:t;(""===o||"transparent"===o)&&s&&s.style;)try{o=d.css(s,"backgroundColor"),s=s.parentNode}catch(t){}e=e.blend(o&&"transparent"!==o?o:"_default")}e=e.toRgbaString()}try{t.style[n]=e}catch(t){}}},d.fx.step[n]=function(t){t.colorInit||(t.start=_(t.elem,n),t.end=_(t.end),t.colorInit=!0),d.cssHooks[n].set(t.elem,t.start.transition(t.end,t.pos))}})},_.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),d.cssHooks.borderColor={expand:function(i){var s={};return W(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}},m=d.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},E=["add","remove","toggle"],N={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},P.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){P.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(Y.style(t.elem,e,t.end),t.setAttr=!0)}}),P.fn.addBack||(P.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),P.effects.animateClass=function(o,t,e,i){var n=P.speed(t,e,i);return this.queue(function(){var i=P(this),t=i.attr("class")||"",e=(e=n.children?i.find("*").addBack():i).map(function(){return{el:P(this),start:U(this)}}),s=function(){P.each(E,function(t,e){o[e]&&i[e+"Class"](o[e])})};s(),e=e.map(function(){return this.end=U(this.el[0]),this.diff=function(t,e){var i,s,o={};for(i in e)s=e[i],t[i]!==s&&(N[i]||!P.fx.step[i]&&isNaN(parseFloat(s))||(o[i]=s));return o}(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=P.Deferred(),i=P.extend({},n,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),P.when.apply(P,e.get()).done(function(){s(),P.each(arguments,function(){var e=this.el;P.each(this.diff,function(t){e.css(t,"")})}),n.complete.call(i[0])})})},P.fn.extend({addClass:(D=P.fn.addClass,function(t,e,i,s){return e?P.effects.animateClass.call(this,{add:t},e,i,s):D.apply(this,arguments)}),removeClass:(k=P.fn.removeClass,function(t,e,i,s){return 1<arguments.length?P.effects.animateClass.call(this,{remove:t},e,i,s):k.apply(this,arguments)}),toggleClass:(T=P.fn.toggleClass,function(t,e,i,s,o){return"boolean"==typeof e||void 0===e?i?P.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,o):T.apply(this,arguments):P.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,o){return P.effects.animateClass.call(this,{add:e,remove:t},i,s,o)}}),P.expr&&P.expr.filters&&P.expr.filters.animated&&(P.expr.filters.animated=(O=P.expr.filters.animated,function(t){return!!P(t).data(X)||O(t)})),!1!==P.uiBackCompat&&P.extend(P.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(F+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,o=e.length;s<o;s++)null!==e[s]&&(i=t.data(F+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=P("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return i.wrap(t),i[0]!==o&&!P.contains(i[0],o)||P(o).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(P.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),P.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!P.contains(t[0],e)||P(e).trigger("focus")),t}}),P.extend(P.effects,{version:"1.12.1",define:function(t,e,i){return i||(i=e,e="effect"),P.effects.effect[t]=i,P.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,o="vertical"!==i?(e||100)/100:1;return{height:t.height()*o,width:t.width()*s,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1<e&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(B,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(B)||"",t.removeData(B)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(t){var e,i=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=P("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(F+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=F+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){P.effects.restoreStyle(t),P.effects.removePlaceholder(t)},setTransition:function(s,t,o,n){return n=n||{},P.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(n[e]=i[0]*o+i[1])}),n}}),P.fn.extend({effect:function(){function t(t){var e=P(this),i=P.effects.mode(e,a)||n;e.data(X,!0),h.push(i),n&&("show"===i||i===n&&"hide"===i)&&e.show(),n&&"none"===i||P.effects.saveStyle(e),P.isFunction(t)&&t()}var s=K.apply(this,arguments),o=P.effects.effect[s.effect],n=o.mode,e=s.queue,i=e||"fx",r=s.complete,a=s.mode,h=[];if(P.fx.off||!o)return a?this[a](s.duration,r):this.each(function(){r&&r.call(this)});function l(t){var e=P(this);function i(){P.isFunction(r)&&r.call(e[0]),P.isFunction(t)&&t()}s.mode=h.shift(),!1===P.uiBackCompat||n?"none"===s.mode?(e[a](),i()):o.call(e[0],s,function(){e.removeData(X),P.effects.cleanUp(e),"hide"===s.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===a:"show"===a)?(e[a](),i()):o.call(e[0],s,i)}return!1===e?this.each(t).each(l):this.queue(i,t).queue(i,l)},show:(M=P.fn.show,function(t){if(V(t))return M.apply(this,arguments);var e=K.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}),hide:(L=P.fn.hide,function(t){if(V(t))return L.apply(this,arguments);var e=K.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}),toggle:(R=P.fn.toggle,function(t){if(V(t)||"boolean"==typeof t)return R.apply(this,arguments);var e=K.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}),cssUnit:function(t){var i=this.css(t),s=[];return P.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):Q(this.css("clip"),this)},transfer:function(t,e){var i=P(this),s=P(t.to),o="fixed"===s.css("position"),n=P("body"),r=o?n.scrollTop():0,a=o?n.scrollLeft():0,h=s.offset(),l={top:h.top-r,left:h.left-a,height:s.innerHeight(),width:s.innerWidth()},c=i.offset(),p=P("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(t.className).css({top:c.top-r,left:c.left-a,height:i.innerHeight(),width:i.innerWidth(),position:o?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){p.remove(),P.isFunction(e)&&e()})}}),P.fx.step.clip=function(t){t.clipInit||(t.start=P(t.elem).cssClip(),"string"==typeof t.end&&(t.end=Q(t.end,t.elem)),t.clipInit=!0),P(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},A={},P.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){A[t]=function(t){return Math.pow(t,e+2)}}),P.extend(A,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),P.each(A,function(t,e){P.easing["easeIn"+t]=e,P.easing["easeOut"+t]=function(t){return 1-e(1-t)},P.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});P.effects,P.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=P(this),o=t.direction||"up",n=s.cssClip(),r={clip:P.extend({},n)},a=P.effects.createPlaceholder(s);r.clip[i[o][0]]=r.clip[i[o][1]],"show"===t.mode&&(s.cssClip(r.clip),a&&a.css(P.effects.clipToBox(r)),r.clip=n),a&&a.animate(P.effects.clipToBox(r),t.duration,t.easing),s.animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("bounce",function(t,e){var i,s,o,n=P(this),r=t.mode,a="hide"===r,h="show"===r,l=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(h||a?1:0),u=t.duration/f,d=t.easing,g="up"===l||"down"===l?"top":"left",m="up"===l||"left"===l,v=0,_=n.queue().length;for(P.effects.createPlaceholder(n),o=n.css(g),c=c||n["top"==g?"outerHeight":"outerWidth"]()/3,h&&((s={opacity:1})[g]=o,n.css("opacity",0).css(g,m?2*-c:2*c).animate(s,u,d)),a&&(c/=Math.pow(2,p-1)),(s={})[g]=o;v<p;v++)(i={})[g]=(m?"-=":"+=")+c,n.animate(i,u,d).animate(s,u,d),c=a?2*c:c/2;a&&((i={opacity:0})[g]=(m?"-=":"+=")+c,n.animate(i,u,d)),n.queue(e),P.effects.unshift(n,_,1+f)}),P.effects.define("drop","hide",function(t,e){var i,s=P(this),o="show"===t.mode,n=t.direction||"left",r="up"===n||"down"===n?"top":"left",a="up"===n||"left"===n?"-=":"+=",h="+="==a?"-=":"+=",l={opacity:0};P.effects.createPlaceholder(s),i=t.distance||s["top"==r?"outerHeight":"outerWidth"](!0)/2,l[r]=a+i,o&&(s.css(l),l[r]=h+i,l.opacity=1),s.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;P(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("fold","hide",function(e,t){var i=P(this),s=e.mode,o="show"===s,n="hide"===s,r=e.size||15,a=/([0-9]+)%/.exec(r),h=!!e.horizFirst?["right","bottom"]:["bottom","right"],l=e.duration/2,c=P.effects.createPlaceholder(i),p=i.cssClip(),f={clip:P.extend({},p)},u={clip:P.extend({},p)},d=[p[h[0]],p[h[1]]],g=i.queue().length;a&&(r=parseInt(a[1],10)/100*d[n?0:1]),f.clip[h[0]]=r,u.clip[h[0]]=r,u.clip[h[1]]=0,o&&(i.cssClip(u.clip),c&&c.css(P.effects.clipToBox(u)),u.clip=p),i.queue(function(t){c&&c.animate(P.effects.clipToBox(f),l,e.easing).animate(P.effects.clipToBox(u),l,e.easing),t()}).animate(f,l,e.easing).animate(u,l,e.easing).queue(t),P.effects.unshift(i,g,4)}),P.effects.define("highlight","show",function(t,e){var i=P(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),P.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),P.effects.define("size",function(o,e){var t,n,i,s=P(this),r=["fontSize"],a=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],l=o.mode,c="effect"!==l,p=o.scale||"both",f=o.origin||["middle","center"],u=s.css("position"),d=s.position(),g=P.effects.scaledDimensions(s),m=o.from||g,v=o.to||P.effects.scaledDimensions(s,0);P.effects.createPlaceholder(s),"show"===l&&(i=m,m=v,v=i),n={from:{y:m.height/g.height,x:m.width/g.width},to:{y:v.height/g.height,x:v.width/g.width}},"box"!==p&&"both"!==p||(n.from.y!==n.to.y&&(m=P.effects.setTransition(s,a,n.from.y,m),v=P.effects.setTransition(s,a,n.to.y,v)),n.from.x!==n.to.x&&(m=P.effects.setTransition(s,h,n.from.x,m),v=P.effects.setTransition(s,h,n.to.x,v))),"content"!==p&&"both"!==p||n.from.y!==n.to.y&&(m=P.effects.setTransition(s,r,n.from.y,m),v=P.effects.setTransition(s,r,n.to.y,v)),f&&(t=P.effects.getBaseline(f,g),m.top=(g.outerHeight-m.outerHeight)*t.y+d.top,m.left=(g.outerWidth-m.outerWidth)*t.x+d.left,v.top=(g.outerHeight-v.outerHeight)*t.y+d.top,v.left=(g.outerWidth-v.outerWidth)*t.x+d.left),s.css(m),"content"!==p&&"both"!==p||(a=a.concat(["marginTop","marginBottom"]).concat(r),h=h.concat(["marginLeft","marginRight"]),s.find("*[width]").each(function(){var t=P(this),e=P.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},s={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=P.effects.setTransition(t,a,n.from.y,i),s=P.effects.setTransition(t,a,n.to.y,s)),n.from.x!==n.to.x&&(i=P.effects.setTransition(t,h,n.from.x,i),s=P.effects.setTransition(t,h,n.to.x,s)),c&&P.effects.saveStyle(t),t.css(i),t.animate(s,o.duration,o.easing,function(){c&&P.effects.restoreStyle(t)})})),s.animate(v,{queue:!1,duration:o.duration,easing:o.easing,complete:function(){var t=s.offset();0===v.opacity&&s.css("opacity",m.opacity),c||(s.css("position","static"===u?"relative":u).offset(t),P.effects.saveStyle(s)),e()}})}),P.effects.define("scale",function(t,e){var i=P(this),s=t.mode,o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),n=P.extend(!0,{from:P.effects.scaledDimensions(i),to:P.effects.scaledDimensions(i,o,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(n.from.opacity=1,n.to.opacity=0),P.effects.effect.size.call(this,n,e)}),P.effects.define("puff","hide",function(t,e){var i=P.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});P.effects.effect.scale.call(this,i,e)}),P.effects.define("pulsate","show",function(t,e){var i=P(this),s=t.mode,o="show"===s,n=o||"hide"===s,r=2*(t.times||5)+(n?1:0),a=t.duration/r,h=0,l=1,c=i.queue().length;for(!o&&i.is(":visible")||(i.css("opacity",0).show(),h=1);l<r;l++)i.animate({opacity:h},a,t.easing),h=1-h;i.animate({opacity:h},a,t.easing),i.queue(e),P.effects.unshift(i,c,1+r)}),P.effects.define("shake",function(t,e){var i=1,s=P(this),o=t.direction||"left",n=t.distance||20,r=t.times||3,a=2*r+1,h=Math.round(t.duration/a),l="up"===o||"down"===o?"top":"left",c="up"===o||"left"===o,p={},f={},u={},d=s.queue().length;for(P.effects.createPlaceholder(s),p[l]=(c?"-=":"+=")+n,f[l]=(c?"+=":"-=")+2*n,u[l]=(c?"-=":"+=")+2*n,s.animate(p,h,t.easing);i<r;i++)s.animate(f,h,t.easing).animate(u,h,t.easing);s.animate(f,h,t.easing).animate(p,h/2,t.easing).queue(e),P.effects.unshift(s,d,1+a)}),P.effects.define("slide","show",function(t,e){var i,s,o=P(this),n={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=t.mode,a=t.direction||"left",h="up"===a||"down"===a?"top":"left",l="up"===a||"left"===a,c=t.distance||o["top"==h?"outerHeight":"outerWidth"](!0),p={};P.effects.createPlaceholder(o),i=o.cssClip(),s=o.position()[h],p[h]=(l?-1:1)*c+s,p.clip=o.cssClip(),p.clip[n[a][1]]=p.clip[n[a][0]],"show"===r&&(o.cssClip(p.clip),o.css(h,p[h]),p.clip=i,p[h]=s),o.animate(p,{queue:!1,duration:t.duration,easing:t.easing,complete:e})});!1!==P.uiBackCompat&&P.effects.define("transfer",function(t,e){P(this).transfer(t,e)})}); })(this);
 
 // 3rdParty/jquery-ui/touchPunch.js
-(function (window, undefined) { undefined })(this);
+(function (window, undefined) { !function(t){var o,e,u,n;function c(o,t){var e,u;1<o.originalEvent.touches.length||(o.preventDefault(),e=o.originalEvent.changedTouches[0],(u=document.createEvent("MouseEvents")).initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(u))}t.support.touch="ontouchend"in document,t.support.touch&&(o=t.ui.mouse.prototype,e=o._mouseInit,u=o._mouseDestroy,o._touchStart=function(o){!n&&this._mouseCapture(o.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,c(o,"mouseover"),c(o,"mousemove"),c(o,"mousedown"))},o._touchMove=function(o){n&&(this._touchMoved=!0,c(o,"mousemove"))},o._touchEnd=function(o){n&&(c(o,"mouseup"),c(o,"mouseout"),this._touchMoved||c(o,"click"),n=!1)},o._mouseInit=function(){var o=this;o.element.bind({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),e.call(o)},o._mouseDestroy=function(){var o=this;o.element.unbind({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),u.call(o)})}(jQuery); })(this);
 
 // 3rdParty/jquery-ui/nestedSortable.js
-(function (window, undefined) { undefined })(this);
+(function (window, undefined) { !function(f){f.widget("mjs.nestedSortable",f.extend({},f.ui.sortable.prototype,{options:{tabSize:20,disableNesting:"mjs-nestedSortable-no-nesting",errorClass:"mjs-nestedSortable-error",doNotClear:!1,listType:"ol",maxLevels:0,protectRoot:!1,rootID:null,rtl:!1,isAllowed:function(t,e){return!0}},_create:function(){if(this.element.data("sortable",this.element.data("nestedSortable")),!this.element.is(this.options.listType))throw new Error("nestedSortable: Please check the listType option is set to your actual list type");return f.ui.sortable.prototype._create.apply(this,arguments)},destroy:function(){return this.element.removeData("nestedSortable").unbind(".nestedSortable"),f.ui.sortable.prototype.destroy.apply(this,arguments)},_mouseDrag:function(t){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);var e,s=this.options;this.options.scroll&&(e=!1,this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=e=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=e=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(t.pageY-f(document).scrollTop()<s.scrollSensitivity?e=f(document).scrollTop(f(document).scrollTop()-s.scrollSpeed):f(window).height()-(t.pageY-f(document).scrollTop())<s.scrollSensitivity&&(e=f(document).scrollTop(f(document).scrollTop()+s.scrollSpeed)),t.pageX-f(document).scrollLeft()<s.scrollSensitivity?e=f(document).scrollLeft(f(document).scrollLeft()-s.scrollSpeed):f(window).width()-(t.pageX-f(document).scrollLeft())<s.scrollSensitivity&&(e=f(document).scrollLeft(f(document).scrollLeft()+s.scrollSpeed))),!1!==e&&f.ui.ddmanager&&!s.dropBehaviour&&f.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute");var i=this.placeholder.offset().top;this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(var o=this.items.length-1;0<=o;o--){var r=this.items[o],l=r.item[0],n=this._intersectsWithPointer(r);if(n&&!(l==this.currentItem[0]||this.placeholder[1==n?"next":"prev"]()[0]==l||f.contains(this.placeholder[0],l)||"semi-dynamic"==this.options.type&&f.contains(this.element[0],l))){if(f(l).mouseenter(),this.direction=1==n?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(r))break;f(l).mouseleave(),this._rearrange(t,r),this._clearEmpty(l),this._trigger("change",t,this._uiHash());break}}var h=this.placeholder[0].parentNode.parentNode&&f(this.placeholder[0].parentNode.parentNode).closest(".ui-sortable").length?f(this.placeholder[0].parentNode.parentNode):null,a=this._getLevel(this.placeholder),p=this._getChildLevels(this.helper),c=this.placeholder[0].previousSibling?f(this.placeholder[0].previousSibling):null;if(null!=c)for(;"li"!=c[0].nodeName.toLowerCase()||c[0]==this.currentItem[0]||c[0]==this.helper[0];){if(!c[0].previousSibling){c=null;break}c=f(c[0].previousSibling)}var d=this.placeholder[0].nextSibling?f(this.placeholder[0].nextSibling):null;if(null!=d)for(;"li"!=d[0].nodeName.toLowerCase()||d[0]==this.currentItem[0]||d[0]==this.helper[0];){if(!d[0].nextSibling){d=null;break}d=f(d[0].nextSibling)}var u=document.createElement(s.listType);return this.beyondMaxLevels=0,null!=h&&null==d&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()>h.offset().left+h.outerWidth()||!s.rtl&&this.positionAbs.left<h.offset().left)?(h.after(this.placeholder[0]),this._clearEmpty(h[0]),this._trigger("change",t,this._uiHash())):null!=c&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()<c.offset().left+c.outerWidth()-s.tabSize||!s.rtl&&this.positionAbs.left>c.offset().left+s.tabSize)?(this._isAllowed(c,a,a+p+1),c.children(s.listType).length||c[0].appendChild(u),i&&i<=c.offset().top?c.children(s.listType).prepend(this.placeholder):c.children(s.listType)[0].appendChild(this.placeholder[0]),this._trigger("change",t,this._uiHash())):this._isAllowed(h,a,a+p),this._contactContainers(t),f.ui.ddmanager&&f.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){this.beyondMaxLevels&&(this.placeholder.removeClass(this.options.errorClass),this.domPosition.prev?f(this.domPosition.prev).after(this.placeholder):f(this.domPosition.parent).prepend(this.placeholder),this._trigger("revert",t,this._uiHash()));for(var s=this.items.length-1;0<=s;s--){var i=this.items[s].item[0];this._clearEmpty(i)}f.ui.sortable.prototype._mouseStop.apply(this,arguments)},serialize:function(t){var s=f.extend({},this.options,t),e=this._getItemsAsjQuery(s&&s.connected),i=[];return f(e).each(function(){var t=(f(s.item||this).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/),e=(f(s.item||this).parent(s.listType).parent(s.items).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/);t&&i.push((s.key||t[1])+"["+(s.key&&s.expression?t[1]:t[2])+"]="+(e?s.key&&s.expression?e[1]:e[2]:s.rootID))}),!i.length&&s.key&&i.push(s.key+"="),i.join("&")},toHierarchy:function(t){var o=f.extend({},this.options,t),e=(o.startDepthCount,[]);return f(this.element).children(o.items).each(function(){var t=function e(t){var s=(f(t).attr(o.attribute||"id")||"").match(o.expression||/(.+)[-=_](.+)/);if(s){var i={id:s[2]};return 0<f(t).children(o.listType).children(o.items).length&&(i.children=[],f(t).children(o.listType).children(o.items).each(function(){var t=e(this);i.children.push(t)})),i}}(this);e.push(t)}),e},toArray:function(t){var h=f.extend({},this.options,t),a=h.startDepthCount||0,p=[],e=2;return p.push({item_id:h.rootID,parent_id:"none",depth:a,left:"1",right:2*(f(h.items,this.element).length+1)}),f(this.element).children(h.items).each(function(){e=function t(e,s,i){var o,r,l=i+1;0<f(e).children(h.listType).children(h.items).length&&(s++,f(e).children(h.listType).children(h.items).each(function(){l=t(f(this),s,l)}),s--);o=f(e).attr(h.attribute||"id").match(h.expression||/(.+)[-=_](.+)/);{var n;r=s===a+1?h.rootID:(n=f(e).parent(h.listType).parent(h.items).attr(h.attribute||"id").match(h.expression||/(.+)[-=_](.+)/),n[2])}o&&p.push({item_id:o[2],parent_id:r,depth:s,left:i,right:l});i=l+1;return i}(this,a+1,e)}),p=p.sort(function(t,e){return t.left-e.left})},_clearEmpty:function(t){var e=f(t).children(this.options.listType);!e.length||e.children().length||this.options.doNotClear||e.remove()},_getLevel:function(t){var e=1;if(this.options.listType)for(var s=t.closest(this.options.listType);s&&0<s.length&&!s.is(".ui-sortable");)e++,s=s.parent().closest(this.options.listType);return e},_getChildLevels:function(t,s){var i=this,e=this.options,o=0;return s=s||0,f(t).children(e.listType).children(e.items).each(function(t,e){o=Math.max(i._getChildLevels(e,s+1),o)}),s?o+1:o},_isAllowed:function(t,e,s){var i=this.options,o=!!f(this.domPosition.parent).hasClass("ui-sortable"),r=this.placeholder.closest(".ui-sortable").nestedSortable("option","maxLevels");!i.isAllowed(this.currentItem,t)||t&&t.hasClass(i.disableNesting)||i.protectRoot&&(null==t&&!o||o&&1<e)?(this.placeholder.addClass(i.errorClass),this.beyondMaxLevels=r<s&&0!=r?s-r:1):r<s&&0!=r?(this.placeholder.addClass(i.errorClass),this.beyondMaxLevels=s-r):(this.placeholder.removeClass(i.errorClass),this.beyondMaxLevels=0)}})),f.mjs.nestedSortable.prototype.options=f.extend({},f.ui.sortable.prototype.options,f.mjs.nestedSortable.prototype.options)}(jQuery); })(this);
 
 // 3rdParty/polyfill/focus-visible.js
-(function (window, undefined) { undefined })(this);
+(function (window, undefined) { function applyFocusVisiblePolyfill(t){var i=!0,n=!1,o=null,d={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function u(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function e(e){i=!1}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(i=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",function(e){e.metaKey||e.altKey||e.ctrlKey||(s(t.activeElement)&&u(t.activeElement),i=!0)},!0),document.addEventListener("mousedown",e,!0),document.addEventListener("pointerdown",e,!0),document.addEventListener("touchstart",e,!0),document.addEventListener("visibilitychange",function(e){"hidden"==document.visibilityState&&(n&&(i=!0),a())},!0),a(),t.addEventListener("focus",function(e){var t,n,o;s(e.target)&&(i||(t=e.target,n=t.type,"INPUT"==(o=t.tagName)&&d[n]&&!t.readOnly||("TEXTAREA"==o&&!t.readOnly||!!t.isContentEditable)))&&u(e.target)},!0),t.addEventListener("blur",function(e){var t;s(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(o),o=window.setTimeout(function(){n=!1,window.clearTimeout(o)},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))},!0),t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host?t.host.setAttribute("data-js-focus-visible",""):t.nodeType===Node.DOCUMENT_NODE&&document.documentElement.classList.add("js-focus-visible")}if("undefined"!=typeof window&&"undefined"!=typeof document){var event;window.applyFocusVisiblePolyfill=applyFocusVisiblePolyfill;try{event=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(event=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(event)}"undefined"!=typeof document&&applyFocusVisiblePolyfill(document); })(this);
 
 // WCF.Assets.js
-(function (window, undefined) { WCF.Assets.js; })(this);
+(function (window, undefined) { !function(){var o=!1,a=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(e){function t(){!o&&this.init&&this.init.apply(this,arguments)}var i=this.prototype;o=!0;var n=new this;for(var r in o=!1,e)n[r]="function"==typeof e[r]&&"function"==typeof i[r]&&a.test(e[r])?function(n,r){return function(){var e=this._super;this._super=i[n];var t=r.apply(this,arguments);return this._super=e,t}}(r,e[r]):e[r];return((t.prototype=n).constructor=t).extend=arguments.callee,t}}(),function(u,r){"use strict";function s(){}function o(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;n<r;n++)t.call(e,e[n],n)}}function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==r&&null!==t&&n===e}function a(e){return t("Function",e)}function l(e){return t("Array",e)}function c(e){(e=e||s)._done||(e(),e._done=1)}function i(e){var t,n,r,i,o,a={};if("object"==typeof e)for(t in e)e[t]&&(a={name:t,url:e[t]});else a={name:(r=e.split("/"),i=r[r.length-1],-1!==(o=i.indexOf("?"))?i.substring(0,o):i),url:e};return(n=y[a.name])&&n.url===a.url?n:y[a.name]=a}function p(e){for(var t in e=e||y)if(e.hasOwnProperty(t)&&e[t].state!==k)return;return 1}function d(t){t.state===r&&(t.state=A,t.onpreload=[],n({url:t.url,type:"cache"},function(){var e;(e=t).state=x,o(e.onpreload,function(e){e.call()})}))}function f(e,t){t=t||s,e.state!==k?e.state!==L?e.state!==A?(e.state=L,n(e,function(){e.state=k,t(),o(w[e.name],function(e){c(e)}),g&&p()&&o(w.ALL,function(e){c(e)})})):e.onpreload.push(function(){f(e,t)}):O.ready(e.name,t):t()}function n(r,t){function e(e){e=e||u.event,o.onload=o.onreadystatechange=o.onerror=null,t()}function i(e){("load"===(e=e||u.event).type||/loaded|complete/.test(o.readyState)&&(!v.documentMode||v.documentMode<9))&&(u.clearTimeout(r.errorTimeout),u.clearTimeout(r.cssTimeout),o.onload=o.onreadystatechange=o.onerror=null,t())}var o,n,a,l;t=t||s,a=r.url,"css"===(l=(a=a||"").split("?")[0].split("."))[l.length-1].toLowerCase()?((o=v.createElement("link")).type="text/"+(r.type||"css"),o.rel="stylesheet",o.href=r.url,r.cssRetries=0,r.cssTimeout=u.setTimeout(function e(){if(r.state!==k&&r.cssRetries<=20){for(var t=0,n=v.styleSheets.length;t<n;t++)if(v.styleSheets[t].href===o.href)return void i({type:"load"});r.cssRetries++,r.cssTimeout=u.setTimeout(e,250)}},500)):((o=v.createElement("script")).type="text/"+(r.type||"javascript"),o.src=r.url),o.onload=o.onreadystatechange=i,o.onerror=e,o.async=!1,o.defer=!1,r.errorTimeout=u.setTimeout(function(){e({type:"timeout"})},7e3),(n=v.head||v.getElementsByTagName("head")[0]).insertBefore(o,n.lastChild)}function e(){if(!v.body)return u.clearTimeout(O.readyTimeout),void(O.readyTimeout=u.setTimeout(e,50));g||(g=!0,function(){for(var e,t=v.getElementsByTagName("script"),n=0,r=t.length;n<r;n++)if(e=t[n].getAttribute("data-headjs-load"))return O.load(e)}(),o(b,function(e){c(e)}))}function h(){v.addEventListener?(v.removeEventListener("DOMContentLoaded",h,!1),e()):"complete"===v.readyState&&(v.detachEvent("onreadystatechange",h),e())}var g,m,v=u.document,b=[],w={},y={},T="async"in v.createElement("script")||"MozAppearance"in v.documentElement.style||u.opera,E=u.head_conf&&u.head_conf.head||"head",O=u[E]=u[E]||function(){O.ready.apply(null,arguments)},A=1,x=2,L=3,k=4;if("complete"===v.readyState)e();else if(v.addEventListener)v.addEventListener("DOMContentLoaded",h,!1),u.addEventListener("load",e,!1);else{v.attachEvent("onreadystatechange",h),u.attachEvent("onload",e),m=!1;try{m=!u.frameElement&&v.documentElement}catch(e){}m&&m.doScroll&&function t(){if(!g){try{m.doScroll("left")}catch(e){return u.clearTimeout(O.readyTimeout),void(O.readyTimeout=u.setTimeout(t,50))}e()}}()}O.load=O.js=T?function(){var e=arguments,t=e[e.length-1],n={};return a(t)||(t=null),l(e[0])?(e[0].push(t),O.load.apply(null,e[0])):(o(e,function(e){e!==t&&(e=i(e),n[e.name]=e)}),o(e,function(e){e!==t&&f(e=i(e),function(){p(n)&&c(t)})})),O}:function(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),r=n[0];return a(t)||(t=null),l(e[0])?(e[0].push(t),O.load.apply(null,e[0])):r?(o(n,function(e){a(e)||!e||d(i(e))}),f(i(e[0]),a(r)?r:function(){O.load.apply(null,n)})):f(i(e[0])),O},O.test=function(e,t,n,r){var i="object"==typeof e?e:{test:e,success:!!t&&(l(t)?t:[t]),failure:!!n&&(l(n)?n:[n]),callback:r||s},o=!!i.test;return o&&i.success?(i.success.push(i.callback),O.load.apply(null,i.success)):o||!i.failure?r():(i.failure.push(i.callback),O.load.apply(null,i.failure)),O},O.ready=function(e,t){var n,r,i;return e===v?(g?c(t):b.push(t),O):(a(e)&&(t=e,e="ALL"),l(e)?(n={},o(e,function(e){n[e]=y[e],O.ready(e,function(){p(n)&&c(t)})}),O):"string"==typeof e&&a(t)?((r=y[e])&&r.state===k||"ALL"===e&&p()&&g?c(t):(i=w[e])?i.push(t):i=w[e]=[t],O):O)},O.ready(v,function(){p()&&o(w.ALL,function(e){c(e)}),O.feature&&O.feature("domloaded",!0)})}(window),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(function(oe){var ae="left",le="right",ue="up",se="down",ce="in",pe="out",de="none",fe="auto",he="swipe",ge="pinch",me="tap",ve="doubletap",be="longtap",we="horizontal",ye="vertical",Te="all",Ee=10,Oe="start",Ae="move",xe="end",Le="cancel",ke="ontouchstart"in window,Se=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,Ce=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,Me="TouchSwipe";function r(e,v){var t=ke||Ce||!v.fallbackToMouseEvents,n=t?Ce?Se?"MSPointerDown":"pointerdown":"touchstart":"mousedown",r=t?Ce?Se?"MSPointerMove":"pointermove":"touchmove":"mousemove",i=t?Ce?Se?"MSPointerUp":"pointerup":"touchend":"mouseup",o=t?null:"mouseleave",a=Ce?Se?"MSPointerCancel":"pointercancel":"touchcancel",b=0,w=null,y=0,T=0,E=0,O=1,A=0,x=0,L=null,l=oe(e),k="start",S=0,C=null,u=0,M=0,s=0,c=0,p=0,d=null,N=null;try{l.bind(n,f),l.bind(a,m)}catch(e){oe.error("events not supported "+n+","+a+" on jQuery.swipe")}function f(e){if(!0!==l.data(Me+"_intouch")&&!(0<oe(e.target).closest(v.excludedElements,l).length)){var t,n,r=e.originalEvent?e.originalEvent:e,i=ke?r.touches[0]:r;return(k=Oe,ke?S=r.touches.length:e.preventDefault(),x=w=null,O=1,A=E=T=y=b=0,C=function(){for(var e=[],t=0;t<=5;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}(),(n={})[ae]=te(ae),n[le]=te(le),n[ue]=te(ue),n[se]=te(se),L=n,Z(),!ke||S===v.fingers||v.fingers===Te||q()?($(0,i),u=ie(),2==S&&($(1,r.touches[1]),T=E=re(C[0].start,C[1].start)),(v.swipeStatus||v.pinchStatus)&&(t=F(r,k))):t=!1,!1===t)?(F(r,k=Le),t):(v.hold&&(N=setTimeout(oe.proxy(function(){l.trigger("hold",[r.target]),v.hold&&(t=v.hold.call(l,r,r.target))},this),v.longTapThreshold)),K(!0),null)}}function h(e){var t,n,r,i,o,a,l,u,s,c,p,d,f,h,g,m=e.originalEvent?e.originalEvent:e;k===xe||k===Le||G()||(n=J(ke?m.touches[0]:m),M=ie(),ke&&(S=m.touches.length),v.hold&&clearTimeout(N),k=Ae,2==S&&(0==T?($(1,m.touches[1]),T=E=re(C[0].start,C[1].start)):(J(m.touches[1]),E=re(C[0].end,C[1].end),C[0].end,C[1].end,x=O<1?pe:ce),O=(E/T*1).toFixed(2),A=Math.abs(T-E)),S===v.fingers||v.fingers===Te||!ke||q()?(f=n.start,h=n.end,g=function(e,t){var n=e.x-t.x,r=t.y-e.y,i=Math.atan2(r,n),o=Math.round(180*i/Math.PI);o<0&&(o=360-Math.abs(o));return o}(f,h),function(e,t){if(v.allowPageScroll===de||q())e.preventDefault();else{var n=v.allowPageScroll===fe;switch(t){case ae:(v.swipeLeft&&n||!n&&v.allowPageScroll!=we)&&e.preventDefault();break;case le:(v.swipeRight&&n||!n&&v.allowPageScroll!=we)&&e.preventDefault();break;case ue:(v.swipeUp&&n||!n&&v.allowPageScroll!=ye)&&e.preventDefault();break;case se:(v.swipeDown&&n||!n&&v.allowPageScroll!=ye)&&e.preventDefault()}}}(e,w=g<=45&&0<=g||g<=360&&315<=g?ae:135<=g&&g<=225?le:45<g&&g<135?se:ue),p=n.start,d=n.end,b=Math.round(Math.sqrt(Math.pow(d.x-p.x,2)+Math.pow(d.y-p.y,2))),y=ne(),s=w,c=b,c=Math.max(c,ee(s)),L[s].distance=c,(v.swipeStatus||v.pinchStatus)&&(t=F(m,k)),v.triggerOnTouchEnd&&!v.triggerOnTouchLeave||(r=!0,v.triggerOnTouchLeave&&(i={left:(u=(l=oe(l=this)).offset()).left,right:u.left+l.outerWidth(),top:u.top,bottom:u.top+l.outerHeight()},o=n.end,a=i,r=o.x>a.left&&o.x<a.right&&o.y>a.top&&o.y<a.bottom),!v.triggerOnTouchEnd&&r?k=D(Ae):v.triggerOnTouchLeave&&!r&&(k=D(xe)),k!=Le&&k!=xe||F(m,k))):F(m,k=Le),!1===t&&F(m,k=Le))}function g(e){var t=e.originalEvent;return ke&&0<t.touches.length?(s=ie(),c=event.touches.length+1,!0):(G()&&(S=c),M=ie(),y=ne(),_()||!R()?F(t,k=Le):v.triggerOnTouchEnd||0==v.triggerOnTouchEnd&&k===Ae?(e.preventDefault(),F(t,k=xe)):!v.triggerOnTouchEnd&&Y()?z(t,k=xe,me):k===Ae&&F(t,k=Le),K(!1),null)}function m(){E=T=u=M=S=0,Z(),K(!(O=1))}function I(e){var t=e.originalEvent;v.triggerOnTouchLeave&&F(t,k=D(xe))}function P(){l.unbind(n,f),l.unbind(a,m),l.unbind(r,h),l.unbind(i,g),o&&l.unbind(o,I),K(!1)}function D(e){var t=e,n=j(),r=R(),i=_();return!n||i?t=Le:!r||e!=Ae||v.triggerOnTouchEnd&&!v.triggerOnTouchLeave?!r&&e==xe&&v.triggerOnTouchLeave&&(t=Le):t=xe,t}function F(e,t){var n=void 0;return U()&&H()||H()?n=z(e,t,he):(V()&&q()||q())&&!1!==n&&(n=z(e,t,ge)),W()&&B()&&!1!==n?n=z(e,t,ve):y>v.longTapThreshold&&b<Ee&&v.longTap&&!1!==n?n=z(e,t,be):1!==S&&ke||!(isNaN(b)||b<v.threshold)||!Y()||!1===n||(n=z(e,t,me)),t===Le&&m(),t!==xe||ke&&0!=e.touches.length||m(),n}function z(e,t,n){var r=void 0;if(n==he){if(l.trigger("swipeStatus",[t,w||null,b||0,y||0,S,C]),v.swipeStatus&&!1===(r=v.swipeStatus.call(l,e,t,w||null,b||0,y||0,S,C)))return!1;if(t==xe&&U()){if(l.trigger("swipe",[w,b,y,S,C]),v.swipe&&!1===(r=v.swipe.call(l,e,w,b,y,S,C)))return!1;switch(w){case ae:l.trigger("swipeLeft",[w,b,y,S,C]),v.swipeLeft&&(r=v.swipeLeft.call(l,e,w,b,y,S,C));break;case le:l.trigger("swipeRight",[w,b,y,S,C]),v.swipeRight&&(r=v.swipeRight.call(l,e,w,b,y,S,C));break;case ue:l.trigger("swipeUp",[w,b,y,S,C]),v.swipeUp&&(r=v.swipeUp.call(l,e,w,b,y,S,C));break;case se:l.trigger("swipeDown",[w,b,y,S,C]),v.swipeDown&&(r=v.swipeDown.call(l,e,w,b,y,S,C))}}}if(n==ge){if(l.trigger("pinchStatus",[t,x||null,A||0,y||0,S,O,C]),v.pinchStatus&&!1===(r=v.pinchStatus.call(l,e,t,x||null,A||0,y||0,S,O,C)))return!1;if(t==xe&&V())switch(x){case ce:l.trigger("pinchIn",[x||null,A||0,y||0,S,O,C]),v.pinchIn&&(r=v.pinchIn.call(l,e,x||null,A||0,y||0,S,O,C));break;case pe:l.trigger("pinchOut",[x||null,A||0,y||0,S,O,C]),v.pinchOut&&(r=v.pinchOut.call(l,e,x||null,A||0,y||0,S,O,C))}}return n==me?t!==Le&&t!==xe||(clearTimeout(d),clearTimeout(N),B()&&!W()?(p=ie(),d=setTimeout(oe.proxy(function(){p=null,l.trigger("tap",[e.target]),v.tap&&(r=v.tap.call(l,e,e.target))},this),v.doubleTapThreshold)):(p=null,l.trigger("tap",[e.target]),v.tap&&(r=v.tap.call(l,e,e.target)))):n==ve?t!==Le&&t!==xe||(clearTimeout(d),p=null,l.trigger("doubletap",[e.target]),v.doubleTap&&(r=v.doubleTap.call(l,e,e.target))):n==be&&(t!==Le&&t!==xe||(clearTimeout(d),p=null,l.trigger("longtap",[e.target]),v.longTap&&(r=v.longTap.call(l,e,e.target)))),r}function R(){var e=!0;return null!==v.threshold&&(e=b>=v.threshold),e}function _(){var e=!1;return null!==v.cancelThreshold&&null!==w&&(e=ee(w)-b>=v.cancelThreshold),e}function j(){var e=!v.maxTimeThreshold||!(y>=v.maxTimeThreshold);return e}function V(){var e=X(),t=Q(),n=null===v.pinchThreshold||A>=v.pinchThreshold;return e&&t&&n}function q(){return v.pinchStatus||v.pinchIn||v.pinchOut}function U(){var e=j(),t=R(),n=X(),r=Q();return!_()&&r&&n&&t&&e}function H(){return v.swipe||v.swipeStatus||v.swipeLeft||v.swipeRight||v.swipeUp||v.swipeDown}function X(){return S===v.fingers||v.fingers===Te||!ke}function Q(){return 0!==C[0].end.x}function Y(){return v.tap}function B(){return!!v.doubleTap}function W(){if(null==p)return!1;var e=ie();return B()&&e-p<=v.doubleTapThreshold}function Z(){c=s=0}function G(){var e=!1;return s&&ie()-s<=v.fingerReleaseThreshold&&(e=!0),e}function K(e){!0===e?(l.bind(r,h),l.bind(i,g),o&&l.bind(o,I)):(l.unbind(r,h,!1),l.unbind(i,g,!1),o&&l.unbind(o,I,!1)),l.data(Me+"_intouch",!0===e)}function $(e,t){var n=void 0!==t.identifier?t.identifier:0;return C[e].identifier=n,C[e].start.x=C[e].end.x=t.pageX||t.clientX,C[e].start.y=C[e].end.y=t.pageY||t.clientY,C[e]}function J(e){var t=function(e){for(var t=0;t<C.length;t++)if(C[t].identifier==e)return C[t]}(void 0!==e.identifier?e.identifier:0);return t.end.x=e.pageX||e.clientX,t.end.y=e.pageY||e.clientY,t}function ee(e){if(L[e])return L[e].distance}function te(e){return{direction:e,distance:0}}function ne(){return M-u}function re(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+r*r))}function ie(){return(new Date).getTime()}this.enable=function(){return l.bind(n,f),l.bind(a,m),l},this.disable=function(){return P(),l},this.destroy=function(){return P(),l.data(Me,null),l},this.option=function(e,t){if(void 0!==v[e]){if(void 0===t)return v[e];v[e]=t}else oe.error("Option "+e+" does not exist on jQuery.swipe.options");return null}}oe.fn.swipe=function(e){var t=oe(this),n=t.data(Me);if(n&&"string"==typeof e){if(n[e])return n[e].apply(this,Array.prototype.slice.call(arguments,1));oe.error("Method "+e+" does not exist on jQuery.swipe")}else if(!(n||"object"!=typeof e&&e))return function(n){!n||void 0!==n.allowPageScroll||void 0===n.swipe&&void 0===n.swipeStatus||(n.allowPageScroll=de);void 0!==n.click&&void 0===n.tap&&(n.tap=n.click);n=n||{};return n=oe.extend({},oe.fn.swipe.defaults,n),this.each(function(){var e=oe(this),t=e.data(Me);t||(t=new r(this,n),e.data(Me,t))})}.apply(this,arguments);return t},oe.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe"},oe.fn.swipe.phases={PHASE_START:Oe,PHASE_MOVE:Ae,PHASE_END:xe,PHASE_CANCEL:Le},oe.fn.swipe.directions={LEFT:ae,RIGHT:le,UP:ue,DOWN:se,IN:ce,OUT:pe},oe.fn.swipe.pageScroll={NONE:de,HORIZONTAL:we,VERTICAL:ye,AUTO:fe},oe.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:Te}}),function(e){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}(navigator.userAgent||navigator.vendor||window.opera),function(d){var t={init:function(){var p=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight","border-top-width","border-right-width","border-bottom-width","border-left-width","-moz-box-sizing","-webkit-box-sizing","box-sizing"];return this.each(function(){function e(){for(var e=0;e<p.length;e++)i.css(p[e],r.css(p[e]))}function t(){var e=r.val().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&/g,"&amp;").replace(/\n/g,"<br/>");i.html(e+"&nbsp;").css({width:parseInt(r.width(),10)+"px"}),n()}function n(){var e=i.height(),t="hidden",n=o?e+u+a:e+u;c<n?(n=c,t="auto"):n<s&&(n=s),r.height()!==n&&r.css({overflow:t,height:n+"px"})}if("textarea"!==this.type)return!1;var r=d(this).css({resize:"none",overflow:"hidden"}),i=d("<div></div>").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body);e();var o="border-box"==r.css("box-sizing")||"border-box"==r.css("-moz-box-sizing")||"border-box"==r.css("-webkit-box-sizing"),a=parseInt(r.css("border-top-width"))+parseInt(r.css("padding-top"))+parseInt(r.css("padding-bottom"))+parseInt(r.css("border-bottom-width")),l=parseInt(r.css("height"),10),u=parseInt(r.css("line-height"),10)||parseInt(r.css("font-size"),10),s=l<2*u?2*u:l,c=-1<parseInt(r.css("max-height"),10)?parseInt(r.css("max-height"),10):Number.MAX_VALUE;r.bind("keyup change cut paste",function(){t()}),d(window).bind("resize",function(){i.width()!==parseInt(r.width(),10)&&t()}),r.bind("blur",function(){n()}),r.bind("updateHeight",function(){e(),t()}),d(function(){t()})})}};d.fn.flexible=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void d.error("Method "+e+" does not exist on jQuery.flexible"):t.init.apply(this,arguments)}}(jQuery),function(e,p,n,t){"use strict";function d(e,t){for(var n=0,r=e.length;n<r;n++)o(e[n],t)}function f(t){return function(e){Y(e)&&(o(e,t),d(e.querySelectorAll(C),t))}}function h(e){var t=e.getAttribute("is"),n=e.nodeName.toUpperCase(),r=N.call(k,t?A+t.toUpperCase():O+n);return t&&-1<r&&!g(n,t)?-1:r}function g(e,t){return-1<C.indexOf(e+'[is="'+t+'"]')}function l(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target;!oe||i&&i!==t||!t.attributeChangedCallback||"style"===r||t.attributeChangedCallback(r,n===e[u]?null:e.prevValue,n===e[c]?null:e.newValue)}function m(e){var t=f(e);return function(e){ee.push(t,e.target)}}function v(e){ie&&(ie=!1,e.currentTarget.removeEventListener(E,v)),d((e.target||p).querySelectorAll(C),e.detail===w?w:b),Q&&function(){for(var e,t=0,n=B.length;t<n;t++)e=B[t],M.contains(e)||(B.splice(t,1),o(e,w))}()}function r(e,t){Z.call(this,e,t),ae.call(this,{target:this})}function i(e,t){U(e,t),se?se.observe(e,$):(re&&(e.setAttribute=r,e[a]=ue(e),e.addEventListener("DOMSubtreeModified",ae)),e.addEventListener(T,l)),e.createdCallback&&oe&&(e.created=!0,e.createdCallback(),e.created=!1)}function o(e,t){var n,r=h(e);-1<r&&(ce(e,S[r]),r=0,t!==b||e[b]?t!==w||e[w]||(e[b]=!1,e[w]=!0,r=1):(e[w]=!1,e[b]=!0,r=1,Q&&N.call(B,e)<0&&B.push(e)),r&&(n=e[t+"Callback"])&&n.call(e))}var a,b,w,y,u,s,c,T,E,O,A,x,L,k,S,C,M,N,I,P,D,F,z,R,_,j,V,q,U,H,X,Q,Y,B,W,Z,G,K,$,J,ee,te,ne,re,ie,oe,ae,le,ue,se,ce,pe,de,fe;function he(e){var t=new CustomEvent(T,{bubbles:!0});t.attrName=e,t.prevValue=this.getAttribute(e),t.newValue=null,t[c]=t.attrChange=2,G.call(this,e),this.dispatchEvent(t)}function ge(e,t){var n=this.hasAttribute(e),r=n&&this.getAttribute(e),i=new CustomEvent(T,{bubbles:!0});Z.call(this,e,t),i.attrName=e,i.prevValue=n?r:null,i.newValue=t,n?i[s]=i.attrChange=1:i[u]=i.attrChange=0,this.dispatchEvent(i)}function me(e){var t,n=e.currentTarget,r=n[a],i=e.propertyName;r.hasOwnProperty(i)&&(r=r[i],(t=new CustomEvent(T,{bubbles:!0})).attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=n[i]||null,null==t.prevValue?t[u]=t.attrChange=0:t[s]=t.attrChange=1,n.dispatchEvent(t))}t in p||(a="__"+t+(1e5*Math.random()>>0),b="attached",w="detached",y="extends",u="ADDITION",s="MODIFICATION",c="REMOVAL",T="DOMAttrModified",E="DOMContentLoaded",O="<",A="=",x=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,L=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],k=[],S=[],C="",M=p.documentElement,N=k.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},I=n.prototype,P=I.hasOwnProperty,D=I.isPrototypeOf,F=n.defineProperty,z=n.getOwnPropertyDescriptor,R=n.getOwnPropertyNames,_=n.getPrototypeOf,j=n.setPrototypeOf,V=!!n.__proto__,q=n.create||function e(t){return t?(e.prototype=t,new e):this},U=j||(V?function(e,t){return e.__proto__=t,e}:R&&z?function(e,t){for(;function(e,t){for(var n,r=R(t),i=0,o=r.length;i<o;i++)n=r[i],P.call(e,n)||F(e,n,z(t,n))}(e,t),(t=_(t))&&!D.call(t,e););return e}:function(e,t){for(var n in t)e[n]=t[n];return e}),H=e.MutationObserver||e.WebKitMutationObserver,X=(e.HTMLElement||e.Element||e.Node).prototype,Q=!D.call(X,M),Y=Q?function(e){return 1===e.nodeType}:function(e){return D.call(X,e)},B=Q&&[],W=X.cloneNode,Z=X.setAttribute,G=X.removeAttribute,K=p.createElement,$=H&&{attributes:!0,characterData:!0,attributeOldValue:!0},J=H||function(e){re=!1,M.removeEventListener(T,J)},te=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,10)},oe=ie=re=!(ne=!1),fe=j||V?(ce=function(e,t){D.call(t,e)||i(e,t)},i):ce=function(e,t){e[a]||(e[a]=n(!0),i(e,t))},Q?(re=!1,pe=z(X,"addEventListener"),de=pe.value,pe.value=function(e,t,n){e===T&&this.attributeChangedCallback&&this.setAttribute!==ge&&(this[a]={className:{name:"class",value:this.className}},this.setAttribute=ge,this.removeAttribute=he,de.call(this,"propertychange",me)),de.call(this,e,t,n)},F(X,"addEventListener",pe)):H||(M.addEventListener(T,J),M.setAttribute(a,1),M.removeAttribute(a),re&&(ae=function(e){var t,n,r,i=this;if(i===e.target){for(r in t=i[a],i[a]=n=ue(i),n){if(!(r in t))return le(0,i,r,t[r],n[r],u);if(n[r]!==t[r])return le(1,i,r,t[r],n[r],s)}for(r in t)if(!(r in n))return le(2,i,r,t[r],n[r],c)}},le=function(e,t,n,r,i,o){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};a[o]=e,l(a)},ue=function(e){for(var t,n,r={},i=e.attributes,o=0,a=i.length;o<a;o++)"setAttribute"!==(n=(t=i[o]).name)&&(r[n]=t.value);return r})),p[t]=function(e,t){function o(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}var a,l,n=e.toUpperCase();if(ne||(ne=!0,H?(a=f(b),l=f(w),(se=new H(function(e){for(var t,n,r=0,i=e.length;r<i;r++)"childList"===(t=e[r]).type?(o(t.addedNodes,a),o(t.removedNodes,l)):(n=t.target,oe&&n.attributeChangedCallback&&"style"!==t.attributeName&&n.attributeChangedCallback(t.attributeName,t.oldValue,n.getAttribute(t.attributeName)))})).observe(p,{childList:!0,subtree:!0})):(ee=[],te(function e(){for(;ee.length;)ee.shift().call(null,ee.shift());te(e)}),p.addEventListener("DOMNodeInserted",m(b)),p.addEventListener("DOMNodeRemoved",m(w))),p.addEventListener(E,v),p.addEventListener("readystatechange",v),p.createElement=function(e,t){var n=K.apply(p,arguments),r=""+e,i=N.call(k,(t?A:O)+(t||r).toUpperCase()),o=-1<i;return t&&(n.setAttribute("is",t=t.toLowerCase()),o=o&&g(r.toUpperCase(),t)),oe=!p.createElement.innerHTMLHelper,o&&fe(n,S[i]),n},X.cloneNode=function(e){var t=W.call(this,!!e),n=h(t);return-1<n&&fe(t,S[n]),e&&function(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],fe(t,S[h(t)])}(t.querySelectorAll(C)),t}),-2<N.call(k,A+n)+N.call(k,O+n))throw new Error("A "+e+" type is already registered");if(!x.test(n)||-1<N.call(L,n))throw new Error("The type "+e+" is invalid");function r(){return u?p.createElement(s,n):p.createElement(s)}var n,i=t||I,u=P.call(i,y),s=u?t[y].toUpperCase():n,c=k.push((u?A:O)+n)-1;return C=C.concat(C.length?",":"",u?s+'[is="'+e.toLowerCase()+'"]':s),r.prototype=S[c]=P.call(i,"prototype")?i.prototype:q(X),d(p.querySelectorAll(C),b),r})}(window,document,Object,"registerElement"),function(h,i,g){"use strict";function m(){return h.performance!==g&&h.performance.now!==g?h.performance.now():Date.now()}function v(e){return.5*(1-Math.cos(Math.PI*e))}function o(e){if("object"!=typeof e||e.behavior===g||"auto"===e.behavior||"instant"===e.behavior)return 1;if("smooth"!==e.behavior)throw new TypeError(e.behavior+" is not a valid value for enumeration ScrollBehavior")}function n(o,a){var l=h.scrollX||h.pageXOffset,u=h.scrollY||h.pageYOffset,s=m();b&&h.cancelAnimationFrame(b),b=h.requestAnimationFrame(function e(){var t=(m()-s)/w,n=v(t=1<t?1:t),r=l+(o-l)*n,i=u+(a-u)*n;return c(r,i),r===o&&i===a?(l=u=s=null,h.cancelAnimationFrame(b)):b=h.requestAnimationFrame(e),g})}function a(u,e){if(u===i.documentElement||u===i.body)return n(e.left,e.top),g;var s=u.scrollLeft,c=u.scrollTop,p=e.left,d=e.top,f=m();b&&h.cancelAnimationFrame(b),b=h.requestAnimationFrame(function e(){var t,n,r,i=(m()-f)/w,o=v(i=1<i?1:i),a=s+(p-s)*o,l=c+(d-c)*o;return n=a,r=l,(t=u).scrollTop=r,t.scrollLeft=n,a===p&&l===d?(s=c=f=null,h.cancelAnimationFrame(b)):b=h.requestAnimationFrame(e),g})}var b,w,c,r,l;"scrollBehavior"in i.documentElement.style||(w=768,c=h.scrollTo,r=h.scrollBy,l=h.Element.prototype.scrollIntoView,h.scroll=h.scrollTo=function(){return o(arguments[0])?c.call(h,arguments[0].left||arguments[0],arguments[0].top||arguments[1]):n.call(h,~~arguments[0].left,~~arguments[0].top)},h.scrollBy=function(){if(o(arguments[0]))return r.call(h,arguments[0].left||arguments[0],arguments[0].top||arguments[1]);var e=h.scrollX||h.pageXOffset,t=h.scrollY||h.pageYOffset;return n(~~arguments[0].left+e,~~arguments[0].top+t)},Element.prototype.scrollIntoView=function(){var e,t,n,r;return o(arguments[0])?l.call(this,arguments[0]||!0):(r=h.getComputedStyle(i.body,null),t=parseInt(r.getPropertyValue("padding-left"),10),n=parseInt(r.getPropertyValue("padding-top"),10),e={top:this.offsetTop-2*n,left:this.offsetLeft-2*t},a(i.body,e))})}(window,document); })(this);
 
 // WCF.js
-(function (window, undefined) { WCF.js; })(this);
+(function (window, undefined) { "use strict";function wcfEval(expression){return eval(expression)}!function(){var o=jQuery.fn.data;jQuery.fn.data=function(e,t){var i,n=[].slice.call(arguments);if(e)switch(typeof e){case"object":for(var s in e){s.match(/ID$/)&&(i=e[s],delete e[s],e[s=s.replace(/ID$/,"-id")]=i)}n[0]=e;break;case"string":e.match(/ID$/)&&(n[0]=e.replace(/ID$/,"-id"))}var a=o.apply(this,n);if(void 0===e)for(var s in a)s.match(/Id$/)&&(a[s.replace(/Id$/,"ID")]=a[s],delete a[s]);return a},window.console||(window.console={});for(var e=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],t=0;t<e.length;t++)void 0===console[e[t]]&&(console[e[t]]=function(){});void 0===console.debug&&(console.debug=function(e){console.log(e)})}(),window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),t=e[--n],e[n]=e[i],e[i]=t;return this},function(e){var t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n={browser:i[1]||"",version:i[2]||"0"},s={};n.browser&&(s[n.browser]=!0,s.version=n.version),s.chrome?s.webkit=!0:s.webkit&&(s.safari=!0),e.browser=e.browser||{},e.browser=$.extend(e.browser,s),e.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&0<window.navigator.msMaxTouchPoints,e.browser.smartphone="bottom"==$("html").css("caption-side"),e.browser.mozilla&&t.match(/trident/)&&(e.browser.mozilla=!1,e.browser.msie=!0),e.browser.iOS=/\((ipad|iphone|ipod);/.test(t),e.browser.iOS&&$("html").addClass("iOS"),e.browser.android=-1!==t.indexOf("android"),e.browser.editor="redactor",e.browser.ckeditor=!1,e.browser.redactor=!0,e.browser.iOS&&(e.fn.focus=function(e,t){return 0<arguments.length?this.on("focus",null,e,t):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(e,i){return $.grep(e,function(e,t){return i!==e})},wcfEscapeID:function(e){return e.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(e){return!!$("#"+$.wcfEscapeID(e)).length},getLength:function(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&t++;return t}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},getOffsets:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"offset":i=this.offset();break;case"position":default:i=this.position()}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},makePositioned:function(e,t){"absolute"!=e&&"fixed"!=e&&(e="absolute");var i=this.getOffsets("position");return this.css({position:e,left:i.left,margin:0,top:i.top}),t&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;var e,t=0,i=this.get(0);return document.selection?(this.focus(),(e=document.selection.createRange()).moveStart("character",-this.val().length),t=e.text.length):!i.selectionStart&&"0"!=i.selectionStart||(t=parseInt(i.selectionStart)),t},setCaret:function(e){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;var t,i=this.get(0);return this.focus(),document.selection?((t=document.selection.createRange()).moveStart("character",e),t.moveEnd("character",0),t.select()):!i.selectionStart&&"0"!=i.selectionStart||(i.selectionStart=e,i.selectionEnd=e),!0},wcfDropIn:function(e,t,i){return e=e||"up",i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfDropOut:function(e,t,i){return e=e||"down",i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfBlindIn:function(e,t,i){return e=e||"vertical",i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfBlindOut:function(e,t,i){return e=e||"vertical",i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfHighlight:function(e,t){return this.effect("highlight",e,600,t)},wcfFadeIn:function(e,t){return t&&parseInt(t)||(t=200),this.show(WCF.getEffect(this,"fade"),{},t,e)},wcfFadeOut:function(e,t){return t&&parseInt(t)||(t=200),this.hide(WCF.getEffect(this,"fade"),{},t,e)},cssAsNumber:function(e){if(this.length){var t=this.css(e);if(void 0!==t)return parseInt(t.replace(/px$/,""))}return 0},perfectScrollbar:function(i){var n=require("perfect-scrollbar");return this.each(function(){var e,t;return"object"==typeof i||void 0===i?(e=i,$(this).data("psID")||n.initialize(this,e)):"update"===(t=i)?n.update(this):"destroy"===t&&n.destroy(this),jQuery(this)})}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(e,t){return-1!=$.inArray(e,t)},getEffect:function(e,t){return e.is("tr")?"highlight":t},getInlineCSS:function(e){var t={},i=e.attr("style");if(!i)return{};for(var n=0,s=(i=i.split(";")).length;n<s;n++){var a=$.trim(i[n]);""!=a&&(a=a.split(":"),t[$.trim(a[0])]=$.trim(a[1]))}return t},revertInlineCSS:function(e,t,i){for(var n=0,s=i.length;n<s;n++){var a=i[n];t[a]?e.css(a,t[a]):e.css(a,"")}},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},base64toBlob:function(e,t,i){t=t||"",i=i||512;for(var n=atob(e),s=[],a=0;a<n.length;a+=i){for(var o=n.slice(a,a+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);var c=new Uint8Array(r);s.push(c)}return new Blob(s,{type:t})},convertLegacyURL:function(e){return e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var i=t.split(/([A-Z][a-z0-9]+)/),n="",s=0,a=i.length;s<a;s++){var o=i[s].trim();o.length&&(n.length&&(n+="-"),n+=o.toLowerCase())}return"index.php?"+n+"/&"})}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(e){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(e,t){window.bc_wcfSimpleDropdown.init(e[0],t)},removeDropdown:function(e){window.bc_wcfSimpleDropdown.destroy(e)},initDropdownFragment:function(e,t){window.bc_wcfSimpleDropdown.initFragment(e[0],t[0])},registerCallback:function(e,t){window.bc_wcfSimpleDropdown.registerCallback(e,t)},_toggle:function(e,t){window.bc_wcfSimpleDropdown._toggle(e,t)},toggleDropdown:function(e,t){window.bc_wcfSimpleDropdown._toggle(null,e,null,t)},getDropdown:function(e){var t=window.bc_wcfSimpleDropdown.getDropdown(e);return t?$(t):null},getDropdownMenu:function(e){var t=window.bc_wcfSimpleDropdown.getDropdownMenu(e);return t?$(t):null},setAlignmentByID:function(e){window.bc_wcfSimpleDropdown.setAlignmentById(e)},setAlignment:function(e,t){window.bc_wcfSimpleDropdown.setAlignment(e[0],t[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(e){window.bc_wcfSimpleDropdown.close(e)},destroy:function(e){window.bc_wcfSimpleDropdown.destroy(e)}},WCF.Dropdown.Interactive={},WCF.Dropdown.Interactive.Handler={_dropdownContainer:{},_dropdownMenus:{},create:function(){},open:function(){},close:function(){},closeAll:function(){},getOpenDropdown:function(){},getDropdown:function(){}},WCF.Dropdown.Interactive.Instance=Class.extend({_container:{},_itemList:{},_linkList:{},_options:{},_pointer:{},_triggerElement:{},init:function(){},getContainer:function(){},getItemList:function(){},getLinkList:function(){},open:function(){},close:function(){},isOpen:function(){},toggle:function(){},resetItems:function(){},render:function(){},rebuildScrollbar:function(){}}),WCF.Clipboard={init:function(){},reload:function(){}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){$.isFunction(e)?(this._callback=e,this._interval=t,this.resume()):console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(e){throw this._isExecuting=!1,e}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(e){this._interval=e,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLabSuite/Core/Ajax/Status"],function(e){e.show()})},hide:function(){require(["WoltLabSuite/Core/Ajax/Status"],function(e){e.hide()})},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("fa-spinner"),e.hasClass("icon")&&e[i]("fa-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(t){this._ajaxRequest=null,"jsonp"===(t=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php?ajax-proxy/&t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},t)).dataType?require(["AjaxJsonp"],function(e){e.send(t.url,t.success,t.failure,{parameterName:t.jsonp})}):require(["AjaxRequest"],function(e){this._ajaxRequest=new e({data:t.data,type:t.type,url:t.url,withCredentials:t.url==="index.php?ajax-proxy/&t="+SECURITY_TOKEN,responseType:"json"===t.dataType?"application/json":"",autoAbort:t.autoAbortPrevious,ignoreError:t.suppressErrors,silent:!t.showLoadingOverlay,failure:t.failure,finalize:t.after,success:t.success}),t.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(t){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(t)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(t,i){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.setOption(t,i)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(e,t,i){},_success:function(e,t,i){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(e,t){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},e),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},t),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy(function(e,t){$(t).bind(this.options.eventName,$.proxy(this._handleEvent,this))},this)))},_handleEvent:function(e){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(e.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_callback:null,_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i||".jsDeleteButton",this._callback=null,this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each(function(e,t){var i,n=$(t),s=n.wcfIdentify();WCF.inArray(s,this._containers)||(i=n.find(this._buttonSelector)).length&&(this._containers.push(s),i.click($.proxy(this._click,this)))}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessageHtml")||t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessageHtml")?t.data("confirmMessageHtml"):t.data("confirmMessage"),$.proxy(this._execute,this),{target:t},void 0,!!t.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_didTriggerEffect:function(e){},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._callback&&this._callback(e.objectIDs),this.triggerEffect(e.objectIDs)},setCallback:function(e){if("function"!=typeof e)throw new TypeError("[WCF.Action.Delete] Expected a valid callback for '"+this._className+"'.");this._callback=e},triggerEffect:function(e){for(var t in this._containers){var i,n=$("#"+this._containers[t]),s=n.find(this._buttonSelector);WCF.inArray(s.data("objectID"),e)&&(i=this,n.wcfBlindOut("up",function(){var e=$(this).remove();i._containers.splice(i._containers.indexOf(e.wcfIdentify()),1),i._didTriggerEffect(e),s.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",s.data("eventName"),{button:s,container:e})}))}}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(){},_buttonSelector:"",_callback:{},_className:"",_containerSelector:"",_containers:{},init:function(){},_initElements:function(){},_click:function(){},_didTriggerEffect:function(){},_execute:function(){},_sendRequest:function(){},_success:function(){},setCallback:function(){}}),WCF.Action.Toggle=Class.extend({_buttonSelector:"",_className:"",_containerSelector:"",_containers:{},init:function(){},_initElements:function(){},_click:function(){},_execute:function(){},_sendRequest:function(){},_success:function(){},triggerEffect:function(){},_toggleButton:function(){}}),WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(e,t,i,n){this._threshold=parseInt(e),0!==this._threshold?($.isFunction(t)&&(this._callback=t),null!==this._callback?(this._reference=$(i||window),this._target=$(n||document),this.start(),this._scroll()):console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting.")):console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting.")},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop();e-(this._reference.height()+t)<this._threshold&&this._callback(this)},start:function(){this._reference.on("scroll",$.proxy(this._scroll,this))},stop:function(){this._reference.off("scroll")}}),WCF.Date={},WCF.Date.Picker={init:function(){}},WCF.Date.Util={gmdate:function(e){var t=e||new Date;return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDay(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=6e4*new Date(e).getTimezoneOffset();return new Date(e+i+t)}},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(e,t){this._variables[e]=t},addObject:function(e){for(var t in e)this.add(t,e[t])},addDictionary:function(e){e.each($.proxy(function(e){this.add(e.key,e.value)},this))},get:function(e){return this.isset(e)?this._variables[e]:null},isset:function(e){return this._variables.hasOwnProperty(e)},remove:function(e){delete this._variables[e]},each:function(e){if($.isFunction(e))for(var t in this._variables){e({key:t,value:this._variables[t]})}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(t,i){require(["Language"],function(e){e.add(t,i)})},addObject:function(t){require(["Language"],function(e){e.addObject(t)})},get:function(e,t){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.Number={round:function(e,t){return t=Math.pow(10,t||0),Math.round(e*t)/t}},WCF.String={addThousandsSeparator:function(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+WCF.Language.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(e,t){var i=(e=String(WCF.Number.round(e,t||2))).split(".");return e=this.addThousandsSeparator(i[0]),1<i.length&&(e+=WCF.Language.get("wcf.global.decimalPoint")+i[1]),e=e.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.setup()})},reload:function(){this.init()}},WCF.Template=Class.extend({init:function(t){var i=new WCF.Dictionary,n=0;t=(t=(t=t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")).replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy(function(e){var t="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return i.add(t,e.replace(/\{\/?literal\}/g,"")),t},this))).replace(/\{\*.*?\*\}/g,"");function s(e){for(var t=e.split(""),i={},n=!0,s="",a="",o=!1,r=!1,l=!1,c=0,u=t.length;c<u;c++){var h=t[c];n&&"="!=h&&" "!=h?s+=h:n&&"="==h?l=o=r=n=!1:n||r||o||" "!=h?n||!r||l||"'"!=h?n||r||o||"'"!=h?n||!o||l||'"'!=h?n||r||o||'"'!=h?n||!o&&!r||l||"\\"!=h?n||(l=!1,a+=h):(l=!0,a+=h):(o=!0,a+=h):(o=!1,a+=h):(r=!0,a+=h):(r=!1,a+=h):(n=!0,i[s]=a,a=s="")}if(i[s]=a,o||r||l)throw new Error('Syntax error in parameterList: "'+e+'"');return i}function a(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")}for(var e in t=t.replace(/\{(\$[^\}]+?)\}/g,function(e,t){return"' + WCF.String.escapeHTML("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") + '"}).replace(/\{#(\$[^\}]+?)\}/g,function(e,t){return"' + WCF.String.formatNumeric("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") + '"}).replace(/\{@(\$[^\}]+?)\}/g,function(e,t){return"' + "+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+" + '"}).replace(/\{lang\}(.+?)\{\/lang\}/g,function(e,t){return"' + WCF.Language.get('"+t+"', v) + '"}).replace(/\{include (.+?)\}/g,function(e,t){t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=s(t);if(void 0===i.file)throw new Error("Missing file attribute in include-tag");return i.file=i.file.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"' + "+i.file+".fetch(v) + '"}).replace(/\{if (.+?)\}/g,function(e,t){return"';\nif ("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") {\n\t$output += '"}).replace(/\{else ?if (.+?)\}/g,function(e,t){return"';\n}\nelse if ("+(t=a(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")))+") {\n\t$output += '"}).replace(/\{implode (.+?)\}/g,function(e,t){n++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=s(t);if(void 0===i.from)throw new Error("Missing from attribute in implode-tag");if(void 0===i.item)throw new Error("Missing item attribute in implode-tag");return void 0===i.glue&&(i.glue="', '"),i.from=i.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+n+" = false;\nfor ($implodeKey_"+n+" in "+i.from+") {\n\tv["+i.item+"] = "+i.from+"[$implodeKey_"+n+"];\n"+(void 0!==i.key?"\t\tv["+i.key+"] = $implodeKey_"+n+";\n":"")+"\tif ($implode_"+n+") $output += "+i.glue+";\n\t$implode_"+n+" = true;\n\t$output += '"}).replace(/\{foreach (.+?)\}/g,function(e,t){n++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=s(t);if(void 0===i.from)throw new Error("Missing from attribute in foreach-tag");if(void 0===i.item)throw new Error("Missing item attribute in foreach-tag");return i.from=i.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+n+" = false;\nfor ($foreachKey_"+n+" in "+i.from+") {\n\t$foreach_"+n+" = true;\n\tbreak;\n}\nif ($foreach_"+n+") {\n\tfor ($foreachKey_"+n+" in "+i.from+") {\n\t\tv["+i.item+"] = "+i.from+"[$foreachKey_"+n+"];\n"+(void 0!==i.key?"\t\tv["+i.key+"] = $foreachKey_"+n+";\n":"")+"\t\t$output += '"}).replace(/\{foreachelse\}/g,"';\n\t}\n}\nelse {\n\t{\n\t\t$output += '").replace(/\{\/foreach\}/g,"';\n\t}\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n\t$output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '"),WCF.Template.callbacks)t=WCF.Template.callbacks[e](t);t=t.replace("{ldelim}","{").replace("{rdelim}","}"),i.each(function(e){t=t.replace(e.key,e.value)}),t="$output += '"+t+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+t+" return $output;")}catch(e){throw console.debug("var $output = ''; "+t+" return $output;"),e}},fetch:function(e){}}),WCF.Template.callbacks=[],WCF.ToggleOptions=Class.extend({_element:null,_showItems:[],_hideItems:[],_callback:null,init:function(e,t,i,n){this._element=$("#"+e),this._showItems=t,this._hideItems=i,void 0!==n&&(this._callback=n),this._element.click($.proxy(this._toggle,this)),this._toggle()},_toggle:function(){if(this._element.prop("checked")){for(var e=0,t=this._showItems.length;e<t;e++){var i=this._showItems[e];$("#"+i).show()}for(e=0,t=this._hideItems.length;e<t;e++){i=this._hideItems[e];$("#"+i).hide()}null!==this._callback&&this._callback()}}}),WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy(function(e,t){this._initButton(t)},this))},_initButton:function(e){var t=$(e);t.data("isOpen")||$("#"+t.data("collapsibleContainer")).hide(),t.click($.proxy(this._toggle,this))},_toggle:function(e){var t=$(e.currentTarget),i=t.data("isOpen"),n=$("#"+$.wcfEscapeID(t.data("collapsibleContainer"))),i=i?(n.stop().wcfBlindOut("vertical",$.proxy(function(){this._toggleImage(t)},this)),!1):(n.stop().wcfBlindIn("vertical",$.proxy(function(){this._toggleImage(t)},this)),!0);return t.data("isOpen",i),e.stopPropagation(),!1},_toggleImage:function(e){var t=e.find("span.icon");e.data("isOpen")?t.removeClass("fa-chevron-right").addClass("fa-chevron-down"):t.removeClass("fa-chevron-down").addClass("fa-chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(e){this._className=e,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(e){this._getContainers().each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))},this))},_initContainer:function(e){var t=this._getTarget(e),i=this._getButtonContainer(e),n=this._createButton(e,i);this._containerData[e]={button:n,buttonContainer:i,isOpen:this._containers[e].data("isOpen"),target:t},this._containers[e].data("isOpen")||$("#"+e).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(e){},_getButtonContainer:function(e){},_createButton:function(e,t){var i=elBySel(".jsStaticCollapsibleButton",t[0]);return(i=null!==i&&i.parentNode===t[0]?(i.classList.remove("jsStaticCollapsibleButton"),$(i)):$('<span class="collapsibleButton jsTooltip pointer icon icon16 fa-chevron-down" title="'+WCF.Language.get("wcf.global.button.collapsible")+'">').prependTo(t)).data("containerID",e).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(e){var t=$(e.currentTarget).data("containerID"),i=this._containerData[t].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(t)],parameters:$.extend(!0,{containerID:t,currentState:n,newState:s},this._getAdditionalParameters(t))}),this._proxy.sendRequest(),$("#"+t).toggleClass("jsCollapsed")},_exchangeIcon:function(e,t){t=t||"spinner",e.removeClass("fa-chevron-down fa-chevron-right fa-spinner").addClass("fa-"+t)},_getObjectID:function(e){return $("#"+e).data("objectID")},_getAdditionalParameters:function(e){return{}},_updateContent:function(e,t,i){this._containerData[e].target.html(t)},_success:function(e,t,i){var n,s;e.returnValues.containerID&&(n=e.returnValues.containerID,this._containers[n]&&(this._containerData[n].isOpen=!!e.returnValues.isOpen,s=e.returnValues.isOpen?"open":"close",this._updateContent(n,$.trim(e.returnValues.content),s)))}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(e){this._super(e),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(e){this._super(e),this._containerData[e].isOpen||(this._containerData[e].target.hide(),this._exchangeIcon(this._containerData[e].button,"chevron-right"))},_toggleContainer:function(e){var t=$(e.currentTarget).data("containerID"),i=this._containerData[t].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(t)],parameters:$.extend(!0,{containerID:t,currentState:n,newState:s},this._getAdditionalParameters(t))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[t].button,"open"==s?"chevron-down":"chevron-right"),"open"==s?this._containerData[t].target.show():this._containerData[t].target.hide(),$("#"+t).toggleClass("jsCollapsed"),this._containerData[t].isOpen="open"==s}}),WCF.User={userID:0,username:"",init:function(e,t){this.userID=e,this.username=t}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(e,t,i){if(!e.length)return!0;var n=e.getOffsets("offset").top,s=$(document).height(),a=$(window).height();return s-a<n&&(n=s-a)<0&&(n=0),!0===i?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,function(e,t,i,n,s){return-n*((t=t/s-1)*t*t*t-1)+i}),!1}}),WCF.CloseOverlayHandler={addCallback:function(t,i){require(["Ui/CloseOverlay"],function(e){e.add(t,i)})},removeCallback:function(t){require(["Ui/CloseOverlay"],function(e){e.remove(t)})},forceExecution:function(){require(["Ui/CloseOverlay"],function(e){e.execute()})}},WCF.DOMNodeInsertedHandler={addCallback:function(e,t){require(["WoltLabSuite/Core/Dom/Change/Listener"],function(e){e.add("__legacy__",t)})},_executeCallbacks:function(){require(["WoltLabSuite/Core/Dom/Change/Listener"],function(e){e.trigger()})},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(e,t){if(this._bindListener(),this._callbacks.isset(e))return console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+e+"' is already bound to a callback"),!1;this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){this._isListening||(window.MutationObserver?new MutationObserver(function(e){var t=!1;e.forEach(function(e){e.removedNodes.length&&(t=!0)}.bind(this)),t&&this._executeCallbacks({})}.bind(this)).observe(document.body,{childList:!0,subtree:!0}):$(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this)),this._isListening=!0)},_executeCallbacks:function(t){this._isExecuting||(this._isExecuting=!0,this._callbacks.each(function(e){e.value(t)}),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){},_initOptions:function(){},_initOption:function(){},_handleChange:function(){},_change:function(){},_execute:function(){},_enableOption:function(){},_enableOptionElement:function(){},_enableOptions:function(){}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(e,t){if(this._bindListener(),this._callbacks.isset(e))return console.debug("[WCF.PageVisibilityHandler] identifier '"+e+"' is already bound to a callback"),!1;this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){var e;this._isListening||(e=null,void 0!==document.hidden?(this._hiddenFieldName="hidden",e="visibilitychange"):void 0!==document.mozHidden?(this._hiddenFieldName="mozHidden",e="mozvisibilitychange"):void 0!==document.msHidden?(this._hiddenFieldName="msHidden",e="msvisibilitychange"):void 0!==document.webkitHidden&&(this._hiddenFieldName="webkitHidden",e="webkitvisibilitychange"),null===e?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(e,$.proxy(this._executeCallbacks,this)),this._isListening=!0)},_executeCallbacks:function(e){var t;this._isExecuting||(this._isExecuting=!0,t=document[this._hiddenFieldName],this._callbacks.each(function(e){e.value(t)}),this._isExecuting=!1)}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(e,t,i){this._rowClassName=t,this._tableContainer=e,this._options=$.extend(!0,{emptyMessage:null,emptyMessageHtml:null,messageType:"info",refreshPage:!1,updatePageNumber:!1,isTable:0!==this._tableContainer.find("table").length},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+t,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find((this._options.isTable?"table tr.":".tabularList .")+this._rowClassName).length},_handleEmptyTable:function(){var e,t;this._options.emptyMessage?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage)):this._options.emptyMessageHtml?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).html(this._options.emptyMessageHtml)):this._options.refreshPage?this._options.updatePageNumber?(e=window.location.href.match(/(\?|&)pageNo=(\d+)/g))&&(t=e[e.length-1].match(/\d+/g),0<this._options.updatePageNumber?t++:t--,window.location=window.location.href.replace(e[e.length-1],e[e.length-1][0]+"pageNo="+t)):window.location.reload():this._tableContainer.remove()},_remove:function(e){var t;$.getLength(e)?(t=$(e.target)).hasClass(this._rowClassName)&&(this._options.isTable?1==t.parents("tbody:eq(0)").children("tr").length&&this._handleEmptyTable():1===this._getRowCount()&&this._handleEmptyTable()):this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_lastValue:"",_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(e,t,i,n,s){null==t||$.isFunction(t)?(this._callback=t||null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],this._lastValue="",i&&(this._excludedSearchValues=i),this._searchInput=$(e),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=!!n,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!0===s,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):console.debug("[WCF.Search.Base] Selector '"+e+"' for search input is invalid, aborting.")):console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var t=this;new WCF.PeriodicalExecuter(function(e){t._list.is(":visible")&&t._clearList(!1),e.stop()},250)},_keyDown:function(e){var t;e.which===$.ui.keyCode.ENTER&&((t=this._searchInput.parents(".dropdown")).data("disableAutoFocus")?-1!==this._itemIndex&&e.preventDefault():!t.data("preventSubmit")&&-1===this._itemIndex||e.preventDefault())},_keyUp:function(e){switch(e.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(e)}var t=this._getSearchString(e);if(""===t)this._clearList(!1);else if(t.length>=this._triggerLength){if(this._lastValue===t)return;this._lastValue=t;var i,n={data:{excludedSearchValues:this._excludedSearchValues,searchString:t}};this._delay?(null!==this._timer&&this._timer.stop(),(i=this)._timer=new WCF.PeriodicalExecuter(function(){i._queryServer(n),i._timer.stop(),i._timer=null},this._delay)):this._queryServer(n)}else this._clearList(!1)},_queryServer:function(e){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(e)}),this._proxy.sendRequest()},setDelay:function(e){this._delay=e},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(e){return 0===this._itemCount||(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(e){var t=$.trim(this._searchInput.val());if(this._commaSeperated){if((e.keyCode||e.which)==$.ui.keyCode.COMMA)return"";for(var i=t.split(","),n=i.length,s=0;s<n;s++)i[s]=$.trim(i[s]);for(s=0;s<n;s++){var a=i[s];if(!this._oldSearchString[s]){t=a;break}if(a!=this._oldSearchString[s]){t=a,this._caretAt=s;break}}this._oldSearchString=i}return t},_getParameters:function(e){return e},_success:function(e,t,i){if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(e.returnValues))for(var n in e.returnValues){var s=e.returnValues[n];this._createListItem(s)}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var a=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(a).hasClass("dropdownOpen")||(WCF.Dropdown.toggleDropdown(a,!0),this._openDropdown()),this._itemIndex=-1,WCF.Dropdown.getDropdown(a).data("disableAutoFocus")||this._selectNextItem()},_openDropdown:function(){},_handleEmptyResult:function(){return!1},_createListItem:function(e){var t=$("<li><span>"+WCF.String.escapeHTML(e.label)+"</span></li>").appendTo(this._list);return t.data("objectID",e.objectID).data("label",e.label).click($.proxy(this._executeCallback,this)),this._itemCount++,t},_executeCallback:function(e){var t,i,n=!1,s=$(e.currentTarget);this._commaSeperated?(t=s.data("label"),this._oldSearchString[this._caretAt]=t,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"}),i=this._searchInput.val().toLowerCase().indexOf(t.toLowerCase())+t.length,this._searchInput.focus().setCaret(i)):null===this._callback?this._searchInput.val(s.data("label")):n=!0===this._callback(s.data()),this._clearList(n)},_clearList:function(e){e&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(e){WCF.inArray(e,this._excludedSearchValues)||this._excludedSearchValues.push(e)},removeExcludedSearchValue:function(e){var t=$.inArray(e,this._excludedSearchValues);-1!=t&&this._excludedSearchValues.splice(t,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(e,t,i,n,s){this._includeUserGroups=i,this._super(e,t,n,s)},_getParameters:function(e){return e.data.includeUserGroups=this._includeUserGroups?1:0,e},_createListItem:function(e){var t,i,n=this._super(e),s=null;return e.icon?s=$(e.icon):this._includeUserGroups&&"group"===e.type&&(s=$('<span class="icon icon16 fa-users" />')),s&&(t=n.find("span").detach(),(i=$("<div />").addClass("box16").appendTo(n)).append(s),i.append($("<div />").append(t))),n.data("type",e.type),n}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(e,t){$.isFunction(t)?WCF.inArray(e,this._loaded)?setTimeout(function(){t()},1):(this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t)):console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+e+"' is invalid, aborting.")},setup:function(e,t){$.isFunction(t)?(this._setupCallbacks[e]||(this._setupCallbacks[e]=[]),this._setupCallbacks[e].push(t)):console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+e+"' is invalid, aborting.")},invoke:function(e){if(this._setupCallbacks[e]){for(var t=0,i=this._setupCallbacks[e].length;t<i;t++)this._setupCallbacks[e][t]();delete this._setupCallbacks[e]}if(this._loaded.push(e),this._callbacks[e]){for(t=0,i=this._callbacks[e].length;t<i;t++)this._callbacks[e][t]();delete this._callbacks[e]}},reset:function(e){var t=this._loaded.indexOf(e);-1!==t&&this._loaded.splice(t,1)}},WCF.System.FlexibleMenu={init:function(){},registerMenu:function(t){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],function(e){e.register(t)})},rebuild:function(t){require(["WoltLabSuite/Core/Ui/FlexibleMenu"],function(e){e.rebuild(t)})}},WCF.System.Mobile={},WCF.System.ObjectStore={_objects:{},add:function(e,t){void 0===this._objects[e]&&(this._objects[e]=[]),this._objects[e].push(t)},invoke:function(e,t){if(this._objects[e])for(var i=0;i<this._objects[e].length;i++)t(this._objects[e][i])}},WCF.System.Captcha={_registeredCaptchas:[],addCallback:function(t,i){require(["WoltLabSuite/Core/Controller/Captcha"],function(e){try{e.add(t,i),this._registeredCaptchas.push(t)}catch(e){if(e instanceof TypeError)return void console.debug("[WCF.System.Captcha] Given callback is no function")}}.bind(this))},getData:function(t){var e;if(-1===this._registeredCaptchas.indexOf(t))return e;var i=require("WoltLabSuite/Core/Controller/Captcha");try{e=i.getData(t)}catch(e){console.debug('[WCF.System.Captcha] Unknow captcha id "'+t+'"')}return e},removeCallback:function(t){require(["WoltLabSuite/Core/Controller/Captcha"],function(e){try{e.delete(t),this._registeredCaptchas.splice(this._registeredCaptchas.indexOf(item),1)}catch(e){}}.bind(this))}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(e,t){this._cssClassNames=t||"",this._message=e||""},show:function(t,e,i,n){require(["Ui/Notification"],function(e){e.show(i||this._message,t,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(t,i,n,s,a){var e;"object"==typeof s&&((e=$("<div />")).append(s),s=e.html()),require(["Ui/Confirmation"],function(e){e.show({legacyCallback:i,message:t,parameters:n,template:s||"",messageIsHtml:!0===a})})}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){var e;0===this._depth&&(e=$("meta[name=viewport]"),this._oldViewportSettings=e.attr("content"),e.attr("content",this._oldViewportSettings+",maximum-scale=1")),this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.Fullscreen={enterFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},toggleFullscreen:function(e){null===this.getFullscreenElement()?this.enterFullscreen(e):this.exitFullscreen()},getFullscreenElement:function(){return document.fullscreenElement?document.fullscreenElement:document.mozFullScreenElement?document.mozFullScreenElement:document.webkitFullscreenElement?document.webkitFullscreenElement:document.msFullscreenElement?document.msFullscreenElement:null},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},isSupported:function(){return!!(document.documentElement.requestFullscreen||document.documentElement.msRequestFullscreen||document.documentElement.mozRequestFullScreen||document.documentElement.webkitRequestFullscreen)}},WCF.System.PageNavigation={init:function(s,a){require(["WoltLabSuite/Core/Ui/Page/JumpTo"],function(e){for(var t=elBySelAll(s),i=0,n=t.length;i<n;i++)e.init(t[i],a)})}},WCF.System.KeepAlive=Class.extend({init:function(e){new WCF.PeriodicalExecuter(function(e){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"keepAlive",className:"wcf\\data\\session\\SessionAction"},failure:function(){e.stop()},showLoadingOverlay:!1,success:function(e){WCF.System.PushNotification.executeCallbacks(e)},suppressErrors:!0})},1e3*e)}}),WCF.System.PushNotification={_callbacks:{},addCallback:function(e,t){void 0===this._callbacks[e]&&(this._callbacks[e]=[]),this._callbacks[e].push(t)},executeCallbacks:function(e){for(var t in e.returnValues)if(void 0!==this._callbacks[t])for(var i=0;i<this._callbacks[t].length;i++)this._callbacks[t][i](e.returnValues[t])}},WCF.System.Event={addListener:function(e,t,i){return window.__wcf_bc_eventHandler.add(e,t,i)},removeListener:function(e,t,i){return window.__wcf_bc_eventHandler.remove(e,t,i)},removeAllListeners:function(e,t){return window.__wcf_bc_eventHandler.removeAll(e,t)},fireEvent:function(e,t,i){window.__wcf_bc_eventHandler.fire(e,t,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:{},_className:"",_dialog:{},_proxy:{},_title:"",init:function(){},_success:function(){}}),WCF.InlineEditor=Class.extend({_callbacks:{},_dropdowns:{},_elements:{},_notification:{},_options:{},_proxy:{},_triggerElements:{},_updateData:{},init:function(){},_closeAll:function(){},_setOptions:function(){},registerCallback:function(){},_getTriggerElement:function(){},_show:function(){},_validate:function(){},_validateCallbacks:function(){},_success:function(){},_updateState:function(){},_click:function(){},_execute:function(){},_executeCallback:function(){},_hide:function(){}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(e,t,i,n){this._buttonSelector=e,this._fileListSelector=t,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){var e;this._supportsAJAXUpload?(this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this)),e=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(e[0],"role","button"),e.prepend(this._fileUpload),this._fileUpload[0].addEventListener("focus",function(){this.classList.contains("focus-visible")&&e[0].classList.add("active")}),this._fileUpload[0].addEventListener("blur",function(){e[0].classList.remove("active")})):(e=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(e[0],"role","button"),elAttr(e[0],"tabindex","0"),e.click($.proxy(this._showOverlay,this))),this._insertButton(e)},_insertButton:function(e){this._buttonSelector.prepend(e)},_removeButton:function(){var e=".uploadButton";this._supportsAJAXUpload||(e=".uploadFallbackButton"),this._buttonSelector.find(e).remove()},_upload:function(e,t,i,n){var s=null,a=[];if(void 0!==n)a=n;else if(t)a.push(t);else if(i){var o="";switch(i.type){case"image/png":o=".png";break;case"image/jpeg":o=".jpg";break;case"image/gif":o=".gif"}a.push({name:"pasted-from-clipboard"+o})}else a=this._fileUpload.prop("files");if(a.length){var r=new FormData,s=this._createUploadMatrix(a);if(!this._uploadMatrix[s].length)return null;for(var l,c=0,u=a.length;c<u;c++){this._uploadMatrix[s][c]&&(l=this._uploadMatrix[s][c].data("internalFileID"),i?r.append("__files["+l+"]",i,a[c].name):r.append("__files["+l+"]",a[c],a[c].name))}r.append("actionName",this._options.action),r.append("className",this._className);var h=this._getParameters();for(var d in h)r.append("parameters["+d+"]",h[d]);var p=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:r,contentType:!1,processData:!1,success:function(e,t,i){p._success(s,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){p._progress(s,e)},!1),e},xhrFields:{withCredentials:!0}})}return s},_createUploadMatrix:function(e){if(e.length){var t=this._uploadMatrix.length;this._uploadMatrix[t]=[];for(var i=0,n=e.length;i<n;i++){var s=e[i],a=this._initFile(s);a.hasClass("uploadFailed")||(a.data("filename",s.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[t][i]=a)}return t}return null},_success:function(e,t){},_error:function(e,t,i){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);for(var n in this._uploadMatrix[e])this._uploadMatrix[e][n].find("progress").attr("value",i)},_getParameters:function(){return{}},_initFile:function(e){return $("<li>"+e.name+" ("+e.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix([e]),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(e,t,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(e,t,i,n)},_upload:function(){for(var e=this._fileUpload.prop("files"),t=0,i=e.length;t<i;t++){var n=e[t],s=new FormData,a=this._createUploadMatrix(n);if(this._uploadMatrix[a].length){s.append("__files["+a+"]",n),s.append("actionName",this._options.action),s.append("className",this._className);var o=this._getParameters();for(var r in o)s.append("parameters["+r+"]",o[r]);this._sendRequest(a,s)}}},_sendRequest:function(n,e){var s=this;return $.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:e,contentType:!1,processData:!1,success:function(e,t,i){s._success(n,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){s._progress(n,e)},!1),e}})},_createUploadMatrix:function(e){var t=this._initFile(e);return t.hasClass("uploadFailed")?null:(t.data("filename",e.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=t,this._internalFileID-1)},_success:function(e,t){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);this._uploadMatrix[e].find("progress").attr("value",i)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix(e),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:{},_notification:{},_offset:0,_options:{},_proxy:{},_structure:{},init:function(){},_tableRowHelper:function(){},_submit:function(){},_success:function(){}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(t){var i=!1;require(["Environment"],function(e){"desktop"!==e.platform()&&(i=!0)}.bind(this)),i||(this._activeElementID="",this._identifier=t,require(["WoltLabSuite/Core/Controller/Popover"],function(e){e.init({attributeName:"legacy",className:t,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(e,t){this._activeElementID=e,this._popoverObj=t,this._loadContent()},_insertContent:function(e,t){this._popoverObj.setContent(this._identifier,e,t)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(e,t){var i;this._itemList=$(e),this._searchInput=$(t),this._data={},this._itemList.length&&this._searchInput.length?(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput&&(i=this)._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",function(){setTimeout(function(){i._onPaste()},100)}),this._searchInput.parents(".dropdown").data("preventSubmit",!0)):console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.")},_keyDown:function(e){return null!==e||this._keyPress(null)},_keyPress:function(e){if(null===e||44===e.charCode||e.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&e.keyCode===$.ui.keyCode.ENTER){if(null!==e&&e.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var t=$.trim(this._searchInput.val());return(e&&44===e.charCode&&(t=t.substring(0,this._searchInput.getCaret())),""===t)?!0:(this.addItem({objectID:0,label:t}),e&&44===e.charCode?this._searchInput.val($.trim(this._searchInput.val().substr(this._searchInput.getCaret()))):this._searchInput.val(""),null!==e&&e.stopPropagation(),!1)}return!0},_onPaste:function(){for(var e=$.trim(this._searchInput.val()),t=0,i=(e=e.split(",")).length;t<i;t++){var n=$.trim(e[t]);""!==n&&this.addItem({objectID:0,label:n})}this._searchInput.val("")},load:function(e){},_click:function(e){var t=$(e.currentTarget),i=t.data("objectID"),n=t.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),t.remove(),e.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(e){return(!this._data[e.objectID]||0===e.objectID&&this._allowCustomInput)&&($('<li class="badge">'+WCF.String.escapeHTML(e.label)+"</li>").data("objectID",e.objectID).data("label",e.label).appendTo(this._itemList).click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(e.label),this._addItem(e.objectID,e.label)),!0},clearList:function(){this._itemList.children("li").each($.proxy(function(e,t){var i=$(t);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))},this))},_submit:function(){this._keyDown(null)},_addItem:function(e,t){this._data[e]=t},_removeItem:function(e,t){delete this._data[e]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(t,i,n,s,a,o){require(["WoltLabSuite/Core/Language/Chooser"],function(e){e.init(t,i,n,s,a,o)})}}),WCF.Style={},WCF.UserPanel=Class.extend({_container:null,_didLoad:!1,_link:null,_noItems:"",_revertOnEmpty:!0,init:function(e){this._container=$("#"+e),this._didLoad=!1,this._revertOnEmpty=!0,1==this._container.length?this._convert():console.debug("[WCF.UserPanel] Unable to find container identified by '"+e+"', aborting.")},_convert:function(){this._container.addClass("dropdown"),this._link=this._container.children("a").remove();var e=$('<a href="'+this._link.attr("href")+'" class="dropdownToggle">'+this._link.html()+"</a>").appendTo(this._container).click($.proxy(this._click,this)),t=$('<ul class="dropdownMenu" />').appendTo(this._container);$('<li class="jsDropdownPlaceholder"><span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t),this._addDefaultItems(t),this._container.dblclick($.proxy(function(){return window.location=this._link.attr("href"),!1},this)),WCF.Dropdown.initDropdown(e,!1)},_addDefaultItems:function(e){},_addDivider:function(e){$('<li class="dropdownDivider" />').appendTo(e)},_click:function(e){e.preventDefault(),this._didLoad||(new WCF.Action.Proxy({autoSend:!0,data:this._getParameters(),success:$.proxy(this._success,this)}),this._didLoad=!0)},_getParameters:function(){return{}},_success:function(e,t,i){var n=WCF.Dropdown.getDropdownMenu(this._container.wcfIdentify());n.children(".jsDropdownPlaceholder").remove(),e.returnValues&&e.returnValues.template?($(""+e.returnValues.template).prependTo(n),this._updateBadge(e.returnValues.totalCount),this._after(n)):($("<li><span>"+WCF.Language.get(this._noItems)+"</span></li>").prependTo(n),this._updateBadge(0))},_updateBadge:function(e){var t;(e=parseInt(e)||0)?((t=this._container.find(".badge")).length||(t=$('<span class="badge badgeUpdate" />').appendTo(this._container.children(".dropdownToggle"))).before(" "),t.html(e)):this._container.find(".badge").remove()},_after:function(e){}}),jQuery.fn.extend({wcfDialog:function(s){var a=arguments;return require(["Dom/Util","Ui/Dialog"],function(e,t){var i,n=e.identify(this[0]);"close"===s?t.close(n):"render"===s?t.rebuild(n):"option"===s?3===a.length&&("title"===a[1]&&"string"==typeof a[2]?t.setTitle(n,a[2]):0===a[1].indexOf("on")?t.setCallback(n,a[1],a[2]):"closeConfirmMessage"===a[1]&&null===a[2]&&t.setCallback(n,"onBeforeClose",null)):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),i=1===a.length&&"object"==typeof a[0]?a[0]:{},t.openStatic(n,null,i),i.hasOwnProperty("title")&&t.setTitle(n,i.title))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,1<this._count&&this._initSlideshow()},_initSlideshow:function(){var i=$(this._items.get(0)).outerHeight();this._items.addClass("slideshowItem"),this._width=this.element.css("height",i).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy(function(e,t){$(t).show().css({height:i,left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this.element.css({height:i,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element);for(var e=0;e<this._count;e++){var t=$('<li><a><span class="icon icon16 fa-circle" /></a></li>').data("index",e).click($.proxy(this._click,this)).appendTo(this._buttonList);0==e&&t.find(".icon").addClass("active")}this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var e=$(this._items.get(0)).css("height","auto").outerHeight();this._items.css("height",e+"px"),this.element.css("height",e+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy(function(e,t){$(t).css({left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){var e;this.options.cycle&&(null!==this._timer&&this._timer.stop(),(e=this)._timer=new WCF.PeriodicalExecuter(function(){e.moveTo(null)},1e3*this.options.cycleInterval))},_click:function(e){this.moveTo($(e.currentTarget).data("index")),this._resetTimer()},moveTo:function(e){this._index=null===e?this._index+1:e,this._index==this._count&&(this._index=0),$(this._buttonList.find(".icon").removeClass("active").get(this._index)).addClass("active"),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(e){return this._items[e]?this._items[e]:null}}),jQuery.fn.extend({datepicker:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);switch(e){case"destroy":window.__wcf_bc_datePicker.destroy(t);break;case"getDate":return window.__wcf_bc_datePicker.getDate(t);case"option":if("onClose"===i[0])return 1<i.length?this.datepicker("setOption","onClose",i[1]):function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(t,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(t,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+e+"' for datepicker()")}return this}}),jQuery.fn.extend({wcfTabs:function(n){var s=this[0],a=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLabSuite/Core/Ui/TabMenu"],function(e,t){var i=t.getTabMenu(e.identify(s));null!==i&&i[n].apply(i,a)})}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLabSuite/Core/Ui/Pagination"],function(e){this._api=new e(this.element[0],{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(e){return!1!==this._trigger("shouldSwitch",void 0,{nextPage:e})}.bind(this),callbackSwitch:function(e){this._trigger("switched",void 0,{activePage:e})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(e,t){var i;return"activePage"==e&&t!=this.options[e]&&0<t&&t<=this.options.maxPage&&((i=this._trigger("shouldSwitch",void 0,{nextPage:t}))||void 0!==i?this._api.switchPage(t):this._trigger("notSwitched",void 0,{activePage:t})),this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){},_updateSelection:function(){}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:{},_categories:{},init:function(){},_buildStructure:function(){},_updateSelection:function(){}}),WCF.Condition={},WCF.Notice={}; })(this);
 
 // WCF.Like.js
-(function (window, undefined) { WCF.Like.js; })(this);
+(function (window, undefined) { "use strict";WCF.Like=Class.extend({init:function(){throw new Error("The `WCF.Like` API is obsolete and therefore no longer supported. Please use the current API `WoltLabSuite/Core/Ui/Reaction/Handler` instead.")},_domNodeInserted:function(){},_initContainers:function(){},_getContainers:function(){},_getWidgetContainer:function(){},_getObjectID:function(){},_addWidget:function(){},_buildWidget:function(){},_createWidget:function(){},_showLikeDetails:function(){},_click:function(){},_sendRequest:function(){},_success:function(){},_updateBadge:function(){},_updateSummary:function(){},_setActiveState:function(){}}); })(this);
 
 // WCF.ACL.js
-(function (window, undefined) { WCF.ACL.js; })(this);
+(function (window, undefined) { "use strict";WCF.ACL={},WCF.ACL.List=Class.extend({_categoryName:"",_container:{},_containerElements:{},_objectID:0,_objectTypeID:{},_options:{},_proxy:{},_search:{},_values:{},init:function(){},_reset:function(){},_loadACL:function(){},addObject:function(){},_createListItem:function(){},_removeItem:function(){},_selectFirstEntry:function(){},_success:function(){},_parseData:function(){},_click:function(){},_select:function(){},_change:function(){},_changeAll:function(){},_setupPermissions:function(){},_savePermissions:function(){},submit:function(){},_save:function(){}}); })(this);
 
 // WCF.Attachment.js
-(function (window, undefined) { WCF.Attachment.js; })(this);
+(function (window, undefined) { "use strict";WCF.Attachment={},WCF.Attachment.Upload=WCF.Upload.extend({_autoInsert:[],_insertAllButton:null,_objectType:"",_objectID:0,_tmpHash:"",_parentObjectID:0,_editorId:"",_replaceOnLoad:{},_options:{},init:function(t,e,i,a,n,s,r,l,o){var d,c;this._super(t,e,"wcf\\data\\attachment\\AttachmentAction",{multiple:!0,maxUploads:r}),this._autoInsert=[],this._objectType=i,this._objectID=parseInt(a),this._tmpHash=n,this._parentObjectID=parseInt(s),this._editorId=l,this._options=$.extend(!0,this._options,o||{}),this._buttonSelector.children("p.button").click($.proxy(this._validateLimit,this)),this._fileListSelector.find(".jsButtonInsertAttachment").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertThumbnail").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertFull").click($.proxy(this._insert,this)),WCF.System.Event.addListener("com.woltlab.wcf.action.delete","attachment",this._onDelete.bind(this)),this._makeSortable(),this._insertAllButton=$('<p class="button jsButtonAttachmentInsertAll">'+WCF.Language.get("wcf.attachment.insertAll")+"</p>").hide(),this._editorId&&(this._insertAllButton.appendTo(this._buttonSelector),this._insertAllButton.click($.proxy(this._insertAll,this)),this._fileListSelector.children("li:not(.uploadFailed)").length&&this._insertAllButton.show(),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","submit_"+this._editorId,this._submitInline.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+this._editorId,this._reset.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","dragAndDrop_"+this._editorId,this._editorUpload.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this._editorId,this._editorUpload.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._editorId,function(t){t.tmpHashes&&Array.isArray(t.tmpHashes)||(t.tmpHashes=[]);var e=t.tmpHashes.indexOf(n);0<this._fileListSelector.children("li:not(.uploadFailed)").length?-1===e&&t.tmpHashes.push(n):-1!==e&&t.tmpHashes.splice(e)}.bind(this)),d=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","metacode_attach_"+this._editorId,function(t){var e,i,a,n,s,r=this._getImageAttachments(),l=t.attributes[0]||0;r.hasOwnProperty(l)&&(e=~~$("#"+this._editorId).data("redactor").opts.woltlab.attachmentThumbnailWidth,i=!0===(i=t.attributes[2])||"true"===i||~~i&&~~i<=e,(a=elCreate("img")).className="woltlabAttachment",a.src=r[l][i?"thumbnailUrl":"url"],elData(a,"attachment-id",l),"left"===(n=t.attributes[1]||"none")?a.classList.add("messageFloatObjectLeft"):"right"===n&&a.classList.add("messageFloatObjectRight"),(s=t.metacode).parentNode.insertBefore(a,s),elRemove(s),t.cancel=!0)}.bind(this)),c=WCF.System.Event.addListener("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,this._sync.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","destroy_"+this._editorId,function(){WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","submit_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","reset_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","insertAttachment_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","dragAndDrop_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this._editorId),WCF.System.Event.removeAllListeners("com.woltlab.wcf.redactor2","autosaveMetaData_"+this._editorId),WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","metacode_attach_"+this._editorId,d),WCF.System.Event.removeListener("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,c)}.bind(this)))},_editorUpload:function(e){var i=null;this._fileListSelector.closest(".messageTabMenu").messageTabMenu("showTab","attachments",!0);var t=function(t){null===i?this._autoInsert.push(t):this._replaceOnLoad[t]=i,e.uploadID=t}.bind(this);e.file?this._upload(void 0,e.file,void 0,t):(this._upload(void 0,void 0,e.blob,t),i=e.replace||null)},_getImageAttachments:function(){var a={};return this._fileListSelector.children("li").each(function(t,e){var i=$(e);i.data("isImage")&&(a[~~i.data("objectID")]={thumbnailUrl:i.find(".jsButtonAttachmentInsertThumbnail").data("url"),url:i.find(".jsButtonAttachmentInsertFull").data("url")})}),a},_submitInline:function(t){var e;this._tmpHash&&(t.tmpHash=this._tmpHash,e={},WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","getMetaData_"+this._editorId,e),e.tmpHashes&&Array.isArray(e.tmpHashes)&&0<e.tmpHashes.length&&(t.tmpHash+=","+e.tmpHashes.join(",")))},_reset:function(){this._fileListSelector.hide().empty(),this._insertAllButton.hide(),this._validateLimit()},_validateLimit:function(){var t=this._buttonSelector.next("small.innerError"),e=this._options.maxUploads-this._fileListSelector.children("li:not(.uploadFailed)").length,i=this._fileUpload?this._fileUpload.prop("files").length:0;if(e<=0||e<i){var a=e<=0?WCF.Language.get("wcf.attachment.upload.error.reachedLimit"):WCF.Language.get("wcf.attachment.upload.error.reachedRemainingLimit").replace(/#remaining#/,e);return t.length||(t=$('<small class="innerError" />').insertAfter(this._buttonSelector)),t.html(a),!1}return t.remove(),!0},_removeLimitError:function(t){var e=this._fileListSelector.children("li");e.filter(":not(.uploadFailed)").length||this._insertAllButton.hide(),e.length||this._fileListSelector.hide(),this._editorId&&t.button&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","deleteAttachment_"+this._editorId,{attachmentId:t.button.data("objectID")})},_upload:function(s,r,l,o){var m=this._super.bind(this);require(["WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Image/ImageUtil","WoltLabSuite/Core/Image/Resizer","WoltLabSuite/Core/Ajax/Status"],function(t,d,e,i){i.show();var a=[];r?a.push(r):l?a.push(t.blobToFile(l,"pasted-from-clipboard")):a=this._fileUpload.prop("files");var c,h,n=Promise.resolve(a);this._options.autoScale&&this._options.autoScale.enable&&(c=this._buttonSelector.data("maxSize"),h=new e,n=Array.prototype.reduce.call(a,function(t,o){return t.then(function(e){if(-1===["image/png","image/gif","image/jpeg"].indexOf(o.type))return e.push(o),e;var l=new Promise(function(t,e){setTimeout(function(){t(o)},1e4)}),t=h.loadFile(o).then(function(t){var e,i,a=t.exif,n=this._options.autoScale.maxWidth,s=this._options.autoScale.maxHeight,r=this._options.autoScale.quality;return 2<=window.devicePixelRatio&&(e=window.screen.width*window.devicePixelRatio,i=window.screen.height*window.devicePixelRatio,e-10<t.image.width&&t.image.width<10+e&&i-10<t.image.height&&(n=Math.min(n,window.screen.width))),h.resize(t.image,n,s,r,o.size>c,l).then(function(t){if(void 0===t)return o;var e=this._options.autoScale.fileType;return"keep"!==this._options.autoScale.fileType&&!d.containsTransparentPixels(t)||(e=o.type),h.saveFile({exif:a,image:t},o.name,e,r)}.bind(this)).then(function(t){return t.size>o.size?(console.debug('[WCF.Attachment] File size of "'+o.name+'" increased, uploading untouched image.'),o):t})}.bind(this)).catch(function(t){return console.debug('[WCF.Attachment] Failed to resize image "'+o.name+'":',t),o});return Promise.race([l,t]).then(function(t){return e.push(t),e})}.bind(this))}.bind(this),Promise.resolve([]))),n.then(function(t){var e=void 0;return this._validateLimit()&&(e=m(s,void 0,void 0,t)),this._fileUpload&&(this._removeButton(),this._createButton()),"function"==typeof o&&o(e),e}.bind(this)).catch(function(t){console.debug("[WCF.Attachment] Failed to upload attachments:",t)}).finally(i.hide)}.bind(this),function(t){console.debug("[WCF.Attachment] Failed to load modules:",t)})},_createUploadMatrix:function(t){return this._fileListSelector.children("li.uploadFailed").remove(),this._super(t)},_getParameters:function(){return{objectType:this._objectType,objectID:this._objectID,tmpHash:this._tmpHash,parentObjectID:this._parentObjectID}},_initFile:function(t){var e=$('<li class="box64 formAttachmentListItem"><span class="icon icon64 fa-spinner" /><div><div><p>'+t.name+'</p><small><progress max="100"></progress></small></div><ul></ul></div></li>').data("filename",t.name);return this._fileListSelector.append(e),this._fileListSelector.show(),this._buttonSelector.data("maxSize")<t.size&&(e.find("progress").remove(),e.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),e.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error.tooLarge")+"</small>")),e.addClass("uploadFailed")),e},_useThumbnail:function(){return!0},_success:function(t,e){var i,a,n,s,r,l,o,d,c,h,m;for(var u in this._uploadMatrix[t]){this._uploadMatrix[t].hasOwnProperty(u)&&((a=this._uploadMatrix[t][u]).find("progress").remove(),n=a.data("filename"),s=a.data("internalFileID"),e.returnValues&&e.returnValues.attachments[s]?(i=e.returnValues.attachments[s],elData(a[0],"object-id",i.attachmentID),i.tinyURL?(a.children(".fa-spinner").replaceWith($('<img src="'+i.tinyURL+'" alt="" class="attachmentTinyThumbnail" />')),a.data("height",i.height),a.data("width",i.width),elData(a[0],"is-image",i.isImage)):a.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-"+i.iconName),(r=$('<a href=""></a>')).text(n).attr("href",i.url),r[0].target="_blank",0!=i.isImage&&r.addClass("jsImageViewer").attr("title",n),a.find("p").empty().append(r),a.find("small").append(i.formattedFilesize),l=a.find("ul").addClass("buttonGroup"),o=$('<li><span class="button small jsDeleteButton" data-object-id="'+i.attachmentID+'" data-confirm-message="'+WCF.Language.get("wcf.attachment.delete.sure")+'" data-event-name="attachment">'+WCF.Language.get("wcf.global.button.delete")+"</span></li>"),l.append(o),a.data("objectID",i.attachmentID),this._editorId&&(i.tinyURL?(i.thumbnailURL&&$('<li><span class="button small jsButtonAttachmentInsertThumbnail" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.thumbnailURL)+'">'+WCF.Language.get("wcf.attachment.insertThumbnail")+"</span></li>").appendTo(l),$('<li><span class="button small jsButtonAttachmentInsertFull" data-object-id="'+i.attachmentID+'" data-url="'+WCF.String.escapeHTML(i.url)+'">'+WCF.Language.get("wcf.attachment.insertFull")+"</span></li>").appendTo(l)):$('<li><span class="button small jsButtonAttachmentInsertPlain" data-object-id="'+i.attachmentID+'">'+WCF.Language.get("wcf.attachment.insert")+"</span></li>").appendTo(l)),this._triggerSync("new",{html:a[0].outerHTML}),this._registerEditorButtons(a[0]),this._replaceOnLoad.hasOwnProperty(t)&&(a.hasClass("uploadFailed")||(d=this._replaceOnLoad[t])&&d.parentNode&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","replaceAttachment_"+this._editorId,{attachmentId:i.attachmentID,img:d,src:i.thumbnailURL?i.thumbnailURL:i.url}),this._replaceOnLoad[t]=null)):(a.children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),h="",e.returnValues&&e.returnValues.errors[s]?"uploadFailed"===(h=(c=e.returnValues.errors[s]).errorType)&&c.additionalData.phpLimitExceeded&&(h="uploadPhpLimit"):h="uploadFailed",a.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error."+h)+"</small>")),a.addClass("uploadFailed")),WCF.inArray(t,this._autoInsert)&&(this._autoInsert.splice(this._autoInsert.indexOf(t),1),a.hasClass("uploadFailed")||((m=a.find(".jsButtonAttachmentInsertThumbnail")).length||(m=a.find(".jsButtonAttachmentInsertFull")),m.trigger("click"))))}this._rebuildInterface()},_rebuildInterface:function(){this._makeSortable(),this._fileListSelector.children("li:not(.uploadFailed)").length?this._insertAllButton.show():this._insertAllButton.hide(),WCF.DOMNodeInsertedHandler.execute()},_registerEditorButtons:function(t){this._editorId&&elBySelAll(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t,function(t){t.addEventListener("click",this._insert.bind(this))}.bind(this))},_insert:function(t){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertAttachment_"+this._editorId,{attachmentId:elData(t.currentTarget,"object-id"),url:elData(t.currentTarget,"url")})},_insertAll:function(){for(var t,e,i=0,a=this._fileListSelector[0].childNodes.length;i<a;i++)"LI"!==(t=this._fileListSelector[0].childNodes[i]).nodeName||t.classList.contains("uploadFailed")||(null===(e=elBySel(".jsButtonAttachmentInsertThumbnail, .jsButtonAttachmentInsertPlain",t))&&(e=elBySel(".jsButtonAttachmentInsertFull, .jsButtonAttachmentInsertPlain",t)),window.jQuery(e).trigger("click"))},_error:function(a){this._fileListSelector.find("li").each(function(t,e){var i=$(e);i.children(".fa-spinner").length&&(i.addClass("uploadFailed").children(".fa-spinner").removeClass("fa-spinner").addClass("fa-ban"),i.find("div > div").append($('<small class="innerError">'+(a.responseJSON&&a.responseJSON.message?a.responseJSON.message:WCF.Language.get("wcf.attachment.upload.error.uploadFailed"))+"</small>")))})},_makeSortable:function(){var t=this._fileListSelector.children("li:not(.uploadFailed)");t.length&&(t.addClass("sortableAttachment").children("img").addClass("sortableNode"),this._fileListSelector.hasClass("sortableList")||(this._fileListSelector.addClass("sortableList"),require(["Environment"],function(t){"desktop"===t.platform()&&new WCF.Sortable.List(this._fileListSelector.parent().wcfIdentify(),"",0,{axis:!1,items:"li.sortableAttachment",toleranceElement:null,start:function(t,e){e.placeholder[0].style.setProperty("height",e.helper[0].offsetHeight+"px","")},update:function(){var i=[];this._fileListSelector.children("li:not(.uploadFailed)").each(function(t,e){i.push($(e).data("objectID"))}),i.length&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"updatePosition",className:"wcf\\data\\attachment\\AttachmentAction",parameters:{attachmentIDs:i,objectID:this._objectID,objectType:this._objectType,tmpHash:this._tmpHash}}})}.bind(this)},!0)}.bind(this))))},_onDelete:function(t){var e=elData(t.button[0],"object-id"),i=elBySel('.formAttachmentListItem[data-object-id="'+e+'"]',this._fileListSelector[0]);null!==i&&elRemove(i),this._removeLimitError(t)},_sync:function(t){if(t.source!==this)switch(t.type){case"new":this._syncNew(t.data);break;default:throw new Error("Unexpected type '"+t.type+"'")}},_syncNew:function(a){require(["Dom/Util"],function(t){var e=t.createFragmentFromHtml(a.html),i=elBySel("li",e);i.id="",this._registerEditorButtons(i),this._fileListSelector[0].appendChild(i),elShow(this._fileListSelector[0]),this._rebuildInterface()}.bind(this))},_triggerSync:function(t,e){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","sync_"+this._tmpHash,{source:this,type:t,data:e})}}); })(this);
 
 // WCF.ColorPicker.js
-(function (window, undefined) { WCF.ColorPicker.js; })(this);
+(function (window, undefined) { "use strict";WCF.ColorPicker=Class.extend({_bar:{},_barActive:!1,_barSelector:{},_dialog:{},_didInit:!1,_elementID:"",_gradient:{},_gradientActive:!1,_gradientSelector:{},_hex:{},_hsv:{},_newColor:{},_oldColor:{},_rgba:{},_rgbaRegExp:{},init:function(){},_open:function(){},_parseColor:function(){},_initColorPicker:function(){},_initColorPickerForm:function(){},_keyUpRGBA:function(){},_keyUpHex:function(){},_submit:function(){},_createInputElement:function(){},_mouseDownGradient:function(){},_mouseGradient:function(){},_mouseDownBar:function(){},_mouseBar:function(){},_blurRgba:function(){},_blurHex:function(){},_updateValues:function(){},hsvToRgb:function(n,o,t){return window.__wcf_bc_colorUtil.hsvToRgb(n,o,t)},rgbToHsv:function(n,o,t){return window.__wcf_bc_colorUtil.rgbToHsv(n,o,t)},hexToRgb:function(n){return window.__wcf_bc_colorUtil.hexToRgb(n)},rgbToHex:function(n,o,t){return window.__wcf_bc_colorUtil.rgbToHex(n,o,t)}}); })(this);
 
 // WCF.Comment.js
-(function (window, undefined) { WCF.Comment.js; })(this);
+(function (window, undefined) { "use strict";WCF.Comment={},WCF.Comment.Handler=Class.extend({_commentButtonList:{},_comments:{},_container:null,_containerID:"",_displayedComments:0,_loadNextComments:null,_loadNextResponses:{},_proxy:null,_responses:{},_responseCache:{},_commentData:{},_guestDialog:null,_permalinkComment:null,_permalinkResponse:null,_scrollTarget:null,init:function(e){var t,n;this._commentButtonList={},this._comments={},this._containerID=e,this._displayedComments=0,this._loadNextComments=null,this._loadNextResponses={},this._permalinkComment=null,this._permalinkResponse=null,this._responseAdd=null,this._responseCache={},this._responseRevert=null,this._responses={},this._scrollTarget=null,this._onResponsesLoaded=null,this._container=$("#"+$.wcfEscapeID(this._containerID)),this._container.length?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initComments(),this._initResponses(),this._container.data("canAdd")&&(null===elBySel(".commentListAddComment .wysiwygTextarea",this._container[0])?console.error("Missing WYSIWYG implementation, adding comments is not available."):require(["WoltLabSuite/Core/Ui/Comment/Add","WoltLabSuite/Core/Ui/Comment/Response/Add"],function(e,t){new e(elBySel(".jsCommentAdd",this._container[0])),this._responseAdd=new t(elBySel(".jsCommentResponseAdd",this._container[0]),{callbackInsert:function(){null!==this._responseRevert&&(this._responseRevert(),this._responseRevert=null)}.bind(this)})}.bind(this))),require(["WoltLabSuite/Core/Ui/Comment/Edit","WoltLabSuite/Core/Ui/Comment/Response/Edit"],function(e,t){new e(this._container[0]),new t(this._container[0])}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Comment.Handler",$.proxy(this._domNodeInserted,this)),WCF.System.ObjectStore.add("WCF.Comment.Handler",this),window.addEventListener("hashchange",function(){var t,e=window.location.hash;e&&e.match(/.+\/(comment\d+)/)&&(t=RegExp.$1,window.setTimeout(function(){var e=elById(t);e&&e.scrollIntoView({behavior:"smooth"})},100))}),window.location.hash.match(/^#(?:[^\/]+\/)?comment(\d+)(?:\/response(\d+))?/)&&((t=elById("comment"+RegExp.$1))?RegExp.$2?(n=elById("comment"+RegExp.$1+"response"+RegExp.$2))?this._scrollTo(n,!0):this._loadResponseSegment(t,RegExp.$1,RegExp.$2):this._scrollTo(t,!0):this._loadCommentSegment(RegExp.$1,RegExp.$2))):console.debug("[WCF.Comment.Handler] Unable to find container identified by '"+this._containerID+"'")},_scrollTo:function(t,n){null===this._scrollTarget&&(this._scrollTarget=elCreate("span"),this._scrollTarget.className="commentScrollTarget",document.body.appendChild(this._scrollTarget)),this._scrollTarget.style.setProperty("top",t.getBoundingClientRect().top+window.pageYOffset-49+"px",""),require(["Ui/Scroll"],function(e){e.element(this._scrollTarget,function(){n&&(t.classList.contains("commentHighlightTarget")&&(t.classList.remove("commentHighlightTarget"),t.offsetTop),t.classList.add("commentHighlightTarget"))})}.bind(this))},_loadCommentSegment:function(e,t){this._permalinkComment=elCreate("li"),this._permalinkComment.className="commentPermalinkContainer loading",this._permalinkComment.innerHTML='<span class="icon icon48 fa-spinner"></span>',this._container[0].insertBefore(this._permalinkComment,this._container[0].firstChild),this._proxy.setOption("data",{actionName:"loadComment",className:"wcf\\data\\comment\\CommentAction",objectIDs:[e],parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),responseID:~~t}}}),this._proxy.sendRequest()},_loadResponseSegment:function(e,t,n){this._permalinkResponse=elCreate("li"),this._permalinkResponse.className="commentResponsePermalinkContainer loading",this._permalinkResponse.innerHTML='<span class="icon icon32 fa-spinner"></span>';var s=elBySel(".commentResponseList",e);s.insertBefore(this._permalinkResponse,s.firstChild),this._proxy.setOption("data",{actionName:"loadResponse",className:"wcf\\data\\comment\\CommentAction",objectIDs:[t],parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),responseID:~~n}}}),this._proxy.sendRequest()},_handleLoadNextComments:function(){this._displayedComments<this._container.data("comments")?(null===this._loadNextComments&&(this._loadNextComments=$('<li class="commentLoadNext showMore"><button class="small">'+WCF.Language.get("wcf.comment.more")+"</button></li>").appendTo(this._container),this._loadNextComments.children("button").click($.proxy(this._loadComments,this))),this._loadNextComments.children("button").enable()):null!==this._loadNextComments&&this._loadNextComments.remove()},_handleLoadNextResponses:function(e){var t,n=this._comments[e];n.data("displayedResponses",n.find("ul.commentResponseList > li").length),n.data("displayedResponses")<n.data("responses")?void 0===this._loadNextResponses[e]&&(t=n.data("responses")-n.data("displayedResponses"),this._loadNextResponses[e]=$('<li class="jsCommentLoadNextResponses"><a>'+WCF.Language.get("wcf.comment.response.more",{count:t})+"</a></li>").appendTo(this._commentButtonList[e]),this._loadNextResponses[e].children("a").data("commentID",e).click($.proxy(this._loadResponses,this)),this._commentButtonList[e].parent().show()):void 0!==this._loadNextResponses[e]&&this._loadNextResponses[e].remove()},_loadComments:function(){this._loadNextComments.children("button").disable(),this._proxy.setOption("data",{actionName:"loadComments",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),lastCommentTime:this._container.data("lastCommentTime")}}}),this._proxy.sendRequest()},_loadResponses:function(e){this._loadResponsesExecute($(e.currentTarget).disable().data("commentID"),!1)},_loadResponsesExecute:function(e,t){this._proxy.setOption("data",{actionName:"loadResponses",className:"wcf\\data\\comment\\response\\CommentResponseAction",parameters:{data:{commentID:e,lastResponseTime:this._comments[e].data("lastResponseTime"),loadAllResponses:t?1:0}}}),this._proxy.sendRequest()},_domNodeInserted:function(){this._initComments(),this._initResponses()},_initComments:function(){var a=(a=elBySel('link[rel="canonical"]'))?a.href:window.location.toString().replace(/#.+$/,""),e=this._container[0].closest(".tabMenuContent");e&&(a+="#"+elData(e,"name"));var l=this,m=!1;this._container.find(".jsComment").each(function(e,t){var n=$(t).removeClass("jsComment"),s=n.data("commentID");(l._comments[s]=n)[0].id="comment"+s;var o=n.find("ul.commentResponseList");o.length||(o=n.find(".commentContent"));var i=$('<div class="commentOptionContainer" />').hide().insertAfter(o);l._commentButtonList[s]=$('<ul class="inlineList dotSeparated" />').appendTo(i),l._handleLoadNextResponses(s),l._initComment(s,n),l._initPermalink(n[0],a),l._displayedComments++,m=!0}),m&&this._handleLoadNextComments()},_initComment:function(e,t){this._container.data("canAdd")&&this._initAddResponse(e,t),t.data("canEdit")&&$('<li><a href="#" class="jsCommentEditButton jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 fa-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>").appendTo(t.find("ul.buttonList:eq(0)")),t.data("canDelete")&&$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 fa-times" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>").data("commentID",e).appendTo(t.find("ul.buttonList:eq(0)")).click($.proxy(this._delete,this));var n=elBySel(".jsEnableComment",t[0]);n&&n.addEventListener(WCF_CLICK_EVENT,this._enableComment.bind(this))},_enableComment:function(e){e.preventDefault();var t=e.currentTarget.closest(".comment");this._proxy.setOption("data",{actionName:"enable",className:"wcf\\data\\comment\\CommentAction",objectIDs:[elData(t,"object-id")]}),this._proxy.sendRequest()},_initPermalink:function(e,t){var n=elCreate("a");n.href=t+(-1===t.indexOf("#")?"#":"/")+"comment"+elData(e,"object-id");var s=elBySel(".commentContent:not(.commentResponseContent) .containerHeadline time",e);s.parentNode.insertBefore(n,s),n.appendChild(s)},_initResponses:function(){var o=(o=elBySel('link[rel="canonical"]'))?o.href:window.location.toString().replace(/#.+$/,""),e=this._container[0].closest(".tabMenuContent");for(var i in e&&(o+="#"+elData(e,"name")),this._comments)this._comments.hasOwnProperty(i)&&elBySelAll(".jsCommentResponse",this._comments[i][0],function(e){var t=$(e).removeClass("jsCommentResponse"),n=t.data("responseID");this._responses[n]=t,e.id="comment"+i+"response"+n,this._initResponse(n,t),this._initPermalinkResponse(i,e,n,o);var s=elBySel(".jsEnableResponse",e);s&&s.addEventListener(WCF_CLICK_EVENT,this._enableCommentResponse.bind(this))}.bind(this))},_enableCommentResponse:function(e){e.preventDefault();var t=e.currentTarget.closest(".commentResponse");this._proxy.setOption("data",{actionName:"enableResponse",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{responseID:elData(t,"object-id")}}}),this._proxy.sendRequest()},_initPermalinkResponse:function(e,t,n,s){var o=elCreate("a");o.href=s+(-1===s.indexOf("#")?"#":"/")+"comment"+e+"/response"+n;var i=elBySel(".commentResponseContent .containerHeadline time",t);i.parentNode.insertBefore(o,i),o.appendChild(i)},_initResponse:function(e,t){var n,s;t.data("canEdit")&&$('<li><a href="#" class="jsCommentResponseEditButton jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 fa-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>").data("responseID",e).appendTo(t.find("ul.buttonList:eq(0)")),t.data("canDelete")&&(n=$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 fa-times" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>"),s=this,n.data("responseID",e).appendTo(t.find("ul.buttonList:eq(0)")).click(function(e){s._delete(e,!0)}))},_initAddResponse:function(e,t){$('<li class="jsCommentShowAddResponse"><a>'+WCF.Language.get("wcf.comment.button.response.add")+"</a></li>").data("commentID",e).click($.proxy(this._showAddResponse,this)).appendTo(this._commentButtonList[e]);this._commentButtonList[e].parent().show()},_showAddResponse:function(e){var t,n,s;e.preventDefault(),null===this._onResponsesLoaded&&(null!==this._responseAdd?null!==(t=this._responseAdd.getContainer())&&(null!==this._responseRevert&&(this._responseRevert(),this._responseRevert=null),n=$(e.currentTarget),s=n.data("commentID"),this._onResponsesLoaded=function(){n.hide(),t.parentNode&&t.parentNode.classList.contains("jsCommentResponseAddContainer")&&elRemove(t.parentNode);var e=this._commentButtonList[s][0].closest(".commentOptionContainer");e.parentNode.insertBefore(t,e.nextSibling),"string"==typeof this._responseCache[s]?this._responseAdd.setContent(this._responseCache[s]):this._responseAdd.setContent(""),this._responseRevert=function(){this._responseCache[s]=this._responseAdd.getContent(),elRemove(t),n.show()}.bind(this),this._onResponsesLoaded=null}.bind(this),n.prev().hasClass("jsCommentLoadNextResponses")?(this._loadResponsesExecute(s,!0),n.parent().children(".button").disable()):this._onResponsesLoaded()):console.error("Missing response API."))},_delete:function(n,s){n.preventDefault(),WCF.System.Confirmation.show(WCF.Language.get("wcf.comment.delete.confirmMessage"),$.proxy(function(e){var t;"confirm"===e&&(t={objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID")},!0!==s?t.commentID=$(n.currentTarget).data("commentID"):t.responseID=$(n.currentTarget).data("responseID"),this._proxy.setOption("data",{actionName:"remove",className:"wcf\\data\\comment\\CommentAction",parameters:{data:t}}),this._proxy.sendRequest())},this))},_success:function(e,t,n){switch(e.actionName){case"enable":this._enable(e);break;case"enableResponse":this._enableResponse(e);break;case"loadComment":this._insertComment(e);break;case"loadComments":this._insertComments(e);break;case"loadResponse":this._insertResponse(e);break;case"loadResponses":this._insertResponses(e);break;case"remove":this._remove(e)}WCF.DOMNodeInsertedHandler.execute()},_enable:function(e){var t,n,s;!e.returnValues.commentID||(t=elBySel('.comment[data-object-id="'+e.returnValues.commentID+'"]',this._container[0]))&&(elData(t,"is-disabled",0),(n=elBySel(".jsIconDisabled",t))&&elRemove(n),(s=elBySel(".jsEnableComment",t))&&elRemove(s.parentNode))},_enableResponse:function(e){var t,n,s;!e.returnValues.responseID||(t=elBySel('.commentResponse[data-object-id="'+e.returnValues.responseID+'"]',this._container[0]))&&(elData(t,"is-disabled",0),(n=elBySel(".jsIconDisabled",t))&&elRemove(n),(s=elBySel(".jsEnableResponse",t))&&elRemove(s.parentNode))},_insertComment:function(e){var t,n;""!==e.returnValues.template?($(e.returnValues.template).insertBefore(this._permalinkComment),(t=this._permalinkComment.previousElementSibling).classList.add("commentPermalinkContainer"),elRemove(this._permalinkComment),this._permalinkComment=t,e.returnValues.response&&(this._permalinkResponse=elCreate("li"),this._permalinkResponse.className="commentResponsePermalinkContainer loading",this._permalinkResponse.innerHTML='<span class="icon icon32 fa-spinner"></span>',(n=elBySel(".commentResponseList",t)).insertBefore(this._permalinkResponse,n.firstChild),this._insertResponse({returnValues:{template:e.returnValues.response}})),t.offsetTop,t.classList.add("commentHighlightTarget")):elRemove(this._permalinkComment)},_insertResponse:function(e){var t;""!==e.returnValues.template?($(e.returnValues.template).insertBefore(this._permalinkResponse),(t=this._permalinkResponse.previousElementSibling).classList.add("commentResponsePermalinkContainer"),elRemove(this._permalinkResponse),(this._permalinkResponse=t).offsetTop,t.classList.add("commentHighlightTarget")):elRemove(this._permalinkResponse)},_insertComments:function(e){var t;$(e.returnValues.template).insertBefore(this._loadNextComments),this._container.data("lastCommentTime",e.returnValues.lastCommentTime),this._permalinkComment&&(t=elData(this._permalinkComment,"object-id"),null!==elBySel('.comment[data-object-id="'+t+'"]:not(.commentPermalinkContainer)',this._container[0])&&(elRemove(this._permalinkComment),this._permalinkComment=null)),this._initComments()},_insertResponses:function(e){var t,n=this._comments[e.returnValues.commentID];$(e.returnValues.template).appendTo(n.find("ul.commentResponseList")),n.data("lastResponseTime",e.returnValues.lastResponseTime),this._handleLoadNextResponses(e.returnValues.commentID),this._permalinkResponse&&(t=elData(this._permalinkResponse,"object-id"),null!==elBySel('.commentResponse[data-object-id="'+t+'"]:not(.commentPermalinkContainer)',this._container[0])&&(elRemove(this._permalinkResponse),this._permalinkResponse=null)),null!==this._onResponsesLoaded&&this._onResponsesLoaded()},_remove:function(e){var t,n,s;e.returnValues.commentID?(this._comments[e.returnValues.commentID].remove(),delete this._comments[e.returnValues.commentID]):(t=this._responses[e.returnValues.responseID],(n=this._comments[t.parents("li.comment:eq(0)").data("commentID")]).data("responses",parseInt(n.data("responses"))-1),s=t.parent(),t.remove(),s.children().length||s.empty(),delete this._responses[e.returnValues.responseID])},_prepareEdit:function(){console.warn("This method is no longer supported.")},_keyUp:function(){console.warn("This method is no longer supported.")},_save:function(){console.warn("This method is no longer supported.")},_failure:function(){console.warn("This method is no longer supported.")},_edit:function(){console.warn("This method is no longer supported.")},_update:function(){console.warn("This method is no longer supported.")},_createGuestDialog:function(){console.warn("This method is no longer supported.")},_keyDown:function(){console.warn("This method is no longer supported.")},_submit:function(){console.warn("This method is no longer supported.")},_keyUpEdit:function(){console.warn("This method is no longer supported.")},_saveEdit:function(){console.warn("This method is no longer supported.")},_cancelEdit:function(){console.warn("This method is no longer supported.")}}),WCF.Comment.Response={}; })(this);
 
 // WCF.ImageViewer.js
-(function (window, undefined) { WCF.ImageViewer.js; })(this);
+(function (window, undefined) { "use strict";WCF.ImageViewer=Class.extend({_triggerElement:null,init:function(){this._triggerElement=$('<span class="wcfImageViewerTriggerElement" />').data("disableSlideshow",!0).hide().appendTo(document.body),this._triggerElement.wcfImageViewer({enableSlideshow:0,imageSelector:".jsImageViewerEnabled",staticViewer:!0}),WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this)),WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck(),this._rebuildImageViewer()},_rebuildImageViewer:function(){var i=$("a.jsImageViewer");i.length&&i.removeClass("jsImageViewer").addClass("jsImageViewerEnabled").click($.proxy(this._click,this))},_click:function(i){i.ctrlKey||(i.preventDefault(),i.stopPropagation(),$(i.currentTarget).closest(".popover").length||this._triggerElement.wcfImageViewer("open",null,$(i.currentTarget).wcfIdentify()))},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy(function(i,e){e.complete&&this._checkImageSize({currentTarget:e})},this)),$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(i){var e,t=$(i.currentTarget);t.is(":visible")?(t.removeClass("jsResizeImage"),t.closest(".messageSignature").length||((e=new Image).src=t.attr("src"),t.closest("div.messageText, div.messageTextPreview").width()<e.width?t.parents("a").length||(t.wrap('<a href="'+t.attr("src")+'" class="jsImageViewerEnabled embeddedImageLink" />'),t.parent().click($.proxy(this._click,this)),"right"==t.css("float")?t.parent().addClass("messageFloatObjectRight"):"left"==t.css("float")&&t.parent().addClass("messageFloatObjectLeft"),t[0].style.removeProperty("float"),t[0].style.removeProperty("margin")):t.removeClass("embeddedAttachmentLink"))):t.off("load")}}),$.widget("ui.wcfImageViewer",{_active:-1,_activeImage:null,_container:null,_didInit:!1,_disableSlideshow:!1,_eventNamespace:"",_images:[],_isMobile:!1,_isOpen:!1,_items:-1,_maxDimensions:{height:0,width:0},_proxy:null,_slideshowEnabled:!1,_thumbnailContainerWidth:0,_thumbnailMarginRight:0,_thumbnailOffset:0,_thumbnailWidth:0,_timer:null,_ui:{buttonNext:null,buttonPrevious:null,header:null,image:null,imageContainer:null,imageList:null,slideshow:{container:null,enlarge:null,next:null,previous:null,toggle:null}},options:{shiftBy:5,enableSlideshow:1,speed:5,className:"",imageSelector:"",staticViewer:!1},_create:function(){this._active=-1,this._activeImage=null,this._container=null,this._didInit=!1,this._disableSlideshow=this.element.data("disableSlideshow"),this._eventNamespace=this.element.wcfIdentify(),this._images=[],this._isMobile=!1,this._isOpen=!1,this._items=-1,this._maxDimensions={height:document.documentElement.clientHeight,width:document.documentElement.clientWidth},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._slideshowEnabled=!1,this._thumbnailContainerWidth=0,this._thumbnailMarginRight=0,this._thumbnailOffset=0,this._thumbnaiLWidth=0,this._timer=null,this._ui={},this.element.click($.proxy(this.open,this)),window.addEventListener("popstate",function(i){if(null!=i.state&&"imageViewer"===i.state.name&&i.state.container===this._eventNamespace)return this.open(i),void this.showImage(i.state.image);this.close(i)}.bind(this))},open:function(i,e){return i&&i.preventDefault(),!this._isOpen&&(i&&"popstate"===i.type||window.history.pushState({name:"imageViewer"},"",""),this.options.staticViewer?(t=this._getStaticImages(),this._initUI(),this._createThumbnails(t,!0),this._render(!0,void 0,e),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable(),$.browser.touch&&setTimeout($.proxy(function(){this._isMobile&&!this._container.hasClass("maximized")&&this._toggleView()},this),500)):0===this._images.length?this._loadNextImages(!0):(this._render(!1,this.element.data("targetImageID")),1<this._items&&this._slideshowEnabled&&this.startSlideshow(),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable()),this._bindListener(),require(["Ui/Screen"],function(i){i.pageOverlayOpen()}),!0);var t},close:function(i){if(i&&i.preventDefault(),i&&"popstate"===i.type)return!!this._isOpen&&(this._container.removeClass("open"),null!==this._timer&&this._timer.stop(),this._unbindListener(),this._isOpen=!1,WCF.System.DisableScrolling.enable(),WCF.System.DisableZoom.enable(),require(["Ui/Screen"],function(i){i.pageOverlayClose()}),!0);window.history.back()},startSlideshow:function(){return!this._disableSlideshow&&!this._slideshowEnabled&&(null===this._timer?this._timer=new WCF.PeriodicalExecuter($.proxy(function(){var i=this._active+1;i==this._items&&(i=0),this.showImage(i)},this),1e3*this.options.speed):this._timer.resume(),this._slideshowEnabled=!0,this._ui.slideshow.toggle.children("span").removeClass("fa-play").addClass("fa-pause"),!0)},stopSlideshow:function(i){return!!this._slideshowEnabled&&(this._timer.stop(),i&&this._ui.slideshow.toggle.children("span").removeClass("fa-pause").addClass("fa-play"),!(this._slideshowEnabled=!1))},_bindListener:function(){$(document).on("keydown."+this._eventNamespace,$.proxy(this._keyDown,this)),$(window).on("resize."+this._eventNamespace,$.proxy(this._renderImage,this))},_unbindListener:function(){$(document).off("keydown."+this._eventNamespace),$(window).off("resize."+this._eventNamespace)},_keyDown:function(i){switch(i.which){case $.ui.keyCode.ESCAPE:this.close();break;case $.ui.keyCode.LEFT:this._previousImage();break;case $.ui.keyCode.RIGHT:this._nextImage();break;case $.ui.keyCode.UP:this._container.hasClass("maximized")||this._toggleView();break;case $.ui.keyCode.DOWN:this._container.hasClass("maximized")&&this._toggleView();break;case $.ui.keyCode.ENTER:var e=this._ui.header.find("h1 > a");1==e.length?window.location=e.prop("href"):this._ui.slideshow.full.trigger("click");break;case 80:this._ui.slideshow.toggle.trigger("click");break;default:return!0}return!1},_render:function(i,s,t){this._container.addClass("open");var a,e,n,h=null;i&&(h=this._ui.imageList.children("li:eq(0)"),this._thumbnailMarginRight=parseInt(h.css("marginRight").replace(/px$/,""))||0,this._thumbnailWidth=h.outerWidth(!0),this._thumbnailContainerWidth=this._ui.imageList.parent().innerWidth(),1<this._items&&this.options.enableSlideshow&&!s&&!t&&this.startSlideshow()),s?this._ui.imageList.children("li").each($.proxy(function(i,e){var t=$(e);if(t.data("objectID")==s)return t.trigger("click"),this.moveToImage(t.data("index")),!1},this)):t?(a=0,$(this.options.imageSelector).each(function(i,e){if($(e).wcfIdentify()==t)return a=i,!1}),e=this._ui.imageList.children("li:eq("+a+")"),-1!==this._active&&(n=!1,this._active!=e.data("index")&&(n=!0),this._ui.images[this._activeImage].prop("src")!=this._images[this._active].image.url&&(n=!0),n&&(this._active=-1)),e.trigger("click"),this.moveToImage(e.data("index"))):null!==h&&h.trigger("click"),this._toggleButtons(),this._preload()},_preload:function(){this._images.length<this._items&&this._images.length*this._thumbnailWidth-this._thumbnailOffset<this._thumbnailContainerWidth&&this._loadNextImages(!1)},_showImage:function(i){this.showImage($(i.currentTarget).data("index"),!0)},showImage:function(i,e){if(this._active==i)return!1;this.stopSlideshow(e||!1),-1!=this._active&&this._images[this._active].listItem.removeClass("active"),this._active=i,window.history.replaceState({name:"imageViewer",container:this._eventNamespace,image:this._active},"","");var t=this._images[i];this._ui.imageList.children("li").removeClass("active"),t.listItem.addClass("active");var s=this._ui.imageContainer.getDimensions("inner"),a=this._activeImage?0:1;null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=a;var n=this._active;this._ui.imageContainer.addClass("loading"),this._ui.images[a].off("load").prop("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="),this._ui.images[a].on("load",$.proxy(function(){this._imageOnLoad(n,a)},this)),this._renderImage(a,t,s),this.options.staticViewer||this._ui.header.find("> div > a").prop("href",t.user.link).prop("title",t.user.username).children("img").prop("src",t.user.avatarURL);var h,o=WCF.String.escapeHTML(t.image.title);return t.image.link&&(o='<a href="'+t.image.link+'">'+o+"</a>"),this._ui.header.find("h1").html(o),this.options.staticViewer||(h=t.series&&t.series.title?WCF.String.escapeHTML(t.series.title):"",t.series.link&&(h='<a href="'+t.series.link+'">'+h+"</a>"),this._ui.header.find("h2").html(h)),this._ui.header.find("h3").text(WCF.Language.get("wcf.imageViewer.seriesIndex").replace(/{x}/,t.listItem.data("index")+1).replace(/{y}/,this._items)),this._ui.slideshow.full.data("link",t.image.fullURL?t.image.fullURL:t.image.url),this.moveToImage(t.listItem.data("index")),this._toggleButtons(),!0},_imageOnLoad:function(i,e){i==this._active&&(this._ui.imageContainer.removeClass("loading"),this._ui.images[e].addClass("active"),this.options.staticViewer&&this._renderImage(e,null),this.startSlideshow())},_renderImage:function(i,e,t){var s=!0;e||(i=this._activeImage,e=this._images[this._active],s=!(t={height:$(window).height()-(this._container.hasClass("maximized")||this._container.hasClass("wcfImageViewerMobile")?0:200),width:this._ui.imageContainer.innerWidth()})),t.height-=22,t.width-=20;var a,n=this._ui.images[i];n.prop("src")!==e.image.url&&n.prop("src",e.image.url),s&&n[0].complete&&n.trigger("load"),this.options.staticViewer&&!e.image.height&&n[0].complete&&($.browser.mozilla||$.browser.safari?((a=new Image).src=e.image.url,e.image.height=a.height||n[0].naturalHeight,e.image.width=a.width||n[0].naturalWidth):(n.css({height:"auto",width:"auto"}),e.image.height=n[0].height,e.image.width=n[0].width));var h=e.image.height,o=e.image.width,l=0;h>t.height&&(l=t.height/h,h=t.height,o=Math.floor(o*l)),o>t.width&&(l=t.width/o,o=t.width,h=Math.floor(h*l));var r=Math.floor((t.width-o)/2);this._ui.images[i].css({height:h+"px",left:r+10+"px",marginTop:-1*Math.round(h/2)+"px",width:o+"px"})},_initUI:function(){if(this._didInit)return!1;this._didInit=!0,this._container=$('<div class="wcfImageViewer'+(this.options.staticViewer?" wcfImageViewerStatic":"")+'" />').appendTo(document.body);var e=$("<div><img /><img /></div>").appendTo(this._container),i=$('<footer><span class="wcfImageViewerButtonPrevious icon fa-angle-double-left" /><div><ul /></div><span class="wcfImageViewerButtonNext icon fa-angle-double-right" /></footer>').appendTo(this._container),t=$("<ul />").appendTo(e),s=$('<li class="wcfImageViewerSlideshowButtonPrevious"><span class="icon icon48 fa-angle-left" /></li>').appendTo(t),a=$('<li class="wcfImageViewerSlideshowButtonToggle pointer"><span class="icon icon48 fa-play" /></li>').appendTo(t),n=$('<li class="wcfImageViewerSlideshowButtonNext"><span class="icon icon48 fa-angle-right" /></li>').appendTo(t),h=$('<li class="wcfImageViewerSlideshowButtonEnlarge pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.enlarge")+'"><span class="icon icon48 fa-expand" /></li>').appendTo(t),o=$('<li class="wcfImageViewerSlideshowButtonFull pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.full")+'"><span class="icon icon48 fa-external-link" /></li>').appendTo(t);return this._ui={buttonNext:i.children("span.wcfImageViewerButtonNext"),buttonPrevious:i.children("span.wcfImageViewerButtonPrevious"),header:$("<header><div"+(this.options.staticViewer?">":' class="box64"><a class="jsTooltip"><img /></a>')+"<div><h1 /><h2 /><h3 /></div></div></header>").appendTo(this._container),imageContainer:e,images:[e.children("img:eq(0)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",function(){$(this).removeClass("animateTransformation")}),e.children("img:eq(1)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",function(){$(this).removeClass("animateTransformation")})],imageList:i.find("> div > ul"),slideshow:{container:t,enlarge:h,full:o,next:n,previous:s,toggle:a}},this._ui.buttonNext.click($.proxy(this._next,this)),this._ui.buttonPrevious.click($.proxy(this._previous,this)),n.click($.proxy(this._nextImage,this)),s.click($.proxy(this._previousImage,this)),h.click($.proxy(this._toggleView,this)),a.click($.proxy(function(){this._items<2||(this._slideshowEnabled?this.stopSlideshow(!0):(this._disableSlideshow=!1,this.startSlideshow()))},this)),o.click(function(i){window.location=$(i.currentTarget).data("link")}),$('<span class="wcfImageViewerButtonClose icon icon48 fa-times pointer jsTooltip" title="'+WCF.Language.get("wcf.global.button.close")+'" />').appendTo(this._ui.header).click($.proxy(this.close,this)),$.browser.mobile||e.click(function(i){i.target===e[0]&&this.close()}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(i){i.on("screen-sm-down",{match:$.proxy(this._enableMobileView,this),unmatch:$.proxy(this._disableMobileView,this)})}.bind(this)),!0},_enableMobileView:function(){this._container.addClass("wcfImageViewerMobile");var t=this;this._ui.imageContainer.swipe({swipeLeft:function(i){t._container.hasClass("maximized")&&t._nextImage(i)},swipeRight:function(i){t._container.hasClass("maximized")&&t._previousImage(i)},tap:function(i,e){switch(e.tagName){case"DIV":case"IMG":t._toggleView()}}}),this._isMobile=!0},_disableMobileView:function(){this._container.removeClass("wcfImageViewerMobile"),this._ui.imageContainer.swipe("destroy"),this._isMobile=!1},_toggleView:function(){this._ui.images[this._activeImage].addClass("animateTransformation"),this._container.toggleClass("maximized"),this._ui.slideshow.enlarge.toggleClass("active").children("span").toggleClass("fa-expand").toggleClass("fa-compress"),this._renderImage(null,void 0,null)},_next:function(i,e){var t;this._ui.buttonNext.hasClass("pointer")&&(null==e&&this.stopSlideshow(!0),t=Math.max(this._items*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight,0),this._thumbnailOffset=Math.min(this._thumbnailOffset+this._thumbnailWidth*(e||this.options.shiftBy),t),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._preload(),this._toggleButtons()},_previous:function(i,e){this._ui.buttonPrevious.hasClass("pointer")&&(null==e&&this.stopSlideshow(!0),this._thumbnailOffset=Math.max(this._thumbnailOffset-this._thumbnailWidth*(e||this.options.shiftBy),0),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._toggleButtons()},_nextImage:function(i){this._ui.slideshow.next.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active+1),i&&(i.preventDefault(),i.stopPropagation()))},_previousImage:function(i){this._ui.slideshow.previous.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active-1),i&&(i.preventDefault(),i.stopPropagation()))},moveToImage:function(i){var e=(i-3)*this._thumbnailWidth,t=e+5*this._thumbnailWidth,s=this._thumbnailOffset,a=this._thumbnailOffset+this._thumbnailContainerWidth;if(e<s||a<t?!0:!1){var n=0;if(e<s){for(;e<s;)n++,s-=this._thumbnailWidth;this._previous(null,n)}else{for(;a<t;)n++,a+=this._thumbnailWidth;this._next(null,n)}}},_toggleButtons:function(){0<this._thumbnailOffset?this._ui.buttonPrevious.addClass("pointer"):this._ui.buttonPrevious.removeClass("pointer");var i=this._images.length*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight;this._thumbnailOffset>=i?this._ui.buttonNext.removeClass("pointer"):this._ui.buttonNext.addClass("pointer"),0<this._active?this._ui.slideshow.previous.addClass("pointer"):this._ui.slideshow.previous.removeClass("pointer"),this._active+1<this._images.length?this._ui.slideshow.next.addClass("pointer"):this._ui.slideshow.next.removeClass("pointer"),this._items<2?this._ui.slideshow.toggle.removeClass("pointer"):this._ui.slideshow.toggle.addClass("pointer")},_createThumbnails:function(i){this.options.staticViewer&&(this._images=[],this._ui.imageList.empty());for(var e=0,t=i.length;e<t;e++){var s=i[e],a=$('<li class="loading pointer"><img src="'+s.thumbnail.url+'" /></li>').appendTo(this._ui.imageList);a.data("index",this._images.length).data("objectID",s.objectID).click($.proxy(this._showImage,this));var n,h=a.children("img");h.get(0).complete?(a.removeClass("loading"),this.options.staticViewer&&this._fixThumbnailDimensions(h)):(n=this,h.on("load",function(){var i=$(this);i.parent().removeClass("loading"),n.options.staticViewer&&n._fixThumbnailDimensions(i)})),s.listItem=a,this._images.push(s)}},_fixThumbnailDimensions:function(i){var e=new Image;e.src=i.prop("src");var t,s=e.height,a=e.width;s==a?s=a=80:s<a?(t=80/a,a=80,s*=t):(t=80/s,s=80,a*=t),i.css({height:s+"px",width:a+"px"})},_loadNextImages:function(i){this._proxy.setOption("data",{actionName:"loadNextImages",className:this.options.className,interfaceName:"wcf\\data\\IImageViewerAction",objectIDs:[this.element.data("objectID")],parameters:{maximumHeight:this._maxDimensions.height,maximumWidth:this._maxDimensions.width,offset:this._images.length,targetImageID:i&&this.element.data("targetImageID")?this.element.data("targetImageID"):0}}),this._proxy.setOption("showLoadingOverlay",!1),this._proxy.sendRequest()},_getStaticImages:function(){var a=[];return $(this.options.imageSelector).each(function(i,e){var t=$(e),s=t.find("> img, .attachmentThumbnailImage > img").first();s.length||(s=t.parentsUntil(".formAttachmentList").last().find(".attachmentTinyThumbnail")),a.push({image:{fullURL:s.data("source")?s.data("source").replace(/\\\//g,"/"):t.prop("href"),link:"",title:t.prop("title"),url:t.prop("href")},series:null,thumbnail:{url:s.prop("src")},user:null})}),this._items=a.length,a},_success:function(i,e,t){i.returnValues.items&&(this._items=i.returnValues.items);var s=this._initUI();this._createThumbnails(i.returnValues.images);var a=i.returnValues.targetImageID?i.returnValues.targetImageID:0;this._render(s,a),this._isOpen||(this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable())}}); })(this);
 
 // WCF.Label.js
-(function (window, undefined) { WCF.Label.js; })(this);
+(function (window, undefined) { "use strict";WCF.Label={},WCF.Label.ACPList=Class.extend({_labelInput:{},_labelList:{},init:function(){},_keyPressed:function(){}}),WCF.Label.ACPList.Connect=Class.extend({init:function(){},_click:function(){}}),WCF.Label.Chooser=Class.extend({_container:null,_groups:{},_showWithoutSelection:!1,init:function(a,t,e,n){if(this._container=null,this._groups={},this._showWithoutSelection=!0===n,this._initContainers(t),$.getLength(a))for(var o in a){var i=this._groups[o];i&&WCF.Dropdown.getDropdownMenu(i.wcfIdentify()).find("> ul > li:not(.dropdownDivider)").each($.proxy(function(t,e){var n=$(e),i=n.data("labelID")||0;i&&a[o]==i&&this._selectLabel(n,!0)},this))}for(var s in this._containers){var l=this._containers[s];void 0===l.data("labelID")&&l.data("labelID",0)}this._container=$(t),e?$(e).click($.proxy(this._submit,this)):this._container.is("form")&&this._container.submit($.proxy(this._submit,this))},_initContainers:function(t){function r(t){t.addEventListener("wheel",function(t){t.preventDefault()},{passive:!1})}$(t).find(".labelChooser").each($.proxy(function(t,e){var n,i,a,o,s=$(e),l=s.data("groupID");this._groups[l]||(n=s.wcfIdentify(),null===(i=WCF.Dropdown.getDropdownMenu(n))&&(WCF.Dropdown.initDropdown(s.find(".dropdownToggle")),i=WCF.Dropdown.getDropdownMenu(n)),"div"==(a=i).getTagName()&&i.children(".scrollableDropdownMenu").length&&(a=$("<ul />").appendTo(i),i=i.children(".scrollableDropdownMenu")),this._groups[l]=s,i.children("li").data("groupID",l).click($.proxy(this._click,this)),s.data("forceSelection")&&!this._showWithoutSelection||$('<li class="dropdownDivider" />').appendTo(a),this._showWithoutSelection&&r($('<li data-label-id="-1"><span><span class="badge label">'+WCF.Language.get("wcf.label.withoutSelection")+"</span></span></li>").data("groupID",l).appendTo(a).click($.proxy(this._click,this))[0]),s.data("forceSelection")||((o=$('<li data-label-id="0"><span><span class="badge label">'+WCF.Language.get("wcf.label.none")+"</span></span></li>").data("groupID",l).appendTo(a)).click($.proxy(this._click,this)),r(o[0])))},this))},_click:function(t){this._selectLabel($(t.currentTarget),!1)},_selectLabel:function(t,e){var n=this._groups[t.data("groupID")];e&&void 0!==n.data("labelID")||(t.data("labelID")?n.data("labelID",t.data("labelID")):n.data("labelID",0),t=t.find("span > span"),n.find(".dropdownToggle > span").removeClass().addClass(t.attr("class")).text(t.text()),!e&&this._container[0]&&"FORM"===this._container[0].nodeName&&null===elBySel('input:not([type="hidden"]):not([type="submit"]):not([type="reset"]), select, textarea',this._container[0])&&setTimeout(function(){this._container.trigger("submit")}.bind(this),100))},_submit:function(){var t=this._container.find(".formSubmit");for(var e in t.find('input[type="hidden"]').each(function(t,e){var n=$(e);0===n.attr("name").indexOf("labelIDs[")&&n.remove()}),this._groups){var n=this._groups[e];n.data("labelID")&&$('<input type="hidden" name="labelIDs['+e+']" value="'+n.data("labelID")+'" />').appendTo(t)}},destroy:function(){for(var t in this._groups)WCF.Dropdown.destroy(this._groups[t].wcfIdentify())}}),WCF.Label.ArticleLabelChooser=WCF.Label.Chooser.extend({_labelGroupsToCategories:{},init:function(){},_updateLabelGroups:function(){},_submit:function(){}}); })(this);
 
 // WCF.Location.js
-(function (window, undefined) { WCF.Location.js; })(this);
+(function (window, undefined) { "use strict";function gm_authFailure(){WCF.System.Event.fireEvent("com.woltlab.wcf.googleMaps","authenticationFailure")}WCF.Location={},WCF.Location.Util={getLocation:function(e,t){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition(function(t){e(t.coords.latitude,t.coords.longitude)},function(){e(void 0,void 0)},{timeout:t||5e3}):e(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&require(["Ui/Screen"],function(t){t.on("screen-sm-down",{setup:$.proxy(this._addSidebarMapListener,this)})}.bind(this)),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy(function(){e.open(this._map,t)},this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;case"hybrid":default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a,n=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});return s&&n.setIcon(s),i&&(a=new google.maps.InfoWindow({content:i}),this._addInfoWindowEventListener(n,a),n.infoWindow=a),this._markers.push(n),n},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t=null,e=null,o=null,s=null;for(var i in this._markers){var a=this._markers[i],n=a.getPosition().lat(),r=a.getPosition().lng();null===t?(t=e=n,o=s=r):(n<t?t=n:e<n&&(e=n),n<o?o=n:s<r&&(s=r))}this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(t,o),new google.maps.LatLng(e,s)))},removeMarkers:function(){for(var t in this._markers)this._markers[t].setMap(null);this._markers=[]},setBounds:function(t,e){this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.latitude,e.longitude),new google.maps.LatLng(t.latitude,t.longitude)))},setCenter:function(t,e){this._map.setCenter(new google.maps.LatLng(t,e))}}),WCF.Location.GoogleMaps.LargeMap=WCF.Location.GoogleMaps.Map.extend({_actionClassName:null,_additionalParameters:{},_locationSearch:null,_locationSearchInputSelector:null,_markerClusterer:null,_objectIDs:[],_previousNorthEast:null,_previousSouthWest:null,_stringifyExcludedObjectIds:!1,init:function(t,e,o,s,i){this._stringifyExcludedObjectIds=!1,e&&e.stringifyExcludedObjectIds&&(this._stringifyExcludedObjectIds=e.stringifyExcludedObjectIds,delete e.stringifyExcludedObjectIds),this._super(t,e),this._actionClassName=o,this._locationSearchInputSelector=s||"",this._additionalParameters=i||{},this._objectIDs=[],this._locationSearchInputSelector&&(this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(s,$.proxy(this._centerMap,this))),this._markerClusterer=new MarkerClusterer(this._map,this._markers,{maxZoom:17,imagePath:WCF.Location.GoogleMaps.Settings.get("markerClustererImagePath")+"m"}),this._markerSpiderfier=new OverlappingMarkerSpiderfier(this._map,{keepSpiderfied:!0,markersWontHide:!0,markersWontMove:!0}),this._markerSpiderfier.addListener("click",$.proxy(function(t){t.infoWindow&&t.infoWindow.open(this._map,t)},this)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._previousNorthEast=null,this._previousSouthWest=null,google.maps.event.addListener(this._map,"idle",$.proxy(this._loadMarkers,this))},_addInfoWindowEventListener:function(t,e){},_centerMap:function(t){this.setCenter(t.location.lat(),t.location.lng()),$(this._locationSearchInputSelector).val(t.label)},_loadMarkers:function(){var t=this._map.getBounds().getNorthEast(),e=this._map.getBounds().getSouthWest();return!(this._previousNorthEast&&this._previousNorthEast.lat()>=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng())&&(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._stringifyExcludedObjectIds?JSON.stringify(this._objectIDs):this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),!0)},_success:function(t,e,o){if(t.returnValues&&t.returnValues.markers)for(var s in t.returnValues.markers){var i=t.returnValues.markers[s];this.addMarker(i.latitude,i.longitude,i.title,null,i.infoWindow),i.objectID?this._objectIDs.push(i.objectID):i.objectIDs&&(this._objectIDs=this._objectIDs.concat(i.objectIDs))}},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('<div class="gmnoprint googleMapsCustomControlContainer"><div class="gm-style-mtc"><div class="googleMapsCustomControl">'+WCF.Language.get("wcf.map.showLocationSuggestions")+"</div></div></div>");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a=$(i),n=$('<a class="googleMapsUseLocationSuggestionLink" />').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);a.append($("<p />").append(n));var r=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",a.get(0));return n.data("marker",r),r},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t);for(var e=[],o=0,s=this._markers.length;o<s;o++){var i=this._markers[o];i.draggable||(i.setVisible(t),t&&e.push(i))}this._markerClusterer.clearMarkers(),t&&this._markerClusterer.addMarkers(e),this._loadMarkers()}}),WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i),this.setDelay(500),this._geocoder=new google.maps.Geocoder},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.formatted_address)+"</span></li>").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy(function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null},this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){var o=0;for(var s in t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var i=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i,!0),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy(function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))},this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy(function(t){null!==t&&$(this._searchInput).val(t)},this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(o,t,e,s,i){t&&(e=t.getPosition().lat(),s=t.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(e,s);this._geocoder.geocode({latLng:a},function(t,e){e==google.maps.GeocoderStatus.OK?o(i?t:t[0].formatted_address):o(null)})}}; })(this);
 
 // WCF.Message.js
-(function (window, undefined) { WCF.Message.js; })(this);
+(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({init:function(){}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:{},_newIDInputs:{},_containerSelector:"",_buttonSelector:"",init:function(){},_initInputs:function(){},_initElements:function(){},_click:function(){},_sendRequest:function(){},_success:function(){}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit(function(){$(this).find(".formSubmit input[type=submit]").disable()});$(window).on("unload",function(){e.find(".formSubmit input[type=submit]").enable()})}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_handleResponse:function(){},_failure:function(){}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:{},_options:{},init:function(){},_handleResponse:function(){},_getParameters:function(){},_dialogSetup:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",_click:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:{},init:function(){},_click:function(){},_disable:function(){},_updateLabel:function(){},_submit:function(){}}),WCF.Message.SmileyCategories=Class.extend({_cache:{},_proxy:{},_wysiwygSelector:"",init:function(){},_click:function(){},_success:function(){}}),WCF.Message.Smilies=Class.extend({_editorId:"",init:function(){},_smileyClick:function(){}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:"",_messageEditorIDPrefix:"",init:function(){},_click:function(){},_initDropdownMenu:function(){},_callbackDropdownInit:function(){},_getClassName:function(){}}),WCF.Message.Submit={_buttons:{},registerButton:function(){},execute:function(){}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:{},_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:{},_quoteManager:{},init:function(){},_initContainers:function(){},_mouseDown:function(){},_getNodeText:function(){},_mouseUp:function(){},_normalize:function(){},_getBoundingRectangle:function(){},_initCopyQuote:function(){},_getSelectedText:function(){},_saveFullQuote:function(){},_saveQuote:function(){},_saveAndInsertQuote:function(){},_success:function(){},updateFullQuoteObjectIDs:function(){}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:{},_editorId:"",_editorIdAlternative:"",_form:{},_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:{},_removeOnSubmit:{},_supportPaste:!1,init:function(){},setAlternativeEditor:function(){},clearAlternativeEditor:function(){},register:function(){},updateCount:function(){},insertQuotes:function(){},_toggleShowQuotes:function(){},_click:function(){},renderDialog:function(){},_changeButtons:function(){},_change:function(){},_insertSelected:function(){},_insertQuote:function(){},_removeSelected:function(){},_submit:function(){},getQuotesMarkedForRemoval:function(){},markQuotesForRemoval:function(){},removeMarkedQuotes:function(){},countQuotes:function(){},_success:function(){},supportPaste:function(){}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){e.preventDefault();var t,n,i=$(e.currentTarget),a=i.prop("href"),s=i.data("linkTitle")?i.data("linkTitle"):a,o=a.hashCode();void 0===this._cache[o]?(t=!1,null===this._dialog?(this._dialog=$('<div id="shareContentDialog" />').hide().appendTo(document.body),t=!0):this._dialog.empty(),n=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalink" class="long" readonly />').attr("value",a).appendTo(n),n=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly />').attr("value","[url='"+a+"']"+s+"[/url]").appendTo(n),n=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkHTML" class="long" readonly />').attr("value",'<a href="'+a+'">'+WCF.String.escapeHTML(s)+"</a>").appendTo(n),""!==this._shareButtonsTemplate&&(n=$('<section class="section"><h2 class="sectionTitle">'+WCF.Language.get("wcf.message.share")+"</h2>"+this._shareButtonsTemplate+"</section>").appendTo(this._dialog),elData(n.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(a))),this._cache[o]=this._dialog.html(),t?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[o]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click(function(){$(this).select()});navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown(function(){return!1}).removeAttr("readonly").click(function(){this.setSelectionRange(0,9999)})}}),WCF.Message.Share.Page=Class.extend({init:function(){require(["WoltLabSuite/Core/Ui/Message/Share"],function(e){e.init()})}}),WCF.Message.UserMention=Class.extend({init:function(){throw new Error("Support for mentions in Redactor are now enabled by adding the attribute 'data-support-mention=\"true\"' to the textarea element.")}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var n=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),e=this.element.find("> div, > fieldset");if(n.length==e.length){var i=this.element.data("preselect");e.each(function(e,t){if(null!==elBySel(".innerError",t))return i=$(n[e]).data("name"),!1}),"true"===i&&(i=!0),this._tabs=[],this._tabsByName={};for(var t=0;t<n.length;t++){var a,s=$(n[t]),o=$(e[t]),l=s.data("name");void 0===l&&(void 0!==(a=s.children("a").prop("href"))&&a.match(/#([a-zA-Z_-]+)$/)&&(l=RegExp.$1),void 0===l&&(l=s.wcfIdentify())),this._tabs.push({container:o,name:l,tab:s}),this._tabsByName[l]=t;var c=s.children("a").data("index",t).on("mousedown",this._showTab.bind(this));c.attr("role","button").attr("tabindex","0").attr("aria-haspopup",!0).attr("aria-expanded",!1).attr("aria-controls",o[0].id),c.on("keydown",function(e){13!==e.which&&32!==e.which||(e.preventDefault(),this._showTab(e))}.bind(this)),(i===l||!0===i&&0===t)&&c.trigger("mousedown")}!0===i&&this._tabs.length&&!window.matchMedia("(max-width: 544px)").matches&&this._tabs[0].tab.children("a").trigger("click");var r=this.element.data("collapsible");void 0!==r&&(this.options.collapsible=r);var u=elData(this.element[0],"wysiwyg-container-id");u&&WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+u,function(){for(var e=0,t=this._tabs.length;e<t;e++)this._tabs[e].container.removeClass("active"),this._tabs[e].tab.removeClass("active")}.bind(this))}else console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.")},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,n){var i=null===e?t:$(e.currentTarget).data("index");n=!this.options.collapsible||!0===n;for(var a=null,s=0;s<this._tabs.length;s++){var o=this._tabs[s];if(s==i){if(!o.tab.hasClass("active")){o.tab.addClass("active"),o.container.addClass("active"),(a=o).tab.children("a").attr("aria-expanded",!0);var l,c=o.container[0];null!==elBySel(".messageTabMenuContent.active",c)||null===elBySel(".messageTabMenuContent",c)||null!==(l=elBySel("nav > ul > li[data-name] > a",c))&&$(l).trigger("mousedown");continue}if(!0===n)continue}o.tab.removeClass("active"),o.container.removeClass("active"),o.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==a&&this._trigger("show",{},{activeTab:a}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
 
 // WCF.Poll.js
-(function (window, undefined) { WCF.Poll.js; })(this);
+(function (window, undefined) { "use strict";WCF.Poll={},WCF.Poll.Management=Class.extend({_container:{},_count:0,_editorId:"",_maxOptions:0,init:function(){},_createOptionList:function(){},_createOption:function(){},_keyDown:function(){},_addOption:function(){},_removeOption:function(){},_submit:function(){},_reset:function(){},_validate:function(){}}),WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(t){var s,e=$(t);e.length?(this._cache={},this._canViewParticipants={},this._canViewResult={},this._inputElements={},this._participants={},this._polls={},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),url:"index.php?poll/&t="+SECURITY_TOKEN}),s=this,e.each(function(t,e){var o=$(e),i=o.data("pollID");void 0===s._polls[i]&&(s._cache[i]={result:"",vote:""},s._polls[i]=o,s._canViewParticipants[i]=!!o.data("canViewParticipants"),s._canViewResult[i]=!!o.data("canViewResult"),s._canVote[i]=!!o.data("canVote"),s._bindListeners(i),o.data("inVote")&&s._prepareVote(i),s._toggleButtons(i))})):console.debug("[WCF.Poll.Manager] Given selector '"+t+"' does not match, aborting.")},_bindListeners:function(t){this._polls[t].find(".jsButtonPollShowParticipants").data("pollID",t).click($.proxy(this._showParticipants,this)),this._polls[t].find(".jsButtonPollShowResult").data("pollID",t).click($.proxy(this._showResult,this)),this._polls[t].find(".jsButtonPollShowVote").data("pollID",t).click($.proxy(this._showVote,this)),this._polls[t].find(".jsButtonPollVote").data("pollID",t).click($.proxy(this._vote,this))},_showResult:function(t,e){var o=null===t?e:$(t.currentTarget).data("pollID");this._canViewResult[o]&&this._polls[o].data("inVote")&&(this._cache[o].result?(this._polls[o].find(".pollInnerContainer").html(this._cache[o].result),this._polls[o].data("inVote",!1),this._toggleButtons(o)):(this._proxy.setOption("data",{actionName:"getResult",pollID:o}),this._proxy.sendRequest()))},_showParticipants:function(t){var e=$(t.currentTarget).data("pollID");this._participants[e]||(this._participants[e]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[e].data("question"),{pollID:e})),this._participants[e].open()},_showVote:function(t,e){var o=null===t?e:$(t.currentTarget).data("pollID");this._canVote[o]&&(this._polls[o].data("inVote")||(this._cache[o].vote?(this._polls[o].find(".pollInnerContainer").html(this._cache[o].vote),this._polls[o].data("inVote",!0),this._prepareVote(o),this._toggleButtons(o)):(this._proxy.setOption("data",{actionName:"getVote",pollID:o}),this._proxy.sendRequest())))},_success:function(t,e,o){if(t&&t.actionName){var i=t.pollID;switch(t.resultTemplate&&(this._cache[i].result=t.resultTemplate),t.voteTemplate&&(this._cache[i].vote=t.voteTemplate),t.actionName){case"getResult":this._showResult(null,i);break;case"getVote":this._showVote(null,i);break;case"vote":this._canViewResult[i]=!0,this._canVote[i]=!!t.canVote,this._polls[i].data("isPublic")&&(this._canViewParticipants[i]=!0);var s=elBySel(".jsPollTotalVotes",this._polls[i][0]);s.textContent=WCF.String.formatNumeric(t.totalVotes),elData(s,"tooltip",t.totalVotesTooltip),this._showResult(null,i)}}},_prepareVote:function(t){this._polls[t].find(".jsButtonPollVote").disable();var e=this._polls[t].find(".pollInnerContainer > .jsPollVote"),o=this;this._inputElements[t]=e.find("input").change(function(){o._handleVoteButton(t)}),this._handleVoteButton(t);var i=e.data("maxVotes");this._inputElements[t].filter("[type=checkbox]").length&&(this._inputElements[t].change(function(){o._enforceMaxVotes(t,i)}),this._enforceMaxVotes(t,i))},_enforceMaxVotes:function(t,e){var o=this._inputElements[t];o.filter(":checked").length==e?o.filter(":not(:checked)").disable():o.enable()},_handleVoteButton:function(t){var e=this._inputElements[t],o=this._polls[t].find(".jsButtonPollVote");e.filter(":checked").length?o.enable():o.disable()},_toggleButtons:function(t){var e=this._polls[t].children(".formSubmit");e.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide();var o=!0;this._polls[t].data("inVote")?(o=!1,e.find(".jsButtonPollVote").show(),this._canViewResult[t]&&e.find(".jsButtonPollShowResult").show()):(this._canVote[t]&&(o=!1,e.find(".jsButtonPollShowVote").show()),this._canViewParticipants[t]&&(o=!1,e.find(".jsButtonPollShowParticipants").show())),o&&e.hide()},_vote:function(t){var i,e=$(t.currentTarget).data("pollID");this._canVote[e]&&(i=[],this._inputElements[e].each(function(t,e){var o=$(e);o.is(":checked")&&i.push(o.data("optionID"))}),i.length&&(this._proxy.setOption("data",{actionName:"vote",optionIDs:i,pollID:e}),this._proxy.sendRequest()))}}); })(this);
 
 // WCF.Search.Message.js
-(function (window, undefined) { WCF.Search.Message.js; })(this);
+(function (window, undefined) { "use strict";WCF.Search.Message={},WCF.Search.Message.KeywordList=WCF.Search.Base.extend({_className:"wcf\\data\\search\\keyword\\SearchKeywordAction",_divider:null,_forceSubmit:!1,init:function(e,i,s){var t,r;$.isFunction(i)?(this._callback=i,this._excludedSearchValues=[],s&&(this._excludedSearchValues=s),this._searchInput=$(e).keyup($.proxy(this._keyUp,this)).keydown($.proxy(function(e){13===e.which&&this._itemCount&&-1!==this._itemIndex&&e.preventDefault()},this)),r=(t=WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify())).find("li.dropdownDivider").last(),this._divider=$('<li class="dropdownDivider" />').hide().insertBefore(r),this._list=$('<li class="dropdownList"><ul /></li>').hide().insertBefore(r).children("ul"),t.find("input, label").on("click",function(e){e.stopPropagation()}),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)})):console.debug("[WCF.Search.Message.KeywordList] The given callback is invalid, aborting.")},_createListItem:function(e){this._divider.show(),this._list.parent().show(),this._super(e)},_clearList:function(e){e&&this._searchInput.val(""),this._divider.hide(),this._list.empty().parent().hide(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1}}); })(this);
 
 // WCF.User.js
-(function (window, undefined) { WCF.User.js; })(this);
+(function (window, undefined) { "use strict";WCF.User.Login=Class.extend({_loginSubmitButton:null,_password:null,_passwordContainer:null,_useCookies:null,_useCookiesContainer:null,init:function(e){this._loginSubmitButton=$("#loginSubmitButton"),this._password=$("#password"),this._passwordContainer=this._password.parents("dl"),this._useCookies=$("#useCookies"),this._useCookiesContainer=this._useCookies.parents("dl"),$("#loginForm").find("input[name=action]").change($.proxy(this._change,this)),e&&WCF.User.QuickLogin.init()},_change:function(e){"register"===$(e.currentTarget).val()?this._setState(!1,WCF.Language.get("wcf.user.button.register")):this._setState(!0,WCF.Language.get("wcf.user.button.login"))},_setState:function(e,t){e?(this._password.enable(),this._passwordContainer.removeClass("disabled"),this._useCookies.enable(),this._useCookiesContainer.removeClass("disabled")):(this._password.disable(),this._passwordContainer.addClass("disabled"),this._useCookies.disable(),this._useCookiesContainer.addClass("disabled")),this._loginSubmitButton.val(t)}}),WCF.User.Panel={},WCF.User.Panel.Abstract=Class.extend({_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},init:function(){},toggle:function(){},_dblClick:function(){},_initDropdown:function(){},_load:function(){},_success:function(){},_markAsRead:function(){},_markAllAsRead:function(){},updateBadge:function(){},resetItems:function(){}}),WCF.User.Panel.Notification=WCF.User.Panel.Abstract.extend({_favico:{},init:function(){},_initDropdown:function(){},_load:function(){},_markAsRead:function(){},_markAllAsRead:function(){},resetItems:function(){},updateBadge:function(){},updateUserNotificationCount:function(){},_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},toggle:function(){},_dblClick:function(){},_success:function(){}}),WCF.User.Panel.UserMenu=WCF.User.Panel.Abstract.extend({init:function(){},_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},toggle:function(){},_dblClick:function(){},_initDropdown:function(){},_load:function(){},_success:function(){},_markAsRead:function(){},_markAllAsRead:function(){},updateBadge:function(){},resetItems:function(){}}),WCF.User.QuickLogin={init:function(){require(["EventHandler","Ui/Dialog"],function(e,s){var n=elById("loginForm"),a=elBySel(".loginFormLogin",n);a&&!a.nextElementSibling&&n.classList.add("loginFormLoginOnly");for(var o=elBySel(".loginFormRegister",n),t=function(e){if(e instanceof Event&&(e.preventDefault(),e.stopPropagation()),n.style.removeProperty("display"),s.openStatic("loginForm",null,{title:WCF.Language.get("wcf.user.login")}),null!==a&&null!==o){var t=a.offsetTop,i=0;if(n.clientWidth>2*a.clientWidth)for(;t<o.offsetTop-50;)i+=100,a.style.setProperty("margin-bottom",i+"px","")}},i=document.getElementsByClassName("loginLink"),r=0,l=i.length;r<l;r++)i[r].addEventListener(WCF_CLICK_EVENT,t);var c=n.querySelector("#loginForm input[name=url]");null===c||c.value.match(/^https?:\/\//)||c.setAttribute("value",window.location.protocol+"//"+window.location.host+c.getAttribute("value")),e.add("com.woltlab.wcf.UserMenuMobile","more",function(e){"com.woltlab.wcf.login"===e.identifier&&(e.handler.close(!0),t())})})}},WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(e){e.preventDefault();var t=$(e.currentTarget).data("userID");void 0===this._cache[t]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[t]}),this._proxy.sendRequest()):this._show(t)},_show:function(e){null===this._dialog?(this._dialog=$("<div>"+this._cache[e]+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[e]),this._dialog.wcfDialog("open"))},_success:function(e,t,i){this._cache[e.returnValues.userID]=e.returnValues.template,this._show(e.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(e){this._profileContent=$("#profileContent"),this._userID=e;var s=this._profileContent.data("active"),n=!1;this._profileContent.find("div.tabMenuContent").each($.proxy(function(e,t){var i=$(t).wcfIdentify();s===i?this._hasContent[i]=!0:(this._hasContent[i]=!1,n=!0)},this)),n&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy(function(e,t){var i=$(t);if(i.hasClass("ui-state-active"))return e&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1},this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(e){e.preventDefault(),require(["Ui/TabMenu"],function(e){e.getTabMenu("profileContent").select("likes")})}.bind(this))},_loadContent:function(e,t){var i=$(t.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(i,e,t){var s=i.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],function(e,t){t.insertHtml(i.returnValues.template,elById(s),"append"),e.trigger()})}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:{},_tab:{},_userID:0,init:function(){},_initButtons:function(){},_beginEdit:function(){},_save:function(){},_restore:function(){},_success:function(){},_prepareEdit:function(){},_destroyEditor:function(){}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(e,t,i){this._element=e,this._element.blur($.proxy(this._blur,this)),this._confirmElement=t||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(e){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(e){var t=this._element.val();if(!t)return this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"));if(null!==this._confirmElement){var i=this._confirmElement.val();if(""!=i&&t!=i)return this._showError(this._confirmElement,this._errorMessages.notEqual)}this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(e){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(e)},_success:function(e,t,i){e.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+e.returnValues.error))},_showError:function(e,t){e.parent().parent().addClass("formError").removeClass("formSuccess");var i=e.parent().find("small.innerError");i.length||(i=$("<small />").addClass("innerError").insertAfter(e)),i.text(t)},_showSuccess:function(e){e.parent().parent().addClass("formSuccess").removeClass("formError"),e.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(e){this._options=$.extend(!0,{minlength:3,maxlength:25},e)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var e=this._element.val();return!(e.length<this._options.minlength||e.length>this._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.User.Registration.Validation.Password=WCF.User.Registration.Validation.extend({_actionName:"validatePassword",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{password:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.password.error.",notEqual:WCF.Language.get("wcf.user.confirmPassword.error.notEqual")}}}),WCF.User.Registration.LostPassword=Class.extend({_email:null,_username:null,init:function(){this._email=$("#emailInput"),this._username=$("#usernameInput"),this._email.keyup($.proxy(this._checkEmail,this)),this._username.keyup($.proxy(this._checkUsername,this)),$.browser.mozilla&&$.browser.touch&&(this._email.on("input",$.proxy(this._checkEmail,this)),this._username.on("input",$.proxy(this._checkUsername,this))),this._checkEmail(),this._checkUsername()},_checkEmail:function(){""==this._email.val()?(this._username.enable(),this._username.parents("dl:eq(0)").removeClass("disabled")):(this._username.disable(),this._username.parents("dl:eq(0)").addClass("disabled"),this._username.val(""))},_checkUsername:function(){""==this._username.val()?(this._email.enable(),this._email.parents("dl:eq(0)").removeClass("disabled")):(this._email.disable(),this._email.parents("dl:eq(0)").addClass("disabled"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:{},init:function(){},_convertList:function(){},_markAsConfirmed:function(){},_success:function(){}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(e,t){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===t,this._userID=e,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('<li class="showMore"><button class="small">'+WCF.Language.get("wcf.user.recentActivity.more")+"</button></li>").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('<li class="showMore"><small>'+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small></li>").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var e={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?e.userID=this._userID:this._filteredByFollowedUsers&&(e.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:e}),this._proxy.sendRequest()},_switchContext:function(e){e.preventDefault(),$(e.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(e,t,i){e.returnValues.template?($(e.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",e.returnValues.lastEventTime),this._container.data("lastEventID",e.returnValues.lastEventID),this._loadButton.enable()):($("<small>"+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small>").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.LikeLoader=Class.extend({_container:null,_likeType:"received",_likeValue:1,_loadButton:null,_noMoreEntries:null,_proxy:null,_userID:0,init:function(e){var t;this._container=$("#likeList"),this._userID=e,this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),t=$('<li class="likeListMore showMore"><button class="small">'+WCF.Language.get("wcf.like.likes.more")+"</button><small>"+WCF.Language.get("wcf.like.likes.noMoreEntries")+"</small></li>").appendTo(this._container),this._loadButton=t.children("button").click($.proxy(this._click,this)),this._noMoreEntries=t.children("small").hide(),2==this._container.find("> li").length&&(this._loadButton.hide(),this._noMoreEntries.show()),$("#likeType .button").click($.proxy(this._clickLikeType,this)),$("#likeValue .button").click($.proxy(this._clickLikeValue,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_clickLikeType:function(e){var t=$(e.currentTarget);this._likeType!=t.data("likeType")&&(this._likeType=t.data("likeType"),$("#likeType .button").removeClass("active"),t.addClass("active"),this._reload())},_clickLikeValue:function(e){var t=$(e.currentTarget);this._likeValue!=t.data("likeValue")&&(this._likeValue=t.data("likeValue"),$("#likeValue .button").removeClass("active"),t.addClass("active"),$("#likeType > li:first-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesReceived")),$("#likeType > li:last-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesGiven")),this._container.find("> li.likeListMore button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.more")),this._container.find("> li.likeListMore small").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.noMoreEntries")),this._reload())},_reload:function(){this._container.find("> li:not(:first-child):not(:last-child)").remove(),this._container.data("lastLikeTime",0),this._click()},_click:function(){this._loadButton.enable();var e={lastLikeTime:this._container.data("lastLikeTime"),userID:this._userID,likeType:this._likeType,likeValue:this._likeValue};this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\like\\LikeAction",parameters:e}),this._proxy.sendRequest()},_success:function(e,t,i){e.returnValues.template?($(e.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastLikeTime",e.returnValues.lastLikeTime),this._noMoreEntries.hide(),this._loadButton.show().enable()):(this._noMoreEntries.show(),this._loadButton.hide())}}),WCF.User.ProfilePreview=WCF.Popover.extend({_proxy:null,_userProfiles:{},init:function(){this._super(".userLink"),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1}),WCF.System.ObjectStore.add("WCF.User.ProfilePreview",this)},_loadContent:function(){var n,a,o=$("#"+this._activeElementID).data("userID");this._userProfiles[o]?this._insertContent(this._activeElementID,this._userProfiles[o],!0):(this._proxy.setOption("data",{actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[o]}),n=this._activeElementID,(a=this)._proxy.setOption("success",function(e,t,i){a._userProfiles[o]=e.returnValues.template,a._insertContent(n,e.returnValues.template,!0)}),this._proxy.setOption("failure",function(e,t,i,s){return a._userProfiles[o]=e.message,a._insertContent(n,e.message,!0),!1}),this._proxy.sendRequest())},purge:function(e){delete this._userProfiles[e],this._data={}}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:{},_followButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Action.Ignore=Class.extend({_containerList:{},_ignoreButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(){},_initFile:function(){},_success:function(){},_updateImage:function(){},_getInnerErrorElement:function(){},_getParameters:function(){},_name:"",_buttonSelector:{},_fileListSelector:{},_fileUpload:{},_className:"",_iframe:{},_internalFileID:0,_options:{},_uploadMatrix:{},_supportsAJAXUpload:!0,_overlay:{},_createButton:function(){},_insertButton:function(){},_removeButton:function(){},_upload:function(){},_createUploadMatrix:function(){},_error:function(){},_progress:function(){},_showOverlay:function(){},_evaluateResponse:function(){},_getFilename:function(){}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(e,t,i){this._additionalParameters=i||{},this._cache={},this._className=e,this._dialog=null,this._dialogTitle=t,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(e,t){var i;t&&t.activePage&&(this._pageNo=t.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount)?console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount):this._cache[this._pageNo]?(i=!1,null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('<div id="userList'+this._className.hashCode()+'" />').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),1<this._pageCount?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()):(this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest())},_success:function(e,t,i){e.returnValues.pageCount&&(this._pageCount=e.returnValues.pageCount),this._cache[this._pageNo]=e.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:"",_buttons:{},_dialog:{},_notification:{},_reloadOnUnsubscribe:!1,init:function(){},_click:function(){},_success:function(){},_save:function(){},_updateSubscriptionStatus:function(){}}); })(this);
 
 // WCF.Moderation.js
-(function (window, undefined) { WCF.Moderation.js; })(this);
+(function (window, undefined) { "use strict";WCF.Moderation={},WCF.Moderation.Management=Class.extend({_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",init:function(){},_click:function(){},_clickAssignedUser:function(){},_success:function(){},_failure:function(){},_assignUser:function(){}}),WCF.Moderation.Queue={},WCF.Moderation.Queue.MarkAsRead=Class.extend({_proxy:{},init:function(){},_dblclick:function(){},_success:function(){}}),WCF.Moderation.Queue.MarkAllAsRead=Class.extend({_proxy:{},init:function(){},_click:function(){},_success:function(){}}),WCF.Moderation.Activation={},WCF.Moderation.Activation.Management=WCF.Moderation.Management.extend({init:function(){},_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",_click:function(){},_clickAssignedUser:function(){},_success:function(){},_failure:function(){},_assignUser:function(){}}),WCF.Moderation.Report={},WCF.Moderation.Report.Content=Class.extend({_buttons:{},_buttonSelector:"",_dialog:null,_notification:null,_objectID:0,_objectType:"",_proxy:null,init:function(t,e){this._objectType=t,this._buttonSelector=e,this._buttons={},this._notification=null,this._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Moderation.Report"+this._objectType.hashCode(),$.proxy(this._initButtons,this))},_initButtons:function(){var o=this;$(this._buttonSelector).each(function(t,e){var i=$(e),n=i.wcfIdentify();o._buttons[n]||(o._buttons[n]=i).click($.proxy(o._click,o))})},_click:function(t){t.preventDefault(),this._objectID=$(t.currentTarget).data("objectID"),this._proxy.setOption("data",{actionName:"prepareReport",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.reported?(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.moderation.report.success"))),this._dialog.wcfDialog("close"),this._notification.show()):t.returnValues.template&&(this._showDialog(t.returnValues.template),t.returnValues.alreadyReported||this._dialog.find(".jsSubmitReport").click($.proxy(this._submit,this)))},_showDialog:function(t){null===this._dialog&&(this._dialog=$("#moderationReport"),this._dialog.length||(this._dialog=$('<div id="moderationReport" />').hide().appendTo(document.body))),this._dialog.html(t).wcfDialog({title:WCF.Language.get("wcf.moderation.report.reportContent")}).wcfDialog("render")},_submit:function(){var t=this._dialog.find(".jsReportMessage").val();if(""==$.trim(t))return this._dialog.find(".section > dl").addClass("formError"),void(this._dialog.find(".innerError").length||this._dialog.find(".jsReportMessage").after($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>")));this._proxy.setOption("data",{actionName:"report",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{message:t,objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()}}),WCF.Moderation.Report.Management=WCF.Moderation.Management.extend({init:function(){},_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",_click:function(){},_clickAssignedUser:function(){},_success:function(){},_failure:function(){},_assignUser:function(){}}),WCF.User.Panel.Moderation=WCF.User.Panel.Abstract.extend({init:function(){},_initDropdown:function(){},_load:function(){},_markAsRead:function(){},_markAllAsRead:function(){},resetItems:function(){},_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},toggle:function(){},_dblClick:function(){},_success:function(){},updateBadge:function(){}}); })(this);