@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1,692 lines • 98.8 kB
JavaScript
var xt = Object.defineProperty;
var Tt = (e, t, n) => t in e ? xt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var fe = (e, t, n) => Tt(e, typeof t != "symbol" ? t + "" : t, n);
import { createI18n as wt } from "vue-i18n";
const St = Symbol("LOCALE_SERVICE"), De = "zh-CHS", Et = {
locale: De,
fallbackLocale: De,
uri: ""
};
function Ye(e, t) {
return function() {
return e.apply(t, arguments);
};
}
const { toString: Ct } = Object.prototype, { getPrototypeOf: Te } = Object, { iterator: se, toStringTag: Ke } = Symbol, ae = /* @__PURE__ */ ((e) => (t) => {
const n = Ct.call(t);
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), ie = (e) => (t) => typeof t === e, { isArray: j } = Array, W = ie("undefined");
function z(e) {
return e !== null && !W(e) && e.constructor !== null && !W(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
}
const Ge = D("ArrayBuffer");
function At(e) {
let t;
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ge(e.buffer), t;
}
const Ot = ie("string"), A = ie("function"), Qe = ie("number"), J = (e) => e !== null && typeof e == "object", kt = (e) => e === !0 || e === !1, ee = (e) => {
if (ae(e) !== "object")
return !1;
const t = Te(e);
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ke in e) && !(se in e);
}, Rt = (e) => {
if (!J(e) || z(e))
return !1;
try {
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
} catch {
return !1;
}
}, Lt = D("Date"), Dt = D("File"), vt = D("Blob"), Ft = D("FileList"), Mt = (e) => J(e) && A(e.pipe), Pt = (e) => {
let t;
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = ae(e)) === "formdata" || // detect form-data instance
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
}, Nt = D("URLSearchParams"), [Bt, qt, Ut, $t] = ["ReadableStream", "Request", "Response", "Headers"].map(D), It = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function Y(e, t, { allOwnKeys: n = !1 } = {}) {
if (e === null || typeof e > "u")
return;
let r, o;
if (typeof e != "object" && (e = [e]), j(e))
for (r = 0, o = e.length; r < o; r++)
t.call(null, e[r], r, e);
else {
if (z(e))
return;
const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), s = a.length;
let l;
for (r = 0; r < s; r++)
l = a[r], t.call(null, e[l], l, e);
}
}
function Xe(e, t) {
if (z(e))
return null;
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 q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ze = (e) => !W(e) && e !== q;
function ye() {
const { caseless: e, skipUndefined: t } = Ze(this) && this || {}, n = {}, r = (o, a) => {
const s = e && Xe(n, a) || a;
ee(n[s]) && ee(o) ? n[s] = ye(n[s], o) : ee(o) ? n[s] = ye({}, o) : j(o) ? n[s] = o.slice() : (!t || !W(o)) && (n[s] = o);
};
for (let o = 0, a = arguments.length; o < a; o++)
arguments[o] && Y(arguments[o], r);
return n;
}
const Wt = (e, t, n, { allOwnKeys: r } = {}) => (Y(t, (o, a) => {
n && A(o) ? e[a] = Ye(o, n) : e[a] = o;
}, { allOwnKeys: r }), e), jt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), _t = (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);
}, Ht = (e, t, n, r) => {
let o, a, s;
const l = {};
if (t = t || {}, e == null) return t;
do {
for (o = Object.getOwnPropertyNames(e), a = o.length; a-- > 0; )
s = o[a], (!r || r(s, e, t)) && !l[s] && (t[s] = e[s], l[s] = !0);
e = n !== !1 && Te(e);
} while (e && (!n || n(e, t)) && e !== Object.prototype);
return t;
}, Vt = (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;
}, zt = (e) => {
if (!e) return null;
if (j(e)) return e;
let t = e.length;
if (!Qe(t)) return null;
const n = new Array(t);
for (; t-- > 0; )
n[t] = e[t];
return n;
}, Jt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Te(Uint8Array)), Yt = (e, t) => {
const r = (e && e[se]).call(e);
let o;
for (; (o = r.next()) && !o.done; ) {
const a = o.value;
t.call(e, a[0], a[1]);
}
}, Kt = (e, t) => {
let n;
const r = [];
for (; (n = e.exec(t)) !== null; )
r.push(n);
return r;
}, Gt = D("HTMLFormElement"), Qt = (e) => e.toLowerCase().replace(
/[-_\s]([a-z\d])(\w*)/g,
function(n, r, o) {
return r.toUpperCase() + o;
}
), ve = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Xt = D("RegExp"), et = (e, t) => {
const n = Object.getOwnPropertyDescriptors(e), r = {};
Y(n, (o, a) => {
let s;
(s = t(o, a, e)) !== !1 && (r[a] = s || o);
}), Object.defineProperties(e, r);
}, Zt = (e) => {
et(e, (t, n) => {
if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
return !1;
const r = e[n];
if (A(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 + "'");
});
}
});
}, en = (e, t) => {
const n = {}, r = (o) => {
o.forEach((a) => {
n[a] = !0;
});
};
return j(e) ? r(e) : r(String(e).split(t)), n;
}, tn = () => {
}, nn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
function rn(e) {
return !!(e && A(e.append) && e[Ke] === "FormData" && e[se]);
}
const on = (e) => {
const t = new Array(10), n = (r, o) => {
if (J(r)) {
if (t.indexOf(r) >= 0)
return;
if (z(r))
return r;
if (!("toJSON" in r)) {
t[o] = r;
const a = j(r) ? [] : {};
return Y(r, (s, l) => {
const f = n(s, o + 1);
!W(f) && (a[l] = f);
}), t[o] = void 0, a;
}
}
return r;
};
return n(e, 0);
}, sn = D("AsyncFunction"), an = (e) => e && (J(e) || A(e)) && A(e.then) && A(e.catch), tt = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: o, data: a }) => {
o === q && a === n && r.length && r.shift()();
}, !1), (o) => {
r.push(o), q.postMessage(n, "*");
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
typeof setImmediate == "function",
A(q.postMessage)
), ln = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || tt, cn = (e) => e != null && A(e[se]), i = {
isArray: j,
isArrayBuffer: Ge,
isBuffer: z,
isFormData: Pt,
isArrayBufferView: At,
isString: Ot,
isNumber: Qe,
isBoolean: kt,
isObject: J,
isPlainObject: ee,
isEmptyObject: Rt,
isReadableStream: Bt,
isRequest: qt,
isResponse: Ut,
isHeaders: $t,
isUndefined: W,
isDate: Lt,
isFile: Dt,
isBlob: vt,
isRegExp: Xt,
isFunction: A,
isStream: Mt,
isURLSearchParams: Nt,
isTypedArray: Jt,
isFileList: Ft,
forEach: Y,
merge: ye,
extend: Wt,
trim: It,
stripBOM: jt,
inherits: _t,
toFlatObject: Ht,
kindOf: ae,
kindOfTest: D,
endsWith: Vt,
toArray: zt,
forEachEntry: Yt,
matchAll: Kt,
isHTMLForm: Gt,
hasOwnProperty: ve,
hasOwnProp: ve,
// an alias to avoid ESLint no-prototype-builtins detection
reduceDescriptors: et,
freezeMethods: Zt,
toObjectSet: en,
toCamelCase: Qt,
noop: tn,
toFiniteNumber: nn,
findKey: Xe,
global: q,
isContextDefined: Ze,
isSpecCompliantForm: rn,
toJSONObject: on,
isAsyncFn: sn,
isThenable: an,
setImmediate: tt,
asap: ln,
isIterable: cn
};
function y(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, this.status = o.status ? o.status : null);
}
i.inherits(y, 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: i.toJSONObject(this.config),
code: this.code,
status: this.status
};
}
});
const nt = y.prototype, rt = {};
[
"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) => {
rt[e] = { value: e };
});
Object.defineProperties(y, rt);
Object.defineProperty(nt, "isAxiosError", { value: !0 });
y.from = (e, t, n, r, o, a) => {
const s = Object.create(nt);
i.toFlatObject(e, s, function(c) {
return c !== Error.prototype;
}, (d) => d !== "isAxiosError");
const l = e && e.message ? e.message : "Error", f = t == null && e ? e.code : t;
return y.call(s, l, f, n, r, o), e && s.cause == null && Object.defineProperty(s, "cause", { value: e, configurable: !0 }), s.name = e && e.name || "Error", a && Object.assign(s, a), s;
};
const un = null;
function ge(e) {
return i.isPlainObject(e) || i.isArray(e);
}
function ot(e) {
return i.endsWith(e, "[]") ? e.slice(0, -2) : e;
}
function Fe(e, t, n) {
return e ? e.concat(t).map(function(o, a) {
return o = ot(o), !n && a ? "[" + o + "]" : o;
}).join(n ? "." : "") : t;
}
function dn(e) {
return i.isArray(e) && !e.some(ge);
}
const fn = i.toFlatObject(i, {}, null, function(t) {
return /^is[A-Z]/.test(t);
});
function le(e, t, n) {
if (!i.isObject(e))
throw new TypeError("target must be an object");
t = t || new FormData(), n = i.toFlatObject(n, {
metaTokens: !0,
dots: !1,
indexes: !1
}, !1, function(h, p) {
return !i.isUndefined(p[h]);
});
const r = n.metaTokens, o = n.visitor || c, a = n.dots, s = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && i.isSpecCompliantForm(t);
if (!i.isFunction(o))
throw new TypeError("visitor must be a function");
function d(u) {
if (u === null) return "";
if (i.isDate(u))
return u.toISOString();
if (i.isBoolean(u))
return u.toString();
if (!f && i.isBlob(u))
throw new y("Blob is not supported. Use a Buffer instead.");
return i.isArrayBuffer(u) || i.isTypedArray(u) ? f && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
}
function c(u, h, p) {
let T = u;
if (u && !p && typeof u == "object") {
if (i.endsWith(h, "{}"))
h = r ? h : h.slice(0, -2), u = JSON.stringify(u);
else if (i.isArray(u) && dn(u) || (i.isFileList(u) || i.endsWith(h, "[]")) && (T = i.toArray(u)))
return h = ot(h), T.forEach(function(w, C) {
!(i.isUndefined(w) || w === null) && t.append(
// eslint-disable-next-line no-nested-ternary
s === !0 ? Fe([h], C, a) : s === null ? h : h + "[]",
d(w)
);
}), !1;
}
return ge(u) ? !0 : (t.append(Fe(p, h, a), d(u)), !1);
}
const m = [], b = Object.assign(fn, {
defaultVisitor: c,
convertValue: d,
isVisitable: ge
});
function S(u, h) {
if (!i.isUndefined(u)) {
if (m.indexOf(u) !== -1)
throw Error("Circular reference detected in " + h.join("."));
m.push(u), i.forEach(u, function(T, k) {
(!(i.isUndefined(T) || T === null) && o.call(
t,
T,
i.isString(k) ? k.trim() : k,
h,
b
)) === !0 && S(T, h ? h.concat(k) : [k]);
}), m.pop();
}
}
if (!i.isObject(e))
throw new TypeError("data must be an object");
return S(e), t;
}
function Me(e) {
const t = {
"!": "%21",
"'": "%27",
"(": "%28",
")": "%29",
"~": "%7E",
"%20": "+",
"%00": "\0"
};
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
return t[r];
});
}
function we(e, t) {
this._pairs = [], e && le(e, this, t);
}
const st = we.prototype;
st.append = function(t, n) {
this._pairs.push([t, n]);
};
st.toString = function(t) {
const n = t ? function(r) {
return t.call(this, r, Me);
} : Me;
return this._pairs.map(function(o) {
return n(o[0]) + "=" + n(o[1]);
}, "").join("&");
};
function pn(e) {
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
}
function at(e, t, n) {
if (!t)
return e;
const r = n && n.encode || pn;
i.isFunction(n) && (n = {
serialize: n
});
const o = n && n.serialize;
let a;
if (o ? a = o(t, n) : a = i.isURLSearchParams(t) ? t.toString() : new we(t, n).toString(r), a) {
const s = e.indexOf("#");
s !== -1 && (e = e.slice(0, s)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
}
return e;
}
class Pe {
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 {void}
*/
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) {
i.forEach(this.handlers, function(r) {
r !== null && t(r);
});
}
}
const it = {
silentJSONParsing: !0,
forcedJSONParsing: !0,
clarifyTimeoutError: !1
}, mn = typeof URLSearchParams < "u" ? URLSearchParams : we, hn = typeof FormData < "u" ? FormData : null, yn = typeof Blob < "u" ? Blob : null, gn = {
isBrowser: !0,
classes: {
URLSearchParams: mn,
FormData: hn,
Blob: yn
},
protocols: ["http", "https", "file", "blob", "url", "data"]
}, Se = typeof window < "u" && typeof document < "u", be = typeof navigator == "object" && navigator || void 0, bn = Se && (!be || ["ReactNative", "NativeScript", "NS"].indexOf(be.product) < 0), xn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Tn = Se && window.location.href || "http://localhost", wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
hasBrowserEnv: Se,
hasStandardBrowserEnv: bn,
hasStandardBrowserWebWorkerEnv: xn,
navigator: be,
origin: Tn
}, Symbol.toStringTag, { value: "Module" })), E = {
...wn,
...gn
};
function Sn(e, t) {
return le(e, new E.classes.URLSearchParams(), {
visitor: function(n, r, o, a) {
return E.isNode && i.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
},
...t
});
}
function En(e) {
return i.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
}
function Cn(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 lt(e) {
function t(n, r, o, a) {
let s = n[a++];
if (s === "__proto__") return !0;
const l = Number.isFinite(+s), f = a >= n.length;
return s = !s && i.isArray(o) ? o.length : s, f ? (i.hasOwnProp(o, s) ? o[s] = [o[s], r] : o[s] = r, !l) : ((!o[s] || !i.isObject(o[s])) && (o[s] = []), t(n, r, o[s], a) && i.isArray(o[s]) && (o[s] = Cn(o[s])), !l);
}
if (i.isFormData(e) && i.isFunction(e.entries)) {
const n = {};
return i.forEachEntry(e, (r, o) => {
t(En(r), o, n, 0);
}), n;
}
return null;
}
function An(e, t, n) {
if (i.isString(e))
try {
return (t || JSON.parse)(e), i.trim(e);
} catch (r) {
if (r.name !== "SyntaxError")
throw r;
}
return (n || JSON.stringify)(e);
}
const K = {
transitional: it,
adapter: ["xhr", "http", "fetch"],
transformRequest: [function(t, n) {
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, a = i.isObject(t);
if (a && i.isHTMLForm(t) && (t = new FormData(t)), i.isFormData(t))
return o ? JSON.stringify(lt(t)) : t;
if (i.isArrayBuffer(t) || i.isBuffer(t) || i.isStream(t) || i.isFile(t) || i.isBlob(t) || i.isReadableStream(t))
return t;
if (i.isArrayBufferView(t))
return t.buffer;
if (i.isURLSearchParams(t))
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
let l;
if (a) {
if (r.indexOf("application/x-www-form-urlencoded") > -1)
return Sn(t, this.formSerializer).toString();
if ((l = i.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
const f = this.env && this.env.FormData;
return le(
l ? { "files[]": t } : t,
f && new f(),
this.formSerializer
);
}
}
return a || o ? (n.setContentType("application/json", !1), An(t)) : t;
}],
transformResponse: [function(t) {
const n = this.transitional || K.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
if (i.isResponse(t) || i.isReadableStream(t))
return t;
if (t && i.isString(t) && (r && !this.responseType || o)) {
const s = !(n && n.silentJSONParsing) && o;
try {
return JSON.parse(t, this.parseReviver);
} catch (l) {
if (s)
throw l.name === "SyntaxError" ? y.from(l, y.ERR_BAD_RESPONSE, this, null, this.response) : l;
}
}
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: E.classes.FormData,
Blob: E.classes.Blob
},
validateStatus: function(t) {
return t >= 200 && t < 300;
},
headers: {
common: {
Accept: "application/json, text/plain, */*",
"Content-Type": void 0
}
}
};
i.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
K.headers[e] = {};
});
const On = i.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"
]), kn = (e) => {
const t = {};
let n, r, o;
return e && e.split(`
`).forEach(function(s) {
o = s.indexOf(":"), n = s.substring(0, o).trim().toLowerCase(), r = s.substring(o + 1).trim(), !(!n || t[n] && On[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
}), t;
}, Ne = Symbol("internals");
function V(e) {
return e && String(e).trim().toLowerCase();
}
function te(e) {
return e === !1 || e == null ? e : i.isArray(e) ? e.map(te) : String(e);
}
function Rn(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 Ln = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
function pe(e, t, n, r, o) {
if (i.isFunction(r))
return r.call(this, t, n);
if (o && (t = n), !!i.isString(t)) {
if (i.isString(r))
return t.indexOf(r) !== -1;
if (i.isRegExp(r))
return r.test(t);
}
}
function Dn(e) {
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
}
function vn(e, t) {
const n = i.toCamelCase(" " + t);
["get", "set", "has"].forEach((r) => {
Object.defineProperty(e, r + n, {
value: function(o, a, s) {
return this[r].call(this, t, o, a, s);
},
configurable: !0
});
});
}
let O = class {
constructor(t) {
t && this.set(t);
}
set(t, n, r) {
const o = this;
function a(l, f, d) {
const c = V(f);
if (!c)
throw new Error("header name must be a non-empty string");
const m = i.findKey(o, c);
(!m || o[m] === void 0 || d === !0 || d === void 0 && o[m] !== !1) && (o[m || f] = te(l));
}
const s = (l, f) => i.forEach(l, (d, c) => a(d, c, f));
if (i.isPlainObject(t) || t instanceof this.constructor)
s(t, n);
else if (i.isString(t) && (t = t.trim()) && !Ln(t))
s(kn(t), n);
else if (i.isObject(t) && i.isIterable(t)) {
let l = {}, f, d;
for (const c of t) {
if (!i.isArray(c))
throw TypeError("Object iterator must return a key-value pair");
l[d = c[0]] = (f = l[d]) ? i.isArray(f) ? [...f, c[1]] : [f, c[1]] : c[1];
}
s(l, n);
} else
t != null && a(n, t, r);
return this;
}
get(t, n) {
if (t = V(t), t) {
const r = i.findKey(this, t);
if (r) {
const o = this[r];
if (!n)
return o;
if (n === !0)
return Rn(o);
if (i.isFunction(n))
return n.call(this, o, r);
if (i.isRegExp(n))
return n.exec(o);
throw new TypeError("parser must be boolean|regexp|function");
}
}
}
has(t, n) {
if (t = V(t), t) {
const r = i.findKey(this, t);
return !!(r && this[r] !== void 0 && (!n || pe(this, this[r], r, n)));
}
return !1;
}
delete(t, n) {
const r = this;
let o = !1;
function a(s) {
if (s = V(s), s) {
const l = i.findKey(r, s);
l && (!n || pe(r, r[l], l, n)) && (delete r[l], o = !0);
}
}
return i.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 || pe(this, this[a], a, t, !0)) && (delete this[a], o = !0);
}
return o;
}
normalize(t) {
const n = this, r = {};
return i.forEach(this, (o, a) => {
const s = i.findKey(r, a);
if (s) {
n[s] = te(o), delete n[a];
return;
}
const l = t ? Dn(a) : String(a).trim();
l !== a && delete n[a], n[l] = te(o), r[l] = !0;
}), this;
}
concat(...t) {
return this.constructor.concat(this, ...t);
}
toJSON(t) {
const n = /* @__PURE__ */ Object.create(null);
return i.forEach(this, (r, o) => {
r != null && r !== !1 && (n[o] = t && i.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(`
`);
}
getSetCookie() {
return this.get("set-cookie") || [];
}
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 r = (this[Ne] = this[Ne] = {
accessors: {}
}).accessors, o = this.prototype;
function a(s) {
const l = V(s);
r[l] || (vn(o, s), r[l] = !0);
}
return i.isArray(t) ? t.forEach(a) : a(t), this;
}
};
O.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
i.reduceDescriptors(O.prototype, ({ value: e }, t) => {
let n = t[0].toUpperCase() + t.slice(1);
return {
get: () => e,
set(r) {
this[n] = r;
}
};
});
i.freezeMethods(O);
function me(e, t) {
const n = this || K, r = t || n, o = O.from(r.headers);
let a = r.data;
return i.forEach(e, function(l) {
a = l.call(n, a, o.normalize(), t ? t.status : void 0);
}), o.normalize(), a;
}
function ct(e) {
return !!(e && e.__CANCEL__);
}
function _(e, t, n) {
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
}
i.inherits(_, y, {
__CANCEL__: !0
});
function ut(e, t, n) {
const r = n.config.validateStatus;
!n.status || !r || r(n.status) ? e(n) : t(new y(
"Request failed with status code " + n.status,
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
n.config,
n.request,
n
));
}
function Fn(e) {
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
return t && t[1] || "";
}
function Mn(e, t) {
e = e || 10;
const n = new Array(e), r = new Array(e);
let o = 0, a = 0, s;
return t = t !== void 0 ? t : 1e3, function(f) {
const d = Date.now(), c = r[a];
s || (s = d), n[o] = f, r[o] = d;
let m = a, b = 0;
for (; m !== o; )
b += n[m++], m = m % e;
if (o = (o + 1) % e, o === a && (a = (a + 1) % e), d - s < t)
return;
const S = c && d - c;
return S ? Math.round(b * 1e3 / S) : void 0;
};
}
function Pn(e, t) {
let n = 0, r = 1e3 / t, o, a;
const s = (d, c = Date.now()) => {
n = c, o = null, a && (clearTimeout(a), a = null), e(...d);
};
return [(...d) => {
const c = Date.now(), m = c - n;
m >= r ? s(d, c) : (o = d, a || (a = setTimeout(() => {
a = null, s(o);
}, r - m)));
}, () => o && s(o)];
}
const re = (e, t, n = 3) => {
let r = 0;
const o = Mn(50, 250);
return Pn((a) => {
const s = a.loaded, l = a.lengthComputable ? a.total : void 0, f = s - r, d = o(f), c = s <= l;
r = s;
const m = {
loaded: s,
total: l,
progress: l ? s / l : void 0,
bytes: f,
rate: d || void 0,
estimated: d && l && c ? (l - s) / d : void 0,
event: a,
lengthComputable: l != null,
[t ? "download" : "upload"]: !0
};
e(m);
}, n);
}, Be = (e, t) => {
const n = e != null;
return [(r) => t[0]({
lengthComputable: n,
total: e,
loaded: r
}), t[1]];
}, qe = (e) => (...t) => i.asap(() => e(...t)), Nn = E.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, E.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
new URL(E.origin),
E.navigator && /(msie|trident)/i.test(E.navigator.userAgent)
) : () => !0, Bn = E.hasStandardBrowserEnv ? (
// Standard browser envs support document.cookie
{
write(e, t, n, r, o, a, s) {
if (typeof document > "u") return;
const l = [`${e}=${encodeURIComponent(t)}`];
i.isNumber(n) && l.push(`expires=${new Date(n).toUTCString()}`), i.isString(r) && l.push(`path=${r}`), i.isString(o) && l.push(`domain=${o}`), a === !0 && l.push("secure"), i.isString(s) && l.push(`SameSite=${s}`), document.cookie = l.join("; ");
},
read(e) {
if (typeof document > "u") return null;
const t = document.cookie.match(new RegExp("(?:^|; )" + e + "=([^;]*)"));
return t ? decodeURIComponent(t[1]) : 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 qn(e) {
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
}
function Un(e, t) {
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
}
function dt(e, t, n) {
let r = !qn(t);
return e && (r || n == !1) ? Un(e, t) : t;
}
const Ue = (e) => e instanceof O ? { ...e } : e;
function $(e, t) {
t = t || {};
const n = {};
function r(d, c, m, b) {
return i.isPlainObject(d) && i.isPlainObject(c) ? i.merge.call({ caseless: b }, d, c) : i.isPlainObject(c) ? i.merge({}, c) : i.isArray(c) ? c.slice() : c;
}
function o(d, c, m, b) {
if (i.isUndefined(c)) {
if (!i.isUndefined(d))
return r(void 0, d, m, b);
} else return r(d, c, m, b);
}
function a(d, c) {
if (!i.isUndefined(c))
return r(void 0, c);
}
function s(d, c) {
if (i.isUndefined(c)) {
if (!i.isUndefined(d))
return r(void 0, d);
} else return r(void 0, c);
}
function l(d, c, m) {
if (m in t)
return r(d, c);
if (m in e)
return r(void 0, d);
}
const f = {
url: a,
method: a,
data: a,
baseURL: s,
transformRequest: s,
transformResponse: s,
paramsSerializer: s,
timeout: s,
timeoutMessage: s,
withCredentials: s,
withXSRFToken: s,
adapter: s,
responseType: s,
xsrfCookieName: s,
xsrfHeaderName: s,
onUploadProgress: s,
onDownloadProgress: s,
decompress: s,
maxContentLength: s,
maxBodyLength: s,
beforeRedirect: s,
transport: s,
httpAgent: s,
httpsAgent: s,
cancelToken: s,
socketPath: s,
responseEncoding: s,
validateStatus: l,
headers: (d, c, m) => o(Ue(d), Ue(c), m, !0)
};
return i.forEach(Object.keys({ ...e, ...t }), function(c) {
const m = f[c] || o, b = m(e[c], t[c], c);
i.isUndefined(b) && m !== l || (n[c] = b);
}), n;
}
const ft = (e) => {
const t = $({}, e);
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: s, auth: l } = t;
if (t.headers = s = O.from(s), t.url = at(dt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && s.set(
"Authorization",
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
), i.isFormData(n)) {
if (E.hasStandardBrowserEnv || E.hasStandardBrowserWebWorkerEnv)
s.setContentType(void 0);
else if (i.isFunction(n.getHeaders)) {
const f = n.getHeaders(), d = ["content-type", "content-length"];
Object.entries(f).forEach(([c, m]) => {
d.includes(c.toLowerCase()) && s.set(c, m);
});
}
}
if (E.hasStandardBrowserEnv && (r && i.isFunction(r) && (r = r(t)), r || r !== !1 && Nn(t.url))) {
const f = o && a && Bn.read(a);
f && s.set(o, f);
}
return t;
}, $n = typeof XMLHttpRequest < "u", In = $n && function(e) {
return new Promise(function(n, r) {
const o = ft(e);
let a = o.data;
const s = O.from(o.headers).normalize();
let { responseType: l, onUploadProgress: f, onDownloadProgress: d } = o, c, m, b, S, u;
function h() {
S && S(), u && u(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
}
let p = new XMLHttpRequest();
p.open(o.method.toUpperCase(), o.url, !0), p.timeout = o.timeout;
function T() {
if (!p)
return;
const w = O.from(
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
), L = {
data: !l || l === "text" || l === "json" ? p.responseText : p.response,
status: p.status,
statusText: p.statusText,
headers: w,
config: e,
request: p
};
ut(function(R) {
n(R), h();
}, function(R) {
r(R), h();
}, L), p = null;
}
"onloadend" in p ? p.onloadend = T : p.onreadystatechange = function() {
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(T);
}, p.onabort = function() {
p && (r(new y("Request aborted", y.ECONNABORTED, e, p)), p = null);
}, p.onerror = function(C) {
const L = C && C.message ? C.message : "Network Error", N = new y(L, y.ERR_NETWORK, e, p);
N.event = C || null, r(N), p = null;
}, p.ontimeout = function() {
let C = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
const L = o.transitional || it;
o.timeoutErrorMessage && (C = o.timeoutErrorMessage), r(new y(
C,
L.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
e,
p
)), p = null;
}, a === void 0 && s.setContentType(null), "setRequestHeader" in p && i.forEach(s.toJSON(), function(C, L) {
p.setRequestHeader(L, C);
}), i.isUndefined(o.withCredentials) || (p.withCredentials = !!o.withCredentials), l && l !== "json" && (p.responseType = o.responseType), d && ([b, u] = re(d, !0), p.addEventListener("progress", b)), f && p.upload && ([m, S] = re(f), p.upload.addEventListener("progress", m), p.upload.addEventListener("loadend", S)), (o.cancelToken || o.signal) && (c = (w) => {
p && (r(!w || w.type ? new _(null, e, p) : w), p.abort(), p = null);
}, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
const k = Fn(o.url);
if (k && E.protocols.indexOf(k) === -1) {
r(new y("Unsupported protocol " + k + ":", y.ERR_BAD_REQUEST, e));
return;
}
p.send(a || null);
});
}, Wn = (e, t) => {
const { length: n } = e = e ? e.filter(Boolean) : [];
if (t || n) {
let r = new AbortController(), o;
const a = function(d) {
if (!o) {
o = !0, l();
const c = d instanceof Error ? d : this.reason;
r.abort(c instanceof y ? c : new _(c instanceof Error ? c.message : c));
}
};
let s = t && setTimeout(() => {
s = null, a(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
}, t);
const l = () => {
e && (s && clearTimeout(s), s = null, e.forEach((d) => {
d.unsubscribe ? d.unsubscribe(a) : d.removeEventListener("abort", a);
}), e = null);
};
e.forEach((d) => d.addEventListener("abort", a));
const { signal: f } = r;
return f.unsubscribe = () => i.asap(l), f;
}
}, jn = 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;
}, _n = async function* (e, t) {
for await (const n of Hn(e))
yield* jn(n, t);
}, Hn = async function* (e) {
if (e[Symbol.asyncIterator]) {
yield* e;
return;
}
const t = e.getReader();
try {
for (; ; ) {
const { done: n, value: r } = await t.read();
if (n)
break;
yield r;
}
} finally {
await t.cancel();
}
}, $e = (e, t, n, r) => {
const o = _n(e, t);
let a = 0, s, l = (f) => {
s || (s = !0, r && r(f));
};
return new ReadableStream({
async pull(f) {
try {
const { done: d, value: c } = await o.next();
if (d) {
l(), f.close();
return;
}
let m = c.byteLength;
if (n) {
let b = a += m;
n(b);
}
f.enqueue(new Uint8Array(c));
} catch (d) {
throw l(d), d;
}
},
cancel(f) {
return l(f), o.return();
}
}, {
highWaterMark: 2
});
}, Ie = 64 * 1024, { isFunction: Z } = i, Vn = (({ Request: e, Response: t }) => ({
Request: e,
Response: t
}))(i.global), {
ReadableStream: We,
TextEncoder: je
} = i.global, _e = (e, ...t) => {
try {
return !!e(...t);
} catch {
return !1;
}
}, zn = (e) => {
e = i.merge.call({
skipUndefined: !0
}, Vn, e);
const { fetch: t, Request: n, Response: r } = e, o = t ? Z(t) : typeof fetch == "function", a = Z(n), s = Z(r);
if (!o)
return !1;
const l = o && Z(We), f = o && (typeof je == "function" ? /* @__PURE__ */ ((u) => (h) => u.encode(h))(new je()) : async (u) => new Uint8Array(await new n(u).arrayBuffer())), d = a && l && _e(() => {
let u = !1;
const h = new n(E.origin, {
body: new We(),
method: "POST",
get duplex() {
return u = !0, "half";
}
}).headers.has("Content-Type");
return u && !h;
}), c = s && l && _e(() => i.isReadableStream(new r("").body)), m = {
stream: c && ((u) => u.body)
};
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
!m[u] && (m[u] = (h, p) => {
let T = h && h[u];
if (T)
return T.call(h);
throw new y(`Response type '${u}' is not supported`, y.ERR_NOT_SUPPORT, p);
});
});
const b = async (u) => {
if (u == null)
return 0;
if (i.isBlob(u))
return u.size;
if (i.isSpecCompliantForm(u))
return (await new n(E.origin, {
method: "POST",
body: u
}).arrayBuffer()).byteLength;
if (i.isArrayBufferView(u) || i.isArrayBuffer(u))
return u.byteLength;
if (i.isURLSearchParams(u) && (u = u + ""), i.isString(u))
return (await f(u)).byteLength;
}, S = async (u, h) => {
const p = i.toFiniteNumber(u.getContentLength());
return p ?? b(h);
};
return async (u) => {
let {
url: h,
method: p,
data: T,
signal: k,
cancelToken: w,
timeout: C,
onDownloadProgress: L,
onUploadProgress: N,
responseType: R,
headers: ue,
withCredentials: G = "same-origin",
fetchOptions: Ce
} = ft(u), Ae = t || fetch;
R = R ? (R + "").toLowerCase() : "text";
let Q = Wn([k, w && w.toAbortSignal()], C), H = null;
const B = Q && Q.unsubscribe && (() => {
Q.unsubscribe();
});
let Oe;
try {
if (N && d && p !== "get" && p !== "head" && (Oe = await S(ue, T)) !== 0) {
let P = new n(h, {
method: "POST",
body: T,
duplex: "half"
}), I;
if (i.isFormData(T) && (I = P.headers.get("content-type")) && ue.setContentType(I), P.body) {
const [de, X] = Be(
Oe,
re(qe(N))
);
T = $e(P.body, Ie, de, X);
}
}
i.isString(G) || (G = G ? "include" : "omit");
const v = a && "credentials" in n.prototype, ke = {
...Ce,
signal: Q,
method: p.toUpperCase(),
headers: ue.normalize().toJSON(),
body: T,
duplex: "half",
credentials: v ? G : void 0
};
H = a && new n(h, ke);
let M = await (a ? Ae(H, Ce) : Ae(h, ke));
const Re = c && (R === "stream" || R === "response");
if (c && (L || Re && B)) {
const P = {};
["status", "statusText", "headers"].forEach((Le) => {
P[Le] = M[Le];
});
const I = i.toFiniteNumber(M.headers.get("content-length")), [de, X] = L && Be(
I,
re(qe(L), !0)
) || [];
M = new r(
$e(M.body, Ie, de, () => {
X && X(), B && B();
}),
P
);
}
R = R || "text";
let bt = await m[i.findKey(m, R) || "text"](M, u);
return !Re && B && B(), await new Promise((P, I) => {
ut(P, I, {
data: bt,
headers: O.from(M.headers),
status: M.status,
statusText: M.statusText,
config: u,
request: H
});
});
} catch (v) {
throw B && B(), v && v.name === "TypeError" && /Load failed|fetch/i.test(v.message) ? Object.assign(
new y("Network Error", y.ERR_NETWORK, u, H),
{
cause: v.cause || v
}
) : y.from(v, v && v.code, u, H);
}
};
}, Jn = /* @__PURE__ */ new Map(), pt = (e) => {
let t = e && e.env || {};
const { fetch: n, Request: r, Response: o } = t, a = [
r,
o,
n
];
let s = a.length, l = s, f, d, c = Jn;
for (; l--; )
f = a[l], d = c.get(f), d === void 0 && c.set(f, d = l ? /* @__PURE__ */ new Map() : zn(t)), c = d;
return d;
};
pt();
const Ee = {
http: un,
xhr: In,
fetch: {
get: pt
}
};
i.forEach(Ee, (e, t) => {
if (e) {
try {
Object.defineProperty(e, "name", { value: t });
} catch {
}
Object.defineProperty(e, "adapterName", { value: t });
}
});
const He = (e) => `- ${e}`, Yn = (e) => i.isFunction(e) || e === null || e === !1;
function Kn(e, t) {
e = i.isArray(e) ? e : [e];
const { length: n } = e;
let r, o;
const a = {};
for (let s = 0; s < n; s++) {
r = e[s];
let l;
if (o = r, !Yn(r) && (o = Ee[(l = String(r)).toLowerCase()], o === void 0))
throw new y(`Unknown adapter '${l}'`);
if (o && (i.isFunction(o) || (o = o.get(t))))
break;
a[l || "#" + s] = o;
}
if (!o) {
const s = Object.entries(a).map(
([f, d]) => `adapter ${f} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
);
let l = n ? s.length > 1 ? `since :
` + s.map(He).join(`
`) : " " + He(s[0]) : "as no adapter specified";
throw new y(
"There is no suitable adapter to dispatch the request " + l,
"ERR_NOT_SUPPORT"
);
}
return o;
}
const mt = {
/**
* Resolve an adapter from a list of adapter names or functions.
* @type {Function}
*/
getAdapter: Kn,
/**
* Exposes all known adapters
* @type {Object<string, Function|Object>}
*/
adapters: Ee
};
function he(e) {
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
throw new _(null, e);
}
function Ve(e) {
return he(e), e.headers = O.from(e.headers), e.data = me.call(
e,
e.transformRequest
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), mt.getAdapter(e.adapter || K.adapter, e)(e).then(function(r) {
return he(e), r.data = me.call(
e,
e.transformResponse,
r
), r.headers = O.from(r.headers), r;
}, function(r) {
return ct(r) || (he(e), r && r.response && (r.response.data = me.call(
e,
e.transformResponse,
r.response
), r.response.headers = O.from(r.response.headers))), Promise.reject(r);
});
}
const ht = "1.13.2", ce = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
ce[e] = function(r) {
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
};
});
const ze = {};
ce.transitional = function(t, n, r) {
function o(a, s) {
return "[Axios v" + ht + "] Transitional option '" + a + "'" + s + (r ? ". " + r : "");
}
return (a, s, l) => {
if (t === !1)
throw new y(
o(s, " has been removed" + (n ? " in " + n : "")),
y.ERR_DEPRECATED
);
return n && !ze[s] && (ze[s] = !0, console.warn(
o(
s,
" has been deprecated since v" + n + " and will be removed in the near future"
)
)), t ? t(a, s, l) : !0;
};
};
ce.spelling = function(t) {
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
};
function Gn(e, t, n) {
if (typeof e != "object")
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
const r = Object.keys(e);
let o = r.length;
for (; o-- > 0; ) {
const a = r[o], s = t[a];
if (s) {
const l = e[a], f = l === void 0 || s(l, a, e);
if (f !== !0)
throw new y("option " + a + " must be " + f, y.ERR_BAD_OPTION_VALUE);
continue;
}
if (n !== !0)
throw new y("Unknown option " + a, y.ERR_BAD_OPTION);
}
}
const ne = {
assertOptions: Gn,
validators: ce
}, F = ne.validators;
let U = class {
constructor(t) {
this.defaults = t || {}, this.interceptors = {
request: new Pe(),
response: new Pe()
};
}
/**
* 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 = $(this.defaults, n);
const { transitional: r, paramsSerializer: o, headers: a } = n;
r !== void 0 && ne.assertOptions(r, {
silentJSONParsing: F.transitional(F.boolean),
forcedJSONParsing: F.transitional(F.boolean),
clarifyTimeoutError: F.transitional(F.boolean)
}, !1), o != null && (i.isFunction(o) ? n.paramsSerializer = {
serialize: o
} : ne.assertOptions(o, {
encode: F.function,
serialize: F.function
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ne.assertOptions(n, {
baseUrl: F.spelling("baseURL"),
withXsrfToken: F.spelling("withXSRFToken")
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
let s = a && i.merge(
a.common,
a[n.method]
);
a && i.forEach(
["delete", "get", "head", "post", "put", "patch", "common"],
(u) => {
delete a[u];
}
), n.headers = O.concat(s, a);
const l = [];
let f = !0;
this.interceptors.request.forEach(function(h) {
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (f = f && h.synchronous, l.unshift(h.fulfilled, h.rejected));
});
const d = [];
this.interceptors.response.forEach(function(h) {
d.push(h.fulfilled, h.rejected);
});
let c, m = 0, b;
if (!f) {
const u = [Ve.bind(this), void 0];
for (u.unshift(...l), u.push(...d), b = u.length, c = Promise.resolve(n); m < b; )
c = c.then(u[m++], u[m++]);
return c;
}
b = l.length;
let S = n;
for (; m < b; ) {
const u = l[m++], h = l[m++];
try {
S = u(S);
} catch (p) {
h.call(this, p);
break;
}
}
try {
c = Ve.call(this, S);
} catch (u) {
return Promise.reject(u);
}
for (m = 0, b = d.length; m < b; )
c = c.then(d[m++], d[m++]);
return c;
}
getUri(t) {
t = $(this.defaults, t);
const n = dt(t.baseURL, t.url, t.allowAbsoluteUrls);
return at(n, t.params, t.paramsSerializer);
}
};
i.forEach(["delete", "get", "head", "options"], function(t) {
U.prototype[t] = function(n, r) {
return this.request($(r || {}, {
method: t,
url: n,
data: (r || {}).data
}));
};
});
i.forEach(["post", "put", "patch"], function(t) {
function n(r) {
return function(a, s, l) {
return this.request($(l || {}, {
method: t,
headers: r ? {
"Content-Type": "multipart/form-data"
} : {},
url: a,
data: s
}));
};
}
U.prototype[t] = n(), U.prototype[t + "Form"] = n(!0);
});
let Qn = class yt {
constructor(t) {
if (typeof t != "function")
throw new TypeError("executor must be a function.");
let n;
this.promise = new Promise(function(a) {
n = a;
});
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 s = new Promise((l) => {
r.subscribe(l), a = l;
}).then(o);
return s.cancel = function() {
r.unsubscribe(a);
}, s;
}, t(function(a, s, l) {
r.reason || (r.reason = new _(a, s, l), 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];
}
/**
* 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 = (r) => {
t.abort(r);
};
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 yt(function(o) {
t = o;
}),
cancel: t
};
}
};
function Xn(e) {
return function(n) {
return e.apply(null, n);
};
}
function Zn(e) {
return i.isObject(e) && e.isAxiosError === !0;
}
const xe = {
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,
ProxyA