function AnalyseAlbumViewModel(){this.el="#analyse-album",this.data={imagesFailed:[],imagesToAnalyse:[],imagesInProgress:[],imagesRecentlyCompleted:[],numberSuccessful:0,numberFailed:0},this.computed={failedPercentage:function(){var t=0;return this.numberTotal>0&&(t=this.numberFailed/this.numberTotal*100),t.toFixed(2)+"%"},isCompleted:function(){return this.numberTotal>0&&this.numberSuccessful+this.numberFailed>=this.numberTotal},latestCompletedImages:function(){var t=this.imagesRecentlyCompleted.length-3<0?0:this.imagesRecentlyCompleted.length-3,e=t+3;return this.imagesRecentlyCompleted.slice(t,e)},numberTotal:function(){return this.imagesToAnalyse.length},successfulPercentage:function(){var t=0;return this.numberTotal>0&&(t=this.numberSuccessful/this.numberTotal*100),t.toFixed(2)+"%"}},this.methods={analyseImage:function(t){var e=this;this.imagesToAnalyse.push(t),$.ajax(t.url,{beforeSend:function(){e.imagesInProgress.push(t)},dataType:"json",error:function(n,i,r){e.numberFailed++,e.imagesFailed.push({name:t.name,reason:i}),t.isSuccessful=!1,t.isPending=!1},method:"POST",success:function(n){if(n.is_successful){e.numberSuccessful++,t.isSuccessful=!0,t.isPending=!1,e.imagesRecentlyCompleted.push(t);var i=e.imagesInProgress.indexOf(t);i>-1&&e.imagesInProgress.splice(i,1)}else e.numberFailed++,e.imagesFailed.push({name:t.name,reason:n.message}),t.isSuccessful=!1,t.isPending=!1}})}}}function AnalyseImageViewModel(t){this.isPending=!0,this.isSuccessful=!1,this.name=t.name,this.photoID=t.photo_id,this.url=t.url}function EditPhotosViewModel(t,e,n){this.el="#photos-tab",this.data={albums:[],bulkModifyMethod:"",isSubmitting:!1,photoIDs:[],photoIDsAvailable:[],selectAllInAlbum:0},this.methods={bulkModifySelected:function(t){if(this.isSubmitting)return!0;var n=this,i=$(t.target).closest("form");return"change_album"===this.bulkModifyMethod?(this.promptForNewAlbum(function(t){var e=$("select",t).val();$('input[name="new-album-id"]',i).val(e),n.isSubmitting=!0,$('button[name="bulk-apply"]',i).click(),_bt_showLoadingModal()}),t.preventDefault(),!1):"delete"!==this.bulkModifyMethod||(bootbox.dialog({message:e.delete_bulk_confirm_message,title:e.delete_bulk_confirm_title,buttons:{cancel:{label:e.action_cancel,className:"btn-secondary"},confirm:{label:e.action_delete,className:"btn-danger",callback:function(){n.isSubmitting=!0,$('button[name="bulk-apply"]',i).click(),_bt_showLoadingModal()}}}}),t.preventDefault(),!1)},changeAlbum:function(t){this.selectPhotoSingle(t.target);var e=this.photoIDs[0];return this.photoIDs=[],this.promptForNewAlbum(function(t){var i=$("select",t).val();$.post(n.move_photo.replace(/\/0$/,"/"+e),{new_album_id:i},function(){window.location.reload()})}),t.preventDefault(),!1},deletePhoto:function(t){var i=this;this.selectPhotoSingle(t.target);var r=i.photoIDs[0];return this.photoIDs=[],bootbox.dialog({message:e.delete_confirm_message,title:e.delete_confirm_title,buttons:{cancel:{label:e.action_cancel,className:"btn-secondary"},confirm:{label:e.action_delete,className:"btn-danger",callback:function(){var t=n.delete_photo;t=t.replace(/\/0$/,"/"+r),$(".loading",parent).show(),$.post(t,{_method:"DELETE"},function(t){window.location.reload()})}}}}),t.preventDefault(),!1},flip:function(t,e,i){var r=n.flip_photo;r=r.replace("/0/","/"+this.photoIDs[0]+"/"),r=t?r.replace(/\/-1\//,"/1/"):r.replace(/\/-1\//,"/0/"),r=e?r.replace(/\/-2$/,"/1"):r.replace(/\/-2$/,"/0"),$(".loading",i).show(),$.post(r,function(){var t=$("img.photo-thumbnail",i),e=t.data("original-src");t.attr("src",e+"&_="+(new Date).getTime()),$(".loading",i).hide()}),this.photoIDs=[]},flipBoth:function(t){return this.selectPhotoSingle(t.target),this.flip(!0,!0,$(t.target).closest(".photo")),t.preventDefault(),!1},flipHorizontal:function(t){return this.selectPhotoSingle(t.target),this.flip(!0,!1,$(t.target).closest(".photo")),t.preventDefault(),!1},flipVertical:function(t){return this.selectPhotoSingle(t.target),this.flip(!1,!0,$(t.target).closest(".photo")),t.preventDefault(),!1},isPhotoSelected:function(t){return this.photoIDs.indexOf(t)>-1?"checked":""},promptForNewAlbum:function(n){for(var i=this.albums,r=$("",t.querySelectorAll("[msallowcapture^='']").length&&$.push("[*^$]="+tt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||$.push("\\["+tt+"*(?:value|"+Z+")"),t.querySelectorAll("[id~="+M+"-]").length||$.push("~="),t.querySelectorAll(":checked").length||$.push(":checked"),t.querySelectorAll("a#"+M+"+*").length||$.push(".#.+[+~]")}),r(function(t){t.innerHTML="";var e=I.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&$.push("name"+tt+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&$.push(":enabled",":disabled"),N.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&$.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),$.push(",.*:")})),(_.matchesSelector=ht.test(j=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&r(function(t){_.disconnectedMatch=j.call(t,"*"),j.call(t,"[s!='']:x"),P.push("!=",it)}),$=$.length&&new RegExp($.join("|")),P=P.length&&new RegExp(P.join("|")),e=ht.test(N.compareDocumentPosition),R=e||ht.test(N.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},V=e?function(t,e){if(t===e)return k=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!_.sortDetached&&e.compareDocumentPosition(t)===n?t===I||t.ownerDocument===F&&R(F,t)?-1:e===I||e.ownerDocument===F&&R(F,e)?1:S?J(S,t)-J(S,e):0:4&n?-1:1)}:function(t,e){if(t===e)return k=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,a=[t],l=[e];if(!r||!o)return t===I?-1:e===I?1:r?-1:o?1:S?J(S,t)-J(S,e):0;if(r===o)return s(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?s(a[i],l[i]):a[i]===F?-1:l[i]===F?1:0},I):I},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==I&&D(t),n=n.replace(lt,"='$1']"),_.matchesSelector&&L&&!U[n+" "]&&(!P||!P.test(n))&&(!$||!$.test(n)))try{var i=j.call(t,n);if(i||_.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return e(n,I,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==I&&D(t),R(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==I&&D(t);var n=w.attrHandle[e.toLowerCase()],i=n&&K.call(w.attrHandle,e.toLowerCase())?n(t,e,!L):void 0;return void 0!==i?i:_.attributes||!L?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.escape=function(t){return(t+"").replace(bt,_t)},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,r=0;if(k=!_.detectDuplicates,S=!_.sortStable&&t.slice(0),t.sort(V),k){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return S=null,t},C=e.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=C(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=C(e);return n},(w=e.selectors={cacheLength:50,createPseudo:i,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(vt,yt),t[3]=(t[3]||t[4]||t[5]||"").replace(vt,yt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return ft.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ut.test(n)&&(e=x(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(vt,yt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=B[t+" "];return e||(e=new RegExp("(^|"+tt+")"+t+"("+tt+"|$)"))&&B(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var o=e.attr(r,t);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(rt," ")+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var u,c,f,d,p,h,m=o!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(g){if(o){for(;m;){for(d=e;d=d[m];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=m="only"===t&&!h&&"nextSibling"}return!0}if(h=[s?g.firstChild:g.lastChild],s&&y){for(b=(p=(u=(c=(f=(d=g)[M]||(d[M]={}))[d.uniqueID]||(f[d.uniqueID]={}))[t]||[])[0]===H&&u[1])&&u[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(b=p=0)||h.pop();)if(1===d.nodeType&&++b&&d===e){c[t]=[H,p,b];break}}else if(y&&(b=p=(u=(c=(f=(d=e)[M]||(d[M]={}))[d.uniqueID]||(f[d.uniqueID]={}))[t]||[])[0]===H&&u[1]),!1===b)for(;(d=++p&&d&&d[m]||(b=p=0)||h.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&((c=(f=d[M]||(d[M]={}))[d.uniqueID]||(f[d.uniqueID]={}))[t]=[H,b]),d!==e)););return(b-=r)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,n){var r,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[M]?o(n):o.length>1?(r=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,r=o(t,n),s=r.length;s--;)t[i=J(t,r[s])]=!(e[i]=r[s])}):function(t){return o(t,0,r)}):o}},pseudos:{not:i(function(t){var e=[],n=[],r=T(t.replace(ot,"$1"));return r[M]?i(function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(vt,yt),function(e){return(e.textContent||e.innerText||C(e)).indexOf(t)>-1}}),lang:i(function(t){return ct.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(vt,yt).toLowerCase(),function(e){var n;do{if(n=L?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===N},focus:function(t){return t===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:a(!1),disabled:a(!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,n){return[n<0?n+e:n]}),even:l(function(t,e){for(var n=0;n=0;)t.push(i);return t}),gt:l(function(t,e,n){for(var i=n<0?n+e:n;++i2&&"ID"===(s=o[0]).type&&9===e.nodeType&&L&&w.relative[o[1].type]){if(!(e=(w.find.ID(s.matches[0].replace(vt,yt),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=ft.needsContext.test(t)?0:o.length;r--&&(s=o[r],!w.relative[a=s.type]);)if((l=w.find[a])&&(i=l(s.matches[0].replace(vt,yt),gt.test(o[0].type)&&u(e.parentNode)||e))){if(o.splice(r,1),!(t=i.length&&f(o)))return Y.apply(n,i),n;break}}return(c||T(t,d))(i,e,!L,n,!e||gt.test(t)&&u(e.parentNode)||e),n},_.sortStable=M.split("").sort(V).join("")===M,_.detectDuplicates=!!k,D(),_.sortDetached=r(function(t){return 1&t.compareDocumentPosition(I.createElement("fieldset"))}),r(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),_.attributes&&r(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(Z,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);pt.find=yt,pt.expr=yt.selectors,pt.expr[":"]=pt.expr.pseudos,pt.uniqueSort=pt.unique=yt.uniqueSort,pt.text=yt.getText,pt.isXMLDoc=yt.isXML,pt.contains=yt.contains,pt.escapeSelector=yt.escape;var bt=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&pt(t).is(n))break;i.push(t)}return i},_t=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},wt=pt.expr.match.needsContext,Ct=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Et=/^.[^:#\[\.,]*$/;pt.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?pt.find.matchesSelector(i,t)?[i]:[]:pt.find.matches(t,pt.grep(e,function(t){return 1===t.nodeType}))},pt.fn.extend({find:function(t){var e,n,i=this.length,r=this;if("string"!=typeof t)return this.pushStack(pt(t).filter(function(){for(e=0;e1?pt.uniqueSort(n):n},filter:function(t){return this.pushStack(o(this,t||[],!1))},not:function(t){return this.pushStack(o(this,t||[],!0))},is:function(t){return!!o(this,"string"==typeof t&&wt.test(t)?pt(t):t||[],!1).length}});var xt,Tt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(pt.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||xt,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:Tt.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof pt?e[0]:e,pt.merge(this,pt.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:et,!0)),Ct.test(i[1])&&pt.isPlainObject(e))for(i in e)pt.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=et.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):pt.isFunction(t)?void 0!==n.ready?n.ready(t):t(pt):pt.makeArray(t,this)}).prototype=pt.fn,xt=pt(et);var At=/^(?:parents|prev(?:Until|All))/,Ot={children:!0,contents:!0,next:!0,prev:!0};pt.fn.extend({has:function(t){var e=pt(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&pt.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?pt.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?st.call(pt(t),this[0]):st.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(pt.uniqueSort(pt.merge(this.get(),pt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),pt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return bt(t,"parentNode")},parentsUntil:function(t,e,n){return bt(t,"parentNode",n)},next:function(t){return s(t,"nextSibling")},prev:function(t){return s(t,"previousSibling")},nextAll:function(t){return bt(t,"nextSibling")},prevAll:function(t){return bt(t,"previousSibling")},nextUntil:function(t,e,n){return bt(t,"nextSibling",n)},prevUntil:function(t,e,n){return bt(t,"previousSibling",n)},siblings:function(t){return _t((t.parentNode||{}).firstChild,t)},children:function(t){return _t(t.firstChild)},contents:function(t){return r(t,"iframe")?t.contentDocument:(r(t,"template")&&(t=t.content||t),pt.merge([],t.childNodes))}},function(t,e){pt.fn[t]=function(n,i){var r=pt.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=pt.filter(i,r)),this.length>1&&(Ot[t]||pt.uniqueSort(r),At.test(t)&&r.reverse()),this.pushStack(r)}});var St=/[^\x20\t\r\n\f]+/g;pt.Callbacks=function(t){t="string"==typeof t?a(t):pt.extend({},t);var e,n,i,r,o=[],s=[],l=-1,u=function(){for(r=r||t.once,i=e=!0;s.length;l=-1)for(n=s.shift();++l-1;)o.splice(n,1),n<=l&&l--}),this},has:function(t){return t?pt.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||e||(o=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},pt.extend({Deferred:function(e){var n=[["notify","progress",pt.Callbacks("memory"),pt.Callbacks("memory"),2],["resolve","done",pt.Callbacks("once memory"),pt.Callbacks("once memory"),0,"resolved"],["reject","fail",pt.Callbacks("once memory"),pt.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return pt.Deferred(function(e){pt.each(n,function(n,i){var r=pt.isFunction(t[i[4]])&&t[i[4]];o[i[1]](function(){var t=r&&r.apply(this,arguments);t&&pt.isFunction(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[i[0]+"With"](this,r?[t]:arguments)})}),t=null}).promise()},then:function(e,i,r){function o(e,n,i,r){return function(){var a=this,c=arguments,f=function(){var t,f;if(!(e=s&&(i!==u&&(a=void 0,c=[t]),n.rejectWith(a,c))}};e?d():(pt.Deferred.getStackHook&&(d.stackTrace=pt.Deferred.getStackHook()),t.setTimeout(d))}}var s=0;return pt.Deferred(function(t){n[0][3].add(o(0,t,pt.isFunction(r)?r:l,t.notifyWith)),n[1][3].add(o(0,t,pt.isFunction(e)?e:l)),n[2][3].add(o(0,t,pt.isFunction(i)?i:u))}).promise()},promise:function(t){return null!=t?pt.extend(t,r):r}},o={};return pt.each(n,function(t,e){var s=e[2],a=e[5];r[e[1]]=s.add,a&&s.add(function(){i=a},n[3-t][2].disable,n[0][2].lock),s.add(e[3].fire),o[e[0]]=function(){return o[e[0]+"With"](this===o?void 0:this,arguments),this},o[e[0]+"With"]=s.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(t){var e=arguments.length,n=e,i=Array(n),r=it.call(arguments),o=pt.Deferred(),s=function(t){return function(n){i[t]=this,r[t]=arguments.length>1?it.call(arguments):n,--e||o.resolveWith(i,r)}};if(e<=1&&(c(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||pt.isFunction(r[n]&&r[n].then)))return o.then();for(;n--;)c(r[n],s(n),o.reject);return o.promise()}});var kt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;pt.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&kt.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},pt.readyException=function(e){t.setTimeout(function(){throw e})};var Dt=pt.Deferred();pt.fn.ready=function(t){return Dt.then(t).catch(function(t){pt.readyException(t)}),this},pt.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--pt.readyWait:pt.isReady)||(pt.isReady=!0,!0!==t&&--pt.readyWait>0||Dt.resolveWith(et,[pt]))}}),pt.ready.then=Dt.then,"complete"===et.readyState||"loading"!==et.readyState&&!et.documentElement.doScroll?t.setTimeout(pt.ready):(et.addEventListener("DOMContentLoaded",f),t.addEventListener("load",f));var It=function(t,e,n,i,r,o,s){var a=0,l=t.length,u=null==n;if("object"===pt.type(n)){r=!0;for(a in n)It(t,e,a,n[a],!0,o,s)}else if(void 0!==i&&(r=!0,pt.isFunction(i)||(s=!0),u&&(s?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(pt(t),n)})),e))for(;a1,null,!0)},removeData:function(t){return this.each(function(){$t.remove(this,t)})}}),pt.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=Lt.get(t,e),n&&(!i||Array.isArray(n)?i=Lt.access(t,e,pt.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=pt.queue(t,e),i=n.length,r=n.shift(),o=pt._queueHooks(t,e);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,function(){pt.dequeue(t,e)},o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Lt.get(t,n)||Lt.access(t,n,{empty:pt.Callbacks("once memory").add(function(){Lt.remove(t,[e+"queue",n])})})}}),pt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Vt=/^$|\/(?:java|ecma)script/i,Kt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Kt.optgroup=Kt.option,Kt.tbody=Kt.tfoot=Kt.colgroup=Kt.caption=Kt.thead,Kt.th=Kt.td;var zt=/<|&#?\w+;/;!function(){var t=et.createDocumentFragment().appendChild(et.createElement("div")),e=et.createElement("input");e.setAttribute("type","radio"),e.setAttribute("checked","checked"),e.setAttribute("name","t"),t.appendChild(e),dt.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",dt.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Qt=et.documentElement,Gt=/^key/,Yt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Xt=/^([^.]*)(?:\.(.+)|)/;pt.event={global:{},add:function(t,e,n,i,r){var o,s,a,l,u,c,f,d,p,h,m,g=Lt.get(t);if(g)for(n.handler&&(n=(o=n).handler,r=o.selector),r&&pt.find.matchesSelector(Qt,r),n.guid||(n.guid=pt.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(e){return void 0!==pt&&pt.event.triggered!==e.type?pt.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(St)||[""]).length;u--;)p=m=(a=Xt.exec(e[u])||[])[1],h=(a[2]||"").split(".").sort(),p&&(f=pt.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,f=pt.event.special[p]||{},c=pt.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&pt.expr.match.needsContext.test(r),namespace:h.join(".")},o),(d=l[p])||((d=l[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,i,h,s)||t.addEventListener&&t.addEventListener(p,s)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,c):d.push(c),pt.event.global[p]=!0)},remove:function(t,e,n,i,r){var o,s,a,l,u,c,f,d,p,h,m,g=Lt.hasData(t)&&Lt.get(t);if(g&&(l=g.events)){for(u=(e=(e||"").match(St)||[""]).length;u--;)if(a=Xt.exec(e[u])||[],p=m=a[1],h=(a[2]||"").split(".").sort(),p){for(f=pt.event.special[p]||{},d=l[p=(i?f.delegateType:f.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)c=d[o],!r&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(t,c));s&&!d.length&&(f.teardown&&!1!==f.teardown.call(t,h,g.handle)||pt.removeEvent(t,p,g.handle),delete l[p])}else for(p in l)pt.event.remove(t,p+e[u],n,i,!0);pt.isEmptyObject(l)&&Lt.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,o,s,a=pt.event.fix(t),l=new Array(arguments.length),u=(Lt.get(this,"events")||{})[a.type]||[],c=pt.event.special[a.type]||{};for(l[0]=a,e=1;e=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],s={},n=0;n-1:pt.find(r,this,null,[u]).length),s[r]&&o.push(i);o.length&&a.push({elem:u,handlers:o})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,Zt=/\s*$/g;pt.extend({htmlPrefilter:function(t){return t.replace(Jt,"<$1>")},clone:function(t,e,n){var i,r,o,s,a=t.cloneNode(!0),l=pt.contains(t.ownerDocument,t);if(!(dt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||pt.isXMLDoc(t)))for(s=y(a),i=0,r=(o=y(t)).length;i0&&b(s,!l&&y(t,"script")),a},cleanData:function(t){for(var e,n,i,r=pt.event.special,o=0;void 0!==(n=t[o]);o++)if(Nt(n)){if(e=n[Lt.expando]){if(e.events)for(i in e.events)r[i]?pt.event.remove(n,i):pt.removeEvent(n,i,e.handle);n[Lt.expando]=void 0}n[$t.expando]&&(n[$t.expando]=void 0)}}}),pt.fn.extend({detach:function(t){return I(this,t,!0)},remove:function(t){return I(this,t)},text:function(t){return It(this,function(t){return void 0===t?pt.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return D(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||T(this,t).appendChild(t)})},prepend:function(){return D(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=T(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return D(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return D(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(pt.cleanData(y(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return pt.clone(this,t,e)})},html:function(t){return It(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Zt.test(t)&&!Kt[(Ut.exec(t)||["",""])[1].toLowerCase()]){t=pt.htmlPrefilter(t);try{for(;n1)}}),pt.Tween=F,F.prototype={constructor:F,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||pt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(pt.cssNumber[n]?"":"px")},cur:function(){var t=F.propHooks[this.prop];return t&&t.get?t.get(this):F.propHooks._default.get(this)},run:function(t){var e,n=F.propHooks[this.prop];return this.options.duration?this.pos=e=pt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):F.propHooks._default.set(this),this}},F.prototype.init.prototype=F.prototype,F.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=pt.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){pt.fx.step[t.prop]?pt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[pt.cssProps[t.prop]]&&!pt.cssHooks[t.prop]?t.elem[t.prop]=t.now:pt.style(t.elem,t.prop,t.now+t.unit)}}},F.propHooks.scrollTop=F.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},pt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},pt.fx=F.prototype.init,pt.fx.step={};var de,pe,he=/^(?:toggle|show|hide)$/,me=/queueHooks$/;pt.Animation=pt.extend(V,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return m(n.elem,t,Mt.exec(e),n),n}]},tweener:function(t,e){pt.isFunction(t)?(e=t,t=["*"]):t=t.match(St);for(var n,i=0,r=t.length;i1)},removeAttr:function(t){return this.each(function(){pt.removeAttr(this,t)})}}),pt.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?pt.prop(t,e,n):(1===o&&pt.isXMLDoc(t)||(r=pt.attrHooks[e.toLowerCase()]||(pt.expr.match.bool.test(e)?ge:void 0)),void 0!==n?null===n?void pt.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=pt.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!dt.radioValue&&"radio"===e&&r(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,r=e&&e.match(St);if(r&&1===t.nodeType)for(;n=r[i++];)t.removeAttribute(n)}}),ge={set:function(t,e,n){return!1===e?pt.removeAttr(t,n):t.setAttribute(n,n),n}},pt.each(pt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ve[e]||pt.find.attr;ve[e]=function(t,e,i){var r,o,s=e.toLowerCase();return i||(o=ve[s],ve[s]=r,r=null!=n(t,e,i)?s:null,ve[s]=o),r}});var ye=/^(?:input|select|textarea|button)$/i,be=/^(?:a|area)$/i;pt.fn.extend({prop:function(t,e){return It(this,pt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[pt.propFix[t]||t]})}}),pt.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pt.isXMLDoc(t)||(e=pt.propFix[e]||e,r=pt.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=pt.find.attr(t,"tabindex");return e?parseInt(e,10):ye.test(t.nodeName)||be.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),dt.optSelected||(pt.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)}}),pt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pt.propFix[this.toLowerCase()]=this}),pt.fn.extend({addClass:function(t){var e,n,i,r,o,s,a,l=0;if(pt.isFunction(t))return this.each(function(e){pt(this).addClass(t.call(this,e,z(this)))});if("string"==typeof t&&t)for(e=t.match(St)||[];n=this[l++];)if(r=z(n),i=1===n.nodeType&&" "+K(r)+" "){for(s=0;o=e[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(a=K(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,r,o,s,a,l=0;if(pt.isFunction(t))return this.each(function(e){pt(this).removeClass(t.call(this,e,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(St)||[];n=this[l++];)if(r=z(n),i=1===n.nodeType&&" "+K(r)+" "){for(s=0;o=e[s++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");r!==(a=K(i))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):pt.isFunction(t)?this.each(function(n){pt(this).toggleClass(t.call(this,n,z(this),e),e)}):this.each(function(){var e,i,r,o;if("string"===n)for(i=0,r=pt(this),o=t.match(St)||[];e=o[i++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==n||((e=z(this))&&Lt.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Lt.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+K(z(n))+" ").indexOf(e)>-1)return!0;return!1}});var _e=/\r/g;pt.fn.extend({val:function(t){var e,n,i,r=this[0];if(arguments.length)return i=pt.isFunction(t),this.each(function(n){var r;1===this.nodeType&&(null==(r=i?t.call(this,n,pt(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=pt.map(r,function(t){return null==t?"":t+""})),(e=pt.valHooks[this.type]||pt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))});if(r)return(e=pt.valHooks[r.type]||pt.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(_e,""):null==n?"":n}}),pt.extend({valHooks:{option:{get:function(t){var e=pt.find.attr(t,"value");return null!=e?e:K(pt.text(t))}},select:{get:function(t){var e,n,i,o=t.options,s=t.selectedIndex,a="select-one"===t.type,l=a?null:[],u=a?s+1:o.length;for(i=s<0?u:a?s:0;i-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),pt.each(["radio","checkbox"],function(){pt.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=pt.inArray(pt(t).val(),e)>-1}},dt.checkOn||(pt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var we=/^(?:focusinfocus|focusoutblur)$/;pt.extend(pt.event,{trigger:function(e,n,i,r){var o,s,a,l,u,c,f,d=[i||et],p=ut.call(e,"type")?e.type:e,h=ut.call(e,"namespace")?e.namespace.split("."):[];if(s=a=i=i||et,3!==i.nodeType&&8!==i.nodeType&&!we.test(p+pt.event.triggered)&&(p.indexOf(".")>-1&&(p=(h=p.split(".")).shift(),h.sort()),u=p.indexOf(":")<0&&"on"+p,e=e[pt.expando]?e:new pt.Event(p,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:pt.makeArray(n,[e]),f=pt.event.special[p]||{},r||!f.trigger||!1!==f.trigger.apply(i,n))){if(!r&&!f.noBubble&&!pt.isWindow(i)){for(l=f.delegateType||p,we.test(l+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),a=s;a===(i.ownerDocument||et)&&d.push(a.defaultView||a.parentWindow||t)}for(o=0;(s=d[o++])&&!e.isPropagationStopped();)e.type=o>1?l:f.bindType||p,(c=(Lt.get(s,"events")||{})[e.type]&&Lt.get(s,"handle"))&&c.apply(s,n),(c=u&&s[u])&&c.apply&&Nt(s)&&(e.result=c.apply(s,n),!1===e.result&&e.preventDefault());return e.type=p,r||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(d.pop(),n)||!Nt(i)||u&&pt.isFunction(i[p])&&!pt.isWindow(i)&&((a=i[u])&&(i[u]=null),pt.event.triggered=p,i[p](),pt.event.triggered=void 0,a&&(i[u]=a)),e.result}},simulate:function(t,e,n){var i=pt.extend(new pt.Event,n,{type:t,isSimulated:!0});pt.event.trigger(i,null,e)}}),pt.fn.extend({trigger:function(t,e){return this.each(function(){pt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return pt.event.trigger(t,e,n,!0)}}),pt.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){pt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),pt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),dt.focusin="onfocusin"in t,dt.focusin||pt.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){pt.event.simulate(e,t.target,pt.event.fix(t))};pt.event.special[e]={setup:function(){var i=this.ownerDocument||this,r=Lt.access(i,e);r||i.addEventListener(t,n,!0),Lt.access(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=Lt.access(i,e)-1;r?Lt.access(i,e,r):(i.removeEventListener(t,n,!0),Lt.remove(i,e))}}});var Ce=t.location,Ee=pt.now(),xe=/\?/;pt.parseXML=function(e){var n;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||pt.error("Invalid XML: "+e),n};var Te=/\[\]$/,Ae=/\r?\n/g,Oe=/^(?:submit|button|image|reset|file)$/i,Se=/^(?:input|select|textarea|keygen)/i;pt.param=function(t,e){var n,i=[],r=function(t,e){var n=pt.isFunction(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(t)||t.jquery&&!pt.isPlainObject(t))pt.each(t,function(){r(this.name,this.value)});else for(n in t)Q(n,t[n],e,r);return i.join("&")},pt.fn.extend({serialize:function(){return pt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=pt.prop(this,"elements");return t?pt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!pt(this).is(":disabled")&&Se.test(this.nodeName)&&!Oe.test(t)&&(this.checked||!qt.test(t))}).map(function(t,e){var n=pt(this).val();return null==n?null:Array.isArray(n)?pt.map(n,function(t){return{name:e.name,value:t.replace(Ae,"\r\n")}}):{name:e.name,value:n.replace(Ae,"\r\n")}}).get()}});var ke=/%20/g,De=/#.*$/,Ie=/([?&])_=[^&]*/,Ne=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,$e=/^(?:GET|HEAD)$/,Pe=/^\/\//,je={},Re={},Me="*/".concat("*"),Fe=et.createElement("a");Fe.href=Ce.href,pt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ce.href,type:"GET",isLocal:Le.test(Ce.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Me,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":pt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?X(X(t,pt.ajaxSettings),e):X(pt.ajaxSettings,t)},ajaxPrefilter:G(je),ajaxTransport:G(Re),ajax:function(e,n){function i(e,n,i,a){var u,d,p,_,w,C=n;c||(c=!0,l&&t.clearTimeout(l),r=void 0,s=a||"",E.readyState=e>0?4:0,u=e>=200&&e<300||304===e,i&&(_=J(h,E,i)),_=Z(h,_,E,u),u?(h.ifModified&&((w=E.getResponseHeader("Last-Modified"))&&(pt.lastModified[o]=w),(w=E.getResponseHeader("etag"))&&(pt.etag[o]=w)),204===e||"HEAD"===h.type?C="nocontent":304===e?C="notmodified":(C=_.state,d=_.data,u=!(p=_.error))):(p=C,!e&&C||(C="error",e<0&&(e=0))),E.status=e,E.statusText=(n||C)+"",u?v.resolveWith(m,[d,C,E]):v.rejectWith(m,[E,C,p]),E.statusCode(b),b=void 0,f&&g.trigger(u?"ajaxSuccess":"ajaxError",[E,h,u?d:p]),y.fireWith(m,[E,C]),f&&(g.trigger("ajaxComplete",[E,h]),--pt.active||pt.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=void 0),n=n||{};var r,o,s,a,l,u,c,f,d,p,h=pt.ajaxSetup({},n),m=h.context||h,g=h.context&&(m.nodeType||m.jquery)?pt(m):pt.event,v=pt.Deferred(),y=pt.Callbacks("once memory"),b=h.statusCode||{},_={},w={},C="canceled",E={readyState:0,getResponseHeader:function(t){var e;if(c){if(!a)for(a={};e=Ne.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(t,e){return null==c&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,_[t]=e),this},overrideMimeType:function(t){return null==c&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)E.always(t[E.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||C;return r&&r.abort(e),i(0,e),this}};if(v.promise(E),h.url=((e||h.url||Ce.href)+"").replace(Pe,Ce.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(St)||[""],null==h.crossDomain){u=et.createElement("a");try{u.href=h.url,u.href=u.href,h.crossDomain=Fe.protocol+"//"+Fe.host!=u.protocol+"//"+u.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=pt.param(h.data,h.traditional)),Y(je,h,n,E),c)return E;(f=pt.event&&h.global)&&0==pt.active++&&pt.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!$e.test(h.type),o=h.url.replace(De,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(ke,"+")):(p=h.url.slice(o.length),h.data&&(o+=(xe.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ie,"$1"),p=(xe.test(o)?"&":"?")+"_="+Ee+++p),h.url=o+p),h.ifModified&&(pt.lastModified[o]&&E.setRequestHeader("If-Modified-Since",pt.lastModified[o]),pt.etag[o]&&E.setRequestHeader("If-None-Match",pt.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Me+"; q=0.01":""):h.accepts["*"]);for(d in h.headers)E.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(m,E,h)||c))return E.abort();if(C="abort",y.add(h.complete),E.done(h.success),E.fail(h.error),r=Y(Re,h,n,E)){if(E.readyState=1,f&&g.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(l=t.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,r.send(_,i)}catch(t){if(c)throw t;i(-1,t)}}else i(-1,"No Transport");return E},getJSON:function(t,e,n){return pt.get(t,e,n,"json")},getScript:function(t,e){return pt.get(t,void 0,e,"script")}}),pt.each(["get","post"],function(t,e){pt[e]=function(t,n,i,r){return pt.isFunction(n)&&(r=r||i,i=n,n=void 0),pt.ajax(pt.extend({url:t,type:e,dataType:r,data:n,success:i},pt.isPlainObject(t)&&t))}}),pt._evalUrl=function(t){return pt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},pt.fn.extend({wrapAll:function(t){var e;return this[0]&&(pt.isFunction(t)&&(t=t.call(this[0])),e=pt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return pt.isFunction(t)?this.each(function(e){pt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=pt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=pt.isFunction(t);return this.each(function(n){pt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){pt(this).replaceWith(this.childNodes)}),this}}),pt.expr.pseudos.hidden=function(t){return!pt.expr.pseudos.visible(t)},pt.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},pt.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var He={0:200,1223:204},We=pt.ajaxSettings.xhr();dt.cors=!!We&&"withCredentials"in We,dt.ajax=We=!!We,pt.ajaxTransport(function(e){var n,i;if(dt.cors||We&&!e.crossDomain)return{send:function(r,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(s in r)a.setRequestHeader(s,r[s]);n=function(t){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(He[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(e.hasContent&&e.data||null)}catch(t){if(n)throw t}},abort:function(){n&&n()}}}),pt.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),pt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return pt.globalEval(t),t}}}),pt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),pt.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(i,r){e=pt("