lychee/dist/main.js

14 lines
435 KiB
JavaScript
Raw Normal View History

function _taggedTemplateLiteral(t,e){return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function gup(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e="[\\?&]"+t+"=([^&#]*)",i=new RegExp(e),n=i.exec(window.location.href);return null===n?"":n[1]}!function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";function i(t,e){e=e||it;var i=e.createElement("script");i.text=t,e.head.appendChild(i).parentNode.removeChild(i)}function n(t){var e=!!t&&"length"in t&&t.length,i=mt.type(t);return"function"!==i&&!mt.isWindow(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function s(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}function o(t,e,i){return mt.isFunction(e)?mt.grep(t,function(t,n){return!!e.call(t,n,t)!==i}):e.nodeType?mt.grep(t,function(t){return t===e!==i}):"string"!=typeof e?mt.grep(t,function(t){return rt.call(e,t)>-1!==i}):Dt.test(e)?mt.filter(e,t,i):(e=mt.filter(e,t),mt.grep(t,function(t){return rt.call(e,t)>-1!==i&&1===t.nodeType}))}function a(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function r(t){var e={};return mt.each(t.match(St)||[],function(t,i){e[i]=!0}),e}function l(t){return t}function c(t){throw t}function h(t,e,i,n){var s;try{t&&mt.isFunction(s=t.promise)?s.call(t).done(e).fail(i):t&&mt.isFunction(s=t.then)?s.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(t){i.apply(void 0,[t])}}function u(){it.removeEventListener("DOMContentLoaded",u),t.removeEventListener("load",u),mt.ready()}function d(){this.expando=mt.expando+d.uid++}function p(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Lt.test(t)?JSON.parse(t):t)}function f(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace($t,"-$&").toLowerCase(),"string"==typeof(i=t.getAttribute(n))){try{i=p(i)}catch(t){}Ht.set(t,e,i)}else i=void 0;return i}function m(t,e,i,n){var s,o=1,a=20,r=n?function(){return n.cur()}:function(){return mt.css(t,e,"")},l=r(),c=i&&i[3]||(mt.cssNumber[e]?"":"px"),h=(mt.cssNumber[e]||"px"!==c&&+l)&&Ft.exec(mt.css(t,e));if(h&&h[3]!==c){c=c||h[3],i=i||[],h=+l||1;do{o=o||".5",h/=o,mt.style(t,e,h+c)}while(o!==(o=r()/l)&&1!==o&&--a)}return i&&(h=+h||+l||0,s=i[1]?h+(i[1]+1)*i[2]:+i[2],n&&(n.unit=c,n.start=h,n.end=s)),s}function g(t){var e,i=t.ownerDocument,n=t.nodeName,s=Bt[n];return s||(e=i.body.appendChild(i.createElement(n)),s=mt.css(e,"display"),e.parentNode.removeChild(e),"none"===s&&(s="block"),Bt[n]=s,s)}function b(t,e){for(var i,n,s=[],o=0,a=t.length;o<a;o++)n=t[o],n.style&&(i=n.style.display,e?("none"===i&&(s[o]=Nt.get(n,"display")||null,s[o]||(n.style.display="")),""===n.style.display&&Rt(n)&&(s[o]=g(n))):"none"!==i&&(s[o]="none",Nt.set(n,"display",i)));for(o=0;o<a;o++)null!=s[o]&&(t[o].style.display=s[o]);return t}function v(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&s(t,e)?mt.merge([t],i):i}function _(t,e){for(var i=0,n=t.length;i<n;i++)Nt.set(t[i],"globalEval",!e||Nt.get(e[i],"globalEval"))}function y(t,e,i,n,s){for(var o,a,r,l,c,h,u=e.createDocumentFragment(),d=[],p=0,f=t.length;p<f;p++)if((o=t[p])||0===o)if("object"===mt.type(o))mt.merge(d,o.nodeType?[o]:o);else if(Xt.test(o)){for(a=a||u.appendChild(e.createElement("div")),r=(Yt.exec(o)||["",""])[1].toLowerCase(),l=Vt[r]||Vt._default,a.innerHTML=l[1]+mt.htmlPrefilter(o)+l[2],h=l[0];h--;)a=a.lastChild;mt.merge(d,a.childNodes),a=u.firstChild,a.textContent=""}else d.push(e.createTextNode(o));for(u.textContent="",p=0;o=d[p++];)if(n&&mt.inArray(o,n)>-1)s&&s.push(o);else if(c=mt.contains(o.ownerDocument,o),a=v(u.appendChild(o),"script"),c&&_(a),i)for(h=0;o=a[h++];)Kt.test(o.type||"")&&i.push(o);return u}function w(){return!0}function x(){return!1}function k(){try{return it.activeElement}catch(t){}}function C(t,e,i,n,s,o){var a,r;if("object"==typeof e){
;return i&&i.slice(1)===e.id},root:function(t){return t===A},focus:function(t){return t===j.activeElement&&(!j.hasFocus||j.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:r(!1),disabled:r(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!w.pseudos.empty(t)},header:function(t){return pt.test(t.nodeName)},input:function(t){return dt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:l(function(){return[0]}),last:l(function(t,e){return[e-1]}),eq:l(function(t,e,i){return[i<0?i+e:i]}),even:l(function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t}),odd:l(function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t}),lt:l(function(t,e,i){for(var n=i<0?i+e:i;--n>=0;)t.push(n);return t}),gt:l(function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t})}},w.pseudos.nth=w.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[_]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(_);for(_ in{submit:!0,reset:!0})w.pseudos[_]=function(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}(_);return h.prototype=w.filters=w.pseudos,w.setFilters=new h,C=e.tokenize=function(t,i){var n,s,o,a,r,l,c,h=q[t+" "];if(h)return i?0:h.slice(0);for(r=t,l=[],c=w.preFilter;r;){n&&!(s=at.exec(r))||(s&&(r=r.slice(s[0].length)||r),l.push(o=[])),n=!1,(s=rt.exec(r))&&(n=s.shift(),o.push({value:n,type:s[0].replace(ot," ")}),r=r.slice(n.length));for(a in w.filter)!(s=ut[a].exec(r))||c[a]&&!(s=c[a](s))||(n=s.shift(),o.push({value:n,type:a,matches:s}),r=r.slice(n.length));if(!n)break}return i?r.length:r?e.error(t):q(t,l).slice(0)},D=e.compile=function(t,e){var i,n=[],s=[],o=B[t+" "];if(!o){for(e||(e=C(t)),i=e.length;i--;)o=b(e[i]),o[$]?n.push(o):s.push(o);o=B(t,v(s,n)),o.selector=t}return o},T=e.select=function(t,e,i,n){var s,o,a,r,l,h="function"==typeof t&&t,d=!n&&C(t=h.selector||t);if(i=i||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===e.nodeType&&E&&w.relative[o[1].type]){if(!(e=(w.find.ID(a.matches[0].replace(bt,vt),e)||[])[0]))return i;h&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(s=ut.needsContext.test(t)?0:o.length;s--&&(a=o[s],!w.relative[r=a.type]);)if((l=w.find[r])&&(n=l(a.matches[0].replace(bt,vt),gt.test(o[0].type)&&c(e.parentNode)||e))){if(o.splice(s,1),!(t=n.length&&u(o)))return G.apply(i,n),i;break}}return(h||D(t,d))(n,e,!E,i,!e||gt.test(t)&&c(e.parentNode)||e),i},y.sortStable=$.split("").sort(U).join("")===$,y.detectDuplicates=!!P,S(),y.sortDetached=s(function(t){return 1&t.compareDocumentPosition(j.createElement("fieldset"))}),s(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),y.attributes&&s(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),s(function(t){return null==t.getAttribute("disabled")})||o(J,function(t,e,i){var n;if(!i)return!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),e}(t);mt.find=yt,mt.expr=yt.selectors,mt.expr[":"]=mt.expr.pseudos,mt.uniqueSort=mt.unique=yt.uniqueSort,mt.text=yt.getText,mt.isXMLDoc=yt.isXML,mt.contains=yt.contains,mt.escapeSelector=yt.escape;var wt=function(t,e,i){for(var n=[],s=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(s&&mt(t).is(i))break;n.push(t)}return n},xt=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==
e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,s=null!=t&&t+"queueHooks",o=mt.timers,a=Nt.get(this);if(s)a[s]&&a[s].stop&&n(a[s]);else for(s in a)a[s]&&a[s].stop&&be.test(s)&&n(a[s]);for(s=o.length;s--;)o[s].elem!==this||null!=t&&o[s].queue!==t||(o[s].anim.stop(i),e=!1,o.splice(s,1));!e&&i||mt.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,i=Nt.get(this),n=i[t+"queue"],s=i[t+"queueHooks"],o=mt.timers,a=n?n.length:0;for(i.finish=!0,mt.queue(this,t,[]),s&&s.stop&&s.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),mt.each(["toggle","show","hide"],function(t,e){var i=mt.fn[e];mt.fn[e]=function(t,n,s){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(R(e,!0),t,n,s)}}),mt.each({slideDown:R("show"),slideUp:R("hide"),slideToggle:R("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){mt.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),mt.timers=[],mt.fx.tick=function(){var t,e=0,i=mt.timers;for(fe=mt.now();e<i.length;e++)(t=i[e])()||i[e]!==t||i.splice(e--,1);i.length||mt.fx.stop(),fe=void 0},mt.fx.timer=function(t){mt.timers.push(t),mt.fx.start()},mt.fx.interval=13,mt.fx.start=function(){me||(me=!0,F())},mt.fx.stop=function(){me=null},mt.fx.speeds={slow:600,fast:200,_default:400},mt.fn.delay=function(e,i){return e=mt.fx?mt.fx.speeds[e]||e:e,i=i||"fx",this.queue(i,function(i,n){var s=t.setTimeout(i,e);n.stop=function(){t.clearTimeout(s)}})},function(){var t=it.createElement("input"),e=it.createElement("select"),i=e.appendChild(it.createElement("option"));t.type="checkbox",pt.checkOn=""!==t.value,pt.optSelected=i.selected,t=it.createElement("input"),t.value="t",t.type="radio",pt.radioValue="t"===t.value}();var ve,_e=mt.expr.attrHandle;mt.fn.extend({attr:function(t,e){return Et(this,mt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){mt.removeAttr(this,t)})}}),mt.extend({attr:function(t,e,i){var n,s,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?mt.prop(t,e,i):(1===o&&mt.isXMLDoc(t)||(s=mt.attrHooks[e.toLowerCase()]||(mt.expr.match.bool.test(e)?ve:void 0)),void 0!==i?null===i?void mt.removeAttr(t,e):s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:(t.setAttribute(e,i+""),i):s&&"get"in s&&null!==(n=s.get(t,e))?n:(n=mt.find.attr(t,e),null==n?void 0:n))},attrHooks:{type:{set:function(t,e){if(!pt.radioValue&&"radio"===e&&s(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,s=e&&e.match(St);if(s&&1===t.nodeType)for(;i=s[n++];)t.removeAttribute(i)}}),ve={set:function(t,e,i){return!1===e?mt.removeAttr(t,i):t.setAttribute(i,i),i}},mt.each(mt.expr.match.bool.source.match(/\w+/g),function(t,e){var i=_e[e]||mt.find.attr;_e[e]=function(t,e,n){var s,o,a=e.toLowerCase();return n||(o=_e[a],_e[a]=s,s=null!=i(t,e,n)?a:null,_e[a]=o),s}});var ye=/^(?:input|select|textarea|button)$/i,we=/^(?:a|area)$/i;mt.fn.extend({prop:function(t,e){return Et(this,mt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[mt.propFix[t]||t]})}}),mt.extend({prop:function(t,e,i){var n,s,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&mt.isXMLDoc(t)||(e=mt.propFix[e]||e,s=mt.propHooks[e]),void 0!==i?s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:t[e]=i:s&&"get"in s&&null!==(n=s.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=mt.find.attr(t,"tabindex");return e?parseInt(e,10):ye.test(t.nodeName)||we.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),pt.optSelected||(mt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),mt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){mt.pro
classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(n,s){-1!==t.inArray(e.target,s)&&(i.classesElementLookup[n]=t(s.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){n="boolean"==typeof n?n:i;var s="string"==typeof t||null===t,o={extra:s?e:i,keys:s?t:e,element:s?this.element:t,add:n};return o.element.toggleClass(this._classes(o),n),this},_on:function(e,i,n){var s,o=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=s=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),t.each(n,function(n,a){function r(){return e||!0!==o.options.disabled&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+o.eventNamespace,h=l[2];h?s.on(c,h,r):i.on(c,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?n[t]:t).apply(n,arguments)}var n=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,n){var s,o,a=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(s in o)s in i||(i[s]=o[s]);return this.element.trigger(i,n),!(t.isFunction(a)&&!1===a.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,s,o){"string"==typeof s&&(s={effect:s});var a,r=s?!0===s||"number"==typeof s?i:s.effect||i:e;s=s||{},"number"==typeof s&&(s={duration:s}),a=!t.isEmptyObject(s),s.complete=o,s.delay&&n.delay(s.delay),a&&t.effects&&t.effects.effect[r]?n[e](s):r!==e&&n[r]?n[r](s.duration,s.easing,o):n.queue(function(i){t(this)[e](),o&&o.call(n[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var s,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==s)return s;var e,i,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),e=o.offsetWidth,n.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=n[0].clientWidth),n.remove(),s=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),s="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,
t.effects.define("pulsate","show",function(e,i){var n=t(this),s=e.mode,o="show"===s,a="hide"===s,r=o||a,l=2*(e.times||5)+(r?1:0),c=e.duration/l,h=0,u=1,d=n.queue().length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),h=1);l>u;u++)n.animate({opacity:h},c,e.easing),h=1-h;n.animate({opacity:h},c,e.easing),n.queue(i),t.effects.unshift(n,d,l+1)}),t.effects.define("shake",function(e,i){var n=1,s=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,l=2*r+1,c=Math.round(e.duration/l),h="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},m=s.queue().length;for(t.effects.createPlaceholder(s),d[h]=(u?"-=":"+=")+a,p[h]=(u?"+=":"-=")+2*a,f[h]=(u?"-=":"+=")+2*a,s.animate(d,c,e.easing);r>n;n++)s.animate(p,c,e.easing).animate(f,c,e.easing);s.animate(p,c,e.easing).animate(d,c/2,e.easing).queue(i),t.effects.unshift(s,m,l+1)}),t.effects.define("slide","show",function(e,i){var n,s,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,l=e.direction||"left",c="up"===l||"down"===l?"top":"left",h="up"===l||"left"===l,u=e.distance||o["top"===c?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),n=o.cssClip(),s=o.position()[c],d[c]=(h?-1:1)*u+s,d.clip=o.cssClip(),d.clip[a[l][1]]=d.clip[a[l][0]],"show"===r&&(o.cssClip(d.clip),o.css(c,d[c]),d.clip=n,d[c]=s),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});!1!==t.uiBackCompat&&t.effects.define("transfer",function(e,i){t(this).transfer(e,i)}),t.ui.focusable=function(i,n){var s,o,a,r,l,c=i.nodeName.toLowerCase();return"area"===c?(s=i.parentNode,o=s.name,!(!i.href||!o||"map"!==s.nodeName.toLowerCase())&&(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(c)?(r=!i.disabled)&&(l=t(i).closest("fieldset")[0])&&(r=!l.disabled):r="a"===c?i.href||n:n,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function n(e,i,n,o){return t.each(s,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var s="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,n(this,e)+"px")})},t.fn["outer"+i]=function(e,s){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,n(this,e,!0,s)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,n,s,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(s=this.eq(0).parents("label"),n=this.attr("id"),n&&(e=this.e
;return s?"controlgroupLabel"===n?(o=e.element.find(s),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),void(i=i.concat(o.get()))):void(t.fn[n]&&(a=e["_"+n+"Options"]?e["_"+n+"Options"]("middle"):{classes:{}},e.element.find(s).each(function(){var s=t(this),o=s[n]("instance"),r=t.widget.extend({},a);if("button"!==n||!s.parent(".ui-spinner").length){o||(o=s[n]()[n]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),s[n](r);var l=s[n]("widget");t.data(l[0],"ui-controlgroup-data",o||s[n]("instance")),i.push(l[0])}}))):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),n=i.data("ui-controlgroup-data");n&&n[e]&&n[e]()})},_updateCornerClass:function(t,e){var i=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,i)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,n={classes:{}};return n.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],n},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var n={};return t.each(e,function(s){var o=i.options.classes[s]||"";o=t.trim(o.replace(f,"")),n[s]=(o+" "+e[s]).replace(/\s+/g," ")}),n},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?void this._callChildMethod(e?"disable":"enable"):void this.refresh()},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,n){var s=e[n]().data("ui-controlgroup-data");if(s&&i["_"+s.widgetName+"Options"]){var o=i["_"+s.widgetName+"Options"](1===e.length?"only":n);o.classes=i._resolveClassesValues(o.classes,s),s.element[s.widgetName](o)}else i._updateCornerClass(e[n](),n)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,n=this,s=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){n.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(s.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(s.disabled=e),s},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabl
;case"m":u+=c("m",e.getMonth()+1,2);break;case"M":u+=h("M",e.getMonth(),a,r);break;case"y":u+=l("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(n)}return u},_possibleChars:function(t){var e,i="",n=!1,s=function(i){var n=t.length>e+1&&t.charAt(e+1)===i;return n&&e++,n};for(e=0;t.length>e;e++)if(n)"'"!==t.charAt(e)||s("'")?i+=t.charAt(e):n=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":n=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),n=t.lastVal=t.input?t.input.val():null,s=this._getDefaultDate(t),o=s,a=this._getFormatConfig(t);try{o=this.parseDate(i,n,a)||s}catch(t){n=e?"":n}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=n?o.getDate():0,t.currentMonth=n?o.getMonth():0,t.currentYear=n?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,n){var s=null==i||""===i?n:"string"==typeof i?function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(t){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,s=n.getFullYear(),o=n.getMonth(),a=n.getDate(),r=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=r.exec(i);l;){switch(l[2]||"d"){case"d":case"D":a+=parseInt(l[1],10);break;case"w":case"W":a+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(s,o));break;case"y":case"Y":s+=parseInt(l[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(s,o))}l=r.exec(i)}return new Date(s,o,a)}(i):"number"==typeof i?isNaN(i)?n:function(t){var e=new Date;return e.setDate(e.getDate()+t),e}(i):new Date(i.getTime());return s=s&&"Invalid Date"==""+s?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,s=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),s===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,s,o,a,r,l,c,h,u,d,p,f,m,g,b,v,_,y,w,x,k,C,D,T,M,I,P,S,j,A,E,O,N,H,L,$,z,F=new Date,W=this._daylightSavingAdjust(new Date(F.getFullYear(),F.getMonth(),F.getDate())),R=this._get(t,"isRTL"),q=this._get(t,"showButtonPanel"),B=this._get(t,"hideIfNoPrevNext"),U=this._get(t,"navigationAsDateFormat"),Y=this._getNumberOfMonths(t),K=this._get(t,"showCurrentAtPos"),V=this._g
s.axis&&"y"===s.axis||(n.overflowOffset.left+a.offsetWidth-e.pageX<s.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+s.scrollSpeed:e.pageX-n.overflowOffset.left<s.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(r).scrollTop()<s.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<s.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(r).scrollLeft()<s.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<s.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+s.scrollSpeed)))),!1!==o&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(n,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,n){var s=n.options;n.snapElements=[],t(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var e=t(this),i=e.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,n){var s,o,a,r,l,c,h,u,d,p,f=n.options,m=f.snapTolerance,g=i.offset.left,b=g+n.helperProportions.width,v=i.offset.top,_=v+n.helperProportions.height;for(d=n.snapElements.length-1;d>=0;d--)l=n.snapElements[d].left-n.margins.left,c=l+n.snapElements[d].width,h=n.snapElements[d].top-n.margins.top,u=h+n.snapElements[d].height,l-m>b||g>c+m||h-m>_||v>u+m||!t.contains(n.snapElements[d].item.ownerDocument,n.snapElements[d].item)?(n.snapElements[d].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(s=m>=Math.abs(h-_),o=m>=Math.abs(u-v),a=m>=Math.abs(l-b),r=m>=Math.abs(c-g),s&&(i.position.top=n._convertPositionTo("relative",{top:h-n.helperProportions.height,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:c}).left)),p=s||o||a||r,"outer"!==f.snapMode&&(s=m>=Math.abs(h-v),o=m>=Math.abs(u-_),a=m>=Math.abs(l-g),r=m>=Math.abs(c-b),s&&(i.position.top=n._convertPositionTo("relative",{top:h,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:c-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(s||o||a||r||p)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=s||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,n){var s,o=n.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(s=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",s+e)}),this.css("zIndex",s+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,n){var s=t(i.helper),o=n.options;s.css("zIndex")&&(o._zIndex=s.css("zIndex")),s.css("zIndex",o.zIndex)},stop:function(e,i,n){var s=n.options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return e[n]>0||(e[n]
"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length||!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==t.uiBackCompat&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(n)?n:function(t){return t.is(n)},this.proportions=function(){return arguments.length?void(e=arguments[0]):e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight})},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var n=t.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var n=i||t.ui.ddmanager.current,s=!1;return!(!n||(n.currentItem||n.element)[0]===thi
h["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[c?"animate":"css"](h,r.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[c?"animate":"css"]({left:i+"%"},r.animate),1===n&&l.range[c?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===n&&l.range.stop(1,1)[c?"animate":"css"]({bottom:i+"%"},r.animate),1===n&&l.range[c?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(n=this.value(),s=this._valueMin(),o=this._valueMax(),i=o!==s?(n-s)/(o-s)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[c?"animate":"css"](h,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,n,s,o=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,o)))return}switch(s=this.options.step,i=n=this._hasMultipleValues()?this.values(o):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;n=this._trimAlignValue(i+s);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;n=this._trimAlignValue(i-s)}this._slide(e,o,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var n=null,s=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(n=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(n=
s=this.buttons.last().find(".ui-icon"),this._removeClass(s,null,this.options.icons.down),this._addClass(s,null,e.down)),void this._super(t,e))},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void r(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),!1!==t.uiBackCompat&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,n;i=e.href.replace(t,""),n=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(t){}try{n=decodeURIComponent(n)}catch(t){}return e.hash.length>1&&i===n}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=!1!==this.options.active&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===e&&(n&&this.tabs.each(function(i,s){return t(s).attr("aria-controls")===n?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=!!this.tabs.length&&0)),!1!==e&&-1===(e=this.tabs.index(this.tabs.eq(e)))&&(e=!i&&0),!i&&!1===e&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),n=this.tabs.index(i),s=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:s=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.u
;this.classList.add("basicModal__button--active"),t.buttons.action.fn(l())}),o(s("input",!0),function(t){t.oninput=t.onblur=function(){this.classList.remove("error")}}),o(s("select",!0),function(t){t.onchange=t.onblur=function(){this.classList.remove("error")}}),!0},h=(i.show=function t(e){if(!1===a(e))return!1;if(null!=s())return d(!0),setTimeout(function(){return t(e)},301),!1;n=document.activeElement;var i=r(e);document.body.insertAdjacentHTML("beforeend",i),c(e);var o=s("input");null!=o&&o.select();var l=s("select");return null==o&&null!=l&&l.focus(),null!=e.callback&&e.callback(e),!0},i.error=function(t){u();var e=s("input[name='"+t+"']")||s("select[name='"+t+"']");if(null==e)return!1;e.classList.add("error"),"function"==typeof e.select?e.select():e.focus(),s().classList.remove("basicModal--fadeIn","basicModal--shake"),setTimeout(function(){return s().classList.add("basicModal--shake")},1)},i.visible=function(){return null!=s()}),u=(i.action=function(){var t=s("#basicModal__action");return null!=t&&(t.click(),!0)},i.cancel=function(){var t=s("#basicModal__cancel");return null!=t&&(t.click(),!0)},i.reset=function(){var t=s(".basicModal__button",!0);o(t,function(t){return t.classList.remove("basicModal__button--active")});var e=s("input",!0);o(e,function(t){return t.classList.remove("error")});var i=s("select",!0);return o(i,function(t){return t.classList.remove("error")}),!0}),d=i.close=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!1===h())return!1;var e=s().parentElement;return("false"!==e.getAttribute("data-closable")||!1!==t)&&(e.classList.remove("basicModalContainer--fadeIn"),e.classList.add("basicModalContainer--fadeOut"),setTimeout(function(){return null!=e&&null!=e.parentElement&&void e.parentElement.removeChild(e)},300),null!=n&&(n.focus(),n=null),!0)}},{}]},{},[1])(1)});var _templateObject=_taggedTemplateLiteral(["<p>Are you sure you want to delete the album '$","' and all of the photos it contains? This action can't be undone!</p>"],["<p>Are you sure you want to delete the album '$","' and all of the photos it contains? This action can't be undone!</p>"]),_templateObject2=_taggedTemplateLiteral(["<p>Are you sure you want to delete all $"," selected albums and all of the photos they contain? This action can't be undone!</p>"],["<p>Are you sure you want to delete all $"," selected albums and all of the photos they contain? This action can't be undone!</p>"]),_templateObject3=_taggedTemplateLiteral(["<input class='text' name='title' type='text' maxlength='50' placeholder='Title' value='$","'>"],["<input class='text' name='title' type='text' maxlength='50' placeholder='Title' value='$","'>"]),_templateObject4=_taggedTemplateLiteral(["<p>Enter a new title for this album: ","</p>"],["<p>Enter a new title for this album: ","</p>"]),_templateObject5=_taggedTemplateLiteral(["<p>Enter a title for all $"," selected albums: ","</p>"],["<p>Enter a title for all $"," selected albums: ","</p>"]),_templateObject6=_taggedTemplateLiteral(["<p>Please enter a description for this album: <input class='text' name='description' type='text' maxlength='800' placeholder='Description' value='$","'></p>"],["<p>Please enter a description for this album: <input class='text' name='description' type='text' maxlength='800' placeholder='Description' value='$","'></p>"]),_templateObject7=_taggedTemplateLiteral(["<p>Are you sure you want to merge the album '$","' into the album '$","'?</p>"],["<p>Are you sure you want to merge the album '$","' into the album '$","'?</p>"]),_templateObject8=_taggedTemplateLiteral(["<p>Are you sure you want to merge all selected albums into the album '$","'?</p>"],["<p>Are you sure you want to merge all selected albums into the album '$","'?</p>"]),_templateObject9=_taggedTemplateLiteral(["<svg class='iconic $","'><use xlink:href='#$","' /></svg>"],["<svg class='iconic $","'><use xlink:href='#$","' /></svg>"]),_templateObject10=_taggedTemplateLiteral(["<div class='divider'><h1>$","</h1></div>"],["<div class='divider'><h1>$","</h1></div>"]),_templateObject11=_taggedTemplateLiteral
fn:function(){basicContext.close(),contextMenu.mergeAlbum(t,e)}},{title:build.iconic("trash")+"Delete",fn:function(){return album.delete([t])}}];$('.album[data-id="'+t+'"]').addClass("active"),basicContext.show(n,e.originalEvent,contextMenu.close)},contextMenu.albumMulti=function(t,e){multiselect.stopResize();var i=t.length>1,n=albums.json&&albums.json.albums&&Object.keys(albums.json.albums).length>1,s=[{title:build.iconic("pencil")+"Rename All",fn:function(){return album.setTitle(t)}},{title:build.iconic("collapse-left")+"Merge All",visible:n&&i,fn:function(){return album.merge(t)}},{title:build.iconic("collapse-left")+"Merge",visible:n&&!i,fn:function(){basicContext.close(),contextMenu.mergeAlbum(t[0],e)}},{title:build.iconic("trash")+"Delete All",fn:function(){return album.delete(t)}}];s.push(),basicContext.show(s,e.originalEvent,contextMenu.close)},contextMenu.albumTitle=function(t,e){api.post("Albums::get",{},function(i){var n=[];i.albums&&i.num>1&&($.each(i.albums,function(){var e=this;this.thumbs[0]||(this.thumbs[0]="src/images/no_cover.svg"),""===this.title&&(this.title="Untitled");var i=lychee.html(_templateObject24,this.thumbs[0],this.title);this.id!=t&&n.push({title:i,fn:function(){return lychee.goto(e.id)}})}),n.unshift({})),n.unshift({title:build.iconic("pencil")+"Rename",fn:function(){return album.setTitle([t])}}),basicContext.show(n,e.originalEvent,contextMenu.close)})},contextMenu.mergeAlbum=function(t,e){api.post("Albums::get",{},function(i){var n=[];if(i.albums&&i.num>1&&$.each(i.albums,function(){var e=this;this.thumbs[0]||(this.thumbs[0]="src/images/no_cover.svg"),""===this.title&&(this.title="Untitled");var i=lychee.html(_templateObject24,this.thumbs[0],this.title);this.id!=t&&n.push({title:i,fn:function(){return album.merge([t,e.id])}})}),0===n.length)return!1;basicContext.show(n,e.originalEvent,contextMenu.close)})},contextMenu.photo=function(t,e){var i=[{title:build.iconic("star")+"Star",fn:function(){return photo.setStar([t])}},{title:build.iconic("tag")+"Tags",fn:function(){return photo.editTags([t])}},{},{title:build.iconic("pencil")+"Rename",fn:function(){return photo.setTitle([t])}},{title:build.iconic("layers")+"Duplicate",fn:function(){return photo.duplicate([t])}},{title:build.iconic("folder")+"Move",fn:function(){basicContext.close(),contextMenu.move([t],e)}},{title:build.iconic("trash")+"Delete",fn:function(){return photo.delete([t])}}];$('.photo[data-id="'+t+'"]').addClass("active"),basicContext.show(i,e.originalEvent,contextMenu.close)},contextMenu.photoMulti=function(t,e){multiselect.stopResize();var i=[{title:build.iconic("star")+"Star All",fn:function(){return photo.setStar(t)}},{title:build.iconic("tag")+"Tag All",fn:function(){return photo.editTags(t)}},{},{title:build.iconic("pencil")+"Rename All",fn:function(){return photo.setTitle(t)}},{title:build.iconic("layers")+"Duplicate All",fn:function(){return photo.duplicate(t)}},{title:build.iconic("folder")+"Move All",fn:function(){basicContext.close(),contextMenu.move(t,e)}},{title:build.iconic("trash")+"Delete All",fn:function(){return photo.delete(t)}}];basicContext.show(i,e.originalEvent,contextMenu.close)},contextMenu.photoTitle=function(t,e,i){var n=[{title:build.iconic("pencil")+"Rename",fn:function(){return photo.setTitle([e])}}],s=album.json;!1!==s.content&&s.num>1&&(n.push({}),$.each(s.content,function(i){var s=this;""===this.title&&(this.title="Untitled");var o=lychee.html(_templateObject24,this.thumbUrl,this.title);this.id!=e&&n.push({title:o,fn:function(){return lychee.goto(t+"/"+s.id)}})})),basicContext.show(n,i.originalEvent,contextMenu.close)},contextMenu.photoMore=function(t,e){var i=!1===lychee.publicMode||album.json&&album.json.downloadable&&"1"===album.json.downloadable&&!0===lychee.publicMode,n=[{title:build.iconic("fullscreen-enter")+"Full Photo",fn:function(){return window.open(photo.getDirectLink())}},{title:build.iconic("cloud-download")+"Download",visible:i,fn:function(){return photo.getArchive(t)}}];basicContext.show(n,e.originalEvent)},contextMenu.move=function(t,e){var i=[];api.post("Albums::get",{},func
n=album.json.content[e].tags===album.json.content[t[0]].tags&&!0===n}),!0===n&&(e=album.json.content[t[0]].tags)}e=e.replace(/,/g,", ");var s=function(e){basicModal.close(),photo.setTags(t,e.tags)},o=lychee.html(_templateObject32,e);i=1===t.length?lychee.html(_templateObject33,o):lychee.html(_templateObject34,t.length,o),basicModal.show({body:i,buttons:{action:{title:"Set Tags",fn:s},cancel:{title:"Cancel",fn:basicModal.close}}})},photo.setTags=function(t,e){if(!t)return!1;t instanceof Array==!1&&(t=[t]),e=e.replace(/(\ ,\ )|(\ ,)|(,\ )|(,{1,}\ {0,})|(,$|^,)/g,","),e=e.replace(/,$|^,|(\ ){0,}$/g,""),visible.photo()&&(photo.json.tags=e,view.photo.tags()),t.forEach(function(t,i,n){album.json.content[t].tags=e});var i={photoIDs:t.join(),tags:e};api.post("Photo::setTags",i,function(t){!0!==t&&lychee.error(null,i,t)})},photo.deleteTag=function(t,e){var i=void 0;i=photo.json.tags.split(","),i.splice(e,1),photo.json.tags=i.toString(),photo.setTags([t],photo.json.tags)},photo.share=function(t,e){var i=photo.getViewLink(t);switch(e){case"twitter":window.open("https://twitter.com/share?url="+encodeURI(i));break;case"facebook":window.open("http://www.facebook.com/sharer.php?u="+encodeURI(i)+"&t="+encodeURI(photo.json.title));break;case"mail":location.href="mailto:?subject="+encodeURI(photo.json.title)+"&body="+encodeURI(i);break;case"dropbox":lychee.loadDropbox(function(){var t=photo.json.title+"."+photo.getDirectLink().split(".").pop();Dropbox.save(photo.getDirectLink(),t)})}},photo.getArchive=function(t){var e=void 0,i=api.path+"?function=Photo::getArchive&photoID="+t;e=location.href.indexOf("index.html")>0?location.href.replace(location.hash,"").replace("index.html",i):location.href.replace(location.hash,"")+i,!0===lychee.publicMode&&(e+="&password="+encodeURIComponent(password.value)),location.href=e},photo.getDirectLink=function(){var t="";return photo.json&&photo.json.url&&""!==photo.json.url&&(t=photo.json.url),t},photo.getViewLink=function(t){var e="view.php?p="+t;return location.href.indexOf("index.html")>0?location.href.replace("index.html"+location.hash,e):location.href.replace(location.hash,e)},search={hash:null},search.find=function(t){clearTimeout($(window).data("timeout")),$(window).data("timeout",setTimeout(function(){0!==header.dom(".header__search").val().length?api.post("search",{term:t},function(t){var e="",i="",n="";t&&t.albums&&(albums.json={albums:t.albums},$.each(albums.json.albums,function(){albums.parse(this),i+=build.album(this)})),t&&t.photos&&(album.json={content:t.photos},$.each(album.json.content,function(){n+=build.photo(this)})),e=""===i&&""===n?"error":""===i?build.divider("Photos")+n:""===n?build.divider("Albums")+i:build.divider("Albums")+i+build.divider("Photos")+n,search.hash!==t.hash&&($(".no_content").remove(),lychee.animate(".content","contentZoomOut"),search.hash=t.hash,setTimeout(function(){"error"===e?(lychee.content.html(""),$("body").append(build.no_content("magnifying-glass"))):(lychee.content.html(e),lychee.animate(lychee.content,"contentZoomIn"))},300))}):search.reset()},250))},search.reset=function(){header.dom(".header__search").val(""),$(".no_content").remove(),null!=search.hash&&(albums.json=null,album.json=null,photo.json=null,search.hash=null,lychee.animate(".divider","fadeOut"),lychee.goto())},settings={},settings.createConfig=function(){var t=function(t){var e=t.dbName||"",i=t.dbUser||"",n=t.dbPassword||"",s=t.dbHost||"",o=t.dbTablePrefix||"";if(i.length<1)return basicModal.error("dbUser"),!1;s.length<1&&(s="localhost"),e.length<1&&(e="lychee");var a={dbName:e,dbUser:i,dbPassword:n,dbHost:s,dbTablePrefix:o};api.post("Config::create",a,function(t){if(!0!==t)return"Warning: Connection failed!"===t?(basicModal.show({body:"<p>Unable to connect to host database because access was denied. Double-check your host, username and password and ensure that access from your current location is permitted.</p>",buttons:{action:{title:"Retry",fn:settings.createConfig}}}),!1):"Warning: Creation failed!"===t?(basicModal.show({body:"<p>Unable to create the database. Double-check your host, user