/*
 jQuery UI Touch Punch 1.1.5 as modified by RWAP Software
 based on original touchpunch v0.2.3 which has not been updated since 2014

 Updates by RWAP Software to take account of various suggested changes on the original code issues

 Original: https://github.com/furf/jquery-ui-touch-punch
 Copyright 2011–2014, Dave Furfero
 Dual licensed under the MIT or GPL Version 2 licenses.

 Fork: https://github.com/RWAP/jquery-ui-touch-punch

 Depends:
 jquery.ui.widget.js
 jquery.ui.mouse.js
*/
(function(e){"function"===typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function u(a){return null==a?a+"":"object"===typeof a?w[F.call(a)]||"object":typeof a}function x(a,b,d){var c=Q[b.type]||{};if(null==a)return d||!b.def?null:b.def;a=c.floor?~~a:parseFloat(a);return c.mod?(a+c.mod)%c.mod:Math.min(c.max,Math.max(0,a))}function C(a){var b=A(),d=b._rgba=[];a=a.toLowerCase();y(O,function(c,f){c=(c=f.re.exec(a))&&f.parse(c);f=f.space||"rgba";if(c)return c=b[f](c),b[J[f].cache]=
c[J[f].cache],d=b._rgba=c._rgba,!1});return d.length?("0,0,0,0"===d.join()&&D.extend(d,H.transparent),b):H[a]}function I(a,b,d){d=(d+1)%1;return 1>6*d?a+(b-a)*d*6:1>2*d?b:2>3*d?a+(b-a)*(2/3-d)*6:a}e.ui=e.ui||{};e.uiBackCompat=!0;e.ui.version="1.14.1";var K=0,G=Array.prototype.hasOwnProperty,t=Array.prototype.slice;e.cleanData=function(a){return function(b){var d,c,f;for(f=0;null!=(c=b[f]);f++)(d=e._data(c,"events"))&&d.remove&&e(c).triggerHandler("remove");a(b)}}(e.cleanData);e.widget=function(a,
b,d){var c={},f=a.split(".")[0];a=a.split(".")[1];if("__proto__"===a||"constructor"===a)return e.error("Invalid widget name: "+a);var g=f+"-"+a;d||(d=b,b=e.Widget);Array.isArray(d)&&(d=e.extend.apply(null,[{}].concat(d)));e.expr.pseudos[g.toLowerCase()]=function(n){return!!e.data(n,g)};e[f]=e[f]||{};var h=e[f][a];var l=e[f][a]=function(n,r){if(!this||!this._createWidget)return new l(n,r);arguments.length&&this._createWidget(n,r)};e.extend(l,h,{version:d.version,_proto:e.extend({},d),_childConstructors:[]});
var k=new b;k.options=e.widget.extend({},k.options);e.each(d,function(n,r){c[n]="function"!==typeof r?r:function(){function m(){return b.prototype[n].apply(this,arguments)}function p(q){return b.prototype[n].apply(this,q)}return function(){var q=this._super,v=this._superApply;this._super=m;this._superApply=p;var z=r.apply(this,arguments);this._super=q;this._superApply=v;return z}}()});l.prototype=e.widget.extend(k,{widgetEventPrefix:h?k.widgetEventPrefix||a:a},c,{constructor:l,namespace:f,widgetName:a,
widgetFullName:g});h?(e.each(h._childConstructors,function(n,r){n=r.prototype;e.widget(n.namespace+"."+n.widgetName,l,r._proto)}),delete h._childConstructors):b._childConstructors.push(l);e.widget.bridge(a,l);return l};e.widget.extend=function(a){for(var b=t.call(arguments,1),d=0,c=b.length,f,g;d<c;d++)for(f in b[d])g=b[d][f],G.call(b[d],f)&&void 0!==g&&(e.isPlainObject(g)?a[f]=e.isPlainObject(a[f])?e.widget.extend({},a[f],g):e.widget.extend({},g):a[f]=g);return a};e.widget.bridge=function(a,b){var d=
b.prototype.widgetFullName||a;e.fn[a]=function(c){var f="string"===typeof c,g=t.call(arguments,1),h=this;f?this.length||"instance"!==c?this.each(function(){var l=e.data(this,d);if("instance"===c)return h=l,!1;if(!l)return e.error("cannot call methods on "+a+" prior to initialization; attempted to call method '"+c+"'");if("function"!==typeof l[c]||"_"===c.charAt(0))return e.error("no such method '"+c+"' for "+a+" widget instance");var k=l[c].apply(l,g);if(k!==l&&void 0!==k)return h=k&&k.jquery?h.pushStack(k.get()):
k,!1}):h=void 0:(g.length&&(c=e.widget.extend.apply(null,[c].concat(g))),this.each(function(){var l=e.data(this,d);l?(l.option(c||{}),l._init&&l._init()):e.data(this,d,new b(c,this))}));return h}};e.Widget=function(){};e.Widget._childConstructors=[];e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"\x3cdiv\x3e",options:{classes:{},disabled:!1,create:null},_createWidget:function(a,b){b=e(b||this.defaultElement||this)[0];this.element=e(b);this.uuid=K++;this.eventNamespace=
"."+this.widgetName+this.uuid;this.bindings=e();this.hoverable=e();this.focusable=e();this.classesElementLookup={};b!==this&&(e.data(b,this.widgetFullName,this),this._on(!0,this.element,{remove:function(d){d.target===b&&this.destroy()}}),this.document=e(b.style?b.ownerDocument:b.document||b),this.window=e(this.document[0].defaultView||this.document[0].parentWindow));this.options=e.widget.extend({},this.options,this._getCreateOptions(),a);this._create();this.options.disabled&&this._setOptionDisabled(this.options.disabled);
this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var a=this;this._destroy();e.each(this.classesElementLookup,function(b,d){a._removeClass(d,b)});this.element.off(this.eventNamespace).removeData(this.widgetFullName);this.widget().off(this.eventNamespace).removeAttr("aria-disabled");this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},
option:function(a,b){var d=a,c;if(0===arguments.length)return e.widget.extend({},this.options);if("string"===typeof a){d={};var f=a.split(".");a=f.shift();if(f.length){var g=d[a]=e.widget.extend({},this.options[a]);for(c=0;c<f.length-1;c++)g[f[c]]=g[f[c]]||{},g=g[f[c]];a=f.pop();if(1===arguments.length)return void 0===g[a]?null:g[a];g[a]=b}else{if(1===arguments.length)return void 0===this.options[a]?null:this.options[a];d[a]=b}}this._setOptions(d);return this},_setOptions:function(a){for(var b in a)this._setOption(b,
a[b]);return this},_setOption:function(a,b){"classes"===a&&this._setOptionClasses(b);this.options[a]=b;"disabled"===a&&this._setOptionDisabled(b);return this},_setOptionClasses:function(a){var b;for(b in a){var d=this.classesElementLookup[b];if(a[b]!==this.options.classes[b]&&d&&d.length){var c=e(d.get());this._removeClass(d,b);c.addClass(this._classes({element:c,keys:b,classes:a,add:!0}))}}},_setOptionDisabled:function(a){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!a);
a&&(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(a){function b(){var g=[];a.element.each(function(h,l){e.map(f.classesElementLookup,function(k){return k}).some(function(k){return k.is(l)})||g.push(l)});f._on(e(g),{remove:"_untrackClassesElement"})}function d(g,h){var l;for(l=0;l<g.length;l++){var k=
f.classesElementLookup[g[l]]||e();a.add?(b(),k=e(e.uniqueSort(k.get().concat(a.element.get())))):k=e(k.not(a.element).get());f.classesElementLookup[g[l]]=k;c.push(g[l]);h&&a.classes[g[l]]&&c.push(a.classes[g[l]])}}var c=[],f=this;a=e.extend({element:this.element,classes:this.options.classes||{}},a);a.keys&&d(a.keys.match(/\S+/g)||[],!0);a.extra&&d(a.extra.match(/\S+/g)||[]);return c.join(" ")},_untrackClassesElement:function(a){var b=this;e.each(b.classesElementLookup,function(d,c){-1!==e.inArray(a.target,
c)&&(b.classesElementLookup[d]=e(c.not(a.target).get()))});this._off(e(a.target))},_removeClass:function(a,b,d){return this._toggleClass(a,b,d,!1)},_addClass:function(a,b,d){return this._toggleClass(a,b,d,!0)},_toggleClass:function(a,b,d,c){c="boolean"===typeof c?c:d;var f="string"===typeof a||null===a;a={extra:f?b:d,keys:f?a:b,element:f?this.element:a,add:c};a.element.toggleClass(this._classes(a),c);return this},_on:function(a,b,d){var c,f=this;"boolean"!==typeof a&&(d=b,b=a,a=!1);d?(b=c=e(b),this.bindings=
this.bindings.add(b)):(d=b,b=this.element,c=this.widget());e.each(d,function(g,h){function l(){if(a||!0!==f.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"===typeof h?f[h]:h).apply(f,arguments)}"string"!==typeof h&&(l.guid=h.guid=h.guid||l.guid||e.guid++);var k=g.match(/^([\w:-]*)\s*(.*)$/);g=k[1]+f.eventNamespace;if(k=k[2])c.on(g,k,l);else b.on(g,l)})},_off:function(a,b){b=(b||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;a.off(b);this.bindings=e(this.bindings.not(a).get());
this.focusable=e(this.focusable.not(a).get());this.hoverable=e(this.hoverable.not(a).get())},_delay:function(a,b){var d=this;return setTimeout(function(){return("string"===typeof a?d[a]:a).apply(d,arguments)},b||0)},_hoverable:function(a){this.hoverable=this.hoverable.add(a);this._on(a,{mouseenter:function(b){this._addClass(e(b.currentTarget),null,"ui-state-hover")},mouseleave:function(b){this._removeClass(e(b.currentTarget),null,"ui-state-hover")}})},_focusable:function(a){this.focusable=this.focusable.add(a);
this._on(a,{focusin:function(b){this._addClass(e(b.currentTarget),null,"ui-state-focus")},focusout:function(b){this._removeClass(e(b.currentTarget),null,"ui-state-focus")}})},_trigger:function(a,b,d){var c,f=this.options[a];d=d||{};b=e.Event(b);b.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();b.target=this.element[0];if(a=b.originalEvent)for(c in a)c in b||(b[c]=a[c]);this.element.trigger(b,d);return!("function"===typeof f&&!1===f.apply(this.element[0],[b].concat(d))||
b.isDefaultPrevented())}};e.each({show:"fadeIn",hide:"fadeOut"},function(a,b){e.Widget.prototype["_"+a]=function(d,c,f){"string"===typeof c&&(c={effect:c});var g=c?!0===c||"number"===typeof c?b:c.effect||b:a;c=c||{};"number"===typeof c?c={duration:c}:!0===c&&(c={});var h=!e.isEmptyObject(c);c.complete=f;c.delay&&d.delay(c.delay);if(h&&e.effects&&e.effects.effect[g])d[a](c);else if(g!==a&&d[g])d[g](c.duration,c.easing,f);else d.queue(function(l){e(this)[a]();f&&f.call(d[0]);l()})}});(function(){function a(m,
p,q){return[parseFloat(m[0])*(n.test(m[0])?p/100:1),parseFloat(m[1])*(n.test(m[1])?q/100:1)]}function b(m){var p=m[0];return 9===p.nodeType?{width:m.width(),height:m.height(),offset:{top:0,left:0}}:null!=p&&p===p.window?{width:m.width(),height:m.height(),offset:{top:m.scrollTop(),left:m.scrollLeft()}}:p.preventDefault?{width:0,height:0,offset:{top:p.pageY,left:p.pageX}}:{width:m.outerWidth(),height:m.outerHeight(),offset:m.offset()}}var d,c=Math.max,f=Math.abs,g=/left|center|right/,h=/top|center|bottom/,
l=/[\+\-]\d+(\.[\d]+)?%?/,k=/^\w+/,n=/%$/,r=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==d)return d;var m=e("\x3cdiv style\x3d'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'\x3e\x3cdiv style\x3d'height:300px;width:auto;'\x3e\x3c/div\x3e\x3c/div\x3e");var p=m.children()[0];e("body").append(m);var q=p.offsetWidth;m.css("overflow","scroll");p=p.offsetWidth;q===p&&(p=m[0].clientWidth);m.remove();return d=q-p},getScrollInfo:function(m){var p=m.isWindow||m.isDocument?
"":m.element.css("overflow-x"),q=m.isWindow||m.isDocument?"":m.element.css("overflow-y");p="scroll"===p||"auto"===p&&m.width<m.element[0].scrollWidth;return{width:"scroll"===q||"auto"===q&&m.height<m.element[0].scrollHeight?e.position.scrollbarWidth():0,height:p?e.position.scrollbarWidth():0}},getWithinInfo:function(m){var p=e(m||window);var q=p[0];q=null!=q&&q===q.window;var v=!!p[0]&&9===p[0].nodeType;return{element:p,isWindow:q,isDocument:v,offset:q||v?{left:0,top:0}:e(m).offset(),scrollLeft:p.scrollLeft(),
scrollTop:p.scrollTop(),width:p.outerWidth(),height:p.outerHeight()}}};e.fn.position=function(m){if(!m||!m.of)return r.apply(this,arguments);m=e.extend({},m);var p="string"===typeof m.of?e(document).find(m.of):e(m.of),q=e.position.getWithinInfo(m.within),v=e.position.getScrollInfo(q),z=(m.collision||"flip").split(" "),B={};var E=b(p);p[0].preventDefault&&(m.at="left top");var P=E.width;var L=E.height;var M=E.offset;var R=e.extend({},M);e.each(["my","at"],function(){var S=(m[this]||"").split(" ");
1===S.length&&(S=g.test(S[0])?S.concat(["center"]):h.test(S[0])?["center"].concat(S):["center","center"]);S[0]=g.test(S[0])?S[0]:"center";S[1]=h.test(S[1])?S[1]:"center";var V=l.exec(S[0]);var W=l.exec(S[1]);B[this]=[V?V[0]:0,W?W[0]:0];m[this]=[k.exec(S[0])[0],k.exec(S[1])[0]]});1===z.length&&(z[1]=z[0]);"right"===m.at[0]?R.left+=P:"center"===m.at[0]&&(R.left+=P/2);"bottom"===m.at[1]?R.top+=L:"center"===m.at[1]&&(R.top+=L/2);var aa=a(B.at,P,L);R.left+=aa[0];R.top+=aa[1];return this.each(function(){var S,
V=e(this),W=V.outerWidth(),X=V.outerHeight(),ha=parseInt(e.css(this,"marginLeft"),10)||0,ia=parseInt(e.css(this,"marginTop"),10)||0,ja=W+ha+(parseInt(e.css(this,"marginRight"),10)||0)+v.width,ka=X+ia+(parseInt(e.css(this,"marginBottom"),10)||0)+v.height,T=e.extend({},R),ba=a(B.my,V.outerWidth(),V.outerHeight());"right"===m.my[0]?T.left-=W:"center"===m.my[0]&&(T.left-=W/2);"bottom"===m.my[1]?T.top-=X:"center"===m.my[1]&&(T.top-=X/2);T.left+=ba[0];T.top+=ba[1];var la={marginLeft:ha,marginTop:ia};e.each(["left",
"top"],function(ca,Y){if(e.ui.position[z[ca]])e.ui.position[z[ca]][Y](T,{targetWidth:P,targetHeight:L,elemWidth:W,elemHeight:X,collisionPosition:la,collisionWidth:ja,collisionHeight:ka,offset:[aa[0]+ba[0],aa[1]+ba[1]],my:m.my,at:m.at,within:q,elem:V})});m.using&&(S=function(ca){var Y=M.left-T.left,ea=Y+P-W,da=M.top-T.top,fa=da+L-X,Z={target:{element:p,left:M.left,top:M.top,width:P,height:L},element:{element:V,left:T.left,top:T.top,width:W,height:X},horizontal:0>ea?"left":0<Y?"right":"center",vertical:0>
fa?"top":0<da?"bottom":"middle"};P<W&&f(Y+ea)<P&&(Z.horizontal="center");L<X&&f(da+fa)<L&&(Z.vertical="middle");c(f(Y),f(ea))>c(f(da),f(fa))?Z.important="horizontal":Z.important="vertical";m.using.call(this,ca,Z)});V.offset(e.extend(T,{using:S}))})};e.ui.position={fit:{left:function(m,p){var q=p.within,v=q.isWindow?q.scrollLeft:q.offset.left,z=q.width,B=m.left-p.collisionPosition.marginLeft;q=v-B;var E=B+p.collisionWidth-z-v;p.collisionWidth>z?0<q&&0>=E?(p=m.left+q+p.collisionWidth-z-v,m.left+=q-
p):m.left=0<E&&0>=q?v:q>E?v+z-p.collisionWidth:v:m.left=0<q?m.left+q:0<E?m.left-E:c(m.left-B,m.left)},top:function(m,p){var q=p.within,v=q.isWindow?q.scrollTop:q.offset.top,z=p.within.height,B=m.top-p.collisionPosition.marginTop;q=v-B;var E=B+p.collisionHeight-z-v;p.collisionHeight>z?0<q&&0>=E?(p=m.top+q+p.collisionHeight-z-v,m.top+=q-p):m.top=0<E&&0>=q?v:q>E?v+z-p.collisionHeight:v:m.top=0<q?m.top+q:0<E?m.top-E:c(m.top-B,m.top)}},flip:{left:function(m,p){var q=p.within,v=q.offset.left+q.scrollLeft,
z=q.width,B=q.isWindow?q.scrollLeft:q.offset.left,E=m.left-p.collisionPosition.marginLeft;q=E-B;var P=E+p.collisionWidth-z-B;E="left"===p.my[0]?-p.elemWidth:"right"===p.my[0]?p.elemWidth:0;var L="left"===p.at[0]?p.targetWidth:"right"===p.at[0]?-p.targetWidth:0,M=-2*p.offset[0];if(0>q){if(p=m.left+E+L+M+p.collisionWidth-z-v,0>p||p<f(q))m.left+=E+L+M}else 0<P&&(p=m.left-p.collisionPosition.marginLeft+E+L+M-B,0<p||f(p)<P)&&(m.left+=E+L+M)},top:function(m,p){var q=p.within,v=q.offset.top+q.scrollTop,
z=q.height,B=q.isWindow?q.scrollTop:q.offset.top,E=m.top-p.collisionPosition.marginTop;q=E-B;var P=E+p.collisionHeight-z-B;E="top"===p.my[1]?-p.elemHeight:"bottom"===p.my[1]?p.elemHeight:0;var L="top"===p.at[1]?p.targetHeight:"bottom"===p.at[1]?-p.targetHeight:0,M=-2*p.offset[1];if(0>q){if(p=m.top+E+L+M+p.collisionHeight-z-v,0>p||p<f(q))m.top+=E+L+M}else 0<P&&(p=m.top-p.collisionPosition.marginTop+E+L+M-B,0<p||f(p)<P)&&(m.top+=E+L+M)}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments);
e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments);e.ui.position.fit.top.apply(this,arguments)}}}})();e.extend(e.expr.pseudos,{data:e.expr.createPseudo(function(a){return function(b){return!!e.data(b,a)}})});e.fn.extend({disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(a+".ui-disableSelection",function(b){b.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});
e.ui.focusable=function(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||"map"!==b.nodeName.toLowerCase())return!1;a=e("img[usemap\x3d'#"+d+"']");return 0<a.length&&a.is(":visible")}/^(input|select|textarea|button|object)$/.test(d)?(b=!a.disabled)&&(d=e(a).closest("fieldset")[0])&&(b=!d.disabled):b="a"===d?a.href||b:b;return b&&e(a).is(":visible")&&"visible"===e(a).css("visibility")};e.extend(e.expr.pseudos,{focusable:function(a){return e.ui.focusable(a,null!=
e.attr(a,"tabindex"))}});e.ui.formResetMixin={_formResetHandler:function(){var a=e(this);setTimeout(function(){var b=a.data("ui-form-reset-instances");e.each(b,function(){this.refresh()})})},_bindFormResetHandler:function(){this.form=e(this.element.prop("form"));if(this.form.length){var a=this.form.data("ui-form-reset-instances")||[];if(!a.length)this.form.on("reset.ui-form-reset",this._formResetHandler);a.push(this);this.form.data("ui-form-reset-instances",a)}},_unbindFormResetHandler:function(){if(this.form.length){var a=
this.form.data("ui-form-reset-instances");a.splice(e.inArray(this,a),1);a.length?this.form.data("ui-form-reset-instances",a):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};e.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};e.fn.labels=function(){var a;if(!this.length)return this.pushStack([]);if(this[0].labels&&this[0].labels.length)return this.pushStack(this[0].labels);
var b=this.eq(0).parents("label");if(a=this.attr("id")){var d=this.eq(0).parents().last();d=d.add(d.length?d.siblings():this.siblings());a="label[for\x3d'"+CSS.escape(a)+"']";b=b.add(d.find(a).addBack(a))}return this.pushStack(b)};e.fn.scrollParent=function(a){var b=this.css("position"),d="absolute"===b,c=a?/(auto|scroll|hidden)/:/(auto|scroll)/;a=this.parents().filter(function(){var f=e(this);return d&&"static"===f.css("position")?!1:c.test(f.css("overflow")+f.css("overflow-y")+f.css("overflow-x"))}).eq(0);
return"fixed"!==b&&a.length?a:e(this[0].ownerDocument||document)};e.extend(e.expr.pseudos,{tabbable:function(a){var b=e.attr(a,"tabindex"),d=null!=b;return(!d||0<=b)&&e.ui.focusable(a,d)}});e.fn.extend({uniqueId:function(){var a=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}});var N=!1;e(document).on("mouseup",function(){N=!1});e.widget("ui.mouse",
{version:"1.14.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.on("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).on("click."+this.widgetName,function(b){if(!0===e.data(b.target,a.widgetName+".preventClickEvent"))return e.removeData(b.target,a.widgetName+".preventClickEvent"),b.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(a){if(!N){this._mouseMoved=!1;this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var b=this,d=1===a.which,c="string"===typeof this.options.cancel?e(a.target).closest(this.options.cancel).length:!1;if(!d||c||!this._mouseCapture(a))return!0;this.mouseDelayMet=!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=
!0},this.options.delay));if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&(this._mouseStarted=!1!==this._mouseStart(a),!this._mouseStarted))return a.preventDefault(),!0;!0===e.data(a.target,this.widgetName+".preventClickEvent")&&e.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(f){return b._mouseMove(f)};this._mouseUpDelegate=function(f){return b._mouseUp(f)};this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,
this._mouseUpDelegate);a.preventDefault();return N=!0}},_mouseMove:function(a){if(this._mouseMoved&&!a.which)if(a.originalEvent.altKey||a.originalEvent.ctrlKey||a.originalEvent.metaKey||a.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(a);if(a.which||a.button)this._mouseMoved=!0;if(this._mouseStarted)return this._mouseDrag(a),a.preventDefault();this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&((this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,
a))?this._mouseDrag(a):this._mouseUp(a));return!this._mouseStarted},_mouseUp:function(a){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=!1,a.target===this._mouseDownEvent.target&&e.data(a.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(a));this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer);N=this.ignoreMissingWhich=!1;a.preventDefault()},
_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});e.ui.plugin={add:function(a,b,d){var c;a=e.ui[a].prototype;for(c in d)a.plugins[c]=a.plugins[c]||[],a.plugins[c].push([b,d[c]])},call:function(a,b,d,c){if((b=a.plugins[b])&&(c||
a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(c=0;c<b.length;c++)a.options[b[c][0]]&&b[c][1].apply(a.element,d)}};e.widget("ui.draggable",e.ui.mouse,{version:"1.14.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(a,b){this._super(a,b);"handle"===a&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),
this._mouseDestroy())},_mouseCapture:function(a){var b=this.options;if(this.helper||b.disabled||0<e(a.target).closest(".ui-resizable-handle").length)return!1;this.handle=this._getHandle(a);if(!this.handle)return!1;this._blurActiveElement(a);this._blockFrames(!0===b.iframeFix?"iframe":b.iframeFix);return!0},_blockFrames:function(a){this.iframeBlocks=this.document.find(a).map(function(){var b=e(this);return e("\x3cdiv\x3e").css("position","absolute").appendTo(b.parent()).outerWidth(b.outerWidth()).outerHeight(b.outerHeight()).offset(b.offset())[0]})},
_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(a){var b=this.document[0].activeElement;e(a.target).closest(b).length||e(b).trigger("blur")},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._addClass(this.helper,"ui-draggable-dragging");this._cacheHelperProportions();e.ui.ddmanager&&(e.ui.ddmanager.current=this);this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=
this.helper.scrollParent(!0);this.offsetParent=this.helper.offsetParent();this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length;this.positionAbs=this.element.offset();this._refreshOffsets(a);this.originalPosition=this.position=this._generatePosition(a,!1);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this._setContainment();if(!1===this._trigger("start",a))return this._clear(),!1;
this._cacheHelperProportions();e.ui.ddmanager&&!b.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,a);this._mouseDrag(a,!0);e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,a);return!0},_refreshOffsets:function(a){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:a.pageX-this.offset.left,top:a.pageY-this.offset.top}},_mouseDrag:function(a,b){this.hasFixedAncestor&&
(this.offset.parent=this._getParentOffset());this.position=this._generatePosition(a,!0);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(!1===this._trigger("drag",a,b))return this._mouseUp(new e.Event("mouseup",a)),!1;this.position=b.position}this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";e.ui.ddmanager&&e.ui.ddmanager.drag(this,a);return!1},_mouseStop:function(a){var b=this,d=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&
(d=e.ui.ddmanager.drop(this,a));this.dropped&&(d=this.dropped,this.dropped=!1);"invalid"===this.options.revert&&!d||"valid"===this.options.revert&&d||!0===this.options.revert||"function"===typeof this.options.revert&&this.options.revert.call(this.element,d)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==b._trigger("stop",a)&&b._clear()}):!1!==this._trigger("stop",a)&&this._clear();return!1},_mouseUp:function(a){this._unblockFrames();e.ui.ddmanager&&
e.ui.ddmanager.dragStop(this,a);this.handleElement.is(a.target)&&this.element.trigger("focus");return e.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp(new e.Event("mouseup",{target:this.element[0]})):this._clear();return this},_getHandle:function(a){return this.options.handle?!!e(a.target).closest(this.element.find(this.options.handle)).length:!0},_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(a){var b=this.options,d="function"===typeof b.helper;a=d?e(b.helper.apply(this.element[0],[a])):"clone"===b.helper?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo("parent"===b.appendTo?this.element[0].parentNode:b.appendTo);d&&a[0]===this.element[0]&&this._setPositionRelative();
a[0]===this.element[0]||/(fixed|absolute)/.test(a.css("position"))||a.css("position","absolute");return a},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(a){"string"===typeof a&&(a=a.split(" "));Array.isArray(a)&&(a={left:+a[0],top:+a[1]||0});"left"in a&&(this.offset.click.left=a.left+this.margins.left);"right"in a&&(this.offset.click.left=this.helperProportions.width-a.right+this.margins.left);
"top"in a&&(this.offset.click.top=a.top+this.margins.top);"bottom"in a&&(this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top)},_isRootNode:function(a){return/(html|body)/i.test(a.tagName)||a===this.document[0]},_getParentOffset:function(){var a=this.offsetParent.offset(),b=this.document[0];"absolute"===this.cssPosition&&this.scrollParent[0]!==b&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(a.left+=this.scrollParent.scrollLeft(),a.top+=this.scrollParent.scrollTop());
this._isRootNode(this.offsetParent[0])&&(a={top:0,left:0});return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var a=this.element.position(),b=this._isRootNode(this.scrollParent[0]);return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+(b?0:this.scrollParent.scrollTop()),left:a.left-(parseInt(this.helper.css("left"),
10)||0)+(b?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 a;var b=this.options;var d=this.document[0];this.relativeContainer=
null;if(b.containment)if("window"===b.containment)this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||d.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];else if("document"===b.containment)this.containment=[0,0,e(d).width()-this.helperProportions.width-
this.margins.left,(e(d).height()||d.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];else if(b.containment.constructor===Array)this.containment=b.containment;else{if("parent"===b.containment&&(b.containment=this.helper[0].parentNode),d=e(b.containment),a=d[0])b=/(scroll|auto)/.test(d.css("overflow")),this.containment=[(parseInt(d.css("borderLeftWidth"),10)||0)+(parseInt(d.css("paddingLeft"),10)||0),(parseInt(d.css("borderTopWidth"),10)||0)+(parseInt(d.css("paddingTop"),
10)||0),(b?Math.max(a.scrollWidth,a.offsetWidth):a.offsetWidth)-(parseInt(d.css("borderRightWidth"),10)||0)-(parseInt(d.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(b?Math.max(a.scrollHeight,a.offsetHeight):a.offsetHeight)-(parseInt(d.css("borderBottomWidth"),10)||0)-(parseInt(d.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=d}else this.containment=null},_convertPositionTo:function(a,
b){b||(b=this.position);a="absolute"===a?1:-1;var d=this._isRootNode(this.scrollParent[0]);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-("fixed"===this.cssPosition?-this.offset.scroll.top:d?0:this.offset.scroll.top)*a,left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-("fixed"===this.cssPosition?-this.offset.scroll.left:d?0:this.offset.scroll.left)*a}},_generatePosition:function(a,b){var d=this.options,c=this._isRootNode(this.scrollParent[0]);var f=a.pageX;var g=
a.pageY;c&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()});if(b){if(this.containment){if(this.relativeContainer){var h=this.relativeContainer.offset();h=[this.containment[0]+h.left,this.containment[1]+h.top,this.containment[2]+h.left,this.containment[3]+h.top]}else h=this.containment;a.pageX-this.offset.click.left<h[0]&&(f=h[0]+this.offset.click.left);a.pageY-this.offset.click.top<h[1]&&(g=h[1]+this.offset.click.top);a.pageX-this.offset.click.left>
h[2]&&(f=h[2]+this.offset.click.left);a.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top)}d.grid&&(g=d.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/d.grid[1])*d.grid[1]:this.originalPageY,g=h?g-this.offset.click.top>=h[1]||g-this.offset.click.top>h[3]?g:g-this.offset.click.top>=h[1]?g-d.grid[1]:g+d.grid[1]:g,f=d.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/d.grid[0])*d.grid[0]:this.originalPageX,f=h?f-this.offset.click.left>=h[0]||f-this.offset.click.left>
h[2]?f:f-this.offset.click.left>=h[0]?f-d.grid[0]:f+d.grid[0]:f);"y"===d.axis&&(f=this.originalPageX);"x"===d.axis&&(g=this.originalPageY)}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:c?0:this.offset.scroll.top),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:c?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(a,b,d){d=d||this._uiHash();e.ui.plugin.call(this,a,[b,d,this],!0);/^(drag|start|stop)/.test(a)&&(this.positionAbs=this._convertPositionTo("absolute"),d.offset=this.positionAbs);return e.Widget.prototype._trigger.call(this,a,b,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,
originalPosition:this.originalPosition,offset:this.positionAbs}}});e.ui.plugin.add("draggable","connectToSortable",{start:function(a,b,d){var c=e.extend({},b,{item:d.element});d.sortables=[];e(d.options.connectToSortable).each(function(){var f=e(this).sortable("instance");f&&!f.options.disabled&&(d.sortables.push(f),f.refreshPositions(),f._trigger("activate",a,c))})},stop:function(a,b,d){var c=e.extend({},b,{item:d.element});d.cancelHelperRemoval=!1;e.each(d.sortables,function(){this.isOver?(this.isOver=
0,d.cancelHelperRemoval=!0,this.cancelHelperRemoval=!1,this._storedCSS={position:this.placeholder.css("position"),top:this.placeholder.css("top"),left:this.placeholder.css("left")},this._mouseStop(a),this.options.helper=this.options._helper):(this.cancelHelperRemoval=!0,this._trigger("deactivate",a,c))})},drag:function(a,b,d){e.each(d.sortables,function(){var c=!1,f=this;f.positionAbs=d.positionAbs;f.helperProportions=d.helperProportions;f.offset.click=d.offset.click;f._intersectsWith(f.containerCache)&&
(c=!0,e.each(d.sortables,function(){this.positionAbs=d.positionAbs;this.helperProportions=d.helperProportions;this.offset.click=d.offset.click;this!==f&&this._intersectsWith(this.containerCache)&&e.contains(f.element[0],this.element[0])&&(c=!1);return c}));c?(f.isOver||(f.isOver=1,d._parent=b.helper.parent(),f.currentItem=b.helper.appendTo(f.element).data("ui-sortable-item",!0),f.options._helper=f.options.helper,f.options.helper=function(){return b.helper[0]},a.target=f.currentItem[0],f._mouseCapture(a,
!0),f._mouseStart(a,!0,!0),f.offset.click.top=d.offset.click.top,f.offset.click.left=d.offset.click.left,f.offset.parent.left-=d.offset.parent.left-f.offset.parent.left,f.offset.parent.top-=d.offset.parent.top-f.offset.parent.top,d._trigger("toSortable",a),d.dropped=f.element,e.each(d.sortables,function(){this.refreshPositions()}),d.currentItem=d.element,f.fromOutside=d),f.currentItem&&(f._mouseDrag(a),b.position=f.position)):f.isOver&&(f.isOver=0,f.cancelHelperRemoval=!0,f.options._revert=f.options.revert,
f.options.revert=!1,f._trigger("out",a,f._uiHash(f)),f._mouseStop(a,!0),f.options.revert=f.options._revert,f.options.helper=f.options._helper,f.placeholder&&f.placeholder.remove(),b.helper.appendTo(d._parent),d._refreshOffsets(a),b.position=d._generatePosition(a,!0),d._trigger("fromSortable",a),d.dropped=!1,e.each(d.sortables,function(){this.refreshPositions()}))})}});e.ui.plugin.add("draggable","cursor",{start:function(a,b,d){a=e("body");d=d.options;a.css("cursor")&&(d._cursor=a.css("cursor"));a.css("cursor",
d.cursor)},stop:function(a,b,d){a=d.options;a._cursor&&e("body").css("cursor",a._cursor)}});e.ui.plugin.add("draggable","opacity",{start:function(a,b,d){a=e(b.helper);d=d.options;a.css("opacity")&&(d._opacity=a.css("opacity"));a.css("opacity",d.opacity)},stop:function(a,b,d){a=d.options;a._opacity&&e(b.helper).css("opacity",a._opacity)}});e.ui.plugin.add("draggable","scroll",{start:function(a,b,d){d.scrollParentNotHidden||(d.scrollParentNotHidden=d.helper.scrollParent(!1));d.scrollParentNotHidden[0]!==
d.document[0]&&"HTML"!==d.scrollParentNotHidden[0].tagName&&(d.overflowOffset=d.scrollParentNotHidden.offset())},drag:function(a,b,d){b=d.options;var c=!1,f=d.scrollParentNotHidden[0],g=d.document[0];f!==g&&"HTML"!==f.tagName?(b.axis&&"x"===b.axis||(d.overflowOffset.top+f.offsetHeight-a.pageY<b.scrollSensitivity?f.scrollTop=c=f.scrollTop+b.scrollSpeed:a.pageY-d.overflowOffset.top<b.scrollSensitivity&&(f.scrollTop=c=f.scrollTop-b.scrollSpeed)),b.axis&&"y"===b.axis||(d.overflowOffset.left+f.offsetWidth-
a.pageX<b.scrollSensitivity?f.scrollLeft=c=f.scrollLeft+b.scrollSpeed:a.pageX-d.overflowOffset.left<b.scrollSensitivity&&(f.scrollLeft=c=f.scrollLeft-b.scrollSpeed))):(b.axis&&"x"===b.axis||(a.pageY-e(g).scrollTop()<b.scrollSensitivity?c=e(g).scrollTop(e(g).scrollTop()-b.scrollSpeed):e(window).height()-(a.pageY-e(g).scrollTop())<b.scrollSensitivity&&(c=e(g).scrollTop(e(g).scrollTop()+b.scrollSpeed))),b.axis&&"y"===b.axis||(a.pageX-e(g).scrollLeft()<b.scrollSensitivity?c=e(g).scrollLeft(e(g).scrollLeft()-
b.scrollSpeed):e(window).width()-(a.pageX-e(g).scrollLeft())<b.scrollSensitivity&&(c=e(g).scrollLeft(e(g).scrollLeft()+b.scrollSpeed))));!1!==c&&e.ui.ddmanager&&!b.dropBehaviour&&e.ui.ddmanager.prepareOffsets(d,a)}});e.ui.plugin.add("draggable","snap",{start:function(a,b,d){a=d.options;d.snapElements=[];e(a.snap.constructor!==String?a.snap.items||":data(ui-draggable)":a.snap).each(function(){var c=e(this),f=c.offset();this!==d.element[0]&&d.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),
top:f.top,left:f.left})})},drag:function(a,b,d){var c,f=d.options,g=f.snapTolerance,h=b.offset.left,l=h+d.helperProportions.width,k=b.offset.top,n=k+d.helperProportions.height;for(c=d.snapElements.length-1;0<=c;c--){var r=d.snapElements[c].left-d.margins.left;var m=r+d.snapElements[c].width;var p=d.snapElements[c].top-d.margins.top;var q=p+d.snapElements[c].height;if(l<r-g||h>m+g||n<p-g||k>q+g||!e.contains(d.snapElements[c].item.ownerDocument,d.snapElements[c].item))d.snapElements[c].snapping&&d.options.snap.release&&
d.options.snap.release.call(d.element,a,e.extend(d._uiHash(),{snapItem:d.snapElements[c].item})),d.snapElements[c].snapping=!1;else{if("inner"!==f.snapMode){var v=Math.abs(p-n)<=g;var z=Math.abs(q-k)<=g;var B=Math.abs(r-l)<=g;var E=Math.abs(m-h)<=g;v&&(b.position.top=d._convertPositionTo("relative",{top:p-d.helperProportions.height,left:0}).top);z&&(b.position.top=d._convertPositionTo("relative",{top:q,left:0}).top);B&&(b.position.left=d._convertPositionTo("relative",{top:0,left:r-d.helperProportions.width}).left);
E&&(b.position.left=d._convertPositionTo("relative",{top:0,left:m}).left)}var P=v||z||B||E;"outer"!==f.snapMode&&(v=Math.abs(p-k)<=g,z=Math.abs(q-n)<=g,B=Math.abs(r-h)<=g,E=Math.abs(m-l)<=g,v&&(b.position.top=d._convertPositionTo("relative",{top:p,left:0}).top),z&&(b.position.top=d._convertPositionTo("relative",{top:q-d.helperProportions.height,left:0}).top),B&&(b.position.left=d._convertPositionTo("relative",{top:0,left:r}).left),E&&(b.position.left=d._convertPositionTo("relative",{top:0,left:m-
d.helperProportions.width}).left));!d.snapElements[c].snapping&&(v||z||B||E||P)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,a,e.extend(d._uiHash(),{snapItem:d.snapElements[c].item}));d.snapElements[c].snapping=v||z||B||E||P}}}});e.ui.plugin.add("draggable","stack",{start:function(a,b,d){a=e.makeArray(e(d.options.stack)).sort(function(f,g){return(parseInt(e(f).css("zIndex"),10)||0)-(parseInt(e(g).css("zIndex"),10)||0)});if(a.length){var c=parseInt(e(a[0]).css("zIndex"),10)||0;e(a).each(function(f){e(this).css("zIndex",
c+f)});this.css("zIndex",c+a.length)}}});e.ui.plugin.add("draggable","zIndex",{start:function(a,b,d){a=e(b.helper);d=d.options;a.css("zIndex")&&(d._zIndex=a.css("zIndex"));a.css("zIndex",d.zIndex)},stop:function(a,b,d){a=d.options;a._zIndex&&e(b.helper).css("zIndex",a._zIndex)}});e.widget("ui.droppable",{version:"1.14.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 a,
b=this.options,d=b.accept;this.isover=!1;this.isout=!0;this.accept="function"===typeof d?d:function(c){return c.is(d)};this.proportions=function(){if(arguments.length)a=arguments[0];else return a?a:a={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}};this._addToManager(b.scope);b.addClasses&&this._addClass("ui-droppable")},_addToManager:function(a){e.ui.ddmanager.droppables[a]=e.ui.ddmanager.droppables[a]||[];e.ui.ddmanager.droppables[a].push(this)},_splice:function(a){for(var b=
0;b<a.length;b++)a[b]===this&&a.splice(b,1)},_destroy:function(){this._splice(e.ui.ddmanager.droppables[this.options.scope])},_setOption:function(a,b){"accept"===a?this.accept="function"===typeof b?b:function(d){return d.is(b)}:"scope"===a&&(this._splice(e.ui.ddmanager.droppables[this.options.scope]),this._addToManager(b));this._super(a,b)},_activate:function(a){var b=e.ui.ddmanager.current;this._addActiveClass();b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=e.ui.ddmanager.current;
this._removeActiveClass();b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=e.ui.ddmanager.current;b&&(b.currentItem||b.element)[0]!==this.element[0]&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this._addHoverClass(),this._trigger("over",a,this.ui(b)))},_out:function(a){var b=e.ui.ddmanager.current;b&&(b.currentItem||b.element)[0]!==this.element[0]&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this._removeHoverClass(),this._trigger("out",a,this.ui(b)))},
_drop:function(a,b){var d=b||e.ui.ddmanager.current,c=!1;if(!d||(d.currentItem||d.element)[0]===this.element[0])return!1;this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var f=e(this).droppable("instance");if(f.options.greedy&&!f.options.disabled&&f.options.scope===d.options.scope&&f.accept.call(f.element[0],d.currentItem||d.element)&&e.ui.intersect(d,e.extend(f,{offset:f.element.offset()}),f.options.tolerance,a))return c=!0,!1});return c?!1:this.accept.call(this.element[0],
d.currentItem||d.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",a,this.ui(d)),this.element):!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.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")}});
e.ui.intersect=function(){return function(a,b,d,c){if(!b.offset)return!1;var f=(a.positionAbs||a.position.absolute).left+a.margins.left,g=(a.positionAbs||a.position.absolute).top+a.margins.top,h=f+a.helperProportions.width,l=g+a.helperProportions.height,k=b.offset.left,n=b.offset.top,r=k+b.proportions().width,m=n+b.proportions().height;switch(d){case "fit":return k<=f&&h<=r&&n<=g&&l<=m;case "intersect":return k<f+a.helperProportions.width/2&&h-a.helperProportions.width/2<r&&n<g+a.helperProportions.height/
2&&l-a.helperProportions.height/2<m;case "pointer":a=c.pageY;d=b.proportions().height;if(n=a>=n&&a<n+d)c=c.pageX,b=b.proportions().width,n=c>=k&&c<k+b;return n;case "touch":return(g>=n&&g<=m||l>=n&&l<=m||g<n&&l>m)&&(f>=k&&f<=r||h>=k&&h<=r||f<k&&h>r);default:return!1}}}();e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var d,c=e.ui.ddmanager.droppables[a.options.scope]||[],f=b?b.type:null,g=(a.currentItem||a.element).find(":data(ui-droppable)").addBack();var h=0;
a:for(;h<c.length;h++)if(!(c[h].options.disabled||a&&!c[h].accept.call(c[h].element[0],a.currentItem||a.element))){for(d=0;d<g.length;d++)if(g[d]===c[h].element[0]){c[h].proportions().height=0;continue a}c[h].visible="none"!==c[h].element.css("display");c[h].visible&&("mousedown"===f&&c[h]._activate.call(c[h],b),c[h].offset=c[h].element.offset(),c[h].proportions({width:c[h].element[0].offsetWidth,height:c[h].element[0].offsetHeight}))}},drop:function(a,b){var d=!1;e.each((e.ui.ddmanager.droppables[a.options.scope]||
[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(a,this,this.options.tolerance,b)&&(d=this._drop.call(this,b)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||a.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,b)))});return d},dragStart:function(a,b){a.element.parentsUntil("body").on("scroll.droppable",function(){a.options.refreshPositions||e.ui.ddmanager.prepareOffsets(a,b)})},drag:function(a,b){a.options.refreshPositions&&
e.ui.ddmanager.prepareOffsets(a,b);e.each(e.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var d=e.ui.intersect(a,this,this.options.tolerance,b);var c=!d&&this.isover?"isout":d&&!this.isover?"isover":null;if(c){if(this.options.greedy){var f=this.options.scope;d=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===f});if(d.length){var g=e(d[0]).droppable("instance");g.greedyChild=
"isover"===c}}g&&"isover"===c&&(g.isover=!1,g.isout=!0,g._out.call(g,b));this[c]=!0;this["isout"===c?"isover":"isout"]=!1;this["isover"===c?"_over":"_out"].call(this,b);g&&"isout"===c&&(g.isout=!1,g.isover=!0,g._over.call(g,b))}}})},dragStop:function(a,b){a.element.parentsUntil("body").off("scroll.droppable");a.options.refreshPositions||e.ui.ddmanager.prepareOffsets(a,b)}};!0===e.uiBackCompat&&e.widget("ui.droppable",e.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)}});e.widget("ui.resizable",e.ui.mouse,{version:"1.14.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(a){return parseFloat(a)||0},_isNumber:function(a){return!isNaN(parseFloat(a))},_hasScroll:function(a,b){var d=!1,c=e(a).css("overflow");if("hidden"===c)return!1;
if("scroll"===c)return!0;b=b&&"left"===b?"scrollLeft":"scrollTop";if(0<a[b])return!0;try{a[b]=1,d=0<a[b],a[b]=0}catch(f){}return d},_create:function(){var a=this.options,b=this;this._addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)){this.element.wrap(e("\x3cdiv class\x3d'ui-wrapper'\x3e\x3c/div\x3e").css({overflow:"hidden",
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;var d={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")};this.element.css(d);
this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this._proportionallyResize()}this._setupHandles();if(a.autoHide)e(this.element).on("mouseenter",function(){a.disabled||(b._removeClass("ui-resizable-autohide"),b._handles.show())}).on("mouseleave",function(){a.disabled||b.resizing||(b._addClass("ui-resizable-autohide"),b._handles.hide())});
this._mouseInit()},_destroy:function(){this._mouseDestroy();this._addedHandles.remove();var a=function(d){e(d).removeData("resizable").removeData("ui-resizable").off(".resizable")};if(this.elementIsWrapper){a(this.element);var b=this.element;this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b);b.remove()}this.originalElement.css("resize",this.originalResizeStyle);a(this.originalElement);return this},_setOption:function(a,
b){this._super(a,b);switch(a){case "handles":this._removeHandles();this._setupHandles();break;case "aspectRatio":this._aspectRatio=!!b}},_setupHandles:function(){var a=this.options,b,d=this;this.handles=a.handles||(e(".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=e();this._addedHandles=e();if(this.handles.constructor===
String){"all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw");var c=this.handles.split(",");this.handles={};for(b=0;b<c.length;b++){var f=String.prototype.trim.call(c[b]);var g="ui-resizable-"+f;var h=e("\x3cdiv\x3e");this._addClass(h,"ui-resizable-handle "+g);h.css({zIndex:a.zIndex});this.handles[f]=".ui-resizable-"+f;this.element.children(this.handles[f]).length||(this.element.append(h),this._addedHandles=this._addedHandles.add(h))}}this._renderAxis=function(l){var k;l=l||this.element;for(k in this.handles){if(this.handles[k].constructor===
String)this.handles[k]=this.element.children(this.handles[k]).first().show();else if(this.handles[k].jquery||this.handles[k].nodeType)this.handles[k]=e(this.handles[k]),this._on(this.handles[k],{mousedown:d._mouseDown});if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)){var n=e(this.handles[k],this.element);var r=/sw|ne|nw|se|n|s/.test(k)?n.outerHeight():n.outerWidth();n=["padding",/ne|nw|n/.test(k)?"Top":/se|sw|s/.test(k)?"Bottom":/^e$/.test(k)?
"Right":"Left"].join("");l.css(n,r);this._proportionallyResize()}this._handles=this._handles.add(this.handles[k])}};this._renderAxis(this.element);this._handles=this._handles.add(this.element.find(".ui-resizable-handle"));this._handles.disableSelection();this._handles.on("mouseover",function(){d.resizing||(this.className&&(h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),d.axis=h&&h[1]?h[1]:"se")});a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},
_mouseCapture:function(a){var b,d=!1;for(b in this.handles){var c=e(this.handles[b])[0];if(c===a.target||e.contains(c,a.target))d=!0}return!this.options.disabled&&d},_mouseStart:function(a){var b,d=this.options,c=this.element;this.resizing=!0;this._renderProxy();var f=this._num(this.helper.css("left"));var g=this._num(this.helper.css("top"));d.containment&&(f+=e(d.containment).scrollLeft()||0,g+=e(d.containment).scrollTop()||0);this.offset=this.helper.offset();this.position={left:f,top:g};this._helper||
(b=this._calculateAdjustedElementDimensions(c));this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:b.width,height:b.height};this.originalSize=this._helper?{width:c.outerWidth(),height:c.outerHeight()}:{width:b.width,height:b.height};this.sizeDiff={width:c.outerWidth()-c.width(),height:c.outerHeight()-c.height()};this.originalPosition={left:f,top:g};this.originalMousePosition={left:a.pageX,top:a.pageY};this.aspectRatio="number"===typeof d.aspectRatio?d.aspectRatio:
this.originalSize.width/this.originalSize.height||1;f=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor","auto"===f?this.axis+"-resize":f);this._addClass("ui-resizable-resizing");this._propagate("start",a);return!0},_mouseDrag:function(a){var b=this.originalMousePosition;var d=a.pageX-b.left||0;b=a.pageY-b.top||0;var c=this._change[this.axis];this._updatePrevProperties();if(!c)return!1;d=c.apply(this,[a,d,b]);this._updateVirtualBoundaries(a.shiftKey);if(this._aspectRatio||a.shiftKey)d=
this._updateRatio(d,a);d=this._respectSize(d,a);this._updateCache(d);this._propagate("resize",a);d=this._applyChanges();!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();e.isEmptyObject(d)||(this._updatePrevProperties(),this._trigger("resize",a,this.ui()),this._applyChanges());return!1},_mouseStop:function(a){this.resizing=!1;var b,d=this.options;if(this._helper){var c=this._proportionallyResizeElements;c=(b=c.length&&/textarea/i.test(c[0].nodeName))&&this._hasScroll(c[0],
"left")?0:this.sizeDiff.height;b=b?0:this.sizeDiff.width;b={width:this.helper.width()-b,height:this.helper.height()-c};c=parseFloat(this.element.css("left"))+(this.position.left-this.originalPosition.left)||null;var f=parseFloat(this.element.css("top"))+(this.position.top-this.originalPosition.top)||null;d.animate||this.element.css(e.extend(b,{top:f,left:c}));this.helper.height(this.size.height);this.helper.width(this.size.width);this._helper&&!d.animate&&this._proportionallyResize()}e("body").css("cursor",
"auto");this._removeClass("ui-resizable-resizing");this._propagate("stop",a);this._helper&&this.helper.remove();return!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 a={};this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px");this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px");this.helper.css(a);this.size.width!==
this.prevSize.width&&(a.width=this.size.width+"px",this.helper.width(a.width));this.size.height!==this.prevSize.height&&(a.height=this.size.height+"px",this.helper.height(a.height));return a},_updateVirtualBoundaries:function(a){var b=this.options;b={minWidth:this._isNumber(b.minWidth)?b.minWidth:0,maxWidth:this._isNumber(b.maxWidth)?b.maxWidth:Infinity,minHeight:this._isNumber(b.minHeight)?b.minHeight:0,maxHeight:this._isNumber(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a){a=b.minHeight*
this.aspectRatio;var d=b.minWidth/this.aspectRatio;var c=b.maxHeight*this.aspectRatio;var f=b.maxWidth/this.aspectRatio;a>b.minWidth&&(b.minWidth=a);d>b.minHeight&&(b.minHeight=d);c<b.maxWidth&&(b.maxWidth=c);f<b.maxHeight&&(b.maxHeight=f)}this._vBoundaries=b},_updateCache:function(a){this.offset=this.helper.offset();this._isNumber(a.left)&&(this.position.left=a.left);this._isNumber(a.top)&&(this.position.top=a.top);this._isNumber(a.height)&&(this.size.height=a.height);this._isNumber(a.width)&&(this.size.width=
a.width)},_updateRatio:function(a){var b=this.position,d=this.size,c=this.axis;this._isNumber(a.height)?a.width=a.height*this.aspectRatio:this._isNumber(a.width)&&(a.height=a.width/this.aspectRatio);"sw"===c&&(a.left=b.left+(d.width-a.width),a.top=null);"nw"===c&&(a.top=b.top+(d.height-a.height),a.left=b.left+(d.width-a.width));return a},_respectSize:function(a){var b=this._vBoundaries,d=this.axis,c=this._isNumber(a.width)&&b.maxWidth&&b.maxWidth<a.width,f=this._isNumber(a.height)&&b.maxHeight&&b.maxHeight<
a.height,g=this._isNumber(a.width)&&b.minWidth&&b.minWidth>a.width,h=this._isNumber(a.height)&&b.minHeight&&b.minHeight>a.height,l=this.originalPosition.left+this.originalSize.width,k=this.originalPosition.top+this.originalSize.height,n=/sw|nw|w/.test(d);d=/nw|ne|n/.test(d);g&&(a.width=b.minWidth);h&&(a.height=b.minHeight);c&&(a.width=b.maxWidth);f&&(a.height=b.maxHeight);g&&n&&(a.left=l-b.minWidth);c&&n&&(a.left=l-b.maxWidth);h&&d&&(a.top=k-b.minHeight);f&&d&&(a.top=k-b.maxHeight);a.width||a.height||
a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null;return a},_getPaddingPlusBorderDimensions:function(a){var b=0,d=[],c=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")];for(a=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];4>b;b++)d[b]=parseFloat(c[b])||0,d[b]+=parseFloat(a[b])||0;return{height:d[0]+d[2],width:d[1]+d[3]}},_calculateAdjustedElementDimensions:function(a){var b=a.get(0);
if("content-box"!==a.css("box-sizing")||!this._hasScroll(b)&&!this._hasScroll(b,"left"))return{height:parseFloat(a.css("height")),width:parseFloat(a.css("width"))};var d=parseFloat(b.style.width);b=parseFloat(b.style.height);var c=this._getPaddingPlusBorderDimensions(a);d=isNaN(d)?this._getElementTheoreticalSize(a,c,"width"):d;b=isNaN(b)?this._getElementTheoreticalSize(a,c,"height"):b;return{height:b,width:d}},_getElementTheoreticalSize:function(a,b,d){return Math.max(0,Math.ceil(a.get(0)["offset"+
d[0].toUpperCase()+d.slice(1)]-b[d]-.5))||0},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,d=this.helper||this.element;b<this._proportionallyResizeElements.length;b++)a=this._proportionallyResizeElements[b],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(a)),a.css({height:d.height()-this.outerDimensions.height||0,width:d.width()-this.outerDimensions.width||0})},_renderProxy:function(){var a=this.options;this.elementOffset=
this.element.offset();this._helper?(this.helper=this.helper||e("\x3cdiv\x3e\x3c/div\x3e").css({overflow:"hidden"}),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:++a.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){return{left:this.originalPosition.left+
b,width:this.originalSize.width-b}},n:function(a,b,d){return{top:this.originalPosition.top+d,height:this.originalSize.height-d}},s:function(a,b,d){return{height:this.originalSize.height+d}},se:function(a,b,d){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[a,b,d]))},sw:function(a,b,d){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[a,b,d]))},ne:function(a,b,d){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,
[a,b,d]))},nw:function(a,b,d){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[a,b,d]))}},_propagate:function(a,b){e.ui.plugin.call(this,a,[b,this.ui()]);"resize"!==a&&this._trigger(a,b,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}}});e.ui.plugin.add("resizable","animate",{stop:function(a){var b=
e(this).resizable("instance"),d=b.options,c=b._proportionallyResizeElements,f=c.length&&/textarea/i.test(c[0].nodeName),g=f&&b._hasScroll(c[0],"left")?0:b.sizeDiff.height;f={width:b.size.width-(f?0:b.sizeDiff.width),height:b.size.height-g};g=parseFloat(b.element.css("left"))+(b.position.left-b.originalPosition.left)||null;var h=parseFloat(b.element.css("top"))+(b.position.top-b.originalPosition.top)||null;b.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:d.animateDuration,easing:d.animateEasing,
step:function(){var l={width:parseFloat(b.element.css("width")),height:parseFloat(b.element.css("height")),top:parseFloat(b.element.css("top")),left:parseFloat(b.element.css("left"))};c&&c.length&&e(c[0]).css({width:l.width,height:l.height});b._updateCache(l);b._propagate("resize",a)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var a=e(this).resizable("instance"),b=a.element;var d=a.options.containment;if(b=d instanceof e?d.get(0):/parent/.test(d)?b.parent().get(0):d)if(a.containerElement=
e(b),/document/.test(d)||d===document)a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight};else{var c=e(b);var f=[];e(["Top","Right","Left","Bottom"]).each(function(l,k){f[l]=a._num(c.css("padding"+k))});a.containerOffset=c.offset();a.containerPosition=c.position();a.containerSize={height:c.innerHeight()-f[3],width:c.innerWidth()-f[1]};d=a.containerOffset;
var g=a.containerSize.height;var h=a.containerSize.width;h=a._hasScroll(b,"left")?b.scrollWidth:h;g=a._hasScroll(b)?b.scrollHeight:g;a.parentData={element:b,left:d.left,top:d.top,width:h,height:g}}},resize:function(a){var b=e(this).resizable("instance");var d=b.options;var c=b.containerOffset;var f=b.position;a=b._aspectRatio||a.shiftKey;var g={top:0,left:0},h=b.containerElement,l=!0;h[0]!==document&&/static/.test(h.css("position"))&&(g=c);f.left<(b._helper?c.left:0)&&(b.size.width+=b._helper?b.position.left-
c.left:b.position.left-g.left,a&&(b.size.height=b.size.width/b.aspectRatio,l=!1),b.position.left=d.helper?c.left:0);f.top<(b._helper?c.top:0)&&(b.size.height+=b._helper?b.position.top-c.top:b.position.top,a&&(b.size.width=b.size.height*b.aspectRatio,l=!1),b.position.top=b._helper?c.top:0);d=b.containerElement.get(0)===b.element.parent().get(0);f=/relative|absolute/.test(b.containerElement.css("position"));d&&f?(b.offset.left=b.parentData.left+b.position.left,b.offset.top=b.parentData.top+b.position.top):
(b.offset.left=b.element.offset().left,b.offset.top=b.element.offset().top);d=Math.abs(b.sizeDiff.width+(b._helper?b.offset.left-g.left:b.offset.left-c.left));c=Math.abs(b.sizeDiff.height+(b._helper?b.offset.top-g.top:b.offset.top-c.top));d+b.size.width>=b.parentData.width&&(b.size.width=b.parentData.width-d,a&&(b.size.height=b.size.width/b.aspectRatio,l=!1));c+b.size.height>=b.parentData.height&&(b.size.height=b.parentData.height-c,a&&(b.size.width=b.size.height*b.aspectRatio,l=!1));l||(b.position.left=
b.prevPosition.left,b.position.top=b.prevPosition.top,b.size.width=b.prevSize.width,b.size.height=b.prevSize.height)},stop:function(){var a=e(this).resizable("instance"),b=a.options,d=a.containerOffset,c=a.containerPosition,f=a.containerElement,g=e(a.helper),h=g.offset(),l=g.outerWidth()-a.sizeDiff.width;g=g.outerHeight()-a.sizeDiff.height;a._helper&&!b.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-c.left-d.left,width:l,height:g});a._helper&&!b.animate&&/static/.test(f.css("position"))&&
e(this).css({left:h.left-c.left-d.left,width:l,height:g})}});e.ui.plugin.add("resizable","alsoResize",{start:function(){var a=e(this).resizable("instance");e(a.options.alsoResize).each(function(){var b=e(this),d=a._calculateAdjustedElementDimensions(b);b.data("ui-resizable-alsoresize",{width:d.width,height:d.height,left:parseFloat(b.css("left")),top:parseFloat(b.css("top"))})})},resize:function(a,b){a=e(this).resizable("instance");var d=a.originalSize,c=a.originalPosition,f={height:a.size.height-
d.height||0,width:a.size.width-d.width||0,top:a.position.top-c.top||0,left:a.position.left-c.left||0};e(a.options.alsoResize).each(function(){var g=e(this),h=e(this).data("ui-resizable-alsoresize"),l={},k=g.parents(b.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(k,function(n,r){(n=(h[r]||0)+(f[r]||0))&&0<=n&&(l[r]=n||null)});g.css(l)})},stop:function(){e(this).removeData("ui-resizable-alsoresize")}});e.ui.plugin.add("resizable","ghost",{start:function(){var a=
e(this).resizable("instance"),b=a.size;a.ghost=a.originalElement.clone();a.ghost.css({opacity:.25,display:"block",position:"relative",height:b.height,width:b.width,margin:0,left:0,top:0});a._addClass(a.ghost,"ui-resizable-ghost");!0===e.uiBackCompat&&"string"===typeof a.options.ghost&&a.ghost.addClass(this.options.ghost);a.ghost.appendTo(a.helper)},resize:function(){var a=e(this).resizable("instance");a.ghost&&a.ghost.css({position:"relative",height:a.size.height,width:a.size.width})},stop:function(){var a=
e(this).resizable("instance");a.ghost&&a.helper&&a.helper.get(0).removeChild(a.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var a=e(this).resizable("instance"),b=a.options,d=a.size,c=a.originalSize,f=a.originalPosition,g=a.axis,h="number"===typeof b.grid?[b.grid,b.grid]:b.grid,l=h[0]||1,k=h[1]||1,n=Math.round((d.width-c.width)/l)*l;d=Math.round((d.height-c.height)/k)*k;var r=c.width+n,m=c.height+d,p=b.maxWidth&&b.maxWidth<r,q=b.maxHeight&&b.maxHeight<m,v=b.minWidth&&b.minWidth>
r,z=b.minHeight&&b.minHeight>m;b.grid=h;v&&(r+=l);z&&(m+=k);p&&(r-=l);q&&(m-=k);if(/^(se|s|e)$/.test(g))a.size.width=r,a.size.height=m;else if(/^(ne)$/.test(g))a.size.width=r,a.size.height=m,a.position.top=f.top-d;else if(/^(sw)$/.test(g))a.size.width=r,a.size.height=m,a.position.left=f.left-n;else{if(0>=m-k||0>=r-l)var B=a._getPaddingPlusBorderDimensions(this);0<m-k?(a.size.height=m,a.position.top=f.top-d):(m=k-B.height,a.size.height=m,a.position.top=f.top+c.height-m);0<r-l?(a.size.width=r,a.position.left=
f.left-n):(r=l-B.width,a.size.width=r,a.position.left=f.left+c.width-r)}}});e.widget("ui.selectable",e.ui.mouse,{version:"1.14.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 a=this;this._addClass("ui-selectable");this.dragged=!1;this.refresh=function(){a.elementPos=e(a.element[0]).offset();a.selectees=e(a.options.filter,a.element[0]);a._addClass(a.selectees,
"ui-selectee");a.selectees.each(function(){var b=e(this),d=b.offset(),c=d.left-a.elementPos.left;d=d.top-a.elementPos.top;e.data(this,"selectable-item",{element:this,$element:b,left:c,top:d,right:c+b.outerWidth(),bottom:d+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})};this.refresh();this._mouseInit();this.helper=e("\x3cdiv\x3e");this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item");
this._mouseDestroy()},_mouseStart:function(a){var b=this,d=this.options;this.opos=[a.pageX,a.pageY];this.elementPos=e(this.element[0]).offset();this.options.disabled||(this.selectees=e(d.filter,this.element[0]),this._trigger("start",a),e(d.appendTo).append(this.helper),this.helper.css({left:a.pageX,top:a.pageY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var c=e.data(this,"selectable-item");c.startselected=!0;a.metaKey||a.ctrlKey||(b._removeClass(c.$element,
"ui-selected"),c.selected=!1,b._addClass(c.$element,"ui-unselecting"),c.unselecting=!0,b._trigger("unselecting",a,{unselecting:c.element}))}),e(a.target).parents().addBack().each(function(){var c=e.data(this,"selectable-item");if(c){var f=!a.metaKey&&!a.ctrlKey||!c.$element.hasClass("ui-selected");b._removeClass(c.$element,f?"ui-unselecting":"ui-selected")._addClass(c.$element,f?"ui-selecting":"ui-unselecting");c.unselecting=!f;c.selecting=f;(c.selected=f)?b._trigger("selecting",a,{selecting:c.element}):
b._trigger("unselecting",a,{unselecting:c.element});return!1}}))},_mouseDrag:function(a){this.dragged=!0;if(!this.options.disabled){var b=this,d=this.options,c=this.opos[0],f=this.opos[1],g=a.pageX,h=a.pageY;if(c>g){var l=g;g=c;c=l}f>h&&(l=h,h=f,f=l);this.helper.css({left:c,top:f,width:g-c,height:h-f});this.selectees.each(function(){var k=e.data(this,"selectable-item"),n=!1;if(k&&k.element!==b.element[0]){var r=k.left+b.elementPos.left;var m=k.right+b.elementPos.left;var p=k.top+b.elementPos.top;
var q=k.bottom+b.elementPos.top;"touch"===d.tolerance?n=!(r>g||m<c||p>h||q<f):"fit"===d.tolerance&&(n=r>c&&m<g&&p>f&&q<h);n?(k.selected&&(b._removeClass(k.$element,"ui-selected"),k.selected=!1),k.unselecting&&(b._removeClass(k.$element,"ui-unselecting"),k.unselecting=!1),k.selecting||(b._addClass(k.$element,"ui-selecting"),k.selecting=!0,b._trigger("selecting",a,{selecting:k.element}))):(k.selecting&&((a.metaKey||a.ctrlKey)&&k.startselected?(b._removeClass(k.$element,"ui-selecting"),k.selecting=!1,
b._addClass(k.$element,"ui-selected"),k.selected=!0):(b._removeClass(k.$element,"ui-selecting"),k.selecting=!1,k.startselected&&(b._addClass(k.$element,"ui-unselecting"),k.unselecting=!0),b._trigger("unselecting",a,{unselecting:k.element}))),!k.selected||a.metaKey||a.ctrlKey||k.startselected||(b._removeClass(k.$element,"ui-selected"),k.selected=!1,b._addClass(k.$element,"ui-unselecting"),k.unselecting=!0,b._trigger("unselecting",a,{unselecting:k.element})))}});return!1}},_mouseStop:function(a){var b=
this;this.dragged=!1;e(".ui-unselecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");b._removeClass(d.$element,"ui-unselecting");d.unselecting=!1;d.startselected=!1;b._trigger("unselected",a,{unselected:d.element})});e(".ui-selecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");b._removeClass(d.$element,"ui-selecting")._addClass(d.$element,"ui-selected");d.selecting=!1;d.selected=!0;d.startselected=!0;b._trigger("selected",a,{selected:d.element})});
this._trigger("stop",a);this.helper.remove();return!1}});e.widget("ui.sortable",e.ui.mouse,{version:"1.14.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:"\x3e *",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(a,b,d){return a>=b&&a<b+d},_isFloating:function(a){return/left|right/.test(a.css("float"))||/inline|table-cell/.test(a.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(a,b){this._super(a,b);"handle"===
a&&this._setHandleClassName()},_setHandleClassName:function(){var a=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle");e.each(this.items,function(){a._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var a=this.items.length-1;0<=a;a--)this.items[a].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(a,b){var d=null,c=!1,f=this;
if(this.reverting||this.options.disabled||"static"===this.options.type)return!1;this._refreshItems(a);e(a.target).parents().each(function(){if(e.data(this,f.widgetName+"-item")===f)return d=e(this),!1});e.data(a.target,f.widgetName+"-item")===f&&(d=e(a.target));if(!d||this.options.handle&&!b&&(e(this.options.handle,d).find("*").addBack().each(function(){this===a.target&&(c=!0)}),!c))return!1;this.currentItem=d;this._removeCurrentsFromItems();return!0},_mouseStart:function(a,b,d){b=this.options;this.currentContainer=
this;this.refreshPositions();this.appendTo=e("parent"!==b.appendTo?b.appendTo:this.currentItem.parent());this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};e.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=
this.helper.css("position");b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!==this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();this.scrollParent=this.placeholder.scrollParent();e.extend(this.offset,{parent:this._getParentOffset()});b.containment&&this._setContainment();if(b.cursor&&"auto"!==b.cursor){var c=this.document.find("body");this._storedStylesheet=e("\x3cstyle\x3e*{ cursor: "+
b.cursor+" !important; }\x3c/style\x3e").appendTo(c)}b.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",b.zIndex));b.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",b.opacity));this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset());this._trigger("start",a,this._uiHash());this._preserveHelperProportions||
this._cacheHelperProportions();if(!d)for(d=this.containers.length-1;0<=d;d--)this.containers[d]._trigger("activate",a,this._uiHash(this));e.ui.ddmanager&&(e.ui.ddmanager.current=this);e.ui.ddmanager&&!b.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,a);this.dragging=!0;this._addClass(this.helper,"ui-sortable-helper");this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset());this.position=this.originalPosition=this._generatePosition(a);
this.originalPageX=a.pageX;this.originalPageY=a.pageY;this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute");this._mouseDrag(a);return!0},_scroll:function(a){var b=this.options,d=!1;this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity?this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+b.scrollSpeed:a.pageY-this.overflowOffset.top<b.scrollSensitivity&&(this.scrollParent[0].scrollTop=
d=this.scrollParent[0].scrollTop-b.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity?this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+b.scrollSpeed:a.pageX-this.overflowOffset.left<b.scrollSensitivity&&(this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-b.scrollSpeed)):(a.pageY-this.document.scrollTop()<b.scrollSensitivity?d=this.document.scrollTop(this.document.scrollTop()-b.scrollSpeed):this.window.height()-(a.pageY-
this.document.scrollTop())<b.scrollSensitivity&&(d=this.document.scrollTop(this.document.scrollTop()+b.scrollSpeed)),a.pageX-this.document.scrollLeft()<b.scrollSensitivity?d=this.document.scrollLeft(this.document.scrollLeft()-b.scrollSpeed):this.window.width()-(a.pageX-this.document.scrollLeft())<b.scrollSensitivity&&(d=this.document.scrollLeft(this.document.scrollLeft()+b.scrollSpeed)));return d},_mouseDrag:function(a){var b;var d=this.options;this.position=this._generatePosition(a);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");d.scroll&&!1!==this._scroll(a)&&(this._refreshItemPositions(!0),e.ui.ddmanager&&!d.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,a));this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()};for(d=this.items.length-1;0<=
d;d--){var c=this.items[d];var f=c.item[0];if((b=this._intersectsWithPointer(c))&&c.instance===this.currentContainer&&f!==this.currentItem[0]&&this.placeholder[1===b?"next":"prev"]()[0]!==f&&!e.contains(this.placeholder[0],f)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],f):1)){this.direction=1===b?"down":"up";if("pointer"===this.options.tolerance||this._intersectsWithSides(c))this._rearrange(a,c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);
e.ui.ddmanager&&e.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(a,b){if(a){e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,a);if(this.options.revert){var d=this;b=this.placeholder.offset();var c=this.options.axis,f={};c&&"x"!==c||(f.left=b.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft));c&&"y"!==c||(f.top=b.top-
this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop));this.reverting=!0;e(this.helper).animate(f,parseInt(this.options.revert,10)||500,function(){d._clear(a)})}else this._clear(a,b);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new e.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 a=this.containers.length-1;0<=a;a--)this.containers[a]._trigger("deactivate",null,this._uiHash(this)),this.containers[a].containerCache.over&&(this.containers[a]._trigger("out",null,this._uiHash(this)),this.containers[a].containerCache.over=0)}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(),e.extend(this,{helper:null,dragging:!1,
reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),d=[];a=a||{};e(b).each(function(){var c=(e(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[\-=_](.+)/);c&&d.push((a.key||c[1]+"[]")+"\x3d"+(a.key&&a.expression?c[1]:c[2]))});!d.length&&a.key&&d.push(a.key+"\x3d");return d.join("\x26")},toArray:function(a){var b=
this._getItemsAsjQuery(a&&a.connected),d=[];a=a||{};b.each(function(){d.push(e(a.item||this).attr(a.attribute||"id")||"")});return d},_intersectsWith:function(a){var b=this.positionAbs.left,d=b+this.helperProportions.width,c=this.positionAbs.top,f=c+this.helperProportions.height,g=a.left,h=g+a.width,l=a.top,k=l+a.height,n=this.offset.click.top,r=this.offset.click.left;n="x"===this.options.axis||c+n>l&&c+n<k;r="y"===this.options.axis||b+r>g&&b+r<h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||
"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?n&&r:g<b+this.helperProportions.width/2&&d-this.helperProportions.width/2<h&&l<c+this.helperProportions.height/2&&f-this.helperProportions.height/2<k},_intersectsWithPointer:function(a){var b="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height);a="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,
a.left,a.width);if(!b||!a)return!1;b=this.dragDirection.vertical;a=this.dragDirection.horizontal;return this.floating?"right"===a||"down"===b?2:1:b&&("down"===b?2:1)},_intersectsWithSides:function(a){var b=this._isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height);a=this._isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width);var d=this.dragDirection.vertical,c=this.dragDirection.horizontal;return this.floating&&c?"right"===c&&a||"left"===c&&
!a:d&&("down"===d&&b||"up"===d&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return 0!==a&&(0<a?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return 0!==a&&(0<a?"right":"left")},refresh:function(a){this._refreshItems(a);this._setHandleClassName();this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor===String?[a.connectWith]:a.connectWith},
_getItemsAsjQuery:function(a){function b(){f.push(this)}var d,c,f=[],g=[],h=this._connectWith();if(h&&a)for(a=h.length-1;0<=a;a--){var l=e(h[a],this.document[0]);for(d=l.length-1;0<=d;d--)(c=e.data(l[d],this.widgetFullName))&&c!==this&&!c.options.disabled&&g.push(["function"===typeof c.options.items?c.options.items.call(c.element):e(c.options.items,c.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),c])}g.push(["function"===typeof this.options.items?this.options.items.call(this.element,
null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=g.length-1;0<=a;a--)g[a][0].each(b);return e(f)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(b){for(var d=0;d<a.length;d++)if(a[d]===b.item[0])return!1;return!0})},_refreshItems:function(a){this.items=[];this.containers=[this];var b,d,c,f,g=this.items,
h=[["function"===typeof this.options.items?this.options.items.call(this.element[0],a,{item:this.currentItem}):e(this.options.items,this.element),this]];if((f=this._connectWith())&&this.ready)for(b=f.length-1;0<=b;b--){var l=e(f[b],this.document[0]);for(d=l.length-1;0<=d;d--)(c=e.data(l[d],this.widgetFullName))&&c!==this&&!c.options.disabled&&(h.push(["function"===typeof c.options.items?c.options.items.call(c.element[0],a,{item:this.currentItem}):e(c.options.items,c.element),c]),this.containers.push(c))}for(b=
h.length-1;0<=b;b--)for(a=h[b][1],l=h[b][0],d=0,f=l.length;d<f;d++)c=e(l[d]),c.data(this.widgetName+"-item",a),g.push({item:c,instance:a,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(a){var b;for(b=this.items.length-1;0<=b;b--){var d=this.items[b];if(!this.currentContainer||d.instance===this.currentContainer||d.item[0]===this.currentItem[0]){var c=this.options.toleranceElement?e(this.options.toleranceElement,d.item):d.item;a||(d.width=c.outerWidth(),d.height=c.outerHeight());c=c.offset();
d.left=c.left;d.top=c.top}}},refreshPositions:function(a){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1;this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());this._refreshItemPositions(a);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(a=this.containers.length-1;0<=a;a--){var b=this.containers[a].element.offset();this.containers[a].containerCache.left=b.left;
this.containers[a].containerCache.top=b.top;this.containers[a].containerCache.width=this.containers[a].element.outerWidth();this.containers[a].containerCache.height=this.containers[a].element.outerHeight()}return this},_createPlaceholder:function(a){a=a||this;var b=a.options;if(!b.placeholder||b.placeholder.constructor===String){var d=b.placeholder;var c=a.currentItem[0].nodeName.toLowerCase();b.placeholder={element:function(){var f=e("\x3c"+c+"\x3e",a.document[0]);a._addClass(f,"ui-sortable-placeholder",
d||a.currentItem[0].className)._removeClass(f,"ui-sortable-helper");"tbody"===c?a._createTrPlaceholder(a.currentItem.find("tr").eq(0),e("\x3ctr\x3e",a.document[0]).appendTo(f)):"tr"===c?a._createTrPlaceholder(a.currentItem,f):"img"===c&&f.attr("src",a.currentItem.attr("src"));d||f.css("visibility","hidden");return f},update:function(f,g){if(!d||b.forcePlaceholderSize)g.height()&&(!b.forcePlaceholderSize||"tbody"!==c&&"tr"!==c)||g.height(a.currentItem.innerHeight()-parseInt(a.currentItem.css("paddingTop")||
0,10)-parseInt(a.currentItem.css("paddingBottom")||0,10)),g.width()||g.width(a.currentItem.innerWidth()-parseInt(a.currentItem.css("paddingLeft")||0,10)-parseInt(a.currentItem.css("paddingRight")||0,10))}}}a.placeholder=e(b.placeholder.element.call(a.element,a.currentItem));a.currentItem.after(a.placeholder);b.placeholder.update(a,a.placeholder)},_createTrPlaceholder:function(a,b){var d=this;a.children().each(function(){e("\x3ctd\x3e\x26#160;\x3c/td\x3e",d.document[0]).attr("colspan",e(this).attr("colspan")||
1).appendTo(b)})},_contactContainers:function(a){var b,d,c,f=c=null;for(b=this.containers.length-1;0<=b;b--)e.contains(this.currentItem[0],this.containers[b].element[0])||(this._intersectsWith(this.containers[b].containerCache)?c&&e.contains(this.containers[b].element[0],c.element[0])||(c=this.containers[b],f=b):this.containers[b].containerCache.over&&(this.containers[b]._trigger("out",a,this._uiHash(this)),this.containers[b].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[f].containerCache.over||
(this.containers[f]._trigger("over",a,this._uiHash(this)),this.containers[f].containerCache.over=1);else{b=1E4;var g=null;c=(d=c.floating||this._isFloating(this.currentItem))?"left":"top";var h=d?"width":"height";var l=d?"pageX":"pageY";for(d=this.items.length-1;0<=d;d--)if(e.contains(this.containers[f].element[0],this.items[d].item[0])&&this.items[d].item[0]!==this.currentItem[0]){var k=this.items[d].item.offset()[c];var n=!1;a[l]-k>this.items[d][h]/2&&(n=!0);Math.abs(a[l]-k)<b&&(b=Math.abs(a[l]-
k),g=this.items[d],this.direction=n?"up":"down")}if(g||this.options.dropOnEmpty)this.currentContainer===this.containers[f]?this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",a,this._uiHash()),this.currentContainer.containerCache.over=1):(g?this._rearrange(a,g,null,!0):this._rearrange(a,null,this.containers[f].element,!0),this._trigger("change",a,this._uiHash()),this.containers[f]._trigger("change",a,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer,
this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[f]._trigger("over",a,this._uiHash(this)),this.containers[f].containerCache.over=1)}},_createHelper:function(a){var b=this.options;a="function"===typeof b.helper?e(b.helper.apply(this.element[0],[a,this.currentItem])):"clone"===b.helper?this.currentItem.clone():this.currentItem;a.parents("body").length||
this.appendTo[0].appendChild(a[0]);a[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")});a[0].style.width&&!b.forceHelperSize||a.width(this.currentItem.width());a[0].style.height&&!b.forceHelperSize||a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){"string"===typeof a&&(a=a.split(" "));Array.isArray(a)&&
(a={left:+a[0],top:+a[1]||0});"left"in a&&(this.offset.click.left=a.left+this.margins.left);"right"in a&&(this.offset.click.left=this.helperProportions.width-a.right+this.margins.left);"top"in a&&(this.offset.click.top=a.top+this.margins.top);"bottom"in a&&(this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&
e.contains(this.scrollParent[0],this.offsetParent[0])&&(a.left+=this.scrollParent.scrollLeft(),a.top+=this.scrollParent.scrollTop());this.offsetParent[0]===this.document[0].body&&(a={top:0,left:0});return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+
this.scrollParent.scrollTop(),left:a.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 a=this.options;"parent"===a.containment&&(a.containment=
this.helper[0].parentNode);if("document"===a.containment||"window"===a.containment)this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===a.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===a.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-
this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)){var b=e(a.containment)[0];a=e(a.containment).offset();var d="hidden"!==e(b).css("overflow");this.containment=[a.left+(parseInt(e(b).css("borderLeftWidth"),10)||0)+(parseInt(e(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(e(b).css("borderTopWidth"),10)||0)+(parseInt(e(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(d?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(e(b).css("borderLeftWidth"),
10)||0)-(parseInt(e(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(d?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(e(b).css("borderTopWidth"),10)||0)-(parseInt(e(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(a,b){b||(b=this.position);a="absolute"===a?1:-1;var d="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?
this.scrollParent:this.offsetParent,c=/(html|body)/i.test(d[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():c?0:d.scrollTop())*a,left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():c?0:d.scrollLeft())*a}},_generatePosition:function(a){var b=this.options;var d=a.pageX;var c=a.pageY;var f="absolute"!==this.cssPosition||this.scrollParent[0]!==
this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,g=/(html|body)/i.test(f[0].tagName);"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset());this.originalPosition&&(this.containment&&(a.pageX-this.offset.click.left<this.containment[0]&&(d=this.containment[0]+this.offset.click.left),a.pageY-this.offset.click.top<this.containment[1]&&
(c=this.containment[1]+this.offset.click.top),a.pageX-this.offset.click.left>this.containment[2]&&(d=this.containment[2]+this.offset.click.left),a.pageY-this.offset.click.top>this.containment[3]&&(c=this.containment[3]+this.offset.click.top)),b.grid&&(c=this.originalPageY+Math.round((c-this.originalPageY)/b.grid[1])*b.grid[1],c=this.containment?c-this.offset.click.top>=this.containment[1]&&c-this.offset.click.top<=this.containment[3]?c:c-this.offset.click.top>=this.containment[1]?c-b.grid[1]:c+b.grid[1]:
c,d=this.originalPageX+Math.round((d-this.originalPageX)/b.grid[0])*b.grid[0],d=this.containment?d-this.offset.click.left>=this.containment[0]&&d-this.offset.click.left<=this.containment[2]?d:d-this.offset.click.left>=this.containment[0]?d-b.grid[0]:d+b.grid[0]:d));return{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():g?0:f.scrollTop()),left:d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+
("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())}},_rearrange:function(a,b,d,c){d?d[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?b.item[0]:b.item[0].nextSibling);var f=this.counter=this.counter?++this.counter:1;this._delay(function(){f===this.counter&&this.refreshPositions(!c)})},_clear:function(a,b){function d(g,h,l){return function(k){l._trigger(g,k,h._uiHash(h))}}this.reverting=!1;var c,f=[];!this._noFinalSort&&
this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(c in this._storedCSS)if("auto"===this._storedCSS[c]||"static"===this._storedCSS[c])this._storedCSS[c]="";this.currentItem.css(this._storedCSS);this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&f.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))});!this.fromOutside&&this.domPosition.prev===
this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||b||f.push(function(g){this._trigger("update",g,this._uiHash())});this===this.currentContainer||b||(f.push(function(g){this._trigger("remove",g,this._uiHash())}),f.push(function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}.call(this,this.currentContainer)),f.push(function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}.call(this,this.currentContainer)));
for(c=this.containers.length-1;0<=c;c--)b||f.push(d("deactivate",this,this.containers[c])),this.containers[c].containerCache.over&&(f.push(d("out",this,this.containers[c])),this.containers[c].containerCache.over=0);this._storedStylesheet&&(this._storedStylesheet.remove(),this._storedStylesheet=null);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex);this.dragging=!1;b||this._trigger("beforeStop",
a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null);if(!b){for(c=0;c<f.length;c++)f[c].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=!1;return!this.cancelHelperRemoval},_trigger:function(){!1===e.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||
e([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});e.widget("ui.slider",e.ui.mouse,{version:"1.14.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._mouseSliding=
this._keySliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this._calculateNewMax();this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content");this._refresh();this._animateOff=!1},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var a=this.options;var b=this.element.find(".ui-slider-handle"),d=[];var c=a.values&&a.values.length||1;b.length>c&&(b.slice(c).remove(),
b=b.slice(0,c));for(a=b.length;a<c;a++)d.push("\x3cspan tabindex\x3d'0'\x3e\x3c/span\x3e");this.handles=b.add(e(d.join("")).appendTo(this.element));this._addClass(this.handles,"ui-slider-handle","ui-state-default");this.handle=this.handles.eq(0);this.handles.each(function(f){e(this).data("ui-slider-handle-index",f).attr("tabIndex",0)})},_createRange:function(){var a=this.options;a.range?(!0===a.range&&(a.values?a.values.length&&2!==a.values.length?a.values=[a.values[0],a.values[0]]:Array.isArray(a.values)&&
(a.values=a.values.slice(0)):a.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=e("\x3cdiv\x3e").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==a.range&&"max"!==a.range||this._addClass(this.range,"ui-slider-range-"+a.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles);
this._on(this.handles,this._handleEvents);this._hoverable(this.handles);this._focusable(this.handles)},_destroy:function(){this.handles.remove();this.range&&this.range.remove();this._mouseDestroy()},_mouseCapture:function(a){var b,d,c=this,f=this.options;if(f.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var g=this._normValueFromMouse({x:a.pageX,y:a.pageY});var h=this._valueMax()-this._valueMin()+1;this.handles.each(function(k){var n=
Math.abs(g-c.values(k));if(h>n||h===n&&(k===c._lastChangedValue||c.values(k)===f.min))h=n,b=e(this),d=k});if(!1===this._start(a,d))return!1;this._mouseSliding=!0;this._handleIndex=d;this._addClass(b,null,"ui-state-active");b.trigger("focus");var l=b.offset();this._clickOffset=e(a.target).parents().addBack().is(".ui-slider-handle")?{left:a.pageX-l.left-b.width()/2,top:a.pageY-l.top-b.height()/2-(parseInt(b.css("borderTopWidth"),10)||0)-(parseInt(b.css("borderBottomWidth"),10)||0)+(parseInt(b.css("marginTop"),
10)||0)}:{left:0,top:0};this.handles.hasClass("ui-state-hover")||this._slide(a,d,g);return this._animateOff=!0},_mouseStart:function(){return!0},_mouseDrag:function(a){var b=this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return!1},_mouseStop:function(a){this._removeClass(this.handles,null,"ui-state-active");this._mouseSliding=!1;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=!1},
_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){if("horizontal"===this.orientation){var b=this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else b=this.elementSize.height,a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0);b=a/b;1<b&&(b=1);0>b&&(b=0);"vertical"===this.orientation&&(b=1-b);a=this._valueMax()-this._valueMin();b=this._valueMin()+
b*a;return this._trimAlignValue(b)},_uiHash:function(a,b,d){var c={handle:this.handles[a],handleIndex:a,value:void 0!==b?b:this.value()};this._hasMultipleValues()&&(c.value=void 0!==b?b:this.values(a),c.values=d||this.values());return c},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(a,b){return this._trigger("start",a,this._uiHash(b))},_slide:function(a,b,d){var c=this.value(),f=this.values();if(this._hasMultipleValues()){var g=this.values(b?
0:1);c=this.values(b);2===this.options.values.length&&!0===this.options.range&&(d=0===b?Math.min(g,d):Math.max(g,d));f[b]=d}d!==c&&!1!==this._trigger("slide",a,this._uiHash(b,d,f))&&(this._hasMultipleValues()?this.values(b,d):this.value(d))},_stop:function(a,b){this._trigger("stop",a,this._uiHash(b))},_change:function(a,b){this._keySliding||this._mouseSliding||(this._lastChangedValue=b,this._trigger("change",a,this._uiHash(b)))},value:function(a){if(arguments.length)this.options.value=this._trimAlignValue(a),
this._refreshValue(),this._change(null,0);else return this._value()},values:function(a,b){var d;if(1<arguments.length)this.options.values[a]=this._trimAlignValue(b),this._refreshValue(),this._change(null,a);else if(arguments.length)if(Array.isArray(arguments[0])){var c=this.options.values;var f=arguments[0];for(d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(f[d]),this._change(null,d);this._refreshValue()}else return this._hasMultipleValues()?this._values(a):this.value();else return this._values()},
_setOption:function(a,b){var d=0;"range"===a&&!0===this.options.range&&("min"===b?(this.options.value=this._values(0),this.options.values=null):"max"===b&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null));Array.isArray(this.options.values)&&(d=this.options.values.length);this._super(a,b);switch(a){case "orientation":this._detectOrientation();this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation);this._refreshValue();
this.options.range&&this._refreshRange(b);this.handles.css("horizontal"===b?"bottom":"left","");break;case "value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case "values":this._animateOff=!0;this._refreshValue();for(a=d-1;0<=a;a--)this._change(null,a);this._animateOff=!1;break;case "step":case "min":case "max":this._animateOff=!0;this._calculateNewMax();this._refreshValue();this._animateOff=!1;break;case "range":this._animateOff=!0,this._refresh(),this._animateOff=
!1}},_setOptionDisabled:function(a){this._super(a);this._toggleClass(null,"ui-state-disabled",!!a)},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b;if(arguments.length){var d=this.options.values[a];return d=this._trimAlignValue(d)}if(this._hasMultipleValues()){d=this.options.values.slice();for(b=0;b<d.length;b+=1)d[b]=this._trimAlignValue(d[b]);return d}return[]},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=
this._valueMax())return this._valueMax();var b=0<this.options.step?this.options.step:1,d=(a-this._valueMin())%b;a-=d;2*Math.abs(d)>=b&&(a+=0<d?b:-b);return parseFloat(a.toFixed(5))},_calculateNewMax:function(){var a=this.options.max,b=this._valueMin(),d=this.options.step;a=Math.round((a-b)/d)*d+b;a>this.options.max&&(a-=d);this.max=parseFloat(a.toFixed(this._precision()))},_precision:function(){var a=this._precisionOf(this.options.step);null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min)));
return a},_precisionOf:function(a){a=a.toString();var b=a.indexOf(".");return-1===b?0:a.length-b-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(a){"vertical"===a&&this.range.css({width:"",left:""});"horizontal"===a&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var a,b=this.options.range,d=this.options,c=this,f=this._animateOff?!1:d.animate,g={};if(this._hasMultipleValues())this.handles.each(function(r){n=(c.values(r)-
c._valueMin())/(c._valueMax()-c._valueMin())*100;g["horizontal"===c.orientation?"left":"bottom"]=n+"%";e(this).stop(1,1)[f?"animate":"css"](g,d.animate);if(!0===c.options.range)if("horizontal"===c.orientation){if(0===r)c.range.stop(1,1)[f?"animate":"css"]({left:n+"%"},d.animate);if(1===r)c.range[f?"animate":"css"]({width:n-a+"%"},{queue:!1,duration:d.animate})}else{if(0===r)c.range.stop(1,1)[f?"animate":"css"]({bottom:n+"%"},d.animate);if(1===r)c.range[f?"animate":"css"]({height:n-a+"%"},{queue:!1,
duration:d.animate})}a=n});else{var h=this.value();var l=this._valueMin();var k=this._valueMax();var n=k!==l?(h-l)/(k-l)*100:0;g["horizontal"===this.orientation?"left":"bottom"]=n+"%";this.handle.stop(1,1)[f?"animate":"css"](g,d.animate);if("min"===b&&"horizontal"===this.orientation)this.range.stop(1,1)[f?"animate":"css"]({width:n+"%"},d.animate);if("max"===b&&"horizontal"===this.orientation)this.range.stop(1,1)[f?"animate":"css"]({width:100-n+"%"},d.animate);if("min"===b&&"vertical"===this.orientation)this.range.stop(1,
1)[f?"animate":"css"]({height:n+"%"},d.animate);if("max"===b&&"vertical"===this.orientation)this.range.stop(1,1)[f?"animate":"css"]({height:100-n+"%"},d.animate)}},_handleEvents:{keydown:function(a){var b,d=e(a.target).data("ui-slider-handle-index");switch(a.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(a.preventDefault(),!this._keySliding){this._keySliding=
!0;this._addClass(e(a.target),null,"ui-state-active");var c=this._start(a,d);if(!1===c)return}}var f=this.options.step;c=this._hasMultipleValues()?b=this.values(d):b=this.value();switch(a.keyCode){case e.ui.keyCode.HOME:b=this._valueMin();break;case e.ui.keyCode.END:b=this._valueMax();break;case e.ui.keyCode.PAGE_UP:b=this._trimAlignValue(c+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:b=this._trimAlignValue(c-(this._valueMax()-this._valueMin())/this.numPages);
break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(c===this._valueMax())return;b=this._trimAlignValue(c+f);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(c===this._valueMin())return;b=this._trimAlignValue(c-f)}this._slide(a,d,b)},keyup:function(a){var b=e(a.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(a,b),this._change(a,b),this._removeClass(e(a.target),null,"ui-state-active"))}}});var D=e,w={},F=w.toString,U=/^([\-+])=\s*(\d+\.?\d*)/,O=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)%\s*,\s*(\d+(?:\.\d+)?)%\s*,\s*(\d+(?:\.\d+)?)%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),a[4]?(parseInt(a[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(a){return[parseInt(a[1]+a[1],16),
parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16),a[4]?(parseInt(a[4]+a[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)%\s*,\s*(\d+(?:\.\d+)?)%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],A=D.Color=function(a,b,d,c){return new D.Color.fn.parse(a,b,d,c)},J={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"}}}},Q={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},y=D.each;y(J,function(a,b){b.cache="_"+a;b.props.alpha={idx:3,type:"percent",def:1}});D.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){w["[object "+b+"]"]=b.toLowerCase()});A.fn=D.extend(A.prototype,{parse:function(a,b,d,c){if(void 0===a)return this._rgba=[null,null,null,null],this;if(a.jquery||a.nodeType)a=D(a).css(b),b=void 0;var f=this,
g=u(a),h=this._rgba=[];void 0!==b&&(a=[a,b,d,c],g="array");if("string"===g)return this.parse(C(a)||H._default);if("array"===g)return y(J.rgba.props,function(l,k){h[k.idx]=x(a[k.idx],k)}),this;if("object"===g)return a instanceof A?y(J,function(l,k){a[k.cache]&&(f[k.cache]=a[k.cache].slice())}):y(J,function(l,k){var n=k.cache;y(k.props,function(r,m){if(!f[n]&&k.to){if("alpha"===r||null==a[r])return;f[n]=k.to(f._rgba)}f[n][m.idx]=x(a[r],m,!0)});f[n]&&0>D.inArray(null,f[n].slice(0,3))&&(null==f[n][3]&&
(f[n][3]=1),k.from&&(f._rgba=k.from(f[n])))}),this},is:function(a){var b=A(a),d=!0,c=this;y(J,function(f,g){var h=b[g.cache];if(h){var l=c[g.cache]||g.to&&g.to(c._rgba)||[];y(g.props,function(k,n){if(null!=h[n.idx])return d=h[n.idx]===l[n.idx]})}return d});return d},_space:function(){var a=[],b=this;y(J,function(d,c){b[c.cache]&&a.push(d)});return a.pop()},transition:function(a,b){var d=A(a);a=d._space();var c=J[a],f=0===this.alpha()?A("transparent"):this,g=f[c.cache]||c.to(f._rgba),h=g.slice();d=
d[c.cache];y(c.props,function(l,k){l=k.idx;var n=g[l],r=d[l],m=Q[k.type]||{};null!==r&&(null===n?h[l]=r:(m.mod&&(r-n>m.mod/2?n+=m.mod:n-r>m.mod/2&&(n-=m.mod)),h[l]=x((r-n)*b+n,k)))});return this[a](h)},blend:function(a){if(1===this._rgba[3])return this;var b=this._rgba.slice(),d=b.pop(),c=A(a)._rgba;return A(D.map(b,function(f,g){return(1-d)*c[g]+d*f}))},toRgbaString:function(){var a="rgba(",b=D.map(this._rgba,function(d,c){return null!=d?d:2<c?1:0});1===b[3]&&(b.pop(),a="rgb(");return a+b.join(", ")+
")"},toHslaString:function(){var a="hsla(",b=D.map(this.hsla(),function(d,c){null==d&&(d=2<c?1:0);c&&3>c&&(d=Math.round(100*d)+"%");return d});1===b[3]&&(b.pop(),a="hsl(");return a+b.join(", ")+")"},toHexString:function(a){var b=this._rgba.slice(),d=b.pop();a&&b.push(~~(255*d));return"#"+D.map(b,function(c){return("0"+(c||0).toString(16)).substr(-2)}).join("")},toString:function(){return this.toRgbaString()}});A.fn.parse.prototype=A.fn;J.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,
null,null,a[3]];var b=a[0]/255,d=a[1]/255,c=a[2]/255;a=a[3];var f=Math.max(b,d,c),g=Math.min(b,d,c),h=f-g,l=f+g,k=.5*l;return[Math.round(g===f?0:b===f?60*(d-c)/h+360:d===f?60*(c-b)/h+120:60*(b-d)/h+240)%360,0===h?0:.5>=k?h/l:h/(2-l),k,null==a?1:a]};J.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,d=a[1],c=a[2];a=a[3];d=.5>=c?c*(1+d):c+d-c*d;c=2*c-d;return[Math.round(255*I(c,d,b+1/3)),Math.round(255*I(c,d,b)),Math.round(255*I(c,d,b-1/3)),a]};
y(J,function(a,b){var d=b.props,c=b.cache,f=b.to,g=b.from;A.fn[a]=function(h){f&&!this[c]&&(this[c]=f(this._rgba));if(void 0===h)return this[c].slice();var l=u(h),k="array"===l||"object"===l?h:arguments,n=this[c].slice();y(d,function(m,p){m=k["object"===l?m:p.idx];null==m&&(m=n[p.idx]);n[p.idx]=x(m,p)});if(g){var r=A(g(n));r[c]=n;return r}return A(n)};y(d,function(h,l){A.fn[h]||(A.fn[h]=function(k){var n=u(k);var r="alpha"===h?this._hsla?"hsla":"rgba":a;var m=this[r]();var p=m[l.idx];if("undefined"===
n)return p;"function"===n&&(k=k.call(this,p),n=u(k));if(null==k&&l.empty)return this;"string"===n&&(n=U.exec(k))&&(k=p+parseFloat(n[2])*("+"===n[1]?1:-1));m[l.idx]=k;return this[r](m)})})});A.hook=function(a){a=a.split(" ");y(a,function(b,d){D.cssHooks[d]={set:function(c,f){var g;"transparent"===f||"string"===u(f)&&!(g=C(f))||(f=A(g||f),f=f.toRgbaString());c.style[d]=f}};D.fx.step[d]=function(c){c.colorInit||(c.start=A(c.elem,d),c.end=A(c.end),c.colorInit=!0);D.cssHooks[d].set(c.elem,c.start.transition(c.end,
c.pos))}})};A.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");D.cssHooks.borderColor={expand:function(a){var b={};y(["Top","Right","Bottom","Left"],function(d,c){b["border"+c+"Color"]=a});return b}};var H=D.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",
red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"};e.effects={effect:{}};(function(){function a(f){return f.replace(/-([\da-z])/gi,function(g,h){return h.toUpperCase()})}function b(f){var g,h=f.ownerDocument.defaultView.getComputedStyle(f),l={};for(g=h.length;g--;)f=h[g],"string"===typeof h[f]&&(l[a(f)]=h[f]);return l}var d=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,
borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(f,g){e.fx.step[g]=function(h){if("none"!==h.end&&!h.setAttr||1===h.pos&&!h.setAttr)D.style(h.elem,g,h.end),h.setAttr=!0}});e.effects.animateClass=function(f,g,h,l){var k=e.speed(g,h,l);return this.queue(function(){var n=e(this),r=n.attr("class")||"",m=k.children?n.find("*").addBack():n;m=m.map(function(){return{el:e(this),start:b(this)}});var p=function(){e.each(d,function(q,
v){if(f[v])n[v+"Class"](f[v])})};p();m=m.map(function(){this.end=b(this.el[0]);var q=this.start,v=this.end,z={},B;for(B in v){var E=v[B];q[B]===E||c[B]||!e.fx.step[B]&&isNaN(parseFloat(E))||(z[B]=E)}this.diff=z;return this});n.attr("class",r);m=m.map(function(){var q=this,v=e.Deferred(),z=e.extend({},k,{queue:!1,complete:function(){v.resolve(q)}});this.el.animate(this.diff,z);return v.promise()});e.when.apply(e,m.get()).done(function(){p();e.each(arguments,function(){var q=this.el;e.each(this.diff,
function(v){q.css(v,"")})});k.complete.call(n[0])})})};e.fn.extend({addClass:function(f){return function(g,h,l,k){return h?e.effects.animateClass.call(this,{add:g},h,l,k):f.apply(this,arguments)}}(e.fn.addClass),removeClass:function(f){return function(g,h,l,k){return 1<arguments.length?e.effects.animateClass.call(this,{remove:g},h,l,k):f.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(f){return function(g,h,l,k,n){return"boolean"===typeof h||void 0===h?l?e.effects.animateClass.call(this,
h?{add:g}:{remove:g},l,k,n):f.apply(this,arguments):e.effects.animateClass.call(this,{toggle:g},h,l,k)}}(e.fn.toggleClass),switchClass:function(f,g,h,l,k){return e.effects.animateClass.call(this,{add:g,remove:f},h,l,k)}})})();(function(){function a(c,f,g,h){e.isPlainObject(c)&&(f=c,c=c.effect);c={effect:c};null==f&&(f={});"function"===typeof f&&(h=f,g=null,f={});if("number"===typeof f||e.fx.speeds[f])h=g,g=f,f={};"function"===typeof g&&(h=g,g=null);f&&e.extend(c,f);g=g||f.duration;c.duration=e.fx.off?
0:"number"===typeof g?g:g in e.fx.speeds?e.fx.speeds[g]:e.fx.speeds._default;c.complete=h||f.complete;return c}function b(c){return!c||"number"===typeof c||e.fx.speeds[c]||"string"===typeof c&&!e.effects.effect[c]||"function"===typeof c||"object"===typeof c&&!c.effect?!0:!1}function d(c,f){var g=f.outerWidth();f=f.outerHeight();c=/^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(c)||["",0,g,f,0];return{top:parseFloat(c[1])||
0,right:"auto"===c[2]?g:parseFloat(c[2]),bottom:"auto"===c[3]?f:parseFloat(c[3]),left:parseFloat(c[4])||0}}e.expr&&e.expr.pseudos&&e.expr.pseudos.animated&&(e.expr.pseudos.animated=function(c){return function(f){return!!e(f).data("ui-effects-animated")||c(f)}}(e.expr.pseudos.animated));!0===e.uiBackCompat&&e.extend(e.effects,{save:function(c,f){for(var g=0,h=f.length;g<h;g++)null!==f[g]&&c.data("ui-effects-"+f[g],c[0].style[f[g]])},restore:function(c,f){for(var g,h=0,l=f.length;h<l;h++)null!==f[h]&&
(g=c.data("ui-effects-"+f[h]),c.css(f[h],g))},setMode:function(c,f){"toggle"===f&&(f=c.is(":hidden")?"show":"hide");return f},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var f={width:c.outerWidth(!0),height:c.outerHeight(!0),"float":c.css("float")},g=e("\x3cdiv\x3e\x3c/div\x3e").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),h={width:c.width(),height:c.height()},l=document.activeElement;try{l.id}catch(k){l=
document.body}c.wrap(g);(c[0]===l||e.contains(c[0],l))&&e(l).trigger("focus");g=c.parent();"static"===c.css("position")?(g.css({position:"relative"}),c.css({position:"relative"})):(e.extend(f,{position:c.css("position"),zIndex:c.css("z-index")}),e.each(["top","left","bottom","right"],function(k,n){f[n]=c.css(n);isNaN(parseInt(f[n],10))&&(f[n]="auto")}),c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"}));c.css(h);return g.css(f).show()},removeWrapper:function(c){var f=document.activeElement;
c.parent().is(".ui-effects-wrapper")&&(c.parent().replaceWith(c),(c[0]===f||e.contains(c[0],f))&&e(f).trigger("focus"));return c}});e.extend(e.effects,{version:"1.14.1",define:function(c,f,g){g||(g=f,f="effect");e.effects.effect[c]=g;e.effects.effect[c].mode=f;return g},scaledDimensions:function(c,f,g){if(0===f)return{height:0,width:0,outerHeight:0,outerWidth:0};var h="horizontal"!==g?(f||100)/100:1;f="vertical"!==g?(f||100)/100:1;return{height:c.height()*f,width:c.width()*h,outerHeight:c.outerHeight()*
f,outerWidth:c.outerWidth()*h}},clipToBox:function(c){return{width:c.clip.right-c.clip.left,height:c.clip.bottom-c.clip.top,left:c.clip.left,top:c.clip.top}},unshift:function(c,f,g){var h=c.queue();1<f&&h.splice.apply(h,[1,0].concat(h.splice(f,g)));c.dequeue()},saveStyle:function(c){c.data("ui-effects-style",c[0].style.cssText)},restoreStyle:function(c){c[0].style.cssText=c.data("ui-effects-style")||"";c.removeData("ui-effects-style")},mode:function(c,f){c=c.is(":hidden");"toggle"===f&&(f=c?"show":
"hide");if(c?"hide"===f:"show"===f)f="none";return f},getBaseline:function(c,f){switch(c[0]){case "top":var g=0;break;case "middle":g=.5;break;case "bottom":g=1;break;default:g=c[0]/f.height}switch(c[1]){case "left":c=0;break;case "center":c=.5;break;case "right":c=1;break;default:c=c[1]/f.width}return{x:c,y:g}},createPlaceholder:function(c){var f=c.css("position"),g=c.position();c.css({marginTop:c.css("marginTop"),marginBottom:c.css("marginBottom"),marginLeft:c.css("marginLeft"),marginRight:c.css("marginRight")}).outerWidth(c.outerWidth()).outerHeight(c.outerHeight());
if(/^(static|relative)/.test(f)){f="absolute";var h=e("\x3c"+c[0].nodeName+"\x3e").insertAfter(c).css({display:/^(inline|ruby)/.test(c.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:c.css("marginTop"),marginBottom:c.css("marginBottom"),marginLeft:c.css("marginLeft"),marginRight:c.css("marginRight"),"float":c.css("float")}).outerWidth(c.outerWidth()).outerHeight(c.outerHeight()).addClass("ui-effects-placeholder");c.data("ui-effects-placeholder",h)}c.css({position:f,left:g.left,
top:g.top});return h},removePlaceholder:function(c){var f=c.data("ui-effects-placeholder");f&&(f.remove(),c.removeData("ui-effects-placeholder"))},cleanUp:function(c){e.effects.restoreStyle(c);e.effects.removePlaceholder(c)},setTransition:function(c,f,g,h){h=h||{};e.each(f,function(l,k){l=c.cssUnit(k);0<l[0]&&(h[k]=l[0]*g+l[1])});return h}});e.fn.extend({effect:function(){function c(q){function v(){B.removeData("ui-effects-animated");e.effects.cleanUp(B);"hide"===f.mode&&B.hide();z()}function z(){"function"===
typeof n&&n.call(B[0]);"function"===typeof q&&q()}var B=e(this);f.mode=m.shift();!0!==e.uiBackCompat||h?"none"===f.mode?(B[r](),z()):g.call(B[0],f,v):(B.is(":hidden")?"hide"===r:"show"===r)?(B[r](),z()):g.call(B[0],f,z)}var f=a.apply(this,arguments),g=e.effects.effect[f.effect],h=g.mode,l=f.queue,k=l||"fx",n=f.complete,r=f.mode,m=[],p=function(q){var v=e(this),z=e.effects.mode(v,r)||h;v.data("ui-effects-animated",!0);m.push(z);h&&("show"===z||z===h&&"hide"===z)&&v.show();h&&"none"===z||e.effects.saveStyle(v);
"function"===typeof q&&q()};return e.fx.off||!g?r?this[r](f.duration,n):this.each(function(){n&&n.call(this)}):!1===l?this.each(p).each(c):this.queue(k,p).queue(k,c)},show:function(c){return function(f){if(b(f))return c.apply(this,arguments);var g=a.apply(this,arguments);g.mode="show";return this.effect.call(this,g)}}(e.fn.show),hide:function(c){return function(f){if(b(f))return c.apply(this,arguments);var g=a.apply(this,arguments);g.mode="hide";return this.effect.call(this,g)}}(e.fn.hide),toggle:function(c){return function(f){if(b(f)||
"boolean"===typeof f)return c.apply(this,arguments);var g=a.apply(this,arguments);g.mode="toggle";return this.effect.call(this,g)}}(e.fn.toggle),cssUnit:function(c){var f=this.css(c),g=[];e.each(["em","px","%","pt"],function(h,l){0<f.indexOf(l)&&(g=[parseFloat(f),l])});return g},cssClip:function(c){return c?this.css("clip","rect("+c.top+"px "+c.right+"px "+c.bottom+"px "+c.left+"px)"):d(this.css("clip"),this)},transfer:function(c,f){var g=e(this),h=e(c.to),l="fixed"===h.css("position"),k=e("body"),
n=l?k.scrollTop():0;k=l?k.scrollLeft():0;var r=h.offset();h={top:r.top-n,left:r.left-k,height:h.innerHeight(),width:h.innerWidth()};r=g.offset();var m=e("\x3cdiv class\x3d'ui-effects-transfer'\x3e\x3c/div\x3e");m.appendTo("body").addClass(c.className).css({top:r.top-n,left:r.left-k,height:g.innerHeight(),width:g.innerWidth(),position:l?"fixed":"absolute"}).animate(h,c.duration,c.easing,function(){m.remove();"function"===typeof f&&f()})}});e.fx.step.clip=function(c){c.clipInit||(c.start=e(c.elem).cssClip(),
"string"===typeof c.end&&(c.end=d(c.end,c.elem)),c.clipInit=!0);e(c.elem).cssClip({top:c.pos*(c.end.top-c.start.top)+c.start.top,right:c.pos*(c.end.right-c.start.right)+c.start.right,bottom:c.pos*(c.end.bottom-c.start.bottom)+c.start.bottom,left:c.pos*(c.end.left-c.start.left)+c.start.left})}})();(function(){var a={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(b,d){a[d]=function(c){return Math.pow(c,b+2)}});e.extend(a,{Sine:function(b){return 1-Math.cos(b*Math.PI/2)},Circ:function(b){return 1-
Math.sqrt(1-b*b)},Elastic:function(b){return 0===b||1===b?b:-Math.pow(2,8*(b-1))*Math.sin((80*(b-1)-7.5)*Math.PI/15)},Back:function(b){return b*b*(3*b-2)},Bounce:function(b){for(var d,c=4;b<((d=Math.pow(2,--c))-1)/11;);return 1/Math.pow(4,3-c)-7.5625*Math.pow((3*d-2)/22-b,2)}});e.each(a,function(b,d){e.easing["easeIn"+b]=d;e.easing["easeOut"+b]=function(c){return 1-d(1-c)};e.easing["easeInOut"+b]=function(c){return.5>c?d(2*c)/2:1-d(-2*c+2)/2}})})();e.effects.define("blind","hide",function(a,b){var d=
{up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},c=e(this),f=a.direction||"up",g=c.cssClip(),h={clip:e.extend({},g)},l=e.effects.createPlaceholder(c);h.clip[d[f][0]]=h.clip[d[f][1]];"show"===a.mode&&(c.cssClip(h.clip),l&&l.css(e.effects.clipToBox(h)),h.clip=g);l&&l.animate(e.effects.clipToBox(h),a.duration,a.easing);c.animate(h,{queue:!1,duration:a.duration,easing:a.easing,complete:b})});e.effects.define("bounce",
function(a,b){var d=e(this),c=a.mode,f="hide"===c;var g="show"===c;var h=a.direction||"up";c=a.distance;var l=a.times||5,k=2*l+(g||f?1:0),n=a.duration/k;a=a.easing;var r="up"===h||"down"===h?"top":"left";h="up"===h||"left"===h;var m=0,p=d.queue().length;e.effects.createPlaceholder(d);var q=d.css(r);c||(c=d["top"===r?"outerHeight":"outerWidth"]()/3);g&&(g={opacity:1},g[r]=q,d.css("opacity",0).css(r,h?2*-c:2*c).animate(g,n,a));f&&(c/=Math.pow(2,l-1));g={};for(g[r]=q;m<l;m++)q={},q[r]=(h?"-\x3d":"+\x3d")+
c,d.animate(q,n,a).animate(g,n,a),c=f?2*c:c/2;f&&(q={opacity:0},q[r]=(h?"-\x3d":"+\x3d")+c,d.animate(q,n,a));d.queue(b);e.effects.unshift(d,p,k+1)});e.effects.define("clip","hide",function(a,b){var d={},c=e(this);var f=a.direction||"vertical";var g="both"===f,h=g||"horizontal"===f;g=g||"vertical"===f;f=c.cssClip();d.clip={top:g?(f.bottom-f.top)/2:f.top,right:h?(f.right-f.left)/2:f.right,bottom:g?(f.bottom-f.top)/2:f.bottom,left:h?(f.right-f.left)/2:f.left};e.effects.createPlaceholder(c);"show"===
a.mode&&(c.cssClip(d.clip),d.clip=f);c.animate(d,{queue:!1,duration:a.duration,easing:a.easing,complete:b})});e.effects.define("drop","hide",function(a,b){var d=e(this),c="show"===a.mode;var f=a.direction||"left";var g="up"===f||"down"===f?"top":"left",h="up"===f||"left"===f?"-\x3d":"+\x3d",l="+\x3d"===h?"-\x3d":"+\x3d",k={opacity:0};e.effects.createPlaceholder(d);f=a.distance||d["top"===g?"outerHeight":"outerWidth"](!0)/2;k[g]=h+f;c&&(d.css(k),k[g]=l+f,k.opacity=1);d.animate(k,{queue:!1,duration:a.duration,
easing:a.easing,complete:b})});e.effects.define("explode","hide",function(a,b){function d(){p.push(this);p.length===g*h&&(l.css({visibility:"visible"}),e(p).remove(),b())}var c,f,g=a.pieces?Math.round(Math.sqrt(a.pieces)):3,h=g,l=e(this),k="show"===a.mode,n=l.show().css("visibility","hidden").offset(),r=Math.ceil(l.outerWidth()/h),m=Math.ceil(l.outerHeight()/g),p=[];for(c=0;c<g;c++){var q=n.top+c*m;var v=c-(g-1)/2;for(f=0;f<h;f++){var z=n.left+f*r;var B=f-(h-1)/2;l.clone().appendTo("body").wrap("\x3cdiv\x3e\x3c/div\x3e").css({position:"absolute",
visibility:"visible",left:-f*r,top:-c*m}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:r,height:m,left:z+(k?B*r:0),top:q+(k?v*m:0),opacity:k?0:1}).animate({left:z+(k?0:B*r),top:q+(k?0:v*m),opacity:k?1:0},a.duration||500,a.easing,d)}}});e.effects.define("fade","toggle",function(a,b){var d="show"===a.mode;e(this).css("opacity",d?0:1).animate({opacity:d?1:0},{queue:!1,duration:a.duration,easing:a.easing,complete:b})});e.effects.define("fold","hide",function(a,
b){var d=e(this),c=a.mode,f="show"===c;c="hide"===c;var g=a.size||15,h=/([0-9]+)%/.exec(g),l=a.horizFirst?["right","bottom"]:["bottom","right"],k=a.duration/2,n=e.effects.createPlaceholder(d),r=d.cssClip(),m={clip:e.extend({},r)},p={clip:e.extend({},r)},q=[r[l[0]],r[l[1]]],v=d.queue().length;h&&(g=parseInt(h[1],10)/100*q[c?0:1]);m.clip[l[0]]=g;p.clip[l[0]]=g;p.clip[l[1]]=0;f&&(d.cssClip(p.clip),n&&n.css(e.effects.clipToBox(p)),p.clip=r);d.queue(function(z){n&&n.animate(e.effects.clipToBox(m),k,a.easing).animate(e.effects.clipToBox(p),
k,a.easing);z()}).animate(m,k,a.easing).animate(p,k,a.easing).queue(b);e.effects.unshift(d,v,4)});e.effects.define("highlight","show",function(a,b){var d=e(this),c={backgroundColor:d.css("backgroundColor")};"hide"===a.mode&&(c.opacity=0);e.effects.saveStyle(d);d.css({backgroundImage:"none",backgroundColor:a.color||"#ffff99"}).animate(c,{queue:!1,duration:a.duration,easing:a.easing,complete:b})});e.effects.define("size",function(a,b){var d=e(this),c=["fontSize"],f=["borderTopWidth","borderBottomWidth",
"paddingTop","paddingBottom"],g=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var h=a.mode;var l="effect"!==h,k=a.scale||"both";var n=a.origin||["middle","center"];var r=d.css("position"),m=d.position(),p=e.effects.scaledDimensions(d),q=a.from||p,v=a.to||e.effects.scaledDimensions(d,0);e.effects.createPlaceholder(d);"show"===h&&(h=q,q=v,v=h);var z=q.height/p.height;var B=q.width/p.width;var E=v.height/p.height;var P=v.width/p.width;if("box"===k||"both"===k)z!==E&&(q=e.effects.setTransition(d,
f,z,q),v=e.effects.setTransition(d,f,E,v)),B!==P&&(q=e.effects.setTransition(d,g,B,q),v=e.effects.setTransition(d,g,P,v));"content"!==k&&"both"!==k||z===E||(q=e.effects.setTransition(d,c,z,q),v=e.effects.setTransition(d,c,E,v));n&&(n=e.effects.getBaseline(n,p),q.top=(p.outerHeight-q.outerHeight)*n.y+m.top,q.left=(p.outerWidth-q.outerWidth)*n.x+m.left,v.top=(p.outerHeight-v.outerHeight)*n.y+m.top,v.left=(p.outerWidth-v.outerWidth)*n.x+m.left);delete q.outerHeight;delete q.outerWidth;d.css(q);if("content"===
k||"both"===k)f=f.concat(["marginTop","marginBottom"]).concat(c),g=g.concat(["marginLeft","marginRight"]),d.find("*[width]").each(function(){var L=e(this),M=e.effects.scaledDimensions(L),R={height:M.height*z,width:M.width*B,outerHeight:M.outerHeight*z,outerWidth:M.outerWidth*B};M={height:M.height*E,width:M.width*P,outerHeight:M.height*E,outerWidth:M.width*P};z!==E&&(R=e.effects.setTransition(L,f,z,R),M=e.effects.setTransition(L,f,E,M));B!==P&&(R=e.effects.setTransition(L,g,B,R),M=e.effects.setTransition(L,
g,P,M));l&&e.effects.saveStyle(L);L.css(R);L.animate(M,a.duration,a.easing,function(){l&&e.effects.restoreStyle(L)})});d.animate(v,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){var L=d.offset();0===v.opacity&&d.css("opacity",q.opacity);l||(d.css("position","static"===r?"relative":r).offset(L),e.effects.saveStyle(d));b()}})});e.effects.define("scale",function(a,b){var d=e(this),c=a.mode;c=parseInt(a.percent,10)||(0===parseInt(a.percent,10)?0:"effect"!==c?0:100);d=e.extend(!0,{from:e.effects.scaledDimensions(d),
to:e.effects.scaledDimensions(d,c,a.direction||"both"),origin:a.origin||["middle","center"]},a);a.fade&&(d.from.opacity=1,d.to.opacity=0);e.effects.effect.size.call(this,d,b)});e.effects.define("puff","hide",function(a,b){a=e.extend(!0,{},a,{fade:!0,percent:parseInt(a.percent,10)||150});e.effects.effect.scale.call(this,a,b)});e.effects.define("pulsate","show",function(a,b){var d=e(this),c=a.mode,f="show"===c;c=2*(a.times||5)+(f||"hide"===c?1:0);var g=a.duration/c,h=0,l=1,k=d.queue().length;if(f||
!d.is(":visible"))d.css("opacity",0).show(),h=1;for(;l<c;l++)d.animate({opacity:h},g,a.easing),h=1-h;d.animate({opacity:h},g,a.easing);d.queue(b);e.effects.unshift(d,k,c+1)});e.effects.define("shake",function(a,b){var d=1,c=e(this),f=a.direction||"left",g=a.distance||20,h=a.times||3,l=2*h+1,k=Math.round(a.duration/l),n="up"===f||"down"===f?"top":"left";f="up"===f||"left"===f;var r={},m={},p={},q=c.queue().length;e.effects.createPlaceholder(c);r[n]=(f?"-\x3d":"+\x3d")+g;m[n]=(f?"+\x3d":"-\x3d")+2*
g;p[n]=(f?"-\x3d":"+\x3d")+2*g;for(c.animate(r,k,a.easing);d<h;d++)c.animate(m,k,a.easing).animate(p,k,a.easing);c.animate(m,k,a.easing).animate(r,k/2,a.easing).queue(b);e.effects.unshift(c,q,l+1)});e.effects.define("slide","show",function(a,b){var d=e(this),c={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},f=a.mode,g=a.direction||"left",h="up"===g||"down"===g?"top":"left",l="up"===g||"left"===g,k=a.distance||d["top"===h?"outerHeight":"outerWidth"](!0),n={};
e.effects.createPlaceholder(d);var r=d.cssClip();var m=d.position()[h];n[h]=(l?-1:1)*k+m;n.clip=d.cssClip();n.clip[c[g][1]]=n.clip[c[g][0]];"show"===f&&(d.cssClip(n.clip),d.css(h,n[h]),n.clip=r,n[h]=m);d.animate(n,{queue:!1,duration:a.duration,easing:a.easing,complete:b})});!0===e.uiBackCompat&&e.effects.define("transfer",function(a,b){e(this).transfer(a,b)})});
$(function(){var e={primaryStyles:"fontFamily fontSize fontWeight fontVariant fontStyle paddingLeft paddingTop paddingBottom paddingRight marginLeft marginTop marginBottom marginRight borderLeftColor borderTopColor borderBottomColor borderRightColor borderLeftStyle borderTopStyle borderBottomStyle borderRightStyle borderLeftWidth borderTopWidth borderBottomWidth borderRightWidth line-height outline".split(" "),specificStyle:{"word-wrap":"break-word","overflow-x":"hidden","overflow-y":"auto"},simulator:null,
toHtml:function(u){return PrimeFaces.escapeHTML(u).replace(/\n/g,"\x3cbr\x3e").split(" ").join('\x3cspan style\x3d"white-space:prev-wrap"\x3e\x26nbsp;\x3c/span\x3e')},getCaretPosition:function(){var u=e,x=this,C=x[0];x.offset();null===u.simulator&&(u.simulator=$('\x3cdiv id\x3d"textarea_simulator"\x3e\x3c/div\x3e').css({position:"absolute",top:"0px",left:"0px",visibility:"hidden"}).appendTo(document.body));u.simulator.empty();$.each(u.primaryStyles,function(t,N){x.cloneStyle(u.simulator,N)});u.simulator.css($.extend({width:x.width()+
"px",height:x.height()+"px"},u.specificStyle));var I=x.val(),K=x.getCursorPosition(),G=I.substring(0,K);I=I.substring(K);K=$('\x3cspan class\x3d"before"\x3e\x3c/span\x3e').html(u.toHtml(G));G=$('\x3cspan class\x3d"focus"\x3e\x3c/span\x3e');I=$('\x3cspan class\x3d"after"\x3e\x3c/span\x3e').html(u.toHtml(I));u.simulator.append(K).append(G).append(I);I=G.offset();K=u.simulator.offset();return{top:I.top-K.top-C.scrollTop+($.browser.mozilla?0:parseInt(x.getComputedStyle("fontSize"))),left:G[0].offsetLeft-
u.simulator[0].offsetLeft-C.scrollLeft}}};$.fn.extend({getComputedStyle:function(u){if(0!=this.length){var x=this.css(u);return x=x||document.defaultView.getComputedStyle(this[0],null)[u]}},cloneStyle:function(u,x){var C=this.getComputedStyle(x);C&&$(u).css(x,C)},cloneAllStyle:function(u,x){x=this[0];for(var C in x.style){var I=x.style[C];"string"==typeof I||"number"==typeof I?this.cloneStyle(u,C):NaN}},getCursorPosition:function(){var u=this[0],x=0;if("selectionStart"in u)x=u.selectionStart;else if("selection"in
document){var C=document.selection.createRange();if(6<parseInt($.browser.version))u.focus(),x=document.selection.createRange().text.length,C.moveStart("character",-u.value.length),x=C.text.length-x;else{var I=document.body.createTextRange();for(I.moveToElementText(u);0>I.compareEndPoints("StartToStart",C);x++)I.moveStart("character",1);for(C=0;C<=x;C++)"\n"==u.value.charAt(C)&&x++;u=u.value.split("\n").length-1;return x-u}}return x},getCaretPosition:e.getCaretPosition})});
(function(e,u){if("function"===typeof define&&define.amd)define(["module","exports"],u);else if("undefined"!==typeof exports)u(module,exports);else{var x={exports:{}};u(x,x.exports);e.autosize=x.exports}})(this,function(e,u){function x(t){function N(y){var H=t.style.width;t.style.width="0px";t.offsetWidth;t.style.width=H;t.style.overflowY=y}function D(y){for(var H=[];y&&y.parentNode&&y.parentNode instanceof Element;)y.parentNode.scrollTop&&H.push({node:y.parentNode,scrollTop:y.parentNode.scrollTop}),
y=y.parentNode;return H}function w(){if(0!==t.scrollHeight){var y=D(t),H=document.documentElement&&document.documentElement.scrollTop;t.style.height="";t.style.height=t.scrollHeight+U+"px";O=t.clientWidth;y.forEach(function(a){a.node.scrollTop=a.scrollTop});H&&(document.documentElement.scrollTop=H)}}function F(){w();var y=Math.round(parseFloat(t.style.height)),H=window.getComputedStyle(t,null),a="content-box"===H.boxSizing?Math.round(parseFloat(H.height)):t.offsetHeight;a<y?"hidden"===H.overflowY&&
(N("scroll"),w(),a="content-box"===H.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==H.overflowY&&(N("hidden"),w(),a="content-box"===H.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight);if(A!==a){A=a;y=G("autosize:resized");try{t.dispatchEvent(y)}catch(b){}}}if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!K.has(t)){var U=null,O=null,A=null,J=function(){t.clientWidth!==O&&F()},Q=function(y){window.removeEventListener("resize",
J,!1);t.removeEventListener("input",F,!1);t.removeEventListener("keyup",F,!1);t.removeEventListener("autosize:destroy",Q,!1);t.removeEventListener("autosize:update",F,!1);Object.keys(y).forEach(function(H){t.style[H]=y[H]});K._delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",Q,!1);"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",F,!1);window.addEventListener("resize",
J,!1);t.addEventListener("input",F,!1);t.addEventListener("autosize:update",F,!1);t.style.overflowX="hidden";t.style.wordWrap="break-word";K.set(t,{destroy:Q,update:F});(function(){var y=window.getComputedStyle(t,null);"vertical"===y.resize?t.style.resize="none":"both"===y.resize&&(t.style.resize="horizontal");U="content-box"===y.boxSizing?-(parseFloat(y.paddingTop)+parseFloat(y.paddingBottom)):parseFloat(y.borderTopWidth)+parseFloat(y.borderBottomWidth);isNaN(U)&&(U=0);F()})()}}function C(t){(t=
K.get(t))&&t.destroy()}function I(t){(t=K.get(t))&&t.update()}var K="function"===typeof Map?new Map:function(){var t=[],N=[];return{has:function(D){return-1<t.indexOf(D)},get:function(D){return N[t.indexOf(D)]},set:function(D,w){-1===t.indexOf(D)&&(t.push(D),N.push(w))},_delete:function(D){D=t.indexOf(D);-1<D&&(t.splice(D,1),N.splice(D,1))}}}(),G=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(t){G=function(N){var D=document.createEvent("Event");D.initEvent(N,!0,!1);return D}}u=
null;"undefined"===typeof window||"function"!==typeof window.getComputedStyle?(u=function(t){return t},u.destroy=function(t){return t},u.update=function(t){return t}):(u=function(t,N){t&&Array.prototype.forEach.call(t.length?t:[t],function(D){return x(D,N)});return t},u.destroy=function(t){t&&Array.prototype.forEach.call(t.length?t:[t],C);return t},u.update=function(t){t&&Array.prototype.forEach.call(t.length?t:[t],I);return t});e.exports=u});
(function(e){"function"===typeof define&&define.amd?define(["jquery"],e):"object"===typeof exports?module.exports=e:e(jQuery)})(function(e){function u(w){var F=w||window.event,U=K.call(arguments,1),O=0,A=0,J=0,Q=0;w=e.event.fix(F);w.type="mousewheel";"detail"in F&&(A=-1*F.detail);"wheelDelta"in F&&(A=F.wheelDelta);"wheelDeltaY"in F&&(A=F.wheelDeltaY);"wheelDeltaX"in F&&(O=-1*F.wheelDeltaX);"axis"in F&&F.axis===F.HORIZONTAL_AXIS&&(O=-1*A,A=0);var y=0===A?O:A;"deltaY"in F&&(y=A=-1*F.deltaY);"deltaX"in
F&&(O=F.deltaX,0===A&&(y=-1*O));if(0!==A||0!==O){if(1===F.deltaMode){var H=e.data(this,"mousewheel-line-height");y*=H;A*=H;O*=H}else 2===F.deltaMode&&(H=e.data(this,"mousewheel-page-height"),y*=H,A*=H,O*=H);H=Math.max(Math.abs(A),Math.abs(O));if(!t||H<t)t=H,D.settings.adjustOldDeltas&&"mousewheel"===F.type&&0===H%120&&(t/=40);D.settings.adjustOldDeltas&&"mousewheel"===F.type&&0===H%120&&(y/=40,O/=40,A/=40);y=Math[1<=y?"floor":"ceil"](y/t);O=Math[1<=O?"floor":"ceil"](O/t);A=Math[1<=A?"floor":"ceil"](A/
t);D.settings.normalizeOffset&&this.getBoundingClientRect&&(F=this.getBoundingClientRect(),J=w.clientX-F.left,Q=w.clientY-F.top);w.deltaX=O;w.deltaY=A;w.deltaFactor=t;w.offsetX=J;w.offsetY=Q;w.deltaMode=0;U.unshift(w,y,O,A);G&&clearTimeout(G);G=setTimeout(x,200);return(e.event.dispatch||e.event.handle).apply(this,U)}}function x(){t=null}var C=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],I="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],
K=Array.prototype.slice,G,t;if(e.event.fixHooks)for(var N=C.length;N;)e.event.fixHooks[C[--N]]=e.event.mouseHooks;var D=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var w=I.length;w;)this.addEventListener(I[--w],u,!1);else this.onmousewheel=u;e.data(this,"mousewheel-line-height",D.getLineHeight(this));e.data(this,"mousewheel-page-height",D.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var w=I.length;w;)this.removeEventListener(I[--w],
u,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height");e.removeData(this,"mousewheel-page-height")},getLineHeight:function(w){w=e(w);var F=w["offsetParent"in e.fn?"offsetParent":"parent"]();F.length||(F=e("body"));return parseInt(F.css("fontSize"),10)||parseInt(w.css("fontSize"),10)||16},getPageHeight:function(w){return e(w).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(w){return w?this.on("mousewheel",w):this.trigger("mousewheel")},
unmousewheel:function(w){return this.off("mousewheel",w)}})});
(function(e){function u(A,J){var Q=typeof A[J];return"function"===Q||!("object"!=Q||!A[J])||"unknown"==Q}function x(A,J){return!("object"!=typeof A[J]||!A[J])}function C(A,J,Q){0>J&&(J+=A.value.length);"undefined"==typeof Q&&(Q=J);0>Q&&(Q+=A.value.length);return{start:J,end:Q}}function I(){return x(document,"body")?document.body:document.getElementsByTagName("body")[0]}var K,G,t,N,D,w,F,U,O;e(document).ready(function(){function A(c,f){var g=c.value;c=K(c);var h=c.start;return{value:g.slice(0,h)+f+
g.slice(c.end),index:h,replaced:c.text}}function J(c,f){c.focus();var g=K(c);G(c,g.start,g.end);""==f?document.execCommand("delete",!1,null):document.execCommand("insertText",!1,f);return{replaced:g.text,index:g.start}}function Q(c,f){c.focus();f=A(c,f);c.value=f.value;return f}function y(c,f){return function(){var g=this.jquery?this[0]:this,h=g.nodeName.toLowerCase();if(1==g.nodeType&&("textarea"==h||"input"==h&&/^(?:text|email|number|search|tel|url|password)$/i.test(g.type))&&(g=[g].concat(Array.prototype.slice.call(arguments)),
g=c.apply(this,g),!f))return g;if(f)return this}}var H=document.createElement("textarea");I().appendChild(H);if("undefined"!=typeof H.selectionStart&&"undefined"!=typeof H.selectionEnd)K=function(c){var f=c.selectionStart,g=c.selectionEnd;return{start:f,end:g,length:g-f,text:c.value.slice(f,g)}},G=function(c,f,g){f=C(c,f,g);c.selectionStart=f.start;c.selectionEnd=f.end},O=function(c,f){f?c.selectionEnd=c.selectionStart:c.selectionStart=c.selectionEnd};else if(u(H,"createTextRange")&&x(document,"selection")&&
u(document.selection,"createRange")){K=function(c){var f=0,g=0,h;if((h=document.selection.createRange())&&h.parentElement()==c){var l=c.value.length;var k=c.value.replace(/\r\n/g,"\n");g=c.createTextRange();g.moveToBookmark(h.getBookmark());h=c.createTextRange();h.collapse(!1);-1<g.compareEndPoints("StartToEnd",h)?f=g=l:(f=-g.moveStart("character",-l),f+=k.slice(0,f).split("\n").length-1,-1<g.compareEndPoints("EndToEnd",h)?g=l:(g=-g.moveEnd("character",-l),g+=k.slice(0,g).split("\n").length-1))}return{start:f,
end:g,length:g-f,text:c.value.slice(f,g)}};var a=function(c,f){return f-(c.value.slice(0,f).split("\r\n").length-1)};G=function(c,f,g){f=C(c,f,g);g=c.createTextRange();var h=a(c,f.start);g.collapse(!0);f.start==f.end?g.move("character",h):(g.moveEnd("character",a(c,f.end)),g.moveStart("character",h));g.select()};O=function(c,f){c=document.selection.createRange();c.collapse(f);c.select()}}else{I().removeChild(H);window.console&&window.console.log&&window.console.log("RangyInputs not supported in your browser. Reason: No means of finding text input caret position");
return}I().removeChild(H);var b=function(c,f){var g=A(c,f);try{var h=J(c,f);if(c.value==g.value)return b=J,h}catch(l){}b=Q;c.value=g.value;return g};N=function(c,f,g,h){f!=g&&(G(c,f,g),b(c,""));h&&G(c,f)};t=function(c){G(c,b(c,"").index)};U=function(c){var f=b(c,"");G(c,f.index);return f.replaced};var d=function(c,f,g,h){var l=f+g.length;h="string"==typeof h?h.toLowerCase():"";if(("collapsetoend"==h||"select"==h)&&/[\r\n]/.test(g)){g=g.replace(/\r\n/g,"\n").replace(/\r/g,"\n");l=f+g.length;var k=
f+g.indexOf("\n");"\r\n"==c.value.slice(k,k+2)&&(l+=g.match(/\n/g).length)}switch(h){case "collapsetostart":G(c,f,f);break;case "collapsetoend":G(c,l,l);break;case "select":G(c,f,l)}};D=function(c,f,g,h){G(c,g);b(c,f);"boolean"==typeof h&&(h=h?"collapseToEnd":"");d(c,g,f,h)};w=function(c,f,g){var h=b(c,f);d(c,h.index,f,g||"collapseToEnd")};F=function(c,f,g,h){"undefined"==typeof g&&(g=f);var l=K(c);g=b(c,f+l.text+g);d(c,g.index+f.length,l.text,h||"select")};e.fn.extend({getSelection:y(K,!1),setSelection:y(G,
!0),collapseSelection:y(O,!0),deleteSelectedText:y(t,!0),deleteText:y(N,!0),extractSelectedText:y(U,!1),insertText:y(D,!0),replaceSelectedText:y(w,!0),surroundSelectedText:y(F,!0)})})})(jQuery);
(function(e){"function"===typeof define&&define.amd?define(["jquery","jquery-ui"],e):e(jQuery)})(function(e){function u(w,F){if(!(1<w.originalEvent.touches.length||e(w.target).is("input")||e(w.target).is("textarea"))){w.cancelable&&w.preventDefault();var U=w.originalEvent.changedTouches[0];F=new MouseEvent(F,{bubbles:!0,cancelable:!0,view:window,screenX:U.screenX,screenY:U.screenY,clientX:U.clientX,clientY:U.clientY});w.target.dispatchEvent(F)}}e.mspointer=window.navigator.msPointerEnabled;e.touch=
"ontouchstart"in document||"ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints;if((e.touch||e.mspointer)&&e.ui.mouse){var x=e.ui.mouse.prototype,C=x._mouseInit,I=x._mouseDestroy,K,G=0;x._touchStart=function(w){this._startedMove=w.timeStamp;this._startPos={x:w.originalEvent.changedTouches[0].pageX,y:w.originalEvent.changedTouches[0].pageY};!K&&this._mouseCapture(w.originalEvent.changedTouches[0])&&
(K=!0,this._touchMoved=!1,u(w,"mouseover"),u(w,"mousemove"),u(w,"mousedown"))};x._touchMove=function(w){K&&(this._touchMoved=!0,u(w,"mousemove"))};x._touchEnd=function(w){if(K){u(w,"mouseup");u(w,"mouseout");var F=w.timeStamp-this._startedMove;!this._touchMoved||500>F?(400>w.timeStamp-G?u(w,"dblclick"):u(w,"click"),G=w.timeStamp):(F=w.originalEvent.changedTouches[0].pageY,10>Math.abs(w.originalEvent.changedTouches[0].pageX-this._startPos.x)&&10>Math.abs(F-this._startPos.y)&&(this._touchMoved&&"stylus"!==
w.originalEvent.changedTouches[0].touchType||u(w,"click")));K=this._touchMoved=!1}};var t,N,D;x._mouseInit=function(){e.support.mspointer&&(this.element[0].style.msTouchAction="none");t=x._touchStart.bind(this);N=x._touchMove.bind(this);D=x._touchEnd.bind(this);this.element.on({touchstart:t,touchmove:N,touchend:D});C.call(this)};x._mouseDestroy=function(){this.element.off({touchstart:t,touchmove:N,touchend:D});I.call(this)}}});
(function(){$.fn.extend({focus:function(e){return function(u,x){return"number"===typeof u?this.each(function(){var C=this;setTimeout(function(){$(C).trigger("focus");x&&x.call(C)},u)}):e.apply(this,arguments)}}($.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(e+".ui-disableSelection",function(u){u.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")},zIndex:function(e){if(void 0!==
e)return this.css("zIndex",String(e));if(this.length){e=$(this[0]);for(var u;e.length&&e[0]!==document;){u=e.css("position");if("absolute"===u||"relative"===u||"fixed"===u)if(u=parseInt(e.css("zIndex"),10),!isNaN(u)&&0!==u)return u;e=e.parent()}}return 0}})})();
$.widget("ui.sortable",$.ui.sortable,{_setHandleClassName:function(){this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle");$.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})}});
(function(){$.ui.slider.prototype._trimAlignValue=function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var u=0<this.options.step?this.options.step:1;e=0<(e-this._valueMin())%u?Math.floor(e/u)*u:Math.ceil(e/u)*u;return e<=this._valueMin()?this._valueMin():e>=this._valueMax()?this._valueMax():parseFloat(e.toFixed(5))};$.ui.slider.prototype._calculateNewMax=function(){this.max=parseFloat(this.options.max.toFixed(this._precision()))}})();
(function(){var e=$.fn.remove;$.fn.remove=function(){arguments&&0!==arguments.length||$(this).trigger(new $.Event("remove"));return e.apply(this,arguments)}})();
(function(){$.ui.ddmanager.prepareOffsets=function(e,u){var x,C=$.ui.ddmanager.droppables[e.options.scope]||[],I=u?u.type:null,K=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();var G=0;a:for(;G<C.length;G++)if(!(C[G].options.disabled||e&&!C[G].accept.call(C[G].element[0],e.currentItem||e.element))){for(x=0;x<K.length;x++)if(K[x]===C[G].element[0]){C[G].proportions().height=0;continue a}C[G].visible="none"!==C[G].element.css("display");C[G].visible&&("mousedown"===I&&C[G]._activate.call(C[G],
u),C[G].offset=C[G].element.offset(),x=1,C[G].options.zoomFactor&&(x=C[G].options.zoomFactor.call()),C[G].proportions({width:C[G].element[0].offsetWidth*x,height:C[G].element[0].offsetHeight*x}))}}})();