UNPKG

@corgicoding/el-libs

Version:

element-plus的二次封装组件集合

1,677 lines 1.78 MB
import { defineComponent as P, computed as O, resolveComponent as L, openBlock as $, createElementBlock as E, toDisplayString as z, createBlock as k, mergeProps as ue, unref as m, toHandlers as ve, withCtx as A, Fragment as le, renderList as Oe, shallowRef as _e, ref as C, inject as ce, getCurrentInstance as de, watch as q, isRef as Bt, createTextVNode as ge, resolveDirective as pa, withDirectives as $e, renderSlot as V, onMounted as Ye, nextTick as we, readonly as On, getCurrentScope as En, onScopeDispose as rn, normalizeClass as I, createVNode as U, Transition as Lt, createElementVNode as R, normalizeStyle as tt, vShow as $t, shallowReactive as Mo, createCommentVNode as B, resolveDynamicComponent as Qe, withModifiers as ft, warn as Uo, provide as Wn, isVNode as kt, render as Rt, createSlots as Cn, useAttrs as tN, useSlots as ey, toRef as ii, onBeforeUnmount as zo, reactive as Ro, h as nN, toRefs as rN, watchEffect as oN, onUnmounted as aN, Text as iN, mergeModels as Vm, useModel as sN, Teleport as lN, withKeys as ti, onActivated as J7 } from "vue"; import { useI18n as pt } from "vue-i18n"; function ec(e) { return typeof e == "function" ? e() : m(e); } typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope; const cE = () => { }; function u1(e, t = !1, n = "Timeout") { return new Promise((r, o) => { setTimeout(t ? () => o(n) : r, e); }); } function c1(e, t = !1) { function n(c, { flush: h = "sync", deep: f = !1, timeout: p, throwOnTimeout: v } = {}) { let g = null; const w = [new Promise((_) => { g = q( e, (y) => { c(y) !== t && (g == null || g(), _(y)); }, { flush: h, deep: f, immediate: !0 } ); })]; return p != null && w.push( u1(p, v).then(() => ec(e)).finally(() => g == null ? void 0 : g()) ), Promise.race(w); } function r(c, h) { if (!Bt(c)) return n((y) => y === c, h); const { flush: f = "sync", deep: p = !1, timeout: v, throwOnTimeout: g } = h ?? {}; let w = null; const _ = [new Promise((y) => { w = q( [e, c], ([S, x]) => { t !== (S === x) && (w == null || w(), y(S)); }, { flush: f, deep: p, immediate: !0 } ); })]; return v != null && _.push( u1(v, g).then(() => ec(e)).finally(() => (w == null || w(), ec(e))) ), Promise.race(_); } function o(c) { return n((h) => !!h, c); } function a(c) { return r(null, c); } function i(c) { return r(void 0, c); } function s(c) { return n(Number.isNaN, c); } function u(c, h) { return n((f) => { const p = Array.from(f); return p.includes(c) || p.includes(ec(c)); }, h); } function l(c) { return d(1, c); } function d(c = 1, h) { let f = -1; return n(() => (f += 1, f >= c), h); } return Array.isArray(ec(e)) ? { toMatch: n, toContains: u, changed: l, changedTimes: d, get not() { return c1(e, !t); } } : { toMatch: n, toBe: r, toBeTruthy: o, toBeNull: a, toBeNaN: s, toBeUndefined: i, changed: l, changedTimes: d, get not() { return c1(e, !t); } }; } function Y7(e) { return c1(e); } function G7(e, t, n) { const { immediate: r = !0, delay: o = 0, onError: a = cE, onSuccess: i = cE, resetOnExecute: s = !0, shallow: u = !0, throwError: l } = n ?? {}, d = u ? _e(t) : C(t), c = C(!1), h = C(!1), f = _e(void 0); async function p(w = 0, ..._) { s && (d.value = t), f.value = void 0, c.value = !1, h.value = !0, w > 0 && await u1(w); const y = typeof e == "function" ? e(..._) : e; try { const S = await y; d.value = S, c.value = !0, i(S); } catch (S) { if (f.value = S, a(S), l) throw S; } finally { h.value = !1; } return d.value; } r && p(o); const v = { state: d, isReady: c, isLoading: h, error: f, execute: p }; function g() { return new Promise((w, _) => { Y7(h).toBe(!1).then(() => w(v)).catch(_); }); } return { ...v, then(w, _) { return g().then(w, _); } }; } function uN(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: X7 } = Object.prototype, { getPrototypeOf: X2 } = Object, ty = /* @__PURE__ */ ((e) => (t) => { const n = X7.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), co = (e) => (e = e.toLowerCase(), (t) => ty(t) === e), ny = (e) => (t) => typeof t === e, { isArray: zl } = Array, dd = ny("undefined"); function Z7(e) { return e !== null && !dd(e) && e.constructor !== null && !dd(e.constructor) && ar(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const cN = co("ArrayBuffer"); function Q7(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && cN(e.buffer), t; } const eH = ny("string"), ar = ny("function"), dN = ny("number"), ry = (e) => e !== null && typeof e == "object", tH = (e) => e === !0 || e === !1, th = (e) => { if (ty(e) !== "object") return !1; const t = X2(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); }, nH = co("Date"), rH = co("File"), oH = co("Blob"), aH = co("FileList"), iH = (e) => ry(e) && ar(e.pipe), sH = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || ar(e.append) && ((t = ty(e)) === "formdata" || // detect form-data instance t === "object" && ar(e.toString) && e.toString() === "[object FormData]")); }, lH = co("URLSearchParams"), [uH, cH, dH, fH] = ["ReadableStream", "Request", "Response", "Headers"].map(co), pH = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function gf(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, o; if (typeof e != "object" && (e = [e]), zl(e)) for (r = 0, o = e.length; r < o; r++) t.call(null, e[r], r, e); else { const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = a.length; let s; for (r = 0; r < i; r++) s = a[r], t.call(null, e[s], s, e); } } function fN(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let r = n.length, o; for (; r-- > 0; ) if (o = n[r], t === o.toLowerCase()) return o; return null; } const pN = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, hN = (e) => !dd(e) && e !== pN; function d1() { const { caseless: e } = hN(this) && this || {}, t = {}, n = (r, o) => { const a = e && fN(t, o) || o; th(t[a]) && th(r) ? t[a] = d1(t[a], r) : th(r) ? t[a] = d1({}, r) : zl(r) ? t[a] = r.slice() : t[a] = r; }; for (let r = 0, o = arguments.length; r < o; r++) arguments[r] && gf(arguments[r], n); return t; } const hH = (e, t, n, { allOwnKeys: r } = {}) => (gf(t, (o, a) => { n && ar(o) ? e[a] = uN(o, n) : e[a] = o; }, { allOwnKeys: r }), e), mH = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), yH = (e, t, n, r) => { e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n); }, gH = (e, t, n, r) => { let o, a, i; const s = {}; if (t = t || {}, e == null) return t; do { for (o = Object.getOwnPropertyNames(e), a = o.length; a-- > 0; ) i = o[a], (!r || r(i, e, t)) && !s[i] && (t[i] = e[i], s[i] = !0); e = n !== !1 && X2(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, vH = (e, t, n) => { e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length; const r = e.indexOf(t, n); return r !== -1 && r === n; }, bH = (e) => { if (!e) return null; if (zl(e)) return e; let t = e.length; if (!dN(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, wH = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && X2(Uint8Array)), $H = (e, t) => { const n = (e && e[Symbol.iterator]).call(e); let r; for (; (r = n.next()) && !r.done; ) { const o = r.value; t.call(e, o[0], o[1]); } }, _H = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, SH = co("HTMLFormElement"), OH = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(t, n, r) { return n.toUpperCase() + r; } ), dE = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), EH = co("RegExp"), mN = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; gf(n, (o, a) => { let i; (i = t(o, a, e)) !== !1 && (r[a] = i || o); }), Object.defineProperties(e, r); }, xH = (e) => { mN(e, (t, n) => { if (ar(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (ar(r)) { if (t.enumerable = !1, "writable" in t) { t.writable = !1; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }, TH = (e, t) => { const n = {}, r = (o) => { o.forEach((a) => { n[a] = !0; }); }; return zl(e) ? r(e) : r(String(e).split(t)), n; }, CH = () => { }, AH = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, cv = "abcdefghijklmnopqrstuvwxyz", fE = "0123456789", yN = { DIGIT: fE, ALPHA: cv, ALPHA_DIGIT: cv + cv.toUpperCase() + fE }, jH = (e = 16, t = yN.ALPHA_DIGIT) => { let n = ""; const { length: r } = t; for (; e--; ) n += t[Math.random() * r | 0]; return n; }; function RH(e) { return !!(e && ar(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]); } const kH = (e) => { const t = new Array(10), n = (r, o) => { if (ry(r)) { if (t.indexOf(r) >= 0) return; if (!("toJSON" in r)) { t[o] = r; const a = zl(r) ? [] : {}; return gf(r, (i, s) => { const u = n(i, o + 1); !dd(u) && (a[s] = u); }), t[o] = void 0, a; } } return r; }; return n(e, 0); }, NH = co("AsyncFunction"), PH = (e) => e && (ry(e) || ar(e)) && ar(e.then) && ar(e.catch), K = { isArray: zl, isArrayBuffer: cN, isBuffer: Z7, isFormData: sH, isArrayBufferView: Q7, isString: eH, isNumber: dN, isBoolean: tH, isObject: ry, isPlainObject: th, isReadableStream: uH, isRequest: cH, isResponse: dH, isHeaders: fH, isUndefined: dd, isDate: nH, isFile: rH, isBlob: oH, isRegExp: EH, isFunction: ar, isStream: iH, isURLSearchParams: lH, isTypedArray: wH, isFileList: aH, forEach: gf, merge: d1, extend: hH, trim: pH, stripBOM: mH, inherits: yH, toFlatObject: gH, kindOf: ty, kindOfTest: co, endsWith: vH, toArray: bH, forEachEntry: $H, matchAll: _H, isHTMLForm: SH, hasOwnProperty: dE, hasOwnProp: dE, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: mN, freezeMethods: xH, toObjectSet: TH, toCamelCase: OH, noop: CH, toFiniteNumber: AH, findKey: fN, global: pN, isContextDefined: hN, ALPHABET: yN, generateString: jH, isSpecCompliantForm: RH, toJSONObject: kH, isAsyncFn: NH, isThenable: PH }; function Ne(e, t, n, r, o) { 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), r && (this.request = r), o && (this.response = o); } K.inherits(Ne, 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: K.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null }; } }); const gN = Ne.prototype, vN = {}; [ "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) => { vN[e] = { value: e }; }); Object.defineProperties(Ne, vN); Object.defineProperty(gN, "isAxiosError", { value: !0 }); Ne.from = (e, t, n, r, o, a) => { const i = Object.create(gN); return K.toFlatObject(e, i, function(s) { return s !== Error.prototype; }, (s) => s !== "isAxiosError"), Ne.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, a && Object.assign(i, a), i; }; const BH = null; function f1(e) { return K.isPlainObject(e) || K.isArray(e); } function bN(e) { return K.endsWith(e, "[]") ? e.slice(0, -2) : e; } function pE(e, t, n) { return e ? e.concat(t).map(function(r, o) { return r = bN(r), !n && o ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function DH(e) { return K.isArray(e) && !e.some(f1); } const FH = K.toFlatObject(K, {}, null, function(e) { return /^is[A-Z]/.test(e); }); function oy(e, t, n) { if (!K.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = K.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(f, p) { return !K.isUndefined(p[f]); }); const r = n.metaTokens, o = n.visitor || l, a = n.dots, i = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && K.isSpecCompliantForm(t); if (!K.isFunction(o)) throw new TypeError("visitor must be a function"); function u(f) { if (f === null) return ""; if (K.isDate(f)) return f.toISOString(); if (!s && K.isBlob(f)) throw new Ne("Blob is not supported. Use a Buffer instead."); return K.isArrayBuffer(f) || K.isTypedArray(f) ? s && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f; } function l(f, p, v) { let g = f; if (f && !v && typeof f == "object") { if (K.endsWith(p, "{}")) p = r ? p : p.slice(0, -2), f = JSON.stringify(f); else if (K.isArray(f) && DH(f) || (K.isFileList(f) || K.endsWith(p, "[]")) && (g = K.toArray(f))) return p = bN(p), g.forEach(function(w, _) { !(K.isUndefined(w) || w === null) && t.append( // eslint-disable-next-line no-nested-ternary i === !0 ? pE([p], _, a) : i === null ? p : p + "[]", u(w) ); }), !1; } return f1(f) ? !0 : (t.append(pE(v, p, a), u(f)), !1); } const d = [], c = Object.assign(FH, { defaultVisitor: l, convertValue: u, isVisitable: f1 }); function h(f, p) { if (!K.isUndefined(f)) { if (d.indexOf(f) !== -1) throw Error("Circular reference detected in " + p.join(".")); d.push(f), K.forEach(f, function(v, g) { (!(K.isUndefined(v) || v === null) && o.call( t, v, K.isString(g) ? g.trim() : g, p, c )) === !0 && h(v, p ? p.concat(g) : [g]); }), d.pop(); } } if (!K.isObject(e)) throw new TypeError("data must be an object"); return h(e), t; } function hE(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) { return t[n]; }); } function Z2(e, t) { this._pairs = [], e && oy(e, this, t); } const wN = Z2.prototype; wN.append = function(e, t) { this._pairs.push([e, t]); }; wN.toString = function(e) { const t = e ? function(n) { return e.call(this, n, hE); } : hE; return this._pairs.map(function(n) { return t(n[0]) + "=" + t(n[1]); }, "").join("&"); }; function LH(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function $N(e, t, n) { if (!t) return e; const r = n && n.encode || LH, o = n && n.serialize; let a; if (o ? a = o(t, n) : a = K.isURLSearchParams(t) ? t.toString() : new Z2(t, n).toString(r), a) { const i = e.indexOf("#"); i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + a; } return e; } let mE = class { 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, r) { return this.handlers.push({ fulfilled: t, rejected: n, synchronous: r ? r.synchronous : !1, runWhen: r ? r.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) { K.forEach(this.handlers, function(n) { n !== null && t(n); }); } }; const _N = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, IH = typeof URLSearchParams < "u" ? URLSearchParams : Z2, MH = typeof FormData < "u" ? FormData : null, UH = typeof Blob < "u" ? Blob : null, zH = { isBrowser: !0, classes: { URLSearchParams: IH, FormData: MH, Blob: UH }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Q2 = typeof window < "u" && typeof document < "u", VH = ((e) => Q2 && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), HH = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", qH = Q2 && window.location.href || "http://localhost", KH = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: Q2, hasStandardBrowserEnv: VH, hasStandardBrowserWebWorkerEnv: HH, origin: qH }, Symbol.toStringTag, { value: "Module" })), Kr = { ...KH, ...zH }; function WH(e, t) { return oy(e, new Kr.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, o, a) { return Kr.isNode && K.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments); } }, t)); } function JH(e) { return K.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function YH(e) { const t = {}, n = Object.keys(e); let r; const o = n.length; let a; for (r = 0; r < o; r++) a = n[r], t[a] = e[a]; return t; } function SN(e) { function t(n, r, o, a) { let i = n[a++]; if (i === "__proto__") return !0; const s = Number.isFinite(+i), u = a >= n.length; return i = !i && K.isArray(o) ? o.length : i, u ? (K.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !s) : ((!o[i] || !K.isObject(o[i])) && (o[i] = []), t(n, r, o[i], a) && K.isArray(o[i]) && (o[i] = YH(o[i])), !s); } if (K.isFormData(e) && K.isFunction(e.entries)) { const n = {}; return K.forEachEntry(e, (r, o) => { t(JH(r), o, n, 0); }), n; } return null; } function GH(e, t, n) { if (K.isString(e)) try { return (t || JSON.parse)(e), K.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (0, JSON.stringify)(e); } const vf = { transitional: _N, adapter: ["xhr", "http", "fetch"], transformRequest: [function(e, t) { const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, o = K.isObject(e); if (o && K.isHTMLForm(e) && (e = new FormData(e)), K.isFormData(e)) return r ? JSON.stringify(SN(e)) : e; if (K.isArrayBuffer(e) || K.isBuffer(e) || K.isStream(e) || K.isFile(e) || K.isBlob(e) || K.isReadableStream(e)) return e; if (K.isArrayBufferView(e)) return e.buffer; if (K.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString(); let a; if (o) { if (n.indexOf("application/x-www-form-urlencoded") > -1) return WH(e, this.formSerializer).toString(); if ((a = K.isFileList(e)) || n.indexOf("multipart/form-data") > -1) { const i = this.env && this.env.FormData; return oy( a ? { "files[]": e } : e, i && new i(), this.formSerializer ); } } return o || r ? (t.setContentType("application/json", !1), GH(e)) : e; }], transformResponse: [function(e) { const t = this.transitional || vf.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json"; if (K.isResponse(e) || K.isReadableStream(e)) return e; if (e && K.isString(e) && (n && !this.responseType || r)) { const o = !(t && t.silentJSONParsing) && r; try { return JSON.parse(e); } catch (a) { if (o) throw a.name === "SyntaxError" ? Ne.from(a, Ne.ERR_BAD_RESPONSE, this, null, this.response) : a; } } return e; }], /** * 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: Kr.classes.FormData, Blob: Kr.classes.Blob }, validateStatus: function(e) { return e >= 200 && e < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; K.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { vf.headers[e] = {}; }); const XH = K.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" ]), ZH = (e) => { const t = {}; let n, r, o; return e && e.split(` `).forEach(function(a) { o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && XH[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, yE = Symbol("internals"); function tc(e) { return e && String(e).trim().toLowerCase(); } function nh(e) { return e === !1 || e == null ? e : K.isArray(e) ? e.map(nh) : String(e); } function QH(e) { const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let r; for (; r = n.exec(e); ) t[r[1]] = r[2]; return t; } const eq = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function dv(e, t, n, r, o) { if (K.isFunction(r)) return r.call(this, t, n); if (o && (t = n), !!K.isString(t)) { if (K.isString(r)) return t.indexOf(r) !== -1; if (K.isRegExp(r)) return r.test(t); } } function tq(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function nq(e, t) { const n = K.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(o, a, i) { return this[r].call(this, t, o, a, i); }, configurable: !0 }); }); } let Nn = class { constructor(t) { t && this.set(t); } set(t, n, r) { const o = this; function a(s, u, l) { const d = tc(u); if (!d) throw new Error("header name must be a non-empty string"); const c = K.findKey(o, d); (!c || o[c] === void 0 || l === !0 || l === void 0 && o[c] !== !1) && (o[c || u] = nh(s)); } const i = (s, u) => K.forEach(s, (l, d) => a(l, d, u)); if (K.isPlainObject(t) || t instanceof this.constructor) i(t, n); else if (K.isString(t) && (t = t.trim()) && !eq(t)) i(ZH(t), n); else if (K.isHeaders(t)) for (const [s, u] of t.entries()) a(u, s, r); else t != null && a(n, t, r); return this; } get(t, n) { if (t = tc(t), t) { const r = K.findKey(this, t); if (r) { const o = this[r]; if (!n) return o; if (n === !0) return QH(o); if (K.isFunction(n)) return n.call(this, o, r); if (K.isRegExp(n)) return n.exec(o); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = tc(t), t) { const r = K.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || dv(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let o = !1; function a(i) { if (i = tc(i), i) { const s = K.findKey(r, i); s && (!n || dv(r, r[s], s, n)) && (delete r[s], o = !0); } } return K.isArray(t) ? t.forEach(a) : a(t), o; } clear(t) { const n = Object.keys(this); let r = n.length, o = !1; for (; r--; ) { const a = n[r]; (!t || dv(this, this[a], a, t, !0)) && (delete this[a], o = !0); } return o; } normalize(t) { const n = this, r = {}; return K.forEach(this, (o, a) => { const i = K.findKey(r, a); if (i) { n[i] = nh(o), delete n[a]; return; } const s = t ? tq(a) : String(a).trim(); s !== a && delete n[a], n[s] = nh(o), r[s] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return K.forEach(this, (r, o) => { r != null && r !== !1 && (n[o] = t && K.isArray(r) ? r.join(", ") : r); }), 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 r = new this(t); return n.forEach((o) => r.set(o)), r; } static accessor(t) { const n = (this[yE] = this[yE] = { accessors: {} }).accessors, r = this.prototype; function o(a) { const i = tc(a); n[i] || (nq(r, a), n[i] = !0); } return K.isArray(t) ? t.forEach(o) : o(t), this; } }; Nn.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); K.reduceDescriptors(Nn.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); K.freezeMethods(Nn); function fv(e, t) { const n = this || vf, r = t || n, o = Nn.from(r.headers); let a = r.data; return K.forEach(e, function(i) { a = i.call(n, a, o.normalize(), t ? t.status : void 0); }), o.normalize(), a; } function ON(e) { return !!(e && e.__CANCEL__); } function Vl(e, t, n) { Ne.call(this, e ?? "canceled", Ne.ERR_CANCELED, t, n), this.name = "CanceledError"; } K.inherits(Vl, Ne, { __CANCEL__: !0 }); function EN(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new Ne( "Request failed with status code " + n.status, [Ne.ERR_BAD_REQUEST, Ne.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function rq(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function oq(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let o = 0, a = 0, i; return t = t !== void 0 ? t : 1e3, function(s) { const u = Date.now(), l = r[a]; i || (i = u), n[o] = s, r[o] = u; let d = a, c = 0; for (; d !== o; ) c += n[d++], d = d % e; if (o = (o + 1) % e, o === a && (a = (a + 1) % e), u - i < t) return; const h = l && u - l; return h ? Math.round(c * 1e3 / h) : void 0; }; } function aq(e, t) { let n = 0; const r = 1e3 / t; let o = null; return function() { const a = this === !0, i = Date.now(); if (a || i - n > r) return o && (clearTimeout(o), o = null), n = i, e.apply(null, arguments); o || (o = setTimeout(() => (o = null, n = Date.now(), e.apply(null, arguments)), r - (i - n))); }; } const Hm = (e, t, n = 3) => { let r = 0; const o = oq(50, 250); return aq((a) => { const i = a.loaded, s = a.lengthComputable ? a.total : void 0, u = i - r, l = o(u), d = i <= s; r = i; const c = { loaded: i, total: s, progress: s ? i / s : void 0, bytes: u, rate: l || void 0, estimated: l && s && d ? (s - i) / l : void 0, event: a, lengthComputable: s != null }; c[t ? "download" : "upload"] = !0, e(c); }, n); }, iq = Kr.hasStandardBrowserEnv ? ( // Standard browser envs have full support of the APIs needed to test // whether the request URL is of the same origin as current location. function() { const e = /(msie|trident)/i.test(navigator.userAgent), t = document.createElement("a"); let n; function r(o) { let a = o; return e && (t.setAttribute("href", a), a = t.href), t.setAttribute("href", a), { href: t.href, protocol: t.protocol ? t.protocol.replace(/:$/, "") : "", host: t.host, search: t.search ? t.search.replace(/^\?/, "") : "", hash: t.hash ? t.hash.replace(/^#/, "") : "", hostname: t.hostname, port: t.port, pathname: t.pathname.charAt(0) === "/" ? t.pathname : "/" + t.pathname }; } return n = r(window.location.href), function(o) { const a = K.isString(o) ? r(o) : o; return a.protocol === n.protocol && a.host === n.host; }; }() ) : ( // Non standard browser envs (web workers, react-native) lack needed support. /* @__PURE__ */ function() { return function() { return !0; }; }() ), sq = Kr.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, o, a) { const i = [e + "=" + encodeURIComponent(t)]; K.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), K.isString(r) && i.push("path=" + r), K.isString(o) && i.push("domain=" + o), a === !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 lq(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function uq(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function xN(e, t) { return e && !lq(t) ? uq(e, t) : t; } const gE = (e) => e instanceof Nn ? { ...e } : e; function Qi(e, t) { t = t || {}; const n = {}; function r(l, d, c) { return K.isPlainObject(l) && K.isPlainObject(d) ? K.merge.call({ caseless: c }, l, d) : K.isPlainObject(d) ? K.merge({}, d) : K.isArray(d) ? d.slice() : d; } function o(l, d, c) { if (K.isUndefined(d)) { if (!K.isUndefined(l)) return r(void 0, l, c); } else return r(l, d, c); } function a(l, d) { if (!K.isUndefined(d)) return r(void 0, d); } function i(l, d) { if (K.isUndefined(d)) { if (!K.isUndefined(l)) return r(void 0, l); } else return r(void 0, d); } function s(l, d, c) { if (c in t) return r(l, d); if (c in e) return r(void 0, l); } const u = { url: a, method: a, data: a, 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: s, headers: (l, d) => o(gE(l), gE(d), !0) }; return K.forEach(Object.keys(Object.assign({}, e, t)), function(l) { const d = u[l] || o, c = d(e[l], t[l], l); K.isUndefined(c) && d !== s || (n[l] = c); }), n; } const TN = (e) => { const t = Qi({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: i, auth: s } = t; t.headers = i = Nn.from(i), t.url = $N(xN(t.baseURL, t.url), e.params, e.paramsSerializer), s && i.set( "Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : "")) ); let u; if (K.isFormData(n)) { if (Kr.hasStandardBrowserEnv || Kr.hasStandardBrowserWebWorkerEnv) i.setContentType(void 0); else if ((u = i.getContentType()) !== !1) { const [l, ...d] = u ? u.split(";").map((c) => c.trim()).filter(Boolean) : []; i.setContentType([l || "multipart/form-data", ...d].join("; ")); } } if (Kr.hasStandardBrowserEnv && (r && K.isFunction(r) && (r = r(t)), r || r !== !1 && iq(t.url))) { const l = o && a && sq.read(a); l && i.set(o, l); } return t; }, cq = typeof XMLHttpRequest < "u", dq = cq && function(e) { return new Promise(function(t, n) { const r = TN(e); let o = r.data; const a = Nn.from(r.headers).normalize(); let { responseType: i } = r, s; function u() { r.cancelToken && r.cancelToken.unsubscribe(s), r.signal && r.signal.removeEventListener("abort", s); } let l = new XMLHttpRequest(); l.open(r.method.toUpperCase(), r.url, !0), l.timeout = r.timeout; function d() { if (!l) return; const h = Nn.from( "getAllResponseHeaders" in l && l.getAllResponseHeaders() ), f = { data: !i || i === "text" || i === "json" ? l.responseText : l.response, status: l.status, statusText: l.statusText, headers: h, config: e, request: l }; EN(function(p) { t(p), u(); }, function(p) { n(p), u(); }, f), l = null; } "onloadend" in l ? l.onloadend = d : l.onreadystatechange = function() { !l || l.readyState !== 4 || l.status === 0 && !(l.responseURL && l.responseURL.indexOf("file:") === 0) || setTimeout(d); }, l.onabort = function() { l && (n(new Ne("Request aborted", Ne.ECONNABORTED, r, l)), l = null); }, l.onerror = function() { n(new Ne("Network Error", Ne.ERR_NETWORK, r, l)), l = null; }, l.ontimeout = function() { let h = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; const f = r.transitional || _N; r.timeoutErrorMessage && (h = r.timeoutErrorMessage), n(new Ne( h, f.clarifyTimeoutError ? Ne.ETIMEDOUT : Ne.ECONNABORTED, r, l )), l = null; }, o === void 0 && a.setContentType(null), "setRequestHeader" in l && K.forEach(a.toJSON(), function(h, f) { l.setRequestHeader(f, h); }), K.isUndefined(r.withCredentials) || (l.withCredentials = !!r.withCredentials), i && i !== "json" && (l.responseType = r.responseType), typeof r.onDownloadProgress == "function" && l.addEventListener("progress", Hm(r.onDownloadProgress, !0)), typeof r.onUploadProgress == "function" && l.upload && l.upload.addEventListener("progress", Hm(r.onUploadProgress)), (r.cancelToken || r.signal) && (s = (h) => { l && (n(!h || h.type ? new Vl(null, e, l) : h), l.abort(), l = null); }, r.cancelToken && r.cancelToken.subscribe(s), r.signal && (r.signal.aborted ? s() : r.signal.addEventListener("abort", s))); const c = rq(r.url); if (c && Kr.protocols.indexOf(c) === -1) { n(new Ne("Unsupported protocol " + c + ":", Ne.ERR_BAD_REQUEST, e)); return; } l.send(o || null); }); }, fq = (e, t) => { let n = new AbortController(), r; const o = function(u) { if (!r) { r = !0, i(); const l = u instanceof Error ? u : this.reason; n.abort(l instanceof Ne ? l : new Vl(l instanceof Error ? l.message : l)); } }; let a = t && setTimeout(() => { o(new Ne(`timeout ${t} of ms exceeded`, Ne.ETIMEDOUT)); }, t); const i = () => { e && (a && clearTimeout(a), a = null, e.forEach((u) => { u && (u.removeEventListener ? u.removeEventListener("abort", o) : u.unsubscribe(o)); }), e = null); }; e.forEach((u) => u && u.addEventListener && u.addEventListener("abort", o)); const { signal: s } = n; return s.unsubscribe = i, [s, () => { a && clearTimeout(a), a = null; }]; }, pq = function* (e, t) { let n = e.byteLength; if (n < t) { yield e; return; } let r = 0, o; for (; r < n; ) o = r + t, yield e.slice(r, o), r = o; }, hq = async function* (e, t, n) { for await (const r of e) yield* pq(ArrayBuffer.isView(r) ? r : await n(String(r)), t); }, vE = (e, t, n, r, o) => { const a = hq(e, t, o); let i = 0; return new ReadableStream({ type: "bytes", async pull(s) { const { done: u, value: l } = await a.next(); if (u) { s.close(), r(); return; } let d = l.byteLength; n && n(i += d), s.enqueue(new Uint8Array(l)); }, cancel(s) { return r(s), a.return(); } }, { highWaterMark: 2 }); }, bE = (e, t) => { const n = e != null; return (r) => setTimeout(() => t({ lengthComputable: n, total: e, loaded: r })); }, ay = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", CN = ay && typeof ReadableStream == "function", p1 = ay && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), mq = CN && (() => { let e = !1; const t = new Request(Kr.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; })(), wE = 64 * 1024, h1 = CN && !!(() => { try { return K.isReadableStream(new Response("").body); } catch { } })(), qm = { stream: h1 && ((e) => e.body) }; ay && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !qm[t] && (qm[t] = K.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new Ne(`Response type '${t}' is not supported`, Ne.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const yq = async (e) => { if (e == null) return 0; if (K.isBlob(e)) return e.size; if (K.isSpecCompliantForm(e)) return (await new Request(e).arrayBuffer()).byteLength; if (K.isArrayBufferView(e)) return e.byteLength; if (K.isURLSearchParams(e) && (e = e + ""), K.isString(e)) return (await p1(e)).byteLength; }, gq = async (e, t) => K.toFiniteNumber(e.getContentLength()) ?? yq(t), vq = ay && (async (e) => { let { url: t, method: n, data: r, signal: o, cancelToken: a, timeout: i, onDownloadProgress: s, onUploadProgress: u, responseType: l, headers: d, withCredentials: c = "same-origin", fetchOptions: h } = TN(e); l = l ? (l + "").toLowerCase() : "text"; let [f, p] = o || a || i ? fq([o, a], i) : [], v, g; const w = () => { !v && setTimeout(() => { f && f.unsubscribe(); }), v = !0; }; let _; try { if (u && mq && n !== "get" && n !== "head" && (_ = await gq(d, r)) !== 0) { let T = new Request(t, { method: "POST", body: r, duplex: "half" }), b; K.isFormData(r) && (b = T.headers.get("content-type")) && d.setContentType(b), T.body && (r = vE(T.body, wE, bE( _, Hm(u) ), null, p1)); } K.isString(c) || (c = c ? "cors" : "omit"), g = new Request(t, { ...h, signal: f, method: n.toUpperCase(), headers: d.normalize().toJSON(), body: r, duplex: "half", withCredentials: c }); let y = await fetch(g); const S = h1 && (l === "stream" || l === "response"); if (h1 && (s || S)) { const T = {}; ["status", "statusText", "headers"].forEach((D) => { T[D] = y[D]; }); const b = K.toFiniteNumber(y.headers.get("content-length")); y = new Response( vE(y.body, wE, s && bE( b, Hm(s, !0) ), S && w, p1), T ); } l = l || "text"; let x = await qm[K.findKey(qm, l) || "text"](y, e); return !S && w(), p && p(), await new Promise((T, b) => { EN(T, b, { data: x, headers: Nn.from(y.headers), status: y.status, statusText: y.statusText, config: e, request: g }); }); } catch (y) { throw w(), y && y.name === "TypeError" && /fetch/i.test(y.message) ? Object.assign( new Ne("Network Error", Ne.ERR_NETWORK, e, g), { cause: y.cause || y } ) : Ne.from(y, y && y.code, e, g); } }), m1 = { http: BH, xhr: dq, fetch: vq }; K.forEach(m1, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const $E = (e) => `- ${e}`, bq = (e) => K.isFunction(e) || e === null || e === !1, AN = { getAdapter: (e) => { e = K.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const o = {}; for (let a = 0; a < t; a++) { n = e[a]; let i; if (r = n, !bq(n) && (r = m1[(i = String(n)).toLowerCase()], r === void 0)) throw new Ne(`Unknown adapter '${i}'`); if (r) break; o[i || "#" + a] = r; } if (!r) { const a = Object.entries(o).map( ([s, u]) => `adapter ${s} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build") ); let i = t ? a.length > 1 ? `since : ` + a.map($E).join(` `) : " " + $E(a[0]) : "as no adapter specified"; throw new Ne( "There is no suitable adapter to dispatch the request " + i, "ERR_NOT_SUPPORT" ); } return r; }, adapters: m1 }; function pv(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Vl(null, e); } function _E(e) { return pv(e), e.headers = Nn.from(e.headers), e.data = fv.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), AN.getAdapter(e.adapter || vf.adapter)(e).then(function(t) { return pv(e), t.data = fv.call( e, e.transformResponse, t ), t.headers = Nn.from(t.headers), t; }, function(t) { return ON(t) || (pv(e), t && t.response && (t.response.data = fv.call( e, e.transformResponse, t.response ), t.response.headers = Nn.from(t.response.headers))), Promise.reject(t); }); } const jN = "1.7.2", e_ = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { e_[e] = function(n) { return typeof n === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const SE = {}; e_.transitional = function(e, t, n) { function r(o, a) { return "[Axios v" + jN + "] Transitional option '" + o + "'" + a + (n ? ". " + n : ""); } return (o, a, i) => { if (e === !1) throw new Ne( r(a, " has been removed" + (t ? " in " + t : "")), Ne.ERR_DEPRECATED ); return t && !SE[a] && (SE[a] = !0, console.warn( r( a, " has been deprecated since v" + t + " and will be removed in the near future" ) )), e ? e(o, a, i) : !0; }; }; function wq(e, t, n) { if (typeof e != "object") throw new Ne("options must be an object", Ne.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let o = r.length; for (; o-- > 0; ) { const a = r[o], i = t[a]; if (i) { const s = e[a], u = s === void 0 || i(s, a, e); if (u !== !0) throw new Ne("option " + a + " must be " + u, Ne.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new Ne("Unknown option " + a, Ne.ERR_BAD_OPTION); } } const y1 = { assertOptions: wq, validators: e_ }, Ea = y1.validators; let Fi = class { constructor(t) { this.defaults = t, this.interceptors = { request: new mE(), response: new mE() }; } /** * 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 (r) { if (r instanceof Error) { let o; Error.captureStackTrace ? Error.captureStackTrace(o = {}) : o = new Error(); const a = o.stack ? o.stack.replace(/^.+\n/, "") : ""; try { r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += ` ` + a) : r.stack = a; } catch { } } throw r; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Qi(this.defaults, n); const { transitional: r, paramsSerializer: o, headers: a } = n; r !== void 0 && y1.assertOptions(r, { silentJSONParsing: Ea.transitional(Ea.boolean), forcedJSONParsing: Ea.transitional(Ea.boolean), clarifyTimeoutError: Ea.transitional(Ea.boolean) }, !1), o != null && (K.isFunction(o) ? n.paramsSerializer = { serialize: o } : y1.assertOptions(o, { encode: Ea.function, serialize: Ea.function }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let i = a && K.merge( a.common, a[n.method] ); a && K.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (p) => { delete a[p]; } ), n.headers = Nn.concat(i, a); const s = []; let u = !0; this.interceptors.request.forEach(function(p) { typeof p.runWhen == "function" && p.runWhen(n) === !1 || (u = u && p.synchronous, s.unshift(p.fulfilled, p.rejected)); }); const l = []; this.interceptors.response.forEach(function(p) { l.push(p.fulfilled, p.rejected); }); let d, c = 0, h; if (!u) { const p = [_E.bind(this), void 0]; for (p.unshift.apply(p, s), p.push.apply(p, l), h = p.length, d = Promise.resolve(n); c < h; ) d = d.then(p[c++], p[c++]); return d; } h = s.length; let f = n; for (c = 0; c < h; ) { const p = s[c++], v = s[c++]; try { f = p(f); } catch (g) { v.call(this, g); break; } } try { d = _E.call(this, f); } catch (p) { return Promise.reject(p); } for (c = 0, h = l.length; c < h; ) d = d.then(l[c++], l[c++]); return d; } getUri(t) { t = Qi(this.defaults, t); const n = xN(t.baseURL, t.url); return $N(n, t.params, t.paramsSerializer); } }; K.forEach(["delete", "get", "head", "options"], function(e) { Fi.prototype[e] = function(t, n) { return this.request(Qi(n || {}, { method: e, url: t, data: (n || {}).data })); }; }); K.forEach(["post", "put", "patch"], function(e) { function t(n) { return function(r, o, a) { return this.request(Qi(a || {}, { method: e, headers: n ? { "Content-Type": "multipart/form-data" } : {}, url: r, data: o })); }; } Fi.prototype[e] = t(), Fi.prototype[e + "Form"] = t(!0); }); let $q = class RN { 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 r = this; this.promise.then((o) => { if (!r._listeners) return; let a = r._listeners.length; for (; a-- > 0; ) r._listeners[a](o); r._listeners = null; }), this.promise.then = (o) => { let a; const i = new Promise((s) => { r.subscribe(s), a = s; }).then(o); return i.cancel = function() { r.unsubscribe(a); }, i; }, t(function(o, a, i) { r.reason || (r.reason = new Vl(o, a, i), n(r.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]