1471 lines
74 KiB
JavaScript
1471 lines
74 KiB
JavaScript
function ie(t, e) {
|
|
return function() {
|
|
return t.apply(e, arguments);
|
|
};
|
|
}
|
|
const { toString: Te } = Object.prototype, { getPrototypeOf: Pt } = Object, nt = (ut = /* @__PURE__ */ Object.create(null), (t) => {
|
|
const e = Te.call(t);
|
|
return ut[e] || (ut[e] = e.slice(8, -1).toLowerCase());
|
|
});
|
|
var ut;
|
|
const k = (t) => (t = t.toLowerCase(), (e) => nt(e) === t), at = (t) => (e) => typeof e === t, { isArray: W } = Array, $ = at("undefined"), jt = k("ArrayBuffer"), Ce = at("string"), N = at("function"), kt = at("number"), Y = (t) => t !== null && typeof t == "object", Z = (t) => {
|
|
if (nt(t) !== "object") return !1;
|
|
const e = Pt(t);
|
|
return !(e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null || Symbol.toStringTag in t || Symbol.iterator in t);
|
|
}, Pe = k("Date"), _e = k("File"), xe = k("Blob"), Ue = k("FileList"), Ne = k("URLSearchParams"), [je, ke, Be, Le] = ["ReadableStream", "Request", "Response", "Headers"].map(k);
|
|
function V(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
if (t == null) return;
|
|
let n, s;
|
|
if (typeof t != "object" && (t = [t]), W(t)) for (n = 0, s = t.length; n < s; n++) e.call(null, t[n], n, t);
|
|
else {
|
|
const c = r ? Object.getOwnPropertyNames(t) : Object.keys(t), i = c.length;
|
|
let g;
|
|
for (n = 0; n < i; n++) g = c[n], e.call(null, t[g], g, t);
|
|
}
|
|
}
|
|
function Bt(t, e) {
|
|
e = e.toLowerCase();
|
|
const r = Object.keys(t);
|
|
let n, s = r.length;
|
|
for (; s-- > 0; ) if (n = r[s], e === n.toLowerCase()) return n;
|
|
return null;
|
|
}
|
|
const ae = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Lt = (t) => !$(t) && t !== ae, Fe = (lt = typeof Uint8Array < "u" && Pt(Uint8Array), (t) => lt && t instanceof lt);
|
|
var lt;
|
|
const De = k("HTMLFormElement"), Ft = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Me = k("RegExp"), Dt = (t, e) => {
|
|
const r = Object.getOwnPropertyDescriptors(t), n = {};
|
|
V(r, (s, c) => {
|
|
let i;
|
|
(i = e(s, c, t)) !== !1 && (n[c] = i || s);
|
|
}), Object.defineProperties(t, n);
|
|
}, ft = "abcdefghijklmnopqrstuvwxyz", Mt = "0123456789", qt = { DIGIT: Mt, ALPHA: ft, ALPHA_DIGIT: ft + ft.toUpperCase() + Mt }, qe = k("AsyncFunction"), m = { isArray: W, isArrayBuffer: jt, isBuffer: function(t) {
|
|
return t !== null && !$(t) && t.constructor !== null && !$(t.constructor) && N(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
}, isFormData: (t) => {
|
|
let e;
|
|
return t && (typeof FormData == "function" && t instanceof FormData || N(t.append) && ((e = nt(t)) === "formdata" || e === "object" && N(t.toString) && t.toString() === "[object FormData]"));
|
|
}, isArrayBufferView: function(t) {
|
|
let e;
|
|
return e = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(t) : t && t.buffer && jt(t.buffer), e;
|
|
}, isString: Ce, isNumber: kt, isBoolean: (t) => t === !0 || t === !1, isObject: Y, isPlainObject: Z, isReadableStream: je, isRequest: ke, isResponse: Be, isHeaders: Le, isUndefined: $, isDate: Pe, isFile: _e, isBlob: xe, isRegExp: Me, isFunction: N, isStream: (t) => Y(t) && N(t.pipe), isURLSearchParams: Ne, isTypedArray: Fe, isFileList: Ue, forEach: V, merge: function t() {
|
|
const { caseless: e } = Lt(this) && this || {}, r = {}, n = (s, c) => {
|
|
const i = e && Bt(r, c) || c;
|
|
Z(r[i]) && Z(s) ? r[i] = t(r[i], s) : Z(s) ? r[i] = t({}, s) : W(s) ? r[i] = s.slice() : r[i] = s;
|
|
};
|
|
for (let s = 0, c = arguments.length; s < c; s++) arguments[s] && V(arguments[s], n);
|
|
return r;
|
|
}, extend: (t, e, r, { allOwnKeys: n } = {}) => (V(e, (s, c) => {
|
|
r && N(s) ? t[c] = ie(s, r) : t[c] = s;
|
|
}, { allOwnKeys: n }), t), trim: (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""), stripBOM: (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), inherits: (t, e, r, n) => {
|
|
t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", { value: e.prototype }), r && Object.assign(t.prototype, r);
|
|
}, toFlatObject: (t, e, r, n) => {
|
|
let s, c, i;
|
|
const g = {};
|
|
if (e = e || {}, t == null) return e;
|
|
do {
|
|
for (s = Object.getOwnPropertyNames(t), c = s.length; c-- > 0; ) i = s[c], n && !n(i, t, e) || g[i] || (e[i] = t[i], g[i] = !0);
|
|
t = r !== !1 && Pt(t);
|
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
return e;
|
|
}, kindOf: nt, kindOfTest: k, endsWith: (t, e, r) => {
|
|
t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
|
|
const n = t.indexOf(e, r);
|
|
return n !== -1 && n === r;
|
|
}, toArray: (t) => {
|
|
if (!t) return null;
|
|
if (W(t)) return t;
|
|
let e = t.length;
|
|
if (!kt(e)) return null;
|
|
const r = new Array(e);
|
|
for (; e-- > 0; ) r[e] = t[e];
|
|
return r;
|
|
}, forEachEntry: (t, e) => {
|
|
const r = (t && t[Symbol.iterator]).call(t);
|
|
let n;
|
|
for (; (n = r.next()) && !n.done; ) {
|
|
const s = n.value;
|
|
e.call(t, s[0], s[1]);
|
|
}
|
|
}, matchAll: (t, e) => {
|
|
let r;
|
|
const n = [];
|
|
for (; (r = t.exec(e)) !== null; ) n.push(r);
|
|
return n;
|
|
}, isHTMLForm: De, hasOwnProperty: Ft, hasOwnProp: Ft, reduceDescriptors: Dt, freezeMethods: (t) => {
|
|
Dt(t, (e, r) => {
|
|
if (N(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1) return !1;
|
|
const n = t[r];
|
|
N(n) && (e.enumerable = !1, "writable" in e ? e.writable = !1 : e.set || (e.set = () => {
|
|
throw Error("Can not rewrite read-only method '" + r + "'");
|
|
}));
|
|
});
|
|
}, toObjectSet: (t, e) => {
|
|
const r = {}, n = (s) => {
|
|
s.forEach((c) => {
|
|
r[c] = !0;
|
|
});
|
|
};
|
|
return W(t) ? n(t) : n(String(t).split(e)), r;
|
|
}, toCamelCase: (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, r, n) {
|
|
return r.toUpperCase() + n;
|
|
}), noop: () => {
|
|
}, toFiniteNumber: (t, e) => t != null && Number.isFinite(t = +t) ? t : e, findKey: Bt, global: ae, isContextDefined: Lt, ALPHABET: qt, generateString: (t = 16, e = qt.ALPHA_DIGIT) => {
|
|
let r = "";
|
|
const { length: n } = e;
|
|
for (; t--; ) r += e[Math.random() * n | 0];
|
|
return r;
|
|
}, isSpecCompliantForm: function(t) {
|
|
return !!(t && N(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
|
|
}, toJSONObject: (t) => {
|
|
const e = new Array(10), r = (n, s) => {
|
|
if (Y(n)) {
|
|
if (e.indexOf(n) >= 0) return;
|
|
if (!("toJSON" in n)) {
|
|
e[s] = n;
|
|
const c = W(n) ? [] : {};
|
|
return V(n, (i, g) => {
|
|
const y = r(i, s + 1);
|
|
!$(y) && (c[g] = y);
|
|
}), e[s] = void 0, c;
|
|
}
|
|
}
|
|
return n;
|
|
};
|
|
return r(t, 0);
|
|
}, isAsyncFn: qe, isThenable: (t) => t && (Y(t) || N(t)) && N(t.then) && N(t.catch) };
|
|
function A(t, e, r, n, s) {
|
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), n && (this.request = n), s && (this.response = s);
|
|
}
|
|
m.inherits(A, Error, { toJSON: function() {
|
|
return { message: this.message, name: this.name, description: this.description, number: this.number, fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, config: m.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null };
|
|
} });
|
|
const It = A.prototype, Wt = {};
|
|
["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"].forEach((t) => {
|
|
Wt[t] = { value: t };
|
|
}), Object.defineProperties(A, Wt), Object.defineProperty(It, "isAxiosError", { value: !0 }), A.from = (t, e, r, n, s, c) => {
|
|
const i = Object.create(It);
|
|
return m.toFlatObject(t, i, function(g) {
|
|
return g !== Error.prototype;
|
|
}, (g) => g !== "isAxiosError"), A.call(i, t.message, e, r, n, s), i.cause = t, i.name = t.name, c && Object.assign(i, c), i;
|
|
};
|
|
function ht(t) {
|
|
return m.isPlainObject(t) || m.isArray(t);
|
|
}
|
|
function ce(t) {
|
|
return m.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
}
|
|
function zt(t, e, r) {
|
|
return t ? t.concat(e).map(function(n, s) {
|
|
return n = ce(n), !r && s ? "[" + n + "]" : n;
|
|
}).join(r ? "." : "") : e;
|
|
}
|
|
const Ie = m.toFlatObject(m, {}, null, function(t) {
|
|
return /^is[A-Z]/.test(t);
|
|
});
|
|
function ot(t, e, r) {
|
|
if (!m.isObject(t)) throw new TypeError("target must be an object");
|
|
e = e || new FormData();
|
|
const n = (r = m.toFlatObject(r, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(v, E) {
|
|
return !m.isUndefined(E[v]);
|
|
})).metaTokens, s = r.visitor || p, c = r.dots, i = r.indexes, g = (r.Blob || typeof Blob < "u" && Blob) && m.isSpecCompliantForm(e);
|
|
if (!m.isFunction(s)) throw new TypeError("visitor must be a function");
|
|
function y(v) {
|
|
if (v === null) return "";
|
|
if (m.isDate(v)) return v.toISOString();
|
|
if (!g && m.isBlob(v)) throw new A("Blob is not supported. Use a Buffer instead.");
|
|
return m.isArrayBuffer(v) || m.isTypedArray(v) ? g && typeof Blob == "function" ? new Blob([v]) : Buffer.from(v) : v;
|
|
}
|
|
function p(v, E, h) {
|
|
let l = v;
|
|
if (v && !h && typeof v == "object") {
|
|
if (m.endsWith(E, "{}")) E = n ? E : E.slice(0, -2), v = JSON.stringify(v);
|
|
else if (m.isArray(v) && function(o) {
|
|
return m.isArray(o) && !o.some(ht);
|
|
}(v) || (m.isFileList(v) || m.endsWith(E, "[]")) && (l = m.toArray(v))) return E = ce(E), l.forEach(function(o, a) {
|
|
!m.isUndefined(o) && o !== null && e.append(i === !0 ? zt([E], a, c) : i === null ? E : E + "[]", y(o));
|
|
}), !1;
|
|
}
|
|
return !!ht(v) || (e.append(zt(h, E, c), y(v)), !1);
|
|
}
|
|
const b = [], w = Object.assign(Ie, { defaultVisitor: p, convertValue: y, isVisitable: ht });
|
|
if (!m.isObject(t)) throw new TypeError("data must be an object");
|
|
return function v(E, h) {
|
|
if (!m.isUndefined(E)) {
|
|
if (b.indexOf(E) !== -1) throw Error("Circular reference detected in " + h.join("."));
|
|
b.push(E), m.forEach(E, function(l, o) {
|
|
(!(m.isUndefined(l) || l === null) && s.call(e, l, m.isString(o) ? o.trim() : o, h, w)) === !0 && v(l, h ? h.concat(o) : [o]);
|
|
}), b.pop();
|
|
}
|
|
}(t), e;
|
|
}
|
|
function Ht(t) {
|
|
const e = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" };
|
|
return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
return e[r];
|
|
});
|
|
}
|
|
function _t(t, e) {
|
|
this._pairs = [], t && ot(t, this, e);
|
|
}
|
|
const Jt = _t.prototype;
|
|
function We(t) {
|
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
}
|
|
function ue(t, e, r) {
|
|
if (!e) return t;
|
|
const n = r && r.encode || We, s = r && r.serialize;
|
|
let c;
|
|
if (c = s ? s(e, r) : m.isURLSearchParams(e) ? e.toString() : new _t(e, r).toString(n), c) {
|
|
const i = t.indexOf("#");
|
|
i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") + c;
|
|
}
|
|
return t;
|
|
}
|
|
Jt.append = function(t, e) {
|
|
this._pairs.push([t, e]);
|
|
}, Jt.toString = function(t) {
|
|
const e = t ? function(r) {
|
|
return t.call(this, r, Ht);
|
|
} : Ht;
|
|
return this._pairs.map(function(r) {
|
|
return e(r[0]) + "=" + e(r[1]);
|
|
}, "").join("&");
|
|
};
|
|
class $t {
|
|
constructor() {
|
|
this.handlers = [];
|
|
}
|
|
use(e, r, n) {
|
|
return this.handlers.push({ fulfilled: e, rejected: r, synchronous: !!n && n.synchronous, runWhen: n ? n.runWhen : null }), this.handlers.length - 1;
|
|
}
|
|
eject(e) {
|
|
this.handlers[e] && (this.handlers[e] = null);
|
|
}
|
|
clear() {
|
|
this.handlers && (this.handlers = []);
|
|
}
|
|
forEach(e) {
|
|
m.forEach(this.handlers, function(r) {
|
|
r !== null && e(r);
|
|
});
|
|
}
|
|
}
|
|
const le = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, ze = { isBrowser: !0, classes: { URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : _t, FormData: typeof FormData < "u" ? FormData : null, Blob: typeof Blob < "u" ? Blob : null }, protocols: ["http", "https", "file", "blob", "url", "data"] }, xt = typeof window < "u" && typeof document < "u", He = (Vt = typeof navigator < "u" && navigator.product, xt && ["ReactNative", "NativeScript", "NS"].indexOf(Vt) < 0);
|
|
var Vt;
|
|
const Je = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", $e = xt && window.location.href || "http://localhost", j = { ...Object.freeze(Object.defineProperty({ __proto__: null, hasBrowserEnv: xt, hasStandardBrowserEnv: He, hasStandardBrowserWebWorkerEnv: Je, origin: $e }, Symbol.toStringTag, { value: "Module" })), ...ze };
|
|
function fe(t) {
|
|
function e(r, n, s, c) {
|
|
let i = r[c++];
|
|
if (i === "__proto__") return !0;
|
|
const g = Number.isFinite(+i), y = c >= r.length;
|
|
return i = !i && m.isArray(s) ? s.length : i, y ? (m.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !g) : (s[i] && m.isObject(s[i]) || (s[i] = []), e(r, n, s[i], c) && m.isArray(s[i]) && (s[i] = function(p) {
|
|
const b = {}, w = Object.keys(p);
|
|
let v;
|
|
const E = w.length;
|
|
let h;
|
|
for (v = 0; v < E; v++) h = w[v], b[h] = p[h];
|
|
return b;
|
|
}(s[i])), !g);
|
|
}
|
|
if (m.isFormData(t) && m.isFunction(t.entries)) {
|
|
const r = {};
|
|
return m.forEachEntry(t, (n, s) => {
|
|
e(function(c) {
|
|
return m.matchAll(/\w+|\[(\w*)]/g, c).map((i) => i[0] === "[]" ? "" : i[1] || i[0]);
|
|
}(n), s, r, 0);
|
|
}), r;
|
|
}
|
|
return null;
|
|
}
|
|
const Q = { transitional: le, adapter: ["xhr", "http", "fetch"], transformRequest: [function(t, e) {
|
|
const r = e.getContentType() || "", n = r.indexOf("application/json") > -1, s = m.isObject(t);
|
|
if (s && m.isHTMLForm(t) && (t = new FormData(t)), m.isFormData(t)) return n ? JSON.stringify(fe(t)) : t;
|
|
if (m.isArrayBuffer(t) || m.isBuffer(t) || m.isStream(t) || m.isFile(t) || m.isBlob(t) || m.isReadableStream(t)) return t;
|
|
if (m.isArrayBufferView(t)) return t.buffer;
|
|
if (m.isURLSearchParams(t)) return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
let c;
|
|
if (s) {
|
|
if (r.indexOf("application/x-www-form-urlencoded") > -1) return function(i, g) {
|
|
return ot(i, new j.classes.URLSearchParams(), Object.assign({ visitor: function(y, p, b, w) {
|
|
return j.isNode && m.isBuffer(y) ? (this.append(p, y.toString("base64")), !1) : w.defaultVisitor.apply(this, arguments);
|
|
} }, g));
|
|
}(t, this.formSerializer).toString();
|
|
if ((c = m.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
const i = this.env && this.env.FormData;
|
|
return ot(c ? { "files[]": t } : t, i && new i(), this.formSerializer);
|
|
}
|
|
}
|
|
return s || n ? (e.setContentType("application/json", !1), function(i, g, y) {
|
|
if (m.isString(i)) try {
|
|
return (g || JSON.parse)(i), m.trim(i);
|
|
} catch (p) {
|
|
if (p.name !== "SyntaxError") throw p;
|
|
}
|
|
return (y || JSON.stringify)(i);
|
|
}(t)) : t;
|
|
}], transformResponse: [function(t) {
|
|
const e = this.transitional || Q.transitional, r = e && e.forcedJSONParsing, n = this.responseType === "json";
|
|
if (m.isResponse(t) || m.isReadableStream(t)) return t;
|
|
if (t && m.isString(t) && (r && !this.responseType || n)) {
|
|
const s = !(e && e.silentJSONParsing) && n;
|
|
try {
|
|
return JSON.parse(t);
|
|
} catch (c) {
|
|
if (s)
|
|
throw c.name === "SyntaxError" ? A.from(c, A.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
}
|
|
}
|
|
return t;
|
|
}], timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: j.classes.FormData, Blob: j.classes.Blob }, validateStatus: function(t) {
|
|
return t >= 200 && t < 300;
|
|
}, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } };
|
|
m.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
Q.headers[t] = {};
|
|
});
|
|
const Ve = m.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"]), Kt = Symbol("internals");
|
|
function J(t) {
|
|
return t && String(t).trim().toLowerCase();
|
|
}
|
|
function tt(t) {
|
|
return t === !1 || t == null ? t : m.isArray(t) ? t.map(tt) : String(t);
|
|
}
|
|
function dt(t, e, r, n, s) {
|
|
return m.isFunction(n) ? n.call(this, e, r) : (s && (e = r), m.isString(e) ? m.isString(n) ? e.indexOf(n) !== -1 : m.isRegExp(n) ? n.test(e) : void 0 : void 0);
|
|
}
|
|
class x {
|
|
constructor(e) {
|
|
e && this.set(e);
|
|
}
|
|
set(e, r, n) {
|
|
const s = this;
|
|
function c(g, y, p) {
|
|
const b = J(y);
|
|
if (!b) throw new Error("header name must be a non-empty string");
|
|
const w = m.findKey(s, b);
|
|
(!w || s[w] === void 0 || p === !0 || p === void 0 && s[w] !== !1) && (s[w || y] = tt(g));
|
|
}
|
|
const i = (g, y) => m.forEach(g, (p, b) => c(p, b, y));
|
|
if (m.isPlainObject(e) || e instanceof this.constructor) i(e, r);
|
|
else if (m.isString(e) && (e = e.trim()) && !/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())) i(((g) => {
|
|
const y = {};
|
|
let p, b, w;
|
|
return g && g.split(`
|
|
`).forEach(function(v) {
|
|
w = v.indexOf(":"), p = v.substring(0, w).trim().toLowerCase(), b = v.substring(w + 1).trim(), !p || y[p] && Ve[p] || (p === "set-cookie" ? y[p] ? y[p].push(b) : y[p] = [b] : y[p] = y[p] ? y[p] + ", " + b : b);
|
|
}), y;
|
|
})(e), r);
|
|
else if (m.isHeaders(e)) for (const [g, y] of e.entries()) c(y, g, n);
|
|
else e != null && c(r, e, n);
|
|
return this;
|
|
}
|
|
get(e, r) {
|
|
if (e = J(e)) {
|
|
const n = m.findKey(this, e);
|
|
if (n) {
|
|
const s = this[n];
|
|
if (!r) return s;
|
|
if (r === !0) return function(c) {
|
|
const i = /* @__PURE__ */ Object.create(null), g = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
let y;
|
|
for (; y = g.exec(c); ) i[y[1]] = y[2];
|
|
return i;
|
|
}(s);
|
|
if (m.isFunction(r)) return r.call(this, s, n);
|
|
if (m.isRegExp(r)) return r.exec(s);
|
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
}
|
|
}
|
|
}
|
|
has(e, r) {
|
|
if (e = J(e)) {
|
|
const n = m.findKey(this, e);
|
|
return !(!n || this[n] === void 0 || r && !dt(0, this[n], n, r));
|
|
}
|
|
return !1;
|
|
}
|
|
delete(e, r) {
|
|
const n = this;
|
|
let s = !1;
|
|
function c(i) {
|
|
if (i = J(i)) {
|
|
const g = m.findKey(n, i);
|
|
!g || r && !dt(0, n[g], g, r) || (delete n[g], s = !0);
|
|
}
|
|
}
|
|
return m.isArray(e) ? e.forEach(c) : c(e), s;
|
|
}
|
|
clear(e) {
|
|
const r = Object.keys(this);
|
|
let n = r.length, s = !1;
|
|
for (; n--; ) {
|
|
const c = r[n];
|
|
e && !dt(0, this[c], c, e, !0) || (delete this[c], s = !0);
|
|
}
|
|
return s;
|
|
}
|
|
normalize(e) {
|
|
const r = this, n = {};
|
|
return m.forEach(this, (s, c) => {
|
|
const i = m.findKey(n, c);
|
|
if (i) return r[i] = tt(s), void delete r[c];
|
|
const g = e ? function(y) {
|
|
return y.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (p, b, w) => b.toUpperCase() + w);
|
|
}(c) : String(c).trim();
|
|
g !== c && delete r[c], r[g] = tt(s), n[g] = !0;
|
|
}), this;
|
|
}
|
|
concat(...e) {
|
|
return this.constructor.concat(this, ...e);
|
|
}
|
|
toJSON(e) {
|
|
const r = /* @__PURE__ */ Object.create(null);
|
|
return m.forEach(this, (n, s) => {
|
|
n != null && n !== !1 && (r[s] = e && m.isArray(n) ? n.join(", ") : n);
|
|
}), r;
|
|
}
|
|
[Symbol.iterator]() {
|
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
}
|
|
toString() {
|
|
return Object.entries(this.toJSON()).map(([e, r]) => e + ": " + r).join(`
|
|
`);
|
|
}
|
|
get [Symbol.toStringTag]() {
|
|
return "AxiosHeaders";
|
|
}
|
|
static from(e) {
|
|
return e instanceof this ? e : new this(e);
|
|
}
|
|
static concat(e, ...r) {
|
|
const n = new this(e);
|
|
return r.forEach((s) => n.set(s)), n;
|
|
}
|
|
static accessor(e) {
|
|
const r = (this[Kt] = this[Kt] = { accessors: {} }).accessors, n = this.prototype;
|
|
function s(c) {
|
|
const i = J(c);
|
|
r[i] || (function(g, y) {
|
|
const p = m.toCamelCase(" " + y);
|
|
["get", "set", "has"].forEach((b) => {
|
|
Object.defineProperty(g, b + p, { value: function(w, v, E) {
|
|
return this[b].call(this, y, w, v, E);
|
|
}, configurable: !0 });
|
|
});
|
|
}(n, c), r[i] = !0);
|
|
}
|
|
return m.isArray(e) ? e.forEach(s) : s(e), this;
|
|
}
|
|
}
|
|
function pt(t, e) {
|
|
const r = this || Q, n = e || r, s = x.from(n.headers);
|
|
let c = n.data;
|
|
return m.forEach(t, function(i) {
|
|
c = i.call(r, c, s.normalize(), e ? e.status : void 0);
|
|
}), s.normalize(), c;
|
|
}
|
|
function he(t) {
|
|
return !(!t || !t.__CANCEL__);
|
|
}
|
|
function H(t, e, r) {
|
|
A.call(this, t ?? "canceled", A.ERR_CANCELED, e, r), this.name = "CanceledError";
|
|
}
|
|
function de(t, e, r) {
|
|
const n = r.config.validateStatus;
|
|
r.status && n && !n(r.status) ? e(new A("Request failed with status code " + r.status, [A.ERR_BAD_REQUEST, A.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4], r.config, r.request, r)) : t(r);
|
|
}
|
|
x.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]), m.reduceDescriptors(x.prototype, ({ value: t }, e) => {
|
|
let r = e[0].toUpperCase() + e.slice(1);
|
|
return { get: () => t, set(n) {
|
|
this[r] = n;
|
|
} };
|
|
}), m.freezeMethods(x), m.inherits(H, A, { __CANCEL__: !0 });
|
|
const st = (t, e, r = 3) => {
|
|
let n = 0;
|
|
const s = function(c, i) {
|
|
c = c || 10;
|
|
const g = new Array(c), y = new Array(c);
|
|
let p, b = 0, w = 0;
|
|
return i = i !== void 0 ? i : 1e3, function(v) {
|
|
const E = Date.now(), h = y[w];
|
|
p || (p = E), g[b] = v, y[b] = E;
|
|
let l = w, o = 0;
|
|
for (; l !== b; ) o += g[l++], l %= c;
|
|
if (b = (b + 1) % c, b === w && (w = (w + 1) % c), E - p < i) return;
|
|
const a = h && E - h;
|
|
return a ? Math.round(1e3 * o / a) : void 0;
|
|
};
|
|
}(50, 250);
|
|
return function(c, i) {
|
|
let g = 0;
|
|
const y = 1e3 / i;
|
|
let p = null;
|
|
return function() {
|
|
const b = this === !0, w = Date.now();
|
|
if (b || w - g > y) return p && (clearTimeout(p), p = null), g = w, c.apply(null, arguments);
|
|
p || (p = setTimeout(() => (p = null, g = Date.now(), c.apply(null, arguments)), y - (w - g)));
|
|
};
|
|
}((c) => {
|
|
const i = c.loaded, g = c.lengthComputable ? c.total : void 0, y = i - n, p = s(y);
|
|
n = i;
|
|
const b = { loaded: i, total: g, progress: g ? i / g : void 0, bytes: y, rate: p || void 0, estimated: p && g && i <= g ? (g - i) / p : void 0, event: c, lengthComputable: g != null };
|
|
b[e ? "download" : "upload"] = !0, t(b);
|
|
}, r);
|
|
}, Ke = j.hasStandardBrowserEnv ? function() {
|
|
const t = /(msie|trident)/i.test(navigator.userAgent), e = document.createElement("a");
|
|
let r;
|
|
function n(s) {
|
|
let c = s;
|
|
return t && (e.setAttribute("href", c), c = e.href), e.setAttribute("href", c), { href: e.href, protocol: e.protocol ? e.protocol.replace(/:$/, "") : "", host: e.host, search: e.search ? e.search.replace(/^\?/, "") : "", hash: e.hash ? e.hash.replace(/^#/, "") : "", hostname: e.hostname, port: e.port, pathname: e.pathname.charAt(0) === "/" ? e.pathname : "/" + e.pathname };
|
|
}
|
|
return r = n(window.location.href), function(s) {
|
|
const c = m.isString(s) ? n(s) : s;
|
|
return c.protocol === r.protocol && c.host === r.host;
|
|
};
|
|
}() : function() {
|
|
return !0;
|
|
}, Ge = j.hasStandardBrowserEnv ? { write(t, e, r, n, s, c) {
|
|
const i = [t + "=" + encodeURIComponent(e)];
|
|
m.isNumber(r) && i.push("expires=" + new Date(r).toGMTString()), m.isString(n) && i.push("path=" + n), m.isString(s) && i.push("domain=" + s), c === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
}, read(t) {
|
|
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
return e ? decodeURIComponent(e[3]) : null;
|
|
}, remove(t) {
|
|
this.write(t, "", Date.now() - 864e5);
|
|
} } : { write() {
|
|
}, read: () => null, remove() {
|
|
} };
|
|
function pe(t, e) {
|
|
return t && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) ? function(r, n) {
|
|
return n ? r.replace(/\/?\/$/, "") + "/" + n.replace(/^\/+/, "") : r;
|
|
}(t, e) : e;
|
|
}
|
|
const Gt = (t) => t instanceof x ? { ...t } : t;
|
|
function I(t, e) {
|
|
e = e || {};
|
|
const r = {};
|
|
function n(p, b, w) {
|
|
return m.isPlainObject(p) && m.isPlainObject(b) ? m.merge.call({ caseless: w }, p, b) : m.isPlainObject(b) ? m.merge({}, b) : m.isArray(b) ? b.slice() : b;
|
|
}
|
|
function s(p, b, w) {
|
|
return m.isUndefined(b) ? m.isUndefined(p) ? void 0 : n(void 0, p, w) : n(p, b, w);
|
|
}
|
|
function c(p, b) {
|
|
if (!m.isUndefined(b)) return n(void 0, b);
|
|
}
|
|
function i(p, b) {
|
|
return m.isUndefined(b) ? m.isUndefined(p) ? void 0 : n(void 0, p) : n(void 0, b);
|
|
}
|
|
function g(p, b, w) {
|
|
return w in e ? n(p, b) : w in t ? n(void 0, p) : void 0;
|
|
}
|
|
const y = { url: c, method: c, data: c, 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: g, headers: (p, b) => s(Gt(p), Gt(b), !0) };
|
|
return m.forEach(Object.keys(Object.assign({}, t, e)), function(p) {
|
|
const b = y[p] || s, w = b(t[p], e[p], p);
|
|
m.isUndefined(w) && b !== g || (r[p] = w);
|
|
}), r;
|
|
}
|
|
const ge = (t) => {
|
|
const e = I({}, t);
|
|
let r, { data: n, withXSRFToken: s, xsrfHeaderName: c, xsrfCookieName: i, headers: g, auth: y } = e;
|
|
if (e.headers = g = x.from(g), e.url = ue(pe(e.baseURL, e.url), t.params, t.paramsSerializer), y && g.set("Authorization", "Basic " + btoa((y.username || "") + ":" + (y.password ? unescape(encodeURIComponent(y.password)) : ""))), m.isFormData(n)) {
|
|
if (j.hasStandardBrowserEnv || j.hasStandardBrowserWebWorkerEnv) g.setContentType(void 0);
|
|
else if ((r = g.getContentType()) !== !1) {
|
|
const [p, ...b] = r ? r.split(";").map((w) => w.trim()).filter(Boolean) : [];
|
|
g.setContentType([p || "multipart/form-data", ...b].join("; "));
|
|
}
|
|
}
|
|
if (j.hasStandardBrowserEnv && (s && m.isFunction(s) && (s = s(e)), s || s !== !1 && Ke(e.url))) {
|
|
const p = c && i && Ge.read(i);
|
|
p && g.set(c, p);
|
|
}
|
|
return e;
|
|
}, Xe = typeof XMLHttpRequest < "u" && function(t) {
|
|
return new Promise(function(e, r) {
|
|
const n = ge(t);
|
|
let s = n.data;
|
|
const c = x.from(n.headers).normalize();
|
|
let i, { responseType: g } = n;
|
|
function y() {
|
|
n.cancelToken && n.cancelToken.unsubscribe(i), n.signal && n.signal.removeEventListener("abort", i);
|
|
}
|
|
let p = new XMLHttpRequest();
|
|
function b() {
|
|
if (!p) return;
|
|
const v = x.from("getAllResponseHeaders" in p && p.getAllResponseHeaders());
|
|
de(function(E) {
|
|
e(E), y();
|
|
}, function(E) {
|
|
r(E), y();
|
|
}, { data: g && g !== "text" && g !== "json" ? p.response : p.responseText, status: p.status, statusText: p.statusText, headers: v, config: t, request: p }), p = null;
|
|
}
|
|
p.open(n.method.toUpperCase(), n.url, !0), p.timeout = n.timeout, "onloadend" in p ? p.onloadend = b : p.onreadystatechange = function() {
|
|
p && p.readyState === 4 && (p.status !== 0 || p.responseURL && p.responseURL.indexOf("file:") === 0) && setTimeout(b);
|
|
}, p.onabort = function() {
|
|
p && (r(new A("Request aborted", A.ECONNABORTED, n, p)), p = null);
|
|
}, p.onerror = function() {
|
|
r(new A("Network Error", A.ERR_NETWORK, n, p)), p = null;
|
|
}, p.ontimeout = function() {
|
|
let v = n.timeout ? "timeout of " + n.timeout + "ms exceeded" : "timeout exceeded";
|
|
const E = n.transitional || le;
|
|
n.timeoutErrorMessage && (v = n.timeoutErrorMessage), r(new A(v, E.clarifyTimeoutError ? A.ETIMEDOUT : A.ECONNABORTED, n, p)), p = null;
|
|
}, s === void 0 && c.setContentType(null), "setRequestHeader" in p && m.forEach(c.toJSON(), function(v, E) {
|
|
p.setRequestHeader(E, v);
|
|
}), m.isUndefined(n.withCredentials) || (p.withCredentials = !!n.withCredentials), g && g !== "json" && (p.responseType = n.responseType), typeof n.onDownloadProgress == "function" && p.addEventListener("progress", st(n.onDownloadProgress, !0)), typeof n.onUploadProgress == "function" && p.upload && p.upload.addEventListener("progress", st(n.onUploadProgress)), (n.cancelToken || n.signal) && (i = (v) => {
|
|
p && (r(!v || v.type ? new H(null, t, p) : v), p.abort(), p = null);
|
|
}, n.cancelToken && n.cancelToken.subscribe(i), n.signal && (n.signal.aborted ? i() : n.signal.addEventListener("abort", i)));
|
|
const w = function(v) {
|
|
const E = /^([-+\w]{1,25})(:?\/\/|:)/.exec(v);
|
|
return E && E[1] || "";
|
|
}(n.url);
|
|
w && j.protocols.indexOf(w) === -1 ? r(new A("Unsupported protocol " + w + ":", A.ERR_BAD_REQUEST, t)) : p.send(s || null);
|
|
});
|
|
}, Qe = (t, e) => {
|
|
let r, n = new AbortController();
|
|
const s = function(y) {
|
|
if (!r) {
|
|
r = !0, i();
|
|
const p = y instanceof Error ? y : this.reason;
|
|
n.abort(p instanceof A ? p : new H(p instanceof Error ? p.message : p));
|
|
}
|
|
};
|
|
let c = e && setTimeout(() => {
|
|
s(new A(`timeout ${e} of ms exceeded`, A.ETIMEDOUT));
|
|
}, e);
|
|
const i = () => {
|
|
t && (c && clearTimeout(c), c = null, t.forEach((y) => {
|
|
y && (y.removeEventListener ? y.removeEventListener("abort", s) : y.unsubscribe(s));
|
|
}), t = null);
|
|
};
|
|
t.forEach((y) => y && y.addEventListener && y.addEventListener("abort", s));
|
|
const { signal: g } = n;
|
|
return g.unsubscribe = i, [g, () => {
|
|
c && clearTimeout(c), c = null;
|
|
}];
|
|
}, Ye = function* (t, e) {
|
|
let r = t.byteLength;
|
|
if (!e || r < e) return void (yield t);
|
|
let n, s = 0;
|
|
for (; s < r; ) n = s + e, yield t.slice(s, n), s = n;
|
|
}, Xt = (t, e, r, n, s) => {
|
|
const c = async function* (g, y, p) {
|
|
for await (const b of g) yield* Ye(ArrayBuffer.isView(b) ? b : await p(String(b)), y);
|
|
}(t, e, s);
|
|
let i = 0;
|
|
return new ReadableStream({ type: "bytes", async pull(g) {
|
|
const { done: y, value: p } = await c.next();
|
|
if (y) return g.close(), void n();
|
|
let b = p.byteLength;
|
|
r && r(i += b), g.enqueue(new Uint8Array(p));
|
|
}, cancel: (g) => (n(g), c.return()) }, { highWaterMark: 2 });
|
|
}, Qt = (t, e) => {
|
|
const r = t != null;
|
|
return (n) => setTimeout(() => e({ lengthComputable: r, total: t, loaded: n }));
|
|
}, ct = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", me = ct && typeof ReadableStream == "function", yt = ct && (typeof TextEncoder == "function" ? (Yt = new TextEncoder(), (t) => Yt.encode(t)) : async (t) => new Uint8Array(await new Response(t).arrayBuffer()));
|
|
var Yt;
|
|
const Ze = me && (() => {
|
|
let t = !1;
|
|
const e = new Request(j.origin, { body: new ReadableStream(), method: "POST", get duplex() {
|
|
return t = !0, "half";
|
|
} }).headers.has("Content-Type");
|
|
return t && !e;
|
|
})(), bt = me && !!(() => {
|
|
try {
|
|
return m.isReadableStream(new Response("").body);
|
|
} catch {
|
|
}
|
|
})(), it = { stream: bt && ((t) => t.body) };
|
|
var Zt;
|
|
ct && (Zt = new Response(), ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
!it[t] && (it[t] = m.isFunction(Zt[t]) ? (e) => e[t]() : (e, r) => {
|
|
throw new A(`Response type '${t}' is not supported`, A.ERR_NOT_SUPPORT, r);
|
|
});
|
|
}));
|
|
const tr = async (t, e) => {
|
|
const r = m.toFiniteNumber(t.getContentLength());
|
|
return r ?? (async (n) => n == null ? 0 : m.isBlob(n) ? n.size : m.isSpecCompliantForm(n) ? (await new Request(n).arrayBuffer()).byteLength : m.isArrayBufferView(n) ? n.byteLength : (m.isURLSearchParams(n) && (n += ""), m.isString(n) ? (await yt(n)).byteLength : void 0))(e);
|
|
}, ye = { http: null, xhr: Xe, fetch: ct && (async (t) => {
|
|
let { url: e, method: r, data: n, signal: s, cancelToken: c, timeout: i, onDownloadProgress: g, onUploadProgress: y, responseType: p, headers: b, withCredentials: w = "same-origin", fetchOptions: v } = ge(t);
|
|
p = p ? (p + "").toLowerCase() : "text";
|
|
let E, h, [l, o] = s || c || i ? Qe([s, c], i) : [];
|
|
const a = () => {
|
|
!E && setTimeout(() => {
|
|
l && l.unsubscribe();
|
|
}), E = !0;
|
|
};
|
|
let u;
|
|
try {
|
|
if (y && Ze && r !== "get" && r !== "head" && (u = await tr(b, n)) !== 0) {
|
|
let S, T = new Request(e, { method: "POST", body: n, duplex: "half" });
|
|
m.isFormData(n) && (S = T.headers.get("content-type")) && b.setContentType(S), T.body && (n = Xt(T.body, 65536, Qt(u, st(y)), null, yt));
|
|
}
|
|
m.isString(w) || (w = w ? "cors" : "omit"), h = new Request(e, { ...v, signal: l, method: r.toUpperCase(), headers: b.normalize().toJSON(), body: n, duplex: "half", withCredentials: w });
|
|
let d = await fetch(h);
|
|
const f = bt && (p === "stream" || p === "response");
|
|
if (bt && (g || f)) {
|
|
const S = {};
|
|
["status", "statusText", "headers"].forEach((U) => {
|
|
S[U] = d[U];
|
|
});
|
|
const T = m.toFiniteNumber(d.headers.get("content-length"));
|
|
d = new Response(Xt(d.body, 65536, g && Qt(T, st(g, !0)), f && a, yt), S);
|
|
}
|
|
p = p || "text";
|
|
let O = await it[m.findKey(it, p) || "text"](d, t);
|
|
return !f && a(), o && o(), await new Promise((S, T) => {
|
|
de(S, T, { data: O, headers: x.from(d.headers), status: d.status, statusText: d.statusText, config: t, request: h });
|
|
});
|
|
} catch (d) {
|
|
throw a(), d && d.name === "TypeError" && /fetch/i.test(d.message) ? Object.assign(new A("Network Error", A.ERR_NETWORK, t, h), { cause: d.cause || d }) : A.from(d, d && d.code, t, h);
|
|
}
|
|
}) };
|
|
m.forEach(ye, (t, e) => {
|
|
if (t) {
|
|
try {
|
|
Object.defineProperty(t, "name", { value: e });
|
|
} catch {
|
|
}
|
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
}
|
|
});
|
|
const te = (t) => `- ${t}`, er = (t) => m.isFunction(t) || t === null || t === !1, be = (t) => {
|
|
t = m.isArray(t) ? t : [t];
|
|
const { length: e } = t;
|
|
let r, n;
|
|
const s = {};
|
|
for (let c = 0; c < e; c++) {
|
|
let i;
|
|
if (r = t[c], n = r, !er(r) && (n = ye[(i = String(r)).toLowerCase()], n === void 0)) throw new A(`Unknown adapter '${i}'`);
|
|
if (n) break;
|
|
s[i || "#" + c] = n;
|
|
}
|
|
if (!n) {
|
|
const c = Object.entries(s).map(([i, g]) => `adapter ${i} ` + (g === !1 ? "is not supported by the environment" : "is not available in the build"));
|
|
throw new A("There is no suitable adapter to dispatch the request " + (e ? c.length > 1 ? `since :
|
|
` + c.map(te).join(`
|
|
`) : " " + te(c[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
}
|
|
return n;
|
|
};
|
|
function gt(t) {
|
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted) throw new H(null, t);
|
|
}
|
|
function ee(t) {
|
|
return gt(t), t.headers = x.from(t.headers), t.data = pt.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), be(t.adapter || Q.adapter)(t).then(function(e) {
|
|
return gt(t), e.data = pt.call(t, t.transformResponse, e), e.headers = x.from(e.headers), e;
|
|
}, function(e) {
|
|
return he(e) || (gt(t), e && e.response && (e.response.data = pt.call(t, t.transformResponse, e.response), e.response.headers = x.from(e.response.headers))), Promise.reject(e);
|
|
});
|
|
}
|
|
const rr = "1.7.2", Ut = {};
|
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
Ut[t] = function(r) {
|
|
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
};
|
|
});
|
|
const re = {};
|
|
Ut.transitional = function(t, e, r) {
|
|
function n(s, c) {
|
|
return "[Axios v1.7.2] Transitional option '" + s + "'" + c + (r ? ". " + r : "");
|
|
}
|
|
return (s, c, i) => {
|
|
if (t === !1) throw new A(n(c, " has been removed" + (e ? " in " + e : "")), A.ERR_DEPRECATED);
|
|
return e && !re[c] && (re[c] = !0, console.warn(n(c, " has been deprecated since v" + e + " and will be removed in the near future"))), !t || t(s, c, i);
|
|
};
|
|
};
|
|
const wt = { assertOptions: function(t, e, r) {
|
|
if (typeof t != "object") throw new A("options must be an object", A.ERR_BAD_OPTION_VALUE);
|
|
const n = Object.keys(t);
|
|
let s = n.length;
|
|
for (; s-- > 0; ) {
|
|
const c = n[s], i = e[c];
|
|
if (i) {
|
|
const g = t[c], y = g === void 0 || i(g, c, t);
|
|
if (y !== !0) throw new A("option " + c + " must be " + y, A.ERR_BAD_OPTION_VALUE);
|
|
} else if (r !== !0) throw new A("Unknown option " + c, A.ERR_BAD_OPTION);
|
|
}
|
|
}, validators: Ut }, L = wt.validators;
|
|
class q {
|
|
constructor(e) {
|
|
this.defaults = e, this.interceptors = { request: new $t(), response: new $t() };
|
|
}
|
|
async request(e, r) {
|
|
try {
|
|
return await this._request(e, r);
|
|
} catch (n) {
|
|
if (n instanceof Error) {
|
|
let s;
|
|
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
const c = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
try {
|
|
n.stack ? c && !String(n.stack).endsWith(c.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
` + c) : n.stack = c;
|
|
} catch {
|
|
}
|
|
}
|
|
throw n;
|
|
}
|
|
}
|
|
_request(e, r) {
|
|
typeof e == "string" ? (r = r || {}).url = e : r = e || {}, r = I(this.defaults, r);
|
|
const { transitional: n, paramsSerializer: s, headers: c } = r;
|
|
n !== void 0 && wt.assertOptions(n, { silentJSONParsing: L.transitional(L.boolean), forcedJSONParsing: L.transitional(L.boolean), clarifyTimeoutError: L.transitional(L.boolean) }, !1), s != null && (m.isFunction(s) ? r.paramsSerializer = { serialize: s } : wt.assertOptions(s, { encode: L.function, serialize: L.function }, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
let i = c && m.merge(c.common, c[r.method]);
|
|
c && m.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (h) => {
|
|
delete c[h];
|
|
}), r.headers = x.concat(i, c);
|
|
const g = [];
|
|
let y = !0;
|
|
this.interceptors.request.forEach(function(h) {
|
|
typeof h.runWhen == "function" && h.runWhen(r) === !1 || (y = y && h.synchronous, g.unshift(h.fulfilled, h.rejected));
|
|
});
|
|
const p = [];
|
|
let b;
|
|
this.interceptors.response.forEach(function(h) {
|
|
p.push(h.fulfilled, h.rejected);
|
|
});
|
|
let w, v = 0;
|
|
if (!y) {
|
|
const h = [ee.bind(this), void 0];
|
|
for (h.unshift.apply(h, g), h.push.apply(h, p), w = h.length, b = Promise.resolve(r); v < w; ) b = b.then(h[v++], h[v++]);
|
|
return b;
|
|
}
|
|
w = g.length;
|
|
let E = r;
|
|
for (v = 0; v < w; ) {
|
|
const h = g[v++], l = g[v++];
|
|
try {
|
|
E = h(E);
|
|
} catch (o) {
|
|
l.call(this, o);
|
|
break;
|
|
}
|
|
}
|
|
try {
|
|
b = ee.call(this, E);
|
|
} catch (h) {
|
|
return Promise.reject(h);
|
|
}
|
|
for (v = 0, w = p.length; v < w; ) b = b.then(p[v++], p[v++]);
|
|
return b;
|
|
}
|
|
getUri(e) {
|
|
return ue(pe((e = I(this.defaults, e)).baseURL, e.url), e.params, e.paramsSerializer);
|
|
}
|
|
}
|
|
m.forEach(["delete", "get", "head", "options"], function(t) {
|
|
q.prototype[t] = function(e, r) {
|
|
return this.request(I(r || {}, { method: t, url: e, data: (r || {}).data }));
|
|
};
|
|
}), m.forEach(["post", "put", "patch"], function(t) {
|
|
function e(r) {
|
|
return function(n, s, c) {
|
|
return this.request(I(c || {}, { method: t, headers: r ? { "Content-Type": "multipart/form-data" } : {}, url: n, data: s }));
|
|
};
|
|
}
|
|
q.prototype[t] = e(), q.prototype[t + "Form"] = e(!0);
|
|
});
|
|
class Nt {
|
|
constructor(e) {
|
|
if (typeof e != "function") throw new TypeError("executor must be a function.");
|
|
let r;
|
|
this.promise = new Promise(function(s) {
|
|
r = s;
|
|
});
|
|
const n = this;
|
|
this.promise.then((s) => {
|
|
if (!n._listeners) return;
|
|
let c = n._listeners.length;
|
|
for (; c-- > 0; ) n._listeners[c](s);
|
|
n._listeners = null;
|
|
}), this.promise.then = (s) => {
|
|
let c;
|
|
const i = new Promise((g) => {
|
|
n.subscribe(g), c = g;
|
|
}).then(s);
|
|
return i.cancel = function() {
|
|
n.unsubscribe(c);
|
|
}, i;
|
|
}, e(function(s, c, i) {
|
|
n.reason || (n.reason = new H(s, c, i), r(n.reason));
|
|
});
|
|
}
|
|
throwIfRequested() {
|
|
if (this.reason) throw this.reason;
|
|
}
|
|
subscribe(e) {
|
|
this.reason ? e(this.reason) : this._listeners ? this._listeners.push(e) : this._listeners = [e];
|
|
}
|
|
unsubscribe(e) {
|
|
if (!this._listeners) return;
|
|
const r = this._listeners.indexOf(e);
|
|
r !== -1 && this._listeners.splice(r, 1);
|
|
}
|
|
static source() {
|
|
let e;
|
|
return { token: new Nt(function(r) {
|
|
e = r;
|
|
}), cancel: e };
|
|
}
|
|
}
|
|
const vt = { 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(vt).forEach(([t, e]) => {
|
|
vt[e] = t;
|
|
});
|
|
const C = function t(e) {
|
|
const r = new q(e), n = ie(q.prototype.request, r);
|
|
return m.extend(n, q.prototype, r, { allOwnKeys: !0 }), m.extend(n, r, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
return t(I(e, s));
|
|
}, n;
|
|
}(Q);
|
|
C.Axios = q, C.CanceledError = H, C.CancelToken = Nt, C.isCancel = he, C.VERSION = rr, C.toFormData = ot, C.AxiosError = A, C.Cancel = C.CanceledError, C.all = function(t) {
|
|
return Promise.all(t);
|
|
}, C.spread = function(t) {
|
|
return function(e) {
|
|
return t.apply(null, e);
|
|
};
|
|
}, C.isAxiosError = function(t) {
|
|
return m.isObject(t) && t.isAxiosError === !0;
|
|
}, C.mergeConfig = I, C.AxiosHeaders = x, C.formToJSON = (t) => fe(m.isHTMLForm(t) ? new FormData(t) : t), C.getAdapter = be, C.HttpStatusCode = vt, C.default = C;
|
|
var nr = Object.defineProperty, P = (t, e, r) => (((n, s, c) => {
|
|
s in n ? nr(n, s, { enumerable: !0, configurable: !0, writable: !0, value: c }) : n[s] = c;
|
|
})(t, typeof e != "symbol" ? e + "" : e, r), r), we = (t, e, r) => {
|
|
if (!e.has(t)) throw TypeError("Cannot " + r);
|
|
}, R = (t, e, r) => (we(t, e, "read from private field"), r ? r.call(t) : e.get(t)), _ = (t, e, r) => {
|
|
if (e.has(t)) throw TypeError("Cannot add the same private member more than once");
|
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
}, D = (t, e, r, n) => (we(t, e, "write to private field"), e.set(t, r), r);
|
|
function ve(t) {
|
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
}
|
|
var or = function(t) {
|
|
if (t.length >= 255) throw new TypeError("Alphabet too long");
|
|
for (var e = new Uint8Array(256), r = 0; r < e.length; r++) e[r] = 255;
|
|
for (var n = 0; n < t.length; n++) {
|
|
var s = t.charAt(n), c = s.charCodeAt(0);
|
|
if (e[c] !== 255) throw new TypeError(s + " is ambiguous");
|
|
e[c] = n;
|
|
}
|
|
var i = t.length, g = t.charAt(0), y = Math.log(i) / Math.log(256), p = Math.log(256) / Math.log(i);
|
|
function b(w) {
|
|
if (typeof w != "string") throw new TypeError("Expected String");
|
|
if (w.length === 0) return new Uint8Array();
|
|
for (var v = 0, E = 0, h = 0; w[v] === g; ) E++, v++;
|
|
for (var l = (w.length - v) * y + 1 >>> 0, o = new Uint8Array(l); w[v]; ) {
|
|
var a = e[w.charCodeAt(v)];
|
|
if (a === 255) return;
|
|
for (var u = 0, d = l - 1; (a !== 0 || u < h) && d !== -1; d--, u++) a += i * o[d] >>> 0, o[d] = a % 256 >>> 0, a = a / 256 >>> 0;
|
|
if (a !== 0) throw new Error("Non-zero carry");
|
|
h = u, v++;
|
|
}
|
|
for (var f = l - h; f !== l && o[f] === 0; ) f++;
|
|
for (var O = new Uint8Array(E + (l - f)), S = E; f !== l; ) O[S++] = o[f++];
|
|
return O;
|
|
}
|
|
return { encode: function(w) {
|
|
if (w instanceof Uint8Array || (ArrayBuffer.isView(w) ? w = new Uint8Array(w.buffer, w.byteOffset, w.byteLength) : Array.isArray(w) && (w = Uint8Array.from(w))), !(w instanceof Uint8Array)) throw new TypeError("Expected Uint8Array");
|
|
if (w.length === 0) return "";
|
|
for (var v = 0, E = 0, h = 0, l = w.length; h !== l && w[h] === 0; ) h++, v++;
|
|
for (var o = (l - h) * p + 1 >>> 0, a = new Uint8Array(o); h !== l; ) {
|
|
for (var u = w[h], d = 0, f = o - 1; (u !== 0 || d < E) && f !== -1; f--, d++) u += 256 * a[f] >>> 0, a[f] = u % i >>> 0, u = u / i >>> 0;
|
|
if (u !== 0) throw new Error("Non-zero carry");
|
|
E = d, h++;
|
|
}
|
|
for (var O = o - E; O !== o && a[O] === 0; ) O++;
|
|
for (var S = g.repeat(v); O < o; ++O) S += t.charAt(a[O]);
|
|
return S;
|
|
}, decodeUnsafe: b, decode: function(w) {
|
|
var v = b(w);
|
|
if (v) return v;
|
|
throw new Error("Non-base" + i + " character");
|
|
} };
|
|
};
|
|
const sr = ve(or);
|
|
var ne, Ee = {};
|
|
ne = Ee, function(t, e) {
|
|
var r = e();
|
|
for (var n in r) ne[n] = r[n];
|
|
}(0, function() {
|
|
var t = function(c) {
|
|
return typeof c != "string" ? c : c.replace(/[\+ \|\^\%]/g, function(i) {
|
|
return { " ": "+", "+": "%2B", "|": "%7C", "^": "%5E", "%": "%25" }[i];
|
|
});
|
|
}, e = function(c) {
|
|
return typeof c != "string" ? c : c.replace(/\+|%2B|%7C|%5E|%25/g, function(i) {
|
|
return { "+": " ", "%2B": "+", "%7C": "|", "%5E": "^", "%25": "%" }[i];
|
|
});
|
|
}, r = function(c) {
|
|
return Number.prototype.toString.call(c, 36).toUpperCase();
|
|
}, n = function(c) {
|
|
return parseInt(c, 36);
|
|
}, s = Array.prototype.indexOf || function(c, i) {
|
|
for (var g = i || 0, y = this.length; g < y; g++) if (this[g] === c) return g;
|
|
return -1;
|
|
};
|
|
return { JSON, pack: function(c, i) {
|
|
var g = (i = i || {}).verbose || !1;
|
|
g && console.log("Normalize the JSON Object"), c = typeof c == "string" ? this.JSON.parse(c) : c, g && console.log("Creating a empty dictionary");
|
|
var y = { strings: [], integers: [], floats: [] };
|
|
g && console.log("Creating the AST");
|
|
var p = function E(h) {
|
|
g && console.log("Calling recursiveAstBuilder with " + this.JSON.stringify(h));
|
|
var l, o = typeof h;
|
|
if (h === null) return { type: "null", index: -3 };
|
|
if (typeof h > "u") return { type: "undefined", index: -5 };
|
|
if (h instanceof Array) {
|
|
var a = ["@"];
|
|
for (var u in h) h.hasOwnProperty(u) && a.push(E(h[u]));
|
|
return a;
|
|
}
|
|
if (o === "object") {
|
|
for (var d in a = ["$"], h) h.hasOwnProperty(d) && (a.push(E(d)), a.push(E(h[d])));
|
|
return a;
|
|
}
|
|
if (h === "") return { type: "empty", index: -4 };
|
|
if (o === "string") return (l = s.call(y.strings, h)) == -1 && (y.strings.push(t(h)), l = y.strings.length - 1), { type: "strings", index: l };
|
|
if (o === "number" && h % 1 == 0) return (l = s.call(y.integers, h)) == -1 && (y.integers.push(r(h)), l = y.integers.length - 1), { type: "integers", index: l };
|
|
if (o === "number") return (l = s.call(y.floats, h)) == -1 && (y.floats.push(h), l = y.floats.length - 1), { type: "floats", index: l };
|
|
if (o === "boolean") return { type: "boolean", index: h ? -1 : -2 };
|
|
throw new Error("Unexpected argument of type " + typeof h);
|
|
}(c), b = y.strings.length, w = y.integers.length;
|
|
y.floats.length, g && console.log("Parsing the dictionary");
|
|
var v = y.strings.join("|");
|
|
return v += "^" + y.integers.join("|"), v += "^" + y.floats.join("|"), g && console.log("Parsing the structure"), v += "^" + function E(h) {
|
|
if (g && console.log("Calling a recursiveParser with " + this.JSON.stringify(h)), h instanceof Array) {
|
|
var l = h.shift();
|
|
for (var o in h) h.hasOwnProperty(o) && (l += E(h[o]) + "|");
|
|
return (l[l.length - 1] === "|" ? l.slice(0, -1) : l) + "]";
|
|
}
|
|
var a = h.type, u = h.index;
|
|
if (a === "strings") return r(u);
|
|
if (a === "integers") return r(b + u);
|
|
if (a === "floats") return r(b + w + u);
|
|
if (a === "boolean") return h.index;
|
|
if (a === "null") return -3;
|
|
if (a === "undefined") return -5;
|
|
if (a === "empty") return -4;
|
|
throw new TypeError("The item is alien!");
|
|
}(p), g && console.log("Ending parser"), i.debug ? { dictionary: y, ast: p, packed: v } : v;
|
|
}, unpack: function(c, i) {
|
|
i = i || {};
|
|
var g = c.split("^");
|
|
i.verbose && console.log("Building dictionary");
|
|
var y = [], p = g[0];
|
|
if (p !== "") {
|
|
p = p.split("|"), i.verbose && console.log("Parse the strings dictionary");
|
|
for (var b = 0, w = p.length; b < w; b++) y.push(e(p[b]));
|
|
}
|
|
if ((p = g[1]) !== "") for (p = p.split("|"), i.verbose && console.log("Parse the integers dictionary"), b = 0, w = p.length; b < w; b++) y.push(n(p[b]));
|
|
if ((p = g[2]) !== "") for (p = p.split("|"), i.verbose && console.log("Parse the floats dictionary"), b = 0, w = p.length; b < w; b++) y.push(parseFloat(p[b]));
|
|
p = null, i.verbose && console.log("Tokenizing the structure");
|
|
var v = "", E = [], h = g[3].length;
|
|
for (b = 0; b < h; b++) {
|
|
var l = g[3].charAt(b);
|
|
l === "|" || l === "$" || l === "@" || l === "]" ? (v && (E.push(n(v)), v = ""), l !== "|" && E.push(l)) : v += l;
|
|
}
|
|
var o = E.length, a = 0;
|
|
return i.verbose && console.log("Starting recursive parser"), function u() {
|
|
var d = E[a++];
|
|
if (i.verbose && console.log("Reading collection type " + (d === "$" ? "object" : "Array")), d === "@") {
|
|
for (var f = []; a < o; a++) {
|
|
var O = E[a];
|
|
if (i.verbose && console.log("Read " + O + " symbol"), O === "]") return f;
|
|
if (O === "@" || O === "$") f.push(u());
|
|
else switch (O) {
|
|
case -1:
|
|
f.push(!0);
|
|
break;
|
|
case -2:
|
|
f.push(!1);
|
|
break;
|
|
case -3:
|
|
f.push(null);
|
|
break;
|
|
case -5:
|
|
f.push(void 0);
|
|
break;
|
|
case -4:
|
|
f.push("");
|
|
break;
|
|
default:
|
|
f.push(y[O]);
|
|
}
|
|
}
|
|
return i.verbose && console.log("Parsed " + this.JSON.stringify(f)), f;
|
|
}
|
|
if (d === "$") {
|
|
for (f = {}; a < o; a++) {
|
|
var S = E[a];
|
|
if (S === "]") return f;
|
|
if (S = S === -4 ? "" : y[S], (O = E[++a]) === "@" || O === "$") f[S] = u();
|
|
else switch (O) {
|
|
case -1:
|
|
f[S] = !0;
|
|
break;
|
|
case -2:
|
|
f[S] = !1;
|
|
break;
|
|
case -3:
|
|
f[S] = null;
|
|
break;
|
|
case -5:
|
|
f[S] = void 0;
|
|
break;
|
|
case -4:
|
|
f[S] = "";
|
|
break;
|
|
default:
|
|
f[S] = y[O];
|
|
}
|
|
}
|
|
return i.verbose && console.log("Parsed " + this.JSON.stringify(f)), f;
|
|
}
|
|
throw new TypeError("Bad token " + d + " isn't a type");
|
|
}();
|
|
} };
|
|
});
|
|
const oe = ve(Ee);
|
|
var K, G, z, M, Et, St, et, Ot, At;
|
|
class Rt {
|
|
constructor(e, r, n, s, c) {
|
|
return P(this, "code", 0), P(this, "message", "操作成功"), P(this, "data", null), P(this, "url", ""), P(this, "res", ""), _(this, K, null), _(this, G, !0), _(this, z, !0), _(this, M, { get: (i, g) => R(this, Et).call(this, g), ownKeys: () => Object.keys(R(this, M).getPrototypeOf() || {}), getPrototypeOf: () => R(this, G) ? this : this.data, getOwnPropertyDescriptor: () => ({ configurable: !0, enumerable: !0, writable: !0, value: R(this, M).getPrototypeOf() }) }), _(this, Et, (i) => i === "$echoMsg" ? R(this, et) : i === "msg" ? R(this, St) : i === "then" || i === "resp" ? (D(this, z, !0), D(this, G, i === "resp"), R(this, Ot)) : i === "catch" ? R(this, At) : i === "IS_ECHO_MSG" ? R(this, z) : Reflect.get(this, i)), _(this, St, (i = (y) => y, g = !1) => (R(this, et).call(this), D(this, G, g), Promise.resolve(i == null ? void 0 : i(R(this, M).getPrototypeOf())))), _(this, et, () => {
|
|
R(this, z) && (D(this, z, !1), cr.onMsg(this.code, this.message));
|
|
}), _(this, Ot, (i) => [0, 1].includes(this.code) ? Promise.resolve(i == null ? void 0 : i(R(this, M).getPrototypeOf())) : Promise.reject(R(this, K))), _(this, At, (i) => Promise.resolve(i(R(this, K)))), this.code = e, this.message = r, this.data = n, this.url = s, this.res = c, D(this, K, new Proxy(this, R(this, M)));
|
|
}
|
|
}
|
|
K = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap();
|
|
const mt = (t, e, r, n = "/", s = "") => new Rt(t, e, r, n, s);
|
|
var se = ["utf8", "utf-8", "unicode-1-1-utf-8"], Se = { TextEncoder: function(t) {
|
|
if (se.indexOf(t) < 0 && typeof t < "u" && t != null) throw new RangeError("Invalid encoding type. Only utf-8 is supported");
|
|
this.encoding = "utf-8", this.encode = function(e) {
|
|
if (typeof e != "string") throw new TypeError("passed argument must be of tye string");
|
|
var r = unescape(encodeURIComponent(e)), n = new Uint8Array(r.length);
|
|
const s = r.split("");
|
|
for (let c = 0; c < s.length; c++) n[c] = s[c].charCodeAt(0);
|
|
return n;
|
|
};
|
|
}, TextDecoder: function(t) {
|
|
if (se.indexOf(t) < 0 && typeof t < "u" && t != null) throw new RangeError("Invalid encoding type. Only utf-8 is supported");
|
|
this.encoding = "utf-8", this.decode = function(e, r) {
|
|
if (typeof e > "u") return "";
|
|
var n = typeof r < "u" && n in r && r.stream;
|
|
if (typeof n != "boolean") throw new TypeError("stream option must be boolean");
|
|
if (ArrayBuffer.isView(e)) {
|
|
var s = new Uint8Array(e.buffer, e.byteOffset, e.byteLength), c = new Array(s.length);
|
|
for (let i = 0; i < s.length; i++) c[i] = String.fromCharCode(s[i]);
|
|
return decodeURIComponent(escape(c.join("")));
|
|
}
|
|
throw new TypeError("passed argument must be an array buffer view");
|
|
};
|
|
} };
|
|
const ir = new Se.TextEncoder("utf8"), ar = new Se.TextDecoder("utf8");
|
|
var rt, X, Tt, F, B;
|
|
Promise.withResolvers || (Promise.withResolvers = function() {
|
|
let t, e;
|
|
return { promise: new Promise((r, n) => {
|
|
t = r, e = n;
|
|
}), resolve: t, reject: e };
|
|
});
|
|
class Ct {
|
|
constructor(e, r, n = ({}) => Promise.reject({ code: -1, msg: "请初始化HTTP请求方法主体" })) {
|
|
_(this, rt, void 0), _(this, X, void 0), _(this, Tt, void 0), _(this, F, { "#": /* @__PURE__ */ new Map(), $: /* @__PURE__ */ new Map() }), _(this, B, /* @__PURE__ */ new Map()), P(this, "request", ({ url: s = "/", method: c = "GET", ...i }, g = !1) => {
|
|
var y, p;
|
|
const b = c.toUpperCase(), w = ((o) => {
|
|
let a = 5381;
|
|
for (let u = 0; u < o.length; u++) a = 33 * a ^ o.charCodeAt(u);
|
|
return (a >>> 0).toString(16);
|
|
})(JSON.stringify([s, b, i])), v = (y = s == null ? void 0 : s.includes) != null && y.call(s, "/_/") ? "#" : "$", { promise: E, resolve: h, reject: l } = Promise.withResolvers();
|
|
return R(this, F)[v].has(w) ? (console.log("缓存命中", s), h(R(this, F)[v].get(w))) : (R(this, B).has(w) ? R(this, B).get(w).push([h, l]) : R(this, B).set(w, [[h, l]]), (p = R(this, B).get(w)) != null && p.some((o) => o) && R(this, rt).call(this, { url: s, method: b, ...i }).then((o) => {
|
|
if (![0, 1].includes(o.code)) throw mt(o.code, o.msg, o.data, s, o == null ? void 0 : o.res);
|
|
return [o.code, o.msg, o.data, s, o == null ? void 0 : o.res];
|
|
}).then((o) => ((v == "#" || g && b === "GET") && R(this, F)[v].set(w, o), o)).then((o) => {
|
|
var a;
|
|
return (a = R(this, B).get(w)) == null ? void 0 : a.forEach((u, d, f) => {
|
|
u && u[0](o), delete f[d];
|
|
});
|
|
}).catch((o) => {
|
|
var a;
|
|
R(this, F)[v].delete(w), (a = R(this, B).get(w)) == null || a.forEach((u, d, f) => {
|
|
u && u[1](o instanceof Rt ? o : mt(-1, o, null, s)), delete f[d];
|
|
});
|
|
}).finally(() => R(this, B).delete(w))), new Proxy(E, { get: (o, a) => (...u) => o.then((d) => mt(...d)[a](...u)).catch((d) => {
|
|
if (!d instanceof Rt) throw d;
|
|
return typeof d[a] == "function" ? d[a](...u) : d[a];
|
|
}) });
|
|
}), P(this, "get", (s, c = {}) => this.request({ url: s, method: "GET", params: c })), P(this, "post", (s, c = {}, i = {}) => this.request({ url: s, method: "POST", data: c, params: i })), P(this, "put", (s, c = {}, i = {}) => this.request({ url: s, method: "PUT", data: c, params: i })), P(this, "del", (s, c = {}, i = {}) => this.request({ url: s, method: "DELETE", data: c, params: i })), P(this, "download", (s, c) => {
|
|
}), P(this, "cache", (s, c = {}) => this.request({ url: s, method: "GET", params: c }, !0)), P(this, "list", (s, c = {}) => this.get(`/api/${s}/${this.encode(c)}`)), P(this, "getAppInfo", () => {
|
|
}), P(this, "refreshCache", (s = !1) => {
|
|
s && R(this, F)["#"].clear(), R(this, F).$.clear();
|
|
}), P(this, "decode", (s = "", c = {}) => {
|
|
if (s === void 0 || s === "" || s === null) return c;
|
|
try {
|
|
const i = R(this, X).decode(s).buffer;
|
|
return oe.unpack(((g) => ar.decode(new DataView(g), {}))(i));
|
|
} catch {
|
|
return console.warn("core.decode", s), c;
|
|
}
|
|
}), P(this, "encode", (s = {}) => {
|
|
const c = JSON.stringify(s, (i, g) => g === void 0 ? null : g);
|
|
return R(this, X).encode(((i) => ir.encode(i || ""))(oe.pack(c)));
|
|
}), D(this, Tt, e), D(this, rt, n), D(this, X, sr(r));
|
|
}
|
|
}
|
|
rt = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap();
|
|
const cr = Ct;
|
|
Ct.onUnhandledRejection = (t) => {
|
|
var e, r, n, s, c, i;
|
|
t != null && t.IS_ECHO_MSG ? ((e = t == null ? void 0 : t.$echoMsg) == null || e.call(t), (r = t == null ? void 0 : t.preventDefault) == null || r.call(t)) : (n = t.reason) != null && n.IS_ECHO_MSG && ((c = (s = t.reason) == null ? void 0 : s.$echoMsg) == null || c.call(s), (i = t == null ? void 0 : t.preventDefault) == null || i.call(t));
|
|
}, Ct.onMsg = (t, e) => [0, 1].includes(t) ? console.log(e) : console.warn(e);
|
|
function Oe(t) {
|
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
}
|
|
var Ae = { exports: {} };
|
|
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
* @license MIT */
|
|
Ae.exports = function() {
|
|
var t, e, r = { version: "0.2.0" }, n = r.settings = { minimum: 0.08, easing: "ease", positionUsing: "", speed: 200, trickle: !0, trickleRate: 0.02, trickleSpeed: 800, showSpinner: !0, barSelector: '[role="bar"]', spinnerSelector: '[role="spinner"]', parent: "body", template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>' };
|
|
function s(h, l, o) {
|
|
return h < l ? l : h > o ? o : h;
|
|
}
|
|
function c(h) {
|
|
return 100 * (-1 + h);
|
|
}
|
|
function i(h, l, o) {
|
|
var a;
|
|
return (a = n.positionUsing === "translate3d" ? { transform: "translate3d(" + c(h) + "%,0,0)" } : n.positionUsing === "translate" ? { transform: "translate(" + c(h) + "%,0)" } : { "margin-left": c(h) + "%" }).transition = "all " + l + "ms " + o, a;
|
|
}
|
|
r.configure = function(h) {
|
|
var l, o;
|
|
for (l in h) (o = h[l]) !== void 0 && h.hasOwnProperty(l) && (n[l] = o);
|
|
return this;
|
|
}, r.status = null, r.set = function(h) {
|
|
var l = r.isStarted();
|
|
h = s(h, n.minimum, 1), r.status = h === 1 ? null : h;
|
|
var o = r.render(!l), a = o.querySelector(n.barSelector), u = n.speed, d = n.easing;
|
|
return o.offsetWidth, g(function(f) {
|
|
n.positionUsing === "" && (n.positionUsing = r.getPositioningCSS()), y(a, i(h, u, d)), h === 1 ? (y(o, { transition: "none", opacity: 1 }), o.offsetWidth, setTimeout(function() {
|
|
y(o, { transition: "all " + u + "ms linear", opacity: 0 }), setTimeout(function() {
|
|
r.remove(), f();
|
|
}, u);
|
|
}, u)) : setTimeout(f, u);
|
|
}), this;
|
|
}, r.isStarted = function() {
|
|
return typeof r.status == "number";
|
|
}, r.start = function() {
|
|
r.status || r.set(0);
|
|
var h = function() {
|
|
setTimeout(function() {
|
|
r.status && (r.trickle(), h());
|
|
}, n.trickleSpeed);
|
|
};
|
|
return n.trickle && h(), this;
|
|
}, r.done = function(h) {
|
|
return h || r.status ? r.inc(0.3 + 0.5 * Math.random()).set(1) : this;
|
|
}, r.inc = function(h) {
|
|
var l = r.status;
|
|
return l ? (typeof h != "number" && (h = (1 - l) * s(Math.random() * l, 0.1, 0.95)), l = s(l + h, 0, 0.994), r.set(l)) : r.start();
|
|
}, r.trickle = function() {
|
|
return r.inc(Math.random() * n.trickleRate);
|
|
}, t = 0, e = 0, r.promise = function(h) {
|
|
return h && h.state() !== "resolved" ? (e === 0 && r.start(), t++, e++, h.always(function() {
|
|
--e == 0 ? (t = 0, r.done()) : r.set((t - e) / t);
|
|
}), this) : this;
|
|
}, r.render = function(h) {
|
|
if (r.isRendered()) return document.getElementById("nprogress");
|
|
b(document.documentElement, "nprogress-busy");
|
|
var l = document.createElement("div");
|
|
l.id = "nprogress", l.innerHTML = n.template;
|
|
var o, a = l.querySelector(n.barSelector), u = h ? "-100" : c(r.status || 0), d = document.querySelector(n.parent);
|
|
return y(a, { transition: "all 0 linear", transform: "translate3d(" + u + "%,0,0)" }), n.showSpinner || (o = l.querySelector(n.spinnerSelector)) && E(o), d != document.body && b(d, "nprogress-custom-parent"), d.appendChild(l), l;
|
|
}, r.remove = function() {
|
|
w(document.documentElement, "nprogress-busy"), w(document.querySelector(n.parent), "nprogress-custom-parent");
|
|
var h = document.getElementById("nprogress");
|
|
h && E(h);
|
|
}, r.isRendered = function() {
|
|
return !!document.getElementById("nprogress");
|
|
}, r.getPositioningCSS = function() {
|
|
var h = document.body.style, l = "WebkitTransform" in h ? "Webkit" : "MozTransform" in h ? "Moz" : "msTransform" in h ? "ms" : "OTransform" in h ? "O" : "";
|
|
return l + "Perspective" in h ? "translate3d" : l + "Transform" in h ? "translate" : "margin";
|
|
};
|
|
var g = /* @__PURE__ */ function() {
|
|
var h = [];
|
|
function l() {
|
|
var o = h.shift();
|
|
o && o(l);
|
|
}
|
|
return function(o) {
|
|
h.push(o), h.length == 1 && l();
|
|
};
|
|
}(), y = /* @__PURE__ */ function() {
|
|
var h = ["Webkit", "O", "Moz", "ms"], l = {};
|
|
function o(f) {
|
|
return f.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(O, S) {
|
|
return S.toUpperCase();
|
|
});
|
|
}
|
|
function a(f) {
|
|
var O = document.body.style;
|
|
if (f in O) return f;
|
|
for (var S, T = h.length, U = f.charAt(0).toUpperCase() + f.slice(1); T--; ) if ((S = h[T] + U) in O) return S;
|
|
return f;
|
|
}
|
|
function u(f) {
|
|
return f = o(f), l[f] || (l[f] = a(f));
|
|
}
|
|
function d(f, O, S) {
|
|
O = u(O), f.style[O] = S;
|
|
}
|
|
return function(f, O) {
|
|
var S, T, U = arguments;
|
|
if (U.length == 2) for (S in O) (T = O[S]) !== void 0 && O.hasOwnProperty(S) && d(f, S, T);
|
|
else d(f, U[1], U[2]);
|
|
};
|
|
}();
|
|
function p(h, l) {
|
|
return (typeof h == "string" ? h : v(h)).indexOf(" " + l + " ") >= 0;
|
|
}
|
|
function b(h, l) {
|
|
var o = v(h), a = o + l;
|
|
p(o, l) || (h.className = a.substring(1));
|
|
}
|
|
function w(h, l) {
|
|
var o, a = v(h);
|
|
p(h, l) && (o = a.replace(" " + l + " ", " "), h.className = o.substring(1, o.length - 1));
|
|
}
|
|
function v(h) {
|
|
return (" " + (h.className || "") + " ").replace(/\s+/gi, " ");
|
|
}
|
|
function E(h) {
|
|
h && h.parentNode && h.parentNode.removeChild(h);
|
|
}
|
|
return r;
|
|
}();
|
|
const ur = Oe(Ae.exports);
|
|
var Re = { exports: {} };
|
|
Re.exports = function(t) {
|
|
var e = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
|
|
function r(l, o) {
|
|
var a = l[0], u = l[1], d = l[2], f = l[3];
|
|
u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & d | ~u & f) + o[0] - 680876936 | 0) << 7 | a >>> 25) + u | 0) & u | ~a & d) + o[1] - 389564586 | 0) << 12 | f >>> 20) + a | 0) & a | ~f & u) + o[2] + 606105819 | 0) << 17 | d >>> 15) + f | 0) & f | ~d & a) + o[3] - 1044525330 | 0) << 22 | u >>> 10) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & d | ~u & f) + o[4] - 176418897 | 0) << 7 | a >>> 25) + u | 0) & u | ~a & d) + o[5] + 1200080426 | 0) << 12 | f >>> 20) + a | 0) & a | ~f & u) + o[6] - 1473231341 | 0) << 17 | d >>> 15) + f | 0) & f | ~d & a) + o[7] - 45705983 | 0) << 22 | u >>> 10) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & d | ~u & f) + o[8] + 1770035416 | 0) << 7 | a >>> 25) + u | 0) & u | ~a & d) + o[9] - 1958414417 | 0) << 12 | f >>> 20) + a | 0) & a | ~f & u) + o[10] - 42063 | 0) << 17 | d >>> 15) + f | 0) & f | ~d & a) + o[11] - 1990404162 | 0) << 22 | u >>> 10) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & d | ~u & f) + o[12] + 1804603682 | 0) << 7 | a >>> 25) + u | 0) & u | ~a & d) + o[13] - 40341101 | 0) << 12 | f >>> 20) + a | 0) & a | ~f & u) + o[14] - 1502002290 | 0) << 17 | d >>> 15) + f | 0) & f | ~d & a) + o[15] + 1236535329 | 0) << 22 | u >>> 10) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & f | d & ~f) + o[1] - 165796510 | 0) << 5 | a >>> 27) + u | 0) & d | u & ~d) + o[6] - 1069501632 | 0) << 9 | f >>> 23) + a | 0) & u | a & ~u) + o[11] + 643717713 | 0) << 14 | d >>> 18) + f | 0) & a | f & ~a) + o[0] - 373897302 | 0) << 20 | u >>> 12) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & f | d & ~f) + o[5] - 701558691 | 0) << 5 | a >>> 27) + u | 0) & d | u & ~d) + o[10] + 38016083 | 0) << 9 | f >>> 23) + a | 0) & u | a & ~u) + o[15] - 660478335 | 0) << 14 | d >>> 18) + f | 0) & a | f & ~a) + o[4] - 405537848 | 0) << 20 | u >>> 12) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & f | d & ~f) + o[9] + 568446438 | 0) << 5 | a >>> 27) + u | 0) & d | u & ~d) + o[14] - 1019803690 | 0) << 9 | f >>> 23) + a | 0) & u | a & ~u) + o[3] - 187363961 | 0) << 14 | d >>> 18) + f | 0) & a | f & ~a) + o[8] + 1163531501 | 0) << 20 | u >>> 12) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u & f | d & ~f) + o[13] - 1444681467 | 0) << 5 | a >>> 27) + u | 0) & d | u & ~d) + o[2] - 51403784 | 0) << 9 | f >>> 23) + a | 0) & u | a & ~u) + o[7] + 1735328473 | 0) << 14 | d >>> 18) + f | 0) & a | f & ~a) + o[12] - 1926607734 | 0) << 20 | u >>> 12) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u ^ d ^ f) + o[5] - 378558 | 0) << 4 | a >>> 28) + u | 0) ^ u ^ d) + o[8] - 2022574463 | 0) << 11 | f >>> 21) + a | 0) ^ a ^ u) + o[11] + 1839030562 | 0) << 16 | d >>> 16) + f | 0) ^ f ^ a) + o[14] - 35309556 | 0) << 23 | u >>> 9) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u ^ d ^ f) + o[1] - 1530992060 | 0) << 4 | a >>> 28) + u | 0) ^ u ^ d) + o[4] + 1272893353 | 0) << 11 | f >>> 21) + a | 0) ^ a ^ u) + o[7] - 155497632 | 0) << 16 | d >>> 16) + f | 0) ^ f ^ a) + o[10] - 1094730640 | 0) << 23 | u >>> 9) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u ^ d ^ f) + o[13] + 681279174 | 0) << 4 | a >>> 28) + u | 0) ^ u ^ d) + o[0] - 358537222 | 0) << 11 | f >>> 21) + a | 0) ^ a ^ u) + o[3] - 722521979 | 0) << 16 | d >>> 16) + f | 0) ^ f ^ a) + o[6] + 76029189 | 0) << 23 | u >>> 9) + d | 0, u = ((u += ((d = ((d += ((f = ((f += ((a = ((a += (u ^ d ^ f) + o[9] - 640364487 | 0) << 4 | a >>> 28) + u | 0) ^ u ^ d) + o[12] - 421815835 | 0) << 11 | f >>> 21) + a | 0) ^ a ^ u) + o[15] + 530742520 | 0) << 16 | d >>> 16) + f | 0) ^ f ^ a) + o[2] - 995338651 | 0) << 23 | u >>> 9) + d | 0, u = ((u += ((f = ((f += (u ^ ((a = ((a += (d ^ (u | ~f)) + o[0] - 198630844 | 0) << 6 | a >>> 26) + u | 0) | ~d)) + o[7] + 1126891415 | 0) << 10 | f >>> 22) + a | 0) ^ ((d = ((d += (a ^ (f | ~u)) + o[14] - 1416354905 | 0) << 15 | d >>> 17) + f | 0) | ~a)) + o[5] - 57434055 | 0) << 21 | u >>> 11) + d | 0, u = ((u += ((f = ((f += (u ^ ((a = ((a += (d ^ (u | ~f)) + o[12] + 1700485571 | 0) << 6 | a >>> 26) + u | 0) | ~d)) + o[3] - 1894986606 | 0) << 10 | f >>> 22) + a | 0) ^ ((d = ((d += (a ^ (f | ~u)) + o[10] - 1051523 | 0) << 15 | d >>> 17) + f | 0) | ~a)) + o[1] - 2054922799 | 0) << 21 | u >>> 11) + d | 0, u = ((u += ((f = ((f += (u ^ ((a = ((a += (d ^ (u | ~f)) + o[8] + 1873313359 | 0) << 6 | a >>> 26) + u | 0) | ~d)) + o[15] - 30611744 | 0) << 10 | f >>> 22) + a | 0) ^ ((d = ((d += (a ^ (f | ~u)) + o[6] - 1560198380 | 0) << 15 | d >>> 17) + f | 0) | ~a)) + o[13] + 1309151649 | 0) << 21 | u >>> 11) + d | 0, u = ((u += ((f = ((f += (u ^ ((a = ((a += (d ^ (u | ~f)) + o[4] - 145523070 | 0) << 6 | a >>> 26) + u | 0) | ~d)) + o[11] - 1120210379 | 0) << 10 | f >>> 22) + a | 0) ^ ((d = ((d += (a ^ (f | ~u)) + o[2] + 718787259 | 0) << 15 | d >>> 17) + f | 0) | ~a)) + o[9] - 343485551 | 0) << 21 | u >>> 11) + d | 0, l[0] = a + l[0] | 0, l[1] = u + l[1] | 0, l[2] = d + l[2] | 0, l[3] = f + l[3] | 0;
|
|
}
|
|
function n(l) {
|
|
var o, a = [];
|
|
for (o = 0; o < 64; o += 4) a[o >> 2] = l.charCodeAt(o) + (l.charCodeAt(o + 1) << 8) + (l.charCodeAt(o + 2) << 16) + (l.charCodeAt(o + 3) << 24);
|
|
return a;
|
|
}
|
|
function s(l) {
|
|
var o, a = [];
|
|
for (o = 0; o < 64; o += 4) a[o >> 2] = l[o] + (l[o + 1] << 8) + (l[o + 2] << 16) + (l[o + 3] << 24);
|
|
return a;
|
|
}
|
|
function c(l) {
|
|
var o, a, u, d, f, O, S = l.length, T = [1732584193, -271733879, -1732584194, 271733878];
|
|
for (o = 64; o <= S; o += 64) r(T, n(l.substring(o - 64, o)));
|
|
for (a = (l = l.substring(o - 64)).length, u = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], o = 0; o < a; o += 1) u[o >> 2] |= l.charCodeAt(o) << (o % 4 << 3);
|
|
if (u[o >> 2] |= 128 << (o % 4 << 3), o > 55) for (r(T, u), o = 0; o < 16; o += 1) u[o] = 0;
|
|
return d = (d = 8 * S).toString(16).match(/(.*?)(.{0,8})$/), f = parseInt(d[2], 16), O = parseInt(d[1], 16) || 0, u[14] = f, u[15] = O, r(T, u), T;
|
|
}
|
|
function i(l) {
|
|
var o, a, u, d, f, O, S = l.length, T = [1732584193, -271733879, -1732584194, 271733878];
|
|
for (o = 64; o <= S; o += 64) r(T, s(l.subarray(o - 64, o)));
|
|
for (a = (l = o - 64 < S ? l.subarray(o - 64) : new Uint8Array(0)).length, u = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], o = 0; o < a; o += 1) u[o >> 2] |= l[o] << (o % 4 << 3);
|
|
if (u[o >> 2] |= 128 << (o % 4 << 3), o > 55) for (r(T, u), o = 0; o < 16; o += 1) u[o] = 0;
|
|
return d = (d = 8 * S).toString(16).match(/(.*?)(.{0,8})$/), f = parseInt(d[2], 16), O = parseInt(d[1], 16) || 0, u[14] = f, u[15] = O, r(T, u), T;
|
|
}
|
|
function g(l) {
|
|
var o, a = "";
|
|
for (o = 0; o < 4; o += 1) a += e[l >> 8 * o + 4 & 15] + e[l >> 8 * o & 15];
|
|
return a;
|
|
}
|
|
function y(l) {
|
|
var o;
|
|
for (o = 0; o < l.length; o += 1) l[o] = g(l[o]);
|
|
return l.join("");
|
|
}
|
|
function p(l) {
|
|
return /[\u0080-\uFFFF]/.test(l) && (l = unescape(encodeURIComponent(l))), l;
|
|
}
|
|
function b(l, o) {
|
|
var a, u = l.length, d = new ArrayBuffer(u), f = new Uint8Array(d);
|
|
for (a = 0; a < u; a += 1) f[a] = l.charCodeAt(a);
|
|
return o ? f : d;
|
|
}
|
|
function w(l) {
|
|
return String.fromCharCode.apply(null, new Uint8Array(l));
|
|
}
|
|
function v(l, o, a) {
|
|
var u = new Uint8Array(l.byteLength + o.byteLength);
|
|
return u.set(new Uint8Array(l)), u.set(new Uint8Array(o), l.byteLength), u;
|
|
}
|
|
function E(l) {
|
|
var o, a = [], u = l.length;
|
|
for (o = 0; o < u - 1; o += 2) a.push(parseInt(l.substr(o, 2), 16));
|
|
return String.fromCharCode.apply(String, a);
|
|
}
|
|
function h() {
|
|
this.reset();
|
|
}
|
|
return y(c("hello")), typeof ArrayBuffer > "u" || ArrayBuffer.prototype.slice || function() {
|
|
function l(o, a) {
|
|
return (o = 0 | o || 0) < 0 ? Math.max(o + a, 0) : Math.min(o, a);
|
|
}
|
|
ArrayBuffer.prototype.slice = function(o, a) {
|
|
var u, d, f, O, S = this.byteLength, T = l(o, S), U = S;
|
|
return a !== t && (U = l(a, S)), T > U ? new ArrayBuffer(0) : (u = U - T, d = new ArrayBuffer(u), f = new Uint8Array(d), O = new Uint8Array(this, T, u), f.set(O), d);
|
|
};
|
|
}(), h.prototype.append = function(l) {
|
|
return this.appendBinary(p(l)), this;
|
|
}, h.prototype.appendBinary = function(l) {
|
|
this._buff += l, this._length += l.length;
|
|
var o, a = this._buff.length;
|
|
for (o = 64; o <= a; o += 64) r(this._hash, n(this._buff.substring(o - 64, o)));
|
|
return this._buff = this._buff.substring(o - 64), this;
|
|
}, h.prototype.end = function(l) {
|
|
var o, a, u = this._buff, d = u.length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
for (o = 0; o < d; o += 1) f[o >> 2] |= u.charCodeAt(o) << (o % 4 << 3);
|
|
return this._finish(f, d), a = y(this._hash), l && (a = E(a)), this.reset(), a;
|
|
}, h.prototype.reset = function() {
|
|
return this._buff = "", this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this;
|
|
}, h.prototype.getState = function() {
|
|
return { buff: this._buff, length: this._length, hash: this._hash.slice() };
|
|
}, h.prototype.setState = function(l) {
|
|
return this._buff = l.buff, this._length = l.length, this._hash = l.hash, this;
|
|
}, h.prototype.destroy = function() {
|
|
delete this._hash, delete this._buff, delete this._length;
|
|
}, h.prototype._finish = function(l, o) {
|
|
var a, u, d, f = o;
|
|
if (l[f >> 2] |= 128 << (f % 4 << 3), f > 55) for (r(this._hash, l), f = 0; f < 16; f += 1) l[f] = 0;
|
|
a = (a = 8 * this._length).toString(16).match(/(.*?)(.{0,8})$/), u = parseInt(a[2], 16), d = parseInt(a[1], 16) || 0, l[14] = u, l[15] = d, r(this._hash, l);
|
|
}, h.hash = function(l, o) {
|
|
return h.hashBinary(p(l), o);
|
|
}, h.hashBinary = function(l, o) {
|
|
var a = y(c(l));
|
|
return o ? E(a) : a;
|
|
}, h.ArrayBuffer = function() {
|
|
this.reset();
|
|
}, h.ArrayBuffer.prototype.append = function(l) {
|
|
var o, a = v(this._buff.buffer, l), u = a.length;
|
|
for (this._length += l.byteLength, o = 64; o <= u; o += 64) r(this._hash, s(a.subarray(o - 64, o)));
|
|
return this._buff = o - 64 < u ? new Uint8Array(a.buffer.slice(o - 64)) : new Uint8Array(0), this;
|
|
}, h.ArrayBuffer.prototype.end = function(l) {
|
|
var o, a, u = this._buff, d = u.length, f = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
for (o = 0; o < d; o += 1) f[o >> 2] |= u[o] << (o % 4 << 3);
|
|
return this._finish(f, d), a = y(this._hash), l && (a = E(a)), this.reset(), a;
|
|
}, h.ArrayBuffer.prototype.reset = function() {
|
|
return this._buff = new Uint8Array(0), this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this;
|
|
}, h.ArrayBuffer.prototype.getState = function() {
|
|
var l = h.prototype.getState.call(this);
|
|
return l.buff = w(l.buff), l;
|
|
}, h.ArrayBuffer.prototype.setState = function(l) {
|
|
return l.buff = b(l.buff, !0), h.prototype.setState.call(this, l);
|
|
}, h.ArrayBuffer.prototype.destroy = h.prototype.destroy, h.ArrayBuffer.prototype._finish = h.prototype._finish, h.ArrayBuffer.hash = function(l, o) {
|
|
var a = y(i(new Uint8Array(l)));
|
|
return o ? E(a) : a;
|
|
}, h;
|
|
}();
|
|
const lr = Oe(Re.exports);
|
|
export {
|
|
ur as N,
|
|
lr as S,
|
|
C as a,
|
|
cr as w
|
|
};
|