Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Sun, 6 Sep 2015 13:22:19 +0000 (15:22 +0200)
committerwoltlab.com <woltlab@woltlab.com>
Sun, 6 Sep 2015 13:22:19 +0000 (15:22 +0200)
wcfsetup/install/files/js/WCF.Combined.min.js

index 532d3a776fa5c8ebbfa8f4c30d7a6d6636c423cd..ea55dd2c1275b20008b4b1691d52650b1c7f62fa 100755 (executable)
@@ -64,7 +64,7 @@ i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.t
 (function (window, undefined) {!function(){var e=!1,t=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(n){function i(){!e&&this.init&&this.init.apply(this,arguments)}var r=this.prototype;e=!0;var o=new this;e=!1;for(var a in n)o[a]="function"==typeof n[a]&&"function"==typeof r[a]&&t.test(n[a])?function(e,t){return function(){var n=this._super;this._super=r[e];var i=t.apply(this,arguments);return this._super=n,i}}(a,n[a]):n[a];return i.prototype=o,i.prototype.constructor=i,i.extend=arguments.callee,i}}(),function(e,t){"use strict";function n(){}function i(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,i=e.length;i>n;n++)t.call(e,e[n],n)}}function r(e,n){var i=Object.prototype.toString.call(n).slice(8,-1);return n!==t&&null!==n&&i===e}function o(e){return r("Function",e)}function a(e){return r("Array",e)}function u(e){var t=e.split("/"),n=t[t.length-1],i=n.indexOf("?");return-1!==i?n.substring(0,i):n}function l(e){e=e||n,e._done||(e(),e._done=1)}function s(e,t,i,r){var o="object"==typeof e?e:{test:e,success:t?a(t)?t:[t]:!1,failure:i?a(i)?i:[i]:!1,callback:r||n},u=!!o.test;return u&&o.success?(o.success.push(o.callback),A.load.apply(null,o.success)):u||!o.failure?r():(o.failure.push(o.callback),A.load.apply(null,o.failure)),A}function c(e){var t,n,i={};if("object"==typeof e)for(t in e)!e[t]||(i={name:t,url:e[t]});else i={name:u(e),url:e};return n=M[i.name],n&&n.url===i.url?n:(M[i.name]=i,i)}function d(e){e=e||M;for(var t in e)if(e.hasOwnProperty(t)&&e[t].state!==R)return!1;return!0}function p(e){e.state=I,i(e.onpreload,function(e){e.call()})}function f(e){e.state===t&&(e.state=P,e.onpreload=[],w({url:e.url,type:"cache"},function(){p(e)}))}function h(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),r=n[0];return o(t)||(t=null),a(e[0])?(e[0].push(t),A.load.apply(null,e[0]),A):(r?(i(n,function(e){o(e)||!e||f(c(e))}),v(c(e[0]),o(r)?r:function(){A.load.apply(null,n)})):v(c(e[0])),A)}function g(){var e=arguments,t=e[e.length-1],n={};return o(t)||(t=null),a(e[0])?(e[0].push(t),A.load.apply(null,e[0]),A):(i(e,function(e){e!==t&&(e=c(e),n[e.name]=e)}),i(e,function(e){e!==t&&(e=c(e),v(e,function(){d(n)&&l(t)}))}),A)}function v(e,t){return t=t||n,e.state===R?void t():e.state===D?void A.ready(e.name,t):e.state===P?void e.onpreload.push(function(){v(e,t)}):(e.state=D,void w(e,function(){e.state=R,t(),i(O[e.name],function(e){l(e)}),E&&d()&&i(O.ALL,function(e){l(e)})}))}function m(e){e=e||"";var t=e.split("?")[0].split(".");return t[t.length-1].toLowerCase()}function w(t,i){function r(t){t=t||e.event,u.onload=u.onreadystatechange=u.onerror=null,i()}function o(n){n=n||e.event,("load"===n.type||/loaded|complete/.test(u.readyState)&&(!S.documentMode||S.documentMode<9))&&(e.clearTimeout(t.errorTimeout),e.clearTimeout(t.cssTimeout),u.onload=u.onreadystatechange=u.onerror=null,i())}function a(){if(t.state!==R&&t.cssRetries<=20){for(var n=0,i=S.styleSheets.length;i>n;n++)if(S.styleSheets[n].href===u.href)return void o({type:"load"});t.cssRetries++,t.cssTimeout=e.setTimeout(a,250)}}var u,l,s;i=i||n,l=m(t.url),"css"===l?(u=S.createElement("link"),u.type="text/"+(t.type||"css"),u.rel="stylesheet",u.href=t.url,t.cssRetries=0,t.cssTimeout=e.setTimeout(a,500)):(u=S.createElement("script"),u.type="text/"+(t.type||"javascript"),u.src=t.url),u.onload=u.onreadystatechange=o,u.onerror=r,u.async=!1,u.defer=!1,t.errorTimeout=e.setTimeout(function(){r({type:"timeout"})},7e3),s=S.head||S.getElementsByTagName("head")[0],s.insertBefore(u,s.lastChild)}function b(){for(var e,t=S.getElementsByTagName("script"),n=0,i=t.length;i>n;n++)if(e=t[n].getAttribute("data-headjs-load"),!!e)return void A.load(e)}function y(e,t){var n,r,u;return e===S?(E?l(t):L.push(t),A):(o(e)&&(t=e,e="ALL"),a(e)?(n={},i(e,function(e){n[e]=M[e],A.ready(e,function(){d(n)&&l(t)})}),A):"string"==typeof e&&o(t)?(r=M[e],r&&r.state===R||"ALL"===e&&d()&&E?(l(t),A):(u=O[e],u?u.push(t):u=O[e]=[t],A)):A)}function T(){return S.body?void(E||(E=!0,b(),i(L,function(e){l(e)}))):(e.clearTimeout(A.readyTimeout),void(A.readyTimeout=e.setTimeout(T,50)))}function x(){S.addEventListener?(S.removeEventListener("DOMContentLoaded",x,!1),T()):"complete"===S.readyState&&(S.detachEvent("onreadystatechange",x),T())}var E,k,S=e.document,L=[],O={},M={},z="async"in S.createElement("script")||"MozAppearance"in S.documentElement.style||e.opera,j=e.head_conf&&e.head_conf.head||"head",A=e[j]=e[j]||function(){A.ready.apply(null,arguments)},P=1,I=2,D=3,R=4;if("complete"===S.readyState)T();else if(S.addEventListener)S.addEventListener("DOMContentLoaded",x,!1),e.addEventListener("load",T,!1);else{S.attachEvent("onreadystatechange",x),e.attachEvent("onload",T),k=!1;try{k=!e.frameElement&&S.documentElement}catch(e){}k&&k.doScroll&&function t(){if(!E){try{k.doScroll("left")}catch(n){return e.clearTimeout(A.readyTimeout),void(A.readyTimeout=e.setTimeout(t,50))}T()}}()}A.load=A.js=z?g:h,A.test=s,A.ready=y,A.ready(S,function(){d()&&i(O.ALL,function(e){l(e)}),A.feature&&A.feature("domloaded",!0)})}(window),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(function(e){function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=s),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each(function(){var i=e(this),r=i.data(O);r||(r=new n(this,t),i.data(O,r))})}function n(t,n){function M(t){if(!(se()||e(t.target).closest(n.excludedElements,Be).length>0)){var i,r=t.originalEvent?t.originalEvent:t,o=k?r.touches[0]:r;return Fe=y,k?We=r.touches.length:t.preventDefault(),Re=0,_e=null,qe=null,Ne=0,Ue=0,Ce=0,He=1,Qe=0,Ye=he(),Xe=me(),ue(),!k||We===n.fingers||n.fingers===w||X()?(de(0,o),Ve=Le(),2==We&&(de(1,r.touches[1]),Ue=Ce=ye(Ye[0].start,Ye[1].start)),(n.swipeStatus||n.pinchStatus)&&(i=R(r,Fe))):i=!1,i===!1?(Fe=E,R(r,Fe),i):(n.hold&&(et=setTimeout(e.proxy(function(){Be.trigger("hold",[r.target]),n.hold&&(i=n.hold.call(Be,r,r.target))},this),n.longTapThreshold)),ce(!0),null)}}function z(e){var t=e.originalEvent?e.originalEvent:e;if(Fe!==x&&Fe!==E&&!le()){var i,r=k?t.touches[0]:t,o=pe(r);if(Ge=Le(),k&&(We=t.touches.length),n.hold&&clearTimeout(et),Fe=T,2==We&&(0==Ue?(de(1,t.touches[1]),Ue=Ce=ye(Ye[0].start,Ye[1].start)):(pe(t.touches[1]),Ce=ye(Ye[0].end,Ye[1].end),qe=xe(Ye[0].end,Ye[1].end)),He=Te(Ue,Ce),Qe=Math.abs(Ue-Ce)),We===n.fingers||n.fingers===w||!k||X()){if(_e=Se(o.start,o.end),Q(e,_e),Re=Ee(o.start,o.end),Ne=be(),ge(_e,Re),(n.swipeStatus||n.pinchStatus)&&(i=R(t,Fe)),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var a=!0;if(n.triggerOnTouchLeave){var u=Oe(this);a=Me(o.end,u)}!n.triggerOnTouchEnd&&a?Fe=D(T):n.triggerOnTouchLeave&&!a&&(Fe=D(x)),(Fe==E||Fe==x)&&R(t,Fe)}}else Fe=E,R(t,Fe);i===!1&&(Fe=E,R(t,Fe))}}function j(e){var t=e.originalEvent;return k&&t.touches.length>0?(ae(),!0):(le()&&(We=Je),Ge=Le(),Ne=be(),U()||!N()?(Fe=E,R(t,Fe)):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&Fe===T?(e.preventDefault(),Fe=x,R(t,Fe)):!n.triggerOnTouchEnd&&Z()?(Fe=x,_(t,Fe,f)):Fe===T&&(Fe=E,R(t,Fe)),ce(!1),null)}function A(){We=0,Ge=0,Ve=0,Ue=0,Ce=0,He=1,ue(),ce(!1)}function P(e){var t=e.originalEvent;n.triggerOnTouchLeave&&(Fe=D(x),R(t,Fe))}function I(){Be.unbind(je,M),Be.unbind(De,A),Be.unbind(Ae,z),Be.unbind(Pe,j),Ie&&Be.unbind(Ie,P),ce(!1)}function D(e){var t=e,i=H(),r=N(),o=U();return!i||o?t=E:!r||e!=T||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!r&&e==x&&n.triggerOnTouchLeave&&(t=E):t=x,t}function R(e,t){var n=void 0;return Y()||W()?n=_(e,t,d):(B()||X())&&n!==!1&&(n=_(e,t,p)),re()&&n!==!1?n=_(e,t,h):oe()&&n!==!1?n=_(e,t,g):ie()&&n!==!1&&(n=_(e,t,f)),t===E&&A(e),t===x&&(k?0==e.touches.length&&A(e):A(e)),n}function _(t,s,c){var v=void 0;if(c==d){if(Be.trigger("swipeStatus",[s,_e||null,Re||0,Ne||0,We,Ye]),n.swipeStatus&&(v=n.swipeStatus.call(Be,t,s,_e||null,Re||0,Ne||0,We,Ye),v===!1))return!1;if(s==x&&F()){if(Be.trigger("swipe",[_e,Re,Ne,We,Ye]),n.swipe&&(v=n.swipe.call(Be,t,_e,Re,Ne,We,Ye),v===!1))return!1;switch(_e){case i:Be.trigger("swipeLeft",[_e,Re,Ne,We,Ye]),n.swipeLeft&&(v=n.swipeLeft.call(Be,t,_e,Re,Ne,We,Ye));break;case r:Be.trigger("swipeRight",[_e,Re,Ne,We,Ye]),n.swipeRight&&(v=n.swipeRight.call(Be,t,_e,Re,Ne,We,Ye));break;case o:Be.trigger("swipeUp",[_e,Re,Ne,We,Ye]),n.swipeUp&&(v=n.swipeUp.call(Be,t,_e,Re,Ne,We,Ye));break;case a:Be.trigger("swipeDown",[_e,Re,Ne,We,Ye]),n.swipeDown&&(v=n.swipeDown.call(Be,t,_e,Re,Ne,We,Ye))}}}if(c==p){if(Be.trigger("pinchStatus",[s,qe||null,Qe||0,Ne||0,We,He,Ye]),n.pinchStatus&&(v=n.pinchStatus.call(Be,t,s,qe||null,Qe||0,Ne||0,We,He,Ye),v===!1))return!1;if(s==x&&q())switch(qe){case u:Be.trigger("pinchIn",[qe||null,Qe||0,Ne||0,We,He,Ye]),n.pinchIn&&(v=n.pinchIn.call(Be,t,qe||null,Qe||0,Ne||0,We,He,Ye));break;case l:Be.trigger("pinchOut",[qe||null,Qe||0,Ne||0,We,He,Ye]),n.pinchOut&&(v=n.pinchOut.call(Be,t,qe||null,Qe||0,Ne||0,We,He,Ye))}}return c==f?(s===E||s===x)&&(clearTimeout($e),clearTimeout(et),J()&&!ee()?(Ke=Le(),$e=setTimeout(e.proxy(function(){Ke=null,Be.trigger("tap",[t.target]),n.tap&&(v=n.tap.call(Be,t,t.target))},this),n.doubleTapThreshold)):(Ke=null,Be.trigger("tap",[t.target]),n.tap&&(v=n.tap.call(Be,t,t.target)))):c==h?(s===E||s===x)&&(clearTimeout($e),Ke=null,Be.trigger("doubletap",[t.target]),n.doubleTap&&(v=n.doubleTap.call(Be,t,t.target))):c==g&&(s===E||s===x)&&(clearTimeout($e),Ke=null,Be.trigger("longtap",[t.target]),n.longTap&&(v=n.longTap.call(Be,t,t.target))),v}function N(){var e=!0;return null!==n.threshold&&(e=Re>=n.threshold),e}function U(){var e=!1;return null!==n.cancelThreshold&&null!==_e&&(e=ve(_e)-Re>=n.cancelThreshold),e}function C(){return null!==n.pinchThreshold?Qe>=n.pinchThreshold:!0}function H(){var e;return e=n.maxTimeThreshold&&Ne>=n.maxTimeThreshold?!1:!0}function Q(e,t){if(n.allowPageScroll===s||X())e.preventDefault();else{var u=n.allowPageScroll===c;switch(t){case i:(n.swipeLeft&&u||!u&&n.allowPageScroll!=v)&&e.preventDefault();break;case r:(n.swipeRight&&u||!u&&n.allowPageScroll!=v)&&e.preventDefault();break;case o:(n.swipeUp&&u||!u&&n.allowPageScroll!=m)&&e.preventDefault();break;case a:(n.swipeDown&&u||!u&&n.allowPageScroll!=m)&&e.preventDefault()}}}function q(){var e=V(),t=G(),n=C();return e&&t&&n}function X(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function B(){return!(!q()||!X())}function F(){var e=H(),t=N(),n=V(),i=G(),r=U(),o=!r&&i&&n&&t&&e;return o}function W(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function Y(){return!(!F()||!W())}function V(){return We===n.fingers||n.fingers===w||!k}function G(){return 0!==Ye[0].end.x}function Z(){return!!n.tap}function J(){return!!n.doubleTap}function K(){return!!n.longTap}function $(){if(null==Ke)return!1;var e=Le();return J()&&e-Ke<=n.doubleTapThreshold}function ee(){return $()}function te(){return(1===We||!k)&&(isNaN(Re)||Re<n.threshold)}function ne(){return Ne>n.longTapThreshold&&b>Re}function ie(){return!(!te()||!Z())}function re(){return!(!$()||!J())}function oe(){return!(!ne()||!K())}function ae(){Ze=Le(),Je=event.touches.length+1}function ue(){Ze=0,Je=0}function le(){var e=!1;if(Ze){var t=Le()-Ze;t<=n.fingerReleaseThreshold&&(e=!0)}return e}function se(){return!(Be.data(O+"_intouch")!==!0)}function ce(e){e===!0?(Be.bind(Ae,z),Be.bind(Pe,j),Ie&&Be.bind(Ie,P)):(Be.unbind(Ae,z,!1),Be.unbind(Pe,j,!1),Ie&&Be.unbind(Ie,P,!1)),Be.data(O+"_intouch",e===!0)}function de(e,t){var n=void 0!==t.identifier?t.identifier:0;return Ye[e].identifier=n,Ye[e].start.x=Ye[e].end.x=t.pageX||t.clientX,Ye[e].start.y=Ye[e].end.y=t.pageY||t.clientY,Ye[e]}function pe(e){var t=void 0!==e.identifier?e.identifier:0,n=fe(t);return n.end.x=e.pageX||e.clientX,n.end.y=e.pageY||e.clientY,n}function fe(e){for(var t=0;t<Ye.length;t++)if(Ye[t].identifier==e)return Ye[t]}function he(){for(var e=[],t=0;5>=t;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}function ge(e,t){t=Math.max(t,ve(e)),Xe[e].distance=t}function ve(e){return Xe[e]?Xe[e].distance:void 0}function me(){var e={};return e[i]=we(i),e[r]=we(r),e[o]=we(o),e[a]=we(a),e}function we(e){return{direction:e,distance:0}}function be(){return Ge-Ve}function ye(e,t){var n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+i*i))}function Te(e,t){var n=t/e*1;return n.toFixed(2)}function xe(){return 1>He?l:u}function Ee(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}function ke(e,t){var n=e.x-t.x,i=t.y-e.y,r=Math.atan2(i,n),o=Math.round(180*r/Math.PI);return 0>o&&(o=360-Math.abs(o)),o}function Se(e,t){var n=ke(e,t);return 45>=n&&n>=0?i:360>=n&&n>=315?i:n>=135&&225>=n?r:n>45&&135>n?a:o}function Le(){var e=new Date;return e.getTime()}function Oe(t){t=e(t);var n=t.offset(),i={left:n.left,right:n.left+t.outerWidth(),top:n.top,bottom:n.top+t.outerHeight()};return i}function Me(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}var ze=k||L||!n.fallbackToMouseEvents,je=ze?L?S?"MSPointerDown":"pointerdown":"touchstart":"mousedown",Ae=ze?L?S?"MSPointerMove":"pointermove":"touchmove":"mousemove",Pe=ze?L?S?"MSPointerUp":"pointerup":"touchend":"mouseup",Ie=ze?null:"mouseleave",De=L?S?"MSPointerCancel":"pointercancel":"touchcancel",Re=0,_e=null,Ne=0,Ue=0,Ce=0,He=1,Qe=0,qe=0,Xe=null,Be=e(t),Fe="start",We=0,Ye=null,Ve=0,Ge=0,Ze=0,Je=0,Ke=0,$e=null,et=null;try{Be.bind(je,M),Be.bind(De,A)}catch(t){e.error("events not supported "+je+","+De+" on jQuery.swipe")}this.enable=function(){return Be.bind(je,M),Be.bind(De,A),Be},this.disable=function(){return I(),Be},this.destroy=function(){return I(),Be.data(O,null),Be},this.option=function(t,i){if(void 0!==n[t]){if(void 0===i)return n[t];n[t]=i}else e.error("Option "+t+" does not exist on jQuery.swipe.options");return null}}var i="left",r="right",o="up",a="down",u="in",l="out",s="none",c="auto",d="swipe",p="pinch",f="tap",h="doubletap",g="longtap",v="horizontal",m="vertical",w="all",b=10,y="start",T="move",x="end",E="cancel",k="ontouchstart"in window,S=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,L=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,O="TouchSwipe",M={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"};e.fn.swipe=function(n){var i=e(this),r=i.data(O);if(r&&"string"==typeof n){if(r[n])return r[n].apply(this,Array.prototype.slice.call(arguments,1));e.error("Method "+n+" does not exist on jQuery.swipe")}else if(!(r||"object"!=typeof n&&n))return t.apply(this,arguments);return i},e.fn.swipe.defaults=M,e.fn.swipe.phases={PHASE_START:y,PHASE_MOVE:T,PHASE_END:x,PHASE_CANCEL:E},e.fn.swipe.directions={LEFT:i,RIGHT:r,UP:o,DOWN:a,IN:u,OUT:l},e.fn.swipe.pageScroll={NONE:s,HORIZONTAL:v,VERTICAL:m,AUTO:c},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:w}}),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(e){var t={init:function(){var t=["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 n(){for(var e=0;e<t.length;e++)a.css(t[e],o.css(t[e]))}function i(){var e=o.val().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&/g,"&").replace(/\n/g,"<br/>");a.html(e+"&nbsp;"),r()}function r(){var e=a.height(),t="hidden",n=u?e+c+l:e+c;n>p?(n=p,t="auto"):d>n&&(n=d),o.height()!==n&&o.css({overflow:t,height:n+"px"})}if("textarea"!==this.type)return!1;var o=e(this).css({resize:"none",overflow:"hidden"}),a=e("<div></div>").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body);n();var u="border-box"==o.css("box-sizing")||"border-box"==o.css("-moz-box-sizing")||"border-box"==o.css("-webkit-box-sizing"),l=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(){i()}),e(window).bind("resize",function(){var e=parseInt(o.width(),10);a.width()!==e&&(a.css({width:e+"px"}),i())}),o.bind("blur",function(){r()}),o.bind("updateHeight",function(){n(),i()}),e(function(){i()})})}};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=jQuery.fn.data;jQuery.fn.data=function(t,i){if(t)switch(typeof t){case"object":for(var n in t)if(n.match(/ID$/)){var s=t[n];delete t[n],n=n.replace(/ID$/,"-id"),t[n]=s}arguments[0]=t;break;case"string":t.match(/ID$/)&&(arguments[0]=t.replace(/ID$/,"-id"))}var a=e.apply(this,arguments);if(void 0===t)for(var n in a)n.match(/Id$/)&&(a[n.replace(/Id$/,"ID")]=a[n],delete a[n]);return a},window.console||(window.console={});for(var t=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],i=0;i<t.length;i++)"undefined"==typeof console[t[i]]&&(console[t[i]]=function(){});"undefined"==typeof console.debug&&(console.debug=function(e){console.log(e)})}(),String.prototype.hashCode=function(){var e,t=0;if(this.length)for(var i=0,n=this.length;n>i;i++)e=this.charCodeAt(i),t=(t<<5)-t+e,t&=t;return t},window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),n-=1,t=e[n],e[n]=e[i],e[i]=t;return this},function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],i={browser:t[1]||"",version:t[2]||"0"},n={};i.browser&&(n[i.browser]=!0,n.version=i.version),n.chrome?n.webkit=!0:n.webkit&&(n.safari=!0),jQuery.browser=jQuery.browser||{},jQuery.browser=$.extend(jQuery.browser,n),jQuery.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0,jQuery.browser.smartphone="bottom"==$("html").css("caption-side"),jQuery.browser.mozilla&&e.match(/trident/)&&(jQuery.browser.mozilla=!1,jQuery.browser.msie=!0),jQuery.browser.iOS=/\((ipad|iphone|ipod);/.test(e),jQuery.browser.iOS&&$("html").addClass("iOS"),jQuery.browser.android=-1!==e.indexOf("android"),jQuery.browser.editor="redactor",jQuery.browser.ckeditor=!1,jQuery.browser.redactor=!0}(),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=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=0,t=this.get(0);if(document.selection){this.focus();var i=document.selection.createRange();i.moveStart("character",-this.val().length),e=i.text.length}else(t.selectionStart||"0"==t.selectionStart)&&(e=parseInt(t.selectionStart));return e},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=this.get(0);if(this.focus(),document.selection){var i=document.selection.createRange();i.moveStart("character",e),i.moveEnd("character",0),i.select()}else(t.selectionStart||"0"==t.selectionStart)&&(t.selectionStart=e,t.selectionEnd=e);return!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(){if("object"==typeof e||"undefined"==typeof e){var i=e;$(this).data("psID")||t.initialize(this,i)}else{var n=e;"update"===n?t.update(this):"destroy"===n&&t.destroy(this)}return 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{};i=i.split(";");for(var n=0,s=i.length;s>n;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;s>n;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,i="x"==e?t:3&t|8;return i.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 URL_LEGACY_MODE?e:e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var i=t.split(/([A-Z][a-z0-9]+)/),n="",s=0,a=i.length;a>s;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.remove(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){window.bc_wcfSimpleDropdown._toggle(null,e)},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,n},open:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].open(),!0):!1},close:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].close(),!0):!1},closeAll:function(){$.each(this._dropdownMenus,function(e,t){t.close()})}},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=null;if(n.staticDropdown===!0)this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",i).click(function(e){e.stopPropagation()});else{this._container=$('<div class="interactiveDropdown" data-source="'+i+'" />').click(function(e){e.stopPropagation()});var a=$('<div class="interactiveDropdownHeader" />').appendTo(this._container);$('<span class="interactiveDropdownTitle">'+n.title+"</span>").appendTo(a),this._linkList=$('<ul class="interactiveDropdownLinks"></ul>').appendTo(a),s=$('<div class="interactiveDropdownItemsContainer" />').appendTo(this._container),this._itemList=$('<ul class="interactiveDropdownItems" />').appendTo(s),$('<a href="'+n.showAllLink+'" class="interactiveDropdownShowAll">'+WCF.Language.get("wcf.user.panel.showAll")+"</a>").appendTo(this._container)}this._pointer=$('<span class="pointer"><span /></span>').appendTo(this._container),$.browser.mobile||null===s||s.perfectScrollbar({suppressScrollX:!0}),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._container.addClass("open"),this.render()},close:function(){this._container.removeClass("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(){var e=WCF.Language.get("wcf.global.pageDirection");"bottom"===$("html").css("caption-side")?this._renderMobile(e):this._renderDesktop(e)},rebuildScrollbar:function(){if(!$.browser.mobile){var e=this._itemList.parent();e.perfectScrollbar("destroy"),e.perfectScrollbar({suppressScrollX:!0})}},_renderMobile:function(e){var t=this._triggerElement.getDimensions("outer"),i=Math.floor(t.width/2),n=this._triggerElement.getOffsets("offset"),s=Math.floor(this._pointer.outerWidth()/2);this._container.css({top:n.top+t.height+"px"}),this._pointer.css({left:n.left+i-s+"px"})},_renderDesktop:function(e){var t=this._triggerElement.getDimensions("outer"),i=this._triggerElement.getOffsets("offset"),n=this._container.getDimensions(),s=$(window).width(),a=null,o=null;"ltr"===e?(a=this._getPositionLeft(i,n,s),a.result||(o=this._getPositionRight(i,n,t,s),o.result?a=null:o=null)):(o=this._getPositionRight(i,n,t,s),o.result||(a=this._getPositionLeft(i,n,s),a.result?o=null:a=null)),null===o?(this._container.css({left:a.left+"px",top:i.top+t.height+"px"}),this._pointer.css({left:this._options.pointerOffset?this._options.pointerOffset:"4px"})):(this._container.css({right:o.right+"px",top:i.top+t.height+"px"}),this._pointer.css({right:this._options.pointerOffset?this._options.pointerOffset:"4px"}))},_getPositionLeft:function(e,t,i){var n=e.left,s=e.left+t.width;return{left:n,result:i>s}},_getPositionRight:function(e,t,i,n){var s=e.left+i.width-t.width,a=n-(e.left+i.width);return{result:s>0,right:a}}}),WCF.Clipboard={init:function(e,t,i,n){require(["WoltLab/WCF/Controller/Clipboard"],function(i){i.setup({hasMarkedItems:t>0,pageClassName:e,pageObjectId:n})})},reload:function(){require(["WoltLab/WCF/Controller/Clipboard"],function(e){e.reload()})}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){return $.isFunction(e)?(this._callback=e,this._interval=t,void this.resume()):void 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(["WoltLab/WCF/Ajax/Status"],function(e){e.show()})},hide:function(){require(["WoltLab/WCF/Ajax/Status"],function(e){e.hide()})},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("icon-spinner"),e.hasClass("icon")&&e[i]("icon-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(e){this._ajaxRequest=null,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/AJAXProxy/?t="+SECURITY_TOKEN+SID_ARG_2ND,aborted:null,autoAbortPrevious:!1},e),"jsonp"===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,autoAbort:e.autoAbortPrevious,ignoreError:e.suppressErrors,silent:e.suppressErrors,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:"",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i?i:".jsDeleteButton",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=$(t),n=i.wcfIdentify();if(!WCF.inArray(n,this._containers)){var s=i.find(this._buttonSelector);s.length&&(this._containers.push(n),s.click($.proxy(this._click,this)))}}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy(this._execute,this),{target:t}):(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.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);if(WCF.inArray(n.data("objectID"),e)){var s=this;i.wcfBlindOut("up",function(){var e=$(this).remove();s._containers.splice(s._containers.indexOf(e.wcfIdentify()),1),s._didTriggerEffect(e),n.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",n.data("eventName"),{button:n,container:e})})}}}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]);if(WCF.inArray(i.find(this._buttonSelector).data("objectID"),e))if(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);else{var 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?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("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy(this._execute,this),{target:t}):(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),t.hasClass("icon-check-empty")?(t.removeClass("icon-check-empty").addClass("icon-check"),i=t.data("disableTitle")?t.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"),t.attr("title",i)):(t.removeClass("icon-check").addClass("icon-check-empty"),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){return this._threshold=parseInt(e),0===this._threshold?void console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting."):($.isFunction(t)&&(this._callback=t),null===this._callback?void console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting."):(this._reference=$(i?i:window),this._target=$(n?n:document),this.start(),void this._scroll()))},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop(),i=this._reference.height();e-(i+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?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=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+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){var i=this._variables[t],n={key:t,value:i};e(n)}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(e,t){require(["WoltLab/WCF/Language"],function(i){i.add(e,t)})},addObject:function(e){require(["WoltLab/WCF/Language"],function(t){t.addObject(e)})},get:function(e,t){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.MultipleLanguageInput=Class.extend({_availableLanguages:{},_button:null,_didInit:!1,_element:null,_insertedDataAfterInit:!1,_isEnabled:!1,_forceSelection:!1,_languageID:0,_list:null,_values:null,init:function(e,t,i,n){if(this._button=null,this._element=$("#"+$.wcfEscapeID(e)),this._forceSelection=t,this._values=i,this._availableLanguages=n,$.getLength(this._values))for(var s in this._values)this._values[s]=WCF.String.unescapeHTML(this._values[s]);if(this._languageID=LANGUAGE_ID,0==this._element.length)return void console.debug("[WCF.MultipleLanguageInput] element id '"+e+"' is unknown");var a=$.getLength(this._values)>0?!0:!1;this._insertedDataAfterInit=a,this._prepareElement(a),this._element.parents("form").submit($.proxy(this._submit,this)),this._didInit=!0},_prepareElement:function(e){this._element.wrap('<div class="dropdown preInput" />');var t=this._element.parent();this._button=$('<p class="button dropdownToggle"><span>'+WCF.Language.get("wcf.global.button.disabledI18n")+"</span></p>").prependTo(t),this._list=$('<ul class="dropdownMenu"></ul>').insertAfter(this._button),this._button.nextAll("textarea").length?this._button.addClass("dropdownCaptionTextarea"):this._button.addClass("dropdownCaption");for(var i in this._availableLanguages)$("<li><span>"+this._availableLanguages[i]+"</span></li>").data("languageID",i).click($.proxy(this._changeLanguage,this)).appendTo(this._list);this._forceSelection||($('<li class="dropdownDivider" />').appendTo(this._list),$("<li><span>"+WCF.Language.get("wcf.global.button.disabledI18n")+"</span></li>").click($.proxy(this._disable,this)).appendTo(this._list)),WCF.Dropdown.initDropdown(this._button,e),(e||this._forceSelection)&&(this._isEnabled=!0,this._list.children("li").each($.proxy(function(e,t){var i=$(t);i.data("languageID")==this._languageID&&i.trigger("click")},this))),WCF.Dropdown.registerCallback(t.wcfIdentify(),$.proxy(this._handleAction,this))},_handleAction:function(e,t){"open"===t?this._enable():this._closeSelection()},_enable:function(e){if(!this._isEnabled){var t=this._button.is("p")?this._button.children("span:eq(0)"):this._button;t.addClass("active"),this._isEnabled=!0}this._list.is(":visible")&&this._showSelection()},_showSelection:function(){this._isEnabled&&this._list.children("li").each($.proxy(function(e,t){var i=$(t),n=i.data("languageID");n&&(this._values[n]&&""!=this._values[n]?i.removeClass("missingValue"):i.addClass("missingValue"))},this))},_closeSelection:function(){this._disable()},_changeLanguage:function(e){var t=$(e.currentTarget);this._insertedDataAfterInit=!0,this._didInit&&(this._values[this._languageID]=this._element.val()),this._languageID=t.data("languageID"),this._values[this._languageID]?this._element.val(this._values[this._languageID]):this._element.val(""),this._list.children("li").removeClass("active"),t.addClass("active"),this._button.children("span").addClass("active").text(this._availableLanguages[this._languageID]),this._didInit&&this._element.blur().focus()},_disable:function(e){void 0===e&&this._insertedDataAfterInit&&(e=null),!this._forceSelection&&this._list&&null!==e&&(this._button.children("span").removeClass("active").text(WCF.Language.get("wcf.global.button.disabledI18n")),this._values[LANGUAGE_ID]?this._element.val(this._values[LANGUAGE_ID]):this._element.val(),e&&(this._list.children("li").removeClass("active"),$(e.currentTarget).addClass("active")),this._element.blur().focus(),this._insertedDataAfterInit=!1,this._isEnabled=!1,this._values={})},_submit:function(){if(!this._isEnabled)return 3735928559;this._languageID&&(this._values[this._languageID]=this._element.val());var e=$(this._element.parents("form")[0]),t=this._element.wcfIdentify();for(var i in this._availableLanguages)void 0===this._values[i]&&(this._values[i]=""),$('<input type="hidden" name="'+t+"_i18n["+i+']" value="'+WCF.String.escapeHTML(this._values[i])+'" />').appendTo(e);this._element.removeAttr("name")}}),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){e=String(WCF.Number.round(e,t||2));var i=e.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(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")}},WCF.TabMenu={_containers:{},_didInit:!1,init:function(){return void require(["WoltLab/WCF/Ui/TabMenu"],function(e){e.setup()})},reload:function(){this._containers={},this.init()},_selectErroneousTab:function(){var e=!1;for(var t in this._containers){var i=this._containers[t];if(i.find(".formError").length&&(e=!0,!i.data("isParent"))){for(;;){if(i.data("parent")===!1)break;i=i.data("parent").wcfTabs("selectTab",i.wcfIdentify())}return!0}}if(e)for(var t in this._containers){var i=this._containers[t],n=i.find(".formError:eq(0)");if(n.length){for(i.wcfTabs("selectTab",n.parents(".tabMenuContent").wcfIdentify());;){if(i.data("parent")===!1)break;i=i.data("parent").wcfTabs("selectTab",i.wcfIdentify())}return!0}}return!1},_selectActiveTab:function(){for(var e in this._containers){var t=this._containers[e];if(t.data("active")){var i=t.data("active"),n=null;if(/-/.test(i)){var s=i.split("-");i=s[0],n=s[1]}t.find(".tabMenuContent").each(function(e,s){var a=$(s);return a.wcfIdentify()==i?(t.wcfTabs("select",e),null!==n&&(a.hasClass("tabMenuContainer")?a.wcfTabs("selectTab",t.data("active")):t.wcfTabs("selectTab",t.data("active"))),!1):void 0})}}},selectTabs:function(){if(location.hash){var e=location.hash.substr(1),t=$("#"+$.wcfEscapeID(e));if(1===t.length&&t.hasClass("ui-tabs-panel")&&(t=t.parent(".ui-tabs"),t.length))return t.wcfTabs("selectTab",e),t.hasClass("ui-tabs-panel")&&(e=t.wcfIdentify(),t=t.parent(".ui-tabs"),t.length&&t.wcfTabs("selectTab",e)),!0}return!1}},WCF.Template=Class.extend({init:function(e){var t=new WCF.Dictionary,i=0;e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n"),e=e.replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy(function(e){var i="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return t.add(i,e.replace(/\{\/?literal\}/g,"")),i},this)),e=e.replace(/\{\*.*?\*\}/g,"");var n=function(e){for(var t=e.split(""),i={},n=!0,s="",a="",o=!1,r=!1,l=!1,c=0,h=t.length;h>c;c++){var d=t[c];n&&"="!=d&&" "!=d?s+=d:n&&"="==d?(n=!1,r=!1,o=!1,l=!1):n||r||o||" "!=d?n||!r||l||"'"!=d?n||r||o||"'"!=d?n||!o||l||'"'!=d?n||r||o||'"'!=d?n||!o&&!r||l||"\\"!=d?n||(l=!1,a+=d):(l=!0,a+=d):(o=!0,a+=d):(o=!1,a+=d):(r=!0,a+=d):(r=!1,a+=d):(n=!0,i[s]=a,a=s="")}if(i[s]=a,o||r||l)throw new Error('Syntax error in parameterList: "'+e+'"');return i},s=function(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")};e=e.replace(/\{(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.escapeHTML("+t+") + '"}).replace(/\{#(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.formatNumeric("+t+") + '"}).replace(/\{@(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + "+t+" + '"}).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=n(t);if("undefined"==typeof 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 t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\nif ("+t+") {\n  $output += '"}).replace(/\{else ?if (.+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\n}\nelse if ("+t+") {\n       $output += '"}).replace(/\{implode (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var s=n(t);if("undefined"==typeof s.from)throw new Error("Missing from attribute in implode-tag");if("undefined"==typeof s.item)throw new Error("Missing item attribute in implode-tag");return"undefined"==typeof s.glue&&(s.glue="', '"),s.from=s.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+i+" = false;\nfor ($implodeKey_"+i+" in "+s.from+") {\n      v["+s.item+"] = "+s.from+"[$implodeKey_"+i+"];\n"+("undefined"!=typeof s.key?"          v["+s.key+"] = $implodeKey_"+i+";\n":"")+"      if ($implode_"+i+") $output += "+s.glue+";\n    $implode_"+i+" = true;\n        $output += '"}).replace(/\{foreach (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var s=n(t);if("undefined"==typeof s.from)throw new Error("Missing from attribute in foreach-tag");if("undefined"==typeof s.item)throw new Error("Missing item attribute in foreach-tag");return s.from=s.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+i+" = false;\nfor ($foreachKey_"+i+" in "+s.from+") {\n     $foreach_"+i+" = true;\n        break;\n}\nif ($foreach_"+i+") {\n      for ($foreachKey_"+i+" in "+s.from+") {\n               v["+s.item+"] = "+s.from+"[$foreachKey_"+i+"];\n"+("undefined"!=typeof s.key?"          v["+s.key+"] = $foreachKey_"+i+";\n":"")+"              $output += '"}).replace(/\{foreachelse\}/g,"';\n        }\n}\nelse {\n  {\n             $output += '").replace(/\{\/foreach\}/g,"';\n   }\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n       $output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '");for(var a in WCF.Template.callbacks)e=WCF.Template.callbacks[a](e);e=e.replace("{ldelim}","{").replace("{rdelim}","}"),t.each(function(t){e=e.replace(t.key,t.value)}),e="$output += '"+e+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+e+" return $output;")}catch(t){throw console.debug("var $output = ''; "+e+" return $output;"),t}},fetch:function(e){}}),WCF.Template.callbacks=[],WCF.ToggleOptions=Class.extend({_element:null,
+(function (window, undefined) {"use strict";function wcfEval(expression){return eval(expression)}!function(){var e=jQuery.fn.data;jQuery.fn.data=function(t,i){if(t)switch(typeof t){case"object":for(var n in t)if(n.match(/ID$/)){var s=t[n];delete t[n],n=n.replace(/ID$/,"-id"),t[n]=s}arguments[0]=t;break;case"string":t.match(/ID$/)&&(arguments[0]=t.replace(/ID$/,"-id"))}var a=e.apply(this,arguments);if(void 0===t)for(var n in a)n.match(/Id$/)&&(a[n.replace(/Id$/,"ID")]=a[n],delete a[n]);return a},window.console||(window.console={});for(var t=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],i=0;i<t.length;i++)"undefined"==typeof console[t[i]]&&(console[t[i]]=function(){});"undefined"==typeof console.debug&&(console.debug=function(e){console.log(e)})}(),String.prototype.hashCode=function(){var e,t=0;if(this.length)for(var i=0,n=this.length;n>i;i++)e=this.charCodeAt(i),t=(t<<5)-t+e,t&=t;return t},window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),n-=1,t=e[n],e[n]=e[i],e[i]=t;return this},function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],i={browser:t[1]||"",version:t[2]||"0"},n={};i.browser&&(n[i.browser]=!0,n.version=i.version),n.chrome?n.webkit=!0:n.webkit&&(n.safari=!0),jQuery.browser=jQuery.browser||{},jQuery.browser=$.extend(jQuery.browser,n),jQuery.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0,jQuery.browser.smartphone="bottom"==$("html").css("caption-side"),jQuery.browser.mozilla&&e.match(/trident/)&&(jQuery.browser.mozilla=!1,jQuery.browser.msie=!0),jQuery.browser.iOS=/\((ipad|iphone|ipod);/.test(e),jQuery.browser.iOS&&$("html").addClass("iOS"),jQuery.browser.android=-1!==e.indexOf("android"),jQuery.browser.editor="redactor",jQuery.browser.ckeditor=!1,jQuery.browser.redactor=!0}(),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=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=0,t=this.get(0);if(document.selection){this.focus();var i=document.selection.createRange();i.moveStart("character",-this.val().length),e=i.text.length}else(t.selectionStart||"0"==t.selectionStart)&&(e=parseInt(t.selectionStart));return e},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=this.get(0);if(this.focus(),document.selection){var i=document.selection.createRange();i.moveStart("character",e),i.moveEnd("character",0),i.select()}else(t.selectionStart||"0"==t.selectionStart)&&(t.selectionStart=e,t.selectionEnd=e);return!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(){if("object"==typeof e||"undefined"==typeof e){var i=e;$(this).data("psID")||t.initialize(this,i)}else{var n=e;"update"===n?t.update(this):"destroy"===n&&t.destroy(this)}return 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{};i=i.split(";");for(var n=0,s=i.length;s>n;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;s>n;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,i="x"==e?t:3&t|8;return i.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 URL_LEGACY_MODE?e:e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var i=t.split(/([A-Z][a-z0-9]+)/),n="",s=0,a=i.length;a>s;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.remove(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){window.bc_wcfSimpleDropdown._toggle(null,e)},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,n},open:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].open(),!0):!1},close:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].close(),!0):!1},closeAll:function(){$.each(this._dropdownMenus,function(e,t){t.close()})}},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=null;if(n.staticDropdown===!0)this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",i).click(function(e){e.stopPropagation()});else{this._container=$('<div class="interactiveDropdown" data-source="'+i+'" />').click(function(e){e.stopPropagation()});var a=$('<div class="interactiveDropdownHeader" />').appendTo(this._container);$('<span class="interactiveDropdownTitle">'+n.title+"</span>").appendTo(a),this._linkList=$('<ul class="interactiveDropdownLinks"></ul>').appendTo(a),s=$('<div class="interactiveDropdownItemsContainer" />').appendTo(this._container),this._itemList=$('<ul class="interactiveDropdownItems" />').appendTo(s),$('<a href="'+n.showAllLink+'" class="interactiveDropdownShowAll">'+WCF.Language.get("wcf.user.panel.showAll")+"</a>").appendTo(this._container)}this._pointer=$('<span class="pointer"><span /></span>').appendTo(this._container),$.browser.mobile||null===s||s.perfectScrollbar({suppressScrollX:!0}),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._container.addClass("open"),this.render()},close:function(){this._container.removeClass("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(){var e=WCF.Language.get("wcf.global.pageDirection");"bottom"===$("html").css("caption-side")?this._renderMobile(e):this._renderDesktop(e)},rebuildScrollbar:function(){if(!$.browser.mobile){var e=this._itemList.parent();e.perfectScrollbar("destroy"),e.perfectScrollbar({suppressScrollX:!0})}},_renderMobile:function(e){var t=this._triggerElement.getDimensions("outer"),i=Math.floor(t.width/2),n=this._triggerElement.getOffsets("offset"),s=Math.floor(this._pointer.outerWidth()/2);this._container.css({top:n.top+t.height+"px"}),this._pointer.css({left:n.left+i-s+"px"})},_renderDesktop:function(e){var t=this._triggerElement.getDimensions("outer"),i=this._triggerElement.getOffsets("offset"),n=this._container.getDimensions(),s=$(window).width(),a=null,o=null;"ltr"===e?(a=this._getPositionLeft(i,n,s),a.result||(o=this._getPositionRight(i,n,t,s),o.result?a=null:o=null)):(o=this._getPositionRight(i,n,t,s),o.result||(a=this._getPositionLeft(i,n,s),a.result?o=null:a=null)),null===o?(this._container.css({left:a.left+"px",top:i.top+t.height+"px"}),this._pointer.css({left:this._options.pointerOffset?this._options.pointerOffset:"4px"})):(this._container.css({right:o.right+"px",top:i.top+t.height+"px"}),this._pointer.css({right:this._options.pointerOffset?this._options.pointerOffset:"4px"}))},_getPositionLeft:function(e,t,i){var n=e.left,s=e.left+t.width;return{left:n,result:i>s}},_getPositionRight:function(e,t,i,n){var s=e.left+i.width-t.width,a=n-(e.left+i.width);return{result:s>0,right:a}}}),WCF.Clipboard={init:function(e,t,i,n){require(["WoltLab/WCF/Controller/Clipboard"],function(i){i.setup({hasMarkedItems:t>0,pageClassName:e,pageObjectId:n})})},reload:function(){require(["WoltLab/WCF/Controller/Clipboard"],function(e){e.reload()})}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){return $.isFunction(e)?(this._callback=e,this._interval=t,void this.resume()):void 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(["WoltLab/WCF/Ajax/Status"],function(e){e.show()})},hide:function(){require(["WoltLab/WCF/Ajax/Status"],function(e){e.hide()})},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("icon-spinner"),e.hasClass("icon")&&e[i]("icon-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(e){this._ajaxRequest=null,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/AJAXProxy/?t="+SECURITY_TOKEN+SID_ARG_2ND,aborted:null,autoAbortPrevious:!1},e),"jsonp"===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,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:"",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i?i:".jsDeleteButton",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=$(t),n=i.wcfIdentify();if(!WCF.inArray(n,this._containers)){var s=i.find(this._buttonSelector);s.length&&(this._containers.push(n),s.click($.proxy(this._click,this)))}}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy(this._execute,this),{target:t}):(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.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);if(WCF.inArray(n.data("objectID"),e)){var s=this;i.wcfBlindOut("up",function(){var e=$(this).remove();s._containers.splice(s._containers.indexOf(e.wcfIdentify()),1),s._didTriggerEffect(e),n.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",n.data("eventName"),{button:n,container:e})})}}}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]);if(WCF.inArray(i.find(this._buttonSelector).data("objectID"),e))if(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);else{var 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?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("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy(this._execute,this),{target:t}):(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),t.hasClass("icon-check-empty")?(t.removeClass("icon-check-empty").addClass("icon-check"),i=t.data("disableTitle")?t.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"),t.attr("title",i)):(t.removeClass("icon-check").addClass("icon-check-empty"),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){return this._threshold=parseInt(e),0===this._threshold?void console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting."):($.isFunction(t)&&(this._callback=t),null===this._callback?void console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting."):(this._reference=$(i?i:window),this._target=$(n?n:document),this.start(),void this._scroll()))},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop(),i=this._reference.height();e-(i+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?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=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+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){var i=this._variables[t],n={key:t,value:i};e(n)}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(e,t){require(["WoltLab/WCF/Language"],function(i){i.add(e,t)})},addObject:function(e){require(["WoltLab/WCF/Language"],function(t){t.addObject(e)})},get:function(e,t){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.MultipleLanguageInput=Class.extend({_availableLanguages:{},_button:null,_didInit:!1,_element:null,_insertedDataAfterInit:!1,_isEnabled:!1,_forceSelection:!1,_languageID:0,_list:null,_values:null,init:function(e,t,i,n){if(this._button=null,this._element=$("#"+$.wcfEscapeID(e)),this._forceSelection=t,this._values=i,this._availableLanguages=n,$.getLength(this._values))for(var s in this._values)this._values[s]=WCF.String.unescapeHTML(this._values[s]);if(this._languageID=LANGUAGE_ID,0==this._element.length)return void console.debug("[WCF.MultipleLanguageInput] element id '"+e+"' is unknown");var a=$.getLength(this._values)>0?!0:!1;this._insertedDataAfterInit=a,this._prepareElement(a),this._element.parents("form").submit($.proxy(this._submit,this)),this._didInit=!0},_prepareElement:function(e){this._element.wrap('<div class="dropdown preInput" />');var t=this._element.parent();this._button=$('<p class="button dropdownToggle"><span>'+WCF.Language.get("wcf.global.button.disabledI18n")+"</span></p>").prependTo(t),this._list=$('<ul class="dropdownMenu"></ul>').insertAfter(this._button),this._button.nextAll("textarea").length?this._button.addClass("dropdownCaptionTextarea"):this._button.addClass("dropdownCaption");for(var i in this._availableLanguages)$("<li><span>"+this._availableLanguages[i]+"</span></li>").data("languageID",i).click($.proxy(this._changeLanguage,this)).appendTo(this._list);this._forceSelection||($('<li class="dropdownDivider" />').appendTo(this._list),$("<li><span>"+WCF.Language.get("wcf.global.button.disabledI18n")+"</span></li>").click($.proxy(this._disable,this)).appendTo(this._list)),WCF.Dropdown.initDropdown(this._button,e),(e||this._forceSelection)&&(this._isEnabled=!0,this._list.children("li").each($.proxy(function(e,t){var i=$(t);i.data("languageID")==this._languageID&&i.trigger("click")},this))),WCF.Dropdown.registerCallback(t.wcfIdentify(),$.proxy(this._handleAction,this))},_handleAction:function(e,t){"open"===t?this._enable():this._closeSelection()},_enable:function(e){if(!this._isEnabled){var t=this._button.is("p")?this._button.children("span:eq(0)"):this._button;t.addClass("active"),this._isEnabled=!0}this._list.is(":visible")&&this._showSelection()},_showSelection:function(){this._isEnabled&&this._list.children("li").each($.proxy(function(e,t){var i=$(t),n=i.data("languageID");n&&(this._values[n]&&""!=this._values[n]?i.removeClass("missingValue"):i.addClass("missingValue"))},this))},_closeSelection:function(){this._disable()},_changeLanguage:function(e){var t=$(e.currentTarget);this._insertedDataAfterInit=!0,this._didInit&&(this._values[this._languageID]=this._element.val()),this._languageID=t.data("languageID"),this._values[this._languageID]?this._element.val(this._values[this._languageID]):this._element.val(""),this._list.children("li").removeClass("active"),t.addClass("active"),this._button.children("span").addClass("active").text(this._availableLanguages[this._languageID]),this._didInit&&this._element.blur().focus()},_disable:function(e){void 0===e&&this._insertedDataAfterInit&&(e=null),!this._forceSelection&&this._list&&null!==e&&(this._button.children("span").removeClass("active").text(WCF.Language.get("wcf.global.button.disabledI18n")),this._values[LANGUAGE_ID]?this._element.val(this._values[LANGUAGE_ID]):this._element.val(),e&&(this._list.children("li").removeClass("active"),$(e.currentTarget).addClass("active")),this._element.blur().focus(),this._insertedDataAfterInit=!1,this._isEnabled=!1,this._values={})},_submit:function(){if(!this._isEnabled)return 3735928559;this._languageID&&(this._values[this._languageID]=this._element.val());var e=$(this._element.parents("form")[0]),t=this._element.wcfIdentify();for(var i in this._availableLanguages)void 0===this._values[i]&&(this._values[i]=""),$('<input type="hidden" name="'+t+"_i18n["+i+']" value="'+WCF.String.escapeHTML(this._values[i])+'" />').appendTo(e);this._element.removeAttr("name")}}),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){e=String(WCF.Number.round(e,t||2));var i=e.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(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")}},WCF.TabMenu={_containers:{},_didInit:!1,init:function(){return void require(["WoltLab/WCF/Ui/TabMenu"],function(e){e.setup()})},reload:function(){this._containers={},this.init()},_selectErroneousTab:function(){var e=!1;for(var t in this._containers){var i=this._containers[t];if(i.find(".formError").length&&(e=!0,!i.data("isParent"))){for(;;){if(i.data("parent")===!1)break;i=i.data("parent").wcfTabs("selectTab",i.wcfIdentify())}return!0}}if(e)for(var t in this._containers){var i=this._containers[t],n=i.find(".formError:eq(0)");if(n.length){for(i.wcfTabs("selectTab",n.parents(".tabMenuContent").wcfIdentify());;){if(i.data("parent")===!1)break;i=i.data("parent").wcfTabs("selectTab",i.wcfIdentify())}return!0}}return!1},_selectActiveTab:function(){for(var e in this._containers){var t=this._containers[e];if(t.data("active")){var i=t.data("active"),n=null;if(/-/.test(i)){var s=i.split("-");i=s[0],n=s[1]}t.find(".tabMenuContent").each(function(e,s){var a=$(s);return a.wcfIdentify()==i?(t.wcfTabs("select",e),null!==n&&(a.hasClass("tabMenuContainer")?a.wcfTabs("selectTab",t.data("active")):t.wcfTabs("selectTab",t.data("active"))),!1):void 0})}}},selectTabs:function(){if(location.hash){var e=location.hash.substr(1),t=$("#"+$.wcfEscapeID(e));if(1===t.length&&t.hasClass("ui-tabs-panel")&&(t=t.parent(".ui-tabs"),t.length))return t.wcfTabs("selectTab",e),t.hasClass("ui-tabs-panel")&&(e=t.wcfIdentify(),t=t.parent(".ui-tabs"),t.length&&t.wcfTabs("selectTab",e)),!0}return!1}},WCF.Template=Class.extend({init:function(e){var t=new WCF.Dictionary,i=0;e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n"),e=e.replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy(function(e){var i="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return t.add(i,e.replace(/\{\/?literal\}/g,"")),i},this)),e=e.replace(/\{\*.*?\*\}/g,"");var n=function(e){for(var t=e.split(""),i={},n=!0,s="",a="",o=!1,r=!1,l=!1,c=0,h=t.length;h>c;c++){var d=t[c];n&&"="!=d&&" "!=d?s+=d:n&&"="==d?(n=!1,r=!1,o=!1,l=!1):n||r||o||" "!=d?n||!r||l||"'"!=d?n||r||o||"'"!=d?n||!o||l||'"'!=d?n||r||o||'"'!=d?n||!o&&!r||l||"\\"!=d?n||(l=!1,a+=d):(l=!0,a+=d):(o=!0,a+=d):(o=!1,a+=d):(r=!0,a+=d):(r=!1,a+=d):(n=!0,i[s]=a,a=s="")}if(i[s]=a,o||r||l)throw new Error('Syntax error in parameterList: "'+e+'"');return i},s=function(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")};e=e.replace(/\{(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.escapeHTML("+t+") + '"}).replace(/\{#(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.formatNumeric("+t+") + '"}).replace(/\{@(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + "+t+" + '"}).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=n(t);if("undefined"==typeof 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 t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\nif ("+t+") {\n     $output += '"}).replace(/\{else ?if (.+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\n}\nelse if ("+t+") {\n       $output += '"}).replace(/\{implode (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var s=n(t);if("undefined"==typeof s.from)throw new Error("Missing from attribute in implode-tag");if("undefined"==typeof s.item)throw new Error("Missing item attribute in implode-tag");return"undefined"==typeof s.glue&&(s.glue="', '"),s.from=s.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+i+" = false;\nfor ($implodeKey_"+i+" in "+s.from+") {\n      v["+s.item+"] = "+s.from+"[$implodeKey_"+i+"];\n"+("undefined"!=typeof s.key?"          v["+s.key+"] = $implodeKey_"+i+";\n":"")+"      if ($implode_"+i+") $output += "+s.glue+";\n    $implode_"+i+" = true;\n        $output += '"}).replace(/\{foreach (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var s=n(t);if("undefined"==typeof s.from)throw new Error("Missing from attribute in foreach-tag");if("undefined"==typeof s.item)throw new Error("Missing item attribute in foreach-tag");return s.from=s.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+i+" = false;\nfor ($foreachKey_"+i+" in "+s.from+") {\n     $foreach_"+i+" = true;\n        break;\n}\nif ($foreach_"+i+") {\n      for ($foreachKey_"+i+" in "+s.from+") {\n               v["+s.item+"] = "+s.from+"[$foreachKey_"+i+"];\n"+("undefined"!=typeof s.key?"          v["+s.key+"] = $foreachKey_"+i+";\n":"")+"              $output += '"}).replace(/\{foreachelse\}/g,"';\n        }\n}\nelse {\n  {\n             $output += '").replace(/\{\/foreach\}/g,"';\n   }\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n       $output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '");for(var a in WCF.Template.callbacks)e=WCF.Template.callbacks[a](e);e=e.replace("{ldelim}","{").replace("{rdelim}","}"),t.each(function(t){e=e.replace(t.key,t.value)}),e="$output += '"+e+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+e+" return $output;")}catch(t){throw console.debug("var $output = ''; "+e+" return $output;"),t}},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;t>e;e++){var i=this._showItems[e];$("#"+i).show()}for(var e=0,t=this._hideItems.length;t>e;e++){var 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),i=t.data("isOpen");i||$("#"+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")));return i?(n.stop().wcfBlindOut("vertical",$.proxy(function(){this._toggleImage(t)},this)),i=!1):(n.stop().wcfBlindIn("vertical",$.proxy(function(){this._toggleImage(t)},this)),i=!0),t.data("isOpen",i),e.stopPropagation(),!1},_toggleImage:function(e){var t=e.find("span.icon");e.data("isOpen")?t.removeClass("icon-chevron-right").addClass("icon-chevron-down"):t.removeClass("icon-chevron-down").addClass("icon-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=this._containers[e].data("isOpen"),n=$('<span class="collapsibleButton jsTooltip pointer icon icon16 icon-'+(i?"chevron-down":"chevron-right")+'" title="'+WCF.Language.get("wcf.global.button.collapsible")+'">').prependTo(t);return n.data("containerID",e).click($.proxy(this._toggleContainer,this)),n},_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("icon-chevron-down icon-chevron-right icon-spinner").addClass("icon-"+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){if(e.returnValues.containerID){var n=e.returnValues.containerID;if(this._containers[n]){this._containerData[n].isOpen=e.returnValues.isOpen?!0:!1;var s=e.returnValues.isOpen?"open":"close";this._updateContent(n,$.trim(e.returnValues.content),s),this._exchangeIcon(this._containerData[n].button,e.returnValues.isOpen?"chevron-down":"chevron-right")}}}}),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?!0:!1}}),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 n>s-a&&(n=s-a,0>n&&(n=0)),i===!0?$("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.Effect.SmoothScroll=WCF.Effect.Scroll.extend({init:function(){var e=this;$(document).on("click","a[href$=#top],a[href$=#bottom]",function(){var t=$(this.hash);return e.scrollTo(t,!0),!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(["WoltLab/WCF/Dom/Change/Listener"],function(e){e.add("__legacy__",t)})},_executeCallbacks:function(){require(["WoltLab/WCF/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){return this._bindListener(),this._callbacks.isset(e)?(console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+e+"' is already bound to a callback"),!1):void this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){if(window.MutationObserver){var e=new MutationObserver(function(e){var t=!1;e.forEach(function(e){e.removedNodes.length&&(t=!0)}.bind(this)),t&&this._executeCallbacks({})}.bind(this));e.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){option=$(option);var $disableOptions=eval(option.data("disableOptions")),$enableOptions=eval(option.data("enableOptions"));switch(option.getTagName()){case"input":switch(option.attr("type")){case"checkbox":this._execute(option.prop("checked"),$disableOptions,$enableOptions);break;case"radio":if(option.prop("checked")){var isActive=!0;option.data("isBoolean")&&1!=option.val()&&(isActive=!1),this._execute(isActive,$disableOptions,$enableOptions)}}break;case"select":var $value=option.val(),$disableOptions=$enableOptions=[];if(option.data("disableOptions").length>0)for(var $index in option.data("disableOptions")){var $item=option.data("disableOptions")[$index];$item.value==$value&&$disableOptions.push($item.option)}if(option.data("enableOptions").length>0)for(var $index in option.data("enableOptions")){var $item=option.data("enableOptions")[$index];$item.value==$value&&$enableOptions.push($item.option)}this._execute(!0,$disableOptions,$enableOptions)}},_execute:function(e,t,i){if(t.length>0)for(var n=0,s=t.length;s>n;n++){var a=t[n];if($.wcfIsset(a))this._enableOption(a,!e);else{var o=$("."+a+"Input");o.length&&this._enableOptions(o.children("dd").find("input, select, textarea"),!e)}}if(i.length>0)for(var n=0,s=i.length;s>n;n++){var a=i[n];if($.wcfIsset(a))this._enableOption(a,e);else{var o=$("."+a+"Input");o.length&&this._enableOptions(o.children("dd").find("input, select, textarea"),e)}}},_enableOption:function(e,t){this._enableOptionElement($("#"+$.wcfEscapeID(e)),t)},_enableOptionElement:function(e,t){e=$(e);var i=e.getTagName();"select"==i||"input"==i&&("checkbox"==e.attr("type")||"file"==e.attr("type")||"radio"==e.attr("type"))?t?e.enable():e.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;n>i;i++)this._enableOptionElement(e[i],t)}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(e,t){return this._bindListener(),this._callbacks.isset(e)?(console.debug("[WCF.PageVisibilityHandler] identifier '"+e+"' is already bound to a callback"),!1):void this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){var e=null;"undefined"!=typeof document.hidden?(this._hiddenFieldName="hidden",e="visibilitychange"):"undefined"!=typeof document.mozHidden?(this._hiddenFieldName="mozHidden",e="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this._hiddenFieldName="msHidden",e="msvisibilitychange"):"undefined"!=typeof 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){if(!this._isExecuting){this._isExecuting=!0;var 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,messageType:"info",refreshPage:!1,updatePageNumber:!1},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+t,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find("table tr."+this._rowClassName).length},_handleEmptyTable:function(){if(this._options.emptyMessage)this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage));else if(this._options.refreshPage)if(this._options.updatePageNumber){var e=window.location.href.match(/(\?|&)pageNo=(\d+)/g);if(e){var 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)}}else window.location.reload();else this._tableContainer.remove()},_remove:function(e){if($.getLength(e)){var t=$(e.target);if(t.hasClass(this._rowClassName)){var i=t.parents("tbody:eq(0)");1==i.children("tr").length&&this._handleEmptyTable()}}else 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,_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(e,t,i,n,s){return null===t||void 0===t||$.isFunction(t)?(this._callback=t?t:null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],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?!0:!1,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:s!==!0?!1:!0,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),void WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):void console.debug("[WCF.Search.Base] Selector '"+e+"' for search input is invalid, aborting.")):void console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var e=this;new WCF.PeriodicalExecuter(function(t){e._list.is(":visible")&&e._clearList(!1),t.stop()},250)},_keyDown:function(e){if(e.which===$.ui.keyCode.ENTER){var t=this._searchInput.parents(".dropdown");t.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){var i={data:{excludedSearchValues:this._excludedSearchValues,searchString:t}};if(this._delay){null!==this._timer&&this._timer.stop();var n=this;this._timer=new WCF.PeriodicalExecuter(function(){n._queryServer(i),n._timer.stop(),n._timer=null},this._delay)}else this._queryServer(i)}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?!0:(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(e){var t=$.trim(this._searchInput.val());if(this._commaSeperated){var i=e.keyCode||e.which;if(i==$.ui.keyCode.COMMA)return"";for(var n=t.split(","),s=n.length,a=0;s>a;a++)n[a]=$.trim(n[a]);for(var a=0;s>a;a++){var o=n[a];if(!this._oldSearchString[a]){t=o;break}if(o!=this._oldSearchString[a]){t=o,this._caretAt=a;break}}this._oldSearchString=n}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),this._itemIndex=-1,WCF.Dropdown.getDropdown(a).data("disableAutoFocus")||this._selectNextItem()},_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=!1,i=$(e.currentTarget);if(this._commaSeperated){var n=i.data("label");this._oldSearchString[this._caretAt]=n,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"});var s=this._searchInput.val().toLowerCase().indexOf(n.toLowerCase())+n.length;this._searchInput.focus().setCaret(s)}else null===this._callback?this._searchInput.val(i.data("label")):t=this._callback(i.data())===!0?!0:!1;this._clearList(t)},_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=this._super(e),i=null;if(e.icon?i=$(e.icon):this._includeUserGroups&&"group"===e.type&&(i=$('<span class="icon icon16 icon-group" />')),i){var n=t.find("span").detach(),s=$("<div />").addClass("box16").appendTo(t);s.append(i),s.append($("<div />").append(n))}return t.data("type",e.type),t}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(e,t){return $.isFunction(t)?void(WCF.inArray(e,this._loaded)?setTimeout(function(){t()},1):(this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t))):void console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+e+"' is invalid, aborting.")},setup:function(e,t){return $.isFunction(t)?(this._setupCallbacks[e]||(this._setupCallbacks[e]=[]),void this._setupCallbacks[e].push(t)):void 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;i>t;t++)this._setupCallbacks[e][t]();delete this._setupCallbacks[e]}if(this._loaded.push(e),this._callbacks[e]){for(var t=0,i=this._callbacks[e].length;i>t;t++)this._callbacks[e][t]();delete this._callbacks[e]}}},WCF.System.FlexibleMenu={init:function(){},registerMenu:function(e){require(["WoltLab/WCF/Ui/FlexibleMenu"],function(t){t.register(e)})},rebuild:function(e){require(["WoltLab/WCF/Ui/FlexibleMenu"],function(t){t.rebuild(e)})}},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={_captchas:{},addCallback:function(e,t){return $.isFunction(t)?void(this._captchas[e]=t):void console.debug("[WCF.System.Captcha] Given callback is no function")},getData:function(e){return void 0===this._captchas[e]?void console.debug('[WCF.System.Captcha] Unknow captcha id "'+e+'"'):this._captchas[e]()},removeCallback:function(e){delete this._captchas[e]}},WCF.System.Page={},WCF.System.Page.Multiple=Class.extend({_cache:{},_options:{},_pageNo:1,_pages:0,_previousPageNo:0,init:function(e){this._options=$.extend({container:null,pagination:null,loadItems:null},e),this._cache={},this._pageNo=1,this._pages=0,this._previousPageNo=0,this._pagination.data("pages")&&this._pagination.wcfPages({maxPage:this._pagination.data("pages")}).on("wcfpagesswitched",$.proxy(this._showPage,this))},_showPage:function(e,t){t&&t.activePage&&(t.template||(this._previousPageNo=this._pageNo),this._pageNo=t.activePage),this._cache[this._pageNo]||t&&t.template?(this._cache[this._previousPageNo]=this._list.children().detach(),t&&t.template?this._list.html(t.template):this._list.append(this._cache[this._pageNo])):this._options.loadItems()},showPage:function(e,t){this._showPage(null,{activePage:e,template:t})},getPageNo:function(){return this._pageNo}}),WCF.System.Notification=Class.extend({_callback:null,_cssClassNames:"",_message:"",_overlay:null,_timer:null,init:function(e,t){this._cssClassNames=t||"success",this._message=e||WCF.Language.get("wcf.global.success"),this._overlay=$("#systemNotification"),this._timer=null,this._overlay.length||(this._overlay=$('<div id="systemNotification"><p></p></div>').hide().appendTo(document.body),this._overlay.children("p").click(function(){this._hide()}.bind(this)))},show:function(e,t,i,n){t=parseInt(t),t||(t=2e3),e&&$.isFunction(e)&&(this._callback=e),this._overlay.children("p").html(i||this._message),this._overlay.children("p").removeClass().addClass(n||this._cssClassNames),this._timer=new WCF.PeriodicalExecuter($.proxy(this._hide,this),t),this._overlay.wcfFadeIn(void 0,300)},_hide:function(e){e=e?e:this._timer,null!==this._callback&&this._callback(),this._overlay.wcfFadeOut(void 0,300),e.stop(),e=null}}),WCF.System.Confirmation={show:function(e,t,i,n){require(["Ui/Confirmation"],function(s){s.show({legacyCallback:t,message:e,parameters:i,template:"object"==typeof n?n.html():""})})}},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(){if(0===this._depth){var 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?!0:!1}},WCF.System.PageNavigation={_button:null,_description:null,_dialog:null,_elementID:"",_elements:{},_pageNo:null,init:function(e,t){var i=$(e);if(i.length)return t=t||null,null===t||$.isFunction(t)?void this._initElements(i,t):void console.debug("[WCF.System.PageNavigation] Callback for selector '"+e+"' is invalid, aborting.")},_initElements:function(e,t){var i=this;e.each(function(e,t){var n=$(t),s=n.wcfIdentify();void 0===i._elements[s]&&(i._elements[s]=n,n.find("li.jumpTo").data("elementID",s).click($.proxy(i._click,i)))}).data("callback",t)},_click:function(e){if(this._elementID=$(e.currentTarget).data("elementID"),null===this._dialog){this._dialog=$('<div id="pageNavigationOverlay" />').hide().appendTo(document.body);var t=$("<fieldset><legend>"+WCF.Language.get("wcf.global.page.jumpTo")+"</legend></fieldset>").appendTo(this._dialog);$('<dl><dt><label for="jsPageNavigationPageNo">'+WCF.Language.get("wcf.global.page.jumpTo")+"</label></dt><dd></dd></dl>").appendTo(t),this._pageNo=$('<input type="number" id="jsPageNavigationPageNo" value="1" min="1" max="1" class="tiny" />').keyup($.proxy(this._keyUp,this)).appendTo(t.find("dd")),this._description=$("<small></small>").insertAfter(this._pageNo);var i=$('<div class="formSubmit" />').appendTo(this._dialog);this._button=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.submit")+"</button>").click($.proxy(this._submit,this)).appendTo(i)}this._button.enable(),this._description.html(WCF.Language.get("wcf.global.page.jumpTo.description").replace(/#pages#/,this._elements[this._elementID].data("pages"))),this._pageNo.val(this._elements[this._elementID].data("pages")).attr("max",this._elements[this._elementID].data("pages")),this._dialog.wcfDialog({title:WCF.Language.get("wcf.global.page.pageNavigation")})},_keyUp:function(e){if(e.which==$.ui.keyCode.ENTER&&!this._button.prop("disabled"))return void this._submit();var t=parseInt(this._pageNo.val())||0;1>t||t>this._pageNo.attr("max")?this._button.disable():this._button.enable()},_submit:function(){var e=this._elements[this._elementID];if(null===e.data("callback")){var t=e.data("link").replace(/pageNo=%d/,"pageNo="+this._pageNo.val());window.location=t}else e.data("callback")(this._pageNo.val()),this._dialog.wcfDialog("close")}},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={_listeners:{},addListener:function(e,t,i){"undefined"==typeof this._listeners[e]&&(this._listeners[e]={}),"undefined"==typeof this._listeners[e][t]&&(this._listeners[e][t]=[]);var n=WCF.getUUID();return this._listeners[e][t].push({callback:i,uuid:n}),n},removeListener:function(e,t,i){if(this._listeners[e]&&this._listeners[e][t])for(var n=0;n<this._listeners[e][t].length;n++)if(this._listeners[e][t][n].uuid==i)return this._listeners[e][t].splice(n,1),!0;return!1},removeAllListeners:function(e,t){return this._listeners[e]&&this._listeners[e][t]?(delete this._listeners[e][t],!0):!1},fireEvent:function(e,t,i){if(i=i||{},this._listeners[e]&&this._listeners[e][t])for(var n=0;n<this._listeners[e][t].length;n++)this._listeners[e][t][n].callback(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){if(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)if(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){var t=e.returnValues.parameters||{};t.loopCount=e.returnValues.loopCount,this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:t}),this._proxy.sendRequest()}else if(null!==this._callback)this._callback(this,e);else{this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check green"),this._dialog.find(".boxHeadline h1").text(WCF.Language.get("wcf.global.worker.completed"));var 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:[],init:function(e){var t=$(e);if(t.length){this._setOptions();for(var i="",n=0,s=this._options.length;s>n;n++)if(this._options[n].isQuickOption){i=this._options[n].optionName;break}var a=this;t.each(function(e,t){var n=$(t),s=n.wcfIdentify(),o=a._getTriggerElement(n);null!==o&&1===o.length&&(o.click($.proxy(a._show,a)).data("elementID",s),i&&o.disableSelection().data("optionName",i).dblclick($.proxy(a._click,a)),a._elements[s]=n)}),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")}},_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=$(e.currentTarget).data("elementID"),i=null;this._dropdowns[t]||(this._triggerElements[t]=i=this._getTriggerElement(this._elements[t]).addClass("dropdownToggle").wrap('<span class="dropdown" />'),this._dropdowns[t]=$('<ul class="dropdownMenu" />').insertAfter(i)),this._dropdowns[t].empty();for(var n=!1,s="",a=0,o=this._options.length;o>a;a++){var r=this._options[a];if("divider"===r.optionName)""!==s&&"divider"!==s&&($('<li class="dropdownDivider" />').appendTo(this._dropdowns[t]),s=r.optionName);else if(this._validate(t,r.optionName)||this._validateCallbacks(t,r.optionName)){var l=$("<li><span>"+r.label+"</span></li>").appendTo(this._dropdowns[t]);l.data("elementID",t).data("optionName",r.optionName).data("isQuickOption",r.isQuickOption?!0:!1).click($.proxy(this._click,this)),n=!0,s=r.optionName}}if(n){var c=this._dropdowns[t].children().last();c.hasClass("dropdownDivider")&&c.remove();var h=null,d=0;if(this._dropdowns[t].children().each(function(e,t){var i=$(t);i.hasClass("dropdownDivider")||(i.data("isQuickOption")?h=i:d++)}),!d)return h.trigger("click"),this._triggerElements[t]&&WCF.Dropdown.close(this._triggerElements[t].parents(".dropdown").wcfIdentify()),!1}return null!==i&&WCF.Dropdown.initDropdown(i,!0),!1},_validate:function(e,t){return!1},_validateCallbacks:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;i>n;n++)if(this._callbacks[n].validate(this._elements[e],t))return!0;return!1},_success:function(e,t,i){var n=this._updateData.length;n&&(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;i>n;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/AJAXUpload/?t="+SECURITY_TOKEN+SID_ARG_2ND},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){if(this._supportsAJAXUpload){this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this));var e=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>");e.prepend(this._fileUpload)}else{var e=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>");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){var n=null,s=[];if(t)s.push(t);else if(i){var a="";switch(i.type){case"image/png":a=".png";break;case"image/jpeg":a=".jpg";break;case"image/gif":a=".gif"}s.push({name:"pasted-from-clipboard"+a})}else s=this._fileUpload.prop("files");if(s.length){var o=new FormData;if(n=this._createUploadMatrix(s),!this._uploadMatrix[n].length)return null;for(var r=0,l=s.length;l>r;r++)if(this._uploadMatrix[n][r]){var c=this._uploadMatrix[n][r].data("internalFileID");i?o.append("__files["+c+"]",i,s[r].name):o.append("__files["+c+"]",s[r])}o.append("actionName",this._options.action),o.append("className",this._className);var h=this._getParameters();for(var d in h)o.append("parameters["+d+"]",h[d]);var u=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:o,contentType:!1,processData:!1,success:function(e,t,i){u._success(n,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){u._progress(n,e)},!1),e}})}return n},_createUploadMatrix:function(e){if(e.length){var t=this._uploadMatrix.length;this._uploadMatrix[t]=[];for(var i=0,n=e.length;n>i;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;i>t;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(e,t){var i=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:t,contentType:!1,processData:!1,success:function(t,n,s){i._success(e,t)},error:$.proxy(this._error,this),xhr:function(){var t=$.ajaxSettings.xhr();return t&&t.upload.addEventListener("progress",function(t){i._progress(e,t)},!1),t}})},_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){if(this._additionalParameters=a||{},this._containerID=$.wcfEscapeID(e),this._container=$("#"+this._containerID),this._className=t,this._offset=i?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,helper:"clone",items:"li:not(.sortableNoSorting)",opacity:.6,placeholder:"sortablePlaceholder",tolerance:"pointer",toleranceElement:"> span"},n||{}),s?$("#"+this._containerID+" .sortableList").sortable(this._options):$("#"+this._containerID+" > .sortableList").nestedSortable(this._options),this._className){var o=this._container.find(".formSubmit");if(!o.length&&(o=this._container.next(".formSubmit"),!o.length))return void console.debug("[WCF.Sortable.Simple] Unable to find form submit for saving, aborting.");o.children('button[data-type="submit"]').click($.proxy(this._submit,this))}},_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(e){$.browser.mobile||(this._activeElementID="",this._identifier=e,require(["WoltLab/WCF/Controller/Popover"],function(t){t.init({attributeName:"legacy",className:e,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){if(this._itemList=$(e),this._searchInput=$(t),this._data={},!this._itemList.length||!this._searchInput.length)return void console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.");if(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){var i=this;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)},_keyDown:function(e){return null===e?this._keyPress(null):!0},_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(){var e=$.trim(this._searchInput.val());e=e.split(",");for(var t=0,i=e.length;i>t;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){if(this._data[e.objectID]&&(0!==e.objectID||!this._allowCustomInput))return!0;var t=$('<li class="badge">'+WCF.String.escapeHTML(e.label)+"</li>").data("objectID",e.objectID).data("label",e.label).appendTo(this._itemList);return t.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({_callback:null,_dropdown:null,_input:null,init:function(e,t,i,n,s,a){var o=$("#"+e);if(1!=o.length)return void console.debug("[WCF.Language.Chooser] Invalid container id '"+e+"' given");if(this._input=$("#"+t),this._input.length||(this._input=$('<input type="hidden" name="'+t+'" value="'+i+'" />').appendTo(o)),void 0!==s){if(!$.isFunction(s))return void console.debug("[WCF.Language.Chooser] Given callback is invalid");this._callback=s}this._dropdown=$('<div class="dropdown" id="'+e+'-languageChooser" />').appendTo(o),$('<div class="dropdownToggle boxFlag box24" data-toggle="'+e+'-languageChooser"></div>').appendTo(this._dropdown);var r=$('<ul class="dropdownMenu" />').appendTo(this._dropdown);for(var l in n){var c=n[l],h=$('<li class="boxFlag"><a class="box24"><div class="framed"><img src="'+c.iconPath+'" alt="" class="iconFlag" /></div> <div><h3>'+c.languageName+"</h3></div></a></li>").appendTo(r);if(h.data("languageID",l).click($.proxy(this._click,this)),l==i){var d=$(""+h.html()),u=d.children().detach();this._dropdown.children(".dropdownToggle").empty().append(u)}}if(a){$('<li class="dropdownDivider" />').appendTo(r);var h=$("<li><a>"+WCF.Language.get("wcf.global.language.noSelection")+"</a></li>").data("languageID",0).click($.proxy(this._click,this)).appendTo(r);0===i&&this._dropdown.children(".dropdownToggle").empty().append(h.html())}else if(0===i){var p=$('<div><span class="icon icon24 fa-question" /></div> <div><h3>'+WCF.Language.get("wcf.global.language.noSelection")+"</h3></div>");this._dropdown.children(".dropdownToggle").empty().append(p)}WCF.Dropdown.destroy(e+"-languageChooser"),WCF.Dropdown.init()},_click:function(e){var t=$(e.currentTarget),i=t.data("languageID");this._input.val(i);var n=$(""+t.html()),s=0===i?n:n.children().detach();this._dropdown.children(".dropdownToggle").empty().append(s),null!==this._callback&&this._callback(t)}}),WCF.Style={},WCF.UserPanel=Class.extend({_container:null,_didLoad:!1,_link:null,_noItems:"",_revertOnEmpty:!0,init:function(e){return this._container=$("#"+e),this._didLoad=!1,this._revertOnEmpty=!0,1!=this._container.length?void console.debug("[WCF.UserPanel] Unable to find container identfied by '"+e+"', aborting."):void this._convert()},_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){if(e=parseInt(e)||0){var t=this._container.find(".badge");t.length||(t=$('<span class="badge badgeInverse" />').appendTo(this._container.children(".dropdownToggle")),t.before(" ")),t.html(e)}else this._container.find(".badge").remove()},_after:function(e){}}),jQuery.fn.extend({wcfDialog:function(e){var t=arguments;require(["Dom/Util","Ui/Dialog"],function(i,n){var s=i.identify(this[0]);"close"===e?n.close(s):"render"===e?n.rebuild(s):"option"===e?3===t.length&&"title"===t[1]&&"string"==typeof t[2]&&n.setTitle(s,t[2]):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),n.openStatic(s,null,1===t.length&&"object"==typeof t[0]?t[0]:{}))}.bind(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,this._count>1&&this._initSlideshow()},_initSlideshow:function(){var e=$(this._items.get(0)).outerHeight();this._items.addClass("slideshowItem"),this._width=this.element.css("height",e).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy(function(t,i){$(i).show().css({height:e,left:(this._width+this.options.itemGap)*t,width:this._width})},this)),this.element.css({height:e,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element);for(var t=0;t<this._count;t++){var i=$('<li><a><span class="icon icon16 icon-circle" /></a></li>').data("index",t).click($.proxy(this._click,this)).appendTo(this._buttonList);0==t&&i.find(".icon").addClass("active")}this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var e=$(this._items.get(0)).css("height","auto"),t=e.outerHeight();this._items.css("height",t+"px"),this.element.css("height",t+"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(){if(this.options.cycle){null!==this._timer&&this._timer.stop();var e=this;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 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()")}}}),jQuery.fn.extend({wcfTabs:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLab/WCF/Ui/TabMenu"],function(n,s){var a=s.getTabMenu(n.identify(t));null!==a&&a[e].apply(a,i)})}}),$.widget("ui.wcfPages",{SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1,nextPage:null,previousPage:null},_create:function(){null===this.options.nextPage&&(this.options.nextPage=WCF.Language.get("wcf.global.page.next")),null===this.options.previousPage&&(this.options.previousPage=WCF.Language.get("wcf.global.page.previous")),this.element.addClass("pageNavigation"),this._render()},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.children().remove()},_render:function(){if(!this.options.disabled&&this.options.maxPage>1){var e=!1;this.element.hasClass("hidden")&&this.element.removeClass("hidden"),this.element.show(),this.element.children().remove();var t=$("<ul />");this.element.append(t);var i=$('<li class="button skip" />');if(t.append(i),this.options.activePage>1){var n=$("<a"+(null!=this.options.previousPage?' title="'+this.options.previousPage+'"':"")+"></a>");i.append(n),this._bindSwitchPage(n,this.options.activePage-1);var s=$('<span class="icon icon16 icon-double-angle-left" />');n.append(s)}else{var s=$('<span class="icon icon16 icon-double-angle-left" />');i.append(s),i.addClass("disabled").removeClass("button"),s.addClass("disabled")}t.append(this._renderLink(1));var a=this.SHOW_LINKS-4,o=this.options.activePage-2;0>o&&(o=0);var r=this.options.maxPage-(this.options.activePage+1);0>r&&(r=0),this.options.activePage>1&&this.options.activePage<this.options.maxPage&&a--;var l=a/2,c=this.options.activePage,h=this.options.activePage;1>c&&(c=1),1>h&&(h=1),h>this.options.maxPage-1&&(h=this.options.maxPage-1),o>=l?c-=l:(c-=o,h+=l-o),r>=l?h+=l:(h+=r,c-=l-r),h=Math.ceil(h),c=Math.ceil(c),1>c&&(c=1),h>this.options.maxPage&&(h=this.options.maxPage),c>1&&(2>c-1?t.append(this._renderLink(2)):($('<li class="button jumpTo"><a title="'+WCF.Language.get("wcf.global.page.jumpTo")+'" class="jsTooltip">...</a></li>').appendTo(t),e=!0));for(var d=c+1;h>d;d++)t.append(this._renderLink(d));h<this.options.maxPage&&(this.options.maxPage-h<2?t.append(this._renderLink(this.options.maxPage-1)):($('<li class="button jumpTo"><a title="'+WCF.Language.get("wcf.global.page.jumpTo")+'" class="jsTooltip">...</a></li>').appendTo(t),e=!0)),t.append(this._renderLink(this.options.maxPage));var u=$('<li class="button skip" />');if(t.append(u),this.options.activePage<this.options.maxPage){var p=$("<a"+(null!=this.options.nextPage?' title="'+this.options.nextPage+'"':"")+"></a>");u.append(p),this._bindSwitchPage(p,this.options.activePage+1);var _=$('<span class="icon icon16 icon-double-angle-right" />');p.append(_)}else{var _=$('<span class="icon icon16 icon-double-angle-right" />');u.append(_),u.addClass("disabled").removeClass("button"),_.addClass("disabled")}e&&(t.data("pages",this.options.maxPage),WCF.System.PageNavigation.init("#"+t.wcfIdentify(),$.proxy(function(e){this.switchPage(e)},this)))}else this.element.hide()},_renderLink:function(e,t){var i=$('<li class="button"></li>');if(void 0!=t&&t&&i.addClass("break"),e!=this.options.activePage){var n=$("<a>"+WCF.String.addThousandsSeparator(e)+"</a>");i.append(n),this._bindSwitchPage(n,e)}else{i.addClass("active");var s=$("<span>"+WCF.String.addThousandsSeparator(e)+'</span><span class="invisible">'+WCF.Language.get("wcf.page.pagePosition",{pageNo:e,pages:this.options.maxPage})+"</span>");i.append(s)}return i},_bindSwitchPage:function(e,t){var i=this;e.click(function(){i.switchPage(t)})},switchPage:function(e){this._setOption("activePage",e)},_setOption:function(e,t){if("activePage"==e){if(t!=this.options[e]&&t>0&&t<=this.options.maxPage){var i=this._trigger("shouldSwitch",void 0,{nextPage:t});i||void 0!==i?(this.options[e]=t,this._render(),this._trigger("switched",void 0,{activePage:t})):this._trigger("notSwitched",void 0,{activePage:t})}}else this.options[e]=t,"disabled"==e?t?this.element.children().remove():this._render():"maxPage"==e&&this._render();return this},_startInput:function(e){var t=$(e.currentTarget);t.is("a")||(t=t.parent("a")),t.hide();var i=t.parent("li").children("input").css("display","block").val("");i.focus()},_stopInput:function(e){var t=$(e.currentTarget);t.css("display","none");var i=t.parent("li");void 0!=i&&null!=i&&i.children("a").show()},_handleInput:function(e){var t=$.browser.msie&&"7.0"==$.browser.version;("keyup"!=e.type||t)&&(t&&(13!=e.which&&27!=e.which||"keyup"!=e.type)||(13==e.which&&this.switchPage(parseInt($(e.currentTarget).val())),(13==e.which||27==e.which)&&(this._stopInput(e),e.stopPropagation())))}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){var e=this;$(".jsCategory").each(function(t,i){var n=$(i).data("parentCategoryID",null).change($.proxy(e._updateSelection,e));e._categories[n.val()]=n;var s=[];n.parents("li").find(".jsChildCategory").each(function(t,i){var a=$(i).data("parentCategoryID",n.val()).change($.proxy(e._updateSelection,e));e._categories[a.val()]=a,s.push(a.val()),a.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;a>s;s++)this._categories[n[s]].prop("checked",!1)}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:null,_categories:{},init:function(e){return this._list=$("#"+e),this._buildStructure(),this._list.find("input:checked").each(function(){$(this).trigger("change")}),this._list.children("li").length<2?void this._list.addClass("flexibleCategoryListDisabled"):void($.browser.chrome&&(this._resize(),$(window).resize(this._resize.bind(this))))},_buildStructure:function(){var e=this;this._list.find(".jsCategory").each(function(t,i){var n=$(i).change(e._updateSelection.bind(e)),s=parseInt(n.val()),a=[];n.parents("li:eq(0)").find(".jsChildCategory").each(function(t,i){var s=$(i);s.data("parentCategory",n).change(e._updateSelection.bind(e));var o=parseInt(s.val());a.push(s);var r=[];s.parents("li:eq(0)").find(".jsSubChildCategory").each(function(t,i){var n=$(i);n.data("parentCategory",s).change(e._updateSelection.bind(e)),r.push(n)}),e._categories[o]=r}),e._categories[s]=a})},_resize:function(){var e=-1,t=0,i=this._list.children("li");i.each(function(n,s){if(-1===e||n+1===i.length||i[n+1].offsetLeft!=e){var a=$(s),o=a.outerHeight(!0),r=a.position();t=Math.max(t,r.top+o),e=s.offsetLeft}}),this._list.css("max-height",t+"px")},_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&&n.prop("checked","checked"));else{if(this._categories[i])for(var s=0,a=this._categories[i].length;a>s;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;c>l;l++)this._categories[r][l].prop("checked",!1)}if(n){for(var h=parseInt(n.val()),s=0,a=this._categories[h].length;a>s;s++)if(this._categories[h][s].prop("checked"))return;if(n=n.data("parentCategory")){h=parseInt(n.val());for(var s=0,a=this._categories[h].length;a>s;s++)if(this._categories[h][s].prop("checked"))return}}}}}),WCF.Condition={},WCF.Condition.PageControllerDependence=Class.extend({_pageControllerSelection:null,_supportedPageObjectTypeIDs:[],init:function(e,t){this._supportedPageObjectTypeIDs=t,this._pageControllerSelection=$("#pageControllers").change($.proxy(this._checkVisibility,this)),this._pageControllerContainer=this._pageControllerSelection.parents("dl:eq(0)"),this._fieldset=this._pageControllerContainer.parent("fieldset"),this._nextFieldset=this._fieldset.next("fieldset"),this._nextFieldset&&this._nextFieldset.data("margin-top",this._nextFieldset.css("margin-top")),this._input=$("#"+e),this._inputContainer=this._input.parents("dl:eq(0)"),this._checkVisibility()},_checkVisibility:function(){var e=this._pageControllerSelection.val()||[],t=!0;if(e.length){for(var i=0,n=e.length;n>i;i++)if(-1==this._supportedPageObjectTypeIDs.indexOf(parseInt(e[i]))){t=!1;break}}else t=!1;t?(this._inputContainer.show(),this._input.enable(),this._fieldset.show(),this._nextFieldset&&this._nextFieldset.css("margin-top",this._nextFieldset.data("margin-top"))):(this._inputContainer.hide(),this._input.disable(),this._fieldset.children("dl:visible").length||(this._fieldset.hide(),this._nextFieldset&&this._nextFieldset.css("margin-top",0)))}}),WCF.Notice={}; })(this);