first
This commit is contained in:
1
node_modules/core-js/internals/README.md
generated
vendored
Normal file
1
node_modules/core-js/internals/README.md
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
This folder contains internal parts of `core-js` like helpers.
|
11
node_modules/core-js/internals/a-callable.js
generated
vendored
Normal file
11
node_modules/core-js/internals/a-callable.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
var isCallable = require('../internals/is-callable');
|
||||
var tryToString = require('../internals/try-to-string');
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
// `Assert: IsCallable(argument) is true`
|
||||
module.exports = function (argument) {
|
||||
if (isCallable(argument)) return argument;
|
||||
throw $TypeError(tryToString(argument) + ' is not a function');
|
||||
};
|
11
node_modules/core-js/internals/a-constructor.js
generated
vendored
Normal file
11
node_modules/core-js/internals/a-constructor.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
var isConstructor = require('../internals/is-constructor');
|
||||
var tryToString = require('../internals/try-to-string');
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
// `Assert: IsConstructor(argument) is true`
|
||||
module.exports = function (argument) {
|
||||
if (isConstructor(argument)) return argument;
|
||||
throw $TypeError(tryToString(argument) + ' is not a constructor');
|
||||
};
|
8
node_modules/core-js/internals/a-map.js
generated
vendored
Normal file
8
node_modules/core-js/internals/a-map.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
var has = require('../internals/map-helpers').has;
|
||||
|
||||
// Perform ? RequireInternalSlot(M, [[MapData]])
|
||||
module.exports = function (it) {
|
||||
has(it);
|
||||
return it;
|
||||
};
|
10
node_modules/core-js/internals/a-possible-prototype.js
generated
vendored
Normal file
10
node_modules/core-js/internals/a-possible-prototype.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
var isCallable = require('../internals/is-callable');
|
||||
|
||||
var $String = String;
|
||||
var $TypeError = TypeError;
|
||||
|
||||
module.exports = function (argument) {
|
||||
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
||||
throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
|
||||
};
|
8
node_modules/core-js/internals/a-set.js
generated
vendored
Normal file
8
node_modules/core-js/internals/a-set.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
var has = require('../internals/set-helpers').has;
|
||||
|
||||
// Perform ? RequireInternalSlot(M, [[SetData]])
|
||||
module.exports = function (it) {
|
||||
has(it);
|
||||
return it;
|
||||
};
|
8
node_modules/core-js/internals/a-weak-map.js
generated
vendored
Normal file
8
node_modules/core-js/internals/a-weak-map.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
var has = require('../internals/weak-map-helpers').has;
|
||||
|
||||
// Perform ? RequireInternalSlot(M, [[WeakMapData]])
|
||||
module.exports = function (it) {
|
||||
has(it);
|
||||
return it;
|
||||
};
|
8
node_modules/core-js/internals/a-weak-set.js
generated
vendored
Normal file
8
node_modules/core-js/internals/a-weak-set.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
var has = require('../internals/weak-set-helpers').has;
|
||||
|
||||
// Perform ? RequireInternalSlot(M, [[WeakSetData]])
|
||||
module.exports = function (it) {
|
||||
has(it);
|
||||
return it;
|
||||
};
|
55
node_modules/core-js/internals/add-disposable-resource.js
generated
vendored
Normal file
55
node_modules/core-js/internals/add-disposable-resource.js
generated
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
'use strict';
|
||||
var call = require('../internals/function-call');
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var bind = require('../internals/function-bind-context');
|
||||
var anObject = require('../internals/an-object');
|
||||
var aCallable = require('../internals/a-callable');
|
||||
var isNullOrUndefined = require('../internals/is-null-or-undefined');
|
||||
var getMethod = require('../internals/get-method');
|
||||
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||||
|
||||
var ASYNC_DISPOSE = wellKnownSymbol('asyncDispose');
|
||||
var DISPOSE = wellKnownSymbol('dispose');
|
||||
|
||||
var push = uncurryThis([].push);
|
||||
|
||||
// `GetDisposeMethod` abstract operation
|
||||
// https://tc39.es/proposal-explicit-resource-management/#sec-getdisposemethod
|
||||
var getDisposeMethod = function (V, hint) {
|
||||
if (hint === 'async-dispose') {
|
||||
var method = getMethod(V, ASYNC_DISPOSE);
|
||||
if (method !== undefined) return method;
|
||||
method = getMethod(V, DISPOSE);
|
||||
return function () {
|
||||
call(method, this);
|
||||
};
|
||||
} return getMethod(V, DISPOSE);
|
||||
};
|
||||
|
||||
// `CreateDisposableResource` abstract operation
|
||||
// https://tc39.es/proposal-explicit-resource-management/#sec-createdisposableresource
|
||||
var createDisposableResource = function (V, hint, method) {
|
||||
if (arguments.length < 3 && !isNullOrUndefined(V)) {
|
||||
method = aCallable(getDisposeMethod(anObject(V), hint));
|
||||
}
|
||||
|
||||
return method === undefined ? function () {
|
||||
return undefined;
|
||||
} : bind(method, V);
|
||||
};
|
||||
|
||||
// `AddDisposableResource` abstract operation
|
||||
// https://tc39.es/proposal-explicit-resource-management/#sec-adddisposableresource
|
||||
module.exports = function (disposable, V, hint, method) {
|
||||
var resource;
|
||||
if (arguments.length < 4) {
|
||||
// When `V`` is either `null` or `undefined` and hint is `async-dispose`,
|
||||
// we record that the resource was evaluated to ensure we will still perform an `Await` when resources are later disposed.
|
||||
if (isNullOrUndefined(V) && hint === 'sync-dispose') return;
|
||||
resource = createDisposableResource(V, hint);
|
||||
} else {
|
||||
resource = createDisposableResource(undefined, hint, method);
|
||||
}
|
||||
|
||||
push(disposable.stack, resource);
|
||||
};
|
21
node_modules/core-js/internals/add-to-unscopables.js
generated
vendored
Normal file
21
node_modules/core-js/internals/add-to-unscopables.js
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||||
var create = require('../internals/object-create');
|
||||
var defineProperty = require('../internals/object-define-property').f;
|
||||
|
||||
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
||||
var ArrayPrototype = Array.prototype;
|
||||
|
||||
// Array.prototype[@@unscopables]
|
||||
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
||||
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
||||
defineProperty(ArrayPrototype, UNSCOPABLES, {
|
||||
configurable: true,
|
||||
value: create(null)
|
||||
});
|
||||
}
|
||||
|
||||
// add a key to Array.prototype[@@unscopables]
|
||||
module.exports = function (key) {
|
||||
ArrayPrototype[UNSCOPABLES][key] = true;
|
||||
};
|
8
node_modules/core-js/internals/advance-string-index.js
generated
vendored
Normal file
8
node_modules/core-js/internals/advance-string-index.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
var charAt = require('../internals/string-multibyte').charAt;
|
||||
|
||||
// `AdvanceStringIndex` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-advancestringindex
|
||||
module.exports = function (S, index, unicode) {
|
||||
return index + (unicode ? charAt(S, index).length : 1);
|
||||
};
|
9
node_modules/core-js/internals/an-instance.js
generated
vendored
Normal file
9
node_modules/core-js/internals/an-instance.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
var isPrototypeOf = require('../internals/object-is-prototype-of');
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
module.exports = function (it, Prototype) {
|
||||
if (isPrototypeOf(Prototype, it)) return it;
|
||||
throw $TypeError('Incorrect invocation');
|
||||
};
|
11
node_modules/core-js/internals/an-object.js
generated
vendored
Normal file
11
node_modules/core-js/internals/an-object.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
var isObject = require('../internals/is-object');
|
||||
|
||||
var $String = String;
|
||||
var $TypeError = TypeError;
|
||||
|
||||
// `Assert: Type(argument) is Object`
|
||||
module.exports = function (argument) {
|
||||
if (isObject(argument)) return argument;
|
||||
throw $TypeError($String(argument) + ' is not an object');
|
||||
};
|
3
node_modules/core-js/internals/array-buffer-basic-detection.js
generated
vendored
Normal file
3
node_modules/core-js/internals/array-buffer-basic-detection.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
// eslint-disable-next-line es/no-typed-arrays -- safe
|
||||
module.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
13
node_modules/core-js/internals/array-buffer-byte-length.js
generated
vendored
Normal file
13
node_modules/core-js/internals/array-buffer-byte-length.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
var uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');
|
||||
var classof = require('../internals/classof-raw');
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
// Includes
|
||||
// - Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).
|
||||
// - If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
|
||||
module.exports = uncurryThisAccessor(ArrayBuffer.prototype, 'byteLength', 'get') || function (O) {
|
||||
if (classof(O) != 'ArrayBuffer') throw $TypeError('ArrayBuffer expected');
|
||||
return O.byteLength;
|
||||
};
|
15
node_modules/core-js/internals/array-buffer-is-detached.js
generated
vendored
Normal file
15
node_modules/core-js/internals/array-buffer-is-detached.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var arrayBufferByteLength = require('../internals/array-buffer-byte-length');
|
||||
|
||||
var slice = uncurryThis(ArrayBuffer.prototype.slice);
|
||||
|
||||
module.exports = function (O) {
|
||||
if (arrayBufferByteLength(O) !== 0) return false;
|
||||
try {
|
||||
slice(O, 0, 0);
|
||||
return false;
|
||||
} catch (error) {
|
||||
return true;
|
||||
}
|
||||
};
|
11
node_modules/core-js/internals/array-buffer-non-extensible.js
generated
vendored
Normal file
11
node_modules/core-js/internals/array-buffer-non-extensible.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it
|
||||
var fails = require('../internals/fails');
|
||||
|
||||
module.exports = fails(function () {
|
||||
if (typeof ArrayBuffer == 'function') {
|
||||
var buffer = new ArrayBuffer(8);
|
||||
// eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe
|
||||
if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });
|
||||
}
|
||||
});
|
38
node_modules/core-js/internals/array-buffer-transfer.js
generated
vendored
Normal file
38
node_modules/core-js/internals/array-buffer-transfer.js
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
'use strict';
|
||||
var global = require('../internals/global');
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');
|
||||
var toIndex = require('../internals/to-index');
|
||||
var isDetached = require('../internals/array-buffer-is-detached');
|
||||
var arrayBufferByteLength = require('../internals/array-buffer-byte-length');
|
||||
var PROPER_TRANSFER = require('../internals/structured-clone-proper-transfer');
|
||||
|
||||
var TypeError = global.TypeError;
|
||||
var structuredClone = global.structuredClone;
|
||||
var ArrayBuffer = global.ArrayBuffer;
|
||||
var DataView = global.DataView;
|
||||
var min = Math.min;
|
||||
var ArrayBufferPrototype = ArrayBuffer.prototype;
|
||||
var DataViewPrototype = DataView.prototype;
|
||||
var slice = uncurryThis(ArrayBufferPrototype.slice);
|
||||
var isResizable = uncurryThisAccessor(ArrayBufferPrototype, 'resizable', 'get');
|
||||
var maxByteLength = uncurryThisAccessor(ArrayBufferPrototype, 'maxByteLength', 'get');
|
||||
var getInt8 = uncurryThis(DataViewPrototype.getInt8);
|
||||
var setInt8 = uncurryThis(DataViewPrototype.setInt8);
|
||||
|
||||
module.exports = PROPER_TRANSFER && function (arrayBuffer, newLength, preserveResizability) {
|
||||
var byteLength = arrayBufferByteLength(arrayBuffer);
|
||||
var newByteLength = newLength === undefined ? byteLength : toIndex(newLength);
|
||||
var fixedLength = !isResizable || !isResizable(arrayBuffer);
|
||||
if (isDetached(arrayBuffer)) throw TypeError('ArrayBuffer is detached');
|
||||
var newBuffer = structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
|
||||
if (byteLength == newByteLength && (preserveResizability || fixedLength)) return newBuffer;
|
||||
if (byteLength >= newByteLength && (!preserveResizability || fixedLength)) return slice(newBuffer, 0, newByteLength);
|
||||
var options = (preserveResizability && !fixedLength) && maxByteLength ? { maxByteLength: maxByteLength(newBuffer) } : undefined;
|
||||
var newNewBuffer = new ArrayBuffer(newByteLength, options);
|
||||
var a = new DataView(newBuffer);
|
||||
var b = new DataView(newNewBuffer);
|
||||
var copyLength = min(newByteLength, byteLength);
|
||||
for (var i = 0; i < copyLength; i++) setInt8(b, i, getInt8(a, i));
|
||||
return newNewBuffer;
|
||||
};
|
193
node_modules/core-js/internals/array-buffer-view-core.js
generated
vendored
Normal file
193
node_modules/core-js/internals/array-buffer-view-core.js
generated
vendored
Normal file
@ -0,0 +1,193 @@
|
||||
'use strict';
|
||||
var NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');
|
||||
var DESCRIPTORS = require('../internals/descriptors');
|
||||
var global = require('../internals/global');
|
||||
var isCallable = require('../internals/is-callable');
|
||||
var isObject = require('../internals/is-object');
|
||||
var hasOwn = require('../internals/has-own-property');
|
||||
var classof = require('../internals/classof');
|
||||
var tryToString = require('../internals/try-to-string');
|
||||
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
|
||||
var defineBuiltIn = require('../internals/define-built-in');
|
||||
var defineBuiltInAccessor = require('../internals/define-built-in-accessor');
|
||||
var isPrototypeOf = require('../internals/object-is-prototype-of');
|
||||
var getPrototypeOf = require('../internals/object-get-prototype-of');
|
||||
var setPrototypeOf = require('../internals/object-set-prototype-of');
|
||||
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||||
var uid = require('../internals/uid');
|
||||
var InternalStateModule = require('../internals/internal-state');
|
||||
|
||||
var enforceInternalState = InternalStateModule.enforce;
|
||||
var getInternalState = InternalStateModule.get;
|
||||
var Int8Array = global.Int8Array;
|
||||
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
|
||||
var Uint8ClampedArray = global.Uint8ClampedArray;
|
||||
var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
|
||||
var TypedArray = Int8Array && getPrototypeOf(Int8Array);
|
||||
var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
|
||||
var ObjectPrototype = Object.prototype;
|
||||
var TypeError = global.TypeError;
|
||||
|
||||
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
||||
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
|
||||
var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
|
||||
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
||||
var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
|
||||
var TYPED_ARRAY_TAG_REQUIRED = false;
|
||||
var NAME, Constructor, Prototype;
|
||||
|
||||
var TypedArrayConstructorsList = {
|
||||
Int8Array: 1,
|
||||
Uint8Array: 1,
|
||||
Uint8ClampedArray: 1,
|
||||
Int16Array: 2,
|
||||
Uint16Array: 2,
|
||||
Int32Array: 4,
|
||||
Uint32Array: 4,
|
||||
Float32Array: 4,
|
||||
Float64Array: 8
|
||||
};
|
||||
|
||||
var BigIntArrayConstructorsList = {
|
||||
BigInt64Array: 8,
|
||||
BigUint64Array: 8
|
||||
};
|
||||
|
||||
var isView = function isView(it) {
|
||||
if (!isObject(it)) return false;
|
||||
var klass = classof(it);
|
||||
return klass === 'DataView'
|
||||
|| hasOwn(TypedArrayConstructorsList, klass)
|
||||
|| hasOwn(BigIntArrayConstructorsList, klass);
|
||||
};
|
||||
|
||||
var getTypedArrayConstructor = function (it) {
|
||||
var proto = getPrototypeOf(it);
|
||||
if (!isObject(proto)) return;
|
||||
var state = getInternalState(proto);
|
||||
return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);
|
||||
};
|
||||
|
||||
var isTypedArray = function (it) {
|
||||
if (!isObject(it)) return false;
|
||||
var klass = classof(it);
|
||||
return hasOwn(TypedArrayConstructorsList, klass)
|
||||
|| hasOwn(BigIntArrayConstructorsList, klass);
|
||||
};
|
||||
|
||||
var aTypedArray = function (it) {
|
||||
if (isTypedArray(it)) return it;
|
||||
throw TypeError('Target is not a typed array');
|
||||
};
|
||||
|
||||
var aTypedArrayConstructor = function (C) {
|
||||
if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;
|
||||
throw TypeError(tryToString(C) + ' is not a typed array constructor');
|
||||
};
|
||||
|
||||
var exportTypedArrayMethod = function (KEY, property, forced, options) {
|
||||
if (!DESCRIPTORS) return;
|
||||
if (forced) for (var ARRAY in TypedArrayConstructorsList) {
|
||||
var TypedArrayConstructor = global[ARRAY];
|
||||
if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {
|
||||
delete TypedArrayConstructor.prototype[KEY];
|
||||
} catch (error) {
|
||||
// old WebKit bug - some methods are non-configurable
|
||||
try {
|
||||
TypedArrayConstructor.prototype[KEY] = property;
|
||||
} catch (error2) { /* empty */ }
|
||||
}
|
||||
}
|
||||
if (!TypedArrayPrototype[KEY] || forced) {
|
||||
defineBuiltIn(TypedArrayPrototype, KEY, forced ? property
|
||||
: NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);
|
||||
}
|
||||
};
|
||||
|
||||
var exportTypedArrayStaticMethod = function (KEY, property, forced) {
|
||||
var ARRAY, TypedArrayConstructor;
|
||||
if (!DESCRIPTORS) return;
|
||||
if (setPrototypeOf) {
|
||||
if (forced) for (ARRAY in TypedArrayConstructorsList) {
|
||||
TypedArrayConstructor = global[ARRAY];
|
||||
if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {
|
||||
delete TypedArrayConstructor[KEY];
|
||||
} catch (error) { /* empty */ }
|
||||
}
|
||||
if (!TypedArray[KEY] || forced) {
|
||||
// V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
|
||||
try {
|
||||
return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
|
||||
} catch (error) { /* empty */ }
|
||||
} else return;
|
||||
}
|
||||
for (ARRAY in TypedArrayConstructorsList) {
|
||||
TypedArrayConstructor = global[ARRAY];
|
||||
if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
|
||||
defineBuiltIn(TypedArrayConstructor, KEY, property);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (NAME in TypedArrayConstructorsList) {
|
||||
Constructor = global[NAME];
|
||||
Prototype = Constructor && Constructor.prototype;
|
||||
if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
|
||||
else NATIVE_ARRAY_BUFFER_VIEWS = false;
|
||||
}
|
||||
|
||||
for (NAME in BigIntArrayConstructorsList) {
|
||||
Constructor = global[NAME];
|
||||
Prototype = Constructor && Constructor.prototype;
|
||||
if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
|
||||
}
|
||||
|
||||
// WebKit bug - typed arrays constructors prototype is Object.prototype
|
||||
if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
|
||||
// eslint-disable-next-line no-shadow -- safe
|
||||
TypedArray = function TypedArray() {
|
||||
throw TypeError('Incorrect invocation');
|
||||
};
|
||||
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
||||
if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
|
||||
}
|
||||
}
|
||||
|
||||
if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
|
||||
TypedArrayPrototype = TypedArray.prototype;
|
||||
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
||||
if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
|
||||
}
|
||||
}
|
||||
|
||||
// WebKit bug - one more object in Uint8ClampedArray prototype chain
|
||||
if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
|
||||
setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
|
||||
}
|
||||
|
||||
if (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {
|
||||
TYPED_ARRAY_TAG_REQUIRED = true;
|
||||
defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG, {
|
||||
configurable: true,
|
||||
get: function () {
|
||||
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
|
||||
}
|
||||
});
|
||||
for (NAME in TypedArrayConstructorsList) if (global[NAME]) {
|
||||
createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
|
||||
TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
|
||||
aTypedArray: aTypedArray,
|
||||
aTypedArrayConstructor: aTypedArrayConstructor,
|
||||
exportTypedArrayMethod: exportTypedArrayMethod,
|
||||
exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
|
||||
getTypedArrayConstructor: getTypedArrayConstructor,
|
||||
isView: isView,
|
||||
isTypedArray: isTypedArray,
|
||||
TypedArray: TypedArray,
|
||||
TypedArrayPrototype: TypedArrayPrototype
|
||||
};
|
262
node_modules/core-js/internals/array-buffer.js
generated
vendored
Normal file
262
node_modules/core-js/internals/array-buffer.js
generated
vendored
Normal file
@ -0,0 +1,262 @@
|
||||
'use strict';
|
||||
var global = require('../internals/global');
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var DESCRIPTORS = require('../internals/descriptors');
|
||||
var NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');
|
||||
var FunctionName = require('../internals/function-name');
|
||||
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
|
||||
var defineBuiltInAccessor = require('../internals/define-built-in-accessor');
|
||||
var defineBuiltIns = require('../internals/define-built-ins');
|
||||
var fails = require('../internals/fails');
|
||||
var anInstance = require('../internals/an-instance');
|
||||
var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
|
||||
var toLength = require('../internals/to-length');
|
||||
var toIndex = require('../internals/to-index');
|
||||
var IEEE754 = require('../internals/ieee754');
|
||||
var getPrototypeOf = require('../internals/object-get-prototype-of');
|
||||
var setPrototypeOf = require('../internals/object-set-prototype-of');
|
||||
var getOwnPropertyNames = require('../internals/object-get-own-property-names').f;
|
||||
var arrayFill = require('../internals/array-fill');
|
||||
var arraySlice = require('../internals/array-slice-simple');
|
||||
var setToStringTag = require('../internals/set-to-string-tag');
|
||||
var InternalStateModule = require('../internals/internal-state');
|
||||
|
||||
var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
||||
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
||||
var ARRAY_BUFFER = 'ArrayBuffer';
|
||||
var DATA_VIEW = 'DataView';
|
||||
var PROTOTYPE = 'prototype';
|
||||
var WRONG_LENGTH = 'Wrong length';
|
||||
var WRONG_INDEX = 'Wrong index';
|
||||
var getInternalArrayBufferState = InternalStateModule.getterFor(ARRAY_BUFFER);
|
||||
var getInternalDataViewState = InternalStateModule.getterFor(DATA_VIEW);
|
||||
var setInternalState = InternalStateModule.set;
|
||||
var NativeArrayBuffer = global[ARRAY_BUFFER];
|
||||
var $ArrayBuffer = NativeArrayBuffer;
|
||||
var ArrayBufferPrototype = $ArrayBuffer && $ArrayBuffer[PROTOTYPE];
|
||||
var $DataView = global[DATA_VIEW];
|
||||
var DataViewPrototype = $DataView && $DataView[PROTOTYPE];
|
||||
var ObjectPrototype = Object.prototype;
|
||||
var Array = global.Array;
|
||||
var RangeError = global.RangeError;
|
||||
var fill = uncurryThis(arrayFill);
|
||||
var reverse = uncurryThis([].reverse);
|
||||
|
||||
var packIEEE754 = IEEE754.pack;
|
||||
var unpackIEEE754 = IEEE754.unpack;
|
||||
|
||||
var packInt8 = function (number) {
|
||||
return [number & 0xFF];
|
||||
};
|
||||
|
||||
var packInt16 = function (number) {
|
||||
return [number & 0xFF, number >> 8 & 0xFF];
|
||||
};
|
||||
|
||||
var packInt32 = function (number) {
|
||||
return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];
|
||||
};
|
||||
|
||||
var unpackInt32 = function (buffer) {
|
||||
return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];
|
||||
};
|
||||
|
||||
var packFloat32 = function (number) {
|
||||
return packIEEE754(number, 23, 4);
|
||||
};
|
||||
|
||||
var packFloat64 = function (number) {
|
||||
return packIEEE754(number, 52, 8);
|
||||
};
|
||||
|
||||
var addGetter = function (Constructor, key, getInternalState) {
|
||||
defineBuiltInAccessor(Constructor[PROTOTYPE], key, {
|
||||
configurable: true,
|
||||
get: function () {
|
||||
return getInternalState(this)[key];
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var get = function (view, count, index, isLittleEndian) {
|
||||
var store = getInternalDataViewState(view);
|
||||
var intIndex = toIndex(index);
|
||||
var boolIsLittleEndian = !!isLittleEndian;
|
||||
if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
|
||||
var bytes = store.bytes;
|
||||
var start = intIndex + store.byteOffset;
|
||||
var pack = arraySlice(bytes, start, start + count);
|
||||
return boolIsLittleEndian ? pack : reverse(pack);
|
||||
};
|
||||
|
||||
var set = function (view, count, index, conversion, value, isLittleEndian) {
|
||||
var store = getInternalDataViewState(view);
|
||||
var intIndex = toIndex(index);
|
||||
var pack = conversion(+value);
|
||||
var boolIsLittleEndian = !!isLittleEndian;
|
||||
if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
|
||||
var bytes = store.bytes;
|
||||
var start = intIndex + store.byteOffset;
|
||||
for (var i = 0; i < count; i++) bytes[start + i] = pack[boolIsLittleEndian ? i : count - i - 1];
|
||||
};
|
||||
|
||||
if (!NATIVE_ARRAY_BUFFER) {
|
||||
$ArrayBuffer = function ArrayBuffer(length) {
|
||||
anInstance(this, ArrayBufferPrototype);
|
||||
var byteLength = toIndex(length);
|
||||
setInternalState(this, {
|
||||
type: ARRAY_BUFFER,
|
||||
bytes: fill(Array(byteLength), 0),
|
||||
byteLength: byteLength
|
||||
});
|
||||
if (!DESCRIPTORS) {
|
||||
this.byteLength = byteLength;
|
||||
this.detached = false;
|
||||
}
|
||||
};
|
||||
|
||||
ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE];
|
||||
|
||||
$DataView = function DataView(buffer, byteOffset, byteLength) {
|
||||
anInstance(this, DataViewPrototype);
|
||||
anInstance(buffer, ArrayBufferPrototype);
|
||||
var bufferState = getInternalArrayBufferState(buffer);
|
||||
var bufferLength = bufferState.byteLength;
|
||||
var offset = toIntegerOrInfinity(byteOffset);
|
||||
if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');
|
||||
byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
|
||||
if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
|
||||
setInternalState(this, {
|
||||
type: DATA_VIEW,
|
||||
buffer: buffer,
|
||||
byteLength: byteLength,
|
||||
byteOffset: offset,
|
||||
bytes: bufferState.bytes
|
||||
});
|
||||
if (!DESCRIPTORS) {
|
||||
this.buffer = buffer;
|
||||
this.byteLength = byteLength;
|
||||
this.byteOffset = offset;
|
||||
}
|
||||
};
|
||||
|
||||
DataViewPrototype = $DataView[PROTOTYPE];
|
||||
|
||||
if (DESCRIPTORS) {
|
||||
addGetter($ArrayBuffer, 'byteLength', getInternalArrayBufferState);
|
||||
addGetter($DataView, 'buffer', getInternalDataViewState);
|
||||
addGetter($DataView, 'byteLength', getInternalDataViewState);
|
||||
addGetter($DataView, 'byteOffset', getInternalDataViewState);
|
||||
}
|
||||
|
||||
defineBuiltIns(DataViewPrototype, {
|
||||
getInt8: function getInt8(byteOffset) {
|
||||
return get(this, 1, byteOffset)[0] << 24 >> 24;
|
||||
},
|
||||
getUint8: function getUint8(byteOffset) {
|
||||
return get(this, 1, byteOffset)[0];
|
||||
},
|
||||
getInt16: function getInt16(byteOffset /* , littleEndian */) {
|
||||
var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : false);
|
||||
return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
|
||||
},
|
||||
getUint16: function getUint16(byteOffset /* , littleEndian */) {
|
||||
var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : false);
|
||||
return bytes[1] << 8 | bytes[0];
|
||||
},
|
||||
getInt32: function getInt32(byteOffset /* , littleEndian */) {
|
||||
return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : false));
|
||||
},
|
||||
getUint32: function getUint32(byteOffset /* , littleEndian */) {
|
||||
return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : false)) >>> 0;
|
||||
},
|
||||
getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
|
||||
return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : false), 23);
|
||||
},
|
||||
getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
|
||||
return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : false), 52);
|
||||
},
|
||||
setInt8: function setInt8(byteOffset, value) {
|
||||
set(this, 1, byteOffset, packInt8, value);
|
||||
},
|
||||
setUint8: function setUint8(byteOffset, value) {
|
||||
set(this, 1, byteOffset, packInt8, value);
|
||||
},
|
||||
setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
|
||||
set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : false);
|
||||
},
|
||||
setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
|
||||
set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : false);
|
||||
},
|
||||
setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
|
||||
set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : false);
|
||||
},
|
||||
setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
|
||||
set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : false);
|
||||
},
|
||||
setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
|
||||
set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : false);
|
||||
},
|
||||
setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
|
||||
set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : false);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER;
|
||||
/* eslint-disable no-new -- required for testing */
|
||||
if (!fails(function () {
|
||||
NativeArrayBuffer(1);
|
||||
}) || !fails(function () {
|
||||
new NativeArrayBuffer(-1);
|
||||
}) || fails(function () {
|
||||
new NativeArrayBuffer();
|
||||
new NativeArrayBuffer(1.5);
|
||||
new NativeArrayBuffer(NaN);
|
||||
return NativeArrayBuffer.length != 1 || INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME;
|
||||
})) {
|
||||
/* eslint-enable no-new -- required for testing */
|
||||
$ArrayBuffer = function ArrayBuffer(length) {
|
||||
anInstance(this, ArrayBufferPrototype);
|
||||
return new NativeArrayBuffer(toIndex(length));
|
||||
};
|
||||
|
||||
$ArrayBuffer[PROTOTYPE] = ArrayBufferPrototype;
|
||||
|
||||
for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {
|
||||
if (!((key = keys[j++]) in $ArrayBuffer)) {
|
||||
createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);
|
||||
}
|
||||
}
|
||||
|
||||
ArrayBufferPrototype.constructor = $ArrayBuffer;
|
||||
} else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) {
|
||||
createNonEnumerableProperty(NativeArrayBuffer, 'name', ARRAY_BUFFER);
|
||||
}
|
||||
|
||||
// WebKit bug - the same parent prototype for typed arrays and data view
|
||||
if (setPrototypeOf && getPrototypeOf(DataViewPrototype) !== ObjectPrototype) {
|
||||
setPrototypeOf(DataViewPrototype, ObjectPrototype);
|
||||
}
|
||||
|
||||
// iOS Safari 7.x bug
|
||||
var testView = new $DataView(new $ArrayBuffer(2));
|
||||
var $setInt8 = uncurryThis(DataViewPrototype.setInt8);
|
||||
testView.setInt8(0, 2147483648);
|
||||
testView.setInt8(1, 2147483649);
|
||||
if (testView.getInt8(0) || !testView.getInt8(1)) defineBuiltIns(DataViewPrototype, {
|
||||
setInt8: function setInt8(byteOffset, value) {
|
||||
$setInt8(this, byteOffset, value << 24 >> 24);
|
||||
},
|
||||
setUint8: function setUint8(byteOffset, value) {
|
||||
$setInt8(this, byteOffset, value << 24 >> 24);
|
||||
}
|
||||
}, { unsafe: true });
|
||||
}
|
||||
|
||||
setToStringTag($ArrayBuffer, ARRAY_BUFFER);
|
||||
setToStringTag($DataView, DATA_VIEW);
|
||||
|
||||
module.exports = {
|
||||
ArrayBuffer: $ArrayBuffer,
|
||||
DataView: $DataView
|
||||
};
|
31
node_modules/core-js/internals/array-copy-within.js
generated
vendored
Normal file
31
node_modules/core-js/internals/array-copy-within.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
var toObject = require('../internals/to-object');
|
||||
var toAbsoluteIndex = require('../internals/to-absolute-index');
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
var deletePropertyOrThrow = require('../internals/delete-property-or-throw');
|
||||
|
||||
var min = Math.min;
|
||||
|
||||
// `Array.prototype.copyWithin` method implementation
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.copywithin
|
||||
// eslint-disable-next-line es/no-array-prototype-copywithin -- safe
|
||||
module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
|
||||
var O = toObject(this);
|
||||
var len = lengthOfArrayLike(O);
|
||||
var to = toAbsoluteIndex(target, len);
|
||||
var from = toAbsoluteIndex(start, len);
|
||||
var end = arguments.length > 2 ? arguments[2] : undefined;
|
||||
var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
|
||||
var inc = 1;
|
||||
if (from < to && to < from + count) {
|
||||
inc = -1;
|
||||
from += count - 1;
|
||||
to += count - 1;
|
||||
}
|
||||
while (count-- > 0) {
|
||||
if (from in O) O[to] = O[from];
|
||||
else deletePropertyOrThrow(O, to);
|
||||
to += inc;
|
||||
from += inc;
|
||||
} return O;
|
||||
};
|
17
node_modules/core-js/internals/array-fill.js
generated
vendored
Normal file
17
node_modules/core-js/internals/array-fill.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
var toObject = require('../internals/to-object');
|
||||
var toAbsoluteIndex = require('../internals/to-absolute-index');
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
|
||||
// `Array.prototype.fill` method implementation
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.fill
|
||||
module.exports = function fill(value /* , start = 0, end = @length */) {
|
||||
var O = toObject(this);
|
||||
var length = lengthOfArrayLike(O);
|
||||
var argumentsLength = arguments.length;
|
||||
var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
|
||||
var end = argumentsLength > 2 ? arguments[2] : undefined;
|
||||
var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
|
||||
while (endPos > index) O[index++] = value;
|
||||
return O;
|
||||
};
|
12
node_modules/core-js/internals/array-for-each.js
generated
vendored
Normal file
12
node_modules/core-js/internals/array-for-each.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
var $forEach = require('../internals/array-iteration').forEach;
|
||||
var arrayMethodIsStrict = require('../internals/array-method-is-strict');
|
||||
|
||||
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
||||
|
||||
// `Array.prototype.forEach` method implementation
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
||||
module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
||||
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
||||
} : [].forEach;
|
51
node_modules/core-js/internals/array-from-async.js
generated
vendored
Normal file
51
node_modules/core-js/internals/array-from-async.js
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
'use strict';
|
||||
var bind = require('../internals/function-bind-context');
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var toObject = require('../internals/to-object');
|
||||
var isConstructor = require('../internals/is-constructor');
|
||||
var getAsyncIterator = require('../internals/get-async-iterator');
|
||||
var getIterator = require('../internals/get-iterator');
|
||||
var getIteratorDirect = require('../internals/get-iterator-direct');
|
||||
var getIteratorMethod = require('../internals/get-iterator-method');
|
||||
var getMethod = require('../internals/get-method');
|
||||
var getVirtual = require('../internals/entry-virtual');
|
||||
var getBuiltIn = require('../internals/get-built-in');
|
||||
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||||
var AsyncFromSyncIterator = require('../internals/async-from-sync-iterator');
|
||||
var toArray = require('../internals/async-iterator-iteration').toArray;
|
||||
|
||||
var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
|
||||
var arrayIterator = uncurryThis(getVirtual('Array').values);
|
||||
var arrayIteratorNext = uncurryThis(arrayIterator([]).next);
|
||||
|
||||
var safeArrayIterator = function () {
|
||||
return new SafeArrayIterator(this);
|
||||
};
|
||||
|
||||
var SafeArrayIterator = function (O) {
|
||||
this.iterator = arrayIterator(O);
|
||||
};
|
||||
|
||||
SafeArrayIterator.prototype.next = function () {
|
||||
return arrayIteratorNext(this.iterator);
|
||||
};
|
||||
|
||||
// `Array.fromAsync` method implementation
|
||||
// https://github.com/tc39/proposal-array-from-async
|
||||
module.exports = function fromAsync(asyncItems /* , mapfn = undefined, thisArg = undefined */) {
|
||||
var C = this;
|
||||
var argumentsLength = arguments.length;
|
||||
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
||||
var thisArg = argumentsLength > 2 ? arguments[2] : undefined;
|
||||
return new (getBuiltIn('Promise'))(function (resolve) {
|
||||
var O = toObject(asyncItems);
|
||||
if (mapfn !== undefined) mapfn = bind(mapfn, thisArg);
|
||||
var usingAsyncIterator = getMethod(O, ASYNC_ITERATOR);
|
||||
var usingSyncIterator = usingAsyncIterator ? undefined : getIteratorMethod(O) || safeArrayIterator;
|
||||
var A = isConstructor(C) ? new C() : [];
|
||||
var iterator = usingAsyncIterator
|
||||
? getAsyncIterator(O, usingAsyncIterator)
|
||||
: new AsyncFromSyncIterator(getIteratorDirect(getIterator(O, usingSyncIterator)));
|
||||
resolve(toArray(iterator, mapfn, A));
|
||||
});
|
||||
};
|
10
node_modules/core-js/internals/array-from-constructor-and-list.js
generated
vendored
Normal file
10
node_modules/core-js/internals/array-from-constructor-and-list.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
|
||||
module.exports = function (Constructor, list) {
|
||||
var index = 0;
|
||||
var length = lengthOfArrayLike(list);
|
||||
var result = new Constructor(length);
|
||||
while (length > index) result[index] = list[index++];
|
||||
return result;
|
||||
};
|
46
node_modules/core-js/internals/array-from.js
generated
vendored
Normal file
46
node_modules/core-js/internals/array-from.js
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
'use strict';
|
||||
var bind = require('../internals/function-bind-context');
|
||||
var call = require('../internals/function-call');
|
||||
var toObject = require('../internals/to-object');
|
||||
var callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');
|
||||
var isArrayIteratorMethod = require('../internals/is-array-iterator-method');
|
||||
var isConstructor = require('../internals/is-constructor');
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
var createProperty = require('../internals/create-property');
|
||||
var getIterator = require('../internals/get-iterator');
|
||||
var getIteratorMethod = require('../internals/get-iterator-method');
|
||||
|
||||
var $Array = Array;
|
||||
|
||||
// `Array.from` method implementation
|
||||
// https://tc39.es/ecma262/#sec-array.from
|
||||
module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
||||
var O = toObject(arrayLike);
|
||||
var IS_CONSTRUCTOR = isConstructor(this);
|
||||
var argumentsLength = arguments.length;
|
||||
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
||||
var mapping = mapfn !== undefined;
|
||||
if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
|
||||
var iteratorMethod = getIteratorMethod(O);
|
||||
var index = 0;
|
||||
var length, result, step, iterator, next, value;
|
||||
// if the target is not iterable or it's an array with the default iterator - use a simple case
|
||||
if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {
|
||||
iterator = getIterator(O, iteratorMethod);
|
||||
next = iterator.next;
|
||||
result = IS_CONSTRUCTOR ? new this() : [];
|
||||
for (;!(step = call(next, iterator)).done; index++) {
|
||||
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
|
||||
createProperty(result, index, value);
|
||||
}
|
||||
} else {
|
||||
length = lengthOfArrayLike(O);
|
||||
result = IS_CONSTRUCTOR ? new this(length) : $Array(length);
|
||||
for (;length > index; index++) {
|
||||
value = mapping ? mapfn(O[index], index) : O[index];
|
||||
createProperty(result, index, value);
|
||||
}
|
||||
}
|
||||
result.length = index;
|
||||
return result;
|
||||
};
|
31
node_modules/core-js/internals/array-group-to-map.js
generated
vendored
Normal file
31
node_modules/core-js/internals/array-group-to-map.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
var bind = require('../internals/function-bind-context');
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var IndexedObject = require('../internals/indexed-object');
|
||||
var toObject = require('../internals/to-object');
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
var MapHelpers = require('../internals/map-helpers');
|
||||
|
||||
var Map = MapHelpers.Map;
|
||||
var mapGet = MapHelpers.get;
|
||||
var mapHas = MapHelpers.has;
|
||||
var mapSet = MapHelpers.set;
|
||||
var push = uncurryThis([].push);
|
||||
|
||||
// `Array.prototype.groupToMap` method
|
||||
// https://github.com/tc39/proposal-array-grouping
|
||||
module.exports = function groupToMap(callbackfn /* , thisArg */) {
|
||||
var O = toObject(this);
|
||||
var self = IndexedObject(O);
|
||||
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
var map = new Map();
|
||||
var length = lengthOfArrayLike(self);
|
||||
var index = 0;
|
||||
var key, value;
|
||||
for (;length > index; index++) {
|
||||
value = self[index];
|
||||
key = boundFunction(value, index, O);
|
||||
if (mapHas(map, key)) push(mapGet(map, key), value);
|
||||
else mapSet(map, key, [value]);
|
||||
} return map;
|
||||
};
|
37
node_modules/core-js/internals/array-group.js
generated
vendored
Normal file
37
node_modules/core-js/internals/array-group.js
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
'use strict';
|
||||
var bind = require('../internals/function-bind-context');
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var IndexedObject = require('../internals/indexed-object');
|
||||
var toObject = require('../internals/to-object');
|
||||
var toPropertyKey = require('../internals/to-property-key');
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
var objectCreate = require('../internals/object-create');
|
||||
var arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');
|
||||
|
||||
var $Array = Array;
|
||||
var push = uncurryThis([].push);
|
||||
|
||||
module.exports = function ($this, callbackfn, that, specificConstructor) {
|
||||
var O = toObject($this);
|
||||
var self = IndexedObject(O);
|
||||
var boundFunction = bind(callbackfn, that);
|
||||
var target = objectCreate(null);
|
||||
var length = lengthOfArrayLike(self);
|
||||
var index = 0;
|
||||
var Constructor, key, value;
|
||||
for (;length > index; index++) {
|
||||
value = self[index];
|
||||
key = toPropertyKey(boundFunction(value, index, O));
|
||||
// in some IE versions, `hasOwnProperty` returns incorrect result on integer keys
|
||||
// but since it's a `null` prototype object, we can safely use `in`
|
||||
if (key in target) push(target[key], value);
|
||||
else target[key] = [value];
|
||||
}
|
||||
// TODO: Remove this block from `core-js@4`
|
||||
if (specificConstructor) {
|
||||
Constructor = specificConstructor(O);
|
||||
if (Constructor !== $Array) {
|
||||
for (key in target) target[key] = arrayFromConstructorAndList(Constructor, target[key]);
|
||||
}
|
||||
} return target;
|
||||
};
|
33
node_modules/core-js/internals/array-includes.js
generated
vendored
Normal file
33
node_modules/core-js/internals/array-includes.js
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
'use strict';
|
||||
var toIndexedObject = require('../internals/to-indexed-object');
|
||||
var toAbsoluteIndex = require('../internals/to-absolute-index');
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
|
||||
// `Array.prototype.{ indexOf, includes }` methods implementation
|
||||
var createMethod = function (IS_INCLUDES) {
|
||||
return function ($this, el, fromIndex) {
|
||||
var O = toIndexedObject($this);
|
||||
var length = lengthOfArrayLike(O);
|
||||
var index = toAbsoluteIndex(fromIndex, length);
|
||||
var value;
|
||||
// Array#includes uses SameValueZero equality algorithm
|
||||
// eslint-disable-next-line no-self-compare -- NaN check
|
||||
if (IS_INCLUDES && el != el) while (length > index) {
|
||||
value = O[index++];
|
||||
// eslint-disable-next-line no-self-compare -- NaN check
|
||||
if (value != value) return true;
|
||||
// Array#indexOf ignores holes, Array#includes - not
|
||||
} else for (;length > index; index++) {
|
||||
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
||||
} return !IS_INCLUDES && -1;
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
// `Array.prototype.includes` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
||||
includes: createMethod(true),
|
||||
// `Array.prototype.indexOf` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
||||
indexOf: createMethod(false)
|
||||
};
|
35
node_modules/core-js/internals/array-iteration-from-last.js
generated
vendored
Normal file
35
node_modules/core-js/internals/array-iteration-from-last.js
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
'use strict';
|
||||
var bind = require('../internals/function-bind-context');
|
||||
var IndexedObject = require('../internals/indexed-object');
|
||||
var toObject = require('../internals/to-object');
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
|
||||
// `Array.prototype.{ findLast, findLastIndex }` methods implementation
|
||||
var createMethod = function (TYPE) {
|
||||
var IS_FIND_LAST_INDEX = TYPE == 1;
|
||||
return function ($this, callbackfn, that) {
|
||||
var O = toObject($this);
|
||||
var self = IndexedObject(O);
|
||||
var boundFunction = bind(callbackfn, that);
|
||||
var index = lengthOfArrayLike(self);
|
||||
var value, result;
|
||||
while (index-- > 0) {
|
||||
value = self[index];
|
||||
result = boundFunction(value, index, O);
|
||||
if (result) switch (TYPE) {
|
||||
case 0: return value; // findLast
|
||||
case 1: return index; // findLastIndex
|
||||
}
|
||||
}
|
||||
return IS_FIND_LAST_INDEX ? -1 : undefined;
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
// `Array.prototype.findLast` method
|
||||
// https://github.com/tc39/proposal-array-find-from-last
|
||||
findLast: createMethod(0),
|
||||
// `Array.prototype.findLastIndex` method
|
||||
// https://github.com/tc39/proposal-array-find-from-last
|
||||
findLastIndex: createMethod(1)
|
||||
};
|
74
node_modules/core-js/internals/array-iteration.js
generated
vendored
Normal file
74
node_modules/core-js/internals/array-iteration.js
generated
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
'use strict';
|
||||
var bind = require('../internals/function-bind-context');
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var IndexedObject = require('../internals/indexed-object');
|
||||
var toObject = require('../internals/to-object');
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
var arraySpeciesCreate = require('../internals/array-species-create');
|
||||
|
||||
var push = uncurryThis([].push);
|
||||
|
||||
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
||||
var createMethod = function (TYPE) {
|
||||
var IS_MAP = TYPE == 1;
|
||||
var IS_FILTER = TYPE == 2;
|
||||
var IS_SOME = TYPE == 3;
|
||||
var IS_EVERY = TYPE == 4;
|
||||
var IS_FIND_INDEX = TYPE == 6;
|
||||
var IS_FILTER_REJECT = TYPE == 7;
|
||||
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
||||
return function ($this, callbackfn, that, specificCreate) {
|
||||
var O = toObject($this);
|
||||
var self = IndexedObject(O);
|
||||
var boundFunction = bind(callbackfn, that);
|
||||
var length = lengthOfArrayLike(self);
|
||||
var index = 0;
|
||||
var create = specificCreate || arraySpeciesCreate;
|
||||
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
|
||||
var value, result;
|
||||
for (;length > index; index++) if (NO_HOLES || index in self) {
|
||||
value = self[index];
|
||||
result = boundFunction(value, index, O);
|
||||
if (TYPE) {
|
||||
if (IS_MAP) target[index] = result; // map
|
||||
else if (result) switch (TYPE) {
|
||||
case 3: return true; // some
|
||||
case 5: return value; // find
|
||||
case 6: return index; // findIndex
|
||||
case 2: push(target, value); // filter
|
||||
} else switch (TYPE) {
|
||||
case 4: return false; // every
|
||||
case 7: push(target, value); // filterReject
|
||||
}
|
||||
}
|
||||
}
|
||||
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
// `Array.prototype.forEach` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
||||
forEach: createMethod(0),
|
||||
// `Array.prototype.map` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.map
|
||||
map: createMethod(1),
|
||||
// `Array.prototype.filter` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
||||
filter: createMethod(2),
|
||||
// `Array.prototype.some` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.some
|
||||
some: createMethod(3),
|
||||
// `Array.prototype.every` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.every
|
||||
every: createMethod(4),
|
||||
// `Array.prototype.find` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.find
|
||||
find: createMethod(5),
|
||||
// `Array.prototype.findIndex` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
||||
findIndex: createMethod(6),
|
||||
// `Array.prototype.filterReject` method
|
||||
// https://github.com/tc39/proposal-array-filtering
|
||||
filterReject: createMethod(7)
|
||||
};
|
27
node_modules/core-js/internals/array-last-index-of.js
generated
vendored
Normal file
27
node_modules/core-js/internals/array-last-index-of.js
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
/* eslint-disable es/no-array-prototype-lastindexof -- safe */
|
||||
var apply = require('../internals/function-apply');
|
||||
var toIndexedObject = require('../internals/to-indexed-object');
|
||||
var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
var arrayMethodIsStrict = require('../internals/array-method-is-strict');
|
||||
|
||||
var min = Math.min;
|
||||
var $lastIndexOf = [].lastIndexOf;
|
||||
var NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
|
||||
var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');
|
||||
var FORCED = NEGATIVE_ZERO || !STRICT_METHOD;
|
||||
|
||||
// `Array.prototype.lastIndexOf` method implementation
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.lastindexof
|
||||
module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
|
||||
// convert -0 to +0
|
||||
if (NEGATIVE_ZERO) return apply($lastIndexOf, this, arguments) || 0;
|
||||
var O = toIndexedObject(this);
|
||||
var length = lengthOfArrayLike(O);
|
||||
var index = length - 1;
|
||||
if (arguments.length > 1) index = min(index, toIntegerOrInfinity(arguments[1]));
|
||||
if (index < 0) index = length + index;
|
||||
for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
|
||||
return -1;
|
||||
} : $lastIndexOf;
|
20
node_modules/core-js/internals/array-method-has-species-support.js
generated
vendored
Normal file
20
node_modules/core-js/internals/array-method-has-species-support.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
var fails = require('../internals/fails');
|
||||
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||||
var V8_VERSION = require('../internals/engine-v8-version');
|
||||
|
||||
var SPECIES = wellKnownSymbol('species');
|
||||
|
||||
module.exports = function (METHOD_NAME) {
|
||||
// We can't use this feature detection in V8 since it causes
|
||||
// deoptimization and serious performance degradation
|
||||
// https://github.com/zloirock/core-js/issues/677
|
||||
return V8_VERSION >= 51 || !fails(function () {
|
||||
var array = [];
|
||||
var constructor = array.constructor = {};
|
||||
constructor[SPECIES] = function () {
|
||||
return { foo: 1 };
|
||||
};
|
||||
return array[METHOD_NAME](Boolean).foo !== 1;
|
||||
});
|
||||
};
|
10
node_modules/core-js/internals/array-method-is-strict.js
generated
vendored
Normal file
10
node_modules/core-js/internals/array-method-is-strict.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
var fails = require('../internals/fails');
|
||||
|
||||
module.exports = function (METHOD_NAME, argument) {
|
||||
var method = [][METHOD_NAME];
|
||||
return !!method && fails(function () {
|
||||
// eslint-disable-next-line no-useless-call -- required for testing
|
||||
method.call(null, argument || function () { return 1; }, 1);
|
||||
});
|
||||
};
|
43
node_modules/core-js/internals/array-reduce.js
generated
vendored
Normal file
43
node_modules/core-js/internals/array-reduce.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
var aCallable = require('../internals/a-callable');
|
||||
var toObject = require('../internals/to-object');
|
||||
var IndexedObject = require('../internals/indexed-object');
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
||||
var createMethod = function (IS_RIGHT) {
|
||||
return function (that, callbackfn, argumentsLength, memo) {
|
||||
aCallable(callbackfn);
|
||||
var O = toObject(that);
|
||||
var self = IndexedObject(O);
|
||||
var length = lengthOfArrayLike(O);
|
||||
var index = IS_RIGHT ? length - 1 : 0;
|
||||
var i = IS_RIGHT ? -1 : 1;
|
||||
if (argumentsLength < 2) while (true) {
|
||||
if (index in self) {
|
||||
memo = self[index];
|
||||
index += i;
|
||||
break;
|
||||
}
|
||||
index += i;
|
||||
if (IS_RIGHT ? index < 0 : length <= index) {
|
||||
throw $TypeError('Reduce of empty array with no initial value');
|
||||
}
|
||||
}
|
||||
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
||||
memo = callbackfn(memo, self[index], index, O);
|
||||
}
|
||||
return memo;
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
// `Array.prototype.reduce` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
||||
left: createMethod(false),
|
||||
// `Array.prototype.reduceRight` method
|
||||
// https://tc39.es/ecma262/#sec-array.prototype.reduceright
|
||||
right: createMethod(true)
|
||||
};
|
27
node_modules/core-js/internals/array-set-length.js
generated
vendored
Normal file
27
node_modules/core-js/internals/array-set-length.js
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
var DESCRIPTORS = require('../internals/descriptors');
|
||||
var isArray = require('../internals/is-array');
|
||||
|
||||
var $TypeError = TypeError;
|
||||
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
||||
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||
|
||||
// Safari < 13 does not throw an error in this case
|
||||
var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
|
||||
// makes no sense without proper strict mode support
|
||||
if (this !== undefined) return true;
|
||||
try {
|
||||
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
||||
Object.defineProperty([], 'length', { writable: false }).length = 1;
|
||||
} catch (error) {
|
||||
return error instanceof TypeError;
|
||||
}
|
||||
}();
|
||||
|
||||
module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
|
||||
if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
|
||||
throw $TypeError('Cannot set read only .length');
|
||||
} return O.length = length;
|
||||
} : function (O, length) {
|
||||
return O.length = length;
|
||||
};
|
17
node_modules/core-js/internals/array-slice-simple.js
generated
vendored
Normal file
17
node_modules/core-js/internals/array-slice-simple.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
var toAbsoluteIndex = require('../internals/to-absolute-index');
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
var createProperty = require('../internals/create-property');
|
||||
|
||||
var $Array = Array;
|
||||
var max = Math.max;
|
||||
|
||||
module.exports = function (O, start, end) {
|
||||
var length = lengthOfArrayLike(O);
|
||||
var k = toAbsoluteIndex(start, length);
|
||||
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
||||
var result = $Array(max(fin - k, 0));
|
||||
for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
|
||||
result.length = n;
|
||||
return result;
|
||||
};
|
4
node_modules/core-js/internals/array-slice.js
generated
vendored
Normal file
4
node_modules/core-js/internals/array-slice.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
|
||||
module.exports = uncurryThis([].slice);
|
45
node_modules/core-js/internals/array-sort.js
generated
vendored
Normal file
45
node_modules/core-js/internals/array-sort.js
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
'use strict';
|
||||
var arraySlice = require('../internals/array-slice-simple');
|
||||
|
||||
var floor = Math.floor;
|
||||
|
||||
var mergeSort = function (array, comparefn) {
|
||||
var length = array.length;
|
||||
var middle = floor(length / 2);
|
||||
return length < 8 ? insertionSort(array, comparefn) : merge(
|
||||
array,
|
||||
mergeSort(arraySlice(array, 0, middle), comparefn),
|
||||
mergeSort(arraySlice(array, middle), comparefn),
|
||||
comparefn
|
||||
);
|
||||
};
|
||||
|
||||
var insertionSort = function (array, comparefn) {
|
||||
var length = array.length;
|
||||
var i = 1;
|
||||
var element, j;
|
||||
|
||||
while (i < length) {
|
||||
j = i;
|
||||
element = array[i];
|
||||
while (j && comparefn(array[j - 1], element) > 0) {
|
||||
array[j] = array[--j];
|
||||
}
|
||||
if (j !== i++) array[j] = element;
|
||||
} return array;
|
||||
};
|
||||
|
||||
var merge = function (array, left, right, comparefn) {
|
||||
var llength = left.length;
|
||||
var rlength = right.length;
|
||||
var lindex = 0;
|
||||
var rindex = 0;
|
||||
|
||||
while (lindex < llength || rindex < rlength) {
|
||||
array[lindex + rindex] = (lindex < llength && rindex < rlength)
|
||||
? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
|
||||
: lindex < llength ? left[lindex++] : right[rindex++];
|
||||
} return array;
|
||||
};
|
||||
|
||||
module.exports = mergeSort;
|
23
node_modules/core-js/internals/array-species-constructor.js
generated
vendored
Normal file
23
node_modules/core-js/internals/array-species-constructor.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
var isArray = require('../internals/is-array');
|
||||
var isConstructor = require('../internals/is-constructor');
|
||||
var isObject = require('../internals/is-object');
|
||||
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||||
|
||||
var SPECIES = wellKnownSymbol('species');
|
||||
var $Array = Array;
|
||||
|
||||
// a part of `ArraySpeciesCreate` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
||||
module.exports = function (originalArray) {
|
||||
var C;
|
||||
if (isArray(originalArray)) {
|
||||
C = originalArray.constructor;
|
||||
// cross-realm fallback
|
||||
if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
|
||||
else if (isObject(C)) {
|
||||
C = C[SPECIES];
|
||||
if (C === null) C = undefined;
|
||||
}
|
||||
} return C === undefined ? $Array : C;
|
||||
};
|
8
node_modules/core-js/internals/array-species-create.js
generated
vendored
Normal file
8
node_modules/core-js/internals/array-species-create.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
var arraySpeciesConstructor = require('../internals/array-species-constructor');
|
||||
|
||||
// `ArraySpeciesCreate` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
||||
module.exports = function (originalArray, length) {
|
||||
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
||||
};
|
12
node_modules/core-js/internals/array-to-reversed.js
generated
vendored
Normal file
12
node_modules/core-js/internals/array-to-reversed.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
|
||||
// https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.toReversed
|
||||
// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed
|
||||
module.exports = function (O, C) {
|
||||
var len = lengthOfArrayLike(O);
|
||||
var A = new C(len);
|
||||
var k = 0;
|
||||
for (; k < len; k++) A[k] = O[len - k - 1];
|
||||
return A;
|
||||
};
|
35
node_modules/core-js/internals/array-unique-by.js
generated
vendored
Normal file
35
node_modules/core-js/internals/array-unique-by.js
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
'use strict';
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var aCallable = require('../internals/a-callable');
|
||||
var isNullOrUndefined = require('../internals/is-null-or-undefined');
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
var toObject = require('../internals/to-object');
|
||||
var MapHelpers = require('../internals/map-helpers');
|
||||
var iterate = require('../internals/map-iterate');
|
||||
|
||||
var Map = MapHelpers.Map;
|
||||
var mapHas = MapHelpers.has;
|
||||
var mapSet = MapHelpers.set;
|
||||
var push = uncurryThis([].push);
|
||||
|
||||
// `Array.prototype.uniqueBy` method
|
||||
// https://github.com/tc39/proposal-array-unique
|
||||
module.exports = function uniqueBy(resolver) {
|
||||
var that = toObject(this);
|
||||
var length = lengthOfArrayLike(that);
|
||||
var result = [];
|
||||
var map = new Map();
|
||||
var resolverFunction = !isNullOrUndefined(resolver) ? aCallable(resolver) : function (value) {
|
||||
return value;
|
||||
};
|
||||
var index, item, key;
|
||||
for (index = 0; index < length; index++) {
|
||||
item = that[index];
|
||||
key = resolverFunction(item);
|
||||
if (!mapHas(map, key)) mapSet(map, key, item);
|
||||
}
|
||||
iterate(map, function (value) {
|
||||
push(result, value);
|
||||
});
|
||||
return result;
|
||||
};
|
18
node_modules/core-js/internals/array-with.js
generated
vendored
Normal file
18
node_modules/core-js/internals/array-with.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
var lengthOfArrayLike = require('../internals/length-of-array-like');
|
||||
var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
|
||||
|
||||
var $RangeError = RangeError;
|
||||
|
||||
// https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.with
|
||||
// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.with
|
||||
module.exports = function (O, C, index, value) {
|
||||
var len = lengthOfArrayLike(O);
|
||||
var relativeIndex = toIntegerOrInfinity(index);
|
||||
var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex;
|
||||
if (actualIndex >= len || actualIndex < 0) throw $RangeError('Incorrect index');
|
||||
var A = new C(len);
|
||||
var k = 0;
|
||||
for (; k < len; k++) A[k] = k === actualIndex ? value : O[k];
|
||||
return A;
|
||||
};
|
49
node_modules/core-js/internals/async-from-sync-iterator.js
generated
vendored
Normal file
49
node_modules/core-js/internals/async-from-sync-iterator.js
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
'use strict';
|
||||
var call = require('../internals/function-call');
|
||||
var anObject = require('../internals/an-object');
|
||||
var create = require('../internals/object-create');
|
||||
var getMethod = require('../internals/get-method');
|
||||
var defineBuiltIns = require('../internals/define-built-ins');
|
||||
var InternalStateModule = require('../internals/internal-state');
|
||||
var getBuiltIn = require('../internals/get-built-in');
|
||||
var AsyncIteratorPrototype = require('../internals/async-iterator-prototype');
|
||||
var createIterResultObject = require('../internals/create-iter-result-object');
|
||||
|
||||
var Promise = getBuiltIn('Promise');
|
||||
|
||||
var ASYNC_FROM_SYNC_ITERATOR = 'AsyncFromSyncIterator';
|
||||
var setInternalState = InternalStateModule.set;
|
||||
var getInternalState = InternalStateModule.getterFor(ASYNC_FROM_SYNC_ITERATOR);
|
||||
|
||||
var asyncFromSyncIteratorContinuation = function (result, resolve, reject) {
|
||||
var done = result.done;
|
||||
Promise.resolve(result.value).then(function (value) {
|
||||
resolve(createIterResultObject(value, done));
|
||||
}, reject);
|
||||
};
|
||||
|
||||
var AsyncFromSyncIterator = function AsyncIterator(iteratorRecord) {
|
||||
iteratorRecord.type = ASYNC_FROM_SYNC_ITERATOR;
|
||||
setInternalState(this, iteratorRecord);
|
||||
};
|
||||
|
||||
AsyncFromSyncIterator.prototype = defineBuiltIns(create(AsyncIteratorPrototype), {
|
||||
next: function next() {
|
||||
var state = getInternalState(this);
|
||||
return new Promise(function (resolve, reject) {
|
||||
var result = anObject(call(state.next, state.iterator));
|
||||
asyncFromSyncIteratorContinuation(result, resolve, reject);
|
||||
});
|
||||
},
|
||||
'return': function () {
|
||||
var iterator = getInternalState(this).iterator;
|
||||
return new Promise(function (resolve, reject) {
|
||||
var $return = getMethod(iterator, 'return');
|
||||
if ($return === undefined) return resolve(createIterResultObject(undefined, true));
|
||||
var result = anObject(call($return, iterator));
|
||||
asyncFromSyncIteratorContinuation(result, resolve, reject);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = AsyncFromSyncIterator;
|
19
node_modules/core-js/internals/async-iterator-close.js
generated
vendored
Normal file
19
node_modules/core-js/internals/async-iterator-close.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
var call = require('../internals/function-call');
|
||||
var getBuiltIn = require('../internals/get-built-in');
|
||||
var getMethod = require('../internals/get-method');
|
||||
|
||||
module.exports = function (iterator, method, argument, reject) {
|
||||
try {
|
||||
var returnMethod = getMethod(iterator, 'return');
|
||||
if (returnMethod) {
|
||||
return getBuiltIn('Promise').resolve(call(returnMethod, iterator)).then(function () {
|
||||
method(argument);
|
||||
}, function (error) {
|
||||
reject(error);
|
||||
});
|
||||
}
|
||||
} catch (error2) {
|
||||
return reject(error2);
|
||||
} method(argument);
|
||||
};
|
105
node_modules/core-js/internals/async-iterator-create-proxy.js
generated
vendored
Normal file
105
node_modules/core-js/internals/async-iterator-create-proxy.js
generated
vendored
Normal file
@ -0,0 +1,105 @@
|
||||
'use strict';
|
||||
var call = require('../internals/function-call');
|
||||
var perform = require('../internals/perform');
|
||||
var anObject = require('../internals/an-object');
|
||||
var create = require('../internals/object-create');
|
||||
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
|
||||
var defineBuiltIns = require('../internals/define-built-ins');
|
||||
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||||
var InternalStateModule = require('../internals/internal-state');
|
||||
var getBuiltIn = require('../internals/get-built-in');
|
||||
var getMethod = require('../internals/get-method');
|
||||
var AsyncIteratorPrototype = require('../internals/async-iterator-prototype');
|
||||
var createIterResultObject = require('../internals/create-iter-result-object');
|
||||
var iteratorClose = require('../internals/iterator-close');
|
||||
|
||||
var Promise = getBuiltIn('Promise');
|
||||
|
||||
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
||||
var ASYNC_ITERATOR_HELPER = 'AsyncIteratorHelper';
|
||||
var WRAP_FOR_VALID_ASYNC_ITERATOR = 'WrapForValidAsyncIterator';
|
||||
var setInternalState = InternalStateModule.set;
|
||||
|
||||
var createAsyncIteratorProxyPrototype = function (IS_ITERATOR) {
|
||||
var IS_GENERATOR = !IS_ITERATOR;
|
||||
var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ASYNC_ITERATOR : ASYNC_ITERATOR_HELPER);
|
||||
|
||||
var getStateOrEarlyExit = function (that) {
|
||||
var stateCompletion = perform(function () {
|
||||
return getInternalState(that);
|
||||
});
|
||||
|
||||
var stateError = stateCompletion.error;
|
||||
var state = stateCompletion.value;
|
||||
|
||||
if (stateError || (IS_GENERATOR && state.done)) {
|
||||
return { exit: true, value: stateError ? Promise.reject(state) : Promise.resolve(createIterResultObject(undefined, true)) };
|
||||
} return { exit: false, value: state };
|
||||
};
|
||||
|
||||
return defineBuiltIns(create(AsyncIteratorPrototype), {
|
||||
next: function next() {
|
||||
var stateCompletion = getStateOrEarlyExit(this);
|
||||
var state = stateCompletion.value;
|
||||
if (stateCompletion.exit) return state;
|
||||
var handlerCompletion = perform(function () {
|
||||
return anObject(state.nextHandler(Promise));
|
||||
});
|
||||
var handlerError = handlerCompletion.error;
|
||||
var value = handlerCompletion.value;
|
||||
if (handlerError) state.done = true;
|
||||
return handlerError ? Promise.reject(value) : Promise.resolve(value);
|
||||
},
|
||||
'return': function () {
|
||||
var stateCompletion = getStateOrEarlyExit(this);
|
||||
var state = stateCompletion.value;
|
||||
if (stateCompletion.exit) return state;
|
||||
state.done = true;
|
||||
var iterator = state.iterator;
|
||||
var returnMethod, result;
|
||||
var completion = perform(function () {
|
||||
if (state.inner) try {
|
||||
iteratorClose(state.inner.iterator, 'normal');
|
||||
} catch (error) {
|
||||
return iteratorClose(iterator, 'throw', error);
|
||||
}
|
||||
return getMethod(iterator, 'return');
|
||||
});
|
||||
returnMethod = result = completion.value;
|
||||
if (completion.error) return Promise.reject(result);
|
||||
if (returnMethod === undefined) return Promise.resolve(createIterResultObject(undefined, true));
|
||||
completion = perform(function () {
|
||||
return call(returnMethod, iterator);
|
||||
});
|
||||
result = completion.value;
|
||||
if (completion.error) return Promise.reject(result);
|
||||
return IS_ITERATOR ? Promise.resolve(result) : Promise.resolve(result).then(function (resolved) {
|
||||
anObject(resolved);
|
||||
return createIterResultObject(undefined, true);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var WrapForValidAsyncIteratorPrototype = createAsyncIteratorProxyPrototype(true);
|
||||
var AsyncIteratorHelperPrototype = createAsyncIteratorProxyPrototype(false);
|
||||
|
||||
createNonEnumerableProperty(AsyncIteratorHelperPrototype, TO_STRING_TAG, 'Async Iterator Helper');
|
||||
|
||||
module.exports = function (nextHandler, IS_ITERATOR) {
|
||||
var AsyncIteratorProxy = function AsyncIterator(record, state) {
|
||||
if (state) {
|
||||
state.iterator = record.iterator;
|
||||
state.next = record.next;
|
||||
} else state = record;
|
||||
state.type = IS_ITERATOR ? WRAP_FOR_VALID_ASYNC_ITERATOR : ASYNC_ITERATOR_HELPER;
|
||||
state.nextHandler = nextHandler;
|
||||
state.counter = 0;
|
||||
state.done = false;
|
||||
setInternalState(this, state);
|
||||
};
|
||||
|
||||
AsyncIteratorProxy.prototype = IS_ITERATOR ? WrapForValidAsyncIteratorPrototype : AsyncIteratorHelperPrototype;
|
||||
|
||||
return AsyncIteratorProxy;
|
||||
};
|
13
node_modules/core-js/internals/async-iterator-indexed.js
generated
vendored
Normal file
13
node_modules/core-js/internals/async-iterator-indexed.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
var call = require('../internals/function-call');
|
||||
var map = require('../internals/async-iterator-map');
|
||||
|
||||
var callback = function (value, counter) {
|
||||
return [counter, value];
|
||||
};
|
||||
|
||||
// `AsyncIterator.prototype.indexed` method
|
||||
// https://github.com/tc39/proposal-iterator-helpers
|
||||
module.exports = function indexed() {
|
||||
return call(map, this, callback);
|
||||
};
|
90
node_modules/core-js/internals/async-iterator-iteration.js
generated
vendored
Normal file
90
node_modules/core-js/internals/async-iterator-iteration.js
generated
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
'use strict';
|
||||
// https://github.com/tc39/proposal-iterator-helpers
|
||||
// https://github.com/tc39/proposal-array-from-async
|
||||
var call = require('../internals/function-call');
|
||||
var aCallable = require('../internals/a-callable');
|
||||
var anObject = require('../internals/an-object');
|
||||
var isObject = require('../internals/is-object');
|
||||
var doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');
|
||||
var getBuiltIn = require('../internals/get-built-in');
|
||||
var getIteratorDirect = require('../internals/get-iterator-direct');
|
||||
var closeAsyncIteration = require('../internals/async-iterator-close');
|
||||
|
||||
var createMethod = function (TYPE) {
|
||||
var IS_TO_ARRAY = TYPE == 0;
|
||||
var IS_FOR_EACH = TYPE == 1;
|
||||
var IS_EVERY = TYPE == 2;
|
||||
var IS_SOME = TYPE == 3;
|
||||
return function (object, fn, target) {
|
||||
anObject(object);
|
||||
var MAPPING = fn !== undefined;
|
||||
if (MAPPING || !IS_TO_ARRAY) aCallable(fn);
|
||||
var record = getIteratorDirect(object);
|
||||
var Promise = getBuiltIn('Promise');
|
||||
var iterator = record.iterator;
|
||||
var next = record.next;
|
||||
var counter = 0;
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
var ifAbruptCloseAsyncIterator = function (error) {
|
||||
closeAsyncIteration(iterator, reject, error, reject);
|
||||
};
|
||||
|
||||
var loop = function () {
|
||||
try {
|
||||
if (MAPPING) try {
|
||||
doesNotExceedSafeInteger(counter);
|
||||
} catch (error5) { ifAbruptCloseAsyncIterator(error5); }
|
||||
Promise.resolve(anObject(call(next, iterator))).then(function (step) {
|
||||
try {
|
||||
if (anObject(step).done) {
|
||||
if (IS_TO_ARRAY) {
|
||||
target.length = counter;
|
||||
resolve(target);
|
||||
} else resolve(IS_SOME ? false : IS_EVERY || undefined);
|
||||
} else {
|
||||
var value = step.value;
|
||||
try {
|
||||
if (MAPPING) {
|
||||
var result = fn(value, counter);
|
||||
|
||||
var handler = function ($result) {
|
||||
if (IS_FOR_EACH) {
|
||||
loop();
|
||||
} else if (IS_EVERY) {
|
||||
$result ? loop() : closeAsyncIteration(iterator, resolve, false, reject);
|
||||
} else if (IS_TO_ARRAY) {
|
||||
try {
|
||||
target[counter++] = $result;
|
||||
loop();
|
||||
} catch (error4) { ifAbruptCloseAsyncIterator(error4); }
|
||||
} else {
|
||||
$result ? closeAsyncIteration(iterator, resolve, IS_SOME || value, reject) : loop();
|
||||
}
|
||||
};
|
||||
|
||||
if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator);
|
||||
else handler(result);
|
||||
} else {
|
||||
target[counter++] = value;
|
||||
loop();
|
||||
}
|
||||
} catch (error3) { ifAbruptCloseAsyncIterator(error3); }
|
||||
}
|
||||
} catch (error2) { reject(error2); }
|
||||
}, reject);
|
||||
} catch (error) { reject(error); }
|
||||
};
|
||||
|
||||
loop();
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
toArray: createMethod(0),
|
||||
forEach: createMethod(1),
|
||||
every: createMethod(2),
|
||||
some: createMethod(3),
|
||||
find: createMethod(4)
|
||||
};
|
57
node_modules/core-js/internals/async-iterator-map.js
generated
vendored
Normal file
57
node_modules/core-js/internals/async-iterator-map.js
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
'use strict';
|
||||
var call = require('../internals/function-call');
|
||||
var aCallable = require('../internals/a-callable');
|
||||
var anObject = require('../internals/an-object');
|
||||
var isObject = require('../internals/is-object');
|
||||
var getIteratorDirect = require('../internals/get-iterator-direct');
|
||||
var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy');
|
||||
var createIterResultObject = require('../internals/create-iter-result-object');
|
||||
var closeAsyncIteration = require('../internals/async-iterator-close');
|
||||
|
||||
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) {
|
||||
var state = this;
|
||||
var iterator = state.iterator;
|
||||
var mapper = state.mapper;
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
var doneAndReject = function (error) {
|
||||
state.done = true;
|
||||
reject(error);
|
||||
};
|
||||
|
||||
var ifAbruptCloseAsyncIterator = function (error) {
|
||||
closeAsyncIteration(iterator, doneAndReject, error, doneAndReject);
|
||||
};
|
||||
|
||||
Promise.resolve(anObject(call(state.next, iterator))).then(function (step) {
|
||||
try {
|
||||
if (anObject(step).done) {
|
||||
state.done = true;
|
||||
resolve(createIterResultObject(undefined, true));
|
||||
} else {
|
||||
var value = step.value;
|
||||
try {
|
||||
var result = mapper(value, state.counter++);
|
||||
|
||||
var handler = function (mapped) {
|
||||
resolve(createIterResultObject(mapped, false));
|
||||
};
|
||||
|
||||
if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator);
|
||||
else handler(result);
|
||||
} catch (error2) { ifAbruptCloseAsyncIterator(error2); }
|
||||
}
|
||||
} catch (error) { doneAndReject(error); }
|
||||
}, doneAndReject);
|
||||
});
|
||||
});
|
||||
|
||||
// `AsyncIterator.prototype.map` method
|
||||
// https://github.com/tc39/proposal-iterator-helpers
|
||||
module.exports = function map(mapper) {
|
||||
anObject(this);
|
||||
aCallable(mapper);
|
||||
return new AsyncIteratorProxy(getIteratorDirect(this), {
|
||||
mapper: mapper
|
||||
});
|
||||
};
|
38
node_modules/core-js/internals/async-iterator-prototype.js
generated
vendored
Normal file
38
node_modules/core-js/internals/async-iterator-prototype.js
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
'use strict';
|
||||
var global = require('../internals/global');
|
||||
var shared = require('../internals/shared-store');
|
||||
var isCallable = require('../internals/is-callable');
|
||||
var create = require('../internals/object-create');
|
||||
var getPrototypeOf = require('../internals/object-get-prototype-of');
|
||||
var defineBuiltIn = require('../internals/define-built-in');
|
||||
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||||
var IS_PURE = require('../internals/is-pure');
|
||||
|
||||
var USE_FUNCTION_CONSTRUCTOR = 'USE_FUNCTION_CONSTRUCTOR';
|
||||
var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
|
||||
var AsyncIterator = global.AsyncIterator;
|
||||
var PassedAsyncIteratorPrototype = shared.AsyncIteratorPrototype;
|
||||
var AsyncIteratorPrototype, prototype;
|
||||
|
||||
if (PassedAsyncIteratorPrototype) {
|
||||
AsyncIteratorPrototype = PassedAsyncIteratorPrototype;
|
||||
} else if (isCallable(AsyncIterator)) {
|
||||
AsyncIteratorPrototype = AsyncIterator.prototype;
|
||||
} else if (shared[USE_FUNCTION_CONSTRUCTOR] || global[USE_FUNCTION_CONSTRUCTOR]) {
|
||||
try {
|
||||
// eslint-disable-next-line no-new-func -- we have no alternatives without usage of modern syntax
|
||||
prototype = getPrototypeOf(getPrototypeOf(getPrototypeOf(Function('return async function*(){}()')())));
|
||||
if (getPrototypeOf(prototype) === Object.prototype) AsyncIteratorPrototype = prototype;
|
||||
} catch (error) { /* empty */ }
|
||||
}
|
||||
|
||||
if (!AsyncIteratorPrototype) AsyncIteratorPrototype = {};
|
||||
else if (IS_PURE) AsyncIteratorPrototype = create(AsyncIteratorPrototype);
|
||||
|
||||
if (!isCallable(AsyncIteratorPrototype[ASYNC_ITERATOR])) {
|
||||
defineBuiltIn(AsyncIteratorPrototype, ASYNC_ITERATOR, function () {
|
||||
return this;
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = AsyncIteratorPrototype;
|
7
node_modules/core-js/internals/async-iterator-wrap.js
generated
vendored
Normal file
7
node_modules/core-js/internals/async-iterator-wrap.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
var call = require('../internals/function-call');
|
||||
var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy');
|
||||
|
||||
module.exports = createAsyncIteratorProxy(function () {
|
||||
return call(this.next, this.iterator);
|
||||
}, true);
|
10
node_modules/core-js/internals/base64-map.js
generated
vendored
Normal file
10
node_modules/core-js/internals/base64-map.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
var itoc = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||
var ctoi = {};
|
||||
|
||||
for (var index = 0; index < 66; index++) ctoi[itoc.charAt(index)] = index;
|
||||
|
||||
module.exports = {
|
||||
itoc: itoc,
|
||||
ctoi: ctoi
|
||||
};
|
12
node_modules/core-js/internals/call-with-safe-iteration-closing.js
generated
vendored
Normal file
12
node_modules/core-js/internals/call-with-safe-iteration-closing.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
var anObject = require('../internals/an-object');
|
||||
var iteratorClose = require('../internals/iterator-close');
|
||||
|
||||
// call something on iterator step with safe closing on error
|
||||
module.exports = function (iterator, fn, value, ENTRIES) {
|
||||
try {
|
||||
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
||||
} catch (error) {
|
||||
iteratorClose(iterator, 'throw', error);
|
||||
}
|
||||
};
|
8
node_modules/core-js/internals/caller.js
generated
vendored
Normal file
8
node_modules/core-js/internals/caller.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
module.exports = function (methodName, numArgs) {
|
||||
return numArgs == 1 ? function (object, arg) {
|
||||
return object[methodName](arg);
|
||||
} : function (object, arg1, arg2) {
|
||||
return object[methodName](arg1, arg2);
|
||||
};
|
||||
};
|
39
node_modules/core-js/internals/check-correctness-of-iteration.js
generated
vendored
Normal file
39
node_modules/core-js/internals/check-correctness-of-iteration.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||||
|
||||
var ITERATOR = wellKnownSymbol('iterator');
|
||||
var SAFE_CLOSING = false;
|
||||
|
||||
try {
|
||||
var called = 0;
|
||||
var iteratorWithReturn = {
|
||||
next: function () {
|
||||
return { done: !!called++ };
|
||||
},
|
||||
'return': function () {
|
||||
SAFE_CLOSING = true;
|
||||
}
|
||||
};
|
||||
iteratorWithReturn[ITERATOR] = function () {
|
||||
return this;
|
||||
};
|
||||
// eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
|
||||
Array.from(iteratorWithReturn, function () { throw 2; });
|
||||
} catch (error) { /* empty */ }
|
||||
|
||||
module.exports = function (exec, SKIP_CLOSING) {
|
||||
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
||||
var ITERATION_SUPPORT = false;
|
||||
try {
|
||||
var object = {};
|
||||
object[ITERATOR] = function () {
|
||||
return {
|
||||
next: function () {
|
||||
return { done: ITERATION_SUPPORT = true };
|
||||
}
|
||||
};
|
||||
};
|
||||
exec(object);
|
||||
} catch (error) { /* empty */ }
|
||||
return ITERATION_SUPPORT;
|
||||
};
|
9
node_modules/core-js/internals/classof-raw.js
generated
vendored
Normal file
9
node_modules/core-js/internals/classof-raw.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
|
||||
var toString = uncurryThis({}.toString);
|
||||
var stringSlice = uncurryThis(''.slice);
|
||||
|
||||
module.exports = function (it) {
|
||||
return stringSlice(toString(it), 8, -1);
|
||||
};
|
30
node_modules/core-js/internals/classof.js
generated
vendored
Normal file
30
node_modules/core-js/internals/classof.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');
|
||||
var isCallable = require('../internals/is-callable');
|
||||
var classofRaw = require('../internals/classof-raw');
|
||||
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||||
|
||||
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
||||
var $Object = Object;
|
||||
|
||||
// ES3 wrong here
|
||||
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
||||
|
||||
// fallback for IE11 Script Access Denied error
|
||||
var tryGet = function (it, key) {
|
||||
try {
|
||||
return it[key];
|
||||
} catch (error) { /* empty */ }
|
||||
};
|
||||
|
||||
// getting tag from ES6+ `Object.prototype.toString`
|
||||
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
||||
var O, tag, result;
|
||||
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
||||
// @@toStringTag case
|
||||
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
||||
// builtinTag case
|
||||
: CORRECT_ARGUMENTS ? classofRaw(O)
|
||||
// ES3 arguments fallback
|
||||
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
||||
};
|
31
node_modules/core-js/internals/collection-from.js
generated
vendored
Normal file
31
node_modules/core-js/internals/collection-from.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
// https://tc39.github.io/proposal-setmap-offrom/
|
||||
var bind = require('../internals/function-bind-context');
|
||||
var call = require('../internals/function-call');
|
||||
var aCallable = require('../internals/a-callable');
|
||||
var aConstructor = require('../internals/a-constructor');
|
||||
var isNullOrUndefined = require('../internals/is-null-or-undefined');
|
||||
var iterate = require('../internals/iterate');
|
||||
|
||||
var push = [].push;
|
||||
|
||||
module.exports = function from(source /* , mapFn, thisArg */) {
|
||||
var length = arguments.length;
|
||||
var mapFn = length > 1 ? arguments[1] : undefined;
|
||||
var mapping, array, n, boundFunction;
|
||||
aConstructor(this);
|
||||
mapping = mapFn !== undefined;
|
||||
if (mapping) aCallable(mapFn);
|
||||
if (isNullOrUndefined(source)) return new this();
|
||||
array = [];
|
||||
if (mapping) {
|
||||
n = 0;
|
||||
boundFunction = bind(mapFn, length > 2 ? arguments[2] : undefined);
|
||||
iterate(source, function (nextItem) {
|
||||
call(push, array, boundFunction(nextItem, n++));
|
||||
});
|
||||
} else {
|
||||
iterate(source, push, { that: array });
|
||||
}
|
||||
return new this(array);
|
||||
};
|
7
node_modules/core-js/internals/collection-of.js
generated
vendored
Normal file
7
node_modules/core-js/internals/collection-of.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
var arraySlice = require('../internals/array-slice');
|
||||
|
||||
// https://tc39.github.io/proposal-setmap-offrom/
|
||||
module.exports = function of() {
|
||||
return new this(arraySlice(arguments));
|
||||
};
|
207
node_modules/core-js/internals/collection-strong.js
generated
vendored
Normal file
207
node_modules/core-js/internals/collection-strong.js
generated
vendored
Normal file
@ -0,0 +1,207 @@
|
||||
'use strict';
|
||||
var create = require('../internals/object-create');
|
||||
var defineBuiltInAccessor = require('../internals/define-built-in-accessor');
|
||||
var defineBuiltIns = require('../internals/define-built-ins');
|
||||
var bind = require('../internals/function-bind-context');
|
||||
var anInstance = require('../internals/an-instance');
|
||||
var isNullOrUndefined = require('../internals/is-null-or-undefined');
|
||||
var iterate = require('../internals/iterate');
|
||||
var defineIterator = require('../internals/iterator-define');
|
||||
var createIterResultObject = require('../internals/create-iter-result-object');
|
||||
var setSpecies = require('../internals/set-species');
|
||||
var DESCRIPTORS = require('../internals/descriptors');
|
||||
var fastKey = require('../internals/internal-metadata').fastKey;
|
||||
var InternalStateModule = require('../internals/internal-state');
|
||||
|
||||
var setInternalState = InternalStateModule.set;
|
||||
var internalStateGetterFor = InternalStateModule.getterFor;
|
||||
|
||||
module.exports = {
|
||||
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
|
||||
var Constructor = wrapper(function (that, iterable) {
|
||||
anInstance(that, Prototype);
|
||||
setInternalState(that, {
|
||||
type: CONSTRUCTOR_NAME,
|
||||
index: create(null),
|
||||
first: undefined,
|
||||
last: undefined,
|
||||
size: 0
|
||||
});
|
||||
if (!DESCRIPTORS) that.size = 0;
|
||||
if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
||||
});
|
||||
|
||||
var Prototype = Constructor.prototype;
|
||||
|
||||
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
||||
|
||||
var define = function (that, key, value) {
|
||||
var state = getInternalState(that);
|
||||
var entry = getEntry(that, key);
|
||||
var previous, index;
|
||||
// change existing entry
|
||||
if (entry) {
|
||||
entry.value = value;
|
||||
// create new entry
|
||||
} else {
|
||||
state.last = entry = {
|
||||
index: index = fastKey(key, true),
|
||||
key: key,
|
||||
value: value,
|
||||
previous: previous = state.last,
|
||||
next: undefined,
|
||||
removed: false
|
||||
};
|
||||
if (!state.first) state.first = entry;
|
||||
if (previous) previous.next = entry;
|
||||
if (DESCRIPTORS) state.size++;
|
||||
else that.size++;
|
||||
// add to index
|
||||
if (index !== 'F') state.index[index] = entry;
|
||||
} return that;
|
||||
};
|
||||
|
||||
var getEntry = function (that, key) {
|
||||
var state = getInternalState(that);
|
||||
// fast case
|
||||
var index = fastKey(key);
|
||||
var entry;
|
||||
if (index !== 'F') return state.index[index];
|
||||
// frozen object case
|
||||
for (entry = state.first; entry; entry = entry.next) {
|
||||
if (entry.key == key) return entry;
|
||||
}
|
||||
};
|
||||
|
||||
defineBuiltIns(Prototype, {
|
||||
// `{ Map, Set }.prototype.clear()` methods
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.clear
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.clear
|
||||
clear: function clear() {
|
||||
var that = this;
|
||||
var state = getInternalState(that);
|
||||
var data = state.index;
|
||||
var entry = state.first;
|
||||
while (entry) {
|
||||
entry.removed = true;
|
||||
if (entry.previous) entry.previous = entry.previous.next = undefined;
|
||||
delete data[entry.index];
|
||||
entry = entry.next;
|
||||
}
|
||||
state.first = state.last = undefined;
|
||||
if (DESCRIPTORS) state.size = 0;
|
||||
else that.size = 0;
|
||||
},
|
||||
// `{ Map, Set }.prototype.delete(key)` methods
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.delete
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.delete
|
||||
'delete': function (key) {
|
||||
var that = this;
|
||||
var state = getInternalState(that);
|
||||
var entry = getEntry(that, key);
|
||||
if (entry) {
|
||||
var next = entry.next;
|
||||
var prev = entry.previous;
|
||||
delete state.index[entry.index];
|
||||
entry.removed = true;
|
||||
if (prev) prev.next = next;
|
||||
if (next) next.previous = prev;
|
||||
if (state.first == entry) state.first = next;
|
||||
if (state.last == entry) state.last = prev;
|
||||
if (DESCRIPTORS) state.size--;
|
||||
else that.size--;
|
||||
} return !!entry;
|
||||
},
|
||||
// `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.foreach
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.foreach
|
||||
forEach: function forEach(callbackfn /* , that = undefined */) {
|
||||
var state = getInternalState(this);
|
||||
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
||||
var entry;
|
||||
while (entry = entry ? entry.next : state.first) {
|
||||
boundFunction(entry.value, entry.key, this);
|
||||
// revert to the last existing entry
|
||||
while (entry && entry.removed) entry = entry.previous;
|
||||
}
|
||||
},
|
||||
// `{ Map, Set}.prototype.has(key)` methods
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.has
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.has
|
||||
has: function has(key) {
|
||||
return !!getEntry(this, key);
|
||||
}
|
||||
});
|
||||
|
||||
defineBuiltIns(Prototype, IS_MAP ? {
|
||||
// `Map.prototype.get(key)` method
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.get
|
||||
get: function get(key) {
|
||||
var entry = getEntry(this, key);
|
||||
return entry && entry.value;
|
||||
},
|
||||
// `Map.prototype.set(key, value)` method
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.set
|
||||
set: function set(key, value) {
|
||||
return define(this, key === 0 ? 0 : key, value);
|
||||
}
|
||||
} : {
|
||||
// `Set.prototype.add(value)` method
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.add
|
||||
add: function add(value) {
|
||||
return define(this, value = value === 0 ? 0 : value, value);
|
||||
}
|
||||
});
|
||||
if (DESCRIPTORS) defineBuiltInAccessor(Prototype, 'size', {
|
||||
configurable: true,
|
||||
get: function () {
|
||||
return getInternalState(this).size;
|
||||
}
|
||||
});
|
||||
return Constructor;
|
||||
},
|
||||
setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {
|
||||
var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
|
||||
var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
||||
var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
|
||||
// `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.entries
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.keys
|
||||
// https://tc39.es/ecma262/#sec-map.prototype.values
|
||||
// https://tc39.es/ecma262/#sec-map.prototype-@@iterator
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.entries
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.keys
|
||||
// https://tc39.es/ecma262/#sec-set.prototype.values
|
||||
// https://tc39.es/ecma262/#sec-set.prototype-@@iterator
|
||||
defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {
|
||||
setInternalState(this, {
|
||||
type: ITERATOR_NAME,
|
||||
target: iterated,
|
||||
state: getInternalCollectionState(iterated),
|
||||
kind: kind,
|
||||
last: undefined
|
||||
});
|
||||
}, function () {
|
||||
var state = getInternalIteratorState(this);
|
||||
var kind = state.kind;
|
||||
var entry = state.last;
|
||||
// revert to the last existing entry
|
||||
while (entry && entry.removed) entry = entry.previous;
|
||||
// get next entry
|
||||
if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
|
||||
// or finish the iteration
|
||||
state.target = undefined;
|
||||
return createIterResultObject(undefined, true);
|
||||
}
|
||||
// return step by kind
|
||||
if (kind == 'keys') return createIterResultObject(entry.key, false);
|
||||
if (kind == 'values') return createIterResultObject(entry.value, false);
|
||||
return createIterResultObject([entry.key, entry.value], false);
|
||||
}, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
|
||||
|
||||
// `{ Map, Set }.prototype[@@species]` accessors
|
||||
// https://tc39.es/ecma262/#sec-get-map-@@species
|
||||
// https://tc39.es/ecma262/#sec-get-set-@@species
|
||||
setSpecies(CONSTRUCTOR_NAME);
|
||||
}
|
||||
};
|
131
node_modules/core-js/internals/collection-weak.js
generated
vendored
Normal file
131
node_modules/core-js/internals/collection-weak.js
generated
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
'use strict';
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var defineBuiltIns = require('../internals/define-built-ins');
|
||||
var getWeakData = require('../internals/internal-metadata').getWeakData;
|
||||
var anInstance = require('../internals/an-instance');
|
||||
var anObject = require('../internals/an-object');
|
||||
var isNullOrUndefined = require('../internals/is-null-or-undefined');
|
||||
var isObject = require('../internals/is-object');
|
||||
var iterate = require('../internals/iterate');
|
||||
var ArrayIterationModule = require('../internals/array-iteration');
|
||||
var hasOwn = require('../internals/has-own-property');
|
||||
var InternalStateModule = require('../internals/internal-state');
|
||||
|
||||
var setInternalState = InternalStateModule.set;
|
||||
var internalStateGetterFor = InternalStateModule.getterFor;
|
||||
var find = ArrayIterationModule.find;
|
||||
var findIndex = ArrayIterationModule.findIndex;
|
||||
var splice = uncurryThis([].splice);
|
||||
var id = 0;
|
||||
|
||||
// fallback for uncaught frozen keys
|
||||
var uncaughtFrozenStore = function (state) {
|
||||
return state.frozen || (state.frozen = new UncaughtFrozenStore());
|
||||
};
|
||||
|
||||
var UncaughtFrozenStore = function () {
|
||||
this.entries = [];
|
||||
};
|
||||
|
||||
var findUncaughtFrozen = function (store, key) {
|
||||
return find(store.entries, function (it) {
|
||||
return it[0] === key;
|
||||
});
|
||||
};
|
||||
|
||||
UncaughtFrozenStore.prototype = {
|
||||
get: function (key) {
|
||||
var entry = findUncaughtFrozen(this, key);
|
||||
if (entry) return entry[1];
|
||||
},
|
||||
has: function (key) {
|
||||
return !!findUncaughtFrozen(this, key);
|
||||
},
|
||||
set: function (key, value) {
|
||||
var entry = findUncaughtFrozen(this, key);
|
||||
if (entry) entry[1] = value;
|
||||
else this.entries.push([key, value]);
|
||||
},
|
||||
'delete': function (key) {
|
||||
var index = findIndex(this.entries, function (it) {
|
||||
return it[0] === key;
|
||||
});
|
||||
if (~index) splice(this.entries, index, 1);
|
||||
return !!~index;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
|
||||
var Constructor = wrapper(function (that, iterable) {
|
||||
anInstance(that, Prototype);
|
||||
setInternalState(that, {
|
||||
type: CONSTRUCTOR_NAME,
|
||||
id: id++,
|
||||
frozen: undefined
|
||||
});
|
||||
if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
||||
});
|
||||
|
||||
var Prototype = Constructor.prototype;
|
||||
|
||||
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
||||
|
||||
var define = function (that, key, value) {
|
||||
var state = getInternalState(that);
|
||||
var data = getWeakData(anObject(key), true);
|
||||
if (data === true) uncaughtFrozenStore(state).set(key, value);
|
||||
else data[state.id] = value;
|
||||
return that;
|
||||
};
|
||||
|
||||
defineBuiltIns(Prototype, {
|
||||
// `{ WeakMap, WeakSet }.prototype.delete(key)` methods
|
||||
// https://tc39.es/ecma262/#sec-weakmap.prototype.delete
|
||||
// https://tc39.es/ecma262/#sec-weakset.prototype.delete
|
||||
'delete': function (key) {
|
||||
var state = getInternalState(this);
|
||||
if (!isObject(key)) return false;
|
||||
var data = getWeakData(key);
|
||||
if (data === true) return uncaughtFrozenStore(state)['delete'](key);
|
||||
return data && hasOwn(data, state.id) && delete data[state.id];
|
||||
},
|
||||
// `{ WeakMap, WeakSet }.prototype.has(key)` methods
|
||||
// https://tc39.es/ecma262/#sec-weakmap.prototype.has
|
||||
// https://tc39.es/ecma262/#sec-weakset.prototype.has
|
||||
has: function has(key) {
|
||||
var state = getInternalState(this);
|
||||
if (!isObject(key)) return false;
|
||||
var data = getWeakData(key);
|
||||
if (data === true) return uncaughtFrozenStore(state).has(key);
|
||||
return data && hasOwn(data, state.id);
|
||||
}
|
||||
});
|
||||
|
||||
defineBuiltIns(Prototype, IS_MAP ? {
|
||||
// `WeakMap.prototype.get(key)` method
|
||||
// https://tc39.es/ecma262/#sec-weakmap.prototype.get
|
||||
get: function get(key) {
|
||||
var state = getInternalState(this);
|
||||
if (isObject(key)) {
|
||||
var data = getWeakData(key);
|
||||
if (data === true) return uncaughtFrozenStore(state).get(key);
|
||||
return data ? data[state.id] : undefined;
|
||||
}
|
||||
},
|
||||
// `WeakMap.prototype.set(key, value)` method
|
||||
// https://tc39.es/ecma262/#sec-weakmap.prototype.set
|
||||
set: function set(key, value) {
|
||||
return define(this, key, value);
|
||||
}
|
||||
} : {
|
||||
// `WeakSet.prototype.add(value)` method
|
||||
// https://tc39.es/ecma262/#sec-weakset.prototype.add
|
||||
add: function add(value) {
|
||||
return define(this, value, true);
|
||||
}
|
||||
});
|
||||
|
||||
return Constructor;
|
||||
}
|
||||
};
|
106
node_modules/core-js/internals/collection.js
generated
vendored
Normal file
106
node_modules/core-js/internals/collection.js
generated
vendored
Normal file
@ -0,0 +1,106 @@
|
||||
'use strict';
|
||||
var $ = require('../internals/export');
|
||||
var global = require('../internals/global');
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var isForced = require('../internals/is-forced');
|
||||
var defineBuiltIn = require('../internals/define-built-in');
|
||||
var InternalMetadataModule = require('../internals/internal-metadata');
|
||||
var iterate = require('../internals/iterate');
|
||||
var anInstance = require('../internals/an-instance');
|
||||
var isCallable = require('../internals/is-callable');
|
||||
var isNullOrUndefined = require('../internals/is-null-or-undefined');
|
||||
var isObject = require('../internals/is-object');
|
||||
var fails = require('../internals/fails');
|
||||
var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');
|
||||
var setToStringTag = require('../internals/set-to-string-tag');
|
||||
var inheritIfRequired = require('../internals/inherit-if-required');
|
||||
|
||||
module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
|
||||
var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
|
||||
var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
|
||||
var ADDER = IS_MAP ? 'set' : 'add';
|
||||
var NativeConstructor = global[CONSTRUCTOR_NAME];
|
||||
var NativePrototype = NativeConstructor && NativeConstructor.prototype;
|
||||
var Constructor = NativeConstructor;
|
||||
var exported = {};
|
||||
|
||||
var fixMethod = function (KEY) {
|
||||
var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]);
|
||||
defineBuiltIn(NativePrototype, KEY,
|
||||
KEY == 'add' ? function add(value) {
|
||||
uncurriedNativeMethod(this, value === 0 ? 0 : value);
|
||||
return this;
|
||||
} : KEY == 'delete' ? function (key) {
|
||||
return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
||||
} : KEY == 'get' ? function get(key) {
|
||||
return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
||||
} : KEY == 'has' ? function has(key) {
|
||||
return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
||||
} : function set(key, value) {
|
||||
uncurriedNativeMethod(this, key === 0 ? 0 : key, value);
|
||||
return this;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
var REPLACE = isForced(
|
||||
CONSTRUCTOR_NAME,
|
||||
!isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
|
||||
new NativeConstructor().entries().next();
|
||||
}))
|
||||
);
|
||||
|
||||
if (REPLACE) {
|
||||
// create collection constructor
|
||||
Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
|
||||
InternalMetadataModule.enable();
|
||||
} else if (isForced(CONSTRUCTOR_NAME, true)) {
|
||||
var instance = new Constructor();
|
||||
// early implementations not supports chaining
|
||||
var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
|
||||
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
|
||||
var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
|
||||
// most early implementations doesn't supports iterables, most modern - not close it correctly
|
||||
// eslint-disable-next-line no-new -- required for testing
|
||||
var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
|
||||
// for early implementations -0 and +0 not the same
|
||||
var BUGGY_ZERO = !IS_WEAK && fails(function () {
|
||||
// V8 ~ Chromium 42- fails only with 5+ elements
|
||||
var $instance = new NativeConstructor();
|
||||
var index = 5;
|
||||
while (index--) $instance[ADDER](index, index);
|
||||
return !$instance.has(-0);
|
||||
});
|
||||
|
||||
if (!ACCEPT_ITERABLES) {
|
||||
Constructor = wrapper(function (dummy, iterable) {
|
||||
anInstance(dummy, NativePrototype);
|
||||
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
|
||||
if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
||||
return that;
|
||||
});
|
||||
Constructor.prototype = NativePrototype;
|
||||
NativePrototype.constructor = Constructor;
|
||||
}
|
||||
|
||||
if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
|
||||
fixMethod('delete');
|
||||
fixMethod('has');
|
||||
IS_MAP && fixMethod('get');
|
||||
}
|
||||
|
||||
if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
|
||||
|
||||
// weak collections should not contains .clear method
|
||||
if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
|
||||
}
|
||||
|
||||
exported[CONSTRUCTOR_NAME] = Constructor;
|
||||
$({ global: true, constructor: true, forced: Constructor != NativeConstructor }, exported);
|
||||
|
||||
setToStringTag(Constructor, CONSTRUCTOR_NAME);
|
||||
|
||||
if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
|
||||
|
||||
return Constructor;
|
||||
};
|
50
node_modules/core-js/internals/composite-key.js
generated
vendored
Normal file
50
node_modules/core-js/internals/composite-key.js
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
'use strict';
|
||||
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
||||
require('../modules/es.map');
|
||||
require('../modules/es.weak-map');
|
||||
var getBuiltIn = require('../internals/get-built-in');
|
||||
var create = require('../internals/object-create');
|
||||
var isObject = require('../internals/is-object');
|
||||
|
||||
var $Object = Object;
|
||||
var $TypeError = TypeError;
|
||||
var Map = getBuiltIn('Map');
|
||||
var WeakMap = getBuiltIn('WeakMap');
|
||||
|
||||
var Node = function () {
|
||||
// keys
|
||||
this.object = null;
|
||||
this.symbol = null;
|
||||
// child nodes
|
||||
this.primitives = null;
|
||||
this.objectsByIndex = create(null);
|
||||
};
|
||||
|
||||
Node.prototype.get = function (key, initializer) {
|
||||
return this[key] || (this[key] = initializer());
|
||||
};
|
||||
|
||||
Node.prototype.next = function (i, it, IS_OBJECT) {
|
||||
var store = IS_OBJECT
|
||||
? this.objectsByIndex[i] || (this.objectsByIndex[i] = new WeakMap())
|
||||
: this.primitives || (this.primitives = new Map());
|
||||
var entry = store.get(it);
|
||||
if (!entry) store.set(it, entry = new Node());
|
||||
return entry;
|
||||
};
|
||||
|
||||
var root = new Node();
|
||||
|
||||
module.exports = function () {
|
||||
var active = root;
|
||||
var length = arguments.length;
|
||||
var i, it;
|
||||
// for prevent leaking, start from objects
|
||||
for (i = 0; i < length; i++) {
|
||||
if (isObject(it = arguments[i])) active = active.next(i, it, true);
|
||||
}
|
||||
if (this === $Object && active === root) throw $TypeError('Composite keys must contain a non-primitive component');
|
||||
for (i = 0; i < length; i++) {
|
||||
if (!isObject(it = arguments[i])) active = active.next(i, it, false);
|
||||
} return active;
|
||||
};
|
17
node_modules/core-js/internals/copy-constructor-properties.js
generated
vendored
Normal file
17
node_modules/core-js/internals/copy-constructor-properties.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
var hasOwn = require('../internals/has-own-property');
|
||||
var ownKeys = require('../internals/own-keys');
|
||||
var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');
|
||||
var definePropertyModule = require('../internals/object-define-property');
|
||||
|
||||
module.exports = function (target, source, exceptions) {
|
||||
var keys = ownKeys(source);
|
||||
var defineProperty = definePropertyModule.f;
|
||||
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
|
||||
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
||||
}
|
||||
}
|
||||
};
|
16
node_modules/core-js/internals/correct-is-regexp-logic.js
generated
vendored
Normal file
16
node_modules/core-js/internals/correct-is-regexp-logic.js
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
var wellKnownSymbol = require('../internals/well-known-symbol');
|
||||
|
||||
var MATCH = wellKnownSymbol('match');
|
||||
|
||||
module.exports = function (METHOD_NAME) {
|
||||
var regexp = /./;
|
||||
try {
|
||||
'/./'[METHOD_NAME](regexp);
|
||||
} catch (error1) {
|
||||
try {
|
||||
regexp[MATCH] = false;
|
||||
return '/./'[METHOD_NAME](regexp);
|
||||
} catch (error2) { /* empty */ }
|
||||
} return false;
|
||||
};
|
9
node_modules/core-js/internals/correct-prototype-getter.js
generated
vendored
Normal file
9
node_modules/core-js/internals/correct-prototype-getter.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
var fails = require('../internals/fails');
|
||||
|
||||
module.exports = !fails(function () {
|
||||
function F() { /* empty */ }
|
||||
F.prototype.constructor = null;
|
||||
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
||||
return Object.getPrototypeOf(new F()) !== F.prototype;
|
||||
});
|
16
node_modules/core-js/internals/create-html.js
generated
vendored
Normal file
16
node_modules/core-js/internals/create-html.js
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var requireObjectCoercible = require('../internals/require-object-coercible');
|
||||
var toString = require('../internals/to-string');
|
||||
|
||||
var quot = /"/g;
|
||||
var replace = uncurryThis(''.replace);
|
||||
|
||||
// `CreateHTML` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-createhtml
|
||||
module.exports = function (string, tag, attribute, value) {
|
||||
var S = toString(requireObjectCoercible(string));
|
||||
var p1 = '<' + tag;
|
||||
if (attribute !== '') p1 += ' ' + attribute + '="' + replace(toString(value), quot, '"') + '"';
|
||||
return p1 + '>' + S + '</' + tag + '>';
|
||||
};
|
6
node_modules/core-js/internals/create-iter-result-object.js
generated
vendored
Normal file
6
node_modules/core-js/internals/create-iter-result-object.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
// `CreateIterResultObject` abstract operation
|
||||
// https://tc39.es/ecma262/#sec-createiterresultobject
|
||||
module.exports = function (value, done) {
|
||||
return { value: value, done: done };
|
||||
};
|
11
node_modules/core-js/internals/create-non-enumerable-property.js
generated
vendored
Normal file
11
node_modules/core-js/internals/create-non-enumerable-property.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
var DESCRIPTORS = require('../internals/descriptors');
|
||||
var definePropertyModule = require('../internals/object-define-property');
|
||||
var createPropertyDescriptor = require('../internals/create-property-descriptor');
|
||||
|
||||
module.exports = DESCRIPTORS ? function (object, key, value) {
|
||||
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
||||
} : function (object, key, value) {
|
||||
object[key] = value;
|
||||
return object;
|
||||
};
|
9
node_modules/core-js/internals/create-property-descriptor.js
generated
vendored
Normal file
9
node_modules/core-js/internals/create-property-descriptor.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
module.exports = function (bitmap, value) {
|
||||
return {
|
||||
enumerable: !(bitmap & 1),
|
||||
configurable: !(bitmap & 2),
|
||||
writable: !(bitmap & 4),
|
||||
value: value
|
||||
};
|
||||
};
|
10
node_modules/core-js/internals/create-property.js
generated
vendored
Normal file
10
node_modules/core-js/internals/create-property.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
var toPropertyKey = require('../internals/to-property-key');
|
||||
var definePropertyModule = require('../internals/object-define-property');
|
||||
var createPropertyDescriptor = require('../internals/create-property-descriptor');
|
||||
|
||||
module.exports = function (object, key, value) {
|
||||
var propertyKey = toPropertyKey(key);
|
||||
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
|
||||
else object[propertyKey] = value;
|
||||
};
|
41
node_modules/core-js/internals/date-to-iso-string.js
generated
vendored
Normal file
41
node_modules/core-js/internals/date-to-iso-string.js
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
'use strict';
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
var fails = require('../internals/fails');
|
||||
var padStart = require('../internals/string-pad').start;
|
||||
|
||||
var $RangeError = RangeError;
|
||||
var $isFinite = isFinite;
|
||||
var abs = Math.abs;
|
||||
var DatePrototype = Date.prototype;
|
||||
var nativeDateToISOString = DatePrototype.toISOString;
|
||||
var thisTimeValue = uncurryThis(DatePrototype.getTime);
|
||||
var getUTCDate = uncurryThis(DatePrototype.getUTCDate);
|
||||
var getUTCFullYear = uncurryThis(DatePrototype.getUTCFullYear);
|
||||
var getUTCHours = uncurryThis(DatePrototype.getUTCHours);
|
||||
var getUTCMilliseconds = uncurryThis(DatePrototype.getUTCMilliseconds);
|
||||
var getUTCMinutes = uncurryThis(DatePrototype.getUTCMinutes);
|
||||
var getUTCMonth = uncurryThis(DatePrototype.getUTCMonth);
|
||||
var getUTCSeconds = uncurryThis(DatePrototype.getUTCSeconds);
|
||||
|
||||
// `Date.prototype.toISOString` method implementation
|
||||
// https://tc39.es/ecma262/#sec-date.prototype.toisostring
|
||||
// PhantomJS / old WebKit fails here:
|
||||
module.exports = (fails(function () {
|
||||
return nativeDateToISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
|
||||
}) || !fails(function () {
|
||||
nativeDateToISOString.call(new Date(NaN));
|
||||
})) ? function toISOString() {
|
||||
if (!$isFinite(thisTimeValue(this))) throw $RangeError('Invalid time value');
|
||||
var date = this;
|
||||
var year = getUTCFullYear(date);
|
||||
var milliseconds = getUTCMilliseconds(date);
|
||||
var sign = year < 0 ? '-' : year > 9999 ? '+' : '';
|
||||
return sign + padStart(abs(year), sign ? 6 : 4, 0) +
|
||||
'-' + padStart(getUTCMonth(date) + 1, 2, 0) +
|
||||
'-' + padStart(getUTCDate(date), 2, 0) +
|
||||
'T' + padStart(getUTCHours(date), 2, 0) +
|
||||
':' + padStart(getUTCMinutes(date), 2, 0) +
|
||||
':' + padStart(getUTCSeconds(date), 2, 0) +
|
||||
'.' + padStart(milliseconds, 3, 0) +
|
||||
'Z';
|
||||
} : nativeDateToISOString;
|
14
node_modules/core-js/internals/date-to-primitive.js
generated
vendored
Normal file
14
node_modules/core-js/internals/date-to-primitive.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
var anObject = require('../internals/an-object');
|
||||
var ordinaryToPrimitive = require('../internals/ordinary-to-primitive');
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
// `Date.prototype[@@toPrimitive](hint)` method implementation
|
||||
// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
|
||||
module.exports = function (hint) {
|
||||
anObject(this);
|
||||
if (hint === 'string' || hint === 'default') hint = 'string';
|
||||
else if (hint !== 'number') throw $TypeError('Incorrect hint');
|
||||
return ordinaryToPrimitive(this, hint);
|
||||
};
|
9
node_modules/core-js/internals/define-built-in-accessor.js
generated
vendored
Normal file
9
node_modules/core-js/internals/define-built-in-accessor.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
var makeBuiltIn = require('../internals/make-built-in');
|
||||
var defineProperty = require('../internals/object-define-property');
|
||||
|
||||
module.exports = function (target, name, descriptor) {
|
||||
if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
|
||||
if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
|
||||
return defineProperty.f(target, name, descriptor);
|
||||
};
|
28
node_modules/core-js/internals/define-built-in.js
generated
vendored
Normal file
28
node_modules/core-js/internals/define-built-in.js
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
var isCallable = require('../internals/is-callable');
|
||||
var definePropertyModule = require('../internals/object-define-property');
|
||||
var makeBuiltIn = require('../internals/make-built-in');
|
||||
var defineGlobalProperty = require('../internals/define-global-property');
|
||||
|
||||
module.exports = function (O, key, value, options) {
|
||||
if (!options) options = {};
|
||||
var simple = options.enumerable;
|
||||
var name = options.name !== undefined ? options.name : key;
|
||||
if (isCallable(value)) makeBuiltIn(value, name, options);
|
||||
if (options.global) {
|
||||
if (simple) O[key] = value;
|
||||
else defineGlobalProperty(key, value);
|
||||
} else {
|
||||
try {
|
||||
if (!options.unsafe) delete O[key];
|
||||
else if (O[key]) simple = true;
|
||||
} catch (error) { /* empty */ }
|
||||
if (simple) O[key] = value;
|
||||
else definePropertyModule.f(O, key, {
|
||||
value: value,
|
||||
enumerable: false,
|
||||
configurable: !options.nonConfigurable,
|
||||
writable: !options.nonWritable
|
||||
});
|
||||
} return O;
|
||||
};
|
7
node_modules/core-js/internals/define-built-ins.js
generated
vendored
Normal file
7
node_modules/core-js/internals/define-built-ins.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
var defineBuiltIn = require('../internals/define-built-in');
|
||||
|
||||
module.exports = function (target, src, options) {
|
||||
for (var key in src) defineBuiltIn(target, key, src[key], options);
|
||||
return target;
|
||||
};
|
13
node_modules/core-js/internals/define-global-property.js
generated
vendored
Normal file
13
node_modules/core-js/internals/define-global-property.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
var global = require('../internals/global');
|
||||
|
||||
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
||||
module.exports = function (key, value) {
|
||||
try {
|
||||
defineProperty(global, key, { value: value, configurable: true, writable: true });
|
||||
} catch (error) {
|
||||
global[key] = value;
|
||||
} return value;
|
||||
};
|
8
node_modules/core-js/internals/delete-property-or-throw.js
generated
vendored
Normal file
8
node_modules/core-js/internals/delete-property-or-throw.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
var tryToString = require('../internals/try-to-string');
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
module.exports = function (O, P) {
|
||||
if (!delete O[P]) throw $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
|
||||
};
|
8
node_modules/core-js/internals/descriptors.js
generated
vendored
Normal file
8
node_modules/core-js/internals/descriptors.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
var fails = require('../internals/fails');
|
||||
|
||||
// Detect IE8's incomplete defineProperty implementation
|
||||
module.exports = !fails(function () {
|
||||
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
||||
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
||||
});
|
11
node_modules/core-js/internals/document-all.js
generated
vendored
Normal file
11
node_modules/core-js/internals/document-all.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
var documentAll = typeof document == 'object' && document.all;
|
||||
|
||||
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
||||
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
||||
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
||||
|
||||
module.exports = {
|
||||
all: documentAll,
|
||||
IS_HTMLDDA: IS_HTMLDDA
|
||||
};
|
11
node_modules/core-js/internals/document-create-element.js
generated
vendored
Normal file
11
node_modules/core-js/internals/document-create-element.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
var global = require('../internals/global');
|
||||
var isObject = require('../internals/is-object');
|
||||
|
||||
var document = global.document;
|
||||
// typeof document.createElement is 'object' in old IE
|
||||
var EXISTS = isObject(document) && isObject(document.createElement);
|
||||
|
||||
module.exports = function (it) {
|
||||
return EXISTS ? document.createElement(it) : {};
|
||||
};
|
8
node_modules/core-js/internals/does-not-exceed-safe-integer.js
generated
vendored
Normal file
8
node_modules/core-js/internals/does-not-exceed-safe-integer.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
var $TypeError = TypeError;
|
||||
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
||||
|
||||
module.exports = function (it) {
|
||||
if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
|
||||
return it;
|
||||
};
|
28
node_modules/core-js/internals/dom-exception-constants.js
generated
vendored
Normal file
28
node_modules/core-js/internals/dom-exception-constants.js
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
module.exports = {
|
||||
IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 },
|
||||
DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 },
|
||||
HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 },
|
||||
WrongDocumentError: { s: 'WRONG_DOCUMENT_ERR', c: 4, m: 1 },
|
||||
InvalidCharacterError: { s: 'INVALID_CHARACTER_ERR', c: 5, m: 1 },
|
||||
NoDataAllowedError: { s: 'NO_DATA_ALLOWED_ERR', c: 6, m: 0 },
|
||||
NoModificationAllowedError: { s: 'NO_MODIFICATION_ALLOWED_ERR', c: 7, m: 1 },
|
||||
NotFoundError: { s: 'NOT_FOUND_ERR', c: 8, m: 1 },
|
||||
NotSupportedError: { s: 'NOT_SUPPORTED_ERR', c: 9, m: 1 },
|
||||
InUseAttributeError: { s: 'INUSE_ATTRIBUTE_ERR', c: 10, m: 1 },
|
||||
InvalidStateError: { s: 'INVALID_STATE_ERR', c: 11, m: 1 },
|
||||
SyntaxError: { s: 'SYNTAX_ERR', c: 12, m: 1 },
|
||||
InvalidModificationError: { s: 'INVALID_MODIFICATION_ERR', c: 13, m: 1 },
|
||||
NamespaceError: { s: 'NAMESPACE_ERR', c: 14, m: 1 },
|
||||
InvalidAccessError: { s: 'INVALID_ACCESS_ERR', c: 15, m: 1 },
|
||||
ValidationError: { s: 'VALIDATION_ERR', c: 16, m: 0 },
|
||||
TypeMismatchError: { s: 'TYPE_MISMATCH_ERR', c: 17, m: 1 },
|
||||
SecurityError: { s: 'SECURITY_ERR', c: 18, m: 1 },
|
||||
NetworkError: { s: 'NETWORK_ERR', c: 19, m: 1 },
|
||||
AbortError: { s: 'ABORT_ERR', c: 20, m: 1 },
|
||||
URLMismatchError: { s: 'URL_MISMATCH_ERR', c: 21, m: 1 },
|
||||
QuotaExceededError: { s: 'QUOTA_EXCEEDED_ERR', c: 22, m: 1 },
|
||||
TimeoutError: { s: 'TIMEOUT_ERR', c: 23, m: 1 },
|
||||
InvalidNodeTypeError: { s: 'INVALID_NODE_TYPE_ERR', c: 24, m: 1 },
|
||||
DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }
|
||||
};
|
36
node_modules/core-js/internals/dom-iterables.js
generated
vendored
Normal file
36
node_modules/core-js/internals/dom-iterables.js
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
'use strict';
|
||||
// iterable DOM collections
|
||||
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
||||
module.exports = {
|
||||
CSSRuleList: 0,
|
||||
CSSStyleDeclaration: 0,
|
||||
CSSValueList: 0,
|
||||
ClientRectList: 0,
|
||||
DOMRectList: 0,
|
||||
DOMStringList: 0,
|
||||
DOMTokenList: 1,
|
||||
DataTransferItemList: 0,
|
||||
FileList: 0,
|
||||
HTMLAllCollection: 0,
|
||||
HTMLCollection: 0,
|
||||
HTMLFormElement: 0,
|
||||
HTMLSelectElement: 0,
|
||||
MediaList: 0,
|
||||
MimeTypeArray: 0,
|
||||
NamedNodeMap: 0,
|
||||
NodeList: 1,
|
||||
PaintRequestList: 0,
|
||||
Plugin: 0,
|
||||
PluginArray: 0,
|
||||
SVGLengthList: 0,
|
||||
SVGNumberList: 0,
|
||||
SVGPathSegList: 0,
|
||||
SVGPointList: 0,
|
||||
SVGStringList: 0,
|
||||
SVGTransformList: 0,
|
||||
SourceBufferList: 0,
|
||||
StyleSheetList: 0,
|
||||
TextTrackCueList: 0,
|
||||
TextTrackList: 0,
|
||||
TouchList: 0
|
||||
};
|
8
node_modules/core-js/internals/dom-token-list-prototype.js
generated
vendored
Normal file
8
node_modules/core-js/internals/dom-token-list-prototype.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
||||
var documentCreateElement = require('../internals/document-create-element');
|
||||
|
||||
var classList = documentCreateElement('span').classList;
|
||||
var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
|
||||
|
||||
module.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
|
6
node_modules/core-js/internals/engine-ff-version.js
generated
vendored
Normal file
6
node_modules/core-js/internals/engine-ff-version.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
var userAgent = require('../internals/engine-user-agent');
|
||||
|
||||
var firefox = userAgent.match(/firefox\/(\d+)/i);
|
||||
|
||||
module.exports = !!firefox && +firefox[1];
|
7
node_modules/core-js/internals/engine-is-browser.js
generated
vendored
Normal file
7
node_modules/core-js/internals/engine-is-browser.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
var IS_DENO = require('../internals/engine-is-deno');
|
||||
var IS_NODE = require('../internals/engine-is-node');
|
||||
|
||||
module.exports = !IS_DENO && !IS_NODE
|
||||
&& typeof window == 'object'
|
||||
&& typeof document == 'object';
|
3
node_modules/core-js/internals/engine-is-bun.js
generated
vendored
Normal file
3
node_modules/core-js/internals/engine-is-bun.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
/* global Bun -- Deno case */
|
||||
module.exports = typeof Bun == 'function' && Bun && typeof Bun.version == 'string';
|
3
node_modules/core-js/internals/engine-is-deno.js
generated
vendored
Normal file
3
node_modules/core-js/internals/engine-is-deno.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
/* global Deno -- Deno case */
|
||||
module.exports = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
|
4
node_modules/core-js/internals/engine-is-ie-or-edge.js
generated
vendored
Normal file
4
node_modules/core-js/internals/engine-is-ie-or-edge.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
var UA = require('../internals/engine-user-agent');
|
||||
|
||||
module.exports = /MSIE|Trident/.test(UA);
|
4
node_modules/core-js/internals/engine-is-ios-pebble.js
generated
vendored
Normal file
4
node_modules/core-js/internals/engine-is-ios-pebble.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
var userAgent = require('../internals/engine-user-agent');
|
||||
|
||||
module.exports = /ipad|iphone|ipod/i.test(userAgent) && typeof Pebble != 'undefined';
|
5
node_modules/core-js/internals/engine-is-ios.js
generated
vendored
Normal file
5
node_modules/core-js/internals/engine-is-ios.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
var userAgent = require('../internals/engine-user-agent');
|
||||
|
||||
// eslint-disable-next-line redos/no-vulnerable -- safe
|
||||
module.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);
|
4
node_modules/core-js/internals/engine-is-node.js
generated
vendored
Normal file
4
node_modules/core-js/internals/engine-is-node.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
var classof = require('../internals/classof-raw');
|
||||
|
||||
module.exports = typeof process != 'undefined' && classof(process) == 'process';
|
4
node_modules/core-js/internals/engine-is-webos-webkit.js
generated
vendored
Normal file
4
node_modules/core-js/internals/engine-is-webos-webkit.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
var userAgent = require('../internals/engine-user-agent');
|
||||
|
||||
module.exports = /web0s(?!.*chrome)/i.test(userAgent);
|
2
node_modules/core-js/internals/engine-user-agent.js
generated
vendored
Normal file
2
node_modules/core-js/internals/engine-user-agent.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
'use strict';
|
||||
module.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
28
node_modules/core-js/internals/engine-v8-version.js
generated
vendored
Normal file
28
node_modules/core-js/internals/engine-v8-version.js
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
var global = require('../internals/global');
|
||||
var userAgent = require('../internals/engine-user-agent');
|
||||
|
||||
var process = global.process;
|
||||
var Deno = global.Deno;
|
||||
var versions = process && process.versions || Deno && Deno.version;
|
||||
var v8 = versions && versions.v8;
|
||||
var match, version;
|
||||
|
||||
if (v8) {
|
||||
match = v8.split('.');
|
||||
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
||||
// but their correct versions are not interesting for us
|
||||
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
||||
}
|
||||
|
||||
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
||||
// so check `userAgent` even if `.v8` exists, but 0
|
||||
if (!version && userAgent) {
|
||||
match = userAgent.match(/Edge\/(\d+)/);
|
||||
if (!match || match[1] >= 74) {
|
||||
match = userAgent.match(/Chrome\/(\d+)/);
|
||||
if (match) version = +match[1];
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = version;
|
6
node_modules/core-js/internals/engine-webkit-version.js
generated
vendored
Normal file
6
node_modules/core-js/internals/engine-webkit-version.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
var userAgent = require('../internals/engine-user-agent');
|
||||
|
||||
var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
|
||||
|
||||
module.exports = !!webkit && +webkit[1];
|
7
node_modules/core-js/internals/entry-unbind.js
generated
vendored
Normal file
7
node_modules/core-js/internals/entry-unbind.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
var global = require('../internals/global');
|
||||
var uncurryThis = require('../internals/function-uncurry-this');
|
||||
|
||||
module.exports = function (CONSTRUCTOR, METHOD) {
|
||||
return uncurryThis(global[CONSTRUCTOR].prototype[METHOD]);
|
||||
};
|
6
node_modules/core-js/internals/entry-virtual.js
generated
vendored
Normal file
6
node_modules/core-js/internals/entry-virtual.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
var global = require('../internals/global');
|
||||
|
||||
module.exports = function (CONSTRUCTOR) {
|
||||
return global[CONSTRUCTOR].prototype;
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user