@vitrosoftware/common-ui-ts 1.1.226 → 1.1.228
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/css/std/controls/lookup-picker/lookup-picker-selected-item.css +0 -1
- package/css/std/controls/lookup-picker/lookup-picker-value-list.css +0 -1
- package/css/std/controls/lookup-picker/lookup-picker.css +1 -6
- package/css/std/controls/pdf-viewer/img/compare-dlg-separator.svg +3 -1
- package/css/std/controls/pdf-viewer/img/compare-dlg-title.svg +12 -0
- package/css/std/controls/pdf-viewer/pdf-viewer-index.css +148 -0
- package/css/std/controls/pdf-viewer/pdf-viewer.css +148 -0
- package/css/std/controls/select/select.css +2 -2
- package/css/std/controls/table-view/table-view-custom-lookup-edit.css +1 -1
- package/css/std/controls/table-view/treegrid-cell.css +4 -0
- package/css/std/controls/table-view/treegrid-context-menu.css +3 -3
- package/dist/index.css +3 -10
- package/dist/index.js +894 -1126
- package/dist/index.js.map +1 -1
- package/dist/src/controls/LookupPicker/LookupPicker.d.ts +2 -0
- package/dist/src/controls/LookupPicker/ValueList.d.ts +2 -0
- package/dist/src/controls/PdfViewer/services/PdfViewerService.d.ts +6 -0
- package/dist/src/controls/ScrollBar/ScrollBar.d.ts +1 -1
- package/dist/src/controls/TableView/TableViewConstants.d.ts +2 -1
- package/dist/src/controls/TableView/services/TableViewService.d.ts +1 -0
- package/dist/src/controls/TableView/services/impl/TableViewServiceImpl.d.ts +1 -0
- package/dist/src/controls/ViewPart/ViewPart.d.ts +2 -1
- package/dist/src/models/ItemCopyRequest.d.ts +5 -1
- package/dist/src/services/FileService.d.ts +8 -0
- package/lib/dxf-viewer/parser/DxfArrayScanner.js +27 -1
- package/lib/dxf-viewer/parser/DxfParser.js +7 -4
- package/lib/fflate/fflate.module.js +2672 -0
- package/package.json +1 -1
- package/src/controls/BimViewer/js/bim-viewer.js +2 -2
- package/src/controls/DxfViewer/js/dxf-viewer.js +100 -29
- package/src/controls/PdfViewer/js/pdf-viewer.js +240 -36
package/dist/index.js
CHANGED
|
@@ -582,7 +582,7 @@ var ScrollBar = React.forwardRef(function (props, outerRef) {
|
|
|
582
582
|
});
|
|
583
583
|
}
|
|
584
584
|
if (props.onInit) {
|
|
585
|
-
props.onInit(ref.current);
|
|
585
|
+
props.onInit(ref.current, scrollElement);
|
|
586
586
|
}
|
|
587
587
|
if (props.isFocusOnScroll && ref.current) {
|
|
588
588
|
ref.current.addEventListener(CSS_CLASS_SCROLL_Y, function () {
|
|
@@ -979,17 +979,14 @@ function createCommonjsModule(fn, module) {
|
|
|
979
979
|
|
|
980
980
|
var jquery = createCommonjsModule(function (module) {
|
|
981
981
|
/*!
|
|
982
|
-
* jQuery JavaScript Library v3.
|
|
982
|
+
* jQuery JavaScript Library v3.7.1
|
|
983
983
|
* https://jquery.com/
|
|
984
984
|
*
|
|
985
|
-
* Includes Sizzle.js
|
|
986
|
-
* https://sizzlejs.com/
|
|
987
|
-
*
|
|
988
985
|
* Copyright OpenJS Foundation and other contributors
|
|
989
986
|
* Released under the MIT license
|
|
990
987
|
* https://jquery.org/license
|
|
991
988
|
*
|
|
992
|
-
* Date:
|
|
989
|
+
* Date: 2023-08-28T13:37Z
|
|
993
990
|
*/
|
|
994
991
|
( function( global, factory ) {
|
|
995
992
|
|
|
@@ -1120,8 +1117,9 @@ function toType( obj ) {
|
|
|
1120
1117
|
|
|
1121
1118
|
|
|
1122
1119
|
|
|
1123
|
-
var
|
|
1124
|
-
|
|
1120
|
+
var version = "3.7.1",
|
|
1121
|
+
|
|
1122
|
+
rhtmlSuffix = /HTML$/i,
|
|
1125
1123
|
|
|
1126
1124
|
// Define a local copy of jQuery
|
|
1127
1125
|
jQuery = function( selector, context ) {
|
|
@@ -1367,6 +1365,38 @@ jQuery.extend( {
|
|
|
1367
1365
|
return obj;
|
|
1368
1366
|
},
|
|
1369
1367
|
|
|
1368
|
+
|
|
1369
|
+
// Retrieve the text value of an array of DOM nodes
|
|
1370
|
+
text: function( elem ) {
|
|
1371
|
+
var node,
|
|
1372
|
+
ret = "",
|
|
1373
|
+
i = 0,
|
|
1374
|
+
nodeType = elem.nodeType;
|
|
1375
|
+
|
|
1376
|
+
if ( !nodeType ) {
|
|
1377
|
+
|
|
1378
|
+
// If no nodeType, this is expected to be an array
|
|
1379
|
+
while ( ( node = elem[ i++ ] ) ) {
|
|
1380
|
+
|
|
1381
|
+
// Do not traverse comment nodes
|
|
1382
|
+
ret += jQuery.text( node );
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
if ( nodeType === 1 || nodeType === 11 ) {
|
|
1386
|
+
return elem.textContent;
|
|
1387
|
+
}
|
|
1388
|
+
if ( nodeType === 9 ) {
|
|
1389
|
+
return elem.documentElement.textContent;
|
|
1390
|
+
}
|
|
1391
|
+
if ( nodeType === 3 || nodeType === 4 ) {
|
|
1392
|
+
return elem.nodeValue;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
// Do not include comment or processing instruction nodes
|
|
1396
|
+
|
|
1397
|
+
return ret;
|
|
1398
|
+
},
|
|
1399
|
+
|
|
1370
1400
|
// results is for internal usage only
|
|
1371
1401
|
makeArray: function( arr, results ) {
|
|
1372
1402
|
var ret = results || [];
|
|
@@ -1389,6 +1419,15 @@ jQuery.extend( {
|
|
|
1389
1419
|
return arr == null ? -1 : indexOf.call( arr, elem, i );
|
|
1390
1420
|
},
|
|
1391
1421
|
|
|
1422
|
+
isXMLDoc: function( elem ) {
|
|
1423
|
+
var namespace = elem && elem.namespaceURI,
|
|
1424
|
+
docElem = elem && ( elem.ownerDocument || elem ).documentElement;
|
|
1425
|
+
|
|
1426
|
+
// Assume HTML when documentElement doesn't yet exist, such as inside
|
|
1427
|
+
// document fragments.
|
|
1428
|
+
return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" );
|
|
1429
|
+
},
|
|
1430
|
+
|
|
1392
1431
|
// Support: Android <=4.0 only, PhantomJS 1 only
|
|
1393
1432
|
// push.apply(_, arraylike) throws on ancient WebKit
|
|
1394
1433
|
merge: function( first, second ) {
|
|
@@ -1490,43 +1529,98 @@ function isArrayLike( obj ) {
|
|
|
1490
1529
|
return type === "array" || length === 0 ||
|
|
1491
1530
|
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
|
1492
1531
|
}
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1532
|
+
|
|
1533
|
+
|
|
1534
|
+
function nodeName( elem, name ) {
|
|
1535
|
+
|
|
1536
|
+
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
|
1537
|
+
|
|
1538
|
+
}
|
|
1539
|
+
var pop = arr.pop;
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
var sort = arr.sort;
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
var splice = arr.splice;
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
var whitespace = "[\\x20\\t\\r\\n\\f]";
|
|
1549
|
+
|
|
1550
|
+
|
|
1551
|
+
var rtrimCSS = new RegExp(
|
|
1552
|
+
"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
|
|
1553
|
+
"g"
|
|
1554
|
+
);
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
|
|
1559
|
+
// Note: an element does not contain itself
|
|
1560
|
+
jQuery.contains = function( a, b ) {
|
|
1561
|
+
var bup = b && b.parentNode;
|
|
1562
|
+
|
|
1563
|
+
return a === bup || !!( bup && bup.nodeType === 1 && (
|
|
1564
|
+
|
|
1565
|
+
// Support: IE 9 - 11+
|
|
1566
|
+
// IE doesn't have `contains` on SVG.
|
|
1567
|
+
a.contains ?
|
|
1568
|
+
a.contains( bup ) :
|
|
1569
|
+
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
|
1570
|
+
) );
|
|
1571
|
+
};
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
// CSS string/identifier serialization
|
|
1577
|
+
// https://drafts.csswg.org/cssom/#common-serializing-idioms
|
|
1578
|
+
var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
|
|
1579
|
+
|
|
1580
|
+
function fcssescape( ch, asCodePoint ) {
|
|
1581
|
+
if ( asCodePoint ) {
|
|
1582
|
+
|
|
1583
|
+
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
|
|
1584
|
+
if ( ch === "\0" ) {
|
|
1585
|
+
return "\uFFFD";
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
// Control characters and (dependent upon position) numbers get escaped as code points
|
|
1589
|
+
return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
// Other potentially-special ASCII characters get backslash-escaped
|
|
1593
|
+
return "\\" + ch;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
jQuery.escapeSelector = function( sel ) {
|
|
1597
|
+
return ( sel + "" ).replace( rcssescape, fcssescape );
|
|
1598
|
+
};
|
|
1599
|
+
|
|
1600
|
+
|
|
1601
|
+
|
|
1602
|
+
|
|
1603
|
+
var preferredDoc = document,
|
|
1604
|
+
pushNative = push;
|
|
1605
|
+
|
|
1606
|
+
( function() {
|
|
1607
|
+
|
|
1505
1608
|
var i,
|
|
1506
|
-
support,
|
|
1507
1609
|
Expr,
|
|
1508
|
-
getText,
|
|
1509
|
-
isXML,
|
|
1510
|
-
tokenize,
|
|
1511
|
-
compile,
|
|
1512
|
-
select,
|
|
1513
1610
|
outermostContext,
|
|
1514
1611
|
sortInput,
|
|
1515
1612
|
hasDuplicate,
|
|
1613
|
+
push = pushNative,
|
|
1516
1614
|
|
|
1517
1615
|
// Local document vars
|
|
1518
|
-
setDocument,
|
|
1519
1616
|
document,
|
|
1520
|
-
|
|
1617
|
+
documentElement,
|
|
1521
1618
|
documentIsHTML,
|
|
1522
1619
|
rbuggyQSA,
|
|
1523
|
-
rbuggyMatches,
|
|
1524
1620
|
matches,
|
|
1525
|
-
contains,
|
|
1526
1621
|
|
|
1527
1622
|
// Instance-specific data
|
|
1528
|
-
expando =
|
|
1529
|
-
preferredDoc = window.document,
|
|
1623
|
+
expando = jQuery.expando,
|
|
1530
1624
|
dirruns = 0,
|
|
1531
1625
|
done = 0,
|
|
1532
1626
|
classCache = createCache(),
|
|
@@ -1540,47 +1634,22 @@ var i,
|
|
|
1540
1634
|
return 0;
|
|
1541
1635
|
},
|
|
1542
1636
|
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
arr = [],
|
|
1546
|
-
pop = arr.pop,
|
|
1547
|
-
pushNative = arr.push,
|
|
1548
|
-
push = arr.push,
|
|
1549
|
-
slice = arr.slice,
|
|
1550
|
-
|
|
1551
|
-
// Use a stripped-down indexOf as it's faster than native
|
|
1552
|
-
// https://jsperf.com/thor-indexof-vs-for/5
|
|
1553
|
-
indexOf = function( list, elem ) {
|
|
1554
|
-
var i = 0,
|
|
1555
|
-
len = list.length;
|
|
1556
|
-
for ( ; i < len; i++ ) {
|
|
1557
|
-
if ( list[ i ] === elem ) {
|
|
1558
|
-
return i;
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
return -1;
|
|
1562
|
-
},
|
|
1563
|
-
|
|
1564
|
-
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" +
|
|
1565
|
-
"ismap|loop|multiple|open|readonly|required|scoped",
|
|
1637
|
+
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|" +
|
|
1638
|
+
"loop|multiple|open|readonly|required|scoped",
|
|
1566
1639
|
|
|
1567
1640
|
// Regular expressions
|
|
1568
1641
|
|
|
1569
|
-
// http://www.w3.org/TR/css3-selectors/#whitespace
|
|
1570
|
-
whitespace = "[\\x20\\t\\r\\n\\f]",
|
|
1571
|
-
|
|
1572
1642
|
// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
|
|
1573
1643
|
identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
|
|
1574
1644
|
"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
|
|
1575
1645
|
|
|
1576
|
-
// Attribute selectors:
|
|
1646
|
+
// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors
|
|
1577
1647
|
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
|
|
1578
1648
|
|
|
1579
1649
|
// Operator (capture 2)
|
|
1580
1650
|
"*([*^$|!~]?=)" + whitespace +
|
|
1581
1651
|
|
|
1582
|
-
// "Attribute values must be CSS identifiers [capture 5]
|
|
1583
|
-
// or strings [capture 3 or capture 4]"
|
|
1652
|
+
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
|
|
1584
1653
|
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
|
|
1585
1654
|
whitespace + "*\\]",
|
|
1586
1655
|
|
|
@@ -1599,101 +1668,88 @@ var i,
|
|
|
1599
1668
|
|
|
1600
1669
|
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
|
|
1601
1670
|
rwhitespace = new RegExp( whitespace + "+", "g" ),
|
|
1602
|
-
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +
|
|
1603
|
-
whitespace + "+$", "g" ),
|
|
1604
1671
|
|
|
1605
1672
|
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
|
1606
|
-
|
|
1607
|
-
"*" ),
|
|
1673
|
+
rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" +
|
|
1674
|
+
whitespace + "*" ),
|
|
1608
1675
|
rdescend = new RegExp( whitespace + "|>" ),
|
|
1609
1676
|
|
|
1610
1677
|
rpseudo = new RegExp( pseudos ),
|
|
1611
1678
|
ridentifier = new RegExp( "^" + identifier + "$" ),
|
|
1612
1679
|
|
|
1613
1680
|
matchExpr = {
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1681
|
+
ID: new RegExp( "^#(" + identifier + ")" ),
|
|
1682
|
+
CLASS: new RegExp( "^\\.(" + identifier + ")" ),
|
|
1683
|
+
TAG: new RegExp( "^(" + identifier + "|[*])" ),
|
|
1684
|
+
ATTR: new RegExp( "^" + attributes ),
|
|
1685
|
+
PSEUDO: new RegExp( "^" + pseudos ),
|
|
1686
|
+
CHILD: new RegExp(
|
|
1687
|
+
"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
|
|
1688
|
+
whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
|
|
1689
|
+
whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
|
1690
|
+
bool: new RegExp( "^(?:" + booleans + ")$", "i" ),
|
|
1623
1691
|
|
|
1624
1692
|
// For use in libraries implementing .is()
|
|
1625
1693
|
// We use this for POS matching in `select`
|
|
1626
|
-
|
|
1694
|
+
needsContext: new RegExp( "^" + whitespace +
|
|
1627
1695
|
"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
|
|
1628
1696
|
"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
|
|
1629
1697
|
},
|
|
1630
1698
|
|
|
1631
|
-
rhtml = /HTML$/i,
|
|
1632
1699
|
rinputs = /^(?:input|select|textarea|button)$/i,
|
|
1633
1700
|
rheader = /^h\d$/i,
|
|
1634
1701
|
|
|
1635
|
-
rnative = /^[^{]+\{\s*\[native \w/,
|
|
1636
|
-
|
|
1637
1702
|
// Easily-parseable/retrievable ID or TAG or CLASS selectors
|
|
1638
1703
|
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
|
|
1639
1704
|
|
|
1640
1705
|
rsibling = /[+~]/,
|
|
1641
1706
|
|
|
1642
1707
|
// CSS escapes
|
|
1643
|
-
//
|
|
1644
|
-
runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
|
|
1708
|
+
// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters
|
|
1709
|
+
runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
|
|
1710
|
+
"?|\\\\([^\\r\\n\\f])", "g" ),
|
|
1645
1711
|
funescape = function( escape, nonHex ) {
|
|
1646
1712
|
var high = "0x" + escape.slice( 1 ) - 0x10000;
|
|
1647
1713
|
|
|
1648
|
-
|
|
1714
|
+
if ( nonHex ) {
|
|
1649
1715
|
|
|
1650
1716
|
// Strip the backslash prefix from a non-hex escape sequence
|
|
1651
|
-
nonHex
|
|
1652
|
-
|
|
1653
|
-
// Replace a hexadecimal escape sequence with the encoded Unicode code point
|
|
1654
|
-
// Support: IE <=11+
|
|
1655
|
-
// For values outside the Basic Multilingual Plane (BMP), manually construct a
|
|
1656
|
-
// surrogate pair
|
|
1657
|
-
high < 0 ?
|
|
1658
|
-
String.fromCharCode( high + 0x10000 ) :
|
|
1659
|
-
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
|
1660
|
-
},
|
|
1661
|
-
|
|
1662
|
-
// CSS string/identifier serialization
|
|
1663
|
-
// https://drafts.csswg.org/cssom/#common-serializing-idioms
|
|
1664
|
-
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
|
|
1665
|
-
fcssescape = function( ch, asCodePoint ) {
|
|
1666
|
-
if ( asCodePoint ) {
|
|
1667
|
-
|
|
1668
|
-
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
|
|
1669
|
-
if ( ch === "\0" ) {
|
|
1670
|
-
return "\uFFFD";
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
// Control characters and (dependent upon position) numbers get escaped as code points
|
|
1674
|
-
return ch.slice( 0, -1 ) + "\\" +
|
|
1675
|
-
ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
|
1717
|
+
return nonHex;
|
|
1676
1718
|
}
|
|
1677
1719
|
|
|
1678
|
-
//
|
|
1679
|
-
|
|
1720
|
+
// Replace a hexadecimal escape sequence with the encoded Unicode code point
|
|
1721
|
+
// Support: IE <=11+
|
|
1722
|
+
// For values outside the Basic Multilingual Plane (BMP), manually construct a
|
|
1723
|
+
// surrogate pair
|
|
1724
|
+
return high < 0 ?
|
|
1725
|
+
String.fromCharCode( high + 0x10000 ) :
|
|
1726
|
+
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
|
1680
1727
|
},
|
|
1681
1728
|
|
|
1682
|
-
// Used for iframes
|
|
1683
|
-
//
|
|
1729
|
+
// Used for iframes; see `setDocument`.
|
|
1730
|
+
// Support: IE 9 - 11+, Edge 12 - 18+
|
|
1684
1731
|
// Removing the function wrapper causes a "Permission Denied"
|
|
1685
|
-
// error in IE
|
|
1732
|
+
// error in IE/Edge.
|
|
1686
1733
|
unloadHandler = function() {
|
|
1687
1734
|
setDocument();
|
|
1688
1735
|
},
|
|
1689
1736
|
|
|
1690
1737
|
inDisabledFieldset = addCombinator(
|
|
1691
1738
|
function( elem ) {
|
|
1692
|
-
return elem.disabled === true &&
|
|
1739
|
+
return elem.disabled === true && nodeName( elem, "fieldset" );
|
|
1693
1740
|
},
|
|
1694
1741
|
{ dir: "parentNode", next: "legend" }
|
|
1695
1742
|
);
|
|
1696
1743
|
|
|
1744
|
+
// Support: IE <=9 only
|
|
1745
|
+
// Accessing document.activeElement can throw unexpectedly
|
|
1746
|
+
// https://bugs.jquery.com/ticket/13393
|
|
1747
|
+
function safeActiveElement() {
|
|
1748
|
+
try {
|
|
1749
|
+
return document.activeElement;
|
|
1750
|
+
} catch ( err ) { }
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1697
1753
|
// Optimize for push.apply( _, NodeList )
|
|
1698
1754
|
try {
|
|
1699
1755
|
push.apply(
|
|
@@ -1701,32 +1757,22 @@ try {
|
|
|
1701
1757
|
preferredDoc.childNodes
|
|
1702
1758
|
);
|
|
1703
1759
|
|
|
1704
|
-
// Support: Android
|
|
1760
|
+
// Support: Android <=4.0
|
|
1705
1761
|
// Detect silently failing push.apply
|
|
1706
1762
|
// eslint-disable-next-line no-unused-expressions
|
|
1707
1763
|
arr[ preferredDoc.childNodes.length ].nodeType;
|
|
1708
1764
|
} catch ( e ) {
|
|
1709
|
-
push = {
|
|
1710
|
-
|
|
1711
|
-
// Leverage slice if possible
|
|
1712
|
-
function( target, els ) {
|
|
1765
|
+
push = {
|
|
1766
|
+
apply: function( target, els ) {
|
|
1713
1767
|
pushNative.apply( target, slice.call( els ) );
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
// Otherwise append directly
|
|
1718
|
-
function( target, els ) {
|
|
1719
|
-
var j = target.length,
|
|
1720
|
-
i = 0;
|
|
1721
|
-
|
|
1722
|
-
// Can't trust NodeList.length
|
|
1723
|
-
while ( ( target[ j++ ] = els[ i++ ] ) ) {}
|
|
1724
|
-
target.length = j - 1;
|
|
1768
|
+
},
|
|
1769
|
+
call: function( target ) {
|
|
1770
|
+
pushNative.apply( target, slice.call( arguments, 1 ) );
|
|
1725
1771
|
}
|
|
1726
1772
|
};
|
|
1727
1773
|
}
|
|
1728
1774
|
|
|
1729
|
-
function
|
|
1775
|
+
function find( selector, context, results, seed ) {
|
|
1730
1776
|
var m, i, elem, nid, match, groups, newSelector,
|
|
1731
1777
|
newContext = context && context.ownerDocument,
|
|
1732
1778
|
|
|
@@ -1760,11 +1806,10 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1760
1806
|
if ( nodeType === 9 ) {
|
|
1761
1807
|
if ( ( elem = context.getElementById( m ) ) ) {
|
|
1762
1808
|
|
|
1763
|
-
// Support: IE
|
|
1764
|
-
// TODO: identify versions
|
|
1809
|
+
// Support: IE 9 only
|
|
1765
1810
|
// getElementById can match elements by name instead of ID
|
|
1766
1811
|
if ( elem.id === m ) {
|
|
1767
|
-
|
|
1812
|
+
push.call( results, elem );
|
|
1768
1813
|
return results;
|
|
1769
1814
|
}
|
|
1770
1815
|
} else {
|
|
@@ -1774,14 +1819,13 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1774
1819
|
// Element context
|
|
1775
1820
|
} else {
|
|
1776
1821
|
|
|
1777
|
-
// Support: IE
|
|
1778
|
-
// TODO: identify versions
|
|
1822
|
+
// Support: IE 9 only
|
|
1779
1823
|
// getElementById can match elements by name instead of ID
|
|
1780
1824
|
if ( newContext && ( elem = newContext.getElementById( m ) ) &&
|
|
1781
|
-
contains( context, elem ) &&
|
|
1825
|
+
find.contains( context, elem ) &&
|
|
1782
1826
|
elem.id === m ) {
|
|
1783
1827
|
|
|
1784
|
-
|
|
1828
|
+
push.call( results, elem );
|
|
1785
1829
|
return results;
|
|
1786
1830
|
}
|
|
1787
1831
|
}
|
|
@@ -1792,22 +1836,15 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1792
1836
|
return results;
|
|
1793
1837
|
|
|
1794
1838
|
// Class selector
|
|
1795
|
-
} else if ( ( m = match[ 3 ] ) &&
|
|
1796
|
-
context.getElementsByClassName ) {
|
|
1797
|
-
|
|
1839
|
+
} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {
|
|
1798
1840
|
push.apply( results, context.getElementsByClassName( m ) );
|
|
1799
1841
|
return results;
|
|
1800
1842
|
}
|
|
1801
1843
|
}
|
|
1802
1844
|
|
|
1803
1845
|
// Take advantage of querySelectorAll
|
|
1804
|
-
if (
|
|
1805
|
-
!
|
|
1806
|
-
( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&
|
|
1807
|
-
|
|
1808
|
-
// Support: IE 8 only
|
|
1809
|
-
// Exclude object elements
|
|
1810
|
-
( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) {
|
|
1846
|
+
if ( !nonnativeSelectorCache[ selector + " " ] &&
|
|
1847
|
+
( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {
|
|
1811
1848
|
|
|
1812
1849
|
newSelector = selector;
|
|
1813
1850
|
newContext = context;
|
|
@@ -1820,7 +1857,7 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1820
1857
|
// as such selectors are not recognized by querySelectorAll.
|
|
1821
1858
|
// Thanks to Andrew Dupont for this technique.
|
|
1822
1859
|
if ( nodeType === 1 &&
|
|
1823
|
-
( rdescend.test( selector ) ||
|
|
1860
|
+
( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {
|
|
1824
1861
|
|
|
1825
1862
|
// Expand context for sibling selectors
|
|
1826
1863
|
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
|
@@ -1828,11 +1865,15 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1828
1865
|
|
|
1829
1866
|
// We can use :scope instead of the ID hack if the browser
|
|
1830
1867
|
// supports it & if we're not changing the context.
|
|
1831
|
-
|
|
1868
|
+
// Support: IE 11+, Edge 17 - 18+
|
|
1869
|
+
// IE/Edge sometimes throw a "Permission denied" error when
|
|
1870
|
+
// strict-comparing two documents; shallow comparisons work.
|
|
1871
|
+
// eslint-disable-next-line eqeqeq
|
|
1872
|
+
if ( newContext != context || !support.scope ) {
|
|
1832
1873
|
|
|
1833
1874
|
// Capture the context ID, setting it first if necessary
|
|
1834
1875
|
if ( ( nid = context.getAttribute( "id" ) ) ) {
|
|
1835
|
-
nid =
|
|
1876
|
+
nid = jQuery.escapeSelector( nid );
|
|
1836
1877
|
} else {
|
|
1837
1878
|
context.setAttribute( "id", ( nid = expando ) );
|
|
1838
1879
|
}
|
|
@@ -1849,27 +1890,6 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1849
1890
|
}
|
|
1850
1891
|
|
|
1851
1892
|
try {
|
|
1852
|
-
|
|
1853
|
-
// `qSA` may not throw for unrecognized parts using forgiving parsing:
|
|
1854
|
-
// https://drafts.csswg.org/selectors/#forgiving-selector
|
|
1855
|
-
// like the `:has()` pseudo-class:
|
|
1856
|
-
// https://drafts.csswg.org/selectors/#relational
|
|
1857
|
-
// `CSS.supports` is still expected to return `false` then:
|
|
1858
|
-
// https://drafts.csswg.org/css-conditional-4/#typedef-supports-selector-fn
|
|
1859
|
-
// https://drafts.csswg.org/css-conditional-4/#dfn-support-selector
|
|
1860
|
-
if ( support.cssSupportsSelector &&
|
|
1861
|
-
|
|
1862
|
-
// eslint-disable-next-line no-undef
|
|
1863
|
-
!CSS.supports( "selector(:is(" + newSelector + "))" ) ) {
|
|
1864
|
-
|
|
1865
|
-
// Support: IE 11+
|
|
1866
|
-
// Throw to get to the same code path as an error directly in qSA.
|
|
1867
|
-
// Note: once we only support browser supporting
|
|
1868
|
-
// `CSS.supports('selector(...)')`, we can most likely drop
|
|
1869
|
-
// the `try-catch`. IE doesn't implement the API.
|
|
1870
|
-
throw new Error();
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
1893
|
push.apply( results,
|
|
1874
1894
|
newContext.querySelectorAll( newSelector )
|
|
1875
1895
|
);
|
|
@@ -1886,7 +1906,7 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1886
1906
|
}
|
|
1887
1907
|
|
|
1888
1908
|
// All others
|
|
1889
|
-
return select( selector.replace(
|
|
1909
|
+
return select( selector.replace( rtrimCSS, "$1" ), context, results, seed );
|
|
1890
1910
|
}
|
|
1891
1911
|
|
|
1892
1912
|
/**
|
|
@@ -1900,7 +1920,8 @@ function createCache() {
|
|
|
1900
1920
|
|
|
1901
1921
|
function cache( key, value ) {
|
|
1902
1922
|
|
|
1903
|
-
// Use (key + " ") to avoid collision with native prototype properties
|
|
1923
|
+
// Use (key + " ") to avoid collision with native prototype properties
|
|
1924
|
+
// (see https://github.com/jquery/sizzle/issues/157)
|
|
1904
1925
|
if ( keys.push( key + " " ) > Expr.cacheLength ) {
|
|
1905
1926
|
|
|
1906
1927
|
// Only keep the most recent entries
|
|
@@ -1912,7 +1933,7 @@ function createCache() {
|
|
|
1912
1933
|
}
|
|
1913
1934
|
|
|
1914
1935
|
/**
|
|
1915
|
-
* Mark a function for special use by
|
|
1936
|
+
* Mark a function for special use by jQuery selector module
|
|
1916
1937
|
* @param {Function} fn The function to mark
|
|
1917
1938
|
*/
|
|
1918
1939
|
function markFunction( fn ) {
|
|
@@ -1943,56 +1964,13 @@ function assert( fn ) {
|
|
|
1943
1964
|
}
|
|
1944
1965
|
}
|
|
1945
1966
|
|
|
1946
|
-
/**
|
|
1947
|
-
* Adds the same handler for all of the specified attrs
|
|
1948
|
-
* @param {String} attrs Pipe-separated list of attributes
|
|
1949
|
-
* @param {Function} handler The method that will be applied
|
|
1950
|
-
*/
|
|
1951
|
-
function addHandle( attrs, handler ) {
|
|
1952
|
-
var arr = attrs.split( "|" ),
|
|
1953
|
-
i = arr.length;
|
|
1954
|
-
|
|
1955
|
-
while ( i-- ) {
|
|
1956
|
-
Expr.attrHandle[ arr[ i ] ] = handler;
|
|
1957
|
-
}
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
/**
|
|
1961
|
-
* Checks document order of two siblings
|
|
1962
|
-
* @param {Element} a
|
|
1963
|
-
* @param {Element} b
|
|
1964
|
-
* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
|
|
1965
|
-
*/
|
|
1966
|
-
function siblingCheck( a, b ) {
|
|
1967
|
-
var cur = b && a,
|
|
1968
|
-
diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
|
|
1969
|
-
a.sourceIndex - b.sourceIndex;
|
|
1970
|
-
|
|
1971
|
-
// Use IE sourceIndex if available on both nodes
|
|
1972
|
-
if ( diff ) {
|
|
1973
|
-
return diff;
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
// Check if b follows a
|
|
1977
|
-
if ( cur ) {
|
|
1978
|
-
while ( ( cur = cur.nextSibling ) ) {
|
|
1979
|
-
if ( cur === b ) {
|
|
1980
|
-
return -1;
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
}
|
|
1984
|
-
|
|
1985
|
-
return a ? 1 : -1;
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
1967
|
/**
|
|
1989
1968
|
* Returns a function to use in pseudos for input types
|
|
1990
1969
|
* @param {String} type
|
|
1991
1970
|
*/
|
|
1992
1971
|
function createInputPseudo( type ) {
|
|
1993
1972
|
return function( elem ) {
|
|
1994
|
-
|
|
1995
|
-
return name === "input" && elem.type === type;
|
|
1973
|
+
return nodeName( elem, "input" ) && elem.type === type;
|
|
1996
1974
|
};
|
|
1997
1975
|
}
|
|
1998
1976
|
|
|
@@ -2002,8 +1980,8 @@ function createInputPseudo( type ) {
|
|
|
2002
1980
|
*/
|
|
2003
1981
|
function createButtonPseudo( type ) {
|
|
2004
1982
|
return function( elem ) {
|
|
2005
|
-
|
|
2006
|
-
|
|
1983
|
+
return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) &&
|
|
1984
|
+
elem.type === type;
|
|
2007
1985
|
};
|
|
2008
1986
|
}
|
|
2009
1987
|
|
|
@@ -2039,14 +2017,13 @@ function createDisabledPseudo( disabled ) {
|
|
|
2039
2017
|
}
|
|
2040
2018
|
}
|
|
2041
2019
|
|
|
2042
|
-
// Support: IE 6 - 11
|
|
2020
|
+
// Support: IE 6 - 11+
|
|
2043
2021
|
// Use the isDisabled shortcut property to check for disabled fieldset ancestors
|
|
2044
2022
|
return elem.isDisabled === disabled ||
|
|
2045
2023
|
|
|
2046
2024
|
// Where there is no isDisabled, check manually
|
|
2047
|
-
/* jshint -W018 */
|
|
2048
2025
|
elem.isDisabled !== !disabled &&
|
|
2049
|
-
|
|
2026
|
+
inDisabledFieldset( elem ) === disabled;
|
|
2050
2027
|
}
|
|
2051
2028
|
|
|
2052
2029
|
return elem.disabled === disabled;
|
|
@@ -2086,7 +2063,7 @@ function createPositionalPseudo( fn ) {
|
|
|
2086
2063
|
}
|
|
2087
2064
|
|
|
2088
2065
|
/**
|
|
2089
|
-
* Checks a node for validity as a
|
|
2066
|
+
* Checks a node for validity as a jQuery selector context
|
|
2090
2067
|
* @param {Element|Object=} context
|
|
2091
2068
|
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
|
|
2092
2069
|
*/
|
|
@@ -2094,31 +2071,13 @@ function testContext( context ) {
|
|
|
2094
2071
|
return context && typeof context.getElementsByTagName !== "undefined" && context;
|
|
2095
2072
|
}
|
|
2096
2073
|
|
|
2097
|
-
// Expose support vars for convenience
|
|
2098
|
-
support = Sizzle.support = {};
|
|
2099
|
-
|
|
2100
|
-
/**
|
|
2101
|
-
* Detects XML nodes
|
|
2102
|
-
* @param {Element|Object} elem An element or a document
|
|
2103
|
-
* @returns {Boolean} True iff elem is a non-HTML XML node
|
|
2104
|
-
*/
|
|
2105
|
-
isXML = Sizzle.isXML = function( elem ) {
|
|
2106
|
-
var namespace = elem && elem.namespaceURI,
|
|
2107
|
-
docElem = elem && ( elem.ownerDocument || elem ).documentElement;
|
|
2108
|
-
|
|
2109
|
-
// Support: IE <=8
|
|
2110
|
-
// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
|
|
2111
|
-
// https://bugs.jquery.com/ticket/4833
|
|
2112
|
-
return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );
|
|
2113
|
-
};
|
|
2114
|
-
|
|
2115
2074
|
/**
|
|
2116
2075
|
* Sets document-related variables once based on the current document
|
|
2117
|
-
* @param {Element|Object} [
|
|
2076
|
+
* @param {Element|Object} [node] An element or document object to use to set the document
|
|
2118
2077
|
* @returns {Object} Returns the current document
|
|
2119
2078
|
*/
|
|
2120
|
-
|
|
2121
|
-
var
|
|
2079
|
+
function setDocument( node ) {
|
|
2080
|
+
var subWindow,
|
|
2122
2081
|
doc = node ? node.ownerDocument || node : preferredDoc;
|
|
2123
2082
|
|
|
2124
2083
|
// Return early if doc is invalid or already selected
|
|
@@ -2132,112 +2091,90 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
2132
2091
|
|
|
2133
2092
|
// Update global variables
|
|
2134
2093
|
document = doc;
|
|
2135
|
-
|
|
2136
|
-
documentIsHTML = !
|
|
2094
|
+
documentElement = document.documentElement;
|
|
2095
|
+
documentIsHTML = !jQuery.isXMLDoc( document );
|
|
2096
|
+
|
|
2097
|
+
// Support: iOS 7 only, IE 9 - 11+
|
|
2098
|
+
// Older browsers didn't support unprefixed `matches`.
|
|
2099
|
+
matches = documentElement.matches ||
|
|
2100
|
+
documentElement.webkitMatchesSelector ||
|
|
2101
|
+
documentElement.msMatchesSelector;
|
|
2137
2102
|
|
|
2138
2103
|
// Support: IE 9 - 11+, Edge 12 - 18+
|
|
2139
|
-
// Accessing iframe documents after unload throws "permission denied" errors
|
|
2140
|
-
//
|
|
2141
|
-
// IE
|
|
2142
|
-
//
|
|
2143
|
-
|
|
2144
|
-
if ( preferredDoc != document &&
|
|
2145
|
-
( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
|
|
2104
|
+
// Accessing iframe documents after unload throws "permission denied" errors
|
|
2105
|
+
// (see trac-13936).
|
|
2106
|
+
// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,
|
|
2107
|
+
// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.
|
|
2108
|
+
if ( documentElement.msMatchesSelector &&
|
|
2146
2109
|
|
|
2147
|
-
// Support: IE 11
|
|
2148
|
-
|
|
2149
|
-
|
|
2110
|
+
// Support: IE 11+, Edge 17 - 18+
|
|
2111
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
|
2112
|
+
// two documents; shallow comparisons work.
|
|
2113
|
+
// eslint-disable-next-line eqeqeq
|
|
2114
|
+
preferredDoc != document &&
|
|
2115
|
+
( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
|
|
2150
2116
|
|
|
2151
|
-
// Support: IE 9 -
|
|
2152
|
-
|
|
2153
|
-
subWindow.attachEvent( "onunload", unloadHandler );
|
|
2154
|
-
}
|
|
2117
|
+
// Support: IE 9 - 11+, Edge 12 - 18+
|
|
2118
|
+
subWindow.addEventListener( "unload", unloadHandler );
|
|
2155
2119
|
}
|
|
2156
2120
|
|
|
2157
|
-
// Support: IE
|
|
2158
|
-
//
|
|
2159
|
-
//
|
|
2160
|
-
//
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
!el.querySelectorAll( ":scope fieldset div" ).length;
|
|
2166
|
-
} );
|
|
2167
|
-
|
|
2168
|
-
// Support: Chrome 105+, Firefox 104+, Safari 15.4+
|
|
2169
|
-
// Make sure forgiving mode is not used in `CSS.supports( "selector(...)" )`.
|
|
2170
|
-
//
|
|
2171
|
-
// `:is()` uses a forgiving selector list as an argument and is widely
|
|
2172
|
-
// implemented, so it's a good one to test against.
|
|
2173
|
-
support.cssSupportsSelector = assert( function() {
|
|
2174
|
-
/* eslint-disable no-undef */
|
|
2175
|
-
|
|
2176
|
-
return CSS.supports( "selector(*)" ) &&
|
|
2177
|
-
|
|
2178
|
-
// Support: Firefox 78-81 only
|
|
2179
|
-
// In old Firefox, `:is()` didn't use forgiving parsing. In that case,
|
|
2180
|
-
// fail this test as there's no selector to test against that.
|
|
2181
|
-
// `CSS.supports` uses unforgiving parsing
|
|
2182
|
-
document.querySelectorAll( ":is(:jqfake)" ) &&
|
|
2183
|
-
|
|
2184
|
-
// `*` is needed as Safari & newer Chrome implemented something in between
|
|
2185
|
-
// for `:has()` - it throws in `qSA` if it only contains an unsupported
|
|
2186
|
-
// argument but multiple ones, one of which is supported, are fine.
|
|
2187
|
-
// We want to play safe in case `:is()` gets the same treatment.
|
|
2188
|
-
!CSS.supports( "selector(:is(*,:jqfake))" );
|
|
2189
|
-
|
|
2190
|
-
/* eslint-enable */
|
|
2121
|
+
// Support: IE <10
|
|
2122
|
+
// Check if getElementById returns elements by name
|
|
2123
|
+
// The broken getElementById methods don't pick up programmatically-set names,
|
|
2124
|
+
// so use a roundabout getElementsByName test
|
|
2125
|
+
support.getById = assert( function( el ) {
|
|
2126
|
+
documentElement.appendChild( el ).id = jQuery.expando;
|
|
2127
|
+
return !document.getElementsByName ||
|
|
2128
|
+
!document.getElementsByName( jQuery.expando ).length;
|
|
2191
2129
|
} );
|
|
2192
2130
|
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
// (excepting IE8 booleans)
|
|
2199
|
-
support.attributes = assert( function( el ) {
|
|
2200
|
-
el.className = "i";
|
|
2201
|
-
return !el.getAttribute( "className" );
|
|
2131
|
+
// Support: IE 9 only
|
|
2132
|
+
// Check to see if it's possible to do matchesSelector
|
|
2133
|
+
// on a disconnected node.
|
|
2134
|
+
support.disconnectedMatch = assert( function( el ) {
|
|
2135
|
+
return matches.call( el, "*" );
|
|
2202
2136
|
} );
|
|
2203
2137
|
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
support.getElementsByTagName = assert( function( el ) {
|
|
2209
|
-
el.appendChild( document.createComment( "" ) );
|
|
2210
|
-
return !el.getElementsByTagName( "*" ).length;
|
|
2138
|
+
// Support: IE 9 - 11+, Edge 12 - 18+
|
|
2139
|
+
// IE/Edge don't support the :scope pseudo-class.
|
|
2140
|
+
support.scope = assert( function() {
|
|
2141
|
+
return document.querySelectorAll( ":scope" );
|
|
2211
2142
|
} );
|
|
2212
2143
|
|
|
2213
|
-
// Support:
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
//
|
|
2217
|
-
//
|
|
2218
|
-
//
|
|
2219
|
-
//
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2144
|
+
// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only
|
|
2145
|
+
// Make sure the `:has()` argument is parsed unforgivingly.
|
|
2146
|
+
// We include `*` in the test to detect buggy implementations that are
|
|
2147
|
+
// _selectively_ forgiving (specifically when the list includes at least
|
|
2148
|
+
// one valid selector).
|
|
2149
|
+
// Note that we treat complete lack of support for `:has()` as if it were
|
|
2150
|
+
// spec-compliant support, which is fine because use of `:has()` in such
|
|
2151
|
+
// environments will fail in the qSA path and fall back to jQuery traversal
|
|
2152
|
+
// anyway.
|
|
2153
|
+
support.cssHas = assert( function() {
|
|
2154
|
+
try {
|
|
2155
|
+
document.querySelector( ":has(*,:jqfake)" );
|
|
2156
|
+
return false;
|
|
2157
|
+
} catch ( e ) {
|
|
2158
|
+
return true;
|
|
2159
|
+
}
|
|
2223
2160
|
} );
|
|
2224
2161
|
|
|
2225
2162
|
// ID filter and find
|
|
2226
2163
|
if ( support.getById ) {
|
|
2227
|
-
Expr.filter
|
|
2164
|
+
Expr.filter.ID = function( id ) {
|
|
2228
2165
|
var attrId = id.replace( runescape, funescape );
|
|
2229
2166
|
return function( elem ) {
|
|
2230
2167
|
return elem.getAttribute( "id" ) === attrId;
|
|
2231
2168
|
};
|
|
2232
2169
|
};
|
|
2233
|
-
Expr.find
|
|
2170
|
+
Expr.find.ID = function( id, context ) {
|
|
2234
2171
|
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
|
2235
2172
|
var elem = context.getElementById( id );
|
|
2236
2173
|
return elem ? [ elem ] : [];
|
|
2237
2174
|
}
|
|
2238
2175
|
};
|
|
2239
2176
|
} else {
|
|
2240
|
-
Expr.filter
|
|
2177
|
+
Expr.filter.ID = function( id ) {
|
|
2241
2178
|
var attrId = id.replace( runescape, funescape );
|
|
2242
2179
|
return function( elem ) {
|
|
2243
2180
|
var node = typeof elem.getAttributeNode !== "undefined" &&
|
|
@@ -2248,7 +2185,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
2248
2185
|
|
|
2249
2186
|
// Support: IE 6 - 7 only
|
|
2250
2187
|
// getElementById is not reliable as a find shortcut
|
|
2251
|
-
Expr.find
|
|
2188
|
+
Expr.find.ID = function( id, context ) {
|
|
2252
2189
|
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
|
2253
2190
|
var node, i, elems,
|
|
2254
2191
|
elem = context.getElementById( id );
|
|
@@ -2278,40 +2215,18 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
2278
2215
|
}
|
|
2279
2216
|
|
|
2280
2217
|
// Tag
|
|
2281
|
-
Expr.find
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
return context.getElementsByTagName( tag );
|
|
2285
|
-
|
|
2286
|
-
// DocumentFragment nodes don't have gEBTN
|
|
2287
|
-
} else if ( support.qsa ) {
|
|
2288
|
-
return context.querySelectorAll( tag );
|
|
2289
|
-
}
|
|
2290
|
-
} :
|
|
2291
|
-
|
|
2292
|
-
function( tag, context ) {
|
|
2293
|
-
var elem,
|
|
2294
|
-
tmp = [],
|
|
2295
|
-
i = 0,
|
|
2296
|
-
|
|
2297
|
-
// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
|
|
2298
|
-
results = context.getElementsByTagName( tag );
|
|
2218
|
+
Expr.find.TAG = function( tag, context ) {
|
|
2219
|
+
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
|
2220
|
+
return context.getElementsByTagName( tag );
|
|
2299
2221
|
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
}
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
return tmp;
|
|
2309
|
-
}
|
|
2310
|
-
return results;
|
|
2311
|
-
};
|
|
2222
|
+
// DocumentFragment nodes don't have gEBTN
|
|
2223
|
+
} else {
|
|
2224
|
+
return context.querySelectorAll( tag );
|
|
2225
|
+
}
|
|
2226
|
+
};
|
|
2312
2227
|
|
|
2313
2228
|
// Class
|
|
2314
|
-
Expr.find
|
|
2229
|
+
Expr.find.CLASS = function( className, context ) {
|
|
2315
2230
|
if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
|
|
2316
2231
|
return context.getElementsByClassName( className );
|
|
2317
2232
|
}
|
|
@@ -2322,195 +2237,94 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
2322
2237
|
|
|
2323
2238
|
// QSA and matchesSelector support
|
|
2324
2239
|
|
|
2325
|
-
// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
|
|
2326
|
-
rbuggyMatches = [];
|
|
2327
|
-
|
|
2328
|
-
// qSa(:focus) reports false when true (Chrome 21)
|
|
2329
|
-
// We allow this because of a bug in IE8/9 that throws an error
|
|
2330
|
-
// whenever `document.activeElement` is accessed on an iframe
|
|
2331
|
-
// So, we allow :focus to pass through QSA all the time to avoid the IE error
|
|
2332
|
-
// See https://bugs.jquery.com/ticket/13378
|
|
2333
2240
|
rbuggyQSA = [];
|
|
2334
2241
|
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
// Regex strategy adopted from Diego Perini
|
|
2339
|
-
assert( function( el ) {
|
|
2340
|
-
|
|
2341
|
-
var input;
|
|
2342
|
-
|
|
2343
|
-
// Select is set to empty string on purpose
|
|
2344
|
-
// This is to test IE's treatment of not explicitly
|
|
2345
|
-
// setting a boolean content attribute,
|
|
2346
|
-
// since its presence should be enough
|
|
2347
|
-
// https://bugs.jquery.com/ticket/12359
|
|
2348
|
-
docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
|
|
2349
|
-
"<select id='" + expando + "-\r\\' msallowcapture=''>" +
|
|
2350
|
-
"<option selected=''></option></select>";
|
|
2351
|
-
|
|
2352
|
-
// Support: IE8, Opera 11-12.16
|
|
2353
|
-
// Nothing should be selected when empty strings follow ^= or $= or *=
|
|
2354
|
-
// The test attribute must be unknown in Opera but "safe" for WinRT
|
|
2355
|
-
// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
|
|
2356
|
-
if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) {
|
|
2357
|
-
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
|
|
2358
|
-
}
|
|
2359
|
-
|
|
2360
|
-
// Support: IE8
|
|
2361
|
-
// Boolean attributes and "value" are not treated correctly
|
|
2362
|
-
if ( !el.querySelectorAll( "[selected]" ).length ) {
|
|
2363
|
-
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
|
|
2367
|
-
if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
|
2368
|
-
rbuggyQSA.push( "~=" );
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
// Support: IE 11+, Edge 15 - 18+
|
|
2372
|
-
// IE 11/Edge don't find elements on a `[name='']` query in some cases.
|
|
2373
|
-
// Adding a temporary attribute to the document before the selection works
|
|
2374
|
-
// around the issue.
|
|
2375
|
-
// Interestingly, IE 10 & older don't seem to have the issue.
|
|
2376
|
-
input = document.createElement( "input" );
|
|
2377
|
-
input.setAttribute( "name", "" );
|
|
2378
|
-
el.appendChild( input );
|
|
2379
|
-
if ( !el.querySelectorAll( "[name='']" ).length ) {
|
|
2380
|
-
rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
|
|
2381
|
-
whitespace + "*(?:''|\"\")" );
|
|
2382
|
-
}
|
|
2383
|
-
|
|
2384
|
-
// Webkit/Opera - :checked should return selected option elements
|
|
2385
|
-
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
|
2386
|
-
// IE8 throws error here and will not see later tests
|
|
2387
|
-
if ( !el.querySelectorAll( ":checked" ).length ) {
|
|
2388
|
-
rbuggyQSA.push( ":checked" );
|
|
2389
|
-
}
|
|
2390
|
-
|
|
2391
|
-
// Support: Safari 8+, iOS 8+
|
|
2392
|
-
// https://bugs.webkit.org/show_bug.cgi?id=136851
|
|
2393
|
-
// In-page `selector#id sibling-combinator selector` fails
|
|
2394
|
-
if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
|
|
2395
|
-
rbuggyQSA.push( ".#.+[+~]" );
|
|
2396
|
-
}
|
|
2397
|
-
|
|
2398
|
-
// Support: Firefox <=3.6 - 5 only
|
|
2399
|
-
// Old Firefox doesn't throw on a badly-escaped identifier.
|
|
2400
|
-
el.querySelectorAll( "\\\f" );
|
|
2401
|
-
rbuggyQSA.push( "[\\r\\n\\f]" );
|
|
2402
|
-
} );
|
|
2403
|
-
|
|
2404
|
-
assert( function( el ) {
|
|
2405
|
-
el.innerHTML = "<a href='' disabled='disabled'></a>" +
|
|
2406
|
-
"<select disabled='disabled'><option/></select>";
|
|
2242
|
+
// Build QSA regex
|
|
2243
|
+
// Regex strategy adopted from Diego Perini
|
|
2244
|
+
assert( function( el ) {
|
|
2407
2245
|
|
|
2408
|
-
|
|
2409
|
-
// The type and name attributes are restricted during .innerHTML assignment
|
|
2410
|
-
var input = document.createElement( "input" );
|
|
2411
|
-
input.setAttribute( "type", "hidden" );
|
|
2412
|
-
el.appendChild( input ).setAttribute( "name", "D" );
|
|
2246
|
+
var input;
|
|
2413
2247
|
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
}
|
|
2419
|
-
|
|
2420
|
-
// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
|
|
2421
|
-
// IE8 throws error here and will not see later tests
|
|
2422
|
-
if ( el.querySelectorAll( ":enabled" ).length !== 2 ) {
|
|
2423
|
-
rbuggyQSA.push( ":enabled", ":disabled" );
|
|
2424
|
-
}
|
|
2248
|
+
documentElement.appendChild( el ).innerHTML =
|
|
2249
|
+
"<a id='" + expando + "' href='' disabled='disabled'></a>" +
|
|
2250
|
+
"<select id='" + expando + "-\r\\' disabled='disabled'>" +
|
|
2251
|
+
"<option selected=''></option></select>";
|
|
2425
2252
|
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
}
|
|
2253
|
+
// Support: iOS <=7 - 8 only
|
|
2254
|
+
// Boolean attributes and "value" are not treated correctly in some XML documents
|
|
2255
|
+
if ( !el.querySelectorAll( "[selected]" ).length ) {
|
|
2256
|
+
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
|
2257
|
+
}
|
|
2432
2258
|
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
} );
|
|
2438
|
-
}
|
|
2259
|
+
// Support: iOS <=7 - 8 only
|
|
2260
|
+
if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
|
2261
|
+
rbuggyQSA.push( "~=" );
|
|
2262
|
+
}
|
|
2439
2263
|
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2264
|
+
// Support: iOS 8 only
|
|
2265
|
+
// https://bugs.webkit.org/show_bug.cgi?id=136851
|
|
2266
|
+
// In-page `selector#id sibling-combinator selector` fails
|
|
2267
|
+
if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
|
|
2268
|
+
rbuggyQSA.push( ".#.+[+~]" );
|
|
2269
|
+
}
|
|
2445
2270
|
|
|
2446
|
-
|
|
2271
|
+
// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
|
|
2272
|
+
// In some of the document kinds, these selectors wouldn't work natively.
|
|
2273
|
+
// This is probably OK but for backwards compatibility we want to maintain
|
|
2274
|
+
// handling them through jQuery traversal in jQuery 3.x.
|
|
2275
|
+
if ( !el.querySelectorAll( ":checked" ).length ) {
|
|
2276
|
+
rbuggyQSA.push( ":checked" );
|
|
2277
|
+
}
|
|
2447
2278
|
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2279
|
+
// Support: Windows 8 Native Apps
|
|
2280
|
+
// The type and name attributes are restricted during .innerHTML assignment
|
|
2281
|
+
input = document.createElement( "input" );
|
|
2282
|
+
input.setAttribute( "type", "hidden" );
|
|
2283
|
+
el.appendChild( input ).setAttribute( "name", "D" );
|
|
2284
|
+
|
|
2285
|
+
// Support: IE 9 - 11+
|
|
2286
|
+
// IE's :disabled selector does not pick up the children of disabled fieldsets
|
|
2287
|
+
// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
|
|
2288
|
+
// In some of the document kinds, these selectors wouldn't work natively.
|
|
2289
|
+
// This is probably OK but for backwards compatibility we want to maintain
|
|
2290
|
+
// handling them through jQuery traversal in jQuery 3.x.
|
|
2291
|
+
documentElement.appendChild( el ).disabled = true;
|
|
2292
|
+
if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
|
|
2293
|
+
rbuggyQSA.push( ":enabled", ":disabled" );
|
|
2294
|
+
}
|
|
2451
2295
|
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2296
|
+
// Support: IE 11+, Edge 15 - 18+
|
|
2297
|
+
// IE 11/Edge don't find elements on a `[name='']` query in some cases.
|
|
2298
|
+
// Adding a temporary attribute to the document before the selection works
|
|
2299
|
+
// around the issue.
|
|
2300
|
+
// Interestingly, IE 10 & older don't seem to have the issue.
|
|
2301
|
+
input = document.createElement( "input" );
|
|
2302
|
+
input.setAttribute( "name", "" );
|
|
2303
|
+
el.appendChild( input );
|
|
2304
|
+
if ( !el.querySelectorAll( "[name='']" ).length ) {
|
|
2305
|
+
rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
|
|
2306
|
+
whitespace + "*(?:''|\"\")" );
|
|
2307
|
+
}
|
|
2308
|
+
} );
|
|
2458
2309
|
|
|
2459
|
-
if ( !support.
|
|
2310
|
+
if ( !support.cssHas ) {
|
|
2460
2311
|
|
|
2461
|
-
// Support: Chrome 105+, Safari 15.4+
|
|
2462
|
-
//
|
|
2463
|
-
//
|
|
2464
|
-
//
|
|
2465
|
-
//
|
|
2466
|
-
//
|
|
2312
|
+
// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+
|
|
2313
|
+
// Our regular `try-catch` mechanism fails to detect natively-unsupported
|
|
2314
|
+
// pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`)
|
|
2315
|
+
// in browsers that parse the `:has()` argument as a forgiving selector list.
|
|
2316
|
+
// https://drafts.csswg.org/selectors/#relational now requires the argument
|
|
2317
|
+
// to be parsed unforgivingly, but browsers have not yet fully adjusted.
|
|
2467
2318
|
rbuggyQSA.push( ":has" );
|
|
2468
2319
|
}
|
|
2469
2320
|
|
|
2470
2321
|
rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
|
|
2471
|
-
rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) );
|
|
2472
|
-
|
|
2473
|
-
/* Contains
|
|
2474
|
-
---------------------------------------------------------------------- */
|
|
2475
|
-
hasCompare = rnative.test( docElem.compareDocumentPosition );
|
|
2476
|
-
|
|
2477
|
-
// Element contains another
|
|
2478
|
-
// Purposefully self-exclusive
|
|
2479
|
-
// As in, an element does not contain itself
|
|
2480
|
-
contains = hasCompare || rnative.test( docElem.contains ) ?
|
|
2481
|
-
function( a, b ) {
|
|
2482
|
-
|
|
2483
|
-
// Support: IE <9 only
|
|
2484
|
-
// IE doesn't have `contains` on `document` so we need to check for
|
|
2485
|
-
// `documentElement` presence.
|
|
2486
|
-
// We need to fall back to `a` when `documentElement` is missing
|
|
2487
|
-
// as `ownerDocument` of elements within `<template/>` may have
|
|
2488
|
-
// a null one - a default behavior of all modern browsers.
|
|
2489
|
-
var adown = a.nodeType === 9 && a.documentElement || a,
|
|
2490
|
-
bup = b && b.parentNode;
|
|
2491
|
-
return a === bup || !!( bup && bup.nodeType === 1 && (
|
|
2492
|
-
adown.contains ?
|
|
2493
|
-
adown.contains( bup ) :
|
|
2494
|
-
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
|
2495
|
-
) );
|
|
2496
|
-
} :
|
|
2497
|
-
function( a, b ) {
|
|
2498
|
-
if ( b ) {
|
|
2499
|
-
while ( ( b = b.parentNode ) ) {
|
|
2500
|
-
if ( b === a ) {
|
|
2501
|
-
return true;
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
}
|
|
2505
|
-
return false;
|
|
2506
|
-
};
|
|
2507
2322
|
|
|
2508
2323
|
/* Sorting
|
|
2509
2324
|
---------------------------------------------------------------------- */
|
|
2510
2325
|
|
|
2511
2326
|
// Document order sorting
|
|
2512
|
-
sortOrder =
|
|
2513
|
-
function( a, b ) {
|
|
2327
|
+
sortOrder = function( a, b ) {
|
|
2514
2328
|
|
|
2515
2329
|
// Flag for duplicate removal
|
|
2516
2330
|
if ( a === b ) {
|
|
@@ -2544,8 +2358,8 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
2544
2358
|
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
|
2545
2359
|
// two documents; shallow comparisons work.
|
|
2546
2360
|
// eslint-disable-next-line eqeqeq
|
|
2547
|
-
if ( a
|
|
2548
|
-
contains( preferredDoc, a ) ) {
|
|
2361
|
+
if ( a === document || a.ownerDocument == preferredDoc &&
|
|
2362
|
+
find.contains( preferredDoc, a ) ) {
|
|
2549
2363
|
return -1;
|
|
2550
2364
|
}
|
|
2551
2365
|
|
|
@@ -2553,100 +2367,33 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
2553
2367
|
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
|
2554
2368
|
// two documents; shallow comparisons work.
|
|
2555
2369
|
// eslint-disable-next-line eqeqeq
|
|
2556
|
-
if ( b
|
|
2557
|
-
contains( preferredDoc, b ) ) {
|
|
2370
|
+
if ( b === document || b.ownerDocument == preferredDoc &&
|
|
2371
|
+
find.contains( preferredDoc, b ) ) {
|
|
2558
2372
|
return 1;
|
|
2559
2373
|
}
|
|
2560
2374
|
|
|
2561
2375
|
// Maintain original order
|
|
2562
2376
|
return sortInput ?
|
|
2563
|
-
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
|
2377
|
+
( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
|
|
2564
2378
|
0;
|
|
2565
2379
|
}
|
|
2566
2380
|
|
|
2567
2381
|
return compare & 4 ? -1 : 1;
|
|
2568
|
-
} :
|
|
2569
|
-
function( a, b ) {
|
|
2570
|
-
|
|
2571
|
-
// Exit early if the nodes are identical
|
|
2572
|
-
if ( a === b ) {
|
|
2573
|
-
hasDuplicate = true;
|
|
2574
|
-
return 0;
|
|
2575
|
-
}
|
|
2576
|
-
|
|
2577
|
-
var cur,
|
|
2578
|
-
i = 0,
|
|
2579
|
-
aup = a.parentNode,
|
|
2580
|
-
bup = b.parentNode,
|
|
2581
|
-
ap = [ a ],
|
|
2582
|
-
bp = [ b ];
|
|
2583
|
-
|
|
2584
|
-
// Parentless nodes are either documents or disconnected
|
|
2585
|
-
if ( !aup || !bup ) {
|
|
2586
|
-
|
|
2587
|
-
// Support: IE 11+, Edge 17 - 18+
|
|
2588
|
-
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
|
2589
|
-
// two documents; shallow comparisons work.
|
|
2590
|
-
/* eslint-disable eqeqeq */
|
|
2591
|
-
return a == document ? -1 :
|
|
2592
|
-
b == document ? 1 :
|
|
2593
|
-
/* eslint-enable eqeqeq */
|
|
2594
|
-
aup ? -1 :
|
|
2595
|
-
bup ? 1 :
|
|
2596
|
-
sortInput ?
|
|
2597
|
-
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
|
2598
|
-
0;
|
|
2599
|
-
|
|
2600
|
-
// If the nodes are siblings, we can do a quick check
|
|
2601
|
-
} else if ( aup === bup ) {
|
|
2602
|
-
return siblingCheck( a, b );
|
|
2603
|
-
}
|
|
2604
|
-
|
|
2605
|
-
// Otherwise we need full lists of their ancestors for comparison
|
|
2606
|
-
cur = a;
|
|
2607
|
-
while ( ( cur = cur.parentNode ) ) {
|
|
2608
|
-
ap.unshift( cur );
|
|
2609
|
-
}
|
|
2610
|
-
cur = b;
|
|
2611
|
-
while ( ( cur = cur.parentNode ) ) {
|
|
2612
|
-
bp.unshift( cur );
|
|
2613
|
-
}
|
|
2614
|
-
|
|
2615
|
-
// Walk down the tree looking for a discrepancy
|
|
2616
|
-
while ( ap[ i ] === bp[ i ] ) {
|
|
2617
|
-
i++;
|
|
2618
|
-
}
|
|
2619
|
-
|
|
2620
|
-
return i ?
|
|
2621
|
-
|
|
2622
|
-
// Do a sibling check if the nodes have a common ancestor
|
|
2623
|
-
siblingCheck( ap[ i ], bp[ i ] ) :
|
|
2624
|
-
|
|
2625
|
-
// Otherwise nodes in our document sort first
|
|
2626
|
-
// Support: IE 11+, Edge 17 - 18+
|
|
2627
|
-
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
|
2628
|
-
// two documents; shallow comparisons work.
|
|
2629
|
-
/* eslint-disable eqeqeq */
|
|
2630
|
-
ap[ i ] == preferredDoc ? -1 :
|
|
2631
|
-
bp[ i ] == preferredDoc ? 1 :
|
|
2632
|
-
/* eslint-enable eqeqeq */
|
|
2633
|
-
0;
|
|
2634
2382
|
};
|
|
2635
2383
|
|
|
2636
2384
|
return document;
|
|
2637
|
-
}
|
|
2385
|
+
}
|
|
2638
2386
|
|
|
2639
|
-
|
|
2640
|
-
return
|
|
2387
|
+
find.matches = function( expr, elements ) {
|
|
2388
|
+
return find( expr, null, null, elements );
|
|
2641
2389
|
};
|
|
2642
2390
|
|
|
2643
|
-
|
|
2391
|
+
find.matchesSelector = function( elem, expr ) {
|
|
2644
2392
|
setDocument( elem );
|
|
2645
2393
|
|
|
2646
|
-
if (
|
|
2394
|
+
if ( documentIsHTML &&
|
|
2647
2395
|
!nonnativeSelectorCache[ expr + " " ] &&
|
|
2648
|
-
( !
|
|
2649
|
-
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
|
2396
|
+
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
|
2650
2397
|
|
|
2651
2398
|
try {
|
|
2652
2399
|
var ret = matches.call( elem, expr );
|
|
@@ -2654,9 +2401,9 @@ Sizzle.matchesSelector = function( elem, expr ) {
|
|
|
2654
2401
|
// IE 9's matchesSelector returns false on disconnected nodes
|
|
2655
2402
|
if ( ret || support.disconnectedMatch ||
|
|
2656
2403
|
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2404
|
+
// As well, disconnected nodes are said to be in a document
|
|
2405
|
+
// fragment in IE 9
|
|
2406
|
+
elem.document && elem.document.nodeType !== 11 ) {
|
|
2660
2407
|
return ret;
|
|
2661
2408
|
}
|
|
2662
2409
|
} catch ( e ) {
|
|
@@ -2664,10 +2411,10 @@ Sizzle.matchesSelector = function( elem, expr ) {
|
|
|
2664
2411
|
}
|
|
2665
2412
|
}
|
|
2666
2413
|
|
|
2667
|
-
return
|
|
2414
|
+
return find( expr, document, null, [ elem ] ).length > 0;
|
|
2668
2415
|
};
|
|
2669
2416
|
|
|
2670
|
-
|
|
2417
|
+
find.contains = function( context, elem ) {
|
|
2671
2418
|
|
|
2672
2419
|
// Set document vars if needed
|
|
2673
2420
|
// Support: IE 11+, Edge 17 - 18+
|
|
@@ -2677,10 +2424,11 @@ Sizzle.contains = function( context, elem ) {
|
|
|
2677
2424
|
if ( ( context.ownerDocument || context ) != document ) {
|
|
2678
2425
|
setDocument( context );
|
|
2679
2426
|
}
|
|
2680
|
-
return contains( context, elem );
|
|
2427
|
+
return jQuery.contains( context, elem );
|
|
2681
2428
|
};
|
|
2682
2429
|
|
|
2683
|
-
|
|
2430
|
+
|
|
2431
|
+
find.attr = function( elem, name ) {
|
|
2684
2432
|
|
|
2685
2433
|
// Set document vars if needed
|
|
2686
2434
|
// Support: IE 11+, Edge 17 - 18+
|
|
@@ -2693,25 +2441,19 @@ Sizzle.attr = function( elem, name ) {
|
|
|
2693
2441
|
|
|
2694
2442
|
var fn = Expr.attrHandle[ name.toLowerCase() ],
|
|
2695
2443
|
|
|
2696
|
-
// Don't get fooled by Object.prototype properties (
|
|
2444
|
+
// Don't get fooled by Object.prototype properties (see trac-13807)
|
|
2697
2445
|
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
|
|
2698
2446
|
fn( elem, name, !documentIsHTML ) :
|
|
2699
2447
|
undefined;
|
|
2700
2448
|
|
|
2701
|
-
|
|
2702
|
-
val
|
|
2703
|
-
|
|
2704
|
-
elem.getAttribute( name ) :
|
|
2705
|
-
( val = elem.getAttributeNode( name ) ) && val.specified ?
|
|
2706
|
-
val.value :
|
|
2707
|
-
null;
|
|
2708
|
-
};
|
|
2449
|
+
if ( val !== undefined ) {
|
|
2450
|
+
return val;
|
|
2451
|
+
}
|
|
2709
2452
|
|
|
2710
|
-
|
|
2711
|
-
return ( sel + "" ).replace( rcssescape, fcssescape );
|
|
2453
|
+
return elem.getAttribute( name );
|
|
2712
2454
|
};
|
|
2713
2455
|
|
|
2714
|
-
|
|
2456
|
+
find.error = function( msg ) {
|
|
2715
2457
|
throw new Error( "Syntax error, unrecognized expression: " + msg );
|
|
2716
2458
|
};
|
|
2717
2459
|
|
|
@@ -2719,16 +2461,20 @@ Sizzle.error = function( msg ) {
|
|
|
2719
2461
|
* Document sorting and removing duplicates
|
|
2720
2462
|
* @param {ArrayLike} results
|
|
2721
2463
|
*/
|
|
2722
|
-
|
|
2464
|
+
jQuery.uniqueSort = function( results ) {
|
|
2723
2465
|
var elem,
|
|
2724
2466
|
duplicates = [],
|
|
2725
2467
|
j = 0,
|
|
2726
2468
|
i = 0;
|
|
2727
2469
|
|
|
2728
2470
|
// Unless we *know* we can detect duplicates, assume their presence
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2471
|
+
//
|
|
2472
|
+
// Support: Android <=4.0+
|
|
2473
|
+
// Testing for detecting duplicates is unpredictable so instead assume we can't
|
|
2474
|
+
// depend on duplicate detection in all browsers without a stable sort.
|
|
2475
|
+
hasDuplicate = !support.sortStable;
|
|
2476
|
+
sortInput = !support.sortStable && slice.call( results, 0 );
|
|
2477
|
+
sort.call( results, sortOrder );
|
|
2732
2478
|
|
|
2733
2479
|
if ( hasDuplicate ) {
|
|
2734
2480
|
while ( ( elem = results[ i++ ] ) ) {
|
|
@@ -2737,7 +2483,7 @@ Sizzle.uniqueSort = function( results ) {
|
|
|
2737
2483
|
}
|
|
2738
2484
|
}
|
|
2739
2485
|
while ( j-- ) {
|
|
2740
|
-
|
|
2486
|
+
splice.call( results, duplicates[ j ], 1 );
|
|
2741
2487
|
}
|
|
2742
2488
|
}
|
|
2743
2489
|
|
|
@@ -2748,47 +2494,11 @@ Sizzle.uniqueSort = function( results ) {
|
|
|
2748
2494
|
return results;
|
|
2749
2495
|
};
|
|
2750
2496
|
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
* @param {Array|Element} elem
|
|
2754
|
-
*/
|
|
2755
|
-
getText = Sizzle.getText = function( elem ) {
|
|
2756
|
-
var node,
|
|
2757
|
-
ret = "",
|
|
2758
|
-
i = 0,
|
|
2759
|
-
nodeType = elem.nodeType;
|
|
2760
|
-
|
|
2761
|
-
if ( !nodeType ) {
|
|
2762
|
-
|
|
2763
|
-
// If no nodeType, this is expected to be an array
|
|
2764
|
-
while ( ( node = elem[ i++ ] ) ) {
|
|
2765
|
-
|
|
2766
|
-
// Do not traverse comment nodes
|
|
2767
|
-
ret += getText( node );
|
|
2768
|
-
}
|
|
2769
|
-
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
|
|
2770
|
-
|
|
2771
|
-
// Use textContent for elements
|
|
2772
|
-
// innerText usage removed for consistency of new lines (jQuery #11153)
|
|
2773
|
-
if ( typeof elem.textContent === "string" ) {
|
|
2774
|
-
return elem.textContent;
|
|
2775
|
-
} else {
|
|
2776
|
-
|
|
2777
|
-
// Traverse its children
|
|
2778
|
-
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
|
2779
|
-
ret += getText( elem );
|
|
2780
|
-
}
|
|
2781
|
-
}
|
|
2782
|
-
} else if ( nodeType === 3 || nodeType === 4 ) {
|
|
2783
|
-
return elem.nodeValue;
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2786
|
-
// Do not include comment or processing instruction nodes
|
|
2787
|
-
|
|
2788
|
-
return ret;
|
|
2497
|
+
jQuery.fn.uniqueSort = function() {
|
|
2498
|
+
return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );
|
|
2789
2499
|
};
|
|
2790
2500
|
|
|
2791
|
-
Expr =
|
|
2501
|
+
Expr = jQuery.expr = {
|
|
2792
2502
|
|
|
2793
2503
|
// Can be adjusted by the user
|
|
2794
2504
|
cacheLength: 50,
|
|
@@ -2809,12 +2519,12 @@ Expr = Sizzle.selectors = {
|
|
|
2809
2519
|
},
|
|
2810
2520
|
|
|
2811
2521
|
preFilter: {
|
|
2812
|
-
|
|
2522
|
+
ATTR: function( match ) {
|
|
2813
2523
|
match[ 1 ] = match[ 1 ].replace( runescape, funescape );
|
|
2814
2524
|
|
|
2815
2525
|
// Move the given value to match[3] whether quoted or unquoted
|
|
2816
|
-
match[ 3 ] = ( match[ 3 ] || match[ 4 ] ||
|
|
2817
|
-
|
|
2526
|
+
match[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" )
|
|
2527
|
+
.replace( runescape, funescape );
|
|
2818
2528
|
|
|
2819
2529
|
if ( match[ 2 ] === "~=" ) {
|
|
2820
2530
|
match[ 3 ] = " " + match[ 3 ] + " ";
|
|
@@ -2823,7 +2533,7 @@ Expr = Sizzle.selectors = {
|
|
|
2823
2533
|
return match.slice( 0, 4 );
|
|
2824
2534
|
},
|
|
2825
2535
|
|
|
2826
|
-
|
|
2536
|
+
CHILD: function( match ) {
|
|
2827
2537
|
|
|
2828
2538
|
/* matches from matchExpr["CHILD"]
|
|
2829
2539
|
1 type (only|nth|...)
|
|
@@ -2841,29 +2551,30 @@ Expr = Sizzle.selectors = {
|
|
|
2841
2551
|
|
|
2842
2552
|
// nth-* requires argument
|
|
2843
2553
|
if ( !match[ 3 ] ) {
|
|
2844
|
-
|
|
2554
|
+
find.error( match[ 0 ] );
|
|
2845
2555
|
}
|
|
2846
2556
|
|
|
2847
2557
|
// numeric x and y parameters for Expr.filter.CHILD
|
|
2848
2558
|
// remember that false/true cast respectively to 0/1
|
|
2849
2559
|
match[ 4 ] = +( match[ 4 ] ?
|
|
2850
2560
|
match[ 5 ] + ( match[ 6 ] || 1 ) :
|
|
2851
|
-
2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
|
|
2561
|
+
2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
|
|
2562
|
+
);
|
|
2852
2563
|
match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );
|
|
2853
2564
|
|
|
2854
|
-
|
|
2565
|
+
// other types prohibit arguments
|
|
2855
2566
|
} else if ( match[ 3 ] ) {
|
|
2856
|
-
|
|
2567
|
+
find.error( match[ 0 ] );
|
|
2857
2568
|
}
|
|
2858
2569
|
|
|
2859
2570
|
return match;
|
|
2860
2571
|
},
|
|
2861
2572
|
|
|
2862
|
-
|
|
2573
|
+
PSEUDO: function( match ) {
|
|
2863
2574
|
var excess,
|
|
2864
2575
|
unquoted = !match[ 6 ] && match[ 2 ];
|
|
2865
2576
|
|
|
2866
|
-
if ( matchExpr
|
|
2577
|
+
if ( matchExpr.CHILD.test( match[ 0 ] ) ) {
|
|
2867
2578
|
return null;
|
|
2868
2579
|
}
|
|
2869
2580
|
|
|
@@ -2892,36 +2603,36 @@ Expr = Sizzle.selectors = {
|
|
|
2892
2603
|
|
|
2893
2604
|
filter: {
|
|
2894
2605
|
|
|
2895
|
-
|
|
2896
|
-
var
|
|
2606
|
+
TAG: function( nodeNameSelector ) {
|
|
2607
|
+
var expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
|
|
2897
2608
|
return nodeNameSelector === "*" ?
|
|
2898
2609
|
function() {
|
|
2899
2610
|
return true;
|
|
2900
2611
|
} :
|
|
2901
2612
|
function( elem ) {
|
|
2902
|
-
return
|
|
2613
|
+
return nodeName( elem, expectedNodeName );
|
|
2903
2614
|
};
|
|
2904
2615
|
},
|
|
2905
2616
|
|
|
2906
|
-
|
|
2617
|
+
CLASS: function( className ) {
|
|
2907
2618
|
var pattern = classCache[ className + " " ];
|
|
2908
2619
|
|
|
2909
2620
|
return pattern ||
|
|
2910
|
-
( pattern = new RegExp( "(^|" + whitespace +
|
|
2911
|
-
"
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2621
|
+
( pattern = new RegExp( "(^|" + whitespace + ")" + className +
|
|
2622
|
+
"(" + whitespace + "|$)" ) ) &&
|
|
2623
|
+
classCache( className, function( elem ) {
|
|
2624
|
+
return pattern.test(
|
|
2625
|
+
typeof elem.className === "string" && elem.className ||
|
|
2626
|
+
typeof elem.getAttribute !== "undefined" &&
|
|
2627
|
+
elem.getAttribute( "class" ) ||
|
|
2628
|
+
""
|
|
2629
|
+
);
|
|
2919
2630
|
} );
|
|
2920
2631
|
},
|
|
2921
2632
|
|
|
2922
|
-
|
|
2633
|
+
ATTR: function( name, operator, check ) {
|
|
2923
2634
|
return function( elem ) {
|
|
2924
|
-
var result =
|
|
2635
|
+
var result = find.attr( elem, name );
|
|
2925
2636
|
|
|
2926
2637
|
if ( result == null ) {
|
|
2927
2638
|
return operator === "!=";
|
|
@@ -2932,22 +2643,34 @@ Expr = Sizzle.selectors = {
|
|
|
2932
2643
|
|
|
2933
2644
|
result += "";
|
|
2934
2645
|
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2646
|
+
if ( operator === "=" ) {
|
|
2647
|
+
return result === check;
|
|
2648
|
+
}
|
|
2649
|
+
if ( operator === "!=" ) {
|
|
2650
|
+
return result !== check;
|
|
2651
|
+
}
|
|
2652
|
+
if ( operator === "^=" ) {
|
|
2653
|
+
return check && result.indexOf( check ) === 0;
|
|
2654
|
+
}
|
|
2655
|
+
if ( operator === "*=" ) {
|
|
2656
|
+
return check && result.indexOf( check ) > -1;
|
|
2657
|
+
}
|
|
2658
|
+
if ( operator === "$=" ) {
|
|
2659
|
+
return check && result.slice( -check.length ) === check;
|
|
2660
|
+
}
|
|
2661
|
+
if ( operator === "~=" ) {
|
|
2662
|
+
return ( " " + result.replace( rwhitespace, " " ) + " " )
|
|
2663
|
+
.indexOf( check ) > -1;
|
|
2664
|
+
}
|
|
2665
|
+
if ( operator === "|=" ) {
|
|
2666
|
+
return result === check || result.slice( 0, check.length + 1 ) === check + "-";
|
|
2667
|
+
}
|
|
2946
2668
|
|
|
2669
|
+
return false;
|
|
2947
2670
|
};
|
|
2948
2671
|
},
|
|
2949
2672
|
|
|
2950
|
-
|
|
2673
|
+
CHILD: function( type, what, _argument, first, last ) {
|
|
2951
2674
|
var simple = type.slice( 0, 3 ) !== "nth",
|
|
2952
2675
|
forward = type.slice( -4 ) !== "last",
|
|
2953
2676
|
ofType = what === "of-type";
|
|
@@ -2960,7 +2683,7 @@ Expr = Sizzle.selectors = {
|
|
|
2960
2683
|
} :
|
|
2961
2684
|
|
|
2962
2685
|
function( elem, _context, xml ) {
|
|
2963
|
-
var cache,
|
|
2686
|
+
var cache, outerCache, node, nodeIndex, start,
|
|
2964
2687
|
dir = simple !== forward ? "nextSibling" : "previousSibling",
|
|
2965
2688
|
parent = elem.parentNode,
|
|
2966
2689
|
name = ofType && elem.nodeName.toLowerCase(),
|
|
@@ -2975,7 +2698,7 @@ Expr = Sizzle.selectors = {
|
|
|
2975
2698
|
node = elem;
|
|
2976
2699
|
while ( ( node = node[ dir ] ) ) {
|
|
2977
2700
|
if ( ofType ?
|
|
2978
|
-
|
|
2701
|
+
nodeName( node, name ) :
|
|
2979
2702
|
node.nodeType === 1 ) {
|
|
2980
2703
|
|
|
2981
2704
|
return false;
|
|
@@ -2994,17 +2717,8 @@ Expr = Sizzle.selectors = {
|
|
|
2994
2717
|
if ( forward && useCache ) {
|
|
2995
2718
|
|
|
2996
2719
|
// Seek `elem` from a previously-cached index
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
node = parent;
|
|
3000
|
-
outerCache = node[ expando ] || ( node[ expando ] = {} );
|
|
3001
|
-
|
|
3002
|
-
// Support: IE <9 only
|
|
3003
|
-
// Defend against cloned attroperties (jQuery gh-1709)
|
|
3004
|
-
uniqueCache = outerCache[ node.uniqueID ] ||
|
|
3005
|
-
( outerCache[ node.uniqueID ] = {} );
|
|
3006
|
-
|
|
3007
|
-
cache = uniqueCache[ type ] || [];
|
|
2720
|
+
outerCache = parent[ expando ] || ( parent[ expando ] = {} );
|
|
2721
|
+
cache = outerCache[ type ] || [];
|
|
3008
2722
|
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
|
3009
2723
|
diff = nodeIndex && cache[ 2 ];
|
|
3010
2724
|
node = nodeIndex && parent.childNodes[ nodeIndex ];
|
|
@@ -3016,7 +2730,7 @@ Expr = Sizzle.selectors = {
|
|
|
3016
2730
|
|
|
3017
2731
|
// When found, cache indexes on `parent` and break
|
|
3018
2732
|
if ( node.nodeType === 1 && ++diff && node === elem ) {
|
|
3019
|
-
|
|
2733
|
+
outerCache[ type ] = [ dirruns, nodeIndex, diff ];
|
|
3020
2734
|
break;
|
|
3021
2735
|
}
|
|
3022
2736
|
}
|
|
@@ -3025,17 +2739,8 @@ Expr = Sizzle.selectors = {
|
|
|
3025
2739
|
|
|
3026
2740
|
// Use previously-cached element index if available
|
|
3027
2741
|
if ( useCache ) {
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
node = elem;
|
|
3031
|
-
outerCache = node[ expando ] || ( node[ expando ] = {} );
|
|
3032
|
-
|
|
3033
|
-
// Support: IE <9 only
|
|
3034
|
-
// Defend against cloned attroperties (jQuery gh-1709)
|
|
3035
|
-
uniqueCache = outerCache[ node.uniqueID ] ||
|
|
3036
|
-
( outerCache[ node.uniqueID ] = {} );
|
|
3037
|
-
|
|
3038
|
-
cache = uniqueCache[ type ] || [];
|
|
2742
|
+
outerCache = elem[ expando ] || ( elem[ expando ] = {} );
|
|
2743
|
+
cache = outerCache[ type ] || [];
|
|
3039
2744
|
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
|
3040
2745
|
diff = nodeIndex;
|
|
3041
2746
|
}
|
|
@@ -3049,7 +2754,7 @@ Expr = Sizzle.selectors = {
|
|
|
3049
2754
|
( diff = nodeIndex = 0 ) || start.pop() ) ) {
|
|
3050
2755
|
|
|
3051
2756
|
if ( ( ofType ?
|
|
3052
|
-
|
|
2757
|
+
nodeName( node, name ) :
|
|
3053
2758
|
node.nodeType === 1 ) &&
|
|
3054
2759
|
++diff ) {
|
|
3055
2760
|
|
|
@@ -3057,13 +2762,7 @@ Expr = Sizzle.selectors = {
|
|
|
3057
2762
|
if ( useCache ) {
|
|
3058
2763
|
outerCache = node[ expando ] ||
|
|
3059
2764
|
( node[ expando ] = {} );
|
|
3060
|
-
|
|
3061
|
-
// Support: IE <9 only
|
|
3062
|
-
// Defend against cloned attroperties (jQuery gh-1709)
|
|
3063
|
-
uniqueCache = outerCache[ node.uniqueID ] ||
|
|
3064
|
-
( outerCache[ node.uniqueID ] = {} );
|
|
3065
|
-
|
|
3066
|
-
uniqueCache[ type ] = [ dirruns, diff ];
|
|
2765
|
+
outerCache[ type ] = [ dirruns, diff ];
|
|
3067
2766
|
}
|
|
3068
2767
|
|
|
3069
2768
|
if ( node === elem ) {
|
|
@@ -3081,19 +2780,19 @@ Expr = Sizzle.selectors = {
|
|
|
3081
2780
|
};
|
|
3082
2781
|
},
|
|
3083
2782
|
|
|
3084
|
-
|
|
2783
|
+
PSEUDO: function( pseudo, argument ) {
|
|
3085
2784
|
|
|
3086
2785
|
// pseudo-class names are case-insensitive
|
|
3087
|
-
//
|
|
2786
|
+
// https://www.w3.org/TR/selectors/#pseudo-classes
|
|
3088
2787
|
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
|
|
3089
2788
|
// Remember that setFilters inherits from pseudos
|
|
3090
2789
|
var args,
|
|
3091
2790
|
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
|
|
3092
|
-
|
|
2791
|
+
find.error( "unsupported pseudo: " + pseudo );
|
|
3093
2792
|
|
|
3094
2793
|
// The user may use createPseudo to indicate that
|
|
3095
2794
|
// arguments are needed to create the filter function
|
|
3096
|
-
// just as
|
|
2795
|
+
// just as jQuery does
|
|
3097
2796
|
if ( fn[ expando ] ) {
|
|
3098
2797
|
return fn( argument );
|
|
3099
2798
|
}
|
|
@@ -3107,7 +2806,7 @@ Expr = Sizzle.selectors = {
|
|
|
3107
2806
|
matched = fn( seed, argument ),
|
|
3108
2807
|
i = matched.length;
|
|
3109
2808
|
while ( i-- ) {
|
|
3110
|
-
idx = indexOf( seed, matched[ i ] );
|
|
2809
|
+
idx = indexOf.call( seed, matched[ i ] );
|
|
3111
2810
|
seed[ idx ] = !( matches[ idx ] = matched[ i ] );
|
|
3112
2811
|
}
|
|
3113
2812
|
} ) :
|
|
@@ -3123,14 +2822,14 @@ Expr = Sizzle.selectors = {
|
|
|
3123
2822
|
pseudos: {
|
|
3124
2823
|
|
|
3125
2824
|
// Potentially complex pseudos
|
|
3126
|
-
|
|
2825
|
+
not: markFunction( function( selector ) {
|
|
3127
2826
|
|
|
3128
2827
|
// Trim the selector passed to compile
|
|
3129
2828
|
// to avoid treating leading and trailing
|
|
3130
2829
|
// spaces as combinators
|
|
3131
2830
|
var input = [],
|
|
3132
2831
|
results = [],
|
|
3133
|
-
matcher = compile( selector.replace(
|
|
2832
|
+
matcher = compile( selector.replace( rtrimCSS, "$1" ) );
|
|
3134
2833
|
|
|
3135
2834
|
return matcher[ expando ] ?
|
|
3136
2835
|
markFunction( function( seed, matches, _context, xml ) {
|
|
@@ -3149,22 +2848,23 @@ Expr = Sizzle.selectors = {
|
|
|
3149
2848
|
input[ 0 ] = elem;
|
|
3150
2849
|
matcher( input, null, xml, results );
|
|
3151
2850
|
|
|
3152
|
-
// Don't keep the element
|
|
2851
|
+
// Don't keep the element
|
|
2852
|
+
// (see https://github.com/jquery/sizzle/issues/299)
|
|
3153
2853
|
input[ 0 ] = null;
|
|
3154
2854
|
return !results.pop();
|
|
3155
2855
|
};
|
|
3156
2856
|
} ),
|
|
3157
2857
|
|
|
3158
|
-
|
|
2858
|
+
has: markFunction( function( selector ) {
|
|
3159
2859
|
return function( elem ) {
|
|
3160
|
-
return
|
|
2860
|
+
return find( selector, elem ).length > 0;
|
|
3161
2861
|
};
|
|
3162
2862
|
} ),
|
|
3163
2863
|
|
|
3164
|
-
|
|
2864
|
+
contains: markFunction( function( text ) {
|
|
3165
2865
|
text = text.replace( runescape, funescape );
|
|
3166
2866
|
return function( elem ) {
|
|
3167
|
-
return ( elem.textContent ||
|
|
2867
|
+
return ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;
|
|
3168
2868
|
};
|
|
3169
2869
|
} ),
|
|
3170
2870
|
|
|
@@ -3174,12 +2874,12 @@ Expr = Sizzle.selectors = {
|
|
|
3174
2874
|
// or beginning with the identifier C immediately followed by "-".
|
|
3175
2875
|
// The matching of C against the element's language value is performed case-insensitively.
|
|
3176
2876
|
// The identifier C does not have to be a valid language name."
|
|
3177
|
-
//
|
|
3178
|
-
|
|
2877
|
+
// https://www.w3.org/TR/selectors/#lang-pseudo
|
|
2878
|
+
lang: markFunction( function( lang ) {
|
|
3179
2879
|
|
|
3180
2880
|
// lang value must be a valid identifier
|
|
3181
2881
|
if ( !ridentifier.test( lang || "" ) ) {
|
|
3182
|
-
|
|
2882
|
+
find.error( "unsupported lang: " + lang );
|
|
3183
2883
|
}
|
|
3184
2884
|
lang = lang.replace( runescape, funescape ).toLowerCase();
|
|
3185
2885
|
return function( elem ) {
|
|
@@ -3198,43 +2898,42 @@ Expr = Sizzle.selectors = {
|
|
|
3198
2898
|
} ),
|
|
3199
2899
|
|
|
3200
2900
|
// Miscellaneous
|
|
3201
|
-
|
|
2901
|
+
target: function( elem ) {
|
|
3202
2902
|
var hash = window.location && window.location.hash;
|
|
3203
2903
|
return hash && hash.slice( 1 ) === elem.id;
|
|
3204
2904
|
},
|
|
3205
2905
|
|
|
3206
|
-
|
|
3207
|
-
return elem ===
|
|
2906
|
+
root: function( elem ) {
|
|
2907
|
+
return elem === documentElement;
|
|
3208
2908
|
},
|
|
3209
2909
|
|
|
3210
|
-
|
|
3211
|
-
return elem ===
|
|
3212
|
-
|
|
2910
|
+
focus: function( elem ) {
|
|
2911
|
+
return elem === safeActiveElement() &&
|
|
2912
|
+
document.hasFocus() &&
|
|
3213
2913
|
!!( elem.type || elem.href || ~elem.tabIndex );
|
|
3214
2914
|
},
|
|
3215
2915
|
|
|
3216
2916
|
// Boolean properties
|
|
3217
|
-
|
|
3218
|
-
|
|
2917
|
+
enabled: createDisabledPseudo( false ),
|
|
2918
|
+
disabled: createDisabledPseudo( true ),
|
|
3219
2919
|
|
|
3220
|
-
|
|
2920
|
+
checked: function( elem ) {
|
|
3221
2921
|
|
|
3222
2922
|
// In CSS3, :checked should return both checked and selected elements
|
|
3223
|
-
//
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
( nodeName === "option" && !!elem.selected );
|
|
2923
|
+
// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
|
2924
|
+
return ( nodeName( elem, "input" ) && !!elem.checked ) ||
|
|
2925
|
+
( nodeName( elem, "option" ) && !!elem.selected );
|
|
3227
2926
|
},
|
|
3228
2927
|
|
|
3229
|
-
|
|
2928
|
+
selected: function( elem ) {
|
|
3230
2929
|
|
|
3231
2930
|
return elem.selected === true;
|
|
3232
2931
|
},
|
|
3233
2932
|
|
|
3234
2933
|
// Contents
|
|
3235
|
-
|
|
2934
|
+
empty: function( elem ) {
|
|
3236
2935
|
|
|
3237
|
-
//
|
|
2936
|
+
// https://www.w3.org/TR/selectors/#empty-pseudo
|
|
3238
2937
|
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
|
|
3239
2938
|
// but not by others (comment: 8; processing instruction: 7; etc.)
|
|
3240
2939
|
// nodeType < 6 works because attributes (2) do not appear as children
|
|
@@ -3246,49 +2945,49 @@ Expr = Sizzle.selectors = {
|
|
|
3246
2945
|
return true;
|
|
3247
2946
|
},
|
|
3248
2947
|
|
|
3249
|
-
|
|
3250
|
-
return !Expr.pseudos
|
|
2948
|
+
parent: function( elem ) {
|
|
2949
|
+
return !Expr.pseudos.empty( elem );
|
|
3251
2950
|
},
|
|
3252
2951
|
|
|
3253
2952
|
// Element/input types
|
|
3254
|
-
|
|
2953
|
+
header: function( elem ) {
|
|
3255
2954
|
return rheader.test( elem.nodeName );
|
|
3256
2955
|
},
|
|
3257
2956
|
|
|
3258
|
-
|
|
2957
|
+
input: function( elem ) {
|
|
3259
2958
|
return rinputs.test( elem.nodeName );
|
|
3260
2959
|
},
|
|
3261
2960
|
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
2961
|
+
button: function( elem ) {
|
|
2962
|
+
return nodeName( elem, "input" ) && elem.type === "button" ||
|
|
2963
|
+
nodeName( elem, "button" );
|
|
3265
2964
|
},
|
|
3266
2965
|
|
|
3267
|
-
|
|
2966
|
+
text: function( elem ) {
|
|
3268
2967
|
var attr;
|
|
3269
|
-
return
|
|
3270
|
-
elem.type === "text" &&
|
|
2968
|
+
return nodeName( elem, "input" ) && elem.type === "text" &&
|
|
3271
2969
|
|
|
3272
2970
|
// Support: IE <10 only
|
|
3273
|
-
// New HTML5 attribute values (e.g., "search") appear
|
|
2971
|
+
// New HTML5 attribute values (e.g., "search") appear
|
|
2972
|
+
// with elem.type === "text"
|
|
3274
2973
|
( ( attr = elem.getAttribute( "type" ) ) == null ||
|
|
3275
2974
|
attr.toLowerCase() === "text" );
|
|
3276
2975
|
},
|
|
3277
2976
|
|
|
3278
2977
|
// Position-in-collection
|
|
3279
|
-
|
|
2978
|
+
first: createPositionalPseudo( function() {
|
|
3280
2979
|
return [ 0 ];
|
|
3281
2980
|
} ),
|
|
3282
2981
|
|
|
3283
|
-
|
|
2982
|
+
last: createPositionalPseudo( function( _matchIndexes, length ) {
|
|
3284
2983
|
return [ length - 1 ];
|
|
3285
2984
|
} ),
|
|
3286
2985
|
|
|
3287
|
-
|
|
2986
|
+
eq: createPositionalPseudo( function( _matchIndexes, length, argument ) {
|
|
3288
2987
|
return [ argument < 0 ? argument + length : argument ];
|
|
3289
2988
|
} ),
|
|
3290
2989
|
|
|
3291
|
-
|
|
2990
|
+
even: createPositionalPseudo( function( matchIndexes, length ) {
|
|
3292
2991
|
var i = 0;
|
|
3293
2992
|
for ( ; i < length; i += 2 ) {
|
|
3294
2993
|
matchIndexes.push( i );
|
|
@@ -3296,7 +2995,7 @@ Expr = Sizzle.selectors = {
|
|
|
3296
2995
|
return matchIndexes;
|
|
3297
2996
|
} ),
|
|
3298
2997
|
|
|
3299
|
-
|
|
2998
|
+
odd: createPositionalPseudo( function( matchIndexes, length ) {
|
|
3300
2999
|
var i = 1;
|
|
3301
3000
|
for ( ; i < length; i += 2 ) {
|
|
3302
3001
|
matchIndexes.push( i );
|
|
@@ -3304,19 +3003,24 @@ Expr = Sizzle.selectors = {
|
|
|
3304
3003
|
return matchIndexes;
|
|
3305
3004
|
} ),
|
|
3306
3005
|
|
|
3307
|
-
|
|
3308
|
-
var i
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3006
|
+
lt: createPositionalPseudo( function( matchIndexes, length, argument ) {
|
|
3007
|
+
var i;
|
|
3008
|
+
|
|
3009
|
+
if ( argument < 0 ) {
|
|
3010
|
+
i = argument + length;
|
|
3011
|
+
} else if ( argument > length ) {
|
|
3012
|
+
i = length;
|
|
3013
|
+
} else {
|
|
3014
|
+
i = argument;
|
|
3015
|
+
}
|
|
3016
|
+
|
|
3313
3017
|
for ( ; --i >= 0; ) {
|
|
3314
3018
|
matchIndexes.push( i );
|
|
3315
3019
|
}
|
|
3316
3020
|
return matchIndexes;
|
|
3317
3021
|
} ),
|
|
3318
3022
|
|
|
3319
|
-
|
|
3023
|
+
gt: createPositionalPseudo( function( matchIndexes, length, argument ) {
|
|
3320
3024
|
var i = argument < 0 ? argument + length : argument;
|
|
3321
3025
|
for ( ; ++i < length; ) {
|
|
3322
3026
|
matchIndexes.push( i );
|
|
@@ -3326,7 +3030,7 @@ Expr = Sizzle.selectors = {
|
|
|
3326
3030
|
}
|
|
3327
3031
|
};
|
|
3328
3032
|
|
|
3329
|
-
Expr.pseudos
|
|
3033
|
+
Expr.pseudos.nth = Expr.pseudos.eq;
|
|
3330
3034
|
|
|
3331
3035
|
// Add button/input type pseudos
|
|
3332
3036
|
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
|
|
@@ -3341,7 +3045,7 @@ function setFilters() {}
|
|
|
3341
3045
|
setFilters.prototype = Expr.filters = Expr.pseudos;
|
|
3342
3046
|
Expr.setFilters = new setFilters();
|
|
3343
3047
|
|
|
3344
|
-
|
|
3048
|
+
function tokenize( selector, parseOnly ) {
|
|
3345
3049
|
var matched, match, tokens, type,
|
|
3346
3050
|
soFar, groups, preFilters,
|
|
3347
3051
|
cached = tokenCache[ selector + " " ];
|
|
@@ -3369,13 +3073,13 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
|
|
3369
3073
|
matched = false;
|
|
3370
3074
|
|
|
3371
3075
|
// Combinators
|
|
3372
|
-
if ( ( match =
|
|
3076
|
+
if ( ( match = rleadingCombinator.exec( soFar ) ) ) {
|
|
3373
3077
|
matched = match.shift();
|
|
3374
3078
|
tokens.push( {
|
|
3375
3079
|
value: matched,
|
|
3376
3080
|
|
|
3377
3081
|
// Cast descendant combinators to space
|
|
3378
|
-
type: match[ 0 ].replace(
|
|
3082
|
+
type: match[ 0 ].replace( rtrimCSS, " " )
|
|
3379
3083
|
} );
|
|
3380
3084
|
soFar = soFar.slice( matched.length );
|
|
3381
3085
|
}
|
|
@@ -3402,14 +3106,16 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
|
|
3402
3106
|
// Return the length of the invalid excess
|
|
3403
3107
|
// if we're just parsing
|
|
3404
3108
|
// Otherwise, throw an error or return tokens
|
|
3405
|
-
|
|
3406
|
-
soFar.length
|
|
3407
|
-
|
|
3408
|
-
Sizzle.error( selector ) :
|
|
3109
|
+
if ( parseOnly ) {
|
|
3110
|
+
return soFar.length;
|
|
3111
|
+
}
|
|
3409
3112
|
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3113
|
+
return soFar ?
|
|
3114
|
+
find.error( selector ) :
|
|
3115
|
+
|
|
3116
|
+
// Cache the tokens
|
|
3117
|
+
tokenCache( selector, groups ).slice( 0 );
|
|
3118
|
+
}
|
|
3413
3119
|
|
|
3414
3120
|
function toSelector( tokens ) {
|
|
3415
3121
|
var i = 0,
|
|
@@ -3442,7 +3148,7 @@ function addCombinator( matcher, combinator, base ) {
|
|
|
3442
3148
|
|
|
3443
3149
|
// Check against all ancestor/preceding elements
|
|
3444
3150
|
function( elem, context, xml ) {
|
|
3445
|
-
var oldCache,
|
|
3151
|
+
var oldCache, outerCache,
|
|
3446
3152
|
newCache = [ dirruns, doneName ];
|
|
3447
3153
|
|
|
3448
3154
|
// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
|
|
@@ -3459,14 +3165,9 @@ function addCombinator( matcher, combinator, base ) {
|
|
|
3459
3165
|
if ( elem.nodeType === 1 || checkNonElements ) {
|
|
3460
3166
|
outerCache = elem[ expando ] || ( elem[ expando ] = {} );
|
|
3461
3167
|
|
|
3462
|
-
|
|
3463
|
-
// Defend against cloned attroperties (jQuery gh-1709)
|
|
3464
|
-
uniqueCache = outerCache[ elem.uniqueID ] ||
|
|
3465
|
-
( outerCache[ elem.uniqueID ] = {} );
|
|
3466
|
-
|
|
3467
|
-
if ( skip && skip === elem.nodeName.toLowerCase() ) {
|
|
3168
|
+
if ( skip && nodeName( elem, skip ) ) {
|
|
3468
3169
|
elem = elem[ dir ] || elem;
|
|
3469
|
-
} else if ( ( oldCache =
|
|
3170
|
+
} else if ( ( oldCache = outerCache[ key ] ) &&
|
|
3470
3171
|
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
|
|
3471
3172
|
|
|
3472
3173
|
// Assign to newCache so results back-propagate to previous elements
|
|
@@ -3474,7 +3175,7 @@ function addCombinator( matcher, combinator, base ) {
|
|
|
3474
3175
|
} else {
|
|
3475
3176
|
|
|
3476
3177
|
// Reuse newcache so results back-propagate to previous elements
|
|
3477
|
-
|
|
3178
|
+
outerCache[ key ] = newCache;
|
|
3478
3179
|
|
|
3479
3180
|
// A match means we're done; a fail means we have to keep checking
|
|
3480
3181
|
if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
|
|
@@ -3506,7 +3207,7 @@ function multipleContexts( selector, contexts, results ) {
|
|
|
3506
3207
|
var i = 0,
|
|
3507
3208
|
len = contexts.length;
|
|
3508
3209
|
for ( ; i < len; i++ ) {
|
|
3509
|
-
|
|
3210
|
+
find( selector, contexts[ i ], results );
|
|
3510
3211
|
}
|
|
3511
3212
|
return results;
|
|
3512
3213
|
}
|
|
@@ -3540,38 +3241,37 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
|
|
|
3540
3241
|
postFinder = setMatcher( postFinder, postSelector );
|
|
3541
3242
|
}
|
|
3542
3243
|
return markFunction( function( seed, results, context, xml ) {
|
|
3543
|
-
var temp, i, elem,
|
|
3244
|
+
var temp, i, elem, matcherOut,
|
|
3544
3245
|
preMap = [],
|
|
3545
3246
|
postMap = [],
|
|
3546
3247
|
preexisting = results.length,
|
|
3547
3248
|
|
|
3548
3249
|
// Get initial elements from seed or context
|
|
3549
|
-
elems = seed ||
|
|
3550
|
-
selector || "*",
|
|
3551
|
-
|
|
3552
|
-
[]
|
|
3553
|
-
),
|
|
3250
|
+
elems = seed ||
|
|
3251
|
+
multipleContexts( selector || "*",
|
|
3252
|
+
context.nodeType ? [ context ] : context, [] ),
|
|
3554
3253
|
|
|
3555
3254
|
// Prefilter to get matcher input, preserving a map for seed-results synchronization
|
|
3556
3255
|
matcherIn = preFilter && ( seed || !selector ) ?
|
|
3557
3256
|
condense( elems, preMap, preFilter, context, xml ) :
|
|
3558
|
-
elems
|
|
3257
|
+
elems;
|
|
3559
3258
|
|
|
3560
|
-
|
|
3259
|
+
if ( matcher ) {
|
|
3561
3260
|
|
|
3562
|
-
|
|
3563
|
-
|
|
3261
|
+
// If we have a postFinder, or filtered seed, or non-seed postFilter
|
|
3262
|
+
// or preexisting results,
|
|
3263
|
+
matcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
|
|
3564
3264
|
|
|
3565
|
-
|
|
3566
|
-
|
|
3265
|
+
// ...intermediate processing is necessary
|
|
3266
|
+
[] :
|
|
3567
3267
|
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
matcherIn;
|
|
3268
|
+
// ...otherwise use results directly
|
|
3269
|
+
results;
|
|
3571
3270
|
|
|
3572
|
-
|
|
3573
|
-
if ( matcher ) {
|
|
3271
|
+
// Find primary matches
|
|
3574
3272
|
matcher( matcherIn, matcherOut, context, xml );
|
|
3273
|
+
} else {
|
|
3274
|
+
matcherOut = matcherIn;
|
|
3575
3275
|
}
|
|
3576
3276
|
|
|
3577
3277
|
// Apply postFilter
|
|
@@ -3609,7 +3309,7 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
|
|
|
3609
3309
|
i = matcherOut.length;
|
|
3610
3310
|
while ( i-- ) {
|
|
3611
3311
|
if ( ( elem = matcherOut[ i ] ) &&
|
|
3612
|
-
( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {
|
|
3312
|
+
( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {
|
|
3613
3313
|
|
|
3614
3314
|
seed[ temp ] = !( results[ temp ] = elem );
|
|
3615
3315
|
}
|
|
@@ -3644,15 +3344,21 @@ function matcherFromTokens( tokens ) {
|
|
|
3644
3344
|
return elem === checkContext;
|
|
3645
3345
|
}, implicitRelative, true ),
|
|
3646
3346
|
matchAnyContext = addCombinator( function( elem ) {
|
|
3647
|
-
return indexOf( checkContext, elem ) > -1;
|
|
3347
|
+
return indexOf.call( checkContext, elem ) > -1;
|
|
3648
3348
|
}, implicitRelative, true ),
|
|
3649
3349
|
matchers = [ function( elem, context, xml ) {
|
|
3650
|
-
|
|
3350
|
+
|
|
3351
|
+
// Support: IE 11+, Edge 17 - 18+
|
|
3352
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
|
3353
|
+
// two documents; shallow comparisons work.
|
|
3354
|
+
// eslint-disable-next-line eqeqeq
|
|
3355
|
+
var ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (
|
|
3651
3356
|
( checkContext = context ).nodeType ?
|
|
3652
3357
|
matchContext( elem, context, xml ) :
|
|
3653
3358
|
matchAnyContext( elem, context, xml ) );
|
|
3654
3359
|
|
|
3655
|
-
// Avoid hanging onto element
|
|
3360
|
+
// Avoid hanging onto element
|
|
3361
|
+
// (see https://github.com/jquery/sizzle/issues/299)
|
|
3656
3362
|
checkContext = null;
|
|
3657
3363
|
return ret;
|
|
3658
3364
|
} ];
|
|
@@ -3677,11 +3383,10 @@ function matcherFromTokens( tokens ) {
|
|
|
3677
3383
|
i > 1 && elementMatcher( matchers ),
|
|
3678
3384
|
i > 1 && toSelector(
|
|
3679
3385
|
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
).replace( rtrim, "$1" ),
|
|
3386
|
+
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
|
|
3387
|
+
tokens.slice( 0, i - 1 )
|
|
3388
|
+
.concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
|
|
3389
|
+
).replace( rtrimCSS, "$1" ),
|
|
3685
3390
|
matcher,
|
|
3686
3391
|
i < j && matcherFromTokens( tokens.slice( i, j ) ),
|
|
3687
3392
|
j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
|
|
@@ -3707,7 +3412,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
|
3707
3412
|
contextBackup = outermostContext,
|
|
3708
3413
|
|
|
3709
3414
|
// We must always have either seed elements or outermost context
|
|
3710
|
-
elems = seed || byElement && Expr.find
|
|
3415
|
+
elems = seed || byElement && Expr.find.TAG( "*", outermost ),
|
|
3711
3416
|
|
|
3712
3417
|
// Use integer dirruns iff this is the outermost matcher
|
|
3713
3418
|
dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
|
|
@@ -3723,8 +3428,9 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
|
3723
3428
|
}
|
|
3724
3429
|
|
|
3725
3430
|
// Add elements passing elementMatchers directly to results
|
|
3726
|
-
// Support:
|
|
3727
|
-
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching
|
|
3431
|
+
// Support: iOS <=7 - 9 only
|
|
3432
|
+
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching
|
|
3433
|
+
// elements by id. (see trac-14142)
|
|
3728
3434
|
for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
|
|
3729
3435
|
if ( byElement && elem ) {
|
|
3730
3436
|
j = 0;
|
|
@@ -3739,7 +3445,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
|
3739
3445
|
}
|
|
3740
3446
|
while ( ( matcher = elementMatchers[ j++ ] ) ) {
|
|
3741
3447
|
if ( matcher( elem, context || document, xml ) ) {
|
|
3742
|
-
|
|
3448
|
+
push.call( results, elem );
|
|
3743
3449
|
break;
|
|
3744
3450
|
}
|
|
3745
3451
|
}
|
|
@@ -3802,7 +3508,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
|
3802
3508
|
if ( outermost && !seed && setMatched.length > 0 &&
|
|
3803
3509
|
( matchedCount + setMatchers.length ) > 1 ) {
|
|
3804
3510
|
|
|
3805
|
-
|
|
3511
|
+
jQuery.uniqueSort( results );
|
|
3806
3512
|
}
|
|
3807
3513
|
}
|
|
3808
3514
|
|
|
@@ -3820,7 +3526,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
|
3820
3526
|
superMatcher;
|
|
3821
3527
|
}
|
|
3822
3528
|
|
|
3823
|
-
|
|
3529
|
+
function compile( selector, match /* Internal Use Only */ ) {
|
|
3824
3530
|
var i,
|
|
3825
3531
|
setMatchers = [],
|
|
3826
3532
|
elementMatchers = [],
|
|
@@ -3843,27 +3549,25 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
|
|
|
3843
3549
|
}
|
|
3844
3550
|
|
|
3845
3551
|
// Cache the compiled function
|
|
3846
|
-
cached = compilerCache(
|
|
3847
|
-
|
|
3848
|
-
matcherFromGroupMatchers( elementMatchers, setMatchers )
|
|
3849
|
-
);
|
|
3552
|
+
cached = compilerCache( selector,
|
|
3553
|
+
matcherFromGroupMatchers( elementMatchers, setMatchers ) );
|
|
3850
3554
|
|
|
3851
3555
|
// Save selector and tokenization
|
|
3852
3556
|
cached.selector = selector;
|
|
3853
3557
|
}
|
|
3854
3558
|
return cached;
|
|
3855
|
-
}
|
|
3559
|
+
}
|
|
3856
3560
|
|
|
3857
3561
|
/**
|
|
3858
|
-
* A low-level selection function that works with
|
|
3562
|
+
* A low-level selection function that works with jQuery's compiled
|
|
3859
3563
|
* selector functions
|
|
3860
3564
|
* @param {String|Function} selector A selector or a pre-compiled
|
|
3861
|
-
* selector function built with
|
|
3565
|
+
* selector function built with jQuery selector compile
|
|
3862
3566
|
* @param {Element} context
|
|
3863
3567
|
* @param {Array} [results]
|
|
3864
3568
|
* @param {Array} [seed] A set of elements to match against
|
|
3865
3569
|
*/
|
|
3866
|
-
|
|
3570
|
+
function select( selector, context, results, seed ) {
|
|
3867
3571
|
var i, tokens, token, type, find,
|
|
3868
3572
|
compiled = typeof selector === "function" && selector,
|
|
3869
3573
|
match = !seed && tokenize( ( selector = compiled.selector || selector ) );
|
|
@@ -3877,10 +3581,12 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
|
3877
3581
|
// Reduce context if the leading compound selector is an ID
|
|
3878
3582
|
tokens = match[ 0 ] = match[ 0 ].slice( 0 );
|
|
3879
3583
|
if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
|
|
3880
|
-
|
|
3584
|
+
context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
|
|
3881
3585
|
|
|
3882
|
-
context = ( Expr.find
|
|
3883
|
-
.replace( runescape, funescape ),
|
|
3586
|
+
context = ( Expr.find.ID(
|
|
3587
|
+
token.matches[ 0 ].replace( runescape, funescape ),
|
|
3588
|
+
context
|
|
3589
|
+
) || [] )[ 0 ];
|
|
3884
3590
|
if ( !context ) {
|
|
3885
3591
|
return results;
|
|
3886
3592
|
|
|
@@ -3893,7 +3599,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
|
3893
3599
|
}
|
|
3894
3600
|
|
|
3895
3601
|
// Fetch a seed set for right-to-left matching
|
|
3896
|
-
i = matchExpr
|
|
3602
|
+
i = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;
|
|
3897
3603
|
while ( i-- ) {
|
|
3898
3604
|
token = tokens[ i ];
|
|
3899
3605
|
|
|
@@ -3906,8 +3612,8 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
|
3906
3612
|
// Search, expanding context for leading sibling combinators
|
|
3907
3613
|
if ( ( seed = find(
|
|
3908
3614
|
token.matches[ 0 ].replace( runescape, funescape ),
|
|
3909
|
-
rsibling.test( tokens[ 0 ].type ) &&
|
|
3910
|
-
context
|
|
3615
|
+
rsibling.test( tokens[ 0 ].type ) &&
|
|
3616
|
+
testContext( context.parentNode ) || context
|
|
3911
3617
|
) ) ) {
|
|
3912
3618
|
|
|
3913
3619
|
// If seed is empty or no tokens remain, we can return early
|
|
@@ -3934,21 +3640,18 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
|
3934
3640
|
!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
|
|
3935
3641
|
);
|
|
3936
3642
|
return results;
|
|
3937
|
-
}
|
|
3643
|
+
}
|
|
3938
3644
|
|
|
3939
3645
|
// One-time assignments
|
|
3940
3646
|
|
|
3647
|
+
// Support: Android <=4.0 - 4.1+
|
|
3941
3648
|
// Sort stability
|
|
3942
3649
|
support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;
|
|
3943
3650
|
|
|
3944
|
-
// Support: Chrome 14-35+
|
|
3945
|
-
// Always assume duplicates if they aren't passed to the comparison function
|
|
3946
|
-
support.detectDuplicates = !!hasDuplicate;
|
|
3947
|
-
|
|
3948
3651
|
// Initialize against the default document
|
|
3949
3652
|
setDocument();
|
|
3950
3653
|
|
|
3951
|
-
// Support:
|
|
3654
|
+
// Support: Android <=4.0 - 4.1+
|
|
3952
3655
|
// Detached nodes confoundingly follow *each other*
|
|
3953
3656
|
support.sortDetached = assert( function( el ) {
|
|
3954
3657
|
|
|
@@ -3956,68 +3659,29 @@ support.sortDetached = assert( function( el ) {
|
|
|
3956
3659
|
return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
|
|
3957
3660
|
} );
|
|
3958
3661
|
|
|
3959
|
-
|
|
3960
|
-
// Prevent attribute/property "interpolation"
|
|
3961
|
-
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
|
|
3962
|
-
if ( !assert( function( el ) {
|
|
3963
|
-
el.innerHTML = "<a href='#'></a>";
|
|
3964
|
-
return el.firstChild.getAttribute( "href" ) === "#";
|
|
3965
|
-
} ) ) {
|
|
3966
|
-
addHandle( "type|href|height|width", function( elem, name, isXML ) {
|
|
3967
|
-
if ( !isXML ) {
|
|
3968
|
-
return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
|
|
3969
|
-
}
|
|
3970
|
-
} );
|
|
3971
|
-
}
|
|
3972
|
-
|
|
3973
|
-
// Support: IE<9
|
|
3974
|
-
// Use defaultValue in place of getAttribute("value")
|
|
3975
|
-
if ( !support.attributes || !assert( function( el ) {
|
|
3976
|
-
el.innerHTML = "<input/>";
|
|
3977
|
-
el.firstChild.setAttribute( "value", "" );
|
|
3978
|
-
return el.firstChild.getAttribute( "value" ) === "";
|
|
3979
|
-
} ) ) {
|
|
3980
|
-
addHandle( "value", function( elem, _name, isXML ) {
|
|
3981
|
-
if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
|
|
3982
|
-
return elem.defaultValue;
|
|
3983
|
-
}
|
|
3984
|
-
} );
|
|
3985
|
-
}
|
|
3986
|
-
|
|
3987
|
-
// Support: IE<9
|
|
3988
|
-
// Use getAttributeNode to fetch booleans when getAttribute lies
|
|
3989
|
-
if ( !assert( function( el ) {
|
|
3990
|
-
return el.getAttribute( "disabled" ) == null;
|
|
3991
|
-
} ) ) {
|
|
3992
|
-
addHandle( booleans, function( elem, name, isXML ) {
|
|
3993
|
-
var val;
|
|
3994
|
-
if ( !isXML ) {
|
|
3995
|
-
return elem[ name ] === true ? name.toLowerCase() :
|
|
3996
|
-
( val = elem.getAttributeNode( name ) ) && val.specified ?
|
|
3997
|
-
val.value :
|
|
3998
|
-
null;
|
|
3999
|
-
}
|
|
4000
|
-
} );
|
|
4001
|
-
}
|
|
4002
|
-
|
|
4003
|
-
return Sizzle;
|
|
4004
|
-
|
|
4005
|
-
} )( window );
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
jQuery.find = Sizzle;
|
|
4010
|
-
jQuery.expr = Sizzle.selectors;
|
|
3662
|
+
jQuery.find = find;
|
|
4011
3663
|
|
|
4012
3664
|
// Deprecated
|
|
4013
3665
|
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
|
|
4014
|
-
jQuery.
|
|
4015
|
-
jQuery.text = Sizzle.getText;
|
|
4016
|
-
jQuery.isXMLDoc = Sizzle.isXML;
|
|
4017
|
-
jQuery.contains = Sizzle.contains;
|
|
4018
|
-
jQuery.escapeSelector = Sizzle.escape;
|
|
3666
|
+
jQuery.unique = jQuery.uniqueSort;
|
|
4019
3667
|
|
|
3668
|
+
// These have always been private, but they used to be documented as part of
|
|
3669
|
+
// Sizzle so let's maintain them for now for backwards compatibility purposes.
|
|
3670
|
+
find.compile = compile;
|
|
3671
|
+
find.select = select;
|
|
3672
|
+
find.setDocument = setDocument;
|
|
3673
|
+
find.tokenize = tokenize;
|
|
4020
3674
|
|
|
3675
|
+
find.escape = jQuery.escapeSelector;
|
|
3676
|
+
find.getText = jQuery.text;
|
|
3677
|
+
find.isXML = jQuery.isXMLDoc;
|
|
3678
|
+
find.selectors = jQuery.expr;
|
|
3679
|
+
find.support = jQuery.support;
|
|
3680
|
+
find.uniqueSort = jQuery.uniqueSort;
|
|
3681
|
+
|
|
3682
|
+
/* eslint-enable */
|
|
3683
|
+
|
|
3684
|
+
} )();
|
|
4021
3685
|
|
|
4022
3686
|
|
|
4023
3687
|
var dir = function( elem, dir, until ) {
|
|
@@ -4051,13 +3715,6 @@ var siblings = function( n, elem ) {
|
|
|
4051
3715
|
|
|
4052
3716
|
var rneedsContext = jQuery.expr.match.needsContext;
|
|
4053
3717
|
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
function nodeName( elem, name ) {
|
|
4057
|
-
|
|
4058
|
-
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
|
4059
|
-
|
|
4060
|
-
}
|
|
4061
3718
|
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
|
4062
3719
|
|
|
4063
3720
|
|
|
@@ -4308,7 +3965,7 @@ jQuery.fn.extend( {
|
|
|
4308
3965
|
if ( cur.nodeType < 11 && ( targets ?
|
|
4309
3966
|
targets.index( cur ) > -1 :
|
|
4310
3967
|
|
|
4311
|
-
// Don't pass non-elements to
|
|
3968
|
+
// Don't pass non-elements to jQuery#find
|
|
4312
3969
|
cur.nodeType === 1 &&
|
|
4313
3970
|
jQuery.find.matchesSelector( cur, selectors ) ) ) {
|
|
4314
3971
|
|
|
@@ -4863,7 +4520,7 @@ jQuery.extend( {
|
|
|
4863
4520
|
|
|
4864
4521
|
if ( jQuery.Deferred.exceptionHook ) {
|
|
4865
4522
|
jQuery.Deferred.exceptionHook( e,
|
|
4866
|
-
process.
|
|
4523
|
+
process.error );
|
|
4867
4524
|
}
|
|
4868
4525
|
|
|
4869
4526
|
// Support: Promises/A+ section 2.3.3.3.4.1
|
|
@@ -4891,10 +4548,17 @@ jQuery.extend( {
|
|
|
4891
4548
|
process();
|
|
4892
4549
|
} else {
|
|
4893
4550
|
|
|
4894
|
-
// Call an optional hook to record the
|
|
4551
|
+
// Call an optional hook to record the error, in case of exception
|
|
4895
4552
|
// since it's otherwise lost when execution goes async
|
|
4896
|
-
if ( jQuery.Deferred.
|
|
4897
|
-
process.
|
|
4553
|
+
if ( jQuery.Deferred.getErrorHook ) {
|
|
4554
|
+
process.error = jQuery.Deferred.getErrorHook();
|
|
4555
|
+
|
|
4556
|
+
// The deprecated alias of the above. While the name suggests
|
|
4557
|
+
// returning the stack, not an error instance, jQuery just passes
|
|
4558
|
+
// it directly to `console.warn` so both will work; an instance
|
|
4559
|
+
// just better cooperates with source maps.
|
|
4560
|
+
} else if ( jQuery.Deferred.getStackHook ) {
|
|
4561
|
+
process.error = jQuery.Deferred.getStackHook();
|
|
4898
4562
|
}
|
|
4899
4563
|
window.setTimeout( process );
|
|
4900
4564
|
}
|
|
@@ -5069,12 +4733,16 @@ jQuery.extend( {
|
|
|
5069
4733
|
// warn about them ASAP rather than swallowing them by default.
|
|
5070
4734
|
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
|
|
5071
4735
|
|
|
5072
|
-
jQuery.Deferred.
|
|
4736
|
+
// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error
|
|
4737
|
+
// captured before the async barrier to get the original error cause
|
|
4738
|
+
// which may otherwise be hidden.
|
|
4739
|
+
jQuery.Deferred.exceptionHook = function( error, asyncError ) {
|
|
5073
4740
|
|
|
5074
4741
|
// Support: IE 8 - 9 only
|
|
5075
4742
|
// Console exists when dev tools are open, which can happen at any time
|
|
5076
4743
|
if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
|
|
5077
|
-
window.console.warn( "jQuery.Deferred exception: " + error.message,
|
|
4744
|
+
window.console.warn( "jQuery.Deferred exception: " + error.message,
|
|
4745
|
+
error.stack, asyncError );
|
|
5078
4746
|
}
|
|
5079
4747
|
};
|
|
5080
4748
|
|
|
@@ -6130,25 +5798,6 @@ function returnFalse() {
|
|
|
6130
5798
|
return false;
|
|
6131
5799
|
}
|
|
6132
5800
|
|
|
6133
|
-
// Support: IE <=9 - 11+
|
|
6134
|
-
// focus() and blur() are asynchronous, except when they are no-op.
|
|
6135
|
-
// So expect focus to be synchronous when the element is already active,
|
|
6136
|
-
// and blur to be synchronous when the element is not already active.
|
|
6137
|
-
// (focus and blur are always synchronous in other supported browsers,
|
|
6138
|
-
// this just defines when we can count on it).
|
|
6139
|
-
function expectSync( elem, type ) {
|
|
6140
|
-
return ( elem === safeActiveElement() ) === ( type === "focus" );
|
|
6141
|
-
}
|
|
6142
|
-
|
|
6143
|
-
// Support: IE <=9 only
|
|
6144
|
-
// Accessing document.activeElement can throw unexpectedly
|
|
6145
|
-
// https://bugs.jquery.com/ticket/13393
|
|
6146
|
-
function safeActiveElement() {
|
|
6147
|
-
try {
|
|
6148
|
-
return document.activeElement;
|
|
6149
|
-
} catch ( err ) { }
|
|
6150
|
-
}
|
|
6151
|
-
|
|
6152
5801
|
function on( elem, types, selector, data, fn, one ) {
|
|
6153
5802
|
var origFn, type;
|
|
6154
5803
|
|
|
@@ -6586,7 +6235,7 @@ jQuery.event = {
|
|
|
6586
6235
|
el.click && nodeName( el, "input" ) ) {
|
|
6587
6236
|
|
|
6588
6237
|
// dataPriv.set( el, "click", ... )
|
|
6589
|
-
leverageNative( el, "click",
|
|
6238
|
+
leverageNative( el, "click", true );
|
|
6590
6239
|
}
|
|
6591
6240
|
|
|
6592
6241
|
// Return false to allow normal processing in the caller
|
|
@@ -6637,10 +6286,10 @@ jQuery.event = {
|
|
|
6637
6286
|
// synthetic events by interrupting progress until reinvoked in response to
|
|
6638
6287
|
// *native* events that it fires directly, ensuring that state changes have
|
|
6639
6288
|
// already occurred before other listeners are invoked.
|
|
6640
|
-
function leverageNative( el, type,
|
|
6289
|
+
function leverageNative( el, type, isSetup ) {
|
|
6641
6290
|
|
|
6642
|
-
// Missing
|
|
6643
|
-
if ( !
|
|
6291
|
+
// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add
|
|
6292
|
+
if ( !isSetup ) {
|
|
6644
6293
|
if ( dataPriv.get( el, type ) === undefined ) {
|
|
6645
6294
|
jQuery.event.add( el, type, returnTrue );
|
|
6646
6295
|
}
|
|
@@ -6652,15 +6301,13 @@ function leverageNative( el, type, expectSync ) {
|
|
|
6652
6301
|
jQuery.event.add( el, type, {
|
|
6653
6302
|
namespace: false,
|
|
6654
6303
|
handler: function( event ) {
|
|
6655
|
-
var
|
|
6304
|
+
var result,
|
|
6656
6305
|
saved = dataPriv.get( this, type );
|
|
6657
6306
|
|
|
6658
6307
|
if ( ( event.isTrigger & 1 ) && this[ type ] ) {
|
|
6659
6308
|
|
|
6660
6309
|
// Interrupt processing of the outer synthetic .trigger()ed event
|
|
6661
|
-
|
|
6662
|
-
// from an async native handler (gh-4350)
|
|
6663
|
-
if ( !saved.length ) {
|
|
6310
|
+
if ( !saved ) {
|
|
6664
6311
|
|
|
6665
6312
|
// Store arguments for use when handling the inner native event
|
|
6666
6313
|
// There will always be at least one argument (an event object), so this array
|
|
@@ -6669,33 +6316,22 @@ function leverageNative( el, type, expectSync ) {
|
|
|
6669
6316
|
dataPriv.set( this, type, saved );
|
|
6670
6317
|
|
|
6671
6318
|
// Trigger the native event and capture its result
|
|
6672
|
-
// Support: IE <=9 - 11+
|
|
6673
|
-
// focus() and blur() are asynchronous
|
|
6674
|
-
notAsync = expectSync( this, type );
|
|
6675
6319
|
this[ type ]();
|
|
6676
6320
|
result = dataPriv.get( this, type );
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
} else {
|
|
6680
|
-
result = {};
|
|
6681
|
-
}
|
|
6321
|
+
dataPriv.set( this, type, false );
|
|
6322
|
+
|
|
6682
6323
|
if ( saved !== result ) {
|
|
6683
6324
|
|
|
6684
6325
|
// Cancel the outer synthetic event
|
|
6685
6326
|
event.stopImmediatePropagation();
|
|
6686
6327
|
event.preventDefault();
|
|
6687
6328
|
|
|
6688
|
-
|
|
6689
|
-
// In Chrome, if an element having a focusout handler is blurred by
|
|
6690
|
-
// clicking outside of it, it invokes the handler synchronously. If
|
|
6691
|
-
// that handler calls `.remove()` on the element, the data is cleared,
|
|
6692
|
-
// leaving `result` undefined. We need to guard against this.
|
|
6693
|
-
return result && result.value;
|
|
6329
|
+
return result;
|
|
6694
6330
|
}
|
|
6695
6331
|
|
|
6696
6332
|
// If this is an inner synthetic event for an event with a bubbling surrogate
|
|
6697
|
-
// (focus or blur), assume that the surrogate already propagated from triggering
|
|
6698
|
-
// native event and prevent that from happening again here.
|
|
6333
|
+
// (focus or blur), assume that the surrogate already propagated from triggering
|
|
6334
|
+
// the native event and prevent that from happening again here.
|
|
6699
6335
|
// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
|
|
6700
6336
|
// bubbling surrogate propagates *after* the non-bubbling base), but that seems
|
|
6701
6337
|
// less bad than duplication.
|
|
@@ -6705,22 +6341,25 @@ function leverageNative( el, type, expectSync ) {
|
|
|
6705
6341
|
|
|
6706
6342
|
// If this is a native event triggered above, everything is now in order
|
|
6707
6343
|
// Fire an inner synthetic event with the original arguments
|
|
6708
|
-
} else if ( saved
|
|
6344
|
+
} else if ( saved ) {
|
|
6709
6345
|
|
|
6710
6346
|
// ...and capture the result
|
|
6711
|
-
dataPriv.set( this, type,
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
//
|
|
6723
|
-
|
|
6347
|
+
dataPriv.set( this, type, jQuery.event.trigger(
|
|
6348
|
+
saved[ 0 ],
|
|
6349
|
+
saved.slice( 1 ),
|
|
6350
|
+
this
|
|
6351
|
+
) );
|
|
6352
|
+
|
|
6353
|
+
// Abort handling of the native event by all jQuery handlers while allowing
|
|
6354
|
+
// native handlers on the same element to run. On target, this is achieved
|
|
6355
|
+
// by stopping immediate propagation just on the jQuery event. However,
|
|
6356
|
+
// the native event is re-wrapped by a jQuery one on each level of the
|
|
6357
|
+
// propagation so the only way to stop it for jQuery is to stop it for
|
|
6358
|
+
// everyone via native `stopPropagation()`. This is not a problem for
|
|
6359
|
+
// focus/blur which don't bubble, but it does also stop click on checkboxes
|
|
6360
|
+
// and radios. We accept this limitation.
|
|
6361
|
+
event.stopPropagation();
|
|
6362
|
+
event.isImmediatePropagationStopped = returnTrue;
|
|
6724
6363
|
}
|
|
6725
6364
|
}
|
|
6726
6365
|
} );
|
|
@@ -6859,18 +6498,73 @@ jQuery.each( {
|
|
|
6859
6498
|
}, jQuery.event.addProp );
|
|
6860
6499
|
|
|
6861
6500
|
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
|
|
6501
|
+
|
|
6502
|
+
function focusMappedHandler( nativeEvent ) {
|
|
6503
|
+
if ( document.documentMode ) {
|
|
6504
|
+
|
|
6505
|
+
// Support: IE 11+
|
|
6506
|
+
// Attach a single focusin/focusout handler on the document while someone wants
|
|
6507
|
+
// focus/blur. This is because the former are synchronous in IE while the latter
|
|
6508
|
+
// are async. In other browsers, all those handlers are invoked synchronously.
|
|
6509
|
+
|
|
6510
|
+
// `handle` from private data would already wrap the event, but we need
|
|
6511
|
+
// to change the `type` here.
|
|
6512
|
+
var handle = dataPriv.get( this, "handle" ),
|
|
6513
|
+
event = jQuery.event.fix( nativeEvent );
|
|
6514
|
+
event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
|
|
6515
|
+
event.isSimulated = true;
|
|
6516
|
+
|
|
6517
|
+
// First, handle focusin/focusout
|
|
6518
|
+
handle( nativeEvent );
|
|
6519
|
+
|
|
6520
|
+
// ...then, handle focus/blur
|
|
6521
|
+
//
|
|
6522
|
+
// focus/blur don't bubble while focusin/focusout do; simulate the former by only
|
|
6523
|
+
// invoking the handler at the lower level.
|
|
6524
|
+
if ( event.target === event.currentTarget ) {
|
|
6525
|
+
|
|
6526
|
+
// The setup part calls `leverageNative`, which, in turn, calls
|
|
6527
|
+
// `jQuery.event.add`, so event handle will already have been set
|
|
6528
|
+
// by this point.
|
|
6529
|
+
handle( event );
|
|
6530
|
+
}
|
|
6531
|
+
} else {
|
|
6532
|
+
|
|
6533
|
+
// For non-IE browsers, attach a single capturing handler on the document
|
|
6534
|
+
// while someone wants focusin/focusout.
|
|
6535
|
+
jQuery.event.simulate( delegateType, nativeEvent.target,
|
|
6536
|
+
jQuery.event.fix( nativeEvent ) );
|
|
6537
|
+
}
|
|
6538
|
+
}
|
|
6539
|
+
|
|
6862
6540
|
jQuery.event.special[ type ] = {
|
|
6863
6541
|
|
|
6864
6542
|
// Utilize native event if possible so blur/focus sequence is correct
|
|
6865
6543
|
setup: function() {
|
|
6866
6544
|
|
|
6545
|
+
var attaches;
|
|
6546
|
+
|
|
6867
6547
|
// Claim the first handler
|
|
6868
6548
|
// dataPriv.set( this, "focus", ... )
|
|
6869
6549
|
// dataPriv.set( this, "blur", ... )
|
|
6870
|
-
leverageNative( this, type,
|
|
6550
|
+
leverageNative( this, type, true );
|
|
6871
6551
|
|
|
6872
|
-
|
|
6873
|
-
|
|
6552
|
+
if ( document.documentMode ) {
|
|
6553
|
+
|
|
6554
|
+
// Support: IE 9 - 11+
|
|
6555
|
+
// We use the same native handler for focusin & focus (and focusout & blur)
|
|
6556
|
+
// so we need to coordinate setup & teardown parts between those events.
|
|
6557
|
+
// Use `delegateType` as the key as `type` is already used by `leverageNative`.
|
|
6558
|
+
attaches = dataPriv.get( this, delegateType );
|
|
6559
|
+
if ( !attaches ) {
|
|
6560
|
+
this.addEventListener( delegateType, focusMappedHandler );
|
|
6561
|
+
}
|
|
6562
|
+
dataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );
|
|
6563
|
+
} else {
|
|
6564
|
+
|
|
6565
|
+
// Return false to allow normal processing in the caller
|
|
6566
|
+
return false;
|
|
6567
|
+
}
|
|
6874
6568
|
},
|
|
6875
6569
|
trigger: function() {
|
|
6876
6570
|
|
|
@@ -6881,6 +6575,24 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
|
|
|
6881
6575
|
return true;
|
|
6882
6576
|
},
|
|
6883
6577
|
|
|
6578
|
+
teardown: function() {
|
|
6579
|
+
var attaches;
|
|
6580
|
+
|
|
6581
|
+
if ( document.documentMode ) {
|
|
6582
|
+
attaches = dataPriv.get( this, delegateType ) - 1;
|
|
6583
|
+
if ( !attaches ) {
|
|
6584
|
+
this.removeEventListener( delegateType, focusMappedHandler );
|
|
6585
|
+
dataPriv.remove( this, delegateType );
|
|
6586
|
+
} else {
|
|
6587
|
+
dataPriv.set( this, delegateType, attaches );
|
|
6588
|
+
}
|
|
6589
|
+
} else {
|
|
6590
|
+
|
|
6591
|
+
// Return false to indicate standard teardown should be applied
|
|
6592
|
+
return false;
|
|
6593
|
+
}
|
|
6594
|
+
},
|
|
6595
|
+
|
|
6884
6596
|
// Suppress native focus or blur if we're currently inside
|
|
6885
6597
|
// a leveraged native-event stack
|
|
6886
6598
|
_default: function( event ) {
|
|
@@ -6889,6 +6601,58 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
|
|
|
6889
6601
|
|
|
6890
6602
|
delegateType: delegateType
|
|
6891
6603
|
};
|
|
6604
|
+
|
|
6605
|
+
// Support: Firefox <=44
|
|
6606
|
+
// Firefox doesn't have focus(in | out) events
|
|
6607
|
+
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
|
|
6608
|
+
//
|
|
6609
|
+
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
|
|
6610
|
+
// focus(in | out) events fire after focus & blur events,
|
|
6611
|
+
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
|
|
6612
|
+
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
|
|
6613
|
+
//
|
|
6614
|
+
// Support: IE 9 - 11+
|
|
6615
|
+
// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,
|
|
6616
|
+
// attach a single handler for both events in IE.
|
|
6617
|
+
jQuery.event.special[ delegateType ] = {
|
|
6618
|
+
setup: function() {
|
|
6619
|
+
|
|
6620
|
+
// Handle: regular nodes (via `this.ownerDocument`), window
|
|
6621
|
+
// (via `this.document`) & document (via `this`).
|
|
6622
|
+
var doc = this.ownerDocument || this.document || this,
|
|
6623
|
+
dataHolder = document.documentMode ? this : doc,
|
|
6624
|
+
attaches = dataPriv.get( dataHolder, delegateType );
|
|
6625
|
+
|
|
6626
|
+
// Support: IE 9 - 11+
|
|
6627
|
+
// We use the same native handler for focusin & focus (and focusout & blur)
|
|
6628
|
+
// so we need to coordinate setup & teardown parts between those events.
|
|
6629
|
+
// Use `delegateType` as the key as `type` is already used by `leverageNative`.
|
|
6630
|
+
if ( !attaches ) {
|
|
6631
|
+
if ( document.documentMode ) {
|
|
6632
|
+
this.addEventListener( delegateType, focusMappedHandler );
|
|
6633
|
+
} else {
|
|
6634
|
+
doc.addEventListener( type, focusMappedHandler, true );
|
|
6635
|
+
}
|
|
6636
|
+
}
|
|
6637
|
+
dataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );
|
|
6638
|
+
},
|
|
6639
|
+
teardown: function() {
|
|
6640
|
+
var doc = this.ownerDocument || this.document || this,
|
|
6641
|
+
dataHolder = document.documentMode ? this : doc,
|
|
6642
|
+
attaches = dataPriv.get( dataHolder, delegateType ) - 1;
|
|
6643
|
+
|
|
6644
|
+
if ( !attaches ) {
|
|
6645
|
+
if ( document.documentMode ) {
|
|
6646
|
+
this.removeEventListener( delegateType, focusMappedHandler );
|
|
6647
|
+
} else {
|
|
6648
|
+
doc.removeEventListener( type, focusMappedHandler, true );
|
|
6649
|
+
}
|
|
6650
|
+
dataPriv.remove( dataHolder, delegateType );
|
|
6651
|
+
} else {
|
|
6652
|
+
dataPriv.set( dataHolder, delegateType, attaches );
|
|
6653
|
+
}
|
|
6654
|
+
}
|
|
6655
|
+
};
|
|
6892
6656
|
} );
|
|
6893
6657
|
|
|
6894
6658
|
// Create mouseenter/leave events using mouseover/out and event-time checks
|
|
@@ -7120,7 +6884,7 @@ function domManip( collection, args, callback, ignored ) {
|
|
|
7120
6884
|
if ( hasScripts ) {
|
|
7121
6885
|
doc = scripts[ scripts.length - 1 ].ownerDocument;
|
|
7122
6886
|
|
|
7123
|
-
//
|
|
6887
|
+
// Re-enable scripts
|
|
7124
6888
|
jQuery.map( scripts, restoreScript );
|
|
7125
6889
|
|
|
7126
6890
|
// Evaluate executable scripts on first document insertion
|
|
@@ -7191,7 +6955,8 @@ jQuery.extend( {
|
|
|
7191
6955
|
if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
|
|
7192
6956
|
!jQuery.isXMLDoc( elem ) ) {
|
|
7193
6957
|
|
|
7194
|
-
// We eschew
|
|
6958
|
+
// We eschew jQuery#find here for performance reasons:
|
|
6959
|
+
// https://jsperf.com/getall-vs-sizzle/2
|
|
7195
6960
|
destElements = getAll( clone );
|
|
7196
6961
|
srcElements = getAll( elem );
|
|
7197
6962
|
|
|
@@ -7467,15 +7232,6 @@ var swap = function( elem, options, callback ) {
|
|
|
7467
7232
|
|
|
7468
7233
|
var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|
7469
7234
|
|
|
7470
|
-
var whitespace = "[\\x20\\t\\r\\n\\f]";
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
var rtrimCSS = new RegExp(
|
|
7474
|
-
"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
|
|
7475
|
-
"g"
|
|
7476
|
-
);
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
7235
|
|
|
7480
7236
|
|
|
7481
7237
|
( function() {
|
|
@@ -7585,7 +7341,7 @@ var rtrimCSS = new RegExp(
|
|
|
7585
7341
|
trChild = document.createElement( "div" );
|
|
7586
7342
|
|
|
7587
7343
|
table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
|
|
7588
|
-
tr.style.cssText = "border:1px solid";
|
|
7344
|
+
tr.style.cssText = "box-sizing:content-box;border:1px solid";
|
|
7589
7345
|
|
|
7590
7346
|
// Support: Chrome 86+
|
|
7591
7347
|
// Height set through cssText does not get applied.
|
|
@@ -7597,7 +7353,7 @@ var rtrimCSS = new RegExp(
|
|
|
7597
7353
|
// In our bodyBackground.html iframe,
|
|
7598
7354
|
// display for all div elements is set to "inline",
|
|
7599
7355
|
// which causes a problem only in Android 8 Chrome 86.
|
|
7600
|
-
// Ensuring the div is display: block
|
|
7356
|
+
// Ensuring the div is `display: block`
|
|
7601
7357
|
// gets around this issue.
|
|
7602
7358
|
trChild.style.display = "block";
|
|
7603
7359
|
|
|
@@ -7784,7 +7540,8 @@ function setPositiveNumber( _elem, value, subtract ) {
|
|
|
7784
7540
|
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
|
|
7785
7541
|
var i = dimension === "width" ? 1 : 0,
|
|
7786
7542
|
extra = 0,
|
|
7787
|
-
delta = 0
|
|
7543
|
+
delta = 0,
|
|
7544
|
+
marginDelta = 0;
|
|
7788
7545
|
|
|
7789
7546
|
// Adjustment may not be necessary
|
|
7790
7547
|
if ( box === ( isBorderBox ? "border" : "content" ) ) {
|
|
@@ -7794,8 +7551,10 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed
|
|
|
7794
7551
|
for ( ; i < 4; i += 2 ) {
|
|
7795
7552
|
|
|
7796
7553
|
// Both box models exclude margin
|
|
7554
|
+
// Count margin delta separately to only add it after scroll gutter adjustment.
|
|
7555
|
+
// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).
|
|
7797
7556
|
if ( box === "margin" ) {
|
|
7798
|
-
|
|
7557
|
+
marginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
|
|
7799
7558
|
}
|
|
7800
7559
|
|
|
7801
7560
|
// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
|
|
@@ -7846,7 +7605,7 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed
|
|
|
7846
7605
|
) ) || 0;
|
|
7847
7606
|
}
|
|
7848
7607
|
|
|
7849
|
-
return delta;
|
|
7608
|
+
return delta + marginDelta;
|
|
7850
7609
|
}
|
|
7851
7610
|
|
|
7852
7611
|
function getWidthOrHeight( elem, dimension, extra ) {
|
|
@@ -7944,26 +7703,35 @@ jQuery.extend( {
|
|
|
7944
7703
|
|
|
7945
7704
|
// Don't automatically add "px" to these possibly-unitless properties
|
|
7946
7705
|
cssNumber: {
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7706
|
+
animationIterationCount: true,
|
|
7707
|
+
aspectRatio: true,
|
|
7708
|
+
borderImageSlice: true,
|
|
7709
|
+
columnCount: true,
|
|
7710
|
+
flexGrow: true,
|
|
7711
|
+
flexShrink: true,
|
|
7712
|
+
fontWeight: true,
|
|
7713
|
+
gridArea: true,
|
|
7714
|
+
gridColumn: true,
|
|
7715
|
+
gridColumnEnd: true,
|
|
7716
|
+
gridColumnStart: true,
|
|
7717
|
+
gridRow: true,
|
|
7718
|
+
gridRowEnd: true,
|
|
7719
|
+
gridRowStart: true,
|
|
7720
|
+
lineHeight: true,
|
|
7721
|
+
opacity: true,
|
|
7722
|
+
order: true,
|
|
7723
|
+
orphans: true,
|
|
7724
|
+
scale: true,
|
|
7725
|
+
widows: true,
|
|
7726
|
+
zIndex: true,
|
|
7727
|
+
zoom: true,
|
|
7728
|
+
|
|
7729
|
+
// SVG-related
|
|
7730
|
+
fillOpacity: true,
|
|
7731
|
+
floodOpacity: true,
|
|
7732
|
+
stopOpacity: true,
|
|
7733
|
+
strokeMiterlimit: true,
|
|
7734
|
+
strokeOpacity: true
|
|
7967
7735
|
},
|
|
7968
7736
|
|
|
7969
7737
|
// Add in properties whose names you wish to fix before
|
|
@@ -9671,9 +9439,39 @@ jQuery.each( [ "radio", "checkbox" ], function() {
|
|
|
9671
9439
|
|
|
9672
9440
|
|
|
9673
9441
|
// Return jQuery for attributes-only inclusion
|
|
9442
|
+
var location = window.location;
|
|
9443
|
+
|
|
9444
|
+
var nonce = { guid: Date.now() };
|
|
9445
|
+
|
|
9446
|
+
var rquery = ( /\?/ );
|
|
9674
9447
|
|
|
9675
9448
|
|
|
9676
|
-
|
|
9449
|
+
|
|
9450
|
+
// Cross-browser xml parsing
|
|
9451
|
+
jQuery.parseXML = function( data ) {
|
|
9452
|
+
var xml, parserErrorElem;
|
|
9453
|
+
if ( !data || typeof data !== "string" ) {
|
|
9454
|
+
return null;
|
|
9455
|
+
}
|
|
9456
|
+
|
|
9457
|
+
// Support: IE 9 - 11 only
|
|
9458
|
+
// IE throws on parseFromString with invalid input.
|
|
9459
|
+
try {
|
|
9460
|
+
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
|
9461
|
+
} catch ( e ) {}
|
|
9462
|
+
|
|
9463
|
+
parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
|
9464
|
+
if ( !xml || parserErrorElem ) {
|
|
9465
|
+
jQuery.error( "Invalid XML: " + (
|
|
9466
|
+
parserErrorElem ?
|
|
9467
|
+
jQuery.map( parserErrorElem.childNodes, function( el ) {
|
|
9468
|
+
return el.textContent;
|
|
9469
|
+
} ).join( "\n" ) :
|
|
9470
|
+
data
|
|
9471
|
+
) );
|
|
9472
|
+
}
|
|
9473
|
+
return xml;
|
|
9474
|
+
};
|
|
9677
9475
|
|
|
9678
9476
|
|
|
9679
9477
|
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
|
|
@@ -9861,85 +9659,6 @@ jQuery.fn.extend( {
|
|
|
9861
9659
|
} );
|
|
9862
9660
|
|
|
9863
9661
|
|
|
9864
|
-
// Support: Firefox <=44
|
|
9865
|
-
// Firefox doesn't have focus(in | out) events
|
|
9866
|
-
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
|
|
9867
|
-
//
|
|
9868
|
-
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
|
|
9869
|
-
// focus(in | out) events fire after focus & blur events,
|
|
9870
|
-
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
|
|
9871
|
-
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
|
|
9872
|
-
if ( !support.focusin ) {
|
|
9873
|
-
jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
|
9874
|
-
|
|
9875
|
-
// Attach a single capturing handler on the document while someone wants focusin/focusout
|
|
9876
|
-
var handler = function( event ) {
|
|
9877
|
-
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
|
|
9878
|
-
};
|
|
9879
|
-
|
|
9880
|
-
jQuery.event.special[ fix ] = {
|
|
9881
|
-
setup: function() {
|
|
9882
|
-
|
|
9883
|
-
// Handle: regular nodes (via `this.ownerDocument`), window
|
|
9884
|
-
// (via `this.document`) & document (via `this`).
|
|
9885
|
-
var doc = this.ownerDocument || this.document || this,
|
|
9886
|
-
attaches = dataPriv.access( doc, fix );
|
|
9887
|
-
|
|
9888
|
-
if ( !attaches ) {
|
|
9889
|
-
doc.addEventListener( orig, handler, true );
|
|
9890
|
-
}
|
|
9891
|
-
dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
|
|
9892
|
-
},
|
|
9893
|
-
teardown: function() {
|
|
9894
|
-
var doc = this.ownerDocument || this.document || this,
|
|
9895
|
-
attaches = dataPriv.access( doc, fix ) - 1;
|
|
9896
|
-
|
|
9897
|
-
if ( !attaches ) {
|
|
9898
|
-
doc.removeEventListener( orig, handler, true );
|
|
9899
|
-
dataPriv.remove( doc, fix );
|
|
9900
|
-
|
|
9901
|
-
} else {
|
|
9902
|
-
dataPriv.access( doc, fix, attaches );
|
|
9903
|
-
}
|
|
9904
|
-
}
|
|
9905
|
-
};
|
|
9906
|
-
} );
|
|
9907
|
-
}
|
|
9908
|
-
var location = window.location;
|
|
9909
|
-
|
|
9910
|
-
var nonce = { guid: Date.now() };
|
|
9911
|
-
|
|
9912
|
-
var rquery = ( /\?/ );
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
// Cross-browser xml parsing
|
|
9917
|
-
jQuery.parseXML = function( data ) {
|
|
9918
|
-
var xml, parserErrorElem;
|
|
9919
|
-
if ( !data || typeof data !== "string" ) {
|
|
9920
|
-
return null;
|
|
9921
|
-
}
|
|
9922
|
-
|
|
9923
|
-
// Support: IE 9 - 11 only
|
|
9924
|
-
// IE throws on parseFromString with invalid input.
|
|
9925
|
-
try {
|
|
9926
|
-
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
|
9927
|
-
} catch ( e ) {}
|
|
9928
|
-
|
|
9929
|
-
parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
|
9930
|
-
if ( !xml || parserErrorElem ) {
|
|
9931
|
-
jQuery.error( "Invalid XML: " + (
|
|
9932
|
-
parserErrorElem ?
|
|
9933
|
-
jQuery.map( parserErrorElem.childNodes, function( el ) {
|
|
9934
|
-
return el.textContent;
|
|
9935
|
-
} ).join( "\n" ) :
|
|
9936
|
-
data
|
|
9937
|
-
) );
|
|
9938
|
-
}
|
|
9939
|
-
return xml;
|
|
9940
|
-
};
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
9662
|
var
|
|
9944
9663
|
rbracket = /\[\]$/,
|
|
9945
9664
|
rCRLF = /\r?\n/g,
|
|
@@ -11784,7 +11503,9 @@ jQuery.fn.extend( {
|
|
|
11784
11503
|
},
|
|
11785
11504
|
|
|
11786
11505
|
hover: function( fnOver, fnOut ) {
|
|
11787
|
-
return this
|
|
11506
|
+
return this
|
|
11507
|
+
.on( "mouseenter", fnOver )
|
|
11508
|
+
.on( "mouseleave", fnOut || fnOver );
|
|
11788
11509
|
}
|
|
11789
11510
|
} );
|
|
11790
11511
|
|
|
@@ -21488,6 +21209,7 @@ var ATTRIBUTE$1;
|
|
|
21488
21209
|
ATTRIBUTE["LANG"] = "Lang";
|
|
21489
21210
|
ATTRIBUTE["GMT"] = "GMT";
|
|
21490
21211
|
ATTRIBUTE["ACTIONS"] = "Actions";
|
|
21212
|
+
ATTRIBUTE["MENU"] = "Menu";
|
|
21491
21213
|
})(ATTRIBUTE$1 || (ATTRIBUTE$1 = {}));
|
|
21492
21214
|
var DRAG_ITEM_TYPE;
|
|
21493
21215
|
(function (DRAG_ITEM_TYPE) {
|
|
@@ -22157,6 +21879,9 @@ var TableViewServiceImpl = /*#__PURE__*/function () {
|
|
|
22157
21879
|
_proto.getNextCol = function getNextCol(col) {
|
|
22158
21880
|
return this.grid.GetNextCol(col);
|
|
22159
21881
|
};
|
|
21882
|
+
_proto.getLastVisible = function getLastVisible() {
|
|
21883
|
+
return this.grid.GetLastVisible();
|
|
21884
|
+
};
|
|
22160
21885
|
_createClass(TableViewServiceImpl, [{
|
|
22161
21886
|
key: "columnList",
|
|
22162
21887
|
get: function get() {
|
|
@@ -61809,7 +61534,9 @@ var ViewPart = function ViewPart(props) {
|
|
|
61809
61534
|
React.useEffect(function () {
|
|
61810
61535
|
if (props.component) {
|
|
61811
61536
|
props.props.settings = props.settings;
|
|
61812
|
-
var _component = React__default.createElement(props.component, props.props
|
|
61537
|
+
var _component = React__default.createElement(props.component, _extends({}, props.props, {
|
|
61538
|
+
scrollElementRef: props.scrollElementRef
|
|
61539
|
+
}));
|
|
61813
61540
|
setComponent(_component);
|
|
61814
61541
|
} else {
|
|
61815
61542
|
setComponent(null);
|
|
@@ -61839,6 +61566,7 @@ var styles$u = {"vitro-view":"_view_vitro-view_1NKb-kU","vitro-tab":"_view_vitro
|
|
|
61839
61566
|
|
|
61840
61567
|
var GroupControl = function GroupControl(props) {
|
|
61841
61568
|
var scrollbarContentRef = React.useRef(null);
|
|
61569
|
+
var scrollElementRef = React.useRef();
|
|
61842
61570
|
React.useEffect(function () {
|
|
61843
61571
|
scrollIntoView();
|
|
61844
61572
|
}, [props.item.id]);
|
|
@@ -61847,17 +61575,22 @@ var GroupControl = function GroupControl(props) {
|
|
|
61847
61575
|
scrollbarContentRef.current.scrollIntoView();
|
|
61848
61576
|
}
|
|
61849
61577
|
};
|
|
61578
|
+
var onInit = function onInit(elem, scrollElement) {
|
|
61579
|
+
scrollElementRef.current = scrollElement;
|
|
61580
|
+
};
|
|
61850
61581
|
return React__default.createElement(ControlGroup, {
|
|
61851
61582
|
horizontal: true
|
|
61852
61583
|
}, React__default.createElement(ScrollBar, {
|
|
61853
61584
|
contentClassName: styles$u['vitro-content'],
|
|
61854
61585
|
contentRef: scrollbarContentRef,
|
|
61855
|
-
key: props.key
|
|
61586
|
+
key: props.key,
|
|
61587
|
+
onInit: onInit
|
|
61856
61588
|
}, props.componentList && props.componentList.map(function (viewPart) {
|
|
61857
61589
|
return React__default.createElement(ViewPart, {
|
|
61858
61590
|
component: viewPart.component,
|
|
61859
61591
|
settings: viewPart.settings,
|
|
61860
61592
|
props: props,
|
|
61593
|
+
scrollElementRef: scrollElementRef,
|
|
61861
61594
|
item: props.item,
|
|
61862
61595
|
className: styles$u['vitro-view-part']
|
|
61863
61596
|
});
|
|
@@ -63441,7 +63174,7 @@ var CriterionFieldIterator = function CriterionFieldIterator(props) {
|
|
|
63441
63174
|
|
|
63442
63175
|
var styles$M = {"vitro-selected-item-multi":"_lookup-picker-selected-item_vitro-selected-item-multi_bzL7ugZ","vitro-selected-item":"_lookup-picker-selected-item_vitro-selected-item_hw-euth","vitro-button-close":"_lookup-picker-selected-item_vitro-button-close_1SRnr_0"};
|
|
63443
63176
|
|
|
63444
|
-
var styles$N = {"vitro-lookup-picker":"_lookup-picker_vitro-lookup-picker_1aXYQEG","vitro-content":"_lookup-picker_vitro-content_37L0slb","vitro-read-only":"_lookup-picker_vitro-read-only_32NOdGB","vitro-label":"_lookup-picker_vitro-label_2QoJkUz","vitro-focus":"_lookup-picker_vitro-focus_2UGpxXD","vitro-error":"_lookup-picker_vitro-error_dF7iopC","vitro-error-message":"_lookup-picker_vitro-error-message_2iBjyRP","vitro-copy-button":"_lookup-picker_vitro-copy-button_3UItrZb","vitro-value-container":"_lookup-picker_vitro-value-container_3GeBIaW","vitro-multi-value-container":"_lookup-picker_vitro-multi-value-container_2ScQ_Ua","vitro-lookup-picker-multi-select":"_lookup-picker_vitro-lookup-picker-multi-select_3Lkq2tk","vitro-button-close":"_lookup-picker_vitro-button-close_3_Qndrj","vitro-button-collapse-up":"_lookup-picker_vitro-button-collapse-up_3i0OJub","vitro-button-collapse-bottom":"_lookup-picker_vitro-button-collapse-bottom_3o0Pl83","vitro-tooltip":"_lookup-picker_vitro-tooltip_2a12Z4P","vitro-right":"_lookup-picker_vitro-right_1XFsL1w","vitro-library-button":"_lookup-picker_vitro-library-button_1zwNYAA"
|
|
63177
|
+
var styles$N = {"vitro-lookup-picker":"_lookup-picker_vitro-lookup-picker_1aXYQEG","vitro-content":"_lookup-picker_vitro-content_37L0slb","vitro-read-only":"_lookup-picker_vitro-read-only_32NOdGB","vitro-label":"_lookup-picker_vitro-label_2QoJkUz","vitro-focus":"_lookup-picker_vitro-focus_2UGpxXD","vitro-error":"_lookup-picker_vitro-error_dF7iopC","vitro-error-message":"_lookup-picker_vitro-error-message_2iBjyRP","vitro-copy-button":"_lookup-picker_vitro-copy-button_3UItrZb","vitro-value-container":"_lookup-picker_vitro-value-container_3GeBIaW","vitro-multi-value-container":"_lookup-picker_vitro-multi-value-container_2ScQ_Ua","vitro-lookup-picker-multi-select":"_lookup-picker_vitro-lookup-picker-multi-select_3Lkq2tk","vitro-button-close":"_lookup-picker_vitro-button-close_3_Qndrj","vitro-button-collapse-up":"_lookup-picker_vitro-button-collapse-up_3i0OJub","vitro-button-collapse-bottom":"_lookup-picker_vitro-button-collapse-bottom_3o0Pl83","vitro-tooltip":"_lookup-picker_vitro-tooltip_2a12Z4P","vitro-right":"_lookup-picker_vitro-right_1XFsL1w","vitro-library-button":"_lookup-picker_vitro-library-button_1zwNYAA"};
|
|
63445
63178
|
|
|
63446
63179
|
var htmlValueStyles = {"vitro-item-html-value":"_lookup-picker-html-value_vitro-item-html-value_2QBoTey"};
|
|
63447
63180
|
|
|
@@ -63538,9 +63271,15 @@ var ValueList = function ValueList(props) {
|
|
|
63538
63271
|
}, []);
|
|
63539
63272
|
React.useEffect(function () {
|
|
63540
63273
|
if (props.isVisible && props.contentRef) {
|
|
63541
|
-
|
|
63542
|
-
|
|
63543
|
-
|
|
63274
|
+
if (props.isFullWidth !== false) {
|
|
63275
|
+
setStyle({
|
|
63276
|
+
width: props.contentRef.offsetWidth + UNIT.PX
|
|
63277
|
+
});
|
|
63278
|
+
} else {
|
|
63279
|
+
setStyle({
|
|
63280
|
+
minWidth: props.contentRef.offsetWidth + UNIT.PX
|
|
63281
|
+
});
|
|
63282
|
+
}
|
|
63544
63283
|
} else {
|
|
63545
63284
|
setStyle({
|
|
63546
63285
|
width: 0
|
|
@@ -63571,6 +63310,7 @@ var ValueList = function ValueList(props) {
|
|
|
63571
63310
|
isShow: props.isVisible,
|
|
63572
63311
|
target: props.contentRef,
|
|
63573
63312
|
placement: props.placement,
|
|
63313
|
+
allowedAutoPlacements: props.allowedAutoPlacements,
|
|
63574
63314
|
isFlip: props.isFlip,
|
|
63575
63315
|
className: valueListStyles['vitro-value-list'],
|
|
63576
63316
|
style: style ? style : {}
|
|
@@ -63825,9 +63565,14 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63825
63565
|
var selectedValueTemplate = function selectedValueTemplate(value) {
|
|
63826
63566
|
return props.selectedValueTemplate ? props.selectedValueTemplate(value) : value.title;
|
|
63827
63567
|
};
|
|
63568
|
+
var expandValueList = function expandValueList() {
|
|
63569
|
+
if (props.getAllValueList || props.getValueList) {
|
|
63570
|
+
setValueListVisible(true);
|
|
63571
|
+
}
|
|
63572
|
+
};
|
|
63828
63573
|
var onChange = function onChange(e) {
|
|
63829
63574
|
setState(styles$N['vitro-focus']);
|
|
63830
|
-
|
|
63575
|
+
expandValueList();
|
|
63831
63576
|
setInputValue(e.target.value);
|
|
63832
63577
|
onInputValueUpdated();
|
|
63833
63578
|
};
|
|
@@ -63935,15 +63680,18 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63935
63680
|
onInputValueUpdated();
|
|
63936
63681
|
isShowTooltipRef.current = false;
|
|
63937
63682
|
setState(styles$N['vitro-focus']);
|
|
63938
|
-
|
|
63683
|
+
expandValueList();
|
|
63939
63684
|
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
|
|
63940
63685
|
if (props.onFocus) {
|
|
63941
63686
|
props.onFocus(e);
|
|
63942
63687
|
}
|
|
63943
63688
|
};
|
|
63944
63689
|
var onCollapseButtonClick = function onCollapseButtonClick(valueListVisible) {
|
|
63945
|
-
|
|
63946
|
-
|
|
63690
|
+
if (valueListVisible) {
|
|
63691
|
+
setValueListVisible(false);
|
|
63692
|
+
} else {
|
|
63693
|
+
onFocus(null);
|
|
63694
|
+
}
|
|
63947
63695
|
};
|
|
63948
63696
|
var getClassName = function getClassName() {
|
|
63949
63697
|
var classList = [styles$N['vitro-lookup-picker'], props.className];
|
|
@@ -64046,7 +63794,9 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
64046
63794
|
emptyPlaceholder: props.emptyPlaceholder || localeService.create(LOCALE$6.PLACEHOLDER_EMPTY),
|
|
64047
63795
|
getHtmlValue: getHtmlValue,
|
|
64048
63796
|
placement: props.dropdownPlacement,
|
|
64049
|
-
|
|
63797
|
+
allowedAutoPlacements: props.dropdownAllowedAutoPlacements,
|
|
63798
|
+
button: props.valueListButton,
|
|
63799
|
+
isFullWidth: props.isValueListFullWidth
|
|
64050
63800
|
}), props.errorMessage && React__default.createElement(ErrorMessage, {
|
|
64051
63801
|
text: props.errorMessage,
|
|
64052
63802
|
className: styles$N['vitro-error-message']
|
|
@@ -65483,6 +65233,13 @@ var DatePicker = React.forwardRef(function (props, ref) {
|
|
|
65483
65233
|
React.useEffect(function () {
|
|
65484
65234
|
props.errorMessage ? setState(styles$T['vitro-error']) : setState(CTRL.EMPTY);
|
|
65485
65235
|
}, [props.errorMessage]);
|
|
65236
|
+
React.useEffect(function () {
|
|
65237
|
+
$$6(inputRef.current).data(componentName).setOptions({
|
|
65238
|
+
change: function change(e) {
|
|
65239
|
+
onChange(e);
|
|
65240
|
+
}
|
|
65241
|
+
});
|
|
65242
|
+
}, [props.onChange]);
|
|
65486
65243
|
React.useImperativeHandle(ref, function () {
|
|
65487
65244
|
return {
|
|
65488
65245
|
focus: function focus() {
|
|
@@ -65939,7 +65696,8 @@ var CriterionFilter = function CriterionFilter(props) {
|
|
|
65939
65696
|
selectedValueTemplate: function selectedValueTemplate(value) {
|
|
65940
65697
|
return value.name;
|
|
65941
65698
|
},
|
|
65942
|
-
valueList: getContentTypeList()
|
|
65699
|
+
valueList: getContentTypeList(),
|
|
65700
|
+
isMultiSelect: true
|
|
65943
65701
|
}));
|
|
65944
65702
|
}
|
|
65945
65703
|
}, {
|
|
@@ -65947,7 +65705,8 @@ var CriterionFilter = function CriterionFilter(props) {
|
|
|
65947
65705
|
value: function value(props) {
|
|
65948
65706
|
var _props$id;
|
|
65949
65707
|
return React__default.createElement(UserLookupPicker$1, Object.assign({}, props, {
|
|
65950
|
-
id: (_props$id = props.id) === null || _props$id === void 0 ? void 0 : _props$id.split(CTRL.DOT)[0]
|
|
65708
|
+
id: (_props$id = props.id) === null || _props$id === void 0 ? void 0 : _props$id.split(CTRL.DOT)[0],
|
|
65709
|
+
isMultiSelect: true
|
|
65951
65710
|
}));
|
|
65952
65711
|
}
|
|
65953
65712
|
}];
|
|
@@ -67003,11 +66762,13 @@ var ViewerIssueList = function ViewerIssueList(props) {
|
|
|
67003
66762
|
};
|
|
67004
66763
|
|
|
67005
66764
|
var w$6 = window;
|
|
66765
|
+
var LOCALE_DATE_TIME = 'app.common.dateTime';
|
|
67006
66766
|
var CSS_CLASS_SIDEBAR_CONTENT = 'body__sidebar-content';
|
|
67007
66767
|
var ID_VIEWER_CONTAINER = 'viewerContainer';
|
|
67008
66768
|
var ID_FILE_VERSION_SELECT = 'fileVersionSelect';
|
|
67009
66769
|
var EVENT_PAGE_RENDERED = 'webViewerPageRendered';
|
|
67010
66770
|
var Viewer = function Viewer(props) {
|
|
66771
|
+
var localeService = inversifyReact.useInjection(SERVICE.LOCALE);
|
|
67011
66772
|
React.useEffect(function () {
|
|
67012
66773
|
if (props.context.file) {
|
|
67013
66774
|
init();
|
|
@@ -67018,7 +66779,8 @@ var Viewer = function Viewer(props) {
|
|
|
67018
66779
|
if (w$6.initPdfViewer) {
|
|
67019
66780
|
initSearchCriterionList();
|
|
67020
66781
|
var context = _extends({}, props.context, {
|
|
67021
|
-
initIssueList: initIssueList
|
|
66782
|
+
initIssueList: initIssueList,
|
|
66783
|
+
getDateText: getDateText
|
|
67022
66784
|
});
|
|
67023
66785
|
w$6.initPdfViewer(context);
|
|
67024
66786
|
initFileVersionSelect();
|
|
@@ -67108,11 +66870,16 @@ var Viewer = function Viewer(props) {
|
|
|
67108
66870
|
});
|
|
67109
66871
|
reactDom.render(select, selectContainer);
|
|
67110
66872
|
};
|
|
66873
|
+
var getDateText = function getDateText(date) {
|
|
66874
|
+
return localeService.create(LOCALE_DATE_TIME, {
|
|
66875
|
+
date: date
|
|
66876
|
+
});
|
|
66877
|
+
};
|
|
67111
66878
|
return React__default.createElement(React__default.Fragment, null);
|
|
67112
66879
|
};
|
|
67113
66880
|
|
|
67114
66881
|
var name = "@vitrosoftware/common-ui-ts";
|
|
67115
|
-
var version$1 = "1.1.
|
|
66882
|
+
var version$1 = "1.1.228";
|
|
67116
66883
|
var description = "vitro software common ui ts";
|
|
67117
66884
|
var author = "";
|
|
67118
66885
|
var license = "MIT";
|
|
@@ -84893,7 +84660,7 @@ var DxfViewer = function DxfViewer(props) {
|
|
|
84893
84660
|
});
|
|
84894
84661
|
};
|
|
84895
84662
|
|
|
84896
|
-
var styles$1O = {"vitro-select":"_select_vitro-select_EObExkL","vitro-active":"_select_vitro-active_3I2oZ9Y","vitro-label":"_select_vitro-label_1sD79dR","vitro-list-container":"_select_vitro-list-container_1iaPtG5","vitro-item":"_select_vitro-item_3Q88bWt","vitro-scrollbar":"_select_vitro-scrollbar_1T9-kjS"};
|
|
84663
|
+
var styles$1O = {"vitro-select":"_select_vitro-select_EObExkL","vitro-active":"_select_vitro-active_3I2oZ9Y","vitro-label":"_select_vitro-label_1sD79dR","vitro-list-container":"_select_vitro-list-container_1iaPtG5","vitro-expanded":"_select_vitro-expanded_1_6Vcpy","vitro-item":"_select_vitro-item_3Q88bWt","vitro-scrollbar":"_select_vitro-scrollbar_1T9-kjS"};
|
|
84897
84664
|
|
|
84898
84665
|
var Select = function Select(props) {
|
|
84899
84666
|
var _useState = React.useState(null),
|
|
@@ -84957,7 +84724,7 @@ var Select = function Select(props) {
|
|
|
84957
84724
|
text: props.label,
|
|
84958
84725
|
className: styles$1O['vitro-label']
|
|
84959
84726
|
}), React__default.createElement(itemTemplate, value), React__default.createElement("div", {
|
|
84960
|
-
className: styles$1O['vitro-list-container'],
|
|
84727
|
+
className: styles$1O['vitro-list-container'] + (isExpanded ? CTRL.SPACE + styles$1O['vitro-expanded'] : CTRL.EMPTY),
|
|
84961
84728
|
ref: listRef
|
|
84962
84729
|
}, React__default.createElement(ScrollBar, {
|
|
84963
84730
|
className: styles$1O['vitro-scrollbar']
|
|
@@ -85119,6 +84886,7 @@ var EditableList = function EditableList(props) {
|
|
|
85119
84886
|
return new Map();
|
|
85120
84887
|
}, []);
|
|
85121
84888
|
React.useEffect(function () {
|
|
84889
|
+
setActiveDropdownItemId(undefined);
|
|
85122
84890
|
setEditedItem(props.editedItemId || CTRL.EMPTY);
|
|
85123
84891
|
if (props.editedItemId) {
|
|
85124
84892
|
var _editedItem = props.itemList.find(function (val) {
|