Current Dev State

This commit is contained in:
Tim Lorsbach
2025-06-23 20:13:54 +02:00
parent b4f9bb277d
commit ded50edaa2
22617 changed files with 4345095 additions and 174 deletions

21
static/js/ketcher2/node_modules/timers-ext/CHANGES generated vendored Normal file
View File

@ -0,0 +1,21 @@
v0.1.2 -- 2017.04.03
* `throttle` util
v0.1.1 -- 2017.03.15
* Workaround IE8 resolution issue
* Support any callable objects as callbacks
* Improve documentation
* Fix spelling of LICENSE
* Configure lint scripts
* Update dependencies
v0.1.0 -- 2014.04.27
First production ready version
- Depend strictly on npm hosted package versions
- Full documentation
- Add `once` (moved from next-tick project)
- Make timeout value optional in delay
- Rename MAX_VALUE into MAX_TIMEOUT
v0.0.0 -- 2013.08.27
Initial (dev) version

21
static/js/ketcher2/node_modules/timers-ext/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (C) 2013-2017 Mariusz Nowak (www.medikoo.com)
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 Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
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 OR COPYRIGHT HOLDERS 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.

55
static/js/ketcher2/node_modules/timers-ext/README.md generated vendored Normal file
View File

@ -0,0 +1,55 @@
# timers-ext
## Timers extensions
### Installation
$ npm install timers-ext
To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
### API
#### MAX\_TIMEOUT _(timers-ext/max-timeout)_
Maximum possible timeout value in milliseconds. It equals to maximum positive value for 32bit signed integer, so _2³¹ (2147483647)_, which makes it around 24.9 days
#### delay(fn[, timeout]) _(timers-ext/delay)_
Returns function which when invoked will call _fn_ function after specified
_timeout_. If _timeout_ is not provided [nextTick](https://github.com/medikoo/next-tick/#next-tick) propagation is used.
#### once(fn[, timeout]) _(timers-ext/once)_
Makes sure to execute _fn_ function only once after a defined interval of time (debounce). If _timeout_ is not provided [nextTick](https://github.com/medikoo/next-tick/#next-tick) propagation is used.
```javascript
var nextTick = require('next-tick');
var logFoo = function () { console.log('foo'); };
var logFooOnce = require('timers-ext/once')(logFoo);
logFooOnce();
logFooOnce(); // ignored, logFoo will be logged only once
logFooOnce(); // ignored
nextTick(function () {
logFooOnce(); // Invokes another log (as tick passed)
logFooOnce(); // ignored
logFooOnce(); // ignored
});
```
#### validTimeout(timeout) _(timers-ext/valid-timeout)_
Validates timeout value.
For `NaN` resolved _timeout_ `0` is returned.
If _timeout_ resolves to a number:
- for _timeout < 0_ `0` is returned
- for _0 >= timeout <= [MAX_TIMEOUT](#max_timeout-timers-extmax-timeout)_, `timeout` value is returned
- for _timeout > [MAX_TIMEOUT](#max_timeout-timers-extmax-timeout)_ exception is thrown
### Tests [![Build Status](https://travis-ci.org/medikoo/timers-ext.png)](https://travis-ci.org/medikoo/timers-ext)
$ npm test

19
static/js/ketcher2/node_modules/timers-ext/delay.js generated vendored Normal file
View File

@ -0,0 +1,19 @@
'use strict';
var callable = require('es5-ext/object/valid-callable')
, nextTick = require('next-tick')
, validTimeout = require('./valid-timeout')
, apply = Function.prototype.apply;
module.exports = function (fn/*, timeout*/) {
var delay, timeout = arguments[1];
callable(fn);
if (timeout === undefined) {
delay = nextTick;
} else {
timeout = validTimeout(timeout);
delay = setTimeout;
}
return function () { return delay(apply.bind(fn, this, arguments), timeout); };
};

View File

@ -0,0 +1,3 @@
'use strict';
module.exports = 2147483647;

41
static/js/ketcher2/node_modules/timers-ext/once.js generated vendored Normal file
View File

@ -0,0 +1,41 @@
// It's actually "debounce"
'use strict';
var callable = require('es5-ext/object/valid-callable')
, nextTick = require('next-tick')
, validTimeout = require('./valid-timeout')
, apply = Function.prototype.apply;
module.exports = function (fn/*, timeout*/) {
var scheduled, run, context, args, delay, timeout = arguments[1], handle;
callable(fn);
if (timeout == null) {
delay = nextTick;
} else {
timeout = validTimeout(timeout);
delay = setTimeout;
}
run = function () {
if (!scheduled) return; // IE8 tends to not clear immediate timeouts properly
scheduled = false;
handle = null;
apply.call(fn, context, args);
context = null;
args = null;
};
return function () {
if (scheduled) {
if (handle == null) {
// 'nextTick' based, no room for debounce
return;
}
clearTimeout(handle);
}
scheduled = true;
context = this;
args = arguments;
handle = delay(run, timeout);
};
};

View File

@ -0,0 +1,66 @@
{
"_from": "timers-ext@^0.1.2",
"_id": "timers-ext@0.1.2",
"_inBundle": false,
"_integrity": "sha1-YcxHp2wavTGV8UUn+XjViulMUgQ=",
"_location": "/timers-ext",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "timers-ext@^0.1.2",
"name": "timers-ext",
"escapedName": "timers-ext",
"rawSpec": "^0.1.2",
"saveSpec": null,
"fetchSpec": "^0.1.2"
},
"_requiredBy": [
"/memoizee"
],
"_resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.2.tgz",
"_shasum": "61cc47a76c1abd3195f14527f978d58ae94c5204",
"_spec": "timers-ext@^0.1.2",
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/memoizee",
"author": {
"name": "Mariusz Nowak",
"email": "medyk@medikoo.com",
"url": "http://www.medikoo.com/"
},
"bugs": {
"url": "https://github.com/medikoo/timers-ext/issues"
},
"bundleDependencies": false,
"dependencies": {
"es5-ext": "~0.10.14",
"next-tick": "1"
},
"deprecated": false,
"description": "Timers extensions",
"devDependencies": {
"tad": "~0.2.7",
"xlint": "~0.2.2",
"xlint-jslint-medikoo": "~0.1.4"
},
"homepage": "https://github.com/medikoo/timers-ext#readme",
"keywords": [
"timeout",
"delay",
"interval",
"time",
"timer",
"timers"
],
"license": "MIT",
"name": "timers-ext",
"repository": {
"type": "git",
"url": "git://github.com/medikoo/timers-ext.git"
},
"scripts": {
"lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
"lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
"test": "node node_modules/tad/bin/tad"
},
"version": "0.1.2"
}

View File

@ -0,0 +1,23 @@
'use strict';
module.exports = function (t, a, d) {
var data, count = 0
, x = function (a, b, c) { data = [this, a, b, c, ++count]; }
, y = t(x, 200), z = {};
a(data, undefined, "Setup");
y.call(z, 111, 'foo', false);
a(data, undefined, "Immediately");
setTimeout(function () {
a(data, undefined, "100ms");
setTimeout(function () {
a.deep(data, [z, 111, 'foo', false, 1], "250ms");
data = null;
clearTimeout(y());
setTimeout(function () {
a(data, null, "Clear");
d();
}, 300);
}, 150);
}, 100);
};

View File

@ -0,0 +1,11 @@
'use strict';
module.exports = function (t, a, d) {
var invoked, id;
id = setTimeout(function () { invoked = true; }, t);
setTimeout(function () {
a(invoked, undefined);
clearTimeout(id);
d();
}, 100);
};

View File

@ -0,0 +1,38 @@
'use strict';
module.exports = function (t, a, d) {
var called = 0, fn = t(function () { ++called; });
fn();
fn();
fn();
setTimeout(function () {
a(called, 1);
called = 0;
fn = t(function () { ++called; }, 50);
fn();
fn();
fn();
setTimeout(function () {
fn();
fn();
setTimeout(function () {
fn();
fn();
setTimeout(function () {
fn();
fn();
setTimeout(function () {
a(called, 1);
d();
}, 70);
}, 30);
}, 30);
}, 30);
}, 10);
};

View File

@ -0,0 +1,33 @@
'use strict';
module.exports = function (t, a, d) {
var called = 0, fn = t(function () { ++called; }, 50);
fn();
a(called, 1);
fn();
fn();
a(called, 1);
setTimeout(function () {
a(called, 1);
fn();
setTimeout(function () {
a(called, 2);
fn();
fn();
setTimeout(function () {
a(called, 2);
setTimeout(function () {
a(called, 3);
setTimeout(function () {
a(called, 3);
d();
}, 100);
}, 30);
}, 20);
}, 30);
}, 30);
};

View File

@ -0,0 +1,8 @@
'use strict';
module.exports = function (t, a) {
a(t(NaN), 0, "NaN");
a(t(-343), 0, "Negative");
a(t(232342), 232342, "Positive");
a.throws(function () { t(1e23); }, TypeError, "Too large");
};

33
static/js/ketcher2/node_modules/timers-ext/throttle.js generated vendored Normal file
View File

@ -0,0 +1,33 @@
'use strict';
var callable = require('es5-ext/object/valid-callable')
, validTimeout = require('./valid-timeout')
, apply = Function.prototype.apply;
module.exports = function (fn, timeout) {
var isScheduled = false, context, args, run;
callable(fn);
timeout = validTimeout(timeout);
run = function () {
var currentContext = context, currentArgs = args;
if (!args) {
isScheduled = false;
return;
}
context = null;
args = null;
setTimeout(run, timeout);
apply.call(fn, currentContext, currentArgs);
};
return function () {
if (isScheduled) {
context = this;
args = arguments;
return;
}
isScheduled = true;
setTimeout(run, timeout);
apply.call(fn, this, arguments);
};
};

View File

@ -0,0 +1,10 @@
'use strict';
var toPosInt = require('es5-ext/number/to-pos-integer')
, maxTimeout = require('./max-timeout');
module.exports = function (value) {
value = toPosInt(value);
if (value > maxTimeout) throw new TypeError(value + " exceeds maximum possible timeout");
return value;
};