ff-dist/dist/common/vender-C0IfHU5B.js

1487 lines
74 KiB
JavaScript
Raw Permalink Normal View History

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