hof 20.3.11 → 20.4.0-beta-session-timeout
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nyc_output/9651d42a-59d8-48e6-949c-655d9fa6db21.json +1 -0
- package/.nyc_output/processinfo/9651d42a-59d8-48e6-949c-655d9fa6db21.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/components/date/templates/date.html +1 -1
- package/config/hof-defaults.js +10 -5
- package/frontend/govuk-template/build/govuk_template.html +17 -18
- package/frontend/govuk-template/govuk_template_generated.html +17 -18
- package/frontend/template-mixins/partials/forms/checkbox-group.html +1 -1
- package/frontend/template-mixins/partials/forms/option-group.html +1 -1
- package/frontend/template-mixins/partials/forms/textarea-group.html +3 -1
- package/frontend/template-partials/translations/src/en/buttons.json +1 -0
- package/frontend/template-partials/views/layout.html +2 -1
- package/frontend/template-partials/views/partials/cookie-banner.html +2 -2
- package/frontend/template-partials/views/partials/gatag.html +0 -1
- package/frontend/template-partials/views/partials/head.html +23 -0
- package/frontend/template-partials/views/partials/session-timeout-warning.html +26 -0
- package/frontend/themes/gov-uk/client-js/dialog/index.js +358 -0
- package/frontend/themes/gov-uk/client-js/dialog/utils.js +114 -0
- package/frontend/themes/gov-uk/client-js/index.js +1 -0
- package/frontend/themes/gov-uk/styles/govuk.scss +1 -0
- package/frontend/themes/gov-uk/styles/session_timeout.scss +138 -0
- package/lib/ga-tag.js +33 -7
- package/lib/health.js +1 -1
- package/lib/sessions.js +0 -2
- package/middleware/cookies.js +2 -0
- package/middleware/rate-limiter.js +1 -3
- package/package.json +5 -5
- package/sandbox/apps/sandbox/fields.js +0 -6
- package/sandbox/apps/sandbox/translations/src/en/fields.json +5 -5
- package/sandbox/apps/sandbox/translations/src/en/pages.json +1 -1
- package/sandbox/config.js +1 -2
- package/sandbox/public/js/bundle.js +965 -1130
- package/sandbox/server.js +1 -4
- package/sandbox/yarn.lock +3 -3
- package/.nyc_output/b924df42-9cb6-4618-9a07-4f58f67ae28a.json +0 -1
- package/.nyc_output/processinfo/b924df42-9cb6-4618-9a07-4f58f67ae28a.json +0 -1
- package/sandbox/dump.rdb +0 -0
@@ -21222,17 +21222,14 @@ $('.typeahead').each(function applyTypeahead() {
|
|
21222
21222
|
|
21223
21223
|
},{"../../../frontend/themes/gov-uk/client-js":3,"jquery":17,"typeahead-aria":20}],17:[function(require,module,exports){
|
21224
21224
|
/*!
|
21225
|
-
* jQuery JavaScript Library v3.
|
21225
|
+
* jQuery JavaScript Library v3.7.1
|
21226
21226
|
* https://jquery.com/
|
21227
21227
|
*
|
21228
|
-
* Includes Sizzle.js
|
21229
|
-
* https://sizzlejs.com/
|
21230
|
-
*
|
21231
21228
|
* Copyright OpenJS Foundation and other contributors
|
21232
21229
|
* Released under the MIT license
|
21233
21230
|
* https://jquery.org/license
|
21234
21231
|
*
|
21235
|
-
* Date:
|
21232
|
+
* Date: 2023-08-28T13:37Z
|
21236
21233
|
*/
|
21237
21234
|
( function( global, factory ) {
|
21238
21235
|
|
@@ -21246,7 +21243,7 @@ $('.typeahead').each(function applyTypeahead() {
|
|
21246
21243
|
// (such as Node.js), expose a factory as module.exports.
|
21247
21244
|
// This accentuates the need for the creation of a real `window`.
|
21248
21245
|
// e.g. var jQuery = require("jquery")(window);
|
21249
|
-
// See ticket
|
21246
|
+
// See ticket trac-14549 for more info.
|
21250
21247
|
module.exports = global.document ?
|
21251
21248
|
factory( global, true ) :
|
21252
21249
|
function( w ) {
|
@@ -21373,8 +21370,9 @@ function toType( obj ) {
|
|
21373
21370
|
|
21374
21371
|
|
21375
21372
|
|
21376
|
-
var
|
21377
|
-
|
21373
|
+
var version = "3.7.1",
|
21374
|
+
|
21375
|
+
rhtmlSuffix = /HTML$/i,
|
21378
21376
|
|
21379
21377
|
// Define a local copy of jQuery
|
21380
21378
|
jQuery = function( selector, context ) {
|
@@ -21620,6 +21618,38 @@ jQuery.extend( {
|
|
21620
21618
|
return obj;
|
21621
21619
|
},
|
21622
21620
|
|
21621
|
+
|
21622
|
+
// Retrieve the text value of an array of DOM nodes
|
21623
|
+
text: function( elem ) {
|
21624
|
+
var node,
|
21625
|
+
ret = "",
|
21626
|
+
i = 0,
|
21627
|
+
nodeType = elem.nodeType;
|
21628
|
+
|
21629
|
+
if ( !nodeType ) {
|
21630
|
+
|
21631
|
+
// If no nodeType, this is expected to be an array
|
21632
|
+
while ( ( node = elem[ i++ ] ) ) {
|
21633
|
+
|
21634
|
+
// Do not traverse comment nodes
|
21635
|
+
ret += jQuery.text( node );
|
21636
|
+
}
|
21637
|
+
}
|
21638
|
+
if ( nodeType === 1 || nodeType === 11 ) {
|
21639
|
+
return elem.textContent;
|
21640
|
+
}
|
21641
|
+
if ( nodeType === 9 ) {
|
21642
|
+
return elem.documentElement.textContent;
|
21643
|
+
}
|
21644
|
+
if ( nodeType === 3 || nodeType === 4 ) {
|
21645
|
+
return elem.nodeValue;
|
21646
|
+
}
|
21647
|
+
|
21648
|
+
// Do not include comment or processing instruction nodes
|
21649
|
+
|
21650
|
+
return ret;
|
21651
|
+
},
|
21652
|
+
|
21623
21653
|
// results is for internal usage only
|
21624
21654
|
makeArray: function( arr, results ) {
|
21625
21655
|
var ret = results || [];
|
@@ -21642,6 +21672,15 @@ jQuery.extend( {
|
|
21642
21672
|
return arr == null ? -1 : indexOf.call( arr, elem, i );
|
21643
21673
|
},
|
21644
21674
|
|
21675
|
+
isXMLDoc: function( elem ) {
|
21676
|
+
var namespace = elem && elem.namespaceURI,
|
21677
|
+
docElem = elem && ( elem.ownerDocument || elem ).documentElement;
|
21678
|
+
|
21679
|
+
// Assume HTML when documentElement doesn't yet exist, such as inside
|
21680
|
+
// document fragments.
|
21681
|
+
return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" );
|
21682
|
+
},
|
21683
|
+
|
21645
21684
|
// Support: Android <=4.0 only, PhantomJS 1 only
|
21646
21685
|
// push.apply(_, arraylike) throws on ancient WebKit
|
21647
21686
|
merge: function( first, second ) {
|
@@ -21743,43 +21782,98 @@ function isArrayLike( obj ) {
|
|
21743
21782
|
return type === "array" || length === 0 ||
|
21744
21783
|
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
21745
21784
|
}
|
21746
|
-
|
21747
|
-
|
21748
|
-
|
21749
|
-
|
21750
|
-
|
21751
|
-
|
21752
|
-
|
21753
|
-
|
21754
|
-
|
21755
|
-
|
21756
|
-
|
21757
|
-
|
21785
|
+
|
21786
|
+
|
21787
|
+
function nodeName( elem, name ) {
|
21788
|
+
|
21789
|
+
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
21790
|
+
|
21791
|
+
}
|
21792
|
+
var pop = arr.pop;
|
21793
|
+
|
21794
|
+
|
21795
|
+
var sort = arr.sort;
|
21796
|
+
|
21797
|
+
|
21798
|
+
var splice = arr.splice;
|
21799
|
+
|
21800
|
+
|
21801
|
+
var whitespace = "[\\x20\\t\\r\\n\\f]";
|
21802
|
+
|
21803
|
+
|
21804
|
+
var rtrimCSS = new RegExp(
|
21805
|
+
"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
|
21806
|
+
"g"
|
21807
|
+
);
|
21808
|
+
|
21809
|
+
|
21810
|
+
|
21811
|
+
|
21812
|
+
// Note: an element does not contain itself
|
21813
|
+
jQuery.contains = function( a, b ) {
|
21814
|
+
var bup = b && b.parentNode;
|
21815
|
+
|
21816
|
+
return a === bup || !!( bup && bup.nodeType === 1 && (
|
21817
|
+
|
21818
|
+
// Support: IE 9 - 11+
|
21819
|
+
// IE doesn't have `contains` on SVG.
|
21820
|
+
a.contains ?
|
21821
|
+
a.contains( bup ) :
|
21822
|
+
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
21823
|
+
) );
|
21824
|
+
};
|
21825
|
+
|
21826
|
+
|
21827
|
+
|
21828
|
+
|
21829
|
+
// CSS string/identifier serialization
|
21830
|
+
// https://drafts.csswg.org/cssom/#common-serializing-idioms
|
21831
|
+
var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
|
21832
|
+
|
21833
|
+
function fcssescape( ch, asCodePoint ) {
|
21834
|
+
if ( asCodePoint ) {
|
21835
|
+
|
21836
|
+
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
|
21837
|
+
if ( ch === "\0" ) {
|
21838
|
+
return "\uFFFD";
|
21839
|
+
}
|
21840
|
+
|
21841
|
+
// Control characters and (dependent upon position) numbers get escaped as code points
|
21842
|
+
return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
21843
|
+
}
|
21844
|
+
|
21845
|
+
// Other potentially-special ASCII characters get backslash-escaped
|
21846
|
+
return "\\" + ch;
|
21847
|
+
}
|
21848
|
+
|
21849
|
+
jQuery.escapeSelector = function( sel ) {
|
21850
|
+
return ( sel + "" ).replace( rcssescape, fcssescape );
|
21851
|
+
};
|
21852
|
+
|
21853
|
+
|
21854
|
+
|
21855
|
+
|
21856
|
+
var preferredDoc = document,
|
21857
|
+
pushNative = push;
|
21858
|
+
|
21859
|
+
( function() {
|
21860
|
+
|
21758
21861
|
var i,
|
21759
|
-
support,
|
21760
21862
|
Expr,
|
21761
|
-
getText,
|
21762
|
-
isXML,
|
21763
|
-
tokenize,
|
21764
|
-
compile,
|
21765
|
-
select,
|
21766
21863
|
outermostContext,
|
21767
21864
|
sortInput,
|
21768
21865
|
hasDuplicate,
|
21866
|
+
push = pushNative,
|
21769
21867
|
|
21770
21868
|
// Local document vars
|
21771
|
-
setDocument,
|
21772
21869
|
document,
|
21773
|
-
|
21870
|
+
documentElement,
|
21774
21871
|
documentIsHTML,
|
21775
21872
|
rbuggyQSA,
|
21776
|
-
rbuggyMatches,
|
21777
21873
|
matches,
|
21778
|
-
contains,
|
21779
21874
|
|
21780
21875
|
// Instance-specific data
|
21781
|
-
expando =
|
21782
|
-
preferredDoc = window.document,
|
21876
|
+
expando = jQuery.expando,
|
21783
21877
|
dirruns = 0,
|
21784
21878
|
done = 0,
|
21785
21879
|
classCache = createCache(),
|
@@ -21793,47 +21887,22 @@ var i,
|
|
21793
21887
|
return 0;
|
21794
21888
|
},
|
21795
21889
|
|
21796
|
-
|
21797
|
-
|
21798
|
-
arr = [],
|
21799
|
-
pop = arr.pop,
|
21800
|
-
pushNative = arr.push,
|
21801
|
-
push = arr.push,
|
21802
|
-
slice = arr.slice,
|
21803
|
-
|
21804
|
-
// Use a stripped-down indexOf as it's faster than native
|
21805
|
-
// https://jsperf.com/thor-indexof-vs-for/5
|
21806
|
-
indexOf = function( list, elem ) {
|
21807
|
-
var i = 0,
|
21808
|
-
len = list.length;
|
21809
|
-
for ( ; i < len; i++ ) {
|
21810
|
-
if ( list[ i ] === elem ) {
|
21811
|
-
return i;
|
21812
|
-
}
|
21813
|
-
}
|
21814
|
-
return -1;
|
21815
|
-
},
|
21816
|
-
|
21817
|
-
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" +
|
21818
|
-
"ismap|loop|multiple|open|readonly|required|scoped",
|
21890
|
+
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|" +
|
21891
|
+
"loop|multiple|open|readonly|required|scoped",
|
21819
21892
|
|
21820
21893
|
// Regular expressions
|
21821
21894
|
|
21822
|
-
// http://www.w3.org/TR/css3-selectors/#whitespace
|
21823
|
-
whitespace = "[\\x20\\t\\r\\n\\f]",
|
21824
|
-
|
21825
21895
|
// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
|
21826
21896
|
identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
|
21827
21897
|
"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
|
21828
21898
|
|
21829
|
-
// Attribute selectors:
|
21899
|
+
// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors
|
21830
21900
|
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
|
21831
21901
|
|
21832
21902
|
// Operator (capture 2)
|
21833
21903
|
"*([*^$|!~]?=)" + whitespace +
|
21834
21904
|
|
21835
|
-
// "Attribute values must be CSS identifiers [capture 5]
|
21836
|
-
// or strings [capture 3 or capture 4]"
|
21905
|
+
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
|
21837
21906
|
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
|
21838
21907
|
whitespace + "*\\]",
|
21839
21908
|
|
@@ -21852,101 +21921,88 @@ var i,
|
|
21852
21921
|
|
21853
21922
|
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
|
21854
21923
|
rwhitespace = new RegExp( whitespace + "+", "g" ),
|
21855
|
-
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +
|
21856
|
-
whitespace + "+$", "g" ),
|
21857
21924
|
|
21858
21925
|
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
21859
|
-
|
21860
|
-
"*" ),
|
21926
|
+
rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" +
|
21927
|
+
whitespace + "*" ),
|
21861
21928
|
rdescend = new RegExp( whitespace + "|>" ),
|
21862
21929
|
|
21863
21930
|
rpseudo = new RegExp( pseudos ),
|
21864
21931
|
ridentifier = new RegExp( "^" + identifier + "$" ),
|
21865
21932
|
|
21866
21933
|
matchExpr = {
|
21867
|
-
|
21868
|
-
|
21869
|
-
|
21870
|
-
|
21871
|
-
|
21872
|
-
|
21873
|
-
|
21874
|
-
|
21875
|
-
|
21934
|
+
ID: new RegExp( "^#(" + identifier + ")" ),
|
21935
|
+
CLASS: new RegExp( "^\\.(" + identifier + ")" ),
|
21936
|
+
TAG: new RegExp( "^(" + identifier + "|[*])" ),
|
21937
|
+
ATTR: new RegExp( "^" + attributes ),
|
21938
|
+
PSEUDO: new RegExp( "^" + pseudos ),
|
21939
|
+
CHILD: new RegExp(
|
21940
|
+
"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
|
21941
|
+
whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
|
21942
|
+
whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
21943
|
+
bool: new RegExp( "^(?:" + booleans + ")$", "i" ),
|
21876
21944
|
|
21877
21945
|
// For use in libraries implementing .is()
|
21878
21946
|
// We use this for POS matching in `select`
|
21879
|
-
|
21947
|
+
needsContext: new RegExp( "^" + whitespace +
|
21880
21948
|
"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
|
21881
21949
|
"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
|
21882
21950
|
},
|
21883
21951
|
|
21884
|
-
rhtml = /HTML$/i,
|
21885
21952
|
rinputs = /^(?:input|select|textarea|button)$/i,
|
21886
21953
|
rheader = /^h\d$/i,
|
21887
21954
|
|
21888
|
-
rnative = /^[^{]+\{\s*\[native \w/,
|
21889
|
-
|
21890
21955
|
// Easily-parseable/retrievable ID or TAG or CLASS selectors
|
21891
21956
|
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
|
21892
21957
|
|
21893
21958
|
rsibling = /[+~]/,
|
21894
21959
|
|
21895
21960
|
// CSS escapes
|
21896
|
-
//
|
21897
|
-
runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
|
21961
|
+
// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters
|
21962
|
+
runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
|
21963
|
+
"?|\\\\([^\\r\\n\\f])", "g" ),
|
21898
21964
|
funescape = function( escape, nonHex ) {
|
21899
21965
|
var high = "0x" + escape.slice( 1 ) - 0x10000;
|
21900
21966
|
|
21901
|
-
|
21967
|
+
if ( nonHex ) {
|
21902
21968
|
|
21903
21969
|
// Strip the backslash prefix from a non-hex escape sequence
|
21904
|
-
nonHex
|
21905
|
-
|
21906
|
-
// Replace a hexadecimal escape sequence with the encoded Unicode code point
|
21907
|
-
// Support: IE <=11+
|
21908
|
-
// For values outside the Basic Multilingual Plane (BMP), manually construct a
|
21909
|
-
// surrogate pair
|
21910
|
-
high < 0 ?
|
21911
|
-
String.fromCharCode( high + 0x10000 ) :
|
21912
|
-
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
21913
|
-
},
|
21914
|
-
|
21915
|
-
// CSS string/identifier serialization
|
21916
|
-
// https://drafts.csswg.org/cssom/#common-serializing-idioms
|
21917
|
-
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
|
21918
|
-
fcssescape = function( ch, asCodePoint ) {
|
21919
|
-
if ( asCodePoint ) {
|
21920
|
-
|
21921
|
-
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
|
21922
|
-
if ( ch === "\0" ) {
|
21923
|
-
return "\uFFFD";
|
21924
|
-
}
|
21925
|
-
|
21926
|
-
// Control characters and (dependent upon position) numbers get escaped as code points
|
21927
|
-
return ch.slice( 0, -1 ) + "\\" +
|
21928
|
-
ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
21970
|
+
return nonHex;
|
21929
21971
|
}
|
21930
21972
|
|
21931
|
-
//
|
21932
|
-
|
21973
|
+
// Replace a hexadecimal escape sequence with the encoded Unicode code point
|
21974
|
+
// Support: IE <=11+
|
21975
|
+
// For values outside the Basic Multilingual Plane (BMP), manually construct a
|
21976
|
+
// surrogate pair
|
21977
|
+
return high < 0 ?
|
21978
|
+
String.fromCharCode( high + 0x10000 ) :
|
21979
|
+
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
21933
21980
|
},
|
21934
21981
|
|
21935
|
-
// Used for iframes
|
21936
|
-
//
|
21982
|
+
// Used for iframes; see `setDocument`.
|
21983
|
+
// Support: IE 9 - 11+, Edge 12 - 18+
|
21937
21984
|
// Removing the function wrapper causes a "Permission Denied"
|
21938
|
-
// error in IE
|
21985
|
+
// error in IE/Edge.
|
21939
21986
|
unloadHandler = function() {
|
21940
21987
|
setDocument();
|
21941
21988
|
},
|
21942
21989
|
|
21943
21990
|
inDisabledFieldset = addCombinator(
|
21944
21991
|
function( elem ) {
|
21945
|
-
return elem.disabled === true &&
|
21992
|
+
return elem.disabled === true && nodeName( elem, "fieldset" );
|
21946
21993
|
},
|
21947
21994
|
{ dir: "parentNode", next: "legend" }
|
21948
21995
|
);
|
21949
21996
|
|
21997
|
+
// Support: IE <=9 only
|
21998
|
+
// Accessing document.activeElement can throw unexpectedly
|
21999
|
+
// https://bugs.jquery.com/ticket/13393
|
22000
|
+
function safeActiveElement() {
|
22001
|
+
try {
|
22002
|
+
return document.activeElement;
|
22003
|
+
} catch ( err ) { }
|
22004
|
+
}
|
22005
|
+
|
21950
22006
|
// Optimize for push.apply( _, NodeList )
|
21951
22007
|
try {
|
21952
22008
|
push.apply(
|
@@ -21954,32 +22010,22 @@ try {
|
|
21954
22010
|
preferredDoc.childNodes
|
21955
22011
|
);
|
21956
22012
|
|
21957
|
-
// Support: Android
|
22013
|
+
// Support: Android <=4.0
|
21958
22014
|
// Detect silently failing push.apply
|
21959
22015
|
// eslint-disable-next-line no-unused-expressions
|
21960
22016
|
arr[ preferredDoc.childNodes.length ].nodeType;
|
21961
22017
|
} catch ( e ) {
|
21962
|
-
push = {
|
21963
|
-
|
21964
|
-
// Leverage slice if possible
|
21965
|
-
function( target, els ) {
|
22018
|
+
push = {
|
22019
|
+
apply: function( target, els ) {
|
21966
22020
|
pushNative.apply( target, slice.call( els ) );
|
21967
|
-
}
|
21968
|
-
|
21969
|
-
|
21970
|
-
// Otherwise append directly
|
21971
|
-
function( target, els ) {
|
21972
|
-
var j = target.length,
|
21973
|
-
i = 0;
|
21974
|
-
|
21975
|
-
// Can't trust NodeList.length
|
21976
|
-
while ( ( target[ j++ ] = els[ i++ ] ) ) {}
|
21977
|
-
target.length = j - 1;
|
22021
|
+
},
|
22022
|
+
call: function( target ) {
|
22023
|
+
pushNative.apply( target, slice.call( arguments, 1 ) );
|
21978
22024
|
}
|
21979
22025
|
};
|
21980
22026
|
}
|
21981
22027
|
|
21982
|
-
function
|
22028
|
+
function find( selector, context, results, seed ) {
|
21983
22029
|
var m, i, elem, nid, match, groups, newSelector,
|
21984
22030
|
newContext = context && context.ownerDocument,
|
21985
22031
|
|
@@ -22013,11 +22059,10 @@ function Sizzle( selector, context, results, seed ) {
|
|
22013
22059
|
if ( nodeType === 9 ) {
|
22014
22060
|
if ( ( elem = context.getElementById( m ) ) ) {
|
22015
22061
|
|
22016
|
-
// Support: IE
|
22017
|
-
// TODO: identify versions
|
22062
|
+
// Support: IE 9 only
|
22018
22063
|
// getElementById can match elements by name instead of ID
|
22019
22064
|
if ( elem.id === m ) {
|
22020
|
-
|
22065
|
+
push.call( results, elem );
|
22021
22066
|
return results;
|
22022
22067
|
}
|
22023
22068
|
} else {
|
@@ -22027,14 +22072,13 @@ function Sizzle( selector, context, results, seed ) {
|
|
22027
22072
|
// Element context
|
22028
22073
|
} else {
|
22029
22074
|
|
22030
|
-
// Support: IE
|
22031
|
-
// TODO: identify versions
|
22075
|
+
// Support: IE 9 only
|
22032
22076
|
// getElementById can match elements by name instead of ID
|
22033
22077
|
if ( newContext && ( elem = newContext.getElementById( m ) ) &&
|
22034
|
-
contains( context, elem ) &&
|
22078
|
+
find.contains( context, elem ) &&
|
22035
22079
|
elem.id === m ) {
|
22036
22080
|
|
22037
|
-
|
22081
|
+
push.call( results, elem );
|
22038
22082
|
return results;
|
22039
22083
|
}
|
22040
22084
|
}
|
@@ -22045,22 +22089,15 @@ function Sizzle( selector, context, results, seed ) {
|
|
22045
22089
|
return results;
|
22046
22090
|
|
22047
22091
|
// Class selector
|
22048
|
-
} else if ( ( m = match[ 3 ] ) &&
|
22049
|
-
context.getElementsByClassName ) {
|
22050
|
-
|
22092
|
+
} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {
|
22051
22093
|
push.apply( results, context.getElementsByClassName( m ) );
|
22052
22094
|
return results;
|
22053
22095
|
}
|
22054
22096
|
}
|
22055
22097
|
|
22056
22098
|
// Take advantage of querySelectorAll
|
22057
|
-
if (
|
22058
|
-
!
|
22059
|
-
( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&
|
22060
|
-
|
22061
|
-
// Support: IE 8 only
|
22062
|
-
// Exclude object elements
|
22063
|
-
( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) {
|
22099
|
+
if ( !nonnativeSelectorCache[ selector + " " ] &&
|
22100
|
+
( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {
|
22064
22101
|
|
22065
22102
|
newSelector = selector;
|
22066
22103
|
newContext = context;
|
@@ -22073,7 +22110,7 @@ function Sizzle( selector, context, results, seed ) {
|
|
22073
22110
|
// as such selectors are not recognized by querySelectorAll.
|
22074
22111
|
// Thanks to Andrew Dupont for this technique.
|
22075
22112
|
if ( nodeType === 1 &&
|
22076
|
-
( rdescend.test( selector ) ||
|
22113
|
+
( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {
|
22077
22114
|
|
22078
22115
|
// Expand context for sibling selectors
|
22079
22116
|
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
@@ -22081,11 +22118,15 @@ function Sizzle( selector, context, results, seed ) {
|
|
22081
22118
|
|
22082
22119
|
// We can use :scope instead of the ID hack if the browser
|
22083
22120
|
// supports it & if we're not changing the context.
|
22084
|
-
|
22121
|
+
// Support: IE 11+, Edge 17 - 18+
|
22122
|
+
// IE/Edge sometimes throw a "Permission denied" error when
|
22123
|
+
// strict-comparing two documents; shallow comparisons work.
|
22124
|
+
// eslint-disable-next-line eqeqeq
|
22125
|
+
if ( newContext != context || !support.scope ) {
|
22085
22126
|
|
22086
22127
|
// Capture the context ID, setting it first if necessary
|
22087
22128
|
if ( ( nid = context.getAttribute( "id" ) ) ) {
|
22088
|
-
nid =
|
22129
|
+
nid = jQuery.escapeSelector( nid );
|
22089
22130
|
} else {
|
22090
22131
|
context.setAttribute( "id", ( nid = expando ) );
|
22091
22132
|
}
|
@@ -22118,7 +22159,7 @@ function Sizzle( selector, context, results, seed ) {
|
|
22118
22159
|
}
|
22119
22160
|
|
22120
22161
|
// All others
|
22121
|
-
return select( selector.replace(
|
22162
|
+
return select( selector.replace( rtrimCSS, "$1" ), context, results, seed );
|
22122
22163
|
}
|
22123
22164
|
|
22124
22165
|
/**
|
@@ -22132,7 +22173,8 @@ function createCache() {
|
|
22132
22173
|
|
22133
22174
|
function cache( key, value ) {
|
22134
22175
|
|
22135
|
-
// Use (key + " ") to avoid collision with native prototype properties
|
22176
|
+
// Use (key + " ") to avoid collision with native prototype properties
|
22177
|
+
// (see https://github.com/jquery/sizzle/issues/157)
|
22136
22178
|
if ( keys.push( key + " " ) > Expr.cacheLength ) {
|
22137
22179
|
|
22138
22180
|
// Only keep the most recent entries
|
@@ -22144,7 +22186,7 @@ function createCache() {
|
|
22144
22186
|
}
|
22145
22187
|
|
22146
22188
|
/**
|
22147
|
-
* Mark a function for special use by
|
22189
|
+
* Mark a function for special use by jQuery selector module
|
22148
22190
|
* @param {Function} fn The function to mark
|
22149
22191
|
*/
|
22150
22192
|
function markFunction( fn ) {
|
@@ -22175,56 +22217,13 @@ function assert( fn ) {
|
|
22175
22217
|
}
|
22176
22218
|
}
|
22177
22219
|
|
22178
|
-
/**
|
22179
|
-
* Adds the same handler for all of the specified attrs
|
22180
|
-
* @param {String} attrs Pipe-separated list of attributes
|
22181
|
-
* @param {Function} handler The method that will be applied
|
22182
|
-
*/
|
22183
|
-
function addHandle( attrs, handler ) {
|
22184
|
-
var arr = attrs.split( "|" ),
|
22185
|
-
i = arr.length;
|
22186
|
-
|
22187
|
-
while ( i-- ) {
|
22188
|
-
Expr.attrHandle[ arr[ i ] ] = handler;
|
22189
|
-
}
|
22190
|
-
}
|
22191
|
-
|
22192
|
-
/**
|
22193
|
-
* Checks document order of two siblings
|
22194
|
-
* @param {Element} a
|
22195
|
-
* @param {Element} b
|
22196
|
-
* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
|
22197
|
-
*/
|
22198
|
-
function siblingCheck( a, b ) {
|
22199
|
-
var cur = b && a,
|
22200
|
-
diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
|
22201
|
-
a.sourceIndex - b.sourceIndex;
|
22202
|
-
|
22203
|
-
// Use IE sourceIndex if available on both nodes
|
22204
|
-
if ( diff ) {
|
22205
|
-
return diff;
|
22206
|
-
}
|
22207
|
-
|
22208
|
-
// Check if b follows a
|
22209
|
-
if ( cur ) {
|
22210
|
-
while ( ( cur = cur.nextSibling ) ) {
|
22211
|
-
if ( cur === b ) {
|
22212
|
-
return -1;
|
22213
|
-
}
|
22214
|
-
}
|
22215
|
-
}
|
22216
|
-
|
22217
|
-
return a ? 1 : -1;
|
22218
|
-
}
|
22219
|
-
|
22220
22220
|
/**
|
22221
22221
|
* Returns a function to use in pseudos for input types
|
22222
22222
|
* @param {String} type
|
22223
22223
|
*/
|
22224
22224
|
function createInputPseudo( type ) {
|
22225
22225
|
return function( elem ) {
|
22226
|
-
|
22227
|
-
return name === "input" && elem.type === type;
|
22226
|
+
return nodeName( elem, "input" ) && elem.type === type;
|
22228
22227
|
};
|
22229
22228
|
}
|
22230
22229
|
|
@@ -22234,8 +22233,8 @@ function createInputPseudo( type ) {
|
|
22234
22233
|
*/
|
22235
22234
|
function createButtonPseudo( type ) {
|
22236
22235
|
return function( elem ) {
|
22237
|
-
|
22238
|
-
|
22236
|
+
return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) &&
|
22237
|
+
elem.type === type;
|
22239
22238
|
};
|
22240
22239
|
}
|
22241
22240
|
|
@@ -22271,14 +22270,13 @@ function createDisabledPseudo( disabled ) {
|
|
22271
22270
|
}
|
22272
22271
|
}
|
22273
22272
|
|
22274
|
-
// Support: IE 6 - 11
|
22273
|
+
// Support: IE 6 - 11+
|
22275
22274
|
// Use the isDisabled shortcut property to check for disabled fieldset ancestors
|
22276
22275
|
return elem.isDisabled === disabled ||
|
22277
22276
|
|
22278
22277
|
// Where there is no isDisabled, check manually
|
22279
|
-
/* jshint -W018 */
|
22280
22278
|
elem.isDisabled !== !disabled &&
|
22281
|
-
|
22279
|
+
inDisabledFieldset( elem ) === disabled;
|
22282
22280
|
}
|
22283
22281
|
|
22284
22282
|
return elem.disabled === disabled;
|
@@ -22318,7 +22316,7 @@ function createPositionalPseudo( fn ) {
|
|
22318
22316
|
}
|
22319
22317
|
|
22320
22318
|
/**
|
22321
|
-
* Checks a node for validity as a
|
22319
|
+
* Checks a node for validity as a jQuery selector context
|
22322
22320
|
* @param {Element|Object=} context
|
22323
22321
|
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
|
22324
22322
|
*/
|
@@ -22326,31 +22324,13 @@ function testContext( context ) {
|
|
22326
22324
|
return context && typeof context.getElementsByTagName !== "undefined" && context;
|
22327
22325
|
}
|
22328
22326
|
|
22329
|
-
// Expose support vars for convenience
|
22330
|
-
support = Sizzle.support = {};
|
22331
|
-
|
22332
|
-
/**
|
22333
|
-
* Detects XML nodes
|
22334
|
-
* @param {Element|Object} elem An element or a document
|
22335
|
-
* @returns {Boolean} True iff elem is a non-HTML XML node
|
22336
|
-
*/
|
22337
|
-
isXML = Sizzle.isXML = function( elem ) {
|
22338
|
-
var namespace = elem && elem.namespaceURI,
|
22339
|
-
docElem = elem && ( elem.ownerDocument || elem ).documentElement;
|
22340
|
-
|
22341
|
-
// Support: IE <=8
|
22342
|
-
// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
|
22343
|
-
// https://bugs.jquery.com/ticket/4833
|
22344
|
-
return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );
|
22345
|
-
};
|
22346
|
-
|
22347
22327
|
/**
|
22348
22328
|
* Sets document-related variables once based on the current document
|
22349
|
-
* @param {Element|Object} [
|
22329
|
+
* @param {Element|Object} [node] An element or document object to use to set the document
|
22350
22330
|
* @returns {Object} Returns the current document
|
22351
22331
|
*/
|
22352
|
-
|
22353
|
-
var
|
22332
|
+
function setDocument( node ) {
|
22333
|
+
var subWindow,
|
22354
22334
|
doc = node ? node.ownerDocument || node : preferredDoc;
|
22355
22335
|
|
22356
22336
|
// Return early if doc is invalid or already selected
|
@@ -22364,87 +22344,90 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
22364
22344
|
|
22365
22345
|
// Update global variables
|
22366
22346
|
document = doc;
|
22367
|
-
|
22368
|
-
documentIsHTML = !
|
22347
|
+
documentElement = document.documentElement;
|
22348
|
+
documentIsHTML = !jQuery.isXMLDoc( document );
|
22349
|
+
|
22350
|
+
// Support: iOS 7 only, IE 9 - 11+
|
22351
|
+
// Older browsers didn't support unprefixed `matches`.
|
22352
|
+
matches = documentElement.matches ||
|
22353
|
+
documentElement.webkitMatchesSelector ||
|
22354
|
+
documentElement.msMatchesSelector;
|
22369
22355
|
|
22370
22356
|
// Support: IE 9 - 11+, Edge 12 - 18+
|
22371
|
-
// Accessing iframe documents after unload throws "permission denied" errors
|
22372
|
-
//
|
22373
|
-
// IE
|
22374
|
-
//
|
22375
|
-
|
22376
|
-
if ( preferredDoc != document &&
|
22377
|
-
( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
|
22357
|
+
// Accessing iframe documents after unload throws "permission denied" errors
|
22358
|
+
// (see trac-13936).
|
22359
|
+
// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,
|
22360
|
+
// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.
|
22361
|
+
if ( documentElement.msMatchesSelector &&
|
22378
22362
|
|
22379
|
-
// Support: IE 11
|
22380
|
-
|
22381
|
-
|
22363
|
+
// Support: IE 11+, Edge 17 - 18+
|
22364
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
22365
|
+
// two documents; shallow comparisons work.
|
22366
|
+
// eslint-disable-next-line eqeqeq
|
22367
|
+
preferredDoc != document &&
|
22368
|
+
( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
|
22382
22369
|
|
22383
|
-
// Support: IE 9 -
|
22384
|
-
|
22385
|
-
subWindow.attachEvent( "onunload", unloadHandler );
|
22386
|
-
}
|
22370
|
+
// Support: IE 9 - 11+, Edge 12 - 18+
|
22371
|
+
subWindow.addEventListener( "unload", unloadHandler );
|
22387
22372
|
}
|
22388
22373
|
|
22389
|
-
// Support: IE
|
22390
|
-
//
|
22391
|
-
//
|
22392
|
-
//
|
22393
|
-
|
22394
|
-
|
22395
|
-
|
22396
|
-
|
22397
|
-
!el.querySelectorAll( ":scope fieldset div" ).length;
|
22374
|
+
// Support: IE <10
|
22375
|
+
// Check if getElementById returns elements by name
|
22376
|
+
// The broken getElementById methods don't pick up programmatically-set names,
|
22377
|
+
// so use a roundabout getElementsByName test
|
22378
|
+
support.getById = assert( function( el ) {
|
22379
|
+
documentElement.appendChild( el ).id = jQuery.expando;
|
22380
|
+
return !document.getElementsByName ||
|
22381
|
+
!document.getElementsByName( jQuery.expando ).length;
|
22398
22382
|
} );
|
22399
22383
|
|
22400
|
-
|
22401
|
-
|
22402
|
-
|
22403
|
-
|
22404
|
-
|
22405
|
-
// (excepting IE8 booleans)
|
22406
|
-
support.attributes = assert( function( el ) {
|
22407
|
-
el.className = "i";
|
22408
|
-
return !el.getAttribute( "className" );
|
22384
|
+
// Support: IE 9 only
|
22385
|
+
// Check to see if it's possible to do matchesSelector
|
22386
|
+
// on a disconnected node.
|
22387
|
+
support.disconnectedMatch = assert( function( el ) {
|
22388
|
+
return matches.call( el, "*" );
|
22409
22389
|
} );
|
22410
22390
|
|
22411
|
-
|
22412
|
-
|
22413
|
-
|
22414
|
-
|
22415
|
-
support.getElementsByTagName = assert( function( el ) {
|
22416
|
-
el.appendChild( document.createComment( "" ) );
|
22417
|
-
return !el.getElementsByTagName( "*" ).length;
|
22391
|
+
// Support: IE 9 - 11+, Edge 12 - 18+
|
22392
|
+
// IE/Edge don't support the :scope pseudo-class.
|
22393
|
+
support.scope = assert( function() {
|
22394
|
+
return document.querySelectorAll( ":scope" );
|
22418
22395
|
} );
|
22419
22396
|
|
22420
|
-
// Support:
|
22421
|
-
|
22422
|
-
|
22423
|
-
//
|
22424
|
-
//
|
22425
|
-
//
|
22426
|
-
//
|
22427
|
-
|
22428
|
-
|
22429
|
-
|
22397
|
+
// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only
|
22398
|
+
// Make sure the `:has()` argument is parsed unforgivingly.
|
22399
|
+
// We include `*` in the test to detect buggy implementations that are
|
22400
|
+
// _selectively_ forgiving (specifically when the list includes at least
|
22401
|
+
// one valid selector).
|
22402
|
+
// Note that we treat complete lack of support for `:has()` as if it were
|
22403
|
+
// spec-compliant support, which is fine because use of `:has()` in such
|
22404
|
+
// environments will fail in the qSA path and fall back to jQuery traversal
|
22405
|
+
// anyway.
|
22406
|
+
support.cssHas = assert( function() {
|
22407
|
+
try {
|
22408
|
+
document.querySelector( ":has(*,:jqfake)" );
|
22409
|
+
return false;
|
22410
|
+
} catch ( e ) {
|
22411
|
+
return true;
|
22412
|
+
}
|
22430
22413
|
} );
|
22431
22414
|
|
22432
22415
|
// ID filter and find
|
22433
22416
|
if ( support.getById ) {
|
22434
|
-
Expr.filter
|
22417
|
+
Expr.filter.ID = function( id ) {
|
22435
22418
|
var attrId = id.replace( runescape, funescape );
|
22436
22419
|
return function( elem ) {
|
22437
22420
|
return elem.getAttribute( "id" ) === attrId;
|
22438
22421
|
};
|
22439
22422
|
};
|
22440
|
-
Expr.find
|
22423
|
+
Expr.find.ID = function( id, context ) {
|
22441
22424
|
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
22442
22425
|
var elem = context.getElementById( id );
|
22443
22426
|
return elem ? [ elem ] : [];
|
22444
22427
|
}
|
22445
22428
|
};
|
22446
22429
|
} else {
|
22447
|
-
Expr.filter
|
22430
|
+
Expr.filter.ID = function( id ) {
|
22448
22431
|
var attrId = id.replace( runescape, funescape );
|
22449
22432
|
return function( elem ) {
|
22450
22433
|
var node = typeof elem.getAttributeNode !== "undefined" &&
|
@@ -22455,7 +22438,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
22455
22438
|
|
22456
22439
|
// Support: IE 6 - 7 only
|
22457
22440
|
// getElementById is not reliable as a find shortcut
|
22458
|
-
Expr.find
|
22441
|
+
Expr.find.ID = function( id, context ) {
|
22459
22442
|
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
22460
22443
|
var node, i, elems,
|
22461
22444
|
elem = context.getElementById( id );
|
@@ -22485,40 +22468,18 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
22485
22468
|
}
|
22486
22469
|
|
22487
22470
|
// Tag
|
22488
|
-
Expr.find
|
22489
|
-
|
22490
|
-
|
22491
|
-
return context.getElementsByTagName( tag );
|
22492
|
-
|
22493
|
-
// DocumentFragment nodes don't have gEBTN
|
22494
|
-
} else if ( support.qsa ) {
|
22495
|
-
return context.querySelectorAll( tag );
|
22496
|
-
}
|
22497
|
-
} :
|
22498
|
-
|
22499
|
-
function( tag, context ) {
|
22500
|
-
var elem,
|
22501
|
-
tmp = [],
|
22502
|
-
i = 0,
|
22503
|
-
|
22504
|
-
// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
|
22505
|
-
results = context.getElementsByTagName( tag );
|
22471
|
+
Expr.find.TAG = function( tag, context ) {
|
22472
|
+
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
22473
|
+
return context.getElementsByTagName( tag );
|
22506
22474
|
|
22507
|
-
|
22508
|
-
|
22509
|
-
|
22510
|
-
|
22511
|
-
|
22512
|
-
}
|
22513
|
-
}
|
22514
|
-
|
22515
|
-
return tmp;
|
22516
|
-
}
|
22517
|
-
return results;
|
22518
|
-
};
|
22475
|
+
// DocumentFragment nodes don't have gEBTN
|
22476
|
+
} else {
|
22477
|
+
return context.querySelectorAll( tag );
|
22478
|
+
}
|
22479
|
+
};
|
22519
22480
|
|
22520
22481
|
// Class
|
22521
|
-
Expr.find
|
22482
|
+
Expr.find.CLASS = function( className, context ) {
|
22522
22483
|
if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
|
22523
22484
|
return context.getElementsByClassName( className );
|
22524
22485
|
}
|
@@ -22529,177 +22490,94 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
22529
22490
|
|
22530
22491
|
// QSA and matchesSelector support
|
22531
22492
|
|
22532
|
-
// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
|
22533
|
-
rbuggyMatches = [];
|
22534
|
-
|
22535
|
-
// qSa(:focus) reports false when true (Chrome 21)
|
22536
|
-
// We allow this because of a bug in IE8/9 that throws an error
|
22537
|
-
// whenever `document.activeElement` is accessed on an iframe
|
22538
|
-
// So, we allow :focus to pass through QSA all the time to avoid the IE error
|
22539
|
-
// See https://bugs.jquery.com/ticket/13378
|
22540
22493
|
rbuggyQSA = [];
|
22541
22494
|
|
22542
|
-
|
22543
|
-
|
22544
|
-
|
22545
|
-
// Regex strategy adopted from Diego Perini
|
22546
|
-
assert( function( el ) {
|
22547
|
-
|
22548
|
-
var input;
|
22549
|
-
|
22550
|
-
// Select is set to empty string on purpose
|
22551
|
-
// This is to test IE's treatment of not explicitly
|
22552
|
-
// setting a boolean content attribute,
|
22553
|
-
// since its presence should be enough
|
22554
|
-
// https://bugs.jquery.com/ticket/12359
|
22555
|
-
docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
|
22556
|
-
"<select id='" + expando + "-\r\\' msallowcapture=''>" +
|
22557
|
-
"<option selected=''></option></select>";
|
22558
|
-
|
22559
|
-
// Support: IE8, Opera 11-12.16
|
22560
|
-
// Nothing should be selected when empty strings follow ^= or $= or *=
|
22561
|
-
// The test attribute must be unknown in Opera but "safe" for WinRT
|
22562
|
-
// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
|
22563
|
-
if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) {
|
22564
|
-
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
|
22565
|
-
}
|
22566
|
-
|
22567
|
-
// Support: IE8
|
22568
|
-
// Boolean attributes and "value" are not treated correctly
|
22569
|
-
if ( !el.querySelectorAll( "[selected]" ).length ) {
|
22570
|
-
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
22571
|
-
}
|
22572
|
-
|
22573
|
-
// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
|
22574
|
-
if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
22575
|
-
rbuggyQSA.push( "~=" );
|
22576
|
-
}
|
22577
|
-
|
22578
|
-
// Support: IE 11+, Edge 15 - 18+
|
22579
|
-
// IE 11/Edge don't find elements on a `[name='']` query in some cases.
|
22580
|
-
// Adding a temporary attribute to the document before the selection works
|
22581
|
-
// around the issue.
|
22582
|
-
// Interestingly, IE 10 & older don't seem to have the issue.
|
22583
|
-
input = document.createElement( "input" );
|
22584
|
-
input.setAttribute( "name", "" );
|
22585
|
-
el.appendChild( input );
|
22586
|
-
if ( !el.querySelectorAll( "[name='']" ).length ) {
|
22587
|
-
rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
|
22588
|
-
whitespace + "*(?:''|\"\")" );
|
22589
|
-
}
|
22590
|
-
|
22591
|
-
// Webkit/Opera - :checked should return selected option elements
|
22592
|
-
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
22593
|
-
// IE8 throws error here and will not see later tests
|
22594
|
-
if ( !el.querySelectorAll( ":checked" ).length ) {
|
22595
|
-
rbuggyQSA.push( ":checked" );
|
22596
|
-
}
|
22597
|
-
|
22598
|
-
// Support: Safari 8+, iOS 8+
|
22599
|
-
// https://bugs.webkit.org/show_bug.cgi?id=136851
|
22600
|
-
// In-page `selector#id sibling-combinator selector` fails
|
22601
|
-
if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
|
22602
|
-
rbuggyQSA.push( ".#.+[+~]" );
|
22603
|
-
}
|
22604
|
-
|
22605
|
-
// Support: Firefox <=3.6 - 5 only
|
22606
|
-
// Old Firefox doesn't throw on a badly-escaped identifier.
|
22607
|
-
el.querySelectorAll( "\\\f" );
|
22608
|
-
rbuggyQSA.push( "[\\r\\n\\f]" );
|
22609
|
-
} );
|
22610
|
-
|
22611
|
-
assert( function( el ) {
|
22612
|
-
el.innerHTML = "<a href='' disabled='disabled'></a>" +
|
22613
|
-
"<select disabled='disabled'><option/></select>";
|
22495
|
+
// Build QSA regex
|
22496
|
+
// Regex strategy adopted from Diego Perini
|
22497
|
+
assert( function( el ) {
|
22614
22498
|
|
22615
|
-
|
22616
|
-
// The type and name attributes are restricted during .innerHTML assignment
|
22617
|
-
var input = document.createElement( "input" );
|
22618
|
-
input.setAttribute( "type", "hidden" );
|
22619
|
-
el.appendChild( input ).setAttribute( "name", "D" );
|
22499
|
+
var input;
|
22620
22500
|
|
22621
|
-
|
22622
|
-
|
22623
|
-
|
22624
|
-
|
22625
|
-
}
|
22501
|
+
documentElement.appendChild( el ).innerHTML =
|
22502
|
+
"<a id='" + expando + "' href='' disabled='disabled'></a>" +
|
22503
|
+
"<select id='" + expando + "-\r\\' disabled='disabled'>" +
|
22504
|
+
"<option selected=''></option></select>";
|
22626
22505
|
|
22627
|
-
|
22628
|
-
|
22629
|
-
|
22630
|
-
|
22631
|
-
|
22506
|
+
// Support: iOS <=7 - 8 only
|
22507
|
+
// Boolean attributes and "value" are not treated correctly in some XML documents
|
22508
|
+
if ( !el.querySelectorAll( "[selected]" ).length ) {
|
22509
|
+
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
22510
|
+
}
|
22632
22511
|
|
22633
|
-
|
22634
|
-
|
22635
|
-
|
22636
|
-
|
22637
|
-
rbuggyQSA.push( ":enabled", ":disabled" );
|
22638
|
-
}
|
22512
|
+
// Support: iOS <=7 - 8 only
|
22513
|
+
if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
22514
|
+
rbuggyQSA.push( "~=" );
|
22515
|
+
}
|
22639
22516
|
|
22640
|
-
|
22641
|
-
|
22642
|
-
|
22643
|
-
|
22644
|
-
|
22645
|
-
|
22517
|
+
// Support: iOS 8 only
|
22518
|
+
// https://bugs.webkit.org/show_bug.cgi?id=136851
|
22519
|
+
// In-page `selector#id sibling-combinator selector` fails
|
22520
|
+
if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
|
22521
|
+
rbuggyQSA.push( ".#.+[+~]" );
|
22522
|
+
}
|
22646
22523
|
|
22647
|
-
|
22648
|
-
|
22649
|
-
|
22650
|
-
|
22651
|
-
|
22524
|
+
// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
|
22525
|
+
// In some of the document kinds, these selectors wouldn't work natively.
|
22526
|
+
// This is probably OK but for backwards compatibility we want to maintain
|
22527
|
+
// handling them through jQuery traversal in jQuery 3.x.
|
22528
|
+
if ( !el.querySelectorAll( ":checked" ).length ) {
|
22529
|
+
rbuggyQSA.push( ":checked" );
|
22530
|
+
}
|
22652
22531
|
|
22653
|
-
|
22532
|
+
// Support: Windows 8 Native Apps
|
22533
|
+
// The type and name attributes are restricted during .innerHTML assignment
|
22534
|
+
input = document.createElement( "input" );
|
22535
|
+
input.setAttribute( "type", "hidden" );
|
22536
|
+
el.appendChild( input ).setAttribute( "name", "D" );
|
22537
|
+
|
22538
|
+
// Support: IE 9 - 11+
|
22539
|
+
// IE's :disabled selector does not pick up the children of disabled fieldsets
|
22540
|
+
// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
|
22541
|
+
// In some of the document kinds, these selectors wouldn't work natively.
|
22542
|
+
// This is probably OK but for backwards compatibility we want to maintain
|
22543
|
+
// handling them through jQuery traversal in jQuery 3.x.
|
22544
|
+
documentElement.appendChild( el ).disabled = true;
|
22545
|
+
if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
|
22546
|
+
rbuggyQSA.push( ":enabled", ":disabled" );
|
22547
|
+
}
|
22548
|
+
|
22549
|
+
// Support: IE 11+, Edge 15 - 18+
|
22550
|
+
// IE 11/Edge don't find elements on a `[name='']` query in some cases.
|
22551
|
+
// Adding a temporary attribute to the document before the selection works
|
22552
|
+
// around the issue.
|
22553
|
+
// Interestingly, IE 10 & older don't seem to have the issue.
|
22554
|
+
input = document.createElement( "input" );
|
22555
|
+
input.setAttribute( "name", "" );
|
22556
|
+
el.appendChild( input );
|
22557
|
+
if ( !el.querySelectorAll( "[name='']" ).length ) {
|
22558
|
+
rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
|
22559
|
+
whitespace + "*(?:''|\"\")" );
|
22560
|
+
}
|
22561
|
+
} );
|
22654
22562
|
|
22655
|
-
|
22656
|
-
// on a disconnected node (IE 9)
|
22657
|
-
support.disconnectedMatch = matches.call( el, "*" );
|
22563
|
+
if ( !support.cssHas ) {
|
22658
22564
|
|
22659
|
-
|
22660
|
-
|
22661
|
-
|
22662
|
-
|
22663
|
-
|
22565
|
+
// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+
|
22566
|
+
// Our regular `try-catch` mechanism fails to detect natively-unsupported
|
22567
|
+
// pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`)
|
22568
|
+
// in browsers that parse the `:has()` argument as a forgiving selector list.
|
22569
|
+
// https://drafts.csswg.org/selectors/#relational now requires the argument
|
22570
|
+
// to be parsed unforgivingly, but browsers have not yet fully adjusted.
|
22571
|
+
rbuggyQSA.push( ":has" );
|
22664
22572
|
}
|
22665
22573
|
|
22666
22574
|
rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
|
22667
|
-
rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) );
|
22668
|
-
|
22669
|
-
/* Contains
|
22670
|
-
---------------------------------------------------------------------- */
|
22671
|
-
hasCompare = rnative.test( docElem.compareDocumentPosition );
|
22672
|
-
|
22673
|
-
// Element contains another
|
22674
|
-
// Purposefully self-exclusive
|
22675
|
-
// As in, an element does not contain itself
|
22676
|
-
contains = hasCompare || rnative.test( docElem.contains ) ?
|
22677
|
-
function( a, b ) {
|
22678
|
-
var adown = a.nodeType === 9 ? a.documentElement : a,
|
22679
|
-
bup = b && b.parentNode;
|
22680
|
-
return a === bup || !!( bup && bup.nodeType === 1 && (
|
22681
|
-
adown.contains ?
|
22682
|
-
adown.contains( bup ) :
|
22683
|
-
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
22684
|
-
) );
|
22685
|
-
} :
|
22686
|
-
function( a, b ) {
|
22687
|
-
if ( b ) {
|
22688
|
-
while ( ( b = b.parentNode ) ) {
|
22689
|
-
if ( b === a ) {
|
22690
|
-
return true;
|
22691
|
-
}
|
22692
|
-
}
|
22693
|
-
}
|
22694
|
-
return false;
|
22695
|
-
};
|
22696
22575
|
|
22697
22576
|
/* Sorting
|
22698
22577
|
---------------------------------------------------------------------- */
|
22699
22578
|
|
22700
22579
|
// Document order sorting
|
22701
|
-
sortOrder =
|
22702
|
-
function( a, b ) {
|
22580
|
+
sortOrder = function( a, b ) {
|
22703
22581
|
|
22704
22582
|
// Flag for duplicate removal
|
22705
22583
|
if ( a === b ) {
|
@@ -22733,8 +22611,8 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
22733
22611
|
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
22734
22612
|
// two documents; shallow comparisons work.
|
22735
22613
|
// eslint-disable-next-line eqeqeq
|
22736
|
-
if ( a
|
22737
|
-
contains( preferredDoc, a ) ) {
|
22614
|
+
if ( a === document || a.ownerDocument == preferredDoc &&
|
22615
|
+
find.contains( preferredDoc, a ) ) {
|
22738
22616
|
return -1;
|
22739
22617
|
}
|
22740
22618
|
|
@@ -22742,100 +22620,33 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
22742
22620
|
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
22743
22621
|
// two documents; shallow comparisons work.
|
22744
22622
|
// eslint-disable-next-line eqeqeq
|
22745
|
-
if ( b
|
22746
|
-
contains( preferredDoc, b ) ) {
|
22623
|
+
if ( b === document || b.ownerDocument == preferredDoc &&
|
22624
|
+
find.contains( preferredDoc, b ) ) {
|
22747
22625
|
return 1;
|
22748
22626
|
}
|
22749
22627
|
|
22750
22628
|
// Maintain original order
|
22751
22629
|
return sortInput ?
|
22752
|
-
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
22630
|
+
( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
|
22753
22631
|
0;
|
22754
22632
|
}
|
22755
22633
|
|
22756
22634
|
return compare & 4 ? -1 : 1;
|
22757
|
-
} :
|
22758
|
-
function( a, b ) {
|
22759
|
-
|
22760
|
-
// Exit early if the nodes are identical
|
22761
|
-
if ( a === b ) {
|
22762
|
-
hasDuplicate = true;
|
22763
|
-
return 0;
|
22764
|
-
}
|
22765
|
-
|
22766
|
-
var cur,
|
22767
|
-
i = 0,
|
22768
|
-
aup = a.parentNode,
|
22769
|
-
bup = b.parentNode,
|
22770
|
-
ap = [ a ],
|
22771
|
-
bp = [ b ];
|
22772
|
-
|
22773
|
-
// Parentless nodes are either documents or disconnected
|
22774
|
-
if ( !aup || !bup ) {
|
22775
|
-
|
22776
|
-
// Support: IE 11+, Edge 17 - 18+
|
22777
|
-
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
22778
|
-
// two documents; shallow comparisons work.
|
22779
|
-
/* eslint-disable eqeqeq */
|
22780
|
-
return a == document ? -1 :
|
22781
|
-
b == document ? 1 :
|
22782
|
-
/* eslint-enable eqeqeq */
|
22783
|
-
aup ? -1 :
|
22784
|
-
bup ? 1 :
|
22785
|
-
sortInput ?
|
22786
|
-
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
22787
|
-
0;
|
22788
|
-
|
22789
|
-
// If the nodes are siblings, we can do a quick check
|
22790
|
-
} else if ( aup === bup ) {
|
22791
|
-
return siblingCheck( a, b );
|
22792
|
-
}
|
22793
|
-
|
22794
|
-
// Otherwise we need full lists of their ancestors for comparison
|
22795
|
-
cur = a;
|
22796
|
-
while ( ( cur = cur.parentNode ) ) {
|
22797
|
-
ap.unshift( cur );
|
22798
|
-
}
|
22799
|
-
cur = b;
|
22800
|
-
while ( ( cur = cur.parentNode ) ) {
|
22801
|
-
bp.unshift( cur );
|
22802
|
-
}
|
22803
|
-
|
22804
|
-
// Walk down the tree looking for a discrepancy
|
22805
|
-
while ( ap[ i ] === bp[ i ] ) {
|
22806
|
-
i++;
|
22807
|
-
}
|
22808
|
-
|
22809
|
-
return i ?
|
22810
|
-
|
22811
|
-
// Do a sibling check if the nodes have a common ancestor
|
22812
|
-
siblingCheck( ap[ i ], bp[ i ] ) :
|
22813
|
-
|
22814
|
-
// Otherwise nodes in our document sort first
|
22815
|
-
// Support: IE 11+, Edge 17 - 18+
|
22816
|
-
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
22817
|
-
// two documents; shallow comparisons work.
|
22818
|
-
/* eslint-disable eqeqeq */
|
22819
|
-
ap[ i ] == preferredDoc ? -1 :
|
22820
|
-
bp[ i ] == preferredDoc ? 1 :
|
22821
|
-
/* eslint-enable eqeqeq */
|
22822
|
-
0;
|
22823
22635
|
};
|
22824
22636
|
|
22825
22637
|
return document;
|
22826
|
-
}
|
22638
|
+
}
|
22827
22639
|
|
22828
|
-
|
22829
|
-
return
|
22640
|
+
find.matches = function( expr, elements ) {
|
22641
|
+
return find( expr, null, null, elements );
|
22830
22642
|
};
|
22831
22643
|
|
22832
|
-
|
22644
|
+
find.matchesSelector = function( elem, expr ) {
|
22833
22645
|
setDocument( elem );
|
22834
22646
|
|
22835
|
-
if (
|
22647
|
+
if ( documentIsHTML &&
|
22836
22648
|
!nonnativeSelectorCache[ expr + " " ] &&
|
22837
|
-
( !
|
22838
|
-
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
22649
|
+
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
22839
22650
|
|
22840
22651
|
try {
|
22841
22652
|
var ret = matches.call( elem, expr );
|
@@ -22843,9 +22654,9 @@ Sizzle.matchesSelector = function( elem, expr ) {
|
|
22843
22654
|
// IE 9's matchesSelector returns false on disconnected nodes
|
22844
22655
|
if ( ret || support.disconnectedMatch ||
|
22845
22656
|
|
22846
|
-
|
22847
|
-
|
22848
|
-
|
22657
|
+
// As well, disconnected nodes are said to be in a document
|
22658
|
+
// fragment in IE 9
|
22659
|
+
elem.document && elem.document.nodeType !== 11 ) {
|
22849
22660
|
return ret;
|
22850
22661
|
}
|
22851
22662
|
} catch ( e ) {
|
@@ -22853,10 +22664,10 @@ Sizzle.matchesSelector = function( elem, expr ) {
|
|
22853
22664
|
}
|
22854
22665
|
}
|
22855
22666
|
|
22856
|
-
return
|
22667
|
+
return find( expr, document, null, [ elem ] ).length > 0;
|
22857
22668
|
};
|
22858
22669
|
|
22859
|
-
|
22670
|
+
find.contains = function( context, elem ) {
|
22860
22671
|
|
22861
22672
|
// Set document vars if needed
|
22862
22673
|
// Support: IE 11+, Edge 17 - 18+
|
@@ -22866,10 +22677,11 @@ Sizzle.contains = function( context, elem ) {
|
|
22866
22677
|
if ( ( context.ownerDocument || context ) != document ) {
|
22867
22678
|
setDocument( context );
|
22868
22679
|
}
|
22869
|
-
return contains( context, elem );
|
22680
|
+
return jQuery.contains( context, elem );
|
22870
22681
|
};
|
22871
22682
|
|
22872
|
-
|
22683
|
+
|
22684
|
+
find.attr = function( elem, name ) {
|
22873
22685
|
|
22874
22686
|
// Set document vars if needed
|
22875
22687
|
// Support: IE 11+, Edge 17 - 18+
|
@@ -22882,25 +22694,19 @@ Sizzle.attr = function( elem, name ) {
|
|
22882
22694
|
|
22883
22695
|
var fn = Expr.attrHandle[ name.toLowerCase() ],
|
22884
22696
|
|
22885
|
-
// Don't get fooled by Object.prototype properties (
|
22697
|
+
// Don't get fooled by Object.prototype properties (see trac-13807)
|
22886
22698
|
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
|
22887
22699
|
fn( elem, name, !documentIsHTML ) :
|
22888
22700
|
undefined;
|
22889
22701
|
|
22890
|
-
|
22891
|
-
val
|
22892
|
-
|
22893
|
-
elem.getAttribute( name ) :
|
22894
|
-
( val = elem.getAttributeNode( name ) ) && val.specified ?
|
22895
|
-
val.value :
|
22896
|
-
null;
|
22897
|
-
};
|
22702
|
+
if ( val !== undefined ) {
|
22703
|
+
return val;
|
22704
|
+
}
|
22898
22705
|
|
22899
|
-
|
22900
|
-
return ( sel + "" ).replace( rcssescape, fcssescape );
|
22706
|
+
return elem.getAttribute( name );
|
22901
22707
|
};
|
22902
22708
|
|
22903
|
-
|
22709
|
+
find.error = function( msg ) {
|
22904
22710
|
throw new Error( "Syntax error, unrecognized expression: " + msg );
|
22905
22711
|
};
|
22906
22712
|
|
@@ -22908,16 +22714,20 @@ Sizzle.error = function( msg ) {
|
|
22908
22714
|
* Document sorting and removing duplicates
|
22909
22715
|
* @param {ArrayLike} results
|
22910
22716
|
*/
|
22911
|
-
|
22717
|
+
jQuery.uniqueSort = function( results ) {
|
22912
22718
|
var elem,
|
22913
22719
|
duplicates = [],
|
22914
22720
|
j = 0,
|
22915
22721
|
i = 0;
|
22916
22722
|
|
22917
22723
|
// Unless we *know* we can detect duplicates, assume their presence
|
22918
|
-
|
22919
|
-
|
22920
|
-
|
22724
|
+
//
|
22725
|
+
// Support: Android <=4.0+
|
22726
|
+
// Testing for detecting duplicates is unpredictable so instead assume we can't
|
22727
|
+
// depend on duplicate detection in all browsers without a stable sort.
|
22728
|
+
hasDuplicate = !support.sortStable;
|
22729
|
+
sortInput = !support.sortStable && slice.call( results, 0 );
|
22730
|
+
sort.call( results, sortOrder );
|
22921
22731
|
|
22922
22732
|
if ( hasDuplicate ) {
|
22923
22733
|
while ( ( elem = results[ i++ ] ) ) {
|
@@ -22926,7 +22736,7 @@ Sizzle.uniqueSort = function( results ) {
|
|
22926
22736
|
}
|
22927
22737
|
}
|
22928
22738
|
while ( j-- ) {
|
22929
|
-
|
22739
|
+
splice.call( results, duplicates[ j ], 1 );
|
22930
22740
|
}
|
22931
22741
|
}
|
22932
22742
|
|
@@ -22937,47 +22747,11 @@ Sizzle.uniqueSort = function( results ) {
|
|
22937
22747
|
return results;
|
22938
22748
|
};
|
22939
22749
|
|
22940
|
-
|
22941
|
-
|
22942
|
-
* @param {Array|Element} elem
|
22943
|
-
*/
|
22944
|
-
getText = Sizzle.getText = function( elem ) {
|
22945
|
-
var node,
|
22946
|
-
ret = "",
|
22947
|
-
i = 0,
|
22948
|
-
nodeType = elem.nodeType;
|
22949
|
-
|
22950
|
-
if ( !nodeType ) {
|
22951
|
-
|
22952
|
-
// If no nodeType, this is expected to be an array
|
22953
|
-
while ( ( node = elem[ i++ ] ) ) {
|
22954
|
-
|
22955
|
-
// Do not traverse comment nodes
|
22956
|
-
ret += getText( node );
|
22957
|
-
}
|
22958
|
-
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
|
22959
|
-
|
22960
|
-
// Use textContent for elements
|
22961
|
-
// innerText usage removed for consistency of new lines (jQuery #11153)
|
22962
|
-
if ( typeof elem.textContent === "string" ) {
|
22963
|
-
return elem.textContent;
|
22964
|
-
} else {
|
22965
|
-
|
22966
|
-
// Traverse its children
|
22967
|
-
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
22968
|
-
ret += getText( elem );
|
22969
|
-
}
|
22970
|
-
}
|
22971
|
-
} else if ( nodeType === 3 || nodeType === 4 ) {
|
22972
|
-
return elem.nodeValue;
|
22973
|
-
}
|
22974
|
-
|
22975
|
-
// Do not include comment or processing instruction nodes
|
22976
|
-
|
22977
|
-
return ret;
|
22750
|
+
jQuery.fn.uniqueSort = function() {
|
22751
|
+
return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );
|
22978
22752
|
};
|
22979
22753
|
|
22980
|
-
Expr =
|
22754
|
+
Expr = jQuery.expr = {
|
22981
22755
|
|
22982
22756
|
// Can be adjusted by the user
|
22983
22757
|
cacheLength: 50,
|
@@ -22998,12 +22772,12 @@ Expr = Sizzle.selectors = {
|
|
22998
22772
|
},
|
22999
22773
|
|
23000
22774
|
preFilter: {
|
23001
|
-
|
22775
|
+
ATTR: function( match ) {
|
23002
22776
|
match[ 1 ] = match[ 1 ].replace( runescape, funescape );
|
23003
22777
|
|
23004
22778
|
// Move the given value to match[3] whether quoted or unquoted
|
23005
|
-
match[ 3 ] = ( match[ 3 ] || match[ 4 ] ||
|
23006
|
-
|
22779
|
+
match[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" )
|
22780
|
+
.replace( runescape, funescape );
|
23007
22781
|
|
23008
22782
|
if ( match[ 2 ] === "~=" ) {
|
23009
22783
|
match[ 3 ] = " " + match[ 3 ] + " ";
|
@@ -23012,7 +22786,7 @@ Expr = Sizzle.selectors = {
|
|
23012
22786
|
return match.slice( 0, 4 );
|
23013
22787
|
},
|
23014
22788
|
|
23015
|
-
|
22789
|
+
CHILD: function( match ) {
|
23016
22790
|
|
23017
22791
|
/* matches from matchExpr["CHILD"]
|
23018
22792
|
1 type (only|nth|...)
|
@@ -23030,29 +22804,30 @@ Expr = Sizzle.selectors = {
|
|
23030
22804
|
|
23031
22805
|
// nth-* requires argument
|
23032
22806
|
if ( !match[ 3 ] ) {
|
23033
|
-
|
22807
|
+
find.error( match[ 0 ] );
|
23034
22808
|
}
|
23035
22809
|
|
23036
22810
|
// numeric x and y parameters for Expr.filter.CHILD
|
23037
22811
|
// remember that false/true cast respectively to 0/1
|
23038
22812
|
match[ 4 ] = +( match[ 4 ] ?
|
23039
22813
|
match[ 5 ] + ( match[ 6 ] || 1 ) :
|
23040
|
-
2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
|
22814
|
+
2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
|
22815
|
+
);
|
23041
22816
|
match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );
|
23042
22817
|
|
23043
|
-
|
22818
|
+
// other types prohibit arguments
|
23044
22819
|
} else if ( match[ 3 ] ) {
|
23045
|
-
|
22820
|
+
find.error( match[ 0 ] );
|
23046
22821
|
}
|
23047
22822
|
|
23048
22823
|
return match;
|
23049
22824
|
},
|
23050
22825
|
|
23051
|
-
|
22826
|
+
PSEUDO: function( match ) {
|
23052
22827
|
var excess,
|
23053
22828
|
unquoted = !match[ 6 ] && match[ 2 ];
|
23054
22829
|
|
23055
|
-
if ( matchExpr
|
22830
|
+
if ( matchExpr.CHILD.test( match[ 0 ] ) ) {
|
23056
22831
|
return null;
|
23057
22832
|
}
|
23058
22833
|
|
@@ -23081,36 +22856,36 @@ Expr = Sizzle.selectors = {
|
|
23081
22856
|
|
23082
22857
|
filter: {
|
23083
22858
|
|
23084
|
-
|
23085
|
-
var
|
22859
|
+
TAG: function( nodeNameSelector ) {
|
22860
|
+
var expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
|
23086
22861
|
return nodeNameSelector === "*" ?
|
23087
22862
|
function() {
|
23088
22863
|
return true;
|
23089
22864
|
} :
|
23090
22865
|
function( elem ) {
|
23091
|
-
return
|
22866
|
+
return nodeName( elem, expectedNodeName );
|
23092
22867
|
};
|
23093
22868
|
},
|
23094
22869
|
|
23095
|
-
|
22870
|
+
CLASS: function( className ) {
|
23096
22871
|
var pattern = classCache[ className + " " ];
|
23097
22872
|
|
23098
22873
|
return pattern ||
|
23099
|
-
( pattern = new RegExp( "(^|" + whitespace +
|
23100
|
-
"
|
23101
|
-
|
23102
|
-
|
23103
|
-
|
23104
|
-
|
23105
|
-
|
23106
|
-
|
23107
|
-
|
22874
|
+
( pattern = new RegExp( "(^|" + whitespace + ")" + className +
|
22875
|
+
"(" + whitespace + "|$)" ) ) &&
|
22876
|
+
classCache( className, function( elem ) {
|
22877
|
+
return pattern.test(
|
22878
|
+
typeof elem.className === "string" && elem.className ||
|
22879
|
+
typeof elem.getAttribute !== "undefined" &&
|
22880
|
+
elem.getAttribute( "class" ) ||
|
22881
|
+
""
|
22882
|
+
);
|
23108
22883
|
} );
|
23109
22884
|
},
|
23110
22885
|
|
23111
|
-
|
22886
|
+
ATTR: function( name, operator, check ) {
|
23112
22887
|
return function( elem ) {
|
23113
|
-
var result =
|
22888
|
+
var result = find.attr( elem, name );
|
23114
22889
|
|
23115
22890
|
if ( result == null ) {
|
23116
22891
|
return operator === "!=";
|
@@ -23121,22 +22896,34 @@ Expr = Sizzle.selectors = {
|
|
23121
22896
|
|
23122
22897
|
result += "";
|
23123
22898
|
|
23124
|
-
|
23125
|
-
|
23126
|
-
|
23127
|
-
|
23128
|
-
|
23129
|
-
|
23130
|
-
|
23131
|
-
|
23132
|
-
|
23133
|
-
|
23134
|
-
|
22899
|
+
if ( operator === "=" ) {
|
22900
|
+
return result === check;
|
22901
|
+
}
|
22902
|
+
if ( operator === "!=" ) {
|
22903
|
+
return result !== check;
|
22904
|
+
}
|
22905
|
+
if ( operator === "^=" ) {
|
22906
|
+
return check && result.indexOf( check ) === 0;
|
22907
|
+
}
|
22908
|
+
if ( operator === "*=" ) {
|
22909
|
+
return check && result.indexOf( check ) > -1;
|
22910
|
+
}
|
22911
|
+
if ( operator === "$=" ) {
|
22912
|
+
return check && result.slice( -check.length ) === check;
|
22913
|
+
}
|
22914
|
+
if ( operator === "~=" ) {
|
22915
|
+
return ( " " + result.replace( rwhitespace, " " ) + " " )
|
22916
|
+
.indexOf( check ) > -1;
|
22917
|
+
}
|
22918
|
+
if ( operator === "|=" ) {
|
22919
|
+
return result === check || result.slice( 0, check.length + 1 ) === check + "-";
|
22920
|
+
}
|
23135
22921
|
|
22922
|
+
return false;
|
23136
22923
|
};
|
23137
22924
|
},
|
23138
22925
|
|
23139
|
-
|
22926
|
+
CHILD: function( type, what, _argument, first, last ) {
|
23140
22927
|
var simple = type.slice( 0, 3 ) !== "nth",
|
23141
22928
|
forward = type.slice( -4 ) !== "last",
|
23142
22929
|
ofType = what === "of-type";
|
@@ -23149,7 +22936,7 @@ Expr = Sizzle.selectors = {
|
|
23149
22936
|
} :
|
23150
22937
|
|
23151
22938
|
function( elem, _context, xml ) {
|
23152
|
-
var cache,
|
22939
|
+
var cache, outerCache, node, nodeIndex, start,
|
23153
22940
|
dir = simple !== forward ? "nextSibling" : "previousSibling",
|
23154
22941
|
parent = elem.parentNode,
|
23155
22942
|
name = ofType && elem.nodeName.toLowerCase(),
|
@@ -23164,7 +22951,7 @@ Expr = Sizzle.selectors = {
|
|
23164
22951
|
node = elem;
|
23165
22952
|
while ( ( node = node[ dir ] ) ) {
|
23166
22953
|
if ( ofType ?
|
23167
|
-
|
22954
|
+
nodeName( node, name ) :
|
23168
22955
|
node.nodeType === 1 ) {
|
23169
22956
|
|
23170
22957
|
return false;
|
@@ -23183,17 +22970,8 @@ Expr = Sizzle.selectors = {
|
|
23183
22970
|
if ( forward && useCache ) {
|
23184
22971
|
|
23185
22972
|
// Seek `elem` from a previously-cached index
|
23186
|
-
|
23187
|
-
|
23188
|
-
node = parent;
|
23189
|
-
outerCache = node[ expando ] || ( node[ expando ] = {} );
|
23190
|
-
|
23191
|
-
// Support: IE <9 only
|
23192
|
-
// Defend against cloned attroperties (jQuery gh-1709)
|
23193
|
-
uniqueCache = outerCache[ node.uniqueID ] ||
|
23194
|
-
( outerCache[ node.uniqueID ] = {} );
|
23195
|
-
|
23196
|
-
cache = uniqueCache[ type ] || [];
|
22973
|
+
outerCache = parent[ expando ] || ( parent[ expando ] = {} );
|
22974
|
+
cache = outerCache[ type ] || [];
|
23197
22975
|
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
23198
22976
|
diff = nodeIndex && cache[ 2 ];
|
23199
22977
|
node = nodeIndex && parent.childNodes[ nodeIndex ];
|
@@ -23205,7 +22983,7 @@ Expr = Sizzle.selectors = {
|
|
23205
22983
|
|
23206
22984
|
// When found, cache indexes on `parent` and break
|
23207
22985
|
if ( node.nodeType === 1 && ++diff && node === elem ) {
|
23208
|
-
|
22986
|
+
outerCache[ type ] = [ dirruns, nodeIndex, diff ];
|
23209
22987
|
break;
|
23210
22988
|
}
|
23211
22989
|
}
|
@@ -23214,17 +22992,8 @@ Expr = Sizzle.selectors = {
|
|
23214
22992
|
|
23215
22993
|
// Use previously-cached element index if available
|
23216
22994
|
if ( useCache ) {
|
23217
|
-
|
23218
|
-
|
23219
|
-
node = elem;
|
23220
|
-
outerCache = node[ expando ] || ( node[ expando ] = {} );
|
23221
|
-
|
23222
|
-
// Support: IE <9 only
|
23223
|
-
// Defend against cloned attroperties (jQuery gh-1709)
|
23224
|
-
uniqueCache = outerCache[ node.uniqueID ] ||
|
23225
|
-
( outerCache[ node.uniqueID ] = {} );
|
23226
|
-
|
23227
|
-
cache = uniqueCache[ type ] || [];
|
22995
|
+
outerCache = elem[ expando ] || ( elem[ expando ] = {} );
|
22996
|
+
cache = outerCache[ type ] || [];
|
23228
22997
|
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
23229
22998
|
diff = nodeIndex;
|
23230
22999
|
}
|
@@ -23238,7 +23007,7 @@ Expr = Sizzle.selectors = {
|
|
23238
23007
|
( diff = nodeIndex = 0 ) || start.pop() ) ) {
|
23239
23008
|
|
23240
23009
|
if ( ( ofType ?
|
23241
|
-
|
23010
|
+
nodeName( node, name ) :
|
23242
23011
|
node.nodeType === 1 ) &&
|
23243
23012
|
++diff ) {
|
23244
23013
|
|
@@ -23246,13 +23015,7 @@ Expr = Sizzle.selectors = {
|
|
23246
23015
|
if ( useCache ) {
|
23247
23016
|
outerCache = node[ expando ] ||
|
23248
23017
|
( node[ expando ] = {} );
|
23249
|
-
|
23250
|
-
// Support: IE <9 only
|
23251
|
-
// Defend against cloned attroperties (jQuery gh-1709)
|
23252
|
-
uniqueCache = outerCache[ node.uniqueID ] ||
|
23253
|
-
( outerCache[ node.uniqueID ] = {} );
|
23254
|
-
|
23255
|
-
uniqueCache[ type ] = [ dirruns, diff ];
|
23018
|
+
outerCache[ type ] = [ dirruns, diff ];
|
23256
23019
|
}
|
23257
23020
|
|
23258
23021
|
if ( node === elem ) {
|
@@ -23270,19 +23033,19 @@ Expr = Sizzle.selectors = {
|
|
23270
23033
|
};
|
23271
23034
|
},
|
23272
23035
|
|
23273
|
-
|
23036
|
+
PSEUDO: function( pseudo, argument ) {
|
23274
23037
|
|
23275
23038
|
// pseudo-class names are case-insensitive
|
23276
|
-
//
|
23039
|
+
// https://www.w3.org/TR/selectors/#pseudo-classes
|
23277
23040
|
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
|
23278
23041
|
// Remember that setFilters inherits from pseudos
|
23279
23042
|
var args,
|
23280
23043
|
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
|
23281
|
-
|
23044
|
+
find.error( "unsupported pseudo: " + pseudo );
|
23282
23045
|
|
23283
23046
|
// The user may use createPseudo to indicate that
|
23284
23047
|
// arguments are needed to create the filter function
|
23285
|
-
// just as
|
23048
|
+
// just as jQuery does
|
23286
23049
|
if ( fn[ expando ] ) {
|
23287
23050
|
return fn( argument );
|
23288
23051
|
}
|
@@ -23296,7 +23059,7 @@ Expr = Sizzle.selectors = {
|
|
23296
23059
|
matched = fn( seed, argument ),
|
23297
23060
|
i = matched.length;
|
23298
23061
|
while ( i-- ) {
|
23299
|
-
idx = indexOf( seed, matched[ i ] );
|
23062
|
+
idx = indexOf.call( seed, matched[ i ] );
|
23300
23063
|
seed[ idx ] = !( matches[ idx ] = matched[ i ] );
|
23301
23064
|
}
|
23302
23065
|
} ) :
|
@@ -23312,14 +23075,14 @@ Expr = Sizzle.selectors = {
|
|
23312
23075
|
pseudos: {
|
23313
23076
|
|
23314
23077
|
// Potentially complex pseudos
|
23315
|
-
|
23078
|
+
not: markFunction( function( selector ) {
|
23316
23079
|
|
23317
23080
|
// Trim the selector passed to compile
|
23318
23081
|
// to avoid treating leading and trailing
|
23319
23082
|
// spaces as combinators
|
23320
23083
|
var input = [],
|
23321
23084
|
results = [],
|
23322
|
-
matcher = compile( selector.replace(
|
23085
|
+
matcher = compile( selector.replace( rtrimCSS, "$1" ) );
|
23323
23086
|
|
23324
23087
|
return matcher[ expando ] ?
|
23325
23088
|
markFunction( function( seed, matches, _context, xml ) {
|
@@ -23338,22 +23101,23 @@ Expr = Sizzle.selectors = {
|
|
23338
23101
|
input[ 0 ] = elem;
|
23339
23102
|
matcher( input, null, xml, results );
|
23340
23103
|
|
23341
|
-
// Don't keep the element
|
23104
|
+
// Don't keep the element
|
23105
|
+
// (see https://github.com/jquery/sizzle/issues/299)
|
23342
23106
|
input[ 0 ] = null;
|
23343
23107
|
return !results.pop();
|
23344
23108
|
};
|
23345
23109
|
} ),
|
23346
23110
|
|
23347
|
-
|
23111
|
+
has: markFunction( function( selector ) {
|
23348
23112
|
return function( elem ) {
|
23349
|
-
return
|
23113
|
+
return find( selector, elem ).length > 0;
|
23350
23114
|
};
|
23351
23115
|
} ),
|
23352
23116
|
|
23353
|
-
|
23117
|
+
contains: markFunction( function( text ) {
|
23354
23118
|
text = text.replace( runescape, funescape );
|
23355
23119
|
return function( elem ) {
|
23356
|
-
return ( elem.textContent ||
|
23120
|
+
return ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;
|
23357
23121
|
};
|
23358
23122
|
} ),
|
23359
23123
|
|
@@ -23363,12 +23127,12 @@ Expr = Sizzle.selectors = {
|
|
23363
23127
|
// or beginning with the identifier C immediately followed by "-".
|
23364
23128
|
// The matching of C against the element's language value is performed case-insensitively.
|
23365
23129
|
// The identifier C does not have to be a valid language name."
|
23366
|
-
//
|
23367
|
-
|
23130
|
+
// https://www.w3.org/TR/selectors/#lang-pseudo
|
23131
|
+
lang: markFunction( function( lang ) {
|
23368
23132
|
|
23369
23133
|
// lang value must be a valid identifier
|
23370
23134
|
if ( !ridentifier.test( lang || "" ) ) {
|
23371
|
-
|
23135
|
+
find.error( "unsupported lang: " + lang );
|
23372
23136
|
}
|
23373
23137
|
lang = lang.replace( runescape, funescape ).toLowerCase();
|
23374
23138
|
return function( elem ) {
|
@@ -23387,38 +23151,39 @@ Expr = Sizzle.selectors = {
|
|
23387
23151
|
} ),
|
23388
23152
|
|
23389
23153
|
// Miscellaneous
|
23390
|
-
|
23154
|
+
target: function( elem ) {
|
23391
23155
|
var hash = window.location && window.location.hash;
|
23392
23156
|
return hash && hash.slice( 1 ) === elem.id;
|
23393
23157
|
},
|
23394
23158
|
|
23395
|
-
|
23396
|
-
return elem ===
|
23159
|
+
root: function( elem ) {
|
23160
|
+
return elem === documentElement;
|
23397
23161
|
},
|
23398
23162
|
|
23399
|
-
|
23400
|
-
return elem ===
|
23401
|
-
|
23163
|
+
focus: function( elem ) {
|
23164
|
+
return elem === safeActiveElement() &&
|
23165
|
+
document.hasFocus() &&
|
23402
23166
|
!!( elem.type || elem.href || ~elem.tabIndex );
|
23403
23167
|
},
|
23404
23168
|
|
23405
23169
|
// Boolean properties
|
23406
|
-
|
23407
|
-
|
23170
|
+
enabled: createDisabledPseudo( false ),
|
23171
|
+
disabled: createDisabledPseudo( true ),
|
23408
23172
|
|
23409
|
-
|
23173
|
+
checked: function( elem ) {
|
23410
23174
|
|
23411
23175
|
// In CSS3, :checked should return both checked and selected elements
|
23412
|
-
//
|
23413
|
-
|
23414
|
-
|
23415
|
-
( nodeName === "option" && !!elem.selected );
|
23176
|
+
// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
23177
|
+
return ( nodeName( elem, "input" ) && !!elem.checked ) ||
|
23178
|
+
( nodeName( elem, "option" ) && !!elem.selected );
|
23416
23179
|
},
|
23417
23180
|
|
23418
|
-
|
23181
|
+
selected: function( elem ) {
|
23419
23182
|
|
23420
|
-
//
|
23421
|
-
//
|
23183
|
+
// Support: IE <=11+
|
23184
|
+
// Accessing the selectedIndex property
|
23185
|
+
// forces the browser to treat the default option as
|
23186
|
+
// selected when in an optgroup.
|
23422
23187
|
if ( elem.parentNode ) {
|
23423
23188
|
// eslint-disable-next-line no-unused-expressions
|
23424
23189
|
elem.parentNode.selectedIndex;
|
@@ -23428,9 +23193,9 @@ Expr = Sizzle.selectors = {
|
|
23428
23193
|
},
|
23429
23194
|
|
23430
23195
|
// Contents
|
23431
|
-
|
23196
|
+
empty: function( elem ) {
|
23432
23197
|
|
23433
|
-
//
|
23198
|
+
// https://www.w3.org/TR/selectors/#empty-pseudo
|
23434
23199
|
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
|
23435
23200
|
// but not by others (comment: 8; processing instruction: 7; etc.)
|
23436
23201
|
// nodeType < 6 works because attributes (2) do not appear as children
|
@@ -23442,49 +23207,49 @@ Expr = Sizzle.selectors = {
|
|
23442
23207
|
return true;
|
23443
23208
|
},
|
23444
23209
|
|
23445
|
-
|
23446
|
-
return !Expr.pseudos
|
23210
|
+
parent: function( elem ) {
|
23211
|
+
return !Expr.pseudos.empty( elem );
|
23447
23212
|
},
|
23448
23213
|
|
23449
23214
|
// Element/input types
|
23450
|
-
|
23215
|
+
header: function( elem ) {
|
23451
23216
|
return rheader.test( elem.nodeName );
|
23452
23217
|
},
|
23453
23218
|
|
23454
|
-
|
23219
|
+
input: function( elem ) {
|
23455
23220
|
return rinputs.test( elem.nodeName );
|
23456
23221
|
},
|
23457
23222
|
|
23458
|
-
|
23459
|
-
|
23460
|
-
|
23223
|
+
button: function( elem ) {
|
23224
|
+
return nodeName( elem, "input" ) && elem.type === "button" ||
|
23225
|
+
nodeName( elem, "button" );
|
23461
23226
|
},
|
23462
23227
|
|
23463
|
-
|
23228
|
+
text: function( elem ) {
|
23464
23229
|
var attr;
|
23465
|
-
return
|
23466
|
-
elem.type === "text" &&
|
23230
|
+
return nodeName( elem, "input" ) && elem.type === "text" &&
|
23467
23231
|
|
23468
|
-
// Support: IE<
|
23469
|
-
// New HTML5 attribute values (e.g., "search") appear
|
23232
|
+
// Support: IE <10 only
|
23233
|
+
// New HTML5 attribute values (e.g., "search") appear
|
23234
|
+
// with elem.type === "text"
|
23470
23235
|
( ( attr = elem.getAttribute( "type" ) ) == null ||
|
23471
23236
|
attr.toLowerCase() === "text" );
|
23472
23237
|
},
|
23473
23238
|
|
23474
23239
|
// Position-in-collection
|
23475
|
-
|
23240
|
+
first: createPositionalPseudo( function() {
|
23476
23241
|
return [ 0 ];
|
23477
23242
|
} ),
|
23478
23243
|
|
23479
|
-
|
23244
|
+
last: createPositionalPseudo( function( _matchIndexes, length ) {
|
23480
23245
|
return [ length - 1 ];
|
23481
23246
|
} ),
|
23482
23247
|
|
23483
|
-
|
23248
|
+
eq: createPositionalPseudo( function( _matchIndexes, length, argument ) {
|
23484
23249
|
return [ argument < 0 ? argument + length : argument ];
|
23485
23250
|
} ),
|
23486
23251
|
|
23487
|
-
|
23252
|
+
even: createPositionalPseudo( function( matchIndexes, length ) {
|
23488
23253
|
var i = 0;
|
23489
23254
|
for ( ; i < length; i += 2 ) {
|
23490
23255
|
matchIndexes.push( i );
|
@@ -23492,7 +23257,7 @@ Expr = Sizzle.selectors = {
|
|
23492
23257
|
return matchIndexes;
|
23493
23258
|
} ),
|
23494
23259
|
|
23495
|
-
|
23260
|
+
odd: createPositionalPseudo( function( matchIndexes, length ) {
|
23496
23261
|
var i = 1;
|
23497
23262
|
for ( ; i < length; i += 2 ) {
|
23498
23263
|
matchIndexes.push( i );
|
@@ -23500,19 +23265,24 @@ Expr = Sizzle.selectors = {
|
|
23500
23265
|
return matchIndexes;
|
23501
23266
|
} ),
|
23502
23267
|
|
23503
|
-
|
23504
|
-
var i
|
23505
|
-
|
23506
|
-
|
23507
|
-
|
23508
|
-
|
23268
|
+
lt: createPositionalPseudo( function( matchIndexes, length, argument ) {
|
23269
|
+
var i;
|
23270
|
+
|
23271
|
+
if ( argument < 0 ) {
|
23272
|
+
i = argument + length;
|
23273
|
+
} else if ( argument > length ) {
|
23274
|
+
i = length;
|
23275
|
+
} else {
|
23276
|
+
i = argument;
|
23277
|
+
}
|
23278
|
+
|
23509
23279
|
for ( ; --i >= 0; ) {
|
23510
23280
|
matchIndexes.push( i );
|
23511
23281
|
}
|
23512
23282
|
return matchIndexes;
|
23513
23283
|
} ),
|
23514
23284
|
|
23515
|
-
|
23285
|
+
gt: createPositionalPseudo( function( matchIndexes, length, argument ) {
|
23516
23286
|
var i = argument < 0 ? argument + length : argument;
|
23517
23287
|
for ( ; ++i < length; ) {
|
23518
23288
|
matchIndexes.push( i );
|
@@ -23522,7 +23292,7 @@ Expr = Sizzle.selectors = {
|
|
23522
23292
|
}
|
23523
23293
|
};
|
23524
23294
|
|
23525
|
-
Expr.pseudos
|
23295
|
+
Expr.pseudos.nth = Expr.pseudos.eq;
|
23526
23296
|
|
23527
23297
|
// Add button/input type pseudos
|
23528
23298
|
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
|
@@ -23537,7 +23307,7 @@ function setFilters() {}
|
|
23537
23307
|
setFilters.prototype = Expr.filters = Expr.pseudos;
|
23538
23308
|
Expr.setFilters = new setFilters();
|
23539
23309
|
|
23540
|
-
|
23310
|
+
function tokenize( selector, parseOnly ) {
|
23541
23311
|
var matched, match, tokens, type,
|
23542
23312
|
soFar, groups, preFilters,
|
23543
23313
|
cached = tokenCache[ selector + " " ];
|
@@ -23565,13 +23335,13 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
|
23565
23335
|
matched = false;
|
23566
23336
|
|
23567
23337
|
// Combinators
|
23568
|
-
if ( ( match =
|
23338
|
+
if ( ( match = rleadingCombinator.exec( soFar ) ) ) {
|
23569
23339
|
matched = match.shift();
|
23570
23340
|
tokens.push( {
|
23571
23341
|
value: matched,
|
23572
23342
|
|
23573
23343
|
// Cast descendant combinators to space
|
23574
|
-
type: match[ 0 ].replace(
|
23344
|
+
type: match[ 0 ].replace( rtrimCSS, " " )
|
23575
23345
|
} );
|
23576
23346
|
soFar = soFar.slice( matched.length );
|
23577
23347
|
}
|
@@ -23598,14 +23368,16 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
|
23598
23368
|
// Return the length of the invalid excess
|
23599
23369
|
// if we're just parsing
|
23600
23370
|
// Otherwise, throw an error or return tokens
|
23601
|
-
|
23602
|
-
soFar.length
|
23603
|
-
|
23604
|
-
Sizzle.error( selector ) :
|
23371
|
+
if ( parseOnly ) {
|
23372
|
+
return soFar.length;
|
23373
|
+
}
|
23605
23374
|
|
23606
|
-
|
23607
|
-
|
23608
|
-
|
23375
|
+
return soFar ?
|
23376
|
+
find.error( selector ) :
|
23377
|
+
|
23378
|
+
// Cache the tokens
|
23379
|
+
tokenCache( selector, groups ).slice( 0 );
|
23380
|
+
}
|
23609
23381
|
|
23610
23382
|
function toSelector( tokens ) {
|
23611
23383
|
var i = 0,
|
@@ -23638,7 +23410,7 @@ function addCombinator( matcher, combinator, base ) {
|
|
23638
23410
|
|
23639
23411
|
// Check against all ancestor/preceding elements
|
23640
23412
|
function( elem, context, xml ) {
|
23641
|
-
var oldCache,
|
23413
|
+
var oldCache, outerCache,
|
23642
23414
|
newCache = [ dirruns, doneName ];
|
23643
23415
|
|
23644
23416
|
// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
|
@@ -23655,14 +23427,9 @@ function addCombinator( matcher, combinator, base ) {
|
|
23655
23427
|
if ( elem.nodeType === 1 || checkNonElements ) {
|
23656
23428
|
outerCache = elem[ expando ] || ( elem[ expando ] = {} );
|
23657
23429
|
|
23658
|
-
|
23659
|
-
// Defend against cloned attroperties (jQuery gh-1709)
|
23660
|
-
uniqueCache = outerCache[ elem.uniqueID ] ||
|
23661
|
-
( outerCache[ elem.uniqueID ] = {} );
|
23662
|
-
|
23663
|
-
if ( skip && skip === elem.nodeName.toLowerCase() ) {
|
23430
|
+
if ( skip && nodeName( elem, skip ) ) {
|
23664
23431
|
elem = elem[ dir ] || elem;
|
23665
|
-
} else if ( ( oldCache =
|
23432
|
+
} else if ( ( oldCache = outerCache[ key ] ) &&
|
23666
23433
|
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
|
23667
23434
|
|
23668
23435
|
// Assign to newCache so results back-propagate to previous elements
|
@@ -23670,7 +23437,7 @@ function addCombinator( matcher, combinator, base ) {
|
|
23670
23437
|
} else {
|
23671
23438
|
|
23672
23439
|
// Reuse newcache so results back-propagate to previous elements
|
23673
|
-
|
23440
|
+
outerCache[ key ] = newCache;
|
23674
23441
|
|
23675
23442
|
// A match means we're done; a fail means we have to keep checking
|
23676
23443
|
if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
|
@@ -23702,7 +23469,7 @@ function multipleContexts( selector, contexts, results ) {
|
|
23702
23469
|
var i = 0,
|
23703
23470
|
len = contexts.length;
|
23704
23471
|
for ( ; i < len; i++ ) {
|
23705
|
-
|
23472
|
+
find( selector, contexts[ i ], results );
|
23706
23473
|
}
|
23707
23474
|
return results;
|
23708
23475
|
}
|
@@ -23736,38 +23503,37 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
|
|
23736
23503
|
postFinder = setMatcher( postFinder, postSelector );
|
23737
23504
|
}
|
23738
23505
|
return markFunction( function( seed, results, context, xml ) {
|
23739
|
-
var temp, i, elem,
|
23506
|
+
var temp, i, elem, matcherOut,
|
23740
23507
|
preMap = [],
|
23741
23508
|
postMap = [],
|
23742
23509
|
preexisting = results.length,
|
23743
23510
|
|
23744
23511
|
// Get initial elements from seed or context
|
23745
|
-
elems = seed ||
|
23746
|
-
selector || "*",
|
23747
|
-
|
23748
|
-
[]
|
23749
|
-
),
|
23512
|
+
elems = seed ||
|
23513
|
+
multipleContexts( selector || "*",
|
23514
|
+
context.nodeType ? [ context ] : context, [] ),
|
23750
23515
|
|
23751
23516
|
// Prefilter to get matcher input, preserving a map for seed-results synchronization
|
23752
23517
|
matcherIn = preFilter && ( seed || !selector ) ?
|
23753
23518
|
condense( elems, preMap, preFilter, context, xml ) :
|
23754
|
-
elems
|
23519
|
+
elems;
|
23755
23520
|
|
23756
|
-
|
23521
|
+
if ( matcher ) {
|
23757
23522
|
|
23758
|
-
|
23759
|
-
|
23523
|
+
// If we have a postFinder, or filtered seed, or non-seed postFilter
|
23524
|
+
// or preexisting results,
|
23525
|
+
matcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
|
23760
23526
|
|
23761
|
-
|
23762
|
-
|
23527
|
+
// ...intermediate processing is necessary
|
23528
|
+
[] :
|
23763
23529
|
|
23764
|
-
|
23765
|
-
|
23766
|
-
matcherIn;
|
23530
|
+
// ...otherwise use results directly
|
23531
|
+
results;
|
23767
23532
|
|
23768
|
-
|
23769
|
-
if ( matcher ) {
|
23533
|
+
// Find primary matches
|
23770
23534
|
matcher( matcherIn, matcherOut, context, xml );
|
23535
|
+
} else {
|
23536
|
+
matcherOut = matcherIn;
|
23771
23537
|
}
|
23772
23538
|
|
23773
23539
|
// Apply postFilter
|
@@ -23805,7 +23571,7 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
|
|
23805
23571
|
i = matcherOut.length;
|
23806
23572
|
while ( i-- ) {
|
23807
23573
|
if ( ( elem = matcherOut[ i ] ) &&
|
23808
|
-
( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {
|
23574
|
+
( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {
|
23809
23575
|
|
23810
23576
|
seed[ temp ] = !( results[ temp ] = elem );
|
23811
23577
|
}
|
@@ -23840,15 +23606,21 @@ function matcherFromTokens( tokens ) {
|
|
23840
23606
|
return elem === checkContext;
|
23841
23607
|
}, implicitRelative, true ),
|
23842
23608
|
matchAnyContext = addCombinator( function( elem ) {
|
23843
|
-
return indexOf( checkContext, elem ) > -1;
|
23609
|
+
return indexOf.call( checkContext, elem ) > -1;
|
23844
23610
|
}, implicitRelative, true ),
|
23845
23611
|
matchers = [ function( elem, context, xml ) {
|
23846
|
-
|
23612
|
+
|
23613
|
+
// Support: IE 11+, Edge 17 - 18+
|
23614
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
23615
|
+
// two documents; shallow comparisons work.
|
23616
|
+
// eslint-disable-next-line eqeqeq
|
23617
|
+
var ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (
|
23847
23618
|
( checkContext = context ).nodeType ?
|
23848
23619
|
matchContext( elem, context, xml ) :
|
23849
23620
|
matchAnyContext( elem, context, xml ) );
|
23850
23621
|
|
23851
|
-
// Avoid hanging onto element
|
23622
|
+
// Avoid hanging onto element
|
23623
|
+
// (see https://github.com/jquery/sizzle/issues/299)
|
23852
23624
|
checkContext = null;
|
23853
23625
|
return ret;
|
23854
23626
|
} ];
|
@@ -23873,11 +23645,10 @@ function matcherFromTokens( tokens ) {
|
|
23873
23645
|
i > 1 && elementMatcher( matchers ),
|
23874
23646
|
i > 1 && toSelector(
|
23875
23647
|
|
23876
|
-
|
23877
|
-
|
23878
|
-
|
23879
|
-
|
23880
|
-
).replace( rtrim, "$1" ),
|
23648
|
+
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
|
23649
|
+
tokens.slice( 0, i - 1 )
|
23650
|
+
.concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
|
23651
|
+
).replace( rtrimCSS, "$1" ),
|
23881
23652
|
matcher,
|
23882
23653
|
i < j && matcherFromTokens( tokens.slice( i, j ) ),
|
23883
23654
|
j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
|
@@ -23903,7 +23674,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
23903
23674
|
contextBackup = outermostContext,
|
23904
23675
|
|
23905
23676
|
// We must always have either seed elements or outermost context
|
23906
|
-
elems = seed || byElement && Expr.find
|
23677
|
+
elems = seed || byElement && Expr.find.TAG( "*", outermost ),
|
23907
23678
|
|
23908
23679
|
// Use integer dirruns iff this is the outermost matcher
|
23909
23680
|
dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
|
@@ -23919,8 +23690,9 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
23919
23690
|
}
|
23920
23691
|
|
23921
23692
|
// Add elements passing elementMatchers directly to results
|
23922
|
-
// Support:
|
23923
|
-
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching
|
23693
|
+
// Support: iOS <=7 - 9 only
|
23694
|
+
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching
|
23695
|
+
// elements by id. (see trac-14142)
|
23924
23696
|
for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
|
23925
23697
|
if ( byElement && elem ) {
|
23926
23698
|
j = 0;
|
@@ -23935,7 +23707,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
23935
23707
|
}
|
23936
23708
|
while ( ( matcher = elementMatchers[ j++ ] ) ) {
|
23937
23709
|
if ( matcher( elem, context || document, xml ) ) {
|
23938
|
-
|
23710
|
+
push.call( results, elem );
|
23939
23711
|
break;
|
23940
23712
|
}
|
23941
23713
|
}
|
@@ -23998,7 +23770,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
23998
23770
|
if ( outermost && !seed && setMatched.length > 0 &&
|
23999
23771
|
( matchedCount + setMatchers.length ) > 1 ) {
|
24000
23772
|
|
24001
|
-
|
23773
|
+
jQuery.uniqueSort( results );
|
24002
23774
|
}
|
24003
23775
|
}
|
24004
23776
|
|
@@ -24016,7 +23788,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
24016
23788
|
superMatcher;
|
24017
23789
|
}
|
24018
23790
|
|
24019
|
-
|
23791
|
+
function compile( selector, match /* Internal Use Only */ ) {
|
24020
23792
|
var i,
|
24021
23793
|
setMatchers = [],
|
24022
23794
|
elementMatchers = [],
|
@@ -24039,27 +23811,25 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
|
|
24039
23811
|
}
|
24040
23812
|
|
24041
23813
|
// Cache the compiled function
|
24042
|
-
cached = compilerCache(
|
24043
|
-
|
24044
|
-
matcherFromGroupMatchers( elementMatchers, setMatchers )
|
24045
|
-
);
|
23814
|
+
cached = compilerCache( selector,
|
23815
|
+
matcherFromGroupMatchers( elementMatchers, setMatchers ) );
|
24046
23816
|
|
24047
23817
|
// Save selector and tokenization
|
24048
23818
|
cached.selector = selector;
|
24049
23819
|
}
|
24050
23820
|
return cached;
|
24051
|
-
}
|
23821
|
+
}
|
24052
23822
|
|
24053
23823
|
/**
|
24054
|
-
* A low-level selection function that works with
|
23824
|
+
* A low-level selection function that works with jQuery's compiled
|
24055
23825
|
* selector functions
|
24056
23826
|
* @param {String|Function} selector A selector or a pre-compiled
|
24057
|
-
* selector function built with
|
23827
|
+
* selector function built with jQuery selector compile
|
24058
23828
|
* @param {Element} context
|
24059
23829
|
* @param {Array} [results]
|
24060
23830
|
* @param {Array} [seed] A set of elements to match against
|
24061
23831
|
*/
|
24062
|
-
|
23832
|
+
function select( selector, context, results, seed ) {
|
24063
23833
|
var i, tokens, token, type, find,
|
24064
23834
|
compiled = typeof selector === "function" && selector,
|
24065
23835
|
match = !seed && tokenize( ( selector = compiled.selector || selector ) );
|
@@ -24073,10 +23843,12 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
24073
23843
|
// Reduce context if the leading compound selector is an ID
|
24074
23844
|
tokens = match[ 0 ] = match[ 0 ].slice( 0 );
|
24075
23845
|
if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
|
24076
|
-
|
23846
|
+
context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
|
24077
23847
|
|
24078
|
-
context = ( Expr.find
|
24079
|
-
.replace( runescape, funescape ),
|
23848
|
+
context = ( Expr.find.ID(
|
23849
|
+
token.matches[ 0 ].replace( runescape, funescape ),
|
23850
|
+
context
|
23851
|
+
) || [] )[ 0 ];
|
24080
23852
|
if ( !context ) {
|
24081
23853
|
return results;
|
24082
23854
|
|
@@ -24089,7 +23861,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
24089
23861
|
}
|
24090
23862
|
|
24091
23863
|
// Fetch a seed set for right-to-left matching
|
24092
|
-
i = matchExpr
|
23864
|
+
i = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;
|
24093
23865
|
while ( i-- ) {
|
24094
23866
|
token = tokens[ i ];
|
24095
23867
|
|
@@ -24102,8 +23874,8 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
24102
23874
|
// Search, expanding context for leading sibling combinators
|
24103
23875
|
if ( ( seed = find(
|
24104
23876
|
token.matches[ 0 ].replace( runescape, funescape ),
|
24105
|
-
rsibling.test( tokens[ 0 ].type ) &&
|
24106
|
-
context
|
23877
|
+
rsibling.test( tokens[ 0 ].type ) &&
|
23878
|
+
testContext( context.parentNode ) || context
|
24107
23879
|
) ) ) {
|
24108
23880
|
|
24109
23881
|
// If seed is empty or no tokens remain, we can return early
|
@@ -24130,21 +23902,18 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
24130
23902
|
!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
|
24131
23903
|
);
|
24132
23904
|
return results;
|
24133
|
-
}
|
23905
|
+
}
|
24134
23906
|
|
24135
23907
|
// One-time assignments
|
24136
23908
|
|
23909
|
+
// Support: Android <=4.0 - 4.1+
|
24137
23910
|
// Sort stability
|
24138
23911
|
support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;
|
24139
23912
|
|
24140
|
-
// Support: Chrome 14-35+
|
24141
|
-
// Always assume duplicates if they aren't passed to the comparison function
|
24142
|
-
support.detectDuplicates = !!hasDuplicate;
|
24143
|
-
|
24144
23913
|
// Initialize against the default document
|
24145
23914
|
setDocument();
|
24146
23915
|
|
24147
|
-
// Support:
|
23916
|
+
// Support: Android <=4.0 - 4.1+
|
24148
23917
|
// Detached nodes confoundingly follow *each other*
|
24149
23918
|
support.sortDetached = assert( function( el ) {
|
24150
23919
|
|
@@ -24152,68 +23921,29 @@ support.sortDetached = assert( function( el ) {
|
|
24152
23921
|
return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
|
24153
23922
|
} );
|
24154
23923
|
|
24155
|
-
|
24156
|
-
// Prevent attribute/property "interpolation"
|
24157
|
-
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
|
24158
|
-
if ( !assert( function( el ) {
|
24159
|
-
el.innerHTML = "<a href='#'></a>";
|
24160
|
-
return el.firstChild.getAttribute( "href" ) === "#";
|
24161
|
-
} ) ) {
|
24162
|
-
addHandle( "type|href|height|width", function( elem, name, isXML ) {
|
24163
|
-
if ( !isXML ) {
|
24164
|
-
return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
|
24165
|
-
}
|
24166
|
-
} );
|
24167
|
-
}
|
24168
|
-
|
24169
|
-
// Support: IE<9
|
24170
|
-
// Use defaultValue in place of getAttribute("value")
|
24171
|
-
if ( !support.attributes || !assert( function( el ) {
|
24172
|
-
el.innerHTML = "<input/>";
|
24173
|
-
el.firstChild.setAttribute( "value", "" );
|
24174
|
-
return el.firstChild.getAttribute( "value" ) === "";
|
24175
|
-
} ) ) {
|
24176
|
-
addHandle( "value", function( elem, _name, isXML ) {
|
24177
|
-
if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
|
24178
|
-
return elem.defaultValue;
|
24179
|
-
}
|
24180
|
-
} );
|
24181
|
-
}
|
24182
|
-
|
24183
|
-
// Support: IE<9
|
24184
|
-
// Use getAttributeNode to fetch booleans when getAttribute lies
|
24185
|
-
if ( !assert( function( el ) {
|
24186
|
-
return el.getAttribute( "disabled" ) == null;
|
24187
|
-
} ) ) {
|
24188
|
-
addHandle( booleans, function( elem, name, isXML ) {
|
24189
|
-
var val;
|
24190
|
-
if ( !isXML ) {
|
24191
|
-
return elem[ name ] === true ? name.toLowerCase() :
|
24192
|
-
( val = elem.getAttributeNode( name ) ) && val.specified ?
|
24193
|
-
val.value :
|
24194
|
-
null;
|
24195
|
-
}
|
24196
|
-
} );
|
24197
|
-
}
|
24198
|
-
|
24199
|
-
return Sizzle;
|
24200
|
-
|
24201
|
-
} )( window );
|
24202
|
-
|
24203
|
-
|
24204
|
-
|
24205
|
-
jQuery.find = Sizzle;
|
24206
|
-
jQuery.expr = Sizzle.selectors;
|
23924
|
+
jQuery.find = find;
|
24207
23925
|
|
24208
23926
|
// Deprecated
|
24209
23927
|
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
|
24210
|
-
jQuery.
|
24211
|
-
|
24212
|
-
|
24213
|
-
|
24214
|
-
|
23928
|
+
jQuery.unique = jQuery.uniqueSort;
|
23929
|
+
|
23930
|
+
// These have always been private, but they used to be documented as part of
|
23931
|
+
// Sizzle so let's maintain them for now for backwards compatibility purposes.
|
23932
|
+
find.compile = compile;
|
23933
|
+
find.select = select;
|
23934
|
+
find.setDocument = setDocument;
|
23935
|
+
find.tokenize = tokenize;
|
24215
23936
|
|
23937
|
+
find.escape = jQuery.escapeSelector;
|
23938
|
+
find.getText = jQuery.text;
|
23939
|
+
find.isXML = jQuery.isXMLDoc;
|
23940
|
+
find.selectors = jQuery.expr;
|
23941
|
+
find.support = jQuery.support;
|
23942
|
+
find.uniqueSort = jQuery.uniqueSort;
|
24216
23943
|
|
23944
|
+
/* eslint-enable */
|
23945
|
+
|
23946
|
+
} )();
|
24217
23947
|
|
24218
23948
|
|
24219
23949
|
var dir = function( elem, dir, until ) {
|
@@ -24247,13 +23977,6 @@ var siblings = function( n, elem ) {
|
|
24247
23977
|
|
24248
23978
|
var rneedsContext = jQuery.expr.match.needsContext;
|
24249
23979
|
|
24250
|
-
|
24251
|
-
|
24252
|
-
function nodeName( elem, name ) {
|
24253
|
-
|
24254
|
-
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
24255
|
-
|
24256
|
-
}
|
24257
23980
|
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
24258
23981
|
|
24259
23982
|
|
@@ -24352,8 +24075,8 @@ jQuery.fn.extend( {
|
|
24352
24075
|
var rootjQuery,
|
24353
24076
|
|
24354
24077
|
// A simple way to check for HTML strings
|
24355
|
-
// Prioritize #id over <tag> to avoid XSS via location.hash (
|
24356
|
-
// Strict HTML recognition (
|
24078
|
+
// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)
|
24079
|
+
// Strict HTML recognition (trac-11290: must start with <)
|
24357
24080
|
// Shortcut simple #id case for speed
|
24358
24081
|
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
|
24359
24082
|
|
@@ -24504,7 +24227,7 @@ jQuery.fn.extend( {
|
|
24504
24227
|
if ( cur.nodeType < 11 && ( targets ?
|
24505
24228
|
targets.index( cur ) > -1 :
|
24506
24229
|
|
24507
|
-
// Don't pass non-elements to
|
24230
|
+
// Don't pass non-elements to jQuery#find
|
24508
24231
|
cur.nodeType === 1 &&
|
24509
24232
|
jQuery.find.matchesSelector( cur, selectors ) ) ) {
|
24510
24233
|
|
@@ -25059,7 +24782,7 @@ jQuery.extend( {
|
|
25059
24782
|
|
25060
24783
|
if ( jQuery.Deferred.exceptionHook ) {
|
25061
24784
|
jQuery.Deferred.exceptionHook( e,
|
25062
|
-
process.
|
24785
|
+
process.error );
|
25063
24786
|
}
|
25064
24787
|
|
25065
24788
|
// Support: Promises/A+ section 2.3.3.3.4.1
|
@@ -25087,10 +24810,17 @@ jQuery.extend( {
|
|
25087
24810
|
process();
|
25088
24811
|
} else {
|
25089
24812
|
|
25090
|
-
// Call an optional hook to record the
|
24813
|
+
// Call an optional hook to record the error, in case of exception
|
25091
24814
|
// since it's otherwise lost when execution goes async
|
25092
|
-
if ( jQuery.Deferred.
|
25093
|
-
process.
|
24815
|
+
if ( jQuery.Deferred.getErrorHook ) {
|
24816
|
+
process.error = jQuery.Deferred.getErrorHook();
|
24817
|
+
|
24818
|
+
// The deprecated alias of the above. While the name suggests
|
24819
|
+
// returning the stack, not an error instance, jQuery just passes
|
24820
|
+
// it directly to `console.warn` so both will work; an instance
|
24821
|
+
// just better cooperates with source maps.
|
24822
|
+
} else if ( jQuery.Deferred.getStackHook ) {
|
24823
|
+
process.error = jQuery.Deferred.getStackHook();
|
25094
24824
|
}
|
25095
24825
|
window.setTimeout( process );
|
25096
24826
|
}
|
@@ -25265,12 +24995,16 @@ jQuery.extend( {
|
|
25265
24995
|
// warn about them ASAP rather than swallowing them by default.
|
25266
24996
|
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
|
25267
24997
|
|
25268
|
-
jQuery.Deferred.
|
24998
|
+
// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error
|
24999
|
+
// captured before the async barrier to get the original error cause
|
25000
|
+
// which may otherwise be hidden.
|
25001
|
+
jQuery.Deferred.exceptionHook = function( error, asyncError ) {
|
25269
25002
|
|
25270
25003
|
// Support: IE 8 - 9 only
|
25271
25004
|
// Console exists when dev tools are open, which can happen at any time
|
25272
25005
|
if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
|
25273
|
-
window.console.warn( "jQuery.Deferred exception: " + error.message,
|
25006
|
+
window.console.warn( "jQuery.Deferred exception: " + error.message,
|
25007
|
+
error.stack, asyncError );
|
25274
25008
|
}
|
25275
25009
|
};
|
25276
25010
|
|
@@ -25310,7 +25044,7 @@ jQuery.extend( {
|
|
25310
25044
|
isReady: false,
|
25311
25045
|
|
25312
25046
|
// A counter to track how many items to wait for before
|
25313
|
-
// the ready event fires. See
|
25047
|
+
// the ready event fires. See trac-6781
|
25314
25048
|
readyWait: 1,
|
25315
25049
|
|
25316
25050
|
// Handle when the DOM is ready
|
@@ -25438,7 +25172,7 @@ function fcamelCase( _all, letter ) {
|
|
25438
25172
|
|
25439
25173
|
// Convert dashed to camelCase; used by the css and data modules
|
25440
25174
|
// Support: IE <=9 - 11, Edge 12 - 15
|
25441
|
-
// Microsoft forgot to hump their vendor prefix (
|
25175
|
+
// Microsoft forgot to hump their vendor prefix (trac-9572)
|
25442
25176
|
function camelCase( string ) {
|
25443
25177
|
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
25444
25178
|
}
|
@@ -25474,7 +25208,7 @@ Data.prototype = {
|
|
25474
25208
|
value = {};
|
25475
25209
|
|
25476
25210
|
// We can accept data for non-element nodes in modern browsers,
|
25477
|
-
// but we should not, see
|
25211
|
+
// but we should not, see trac-8335.
|
25478
25212
|
// Always return an empty object.
|
25479
25213
|
if ( acceptData( owner ) ) {
|
25480
25214
|
|
@@ -25713,7 +25447,7 @@ jQuery.fn.extend( {
|
|
25713
25447
|
while ( i-- ) {
|
25714
25448
|
|
25715
25449
|
// Support: IE 11 only
|
25716
|
-
// The attrs elements can be null (
|
25450
|
+
// The attrs elements can be null (trac-14894)
|
25717
25451
|
if ( attrs[ i ] ) {
|
25718
25452
|
name = attrs[ i ].name;
|
25719
25453
|
if ( name.indexOf( "data-" ) === 0 ) {
|
@@ -26136,9 +25870,9 @@ var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
|
|
26136
25870
|
input = document.createElement( "input" );
|
26137
25871
|
|
26138
25872
|
// Support: Android 4.0 - 4.3 only
|
26139
|
-
// Check state lost if the name is set (
|
25873
|
+
// Check state lost if the name is set (trac-11217)
|
26140
25874
|
// Support: Windows Web Apps (WWA)
|
26141
|
-
// `name` and `type` must use .setAttribute for WWA (
|
25875
|
+
// `name` and `type` must use .setAttribute for WWA (trac-14901)
|
26142
25876
|
input.setAttribute( "type", "radio" );
|
26143
25877
|
input.setAttribute( "checked", "checked" );
|
26144
25878
|
input.setAttribute( "name", "t" );
|
@@ -26162,7 +25896,7 @@ var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
|
|
26162
25896
|
} )();
|
26163
25897
|
|
26164
25898
|
|
26165
|
-
// We have to close these tags to support XHTML (
|
25899
|
+
// We have to close these tags to support XHTML (trac-13200)
|
26166
25900
|
var wrapMap = {
|
26167
25901
|
|
26168
25902
|
// XHTML parsers do not magically insert elements in the
|
@@ -26188,7 +25922,7 @@ if ( !support.option ) {
|
|
26188
25922
|
function getAll( context, tag ) {
|
26189
25923
|
|
26190
25924
|
// Support: IE <=9 - 11 only
|
26191
|
-
// Use typeof to avoid zero-argument method invocation on host objects (
|
25925
|
+
// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)
|
26192
25926
|
var ret;
|
26193
25927
|
|
26194
25928
|
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
@@ -26271,7 +26005,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|
26271
26005
|
// Remember the top-level container
|
26272
26006
|
tmp = fragment.firstChild;
|
26273
26007
|
|
26274
|
-
// Ensure the created nodes are orphaned (
|
26008
|
+
// Ensure the created nodes are orphaned (trac-12392)
|
26275
26009
|
tmp.textContent = "";
|
26276
26010
|
}
|
26277
26011
|
}
|
@@ -26326,25 +26060,6 @@ function returnFalse() {
|
|
26326
26060
|
return false;
|
26327
26061
|
}
|
26328
26062
|
|
26329
|
-
// Support: IE <=9 - 11+
|
26330
|
-
// focus() and blur() are asynchronous, except when they are no-op.
|
26331
|
-
// So expect focus to be synchronous when the element is already active,
|
26332
|
-
// and blur to be synchronous when the element is not already active.
|
26333
|
-
// (focus and blur are always synchronous in other supported browsers,
|
26334
|
-
// this just defines when we can count on it).
|
26335
|
-
function expectSync( elem, type ) {
|
26336
|
-
return ( elem === safeActiveElement() ) === ( type === "focus" );
|
26337
|
-
}
|
26338
|
-
|
26339
|
-
// Support: IE <=9 only
|
26340
|
-
// Accessing document.activeElement can throw unexpectedly
|
26341
|
-
// https://bugs.jquery.com/ticket/13393
|
26342
|
-
function safeActiveElement() {
|
26343
|
-
try {
|
26344
|
-
return document.activeElement;
|
26345
|
-
} catch ( err ) { }
|
26346
|
-
}
|
26347
|
-
|
26348
26063
|
function on( elem, types, selector, data, fn, one ) {
|
26349
26064
|
var origFn, type;
|
26350
26065
|
|
@@ -26692,15 +26407,15 @@ jQuery.event = {
|
|
26692
26407
|
|
26693
26408
|
for ( ; cur !== this; cur = cur.parentNode || this ) {
|
26694
26409
|
|
26695
|
-
// Don't check non-elements (
|
26696
|
-
// Don't process clicks on disabled elements (
|
26410
|
+
// Don't check non-elements (trac-13208)
|
26411
|
+
// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)
|
26697
26412
|
if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
|
26698
26413
|
matchedHandlers = [];
|
26699
26414
|
matchedSelectors = {};
|
26700
26415
|
for ( i = 0; i < delegateCount; i++ ) {
|
26701
26416
|
handleObj = handlers[ i ];
|
26702
26417
|
|
26703
|
-
// Don't conflict with Object.prototype properties (
|
26418
|
+
// Don't conflict with Object.prototype properties (trac-13203)
|
26704
26419
|
sel = handleObj.selector + " ";
|
26705
26420
|
|
26706
26421
|
if ( matchedSelectors[ sel ] === undefined ) {
|
@@ -26782,7 +26497,7 @@ jQuery.event = {
|
|
26782
26497
|
el.click && nodeName( el, "input" ) ) {
|
26783
26498
|
|
26784
26499
|
// dataPriv.set( el, "click", ... )
|
26785
|
-
leverageNative( el, "click",
|
26500
|
+
leverageNative( el, "click", true );
|
26786
26501
|
}
|
26787
26502
|
|
26788
26503
|
// Return false to allow normal processing in the caller
|
@@ -26833,10 +26548,10 @@ jQuery.event = {
|
|
26833
26548
|
// synthetic events by interrupting progress until reinvoked in response to
|
26834
26549
|
// *native* events that it fires directly, ensuring that state changes have
|
26835
26550
|
// already occurred before other listeners are invoked.
|
26836
|
-
function leverageNative( el, type,
|
26551
|
+
function leverageNative( el, type, isSetup ) {
|
26837
26552
|
|
26838
|
-
// Missing
|
26839
|
-
if ( !
|
26553
|
+
// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add
|
26554
|
+
if ( !isSetup ) {
|
26840
26555
|
if ( dataPriv.get( el, type ) === undefined ) {
|
26841
26556
|
jQuery.event.add( el, type, returnTrue );
|
26842
26557
|
}
|
@@ -26848,15 +26563,13 @@ function leverageNative( el, type, expectSync ) {
|
|
26848
26563
|
jQuery.event.add( el, type, {
|
26849
26564
|
namespace: false,
|
26850
26565
|
handler: function( event ) {
|
26851
|
-
var
|
26566
|
+
var result,
|
26852
26567
|
saved = dataPriv.get( this, type );
|
26853
26568
|
|
26854
26569
|
if ( ( event.isTrigger & 1 ) && this[ type ] ) {
|
26855
26570
|
|
26856
26571
|
// Interrupt processing of the outer synthetic .trigger()ed event
|
26857
|
-
|
26858
|
-
// from an async native handler (gh-4350)
|
26859
|
-
if ( !saved.length ) {
|
26572
|
+
if ( !saved ) {
|
26860
26573
|
|
26861
26574
|
// Store arguments for use when handling the inner native event
|
26862
26575
|
// There will always be at least one argument (an event object), so this array
|
@@ -26865,33 +26578,22 @@ function leverageNative( el, type, expectSync ) {
|
|
26865
26578
|
dataPriv.set( this, type, saved );
|
26866
26579
|
|
26867
26580
|
// Trigger the native event and capture its result
|
26868
|
-
// Support: IE <=9 - 11+
|
26869
|
-
// focus() and blur() are asynchronous
|
26870
|
-
notAsync = expectSync( this, type );
|
26871
26581
|
this[ type ]();
|
26872
26582
|
result = dataPriv.get( this, type );
|
26873
|
-
|
26874
|
-
|
26875
|
-
} else {
|
26876
|
-
result = {};
|
26877
|
-
}
|
26583
|
+
dataPriv.set( this, type, false );
|
26584
|
+
|
26878
26585
|
if ( saved !== result ) {
|
26879
26586
|
|
26880
26587
|
// Cancel the outer synthetic event
|
26881
26588
|
event.stopImmediatePropagation();
|
26882
26589
|
event.preventDefault();
|
26883
26590
|
|
26884
|
-
|
26885
|
-
// In Chrome, if an element having a focusout handler is blurred by
|
26886
|
-
// clicking outside of it, it invokes the handler synchronously. If
|
26887
|
-
// that handler calls `.remove()` on the element, the data is cleared,
|
26888
|
-
// leaving `result` undefined. We need to guard against this.
|
26889
|
-
return result && result.value;
|
26591
|
+
return result;
|
26890
26592
|
}
|
26891
26593
|
|
26892
26594
|
// If this is an inner synthetic event for an event with a bubbling surrogate
|
26893
|
-
// (focus or blur), assume that the surrogate already propagated from triggering
|
26894
|
-
// native event and prevent that from happening again here.
|
26595
|
+
// (focus or blur), assume that the surrogate already propagated from triggering
|
26596
|
+
// the native event and prevent that from happening again here.
|
26895
26597
|
// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
|
26896
26598
|
// bubbling surrogate propagates *after* the non-bubbling base), but that seems
|
26897
26599
|
// less bad than duplication.
|
@@ -26901,22 +26603,25 @@ function leverageNative( el, type, expectSync ) {
|
|
26901
26603
|
|
26902
26604
|
// If this is a native event triggered above, everything is now in order
|
26903
26605
|
// Fire an inner synthetic event with the original arguments
|
26904
|
-
} else if ( saved
|
26606
|
+
} else if ( saved ) {
|
26905
26607
|
|
26906
26608
|
// ...and capture the result
|
26907
|
-
dataPriv.set( this, type,
|
26908
|
-
|
26909
|
-
|
26910
|
-
|
26911
|
-
|
26912
|
-
|
26913
|
-
|
26914
|
-
|
26915
|
-
|
26916
|
-
|
26917
|
-
|
26918
|
-
//
|
26919
|
-
|
26609
|
+
dataPriv.set( this, type, jQuery.event.trigger(
|
26610
|
+
saved[ 0 ],
|
26611
|
+
saved.slice( 1 ),
|
26612
|
+
this
|
26613
|
+
) );
|
26614
|
+
|
26615
|
+
// Abort handling of the native event by all jQuery handlers while allowing
|
26616
|
+
// native handlers on the same element to run. On target, this is achieved
|
26617
|
+
// by stopping immediate propagation just on the jQuery event. However,
|
26618
|
+
// the native event is re-wrapped by a jQuery one on each level of the
|
26619
|
+
// propagation so the only way to stop it for jQuery is to stop it for
|
26620
|
+
// everyone via native `stopPropagation()`. This is not a problem for
|
26621
|
+
// focus/blur which don't bubble, but it does also stop click on checkboxes
|
26622
|
+
// and radios. We accept this limitation.
|
26623
|
+
event.stopPropagation();
|
26624
|
+
event.isImmediatePropagationStopped = returnTrue;
|
26920
26625
|
}
|
26921
26626
|
}
|
26922
26627
|
} );
|
@@ -26954,7 +26659,7 @@ jQuery.Event = function( src, props ) {
|
|
26954
26659
|
|
26955
26660
|
// Create target properties
|
26956
26661
|
// Support: Safari <=6 - 7 only
|
26957
|
-
// Target should not be a text node (
|
26662
|
+
// Target should not be a text node (trac-504, trac-13143)
|
26958
26663
|
this.target = ( src.target && src.target.nodeType === 3 ) ?
|
26959
26664
|
src.target.parentNode :
|
26960
26665
|
src.target;
|
@@ -27055,18 +26760,73 @@ jQuery.each( {
|
|
27055
26760
|
}, jQuery.event.addProp );
|
27056
26761
|
|
27057
26762
|
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
|
26763
|
+
|
26764
|
+
function focusMappedHandler( nativeEvent ) {
|
26765
|
+
if ( document.documentMode ) {
|
26766
|
+
|
26767
|
+
// Support: IE 11+
|
26768
|
+
// Attach a single focusin/focusout handler on the document while someone wants
|
26769
|
+
// focus/blur. This is because the former are synchronous in IE while the latter
|
26770
|
+
// are async. In other browsers, all those handlers are invoked synchronously.
|
26771
|
+
|
26772
|
+
// `handle` from private data would already wrap the event, but we need
|
26773
|
+
// to change the `type` here.
|
26774
|
+
var handle = dataPriv.get( this, "handle" ),
|
26775
|
+
event = jQuery.event.fix( nativeEvent );
|
26776
|
+
event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
|
26777
|
+
event.isSimulated = true;
|
26778
|
+
|
26779
|
+
// First, handle focusin/focusout
|
26780
|
+
handle( nativeEvent );
|
26781
|
+
|
26782
|
+
// ...then, handle focus/blur
|
26783
|
+
//
|
26784
|
+
// focus/blur don't bubble while focusin/focusout do; simulate the former by only
|
26785
|
+
// invoking the handler at the lower level.
|
26786
|
+
if ( event.target === event.currentTarget ) {
|
26787
|
+
|
26788
|
+
// The setup part calls `leverageNative`, which, in turn, calls
|
26789
|
+
// `jQuery.event.add`, so event handle will already have been set
|
26790
|
+
// by this point.
|
26791
|
+
handle( event );
|
26792
|
+
}
|
26793
|
+
} else {
|
26794
|
+
|
26795
|
+
// For non-IE browsers, attach a single capturing handler on the document
|
26796
|
+
// while someone wants focusin/focusout.
|
26797
|
+
jQuery.event.simulate( delegateType, nativeEvent.target,
|
26798
|
+
jQuery.event.fix( nativeEvent ) );
|
26799
|
+
}
|
26800
|
+
}
|
26801
|
+
|
27058
26802
|
jQuery.event.special[ type ] = {
|
27059
26803
|
|
27060
26804
|
// Utilize native event if possible so blur/focus sequence is correct
|
27061
26805
|
setup: function() {
|
27062
26806
|
|
26807
|
+
var attaches;
|
26808
|
+
|
27063
26809
|
// Claim the first handler
|
27064
26810
|
// dataPriv.set( this, "focus", ... )
|
27065
26811
|
// dataPriv.set( this, "blur", ... )
|
27066
|
-
leverageNative( this, type,
|
26812
|
+
leverageNative( this, type, true );
|
27067
26813
|
|
27068
|
-
|
27069
|
-
|
26814
|
+
if ( document.documentMode ) {
|
26815
|
+
|
26816
|
+
// Support: IE 9 - 11+
|
26817
|
+
// We use the same native handler for focusin & focus (and focusout & blur)
|
26818
|
+
// so we need to coordinate setup & teardown parts between those events.
|
26819
|
+
// Use `delegateType` as the key as `type` is already used by `leverageNative`.
|
26820
|
+
attaches = dataPriv.get( this, delegateType );
|
26821
|
+
if ( !attaches ) {
|
26822
|
+
this.addEventListener( delegateType, focusMappedHandler );
|
26823
|
+
}
|
26824
|
+
dataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );
|
26825
|
+
} else {
|
26826
|
+
|
26827
|
+
// Return false to allow normal processing in the caller
|
26828
|
+
return false;
|
26829
|
+
}
|
27070
26830
|
},
|
27071
26831
|
trigger: function() {
|
27072
26832
|
|
@@ -27077,14 +26837,84 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
|
|
27077
26837
|
return true;
|
27078
26838
|
},
|
27079
26839
|
|
27080
|
-
|
27081
|
-
|
27082
|
-
|
27083
|
-
|
26840
|
+
teardown: function() {
|
26841
|
+
var attaches;
|
26842
|
+
|
26843
|
+
if ( document.documentMode ) {
|
26844
|
+
attaches = dataPriv.get( this, delegateType ) - 1;
|
26845
|
+
if ( !attaches ) {
|
26846
|
+
this.removeEventListener( delegateType, focusMappedHandler );
|
26847
|
+
dataPriv.remove( this, delegateType );
|
26848
|
+
} else {
|
26849
|
+
dataPriv.set( this, delegateType, attaches );
|
26850
|
+
}
|
26851
|
+
} else {
|
26852
|
+
|
26853
|
+
// Return false to indicate standard teardown should be applied
|
26854
|
+
return false;
|
26855
|
+
}
|
26856
|
+
},
|
26857
|
+
|
26858
|
+
// Suppress native focus or blur if we're currently inside
|
26859
|
+
// a leveraged native-event stack
|
26860
|
+
_default: function( event ) {
|
26861
|
+
return dataPriv.get( event.target, type );
|
27084
26862
|
},
|
27085
26863
|
|
27086
26864
|
delegateType: delegateType
|
27087
26865
|
};
|
26866
|
+
|
26867
|
+
// Support: Firefox <=44
|
26868
|
+
// Firefox doesn't have focus(in | out) events
|
26869
|
+
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
|
26870
|
+
//
|
26871
|
+
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
|
26872
|
+
// focus(in | out) events fire after focus & blur events,
|
26873
|
+
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
|
26874
|
+
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
|
26875
|
+
//
|
26876
|
+
// Support: IE 9 - 11+
|
26877
|
+
// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,
|
26878
|
+
// attach a single handler for both events in IE.
|
26879
|
+
jQuery.event.special[ delegateType ] = {
|
26880
|
+
setup: function() {
|
26881
|
+
|
26882
|
+
// Handle: regular nodes (via `this.ownerDocument`), window
|
26883
|
+
// (via `this.document`) & document (via `this`).
|
26884
|
+
var doc = this.ownerDocument || this.document || this,
|
26885
|
+
dataHolder = document.documentMode ? this : doc,
|
26886
|
+
attaches = dataPriv.get( dataHolder, delegateType );
|
26887
|
+
|
26888
|
+
// Support: IE 9 - 11+
|
26889
|
+
// We use the same native handler for focusin & focus (and focusout & blur)
|
26890
|
+
// so we need to coordinate setup & teardown parts between those events.
|
26891
|
+
// Use `delegateType` as the key as `type` is already used by `leverageNative`.
|
26892
|
+
if ( !attaches ) {
|
26893
|
+
if ( document.documentMode ) {
|
26894
|
+
this.addEventListener( delegateType, focusMappedHandler );
|
26895
|
+
} else {
|
26896
|
+
doc.addEventListener( type, focusMappedHandler, true );
|
26897
|
+
}
|
26898
|
+
}
|
26899
|
+
dataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );
|
26900
|
+
},
|
26901
|
+
teardown: function() {
|
26902
|
+
var doc = this.ownerDocument || this.document || this,
|
26903
|
+
dataHolder = document.documentMode ? this : doc,
|
26904
|
+
attaches = dataPriv.get( dataHolder, delegateType ) - 1;
|
26905
|
+
|
26906
|
+
if ( !attaches ) {
|
26907
|
+
if ( document.documentMode ) {
|
26908
|
+
this.removeEventListener( delegateType, focusMappedHandler );
|
26909
|
+
} else {
|
26910
|
+
doc.removeEventListener( type, focusMappedHandler, true );
|
26911
|
+
}
|
26912
|
+
dataPriv.remove( dataHolder, delegateType );
|
26913
|
+
} else {
|
26914
|
+
dataPriv.set( dataHolder, delegateType, attaches );
|
26915
|
+
}
|
26916
|
+
}
|
26917
|
+
};
|
27088
26918
|
} );
|
27089
26919
|
|
27090
26920
|
// Create mouseenter/leave events using mouseover/out and event-time checks
|
@@ -27179,7 +27009,8 @@ var
|
|
27179
27009
|
|
27180
27010
|
// checked="checked" or checked
|
27181
27011
|
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
27182
|
-
|
27012
|
+
|
27013
|
+
rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g;
|
27183
27014
|
|
27184
27015
|
// Prefer a tbody over its parent table for containing new rows
|
27185
27016
|
function manipulationTarget( elem, content ) {
|
@@ -27293,7 +27124,7 @@ function domManip( collection, args, callback, ignored ) {
|
|
27293
27124
|
|
27294
27125
|
// Use the original fragment for the last item
|
27295
27126
|
// instead of the first because it can end up
|
27296
|
-
// being emptied incorrectly in certain situations (
|
27127
|
+
// being emptied incorrectly in certain situations (trac-8070).
|
27297
27128
|
for ( ; i < l; i++ ) {
|
27298
27129
|
node = fragment;
|
27299
27130
|
|
@@ -27315,7 +27146,7 @@ function domManip( collection, args, callback, ignored ) {
|
|
27315
27146
|
if ( hasScripts ) {
|
27316
27147
|
doc = scripts[ scripts.length - 1 ].ownerDocument;
|
27317
27148
|
|
27318
|
-
//
|
27149
|
+
// Re-enable scripts
|
27319
27150
|
jQuery.map( scripts, restoreScript );
|
27320
27151
|
|
27321
27152
|
// Evaluate executable scripts on first document insertion
|
@@ -27334,6 +27165,12 @@ function domManip( collection, args, callback, ignored ) {
|
|
27334
27165
|
}, doc );
|
27335
27166
|
}
|
27336
27167
|
} else {
|
27168
|
+
|
27169
|
+
// Unwrap a CDATA section containing script contents. This shouldn't be
|
27170
|
+
// needed as in XML documents they're already not visible when
|
27171
|
+
// inspecting element contents and in HTML documents they have no
|
27172
|
+
// meaning but we're preserving that logic for backwards compatibility.
|
27173
|
+
// This will be removed completely in 4.0. See gh-4904.
|
27337
27174
|
DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
|
27338
27175
|
}
|
27339
27176
|
}
|
@@ -27380,7 +27217,8 @@ jQuery.extend( {
|
|
27380
27217
|
if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
|
27381
27218
|
!jQuery.isXMLDoc( elem ) ) {
|
27382
27219
|
|
27383
|
-
// We eschew
|
27220
|
+
// We eschew jQuery#find here for performance reasons:
|
27221
|
+
// https://jsperf.com/getall-vs-sizzle/2
|
27384
27222
|
destElements = getAll( clone );
|
27385
27223
|
srcElements = getAll( elem );
|
27386
27224
|
|
@@ -27616,9 +27454,12 @@ jQuery.each( {
|
|
27616
27454
|
} );
|
27617
27455
|
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
|
27618
27456
|
|
27457
|
+
var rcustomProp = /^--/;
|
27458
|
+
|
27459
|
+
|
27619
27460
|
var getStyles = function( elem ) {
|
27620
27461
|
|
27621
|
-
// Support: IE <=11 only, Firefox <=30 (
|
27462
|
+
// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)
|
27622
27463
|
// IE throws on elements created in popups
|
27623
27464
|
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
|
27624
27465
|
var view = elem.ownerDocument.defaultView;
|
@@ -27718,7 +27559,7 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|
27718
27559
|
}
|
27719
27560
|
|
27720
27561
|
// Support: IE <=9 - 11 only
|
27721
|
-
// Style of cloned element affects source element cloned (
|
27562
|
+
// Style of cloned element affects source element cloned (trac-8908)
|
27722
27563
|
div.style.backgroundClip = "content-box";
|
27723
27564
|
div.cloneNode( true ).style.backgroundClip = "";
|
27724
27565
|
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
@@ -27762,7 +27603,7 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|
27762
27603
|
trChild = document.createElement( "div" );
|
27763
27604
|
|
27764
27605
|
table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
|
27765
|
-
tr.style.cssText = "border:1px solid";
|
27606
|
+
tr.style.cssText = "box-sizing:content-box;border:1px solid";
|
27766
27607
|
|
27767
27608
|
// Support: Chrome 86+
|
27768
27609
|
// Height set through cssText does not get applied.
|
@@ -27774,7 +27615,7 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|
27774
27615
|
// In our bodyBackground.html iframe,
|
27775
27616
|
// display for all div elements is set to "inline",
|
27776
27617
|
// which causes a problem only in Android 8 Chrome 86.
|
27777
|
-
// Ensuring the div is display: block
|
27618
|
+
// Ensuring the div is `display: block`
|
27778
27619
|
// gets around this issue.
|
27779
27620
|
trChild.style.display = "block";
|
27780
27621
|
|
@@ -27798,6 +27639,7 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|
27798
27639
|
|
27799
27640
|
function curCSS( elem, name, computed ) {
|
27800
27641
|
var width, minWidth, maxWidth, ret,
|
27642
|
+
isCustomProp = rcustomProp.test( name ),
|
27801
27643
|
|
27802
27644
|
// Support: Firefox 51+
|
27803
27645
|
// Retrieving style before computed somehow
|
@@ -27808,11 +27650,42 @@ function curCSS( elem, name, computed ) {
|
|
27808
27650
|
computed = computed || getStyles( elem );
|
27809
27651
|
|
27810
27652
|
// getPropertyValue is needed for:
|
27811
|
-
// .css('filter') (IE 9 only,
|
27812
|
-
// .css('--customProperty) (
|
27653
|
+
// .css('filter') (IE 9 only, trac-12537)
|
27654
|
+
// .css('--customProperty) (gh-3144)
|
27813
27655
|
if ( computed ) {
|
27656
|
+
|
27657
|
+
// Support: IE <=9 - 11+
|
27658
|
+
// IE only supports `"float"` in `getPropertyValue`; in computed styles
|
27659
|
+
// it's only available as `"cssFloat"`. We no longer modify properties
|
27660
|
+
// sent to `.css()` apart from camelCasing, so we need to check both.
|
27661
|
+
// Normally, this would create difference in behavior: if
|
27662
|
+
// `getPropertyValue` returns an empty string, the value returned
|
27663
|
+
// by `.css()` would be `undefined`. This is usually the case for
|
27664
|
+
// disconnected elements. However, in IE even disconnected elements
|
27665
|
+
// with no styles return `"none"` for `getPropertyValue( "float" )`
|
27814
27666
|
ret = computed.getPropertyValue( name ) || computed[ name ];
|
27815
27667
|
|
27668
|
+
if ( isCustomProp && ret ) {
|
27669
|
+
|
27670
|
+
// Support: Firefox 105+, Chrome <=105+
|
27671
|
+
// Spec requires trimming whitespace for custom properties (gh-4926).
|
27672
|
+
// Firefox only trims leading whitespace. Chrome just collapses
|
27673
|
+
// both leading & trailing whitespace to a single space.
|
27674
|
+
//
|
27675
|
+
// Fall back to `undefined` if empty string returned.
|
27676
|
+
// This collapses a missing definition with property defined
|
27677
|
+
// and set to an empty string but there's no standard API
|
27678
|
+
// allowing us to differentiate them without a performance penalty
|
27679
|
+
// and returning `undefined` aligns with older jQuery.
|
27680
|
+
//
|
27681
|
+
// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED
|
27682
|
+
// as whitespace while CSS does not, but this is not a problem
|
27683
|
+
// because CSS preprocessing replaces them with U+000A LINE FEED
|
27684
|
+
// (which *is* CSS whitespace)
|
27685
|
+
// https://www.w3.org/TR/css-syntax-3/#input-preprocessing
|
27686
|
+
ret = ret.replace( rtrimCSS, "$1" ) || undefined;
|
27687
|
+
}
|
27688
|
+
|
27816
27689
|
if ( ret === "" && !isAttached( elem ) ) {
|
27817
27690
|
ret = jQuery.style( elem, name );
|
27818
27691
|
}
|
@@ -27908,7 +27781,6 @@ var
|
|
27908
27781
|
// except "table", "table-cell", or "table-caption"
|
27909
27782
|
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
27910
27783
|
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
27911
|
-
rcustomProp = /^--/,
|
27912
27784
|
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
27913
27785
|
cssNormalTransform = {
|
27914
27786
|
letterSpacing: "0",
|
@@ -27930,7 +27802,8 @@ function setPositiveNumber( _elem, value, subtract ) {
|
|
27930
27802
|
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
|
27931
27803
|
var i = dimension === "width" ? 1 : 0,
|
27932
27804
|
extra = 0,
|
27933
|
-
delta = 0
|
27805
|
+
delta = 0,
|
27806
|
+
marginDelta = 0;
|
27934
27807
|
|
27935
27808
|
// Adjustment may not be necessary
|
27936
27809
|
if ( box === ( isBorderBox ? "border" : "content" ) ) {
|
@@ -27940,8 +27813,10 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed
|
|
27940
27813
|
for ( ; i < 4; i += 2 ) {
|
27941
27814
|
|
27942
27815
|
// Both box models exclude margin
|
27816
|
+
// Count margin delta separately to only add it after scroll gutter adjustment.
|
27817
|
+
// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).
|
27943
27818
|
if ( box === "margin" ) {
|
27944
|
-
|
27819
|
+
marginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
|
27945
27820
|
}
|
27946
27821
|
|
27947
27822
|
// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
|
@@ -27992,7 +27867,7 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed
|
|
27992
27867
|
) ) || 0;
|
27993
27868
|
}
|
27994
27869
|
|
27995
|
-
return delta;
|
27870
|
+
return delta + marginDelta;
|
27996
27871
|
}
|
27997
27872
|
|
27998
27873
|
function getWidthOrHeight( elem, dimension, extra ) {
|
@@ -28090,26 +27965,35 @@ jQuery.extend( {
|
|
28090
27965
|
|
28091
27966
|
// Don't automatically add "px" to these possibly-unitless properties
|
28092
27967
|
cssNumber: {
|
28093
|
-
|
28094
|
-
|
28095
|
-
|
28096
|
-
|
28097
|
-
|
28098
|
-
|
28099
|
-
|
28100
|
-
|
28101
|
-
|
28102
|
-
|
28103
|
-
|
28104
|
-
|
28105
|
-
|
28106
|
-
|
28107
|
-
|
28108
|
-
|
28109
|
-
|
28110
|
-
|
28111
|
-
|
28112
|
-
|
27968
|
+
animationIterationCount: true,
|
27969
|
+
aspectRatio: true,
|
27970
|
+
borderImageSlice: true,
|
27971
|
+
columnCount: true,
|
27972
|
+
flexGrow: true,
|
27973
|
+
flexShrink: true,
|
27974
|
+
fontWeight: true,
|
27975
|
+
gridArea: true,
|
27976
|
+
gridColumn: true,
|
27977
|
+
gridColumnEnd: true,
|
27978
|
+
gridColumnStart: true,
|
27979
|
+
gridRow: true,
|
27980
|
+
gridRowEnd: true,
|
27981
|
+
gridRowStart: true,
|
27982
|
+
lineHeight: true,
|
27983
|
+
opacity: true,
|
27984
|
+
order: true,
|
27985
|
+
orphans: true,
|
27986
|
+
scale: true,
|
27987
|
+
widows: true,
|
27988
|
+
zIndex: true,
|
27989
|
+
zoom: true,
|
27990
|
+
|
27991
|
+
// SVG-related
|
27992
|
+
fillOpacity: true,
|
27993
|
+
floodOpacity: true,
|
27994
|
+
stopOpacity: true,
|
27995
|
+
strokeMiterlimit: true,
|
27996
|
+
strokeOpacity: true
|
28113
27997
|
},
|
28114
27998
|
|
28115
27999
|
// Add in properties whose names you wish to fix before
|
@@ -28144,15 +28028,15 @@ jQuery.extend( {
|
|
28144
28028
|
if ( value !== undefined ) {
|
28145
28029
|
type = typeof value;
|
28146
28030
|
|
28147
|
-
// Convert "+=" or "-=" to relative numbers (
|
28031
|
+
// Convert "+=" or "-=" to relative numbers (trac-7345)
|
28148
28032
|
if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
|
28149
28033
|
value = adjustCSS( elem, name, ret );
|
28150
28034
|
|
28151
|
-
// Fixes bug
|
28035
|
+
// Fixes bug trac-9237
|
28152
28036
|
type = "number";
|
28153
28037
|
}
|
28154
28038
|
|
28155
|
-
// Make sure that null and NaN values aren't set (
|
28039
|
+
// Make sure that null and NaN values aren't set (trac-7116)
|
28156
28040
|
if ( value == null || value !== value ) {
|
28157
28041
|
return;
|
28158
28042
|
}
|
@@ -28776,7 +28660,7 @@ function Animation( elem, properties, options ) {
|
|
28776
28660
|
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
|
28777
28661
|
|
28778
28662
|
// Support: Android 2.3 only
|
28779
|
-
// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (
|
28663
|
+
// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)
|
28780
28664
|
temp = remaining / animation.duration || 0,
|
28781
28665
|
percent = 1 - temp,
|
28782
28666
|
index = 0,
|
@@ -29166,7 +29050,6 @@ jQuery.fx.speeds = {
|
|
29166
29050
|
|
29167
29051
|
|
29168
29052
|
// Based off of the plugin by Clint Helfers, with permission.
|
29169
|
-
// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
|
29170
29053
|
jQuery.fn.delay = function( time, type ) {
|
29171
29054
|
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
29172
29055
|
type = type || "fx";
|
@@ -29391,8 +29274,7 @@ jQuery.extend( {
|
|
29391
29274
|
// Support: IE <=9 - 11 only
|
29392
29275
|
// elem.tabIndex doesn't always return the
|
29393
29276
|
// correct value when it hasn't been explicitly set
|
29394
|
-
//
|
29395
|
-
// Use proper attribute retrieval(#12072)
|
29277
|
+
// Use proper attribute retrieval (trac-12072)
|
29396
29278
|
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
29397
29279
|
|
29398
29280
|
if ( tabindex ) {
|
@@ -29496,8 +29378,7 @@ function classesToArray( value ) {
|
|
29496
29378
|
|
29497
29379
|
jQuery.fn.extend( {
|
29498
29380
|
addClass: function( value ) {
|
29499
|
-
var
|
29500
|
-
i = 0;
|
29381
|
+
var classNames, cur, curValue, className, i, finalValue;
|
29501
29382
|
|
29502
29383
|
if ( isFunction( value ) ) {
|
29503
29384
|
return this.each( function( j ) {
|
@@ -29505,36 +29386,35 @@ jQuery.fn.extend( {
|
|
29505
29386
|
} );
|
29506
29387
|
}
|
29507
29388
|
|
29508
|
-
|
29389
|
+
classNames = classesToArray( value );
|
29509
29390
|
|
29510
|
-
if (
|
29511
|
-
|
29512
|
-
curValue = getClass(
|
29513
|
-
cur =
|
29391
|
+
if ( classNames.length ) {
|
29392
|
+
return this.each( function() {
|
29393
|
+
curValue = getClass( this );
|
29394
|
+
cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
29514
29395
|
|
29515
29396
|
if ( cur ) {
|
29516
|
-
|
29517
|
-
|
29518
|
-
if ( cur.indexOf( " " +
|
29519
|
-
cur +=
|
29397
|
+
for ( i = 0; i < classNames.length; i++ ) {
|
29398
|
+
className = classNames[ i ];
|
29399
|
+
if ( cur.indexOf( " " + className + " " ) < 0 ) {
|
29400
|
+
cur += className + " ";
|
29520
29401
|
}
|
29521
29402
|
}
|
29522
29403
|
|
29523
29404
|
// Only assign if different to avoid unneeded rendering.
|
29524
29405
|
finalValue = stripAndCollapse( cur );
|
29525
29406
|
if ( curValue !== finalValue ) {
|
29526
|
-
|
29407
|
+
this.setAttribute( "class", finalValue );
|
29527
29408
|
}
|
29528
29409
|
}
|
29529
|
-
}
|
29410
|
+
} );
|
29530
29411
|
}
|
29531
29412
|
|
29532
29413
|
return this;
|
29533
29414
|
},
|
29534
29415
|
|
29535
29416
|
removeClass: function( value ) {
|
29536
|
-
var
|
29537
|
-
i = 0;
|
29417
|
+
var classNames, cur, curValue, className, i, finalValue;
|
29538
29418
|
|
29539
29419
|
if ( isFunction( value ) ) {
|
29540
29420
|
return this.each( function( j ) {
|
@@ -29546,45 +29426,42 @@ jQuery.fn.extend( {
|
|
29546
29426
|
return this.attr( "class", "" );
|
29547
29427
|
}
|
29548
29428
|
|
29549
|
-
|
29429
|
+
classNames = classesToArray( value );
|
29550
29430
|
|
29551
|
-
if (
|
29552
|
-
|
29553
|
-
curValue = getClass(
|
29431
|
+
if ( classNames.length ) {
|
29432
|
+
return this.each( function() {
|
29433
|
+
curValue = getClass( this );
|
29554
29434
|
|
29555
29435
|
// This expression is here for better compressibility (see addClass)
|
29556
|
-
cur =
|
29436
|
+
cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
29557
29437
|
|
29558
29438
|
if ( cur ) {
|
29559
|
-
|
29560
|
-
|
29439
|
+
for ( i = 0; i < classNames.length; i++ ) {
|
29440
|
+
className = classNames[ i ];
|
29561
29441
|
|
29562
29442
|
// Remove *all* instances
|
29563
|
-
while ( cur.indexOf( " " +
|
29564
|
-
cur = cur.replace( " " +
|
29443
|
+
while ( cur.indexOf( " " + className + " " ) > -1 ) {
|
29444
|
+
cur = cur.replace( " " + className + " ", " " );
|
29565
29445
|
}
|
29566
29446
|
}
|
29567
29447
|
|
29568
29448
|
// Only assign if different to avoid unneeded rendering.
|
29569
29449
|
finalValue = stripAndCollapse( cur );
|
29570
29450
|
if ( curValue !== finalValue ) {
|
29571
|
-
|
29451
|
+
this.setAttribute( "class", finalValue );
|
29572
29452
|
}
|
29573
29453
|
}
|
29574
|
-
}
|
29454
|
+
} );
|
29575
29455
|
}
|
29576
29456
|
|
29577
29457
|
return this;
|
29578
29458
|
},
|
29579
29459
|
|
29580
29460
|
toggleClass: function( value, stateVal ) {
|
29581
|
-
var
|
29461
|
+
var classNames, className, i, self,
|
29462
|
+
type = typeof value,
|
29582
29463
|
isValidValue = type === "string" || Array.isArray( value );
|
29583
29464
|
|
29584
|
-
if ( typeof stateVal === "boolean" && isValidValue ) {
|
29585
|
-
return stateVal ? this.addClass( value ) : this.removeClass( value );
|
29586
|
-
}
|
29587
|
-
|
29588
29465
|
if ( isFunction( value ) ) {
|
29589
29466
|
return this.each( function( i ) {
|
29590
29467
|
jQuery( this ).toggleClass(
|
@@ -29594,17 +29471,20 @@ jQuery.fn.extend( {
|
|
29594
29471
|
} );
|
29595
29472
|
}
|
29596
29473
|
|
29597
|
-
|
29598
|
-
|
29474
|
+
if ( typeof stateVal === "boolean" && isValidValue ) {
|
29475
|
+
return stateVal ? this.addClass( value ) : this.removeClass( value );
|
29476
|
+
}
|
29477
|
+
|
29478
|
+
classNames = classesToArray( value );
|
29599
29479
|
|
29480
|
+
return this.each( function() {
|
29600
29481
|
if ( isValidValue ) {
|
29601
29482
|
|
29602
29483
|
// Toggle individual class names
|
29603
|
-
i = 0;
|
29604
29484
|
self = jQuery( this );
|
29605
|
-
classNames = classesToArray( value );
|
29606
29485
|
|
29607
|
-
|
29486
|
+
for ( i = 0; i < classNames.length; i++ ) {
|
29487
|
+
className = classNames[ i ];
|
29608
29488
|
|
29609
29489
|
// Check each className given, space separated list
|
29610
29490
|
if ( self.hasClass( className ) ) {
|
@@ -29738,7 +29618,7 @@ jQuery.extend( {
|
|
29738
29618
|
val :
|
29739
29619
|
|
29740
29620
|
// Support: IE <=10 - 11 only
|
29741
|
-
// option.text throws exceptions (
|
29621
|
+
// option.text throws exceptions (trac-14686, trac-14858)
|
29742
29622
|
// Strip and collapse whitespace
|
29743
29623
|
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
|
29744
29624
|
stripAndCollapse( jQuery.text( elem ) );
|
@@ -29765,7 +29645,7 @@ jQuery.extend( {
|
|
29765
29645
|
option = options[ i ];
|
29766
29646
|
|
29767
29647
|
// Support: IE <=9 only
|
29768
|
-
// IE8-9 doesn't update selected after form reset (
|
29648
|
+
// IE8-9 doesn't update selected after form reset (trac-2551)
|
29769
29649
|
if ( ( option.selected || i === index ) &&
|
29770
29650
|
|
29771
29651
|
// Don't return options that are disabled or in a disabled optgroup
|
@@ -29839,9 +29719,39 @@ jQuery.each( [ "radio", "checkbox" ], function() {
|
|
29839
29719
|
|
29840
29720
|
|
29841
29721
|
// Return jQuery for attributes-only inclusion
|
29722
|
+
var location = window.location;
|
29723
|
+
|
29724
|
+
var nonce = { guid: Date.now() };
|
29725
|
+
|
29726
|
+
var rquery = ( /\?/ );
|
29727
|
+
|
29842
29728
|
|
29843
29729
|
|
29844
|
-
|
29730
|
+
// Cross-browser xml parsing
|
29731
|
+
jQuery.parseXML = function( data ) {
|
29732
|
+
var xml, parserErrorElem;
|
29733
|
+
if ( !data || typeof data !== "string" ) {
|
29734
|
+
return null;
|
29735
|
+
}
|
29736
|
+
|
29737
|
+
// Support: IE 9 - 11 only
|
29738
|
+
// IE throws on parseFromString with invalid input.
|
29739
|
+
try {
|
29740
|
+
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
29741
|
+
} catch ( e ) {}
|
29742
|
+
|
29743
|
+
parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
29744
|
+
if ( !xml || parserErrorElem ) {
|
29745
|
+
jQuery.error( "Invalid XML: " + (
|
29746
|
+
parserErrorElem ?
|
29747
|
+
jQuery.map( parserErrorElem.childNodes, function( el ) {
|
29748
|
+
return el.textContent;
|
29749
|
+
} ).join( "\n" ) :
|
29750
|
+
data
|
29751
|
+
) );
|
29752
|
+
}
|
29753
|
+
return xml;
|
29754
|
+
};
|
29845
29755
|
|
29846
29756
|
|
29847
29757
|
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
|
@@ -29908,8 +29818,8 @@ jQuery.extend( jQuery.event, {
|
|
29908
29818
|
return;
|
29909
29819
|
}
|
29910
29820
|
|
29911
|
-
// Determine event propagation path in advance, per W3C events spec (
|
29912
|
-
// Bubble up to document, then to window; watch for a global ownerDocument var (
|
29821
|
+
// Determine event propagation path in advance, per W3C events spec (trac-9951)
|
29822
|
+
// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)
|
29913
29823
|
if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {
|
29914
29824
|
|
29915
29825
|
bubbleType = special.delegateType || type;
|
@@ -29961,7 +29871,7 @@ jQuery.extend( jQuery.event, {
|
|
29961
29871
|
acceptData( elem ) ) {
|
29962
29872
|
|
29963
29873
|
// Call a native DOM method on the target with the same name as the event.
|
29964
|
-
// Don't do default actions on window, that's where global variables be (
|
29874
|
+
// Don't do default actions on window, that's where global variables be (trac-6170)
|
29965
29875
|
if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {
|
29966
29876
|
|
29967
29877
|
// Don't re-trigger an onFOO event when we call its FOO() method
|
@@ -30029,85 +29939,6 @@ jQuery.fn.extend( {
|
|
30029
29939
|
} );
|
30030
29940
|
|
30031
29941
|
|
30032
|
-
// Support: Firefox <=44
|
30033
|
-
// Firefox doesn't have focus(in | out) events
|
30034
|
-
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
|
30035
|
-
//
|
30036
|
-
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
|
30037
|
-
// focus(in | out) events fire after focus & blur events,
|
30038
|
-
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
|
30039
|
-
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
|
30040
|
-
if ( !support.focusin ) {
|
30041
|
-
jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
30042
|
-
|
30043
|
-
// Attach a single capturing handler on the document while someone wants focusin/focusout
|
30044
|
-
var handler = function( event ) {
|
30045
|
-
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
|
30046
|
-
};
|
30047
|
-
|
30048
|
-
jQuery.event.special[ fix ] = {
|
30049
|
-
setup: function() {
|
30050
|
-
|
30051
|
-
// Handle: regular nodes (via `this.ownerDocument`), window
|
30052
|
-
// (via `this.document`) & document (via `this`).
|
30053
|
-
var doc = this.ownerDocument || this.document || this,
|
30054
|
-
attaches = dataPriv.access( doc, fix );
|
30055
|
-
|
30056
|
-
if ( !attaches ) {
|
30057
|
-
doc.addEventListener( orig, handler, true );
|
30058
|
-
}
|
30059
|
-
dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
|
30060
|
-
},
|
30061
|
-
teardown: function() {
|
30062
|
-
var doc = this.ownerDocument || this.document || this,
|
30063
|
-
attaches = dataPriv.access( doc, fix ) - 1;
|
30064
|
-
|
30065
|
-
if ( !attaches ) {
|
30066
|
-
doc.removeEventListener( orig, handler, true );
|
30067
|
-
dataPriv.remove( doc, fix );
|
30068
|
-
|
30069
|
-
} else {
|
30070
|
-
dataPriv.access( doc, fix, attaches );
|
30071
|
-
}
|
30072
|
-
}
|
30073
|
-
};
|
30074
|
-
} );
|
30075
|
-
}
|
30076
|
-
var location = window.location;
|
30077
|
-
|
30078
|
-
var nonce = { guid: Date.now() };
|
30079
|
-
|
30080
|
-
var rquery = ( /\?/ );
|
30081
|
-
|
30082
|
-
|
30083
|
-
|
30084
|
-
// Cross-browser xml parsing
|
30085
|
-
jQuery.parseXML = function( data ) {
|
30086
|
-
var xml, parserErrorElem;
|
30087
|
-
if ( !data || typeof data !== "string" ) {
|
30088
|
-
return null;
|
30089
|
-
}
|
30090
|
-
|
30091
|
-
// Support: IE 9 - 11 only
|
30092
|
-
// IE throws on parseFromString with invalid input.
|
30093
|
-
try {
|
30094
|
-
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
30095
|
-
} catch ( e ) {}
|
30096
|
-
|
30097
|
-
parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
30098
|
-
if ( !xml || parserErrorElem ) {
|
30099
|
-
jQuery.error( "Invalid XML: " + (
|
30100
|
-
parserErrorElem ?
|
30101
|
-
jQuery.map( parserErrorElem.childNodes, function( el ) {
|
30102
|
-
return el.textContent;
|
30103
|
-
} ).join( "\n" ) :
|
30104
|
-
data
|
30105
|
-
) );
|
30106
|
-
}
|
30107
|
-
return xml;
|
30108
|
-
};
|
30109
|
-
|
30110
|
-
|
30111
29942
|
var
|
30112
29943
|
rbracket = /\[\]$/,
|
30113
29944
|
rCRLF = /\r?\n/g,
|
@@ -30235,7 +30066,7 @@ var
|
|
30235
30066
|
rantiCache = /([?&])_=[^&]*/,
|
30236
30067
|
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
|
30237
30068
|
|
30238
|
-
//
|
30069
|
+
// trac-7653, trac-8125, trac-8152: local protocol detection
|
30239
30070
|
rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
|
30240
30071
|
rnoContent = /^(?:GET|HEAD)$/,
|
30241
30072
|
rprotocol = /^\/\//,
|
@@ -30258,7 +30089,7 @@ var
|
|
30258
30089
|
*/
|
30259
30090
|
transports = {},
|
30260
30091
|
|
30261
|
-
// Avoid comment-prolog char sequence (
|
30092
|
+
// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression
|
30262
30093
|
allTypes = "*/".concat( "*" ),
|
30263
30094
|
|
30264
30095
|
// Anchor tag for parsing the document origin
|
@@ -30329,7 +30160,7 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX
|
|
30329
30160
|
|
30330
30161
|
// A special extend for ajax options
|
30331
30162
|
// that takes "flat" options (not to be deep extended)
|
30332
|
-
// Fixes
|
30163
|
+
// Fixes trac-9887
|
30333
30164
|
function ajaxExtend( target, src ) {
|
30334
30165
|
var key, deep,
|
30335
30166
|
flatOptions = jQuery.ajaxSettings.flatOptions || {};
|
@@ -30740,12 +30571,12 @@ jQuery.extend( {
|
|
30740
30571
|
deferred.promise( jqXHR );
|
30741
30572
|
|
30742
30573
|
// Add protocol if not provided (prefilters might expect it)
|
30743
|
-
// Handle falsy url in the settings object (
|
30574
|
+
// Handle falsy url in the settings object (trac-10093: consistency with old signature)
|
30744
30575
|
// We also use the url parameter if available
|
30745
30576
|
s.url = ( ( url || s.url || location.href ) + "" )
|
30746
30577
|
.replace( rprotocol, location.protocol + "//" );
|
30747
30578
|
|
30748
|
-
// Alias method option to type as per ticket
|
30579
|
+
// Alias method option to type as per ticket trac-12004
|
30749
30580
|
s.type = options.method || options.type || s.method || s.type;
|
30750
30581
|
|
30751
30582
|
// Extract dataTypes list
|
@@ -30788,7 +30619,7 @@ jQuery.extend( {
|
|
30788
30619
|
}
|
30789
30620
|
|
30790
30621
|
// We can fire global events as of now if asked to
|
30791
|
-
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (
|
30622
|
+
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)
|
30792
30623
|
fireGlobals = jQuery.event && s.global;
|
30793
30624
|
|
30794
30625
|
// Watch for a new set of requests
|
@@ -30817,7 +30648,7 @@ jQuery.extend( {
|
|
30817
30648
|
if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
|
30818
30649
|
cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
|
30819
30650
|
|
30820
|
-
//
|
30651
|
+
// trac-9682: remove data so that it's not used in an eventual retry
|
30821
30652
|
delete s.data;
|
30822
30653
|
}
|
30823
30654
|
|
@@ -31090,7 +30921,7 @@ jQuery._evalUrl = function( url, options, doc ) {
|
|
31090
30921
|
return jQuery.ajax( {
|
31091
30922
|
url: url,
|
31092
30923
|
|
31093
|
-
// Make this explicit, since user can override this through ajaxSetup (
|
30924
|
+
// Make this explicit, since user can override this through ajaxSetup (trac-11264)
|
31094
30925
|
type: "GET",
|
31095
30926
|
dataType: "script",
|
31096
30927
|
cache: true,
|
@@ -31199,7 +31030,7 @@ var xhrSuccessStatus = {
|
|
31199
31030
|
0: 200,
|
31200
31031
|
|
31201
31032
|
// Support: IE <=9 only
|
31202
|
-
//
|
31033
|
+
// trac-1450: sometimes IE returns 1223 when it should be 204
|
31203
31034
|
1223: 204
|
31204
31035
|
},
|
31205
31036
|
xhrSupported = jQuery.ajaxSettings.xhr();
|
@@ -31271,7 +31102,7 @@ jQuery.ajaxTransport( function( options ) {
|
|
31271
31102
|
} else {
|
31272
31103
|
complete(
|
31273
31104
|
|
31274
|
-
// File: protocol always yields status 0; see
|
31105
|
+
// File: protocol always yields status 0; see trac-8605, trac-14207
|
31275
31106
|
xhr.status,
|
31276
31107
|
xhr.statusText
|
31277
31108
|
);
|
@@ -31332,7 +31163,7 @@ jQuery.ajaxTransport( function( options ) {
|
|
31332
31163
|
xhr.send( options.hasContent && options.data || null );
|
31333
31164
|
} catch ( e ) {
|
31334
31165
|
|
31335
|
-
//
|
31166
|
+
// trac-14683: Only rethrow if this hasn't been notified as an error yet
|
31336
31167
|
if ( callback ) {
|
31337
31168
|
throw e;
|
31338
31169
|
}
|
@@ -31952,7 +31783,9 @@ jQuery.fn.extend( {
|
|
31952
31783
|
},
|
31953
31784
|
|
31954
31785
|
hover: function( fnOver, fnOut ) {
|
31955
|
-
return this
|
31786
|
+
return this
|
31787
|
+
.on( "mouseenter", fnOver )
|
31788
|
+
.on( "mouseleave", fnOut || fnOver );
|
31956
31789
|
}
|
31957
31790
|
} );
|
31958
31791
|
|
@@ -31976,7 +31809,9 @@ jQuery.each(
|
|
31976
31809
|
|
31977
31810
|
// Support: Android <=4.0 only
|
31978
31811
|
// Make sure we trim BOM and NBSP
|
31979
|
-
|
31812
|
+
// Require that the "whitespace run" starts from a non-whitespace
|
31813
|
+
// to avoid O(N^2) behavior when the engine would try matching "\s+$" at each space position.
|
31814
|
+
var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
|
31980
31815
|
|
31981
31816
|
// Bind a function to a context, optionally partially applying any
|
31982
31817
|
// arguments.
|
@@ -32043,7 +31878,7 @@ jQuery.isNumeric = function( obj ) {
|
|
32043
31878
|
jQuery.trim = function( text ) {
|
32044
31879
|
return text == null ?
|
32045
31880
|
"" :
|
32046
|
-
( text + "" ).replace( rtrim, "" );
|
31881
|
+
( text + "" ).replace( rtrim, "$1" );
|
32047
31882
|
};
|
32048
31883
|
|
32049
31884
|
|
@@ -32091,8 +31926,8 @@ jQuery.noConflict = function( deep ) {
|
|
32091
31926
|
};
|
32092
31927
|
|
32093
31928
|
// Expose jQuery and $ identifiers, even in AMD
|
32094
|
-
// (
|
32095
|
-
// and CommonJS for browser emulators (
|
31929
|
+
// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)
|
31930
|
+
// and CommonJS for browser emulators (trac-13566)
|
32096
31931
|
if ( typeof noGlobal === "undefined" ) {
|
32097
31932
|
window.jQuery = window.$ = jQuery;
|
32098
31933
|
}
|