From 599fc87c5f4cbf11bcd4aeced67e1e16e037d883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Tue, 15 Oct 2024 08:42:19 +0200 Subject: [PATCH] Fix missing menu search --- src/BootstrapAdminUi/assets/entrypoint.js | 1 + .../assets/scripts/menu-search.js | 70 +++++++++++++++++++ src/BootstrapAdminUi/public/app.js | 2 +- 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 src/BootstrapAdminUi/assets/scripts/menu-search.js diff --git a/src/BootstrapAdminUi/assets/entrypoint.js b/src/BootstrapAdminUi/assets/entrypoint.js index fe61dedb..17833c3c 100644 --- a/src/BootstrapAdminUi/assets/entrypoint.js +++ b/src/BootstrapAdminUi/assets/entrypoint.js @@ -13,5 +13,6 @@ import './app'; import './scripts/bulk-delete'; import './scripts/check-all'; +import './scripts/menu-search'; import './scripts/bootstrap'; diff --git a/src/BootstrapAdminUi/assets/scripts/menu-search.js b/src/BootstrapAdminUi/assets/scripts/menu-search.js new file mode 100644 index 00000000..1330ac8b --- /dev/null +++ b/src/BootstrapAdminUi/assets/scripts/menu-search.js @@ -0,0 +1,70 @@ +/* + * This file is part of the Sylius package. + * + * (c) Sylius Sp. z o.o. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* global document */ + +(function() { + const menuSearchInput = document.querySelector('[data-menu-search]'); + const menuClearButton = document.querySelector('[data-menu-search-clear]'); + + const clearInput = () => { + menuSearchInput.value = ''; + menuSearchInput.dispatchEvent(new Event('input')); + }; + + if (menuSearchInput) { + menuSearchInput.addEventListener('input', function(e) { + const query = e.target.value.toLowerCase(); + const navItems = document.querySelectorAll('.sidebar .nav-item'); + + navItems.forEach(navItem => { + const navLink = navItem.querySelector('.nav-link'); + const dropdownMenu = navItem.querySelector('.dropdown-menu'); + const dropdownItems = navItem.querySelectorAll('.dropdown-item'); + let matchFound = false; + + dropdownItems.forEach(item => { + const text = item.textContent.toLowerCase(); + if (query === '' || text.includes(query)) { + item.style.display = ''; + matchFound = true; + } else { + item.style.display = 'none'; + } + }); + + if (matchFound || query === '') { + navItem.style.display = ''; + } else { + navItem.style.display = 'none'; + } + + if (query !== '') { + if (navLink) navLink.classList.add('d-flex'); + if (dropdownMenu) dropdownMenu.classList.add('d-flex'); + } else { + if (navLink) navLink.classList.remove('d-flex'); + if (dropdownMenu) dropdownMenu.classList.remove('d-flex'); + } + }); + }); + + menuSearchInput.addEventListener('keydown', function(event) { + if (event.key === 'Escape') { + clearInput(); + } + }); + } + + if (menuClearButton) { + menuClearButton.addEventListener('click', function() { + clearInput(); + }); + } +})(); diff --git a/src/BootstrapAdminUi/public/app.js b/src/BootstrapAdminUi/public/app.js index e76a111e..398bb897 100644 --- a/src/BootstrapAdminUi/public/app.js +++ b/src/BootstrapAdminUi/public/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -(()=>{var e={490:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=490,e.exports=t},956:()=>{function e(e){var t=e.getAttribute("data-bulk-delete"),n=Array.from(document.querySelectorAll('input[data-check-all-group="'.concat(t,'"]')));e.addEventListener("submit",(function(t){t.preventDefault(),n.forEach((function(t){if(t.checked){var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name","ids[]"),n.setAttribute("value",t.value),e.appendChild(n)}})),t.target.submit()}))}document.querySelectorAll("[data-bulk-delete]").forEach(e)},802:()=>{function e(e){var t=e.getAttribute("data-check-all"),n=Array.from(document.querySelectorAll('[data-check-all-group="'.concat(t,'"]'))),i=Array.from(document.querySelectorAll('[data-check-all-action="'.concat(t,'"]')));e.addEventListener("change",(function(){var t=n.some((function(e){return e.checked}));e.checked=!t,n.forEach((function(e){return e.checked=!t})),r()})),n.forEach((function(t){t.addEventListener("change",(function(){switch(n.filter((function(e){return e.checked})).length){case n.length:e.indeterminate=!1,e.checked=!0;break;case 0:e.indeterminate=!1,e.checked=!1;break;default:e.indeterminate=!0,e.checked=!1}r()}))}));var r=function(){var e=n.some((function(e){return e.checked}));i.forEach((function(t){t.disabled=!e}))}}document.querySelectorAll("[data-check-all]").forEach(e)},692:function(e,t){var n;!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(i,r){"use strict";var s=[],o=Object.getPrototypeOf,a=s.slice,l=s.flat?function(e){return s.flat.call(e)}:function(e){return s.concat.apply([],e)},c=s.push,u=s.indexOf,d={},h=d.toString,p=d.hasOwnProperty,f=p.toString,m=f.call(Object),g={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},b=function(e){return null!=e&&e===e.window},y=i.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function _(e,t,n){var i,r,s=(n=n||y).createElement("script");if(s.text=e,t)for(i in w)(r=t[i]||t.getAttribute&&t.getAttribute(i))&&s.setAttribute(i,r);n.head.appendChild(s).parentNode.removeChild(s)}function E(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[h.call(e)]||"object":typeof e}var A="3.7.1",x=/HTML$/i,O=function(e,t){return new O.fn.init(e,t)};function C(e){var t=!!e&&"length"in e&&e.length,n=E(e);return!v(e)&&!b(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function k(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}O.fn=O.prototype={jquery:A,constructor:O,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=O.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return O.each(this,e)},map:function(e){return this.pushStack(O.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(O.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(O.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+L+")"+L+"*"),H=new RegExp(L+"|>"),B=new RegExp(j),V=new RegExp("^"+D+"$"),W={ID:new RegExp("^#("+D+")"),CLASS:new RegExp("^\\.("+D+")"),TAG:new RegExp("^("+D+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+j),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+C+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},U=/^(?:input|select|textarea|button)$/i,z=/^h\d$/i,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,Q=new RegExp("\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\([^\\r\\n\\f])","g"),Y=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},G=function(){le()},J=he((function(e){return!0===e.disabled&&k(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(s=a.call(P.childNodes),P.childNodes),s[P.childNodes.length].nodeType}catch(e){m={apply:function(e,t){F.apply(e,a.call(t))},call:function(e){F.apply(e,a.call(arguments,1))}}}function Z(e,t,n,i){var r,s,o,a,c,u,p,f=t&&t.ownerDocument,b=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return n;if(!i&&(le(t),t=t||l,d)){if(11!==b&&(c=K.exec(e)))if(r=c[1]){if(9===b){if(!(o=t.getElementById(r)))return n;if(o.id===r)return m.call(n,o),n}else if(f&&(o=f.getElementById(r))&&Z.contains(t,o)&&o.id===r)return m.call(n,o),n}else{if(c[2])return m.apply(n,t.getElementsByTagName(e)),n;if((r=c[3])&&t.getElementsByClassName)return m.apply(n,t.getElementsByClassName(r)),n}if(!(A[e+" "]||h&&h.test(e))){if(p=e,f=t,1===b&&(H.test(e)||R.test(e))){for((f=X.test(e)&&ae(t.parentNode)||t)==t&&g.scope||((a=t.getAttribute("id"))?a=O.escapeSelector(a):t.setAttribute("id",a=v)),s=(u=ue(e)).length;s--;)u[s]=(a?"#"+a:":scope")+" "+de(u[s]);p=u.join(",")}try{return m.apply(n,f.querySelectorAll(p)),n}catch(t){A(e,!0)}finally{a===v&&t.removeAttribute("id")}}}return be(e.replace(N,"$1"),t,n,i)}function ee(){var e=[];return function n(i,r){return e.push(i+" ")>t.cacheLength&&delete n[e.shift()],n[i+" "]=r}}function te(e){return e[v]=!0,e}function ne(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ie(e){return function(t){return k(t,"input")&&t.type===e}}function re(e){return function(t){return(k(t,"input")||k(t,"button"))&&t.type===e}}function se(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&&J(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function oe(e){return te((function(t){return t=+t,te((function(n,i){for(var r,s=e([],n.length,t),o=s.length;o--;)n[r=s[o]]&&(n[r]=!(i[r]=n[r]))}))}))}function ae(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var n,i=e?e.ownerDocument||e:P;return i!=l&&9===i.nodeType&&i.documentElement?(c=(l=i).documentElement,d=!O.isXMLDoc(l),f=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&P!=l&&(n=l.defaultView)&&n.top!==n&&n.addEventListener("unload",G),g.getById=ne((function(e){return c.appendChild(e).id=O.expando,!l.getElementsByName||!l.getElementsByName(O.expando).length})),g.disconnectedMatch=ne((function(e){return f.call(e,"*")})),g.scope=ne((function(){return l.querySelectorAll(":scope")})),g.cssHas=ne((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),g.getById?(t.filter.ID=function(e){var t=e.replace(Q,Y);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(Q,Y);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n,i,r,s=t.getElementById(e);if(s){if((n=s.getAttributeNode("id"))&&n.value===e)return[s];for(r=t.getElementsByName(e),i=0;s=r[i++];)if((n=s.getAttributeNode("id"))&&n.value===e)return[s]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&d)return t.getElementsByClassName(e)},h=[],ne((function(e){var t;c.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+L+"*(?:value|"+C+")"),e.querySelectorAll("[id~="+v+"-]").length||h.push("~="),e.querySelectorAll("a#"+v+"+*").length||h.push(".#.+[+~]"),e.querySelectorAll(":checked").length||h.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&h.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||h.push("\\["+L+"*name"+L+"*="+L+"*(?:''|\"\")")})),g.cssHas||h.push(":has"),h=h.length&&new RegExp(h.join("|")),x=function(e,t){if(e===t)return o=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!g.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument==P&&Z.contains(P,e)?-1:t===l||t.ownerDocument==P&&Z.contains(P,t)?1:r?u.call(r,e)-u.call(r,t):0:4&n?-1:1)},l):l}for(e in Z.matches=function(e,t){return Z(e,null,null,t)},Z.matchesSelector=function(e,t){if(le(e),d&&!A[t+" "]&&(!h||!h.test(t)))try{var n=f.call(e,t);if(n||g.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return Z(t,l,null,[e]).length>0},Z.contains=function(e,t){return(e.ownerDocument||e)!=l&&le(e),O.contains(e,t)},Z.attr=function(e,n){(e.ownerDocument||e)!=l&&le(e);var i=t.attrHandle[n.toLowerCase()],r=i&&p.call(t.attrHandle,n.toLowerCase())?i(e,n,!d):void 0;return void 0!==r?r:e.getAttribute(n)},Z.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},O.uniqueSort=function(e){var t,n=[],i=0,s=0;if(o=!g.sortStable,r=!g.sortStable&&a.call(e,0),S.call(e,x),o){for(;t=e[s++];)t===e[s]&&(i=n.push(s));for(;i--;)M.call(e,n[i],1)}return r=null,e},O.fn.uniqueSort=function(){return this.pushStack(O.uniqueSort(a.apply(this)))},t=O.expr={cacheLength:50,createPseudo:te,match:W,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(Q,Y),e[3]=(e[3]||e[4]||e[5]||"").replace(Q,Y),"~="===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]||Z.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]&&Z.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return W.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&B.test(n)&&(t=ue(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(Q,Y).toLowerCase();return"*"===e?function(){return!0}:function(e){return k(e,t)}},CLASS:function(e){var t=w[e+" "];return t||(t=new RegExp("(^|"+L+")"+e+"("+L+"|$)"))&&w(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(i){var r=Z.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var s="nth"!==e.slice(0,3),o="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,p,f=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=a&&t.nodeName.toLowerCase(),y=!l&&!a,w=!1;if(m){if(s){for(;f;){for(d=t;d=d[f];)if(a?k(d,g):1===d.nodeType)return!1;p=f="only"===e&&!p&&"nextSibling"}return!0}if(p=[o?m.firstChild:m.lastChild],o&&y){for(w=(h=(c=(u=m[v]||(m[v]={}))[e]||[])[0]===b&&c[1])&&c[2],d=h&&m.childNodes[h];d=++h&&d&&d[f]||(w=h=0)||p.pop();)if(1===d.nodeType&&++w&&d===t){u[e]=[b,h,w];break}}else if(y&&(w=h=(c=(u=t[v]||(t[v]={}))[e]||[])[0]===b&&c[1]),!1===w)for(;(d=++h&&d&&d[f]||(w=h=0)||p.pop())&&(!(a?k(d,g):1===d.nodeType)||!++w||(y&&((u=d[v]||(d[v]={}))[e]=[b,w]),d!==t)););return(w-=r)===i||w%i==0&&w/i>=0}}},PSEUDO:function(e,n){var i,r=t.pseudos[e]||t.setFilters[e.toLowerCase()]||Z.error("unsupported pseudo: "+e);return r[v]?r(n):r.length>1?(i=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var i,s=r(e,n),o=s.length;o--;)e[i=u.call(e,s[o])]=!(t[i]=s[o])})):function(e){return r(e,0,i)}):r}},pseudos:{not:te((function(e){var t=[],n=[],i=ve(e.replace(N,"$1"));return i[v]?te((function(e,t,n,r){for(var s,o=i(e,null,r,[]),a=e.length;a--;)(s=o[a])&&(e[a]=!(t[a]=s))})):function(e,r,s){return t[0]=e,i(t,null,s,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return Z(e,t).length>0}})),contains:te((function(e){return e=e.replace(Q,Y),function(t){return(t.textContent||O.text(t)).indexOf(e)>-1}})),lang:te((function(e){return V.test(e||"")||Z.error("unsupported lang: "+e),e=e.replace(Q,Y).toLowerCase(),function(t){var n;do{if(n=d?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(e){var t=i.location&&i.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:se(!1),disabled:se(!0),checked:function(e){return k(e,"input")&&!!e.checked||k(e,"option")&&!!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!t.pseudos.empty(e)},header:function(e){return z.test(e.nodeName)},input:function(e){return U.test(e.nodeName)},button:function(e){return k(e,"input")&&"button"===e.type||k(e,"button")},text:function(e){var t;return k(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:oe((function(){return[0]})),last:oe((function(e,t){return[t-1]})),eq:oe((function(e,t,n){return[n<0?n+t:n]})),even:oe((function(e,t){for(var n=0;nt?t:n;--i>=0;)e.push(i);return e})),gt:oe((function(e,t,n){for(var i=n<0?n+t:n;++i1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function fe(e,t,n,i,r){for(var s,o=[],a=0,l=e.length,c=null!=t;a-1&&(s[c]=!(o[c]=h))}}else p=fe(p===o?p.splice(v,p.length):p),r?r(null,o,p,l):m.apply(o,p)}))}function ge(e){for(var i,r,s,o=e.length,a=t.relative[e[0].type],l=a||t.relative[" "],c=a?1:0,d=he((function(e){return e===i}),l,!0),h=he((function(e){return u.call(i,e)>-1}),l,!0),p=[function(e,t,r){var s=!a&&(r||t!=n)||((i=t).nodeType?d(e,t,r):h(e,t,r));return i=null,s}];c1&&pe(p),c>1&&de(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(N,"$1"),r,c0,s=e.length>0,o=function(o,a,c,u,h){var p,f,g,v=0,y="0",w=o&&[],_=[],E=n,A=o||s&&t.find.TAG("*",h),x=b+=null==E?1:Math.random()||.1,C=A.length;for(h&&(n=a==l||a||h);y!==C&&null!=(p=A[y]);y++){if(s&&p){for(f=0,a||p.ownerDocument==l||(le(p),c=!d);g=e[f++];)if(g(p,a||l,c)){m.call(u,p);break}h&&(b=x)}r&&((p=!g&&p)&&v--,o&&w.push(p))}if(v+=y,r&&y!==v){for(f=0;g=i[f++];)g(w,_,a,c);if(o){if(v>0)for(;y--;)w[y]||_[y]||(_[y]=T.call(u));_=fe(_)}m.apply(u,_),h&&!o&&_.length>0&&v+i.length>1&&O.uniqueSort(u)}return h&&(b=x,n=E),w};return r?te(o):o}(o,s)),a.selector=e}return a}function be(e,n,i,r){var s,o,a,l,c,u="function"==typeof e&&e,h=!r&&ue(e=u.selector||e);if(i=i||[],1===h.length){if((o=h[0]=h[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===n.nodeType&&d&&t.relative[o[1].type]){if(!(n=(t.find.ID(a.matches[0].replace(Q,Y),n)||[])[0]))return i;u&&(n=n.parentNode),e=e.slice(o.shift().value.length)}for(s=W.needsContext.test(e)?0:o.length;s--&&(a=o[s],!t.relative[l=a.type]);)if((c=t.find[l])&&(r=c(a.matches[0].replace(Q,Y),X.test(o[0].type)&&ae(n.parentNode)||n))){if(o.splice(s,1),!(e=r.length&&de(o)))return m.apply(i,r),i;break}}return(u||ve(e,h))(r,n,!d,i,!n||X.test(e)&&ae(n.parentNode)||n),i}ce.prototype=t.filters=t.pseudos,t.setFilters=new ce,g.sortStable=v.split("").sort(x).join("")===v,le(),g.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))})),O.find=Z,O.expr[":"]=O.expr.pseudos,O.unique=O.uniqueSort,Z.compile=ve,Z.select=be,Z.setDocument=le,Z.tokenize=ue,Z.escape=O.escapeSelector,Z.getText=O.text,Z.isXML=O.isXMLDoc,Z.selectors=O.expr,Z.support=O.support,Z.uniqueSort=O.uniqueSort}();var j=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&O(e).is(n))break;i.push(e)}return i},$=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},q=O.expr.match.needsContext,R=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function H(e,t,n){return v(t)?O.grep(e,(function(e,i){return!!t.call(e,i,e)!==n})):t.nodeType?O.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?O.grep(e,(function(e){return u.call(t,e)>-1!==n})):O.filter(t,e,n)}O.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?O.find.matchesSelector(i,e)?[i]:[]:O.find.matches(e,O.grep(t,(function(e){return 1===e.nodeType})))},O.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(O(e).filter((function(){for(t=0;t1?O.uniqueSort(n):n},filter:function(e){return this.pushStack(H(this,e||[],!1))},not:function(e){return this.pushStack(H(this,e||[],!0))},is:function(e){return!!H(this,"string"==typeof e&&q.test(e)?O(e):e||[],!1).length}});var B,V=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(O.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||B,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:V.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof O?t[0]:t,O.merge(this,O.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),R.test(i[1])&&O.isPlainObject(t))for(i in t)v(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=y.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(O):O.makeArray(e,this)}).prototype=O.fn,B=O(y);var W=/^(?:parents|prev(?:Until|All))/,U={children:!0,contents:!0,next:!0,prev:!0};function z(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}O.fn.extend({has:function(e){var t=O(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&O.find.matchesSelector(n,e))){s.push(n);break}return this.pushStack(s.length>1?O.uniqueSort(s):s)},index:function(e){return e?"string"==typeof e?u.call(O(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(O.uniqueSort(O.merge(this.get(),O(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),O.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return j(e,"parentNode")},parentsUntil:function(e,t,n){return j(e,"parentNode",n)},next:function(e){return z(e,"nextSibling")},prev:function(e){return z(e,"previousSibling")},nextAll:function(e){return j(e,"nextSibling")},prevAll:function(e){return j(e,"previousSibling")},nextUntil:function(e,t,n){return j(e,"nextSibling",n)},prevUntil:function(e,t,n){return j(e,"previousSibling",n)},siblings:function(e){return $((e.parentNode||{}).firstChild,e)},children:function(e){return $(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(k(e,"template")&&(e=e.content||e),O.merge([],e.childNodes))}},(function(e,t){O.fn[e]=function(n,i){var r=O.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=O.filter(i,r)),this.length>1&&(U[e]||O.uniqueSort(r),W.test(e)&&r.reverse()),this.pushStack(r)}}));var K=/[^\x20\t\r\n\f]+/g;function X(e){return e}function Q(e){throw e}function Y(e,t,n,i){var r;try{e&&v(r=e.promise)?r.call(e).done(t).fail(n):e&&v(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}O.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return O.each(e.match(K)||[],(function(e,n){t[n]=!0})),t}(e):O.extend({},e);var t,n,i,r,s=[],o=[],a=-1,l=function(){for(r=r||e.once,i=t=!0;o.length;a=-1)for(n=o.shift();++a-1;)s.splice(n,1),n<=a&&a--})),this},has:function(e){return e?O.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return r=o=[],s=n="",this},disabled:function(){return!s},lock:function(){return r=o=[],n||t||(s=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},O.extend({Deferred:function(e){var t=[["notify","progress",O.Callbacks("memory"),O.Callbacks("memory"),2],["resolve","done",O.Callbacks("once memory"),O.Callbacks("once memory"),0,"resolved"],["reject","fail",O.Callbacks("once memory"),O.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return O.Deferred((function(n){O.each(t,(function(t,i){var r=v(e[i[4]])&&e[i[4]];s[i[1]]((function(){var e=r&&r.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,r){var s=0;function o(e,t,n,r){return function(){var a=this,l=arguments,c=function(){var i,c;if(!(e=s&&(n!==Q&&(a=void 0,l=[i]),t.rejectWith(a,l))}};e?u():(O.Deferred.getErrorHook?u.error=O.Deferred.getErrorHook():O.Deferred.getStackHook&&(u.error=O.Deferred.getStackHook()),i.setTimeout(u))}}return O.Deferred((function(i){t[0][3].add(o(0,i,v(r)?r:X,i.notifyWith)),t[1][3].add(o(0,i,v(e)?e:X)),t[2][3].add(o(0,i,v(n)?n:Q))})).promise()},promise:function(e){return null!=e?O.extend(e,r):r}},s={};return O.each(t,(function(e,i){var o=i[2],a=i[5];r[i[1]]=o.add,a&&o.add((function(){n=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(i[3].fire),s[i[0]]=function(){return s[i[0]+"With"](this===s?void 0:this,arguments),this},s[i[0]+"With"]=o.fireWith})),r.promise(s),e&&e.call(s,s),s},when:function(e){var t=arguments.length,n=t,i=Array(n),r=a.call(arguments),s=O.Deferred(),o=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?a.call(arguments):n,--t||s.resolveWith(i,r)}};if(t<=1&&(Y(e,s.done(o(n)).resolve,s.reject,!t),"pending"===s.state()||v(r[n]&&r[n].then)))return s.then();for(;n--;)Y(r[n],o(n),s.reject);return s.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;O.Deferred.exceptionHook=function(e,t){i.console&&i.console.warn&&e&&G.test(e.name)&&i.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},O.readyException=function(e){i.setTimeout((function(){throw e}))};var J=O.Deferred();function Z(){y.removeEventListener("DOMContentLoaded",Z),i.removeEventListener("load",Z),O.ready()}O.fn.ready=function(e){return J.then(e).catch((function(e){O.readyException(e)})),this},O.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--O.readyWait:O.isReady)||(O.isReady=!0,!0!==e&&--O.readyWait>0||J.resolveWith(y,[O]))}}),O.ready.then=J.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?i.setTimeout(O.ready):(y.addEventListener("DOMContentLoaded",Z),i.addEventListener("load",Z));var ee=function(e,t,n,i,r,s,o){var a=0,l=e.length,c=null==n;if("object"===E(n))for(a in r=!0,n)ee(e,t,a,n[a],!0,s,o);else if(void 0!==i&&(r=!0,v(i)||(o=!0),c&&(o?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(O(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each((function(){le.remove(this,e)}))}}),O.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=ae.get(e,t),n&&(!i||Array.isArray(n)?i=ae.access(e,t,O.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=O.queue(e,t),i=n.length,r=n.shift(),s=O._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete s.stop,r.call(e,(function(){O.dequeue(e,t)}),s)),!i&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ae.get(e,n)||ae.access(e,n,{empty:O.Callbacks("once memory").add((function(){ae.remove(e,[t+"queue",n])}))})}}),O.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,ke=/^$|^module$|\/(?:java|ecma)script/i;Ae=y.createDocumentFragment().appendChild(y.createElement("div")),(xe=y.createElement("input")).setAttribute("type","radio"),xe.setAttribute("checked","checked"),xe.setAttribute("name","t"),Ae.appendChild(xe),g.checkClone=Ae.cloneNode(!0).cloneNode(!0).lastChild.checked,Ae.innerHTML="",g.noCloneChecked=!!Ae.cloneNode(!0).lastChild.defaultValue,Ae.innerHTML="",g.option=!!Ae.lastChild;var Te={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&k(e,t)?O.merge([e],n):n}function Me(e,t){for(var n=0,i=e.length;n",""]);var Le=/<|&#?\w+;/;function Ne(e,t,n,i,r){for(var s,o,a,l,c,u,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p-1)r&&r.push(s);else if(c=ge(s),o=Se(d.appendChild(s),"script"),c&&Me(o),n)for(u=0;s=o[u++];)ke.test(s.type||"")&&n.push(s);return d}var De=/^([^.]*)(?:\.(.+)|)/;function Ie(){return!0}function Pe(){return!1}function Fe(e,t,n,i,r,s){var o,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)Fe(e,a,n,i,t[a],s);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Pe;else if(!r)return e;return 1===s&&(o=r,r=function(e){return O().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=O.guid++)),e.each((function(){O.event.add(this,t,r,i,n)}))}function je(e,t,n){n?(ae.set(e,t,!1),O.event.add(e,t,{namespace:!1,handler:function(e){var n,i=ae.get(this,t);if(1&e.isTrigger&&this[t]){if(i)(O.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=a.call(arguments),ae.set(this,t,i),this[t](),n=ae.get(this,t),ae.set(this,t,!1),i!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else i&&(ae.set(this,t,O.event.trigger(i[0],i.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ie)}})):void 0===ae.get(e,t)&&O.event.add(e,t,Ie)}O.event={global:{},add:function(e,t,n,i,r){var s,o,a,l,c,u,d,h,p,f,m,g=ae.get(e);if(se(e))for(n.handler&&(n=(s=n).handler,r=s.selector),r&&O.find.matchesSelector(me,r),n.guid||(n.guid=O.guid++),(l=g.events)||(l=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(t){return void 0!==O&&O.event.triggered!==t.type?O.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(K)||[""]).length;c--;)p=m=(a=De.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(d=O.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,d=O.event.special[p]||{},u=O.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&O.expr.match.needsContext.test(r),namespace:f.join(".")},s),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,i,f,o)||e.addEventListener&&e.addEventListener(p,o)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),O.event.global[p]=!0)},remove:function(e,t,n,i,r){var s,o,a,l,c,u,d,h,p,f,m,g=ae.hasData(e)&&ae.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(K)||[""]).length;c--;)if(p=m=(a=De.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(d=O.event.special[p]||{},h=l[p=(i?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=h.length;s--;)u=h[s],!r&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(s,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));o&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,g.handle)||O.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)O.event.remove(e,p+t[c],n,i,!0);O.isEmptyObject(l)&&ae.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,s,o,a=new Array(arguments.length),l=O.event.fix(e),c=(ae.get(this,"events")||Object.create(null))[l.type]||[],u=O.event.special[l.type]||{};for(a[0]=l,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(s=[],o={},n=0;n-1:O.find(r,this,null,[c]).length),o[r]&&s.push(i);s.length&&a.push({elem:c,handlers:s})}return c=this,l\s*$/g;function He(e,t){return k(e,"table")&&k(11!==t.nodeType?t:t.firstChild,"tr")&&O(e).children("tbody")[0]||e}function Be(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ve(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function We(e,t){var n,i,r,s,o,a;if(1===t.nodeType){if(ae.hasData(e)&&(a=ae.get(e).events))for(r in ae.remove(t,"handle events"),a)for(n=0,i=a[r].length;n1&&"string"==typeof f&&!g.checkClone&&qe.test(f))return e.each((function(r){var s=e.eq(r);m&&(t[0]=f.call(this,r,s.html())),ze(s,t,n,i)}));if(h&&(s=(r=Ne(t,e[0].ownerDocument,!1,e,i)).firstChild,1===r.childNodes.length&&(r=s),s||i)){for(a=(o=O.map(Se(r,"script"),Be)).length;d0&&Me(o,!l&&Se(e,"script")),a},cleanData:function(e){for(var t,n,i,r=O.event.special,s=0;void 0!==(n=e[s]);s++)if(se(n)){if(t=n[ae.expando]){if(t.events)for(i in t.events)r[i]?O.event.remove(n,i):O.removeEvent(n,i,t.handle);n[ae.expando]=void 0}n[le.expando]&&(n[le.expando]=void 0)}}}),O.fn.extend({detach:function(e){return Ke(this,e,!0)},remove:function(e){return Ke(this,e)},text:function(e){return ee(this,(function(e){return void 0===e?O.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 ze(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||He(this,e).appendChild(e)}))},prepend:function(){return ze(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=He(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return ze(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return ze(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&&(O.cleanData(Se(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return O.clone(this,e,t)}))},html:function(e){return ee(this,(function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!$e.test(e)&&!Te[(Ce.exec(e)||["",""])[1].toLowerCase()]){e=O.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-s-l-a-.5))||0),l+c}function ut(e,t,n){var i=Ye(e),r=(!g.boxSizingReliable()||n)&&"border-box"===O.css(e,"boxSizing",!1,i),s=r,o=Ze(e,t,i),a="offset"+t[0].toUpperCase()+t.slice(1);if(Xe.test(o)){if(!n)return o;o="auto"}return(!g.boxSizingReliable()&&r||!g.reliableTrDimensions()&&k(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===O.css(e,"display",!1,i))&&e.getClientRects().length&&(r="border-box"===O.css(e,"boxSizing",!1,i),(s=a in e)&&(o=e[a])),(o=parseFloat(o)||0)+ct(e,t,n||(r?"border":"content"),s,i,o)+"px"}function dt(e,t,n,i,r){return new dt.prototype.init(e,t,n,i,r)}O.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ze(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,s,o,a=re(t),l=Qe.test(t),c=e.style;if(l||(t=rt(a)),o=O.cssHooks[t]||O.cssHooks[a],void 0===n)return o&&"get"in o&&void 0!==(r=o.get(e,!1,i))?r:c[t];"string"===(s=typeof n)&&(r=pe.exec(n))&&r[1]&&(n=ye(e,t,r),s="number"),null!=n&&n==n&&("number"!==s||l||(n+=r&&r[3]||(O.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,i){var r,s,o,a=re(t);return Qe.test(t)||(t=rt(a)),(o=O.cssHooks[t]||O.cssHooks[a])&&"get"in o&&(r=o.get(e,!0,n)),void 0===r&&(r=Ze(e,t,i)),"normal"===r&&t in at&&(r=at[t]),""===n||n?(s=parseFloat(r),!0===n||isFinite(s)?s||0:r):r}}),O.each(["height","width"],(function(e,t){O.cssHooks[t]={get:function(e,n,i){if(n)return!st.test(O.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ut(e,t,i):Ge(e,ot,(function(){return ut(e,t,i)}))},set:function(e,n,i){var r,s=Ye(e),o=!g.scrollboxSize()&&"absolute"===s.position,a=(o||i)&&"border-box"===O.css(e,"boxSizing",!1,s),l=i?ct(e,t,i,a,s):0;return a&&o&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(s[t])-ct(e,t,"border",!1,s)-.5)),l&&(r=pe.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=O.css(e,t)),lt(0,n,l)}}})),O.cssHooks.marginLeft=et(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ze(e,"marginLeft"))||e.getBoundingClientRect().left-Ge(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),O.each({margin:"",padding:"",border:"Width"},(function(e,t){O.cssHooks[e+t]={expand:function(n){for(var i=0,r={},s="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+fe[i]+t]=s[i]||s[i-2]||s[0];return r}},"margin"!==e&&(O.cssHooks[e+t].set=lt)})),O.fn.extend({css:function(e,t){return ee(this,(function(e,t,n){var i,r,s={},o=0;if(Array.isArray(t)){for(i=Ye(e),r=t.length;o1)}}),O.Tween=dt,dt.prototype={constructor:dt,init:function(e,t,n,i,r,s){this.elem=e,this.prop=n,this.easing=r||O.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=s||(O.cssNumber[n]?"":"px")},cur:function(){var e=dt.propHooks[this.prop];return e&&e.get?e.get(this):dt.propHooks._default.get(this)},run:function(e){var t,n=dt.propHooks[this.prop];return this.options.duration?this.pos=t=O.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):dt.propHooks._default.set(this),this}},dt.prototype.init.prototype=dt.prototype,dt.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=O.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){O.fx.step[e.prop]?O.fx.step[e.prop](e):1!==e.elem.nodeType||!O.cssHooks[e.prop]&&null==e.elem.style[rt(e.prop)]?e.elem[e.prop]=e.now:O.style(e.elem,e.prop,e.now+e.unit)}}},dt.propHooks.scrollTop=dt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},O.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},O.fx=dt.prototype.init,O.fx.step={};var ht,pt,ft=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;function gt(){pt&&(!1===y.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(gt):i.setTimeout(gt,O.fx.interval),O.fx.tick())}function vt(){return i.setTimeout((function(){ht=void 0})),ht=Date.now()}function bt(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=fe[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function yt(e,t,n){for(var i,r=(wt.tweeners[t]||[]).concat(wt.tweeners["*"]),s=0,o=r.length;s1)},removeAttr:function(e){return this.each((function(){O.removeAttr(this,e)}))}}),O.extend({attr:function(e,t,n){var i,r,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===e.getAttribute?O.prop(e,t,n):(1===s&&O.isXMLDoc(e)||(r=O.attrHooks[t.toLowerCase()]||(O.expr.match.bool.test(t)?_t:void 0)),void 0!==n?null===n?void O.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=O.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&k(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(K);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),_t={set:function(e,t,n){return!1===t?O.removeAttr(e,n):e.setAttribute(n,n),n}},O.each(O.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=Et[t]||O.find.attr;Et[t]=function(e,t,i){var r,s,o=t.toLowerCase();return i||(s=Et[o],Et[o]=r,r=null!=n(e,t,i)?o:null,Et[o]=s),r}}));var At=/^(?:input|select|textarea|button)$/i,xt=/^(?:a|area)$/i;function Ot(e){return(e.match(K)||[]).join(" ")}function Ct(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(K)||[]}O.fn.extend({prop:function(e,t){return ee(this,O.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[O.propFix[e]||e]}))}}),O.extend({prop:function(e,t,n){var i,r,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&O.isXMLDoc(e)||(t=O.propFix[t]||t,r=O.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=O.find.attr(e,"tabindex");return t?parseInt(t,10):At.test(e.nodeName)||xt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(O.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)}}),O.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){O.propFix[this.toLowerCase()]=this})),O.fn.extend({addClass:function(e){var t,n,i,r,s,o;return v(e)?this.each((function(t){O(this).addClass(e.call(this,t,Ct(this)))})):(t=kt(e)).length?this.each((function(){if(i=Ct(this),n=1===this.nodeType&&" "+Ot(i)+" "){for(s=0;s-1;)n=n.replace(" "+r+" "," ");o=Ot(n),i!==o&&this.setAttribute("class",o)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,i,r,s,o=typeof e,a="string"===o||Array.isArray(e);return v(e)?this.each((function(n){O(this).toggleClass(e.call(this,n,Ct(this),t),t)})):"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):(n=kt(e),this.each((function(){if(a)for(s=O(this),r=0;r-1)return!0;return!1}});var Tt=/\r/g;O.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=v(e),this.each((function(n){var r;1===this.nodeType&&(null==(r=i?e.call(this,n,O(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=O.map(r,(function(e){return null==e?"":e+""}))),(t=O.valHooks[this.type]||O.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=O.valHooks[r.type]||O.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(Tt,""):null==n?"":n:void 0}}),O.extend({valHooks:{option:{get:function(e){var t=O.find.attr(e,"value");return null!=t?t:Ot(O.text(e))}},select:{get:function(e){var t,n,i,r=e.options,s=e.selectedIndex,o="select-one"===e.type,a=o?null:[],l=o?s+1:r.length;for(i=s<0?l:o?s:0;i-1)&&(n=!0);return n||(e.selectedIndex=-1),s}}}}),O.each(["radio","checkbox"],(function(){O.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=O.inArray(O(e).val(),t)>-1}},g.checkOn||(O.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var St=i.location,Mt={guid:Date.now()},Lt=/\?/;O.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new i.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||O.error("Invalid XML: "+(n?O.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Nt=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){e.stopPropagation()};O.extend(O.event,{trigger:function(e,t,n,r){var s,o,a,l,c,u,d,h,f=[n||y],m=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(o=h=a=n=n||y,3!==n.nodeType&&8!==n.nodeType&&!Nt.test(m+O.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[O.expando]?e:new O.Event(m,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:O.makeArray(t,[e]),d=O.event.special[m]||{},r||!d.trigger||!1!==d.trigger.apply(n,t))){if(!r&&!d.noBubble&&!b(n)){for(l=d.delegateType||m,Nt.test(l+m)||(o=o.parentNode);o;o=o.parentNode)f.push(o),a=o;a===(n.ownerDocument||y)&&f.push(a.defaultView||a.parentWindow||i)}for(s=0;(o=f[s++])&&!e.isPropagationStopped();)h=o,e.type=s>1?l:d.bindType||m,(u=(ae.get(o,"events")||Object.create(null))[e.type]&&ae.get(o,"handle"))&&u.apply(o,t),(u=c&&o[c])&&u.apply&&se(o)&&(e.result=u.apply(o,t),!1===e.result&&e.preventDefault());return e.type=m,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),t)||!se(n)||c&&v(n[m])&&!b(n)&&((a=n[c])&&(n[c]=null),O.event.triggered=m,e.isPropagationStopped()&&h.addEventListener(m,Dt),n[m](),e.isPropagationStopped()&&h.removeEventListener(m,Dt),O.event.triggered=void 0,a&&(n[c]=a)),e.result}},simulate:function(e,t,n){var i=O.extend(new O.Event,n,{type:e,isSimulated:!0});O.event.trigger(i,null,t)}}),O.fn.extend({trigger:function(e,t){return this.each((function(){O.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return O.event.trigger(e,t,n,!0)}});var It=/\[\]$/,Pt=/\r?\n/g,Ft=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function $t(e,t,n,i){var r;if(Array.isArray(t))O.each(t,(function(t,r){n||It.test(e)?i(e,r):$t(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)}));else if(n||"object"!==E(t))i(e,t);else for(r in t)$t(e+"["+r+"]",t[r],n,i)}O.param=function(e,t){var n,i=[],r=function(e,t){var n=v(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!O.isPlainObject(e))O.each(e,(function(){r(this.name,this.value)}));else for(n in e)$t(n,e[n],t,r);return i.join("&")},O.fn.extend({serialize:function(){return O.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=O.prop(this,"elements");return e?O.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!O(this).is(":disabled")&&jt.test(this.nodeName)&&!Ft.test(e)&&(this.checked||!Oe.test(e))})).map((function(e,t){var n=O(this).val();return null==n?null:Array.isArray(n)?O.map(n,(function(e){return{name:t.name,value:e.replace(Pt,"\r\n")}})):{name:t.name,value:n.replace(Pt,"\r\n")}})).get()}});var qt=/%20/g,Rt=/#.*$/,Ht=/([?&])_=[^&]*/,Bt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Vt=/^(?:GET|HEAD)$/,Wt=/^\/\//,Ut={},zt={},Kt="*/".concat("*"),Xt=y.createElement("a");function Qt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,s=t.toLowerCase().match(K)||[];if(v(n))for(;i=s[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Yt(e,t,n,i){var r={},s=e===zt;function o(a){var l;return r[a]=!0,O.each(e[a]||[],(function(e,a){var c=a(t,n,i);return"string"!=typeof c||s||r[c]?s?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)})),l}return o(t.dataTypes[0])||!r["*"]&&o("*")}function Gt(e,t){var n,i,r=O.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&O.extend(!0,e,i),e}Xt.href=St.href,O.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kt,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":O.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,O.ajaxSettings),t):Gt(O.ajaxSettings,e)},ajaxPrefilter:Qt(Ut),ajaxTransport:Qt(zt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r,s,o,a,l,c,u,d,h,p=O.ajaxSetup({},t),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?O(f):O.event,g=O.Deferred(),v=O.Callbacks("once memory"),b=p.statusCode||{},w={},_={},E="canceled",A={readyState:0,getResponseHeader:function(e){var t;if(c){if(!o)for(o={};t=Bt.exec(s);)o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(e,t){return null==c&&(e=_[e.toLowerCase()]=_[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)A.always(e[A.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||E;return n&&n.abort(t),x(0,t),this}};if(g.promise(A),p.url=((e||p.url||St.href)+"").replace(Wt,St.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(K)||[""],null==p.crossDomain){l=y.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Xt.protocol+"//"+Xt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=O.param(p.data,p.traditional)),Yt(Ut,p,t,A),c)return A;for(d in(u=O.event&&p.global)&&0==O.active++&&O.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Vt.test(p.type),r=p.url.replace(Rt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(qt,"+")):(h=p.url.slice(r.length),p.data&&(p.processData||"string"==typeof p.data)&&(r+=(Lt.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Ht,"$1"),h=(Lt.test(r)?"&":"?")+"_="+Mt.guid+++h),p.url=r+h),p.ifModified&&(O.lastModified[r]&&A.setRequestHeader("If-Modified-Since",O.lastModified[r]),O.etag[r]&&A.setRequestHeader("If-None-Match",O.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&A.setRequestHeader("Content-Type",p.contentType),A.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Kt+"; q=0.01":""):p.accepts["*"]),p.headers)A.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(f,A,p)||c))return A.abort();if(E="abort",v.add(p.complete),A.done(p.success),A.fail(p.error),n=Yt(zt,p,t,A)){if(A.readyState=1,u&&m.trigger("ajaxSend",[A,p]),c)return A;p.async&&p.timeout>0&&(a=i.setTimeout((function(){A.abort("timeout")}),p.timeout));try{c=!1,n.send(w,x)}catch(e){if(c)throw e;x(-1,e)}}else x(-1,"No Transport");function x(e,t,o,l){var d,h,y,w,_,E=t;c||(c=!0,a&&i.clearTimeout(a),n=void 0,s=l||"",A.readyState=e>0?4:0,d=e>=200&&e<300||304===e,o&&(w=function(e,t,n){for(var i,r,s,o,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)s=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){s=r;break}o||(o=r)}s=s||o}if(s)return s!==l[0]&&l.unshift(s),n[s]}(p,A,o)),!d&&O.inArray("script",p.dataTypes)>-1&&O.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),w=function(e,t,n,i){var r,s,o,a,l,c={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)c[o.toLowerCase()]=e.converters[o];for(s=u.shift();s;)if(e.responseFields[s]&&(n[e.responseFields[s]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=s,s=u.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(o=c[l+" "+s]||c["* "+s]))for(r in c)if((a=r.split(" "))[1]===s&&(o=c[l+" "+a[0]]||c["* "+a[0]])){!0===o?o=c[r]:!0!==c[r]&&(s=a[0],u.unshift(a[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+s}}}return{state:"success",data:t}}(p,w,A,d),d?(p.ifModified&&((_=A.getResponseHeader("Last-Modified"))&&(O.lastModified[r]=_),(_=A.getResponseHeader("etag"))&&(O.etag[r]=_)),204===e||"HEAD"===p.type?E="nocontent":304===e?E="notmodified":(E=w.state,h=w.data,d=!(y=w.error))):(y=E,!e&&E||(E="error",e<0&&(e=0))),A.status=e,A.statusText=(t||E)+"",d?g.resolveWith(f,[h,E,A]):g.rejectWith(f,[A,E,y]),A.statusCode(b),b=void 0,u&&m.trigger(d?"ajaxSuccess":"ajaxError",[A,p,d?h:y]),v.fireWith(f,[A,E]),u&&(m.trigger("ajaxComplete",[A,p]),--O.active||O.event.trigger("ajaxStop")))}return A},getJSON:function(e,t,n){return O.get(e,t,n,"json")},getScript:function(e,t){return O.get(e,void 0,t,"script")}}),O.each(["get","post"],(function(e,t){O[t]=function(e,n,i,r){return v(n)&&(r=r||i,i=n,n=void 0),O.ajax(O.extend({url:e,type:t,dataType:r,data:n,success:i},O.isPlainObject(e)&&e))}})),O.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),O._evalUrl=function(e,t,n){return O.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){O.globalEval(e,t,n)}})},O.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=O(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 v(e)?this.each((function(t){O(this).wrapInner(e.call(this,t))})):this.each((function(){var t=O(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(n){O(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){O(this).replaceWith(this.childNodes)})),this}}),O.expr.pseudos.hidden=function(e){return!O.expr.pseudos.visible(e)},O.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},O.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(e){}};var Jt={0:200,1223:204},Zt=O.ajaxSettings.xhr();g.cors=!!Zt&&"withCredentials"in Zt,g.ajax=Zt=!!Zt,O.ajaxTransport((function(e){var t,n;if(g.cors||Zt&&!e.crossDomain)return{send:function(r,s){var o,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];for(o in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(o,r[o]);t=function(e){return function(){t&&(t=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(Jt[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(),n=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&i.setTimeout((function(){t&&n()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),O.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),O.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 O.globalEval(e),e}}}),O.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),O.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,r){t=O("