UNPKG

@sfgrp/distinguish

Version:

An interactive key engine that feeds off of [TaxonWorks](https://taxonworks.org)' [API](https://api.taxonworks.org). Distinguish is a product of the [Species File Group](https://speciesfilegroup.org) and its collaborators.

1,679 lines 88.3 kB
import { defineComponent as S, computed as A, createElementBlock as y, openBlock as p, withDirectives as q, createTextVNode as $, createElementVNode as f, vModelCheckbox as se, Fragment as D, renderList as M, toDisplayString as E, vModelSelect as ue, unref as k, normalizeClass as we, renderSlot as F, onMounted as ct, onUnmounted as ut, createBlock as T, Transition as dt, withCtx as w, withModifiers as Vt, normalizeStyle as qt, ref as X, createVNode as v, createCommentVNode as j, watch as Ht, withKeys as pt, vModelText as ft, resolveDynamicComponent as zt, normalizeProps as Ke, guardReactiveProps as Je, createApp as Kt } from "vue"; import { defineStore as je, createPinia as Jt } from "pinia"; function mt(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: Wt } = Object.prototype, { getPrototypeOf: Be } = Object, Se = /* @__PURE__ */ ((e) => (t) => { const n = Wt.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), H = (e) => (e = e.toLowerCase(), (t) => Se(t) === e), ve = (e) => (t) => typeof t === e, { isArray: re } = Array, ce = ve("undefined"); function Xt(e) { return e !== null && !ce(e) && e.constructor !== null && !ce(e.constructor) && V(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const ht = H("ArrayBuffer"); function Qt(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ht(e.buffer), t; } const Gt = ve("string"), V = ve("function"), gt = ve("number"), Ee = (e) => e !== null && typeof e == "object", Yt = (e) => e === !0 || e === !1, he = (e) => { if (Se(e) !== "object") return !1; const t = Be(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); }, Zt = H("Date"), en = H("File"), tn = H("Blob"), nn = H("FileList"), sn = (e) => Ee(e) && V(e.pipe), rn = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || V(e.append) && ((t = Se(e)) === "formdata" || // detect form-data instance t === "object" && V(e.toString) && e.toString() === "[object FormData]")); }, on = H("URLSearchParams"), [an, ln, cn, un] = ["ReadableStream", "Request", "Response", "Headers"].map(H), dn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function de(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let s, r; if (typeof e != "object" && (e = [e]), re(e)) for (s = 0, r = e.length; s < r; s++) t.call(null, e[s], s, e); else { const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length; let a; for (s = 0; s < i; s++) a = o[s], t.call(null, e[a], a, e); } } function yt(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let s = n.length, r; for (; s-- > 0; ) if (r = n[s], t === r.toLowerCase()) return r; return null; } const Y = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, bt = (e) => !ce(e) && e !== Y; function $e() { const { caseless: e } = bt(this) && this || {}, t = {}, n = (s, r) => { const o = e && yt(t, r) || r; he(t[o]) && he(s) ? t[o] = $e(t[o], s) : he(s) ? t[o] = $e({}, s) : re(s) ? t[o] = s.slice() : t[o] = s; }; for (let s = 0, r = arguments.length; s < r; s++) arguments[s] && de(arguments[s], n); return t; } const pn = (e, t, n, { allOwnKeys: s } = {}) => (de(t, (r, o) => { n && V(r) ? e[o] = mt(r, n) : e[o] = r; }, { allOwnKeys: s }), e), fn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), mn = (e, t, n, s) => { e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n); }, hn = (e, t, n, s) => { let r, o, i; const a = {}; if (t = t || {}, e == null) return t; do { for (r = Object.getOwnPropertyNames(e), o = r.length; o-- > 0; ) i = r[o], (!s || s(i, e, t)) && !a[i] && (t[i] = e[i], a[i] = !0); e = n !== !1 && Be(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, gn = (e, t, n) => { e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length; const s = e.indexOf(t, n); return s !== -1 && s === n; }, yn = (e) => { if (!e) return null; if (re(e)) return e; let t = e.length; if (!gt(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, bn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Be(Uint8Array)), _n = (e, t) => { const s = (e && e[Symbol.iterator]).call(e); let r; for (; (r = s.next()) && !r.done; ) { const o = r.value; t.call(e, o[0], o[1]); } }, wn = (e, t) => { let n; const s = []; for (; (n = e.exec(t)) !== null; ) s.push(n); return s; }, Sn = H("HTMLFormElement"), vn = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(n, s, r) { return s.toUpperCase() + r; } ), We = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), En = H("RegExp"), _t = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), s = {}; de(n, (r, o) => { let i; (i = t(r, o, e)) !== !1 && (s[o] = i || r); }), Object.defineProperties(e, s); }, Rn = (e) => { _t(e, (t, n) => { if (V(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const s = e[n]; if (V(s)) { if (t.enumerable = !1, "writable" in t) { t.writable = !1; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }, Tn = (e, t) => { const n = {}, s = (r) => { r.forEach((o) => { n[o] = !0; }); }; return re(e) ? s(e) : s(String(e).split(t)), n; }, kn = () => { }, On = (e, t) => e != null && Number.isFinite(e = +e) ? e : t; function xn(e) { return !!(e && V(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]); } const An = (e) => { const t = new Array(10), n = (s, r) => { if (Ee(s)) { if (t.indexOf(s) >= 0) return; if (!("toJSON" in s)) { t[r] = s; const o = re(s) ? [] : {}; return de(s, (i, a) => { const d = n(i, r + 1); !ce(d) && (o[a] = d); }), t[r] = void 0, o; } } return s; }; return n(e, 0); }, Cn = H("AsyncFunction"), In = (e) => e && (Ee(e) || V(e)) && V(e.then) && V(e.catch), wt = ((e, t) => e ? setImmediate : t ? ((n, s) => (Y.addEventListener("message", ({ source: r, data: o }) => { r === Y && o === n && s.length && s.shift()(); }, !1), (r) => { s.push(r), Y.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", V(Y.postMessage) ), Un = typeof queueMicrotask < "u" ? queueMicrotask.bind(Y) : typeof process < "u" && process.nextTick || wt, l = { isArray: re, isArrayBuffer: ht, isBuffer: Xt, isFormData: rn, isArrayBufferView: Qt, isString: Gt, isNumber: gt, isBoolean: Yt, isObject: Ee, isPlainObject: he, isReadableStream: an, isRequest: ln, isResponse: cn, isHeaders: un, isUndefined: ce, isDate: Zt, isFile: en, isBlob: tn, isRegExp: En, isFunction: V, isStream: sn, isURLSearchParams: on, isTypedArray: bn, isFileList: nn, forEach: de, merge: $e, extend: pn, trim: dn, stripBOM: fn, inherits: mn, toFlatObject: hn, kindOf: Se, kindOfTest: H, endsWith: gn, toArray: yn, forEachEntry: _n, matchAll: wn, isHTMLForm: Sn, hasOwnProperty: We, hasOwnProp: We, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: _t, freezeMethods: Rn, toObjectSet: Tn, toCamelCase: vn, noop: kn, toFiniteNumber: On, findKey: yt, global: Y, isContextDefined: bt, isSpecCompliantForm: xn, toJSONObject: An, isAsyncFn: Cn, isThenable: In, setImmediate: wt, asap: Un }; function b(e, t, n, s, r) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), s && (this.request = s), r && (this.response = r, this.status = r.status ? r.status : null); } l.inherits(b, Error, { toJSON: function() { return { // Standard message: this.message, name: this.name, // Microsoft description: this.description, number: this.number, // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, // Axios config: l.toJSONObject(this.config), code: this.code, status: this.status }; } }); const St = b.prototype, vt = {}; [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" // eslint-disable-next-line func-names ].forEach((e) => { vt[e] = { value: e }; }); Object.defineProperties(b, vt); Object.defineProperty(St, "isAxiosError", { value: !0 }); b.from = (e, t, n, s, r, o) => { const i = Object.create(St); return l.toFlatObject(e, i, function(d) { return d !== Error.prototype; }, (a) => a !== "isAxiosError"), b.call(i, e.message, t, n, s, r), i.cause = e, i.name = e.name, o && Object.assign(i, o), i; }; const $n = null; function De(e) { return l.isPlainObject(e) || l.isArray(e); } function Et(e) { return l.endsWith(e, "[]") ? e.slice(0, -2) : e; } function Xe(e, t, n) { return e ? e.concat(t).map(function(r, o) { return r = Et(r), !n && o ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function Dn(e) { return l.isArray(e) && !e.some(De); } const Ln = l.toFlatObject(l, {}, null, function(t) { return /^is[A-Z]/.test(t); }); function Re(e, t, n) { if (!l.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = l.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(_, g) { return !l.isUndefined(g[_]); }); const s = n.metaTokens, r = n.visitor || u, o = n.dots, i = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && l.isSpecCompliantForm(t); if (!l.isFunction(r)) throw new TypeError("visitor must be a function"); function c(h) { if (h === null) return ""; if (l.isDate(h)) return h.toISOString(); if (!d && l.isBlob(h)) throw new b("Blob is not supported. Use a Buffer instead."); return l.isArrayBuffer(h) || l.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h; } function u(h, _, g) { let O = h; if (h && !g && typeof h == "object") { if (l.endsWith(_, "{}")) _ = s ? _ : _.slice(0, -2), h = JSON.stringify(h); else if (l.isArray(h) && Dn(h) || (l.isFileList(h) || l.endsWith(_, "[]")) && (O = l.toArray(h))) return _ = Et(_), O.forEach(function(U, K) { !(l.isUndefined(U) || U === null) && t.append( // eslint-disable-next-line no-nested-ternary i === !0 ? Xe([_], K, o) : i === null ? _ : _ + "[]", c(U) ); }), !1; } return De(h) ? !0 : (t.append(Xe(g, _, o), c(h)), !1); } const m = [], R = Object.assign(Ln, { defaultVisitor: u, convertValue: c, isVisitable: De }); function C(h, _) { if (!l.isUndefined(h)) { if (m.indexOf(h) !== -1) throw Error("Circular reference detected in " + _.join(".")); m.push(h), l.forEach(h, function(O, I) { (!(l.isUndefined(O) || O === null) && r.call( t, O, l.isString(I) ? I.trim() : I, _, R )) === !0 && C(O, _ ? _.concat(I) : [I]); }), m.pop(); } } if (!l.isObject(e)) throw new TypeError("data must be an object"); return C(e), t; } function Qe(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(s) { return t[s]; }); } function Me(e, t) { this._pairs = [], e && Re(e, this, t); } const Rt = Me.prototype; Rt.append = function(t, n) { this._pairs.push([t, n]); }; Rt.toString = function(t) { const n = t ? function(s) { return t.call(this, s, Qe); } : Qe; return this._pairs.map(function(r) { return n(r[0]) + "=" + n(r[1]); }, "").join("&"); }; function Pn(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function Tt(e, t, n) { if (!t) return e; const s = n && n.encode || Pn; l.isFunction(n) && (n = { serialize: n }); const r = n && n.serialize; let o; if (r ? o = r(t, n) : o = l.isURLSearchParams(t) ? t.toString() : new Me(t, n).toString(s), o) { const i = e.indexOf("#"); i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o; } return e; } class Ge { constructor() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ use(t, n, s) { return this.handlers.push({ fulfilled: t, rejected: n, synchronous: s ? s.synchronous : !1, runWhen: s ? s.runWhen : null }), this.handlers.length - 1; } /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` * * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise */ eject(t) { this.handlers[t] && (this.handlers[t] = null); } /** * Clear all interceptors from the stack * * @returns {void} */ clear() { this.handlers && (this.handlers = []); } /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor * * @returns {void} */ forEach(t) { l.forEach(this.handlers, function(s) { s !== null && t(s); }); } } const kt = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, Fn = typeof URLSearchParams < "u" ? URLSearchParams : Me, Nn = typeof FormData < "u" ? FormData : null, jn = typeof Blob < "u" ? Blob : null, Bn = { isBrowser: !0, classes: { URLSearchParams: Fn, FormData: Nn, Blob: jn }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Ve = typeof window < "u" && typeof document < "u", Le = typeof navigator == "object" && navigator || void 0, Mn = Ve && (!Le || ["ReactNative", "NativeScript", "NS"].indexOf(Le.product) < 0), Vn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", qn = Ve && window.location.href || "http://localhost", Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: Ve, hasStandardBrowserEnv: Mn, hasStandardBrowserWebWorkerEnv: Vn, navigator: Le, origin: qn }, Symbol.toStringTag, { value: "Module" })), P = { ...Hn, ...Bn }; function zn(e, t) { return Re(e, new P.classes.URLSearchParams(), Object.assign({ visitor: function(n, s, r, o) { return P.isNode && l.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments); } }, t)); } function Kn(e) { return l.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function Jn(e) { const t = {}, n = Object.keys(e); let s; const r = n.length; let o; for (s = 0; s < r; s++) o = n[s], t[o] = e[o]; return t; } function Ot(e) { function t(n, s, r, o) { let i = n[o++]; if (i === "__proto__") return !0; const a = Number.isFinite(+i), d = o >= n.length; return i = !i && l.isArray(r) ? r.length : i, d ? (l.hasOwnProp(r, i) ? r[i] = [r[i], s] : r[i] = s, !a) : ((!r[i] || !l.isObject(r[i])) && (r[i] = []), t(n, s, r[i], o) && l.isArray(r[i]) && (r[i] = Jn(r[i])), !a); } if (l.isFormData(e) && l.isFunction(e.entries)) { const n = {}; return l.forEachEntry(e, (s, r) => { t(Kn(s), r, n, 0); }), n; } return null; } function Wn(e, t, n) { if (l.isString(e)) try { return (t || JSON.parse)(e), l.trim(e); } catch (s) { if (s.name !== "SyntaxError") throw s; } return (n || JSON.stringify)(e); } const pe = { transitional: kt, adapter: ["xhr", "http", "fetch"], transformRequest: [function(t, n) { const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, o = l.isObject(t); if (o && l.isHTMLForm(t) && (t = new FormData(t)), l.isFormData(t)) return r ? JSON.stringify(Ot(t)) : t; if (l.isArrayBuffer(t) || l.isBuffer(t) || l.isStream(t) || l.isFile(t) || l.isBlob(t) || l.isReadableStream(t)) return t; if (l.isArrayBufferView(t)) return t.buffer; if (l.isURLSearchParams(t)) return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString(); let a; if (o) { if (s.indexOf("application/x-www-form-urlencoded") > -1) return zn(t, this.formSerializer).toString(); if ((a = l.isFileList(t)) || s.indexOf("multipart/form-data") > -1) { const d = this.env && this.env.FormData; return Re( a ? { "files[]": t } : t, d && new d(), this.formSerializer ); } } return o || r ? (n.setContentType("application/json", !1), Wn(t)) : t; }], transformResponse: [function(t) { const n = this.transitional || pe.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json"; if (l.isResponse(t) || l.isReadableStream(t)) return t; if (t && l.isString(t) && (s && !this.responseType || r)) { const i = !(n && n.silentJSONParsing) && r; try { return JSON.parse(t); } catch (a) { if (i) throw a.name === "SyntaxError" ? b.from(a, b.ERR_BAD_RESPONSE, this, null, this.response) : a; } } return t; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: P.classes.FormData, Blob: P.classes.Blob }, validateStatus: function(t) { return t >= 200 && t < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; l.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { pe.headers[e] = {}; }); const Xn = l.toObjectSet([ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ]), Qn = (e) => { const t = {}; let n, s, r; return e && e.split(` `).forEach(function(i) { r = i.indexOf(":"), n = i.substring(0, r).trim().toLowerCase(), s = i.substring(r + 1).trim(), !(!n || t[n] && Xn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s); }), t; }, Ye = Symbol("internals"); function ie(e) { return e && String(e).trim().toLowerCase(); } function ge(e) { return e === !1 || e == null ? e : l.isArray(e) ? e.map(ge) : String(e); } function Gn(e) { const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let s; for (; s = n.exec(e); ) t[s[1]] = s[2]; return t; } const Yn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function Ae(e, t, n, s, r) { if (l.isFunction(s)) return s.call(this, t, n); if (r && (t = n), !!l.isString(t)) { if (l.isString(s)) return t.indexOf(s) !== -1; if (l.isRegExp(s)) return s.test(t); } } function Zn(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s); } function es(e, t) { const n = l.toCamelCase(" " + t); ["get", "set", "has"].forEach((s) => { Object.defineProperty(e, s + n, { value: function(r, o, i) { return this[s].call(this, t, r, o, i); }, configurable: !0 }); }); } let B = class { constructor(t) { t && this.set(t); } set(t, n, s) { const r = this; function o(a, d, c) { const u = ie(d); if (!u) throw new Error("header name must be a non-empty string"); const m = l.findKey(r, u); (!m || r[m] === void 0 || c === !0 || c === void 0 && r[m] !== !1) && (r[m || d] = ge(a)); } const i = (a, d) => l.forEach(a, (c, u) => o(c, u, d)); if (l.isPlainObject(t) || t instanceof this.constructor) i(t, n); else if (l.isString(t) && (t = t.trim()) && !Yn(t)) i(Qn(t), n); else if (l.isHeaders(t)) for (const [a, d] of t.entries()) o(d, a, s); else t != null && o(n, t, s); return this; } get(t, n) { if (t = ie(t), t) { const s = l.findKey(this, t); if (s) { const r = this[s]; if (!n) return r; if (n === !0) return Gn(r); if (l.isFunction(n)) return n.call(this, r, s); if (l.isRegExp(n)) return n.exec(r); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = ie(t), t) { const s = l.findKey(this, t); return !!(s && this[s] !== void 0 && (!n || Ae(this, this[s], s, n))); } return !1; } delete(t, n) { const s = this; let r = !1; function o(i) { if (i = ie(i), i) { const a = l.findKey(s, i); a && (!n || Ae(s, s[a], a, n)) && (delete s[a], r = !0); } } return l.isArray(t) ? t.forEach(o) : o(t), r; } clear(t) { const n = Object.keys(this); let s = n.length, r = !1; for (; s--; ) { const o = n[s]; (!t || Ae(this, this[o], o, t, !0)) && (delete this[o], r = !0); } return r; } normalize(t) { const n = this, s = {}; return l.forEach(this, (r, o) => { const i = l.findKey(s, o); if (i) { n[i] = ge(r), delete n[o]; return; } const a = t ? Zn(o) : String(o).trim(); a !== o && delete n[o], n[a] = ge(r), s[a] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return l.forEach(this, (s, r) => { s != null && s !== !1 && (n[r] = t && l.isArray(s) ? s.join(", ") : s); }), n; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(` `); } get [Symbol.toStringTag]() { return "AxiosHeaders"; } static from(t) { return t instanceof this ? t : new this(t); } static concat(t, ...n) { const s = new this(t); return n.forEach((r) => s.set(r)), s; } static accessor(t) { const s = (this[Ye] = this[Ye] = { accessors: {} }).accessors, r = this.prototype; function o(i) { const a = ie(i); s[a] || (es(r, i), s[a] = !0); } return l.isArray(t) ? t.forEach(o) : o(t), this; } }; B.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); l.reduceDescriptors(B.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(s) { this[n] = s; } }; }); l.freezeMethods(B); function Ce(e, t) { const n = this || pe, s = t || n, r = B.from(s.headers); let o = s.data; return l.forEach(e, function(a) { o = a.call(n, o, r.normalize(), t ? t.status : void 0); }), r.normalize(), o; } function xt(e) { return !!(e && e.__CANCEL__); } function oe(e, t, n) { b.call(this, e ?? "canceled", b.ERR_CANCELED, t, n), this.name = "CanceledError"; } l.inherits(oe, b, { __CANCEL__: !0 }); function At(e, t, n) { const s = n.config.validateStatus; !n.status || !s || s(n.status) ? e(n) : t(new b( "Request failed with status code " + n.status, [b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function ts(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function ns(e, t) { e = e || 10; const n = new Array(e), s = new Array(e); let r = 0, o = 0, i; return t = t !== void 0 ? t : 1e3, function(d) { const c = Date.now(), u = s[o]; i || (i = c), n[r] = d, s[r] = c; let m = o, R = 0; for (; m !== r; ) R += n[m++], m = m % e; if (r = (r + 1) % e, r === o && (o = (o + 1) % e), c - i < t) return; const C = u && c - u; return C ? Math.round(R * 1e3 / C) : void 0; }; } function ss(e, t) { let n = 0, s = 1e3 / t, r, o; const i = (c, u = Date.now()) => { n = u, r = null, o && (clearTimeout(o), o = null), e.apply(null, c); }; return [(...c) => { const u = Date.now(), m = u - n; m >= s ? i(c, u) : (r = c, o || (o = setTimeout(() => { o = null, i(r); }, s - m))); }, () => r && i(r)]; } const be = (e, t, n = 3) => { let s = 0; const r = ns(50, 250); return ss((o) => { const i = o.loaded, a = o.lengthComputable ? o.total : void 0, d = i - s, c = r(d), u = i <= a; s = i; const m = { loaded: i, total: a, progress: a ? i / a : void 0, bytes: d, rate: c || void 0, estimated: c && a && u ? (a - i) / c : void 0, event: o, lengthComputable: a != null, [t ? "download" : "upload"]: !0 }; e(m); }, n); }, Ze = (e, t) => { const n = e != null; return [(s) => t[0]({ lengthComputable: n, total: e, loaded: s }), t[1]]; }, et = (e) => (...t) => l.asap(() => e(...t)), rs = P.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, P.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))( new URL(P.origin), P.navigator && /(msie|trident)/i.test(P.navigator.userAgent) ) : () => !0, os = P.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, s, r, o) { const i = [e + "=" + encodeURIComponent(t)]; l.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), l.isString(s) && i.push("path=" + s), l.isString(r) && i.push("domain=" + r), o === !0 && i.push("secure"), document.cookie = i.join("; "); }, read(e) { const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); return t ? decodeURIComponent(t[3]) : null; }, remove(e) { this.write(e, "", Date.now() - 864e5); } } ) : ( // Non-standard browser env (web workers, react-native) lack needed support. { write() { }, read() { return null; }, remove() { } } ); function is(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function as(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function Ct(e, t, n) { let s = !is(t); return e && (s || n == !1) ? as(e, t) : t; } const tt = (e) => e instanceof B ? { ...e } : e; function ee(e, t) { t = t || {}; const n = {}; function s(c, u, m, R) { return l.isPlainObject(c) && l.isPlainObject(u) ? l.merge.call({ caseless: R }, c, u) : l.isPlainObject(u) ? l.merge({}, u) : l.isArray(u) ? u.slice() : u; } function r(c, u, m, R) { if (l.isUndefined(u)) { if (!l.isUndefined(c)) return s(void 0, c, m, R); } else return s(c, u, m, R); } function o(c, u) { if (!l.isUndefined(u)) return s(void 0, u); } function i(c, u) { if (l.isUndefined(u)) { if (!l.isUndefined(c)) return s(void 0, c); } else return s(void 0, u); } function a(c, u, m) { if (m in t) return s(c, u); if (m in e) return s(void 0, c); } const d = { url: o, method: o, data: o, baseURL: i, transformRequest: i, transformResponse: i, paramsSerializer: i, timeout: i, timeoutMessage: i, withCredentials: i, withXSRFToken: i, adapter: i, responseType: i, xsrfCookieName: i, xsrfHeaderName: i, onUploadProgress: i, onDownloadProgress: i, decompress: i, maxContentLength: i, maxBodyLength: i, beforeRedirect: i, transport: i, httpAgent: i, httpsAgent: i, cancelToken: i, socketPath: i, responseEncoding: i, validateStatus: a, headers: (c, u, m) => r(tt(c), tt(u), m, !0) }; return l.forEach(Object.keys(Object.assign({}, e, t)), function(u) { const m = d[u] || r, R = m(e[u], t[u], u); l.isUndefined(R) && m !== a || (n[u] = R); }), n; } const It = (e) => { const t = ee({}, e); let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: o, headers: i, auth: a } = t; t.headers = i = B.from(i), t.url = Tt(Ct(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set( "Authorization", "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : "")) ); let d; if (l.isFormData(n)) { if (P.hasStandardBrowserEnv || P.hasStandardBrowserWebWorkerEnv) i.setContentType(void 0); else if ((d = i.getContentType()) !== !1) { const [c, ...u] = d ? d.split(";").map((m) => m.trim()).filter(Boolean) : []; i.setContentType([c || "multipart/form-data", ...u].join("; ")); } } if (P.hasStandardBrowserEnv && (s && l.isFunction(s) && (s = s(t)), s || s !== !1 && rs(t.url))) { const c = r && o && os.read(o); c && i.set(r, c); } return t; }, ls = typeof XMLHttpRequest < "u", cs = ls && function(e) { return new Promise(function(n, s) { const r = It(e); let o = r.data; const i = B.from(r.headers).normalize(); let { responseType: a, onUploadProgress: d, onDownloadProgress: c } = r, u, m, R, C, h; function _() { C && C(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(u), r.signal && r.signal.removeEventListener("abort", u); } let g = new XMLHttpRequest(); g.open(r.method.toUpperCase(), r.url, !0), g.timeout = r.timeout; function O() { if (!g) return; const U = B.from( "getAllResponseHeaders" in g && g.getAllResponseHeaders() ), N = { data: !a || a === "text" || a === "json" ? g.responseText : g.response, status: g.status, statusText: g.statusText, headers: U, config: e, request: g }; At(function(Q) { n(Q), _(); }, function(Q) { s(Q), _(); }, N), g = null; } "onloadend" in g ? g.onloadend = O : g.onreadystatechange = function() { !g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(O); }, g.onabort = function() { g && (s(new b("Request aborted", b.ECONNABORTED, e, g)), g = null); }, g.onerror = function() { s(new b("Network Error", b.ERR_NETWORK, e, g)), g = null; }, g.ontimeout = function() { let K = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; const N = r.transitional || kt; r.timeoutErrorMessage && (K = r.timeoutErrorMessage), s(new b( K, N.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED, e, g )), g = null; }, o === void 0 && i.setContentType(null), "setRequestHeader" in g && l.forEach(i.toJSON(), function(K, N) { g.setRequestHeader(N, K); }), l.isUndefined(r.withCredentials) || (g.withCredentials = !!r.withCredentials), a && a !== "json" && (g.responseType = r.responseType), c && ([R, h] = be(c, !0), g.addEventListener("progress", R)), d && g.upload && ([m, C] = be(d), g.upload.addEventListener("progress", m), g.upload.addEventListener("loadend", C)), (r.cancelToken || r.signal) && (u = (U) => { g && (s(!U || U.type ? new oe(null, e, g) : U), g.abort(), g = null); }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u))); const I = ts(r.url); if (I && P.protocols.indexOf(I) === -1) { s(new b("Unsupported protocol " + I + ":", b.ERR_BAD_REQUEST, e)); return; } g.send(o || null); }); }, us = (e, t) => { const { length: n } = e = e ? e.filter(Boolean) : []; if (t || n) { let s = new AbortController(), r; const o = function(c) { if (!r) { r = !0, a(); const u = c instanceof Error ? c : this.reason; s.abort(u instanceof b ? u : new oe(u instanceof Error ? u.message : u)); } }; let i = t && setTimeout(() => { i = null, o(new b(`timeout ${t} of ms exceeded`, b.ETIMEDOUT)); }, t); const a = () => { e && (i && clearTimeout(i), i = null, e.forEach((c) => { c.unsubscribe ? c.unsubscribe(o) : c.removeEventListener("abort", o); }), e = null); }; e.forEach((c) => c.addEventListener("abort", o)); const { signal: d } = s; return d.unsubscribe = () => l.asap(a), d; } }, ds = function* (e, t) { let n = e.byteLength; if (n < t) { yield e; return; } let s = 0, r; for (; s < n; ) r = s + t, yield e.slice(s, r), s = r; }, ps = async function* (e, t) { for await (const n of fs(e)) yield* ds(n, t); }, fs = async function* (e) { if (e[Symbol.asyncIterator]) { yield* e; return; } const t = e.getReader(); try { for (; ; ) { const { done: n, value: s } = await t.read(); if (n) break; yield s; } } finally { await t.cancel(); } }, nt = (e, t, n, s) => { const r = ps(e, t); let o = 0, i, a = (d) => { i || (i = !0, s && s(d)); }; return new ReadableStream({ async pull(d) { try { const { done: c, value: u } = await r.next(); if (c) { a(), d.close(); return; } let m = u.byteLength; if (n) { let R = o += m; n(R); } d.enqueue(new Uint8Array(u)); } catch (c) { throw a(c), c; } }, cancel(d) { return a(d), r.return(); } }, { highWaterMark: 2 }); }, Te = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ut = Te && typeof ReadableStream == "function", ms = Te && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), $t = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, hs = Ut && $t(() => { let e = !1; const t = new Request(P.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), st = 64 * 1024, Pe = Ut && $t(() => l.isReadableStream(new Response("").body)), _e = { stream: Pe && ((e) => e.body) }; Te && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !_e[t] && (_e[t] = l.isFunction(e[t]) ? (n) => n[t]() : (n, s) => { throw new b(`Response type '${t}' is not supported`, b.ERR_NOT_SUPPORT, s); }); }); })(new Response()); const gs = async (e) => { if (e == null) return 0; if (l.isBlob(e)) return e.size; if (l.isSpecCompliantForm(e)) return (await new Request(P.origin, { method: "POST", body: e }).arrayBuffer()).byteLength; if (l.isArrayBufferView(e) || l.isArrayBuffer(e)) return e.byteLength; if (l.isURLSearchParams(e) && (e = e + ""), l.isString(e)) return (await ms(e)).byteLength; }, ys = async (e, t) => { const n = l.toFiniteNumber(e.getContentLength()); return n ?? gs(t); }, bs = Te && (async (e) => { let { url: t, method: n, data: s, signal: r, cancelToken: o, timeout: i, onDownloadProgress: a, onUploadProgress: d, responseType: c, headers: u, withCredentials: m = "same-origin", fetchOptions: R } = It(e); c = c ? (c + "").toLowerCase() : "text"; let C = us([r, o && o.toAbortSignal()], i), h; const _ = C && C.unsubscribe && (() => { C.unsubscribe(); }); let g; try { if (d && hs && n !== "get" && n !== "head" && (g = await ys(u, s)) !== 0) { let N = new Request(t, { method: "POST", body: s, duplex: "half" }), W; if (l.isFormData(s) && (W = N.headers.get("content-type")) && u.setContentType(W), N.body) { const [Q, me] = Ze( g, be(et(d)) ); s = nt(N.body, st, Q, me); } } l.isString(m) || (m = m ? "include" : "omit"); const O = "credentials" in Request.prototype; h = new Request(t, { ...R, signal: C, method: n.toUpperCase(), headers: u.normalize().toJSON(), body: s, duplex: "half", credentials: O ? m : void 0 }); let I = await fetch(h); const U = Pe && (c === "stream" || c === "response"); if (Pe && (a || U && _)) { const N = {}; ["status", "statusText", "headers"].forEach((ze) => { N[ze] = I[ze]; }); const W = l.toFiniteNumber(I.headers.get("content-length")), [Q, me] = a && Ze( W, be(et(a), !0) ) || []; I = new Response( nt(I.body, st, Q, () => { me && me(), _ && _(); }), N ); } c = c || "text"; let K = await _e[l.findKey(_e, c) || "text"](I, e); return !U && _ && _(), await new Promise((N, W) => { At(N, W, { data: K, headers: B.from(I.headers), status: I.status, statusText: I.statusText, config: e, request: h }); }); } catch (O) { throw _ && _(), O && O.name === "TypeError" && /fetch/i.test(O.message) ? Object.assign( new b("Network Error", b.ERR_NETWORK, e, h), { cause: O.cause || O } ) : b.from(O, O && O.code, e, h); } }), Fe = { http: $n, xhr: cs, fetch: bs }; l.forEach(Fe, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const rt = (e) => `- ${e}`, _s = (e) => l.isFunction(e) || e === null || e === !1, Dt = { getAdapter: (e) => { e = l.isArray(e) ? e : [e]; const { length: t } = e; let n, s; const r = {}; for (let o = 0; o < t; o++) { n = e[o]; let i; if (s = n, !_s(n) && (s = Fe[(i = String(n)).toLowerCase()], s === void 0)) throw new b(`Unknown adapter '${i}'`); if (s) break; r[i || "#" + o] = s; } if (!s) { const o = Object.entries(r).map( ([a, d]) => `adapter ${a} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build") ); let i = t ? o.length > 1 ? `since : ` + o.map(rt).join(` `) : " " + rt(o[0]) : "as no adapter specified"; throw new b( "There is no suitable adapter to dispatch the request " + i, "ERR_NOT_SUPPORT" ); } return s; }, adapters: Fe }; function Ie(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new oe(null, e); } function ot(e) { return Ie(e), e.headers = B.from(e.headers), e.data = Ce.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Dt.getAdapter(e.adapter || pe.adapter)(e).then(function(s) { return Ie(e), s.data = Ce.call( e, e.transformResponse, s ), s.headers = B.from(s.headers), s; }, function(s) { return xt(s) || (Ie(e), s && s.response && (s.response.data = Ce.call( e, e.transformResponse, s.response ), s.response.headers = B.from(s.response.headers))), Promise.reject(s); }); } const Lt = "1.8.4", ke = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { ke[e] = function(s) { return typeof s === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const it = {}; ke.transitional = function(t, n, s) { function r(o, i) { return "[Axios v" + Lt + "] Transitional option '" + o + "'" + i + (s ? ". " + s : ""); } return (o, i, a) => { if (t === !1) throw new b( r(i, " has been removed" + (n ? " in " + n : "")), b.ERR_DEPRECATED ); return n && !it[i] && (it[i] = !0, console.warn( r( i, " has been deprecated since v" + n + " and will be removed in the near future" ) )), t ? t(o, i, a) : !0; }; }; ke.spelling = function(t) { return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0); }; function ws(e, t, n) { if (typeof e != "object") throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE); const s = Object.keys(e); let r = s.length; for (; r-- > 0; ) { const o = s[r], i = t[o]; if (i) { const a = e[o], d = a === void 0 || i(a, o, e); if (d !== !0) throw new b("option " + o + " must be " + d, b.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new b("Unknown option " + o, b.ERR_BAD_OPTION); } } const ye = { assertOptions: ws, validators: ke }, z = ye.validators; let Z = class { constructor(t) { this.defaults = t, this.interceptors = { request: new Ge(), response: new Ge() }; } /** * Dispatch a request * * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) * @param {?Object} config * * @returns {Promise} The Promise to be fulfilled */ async request(t, n) { try { return await this._request(t, n); } catch (s) { if (s instanceof Error) { let r = {}; Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error(); const o = r.stack ? r.stack.replace(/^.+\n/, "") : ""; try { s.stack ? o && !String(s.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (s.stack += ` ` + o) : s.stack = o; } catch { } } throw s; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = ee(this.defaults, n); const { transitional: s, paramsSerializer: r, headers: o } = n; s !== void 0 && ye.assertOptions(s, { silentJSONParsing: z.transitional(z.boolean), forcedJSONParsing: z.transitional(z.boolean), clarifyTimeoutError: z.transitional(z.boolean) }, !1), r != null && (l.isFunction(r) ? n.paramsSerializer = { serialize: r } : ye.assertOptions(r, { encode: z.function, serialize: z.function }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ye.assertOptions(n, { baseUrl: z.spelling("baseURL"), withXsrfToken: z.spelling("withXSRFToken") }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let i = o && l.merge( o.common, o[n.method] ); o && l.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (h) => { delete o[h]; } ), n.headers = B.concat(i, o); const a = []; let d = !0; this.interceptors.request.forEach(function(_) { typeof _.runWhen == "function" && _.runWhen(n) === !1 || (d = d && _.synchronous, a.unshift(_.fulfilled, _.rejected)); }); const c = []; this.interceptors.response.forEach(function(_) { c.push(_.fulfilled, _.rejected); }); let u, m = 0, R; if (!d) { const h = [ot.bind(this), void 0]; for (h.unshift.apply(h, a), h.push.apply(h, c), R = h.length, u = Promise.resolve(n); m < R; ) u = u.then(h[m++], h[m++]); return u; } R = a.length; let C = n; for (m = 0; m < R; ) { const h = a[m++], _ = a[m++]; try { C = h(C); } catch (g) { _.call(this, g); break; } } try { u = ot.call(this, C); } catch (h) { return Promise.reject(h); } for (m = 0, R = c.length; m < R; ) u = u.then(c[m++], c[m++]); return u; } getUri(t) { t = ee(this.defaults, t); const n = Ct(t.baseURL, t.url, t.allowAbsoluteUrls); return Tt(n, t.params, t.paramsSerializer); } }; l.forEach(["delete", "get", "head", "options"], function(t) { Z.prototype[t] = function(n, s) { return this.request(ee(s || {}, { method: t, url: n, data: (s || {}).data })); }; }); l.forEach(["post", "put", "patch"], function(t) { function n(s) { return function(o, i, a) { return this.request(ee(a || {}, { method: t, headers: s ? { "Content-Type": "multipart/form-data" } : {}, url: o, data: i })); }; } Z.prototype[t] = n(), Z.prototype[t + "Form"] = n(!0); }); let Ss = class Pt { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(o) { n = o; }); const s = this; this.promise.then((r) => { if (!s._listeners) return; let o = s._listeners.length; for (; o-- > 0; ) s._listeners[o](r); s._listeners = null; }), this.promise.then = (r) => { let o; const i = new Promise((a) => { s.subscribe(a), o = a; }).then(r); return i.cancel = function() { s.unsubscribe(o); }, i; }, t(function(o, i, a) { s.reason || (s.reason = new oe(o, i, a), n(s.reason)); }); } /** * Throws a `CanceledError` if cancellation has been requested. */ throwIfRequested() { if (this.reason) throw this.reason; } /** * Subscribe to the cancel signal */ subscribe(t) { if (this.reason) { t(this.reason); return; } this._listeners ? this._listeners.push(t) : this._listeners = [t]; } /** * Unsubscribe from the cancel signal */ unsubscribe(t) { if (!this._listeners) return; const n = this._listeners.indexOf(t); n !== -1 && this._listeners.splice(n, 1); } toAbortSignal() { const t = new AbortController(), n = (s) => { t.abort(s); }; return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal; } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ static source() { let t; return { token: new Pt(function(r) { t = r; }), cancel: t }; } }; function vs(e) { return function(n) { return e.apply(null, n); }; } function Es(e) { return l.isObject(e) && e.isAxiosError === !0; } const Ne = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511 }; Object.entries(Ne).forEach(([e, t]) => { Ne[t] = e; }); function Ft(e) { const t = new Z(e), n = mt(Z.prototype.request, t); return l.extend(n, Z.prototype, t, { allOwnKeys: !0 }), l.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) { return Ft(ee(e, r)); }, n; } const x = Ft(pe); x.Axios = Z; x.CanceledError = oe; x.CancelToken = Ss; x.isCancel = xt; x.VERSION = Lt; x.toFormData = Re; x.AxiosError = b; x.Cancel = x.CanceledError; x.all = function(t) { return Promise.all(t); }; x.spread = vs; x.isAxiosError = Es; x.mergeConfig = ee; x.AxiosHeaders = B; x.formToJSON = (e) => Ot(l.isHTMLForm(e) ? new FormData(e) : e); x.getAdapter = Dt.getAdapter; x.HttpStatusCode = Ne; x.default = x; const { Axios: So, AxiosError: vo, CanceledError: Eo, isC