diff --git a/ROADMAP.md b/ROADMAP.md
index ef3520f9..dd6e0b1b 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -71,3 +71,4 @@ The goal of this script from it's beginnings till today is to to provide a bette
### Dependencies
- Drop jQuery requirement.
+- Replace Grunt and Bower with modern alternatives.
diff --git a/dist/css/lightbox.css b/dist/css/lightbox.css
index b3b0beb3..ba1c98b0 100644
--- a/dist/css/lightbox.css
+++ b/dist/css/lightbox.css
@@ -8,7 +8,6 @@ body.lb-disable-scrolling {
left: 0;
z-index: 9999;
background-color: black;
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
opacity: 0.8;
display: none;
}
@@ -41,7 +40,6 @@ body.lb-disable-scrolling {
.lb-outerContainer {
position: relative;
- *zoom: 1;
width: 250px;
height: 250px;
margin: 0 auto;
@@ -105,7 +103,6 @@ body.lb-disable-scrolling {
left: 0;
float: left;
background: url(../images/prev.png) left 48% no-repeat;
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0;
-webkit-transition: opacity 0.6s;
-moz-transition: opacity 0.6s;
@@ -114,7 +111,6 @@ body.lb-disable-scrolling {
}
.lb-nav a.lb-prev:hover {
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
opacity: 1;
}
@@ -123,7 +119,6 @@ body.lb-disable-scrolling {
right: 0;
float: right;
background: url(../images/next.png) right 48% no-repeat;
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0;
-webkit-transition: opacity 0.6s;
-moz-transition: opacity 0.6s;
@@ -132,14 +127,12 @@ body.lb-disable-scrolling {
}
.lb-nav a.lb-next:hover {
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
opacity: 1;
}
.lb-dataContainer {
margin: 0 auto;
padding-top: 5px;
- *zoom: 1;
width: 100%;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
@@ -189,7 +182,6 @@ body.lb-disable-scrolling {
background: url(../images/close.png) top right no-repeat;
text-align: right;
outline: none;
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
opacity: 0.7;
-webkit-transition: opacity 0.2s;
-moz-transition: opacity 0.2s;
@@ -199,6 +191,5 @@ body.lb-disable-scrolling {
.lb-data .lb-close:hover {
cursor: pointer;
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
opacity: 1;
}
diff --git a/dist/css/lightbox.min.css b/dist/css/lightbox.min.css
index adbaa837..20944997 100644
--- a/dist/css/lightbox.min.css
+++ b/dist/css/lightbox.min.css
@@ -1 +1 @@
-.lb-loader,.lightbox{text-align:center;line-height:0;position:absolute;left:0}body.lb-disable-scrolling{overflow:hidden}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;filter:alpha(Opacity=80);opacity:.8;display:none}.lightbox{width:100%;z-index:10000;font-weight:400;outline:0}.lightbox .lb-image{display:block;height:auto;max-width:inherit;max-height:none;border-radius:3px;border:4px solid #fff}.lightbox a img{border:none}.lb-outerContainer{position:relative;width:250px;height:250px;margin:0 auto;border-radius:4px;background-color:#fff}.lb-outerContainer:after{content:"";display:table;clear:both}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(../images/loading.gif) no-repeat}.lb-nav{position:absolute;top:0;left:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(../images/prev.png) left 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-prev:hover{filter:alpha(Opacity=100);opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../images/next.png) right 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-next:hover{filter:alpha(Opacity=100);opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{content:"";display:table;clear:both}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-caption a{color:#4ae}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../images/close.png) top right no-repeat;text-align:right;outline:0;filter:alpha(Opacity=70);opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;filter:alpha(Opacity=100);opacity:1}
\ No newline at end of file
+.lb-loader,.lightbox{text-align:center;line-height:0}body.lb-disable-scrolling{overflow:hidden}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;opacity:.8;display:none}.lightbox{position:absolute;left:0;width:100%;z-index:10000;font-weight:400;outline:0}.lightbox .lb-image{display:block;height:auto;max-width:inherit;max-height:none;border-radius:3px;border:4px solid #fff}.lightbox a img{border:none}.lb-outerContainer{position:relative;width:250px;height:250px;margin:0 auto;border-radius:4px;background-color:#fff}.lb-loader,.lb-nav{position:absolute;left:0}.lb-outerContainer:after{content:"";display:table;clear:both}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(../images/loading.gif) no-repeat}.lb-nav{top:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(../images/prev.png) left 48% no-repeat;opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-prev:hover{opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../images/next.png) right 48% no-repeat;opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-next:hover{opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{content:"";display:table;clear:both}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-caption a{color:#4ae}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../images/close.png) top right no-repeat;text-align:right;outline:0;opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;opacity:1}
\ No newline at end of file
diff --git a/dist/js/lightbox-plus-jquery.js b/dist/js/lightbox-plus-jquery.js
index 077520b8..b98bc50d 100644
--- a/dist/js/lightbox-plus-jquery.js
+++ b/dist/js/lightbox-plus-jquery.js
@@ -1,15 +1,12 @@
/*!
- * jQuery JavaScript Library v3.6.3
+ * jQuery JavaScript Library v3.7.1
* https://jquery.com/
*
- * Includes Sizzle.js
- * https://sizzlejs.com/
- *
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
- * Date: 2022-12-20T21:28Z
+ * Date: 2023-08-28T13:37Z
*/
( function( global, factory ) {
@@ -150,8 +147,9 @@ function toType( obj ) {
-var
- version = "3.6.3",
+var version = "3.7.1",
+
+ rhtmlSuffix = /HTML$/i,
// Define a local copy of jQuery
jQuery = function( selector, context ) {
@@ -397,6 +395,38 @@ jQuery.extend( {
return obj;
},
+
+ // Retrieve the text value of an array of DOM nodes
+ text: function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+
+ // If no nodeType, this is expected to be an array
+ while ( ( node = elem[ i++ ] ) ) {
+
+ // Do not traverse comment nodes
+ ret += jQuery.text( node );
+ }
+ }
+ if ( nodeType === 1 || nodeType === 11 ) {
+ return elem.textContent;
+ }
+ if ( nodeType === 9 ) {
+ return elem.documentElement.textContent;
+ }
+ if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+ },
+
// results is for internal usage only
makeArray: function( arr, results ) {
var ret = results || [];
@@ -419,6 +449,15 @@ jQuery.extend( {
return arr == null ? -1 : indexOf.call( arr, elem, i );
},
+ isXMLDoc: function( elem ) {
+ var namespace = elem && elem.namespaceURI,
+ docElem = elem && ( elem.ownerDocument || elem ).documentElement;
+
+ // Assume HTML when documentElement doesn't yet exist, such as inside
+ // document fragments.
+ return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" );
+ },
+
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
merge: function( first, second ) {
@@ -520,43 +559,98 @@ function isArrayLike( obj ) {
return type === "array" || length === 0 ||
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}
-var Sizzle =
-/*!
- * Sizzle CSS Selector Engine v2.3.9
- * https://sizzlejs.com/
- *
- * Copyright JS Foundation and other contributors
- * Released under the MIT license
- * https://js.foundation/
- *
- * Date: 2022-12-19
- */
-( function( window ) {
+
+
+function nodeName( elem, name ) {
+
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+
+}
+var pop = arr.pop;
+
+
+var sort = arr.sort;
+
+
+var splice = arr.splice;
+
+
+var whitespace = "[\\x20\\t\\r\\n\\f]";
+
+
+var rtrimCSS = new RegExp(
+ "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
+ "g"
+);
+
+
+
+
+// Note: an element does not contain itself
+jQuery.contains = function( a, b ) {
+ var bup = b && b.parentNode;
+
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+
+ // Support: IE 9 - 11+
+ // IE doesn't have `contains` on SVG.
+ a.contains ?
+ a.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ) );
+};
+
+
+
+
+// CSS string/identifier serialization
+// https://drafts.csswg.org/cssom/#common-serializing-idioms
+var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
+
+function fcssescape( ch, asCodePoint ) {
+ if ( asCodePoint ) {
+
+ // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
+ if ( ch === "\0" ) {
+ return "\uFFFD";
+ }
+
+ // Control characters and (dependent upon position) numbers get escaped as code points
+ return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
+ }
+
+ // Other potentially-special ASCII characters get backslash-escaped
+ return "\\" + ch;
+}
+
+jQuery.escapeSelector = function( sel ) {
+ return ( sel + "" ).replace( rcssescape, fcssescape );
+};
+
+
+
+
+var preferredDoc = document,
+ pushNative = push;
+
+( function() {
+
var i,
- support,
Expr,
- getText,
- isXML,
- tokenize,
- compile,
- select,
outermostContext,
sortInput,
hasDuplicate,
+ push = pushNative,
// Local document vars
- setDocument,
document,
- docElem,
+ documentElement,
documentIsHTML,
rbuggyQSA,
- rbuggyMatches,
matches,
- contains,
// Instance-specific data
- expando = "sizzle" + 1 * new Date(),
- preferredDoc = window.document,
+ expando = jQuery.expando,
dirruns = 0,
done = 0,
classCache = createCache(),
@@ -570,47 +664,22 @@ var i,
return 0;
},
- // Instance methods
- hasOwn = ( {} ).hasOwnProperty,
- arr = [],
- pop = arr.pop,
- pushNative = arr.push,
- push = arr.push,
- slice = arr.slice,
-
- // Use a stripped-down indexOf as it's faster than native
- // https://jsperf.com/thor-indexof-vs-for/5
- indexOf = function( list, elem ) {
- var i = 0,
- len = list.length;
- for ( ; i < len; i++ ) {
- if ( list[ i ] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" +
- "ismap|loop|multiple|open|readonly|required|scoped",
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|" +
+ "loop|multiple|open|readonly|required|scoped",
// Regular expressions
- // http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
-
// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
- // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+ // Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
// Operator (capture 2)
"*([*^$|!~]?=)" + whitespace +
- // "Attribute values must be CSS identifiers [capture 5]
- // or strings [capture 3 or capture 4]"
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
whitespace + "*\\]",
@@ -629,101 +698,88 @@ var i,
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
rwhitespace = new RegExp( whitespace + "+", "g" ),
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +
- whitespace + "+$", "g" ),
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +
- "*" ),
+ rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" +
+ whitespace + "*" ),
rdescend = new RegExp( whitespace + "|>" ),
rpseudo = new RegExp( pseudos ),
ridentifier = new RegExp( "^" + identifier + "$" ),
matchExpr = {
- "ID": new RegExp( "^#(" + identifier + ")" ),
- "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
- "TAG": new RegExp( "^(" + identifier + "|[*])" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
- whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
- whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+ ID: new RegExp( "^#(" + identifier + ")" ),
+ CLASS: new RegExp( "^\\.(" + identifier + ")" ),
+ TAG: new RegExp( "^(" + identifier + "|[*])" ),
+ ATTR: new RegExp( "^" + attributes ),
+ PSEUDO: new RegExp( "^" + pseudos ),
+ CHILD: new RegExp(
+ "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
+ whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
+ whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ bool: new RegExp( "^(?:" + booleans + ")$", "i" ),
// For use in libraries implementing .is()
// We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace +
+ needsContext: new RegExp( "^" + whitespace +
"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
},
- rhtml = /HTML$/i,
rinputs = /^(?:input|select|textarea|button)$/i,
rheader = /^h\d$/i,
- rnative = /^[^{]+\{\s*\[native \w/,
-
// Easily-parseable/retrievable ID or TAG or CLASS selectors
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
rsibling = /[+~]/,
// CSS escapes
- // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ),
+ // https://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
+ "?|\\\\([^\\r\\n\\f])", "g" ),
funescape = function( escape, nonHex ) {
var high = "0x" + escape.slice( 1 ) - 0x10000;
- return nonHex ?
+ if ( nonHex ) {
// Strip the backslash prefix from a non-hex escape sequence
- nonHex :
-
- // Replace a hexadecimal escape sequence with the encoded Unicode code point
- // Support: IE <=11+
- // For values outside the Basic Multilingual Plane (BMP), manually construct a
- // surrogate pair
- high < 0 ?
- String.fromCharCode( high + 0x10000 ) :
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- },
-
- // CSS string/identifier serialization
- // https://drafts.csswg.org/cssom/#common-serializing-idioms
- rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
- fcssescape = function( ch, asCodePoint ) {
- if ( asCodePoint ) {
-
- // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
- if ( ch === "\0" ) {
- return "\uFFFD";
- }
-
- // Control characters and (dependent upon position) numbers get escaped as code points
- return ch.slice( 0, -1 ) + "\\" +
- ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
+ return nonHex;
}
- // Other potentially-special ASCII characters get backslash-escaped
- return "\\" + ch;
+ // Replace a hexadecimal escape sequence with the encoded Unicode code point
+ // Support: IE <=11+
+ // For values outside the Basic Multilingual Plane (BMP), manually construct a
+ // surrogate pair
+ return high < 0 ?
+ String.fromCharCode( high + 0x10000 ) :
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
},
- // Used for iframes
- // See setDocument()
+ // Used for iframes; see `setDocument`.
+ // Support: IE 9 - 11+, Edge 12 - 18+
// Removing the function wrapper causes a "Permission Denied"
- // error in IE
+ // error in IE/Edge.
unloadHandler = function() {
setDocument();
},
inDisabledFieldset = addCombinator(
function( elem ) {
- return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";
+ return elem.disabled === true && nodeName( elem, "fieldset" );
},
{ dir: "parentNode", next: "legend" }
);
+// Support: IE <=9 only
+// Accessing document.activeElement can throw unexpectedly
+// https://bugs.jquery.com/ticket/13393
+function safeActiveElement() {
+ try {
+ return document.activeElement;
+ } catch ( err ) { }
+}
+
// Optimize for push.apply( _, NodeList )
try {
push.apply(
@@ -731,32 +787,22 @@ try {
preferredDoc.childNodes
);
- // Support: Android<4.0
+ // Support: Android <=4.0
// Detect silently failing push.apply
// eslint-disable-next-line no-unused-expressions
arr[ preferredDoc.childNodes.length ].nodeType;
} catch ( e ) {
- push = { apply: arr.length ?
-
- // Leverage slice if possible
- function( target, els ) {
+ push = {
+ apply: function( target, els ) {
pushNative.apply( target, slice.call( els ) );
- } :
-
- // Support: IE<9
- // Otherwise append directly
- function( target, els ) {
- var j = target.length,
- i = 0;
-
- // Can't trust NodeList.length
- while ( ( target[ j++ ] = els[ i++ ] ) ) {}
- target.length = j - 1;
+ },
+ call: function( target ) {
+ pushNative.apply( target, slice.call( arguments, 1 ) );
}
};
}
-function Sizzle( selector, context, results, seed ) {
+function find( selector, context, results, seed ) {
var m, i, elem, nid, match, groups, newSelector,
newContext = context && context.ownerDocument,
@@ -790,11 +836,10 @@ function Sizzle( selector, context, results, seed ) {
if ( nodeType === 9 ) {
if ( ( elem = context.getElementById( m ) ) ) {
- // Support: IE, Opera, Webkit
- // TODO: identify versions
+ // Support: IE 9 only
// getElementById can match elements by name instead of ID
if ( elem.id === m ) {
- results.push( elem );
+ push.call( results, elem );
return results;
}
} else {
@@ -804,14 +849,13 @@ function Sizzle( selector, context, results, seed ) {
// Element context
} else {
- // Support: IE, Opera, Webkit
- // TODO: identify versions
+ // Support: IE 9 only
// getElementById can match elements by name instead of ID
if ( newContext && ( elem = newContext.getElementById( m ) ) &&
- contains( context, elem ) &&
+ find.contains( context, elem ) &&
elem.id === m ) {
- results.push( elem );
+ push.call( results, elem );
return results;
}
}
@@ -822,22 +866,15 @@ function Sizzle( selector, context, results, seed ) {
return results;
// Class selector
- } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&
- context.getElementsByClassName ) {
-
+ } else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {
push.apply( results, context.getElementsByClassName( m ) );
return results;
}
}
// Take advantage of querySelectorAll
- if ( support.qsa &&
- !nonnativeSelectorCache[ selector + " " ] &&
- ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&
-
- // Support: IE 8 only
- // Exclude object elements
- ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) {
+ if ( !nonnativeSelectorCache[ selector + " " ] &&
+ ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {
newSelector = selector;
newContext = context;
@@ -850,7 +887,7 @@ function Sizzle( selector, context, results, seed ) {
// as such selectors are not recognized by querySelectorAll.
// Thanks to Andrew Dupont for this technique.
if ( nodeType === 1 &&
- ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {
+ ( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {
// Expand context for sibling selectors
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
@@ -858,11 +895,15 @@ function Sizzle( selector, context, results, seed ) {
// We can use :scope instead of the ID hack if the browser
// supports it & if we're not changing the context.
- if ( newContext !== context || !support.scope ) {
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when
+ // strict-comparing two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ if ( newContext != context || !support.scope ) {
// Capture the context ID, setting it first if necessary
if ( ( nid = context.getAttribute( "id" ) ) ) {
- nid = nid.replace( rcssescape, fcssescape );
+ nid = jQuery.escapeSelector( nid );
} else {
context.setAttribute( "id", ( nid = expando ) );
}
@@ -879,27 +920,6 @@ function Sizzle( selector, context, results, seed ) {
}
try {
-
- // `qSA` may not throw for unrecognized parts using forgiving parsing:
- // https://drafts.csswg.org/selectors/#forgiving-selector
- // like the `:has()` pseudo-class:
- // https://drafts.csswg.org/selectors/#relational
- // `CSS.supports` is still expected to return `false` then:
- // https://drafts.csswg.org/css-conditional-4/#typedef-supports-selector-fn
- // https://drafts.csswg.org/css-conditional-4/#dfn-support-selector
- if ( support.cssSupportsSelector &&
-
- // eslint-disable-next-line no-undef
- !CSS.supports( "selector(:is(" + newSelector + "))" ) ) {
-
- // Support: IE 11+
- // Throw to get to the same code path as an error directly in qSA.
- // Note: once we only support browser supporting
- // `CSS.supports('selector(...)')`, we can most likely drop
- // the `try-catch`. IE doesn't implement the API.
- throw new Error();
- }
-
push.apply( results,
newContext.querySelectorAll( newSelector )
);
@@ -916,7 +936,7 @@ function Sizzle( selector, context, results, seed ) {
}
// All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
+ return select( selector.replace( rtrimCSS, "$1" ), context, results, seed );
}
/**
@@ -930,7 +950,8 @@ function createCache() {
function cache( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ // Use (key + " ") to avoid collision with native prototype properties
+ // (see https://github.com/jquery/sizzle/issues/157)
if ( keys.push( key + " " ) > Expr.cacheLength ) {
// Only keep the most recent entries
@@ -942,7 +963,7 @@ function createCache() {
}
/**
- * Mark a function for special use by Sizzle
+ * Mark a function for special use by jQuery selector module
* @param {Function} fn The function to mark
*/
function markFunction( fn ) {
@@ -973,56 +994,13 @@ function assert( fn ) {
}
}
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied
- */
-function addHandle( attrs, handler ) {
- var arr = attrs.split( "|" ),
- i = arr.length;
-
- while ( i-- ) {
- Expr.attrHandle[ arr[ i ] ] = handler;
- }
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
- */
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
- a.sourceIndex - b.sourceIndex;
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( ( cur = cur.nextSibling ) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
/**
* Returns a function to use in pseudos for input types
* @param {String} type
*/
function createInputPseudo( type ) {
return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
+ return nodeName( elem, "input" ) && elem.type === type;
};
}
@@ -1032,8 +1010,8 @@ function createInputPseudo( type ) {
*/
function createButtonPseudo( type ) {
return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return ( name === "input" || name === "button" ) && elem.type === type;
+ return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) &&
+ elem.type === type;
};
}
@@ -1069,14 +1047,13 @@ function createDisabledPseudo( disabled ) {
}
}
- // Support: IE 6 - 11
+ // Support: IE 6 - 11+
// Use the isDisabled shortcut property to check for disabled fieldset ancestors
return elem.isDisabled === disabled ||
// Where there is no isDisabled, check manually
- /* jshint -W018 */
elem.isDisabled !== !disabled &&
- inDisabledFieldset( elem ) === disabled;
+ inDisabledFieldset( elem ) === disabled;
}
return elem.disabled === disabled;
@@ -1116,7 +1093,7 @@ function createPositionalPseudo( fn ) {
}
/**
- * Checks a node for validity as a Sizzle context
+ * Checks a node for validity as a jQuery selector context
* @param {Element|Object=} context
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
*/
@@ -1124,31 +1101,13 @@ function testContext( context ) {
return context && typeof context.getElementsByTagName !== "undefined" && context;
}
-// Expose support vars for convenience
-support = Sizzle.support = {};
-
-/**
- * Detects XML nodes
- * @param {Element|Object} elem An element or a document
- * @returns {Boolean} True iff elem is a non-HTML XML node
- */
-isXML = Sizzle.isXML = function( elem ) {
- var namespace = elem && elem.namespaceURI,
- docElem = elem && ( elem.ownerDocument || elem ).documentElement;
-
- // Support: IE <=8
- // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
- // https://bugs.jquery.com/ticket/4833
- return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );
-};
-
/**
* Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @param {Element|Object} [node] An element or document object to use to set the document
* @returns {Object} Returns the current document
*/
-setDocument = Sizzle.setDocument = function( node ) {
- var hasCompare, subWindow,
+function setDocument( node ) {
+ var subWindow,
doc = node ? node.ownerDocument || node : preferredDoc;
// Return early if doc is invalid or already selected
@@ -1162,112 +1121,90 @@ setDocument = Sizzle.setDocument = function( node ) {
// Update global variables
document = doc;
- docElem = document.documentElement;
- documentIsHTML = !isXML( document );
+ documentElement = document.documentElement;
+ documentIsHTML = !jQuery.isXMLDoc( document );
+
+ // Support: iOS 7 only, IE 9 - 11+
+ // Older browsers didn't support unprefixed `matches`.
+ matches = documentElement.matches ||
+ documentElement.webkitMatchesSelector ||
+ documentElement.msMatchesSelector;
// Support: IE 9 - 11+, Edge 12 - 18+
- // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
- // Support: IE 11+, Edge 17 - 18+
- // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
- // two documents; shallow comparisons work.
- // eslint-disable-next-line eqeqeq
- if ( preferredDoc != document &&
- ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
+ // Accessing iframe documents after unload throws "permission denied" errors
+ // (see trac-13936).
+ // Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,
+ // all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.
+ if ( documentElement.msMatchesSelector &&
- // Support: IE 11, Edge
- if ( subWindow.addEventListener ) {
- subWindow.addEventListener( "unload", unloadHandler, false );
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ preferredDoc != document &&
+ ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
- // Support: IE 9 - 10 only
- } else if ( subWindow.attachEvent ) {
- subWindow.attachEvent( "onunload", unloadHandler );
- }
+ // Support: IE 9 - 11+, Edge 12 - 18+
+ subWindow.addEventListener( "unload", unloadHandler );
}
- // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,
- // Safari 4 - 5 only, Opera <=11.6 - 12.x only
- // IE/Edge & older browsers don't support the :scope pseudo-class.
- // Support: Safari 6.0 only
- // Safari 6.0 supports :scope but it's an alias of :root there.
- support.scope = assert( function( el ) {
- docElem.appendChild( el ).appendChild( document.createElement( "div" ) );
- return typeof el.querySelectorAll !== "undefined" &&
- !el.querySelectorAll( ":scope fieldset div" ).length;
- } );
-
- // Support: Chrome 105+, Firefox 104+, Safari 15.4+
- // Make sure forgiving mode is not used in `CSS.supports( "selector(...)" )`.
- //
- // `:is()` uses a forgiving selector list as an argument and is widely
- // implemented, so it's a good one to test against.
- support.cssSupportsSelector = assert( function() {
- /* eslint-disable no-undef */
-
- return CSS.supports( "selector(*)" ) &&
-
- // Support: Firefox 78-81 only
- // In old Firefox, `:is()` didn't use forgiving parsing. In that case,
- // fail this test as there's no selector to test against that.
- // `CSS.supports` uses unforgiving parsing
- document.querySelectorAll( ":is(:jqfake)" ) &&
-
- // `*` is needed as Safari & newer Chrome implemented something in between
- // for `:has()` - it throws in `qSA` if it only contains an unsupported
- // argument but multiple ones, one of which is supported, are fine.
- // We want to play safe in case `:is()` gets the same treatment.
- !CSS.supports( "selector(:is(*,:jqfake))" );
-
- /* eslint-enable */
+ // Support: IE <10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programmatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert( function( el ) {
+ documentElement.appendChild( el ).id = jQuery.expando;
+ return !document.getElementsByName ||
+ !document.getElementsByName( jQuery.expando ).length;
} );
- /* Attributes
- ---------------------------------------------------------------------- */
-
- // Support: IE<8
- // Verify that getAttribute really returns attributes and not properties
- // (excepting IE8 booleans)
- support.attributes = assert( function( el ) {
- el.className = "i";
- return !el.getAttribute( "className" );
+ // Support: IE 9 only
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node.
+ support.disconnectedMatch = assert( function( el ) {
+ return matches.call( el, "*" );
} );
- /* getElement(s)By*
- ---------------------------------------------------------------------- */
-
- // Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert( function( el ) {
- el.appendChild( document.createComment( "" ) );
- return !el.getElementsByTagName( "*" ).length;
+ // Support: IE 9 - 11+, Edge 12 - 18+
+ // IE/Edge don't support the :scope pseudo-class.
+ support.scope = assert( function() {
+ return document.querySelectorAll( ":scope" );
} );
- // Support: IE<9
- support.getElementsByClassName = rnative.test( document.getElementsByClassName );
-
- // Support: IE<10
- // Check if getElementById returns elements by name
- // The broken getElementById methods don't pick up programmatically-set names,
- // so use a roundabout getElementsByName test
- support.getById = assert( function( el ) {
- docElem.appendChild( el ).id = expando;
- return !document.getElementsByName || !document.getElementsByName( expando ).length;
+ // Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only
+ // Make sure the `:has()` argument is parsed unforgivingly.
+ // We include `*` in the test to detect buggy implementations that are
+ // _selectively_ forgiving (specifically when the list includes at least
+ // one valid selector).
+ // Note that we treat complete lack of support for `:has()` as if it were
+ // spec-compliant support, which is fine because use of `:has()` in such
+ // environments will fail in the qSA path and fall back to jQuery traversal
+ // anyway.
+ support.cssHas = assert( function() {
+ try {
+ document.querySelector( ":has(*,:jqfake)" );
+ return false;
+ } catch ( e ) {
+ return true;
+ }
} );
// ID filter and find
if ( support.getById ) {
- Expr.filter[ "ID" ] = function( id ) {
+ Expr.filter.ID = function( id ) {
var attrId = id.replace( runescape, funescape );
return function( elem ) {
return elem.getAttribute( "id" ) === attrId;
};
};
- Expr.find[ "ID" ] = function( id, context ) {
+ Expr.find.ID = function( id, context ) {
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
var elem = context.getElementById( id );
return elem ? [ elem ] : [];
}
};
} else {
- Expr.filter[ "ID" ] = function( id ) {
+ Expr.filter.ID = function( id ) {
var attrId = id.replace( runescape, funescape );
return function( elem ) {
var node = typeof elem.getAttributeNode !== "undefined" &&
@@ -1278,7 +1215,7 @@ setDocument = Sizzle.setDocument = function( node ) {
// Support: IE 6 - 7 only
// getElementById is not reliable as a find shortcut
- Expr.find[ "ID" ] = function( id, context ) {
+ Expr.find.ID = function( id, context ) {
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
var node, i, elems,
elem = context.getElementById( id );
@@ -1308,40 +1245,18 @@ setDocument = Sizzle.setDocument = function( node ) {
}
// Tag
- Expr.find[ "TAG" ] = support.getElementsByTagName ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== "undefined" ) {
- return context.getElementsByTagName( tag );
-
- // DocumentFragment nodes don't have gEBTN
- } else if ( support.qsa ) {
- return context.querySelectorAll( tag );
- }
- } :
-
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
-
- // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- while ( ( elem = results[ i++ ] ) ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
+ Expr.find.TAG = function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ return context.getElementsByTagName( tag );
- return tmp;
- }
- return results;
- };
+ // DocumentFragment nodes don't have gEBTN
+ } else {
+ return context.querySelectorAll( tag );
+ }
+ };
// Class
- Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) {
+ Expr.find.CLASS = function( className, context ) {
if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
return context.getElementsByClassName( className );
}
@@ -1352,195 +1267,94 @@ setDocument = Sizzle.setDocument = function( node ) {
// QSA and matchesSelector support
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21)
- // We allow this because of a bug in IE8/9 that throws an error
- // whenever `document.activeElement` is accessed on an iframe
- // So, we allow :focus to pass through QSA all the time to avoid the IE error
- // See https://bugs.jquery.com/ticket/13378
rbuggyQSA = [];
- if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {
-
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert( function( el ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert( function( el ) {
- var input;
+ var input;
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explicitly
- // setting a boolean content attribute,
- // since its presence should be enough
- // https://bugs.jquery.com/ticket/12359
- docElem.appendChild( el ).innerHTML = "" +
- "";
-
- // Support: IE8, Opera 11-12.16
- // Nothing should be selected when empty strings follow ^= or $= or *=
- // The test attribute must be unknown in Opera but "safe" for WinRT
- // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
- if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
- }
-
- // Support: IE8
- // Boolean attributes and "value" are not treated correctly
- if ( !el.querySelectorAll( "[selected]" ).length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
- }
-
- // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
- if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
- rbuggyQSA.push( "~=" );
- }
-
- // Support: IE 11+, Edge 15 - 18+
- // IE 11/Edge don't find elements on a `[name='']` query in some cases.
- // Adding a temporary attribute to the document before the selection works
- // around the issue.
- // Interestingly, IE 10 & older don't seem to have the issue.
- input = document.createElement( "input" );
- input.setAttribute( "name", "" );
- el.appendChild( input );
- if ( !el.querySelectorAll( "[name='']" ).length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
- whitespace + "*(?:''|\"\")" );
- }
+ documentElement.appendChild( el ).innerHTML =
+ "" +
+ "";
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !el.querySelectorAll( ":checked" ).length ) {
- rbuggyQSA.push( ":checked" );
- }
-
- // Support: Safari 8+, iOS 8+
- // https://bugs.webkit.org/show_bug.cgi?id=136851
- // In-page `selector#id sibling-combinator selector` fails
- if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
- rbuggyQSA.push( ".#.+[+~]" );
- }
-
- // Support: Firefox <=3.6 - 5 only
- // Old Firefox doesn't throw on a badly-escaped identifier.
- el.querySelectorAll( "\\\f" );
- rbuggyQSA.push( "[\\r\\n\\f]" );
- } );
-
- assert( function( el ) {
- el.innerHTML = "" +
- "";
-
- // Support: Windows 8 Native Apps
- // The type and name attributes are restricted during .innerHTML assignment
- var input = document.createElement( "input" );
- input.setAttribute( "type", "hidden" );
- el.appendChild( input ).setAttribute( "name", "D" );
-
- // Support: IE8
- // Enforce case-sensitivity of name attribute
- if ( el.querySelectorAll( "[name=d]" ).length ) {
- rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( el.querySelectorAll( ":enabled" ).length !== 2 ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Support: IE9-11+
- // IE's :disabled selector does not pick up the children of disabled fieldsets
- docElem.appendChild( el ).disabled = true;
- if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Support: Opera 10 - 11 only
- // Opera 10-11 does not throw on post-comma invalid pseudos
- el.querySelectorAll( "*,:x" );
- rbuggyQSA.push( ",.*:" );
- } );
- }
+ // Support: iOS <=7 - 8 only
+ // Boolean attributes and "value" are not treated correctly in some XML documents
+ if ( !el.querySelectorAll( "[selected]" ).length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+ }
- if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||
- docElem.webkitMatchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector ) ) ) ) {
+ // Support: iOS <=7 - 8 only
+ if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
+ rbuggyQSA.push( "~=" );
+ }
- assert( function( el ) {
+ // Support: iOS 8 only
+ // https://bugs.webkit.org/show_bug.cgi?id=136851
+ // In-page `selector#id sibling-combinator selector` fails
+ if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
+ rbuggyQSA.push( ".#.+[+~]" );
+ }
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( el, "*" );
+ // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
+ // In some of the document kinds, these selectors wouldn't work natively.
+ // This is probably OK but for backwards compatibility we want to maintain
+ // handling them through jQuery traversal in jQuery 3.x.
+ if ( !el.querySelectorAll( ":checked" ).length ) {
+ rbuggyQSA.push( ":checked" );
+ }
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( el, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- } );
- }
+ // Support: Windows 8 Native Apps
+ // The type and name attributes are restricted during .innerHTML assignment
+ input = document.createElement( "input" );
+ input.setAttribute( "type", "hidden" );
+ el.appendChild( input ).setAttribute( "name", "D" );
+
+ // Support: IE 9 - 11+
+ // IE's :disabled selector does not pick up the children of disabled fieldsets
+ // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
+ // In some of the document kinds, these selectors wouldn't work natively.
+ // This is probably OK but for backwards compatibility we want to maintain
+ // handling them through jQuery traversal in jQuery 3.x.
+ documentElement.appendChild( el ).disabled = true;
+ if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Support: IE 11+, Edge 15 - 18+
+ // IE 11/Edge don't find elements on a `[name='']` query in some cases.
+ // Adding a temporary attribute to the document before the selection works
+ // around the issue.
+ // Interestingly, IE 10 & older don't seem to have the issue.
+ input = document.createElement( "input" );
+ input.setAttribute( "name", "" );
+ el.appendChild( input );
+ if ( !el.querySelectorAll( "[name='']" ).length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
+ whitespace + "*(?:''|\"\")" );
+ }
+ } );
- if ( !support.cssSupportsSelector ) {
+ if ( !support.cssHas ) {
- // Support: Chrome 105+, Safari 15.4+
- // `:has()` uses a forgiving selector list as an argument so our regular
- // `try-catch` mechanism fails to catch `:has()` with arguments not supported
- // natively like `:has(:contains("Foo"))`. Where supported & spec-compliant,
- // we now use `CSS.supports("selector(:is(SELECTOR_TO_BE_TESTED))")`, but
- // outside that we mark `:has` as buggy.
+ // Support: Chrome 105 - 110+, Safari 15.4 - 16.3+
+ // Our regular `try-catch` mechanism fails to detect natively-unsupported
+ // pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`)
+ // in browsers that parse the `:has()` argument as a forgiving selector list.
+ // https://drafts.csswg.org/selectors/#relational now requires the argument
+ // to be parsed unforgivingly, but browsers have not yet fully adjusted.
rbuggyQSA.push( ":has" );
}
rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) );
-
- /* Contains
- ---------------------------------------------------------------------- */
- hasCompare = rnative.test( docElem.compareDocumentPosition );
-
- // Element contains another
- // Purposefully self-exclusive
- // As in, an element does not contain itself
- contains = hasCompare || rnative.test( docElem.contains ) ?
- function( a, b ) {
-
- // Support: IE <9 only
- // IE doesn't have `contains` on `document` so we need to check for
- // `documentElement` presence.
- // We need to fall back to `a` when `documentElement` is missing
- // as `ownerDocument` of elements within `` may have
- // a null one - a default behavior of all modern browsers.
- var adown = a.nodeType === 9 && a.documentElement || a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ) );
- } :
- function( a, b ) {
- if ( b ) {
- while ( ( b = b.parentNode ) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
/* Sorting
---------------------------------------------------------------------- */
// Document order sorting
- sortOrder = hasCompare ?
- function( a, b ) {
+ sortOrder = function( a, b ) {
// Flag for duplicate removal
if ( a === b ) {
@@ -1574,8 +1388,8 @@ setDocument = Sizzle.setDocument = function( node ) {
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
// two documents; shallow comparisons work.
// eslint-disable-next-line eqeqeq
- if ( a == document || a.ownerDocument == preferredDoc &&
- contains( preferredDoc, a ) ) {
+ if ( a === document || a.ownerDocument == preferredDoc &&
+ find.contains( preferredDoc, a ) ) {
return -1;
}
@@ -1583,100 +1397,33 @@ setDocument = Sizzle.setDocument = function( node ) {
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
// two documents; shallow comparisons work.
// eslint-disable-next-line eqeqeq
- if ( b == document || b.ownerDocument == preferredDoc &&
- contains( preferredDoc, b ) ) {
+ if ( b === document || b.ownerDocument == preferredDoc &&
+ find.contains( preferredDoc, b ) ) {
return 1;
}
// Maintain original order
return sortInput ?
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
0;
}
return compare & 4 ? -1 : 1;
- } :
- function( a, b ) {
-
- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // Parentless nodes are either documents or disconnected
- if ( !aup || !bup ) {
-
- // Support: IE 11+, Edge 17 - 18+
- // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
- // two documents; shallow comparisons work.
- /* eslint-disable eqeqeq */
- return a == document ? -1 :
- b == document ? 1 :
- /* eslint-enable eqeqeq */
- aup ? -1 :
- bup ? 1 :
- sortInput ?
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( ( cur = cur.parentNode ) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( ( cur = cur.parentNode ) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[ i ] === bp[ i ] ) {
- i++;
- }
-
- return i ?
-
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[ i ], bp[ i ] ) :
-
- // Otherwise nodes in our document sort first
- // Support: IE 11+, Edge 17 - 18+
- // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
- // two documents; shallow comparisons work.
- /* eslint-disable eqeqeq */
- ap[ i ] == preferredDoc ? -1 :
- bp[ i ] == preferredDoc ? 1 :
- /* eslint-enable eqeqeq */
- 0;
};
return document;
-};
+}
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
+find.matches = function( expr, elements ) {
+ return find( expr, null, null, elements );
};
-Sizzle.matchesSelector = function( elem, expr ) {
+find.matchesSelector = function( elem, expr ) {
setDocument( elem );
- if ( support.matchesSelector && documentIsHTML &&
+ if ( documentIsHTML &&
!nonnativeSelectorCache[ expr + " " ] &&
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
try {
var ret = matches.call( elem, expr );
@@ -1684,9 +1431,9 @@ Sizzle.matchesSelector = function( elem, expr ) {
// IE 9's matchesSelector returns false on disconnected nodes
if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
return ret;
}
} catch ( e ) {
@@ -1694,10 +1441,10 @@ Sizzle.matchesSelector = function( elem, expr ) {
}
}
- return Sizzle( expr, document, null, [ elem ] ).length > 0;
+ return find( expr, document, null, [ elem ] ).length > 0;
};
-Sizzle.contains = function( context, elem ) {
+find.contains = function( context, elem ) {
// Set document vars if needed
// Support: IE 11+, Edge 17 - 18+
@@ -1707,10 +1454,11 @@ Sizzle.contains = function( context, elem ) {
if ( ( context.ownerDocument || context ) != document ) {
setDocument( context );
}
- return contains( context, elem );
+ return jQuery.contains( context, elem );
};
-Sizzle.attr = function( elem, name ) {
+
+find.attr = function( elem, name ) {
// Set document vars if needed
// Support: IE 11+, Edge 17 - 18+
@@ -1723,25 +1471,19 @@ Sizzle.attr = function( elem, name ) {
var fn = Expr.attrHandle[ name.toLowerCase() ],
- // Don't get fooled by Object.prototype properties (jQuery #13807)
+ // Don't get fooled by Object.prototype properties (see trac-13807)
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
fn( elem, name, !documentIsHTML ) :
undefined;
- return val !== undefined ?
- val :
- support.attributes || !documentIsHTML ?
- elem.getAttribute( name ) :
- ( val = elem.getAttributeNode( name ) ) && val.specified ?
- val.value :
- null;
-};
+ if ( val !== undefined ) {
+ return val;
+ }
-Sizzle.escape = function( sel ) {
- return ( sel + "" ).replace( rcssescape, fcssescape );
+ return elem.getAttribute( name );
};
-Sizzle.error = function( msg ) {
+find.error = function( msg ) {
throw new Error( "Syntax error, unrecognized expression: " + msg );
};
@@ -1749,16 +1491,20 @@ Sizzle.error = function( msg ) {
* Document sorting and removing duplicates
* @param {ArrayLike} results
*/
-Sizzle.uniqueSort = function( results ) {
+jQuery.uniqueSort = function( results ) {
var elem,
duplicates = [],
j = 0,
i = 0;
// Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- sortInput = !support.sortStable && results.slice( 0 );
- results.sort( sortOrder );
+ //
+ // Support: Android <=4.0+
+ // Testing for detecting duplicates is unpredictable so instead assume we can't
+ // depend on duplicate detection in all browsers without a stable sort.
+ hasDuplicate = !support.sortStable;
+ sortInput = !support.sortStable && slice.call( results, 0 );
+ sort.call( results, sortOrder );
if ( hasDuplicate ) {
while ( ( elem = results[ i++ ] ) ) {
@@ -1767,7 +1513,7 @@ Sizzle.uniqueSort = function( results ) {
}
}
while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
+ splice.call( results, duplicates[ j ], 1 );
}
}
@@ -1778,47 +1524,11 @@ Sizzle.uniqueSort = function( results ) {
return results;
};
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
-
- // If no nodeType, this is expected to be an array
- while ( ( node = elem[ i++ ] ) ) {
-
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
-
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (jQuery #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
-
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
-
- // Do not include comment or processing instruction nodes
-
- return ret;
+jQuery.fn.uniqueSort = function() {
+ return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );
};
-Expr = Sizzle.selectors = {
+Expr = jQuery.expr = {
// Can be adjusted by the user
cacheLength: 50,
@@ -1839,12 +1549,12 @@ Expr = Sizzle.selectors = {
},
preFilter: {
- "ATTR": function( match ) {
+ ATTR: function( match ) {
match[ 1 ] = match[ 1 ].replace( runescape, funescape );
// Move the given value to match[3] whether quoted or unquoted
- match[ 3 ] = ( match[ 3 ] || match[ 4 ] ||
- match[ 5 ] || "" ).replace( runescape, funescape );
+ match[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" )
+ .replace( runescape, funescape );
if ( match[ 2 ] === "~=" ) {
match[ 3 ] = " " + match[ 3 ] + " ";
@@ -1853,7 +1563,7 @@ Expr = Sizzle.selectors = {
return match.slice( 0, 4 );
},
- "CHILD": function( match ) {
+ CHILD: function( match ) {
/* matches from matchExpr["CHILD"]
1 type (only|nth|...)
@@ -1871,29 +1581,30 @@ Expr = Sizzle.selectors = {
// nth-* requires argument
if ( !match[ 3 ] ) {
- Sizzle.error( match[ 0 ] );
+ find.error( match[ 0 ] );
}
// numeric x and y parameters for Expr.filter.CHILD
// remember that false/true cast respectively to 0/1
match[ 4 ] = +( match[ 4 ] ?
match[ 5 ] + ( match[ 6 ] || 1 ) :
- 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) );
+ 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
+ );
match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );
- // other types prohibit arguments
+ // other types prohibit arguments
} else if ( match[ 3 ] ) {
- Sizzle.error( match[ 0 ] );
+ find.error( match[ 0 ] );
}
return match;
},
- "PSEUDO": function( match ) {
+ PSEUDO: function( match ) {
var excess,
unquoted = !match[ 6 ] && match[ 2 ];
- if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) {
+ if ( matchExpr.CHILD.test( match[ 0 ] ) ) {
return null;
}
@@ -1922,36 +1633,36 @@ Expr = Sizzle.selectors = {
filter: {
- "TAG": function( nodeNameSelector ) {
- var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ TAG: function( nodeNameSelector ) {
+ var expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
return nodeNameSelector === "*" ?
function() {
return true;
} :
function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ return nodeName( elem, expectedNodeName );
};
},
- "CLASS": function( className ) {
+ CLASS: function( className ) {
var pattern = classCache[ className + " " ];
return pattern ||
- ( pattern = new RegExp( "(^|" + whitespace +
- ")" + className + "(" + whitespace + "|$)" ) ) && classCache(
- className, function( elem ) {
- return pattern.test(
- typeof elem.className === "string" && elem.className ||
- typeof elem.getAttribute !== "undefined" &&
- elem.getAttribute( "class" ) ||
- ""
- );
+ ( pattern = new RegExp( "(^|" + whitespace + ")" + className +
+ "(" + whitespace + "|$)" ) ) &&
+ classCache( className, function( elem ) {
+ return pattern.test(
+ typeof elem.className === "string" && elem.className ||
+ typeof elem.getAttribute !== "undefined" &&
+ elem.getAttribute( "class" ) ||
+ ""
+ );
} );
},
- "ATTR": function( name, operator, check ) {
+ ATTR: function( name, operator, check ) {
return function( elem ) {
- var result = Sizzle.attr( elem, name );
+ var result = find.attr( elem, name );
if ( result == null ) {
return operator === "!=";
@@ -1962,22 +1673,34 @@ Expr = Sizzle.selectors = {
result += "";
- /* eslint-disable max-len */
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.slice( -check.length ) === check :
- operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
- false;
- /* eslint-enable max-len */
+ if ( operator === "=" ) {
+ return result === check;
+ }
+ if ( operator === "!=" ) {
+ return result !== check;
+ }
+ if ( operator === "^=" ) {
+ return check && result.indexOf( check ) === 0;
+ }
+ if ( operator === "*=" ) {
+ return check && result.indexOf( check ) > -1;
+ }
+ if ( operator === "$=" ) {
+ return check && result.slice( -check.length ) === check;
+ }
+ if ( operator === "~=" ) {
+ return ( " " + result.replace( rwhitespace, " " ) + " " )
+ .indexOf( check ) > -1;
+ }
+ if ( operator === "|=" ) {
+ return result === check || result.slice( 0, check.length + 1 ) === check + "-";
+ }
+ return false;
};
},
- "CHILD": function( type, what, _argument, first, last ) {
+ CHILD: function( type, what, _argument, first, last ) {
var simple = type.slice( 0, 3 ) !== "nth",
forward = type.slice( -4 ) !== "last",
ofType = what === "of-type";
@@ -1990,7 +1713,7 @@ Expr = Sizzle.selectors = {
} :
function( elem, _context, xml ) {
- var cache, uniqueCache, outerCache, node, nodeIndex, start,
+ var cache, outerCache, node, nodeIndex, start,
dir = simple !== forward ? "nextSibling" : "previousSibling",
parent = elem.parentNode,
name = ofType && elem.nodeName.toLowerCase(),
@@ -2005,7 +1728,7 @@ Expr = Sizzle.selectors = {
node = elem;
while ( ( node = node[ dir ] ) ) {
if ( ofType ?
- node.nodeName.toLowerCase() === name :
+ nodeName( node, name ) :
node.nodeType === 1 ) {
return false;
@@ -2024,17 +1747,8 @@ Expr = Sizzle.selectors = {
if ( forward && useCache ) {
// Seek `elem` from a previously-cached index
-
- // ...in a gzip-friendly way
- node = parent;
- outerCache = node[ expando ] || ( node[ expando ] = {} );
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- ( outerCache[ node.uniqueID ] = {} );
-
- cache = uniqueCache[ type ] || [];
+ outerCache = parent[ expando ] || ( parent[ expando ] = {} );
+ cache = outerCache[ type ] || [];
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
diff = nodeIndex && cache[ 2 ];
node = nodeIndex && parent.childNodes[ nodeIndex ];
@@ -2046,7 +1760,7 @@ Expr = Sizzle.selectors = {
// When found, cache indexes on `parent` and break
if ( node.nodeType === 1 && ++diff && node === elem ) {
- uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
break;
}
}
@@ -2055,17 +1769,8 @@ Expr = Sizzle.selectors = {
// Use previously-cached element index if available
if ( useCache ) {
-
- // ...in a gzip-friendly way
- node = elem;
- outerCache = node[ expando ] || ( node[ expando ] = {} );
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- ( outerCache[ node.uniqueID ] = {} );
-
- cache = uniqueCache[ type ] || [];
+ outerCache = elem[ expando ] || ( elem[ expando ] = {} );
+ cache = outerCache[ type ] || [];
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
diff = nodeIndex;
}
@@ -2079,7 +1784,7 @@ Expr = Sizzle.selectors = {
( diff = nodeIndex = 0 ) || start.pop() ) ) {
if ( ( ofType ?
- node.nodeName.toLowerCase() === name :
+ nodeName( node, name ) :
node.nodeType === 1 ) &&
++diff ) {
@@ -2087,13 +1792,7 @@ Expr = Sizzle.selectors = {
if ( useCache ) {
outerCache = node[ expando ] ||
( node[ expando ] = {} );
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- ( outerCache[ node.uniqueID ] = {} );
-
- uniqueCache[ type ] = [ dirruns, diff ];
+ outerCache[ type ] = [ dirruns, diff ];
}
if ( node === elem ) {
@@ -2111,19 +1810,19 @@ Expr = Sizzle.selectors = {
};
},
- "PSEUDO": function( pseudo, argument ) {
+ PSEUDO: function( pseudo, argument ) {
// pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
+ // https://www.w3.org/TR/selectors/#pseudo-classes
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
// Remember that setFilters inherits from pseudos
var args,
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
+ find.error( "unsupported pseudo: " + pseudo );
// The user may use createPseudo to indicate that
// arguments are needed to create the filter function
- // just as Sizzle does
+ // just as jQuery does
if ( fn[ expando ] ) {
return fn( argument );
}
@@ -2137,7 +1836,7 @@ Expr = Sizzle.selectors = {
matched = fn( seed, argument ),
i = matched.length;
while ( i-- ) {
- idx = indexOf( seed, matched[ i ] );
+ idx = indexOf.call( seed, matched[ i ] );
seed[ idx ] = !( matches[ idx ] = matched[ i ] );
}
} ) :
@@ -2153,14 +1852,14 @@ Expr = Sizzle.selectors = {
pseudos: {
// Potentially complex pseudos
- "not": markFunction( function( selector ) {
+ not: markFunction( function( selector ) {
// Trim the selector passed to compile
// to avoid treating leading and trailing
// spaces as combinators
var input = [],
results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
+ matcher = compile( selector.replace( rtrimCSS, "$1" ) );
return matcher[ expando ] ?
markFunction( function( seed, matches, _context, xml ) {
@@ -2179,22 +1878,23 @@ Expr = Sizzle.selectors = {
input[ 0 ] = elem;
matcher( input, null, xml, results );
- // Don't keep the element (issue #299)
+ // Don't keep the element
+ // (see https://github.com/jquery/sizzle/issues/299)
input[ 0 ] = null;
return !results.pop();
};
} ),
- "has": markFunction( function( selector ) {
+ has: markFunction( function( selector ) {
return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
+ return find( selector, elem ).length > 0;
};
} ),
- "contains": markFunction( function( text ) {
+ contains: markFunction( function( text ) {
text = text.replace( runescape, funescape );
return function( elem ) {
- return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;
+ return ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;
};
} ),
@@ -2204,12 +1904,12 @@ Expr = Sizzle.selectors = {
// or beginning with the identifier C immediately followed by "-".
// The matching of C against the element's language value is performed case-insensitively.
// The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
+ // https://www.w3.org/TR/selectors/#lang-pseudo
+ lang: markFunction( function( lang ) {
// lang value must be a valid identifier
if ( !ridentifier.test( lang || "" ) ) {
- Sizzle.error( "unsupported lang: " + lang );
+ find.error( "unsupported lang: " + lang );
}
lang = lang.replace( runescape, funescape ).toLowerCase();
return function( elem ) {
@@ -2228,38 +1928,39 @@ Expr = Sizzle.selectors = {
} ),
// Miscellaneous
- "target": function( elem ) {
+ target: function( elem ) {
var hash = window.location && window.location.hash;
return hash && hash.slice( 1 ) === elem.id;
},
- "root": function( elem ) {
- return elem === docElem;
+ root: function( elem ) {
+ return elem === documentElement;
},
- "focus": function( elem ) {
- return elem === document.activeElement &&
- ( !document.hasFocus || document.hasFocus() ) &&
+ focus: function( elem ) {
+ return elem === safeActiveElement() &&
+ document.hasFocus() &&
!!( elem.type || elem.href || ~elem.tabIndex );
},
// Boolean properties
- "enabled": createDisabledPseudo( false ),
- "disabled": createDisabledPseudo( true ),
+ enabled: createDisabledPseudo( false ),
+ disabled: createDisabledPseudo( true ),
- "checked": function( elem ) {
+ checked: function( elem ) {
// In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return ( nodeName === "input" && !!elem.checked ) ||
- ( nodeName === "option" && !!elem.selected );
+ // https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ return ( nodeName( elem, "input" ) && !!elem.checked ) ||
+ ( nodeName( elem, "option" ) && !!elem.selected );
},
- "selected": function( elem ) {
+ selected: function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
+ // Support: IE <=11+
+ // Accessing the selectedIndex property
+ // forces the browser to treat the default option as
+ // selected when in an optgroup.
if ( elem.parentNode ) {
// eslint-disable-next-line no-unused-expressions
elem.parentNode.selectedIndex;
@@ -2269,9 +1970,9 @@ Expr = Sizzle.selectors = {
},
// Contents
- "empty": function( elem ) {
+ empty: function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
+ // https://www.w3.org/TR/selectors/#empty-pseudo
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
// but not by others (comment: 8; processing instruction: 7; etc.)
// nodeType < 6 works because attributes (2) do not appear as children
@@ -2283,49 +1984,49 @@ Expr = Sizzle.selectors = {
return true;
},
- "parent": function( elem ) {
- return !Expr.pseudos[ "empty" ]( elem );
+ parent: function( elem ) {
+ return !Expr.pseudos.empty( elem );
},
// Element/input types
- "header": function( elem ) {
+ header: function( elem ) {
return rheader.test( elem.nodeName );
},
- "input": function( elem ) {
+ input: function( elem ) {
return rinputs.test( elem.nodeName );
},
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
+ button: function( elem ) {
+ return nodeName( elem, "input" ) && elem.type === "button" ||
+ nodeName( elem, "button" );
},
- "text": function( elem ) {
+ text: function( elem ) {
var attr;
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
+ return nodeName( elem, "input" ) && elem.type === "text" &&
// Support: IE <10 only
- // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+ // New HTML5 attribute values (e.g., "search") appear
+ // with elem.type === "text"
( ( attr = elem.getAttribute( "type" ) ) == null ||
attr.toLowerCase() === "text" );
},
// Position-in-collection
- "first": createPositionalPseudo( function() {
+ first: createPositionalPseudo( function() {
return [ 0 ];
} ),
- "last": createPositionalPseudo( function( _matchIndexes, length ) {
+ last: createPositionalPseudo( function( _matchIndexes, length ) {
return [ length - 1 ];
} ),
- "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) {
+ eq: createPositionalPseudo( function( _matchIndexes, length, argument ) {
return [ argument < 0 ? argument + length : argument ];
} ),
- "even": createPositionalPseudo( function( matchIndexes, length ) {
+ even: createPositionalPseudo( function( matchIndexes, length ) {
var i = 0;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
@@ -2333,7 +2034,7 @@ Expr = Sizzle.selectors = {
return matchIndexes;
} ),
- "odd": createPositionalPseudo( function( matchIndexes, length ) {
+ odd: createPositionalPseudo( function( matchIndexes, length ) {
var i = 1;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
@@ -2341,19 +2042,24 @@ Expr = Sizzle.selectors = {
return matchIndexes;
} ),
- "lt": createPositionalPseudo( function( matchIndexes, length, argument ) {
- var i = argument < 0 ?
- argument + length :
- argument > length ?
- length :
- argument;
+ lt: createPositionalPseudo( function( matchIndexes, length, argument ) {
+ var i;
+
+ if ( argument < 0 ) {
+ i = argument + length;
+ } else if ( argument > length ) {
+ i = length;
+ } else {
+ i = argument;
+ }
+
for ( ; --i >= 0; ) {
matchIndexes.push( i );
}
return matchIndexes;
} ),
- "gt": createPositionalPseudo( function( matchIndexes, length, argument ) {
+ gt: createPositionalPseudo( function( matchIndexes, length, argument ) {
var i = argument < 0 ? argument + length : argument;
for ( ; ++i < length; ) {
matchIndexes.push( i );
@@ -2363,7 +2069,7 @@ Expr = Sizzle.selectors = {
}
};
-Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ];
+Expr.pseudos.nth = Expr.pseudos.eq;
// Add button/input type pseudos
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
@@ -2378,7 +2084,7 @@ function setFilters() {}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();
-tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+function tokenize( selector, parseOnly ) {
var matched, match, tokens, type,
soFar, groups, preFilters,
cached = tokenCache[ selector + " " ];
@@ -2406,13 +2112,13 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
matched = false;
// Combinators
- if ( ( match = rcombinators.exec( soFar ) ) ) {
+ if ( ( match = rleadingCombinator.exec( soFar ) ) ) {
matched = match.shift();
tokens.push( {
value: matched,
// Cast descendant combinators to space
- type: match[ 0 ].replace( rtrim, " " )
+ type: match[ 0 ].replace( rtrimCSS, " " )
} );
soFar = soFar.slice( matched.length );
}
@@ -2439,14 +2145,16 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
// Return the length of the invalid excess
// if we're just parsing
// Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
+ if ( parseOnly ) {
+ return soFar.length;
+ }
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-};
+ return soFar ?
+ find.error( selector ) :
+
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+}
function toSelector( tokens ) {
var i = 0,
@@ -2479,7 +2187,7 @@ function addCombinator( matcher, combinator, base ) {
// Check against all ancestor/preceding elements
function( elem, context, xml ) {
- var oldCache, uniqueCache, outerCache,
+ var oldCache, outerCache,
newCache = [ dirruns, doneName ];
// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
@@ -2496,14 +2204,9 @@ function addCombinator( matcher, combinator, base ) {
if ( elem.nodeType === 1 || checkNonElements ) {
outerCache = elem[ expando ] || ( elem[ expando ] = {} );
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ elem.uniqueID ] ||
- ( outerCache[ elem.uniqueID ] = {} );
-
- if ( skip && skip === elem.nodeName.toLowerCase() ) {
+ if ( skip && nodeName( elem, skip ) ) {
elem = elem[ dir ] || elem;
- } else if ( ( oldCache = uniqueCache[ key ] ) &&
+ } else if ( ( oldCache = outerCache[ key ] ) &&
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
// Assign to newCache so results back-propagate to previous elements
@@ -2511,7 +2214,7 @@ function addCombinator( matcher, combinator, base ) {
} else {
// Reuse newcache so results back-propagate to previous elements
- uniqueCache[ key ] = newCache;
+ outerCache[ key ] = newCache;
// A match means we're done; a fail means we have to keep checking
if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
@@ -2543,7 +2246,7 @@ function multipleContexts( selector, contexts, results ) {
var i = 0,
len = contexts.length;
for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[ i ], results );
+ find( selector, contexts[ i ], results );
}
return results;
}
@@ -2577,38 +2280,37 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
postFinder = setMatcher( postFinder, postSelector );
}
return markFunction( function( seed, results, context, xml ) {
- var temp, i, elem,
+ var temp, i, elem, matcherOut,
preMap = [],
postMap = [],
preexisting = results.length,
// Get initial elements from seed or context
- elems = seed || multipleContexts(
- selector || "*",
- context.nodeType ? [ context ] : context,
- []
- ),
+ elems = seed ||
+ multipleContexts( selector || "*",
+ context.nodeType ? [ context ] : context, [] ),
// Prefilter to get matcher input, preserving a map for seed-results synchronization
matcherIn = preFilter && ( seed || !selector ) ?
condense( elems, preMap, preFilter, context, xml ) :
- elems,
+ elems;
- matcherOut = matcher ?
+ if ( matcher ) {
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter
+ // or preexisting results,
+ matcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
- // ...intermediate processing is necessary
- [] :
+ // ...intermediate processing is necessary
+ [] :
- // ...otherwise use results directly
- results :
- matcherIn;
+ // ...otherwise use results directly
+ results;
- // Find primary matches
- if ( matcher ) {
+ // Find primary matches
matcher( matcherIn, matcherOut, context, xml );
+ } else {
+ matcherOut = matcherIn;
}
// Apply postFilter
@@ -2646,7 +2348,7 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
i = matcherOut.length;
while ( i-- ) {
if ( ( elem = matcherOut[ i ] ) &&
- ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {
+ ( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {
seed[ temp ] = !( results[ temp ] = elem );
}
@@ -2681,15 +2383,21 @@ function matcherFromTokens( tokens ) {
return elem === checkContext;
}, implicitRelative, true ),
matchAnyContext = addCombinator( function( elem ) {
- return indexOf( checkContext, elem ) > -1;
+ return indexOf.call( checkContext, elem ) > -1;
}, implicitRelative, true ),
matchers = [ function( elem, context, xml ) {
- var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+
+ // Support: IE 11+, Edge 17 - 18+
+ // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
+ // two documents; shallow comparisons work.
+ // eslint-disable-next-line eqeqeq
+ var ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (
( checkContext = context ).nodeType ?
matchContext( elem, context, xml ) :
matchAnyContext( elem, context, xml ) );
- // Avoid hanging onto element (issue #299)
+ // Avoid hanging onto element
+ // (see https://github.com/jquery/sizzle/issues/299)
checkContext = null;
return ret;
} ];
@@ -2714,11 +2422,10 @@ function matcherFromTokens( tokens ) {
i > 1 && elementMatcher( matchers ),
i > 1 && toSelector(
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
- tokens
- .slice( 0, i - 1 )
- .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
- ).replace( rtrim, "$1" ),
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 )
+ .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
+ ).replace( rtrimCSS, "$1" ),
matcher,
i < j && matcherFromTokens( tokens.slice( i, j ) ),
j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
@@ -2744,7 +2451,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
contextBackup = outermostContext,
// We must always have either seed elements or outermost context
- elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ),
+ elems = seed || byElement && Expr.find.TAG( "*", outermost ),
// Use integer dirruns iff this is the outermost matcher
dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
@@ -2760,8 +2467,9 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
}
// Add elements passing elementMatchers directly to results
- // Support: IE<9, Safari
- // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id
+ // Support: iOS <=7 - 9 only
+ // Tolerate NodeList properties (IE: "length"; Safari: ) matching
+ // elements by id. (see trac-14142)
for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
if ( byElement && elem ) {
j = 0;
@@ -2776,7 +2484,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
}
while ( ( matcher = elementMatchers[ j++ ] ) ) {
if ( matcher( elem, context || document, xml ) ) {
- results.push( elem );
+ push.call( results, elem );
break;
}
}
@@ -2839,7 +2547,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
if ( outermost && !seed && setMatched.length > 0 &&
( matchedCount + setMatchers.length ) > 1 ) {
- Sizzle.uniqueSort( results );
+ jQuery.uniqueSort( results );
}
}
@@ -2857,7 +2565,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
superMatcher;
}
-compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+function compile( selector, match /* Internal Use Only */ ) {
var i,
setMatchers = [],
elementMatchers = [],
@@ -2880,27 +2588,25 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
}
// Cache the compiled function
- cached = compilerCache(
- selector,
- matcherFromGroupMatchers( elementMatchers, setMatchers )
- );
+ cached = compilerCache( selector,
+ matcherFromGroupMatchers( elementMatchers, setMatchers ) );
// Save selector and tokenization
cached.selector = selector;
}
return cached;
-};
+}
/**
- * A low-level selection function that works with Sizzle's compiled
+ * A low-level selection function that works with jQuery's compiled
* selector functions
* @param {String|Function} selector A selector or a pre-compiled
- * selector function built with Sizzle.compile
+ * selector function built with jQuery selector compile
* @param {Element} context
* @param {Array} [results]
* @param {Array} [seed] A set of elements to match against
*/
-select = Sizzle.select = function( selector, context, results, seed ) {
+function select( selector, context, results, seed ) {
var i, tokens, token, type, find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize( ( selector = compiled.selector || selector ) );
@@ -2914,10 +2620,12 @@ select = Sizzle.select = function( selector, context, results, seed ) {
// Reduce context if the leading compound selector is an ID
tokens = match[ 0 ] = match[ 0 ].slice( 0 );
if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
- context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
+ context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
- context = ( Expr.find[ "ID" ]( token.matches[ 0 ]
- .replace( runescape, funescape ), context ) || [] )[ 0 ];
+ context = ( Expr.find.ID(
+ token.matches[ 0 ].replace( runescape, funescape ),
+ context
+ ) || [] )[ 0 ];
if ( !context ) {
return results;
@@ -2930,7 +2638,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
}
// Fetch a seed set for right-to-left matching
- i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length;
+ i = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;
while ( i-- ) {
token = tokens[ i ];
@@ -2943,8 +2651,8 @@ select = Sizzle.select = function( selector, context, results, seed ) {
// Search, expanding context for leading sibling combinators
if ( ( seed = find(
token.matches[ 0 ].replace( runescape, funescape ),
- rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||
- context
+ rsibling.test( tokens[ 0 ].type ) &&
+ testContext( context.parentNode ) || context
) ) ) {
// If seed is empty or no tokens remain, we can return early
@@ -2971,21 +2679,18 @@ select = Sizzle.select = function( selector, context, results, seed ) {
!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
);
return results;
-};
+}
// One-time assignments
+// Support: Android <=4.0 - 4.1+
// Sort stability
support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;
-// Support: Chrome 14-35+
-// Always assume duplicates if they aren't passed to the comparison function
-support.detectDuplicates = !!hasDuplicate;
-
// Initialize against the default document
setDocument();
-// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Support: Android <=4.0 - 4.1+
// Detached nodes confoundingly follow *each other*
support.sortDetached = assert( function( el ) {
@@ -2993,68 +2698,29 @@ support.sortDetached = assert( function( el ) {
return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
} );
-// Support: IE<8
-// Prevent attribute/property "interpolation"
-// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !assert( function( el ) {
- el.innerHTML = "";
- return el.firstChild.getAttribute( "href" ) === "#";
-} ) ) {
- addHandle( "type|href|height|width", function( elem, name, isXML ) {
- if ( !isXML ) {
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
- }
- } );
-}
-
-// Support: IE<9
-// Use defaultValue in place of getAttribute("value")
-if ( !support.attributes || !assert( function( el ) {
- el.innerHTML = "";
- el.firstChild.setAttribute( "value", "" );
- return el.firstChild.getAttribute( "value" ) === "";
-} ) ) {
- addHandle( "value", function( elem, _name, isXML ) {
- if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
- return elem.defaultValue;
- }
- } );
-}
-
-// Support: IE<9
-// Use getAttributeNode to fetch booleans when getAttribute lies
-if ( !assert( function( el ) {
- return el.getAttribute( "disabled" ) == null;
-} ) ) {
- addHandle( booleans, function( elem, name, isXML ) {
- var val;
- if ( !isXML ) {
- return elem[ name ] === true ? name.toLowerCase() :
- ( val = elem.getAttributeNode( name ) ) && val.specified ?
- val.value :
- null;
- }
- } );
-}
-
-return Sizzle;
-
-} )( window );
-
-
-
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
+jQuery.find = find;
// Deprecated
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
-jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-jQuery.escapeSelector = Sizzle.escape;
+jQuery.unique = jQuery.uniqueSort;
+
+// These have always been private, but they used to be documented as part of
+// Sizzle so let's maintain them for now for backwards compatibility purposes.
+find.compile = compile;
+find.select = select;
+find.setDocument = setDocument;
+find.tokenize = tokenize;
+find.escape = jQuery.escapeSelector;
+find.getText = jQuery.text;
+find.isXML = jQuery.isXMLDoc;
+find.selectors = jQuery.expr;
+find.support = jQuery.support;
+find.uniqueSort = jQuery.uniqueSort;
+ /* eslint-enable */
+
+} )();
var dir = function( elem, dir, until ) {
@@ -3088,13 +2754,6 @@ var siblings = function( n, elem ) {
var rneedsContext = jQuery.expr.match.needsContext;
-
-
-function nodeName( elem, name ) {
-
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
-
-}
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
@@ -3345,7 +3004,7 @@ jQuery.fn.extend( {
if ( cur.nodeType < 11 && ( targets ?
targets.index( cur ) > -1 :
- // Don't pass non-elements to Sizzle
+ // Don't pass non-elements to jQuery#find
cur.nodeType === 1 &&
jQuery.find.matchesSelector( cur, selectors ) ) ) {
@@ -3900,7 +3559,7 @@ jQuery.extend( {
if ( jQuery.Deferred.exceptionHook ) {
jQuery.Deferred.exceptionHook( e,
- process.stackTrace );
+ process.error );
}
// Support: Promises/A+ section 2.3.3.3.4.1
@@ -3928,10 +3587,17 @@ jQuery.extend( {
process();
} else {
- // Call an optional hook to record the stack, in case of exception
+ // Call an optional hook to record the error, in case of exception
// since it's otherwise lost when execution goes async
- if ( jQuery.Deferred.getStackHook ) {
- process.stackTrace = jQuery.Deferred.getStackHook();
+ if ( jQuery.Deferred.getErrorHook ) {
+ process.error = jQuery.Deferred.getErrorHook();
+
+ // The deprecated alias of the above. While the name suggests
+ // returning the stack, not an error instance, jQuery just passes
+ // it directly to `console.warn` so both will work; an instance
+ // just better cooperates with source maps.
+ } else if ( jQuery.Deferred.getStackHook ) {
+ process.error = jQuery.Deferred.getStackHook();
}
window.setTimeout( process );
}
@@ -4106,12 +3772,16 @@ jQuery.extend( {
// warn about them ASAP rather than swallowing them by default.
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
-jQuery.Deferred.exceptionHook = function( error, stack ) {
+// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error
+// captured before the async barrier to get the original error cause
+// which may otherwise be hidden.
+jQuery.Deferred.exceptionHook = function( error, asyncError ) {
// Support: IE 8 - 9 only
// Console exists when dev tools are open, which can happen at any time
if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
- window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
+ window.console.warn( "jQuery.Deferred exception: " + error.message,
+ error.stack, asyncError );
}
};
@@ -5167,25 +4837,6 @@ function returnFalse() {
return false;
}
-// Support: IE <=9 - 11+
-// focus() and blur() are asynchronous, except when they are no-op.
-// So expect focus to be synchronous when the element is already active,
-// and blur to be synchronous when the element is not already active.
-// (focus and blur are always synchronous in other supported browsers,
-// this just defines when we can count on it).
-function expectSync( elem, type ) {
- return ( elem === safeActiveElement() ) === ( type === "focus" );
-}
-
-// Support: IE <=9 only
-// Accessing document.activeElement can throw unexpectedly
-// https://bugs.jquery.com/ticket/13393
-function safeActiveElement() {
- try {
- return document.activeElement;
- } catch ( err ) { }
-}
-
function on( elem, types, selector, data, fn, one ) {
var origFn, type;
@@ -5623,7 +5274,7 @@ jQuery.event = {
el.click && nodeName( el, "input" ) ) {
// dataPriv.set( el, "click", ... )
- leverageNative( el, "click", returnTrue );
+ leverageNative( el, "click", true );
}
// Return false to allow normal processing in the caller
@@ -5674,10 +5325,10 @@ jQuery.event = {
// synthetic events by interrupting progress until reinvoked in response to
// *native* events that it fires directly, ensuring that state changes have
// already occurred before other listeners are invoked.
-function leverageNative( el, type, expectSync ) {
+function leverageNative( el, type, isSetup ) {
- // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
- if ( !expectSync ) {
+ // Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add
+ if ( !isSetup ) {
if ( dataPriv.get( el, type ) === undefined ) {
jQuery.event.add( el, type, returnTrue );
}
@@ -5689,15 +5340,13 @@ function leverageNative( el, type, expectSync ) {
jQuery.event.add( el, type, {
namespace: false,
handler: function( event ) {
- var notAsync, result,
+ var result,
saved = dataPriv.get( this, type );
if ( ( event.isTrigger & 1 ) && this[ type ] ) {
// Interrupt processing of the outer synthetic .trigger()ed event
- // Saved data should be false in such cases, but might be a leftover capture object
- // from an async native handler (gh-4350)
- if ( !saved.length ) {
+ if ( !saved ) {
// Store arguments for use when handling the inner native event
// There will always be at least one argument (an event object), so this array
@@ -5706,33 +5355,22 @@ function leverageNative( el, type, expectSync ) {
dataPriv.set( this, type, saved );
// Trigger the native event and capture its result
- // Support: IE <=9 - 11+
- // focus() and blur() are asynchronous
- notAsync = expectSync( this, type );
this[ type ]();
result = dataPriv.get( this, type );
- if ( saved !== result || notAsync ) {
- dataPriv.set( this, type, false );
- } else {
- result = {};
- }
+ dataPriv.set( this, type, false );
+
if ( saved !== result ) {
// Cancel the outer synthetic event
event.stopImmediatePropagation();
event.preventDefault();
- // Support: Chrome 86+
- // In Chrome, if an element having a focusout handler is blurred by
- // clicking outside of it, it invokes the handler synchronously. If
- // that handler calls `.remove()` on the element, the data is cleared,
- // leaving `result` undefined. We need to guard against this.
- return result && result.value;
+ return result;
}
// If this is an inner synthetic event for an event with a bubbling surrogate
- // (focus or blur), assume that the surrogate already propagated from triggering the
- // native event and prevent that from happening again here.
+ // (focus or blur), assume that the surrogate already propagated from triggering
+ // the native event and prevent that from happening again here.
// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
// bubbling surrogate propagates *after* the non-bubbling base), but that seems
// less bad than duplication.
@@ -5742,22 +5380,25 @@ function leverageNative( el, type, expectSync ) {
// If this is a native event triggered above, everything is now in order
// Fire an inner synthetic event with the original arguments
- } else if ( saved.length ) {
+ } else if ( saved ) {
// ...and capture the result
- dataPriv.set( this, type, {
- value: jQuery.event.trigger(
-
- // Support: IE <=9 - 11+
- // Extend with the prototype to reset the above stopImmediatePropagation()
- jQuery.extend( saved[ 0 ], jQuery.Event.prototype ),
- saved.slice( 1 ),
- this
- )
- } );
-
- // Abort handling of the native event
- event.stopImmediatePropagation();
+ dataPriv.set( this, type, jQuery.event.trigger(
+ saved[ 0 ],
+ saved.slice( 1 ),
+ this
+ ) );
+
+ // Abort handling of the native event by all jQuery handlers while allowing
+ // native handlers on the same element to run. On target, this is achieved
+ // by stopping immediate propagation just on the jQuery event. However,
+ // the native event is re-wrapped by a jQuery one on each level of the
+ // propagation so the only way to stop it for jQuery is to stop it for
+ // everyone via native `stopPropagation()`. This is not a problem for
+ // focus/blur which don't bubble, but it does also stop click on checkboxes
+ // and radios. We accept this limitation.
+ event.stopPropagation();
+ event.isImmediatePropagationStopped = returnTrue;
}
}
} );
@@ -5896,18 +5537,73 @@ jQuery.each( {
}, jQuery.event.addProp );
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
+
+ function focusMappedHandler( nativeEvent ) {
+ if ( document.documentMode ) {
+
+ // Support: IE 11+
+ // Attach a single focusin/focusout handler on the document while someone wants
+ // focus/blur. This is because the former are synchronous in IE while the latter
+ // are async. In other browsers, all those handlers are invoked synchronously.
+
+ // `handle` from private data would already wrap the event, but we need
+ // to change the `type` here.
+ var handle = dataPriv.get( this, "handle" ),
+ event = jQuery.event.fix( nativeEvent );
+ event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
+ event.isSimulated = true;
+
+ // First, handle focusin/focusout
+ handle( nativeEvent );
+
+ // ...then, handle focus/blur
+ //
+ // focus/blur don't bubble while focusin/focusout do; simulate the former by only
+ // invoking the handler at the lower level.
+ if ( event.target === event.currentTarget ) {
+
+ // The setup part calls `leverageNative`, which, in turn, calls
+ // `jQuery.event.add`, so event handle will already have been set
+ // by this point.
+ handle( event );
+ }
+ } else {
+
+ // For non-IE browsers, attach a single capturing handler on the document
+ // while someone wants focusin/focusout.
+ jQuery.event.simulate( delegateType, nativeEvent.target,
+ jQuery.event.fix( nativeEvent ) );
+ }
+ }
+
jQuery.event.special[ type ] = {
// Utilize native event if possible so blur/focus sequence is correct
setup: function() {
+ var attaches;
+
// Claim the first handler
// dataPriv.set( this, "focus", ... )
// dataPriv.set( this, "blur", ... )
- leverageNative( this, type, expectSync );
+ leverageNative( this, type, true );
- // Return false to allow normal processing in the caller
- return false;
+ if ( document.documentMode ) {
+
+ // Support: IE 9 - 11+
+ // We use the same native handler for focusin & focus (and focusout & blur)
+ // so we need to coordinate setup & teardown parts between those events.
+ // Use `delegateType` as the key as `type` is already used by `leverageNative`.
+ attaches = dataPriv.get( this, delegateType );
+ if ( !attaches ) {
+ this.addEventListener( delegateType, focusMappedHandler );
+ }
+ dataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );
+ } else {
+
+ // Return false to allow normal processing in the caller
+ return false;
+ }
},
trigger: function() {
@@ -5918,6 +5614,24 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
return true;
},
+ teardown: function() {
+ var attaches;
+
+ if ( document.documentMode ) {
+ attaches = dataPriv.get( this, delegateType ) - 1;
+ if ( !attaches ) {
+ this.removeEventListener( delegateType, focusMappedHandler );
+ dataPriv.remove( this, delegateType );
+ } else {
+ dataPriv.set( this, delegateType, attaches );
+ }
+ } else {
+
+ // Return false to indicate standard teardown should be applied
+ return false;
+ }
+ },
+
// Suppress native focus or blur if we're currently inside
// a leveraged native-event stack
_default: function( event ) {
@@ -5926,6 +5640,58 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
delegateType: delegateType
};
+
+ // Support: Firefox <=44
+ // Firefox doesn't have focus(in | out) events
+ // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
+ //
+ // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
+ // focus(in | out) events fire after focus & blur events,
+ // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
+ // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
+ //
+ // Support: IE 9 - 11+
+ // To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,
+ // attach a single handler for both events in IE.
+ jQuery.event.special[ delegateType ] = {
+ setup: function() {
+
+ // Handle: regular nodes (via `this.ownerDocument`), window
+ // (via `this.document`) & document (via `this`).
+ var doc = this.ownerDocument || this.document || this,
+ dataHolder = document.documentMode ? this : doc,
+ attaches = dataPriv.get( dataHolder, delegateType );
+
+ // Support: IE 9 - 11+
+ // We use the same native handler for focusin & focus (and focusout & blur)
+ // so we need to coordinate setup & teardown parts between those events.
+ // Use `delegateType` as the key as `type` is already used by `leverageNative`.
+ if ( !attaches ) {
+ if ( document.documentMode ) {
+ this.addEventListener( delegateType, focusMappedHandler );
+ } else {
+ doc.addEventListener( type, focusMappedHandler, true );
+ }
+ }
+ dataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );
+ },
+ teardown: function() {
+ var doc = this.ownerDocument || this.document || this,
+ dataHolder = document.documentMode ? this : doc,
+ attaches = dataPriv.get( dataHolder, delegateType ) - 1;
+
+ if ( !attaches ) {
+ if ( document.documentMode ) {
+ this.removeEventListener( delegateType, focusMappedHandler );
+ } else {
+ doc.removeEventListener( type, focusMappedHandler, true );
+ }
+ dataPriv.remove( dataHolder, delegateType );
+ } else {
+ dataPriv.set( dataHolder, delegateType, attaches );
+ }
+ }
+ };
} );
// Create mouseenter/leave events using mouseover/out and event-time checks
@@ -6157,7 +5923,7 @@ function domManip( collection, args, callback, ignored ) {
if ( hasScripts ) {
doc = scripts[ scripts.length - 1 ].ownerDocument;
- // Reenable scripts
+ // Re-enable scripts
jQuery.map( scripts, restoreScript );
// Evaluate executable scripts on first document insertion
@@ -6228,7 +5994,8 @@ jQuery.extend( {
if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
!jQuery.isXMLDoc( elem ) ) {
- // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2
+ // We eschew jQuery#find here for performance reasons:
+ // https://jsperf.com/getall-vs-sizzle/2
destElements = getAll( clone );
srcElements = getAll( elem );
@@ -6504,15 +6271,6 @@ var swap = function( elem, options, callback ) {
var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
-var whitespace = "[\\x20\\t\\r\\n\\f]";
-
-
-var rtrimCSS = new RegExp(
- "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
- "g"
-);
-
-
( function() {
@@ -6622,7 +6380,7 @@ var rtrimCSS = new RegExp(
trChild = document.createElement( "div" );
table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
- tr.style.cssText = "border:1px solid";
+ tr.style.cssText = "box-sizing:content-box;border:1px solid";
// Support: Chrome 86+
// Height set through cssText does not get applied.
@@ -6634,7 +6392,7 @@ var rtrimCSS = new RegExp(
// In our bodyBackground.html iframe,
// display for all div elements is set to "inline",
// which causes a problem only in Android 8 Chrome 86.
- // Ensuring the div is display: block
+ // Ensuring the div is `display: block`
// gets around this issue.
trChild.style.display = "block";
@@ -6821,7 +6579,8 @@ function setPositiveNumber( _elem, value, subtract ) {
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
var i = dimension === "width" ? 1 : 0,
extra = 0,
- delta = 0;
+ delta = 0,
+ marginDelta = 0;
// Adjustment may not be necessary
if ( box === ( isBorderBox ? "border" : "content" ) ) {
@@ -6831,8 +6590,10 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed
for ( ; i < 4; i += 2 ) {
// Both box models exclude margin
+ // Count margin delta separately to only add it after scroll gutter adjustment.
+ // This is needed to make negative margins work with `outerHeight( true )` (gh-3982).
if ( box === "margin" ) {
- delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
+ marginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
}
// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
@@ -6883,7 +6644,7 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed
) ) || 0;
}
- return delta;
+ return delta + marginDelta;
}
function getWidthOrHeight( elem, dimension, extra ) {
@@ -6981,26 +6742,35 @@ jQuery.extend( {
// Don't automatically add "px" to these possibly-unitless properties
cssNumber: {
- "animationIterationCount": true,
- "columnCount": true,
- "fillOpacity": true,
- "flexGrow": true,
- "flexShrink": true,
- "fontWeight": true,
- "gridArea": true,
- "gridColumn": true,
- "gridColumnEnd": true,
- "gridColumnStart": true,
- "gridRow": true,
- "gridRowEnd": true,
- "gridRowStart": true,
- "lineHeight": true,
- "opacity": true,
- "order": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
+ animationIterationCount: true,
+ aspectRatio: true,
+ borderImageSlice: true,
+ columnCount: true,
+ flexGrow: true,
+ flexShrink: true,
+ fontWeight: true,
+ gridArea: true,
+ gridColumn: true,
+ gridColumnEnd: true,
+ gridColumnStart: true,
+ gridRow: true,
+ gridRowEnd: true,
+ gridRowStart: true,
+ lineHeight: true,
+ opacity: true,
+ order: true,
+ orphans: true,
+ scale: true,
+ widows: true,
+ zIndex: true,
+ zoom: true,
+
+ // SVG-related
+ fillOpacity: true,
+ floodOpacity: true,
+ stopOpacity: true,
+ strokeMiterlimit: true,
+ strokeOpacity: true
},
// Add in properties whose names you wish to fix before
@@ -8726,9 +8496,39 @@ jQuery.each( [ "radio", "checkbox" ], function() {
// Return jQuery for attributes-only inclusion
+var location = window.location;
+
+var nonce = { guid: Date.now() };
+var rquery = ( /\?/ );
+
+
+
+// Cross-browser xml parsing
+jQuery.parseXML = function( data ) {
+ var xml, parserErrorElem;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+
+ // Support: IE 9 - 11 only
+ // IE throws on parseFromString with invalid input.
+ try {
+ xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
+ } catch ( e ) {}
-support.focusin = "onfocusin" in window;
+ parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
+ if ( !xml || parserErrorElem ) {
+ jQuery.error( "Invalid XML: " + (
+ parserErrorElem ?
+ jQuery.map( parserErrorElem.childNodes, function( el ) {
+ return el.textContent;
+ } ).join( "\n" ) :
+ data
+ ) );
+ }
+ return xml;
+};
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
@@ -8916,85 +8716,6 @@ jQuery.fn.extend( {
} );
-// Support: Firefox <=44
-// Firefox doesn't have focus(in | out) events
-// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
-//
-// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
-// focus(in | out) events fire after focus & blur events,
-// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
-// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
-if ( !support.focusin ) {
- jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler on the document while someone wants focusin/focusout
- var handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
-
- // Handle: regular nodes (via `this.ownerDocument`), window
- // (via `this.document`) & document (via `this`).
- var doc = this.ownerDocument || this.document || this,
- attaches = dataPriv.access( doc, fix );
-
- if ( !attaches ) {
- doc.addEventListener( orig, handler, true );
- }
- dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
- },
- teardown: function() {
- var doc = this.ownerDocument || this.document || this,
- attaches = dataPriv.access( doc, fix ) - 1;
-
- if ( !attaches ) {
- doc.removeEventListener( orig, handler, true );
- dataPriv.remove( doc, fix );
-
- } else {
- dataPriv.access( doc, fix, attaches );
- }
- }
- };
- } );
-}
-var location = window.location;
-
-var nonce = { guid: Date.now() };
-
-var rquery = ( /\?/ );
-
-
-
-// Cross-browser xml parsing
-jQuery.parseXML = function( data ) {
- var xml, parserErrorElem;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
-
- // Support: IE 9 - 11 only
- // IE throws on parseFromString with invalid input.
- try {
- xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
- } catch ( e ) {}
-
- parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
- if ( !xml || parserErrorElem ) {
- jQuery.error( "Invalid XML: " + (
- parserErrorElem ?
- jQuery.map( parserErrorElem.childNodes, function( el ) {
- return el.textContent;
- } ).join( "\n" ) :
- data
- ) );
- }
- return xml;
-};
-
-
var
rbracket = /\[\]$/,
rCRLF = /\r?\n/g,
@@ -10839,7 +10560,9 @@ jQuery.fn.extend( {
},
hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ return this
+ .on( "mouseenter", fnOver )
+ .on( "mouseleave", fnOut || fnOver );
}
} );
@@ -10993,7 +10716,7 @@ return jQuery;
} );
/*!
- * Lightbox v2.11.4
+ * Lightbox v2.11.5
* by Lokesh Dhakar
*
* More info:
@@ -11100,8 +10823,8 @@ return jQuery;
// while Lightbox is opened will keep the focus on or inside one of these
// two elements.
//
- // We do this so we can prevent propogation of the Esc keypress when
- // Lightbox is open. This prevents it from intefering with other components
+ // We do this so we can prevent propagation of the Esc keypress when
+ // Lightbox is open. This prevents it from interfering with other components
// on the page below.
//
// Github issue: https://github.com/lokesh/lightbox2/issues/663
diff --git a/dist/js/lightbox-plus-jquery.min.js b/dist/js/lightbox-plus-jquery.min.js
index 411e86ed..e7e79f5d 100644
--- a/dist/js/lightbox-plus-jquery.min.js
+++ b/dist/js/lightbox-plus-jquery.min.js
@@ -1,28 +1,15 @@
/*!
- * jQuery JavaScript Library v3.6.3
+ * jQuery JavaScript Library v3.7.1
* https://jquery.com/
*
- * Includes Sizzle.js
- * https://sizzlejs.com/
- *
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
- * Date: 2022-12-20T21:28Z
- */
-!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";function c(a,b,c){c=c||va;var d,e,f=c.createElement("script");if(f.text=a,b)for(d in wa)(e=b[d]||b.getAttribute&&b.getAttribute(d))&&f.setAttribute(d,e);c.head.appendChild(f).parentNode.removeChild(f)}function d(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?na[oa.call(a)]||"object":typeof a}function e(a){var b=!!a&&"length"in a&&a.length,c=d(a);return!ta(a)&&!ua(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}function f(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}function g(a,b,c){return ta(b)?ya.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?ya.grep(a,function(a){return a===b!==c}):"string"!=typeof b?ya.grep(a,function(a){return ma.call(b,a)>-1!==c}):ya.filter(b,a,c)}function h(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function i(a){var b={};return ya.each(a.match(Ia)||[],function(a,c){b[c]=!0}),b}function j(a){return a}function k(a){throw a}function l(a,b,c,d){var e;try{a&&ta(e=a.promise)?e.call(a).done(b).fail(c):a&&ta(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}function m(){va.removeEventListener("DOMContentLoaded",m),a.removeEventListener("load",m),ya.ready()}function n(a,b){return b.toUpperCase()}function o(a){return a.replace(Ma,"ms-").replace(Na,n)}function p(){this.expando=ya.expando+p.uid++}function q(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:Ra.test(a)?JSON.parse(a):a)}function r(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Sa,"-$&").toLowerCase(),"string"==typeof(c=a.getAttribute(d))){try{c=q(c)}catch(a){}Qa.set(a,b,c)}else c=void 0;return c}function s(a,b,c,d){var e,f,g=20,h=d?function(){return d.cur()}:function(){return ya.css(a,b,"")},i=h(),j=c&&c[3]||(ya.cssNumber[b]?"":"px"),k=a.nodeType&&(ya.cssNumber[b]||"px"!==j&&+i)&&Ua.exec(ya.css(a,b));if(k&&k[3]!==j){for(i/=2,j=j||k[3],k=+i||1;g--;)ya.style(a,b,k+j),(1-f)*(1-(f=h()/i||.5))<=0&&(g=0),k/=f;k*=2,ya.style(a,b,k+j),c=c||[]}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}function t(a){var b,c=a.ownerDocument,d=a.nodeName,e=$a[d];return e||(b=c.body.appendChild(c.createElement(d)),e=ya.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),$a[d]=e,e)}function u(a,b){for(var c,d,e=[],f=0,g=a.length;f-1)f&&f.push(g);else if(k=Xa(g),h=v(m.appendChild(g),"script"),k&&w(h),c)for(l=0;g=h[l++];)bb.test(g.type||"")&&c.push(g);return m}function y(){return!0}function z(){return!1}function A(a,b){return a===B()==("focus"===b)}function B(){try{return va.activeElement}catch(a){}}function C(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)C(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),!1===e)e=z;else if(!e)return a;return 1===f&&(g=e,e=function(a){return ya().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=ya.guid++)),a.each(function(){ya.event.add(this,b,e,d,c)})}function D(a,b,c){if(!c)return void(void 0===Pa.get(a,b)&&ya.event.add(a,b,y));Pa.set(a,b,!1),ya.event.add(a,b,{namespace:!1,handler:function(a){var d,e,f=Pa.get(this,b);if(1&a.isTrigger&&this[b]){if(f.length)(ya.event.special[b]||{}).delegateType&&a.stopPropagation();else if(f=ja.call(arguments),Pa.set(this,b,f),d=c(this,b),this[b](),e=Pa.get(this,b),f!==e||d?Pa.set(this,b,!1):e={},f!==e)return a.stopImmediatePropagation(),a.preventDefault(),e&&e.value}else f.length&&(Pa.set(this,b,{value:ya.event.trigger(ya.extend(f[0],ya.Event.prototype),f.slice(1),this)}),a.stopImmediatePropagation())}})}function E(a,b){return f(a,"table")&&f(11!==b.nodeType?b:b.firstChild,"tr")?ya(a).children("tbody")[0]||a:a}function F(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function G(a){return"true/"===(a.type||"").slice(0,5)?a.type=a.type.slice(5):a.removeAttribute("type"),a}function H(a,b){var c,d,e,f,g,h,i;if(1===b.nodeType){if(Pa.hasData(a)&&(f=Pa.get(a),i=f.events)){Pa.remove(b,"handle events");for(e in i)for(c=0,d=i[e].length;c1&&"string"==typeof o&&!sa.checkClone&&gb.test(o))return a.each(function(c){var f=a.eq(c);p&&(b[0]=o.call(this,c,f.html())),J(f,b,d,e)});if(m&&(f=x(b,a[0].ownerDocument,!1,a,e),g=f.firstChild,1===f.childNodes.length&&(f=g),g||e)){for(h=ya.map(v(f,"script"),F),i=h.length;l=0&&(i+=Math.max(0,Math.ceil(a["offset"+b[0].toUpperCase()+b.slice(1)]-f-i-h-.5))||0),i}function R(a,b,c){var d=kb(a),e=!sa.boxSizingReliable()||c,g=e&&"border-box"===ya.css(a,"boxSizing",!1,d),h=g,i=L(a,b,d),j="offset"+b[0].toUpperCase()+b.slice(1);if(ib.test(i)){if(!c)return i;i="auto"}return(!sa.boxSizingReliable()&&g||!sa.reliableTrDimensions()&&f(a,"tr")||"auto"===i||!parseFloat(i)&&"inline"===ya.css(a,"display",!1,d))&&a.getClientRects().length&&(g="border-box"===ya.css(a,"boxSizing",!1,d),(h=j in a)&&(i=a[j])),(i=parseFloat(i)||0)+Q(a,b,c||(g?"border":"content"),h,d,i)+"px"}function S(a,b,c,d,e){return new S.prototype.init(a,b,c,d,e)}function T(){wb&&(!1===va.hidden&&a.requestAnimationFrame?a.requestAnimationFrame(T):a.setTimeout(T,ya.fx.interval),ya.fx.tick())}function U(){return a.setTimeout(function(){vb=void 0}),vb=Date.now()}function V(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=Va[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function W(a,b,c){for(var d,e=(Z.tweeners[b]||[]).concat(Z.tweeners["*"]),f=0,g=e.length;f=0&&cx.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];return a}function d(a){return a[O]=!0,a}function e(a){var b=H.createElement("fieldset");try{return!!a(b)}catch(a){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function f(a,b){for(var c=a.split("|"),d=c.length;d--;)x.attrHandle[c[d]]=b}function g(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function h(a){return function(b){return"input"===b.nodeName.toLowerCase()&&b.type===a}}function i(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function j(a){return function(b){return"form"in b?b.parentNode&&!1===b.disabled?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&Aa(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function k(a){return d(function(b){return b=+b,d(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(a){return a&&void 0!==a.getElementsByTagName&&a}function m(){}function n(a){for(var b=0,c=a.length,d="";b1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function q(a,c,d){for(var e=0,f=c.length;e-1&&(d[j]=!(g[j]=l))}}else t=r(t===g?t.splice(o,t.length):t),f?f(null,g,t,i):_.apply(g,t)})}function t(a){for(var b,c,d,e=a.length,f=x.relative[a[0].type],g=f||x.relative[" "],h=f?1:0,i=o(function(a){return a===b},g,!0),j=o(function(a){return ba(b,a)>-1},g,!0),k=[function(a,c,d){var e=!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d));return b=null,e}];h1&&p(k),h>1&&n(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(ia,"$1"),c,h0,f=a.length>0,g=function(d,g,h,i,j){var k,l,m,n=0,o="0",p=d&&[],q=[],s=D,t=d||f&&x.find.TAG("*",j),u=Q+=null==s?1:Math.random()||.1,v=t.length;for(j&&(D=g==H||g||j);o!==v&&null!=(k=t[o]);o++){if(f&&k){for(l=0,g||k.ownerDocument==H||(G(k),h=!J);m=a[l++];)if(m(k,g||H,h)){i.push(k);break}j&&(Q=u)}e&&((k=!m&&k)&&n--,d&&p.push(k))}if(n+=o,e&&o!==n){for(l=0;m=c[l++];)m(p,q,g,h);if(d){if(n>0)for(;o--;)p[o]||q[o]||(q[o]=Z.call(i));q=r(q)}_.apply(i,q),j&&!d&&q.length>0&&n+c.length>1&&b.uniqueSort(i)}return j&&(Q=u,D=s),p};return e?d(g):g}var v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O="sizzle"+1*new Date,P=a.document,Q=0,R=0,S=c(),T=c(),U=c(),V=c(),W=function(a,b){return a===b&&(F=!0),0},X={}.hasOwnProperty,Y=[],Z=Y.pop,$=Y.push,_=Y.push,aa=Y.slice,ba=function(a,b){for(var c=0,d=a.length;c+~]|"+da+")"+da+"*"),la=new RegExp(da+"|>"),ma=new RegExp(ga),na=new RegExp("^"+ea+"$"),oa={ID:new RegExp("^#("+ea+")"),CLASS:new RegExp("^\\.("+ea+")"),TAG:new RegExp("^("+ea+"|[*])"),ATTR:new RegExp("^"+fa),PSEUDO:new RegExp("^"+ga),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+da+"*(even|odd|(([+-]|)(\\d*)n|)"+da+"*(?:([+-]|)"+da+"*(\\d+)|))"+da+"*\\)|)","i"),bool:new RegExp("^(?:"+ca+")$","i"),needsContext:new RegExp("^"+da+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+da+"*((?:-\\d)?\\d*)"+da+"*\\)|)(?=[^-]|$)","i")},pa=/HTML$/i,qa=/^(?:input|select|textarea|button)$/i,ra=/^h\d$/i,sa=/^[^{]+\{\s*\[native \w/,ta=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ua=/[+~]/,va=new RegExp("\\\\[\\da-fA-F]{1,6}"+da+"?|\\\\([^\\r\\n\\f])","g"),wa=function(a,b){var c="0x"+a.slice(1)-65536;return b||(c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296,1023&c|56320))},xa=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ya=function(a,b){return b?"\0"===a?"�":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},za=function(){G()},Aa=o(function(a){return!0===a.disabled&&"fieldset"===a.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{_.apply(Y=aa.call(P.childNodes),P.childNodes),Y[P.childNodes.length].nodeType}catch(a){_={apply:Y.length?function(a,b){$.apply(a,aa.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}w=b.support={},z=b.isXML=function(a){var b=a&&a.namespaceURI,c=a&&(a.ownerDocument||a).documentElement;return!pa.test(b||c&&c.nodeName||"HTML")},G=b.setDocument=function(a){var b,c,d=a?a.ownerDocument||a:P;return d!=H&&9===d.nodeType&&d.documentElement?(H=d,I=H.documentElement,J=!z(H),P!=H&&(c=H.defaultView)&&c.top!==c&&(c.addEventListener?c.addEventListener("unload",za,!1):c.attachEvent&&c.attachEvent("onunload",za)),w.scope=e(function(a){return I.appendChild(a).appendChild(H.createElement("div")),void 0!==a.querySelectorAll&&!a.querySelectorAll(":scope fieldset div").length}),w.cssSupportsSelector=e(function(){return CSS.supports("selector(*)")&&H.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")}),w.attributes=e(function(a){return a.className="i",!a.getAttribute("className")}),w.getElementsByTagName=e(function(a){return a.appendChild(H.createComment("")),!a.getElementsByTagName("*").length}),w.getElementsByClassName=sa.test(H.getElementsByClassName),w.getById=e(function(a){return I.appendChild(a).id=O,!H.getElementsByName||!H.getElementsByName(O).length}),w.getById?(x.filter.ID=function(a){var b=a.replace(va,wa);return function(a){return a.getAttribute("id")===b}},x.find.ID=function(a,b){if(void 0!==b.getElementById&&J){var c=b.getElementById(a);return c?[c]:[]}}):(x.filter.ID=function(a){var b=a.replace(va,wa);return function(a){var c=void 0!==a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},x.find.ID=function(a,b){if(void 0!==b.getElementById&&J){var c,d,e,f=b.getElementById(a);if(f){if((c=f.getAttributeNode("id"))&&c.value===a)return[f];for(e=b.getElementsByName(a),d=0;f=e[d++];)if((c=f.getAttributeNode("id"))&&c.value===a)return[f]}return[]}}),x.find.TAG=w.getElementsByTagName?function(a,b){return void 0!==b.getElementsByTagName?b.getElementsByTagName(a):w.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},x.find.CLASS=w.getElementsByClassName&&function(a,b){if(void 0!==b.getElementsByClassName&&J)return b.getElementsByClassName(a)},L=[],K=[],(w.qsa=sa.test(H.querySelectorAll))&&(e(function(a){var b;I.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&K.push("[*^$]="+da+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||K.push("\\["+da+"*(?:value|"+ca+")"),a.querySelectorAll("[id~="+O+"-]").length||K.push("~="),b=H.createElement("input"),b.setAttribute("name",""),a.appendChild(b),a.querySelectorAll("[name='']").length||K.push("\\["+da+"*name"+da+"*="+da+"*(?:''|\"\")"),a.querySelectorAll(":checked").length||K.push(":checked"),a.querySelectorAll("a#"+O+"+*").length||K.push(".#.+[+~]"),a.querySelectorAll("\\\f"),K.push("[\\r\\n\\f]")}),e(function(a){a.innerHTML="";var b=H.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&K.push("name"+da+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&K.push(":enabled",":disabled"),I.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&K.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),K.push(",.*:")})),(w.matchesSelector=sa.test(M=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&e(function(a){w.disconnectedMatch=M.call(a,"*"),M.call(a,"[s!='']:x"),L.push("!=",ga)}),w.cssSupportsSelector||K.push(":has"),K=K.length&&new RegExp(K.join("|")),L=L.length&&new RegExp(L.join("|")),b=sa.test(I.compareDocumentPosition),N=b||sa.test(I.contains)?function(a,b){var c=9===a.nodeType&&a.documentElement||a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},W=b?function(a,b){if(a===b)return F=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;return c||(c=(a.ownerDocument||a)==(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&c||!w.sortDetached&&b.compareDocumentPosition(a)===c?a==H||a.ownerDocument==P&&N(P,a)?-1:b==H||b.ownerDocument==P&&N(P,b)?1:E?ba(E,a)-ba(E,b):0:4&c?-1:1)}:function(a,b){if(a===b)return F=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a==H?-1:b==H?1:e?-1:f?1:E?ba(E,a)-ba(E,b):0;if(e===f)return g(a,b);for(c=a;c=c.parentNode;)h.unshift(c);for(c=b;c=c.parentNode;)i.unshift(c);for(;h[d]===i[d];)d++;return d?g(h[d],i[d]):h[d]==P?-1:i[d]==P?1:0},H):H},b.matches=function(a,c){return b(a,null,null,c)},b.matchesSelector=function(a,c){if(G(a),w.matchesSelector&&J&&!V[c+" "]&&(!L||!L.test(c))&&(!K||!K.test(c)))try{var d=M.call(a,c);if(d||w.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(a){V(c,!0)}return b(c,H,null,[a]).length>0},b.contains=function(a,b){return(a.ownerDocument||a)!=H&&G(a),N(a,b)},b.attr=function(a,b){(a.ownerDocument||a)!=H&&G(a);var c=x.attrHandle[b.toLowerCase()],d=c&&X.call(x.attrHandle,b.toLowerCase())?c(a,b,!J):void 0;return void 0!==d?d:w.attributes||!J?a.getAttribute(b):(d=a.getAttributeNode(b))&&d.specified?d.value:null},b.escape=function(a){return(a+"").replace(xa,ya)},b.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},b.uniqueSort=function(a){var b,c=[],d=0,e=0;if(F=!w.detectDuplicates,E=!w.sortStable&&a.slice(0),a.sort(W),F){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return E=null,a},y=b.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=y(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d++];)c+=y(b);return c},x=b.selectors={cacheLength:50,createPseudo:d,match:oa,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(va,wa),a[3]=(a[3]||a[4]||a[5]||"").replace(va,wa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&b.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return oa.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&ma.test(c)&&(b=A(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(va,wa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=S[a+" "];return b||(b=new RegExp("(^|"+da+")"+a+"("+da+"|$)"))&&S(a,function(a){return b.test("string"==typeof a.className&&a.className||void 0!==a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,c,d){return function(e){var f=b.attr(e,a);return null==f?"!="===c:!c||(f+="","="===c?f===d:"!="===c?f!==d:"^="===c?d&&0===f.indexOf(d):"*="===c?d&&f.indexOf(d)>-1:"$="===c?d&&f.slice(-d.length)===d:"~="===c?(" "+f.replace(ha," ")+" ").indexOf(d)>-1:"|="===c&&(f===d||f.slice(0,d.length+1)===d+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){for(;p;){for(m=b;m=m[p];)if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(m=q,l=m[O]||(m[O]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===Q&&j[1],t=n&&j[2],m=n&&q.childNodes[n];m=++n&&m&&m[p]||(t=n=0)||o.pop();)if(1===m.nodeType&&++t&&m===b){k[a]=[Q,n,t];break}}else if(s&&(m=b,l=m[O]||(m[O]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===Q&&j[1],t=n),!1===t)for(;(m=++n&&m&&m[p]||(t=n=0)||o.pop())&&((h?m.nodeName.toLowerCase()!==r:1!==m.nodeType)||!++t||(s&&(l=m[O]||(m[O]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[Q,t]),m!==b)););return(t-=e)===d||t%d==0&&t/d>=0}}},PSEUDO:function(a,c){var e,f=x.pseudos[a]||x.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);return f[O]?f(c):f.length>1?(e=[a,a,"",c],x.setFilters.hasOwnProperty(a.toLowerCase())?d(function(a,b){for(var d,e=f(a,c),g=e.length;g--;)d=ba(a,e[g]),a[d]=!(b[d]=e[g])}):function(a){return f(a,0,e)}):f}},pseudos:{not:d(function(a){var b=[],c=[],e=B(a.replace(ia,"$1"));return e[O]?d(function(a,b,c,d){for(var f,g=e(a,null,d,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,d,f){return b[0]=a,e(b,null,f,c),b[0]=null,!c.pop()}}),has:d(function(a){return function(c){return b(a,c).length>0}}),contains:d(function(a){return a=a.replace(va,wa),function(b){return(b.textContent||y(b)).indexOf(a)>-1}}),lang:d(function(a){return na.test(a||"")||b.error("unsupported lang: "+a),a=a.replace(va,wa).toLowerCase(),function(b){var c;do{if(c=J?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return(c=c.toLowerCase())===a||0===c.indexOf(a+"-")}while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===I},focus:function(a){return a===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:j(!1),disabled:j(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!x.pseudos.empty(a)},header:function(a){return ra.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[c<0?c+b:c]}),even:k(function(a,b){for(var c=0;cb?b:c;--d>=0;)a.push(d);return a}),gt:k(function(a,b,c){for(var d=c<0?c+b:c;++d2&&"ID"===(g=f[0]).type&&9===b.nodeType&&J&&x.relative[f[1].type]){if(!(b=(x.find.ID(g.matches[0].replace(va,wa),b)||[])[0]))return c;j&&(b=b.parentNode),a=a.slice(f.shift().value.length)}for(e=oa.needsContext.test(a)?0:f.length;e--&&(g=f[e],!x.relative[h=g.type]);)if((i=x.find[h])&&(d=i(g.matches[0].replace(va,wa),ua.test(f[0].type)&&l(b.parentNode)||b))){if(f.splice(e,1),!(a=d.length&&n(f)))return _.apply(c,d),c;break}}return(j||B(a,k))(d,b,!J,c,!b||ua.test(a)&&l(b.parentNode)||b),c},w.sortStable=O.split("").sort(W).join("")===O,w.detectDuplicates=!!F,G(),w.sortDetached=e(function(a){return 1&a.compareDocumentPosition(H.createElement("fieldset"))}),e(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||f("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),w.attributes&&e(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||f("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),e(function(a){return null==a.getAttribute("disabled")})||f(ca,function(a,b,c){var d;if(!c)return!0===a[b]?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),b}(a);ya.find=za,ya.expr=za.selectors,ya.expr[":"]=ya.expr.pseudos,ya.uniqueSort=ya.unique=za.uniqueSort,ya.text=za.getText,ya.isXMLDoc=za.isXML,ya.contains=za.contains,ya.escapeSelector=za.escape;var Aa=function(a,b,c){for(var d=[],e=void 0!==c;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(e&&ya(a).is(c))break;d.push(a)}return d},Ba=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},Ca=ya.expr.match.needsContext,Da=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;ya.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?ya.find.matchesSelector(d,a)?[d]:[]:ya.find.matches(a,ya.grep(b,function(a){return 1===a.nodeType}))},ya.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(ya(a).filter(function(){for(b=0;b1?ya.uniqueSort(c):c},filter:function(a){return this.pushStack(g(this,a||[],!1))},not:function(a){return this.pushStack(g(this,a||[],!0))},is:function(a){return!!g(this,"string"==typeof a&&Ca.test(a)?ya(a):a||[],!1).length}});var Ea,Fa=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(ya.fn.init=function(a,b,c){var d,e;if(!a)return this;if(c=c||Ea,"string"==typeof a){if(!(d="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:Fa.exec(a))||!d[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(d[1]){if(b=b instanceof ya?b[0]:b,ya.merge(this,ya.parseHTML(d[1],b&&b.nodeType?b.ownerDocument||b:va,!0)),Da.test(d[1])&&ya.isPlainObject(b))for(d in b)ta(this[d])?this[d](b[d]):this.attr(d,b[d]);return this}return e=va.getElementById(d[2]),e&&(this[0]=e,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):ta(a)?void 0!==c.ready?c.ready(a):a(ya):ya.makeArray(a,this)}).prototype=ya.fn,Ea=ya(va);var Ga=/^(?:parents|prev(?:Until|All))/,Ha={children:!0,contents:!0,next:!0,prev:!0};ya.fn.extend({has:function(a){var b=ya(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&ya.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?ya.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?ma.call(ya(a),this[0]):ma.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(ya.uniqueSort(ya.merge(this.get(),ya(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),ya.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return Aa(a,"parentNode")},parentsUntil:function(a,b,c){return Aa(a,"parentNode",c)},next:function(a){return h(a,"nextSibling")},prev:function(a){return h(a,"previousSibling")},nextAll:function(a){return Aa(a,"nextSibling")},prevAll:function(a){return Aa(a,"previousSibling")},nextUntil:function(a,b,c){return Aa(a,"nextSibling",c)},prevUntil:function(a,b,c){return Aa(a,"previousSibling",c)},siblings:function(a){return Ba((a.parentNode||{}).firstChild,a)},children:function(a){return Ba(a.firstChild)},contents:function(a){return null!=a.contentDocument&&ia(a.contentDocument)?a.contentDocument:(f(a,"template")&&(a=a.content||a),ya.merge([],a.childNodes))}},function(a,b){ya.fn[a]=function(c,d){var e=ya.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=ya.filter(d,e)),this.length>1&&(Ha[a]||ya.uniqueSort(e),Ga.test(a)&&e.reverse()),this.pushStack(e)}});var Ia=/[^\x20\t\r\n\f]+/g;ya.Callbacks=function(a){a="string"==typeof a?i(a):ya.extend({},a);var b,c,e,f,g=[],h=[],j=-1,k=function(){for(f=f||a.once,e=b=!0;h.length;j=-1)for(c=h.shift();++j-1;)g.splice(c,1),c<=j&&j--}),this},has:function(a){return a?ya.inArray(a,g)>-1:g.length>0},empty:function(){return g&&(g=[]),this},disable:function(){return f=h=[],g=c="",this},disabled:function(){return!g},lock:function(){return f=h=[],c||b||(g=c=""),this},locked:function(){return!!f},fireWith:function(a,c){return f||(c=c||[],c=[a,c.slice?c.slice():c],h.push(c),b||k()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!e}};return l},ya.extend({Deferred:function(b){var c=[["notify","progress",ya.Callbacks("memory"),ya.Callbacks("memory"),2],["resolve","done",ya.Callbacks("once memory"),ya.Callbacks("once memory"),0,"resolved"],["reject","fail",ya.Callbacks("once memory"),ya.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},catch:function(a){return e.then(null,a)},pipe:function(){var a=arguments;return ya.Deferred(function(b){ya.each(c,function(c,d){var e=ta(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&ta(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){function f(b,c,d,e){return function(){var h=this,i=arguments,l=function(){var a,l;if(!(b=g&&(d!==k&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?m():(ya.Deferred.getStackHook&&(m.stackTrace=ya.Deferred.getStackHook()),a.setTimeout(m))}}var g=0;return ya.Deferred(function(a){c[0][3].add(f(0,a,ta(e)?e:j,a.notifyWith)),c[1][3].add(f(0,a,ta(b)?b:j)),c[2][3].add(f(0,a,ta(d)?d:k))}).promise()},promise:function(a){return null!=a?ya.extend(a,e):e}},f={};return ya.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[3-a][3].disable,c[0][2].lock,c[0][3].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=ja.call(arguments),f=ya.Deferred(),g=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?ja.call(arguments):c,--b||f.resolveWith(d,e)}};if(b<=1&&(l(a,f.done(g(c)).resolve,f.reject,!b),"pending"===f.state()||ta(e[c]&&e[c].then)))return f.then();for(;c--;)l(e[c],g(c),f.reject);return f.promise()}});var Ja=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ya.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Ja.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},ya.readyException=function(b){a.setTimeout(function(){throw b})};var Ka=ya.Deferred();ya.fn.ready=function(a){return Ka.then(a).catch(function(a){ya.readyException(a)}),this},ya.extend({isReady:!1,readyWait:1,ready:function(a){(!0===a?--ya.readyWait:ya.isReady)||(ya.isReady=!0,!0!==a&&--ya.readyWait>0||Ka.resolveWith(va,[ya]))}}),ya.ready.then=Ka.then,"complete"===va.readyState||"loading"!==va.readyState&&!va.documentElement.doScroll?a.setTimeout(ya.ready):(va.addEventListener("DOMContentLoaded",m),a.addEventListener("load",m));var La=function(a,b,c,e,f,g,h){var i=0,j=a.length,k=null==c;if("object"===d(c)){f=!0;for(i in c)La(a,b,i,c[i],!0,g,h)}else if(void 0!==e&&(f=!0,ta(e)||(h=!0),k&&(h?(b.call(a,e),b=null):(k=b,b=function(a,b,c){return k.call(ya(a),c)})),b))for(;i1,null,!0)},removeData:function(a){return this.each(function(){Qa.remove(this,a)})}}),ya.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=Pa.get(a,b),c&&(!d||Array.isArray(c)?d=Pa.access(a,b,ya.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=ya.queue(a,b),d=c.length,e=c.shift(),f=ya._queueHooks(a,b),g=function(){ya.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return Pa.get(a,c)||Pa.access(a,c,{empty:ya.Callbacks("once memory").add(function(){Pa.remove(a,[b+"queue",c])})})}}),ya.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]*)/i,bb=/^$|^module$|\/(?:java|ecma)script/i;!function(){var a=va.createDocumentFragment(),b=a.appendChild(va.createElement("div")),c=va.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),sa.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",sa.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,b.innerHTML="",sa.option=!!b.lastChild}();var cb={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};cb.tbody=cb.tfoot=cb.colgroup=cb.caption=cb.thead,cb.th=cb.td,sa.option||(cb.optgroup=cb.option=[1,""]);var db=/<|?\w+;/,eb=/^([^.]*)(?:\.(.+)|)/;ya.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=Pa.get(a);if(Oa(a))for(c.handler&&(f=c,c=f.handler,e=f.selector),e&&ya.find.matchesSelector(Wa,e),c.guid||(c.guid=ya.guid++),(i=q.events)||(i=q.events=Object.create(null)),(g=q.handle)||(g=q.handle=function(b){return void 0!==ya&&ya.event.triggered!==b.type?ya.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(Ia)||[""],j=b.length;j--;)h=eb.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=ya.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=ya.event.special[n]||{},k=ya.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&ya.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&!1!==l.setup.call(a,d,o,g)||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),ya.event.global[n]=!0)},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=Pa.hasData(a)&&Pa.get(a);if(q&&(i=q.events)){for(b=(b||"").match(Ia)||[""],j=b.length;j--;)if(h=eb.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=ya.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;f--;)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&!1!==l.teardown.call(a,o,q.handle)||ya.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)ya.event.remove(a,n+b[j],c,d,!0);ya.isEmptyObject(i)&&Pa.remove(a,"handle events")}},dispatch:function(a){var b,c,d,e,f,g,h=new Array(arguments.length),i=ya.event.fix(a),j=(Pa.get(this,"events")||Object.create(null))[i.type]||[],k=ya.event.special[i.type]||{};for(h[0]=i,b=1;b=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||!0!==j.disabled)){for(f=[],g={},c=0;c-1:ya.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\s*$/g;ya.extend({htmlPrefilter:function(a){return a},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=Xa(a);if(!(sa.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||ya.isXMLDoc(a)))for(g=v(h),f=v(a),d=0,e=f.length;d0&&w(g,!i&&v(a,"script")),h},cleanData:function(a){for(var b,c,d,e=ya.event.special,f=0;void 0!==(c=a[f]);f++)if(Oa(c)){if(b=c[Pa.expando]){if(b.events)for(d in b.events)e[d]?ya.event.remove(c,d):ya.removeEvent(c,d,b.handle);c[Pa.expando]=void 0}c[Qa.expando]&&(c[Qa.expando]=void 0)}}}),ya.fn.extend({detach:function(a){return K(this,a,!0)},remove:function(a){return K(this,a)},text:function(a){return La(this,function(a){return void 0===a?ya.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return J(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){E(this,a).appendChild(a)}})},prepend:function(){return J(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=E(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return J(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return J(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(ya.cleanData(v(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return ya.clone(this,a,b)})},html:function(a){return La(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!fb.test(a)&&!cb[(ab.exec(a)||["",""])[1].toLowerCase()]){a=ya.htmlPrefilter(a);try{for(;c1)}}),ya.Tween=S,S.prototype={constructor:S,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||ya.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(ya.cssNumber[c]?"":"px")},cur:function(){var a=S.propHooks[this.prop];return a&&a.get?a.get(this):S.propHooks._default.get(this)},run:function(a){var b,c=S.propHooks[this.prop];return this.options.duration?this.pos=b=ya.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):S.propHooks._default.set(this),this}},S.prototype.init.prototype=S.prototype,S.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=ya.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){ya.fx.step[a.prop]?ya.fx.step[a.prop](a):1!==a.elem.nodeType||!ya.cssHooks[a.prop]&&null==a.elem.style[O(a.prop)]?a.elem[a.prop]=a.now:ya.style(a.elem,a.prop,a.now+a.unit)}}},S.propHooks.scrollTop=S.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},ya.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},ya.fx=S.prototype.init,ya.fx.step={};var vb,wb,xb=/^(?:toggle|show|hide)$/,yb=/queueHooks$/;ya.Animation=ya.extend(Z,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return s(c.elem,a,Ua.exec(b),c),c}]},tweener:function(a,b){ta(a)?(b=a,a=["*"]):a=a.match(Ia);for(var c,d=0,e=a.length;d1)},removeAttr:function(a){return this.each(function(){ya.removeAttr(this,a)})}}),ya.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return void 0===a.getAttribute?ya.prop(a,b,c):(1===f&&ya.isXMLDoc(a)||(e=ya.attrHooks[b.toLowerCase()]||(ya.expr.match.bool.test(b)?zb:void 0)),void 0!==c?null===c?void ya.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=ya.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!sa.radioValue&&"radio"===b&&f(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(Ia);if(e&&1===a.nodeType)for(;c=e[d++];)a.removeAttribute(c)}}),zb={set:function(a,b,c){return!1===b?ya.removeAttr(a,c):a.setAttribute(c,c),c}},ya.each(ya.expr.match.bool.source.match(/\w+/g),function(a,b){var c=Ab[b]||ya.find.attr;Ab[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=Ab[g],Ab[g]=e,e=null!=c(a,b,d)?g:null,Ab[g]=f),e}});var Bb=/^(?:input|select|textarea|button)$/i,Cb=/^(?:a|area)$/i;ya.fn.extend({prop:function(a,b){return La(this,ya.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[ya.propFix[a]||a]})}}),ya.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&ya.isXMLDoc(a)||(b=ya.propFix[b]||b,e=ya.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=ya.find.attr(a,"tabindex");return b?parseInt(b,10):Bb.test(a.nodeName)||Cb.test(a.nodeName)&&a.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),sa.optSelected||(ya.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),ya.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ya.propFix[this.toLowerCase()]=this}),ya.fn.extend({addClass:function(a){var b,c,d,e,f,g;return ta(a)?this.each(function(b){ya(this).addClass(a.call(this,b,_(this)))}):(b=aa(a),b.length?this.each(function(){if(d=_(this),c=1===this.nodeType&&" "+$(d)+" "){for(f=0;f-1;)c=c.replace(" "+e+" "," ");g=$(c),d!==g&&this.setAttribute("class",g)}}):this):this.attr("class","")},toggleClass:function(a,b){var c,d,e,f,g=typeof a,h="string"===g||Array.isArray(a);return ta(a)?this.each(function(c){ya(this).toggleClass(a.call(this,c,_(this),b),b)}):"boolean"==typeof b&&h?b?this.addClass(a):this.removeClass(a):(c=aa(a),this.each(function(){if(h)for(f=ya(this),e=0;e-1)return!0;return!1}});var Db=/\r/g;ya.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=ta(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,ya(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=ya.map(e,function(a){return null==a?"":a+""})),(b=ya.valHooks[this.type]||ya.valHooks[this.nodeName.toLowerCase()])&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return(b=ya.valHooks[e.type]||ya.valHooks[e.nodeName.toLowerCase()])&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(Db,""):null==c?"":c)}}}),ya.extend({valHooks:{option:{get:function(a){var b=ya.find.attr(a,"value");return null!=b?b:$(ya.text(a))}},select:{get:function(a){var b,c,d,e=a.options,g=a.selectedIndex,h="select-one"===a.type,i=h?null:[],j=h?g+1:e.length;for(d=g<0?j:h?g:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),ya.each(["radio","checkbox"],function(){ya.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=ya.inArray(ya(a).val(),b)>-1}},sa.checkOn||(ya.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),sa.focusin="onfocusin"in a;var Eb=/^(?:focusinfocus|focusoutblur)$/,Fb=function(a){a.stopPropagation()};ya.extend(ya.event,{trigger:function(b,c,d,e){var f,g,h,i,j,k,l,m,n=[d||va],o=pa.call(b,"type")?b.type:b,p=pa.call(b,"namespace")?b.namespace.split("."):[];if(g=m=h=d=d||va,3!==d.nodeType&&8!==d.nodeType&&!Eb.test(o+ya.event.triggered)&&(o.indexOf(".")>-1&&(p=o.split("."),o=p.shift(),p.sort()),j=o.indexOf(":")<0&&"on"+o,b=b[ya.expando]?b:new ya.Event(o,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=p.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:ya.makeArray(c,[b]),l=ya.event.special[o]||{},e||!l.trigger||!1!==l.trigger.apply(d,c))){if(!e&&!l.noBubble&&!ua(d)){for(i=l.delegateType||o,Eb.test(i+o)||(g=g.parentNode);g;g=g.parentNode)n.push(g),h=g;h===(d.ownerDocument||va)&&n.push(h.defaultView||h.parentWindow||a)}for(f=0;(g=n[f++])&&!b.isPropagationStopped();)m=g,b.type=f>1?i:l.bindType||o,k=(Pa.get(g,"events")||Object.create(null))[b.type]&&Pa.get(g,"handle"),k&&k.apply(g,c),(k=j&&g[j])&&k.apply&&Oa(g)&&(b.result=k.apply(g,c),!1===b.result&&b.preventDefault());return b.type=o,e||b.isDefaultPrevented()||l._default&&!1!==l._default.apply(n.pop(),c)||!Oa(d)||j&&ta(d[o])&&!ua(d)&&(h=d[j],h&&(d[j]=null),ya.event.triggered=o,b.isPropagationStopped()&&m.addEventListener(o,Fb),d[o](),b.isPropagationStopped()&&m.removeEventListener(o,Fb),ya.event.triggered=void 0,h&&(d[j]=h)),b.result}},simulate:function(a,b,c){var d=ya.extend(new ya.Event,c,{type:a,isSimulated:!0});ya.event.trigger(d,null,b)}}),ya.fn.extend({trigger:function(a,b){return this.each(function(){ya.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return ya.event.trigger(a,b,c,!0)}}),sa.focusin||ya.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){ya.event.simulate(b,a.target,ya.event.fix(a))};ya.event.special[b]={setup:function(){var d=this.ownerDocument||this.document||this,e=Pa.access(d,b);e||d.addEventListener(a,c,!0),Pa.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this.document||this,e=Pa.access(d,b)-1;e?Pa.access(d,b,e):(d.removeEventListener(a,c,!0),Pa.remove(d,b))}}});var Gb=a.location,Hb={guid:Date.now()},Ib=/\?/;ya.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(a){}return d=c&&c.getElementsByTagName("parsererror")[0],c&&!d||ya.error("Invalid XML: "+(d?ya.map(d.childNodes,function(a){return a.textContent}).join("\n"):b)),c};var Jb=/\[\]$/,Kb=/\r?\n/g,Lb=/^(?:submit|button|image|reset|file)$/i,Mb=/^(?:input|select|textarea|keygen)/i;ya.param=function(a,b){var c,d=[],e=function(a,b){var c=ta(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(null==a)return"";if(Array.isArray(a)||a.jquery&&!ya.isPlainObject(a))ya.each(a,function(){e(this.name,this.value)});else for(c in a)ba(c,a[c],b,e);return d.join("&")},ya.fn.extend({serialize:function(){return ya.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=ya.prop(this,"elements");return a?ya.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!ya(this).is(":disabled")&&Mb.test(this.nodeName)&&!Lb.test(a)&&(this.checked||!_a.test(a))}).map(function(a,b){var c=ya(this).val();return null==c?null:Array.isArray(c)?ya.map(c,function(a){return{name:b.name,value:a.replace(Kb,"\r\n")}}):{name:b.name,value:c.replace(Kb,"\r\n")}}).get()}});var Nb=/%20/g,Ob=/#.*$/,Pb=/([?&])_=[^&]*/,Qb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Sb=/^(?:GET|HEAD)$/,Tb=/^\/\//,Ub={},Vb={},Wb="*/".concat("*"),Xb=va.createElement("a");Xb.href=Gb.href,ya.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Gb.href,type:"GET",isLocal:Rb.test(Gb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wb,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":ya.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?ea(ea(a,ya.ajaxSettings),b):ea(ya.ajaxSettings,a)},ajaxPrefilter:ca(Ub),ajaxTransport:ca(Vb),ajax:function(b,c){function d(b,c,d,h){var j,m,n,u,v,w=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",x.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(u=fa(o,x,d)),!j&&ya.inArray("script",o.dataTypes)>-1&&ya.inArray("json",o.dataTypes)<0&&(o.converters["text script"]=function(){}),u=ga(o,u,x,j),j?(o.ifModified&&(v=x.getResponseHeader("Last-Modified"),v&&(ya.lastModified[f]=v),(v=x.getResponseHeader("etag"))&&(ya.etag[f]=v)),204===b||"HEAD"===o.type?w="nocontent":304===b?w="notmodified":(w=u.state,m=u.data,n=u.error,j=!n)):(n=w,!b&&w||(w="error",b<0&&(b=0))),x.status=b,x.statusText=(c||w)+"",j?r.resolveWith(p,[m,w,x]):r.rejectWith(p,[x,w,n]),x.statusCode(t),t=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[x,o,j?m:n]),s.fireWith(p,[x,w]),l&&(q.trigger("ajaxComplete",[x,o]),--ya.active||ya.event.trigger("ajaxStop")))}"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=ya.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?ya(p):ya.event,r=ya.Deferred(),s=ya.Callbacks("once memory"),t=o.statusCode||{},u={},v={},w="canceled",x={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h)for(h={};b=Qb.exec(g);)h[b[1].toLowerCase()+" "]=(h[b[1].toLowerCase()+" "]||[]).concat(b[2]);b=h[a.toLowerCase()+" "]}return null==b?null:b.join(", ")},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=v[a.toLowerCase()]=v[a.toLowerCase()]||a,u[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)x.always(a[x.status]);else for(b in a)t[b]=[t[b],a[b]];return this},abort:function(a){var b=a||w;return e&&e.abort(b),d(0,b),this}};if(r.promise(x),o.url=((b||o.url||Gb.href)+"").replace(Tb,Gb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(Ia)||[""],null==o.crossDomain){j=va.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Xb.protocol+"//"+Xb.host!=j.protocol+"//"+j.host}catch(a){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=ya.param(o.data,o.traditional)),da(Ub,o,c,x),k)return x;l=ya.event&&o.global,l&&0==ya.active++&&ya.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Sb.test(o.type),f=o.url.replace(Ob,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Nb,"+")):(n=o.url.slice(f.length),o.data&&(o.processData||"string"==typeof o.data)&&(f+=(Ib.test(f)?"&":"?")+o.data,delete o.data),!1===o.cache&&(f=f.replace(Pb,"$1"),n=(Ib.test(f)?"&":"?")+"_="+Hb.guid+++n),o.url=f+n),o.ifModified&&(ya.lastModified[f]&&x.setRequestHeader("If-Modified-Since",ya.lastModified[f]),ya.etag[f]&&x.setRequestHeader("If-None-Match",ya.etag[f])),(o.data&&o.hasContent&&!1!==o.contentType||c.contentType)&&x.setRequestHeader("Content-Type",o.contentType),x.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Wb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)x.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(!1===o.beforeSend.call(p,x,o)||k))return x.abort();if(w="abort",s.add(o.complete),x.done(o.success),x.fail(o.error),e=da(Vb,o,c,x)){if(x.readyState=1,l&&q.trigger("ajaxSend",[x,o]),k)return x;o.async&&o.timeout>0&&(i=a.setTimeout(function(){x.abort("timeout")},o.timeout));try{k=!1,e.send(u,d)}catch(a){if(k)throw a;d(-1,a)}}else d(-1,"No Transport");return x},getJSON:function(a,b,c){return ya.get(a,b,c,"json")},getScript:function(a,b){return ya.get(a,void 0,b,"script")}}),ya.each(["get","post"],function(a,b){ya[b]=function(a,c,d,e){return ta(c)&&(e=e||d,d=c,c=void 0),ya.ajax(ya.extend({url:a,type:b,dataType:e,data:c,success:d},ya.isPlainObject(a)&&a))}}),ya.ajaxPrefilter(function(a){var b;for(b in a.headers)"content-type"===b.toLowerCase()&&(a.contentType=a.headers[b]||"")}),ya._evalUrl=function(a,b,c){return ya.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(a){ya.globalEval(a,b,c)}})},ya.fn.extend({wrapAll:function(a){var b;return this[0]&&(ta(a)&&(a=a.call(this[0])),b=ya(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstElementChild;)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return ta(a)?this.each(function(b){ya(this).wrapInner(a.call(this,b))}):this.each(function(){var b=ya(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=ta(a);return this.each(function(c){ya(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){ya(this).replaceWith(this.childNodes)}),this}}),ya.expr.pseudos.hidden=function(a){return!ya.expr.pseudos.visible(a)},ya.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},ya.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(a){}};var Yb={0:200,1223:204},Zb=ya.ajaxSettings.xhr();sa.cors=!!Zb&&"withCredentials"in Zb,sa.ajax=Zb=!!Zb,ya.ajaxTransport(function(b){var c,d;if(sa.cors||Zb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.ontimeout=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Yb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=h.ontimeout=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(a){if(c)throw a}},abort:function(){c&&c()}}}),ya.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),ya.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return ya.globalEval(a),a}}}),ya.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),ya.ajaxTransport("script",function(a){if(a.crossDomain||a.scriptAttrs){var b,c;return{send:function(d,e){b=ya("