@logzio-node-toolbox/consul
Advanced tools
Comparing version 0.0.30 to 0.0.31
1612
dist/index.es.js
@@ -199,4 +199,6 @@ import retry from 'async-retry'; | ||
} = {}) { | ||
var _options$onBeforeRegi, _options$onAfterRegis; | ||
(_options$onBeforeRegi = options.onBeforeRegister) === null || _options$onBeforeRegi === void 0 ? void 0 : _options$onBeforeRegi.call(options, data); | ||
if (!data.name || !data.id) throw new Error('must provide name and id to register for consul service discovery'); | ||
if (this.registerParams.id) return; | ||
const retryOptions = { ...this.registerRetryOptions, | ||
@@ -206,10 +208,12 @@ ...options | ||
const list = await retry(async () => this.consulInstance.agent.service.list(), retryOptions); | ||
const isRegistered = Object.entries(list).some(([id, { | ||
const isAlreadyRegistered = Object.entries(list).some(([id, { | ||
Service | ||
}]) => id === data.id && Service === data.name); | ||
if (!isRegistered) { | ||
if (!isAlreadyRegistered) { | ||
await retry(async () => this.consulInstance.agent.service.register(data), retryOptions); | ||
this.registerParams.id = data.id; | ||
} | ||
(_options$onAfterRegis = options.onAfterRegister) === null || _options$onAfterRegis === void 0 ? void 0 : _options$onAfterRegis.call(options, isAlreadyRegistered); | ||
} | ||
@@ -299,9 +303,16 @@ | ||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
function _checkPrivateRedeclaration(obj, privateCollection) { | ||
if (privateCollection.has(obj)) { | ||
throw new TypeError("Cannot initialize the same private elements twice on an object"); | ||
} | ||
} | ||
function createCommonjsModule(fn) { | ||
var module = { exports: {} }; | ||
return fn(module, module.exports), module.exports; | ||
function _classPrivateFieldInitSpec(obj, privateMap, value) { | ||
_checkPrivateRedeclaration(obj, privateMap); | ||
privateMap.set(obj, value); | ||
} | ||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | ||
var check = function (it) { | ||
@@ -312,3 +323,3 @@ return it && it.Math == Math && it; | ||
var global$1 = // eslint-disable-next-line es/no-global-this -- safe | ||
var global$a = // eslint-disable-next-line es-x/no-global-this -- safe | ||
check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe | ||
@@ -320,3 +331,5 @@ check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback | ||
var fails = function (exec) { | ||
var objectGetOwnPropertyDescriptor = {}; | ||
var fails$a = function (exec) { | ||
try { | ||
@@ -329,7 +342,7 @@ return !!exec(); | ||
// Detect IE8's incomplete defineProperty implementation | ||
var fails$9 = fails$a; // Detect IE8's incomplete defineProperty implementation | ||
var descriptors = !fails(function () { | ||
// eslint-disable-next-line es/no-object-defineproperty -- required for testing | ||
var descriptors = !fails$9(function () { | ||
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing | ||
return Object.defineProperty({}, 1, { | ||
@@ -342,4 +355,25 @@ get: function () { | ||
var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe | ||
var fails$8 = fails$a; | ||
var functionBindNative = !fails$8(function () { | ||
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe | ||
var test = function () { | ||
/* empty */ | ||
}.bind(); // eslint-disable-next-line no-prototype-builtins -- safe | ||
return typeof test != 'function' || test.hasOwnProperty('prototype'); | ||
}); | ||
var NATIVE_BIND$2 = functionBindNative; | ||
var call$9 = Function.prototype.call; | ||
var functionCall = NATIVE_BIND$2 ? call$9.bind(call$9) : function () { | ||
return call$9.apply(call$9, arguments); | ||
}; | ||
var objectPropertyIsEnumerable = {}; | ||
var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe | ||
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug | ||
@@ -352,3 +386,3 @@ | ||
var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) { | ||
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) { | ||
var descriptor = getOwnPropertyDescriptor$1(this, V); | ||
@@ -358,7 +392,3 @@ return !!descriptor && descriptor.enumerable; | ||
var objectPropertyIsEnumerable = { | ||
f: f$5 | ||
}; | ||
var createPropertyDescriptor = function (bitmap, value) { | ||
var createPropertyDescriptor$3 = function (bitmap, value) { | ||
return { | ||
@@ -372,22 +402,55 @@ enumerable: !(bitmap & 1), | ||
var toString = {}.toString; | ||
var NATIVE_BIND$1 = functionBindNative; | ||
var classofRaw = function (it) { | ||
return toString.call(it).slice(8, -1); | ||
var FunctionPrototype$1 = Function.prototype; | ||
var bind$2 = FunctionPrototype$1.bind; | ||
var call$8 = FunctionPrototype$1.call; | ||
var uncurryThis$b = NATIVE_BIND$1 && bind$2.bind(call$8, call$8); | ||
var functionUncurryThis = NATIVE_BIND$1 ? function (fn) { | ||
return fn && uncurryThis$b(fn); | ||
} : function (fn) { | ||
return fn && function () { | ||
return call$8.apply(fn, arguments); | ||
}; | ||
}; | ||
var split = ''.split; // fallback for non-array-like ES3 and non-enumerable old V8 strings | ||
var uncurryThis$a = functionUncurryThis; | ||
var indexedObject = fails(function () { | ||
var toString$3 = uncurryThis$a({}.toString); | ||
var stringSlice = uncurryThis$a(''.slice); | ||
var classofRaw$1 = function (it) { | ||
return stringSlice(toString$3(it), 8, -1); | ||
}; | ||
var uncurryThis$9 = functionUncurryThis; | ||
var fails$7 = fails$a; | ||
var classof$3 = classofRaw$1; | ||
var $Object$3 = Object; | ||
var split = uncurryThis$9(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings | ||
var indexedObject = fails$7(function () { | ||
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 | ||
// eslint-disable-next-line no-prototype-builtins -- safe | ||
return !Object('z').propertyIsEnumerable(0); | ||
return !$Object$3('z').propertyIsEnumerable(0); | ||
}) ? function (it) { | ||
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); | ||
} : Object; | ||
return classof$3(it) == 'String' ? split(it, '') : $Object$3(it); | ||
} : $Object$3; | ||
// `RequireObjectCoercible` abstract operation | ||
// we can't use just `it == null` since of `document.all` special case | ||
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec | ||
var isNullOrUndefined$3 = function (it) { | ||
return it === null || it === undefined; | ||
}; | ||
var isNullOrUndefined$2 = isNullOrUndefined$3; | ||
var $TypeError$9 = TypeError; // `RequireObjectCoercible` abstract operation | ||
// https://tc39.es/ecma262/#sec-requireobjectcoercible | ||
var requireObjectCoercible = function (it) { | ||
if (it == undefined) throw TypeError("Can't call method on " + it); | ||
var requireObjectCoercible$2 = function (it) { | ||
if (isNullOrUndefined$2(it)) throw $TypeError$9("Can't call method on " + it); | ||
return it; | ||
@@ -397,57 +460,333 @@ }; | ||
// toObject with fallback for non-array-like ES3 strings | ||
var IndexedObject = indexedObject; | ||
var requireObjectCoercible$1 = requireObjectCoercible$2; | ||
var toIndexedObject$3 = function (it) { | ||
return IndexedObject(requireObjectCoercible$1(it)); | ||
}; | ||
// `IsCallable` abstract operation | ||
// https://tc39.es/ecma262/#sec-iscallable | ||
var isCallable$b = function (argument) { | ||
return typeof argument == 'function'; | ||
}; | ||
var toIndexedObject = function (it) { | ||
return indexedObject(requireObjectCoercible(it)); | ||
var isCallable$a = isCallable$b; | ||
var documentAll = typeof document == 'object' && document.all; // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot | ||
var SPECIAL_DOCUMENT_ALL = typeof documentAll == 'undefined' && documentAll !== undefined; | ||
var isObject$5 = SPECIAL_DOCUMENT_ALL ? function (it) { | ||
return typeof it == 'object' ? it !== null : isCallable$a(it) || it === documentAll; | ||
} : function (it) { | ||
return typeof it == 'object' ? it !== null : isCallable$a(it); | ||
}; | ||
var isObject = function (it) { | ||
return typeof it === 'object' ? it !== null : typeof it === 'function'; | ||
var global$9 = global$a; | ||
var isCallable$9 = isCallable$b; | ||
var aFunction = function (argument) { | ||
return isCallable$9(argument) ? argument : undefined; | ||
}; | ||
// `ToPrimitive` abstract operation | ||
// https://tc39.es/ecma262/#sec-toprimitive | ||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case | ||
// and the second argument - flag - preferred type is a string | ||
var getBuiltIn$3 = function (namespace, method) { | ||
return arguments.length < 2 ? aFunction(global$9[namespace]) : global$9[namespace] && global$9[namespace][method]; | ||
}; | ||
var uncurryThis$8 = functionUncurryThis; | ||
var toPrimitive = function (input, PREFERRED_STRING) { | ||
if (!isObject(input)) return input; | ||
var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf); | ||
var getBuiltIn$2 = getBuiltIn$3; | ||
var engineUserAgent = getBuiltIn$2('navigator', 'userAgent') || ''; | ||
var global$8 = global$a; | ||
var userAgent$2 = engineUserAgent; | ||
var process = global$8.process; | ||
var Deno = global$8.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$2) { | ||
match = userAgent$2.match(/Edge\/(\d+)/); | ||
if (!match || match[1] >= 74) { | ||
match = userAgent$2.match(/Chrome\/(\d+)/); | ||
if (match) version = +match[1]; | ||
} | ||
} | ||
var engineV8Version = version; | ||
/* eslint-disable es-x/no-symbol -- required for testing */ | ||
var V8_VERSION = engineV8Version; | ||
var fails$6 = fails$a; // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing | ||
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$6(function () { | ||
var symbol = Symbol(); // Chrome 38 Symbol has incorrect toString conversion | ||
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances | ||
return !String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances | ||
!Symbol.sham && V8_VERSION && V8_VERSION < 41; | ||
}); | ||
/* eslint-disable es-x/no-symbol -- required for testing */ | ||
var NATIVE_SYMBOL$1 = symbolConstructorDetection; | ||
var useSymbolAsUid = NATIVE_SYMBOL$1 && !Symbol.sham && typeof Symbol.iterator == 'symbol'; | ||
var getBuiltIn$1 = getBuiltIn$3; | ||
var isCallable$8 = isCallable$b; | ||
var isPrototypeOf$1 = objectIsPrototypeOf; | ||
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid; | ||
var $Object$2 = Object; | ||
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) { | ||
return typeof it == 'symbol'; | ||
} : function (it) { | ||
var $Symbol = getBuiltIn$1('Symbol'); | ||
return isCallable$8($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it)); | ||
}; | ||
var $String$2 = String; | ||
var tryToString$4 = function (argument) { | ||
try { | ||
return $String$2(argument); | ||
} catch (error) { | ||
return 'Object'; | ||
} | ||
}; | ||
var isCallable$7 = isCallable$b; | ||
var tryToString$3 = tryToString$4; | ||
var $TypeError$8 = TypeError; // `Assert: IsCallable(argument) is true` | ||
var aCallable$7 = function (argument) { | ||
if (isCallable$7(argument)) return argument; | ||
throw $TypeError$8(tryToString$3(argument) + ' is not a function'); | ||
}; | ||
var aCallable$6 = aCallable$7; | ||
var isNullOrUndefined$1 = isNullOrUndefined$3; // `GetMethod` abstract operation | ||
// https://tc39.es/ecma262/#sec-getmethod | ||
var getMethod$3 = function (V, P) { | ||
var func = V[P]; | ||
return isNullOrUndefined$1(func) ? undefined : aCallable$6(func); | ||
}; | ||
var call$7 = functionCall; | ||
var isCallable$6 = isCallable$b; | ||
var isObject$4 = isObject$5; | ||
var $TypeError$7 = TypeError; // `OrdinaryToPrimitive` abstract operation | ||
// https://tc39.es/ecma262/#sec-ordinarytoprimitive | ||
var ordinaryToPrimitive$1 = function (input, pref) { | ||
var fn, val; | ||
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; | ||
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; | ||
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; | ||
throw TypeError("Can't convert object to primitive value"); | ||
if (pref === 'string' && isCallable$6(fn = input.toString) && !isObject$4(val = call$7(fn, input))) return val; | ||
if (isCallable$6(fn = input.valueOf) && !isObject$4(val = call$7(fn, input))) return val; | ||
if (pref !== 'string' && isCallable$6(fn = input.toString) && !isObject$4(val = call$7(fn, input))) return val; | ||
throw $TypeError$7("Can't convert object to primitive value"); | ||
}; | ||
// `ToObject` abstract operation | ||
var shared$3 = {exports: {}}; | ||
var global$7 = global$a; // eslint-disable-next-line es-x/no-object-defineproperty -- safe | ||
var defineProperty$1 = Object.defineProperty; | ||
var defineGlobalProperty$3 = function (key, value) { | ||
try { | ||
defineProperty$1(global$7, key, { | ||
value: value, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} catch (error) { | ||
global$7[key] = value; | ||
} | ||
return value; | ||
}; | ||
var global$6 = global$a; | ||
var defineGlobalProperty$2 = defineGlobalProperty$3; | ||
var SHARED = '__core-js_shared__'; | ||
var store$3 = global$6[SHARED] || defineGlobalProperty$2(SHARED, {}); | ||
var sharedStore = store$3; | ||
var store$2 = sharedStore; | ||
(shared$3.exports = function (key, value) { | ||
return store$2[key] || (store$2[key] = value !== undefined ? value : {}); | ||
})('versions', []).push({ | ||
version: '3.25.0', | ||
mode: 'global', | ||
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.25.0/LICENSE', | ||
source: 'https://github.com/zloirock/core-js' | ||
}); | ||
var requireObjectCoercible = requireObjectCoercible$2; | ||
var $Object$1 = Object; // `ToObject` abstract operation | ||
// https://tc39.es/ecma262/#sec-toobject | ||
var toObject$2 = function (argument) { | ||
return $Object$1(requireObjectCoercible(argument)); | ||
}; | ||
var toObject = function (argument) { | ||
return Object(requireObjectCoercible(argument)); | ||
var uncurryThis$7 = functionUncurryThis; | ||
var toObject$1 = toObject$2; | ||
var hasOwnProperty = uncurryThis$7({}.hasOwnProperty); // `HasOwnProperty` abstract operation | ||
// https://tc39.es/ecma262/#sec-hasownproperty | ||
// eslint-disable-next-line es-x/no-object-hasown -- safe | ||
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) { | ||
return hasOwnProperty(toObject$1(it), key); | ||
}; | ||
var hasOwnProperty = {}.hasOwnProperty; | ||
var uncurryThis$6 = functionUncurryThis; | ||
var has$1 = function hasOwn(it, key) { | ||
return hasOwnProperty.call(toObject(it), key); | ||
var id = 0; | ||
var postfix = Math.random(); | ||
var toString$2 = uncurryThis$6(1.0.toString); | ||
var uid$2 = function (key) { | ||
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36); | ||
}; | ||
var document = global$1.document; // typeof document.createElement is 'object' in old IE | ||
var global$5 = global$a; | ||
var EXISTS = isObject(document) && isObject(document.createElement); | ||
var shared$2 = shared$3.exports; | ||
var hasOwn$6 = hasOwnProperty_1; | ||
var uid$1 = uid$2; | ||
var NATIVE_SYMBOL = symbolConstructorDetection; | ||
var USE_SYMBOL_AS_UID = useSymbolAsUid; | ||
var WellKnownSymbolsStore = shared$2('wks'); | ||
var Symbol$1 = global$5.Symbol; | ||
var symbolFor = Symbol$1 && Symbol$1['for']; | ||
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1; | ||
var wellKnownSymbol$5 = function (name) { | ||
if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) { | ||
var description = 'Symbol.' + name; | ||
if (NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)) { | ||
WellKnownSymbolsStore[name] = Symbol$1[name]; | ||
} else if (USE_SYMBOL_AS_UID && symbolFor) { | ||
WellKnownSymbolsStore[name] = symbolFor(description); | ||
} else { | ||
WellKnownSymbolsStore[name] = createWellKnownSymbol(description); | ||
} | ||
} | ||
return WellKnownSymbolsStore[name]; | ||
}; | ||
var call$6 = functionCall; | ||
var isObject$3 = isObject$5; | ||
var isSymbol$1 = isSymbol$2; | ||
var getMethod$2 = getMethod$3; | ||
var ordinaryToPrimitive = ordinaryToPrimitive$1; | ||
var wellKnownSymbol$4 = wellKnownSymbol$5; | ||
var $TypeError$6 = TypeError; | ||
var TO_PRIMITIVE = wellKnownSymbol$4('toPrimitive'); // `ToPrimitive` abstract operation | ||
// https://tc39.es/ecma262/#sec-toprimitive | ||
var toPrimitive$1 = function (input, pref) { | ||
if (!isObject$3(input) || isSymbol$1(input)) return input; | ||
var exoticToPrim = getMethod$2(input, TO_PRIMITIVE); | ||
var result; | ||
if (exoticToPrim) { | ||
if (pref === undefined) pref = 'default'; | ||
result = call$6(exoticToPrim, input, pref); | ||
if (!isObject$3(result) || isSymbol$1(result)) return result; | ||
throw $TypeError$6("Can't convert object to primitive value"); | ||
} | ||
if (pref === undefined) pref = 'number'; | ||
return ordinaryToPrimitive(input, pref); | ||
}; | ||
var toPrimitive = toPrimitive$1; | ||
var isSymbol = isSymbol$2; // `ToPropertyKey` abstract operation | ||
// https://tc39.es/ecma262/#sec-topropertykey | ||
var toPropertyKey$3 = function (argument) { | ||
var key = toPrimitive(argument, 'string'); | ||
return isSymbol(key) ? key : key + ''; | ||
}; | ||
var global$4 = global$a; | ||
var isObject$2 = isObject$5; | ||
var document$1 = global$4.document; // typeof document.createElement is 'object' in old IE | ||
var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement); | ||
var documentCreateElement = function (it) { | ||
return EXISTS ? document.createElement(it) : {}; | ||
return EXISTS$1 ? document$1.createElement(it) : {}; | ||
}; | ||
// Thank's IE8 for his funny defineProperty | ||
var DESCRIPTORS$6 = descriptors; | ||
var fails$5 = fails$a; | ||
var ie8DomDefine = !descriptors && !fails(function () { | ||
// eslint-disable-next-line es/no-object-defineproperty -- requied for testing | ||
return Object.defineProperty(documentCreateElement('div'), 'a', { | ||
var createElement = documentCreateElement; // Thanks to IE8 for its funny defineProperty | ||
var ie8DomDefine = !DESCRIPTORS$6 && !fails$5(function () { | ||
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing | ||
return Object.defineProperty(createElement('div'), 'a', { | ||
get: function () { | ||
@@ -459,42 +798,105 @@ return 7; | ||
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe | ||
var DESCRIPTORS$5 = descriptors; | ||
var call$5 = functionCall; | ||
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method | ||
var propertyIsEnumerableModule = objectPropertyIsEnumerable; | ||
var createPropertyDescriptor$2 = createPropertyDescriptor$3; | ||
var toIndexedObject$2 = toIndexedObject$3; | ||
var toPropertyKey$2 = toPropertyKey$3; | ||
var hasOwn$5 = hasOwnProperty_1; | ||
var IE8_DOM_DEFINE$1 = ie8DomDefine; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe | ||
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method | ||
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor | ||
var f$4 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { | ||
O = toIndexedObject(O); | ||
P = toPrimitive(P, true); | ||
if (ie8DomDefine) try { | ||
return $getOwnPropertyDescriptor(O, P); | ||
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) { | ||
O = toIndexedObject$2(O); | ||
P = toPropertyKey$2(P); | ||
if (IE8_DOM_DEFINE$1) try { | ||
return $getOwnPropertyDescriptor$1(O, P); | ||
} catch (error) { | ||
/* empty */ | ||
} | ||
if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); | ||
if (hasOwn$5(O, P)) return createPropertyDescriptor$2(!call$5(propertyIsEnumerableModule.f, O, P), O[P]); | ||
}; | ||
var objectGetOwnPropertyDescriptor = { | ||
f: f$4 | ||
}; | ||
var objectDefineProperty = {}; | ||
var anObject = function (it) { | ||
if (!isObject(it)) { | ||
throw TypeError(String(it) + ' is not an object'); | ||
} | ||
var DESCRIPTORS$4 = descriptors; | ||
return it; | ||
var fails$4 = fails$a; // V8 ~ Chrome 36- | ||
// https://bugs.chromium.org/p/v8/issues/detail?id=3334 | ||
var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$4(function () { | ||
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing | ||
return Object.defineProperty(function () { | ||
/* empty */ | ||
}, 'prototype', { | ||
value: 42, | ||
writable: false | ||
}).prototype != 42; | ||
}); | ||
var isObject$1 = isObject$5; | ||
var $String$1 = String; | ||
var $TypeError$5 = TypeError; // `Assert: Type(argument) is Object` | ||
var anObject$6 = function (argument) { | ||
if (isObject$1(argument)) return argument; | ||
throw $TypeError$5($String$1(argument) + ' is not an object'); | ||
}; | ||
// eslint-disable-next-line es/no-object-defineproperty -- safe | ||
var DESCRIPTORS$3 = descriptors; | ||
var IE8_DOM_DEFINE = ie8DomDefine; | ||
var $defineProperty = Object.defineProperty; // `Object.defineProperty` method | ||
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug; | ||
var anObject$5 = anObject$6; | ||
var toPropertyKey$1 = toPropertyKey$3; | ||
var $TypeError$4 = TypeError; // eslint-disable-next-line es-x/no-object-defineproperty -- safe | ||
var $defineProperty = Object.defineProperty; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe | ||
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | ||
var ENUMERABLE = 'enumerable'; | ||
var CONFIGURABLE$1 = 'configurable'; | ||
var WRITABLE = 'writable'; // `Object.defineProperty` method | ||
// https://tc39.es/ecma262/#sec-object.defineproperty | ||
var f$3 = descriptors ? $defineProperty : function defineProperty(O, P, Attributes) { | ||
anObject(O); | ||
P = toPrimitive(P, true); | ||
anObject(Attributes); | ||
if (ie8DomDefine) try { | ||
objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) { | ||
anObject$5(O); | ||
P = toPropertyKey$1(P); | ||
anObject$5(Attributes); | ||
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { | ||
var current = $getOwnPropertyDescriptor(O, P); | ||
if (current && current[WRITABLE]) { | ||
O[P] = Attributes.value; | ||
Attributes = { | ||
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1], | ||
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], | ||
writable: false | ||
}; | ||
} | ||
} | ||
return $defineProperty(O, P, Attributes); | ||
} : $defineProperty : function defineProperty(O, P, Attributes) { | ||
anObject$5(O); | ||
P = toPropertyKey$1(P); | ||
anObject$5(Attributes); | ||
if (IE8_DOM_DEFINE) try { | ||
return $defineProperty(O, P, Attributes); | ||
@@ -504,3 +906,3 @@ } catch (error) { | ||
} | ||
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); | ||
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$4('Accessors not supported'); | ||
if ('value' in Attributes) O[P] = Attributes.value; | ||
@@ -510,8 +912,10 @@ return O; | ||
var objectDefineProperty = { | ||
f: f$3 | ||
}; | ||
var DESCRIPTORS$2 = descriptors; | ||
var createNonEnumerableProperty = descriptors ? function (object, key, value) { | ||
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); | ||
var definePropertyModule$3 = objectDefineProperty; | ||
var createPropertyDescriptor$1 = createPropertyDescriptor$3; | ||
var createNonEnumerableProperty$2 = DESCRIPTORS$2 ? function (object, key, value) { | ||
return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value)); | ||
} : function (object, key, value) { | ||
@@ -522,58 +926,80 @@ object[key] = value; | ||
var setGlobal = function (key, value) { | ||
try { | ||
createNonEnumerableProperty(global$1, key, value); | ||
} catch (error) { | ||
global$1[key] = value; | ||
} | ||
var makeBuiltIn$2 = {exports: {}}; | ||
return value; | ||
var DESCRIPTORS$1 = descriptors; | ||
var hasOwn$4 = hasOwnProperty_1; | ||
var FunctionPrototype = Function.prototype; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe | ||
var getDescriptor = DESCRIPTORS$1 && Object.getOwnPropertyDescriptor; | ||
var EXISTS = hasOwn$4(FunctionPrototype, 'name'); // additional protection from minified / mangled / dropped function names | ||
var PROPER = EXISTS && function something() { | ||
/* empty */ | ||
}.name === 'something'; | ||
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$1 || DESCRIPTORS$1 && getDescriptor(FunctionPrototype, 'name').configurable); | ||
var functionName = { | ||
EXISTS: EXISTS, | ||
PROPER: PROPER, | ||
CONFIGURABLE: CONFIGURABLE | ||
}; | ||
var SHARED = '__core-js_shared__'; | ||
var store$1 = global$1[SHARED] || setGlobal(SHARED, {}); | ||
var sharedStore = store$1; | ||
var uncurryThis$5 = functionUncurryThis; | ||
var functionToString = Function.toString; // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper | ||
var isCallable$5 = isCallable$b; | ||
if (typeof sharedStore.inspectSource != 'function') { | ||
sharedStore.inspectSource = function (it) { | ||
return functionToString.call(it); | ||
var store$1 = sharedStore; | ||
var functionToString = uncurryThis$5(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper | ||
if (!isCallable$5(store$1.inspectSource)) { | ||
store$1.inspectSource = function (it) { | ||
return functionToString(it); | ||
}; | ||
} | ||
var inspectSource = sharedStore.inspectSource; | ||
var inspectSource$1 = store$1.inspectSource; | ||
var WeakMap$2 = global$1.WeakMap; | ||
var nativeWeakMap = typeof WeakMap$2 === 'function' && /native code/.test(inspectSource(WeakMap$2)); | ||
var global$3 = global$a; | ||
var isPure = false; | ||
var isCallable$4 = isCallable$b; | ||
var shared = createCommonjsModule(function (module) { | ||
(module.exports = function (key, value) { | ||
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); | ||
})('versions', []).push({ | ||
version: '3.12.0', | ||
mode: 'global', | ||
copyright: '© 2021 Denis Pushkarev (zloirock.ru)' | ||
}); | ||
}); | ||
var WeakMap$2 = global$3.WeakMap; | ||
var weakMapBasicDetection = isCallable$4(WeakMap$2) && /native code/.test(String(WeakMap$2)); | ||
var id = 0; | ||
var postfix = Math.random(); | ||
var shared$1 = shared$3.exports; | ||
var uid = function (key) { | ||
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); | ||
}; | ||
var uid = uid$2; | ||
var keys = shared('keys'); | ||
var keys = shared$1('keys'); | ||
var sharedKey = function (key) { | ||
var sharedKey$1 = function (key) { | ||
return keys[key] || (keys[key] = uid(key)); | ||
}; | ||
var hiddenKeys$1 = {}; | ||
var hiddenKeys$3 = {}; | ||
var NATIVE_WEAK_MAP = weakMapBasicDetection; | ||
var global$2 = global$a; | ||
var uncurryThis$4 = functionUncurryThis; | ||
var isObject = isObject$5; | ||
var createNonEnumerableProperty$1 = createNonEnumerableProperty$2; | ||
var hasOwn$3 = hasOwnProperty_1; | ||
var shared = sharedStore; | ||
var sharedKey = sharedKey$1; | ||
var hiddenKeys$2 = hiddenKeys$3; | ||
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; | ||
var WeakMap$1 = global$1.WeakMap; | ||
var TypeError$1 = global$2.TypeError; | ||
var WeakMap$1 = global$2.WeakMap; | ||
var set, get, has; | ||
@@ -590,3 +1016,3 @@ | ||
if (!isObject(it) || (state = get(it)).type !== TYPE) { | ||
throw TypeError('Incompatible receiver, ' + TYPE + ' required'); | ||
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required'); | ||
} | ||
@@ -598,12 +1024,12 @@ | ||
if (nativeWeakMap) { | ||
var store = sharedStore.state || (sharedStore.state = new WeakMap$1()); | ||
var wmget = store.get; | ||
var wmhas = store.has; | ||
var wmset = store.set; | ||
if (NATIVE_WEAK_MAP || shared.state) { | ||
var store = shared.state || (shared.state = new WeakMap$1()); | ||
var wmget = uncurryThis$4(store.get); | ||
var wmhas = uncurryThis$4(store.has); | ||
var wmset = uncurryThis$4(store.set); | ||
set = function (it, metadata) { | ||
if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); | ||
if (wmhas(store, it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED); | ||
metadata.facade = it; | ||
wmset.call(store, it, metadata); | ||
wmset(store, it, metadata); | ||
return metadata; | ||
@@ -613,16 +1039,16 @@ }; | ||
get = function (it) { | ||
return wmget.call(store, it) || {}; | ||
return wmget(store, it) || {}; | ||
}; | ||
has = function (it) { | ||
return wmhas.call(store, it); | ||
return wmhas(store, it); | ||
}; | ||
} else { | ||
var STATE = sharedKey('state'); | ||
hiddenKeys$1[STATE] = true; | ||
hiddenKeys$2[STATE] = true; | ||
set = function (it, metadata) { | ||
if (has$1(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); | ||
if (hasOwn$3(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED); | ||
metadata.facade = it; | ||
createNonEnumerableProperty(it, STATE, metadata); | ||
createNonEnumerableProperty$1(it, STATE, metadata); | ||
return metadata; | ||
@@ -632,7 +1058,7 @@ }; | ||
get = function (it) { | ||
return has$1(it, STATE) ? it[STATE] : {}; | ||
return hasOwn$3(it, STATE) ? it[STATE] : {}; | ||
}; | ||
has = function (it) { | ||
return has$1(it, STATE); | ||
return hasOwn$3(it, STATE); | ||
}; | ||
@@ -649,82 +1075,172 @@ } | ||
var redefine = createCommonjsModule(function (module) { | ||
var getInternalState = internalState.get; | ||
var enforceInternalState = internalState.enforce; | ||
var fails$3 = fails$a; | ||
var isCallable$3 = isCallable$b; | ||
var hasOwn$2 = hasOwnProperty_1; | ||
var DESCRIPTORS = descriptors; | ||
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE; | ||
var inspectSource = inspectSource$1; | ||
var InternalStateModule = internalState; | ||
var enforceInternalState = InternalStateModule.enforce; | ||
var getInternalState = InternalStateModule.get; // eslint-disable-next-line es-x/no-object-defineproperty -- safe | ||
var defineProperty = Object.defineProperty; | ||
var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails$3(function () { | ||
return defineProperty(function () { | ||
/* empty */ | ||
}, 'length', { | ||
value: 8 | ||
}).length !== 8; | ||
}); | ||
var TEMPLATE = String(String).split('String'); | ||
(module.exports = function (O, key, value, options) { | ||
var unsafe = options ? !!options.unsafe : false; | ||
var simple = options ? !!options.enumerable : false; | ||
var noTargetGet = options ? !!options.noTargetGet : false; | ||
var state; | ||
if (typeof value == 'function') { | ||
if (typeof key == 'string' && !has$1(value, 'name')) { | ||
createNonEnumerableProperty(value, 'name', key); | ||
} | ||
var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) { | ||
if (String(name).slice(0, 7) === 'Symbol(') { | ||
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'; | ||
} | ||
state = enforceInternalState(value); | ||
if (options && options.getter) name = 'get ' + name; | ||
if (options && options.setter) name = 'set ' + name; | ||
if (!state.source) { | ||
state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); | ||
} | ||
if (!hasOwn$2(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) { | ||
if (DESCRIPTORS) defineProperty(value, 'name', { | ||
value: name, | ||
configurable: true | ||
});else value.name = name; | ||
} | ||
if (O === global$1) { | ||
if (simple) O[key] = value;else setGlobal(key, value); | ||
return; | ||
} else if (!unsafe) { | ||
delete O[key]; | ||
} else if (!noTargetGet && O[key]) { | ||
simple = true; | ||
if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) { | ||
defineProperty(value, 'length', { | ||
value: options.arity | ||
}); | ||
} | ||
if (simple) O[key] = value;else createNonEnumerableProperty(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative | ||
})(Function.prototype, 'toString', function toString() { | ||
return typeof this == 'function' && getInternalState(this).source || inspectSource(this); | ||
}); | ||
}); | ||
try { | ||
if (options && hasOwn$2(options, 'constructor') && options.constructor) { | ||
if (DESCRIPTORS) defineProperty(value, 'prototype', { | ||
writable: false | ||
}); // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable | ||
} else if (value.prototype) value.prototype = undefined; | ||
} catch (error) { | ||
/* empty */ | ||
} | ||
var path = global$1; | ||
var state = enforceInternalState(value); | ||
var aFunction$1 = function (variable) { | ||
return typeof variable == 'function' ? variable : undefined; | ||
}; | ||
if (!hasOwn$2(state, 'source')) { | ||
state.source = TEMPLATE.join(typeof name == 'string' ? name : ''); | ||
} | ||
var getBuiltIn = function (namespace, method) { | ||
return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global$1[namespace]) : path[namespace] && path[namespace][method] || global$1[namespace] && global$1[namespace][method]; | ||
return value; | ||
}; // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative | ||
// eslint-disable-next-line no-extend-native -- required | ||
Function.prototype.toString = makeBuiltIn$1(function toString() { | ||
return isCallable$3(this) && getInternalState(this).source || inspectSource(this); | ||
}, 'toString'); | ||
var isCallable$2 = isCallable$b; | ||
var definePropertyModule$2 = objectDefineProperty; | ||
var makeBuiltIn = makeBuiltIn$2.exports; | ||
var defineGlobalProperty$1 = defineGlobalProperty$3; | ||
var defineBuiltIn$1 = function (O, key, value, options) { | ||
if (!options) options = {}; | ||
var simple = options.enumerable; | ||
var name = options.name !== undefined ? options.name : key; | ||
if (isCallable$2(value)) makeBuiltIn(value, name, options); | ||
if (options.global) { | ||
if (simple) O[key] = value;else defineGlobalProperty$1(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$2.f(O, key, { | ||
value: value, | ||
enumerable: false, | ||
configurable: !options.nonConfigurable, | ||
writable: !options.nonWritable | ||
}); | ||
} | ||
return O; | ||
}; | ||
var objectGetOwnPropertyNames = {}; | ||
var ceil = Math.ceil; | ||
var floor = Math.floor; // `ToInteger` abstract operation | ||
// https://tc39.es/ecma262/#sec-tointeger | ||
var floor$1 = Math.floor; // `Math.trunc` method | ||
// https://tc39.es/ecma262/#sec-math.trunc | ||
// eslint-disable-next-line es-x/no-math-trunc -- safe | ||
var toInteger = function (argument) { | ||
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); | ||
var mathTrunc = Math.trunc || function trunc(x) { | ||
var n = +x; | ||
return (n > 0 ? floor$1 : ceil)(n); | ||
}; | ||
var min$1 = Math.min; // `ToLength` abstract operation | ||
// https://tc39.es/ecma262/#sec-tolength | ||
var trunc = mathTrunc; // `ToIntegerOrInfinity` abstract operation | ||
// https://tc39.es/ecma262/#sec-tointegerorinfinity | ||
var toLength = function (argument) { | ||
return argument > 0 ? min$1(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 | ||
var toIntegerOrInfinity$2 = function (argument) { | ||
var number = +argument; // eslint-disable-next-line no-self-compare -- NaN check | ||
return number !== number || number === 0 ? 0 : trunc(number); | ||
}; | ||
var max = Math.max; | ||
var min = Math.min; // Helper for a popular repeating case of the spec: | ||
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2; | ||
var max$1 = Math.max; | ||
var min$1 = Math.min; // Helper for a popular repeating case of the spec: | ||
// Let integer be ? ToInteger(index). | ||
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). | ||
var toAbsoluteIndex = function (index, length) { | ||
var integer = toInteger(index); | ||
return integer < 0 ? max(integer + length, 0) : min(integer, length); | ||
var toAbsoluteIndex$2 = function (index, length) { | ||
var integer = toIntegerOrInfinity$1(index); | ||
return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length); | ||
}; | ||
// `Array.prototype.{ indexOf, includes }` methods implementation | ||
var toIntegerOrInfinity = toIntegerOrInfinity$2; | ||
var min = Math.min; // `ToLength` abstract operation | ||
// https://tc39.es/ecma262/#sec-tolength | ||
var toLength$1 = function (argument) { | ||
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 | ||
}; | ||
var toLength = toLength$1; // `LengthOfArrayLike` abstract operation | ||
// https://tc39.es/ecma262/#sec-lengthofarraylike | ||
var lengthOfArrayLike$4 = function (obj) { | ||
return toLength(obj.length); | ||
}; | ||
var toIndexedObject$1 = toIndexedObject$3; | ||
var toAbsoluteIndex$1 = toAbsoluteIndex$2; | ||
var lengthOfArrayLike$3 = lengthOfArrayLike$4; // `Array.prototype.{ indexOf, includes }` methods implementation | ||
var createMethod = function (IS_INCLUDES) { | ||
return function ($this, el, fromIndex) { | ||
var O = toIndexedObject($this); | ||
var length = toLength(O.length); | ||
var index = toAbsoluteIndex(fromIndex, length); | ||
var O = toIndexedObject$1($this); | ||
var length = lengthOfArrayLike$3(O); | ||
var index = toAbsoluteIndex$1(fromIndex, length); | ||
var value; // Array#includes uses SameValueZero equality algorithm | ||
@@ -753,5 +1269,13 @@ // eslint-disable-next-line no-self-compare -- NaN check | ||
var uncurryThis$3 = functionUncurryThis; | ||
var hasOwn$1 = hasOwnProperty_1; | ||
var toIndexedObject = toIndexedObject$3; | ||
var indexOf = arrayIncludes.indexOf; | ||
var hiddenKeys$1 = hiddenKeys$3; | ||
var push$1 = uncurryThis$3([].push); | ||
@@ -764,7 +1288,7 @@ var objectKeysInternal = function (object, names) { | ||
for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key); // Don't enum bug & hidden keys | ||
for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push$1(result, key); // Don't enum bug & hidden keys | ||
while (names.length > i) if (has$1(O, key = names[i++])) { | ||
~indexOf(result, key) || result.push(key); | ||
while (names.length > i) if (hasOwn$1(O, key = names[i++])) { | ||
~indexOf(result, key) || push$1(result, key); | ||
} | ||
@@ -776,83 +1300,108 @@ | ||
// IE8- don't enum bug keys | ||
var enumBugKeys = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf']; | ||
var enumBugKeys$1 = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf']; | ||
var internalObjectKeys = objectKeysInternal; | ||
var enumBugKeys = enumBugKeys$1; | ||
var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method | ||
// https://tc39.es/ecma262/#sec-object.getownpropertynames | ||
// eslint-disable-next-line es/no-object-getownpropertynames -- safe | ||
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe | ||
var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { | ||
return objectKeysInternal(O, hiddenKeys); | ||
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { | ||
return internalObjectKeys(O, hiddenKeys); | ||
}; | ||
var objectGetOwnPropertyNames = { | ||
f: f$2 | ||
}; | ||
var objectGetOwnPropertySymbols = {}; | ||
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe | ||
var f$1 = Object.getOwnPropertySymbols; | ||
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe | ||
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols; | ||
var objectGetOwnPropertySymbols = { | ||
f: f$1 | ||
}; | ||
var getBuiltIn = getBuiltIn$3; | ||
// all object keys, includes non-enumerable and symbols | ||
var uncurryThis$2 = functionUncurryThis; | ||
var getOwnPropertyNamesModule = objectGetOwnPropertyNames; | ||
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { | ||
var keys = objectGetOwnPropertyNames.f(anObject(it)); | ||
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; | ||
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; | ||
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols; | ||
var anObject$4 = anObject$6; | ||
var concat = uncurryThis$2([].concat); // all object keys, includes non-enumerable and symbols | ||
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { | ||
var keys = getOwnPropertyNamesModule.f(anObject$4(it)); | ||
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; | ||
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys; | ||
}; | ||
var copyConstructorProperties = function (target, source) { | ||
var hasOwn = hasOwnProperty_1; | ||
var ownKeys = ownKeys$1; | ||
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor; | ||
var definePropertyModule$1 = objectDefineProperty; | ||
var copyConstructorProperties$1 = function (target, source, exceptions) { | ||
var keys = ownKeys(source); | ||
var defineProperty = objectDefineProperty.f; | ||
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; | ||
var defineProperty = definePropertyModule$1.f; | ||
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; | ||
for (var i = 0; i < keys.length; i++) { | ||
var key = keys[i]; | ||
if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); | ||
if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) { | ||
defineProperty(target, key, getOwnPropertyDescriptor(source, key)); | ||
} | ||
} | ||
}; | ||
var fails$2 = fails$a; | ||
var isCallable$1 = isCallable$b; | ||
var replacement = /#|\.prototype\./; | ||
var isForced = function (feature, detection) { | ||
var isForced$1 = function (feature, detection) { | ||
var value = data[normalize(feature)]; | ||
return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == 'function' ? fails(detection) : !!detection; | ||
return value == POLYFILL ? true : value == NATIVE ? false : isCallable$1(detection) ? fails$2(detection) : !!detection; | ||
}; | ||
var normalize = isForced.normalize = function (string) { | ||
var normalize = isForced$1.normalize = function (string) { | ||
return String(string).replace(replacement, '.').toLowerCase(); | ||
}; | ||
var data = isForced.data = {}; | ||
var NATIVE = isForced.NATIVE = 'N'; | ||
var POLYFILL = isForced.POLYFILL = 'P'; | ||
var isForced_1 = isForced; | ||
var data = isForced$1.data = {}; | ||
var NATIVE = isForced$1.NATIVE = 'N'; | ||
var POLYFILL = isForced$1.POLYFILL = 'P'; | ||
var isForced_1 = isForced$1; | ||
var global$1 = global$a; | ||
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; | ||
var createNonEnumerableProperty = createNonEnumerableProperty$2; | ||
var defineBuiltIn = defineBuiltIn$1; | ||
var defineGlobalProperty = defineGlobalProperty$3; | ||
var copyConstructorProperties = copyConstructorProperties$1; | ||
var isForced = isForced_1; | ||
/* | ||
options.target - name of the target object | ||
options.global - target is the global object | ||
options.stat - export as static methods of target | ||
options.proto - export as prototype methods of target | ||
options.real - real prototype method for the `pure` version | ||
options.forced - export even if the native feature is available | ||
options.bind - bind methods to the target, required for the `pure` version | ||
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version | ||
options.unsafe - use the simple assignment of property instead of delete + defineProperty | ||
options.sham - add a flag to not completely full polyfills | ||
options.enumerable - export as enumerable property | ||
options.noTargetGet - prevent calling a getter on target | ||
options.target - name of the target object | ||
options.global - target is the global object | ||
options.stat - export as static methods of target | ||
options.proto - export as prototype methods of target | ||
options.real - real prototype method for the `pure` version | ||
options.forced - export even if the native feature is available | ||
options.bind - bind methods to the target, required for the `pure` version | ||
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version | ||
options.unsafe - use the simple assignment of property instead of delete + defineProperty | ||
options.sham - add a flag to not completely full polyfills | ||
options.enumerable - export as enumerable property | ||
options.dontCallGetSet - prevent calling a getter on target | ||
options.name - the .name of the function if it does not match the key | ||
*/ | ||
@@ -870,3 +1419,3 @@ | ||
} else if (STATIC) { | ||
target = global$1[TARGET] || setGlobal(TARGET, {}); | ||
target = global$1[TARGET] || defineGlobalProperty(TARGET, {}); | ||
} else { | ||
@@ -879,3 +1428,3 @@ target = (global$1[TARGET] || {}).prototype; | ||
if (options.noTargetGet) { | ||
if (options.dontCallGetSet) { | ||
descriptor = getOwnPropertyDescriptor(target, key); | ||
@@ -885,6 +1434,6 @@ targetProperty = descriptor && descriptor.value; | ||
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target | ||
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target | ||
if (!FORCED && targetProperty !== undefined) { | ||
if (typeof sourceProperty === typeof targetProperty) continue; | ||
if (typeof sourceProperty == typeof targetProperty) continue; | ||
copyConstructorProperties(sourceProperty, targetProperty); | ||
@@ -896,38 +1445,321 @@ } // add a flag to not completely full polyfills | ||
createNonEnumerableProperty(sourceProperty, 'sham', true); | ||
} // extend global | ||
} | ||
defineBuiltIn(target, key, sourceProperty, options); | ||
} | ||
}; | ||
redefine(target, key, sourceProperty, options); | ||
var tryToString$2 = tryToString$4; | ||
var $TypeError$3 = TypeError; | ||
var deletePropertyOrThrow$1 = function (O, P) { | ||
if (!delete O[P]) throw $TypeError$3('Cannot delete property ' + tryToString$2(P) + ' of ' + tryToString$2(O)); | ||
}; | ||
var wellKnownSymbol$3 = wellKnownSymbol$5; | ||
var TO_STRING_TAG$1 = wellKnownSymbol$3('toStringTag'); | ||
var test$1 = {}; | ||
test$1[TO_STRING_TAG$1] = 'z'; | ||
var toStringTagSupport = String(test$1) === '[object z]'; | ||
var TO_STRING_TAG_SUPPORT = toStringTagSupport; | ||
var isCallable = isCallable$b; | ||
var classofRaw = classofRaw$1; | ||
var wellKnownSymbol$2 = wellKnownSymbol$5; | ||
var TO_STRING_TAG = wellKnownSymbol$2('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` | ||
var classof$2 = 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; | ||
}; | ||
var aFunction = function (it) { | ||
if (typeof it != 'function') { | ||
throw TypeError(String(it) + ' is not a function'); | ||
var classof$1 = classof$2; | ||
var $String = String; | ||
var toString$1 = function (argument) { | ||
if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); | ||
return $String(argument); | ||
}; | ||
var toPropertyKey = toPropertyKey$3; | ||
var definePropertyModule = objectDefineProperty; | ||
var createPropertyDescriptor = createPropertyDescriptor$3; | ||
var createProperty$1 = function (object, key, value) { | ||
var propertyKey = toPropertyKey(key); | ||
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value; | ||
}; | ||
var toAbsoluteIndex = toAbsoluteIndex$2; | ||
var lengthOfArrayLike$2 = lengthOfArrayLike$4; | ||
var createProperty = createProperty$1; | ||
var $Array = Array; | ||
var max = Math.max; | ||
var arraySliceSimple = function (O, start, end) { | ||
var length = lengthOfArrayLike$2(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; | ||
}; | ||
var arraySlice = arraySliceSimple; | ||
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 it; | ||
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; | ||
}; | ||
var arraySort = mergeSort; | ||
var fails$1 = fails$a; | ||
var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) { | ||
var method = [][METHOD_NAME]; | ||
return !!method && fails$1(function () { | ||
// eslint-disable-next-line no-useless-call -- required for testing | ||
method.call(null, argument || function () { | ||
return 1; | ||
}, 1); | ||
}); | ||
}; | ||
var userAgent$1 = engineUserAgent; | ||
var firefox = userAgent$1.match(/firefox\/(\d+)/i); | ||
var engineFfVersion = !!firefox && +firefox[1]; | ||
var UA = engineUserAgent; | ||
var engineIsIeOrEdge = /MSIE|Trident/.test(UA); | ||
var userAgent = engineUserAgent; | ||
var webkit = userAgent.match(/AppleWebKit\/(\d+)\./); | ||
var engineWebkitVersion = !!webkit && +webkit[1]; | ||
var $$2 = _export; | ||
var uncurryThis$1 = functionUncurryThis; | ||
var aCallable$5 = aCallable$7; | ||
var toObject = toObject$2; | ||
var lengthOfArrayLike$1 = lengthOfArrayLike$4; | ||
var deletePropertyOrThrow = deletePropertyOrThrow$1; | ||
var toString = toString$1; | ||
var fails = fails$a; | ||
var internalSort = arraySort; | ||
var arrayMethodIsStrict = arrayMethodIsStrict$1; | ||
var FF = engineFfVersion; | ||
var IE_OR_EDGE = engineIsIeOrEdge; | ||
var V8 = engineV8Version; | ||
var WEBKIT = engineWebkitVersion; | ||
var test = []; | ||
var nativeSort = uncurryThis$1(test.sort); | ||
var push = uncurryThis$1(test.push); // IE8- | ||
var FAILS_ON_UNDEFINED = fails(function () { | ||
test.sort(undefined); | ||
}); // V8 bug | ||
var FAILS_ON_NULL = fails(function () { | ||
test.sort(null); | ||
}); // Old WebKit | ||
var STRICT_METHOD = arrayMethodIsStrict('sort'); | ||
var STABLE_SORT = !fails(function () { | ||
// feature detection can be too slow, so check engines versions | ||
if (V8) return V8 < 70; | ||
if (FF && FF > 3) return; | ||
if (IE_OR_EDGE) return true; | ||
if (WEBKIT) return WEBKIT < 603; | ||
var result = ''; | ||
var code, chr, value, index; // generate an array with more 512 elements (Chakra and old V8 fails only in this case) | ||
for (code = 65; code < 76; code++) { | ||
chr = String.fromCharCode(code); | ||
switch (code) { | ||
case 66: | ||
case 69: | ||
case 70: | ||
case 72: | ||
value = 3; | ||
break; | ||
case 68: | ||
case 71: | ||
value = 4; | ||
break; | ||
default: | ||
value = 2; | ||
} | ||
for (index = 0; index < 47; index++) { | ||
test.push({ | ||
k: chr + index, | ||
v: value | ||
}); | ||
} | ||
} | ||
test.sort(function (a, b) { | ||
return b.v - a.v; | ||
}); | ||
for (index = 0; index < test.length; index++) { | ||
chr = test[index].k.charAt(0); | ||
if (result.charAt(result.length - 1) !== chr) result += chr; | ||
} | ||
return result !== 'DGBEFHACIJK'; | ||
}); | ||
var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT; | ||
var getSortCompare = function (comparefn) { | ||
return function (x, y) { | ||
if (y === undefined) return -1; | ||
if (x === undefined) return 1; | ||
if (comparefn !== undefined) return +comparefn(x, y) || 0; | ||
return toString(x) > toString(y) ? 1 : -1; | ||
}; | ||
}; // `Array.prototype.sort` method | ||
// https://tc39.es/ecma262/#sec-array.prototype.sort | ||
$$2({ | ||
target: 'Array', | ||
proto: true, | ||
forced: FORCED | ||
}, { | ||
sort: function sort(comparefn) { | ||
if (comparefn !== undefined) aCallable$5(comparefn); | ||
var array = toObject(this); | ||
if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn); | ||
var items = []; | ||
var arrayLength = lengthOfArrayLike$1(array); | ||
var itemsLength, index; | ||
for (index = 0; index < arrayLength; index++) { | ||
if (index in array) push(items, array[index]); | ||
} | ||
internalSort(items, getSortCompare(comparefn)); | ||
itemsLength = lengthOfArrayLike$1(items); | ||
index = 0; | ||
while (index < itemsLength) array[index] = items[index++]; | ||
while (index < arrayLength) deletePropertyOrThrow(array, index++); | ||
return array; | ||
} | ||
}); | ||
var newPromiseCapability = {}; | ||
var aCallable$4 = aCallable$7; | ||
var $TypeError$2 = TypeError; | ||
var PromiseCapability = function (C) { | ||
var resolve, reject; | ||
this.promise = new C(function ($$resolve, $$reject) { | ||
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); | ||
if (resolve !== undefined || reject !== undefined) throw $TypeError$2('Bad Promise constructor'); | ||
resolve = $$resolve; | ||
reject = $$reject; | ||
}); | ||
this.resolve = aFunction(resolve); | ||
this.reject = aFunction(reject); | ||
}; // 25.4.1.5 NewPromiseCapability(C) | ||
this.resolve = aCallable$4(resolve); | ||
this.reject = aCallable$4(reject); | ||
}; // `NewPromiseCapability` abstract operation | ||
// https://tc39.es/ecma262/#sec-newpromisecapability | ||
var f = function (C) { | ||
newPromiseCapability.f = function (C) { | ||
return new PromiseCapability(C); | ||
}; | ||
var newPromiseCapability = { | ||
f: f | ||
}; | ||
var perform = function (exec) { | ||
var perform$1 = function (exec) { | ||
try { | ||
@@ -946,141 +1778,118 @@ return { | ||
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; | ||
var uncurryThis = functionUncurryThis; | ||
var process = global$1.process; | ||
var versions = process && process.versions; | ||
var v8 = versions && versions.v8; | ||
var match, version; | ||
var aCallable$3 = aCallable$7; | ||
if (v8) { | ||
match = v8.split('.'); | ||
version = match[0] < 4 ? 1 : match[0] + match[1]; | ||
} else if (engineUserAgent) { | ||
match = engineUserAgent.match(/Edge\/(\d+)/); | ||
var NATIVE_BIND = functionBindNative; | ||
if (!match || match[1] >= 74) { | ||
match = engineUserAgent.match(/Chrome\/(\d+)/); | ||
if (match) version = match[1]; | ||
} | ||
} | ||
var bind$1 = uncurryThis(uncurryThis.bind); // optional / simple context binding | ||
var engineV8Version = version && +version; | ||
var functionBindContext = function (fn, that) { | ||
aCallable$3(fn); | ||
return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function | ||
/* ...args */ | ||
() { | ||
return fn.apply(that, arguments); | ||
}; | ||
}; | ||
/* eslint-disable es/no-symbol -- required for testing */ | ||
var iterators = {}; | ||
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing | ||
var wellKnownSymbol$1 = wellKnownSymbol$5; | ||
var Iterators$1 = iterators; | ||
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { | ||
return !String(Symbol()) || // Chrome 38 Symbol has incorrect toString conversion | ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances | ||
!Symbol.sham && engineV8Version && engineV8Version < 41; | ||
}); | ||
var ITERATOR$1 = wellKnownSymbol$1('iterator'); | ||
var ArrayPrototype = Array.prototype; // check on default Array iterator | ||
/* eslint-disable es/no-symbol -- required for testing */ | ||
var isArrayIteratorMethod$1 = function (it) { | ||
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$1] === it); | ||
}; | ||
var useSymbolAsUid = nativeSymbol && !Symbol.sham && typeof Symbol.iterator == 'symbol'; | ||
var classof = classof$2; | ||
var WellKnownSymbolsStore = shared('wks'); | ||
var Symbol$1 = global$1.Symbol; | ||
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; | ||
var getMethod$1 = getMethod$3; | ||
var wellKnownSymbol = function (name) { | ||
if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) { | ||
if (nativeSymbol && has$1(Symbol$1, name)) { | ||
WellKnownSymbolsStore[name] = Symbol$1[name]; | ||
} else { | ||
WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); | ||
} | ||
} | ||
var isNullOrUndefined = isNullOrUndefined$3; | ||
return WellKnownSymbolsStore[name]; | ||
}; | ||
var Iterators = iterators; | ||
var iterators = {}; | ||
var wellKnownSymbol = wellKnownSymbol$5; | ||
var ITERATOR$1 = wellKnownSymbol('iterator'); | ||
var ArrayPrototype = Array.prototype; // check on default Array iterator | ||
var ITERATOR = wellKnownSymbol('iterator'); | ||
var isArrayIteratorMethod = function (it) { | ||
return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$1] === it); | ||
var getIteratorMethod$2 = function (it) { | ||
if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR) || getMethod$1(it, '@@iterator') || Iterators[classof(it)]; | ||
}; | ||
// optional / simple context binding | ||
var call$4 = functionCall; | ||
var aCallable$2 = aCallable$7; | ||
var functionBindContext = function (fn, that, length) { | ||
aFunction(fn); | ||
if (that === undefined) return fn; | ||
var anObject$3 = anObject$6; | ||
switch (length) { | ||
case 0: | ||
return function () { | ||
return fn.call(that); | ||
}; | ||
var tryToString$1 = tryToString$4; | ||
case 1: | ||
return function (a) { | ||
return fn.call(that, a); | ||
}; | ||
var getIteratorMethod$1 = getIteratorMethod$2; | ||
case 2: | ||
return function (a, b) { | ||
return fn.call(that, a, b); | ||
}; | ||
var $TypeError$1 = TypeError; | ||
case 3: | ||
return function (a, b, c) { | ||
return fn.call(that, a, b, c); | ||
}; | ||
} | ||
return function () | ||
/* ...args */ | ||
{ | ||
return fn.apply(that, arguments); | ||
}; | ||
var getIterator$1 = function (argument, usingIterator) { | ||
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator; | ||
if (aCallable$2(iteratorMethod)) return anObject$3(call$4(iteratorMethod, argument)); | ||
throw $TypeError$1(tryToString$1(argument) + ' is not iterable'); | ||
}; | ||
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); | ||
var test = {}; | ||
test[TO_STRING_TAG$1] = 'z'; | ||
var toStringTagSupport = String(test) === '[object z]'; | ||
var call$3 = functionCall; | ||
var TO_STRING_TAG = wellKnownSymbol('toStringTag'); // ES3 wrong here | ||
var anObject$2 = anObject$6; | ||
var CORRECT_ARGUMENTS = classofRaw(function () { | ||
return arguments; | ||
}()) == 'Arguments'; // fallback for IE11 Script Access Denied error | ||
var getMethod = getMethod$3; | ||
var tryGet = function (it, key) { | ||
var iteratorClose$1 = function (iterator, kind, value) { | ||
var innerResult, innerError; | ||
anObject$2(iterator); | ||
try { | ||
return it[key]; | ||
innerResult = getMethod(iterator, 'return'); | ||
if (!innerResult) { | ||
if (kind === 'throw') throw value; | ||
return value; | ||
} | ||
innerResult = call$3(innerResult, iterator); | ||
} catch (error) { | ||
/* empty */ | ||
innerError = true; | ||
innerResult = error; | ||
} | ||
}; // getting tag from ES6+ `Object.prototype.toString` | ||
var classof = toStringTagSupport ? 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' && typeof O.callee == 'function' ? 'Arguments' : result; | ||
if (kind === 'throw') throw value; | ||
if (innerError) throw innerResult; | ||
anObject$2(innerResult); | ||
return value; | ||
}; | ||
var ITERATOR = wellKnownSymbol('iterator'); | ||
var bind = functionBindContext; | ||
var getIteratorMethod = function (it) { | ||
if (it != undefined) return it[ITERATOR] || it['@@iterator'] || iterators[classof(it)]; | ||
}; | ||
var call$2 = functionCall; | ||
var iteratorClose = function (iterator) { | ||
var returnMethod = iterator['return']; | ||
var anObject$1 = anObject$6; | ||
if (returnMethod !== undefined) { | ||
return anObject(returnMethod.call(iterator)).value; | ||
} | ||
}; | ||
var tryToString = tryToString$4; | ||
var isArrayIteratorMethod = isArrayIteratorMethod$1; | ||
var lengthOfArrayLike = lengthOfArrayLike$4; | ||
var isPrototypeOf = objectIsPrototypeOf; | ||
var getIterator = getIterator$1; | ||
var getIteratorMethod = getIteratorMethod$2; | ||
var iteratorClose = iteratorClose$1; | ||
var $TypeError = TypeError; | ||
var Result = function (stopped, result) { | ||
@@ -1091,12 +1900,15 @@ this.stopped = stopped; | ||
var iterate = function (iterable, unboundFunction, options) { | ||
var ResultPrototype = Result.prototype; | ||
var iterate$1 = function (iterable, unboundFunction, options) { | ||
var that = options && options.that; | ||
var AS_ENTRIES = !!(options && options.AS_ENTRIES); | ||
var IS_RECORD = !!(options && options.IS_RECORD); | ||
var IS_ITERATOR = !!(options && options.IS_ITERATOR); | ||
var INTERRUPTED = !!(options && options.INTERRUPTED); | ||
var fn = functionBindContext(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED); | ||
var fn = bind(unboundFunction, that); | ||
var iterator, iterFn, index, length, result, next, step; | ||
var stop = function (condition) { | ||
if (iterator) iteratorClose(iterator); | ||
if (iterator) iteratorClose(iterator, 'normal', condition); | ||
return new Result(true, condition); | ||
@@ -1107,3 +1919,3 @@ }; | ||
if (AS_ENTRIES) { | ||
anObject(value); | ||
anObject$1(value); | ||
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); | ||
@@ -1115,12 +1927,14 @@ } | ||
if (IS_ITERATOR) { | ||
if (IS_RECORD) { | ||
iterator = iterable.iterator; | ||
} else if (IS_ITERATOR) { | ||
iterator = iterable; | ||
} else { | ||
iterFn = getIteratorMethod(iterable); | ||
if (typeof iterFn != 'function') throw TypeError('Target is not iterable'); // optimisation for array iterators | ||
if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable'); // optimisation for array iterators | ||
if (isArrayIteratorMethod(iterFn)) { | ||
for (index = 0, length = toLength(iterable.length); length > index; index++) { | ||
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) { | ||
result = callFn(iterable[index]); | ||
if (result && result instanceof Result) return result; | ||
if (result && isPrototypeOf(ResultPrototype, result)) return result; | ||
} | ||
@@ -1131,16 +1945,15 @@ | ||
iterator = iterFn.call(iterable); | ||
iterator = getIterator(iterable, iterFn); | ||
} | ||
next = iterator.next; | ||
next = IS_RECORD ? iterable.next : iterator.next; | ||
while (!(step = next.call(iterator)).done) { | ||
while (!(step = call$2(next, iterator)).done) { | ||
try { | ||
result = callFn(step.value); | ||
} catch (error) { | ||
iteratorClose(iterator); | ||
throw error; | ||
iteratorClose(iterator, 'throw', error); | ||
} | ||
if (typeof result == 'object' && result && result instanceof Result) return result; | ||
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result; | ||
} | ||
@@ -1151,7 +1964,17 @@ | ||
// `Promise.allSettled` method | ||
var $$1 = _export; | ||
var call$1 = functionCall; | ||
var aCallable$1 = aCallable$7; | ||
var newPromiseCapabilityModule = newPromiseCapability; | ||
var perform = perform$1; | ||
var iterate = iterate$1; // `Promise.allSettled` method | ||
// https://tc39.es/ecma262/#sec-promise.allsettled | ||
_export({ | ||
$$1({ | ||
target: 'Promise', | ||
@@ -1162,7 +1985,7 @@ stat: true | ||
var C = this; | ||
var capability = newPromiseCapability.f(C); | ||
var capability = newPromiseCapabilityModule.f(C); | ||
var resolve = capability.resolve; | ||
var reject = capability.reject; | ||
var result = perform(function () { | ||
var promiseResolve = aFunction(C.resolve); | ||
var promiseResolve = aCallable$1(C.resolve); | ||
var values = []; | ||
@@ -1174,5 +1997,4 @@ var counter = 0; | ||
var alreadyCalled = false; | ||
values.push(undefined); | ||
remaining++; | ||
promiseResolve.call(C, promise).then(function (value) { | ||
call$1(promiseResolve, C, promise).then(function (value) { | ||
if (alreadyCalled) return; | ||
@@ -1202,10 +2024,14 @@ alreadyCalled = true; | ||
// https://github.com/tc39/collection-methods | ||
var call = functionCall; | ||
var aCallable = aCallable$7; | ||
var collectionDeleteAll = function () | ||
/* ...elements */ | ||
{ | ||
var anObject = anObject$6; // https://github.com/tc39/collection-methods | ||
var collectionDeleteAll = function | ||
/* ...elements */ | ||
deleteAll() { | ||
var collection = anObject(this); | ||
var remover = aFunction(collection['delete']); | ||
var remover = aCallable(collection['delete']); | ||
var allDeleted = true; | ||
@@ -1215,3 +2041,3 @@ var wasDeleted; | ||
for (var k = 0, len = arguments.length; k < len; k++) { | ||
wasDeleted = remover.call(collection, arguments[k]); | ||
wasDeleted = call(remover, collection, arguments[k]); | ||
allDeleted = allDeleted && wasDeleted; | ||
@@ -1223,22 +2049,20 @@ } | ||
// `WeakMap.prototype.deleteAll` method | ||
var $ = _export; | ||
var deleteAll = collectionDeleteAll; // `WeakMap.prototype.deleteAll` method | ||
// https://github.com/tc39/proposal-collection-methods | ||
_export({ | ||
$({ | ||
target: 'WeakMap', | ||
proto: true, | ||
real: true, | ||
forced: isPure | ||
forced: true | ||
}, { | ||
deleteAll: function deleteAll() | ||
/* ...elements */ | ||
{ | ||
return collectionDeleteAll.apply(this, arguments); | ||
} | ||
deleteAll: deleteAll | ||
}); | ||
var _paths = new WeakMap(); | ||
var _paths = /*#__PURE__*/new WeakMap(); | ||
var _mergedValues = new WeakMap(); | ||
var _mergedValues = /*#__PURE__*/new WeakMap(); | ||
@@ -1252,3 +2076,3 @@ class MultiConsul extends Consul { | ||
_paths.set(this, { | ||
_classPrivateFieldInitSpec(this, _paths, { | ||
writable: true, | ||
@@ -1258,3 +2082,3 @@ value: void 0 | ||
_mergedValues.set(this, { | ||
_classPrivateFieldInitSpec(this, _mergedValues, { | ||
writable: true, | ||
@@ -1261,0 +2085,0 @@ value: null |
{ | ||
"name": "@logzio-node-toolbox/consul", | ||
"version": "0.0.30", | ||
"version": "0.0.31", | ||
"description": "Consul easy use for json configs and service discovery", | ||
@@ -31,3 +31,3 @@ "main": "dist/index.cjs", | ||
"dependencies": { | ||
"async-retry": "1.3.1", | ||
"async-retry": "1.3.3", | ||
"consul": "0.40.0", | ||
@@ -34,0 +34,0 @@ "deepmerge": "4.2.2" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125987
3243
3
+ Addedasync-retry@1.3.3(transitive)
+ Addedretry@0.13.1(transitive)
- Removedasync-retry@1.3.1(transitive)
- Removedretry@0.12.0(transitive)
Updatedasync-retry@1.3.3