diff --git a/assets/js/lychee.js b/assets/js/lychee.js index 37dce9a..aa88220 100644 --- a/assets/js/lychee.js +++ b/assets/js/lychee.js @@ -119,13 +119,22 @@ var lychee = { params = "login&user=" + user + "&password=" + password; lychee.api(params, function(data) { + if (data===true) { - localStorage.setItem("lychee_username", user); + + // Use 'try' to catch a thrown error when Safari is in private mode + try { localStorage.setItem("lychee_username", user); } + window.location.reload(); + } else { + + // Show error and reactive button $("#password").val("").addClass("error").focus(); $(".message .button.active").removeClass("pressed"); + } + }); }, diff --git a/assets/min/main.js b/assets/min/main.js index 8fd0743..040c044 100644 --- a/assets/min/main.js +++ b/assets/min/main.js @@ -2,5 +2,5 @@ function mobileBrowser(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test }))},J.fn.extend({find:function(e){var t,n=this.length,o=[],i=this;if("string"!=typeof e)return this.pushStack(J(e).filter(function(){for(t=0;n>t;t++)if(J.contains(i[t],this))return!0}));for(t=0;n>t;t++)J.find(e,i[t],o);return o=this.pushStack(n>1?J.unique(o):o),o.selector=this.selector?this.selector+" "+e:e,o},filter:function(e){return this.pushStack(o(this,e||[],!1))},not:function(e){return this.pushStack(o(this,e||[],!0))},is:function(e){return!!o(this,"string"==typeof e&&at.test(e)?J(e):e||[],!1).length}});var lt,ut=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ct=J.fn.init=function(e,t){var n,o;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ut.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||lt).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof J?t[0]:t,J.merge(this,J.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:Q,!0)),rt.test(n[1])&&J.isPlainObject(t))for(n in t)J.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return o=Q.getElementById(n[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=Q,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):J.isFunction(e)?"undefined"!=typeof lt.ready?lt.ready(e):e(J):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),J.makeArray(e,this))};ct.prototype=J.fn,lt=J(Q);var dt=/^(?:parents|prev(?:Until|All))/,pt={children:!0,contents:!0,next:!0,prev:!0};J.extend({dir:function(e,t,n){for(var o=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&J(e).is(n))break;o.push(e)}return o},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),J.fn.extend({has:function(e){var t=J(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(J.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,o=0,i=this.length,a=[],r=at.test(e)||"string"!=typeof e?J(e,t||this.context):0;i>o;o++)for(n=this[o];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(r?r.index(n)>-1:1===n.nodeType&&J.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?J.unique(a):a)},index:function(e){return e?"string"==typeof e?z.call(J(e),this[0]):z.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(J.unique(J.merge(this.get(),J(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),J.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return J.dir(e,"parentNode")},parentsUntil:function(e,t,n){return J.dir(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return J.dir(e,"nextSibling")},prevAll:function(e){return J.dir(e,"previousSibling")},nextUntil:function(e,t,n){return J.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return J.dir(e,"previousSibling",n)},siblings:function(e){return J.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return J.sibling(e.firstChild)},contents:function(e){return e.contentDocument||J.merge([],e.childNodes)}},function(e,t){J.fn[e]=function(n,o){var i=J.map(this,t,n);return"Until"!==e.slice(-5)&&(o=n),o&&"string"==typeof o&&(i=J.filter(o,i)),this.length>1&&(pt[e]||J.unique(i),dt.test(e)&&i.reverse()),this.pushStack(i)}});var ht=/\S+/g,ft={};J.Callbacks=function(e){e="string"==typeof e?ft[e]||a(e):J.extend({},e);var t,n,o,i,r,s,l=[],u=!e.once&&[],c=function(a){for(t=e.memory&&a,n=!0,s=i||0,i=0,r=l.length,o=!0;l&&r>s;s++)if(l[s].apply(a[0],a[1])===!1&&e.stopOnFalse){t=!1;break}o=!1,l&&(u?u.length&&c(u.shift()):t?l=[]:d.disable())},d={add:function(){if(l){var n=l.length;!function a(t){J.each(t,function(t,n){var o=J.type(n);"function"===o?e.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!==o&&a(n)})}(arguments),o?r=l.length:t&&(i=n,c(t))}return this},remove:function(){return l&&J.each(arguments,function(e,t){for(var n;(n=J.inArray(t,l,n))>-1;)l.splice(n,1),o&&(r>=n&&r--,s>=n&&s--)}),this},has:function(e){return e?J.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],r=0,this},disable:function(){return l=u=t=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,t||d.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||n&&!u||(t=t||[],t=[e,t.slice?t.slice():t],o?u.push(t):c(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!n}};return d},J.extend({Deferred:function(e){var t=[["resolve","done",J.Callbacks("once memory"),"resolved"],["reject","fail",J.Callbacks("once memory"),"rejected"],["notify","progress",J.Callbacks("memory")]],n="pending",o={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return J.Deferred(function(n){J.each(t,function(t,a){var r=J.isFunction(e[t])&&e[t];i[a[1]](function(){var e=r&&r.apply(this,arguments);e&&J.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a[0]+"With"](this===o?n.promise():this,r?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?J.extend(e,o):o}},i={};return o.pipe=o.then,J.each(t,function(e,a){var r=a[2],s=a[3];o[a[1]]=r.add,s&&r.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[a[0]]=function(){return i[a[0]+"With"](this===i?o:this,arguments),this},i[a[0]+"With"]=r.fireWith}),o.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,o,i=0,a=U.call(arguments),r=a.length,s=1!==r||e&&J.isFunction(e.promise)?r:0,l=1===s?e:J.Deferred(),u=function(e,n,o){return function(i){n[e]=this,o[e]=arguments.length>1?U.call(arguments):i,o===t?l.notifyWith(n,o):--s||l.resolveWith(n,o)}};if(r>1)for(t=new Array(r),n=new Array(r),o=new Array(r);r>i;i++)a[i]&&J.isFunction(a[i].promise)?a[i].promise().done(u(i,o,a)).fail(l.reject).progress(u(i,n,t)):--s;return s||l.resolveWith(o,a),l.promise()}});var mt;J.fn.ready=function(e){return J.ready.promise().done(e),this},J.extend({isReady:!1,readyWait:1,holdReady:function(e){e?J.readyWait++:J.ready(!0)},ready:function(e){(e===!0?--J.readyWait:J.isReady)||(J.isReady=!0,e!==!0&&--J.readyWait>0||(mt.resolveWith(Q,[J]),J.fn.triggerHandler&&(J(Q).triggerHandler("ready"),J(Q).off("ready"))))}}),J.ready.promise=function(t){return mt||(mt=J.Deferred(),"complete"===Q.readyState?setTimeout(J.ready):(Q.addEventListener("DOMContentLoaded",r,!1),e.addEventListener("load",r,!1))),mt.promise(t)},J.ready.promise();var gt=J.access=function(e,t,n,o,i,a,r){var s=0,l=e.length,u=null==n;if("object"===J.type(n)){i=!0;for(s in n)J.access(e,t,s,n[s],!0,a,r)}else if(void 0!==o&&(i=!0,J.isFunction(o)||(r=!0),u&&(r?(t.call(e,o),t=null):(u=t,t=function(e,t,n){return u.call(J(e),n)})),t))for(;l>s;s++)t(e[s],n,r?o:o.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):a};J.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},s.uid=1,s.accepts=J.acceptData,s.prototype={key:function(e){if(!s.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=s.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(o){t[this.expando]=n,J.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var o,i=this.key(e),a=this.cache[i];if("string"==typeof t)a[t]=n;else if(J.isEmptyObject(a))J.extend(this.cache[i],t);else for(o in t)a[o]=t[o];return a},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var o;return void 0===t||t&&"string"==typeof t&&void 0===n?(o=this.get(e,t),void 0!==o?o:this.get(e,J.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,o,i,a=this.key(e),r=this.cache[a];if(void 0===t)this.cache[a]={};else{J.isArray(t)?o=t.concat(t.map(J.camelCase)):(i=J.camelCase(t),t in r?o=[t,i]:(o=i,o=o in r?[o]:o.match(ht)||[])),n=o.length;for(;n--;)delete r[o[n]]}},hasData:function(e){return!J.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var bt=new s,vt=new s,yt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,wt=/([A-Z])/g;J.extend({hasData:function(e){return vt.hasData(e)||bt.hasData(e)},data:function(e,t,n){return vt.access(e,t,n)},removeData:function(e,t){vt.remove(e,t)},_data:function(e,t,n){return bt.access(e,t,n)},_removeData:function(e,t){bt.remove(e,t)}}),J.fn.extend({data:function(e,t){var n,o,i,a=this[0],r=a&&a.attributes;if(void 0===e){if(this.length&&(i=vt.get(a),1===a.nodeType&&!bt.get(a,"hasDataAttrs"))){for(n=r.length;n--;)r[n]&&(o=r[n].name,0===o.indexOf("data-")&&(o=J.camelCase(o.slice(5)),l(a,o,i[o])));bt.set(a,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){vt.set(this,e)}):gt(this,function(t){var n,o=J.camelCase(e);if(a&&void 0===t){if(n=vt.get(a,e),void 0!==n)return n;if(n=vt.get(a,o),void 0!==n)return n;if(n=l(a,o,void 0),void 0!==n)return n}else this.each(function(){var n=vt.get(this,o);vt.set(this,o,t),-1!==e.indexOf("-")&&void 0!==n&&vt.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){vt.remove(this,e)})}}),J.extend({queue:function(e,t,n){var o;return e?(t=(t||"fx")+"queue",o=bt.get(e,t),n&&(!o||J.isArray(n)?o=bt.access(e,t,J.makeArray(n)):o.push(n)),o||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=J.queue(e,t),o=n.length,i=n.shift(),a=J._queueHooks(e,t),r=function(){J.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),o--),i&&("fx"===t&&n.unshift("inprogress"),delete a.stop,i.call(e,r,a)),!o&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return bt.get(e,n)||bt.access(e,n,{empty:J.Callbacks("once memory").add(function(){bt.remove(e,[t+"queue",n])})})}}),J.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.lengthx",G.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var jt="undefined";G.focusinBubbles="onfocusin"in e;var Ct=/^key/,Dt=/^(?:mouse|pointer|contextmenu)|click/,St=/^(?:focusinfocus|focusoutblur)$/,At=/^([^.]*)(?:\.(.+)|)$/;J.event={global:{},add:function(e,t,n,o,i){var a,r,s,l,u,c,d,p,h,f,m,g=bt.get(e);if(g)for(n.handler&&(a=n,n=a.handler,i=a.selector),n.guid||(n.guid=J.guid++),(l=g.events)||(l=g.events={}),(r=g.handle)||(r=g.handle=function(t){return typeof J!==jt&&J.event.triggered!==t.type?J.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(ht)||[""],u=t.length;u--;)s=At.exec(t[u])||[],h=m=s[1],f=(s[2]||"").split(".").sort(),h&&(d=J.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,d=J.event.special[h]||{},c=J.extend({type:h,origType:m,data:o,handler:n,guid:n.guid,selector:i,needsContext:i&&J.expr.match.needsContext.test(i),namespace:f.join(".")},a),(p=l[h])||(p=l[h]=[],p.delegateCount=0,d.setup&&d.setup.call(e,o,f,r)!==!1||e.addEventListener&&e.addEventListener(h,r,!1)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),J.event.global[h]=!0)},remove:function(e,t,n,o,i){var a,r,s,l,u,c,d,p,h,f,m,g=bt.hasData(e)&&bt.get(e);if(g&&(l=g.events)){for(t=(t||"").match(ht)||[""],u=t.length;u--;)if(s=At.exec(t[u])||[],h=m=s[1],f=(s[2]||"").split(".").sort(),h){for(d=J.event.special[h]||{},h=(o?d.delegateType:d.bindType)||h,p=l[h]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=a=p.length;a--;)c=p[a],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||o&&o!==c.selector&&("**"!==o||!c.selector)||(p.splice(a,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(e,c));r&&!p.length&&(d.teardown&&d.teardown.call(e,f,g.handle)!==!1||J.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)J.event.remove(e,h+t[u],n,o,!0);J.isEmptyObject(l)&&(delete g.handle,bt.remove(e,"events"))}},trigger:function(t,n,o,i){var a,r,s,l,u,c,d,p=[o||Q],h=V.call(t,"type")?t.type:t,f=V.call(t,"namespace")?t.namespace.split("."):[];if(r=s=o=o||Q,3!==o.nodeType&&8!==o.nodeType&&!St.test(h+J.event.triggered)&&(h.indexOf(".")>=0&&(f=h.split("."),h=f.shift(),f.sort()),u=h.indexOf(":")<0&&"on"+h,t=t[J.expando]?t:new J.Event(h,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=f.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=o),n=null==n?[t]:J.makeArray(n,[t]),d=J.event.special[h]||{},i||!d.trigger||d.trigger.apply(o,n)!==!1)){if(!i&&!d.noBubble&&!J.isWindow(o)){for(l=d.delegateType||h,St.test(l+h)||(r=r.parentNode);r;r=r.parentNode)p.push(r),s=r;s===(o.ownerDocument||Q)&&p.push(s.defaultView||s.parentWindow||e)}for(a=0;(r=p[a++])&&!t.isPropagationStopped();)t.type=a>1?l:d.bindType||h,c=(bt.get(r,"events")||{})[t.type]&&bt.get(r,"handle"),c&&c.apply(r,n),c=u&&r[u],c&&c.apply&&J.acceptData(r)&&(t.result=c.apply(r,n),t.result===!1&&t.preventDefault());return t.type=h,i||t.isDefaultPrevented()||d._default&&d._default.apply(p.pop(),n)!==!1||!J.acceptData(o)||u&&J.isFunction(o[h])&&!J.isWindow(o)&&(s=o[u],s&&(o[u]=null),J.event.triggered=h,o[h](),J.event.triggered=void 0,s&&(o[u]=s)),t.result}},dispatch:function(e){e=J.event.fix(e);var t,n,o,i,a,r=[],s=U.call(arguments),l=(bt.get(this,"events")||{})[e.type]||[],u=J.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(r=J.event.handlers.call(this,e,l),t=0;(i=r[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(a=i.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(a.namespace))&&(e.handleObj=a,e.data=a.data,o=((J.event.special[a.origType]||{}).handle||a.handler).apply(i.elem,s),void 0!==o&&(e.result=o)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,o,i,a,r=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!==this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==e.type){for(o=[],n=0;s>n;n++)a=t[n],i=a.selector+" ",void 0===o[i]&&(o[i]=a.needsContext?J(i,this).index(l)>=0:J.find(i,this,null,[l]).length),o[i]&&o.push(a);o.length&&r.push({elem:l,handlers:o})}return s]*)\/>/gi,It=/<([\w:]+)/,_t=/<|&#?\w+;/,Mt=/<(?:script|style|link)/i,Et=/checked\s*(?:[^=]|=\s*.checked.)/i,Pt=/^$|\/(?:java|ecma)script/i,Lt=/^true\/(.*)/,Ot=/^\s*\s*$/g,Ht={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Ht.optgroup=Ht.option,Ht.tbody=Ht.tfoot=Ht.colgroup=Ht.caption=Ht.thead,Ht.th=Ht.td,J.extend({clone:function(e,t,n){var o,i,a,r,s=e.cloneNode(!0),l=J.contains(e.ownerDocument,e);if(!(G.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||J.isXMLDoc(e)))for(r=b(s),a=b(e),o=0,i=a.length;i>o;o++)v(a[o],r[o]);if(t)if(n)for(a=a||b(e),r=r||b(s),o=0,i=a.length;i>o;o++)g(a[o],r[o]);else g(e,s);return r=b(s,"script"),r.length>0&&m(r,!l&&b(e,"script")),s},buildFragment:function(e,t,n,o){for(var i,a,r,s,l,u,c=t.createDocumentFragment(),d=[],p=0,h=e.length;h>p;p++)if(i=e[p],i||0===i)if("object"===J.type(i))J.merge(d,i.nodeType?[i]:i);else if(_t.test(i)){for(a=a||c.appendChild(t.createElement("div")),r=(It.exec(i)||["",""])[1].toLowerCase(),s=Ht[r]||Ht._default,a.innerHTML=s[1]+i.replace(Nt,"<$1>")+s[2],u=s[0];u--;)a=a.lastChild;J.merge(d,a.childNodes),a=c.firstChild,a.textContent=""}else d.push(t.createTextNode(i));for(c.textContent="",p=0;i=d[p++];)if((!o||-1===J.inArray(i,o))&&(l=J.contains(i.ownerDocument,i),a=b(c.appendChild(i),"script"),l&&m(a),n))for(u=0;i=a[u++];)Pt.test(i.type||"")&&n.push(i);return c},cleanData:function(e){for(var t,n,o,i,a=J.event.special,r=0;void 0!==(n=e[r]);r++){if(J.acceptData(n)&&(i=n[bt.expando],i&&(t=bt.cache[i]))){if(t.events)for(o in t.events)a[o]?J.event.remove(n,o):J.removeEvent(n,o,t.handle);bt.cache[i]&&delete bt.cache[i]}delete vt.cache[n[vt.expando]]}}}),J.fn.extend({text:function(e){return gt(this,function(e){return void 0===e?J.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,o=e?J.filter(e,this):this,i=0;null!=(n=o[i]);i++)t||1!==n.nodeType||J.cleanData(b(n)),n.parentNode&&(t&&J.contains(n.ownerDocument,n)&&m(b(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(J.cleanData(b(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return J.clone(this,e,t)})},html:function(e){return gt(this,function(e){var t=this[0]||{},n=0,o=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Mt.test(e)&&!Ht[(It.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Nt,"<$1>");try{for(;o>n;n++)t=this[n]||{},1===t.nodeType&&(J.cleanData(b(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,J.cleanData(b(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=W.apply([],e);var n,o,i,a,r,s,l=0,u=this.length,c=this,d=u-1,p=e[0],m=J.isFunction(p);if(m||u>1&&"string"==typeof p&&!G.checkClone&&Et.test(p))return this.each(function(n){var o=c.eq(n);m&&(e[0]=p.call(this,n,o.html())),o.domManip(e,t)});if(u&&(n=J.buildFragment(e,this[0].ownerDocument,!1,this),o=n.firstChild,1===n.childNodes.length&&(n=o),o)){for(i=J.map(b(n,"script"),h),a=i.length;u>l;l++)r=n,l!==d&&(r=J.clone(r,!0,!0),a&&J.merge(i,b(r,"script"))),t.call(this[l],r,l);if(a)for(s=i[i.length-1].ownerDocument,J.map(i,f),l=0;a>l;l++)r=i[l],Pt.test(r.type||"")&&!bt.access(r,"globalEval")&&J.contains(s,r)&&(r.src?J._evalUrl&&J._evalUrl(r.src):J.globalEval(r.textContent.replace(Ot,"")))}return this}}),J.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){J.fn[e]=function(e){for(var n,o=[],i=J(e),a=i.length-1,r=0;a>=r;r++)n=r===a?this:this.clone(!0),J(i[r])[t](n),X.apply(o,n.get());return this.pushStack(o)}});var qt,Rt={},Bt=/^margin/,Ft=new RegExp("^("+xt+")(?!px)[a-z%]+$","i"),Ut=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)};!function(){function t(){r.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",r.innerHTML="",i.appendChild(a);var t=e.getComputedStyle(r,null);n="1%"!==t.top,o="4px"===t.width,i.removeChild(a)}var n,o,i=Q.documentElement,a=Q.createElement("div"),r=Q.createElement("div");r.style&&(r.style.backgroundClip="content-box",r.cloneNode(!0).style.backgroundClip="",G.clearCloneStyle="content-box"===r.style.backgroundClip,a.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",a.appendChild(r),e.getComputedStyle&&J.extend(G,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==o&&t(),o},reliableMarginRight:function(){var t,n=r.appendChild(Q.createElement("div"));return n.style.cssText=r.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",r.style.width="1px",i.appendChild(a),t=!parseFloat(e.getComputedStyle(n,null).marginRight),i.removeChild(a),t}}))}(),J.swap=function(e,t,n,o){var i,a,r={};for(a in t)r[a]=e.style[a],e.style[a]=t[a];i=n.apply(e,o||[]);for(a in t)e.style[a]=r[a];return i};var Wt=/^(none|table(?!-c[ea]).+)/,Xt=new RegExp("^("+xt+")(.*)$","i"),zt=new RegExp("^([+-])=("+xt+")","i"),Yt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:"0",fontWeight:"400"},Vt=["Webkit","O","Moz","ms"];J.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=x(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,a,r,s=J.camelCase(t),l=e.style;return t=J.cssProps[s]||(J.cssProps[s]=$(l,s)),r=J.cssHooks[t]||J.cssHooks[s],void 0===n?r&&"get"in r&&void 0!==(i=r.get(e,!1,o))?i:l[t]:(a=typeof n,"string"===a&&(i=zt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(J.css(e,t)),a="number"),void(null!=n&&n===n&&("number"!==a||J.cssNumber[s]||(n+="px"),G.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),r&&"set"in r&&void 0===(n=r.set(e,n,o))||(l[t]=n))))}},css:function(e,t,n,o){var i,a,r,s=J.camelCase(t);return t=J.cssProps[s]||(J.cssProps[s]=$(e.style,s)),r=J.cssHooks[t]||J.cssHooks[s],r&&"get"in r&&(i=r.get(e,!0,n)),void 0===i&&(i=x(e,t,o)),"normal"===i&&t in Kt&&(i=Kt[t]),""===n||n?(a=parseFloat(i),n===!0||J.isNumeric(a)?a||0:i):i}}),J.each(["height","width"],function(e,t){J.cssHooks[t]={get:function(e,n,o){return n?Wt.test(J.css(e,"display"))&&0===e.offsetWidth?J.swap(e,Yt,function(){return C(e,t,o)}):C(e,t,o):void 0},set:function(e,n,o){var i=o&&Ut(e);return k(e,n,o?j(e,t,o,"border-box"===J.css(e,"boxSizing",!1,i),i):0)}}}),J.cssHooks.marginRight=T(G.reliableMarginRight,function(e,t){return t?J.swap(e,{display:"inline-block"},x,[e,"marginRight"]):void 0}),J.each({margin:"",padding:"",border:"Width"},function(e,t){J.cssHooks[e+t]={expand:function(n){for(var o=0,i={},a="string"==typeof n?n.split(" "):[n];4>o;o++)i[e+Tt[o]+t]=a[o]||a[o-2]||a[0];return i}},Bt.test(e)||(J.cssHooks[e+t].set=k)}),J.fn.extend({css:function(e,t){return gt(this,function(e,t,n){var o,i,a={},r=0;if(J.isArray(t)){for(o=Ut(e),i=t.length;i>r;r++)a[t[r]]=J.css(e,t[r],!1,o);return a}return void 0!==n?J.style(e,t,n):J.css(e,t)},e,t,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){$t(this)?J(this).show():J(this).hide()})}}),J.Tween=S,S.prototype={constructor:S,init:function(e,t,n,o,i,a){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=o,this.unit=a||(J.cssNumber[n]?"":"px")},cur:function(){var e=S.propHooks[this.prop];return e&&e.get?e.get(this):S.propHooks._default.get(this)},run:function(e){var t,n=S.propHooks[this.prop];return this.pos=t=this.options.duration?J.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):S.propHooks._default.set(this),this}},S.prototype.init.prototype=S.prototype,S.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=J.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){J.fx.step[e.prop]?J.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[J.cssProps[e.prop]]||J.cssHooks[e.prop])?J.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},S.propHooks.scrollTop=S.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},J.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},J.fx=S.prototype.init,J.fx.step={};var Gt,Qt,Zt=/^(?:toggle|show|hide)$/,Jt=new RegExp("^(?:([+-])=|)("+xt+")([a-z%]*)$","i"),en=/queueHooks$/,tn=[_],nn={"*":[function(e,t){var n=this.createTween(e,t),o=n.cur(),i=Jt.exec(t),a=i&&i[3]||(J.cssNumber[e]?"":"px"),r=(J.cssNumber[e]||"px"!==a&&+o)&&Jt.exec(J.css(n.elem,e)),s=1,l=20;if(r&&r[3]!==a){a=a||r[3],i=i||[],r=+o||1;do s=s||".5",r/=s,J.style(n.elem,e,r+a);while(s!==(s=n.cur()/o)&&1!==s&&--l)}return i&&(r=n.start=+r||+o||0,n.unit=a,n.end=i[1]?r+(i[1]+1)*i[2]:+i[2]),n}]};J.Animation=J.extend(E,{tweener:function(e,t){J.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,o=0,i=e.length;i>o;o++)n=e[o],nn[n]=nn[n]||[],nn[n].unshift(t)},prefilter:function(e,t){t?tn.unshift(e):tn.push(e)}}),J.speed=function(e,t,n){var o=e&&"object"==typeof e?J.extend({},e):{complete:n||!n&&t||J.isFunction(e)&&e,duration:e,easing:n&&t||t&&!J.isFunction(t)&&t};return o.duration=J.fx.off?0:"number"==typeof o.duration?o.duration:o.duration in J.fx.speeds?J.fx.speeds[o.duration]:J.fx.speeds._default,(null==o.queue||o.queue===!0)&&(o.queue="fx"),o.old=o.complete,o.complete=function(){J.isFunction(o.old)&&o.old.call(this),o.queue&&J.dequeue(this,o.queue)},o},J.fn.extend({fadeTo:function(e,t,n,o){return this.filter($t).css("opacity",0).show().end().animate({opacity:t},e,n,o)},animate:function(e,t,n,o){var i=J.isEmptyObject(e),a=J.speed(t,n,o),r=function(){var t=E(this,J.extend({},e),a);(i||bt.get(this,"finish"))&&t.stop(!0)};return r.finish=r,i||a.queue===!1?this.each(r):this.queue(a.queue,r)},stop:function(e,t,n){var o=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",a=J.timers,r=bt.get(this);if(i)r[i]&&r[i].stop&&o(r[i]);else for(i in r)r[i]&&r[i].stop&&en.test(i)&&o(r[i]);for(i=a.length;i--;)a[i].elem!==this||null!=e&&a[i].queue!==e||(a[i].anim.stop(n),t=!1,a.splice(i,1));(t||!n)&&J.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=bt.get(this),o=n[e+"queue"],i=n[e+"queueHooks"],a=J.timers,r=o?o.length:0;for(n.finish=!0,J.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1)); for(t=0;r>t;t++)o[t]&&o[t].finish&&o[t].finish.call(this);delete n.finish})}}),J.each(["toggle","show","hide"],function(e,t){var n=J.fn[t];J.fn[t]=function(e,o,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(N(t,!0),e,o,i)}}),J.each({slideDown:N("show"),slideUp:N("hide"),slideToggle:N("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){J.fn[e]=function(e,n,o){return this.animate(t,e,n,o)}}),J.timers=[],J.fx.tick=function(){var e,t=0,n=J.timers;for(Gt=J.now();t1)},removeAttr:function(e){return this.each(function(){J.removeAttr(this,e)})}}),J.extend({attr:function(e,t,n){var o,i,a=e.nodeType;return e&&3!==a&&8!==a&&2!==a?typeof e.getAttribute===jt?J.prop(e,t,n):(1===a&&J.isXMLDoc(e)||(t=t.toLowerCase(),o=J.attrHooks[t]||(J.expr.match.bool.test(t)?an:on)),void 0===n?o&&"get"in o&&null!==(i=o.get(e,t))?i:(i=J.find.attr(e,t),null==i?void 0:i):null!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void J.removeAttr(e,t)):void 0},removeAttr:function(e,t){var n,o,i=0,a=t&&t.match(ht);if(a&&1===e.nodeType)for(;n=a[i++];)o=J.propFix[n]||n,J.expr.match.bool.test(n)&&(e[o]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!G.radioValue&&"radio"===t&&J.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),an={set:function(e,t,n){return t===!1?J.removeAttr(e,n):e.setAttribute(n,n),n}},J.each(J.expr.match.bool.source.match(/\w+/g),function(e,t){var n=rn[t]||J.find.attr;rn[t]=function(e,t,o){var i,a;return o||(a=rn[t],rn[t]=i,i=null!=n(e,t,o)?t.toLowerCase():null,rn[t]=a),i}});var sn=/^(?:input|select|textarea|button)$/i;J.fn.extend({prop:function(e,t){return gt(this,J.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[J.propFix[e]||e]})}}),J.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var o,i,a,r=e.nodeType;return e&&3!==r&&8!==r&&2!==r?(a=1!==r||!J.isXMLDoc(e),a&&(t=J.propFix[t]||t,i=J.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(o=i.set(e,n,t))?o:e[t]=n:i&&"get"in i&&null!==(o=i.get(e,t))?o:e[t]):void 0},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||sn.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),G.optSelected||(J.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),J.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){J.propFix[this.toLowerCase()]=this});var ln=/[\t\r\n\f]/g;J.fn.extend({addClass:function(e){var t,n,o,i,a,r,s="string"==typeof e&&e,l=0,u=this.length;if(J.isFunction(e))return this.each(function(t){J(this).addClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(ht)||[];u>l;l++)if(n=this[l],o=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ln," "):" ")){for(a=0;i=t[a++];)o.indexOf(" "+i+" ")<0&&(o+=i+" ");r=J.trim(o),n.className!==r&&(n.className=r)}return this},removeClass:function(e){var t,n,o,i,a,r,s=0===arguments.length||"string"==typeof e&&e,l=0,u=this.length;if(J.isFunction(e))return this.each(function(t){J(this).removeClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(ht)||[];u>l;l++)if(n=this[l],o=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ln," "):"")){for(a=0;i=t[a++];)for(;o.indexOf(" "+i+" ")>=0;)o=o.replace(" "+i+" "," ");r=e?J.trim(o):"",n.className!==r&&(n.className=r)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(J.isFunction(e)?function(n){J(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,o=0,i=J(this),a=e.match(ht)||[];t=a[o++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else(n===jt||"boolean"===n)&&(this.className&&bt.set(this,"__className__",this.className),this.className=this.className||e===!1?"":bt.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,o=this.length;o>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(ln," ").indexOf(t)>=0)return!0;return!1}});var un=/\r/g;J.fn.extend({val:function(e){var t,n,o,i=this[0];return arguments.length?(o=J.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=o?e.call(this,n,J(this).val()):e,null==i?i="":"number"==typeof i?i+="":J.isArray(i)&&(i=J.map(i,function(e){return null==e?"":e+""})),t=J.valHooks[this.type]||J.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=J.valHooks[i.type]||J.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(un,""):null==n?"":n)):void 0}}),J.extend({valHooks:{option:{get:function(e){var t=J.find.attr(e,"value");return null!=t?t:J.trim(J.text(e))}},select:{get:function(e){for(var t,n,o=e.options,i=e.selectedIndex,a="select-one"===e.type||0>i,r=a?null:[],s=a?i+1:o.length,l=0>i?s:a?i:0;s>l;l++)if(n=o[l],!(!n.selected&&l!==i||(G.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&J.nodeName(n.parentNode,"optgroup"))){if(t=J(n).val(),a)return t;r.push(t)}return r},set:function(e,t){for(var n,o,i=e.options,a=J.makeArray(t),r=i.length;r--;)o=i[r],(o.selected=J.inArray(o.value,a)>=0)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),J.each(["radio","checkbox"],function(){J.valHooks[this]={set:function(e,t){return J.isArray(t)?e.checked=J.inArray(J(e).val(),t)>=0:void 0}},G.checkOn||(J.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),J.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){J.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),J.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,o){return this.on(t,e,n,o)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var cn=J.now(),dn=/\?/;J.parseJSON=function(e){return JSON.parse(e+"")},J.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(o){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&J.error("Invalid XML: "+e),t};var pn,hn,fn=/#.*$/,mn=/([?&])_=[^&]*/,gn=/^(.*?):[ \t]*([^\r\n]*)$/gm,bn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,yn=/^\/\//,wn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,xn={},Tn={},$n="*/".concat("*");try{hn=location.href}catch(kn){hn=Q.createElement("a"),hn.href="",hn=hn.href}pn=wn.exec(hn.toLowerCase())||[],J.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:hn,type:"GET",isLocal:bn.test(pn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$n,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":J.parseJSON,"text xml":J.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?O(O(e,J.ajaxSettings),t):O(J.ajaxSettings,e)},ajaxPrefilter:P(xn),ajaxTransport:P(Tn),ajax:function(e,t){function n(e,t,n,r){var l,c,b,v,w,T=t;2!==y&&(y=2,s&&clearTimeout(s),o=void 0,a=r||"",x.readyState=e>0?4:0,l=e>=200&&300>e||304===e,n&&(v=H(d,x,n)),v=q(d,v,x,l),l?(d.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(J.lastModified[i]=w),w=x.getResponseHeader("etag"),w&&(J.etag[i]=w)),204===e||"HEAD"===d.type?T="nocontent":304===e?T="notmodified":(T=v.state,c=v.data,b=v.error,l=!b)):(b=T,(e||!T)&&(T="error",0>e&&(e=0))),x.status=e,x.statusText=(t||T)+"",l?f.resolveWith(p,[c,T,x]):f.rejectWith(p,[x,T,b]),x.statusCode(g),g=void 0,u&&h.trigger(l?"ajaxSuccess":"ajaxError",[x,d,l?c:b]),m.fireWith(p,[x,T]),u&&(h.trigger("ajaxComplete",[x,d]),--J.active||J.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var o,i,a,r,s,l,u,c,d=J.ajaxSetup({},t),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?J(p):J.event,f=J.Deferred(),m=J.Callbacks("once memory"),g=d.statusCode||{},b={},v={},y=0,w="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!r)for(r={};t=gn.exec(a);)r[t[1].toLowerCase()]=t[2];t=r[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=v[n]=v[n]||e,b[e]=t),this},overrideMimeType:function(e){return y||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>y)for(t in e)g[t]=[g[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||w;return o&&o.abort(t),n(0,t),this}};if(f.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,d.url=((e||d.url||hn)+"").replace(fn,"").replace(yn,pn[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=J.trim(d.dataType||"*").toLowerCase().match(ht)||[""],null==d.crossDomain&&(l=wn.exec(d.url.toLowerCase()),d.crossDomain=!(!l||l[1]===pn[1]&&l[2]===pn[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(pn[3]||("http:"===pn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=J.param(d.data,d.traditional)),L(xn,d,t,x),2===y)return x;u=d.global,u&&0===J.active++&&J.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!vn.test(d.type),i=d.url,d.hasContent||(d.data&&(i=d.url+=(dn.test(i)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=mn.test(i)?i.replace(mn,"$1_="+cn++):i+(dn.test(i)?"&":"?")+"_="+cn++)),d.ifModified&&(J.lastModified[i]&&x.setRequestHeader("If-Modified-Since",J.lastModified[i]),J.etag[i]&&x.setRequestHeader("If-None-Match",J.etag[i])),(d.data&&d.hasContent&&d.contentType!==!1||t.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+$n+"; q=0.01":""):d.accepts["*"]);for(c in d.headers)x.setRequestHeader(c,d.headers[c]);if(d.beforeSend&&(d.beforeSend.call(p,x,d)===!1||2===y))return x.abort();w="abort";for(c in{success:1,error:1,complete:1})x[c](d[c]);if(o=L(Tn,d,t,x)){x.readyState=1,u&&h.trigger("ajaxSend",[x,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){x.abort("timeout")},d.timeout));try{y=1,o.send(b,n)}catch(T){if(!(2>y))throw T;n(-1,T)}}else n(-1,"No Transport");return x},getJSON:function(e,t,n){return J.get(e,t,n,"json")},getScript:function(e,t){return J.get(e,void 0,t,"script")}}),J.each(["get","post"],function(e,t){J[t]=function(e,n,o,i){return J.isFunction(n)&&(i=i||o,o=n,n=void 0),J.ajax({url:e,type:t,dataType:i,data:n,success:o})}}),J.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){J.fn[t]=function(e){return this.on(t,e)}}),J._evalUrl=function(e){return J.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},J.fn.extend({wrapAll:function(e){var t;return J.isFunction(e)?this.each(function(t){J(this).wrapAll(e.call(this,t))}):(this[0]&&(t=J(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return this.each(J.isFunction(e)?function(t){J(this).wrapInner(e.call(this,t))}:function(){var t=J(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=J.isFunction(e);return this.each(function(n){J(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){J.nodeName(this,"body")||J(this).replaceWith(this.childNodes)}).end()}}),J.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},J.expr.filters.visible=function(e){return!J.expr.filters.hidden(e)};var jn=/%20/g,Cn=/\[\]$/,Dn=/\r?\n/g,Sn=/^(?:submit|button|image|reset|file)$/i,An=/^(?:input|select|textarea|keygen)/i;J.param=function(e,t){var n,o=[],i=function(e,t){t=J.isFunction(t)?t():null==t?"":t,o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=J.ajaxSettings&&J.ajaxSettings.traditional),J.isArray(e)||e.jquery&&!J.isPlainObject(e))J.each(e,function(){i(this.name,this.value)});else for(n in e)R(n,e[n],t,i);return o.join("&").replace(jn,"+")},J.fn.extend({serialize:function(){return J.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=J.prop(this,"elements");return e?J.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!J(this).is(":disabled")&&An.test(this.nodeName)&&!Sn.test(e)&&(this.checked||!kt.test(e))}).map(function(e,t){var n=J(this).val();return null==n?null:J.isArray(n)?J.map(n,function(e){return{name:t.name,value:e.replace(Dn,"\r\n")}}):{name:t.name,value:n.replace(Dn,"\r\n")}}).get()}}),J.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Nn=0,In={},_n={0:200,1223:204},Mn=J.ajaxSettings.xhr();e.ActiveXObject&&J(e).on("unload",function(){for(var e in In)In[e]()}),G.cors=!!Mn&&"withCredentials"in Mn,G.ajax=Mn=!!Mn,J.ajaxTransport(function(e){var t;return G.cors||Mn&&!e.crossDomain?{send:function(n,o){var i,a=e.xhr(),r=++Nn;if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)a[i]=e.xhrFields[i];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)a.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete In[r],t=a.onload=a.onerror=null,"abort"===e?a.abort():"error"===e?o(a.status,a.statusText):o(_n[a.status]||a.status,a.statusText,"string"==typeof a.responseText?{text:a.responseText}:void 0,a.getAllResponseHeaders()))}},a.onload=t(),a.onerror=t("error"),t=In[r]=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(s){if(t)throw s}},abort:function(){t&&t()}}:void 0}),J.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return J.globalEval(e),e}}}),J.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),J.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(o,i){t=J("