87b376fb |
1 | // WCF.Combined.min.js -- DO NOT EDIT |
6f0b2d11 |
2 | |
0d20df38 |
3 | // 3rdParty/jquery.js |
e234e470 |
4 | (function (window, undefined) { !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,(function(e,t){"use strict";function n(e,t,n){var r,i=(t=t||qt).createElement("script");if(i.text=e,n)for(r in Xt)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function r(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Rt[It.call(e)]||"object":typeof e}function i(e){var t=!!e&&"length"in e&&e.length,n=r(e);return!_t(e)&&!zt(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function o(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function a(e,t,n){return _t(t)?Vt.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?Vt.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?Vt.grep(e,(function(e){return Mt.call(t,e)>-1!==n})):Vt.filter(t,e,n)}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function u(e){return e}function l(e){throw e}function c(e,t,n,r){var i;try{e&&_t(i=e.promise)?i.call(e).done(t).fail(n):e&&_t(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function f(){qt.removeEventListener("DOMContentLoaded",f),e.removeEventListener("load",f),Vt.ready()}function p(e,t){return t.toUpperCase()}function d(e){return e.replace(fe,"ms-").replace(pe,p)}function h(){this.expando=Vt.expando+h.uid++}function g(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(me,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ye.test(e)?JSON.parse(e):e)}(n)}catch(e){}ge.set(e,t,n)}else n=void 0;return n}function y(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return Vt.css(e,t,"")},u=s(),l=n&&n[3]||(Vt.cssNumber[t]?"":"px"),c=(Vt.cssNumber[t]||"px"!==l&&+u)&&xe.exec(Vt.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)Vt.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,Vt.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function m(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ce[r];return i||(t=n.body.appendChild(n.createElement(r)),i=Vt.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ce[r]=i,i)}function v(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=he.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&we(r)&&(i[o]=m(r))):"none"!==n&&(i[o]="none",he.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function x(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&o(e,t)?Vt.merge([e],n):n}function b(e,t){for(var n=0,r=e.length;n<r;n++)he.set(e[n],"globalEval",!t||he.get(t[n],"globalEval"))}function w(e,t,n,i,o){for(var a,s,u,l,c,f,p=t.createDocumentFragment(),d=[],h=0,g=e.length;h<g;h++)if((a=e[h])||0===a)if("object"===r(a))Vt.merge(d,a.nodeType?[a]:a);else if(Ne.test(a)){for(s=s||p.appendChild(t.createElement("div")),u=(ke.exec(a)||["",""])[1].toLowerCase(),l=De[u]||De._default,s.innerHTML=l[1]+Vt.htmlPrefilter(a)+l[2],f=l[0];f--;)s=s.lastChild;Vt.merge(d,s.childNodes),(s=p.firstChild).textContent=""}else d.push(t.createTextNode(a));for(p.textContent="",h=0;a=d[h++];)if(i&&Vt.inArray(a,i)>-1)o&&o.push(a);else if(c=Vt.contains(a.ownerDocument,a),s=x(p.appendChild(a),"script"),c&&b(s),n)for(f=0;a=s[f++];)Se.test(a.type||"")&&n.push(a);return p}function T(){return!0}function C(){return!1}function E(){try{return qt.activeElement}catch(e){}}function k(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)k(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=C;else if(!i)return e;return 1===o&&(a=i,i=function(e){return Vt().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=Vt.guid++)),e.each((function(){Vt.event.add(this,t,i,r,n)}))}function S(e,t){return o(e,"table")&&o(11!==t.nodeType?t:t.firstChild,"tr")&&Vt(e).children("tbody")[0]||e}function D(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function N(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function A(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(he.hasData(e)&&(o=he.access(e),a=he.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)Vt.event.add(t,i,l[i][n]);ge.hasData(e)&&(s=ge.access(e),u=Vt.extend({},s),ge.set(t,u))}}function j(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ee.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function q(e,t,r,i){t=Ot.apply([],t);var o,a,s,u,l,c,f=0,p=e.length,d=p-1,h=t[0],g=_t(h);if(g||p>1&&"string"==typeof h&&!Ft.checkClone&&Pe.test(h))return e.each((function(n){var o=e.eq(n);g&&(t[0]=h.call(this,n,o.html())),q(o,t,r,i)}));if(p&&(a=(o=w(t,e[0].ownerDocument,!1,e,i)).firstChild,1===o.childNodes.length&&(o=a),a||i)){for(u=(s=Vt.map(x(o,"script"),D)).length;f<p;f++)l=o,f!==d&&(l=Vt.clone(l,!0,!0),u&&Vt.merge(s,x(l,"script"))),r.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,Vt.map(s,N),f=0;f<u;f++)l=s[f],Se.test(l.type||"")&&!he.access(l,"globalEval")&&Vt.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?Vt._evalUrl&&Vt._evalUrl(l.src):n(l.textContent.replace(Me,""),c,l))}return e}function L(e,t,n){for(var r,i=t?Vt.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||Vt.cleanData(x(r)),r.parentNode&&(n&&Vt.contains(r.ownerDocument,r)&&b(x(r,"script")),r.parentNode.removeChild(r));return e}function H(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||Vt.contains(e.ownerDocument,e)||(a=Vt.style(e,t)),!Ft.pixelBoxStyles()&&Re.test(a)&&We.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function O(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function P(e){var t=Vt.cssProps[e];return t||(t=Vt.cssProps[e]=function(e){if(e in Xe)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ze.length;n--;)if((e=ze[n]+t)in Xe)return e}(e)||e),t}function M(e,t,n){var r=xe.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function R(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=Vt.css(e,n+be[a],!0,i)),r?("content"===n&&(u-=Vt.css(e,"padding"+be[a],!0,i)),"margin"!==n&&(u-=Vt.css(e,"border"+be[a]+"Width",!0,i))):(u+=Vt.css(e,"padding"+be[a],!0,i),"padding"!==n?u+=Vt.css(e,"border"+be[a]+"Width",!0,i):s+=Vt.css(e,"border"+be[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function I(e,t,n){var r=Ie(e),i=H(e,t,r),o="border-box"===Vt.css(e,"boxSizing",!1,r),a=o;if(Re.test(i)){if(!n)return i;i="auto"}return a=a&&(Ft.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===Vt.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+R(e,t,n||(o?"border":"content"),a,r,i)+"px"}function W(e,t,n,r,i){return new W.prototype.init(e,t,n,r,i)}function $(){Ve&&(!1===qt.hidden&&e.requestAnimationFrame?e.requestAnimationFrame($):e.setTimeout($,Vt.fx.interval),Vt.fx.tick())}function B(){return e.setTimeout((function(){Ue=void 0})),Ue=Date.now()}function F(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=be[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function _(e,t,n){for(var r,i=(z.tweeners[t]||[]).concat(z.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function z(e,t,n){var r,i,o=0,a=z.prefilters.length,s=Vt.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=Ue||B(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:Vt.extend({},t),opts:Vt.extend(!0,{specialEasing:{},easing:Vt.easing._default},n),originalProperties:t,originalOptions:n,startTime:Ue||B(),duration:n.duration,tweens:[],createTween:function(t,n){var r=Vt.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=d(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=Vt.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=z.prefilters[o].call(l,e,c,l.opts))return _t(r.stop)&&(Vt._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return Vt.map(c,_,l),_t(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),Vt.fx.timer(Vt.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function X(e){return(e.match(se)||[]).join(" ")}function U(e){return e.getAttribute&&e.getAttribute("class")||""}function V(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(se)||[]}function G(e,t,n,i){var o;if(Array.isArray(t))Vt.each(t,(function(t,r){n||at.test(e)?i(e,r):G(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)}));else if(n||"object"!==r(t))i(e,t);else for(o in t)G(e+"["+o+"]",t[o],n,i)}function Y(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(se)||[];if(_t(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Q(e,t,n,r){function i(s){var u;return o[s]=!0,Vt.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)})),u}var o={},a=e===vt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function J(e,t){var n,r,i=Vt.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&Vt.extend(!0,e,r),e}var K,Z,ee,te,ne,re,ie,oe,ae,se,ue,le,ce,fe,pe,de,he,ge,ye,me,ve,xe,be,we,Te,Ce,Ee,ke,Se,De,Ne,Ae,je,qe,Le,He,Oe,Pe,Me,Re,Ie,We,$e,Be,Fe,_e,ze,Xe,Ue,Ve,Ge,Ye,Qe,Je,Ke,Ze,et,tt,nt,rt,it,ot,at,st,ut,lt,ct,ft,pt,dt,ht,gt,yt,mt,vt,xt,bt,wt,Tt,Ct,Et,kt,St,Dt,Nt,At,jt=[],qt=e.document,Lt=Object.getPrototypeOf,Ht=jt.slice,Ot=jt.concat,Pt=jt.push,Mt=jt.indexOf,Rt={},It=Rt.toString,Wt=Rt.hasOwnProperty,$t=Wt.toString,Bt=$t.call(Object),Ft={},_t=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},zt=function(e){return null!=e&&e===e.window},Xt={type:!0,src:!0,noModule:!0},Ut="3.99.99",Vt=function(e,t){return new Vt.fn.init(e,t)},Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;return Vt.fn=Vt.prototype={jquery:Ut,constructor:Vt,length:0,toArray:function(){return Ht.call(this)},get:function(e){return null==e?Ht.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=Vt.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return Vt.each(this,e)},map:function(e){return this.pushStack(Vt.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(Ht.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:Pt,sort:jt.sort,splice:jt.splice},Vt.extend=Vt.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||_t(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(Vt.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&Vt.isPlainObject(n)?n:{},a[t]=Vt.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},Vt.extend({expando:"jQuery"+(Ut+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==It.call(e)||(t=Lt(e))&&("function"!=typeof(n=Wt.call(t,"constructor")&&t.constructor)||$t.call(n)!==Bt))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){n(e)},each:function(e,t){var n,r=0;if(i(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(Gt,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?Vt.merge(n,"string"==typeof e?[e]:e):Pt.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:Mt.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,o,a=0,s=[];if(i(e))for(r=e.length;a<r;a++)null!=(o=t(e[a],a,n))&&s.push(o);else for(a in e)null!=(o=t(e[a],a,n))&&s.push(o);return Ot.apply([],s)},guid:1,support:Ft}),"function"==typeof Symbol&&(Vt.fn[Symbol.iterator]=jt[Symbol.iterator]),Vt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){Rt["[object "+t+"]"]=t.toLowerCase()})),K=function(e){function t(e,t,n,r){var i,o,a,s,u,l,c,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:W)!==q&&j(t),t=t||q,H)){if(11!==h&&(u=ge.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&R(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!z[e+" "]&&(!O||!O.test(e))){if(1!==h)p=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,be):t.setAttribute("id",s=I),o=(l=E(e)).length;o--;)l[o]="#"+s+" "+d(l[o]);c=l.join(","),p=ye.test(e)&&f(t.parentNode)||t}if(c)try{return Q.apply(n,p.querySelectorAll(c)),n}catch(e){}finally{s===I&&t.removeAttribute("id")}}}return S(e.replace(oe,"$1"),t,n,r)}function n(){var e=[];return function t(n,r){return e.push(n+" ")>w.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function r(e){return e[I]=!0,e}function i(e){var t=q.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function c(e){return r((function(t){return t=+t,r((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function f(e){return e&&void 0!==e.getElementsByTagName&&e}function p(){}function d(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=B++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[$,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(f=t[I]||(t[I]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===$&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function g(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function y(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function m(e,n,i,o,a,s){return o&&!o[I]&&(o=m(o)),a&&!a[I]&&(a=m(a,s)),r((function(r,s,u,l){var c,f,p,d=[],h=[],g=s.length,m=r||function(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}(n||"*",u.nodeType?[u]:u,[]),v=!e||!r&&n?m:y(m,d,e,u,l),x=i?a||(r?e:g||o)?[]:s:v;if(i&&i(v,x,u,l),o)for(c=y(x,h),o(c,[],u,l),f=c.length;f--;)(p=c[f])&&(x[h[f]]=!(v[h[f]]=p));if(r){if(a||e){if(a){for(c=[],f=x.length;f--;)(p=x[f])&&c.push(v[f]=p);a(null,x=[],c,l)}for(f=x.length;f--;)(p=x[f])&&(c=a?K(r,p):d[f])>-1&&(r[c]=!(s[c]=p))}}else x=y(x===s?x.splice(g,x.length):x),a?a(null,s,x,l):Q.apply(s,x)}))}function v(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=h((function(e){return e===t}),a,!0),l=h((function(e){return K(t,e)>-1}),a,!0),c=[function(e,n,r){var i=!o&&(r||n!==D)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[h(g(c),n)];else{if((n=w.filter[e[s].type].apply(null,e[s].matches))[I]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return m(s>1&&g(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s<r&&v(e.slice(s,r)),r<i&&v(e=e.slice(r)),r<i&&d(e))}c.push(n)}return g(c)}var x,b,w,T,C,E,k,S,D,N,A,j,q,L,H,O,P,M,R,I="sizzle"+1*new Date,W=e.document,$=0,B=0,F=n(),_=n(),z=n(),X=function(e,t){return e===t&&(A=!0),0},U={}.hasOwnProperty,V=[],G=V.pop,Y=V.push,Q=V.push,J=V.slice,K=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,de=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,me=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ve=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){j()},Te=h((function(e){return!0===e.disabled&&("form"in e||"label"in e)}),{dir:"parentNode",next:"legend"});try{Q.apply(V=J.call(W.childNodes),W.childNodes),V[W.childNodes.length].nodeType}catch(e){Q={apply:V.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}for(x in b=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},j=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:W;return r!==q&&9===r.nodeType&&r.documentElement?(L=(q=r).documentElement,H=!C(q),W!==q&&(n=q.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=i((function(e){return e.className="i",!e.getAttribute("className")})),b.getElementsByTagName=i((function(e){return e.appendChild(q.createComment("")),!e.getElementsByTagName("*").length})),b.getElementsByClassName=he.test(q.getElementsByClassName),b.getById=i((function(e){return L.appendChild(e).id=I,!q.getElementsByName||!q.getElementsByName(I).length})),b.getById?(w.filter.ID=function(e){var t=e.replace(me,ve);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(me,ve);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&H)return t.getElementsByClassName(e)},P=[],O=[],(b.qsa=he.test(q.querySelectorAll))&&(i((function(e){L.appendChild(e).innerHTML="<a id='"+I+"'></a><select id='"+I+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||O.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+I+"-]").length||O.push("~="),e.querySelectorAll(":checked").length||O.push(":checked"),e.querySelectorAll("a#"+I+"+*").length||O.push(".#.+[+~]")})),i((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=q.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&O.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&O.push(":enabled",":disabled"),L.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")}))),(b.matchesSelector=he.test(M=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i((function(e){b.disconnectedMatch=M.call(e,"*"),M.call(e,"[s!='']:x"),P.push("!=",re)})),O=O.length&&new RegExp(O.join("|")),P=P.length&&new RegExp(P.join("|")),t=he.test(L.compareDocumentPosition),R=t||he.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===q||e.ownerDocument===W&&R(W,e)?-1:t===q||t.ownerDocument===W&&R(W,t)?1:N?K(N,e)-K(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===q?-1:t===q?1:i?-1:o?1:N?K(N,e)-K(N,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===W?-1:u[r]===W?1:0},q):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&j(e),n=n.replace(ue,"='$1']"),b.matchesSelector&&H&&!z[n+" "]&&(!P||!P.test(n))&&(!O||!O.test(n)))try{var r=M.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&j(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&j(e);var n=w.attrHandle[t.toLowerCase()],r=n&&U.call(w.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:b.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!b.detectDuplicates,N=!b.sortStable&&e.slice(0),e.sort(X),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},w=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(me,ve),e[3]=(e[3]||e[4]||e[5]||"").replace(me,ve),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(me,ve).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=F[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&F(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,m=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(y){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===m:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&v){for(x=(d=(l=(c=(f=(p=y)[I]||(p[I]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===$&&l[1])&&l[2],p=d&&y.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[$,d,x];break}}else if(v&&(x=d=(l=(c=(f=(p=t)[I]||(p[I]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===$&&l[1]),!1===x)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==m:1!==p.nodeType)||!++x||(v&&((c=(f=p[I]||(p[I]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[$,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[I]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r((function(e,t){for(var r,i=o(e,n),a=i.length;a--;)e[r=K(e,i[a])]=!(t[r]=i[a])})):function(e){return o(e,0,i)}):o}},pseudos:{not:r((function(e){var t=[],n=[],i=k(e.replace(oe,"$1"));return i[I]?r((function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}})),has:r((function(e){return function(n){return t(e,n).length>0}})),contains:r((function(e){return e=e.replace(me,ve),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}})),lang:r((function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(me,ve).toLowerCase(),function(t){var n;do{if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:l(!1),disabled:l(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return de.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c((function(){return[0]})),last:c((function(e,t){return[t-1]})),eq:c((function(e,t,n){return[n<0?n+t:n]})),even:c((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:c((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:c((function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e})),gt:c((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}},w.pseudos.nth=w.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=u(x);return p.prototype=w.filters=w.pseudos,w.setFilters=new p,E=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=_[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){for(a in r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length)),w.filter)!(i=fe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):_(e,u).slice(0)},k=t.compile=function(e,n){var i,o=[],a=[],s=z[e+" "];if(!s){for(n||(n=E(e)),i=n.length;i--;)(s=v(n[i]))[I]?o.push(s):a.push(s);s=z(e,function(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,p,d=0,h="0",g=r&&[],m=[],v=D,x=r||o&&w.find.TAG("*",l),b=$+=null==v?1:Math.random()||.1,T=x.length;for(l&&(D=a===q||a||l);h!==T&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===q||(j(c),s=!H);p=e[f++];)if(p(c,a||q,s)){u.push(c);break}l&&($=b)}i&&((c=!p&&c)&&d--,r&&g.push(c))}if(d+=h,i&&h!==d){for(f=0;p=n[f++];)p(g,m,a,s);if(r){if(d>0)for(;h--;)g[h]||m[h]||(m[h]=G.call(u));m=y(m)}Q.apply(u,m),l&&!r&&m.length>0&&d+n.length>1&&t.uniqueSort(u)}return l&&($=b,D=v),g};return i?r(a):a}(a,o)),s.selector=e}return s},S=t.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&E(e=l.selector||e);if(n=n||[],1===c.length){if((o=c[0]=c[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&H&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(me,ve),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(me,ve),ye.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&d(o)))return Q.apply(n,r),n;break}}return(l||k(e,c))(r,t,!H,n,!t||ye.test(e)&&f(t.parentNode)||t),n},b.sortStable=I.split("").sort(X).join("")===I,b.detectDuplicates=!!A,j(),b.sortDetached=i((function(e){return 1&e.compareDocumentPosition(q.createElement("fieldset"))})),i((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||o("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),b.attributes&&i((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||o("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),i((function(e){return null==e.getAttribute("disabled")}))||o(Z,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),t}(e),Vt.find=K,Vt.expr=K.selectors,Vt.expr[":"]=Vt.expr.pseudos,Vt.uniqueSort=Vt.unique=K.uniqueSort,Vt.text=K.getText,Vt.isXMLDoc=K.isXML,Vt.contains=K.contains,Vt.escapeSelector=K.escape,Z=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&Vt(e).is(n))break;r.push(e)}return r},ee=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},te=Vt.expr.match.needsContext,ne=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Vt.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Vt.find.matchesSelector(r,e)?[r]:[]:Vt.find.matches(e,Vt.grep(t,(function(e){return 1===e.nodeType})))},Vt.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(Vt(e).filter((function(){for(t=0;t<r;t++)if(Vt.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)Vt.find(e,i[t],n);return r>1?Vt.uniqueSort(n):n},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&te.test(e)?Vt(e):e||[],!1).length}}),ie=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,(Vt.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||re,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ie.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof Vt?t[0]:t,Vt.merge(this,Vt.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:qt,!0)),ne.test(r[1])&&Vt.isPlainObject(t))for(r in t)_t(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=qt.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):_t(e)?void 0!==n.ready?n.ready(e):e(Vt):Vt.makeArray(e,this)}).prototype=Vt.fn,re=Vt(qt),oe=/^(?:parents|prev(?:Until|All))/,ae={children:!0,contents:!0,next:!0,prev:!0},Vt.fn.extend({has:function(e){var t=Vt(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(Vt.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&Vt(e);if(!te.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&Vt.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Vt.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?Mt.call(Vt(e),this[0]):Mt.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Vt.uniqueSort(Vt.merge(this.get(),Vt(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Vt.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Z(e,"parentNode")},parentsUntil:function(e,t,n){return Z(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return Z(e,"nextSibling")},prevAll:function(e){return Z(e,"previousSibling")},nextUntil:function(e,t,n){return Z(e,"nextSibling",n)},prevUntil:function(e,t,n){return Z(e,"previousSibling",n)},siblings:function(e){return ee((e.parentNode||{}).firstChild,e)},children:function(e){return ee(e.firstChild)},contents:function(e){return o(e,"iframe")?e.contentDocument:(o(e,"template")&&(e=e.content||e),Vt.merge([],e.childNodes))}},(function(e,t){Vt.fn[e]=function(n,r){var i=Vt.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=Vt.filter(r,i)),this.length>1&&(ae[e]||Vt.uniqueSort(i),oe.test(e)&&i.reverse()),this.pushStack(i)}})),se=/[^\x20\t\r\n\f]+/g,Vt.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return Vt.each(e.match(se)||[],(function(e,n){t[n]=!0})),t}(e):Vt.extend({},e);var t,n,i,o,a=[],s=[],u=-1,l=function(){for(o=o||e.once,i=t=!0;s.length;u=-1)for(n=s.shift();++u<a.length;)!1===a[u].apply(n[0],n[1])&&e.stopOnFalse&&(u=a.length,n=!1);e.memory||(n=!1),t=!1,o&&(a=n?[]:"")},c={add:function(){return a&&(n&&!t&&(u=a.length-1,s.push(n)),function t(n){Vt.each(n,(function(n,i){_t(i)?e.unique&&c.has(i)||a.push(i):i&&i.length&&"string"!==r(i)&&t(i)}))}(arguments),n&&!t&&l()),this},remove:function(){return Vt.each(arguments,(function(e,t){for(var n;(n=Vt.inArray(t,a,n))>-1;)a.splice(n,1),n<=u&&u--})),this},has:function(e){return e?Vt.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return o=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return o=s=[],n||t||(a=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},Vt.extend({Deferred:function(t){var n=[["notify","progress",Vt.Callbacks("memory"),Vt.Callbacks("memory"),2],["resolve","done",Vt.Callbacks("once memory"),Vt.Callbacks("once memory"),0,"resolved"],["reject","fail",Vt.Callbacks("once memory"),Vt.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return Vt.Deferred((function(t){Vt.each(n,(function(n,r){var i=_t(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&_t(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(t,r,i){function o(t,n,r,i){return function(){var s=this,c=arguments,f=function(){var e,f;if(!(t<a)){if((e=r.apply(s,c))===n.promise())throw new TypeError("Thenable self-resolution");f=e&&("object"==typeof e||"function"==typeof e)&&e.then,_t(f)?i?f.call(e,o(a,n,u,i),o(a,n,l,i)):(a++,f.call(e,o(a,n,u,i),o(a,n,l,i),o(a,n,u,n.notifyWith))):(r!==u&&(s=void 0,c=[e]),(i||n.resolveWith)(s,c))}},p=i?f:function(){try{f()}catch(e){Vt.Deferred.exceptionHook&&Vt.Deferred.exceptionHook(e,p.stackTrace),t+1>=a&&(r!==l&&(s=void 0,c=[e]),n.rejectWith(s,c))}};t?p():(Vt.Deferred.getStackHook&&(p.stackTrace=Vt.Deferred.getStackHook()),e.setTimeout(p))}}var a=0;return Vt.Deferred((function(e){n[0][3].add(o(0,e,_t(i)?i:u,e.notifyWith)),n[1][3].add(o(0,e,_t(t)?t:u)),n[2][3].add(o(0,e,_t(r)?r:l))})).promise()},promise:function(e){return null!=e?Vt.extend(e,i):i}},o={};return Vt.each(n,(function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add((function(){r=s}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=Ht.call(arguments),o=Vt.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?Ht.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(c(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||_t(i[n]&&i[n].then)))return o.then();for(;n--;)c(i[n],a(n),o.reject);return o.promise()}}),ue=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/,Vt.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&ue.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},Vt.readyException=function(t){e.setTimeout((function(){throw t}))},le=Vt.Deferred(),Vt.fn.ready=function(e){return le.then(e).catch((function(e){Vt.readyException(e)})),this},Vt.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--Vt.readyWait:Vt.isReady)||(Vt.isReady=!0,!0!==e&&--Vt.readyWait>0||le.resolveWith(qt,[Vt]))}}),Vt.ready.then=le.then,"complete"===qt.readyState||"loading"!==qt.readyState&&!qt.documentElement.doScroll?e.setTimeout(Vt.ready):(qt.addEventListener("DOMContentLoaded",f),e.addEventListener("load",f)),ce=function(e,t,n,i,o,a,s){var u=0,l=e.length,c=null==n;if("object"===r(n))for(u in o=!0,n)ce(e,t,u,n[u],!0,a,s);else if(void 0!==i&&(o=!0,_t(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(Vt(e),n)})),t))for(;u<l;u++)t(e[u],n,s?i:i.call(e[u],u,t(e[u],n)));return o?e:c?t.call(e):l?t(e[0],n):a},fe=/^-ms-/,pe=/-([a-z])/g,de=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},h.uid=1,h.prototype={cache:function(e){var t=e[this.expando];return t||(t={},de(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[d(t)]=n;else for(r in t)i[d(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][d(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(d):(t=d(t))in r?[t]:t.match(se)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||Vt.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!Vt.isEmptyObject(t)}},he=new h,ge=new h,ye=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,me=/[A-Z]/g,Vt.extend({hasData:function(e){return ge.hasData(e)||he.hasData(e)},data:function(e,t,n){return ge.access(e,t,n)},removeData:function(e,t){ge.remove(e,t)},_data:function(e,t,n){return he.access(e,t,n)},_removeData:function(e,t){he.remove(e,t)}}),Vt.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=ge.get(o),1===o.nodeType&&!he.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=d(r.slice(5)),g(o,r,i[r]));he.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){ge.set(this,e)})):ce(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=ge.get(o,e))||void 0!==(n=g(o,e))?n:void 0;this.each((function(){ge.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){ge.remove(this,e)}))}}),Vt.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=he.get(e,t),n&&(!r||Array.isArray(n)?r=he.access(e,t,Vt.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=Vt.queue(e,t),r=n.length,i=n.shift(),o=Vt._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){Vt.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return he.get(e,n)||he.access(e,n,{empty:Vt.Callbacks("once memory").add((function(){he.remove(e,[t+"queue",n])}))})}}),Vt.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?Vt.queue(this[0],e):void 0===t?this:this.each((function(){var n=Vt.queue(this,e,t);Vt._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&Vt.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){Vt.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=Vt.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=he.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}}),ve=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,xe=new RegExp("^(?:([+-])=|)("+ve+")([a-z%]*)$","i"),be=["Top","Right","Bottom","Left"],we=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&Vt.contains(e.ownerDocument,e)&&"none"===Vt.css(e,"display")},Te=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i},Ce={},Vt.fn.extend({show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){we(this)?Vt(this).show():Vt(this).hide()}))}}),Ee=/^(?:checkbox|radio)$/i,ke=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Se=/^$|^module$|\/(?:java|ecma)script/i,(De={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]}).optgroup=De.option,De.tbody=De.tfoot=De.colgroup=De.caption=De.thead,De.th=De.td,Ne=/<|&#?\w+;/,Dt=qt.createDocumentFragment().appendChild(qt.createElement("div")),(Nt=qt.createElement("input")).setAttribute("type","radio"),Nt.setAttribute("checked","checked"),Nt.setAttribute("name","t"),Dt.appendChild(Nt),Ft.checkClone=Dt.cloneNode(!0).cloneNode(!0).lastChild.checked,Dt.innerHTML="<textarea>x</textarea>",Ft.noCloneChecked=!!Dt.cloneNode(!0).lastChild.defaultValue,Ae=qt.documentElement,je=/^key/,qe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Le=/^([^.]*)(?:\.(.+)|)/,Vt.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=he.get(e);if(y)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&Vt.find.matchesSelector(Ae,i),n.guid||(n.guid=Vt.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return void 0!==Vt&&Vt.event.triggered!==t.type?Vt.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(se)||[""]).length;l--;)d=g=(s=Le.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=Vt.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=Vt.event.special[d]||{},c=Vt.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&Vt.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),Vt.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=he.hasData(e)&&he.get(e);if(y&&(u=y.events)){for(l=(t=(t||"").match(se)||[""]).length;l--;)if(d=g=(s=Le.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=Vt.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||Vt.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)Vt.event.remove(e,d+t[l],n,r,!0);Vt.isEmptyObject(u)&&he.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=Vt.event.fix(e),u=new Array(arguments.length),l=(he.get(this,"events")||{})[s.type]||[],c=Vt.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=Vt.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((Vt.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?Vt(i,this).index(l)>-1:Vt.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(Vt.Event.prototype,e,{enumerable:!0,configurable:!0,get:_t(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[Vt.expando]?e:new Vt.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==E()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===E()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&o(this,"input"))return this.click(),!1},_default:function(e){return o(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},Vt.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},Vt.Event=function(e,t){if(!(this instanceof Vt.Event))return new Vt.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?T:C,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&Vt.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[Vt.expando]=!0},Vt.Event.prototype={constructor:Vt.Event,isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=T,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=T,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=T,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},Vt.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&je.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&qe.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},Vt.event.addProp),Vt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){Vt.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||Vt.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),Vt.fn.extend({on:function(e,t,n,r){return k(this,e,t,n,r)},one:function(e,t,n,r){return k(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,Vt(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=C),this.each((function(){Vt.event.remove(this,e,n,t)}))}}),He=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Vt.extend({htmlPrefilter:function(e){return e.replace(He,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=Vt.contains(e.ownerDocument,e);if(!(Ft.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Vt.isXMLDoc(e)))for(a=x(s),r=0,i=(o=x(e)).length;r<i;r++)j(o[r],a[r]);if(t)if(n)for(o=o||x(e),a=a||x(s),r=0,i=o.length;r<i;r++)A(o[r],a[r]);else A(e,s);return(a=x(s,"script")).length>0&&b(a,!u&&x(e,"script")),s},cleanData:function(e){for(var t,n,r,i=Vt.event.special,o=0;void 0!==(n=e[o]);o++)if(de(n)){if(t=n[he.expando]){if(t.events)for(r in t.events)i[r]?Vt.event.remove(n,r):Vt.removeEvent(n,r,t.handle);n[he.expando]=void 0}n[ge.expando]&&(n[ge.expando]=void 0)}}}),Vt.fn.extend({detach:function(e){return L(this,e,!0)},remove:function(e){return L(this,e)},text:function(e){return ce(this,(function(e){return void 0===e?Vt.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return q(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||S(this,e).appendChild(e)}))},prepend:function(){return q(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return q(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return q(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Vt.cleanData(x(e,!1)),e.textContent="");return this},clone:function(e,t){return e=e??!1,t=t??e,this.map((function(){return Vt.clone(this,e,t)}))},html:function(e){return ce(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!De[(ke.exec(e)||["",""])[1].toLowerCase()]){e=Vt.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(Vt.cleanData(x(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return q(this,arguments,(function(t){var n=this.parentNode;Vt.inArray(this,e)<0&&(Vt.cleanData(x(this)),n&&n.replaceChild(t,this))}),e)}}),Vt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){Vt.fn[e]=function(e){for(var n,r=[],i=Vt(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),Vt(i[a])[t](n),Pt.apply(r,n.get());return this.pushStack(r)}})),Re=new RegExp("^("+ve+")(?!px)[a-z%]+$","i"),Ie=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},We=new RegExp(be.join("|"),"i"),function(){function t(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Ae.appendChild(u).appendChild(l);var t=e.getComputedStyle(l);r="1%"!==t.top,s=12===n(t.marginLeft),l.style.right="60%",a=36===n(t.right),i=36===n(t.width),l.style.position="absolute",o=36===l.offsetWidth||"absolute",Ae.removeChild(u),l=null}}function n(e){return Math.round(parseFloat(e))}var r,i,o,a,s,u=qt.createElement("div"),l=qt.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",Ft.clearCloneStyle="content-box"===l.style.backgroundClip,Vt.extend(Ft,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),s},scrollboxSize:function(){return t(),o}}))}(),$e=/^(none|table(?!-c[ea]).+)/,Be=/^--/,Fe={position:"absolute",visibility:"hidden",display:"block"},_e={letterSpacing:"0",fontWeight:"400"},ze=["Webkit","Moz","ms"],Xe=qt.createElement("div").style,Vt.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=H(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=d(t),u=Be.test(t),l=e.style;if(u||(t=P(s)),a=Vt.cssHooks[t]||Vt.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=xe.exec(n))&&i[1]&&(n=y(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(Vt.cssNumber[s]?"":"px")),Ft.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=d(t);return Be.test(t)||(t=P(s)),(a=Vt.cssHooks[t]||Vt.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=H(e,t,r)),"normal"===i&&t in _e&&(i=_e[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),Vt.each(["height","width"],(function(e,t){Vt.cssHooks[t]={get:function(e,n,r){if(n)return!$e.test(Vt.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?I(e,t,r):Te(e,Fe,(function(){return I(e,t,r)}))},set:function(e,n,r){var i,o=Ie(e),a="border-box"===Vt.css(e,"boxSizing",!1,o),s=r&&R(e,t,r,a,o);return a&&Ft.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-R(e,t,"border",!1,o)-.5)),s&&(i=xe.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=Vt.css(e,t)),M(0,n,s)}}})),Vt.cssHooks.marginLeft=O(Ft.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(H(e,"marginLeft"))||e.getBoundingClientRect().left-Te(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),Vt.each({margin:"",padding:"",border:"Width"},(function(e,t){Vt.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+be[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(Vt.cssHooks[e+t].set=M)})),Vt.fn.extend({css:function(e,t){return ce(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=Vt.css(e,t[a],!1,r);return o}return void 0!==n?Vt.style(e,t,n):Vt.css(e,t)}),e,t,arguments.length>1)}}),Vt.Tween=W,W.prototype={constructor:W,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||Vt.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(Vt.cssNumber[n]?"":"px")},cur:function(){var e=W.propHooks[this.prop];return e&&e.get?e.get(this):W.propHooks._default.get(this)},run:function(e){var t,n=W.propHooks[this.prop];return this.options.duration?this.pos=t=Vt.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):W.propHooks._default.set(this),this}},W.prototype.init.prototype=W.prototype,W.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=Vt.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){Vt.fx.step[e.prop]?Vt.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[Vt.cssProps[e.prop]]&&!Vt.cssHooks[e.prop]?e.elem[e.prop]=e.now:Vt.style(e.elem,e.prop,e.now+e.unit)}}},W.propHooks.scrollTop=W.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Vt.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},Vt.fx=W.prototype.init,Vt.fx.step={},Ge=/^(?:toggle|show|hide)$/,Ye=/queueHooks$/,Vt.Animation=Vt.extend(z,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return y(n.elem,e,xe.exec(t),n),n}]},tweener:function(e,t){_t(e)?(t=e,e=["*"]):e=e.match(se);for(var n,r=0,i=e.length;r<i;r++)n=e[r],z.tweeners[n]=z.tweeners[n]||[],z.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&we(e),y=he.get(e,"fxshow");for(r in n.queue||(null==(a=Vt._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always((function(){p.always((function(){a.unqueued--,Vt.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],Ge.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||Vt.style(e,r)}if((u=!Vt.isEmptyObject(t))||!Vt.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=he.get(e,"display")),"none"===(c=Vt.css(e,"display"))&&(l?c=l:(v([e],!0),l=e.style.display||l,c=Vt.css(e,"display"),v([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===Vt.css(e,"float")&&(u||(p.done((function(){h.display=l})),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always((function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}))),u=!1,d)u||(y?"hidden"in y&&(g=y.hidden):y=he.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&v([e],!0),p.done((function(){for(r in g||v([e]),he.remove(e,"fxshow"),d)Vt.style(e,r,d[r])}))),u=_(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?z.prefilters.unshift(e):z.prefilters.push(e)}}),Vt.speed=function(e,t,n){var r=e&&"object"==typeof e?Vt.extend({},e):{complete:n||!n&&t||_t(e)&&e,duration:e,easing:n&&t||t&&!_t(t)&&t};return Vt.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in Vt.fx.speeds?r.duration=Vt.fx.speeds[r.duration]:r.duration=Vt.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){_t(r.old)&&r.old.call(this),r.queue&&Vt.dequeue(this,r.queue)},r},Vt.fn.extend({fadeTo:function(e,t,n,r){return this.filter(we).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=Vt.isEmptyObject(e),o=Vt.speed(t,n,r),a=function(){var t=z(this,Vt.extend({},e),o);(i||he.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=Vt.timers,a=he.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&Ye.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||Vt.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=he.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=Vt.timers,a=r?r.length:0;for(n.finish=!0,Vt.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),Vt.each(["toggle","show","hide"],(function(e,t){var n=Vt.fn[t];Vt.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(F(t,!0),e,r,i)}})),Vt.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){Vt.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),Vt.timers=[],Vt.fx.tick=function(){var e,t=0,n=Vt.timers;for(Ue=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||Vt.fx.stop(),Ue=void 0},Vt.fx.timer=function(e){Vt.timers.push(e),Vt.fx.start()},Vt.fx.interval=13,Vt.fx.start=function(){Ve||(Ve=!0,$())},Vt.fx.stop=function(){Ve=null},Vt.fx.speeds={slow:600,fast:200,_default:400},Vt.fn.delay=function(t,n){return t=Vt.fx&&Vt.fx.speeds[t]||t,n=n||"fx",this.queue(n,(function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}}))},function(){var e=qt.createElement("input"),t=qt.createElement("select").appendChild(qt.createElement("option"));e.type="checkbox",Ft.checkOn=""!==e.value,Ft.optSelected=t.selected,(e=qt.createElement("input")).value="t",e.type="radio",Ft.radioValue="t"===e.value}(),Je=Vt.expr.attrHandle,Vt.fn.extend({attr:function(e,t){return ce(this,Vt.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){Vt.removeAttr(this,e)}))}}),Vt.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?Vt.prop(e,t,n):(1===o&&Vt.isXMLDoc(e)||(i=Vt.attrHooks[t.toLowerCase()]||(Vt.expr.match.bool.test(t)?Qe:void 0)),void 0!==n?null===n?void Vt.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=Vt.find.attr(e,t))??void 0)},attrHooks:{type:{set:function(e,t){if(!Ft.radioValue&&"radio"===t&&o(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(se);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Qe={set:function(e,t,n){return!1===t?Vt.removeAttr(e,n):e.setAttribute(n,n),n}},Vt.each(Vt.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=Je[t]||Vt.find.attr;Je[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=Je[a],Je[a]=i,i=null!=n(e,t,r)?a:null,Je[a]=o),i}})),Ke=/^(?:input|select|textarea|button)$/i,Ze=/^(?:a|area)$/i,Vt.fn.extend({prop:function(e,t){return ce(this,Vt.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[Vt.propFix[e]||e]}))}}),Vt.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&Vt.isXMLDoc(e)||(t=Vt.propFix[t]||t,i=Vt.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=Vt.find.attr(e,"tabindex");return t?parseInt(t,10):Ke.test(e.nodeName)||Ze.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),Ft.optSelected||(Vt.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),Vt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){Vt.propFix[this.toLowerCase()]=this})),Vt.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(_t(e))return this.each((function(t){Vt(this).addClass(e.call(this,t,U(this)))}));if((t=V(e)).length)for(;n=this[u++];)if(i=U(n),r=1===n.nodeType&&" "+X(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=X(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(_t(e))return this.each((function(t){Vt(this).removeClass(e.call(this,t,U(this)))}));if(!arguments.length)return this.attr("class","");if((t=V(e)).length)for(;n=this[u++];)if(i=U(n),r=1===n.nodeType&&" "+X(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=X(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):_t(e)?this.each((function(n){Vt(this).toggleClass(e.call(this,n,U(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=Vt(this),a=V(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=U(this))&&he.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":he.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+X(U(n))+" ").indexOf(t)>-1)return!0;return!1}}),et=/\r/g,Vt.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=_t(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,Vt(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=Vt.map(i,(function(e){return null==e?"":e+""}))),(t=Vt.valHooks[this.type]||Vt.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=Vt.valHooks[i.type]||Vt.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(et,""):n??"":void 0}}),Vt.extend({valHooks:{option:{get:function(e){var t=Vt.find.attr(e,"value");return null!=t?t:X(Vt.text(e))}},select:{get:function(e){var t,n,r,i=e.options,a=e.selectedIndex,s="select-one"===e.type,u=s?null:[],l=s?a+1:i.length;for(r=a<0?l:s?a:0;r<l;r++)if(((n=i[r]).selected||r===a)&&!n.disabled&&(!n.parentNode.disabled||!o(n.parentNode,"optgroup"))){if(t=Vt(n).val(),s)return t;u.push(t)}return u},set:function(e,t){for(var n,r,i=e.options,o=Vt.makeArray(t),a=i.length;a--;)((r=i[a]).selected=Vt.inArray(Vt.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Vt.each(["radio","checkbox"],(function(){Vt.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=Vt.inArray(Vt(e).val(),t)>-1}},Ft.checkOn||(Vt.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),Ft.focusin="onfocusin"in e,tt=/^(?:focusinfocus|focusoutblur)$/,nt=function(e){e.stopPropagation()},Vt.extend(Vt.event,{trigger:function(t,n,r,i){var o,a,s,u,l,c,f,p,d=[r||qt],h=Wt.call(t,"type")?t.type:t,g=Wt.call(t,"namespace")?t.namespace.split("."):[];if(a=p=s=r=r||qt,3!==r.nodeType&&8!==r.nodeType&&!tt.test(h+Vt.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),l=h.indexOf(":")<0&&"on"+h,(t=t[Vt.expando]?t:new Vt.Event(h,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:Vt.makeArray(n,[t]),f=Vt.event.special[h]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!zt(r)){for(u=f.delegateType||h,tt.test(u+h)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||qt)&&d.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=d[o++])&&!t.isPropagationStopped();)p=a,t.type=o>1?u:f.bindType||h,(c=(he.get(a,"events")||{})[t.type]&&he.get(a,"handle"))&&c.apply(a,n),(c=l&&a[l])&&c.apply&&de(a)&&(t.result=c.apply(a,n),!1===t.result&&t.preventDefault());return t.type=h,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(d.pop(),n)||!de(r)||l&&_t(r[h])&&!zt(r)&&((s=r[l])&&(r[l]=null),Vt.event.triggered=h,t.isPropagationStopped()&&p.addEventListener(h,nt),r[h](),t.isPropagationStopped()&&p.removeEventListener(h,nt),Vt.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=Vt.extend(new Vt.Event,n,{type:e,isSimulated:!0});Vt.event.trigger(r,null,t)}}),Vt.fn.extend({trigger:function(e,t){return this.each((function(){Vt.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return Vt.event.trigger(e,t,n,!0)}}),Ft.focusin||Vt.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){Vt.event.simulate(t,e.target,Vt.event.fix(e))};Vt.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=he.access(r,t);i||r.addEventListener(e,n,!0),he.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=he.access(r,t)-1;i?he.access(r,t,i):(r.removeEventListener(e,n,!0),he.remove(r,t))}}})),rt=e.location,it=Date.now(),ot=/\?/,Vt.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||Vt.error("Invalid XML: "+t),n},at=/\[\]$/,st=/\r?\n/g,ut=/^(?:submit|button|image|reset|file)$/i,lt=/^(?:input|select|textarea|keygen)/i,Vt.param=function(e,t){var n,r=[],i=function(e,t){var n=_t(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(n??"")};if(Array.isArray(e)||e.jquery&&!Vt.isPlainObject(e))Vt.each(e,(function(){i(this.name,this.value)}));else for(n in e)G(n,e[n],t,i);return r.join("&")},Vt.fn.extend({serialize:function(){return Vt.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=Vt.prop(this,"elements");return e?Vt.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!Vt(this).is(":disabled")&<.test(this.nodeName)&&!ut.test(e)&&(this.checked||!Ee.test(e))})).map((function(e,t){var n=Vt(this).val();return null==n?null:Array.isArray(n)?Vt.map(n,(function(e){return{name:t.name,value:e.replace(st,"\r\n")}})):{name:t.name,value:n.replace(st,"\r\n")}})).get()}}),ct=/%20/g,ft=/#.*$/,pt=/([?&])_=[^&]*/,dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,ht=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,gt=/^(?:GET|HEAD)$/,yt=/^\/\//,mt={},vt={},xt="*/".concat("*"),(bt=qt.createElement("a")).href=rt.href,Vt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:rt.href,type:"GET",isLocal:ht.test(rt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":xt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":Vt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?J(J(e,Vt.ajaxSettings),t):J(Vt.ajaxSettings,e)},ajaxPrefilter:Y(mt),ajaxTransport:Y(vt),ajax:function(t,n){function r(t,n,r,s){var l,p,d,b,w,T=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",C.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(h,C,r)),b=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(h,b,C,l),l?(h.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(Vt.lastModified[o]=w),(w=C.getResponseHeader("etag"))&&(Vt.etag[o]=w)),204===t||"HEAD"===h.type?T="nocontent":304===t?T="notmodified":(T=b.state,p=b.data,l=!(d=b.error))):(d=T,!t&&T||(T="error",t<0&&(t=0))),C.status=t,C.statusText=(n||T)+"",l?m.resolveWith(g,[p,T,C]):m.rejectWith(g,[C,T,d]),C.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[C,h,l?p:d]),v.fireWith(g,[C,T]),f&&(y.trigger("ajaxComplete",[C,h]),--Vt.active||Vt.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=Vt.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?Vt(g):Vt.event,m=Vt.Deferred(),v=Vt.Callbacks("once memory"),x=h.statusCode||{},b={},w={},T="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=dt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return t??null},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(m.promise(C),h.url=((t||h.url||rt.href)+"").replace(yt,rt.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(se)||[""],null==h.crossDomain){l=qt.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=bt.protocol+"//"+bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=Vt.param(h.data,h.traditional)),Q(mt,h,n,C),c)return C;for(p in(f=Vt.event&&h.global)&&0==Vt.active++&&Vt.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!gt.test(h.type),o=h.url.replace(ft,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(ct,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(ot.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(pt,"$1"),d=(ot.test(o)?"&":"?")+"_="+it+++d),h.url=o+d),h.ifModified&&(Vt.lastModified[o]&&C.setRequestHeader("If-Modified-Since",Vt.lastModified[o]),Vt.etag[o]&&C.setRequestHeader("If-None-Match",Vt.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+xt+"; q=0.01":""):h.accepts["*"]),h.headers)C.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,C,h)||c))return C.abort();if(T="abort",v.add(h.complete),C.done(h.success),C.fail(h.error),i=Q(vt,h,n,C)){if(C.readyState=1,f&&y.trigger("ajaxSend",[C,h]),c)return C;h.async&&h.timeout>0&&(u=e.setTimeout((function(){C.abort("timeout")}),h.timeout));try{c=!1,i.send(b,r)}catch(e){if(c)throw e;r(-1,e)}}else r(-1,"No Transport");return C},getJSON:function(e,t,n){return Vt.get(e,t,n,"json")},getScript:function(e,t){return Vt.get(e,void 0,t,"script")}}),Vt.each(["get","post"],(function(e,t){Vt[t]=function(e,n,r,i){return _t(n)&&(i=i||r,r=n,n=void 0),Vt.ajax(Vt.extend({url:e,type:t,dataType:i,data:n,success:r},Vt.isPlainObject(e)&&e))}})),Vt._evalUrl=function(e){return Vt.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},Vt.fn.extend({wrapAll:function(e){var t;return this[0]&&(_t(e)&&(e=e.call(this[0])),t=Vt(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return _t(e)?this.each((function(t){Vt(this).wrapInner(e.call(this,t))})):this.each((function(){var t=Vt(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=_t(e);return this.each((function(n){Vt(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){Vt(this).replaceWith(this.childNodes)})),this}}),Vt.expr.pseudos.hidden=function(e){return!Vt.expr.pseudos.visible(e)},Vt.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},Vt.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}},wt={0:200,1223:204},Tt=Vt.ajaxSettings.xhr(),Ft.cors=!!Tt&&"withCredentials"in Tt,Ft.ajax=Tt=!!Tt,Vt.ajaxTransport((function(t){var n,r;if(Ft.cors||Tt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(wt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout((function(){n&&r()}))},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}})),Vt.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),Vt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return Vt.globalEval(e),e}}}),Vt.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),Vt.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain)return{send:function(r,i){t=Vt("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),qt.head.appendChild(t[0])},abort:function(){n&&n()}}})),Ct=[],Et=/(=)\?(?=&|$)|\?\?/,Vt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ct.pop()||Vt.expando+"_"+it++;return this[e]=!0,e}}),Vt.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Et.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Et.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=_t(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Et,"$1"+i):!1!==t.jsonp&&(t.url+=(ot.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||Vt.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always((function(){void 0===o?Vt(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Ct.push(i)),a&&_t(o)&&o(a[0]),a=o=void 0})),"script"})),Ft.createHTMLDocument=((At=qt.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===At.childNodes.length),Vt.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(Ft.createHTMLDocument?((r=(t=qt.implementation.createHTMLDocument("")).createElement("base")).href=qt.location.href,t.head.appendChild(r)):t=qt),o=!n&&[],(i=ne.exec(e))?[t.createElement(i[1])]:(i=w([e],t,o),o&&o.length&&Vt(o).remove(),Vt.merge([],i.childNodes)));var r,i,o},Vt.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=X(e.slice(s)),e=e.slice(0,s)),_t(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&Vt.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?Vt("<div>").append(Vt.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},Vt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){Vt.fn[t]=function(e){return this.on(t,e)}})),Vt.expr.pseudos.animated=function(e){return Vt.grep(Vt.timers,(function(t){return e===t.elem})).length},Vt.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=Vt.css(e,"position"),c=Vt(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=Vt.css(e,"top"),u=Vt.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),_t(t)&&(t=t.call(e,n,Vt.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},Vt.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){Vt.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===Vt.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===Vt.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=Vt(e).offset()).top+=Vt.css(e,"borderTopWidth",!0),i.left+=Vt.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-Vt.css(r,"marginTop",!0),left:t.left-i.left-Vt.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===Vt.css(e,"position");)e=e.offsetParent;return e||Ae}))}}),Vt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;Vt.fn[e]=function(r){return ce(this,(function(e,r,i){var o;if(zt(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),Vt.each(["top","left"],(function(e,t){Vt.cssHooks[t]=O(Ft.pixelPosition,(function(e,n){if(n)return n=H(e,t),Re.test(n)?Vt(e).position()[t]+"px":n}))})),Vt.each({Height:"height",Width:"width"},(function(e,t){Vt.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){Vt.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return ce(this,(function(t,n,i){var o;return zt(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?Vt.css(t,n,s):Vt.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),Vt.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){Vt.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}})),Vt.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),Vt.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),Vt.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),_t(e))return r=Ht.call(arguments,2),i=function(){return e.apply(t||this,r.concat(Ht.call(arguments)))},i.guid=e.guid=e.guid||Vt.guid++,i},Vt.holdReady=function(e){e?Vt.readyWait++:Vt.ready(!0)},Vt.isArray=Array.isArray,Vt.parseJSON=JSON.parse,Vt.nodeName=o,Vt.isFunction=_t,Vt.isWindow=zt,Vt.camelCase=d,Vt.type=r,Vt.now=Date.now,Vt.isNumeric=function(e){var t=Vt.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return Vt})),kt=e.jQuery,St=e.$,Vt.noConflict=function(t){return e.$===Vt&&(e.$=St),t&&e.jQuery===Vt&&(e.jQuery=kt),Vt},t||(e.jQuery=e.$=Vt),Vt})); })(this); |
b4e0f162 |
5 | |
0d20df38 |
6 | // 3rdParty/jquery-ui.js |
e234e470 |
7 | (function (window, undefined) { !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}((function(t){var e,i,s,o,n,r,a,h,l,c,p;t.ui=t.ui||{},t.ui.version="1.99.99",e=0,i=Array.prototype.slice,t.cleanData=(l=t.cleanData,function(e){var i,s,o;for(o=0;null!=(s=e[o]);o++)try{(i=t._data(s,"events"))&&i.remove&&t(s).triggerHandler("remove")}catch(t){}l(e)}),t.widget=function(e,i,s){var o,n,r,a,h={},l=e.split(".")[0];return e=e.split(".")[1],a=l+"-"+e,s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][a.toLowerCase()]=function(e){return!!t.data(e,a)},t[l]=t[l]||{},o=t[l][e],n=t[l][e]=function(t,e){if(!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},t.extend(n,o,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),(r=new i).options=t.widget.extend({},r.options),t.each(s,(function(e,s){t.isFunction(s)?h[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,n=this._superApply;return this._super=t,this._superApply=o,e=s.apply(this,arguments),this._super=i,this._superApply=n,e}}():h[e]=s})),n.prototype=t.widget.extend(r,{widgetEventPrefix:o&&r.widgetEventPrefix||e},h,{constructor:n,namespace:l,widgetName:e,widgetFullName:a}),o?(t.each(o._childConstructors,(function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,n,i._proto)})),delete o._childConstructors):i._childConstructors.push(n),t.widget.bridge(e,n),n},t.widget.extend=function(e){for(var s,o,n=i.call(arguments,1),r=0,a=n.length;r<a;r++)for(s in n[r])o=n[r][s],n[r].hasOwnProperty(s)&&void 0!==o&&(t.isPlainObject(o)?e[s]=t.isPlainObject(e[s])?t.widget.extend({},e[s],o):t.widget.extend({},o):e[s]=o);return e},t.widget.bridge=function(e,s){var o=s.prototype.widgetFullName||e;t.fn[e]=function(n){var r="string"==typeof n,a=i.call(arguments,1),h=this;return r?this.length||"instance"!==n?this.each((function(){var i,s=t.data(this,o);return"instance"===n?(h=s,!1):s?t.isFunction(s[n])&&"_"!==n.charAt(0)?(i=s[n].apply(s,a))!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0:t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+n+"'")})):h=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each((function(){var e=t.data(this,o);e?(e.option(n||{}),e._init&&e._init()):t.data(this,o,new s(n,this))}))),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,(function(t,i){e._removeClass(i,t)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,o,n,r=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(r={},s=e.split("."),e=s.shift(),s.length){for(o=r[e]=t.widget.extend({},this.options[e]),n=0;n<s.length-1;n++)o[s[n]]=o[s[n]]||{},o=o[s[n]];if(e=s.pop(),1===arguments.length)return void 0===o[e]?null:o[e];o[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];r[e]=i}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,o;for(i in e)o=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&o&&o.length&&(s=t(o.get()),this._removeClass(o,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,n){var r,a;for(a=0;a<i.length;a++)r=o.classesElementLookup[i[a]]||t(),r=e.add?t(t.unique(r.get().concat(e.element.get()))):t(r.not(e.element).get()),o.classesElementLookup[i[a]]=r,s.push(i[a]),n&&e.classes[i[a]]&&s.push(e.classes[i[a]])}var s=[],o=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,(function(s,o){-1!==t.inArray(e.target,o)&&(i.classesElementLookup[s]=t(o.not(e.target).get()))}))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var o="string"==typeof t||null===t,n={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:s};return n.element.toggleClass(this._classes(n),s),this},_on:function(e,i,s){var o,n=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=o=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,o=this.widget()),t.each(s,(function(s,r){function a(){if(e||!0!==n.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof r?n[r]:r).apply(n,arguments)}var h,l,c;"string"!=typeof r&&(a.guid=r.guid=r.guid||a.guid||t.guid++),l=(h=s.match(/^([\w:-]*)\s*(.*)$/))[1]+n.eventNamespace,(c=h[2])?o.on(l,c,a):i.on(l,a)}))},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var i=this;return setTimeout((function(){return("string"==typeof t?i[t]:t).apply(i,arguments)}),e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var o,n,r=this.options[e];if(s=s||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],n=i.originalEvent)for(o in n)o in i||(i[o]=n[o]);return this.element.trigger(i,s),!(t.isFunction(r)&&!1===r.apply(this.element[0],[i].concat(s))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},(function(e,i){t.Widget.prototype["_"+e]=function(s,o,n){var r,a;"string"==typeof o&&(o={effect:o}),a=o?!0===o||"number"==typeof o?i:o.effect||i:e,"number"==typeof(o=o||{})&&(o={duration:o}),r=!t.isEmptyObject(o),o.complete=n,o.delay&&s.delay(o.delay),r&&t.effects&&t.effects.effect[a]?s[e](o):a!==e&&s[a]?s[a](o.duration,o.easing,n):s.queue((function(i){t(this)[e](),n&&n.call(s[0]),i()}))}})),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(c.test(t[0])?e/100:1),parseFloat(t[1])*(c.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}var s,o=Math.max,n=Math.abs,r=/left|center|right/,a=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,c=/%$/,p=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==s)return s;var e,i,o=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),n=o.children()[0];return t("body").append(o),e=n.offsetWidth,o.css("overflow","scroll"),e===(i=n.offsetWidth)&&(i=o[0].clientWidth),o.remove(),s=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:o?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),o=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:o,offset:s||o?{left:0,top:0}:t(e).offset(),scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(s){if(!s||!s.of)return p.apply(this,arguments);var c,f,u,d,g,m,v,_,b="string"==typeof(s=t.extend({},s)).of?t(document).find(s.of):t(s.of),w=t.position.getWithinInfo(s.within),y=t.position.getScrollInfo(w),P=(s.collision||"flip").split(" "),x={};return m=9===(_=(v=b)[0]).nodeType?{width:v.width(),height:v.height(),offset:{top:0,left:0}}:t.isWindow(_)?{width:v.width(),height:v.height(),offset:{top:v.scrollTop(),left:v.scrollLeft()}}:_.preventDefault?{width:0,height:0,offset:{top:_.pageY,left:_.pageX}}:{width:v.outerWidth(),height:v.outerHeight(),offset:v.offset()},b[0].preventDefault&&(s.at="left top"),f=m.width,u=m.height,d=m.offset,g=t.extend({},d),t.each(["my","at"],(function(){var t,e,i=(s[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):a.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=a.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),x[this]=[t?t[0]:0,e?e[0]:0],s[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]})),1===P.length&&(P[1]=P[0]),"right"===s.at[0]?g.left+=f:"center"===s.at[0]&&(g.left+=f/2),"bottom"===s.at[1]?g.top+=u:"center"===s.at[1]&&(g.top+=u/2),c=e(x.at,f,u),g.left+=c[0],g.top+=c[1],this.each((function(){var r,a,h=t(this),l=h.outerWidth(),p=h.outerHeight(),m=i(this,"marginLeft"),v=i(this,"marginTop"),_=l+m+i(this,"marginRight")+y.width,C=p+v+i(this,"marginBottom")+y.height,z=t.extend({},g),H=e(x.my,h.outerWidth(),h.outerHeight());"right"===s.my[0]?z.left-=l:"center"===s.my[0]&&(z.left-=l/2),"bottom"===s.my[1]?z.top-=p:"center"===s.my[1]&&(z.top-=p/2),z.left+=H[0],z.top+=H[1],r={marginLeft:m,marginTop:v},t.each(["left","top"],(function(e,i){t.ui.position[P[e]]&&t.ui.position[P[e]][i](z,{targetWidth:f,targetHeight:u,elemWidth:l,elemHeight:p,collisionPosition:r,collisionWidth:_,collisionHeight:C,offset:[c[0]+H[0],c[1]+H[1]],my:s.my,at:s.at,within:w,elem:h})})),s.using&&(a=function(t){var e=d.left-z.left,i=e+f-l,r=d.top-z.top,a=r+u-p,c={target:{element:b,left:d.left,top:d.top,width:f,height:u},element:{element:h,left:z.left,top:z.top,width:l,height:p},horizontal:i<0?"left":e>0?"right":"center",vertical:a<0?"top":r>0?"bottom":"middle"};f<l&&n(e+i)<f&&(c.horizontal="center"),u<p&&n(r+a)<u&&(c.vertical="middle"),o(n(e),n(i))>o(n(r),n(a))?c.important="horizontal":c.important="vertical",s.using.call(this,t,c)}),h.offset(t.extend(z,{using:a}))}))},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,r=s.width,a=t.left-e.collisionPosition.marginLeft,h=n-a,l=a+e.collisionWidth-r-n;e.collisionWidth>r?h>0&&l<=0?(i=t.left+h+e.collisionWidth-r-n,t.left+=h-i):t.left=l>0&&h<=0?n:h>l?n+r-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-a,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,r=e.within.height,a=t.top-e.collisionPosition.marginTop,h=n-a,l=a+e.collisionHeight-r-n;e.collisionHeight>r?h>0&&l<=0?(i=t.top+h+e.collisionHeight-r-n,t.top+=h-i):t.top=l>0&&h<=0?n:h>l?n+r-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-a,t.top)}},flip:{left:function(t,e){var i,s,o=e.within,r=o.offset.left+o.scrollLeft,a=o.width,h=o.isWindow?o.scrollLeft:o.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,p=l+e.collisionWidth-a-h,f="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,u="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,d=-2*e.offset[0];c<0?((i=t.left+f+u+d+e.collisionWidth-a-r)<0||i<n(c))&&(t.left+=f+u+d):p>0&&((s=t.left-e.collisionPosition.marginLeft+f+u+d-h)>0||n(s)<p)&&(t.left+=f+u+d)},top:function(t,e){var i,s,o=e.within,r=o.offset.top+o.scrollTop,a=o.height,h=o.isWindow?o.scrollTop:o.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,p=l+e.collisionHeight-a-h,f="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,u="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,d=-2*e.offset[1];c<0?((s=t.top+f+u+d+e.collisionHeight-a-r)<0||s<n(c))&&(t.top+=f+u+d):p>0&&((i=t.top-e.collisionPosition.marginTop+f+u+d-h)>0||n(i)<p)&&(t.top+=f+u+d)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo((function(e){return function(i){return!!t.data(i,e)}})):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:(c="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(c+".ui-disableSelection",(function(t){t.preventDefault()}))}),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout((function(){var i=e.data("ui-form-reset-instances");t.each(i,(function(){this.refresh()}))}))},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,o=e?/(auto|scroll|hidden)/:/(auto|scroll)/,n=this.parents().filter((function(){var e=t(this);return(!s||"static"!==e.css("position"))&&o.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))})).eq(0);return"fixed"!==i&&n.length?n:t(this[0].ownerDocument||document)},t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),s=!1,t(document).on("mouseup",(function(){s=!1})),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,(function(t){return e._mouseDown(t)})).on("click."+this.widgetName,(function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!s){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,o=1===e.which,n=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(o&&!n&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){i.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),s=!0,0)))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,s=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var o,n=t.ui[e].prototype;for(o in s)n.plugins[o]=n.plugins[o]||[],n.plugins[o].push([i,s[o]])},call:function(t,e,i,s){var o,n=t.plugins[e];if(n&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<n.length;o++)t.options[n[o][0]]&&n[o][1].apply(t.element,i)}},t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0||(this.handle=this._getHandle(e),!this.handle||(this._blurActiveElement(e),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),0)))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map((function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===t(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(!1===this._trigger("drag",e,s))return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==i._trigger("stop",e)&&i._clear()})):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),o=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,o=this.options,n=this.document[0];this.relativeContainer=null,o.containment?"window"!==o.containment?"document"!==o.containment?o.containment.constructor!==Array?("parent"===o.containment&&(o.containment=this.helper[0].parentNode),(s=(i=t(o.containment))[0])&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=o.containment:this.containment=[0,0,t(n).width()-this.helperProportions.width-this.margins.left,(t(n).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,o,n,r=this.options,a=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),r.grid&&(o=r.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,l=i?o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-r.grid[1]:o+r.grid[1]:o,n=r.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,h=i?n-this.offset.click.left>=i[0]||n-this.offset.click.left>i[2]?n:n-this.offset.click.left>=i[0]?n-r.grid[0]:n+r.grid[0]:n),"y"===r.axis&&(h=this.originalPageX),"x"===r.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var o=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each((function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,o))}))},stop:function(e,i,s){var o=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,(function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,o))}))},drag:function(e,i,s){t.each(s.sortables,(function(){var o=!1,n=this;n.positionAbs=s.positionAbs,n.helperProportions=s.helperProportions,n.offset.click=s.offset.click,n._intersectsWith(n.containerCache)&&(o=!0,t.each(s.sortables,(function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==n&&this._intersectsWith(this.containerCache)&&t.contains(n.element[0],this.element[0])&&(o=!1),o}))),o?(n.isOver||(n.isOver=1,s._parent=i.helper.parent(),n.currentItem=i.helper.appendTo(n.element).data("ui-sortable-item",!0),n.options._helper=n.options.helper,n.options.helper=function(){return i.helper[0]},e.target=n.currentItem[0],n._mouseCapture(e,!0),n._mouseStart(e,!0,!0),n.offset.click.top=s.offset.click.top,n.offset.click.left=s.offset.click.left,n.offset.parent.left-=s.offset.parent.left-n.offset.parent.left,n.offset.parent.top-=s.offset.parent.top-n.offset.parent.top,s._trigger("toSortable",e),s.dropped=n.element,t.each(s.sortables,(function(){this.refreshPositions()})),s.currentItem=s.element,n.fromOutside=s),n.currentItem&&(n._mouseDrag(e),i.position=n.position)):n.isOver&&(n.isOver=0,n.cancelHelperRemoval=!0,n.options._revert=n.options.revert,n.options.revert=!1,n._trigger("out",e,n._uiHash(n)),n._mouseStop(e,!0),n.options.revert=n.options._revert,n.options.helper=n.options._helper,n.placeholder&&n.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,(function(){this.refreshPositions()})))}))}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var o=t("body"),n=s.options;o.css("cursor")&&(n._cursor=o.css("cursor")),o.css("cursor",n.cursor)},stop:function(e,i,s){var o=s.options;o._cursor&&t("body").css("cursor",o._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var o=t(i.helper),n=s.options;o.css("opacity")&&(n._opacity=o.css("opacity")),o.css("opacity",n.opacity)},stop:function(e,i,s){var o=s.options;o._opacity&&t(i.helper).css("opacity",o._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var o=s.options,n=!1,r=s.scrollParentNotHidden[0],a=s.document[0];r!==a&&"HTML"!==r.tagName?(o.axis&&"x"===o.axis||(s.overflowOffset.top+r.offsetHeight-e.pageY<o.scrollSensitivity?r.scrollTop=n=r.scrollTop+o.scrollSpeed:e.pageY-s.overflowOffset.top<o.scrollSensitivity&&(r.scrollTop=n=r.scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||(s.overflowOffset.left+r.offsetWidth-e.pageX<o.scrollSensitivity?r.scrollLeft=n=r.scrollLeft+o.scrollSpeed:e.pageX-s.overflowOffset.left<o.scrollSensitivity&&(r.scrollLeft=n=r.scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(e.pageY-t(a).scrollTop()<o.scrollSensitivity?n=t(a).scrollTop(t(a).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<o.scrollSensitivity&&(n=t(a).scrollTop(t(a).scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(e.pageX-t(a).scrollLeft()<o.scrollSensitivity?n=t(a).scrollLeft(t(a).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<o.scrollSensitivity&&(n=t(a).scrollLeft(t(a).scrollLeft()+o.scrollSpeed)))),!1!==n&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var o=s.options;s.snapElements=[],t(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each((function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})}))},drag:function(e,i,s){var o,n,r,a,h,l,c,p,f,u,d=s.options,g=d.snapTolerance,m=i.offset.left,v=m+s.helperProportions.width,_=i.offset.top,b=_+s.helperProportions.height;for(f=s.snapElements.length-1;f>=0;f--)l=(h=s.snapElements[f].left-s.margins.left)+s.snapElements[f].width,p=(c=s.snapElements[f].top-s.margins.top)+s.snapElements[f].height,v<h-g||m>l+g||b<c-g||_>p+g||!t.contains(s.snapElements[f].item.ownerDocument,s.snapElements[f].item)?(s.snapElements[f].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[f].item})),s.snapElements[f].snapping=!1):("inner"!==d.snapMode&&(o=Math.abs(c-b)<=g,n=Math.abs(p-_)<=g,r=Math.abs(h-v)<=g,a=Math.abs(l-m)<=g,o&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),n&&(i.position.top=s._convertPositionTo("relative",{top:p,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),u=o||n||r||a,"outer"!==d.snapMode&&(o=Math.abs(c-_)<=g,n=Math.abs(p-b)<=g,r=Math.abs(h-m)<=g,a=Math.abs(l-v)<=g,o&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),n&&(i.position.top=s._convertPositionTo("relative",{top:p-s.helperProportions.height,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[f].snapping&&(o||n||r||a||u)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[f].item})),s.snapElements[f].snapping=o||n||r||a||u)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var o,n=s.options,r=t.makeArray(t(n.stack)).sort((function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)}));r.length&&(o=parseInt(t(r[0]).css("zIndex"),10)||0,t(r).each((function(e){t(this).css("zIndex",o+e)})),this.css("zIndex",o+r.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var o=t(i.helper),n=s.options;o.css("zIndex")&&(n._zIndex=o.css("zIndex")),o.css("zIndex",n.zIndex)},stop:function(e,i,s){var o=s.options;o._zIndex&&t(i.helper).css("zIndex",o._zIndex)}}),t.ui.draggable,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return!(!s||(s.currentItem||s.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var i=t(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&o(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e))return n=!0,!1})),!n&&!!this.accept.call(this.element[0],s.currentItem||s.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),o=t.ui.intersect=function(){function t(t,e,i){return t>=e&&t<e+i}return function(e,i,s,o){if(!i.offset)return!1;var n=(e.positionAbs||e.position.absolute).left+e.margins.left,r=(e.positionAbs||e.position.absolute).top+e.margins.top,a=n+e.helperProportions.width,h=r+e.helperProportions.height,l=i.offset.left,c=i.offset.top,p=l+i.proportions().width,f=c+i.proportions().height;switch(s){case"fit":return l<=n&&a<=p&&c<=r&&h<=f;case"intersect":return l<n+e.helperProportions.width/2&&a-e.helperProportions.width/2<p&&c<r+e.helperProportions.height/2&&h-e.helperProportions.height/2<f;case"pointer":return t(o.pageY,c,i.proportions().height)&&t(o.pageX,l,i.proportions().width);case"touch":return(r>=c&&r<=f||h>=c&&h<=f||r<c&&h>f)&&(n>=l&&n<=p||a>=l&&a<=p||n<l&&a>p);default:return!1}}}(),t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,i){var s,o,n=t.ui.ddmanager.droppables[e.options.scope]||[],r=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;s<n.length;s++)if(!(n[s].options.disabled||e&&!n[s].accept.call(n[s].element[0],e.currentItem||e.element))){for(o=0;o<a.length;o++)if(a[o]===n[s].element[0]){n[s].proportions().height=0;continue t}n[s].visible="none"!==n[s].element.css("display"),n[s].visible&&("mousedown"===r&&n[s]._activate.call(n[s],i),n[s].offset=n[s].element.offset(),n[s].proportions({width:n[s].element[0].offsetWidth,height:n[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&o(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))})),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",(function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}))},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,r,a=o(e,this,this.options.tolerance,i),h=!a&&this.isover?"isout":a&&!this.isover?"isover":null;h&&(this.options.greedy&&(n=this.options.scope,(r=this.element.parents(":data(ui-droppable)").filter((function(){return t(this).droppable("instance").options.scope===n}))).length&&((s=t(r[0]).droppable("instance")).greedyChild="isover"===h)),s&&"isover"===h&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[h]=!0,this["isout"===h?"isover":"isout"]=!1,this["isover"===h?"_over":"_out"].call(this,i),s&&"isout"===h&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}}))},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},!1!==t.uiBackCompat&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s,o=i&&"left"===i?"scrollLeft":"scrollTop";return e[o]>0||(e[o]=1,s=e[o]>0,e[o]=0,s)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",(function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())})).on("mouseleave",(function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){this._super(t,e),"handles"===t&&(this._removeHandles(),this._setupHandles())},_setupHandles:function(){var e,i,s,o,n,r=this.options,a=this;if(this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;i<s.length;i++)o="ui-resizable-"+(e=t.trim(s[i])),n=t("<div>"),this._addClass(n,"ui-resizable-handle "+o),n.css({zIndex:r.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(n);this._renderAxis=function(e){var i,s,o,n;for(i in e=e||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),n=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),o=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(o,n),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")})),r.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,o=!1;for(i in this.handles)((s=t(this.handles[i])[0])===e.target||t.contains(s,e.target))&&(o=!0);return!this.options.disabled&&o},_mouseStart:function(e){var i,s,o,n=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),n.containment&&(i+=t(n.containment).scrollLeft()||0,s+=t(n.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof n.aspectRatio?n.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,o=this.originalMousePosition,n=this.axis,r=e.pageX-o.left||0,a=e.pageY-o.top||0,h=this._change[n];return this._updatePrevProperties(),!!h&&(i=h.apply(this,[e,r,a]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,s,o,n,r,a,h,l=this.options,c=this;return this._helper&&(o=(s=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,n=s?0:c.sizeDiff.width,r={width:c.helper.width()-n,height:c.helper.height()-o},a=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(r,{top:h,left:a})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,o,n,r=this.options;n={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,s=n.minWidth/this.aspectRatio,i=n.maxHeight*this.aspectRatio,o=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),s>n.minHeight&&(n.minHeight=s),i<n.maxWidth&&(n.maxWidth=i),o<n.maxHeight&&(n.maxHeight=o)),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,n=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return n&&(t.width=e.minWidth),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),n&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),r&&c&&(t.top=h-e.minHeight),o&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],o=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(o[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,o=i._proportionallyResizeElements,n=o.length&&/textarea/i.test(o[0].nodeName),r=n&&i._hasScroll(o[0],"left")?0:i.sizeDiff.height,a=n?0:i.sizeDiff.width,h={width:i.size.width-a,height:i.size.height-r},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};o&&o.length&&t(o[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,o,n,r,a,h=t(this).resizable("instance"),l=h.options,c=h.element,p=l.containment,f=p instanceof t?p.get(0):/parent/.test(p)?c.parent().get(0):p;f&&(h.containerElement=t(f),/document/.test(p)||p===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(f),i=[],t(["Top","Right","Left","Bottom"]).each((function(t,s){i[t]=h._num(e.css("padding"+s))})),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,o=h.containerSize.height,n=h.containerSize.width,r=h._hasScroll(f,"left")?f.scrollWidth:n,a=h._hasScroll(f)?f.scrollHeight:o,h.parentData={element:f,left:s.left,top:s.top,width:r,height:a}))},resize:function(e){var i,s,o,n,r=t(this).resizable("instance"),a=r.options,h=r.containerOffset,l=r.position,c=r._aspectRatio||e.shiftKey,p={top:0,left:0},f=r.containerElement,u=!0;f[0]!==document&&/static/.test(f.css("position"))&&(p=h),l.left<(r._helper?h.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-h.left:r.position.left-p.left),c&&(r.size.height=r.size.width/r.aspectRatio,u=!1),r.position.left=a.helper?h.left:0),l.top<(r._helper?h.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-h.top:r.position.top),c&&(r.size.width=r.size.height*r.aspectRatio,u=!1),r.position.top=r._helper?h.top:0),o=r.containerElement.get(0)===r.element.parent().get(0),n=/relative|absolute/.test(r.containerElement.css("position")),o&&n?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),i=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-p.left:r.offset.left-h.left)),s=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-p.top:r.offset.top-h.top)),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,c&&(r.size.height=r.size.width/r.aspectRatio,u=!1)),s+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-s,c&&(r.size.width=r.size.height*r.aspectRatio,u=!1)),u||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,o=e.containerPosition,n=e.containerElement,r=t(e.helper),a=r.offset(),h=r.outerWidth()-e.sizeDiff.width,l=r.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(n.css("position"))&&t(this).css({left:a.left-o.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(n.css("position"))&&t(this).css({left:a.left-o.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance").options;t(e.alsoResize).each((function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})}))},resize:function(e,i){var s=t(this).resizable("instance"),o=s.options,n=s.originalSize,r=s.originalPosition,a={height:s.size.height-n.height||0,width:s.size.width-n.width||0,top:s.position.top-r.top||0,left:s.position.left-r.left||0};t(o.alsoResize).each((function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),o={},n=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(n,(function(t,e){var i=(s[e]||0)+(a[e]||0);i&&i>=0&&(o[e]=i||null)})),e.css(o)}))},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,o=i.size,n=i.originalSize,r=i.originalPosition,a=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,p=Math.round((o.width-n.width)/l)*l,f=Math.round((o.height-n.height)/c)*c,u=n.width+p,d=n.height+f,g=s.maxWidth&&s.maxWidth<u,m=s.maxHeight&&s.maxHeight<d,v=s.minWidth&&s.minWidth>u,_=s.minHeight&&s.minHeight>d;s.grid=h,v&&(u+=l),_&&(d+=c),g&&(u-=l),m&&(d-=c),/^(se|s|e)$/.test(a)?(i.size.width=u,i.size.height=d):/^(ne)$/.test(a)?(i.size.width=u,i.size.height=d,i.position.top=r.top-f):/^(sw)$/.test(a)?(i.size.width=u,i.size.height=d,i.position.left=r.left-p):((d-c<=0||u-l<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),d-c>0?(i.size.height=d,i.position.top=r.top-f):(d=c-e.height,i.size.height=d,i.position.top=r.top+n.height-d),u-l>0?(i.size.width=u,i.position.left=r.left-p):(u=l-e.width,i.size.width=u,i.position.left=r.left+n.width-u))}}),t.ui.resizable,t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each((function(){var i=t(this),s=i.offset(),o={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:o.left,top:o.top,right:o.left+i.outerWidth(),bottom:o.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})}))},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each((function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))})),t(e.target).parents().addBack().each((function(){var s,o=t.data(this,"selectable-item");if(o)return s=!e.metaKey&&!e.ctrlKey||!o.$element.hasClass("ui-selected"),i._removeClass(o.$element,s?"ui-unselecting":"ui-selected")._addClass(o.$element,s?"ui-selecting":"ui-unselecting"),o.unselecting=!s,o.selecting=s,o.selected=s,s?i._trigger("selecting",e,{selecting:o.element}):i._trigger("unselecting",e,{unselecting:o.element}),!1})))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,o=this.options,n=this.opos[0],r=this.opos[1],a=e.pageX,h=e.pageY;return n>a&&(i=a,a=n,n=i),r>h&&(i=h,h=r,r=i),this.helper.css({left:n,top:r,width:a-n,height:h-r}),this.selectees.each((function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===o.tolerance?l=!(c.left>a||c.right<n||c.top>h||c.bottom<r):"fit"===o.tolerance&&(l=c.left>n&&c.right<a&&c.top>r&&c.bottom<h),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))})),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each((function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})})),t(".ui-selecting",this.element[0]).each((function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})})),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,(function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")}))},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,o=!1,n=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(e),t(e.target).parents().each((function(){if(t.data(this,n.widgetName+"-item")===n)return s=t(this),!1})),t.data(e.target,n.widgetName+"-item")===n&&(s=t(e.target)),!s||this.options.handle&&!i&&(t(this.options.handle,s).find("*").addBack().each((function(){this===e.target&&(o=!0)})),!o)||(this.currentItem=s,this._removeCurrentsFromItems(),0)))},_mouseStart:function(e,i,s){var o,n,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(n=this.document.find("body"),this.storedCursor=n.css("cursor"),n.css("cursor",r.cursor),this.storedStylesheet=t("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(n)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,o,n,r=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+r.scrollSpeed:e.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+r.scrollSpeed:e.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(e.pageY-this.document.scrollTop()<r.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-r.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<r.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+r.scrollSpeed)),e.pageX-this.document.scrollLeft()<r.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-r.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<r.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+r.scrollSpeed))),!1!==a&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(o=(s=this.items[i]).item[0],(n=this._intersectsWithPointer(s))&&s.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===o||t.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],o))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,o=this.placeholder.offset(),n=this.options.axis,r={};n&&"x"!==n||(r.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(r.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,(function(){s._clear(e)}))}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each((function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))})),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each((function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")})),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,o=s+this.helperProportions.height,n=t.left,r=n+t.width,a=t.top,h=a+t.height,l=this.offset.click.top,c=this.offset.click.left,p="x"===this.options.axis||s+l>a&&s+l<h,f="y"===this.options.axis||e+c>n&&e+c<r,u=p&&f;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u:n<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<s+this.helperProportions.height/2&&o-this.helperProportions.height/2<h},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!s||!o)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&i||"left"===o&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var s,o,n,r,a=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=(n=t(l[s],this.document[0])).length-1;o>=0;o--)(r=t.data(n[o],this.widgetFullName))&&r!==this&&!r.options.disabled&&h.push([t.isFunction(r.options.items)?r.options.items.call(r.element):t(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,(function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0}))},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,o,n,r,a,h,l,c=this.items,p=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(i=f.length-1;i>=0;i--)for(s=(o=t(f[i],this.document[0])).length-1;s>=0;s--)(n=t.data(o[s],this.widgetFullName))&&n!==this&&!n.options.disabled&&(p.push([t.isFunction(n.options.items)?n.options.items.call(n.element[0],e,{item:this.currentItem}):t(n.options.items,n.element),n]),this.containers.push(n));for(i=p.length-1;i>=0;i--)for(r=p[i][1],s=0,l=(a=p[i][0]).length;s<l;s++)(h=t(a[s])).data(this.widgetName+"-item",r),c.push({item:h,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var i,s,o,n;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),i=this.items.length-1;i>=0;i--)(s=this.items[i]).instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=o.outerWidth(),s.height=o.outerHeight()),n=o.offset(),s.left=n.left,s.top=n.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)n=this.containers[i].element.offset(),this.containers[i].containerCache.left=n.left,this.containers[i].containerCache.top=n.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){var i,s=(e=e||this).options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),o=t("<"+s+">",e.document[0]);return e._addClass(o,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(o)):"tr"===s?e._createTrPlaceholder(e.currentItem,o):"img"===s&&o.attr("src",e.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(t,o){i&&!s.forcePlaceholderSize||(o.height()||o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each((function(){t("<td> </td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)}))},_contactContainers:function(e){var i,s,o,n,r,a,h,l,c,p,f=null,u=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(f&&t.contains(this.containers[i].element[0],f.element[0]))continue;f=this.containers[i],u=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",e,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(o=1e4,n=null,r=(c=f.floating||this._isFloating(this.currentItem))?"left":"top",a=c?"width":"height",p=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[u].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[r],l=!1,e[p]-h>this.items[s][a]/2&&(l=!0),Math.abs(e[p]-h)<o&&(o=Math.abs(e[p]-h),n=this.items[s],this.direction=l?"up":"down"));if(!n&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[u])return void(this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));n?this._rearrange(e,n,null,!0):this._rearrange(e,null,this.containers[u].element,!0),this._trigger("change",e,this._uiHash()),this.containers[u]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[u],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[u]._trigger("over",e,this._uiHash(this)),this.containers[u].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),s[0].style.width&&!i.forceHelperSize||s.width(this.currentItem.width()),s[0].style.height&&!i.forceHelperSize||s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===o.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(e=t(o.containment)[0],i=t(o.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,n=/(html|body)/i.test(o[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():n?0:o.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():n?0:o.scrollLeft())*s}},_generatePosition:function(e){var i,s,o=this.options,n=e.pageX,r=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(n=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(n=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/o.grid[1])*o.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,s=this.originalPageX+Math.round((n-this.originalPageX)/o.grid[0])*o.grid[0],n=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-o.grid[0]:s+o.grid[0]:s)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:a.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:a.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay((function(){o===this.counter&&this.refreshPositions(!s)}))},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)"auto"!==this._storedCSS[s]&&"static"!==this._storedCSS[s]||(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&o.push((function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||o.push((function(t){this._trigger("update",t,this._uiHash())})),this!==this.currentContainer&&(e||(o.push((function(t){this._trigger("remove",t,this._uiHash())})),o.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||o.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(o.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;s<o.length;s++)o[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),n="ui-effects-",r="ui-effects-style",a="ui-effects-animated",h=t,t.effects={effect:{}},function(t,e){function i(t,e,i){var s=c[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:s.max<t?s.max:t)}function s(e){var i=h(),s=i._rgba=[];return e=e.toLowerCase(),u(a,(function(t,o){var n,r=o.re.exec(e),a=r&&o.parse(r),h=o.space||"rgba";if(a)return n=i[h](a),i[l[h].cache]=n[l[h].cache],s=i._rgba=n._rgba,!1})),s.length?("0,0,0,0"===s.join()&&t.extend(s,n.transparent),i):n[e]}function o(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}var n,r=/^([\-+])=\s*(\d+\.?\d*)/,a=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,o){return new t.Color.fn.parse(e,i,s,o)},l={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},c={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},p=h.support={},f=t("<p>")[0],u=t.each;f.style.cssText="background-color:rgba(1,1,1,.5)",p.rgba=f.style.backgroundColor.indexOf("rgba")>-1,u(l,(function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}})),h.fn=t.extend(h.prototype,{parse:function(o,r,a,c){if(o===e)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=t(o).css(r),r=e);var p=this,f=t.type(o),d=this._rgba=[];return r!==e&&(o=[o,r,a,c],f="array"),"string"===f?this.parse(s(o)||n._default):"array"===f?(u(l.rgba.props,(function(t,e){d[e.idx]=i(o[e.idx],e)})),this):"object"===f?(u(l,o instanceof h?function(t,e){o[e.cache]&&(p[e.cache]=o[e.cache].slice())}:function(e,s){var n=s.cache;u(s.props,(function(t,e){if(!p[n]&&s.to){if("alpha"===t||null==o[t])return;p[n]=s.to(p._rgba)}p[n][e.idx]=i(o[t],e,!0)})),p[n]&&t.inArray(null,p[n].slice(0,3))<0&&(p[n][3]=1,s.from&&(p._rgba=s.from(p[n])))}),this):void 0},is:function(t){var e=h(t),i=!0,s=this;return u(l,(function(t,o){var n,r=e[o.cache];return r&&(n=s[o.cache]||o.to&&o.to(s._rgba)||[],u(o.props,(function(t,e){if(null!=r[e.idx])return i=r[e.idx]===n[e.idx]}))),i})),i},_space:function(){var t=[],e=this;return u(l,(function(i,s){e[s.cache]&&t.push(i)})),t.pop()},transition:function(t,e){var s=h(t),o=s._space(),n=l[o],r=0===this.alpha()?h("transparent"):this,a=r[n.cache]||n.to(r._rgba),p=a.slice();return s=s[n.cache],u(n.props,(function(t,o){var n=o.idx,r=a[n],h=s[n],l=c[o.type]||{};null!==h&&(null===r?p[n]=h:(l.mod&&(h-r>l.mod/2?r+=l.mod:r-h>l.mod/2&&(r-=l.mod)),p[n]=i((h-r)*e+r,o)))})),this[o](p)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),o=h(e)._rgba;return h(t.map(i,(function(t,e){return(1-s)*o[e]+s*t})))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,(function(t,e){return t??(e>2?1:0)}));return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),(function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t}));return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,(function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t})).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,l.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,o=t[1]/255,n=t[2]/255,r=t[3],a=Math.max(s,o,n),h=Math.min(s,o,n),l=a-h,c=a+h,p=.5*c;return e=h===a?0:s===a?60*(o-n)/l+360:o===a?60*(n-s)/l+120:60*(s-o)/l+240,i=0===l?0:p<=.5?l/c:l/(2-c),[Math.round(e)%360,i,p,r??1]},l.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],n=t[3],r=s<=.5?s*(1+i):s+i-s*i,a=2*s-r;return[Math.round(255*o(a,r,e+1/3)),Math.round(255*o(a,r,e)),Math.round(255*o(a,r,e-1/3)),n]},u(l,(function(s,o){var n=o.props,a=o.cache,l=o.to,c=o.from;h.fn[s]=function(s){if(l&&!this[a]&&(this[a]=l(this._rgba)),s===e)return this[a].slice();var o,r=t.type(s),p="array"===r||"object"===r?s:arguments,f=this[a].slice();return u(n,(function(t,e){var s=p["object"===r?t:e.idx];null==s&&(s=f[e.idx]),f[e.idx]=i(s,e)})),c?((o=h(c(f)))[a]=f,o):h(f)},u(n,(function(e,i){h.fn[e]||(h.fn[e]=function(o){var n,a=t.type(o),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(o=o.call(this,c),a=t.type(o)),null==o&&i.empty?this:("string"===a&&(n=r.exec(o))&&(o=c+parseFloat(n[2])*("+"===n[1]?1:-1)),l[i.idx]=o,this[h](l)))})}))})),h.hook=function(e){var i=e.split(" ");u(i,(function(e,i){t.cssHooks[i]={set:function(e,o){var n,r,a="";if("transparent"!==o&&("string"!==t.type(o)||(n=s(o)))){if(o=h(n||o),!p.rgba&&1!==o._rgba[3]){for(r="backgroundColor"===i?e.parentNode:e;(""===a||"transparent"===a)&&r&&r.style;)try{a=t.css(r,"backgroundColor"),r=r.parentNode}catch(t){}o=o.blend(a&&"transparent"!==a?a:"_default")}o=o.toRgbaString()}try{e.style[i]=o}catch(t){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}}))},h.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return u(["Top","Right","Bottom","Left"],(function(i,s){e["border"+s+"Color"]=t})),e}},n=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(h),function(){function e(e){var i,s,o=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,n={};if(o&&o.length&&o[0]&&o[o[0]])for(s=o.length;s--;)"string"==typeof o[i=o[s]]&&(n[t.camelCase(i)]=o[i]);else for(i in o)"string"==typeof o[i]&&(n[i]=o[i]);return n}var i=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(h.style(t.elem,i,t.end),t.setAttr=!0)}})),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(o,n,r,a){var h=t.speed(n,r,a);return this.queue((function(){var n,r=t(this),a=r.attr("class")||"",l=h.children?r.find("*").addBack():r;l=l.map((function(){return{el:t(this),start:e(this)}})),(n=function(){t.each(i,(function(t,e){o[e]&&r[e+"Class"](o[e])}))})(),l=l.map((function(){return this.end=e(this.el[0]),this.diff=function(e,i){var o,n,r={};for(o in i)n=i[o],e[o]!==n&&(s[o]||!t.fx.step[o]&&isNaN(parseFloat(n))||(r[o]=n));return r}(this.start,this.end),this})),r.attr("class",a),l=l.map((function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()})),t.when.apply(t,l.get()).done((function(){n(),t.each(arguments,(function(){var e=this.el;t.each(this.diff,(function(t){e.css(t,"")}))})),h.complete.call(r[0])}))}))},t.fn.extend({addClass:function(e){return function(i,s,o,n){return s?t.effects.animateClass.call(this,{add:i},s,o,n):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,o,n){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,o,n):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,o,n,r){return"boolean"==typeof s||void 0===s?o?t.effects.animateClass.call(this,s?{add:i}:{remove:i},o,n,r):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,o,n)}}(t.fn.toggleClass),switchClass:function(e,i,s,o,n){return t.effects.animateClass.call(this,{add:i,remove:e},s,o,n)}})}(),function(){function e(e,i,s,o){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(o=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(o=s,s=i,i={}),t.isFunction(s)&&(o=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=o||i.complete,e}function i(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||"string"==typeof e&&!t.effects.effect[e]||!!t.isFunction(e)||"object"==typeof e&&!e.effect}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),o=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(a)||e(i)}}(t.expr.filters.animated)),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(n+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,o=e.length;s<o;s++)null!==e[s]&&(i=t.data(n+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),float:e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:e.width(),height:e.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return e.wrap(s),(e[0]===n||t.contains(e[0],n))&&t(n).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],(function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")})),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(o),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,o="vertical"!==i?(e||100)/100:1;return{height:t.height()*o,width:t.width()*s,outerHeight:t.outerHeight()*o,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(r,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(r)||"",t.removeData(r)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),o=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(n+"placeholder",i)),e.css({position:s,left:o.left,top:o.top}),i},removePlaceholder:function(t){var e=n+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,o){return o=o||{},t.each(i,(function(t,i){var n=e.cssUnit(i);n[0]>0&&(o[i]=n[0]*s+n[1])})),o}}),t.fn.extend({effect:function(){function i(e){function i(){t.isFunction(l)&&l.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=p.shift(),!1===t.uiBackCompat||n?"none"===s.mode?(r[c](),i()):o.call(r[0],s,(function(){r.removeData(a),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),i()})):(r.is(":hidden")?"hide"===c:"show"===c)?(r[c](),i()):o.call(r[0],s,i)}var s=e.apply(this,arguments),o=t.effects.effect[s.effect],n=o.mode,r=s.queue,h=r||"fx",l=s.complete,c=s.mode,p=[],f=function(e){var i=t(this),s=t.effects.mode(i,c)||n;i.data(a,!0),p.push(s),n&&("show"===s||s===n&&"hide"===s)&&i.show(),n&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!o?c?this[c](s.duration,l):this.each((function(){l&&l.call(this)})):!1===r?this.each(f).each(i):this.queue(h,f).queue(h,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="show",this.effect.call(this,o)}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="hide",this.effect.call(this,o)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="toggle",this.effect.call(this,o)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],(function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])})),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),o=t(e.to),n="fixed"===o.css("position"),r=t("body"),a=n?r.scrollTop():0,h=n?r.scrollLeft():0,l=o.offset(),c={top:l.top-a,left:l.left-h,height:o.innerHeight(),width:o.innerWidth()},p=s.offset(),f=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:p.top-a,left:p.left-h,height:s.innerHeight(),width:s.innerWidth(),position:n?"fixed":"absolute"}).animate(c,e.duration,e.easing,(function(){f.remove(),t.isFunction(i)&&i()}))}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),p={},t.each(["Quad","Cubic","Quart","Quint","Expo"],(function(t,e){p[e]=function(e){return Math.pow(e,t+2)}})),t.extend(p,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(p,(function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(-2*t+2)/2}})),t.effects,t.effects.define("blind","hide",(function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},o=t(this),n=e.direction||"up",r=o.cssClip(),a={clip:t.extend({},r)},h=t.effects.createPlaceholder(o);a.clip[s[n][0]]=a.clip[s[n][1]],"show"===e.mode&&(o.cssClip(a.clip),h&&h.css(t.effects.clipToBox(a)),a.clip=r),h&&h.animate(t.effects.clipToBox(a),e.duration,e.easing),o.animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("bounce",(function(e,i){var s,o,n,r=t(this),a=e.mode,h="hide"===a,l="show"===a,c=e.direction||"up",p=e.distance,f=e.times||5,u=2*f+(l||h?1:0),d=e.duration/u,g=e.easing,m="up"===c||"down"===c?"top":"left",v="up"===c||"left"===c,_=0,b=r.queue().length;for(t.effects.createPlaceholder(r),n=r.css(m),p||(p=r["top"===m?"outerHeight":"outerWidth"]()/3),l&&((o={opacity:1})[m]=n,r.css("opacity",0).css(m,v?2*-p:2*p).animate(o,d,g)),h&&(p/=Math.pow(2,f-1)),(o={})[m]=n;_<f;_++)(s={})[m]=(v?"-=":"+=")+p,r.animate(s,d,g).animate(o,d,g),p=h?2*p:p/2;h&&((s={opacity:0})[m]=(v?"-=":"+=")+p,r.animate(s,d,g)),r.queue(i),t.effects.unshift(r,b,u+1)})),t.effects.define("drop","hide",(function(e,i){var s,o=t(this),n="show"===e.mode,r=e.direction||"left",a="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r?"-=":"+=",l="+="===h?"-=":"+=",c={opacity:0};t.effects.createPlaceholder(o),s=e.distance||o["top"===a?"outerHeight":"outerWidth"](!0)/2,c[a]=h+s,n&&(o.css(c),c[a]=l+s,c.opacity=1),o.animate(c,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("fade","toggle",(function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("fold","hide",(function(e,i){var s=t(this),o=e.mode,n="show"===o,r="hide"===o,a=e.size||15,h=/([0-9]+)%/.exec(a),l=e.horizFirst?["right","bottom"]:["bottom","right"],c=e.duration/2,p=t.effects.createPlaceholder(s),f=s.cssClip(),u={clip:t.extend({},f)},d={clip:t.extend({},f)},g=[f[l[0]],f[l[1]]],m=s.queue().length;h&&(a=parseInt(h[1],10)/100*g[r?0:1]),u.clip[l[0]]=a,d.clip[l[0]]=a,d.clip[l[1]]=0,n&&(s.cssClip(d.clip),p&&p.css(t.effects.clipToBox(d)),d.clip=f),s.queue((function(i){p&&p.animate(t.effects.clipToBox(u),c,e.easing).animate(t.effects.clipToBox(d),c,e.easing),i()})).animate(u,c,e.easing).animate(d,c,e.easing).queue(i),t.effects.unshift(s,m,4)})),t.effects.define("highlight","show",(function(e,i){var s=t(this),o={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(o.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("size",(function(e,i){var s,o,n,r=t(this),a=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,p="effect"!==c,f=e.scale||"both",u=e.origin||["middle","center"],d=r.css("position"),g=r.position(),m=t.effects.scaledDimensions(r),v=e.from||m,_=e.to||t.effects.scaledDimensions(r,0);t.effects.createPlaceholder(r),"show"===c&&(n=v,v=_,_=n),o={from:{y:v.height/m.height,x:v.width/m.width},to:{y:_.height/m.height,x:_.width/m.width}},"box"!==f&&"both"!==f||(o.from.y!==o.to.y&&(v=t.effects.setTransition(r,h,o.from.y,v),_=t.effects.setTransition(r,h,o.to.y,_)),o.from.x!==o.to.x&&(v=t.effects.setTransition(r,l,o.from.x,v),_=t.effects.setTransition(r,l,o.to.x,_))),"content"!==f&&"both"!==f||o.from.y!==o.to.y&&(v=t.effects.setTransition(r,a,o.from.y,v),_=t.effects.setTransition(r,a,o.to.y,_)),u&&(s=t.effects.getBaseline(u,m),v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left,_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left),r.css(v),"content"!==f&&"both"!==f||(h=h.concat(["marginTop","marginBottom"]).concat(a),l=l.concat(["marginLeft","marginRight"]),r.find("*[width]").each((function(){var i=t(this),s=t.effects.scaledDimensions(i),n={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},r={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x};o.from.y!==o.to.y&&(n=t.effects.setTransition(i,h,o.from.y,n),r=t.effects.setTransition(i,h,o.to.y,r)),o.from.x!==o.to.x&&(n=t.effects.setTransition(i,l,o.from.x,n),r=t.effects.setTransition(i,l,o.to.x,r)),p&&t.effects.saveStyle(i),i.css(n),i.animate(r,e.duration,e.easing,(function(){p&&t.effects.restoreStyle(i)}))}))),r.animate(_,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=r.offset();0===_.opacity&&r.css("opacity",v.opacity),p||(r.css("position","static"===d?"relative":d).offset(e),t.effects.saveStyle(r)),i()}})})),t.effects.define("scale",(function(e,i){var s=t(this),o=e.mode,n=parseInt(e.percent,10)||(0===parseInt(e.percent,10)||"effect"!==o?0:100),r=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,n,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(r.from.opacity=1,r.to.opacity=0),t.effects.effect.size.call(this,r,i)})),t.effects.define("puff","hide",(function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)})),t.effects.define("pulsate","show",(function(e,i){var s=t(this),o=e.mode,n="show"===o,r=n||"hide"===o,a=2*(e.times||5)+(r?1:0),h=e.duration/a,l=0,c=1,p=s.queue().length;for(!n&&s.is(":visible")||(s.css("opacity",0).show(),l=1);c<a;c++)s.animate({opacity:l},h,e.easing),l=1-l;s.animate({opacity:l},h,e.easing),s.queue(i),t.effects.unshift(s,p,a+1)})),t.effects.define("shake",(function(e,i){var s=1,o=t(this),n=e.direction||"left",r=e.distance||20,a=e.times||3,h=2*a+1,l=Math.round(e.duration/h),c="up"===n||"down"===n?"top":"left",p="up"===n||"left"===n,f={},u={},d={},g=o.queue().length;for(t.effects.createPlaceholder(o),f[c]=(p?"-=":"+=")+r,u[c]=(p?"+=":"-=")+2*r,d[c]=(p?"-=":"+=")+2*r,o.animate(f,l,e.easing);s<a;s++)o.animate(u,l,e.easing).animate(d,l,e.easing);o.animate(u,l,e.easing).animate(f,l/2,e.easing).queue(i),t.effects.unshift(o,g,h+1)})),t.effects.define("slide","show",(function(e,i){var s,o,n=t(this),r={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,p=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),f={};t.effects.createPlaceholder(n),s=n.cssClip(),o=n.position()[l],f[l]=(c?-1:1)*p+o,f.clip=n.cssClip(),f.clip[r[h][1]]=f.clip[r[h][0]],"show"===a&&(n.cssClip(f.clip),n.css(l,f[l]),f.clip=s,f[l]=o),n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),!1!==t.uiBackCompat&&t.effects.define("transfer",(function(e,i){t(this).transfer(e,i)}))})); })(this); |
b4e0f162 |
8 | |
0d20df38 |
9 | // 3rdParty/jquery-ui/touchPunch.js |
86d65362 |
10 | (function (window, undefined) { !function(o){function t(o,t){if(!(o.originalEvent.touches.length>1)){o.preventDefault();var e=o.originalEvent.changedTouches[0],u=document.createEvent("MouseEvents");u.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(u)}}if(o.support.touch="ontouchend"in document,o.support.touch){var e,u=o.ui.mouse.prototype,n=u._mouseInit,c=u._mouseDestroy;u._touchStart=function(o){!e&&this._mouseCapture(o.originalEvent.changedTouches[0])&&(e=!0,this._touchMoved=!1,t(o,"mouseover"),t(o,"mousemove"),t(o,"mousedown"))},u._touchMove=function(o){e&&(this._touchMoved=!0,t(o,"mousemove"))},u._touchEnd=function(o){e&&(t(o,"mouseup"),t(o,"mouseout"),this._touchMoved||t(o,"click"),e=!1)},u._mouseInit=function(){var t=this;t.element.bind({touchstart:o.proxy(t,"_touchStart"),touchmove:o.proxy(t,"_touchMove"),touchend:o.proxy(t,"_touchEnd")}),n.call(t)},u._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:o.proxy(t,"_touchStart"),touchmove:o.proxy(t,"_touchMove"),touchend:o.proxy(t,"_touchEnd")}),c.call(t)}}}(jQuery); })(this); |
b4e0f162 |
11 | |
0d20df38 |
12 | // 3rdParty/jquery-ui/nestedSortable.js |
e234e470 |
13 | (function (window, undefined) { !function(t){t.widget("mjs.nestedSortable",t.extend({},t.ui.sortable.prototype,{options:{tabSize:20,disableNesting:"mjs-nestedSortable-no-nesting",errorClass:"mjs-nestedSortable-error",doNotClear:!1,listType:"ol",maxLevels:0,protectRoot:!1,rootID:null,rtl:!1,isAllowed:function(t,e){return!0}},_create:function(){if(this.element.data("sortable",this.element.data("nestedSortable")),!this.element.is(this.options.listType))throw new Error("nestedSortable: Please check the listType option is set to your actual list type");return t.ui.sortable.prototype._create.apply(this,arguments)},destroy:function(){return this.element.removeData("nestedSortable").unbind(".nestedSortable"),t.ui.sortable.prototype.destroy.apply(this,arguments)},_mouseDrag:function(e){var s,i,o,l,r,n,h,a,p,c,d,u,f;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),s=this.options,this.options.scroll&&(i=!1,this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(e.pageY-t(document).scrollTop()<s.scrollSensitivity?i=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(i=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed)),e.pageX-t(document).scrollLeft()<s.scrollSensitivity?i=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(i=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed))),!1!==i&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),o=this.placeholder.offset().top,this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px"),l=this.items.length-1;l>=0;l--)if(n=(r=this.items[l]).item[0],(h=this._intersectsWithPointer(r))&&!(n==this.currentItem[0]||this.placeholder[1==h?"next":"prev"]()[0]==n||t.contains(this.placeholder[0],n)||"semi-dynamic"==this.options.type&&t.contains(this.element[0],n))){if(t(n).mouseenter(),this.direction=1==h?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(r))break;t(n).mouseleave(),this._rearrange(e,r),this._clearEmpty(n),this._trigger("change",e,this._uiHash());break}if(a=this.placeholder[0].parentNode.parentNode&&t(this.placeholder[0].parentNode.parentNode).closest(".ui-sortable").length?t(this.placeholder[0].parentNode.parentNode):null,p=this._getLevel(this.placeholder),c=this._getChildLevels(this.helper),null!=(d=this.placeholder[0].previousSibling?t(this.placeholder[0].previousSibling):null))for(;"li"!=d[0].nodeName.toLowerCase()||d[0]==this.currentItem[0]||d[0]==this.helper[0];){if(!d[0].previousSibling){d=null;break}d=t(d[0].previousSibling)}if(null!=(u=this.placeholder[0].nextSibling?t(this.placeholder[0].nextSibling):null))for(;"li"!=u[0].nodeName.toLowerCase()||u[0]==this.currentItem[0]||u[0]==this.helper[0];){if(!u[0].nextSibling){u=null;break}u=t(u[0].nextSibling)}return f=document.createElement(s.listType),this.beyondMaxLevels=0,null!=a&&null==u&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()>a.offset().left+a.outerWidth()||!s.rtl&&this.positionAbs.left<a.offset().left)?(a.after(this.placeholder[0]),this._clearEmpty(a[0]),this._trigger("change",e,this._uiHash())):null!=d&&(s.rtl&&this.positionAbs.left+this.helper.outerWidth()<d.offset().left+d.outerWidth()-s.tabSize||!s.rtl&&this.positionAbs.left>d.offset().left+s.tabSize)?(this._isAllowed(d,p,p+c+1),d.children(s.listType).length||d[0].appendChild(f),o&&o<=d.offset().top?d.children(s.listType).prepend(this.placeholder):d.children(s.listType)[0].appendChild(this.placeholder[0]),this._trigger("change",e,this._uiHash())):this._isAllowed(a,p,p+c),this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,s){var i,o;for(this.beyondMaxLevels&&(this.placeholder.removeClass(this.options.errorClass),this.domPosition.prev?t(this.domPosition.prev).after(this.placeholder):t(this.domPosition.parent).prepend(this.placeholder),this._trigger("revert",e,this._uiHash())),i=this.items.length-1;i>=0;i--)o=this.items[i].item[0],this._clearEmpty(o);t.ui.sortable.prototype._mouseStop.apply(this,arguments)},serialize:function(e){var s=t.extend({},this.options,e),i=this._getItemsAsjQuery(s&&s.connected),o=[];return t(i).each((function(){var e=(t(s.item||this).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/),i=(t(s.item||this).parent(s.listType).parent(s.items).attr(s.attribute||"id")||"").match(s.expression||/(.+)[-=_](.+)/);e&&o.push((s.key||e[1])+"["+(s.key&&s.expression?e[1]:e[2])+"]="+(i?s.key&&s.expression?i[1]:i[2]:s.rootID))})),!o.length&&s.key&&o.push(s.key+"="),o.join("&")},toHierarchy:function(e){function s(e){var o,l=(t(e).attr(i.attribute||"id")||"").match(i.expression||/(.+)[-=_](.+)/);if(l)return o={id:l[2]},t(e).children(i.listType).children(i.items).length>0&&(o.children=[],t(e).children(i.listType).children(i.items).each((function(){var t=s(this);o.children.push(t)}))),o}var i=t.extend({},this.options,e),o=(i.startDepthCount,[]);return t(this.element).children(i.items).each((function(){var t=s(this);o.push(t)})),o},toArray:function(e){function s(e,r,n){var h,a,p=n+1;return t(e).children(i.listType).children(i.items).length>0&&(r++,t(e).children(i.listType).children(i.items).each((function(){p=s(t(this),r,p)})),r--),h=t(e).attr(i.attribute||"id").match(i.expression||/(.+)[-=_](.+)/),a=r===o+1?i.rootID:t(e).parent(i.listType).parent(i.items).attr(i.attribute||"id").match(i.expression||/(.+)[-=_](.+)/)[2],h&&l.push({item_id:h[2],parent_id:a,depth:r,left:n,right:p}),p+1}var i=t.extend({},this.options,e),o=i.startDepthCount||0,l=[],r=2;return l.push({item_id:i.rootID,parent_id:"none",depth:o,left:"1",right:2*(t(i.items,this.element).length+1)}),t(this.element).children(i.items).each((function(){r=s(this,o+1,r)})),l=l.sort((function(t,e){return t.left-e.left}))},_clearEmpty:function(e){var s=t(e).children(this.options.listType);!s.length||s.children().length||this.options.doNotClear||s.remove()},_getLevel:function(t){var e,s=1;if(this.options.listType)for(e=t.closest(this.options.listType);e&&e.length>0&&!e.is(".ui-sortable");)s++,e=e.parent().closest(this.options.listType);return s},_getChildLevels:function(e,s){var i=this,o=this.options,l=0;return s=s||0,t(e).children(o.listType).children(o.items).each((function(t,e){l=Math.max(i._getChildLevels(e,s+1),l)})),s?l+1:l},_isAllowed:function(e,s,i){var o=this.options,l=!!t(this.domPosition.parent).hasClass("ui-sortable"),r=this.placeholder.closest(".ui-sortable").nestedSortable("option","maxLevels");!o.isAllowed(this.currentItem,e)||e&&e.hasClass(o.disableNesting)||o.protectRoot&&(null==e&&!l||l&&s>1)?(this.placeholder.addClass(o.errorClass),this.beyondMaxLevels=r<i&&0!=r?i-r:1):r<i&&0!=r?(this.placeholder.addClass(o.errorClass),this.beyondMaxLevels=i-r):(this.placeholder.removeClass(o.errorClass),this.beyondMaxLevels=0)}})),t.mjs.nestedSortable.prototype.options=t.extend({},t.ui.sortable.prototype.options,t.mjs.nestedSortable.prototype.options)}(jQuery); })(this); |
5bffdfdd |
14 | |
0d20df38 |
15 | // WCF.Assets.js |
e234e470 |
16 | (function (window, undefined) { !function(){var t=!1,e=/xyz/.test((function(){xyz}))?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(n){function i(){!t&&this.init&&this.init.apply(this,arguments)}var r,o,l=this.prototype;for(o in t=!0,r=new this,t=!1,n)r[o]="function"==typeof n[o]&&"function"==typeof l[o]&&e.test(n[o])?function(t,e){return function(){var n,i=this._super;return this._super=l[t],n=e.apply(this,arguments),this._super=i,n}}(o,n[o]):n[o];return i.prototype=r,i.prototype.constructor=i,i.extend=arguments.callee,i}}(),function(t){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],t):t(jQuery)}((function(t){function e(e){return!e||void 0!==e.allowPageScroll||void 0===e.swipe&&void 0===e.swipeStatus||(e.allowPageScroll=s),void 0!==e.click&&void 0===e.tap&&(e.tap=e.click),e||(e={}),e=t.extend({},t.fn.swipe.defaults,e),this.each((function(){var i=t(this),r=i.data(P);r||(r=new n(this,e),i.data(P,r))}))}function n(e,n){function L(e){var u,a,s;if(!0!==yt.data(P+"_intouch")&&!(t(e.target).closest(n.excludedElements,yt).length>0))return u=e.originalEvent?e.originalEvent:e,s=x?u.touches[0]:u,St=y,x?Et=u.touches.length:e.preventDefault(),pt=0,ht=null,Tt=null,ft=0,dt=0,gt=0,wt=1,vt=0,mt=function(){for(var t=[],e=0;e<=5;e++)t.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return t}(),bt=function(){var t={};return t[i]=et(i),t[r]=et(r),t[o]=et(o),t[l]=et(l),t}(),Z(),!x||Et===n.fingers||n.fingers===T||X()?(K(0,s),xt=rt(),2==Et&&(K(1,u.touches[1]),dt=gt=it(mt[0].start,mt[1].start)),(n.swipeStatus||n.pinchStatus)&&(a=U(u,St))):a=!1,!1===a?(U(u,St=m),a):(n.hold&&(Rt=setTimeout(t.proxy((function(){yt.trigger("hold",[u.target]),n.hold&&(a=n.hold.call(yt,u,u.target))}),this),n.longTapThreshold)),J(!0),null)}function D(e){var p,h,f,d,g=e.originalEvent?e.originalEvent:e;St===E||St===m||B()||(h=$(x?g.touches[0]:g),Ot=rt(),x&&(Et=g.touches.length),n.hold&&clearTimeout(Rt),St=S,2==Et&&(0==dt?(K(1,g.touches[1]),dt=gt=it(mt[0].start,mt[1].start)):($(g.touches[1]),gt=it(mt[0].end,mt[1].end),mt[0].end,mt[1].end,Tt=wt<1?a:u),wt=function(t,e){return(e/t*1).toFixed(2)}(dt,gt),vt=Math.abs(dt-gt)),Et===n.fingers||n.fingers===T||!x||X()?(ht=function(t,e){var n=function(t,e){var n=t.x-e.x,i=e.y-t.y,r=Math.atan2(i,n),o=Math.round(180*r/Math.PI);return o<0&&(o=360-Math.abs(o)),o}(t,e);return n<=45&&n>=0||n<=360&&n>=315?i:n>=135&&n<=225?r:n>45&&n<135?l:o}(h.start,h.end),function(t,e){if(n.allowPageScroll===s||X())t.preventDefault();else{var u=n.allowPageScroll===c;switch(e){case i:(n.swipeLeft&&u||!u&&n.allowPageScroll!=w)&&t.preventDefault();break;case r:(n.swipeRight&&u||!u&&n.allowPageScroll!=w)&&t.preventDefault();break;case o:(n.swipeUp&&u||!u&&n.allowPageScroll!=v)&&t.preventDefault();break;case l:(n.swipeDown&&u||!u&&n.allowPageScroll!=v)&&t.preventDefault()}}}(e,ht),pt=function(t,e){return Math.round(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)))}(h.start,h.end),ft=nt(),function(t,e){e=Math.max(e,tt(t)),bt[t].distance=e}(ht,pt),(n.swipeStatus||n.pinchStatus)&&(p=U(g,St)),n.triggerOnTouchEnd&&!n.triggerOnTouchLeave||(f=!0,n.triggerOnTouchLeave&&(d=function(e){var n=(e=t(e)).offset();return{left:n.left,right:n.left+e.outerWidth(),top:n.top,bottom:n.top+e.outerHeight()}}(this),f=function(t,e){return t.x>e.left&&t.x<e.right&&t.y>e.top&&t.y<e.bottom}(h.end,d)),!n.triggerOnTouchEnd&&f?St=N(S):n.triggerOnTouchLeave&&!f&&(St=N(E)),St!=m&&St!=E||U(g,St))):U(g,St=m),!1===p&&U(g,St=m))}function R(t){var e=t.originalEvent;return x&&e.touches.length>0?(Mt=rt(),Pt=event.touches.length+1,!0):(B()&&(Et=Pt),Ot=rt(),ft=nt(),j()||!H()?U(e,St=m):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&St===S?(t.preventDefault(),U(e,St=E)):!n.triggerOnTouchEnd&&F()?_(e,St=E,f):St===S&&U(e,St=m),J(!1),null)}function k(){Et=0,Ot=0,xt=0,dt=0,gt=0,wt=1,Z(),J(!1)}function A(t){var e=t.originalEvent;n.triggerOnTouchLeave&&U(e,St=N(E))}function I(){yt.unbind(lt,L),yt.unbind(ct,k),yt.unbind(ut,D),yt.unbind(at,R),st&&yt.unbind(st,A),J(!1)}function N(t){var e=t,i=C(),r=H(),o=j();return!i||o?e=m:!r||t!=S||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!r&&t==E&&n.triggerOnTouchLeave&&(e=m):e=E,e}function U(t,e){var i=void 0;return Y()&&q()||q()?i=_(t,e,p):(Q()&&X()||X())&&!1!==i&&(i=_(t,e,h)),G()&&V()&&!1!==i?i=_(t,e,d):ft>n.longTapThreshold&&pt<b&&n.longTap&&!1!==i?i=_(t,e,g):1!==Et&&x||!(isNaN(pt)||pt<n.threshold)||!F()||!1===i||(i=_(t,e,f)),e===m&&k(),e===E&&(x?0==t.touches.length&&k():k()),i}function _(e,s,c){var w=void 0;if(c==p){if(yt.trigger("swipeStatus",[s,ht||null,pt||0,ft||0,Et,mt]),n.swipeStatus&&!1===(w=n.swipeStatus.call(yt,e,s,ht||null,pt||0,ft||0,Et,mt)))return!1;if(s==E&&Y()){if(yt.trigger("swipe",[ht,pt,ft,Et,mt]),n.swipe&&!1===(w=n.swipe.call(yt,e,ht,pt,ft,Et,mt)))return!1;switch(ht){case i:yt.trigger("swipeLeft",[ht,pt,ft,Et,mt]),n.swipeLeft&&(w=n.swipeLeft.call(yt,e,ht,pt,ft,Et,mt));break;case r:yt.trigger("swipeRight",[ht,pt,ft,Et,mt]),n.swipeRight&&(w=n.swipeRight.call(yt,e,ht,pt,ft,Et,mt));break;case o:yt.trigger("swipeUp",[ht,pt,ft,Et,mt]),n.swipeUp&&(w=n.swipeUp.call(yt,e,ht,pt,ft,Et,mt));break;case l:yt.trigger("swipeDown",[ht,pt,ft,Et,mt]),n.swipeDown&&(w=n.swipeDown.call(yt,e,ht,pt,ft,Et,mt))}}}if(c==h){if(yt.trigger("pinchStatus",[s,Tt||null,vt||0,ft||0,Et,wt,mt]),n.pinchStatus&&!1===(w=n.pinchStatus.call(yt,e,s,Tt||null,vt||0,ft||0,Et,wt,mt)))return!1;if(s==E&&Q())switch(Tt){case u:yt.trigger("pinchIn",[Tt||null,vt||0,ft||0,Et,wt,mt]),n.pinchIn&&(w=n.pinchIn.call(yt,e,Tt||null,vt||0,ft||0,Et,wt,mt));break;case a:yt.trigger("pinchOut",[Tt||null,vt||0,ft||0,Et,wt,mt]),n.pinchOut&&(w=n.pinchOut.call(yt,e,Tt||null,vt||0,ft||0,Et,wt,mt))}}return c==f?s!==m&&s!==E||(clearTimeout(Dt),clearTimeout(Rt),V()&&!G()?(Lt=rt(),Dt=setTimeout(t.proxy((function(){Lt=null,yt.trigger("tap",[e.target]),n.tap&&(w=n.tap.call(yt,e,e.target))}),this),n.doubleTapThreshold)):(Lt=null,yt.trigger("tap",[e.target]),n.tap&&(w=n.tap.call(yt,e,e.target)))):c==d?s!==m&&s!==E||(clearTimeout(Dt),Lt=null,yt.trigger("doubletap",[e.target]),n.doubleTap&&(w=n.doubleTap.call(yt,e,e.target))):c==g&&(s!==m&&s!==E||(clearTimeout(Dt),Lt=null,yt.trigger("longtap",[e.target]),n.longTap&&(w=n.longTap.call(yt,e,e.target)))),w}function H(){var t=!0;return null!==n.threshold&&(t=pt>=n.threshold),t}function j(){var t=!1;return null!==n.cancelThreshold&&null!==ht&&(t=tt(ht)-pt>=n.cancelThreshold),t}function C(){return!(n.maxTimeThreshold&&ft>=n.maxTimeThreshold)}function Q(){var t=z(),e=W(),i=null===n.pinchThreshold||vt>=n.pinchThreshold;return t&&e&&i}function X(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function Y(){var t=C(),e=H(),n=z(),i=W();return!j()&&i&&n&&e&&t}function q(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function z(){return Et===n.fingers||n.fingers===T||!x}function W(){return 0!==mt[0].end.x}function F(){return!!n.tap}function V(){return!!n.doubleTap}function G(){if(null==Lt)return!1;var t=rt();return V()&&t-Lt<=n.doubleTapThreshold}function Z(){Mt=0,Pt=0}function B(){var t=!1;return Mt&&rt()-Mt<=n.fingerReleaseThreshold&&(t=!0),t}function J(t){!0===t?(yt.bind(ut,D),yt.bind(at,R),st&&yt.bind(st,A)):(yt.unbind(ut,D,!1),yt.unbind(at,R,!1),st&&yt.unbind(st,A,!1)),yt.data(P+"_intouch",!0===t)}function K(t,e){var n=void 0!==e.identifier?e.identifier:0;return mt[t].identifier=n,mt[t].start.x=mt[t].end.x=e.pageX||e.clientX,mt[t].start.y=mt[t].end.y=e.pageY||e.clientY,mt[t]}function $(t){var e=function(t){for(var e=0;e<mt.length;e++)if(mt[e].identifier==t)return mt[e]}(void 0!==t.identifier?t.identifier:0);return e.end.x=t.pageX||t.clientX,e.end.y=t.pageY||t.clientY,e}function tt(t){if(bt[t])return bt[t].distance}function et(t){return{direction:t,distance:0}}function nt(){return Ot-xt}function it(t,e){var n=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y);return Math.round(Math.sqrt(n*n+i*i))}function rt(){return(new Date).getTime()}var ot=x||M||!n.fallbackToMouseEvents,lt=ot?M?O?"MSPointerDown":"pointerdown":"touchstart":"mousedown",ut=ot?M?O?"MSPointerMove":"pointermove":"touchmove":"mousemove",at=ot?M?O?"MSPointerUp":"pointerup":"touchend":"mouseup",st=ot?null:"mouseleave",ct=M?O?"MSPointerCancel":"pointercancel":"touchcancel",pt=0,ht=null,ft=0,dt=0,gt=0,wt=1,vt=0,Tt=0,bt=null,yt=t(e),St="start",Et=0,mt=null,xt=0,Ot=0,Mt=0,Pt=0,Lt=0,Dt=null,Rt=null;try{yt.bind(lt,L),yt.bind(ct,k)}catch(e){t.error("events not supported "+lt+","+ct+" on jQuery.swipe")}this.enable=function(){return yt.bind(lt,L),yt.bind(ct,k),yt},this.disable=function(){return I(),yt},this.destroy=function(){return I(),yt.data(P,null),yt},this.option=function(e,i){if(void 0!==n[e]){if(void 0===i)return n[e];n[e]=i}else t.error("Option "+e+" does not exist on jQuery.swipe.options");return null}}var i="left",r="right",o="up",l="down",u="in",a="out",s="none",c="auto",p="swipe",h="pinch",f="tap",d="doubletap",g="longtap",w="horizontal",v="vertical",T="all",b=10,y="start",S="move",E="end",m="cancel",x="ontouchstart"in window,O=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,M=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,P="TouchSwipe";t.fn.swipe=function(n){var i=t(this),r=i.data(P);if(r&&"string"==typeof n){if(r[n])return r[n].apply(this,Array.prototype.slice.call(arguments,1));t.error("Method "+n+" does not exist on jQuery.swipe")}else if(!(r||"object"!=typeof n&&n))return e.apply(this,arguments);return i},t.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe"},t.fn.swipe.phases={PHASE_START:y,PHASE_MOVE:S,PHASE_END:E,PHASE_CANCEL:m},t.fn.swipe.directions={LEFT:i,RIGHT:r,UP:o,DOWN:l,IN:u,OUT:a},t.fn.swipe.pageScroll={NONE:s,HORIZONTAL:w,VERTICAL:v,AUTO:c},t.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:T}})); })(this); |
b4e0f162 |
17 | |
0d20df38 |
18 | // WCF.js |
79422633 |
19 | (function (window, undefined) { "use strict";function wcfEval(expression){return eval(expression)}!function(){var t=jQuery.fn.data;jQuery.fn.data=function(e,i){var n,s,a,o=[].slice.call(arguments);if(e)switch(typeof e){case"object":for(n in e)n.match(/ID$/)&&(s=e[n],delete e[n],e[n=n.replace(/ID$/,"-id")]=s);o[0]=e;break;case"string":e.match(/ID$/)&&(o[0]=e.replace(/ID$/,"-id"))}if(a=t.apply(this,o),void 0===e)for(n in a)n.match(/Id$/)&&(a[n.replace(/Id$/,"ID")]=a[n],delete a[n]);return a},void 0===console.debug&&(console.debug=function(t){console.log(t)})}(),function(t){var e=navigator.userAgent.toLowerCase(),i=/(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)||[],n={browser:i[1]||"",version:i[2]||"0"},s={};n.browser&&(s[n.browser]=!0,s.version=n.version),s.chrome?s.webkit=!0:s.webkit&&(s.safari=!0),t.browser=t.browser||{},t.browser=$.extend(t.browser,s),t.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0,t.browser.mozilla&&e.match(/trident/)&&(t.browser.mozilla=!1,t.browser.msie=!0),t.browser.iOS=/\((ipad|iphone|ipod);/.test(e),t.browser.iOS&&$("html").addClass("iOS"),t.browser.android=-1!==e.indexOf("android"),t.browser.iOS&&(t.fn.focus=function(t,e){return arguments.length>0?this.on("focus",null,t,e):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(t,e){return $.grep(t,(function(t,i){return e!==t}))},wcfEscapeID:function(t){return t.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(t){return!!$("#"+$.wcfEscapeID(t)).length},getLength:function(t){var e,i=0;for(e in t)t.hasOwnProperty(e)&&i++;return i}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(t){var e={},i={},n=!1;switch(this.is(":hidden")&&(e=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),t){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,e,["display","visibility"]),i},getOffsets:function(t){var e={},i={},n=!1;return this.is(":hidden")&&(e=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),i="offset"===t?this.offset():this.position(),n&&WCF.revertInlineCSS(this,e,["display","visibility"]),i},makePositioned:function(t,e){"absolute"!=t&&"fixed"!=t&&(t="absolute");var i=this.getOffsets("position");return this.css({position:t,left:i.left,margin:0,top:i.top}),e&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){var t,e,i;if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;return t=0,e=this.get(0),document.selection?(this.focus(),(i=document.selection.createRange()).moveStart("character",-this.val().length),t=i.text.length):(e.selectionStart||"0"==e.selectionStart)&&(t=parseInt(e.selectionStart)),t},setCaret:function(t){var e,i;if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;return e=this.get(0),this.focus(),document.selection?((i=document.selection.createRange()).moveStart("character",t),i.moveEnd("character",0),i.select()):(e.selectionStart||"0"==e.selectionStart)&&(e.selectionStart=t,e.selectionEnd=t),!0},wcfDropIn:function(t,e,i){return t||(t="up"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:t},i,e)},wcfDropOut:function(t,e,i){return t||(t="down"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:t},i,e)},wcfBlindIn:function(t,e,i){return t||(t="vertical"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:t},i,e)},wcfBlindOut:function(t,e,i){return t||(t="vertical"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:t},i,e)},wcfHighlight:function(t,e){return this.effect("highlight",t,600,e)},wcfFadeIn:function(t,e){return e&&parseInt(e)||(e=200),this.show(WCF.getEffect(this,"fade"),{},e,t)},wcfFadeOut:function(t,e){return e&&parseInt(e)||(e=200),this.hide(WCF.getEffect(this,"fade"),{},e,t)},cssAsNumber:function(t){if(this.length){var e=this.css(t);if(void 0!==e)return parseInt(e.replace(/px$/,""))}return 0},perfectScrollbar:function(t){var e=require("perfect-scrollbar");return this.each((function(){var i,n;return"object"==typeof t||void 0===t?(i=t,$(this).data("psID")||e.initialize(this,i)):"update"===(n=t)?e.update(this):"destroy"===n&&e.destroy(this),jQuery(this)}))}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(t,e){return-1!=$.inArray(t,e)},getEffect:function(t,e){return t.is("tr")?"highlight":e},getInlineCSS:function(t){var e,i,n,s={},a=t.attr("style");if(!a)return{};for(e=0,i=(a=a.split(";")).length;e<i;e++)""!=(n=$.trim(a[e]))&&(n=n.split(":"),s[$.trim(n[0])]=$.trim(n[1]));return s},revertInlineCSS:function(t,e,i){var n,s,a;for(n=0,s=i.length;n<s;n++)e[a=i[n]]?t.css(a,e[a]):t.css(a,"")},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},base64toBlob:function(t,e,i){var n,s,a,o,r,l,c;for(e=e||"",i=i||512,n=atob(t),s=[],a=0;a<n.length;a+=i){for(o=n.slice(a,a+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);c=new Uint8Array(r),s.push(c)}return new Blob(s,{type:e})},convertLegacyURL:function(t){return t.replace(/^index\.php\/(.*?)\/\?/,(function(t,e){var i,n,s,a=e.split(/([A-Z][a-z0-9]+)/),o="";for(i=0,n=a.length;i<n;i++)(s=a[i].trim()).length&&(o.length&&(o+="-"),o+=s.toLowerCase());return"index.php?"+o+"/&"}))}}),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(t){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(t,e){window.bc_wcfSimpleDropdown.init(t[0],e)},removeDropdown:function(t){window.bc_wcfSimpleDropdown.destroy(t)},initDropdownFragment:function(t,e){window.bc_wcfSimpleDropdown.initFragment(t[0],e[0])},registerCallback:function(t,e){window.bc_wcfSimpleDropdown.registerCallback(t,e)},_toggle:function(t,e){window.bc_wcfSimpleDropdown._toggle(t,e)},toggleDropdown:function(t,e){window.bc_wcfSimpleDropdown._toggle(null,t,null,e)},getDropdown:function(t){var e=window.bc_wcfSimpleDropdown.getDropdown(t);return e?$(e):null},getDropdownMenu:function(t){var e=window.bc_wcfSimpleDropdown.getDropdownMenu(t);return e?$(e):null},setAlignmentByID:function(t){window.bc_wcfSimpleDropdown.setAlignmentById(t)},setAlignment:function(t,e){window.bc_wcfSimpleDropdown.setAlignment(t[0],e[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(t){window.bc_wcfSimpleDropdown.close(t)},destroy:function(t){window.bc_wcfSimpleDropdown.destroy(t)}},WCF.Clipboard={init:function(t,e,i,n){require(["EventHandler","WoltLabSuite/Core/Controller/Clipboard"],(function(s,a){for(var o in a.setup({hasMarkedItems:e>0,pageClassName:t,pageObjectId:n}),i)i.hasOwnProperty(o)&&function(t){s.add("com.woltlab.wcf.clipboard",t,(function(e){null!==e.responseData&&i[t].hasOwnProperty(e.responseData.actionName)&&i[t][e.responseData.actionName].triggerEffect(e.responseData.objectIDs)}))}(o)}))},reload:function(){require(["WoltLabSuite/Core/Controller/Clipboard"],(function(t){t.reload()}))}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(t,e){$.isFunction(t)?(this._callback=t,this._interval=e,this.resume()):console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(t){throw this._isExecuting=!1,t}},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(t){this._interval=t,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLabSuite/Core/Ajax/Status"],(function(t){t.show()}))},hide:function(){require(["WoltLabSuite/Core/Ajax/Status"],(function(t){t.hide()}))},updateIcon:function(t,e){}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(t){this._ajaxRequest=null,"jsonp"===(t=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php?ajax-proxy/&t="+SECURITY_TOKEN,aborted:null,autoAbortPrevious:!1},t)).dataType?require(["AjaxJsonp"],(function(e){e.send(t.url,t.success,t.failure,{parameterName:t.jsonp})})):require(["AjaxRequest"],function(e){this._ajaxRequest=new e({data:t.data,type:t.type,url:t.url,withCredentials:t.url==="index.php?ajax-proxy/&t="+SECURITY_TOKEN,responseType:"json"===t.dataType?"application/json":"",autoAbort:t.autoAbortPrevious,ignoreError:t.suppressErrors,silent:!t.showLoadingOverlay,failure:t.failure,finalize:t.after,success:t.success}),t.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(t){require(["AjaxRequest"],function(e){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(t)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(t){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(t,e){require(["AjaxRequest"],function(i){null!==this._ajaxRequest&&this._ajaxRequest.setOption(t,e)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(t,e,i){},_success:function(t,e,i){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(t,e){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},t),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},e),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy((function(t,e){$(e).bind(this.options.eventName,$.proxy(this._handleEvent,this))}),this)))},_handleEvent:function(t){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(t.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_callback:null,_className:"",_containerSelector:"",_containers:[],init:function(t,e,i){this._containerSelector=e,this._className=t,this._buttonSelector=i||".jsDeleteButton",this._callback=null,this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each(function(t,e){var i,n=$(e),s=n.wcfIdentify();WCF.inArray(s,this._containers)||(i=n.find(this._buttonSelector)).length&&(this._containers.push(s),i.click($.proxy(this._click,this)))}.bind(this))},_click:function(t){var e=$(t.currentTarget);t.preventDefault(),e.data("confirmMessageHtml")||e.data("confirmMessage")?WCF.System.Confirmation.show(e.data("confirmMessageHtml")?e.data("confirmMessageHtml"):e.data("confirmMessage"),$.proxy(this._execute,this),{target:e},void 0,!!e.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(e),this._sendRequest(e))},_didTriggerEffect:function(t){},_execute:function(t,e){"cancel"!==t&&(WCF.LoadingOverlayHandler.updateIcon(e.target),this._sendRequest(e.target))},_sendRequest:function(t){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(t).data("objectID")]}),this.proxy.sendRequest()},_success:function(t,e,i){this._callback&&this._callback(t.objectIDs),this.triggerEffect(t.objectIDs)},setCallback:function(t){if("function"!=typeof t)throw new TypeError("[WCF.Action.Delete] Expected a valid callback for '"+this._className+"'.");this._callback=t},triggerEffect:function(t){this._containers.forEach(function(e){var i,n=$("#"+e),s=n.find(this._buttonSelector);WCF.inArray(s.data("objectID"),t)&&(i=this,n.wcfBlindOut("up",(function(){var t=$(this).remove();i._containers.splice(i._containers.indexOf(t.wcfIdentify()),1),i._didTriggerEffect(t),s.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",s.data("eventName"),{button:s,container:t})})))}.bind(this))}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(t){var e,i,n;for(e in this._containers)i=$("#"+this._containers[e]),WCF.inArray(i.find(this._buttonSelector).data("objectID"),t)&&(i.has("ol").has("li").length?(i.is(":only-child")?i.parent().replaceWith(i.find("> ol")):i.replaceWith(i.find("> ol > li")),this._containers.splice(this._containers.indexOf(i.wcfIdentify()),1),this._didTriggerEffect(i)):(n=this,i.wcfBlindOut("up",(function(){$(this).remove(),n._containers.splice(n._containers.indexOf($(this).wcfIdentify()),1),n._didTriggerEffect($(this))}))))}}),WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(t,e,i){this._containerSelector=e,this._className=t,this._buttonSelector=i||".jsToggleButton",this._containers=[];var n={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(n),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy((function(t,e){var i=$(e),n=i.wcfIdentify();WCF.inArray(n,this._containers)||(this._containers.push(n),i.find(this._buttonSelector).click($.proxy(this._click,this)))}),this))},_click:function(t){var e=$(t.currentTarget);t.preventDefault(),e.data("confirmMessageHtml")||e.data("confirmMessage")?WCF.System.Confirmation.show(e.data("confirmMessageHtml")?e.data("confirmMessageHtml"):e.data("confirmMessage"),$.proxy(this._execute,this),{target:e},void 0,!!e.data("confirmMessageHtml")):(WCF.LoadingOverlayHandler.updateIcon(e),this._sendRequest(e))},_execute:function(t,e){"cancel"!==t&&(WCF.LoadingOverlayHandler.updateIcon(e.target),this._sendRequest(e.target))},_sendRequest:function(t){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(t).data("objectID")]}),this.proxy.sendRequest()},_success:function(t,e,i){this.triggerEffect(t.objectIDs)},triggerEffect:function(t){var e,i,n;for(e in this._containers)n=(i=$("#"+this._containers[e])).find(this._buttonSelector),WCF.inArray(n.data("objectID"),t)&&(i.wcfHighlight(),this._toggleButton(i,n))},_toggleButton:function(t,e){var i="";const n=e[0].querySelector("fa-icon");"square"===n.name?(n.setIcon("square-check"),i=e.data("disableTitle")?e.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"),e.attr("title",i)):(n.setIcon("square"),i=e.data("enableTitle")?e.data("enableTitle"):WCF.Language.get("wcf.global.button.enable"),e.attr("title",i)),t.toggleClass("disabled")}}),WCF.Date={},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(t,e){this._variables[t]=e},addObject:function(t){for(var e in t)this.add(e,t[e])},addDictionary:function(t){t.each($.proxy((function(t){this.add(t.key,t.value)}),this))},get:function(t){return this.isset(t)?this._variables[t]:null},isset:function(t){return this._variables.hasOwnProperty(t)},remove:function(t){delete this._variables[t]},each:function(t){var e;if($.isFunction(t))for(e in this._variables)t({key:e,value:this._variables[e]})},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(t,e){require(["Language"],(function(i){i.add(t,e)}))},addObject:function(t){require(["Language"],(function(e){e.addObject(t)}))},get:function(t,e){throw new Error('Call to deprecated WCF.Language.get("'+t+'")')}}),WCF.Number={round:function(t,e){return e=Math.pow(10,e||0),Math.round(t*e)/e}},WCF.String={addThousandsSeparator:function(t){return Number(t).toLocaleString(document.documentElement.lang)},escapeHTML:function(t){return String(t).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},escapeRegExp:function(t){return String(t).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(t,e){var i=e||2;return Number(t).toLocaleString(document.documentElement.lang,{maximumFractionDigits:i}).replace("-","−")},lcfirst:function(t){return String(t).substring(0,1).toLowerCase()+t.substring(1)},ucfirst:function(t){return String(t).substring(0,1).toUpperCase()+t.substring(1)},unescapeHTML:function(t){return String(t).replace(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")}},WCF.TabMenu={init:function(){require(["WoltLabSuite/Core/Ui/TabMenu"],(function(t){t.setup()}))},reload:function(){this.init()}},WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy((function(t,e){this._initButton(e)}),this))},_initButton:function(t){var e=$(t);e.data("isOpen")||$("#"+e.data("collapsibleContainer")).hide(),e.click($.proxy(this._toggle,this))},_toggle:function(t){var e=$(t.currentTarget),i=e.data("isOpen"),n=$("#"+$.wcfEscapeID(e.data("collapsibleContainer")));return i?(n.stop().wcfBlindOut("vertical",$.proxy((function(){this._toggleImage(e)}),this)),i=!1):(n.stop().wcfBlindIn("vertical",$.proxy((function(){this._toggleImage(e)}),this)),i=!0),e.data("isOpen",i),t.stopPropagation(),!1},_toggleImage:function(t){const e=t[0].querySelector("fa-icon");t.data("isOpen")?e.setIcon("chevron-down"):e.setIcon("chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(t){this._className=t,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(t){this._getContainers().each($.proxy((function(t,e){var i=$(e),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))}),this))},_initContainer:function(t){var e=this._getTarget(t),i=this._getButtonContainer(t),n=this._createButton(t,i);this._containerData[t]={button:n,buttonContainer:i,isOpen:this._containers[t].data("isOpen"),target:e},this._containers[t].data("isOpen")||$("#"+t).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(t){},_getButtonContainer:function(t){},_createButton:function(t,e){var i=elBySel(".jsStaticCollapsibleButton",e[0]);return null!==i&&i.parentNode===e[0]?(i.classList.remove("jsStaticCollapsibleButton"),i=$(i)):i=$(`<button type="button" class="collapsibleButton jsToolti" title="${WCF.Language.get("wcf.global.button.collapsible")}">\n\t\t\t\t<fa-icon size="16" name="chevron-down"></fa-icon>\n\t\t\t</button>`).prependTo(e),i.data("containerID",t).click($.proxy(this._toggleContainer,this)),i},_toggleContainer:function(t){var e=$(t.currentTarget).data("containerID"),i=this._containerData[e].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(e)],parameters:$.extend(!0,{containerID:e,currentState:n,newState:s},this._getAdditionalParameters(e))}),this._proxy.sendRequest(),$("#"+e).toggleClass("jsCollapsed")},_exchangeIcon:function(t,e){e=e||"spinner",t[0].querySelector("fa-icon").setIcon(e)},_getObjectID:function(t){return $("#"+t).data("objectID")},_getAdditionalParameters:function(t){return{}},_updateContent:function(t,e,i){this._containerData[t].target.html(e)},_success:function(t,e,i){var n,s;t.returnValues.containerID&&(n=t.returnValues.containerID,this._containers[n]&&(this._containerData[n].isOpen=!!t.returnValues.isOpen,s=t.returnValues.isOpen?"open":"close",this._updateContent(n,$.trim(t.returnValues.content),s)))}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(t){this._super(t),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(t){this._super(t),this._containerData[t].isOpen||(this._containerData[t].target.hide(),this._exchangeIcon(this._containerData[t].button,"chevron-right"))},_toggleContainer:function(t){var e=$(t.currentTarget).data("containerID"),i=this._containerData[e].isOpen,n=i?"open":"close",s=i?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(e)],parameters:$.extend(!0,{containerID:e,currentState:n,newState:s},this._getAdditionalParameters(e))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[e].button,"open"===s?"chevron-down":"chevron-right"),"open"===s?this._containerData[e].target.show():this._containerData[e].target.hide(),$("#"+e).toggleClass("jsCollapsed"),this._containerData[e].isOpen="open"===s}}),WCF.User={userID:0,username:"",init:function(t,e){this.userID=t,this.username=e}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(t,e,i){var n,s,a;return!t.length||((n=t.getOffsets("offset").top)>(s=$(document).height())-(a=$(window).height())&&(n=s-a)<0&&(n=0),!0===i?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,(function(t,e,i,n,s){return-n*((e=e/s-1)*e*e*e-1)+i})),!1)}}),WCF.CloseOverlayHandler={addCallback:function(t,e){require(["Ui/CloseOverlay"],(function(i){i.add(t,e)}))},removeCallback:function(t){require(["Ui/CloseOverlay"],(function(e){e.remove(t)}))},forceExecution:function(){require(["Ui/CloseOverlay"],(function(t){t.execute()}))}},WCF.DOMNodeInsertedHandler={addCallback:function(t,e){require(["WoltLabSuite/Core/Dom/Change/Listener"],(function(t){t.add("__legacy__",e)}))},_executeCallbacks:function(){require(["WoltLabSuite/Core/Dom/Change/Listener"],(function(t){t.trigger()}))},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(t,e){if(this._bindListener(),this._callbacks.isset(t))return console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+t+"' is already bound to a callback"),!1;this._callbacks.add(t,e)},removeCallback:function(t){this._callbacks.isset(t)&&this._callbacks.remove(t)},_bindListener:function(){this._isListening||(window.MutationObserver?new MutationObserver(function(t){var e=!1;t.forEach(function(t){t.removedNodes.length&&(e=!0)}.bind(this)),e&&this._executeCallbacks({})}.bind(this)).observe(document.body,{childList:!0,subtree:!0}):$(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this)),this._isListening=!0)},_executeCallbacks:function(t){this._isExecuting||(this._isExecuting=!0,this._callbacks.each((function(e){e.value(t)})),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){this._initOptions(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Option.Handler",$.proxy(this._initOptions,this))},_initOptions:function(){$(".jsEnablesOptions").each($.proxy(this._initOption,this))},_initOption:function(t,e){this._change(e),$(e).change($.proxy(this._handleChange,this))},_handleChange:function(t){this._change($(t.target))},_change:function(option){var disableOptions,enableOptions,isActive,$value,relevantDisableOptions,relevantEnableOptions,$index,$item;switch(option=$(option),disableOptions=eval(option.data("disableOptions")),enableOptions=eval(option.data("enableOptions")),option.getTagName()){case"input":switch(option.attr("type")){case"checkbox":this._execute(option.prop("checked"),disableOptions,enableOptions);break;case"radio":option.prop("checked")&&(isActive=!0,option.data("isBoolean")&&1!=option.val()&&(isActive=!1),this._execute(isActive,disableOptions,enableOptions))}break;case"select":if($value=option.val(),relevantDisableOptions=[],relevantEnableOptions=[],disableOptions.length>0)for($index in disableOptions)$item=disableOptions[$index],$item.value==$value?relevantDisableOptions.push($item.option):relevantEnableOptions.push($item.option);if(enableOptions.length>0)for($index in enableOptions)$item=enableOptions[$index],$item.value==$value?relevantEnableOptions.push($item.option):relevantDisableOptions.push($item.option);this._execute(!0,relevantDisableOptions,relevantEnableOptions)}},_execute:function(t,e,i){var n,s,a,o;if(e.length>0)for(n=0,s=e.length;n<s;n++)a=e[n],$.wcfIsset(a)?this._enableOption(a,!t):(o=$("."+$.wcfEscapeID(a)+"Input")).length&&this._enableOptions(o.children("dd").find("input, select, textarea"),!t);if(i.length>0)for(n=0,s=i.length;n<s;n++)a=i[n],$.wcfIsset(a)?this._enableOption(a,t):(o=$("."+$.wcfEscapeID(a)+"Input")).length&&this._enableOptions(o.children("dd").find("input, select, textarea"),t)},_enableOption:function(t,e){this._enableOptionElement($("#"+$.wcfEscapeID(t)),e)},_enableOptionElement:function(t,e){var i,n,s,a;"select"==(i=(t=$(t)).getTagName())||"input"==i&&("checkbox"==t.attr("type")||"file"==t.attr("type")||"radio"==t.attr("type"))?("input"===i&&"radio"===t[0].type&&t[0].checked||(e?t.enable():t.disable()),t.parents(".optionTypeBoolean:eq(0)")&&(n=t.wcfIdentify().replace(/\./g,"\\."),s=$("#"+n+"_no"),e?s.enable():s.disable(),(a=$("#"+n+"_never")).length&&(e?a.enable():a.disable()))):e?t.removeAttr("readonly"):t.attr("readonly",!0),e?t.closest("dl").removeClass("disabled"):t.closest("dl").addClass("disabled")},_enableOptions:function(t,e){for(var i=0,n=t.length;i<n;i++)this._enableOptionElement(t[i],e)}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(t,e){if(this._bindListener(),this._callbacks.isset(t))return console.debug("[WCF.PageVisibilityHandler] identifier '"+t+"' is already bound to a callback"),!1;this._callbacks.add(t,e)},removeCallback:function(t){this._callbacks.isset(t)&&this._callbacks.remove(t)},_bindListener:function(){if(!this._isListening){var t=null;void 0!==document.hidden?(this._hiddenFieldName="hidden",t="visibilitychange"):void 0!==document.mozHidden?(this._hiddenFieldName="mozHidden",t="mozvisibilitychange"):void 0!==document.msHidden?(this._hiddenFieldName="msHidden",t="msvisibilitychange"):void 0!==document.webkitHidden&&(this._hiddenFieldName="webkitHidden",t="webkitvisibilitychange"),null===t?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(t,$.proxy(this._executeCallbacks,this)),this._isListening=!0}},_executeCallbacks:function(t){if(!this._isExecuting){this._isExecuting=!0;var e=document[this._hiddenFieldName];this._callbacks.each((function(t){t.value(e)})),this._isExecuting=!1}}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(t,e,i){this._rowClassName=e,this._tableContainer=t,this._options=$.extend(!0,{emptyMessage:null,emptyMessageHtml:null,messageType:"info",refreshPage:!1,updatePageNumber:!1,isTable:0!==this._tableContainer.find("table").length},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+e,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find((this._options.isTable?"table tr.":".tabularList .")+this._rowClassName).length},_handleEmptyTable:function(){var t,e;this._options.emptyMessage?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage)):this._options.emptyMessageHtml?this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).html(this._options.emptyMessageHtml)):this._options.refreshPage?this._options.updatePageNumber?(t=window.location.href.match(/(\?|&)pageNo=(\d+)/g))&&(e=t[t.length-1].match(/\d+/g),this._options.updatePageNumber>0?e++:e--,window.location=window.location.href.replace(t[t.length-1],t[t.length-1][0]+"pageNo="+e)):window.location.reload():this._tableContainer.remove()},_remove:function(t){var e;$.getLength(t)?(e=$(t.target)).hasClass(this._rowClassName)&&(this._options.isTable?1==e.parents("tbody:eq(0)").children("tr").length&&this._handleEmptyTable():1===this._getRowCount()&&this._handleEmptyTable()):this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_lastValue:"",_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(t,e,i,n,s){null==e||$.isFunction(e)?(this._callback=e||null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],this._lastValue="",i&&(this._excludedSearchValues=i),this._searchInput=$(t),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=!!n,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!0===s,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):console.debug("[WCF.Search.Base] Selector '"+t+"' for search input is invalid, aborting.")):console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var t=this;new WCF.PeriodicalExecuter((function(e){t._list.is(":visible")&&t._clearList(!1),e.stop()}),250)},_keyDown:function(t){if(t.which===$.ui.keyCode.ENTER){var e=this._searchInput.parents(".dropdown");e.data("disableAutoFocus")?-1!==this._itemIndex&&t.preventDefault():(e.data("preventSubmit")||-1!==this._itemIndex)&&t.preventDefault()}},_keyUp:function(t){var e,i,n;switch(t.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(t)}if(""===(e=this._getSearchString(t)))this._clearList(!1);else if(e.length>=this._triggerLength){if(this._lastValue===e)return;this._lastValue=e,i={data:{excludedSearchValues:this._excludedSearchValues,searchString:e}},this._delay?(null!==this._timer&&this._timer.stop(),n=this,this._timer=new WCF.PeriodicalExecuter((function(){n._queryServer(i),n._timer.stop(),n._timer=null}),this._delay)):this._queryServer(i)}else this._clearList(!1)},_queryServer:function(t){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(t)}),this._proxy.sendRequest()},setDelay:function(t){this._delay=t},_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(t){return 0===this._itemCount||(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(t){var e,i,n,s,a=$.trim(this._searchInput.val());if(this._commaSeperated){if((t.keyCode||t.which)==$.ui.keyCode.COMMA)return"";for(i=(e=a.split(",")).length,n=0;n<i;n++)e[n]=$.trim(e[n]);for(n=0;n<i;n++){if(s=e[n],!this._oldSearchString[n]){a=s;break}if(s!=this._oldSearchString[n]){a=s,this._caretAt=n;break}}this._oldSearchString=e}return a},_getParameters:function(t){return t},_success:function(t,e,i){var n,s,a;if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(t.returnValues))for(n in t.returnValues)s=t.returnValues[n],this._createListItem(s);else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",((t,e)=>{"dropdown"===t&&e===this._searchInput[0].parentElement.id||this._clearList()})),a=this._searchInput.parents(".dropdown").wcfIdentify(),WCF.Dropdown.getDropdownMenu(a).hasClass("dropdownOpen")||(WCF.Dropdown.toggleDropdown(a,!0),this._openDropdown()),this._itemIndex=-1,WCF.Dropdown.getDropdown(a).data("disableAutoFocus")||this._selectNextItem()},_openDropdown:function(){},_handleEmptyResult:function(){return!1},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.label)+"</span></li>").appendTo(this._list);return e.data("objectID",t.objectID).data("label",t.label).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_executeCallback:function(t){var e,i,n=!1,s=$(t.currentTarget);this._commaSeperated?(e=s.data("label"),this._oldSearchString[this._caretAt]=e,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"}),i=this._searchInput.val().toLowerCase().indexOf(e.toLowerCase())+e.length,this._searchInput.focus().setCaret(i)):null===this._callback?this._searchInput.val(s.data("label")):n=!0===this._callback(s.data()),this._clearList(n)},_clearList:function(t){t&&!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(t){WCF.inArray(t,this._excludedSearchValues)||this._excludedSearchValues.push(t)},removeExcludedSearchValue:function(t){var e=$.inArray(t,this._excludedSearchValues);-1!=e&&this._excludedSearchValues.splice(e,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(t,e,i,n,s){this._includeUserGroups=i,this._super(t,e,n,s)},_getParameters:function(t){return t.data.includeUserGroups=this._includeUserGroups?1:0,t},_createListItem:function(t){var e,i,n=this._super(t),s=null;return t.icon?s=$(t.icon):this._includeUserGroups&&"group"===t.type&&(s=$('<fa-icon size="16" name="users"></fa-icon>')),s&&(e=n.find("span").detach(),(i=$("<div />").addClass("box16").appendTo(n)).append(s),i.append($("<div />").append(e))),n.data("type",t.type),n}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(t,e){$.isFunction(e)?WCF.inArray(t,this._loaded)?setTimeout((function(){e()}),1):(this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e)):console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+t+"' is invalid, aborting.")},setup:function(t,e){$.isFunction(e)?(this._setupCallbacks[t]||(this._setupCallbacks[t]=[]),this._setupCallbacks[t].push(e)):console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+t+"' is invalid, aborting.")},invoke:function(t){var e,i;if(this._setupCallbacks[t]){for(e=0,i=this._setupCallbacks[t].length;e<i;e++)this._setupCallbacks[t][e]();delete this._setupCallbacks[t]}if(this._loaded.push(t),this._callbacks[t]){for(e=0,i=this._callbacks[t].length;e<i;e++)this._callbacks[t][e]();delete this._callbacks[t]}},reset:function(t){var e=this._loaded.indexOf(t);-1!==e&&this._loaded.splice(e,1)}},WCF.System.ObjectStore={_objects:{},add:function(t,e){void 0===this._objects[t]&&(this._objects[t]=[]),this._objects[t].push(e)},invoke:function(t,e){if(this._objects[t])for(var i=0;i<this._objects[t].length;i++)e(this._objects[t][i])}},WCF.System.Captcha={_registeredCaptchas:[],addCallback:function(t,e){require(["WoltLabSuite/Core/Controller/Captcha"],function(i){try{i.add(t,e),this._registeredCaptchas.push(t)}catch(t){if(t instanceof TypeError)return void console.debug("[WCF.System.Captcha] Given callback is no function")}}.bind(this))},getData:function(t){var e,i;if(-1===this._registeredCaptchas.indexOf(t))return e;i=require("WoltLabSuite/Core/Controller/Captcha");try{e=i.getData(t)}catch(e){console.debug('[WCF.System.Captcha] Unknow captcha id "'+t+'"')}return e},removeCallback:function(t){require(["WoltLabSuite/Core/Controller/Captcha"],function(e){try{e.delete(t),this._registeredCaptchas.splice(this._registeredCaptchas.indexOf(item),1)}catch(t){}}.bind(this))}},WCF.System.Page={},WCF.System.Notification=Class.extend({_cssClassNames:"",_message:"",init:function(t,e){this._cssClassNames=e||"",this._message=t||""},show:function(t,e,i,n){require(["Ui/Notification"],function(e){e.show(i||this._message,t,n||this._cssClassNames)}.bind(this))}}),WCF.System.Confirmation={show:function(t,e,i,n,s){if("object"==typeof n){var a=$("<div />");a.append(n),n=a.html()}require(["Ui/Confirmation"],(function(a){a.show({legacyCallback:e,message:t,parameters:i,template:n||"",messageIsHtml:!0===s})}))}},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 t=$("meta[name=viewport]");this._oldViewportSettings=t.attr("content"),t.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.PushNotification={_callbacks:{},addCallback:function(t,e){void 0===this._callbacks[t]&&(this._callbacks[t]=[]),this._callbacks[t].push(e)},executeCallbacks:function(t){var e,i;for(e in t.returnValues)if(void 0!==this._callbacks[e])for(i=0;i<this._callbacks[e].length;i++)this._callbacks[e][i](t.returnValues[e])}},WCF.System.Event={addListener:function(t,e,i){return window.__wcf_bc_eventHandler.add(t,e,i)},removeListener:function(t,e,i){return window.__wcf_bc_eventHandler.remove(t,e,i)},removeAllListeners:function(t,e){return window.__wcf_bc_eventHandler.removeAll(t,e)},fireEvent:function(t,e,i){window.__wcf_bc_eventHandler.fire(t,e,i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:null,_className:"",_dialog:null,_proxy:null,_title:"",init:function(t,e,i,n,s){this._aborted=!1,this._actionName=t,this._callback=s||null,this._className=e,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(t){var e,i;null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy((function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()}),this),title:this._title})),this._aborted||(t.returnValues.template&&this._dialog.html(t.returnValues.template),this._dialog.find("progress").attr("value",t.returnValues.progress).text(t.returnValues.progress+"%").next("span").text(t.returnValues.progress+"%"),t.returnValues.progress<100?((e=t.returnValues.parameters||{}).loopCount=t.returnValues.loopCount,this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:e}),this._proxy.sendRequest()):null!==this._callback?this._callback(this,t):(this._dialog[0].querySelector("fa-icon").setIcon("check"),this._dialog.find(".contentHeader h1").text(WCF.Language.get("wcf.global.worker.completed")),i=$('<div class="formSubmit" />').appendTo(this._dialog),$('<button type="button" class="button buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(i).focus().click((function(){t.returnValues.redirectURL?window.location=t.returnValues.redirectURL:window.location.reload()})),this._dialog.wcfDialog("render")))}}),WCF.InlineEditor=Class.extend({_callbacks:[],_dropdowns:{},_elements:{},_notification:null,_options:[],_proxy:null,_triggerElements:{},_updateData:[],_elementSelector:null,_quickOption:null,_dropDownIdToElementId:new Map,init:function(t){var e,i;if(this._elementSelector=t,$(t).length){for(this._setOptions(),e=0,i=this._options.length;e<i;e++)if(this._options[e].isQuickOption){this._quickOption=this._options[e].optionName;break}this.rebuild(),WCF.DOMNodeInsertedHandler.addCallback("WCF.InlineEditor"+this._elementSelector.hashCode(),$.proxy(this.rebuild,this)),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),WCF.CloseOverlayHandler.addCallback("WCF.InlineEditor",$.proxy(this._closeAll,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")}},rebuild:function(){var t=$(this._elementSelector),e=this;t.each((function(t,i){var n,s=$(i),a=s.wcfIdentify();if(void 0===e._elements[a]){if(null===(n=e._getTriggerElement(s))||1!==n.length)return;n[0].addEventListener("keydown",(t=>{"Enter"===t.key&&(t.preventDefault(),n[0].dataset.isKeyboardClick="true",e._show(t))})),n.on("click",$.proxy(e._show,e)).data("elementID",a),n[0].dataset.requiresSynthethicClick=!0,e._quickOption&&n.disableSelection().data("optionName",e._quickOption).dblclick($.proxy(e._click,e)),e._elements[a]=s}}))},_closeAll:function(t,e){let i="";"dropdown"===t&&(i=this._dropDownIdToElementId.get(e||"")||""),Object.keys(this._elements).forEach((t=>{t!==i&&this._hide(t)}))},_setOptions:function(){this._options=[]},registerCallback:function(t){$.isFunction(t)&&this._callbacks.push(t)},_getTriggerElement:function(t){return null},_show:function(t){var e,i,n,s,a,o,r,l,c,h,u;for(t.preventDefault(),e=$(t.currentTarget).data("elementID"),i=null,this._dropdowns[e]||(this._triggerElements[e]=i=this._getTriggerElement(this._elements[e]).addClass("dropdownToggle"),(n=i[0].parentNode)&&"LI"===n.nodeName&&1===n.childElementCount||n&&n.classList.contains("contentInteractionButton")?n.classList.add("dropdown"):i.wrap('<span class="dropdown" />'),this._dropdowns[e]=$('<ul class="dropdownMenu" />').insertAfter(i)),this._dropdowns[e].empty(),this._dropDownIdToElementId.has(e)||(null===i&&(i=this._getTriggerElement(this._elements[e])),this._dropDownIdToElementId.set(i.parent().wcfIdentify(),e)),s=!1,a="",o=0,r=this._options.length;o<r;o++)"divider"===(l=this._options[o]).optionName?""!==a&&"divider"!==a&&($('<li class="dropdownDivider" />').appendTo(this._dropdowns[e]),a=l.optionName):(this._validate(e,l.optionName)||this._validateCallbacks(e,l.optionName))&&($("<li><span>"+l.label+"</span></li>").appendTo(this._dropdowns[e]).data("elementID",e).data("optionName",l.optionName).data("isQuickOption",!!l.isQuickOption).click($.proxy(this._click,this)),s=!0,a=l.optionName);return s&&((c=this._dropdowns[e].children().last()).hasClass("dropdownDivider")&&c.remove(),h=null,u=0,this._dropdowns[e].children().each((function(t,e){var i=$(e);i.hasClass("dropdownDivider")||(i.data("isQuickOption")?h=i:u++)})),!u)?(h.trigger("click"),this._triggerElements[e]&&WCF.Dropdown.close(this._triggerElements[e].parents(".dropdown").wcfIdentify()),!1):(null!==i&&WCF.Dropdown.initDropdown(i,t.originalEvent||t),!1)},_validate:function(t,e){return!1},_validateCallbacks:function(t,e){var i,n=this._callbacks.length;if(n)for(i=0;i<n;i++)if(this._callbacks[i].validate(this._elements[t],e))return!0;return!1},_success:function(t,e,i){this._updateData.length&&(this._updateState(t),this._updateData=[])},_updateState:function(t){},_click:function(t){var e=$(t.currentTarget),i=e.data("elementID"),n=e.data("optionName");this._execute(i,n)||this._executeCallback(i,n),this._hide(i)},_execute:function(t,e){return!1},_executeCallback:function(t,e){var i,n=this._callbacks.length;if(n)for(i=0;i<n;i++)if(this._callbacks[i].execute(this._elements[t],e))return!0;return!1},_hide:function(t){this._dropdowns[t]&&this._dropdowns[t].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(t,e,i,n){this._buttonSelector=t,this._fileListSelector=e,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){var t;this._supportsAJAXUpload?(this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this)),t=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(t[0],"role","button"),t.prepend(this._fileUpload),this._fileUpload[0].addEventListener("focus",(function(){this.matches(":focus-visible")&&t[0].classList.add("active")})),this._fileUpload[0].addEventListener("blur",(function(){t[0].classList.remove("active")}))):(t=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>"),elAttr(t[0],"role","button"),elAttr(t[0],"tabindex","0"),t.click($.proxy(this._showOverlay,this))),this._insertButton(t)},_insertButton:function(t){this._buttonSelector.prepend(t)},_removeButton:function(){var t=".uploadButton";this._supportsAJAXUpload||(t=".uploadFallbackButton"),this._buttonSelector.find(t).remove()},_upload:function(t,e,i,n){var s,a,o,r,l,c,h,u,d=null,p=[];if(void 0!==n)p=n;else if(e)p.push(e);else if(i){switch(s="",i.type){case"image/png":s=".png";break;case"image/jpeg":s=".jpg";break;case"image/gif":s=".gif";break;case"image/webp":s=".webp"}p.push({name:"pasted-from-clipboard"+s})}else p=this._fileUpload.prop("files");if(p.length){if(a=new FormData,d=this._createUploadMatrix(p),!this._uploadMatrix[d].length)return null;for(o=0,r=p.length;o<r;o++)this._uploadMatrix[d][o]&&(l=this._uploadMatrix[d][o].data("internalFileID"),i?a.append("__files["+l+"]",i,p[o].name):a.append("__files["+l+"]",p[o],p[o].name));for(h in a.append("actionName",this._options.action),a.append("className",this._className),c=this._getParameters())a.append("parameters["+h+"]",c[h]);u=this,$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:a,contentType:!1,processData:!1,success:function(t,e,i){u._success(d,t)},error:$.proxy(this._error,this),xhr:function(){var t=$.ajaxSettings.xhr();return t&&t.upload.addEventListener("progress",(function(t){u._progress(d,t)}),!1),t},xhrFields:{withCredentials:!0}})}return d},_createUploadMatrix:function(t){var e,i,n,s,a;if(t.length){for(e=this._uploadMatrix.length,this._uploadMatrix[e]=[],i=0,n=t.length;i<n;i++)s=t[i],(a=this._initFile(s)).hasClass("uploadFailed")||(a.data("filename",s.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[e][i]=a);return e}return null},_success:function(t,e){},_error:function(t,e,i){},_progress:function(t,e){var i,n=Math.round(100*e.loaded/e.total);for(i in this._uploadMatrix[t])this._uploadMatrix[t][i].find("progress").attr("value",n)},_getParameters:function(){return{}},_initFile:function(t){return $("<li>"+t.name+" ("+t.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){var t,e,i;if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){for(i in this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body),t=this._overlay.find("form"),$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(t),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(t),$('<input type="hidden" name="isFallback" value="1" />').appendTo(t),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(t),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(t),e=this._getParameters())$('<input type="hidden" name="'+i+'" value="'+e[i]+'" />').appendTo(t);t.submit($.proxy((function(){var t={name:this._getFilename(),size:""},e=this._createUploadMatrix([t]),i=this;this._iframe.data("loading",!0).off("load").load((function(){i._evaluateResponse(e)})),this._overlay.wcfDialog("close")}),this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(t){var e=$.parseJSON(this._iframe.contents().find("pre").html());this._success(t,e)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(t,e,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(t,e,i,n)},_upload:function(){var t,e,i,n,s,a,o,r=this._fileUpload.prop("files");for(t=0,e=r.length;t<e;t++)if(i=r[t],n=new FormData,s=this._createUploadMatrix(i),this._uploadMatrix[s].length){for(o in n.append("__files["+s+"]",i),n.append("actionName",this._options.action),n.append("className",this._className),a=this._getParameters())n.append("parameters["+o+"]",a[o]);this._sendRequest(s,n)}},_sendRequest:function(t,e){var i=this;return $.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:e,contentType:!1,processData:!1,success:function(e,n,s){i._success(t,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",(function(e){i._progress(t,e)}),!1),e}})},_createUploadMatrix:function(t){var e=this._initFile(t);return e.hasClass("uploadFailed")?null:(e.data("filename",t.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=e,this._internalFileID-1)},_success:function(t,e){},_progress:function(t,e){var i=Math.round(100*e.loaded/e.total);this._uploadMatrix[t].find("progress").attr("value",i)},_showOverlay:function(){var t,e,i;if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){for(i in this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body),t=this._overlay.find("form"),$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(t),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(t),$('<input type="hidden" name="isFallback" value="1" />').appendTo(t),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(t),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(t),e=this._getParameters())$('<input type="hidden" name="'+i+'" value="'+e[i]+'" />').appendTo(t);t.submit($.proxy((function(){var t={name:this._getFilename(),size:""},e=this._createUploadMatrix(t),i=this;this._iframe.data("loading",!0).off("load").load((function(){i._evaluateResponse(e)})),this._overlay.wcfDialog("close")}),this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(t){var e=$.parseJSON(this._iframe.contents().find("pre").html());this._success(t,e)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:null,_notification:null,_offset:0,_options:{},_proxy:null,_structure:{},init:function(t,e,i,n,s,a){var o,r,l;if(this._additionalParameters=a||{},this._containerID=$.wcfEscapeID(t),this._container=$("#"+this._containerID),this._className=e,this._offset=i||0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._structure={},this._options=$.extend(!0,{axis:"y",connectWith:"#"+this._containerID+" .sortableList",disableNesting:"sortableNoNesting",doNotClear:!0,errorClass:"sortableInvalidTarget",forcePlaceholderSize:!0,handle:"",helper:"clone",items:"li:not(.sortableNoSorting)",opacity:.6,placeholder:"sortablePlaceholder",tolerance:"pointer",toleranceElement:"> span"},n||{}),(o=$("#"+this._containerID+" .sortableList")).is("tbody")&&("li:not(.sortableNoSorting)"===this._options.items&&(this._options.items="tr:not(.sortableNoSorting)",this._options.toleranceElement=""),"clone"===this._options.helper&&(this._options.helper=this._tableRowHelper.bind(this),(r=o.prev("thead"))&&r.find("th").each((function(t,e){(e=$(e)).width(e.width())})))),s?o.sortable(this._options):o.nestedSortable(this._options),this._className){if(!(l=this._container.find(".formSubmit")).length&&!(l=this._container.next(".formSubmit")).length)return void console.debug("[WCF.Sortable.Simple] Unable to find form submit for saving, aborting.");l.children('button[data-type="submit"]').click($.proxy(this._submit,this))}},_tableRowHelper:function(t,e){return e.children("td").each((function(t,e){(e=$(e)).width(e.width())})),e},_submit:function(){this._structure={},this._container.find(".sortableList").each($.proxy((function(t,e){var i=$(e),n=i.data("objectID");void 0!==n&&i.children(this._options.items).each($.proxy((function(t,e){var i=$(e).data("objectID");this._structure[n]||(this._structure[n]=[]),this._structure[n].push(i)}),this))}),this));var t=$.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:t}),this._proxy.sendRequest()},_success:function(t,e,i){null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show()}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(t){var e=!1;require(["Environment"],function(t){"desktop"!==t.platform()&&(e=!0)}.bind(this)),e||(this._activeElementID="",this._identifier=t,require(["WoltLabSuite/Core/Controller/Popover"],function(e){e.init({attributeName:"legacy",className:t,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(t,e){this._activeElementID=t,this._popoverObj=e,this._loadContent()},_insertContent:function(t,e){this._popoverObj.setContent(this._identifier,t,e)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(t,e){if(this._itemList=$(t),this._searchInput=$(e),this._data={},this._itemList.length&&this._searchInput.length){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)}else console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.")},_keyDown:function(t){return null!==t||this._keyPress(null)},_keyPress:function(t){if(null===t||44===t.charCode||t.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&t.keyCode===$.ui.keyCode.ENTER){if(null!==t&&t.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var e=$.trim(this._searchInput.val());return t&&44===t.charCode&&(e=e.substring(0,this._searchInput.getCaret())),""===e||(this.addItem({objectID:0,label:e}),t&&44===t.charCode?this._searchInput.val($.trim(this._searchInput.val().substr(this._searchInput.getCaret()))):this._searchInput.val(""),null!==t&&t.stopPropagation(),!1)}return!0},_onPaste:function(){var t,e,i,n=$.trim(this._searchInput.val());for(t=0,e=(n=n.split(",")).length;t<e;t++)""!==(i=$.trim(n[t]))&&this.addItem({objectID:0,label:i});this._searchInput.val("")},load:function(t){},_click:function(t){var e=$(t.currentTarget),i=e.data("objectID"),n=e.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),e.remove(),t.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(t){return!(!this._data[t.objectID]||0===t.objectID&&this._allowCustomInput)||($('<li class="badge">'+WCF.String.escapeHTML(t.label)+"</li>").data("objectID",t.objectID).data("label",t.label).appendTo(this._itemList).click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(t.label),this._addItem(t.objectID,t.label),!0)},clearList:function(){this._itemList.children("li").each($.proxy((function(t,e){var i=$(e);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(t,e){this._data[t]=e},_removeItem:function(t,e){delete this._data[t]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({init:function(t,e,i,n,s,a){require(["WoltLabSuite/Core/Language/Chooser"],(function(o){o.init(t,e,i,n,s,a)}))}}),WCF.Style={},jQuery.fn.extend({wcfDialog:function(t){var e=arguments;return require(["Dom/Util","Ui/Dialog"],function(i,n){var s,a=i.identify(this[0]);"close"===t?n.close(a):"render"===t?n.rebuild(a):"option"===t?3===e.length&&("title"===e[1]&&"string"==typeof e[2]?n.setTitle(a,e[2]):0===e[1].indexOf("on")?n.setCallback(a,e[1],e[2]):"closeConfirmMessage"===e[1]&&null===e[2]&&n.setCallback(a,"onBeforeClose",null)):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),s=1===e.length&&"object"==typeof e[0]?e[0]:{},n.openStatic(a,null,s),s.hasOwnProperty("title")&&n.setTitle(a,s.title))}.bind(this)),this}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,this._count>1&&this._initSlideshow()},_initSlideshow:function(){var t,e,i=$(this._items.get(0)).outerHeight();for(this._items.addClass("slideshowItem"),this._width=this.element.css("height",i).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy((function(t,e){$(e).show().css({height:i,left:(this._width+this.options.itemGap)*t,width:this._width})}),this)),this.element.css({height:i,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element),t=0;t<this._count;t++)e=$('<li><a><fa-icon size="16" name="circle"></fa-icon></a></li>').data("index",t).click($.proxy(this._click,this)).appendTo(this._buttonList),0==t&&e.find("fa-icon")[0].setIcon("circle",!0);this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var t=$(this._items.get(0)).css("height","auto").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(t,e){$(e).css({left:(this._width+this.options.itemGap)*t,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 t=this;this._timer=new WCF.PeriodicalExecuter((function(){t.moveTo(null)}),1e3*this.options.cycleInterval)}},_click:function(t){this.moveTo($(t.currentTarget).data("index")),this._resetTimer()},moveTo:function(t){this._index=null===t?this._index+1:t,this._index==this._count&&(this._index=0),this._buttonList[0].querySelectorAll("fa-icon").forEach((t=>t.setIcon("circle",!1))),$(this._buttonList.find("fa-icon").get(this._index))[0].setIcon("circle",!0),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(t){return this._items[t]?this._items[t]:null}}),jQuery.fn.extend({datepicker:function(t){var e=this[0],i=Array.prototype.slice.call(arguments,1);switch(t){case"destroy":window.__wcf_bc_datePicker.destroy(e);break;case"getDate":return window.__wcf_bc_datePicker.getDate(e);case"option":if("onClose"===i[0])return i.length>1?this.datepicker("setOption","onClose",i[1]):function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(e,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(e,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+t+"' for datepicker()")}return this}}),jQuery.fn.extend({wcfTabs:function(t){var e=this[0],i=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLabSuite/Core/Ui/TabMenu"],(function(n,s){var a=s.getTabMenu(n.identify(e));null!==a&&a[t].apply(a,i)}))}}),$.widget("ui.wcfPages",{_api:null,SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1},_create:function(){require(["WoltLabSuite/Core/Ui/Pagination"],function(t){this._api=new t(this.element[0],{activePage:this.options.activePage,maxPage:this.options.maxPage,callbackShouldSwitch:function(t){return!1!==this._trigger("shouldSwitch",void 0,{nextPage:t})}.bind(this),callbackSwitch:function(t){this._trigger("switched",void 0,{activePage:t})}.bind(this)})}.bind(this))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this._api=null,this.element[0].innerHTML=""},_setOption:function(t,e){if("activePage"==t&&e!=this.options[t]&&e>0&&e<=this.options.maxPage){var i=this._trigger("shouldSwitch",void 0,{nextPage:e});i||void 0!==i?this._api.switchPage(e):this._trigger("notSwitched",void 0,{activePage:e})}return this}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){var t=this;$(".jsCategory").each((function(e,i){var n,s=$(i).data("parentCategoryID",null).change($.proxy(t._updateSelection,t));t._categories[s.val()]=s,n=[],s.parents("li").find(".jsChildCategory").each((function(e,i){var a=$(i).data("parentCategoryID",s.val()).change($.proxy(t._updateSelection,t));t._categories[a.val()]=a,n.push(a.val()),a.is(":checked")&&s.prop("checked","checked")})),s.data("childCategoryIDs",n)}))},_updateSelection:function(t){var e,i,n,s=$(t.currentTarget),a=s.data("parentCategoryID");if(s.is(":checked"))null!==a&&this._categories[a].prop("checked","checked");else if(null===a)for(i=0,n=(e=s.data("childCategoryIDs")).length;i<n;i++)this._categories[e[i]].prop("checked",!1)}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:null,_categories:{},init:function(t){this._list=$("#"+t),this._buildStructure(),this._list.find("input:checked").each((function(){$(this).trigger("change")})),this._list.children("li").length<2&&this._list.addClass("flexibleCategoryListDisabled")},_buildStructure:function(){var t=this;this._list.find(".jsCategory").each((function(e,i){var n=$(i).change(t._updateSelection.bind(t)),s=parseInt(n.val()),a=[];n.parents("li:eq(0)").find(".jsChildCategory").each((function(e,i){var s,o,r=$(i);r.data("parentCategory",n).change(t._updateSelection.bind(t)),s=parseInt(r.val()),a.push(r),o=[],r.parents("li:eq(0)").find(".jsSubChildCategory").each((function(e,i){var n=$(i);n.data("parentCategory",r).change(t._updateSelection.bind(t)),o.push(n)})),t._categories[s]=o})),t._categories[s]=a}))},_updateSelection:function(t){var e,i,n,s,a,o,r,l=$(t.currentTarget),c=parseInt(l.val()),h=l.data("parentCategory");if(l.is(":checked"))h&&(h.prop("checked","checked"),(h=h.data("parentCategory"))&&h.prop("checked","checked"));else{if(this._categories[c])for(e=0,i=this._categories[c].length;e<i;e++)if((n=this._categories[c][e]).prop("checked",!1),s=parseInt(n.val()),this._categories[s])for(a=0,o=this._categories[s].length;a<o;a++)this._categories[s][a].prop("checked",!1);if(h){for(r=parseInt(h.val()),e=0,i=this._categories[r].length;e<i;e++)if(this._categories[r][e].prop("checked"))return;if(h=h.data("parentCategory"))for(r=parseInt(h.val()),e=0,i=this._categories[r].length;e<i;e++)if(this._categories[r][e].prop("checked"))return}}}}),WCF.Condition={},WCF.Notice={}; })(this); |
b4e0f162 |
20 | |
0d20df38 |
21 | // WCF.ColorPicker.js |
f72432cf |
22 | (function (window, undefined) { "use strict";WCF.ColorPicker=Class.extend({init:function(o){this.colorPickers=[],require(["WoltLabSuite/Core/Ui/Color/Picker"],(c=>{const r=document.querySelectorAll(o);r.length?r.forEach((o=>{this.colorPickers.push(new c(o))})):console.debug("[WCF.ColorPicker] Selector does not match any element, aborting.")}))},setCallbackSubmit:function(o){this.colorPickers.forEach((c=>{c.setCallbackSubmit(o)}))},hsvToRgb:function(o,c,r){return window.__wcf_bc_colorUtil.hsvToRgb(o,c,r)},rgbToHsv:function(o,c,r){return window.__wcf_bc_colorUtil.rgbToHsv(o,c,r)},hexToRgb:function(o){return window.__wcf_bc_colorUtil.hexToRgb(o)},rgbToHex:function(o,c,r){return window.__wcf_bc_colorUtil.rgbToHex(o,c,r)}}),void 0===window.__wcf_bc_colorUtil&&require(["ColorUtil"],(function(o){})),"function"==typeof window.__wcf_bc_colorPickerInit&&window.__wcf_bc_colorPickerInit(); })(this); |
b4e0f162 |
23 | |
0d20df38 |
24 | // WCF.ImageViewer.js |
1ab2818a |
25 | (function (window, undefined) { "use strict";WCF.ImageViewer=Class.extend({_triggerElement:null,init:function(){this._triggerElement=$('<span class="wcfImageViewerTriggerElement" />').data("disableSlideshow",!0).hide().appendTo(document.body),this._triggerElement.wcfImageViewer({enableSlideshow:0,imageSelector:".jsImageViewerEnabled",staticViewer:!0}),WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this)),WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck(),this._rebuildImageViewer()},_rebuildImageViewer:function(){var e=$("a.jsImageViewer");e.length&&e.removeClass("jsImageViewer").addClass("jsImageViewerEnabled").click($.proxy(this._click,this))},_click:function(e){e.ctrlKey||(e.preventDefault(),e.stopPropagation(),$(e.currentTarget).closest(".popover").length||this._triggerElement.wcfImageViewer("open",null,$(e.currentTarget).wcfIdentify()))},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy((function(e,i){i.complete&&this._checkImageSize({currentTarget:i})}),this)),$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(e){var i,t=$(e.currentTarget);t.is(":visible")?(t.removeClass("jsResizeImage"),t.closest(".messageSignature").length||((i=new Image).src=t.attr("src"),t.closest("div.messageText, div.messageTextPreview").width()<i.width?t.parents("a").length||(t.wrap('<a href="'+t.attr("src")+'" class="jsImageViewerEnabled embeddedImageLink" />'),t.parent().click($.proxy(this._click,this)),"right"==t.css("float")?t.parent().addClass("messageFloatObjectRight"):"left"==t.css("float")&&t.parent().addClass("messageFloatObjectLeft"),t[0].style.removeProperty("float"),t[0].style.removeProperty("margin")):t.removeClass("embeddedAttachmentLink"))):t.off("load")}}),$.widget("ui.wcfImageViewer",{_active:-1,_activeImage:null,_container:null,_didInit:!1,_disableSlideshow:!1,_eventNamespace:"",_images:[],_isMobile:!1,_isOpen:!1,_messageSignature:null,_items:-1,_maxDimensions:{height:0,width:0},_proxy:null,_slideshowEnabled:!1,_thumbnailContainerWidth:0,_thumbnailMarginRight:0,_thumbnailOffset:0,_thumbnailWidth:0,_timer:null,_ui:{buttonNext:null,buttonPrevious:null,header:null,image:null,imageContainer:null,imageList:null,slideshow:{container:null,enlarge:null,next:null,previous:null,toggle:null}},options:{shiftBy:5,enableSlideshow:1,speed:5,className:"",imageSelector:"",staticViewer:!1},_create:function(){this._active=-1,this._activeImage=null,this._container=null,this._didInit=!1,this._disableSlideshow=this.element.data("disableSlideshow"),this._eventNamespace=this.element.wcfIdentify(),this._images=[],this._isMobile=!1,this._isOpen=!1,this._items=-1,this._maxDimensions={height:document.documentElement.clientHeight,width:document.documentElement.clientWidth},this._messageSignature=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._slideshowEnabled=!1,this._thumbnailContainerWidth=0,this._thumbnailMarginRight=0,this._thumbnailOffset=0,this._thumbnaiLWidth=0,this._timer=null,this._ui={},this.element.click($.proxy(this.open,this)),window.addEventListener("popstate",function(e){if(null!=e.state&&"imageViewer"===e.state.name&&e.state.container===this._eventNamespace)return this.open(e),void this.showImage(e.state.image);this.close(e)}.bind(this))},open:function(e,i){if(e&&e.preventDefault(),this._isOpen)return!1;if(document.activeElement instanceof HTMLElement&&document.activeElement.blur(),e&&"popstate"===e.type||window.history.pushState({name:"imageViewer"},"",""),this._messageSignature=null,this.options.staticViewer){i&&(this._messageSignature=document.getElementById(i).closest(".messageSignature")),this._active=-1,null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=null;var t=this._getStaticImages();this._initUI(),this._createThumbnails(t,!0),this._render(!0,void 0,i),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable(),$.browser.touch&&setTimeout($.proxy((function(){this._isMobile&&!this._container.hasClass("maximized")&&this._toggleView()}),this),500)}else 0===this._images.length?this._loadNextImages(!0):(this._render(!1,this.element.data("targetImageID")),this._items>1&&this._slideshowEnabled&&this.startSlideshow(),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable());return this._bindListener(),require(["Ui/Screen"],(function(e){e.pageOverlayOpen()})),!0},close:function(e){if(e&&e.preventDefault(),e&&"popstate"===e.type)return!!this._isOpen&&(this._container.removeClass("open"),null!==this._timer&&this._timer.stop(),this._unbindListener(),this._isOpen=!1,WCF.System.DisableScrolling.enable(),WCF.System.DisableZoom.enable(),require(["Ui/Screen"],(function(e){e.pageOverlayClose()})),!0);window.history.back()},startSlideshow:function(){return!this._disableSlideshow&&!this._slideshowEnabled&&(null===this._timer?this._timer=new WCF.PeriodicalExecuter($.proxy((function(){var e=this._active+1;e==this._items&&(e=0),this.showImage(e)}),this),1e3*this.options.speed):this._timer.resume(),this._slideshowEnabled=!0,this._ui.slideshow.toggle[0].querySelector("fa-icon").setIcon("pause"),!0)},stopSlideshow:function(e){return!!this._slideshowEnabled&&(this._timer.stop(),e&&this._ui.slideshow.toggle[0].querySelector("fa-icon").setIcon("play"),this._slideshowEnabled=!1,!0)},_bindListener:function(){$(document).on("keydown."+this._eventNamespace,$.proxy(this._keyDown,this)),$(window).on("resize."+this._eventNamespace,(()=>{window.setTimeout((()=>this._renderImage()),0)}))},_unbindListener:function(){$(document).off("keydown."+this._eventNamespace),$(window).off("resize."+this._eventNamespace)},_keyDown:function(e){switch(e.which){case $.ui.keyCode.ESCAPE:this.close();break;case $.ui.keyCode.LEFT:this._previousImage();break;case $.ui.keyCode.RIGHT:this._nextImage();break;case $.ui.keyCode.UP:this._container.hasClass("maximized")||this._toggleView();break;case $.ui.keyCode.DOWN:this._container.hasClass("maximized")&&this._toggleView();break;case $.ui.keyCode.ENTER:var i=this._ui.header.find("h1 > a");1==i.length?window.location=i.prop("href"):this._ui.slideshow.full.trigger("click");break;case 80:this._ui.slideshow.toggle.trigger("click");break;default:return!0}return!1},_render:function(e,i,t){var s,a,n,h,o;this._container.addClass("open"),s=null,e&&(s=this._ui.imageList.children("li:eq(0)"),this._thumbnailMarginRight=parseInt(s.css("marginRight").replace(/px$/,""))||0,this._thumbnailWidth=s.outerWidth(!0),this._thumbnailContainerWidth=this._ui.imageList.parent().innerWidth(),this._items>1&&this.options.enableSlideshow&&!i&&!t&&this.startSlideshow()),i?this._ui.imageList.children("li").each($.proxy((function(e,t){var s=$(t);if(s.data("objectID")==i)return s.trigger("click"),this.moveToImage(s.data("index")),!1}),this)):t?(a=[],$(this.options.imageSelector).each(function(e,i){i.closest(".messageSignature")===this._messageSignature&&a.push(i)}.bind(this)),n=0,a.forEach((function(e,i){e.id===t&&(n=i)})),h=this._ui.imageList.children("li:eq("+n+")"),-1!==this._active&&(o=!1,this._active!=h.data("index")&&(o=!0),this._ui.images[this._activeImage].prop("src")!=this._images[this._active].image.url&&(o=!0),o&&(this._active=-1)),h.trigger("click"),this.moveToImage(h.data("index"))):null!==s&&s.trigger("click"),this._toggleButtons(),this._preload()},_preload:function(){this._images.length<this._items&&this._images.length*this._thumbnailWidth-this._thumbnailOffset<this._thumbnailContainerWidth&&this._loadNextImages(!1)},_showImage:function(e){this.showImage($(e.currentTarget).data("index"),!0)},showImage:function(e,i){var t,s,a,n,h,o;return this._active!=e&&(this.stopSlideshow(i||!1),-1!=this._active&&this._images[this._active].listItem.removeClass("active"),this._active=e,window.history.replaceState({name:"imageViewer",container:this._eventNamespace,image:this._active},"",""),t=this._images[e],this._ui.imageList.children("li").removeClass("active"),t.listItem.addClass("active"),s=this._ui.imageContainer.getDimensions("inner"),a=this._activeImage?0:1,null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=a,n=this._active,this._ui.imageContainer.addClass("loading"),this._ui.images[a].off("load").prop("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="),this._ui.images[a].on("load",$.proxy((function(){this._imageOnLoad(n,a)}),this)),this._renderImage(a,t,s),this.options.staticViewer||this._ui.header.find("> div > a").prop("href",t.user.link).prop("title",t.user.username).children("img").prop("src",t.user.avatarURL),h=WCF.String.escapeHTML(t.image.title),t.image.link&&(h='<a href="'+t.image.link+'">'+h+"</a>"),this._ui.header.find("h1").html(h),this.options.staticViewer||(o=t.series&&t.series.title?WCF.String.escapeHTML(t.series.title):"",t.series.link&&(o='<a href="'+t.series.link+'">'+o+"</a>"),this._ui.header.find("h2").html(o)),this._ui.header.find("h3").text(WCF.Language.get("wcf.imageViewer.seriesIndex").replace(/{x}/,t.listItem.data("index")+1).replace(/{y}/,this._items)),this._ui.slideshow.full[0].querySelector("a").href=t.image.fullURL?t.image.fullURL:t.image.url,this.moveToImage(t.listItem.data("index")),this._toggleButtons(),!0)},_imageOnLoad:function(e,i){e==this._active&&(this._ui.imageContainer.removeClass("loading"),this._ui.images[i].addClass("active"),this.options.staticViewer&&this._renderImage(i,null),this.startSlideshow())},_renderImage:function(e,i,t){var s,a,n,h,o,l,r=!0;i||(e=this._activeImage,i=this._images[this._active],t={height:$(window).height()-(this._container.hasClass("maximized")||this._container.hasClass("wcfImageViewerMobile")?0:200),width:this._ui.imageContainer.innerWidth()},r=!1),t.height-=22,t.width-=20,(s=this._ui.images[e]).prop("src")!==i.image.url&&s.prop("src",i.image.url),r&&s[0].complete&&s.trigger("load"),this.options.staticViewer&&!i.image.height&&s[0].complete&&($.browser.mozilla||$.browser.safari?((a=new Image).src=i.image.url,i.image.height=a.height||s[0].naturalHeight,i.image.width=a.width||s[0].naturalWidth):(s.css({height:"auto",width:"auto"}),i.image.height=s[0].height,i.image.width=s[0].width)),n=i.image.height,h=i.image.width,o=0,n>t.height&&(o=t.height/n,n=t.height,h=Math.floor(h*o)),h>t.width&&(o=t.width/h,h=t.width,n=Math.floor(n*o)),l=Math.floor((t.width-h)/2),this._ui.images[e].css({height:n+"px",left:l+10+"px",marginTop:-1*Math.round(n/2)+"px",width:h+"px"})},_initUI:function(){var e,i,t,s,a,n,h,o;return!this._didInit&&(this._didInit=!0,this._container=$('<div class="wcfImageViewer'+(this.options.staticViewer?" wcfImageViewerStatic":"")+'" />').appendTo(document.body),e=$("<div><img /><img /></div>").appendTo(this._container),i=$('<footer><span class="wcfImageViewerButtonPrevious"><fa-icon size="24" name="angles-left"></fa-icon></span><div><ul /></div><span class="wcfImageViewerButtonNext"><fa-icon size="24" name="angles-right"></fa-icon></span></footer>').appendTo(this._container),t=$("<ul />").appendTo(e),s=$('<li class="wcfImageViewerSlideshowButtonPrevious"><fa-icon size="32" name="angle-left"></fa-icon></li>').appendTo(t),a=$('<li class="wcfImageViewerSlideshowButtonToggle pointer"><fa-icon size="32" name="play"></fa-icon></li>').appendTo(t),n=$('<li class="wcfImageViewerSlideshowButtonNext"><fa-icon size="32" name="angle-right"></fa-icon></li>').appendTo(t),h=$('<li class="wcfImageViewerSlideshowButtonEnlarge pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.enlarge")+'"><fa-icon size="32" name="expand"></fa-icon></li>').appendTo(t),o=$('<li class="wcfImageViewerSlideshowButtonFull pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.full")+'"><a href="#" target="_blank"><fa-icon size="32" name="arrow-up-right-from-square"></fa-icon></a></li>').appendTo(t),this._ui={buttonNext:i.children("span.wcfImageViewerButtonNext"),buttonPrevious:i.children("span.wcfImageViewerButtonPrevious"),header:$("<header><div"+(this.options.staticViewer?">":' class="box64"><a class="jsTooltip"><img /></a>')+"<div><h1 /><h2 /><h3 /></div></div></header>").appendTo(this._container),imageContainer:e,images:[e.children("img:eq(0)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")})),e.children("img:eq(1)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",(function(){$(this).removeClass("animateTransformation")}))],imageList:i.find("> div > ul"),slideshow:{container:t,enlarge:h,full:o,next:n,previous:s,toggle:a}},this._ui.buttonNext.click($.proxy(this._next,this)),this._ui.buttonPrevious.click($.proxy(this._previous,this)),n.click($.proxy(this._nextImage,this)),s.click($.proxy(this._previousImage,this)),h.click($.proxy(this._toggleView,this)),a.click($.proxy((function(){this._items<2||(this._slideshowEnabled?this.stopSlideshow(!0):(this._disableSlideshow=!1,this.startSlideshow()))}),this)),$(`<button type="button" class="wcfImageViewerButtonClose jsTooltip" title="${WCF.Language.get("wcf.global.button.close")}">\n\t\t\t<fa-icon size="48" name="xmark"></fa-icon>\n\t\t</button>`).appendTo(this._ui.header).click($.proxy(this.close,this)),$.browser.mobile||e.click(function(i){i.target===e[0]&&this.close()}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),require(["Ui/Screen"],function(e){e.on("screen-sm-down",{match:$.proxy(this._enableMobileView,this),unmatch:$.proxy(this._disableMobileView,this)})}.bind(this)),!0)},_enableMobileView:function(){this._container.addClass("wcfImageViewerMobile");var e=this;this._ui.imageContainer.swipe({swipeLeft:function(i){e._container.hasClass("maximized")&&e._nextImage(i)},swipeRight:function(i){e._container.hasClass("maximized")&&e._previousImage(i)},tap:function(i,t){switch(t.tagName){case"DIV":case"IMG":e._toggleView()}}}),this._isMobile=!0},_disableMobileView:function(){this._container.removeClass("wcfImageViewerMobile"),this._ui.imageContainer.swipe("destroy"),this._isMobile=!1},_toggleView:function(){this._ui.images[this._activeImage].addClass("animateTransformation"),this._container.toggleClass("maximized"),this._ui.slideshow.enlarge.toggleClass("active"),this._ui.slideshow.enlarge[0].querySelector("fa-icon").setIcon("compress"),this._renderImage(null,void 0,null)},_next:function(e,i){if(this._ui.buttonNext.hasClass("pointer")){null==i&&this.stopSlideshow(!0);var t=Math.max(this._items*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight,0);this._thumbnailOffset=Math.min(this._thumbnailOffset+this._thumbnailWidth*(i||this.options.shiftBy),t),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)}this._preload(),this._toggleButtons()},_previous:function(e,i){this._ui.buttonPrevious.hasClass("pointer")&&(null==i&&this.stopSlideshow(!0),this._thumbnailOffset=Math.max(this._thumbnailOffset-this._thumbnailWidth*(i||this.options.shiftBy),0),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._toggleButtons()},_nextImage:function(e){this._ui.slideshow.next.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active+1),e&&(e.preventDefault(),e.stopPropagation()))},_previousImage:function(e){this._ui.slideshow.previous.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active-1),e&&(e.preventDefault(),e.stopPropagation()))},moveToImage:function(e){var i,t=(e-3)*this._thumbnailWidth,s=t+5*this._thumbnailWidth,a=this._thumbnailOffset,n=this._thumbnailOffset+this._thumbnailContainerWidth,h=!1;if((t<a||s>n)&&(h=!0),h)if(i=0,t<a){for(;t<a;)i++,a-=this._thumbnailWidth;this._previous(null,i)}else{for(;s>n;)i++,n+=this._thumbnailWidth;this._next(null,i)}},_toggleButtons:function(){this._thumbnailOffset>0?this._ui.buttonPrevious.addClass("pointer"):this._ui.buttonPrevious.removeClass("pointer");var e=this._images.length*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight;this._thumbnailOffset>=e?this._ui.buttonNext.removeClass("pointer"):this._ui.buttonNext.addClass("pointer"),this._active>0?this._ui.slideshow.previous.addClass("pointer"):this._ui.slideshow.previous.removeClass("pointer"),this._active+1<this._images.length?this._ui.slideshow.next.addClass("pointer"):this._ui.slideshow.next.removeClass("pointer"),this._items<2?this._ui.slideshow.toggle.removeClass("pointer"):this._ui.slideshow.toggle.addClass("pointer")},_createThumbnails:function(e){var i,t,s,a,n,h;for(this.options.staticViewer&&(this._images=[],this._ui.imageList.empty()),i=0,t=e.length;i<t;i++)s=e[i],(a=$('<li class="loading pointer"><img src="'+s.thumbnail.url+'" /></li>').appendTo(this._ui.imageList)).data("index",this._images.length).data("objectID",s.objectID).click($.proxy(this._showImage,this)),(n=a.children("img")).get(0).complete?(a.removeClass("loading"),this.options.staticViewer&&this._fixThumbnailDimensions(n)):(h=this,n.on("load",(function(){var e=$(this);e.parent().removeClass("loading"),h.options.staticViewer&&h._fixThumbnailDimensions(e)}))),s.listItem=a,this._images.push(s)},_fixThumbnailDimensions:function(e){var i,t,s,a=new Image;a.src=e.prop("src"),(i=a.height)==(t=a.width)?i=t=80:i<t?(s=80/t,t=80,i*=s):(s=80/i,i=80,t*=s),e.css({height:i+"px",width:t+"px"})},_loadNextImages:function(e){this._proxy.setOption("data",{actionName:"loadNextImages",className:this.options.className,interfaceName:"wcf\\data\\IImageViewerAction",objectIDs:[this.element.data("objectID")],parameters:{maximumHeight:this._maxDimensions.height,maximumWidth:this._maxDimensions.width,offset:this._images.length,targetImageID:e&&this.element.data("targetImageID")?this.element.data("targetImageID"):0}}),this._proxy.setOption("showLoadingOverlay",!1),this._proxy.sendRequest()},_getStaticImages:function(){var e=[];return $(this.options.imageSelector).each(function(i,t){var s,a;if(t.closest(".messageSignature")!==this._messageSignature)return;(a=(s=$(t)).find("> img, .attachmentThumbnailImage > img").first()).length||(a=s.parentsUntil(".formAttachmentList").last().find(".attachmentTinyThumbnail"));let n="";if(0===a.length){const e=s[0].closest(".attachment__item");if(null!==e){const i=e.querySelector("woltlab-core-file"),t=i?.thumbnails.find((e=>"tiny"===e.identifier));n=t.link}}else n=a.prop("src");e.push({image:{fullURL:a.data("source")?a.data("source").replace(/\\\//g,"/"):s.prop("href"),link:"",title:s.prop("title"),url:s.prop("href")},series:null,thumbnail:{url:n},user:null})}.bind(this)),this._items=e.length,e},_success:function(e,i,t){var s,a;e.returnValues.items&&(this._items=e.returnValues.items),s=this._initUI(),this._createThumbnails(e.returnValues.images),a=e.returnValues.targetImageID?e.returnValues.targetImageID:0,this._render(s,a),this._isOpen||(this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable())}}); })(this); |
b4e0f162 |
26 | |
0d20df38 |
27 | // WCF.Label.js |
1ab2818a |
28 | (function (window, undefined) { "use strict";WCF.Label={},WCF.Label.Chooser=Class.extend({_container:null,_groups:{},_showWithoutSelection:!1,init:function(t,e,i,o){var a,n,s,l;if(this._container=null,this._groups={},this._showWithoutSelection=!0===o,this._initContainers(e),$.getLength(t))for(a in t)(n=this._groups[a])&&WCF.Dropdown.getDropdownMenu(n.wcfIdentify()).find("> ul > li:not(.dropdownDivider)").each($.proxy((function(e,i){var o=$(i),n=o.data("labelID")||0;n&&t[a]==n&&this._selectLabel(o,!0)}),this));for(s in this._containers)void 0===(l=this._containers[s]).data("labelID")&&l.data("labelID",0);this._container=$(e),i?$(i).click($.proxy(this._submit,this)):this._container.is("form")&&this._container.submit($.proxy(this._submit,this))},_initContainers:function(t){function e(t){t.addEventListener("wheel",(function(t){t.preventDefault()}),{passive:!1})}$(t).find(".labelChooser").each($.proxy((function(t,i){var o,a,n,s,l=$(i),r=l.data("groupID");this._groups[r]||(o=l.wcfIdentify(),null===(a=WCF.Dropdown.getDropdownMenu(o))&&(WCF.Dropdown.initDropdown(l.find(".dropdownToggle")),a=WCF.Dropdown.getDropdownMenu(o)),n=a,"div"==a.getTagName()&&a.children(".scrollableDropdownMenu").length&&(n=$("<ul />").appendTo(a),a=a.children(".scrollableDropdownMenu")),this._groups[r]=l,a.children("li").data("groupID",r).click($.proxy(this._click,this)),l.data("forceSelection")&&!this._showWithoutSelection||$('<li class="dropdownDivider" />').appendTo(n),this._showWithoutSelection&&e($('<li data-label-id="-1"><span><span class="badge label">'+WCF.Language.get("wcf.label.withoutSelection")+"</span></span></li>").data("groupID",r).appendTo(n).click($.proxy(this._click,this))[0]),l.data("forceSelection")||((s=$('<li data-label-id="0"><span><span class="badge label">'+WCF.Language.get("wcf.label.none")+"</span></span></li>").data("groupID",r).appendTo(n)).click($.proxy(this._click,this)),e(s[0])))}),this))},_click:function(t){this._selectLabel($(t.currentTarget),!1)},_selectLabel:function(t,e){var i=this._groups[t.data("groupID")];e&&void 0!==i.data("labelID")||(t.data("labelID")?i.data("labelID",t.data("labelID")):i.data("labelID",0),t=t.find("span > span"),i.find(".dropdownToggle > span").removeClass().addClass(t.attr("class")).text(t.text()),!e&&this._container[0]&&"FORM"===this._container[0].nodeName&&null===elBySel('input:not([type="hidden"]):not([type="submit"]):not([type="reset"]), select, textarea',this._container[0])&&setTimeout(function(){this._container.trigger("submit")}.bind(this),100))},_submit:function(){var t,e,i=this._container.find(".formSubmit");for(t in i.find('input[type="hidden"]').each((function(t,e){var i=$(e);0===i.attr("name").indexOf("labelIDs[")&&i.remove()})),this._groups)(e=this._groups[t]).data("labelID")&&$('<input type="hidden" name="labelIDs['+t+']" value="'+e.data("labelID")+'" />').appendTo(i)},destroy:function(){for(var t in this._groups)WCF.Dropdown.destroy(this._groups[t].wcfIdentify())}}),WCF.Label.ArticleLabelChooser=WCF.Label.Chooser.extend({_labelGroupsToCategories:null,init:function(t,e,i,o,a){this._super(e,i,o,a),this._labelGroupsToCategories=t,this._updateLabelGroups(),$("#categoryID").change($.proxy(this._updateLabelGroups,this))},_updateLabelGroups:function(){var t,e,i;if($(".labelChooser").each((function(t,e){$(e).parents("dl:eq(0)").hide()})),t=parseInt($("#categoryID").val()),this._labelGroupsToCategories[t])for(e=0,i=this._labelGroupsToCategories[t].length;e<i;e++)$("#labelGroup"+this._labelGroupsToCategories[t][e]).parents("dl:eq(0)").show()},_submit:function(){for(var t in this._groups)this._groups[t].is(":visible")||delete this._groups[t];this._super()}}); })(this); |
b4e0f162 |
29 | |
0d20df38 |
30 | // WCF.Location.js |
e234e470 |
31 | (function (window, undefined) { "use strict";function gm_authFailure(){WCF.System.Event.fireEvent("com.woltlab.wcf.googleMaps","authenticationFailure")}WCF.Location={},WCF.Location.Util={getLocation:function(t,e){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition((function(e){t(e.coords.latitude,e.coords.longitude)}),(function(){t(void 0,void 0)}),{timeout:e||5e3}):t(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&require(["Ui/Screen"],function(t){t.on("screen-sm-down",{setup:$.proxy(this._addSidebarMapListener,this)})}.bind(this)),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy((function(){e.open(this._map,t)}),this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a,n=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});return s&&n.setIcon(s),i&&(a=new google.maps.InfoWindow({content:i}),this._addInfoWindowEventListener(n,a),n.infoWindow=a),this._markers.push(n),n},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t,e,o,s,i=null,a=null,n=null,r=null;for(t in this._markers)o=(e=this._markers[t]).getPosition().lat(),s=e.getPosition().lng(),null===i?(i=a=o,n=r=s):(i>o?i=o:a<o&&(a=o),n>o?n=o:r<s&&(r=s));this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(i,n),new google.maps.LatLng(a,r)))},removeMarkers:function(){for(var t in this._markers)this._markers[t].setMap(null);this._markers=[]},setBounds:function(t,e){this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.latitude,e.longitude),new google.maps.LatLng(t.latitude,t.longitude)))},setCenter:function(t,e){this._map.setCenter(new google.maps.LatLng(t,e))}}),WCF.Location.GoogleMaps.LargeMap=WCF.Location.GoogleMaps.Map.extend({_actionClassName:null,_additionalParameters:{},_locationSearch:null,_locationSearchInputSelector:null,_markerClusterer:null,_objectIDs:[],_previousNorthEast:null,_previousSouthWest:null,_stringifyExcludedObjectIds:!1,init:function(t,e,o,s,i){this._stringifyExcludedObjectIds=!1,e&&e.stringifyExcludedObjectIds&&(this._stringifyExcludedObjectIds=e.stringifyExcludedObjectIds,delete e.stringifyExcludedObjectIds),this._super(t,e),this._actionClassName=o,this._locationSearchInputSelector=s||"",this._additionalParameters=i||{},this._objectIDs=[],this._locationSearchInputSelector&&(this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(s,$.proxy(this._centerMap,this))),this._markerClusterer=new MarkerClusterer(this._map,this._markers,{maxZoom:17,imagePath:WCF.Location.GoogleMaps.Settings.get("markerClustererImagePath")+"m"}),this._markerSpiderfier=new OverlappingMarkerSpiderfier(this._map,{keepSpiderfied:!0,markersWontHide:!0,markersWontMove:!0}),this._markerSpiderfier.addListener("click",$.proxy((function(t){t.infoWindow&&t.infoWindow.open(this._map,t)}),this)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._previousNorthEast=null,this._previousSouthWest=null,google.maps.event.addListener(this._map,"idle",$.proxy(this._loadMarkers,this))},_addInfoWindowEventListener:function(t,e){},_centerMap:function(t){this.setCenter(t.location.lat(),t.location.lng()),$(this._locationSearchInputSelector).val(t.label)},_loadMarkers:function(){var t=this._map.getBounds().getNorthEast(),e=this._map.getBounds().getSouthWest();return!(this._previousNorthEast&&this._previousNorthEast.lat()>=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng()||(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._stringifyExcludedObjectIds?JSON.stringify(this._objectIDs):this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),0))},_success:function(t,e,o){var s,i;if(t.returnValues&&t.returnValues.markers)for(s in t.returnValues.markers)i=t.returnValues.markers[s],this.addMarker(i.latitude,i.longitude,i.title,null,i.infoWindow),i.objectID?this._objectIDs.push(i.objectID):i.objectIDs&&(this._objectIDs=this._objectIDs.concat(i.objectIDs))},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('<div class="gmnoprint googleMapsCustomControlContainer"><div class="gm-style-mtc"><div class="googleMapsCustomControl">'+WCF.Language.get("wcf.map.showLocationSuggestions")+"</div></div></div>");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a,n=$(i),r=$('<a class="googleMapsUseLocationSuggestionLink" />').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);return n.append($("<p />").append(r)),a=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",n.get(0)),r.data("marker",a),a},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){var e,o,s,i;for(void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t),e=[],o=0,s=this._markers.length;o<s;o++)(i=this._markers[o]).draggable||(i.setVisible(t),t&&e.push(i));this._markerClusterer.clearMarkers(),t&&this._markerClusterer.addMarkers(e),this._loadMarkers()}}),WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i),this.setDelay(500),this._geocoder=new google.maps.Geocoder},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.formatted_address)+"</span></li>").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy((function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null}),this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){var o,s,i;if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){for(s in o=0,t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy((function(){this._clearList()}),this)),i=this._searchInput.parents(".dropdown").wcfIdentify(),WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i,!0),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy((function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))}),this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy((function(t){null!==t&&$(this._searchInput).val(t)}),this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(t,e,o,s,i){e&&(o=e.getPosition().lat(),s=e.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(o,s);this._geocoder.geocode({latLng:a},(function(e,o){o==google.maps.GeocoderStatus.OK?t(i?e:e[0].formatted_address):t(null)}))}}; })(this); |
b4e0f162 |
32 | |
0d20df38 |
33 | // WCF.Message.js |
1ab2818a |
34 | (function (window, undefined) { "use strict";WCF.Message={},WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,i,s,n){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=i,this._buttonSelector=s||".jsRevertButton",this._options=$.extend({isVersionTracker:!1,versionTrackerObjectType:"",versionTrackerObjectId:0,redirectUrl:""},n),this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var e=this;this._newIDInputs.change((function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._oldIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t>=i?$(this).disable():$(this).enable()}))})),this._oldIDInputs.change((function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._newIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t<=i?$(this).disable():$(this).enable()}))})),this._oldIDInputs.filter(":checked").change(),this._newIDInputs.filter(":checked").change()},_initElements:function(){var e=this;$(this._containerSelector).each((function(t,i){$(i).find(e._buttonSelector).click($.proxy(e._click,e))}))},_click:function(e){var t,i=$(e.currentTarget);e.preventDefault(),i.data("confirmMessage")?(t=this,WCF.System.Confirmation.show(i.data("confirmMessage"),(function(e){"cancel"!==e&&t._sendRequest(i)}),void 0,void 0,!0)):this._sendRequest(i)},_sendRequest:function(e){this._options.isVersionTracker?(this.proxy.setOption("url",window.WSC_API_URL+"index.php?ajax-invoke/&t="+window.SECURITY_TOKEN),this.proxy.setOption("data",{actionName:"revert",className:"wcf\\system\\version\\VersionTracker",parameters:{objectType:this._options.versionTrackerObjectType,objectID:this._options.versionTrackerObjectId,versionID:$(e).data("objectID")}})):this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._options.redirectUrl?(new WCF.System.Notification).show(function(){window.location=this._options.redirectUrl}.bind(this)):window.location.reload(!0)}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit((function(){$(this).find(".formSubmit input[type=submit]").disable()}));$(window).on("beforeunload",(function(){e.find(".formSubmit input[type=submit]").enable()}))}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:null,_proxy:null,_previewButton:null,_previewButtonLabel:"",init:function(e,t,i){this._className=e,this._messageFieldID=$.wcfEscapeID(t),this._textarea=$("#"+this._messageFieldID),this._textarea.length?(i=$.wcfEscapeID(i),this._previewButton=$("#"+i),this._previewButton.length?(this._previewButton.click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),this._ckeditorApi=void 0,require(["WoltLabSuite/Core/Component/Ckeditor"],(e=>{this._ckeditorApi=e}))):console.debug("[WCF.Message.Preview] Unable to find preview button identified by '"+i+"'")):console.debug("[WCF.Message.Preview] Unable to find message field identified by '"+this._messageFieldID+"'")},_click:function(e){e.preventDefault();var t=this._getMessage();if(null!==t){if(0===t.trim().length){const e=this._textarea[0].parentElement.querySelector(".innerError");return e&&e.remove(),void elInnerError(this._getCkeditor().element,WCF.Language.get("wcf.global.form.error.empty"))}return this._proxy.setOption("data",{actionName:"getMessagePreview",className:this._className,parameters:this._getParameters(t)}),this._proxy.sendRequest(),this._previewButtonLabel=this._previewButton.html(),this._previewButton.html(WCF.Language.get("wcf.global.loading")).disable(),e.stopPropagation(),!1}console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '"+this._messageFieldID+"'")},_getParameters:function(e){var t={};return $("#settings_"+this._messageFieldID).find("input[type=checkbox]").each((function(e,i){var s=$(i);s.is(":checked")&&(t[s.prop("name")]=s.prop("value"))})),{data:{message:e},options:t}},_getMessage:function(){const e=this._getCkeditor();return void 0===e?null:e.getHtml()},_getCkeditor(e){return this._ckeditorApi.getCkeditorById(e||this._messageFieldID)},_success:function(e,t,i){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(e){},_failure:function(e){var t,i;return null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._previewButton.html(this._previewButtonLabel).enable(),(t=this._textarea.parent().children("small.innerError").empty()).length||(t=$('<small class="innerError" />').appendTo(this._textarea.parent())),i="empty"===e.returnValues.errorType?WCF.Language.get("wcf.global.form.error.empty"):e.returnValues.errorMessage,e.returnValues.realErrorMessage&&(i=e.returnValues.realErrorMessage),t.html(i),!1)}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:null,_options:{},init:function(e){if(arguments.length>1&&"string"==typeof e)throw new Error("Outdated API call, please update your implementation.");if(this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFieldID:"",previewButtonID:"",messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFieldID,this._options.previewButtonID)},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'<div class="htmlContent">'+e.returnValues.message+"</div>")}.bind(this))},_getParameters:function(e){var t,i=this._super(e);for(t in this._options)this._options.hasOwnProperty(t)&&"messageFieldID"!==t&&"previewButtonID"!==t&&(i[t]=this._options[t]);return i},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.I18nPreview=WCF.Message.Preview.extend({_activeMessageField:"",_dialog:null,_options:{},init:function(e){if(this._activeMessageField="",this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFields:[],messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");if(this._options.messageFields.length<1)throw new TypeError("Expected a non empty list of message field ids");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFields[0],"buttonMessagePreview")},_click:function(e){var t,i,s,n;for(this._messageFieldID="",this._textarea=null,t="",i=null,s=0,n=this._options.messageFields.length;s<n;s++)if(t=this._options.messageFields[s],i=elById(t),this._getCkeditor(t).isVisible()){this._messageFieldID=t,this._textarea=$(i);break}if(""===this._messageFieldID)throw new Error("Unable to identify the active message field.");this._super(e)},_getParameters:function(e){var t,i=this._super(e);for(t in this._options)this._options.hasOwnProperty(t)&&-1===["messageFields","messageFieldID","previewButtonID"].indexOf(t)&&(i[t]=this._options[t]);return i},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'<div class="htmlContent">'+e.returnValues.message+"</div>")}.bind(this))},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:null,init:function(e,t,i){if(this._availableLanguages=t,this._languageID=e||0,this._languageInput=$("#languageID"),this._updateLabel(),this._languageInput.find(".dropdownMenu > li").click($.proxy(this._click,this)),!i){var s=this._languageInput.find(".dropdownMenu");$('<li class="dropdownDivider" />').appendTo(s),$('<li><span><span class="badge">'+this._availableLanguages[0]+"</span></span></li>").click($.proxy(this._disable,this)).appendTo(s)}this._languageInput.parents("form").submit($.proxy(this._submit,this))},_click:function(e){this._languageID=$(e.currentTarget).data("languageID"),this._updateLabel()},_disable:function(){this._languageID=0,this._updateLabel()},_updateLabel:function(){this._languageInput.find(".dropdownToggle > span").text(this._availableLanguages[this._languageID])},_submit:function(){this._languageInput.next("input[name=languageID]").prop("value",this._languageID)}}),WCF.Message.SmileyCategories=Class.extend({_cache:[],_proxy:null,_wysiwygSelector:"",init:function(e,t,i){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._wysiwygSelector=e,this._smiliesTabMenuId=t||"smilies-"+this._wysiwygSelector,this._formBuilderUsage=i||!1,$("#"+this._smiliesTabMenuId).on("messagetabmenushow",$.proxy(this._click,this))},_click:function(e,t){var i;if(e.preventDefault(),this._formBuilderUsage){if(!t.activeTab.tab.children("a").prop("href").match(/#([a-zA-Z0-9_-]+)$/))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");if(!RegExp.$1.match(this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab(\\d+)Container"))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");i=parseInt(RegExp.$1)}else i=parseInt(t.activeTab.tab.data("smileyCategoryID"));i&&(t.activeTab.container.children("ul.smileyList").length||(void 0===this._cache[i]?(this._proxy.setOption("data",{actionName:"getSmilies",className:"wcf\\data\\smiley\\category\\SmileyCategoryAction",objectIDs:[i]}),this._proxy.sendRequest()):t.activeTab.container.html(this._cache[i])))},_success:function(e,t,i){var s=parseInt(e.returnValues.smileyCategoryID);this._cache[s]=e.returnValues.template,this._formBuilderUsage?$("#"+this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab"+s+"Container").html(e.returnValues.template):$("#smilies-"+this._wysiwygSelector+"-"+s).html(e.returnValues.template)}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(e,t,i){require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(t){new t({className:this._getClassName(),containerId:e,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,quoteManager:i||null,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(e,t){},_callbackDropdownInit:function(e,t){return this._initDropdownMenu($(e).wcfIdentify(),$(t)),null},_getClassName:function(){return""}}),WCF.Message.Submit={_buttons:{},registerButton:function(e,t){WCF.Browser.isChrome()&&(this._buttons[e]=$(t))},execute:function(e){this._buttons[e]&&this._buttons[e].trigger("click")}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({init:function(e,t,i,s,n,a,o){require(["WoltLabSuite/Core/Ui/Message/Quote"],(r=>{new r.default(e,t,i,s,n,a,o)}))}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:null,_editorId:"",_editorIdAlternative:"",_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_supportPaste:!1,_supportPasteOverride:!1,init:function(e,t,i,s){if(this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorId="",this._editorIdAlternative="",this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._supportPaste=!1,this._supportPasteOverride=!1,t){var n=$("#"+t);n.length&&(this._editorId=t,this._supportPaste=!0,this._form=n.parents("form:eq(0)"),this._form.length?(this._form.submit(this._submit.bind(this)),this._removeOnSubmit=s||[]):(this._form=null,this._supportPaste=!0===i))}this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?message-quote/&t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.quote","reload",this.countQuotes.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){const t=document.getElementById(this._editorIdAlternative?this._editorIdAlternative:this._editorId);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:i})=>{i(t).insertQuote({author:e.quote.username,content:e.quote.text,isText:!e.quote.isFullQuote,link:e.quote.link})}))}.bind(this))},setAlternativeEditor:function(e){this._editorIdAlternative||this._supportPaste||(this._hasTemplate=!1,this._supportPaste=!0,this._supportPasteOverride=!0),"object"==typeof e&&(e=e[0].id),this._editorIdAlternative=e},clearAlternativeEditor:function(){this._supportPasteOverride&&(this._hasTemplate=!1,this._supportPaste=!1,this._supportPasteOverride=!1),this._editorIdAlternative=""},register:function(e,t){this._handlers[e]=t},updateCount:function(e,t){var i,s;for(i in this._count=parseInt(e)||0,this._toggleShowQuotes(),this._handlers)this._handlers.hasOwnProperty(i)&&(s=t[i]||[],this._handlers[i].updateFullQuoteObjectIDs(s))},insertQuotes:function(e,t,i){this._insertQuotes?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:i}):this._insertQuotes=!0},_toggleShowQuotes:function(){require(["WoltLabSuite/Core/Ui/Page/Action"],function(e){var t,i="showQuotes";this._count?(void 0===(t=e.get(i))&&((t=elCreate("a")).addEventListener("mousedown",this._click.bind(this)),e.add(i,t)),t.textContent=WCF.Language.get("wcf.message.quote.showQuotes",{count:this._count}),e.show(i)):e.remove(i),this._hasTemplate=!1}.bind(this))},_click:function(){this._hasTemplate?this._dialog.wcfDialog("open"):(this._proxy.showLoadingOverlayOnce(),this._proxy.setOption("data",{actionName:"getQuotes",supportPaste:this._supportPaste}),this._proxy.sendRequest())},renderDialog:function(e){var t,i,s;null===this._dialog&&(this._dialog=$("#messageQuoteList"),this._dialog.length||(this._dialog=$('<div id="messageQuoteList" />').hide().appendTo(document.body))),this._dialog.html(e),t=$('<div class="formSubmit" />').appendTo(this._dialog),this._supportPaste&&(this._buttons.insert=$('<button type="button" class="button buttonPrimary">'+WCF.Language.get("wcf.message.quote.insertAllQuotes")+"</button>").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$('<button type="button" class="button">'+WCF.Language.get("wcf.message.quote.removeAllQuotes")+"</button>").click($.proxy(this._removeSelected,this)).appendTo(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.quote.manageQuotes")}),this._dialog.wcfDialog("render"),this._hasTemplate=!0,i=this._dialog.find(".jsInsertQuote"),this._supportPaste?i.click($.proxy(this._insertQuote,this)):i.hide(),this._dialog.find("input.jsCheckbox").change($.proxy(this._changeButtons,this)),this._removeOnSubmit.length&&(s=this,this._dialog.find("input.jsRemoveQuote").each((function(e,t){var i=$(t).change($.proxy(this._change,this));WCF.inArray(i.parent("li").attr("data-quote-id"),s._removeOnSubmit)&&i.attr("checked","checked")})))},_changeButtons:function(){this._dialog.find("input.jsCheckbox:checked").length?(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertSelectedQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeSelectedQuotes"))):(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertAllQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeAllQuotes")))},_change:function(e){var t,i=$(e.currentTarget),s=i.parent("li").attr("data-quote-id");i.prop("checked")?this._removeOnSubmit.push(s):-1!==(t=this._removeOnSubmit.indexOf(s))&&this._removeOnSubmit.splice(t,1)},_insertSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),this._dialog.wcfDialog("close"),window.setTimeout((()=>{this._dialog.find("input.jsCheckbox:checked").each($.proxy((function(e,t){this._insertQuote(null,t)}),this))}),0)},_insertQuote:function(e,t){var i=$(e?e.currentTarget:t).parents("li:eq(0)"),s=i.children(".jsFullQuote")[0].textContent.trim(),n=i.parents(".message:eq(0)"),a=n.data("username"),o=n.data("link"),r=!elDataBool(i[0],"is-full-quote");const l=document.getElementById(this._editorIdAlternative?this._editorIdAlternative:this._editorId);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:e})=>{e(l).insertQuote({author:a,content:s,isText:r,link:o})})),this._removeOnSubmit.push(i.data("quote-id")),null!==e&&require(["WoltLabSuite/Core/Environment"],function(e){var t=function(){this._dialog.wcfDialog("close")}.bind(this);"ios"===e.platform()?window.setTimeout(t,100):t()}.bind(this))},_removeSelected:function(){var e,t,i;if(this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),e=[],this._dialog.find("input.jsCheckbox:checked").each((function(t,i){e.push($(i).parents("li").attr("data-quote-id"))})),e.length){for(i in t=[],this._handlers)this._handlers.hasOwnProperty(i)&&t.push(i);this._proxy.setOption("data",{actionName:"remove",getFullQuoteObjectIDs:this._handlers.length>0,objectTypes:t,quoteIDs:e}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")}},_submit:function(){var e,t,i;if(this._supportPaste&&this._removeOnSubmit.length>0)for(e=this._form.find(".formSubmit"),t=0,i=this._removeOnSubmit.length;t<i;t++)$('<input type="hidden" name="__removeQuoteIDs[]" value="'+this._removeOnSubmit[t]+'" />').appendTo(e)},getQuotesMarkedForRemoval:function(){return this._removeOnSubmit},markQuotesForRemoval:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"markForRemoval",quoteIDs:this._removeOnSubmit}),this._proxy.suppressErrors(),this._proxy.sendRequest())},removeMarkedQuotes:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"removeMarkedQuotes",getFullQuoteObjectIDs:this._handlers.length>0}),this._proxy.sendRequest())},countQuotes:function(){var e,t=[];for(e in this._handlers)this._handlers.hasOwnProperty(e)&&t.push(e);this._proxy.setOption("data",{actionName:"count",getFullQuoteObjectIDs:t.length>0,objectTypes:t}),this._proxy.sendRequest()},_success:function(e){if(null!==e){if(void 0!==e.count){var t=void 0!==e.fullQuoteObjectIDs?e.fullQuoteObjectIDs:{};this.updateCount(e.count,t)}void 0!==e.template&&(""==$.trim(e.template)?this.updateCount(0,{}):this.renderDialog(e.template))}},supportPaste:function(){return this._supportPaste}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){var t,i,s,n,a,o;e.preventDefault(),i=(t=$(e.currentTarget)).prop("href"),s=t.data("linkTitle")?t.data("linkTitle"):i,n=i.hashCode(),void 0===this._cache[n]?(a=!1,null===this._dialog?(this._dialog=$('<div id="shareContentDialog" />').hide().appendTo(document.body),a=!0):this._dialog.empty(),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalink" class="long" readonly />').attr("value",i).appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly />').attr("value","[url='"+i+"']"+s+"[/url]").appendTo(o),o=$('<section class="section"><h2 class="sectionTitle"><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></h2></section>").appendTo(this._dialog),$('<input type="text" id="__sharePermalinkHTML" class="long" readonly />').attr("value",'<a href="'+i+'">'+WCF.String.escapeHTML(s)+"</a>").appendTo(o),""!==this._shareButtonsTemplate&&(o=$('<section class="section"><h2 class="sectionTitle">'+WCF.Language.get("wcf.message.share")+"</h2>"+this._shareButtonsTemplate+"</section>").appendTo(this._dialog),elData(o.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(i))),this._cache[n]=this._dialog.html(),a?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[n]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click((function(){$(this).select()}));navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown((function(){return!1})).removeAttr("readonly").click((function(){this.setSelectionRange(0,9999)}))}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e,t,i,s,n,a,o,r,l,u=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),h=this.element.find("> div, > fieldset");if(u.length==h.length){for(e=this.element.data("preselect"),h.each((function(t,i){if(null!==elBySel(".innerError",i))return e=$(u[t]).data("name"),!1})),"true"===e&&(e=!0),this._tabs=[],this._tabsByName={},t=0;t<u.length;t++){i=$(u[t]),s=$(h[t]),void 0===(n=i.data("name"))&&(void 0!==(a=i.children("a").prop("href"))&&a.match(/#([a-zA-Z_-]+)$/)&&(n=RegExp.$1),void 0===n&&(n=i.wcfIdentify())),this._tabs.push({container:s,name:n,tab:i}),this._tabsByName[n]=t,(o=i.children("a").data("index",t).on("mousedown",this._showTab.bind(this)).on("touchstart",this._showTab.bind(this))).attr("role","button").attr("tabindex","0").attr("aria-haspopup",!0).attr("aria-expanded",!1).attr("aria-controls",s[0].id);const r=u[t].querySelector("span:not(.icon)");r&&o[0].setAttribute("aria-labelledby",$(r).wcfIdentify()),o.on("keydown",function(e){13!==e.which&&32!==e.which||(e.preventDefault(),this._showTab(e))}.bind(this)),(e===n||!0===e&&0===t)&&o.trigger("mousedown")}if(!0===e&&this._tabs.length&&!window.matchMedia("(max-width: 544px)").matches&&this._tabs[0].tab.children("a").trigger("click"),void 0!==(r=this.element.data("collapsible"))&&(this.options.collapsible=r),l=elData(this.element[0],"wysiwyg-container-id")){const e=document.getElementById(l);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({listenToCkeditor:t})=>{t(e).reset((()=>{for(var e=0,t=this._tabs.length;e<t;e++)this._tabs[e].container.removeClass("active"),this._tabs[e].tab.removeClass("active")}))}))}}else console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.")},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,i){var s,n,a,o,r,l=null===e?t:$(e.currentTarget).data("index");for(i=!this.options.collapsible||!0===i,s=null,n=0;n<this._tabs.length;n++){if(a=this._tabs[n],n==l){if(!a.tab.hasClass("active")){a.tab.addClass("active"),a.container.addClass("active"),s=a,a.tab.children("a").attr("aria-expanded",!0),o=a.container[0],null===elBySel(".messageTabMenuContent.active",o)&&null!==elBySel(".messageTabMenuContent",o)&&null!==(r=elBySel("nav > ul > li[data-name] > a",o))&&$(r).trigger("mousedown");continue}if(!0===i)continue}a.tab.removeClass("active"),a.container.removeClass("active"),a.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==s&&this._trigger("show",{},{activeTab:s}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this); |
b4e0f162 |
35 | |
0d20df38 |
36 | // WCF.User.js |
1ab2818a |
37 | (function (window, undefined) { "use strict";WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("<div>"+this._cache[t]+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){var e,i;this._profileContent=$("#profileContent"),this._userID=t,e=this._profileContent.data("active"),i=!1,this._profileContent.find("div.tabMenuContent").each($.proxy((function(t,s){var a=$(s).wcfIdentify();e===a?this._hasContent[a]=!0:(this._hasContent[a]=!1,i=!0)}),this)),i&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy((function(t,e){var i=$(e);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1}),this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],(function(t){t.getTabMenu("profileContent").select("likes")}))}.bind(this))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(t,e,i){var s=t.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],(function(e,i){i.insertHtml(t.returnValues.template,elById(s),"append"),e.trigger()}))}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:null,_tab:null,_userID:0,init:function(t,e){this._actionName="",this._active=!1,this._cachedTemplate="",this._tab=$("#about"),this._userID=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),e&&this._beginEdit()},_initButtons:function(){this._buttons={beginEdit:$(".jsButtonEditProfile:eq(0)").click(this._beginEdit.bind(this))}},_beginEdit:function(t){t&&t.preventDefault(),this._active||(this._active=!0,this._actionName="beginEdit",this._buttons.beginEdit.parent().addClass("active"),$("#profileContent").wcfTabs("select","about"),this._proxy.setOption("data",{actionName:"beginEdit",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID]}),this._proxy.sendRequest())},_save:function(){require(["WoltLabSuite/Core/Component/Ckeditor"],(({getCkeditor:t})=>{var e,i;const s=Array.from(this._tab[0].querySelectorAll("textarea")).find((e=>{if(void 0===t(e))return!1;const i={api:{throwError:elInnerError},valid:!0};return WCF.System.Event.fireEvent("com.woltlab.wcf.ckeditor5",`validate_${e.id}`,i),!1===i.valid}));s?s.parentElement.scrollIntoView({behavior:"smooth"}):(this._actionName="save",e=/values\[([a-zA-Z0-9._-]+)\]/,i={},this._tab.find("input, textarea, select").each((function(s,a){var n,o,r,c=$(a),l=null;switch(c.getTagName()){case"input":if(("radio"===(n=c.attr("type"))||"checkbox"===n)&&!c.prop("checked"))return;break;case"textarea":let e=t(a);void 0!==e&&(l=e.getHtml())}o=c.attr("name"),e.test(o)&&(r=RegExp.$1,null===l&&(l=c.val()),"checkbox"===c.attr("type")&&/\[\]$/.test(o)?(Array.isArray(i[r])||(i[r]=[]),i[r].push(l)):i[r]=l)})),this._proxy.setOption("data",{actionName:"save",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID],parameters:{values:i}}),this._proxy.sendRequest())}))},_restore:function(){this._actionName="restore",this._active=!1,this._buttons.beginEdit.parent().removeClass("active"),this._destroyEditor(),this._tab.html(this._cachedTemplate).children().css({height:"auto"})},_success:function(t,e,i){switch(this._actionName){case"beginEdit":this._prepareEdit(t);break;case"save":t.returnValues.success?(this._cachedTemplate=t.returnValues.template,this._restore()):this._prepareEdit(t,!0)}},_prepareEdit:function(t,e){this._destroyEditor();var i=this;this._tab.html((function(s,a){return!0!==e&&(i._cachedTemplate=a),t.returnValues.template})),this._tab.find("input[type=text]").attr("autocomplete","off"),this._tab.find(".formSubmit > button[data-type=save]").click($.proxy(this._save,this)),this._tab.find(".formSubmit > button[data-type=restore]").click($.proxy(this._restore,this)),this._tab.find("input").keyup((function(t){if(t.which===$.ui.keyCode.ENTER)return i._save(),t.preventDefault(),!1}))},_destroyEditor:function(){require(["WoltLabSuite/Core/Component/Ckeditor"],(({getCkeditor:t})=>{this._tab[0].querySelectorAll("textarea").forEach((e=>{const i=t(e);i?.destroy()}))}))}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e,i=this._element.val();return i?null!==this._confirmElement&&""!=(e=this._confirmElement.val())&&i!=e?this._showError(this._confirmElement,this._errorMessages.notEqual):void(this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())):this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"))},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("<small />").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return!(t.length<this._options.minlength||t.length>this._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsMarkAllAsConfirmed").click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.user.notification.markAllAsConfirmed.confirmMessage"),(function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"},success:function(){window.location.reload()}})}))})),this._convertList()},_convertList:function(){$(".userNotificationItemList > .notificationItem").each(function(t,e){var i=$(e);i.data("isRead")||(i.find("a:not(.userLink)").prop("href",i.data("link")),$(`<button type="button" class="notificationItemMarkAsConfirmed jsTooltip" title="${WCF.Language.get("wcf.global.button.markAsRead")}">\n\t\t\t\t\t\t<fa-icon size="24" name="check"></fa-icon>\n\t\t\t\t\t</button>`).appendTo(i).click($.proxy(this._markAsConfirmed,this)))}.bind(this)),WCF.DOMNodeInsertedHandler.execute()},_markAsConfirmed:function(t){t.preventDefault();var e=$(t.currentTarget).parents(".notificationItem:eq(0)").data("objectID");return this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest(),!1},_success:function(t,e,i){var s=$(".userNotificationItemList > .notificationItem[data-object-id="+t.returnValues.markAsRead+"]");s.data("isRead",!0),s.find(".newContentBadge").remove(),s.find(".notificationItemMarkAsConfirmed").remove(),s.removeClass("notificationUnconfirmed")}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(t){var e=$("#previewContainer");e.length||(e=$('<section class="section" id="previewContainer"><h2 class="sectionTitle">'+WCF.Language.get("wcf.global.preview")+'</h2><div class="htmlContent messageSignatureConstraints"></div></section>').insertBefore($("#signatureContainer")).wcfFadeIn()),e.children("div").first().html(t.returnValues.message)}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('<li class="showMore"><button type="button" class="button small">'+WCF.Language.get("wcf.user.recentActivity.more")+"</button></li>").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('<li class="showMore"><small>'+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small></li>").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($("<small>"+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small>").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:null,_followButtonSelector:".jsFollowButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._followButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._followButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("following")?"unfollow":"follow",className:"wcf\\data\\user\\follow\\UserFollowAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._followButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.following?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unfollow")),s[0].querySelector("fa-icon").setIcon("circle-minus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unfollow"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.follow")),s[0].querySelector("fa-icon").setIcon("circle-plus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.follow"))),s.data("following",t.returnValues.following),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Action.Ignore=Class.extend({_containerList:null,_ignoreButtonSelector:".jsIgnoreButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._ignoreButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._ignoreButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("ignored")?"unignore":"ignore",className:"wcf\\data\\user\\ignore\\UserIgnoreAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._ignoreButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.isIgnoredUser?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unignore")),s[0].querySelector("fa-icon").setIcon("circle"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unignore"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.ignore")),s[0].querySelector("fa-icon").setIcon("ban"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.ignore"))),s.data("ignored",t.returnValues.isIgnoredUser),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(t){this._super($("#avatarUpload > dd > div"),void 0,"wcf\\data\\user\\avatar\\UserAvatarAction"),this._userID=t||0,$("#avatarForm input[type=radio]").change((function(){"custom"==$(this).val()?$("#avatarUpload > dd > div").show():$("#avatarUpload > dd > div").hide()})),$("#avatarForm input[type=radio][value=custom]:checked").length||$("#avatarUpload > dd > div").hide()},_initFile:function(t){return $("#avatarUpload > dt > img")},_success:function(t,e){e.returnValues.url?(this._updateImage(e.returnValues.url),$("#avatarUpload > dd > .innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.user.avatar.upload.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.user.avatar.upload.error."+e.returnValues.errorType))},_updateImage:function(t){$("#avatarUpload > dt > img").remove();var e=$('<img src="'+t+'" class="userAvatarImage" alt="" />').css({height:"auto","max-height":"96px","max-width":"96px",width:"auto"});$("#avatarUpload > dt").prepend(e),WCF.DOMNodeInsertedHandler.execute()},_getInnerErrorElement:function(){var t=$("#avatarUpload > dd > .innerError");return t.length||(t=$('<small class="innerError"></span>'),$("#avatarUpload > dd").append(t)),t},_getParameters:function(){return{userID:this._userID}}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){if(e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount);else if(this._cache[this._pageNo]){var i=!1;null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('<div id="userList'+this._className.hashCode()+'" />').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),this._pageCount>1?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()}else this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:".jsSubscribeButton",_buttons:{},_dialog:null,_notification:null,_reloadOnUnsubscribe:!1,init:function(t){this._buttons={},this._notification=null,this._reloadOnUnsubscribe=!0===t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(this._buttonSelector).each($.proxy((function(t,e){var i,s,a=$(e);a.addClass("pointer"),i=a.data("objectType"),s=a.data("objectID"),void 0===this._buttons[i]&&(this._buttons[i]={}),this._buttons[i][s]=a.click($.proxy(this._click,this))}),this)),WCF.System.Event.addListener("com.woltlab.wcf.objectWatch","update",$.proxy(this._updateSubscriptionStatus,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget);this._proxy.setOption("data",{actionName:"manageSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{objectID:e.data("objectID"),objectType:e.data("objectType")}}),this._proxy.sendRequest()},_success:function(t,e,i){var s,a;"manageSubscription"===t.actionName?(null===this._dialog?(this._dialog=$("<div>"+t.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.objectWatch.manageSubscription")})):(this._dialog.html(t.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find(".formSubmit > .jsButtonSave").data("objectID",t.returnValues.objectID).data("objectType",t.returnValues.objectType).click($.proxy(this._save,this)),s=this._dialog.find("input[name=enableNotification]").disable(),this._dialog.find("input[name=subscribe]").change((function(t){1==$(t.currentTarget).val()?s.enable():s.disable()})),(a=this._dialog.find("input[name=subscribe]:checked")).length&&1==a.val()&&s.enable()):"saveSubscription"===t.actionName&&this._dialog.is(":visible")&&(this._dialog.wcfDialog("close"),this._updateSubscriptionStatus({isSubscribed:t.returnValues.subscribe,objectID:t.returnValues.objectID}),null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show())},_save:function(t){var e=this._buttons[$(t.currentTarget).data("objectType")][$(t.currentTarget).data("objectID")],i=this._dialog.find("input[name=subscribe]:checked").val(),s=this._dialog.find("input[name=enableNotification]").is(":checked")?1:0;this._proxy.setOption("data",{actionName:"saveSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{enableNotification:s,objectID:e.data("objectID"),objectType:e.data("objectType"),subscribe:i}}),this._proxy.sendRequest()},_updateSubscriptionStatus:function(t){var e=$(this._buttonSelector+"[data-object-id="+t.objectID+"]"),i=e.children(".icon");if(t.isSubscribed)i[0].querySelector("fa-icon").setIcon("bookmark",!0),e.data("isSubscribed",!0),e.addClass("active");else if(e.data("removeOnUnsubscribe")?e.parent().remove():(i[0].querySelector("fa-icon").setIcon("bookmark"),e.data("isSubscribed",!1),e.removeClass("active")),this._reloadOnUnsubscribe)return void window.location.reload();WCF.System.Event.fireEvent("com.woltlab.wcf.objectWatch","updatedSubscription",t)}}); })(this); |
b4e0f162 |
38 | |
0d20df38 |
39 | // WCF.Moderation.js |
e234e470 |
40 | (function (window, undefined) { "use strict";WCF.Moderation={},WCF.Moderation.Management=Class.extend({_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:null,_languageItem:"",_proxy:null,_queueID:0,_redirectURL:"",init:function(e,t,i){this._buttonSelector?this._className?(this._dialog=null,this._queueID=e,this._redirectURL=t,this._languageItem=i,this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),$(this._buttonSelector).click($.proxy(this._click,this))):console.debug("[WCF.Moderation.Management] Missing class name, aborting."):console.debug("[WCF.Moderation.Management] Missing button selector, aborting.")},_click:function(e){var t=$(e.currentTarget).wcfIdentify(),i="";this._confirmationTemplate[t]&&(i=this._confirmationTemplate[t]),WCF.System.Confirmation.show(WCF.Language.get(this._languageItem.replace(/{actionName}/,t)),$.proxy((function(e,i,o){if("confirm"===e){var n={actionName:t,className:this._className,objectIDs:[this._queueID]};this._confirmationTemplate[t]&&(n.parameters={},$(o).find("input, textarea").each((function(e,t){var i=$(t),o=i.val();"input"===i.getTagName()&&"checkbox"===i.attr("type")&&(i.is(":checked")||(o=null)),null!==o&&(n.parameters[i.attr("name")]=o)}))),this._proxy.setOption("data",n),this._proxy.sendRequest(),$(this._buttonSelector).disable()}}),this),{},i)},_success:function(e,t,i){var o=new WCF.System.Notification(WCF.Language.get("wcf.global.success")),n=this;o.show((function(){window.location=n._redirectURL}))}}),WCF.Moderation.Queue={},WCF.Moderation.Queue.MarkAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(document).on("dblclick",".moderationList .new .columnAvatar",$.proxy(this._dblclick,this))},_dblclick:function(e){this._proxy.setOption("data",{actionName:"markAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[$(e.currentTarget).parents(".moderationQueueEntry:eq(0)").data("queueID")]}),this._proxy.sendRequest()},_success:function(e,t,i){$(".moderationList .new").each((function(t,i){var o=$(i);WCF.inArray(o.data("queueID"),e.objectIDs)&&(o.removeClass("new"),o.find(".columnAvatar").off("dblclick"))}))}}),WCF.Moderation.Queue.MarkAllAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".markAllAsReadButton").click($.proxy(this._click,this))},_click:function(e){e.preventDefault(),this._proxy.setOption("data",{actionName:"markAllAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},_success:function(e,t,i){$("#outstandingModeration .badgeUpdate").remove();var o=$(".moderationList");o.find(".new").removeClass("new"),o.find(".columnAvatar").off("dblclick")}}),WCF.Moderation.Activation={},WCF.Moderation.Activation.Management=WCF.Moderation.Management.extend({init:function(e,t){this._buttonSelector="#enableContent, #removeContent",this._className="wcf\\data\\moderation\\queue\\ModerationQueueActivationAction",this._super(e,t,"wcf.moderation.activation.{actionName}.confirmMessage")}}),WCF.Moderation.Report={},WCF.Moderation.Report.Content=Class.extend({_buttons:{},_buttonSelector:"",_objectType:"",init:function(e,t){this._objectType=e,this._buttonSelector=t,this._buttons={},this._initButtons(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Moderation.Report"+this._objectType.hashCode(),$.proxy(this._initButtons,this))},_initButtons:function(){var e=this;$(this._buttonSelector).each(((t,i)=>{var o=$(i),n=o.wcfIdentify();e._buttons[n]||(e._buttons[n]=o,require(["WoltLabSuite/Core/Ui/Moderation/Report"],(({registerLegacyButton:e})=>{e(i,this._objectType)})))}))}}),WCF.Moderation.Report.Management=WCF.Moderation.Management.extend({init:function(e,t,i){this._buttonSelector="#removeContent, #removeReport, #changeJustifiedStatus",this._className="wcf\\data\\moderation\\queue\\ModerationQueueReportAction",this._super(e,t,"wcf.moderation.report.{actionName}.confirmMessage"),this._confirmationTemplate.removeContent=$('<div class="section"><dl><dt><label for="message">'+WCF.Language.get("wcf.moderation.report.removeContent.reason")+'</label></dt><dd><textarea name="message" id="message" cols="40" rows="3" /></dd></dl></div>'),this._confirmationTemplate.removeReport=$('<div class="section"><dl><dt></dt><dd><label><input type="checkbox" name="markAsJustified" id="markAsJustified" value="1"> '+WCF.Language.get("wcf.moderation.report.removeReport.markAsJustified")+"</label></dd></dl></div>"),this._confirmationTemplate.changeJustifiedStatus=$('<div class="section"><dl><dt></dt><dd><label><input type="checkbox" name="markAsJustified" id="markAsJustified" value="1"'+(i?' checked="checked"':"")+"> "+WCF.Language.get("wcf.moderation.report.changeJustifiedStatus.markAsJustified")+"</label></dd></dl></div>")},_success:function(e,t,i){"changeJustifiedStatus"===e.actionName?(new WCF.System.Notification).show((()=>{window.location.reload()})):this._super(e,t,i)}}); })(this); |
6f0b2d11 |
41 | |