From: WoltLab Date: Tue, 10 May 2022 13:53:32 +0000 (+0000) Subject: Updating minified JavaScript files X-Git-Tag: 5.5.0_Beta_1~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6cb375dc6cfe1fca05ac945d21bb99aa11f5ddca;p=GitHub%2FWoltLab%2FWCF.git Updating minified JavaScript files --- diff --git a/wcfsetup/install/files/js/WCF.Combined.min.js b/wcfsetup/install/files/js/WCF.Combined.min.js index d7370727b8..46e6ad05ae 100755 --- a/wcfsetup/install/files/js/WCF.Combined.min.js +++ b/wcfsetup/install/files/js/WCF.Combined.min.js @@ -19,7 +19,7 @@ (function (window, undefined) { !function(){var e=!1,t=/xyz/.test((function(){xyz}))?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(n){function r(){!e&&this.init&&this.init.apply(this,arguments)}var i,o,a=this.prototype;for(o in e=!0,i=new this,e=!1,n)i[o]="function"==typeof n[o]&&"function"==typeof a[o]&&t.test(n[o])?function(e,t){return function(){var n,r=this._super;return this._super=a[e],n=t.apply(this,arguments),this._super=r,n}}(o,n[o]):n[o];return r.prototype=i,r.prototype.constructor=r,r.extend=arguments.callee,r}}(),function(e,t){"use strict";function n(){}function r(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,r=e.length;n0))return l=t.originalEvent?t.originalEvent:t,s=S?l.touches[0]:l,Te=m,S?xe=l.touches.length:t.preventDefault(),de=0,pe=null,ye=null,he=0,fe=0,ge=0,ve=1,we=0,Ee=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}(),be=function(){var e={};return e[r]=te(r),e[i]=te(i),e[o]=te(o),e[a]=te(a),e}(),G(),!S||xe===n.fingers||n.fingers===y||Q()?(K(0,s),Se=ie(),2==xe&&(K(1,l.touches[1]),fe=ge=re(Ee[0].start,Ee[1].start)),(n.swipeStatus||n.pinchStatus)&&(u=z(l,Te))):u=!1,!1===u?(z(l,Te=E),u):(n.hold&&(Ie=setTimeout(e.proxy((function(){me.trigger("hold",[l.target]),n.hold&&(u=n.hold.call(me,l,l.target))}),this),n.longTapThreshold)),J(!0),null)}function A(t){var d,p,h,f,g=t.originalEvent?t.originalEvent:t;Te===x||Te===E||Z()||(p=$(S?g.touches[0]:g),Le=ie(),S&&(xe=g.touches.length),n.hold&&clearTimeout(Ie),Te=T,2==xe&&(0==fe?(K(1,g.touches[1]),fe=ge=re(Ee[0].start,Ee[1].start)):($(g.touches[1]),ge=re(Ee[0].end,Ee[1].end),Ee[0].end,Ee[1].end,ye=ve<1?u:l),ve=function(e,t){return(t/e*1).toFixed(2)}(fe,ge),we=Math.abs(fe-ge)),xe===n.fingers||n.fingers===y||!S||Q()?(pe=function(e,t){var n=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}(e,t);return n<=45&&n>=0||n<=360&&n>=315?r:n>=135&&n<=225?i:n>45&&n<135?a:o}(p.start,p.end),function(e,t){if(n.allowPageScroll===s||Q())e.preventDefault();else{var l=n.allowPageScroll===c;switch(t){case r:(n.swipeLeft&&l||!l&&n.allowPageScroll!=v)&&e.preventDefault();break;case i:(n.swipeRight&&l||!l&&n.allowPageScroll!=v)&&e.preventDefault();break;case o:(n.swipeUp&&l||!l&&n.allowPageScroll!=w)&&e.preventDefault();break;case a:(n.swipeDown&&l||!l&&n.allowPageScroll!=w)&&e.preventDefault()}}}(t,pe),de=function(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}(p.start,p.end),he=ne(),function(e,t){t=Math.max(t,ee(e)),be[e].distance=t}(pe,de),(n.swipeStatus||n.pinchStatus)&&(d=z(g,Te)),n.triggerOnTouchEnd&&!n.triggerOnTouchLeave||(h=!0,n.triggerOnTouchLeave&&(f=function(t){var n=(t=e(t)).offset();return{left:n.left,right:n.left+t.outerWidth(),top:n.top,bottom:n.top+t.outerHeight()}}(this),h=function(e,t){return e.x>t.left&&e.xt.top&&e.y0?(Oe=ie(),Me=event.touches.length+1,!0):(Z()&&(xe=Me),Le=ie(),he=ne(),U()||!N()?z(t,Te=E):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&Te===T?(e.preventDefault(),z(t,Te=x)):!n.triggerOnTouchEnd&&Y()?_(t,Te=x,h):Te===T&&z(t,Te=E),J(!1),null)}function k(){xe=0,Le=0,Se=0,fe=0,ge=0,ve=1,G(),J(!1)}function D(e){var t=e.originalEvent;n.triggerOnTouchLeave&&z(t,Te=R(x))}function j(){me.unbind(ae,P),me.unbind(ce,k),me.unbind(le,A),me.unbind(ue,I),se&&me.unbind(se,D),J(!1)}function R(e){var t=e,r=C(),i=N(),o=U();return!r||o?t=E:!i||e!=T||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!i&&e==x&&n.triggerOnTouchLeave&&(t=E):t=x,t}function z(e,t){var r=void 0;return X()&&B()||B()?r=_(e,t,d):(H()&&Q()||Q())&&!1!==r&&(r=_(e,t,p)),V()&&q()&&!1!==r?r=_(e,t,f):he>n.longTapThreshold&&de=n.threshold),e}function U(){var e=!1;return null!==n.cancelThreshold&&null!==pe&&(e=ee(pe)-de>=n.cancelThreshold),e}function C(){return!n.maxTimeThreshold||!(he>=n.maxTimeThreshold)}function H(){var e=F(),t=W(),r=null===n.pinchThreshold||we>=n.pinchThreshold;return e&&t&&r}function Q(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function X(){var e=C(),t=N(),n=F(),r=W(),i=U(),o=!i&&r&&n&&t&&e;return o}function B(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function F(){return xe===n.fingers||n.fingers===y||!S}function W(){return 0!==Ee[0].end.x}function Y(){return!!n.tap}function q(){return!!n.doubleTap}function V(){if(null==Pe)return!1;var e=ie();return q()&&e-Pe<=n.doubleTapThreshold}function G(){Oe=0,Me=0}function Z(){var e=!1;return Oe&&ie()-Oe<=n.fingerReleaseThreshold&&(e=!0),e}function J(e){!0===e?(me.bind(le,A),me.bind(ue,I),se&&me.bind(se,D)):(me.unbind(le,A,!1),me.unbind(ue,I,!1),se&&me.unbind(se,D,!1)),me.data(M+"_intouch",!0===e)}function K(e,t){var n=void 0!==t.identifier?t.identifier:0;return Ee[e].identifier=n,Ee[e].start.x=Ee[e].end.x=t.pageX||t.clientX,Ee[e].start.y=Ee[e].end.y=t.pageY||t.clientY,Ee[e]}function $(e){var t=void 0!==e.identifier?e.identifier:0,n=function(e){for(var t=0;t/g,">").replace(/&/g,"&").replace(/\n/g,"
");a.html(e+" ").css({width:parseInt(o.width(),10)+"px"}),i()}function i(){var e=a.height(),t="hidden",n=l?e+c+u:e+c;n>p?(n=p,t="auto"):d>n&&(n=d),o.height()!==n&&o.css({overflow:t,height:n+"px"})}var o,a,l,u,s,c,d,p;if("textarea"!==this.type)return!1;o=e(this).css({resize:"none",overflow:"hidden"}),a=e("
").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body),n(),l="border-box"==o.css("box-sizing")||"border-box"==o.css("-moz-box-sizing")||"border-box"==o.css("-webkit-box-sizing"),u=parseInt(o.css("border-top-width"))+parseInt(o.css("padding-top"))+parseInt(o.css("padding-bottom"))+parseInt(o.css("border-bottom-width")),s=parseInt(o.css("height"),10),c=parseInt(o.css("line-height"),10)||parseInt(o.css("font-size"),10),d=2*c>s?2*c:s,p=parseInt(o.css("max-height"),10)>-1?parseInt(o.css("max-height"),10):Number.MAX_VALUE,o.bind("keyup change cut paste",(function(){r()})),e(window).bind("resize",(function(){a.width()!==parseInt(o.width(),10)&&r()})),o.bind("blur",(function(){i()})),o.bind("updateHeight",(function(){n(),r()})),e((function(){r()}))}))}};e.fn.flexible=function(n){return t[n]?t[n].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof n&&n?void e.error("Method "+n+" does not exist on jQuery.flexible"):t.init.apply(this,arguments)}}(jQuery); })(this); // WCF.js -(function (window, undefined) { "use strict";function wcfEval(expression){return eval(expression)}!function(){var e,t,i=jQuery.fn.data;for(jQuery.fn.data=function(e,t){var n,s,a,o=[].slice.call(arguments);if(e)switch(typeof e){case"object":for(n in e)n.match(/ID$/)&&(s=e[n],delete e[n],e[n=n.replace(/ID$/,"-id")]=s);o[0]=e;break;case"string":e.match(/ID$/)&&(o[0]=e.replace(/ID$/,"-id"))}if(a=i.apply(this,o),void 0===e)for(n in a)n.match(/Id$/)&&(a[n.replace(/Id$/,"ID")]=a[n],delete a[n]);return a},window.console||(window.console={}),e=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],t=0;t0,e.browser.smartphone=!1,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 arguments.length>0?this.on("focus",null,e,t):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(e,t){return $.grep(e,(function(e,i){return t!==e}))},wcfEscapeID:function(e){return e.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(e){return!!$("#"+$.wcfEscapeID(e)).length},getLength:function(e){var t,i=0;for(t in e)e.hasOwnProperty(t)&&i++;return i}}),$.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;if(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),"offset"===e)i=this.offset();else 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(){var e,t,i;if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;return e=0,t=this.get(0),document.selection?(this.focus(),(i=document.selection.createRange()).moveStart("character",-this.val().length),e=i.text.length):(t.selectionStart||"0"==t.selectionStart)&&(e=parseInt(t.selectionStart)),e},setCaret:function(e){var t,i;if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;return t=this.get(0),this.focus(),document.selection?((i=document.selection.createRange()).moveStart("character",e),i.moveEnd("character",0),i.select()):(t.selectionStart||"0"==t.selectionStart)&&(t.selectionStart=e,t.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(e){var t=require("perfect-scrollbar");return this.each((function(){var i,n;return"object"==typeof e||void 0===e?(i=e,$(this).data("psID")||t.initialize(this,i)):"update"===(n=e)?t.update(this):"destroy"===n&&t.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,n,s={},a=e.attr("style");if(!a)return{};for(t=0,i=(a=a.split(";")).length;t').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,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){var s,a;this._options=n||{},this._triggerElement=t,s=null,!0===n.staticDropdown?this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",i).click((function(e){e.stopPropagation()})):(this._container=$('
').click((function(e){e.stopPropagation()})),a=$('
').appendTo(this._container),$(''+n.title+"").appendTo(a),this._linkList=$('').appendTo(a),s=$('
').appendTo(this._container),this._itemList=$('
    ').appendTo(s),$(''+WCF.Language.get("wcf.user.panel.showAll")+"").appendTo(this._container)),this._pointer=$('').appendTo(this._container),require(["Ui/Screen"],function(e){e.is("screen-lg")&&null!==s&&s.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):(require(["WoltLabSuite/Core/Ui/CloseOverlay"],(e=>{e.execute(),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){if(e.is("screen-lg")){var t=this._itemList.parent();t.perfectScrollbar("destroy"),t.perfectScrollbar({suppressScrollX:!0})}}.bind(this))}}),WCF.Clipboard={init:function(e,t,i,n){require(["EventHandler","WoltLabSuite/Core/Controller/Clipboard"],(function(s,a){for(var o in a.setup({hasMarkedItems:t>0,pageClassName:e,pageObjectId:n}),i)i.hasOwnProperty(o)&&function(e){s.add("com.woltlab.wcf.clipboard",e,(function(t){null!==t.responseData&&i[e].hasOwnProperty(t.responseData.actionName)&&i[e][t.responseData.actionName].triggerEffect(t.responseData.objectIDs)}))}(o)}))},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(e){this._ajaxRequest=null,"jsonp"===(e=$.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},e)).dataType?require(["AjaxJsonp"],(function(t){t.send(e.url,e.success,e.failure,{parameterName:e.jsonp})})):require(["AjaxRequest"],function(t){this._ajaxRequest=new t({data:e.data,type:e.type,url:e.url,withCredentials:e.url==="index.php?ajax-proxy/&t="+SECURITY_TOKEN,responseType:"json"===e.dataType?"application/json":"",autoAbort:e.autoAbortPrevious,ignoreError:e.suppressErrors,silent:!e.showLoadingOverlay,failure:e.failure,finalize:e.after,success:e.success}),e.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(e){require(["AjaxRequest"],function(t){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(e)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(e,t){require(["AjaxRequest"],function(i){null!==this._ajaxRequest&&this._ajaxRequest.setOption(e,t)}.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){this._containers.forEach(function(t){var i,n=$("#"+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})})))}.bind(this))}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(e){var t,i,n;for(t in this._containers)i=$("#"+this._containers[t]),WCF.inArray(i.find(this._buttonSelector).data("objectID"),e)&&(i.has("ol").has("li").length?(i.is(":only-child")?i.parent().replaceWith(i.find("> ol")):i.replaceWith(i.find("> ol > li")),this._containers.splice(this._containers.indexOf(i.wcfIdentify()),1),this._didTriggerEffect(i)):(n=this,i.wcfBlindOut("up",(function(){$(this).remove(),n._containers.splice(n._containers.indexOf($(this).wcfIdentify()),1),n._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){var t,i,n;for(t in this._containers)n=(i=$("#"+this._containers[t])).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),t.hasClass("fa-square-o")?(t.removeClass("fa-square-o").addClass("fa-check-square-o"),i=t.data("disableTitle")?t.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"),t.attr("title",i)):(t.removeClass("fa-check-square-o").addClass("fa-square-o"),i=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(),i=this._reference.height();e-(i+t)/g,">")},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]),i.length>1&&(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(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],(function(e){e.setup()}))},reload:function(){this.init()}},WCF.Template=Class.extend({init:function(e){var t,i,n,s=new WCF.Dictionary,a=0;for(n in e=(e=(e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")).replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy((function(e){var t="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return s.add(t,e.replace(/\{\/?literal\}/g,"")),t}),this))).replace(/\{\*.*?\*\}/g,""),t=function(e){var t,i,n,s=e.split(""),a={},o=!0,r="",l="",c=!1,u=!1,h=!1;for(t=0,i=s.length;t').prependTo(t),i.data("containerID",e).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,s=n?"open":"close",a=n?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:s,newState:a},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),$("#"+i).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),i=t.data("containerID"),n=this._containerData[i].isOpen,s=n?"open":"close",a=n?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:s,newState:a},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[i].button,"open"===a?"chevron-down":"chevron-right"),"open"===a?this._containerData[i].target.show():this._containerData[i].target.hide(),$("#"+i).toggleClass("jsCollapsed"),this._containerData[i].isOpen="open"===a}}),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){var n,s,a;return!e.length||((n=e.getOffsets("offset").top)>(s=$(document).height())-(a=$(window).height())&&(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(e,t){require(["Ui/CloseOverlay"],(function(i){i.add(e,t)}))},removeCallback:function(e){require(["Ui/CloseOverlay"],(function(t){t.remove(e)}))},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(){if(!this._isListening){if(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});else $(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this));this._isListening=!0}},_executeCallbacks:function(e){this._isExecuting||(this._isExecuting=!0,this._callbacks.each((function(t){t.value(e)})),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){var disableOptions,enableOptions,isActive,$value,relevantDisableOptions,relevantEnableOptions,$index,$item;switch(option=$(option),disableOptions=eval(option.data("disableOptions")),enableOptions=eval(option.data("enableOptions")),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":if($value=option.val(),relevantDisableOptions=[],relevantEnableOptions=[],disableOptions.length>0)for($index in disableOptions)$item=disableOptions[$index],$item.value==$value?relevantDisableOptions.push($item.option):relevantEnableOptions.push($item.option);if(enableOptions.length>0)for($index in enableOptions)$item=enableOptions[$index],$item.value==$value?relevantEnableOptions.push($item.option):relevantDisableOptions.push($item.option);this._execute(!0,relevantDisableOptions,relevantEnableOptions)}},_execute:function(e,t,i){var n,s,a,o;if(t.length>0)for(n=0,s=t.length;n0)for(n=0,s=i.length;n").addClass(this._options.messageType).text(this._options.emptyMessage)):this._options.emptyMessageHtml?this._tableContainer.replaceWith($("

    ").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),this._options.updatePageNumber>0?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(''),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('