new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/**
|
||||
* Used to resolve the
|
||||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
||||
* of values.
|
||||
*/
|
||||
var nativeObjectToString = objectProto.toString;
|
||||
|
||||
/**
|
||||
* Converts `value` to a string using `Object.prototype.toString`.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to convert.
|
||||
* @returns {string} Returns the converted string.
|
||||
*/
|
||||
function objectToString(value) {
|
||||
return nativeObjectToString.call(value);
|
||||
}
|
||||
|
||||
module.exports = objectToString;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
test/**
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0.00155,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0.00155,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0.00155,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.00155,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0.00155,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0.00155,"102":0,"103":0,"104":0,"105":0.00311,"106":0,"107":0.00155,"108":0.00621,"109":0.09629,"110":0.07144,"111":0,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0.00311,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0.00155,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0.00155,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0.00155,"81":0.00155,"83":0,"84":0,"85":0,"86":0.01242,"87":0.00155,"88":0,"89":0,"90":0,"91":0,"92":0.00155,"93":0,"94":0.00932,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.00311,"103":0.00155,"104":0,"105":0,"106":0,"107":0.00311,"108":0.00932,"109":0.24072,"110":0.18325,"111":0,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0.00155,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0.00777,"62":0,"63":0.00466,"64":0,"65":0.03106,"66":0.01708,"67":0.00777,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0.00311,"74":0.00466,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0.00777,"95":0.01864,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0.00155,"13":0,"14":0,"15":0,"16":0.00155,"17":0,"18":0.00466,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0.00155,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0.01398,"109":0.09007,"110":0.03106},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.00155,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0.00621,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0,"14.1":0.00155,"15.1":0,"15.2-15.3":0,"15.4":0.00155,"15.5":0,"15.6":0,"16.0":0,"16.1":0,"16.2":0.00311,"16.3":0.00621,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00712,"10.0-10.2":0,"10.3":0.00089,"11.0-11.2":0.00445,"11.3-11.4":1.3096,"12.0-12.1":0.06939,"12.2-12.5":1.82828,"13.0-13.1":0.14947,"13.2":0,"13.3":0.00178,"13.4-13.7":0.02402,"14.0-14.4":0.20729,"14.5-14.8":0.36833,"15.0-15.1":0.17794,"15.2-15.3":0.19128,"15.4":0.26868,"15.5":0.33452,"15.6":1.40124,"16.0":0.55249,"16.1":0.49733,"16.2":0.65213,"16.3":0.73932,"16.4":0.00089},P:{"4":0.24576,"20":0.09216,"5.0-5.4":0.02048,"6.2-6.4":0.03072,"7.2-7.4":0.13312,"8.2":0,"9.2":0.17408,"10.1":0,"11.1-11.2":0.04096,"12.0":0,"13.0":0.01024,"14.0":0.08192,"15.0":0.01024,"16.0":0.52224,"17.0":0.0512,"18.0":0.1536,"19.0":0.60416},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00445,"4.4":0,"4.4.3-4.4.4":0.02021},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0.02534,_:"3.0-3.1"},J:{"7":0,"10":0.00845},O:{"0":0.43924},H:{"0":1.20756},L:{"0":85.41028},R:{_:"0"},M:{"0":0.05913},Q:{"13.1":0.10136}};
|
||||
@@ -0,0 +1,2 @@
|
||||
import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.12.1",n,{Fragment:o,Component:e});export{t as addHookName};
|
||||
//# sourceMappingURL=devtools.module.js.map
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { ObservableInput, SchedulerLike, ObservedValueOf, ObservableInputTuple } from '../types';
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { AnyCatcher } from '../AnyCatcher';
|
||||
/**
|
||||
* You have passed `any` here, we can't figure out if it is
|
||||
* an array or an object, so you're getting `unknown`. Use better types.
|
||||
* @param arg Something typed as `any`
|
||||
*/
|
||||
export declare function combineLatest<T extends AnyCatcher>(arg: T): Observable<unknown>;
|
||||
export declare function combineLatest(sources: []): Observable<never>;
|
||||
export declare function combineLatest<A extends readonly unknown[]>(sources: readonly [...ObservableInputTuple<A>]): Observable<A>;
|
||||
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
|
||||
export declare function combineLatest<A extends readonly unknown[], R>(sources: readonly [...ObservableInputTuple<A>], resultSelector: (...values: A) => R, scheduler: SchedulerLike): Observable<R>;
|
||||
export declare function combineLatest<A extends readonly unknown[], R>(sources: readonly [...ObservableInputTuple<A>], resultSelector: (...values: A) => R): Observable<R>;
|
||||
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
|
||||
export declare function combineLatest<A extends readonly unknown[]>(sources: readonly [...ObservableInputTuple<A>], scheduler: SchedulerLike): Observable<A>;
|
||||
/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */
|
||||
export declare function combineLatest<A extends readonly unknown[]>(...sources: [...ObservableInputTuple<A>]): Observable<A>;
|
||||
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
|
||||
export declare function combineLatest<A extends readonly unknown[], R>(...sourcesAndResultSelectorAndScheduler: [...ObservableInputTuple<A>, (...values: A) => R, SchedulerLike]): Observable<R>;
|
||||
/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */
|
||||
export declare function combineLatest<A extends readonly unknown[], R>(...sourcesAndResultSelector: [...ObservableInputTuple<A>, (...values: A) => R]): Observable<R>;
|
||||
/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */
|
||||
export declare function combineLatest<A extends readonly unknown[]>(...sourcesAndScheduler: [...ObservableInputTuple<A>, SchedulerLike]): Observable<A>;
|
||||
export declare function combineLatest(sourcesObject: {
|
||||
[K in any]: never;
|
||||
}): Observable<never>;
|
||||
export declare function combineLatest<T extends Record<string, ObservableInput<any>>>(sourcesObject: T): Observable<{
|
||||
[K in keyof T]: ObservedValueOf<T[K]>;
|
||||
}>;
|
||||
export declare function combineLatestInit(observables: ObservableInput<any>[], scheduler?: SchedulerLike, valueTransform?: (values: any[]) => any): (subscriber: Subscriber<any>) => void;
|
||||
//# sourceMappingURL=combineLatest.d.ts.map
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
SemVer: require('./semver.js'),
|
||||
Range: require('./range.js'),
|
||||
Comparator: require('./comparator.js')
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('mapValues', require('../mapValues'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"withLatestFrom.js","sourceRoot":"","sources":["../../../../src/internal/operators/withLatestFrom.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAmDjD,MAAM,UAAU,cAAc;IAAO,gBAAgB;SAAhB,UAAgB,EAAhB,qBAAgB,EAAhB,IAAgB;QAAhB,2BAAgB;;IACnD,IAAM,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAwC,CAAC;IAEjF,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;QAC1B,IAAM,WAAW,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;QAInC,IAAI,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;QAGvC,IAAI,KAAK,GAAG,KAAK,CAAC;gCAMT,CAAC;YACR,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAC5B,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBACJ,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;gBACvB,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;oBAE1B,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;oBAKnB,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAK,CAAC,CAAC;iBAC1D;YACH,CAAC,EAGD,IAAI,CACL,CACF,CAAC;;QApBJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;oBAAnB,CAAC;SAqBT;QAGD,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAI,KAAK,EAAE;gBAET,IAAM,MAAM,kBAAI,KAAK,UAAK,WAAW,EAAC,CAAC;gBACvC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,wCAAI,MAAM,IAAE,CAAC,CAAC,MAAM,CAAC,CAAC;aACxD;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,146 @@
|
||||
"use strict";
|
||||
module.exports = function(Promise, tryConvertToPromise, NEXT_FILTER) {
|
||||
var util = require("./util");
|
||||
var CancellationError = Promise.CancellationError;
|
||||
var errorObj = util.errorObj;
|
||||
var catchFilter = require("./catch_filter")(NEXT_FILTER);
|
||||
|
||||
function PassThroughHandlerContext(promise, type, handler) {
|
||||
this.promise = promise;
|
||||
this.type = type;
|
||||
this.handler = handler;
|
||||
this.called = false;
|
||||
this.cancelPromise = null;
|
||||
}
|
||||
|
||||
PassThroughHandlerContext.prototype.isFinallyHandler = function() {
|
||||
return this.type === 0;
|
||||
};
|
||||
|
||||
function FinallyHandlerCancelReaction(finallyHandler) {
|
||||
this.finallyHandler = finallyHandler;
|
||||
}
|
||||
|
||||
FinallyHandlerCancelReaction.prototype._resultCancelled = function() {
|
||||
checkCancel(this.finallyHandler);
|
||||
};
|
||||
|
||||
function checkCancel(ctx, reason) {
|
||||
if (ctx.cancelPromise != null) {
|
||||
if (arguments.length > 1) {
|
||||
ctx.cancelPromise._reject(reason);
|
||||
} else {
|
||||
ctx.cancelPromise._cancel();
|
||||
}
|
||||
ctx.cancelPromise = null;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function succeed() {
|
||||
return finallyHandler.call(this, this.promise._target()._settledValue());
|
||||
}
|
||||
function fail(reason) {
|
||||
if (checkCancel(this, reason)) return;
|
||||
errorObj.e = reason;
|
||||
return errorObj;
|
||||
}
|
||||
function finallyHandler(reasonOrValue) {
|
||||
var promise = this.promise;
|
||||
var handler = this.handler;
|
||||
|
||||
if (!this.called) {
|
||||
this.called = true;
|
||||
var ret = this.isFinallyHandler()
|
||||
? handler.call(promise._boundValue())
|
||||
: handler.call(promise._boundValue(), reasonOrValue);
|
||||
if (ret === NEXT_FILTER) {
|
||||
return ret;
|
||||
} else if (ret !== undefined) {
|
||||
promise._setReturnedNonUndefined();
|
||||
var maybePromise = tryConvertToPromise(ret, promise);
|
||||
if (maybePromise instanceof Promise) {
|
||||
if (this.cancelPromise != null) {
|
||||
if (maybePromise._isCancelled()) {
|
||||
var reason =
|
||||
new CancellationError("late cancellation observer");
|
||||
promise._attachExtraTrace(reason);
|
||||
errorObj.e = reason;
|
||||
return errorObj;
|
||||
} else if (maybePromise.isPending()) {
|
||||
maybePromise._attachCancellationCallback(
|
||||
new FinallyHandlerCancelReaction(this));
|
||||
}
|
||||
}
|
||||
return maybePromise._then(
|
||||
succeed, fail, undefined, this, undefined);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (promise.isRejected()) {
|
||||
checkCancel(this);
|
||||
errorObj.e = reasonOrValue;
|
||||
return errorObj;
|
||||
} else {
|
||||
checkCancel(this);
|
||||
return reasonOrValue;
|
||||
}
|
||||
}
|
||||
|
||||
Promise.prototype._passThrough = function(handler, type, success, fail) {
|
||||
if (typeof handler !== "function") return this.then();
|
||||
return this._then(success,
|
||||
fail,
|
||||
undefined,
|
||||
new PassThroughHandlerContext(this, type, handler),
|
||||
undefined);
|
||||
};
|
||||
|
||||
Promise.prototype.lastly =
|
||||
Promise.prototype["finally"] = function (handler) {
|
||||
return this._passThrough(handler,
|
||||
0,
|
||||
finallyHandler,
|
||||
finallyHandler);
|
||||
};
|
||||
|
||||
|
||||
Promise.prototype.tap = function (handler) {
|
||||
return this._passThrough(handler, 1, finallyHandler);
|
||||
};
|
||||
|
||||
Promise.prototype.tapCatch = function (handlerOrPredicate) {
|
||||
var len = arguments.length;
|
||||
if(len === 1) {
|
||||
return this._passThrough(handlerOrPredicate,
|
||||
1,
|
||||
undefined,
|
||||
finallyHandler);
|
||||
} else {
|
||||
var catchInstances = new Array(len - 1),
|
||||
j = 0, i;
|
||||
for (i = 0; i < len - 1; ++i) {
|
||||
var item = arguments[i];
|
||||
if (util.isObject(item)) {
|
||||
catchInstances[j++] = item;
|
||||
} else {
|
||||
return Promise.reject(new TypeError(
|
||||
"tapCatch statement predicate: "
|
||||
+ "expecting an object but got " + util.classString(item)
|
||||
));
|
||||
}
|
||||
}
|
||||
catchInstances.length = j;
|
||||
var handler = arguments[i];
|
||||
return this._passThrough(catchFilter(catchInstances, handler, this),
|
||||
1,
|
||||
undefined,
|
||||
finallyHandler);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return PassThroughHandlerContext;
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
var toString = require('./toString');
|
||||
|
||||
/**
|
||||
* Converts `string`, as a whole, to upper case just like
|
||||
* [String#toUpperCase](https://mdn.io/toUpperCase).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category String
|
||||
* @param {string} [string=''] The string to convert.
|
||||
* @returns {string} Returns the upper cased string.
|
||||
* @example
|
||||
*
|
||||
* _.toUpper('--foo-bar--');
|
||||
* // => '--FOO-BAR--'
|
||||
*
|
||||
* _.toUpper('fooBar');
|
||||
* // => 'FOOBAR'
|
||||
*
|
||||
* _.toUpper('__foo_bar__');
|
||||
* // => '__FOO_BAR__'
|
||||
*/
|
||||
function toUpper(value) {
|
||||
return toString(value).toUpperCase();
|
||||
}
|
||||
|
||||
module.exports = toUpper;
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "localforage",
|
||||
"main": ["dist/localforage.js"],
|
||||
"ignore": [
|
||||
".travis.yml",
|
||||
"CONTRIBUTING.md",
|
||||
"config.rb",
|
||||
"Gemfile",
|
||||
"Gemfile.lock",
|
||||
"Rakefile",
|
||||
"LICENSE",
|
||||
"docs*",
|
||||
"examples*",
|
||||
"test*",
|
||||
"site*"
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"es6-promise": "~1.0.0",
|
||||
"requirejs": "~2.1.10",
|
||||
"mocha": "~3.4.2",
|
||||
"expect": "~0.3.1",
|
||||
"assert": "~0.1.0",
|
||||
"modernizr": "~2.8.1"
|
||||
},
|
||||
"version": "1.10.0"
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/*!
|
||||
* depd
|
||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
* @public
|
||||
*/
|
||||
|
||||
module.exports = depd
|
||||
|
||||
/**
|
||||
* Create deprecate for namespace in caller.
|
||||
*/
|
||||
|
||||
function depd (namespace) {
|
||||
if (!namespace) {
|
||||
throw new TypeError('argument namespace is required')
|
||||
}
|
||||
|
||||
function deprecate (message) {
|
||||
// no-op in browser
|
||||
}
|
||||
|
||||
deprecate._file = undefined
|
||||
deprecate._ignored = true
|
||||
deprecate._namespace = namespace
|
||||
deprecate._traced = false
|
||||
deprecate._warned = Object.create(null)
|
||||
|
||||
deprecate.function = wrapfunction
|
||||
deprecate.property = wrapproperty
|
||||
|
||||
return deprecate
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a wrapped function in a deprecation message.
|
||||
*
|
||||
* This is a no-op version of the wrapper, which does nothing but call
|
||||
* validation.
|
||||
*/
|
||||
|
||||
function wrapfunction (fn, message) {
|
||||
if (typeof fn !== 'function') {
|
||||
throw new TypeError('argument fn must be a function')
|
||||
}
|
||||
|
||||
return fn
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap property in a deprecation message.
|
||||
*
|
||||
* This is a no-op version of the wrapper, which does nothing but call
|
||||
* validation.
|
||||
*/
|
||||
|
||||
function wrapproperty (obj, prop, message) {
|
||||
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
throw new TypeError('argument obj must be object')
|
||||
}
|
||||
|
||||
var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
|
||||
|
||||
if (!descriptor) {
|
||||
throw new TypeError('must call property on owner object')
|
||||
}
|
||||
|
||||
if (!descriptor.configurable) {
|
||||
throw new TypeError('property must be configurable')
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
export function getXHRResponse(xhr) {
|
||||
switch (xhr.responseType) {
|
||||
case 'json': {
|
||||
if ('response' in xhr) {
|
||||
return xhr.response;
|
||||
}
|
||||
else {
|
||||
var ieXHR = xhr;
|
||||
return JSON.parse(ieXHR.responseText);
|
||||
}
|
||||
}
|
||||
case 'document':
|
||||
return xhr.responseXML;
|
||||
case 'text':
|
||||
default: {
|
||||
if ('response' in xhr) {
|
||||
return xhr.response;
|
||||
}
|
||||
else {
|
||||
var ieXHR = xhr;
|
||||
return ieXHR.responseText;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=getXHRResponse.js.map
|
||||
@@ -0,0 +1,140 @@
|
||||
/**
|
||||
* @license
|
||||
* Lodash <https://lodash.com/>
|
||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
||||
(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function e(n,t){for(var r=null==n?0:n.length;r--&&t(n[r],r,n)!==!1;);return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;
|
||||
return!0}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!!(null==n?0:n.length)&&y(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);
|
||||
return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n){return n.split("")}function _(n){return n.match($t)||[]}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,!1}),e}function g(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function y(n,t,r){return t===t?Z(n,t,r):g(n,b,r)}function d(n,t,r,e){
|
||||
for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function b(n){return n!==n}function w(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:Cn}function m(n){return function(t){return null==t?X:t[n]}}function x(n){return function(t){return null==n?X:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==X&&(r=r===X?i:r+i);
|
||||
}return r}function O(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function I(n,t){return c(t,function(t){return[t,n[t]]})}function R(n){return n?n.slice(0,H(n)+1).replace(Lt,""):n}function z(n){return function(t){return n(t)}}function E(n,t){return c(t,function(t){return n[t]})}function S(n,t){return n.has(t)}function W(n,t){for(var r=-1,e=n.length;++r<e&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function C(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;
|
||||
return e}function U(n){return"\\"+Yr[n]}function B(n,t){return null==n?X:n[t]}function T(n){return Nr.test(n)}function $(n){return Pr.test(n)}function D(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function F(n,t){return function(r){return n(t(r))}}function N(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==cn||(n[r]=cn,i[u++]=r)}return i}function P(n){var t=-1,r=Array(n.size);
|
||||
return n.forEach(function(n){r[++t]=n}),r}function q(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function Z(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function K(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}function V(n){return T(n)?J(n):_e(n)}function G(n){return T(n)?Y(n):p(n)}function H(n){for(var t=n.length;t--&&Ct.test(n.charAt(t)););return t}function J(n){for(var t=Mr.lastIndex=0;Mr.test(n);)++t;return t}function Y(n){return n.match(Mr)||[];
|
||||
}function Q(n){return n.match(Fr)||[]}var X,nn="4.17.21",tn=200,rn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",en="Expected a function",un="Invalid `variable` option passed into `_.template`",on="__lodash_hash_undefined__",fn=500,cn="__lodash_placeholder__",an=1,ln=2,sn=4,hn=1,pn=2,_n=1,vn=2,gn=4,yn=8,dn=16,bn=32,wn=64,mn=128,xn=256,jn=512,An=30,kn="...",On=800,In=16,Rn=1,zn=2,En=3,Sn=1/0,Wn=9007199254740991,Ln=1.7976931348623157e308,Cn=NaN,Un=4294967295,Bn=Un-1,Tn=Un>>>1,$n=[["ary",mn],["bind",_n],["bindKey",vn],["curry",yn],["curryRight",dn],["flip",jn],["partial",bn],["partialRight",wn],["rearg",xn]],Dn="[object Arguments]",Mn="[object Array]",Fn="[object AsyncFunction]",Nn="[object Boolean]",Pn="[object Date]",qn="[object DOMException]",Zn="[object Error]",Kn="[object Function]",Vn="[object GeneratorFunction]",Gn="[object Map]",Hn="[object Number]",Jn="[object Null]",Yn="[object Object]",Qn="[object Promise]",Xn="[object Proxy]",nt="[object RegExp]",tt="[object Set]",rt="[object String]",et="[object Symbol]",ut="[object Undefined]",it="[object WeakMap]",ot="[object WeakSet]",ft="[object ArrayBuffer]",ct="[object DataView]",at="[object Float32Array]",lt="[object Float64Array]",st="[object Int8Array]",ht="[object Int16Array]",pt="[object Int32Array]",_t="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",dt=/\b__p \+= '';/g,bt=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,jt=RegExp(mt.source),At=RegExp(xt.source),kt=/<%-([\s\S]+?)%>/g,Ot=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,Rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zt=/^\w*$/,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(St.source),Lt=/^\s+/,Ct=/\s/,Ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Tt=/,? & /,$t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dt=/[()=,{}\[\]\/\s]/,Mt=/\\(\\)?/g,Ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Zt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Vt=/^(?:0|[1-9]\d*)$/,Gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ht=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",Qt="\\u0300-\\u036f",Xt="\\ufe20-\\ufe2f",nr="\\u20d0-\\u20ff",tr=Qt+Xt+nr,rr="\\u2700-\\u27bf",er="a-z\\xdf-\\xf6\\xf8-\\xff",ur="\\xac\\xb1\\xd7\\xf7",ir="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",or="\\u2000-\\u206f",fr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",cr="A-Z\\xc0-\\xd6\\xd8-\\xde",ar="\\ufe0e\\ufe0f",lr=ur+ir+or+fr,sr="['\u2019]",hr="["+Yt+"]",pr="["+lr+"]",_r="["+tr+"]",vr="\\d+",gr="["+rr+"]",yr="["+er+"]",dr="[^"+Yt+lr+vr+rr+er+cr+"]",br="\\ud83c[\\udffb-\\udfff]",wr="(?:"+_r+"|"+br+")",mr="[^"+Yt+"]",xr="(?:\\ud83c[\\udde6-\\uddff]){2}",jr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ar="["+cr+"]",kr="\\u200d",Or="(?:"+yr+"|"+dr+")",Ir="(?:"+Ar+"|"+dr+")",Rr="(?:"+sr+"(?:d|ll|m|re|s|t|ve))?",zr="(?:"+sr+"(?:D|LL|M|RE|S|T|VE))?",Er=wr+"?",Sr="["+ar+"]?",Wr="(?:"+kr+"(?:"+[mr,xr,jr].join("|")+")"+Sr+Er+")*",Lr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ur=Sr+Er+Wr,Br="(?:"+[gr,xr,jr].join("|")+")"+Ur,Tr="(?:"+[mr+_r+"?",_r,xr,jr,hr].join("|")+")",$r=RegExp(sr,"g"),Dr=RegExp(_r,"g"),Mr=RegExp(br+"(?="+br+")|"+Tr+Ur,"g"),Fr=RegExp([Ar+"?"+yr+"+"+Rr+"(?="+[pr,Ar,"$"].join("|")+")",Ir+"+"+zr+"(?="+[pr,Ar+Or,"$"].join("|")+")",Ar+"?"+Or+"+"+Rr,Ar+"+"+zr,Cr,Lr,vr,Br].join("|"),"g"),Nr=RegExp("["+kr+Yt+tr+ar+"]"),Pr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zr=-1,Kr={};
|
||||
Kr[at]=Kr[lt]=Kr[st]=Kr[ht]=Kr[pt]=Kr[_t]=Kr[vt]=Kr[gt]=Kr[yt]=!0,Kr[Dn]=Kr[Mn]=Kr[ft]=Kr[Nn]=Kr[ct]=Kr[Pn]=Kr[Zn]=Kr[Kn]=Kr[Gn]=Kr[Hn]=Kr[Yn]=Kr[nt]=Kr[tt]=Kr[rt]=Kr[it]=!1;var Vr={};Vr[Dn]=Vr[Mn]=Vr[ft]=Vr[ct]=Vr[Nn]=Vr[Pn]=Vr[at]=Vr[lt]=Vr[st]=Vr[ht]=Vr[pt]=Vr[Gn]=Vr[Hn]=Vr[Yn]=Vr[nt]=Vr[tt]=Vr[rt]=Vr[et]=Vr[_t]=Vr[vt]=Vr[gt]=Vr[yt]=!0,Vr[Zn]=Vr[Kn]=Vr[it]=!1;var Gr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a",
|
||||
"\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae",
|
||||
"\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g",
|
||||
"\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O",
|
||||
"\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w",
|
||||
"\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Hr={"&":"&","<":"<",">":">",'"':""","'":"'"},Jr={"&":"&","<":"<",">":">",""":'"',"'":"'"},Yr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qr=parseFloat,Xr=parseInt,ne="object"==typeof global&&global&&global.Object===Object&&global,te="object"==typeof self&&self&&self.Object===Object&&self,re=ne||te||Function("return this")(),ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,ue=ee&&"object"==typeof module&&module&&!module.nodeType&&module,ie=ue&&ue.exports===ee,oe=ie&&ne.process,fe=function(){
|
||||
try{var n=ue&&ue.require&&ue.require("util").types;return n?n:oe&&oe.binding&&oe.binding("util")}catch(n){}}(),ce=fe&&fe.isArrayBuffer,ae=fe&&fe.isDate,le=fe&&fe.isMap,se=fe&&fe.isRegExp,he=fe&&fe.isSet,pe=fe&&fe.isTypedArray,_e=m("length"),ve=x(Gr),ge=x(Hr),ye=x(Jr),de=function p(x){function Z(n){if(cc(n)&&!bh(n)&&!(n instanceof Ct)){if(n instanceof Y)return n;if(bl.call(n,"__wrapped__"))return eo(n)}return new Y(n)}function J(){}function Y(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,
|
||||
this.__index__=0,this.__values__=X}function Ct(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Un,this.__views__=[]}function $t(){var n=new Ct(this.__wrapped__);return n.__actions__=Tu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Tu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Tu(this.__views__),n}function Yt(){if(this.__filtered__){var n=new Ct(this);n.__dir__=-1,
|
||||
n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Qt(){var n=this.__wrapped__.value(),t=this.__dir__,r=bh(n),e=t<0,u=r?n.length:0,i=Oi(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Hl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return wu(n,this.__actions__);var _=[];n:for(;c--&&h<p;){a+=t;for(var v=-1,g=n[a];++v<s;){var y=l[v],d=y.iteratee,b=y.type,w=d(g);if(b==zn)g=w;else if(!w){if(b==Rn)continue n;break n}}_[h++]=g}return _}function Xt(n){
|
||||
var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function nr(){this.__data__=is?is(null):{},this.size=0}function tr(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function rr(n){var t=this.__data__;if(is){var r=t[n];return r===on?X:r}return bl.call(t,n)?t[n]:X}function er(n){var t=this.__data__;return is?t[n]!==X:bl.call(t,n)}function ur(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=is&&t===X?on:t,this}function ir(n){
|
||||
var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function or(){this.__data__=[],this.size=0}function fr(n){var t=this.__data__,r=Wr(t,n);return!(r<0)&&(r==t.length-1?t.pop():Ll.call(t,r,1),--this.size,!0)}function cr(n){var t=this.__data__,r=Wr(t,n);return r<0?X:t[r][1]}function ar(n){return Wr(this.__data__,n)>-1}function lr(n,t){var r=this.__data__,e=Wr(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function sr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){
|
||||
var e=n[t];this.set(e[0],e[1])}}function hr(){this.size=0,this.__data__={hash:new Xt,map:new(ts||ir),string:new Xt}}function pr(n){var t=xi(this,n).delete(n);return this.size-=t?1:0,t}function _r(n){return xi(this,n).get(n)}function vr(n){return xi(this,n).has(n)}function gr(n,t){var r=xi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this}function yr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new sr;++t<r;)this.add(n[t])}function dr(n){return this.__data__.set(n,on),this}function br(n){
|
||||
return this.__data__.has(n)}function wr(n){this.size=(this.__data__=new ir(n)).size}function mr(){this.__data__=new ir,this.size=0}function xr(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}function jr(n){return this.__data__.get(n)}function Ar(n){return this.__data__.has(n)}function kr(n,t){var r=this.__data__;if(r instanceof ir){var e=r.__data__;if(!ts||e.length<tn-1)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new sr(e)}return r.set(n,t),this.size=r.size,this}function Or(n,t){
|
||||
var r=bh(n),e=!r&&dh(n),u=!r&&!e&&mh(n),i=!r&&!e&&!u&&Oh(n),o=r||e||u||i,f=o?O(n.length,hl):[],c=f.length;for(var a in n)!t&&!bl.call(n,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||Ci(a,c))||f.push(a);return f}function Ir(n){var t=n.length;return t?n[tu(0,t-1)]:X}function Rr(n,t){return Xi(Tu(n),Mr(t,0,n.length))}function zr(n){return Xi(Tu(n))}function Er(n,t,r){(r===X||Gf(n[t],r))&&(r!==X||t in n)||Br(n,t,r)}function Sr(n,t,r){var e=n[t];
|
||||
bl.call(n,t)&&Gf(e,r)&&(r!==X||t in n)||Br(n,t,r)}function Wr(n,t){for(var r=n.length;r--;)if(Gf(n[r][0],t))return r;return-1}function Lr(n,t,r,e){return ys(n,function(n,u,i){t(e,n,r(n),i)}),e}function Cr(n,t){return n&&$u(t,Pc(t),n)}function Ur(n,t){return n&&$u(t,qc(t),n)}function Br(n,t,r){"__proto__"==t&&Tl?Tl(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function Tr(n,t){for(var r=-1,e=t.length,u=il(e),i=null==n;++r<e;)u[r]=i?X:Mc(n,t[r]);return u}function Mr(n,t,r){return n===n&&(r!==X&&(n=n<=r?n:r),
|
||||
t!==X&&(n=n>=t?n:t)),n}function Fr(n,t,e,u,i,o){var f,c=t&an,a=t&ln,l=t&sn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==X)return f;if(!fc(n))return n;var s=bh(n);if(s){if(f=zi(n),!c)return Tu(n,f)}else{var h=zs(n),p=h==Kn||h==Vn;if(mh(n))return Iu(n,c);if(h==Yn||h==Dn||p&&!i){if(f=a||p?{}:Ei(n),!c)return a?Mu(n,Ur(f,n)):Du(n,Cr(f,n))}else{if(!Vr[h])return i?n:{};f=Si(n,h,c)}}o||(o=new wr);var _=o.get(n);if(_)return _;o.set(n,f),kh(n)?n.forEach(function(r){f.add(Fr(r,t,e,r,n,o))}):jh(n)&&n.forEach(function(r,u){
|
||||
f.set(u,Fr(r,t,e,u,n,o))});var v=l?a?di:yi:a?qc:Pc,g=s?X:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),Sr(f,u,Fr(r,t,e,u,n,o))}),f}function Nr(n){var t=Pc(n);return function(r){return Pr(r,n,t)}}function Pr(n,t,r){var e=r.length;if(null==n)return!e;for(n=ll(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===X&&!(u in n)||!i(o))return!1}return!0}function Gr(n,t,r){if("function"!=typeof n)throw new pl(en);return Ws(function(){n.apply(X,r)},t)}function Hr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length;
|
||||
if(!l)return s;r&&(t=c(t,z(r))),e?(i=f,a=!1):t.length>=tn&&(i=S,a=!1,t=new yr(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p);if(p=e||0!==p?p:0,a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function Jr(n,t){var r=!0;return ys(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Yr(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===X?o===o&&!bc(o):r(o,f)))var f=o,c=i}return c}function ne(n,t,r,e){var u=n.length;for(r=kc(r),r<0&&(r=-r>u?0:u+r),
|
||||
e=e===X||e>u?u:kc(e),e<0&&(e+=u),e=r>e?0:Oc(e);r<e;)n[r++]=t;return n}function te(n,t){var r=[];return ys(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ee(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Li),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?ee(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ue(n,t){return n&&bs(n,t,Pc)}function oe(n,t){return n&&ws(n,t,Pc)}function fe(n,t){return i(t,function(t){return uc(n[t])})}function _e(n,t){t=ku(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[no(t[r++])];
|
||||
return r&&r==e?n:X}function de(n,t,r){var e=t(n);return bh(n)?e:a(e,r(n))}function we(n){return null==n?n===X?ut:Jn:Bl&&Bl in ll(n)?ki(n):Ki(n)}function me(n,t){return n>t}function xe(n,t){return null!=n&&bl.call(n,t)}function je(n,t){return null!=n&&t in ll(n)}function Ae(n,t,r){return n>=Hl(t,r)&&n<Gl(t,r)}function ke(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=il(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,z(t))),s=Hl(p.length,s),l[a]=!r&&(t||u>=120&&p.length>=120)?new yr(a&&p):X}p=n[0];
|
||||
var _=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],y=t?t(g):g;if(g=r||0!==g?g:0,!(v?S(v,y):e(h,y,r))){for(a=i;--a;){var d=l[a];if(!(d?S(d,y):e(n[a],y,r)))continue n}v&&v.push(y),h.push(g)}}return h}function Oe(n,t,r,e){return ue(n,function(n,u,i){t(e,r(n),u,i)}),e}function Ie(t,r,e){r=ku(r,t),t=Gi(t,r);var u=null==t?t:t[no(jo(r))];return null==u?X:n(u,t,e)}function Re(n){return cc(n)&&we(n)==Dn}function ze(n){return cc(n)&&we(n)==ft}function Ee(n){return cc(n)&&we(n)==Pn}function Se(n,t,r,e,u){
|
||||
return n===t||(null==n||null==t||!cc(n)&&!cc(t)?n!==n&&t!==t:We(n,t,r,e,Se,u))}function We(n,t,r,e,u,i){var o=bh(n),f=bh(t),c=o?Mn:zs(n),a=f?Mn:zs(t);c=c==Dn?Yn:c,a=a==Dn?Yn:a;var l=c==Yn,s=a==Yn,h=c==a;if(h&&mh(n)){if(!mh(t))return!1;o=!0,l=!1}if(h&&!l)return i||(i=new wr),o||Oh(n)?pi(n,t,r,e,u,i):_i(n,t,c,r,e,u,i);if(!(r&hn)){var p=l&&bl.call(n,"__wrapped__"),_=s&&bl.call(t,"__wrapped__");if(p||_){var v=p?n.value():n,g=_?t.value():t;return i||(i=new wr),u(v,g,r,e,i)}}return!!h&&(i||(i=new wr),vi(n,t,r,e,u,i));
|
||||
}function Le(n){return cc(n)&&zs(n)==Gn}function Ce(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ll(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++u<i;){f=r[u];var c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===X&&!(c in n))return!1}else{var s=new wr;if(e)var h=e(a,l,c,n,t,s);if(!(h===X?Se(l,a,hn|pn,e,s):h))return!1}}return!0}function Ue(n){return!(!fc(n)||Di(n))&&(uc(n)?kl:Zt).test(to(n))}function Be(n){return cc(n)&&we(n)==nt}function Te(n){return cc(n)&&zs(n)==tt;
|
||||
}function $e(n){return cc(n)&&oc(n.length)&&!!Kr[we(n)]}function De(n){return"function"==typeof n?n:null==n?La:"object"==typeof n?bh(n)?Ze(n[0],n[1]):qe(n):Fa(n)}function Me(n){if(!Mi(n))return Vl(n);var t=[];for(var r in ll(n))bl.call(n,r)&&"constructor"!=r&&t.push(r);return t}function Fe(n){if(!fc(n))return Zi(n);var t=Mi(n),r=[];for(var e in n)("constructor"!=e||!t&&bl.call(n,e))&&r.push(e);return r}function Ne(n,t){return n<t}function Pe(n,t){var r=-1,e=Hf(n)?il(n.length):[];return ys(n,function(n,u,i){
|
||||
e[++r]=t(n,u,i)}),e}function qe(n){var t=ji(n);return 1==t.length&&t[0][2]?Ni(t[0][0],t[0][1]):function(r){return r===n||Ce(r,n,t)}}function Ze(n,t){return Bi(n)&&Fi(t)?Ni(no(n),t):function(r){var e=Mc(r,n);return e===X&&e===t?Nc(r,n):Se(t,e,hn|pn)}}function Ke(n,t,r,e,u){n!==t&&bs(t,function(i,o){if(u||(u=new wr),fc(i))Ve(n,t,o,r,Ke,e,u);else{var f=e?e(Ji(n,o),i,o+"",n,t,u):X;f===X&&(f=i),Er(n,o,f)}},qc)}function Ve(n,t,r,e,u,i,o){var f=Ji(n,r),c=Ji(t,r),a=o.get(c);if(a)return Er(n,r,a),X;var l=i?i(f,c,r+"",n,t,o):X,s=l===X;
|
||||
if(s){var h=bh(c),p=!h&&mh(c),_=!h&&!p&&Oh(c);l=c,h||p||_?bh(f)?l=f:Jf(f)?l=Tu(f):p?(s=!1,l=Iu(c,!0)):_?(s=!1,l=Wu(c,!0)):l=[]:gc(c)||dh(c)?(l=f,dh(f)?l=Rc(f):fc(f)&&!uc(f)||(l=Ei(c))):s=!1}s&&(o.set(c,l),u(l,c,e,i,o),o.delete(c)),Er(n,r,l)}function Ge(n,t){var r=n.length;if(r)return t+=t<0?r:0,Ci(t,r)?n[t]:X}function He(n,t,r){t=t.length?c(t,function(n){return bh(n)?function(t){return _e(t,1===n.length?n[0]:n)}:n}):[La];var e=-1;return t=c(t,z(mi())),A(Pe(n,function(n,r,u){return{criteria:c(t,function(t){
|
||||
return t(n)}),index:++e,value:n}}),function(n,t){return Cu(n,t,r)})}function Je(n,t){return Ye(n,t,function(t,r){return Nc(n,r)})}function Ye(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=_e(n,o);r(f,o)&&fu(i,ku(o,n),f)}return i}function Qe(n){return function(t){return _e(t,n)}}function Xe(n,t,r,e){var u=e?d:y,i=-1,o=t.length,f=n;for(n===t&&(t=Tu(t)),r&&(f=c(n,z(r)));++i<o;)for(var a=0,l=t[i],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==n&&Ll.call(f,a,1),Ll.call(n,a,1);return n}function nu(n,t){for(var r=n?t.length:0,e=r-1;r--;){
|
||||
var u=t[r];if(r==e||u!==i){var i=u;Ci(u)?Ll.call(n,u,1):yu(n,u)}}return n}function tu(n,t){return n+Nl(Ql()*(t-n+1))}function ru(n,t,r,e){for(var u=-1,i=Gl(Fl((t-n)/(r||1)),0),o=il(i);i--;)o[e?i:++u]=n,n+=r;return o}function eu(n,t){var r="";if(!n||t<1||t>Wn)return r;do t%2&&(r+=n),t=Nl(t/2),t&&(n+=n);while(t);return r}function uu(n,t){return Ls(Vi(n,t,La),n+"")}function iu(n){return Ir(ra(n))}function ou(n,t){var r=ra(n);return Xi(r,Mr(t,0,r.length))}function fu(n,t,r,e){if(!fc(n))return n;t=ku(t,n);
|
||||
for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=no(t[u]),a=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(u!=o){var l=f[c];a=e?e(l,c,f):X,a===X&&(a=fc(l)?l:Ci(t[u+1])?[]:{})}Sr(f,c,a),f=f[c]}return n}function cu(n){return Xi(ra(n))}function au(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=il(u);++e<u;)i[e]=n[e+t];return i}function lu(n,t){var r;return ys(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function su(n,t,r){
|
||||
var e=0,u=null==n?e:n.length;if("number"==typeof t&&t===t&&u<=Tn){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!bc(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return hu(n,t,La,r)}function hu(n,t,r,e){var u=0,i=null==n?0:n.length;if(0===i)return 0;t=r(t);for(var o=t!==t,f=null===t,c=bc(t),a=t===X;u<i;){var l=Nl((u+i)/2),s=r(n[l]),h=s!==X,p=null===s,_=s===s,v=bc(s);if(o)var g=e||_;else g=a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):!p&&!v&&(e?s<=t:s<t);g?u=l+1:i=l}return Hl(i,Bn)}function pu(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){
|
||||
var o=n[r],f=t?t(o):o;if(!r||!Gf(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function _u(n){return"number"==typeof n?n:bc(n)?Cn:+n}function vu(n){if("string"==typeof n)return n;if(bh(n))return c(n,vu)+"";if(bc(n))return vs?vs.call(n):"";var t=n+"";return"0"==t&&1/n==-Sn?"-0":t}function gu(n,t,r){var e=-1,u=o,i=n.length,c=!0,a=[],l=a;if(r)c=!1,u=f;else if(i>=tn){var s=t?null:ks(n);if(s)return P(s);c=!1,u=S,l=new yr}else l=t?[]:a;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(h=r||0!==h?h:0,c&&p===p){for(var _=l.length;_--;)if(l[_]===p)continue n;
|
||||
t&&l.push(p),a.push(h)}else u(l,p,r)||(l!==a&&l.push(p),a.push(h))}return a}function yu(n,t){return t=ku(t,n),n=Gi(n,t),null==n||delete n[no(jo(t))]}function du(n,t,r,e){return fu(n,t,r(_e(n,t)),e)}function bu(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?au(n,e?0:i,e?i+1:u):au(n,e?i+1:0,e?u:i)}function wu(n,t){var r=n;return r instanceof Ct&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function mu(n,t,r){var e=n.length;if(e<2)return e?gu(n[0]):[];
|
||||
for(var u=-1,i=il(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=Hr(i[u]||o,n[f],t,r));return gu(ee(i,1),t,r)}function xu(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;){r(o,n[e],e<i?t[e]:X)}return o}function ju(n){return Jf(n)?n:[]}function Au(n){return"function"==typeof n?n:La}function ku(n,t){return bh(n)?n:Bi(n,t)?[n]:Cs(Ec(n))}function Ou(n,t,r){var e=n.length;return r=r===X?e:r,!t&&r>=e?n:au(n,t,r)}function Iu(n,t){if(t)return n.slice();var r=n.length,e=zl?zl(r):new n.constructor(r);
|
||||
return n.copy(e),e}function Ru(n){var t=new n.constructor(n.byteLength);return new Rl(t).set(new Rl(n)),t}function zu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Eu(n){var t=new n.constructor(n.source,Nt.exec(n));return t.lastIndex=n.lastIndex,t}function Su(n){return _s?ll(_s.call(n)):{}}function Wu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.length)}function Lu(n,t){if(n!==t){var r=n!==X,e=null===n,u=n===n,i=bc(n),o=t!==X,f=null===t,c=t===t,a=bc(t);
|
||||
if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cu(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){var c=Lu(u[e],i[e]);if(c){if(e>=f)return c;return c*("desc"==r[e]?-1:1)}}return n.index-t.index}function Uu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Gl(i-o,0),l=il(c+a),s=!e;++f<c;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l;
|
||||
}function Bu(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Gl(i-f,0),s=il(l+a),h=!e;++u<l;)s[u]=n[u];for(var p=u;++c<a;)s[p+c]=t[c];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function Tu(n,t){var r=-1,e=n.length;for(t||(t=il(e));++r<e;)t[r]=n[r];return t}function $u(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):X;c===X&&(c=n[f]),u?Br(r,f,c):Sr(r,f,c)}return r}function Du(n,t){return $u(n,Is(n),t)}function Mu(n,t){return $u(n,Rs(n),t);
|
||||
}function Fu(n,r){return function(e,u){var i=bh(e)?t:Lr,o=r?r():{};return i(e,n,mi(u,2),o)}}function Nu(n){return uu(function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:X,o=u>2?r[2]:X;for(i=n.length>3&&"function"==typeof i?(u--,i):X,o&&Ui(r[0],r[1],o)&&(i=u<3?X:i,u=1),t=ll(t);++e<u;){var f=r[e];f&&n(t,f,e,i)}return t})}function Pu(n,t){return function(r,e){if(null==r)return r;if(!Hf(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ll(r);(t?i--:++i<u)&&e(o[i],i,o)!==!1;);return r}}function qu(n){return function(t,r,e){
|
||||
for(var u=-1,i=ll(t),o=e(t),f=o.length;f--;){var c=o[n?f:++u];if(r(i[c],c,i)===!1)break}return t}}function Zu(n,t,r){function e(){return(this&&this!==re&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=t&_n,i=Gu(n);return e}function Ku(n){return function(t){t=Ec(t);var r=T(t)?G(t):X,e=r?r[0]:t.charAt(0),u=r?Ou(r,1).join(""):t.slice(1);return e[n]()+u}}function Vu(n){return function(t){return l(Ra(ca(t).replace($r,"")),n,"")}}function Gu(n){return function(){var t=arguments;switch(t.length){
|
||||
case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=gs(n.prototype),e=n.apply(r,t);return fc(e)?e:r}}function Hu(t,r,e){function u(){for(var o=arguments.length,f=il(o),c=o,a=wi(u);c--;)f[c]=arguments[c];var l=o<3&&f[0]!==a&&f[o-1]!==a?[]:N(f,a);
|
||||
return o-=l.length,o<e?oi(t,r,Qu,u.placeholder,X,f,l,X,X,e-o):n(this&&this!==re&&this instanceof u?i:t,this,f)}var i=Gu(t);return u}function Ju(n){return function(t,r,e){var u=ll(t);if(!Hf(t)){var i=mi(r,3);t=Pc(t),r=function(n){return i(u[n],n,u)}}var o=n(t,r,e);return o>-1?u[i?t[o]:o]:X}}function Yu(n){return gi(function(t){var r=t.length,e=r,u=Y.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new pl(en);if(u&&!o&&"wrapper"==bi(i))var o=new Y([],!0)}for(e=o?e:r;++e<r;){
|
||||
i=t[e];var f=bi(i),c="wrapper"==f?Os(i):X;o=c&&$i(c[0])&&c[1]==(mn|yn|bn|xn)&&!c[4].length&&1==c[9]?o[bi(c[0])].apply(o,c[3]):1==i.length&&$i(i)?o[f]():o.thru(i)}return function(){var n=arguments,e=n[0];if(o&&1==n.length&&bh(e))return o.plant(e).value();for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}})}function Qu(n,t,r,e,u,i,o,f,c,a){function l(){for(var y=arguments.length,d=il(y),b=y;b--;)d[b]=arguments[b];if(_)var w=wi(l),m=C(d,w);if(e&&(d=Uu(d,e,u,_)),i&&(d=Bu(d,i,o,_)),
|
||||
y-=m,_&&y<a){return oi(n,t,Qu,l.placeholder,r,d,N(d,w),f,c,a-y)}var x=h?r:this,j=p?x[n]:n;return y=d.length,f?d=Hi(d,f):v&&y>1&&d.reverse(),s&&c<y&&(d.length=c),this&&this!==re&&this instanceof l&&(j=g||Gu(j)),j.apply(x,d)}var s=t&mn,h=t&_n,p=t&vn,_=t&(yn|dn),v=t&jn,g=p?X:Gu(n);return l}function Xu(n,t){return function(r,e){return Oe(r,n,t(e),{})}}function ni(n,t){return function(r,e){var u;if(r===X&&e===X)return t;if(r!==X&&(u=r),e!==X){if(u===X)return e;"string"==typeof r||"string"==typeof e?(r=vu(r),
|
||||
e=vu(e)):(r=_u(r),e=_u(e)),u=n(r,e)}return u}}function ti(t){return gi(function(r){return r=c(r,z(mi())),uu(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ri(n,t){t=t===X?" ":vu(t);var r=t.length;if(r<2)return r?eu(t,n):t;var e=eu(t,Fl(n/V(t)));return T(t)?Ou(G(e),0,n).join(""):e.slice(0,n)}function ei(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=il(l+c),h=this&&this!==re&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];
|
||||
return n(h,o?e:this,s)}var o=r&_n,f=Gu(t);return i}function ui(n){return function(t,r,e){return e&&"number"!=typeof e&&Ui(t,r,e)&&(r=e=X),t=Ac(t),r===X?(r=t,t=0):r=Ac(r),e=e===X?t<r?1:-1:Ac(e),ru(t,r,e,n)}}function ii(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Ic(t),r=Ic(r)),n(t,r)}}function oi(n,t,r,e,u,i,o,f,c,a){var l=t&yn,s=l?o:X,h=l?X:o,p=l?i:X,_=l?X:i;t|=l?bn:wn,t&=~(l?wn:bn),t&gn||(t&=~(_n|vn));var v=[n,t,u,p,s,_,h,f,c,a],g=r.apply(X,v);return $i(n)&&Ss(g,v),g.placeholder=e,
|
||||
Yi(g,n,t)}function fi(n){var t=al[n];return function(n,r){if(n=Ic(n),r=null==r?0:Hl(kc(r),292),r&&Zl(n)){var e=(Ec(n)+"e").split("e");return e=(Ec(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"),+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ci(n){return function(t){var r=zs(t);return r==Gn?M(t):r==tt?q(t):I(t,n(t))}}function ai(n,t,r,e,u,i,o,f){var c=t&vn;if(!c&&"function"!=typeof n)throw new pl(en);var a=e?e.length:0;if(a||(t&=~(bn|wn),e=u=X),o=o===X?o:Gl(kc(o),0),f=f===X?f:kc(f),a-=u?u.length:0,t&wn){var l=e,s=u;
|
||||
e=u=X}var h=c?X:Os(n),p=[n,t,r,e,u,l,s,i,o,f];if(h&&qi(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],f=p[9]=p[9]===X?c?0:n.length:Gl(p[9]-a,0),!f&&t&(yn|dn)&&(t&=~(yn|dn)),t&&t!=_n)_=t==yn||t==dn?Hu(n,t,f):t!=bn&&t!=(_n|bn)||u.length?Qu.apply(X,p):ei(n,t,r,e);else var _=Zu(n,t,r);return Yi((h?ms:Ss)(_,p),n,t)}function li(n,t,r,e){return n===X||Gf(n,gl[r])&&!bl.call(e,r)?t:n}function si(n,t,r,e,u,i){return fc(n)&&fc(t)&&(i.set(t,n),Ke(n,t,X,si,i),i.delete(t)),n}function hi(n){return gc(n)?X:n}function pi(n,t,r,e,u,i){
|
||||
var o=r&hn,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&pn?new yr:X;for(i.set(n,t),i.set(t,n);++s<f;){var v=n[s],g=t[s];if(e)var y=o?e(g,v,s,t,n,i):e(v,g,s,n,t,i);if(y!==X){if(y)continue;p=!1;break}if(_){if(!h(t,function(n,t){if(!S(_,t)&&(v===n||u(v,n,r,e,i)))return _.push(t)})){p=!1;break}}else if(v!==g&&!u(v,g,r,e,i)){p=!1;break}}return i.delete(n),i.delete(t),p}function _i(n,t,r,e,u,i,o){switch(r){case ct:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;
|
||||
n=n.buffer,t=t.buffer;case ft:return!(n.byteLength!=t.byteLength||!i(new Rl(n),new Rl(t)));case Nn:case Pn:case Hn:return Gf(+n,+t);case Zn:return n.name==t.name&&n.message==t.message;case nt:case rt:return n==t+"";case Gn:var f=M;case tt:var c=e&hn;if(f||(f=P),n.size!=t.size&&!c)return!1;var a=o.get(n);if(a)return a==t;e|=pn,o.set(n,t);var l=pi(f(n),f(t),e,u,i,o);return o.delete(n),l;case et:if(_s)return _s.call(n)==_s.call(t)}return!1}function vi(n,t,r,e,u,i){var o=r&hn,f=yi(n),c=f.length;if(c!=yi(t).length&&!o)return!1;
|
||||
for(var a=c;a--;){var l=f[a];if(!(o?l in t:bl.call(t,l)))return!1}var s=i.get(n),h=i.get(t);if(s&&h)return s==t&&h==n;var p=!0;i.set(n,t),i.set(t,n);for(var _=o;++a<c;){l=f[a];var v=n[l],g=t[l];if(e)var y=o?e(g,v,l,t,n,i):e(v,g,l,n,t,i);if(!(y===X?v===g||u(v,g,r,e,i):y)){p=!1;break}_||(_="constructor"==l)}if(p&&!_){var d=n.constructor,b=t.constructor;d!=b&&"constructor"in n&&"constructor"in t&&!("function"==typeof d&&d instanceof d&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(n),
|
||||
i.delete(t),p}function gi(n){return Ls(Vi(n,X,_o),n+"")}function yi(n){return de(n,Pc,Is)}function di(n){return de(n,qc,Rs)}function bi(n){for(var t=n.name+"",r=fs[t],e=bl.call(fs,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function wi(n){return(bl.call(Z,"placeholder")?Z:n).placeholder}function mi(){var n=Z.iteratee||Ca;return n=n===Ca?De:n,arguments.length?n(arguments[0],arguments[1]):n}function xi(n,t){var r=n.__data__;return Ti(t)?r["string"==typeof t?"string":"hash"]:r.map;
|
||||
}function ji(n){for(var t=Pc(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Fi(u)]}return t}function Ai(n,t){var r=B(n,t);return Ue(r)?r:X}function ki(n){var t=bl.call(n,Bl),r=n[Bl];try{n[Bl]=X;var e=!0}catch(n){}var u=xl.call(n);return e&&(t?n[Bl]=r:delete n[Bl]),u}function Oi(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=Hl(t,n+o);break;case"takeRight":n=Gl(n,t-o)}}return{start:n,end:t}}function Ii(n){var t=n.match(Bt);
|
||||
return t?t[1].split(Tt):[]}function Ri(n,t,r){t=ku(t,n);for(var e=-1,u=t.length,i=!1;++e<u;){var o=no(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&oc(u)&&Ci(o,u)&&(bh(n)||dh(n)))}function zi(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&bl.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ei(n){return"function"!=typeof n.constructor||Mi(n)?{}:gs(El(n))}function Si(n,t,r){var e=n.constructor;switch(t){case ft:return Ru(n);
|
||||
case Nn:case Pn:return new e(+n);case ct:return zu(n,r);case at:case lt:case st:case ht:case pt:case _t:case vt:case gt:case yt:return Wu(n,r);case Gn:return new e;case Hn:case rt:return new e(n);case nt:return Eu(n);case tt:return new e;case et:return Su(n)}}function Wi(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Ut,"{\n/* [wrapped with "+t+"] */\n")}function Li(n){return bh(n)||dh(n)||!!(Cl&&n&&n[Cl])}function Ci(n,t){var r=typeof n;
|
||||
return t=null==t?Wn:t,!!t&&("number"==r||"symbol"!=r&&Vt.test(n))&&n>-1&&n%1==0&&n<t}function Ui(n,t,r){if(!fc(r))return!1;var e=typeof t;return!!("number"==e?Hf(r)&&Ci(t,r.length):"string"==e&&t in r)&&Gf(r[t],n)}function Bi(n,t){if(bh(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!bc(n))||(zt.test(n)||!Rt.test(n)||null!=t&&n in ll(t))}function Ti(n){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}function $i(n){
|
||||
var t=bi(n),r=Z[t];if("function"!=typeof r||!(t in Ct.prototype))return!1;if(n===r)return!0;var e=Os(r);return!!e&&n===e[0]}function Di(n){return!!ml&&ml in n}function Mi(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||gl)}function Fi(n){return n===n&&!fc(n)}function Ni(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==X||n in ll(r)))}}function Pi(n){var t=Cf(n,function(n){return r.size===fn&&r.clear(),n}),r=t.cache;return t}function qi(n,t){var r=n[1],e=t[1],u=r|e,i=u<(_n|vn|mn),o=e==mn&&r==yn||e==mn&&r==xn&&n[7].length<=t[8]||e==(mn|xn)&&t[7].length<=t[8]&&r==yn;
|
||||
if(!i&&!o)return n;e&_n&&(n[2]=t[2],u|=r&_n?0:gn);var f=t[3];if(f){var c=n[3];n[3]=c?Uu(c,f,t[4]):f,n[4]=c?N(n[3],cn):t[4]}return f=t[5],f&&(c=n[5],n[5]=c?Bu(c,f,t[6]):f,n[6]=c?N(n[5],cn):t[6]),f=t[7],f&&(n[7]=f),e&mn&&(n[8]=null==n[8]?t[8]:Hl(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u,n}function Zi(n){var t=[];if(null!=n)for(var r in ll(n))t.push(r);return t}function Ki(n){return xl.call(n)}function Vi(t,r,e){return r=Gl(r===X?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Gl(u.length-r,0),f=il(o);++i<o;)f[i]=u[r+i];
|
||||
i=-1;for(var c=il(r+1);++i<r;)c[i]=u[i];return c[r]=e(f),n(t,this,c)}}function Gi(n,t){return t.length<2?n:_e(n,au(t,0,-1))}function Hi(n,t){for(var r=n.length,e=Hl(t.length,r),u=Tu(n);e--;){var i=t[e];n[e]=Ci(i,r)?u[i]:X}return n}function Ji(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}function Yi(n,t,r){var e=t+"";return Ls(n,Wi(e,ro(Ii(e),r)))}function Qi(n){var t=0,r=0;return function(){var e=Jl(),u=In-(e-r);if(r=e,u>0){if(++t>=On)return arguments[0]}else t=0;
|
||||
return n.apply(X,arguments)}}function Xi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===X?e:t;++r<t;){var i=tu(r,u),o=n[i];n[i]=n[r],n[r]=o}return n.length=t,n}function no(n){if("string"==typeof n||bc(n))return n;var t=n+"";return"0"==t&&1/n==-Sn?"-0":t}function to(n){if(null!=n){try{return dl.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function ro(n,t){return r($n,function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function eo(n){if(n instanceof Ct)return n.clone();var t=new Y(n.__wrapped__,n.__chain__);
|
||||
return t.__actions__=Tu(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function uo(n,t,r){t=(r?Ui(n,t,r):t===X)?1:Gl(kc(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=il(Fl(e/t));u<e;)o[i++]=au(n,u,u+=t);return o}function io(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u}function oo(){var n=arguments.length;if(!n)return[];for(var t=il(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return a(bh(r)?Tu(r):[r],ee(t,1));
|
||||
}function fo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),au(n,t<0?0:t,e)):[]}function co(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,0,t<0?0:t)):[]}function ao(n,t){return n&&n.length?bu(n,mi(t,3),!0,!0):[]}function lo(n,t){return n&&n.length?bu(n,mi(t,3),!0):[]}function so(n,t,r,e){var u=null==n?0:n.length;return u?(r&&"number"!=typeof r&&Ui(n,t,r)&&(r=0,e=u),ne(n,t,r,e)):[]}function ho(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);
|
||||
return u<0&&(u=Gl(e+u,0)),g(n,mi(t,3),u)}function po(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==X&&(u=kc(r),u=r<0?Gl(e+u,0):Hl(u,e-1)),g(n,mi(t,3),u,!0)}function _o(n){return(null==n?0:n.length)?ee(n,1):[]}function vo(n){return(null==n?0:n.length)?ee(n,Sn):[]}function go(n,t){return(null==n?0:n.length)?(t=t===X?1:kc(t),ee(n,t)):[]}function yo(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e}function bo(n){return n&&n.length?n[0]:X}function wo(n,t,r){
|
||||
var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);return u<0&&(u=Gl(e+u,0)),y(n,t,u)}function mo(n){return(null==n?0:n.length)?au(n,0,-1):[]}function xo(n,t){return null==n?"":Kl.call(n,t)}function jo(n){var t=null==n?0:n.length;return t?n[t-1]:X}function Ao(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==X&&(u=kc(r),u=u<0?Gl(e+u,0):Hl(u,e-1)),t===t?K(n,t,u):g(n,b,u,!0)}function ko(n,t){return n&&n.length?Ge(n,kc(t)):X}function Oo(n,t){return n&&n.length&&t&&t.length?Xe(n,t):n;
|
||||
}function Io(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,mi(r,2)):n}function Ro(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,X,r):n}function zo(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=mi(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return nu(n,u),r}function Eo(n){return null==n?n:Xl.call(n)}function So(n,t,r){var e=null==n?0:n.length;return e?(r&&"number"!=typeof r&&Ui(n,t,r)?(t=0,r=e):(t=null==t?0:kc(t),r=r===X?e:kc(r)),au(n,t,r)):[]}function Wo(n,t){
|
||||
return su(n,t)}function Lo(n,t,r){return hu(n,t,mi(r,2))}function Co(n,t){var r=null==n?0:n.length;if(r){var e=su(n,t);if(e<r&&Gf(n[e],t))return e}return-1}function Uo(n,t){return su(n,t,!0)}function Bo(n,t,r){return hu(n,t,mi(r,2),!0)}function To(n,t){if(null==n?0:n.length){var r=su(n,t,!0)-1;if(Gf(n[r],t))return r}return-1}function $o(n){return n&&n.length?pu(n):[]}function Do(n,t){return n&&n.length?pu(n,mi(t,2)):[]}function Mo(n){var t=null==n?0:n.length;return t?au(n,1,t):[]}function Fo(n,t,r){
|
||||
return n&&n.length?(t=r||t===X?1:kc(t),au(n,0,t<0?0:t)):[]}function No(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,t<0?0:t,e)):[]}function Po(n,t){return n&&n.length?bu(n,mi(t,3),!1,!0):[]}function qo(n,t){return n&&n.length?bu(n,mi(t,3)):[]}function Zo(n){return n&&n.length?gu(n):[]}function Ko(n,t){return n&&n.length?gu(n,mi(t,2)):[]}function Vo(n,t){return t="function"==typeof t?t:X,n&&n.length?gu(n,X,t):[]}function Go(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){
|
||||
if(Jf(n))return t=Gl(n.length,t),!0}),O(t,function(t){return c(n,m(t))})}function Ho(t,r){if(!t||!t.length)return[];var e=Go(t);return null==r?e:c(e,function(t){return n(r,X,t)})}function Jo(n,t){return xu(n||[],t||[],Sr)}function Yo(n,t){return xu(n||[],t||[],fu)}function Qo(n){var t=Z(n);return t.__chain__=!0,t}function Xo(n,t){return t(n),n}function nf(n,t){return t(n)}function tf(){return Qo(this)}function rf(){return new Y(this.value(),this.__chain__)}function ef(){this.__values__===X&&(this.__values__=jc(this.value()));
|
||||
var n=this.__index__>=this.__values__.length;return{done:n,value:n?X:this.__values__[this.__index__++]}}function uf(){return this}function of(n){for(var t,r=this;r instanceof J;){var e=eo(r);e.__index__=0,e.__values__=X,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function ff(){var n=this.__wrapped__;if(n instanceof Ct){var t=n;return this.__actions__.length&&(t=new Ct(this)),t=t.reverse(),t.__actions__.push({func:nf,args:[Eo],thisArg:X}),new Y(t,this.__chain__)}return this.thru(Eo);
|
||||
}function cf(){return wu(this.__wrapped__,this.__actions__)}function af(n,t,r){var e=bh(n)?u:Jr;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function lf(n,t){return(bh(n)?i:te)(n,mi(t,3))}function sf(n,t){return ee(yf(n,t),1)}function hf(n,t){return ee(yf(n,t),Sn)}function pf(n,t,r){return r=r===X?1:kc(r),ee(yf(n,t),r)}function _f(n,t){return(bh(n)?r:ys)(n,mi(t,3))}function vf(n,t){return(bh(n)?e:ds)(n,mi(t,3))}function gf(n,t,r,e){n=Hf(n)?n:ra(n),r=r&&!e?kc(r):0;var u=n.length;return r<0&&(r=Gl(u+r,0)),
|
||||
dc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function yf(n,t){return(bh(n)?c:Pe)(n,mi(t,3))}function df(n,t,r,e){return null==n?[]:(bh(t)||(t=null==t?[]:[t]),r=e?X:r,bh(r)||(r=null==r?[]:[r]),He(n,t,r))}function bf(n,t,r){var e=bh(n)?l:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ys)}function wf(n,t,r){var e=bh(n)?s:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ds)}function mf(n,t){return(bh(n)?i:te)(n,Uf(mi(t,3)))}function xf(n){return(bh(n)?Ir:iu)(n)}function jf(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),
|
||||
(bh(n)?Rr:ou)(n,t)}function Af(n){return(bh(n)?zr:cu)(n)}function kf(n){if(null==n)return 0;if(Hf(n))return dc(n)?V(n):n.length;var t=zs(n);return t==Gn||t==tt?n.size:Me(n).length}function Of(n,t,r){var e=bh(n)?h:lu;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function If(n,t){if("function"!=typeof t)throw new pl(en);return n=kc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Rf(n,t,r){return t=r?X:t,t=n&&null==t?n.length:t,ai(n,mn,X,X,X,X,t)}function zf(n,t){var r;if("function"!=typeof t)throw new pl(en);
|
||||
return n=kc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=X),r}}function Ef(n,t,r){t=r?X:t;var e=ai(n,yn,X,X,X,X,X,t);return e.placeholder=Ef.placeholder,e}function Sf(n,t,r){t=r?X:t;var e=ai(n,dn,X,X,X,X,X,t);return e.placeholder=Sf.placeholder,e}function Wf(n,t,r){function e(t){var r=h,e=p;return h=p=X,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Ws(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Hl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===X||r>=t||r<0||w&&e>=_;
|
||||
}function f(){var n=fh();return o(n)?c(n):(g=Ws(f,i(n)),X)}function c(n){return g=X,m&&h?e(n):(h=p=X,v)}function a(){g!==X&&As(g),d=0,h=y=p=g=X}function l(){return g===X?v:c(fh())}function s(){var n=fh(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===X)return u(y);if(w)return As(g),g=Ws(f,t),e(y)}return g===X&&(g=Ws(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new pl(en);return t=Ic(t)||0,fc(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Gl(Ic(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m),
|
||||
s.cancel=a,s.flush=l,s}function Lf(n){return ai(n,jn)}function Cf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new pl(en);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Cf.Cache||sr),r}function Uf(n){if("function"!=typeof n)throw new pl(en);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:
|
||||
return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Bf(n){return zf(2,n)}function Tf(n,t){if("function"!=typeof n)throw new pl(en);return t=t===X?t:kc(t),uu(n,t)}function $f(t,r){if("function"!=typeof t)throw new pl(en);return r=null==r?0:Gl(kc(r),0),uu(function(e){var u=e[r],i=Ou(e,0,r);return u&&a(i,u),n(t,this,i)})}function Df(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new pl(en);return fc(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),
|
||||
Wf(n,t,{leading:e,maxWait:t,trailing:u})}function Mf(n){return Rf(n,1)}function Ff(n,t){return ph(Au(t),n)}function Nf(){if(!arguments.length)return[];var n=arguments[0];return bh(n)?n:[n]}function Pf(n){return Fr(n,sn)}function qf(n,t){return t="function"==typeof t?t:X,Fr(n,sn,t)}function Zf(n){return Fr(n,an|sn)}function Kf(n,t){return t="function"==typeof t?t:X,Fr(n,an|sn,t)}function Vf(n,t){return null==t||Pr(n,t,Pc(t))}function Gf(n,t){return n===t||n!==n&&t!==t}function Hf(n){return null!=n&&oc(n.length)&&!uc(n);
|
||||
}function Jf(n){return cc(n)&&Hf(n)}function Yf(n){return n===!0||n===!1||cc(n)&&we(n)==Nn}function Qf(n){return cc(n)&&1===n.nodeType&&!gc(n)}function Xf(n){if(null==n)return!0;if(Hf(n)&&(bh(n)||"string"==typeof n||"function"==typeof n.splice||mh(n)||Oh(n)||dh(n)))return!n.length;var t=zs(n);if(t==Gn||t==tt)return!n.size;if(Mi(n))return!Me(n).length;for(var r in n)if(bl.call(n,r))return!1;return!0}function nc(n,t){return Se(n,t)}function tc(n,t,r){r="function"==typeof r?r:X;var e=r?r(n,t):X;return e===X?Se(n,t,X,r):!!e;
|
||||
}function rc(n){if(!cc(n))return!1;var t=we(n);return t==Zn||t==qn||"string"==typeof n.message&&"string"==typeof n.name&&!gc(n)}function ec(n){return"number"==typeof n&&Zl(n)}function uc(n){if(!fc(n))return!1;var t=we(n);return t==Kn||t==Vn||t==Fn||t==Xn}function ic(n){return"number"==typeof n&&n==kc(n)}function oc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=Wn}function fc(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function cc(n){return null!=n&&"object"==typeof n}function ac(n,t){
|
||||
return n===t||Ce(n,t,ji(t))}function lc(n,t,r){return r="function"==typeof r?r:X,Ce(n,t,ji(t),r)}function sc(n){return vc(n)&&n!=+n}function hc(n){if(Es(n))throw new fl(rn);return Ue(n)}function pc(n){return null===n}function _c(n){return null==n}function vc(n){return"number"==typeof n||cc(n)&&we(n)==Hn}function gc(n){if(!cc(n)||we(n)!=Yn)return!1;var t=El(n);if(null===t)return!0;var r=bl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&dl.call(r)==jl}function yc(n){
|
||||
return ic(n)&&n>=-Wn&&n<=Wn}function dc(n){return"string"==typeof n||!bh(n)&&cc(n)&&we(n)==rt}function bc(n){return"symbol"==typeof n||cc(n)&&we(n)==et}function wc(n){return n===X}function mc(n){return cc(n)&&zs(n)==it}function xc(n){return cc(n)&&we(n)==ot}function jc(n){if(!n)return[];if(Hf(n))return dc(n)?G(n):Tu(n);if(Ul&&n[Ul])return D(n[Ul]());var t=zs(n);return(t==Gn?M:t==tt?P:ra)(n)}function Ac(n){if(!n)return 0===n?n:0;if(n=Ic(n),n===Sn||n===-Sn){return(n<0?-1:1)*Ln}return n===n?n:0}function kc(n){
|
||||
var t=Ac(n),r=t%1;return t===t?r?t-r:t:0}function Oc(n){return n?Mr(kc(n),0,Un):0}function Ic(n){if("number"==typeof n)return n;if(bc(n))return Cn;if(fc(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=fc(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=R(n);var r=qt.test(n);return r||Kt.test(n)?Xr(n.slice(2),r?2:8):Pt.test(n)?Cn:+n}function Rc(n){return $u(n,qc(n))}function zc(n){return n?Mr(kc(n),-Wn,Wn):0===n?n:0}function Ec(n){return null==n?"":vu(n)}function Sc(n,t){var r=gs(n);return null==t?r:Cr(r,t);
|
||||
}function Wc(n,t){return v(n,mi(t,3),ue)}function Lc(n,t){return v(n,mi(t,3),oe)}function Cc(n,t){return null==n?n:bs(n,mi(t,3),qc)}function Uc(n,t){return null==n?n:ws(n,mi(t,3),qc)}function Bc(n,t){return n&&ue(n,mi(t,3))}function Tc(n,t){return n&&oe(n,mi(t,3))}function $c(n){return null==n?[]:fe(n,Pc(n))}function Dc(n){return null==n?[]:fe(n,qc(n))}function Mc(n,t,r){var e=null==n?X:_e(n,t);return e===X?r:e}function Fc(n,t){return null!=n&&Ri(n,t,xe)}function Nc(n,t){return null!=n&&Ri(n,t,je);
|
||||
}function Pc(n){return Hf(n)?Or(n):Me(n)}function qc(n){return Hf(n)?Or(n,!0):Fe(n)}function Zc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,t(n,e,u),n)}),r}function Kc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,e,t(n,e,u))}),r}function Vc(n,t){return Gc(n,Uf(mi(t)))}function Gc(n,t){if(null==n)return{};var r=c(di(n),function(n){return[n]});return t=mi(t),Ye(n,r,function(n,r){return t(n,r[0])})}function Hc(n,t,r){t=ku(t,n);var e=-1,u=t.length;for(u||(u=1,n=X);++e<u;){var i=null==n?X:n[no(t[e])];
|
||||
i===X&&(e=u,i=r),n=uc(i)?i.call(n):i}return n}function Jc(n,t,r){return null==n?n:fu(n,t,r)}function Yc(n,t,r,e){return e="function"==typeof e?e:X,null==n?n:fu(n,t,r,e)}function Qc(n,t,e){var u=bh(n),i=u||mh(n)||Oh(n);if(t=mi(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:fc(n)&&uc(o)?gs(El(n)):{}}return(i?r:ue)(n,function(n,r,u){return t(e,n,r,u)}),e}function Xc(n,t){return null==n||yu(n,t)}function na(n,t,r){return null==n?n:du(n,t,Au(r))}function ta(n,t,r,e){return e="function"==typeof e?e:X,
|
||||
null==n?n:du(n,t,Au(r),e)}function ra(n){return null==n?[]:E(n,Pc(n))}function ea(n){return null==n?[]:E(n,qc(n))}function ua(n,t,r){return r===X&&(r=t,t=X),r!==X&&(r=Ic(r),r=r===r?r:0),t!==X&&(t=Ic(t),t=t===t?t:0),Mr(Ic(n),t,r)}function ia(n,t,r){return t=Ac(t),r===X?(r=t,t=0):r=Ac(r),n=Ic(n),Ae(n,t,r)}function oa(n,t,r){if(r&&"boolean"!=typeof r&&Ui(n,t,r)&&(t=r=X),r===X&&("boolean"==typeof t?(r=t,t=X):"boolean"==typeof n&&(r=n,n=X)),n===X&&t===X?(n=0,t=1):(n=Ac(n),t===X?(t=n,n=0):t=Ac(t)),n>t){
|
||||
var e=n;n=t,t=e}if(r||n%1||t%1){var u=Ql();return Hl(n+u*(t-n+Qr("1e-"+((u+"").length-1))),t)}return tu(n,t)}function fa(n){return Qh(Ec(n).toLowerCase())}function ca(n){return n=Ec(n),n&&n.replace(Gt,ve).replace(Dr,"")}function aa(n,t,r){n=Ec(n),t=vu(t);var e=n.length;r=r===X?e:Mr(kc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function la(n){return n=Ec(n),n&&At.test(n)?n.replace(xt,ge):n}function sa(n){return n=Ec(n),n&&Wt.test(n)?n.replace(St,"\\$&"):n}function ha(n,t,r){n=Ec(n),t=kc(t);
|
||||
var e=t?V(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ri(Nl(u),r)+n+ri(Fl(u),r)}function pa(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?n+ri(t-e,r):n}function _a(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?ri(t-e,r)+n:n}function va(n,t,r){return r||null==t?t=0:t&&(t=+t),Yl(Ec(n).replace(Lt,""),t||0)}function ga(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),eu(Ec(n),t)}function ya(){var n=arguments,t=Ec(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function da(n,t,r){return r&&"number"!=typeof r&&Ui(n,t,r)&&(t=r=X),
|
||||
(r=r===X?Un:r>>>0)?(n=Ec(n),n&&("string"==typeof t||null!=t&&!Ah(t))&&(t=vu(t),!t&&T(n))?Ou(G(n),0,r):n.split(t,r)):[]}function ba(n,t,r){return n=Ec(n),r=null==r?0:Mr(kc(r),0,n.length),t=vu(t),n.slice(r,r+t.length)==t}function wa(n,t,r){var e=Z.templateSettings;r&&Ui(n,t,r)&&(t=X),n=Ec(n),t=Sh({},t,e,li);var u,i,o=Sh({},t.imports,e.imports,li),f=Pc(o),c=E(o,f),a=0,l=t.interpolate||Ht,s="__p += '",h=sl((t.escape||Ht).source+"|"+l.source+"|"+(l===It?Ft:Ht).source+"|"+(t.evaluate||Ht).source+"|$","g"),p="//# sourceURL="+(bl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zr+"]")+"\n";
|
||||
n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Jt,U),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t}),s+="';\n";var _=bl.call(t,"variable")&&t.variable;if(_){if(Dt.test(_))throw new fl(un)}else s="with (obj) {\n"+s+"\n}\n";s=(i?s.replace(dt,""):s).replace(bt,"$1").replace(wt,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}";
|
||||
var v=Xh(function(){return cl(f,p+"return "+s).apply(X,c)});if(v.source=s,rc(v))throw v;return v}function ma(n){return Ec(n).toLowerCase()}function xa(n){return Ec(n).toUpperCase()}function ja(n,t,r){if(n=Ec(n),n&&(r||t===X))return R(n);if(!n||!(t=vu(t)))return n;var e=G(n),u=G(t);return Ou(e,W(e,u),L(e,u)+1).join("")}function Aa(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.slice(0,H(n)+1);if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,0,L(e,G(t))+1).join("")}function ka(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.replace(Lt,"");
|
||||
if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,W(e,G(t))).join("")}function Oa(n,t){var r=An,e=kn;if(fc(t)){var u="separator"in t?t.separator:u;r="length"in t?kc(t.length):r,e="omission"in t?vu(t.omission):e}n=Ec(n);var i=n.length;if(T(n)){var o=G(n);i=o.length}if(r>=i)return n;var f=r-V(e);if(f<1)return e;var c=o?Ou(o,0,f).join(""):n.slice(0,f);if(u===X)return c+e;if(o&&(f+=c.length-f),Ah(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=sl(u.source,Ec(Nt.exec(u))+"g")),u.lastIndex=0;a=u.exec(l);)var s=a.index;
|
||||
c=c.slice(0,s===X?f:s)}}else if(n.indexOf(vu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function Ia(n){return n=Ec(n),n&&jt.test(n)?n.replace(mt,ye):n}function Ra(n,t,r){return n=Ec(n),t=r?X:t,t===X?$(n)?Q(n):_(n):n.match(t)||[]}function za(t){var r=null==t?0:t.length,e=mi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new pl(en);return[e(n[0]),n[1]]}):[],uu(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e)}})}function Ea(n){
|
||||
return Nr(Fr(n,an))}function Sa(n){return function(){return n}}function Wa(n,t){return null==n||n!==n?t:n}function La(n){return n}function Ca(n){return De("function"==typeof n?n:Fr(n,an))}function Ua(n){return qe(Fr(n,an))}function Ba(n,t){return Ze(n,Fr(t,an))}function Ta(n,t,e){var u=Pc(t),i=fe(t,u);null!=e||fc(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=fe(t,Pc(t)));var o=!(fc(e)&&"chain"in e&&!e.chain),f=uc(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;
|
||||
if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Tu(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function $a(){return re._===this&&(re._=Al),this}function Da(){}function Ma(n){return n=kc(n),uu(function(t){return Ge(t,n)})}function Fa(n){return Bi(n)?m(no(n)):Qe(n)}function Na(n){return function(t){return null==n?X:_e(n,t)}}function Pa(){return[]}function qa(){return!1}function Za(){return{}}function Ka(){return"";
|
||||
}function Va(){return!0}function Ga(n,t){if(n=kc(n),n<1||n>Wn)return[];var r=Un,e=Hl(n,Un);t=mi(t),n-=Un;for(var u=O(e,t);++r<n;)t(r);return u}function Ha(n){return bh(n)?c(n,no):bc(n)?[n]:Tu(Cs(Ec(n)))}function Ja(n){var t=++wl;return Ec(n)+t}function Ya(n){return n&&n.length?Yr(n,La,me):X}function Qa(n,t){return n&&n.length?Yr(n,mi(t,2),me):X}function Xa(n){return w(n,La)}function nl(n,t){return w(n,mi(t,2))}function tl(n){return n&&n.length?Yr(n,La,Ne):X}function rl(n,t){return n&&n.length?Yr(n,mi(t,2),Ne):X;
|
||||
}function el(n){return n&&n.length?k(n,La):0}function ul(n,t){return n&&n.length?k(n,mi(t,2)):0}x=null==x?re:be.defaults(re.Object(),x,be.pick(re,qr));var il=x.Array,ol=x.Date,fl=x.Error,cl=x.Function,al=x.Math,ll=x.Object,sl=x.RegExp,hl=x.String,pl=x.TypeError,_l=il.prototype,vl=cl.prototype,gl=ll.prototype,yl=x["__core-js_shared__"],dl=vl.toString,bl=gl.hasOwnProperty,wl=0,ml=function(){var n=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),xl=gl.toString,jl=dl.call(ll),Al=re._,kl=sl("^"+dl.call(bl).replace(St,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ol=ie?x.Buffer:X,Il=x.Symbol,Rl=x.Uint8Array,zl=Ol?Ol.allocUnsafe:X,El=F(ll.getPrototypeOf,ll),Sl=ll.create,Wl=gl.propertyIsEnumerable,Ll=_l.splice,Cl=Il?Il.isConcatSpreadable:X,Ul=Il?Il.iterator:X,Bl=Il?Il.toStringTag:X,Tl=function(){
|
||||
try{var n=Ai(ll,"defineProperty");return n({},"",{}),n}catch(n){}}(),$l=x.clearTimeout!==re.clearTimeout&&x.clearTimeout,Dl=ol&&ol.now!==re.Date.now&&ol.now,Ml=x.setTimeout!==re.setTimeout&&x.setTimeout,Fl=al.ceil,Nl=al.floor,Pl=ll.getOwnPropertySymbols,ql=Ol?Ol.isBuffer:X,Zl=x.isFinite,Kl=_l.join,Vl=F(ll.keys,ll),Gl=al.max,Hl=al.min,Jl=ol.now,Yl=x.parseInt,Ql=al.random,Xl=_l.reverse,ns=Ai(x,"DataView"),ts=Ai(x,"Map"),rs=Ai(x,"Promise"),es=Ai(x,"Set"),us=Ai(x,"WeakMap"),is=Ai(ll,"create"),os=us&&new us,fs={},cs=to(ns),as=to(ts),ls=to(rs),ss=to(es),hs=to(us),ps=Il?Il.prototype:X,_s=ps?ps.valueOf:X,vs=ps?ps.toString:X,gs=function(){
|
||||
function n(){}return function(t){if(!fc(t))return{};if(Sl)return Sl(t);n.prototype=t;var r=new n;return n.prototype=X,r}}();Z.templateSettings={escape:kt,evaluate:Ot,interpolate:It,variable:"",imports:{_:Z}},Z.prototype=J.prototype,Z.prototype.constructor=Z,Y.prototype=gs(J.prototype),Y.prototype.constructor=Y,Ct.prototype=gs(J.prototype),Ct.prototype.constructor=Ct,Xt.prototype.clear=nr,Xt.prototype.delete=tr,Xt.prototype.get=rr,Xt.prototype.has=er,Xt.prototype.set=ur,ir.prototype.clear=or,ir.prototype.delete=fr,
|
||||
ir.prototype.get=cr,ir.prototype.has=ar,ir.prototype.set=lr,sr.prototype.clear=hr,sr.prototype.delete=pr,sr.prototype.get=_r,sr.prototype.has=vr,sr.prototype.set=gr,yr.prototype.add=yr.prototype.push=dr,yr.prototype.has=br,wr.prototype.clear=mr,wr.prototype.delete=xr,wr.prototype.get=jr,wr.prototype.has=Ar,wr.prototype.set=kr;var ys=Pu(ue),ds=Pu(oe,!0),bs=qu(),ws=qu(!0),ms=os?function(n,t){return os.set(n,t),n}:La,xs=Tl?function(n,t){return Tl(n,"toString",{configurable:!0,enumerable:!1,value:Sa(t),
|
||||
writable:!0})}:La,js=uu,As=$l||function(n){return re.clearTimeout(n)},ks=es&&1/P(new es([,-0]))[1]==Sn?function(n){return new es(n)}:Da,Os=os?function(n){return os.get(n)}:Da,Is=Pl?function(n){return null==n?[]:(n=ll(n),i(Pl(n),function(t){return Wl.call(n,t)}))}:Pa,Rs=Pl?function(n){for(var t=[];n;)a(t,Is(n)),n=El(n);return t}:Pa,zs=we;(ns&&zs(new ns(new ArrayBuffer(1)))!=ct||ts&&zs(new ts)!=Gn||rs&&zs(rs.resolve())!=Qn||es&&zs(new es)!=tt||us&&zs(new us)!=it)&&(zs=function(n){var t=we(n),r=t==Yn?n.constructor:X,e=r?to(r):"";
|
||||
if(e)switch(e){case cs:return ct;case as:return Gn;case ls:return Qn;case ss:return tt;case hs:return it}return t});var Es=yl?uc:qa,Ss=Qi(ms),Ws=Ml||function(n,t){return re.setTimeout(n,t)},Ls=Qi(xs),Cs=Pi(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(Et,function(n,r,e,u){t.push(e?u.replace(Mt,"$1"):r||n)}),t}),Us=uu(function(n,t){return Jf(n)?Hr(n,ee(t,1,Jf,!0)):[]}),Bs=uu(function(n,t){var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),mi(r,2)):[]}),Ts=uu(function(n,t){
|
||||
var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),X,r):[]}),$s=uu(function(n){var t=c(n,ju);return t.length&&t[0]===n[0]?ke(t):[]}),Ds=uu(function(n){var t=jo(n),r=c(n,ju);return t===jo(r)?t=X:r.pop(),r.length&&r[0]===n[0]?ke(r,mi(t,2)):[]}),Ms=uu(function(n){var t=jo(n),r=c(n,ju);return t="function"==typeof t?t:X,t&&r.pop(),r.length&&r[0]===n[0]?ke(r,X,t):[]}),Fs=uu(Oo),Ns=gi(function(n,t){var r=null==n?0:n.length,e=Tr(n,t);return nu(n,c(t,function(n){return Ci(n,r)?+n:n}).sort(Lu)),e}),Ps=uu(function(n){
|
||||
return gu(ee(n,1,Jf,!0))}),qs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),gu(ee(n,1,Jf,!0),mi(t,2))}),Zs=uu(function(n){var t=jo(n);return t="function"==typeof t?t:X,gu(ee(n,1,Jf,!0),X,t)}),Ks=uu(function(n,t){return Jf(n)?Hr(n,t):[]}),Vs=uu(function(n){return mu(i(n,Jf))}),Gs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),mu(i(n,Jf),mi(t,2))}),Hs=uu(function(n){var t=jo(n);return t="function"==typeof t?t:X,mu(i(n,Jf),X,t)}),Js=uu(Go),Ys=uu(function(n){var t=n.length,r=t>1?n[t-1]:X;return r="function"==typeof r?(n.pop(),
|
||||
r):X,Ho(n,r)}),Qs=gi(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Ct&&Ci(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:nf,args:[u],thisArg:X}),new Y(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(X),n})):this.thru(u)}),Xs=Fu(function(n,t,r){bl.call(n,r)?++n[r]:Br(n,r,1)}),nh=Ju(ho),th=Ju(po),rh=Fu(function(n,t,r){bl.call(n,r)?n[r].push(t):Br(n,r,[t])}),eh=uu(function(t,r,e){var u=-1,i="function"==typeof r,o=Hf(t)?il(t.length):[];
|
||||
return ys(t,function(t){o[++u]=i?n(r,t,e):Ie(t,r,e)}),o}),uh=Fu(function(n,t,r){Br(n,r,t)}),ih=Fu(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),oh=uu(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ui(n,t[0],t[1])?t=[]:r>2&&Ui(t[0],t[1],t[2])&&(t=[t[0]]),He(n,ee(t,1),[])}),fh=Dl||function(){return re.Date.now()},ch=uu(function(n,t,r){var e=_n;if(r.length){var u=N(r,wi(ch));e|=bn}return ai(n,e,t,r,u)}),ah=uu(function(n,t,r){var e=_n|vn;if(r.length){var u=N(r,wi(ah));e|=bn;
|
||||
}return ai(t,e,n,r,u)}),lh=uu(function(n,t){return Gr(n,1,t)}),sh=uu(function(n,t,r){return Gr(n,Ic(t)||0,r)});Cf.Cache=sr;var hh=js(function(t,r){r=1==r.length&&bh(r[0])?c(r[0],z(mi())):c(ee(r,1),z(mi()));var e=r.length;return uu(function(u){for(var i=-1,o=Hl(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);return n(t,this,u)})}),ph=uu(function(n,t){return ai(n,bn,X,t,N(t,wi(ph)))}),_h=uu(function(n,t){return ai(n,wn,X,t,N(t,wi(_h)))}),vh=gi(function(n,t){return ai(n,xn,X,X,X,t)}),gh=ii(me),yh=ii(function(n,t){
|
||||
return n>=t}),dh=Re(function(){return arguments}())?Re:function(n){return cc(n)&&bl.call(n,"callee")&&!Wl.call(n,"callee")},bh=il.isArray,wh=ce?z(ce):ze,mh=ql||qa,xh=ae?z(ae):Ee,jh=le?z(le):Le,Ah=se?z(se):Be,kh=he?z(he):Te,Oh=pe?z(pe):$e,Ih=ii(Ne),Rh=ii(function(n,t){return n<=t}),zh=Nu(function(n,t){if(Mi(t)||Hf(t))return $u(t,Pc(t),n),X;for(var r in t)bl.call(t,r)&&Sr(n,r,t[r])}),Eh=Nu(function(n,t){$u(t,qc(t),n)}),Sh=Nu(function(n,t,r,e){$u(t,qc(t),n,e)}),Wh=Nu(function(n,t,r,e){$u(t,Pc(t),n,e);
|
||||
}),Lh=gi(Tr),Ch=uu(function(n,t){n=ll(n);var r=-1,e=t.length,u=e>2?t[2]:X;for(u&&Ui(t[0],t[1],u)&&(e=1);++r<e;)for(var i=t[r],o=qc(i),f=-1,c=o.length;++f<c;){var a=o[f],l=n[a];(l===X||Gf(l,gl[a])&&!bl.call(n,a))&&(n[a]=i[a])}return n}),Uh=uu(function(t){return t.push(X,si),n(Mh,X,t)}),Bh=Xu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=xl.call(t)),n[t]=r},Sa(La)),Th=Xu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=xl.call(t)),bl.call(n,t)?n[t].push(r):n[t]=[r]},mi),$h=uu(Ie),Dh=Nu(function(n,t,r){
|
||||
Ke(n,t,r)}),Mh=Nu(function(n,t,r,e){Ke(n,t,r,e)}),Fh=gi(function(n,t){var r={};if(null==n)return r;var e=!1;t=c(t,function(t){return t=ku(t,n),e||(e=t.length>1),t}),$u(n,di(n),r),e&&(r=Fr(r,an|ln|sn,hi));for(var u=t.length;u--;)yu(r,t[u]);return r}),Nh=gi(function(n,t){return null==n?{}:Je(n,t)}),Ph=ci(Pc),qh=ci(qc),Zh=Vu(function(n,t,r){return t=t.toLowerCase(),n+(r?fa(t):t)}),Kh=Vu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Vh=Vu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Gh=Ku("toLowerCase"),Hh=Vu(function(n,t,r){
|
||||
return n+(r?"_":"")+t.toLowerCase()}),Jh=Vu(function(n,t,r){return n+(r?" ":"")+Qh(t)}),Yh=Vu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Qh=Ku("toUpperCase"),Xh=uu(function(t,r){try{return n(t,X,r)}catch(n){return rc(n)?n:new fl(n)}}),np=gi(function(n,t){return r(t,function(t){t=no(t),Br(n,t,ch(n[t],n))}),n}),tp=Yu(),rp=Yu(!0),ep=uu(function(n,t){return function(r){return Ie(r,n,t)}}),up=uu(function(n,t){return function(r){return Ie(n,r,t)}}),ip=ti(c),op=ti(u),fp=ti(h),cp=ui(),ap=ui(!0),lp=ni(function(n,t){
|
||||
return n+t},0),sp=fi("ceil"),hp=ni(function(n,t){return n/t},1),pp=fi("floor"),_p=ni(function(n,t){return n*t},1),vp=fi("round"),gp=ni(function(n,t){return n-t},0);return Z.after=If,Z.ary=Rf,Z.assign=zh,Z.assignIn=Eh,Z.assignInWith=Sh,Z.assignWith=Wh,Z.at=Lh,Z.before=zf,Z.bind=ch,Z.bindAll=np,Z.bindKey=ah,Z.castArray=Nf,Z.chain=Qo,Z.chunk=uo,Z.compact=io,Z.concat=oo,Z.cond=za,Z.conforms=Ea,Z.constant=Sa,Z.countBy=Xs,Z.create=Sc,Z.curry=Ef,Z.curryRight=Sf,Z.debounce=Wf,Z.defaults=Ch,Z.defaultsDeep=Uh,
|
||||
Z.defer=lh,Z.delay=sh,Z.difference=Us,Z.differenceBy=Bs,Z.differenceWith=Ts,Z.drop=fo,Z.dropRight=co,Z.dropRightWhile=ao,Z.dropWhile=lo,Z.fill=so,Z.filter=lf,Z.flatMap=sf,Z.flatMapDeep=hf,Z.flatMapDepth=pf,Z.flatten=_o,Z.flattenDeep=vo,Z.flattenDepth=go,Z.flip=Lf,Z.flow=tp,Z.flowRight=rp,Z.fromPairs=yo,Z.functions=$c,Z.functionsIn=Dc,Z.groupBy=rh,Z.initial=mo,Z.intersection=$s,Z.intersectionBy=Ds,Z.intersectionWith=Ms,Z.invert=Bh,Z.invertBy=Th,Z.invokeMap=eh,Z.iteratee=Ca,Z.keyBy=uh,Z.keys=Pc,Z.keysIn=qc,
|
||||
Z.map=yf,Z.mapKeys=Zc,Z.mapValues=Kc,Z.matches=Ua,Z.matchesProperty=Ba,Z.memoize=Cf,Z.merge=Dh,Z.mergeWith=Mh,Z.method=ep,Z.methodOf=up,Z.mixin=Ta,Z.negate=Uf,Z.nthArg=Ma,Z.omit=Fh,Z.omitBy=Vc,Z.once=Bf,Z.orderBy=df,Z.over=ip,Z.overArgs=hh,Z.overEvery=op,Z.overSome=fp,Z.partial=ph,Z.partialRight=_h,Z.partition=ih,Z.pick=Nh,Z.pickBy=Gc,Z.property=Fa,Z.propertyOf=Na,Z.pull=Fs,Z.pullAll=Oo,Z.pullAllBy=Io,Z.pullAllWith=Ro,Z.pullAt=Ns,Z.range=cp,Z.rangeRight=ap,Z.rearg=vh,Z.reject=mf,Z.remove=zo,Z.rest=Tf,
|
||||
Z.reverse=Eo,Z.sampleSize=jf,Z.set=Jc,Z.setWith=Yc,Z.shuffle=Af,Z.slice=So,Z.sortBy=oh,Z.sortedUniq=$o,Z.sortedUniqBy=Do,Z.split=da,Z.spread=$f,Z.tail=Mo,Z.take=Fo,Z.takeRight=No,Z.takeRightWhile=Po,Z.takeWhile=qo,Z.tap=Xo,Z.throttle=Df,Z.thru=nf,Z.toArray=jc,Z.toPairs=Ph,Z.toPairsIn=qh,Z.toPath=Ha,Z.toPlainObject=Rc,Z.transform=Qc,Z.unary=Mf,Z.union=Ps,Z.unionBy=qs,Z.unionWith=Zs,Z.uniq=Zo,Z.uniqBy=Ko,Z.uniqWith=Vo,Z.unset=Xc,Z.unzip=Go,Z.unzipWith=Ho,Z.update=na,Z.updateWith=ta,Z.values=ra,Z.valuesIn=ea,
|
||||
Z.without=Ks,Z.words=Ra,Z.wrap=Ff,Z.xor=Vs,Z.xorBy=Gs,Z.xorWith=Hs,Z.zip=Js,Z.zipObject=Jo,Z.zipObjectDeep=Yo,Z.zipWith=Ys,Z.entries=Ph,Z.entriesIn=qh,Z.extend=Eh,Z.extendWith=Sh,Ta(Z,Z),Z.add=lp,Z.attempt=Xh,Z.camelCase=Zh,Z.capitalize=fa,Z.ceil=sp,Z.clamp=ua,Z.clone=Pf,Z.cloneDeep=Zf,Z.cloneDeepWith=Kf,Z.cloneWith=qf,Z.conformsTo=Vf,Z.deburr=ca,Z.defaultTo=Wa,Z.divide=hp,Z.endsWith=aa,Z.eq=Gf,Z.escape=la,Z.escapeRegExp=sa,Z.every=af,Z.find=nh,Z.findIndex=ho,Z.findKey=Wc,Z.findLast=th,Z.findLastIndex=po,
|
||||
Z.findLastKey=Lc,Z.floor=pp,Z.forEach=_f,Z.forEachRight=vf,Z.forIn=Cc,Z.forInRight=Uc,Z.forOwn=Bc,Z.forOwnRight=Tc,Z.get=Mc,Z.gt=gh,Z.gte=yh,Z.has=Fc,Z.hasIn=Nc,Z.head=bo,Z.identity=La,Z.includes=gf,Z.indexOf=wo,Z.inRange=ia,Z.invoke=$h,Z.isArguments=dh,Z.isArray=bh,Z.isArrayBuffer=wh,Z.isArrayLike=Hf,Z.isArrayLikeObject=Jf,Z.isBoolean=Yf,Z.isBuffer=mh,Z.isDate=xh,Z.isElement=Qf,Z.isEmpty=Xf,Z.isEqual=nc,Z.isEqualWith=tc,Z.isError=rc,Z.isFinite=ec,Z.isFunction=uc,Z.isInteger=ic,Z.isLength=oc,Z.isMap=jh,
|
||||
Z.isMatch=ac,Z.isMatchWith=lc,Z.isNaN=sc,Z.isNative=hc,Z.isNil=_c,Z.isNull=pc,Z.isNumber=vc,Z.isObject=fc,Z.isObjectLike=cc,Z.isPlainObject=gc,Z.isRegExp=Ah,Z.isSafeInteger=yc,Z.isSet=kh,Z.isString=dc,Z.isSymbol=bc,Z.isTypedArray=Oh,Z.isUndefined=wc,Z.isWeakMap=mc,Z.isWeakSet=xc,Z.join=xo,Z.kebabCase=Kh,Z.last=jo,Z.lastIndexOf=Ao,Z.lowerCase=Vh,Z.lowerFirst=Gh,Z.lt=Ih,Z.lte=Rh,Z.max=Ya,Z.maxBy=Qa,Z.mean=Xa,Z.meanBy=nl,Z.min=tl,Z.minBy=rl,Z.stubArray=Pa,Z.stubFalse=qa,Z.stubObject=Za,Z.stubString=Ka,
|
||||
Z.stubTrue=Va,Z.multiply=_p,Z.nth=ko,Z.noConflict=$a,Z.noop=Da,Z.now=fh,Z.pad=ha,Z.padEnd=pa,Z.padStart=_a,Z.parseInt=va,Z.random=oa,Z.reduce=bf,Z.reduceRight=wf,Z.repeat=ga,Z.replace=ya,Z.result=Hc,Z.round=vp,Z.runInContext=p,Z.sample=xf,Z.size=kf,Z.snakeCase=Hh,Z.some=Of,Z.sortedIndex=Wo,Z.sortedIndexBy=Lo,Z.sortedIndexOf=Co,Z.sortedLastIndex=Uo,Z.sortedLastIndexBy=Bo,Z.sortedLastIndexOf=To,Z.startCase=Jh,Z.startsWith=ba,Z.subtract=gp,Z.sum=el,Z.sumBy=ul,Z.template=wa,Z.times=Ga,Z.toFinite=Ac,Z.toInteger=kc,
|
||||
Z.toLength=Oc,Z.toLower=ma,Z.toNumber=Ic,Z.toSafeInteger=zc,Z.toString=Ec,Z.toUpper=xa,Z.trim=ja,Z.trimEnd=Aa,Z.trimStart=ka,Z.truncate=Oa,Z.unescape=Ia,Z.uniqueId=Ja,Z.upperCase=Yh,Z.upperFirst=Qh,Z.each=_f,Z.eachRight=vf,Z.first=bo,Ta(Z,function(){var n={};return ue(Z,function(t,r){bl.call(Z.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),Z.VERSION=nn,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){Z[n].placeholder=Z}),r(["drop","take"],function(n,t){Ct.prototype[n]=function(r){
|
||||
r=r===X?1:Gl(kc(r),0);var e=this.__filtered__&&!t?new Ct(this):this.clone();return e.__filtered__?e.__takeCount__=Hl(r,e.__takeCount__):e.__views__.push({size:Hl(r,Un),type:n+(e.__dir__<0?"Right":"")}),e},Ct.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==Rn||r==En;Ct.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:mi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){
|
||||
var r="take"+(t?"Right":"");Ct.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Ct.prototype[n]=function(){return this.__filtered__?new Ct(this):this[r](1)}}),Ct.prototype.compact=function(){return this.filter(La)},Ct.prototype.find=function(n){return this.filter(n).head()},Ct.prototype.findLast=function(n){return this.reverse().find(n)},Ct.prototype.invokeMap=uu(function(n,t){return"function"==typeof n?new Ct(this):this.map(function(r){
|
||||
return Ie(r,n,t)})}),Ct.prototype.reject=function(n){return this.filter(Uf(mi(n)))},Ct.prototype.slice=function(n,t){n=kc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Ct(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==X&&(t=kc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Ct.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ct.prototype.toArray=function(){return this.take(Un)},ue(Ct.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=Z[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);
|
||||
u&&(Z.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ct,c=o[0],l=f||bh(t),s=function(n){var t=u.apply(Z,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Ct(this);var g=n.apply(t,o);return g.__actions__.push({func:nf,args:[s],thisArg:X}),new Y(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){
|
||||
var t=_l[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);Z.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(bh(u)?u:[],n)}return this[r](function(r){return t.apply(bh(r)?r:[],n)})}}),ue(Ct.prototype,function(n,t){var r=Z[t];if(r){var e=r.name+"";bl.call(fs,e)||(fs[e]=[]),fs[e].push({name:t,func:r})}}),fs[Qu(X,vn).name]=[{name:"wrapper",func:X}],Ct.prototype.clone=$t,Ct.prototype.reverse=Yt,Ct.prototype.value=Qt,Z.prototype.at=Qs,
|
||||
Z.prototype.chain=tf,Z.prototype.commit=rf,Z.prototype.next=ef,Z.prototype.plant=of,Z.prototype.reverse=ff,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=cf,Z.prototype.first=Z.prototype.head,Ul&&(Z.prototype[Ul]=uf),Z},be=de();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(re._=be,define(function(){return be})):ue?((ue.exports=be)._=be,ee._=be):re._=be}).call(this);
|
||||
@@ -0,0 +1,5 @@
|
||||
import { isFunction } from './isFunction';
|
||||
export function isScheduler(value) {
|
||||
return value && isFunction(value.schedule);
|
||||
}
|
||||
//# sourceMappingURL=isScheduler.js.map
|
||||
@@ -0,0 +1,78 @@
|
||||
"use strict";
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.fromEvent = void 0;
|
||||
var innerFrom_1 = require("../observable/innerFrom");
|
||||
var Observable_1 = require("../Observable");
|
||||
var mergeMap_1 = require("../operators/mergeMap");
|
||||
var isArrayLike_1 = require("../util/isArrayLike");
|
||||
var isFunction_1 = require("../util/isFunction");
|
||||
var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs");
|
||||
var nodeEventEmitterMethods = ['addListener', 'removeListener'];
|
||||
var eventTargetMethods = ['addEventListener', 'removeEventListener'];
|
||||
var jqueryMethods = ['on', 'off'];
|
||||
function fromEvent(target, eventName, options, resultSelector) {
|
||||
if (isFunction_1.isFunction(options)) {
|
||||
resultSelector = options;
|
||||
options = undefined;
|
||||
}
|
||||
if (resultSelector) {
|
||||
return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector));
|
||||
}
|
||||
var _a = __read(isEventTarget(target)
|
||||
? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; })
|
||||
:
|
||||
isNodeStyleEventEmitter(target)
|
||||
? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))
|
||||
: isJQueryStyleEventEmitter(target)
|
||||
? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))
|
||||
: [], 2), add = _a[0], remove = _a[1];
|
||||
if (!add) {
|
||||
if (isArrayLike_1.isArrayLike(target)) {
|
||||
return mergeMap_1.mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom_1.innerFrom(target));
|
||||
}
|
||||
}
|
||||
if (!add) {
|
||||
throw new TypeError('Invalid event target');
|
||||
}
|
||||
return new Observable_1.Observable(function (subscriber) {
|
||||
var handler = function () {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
return subscriber.next(1 < args.length ? args : args[0]);
|
||||
};
|
||||
add(handler);
|
||||
return function () { return remove(handler); };
|
||||
});
|
||||
}
|
||||
exports.fromEvent = fromEvent;
|
||||
function toCommonHandlerRegistry(target, eventName) {
|
||||
return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; };
|
||||
}
|
||||
function isNodeStyleEventEmitter(target) {
|
||||
return isFunction_1.isFunction(target.addListener) && isFunction_1.isFunction(target.removeListener);
|
||||
}
|
||||
function isJQueryStyleEventEmitter(target) {
|
||||
return isFunction_1.isFunction(target.on) && isFunction_1.isFunction(target.off);
|
||||
}
|
||||
function isEventTarget(target) {
|
||||
return isFunction_1.isFunction(target.addEventListener) && isFunction_1.isFunction(target.removeEventListener);
|
||||
}
|
||||
//# sourceMappingURL=fromEvent.js.map
|
||||
@@ -0,0 +1,881 @@
|
||||
'use strict';
|
||||
|
||||
// The Resolver is currently experimental and might be exposed to users in the future.
|
||||
|
||||
const {
|
||||
VMError
|
||||
} = require('./bridge');
|
||||
const { VMScript } = require('./script');
|
||||
|
||||
// This should match. Note that '\', '%' are invalid characters
|
||||
// 1. name/.*
|
||||
// 2. @scope/name/.*
|
||||
const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^/\\%]+)(\/.*)?$/;
|
||||
|
||||
// See https://tc39.es/ecma262/#integer-index
|
||||
function isArrayIndex(key) {
|
||||
const keyNum = +key;
|
||||
if (`${keyNum}` !== key) return false;
|
||||
return keyNum >= 0 && keyNum < 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
class Resolver {
|
||||
|
||||
constructor(fs, builtinModules, globalPaths, hostRequire) {
|
||||
this.fs = fs;
|
||||
this.builtinModules = builtinModules;
|
||||
this.globalPaths = globalPaths;
|
||||
this.hostRequire = hostRequire;
|
||||
}
|
||||
|
||||
init(vm) {
|
||||
|
||||
}
|
||||
|
||||
pathResolve(path) {
|
||||
return this.fs.resolve(path);
|
||||
}
|
||||
|
||||
pathIsRelative(path) {
|
||||
if (path === '' || path[0] !== '.') return false;
|
||||
if (path.length === 1) return true;
|
||||
const idx = path[1] === '.' ? 2 : 1;
|
||||
if (path.length <= idx) return false;
|
||||
return this.fs.isSeparator(path[idx]);
|
||||
}
|
||||
|
||||
pathIsAbsolute(path) {
|
||||
return path !== '' && (this.fs.isSeparator(path[0]) || this.fs.isAbsolute(path));
|
||||
}
|
||||
|
||||
pathConcat(...paths) {
|
||||
return this.fs.join(...paths);
|
||||
}
|
||||
|
||||
pathBasename(path) {
|
||||
return this.fs.basename(path);
|
||||
}
|
||||
|
||||
pathDirname(path) {
|
||||
return this.fs.dirname(path);
|
||||
}
|
||||
|
||||
lookupPaths(mod, id) {
|
||||
if (typeof id === 'string') throw new Error('Id is not a string');
|
||||
if (this.pathIsRelative(id)) return [mod.path || '.'];
|
||||
return [...mod.paths, ...this.globalPaths];
|
||||
}
|
||||
|
||||
getBuiltinModulesList() {
|
||||
return Object.getOwnPropertyNames(this.builtinModules);
|
||||
}
|
||||
|
||||
loadBuiltinModule(vm, id) {
|
||||
const handler = this.builtinModules[id];
|
||||
return handler && handler(this, vm, id);
|
||||
}
|
||||
|
||||
loadJS(vm, mod, filename) {
|
||||
throw new VMError(`Access denied to require '${filename}'`, 'EDENIED');
|
||||
}
|
||||
|
||||
loadJSON(vm, mod, filename) {
|
||||
throw new VMError(`Access denied to require '${filename}'`, 'EDENIED');
|
||||
}
|
||||
|
||||
loadNode(vm, mod, filename) {
|
||||
throw new VMError(`Access denied to require '${filename}'`, 'EDENIED');
|
||||
}
|
||||
|
||||
registerModule(mod, filename, path, parent, direct) {
|
||||
|
||||
}
|
||||
|
||||
resolve(mod, x, options, ext, direct) {
|
||||
if (typeof x !== 'string') throw new Error('Id is not a string');
|
||||
|
||||
if (x.startsWith('node:') || this.builtinModules[x]) {
|
||||
// a. return the core module
|
||||
// b. STOP
|
||||
return x;
|
||||
}
|
||||
|
||||
return this.resolveFull(mod, x, options, ext, direct);
|
||||
}
|
||||
|
||||
resolveFull(mod, x, options, ext, direct) {
|
||||
// 7. THROW "not found"
|
||||
throw new VMError(`Cannot find module '${x}'`, 'ENOTFOUND');
|
||||
}
|
||||
|
||||
// NODE_MODULES_PATHS(START)
|
||||
genLookupPaths(path) {
|
||||
// 1. let PARTS = path split(START)
|
||||
// 2. let I = count of PARTS - 1
|
||||
// 3. let DIRS = []
|
||||
const dirs = [];
|
||||
// 4. while I >= 0,
|
||||
while (true) {
|
||||
const name = this.pathBasename(path);
|
||||
// a. if PARTS[I] = "node_modules" CONTINUE
|
||||
if (name !== 'node_modules') {
|
||||
// b. DIR = path join(PARTS[0 .. I] + "node_modules")
|
||||
// c. DIRS = DIR + DIRS // Note: this seems wrong. Should be DIRS + DIR
|
||||
dirs.push(this.pathConcat(path, 'node_modules'));
|
||||
}
|
||||
const dir = this.pathDirname(path);
|
||||
if (dir == path) break;
|
||||
// d. let I = I - 1
|
||||
path = dir;
|
||||
}
|
||||
|
||||
return dirs;
|
||||
// This is done later on
|
||||
// 5. return DIRS + GLOBAL_FOLDERS
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class DefaultResolver extends Resolver {
|
||||
|
||||
constructor(fs, builtinModules, checkPath, globalPaths, pathContext, customResolver, hostRequire, compiler, strict) {
|
||||
super(fs, builtinModules, globalPaths, hostRequire);
|
||||
this.checkPath = checkPath;
|
||||
this.pathContext = pathContext;
|
||||
this.customResolver = customResolver;
|
||||
this.compiler = compiler;
|
||||
this.strict = strict;
|
||||
this.packageCache = {__proto__: null};
|
||||
this.scriptCache = {__proto__: null};
|
||||
}
|
||||
|
||||
isPathAllowed(path) {
|
||||
return this.checkPath(path);
|
||||
}
|
||||
|
||||
pathTestIsDirectory(path) {
|
||||
try {
|
||||
const stat = this.fs.statSync(path, {__proto__: null, throwIfNoEntry: false});
|
||||
return stat && stat.isDirectory();
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
pathTestIsFile(path) {
|
||||
try {
|
||||
const stat = this.fs.statSync(path, {__proto__: null, throwIfNoEntry: false});
|
||||
return stat && stat.isFile();
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
readFile(path) {
|
||||
return this.fs.readFileSync(path, {encoding: 'utf8'});
|
||||
}
|
||||
|
||||
readFileWhenExists(path) {
|
||||
return this.pathTestIsFile(path) ? this.readFile(path) : undefined;
|
||||
}
|
||||
|
||||
readScript(filename) {
|
||||
let script = this.scriptCache[filename];
|
||||
if (!script) {
|
||||
script = new VMScript(this.readFile(filename), {filename, compiler: this.compiler});
|
||||
this.scriptCache[filename] = script;
|
||||
}
|
||||
return script;
|
||||
}
|
||||
|
||||
checkAccess(mod, filename) {
|
||||
if (!this.isPathAllowed(filename)) {
|
||||
throw new VMError(`Module '${filename}' is not allowed to be required. The path is outside the border!`, 'EDENIED');
|
||||
}
|
||||
}
|
||||
|
||||
loadJS(vm, mod, filename) {
|
||||
filename = this.pathResolve(filename);
|
||||
this.checkAccess(mod, filename);
|
||||
if (this.pathContext(filename, 'js') === 'sandbox') {
|
||||
const script = this.readScript(filename);
|
||||
vm.run(script, {filename, strict: this.strict, module: mod, wrapper: 'none', dirname: mod.path});
|
||||
} else {
|
||||
const m = this.hostRequire(filename);
|
||||
mod.exports = vm.readonly(m);
|
||||
}
|
||||
}
|
||||
|
||||
loadJSON(vm, mod, filename) {
|
||||
filename = this.pathResolve(filename);
|
||||
this.checkAccess(mod, filename);
|
||||
const json = this.readFile(filename);
|
||||
mod.exports = vm._jsonParse(json);
|
||||
}
|
||||
|
||||
loadNode(vm, mod, filename) {
|
||||
filename = this.pathResolve(filename);
|
||||
this.checkAccess(mod, filename);
|
||||
if (this.pathContext(filename, 'node') === 'sandbox') throw new VMError('Native modules can be required only with context set to \'host\'.');
|
||||
const m = this.hostRequire(filename);
|
||||
mod.exports = vm.readonly(m);
|
||||
}
|
||||
|
||||
// require(X) from module at path Y
|
||||
resolveFull(mod, x, options, ext, direct) {
|
||||
// Note: core module handled by caller
|
||||
|
||||
const extList = Object.getOwnPropertyNames(ext);
|
||||
const path = mod.path || '.';
|
||||
|
||||
// 5. LOAD_PACKAGE_SELF(X, dirname(Y))
|
||||
let f = this.loadPackageSelf(x, path, extList);
|
||||
if (f) return f;
|
||||
|
||||
// 4. If X begins with '#'
|
||||
if (x[0] === '#') {
|
||||
// a. LOAD_PACKAGE_IMPORTS(X, dirname(Y))
|
||||
f = this.loadPackageImports(x, path, extList);
|
||||
if (f) return f;
|
||||
}
|
||||
|
||||
// 2. If X begins with '/'
|
||||
if (this.pathIsAbsolute(x)) {
|
||||
// a. set Y to be the filesystem root
|
||||
f = this.loadAsFileOrDirectory(x, extList);
|
||||
if (f) return f;
|
||||
|
||||
// c. THROW "not found"
|
||||
throw new VMError(`Cannot find module '${x}'`, 'ENOTFOUND');
|
||||
|
||||
// 3. If X begins with './' or '/' or '../'
|
||||
} else if (this.pathIsRelative(x)) {
|
||||
if (typeof options === 'object' && options !== null) {
|
||||
const paths = options.paths;
|
||||
if (Array.isArray(paths)) {
|
||||
for (let i = 0; i < paths.length; i++) {
|
||||
// a. LOAD_AS_FILE(Y + X)
|
||||
// b. LOAD_AS_DIRECTORY(Y + X)
|
||||
f = this.loadAsFileOrDirectory(this.pathConcat(paths[i], x), extList);
|
||||
if (f) return f;
|
||||
}
|
||||
} else if (paths === undefined) {
|
||||
// a. LOAD_AS_FILE(Y + X)
|
||||
// b. LOAD_AS_DIRECTORY(Y + X)
|
||||
f = this.loadAsFileOrDirectory(this.pathConcat(path, x), extList);
|
||||
if (f) return f;
|
||||
} else {
|
||||
throw new VMError('Invalid options.paths option.');
|
||||
}
|
||||
} else {
|
||||
// a. LOAD_AS_FILE(Y + X)
|
||||
// b. LOAD_AS_DIRECTORY(Y + X)
|
||||
f = this.loadAsFileOrDirectory(this.pathConcat(path, x), extList);
|
||||
if (f) return f;
|
||||
}
|
||||
|
||||
// c. THROW "not found"
|
||||
throw new VMError(`Cannot find module '${x}'`, 'ENOTFOUND');
|
||||
}
|
||||
|
||||
let dirs;
|
||||
if (typeof options === 'object' && options !== null) {
|
||||
const paths = options.paths;
|
||||
if (Array.isArray(paths)) {
|
||||
dirs = [];
|
||||
|
||||
for (let i = 0; i < paths.length; i++) {
|
||||
const lookups = this.genLookupPaths(paths[i]);
|
||||
for (let j = 0; j < lookups.length; j++) {
|
||||
if (!dirs.includes(lookups[j])) dirs.push(lookups[j]);
|
||||
}
|
||||
if (i === 0) {
|
||||
const globalPaths = this.globalPaths;
|
||||
for (let j = 0; j < globalPaths.length; j++) {
|
||||
if (!dirs.includes(globalPaths[j])) dirs.push(globalPaths[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (paths === undefined) {
|
||||
dirs = [...mod.paths, ...this.globalPaths];
|
||||
} else {
|
||||
throw new VMError('Invalid options.paths option.');
|
||||
}
|
||||
} else {
|
||||
dirs = [...mod.paths, ...this.globalPaths];
|
||||
}
|
||||
|
||||
// 6. LOAD_NODE_MODULES(X, dirname(Y))
|
||||
f = this.loadNodeModules(x, dirs, extList);
|
||||
if (f) return f;
|
||||
|
||||
f = this.customResolver(this, x, path, extList);
|
||||
if (f) return f;
|
||||
|
||||
return super.resolveFull(mod, x, options, ext, direct);
|
||||
}
|
||||
|
||||
loadAsFileOrDirectory(x, extList) {
|
||||
// a. LOAD_AS_FILE(X)
|
||||
const f = this.loadAsFile(x, extList);
|
||||
if (f) return f;
|
||||
// b. LOAD_AS_DIRECTORY(X)
|
||||
return this.loadAsDirectory(x, extList);
|
||||
}
|
||||
|
||||
tryFile(x) {
|
||||
x = this.pathResolve(x);
|
||||
return this.isPathAllowed(x) && this.pathTestIsFile(x) ? x : undefined;
|
||||
}
|
||||
|
||||
tryWithExtension(x, extList) {
|
||||
for (let i = 0; i < extList.length; i++) {
|
||||
const ext = extList[i];
|
||||
if (ext !== this.pathBasename(ext)) continue;
|
||||
const f = this.tryFile(x + ext);
|
||||
if (f) return f;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
readPackage(path) {
|
||||
const packagePath = this.pathResolve(this.pathConcat(path, 'package.json'));
|
||||
|
||||
const cache = this.packageCache[packagePath];
|
||||
if (cache !== undefined) return cache;
|
||||
|
||||
if (!this.isPathAllowed(packagePath)) return undefined;
|
||||
const content = this.readFileWhenExists(packagePath);
|
||||
if (!content) {
|
||||
this.packageCache[packagePath] = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
let parsed;
|
||||
try {
|
||||
parsed = JSON.parse(content);
|
||||
} catch (e) {
|
||||
e.path = packagePath;
|
||||
e.message = 'Error parsing ' + packagePath + ': ' + e.message;
|
||||
throw e;
|
||||
}
|
||||
|
||||
const filtered = {
|
||||
name: parsed.name,
|
||||
main: parsed.main,
|
||||
exports: parsed.exports,
|
||||
imports: parsed.imports,
|
||||
type: parsed.type
|
||||
};
|
||||
this.packageCache[packagePath] = filtered;
|
||||
return filtered;
|
||||
}
|
||||
|
||||
readPackageScope(path) {
|
||||
while (true) {
|
||||
const dir = this.pathDirname(path);
|
||||
if (dir === path) break;
|
||||
const basename = this.pathBasename(dir);
|
||||
if (basename === 'node_modules') break;
|
||||
const pack = this.readPackage(dir);
|
||||
if (pack) return {data: pack, scope: dir};
|
||||
path = dir;
|
||||
}
|
||||
return {data: undefined, scope: undefined};
|
||||
}
|
||||
|
||||
// LOAD_AS_FILE(X)
|
||||
loadAsFile(x, extList) {
|
||||
// 1. If X is a file, load X as its file extension format. STOP
|
||||
const f = this.tryFile(x);
|
||||
if (f) return f;
|
||||
// 2. If X.js is a file, load X.js as JavaScript text. STOP
|
||||
// 3. If X.json is a file, parse X.json to a JavaScript Object. STOP
|
||||
// 4. If X.node is a file, load X.node as binary addon. STOP
|
||||
return this.tryWithExtension(x, extList);
|
||||
}
|
||||
|
||||
// LOAD_INDEX(X)
|
||||
loadIndex(x, extList) {
|
||||
// 1. If X/index.js is a file, load X/index.js as JavaScript text. STOP
|
||||
// 2. If X/index.json is a file, parse X/index.json to a JavaScript object. STOP
|
||||
// 3. If X/index.node is a file, load X/index.node as binary addon. STOP
|
||||
return this.tryWithExtension(this.pathConcat(x, 'index'), extList);
|
||||
}
|
||||
|
||||
// LOAD_AS_DIRECTORY(X)
|
||||
loadAsPackage(x, pack, extList) {
|
||||
// 1. If X/package.json is a file,
|
||||
// already done.
|
||||
if (pack) {
|
||||
// a. Parse X/package.json, and look for "main" field.
|
||||
// b. If "main" is a falsy value, GOTO 2.
|
||||
if (typeof pack.main === 'string') {
|
||||
// c. let M = X + (json main field)
|
||||
const m = this.pathConcat(x, pack.main);
|
||||
// d. LOAD_AS_FILE(M)
|
||||
let f = this.loadAsFile(m, extList);
|
||||
if (f) return f;
|
||||
// e. LOAD_INDEX(M)
|
||||
f = this.loadIndex(m, extList);
|
||||
if (f) return f;
|
||||
// f. LOAD_INDEX(X) DEPRECATED
|
||||
f = this.loadIndex(x, extList);
|
||||
if (f) return f;
|
||||
// g. THROW "not found"
|
||||
throw new VMError(`Cannot find module '${x}'`, 'ENOTFOUND');
|
||||
}
|
||||
}
|
||||
|
||||
// 2. LOAD_INDEX(X)
|
||||
return this.loadIndex(x, extList);
|
||||
}
|
||||
|
||||
// LOAD_AS_DIRECTORY(X)
|
||||
loadAsDirectory(x, extList) {
|
||||
// 1. If X/package.json is a file,
|
||||
const pack = this.readPackage(x);
|
||||
return this.loadAsPackage(x, pack, extList);
|
||||
}
|
||||
|
||||
// LOAD_NODE_MODULES(X, START)
|
||||
loadNodeModules(x, dirs, extList) {
|
||||
// 1. let DIRS = NODE_MODULES_PATHS(START)
|
||||
// This step is already done.
|
||||
|
||||
// 2. for each DIR in DIRS:
|
||||
for (let i = 0; i < dirs.length; i++) {
|
||||
const dir = dirs[i];
|
||||
// a. LOAD_PACKAGE_EXPORTS(X, DIR)
|
||||
let f = this.loadPackageExports(x, dir, extList);
|
||||
if (f) return f;
|
||||
// b. LOAD_AS_FILE(DIR/X)
|
||||
f = this.loadAsFile(dir + '/' + x, extList);
|
||||
if (f) return f;
|
||||
// c. LOAD_AS_DIRECTORY(DIR/X)
|
||||
f = this.loadAsDirectory(dir + '/' + x, extList);
|
||||
if (f) return f;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// LOAD_PACKAGE_IMPORTS(X, DIR)
|
||||
loadPackageImports(x, dir, extList) {
|
||||
// 1. Find the closest package scope SCOPE to DIR.
|
||||
const {data, scope} = this.readPackageScope(dir);
|
||||
// 2. If no scope was found, return.
|
||||
if (!data) return undefined;
|
||||
// 3. If the SCOPE/package.json "imports" is null or undefined, return.
|
||||
if (typeof data.imports !== 'object' || data.imports === null || Array.isArray(data.imports)) return undefined;
|
||||
// 4. let MATCH = PACKAGE_IMPORTS_RESOLVE(X, pathToFileURL(SCOPE),
|
||||
// ["node", "require"]) defined in the ESM resolver.
|
||||
|
||||
// PACKAGE_IMPORTS_RESOLVE(specifier, parentURL, conditions)
|
||||
// 1. Assert: specifier begins with "#".
|
||||
// 2. If specifier is exactly equal to "#" or starts with "#/", then
|
||||
if (x === '#' || x.startsWith('#/')) {
|
||||
// a. Throw an Invalid Module Specifier error.
|
||||
throw new VMError(`Invalid module specifier '${x}'`, 'ERR_INVALID_MODULE_SPECIFIER');
|
||||
}
|
||||
// 3. Let packageURL be the result of LOOKUP_PACKAGE_SCOPE(parentURL).
|
||||
// Note: packageURL === parentURL === scope
|
||||
// 4. If packageURL is not null, then
|
||||
// Always true
|
||||
// a. Let pjson be the result of READ_PACKAGE_JSON(packageURL).
|
||||
// pjson === data
|
||||
// b. If pjson.imports is a non-null Object, then
|
||||
// Already tested
|
||||
// x. Let resolved be the result of PACKAGE_IMPORTS_EXPORTS_RESOLVE( specifier, pjson.imports, packageURL, true, conditions).
|
||||
const match = this.packageImportsExportsResolve(x, data.imports, scope, true, ['node', 'require'], extList);
|
||||
// y. If resolved is not null or undefined, return resolved.
|
||||
if (!match) {
|
||||
// 5. Throw a Package Import Not Defined error.
|
||||
throw new VMError(`Package import not defined for '${x}'`, 'ERR_PACKAGE_IMPORT_NOT_DEFINED');
|
||||
}
|
||||
// END PACKAGE_IMPORTS_RESOLVE
|
||||
|
||||
// 5. RESOLVE_ESM_MATCH(MATCH).
|
||||
return this.resolveEsmMatch(match, x, extList);
|
||||
}
|
||||
|
||||
// LOAD_PACKAGE_EXPORTS(X, DIR)
|
||||
loadPackageExports(x, dir, extList) {
|
||||
// 1. Try to interpret X as a combination of NAME and SUBPATH where the name
|
||||
// may have a @scope/ prefix and the subpath begins with a slash (`/`).
|
||||
const res = x.match(EXPORTS_PATTERN);
|
||||
// 2. If X does not match this pattern or DIR/NAME/package.json is not a file,
|
||||
// return.
|
||||
if (!res) return undefined;
|
||||
const scope = this.pathConcat(dir, res[1]);
|
||||
const pack = this.readPackage(scope);
|
||||
if (!pack) return undefined;
|
||||
// 3. Parse DIR/NAME/package.json, and look for "exports" field.
|
||||
// 4. If "exports" is null or undefined, return.
|
||||
if (!pack.exports) return undefined;
|
||||
// 5. let MATCH = PACKAGE_EXPORTS_RESOLVE(pathToFileURL(DIR/NAME), "." + SUBPATH,
|
||||
// `package.json` "exports", ["node", "require"]) defined in the ESM resolver.
|
||||
const match = this.packageExportsResolve(scope, '.' + (res[2] || ''), pack.exports, ['node', 'require'], extList);
|
||||
// 6. RESOLVE_ESM_MATCH(MATCH)
|
||||
return this.resolveEsmMatch(match, x, extList);
|
||||
}
|
||||
|
||||
// LOAD_PACKAGE_SELF(X, DIR)
|
||||
loadPackageSelf(x, dir, extList) {
|
||||
// 1. Find the closest package scope SCOPE to DIR.
|
||||
const {data, scope} = this.readPackageScope(dir);
|
||||
// 2. If no scope was found, return.
|
||||
if (!data) return undefined;
|
||||
// 3. If the SCOPE/package.json "exports" is null or undefined, return.
|
||||
if (!data.exports) return undefined;
|
||||
// 4. If the SCOPE/package.json "name" is not the first segment of X, return.
|
||||
if (x !== data.name && !x.startsWith(data.name + '/')) return undefined;
|
||||
// 5. let MATCH = PACKAGE_EXPORTS_RESOLVE(pathToFileURL(SCOPE),
|
||||
// "." + X.slice("name".length), `package.json` "exports", ["node", "require"])
|
||||
// defined in the ESM resolver.
|
||||
const match = this.packageExportsResolve(scope, '.' + x.slice(data.name.length), data.exports, ['node', 'require'], extList);
|
||||
// 6. RESOLVE_ESM_MATCH(MATCH)
|
||||
return this.resolveEsmMatch(match, x, extList);
|
||||
}
|
||||
|
||||
// RESOLVE_ESM_MATCH(MATCH)
|
||||
resolveEsmMatch(match, x, extList) {
|
||||
// 1. let { RESOLVED, EXACT } = MATCH
|
||||
const resolved = match;
|
||||
const exact = true;
|
||||
// 2. let RESOLVED_PATH = fileURLToPath(RESOLVED)
|
||||
const resolvedPath = resolved;
|
||||
let f;
|
||||
// 3. If EXACT is true,
|
||||
if (exact) {
|
||||
// a. If the file at RESOLVED_PATH exists, load RESOLVED_PATH as its extension
|
||||
// format. STOP
|
||||
f = this.tryFile(resolvedPath);
|
||||
// 4. Otherwise, if EXACT is false,
|
||||
} else {
|
||||
// a. LOAD_AS_FILE(RESOLVED_PATH)
|
||||
// b. LOAD_AS_DIRECTORY(RESOLVED_PATH)
|
||||
f = this.loadAsFileOrDirectory(resolvedPath, extList);
|
||||
}
|
||||
if (f) return f;
|
||||
// 5. THROW "not found"
|
||||
throw new VMError(`Cannot find module '${x}'`, 'ENOTFOUND');
|
||||
}
|
||||
|
||||
// PACKAGE_EXPORTS_RESOLVE(packageURL, subpath, exports, conditions)
|
||||
packageExportsResolve(packageURL, subpath, rexports, conditions, extList) {
|
||||
// 1. If exports is an Object with both a key starting with "." and a key not starting with ".", throw an Invalid Package Configuration error.
|
||||
let hasDots = false;
|
||||
if (typeof rexports === 'object' && !Array.isArray(rexports)) {
|
||||
const keys = Object.getOwnPropertyNames(rexports);
|
||||
if (keys.length > 0) {
|
||||
hasDots = keys[0][0] === '.';
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
if (hasDots !== (keys[i][0] === '.')) {
|
||||
throw new VMError('Invalid package configuration', 'ERR_INVALID_PACKAGE_CONFIGURATION');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 2. If subpath is equal to ".", then
|
||||
if (subpath === '.') {
|
||||
// a. Let mainExport be undefined.
|
||||
let mainExport = undefined;
|
||||
// b. If exports is a String or Array, or an Object containing no keys starting with ".", then
|
||||
if (typeof rexports === 'string' || Array.isArray(rexports) || !hasDots) {
|
||||
// x. Set mainExport to exports.
|
||||
mainExport = rexports;
|
||||
// c. Otherwise if exports is an Object containing a "." property, then
|
||||
} else if (hasDots) {
|
||||
// x. Set mainExport to exports["."].
|
||||
mainExport = rexports['.'];
|
||||
}
|
||||
// d. If mainExport is not undefined, then
|
||||
if (mainExport) {
|
||||
// x. Let resolved be the result of PACKAGE_TARGET_RESOLVE( packageURL, mainExport, "", false, false, conditions).
|
||||
const resolved = this.packageTargetResolve(packageURL, mainExport, '', false, false, conditions, extList);
|
||||
// y. If resolved is not null or undefined, return resolved.
|
||||
if (resolved) return resolved;
|
||||
}
|
||||
// 3. Otherwise, if exports is an Object and all keys of exports start with ".", then
|
||||
} else if (hasDots) {
|
||||
// a. Let matchKey be the string "./" concatenated with subpath.
|
||||
// Note: Here subpath starts already with './'
|
||||
// b. Let resolved be the result of PACKAGE_IMPORTS_EXPORTS_RESOLVE( matchKey, exports, packageURL, false, conditions).
|
||||
const resolved = this.packageImportsExportsResolve(subpath, rexports, packageURL, false, conditions, extList);
|
||||
// c. If resolved is not null or undefined, return resolved.
|
||||
if (resolved) return resolved;
|
||||
}
|
||||
// 4. Throw a Package Path Not Exported error.
|
||||
throw new VMError(`Package path '${subpath}' is not exported`, 'ERR_PACKAGE_PATH_NOT_EXPORTED');
|
||||
}
|
||||
|
||||
// PACKAGE_IMPORTS_EXPORTS_RESOLVE(matchKey, matchObj, packageURL, isImports, conditions)
|
||||
packageImportsExportsResolve(matchKey, matchObj, packageURL, isImports, conditions, extList) {
|
||||
// 1. If matchKey is a key of matchObj and does not contain "*", then
|
||||
let target = matchObj[matchKey];
|
||||
if (target && matchKey.indexOf('*') === -1) {
|
||||
// a. Let target be the value of matchObj[matchKey].
|
||||
// b. Return the result of PACKAGE_TARGET_RESOLVE(packageURL, target, "", false, isImports, conditions).
|
||||
return this.packageTargetResolve(packageURL, target, '', false, isImports, conditions, extList);
|
||||
}
|
||||
// 2. Let expansionKeys be the list of keys of matchObj containing only a single "*",
|
||||
// sorted by the sorting function PATTERN_KEY_COMPARE which orders in descending order of specificity.
|
||||
const expansionKeys = Object.getOwnPropertyNames(matchObj);
|
||||
let bestKey = '';
|
||||
let bestSubpath;
|
||||
// 3. For each key expansionKey in expansionKeys, do
|
||||
for (let i = 0; i < expansionKeys.length; i++) {
|
||||
const expansionKey = expansionKeys[i];
|
||||
if (matchKey.length < expansionKey.length) continue;
|
||||
// a. Let patternBase be the substring of expansionKey up to but excluding the first "*" character.
|
||||
const star = expansionKey.indexOf('*');
|
||||
if (star === -1) continue; // Note: expansionKeys was not filtered
|
||||
const patternBase = expansionKey.slice(0, star);
|
||||
// b. If matchKey starts with but is not equal to patternBase, then
|
||||
if (matchKey.startsWith(patternBase) && expansionKey.indexOf('*', star + 1) === -1) { // Note: expansionKeys was not filtered
|
||||
// 1. Let patternTrailer be the substring of expansionKey from the index after the first "*" character.
|
||||
const patternTrailer = expansionKey.slice(star + 1);
|
||||
// 2. If patternTrailer has zero length, or if matchKey ends with patternTrailer and the length of matchKey is greater than or
|
||||
// equal to the length of expansionKey, then
|
||||
if (matchKey.endsWith(patternTrailer) && this.patternKeyCompare(bestKey, expansionKey) === 1) { // Note: expansionKeys was not sorted
|
||||
// a. Let target be the value of matchObj[expansionKey].
|
||||
target = matchObj[expansionKey];
|
||||
// b. Let subpath be the substring of matchKey starting at the index of the length of patternBase up to the length of
|
||||
// matchKey minus the length of patternTrailer.
|
||||
bestKey = expansionKey;
|
||||
bestSubpath = matchKey.slice(patternBase.length, matchKey.length - patternTrailer.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (bestSubpath) { // Note: expansionKeys was not sorted
|
||||
// c. Return the result of PACKAGE_TARGET_RESOLVE(packageURL, target, subpath, true, isImports, conditions).
|
||||
return this.packageTargetResolve(packageURL, target, bestSubpath, true, isImports, conditions, extList);
|
||||
}
|
||||
// 4. Return null.
|
||||
return null;
|
||||
}
|
||||
|
||||
// PATTERN_KEY_COMPARE(keyA, keyB)
|
||||
patternKeyCompare(keyA, keyB) {
|
||||
// 1. Assert: keyA ends with "/" or contains only a single "*".
|
||||
// 2. Assert: keyB ends with "/" or contains only a single "*".
|
||||
// 3. Let baseLengthA be the index of "*" in keyA plus one, if keyA contains "*", or the length of keyA otherwise.
|
||||
const baseAStar = keyA.indexOf('*');
|
||||
const baseLengthA = baseAStar === -1 ? keyA.length : baseAStar + 1;
|
||||
// 4. Let baseLengthB be the index of "*" in keyB plus one, if keyB contains "*", or the length of keyB otherwise.
|
||||
const baseBStar = keyB.indexOf('*');
|
||||
const baseLengthB = baseBStar === -1 ? keyB.length : baseBStar + 1;
|
||||
// 5. If baseLengthA is greater than baseLengthB, return -1.
|
||||
if (baseLengthA > baseLengthB) return -1;
|
||||
// 6. If baseLengthB is greater than baseLengthA, return 1.
|
||||
if (baseLengthB > baseLengthA) return 1;
|
||||
// 7. If keyA does not contain "*", return 1.
|
||||
if (baseAStar === -1) return 1;
|
||||
// 8. If keyB does not contain "*", return -1.
|
||||
if (baseBStar === -1) return -1;
|
||||
// 9. If the length of keyA is greater than the length of keyB, return -1.
|
||||
if (keyA.length > keyB.length) return -1;
|
||||
// 10. If the length of keyB is greater than the length of keyA, return 1.
|
||||
if (keyB.length > keyA.length) return 1;
|
||||
// 11. Return 0.
|
||||
return 0;
|
||||
}
|
||||
|
||||
// PACKAGE_TARGET_RESOLVE(packageURL, target, subpath, pattern, internal, conditions)
|
||||
packageTargetResolve(packageURL, target, subpath, pattern, internal, conditions, extList) {
|
||||
// 1. If target is a String, then
|
||||
if (typeof target === 'string') {
|
||||
// a. If pattern is false, subpath has non-zero length and target does not end with "/", throw an Invalid Module Specifier error.
|
||||
if (!pattern && subpath.length > 0 && !target.endsWith('/')) {
|
||||
throw new VMError(`Invalid package specifier '${subpath}'`, 'ERR_INVALID_MODULE_SPECIFIER');
|
||||
}
|
||||
// b. If target does not start with "./", then
|
||||
if (!target.startsWith('./')) {
|
||||
// 1. If internal is true and target does not start with "../" or "/" and is not a valid URL, then
|
||||
if (internal && !target.startsWith('../') && !target.startsWith('/')) {
|
||||
let isURL = false;
|
||||
try {
|
||||
// eslint-disable-next-line no-new
|
||||
new URL(target);
|
||||
isURL = true;
|
||||
} catch (e) {}
|
||||
if (!isURL) {
|
||||
// a. If pattern is true, then
|
||||
if (pattern) {
|
||||
// 1. Return PACKAGE_RESOLVE(target with every instance of "*" replaced by subpath, packageURL + "/").
|
||||
return this.packageResolve(target.replace(/\*/g, subpath), packageURL, conditions, extList);
|
||||
}
|
||||
// b. Return PACKAGE_RESOLVE(target + subpath, packageURL + "/").
|
||||
return this.packageResolve(this.pathConcat(target, subpath), packageURL, conditions, extList);
|
||||
}
|
||||
}
|
||||
// Otherwise, throw an Invalid Package Target error.
|
||||
throw new VMError(`Invalid package target for '${subpath}'`, 'ERR_INVALID_PACKAGE_TARGET');
|
||||
}
|
||||
target = decodeURI(target);
|
||||
// c. If target split on "/" or "\" contains any ".", ".." or "node_modules" segments after the first segment, case insensitive
|
||||
// and including percent encoded variants, throw an Invalid Package Target error.
|
||||
if (target.split(/[/\\]/).slice(1).findIndex(x => x === '.' || x === '..' || x.toLowerCase() === 'node_modules') !== -1) {
|
||||
throw new VMError(`Invalid package target for '${subpath}'`, 'ERR_INVALID_PACKAGE_TARGET');
|
||||
}
|
||||
// d. Let resolvedTarget be the URL resolution of the concatenation of packageURL and target.
|
||||
const resolvedTarget = this.pathConcat(packageURL, target);
|
||||
// e. Assert: resolvedTarget is contained in packageURL.
|
||||
subpath = decodeURI(subpath);
|
||||
// f. If subpath split on "/" or "\" contains any ".", ".." or "node_modules" segments, case insensitive and including percent
|
||||
// encoded variants, throw an Invalid Module Specifier error.
|
||||
if (subpath.split(/[/\\]/).findIndex(x => x === '.' || x === '..' || x.toLowerCase() === 'node_modules') !== -1) {
|
||||
throw new VMError(`Invalid package specifier '${subpath}'`, 'ERR_INVALID_MODULE_SPECIFIER');
|
||||
}
|
||||
// g. If pattern is true, then
|
||||
if (pattern) {
|
||||
// 1. Return the URL resolution of resolvedTarget with every instance of "*" replaced with subpath.
|
||||
return resolvedTarget.replace(/\*/g, subpath);
|
||||
}
|
||||
// h. Otherwise,
|
||||
// 1. Return the URL resolution of the concatenation of subpath and resolvedTarget.
|
||||
return this.pathConcat(resolvedTarget, subpath);
|
||||
// 3. Otherwise, if target is an Array, then
|
||||
} else if (Array.isArray(target)) {
|
||||
// a. If target.length is zero, return null.
|
||||
if (target.length === 0) return null;
|
||||
let lastException = undefined;
|
||||
// b. For each item targetValue in target, do
|
||||
for (let i = 0; i < target.length; i++) {
|
||||
const targetValue = target[i];
|
||||
// 1. Let resolved be the result of PACKAGE_TARGET_RESOLVE( packageURL, targetValue, subpath, pattern, internal, conditions),
|
||||
// continuing the loop on any Invalid Package Target error.
|
||||
let resolved;
|
||||
try {
|
||||
resolved = this.packageTargetResolve(packageURL, targetValue, subpath, pattern, internal, conditions, extList);
|
||||
} catch (e) {
|
||||
if (e.code !== 'ERR_INVALID_PACKAGE_TARGET') throw e;
|
||||
lastException = e;
|
||||
continue;
|
||||
}
|
||||
// 2. If resolved is undefined, continue the loop.
|
||||
// 3. Return resolved.
|
||||
if (resolved !== undefined) return resolved;
|
||||
if (resolved === null) {
|
||||
lastException = null;
|
||||
}
|
||||
}
|
||||
// c. Return or throw the last fallback resolution null return or error.
|
||||
if (lastException === undefined || lastException === null) return lastException;
|
||||
throw lastException;
|
||||
// 2. Otherwise, if target is a non-null Object, then
|
||||
} else if (typeof target === 'object' && target !== null) {
|
||||
const keys = Object.getOwnPropertyNames(target);
|
||||
// a. If exports contains any index property keys, as defined in ECMA-262 6.1.7 Array Index, throw an Invalid Package Configuration error.
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
const p = keys[i];
|
||||
if (isArrayIndex(p)) throw new VMError(`Invalid package configuration for '${subpath}'`, 'ERR_INVALID_PACKAGE_CONFIGURATION');
|
||||
}
|
||||
// b. For each property p of target, in object insertion order as,
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
const p = keys[i];
|
||||
// 1. If p equals "default" or conditions contains an entry for p, then
|
||||
if (p === 'default' || conditions.includes(p)) {
|
||||
// a. Let targetValue be the value of the p property in target.
|
||||
const targetValue = target[p];
|
||||
// b. Let resolved be the result of PACKAGE_TARGET_RESOLVE( packageURL, targetValue, subpath, pattern, internal, conditions).
|
||||
const resolved = this.packageTargetResolve(packageURL, targetValue, subpath, pattern, internal, conditions, extList);
|
||||
// c. If resolved is equal to undefined, continue the loop.
|
||||
// d. Return resolved.
|
||||
if (resolved !== undefined) return resolved;
|
||||
}
|
||||
}
|
||||
// c. Return undefined.
|
||||
return undefined;
|
||||
// 4. Otherwise, if target is null, return null.
|
||||
} else if (target == null) {
|
||||
return null;
|
||||
}
|
||||
// Otherwise throw an Invalid Package Target error.
|
||||
throw new VMError(`Invalid package target for '${subpath}'`, 'ERR_INVALID_PACKAGE_TARGET');
|
||||
}
|
||||
|
||||
// PACKAGE_RESOLVE(packageSpecifier, parentURL)
|
||||
packageResolve(packageSpecifier, parentURL, conditions, extList) {
|
||||
// 1. Let packageName be undefined.
|
||||
let packageName = undefined;
|
||||
// 2. If packageSpecifier is an empty string, then
|
||||
if (packageSpecifier === '') {
|
||||
// a. Throw an Invalid Module Specifier error.
|
||||
throw new VMError(`Invalid package specifier '${packageSpecifier}'`, 'ERR_INVALID_MODULE_SPECIFIER');
|
||||
}
|
||||
// 3. If packageSpecifier is a Node.js builtin module name, then
|
||||
if (this.builtinModules[packageSpecifier]) {
|
||||
// a. Return the string "node:" concatenated with packageSpecifier.
|
||||
return 'node:' + packageSpecifier;
|
||||
}
|
||||
let idx = packageSpecifier.indexOf('/');
|
||||
// 5. Otherwise,
|
||||
if (packageSpecifier[0] === '@') {
|
||||
// a. If packageSpecifier does not contain a "/" separator, then
|
||||
if (idx === -1) {
|
||||
// x. Throw an Invalid Module Specifier error.
|
||||
throw new VMError(`Invalid package specifier '${packageSpecifier}'`, 'ERR_INVALID_MODULE_SPECIFIER');
|
||||
}
|
||||
// b. Set packageName to the substring of packageSpecifier until the second "/" separator or the end of the string.
|
||||
idx = packageSpecifier.indexOf('/', idx + 1);
|
||||
}
|
||||
// else
|
||||
// 4. If packageSpecifier does not start with "@", then
|
||||
// a. Set packageName to the substring of packageSpecifier until the first "/" separator or the end of the string.
|
||||
packageName = idx === -1 ? packageSpecifier : packageSpecifier.slice(0, idx);
|
||||
// 6. If packageName starts with "." or contains "\" or "%", then
|
||||
if (idx !== 0 && (packageName[0] === '.' || packageName.indexOf('\\') >= 0 || packageName.indexOf('%') >= 0)) {
|
||||
// a. Throw an Invalid Module Specifier error.
|
||||
throw new VMError(`Invalid package specifier '${packageSpecifier}'`, 'ERR_INVALID_MODULE_SPECIFIER');
|
||||
}
|
||||
// 7. Let packageSubpath be "." concatenated with the substring of packageSpecifier from the position at the length of packageName.
|
||||
const packageSubpath = '.' + packageSpecifier.slice(packageName.length);
|
||||
// 8. If packageSubpath ends in "/", then
|
||||
if (packageSubpath[packageSubpath.length - 1] === '/') {
|
||||
// a. Throw an Invalid Module Specifier error.
|
||||
throw new VMError(`Invalid package specifier '${packageSpecifier}'`, 'ERR_INVALID_MODULE_SPECIFIER');
|
||||
}
|
||||
// 9. Let selfUrl be the result of PACKAGE_SELF_RESOLVE(packageName, packageSubpath, parentURL).
|
||||
const selfUrl = this.packageSelfResolve(packageName, packageSubpath, parentURL);
|
||||
// 10. If selfUrl is not undefined, return selfUrl.
|
||||
if (selfUrl) return selfUrl;
|
||||
// 11. While parentURL is not the file system root,
|
||||
let packageURL;
|
||||
while (true) {
|
||||
// a. Let packageURL be the URL resolution of "node_modules/" concatenated with packageSpecifier, relative to parentURL.
|
||||
packageURL = this.pathResolve(this.pathConcat(parentURL, 'node_modules', packageSpecifier));
|
||||
// b. Set parentURL to the parent folder URL of parentURL.
|
||||
const parentParentURL = this.pathDirname(parentURL);
|
||||
// c. If the folder at packageURL does not exist, then
|
||||
if (this.isPathAllowed(packageURL) && this.pathTestIsDirectory(packageURL)) break;
|
||||
// 1. Continue the next loop iteration.
|
||||
if (parentParentURL === parentURL) {
|
||||
// 12. Throw a Module Not Found error.
|
||||
throw new VMError(`Cannot find module '${packageSpecifier}'`, 'ENOTFOUND');
|
||||
}
|
||||
parentURL = parentParentURL;
|
||||
}
|
||||
// d. Let pjson be the result of READ_PACKAGE_JSON(packageURL).
|
||||
const pack = this.readPackage(packageURL);
|
||||
// e. If pjson is not null and pjson.exports is not null or undefined, then
|
||||
if (pack && pack.exports) {
|
||||
// 1. Return the result of PACKAGE_EXPORTS_RESOLVE(packageURL, packageSubpath, pjson.exports, defaultConditions).
|
||||
return this.packageExportsResolve(packageURL, packageSubpath, pack.exports, conditions, extList);
|
||||
}
|
||||
// f. Otherwise, if packageSubpath is equal to ".", then
|
||||
if (packageSubpath === '.') {
|
||||
// 1. If pjson.main is a string, then
|
||||
// a. Return the URL resolution of main in packageURL.
|
||||
return this.loadAsPackage(packageSubpath, pack, extList);
|
||||
}
|
||||
// g. Otherwise,
|
||||
// 1. Return the URL resolution of packageSubpath in packageURL.
|
||||
return this.pathConcat(packageURL, packageSubpath);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.Resolver = Resolver;
|
||||
exports.DefaultResolver = DefaultResolver;
|
||||
@@ -0,0 +1,77 @@
|
||||
import merge from './util/merge';
|
||||
import assertString from './util/assertString';
|
||||
|
||||
function currencyRegex(options) {
|
||||
var decimal_digits = "\\d{".concat(options.digits_after_decimal[0], "}");
|
||||
options.digits_after_decimal.forEach(function (digit, index) {
|
||||
if (index !== 0) decimal_digits = "".concat(decimal_digits, "|\\d{").concat(digit, "}");
|
||||
});
|
||||
var symbol = "(".concat(options.symbol.replace(/\W/, function (m) {
|
||||
return "\\".concat(m);
|
||||
}), ")").concat(options.require_symbol ? '' : '?'),
|
||||
negative = '-?',
|
||||
whole_dollar_amount_without_sep = '[1-9]\\d*',
|
||||
whole_dollar_amount_with_sep = "[1-9]\\d{0,2}(\\".concat(options.thousands_separator, "\\d{3})*"),
|
||||
valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep],
|
||||
whole_dollar_amount = "(".concat(valid_whole_dollar_amounts.join('|'), ")?"),
|
||||
decimal_amount = "(\\".concat(options.decimal_separator, "(").concat(decimal_digits, "))").concat(options.require_decimal ? '' : '?');
|
||||
var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : ''); // default is negative sign before symbol, but there are two other options (besides parens)
|
||||
|
||||
if (options.allow_negatives && !options.parens_for_negatives) {
|
||||
if (options.negative_sign_after_digits) {
|
||||
pattern += negative;
|
||||
} else if (options.negative_sign_before_digits) {
|
||||
pattern = negative + pattern;
|
||||
}
|
||||
} // South African Rand, for example, uses R 123 (space) and R-123 (no space)
|
||||
|
||||
|
||||
if (options.allow_negative_sign_placeholder) {
|
||||
pattern = "( (?!\\-))?".concat(pattern);
|
||||
} else if (options.allow_space_after_symbol) {
|
||||
pattern = " ?".concat(pattern);
|
||||
} else if (options.allow_space_after_digits) {
|
||||
pattern += '( (?!$))?';
|
||||
}
|
||||
|
||||
if (options.symbol_after_digits) {
|
||||
pattern += symbol;
|
||||
} else {
|
||||
pattern = symbol + pattern;
|
||||
}
|
||||
|
||||
if (options.allow_negatives) {
|
||||
if (options.parens_for_negatives) {
|
||||
pattern = "(\\(".concat(pattern, "\\)|").concat(pattern, ")");
|
||||
} else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) {
|
||||
pattern = negative + pattern;
|
||||
}
|
||||
} // ensure there's a dollar and/or decimal amount, and that
|
||||
// it doesn't start with a space or a negative sign followed by a space
|
||||
|
||||
|
||||
return new RegExp("^(?!-? )(?=.*\\d)".concat(pattern, "$"));
|
||||
}
|
||||
|
||||
var default_currency_options = {
|
||||
symbol: '$',
|
||||
require_symbol: false,
|
||||
allow_space_after_symbol: false,
|
||||
symbol_after_digits: false,
|
||||
allow_negatives: true,
|
||||
parens_for_negatives: false,
|
||||
negative_sign_before_digits: false,
|
||||
negative_sign_after_digits: false,
|
||||
allow_negative_sign_placeholder: false,
|
||||
thousands_separator: ',',
|
||||
decimal_separator: '.',
|
||||
allow_decimal: true,
|
||||
require_decimal: false,
|
||||
digits_after_decimal: [2],
|
||||
allow_space_after_digits: false
|
||||
};
|
||||
export default function isCurrency(str, options) {
|
||||
assertString(str);
|
||||
options = merge(options, default_currency_options);
|
||||
return currencyRegex(options).test(str);
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.read = void 0;
|
||||
function read(path, settings, callback) {
|
||||
settings.fs.lstat(path, (lstatError, lstat) => {
|
||||
if (lstatError !== null) {
|
||||
callFailureCallback(callback, lstatError);
|
||||
return;
|
||||
}
|
||||
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
||||
callSuccessCallback(callback, lstat);
|
||||
return;
|
||||
}
|
||||
settings.fs.stat(path, (statError, stat) => {
|
||||
if (statError !== null) {
|
||||
if (settings.throwErrorOnBrokenSymbolicLink) {
|
||||
callFailureCallback(callback, statError);
|
||||
return;
|
||||
}
|
||||
callSuccessCallback(callback, lstat);
|
||||
return;
|
||||
}
|
||||
if (settings.markSymbolicLink) {
|
||||
stat.isSymbolicLink = () => true;
|
||||
}
|
||||
callSuccessCallback(callback, stat);
|
||||
});
|
||||
});
|
||||
}
|
||||
exports.read = read;
|
||||
function callFailureCallback(callback, error) {
|
||||
callback(error);
|
||||
}
|
||||
function callSuccessCallback(callback, result) {
|
||||
callback(null, result);
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
### Streams Working Group
|
||||
|
||||
The Node.js Streams is jointly governed by a Working Group
|
||||
(WG)
|
||||
that is responsible for high-level guidance of the project.
|
||||
|
||||
The WG has final authority over this project including:
|
||||
|
||||
* Technical direction
|
||||
* Project governance and process (including this policy)
|
||||
* Contribution policy
|
||||
* GitHub repository hosting
|
||||
* Conduct guidelines
|
||||
* Maintaining the list of additional Collaborators
|
||||
|
||||
For the current list of WG members, see the project
|
||||
[README.md](./README.md#current-project-team-members).
|
||||
|
||||
### Collaborators
|
||||
|
||||
The readable-stream GitHub repository is
|
||||
maintained by the WG and additional Collaborators who are added by the
|
||||
WG on an ongoing basis.
|
||||
|
||||
Individuals making significant and valuable contributions are made
|
||||
Collaborators and given commit-access to the project. These
|
||||
individuals are identified by the WG and their addition as
|
||||
Collaborators is discussed during the WG meeting.
|
||||
|
||||
_Note:_ If you make a significant contribution and are not considered
|
||||
for commit-access log an issue or contact a WG member directly and it
|
||||
will be brought up in the next WG meeting.
|
||||
|
||||
Modifications of the contents of the readable-stream repository are
|
||||
made on
|
||||
a collaborative basis. Anybody with a GitHub account may propose a
|
||||
modification via pull request and it will be considered by the project
|
||||
Collaborators. All pull requests must be reviewed and accepted by a
|
||||
Collaborator with sufficient expertise who is able to take full
|
||||
responsibility for the change. In the case of pull requests proposed
|
||||
by an existing Collaborator, an additional Collaborator is required
|
||||
for sign-off. Consensus should be sought if additional Collaborators
|
||||
participate and there is disagreement around a particular
|
||||
modification. See _Consensus Seeking Process_ below for further detail
|
||||
on the consensus model used for governance.
|
||||
|
||||
Collaborators may opt to elevate significant or controversial
|
||||
modifications, or modifications that have not found consensus to the
|
||||
WG for discussion by assigning the ***WG-agenda*** tag to a pull
|
||||
request or issue. The WG should serve as the final arbiter where
|
||||
required.
|
||||
|
||||
For the current list of Collaborators, see the project
|
||||
[README.md](./README.md#members).
|
||||
|
||||
### WG Membership
|
||||
|
||||
WG seats are not time-limited. There is no fixed size of the WG.
|
||||
However, the expected target is between 6 and 12, to ensure adequate
|
||||
coverage of important areas of expertise, balanced with the ability to
|
||||
make decisions efficiently.
|
||||
|
||||
There is no specific set of requirements or qualifications for WG
|
||||
membership beyond these rules.
|
||||
|
||||
The WG may add additional members to the WG by unanimous consensus.
|
||||
|
||||
A WG member may be removed from the WG by voluntary resignation, or by
|
||||
unanimous consensus of all other WG members.
|
||||
|
||||
Changes to WG membership should be posted in the agenda, and may be
|
||||
suggested as any other agenda item (see "WG Meetings" below).
|
||||
|
||||
If an addition or removal is proposed during a meeting, and the full
|
||||
WG is not in attendance to participate, then the addition or removal
|
||||
is added to the agenda for the subsequent meeting. This is to ensure
|
||||
that all members are given the opportunity to participate in all
|
||||
membership decisions. If a WG member is unable to attend a meeting
|
||||
where a planned membership decision is being made, then their consent
|
||||
is assumed.
|
||||
|
||||
No more than 1/3 of the WG members may be affiliated with the same
|
||||
employer. If removal or resignation of a WG member, or a change of
|
||||
employment by a WG member, creates a situation where more than 1/3 of
|
||||
the WG membership shares an employer, then the situation must be
|
||||
immediately remedied by the resignation or removal of one or more WG
|
||||
members affiliated with the over-represented employer(s).
|
||||
|
||||
### WG Meetings
|
||||
|
||||
The WG meets occasionally on a Google Hangout On Air. A designated moderator
|
||||
approved by the WG runs the meeting. Each meeting should be
|
||||
published to YouTube.
|
||||
|
||||
Items are added to the WG agenda that are considered contentious or
|
||||
are modifications of governance, contribution policy, WG membership,
|
||||
or release process.
|
||||
|
||||
The intention of the agenda is not to approve or review all patches;
|
||||
that should happen continuously on GitHub and be handled by the larger
|
||||
group of Collaborators.
|
||||
|
||||
Any community member or contributor can ask that something be added to
|
||||
the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
|
||||
WG member or the moderator can add the item to the agenda by adding
|
||||
the ***WG-agenda*** tag to the issue.
|
||||
|
||||
Prior to each WG meeting the moderator will share the Agenda with
|
||||
members of the WG. WG members can add any items they like to the
|
||||
agenda at the beginning of each meeting. The moderator and the WG
|
||||
cannot veto or remove items.
|
||||
|
||||
The WG may invite persons or representatives from certain projects to
|
||||
participate in a non-voting capacity.
|
||||
|
||||
The moderator is responsible for summarizing the discussion of each
|
||||
agenda item and sends it as a pull request after the meeting.
|
||||
|
||||
### Consensus Seeking Process
|
||||
|
||||
The WG follows a
|
||||
[Consensus
|
||||
Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
|
||||
decision-making model.
|
||||
|
||||
When an agenda item has appeared to reach a consensus the moderator
|
||||
will ask "Does anyone object?" as a final call for dissent from the
|
||||
consensus.
|
||||
|
||||
If an agenda item cannot reach a consensus a WG member can call for
|
||||
either a closing vote or a vote to table the issue to the next
|
||||
meeting. The call for a vote must be seconded by a majority of the WG
|
||||
or else the discussion will continue. Simple majority wins.
|
||||
|
||||
Note that changes to WG membership require a majority consensus. See
|
||||
"WG Membership" above.
|
||||
@@ -0,0 +1,705 @@
|
||||
1.21.2 / 2023-03-12
|
||||
=================
|
||||
* [Fix] `ES2015`+: `CreateDataProperty`: use `OrdinaryDefineOwnProperty`
|
||||
* [Fix] `ES2015`+: `CreateDataProperty`: use `OrdinaryDefineOwnProperty`
|
||||
* [Fix] `ES2015`+: `GetPrototypeFromConstructor`: add missing assertion that `intrinsicDefaultProto` is an object
|
||||
* [Fix] `ES2015`+: `IsDetachedBuffer`: ensure a nullish error does not crash
|
||||
* [Fix] `ES2015`+: `ToDateString`: properly handle time values that aren’t "now"
|
||||
* [Fix] `ES2015`+: `ToUint8Clamp`: avoid an extra observable ToNumber
|
||||
* [Fix] `ES2015`+`: `GetMethod`: when `func` is not callable and `P` is a symbol, avoid the wrong TypeError
|
||||
* [Fix] `ES2020`+: `ToBigInt`: properly throw on anything besides string, bigint, boolean
|
||||
* [Fix] `ES2021`+: `SplitMatch`: instead of `false`, return `'not-matched'`
|
||||
* [Fix] `helpers/assertRecord`: handle nullish input
|
||||
* [Fix] `helpers/isFullyPopulatedPropertyDescriptor`: handle primitive inputs
|
||||
* [Robustness] `ES5`: `ToNumber`: avoid relying on runtime `.test` and `.replace`
|
||||
* [Refactor] `ES2015`: mark `IsDataDescriptor` and `IsAccessorDescriptor` as spackled
|
||||
* [Refactor] `ES2015`+: `IsDetachedBuffer`: use `array-buffer-byte-length` package
|
||||
* [Refactor] `ES2015`+: `OrdinaryHasInstance`: rely on falsiness
|
||||
* [Refactor] `ES2016`+: `CreateListFromArrayLike`: hoist default element types to module level
|
||||
* [Refactor] `ES2022`+: `StringToNumber`, `ToNumber`: use `string.prototype.trim`
|
||||
* [patch] `ES2022`+: `IsLessThan`: fix a comment
|
||||
* [patch] `ES2022`+: `TypedArrayElementSize`, `TypedArrayElementType`: throw a SyntaxError with an unknown TA type
|
||||
* [patch] `ES2022`+: `IsLessThan`: fix a comment
|
||||
* [patch] `ES2020`+: `thisBigIntValue`: throw a SyntaxError, not TypeError, for unsupported features
|
||||
* [patch] `helpers/getIteratorMethod`: `String` is always available
|
||||
* [patch] fix commented spec URLs
|
||||
* [patch] omit `%` for `callBound`
|
||||
* [meta] fix spec URLs
|
||||
* [meta] fix spackle metadata, comments
|
||||
* [Deps] update `get-intrinsic`, `internal-slot`, `is-array-buffer`, `object-inspect`
|
||||
* [Deps] move `function-bind` to dev deps
|
||||
* [Tests] String.fromCharCode takes numbers, not strings
|
||||
* [Tests] use `makeIteratorRecord` helper
|
||||
* [Tests] increase coverage
|
||||
* [Tests] fix tests that throw a sentinel
|
||||
* [Dev Deps] update `array.from`, `available-regexp-flags`, `tape`
|
||||
|
||||
1.21.1 / 2023-01-10
|
||||
=================
|
||||
* [Fix] move `available-typed-arrays` to runtime deps
|
||||
* [Fix] `ES2021`+: `NumberToBigInt`: throw the proper error on an env without BigInts
|
||||
* [Fix] `ES2018`+: `CreateAsyncFromSyncIterator`: properly check `next` method args length
|
||||
* [Fix] `ES2020`-`ES2021`: Abstract Relational Comparison: handle BigInts properly
|
||||
* [Fix] `ES2022`+: `StringToBigInt`: invalid BigInts should be `undefined`, not `NaN` as in previous years
|
||||
* [Fix] `helpers/isFinite`: properly handle BigInt values
|
||||
* [Fix] `ES2020`+: `CreateListFromArrayLike`: accept BigInts
|
||||
* [Fix] `ES2019`+: `AsyncFromSyncIteratorContinuation`: throw a SyntaxError when > 1 arg is passed
|
||||
* [patch] `ES2020`+: `GetIterator`: use SyntaxError for intentionally unsupported
|
||||
* [patch] `ES2015`+: `GetPrototypeFromContructor`: use SyntaxError for intentionally unsupported
|
||||
* [patch] `ES2022`+: `StringToNumber`: fix non-string assertion failure message
|
||||
* [Deps] update `es-set-tostringtag`, `is-array-buffer`
|
||||
* [Tests] increase coverage
|
||||
* [Tests] exclude coverage from files that have been replaced by an extracted package
|
||||
|
||||
1.21.0 / 2023-01-04
|
||||
=================
|
||||
* [New] `ES2015`+: add `IsDetachedBuffer`
|
||||
* [New] `ES2015+`: add `DetachArrayBuffer`
|
||||
* [New] `ES2020`+: add `NumericToRawBytes`
|
||||
* [New] `ES2017` - `ES2019`: add `NumberToRawBytes`
|
||||
* [New] `ES2020+`: add `RawBytesToNumeric`
|
||||
* [New] `ES2017-ES2019`: add `RawBytesToNumber`
|
||||
* [New] `ES2017`+: add `ValidateAtomicAccess`
|
||||
* [New] `ES2021`+: add `ValidateIntegerTypedArray`
|
||||
* [New] `ES2015`+: add `ValidateTypedArray`
|
||||
* [New] `ES2015`+: add `GetGlobalObject`
|
||||
* [New] `ES2022`+: add `TypedArrayElementSize`, `TypedArrayElementType`
|
||||
* [New] `ES2015`+: add `max`, `min`
|
||||
* [New] `helpers/assertRecord`: add predicates for PromiseCapability and AsyncGeneratorRequest Records
|
||||
* [New] `ES2018`+: add `AsyncIteratorClose`
|
||||
* [New] `ES2015`+: `IteratorClose`: also accept a Completion Record instance instead of a completion thunk
|
||||
* [New] `ES2015`+ (CompletionRecord, NormalCompletion), `ES2018`+ (ThrowCompletion): add new AOs
|
||||
* [New] `ES2015`+ (`ObjectCreate`) and `ES2020`+ (`OrdinaryObjectCreate`): use `internal-slot` to support additional slots
|
||||
* [New] `ES2018`+: add `CreateAsyncFromSyncIterator`
|
||||
* [patch] `ES2015`+: `GetMethod`: better failure message
|
||||
* [Refactor] use `es-set-tostringtag` package
|
||||
* [Refactor] use `has-proto` package
|
||||
* [Deps] update `has-proto`, `es-set-tostringtag`, `internal-slot`
|
||||
* [meta] fix spackle script to `git add` after all writing is done
|
||||
* [meta] autogenerate esX entry points
|
||||
* [meta] use a leading slash in gitattributes for proper spackle matching
|
||||
* [Tests] fix comments on missing AOs
|
||||
* [Tests] filter out host-defined AOs
|
||||
* [Dev Deps] update `@ljharb/eslint-config`, `aud`
|
||||
|
||||
1.20.5 / 2022-12-07
|
||||
=================
|
||||
* [Fix] `ES2020+`: `floor`: make it work with BigInts as well
|
||||
* [Refactor] use `gopd`
|
||||
* [Tests] add `mod` helper tests (#147)
|
||||
* [Deps] update `string.prototype.trimend`, `string.prototype.trimstart`
|
||||
* [Dev Deps] update `array.prototype.filter`, `array.prototype.flatmap`, `array.prototype.indexof`, `object.fromentries`
|
||||
|
||||
1.20.4 / 2022-10-06
|
||||
=================
|
||||
* [Fix] `ES2021+`: values that truncate to -0 in `ToIntegerOrInfinity` (#146)
|
||||
* [Deps] update `is-callable`
|
||||
|
||||
1.20.3 / 2022-09-22
|
||||
=================
|
||||
* [Refactor] extract regex tester to `safe-regex-test` package
|
||||
* [Deps] update `get-intrinsic`, `is-callable`
|
||||
* [Dev Deps] update `aud`, `tape`
|
||||
|
||||
1.20.2 / 2022-09-01
|
||||
=================
|
||||
* [Fix] `ES2020+`: `SameValueNonNumeric`: properly throw on BigInt values
|
||||
* [Deps] update `object.assign`, `get-intrinsic`, `object-inspect`
|
||||
* [Dev Deps] update `array.prototype.indexof`, `diff`, `es-value-fixtures`, `tape`
|
||||
* [meta] `spackle`: always mkdirp new files to be written
|
||||
* [Tests] fix vscode auto-const from 8fc256d
|
||||
|
||||
1.20.1 / 2022-05-16
|
||||
=================
|
||||
* [Fix] `thisTimeValue`: use `getTime`, not `valueOf`, to get the time value
|
||||
* [Refactor] create `IsArray` helper
|
||||
* [Deps] update `regexp.prototype.flags`
|
||||
* [Dev Deps] use `for-each` instead of `foreach`
|
||||
|
||||
1.20.0 / 2022-05-05
|
||||
=================
|
||||
* [New] add ES2022
|
||||
* [New] `ES2015+`: add `ObjectDefineProperties`
|
||||
* [Refactor] create `fromPropertyDescriptor` helper
|
||||
* [Refactor] use `has-property-descriptors`
|
||||
* [Deps] update `string.prototype.trimend`, `string.prototype.trimstart`, `unbox-primitive`
|
||||
* [meta] use `npmignore` to autogenerate an npmignore file
|
||||
* [Dev Deps] update `es-value-fixtures`, `has-bigints`, `functions-have-names`
|
||||
* [Tests] copy GetIntrinsic tests over from `get-intrinsic`
|
||||
|
||||
1.19.5 / 2022-04-13
|
||||
=================
|
||||
* [Fix] `DefineOwnProperty`: FF 4-22 throws an exception when defining length of an array
|
||||
* [Dev Deps] update `@ljharb/eslint-config`
|
||||
|
||||
1.19.4 / 2022-04-12
|
||||
=================
|
||||
* [Fix] `ES2015+`: `CreateDataProperty`: a nonwritable but configurable property is still converted to a data property
|
||||
|
||||
1.19.3 / 2022-04-11
|
||||
=================
|
||||
* [Fix] `ES2015+`: `GetIterator`, `IterableToArrayLike`: in Symbol-less envs, handle boxed string objects
|
||||
* [Robustness] use `exec` instead of `test`, since the latter observably looks up `exec`
|
||||
* [Deps] update `is-shared-array-buffer`
|
||||
* [actions] restrict permissions
|
||||
* [Dev Deps] update `tape`
|
||||
* [Tests] add test coverage
|
||||
* [Tests] avoid a bug in node v4.0 with bound function names
|
||||
|
||||
1.19.2 / 2022-03-28
|
||||
=================
|
||||
* [Fix] `ES2018+`: `EnumerableOwnPropertyNames`, `ToIntegerOrInfinity`, `UTF16SurrogatePairToCodePoint`: proper function names
|
||||
* [Fix] `ES2015+`: `GetOwnPropertyKeys`/`IsExtensible`/`{Set,Test}IntegrityLevel`: avoid a crash in IE 8 on missing ES5 intrinsics
|
||||
* [Fix] `helpers/DefineOwnProperty`: avoid a crash in IE 8
|
||||
* [Fix] `ES2015+`: `StringCreate`: properly check for `prototype` being `String.prototype`
|
||||
* [Docs] `ES2015+`: `GetV`: Fix spec URL
|
||||
* [meta] operations: use a URL object instead of a URL string
|
||||
* [meta] remove defunct greenkeeper config
|
||||
* [meta] better `eccheck` command; fix indentation
|
||||
* [Tests] node v0.6 lacks `RegExp.prototype.source`
|
||||
* [Tests] remove a stray `console.log`
|
||||
* [Tests] properly set the lastIndex in IE 8
|
||||
* [Tests] skip test due to IE 6-8 sparse/undefined bug
|
||||
* [Tests] in IE 8, an empty regex is `` and not `(?:)`
|
||||
* [Tests] ES3 engines don’t have `.bind`
|
||||
* [Tests] avoid needless failures in ES3 engines that don't support descriptors
|
||||
* [Tests] add test to cover https://github.com/tc39/ecma262/issues/2611
|
||||
* [Deps] update `has-symbols`, `is-negative-zero`, `is-weakref`, `object-inspect`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object.fromentries`, `safe-publish-latest`, `tape`
|
||||
* [actions] reuse common workflows
|
||||
* [actions] update codecov uploader
|
||||
|
||||
1.19.1 / 2021-10-02
|
||||
=================
|
||||
* [Fix] `ES2020+`: `CreateRegExpStringIterator`: should not have enumerable methods
|
||||
* [Dev Deps] update `array.prototype.filter`, `array.prototype.indexof`
|
||||
|
||||
1.19.0 / 2021-09-30
|
||||
=================
|
||||
* [New] `ES2021+`: `IterableToList`: make `method` parameter optional (#61)
|
||||
* [New] add ES2021
|
||||
* [New] `ES2020+`: add `StringToBigInt`, `ToBigInt`, `ToBigInt64`, `ToBigUint64`
|
||||
* [New] `ES2017`+: add `IsSharedArrayBuffer`, `OrdinaryToPrimitive`
|
||||
* [New] `ES2015+`: add `CharacterRange`, `IsCompatiblePropertyDescriptor`
|
||||
* [New] `ES2020+`: add `CreateRegExpStringIterator`
|
||||
* [Fix] `ES2020+`: `ToBigInt64`/`ToBigUint64`: avoid node v10.4-v10.8 bug with limited BigInt range
|
||||
* [Fix] `ES2020+`: `AbstractRelationalComparison`, `AbstractEqualityComparison`: support BigInt
|
||||
* [Fix] `ES2020+`: `ToBigInt64`/`ToBigUint64`: Improve the definitions of twoSixtyThree and twoSixtyFour (#140)
|
||||
* [meta] do not publish .gitattributes
|
||||
* [Tests] Correct the behavior of `safeBigInt`
|
||||
* [Tests] Exclude dotfiles from the testing sweep (#141)
|
||||
|
||||
1.18.7 / 2021-09-28
|
||||
=================
|
||||
* [Fix] `getOwnPropertyDescriptor` helper: avoid crashing in IE < 9
|
||||
* [Fix] `ArraySetLength`: `node` `v0.6` has a bug where array lengths can be Set but not Defined
|
||||
* [eslint] remove unused directive
|
||||
* [Tests] fix spelling
|
||||
|
||||
1.18.6 / 2021-09-07
|
||||
=================
|
||||
* [Fix] `ES2020+`: `NumberToBigInt`: throw a SyntaxError when BigInts are not supported
|
||||
* [Refactor] extract getSymbolDescription logic to `get-symbol-description`
|
||||
* [Refactor] `ES2018+`: `AbstractRelationalComparison`: use `IsStringPrefix`
|
||||
* [Deps] update `is-callable`, `is-regex`, `is-string`
|
||||
* [Dev Deps] update `@ljharb/eslint-config`, `tape`
|
||||
* [Tests] `GetSubstitution`: add cases
|
||||
|
||||
1.18.5 / 2021-08-01
|
||||
=================
|
||||
* [meta] remove "exports" (#133)
|
||||
* [Dev Deps] update `eslint`
|
||||
|
||||
1.18.4 / 2021-07-29
|
||||
=================
|
||||
* [meta] partial revert of b54cfe8525faff482450e843a49d43be3a086225
|
||||
* [Deps] update `internal-slot`, `object-inspect`
|
||||
* [Dev Deps] update `eslint`, `tape`
|
||||
* [Tests] `ArraySetLength`: increase coverage
|
||||
|
||||
1.18.3 / 2021-05-27
|
||||
=================
|
||||
* [Fix] `ES2020+`: `ToNumber`: ensure it throws on a BigInt (#130)
|
||||
|
||||
1.18.2 / 2021-05-25
|
||||
=================
|
||||
* [meta] add `helpers` to "exports" field, for back compat
|
||||
|
||||
1.18.1 / 2021-05-25
|
||||
=================
|
||||
* [readme] update and clarify entry points
|
||||
* [meta] add "exports" field, with escape hatch
|
||||
* [meta] add `sideEffects` field
|
||||
* [meta] use `prepublishOnly`, for npm 7+
|
||||
* [eslint] clean up eslint rules
|
||||
* [Deps] update `is-regex`, `is-string`, `object-inspect`, `unbox-primitive`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape`
|
||||
* [actions] disable fail-fast on matrix jobs
|
||||
* [actions] use `node/install` action instead of `node/run`
|
||||
* [actions] update codeql-analysis to new best practices
|
||||
|
||||
1.18.0 / 2021-03-03
|
||||
=================
|
||||
* [New] add `ES2020`, and a number of additional AOs: See the changelog entries for the prereleases for more information:
|
||||
- [next.3](./CHANGELOG.md#1180-next3--2021-03-01)
|
||||
- [next.2](./CHANGELOG.md#1180-next2--2021-01-17)
|
||||
- [next.1](./CHANGELOG.md#1180-next1--2020-09-30)
|
||||
- [next.0](./CHANGELOG.md#1180-next0--2020-08-14)
|
||||
* [Refactor] `ES5+`: `Abstract Relational Comparison`: increase coverage
|
||||
* [Tests] increase coverage
|
||||
* [Tests] do not run coverage on node 0.6
|
||||
|
||||
1.18.0-next.3 / 2021-03-01
|
||||
=================
|
||||
* [New] `ES2015`: add `StringGetIndexProperty`
|
||||
* [New] `ES2015+`: add `RegExpCreate`, `SplitMatch`, `StringCreate`
|
||||
* [New] `ES2016-ES2019`: add `UTF16Decode`
|
||||
* [New] `ES2020+`: add `NumberToBigInt`
|
||||
* [New] `ES2020+: add `BigInt::`/`Number::` methods:
|
||||
* [Fix] `ES5`: `ToNumber`: properly refuse to parse ES6+ forms
|
||||
* [Fix] `ES2015+`: `Invoke`: optional argumentsList must be a List of arguments, not a list of arguments
|
||||
* [Fix] `ES2016+`: `UTF16Encoding`: properly return a string code point instead of a numeric code point
|
||||
* [Fix] `ES2020`: `NumberBitwiseOp`: assert that x and y are Numbers
|
||||
* [readme] remove travis/testling badge, fix repo URLs
|
||||
* [meta] `ES2015`: add missing `CreateArrayIterator` AO
|
||||
* [meta] `ES2015-ES2017`: add missing `DaylightSavingTA` AO
|
||||
* [meta] rerun `npm run spackle` to update URLs left after 11d8c8df11c0d15d094a6035afed662e22b440ef
|
||||
* [meta] update ecma URLs
|
||||
* [meta] unignore 2020 operations list
|
||||
* [meta] update operations scripts linting
|
||||
* [meta] refactor getOps script to fetch all years at once
|
||||
* [meta] refactor operations script to keep years in one place
|
||||
* [meta] fix ES2015 spec URL
|
||||
* [Deps] update `has-symbols`, `string.prototype.trimend`, `string.prototype.trimstart`, `get-intrinsic`, `is-callable`, `is-regex`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `array.prototype.indexof`, `aud`, `es-value-fixtures`, `object.fromentries`, `tape`, `diff`
|
||||
* [operations] detect ES2020+ style `T::` numeric operations
|
||||
* [Tests] increase coverage
|
||||
* [Tests] `BigInt(1e17)` throws on node v10.4-v10.6
|
||||
* [Tests] improve coverage on `Number::` methods
|
||||
* [Tests] `tape` v5 `.equal` now uses strict equality, so no more need for `is()`
|
||||
* [Tests] improve BigInt:: and Number:: coverage
|
||||
* [Tests] actually run all the helpers tests
|
||||
* [Tests] ensure "expected missing" ops list is accurate
|
||||
* [Tests] abstract away per-operation skips
|
||||
* [Tests] skip BigInt:: tests on envs without BigInts
|
||||
* [Tests] use `es-value-fixtures`
|
||||
* [actions] update workflows
|
||||
|
||||
1.18.0-next.2 / 2021-01-17
|
||||
=================
|
||||
* [New] `helpers`: add `isByteValue`, `isCodePoint`, `some`
|
||||
* [Fix] `ES2018+`: fix `GetSubstitution` with named captures
|
||||
* [Fix] `ES2020`: `GetIterator`: add omitted `hint` parameter
|
||||
* [Fix] `ES2018`/`ES2019`: `SetFunctionLength`: Infinities should throw
|
||||
* [Fix] `ES2020`: `ToIndex` uses `SameValue` instead of `SameValueZero`
|
||||
* [Fix] `ES2020`: `CopyDataProperties` uses `CreateDataPropertyOrThrow` instead of `CreateDataProperty`
|
||||
* [Refactor] use extracted `call-bind` instead of local helpers
|
||||
* [Refactor] use extracted `get-intrinsic` package
|
||||
* [Deps] update `call-bind`, `get-intrinsic`, `is-callable`, `is-negative-zero`, `is-regex`, `object-inspect`, `object.assign`, `string.prototype.trimend`, `string.prototype.trimstart`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `array.prototype.indexof`, `aud`, `diff`, `functions-have-names`, `has-bigints`, `has-strict-mode`, `object-is`, `object.fromentries`, `tape`
|
||||
* [actions] switch Automatic Rebase workflow to `pull_request_target` event
|
||||
* [actions] add "Allow Edits" workflow
|
||||
* [meta] pin cheerio to v1.0.0-rc.3, to fix getOps
|
||||
* [meta] make all URLs consistent, and point to spec artifacts
|
||||
* [meta] refactor `deltas` script; update eslint on operations scripts
|
||||
* [meta] do not publish .github dir (#123)
|
||||
* [Tests] add `v.notNonNegativeIntegers`, `v.nonConstructorFunctions`
|
||||
* [Tests] migrate tests to Github Actions
|
||||
* [Tests] run coverage on all tests
|
||||
* [Tests] add `npm run test:ses`
|
||||
|
||||
1.18.0-next.1 / 2020-09-30
|
||||
=================
|
||||
* [Fix] `ES2020`: `ToInteger`: `-0` should always be normalized to `+0` (#116)
|
||||
* [patch] `GetIntrinsic`: Adapt to override-mistake-fix pattern (#115)
|
||||
* [Fix] `callBind`: ensure compatibility with SES
|
||||
* [Deps] update `is-callable`, `object.assign`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`
|
||||
* [eslint] fix warning
|
||||
* [Tests] temporarily allow SES tests to fail (#115)
|
||||
* [Tests] ses-compat - initialize module after ses lockdown (#113)
|
||||
* [Tests] [Refactor] use defineProperty helper rather than assignment
|
||||
* [Tests] [Refactor] clean up defineProperty test helper
|
||||
|
||||
1.18.0-next.0 / 2020-08-14
|
||||
=================
|
||||
* [New] add `ES2020`
|
||||
* [New] `GetIntrinsic`: add `%AggregateError%`, `%FinalizationRegistry%`, and `%WeakRef%`
|
||||
* [New] `ES5`+: add `abs`, `floor`; use `modulo` consistently
|
||||
* [New] `GetIntrinsic`: Cache accessed intrinsics (#98)
|
||||
* [New] `GetIntrinsic`: Add ES201x function intrinsics (#97)
|
||||
* [New] `ES2015`+: add `QuoteJSONString`, `OrdinaryCreateFromConstructor`
|
||||
* [New] `ES2017`+: add `StringGetOwnProperty`
|
||||
* [New] `ES2016`+: add `UTF16Encoding`
|
||||
* [New] `ES2018`+: add `SetFunctionLength`, `UnicodeEscape`
|
||||
* [New] add `isLeadingSurrogate`/`isTrailingSurrogate` helpers
|
||||
* [Fix] `ES5`+: `ToPropertyDescriptor`: use intrinsic TypeError
|
||||
* [Fix] `ES2018+`: `CopyDataProperties`/`NumberToString`: use intrinsic TypeError
|
||||
* [Deps] update `is-regex`, `object-inspect`
|
||||
* [Dev Deps] update `eslint`
|
||||
|
||||
1.17.7 / 2020-09-30
|
||||
=================
|
||||
* [Fix] `ES2020`: `ToInteger`: `-0` should always be normalized to `+0` (#116)
|
||||
* [patch] `GetIntrinsic`: Adapt to override-mistake-fix pattern (#115)
|
||||
* [Fix] `callBind`: ensure compatibility with SES
|
||||
* [Deps] update `is-callable`, `is-regex`, `object-inspect`, `object.assign`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`
|
||||
|
||||
1.17.6 / 2020-06-13
|
||||
=================
|
||||
* [Fix] `helpers/getSymbolDescription`: use the global Symbol registry when available (#92)
|
||||
* [Fix] `ES2015+`: `IsConstructor`: when `Reflect.construct` is available, be spec-accurate (#93)
|
||||
* [Fix] `ES2015+`: `Set`: Always return boolean value (#101)
|
||||
* [Fix] `ES2015+`: `Set`: ensure exceptions are thrown in IE 9 when requested
|
||||
* [Fix] Use `Reflect.apply(…)` if available (#99)
|
||||
* [Fix] `helpers/floor`: module-cache `Math.floor`
|
||||
* [Fix] `helpers/getSymbolDescription`: Prefer bound `description` getter when present
|
||||
* [Fix] `2016`: Use `getIteratorMethod` in `IterableToArrayLike` (#94)
|
||||
* [Fix] `helpers/OwnPropertyKeys`: Use `Reflect.ownKeys(…)` if available (#91)
|
||||
* [Fix] `2018+`: Fix `CopyDataProperties` depending on `this` (#95)
|
||||
* [meta] mark spackled files as autogenerated
|
||||
* [meta] `Type`: fix spec URL
|
||||
* [meta] `ES2015`: complete ops list
|
||||
* [Deps] update `is‑callable`, `is‑regex`
|
||||
* [Deps] switch from `string.prototype.trimleft`/`string.prototype.trimright` to `string.prototype.trimstart`/`string.prototype.trimend`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `in-publish`, `object-is`, `tape`; add `aud`
|
||||
* [eslint] `helpers/isPropertyDescriptor`: fix indentation
|
||||
* [Tests] `helpers/getSymbolDescription`: add test cases; some envs have `Symbol.for` but can not infer a name (#92)
|
||||
* [Tests] try out CodeQL analysis
|
||||
* [Tests] reformat expected missing ops
|
||||
* [Tests] Run tests with `undefined` this (#96)
|
||||
|
||||
1.17.5 / 2020-03-22
|
||||
=================
|
||||
* [Fix] `CreateDataProperty`: update an existing property
|
||||
* [Fix] run missing spackle from cd7504701879ddea0f5981e99cbcf93bfea9171d
|
||||
* [Dev Deps] update `make-arrow-function`, `tape`, `@ljharb/eslint-config`
|
||||
|
||||
1.17.4 / 2020-01-21
|
||||
=================
|
||||
* [Fix] `2015+`: add code to handle IE 8’s problems
|
||||
* [Tests] fix tests for IE 8
|
||||
|
||||
1.17.3 / 2020-01-19
|
||||
=================
|
||||
* [Fix] `ObjectCreate` `2015+`: Fall back to `__proto__` and normal `new` in older browsers
|
||||
* [Fix] `GetIntrinsic`: ensure the `allowMissing` property actually works on dotted intrinsics
|
||||
|
||||
1.17.2 / 2020-01-14
|
||||
=================
|
||||
* [Fix] `helpers/OwnPropertyKeys`: include non-enumerables too
|
||||
|
||||
1.17.1 / 2020-01-14
|
||||
=================
|
||||
* [Refactor] add `OwnPropertyKeys` helper, use it in `CopyDataProperties`
|
||||
* [Refactor] `IteratorClose`: remove useless assignment
|
||||
* [Dev Deps] update `eslint`, `tape`, `diff`
|
||||
|
||||
1.17.0 / 2019-12-20
|
||||
=================
|
||||
* [New] Split up each operation into its own file (prereleased)
|
||||
* [Fix] `GetIntrinsic`: IE 8 has a broken `Object.getOwnPropertyDescriptor`
|
||||
* [Fix] `object.assign` is a runtime dep (prereleased)
|
||||
* [Refactor] `GetIntrinsic`: remove the internal property salts, since % already handles that
|
||||
* [Refactor] `GetIntrinsic`: further simplification
|
||||
* [Deps] update `is-callable`, `string.prototype.trimleft`, `string.prototype.trimright`, `is-regex`
|
||||
* [Dev Deps] update `@ljharb/eslint-config`, `object-is`, `object.fromentries`, `tape`
|
||||
* [Tests] add `.eslintignore`
|
||||
* [meta] remove unused Makefile and associated utils
|
||||
* [meta] only run spackle script in publish (#78) (prereleased)
|
||||
|
||||
1.17.0-next.1 / 2019-12-11
|
||||
=================
|
||||
* [Fix] `object.assign` is a runtime dep
|
||||
* [meta] only run spackle script in publish (#78)
|
||||
|
||||
1.17.0-next.0 / 2019-12-11
|
||||
=================
|
||||
* [New] Split up each operation into its own file
|
||||
|
||||
1.16.3 / 2019-12-04
|
||||
=================
|
||||
* [Fix] `GetIntrinsic`: when given a path to a getter, return the actual getter
|
||||
* [Dev Deps] update `eslint`
|
||||
|
||||
1.16.2 / 2019-11-24
|
||||
=================
|
||||
* [Fix] IE 6-7 lack JSON
|
||||
* [Fix] IE 6-8 strings can’t use array slice, they need string slice
|
||||
* [Dev Deps] update `eslint`
|
||||
|
||||
1.16.1 / 2019-11-24
|
||||
=================
|
||||
* [Fix] `GetIntrinsics`: turns out IE 8 throws when `Object.getOwnPropertyDescriptor(arguments);`, and does not throw on `callee` anyways
|
||||
* [Deps] update `es-to-primitive`, `has-symbols`, `object-inspect`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`
|
||||
* [meta] re-include year files inside `operations`
|
||||
* [meta] add `funding` field
|
||||
* [actions] add Automatic Rebase github action
|
||||
* [Tests] use shared travis-ci config
|
||||
* [Tests] disable `check-coverage`, and let codecov do it
|
||||
|
||||
1.16.0 / 2019-10-18
|
||||
=================
|
||||
* [New] `ES2015+`: add `SetFunctionName`
|
||||
* [New] `ES2015+`: add `GetPrototypeFromConstructor`, with caveats
|
||||
* [New] `ES2015+`: add `CreateListFromArrayLike`
|
||||
* [New] `ES2016+`: add `OrdinarySetPrototypeOf`
|
||||
* [New] `ES2016+`: add `OrdinaryGetPrototypeOf`
|
||||
* [New] add `getSymbolDescription` and `getInferredName` helpers
|
||||
* [Fix] `GetIterator`: add fallback for pre-Symbol environments, tests
|
||||
* [Dev Deps] update `object.fromentries`
|
||||
* [Tests] add `node` `v12.2`
|
||||
|
||||
1.15.0 / 2019-10-02
|
||||
=================
|
||||
* [New] `ES2018`+: add `DateString`, `TimeString`
|
||||
* [New] `ES2015`+: add `ToDateString`
|
||||
* [New] `ES5`+: add `msFromTime`, `SecFromTime`, `MinFromTime`, `HourFromTime`, `TimeWithinDay`, `Day`, `DayFromYear`, `TimeFromYear`, `YearFromTime`, `WeekDay`, `DaysInYear`, `InLeapYear`, `DayWithinYear`, `MonthFromTime`, `DateFromTime`, `MakeDay`, `MakeDate`, `MakeTime`, `TimeClip`, `modulo`
|
||||
* [New] add `regexTester` helper
|
||||
* [New] add `callBound` helper
|
||||
* [New] add ES2020’s intrinsic dot notation
|
||||
* [New] add `isPrefixOf` helper
|
||||
* [New] add `maxSafeInteger` helper
|
||||
* [Deps] update `string.prototype.trimleft`, `string.prototype.trimright`
|
||||
* [Dev Deps] update `eslint`
|
||||
* [Tests] on `node` `v12.11`
|
||||
* [meta] npmignore operations scripts; add "deltas"
|
||||
|
||||
1.14.2 / 2019-09-08
|
||||
=================
|
||||
* [Fix] `ES2016`: `IterableToArrayLike`: add proper fallback for strings, pre-Symbols
|
||||
* [Tests] on `node` `v12.10`
|
||||
|
||||
1.14.1 / 2019-09-03
|
||||
=================
|
||||
* [meta] republish with some extra files removed
|
||||
|
||||
1.14.0 / 2019-09-02
|
||||
=================
|
||||
* [New] add ES2019
|
||||
* [New] `ES2017+`: add `IterableToList`
|
||||
* [New] `ES2016`: add `IterableToArrayLike`
|
||||
* [New] `ES2015+`: add `ArrayCreate`, `ArraySetLength`, `OrdinaryDefineOwnProperty`, `OrdinaryGetOwnProperty`, `OrdinaryHasProperty`, `CreateHTML`, `GetOwnPropertyKeys`, `InstanceofOperator`, `SymbolDescriptiveString`, `GetSubstitution`, `ValidateAndApplyPropertyDescriptor`, `IsPromise`, `OrdinaryHasInstance`, `TestIntegrityLevel`, `SetIntegrityLevel`
|
||||
* [New] add `callBind` helper, and use it
|
||||
* [New] add helpers: `isPropertyDescriptor`, `every`
|
||||
* [New] ES5+: add `Abstract Relational Comparison`
|
||||
* [New] ES5+: add `Abstract Equality Comparison`, `Strict Equality Comparison`
|
||||
* [Fix] `ES2015+`: `GetIterator`: only require native Symbols when `method` is omitted
|
||||
* [Fix] `ES2015`: `Call`: error message now properly displays Symbols using `object-inspect`
|
||||
* [Fix] `ES2015+`: `ValidateAndApplyPropertyDescriptor`: use ES2017 logic to bypass spec bugs
|
||||
* [Fix] `ES2015+`: `CreateDataProperty`, `DefinePropertyOrThrow`, `ValidateAndApplyPropertyDescriptor`: add fallbacks for ES3
|
||||
* [Fix] `ES2015+`: `FromPropertyDescriptor`: no longer requires a fully complete Property Descriptor
|
||||
* [Fix] `ES5`: `IsPropertyDescriptor`: call into `IsDataDescriptor` and `IsAccessorDescriptor`
|
||||
* [Refactor] use `has-symbols` for Symbol detection
|
||||
* [Fix] `helpers/assertRecord`: remove `console.log`
|
||||
* [Deps] update `object-keys`
|
||||
* [readme] add security note
|
||||
* [meta] change http URLs to https
|
||||
* [meta] linter cleanup
|
||||
* [meta] fix getOps script
|
||||
* [meta] add FUNDING.yml
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `semver`, `replace`, `cheerio`, `tape`
|
||||
* [Tests] up to `node` `v12.9`, `v11.15`, `v10.16`, `v8.16`, `v6.17`
|
||||
* [Tests] temporarily allow node 0.6 to fail; segfaulting in travis
|
||||
* [Tests] use the values helper more in es5 tests
|
||||
* [Tests] fix linting to apply to all files
|
||||
* [Tests] run `npx aud` only on prod deps
|
||||
* [Tests] add v.descriptors helpers
|
||||
* [Tests] use `npx aud` instead of `npm audit` with hoops
|
||||
* [Tests] use `eclint` instead of `editorconfig-tools`
|
||||
* [Tests] some intrinsic cleanup
|
||||
* [Tests] migrate es5 tests to use values helper
|
||||
* [Tests] add some missing ES2015 ops
|
||||
|
||||
1.13.0 / 2019-01-02
|
||||
=================
|
||||
* [New] add ES2018
|
||||
* [New] add ES2015/ES2016: EnumerableOwnNames; ES2017: EnumerableOwnProperties
|
||||
* [New] `ES2015+`: add `thisBooleanValue`, `thisNumberValue`, `thisStringValue`, `thisTimeValue`
|
||||
* [New] `ES2015+`: add `DefinePropertyOrThrow`, `DeletePropertyOrThrow`, `CreateMethodProperty`
|
||||
* [New] add `assertRecord` helper
|
||||
* [Deps] update `is-callable`, `has`, `object-keys`, `es-to-primitive`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `semver`, `safe-publish-latest`, `replace`
|
||||
* [Tests] use `npm audit` instead of `nsp`
|
||||
* [Tests] remove `jscs`
|
||||
* [Tests] up to `node` `v11.6`, `v10.15`, `v8.15`, `v6.16`
|
||||
* [Tests] move descriptor factories to `values` helper
|
||||
* [Tests] add `getOps` to programmatically fetch abstract operation names
|
||||
|
||||
1.12.0 / 2018-05-31
|
||||
=================
|
||||
* [New] add `GetIntrinsic` entry point
|
||||
* [New] `ES2015`+: add `ObjectCreate`
|
||||
* [Robustness]: `ES2015+`: ensure `Math.{abs,floor}` and `Function.call` are cached
|
||||
|
||||
1.11.0 / 2018-03-21
|
||||
=================
|
||||
* [New] `ES2015+`: add iterator abstract ops
|
||||
* [Dev Deps] update `eslint`, `nsp`, `object.assign`, `semver`, `tape`
|
||||
* [Tests] up to `node` `v9.8`, `v8.10`, `v6.13`
|
||||
|
||||
1.10.0 / 2017-11-24
|
||||
=================
|
||||
* [New] ES2015+: `AdvanceStringIndex`
|
||||
* [Dev Deps] update `eslint`, `nsp`
|
||||
* [Tests] require node 0.6 to pass again
|
||||
* [Tests] up to `node` `v9.2`, `v8.9`, `v6.12`; use `nvm install-latest-npm`; pin included builds to LTS
|
||||
|
||||
1.9.0 / 2017-09-30
|
||||
=================
|
||||
* [New] `es2015+`: add `ArraySpeciesCreate`
|
||||
* [New] ES2015+: add `CreateDataProperty` and `CreateDataPropertyOrThrow`
|
||||
* [Tests] consolidate duplicated tests
|
||||
* [Tests] increase coverage
|
||||
* [Dev Deps] update `nsp`, `eslint`
|
||||
|
||||
1.8.2 / 2017-09-03
|
||||
=================
|
||||
* [Fix] `es2015`+: `ToNumber`: provide the proper hint for Date objects (#27)
|
||||
* [Dev Deps] update `eslint`
|
||||
|
||||
1.8.1 / 2017-08-30
|
||||
=================
|
||||
* [Fix] ES2015+: `ToPropertyKey`: should return a symbol for Symbols (#26)
|
||||
* [Deps] update `function-bind`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`
|
||||
* [Docs] github broke markdown parsing
|
||||
|
||||
1.8.0 / 2017-08-04
|
||||
=================
|
||||
* [New] add ES2017
|
||||
* [New] move es6+ to es2015+; leave es6/es7 as aliases
|
||||
* [New] ES5+: add `IsPropertyDescriptor`, `IsAccessorDescriptor`, `IsDataDescriptor`, `IsGenericDescriptor`, `FromPropertyDescriptor`, `ToPropertyDescriptor`
|
||||
* [New] ES2015+: add `CompletePropertyDescriptor`, `Set`, `HasOwnProperty`, `HasProperty`, `IsConcatSpreadable`, `Invoke`, `CreateIterResultObject`, `RegExpExec`
|
||||
* [Fix] es7/es2016: do not mutate ES6
|
||||
* [Fix] assign helper only supports one source
|
||||
* [Deps] update `is-regex`
|
||||
* [Dev Deps] update `nsp`, `eslint`, `@ljharb/eslint-config`
|
||||
* [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `semver`, `tape`
|
||||
* [Tests] add tests for missing and excess operations
|
||||
* [Tests] add codecov for coverage
|
||||
* [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`, `v4.8`; newer npm breaks on older node
|
||||
* [Tests] use same lists of value types across tests; ensure tests are the same when ops are the same
|
||||
* [Tests] ES2015: add ToNumber symbol tests
|
||||
* [Tests] switch to `nyc` for code coverage
|
||||
* [Tests] make IsRegExp tests consistent across editions
|
||||
|
||||
1.7.0 / 2017-01-22
|
||||
=================
|
||||
* [New] ES6: Add `GetMethod` (#16)
|
||||
* [New] ES6: Add `GetV` (#16)
|
||||
* [New] ES6: Add `Get` (#17)
|
||||
* [Tests] up to `node` `v7.4`, `v6.9`, `v4.6`; improve test matrix
|
||||
* [Dev Deps] update `tape`, `nsp`, `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`
|
||||
|
||||
1.6.1 / 2016-08-21
|
||||
=================
|
||||
* [Fix] ES6: IsConstructor should return true for `class` constructors.
|
||||
|
||||
1.6.0 / 2016-08-20
|
||||
=================
|
||||
* [New] ES5 / ES6: add `Type`
|
||||
* [New] ES6: `SpeciesConstructor`
|
||||
* [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`; add `safe-publish-latest`
|
||||
* [Tests] up to `node` `v6.4`, `v5.12`, `v4.5`
|
||||
|
||||
1.5.1 / 2016-05-30
|
||||
=================
|
||||
* [Fix] `ES.IsRegExp`: actually look up `Symbol.match` on the argument
|
||||
* [Refactor] create `isNaN` helper
|
||||
* [Deps] update `is-callable`, `function-bind`
|
||||
* [Deps] update `es-to-primitive`, fix ES5 tests
|
||||
* [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `tape`, `nsp`
|
||||
* [Tests] up to `node` `v6.2`, `v5.11`, `v4.4`
|
||||
* [Tests] use pretest/posttest for linting/security
|
||||
|
||||
1.5.0 / 2015-12-27
|
||||
=================
|
||||
* [New] adds `Symbol.toPrimitive` support via `es-to-primitive`
|
||||
* [Deps] update `is-callable`, `es-to-primitive`
|
||||
* [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`, `tape`
|
||||
* [Tests] up to `node` `v5.3`
|
||||
|
||||
1.4.3 / 2015-11-04
|
||||
=================
|
||||
* [Fix] `ES6.ToNumber`: should give `NaN` for explicitly signed hex strings (#4)
|
||||
* [Refactor] `ES6.ToNumber`: No need to double-trim
|
||||
* [Refactor] group tests better
|
||||
* [Tests] should still pass on `node` `v0.8`
|
||||
|
||||
1.4.2 / 2015-11-02
|
||||
=================
|
||||
* [Fix] ensure `ES.ToNumber` trims whitespace, and does not trim non-whitespace (#3)
|
||||
|
||||
1.4.1 / 2015-10-31
|
||||
=================
|
||||
* [Fix] ensure only 0-1 are valid binary and 0-7 are valid octal digits (#2)
|
||||
* [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`
|
||||
* [Tests] on `node` `v5.0`
|
||||
* [Tests] fix npm upgrades for older node versions
|
||||
* package.json: use object form of "authors", add "contributors"
|
||||
|
||||
1.4.0 / 2015-09-26
|
||||
=================
|
||||
* [Deps] update `is-callable`
|
||||
* [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config`
|
||||
* [Tests] on `node` `v4.2`
|
||||
* [New] Add `SameValueNonNumber` to ES7
|
||||
|
||||
1.3.2 / 2015-09-26
|
||||
=================
|
||||
* [Fix] Fix `ES6.IsRegExp` to properly handle `Symbol.match`, per spec.
|
||||
* [Tests] up to `io.js` `v3.3`, `node` `v4.1`
|
||||
* [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver`
|
||||
|
||||
1.3.1 / 2015-08-15
|
||||
=================
|
||||
* [Fix] Ensure that objects that `toString` to a binary or octal literal also convert properly
|
||||
|
||||
1.3.0 / 2015-08-15
|
||||
=================
|
||||
* [New] ES6’s ToNumber now supports binary and octal literals.
|
||||
* [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`, `tape`
|
||||
* [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG
|
||||
* [Tests] up to `io.js` `v3.0`
|
||||
|
||||
1.2.2 / 2015-07-28
|
||||
=================
|
||||
* [Fix] Both `ES5.CheckObjectCoercible` and `ES6.RequireObjectCoercible` return the value if they don't throw.
|
||||
* [Tests] Test on latest `io.js` versions.
|
||||
* [Dev Deps] Update `eslint`, `jscs`, `tape`, `semver`, `covert`, `nsp`
|
||||
|
||||
1.2.1 / 2015-03-20
|
||||
=================
|
||||
* Fix `isFinite` helper.
|
||||
|
||||
1.2.0 / 2015-03-19
|
||||
=================
|
||||
* Use `es-to-primitive` for ToPrimitive methods.
|
||||
* Test on latest `io.js` versions; allow failures on all but 2 latest `node`/`io.js` versions.
|
||||
|
||||
1.1.2 / 2015-03-20
|
||||
=================
|
||||
* Fix isFinite helper.
|
||||
|
||||
1.1.1 / 2015-03-19
|
||||
=================
|
||||
* Fix isPrimitive check for functions
|
||||
* Update `eslint`, `editorconfig-tools`, `semver`, `nsp`
|
||||
|
||||
1.1.0 / 2015-02-17
|
||||
=================
|
||||
* Add ES7 export (non-default).
|
||||
* All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`.
|
||||
* Test on `iojs-v1.2`.
|
||||
|
||||
1.0.1 / 2015-01-30
|
||||
=================
|
||||
* Use `is-callable` instead of an internal function.
|
||||
* Update `tape`, `jscs`, `nsp`, `eslint`
|
||||
|
||||
1.0.0 / 2015-01-10
|
||||
=================
|
||||
* v1.0.0
|
||||
@@ -0,0 +1,11 @@
|
||||
// this should only run in node >= 13.7, so it
|
||||
// does not need any of the intense fallbacks that old node/browsers do
|
||||
|
||||
var $iterator = Symbol.iterator;
|
||||
|
||||
export default function getIterator(iterable) {
|
||||
// alternatively, `iterable[$iterator]?.()`
|
||||
if (iterable != null && iterable[$iterator] !== undefined) {
|
||||
return iterable[$iterator]();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
{
|
||||
"name": "is-typed-array",
|
||||
"version": "1.1.10",
|
||||
"author": {
|
||||
"name": "Jordan Harband",
|
||||
"email": "ljharb@gmail.com",
|
||||
"url": "http://ljharb.codes"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Jordan Harband",
|
||||
"email": "ljharb@gmail.com",
|
||||
"url": "http://ljharb.codes"
|
||||
}
|
||||
],
|
||||
"description": "Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prelint": "evalmd README.md",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"pretest": "npm run --silent lint",
|
||||
"test": "npm run tests-only && npm run test:harmony",
|
||||
"tests-only": "nyc tape test",
|
||||
"test:harmony": "nyc node --harmony --es-staging test",
|
||||
"posttest": "npx aud --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/inspect-js/is-typed-array.git"
|
||||
},
|
||||
"keywords": [
|
||||
"array",
|
||||
"TypedArray",
|
||||
"typed array",
|
||||
"is",
|
||||
"typed",
|
||||
"Int8Array",
|
||||
"Uint8Array",
|
||||
"Uint8ClampedArray",
|
||||
"Int16Array",
|
||||
"Uint16Array",
|
||||
"Int32Array",
|
||||
"Uint32Array",
|
||||
"Float32Array",
|
||||
"Float64Array",
|
||||
"ES6",
|
||||
"toStringTag",
|
||||
"Symbol.toStringTag",
|
||||
"@@toStringTag"
|
||||
],
|
||||
"dependencies": {
|
||||
"available-typed-arrays": "^1.0.5",
|
||||
"call-bind": "^1.0.2",
|
||||
"for-each": "^0.3.3",
|
||||
"gopd": "^1.0.1",
|
||||
"has-tostringtag": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.0.0",
|
||||
"aud": "^2.0.1",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"eslint": "=8.8.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"in-publish": "^2.0.1",
|
||||
"is-callable": "^1.2.7",
|
||||
"make-arrow-function": "^1.2.0",
|
||||
"make-generator-function": "^2.0.0",
|
||||
"npmignore": "^0.3.0",
|
||||
"nyc": "^10.3.2",
|
||||
"object-inspect": "^1.12.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.6.1"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js",
|
||||
"browsers": [
|
||||
"iexplore/6.0..latest",
|
||||
"firefox/3.0..6.0",
|
||||
"firefox/15.0..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/4.0..10.0",
|
||||
"chrome/20.0..latest",
|
||||
"chrome/canary",
|
||||
"opera/10.0..latest",
|
||||
"opera/next",
|
||||
"safari/4.0..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true,
|
||||
"startingVersion": "1.1.10"
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';
|
||||
import { innerFrom } from './innerFrom';
|
||||
import { popResultSelector } from '../util/args';
|
||||
import { createOperatorSubscriber } from '../operators/OperatorSubscriber';
|
||||
import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';
|
||||
import { createObject } from '../util/createObject';
|
||||
export function forkJoin(...args) {
|
||||
const resultSelector = popResultSelector(args);
|
||||
const { args: sources, keys } = argsArgArrayOrObject(args);
|
||||
const result = new Observable((subscriber) => {
|
||||
const { length } = sources;
|
||||
if (!length) {
|
||||
subscriber.complete();
|
||||
return;
|
||||
}
|
||||
const values = new Array(length);
|
||||
let remainingCompletions = length;
|
||||
let remainingEmissions = length;
|
||||
for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) {
|
||||
let hasValue = false;
|
||||
innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => {
|
||||
if (!hasValue) {
|
||||
hasValue = true;
|
||||
remainingEmissions--;
|
||||
}
|
||||
values[sourceIndex] = value;
|
||||
}, () => remainingCompletions--, undefined, () => {
|
||||
if (!remainingCompletions || !hasValue) {
|
||||
if (!remainingEmissions) {
|
||||
subscriber.next(keys ? createObject(keys, values) : values);
|
||||
}
|
||||
subscriber.complete();
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;
|
||||
}
|
||||
//# sourceMappingURL=forkJoin.js.map
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('rangeStep', require('../range'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,75 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.combineLatestInit = exports.combineLatest = void 0;
|
||||
var Observable_1 = require("../Observable");
|
||||
var argsArgArrayOrObject_1 = require("../util/argsArgArrayOrObject");
|
||||
var from_1 = require("./from");
|
||||
var identity_1 = require("../util/identity");
|
||||
var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs");
|
||||
var args_1 = require("../util/args");
|
||||
var createObject_1 = require("../util/createObject");
|
||||
var OperatorSubscriber_1 = require("../operators/OperatorSubscriber");
|
||||
var executeSchedule_1 = require("../util/executeSchedule");
|
||||
function combineLatest() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var scheduler = args_1.popScheduler(args);
|
||||
var resultSelector = args_1.popResultSelector(args);
|
||||
var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys;
|
||||
if (observables.length === 0) {
|
||||
return from_1.from([], scheduler);
|
||||
}
|
||||
var result = new Observable_1.Observable(combineLatestInit(observables, scheduler, keys
|
||||
?
|
||||
function (values) { return createObject_1.createObject(keys, values); }
|
||||
:
|
||||
identity_1.identity));
|
||||
return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result;
|
||||
}
|
||||
exports.combineLatest = combineLatest;
|
||||
function combineLatestInit(observables, scheduler, valueTransform) {
|
||||
if (valueTransform === void 0) { valueTransform = identity_1.identity; }
|
||||
return function (subscriber) {
|
||||
maybeSchedule(scheduler, function () {
|
||||
var length = observables.length;
|
||||
var values = new Array(length);
|
||||
var active = length;
|
||||
var remainingFirstValues = length;
|
||||
var _loop_1 = function (i) {
|
||||
maybeSchedule(scheduler, function () {
|
||||
var source = from_1.from(observables[i], scheduler);
|
||||
var hasFirstValue = false;
|
||||
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) {
|
||||
values[i] = value;
|
||||
if (!hasFirstValue) {
|
||||
hasFirstValue = true;
|
||||
remainingFirstValues--;
|
||||
}
|
||||
if (!remainingFirstValues) {
|
||||
subscriber.next(valueTransform(values.slice()));
|
||||
}
|
||||
}, function () {
|
||||
if (!--active) {
|
||||
subscriber.complete();
|
||||
}
|
||||
}));
|
||||
}, subscriber);
|
||||
};
|
||||
for (var i = 0; i < length; i++) {
|
||||
_loop_1(i);
|
||||
}
|
||||
}, subscriber);
|
||||
};
|
||||
}
|
||||
exports.combineLatestInit = combineLatestInit;
|
||||
function maybeSchedule(scheduler, execute, subscription) {
|
||||
if (scheduler) {
|
||||
executeSchedule_1.executeSchedule(subscription, scheduler, execute);
|
||||
}
|
||||
else {
|
||||
execute();
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=combineLatest.js.map
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Math, "cbrt", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isFloat;
|
||||
exports.locales = void 0;
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
var _alpha = require("./alpha");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function isFloat(str, options) {
|
||||
(0, _assertString.default)(str);
|
||||
options = options || {};
|
||||
var float = new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(options.locale ? _alpha.decimal[options.locale] : '.', "[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$"));
|
||||
|
||||
if (str === '' || str === '.' || str === ',' || str === '-' || str === '+') {
|
||||
return false;
|
||||
}
|
||||
|
||||
var value = parseFloat(str.replace(',', '.'));
|
||||
return float.test(str) && (!options.hasOwnProperty('min') || value >= options.min) && (!options.hasOwnProperty('max') || value <= options.max) && (!options.hasOwnProperty('lt') || value < options.lt) && (!options.hasOwnProperty('gt') || value > options.gt);
|
||||
}
|
||||
|
||||
var locales = Object.keys(_alpha.decimal);
|
||||
exports.locales = locales;
|
||||
@@ -0,0 +1,2 @@
|
||||
if(typeof cptable === 'undefined') cptable = {};
|
||||
cptable[21866] = (function(){ var d = "ЪЪ\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {"enc": e, "dec": D }; })();
|
||||
@@ -0,0 +1,15 @@
|
||||
import { options } from 'preact';
|
||||
import { initDevTools } from './devtools';
|
||||
|
||||
initDevTools();
|
||||
|
||||
/**
|
||||
* Display a custom label for a custom hook for the devtools panel
|
||||
* @type {<T>(value: T, name: string) => T}
|
||||
*/
|
||||
export function addHookName(value, name) {
|
||||
if (options._addHookName) {
|
||||
options._addHookName(name);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"ip","version":"2.0.0","files":{"README.md":{"checkedAt":1678883672270,"integrity":"sha512-wBTN5RURrygoEMuzyH4L6GkkJ9fUjUXmFzGHATt09OJxKTM9fk4tbfH8fD9G5/4yx9A4wixeug/mxywwHX7erQ==","mode":420,"size":2796},"package.json":{"checkedAt":1678883672389,"integrity":"sha512-Lep9iJq7m7UmpuabhDgH1pxCS6+uvQyKkjP8hQC3IEFnAqTVPGxJ7cdR82ySSOb4R3hdATagxA9YehPEwK2GZg==","mode":420,"size":560},"lib/ip.js":{"checkedAt":1678883672392,"integrity":"sha512-K8b/ovQgUWF6AE6TKZrO3CGkYhZUcg7l8mWF5Do5Q9J2d4z4MBsik0qqJySch+Lo+48gMp6wduVsbTkzZloUvQ==","mode":420,"size":10251}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"notfound.js","sourceRoot":"","sources":["../src/notfound.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,MAAqB,aAAc,SAAQ,KAAK;IAG/C,YAAY,OAAgB;QAC3B,KAAK,CAAC,OAAO,IAAI,+CAA+C,CAAC,CAAC;QAH5D,SAAI,GAAG,WAAW,CAAC;QAIzB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;CACD;AAPD,gCAOC"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"2":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"2":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"2":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"2":"9C"},S:{"2":"AD BD"}},B:5,C:"Media Queries: scripting media feature"};
|
||||
@@ -0,0 +1,17 @@
|
||||
/*! node-DOMException. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
||||
|
||||
if (!globalThis.DOMException) {
|
||||
try {
|
||||
const { MessageChannel } = require('worker_threads'),
|
||||
port = new MessageChannel().port1,
|
||||
ab = new ArrayBuffer()
|
||||
port.postMessage(ab, [ab, ab])
|
||||
} catch (err) {
|
||||
console.log(err.code, err.name, err.message)
|
||||
err.constructor.name === 'DOMException' && (
|
||||
globalThis.DOMException = err.constructor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = globalThis.DOMException
|
||||
@@ -0,0 +1 @@
|
||||
export default function add_to_set<T>(a: Set<T>, b: Set<T> | T[]): void;
|
||||
@@ -0,0 +1,81 @@
|
||||
import * as fastq from '../'
|
||||
import { promise as queueAsPromised } from '../'
|
||||
|
||||
// Basic example
|
||||
|
||||
const queue = fastq(worker, 1)
|
||||
|
||||
queue.push('world', (err, result) => {
|
||||
if (err) throw err
|
||||
console.log('the result is', result)
|
||||
})
|
||||
|
||||
queue.push('push without cb')
|
||||
|
||||
queue.concurrency
|
||||
|
||||
queue.drain()
|
||||
|
||||
queue.empty = () => undefined
|
||||
|
||||
console.log('the queue tasks are', queue.getQueue())
|
||||
|
||||
queue.idle()
|
||||
|
||||
queue.kill()
|
||||
|
||||
queue.killAndDrain()
|
||||
|
||||
queue.length
|
||||
|
||||
queue.pause()
|
||||
|
||||
queue.resume()
|
||||
|
||||
queue.saturated = () => undefined
|
||||
|
||||
queue.unshift('world', (err, result) => {
|
||||
if (err) throw err
|
||||
console.log('the result is', result)
|
||||
})
|
||||
|
||||
queue.unshift('unshift without cb')
|
||||
|
||||
function worker(task: any, cb: fastq.done) {
|
||||
cb(null, 'hello ' + task)
|
||||
}
|
||||
|
||||
// Generics example
|
||||
|
||||
interface GenericsContext {
|
||||
base: number;
|
||||
}
|
||||
|
||||
const genericsQueue = fastq<GenericsContext, number, string>({ base: 6 }, genericsWorker, 1)
|
||||
|
||||
genericsQueue.push(7, (err, done) => {
|
||||
if (err) throw err
|
||||
console.log('the result is', done)
|
||||
})
|
||||
|
||||
genericsQueue.unshift(7, (err, done) => {
|
||||
if (err) throw err
|
||||
console.log('the result is', done)
|
||||
})
|
||||
|
||||
function genericsWorker(this: GenericsContext, task: number, cb: fastq.done<string>) {
|
||||
cb(null, 'the meaning of life is ' + (this.base * task))
|
||||
}
|
||||
|
||||
const queue2 = queueAsPromised(asyncWorker, 1)
|
||||
|
||||
async function asyncWorker(task: any) {
|
||||
return 'hello ' + task
|
||||
}
|
||||
|
||||
async function run () {
|
||||
await queue.push(42)
|
||||
await queue.unshift(42)
|
||||
}
|
||||
|
||||
run()
|
||||
@@ -0,0 +1,171 @@
|
||||
# External Editor
|
||||
|
||||
[](https://travis-ci.org/mrkmg/node-external-editor/branches)
|
||||
[](https://www.npmjs.com/package/external-editor)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
|
||||
|
||||
A node module to edit a string with a users preferred text editor using $VISUAL or $ENVIRONMENT.
|
||||
|
||||
Version: 3.1.0
|
||||
|
||||
As of version 3.0.0, the minimum version of node supported is 4.
|
||||
|
||||
## Install
|
||||
|
||||
`npm install external-editor --save`
|
||||
|
||||
## Usage
|
||||
|
||||
A simple example using the `.edit` convenience method
|
||||
|
||||
import {edit} from "external-editor";
|
||||
const data = edit('\n\n# Please write your text above');
|
||||
console.log(data);
|
||||
|
||||
A full featured example
|
||||
|
||||
import {ExternalEditor, CreateFileError, ReadFileError, RemoveFileError} from "external-editor"
|
||||
|
||||
try {
|
||||
const editor = new ExternalEditor();
|
||||
const text = editor.run() // the text is also available in editor.text
|
||||
|
||||
if (editor.last_exit_status !== 0) {
|
||||
console.log("The editor exited with a non-zero code");
|
||||
}
|
||||
} catch (err) {
|
||||
if (err instanceOf CreateFileError) {
|
||||
console.log('Failed to create the temporary file');
|
||||
} else if (err instanceOf ReadFileError) {
|
||||
console.log('Failed to read the temporary file');
|
||||
} else if (err instanceOf LaunchEditorError) {
|
||||
console.log('Failed to launch your editor');
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
// Do things with the text
|
||||
|
||||
// Eventually call the cleanup to remove the temporary file
|
||||
try {
|
||||
editor.cleanup();
|
||||
} catch (err) {
|
||||
if (err instanceOf RemoveFileError) {
|
||||
console.log('Failed to remove the temporary file');
|
||||
} else {
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#### API
|
||||
**Convenience Methods**
|
||||
|
||||
- `edit(text, config)`
|
||||
- `text` (string) *Optional* Defaults to empty string
|
||||
- `config` (Config) *Optional* Options for temporary file creation
|
||||
- **Returns** (string) The contents of the file
|
||||
- Could throw `CreateFileError`, `ReadFileError`, or `LaunchEditorError`, or `RemoveFileError`
|
||||
- `editAsync(text, callback, config)`
|
||||
- `text` (string) *Optional* Defaults to empty string
|
||||
- `callback` (function (error, text))
|
||||
- `error` could be of type `CreateFileError`, `ReadFileError`, or `LaunchEditorError`, or `RemoveFileError`
|
||||
- `text`(string) The contents of the file
|
||||
- `config` (Config) *Optional* Options for temporary file creation
|
||||
|
||||
|
||||
**Errors**
|
||||
|
||||
- `CreateFileError` Error thrown if the temporary file could not be created.
|
||||
- `ReadFileError` Error thrown if the temporary file could not be read.
|
||||
- `RemoveFileError` Error thrown if the temporary file could not be removed during cleanup.
|
||||
- `LaunchEditorError` Error thrown if the editor could not be launched.
|
||||
|
||||
**External Editor Public Methods**
|
||||
|
||||
- `new ExternalEditor(text, config)`
|
||||
- `text` (string) *Optional* Defaults to empty string
|
||||
- `config` (Config) *Optional* Options for temporary file creation
|
||||
- Could throw `CreateFileError`
|
||||
- `run()` Launches the editor.
|
||||
- **Returns** (string) The contents of the file
|
||||
- Could throw `LaunchEditorError` or `ReadFileError`
|
||||
- `runAsync(callback)` Launches the editor in an async way
|
||||
- `callback` (function (error, text))
|
||||
- `error` could be of type `ReadFileError` or `LaunchEditorError`
|
||||
- `text`(string) The contents of the file
|
||||
- `cleanup()` Removes the temporary file.
|
||||
- Could throw `RemoveFileError`
|
||||
|
||||
**External Editor Public Properties**
|
||||
|
||||
- `text` (string) *readonly* The text in the temporary file.
|
||||
- `editor.bin` (string) The editor determined from the environment.
|
||||
- `editor.args` (array) Default arguments for the bin
|
||||
- `tempFile` (string) Path to temporary file. Can be changed, but be careful as the temporary file probably already
|
||||
exists and would need be removed manually.
|
||||
- `lastExitStatus` (number) The last exit code emitted from the editor.
|
||||
|
||||
**Config Options**
|
||||
|
||||
- `prefix` (string) *Optional* A prefix for the file name.
|
||||
- `postfix` (string; *Optional* A postfix for the file name. Useful if you want to provide an extension.
|
||||
- `mode` (number) *Optional* Which mode to create the file with. e.g. 644
|
||||
- `template` (string) *Optional* A template for the filename. See [tmp](https://www.npmjs.com/package/tmp).
|
||||
- `dir` (string) *Optional* Which path to store the file.
|
||||
|
||||
## Errors
|
||||
|
||||
All errors have a simple message explaining what went wrong. They all also have an `originalError` property containing
|
||||
the original error thrown for debugging purposes.
|
||||
|
||||
## Why Synchronous?
|
||||
|
||||
Everything is synchronous to make sure the editor has complete control of the stdin and stdout. Testing has shown
|
||||
async launching of the editor can lead to issues when using readline or other packages which try to read from stdin or
|
||||
write to stdout. Seeing as this will be used in an interactive CLI environment, I made the decision to force the package
|
||||
to be synchronous. If you know a reliable way to force all stdin and stdout to be limited only to the child_process,
|
||||
please submit a PR.
|
||||
|
||||
If async is really needed, you can use `editAsync` or `runAsync`. If you are using readline or have anything else
|
||||
listening to the stdin or you write to stdout, you will most likely have problem, so make sure to remove any other
|
||||
listeners on stdin, stdout, or stderr.
|
||||
|
||||
## Demo
|
||||
|
||||
[](https://asciinema.org/a/a1qh9lypbe65mj0ivfuoslz2s)
|
||||
|
||||
## Breaking Changes from v2 to v3
|
||||
|
||||
- NodeJS 0.12 support dropped.
|
||||
- Switched to named imports.
|
||||
- All "snake_cased" variables and properties are now "camelCased".
|
||||
- `ExternalEditor.temp_file` is now `ExternalEditor.tempFile`.
|
||||
- `ExternalEditor.last_exit_status` is now `ExternalEditor.lastExitStatus`.
|
||||
- `Error.original_error` is now `Error.originalError`.
|
||||
|
||||
## License
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016-2018 Kevin Gravier
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"name": "is-number-object",
|
||||
"version": "1.0.7",
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"description": "Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test:corejs": "nyc tape test-corejs.js",
|
||||
"test": "npm run tests-only && npm run test:corejs",
|
||||
"posttest": "aud --production",
|
||||
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/inspect-js/is-number-object.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Number",
|
||||
"ES6",
|
||||
"toStringTag",
|
||||
"@@toStringTag",
|
||||
"Number object"
|
||||
],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/inspect-js/is-number-object/issues"
|
||||
},
|
||||
"homepage": "https://github.com/inspect-js/is-number-object#readme",
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^20.2.3",
|
||||
"aud": "^2.0.0",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"core-js": "^3.21.1",
|
||||
"eclint": "^2.8.1",
|
||||
"eslint": "=8.8.0",
|
||||
"foreach": "^2.0.5",
|
||||
"indexof": "^0.0.1",
|
||||
"is": "^3.3.0",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.5.2"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js",
|
||||
"browsers": [
|
||||
"iexplore/6.0..latest",
|
||||
"firefox/3.0..6.0",
|
||||
"firefox/15.0..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/4.0..10.0",
|
||||
"chrome/20.0..latest",
|
||||
"chrome/canary",
|
||||
"opera/10.0..latest",
|
||||
"opera/next",
|
||||
"safari/4.0..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"dependencies": {
|
||||
"has-tostringtag": "^1.0.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
'use strict';
|
||||
|
||||
/* eslint no-proto: 0 */
|
||||
|
||||
var parse = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('proto pollution', function (t) {
|
||||
var argv = parse(['--__proto__.x', '123']);
|
||||
t.equal({}.x, undefined);
|
||||
t.equal(argv.__proto__.x, undefined);
|
||||
t.equal(argv.x, undefined);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('proto pollution (array)', function (t) {
|
||||
var argv = parse(['--x', '4', '--x', '5', '--x.__proto__.z', '789']);
|
||||
t.equal({}.z, undefined);
|
||||
t.deepEqual(argv.x, [4, 5]);
|
||||
t.equal(argv.x.z, undefined);
|
||||
t.equal(argv.x.__proto__.z, undefined);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('proto pollution (number)', function (t) {
|
||||
var argv = parse(['--x', '5', '--x.__proto__.z', '100']);
|
||||
t.equal({}.z, undefined);
|
||||
t.equal((4).z, undefined);
|
||||
t.equal(argv.x, 5);
|
||||
t.equal(argv.x.z, undefined);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('proto pollution (string)', function (t) {
|
||||
var argv = parse(['--x', 'abc', '--x.__proto__.z', 'def']);
|
||||
t.equal({}.z, undefined);
|
||||
t.equal('...'.z, undefined);
|
||||
t.equal(argv.x, 'abc');
|
||||
t.equal(argv.x.z, undefined);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('proto pollution (constructor)', function (t) {
|
||||
var argv = parse(['--constructor.prototype.y', '123']);
|
||||
t.equal({}.y, undefined);
|
||||
t.equal(argv.y, undefined);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('proto pollution (constructor function)', function (t) {
|
||||
var argv = parse(['--_.concat.constructor.prototype.y', '123']);
|
||||
function fnToBeTested() {}
|
||||
t.equal(fnToBeTested.y, undefined);
|
||||
t.equal(argv.y, undefined);
|
||||
t.end();
|
||||
});
|
||||
|
||||
// powered by snyk - https://github.com/backstage/backstage/issues/10343
|
||||
test('proto pollution (constructor function) snyk', function (t) {
|
||||
var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' '));
|
||||
t.equal(function () {}.foo, undefined);
|
||||
t.equal(argv.y, undefined);
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
declare function isMap(value: any): boolean;
|
||||
export default isMap;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SubscriptionLog.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLog.ts"],"names":[],"mappings":"AAAA;IACE,yBAAmB,eAAuB,EACvB,iBAAoC;QAApC,kCAAA,EAAA,4BAAoC;QADpC,oBAAe,GAAf,eAAe,CAAQ;QACvB,sBAAiB,GAAjB,iBAAiB,CAAmB;IACvD,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,IAIC"}
|
||||
@@ -0,0 +1,3 @@
|
||||
import type { Options, PreprocessorGroup } from '../types';
|
||||
declare const _default: (options?: Options.Typescript) => PreprocessorGroup;
|
||||
export default _default;
|
||||
@@ -0,0 +1,31 @@
|
||||
define(['exports', 'module'], function (exports, module) {
|
||||
'use strict';
|
||||
|
||||
var AST = {
|
||||
// Public API used to evaluate derived attributes regarding AST nodes
|
||||
helpers: {
|
||||
// a mustache is definitely a helper if:
|
||||
// * it is an eligible helper, and
|
||||
// * it has at least one parameter or hash segment
|
||||
helperExpression: function helperExpression(node) {
|
||||
return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash);
|
||||
},
|
||||
|
||||
scopedId: function scopedId(path) {
|
||||
return (/^\.|this\b/.test(path.original)
|
||||
);
|
||||
},
|
||||
|
||||
// an ID is simple if it only has one part, and that part is not
|
||||
// `..` or `this`.
|
||||
simpleId: function simpleId(path) {
|
||||
return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Must be exported as an object rather than the root of the module as the jison lexer
|
||||
// must modify the object to operate properly.
|
||||
module.exports = AST;
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2NvbXBpbGVyL2FzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFJLEdBQUcsR0FBRzs7QUFFUixXQUFPLEVBQUU7Ozs7QUFJUCxzQkFBZ0IsRUFBRSwwQkFBUyxJQUFJLEVBQUU7QUFDL0IsZUFDRSxJQUFJLENBQUMsSUFBSSxLQUFLLGVBQWUsSUFDNUIsQ0FBQyxJQUFJLENBQUMsSUFBSSxLQUFLLG1CQUFtQixJQUNqQyxJQUFJLENBQUMsSUFBSSxLQUFLLGdCQUFnQixDQUFBLElBQzlCLENBQUMsRUFBRSxBQUFDLElBQUksQ0FBQyxNQUFNLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLElBQUssSUFBSSxDQUFDLElBQUksQ0FBQSxBQUFDLEFBQUMsQ0FDdkQ7T0FDSDs7QUFFRCxjQUFRLEVBQUUsa0JBQVMsSUFBSSxFQUFFO0FBQ3ZCLGVBQU8sYUFBWSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDO1VBQUM7T0FDekM7Ozs7QUFJRCxjQUFRLEVBQUUsa0JBQVMsSUFBSSxFQUFFO0FBQ3ZCLGVBQ0UsSUFBSSxDQUFDLEtBQUssQ0FBQyxNQUFNLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUNyRTtPQUNIO0tBQ0Y7R0FDRixDQUFDOzs7O21CQUlhLEdBQUciLCJmaWxlIjoiYXN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsibGV0IEFTVCA9IHtcbiAgLy8gUHVibGljIEFQSSB1c2VkIHRvIGV2YWx1YXRlIGRlcml2ZWQgYXR0cmlidXRlcyByZWdhcmRpbmcgQVNUIG5vZGVzXG4gIGhlbHBlcnM6IHtcbiAgICAvLyBhIG11c3RhY2hlIGlzIGRlZmluaXRlbHkgYSBoZWxwZXIgaWY6XG4gICAgLy8gKiBpdCBpcyBhbiBlbGlnaWJsZSBoZWxwZXIsIGFuZFxuICAgIC8vICogaXQgaGFzIGF0IGxlYXN0IG9uZSBwYXJhbWV0ZXIgb3IgaGFzaCBzZWdtZW50XG4gICAgaGVscGVyRXhwcmVzc2lvbjogZnVuY3Rpb24obm9kZSkge1xuICAgICAgcmV0dXJuIChcbiAgICAgICAgbm9kZS50eXBlID09PSAnU3ViRXhwcmVzc2lvbicgfHxcbiAgICAgICAgKChub2RlLnR5cGUgPT09ICdNdXN0YWNoZVN0YXRlbWVudCcgfHxcbiAgICAgICAgICBub2RlLnR5cGUgPT09ICdCbG9ja1N0YXRlbWVudCcpICYmXG4gICAgICAgICAgISEoKG5vZGUucGFyYW1zICYmIG5vZGUucGFyYW1zLmxlbmd0aCkgfHwgbm9kZS5oYXNoKSlcbiAgICAgICk7XG4gICAgfSxcblxuICAgIHNjb3BlZElkOiBmdW5jdGlvbihwYXRoKSB7XG4gICAgICByZXR1cm4gL15cXC58dGhpc1xcYi8udGVzdChwYXRoLm9yaWdpbmFsKTtcbiAgICB9LFxuXG4gICAgLy8gYW4gSUQgaXMgc2ltcGxlIGlmIGl0IG9ubHkgaGFzIG9uZSBwYXJ0LCBhbmQgdGhhdCBwYXJ0IGlzIG5vdFxuICAgIC8vIGAuLmAgb3IgYHRoaXNgLlxuICAgIHNpbXBsZUlkOiBmdW5jdGlvbihwYXRoKSB7XG4gICAgICByZXR1cm4gKFxuICAgICAgICBwYXRoLnBhcnRzLmxlbmd0aCA9PT0gMSAmJiAhQVNULmhlbHBlcnMuc2NvcGVkSWQocGF0aCkgJiYgIXBhdGguZGVwdGhcbiAgICAgICk7XG4gICAgfVxuICB9XG59O1xuXG4vLyBNdXN0IGJlIGV4cG9ydGVkIGFzIGFuIG9iamVjdCByYXRoZXIgdGhhbiB0aGUgcm9vdCBvZiB0aGUgbW9kdWxlIGFzIHRoZSBqaXNvbiBsZXhlclxuLy8gbXVzdCBtb2RpZnkgdGhlIG9iamVjdCB0byBvcGVyYXRlIHByb3Blcmx5LlxuZXhwb3J0IGRlZmF1bHQgQVNUO1xuIl19
|
||||
@@ -0,0 +1,151 @@
|
||||
### Version 4.0.0 (2018-01-28) ###
|
||||
|
||||
- Added: Support for ES2018. The only change needed was recognizing the `s`
|
||||
regex flag.
|
||||
- Changed: _All_ tokens returned by the `matchToToken` function now have a
|
||||
`closed` property. It is set to `undefined` for the tokens where “closed”
|
||||
doesn’t make sense. This means that all tokens objects have the same shape,
|
||||
which might improve performance.
|
||||
|
||||
These are the breaking changes:
|
||||
|
||||
- `'/a/s'.match(jsTokens)` no longer returns `['/', 'a', '/', 's']`, but
|
||||
`['/a/s']`. (There are of course other variations of this.)
|
||||
- Code that rely on some token objects not having the `closed` property could
|
||||
now behave differently.
|
||||
|
||||
|
||||
### Version 3.0.2 (2017-06-28) ###
|
||||
|
||||
- No code changes. Just updates to the readme.
|
||||
|
||||
|
||||
### Version 3.0.1 (2017-01-30) ###
|
||||
|
||||
- Fixed: ES2015 unicode escapes with more than 6 hex digits are now matched
|
||||
correctly.
|
||||
|
||||
|
||||
### Version 3.0.0 (2017-01-11) ###
|
||||
|
||||
This release contains one breaking change, that should [improve performance in
|
||||
V8][v8-perf]:
|
||||
|
||||
> So how can you, as a JavaScript developer, ensure that your RegExps are fast?
|
||||
> If you are not interested in hooking into RegExp internals, make sure that
|
||||
> neither the RegExp instance, nor its prototype is modified in order to get the
|
||||
> best performance:
|
||||
>
|
||||
> ```js
|
||||
> var re = /./g;
|
||||
> re.exec(''); // Fast path.
|
||||
> re.new_property = 'slow';
|
||||
> ```
|
||||
|
||||
This module used to export a single regex, with `.matchToToken` bolted
|
||||
on, just like in the above example. This release changes the exports of
|
||||
the module to avoid this issue.
|
||||
|
||||
Before:
|
||||
|
||||
```js
|
||||
import jsTokens from "js-tokens"
|
||||
// or:
|
||||
var jsTokens = require("js-tokens")
|
||||
var matchToToken = jsTokens.matchToToken
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```js
|
||||
import jsTokens, {matchToToken} from "js-tokens"
|
||||
// or:
|
||||
var jsTokens = require("js-tokens").default
|
||||
var matchToToken = require("js-tokens").matchToToken
|
||||
```
|
||||
|
||||
[v8-perf]: http://v8project.blogspot.se/2017/01/speeding-up-v8-regular-expressions.html
|
||||
|
||||
|
||||
### Version 2.0.0 (2016-06-19) ###
|
||||
|
||||
- Added: Support for ES2016. In other words, support for the `**` exponentiation
|
||||
operator.
|
||||
|
||||
These are the breaking changes:
|
||||
|
||||
- `'**'.match(jsTokens)` no longer returns `['*', '*']`, but `['**']`.
|
||||
- `'**='.match(jsTokens)` no longer returns `['*', '*=']`, but `['**=']`.
|
||||
|
||||
|
||||
### Version 1.0.3 (2016-03-27) ###
|
||||
|
||||
- Improved: Made the regex ever so slightly smaller.
|
||||
- Updated: The readme.
|
||||
|
||||
|
||||
### Version 1.0.2 (2015-10-18) ###
|
||||
|
||||
- Improved: Limited npm package contents for a smaller download. Thanks to
|
||||
@zertosh!
|
||||
|
||||
|
||||
### Version 1.0.1 (2015-06-20) ###
|
||||
|
||||
- Fixed: Declared an undeclared variable.
|
||||
|
||||
|
||||
### Version 1.0.0 (2015-02-26) ###
|
||||
|
||||
- Changed: Merged the 'operator' and 'punctuation' types into 'punctuator'. That
|
||||
type is now equivalent to the Punctuator token in the ECMAScript
|
||||
specification. (Backwards-incompatible change.)
|
||||
- Fixed: A `-` followed by a number is now correctly matched as a punctuator
|
||||
followed by a number. It used to be matched as just a number, but there is no
|
||||
such thing as negative number literals. (Possibly backwards-incompatible
|
||||
change.)
|
||||
|
||||
|
||||
### Version 0.4.1 (2015-02-21) ###
|
||||
|
||||
- Added: Support for the regex `u` flag.
|
||||
|
||||
|
||||
### Version 0.4.0 (2015-02-21) ###
|
||||
|
||||
- Improved: `jsTokens.matchToToken` performance.
|
||||
- Added: Support for octal and binary number literals.
|
||||
- Added: Support for template strings.
|
||||
|
||||
|
||||
### Version 0.3.1 (2015-01-06) ###
|
||||
|
||||
- Fixed: Support for unicode spaces. They used to be allowed in names (which is
|
||||
very confusing), and some unicode newlines were wrongly allowed in strings and
|
||||
regexes.
|
||||
|
||||
|
||||
### Version 0.3.0 (2014-12-19) ###
|
||||
|
||||
- Changed: The `jsTokens.names` array has been replaced with the
|
||||
`jsTokens.matchToToken` function. The capturing groups of `jsTokens` are no
|
||||
longer part of the public API; instead use said function. See this [gist] for
|
||||
an example. (Backwards-incompatible change.)
|
||||
- Changed: The empty string is now considered an “invalid” token, instead an
|
||||
“empty” token (its own group). (Backwards-incompatible change.)
|
||||
- Removed: component support. (Backwards-incompatible change.)
|
||||
|
||||
[gist]: https://gist.github.com/lydell/be49dbf80c382c473004
|
||||
|
||||
|
||||
### Version 0.2.0 (2014-06-19) ###
|
||||
|
||||
- Changed: Match ES6 function arrows (`=>`) as an operator, instead of its own
|
||||
category (“functionArrow”), for simplicity. (Backwards-incompatible change.)
|
||||
- Added: ES6 splats (`...`) are now matched as an operator (instead of three
|
||||
punctuations). (Backwards-incompatible change.)
|
||||
|
||||
|
||||
### Version 0.1.0 (2014-03-08) ###
|
||||
|
||||
- Initial release.
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./async').map;
|
||||
@@ -0,0 +1,91 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isCurrency;
|
||||
|
||||
var _merge = _interopRequireDefault(require("./util/merge"));
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function currencyRegex(options) {
|
||||
var decimal_digits = "\\d{".concat(options.digits_after_decimal[0], "}");
|
||||
options.digits_after_decimal.forEach(function (digit, index) {
|
||||
if (index !== 0) decimal_digits = "".concat(decimal_digits, "|\\d{").concat(digit, "}");
|
||||
});
|
||||
var symbol = "(".concat(options.symbol.replace(/\W/, function (m) {
|
||||
return "\\".concat(m);
|
||||
}), ")").concat(options.require_symbol ? '' : '?'),
|
||||
negative = '-?',
|
||||
whole_dollar_amount_without_sep = '[1-9]\\d*',
|
||||
whole_dollar_amount_with_sep = "[1-9]\\d{0,2}(\\".concat(options.thousands_separator, "\\d{3})*"),
|
||||
valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep],
|
||||
whole_dollar_amount = "(".concat(valid_whole_dollar_amounts.join('|'), ")?"),
|
||||
decimal_amount = "(\\".concat(options.decimal_separator, "(").concat(decimal_digits, "))").concat(options.require_decimal ? '' : '?');
|
||||
var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : ''); // default is negative sign before symbol, but there are two other options (besides parens)
|
||||
|
||||
if (options.allow_negatives && !options.parens_for_negatives) {
|
||||
if (options.negative_sign_after_digits) {
|
||||
pattern += negative;
|
||||
} else if (options.negative_sign_before_digits) {
|
||||
pattern = negative + pattern;
|
||||
}
|
||||
} // South African Rand, for example, uses R 123 (space) and R-123 (no space)
|
||||
|
||||
|
||||
if (options.allow_negative_sign_placeholder) {
|
||||
pattern = "( (?!\\-))?".concat(pattern);
|
||||
} else if (options.allow_space_after_symbol) {
|
||||
pattern = " ?".concat(pattern);
|
||||
} else if (options.allow_space_after_digits) {
|
||||
pattern += '( (?!$))?';
|
||||
}
|
||||
|
||||
if (options.symbol_after_digits) {
|
||||
pattern += symbol;
|
||||
} else {
|
||||
pattern = symbol + pattern;
|
||||
}
|
||||
|
||||
if (options.allow_negatives) {
|
||||
if (options.parens_for_negatives) {
|
||||
pattern = "(\\(".concat(pattern, "\\)|").concat(pattern, ")");
|
||||
} else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) {
|
||||
pattern = negative + pattern;
|
||||
}
|
||||
} // ensure there's a dollar and/or decimal amount, and that
|
||||
// it doesn't start with a space or a negative sign followed by a space
|
||||
|
||||
|
||||
return new RegExp("^(?!-? )(?=.*\\d)".concat(pattern, "$"));
|
||||
}
|
||||
|
||||
var default_currency_options = {
|
||||
symbol: '$',
|
||||
require_symbol: false,
|
||||
allow_space_after_symbol: false,
|
||||
symbol_after_digits: false,
|
||||
allow_negatives: true,
|
||||
parens_for_negatives: false,
|
||||
negative_sign_before_digits: false,
|
||||
negative_sign_after_digits: false,
|
||||
allow_negative_sign_placeholder: false,
|
||||
thousands_separator: ',',
|
||||
decimal_separator: '.',
|
||||
allow_decimal: true,
|
||||
require_decimal: false,
|
||||
digits_after_decimal: [2],
|
||||
allow_space_after_digits: false
|
||||
};
|
||||
|
||||
function isCurrency(str, options) {
|
||||
(0, _assertString.default)(str);
|
||||
options = (0, _merge.default)(options, default_currency_options);
|
||||
return currencyRegex(options).test(str);
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,66 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
// var $BigInt = GetIntrinsic('%BigInt%', true);
|
||||
// var $pow = GetIntrinsic('%Math.pow%');
|
||||
|
||||
// var BinaryAnd = require('./BinaryAnd');
|
||||
// var BinaryOr = require('./BinaryOr');
|
||||
// var BinaryXor = require('./BinaryXor');
|
||||
var Type = require('./Type');
|
||||
// var modulo = require('./modulo');
|
||||
|
||||
// var zero = $BigInt && $BigInt(0);
|
||||
// var negOne = $BigInt && $BigInt(-1);
|
||||
// var two = $BigInt && $BigInt(2);
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-bigintbitwiseop
|
||||
|
||||
module.exports = function BigIntBitwiseOp(op, x, y) {
|
||||
if (op !== '&' && op !== '|' && op !== '^') {
|
||||
throw new $TypeError('Assertion failed: `op` must be `&`, `|`, or `^`');
|
||||
}
|
||||
if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
|
||||
throw new $TypeError('`x` and `y` must be BigInts');
|
||||
}
|
||||
|
||||
if (op === '&') {
|
||||
return x & y;
|
||||
}
|
||||
if (op === '|') {
|
||||
return x | y;
|
||||
}
|
||||
return x ^ y;
|
||||
/*
|
||||
var result = zero;
|
||||
var shift = 0;
|
||||
while (x !== zero && x !== negOne && y !== zero && y !== negOne) {
|
||||
var xDigit = modulo(x, two);
|
||||
var yDigit = modulo(y, two);
|
||||
if (op === '&') {
|
||||
result += $pow(2, shift) * BinaryAnd(xDigit, yDigit);
|
||||
} else if (op === '|') {
|
||||
result += $pow(2, shift) * BinaryOr(xDigit, yDigit);
|
||||
} else if (op === '^') {
|
||||
result += $pow(2, shift) * BinaryXor(xDigit, yDigit);
|
||||
}
|
||||
shift += 1;
|
||||
x = (x - xDigit) / two;
|
||||
y = (y - yDigit) / two;
|
||||
}
|
||||
var tmp;
|
||||
if (op === '&') {
|
||||
tmp = BinaryAnd(modulo(x, two), modulo(y, two));
|
||||
} else if (op === '|') {
|
||||
tmp = BinaryAnd(modulo(x, two), modulo(y, two));
|
||||
} else {
|
||||
tmp = BinaryXor(modulo(x, two), modulo(y, two));
|
||||
}
|
||||
if (tmp !== 0) {
|
||||
result -= $pow(2, shift);
|
||||
}
|
||||
return result;
|
||||
*/
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('rangeStepRight', require('../rangeRight'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
||||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
||||
to[j] = from[i];
|
||||
return to;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.concatWith = void 0;
|
||||
var concat_1 = require("./concat");
|
||||
function concatWith() {
|
||||
var otherSources = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
otherSources[_i] = arguments[_i];
|
||||
}
|
||||
return concat_1.concat.apply(void 0, __spreadArray([], __read(otherSources)));
|
||||
}
|
||||
exports.concatWith = concatWith;
|
||||
//# sourceMappingURL=concatWith.js.map
|
||||
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
var $isFinite = require('../helpers/isFinite');
|
||||
var timeConstants = require('../helpers/timeConstants');
|
||||
var msPerSecond = timeConstants.msPerSecond;
|
||||
var msPerMinute = timeConstants.msPerMinute;
|
||||
var msPerHour = timeConstants.msPerHour;
|
||||
|
||||
var ToInteger = require('./ToInteger');
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.11
|
||||
|
||||
module.exports = function MakeTime(hour, min, sec, ms) {
|
||||
if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) {
|
||||
return NaN;
|
||||
}
|
||||
var h = ToInteger(hour);
|
||||
var m = ToInteger(min);
|
||||
var s = ToInteger(sec);
|
||||
var milli = ToInteger(ms);
|
||||
var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
|
||||
return t;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"createObject.js","sourceRoot":"","sources":["../../../../src/internal/util/createObject.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAC,IAAc,EAAE,MAAa;IACxD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAS,CAAC,CAAC;AACzF,CAAC"}
|
||||
@@ -0,0 +1,6 @@
|
||||
const { createId, init, getConstants, isCuid } = require("./src/index");
|
||||
|
||||
module.exports.createId = createId;
|
||||
module.exports.init = init;
|
||||
module.exports.getConstants = getConstants;
|
||||
module.exports.isCuid = isCuid;
|
||||
@@ -0,0 +1,4 @@
|
||||
scripts/
|
||||
test/
|
||||
|
||||
!lib/mapping_table.json
|
||||
@@ -0,0 +1,78 @@
|
||||
[![Build status][nix-build-image]][nix-build-url]
|
||||
[![Windows status][win-build-image]][win-build-url]
|
||||
![Transpilation status][transpilation-image]
|
||||
[![npm version][npm-image]][npm-url]
|
||||
|
||||
# es6-weak-map
|
||||
|
||||
## WeakMap collection as specified in ECMAScript6
|
||||
|
||||
_Roughly inspired by Mark Miller's and Kris Kowal's [WeakMap implementation](https://github.com/drses/weak-map)_.
|
||||
|
||||
Differences are:
|
||||
|
||||
- Assumes compliant ES5 environment (no weird ES3 workarounds or hacks)
|
||||
- Well modularized CJS style
|
||||
- Based on one solution.
|
||||
|
||||
### Limitations
|
||||
|
||||
- Will fail on non extensible objects provided as keys
|
||||
|
||||
### Installation
|
||||
|
||||
$ npm install es6-weak-map
|
||||
|
||||
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/)
|
||||
|
||||
### Usage
|
||||
|
||||
If you want to make sure your environment implements `WeakMap`, do:
|
||||
|
||||
```javascript
|
||||
require("es6-weak-map/implement");
|
||||
```
|
||||
|
||||
If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `WeakMap` on global scope, do:
|
||||
|
||||
```javascript
|
||||
var WeakMap = require("es6-weak-map");
|
||||
```
|
||||
|
||||
If you strictly want to use polyfill even if native `WeakMap` exists, do:
|
||||
|
||||
```javascript
|
||||
var WeakMap = require("es6-weak-map/polyfill");
|
||||
```
|
||||
|
||||
#### API
|
||||
|
||||
Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakmap-objects). Still if you want quick look, follow example:
|
||||
|
||||
```javascript
|
||||
var WeakMap = require("es6-weak-map");
|
||||
|
||||
var map = new WeakMap();
|
||||
var obj = {};
|
||||
|
||||
map.set(obj, "foo"); // map
|
||||
map.get(obj); // 'foo'
|
||||
map.has(obj); // true
|
||||
map.delete(obj); // true
|
||||
map.get(obj); // undefined
|
||||
map.has(obj); // false
|
||||
map.set(obj, "bar"); // map
|
||||
map.has(obj); // false
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
$ npm test
|
||||
|
||||
[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es6-weak-map/branches/master/shields_badge.svg
|
||||
[nix-build-url]: https://semaphoreci.com/medikoo-org/es6-weak-map
|
||||
[win-build-image]: https://ci.appveyor.com/api/projects/status/1c73c57pg4s6lwmu?svg=true
|
||||
[win-build-url]: https://ci.appveyor.com/project/medikoo/es6-weak-map
|
||||
[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg
|
||||
[npm-image]: https://img.shields.io/npm/v/es6-weak-map.svg
|
||||
[npm-url]: https://www.npmjs.com/package/es6-weak-map
|
||||
@@ -0,0 +1,118 @@
|
||||
var path = require('path');
|
||||
var url = require('url');
|
||||
|
||||
var DOUBLE_QUOTE = '"';
|
||||
var SINGLE_QUOTE = '\'';
|
||||
var URL_PREFIX = 'url(';
|
||||
var URL_SUFFIX = ')';
|
||||
|
||||
var QUOTE_PREFIX_PATTERN = /^["']/;
|
||||
var QUOTE_SUFFIX_PATTERN = /["']$/;
|
||||
var ROUND_BRACKETS_PATTERN = /[\(\)]/;
|
||||
var URL_PREFIX_PATTERN = /^url\(/i;
|
||||
var URL_SUFFIX_PATTERN = /\)$/;
|
||||
var WHITESPACE_PATTERN = /\s/;
|
||||
|
||||
var isWindows = process.platform == 'win32';
|
||||
|
||||
function rebase(uri, rebaseConfig) {
|
||||
if (!rebaseConfig) {
|
||||
return uri;
|
||||
}
|
||||
|
||||
if (isAbsolute(uri) && !isRemote(rebaseConfig.toBase)) {
|
||||
return uri;
|
||||
}
|
||||
|
||||
if (isRemote(uri) || isSVGMarker(uri) || isInternal(uri)) {
|
||||
return uri;
|
||||
}
|
||||
|
||||
if (isData(uri)) {
|
||||
return '\'' + uri + '\'';
|
||||
}
|
||||
|
||||
if (isRemote(rebaseConfig.toBase)) {
|
||||
return url.resolve(rebaseConfig.toBase, uri);
|
||||
}
|
||||
|
||||
return rebaseConfig.absolute ?
|
||||
normalize(absolute(uri, rebaseConfig)) :
|
||||
normalize(relative(uri, rebaseConfig));
|
||||
}
|
||||
|
||||
function isAbsolute(uri) {
|
||||
return path.isAbsolute(uri);
|
||||
}
|
||||
|
||||
function isSVGMarker(uri) {
|
||||
return uri[0] == '#';
|
||||
}
|
||||
|
||||
function isInternal(uri) {
|
||||
return /^\w+:\w+/.test(uri);
|
||||
}
|
||||
|
||||
function isRemote(uri) {
|
||||
return /^[^:]+?:\/\//.test(uri) || uri.indexOf('//') === 0;
|
||||
}
|
||||
|
||||
function isData(uri) {
|
||||
return uri.indexOf('data:') === 0;
|
||||
}
|
||||
|
||||
function absolute(uri, rebaseConfig) {
|
||||
return path
|
||||
.resolve(path.join(rebaseConfig.fromBase || '', uri))
|
||||
.replace(rebaseConfig.toBase, '');
|
||||
}
|
||||
|
||||
function relative(uri, rebaseConfig) {
|
||||
return path.relative(rebaseConfig.toBase, path.join(rebaseConfig.fromBase || '', uri));
|
||||
}
|
||||
|
||||
function normalize(uri) {
|
||||
return isWindows ? uri.replace(/\\/g, '/') : uri;
|
||||
}
|
||||
|
||||
function quoteFor(unquotedUrl) {
|
||||
if (unquotedUrl.indexOf(SINGLE_QUOTE) > -1) {
|
||||
return DOUBLE_QUOTE;
|
||||
} else if (unquotedUrl.indexOf(DOUBLE_QUOTE) > -1) {
|
||||
return SINGLE_QUOTE;
|
||||
} else if (hasWhitespace(unquotedUrl) || hasRoundBrackets(unquotedUrl)) {
|
||||
return SINGLE_QUOTE;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function hasWhitespace(url) {
|
||||
return WHITESPACE_PATTERN.test(url);
|
||||
}
|
||||
|
||||
function hasRoundBrackets(url) {
|
||||
return ROUND_BRACKETS_PATTERN.test(url);
|
||||
}
|
||||
|
||||
function rewriteUrl(originalUrl, rebaseConfig, pathOnly) {
|
||||
var strippedUrl = originalUrl
|
||||
.replace(URL_PREFIX_PATTERN, '')
|
||||
.replace(URL_SUFFIX_PATTERN, '')
|
||||
.trim();
|
||||
|
||||
var unquotedUrl = strippedUrl
|
||||
.replace(QUOTE_PREFIX_PATTERN, '')
|
||||
.replace(QUOTE_SUFFIX_PATTERN, '')
|
||||
.trim();
|
||||
|
||||
var quote = strippedUrl[0] == SINGLE_QUOTE || strippedUrl[0] == DOUBLE_QUOTE ?
|
||||
strippedUrl[0] :
|
||||
quoteFor(unquotedUrl);
|
||||
|
||||
return pathOnly ?
|
||||
rebase(unquotedUrl, rebaseConfig) :
|
||||
URL_PREFIX + quote + rebase(unquotedUrl, rebaseConfig) + quote + URL_SUFFIX;
|
||||
}
|
||||
|
||||
module.exports = rewriteUrl;
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "preact-devtools",
|
||||
"amdName": "preactDevtools",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "Preact bridge for Preact devtools",
|
||||
"main": "dist/devtools.js",
|
||||
"module": "dist/devtools.module.js",
|
||||
"umd:main": "dist/devtools.umd.js",
|
||||
"source": "src/index.js",
|
||||
"license": "MIT",
|
||||
"types": "src/index.d.ts",
|
||||
"peerDependencies": {
|
||||
"preact": "^10.0.0"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.d.ts",
|
||||
"browser": "./dist/devtools.module.js",
|
||||
"umd": "./dist/devtools.umd.js",
|
||||
"import": "./dist/devtools.mjs",
|
||||
"require": "./dist/devtools.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user