diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 691131293a..3c0ca31922 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -918,7 +918,7 @@ OC.Uploader.prototype = _.extend({ */ add: function(e, data) { self.log('add', e, data); - var that = $(this), freeSpace; + var that = $(this), freeSpace = 0; var upload = new OC.FileUpload(self, data); // can't link directly due to jQuery not liking cyclic deps on its ajax object @@ -989,13 +989,20 @@ OC.Uploader.prototype = _.extend({ } // check free space - freeSpace = $('#free_space').val(); + if (!self.fileList || upload.getTargetFolder() === self.fileList.getCurrentDirectory()) { + // Use global free space if there is no file list to check or the current directory is the target + freeSpace = $('#free_space').val() + } else if (upload.getTargetFolder().indexOf(self.fileList.getCurrentDirectory()) === 0) { + // Check subdirectory free space if file is uploaded there + var targetSubdir = upload._targetFolder.replace(self.fileList.getCurrentDirectory(), '') + freeSpace = parseInt(upload.uploader.fileList.getModelForFile(targetSubdir).get('quotaAvailableBytes')) + } if (freeSpace >= 0 && selection.totalBytes > freeSpace) { data.textStatus = 'notenoughspace'; data.errorThrown = t('files', 'Not enough free space, you are uploading {size1} but only {size2} is left', { 'size1': OC.Util.humanFileSize(selection.totalBytes), - 'size2': OC.Util.humanFileSize($('#free_space').val()) + 'size2': OC.Util.humanFileSize(freeSpace) }); } diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 86e978d178..30bc35551d 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1236,6 +1236,7 @@ mtime: parseInt($el.attr('data-mtime'), 10), type: $el.attr('data-type'), etag: $el.attr('data-etag'), + quotaAvailableBytes: $el.attr('data-quota'), permissions: parseInt($el.attr('data-permissions'), 10), hasPreview: $el.attr('data-has-preview') === 'true', isEncrypted: $el.attr('data-e2eencrypted') === 'true' @@ -1495,6 +1496,7 @@ "data-mime": mime, "data-mtime": mtime, "data-etag": fileData.etag, + "data-quota": fileData.quotaAvailableBytes, "data-permissions": permissions, "data-has-preview": fileData.hasPreview !== false, "data-e2eencrypted": fileData.isEncrypted === true diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index daa9173545..04a71c1ce8 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -2238,6 +2238,7 @@ describe('OCA.Files.FileList tests', function() { type: 'file', size: 12, etag: 'abc', + quotaAvailableBytes: '-1', permissions: OC.PERMISSION_ALL, hasPreview: true, isEncrypted: false @@ -2249,6 +2250,7 @@ describe('OCA.Files.FileList tests', function() { mimetype: 'application/pdf', mtime: 234560000, size: 58009, + quotaAvailableBytes: '-1', etag: '123', permissions: OC.PERMISSION_ALL, hasPreview: true, @@ -2261,6 +2263,7 @@ describe('OCA.Files.FileList tests', function() { mimetype: 'httpd/unix-directory', mtime: 134560000, size: 250, + quotaAvailableBytes: '-1', etag: '456', permissions: OC.PERMISSION_ALL, hasPreview: true, @@ -2284,6 +2287,7 @@ describe('OCA.Files.FileList tests', function() { mtime: 123456789, type: 'file', size: 12, + quotaAvailableBytes: '-1', etag: 'abc', permissions: OC.PERMISSION_ALL, hasPreview: true, @@ -2296,6 +2300,7 @@ describe('OCA.Files.FileList tests', function() { mimetype: 'httpd/unix-directory', mtime: 134560000, size: 250, + quotaAvailableBytes: '-1', etag: '456', permissions: OC.PERMISSION_ALL, hasPreview: true, diff --git a/core/js/dist/files_client.js b/core/js/dist/files_client.js index bb65b0ae93..884f2cd5cf 100644 --- a/core/js/dist/files_client.js +++ b/core/js/dist/files_client.js @@ -1,2 +1,2 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=699)}({0:function(e,t,n){var r;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";var o=[],u=n.document,a=Object.getPrototypeOf,s=o.slice,c=o.concat,l=o.push,f=o.indexOf,d={},p=d.toString,h=d.hasOwnProperty,g=h.toString,v=g.call(Object),m={};function y(e,t){var n=(t=t||u).createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}var b=function(e,t){return new b.fn.init(e,t)},x=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^-ms-/,T=/-([a-z])/g,S=function(e,t){return t.toUpperCase()};function E(e){var t=!!e&&"length"in e&&e.length,n=b.type(e);return"function"!==n&&!b.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}b.fn=b.prototype={jquery:"3.1.1",constructor:b,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return b.each(this,e)},map:function(e){return this.pushStack(b.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+q+")"+q+"*"),$=new RegExp("="+q+"*([^\\]'\"]*?)"+q+"*\\]","g"),V=new RegExp(H),z=new RegExp("^"+I+"$"),X={"ID":new RegExp("^#("+I+")"),"CLASS":new RegExp("^\\.("+I+")"),"TAG":new RegExp("^("+I+"|[*])"),"ATTR":new RegExp("^"+F),"PSEUDO":new RegExp("^"+H),"CHILD":new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+q+"*(even|odd|(([+-]|)(\\d*)n|)"+q+"*(?:([+-]|)"+q+"*(\\d+)|))"+q+"*\\)|)","i"),"bool":new RegExp("^(?:"+L+")$","i"),"needsContext":new RegExp("^"+q+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+q+"*((?:-\\d)?\\d*)"+q+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+q+"?|("+q+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){d()},ie=ye((function(e){return!0===e.disabled&&("form"in e||"label"in e)}),{dir:"parentNode",next:"legend"});try{k.apply(O=P.call(w.childNodes),w.childNodes),O[w.childNodes.length].nodeType}catch(e){k={apply:O.length?function(e,t){A.apply(e,P.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,r,i){var o,a,c,l,f,h,m,y=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==p&&d(t),t=t||p,g)){if(11!==T&&(f=Q.exec(e)))if(o=f[1]){if(9===T){if(!(c=t.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(y&&(c=y.getElementById(o))&&b(t,c)&&c.id===o)return r.push(c),r}else{if(f[2])return k.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return k.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!N[e+" "]&&(!v||!v.test(e))){if(1!==T)y=t,m=e;else if("object"!==t.nodeName.toLowerCase()){for((l=t.getAttribute("id"))?l=l.replace(te,ne):t.setAttribute("id",l=x),a=(h=u(e)).length;a--;)h[a]="#"+l+" "+me(h[a]);m=h.join(","),y=J.test(e)&&ge(t.parentNode)||t}if(m)try{return k.apply(r,y.querySelectorAll(m)),r}catch(e){}finally{l===x&&t.removeAttribute("id")}}}return s(e.replace(U,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ae(e){return e[x]=!0,e}function se(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function le(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function de(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return ae((function(t){return t=+t,ae((function(n,r){for(var i,o=e([],n.length,t),u=o.length;u--;)n[i=o[u]]&&(n[i]=!(r[i]=n[i]))}))}))}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},d=oe.setDocument=function(e){var t,i,u=e?e.ownerDocument||e:w;return u!==p&&9===u.nodeType&&u.documentElement?(h=(p=u).documentElement,g=!o(p),w!==p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=se((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=se((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=K.test(p.getElementsByClassName),n.getById=se((function(e){return h.appendChild(e).id=x,!p.getElementsByName||!p.getElementsByName(x).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},m=[],v=[],(n.qsa=K.test(p.querySelectorAll))&&(se((function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+q+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+q+"*(?:value|"+L+")"),e.querySelectorAll("[id~="+x+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||v.push(".#.+[+~]")})),se((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+q+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=K.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&se((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),m.push("!=",H)})),v=v.length&&new RegExp(v.join("|")),m=m.length&&new RegExp(m.join("|")),t=K.test(h.compareDocumentPosition),b=t||K.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},_=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===p||e.ownerDocument===w&&b(w,e)?-1:t===p||t.ownerDocument===w&&b(w,t)?1:l?R(l,e)-R(l,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,u=[e],a=[t];if(!i||!o)return e===p?-1:t===p?1:i?-1:o?1:l?R(l,e)-R(l,t):0;if(i===o)return le(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;u[r]===a[r];)r++;return r?le(u[r],a[r]):u[r]===w?-1:a[r]===w?1:0},p):p},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&d(e),t=t.replace($,"='$1']"),n.matchesSelector&&g&&!N[t+" "]&&(!m||!m.test(t))&&(!v||!v.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,p,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==p&&d(e),b(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==p&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&D.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(_),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return l=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:ae,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{"ATTR":function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},"CHILD":function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},"PSEUDO":function(e){var t,n=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=u(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{"TAG":function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},"CLASS":function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+q+")"+e+"("+q+"|$)"))&&E(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},"ATTR":function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(M," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},"CHILD":function(e,t,n,r,i){var o="nth"!==e.slice(0,3),u="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,s){var c,l,f,d,p,h,g=o!==u?"nextSibling":"previousSibling",v=t.parentNode,m=a&&t.nodeName.toLowerCase(),y=!s&&!a,b=!1;if(v){if(o){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===m:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[u?v.firstChild:v.lastChild],u&&y){for(b=(p=(c=(l=(f=(d=v)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===T&&c[1])&&c[2],d=p&&v.childNodes[p];d=++p&&d&&d[g]||(b=p=0)||h.pop();)if(1===d.nodeType&&++b&&d===t){l[e]=[T,p,b];break}}else if(y&&(b=p=(c=(l=(f=(d=t)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===T&&c[1]),!1===b)for(;(d=++p&&d&&d[g]||(b=p=0)||h.pop())&&((a?d.nodeName.toLowerCase()!==m:1!==d.nodeType)||!++b||(y&&((l=(f=d[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]=[T,b]),d!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},"PSEUDO":function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[x]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ae((function(e,n){for(var r,o=i(e,t),u=o.length;u--;)e[r=R(e,o[u])]=!(n[r]=o[u])})):function(e){return i(e,0,n)}):i}},pseudos:{"not":ae((function(e){var t=[],n=[],r=a(e.replace(U,"$1"));return r[x]?ae((function(e,t,n,i){for(var o,u=r(e,null,i,[]),a=e.length;a--;)(o=u[a])&&(e[a]=!(t[a]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),"has":ae((function(e){return function(t){return oe(e,t).length>0}})),"contains":ae((function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}})),"lang":ae((function(e){return z.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),"target":function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},"root":function(e){return e===h},"focus":function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},"enabled":pe(!1),"disabled":pe(!0),"checked":function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},"selected":function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},"empty":function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},"parent":function(e){return!r.pseudos.empty(e)},"header":function(e){return G.test(e.nodeName)},"input":function(e){return Y.test(e.nodeName)},"button":function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},"text":function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},"first":he((function(){return[0]})),"last":he((function(e,t){return[t-1]})),"eq":he((function(e,t,n){return[n<0?n+t:n]})),"even":he((function(e,t){for(var n=0;n=0;)e.push(r);return e})),"gt":he((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xe(e,t,n,r,i){for(var o,u=[],a=0,s=e.length,c=null!=t;a-1&&(o[c]=!(u[c]=f))}}else m=xe(m===u?m.splice(h,m.length):m),i?i(null,u,m,s):k.apply(u,m)}))}function Te(e){for(var t,n,i,o=e.length,u=r.relative[e[0].type],a=u||r.relative[" "],s=u?1:0,l=ye((function(e){return e===t}),a,!0),f=ye((function(e){return R(t,e)>-1}),a,!0),d=[function(e,n,r){var i=!u&&(r||n!==c)||((t=n).nodeType?l(e,n,r):f(e,n,r));return t=null,i}];s1&&be(d),s>1&&me(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(U,"$1"),n,s0,i=e.length>0,o=function(o,u,a,s,l){var f,h,v,m=0,y="0",b=o&&[],x=[],w=c,S=o||i&&r.find.TAG("*",l),E=T+=null==w?1:Math.random()||.1,C=S.length;for(l&&(c=u===p||u||l);y!==C&&null!=(f=S[y]);y++){if(i&&f){for(h=0,u||f.ownerDocument===p||(d(f),a=!g);v=e[h++];)if(v(f,u||p,a)){s.push(f);break}l&&(T=E)}n&&((f=!v&&f)&&m--,o&&b.push(f))}if(m+=y,n&&y!==m){for(h=0;v=t[h++];)v(b,x,u,a);if(o){if(m>0)for(;y--;)b[y]||x[y]||(x[y]=j.call(s));x=xe(x)}k.apply(s,x),l&&!o&&x.length>0&&m+t.length>1&&oe.uniqueSort(s)}return l&&(T=E,c=w),b};return n?ae(o):o}(o,i))).selector=e}return a},s=oe.select=function(e,t,n,i){var o,s,c,l,f,d="function"==typeof e&&e,p=!i&&u(e=d.selector||e);if(n=n||[],1===p.length){if((s=p[0]=p[0].slice(0)).length>2&&"ID"===(c=s[0]).type&&9===t.nodeType&&g&&r.relative[s[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(Z,ee),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(s.shift().value.length)}for(o=X.needsContext.test(e)?0:s.length;o--&&(c=s[o],!r.relative[l=c.type]);)if((f=r.find[l])&&(i=f(c.matches[0].replace(Z,ee),J.test(s[0].type)&&ge(t.parentNode)||t))){if(s.splice(o,1),!(e=i.length&&me(s)))return k.apply(n,i),n;break}}return(d||a(e,p))(i,t,!g,n,!t||J.test(e)&&ge(t.parentNode)||t),n},n.sortStable=x.split("").sort(_).join("")===x,n.detectDuplicates=!!f,d(),n.sortDetached=se((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),se((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||ce("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&se((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ce("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),se((function(e){return null==e.getAttribute("disabled")}))||ce(L,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),oe}(n);b.find=C,b.expr=C.selectors,b.expr[":"]=b.expr.pseudos,b.uniqueSort=b.unique=C.uniqueSort,b.text=C.getText,b.isXMLDoc=C.isXML,b.contains=C.contains,b.escapeSelector=C.escape;var N=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&b(e).is(n))break;r.push(e)}return r},_=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=b.expr.match.needsContext,O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,j=/^.[^:#\[\.,]*$/;function A(e,t,n){return b.isFunction(t)?b.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?b.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?b.grep(e,(function(e){return f.call(t,e)>-1!==n})):j.test(t)?b.filter(t,e,n):(t=b.filter(t,e),b.grep(e,(function(e){return f.call(t,e)>-1!==n&&1===e.nodeType})))}b.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?b.find.matchesSelector(r,e)?[r]:[]:b.find.matches(e,b.grep(t,(function(e){return 1===e.nodeType})))},b.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(b(e).filter((function(){for(t=0;t1?b.uniqueSort(n):n},filter:function(e){return this.pushStack(A(this,e||[],!1))},not:function(e){return this.pushStack(A(this,e||[],!0))},is:function(e){return!!A(this,"string"==typeof e&&D.test(e)?b(e):e||[],!1).length}});var k,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(b.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:P.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof b?t[0]:t,b.merge(this,b.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),O.test(r[1])&&b.isPlainObject(t))for(r in t)b.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=u.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):b.isFunction(e)?void 0!==n.ready?n.ready(e):e(b):b.makeArray(e,this)}).prototype=b.fn,k=b(u);var R=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function q(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}b.fn.extend({has:function(e){var t=b(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&b.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?b.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?f.call(b(e),this[0]):f.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(b.uniqueSort(b.merge(this.get(),b(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return N(e,"parentNode")},parentsUntil:function(e,t,n){return N(e,"parentNode",n)},next:function(e){return q(e,"nextSibling")},prev:function(e){return q(e,"previousSibling")},nextAll:function(e){return N(e,"nextSibling")},prevAll:function(e){return N(e,"previousSibling")},nextUntil:function(e,t,n){return N(e,"nextSibling",n)},prevUntil:function(e,t,n){return N(e,"previousSibling",n)},siblings:function(e){return _((e.parentNode||{}).firstChild,e)},children:function(e){return _(e.firstChild)},contents:function(e){return e.contentDocument||b.merge([],e.childNodes)}},(function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),this.length>1&&(L[e]||b.uniqueSort(i),R.test(e)&&i.reverse()),this.pushStack(i)}}));var I=/[^\x20\t\r\n\f]+/g;function F(e){return e}function H(e){throw e}function M(e,t,n){var r;try{e&&b.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&b.isFunction(r=e.then)?r.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}b.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return b.each(e.match(I)||[],(function(e,n){t[n]=!0})),t}(e):b.extend({},e);var t,n,r,i,o=[],u=[],a=-1,s=function(){for(i=e.once,r=t=!0;u.length;a=-1)for(n=u.shift();++a-1;)o.splice(n,1),n<=a&&a--})),this},has:function(e){return e?b.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=u=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=u=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],u.push(n),t||s()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},b.extend({Deferred:function(e){var t=[["notify","progress",b.Callbacks("memory"),b.Callbacks("memory"),2],["resolve","done",b.Callbacks("once memory"),b.Callbacks("once memory"),0,"resolved"],["reject","fail",b.Callbacks("once memory"),b.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return b.Deferred((function(n){b.each(t,(function(t,r){var i=b.isFunction(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var o=0;function u(e,t,r,i){return function(){var a=this,s=arguments,c=function(){var n,c;if(!(e=o&&(r!==H&&(a=void 0,s=[n]),t.rejectWith(a,s))}};e?l():(b.Deferred.getStackHook&&(l.stackTrace=b.Deferred.getStackHook()),n.setTimeout(l))}}return b.Deferred((function(n){t[0][3].add(u(0,n,b.isFunction(i)?i:F,n.notifyWith)),t[1][3].add(u(0,n,b.isFunction(e)?e:F)),t[2][3].add(u(0,n,b.isFunction(r)?r:H))})).promise()},promise:function(e){return null!=e?b.extend(e,i):i}},o={};return b.each(t,(function(e,n){var u=n[2],a=n[5];i[n[1]]=u.add,a&&u.add((function(){r=a}),t[3-e][2].disable,t[0][2].lock),u.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=u.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=b.Deferred(),u=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(M(e,o.done(u(n)).resolve,o.reject),"pending"===o.state()||b.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)M(i[n],u(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;b.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&U.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},b.readyException=function(e){n.setTimeout((function(){throw e}))};var B=b.Deferred();function W(){u.removeEventListener("DOMContentLoaded",W),n.removeEventListener("load",W),b.ready()}b.fn.ready=function(e){return B.then(e).catch((function(e){b.readyException(e)})),this},b.extend({isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){(!0===e?--b.readyWait:b.isReady)||(b.isReady=!0,!0!==e&&--b.readyWait>0||B.resolveWith(u,[b]))}}),b.ready.then=B.then,"complete"===u.readyState||"loading"!==u.readyState&&!u.documentElement.doScroll?n.setTimeout(b.ready):(u.addEventListener("DOMContentLoaded",W),n.addEventListener("load",W));var $=function(e,t,n,r,i,o,u){var a=0,s=e.length,c=null==n;if("object"===b.type(n))for(a in i=!0,n)$(e,t,a,n[a],!0,o,u);else if(void 0!==r&&(i=!0,b.isFunction(r)||(u=!0),c&&(u?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(b(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each((function(){Y.remove(this,e)}))}}),b.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=X.get(e,t),n&&(!r||b.isArray(n)?r=X.access(e,t,b.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){b.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return X.get(e,n)||X.access(e,n,{empty:b.Callbacks("once memory").add((function(){X.remove(e,[t+"queue",n])}))})}}),b.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,ce=/^$|\/(?:java|ecma)script/i,le={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function fe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&b.nodeName(e,t)?b.merge([e],n):n}function de(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(c=b.contains(o.ownerDocument,o),u=fe(f.appendChild(o),"script"),c&&de(u),n)for(l=0;o=u[l++];)ce.test(o.type||"")&&n.push(o);return f}pe=u.createDocumentFragment().appendChild(u.createElement("div")),(he=u.createElement("input")).setAttribute("type","radio"),he.setAttribute("checked","checked"),he.setAttribute("name","t"),pe.appendChild(he),m.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="",m.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue;var me=u.documentElement,ye=/^key/,be=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xe=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Se(){try{return u.activeElement}catch(e){}}function Ee(e,t,n,r,i,o){var u,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(u=i,(i=function(e){return b().off(e),u.apply(this,arguments)}).guid=u.guid||(u.guid=b.guid++)),e.each((function(){b.event.add(this,t,i,r,n)}))}b.event={global:{},add:function(e,t,n,r,i){var o,u,a,s,c,l,f,d,p,h,g,v=X.get(e);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&b.find.matchesSelector(me,i),n.guid||(n.guid=b.guid++),(s=v.events)||(s=v.events={}),(u=v.handle)||(u=v.handle=function(t){return void 0!==b&&b.event.triggered!==t.type?b.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(I)||[""]).length;c--;)p=g=(a=xe.exec(t[c])||[])[1],h=(a[2]||"").split(".").sort(),p&&(f=b.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=b.event.special[p]||{},l=b.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&b.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=s[p])||((d=s[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,u)||e.addEventListener&&e.addEventListener(p,u)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,l):d.push(l),b.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,u,a,s,c,l,f,d,p,h,g,v=X.hasData(e)&&X.get(e);if(v&&(s=v.events)){for(c=(t=(t||"").match(I)||[""]).length;c--;)if(p=g=(a=xe.exec(t[c])||[])[1],h=(a[2]||"").split(".").sort(),p){for(f=b.event.special[p]||{},d=s[p=(r?f.delegateType:f.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=d.length;o--;)l=d[o],!i&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(o,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(e,l));u&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||b.removeEvent(e,p,v.handle),delete s[p])}else for(p in s)b.event.remove(e,p+t[c],n,r,!0);b.isEmptyObject(s)&&X.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,u,a=b.event.fix(e),s=new Array(arguments.length),c=(X.get(this,"events")||{})[a.type]||[],l=b.event.special[a.type]||{};for(s[0]=a,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],u={},n=0;n-1:b.find(i,this,null,[c]).length),u[i]&&o.push(r);o.length&&a.push({elem:c,handlers:o})}return c=this,s\x20\t\r\n\f]*)[^>]*)\/>/gi,Ne=/\s*$/g;function je(e,t){return b.nodeName(e,"table")&&b.nodeName(11!==t.nodeType?t:t.firstChild,"tr")&&e.getElementsByTagName("tbody")[0]||e}function Ae(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ke(e){var t=De.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,u,a,s,c;if(1===t.nodeType){if(X.hasData(e)&&(o=X.access(e),u=X.set(t,o),c=o.events))for(i in delete u.handle,u.events={},c)for(n=0,r=c[i].length;n1&&"string"==typeof h&&!m.checkClone&&_e.test(h))return e.each((function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),Re(o,t,n,r)}));if(d&&(o=(i=ve(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(u=b.map(fe(i,"script"),Ae)).length;f")},clone:function(e,t,n){var r,i,o,u,a,s,c,l=e.cloneNode(!0),f=b.contains(e.ownerDocument,e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(u=fe(l),r=0,i=(o=fe(e)).length;r0&&de(u,!f&&fe(e,"script")),l},cleanData:function(e){for(var t,n,r,i=b.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[X.expando]){if(t.events)for(r in t.events)i[r]?b.event.remove(n,r):b.removeEvent(n,r,t.handle);n[X.expando]=void 0}n[Y.expando]&&(n[Y.expando]=void 0)}}}),b.fn.extend({detach:function(e){return Le(this,e,!0)},remove:function(e){return Le(this,e)},text:function(e){return $(this,(function(e){return void 0===e?b.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 Re(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)}))},prepend:function(){return Re(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Re(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Re(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(b.cleanData(fe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return b.clone(this,e,t)}))},html:function(e){return $(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!le[(se.exec(e)||["",""])[1].toLowerCase()]){e=b.htmlPrefilter(e);try{for(;n1)}}),b.Tween=Ke,Ke.prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||b.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}},Ke.prototype.init.prototype=Ke.prototype,Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=b.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[b.cssProps[e.prop]]&&!b.cssHooks[e.prop]?e.elem[e.prop]=e.now:b.style(e.elem,e.prop,e.now+e.unit)}}},Ke.propHooks.scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},b.fx=Ke.prototype.init,b.fx.step={};var Qe,Je,Ze=/^(?:toggle|show|hide)$/,et=/queueHooks$/;function tt(){Je&&(n.requestAnimationFrame(tt),b.fx.tick())}function nt(){return n.setTimeout((function(){Qe=void 0})),Qe=b.now()}function rt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ee[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function it(e,t,n){for(var r,i=(ot.tweeners[t]||[]).concat(ot.tweeners["*"]),o=0,u=i.length;o1)},removeAttr:function(e){return this.each((function(){b.removeAttr(this,e)}))}}),b.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?b.prop(e,t,n):(1===o&&b.isXMLDoc(e)||(i=b.attrHooks[t.toLowerCase()]||(b.expr.match.bool.test(t)?ut:void 0)),void 0!==n?null===n?void b.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=b.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(I);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ut={set:function(e,t,n){return!1===t?b.removeAttr(e,n):e.setAttribute(n,n),n}},b.each(b.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=at[t]||b.find.attr;at[t]=function(e,t,r){var i,o,u=t.toLowerCase();return r||(o=at[u],at[u]=i,i=null!=n(e,t,r)?u:null,at[u]=o),i}}));var st=/^(?:input|select|textarea|button)$/i,ct=/^(?:a|area)$/i;function lt(e){return(e.match(I)||[]).join(" ")}function ft(e){return e.getAttribute&&e.getAttribute("class")||""}b.fn.extend({prop:function(e,t){return $(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[b.propFix[e]||e]}))}}),b.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&b.isXMLDoc(e)||(t=b.propFix[t]||t,i=b.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=b.find.attr(e,"tabindex");return t?parseInt(t,10):st.test(e.nodeName)||ct.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),m.optSelected||(b.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),b.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){b.propFix[this.toLowerCase()]=this})),b.fn.extend({addClass:function(e){var t,n,r,i,o,u,a,s=0;if(b.isFunction(e))return this.each((function(t){b(this).addClass(e.call(this,t,ft(this)))}));if("string"==typeof e&&e)for(t=e.match(I)||[];n=this[s++];)if(i=ft(n),r=1===n.nodeType&&" "+lt(i)+" "){for(u=0;o=t[u++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=lt(r))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,u,a,s=0;if(b.isFunction(e))return this.each((function(t){b(this).removeClass(e.call(this,t,ft(this)))}));if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(I)||[];n=this[s++];)if(i=ft(n),r=1===n.nodeType&&" "+lt(i)+" "){for(u=0;o=t[u++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(a=lt(r))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):b.isFunction(e)?this.each((function(n){b(this).toggleClass(e.call(this,n,ft(this),t),t)})):this.each((function(){var t,r,i,o;if("string"===n)for(r=0,i=b(this),o=e.match(I)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=ft(this))&&X.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":X.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+lt(ft(n))+" ").indexOf(t)>-1)return!0;return!1}});var dt=/\r/g;b.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=b.isFunction(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,b(this).val()):e)?i="":"number"==typeof i?i+="":b.isArray(i)&&(i=b.map(i,(function(e){return null==e?"":e+""}))),(t=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=b.valHooks[i.type]||b.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(dt,""):null==n?"":n:void 0}}),b.extend({valHooks:{option:{get:function(e){var t=b.find.attr(e,"value");return null!=t?t:lt(b.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,u="select-one"===e.type,a=u?null:[],s=u?o+1:i.length;for(r=o<0?s:u?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),b.each(["radio","checkbox"],(function(){b.valHooks[this]={set:function(e,t){if(b.isArray(t))return e.checked=b.inArray(b(e).val(),t)>-1}},m.checkOn||(b.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var pt=/^(?:focusinfocus|focusoutblur)$/;b.extend(b.event,{trigger:function(e,t,r,i){var o,a,s,c,l,f,d,p=[r||u],g=h.call(e,"type")?e.type:e,v=h.call(e,"namespace")?e.namespace.split("."):[];if(a=s=r=r||u,3!==r.nodeType&&8!==r.nodeType&&!pt.test(g+b.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),l=g.indexOf(":")<0&&"on"+g,(e=e[b.expando]?e:new b.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:b.makeArray(t,[e]),d=b.event.special[g]||{},i||!d.trigger||!1!==d.trigger.apply(r,t))){if(!i&&!d.noBubble&&!b.isWindow(r)){for(c=d.delegateType||g,pt.test(c+g)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(r.ownerDocument||u)&&p.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=p[o++])&&!e.isPropagationStopped();)e.type=o>1?c:d.bindType||g,(f=(X.get(a,"events")||{})[e.type]&&X.get(a,"handle"))&&f.apply(a,t),(f=l&&a[l])&&f.apply&&V(a)&&(e.result=f.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!V(r)||l&&b.isFunction(r[g])&&!b.isWindow(r)&&((s=r[l])&&(r[l]=null),b.event.triggered=g,r[g](),b.event.triggered=void 0,s&&(r[l]=s)),e.result}},simulate:function(e,t,n){var r=b.extend(new b.Event,n,{type:e,isSimulated:!0});b.event.trigger(r,null,t)}}),b.fn.extend({trigger:function(e,t){return this.each((function(){b.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return b.event.trigger(e,t,n,!0)}}),b.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}})),b.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),m.focusin="onfocusin"in n,m.focusin||b.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){b.event.simulate(t,e.target,b.event.fix(e))};b.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=X.access(r,t);i||r.addEventListener(e,n,!0),X.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=X.access(r,t)-1;i?X.access(r,t,i):(r.removeEventListener(e,n,!0),X.remove(r,t))}}}));var ht=n.location,gt=b.now(),vt=/\?/;b.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+e),t};var mt=/\[\]$/,yt=/\r?\n/g,bt=/^(?:submit|button|image|reset|file)$/i,xt=/^(?:input|select|textarea|keygen)/i;function wt(e,t,n,r){var i;if(b.isArray(t))b.each(t,(function(t,i){n||mt.test(e)?r(e,i):wt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==b.type(t))r(e,t);else for(i in t)wt(e+"["+i+"]",t[i],n,r)}b.param=function(e,t){var n,r=[],i=function(e,t){var n=b.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,(function(){i(this.name,this.value)}));else for(n in e)wt(n,e[n],t,i);return r.join("&")},b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&xt.test(this.nodeName)&&!bt.test(e)&&(this.checked||!ae.test(e))})).map((function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,(function(e){return{name:t.name,value:e.replace(yt,"\r\n")}})):{name:t.name,value:n.replace(yt,"\r\n")}})).get()}});var Tt=/%20/g,St=/#.*$/,Et=/([?&])_=[^&]*/,Ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,Nt=/^(?:GET|HEAD)$/,_t=/^\/\//,Dt={},Ot={},jt="*/".concat("*"),At=u.createElement("a");function kt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(I)||[];if(b.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Pt(e,t,n,r){var i={},o=e===Ot;function u(a){var s;return i[a]=!0,b.each(e[a]||[],(function(e,a){var c=a(t,n,r);return"string"!=typeof c||o||i[c]?o?!(s=c):void 0:(t.dataTypes.unshift(c),u(c),!1)})),s}return u(t.dataTypes[0])||!i["*"]&&u("*")}function Rt(e,t){var n,r,i=b.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&b.extend(!0,e,r),e}At.href=ht.href,b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ht.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ht.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":jt,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":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Rt(Rt(e,b.ajaxSettings),t):Rt(b.ajaxSettings,e)},ajaxPrefilter:kt(Dt),ajaxTransport:kt(Ot),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,s,c,l,f,d,p,h=b.ajaxSetup({},t),g=h.context||h,v=h.context&&(g.nodeType||g.jquery)?b(g):b.event,m=b.Deferred(),y=b.Callbacks("once memory"),x=h.statusCode||{},w={},T={},S="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a)for(a={};t=Ct.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==l&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||S;return r&&r.abort(t),C(0,t),this}};if(m.promise(E),h.url=((e||h.url||ht.href)+"").replace(_t,ht.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(I)||[""],null==h.crossDomain){c=u.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=At.protocol+"//"+At.host!=c.protocol+"//"+c.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=b.param(h.data,h.traditional)),Pt(Dt,h,t,E),l)return E;for(d in(f=b.event&&h.global)&&0==b.active++&&b.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Nt.test(h.type),i=h.url.replace(St,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Tt,"+")):(p=h.url.slice(i.length),h.data&&(i+=(vt.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Et,"$1"),p=(vt.test(i)?"&":"?")+"_="+gt+++p),h.url=i+p),h.ifModified&&(b.lastModified[i]&&E.setRequestHeader("If-Modified-Since",b.lastModified[i]),b.etag[i]&&E.setRequestHeader("If-None-Match",b.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||t.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]?", "+jt+"; q=0.01":""):h.accepts["*"]),h.headers)E.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||l))return E.abort();if(S="abort",y.add(h.complete),E.done(h.success),E.fail(h.error),r=Pt(Ot,h,t,E)){if(E.readyState=1,f&&v.trigger("ajaxSend",[E,h]),l)return E;h.async&&h.timeout>0&&(s=n.setTimeout((function(){E.abort("timeout")}),h.timeout));try{l=!1,r.send(w,C)}catch(e){if(l)throw e;C(-1,e)}}else C(-1,"No Transport");function C(e,t,u,a){var c,d,p,w,T,S=t;l||(l=!0,s&&n.clearTimeout(s),r=void 0,o=a||"",E.readyState=e>0?4:0,c=e>=200&&e<300||304===e,u&&(w=function(e,t,n){for(var r,i,o,u,a=e.contents,s=e.dataTypes;"*"===s[0];)s.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){s.unshift(i);break}if(s[0]in n)o=s[0];else{for(i in n){if(!s[0]||e.converters[i+" "+s[0]]){o=i;break}u||(u=i)}o=o||u}if(o)return o!==s[0]&&s.unshift(o),n[o]}(h,E,u)),w=function(e,t,n,r){var i,o,u,a,s,c={},l=e.dataTypes.slice();if(l[1])for(u in e.converters)c[u.toLowerCase()]=e.converters[u];for(o=l.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!s&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),s=o,o=l.shift())if("*"===o)o=s;else if("*"!==s&&s!==o){if(!(u=c[s+" "+o]||c["* "+o]))for(i in c)if((a=i.split(" "))[1]===o&&(u=c[s+" "+a[0]]||c["* "+a[0]])){!0===u?u=c[i]:!0!==c[i]&&(o=a[0],l.unshift(a[1]));break}if(!0!==u)if(u&&e.throws)t=u(t);else try{t=u(t)}catch(e){return{state:"parsererror",error:u?e:"No conversion from "+s+" to "+o}}}return{state:"success",data:t}}(h,w,E,c),c?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(b.lastModified[i]=T),(T=E.getResponseHeader("etag"))&&(b.etag[i]=T)),204===e||"HEAD"===h.type?S="nocontent":304===e?S="notmodified":(S=w.state,d=w.data,c=!(p=w.error))):(p=S,!e&&S||(S="error",e<0&&(e=0))),E.status=e,E.statusText=(t||S)+"",c?m.resolveWith(g,[d,S,E]):m.rejectWith(g,[E,S,p]),E.statusCode(x),x=void 0,f&&v.trigger(c?"ajaxSuccess":"ajaxError",[E,h,c?d:p]),y.fireWith(g,[E,S]),f&&(v.trigger("ajaxComplete",[E,h]),--b.active||b.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return b.get(e,t,n,"json")},getScript:function(e,t){return b.get(e,void 0,t,"script")}}),b.each(["get","post"],(function(e,t){b[t]=function(e,n,r,i){return b.isFunction(n)&&(i=i||r,r=n,n=void 0),b.ajax(b.extend({url:e,type:t,dataType:i,data:n,success:r},b.isPlainObject(e)&&e))}})),b._evalUrl=function(e){return b.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},b.fn.extend({wrapAll:function(e){var t;return this[0]&&(b.isFunction(e)&&(e=e.call(this[0])),t=b(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 b.isFunction(e)?this.each((function(t){b(this).wrapInner(e.call(this,t))})):this.each((function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=b.isFunction(e);return this.each((function(n){b(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){b(this).replaceWith(this.childNodes)})),this}}),b.expr.pseudos.hidden=function(e){return!b.expr.pseudos.visible(e)},b.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},b.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Lt={0:200,1223:204},qt=b.ajaxSettings.xhr();m.cors=!!qt&&"withCredentials"in qt,m.ajax=qt=!!qt,b.ajaxTransport((function(e){var t,r;if(m.cors||qt&&!e.crossDomain)return{send:function(i,o){var u,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(u in e.xhrFields)a[u]=e.xhrFields[u];for(u in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(u,i[u]);t=function(e){return function(){t&&(t=r=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Lt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),r=a.onerror=t("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),b.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),b.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain)return{send:function(r,i){t=b("