UNPKG

@ace-fetch/core

Version:

Fetch Provider.

1,369 lines (1,200 loc) 313 kB
/** * @ace-fetch/core@0.11.4 */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define('index', ['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.AceFetch = global.AceFetch || {}, global.AceFetch.Core = {}))); })(this, (function (exports) { 'use strict'; (function(){ var global = this || self; global.globalThis = global; })(); (function() { const env = {"NODE_ENV":"development"}; try { if (process) { process.env = Object.assign({}, process.env); Object.assign(process.env, env); return; } } catch (e) {} // avoid ReferenceError: process is not defined globalThis.process = { env:env }; })(); exports.debug = process.env.NODE_ENV !== 'production'; /** * 调试打印日志, 默认为在开发模式下启用 */ var setDebug = function setDebug(status) { return exports.debug = status; }; var version$1 = "0.11.4"; function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { t && (r = t); var n = 0, F = function () {}; return { s: F, n: function () { return n >= r.length ? { done: !0 } : { done: !1, value: r[n++] }; }, e: function (r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function () { t = t.call(r); }, n: function () { var r = t.next(); return a = r.done, r; }, e: function (r) { u = !0, o = r; }, f: function () { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; } function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; } function _regeneratorRuntime() { _regeneratorRuntime = function () { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function (t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function (t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function (e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function () { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function (e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function (t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function (t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function (t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function (t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function (e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function getDefaultExportFromCjs (x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; } var check = function (it) { return it && it.Math === Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var globalThis_1 = // eslint-disable-next-line es/no-global-this -- safe check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback (function () { return this; })() || Function('return this')(); var objectGetOwnPropertyDescriptor = {}; var fails$C = function (exec) { try { return !!exec(); } catch (error) { return true; } }; var fails$B = fails$C; // Detect IE8's incomplete defineProperty implementation var descriptors = !fails$B(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7; }); var fails$A = fails$C; var functionBindNative = !fails$A(function () { // eslint-disable-next-line es/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$3 = functionBindNative; var call$o = Function.prototype.call; var functionCall = NATIVE_BIND$3 ? call$o.bind(call$o) : function () { return call$o.apply(call$o, arguments); }; var objectPropertyIsEnumerable = {}; var $propertyIsEnumerable$2 = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor$6 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor$6 && !$propertyIsEnumerable$2.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor$6(this, V); return !!descriptor && descriptor.enumerable; } : $propertyIsEnumerable$2; var createPropertyDescriptor$5 = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; var NATIVE_BIND$2 = functionBindNative; var FunctionPrototype$2 = Function.prototype; var call$n = FunctionPrototype$2.call; var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$n, call$n); var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) { return function () { return call$n.apply(fn, arguments); }; }; var uncurryThis$A = functionUncurryThis; var toString$k = uncurryThis$A({}.toString); var stringSlice$a = uncurryThis$A(''.slice); var classofRaw$2 = function (it) { return stringSlice$a(toString$k(it), 8, -1); }; var uncurryThis$z = functionUncurryThis; var fails$z = fails$C; var classof$c = classofRaw$2; var $Object$4 = Object; var split = uncurryThis$z(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings var indexedObject = fails$z(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !$Object$4('z').propertyIsEnumerable(0); }) ? function (it) { return classof$c(it) === 'String' ? split(it, '') : $Object$4(it); } : $Object$4; // we can't use just `it == null` since of `document.all` special case // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec var isNullOrUndefined$a = function (it) { return it === null || it === undefined; }; var isNullOrUndefined$9 = isNullOrUndefined$a; var $TypeError$h = TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible var requireObjectCoercible$c = function (it) { if (isNullOrUndefined$9(it)) throw new $TypeError$h("Can't call method on " + it); return it; }; // toObject with fallback for non-array-like ES3 strings var IndexedObject$3 = indexedObject; var requireObjectCoercible$b = requireObjectCoercible$c; var toIndexedObject$a = function (it) { return IndexedObject$3(requireObjectCoercible$b(it)); }; // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot var documentAll = typeof document == 'object' && document.all; // `IsCallable` abstract operation // https://tc39.es/ecma262/#sec-iscallable // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing var isCallable$q = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) { return typeof argument == 'function' || argument === documentAll; } : function (argument) { return typeof argument == 'function'; }; var isCallable$p = isCallable$q; var isObject$k = function (it) { return typeof it == 'object' ? it !== null : isCallable$p(it); }; var globalThis$t = globalThis_1; var isCallable$o = isCallable$q; var aFunction = function (argument) { return isCallable$o(argument) ? argument : undefined; }; var getBuiltIn$a = function (namespace, method) { return arguments.length < 2 ? aFunction(globalThis$t[namespace]) : globalThis$t[namespace] && globalThis$t[namespace][method]; }; var uncurryThis$y = functionUncurryThis; var objectIsPrototypeOf = uncurryThis$y({}.isPrototypeOf); var globalThis$s = globalThis_1; var navigator = globalThis$s.navigator; var userAgent$7 = navigator && navigator.userAgent; var environmentUserAgent = userAgent$7 ? String(userAgent$7) : ''; var globalThis$r = globalThis_1; var userAgent$6 = environmentUserAgent; var process$4 = globalThis$r.process; var Deno$1 = globalThis$r.Deno; var versions = process$4 && process$4.versions || Deno$1 && Deno$1.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$6) { match = userAgent$6.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = userAgent$6.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } var environmentV8Version = version; /* eslint-disable es/no-symbol -- required for testing */ var V8_VERSION$3 = environmentV8Version; var fails$y = fails$C; var globalThis$q = globalThis_1; var $String$6 = globalThis$q.String; // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$y(function () { var symbol = Symbol('symbol detection'); // Chrome 38 Symbol has incorrect toString conversion // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will, // of course, fail. return !$String$6(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && V8_VERSION$3 && V8_VERSION$3 < 41; }); /* eslint-disable es/no-symbol -- required for testing */ var NATIVE_SYMBOL$6 = symbolConstructorDetection; var useSymbolAsUid = NATIVE_SYMBOL$6 && !Symbol.sham && typeof Symbol.iterator == 'symbol'; var getBuiltIn$9 = getBuiltIn$a; var isCallable$n = isCallable$q; var isPrototypeOf$7 = objectIsPrototypeOf; var USE_SYMBOL_AS_UID$1 = useSymbolAsUid; var $Object$3 = Object; var isSymbol$6 = USE_SYMBOL_AS_UID$1 ? function (it) { return typeof it == 'symbol'; } : function (it) { var $Symbol = getBuiltIn$9('Symbol'); return isCallable$n($Symbol) && isPrototypeOf$7($Symbol.prototype, $Object$3(it)); }; var $String$5 = String; var tryToString$6 = function (argument) { try { return $String$5(argument); } catch (error) { return 'Object'; } }; var isCallable$m = isCallable$q; var tryToString$5 = tryToString$6; var $TypeError$g = TypeError; // `Assert: IsCallable(argument) is true` var aCallable$9 = function (argument) { if (isCallable$m(argument)) return argument; throw new $TypeError$g(tryToString$5(argument) + ' is not a function'); }; var aCallable$8 = aCallable$9; var isNullOrUndefined$8 = isNullOrUndefined$a; // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod var getMethod$7 = function (V, P) { var func = V[P]; return isNullOrUndefined$8(func) ? undefined : aCallable$8(func); }; var call$m = functionCall; var isCallable$l = isCallable$q; var isObject$j = isObject$k; var $TypeError$f = TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive var ordinaryToPrimitive$1 = function (input, pref) { var fn, val; if (pref === 'string' && isCallable$l(fn = input.toString) && !isObject$j(val = call$m(fn, input))) return val; if (isCallable$l(fn = input.valueOf) && !isObject$j(val = call$m(fn, input))) return val; if (pref !== 'string' && isCallable$l(fn = input.toString) && !isObject$j(val = call$m(fn, input))) return val; throw new $TypeError$f("Can't convert object to primitive value"); }; var sharedStore = {exports: {}}; var isPure = false; var globalThis$p = globalThis_1; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty$a = Object.defineProperty; var defineGlobalProperty$3 = function (key, value) { try { defineProperty$a(globalThis$p, key, { value: value, configurable: true, writable: true }); } catch (error) { globalThis$p[key] = value; } return value; }; var globalThis$o = globalThis_1; var defineGlobalProperty$2 = defineGlobalProperty$3; var SHARED = '__core-js_shared__'; var store$3 = sharedStore.exports = globalThis$o[SHARED] || defineGlobalProperty$2(SHARED, {}); (store$3.versions || (store$3.versions = [])).push({ version: '3.38.1', mode: 'global', copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)', license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE', source: 'https://github.com/zloirock/core-js' }); var sharedStoreExports = sharedStore.exports; var store$2 = sharedStoreExports; var shared$7 = function (key, value) { return store$2[key] || (store$2[key] = value || {}); }; var requireObjectCoercible$a = requireObjectCoercible$c; var $Object$2 = Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject var toObject$b = function (argument) { return $Object$2(requireObjectCoercible$a(argument)); }; var uncurryThis$x = functionUncurryThis; var toObject$a = toObject$b; var hasOwnProperty$1 = uncurryThis$x({}.hasOwnProperty); // `HasOwnProperty` abstract operation // https://tc39.es/ecma262/#sec-hasownproperty // eslint-disable-next-line es/no-object-hasown -- safe var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) { return hasOwnProperty$1(toObject$a(it), key); }; var uncurryThis$w = functionUncurryThis; var id$1 = 0; var postfix = Math.random(); var toString$j = uncurryThis$w(1.0.toString); var uid$4 = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$j(++id$1 + postfix, 36); }; var globalThis$n = globalThis_1; var shared$6 = shared$7; var hasOwn$i = hasOwnProperty_1; var uid$3 = uid$4; var NATIVE_SYMBOL$5 = symbolConstructorDetection; var USE_SYMBOL_AS_UID = useSymbolAsUid; var Symbol$1 = globalThis$n.Symbol; var WellKnownSymbolsStore$1 = shared$6('wks'); var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$3; var wellKnownSymbol$q = function (name) { if (!hasOwn$i(WellKnownSymbolsStore$1, name)) { WellKnownSymbolsStore$1[name] = NATIVE_SYMBOL$5 && hasOwn$i(Symbol$1, name) ? Symbol$1[name] : createWellKnownSymbol('Symbol.' + name); } return WellKnownSymbolsStore$1[name]; }; var call$l = functionCall; var isObject$i = isObject$k; var isSymbol$5 = isSymbol$6; var getMethod$6 = getMethod$7; var ordinaryToPrimitive = ordinaryToPrimitive$1; var wellKnownSymbol$p = wellKnownSymbol$q; var $TypeError$e = TypeError; var TO_PRIMITIVE = wellKnownSymbol$p('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive var toPrimitive$2 = function (input, pref) { if (!isObject$i(input) || isSymbol$5(input)) return input; var exoticToPrim = getMethod$6(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = call$l(exoticToPrim, input, pref); if (!isObject$i(result) || isSymbol$5(result)) return result; throw new $TypeError$e("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); }; var toPrimitive$1 = toPrimitive$2; var isSymbol$4 = isSymbol$6; // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey var toPropertyKey$3 = function (argument) { var key = toPrimitive$1(argument, 'string'); return isSymbol$4(key) ? key : key + ''; }; var globalThis$m = globalThis_1; var isObject$h = isObject$k; var document$3 = globalThis$m.document; // typeof document.createElement is 'object' in old IE var EXISTS$1 = isObject$h(document$3) && isObject$h(document$3.createElement); var documentCreateElement$2 = function (it) { return EXISTS$1 ? document$3.createElement(it) : {}; }; var DESCRIPTORS$j = descriptors; var fails$x = fails$C; var createElement$1 = documentCreateElement$2; // Thanks to IE8 for its funny defineProperty var ie8DomDefine = !DESCRIPTORS$j && !fails$x(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(createElement$1('div'), 'a', { get: function () { return 7; } }).a !== 7; }); var DESCRIPTORS$i = descriptors; var call$k = functionCall; var propertyIsEnumerableModule$2 = objectPropertyIsEnumerable; var createPropertyDescriptor$4 = createPropertyDescriptor$5; var toIndexedObject$9 = toIndexedObject$a; var toPropertyKey$2 = toPropertyKey$3; var hasOwn$h = hasOwnProperty_1; var IE8_DOM_DEFINE$1 = ie8DomDefine; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor objectGetOwnPropertyDescriptor.f = DESCRIPTORS$i ? $getOwnPropertyDescriptor$2 : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject$9(O); P = toPropertyKey$2(P); if (IE8_DOM_DEFINE$1) try { return $getOwnPropertyDescriptor$2(O, P); } catch (error) { /* empty */ } if (hasOwn$h(O, P)) return createPropertyDescriptor$4(!call$k(propertyIsEnumerableModule$2.f, O, P), O[P]); }; var objectDefineProperty = {}; var DESCRIPTORS$h = descriptors; var fails$w = fails$C; // V8 ~ Chrome 36- // https://bugs.chromium.org/p/v8/issues/detail?id=3334 var v8PrototypeDefineBug = DESCRIPTORS$h && fails$w(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(function () { /* empty */ }, 'prototype', { value: 42, writable: false }).prototype !== 42; }); var isObject$g = isObject$k; var $String$4 = String; var $TypeError$d = TypeError; // `Assert: Type(argument) is Object` var anObject$h = function (argument) { if (isObject$g(argument)) return argument; throw new $TypeError$d($String$4(argument) + ' is not an object'); }; var DESCRIPTORS$g = descriptors; var IE8_DOM_DEFINE = ie8DomDefine; var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug; var anObject$g = anObject$h; var toPropertyKey$1 = toPropertyKey$3; var $TypeError$c = TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty$1 = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; var ENUMERABLE = 'enumerable'; var CONFIGURABLE$1 = 'configurable'; var WRITABLE = 'writable'; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty objectDefineProperty.f = DESCRIPTORS$g ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) { anObject$g(O); P = toPropertyKey$1(P); anObject$g(Attributes); if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { var current = $getOwnPropertyDescriptor$1(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$1(O, P, Attributes); } : $defineProperty$1 : function defineProperty(O, P, Attributes) { anObject$g(O); P = toPropertyKey$1(P); anObject$g(Attributes); if (IE8_DOM_DEFINE) try { return $defineProperty$1(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$c('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; var DESCRIPTORS$f = descriptors; var definePropertyModule$5 = objectDefineProperty; var createPropertyDescriptor$3 = createPropertyDescriptor$5; var createNonEnumerableProperty$7 = DESCRIPTORS$f ? function (object, key, value) { return definePropertyModule$5.f(object, key, createPropertyDescriptor$3(1, value)); } : function (object, key, value) { object[key] = value; return object; }; var makeBuiltIn$3 = {exports: {}}; var DESCRIPTORS$e = descriptors; var hasOwn$g = hasOwnProperty_1; var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = DESCRIPTORS$e && Object.getOwnPropertyDescriptor; var EXISTS = hasOwn$g(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE = EXISTS && (!DESCRIPTORS$e || (DESCRIPTORS$e && getDescriptor(FunctionPrototype$1, 'name').configurable)); var functionName = { EXISTS: EXISTS, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; var uncurryThis$v = functionUncurryThis; var isCallable$k = isCallable$q; var store$1 = sharedStoreExports; var functionToString = uncurryThis$v(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper if (!isCallable$k(store$1.inspectSource)) { store$1.inspectSource = function (it) { return functionToString(it); }; } var inspectSource$3 = store$1.inspectSource; var globalThis$l = globalThis_1; var isCallable$j = isCallable$q; var WeakMap$1 = globalThis$l.WeakMap; var weakMapBasicDetection = isCallable$j(WeakMap$1) && /native code/.test(String(WeakMap$1)); var shared$5 = shared$7; var uid$2 = uid$4; var keys$1 = shared$5('keys'); var sharedKey$4 = function (key) { return keys$1[key] || (keys$1[key] = uid$2(key)); }; var hiddenKeys$6 = {}; var NATIVE_WEAK_MAP = weakMapBasicDetection; var globalThis$k = globalThis_1; var isObject$f = isObject$k; var createNonEnumerableProperty$6 = createNonEnumerableProperty$7; var hasOwn$f = hasOwnProperty_1; var shared$4 = sharedStoreExports; var sharedKey$3 = sharedKey$4; var hiddenKeys$5 = hiddenKeys$6; var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError$4 = globalThis$k.TypeError; var WeakMap = globalThis$k.WeakMap; var set$1, get, has; var enforce = function (it) { return has(it) ? get(it) : set$1(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject$f(it) || (state = get(it)).type !== TYPE) { throw new TypeError$4('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (NATIVE_WEAK_MAP || shared$4.state) { var store = shared$4.state || (shared$4.state = new WeakMap()); /* eslint-disable no-self-assign -- prototype methods protection */ store.get = store.get; store.has = store.has; store.set = store.set; /* eslint-enable no-self-assign -- prototype methods protection */ set$1 = function (it, metadata) { if (store.has(it)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; store.set(it, metadata); return metadata; }; get = function (it) { return store.get(it) || {}; }; has = function (it) { return store.has(it); }; } else { var STATE = sharedKey$3('state'); hiddenKeys$5[STATE] = true; set$1 = function (it, metadata) { if (hasOwn$f(it, STATE)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty$6(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwn$f(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwn$f(it, STATE); }; } var internalState = { set: set$1, get: get, has: has, enforce: enforce, getterFor: getterFor }; var uncurryThis$u = functionUncurryThis; var fails$v = fails$C; var isCallable$i = isCallable$q; var hasOwn$e = hasOwnProperty_1; var DESCRIPTORS$d = descriptors; var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE; var inspectSource$2 = inspectSource$3; var InternalStateModule$5 = internalState; var enforceInternalState$1 = InternalStateModule$5.enforce; var getInternalState$4 = InternalStateModule$5.get; var $String$3 = String; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty$9 = Object.defineProperty; var stringSlice$9 = uncurryThis$u(''.slice); var replace$6 = uncurryThis$u(''.replace); var join = uncurryThis$u([].join); var CONFIGURABLE_LENGTH = DESCRIPTORS$d && !fails$v(function () { return defineProperty$9(function () { /* empty */ }, 'length', { value: 8 }).length !== 8; }); var TEMPLATE = String(String).split('String'); var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) { if (stringSlice$9($String$3(name), 0, 7) === 'Symbol(') { name = '[' + replace$6($String$3(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']'; } if (options && options.getter) name = 'get ' + name; if (options && options.setter) name = 'set ' + name; if (!hasOwn$e(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) { if (DESCRIPTORS$d) defineProperty$9(value, 'name', { value: name, configurable: true }); else value.name = name; } if (CONFIGURABLE_LENGTH && options && hasOwn$e(options, 'arity') && value.length !== options.arity) { defineProperty$9(value, 'length', { value: options.arity }); } try { if (options && hasOwn$e(options, 'constructor') && options.constructor) { if (DESCRIPTORS$d) defineProperty$9(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 state = enforceInternalState$1(value); if (!hasOwn$e(state, 'source')) { state.source = join(TEMPLATE, typeof name == 'string' ? name : ''); } 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$2(function toString() { return isCallable$i(this) && getInternalState$4(this).source || inspectSource$2(this); }, 'toString'); var makeBuiltInExports = makeBuiltIn$3.exports; var isCallable$h = isCallable$q; var definePropertyModule$4 = objectDefineProperty; var makeBuiltIn$1 = makeBuiltInExports; var defineGlobalProperty$1 = defineGlobalProperty$3; var defineBuiltIn$d = function (O, key, value, options) { if (!options) options = {}; var simple = options.enumerable; var name = options.name !== undefined ? options.name : key; if (isCallable$h(value)) makeBuiltIn$1(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$4.f(O, key, { value: value, enumerable: false, configurable: !options.nonConfigurable, writable: !options.nonWritable }); } return O; }; var objectGetOwnPropertyNames = {}; var ceil = Math.ceil; var floor$2 = Math.floor; // `Math.trunc` method // https://tc39.es/ecma262/#sec-math.trunc // eslint-disable-next-line es/no-math-trunc -- safe var mathTrunc = Math.trunc || function trunc(x) { var n = +x; return (n > 0 ? floor$2 : ceil)(n); }; var trunc = mathTrunc; // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity var toIntegerOrInfinity$6 = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- NaN check return number !== number || number === 0 ? 0 : trunc(number); }; var toIntegerOrInfinity$5 = toIntegerOrInfinity$6; var max$3 = Math.max; var min$6 = 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$3 = function (index, length) { var integer = toIntegerOrInfinity$5(index); return integer < 0 ? max$3(integer + length, 0) : min$6(integer, length); }; var toIntegerOrInfinity$4 = toIntegerOrInfinity$6; var min$5 = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength var toLength$6 = function (argument) { var len = toIntegerOrInfinity$4(argument); return len > 0 ? min$5(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; var toLength$5 = toLength$6; // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike var lengthOfArrayLike$9 = function (obj) { return toLength$5(obj.length); }; var toIndexedObject$8 = toIndexedObject$a; var toAbsoluteIndex$2 = toAbsoluteIndex$3; var lengthOfArrayLike$8 = lengthOfArrayLike$9; // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod$4 = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject$8($this); var length = lengthOfArrayLike$8(O); if (length === 0) return !IS_INCLUDES && -1; var index = toAbsoluteIndex$2(fromIn