Latest repo

This commit is contained in:
Marc
2025-06-02 16:42:16 +00:00
parent 53ddf1a329
commit cde5fae175
27907 changed files with 3875388 additions and 1 deletions

4
node_modules/classlist-polyfill/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,4 @@
script: script/test
language: node_js
node_js:
- '0.10'

26
node_modules/classlist-polyfill/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,26 @@
# Changelog
## 1.2.0
* Rewrite history for [yola/classlist-polyfill][], branching and rebasing
from [eligrey/classList][].
* Update fork
* Update package.json to use Unlicense [eligrey#56][]
* Fixes add/remove/toggle in IE10 and IE11 [eligrey#57][]
* IE8 fixes [eligrey#43][]
[yola/classlist-polyfill]: https://github.com/yola/classlist-polyfill
[eligrey/classList]: https://github.com/eligrey/classList.js
[eligrey#57]: https://github.com/eligrey/classList.js/pull/57
[eligrey#56]: https://github.com/eligrey/classList.js/pull/56
[eligrey#43]: https://github.com/eligrey/classList.js/pull/43
## 1.0.3
* Add support for missing SVGElement.classList in IE
## 1.0.2
* Fix issue with `self` not being defined in CommonJS

24
node_modules/classlist-polyfill/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>

35
node_modules/classlist-polyfill/README.md generated vendored Normal file
View File

@@ -0,0 +1,35 @@
# classlist-polyfill
Polyfill for [`element.classList`][docs].
This is a published fork of [classList.js][].
[classList.js]:https://github.com/eligrey/classList.js
[docs]: https://developer.mozilla.org/en/DOM/element.classList
## Installation
Download using [NPM](https://www.npmjs.com/package/classlist-polyfill):
```shell
npm install classlist-polyfill
```
Download using [Bower](http://bower.io/):
```shell
bower install classlist-polyfill
```
## What is the purpose of this repo?
The upstream maintainer has decided [not to publish][comment].
[comment]: https://github.com/eligrey/classList.js/pull/46#issuecomment-189782600
## Contributing
Preferably all changes are made upstream.

24
node_modules/classlist-polyfill/bower.json generated vendored Normal file
View File

@@ -0,0 +1,24 @@
{
"name": "classlist-polyfill",
"description": "MDN's ClassList Polyfill",
"main": "src/index.js",
"authors": [
"Eli Grey <me@eligrey.com>",
"Yola Engineering <engineers@yola.com> (https://www.yola.com/)"
],
"license": "Unlicense",
"keywords": [
"classList",
"polyfill",
"shim",
"cross-browser"
],
"homepage": "https://github.com/yola/classlist-polyfill",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}

32
node_modules/classlist-polyfill/package.json generated vendored Normal file
View File

@@ -0,0 +1,32 @@
{
"name": "classlist-polyfill",
"version": "1.2.0",
"description": "Cross-browser JavaScript shim that fully implements element.classList (referenced on MDN)",
"main": "src/index.js",
"directories": {
"test": "tests"
},
"scripts": {
"test": "bash ./script/test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/yola/classlist-polyfill.git"
},
"keywords": [
"classList",
"polyfill",
"shim",
"cross-browser"
],
"author": "Eli Grey <me@eligrey.com>",
"contributors": [
"Eli Grey <me@eligrey.com>",
"Yola Engineering <engineers@yola.com> (https://www.yola.com/)"
],
"license": "Unlicense",
"bugs": {
"url": "https://github.com/eligrey/classList.js/issues"
},
"homepage": "https://github.com/yola/classlist-polyfill"
}

23
node_modules/classlist-polyfill/script/test generated vendored Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
set -e
if [ -t 1 ]; then
red="$(printf "\033[31m")"
brightred="$(printf "\033[31;1m")"
green="$(printf "\033[32m")"
reset="$(printf "\033[m")"
else
red=
brightred=
green=
reset=
fi
phantomjs tests/runner.coffee tests/qunit.html | sed -E "
# failure line:
s/^(✘.+)/${red}\\1${reset}/
# failure details:
s/^( .+)/${brightred}\\1${reset}/
# success marker:
s/(✔︎)/${green}\\1${reset}/
"

240
node_modules/classlist-polyfill/src/index.js generated vendored Normal file
View File

@@ -0,0 +1,240 @@
/*
* classList.js: Cross-browser full element.classList implementation.
* 1.1.20170427
*
* By Eli Grey, http://eligrey.com
* License: Dedicated to the public domain.
* See https://github.com/eligrey/classList.js/blob/master/LICENSE.md
*/
/*global self, document, DOMException */
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
if ("document" in window.self) {
// Full polyfill for browsers with no classList support
// Including IE < Edge missing SVGElement.classList
if (!("classList" in document.createElement("_"))
|| document.createElementNS && !("classList" in document.createElementNS("http://www.w3.org/2000/svg","g"))) {
(function (view) {
"use strict";
if (!('Element' in view)) return;
var
classListProp = "classList"
, protoProp = "prototype"
, elemCtrProto = view.Element[protoProp]
, objCtr = Object
, strTrim = String[protoProp].trim || function () {
return this.replace(/^\s+|\s+$/g, "");
}
, arrIndexOf = Array[protoProp].indexOf || function (item) {
var
i = 0
, len = this.length
;
for (; i < len; i++) {
if (i in this && this[i] === item) {
return i;
}
}
return -1;
}
// Vendors: please allow content code to instantiate DOMExceptions
, DOMEx = function (type, message) {
this.name = type;
this.code = DOMException[type];
this.message = message;
}
, checkTokenAndGetIndex = function (classList, token) {
if (token === "") {
throw new DOMEx(
"SYNTAX_ERR"
, "An invalid or illegal string was specified"
);
}
if (/\s/.test(token)) {
throw new DOMEx(
"INVALID_CHARACTER_ERR"
, "String contains an invalid character"
);
}
return arrIndexOf.call(classList, token);
}
, ClassList = function (elem) {
var
trimmedClasses = strTrim.call(elem.getAttribute("class") || "")
, classes = trimmedClasses ? trimmedClasses.split(/\s+/) : []
, i = 0
, len = classes.length
;
for (; i < len; i++) {
this.push(classes[i]);
}
this._updateClassName = function () {
elem.setAttribute("class", this.toString());
};
}
, classListProto = ClassList[protoProp] = []
, classListGetter = function () {
return new ClassList(this);
}
;
// Most DOMException implementations don't allow calling DOMException's toString()
// on non-DOMExceptions. Error's toString() is sufficient here.
DOMEx[protoProp] = Error[protoProp];
classListProto.item = function (i) {
return this[i] || null;
};
classListProto.contains = function (token) {
token += "";
return checkTokenAndGetIndex(this, token) !== -1;
};
classListProto.add = function () {
var
tokens = arguments
, i = 0
, l = tokens.length
, token
, updated = false
;
do {
token = tokens[i] + "";
if (checkTokenAndGetIndex(this, token) === -1) {
this.push(token);
updated = true;
}
}
while (++i < l);
if (updated) {
this._updateClassName();
}
};
classListProto.remove = function () {
var
tokens = arguments
, i = 0
, l = tokens.length
, token
, updated = false
, index
;
do {
token = tokens[i] + "";
index = checkTokenAndGetIndex(this, token);
while (index !== -1) {
this.splice(index, 1);
updated = true;
index = checkTokenAndGetIndex(this, token);
}
}
while (++i < l);
if (updated) {
this._updateClassName();
}
};
classListProto.toggle = function (token, force) {
token += "";
var
result = this.contains(token)
, method = result ?
force !== true && "remove"
:
force !== false && "add"
;
if (method) {
this[method](token);
}
if (force === true || force === false) {
return force;
} else {
return !result;
}
};
classListProto.toString = function () {
return this.join(" ");
};
if (objCtr.defineProperty) {
var classListPropDesc = {
get: classListGetter
, enumerable: true
, configurable: true
};
try {
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
} catch (ex) { // IE 8 doesn't support enumerable:true
// adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36
// modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected
if (ex.number === undefined || ex.number === -0x7FF5EC54) {
classListPropDesc.enumerable = false;
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
}
}
} else if (objCtr[protoProp].__defineGetter__) {
elemCtrProto.__defineGetter__(classListProp, classListGetter);
}
}(window.self));
}
// There is full or partial native classList support, so just check if we need
// to normalize the add/remove and toggle APIs.
(function () {
"use strict";
var testElement = document.createElement("_");
testElement.classList.add("c1", "c2");
// Polyfill for IE 10/11 and Firefox <26, where classList.add and
// classList.remove exist but support only one argument at a time.
if (!testElement.classList.contains("c2")) {
var createMethod = function(method) {
var original = DOMTokenList.prototype[method];
DOMTokenList.prototype[method] = function(token) {
var i, len = arguments.length;
for (i = 0; i < len; i++) {
token = arguments[i];
original.call(this, token);
}
};
};
createMethod('add');
createMethod('remove');
}
testElement.classList.toggle("c3", false);
// Polyfill for IE 10 and Firefox <24, where classList.toggle does not
// support the second argument.
if (testElement.classList.contains("c3")) {
var _toggle = DOMTokenList.prototype.toggle;
DOMTokenList.prototype.toggle = function(token, force) {
if (1 in arguments && !this.contains(token) === !force) {
return force;
} else {
return _toggle.call(this, token);
}
};
}
testElement = null;
}());
}

16
node_modules/classlist-polyfill/tests/qunit.html generated vendored Normal file
View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>QUnit Tests</title>
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.14.0.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
<script src="../classList.js"></script>
<script src="tests.js"></script>
<script src="remove.js"></script>
</body>
</html>

10
node_modules/classlist-polyfill/tests/remove.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
QUnit.module("classList.remove");
QUnit.test("Removes duplicated instances of class", function(assert) {
var el = document.createElement("p"), cList = el.classList;
el.className = "ho ho ho"
cList.remove("ho");
assert.ok(!cList.contains("ho"), "Should remove all instances of 'ho'");
assert.strictEqual(el.className, "")
});

46
node_modules/classlist-polyfill/tests/runner.coffee generated vendored Normal file
View File

@@ -0,0 +1,46 @@
urls = require('system').args.slice(1)
page = require('webpage').create()
timeout = 3000
qunitHooks = ->
window.document.addEventListener 'DOMContentLoaded', ->
for callback in ['log', 'testDone', 'done']
do (callback) ->
QUnit[callback] (result) ->
window.callPhantom
name: "QUnit.#{callback}"
data: result
page.onInitialized = -> page.evaluate qunitHooks
page.onConsoleMessage = (msg) -> console.log msg
page.onCallback = (event) ->
if event.name is 'QUnit.log'
details = event.data
if details.result is false
console.log "#{details.module}: #{details.name}"
if details.message and details.message isnt "failed"
console.log " #{details.message}"
if "actual" of details
console.log " expected: #{details.expected}"
console.log " actual: #{details.actual}"
else if event.name is 'QUnit.testDone'
result = event.data
unless result.failed
console.log "✔︎ #{result.module}: #{result.name}"
else if event.name is 'QUnit.done'
res = event.data
console.log "#{res.total} tests, #{res.failed} failed. Done in #{res.runtime} ms"
phantom.exit if !res.total or res.failed then 1 else 0
for url in urls
page.open url, (status) ->
if status isnt 'success'
console.error "failed opening #{url}: #{status}"
phantom.exit 1
else
setTimeout ->
console.error "ERROR: Test execution has timed out"
phantom.exit 1
, timeout

82
node_modules/classlist-polyfill/tests/tests.js generated vendored Normal file
View File

@@ -0,0 +1,82 @@
QUnit.module("classList.toggle");
QUnit.test("Adds a class", function(assert) {
var cList = document.createElement("p").classList;
cList.toggle("c1");
assert.ok(cList.contains("c1"), "Adds a class that is not present");
assert.strictEqual(
cList.toggle("c2"),
true,
"Returns true when class is added"
);
});
QUnit.test("Removes a class", function(assert) {
var cList = document.createElement("p").classList;
cList.add("c1");
cList.toggle("c1");
assert.ok(!cList.contains("c1"), "Removes a class that is present");
cList.add("c2");
assert.strictEqual(
cList.toggle("c2"),
false,
"Return false when class is removed"
);
});
QUnit.test("Adds class with second argument", function(assert) {
var cList = document.createElement("p").classList;
cList.toggle("c1", true);
assert.ok(cList.contains("c1"), "Adds a class");
assert.strictEqual(
cList.toggle("c2", true),
true,
"Returns true when class is added"
);
cList.add("c3");
cList.toggle("c3", true);
assert.ok(
cList.contains("c3"),
"Does not remove a class that is already present"
);
cList.add("c4");
assert.strictEqual(
cList.toggle("c4", true),
true,
"Returns true when class is already present"
);
});
QUnit.test("Removes class with second argument", function(assert) {
var cList = document.createElement("p").classList;
cList.add("c1");
cList.toggle("c1", false);
assert.ok(!cList.contains("c1"), "Removes a class");
assert.strictEqual(
cList.toggle("c2", false),
false,
"Returns false when class is removed"
);
cList.toggle("c3", false);
assert.ok(
!cList.contains("c3"),
"Does not add a class that is not present"
);
assert.strictEqual(
cList.toggle("c4", false),
false,
"Returns false when class was not present"
);
});