Deploy 12.1.7
This commit is contained in:
parent
11b30c7072
commit
20e3491a64
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "12.1.6",
|
"version": "12.1.7",
|
||||||
"homepage": "y-js.org",
|
"homepage": "y-js.org",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
|
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
|
||||||
|
527
y.es6
527
y.es6
@ -5,7 +5,158 @@
|
|||||||
* @license MIT
|
* @license MIT
|
||||||
*/
|
*/
|
||||||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Y = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Y = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||||
|
/**
|
||||||
|
* Helpers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var s = 1000
|
||||||
|
var m = s * 60
|
||||||
|
var h = m * 60
|
||||||
|
var d = h * 24
|
||||||
|
var y = d * 365.25
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse or format the given `val`.
|
||||||
|
*
|
||||||
|
* Options:
|
||||||
|
*
|
||||||
|
* - `long` verbose formatting [false]
|
||||||
|
*
|
||||||
|
* @param {String|Number} val
|
||||||
|
* @param {Object} options
|
||||||
|
* @throws {Error} throw an error if val is not a non-empty string or a number
|
||||||
|
* @return {String|Number}
|
||||||
|
* @api public
|
||||||
|
*/
|
||||||
|
|
||||||
|
module.exports = function (val, options) {
|
||||||
|
options = options || {}
|
||||||
|
var type = typeof val
|
||||||
|
if (type === 'string' && val.length > 0) {
|
||||||
|
return parse(val)
|
||||||
|
} else if (type === 'number' && isNaN(val) === false) {
|
||||||
|
return options.long ?
|
||||||
|
fmtLong(val) :
|
||||||
|
fmtShort(val)
|
||||||
|
}
|
||||||
|
throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val))
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse the given `str` and return milliseconds.
|
||||||
|
*
|
||||||
|
* @param {String} str
|
||||||
|
* @return {Number}
|
||||||
|
* @api private
|
||||||
|
*/
|
||||||
|
|
||||||
|
function parse(str) {
|
||||||
|
str = String(str)
|
||||||
|
if (str.length > 10000) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str)
|
||||||
|
if (!match) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var n = parseFloat(match[1])
|
||||||
|
var type = (match[2] || 'ms').toLowerCase()
|
||||||
|
switch (type) {
|
||||||
|
case 'years':
|
||||||
|
case 'year':
|
||||||
|
case 'yrs':
|
||||||
|
case 'yr':
|
||||||
|
case 'y':
|
||||||
|
return n * y
|
||||||
|
case 'days':
|
||||||
|
case 'day':
|
||||||
|
case 'd':
|
||||||
|
return n * d
|
||||||
|
case 'hours':
|
||||||
|
case 'hour':
|
||||||
|
case 'hrs':
|
||||||
|
case 'hr':
|
||||||
|
case 'h':
|
||||||
|
return n * h
|
||||||
|
case 'minutes':
|
||||||
|
case 'minute':
|
||||||
|
case 'mins':
|
||||||
|
case 'min':
|
||||||
|
case 'm':
|
||||||
|
return n * m
|
||||||
|
case 'seconds':
|
||||||
|
case 'second':
|
||||||
|
case 'secs':
|
||||||
|
case 'sec':
|
||||||
|
case 's':
|
||||||
|
return n * s
|
||||||
|
case 'milliseconds':
|
||||||
|
case 'millisecond':
|
||||||
|
case 'msecs':
|
||||||
|
case 'msec':
|
||||||
|
case 'ms':
|
||||||
|
return n
|
||||||
|
default:
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Short format for `ms`.
|
||||||
|
*
|
||||||
|
* @param {Number} ms
|
||||||
|
* @return {String}
|
||||||
|
* @api private
|
||||||
|
*/
|
||||||
|
|
||||||
|
function fmtShort(ms) {
|
||||||
|
if (ms >= d) {
|
||||||
|
return Math.round(ms / d) + 'd'
|
||||||
|
}
|
||||||
|
if (ms >= h) {
|
||||||
|
return Math.round(ms / h) + 'h'
|
||||||
|
}
|
||||||
|
if (ms >= m) {
|
||||||
|
return Math.round(ms / m) + 'm'
|
||||||
|
}
|
||||||
|
if (ms >= s) {
|
||||||
|
return Math.round(ms / s) + 's'
|
||||||
|
}
|
||||||
|
return ms + 'ms'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Long format for `ms`.
|
||||||
|
*
|
||||||
|
* @param {Number} ms
|
||||||
|
* @return {String}
|
||||||
|
* @api private
|
||||||
|
*/
|
||||||
|
|
||||||
|
function fmtLong(ms) {
|
||||||
|
return plural(ms, d, 'day') ||
|
||||||
|
plural(ms, h, 'hour') ||
|
||||||
|
plural(ms, m, 'minute') ||
|
||||||
|
plural(ms, s, 'second') ||
|
||||||
|
ms + ' ms'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pluralization helper.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function plural(ms, n, name) {
|
||||||
|
if (ms < n) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (ms < n * 1.5) {
|
||||||
|
return Math.floor(ms / n) + ' ' + name
|
||||||
|
}
|
||||||
|
return Math.ceil(ms / n) + ' ' + name + 's'
|
||||||
|
}
|
||||||
|
|
||||||
|
},{}],2:[function(require,module,exports){
|
||||||
|
(function (process){
|
||||||
/**
|
/**
|
||||||
* This is the web browser implementation of `debug()`.
|
* This is the web browser implementation of `debug()`.
|
||||||
*
|
*
|
||||||
@ -45,13 +196,23 @@ exports.colors = [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function useColors() {
|
function useColors() {
|
||||||
|
// NB: In an Electron preload script, document will be defined but not fully
|
||||||
|
// initialized. Since we know we're in Chrome, we'll just detect this case
|
||||||
|
// explicitly
|
||||||
|
if (typeof window !== 'undefined' && window && typeof window.process !== 'undefined' && window.process.type === 'renderer') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// is webkit? http://stackoverflow.com/a/16459606/376773
|
// is webkit? http://stackoverflow.com/a/16459606/376773
|
||||||
return ('WebkitAppearance' in document.documentElement.style) ||
|
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
||||||
|
return (typeof document !== 'undefined' && document && 'WebkitAppearance' in document.documentElement.style) ||
|
||||||
// is firebug? http://stackoverflow.com/a/398120/376773
|
// is firebug? http://stackoverflow.com/a/398120/376773
|
||||||
(window.console && (console.firebug || (console.exception && console.table))) ||
|
(typeof window !== 'undefined' && window && window.console && (console.firebug || (console.exception && console.table))) ||
|
||||||
// is firefox >= v31?
|
// is firefox >= v31?
|
||||||
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
||||||
(navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31);
|
(typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
||||||
|
// double check webkit in userAgent just in case we are in a worker
|
||||||
|
(typeof navigator !== 'undefined' && navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,7 +220,11 @@ function useColors() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
exports.formatters.j = function(v) {
|
exports.formatters.j = function(v) {
|
||||||
return JSON.stringify(v);
|
try {
|
||||||
|
return JSON.stringify(v);
|
||||||
|
} catch (err) {
|
||||||
|
return '[UnexpectedJSONParseError]: ' + err.message;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -69,8 +234,7 @@ exports.formatters.j = function(v) {
|
|||||||
* @api public
|
* @api public
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function formatArgs() {
|
function formatArgs(args) {
|
||||||
var args = arguments;
|
|
||||||
var useColors = this.useColors;
|
var useColors = this.useColors;
|
||||||
|
|
||||||
args[0] = (useColors ? '%c' : '')
|
args[0] = (useColors ? '%c' : '')
|
||||||
@ -80,17 +244,17 @@ function formatArgs() {
|
|||||||
+ (useColors ? '%c ' : ' ')
|
+ (useColors ? '%c ' : ' ')
|
||||||
+ '+' + exports.humanize(this.diff);
|
+ '+' + exports.humanize(this.diff);
|
||||||
|
|
||||||
if (!useColors) return args;
|
if (!useColors) return;
|
||||||
|
|
||||||
var c = 'color: ' + this.color;
|
var c = 'color: ' + this.color;
|
||||||
args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));
|
args.splice(1, 0, c, 'color: inherit')
|
||||||
|
|
||||||
// the final "%c" is somewhat tricky, because there could be other
|
// the final "%c" is somewhat tricky, because there could be other
|
||||||
// arguments passed either before or after the %c, so we need to
|
// arguments passed either before or after the %c, so we need to
|
||||||
// figure out the correct index to insert the CSS into
|
// figure out the correct index to insert the CSS into
|
||||||
var index = 0;
|
var index = 0;
|
||||||
var lastC = 0;
|
var lastC = 0;
|
||||||
args[0].replace(/%[a-z%]/g, function(match) {
|
args[0].replace(/%[a-zA-Z%]/g, function(match) {
|
||||||
if ('%%' === match) return;
|
if ('%%' === match) return;
|
||||||
index++;
|
index++;
|
||||||
if ('%c' === match) {
|
if ('%c' === match) {
|
||||||
@ -101,7 +265,6 @@ function formatArgs() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
args.splice(lastC, 0, c);
|
args.splice(lastC, 0, c);
|
||||||
return args;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -148,6 +311,12 @@ function load() {
|
|||||||
try {
|
try {
|
||||||
r = exports.storage.debug;
|
r = exports.storage.debug;
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
|
|
||||||
|
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
||||||
|
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
||||||
|
r = process.env.DEBUG;
|
||||||
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,13 +337,15 @@ exports.enable(load());
|
|||||||
* @api private
|
* @api private
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function localstorage(){
|
function localstorage() {
|
||||||
try {
|
try {
|
||||||
return window.localStorage;
|
return window.localStorage;
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
},{"./debug":2}],2:[function(require,module,exports){
|
}).call(this,require('_process'))
|
||||||
|
|
||||||
|
},{"./debug":3,"_process":4}],3:[function(require,module,exports){
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the common logic for both the Node.js and web browser
|
* This is the common logic for both the Node.js and web browser
|
||||||
@ -183,7 +354,7 @@ function localstorage(){
|
|||||||
* Expose `debug()` as the module.
|
* Expose `debug()` as the module.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
exports = module.exports = debug;
|
exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
|
||||||
exports.coerce = coerce;
|
exports.coerce = coerce;
|
||||||
exports.disable = disable;
|
exports.disable = disable;
|
||||||
exports.enable = enable;
|
exports.enable = enable;
|
||||||
@ -200,17 +371,11 @@ exports.skips = [];
|
|||||||
/**
|
/**
|
||||||
* Map of special "%n" handling functions, for the debug "format" argument.
|
* Map of special "%n" handling functions, for the debug "format" argument.
|
||||||
*
|
*
|
||||||
* Valid key names are a single, lowercased letter, i.e. "n".
|
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
exports.formatters = {};
|
exports.formatters = {};
|
||||||
|
|
||||||
/**
|
|
||||||
* Previously assigned color.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var prevColor = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Previous log timestamp.
|
* Previous log timestamp.
|
||||||
*/
|
*/
|
||||||
@ -219,13 +384,20 @@ var prevTime;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Select a color.
|
* Select a color.
|
||||||
*
|
* @param {String} namespace
|
||||||
* @return {Number}
|
* @return {Number}
|
||||||
* @api private
|
* @api private
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function selectColor() {
|
function selectColor(namespace) {
|
||||||
return exports.colors[prevColor++ % exports.colors.length];
|
var hash = 0, i;
|
||||||
|
|
||||||
|
for (i in namespace) {
|
||||||
|
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
||||||
|
hash |= 0; // Convert to 32bit integer
|
||||||
|
}
|
||||||
|
|
||||||
|
return exports.colors[Math.abs(hash) % exports.colors.length];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -236,17 +408,13 @@ function selectColor() {
|
|||||||
* @api public
|
* @api public
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function debug(namespace) {
|
function createDebug(namespace) {
|
||||||
|
|
||||||
// define the `disabled` version
|
function debug() {
|
||||||
function disabled() {
|
// disabled?
|
||||||
}
|
if (!debug.enabled) return;
|
||||||
disabled.enabled = false;
|
|
||||||
|
|
||||||
// define the `enabled` version
|
var self = debug;
|
||||||
function enabled() {
|
|
||||||
|
|
||||||
var self = enabled;
|
|
||||||
|
|
||||||
// set `diff` timestamp
|
// set `diff` timestamp
|
||||||
var curr = +new Date();
|
var curr = +new Date();
|
||||||
@ -256,22 +424,22 @@ function debug(namespace) {
|
|||||||
self.curr = curr;
|
self.curr = curr;
|
||||||
prevTime = curr;
|
prevTime = curr;
|
||||||
|
|
||||||
// add the `color` if not set
|
// turn the `arguments` into a proper Array
|
||||||
if (null == self.useColors) self.useColors = exports.useColors();
|
var args = new Array(arguments.length);
|
||||||
if (null == self.color && self.useColors) self.color = selectColor();
|
for (var i = 0; i < args.length; i++) {
|
||||||
|
args[i] = arguments[i];
|
||||||
var args = Array.prototype.slice.call(arguments);
|
}
|
||||||
|
|
||||||
args[0] = exports.coerce(args[0]);
|
args[0] = exports.coerce(args[0]);
|
||||||
|
|
||||||
if ('string' !== typeof args[0]) {
|
if ('string' !== typeof args[0]) {
|
||||||
// anything else let's inspect with %o
|
// anything else let's inspect with %O
|
||||||
args = ['%o'].concat(args);
|
args.unshift('%O');
|
||||||
}
|
}
|
||||||
|
|
||||||
// apply any `formatters` transformations
|
// apply any `formatters` transformations
|
||||||
var index = 0;
|
var index = 0;
|
||||||
args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
|
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
|
||||||
// if we encounter an escaped % then don't increase the array index
|
// if we encounter an escaped % then don't increase the array index
|
||||||
if (match === '%%') return match;
|
if (match === '%%') return match;
|
||||||
index++;
|
index++;
|
||||||
@ -287,19 +455,24 @@ function debug(namespace) {
|
|||||||
return match;
|
return match;
|
||||||
});
|
});
|
||||||
|
|
||||||
if ('function' === typeof exports.formatArgs) {
|
// apply env-specific formatting (colors, etc.)
|
||||||
args = exports.formatArgs.apply(self, args);
|
exports.formatArgs.call(self, args);
|
||||||
}
|
|
||||||
var logFn = enabled.log || exports.log || console.log.bind(console);
|
var logFn = debug.log || exports.log || console.log.bind(console);
|
||||||
logFn.apply(self, args);
|
logFn.apply(self, args);
|
||||||
}
|
}
|
||||||
enabled.enabled = true;
|
|
||||||
|
|
||||||
var fn = exports.enabled(namespace) ? enabled : disabled;
|
debug.namespace = namespace;
|
||||||
|
debug.enabled = exports.enabled(namespace);
|
||||||
|
debug.useColors = exports.useColors();
|
||||||
|
debug.color = selectColor(namespace);
|
||||||
|
|
||||||
fn.namespace = namespace;
|
// env-specific initialization logic for debug instances
|
||||||
|
if ('function' === typeof exports.init) {
|
||||||
|
exports.init(debug);
|
||||||
|
}
|
||||||
|
|
||||||
return fn;
|
return debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -313,6 +486,9 @@ function debug(namespace) {
|
|||||||
function enable(namespaces) {
|
function enable(namespaces) {
|
||||||
exports.save(namespaces);
|
exports.save(namespaces);
|
||||||
|
|
||||||
|
exports.names = [];
|
||||||
|
exports.skips = [];
|
||||||
|
|
||||||
var split = (namespaces || '').split(/[\s,]+/);
|
var split = (namespaces || '').split(/[\s,]+/);
|
||||||
var len = split.length;
|
var len = split.length;
|
||||||
|
|
||||||
@ -373,134 +549,141 @@ function coerce(val) {
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
},{"ms":3}],3:[function(require,module,exports){
|
},{"ms":1}],4:[function(require,module,exports){
|
||||||
/**
|
// shim for using process in browser
|
||||||
* Helpers.
|
var process = module.exports = {};
|
||||||
*/
|
|
||||||
|
|
||||||
var s = 1000;
|
// cached from whatever global is present so that test runners that stub it
|
||||||
var m = s * 60;
|
// don't break things. But we need to wrap it in a try catch in case it is
|
||||||
var h = m * 60;
|
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
||||||
var d = h * 24;
|
// function because try/catches deoptimize in certain engines.
|
||||||
var y = d * 365.25;
|
|
||||||
|
|
||||||
/**
|
var cachedSetTimeout;
|
||||||
* Parse or format the given `val`.
|
var cachedClearTimeout;
|
||||||
*
|
|
||||||
* Options:
|
|
||||||
*
|
|
||||||
* - `long` verbose formatting [false]
|
|
||||||
*
|
|
||||||
* @param {String|Number} val
|
|
||||||
* @param {Object} options
|
|
||||||
* @return {String|Number}
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
module.exports = function(val, options){
|
(function () {
|
||||||
options = options || {};
|
try {
|
||||||
if ('string' == typeof val) return parse(val);
|
cachedSetTimeout = setTimeout;
|
||||||
return options.long
|
} catch (e) {
|
||||||
? long(val)
|
cachedSetTimeout = function () {
|
||||||
: short(val);
|
throw new Error('setTimeout is not defined');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
cachedClearTimeout = clearTimeout;
|
||||||
|
} catch (e) {
|
||||||
|
cachedClearTimeout = function () {
|
||||||
|
throw new Error('clearTimeout is not defined');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ())
|
||||||
|
function runTimeout(fun) {
|
||||||
|
if (cachedSetTimeout === setTimeout) {
|
||||||
|
return setTimeout(fun, 0);
|
||||||
|
} else {
|
||||||
|
return cachedSetTimeout.call(null, fun, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function runClearTimeout(marker) {
|
||||||
|
if (cachedClearTimeout === clearTimeout) {
|
||||||
|
clearTimeout(marker);
|
||||||
|
} else {
|
||||||
|
cachedClearTimeout.call(null, marker);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var queue = [];
|
||||||
|
var draining = false;
|
||||||
|
var currentQueue;
|
||||||
|
var queueIndex = -1;
|
||||||
|
|
||||||
|
function cleanUpNextTick() {
|
||||||
|
if (!draining || !currentQueue) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
draining = false;
|
||||||
|
if (currentQueue.length) {
|
||||||
|
queue = currentQueue.concat(queue);
|
||||||
|
} else {
|
||||||
|
queueIndex = -1;
|
||||||
|
}
|
||||||
|
if (queue.length) {
|
||||||
|
drainQueue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function drainQueue() {
|
||||||
|
if (draining) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var timeout = runTimeout(cleanUpNextTick);
|
||||||
|
draining = true;
|
||||||
|
|
||||||
|
var len = queue.length;
|
||||||
|
while(len) {
|
||||||
|
currentQueue = queue;
|
||||||
|
queue = [];
|
||||||
|
while (++queueIndex < len) {
|
||||||
|
if (currentQueue) {
|
||||||
|
currentQueue[queueIndex].run();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
queueIndex = -1;
|
||||||
|
len = queue.length;
|
||||||
|
}
|
||||||
|
currentQueue = null;
|
||||||
|
draining = false;
|
||||||
|
runClearTimeout(timeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
process.nextTick = function (fun) {
|
||||||
|
var args = new Array(arguments.length - 1);
|
||||||
|
if (arguments.length > 1) {
|
||||||
|
for (var i = 1; i < arguments.length; i++) {
|
||||||
|
args[i - 1] = arguments[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
queue.push(new Item(fun, args));
|
||||||
|
if (queue.length === 1 && !draining) {
|
||||||
|
runTimeout(drainQueue);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
// v8 likes predictible objects
|
||||||
* Parse the given `str` and return milliseconds.
|
function Item(fun, array) {
|
||||||
*
|
this.fun = fun;
|
||||||
* @param {String} str
|
this.array = array;
|
||||||
* @return {Number}
|
|
||||||
* @api private
|
|
||||||
*/
|
|
||||||
|
|
||||||
function parse(str) {
|
|
||||||
str = '' + str;
|
|
||||||
if (str.length > 10000) return;
|
|
||||||
var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
|
|
||||||
if (!match) return;
|
|
||||||
var n = parseFloat(match[1]);
|
|
||||||
var type = (match[2] || 'ms').toLowerCase();
|
|
||||||
switch (type) {
|
|
||||||
case 'years':
|
|
||||||
case 'year':
|
|
||||||
case 'yrs':
|
|
||||||
case 'yr':
|
|
||||||
case 'y':
|
|
||||||
return n * y;
|
|
||||||
case 'days':
|
|
||||||
case 'day':
|
|
||||||
case 'd':
|
|
||||||
return n * d;
|
|
||||||
case 'hours':
|
|
||||||
case 'hour':
|
|
||||||
case 'hrs':
|
|
||||||
case 'hr':
|
|
||||||
case 'h':
|
|
||||||
return n * h;
|
|
||||||
case 'minutes':
|
|
||||||
case 'minute':
|
|
||||||
case 'mins':
|
|
||||||
case 'min':
|
|
||||||
case 'm':
|
|
||||||
return n * m;
|
|
||||||
case 'seconds':
|
|
||||||
case 'second':
|
|
||||||
case 'secs':
|
|
||||||
case 'sec':
|
|
||||||
case 's':
|
|
||||||
return n * s;
|
|
||||||
case 'milliseconds':
|
|
||||||
case 'millisecond':
|
|
||||||
case 'msecs':
|
|
||||||
case 'msec':
|
|
||||||
case 'ms':
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Item.prototype.run = function () {
|
||||||
|
this.fun.apply(null, this.array);
|
||||||
|
};
|
||||||
|
process.title = 'browser';
|
||||||
|
process.browser = true;
|
||||||
|
process.env = {};
|
||||||
|
process.argv = [];
|
||||||
|
process.version = ''; // empty string to avoid regexp issues
|
||||||
|
process.versions = {};
|
||||||
|
|
||||||
/**
|
function noop() {}
|
||||||
* Short format for `ms`.
|
|
||||||
*
|
|
||||||
* @param {Number} ms
|
|
||||||
* @return {String}
|
|
||||||
* @api private
|
|
||||||
*/
|
|
||||||
|
|
||||||
function short(ms) {
|
process.on = noop;
|
||||||
if (ms >= d) return Math.round(ms / d) + 'd';
|
process.addListener = noop;
|
||||||
if (ms >= h) return Math.round(ms / h) + 'h';
|
process.once = noop;
|
||||||
if (ms >= m) return Math.round(ms / m) + 'm';
|
process.off = noop;
|
||||||
if (ms >= s) return Math.round(ms / s) + 's';
|
process.removeListener = noop;
|
||||||
return ms + 'ms';
|
process.removeAllListeners = noop;
|
||||||
}
|
process.emit = noop;
|
||||||
|
|
||||||
/**
|
process.binding = function (name) {
|
||||||
* Long format for `ms`.
|
throw new Error('process.binding is not supported');
|
||||||
*
|
};
|
||||||
* @param {Number} ms
|
|
||||||
* @return {String}
|
|
||||||
* @api private
|
|
||||||
*/
|
|
||||||
|
|
||||||
function long(ms) {
|
process.cwd = function () { return '/' };
|
||||||
return plural(ms, d, 'day')
|
process.chdir = function (dir) {
|
||||||
|| plural(ms, h, 'hour')
|
throw new Error('process.chdir is not supported');
|
||||||
|| plural(ms, m, 'minute')
|
};
|
||||||
|| plural(ms, s, 'second')
|
process.umask = function() { return 0; };
|
||||||
|| ms + ' ms';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
},{}],5:[function(require,module,exports){
|
||||||
* Pluralization helper.
|
|
||||||
*/
|
|
||||||
|
|
||||||
function plural(ms, n, name) {
|
|
||||||
if (ms < n) return;
|
|
||||||
if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
|
|
||||||
return Math.ceil(ms / n) + ' ' + name + 's';
|
|
||||||
}
|
|
||||||
|
|
||||||
},{}],4:[function(require,module,exports){
|
|
||||||
/* @flow */
|
/* @flow */
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
@ -981,7 +1164,7 @@ module.exports = function (Y/* :any */) {
|
|||||||
Y.AbstractConnector = AbstractConnector
|
Y.AbstractConnector = AbstractConnector
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],5:[function(require,module,exports){
|
},{}],6:[function(require,module,exports){
|
||||||
/* global getRandom, async */
|
/* global getRandom, async */
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
@ -1157,7 +1340,7 @@ module.exports = function (Y) {
|
|||||||
Y.Test = Test
|
Y.Test = Test
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],6:[function(require,module,exports){
|
},{}],7:[function(require,module,exports){
|
||||||
/* @flow */
|
/* @flow */
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
@ -1758,7 +1941,7 @@ module.exports = function (Y /* :any */) {
|
|||||||
Y.AbstractDatabase = AbstractDatabase
|
Y.AbstractDatabase = AbstractDatabase
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],7:[function(require,module,exports){
|
},{}],8:[function(require,module,exports){
|
||||||
/* @flow */
|
/* @flow */
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
@ -2174,7 +2357,7 @@ module.exports = function (Y/* :any */) {
|
|||||||
Y.Struct = Struct
|
Y.Struct = Struct
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],8:[function(require,module,exports){
|
},{}],9:[function(require,module,exports){
|
||||||
/* @flow */
|
/* @flow */
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
@ -3224,7 +3407,7 @@ module.exports = function (Y/* :any */) {
|
|||||||
Y.Transaction = TransactionInterface
|
Y.Transaction = TransactionInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],9:[function(require,module,exports){
|
},{}],10:[function(require,module,exports){
|
||||||
/* @flow */
|
/* @flow */
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
@ -3986,7 +4169,7 @@ module.exports = function (Y /* : any*/) {
|
|||||||
Y.utils.generateGuid = generateGuid
|
Y.utils.generateGuid = generateGuid
|
||||||
}
|
}
|
||||||
|
|
||||||
},{}],10:[function(require,module,exports){
|
},{}],11:[function(require,module,exports){
|
||||||
/* @flow */
|
/* @flow */
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
@ -4225,6 +4408,6 @@ class YConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},{"./Connector.js":4,"./Connectors/Test.js":5,"./Database.js":6,"./Struct.js":7,"./Transaction.js":8,"./Utils.js":9,"debug":1}]},{},[10])(10)
|
},{"./Connector.js":5,"./Connectors/Test.js":6,"./Database.js":7,"./Struct.js":8,"./Transaction.js":9,"./Utils.js":10,"debug":2}]},{},[11])(11)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user