This commit is contained in:
David Kale
2020-09-08 13:25:36 -04:00
parent e4246d2b5b
commit 91fcbb0108
4227 changed files with 416837 additions and 457884 deletions

4
node_modules/nwsapi/LICENSE generated vendored
View File

@@ -4,8 +4,8 @@ Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

35
node_modules/nwsapi/package.json generated vendored
View File

@@ -1,33 +1,27 @@
{
"_args": [
[
"nwsapi@2.1.4",
"/Users/pjquirk/Source/GitHub/actions/labeler"
]
],
"_development": true,
"_from": "nwsapi@2.1.4",
"_id": "nwsapi@2.1.4",
"_from": "nwsapi@^2.0.7",
"_id": "nwsapi@2.2.0",
"_inBundle": false,
"_integrity": "sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw==",
"_integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==",
"_location": "/nwsapi",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "range",
"registry": true,
"raw": "nwsapi@2.1.4",
"raw": "nwsapi@^2.0.7",
"name": "nwsapi",
"escapedName": "nwsapi",
"rawSpec": "2.1.4",
"rawSpec": "^2.0.7",
"saveSpec": null,
"fetchSpec": "2.1.4"
"fetchSpec": "^2.0.7"
},
"_requiredBy": [
"/jsdom"
],
"_resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.4.tgz",
"_spec": "2.1.4",
"_where": "/Users/pjquirk/Source/GitHub/actions/labeler",
"_resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz",
"_shasum": "204879a9e3d068ff2a55139c2c772780681a38b7",
"_spec": "nwsapi@^2.0.7",
"_where": "/Users/dakale/dev/GitHub/actions/labeler/node_modules/jsdom",
"author": {
"name": "Diego Perini",
"email": "diego.perini@gmail.com",
@@ -36,7 +30,12 @@
"bugs": {
"url": "http://github.com/dperini/nwsapi/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Fast CSS Selectors API Engine",
"directories": {
"test": "test"
},
"homepage": "http://javascript.nwbox.com/nwsapi/",
"keywords": [
"css",
@@ -68,5 +67,5 @@
"scripts": {
"lint": "eslint ./src/nwsapi.js"
},
"version": "2.1.4"
"version": "2.2.0"
}

137
node_modules/nwsapi/src/nwsapi.js generated vendored
View File

@@ -5,9 +5,9 @@
* nwsapi.js - Fast CSS Selectors API Engine
*
* Author: Diego Perini <diego.perini at gmail com>
* Version: 2.1.4
* Version: 2.2.0
* Created: 20070722
* Release: 20190426
* Release: 20191102
*
* License:
* http://javascript.nwbox.com/nwsapi/MIT-LICENSE
@@ -30,10 +30,11 @@
})(this, function Factory(global, Export) {
var version = 'nwsapi-2.1.4',
var version = 'nwsapi-2.2.0',
doc = global.document,
root = doc.documentElement,
slice = Array.prototype.slice,
WSP = '[\\x20\\t\\r\\n\\f]',
@@ -83,8 +84,10 @@
structural: '(root|empty|(?:(?:first|last|only)(?:-child|-of-type)))\\b',
inputstate: '(enabled|disabled|read-only|read-write|placeholder-shown|default)\\b',
inputvalue: '(checked|indeterminate|required|optional|valid|invalid|in-range|out-of-range)\\b',
pseudo_dbl: '(after|before|first-letter|first-line|-webkit-[-a-zA-Z0-9]{2,})\\b',
pseudo_sng: ':(after|before|first-letter|first-line|selection|placeholder)\\b'
// pseudo-elements starting with single colon (:)
pseudo_sng: '(after|before|first-letter|first-line)\\b',
// pseudo-elements starting with double colon (::)
pseudo_dbl: ':(after|before|first-letter|first-line|selection|placeholder|-webkit-[-a-zA-Z0-9]{2,})\\b'
},
Patterns = {
@@ -99,7 +102,7 @@
logicalsel: RegExp('^:(?:' + GROUPS.logicalsel + ')(.*)', 'i'),
pseudo_dbl: RegExp('^:(?:' + GROUPS.pseudo_dbl + ')(.*)', 'i'),
pseudo_sng: RegExp('^:(?:' + GROUPS.pseudo_sng + ')(.*)', 'i'),
// combinators symbols
// combinator symbols
children: RegExp('^' + WSP + '?\\>' + WSP + '?(.*)'),
adjacent: RegExp('^' + WSP + '?\\+' + WSP + '?(.*)'),
relative: RegExp('^' + WSP + '?\\~' + WSP + '?(.*)'),
@@ -127,7 +130,6 @@
// special handling configuration flags
Config = {
IDS_DUPES: true,
LIVECACHE: false,
MIXEDCASE: true,
LOGERRORS: true,
VERBOSITY: true
@@ -381,13 +383,13 @@
var e, nodes, api = method['*'];
// DOCUMENT_NODE (9) & ELEMENT_NODE (1)
if (api in context) {
return context[api](tag);
return slice.call(context[api](tag));
} else {
// DOCUMENT_FRAGMENT_NODE (11)
if ((e = context.firstElementChild)) {
tag = tag.toLowerCase();
if (!(e.nextElementSibling || tag == '*' || e.nodeName.toLowerCase() == tag)) {
return e[api](tag);
return slice.call(e[api](tag));
} else {
nodes = [ ];
do {
@@ -406,13 +408,13 @@
var e, nodes, api = method['.'], reCls;
// DOCUMENT_NODE (9) & ELEMENT_NODE (1)
if (api in context) {
return context[api](cls);
return slice.call(context[api](cls));
} else {
// DOCUMENT_FRAGMENT_NODE (11)
if ((e = context.firstElementChild)) {
reCls = RegExp('(^|\\s)' + cls + '(\\s|$)', QUIRKS_MODE ? 'i' : '');
if (!(e.nextElementSibling || reCls.test(e.className))) {
return e[api](cls);
return slice.call(e[api](cls));
} else {
nodes = [ ];
do {
@@ -430,9 +432,9 @@
hasAttributeNS =
function(e, name) {
var i, l, attr = e.getAttributeNames();
HTML_DOCUMENT && (name = name.toLowerCase());
name = RegExp(':?' + name + '$', HTML_DOCUMENT ? 'i' : '');
for (i = 0, l = attr.length; l > i; ++i) {
if (name == attr[i].toLowerCase()) return true;
if (name.test(attr[i])) return true;
}
return false;
},
@@ -1247,13 +1249,13 @@
}
// allow pseudo-elements starting with single colon (:)
// :after, :before, :first-letter, :first-line, :placeholder-shown, :-webkit-<foo-bar>
// :after, :before, :first-letter, :first-line
else if ((match = selector.match(Patterns.pseudo_sng))) {
source = 'if(' + D + '(e.nodeType==1)){' + source + '}';
}
// allow pseudo-elements starting with double colon (::)
// ::after, ::before, ::marker, ::placeholder, ::inactive-selection, ::selection
// ::after, ::before, ::marker, ::placeholder, ::inactive-selection, ::selection, ::-webkit-<foo-bar>
else if ((match = selector.match(Patterns.pseudo_dbl))) {
source = 'if(' + D + '(e.nodeType==1)){' + source + '}';
}
@@ -1442,8 +1444,27 @@
if (selectors) {
if ((resolver = selectResolvers[selectors])) {
if (resolver.context === context && resolver.callback === callback) {
nodes = results_from(resolver, context, callback);
Config.LIVECACHE && !(/\[[^\]]*\]/).test(selectors) && (resolver.results = nodes);
var f = resolver.factory, h = resolver.htmlset, n = resolver.nodeset, nodes = [ ];
if (n.length > 1) {
for (var i = 0, l = n.length, list; l > i; ++i) {
list = compat[n[i][0]](context, n[i].slice(1))();
if (f[i] !== null) {
f[i](list, callback, context, nodes);
} else {
nodes = nodes.concat(list);
}
}
if (l > 1 && nodes.length > 1) {
nodes.sort(documentOrder);
hasDupes && (nodes = unique(nodes));
}
} else {
if (f[0]) {
nodes = f[0](h[0](), callback, context, nodes);
} else {
nodes = h[0]();
}
}
return typeof callback == 'function' ?
concatCall(nodes, callback) : nodes;
}
@@ -1496,7 +1517,7 @@
// save/reuse factory and closure collection
selectResolvers[selectors] = collect(expressions, context, callback);
nodes = results_from(selectResolvers[selectors], context, callback);
nodes = selectResolvers[selectors].results;
return typeof callback == 'function' ?
concatCall(nodes, callback) : nodes;
@@ -1513,83 +1534,45 @@
'*' : '') : '') + selector.slice(index + length - (token[1] == '*' ? 1 : 0));
},
results_from =
function(resolver, context, callback) {
var i, k, l, list, nodes = [ ],
f = resolver.factory, h = resolver.htmlset,
n = resolver.nodeset, r = resolver.results;
for (i = 0, k = 0, l = n.length; l > i; ++i) {
list = r && h[i] ? h[i]() : compat[n[i][0]](context, n[i].slice(1))();
if (f[i] !== null) {
if (r && h[i]) {
if (list.item || validate(resolver, n[i], list)) {
++k;
} else {
f[i](list, callback, context, nodes);
}
} else {
f[i](list, callback, context, nodes);
}
} else {
if (list.length !== 0) {
list.length == 1 ?
nodes[nodes.length] = list[0] :
concatList(nodes, list);
}
}
if (r && h[i]) {
if (k == l) { nodes = r; }
} else {
if (l > 1 && nodes.length > 1) {
nodes.sort(documentOrder);
hasDupes && (nodes = unique(nodes));
}
}
}
return nodes;
},
// validate memoized HTMLCollection
validate =
function(resolver, n, s) {
var c = 0, i = 0, l = s.length, m;
if (l === 0) { return false; }
m = compat[n[0]](resolver.context, n.slice(1))();
if (m.item && s.item) {
while (l > i) { if (m.item(i) === s.item(c)) { ++i; ++c; } else return false; }
} else {
while (l > i) { if (m[i] === s[c]) { ++i; ++c;} else return false; }
}
return m.length == c;
},
// prepare factory resolvers and closure collections
collect =
function(selectors, context, callback) {
var i, l, token, seen = { }, factory = [ ], htmlset = [ ], nodeset = [ ];
var i, l, token, seen = { }, factory = [ ], htmlset = [ ], nodeset = [ ], results = [ ];
for (i = 0, l = selectors.length; l > i; ++i) {
if (!seen[selectors[i]] && (seen[selectors[i]] = true)) {
if ((token = selectors[i].match(reOptimizer)) && token[1] != ':') {
Config.LIVECACHE && !(/\[[^\]]*\]/).test(selectors[i]) && (htmlset[i] = compat[token[1] || '*'](context, token[2]));
nodeset[i] = (token[1] || '*') + token[2];
token[1] || (token[1] = '*');
selectors[i] = optimize(selectors[i], token);
} else if (token && token[1] != ':') {
Config.LIVECACHE && !(/\[[^\]]*\]/).test(selectors[i]) && (htmlset[i] = compat['*'](context, '*'));
nodeset[i] = '**';
} else {
nodeset[i] = '**';
token = ['', '*', '*'];
}
factory[i] = selectors[i] == '*' ? null : compile(selectors[i], true, null);
nodeset[i] = token[1] + token[2];
htmlset[i] = compat[token[1]](context, token[2]);
factory[i] = compile(selectors[i], true, null);
if (factory[i]) {
factory[i](htmlset[i](), callback, context, results);
} else {
results = results.concat(htmlset[i]());
}
}
}
if (l > 1) {
results.sort(documentOrder);
hasDupes && (results = unique(results));
}
return {
callback: callback,
context: context,
factory: factory,
htmlset: htmlset,
nodeset: nodeset,
results: null
results: results
};
},